From 5d3044abb9a1c2ba9acf6edd6de8e87280adac1c Mon Sep 17 00:00:00 2001 From: Fedorov Vladimir Date: Tue, 28 Jul 2026 00:02:03 +0700 Subject: [PATCH] update editor --- dist/assets/{index-BJl2SwEb.js => index-8fDlsCH5.js} | 2 +- dist/assets/{index-CnSILpQu.css => index-Dq4E0b3K.css} | 2 +- dist/index.html | 4 ++-- src/components/ScenariosEditorPage.vue | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) rename dist/assets/{index-BJl2SwEb.js => index-8fDlsCH5.js} (98%) rename dist/assets/{index-CnSILpQu.css => index-Dq4E0b3K.css} (94%) diff --git a/dist/assets/index-BJl2SwEb.js b/dist/assets/index-8fDlsCH5.js similarity index 98% rename from dist/assets/index-BJl2SwEb.js rename to dist/assets/index-8fDlsCH5.js index 36137c2..6c05a44 100644 --- a/dist/assets/index-BJl2SwEb.js +++ b/dist/assets/index-8fDlsCH5.js @@ -2381,4 +2381,4 @@ `);return}e=OM(e),t!=null&&o.push(` ${e}${kM(t)}`)}),e&&o.push(`}`),o.join(` `)}function MM(e,t,n){e&&e.forEach(e=>{if(Array.isArray(e))MM(e,t,n);else if(typeof e==`function`){let r=e(t);Array.isArray(r)?MM(r,t,n):r&&n(r)}else e&&n(e)})}function NM(e,t,n,r,i,a){let o=e.$;!o||typeof o==`string`?t.push(o):typeof o==`function`?t.push(o({context:r.context,props:i})):(o.before&&o.before(r.context),!o.$||typeof o.$==`string`?t.push(o.$):o.$&&t.push(o.$({context:r.context,props:i})));let s=EM(t),c=jM(s,e.props,r,i);a&&c&&a.insertRule(c),!a&&c.length&&n.push(c),e.children&&MM(e.children,{context:r.context,props:i},e=>{if(typeof e==`string`){let t=jM(s,{raw:e},r,i);a?a.insertRule(t):n.push(t)}else NM(e,t,n,r,i,a)}),t.pop(),o&&o.after&&o.after(r.context)}function PM(e,t,n,r=!1){let i=[];return NM(e,[],i,t,n,r?e.instance.__styleSheet:void 0),r?``:i.join(` -`)}function FM(e){if(!e)return;let t=e.parentElement;t&&t.removeChild(e)}function IM(e){return document.querySelector(`style[cssr-id="${e}"]`)}function LM(e){let t=document.createElement(`style`);return t.setAttribute(`cssr-id`,e),t}window&&(window.__cssrContext={});function RM(e){let t=e.getAttribute(`mount-count`);return t===null?null:Number(t)}function zM(e,t){e.setAttribute(`mount-count`,String(t))}function BM(e,t,n,r){let{els:i}=t;if(n===void 0)i.forEach(FM),t.els=[];else{let e=IM(n);if(e&&i.includes(e)){let a=RM(e);r?a===null?console.error(`[css-render/unmount]: The style with target='${n}' is mounted in count mode.`):a<=1?(FM(e),t.els=i.filter(t=>t!==e)):zM(e,a-1):a===null?(FM(e),t.els=i.filter(t=>t!==e)):console.error(`[css-render/unmount]: The style with target='${n}' is mounted in no-count mode.`)}}}function VM(e,t){e.push(t)}function HM(e,t,n,r,i,a,o,s,c){if(o&&!c){if(n===void 0){console.error("[css-render/mount]: `id` is required in `boost` mode.");return}let i=window.__cssrContext;i[n]||(i[n]=!0,PM(t,e,r,o));return}let l,{els:u}=t,d;if(n===void 0&&(d=t.render(r),n=Ec(d)),c){c(n,d??t.render(r));return}let f=IM(n);if(s||f===null){if(l=f===null?LM(n):f,d===void 0&&(d=t.render(r)),l.textContent=d,f!==null)return;if(i){let e=document.head.getElementsByTagName(`style`)[0]||null;document.head.insertBefore(l,e)}else document.head.appendChild(l);a&&zM(l,1),VM(u,l)}else{let e=RM(f);a?e===null?console.error(`[css-render/mount]: The style with id='${n}' has been mounted in no-count mode.`):zM(f,e+1):e!==null&&console.error(`[css-render/mount]: The style with id='${n}' has been mounted in count mode.`)}return f??l}function UM(e){return PM(this,this.instance,e)}function WM(e={}){let{target:t,id:n,ssr:r,props:i,count:a=!1,head:o=!1,boost:s=!1,force:c=!1}=e;return HM(this.instance,this,n??t,i,o,a,s,c,r)}function GM(e={}){let{id:t,target:n,delay:r=0,count:i=!1}=e;r===0?BM(this.instance,this,t??n,i):setTimeout(()=>BM(this.instance,this,t??n,i),r)}var KM=function(e,t,n,r){return{instance:e,$:t,props:n,children:r,els:[],render:UM,mount:WM,unmount:GM}},qM=function(e,t,n,r){return Array.isArray(t)?KM(e,{$:null},null,t):Array.isArray(n)?KM(e,t,null,n):Array.isArray(r)?KM(e,t,n,r):KM(e,t,n,null)};function JM(e={}){let t=null,n={c:((...e)=>qM(n,...e)),use:(e,...t)=>e.install(n,...t),find:IM,context:{},config:e,get __styleSheet(){if(!t){let e=document.createElement(`style`);return document.head.appendChild(e),t=document.styleSheets[document.styleSheets.length-1],t}return t}};return n}var{c:YM}=JM(),XM=YM(`.xicon`,{width:`1em`,height:`1em`,display:`inline-flex`},[YM(`svg`,{width:`1em`,height:`1em`}),YM(`svg:not([fill])`,{fill:`currentColor`})]),ZM=()=>{XM.mount({id:`xicons-icon`})},QM={size:[String,Number],color:String,tag:String},$M=Symbol(`IconConfigInjection`),eN=`span`,tN=P({name:`Icon`,props:QM,setup(e,{slots:t}){let n=N($M,null),r=B(()=>{let t=e.size??n?.size;if(t!==void 0)return typeof t==`number`||/^\d+$/.test(t)?`${t}px`:t}),i=B(()=>{let{color:t}=e;return t===void 0?n?n.color:void 0:t}),a=B(()=>{let{tag:t}=e;return t===void 0?n?.tag??eN:t});return Br(()=>{ZM()}),()=>V(a.value,{class:`xicon`,style:{color:i.value,fontSize:r.value}},[Qr(t,`default`)])}});function nN(e){return{Ping(t){let n=[],r=`api/test/ping`;return n.length>0&&(r+=`?${n.join(`&`)}`),e({path:r,method:`GET`,body:null},{service:`EveningDetectiveServer`,method:`Ping`})},Echo(t){let n=[];t.text&&n.push(`text=${encodeURIComponent(t.text.toString())}`);let r=`api/test/echo`;return n.length>0&&(r+=`?${n.join(`&`)}`),e({path:r,method:`POST`,body:null},{service:`EveningDetectiveServer`,method:`Echo`})},Signup(t){let n=JSON.stringify(t),r=[],i=`api/auth/signup`;return r.length>0&&(i+=`?${r.join(`&`)}`),e({path:i,method:`POST`,body:n},{service:`EveningDetectiveServer`,method:`Signup`})},RefreshPassword(t){let n=JSON.stringify(t),r=[],i=`api/auth/refresh-password`;return r.length>0&&(i+=`?${r.join(`&`)}`),e({path:i,method:`POST`,body:n},{service:`EveningDetectiveServer`,method:`RefreshPassword`})},Login(t){let n=JSON.stringify(t),r=[],i=`api/auth/login`;return r.length>0&&(i+=`?${r.join(`&`)}`),e({path:i,method:`POST`,body:n},{service:`EveningDetectiveServer`,method:`Login`})},Refresh(t){let n=JSON.stringify(t),r=[],i=`api/auth/refresh`;return r.length>0&&(i+=`?${r.join(`&`)}`),e({path:i,method:`POST`,body:n},{service:`EveningDetectiveServer`,method:`Refresh`})},GetUsers(t){let n=[],r=`api/users`;return n.length>0&&(r+=`?${n.join(`&`)}`),e({path:r,method:`GET`,body:null},{service:`EveningDetectiveServer`,method:`GetUsers`})},GetUserById(t){if(!t.id)throw Error(`missing required field request.id`);let n=`api/users/${t.id}`,r=[],i=n;return r.length>0&&(i+=`?${r.join(`&`)}`),e({path:i,method:`GET`,body:null},{service:`EveningDetectiveServer`,method:`GetUserById`})},GetMe(t){let n=[],r=`api/users/me`;return n.length>0&&(r+=`?${n.join(`&`)}`),e({path:r,method:`GET`,body:null},{service:`EveningDetectiveServer`,method:`GetMe`})},AddUserRole(t){if(!t.id)throw Error(`missing required field request.id`);let n=`api/users/${t.id}/role/add`,r=JSON.stringify(t),i=[],a=n;return i.length>0&&(a+=`?${i.join(`&`)}`),e({path:a,method:`POST`,body:r},{service:`EveningDetectiveServer`,method:`AddUserRole`})},DeleteUserRole(t){if(!t.id)throw Error(`missing required field request.id`);let n=`api/users/${t.id}/role/delete`,r=JSON.stringify(t),i=[],a=n;return i.length>0&&(a+=`?${i.join(`&`)}`),e({path:a,method:`POST`,body:r},{service:`EveningDetectiveServer`,method:`DeleteUserRole`})},GetPermissions(t){let n=[],r=`api/ui/permissions`;return n.length>0&&(r+=`?${n.join(`&`)}`),e({path:r,method:`GET`,body:null},{service:`EveningDetectiveServer`,method:`GetPermissions`})},UploadFile(t){let n=JSON.stringify(t),r=[],i=`api/files/upload`;return r.length>0&&(i+=`?${r.join(`&`)}`),e({path:i,method:`POST`,body:n},{service:`EveningDetectiveServer`,method:`UploadFile`})},DownloadFile(t){if(!t.filename)throw Error(`missing required field request.filename`);let n=`api/files/${t.filename}`,r=[],i=n;return r.length>0&&(i+=`?${r.join(`&`)}`),e({path:i,method:`GET`,body:null},{service:`EveningDetectiveServer`,method:`DownloadFile`})},AddScenario(t){let n=JSON.stringify(t),r=[],i=`api/scenario`;return r.length>0&&(i+=`?${r.join(`&`)}`),e({path:i,method:`POST`,body:n},{service:`EveningDetectiveServer`,method:`AddScenario`})},GetMyScenarios(t){let n=[],r=`api/my-scenarios`;return n.length>0&&(r+=`?${n.join(`&`)}`),e({path:r,method:`GET`,body:null},{service:`EveningDetectiveServer`,method:`GetMyScenarios`})},GetScenariosCatalog(t){let n=[],r=`api/catalog`;return n.length>0&&(r+=`?${n.join(`&`)}`),e({path:r,method:`GET`,body:null},{service:`EveningDetectiveServer`,method:`GetScenariosCatalog`})},GetFullScenario(t){if(!t.id)throw Error(`missing required field request.id`);let n=`api/scenarios/${t.id}/full`,r=[],i=n;return r.length>0&&(i+=`?${r.join(`&`)}`),e({path:i,method:`GET`,body:null},{service:`EveningDetectiveServer`,method:`GetFullScenario`})},GetScenario(t){if(!t.id)throw Error(`missing required field request.id`);let n=`api/scenarios/${t.id}`,r=[],i=n;return r.length>0&&(i+=`?${r.join(`&`)}`),e({path:i,method:`GET`,body:null},{service:`EveningDetectiveServer`,method:`GetScenario`})},UpdateScenario(t){if(!t.id)throw Error(`missing required field request.id`);let n=`api/scenarios/${t.id}`,r=JSON.stringify(t),i=[],a=n;return i.length>0&&(a+=`?${i.join(`&`)}`),e({path:a,method:`PUT`,body:r},{service:`EveningDetectiveServer`,method:`UpdateScenario`})},PublicScenario(t){if(!t.id)throw Error(`missing required field request.id`);let n=`api/scenarios/${t.id}/public`,r=JSON.stringify(t),i=[],a=n;return i.length>0&&(a+=`?${i.join(`&`)}`),e({path:a,method:`PUT`,body:r},{service:`EveningDetectiveServer`,method:`PublicScenario`})},DraftScenario(t){if(!t.id)throw Error(`missing required field request.id`);let n=`api/scenarios/${t.id}/draft`,r=JSON.stringify(t),i=[],a=n;return i.length>0&&(a+=`?${i.join(`&`)}`),e({path:a,method:`PUT`,body:r},{service:`EveningDetectiveServer`,method:`DraftScenario`})},DeleteScenario(t){if(!t.id)throw Error(`missing required field request.id`);let n=`api/scenarios/${t.id}`,r=[],i=n;return r.length>0&&(i+=`?${r.join(`&`)}`),e({path:i,method:`DELETE`,body:null},{service:`EveningDetectiveServer`,method:`DeleteScenario`})},AddScenarioPlace(t){if(!t.id)throw Error(`missing required field request.id`);let n=`api/scenarios/${t.id}/places`,r=JSON.stringify(t),i=[],a=n;return i.length>0&&(a+=`?${i.join(`&`)}`),e({path:a,method:`POST`,body:r},{service:`EveningDetectiveServer`,method:`AddScenarioPlace`})},UpdateScenarioPlace(t){if(!t.id)throw Error(`missing required field request.id`);if(!t.code)throw Error(`missing required field request.code`);let n=`api/scenarios/${t.id}/places/${t.code}`,r=JSON.stringify(t),i=[],a=n;return i.length>0&&(a+=`?${i.join(`&`)}`),e({path:a,method:`PUT`,body:r},{service:`EveningDetectiveServer`,method:`UpdateScenarioPlace`})},DeleteScenarioPlace(t){if(!t.id)throw Error(`missing required field request.id`);if(!t.code)throw Error(`missing required field request.code`);let n=`api/scenarios/${t.id}/places/${t.code}`,r=[],i=n;return r.length>0&&(i+=`?${r.join(`&`)}`),e({path:i,method:`DELETE`,body:null},{service:`EveningDetectiveServer`,method:`DeleteScenarioPlace`})}}}function rN(e){return nN(iN(e))}function iN(e){return async t=>{let n=`${aN()}/${t.path}`,r={"Content-Type":`application/json`},i=e?.();i&&(r.Authorization=`Bearer ${i}`);let a=await fetch(n,{method:t.method,headers:r,body:t.body});if(a.status==401)throw Error(`unauthorized`);return await a.json()}}function aN(){return`https://evening-detective.crabs-games.art`}var oN=oc(`auth`,()=>{let e=k(null),t=k(null),n=k(null),r=k(!1),i=k(null),a=B(()=>!!e.value),o=B(()=>n.value?.username||``),s=B(()=>n.value?.roles||[]);function c(){let n=localStorage.getItem(`accessToken`),r=localStorage.getItem(`refreshToken`);n&&(e.value=n,t.value=r,u())}function l(){return e.value}async function u(){if(e.value)try{let e=await rN(l).GetMe({});if(e.error){i.value=e.error;return}e.user&&(n.value=e.user)}catch(e){console.error(`Failed to fetch user:`,e),e instanceof Error&&e.message.includes(`401`)&&await h()}}async function d(n,a){r.value=!0,i.value=null;try{let r=await rN(l).Login({email:n,password:a});return r.error?(i.value=r.error,!1):r.accessToken?(e.value=r.accessToken,t.value=r.refreshToken||null,localStorage.setItem(`accessToken`,r.accessToken),r.refreshToken&&localStorage.setItem(`refreshToken`,r.refreshToken),await u(),!0):!1}catch(e){return i.value=e instanceof Error?e.message:`Login failed`,!1}finally{r.value=!1}}async function f(){if(!t.value)return!1;try{let n=await rN(l).Refresh({refreshToken:t.value});return n.error||!n.accessToken?!1:(e.value=n.accessToken,t.value=n.refreshToken||null,localStorage.setItem(`accessToken`,n.accessToken),n.refreshToken&&localStorage.setItem(`refreshToken`,n.refreshToken),!0)}catch{return!1}}async function p(e,t){r.value=!0,i.value=null;try{let n=await rN(l).Signup({username:e,email:t});return n.error?(i.value=n.error,!1):!0}catch(e){return i.value=e instanceof Error?e.message:`Signup failed`,!1}finally{r.value=!1}}async function m(e){r.value=!0,i.value=null;try{let t=await rN(l).RefreshPassword({email:e});return t.error?(i.value=t.error,!1):!0}catch(e){return i.value=e instanceof Error?e.message:`Password reset failed`,!1}finally{r.value=!1}}async function h(){e.value=null,t.value=null,n.value=null,i.value=null,localStorage.removeItem(`accessToken`),localStorage.removeItem(`refreshToken`)}function g(e){return s.value.includes(e)}function _(e){return e.some(e=>s.value.includes(e))}return{accessToken:e,refreshToken:t,user:n,isLoading:r,error:i,isAuthenticated:a,username:o,userRoles:s,initFromStorage:c,getToken:l,login:d,signup:p,refreshPassword:m,logout:h,fetchUser:u,refreshTokenAction:f,hasRole:g,hasAnyRole:_}});function sN(){let e=oN();return cN(e.refreshTokenAction,e.getToken)}function cN(e,t){return nN(lN(e,iN(t)))}function lN(e,t){return async n=>{try{return await t(n)}catch{return await e(),await t(n)}}}var uN={class:`menu-block`},dN={class:`right-group`},fN=P({__name:`HeaderMenu`,props:{active:{type:String,required:!1}},setup(e){let t=e,n=oN();n.initFromStorage();let r=MA(),i=sN(),a=k([]);async function o(){a.value=[];let e=await i.GetPermissions({});a.value=e.permissions}o();function s(e){return a.value.includes(e)}let c=()=>{r.push(`/login`)},l=()=>{n.logout(),r.push(`/login`)},u=k(!1);return(e,i)=>(F(),I(`div`,uN,[L(`div`,{onClick:i[0]||=e=>u.value=!u.value,class:`burger-button`},[R(A(tN),{class:`burger-icon`,size:`28`},{default:M(()=>[R(A(bM))]),_:1})]),L(`div`,{class:ge([`left-group menu-buttons-block`,u.value?``:`menu-buttons-block-active`])},[L(`div`,{class:ge([`menu-item-block`,{active:t.active==`main`}]),onClick:i[1]||=e=>A(r).push(`/`)},` Главная `,2),A(n).hasRole(`user`)?(F(),I(`div`,{key:0,class:ge([`menu-item-block`,{active:t.active==`office`}]),onClick:i[2]||=e=>A(r).push(`/office`)},` Кабинет `,2)):ja(``,!0),s(`games_page`)?(F(),I(`div`,{key:1,class:ge([`menu-item-block`,{active:t.active==`games`}]),onClick:i[3]||=e=>A(r).push(`/games`)},` Игры `,2)):ja(``,!0),L(`div`,{class:ge([`menu-item-block`,{active:t.active==`catalog`}]),onClick:i[4]||=e=>A(r).push(`/catalog`)},` Каталог `,2),s(`scenarios_page`)?(F(),I(`div`,{key:2,class:ge([`menu-item-block`,{active:t.active==`scenarios`}]),onClick:i[5]||=e=>A(r).push(`/scenarios`)},` Мои сценарии `,2)):ja(``,!0),s(`users_page`)?(F(),I(`div`,{key:3,class:ge([`menu-item-block`,{active:t.active==`users`}]),onClick:i[6]||=e=>A(r).push(`/users`)},` Пользователи `,2)):ja(``,!0)],2),L(`div`,dN,[A(n).isAuthenticated?ja(``,!0):(F(),I(`div`,{key:0,class:`menu-item-block right`,onClick:c},` Войти `)),A(n).isAuthenticated?(F(),I(`div`,{key:1,class:`menu-item-block right`,onClick:l},`Выйти`)):ja(``,!0)])]))}}),pN=(e,t)=>{let n=e.__vccOpts||e;for(let[e,r]of t)n[e]=r;return n},mN=pN(fN,[[`__scopeId`,`data-v-5e423637`]]),hN=P({__name:`GamesPage`,setup(e){return(e,t)=>(F(),I(pa,null,[t[0]||=L(`div`,{class:`center-block-custom content-block`},`Игры`,-1),R(mN,{active:`games`})],64))}}),gN=P({__name:`GamesView`,setup(e){return(e,t)=>(F(),Ca(hN))}}),_N=P({__name:`HomeView`,setup(e){return(e,t)=>(F(),I(pa,null,[t[0]||=L(`div`,{class:`center-block-custom content-block center-middle-block-custom height80`},[L(`div`,null,[L(`h1`,{class:`font-text`},`Вечерний детектив`),L(`h3`,{class:`font-text`},`Дело №0`),L(`p`,{class:`content-text`},` Поиграем? `)])],-1),R(mN,{active:`main`})],64))}}),vN={class:`center-block-custom content-block center-middle-block-custom height80`},yN={class:`form-button-wrapper`},bN={class:`form-label`},xN={key:0},SN={key:1},CN={class:`form-label`},wN={class:`form-button-wrapper`},TN={class:`form-label`},EN={key:0},DN={key:1},ON={class:`form-button-wrapper`},kN={class:`form-label`},AN={key:0},jN={key:1},MN=pN(P({__name:`LoginPage`,setup(e){let t=oN(),n=MA(),r=qE(),i=k(``),a=k(``),o=k(``),s=k(!1),c=B(()=>[`@mail.ru`,`@yandex.ru`,`@gmail.com`].map(e=>{let t=a.value.split(`@`)[0];return{label:t+e,value:t+e}}));async function l(){if(!await t.login(a.value,o.value)&&t.error!=null){r.error(t.error);return}n.push(`/office`)}async function u(){if(s.value){if(!await t.signup(i.value,a.value)&&t.error!=null){r.error(t.error);return}r.info(`Пароль отправлен на почту`)}}async function d(){if(!await t.refreshPassword(a.value)&&t.error!=null){r.error(t.error);return}r.info(`Пароль отправлен на почту`)}return(e,n)=>(F(),I(`div`,vN,[R(A(mT),{style:{"margin-bottom":`16px`},class:`sign-card`},{default:M(()=>[R(A(Ak),{type:`line`,animated:``},{default:M(()=>[R(A(Ek),{name:`signin`,tab:`Вход`},{default:M(()=>[R(A(_D),{vertical:``},{default:M(()=>[n[6]||=L(`div`,{class:`form-label`},`Почта`,-1),R(A(Tw),{value:a.value,"onUpdate:value":n[0]||=e=>a.value=e,"input-props":{autocomplete:`disabled`},options:c.value,placeholder:`detective@mail.ru`,clearable:``},null,8,[`value`,`options`]),n[7]||=L(`div`,{class:`form-label`},`Пароль`,-1),R(A(pw),{value:o.value,"onUpdate:value":n[1]||=e=>o.value=e,type:`password`,placeholder:`********`},null,8,[`value`]),L(`div`,yN,[L(`div`,bN,[R(A(Xw),{onClick:l,disabled:a.value.length==0||o.value.length==0},{default:M(()=>[A(t).isLoading?(F(),I(`span`,SN,` Подождите... `)):(F(),I(`span`,xN,` Вход `))]),_:1},8,[`disabled`])])])]),_:1})]),_:1}),R(A(Ek),{name:`signup`,tab:`Регистрация`},{default:M(()=>[R(A(_D),{vertical:``},{default:M(()=>[n[9]||=L(`div`,{class:`form-label`},`Позывной`,-1),R(A(pw),{value:i.value,"onUpdate:value":n[2]||=e=>i.value=e,type:`text`,placeholder:`Шерлок`},null,8,[`value`]),n[10]||=L(`div`,{class:`form-label`},`Почта`,-1),R(A(Tw),{value:a.value,"onUpdate:value":n[3]||=e=>a.value=e,"input-props":{autocomplete:`disabled`},options:c.value,placeholder:`detective@mail.ru`,clearable:``},null,8,[`value`,`options`]),L(`div`,CN,[R(A(DT),{checked:s.value,"onUpdate:checked":n[4]||=e=>s.value=e},{default:M(()=>[...n[8]||=[z(` Я согласен с `,-1),L(`a`,{href:`/user-agreement`,target:`_blank`,class:`docs-link`},`пользовательским соглашением`,-1),L(`br`,null,null,-1),z(` и `,-1),L(`a`,{href:`/privacy-policy`,target:`_blank`,class:`docs-link`},`соглашением о персональных данных`,-1)]]),_:1},8,[`checked`])]),L(`div`,wN,[L(`div`,TN,[R(A(Xw),{onClick:u,disabled:i.value.length==0||o.value.length==0||!s.value},{default:M(()=>[A(t).isLoading?(F(),I(`span`,DN,` Подождите... `)):(F(),I(`span`,EN,` Регистрация `))]),_:1},8,[`disabled`])])])]),_:1})]),_:1}),R(A(Ek),{name:`new-password`,tab:`Новый пароль`},{default:M(()=>[R(A(_D),{vertical:``},{default:M(()=>[n[11]||=L(`div`,{class:`form-label`},`Почта`,-1),R(A(Tw),{value:a.value,"onUpdate:value":n[5]||=e=>a.value=e,"input-props":{autocomplete:`disabled`},options:c.value,placeholder:`detective@mail.ru`,clearable:``},null,8,[`value`,`options`]),L(`div`,ON,[L(`div`,kN,[R(A(Xw),{onClick:d,disabled:a.value.length==0},{default:M(()=>[A(t).isLoading?(F(),I(`span`,jN,` Подождите... `)):(F(),I(`span`,AN,` Прислать новый пароль `))]),_:1},8,[`disabled`])])])]),_:1})]),_:1})]),_:1})]),_:1})]))}}),[[`__scopeId`,`data-v-c1fd645b`]]),NN=P({__name:`LoginView`,setup(e){return(e,t)=>(F(),I(pa,null,[R(MN),R(mN)],64))}}),PN={class:`center-block-custom content-block`},FN=P({__name:`OfficePage`,setup(e){let t=oN(),n=sN(),r=k([]);async function i(){r.value=[];let e=await n.GetPermissions({});r.value=e.permissions}return i(),(e,n)=>(F(),I(pa,null,[L(`div`,PN,[L(`p`,null,`Доброго времени суток, `+Ce(A(t).username)+`.`,1)]),R(mN,{active:`office`})],64))}}),IN=P({__name:`OfficeView`,setup(e){return(e,t)=>(F(),Ca(FN))}}),LN={};function RN(e,t){return`Соглашением о персональных данных`}var zN=pN(LN,[[`render`,RN]]),BN={xmlns:`http://www.w3.org/2000/svg`,"xmlns:xlink":`http://www.w3.org/1999/xlink`,viewBox:`0 0 32 32`},VN=P({name:`Settings`,render:function(e,t){return F(),I(`svg`,BN,t[0]||=[L(`path`,{d:`M27 16.76V16v-.77l1.92-1.68A2 2 0 0 0 29.3 11l-2.36-4a2 2 0 0 0-1.73-1a2 2 0 0 0-.64.1l-2.43.82a11.35 11.35 0 0 0-1.31-.75l-.51-2.52a2 2 0 0 0-2-1.61h-4.68a2 2 0 0 0-2 1.61l-.51 2.52a11.48 11.48 0 0 0-1.32.75l-2.38-.86A2 2 0 0 0 6.79 6a2 2 0 0 0-1.73 1L2.7 11a2 2 0 0 0 .41 2.51L5 15.24v1.53l-1.89 1.68A2 2 0 0 0 2.7 21l2.36 4a2 2 0 0 0 1.73 1a2 2 0 0 0 .64-.1l2.43-.82a11.35 11.35 0 0 0 1.31.75l.51 2.52a2 2 0 0 0 2 1.61h4.72a2 2 0 0 0 2-1.61l.51-2.52a11.48 11.48 0 0 0 1.32-.75l2.42.82a2 2 0 0 0 .64.1a2 2 0 0 0 1.73-1l2.28-4a2 2 0 0 0-.41-2.51zM25.21 24l-3.43-1.16a8.86 8.86 0 0 1-2.71 1.57L18.36 28h-4.72l-.71-3.55a9.36 9.36 0 0 1-2.7-1.57L6.79 24l-2.36-4l2.72-2.4a8.9 8.9 0 0 1 0-3.13L4.43 12l2.36-4l3.43 1.16a8.86 8.86 0 0 1 2.71-1.57L13.64 4h4.72l.71 3.55a9.36 9.36 0 0 1 2.7 1.57L25.21 8l2.36 4l-2.72 2.4a8.9 8.9 0 0 1 0 3.13L27.57 20z`,fill:`currentColor`},null,-1),L(`path`,{d:`M16 22a6 6 0 1 1 6-6a5.94 5.94 0 0 1-6 6zm0-10a3.91 3.91 0 0 0-4 4a3.91 3.91 0 0 0 4 4a3.91 3.91 0 0 0 4-4a3.91 3.91 0 0 0-4-4z`,fill:`currentColor`},null,-1)])}}),HN={xmlns:`http://www.w3.org/2000/svg`,"xmlns:xlink":`http://www.w3.org/1999/xlink`,viewBox:`0 0 24 24`},UN=P({name:`Key24Regular`,render:function(e,t){return F(),I(`svg`,HN,t[0]||=[L(`g`,{fill:`none`},[L(`path`,{d:`M18.25 7a1.25 1.25 0 1 1-2.5 0a1.25 1.25 0 0 1 2.5 0zM15.5 2.05A6.554 6.554 0 0 0 8.95 8.6c0 .387.05.76.11 1.104a.275.275 0 0 1-.07.244l-6.235 6.236a2.75 2.75 0 0 0-.806 1.944V20.3c0 .966.784 1.75 1.75 1.75h2.5a1.75 1.75 0 0 0 1.75-1.75v-1.25H9.7c.69 0 1.25-.56 1.25-1.25v-1.75h1.75a1.25 1.25 0 0 0 1.25-1.204c.496.128 1.02.204 1.55.204a6.554 6.554 0 0 0 6.55-6.55c0-3.631-2.953-6.45-6.55-6.45zM10.45 8.6a5.054 5.054 0 0 1 5.05-5.05c2.802 0 5.05 2.181 5.05 4.95a5.054 5.054 0 0 1-5.05 5.05c-.68 0-1.38-.171-2.005-.44a.75.75 0 0 0-1.046.69v.75H10.7c-.69 0-1.25.56-1.25 1.25v1.75H7.7c-.69 0-1.25.56-1.25 1.25v1.5a.25.25 0 0 1-.25.25H3.7a.25.25 0 0 1-.25-.25v-2.172c0-.331.132-.65.366-.884l6.236-6.235a1.774 1.774 0 0 0 .486-1.564a4.917 4.917 0 0 1-.088-.845z`,fill:`currentColor`})],-1)])}}),WN={key:1,class:`place-block`},GN={class:`message-header`},KN={class:`message-content`},qN={key:0},JN={class:`message-image-border`},YN=[`src`],XN={class:`key-block`},ZN={key:0,class:`hr`},QN={class:`gray-block`},$N={key:0},eP={class:`key-block`},tP={key:3,class:`place-block`},nP=[`src`],rP={style:{display:`flex`,"align-items":`center`,width:`100%`}},iP={style:{display:`flex`,"flex-direction":`column`}},aP={style:{display:`flex`,"flex-direction":`column`,width:`100%`}},oP={class:`door-add-block`},sP={class:`door-field`},cP={style:{display:`flex`,"align-items":`center`,width:`100%`}},lP={style:{display:`flex`,"align-items":`center`,width:`100%`}},uP={class:`slot-block`},dP=pN(P({__name:`PlaceBlock`,props:{newPlaceCode:{type:String},newPlaceName:{type:String},newPlaceText:{type:String},place:{type:Object},mode:{type:String,required:!0}},emits:[`update:newPlaceCode`,`update:newPlaceName`,`update:newPlaceText`,`update:mode`],setup(e,{emit:t}){let n=e,r=t,i=e=>{r(`update:newPlaceCode`,e)},a=e=>{r(`update:newPlaceName`,e)},o=e=>{r(`update:newPlaceText`,e)},s=e=>{r(`update:mode`,e)};function c(){return{name:void 0,image:void 0}}function l(){return{code:void 0,name:void 0,keys:void 0}}function u(){return{name:void 0}}return(t,r)=>(F(),I(pa,null,[e.mode==`mini-add`?(F(),I(`div`,{key:0,class:`place-block-hover show-editor-block`,onClick:r[0]||=e=>s(`add`)},[...r[12]||=[L(`p`,{class:`place-image-plus`},`+`,-1)]])):ja(``,!0),e.mode==`add`?(F(),I(`div`,WN,[R(A(_D),{vertical:``},{default:M(()=>[R(A(hw),null,{default:M(()=>[R(A(pw),{style:{width:`20%`},value:e.newPlaceCode,"onUpdate:value":i,type:`text`,placeholder:`Ы-1`},null,8,[`value`]),R(A(pw),{style:{width:`80%`},value:e.newPlaceName,"onUpdate:value":a,type:`text`,placeholder:`Дом №Ы`},null,8,[`value`])]),_:1}),R(A(pw),{value:e.newPlaceText,"onUpdate:value":o,type:`textarea`,autosize:{minRows:3},placeholder:`В начале было слово...`},null,8,[`value`]),Qr(t.$slots,`default`,{},void 0,!0)]),_:3})])):ja(``,!0),e.mode==`show-editor`?(F(),I(`div`,{key:2,class:`place-block-hover show-editor-block`,onClick:r[1]||=e=>s(`edit`)},[L(`div`,GN,Ce(n.place.code)+`: `+Ce(n.place.name),1),r[13]||=L(`hr`,{class:`hr`},null,-1),L(`div`,KN,[n.place.image?(F(),I(`div`,qN,[L(`div`,JN,[L(`img`,{src:n.place.image,class:`message-image`},null,8,YN)])])):ja(``,!0),z(` `+Ce(n.place.text),1)]),(F(!0),I(pa,null,Zr(n.place.doors,e=>(F(),I(`div`,{key:e.code,class:`door-block`},[z(Ce(e.name)+` `,1),(F(!0),I(pa,null,Zr(e.keys,e=>(F(),I(`span`,XN,[R(A(tN),{class:`lock-icon`},{default:M(()=>[R(A(vM))]),_:1}),z(` `+Ce(e.name),1)]))),256))]))),128)),n.place.applications.length?(F(),I(`hr`,ZN)):ja(``,!0),(F(!0),I(pa,null,Zr(n.place.applications,e=>(F(),I(`div`,{class:`message-footer application-block`,key:e.name},` Приложение: `+Ce(e.name),1))),128)),L(`p`,QN,[e.place.hidden?(F(),I(`span`,$N,` Скрытая точка `)):ja(``,!0),(F(!0),I(pa,null,Zr(e.place.keys,e=>(F(),I(`span`,eP,[R(A(tN),{class:`lock-icon`},{default:M(()=>[R(A(UN))]),_:1}),z(` `+Ce(e.name),1)]))),256))])])):ja(``,!0),e.mode==`edit`?(F(),I(`div`,tP,[R(A(_D),{vertical:``},{default:M(()=>[R(A(hw),null,{default:M(()=>[R(A(pw),{style:{width:`20%`},value:n.place.code,"onUpdate:value":r[2]||=e=>n.place.code=e,type:`text`,placeholder:`Ы-1`},null,8,[`value`]),R(A(pw),{style:{width:`80%`},value:n.place.name,"onUpdate:value":r[3]||=e=>n.place.name=e,type:`text`,placeholder:`Дом №Ы`},null,8,[`value`])]),_:1}),R(A(pw),{value:n.place.text,"onUpdate:value":r[4]||=e=>n.place.text=e,type:`textarea`,autosize:{minRows:3},placeholder:`В начале было слово...`},null,8,[`value`]),r[25]||=L(`p`,{class:`settings-header`},`Картинка`,-1),L(`div`,null,[R(A(_D),null,{default:M(()=>[R(A(_D),{vertical:``},{default:M(()=>[L(`img`,{src:n.place.image,class:`message-edit-image`},null,8,nP),R(A(Xw),{onClick:r[5]||=e=>(n.place.image=``,n.place.fileList=null)},{default:M(()=>[...r[14]||=[z(`Убрать картинку`,-1)]]),_:1})]),_:1}),R(A(_D),{vertical:``},{default:M(()=>[R(A(pw),{value:n.place.image,"onUpdate:value":r[6]||=e=>n.place.image=e,type:`text`,placeholder:`Не задано`,disabled:``},null,8,[`value`]),R(A(mA),{"directory-dnd":``,max:1,"file-list":n.place.fileList,"onUpdate:fileList":r[7]||=e=>n.place.fileList=e},{default:M(()=>[R(A(zk),null,{default:M(()=>[R(A(Ik),{style:{"font-size":`16px`}},{default:M(()=>[...r[15]||=[z(` Щелкните или перетащите файл в эту область для загрузки `,-1)]]),_:1})]),_:1})]),_:1},8,[`file-list`])]),_:1})]),_:1})]),r[26]||=L(`p`,{class:`settings-header`},`Видимость точки`,-1),R(A(Ck),{value:n.place.hidden,"onUpdate:value":r[8]||=e=>n.place.hidden=e},{checked:M(()=>[...r[16]||=[z(` Скрытая точка `,-1)]]),unchecked:M(()=>[...r[17]||=[z(` Обычная точка `,-1)]]),_:1},8,[`value`]),r[27]||=z(` Улики `,-1),R(A(uD),{value:n.place.applications,"onUpdate:value":r[9]||=e=>n.place.applications=e,"on-create":c},{"create-button-default":M(()=>[...r[18]||=[z(` Добавить улику `,-1)]]),default:M(({value:e})=>[L(`div`,rP,[R(A(pw),{value:e.name,"onUpdate:value":t=>e.name=t,type:`text`,placeholder:`Название`},null,8,[`value`,`onUpdate:value`])])]),_:1},8,[`value`]),r[28]||=z(` Действия `,-1),R(A(uD),{value:n.place.doors,"onUpdate:value":r[10]||=e=>n.place.doors=e,"on-create":l},{"create-button-default":M(()=>[...r[19]||=[z(` Добавить действие `,-1)]]),action:M(({index:e,create:t,remove:n})=>[L(`div`,iP,[R(A(Xw),{onClick:()=>t(e),class:`plus-minus-buttons`},{default:M(()=>[...r[20]||=[z(`+`,-1)]]),_:1},8,[`onClick`]),R(A(Xw),{disabled:``,onClick:()=>n(e),class:`plus-minus-buttons`},{default:M(()=>[...r[21]||=[z(`-`,-1)]]),_:1},8,[`onClick`])])]),default:M(({value:e})=>[L(`div`,aP,[L(`div`,oP,[R(A(hw),null,{default:M(()=>[R(A(pw),{style:{width:`30%`},value:e.code,"onUpdate:value":t=>e.code=t,type:`text`,placeholder:`Код`},null,8,[`value`,`onUpdate:value`]),R(A(pw),{style:{width:`70%`},value:e.name,"onUpdate:value":t=>e.name=t,type:`text`,placeholder:`Название`},null,8,[`value`,`onUpdate:value`])]),_:2},1024),r[23]||=L(`p`,{class:`need-keys-text`},`Требуемые ключи`,-1),L(`div`,sP,[R(A(uD),{value:e.keys,"onUpdate:value":t=>e.keys=t,"on-create":u},{"create-button-default":M(()=>[...r[22]||=[z(` Добавить ключ `,-1)]]),default:M(({value:e})=>[L(`div`,cP,[R(A(pw),{value:e.name,"onUpdate:value":t=>e.name=t,type:`text`,placeholder:`Название`},null,8,[`value`,`onUpdate:value`])])]),_:1},8,[`value`,`onUpdate:value`])])])])]),_:1},8,[`value`]),r[29]||=z(` Получаемые ключи `,-1),R(A(uD),{value:n.place.keys,"onUpdate:value":r[11]||=e=>n.place.keys=e,"on-create":u},{"create-button-default":M(()=>[...r[24]||=[z(` Добавить ключ `,-1)]]),default:M(({value:e})=>[L(`div`,lP,[R(A(pw),{value:e.name,"onUpdate:value":t=>e.name=t,type:`text`,placeholder:`Название`},null,8,[`value`,`onUpdate:value`])])]),_:1},8,[`value`]),L(`div`,uP,[Qr(t.$slots,`default`,{},void 0,!0)])]),_:3})])):ja(``,!0)],64))}}),[[`__scopeId`,`data-v-8927f3b5`]]),fP={class:`center-block-custom-big`},pP={class:`places-container`},mP={class:`settings-block`},hP={key:0},gP={key:1},_P=pN(P({__name:`ScenariosEditorPage`,setup(e){let t=sN(),n=NA().params.id,r=k(!1),i=k(``),a=k(``),o=qE(),s=k([]),c=k({id:void 0,name:void 0,story:void 0,author:void 0,status:void 0,updatedAt:void 0,createdAt:void 0,publishedAt:void 0});async function l(e){let n=await t.GetFullScenario({id:e});if(n.error!=``){o.error(n.error);return}c.value=n.scenario,c.value.story?.places?.forEach(e=>{e.oldCode=e.code,e.mode=`show-editor`})}l(Number(n));async function u(e){let n=await t.DeleteScenario({id:e});if(n.error!=``){o.error(n.error);return}eF.push(`/scenarios`)}async function d(e){let a=await t.PublicScenario({id:e});if(a.error!=``){o.error(a.error);return}await l(Number(n)),i.value=``,r.value=!1}async function f(e){let a=await t.DraftScenario({id:e});if(a.error!=``){o.error(a.error);return}await l(Number(n)),i.value=``,r.value=!1}async function p(e,n){if(!e)return``;let r=await e.arrayBuffer(),i=new Uint8Array(r),a=await t.UploadFile({filename:n,data:h(i)});return a.error==``?a.filename||``:(o.error(a.error),``)}async function m(){let e=``;if(s.value&&s.value.length>0){let t=s.value[0].file||null;if(t==null||(e=await p(t,`scenarios_`+c.value.id+`_`+t.name),e===``))return}let i=await t.UpdateScenario({id:c.value.id,name:c.value.name,description:c.value.description,image:e});if(i.error!=``){o.error(i.error);return}await l(Number(n)),r.value=!1}function h(e){let t=String.fromCharCode(...e);return btoa(t)}let g=k(``),_=k(``),v=k(``),y=k(`mini-add`);async function b(){let e=await t.AddScenarioPlace({id:c.value.id,place:{code:g.value,name:_.value,text:v.value,image:void 0,hidden:void 0,applications:void 0,doors:void 0,keys:void 0}});if(e.error!=``){o.error(e.error);return}await l(Number(n)),g.value=``,_.value=``,v.value=``,y.value=`add`}async function x(){g.value=``,_.value=``,v.value=``,y.value=`mini-add`}async function S(e,n){for(let r of n.doors||[])if(e.story?.places?.find(e=>e.code==r.code)==null){let n=await t.AddScenarioPlace({id:e.id,place:{code:r.code,name:r.name,text:void 0,image:void 0,hidden:!0,applications:void 0,doors:void 0,keys:void 0}});if(n.error!=``){o.error(n.error);return}}}async function C(e){await l(Number(n)),e.mode=`show-editor`}async function w(e){if(e.fileList&&e.fileList.length>0){let t=e.fileList[0].file||null;if(t==null)return;let n=await p(t,`scenarios_`+c.value.id+`_place_`+e.code+`_`+t.name);if(n===``)return;e.image=n}await S(c.value,e);let r=await t.UpdateScenarioPlace({id:c.value.id,code:e.oldCode,place:e});if(r.error!=``){o.error(r.error);return}await l(Number(n)),e.mode=`show-editor`}async function T(e){let r=await t.DeleteScenarioPlace({id:c.value.id,code:e.oldCode});if(r.error!=``){o.error(r.error);return}await l(Number(n))}return(e,t)=>(F(),I(pa,null,[L(`div`,fP,[L(`div`,pP,[c.value.status==`public`?(F(),Ca(A(YC),{key:0,title:`Сценарий опубликован`,type:`warning`,style:{"margin-bottom":`20px`}},{default:M(()=>[...t[19]||=[z(` Не рекомендуется редактировать сценарий когда он опубликован. `,-1)]]),_:1})):ja(``,!0),L(`div`,mP,[z(` Точек: `+Ce(c.value.story?.places?.length)+` `,1),R(A(Xw),{quaternary:``,onClick:t[0]||=e=>r.value=!0,class:`settings-button`},{default:M(()=>[R(A(tN),{class:`settings-icon`},{default:M(()=>[R(A(VN))]),_:1}),t[20]||=z(` Настройки `,-1)]),_:1})]),R(dP,{mode:y.value,"onUpdate:mode":t[3]||=e=>y.value=e,newPlaceCode:g.value,"onUpdate:newPlaceCode":t[4]||=e=>g.value=e,newPlaceName:_.value,"onUpdate:newPlaceName":t[5]||=e=>_.value=e,newPlaceText:v.value,"onUpdate:newPlaceText":t[6]||=e=>v.value=e},{default:M(()=>[R(A(wD),{justify:`end`},{default:M(()=>[R(A(Xw),{onClick:t[1]||=e=>x()},{default:M(()=>[...t[21]||=[z(`Отмена`,-1)]]),_:1}),R(A(Xw),{onClick:t[2]||=e=>b(),disabled:!g.value},{default:M(()=>[...t[22]||=[z(`Добавить точку`,-1)]]),_:1},8,[`disabled`])]),_:1})]),_:1},8,[`mode`,`newPlaceCode`,`newPlaceName`,`newPlaceText`]),(F(!0),I(pa,null,Zr(c.value.story?.places,e=>(F(),Ca(dP,{place:e,mode:e.mode,"onUpdate:mode":t=>e.mode=t,key:e.code},{default:M(()=>[R(A(wD),{justify:`end`},{default:M(()=>[R(A(Xw),{onClick:t=>T(e),type:`error`,ghost:``},{default:M(()=>[...t[23]||=[z(`Удалить`,-1)]]),_:1},8,[`onClick`]),R(A(Xw),{onClick:t=>C(e)},{default:M(()=>[...t[24]||=[z(`Отмена`,-1)]]),_:1},8,[`onClick`]),R(A(Xw),{onClick:t=>w(e)},{default:M(()=>[...t[25]||=[z(`Сохранить`,-1)]]),_:1},8,[`onClick`])]),_:2},1024)]),_:2},1032,[`place`,`mode`,`onUpdate:mode`]))),128))])]),R(A(ME),{show:r.value,"onUpdate:show":t[18]||=e=>r.value=e},{default:M(()=>[R(A(mT),{style:{width:`600px`},title:`Настройки сценария`,bordered:!1,size:`huge`,role:`dialog`,"aria-modal":`true`},{"header-extra":M(()=>[R(A(Xw),{onClick:t[7]||=e=>r.value=!1},{default:M(()=>[...t[26]||=[z(` x `,-1)]]),_:1})]),footer:M(()=>[...t[42]||=[]]),default:M(()=>[R(A(_D),{vertical:``},{default:M(()=>[t[36]||=L(`p`,null,`Название`,-1),R(A(pw),{value:c.value.name,"onUpdate:value":t[8]||=e=>c.value.name=e,type:`text`,placeholder:`Дело №0 "Следствие ведут овечки"`},null,8,[`value`]),t[37]||=L(`p`,{class:`settings-header`},`Описание`,-1),R(A(pw),{value:c.value.description,"onUpdate:value":t[9]||=e=>c.value.description=e,type:`textarea`,placeholder:`Убийство пастуха...`},null,8,[`value`]),t[38]||=L(`p`,{class:`settings-header`},`Картинка`,-1),R(A(pw),{value:c.value.image,"onUpdate:value":t[10]||=e=>c.value.image=e,type:`text`,placeholder:`default_scenario.png`,disabled:``},null,8,[`value`]),R(A(mA),{"directory-dnd":``,max:1,"file-list":s.value,"onUpdate:fileList":t[11]||=e=>s.value=e},{default:M(()=>[R(A(zk),null,{default:M(()=>[R(A(Ik),{style:{"font-size":`16px`}},{default:M(()=>[...t[27]||=[z(` Щелкните или перетащите файл в эту область для загрузки `,-1)]]),_:1})]),_:1})]),_:1},8,[`file-list`]),R(A(Xw),{onClick:t[12]||=e=>m(),ghost:``},{default:M(()=>[...t[28]||=[z(` Сохранить изменения `,-1)]]),_:1}),t[39]||=L(`hr`,{class:`settings-hr`},null,-1),t[40]||=L(`p`,null,`Публикация`,-1),L(`p`,null,[t[29]||=z(`Статус: `,-1),c.value.status==`public`?(F(),I(`span`,hP,`опубликовано`)):ja(``,!0),c.value.status==`draft`?(F(),I(`span`,gP,`в разработке`)):ja(``,!0)]),L(`p`,null,[t[30]||=z(` Введите название сценария `,-1),R(A(Ik),{class:`name-text`,strong:``},{default:M(()=>[z(Ce(c.value.name),1)]),_:1})]),R(A(pw),{value:i.value,"onUpdate:value":t[13]||=e=>i.value=e,type:`text`,placeholder:`Дело №0 "Следствие ведут овечки"`},null,8,[`value`]),c.value.status==`public`?ja(``,!0):(F(),Ca(A(Xw),{key:0,onClick:t[14]||=e=>d(c.value.id),ghost:``,disabled:i.value!=c.value.name},{default:M(()=>[...t[31]||=[z(` Опубликовать сценарий `,-1)]]),_:1},8,[`disabled`])),c.value.status==`draft`?ja(``,!0):(F(),Ca(A(Xw),{key:1,onClick:t[15]||=e=>f(c.value.id),ghost:``,disabled:i.value!=c.value.name},{default:M(()=>[...t[32]||=[z(` Снять сценарий с публикации `,-1)]]),_:1},8,[`disabled`])),t[41]||=L(`hr`,{class:`settings-hr`},null,-1),L(`p`,null,[t[33]||=z(` Введите название сценария `,-1),R(A(Ik),{class:`name-text`,strong:``},{default:M(()=>[z(Ce(c.value.name),1)]),_:1}),t[34]||=z(` чтобы удалить его `,-1)]),R(A(pw),{value:a.value,"onUpdate:value":t[16]||=e=>a.value=e,type:`text`,placeholder:`Дело №0 "Следствие ведут овечки"`},null,8,[`value`]),R(A(Xw),{onClick:t[17]||=e=>u(c.value.id),type:`error`,ghost:``,disabled:a.value!=c.value.name},{default:M(()=>[...t[35]||=[z(` Удалить сценарий `,-1)]]),_:1},8,[`disabled`])]),_:1})]),_:1})]),_:1},8,[`show`]),R(mN,{active:`scenarios`})],64))}}),[[`__scopeId`,`data-v-bbecc975`]]),vP=P({__name:`ScenariosEditorView`,setup(e){return(e,t)=>(F(),Ca(_P))}}),yP={class:`center-block-custom-big content-block`},bP={class:`scenarios-container`},xP=[`onClick`],SP={class:`scenario-content-block`},CP={class:`scenario-title`},wP={class:`scenario-label`},TP=pN(P({__name:`ScenariosPage`,setup(e){let t=sN(),n=k([]),r=MA(),i=qE(),a=k(!1),o=k(``);async function s(){n.value=[];let e=await t.GetMyScenarios({});n.value=e.scenarios}async function c(e){let n=await t.AddScenario({name:e});if(n.error!=``){i.error(n.error);return}await l(n.id)}async function l(e){r.push(`/scenarios/`+e+`/editor`)}return s(),(e,t)=>(F(),I(pa,null,[L(`div`,yP,[L(`div`,bP,[L(`div`,{class:`scenario-block`,onClick:t[0]||=e=>a.value=!0},[...t[5]||=[L(`div`,{class:`scenario-image-block scenario-image-plus`},`+`,-1),L(`div`,{class:`scenario-content-block`},[L(`p`,{class:`scenario-title`},`Создать новый сценарий`)],-1)]]),(F(!0),I(pa,null,Zr(n.value,e=>(F(),I(`div`,{class:`scenario-block`,onClick:t=>l(e.id),key:e.id},[L(`div`,{class:`scenario-image-block scenario-image`,style:de({backgroundImage:`url(${e.image})`})},null,4),L(`div`,SP,[L(`p`,CP,Ce(e.name),1),L(`p`,wP,[e.status==`public`?(F(),Ca(A(MC),{key:0,bordered:!1,type:`success`,class:`status-block`},{default:M(()=>[...t[6]||=[z(`Опубликовано`,-1)]]),_:1})):ja(``,!0),e.status==`draft`?(F(),Ca(A(MC),{key:1,bordered:!1,type:`warning`,class:`status-block`},{default:M(()=>[...t[7]||=[z(`В разработке`,-1)]]),_:1})):ja(``,!0)])])],8,xP))),128))])]),R(A(ME),{show:a.value,"onUpdate:show":t[4]||=e=>a.value=e},{default:M(()=>[R(A(mT),{style:{width:`600px`},title:`Создание сценария`,bordered:!1,size:`huge`,role:`dialog`,"aria-modal":`true`},{"header-extra":M(()=>[R(A(Xw),{onClick:t[1]||=e=>a.value=!1},{default:M(()=>[...t[8]||=[z(` x `,-1)]]),_:1})]),footer:M(()=>[R(A(Xw),{onClick:t[3]||=e=>c(o.value),disabled:o.value.length==0},{default:M(()=>[...t[9]||=[z(` Создать `,-1)]]),_:1},8,[`disabled`])]),default:M(()=>[R(A(pw),{value:o.value,"onUpdate:value":t[2]||=e=>o.value=e,type:`text`,placeholder:`Дело №0 "Следствие ведут овечки"`},null,8,[`value`])]),_:1})]),_:1},8,[`show`]),R(mN,{active:`scenarios`})],64))}}),[[`__scopeId`,`data-v-c46f610b`]]),EP=P({__name:`ScenariosView`,setup(e){return(e,t)=>(F(),Ca(TP))}}),DP={};function OP(e,t){return`Пользовательское соглашение`}var kP=pN(DP,[[`render`,OP]]),AP={class:`center-block-custom content-block`},jP={class:`users-container`},MP={class:`user-field`},NP={class:`user-field`},PP={class:`user-field`},FP=pN(P({__name:`UsersPage`,setup(e){let t=sN(),n=qE(),r=k([]);async function i(){let e=await t.GetUsers({});if(e.error!=``){n.error(e.error);return}r.value=e.users}i();async function a(e,r){let a=await t.AddUserRole({id:e,role:r});if(a.error!=``){n.error(a.error);return}await i()}async function o(e,r){let a=await t.DeleteUserRole({id:e,role:r});if(a.error!=``){n.error(a.error);return}await i()}return(e,t)=>(F(),I(pa,null,[L(`div`,AP,[L(`div`,jP,[(F(!0),I(pa,null,Zr(r.value,e=>(F(),I(`div`,{key:e.id,class:`user-block`},[L(`div`,MP,` Позывной: `+Ce(e.username),1),L(`div`,NP,` Почта: `+Ce(e.email),1),L(`div`,PP,[R(A(_D),null,{default:M(()=>[t[0]||=z(` Роли: `,-1),(F(!0),I(pa,null,Zr(e.roles,e=>(F(),Ca(A(MC),{bordered:!1,key:e},{default:M(()=>[z(Ce(e),1)]),_:2},1024))),128))]),_:2},1024)]),R(A(wD),{justify:`end`,class:`roles-buttons-block`},{default:M(()=>[e.roles?.includes(`author`)?(F(),Ca(A(Xw),{key:1,onClick:t=>o(e.id,`author`)},{default:M(()=>[...t[2]||=[z(`Забрать роль автора`,-1)]]),_:1},8,[`onClick`])):(F(),Ca(A(Xw),{key:0,onClick:t=>a(e.id,`author`)},{default:M(()=>[...t[1]||=[z(`Сделать автором`,-1)]]),_:1},8,[`onClick`])),e.roles?.includes(`organizer`)?(F(),Ca(A(Xw),{key:3,onClick:t=>o(e.id,`organizer`)},{default:M(()=>[...t[4]||=[z(`Забрать роль организатора`,-1)]]),_:1},8,[`onClick`])):(F(),Ca(A(Xw),{key:2,onClick:t=>a(e.id,`organizer`)},{default:M(()=>[...t[3]||=[z(`Сделать организатором`,-1)]]),_:1},8,[`onClick`]))]),_:2},1024)]))),128))])]),R(mN,{active:`users`})],64))}}),[[`__scopeId`,`data-v-eba2cf43`]]),IP=P({__name:`UsersView`,setup(e){return(e,t)=>(F(),Ca(FP))}}),LP={class:`center-block-custom-big content-block`},RP={class:`scenarios-container`},zP=[`onClick`],BP={class:`scenario-content-block`},VP={class:`scenario-title`},HP={class:`scenario-description`},UP={class:`scenario-label`},WP=pN(P({__name:`CatalogPage`,setup(e){let t=sN(),n=k([]),r=MA();async function i(){n.value=[];let e=await t.GetScenariosCatalog({});n.value=e.scenarios}async function a(e){r.push(`/scenarios/`+e)}return i(),(e,t)=>(F(),I(pa,null,[L(`div`,LP,[L(`div`,RP,[(F(!0),I(pa,null,Zr(n.value,e=>(F(),I(`div`,{class:`scenario-block`,onClick:t=>a(e.id),key:e.id},[L(`div`,{class:`scenario-image-block scenario-image`,style:de({backgroundImage:`url(${e.image})`})},null,4),L(`div`,BP,[L(`p`,VP,Ce(e.name),1),L(`p`,HP,Ce(e.description),1),L(`p`,UP,[R(A(MC),{bordered:!1,type:`success`,class:`status-block`},{default:M(()=>[z(`Автор: `+Ce(e.author?.username),1)]),_:2},1024)])])],8,zP))),128))])]),R(mN,{active:`catalog`})],64))}}),[[`__scopeId`,`data-v-32efaf45`]]),GP=P({__name:`CatalogView`,setup(e){return(e,t)=>(F(),Ca(WP))}}),KP={class:`center-block-custom`},qP={class:`scenario-container`},JP={class:`scenario-title`},YP=[`src`],XP={class:`scenario-description`},ZP={class:`scenario-author`},QP=pN(P({__name:`ScenarioPage`,setup(e){let t=qE(),n=sN(),r=NA().params.id,i=k({id:void 0,name:void 0,story:void 0,author:void 0,status:void 0,updatedAt:void 0,createdAt:void 0,publishedAt:void 0});async function a(e){let r=await n.GetScenario({id:e});if(r.error!=``){t.error(r.error);return}i.value=r.scenario}return a(Number(r)),(e,t)=>(F(),I(pa,null,[L(`div`,KP,[L(`div`,qP,[L(`div`,JP,Ce(i.value.name),1),L(`img`,{class:`scenario-image`,src:i.value.image},null,8,YP),L(`div`,XP,Ce(i.value.description),1),L(`div`,ZP,[R(A(MC),{bordered:!1,type:`success`,class:`status-block`},{default:M(()=>[z(`Автор: `+Ce(i.value.author?.username),1)]),_:1})])])]),R(mN,{active:`catalog`})],64))}}),[[`__scopeId`,`data-v-230da08c`]]),$P=P({__name:`ScenarioView`,setup(e){return(e,t)=>(F(),Ca(QP))}}),eF=hM({history:Lj(`/`),routes:[{path:`/`,name:`home`,component:_N},{path:`/login`,name:`login`,component:NN},{path:`/office`,name:`office`,component:IN},{path:`/user-agreement`,name:`user-agreement`,component:kP},{path:`/privacy-policy`,name:`privacy-policy`,component:zN},{path:`/games`,name:`games`,component:gN},{path:`/scenarios`,name:`scenarios`,component:EP},{path:`/catalog`,name:`CatalogView`,component:GP},{path:`/scenarios/:id/editor`,name:`ScenariosEditorView`,component:vP},{path:`/scenarios/:id`,name:`ScenarioView`,component:$P},{path:`/users`,name:`users`,component:IP}]}),tF=Ts(gM);tF.use(Ks()),tF.use(eF),tF.mount(`#app`); \ No newline at end of file +`)}function FM(e){if(!e)return;let t=e.parentElement;t&&t.removeChild(e)}function IM(e){return document.querySelector(`style[cssr-id="${e}"]`)}function LM(e){let t=document.createElement(`style`);return t.setAttribute(`cssr-id`,e),t}window&&(window.__cssrContext={});function RM(e){let t=e.getAttribute(`mount-count`);return t===null?null:Number(t)}function zM(e,t){e.setAttribute(`mount-count`,String(t))}function BM(e,t,n,r){let{els:i}=t;if(n===void 0)i.forEach(FM),t.els=[];else{let e=IM(n);if(e&&i.includes(e)){let a=RM(e);r?a===null?console.error(`[css-render/unmount]: The style with target='${n}' is mounted in count mode.`):a<=1?(FM(e),t.els=i.filter(t=>t!==e)):zM(e,a-1):a===null?(FM(e),t.els=i.filter(t=>t!==e)):console.error(`[css-render/unmount]: The style with target='${n}' is mounted in no-count mode.`)}}}function VM(e,t){e.push(t)}function HM(e,t,n,r,i,a,o,s,c){if(o&&!c){if(n===void 0){console.error("[css-render/mount]: `id` is required in `boost` mode.");return}let i=window.__cssrContext;i[n]||(i[n]=!0,PM(t,e,r,o));return}let l,{els:u}=t,d;if(n===void 0&&(d=t.render(r),n=Ec(d)),c){c(n,d??t.render(r));return}let f=IM(n);if(s||f===null){if(l=f===null?LM(n):f,d===void 0&&(d=t.render(r)),l.textContent=d,f!==null)return;if(i){let e=document.head.getElementsByTagName(`style`)[0]||null;document.head.insertBefore(l,e)}else document.head.appendChild(l);a&&zM(l,1),VM(u,l)}else{let e=RM(f);a?e===null?console.error(`[css-render/mount]: The style with id='${n}' has been mounted in no-count mode.`):zM(f,e+1):e!==null&&console.error(`[css-render/mount]: The style with id='${n}' has been mounted in count mode.`)}return f??l}function UM(e){return PM(this,this.instance,e)}function WM(e={}){let{target:t,id:n,ssr:r,props:i,count:a=!1,head:o=!1,boost:s=!1,force:c=!1}=e;return HM(this.instance,this,n??t,i,o,a,s,c,r)}function GM(e={}){let{id:t,target:n,delay:r=0,count:i=!1}=e;r===0?BM(this.instance,this,t??n,i):setTimeout(()=>BM(this.instance,this,t??n,i),r)}var KM=function(e,t,n,r){return{instance:e,$:t,props:n,children:r,els:[],render:UM,mount:WM,unmount:GM}},qM=function(e,t,n,r){return Array.isArray(t)?KM(e,{$:null},null,t):Array.isArray(n)?KM(e,t,null,n):Array.isArray(r)?KM(e,t,n,r):KM(e,t,n,null)};function JM(e={}){let t=null,n={c:((...e)=>qM(n,...e)),use:(e,...t)=>e.install(n,...t),find:IM,context:{},config:e,get __styleSheet(){if(!t){let e=document.createElement(`style`);return document.head.appendChild(e),t=document.styleSheets[document.styleSheets.length-1],t}return t}};return n}var{c:YM}=JM(),XM=YM(`.xicon`,{width:`1em`,height:`1em`,display:`inline-flex`},[YM(`svg`,{width:`1em`,height:`1em`}),YM(`svg:not([fill])`,{fill:`currentColor`})]),ZM=()=>{XM.mount({id:`xicons-icon`})},QM={size:[String,Number],color:String,tag:String},$M=Symbol(`IconConfigInjection`),eN=`span`,tN=P({name:`Icon`,props:QM,setup(e,{slots:t}){let n=N($M,null),r=B(()=>{let t=e.size??n?.size;if(t!==void 0)return typeof t==`number`||/^\d+$/.test(t)?`${t}px`:t}),i=B(()=>{let{color:t}=e;return t===void 0?n?n.color:void 0:t}),a=B(()=>{let{tag:t}=e;return t===void 0?n?.tag??eN:t});return Br(()=>{ZM()}),()=>V(a.value,{class:`xicon`,style:{color:i.value,fontSize:r.value}},[Qr(t,`default`)])}});function nN(e){return{Ping(t){let n=[],r=`api/test/ping`;return n.length>0&&(r+=`?${n.join(`&`)}`),e({path:r,method:`GET`,body:null},{service:`EveningDetectiveServer`,method:`Ping`})},Echo(t){let n=[];t.text&&n.push(`text=${encodeURIComponent(t.text.toString())}`);let r=`api/test/echo`;return n.length>0&&(r+=`?${n.join(`&`)}`),e({path:r,method:`POST`,body:null},{service:`EveningDetectiveServer`,method:`Echo`})},Signup(t){let n=JSON.stringify(t),r=[],i=`api/auth/signup`;return r.length>0&&(i+=`?${r.join(`&`)}`),e({path:i,method:`POST`,body:n},{service:`EveningDetectiveServer`,method:`Signup`})},RefreshPassword(t){let n=JSON.stringify(t),r=[],i=`api/auth/refresh-password`;return r.length>0&&(i+=`?${r.join(`&`)}`),e({path:i,method:`POST`,body:n},{service:`EveningDetectiveServer`,method:`RefreshPassword`})},Login(t){let n=JSON.stringify(t),r=[],i=`api/auth/login`;return r.length>0&&(i+=`?${r.join(`&`)}`),e({path:i,method:`POST`,body:n},{service:`EveningDetectiveServer`,method:`Login`})},Refresh(t){let n=JSON.stringify(t),r=[],i=`api/auth/refresh`;return r.length>0&&(i+=`?${r.join(`&`)}`),e({path:i,method:`POST`,body:n},{service:`EveningDetectiveServer`,method:`Refresh`})},GetUsers(t){let n=[],r=`api/users`;return n.length>0&&(r+=`?${n.join(`&`)}`),e({path:r,method:`GET`,body:null},{service:`EveningDetectiveServer`,method:`GetUsers`})},GetUserById(t){if(!t.id)throw Error(`missing required field request.id`);let n=`api/users/${t.id}`,r=[],i=n;return r.length>0&&(i+=`?${r.join(`&`)}`),e({path:i,method:`GET`,body:null},{service:`EveningDetectiveServer`,method:`GetUserById`})},GetMe(t){let n=[],r=`api/users/me`;return n.length>0&&(r+=`?${n.join(`&`)}`),e({path:r,method:`GET`,body:null},{service:`EveningDetectiveServer`,method:`GetMe`})},AddUserRole(t){if(!t.id)throw Error(`missing required field request.id`);let n=`api/users/${t.id}/role/add`,r=JSON.stringify(t),i=[],a=n;return i.length>0&&(a+=`?${i.join(`&`)}`),e({path:a,method:`POST`,body:r},{service:`EveningDetectiveServer`,method:`AddUserRole`})},DeleteUserRole(t){if(!t.id)throw Error(`missing required field request.id`);let n=`api/users/${t.id}/role/delete`,r=JSON.stringify(t),i=[],a=n;return i.length>0&&(a+=`?${i.join(`&`)}`),e({path:a,method:`POST`,body:r},{service:`EveningDetectiveServer`,method:`DeleteUserRole`})},GetPermissions(t){let n=[],r=`api/ui/permissions`;return n.length>0&&(r+=`?${n.join(`&`)}`),e({path:r,method:`GET`,body:null},{service:`EveningDetectiveServer`,method:`GetPermissions`})},UploadFile(t){let n=JSON.stringify(t),r=[],i=`api/files/upload`;return r.length>0&&(i+=`?${r.join(`&`)}`),e({path:i,method:`POST`,body:n},{service:`EveningDetectiveServer`,method:`UploadFile`})},DownloadFile(t){if(!t.filename)throw Error(`missing required field request.filename`);let n=`api/files/${t.filename}`,r=[],i=n;return r.length>0&&(i+=`?${r.join(`&`)}`),e({path:i,method:`GET`,body:null},{service:`EveningDetectiveServer`,method:`DownloadFile`})},AddScenario(t){let n=JSON.stringify(t),r=[],i=`api/scenario`;return r.length>0&&(i+=`?${r.join(`&`)}`),e({path:i,method:`POST`,body:n},{service:`EveningDetectiveServer`,method:`AddScenario`})},GetMyScenarios(t){let n=[],r=`api/my-scenarios`;return n.length>0&&(r+=`?${n.join(`&`)}`),e({path:r,method:`GET`,body:null},{service:`EveningDetectiveServer`,method:`GetMyScenarios`})},GetScenariosCatalog(t){let n=[],r=`api/catalog`;return n.length>0&&(r+=`?${n.join(`&`)}`),e({path:r,method:`GET`,body:null},{service:`EveningDetectiveServer`,method:`GetScenariosCatalog`})},GetFullScenario(t){if(!t.id)throw Error(`missing required field request.id`);let n=`api/scenarios/${t.id}/full`,r=[],i=n;return r.length>0&&(i+=`?${r.join(`&`)}`),e({path:i,method:`GET`,body:null},{service:`EveningDetectiveServer`,method:`GetFullScenario`})},GetScenario(t){if(!t.id)throw Error(`missing required field request.id`);let n=`api/scenarios/${t.id}`,r=[],i=n;return r.length>0&&(i+=`?${r.join(`&`)}`),e({path:i,method:`GET`,body:null},{service:`EveningDetectiveServer`,method:`GetScenario`})},UpdateScenario(t){if(!t.id)throw Error(`missing required field request.id`);let n=`api/scenarios/${t.id}`,r=JSON.stringify(t),i=[],a=n;return i.length>0&&(a+=`?${i.join(`&`)}`),e({path:a,method:`PUT`,body:r},{service:`EveningDetectiveServer`,method:`UpdateScenario`})},PublicScenario(t){if(!t.id)throw Error(`missing required field request.id`);let n=`api/scenarios/${t.id}/public`,r=JSON.stringify(t),i=[],a=n;return i.length>0&&(a+=`?${i.join(`&`)}`),e({path:a,method:`PUT`,body:r},{service:`EveningDetectiveServer`,method:`PublicScenario`})},DraftScenario(t){if(!t.id)throw Error(`missing required field request.id`);let n=`api/scenarios/${t.id}/draft`,r=JSON.stringify(t),i=[],a=n;return i.length>0&&(a+=`?${i.join(`&`)}`),e({path:a,method:`PUT`,body:r},{service:`EveningDetectiveServer`,method:`DraftScenario`})},DeleteScenario(t){if(!t.id)throw Error(`missing required field request.id`);let n=`api/scenarios/${t.id}`,r=[],i=n;return r.length>0&&(i+=`?${r.join(`&`)}`),e({path:i,method:`DELETE`,body:null},{service:`EveningDetectiveServer`,method:`DeleteScenario`})},AddScenarioPlace(t){if(!t.id)throw Error(`missing required field request.id`);let n=`api/scenarios/${t.id}/places`,r=JSON.stringify(t),i=[],a=n;return i.length>0&&(a+=`?${i.join(`&`)}`),e({path:a,method:`POST`,body:r},{service:`EveningDetectiveServer`,method:`AddScenarioPlace`})},UpdateScenarioPlace(t){if(!t.id)throw Error(`missing required field request.id`);if(!t.code)throw Error(`missing required field request.code`);let n=`api/scenarios/${t.id}/places/${t.code}`,r=JSON.stringify(t),i=[],a=n;return i.length>0&&(a+=`?${i.join(`&`)}`),e({path:a,method:`PUT`,body:r},{service:`EveningDetectiveServer`,method:`UpdateScenarioPlace`})},DeleteScenarioPlace(t){if(!t.id)throw Error(`missing required field request.id`);if(!t.code)throw Error(`missing required field request.code`);let n=`api/scenarios/${t.id}/places/${t.code}`,r=[],i=n;return r.length>0&&(i+=`?${r.join(`&`)}`),e({path:i,method:`DELETE`,body:null},{service:`EveningDetectiveServer`,method:`DeleteScenarioPlace`})}}}function rN(e){return nN(iN(e))}function iN(e){return async t=>{let n=`${aN()}/${t.path}`,r={"Content-Type":`application/json`},i=e?.();i&&(r.Authorization=`Bearer ${i}`);let a=await fetch(n,{method:t.method,headers:r,body:t.body});if(a.status==401)throw Error(`unauthorized`);return await a.json()}}function aN(){return`https://evening-detective.crabs-games.art`}var oN=oc(`auth`,()=>{let e=k(null),t=k(null),n=k(null),r=k(!1),i=k(null),a=B(()=>!!e.value),o=B(()=>n.value?.username||``),s=B(()=>n.value?.roles||[]);function c(){let n=localStorage.getItem(`accessToken`),r=localStorage.getItem(`refreshToken`);n&&(e.value=n,t.value=r,u())}function l(){return e.value}async function u(){if(e.value)try{let e=await rN(l).GetMe({});if(e.error){i.value=e.error;return}e.user&&(n.value=e.user)}catch(e){console.error(`Failed to fetch user:`,e),e instanceof Error&&e.message.includes(`401`)&&await h()}}async function d(n,a){r.value=!0,i.value=null;try{let r=await rN(l).Login({email:n,password:a});return r.error?(i.value=r.error,!1):r.accessToken?(e.value=r.accessToken,t.value=r.refreshToken||null,localStorage.setItem(`accessToken`,r.accessToken),r.refreshToken&&localStorage.setItem(`refreshToken`,r.refreshToken),await u(),!0):!1}catch(e){return i.value=e instanceof Error?e.message:`Login failed`,!1}finally{r.value=!1}}async function f(){if(!t.value)return!1;try{let n=await rN(l).Refresh({refreshToken:t.value});return n.error||!n.accessToken?!1:(e.value=n.accessToken,t.value=n.refreshToken||null,localStorage.setItem(`accessToken`,n.accessToken),n.refreshToken&&localStorage.setItem(`refreshToken`,n.refreshToken),!0)}catch{return!1}}async function p(e,t){r.value=!0,i.value=null;try{let n=await rN(l).Signup({username:e,email:t});return n.error?(i.value=n.error,!1):!0}catch(e){return i.value=e instanceof Error?e.message:`Signup failed`,!1}finally{r.value=!1}}async function m(e){r.value=!0,i.value=null;try{let t=await rN(l).RefreshPassword({email:e});return t.error?(i.value=t.error,!1):!0}catch(e){return i.value=e instanceof Error?e.message:`Password reset failed`,!1}finally{r.value=!1}}async function h(){e.value=null,t.value=null,n.value=null,i.value=null,localStorage.removeItem(`accessToken`),localStorage.removeItem(`refreshToken`)}function g(e){return s.value.includes(e)}function _(e){return e.some(e=>s.value.includes(e))}return{accessToken:e,refreshToken:t,user:n,isLoading:r,error:i,isAuthenticated:a,username:o,userRoles:s,initFromStorage:c,getToken:l,login:d,signup:p,refreshPassword:m,logout:h,fetchUser:u,refreshTokenAction:f,hasRole:g,hasAnyRole:_}});function sN(){let e=oN();return cN(e.refreshTokenAction,e.getToken)}function cN(e,t){return nN(lN(e,iN(t)))}function lN(e,t){return async n=>{try{return await t(n)}catch{return await e(),await t(n)}}}var uN={class:`menu-block`},dN={class:`right-group`},fN=P({__name:`HeaderMenu`,props:{active:{type:String,required:!1}},setup(e){let t=e,n=oN();n.initFromStorage();let r=MA(),i=sN(),a=k([]);async function o(){a.value=[];let e=await i.GetPermissions({});a.value=e.permissions}o();function s(e){return a.value.includes(e)}let c=()=>{r.push(`/login`)},l=()=>{n.logout(),r.push(`/login`)},u=k(!1);return(e,i)=>(F(),I(`div`,uN,[L(`div`,{onClick:i[0]||=e=>u.value=!u.value,class:`burger-button`},[R(A(tN),{class:`burger-icon`,size:`28`},{default:M(()=>[R(A(bM))]),_:1})]),L(`div`,{class:ge([`left-group menu-buttons-block`,u.value?``:`menu-buttons-block-active`])},[L(`div`,{class:ge([`menu-item-block`,{active:t.active==`main`}]),onClick:i[1]||=e=>A(r).push(`/`)},` Главная `,2),A(n).hasRole(`user`)?(F(),I(`div`,{key:0,class:ge([`menu-item-block`,{active:t.active==`office`}]),onClick:i[2]||=e=>A(r).push(`/office`)},` Кабинет `,2)):ja(``,!0),s(`games_page`)?(F(),I(`div`,{key:1,class:ge([`menu-item-block`,{active:t.active==`games`}]),onClick:i[3]||=e=>A(r).push(`/games`)},` Игры `,2)):ja(``,!0),L(`div`,{class:ge([`menu-item-block`,{active:t.active==`catalog`}]),onClick:i[4]||=e=>A(r).push(`/catalog`)},` Каталог `,2),s(`scenarios_page`)?(F(),I(`div`,{key:2,class:ge([`menu-item-block`,{active:t.active==`scenarios`}]),onClick:i[5]||=e=>A(r).push(`/scenarios`)},` Мои сценарии `,2)):ja(``,!0),s(`users_page`)?(F(),I(`div`,{key:3,class:ge([`menu-item-block`,{active:t.active==`users`}]),onClick:i[6]||=e=>A(r).push(`/users`)},` Пользователи `,2)):ja(``,!0)],2),L(`div`,dN,[A(n).isAuthenticated?ja(``,!0):(F(),I(`div`,{key:0,class:`menu-item-block right`,onClick:c},` Войти `)),A(n).isAuthenticated?(F(),I(`div`,{key:1,class:`menu-item-block right`,onClick:l},`Выйти`)):ja(``,!0)])]))}}),pN=(e,t)=>{let n=e.__vccOpts||e;for(let[e,r]of t)n[e]=r;return n},mN=pN(fN,[[`__scopeId`,`data-v-5e423637`]]),hN=P({__name:`GamesPage`,setup(e){return(e,t)=>(F(),I(pa,null,[t[0]||=L(`div`,{class:`center-block-custom content-block`},`Игры`,-1),R(mN,{active:`games`})],64))}}),gN=P({__name:`GamesView`,setup(e){return(e,t)=>(F(),Ca(hN))}}),_N=P({__name:`HomeView`,setup(e){return(e,t)=>(F(),I(pa,null,[t[0]||=L(`div`,{class:`center-block-custom content-block center-middle-block-custom height80`},[L(`div`,null,[L(`h1`,{class:`font-text`},`Вечерний детектив`),L(`h3`,{class:`font-text`},`Дело №0`),L(`p`,{class:`content-text`},` Поиграем? `)])],-1),R(mN,{active:`main`})],64))}}),vN={class:`center-block-custom content-block center-middle-block-custom height80`},yN={class:`form-button-wrapper`},bN={class:`form-label`},xN={key:0},SN={key:1},CN={class:`form-label`},wN={class:`form-button-wrapper`},TN={class:`form-label`},EN={key:0},DN={key:1},ON={class:`form-button-wrapper`},kN={class:`form-label`},AN={key:0},jN={key:1},MN=pN(P({__name:`LoginPage`,setup(e){let t=oN(),n=MA(),r=qE(),i=k(``),a=k(``),o=k(``),s=k(!1),c=B(()=>[`@mail.ru`,`@yandex.ru`,`@gmail.com`].map(e=>{let t=a.value.split(`@`)[0];return{label:t+e,value:t+e}}));async function l(){if(!await t.login(a.value,o.value)&&t.error!=null){r.error(t.error);return}n.push(`/office`)}async function u(){if(s.value){if(!await t.signup(i.value,a.value)&&t.error!=null){r.error(t.error);return}r.info(`Пароль отправлен на почту`)}}async function d(){if(!await t.refreshPassword(a.value)&&t.error!=null){r.error(t.error);return}r.info(`Пароль отправлен на почту`)}return(e,n)=>(F(),I(`div`,vN,[R(A(mT),{style:{"margin-bottom":`16px`},class:`sign-card`},{default:M(()=>[R(A(Ak),{type:`line`,animated:``},{default:M(()=>[R(A(Ek),{name:`signin`,tab:`Вход`},{default:M(()=>[R(A(_D),{vertical:``},{default:M(()=>[n[6]||=L(`div`,{class:`form-label`},`Почта`,-1),R(A(Tw),{value:a.value,"onUpdate:value":n[0]||=e=>a.value=e,"input-props":{autocomplete:`disabled`},options:c.value,placeholder:`detective@mail.ru`,clearable:``},null,8,[`value`,`options`]),n[7]||=L(`div`,{class:`form-label`},`Пароль`,-1),R(A(pw),{value:o.value,"onUpdate:value":n[1]||=e=>o.value=e,type:`password`,placeholder:`********`},null,8,[`value`]),L(`div`,yN,[L(`div`,bN,[R(A(Xw),{onClick:l,disabled:a.value.length==0||o.value.length==0},{default:M(()=>[A(t).isLoading?(F(),I(`span`,SN,` Подождите... `)):(F(),I(`span`,xN,` Вход `))]),_:1},8,[`disabled`])])])]),_:1})]),_:1}),R(A(Ek),{name:`signup`,tab:`Регистрация`},{default:M(()=>[R(A(_D),{vertical:``},{default:M(()=>[n[9]||=L(`div`,{class:`form-label`},`Позывной`,-1),R(A(pw),{value:i.value,"onUpdate:value":n[2]||=e=>i.value=e,type:`text`,placeholder:`Шерлок`},null,8,[`value`]),n[10]||=L(`div`,{class:`form-label`},`Почта`,-1),R(A(Tw),{value:a.value,"onUpdate:value":n[3]||=e=>a.value=e,"input-props":{autocomplete:`disabled`},options:c.value,placeholder:`detective@mail.ru`,clearable:``},null,8,[`value`,`options`]),L(`div`,CN,[R(A(DT),{checked:s.value,"onUpdate:checked":n[4]||=e=>s.value=e},{default:M(()=>[...n[8]||=[z(` Я согласен с `,-1),L(`a`,{href:`/user-agreement`,target:`_blank`,class:`docs-link`},`пользовательским соглашением`,-1),L(`br`,null,null,-1),z(` и `,-1),L(`a`,{href:`/privacy-policy`,target:`_blank`,class:`docs-link`},`соглашением о персональных данных`,-1)]]),_:1},8,[`checked`])]),L(`div`,wN,[L(`div`,TN,[R(A(Xw),{onClick:u,disabled:i.value.length==0||o.value.length==0||!s.value},{default:M(()=>[A(t).isLoading?(F(),I(`span`,DN,` Подождите... `)):(F(),I(`span`,EN,` Регистрация `))]),_:1},8,[`disabled`])])])]),_:1})]),_:1}),R(A(Ek),{name:`new-password`,tab:`Новый пароль`},{default:M(()=>[R(A(_D),{vertical:``},{default:M(()=>[n[11]||=L(`div`,{class:`form-label`},`Почта`,-1),R(A(Tw),{value:a.value,"onUpdate:value":n[5]||=e=>a.value=e,"input-props":{autocomplete:`disabled`},options:c.value,placeholder:`detective@mail.ru`,clearable:``},null,8,[`value`,`options`]),L(`div`,ON,[L(`div`,kN,[R(A(Xw),{onClick:d,disabled:a.value.length==0},{default:M(()=>[A(t).isLoading?(F(),I(`span`,jN,` Подождите... `)):(F(),I(`span`,AN,` Прислать новый пароль `))]),_:1},8,[`disabled`])])])]),_:1})]),_:1})]),_:1})]),_:1})]))}}),[[`__scopeId`,`data-v-c1fd645b`]]),NN=P({__name:`LoginView`,setup(e){return(e,t)=>(F(),I(pa,null,[R(MN),R(mN)],64))}}),PN={class:`center-block-custom content-block`},FN=P({__name:`OfficePage`,setup(e){let t=oN(),n=sN(),r=k([]);async function i(){r.value=[];let e=await n.GetPermissions({});r.value=e.permissions}return i(),(e,n)=>(F(),I(pa,null,[L(`div`,PN,[L(`p`,null,`Доброго времени суток, `+Ce(A(t).username)+`.`,1)]),R(mN,{active:`office`})],64))}}),IN=P({__name:`OfficeView`,setup(e){return(e,t)=>(F(),Ca(FN))}}),LN={};function RN(e,t){return`Соглашением о персональных данных`}var zN=pN(LN,[[`render`,RN]]),BN={xmlns:`http://www.w3.org/2000/svg`,"xmlns:xlink":`http://www.w3.org/1999/xlink`,viewBox:`0 0 32 32`},VN=P({name:`Settings`,render:function(e,t){return F(),I(`svg`,BN,t[0]||=[L(`path`,{d:`M27 16.76V16v-.77l1.92-1.68A2 2 0 0 0 29.3 11l-2.36-4a2 2 0 0 0-1.73-1a2 2 0 0 0-.64.1l-2.43.82a11.35 11.35 0 0 0-1.31-.75l-.51-2.52a2 2 0 0 0-2-1.61h-4.68a2 2 0 0 0-2 1.61l-.51 2.52a11.48 11.48 0 0 0-1.32.75l-2.38-.86A2 2 0 0 0 6.79 6a2 2 0 0 0-1.73 1L2.7 11a2 2 0 0 0 .41 2.51L5 15.24v1.53l-1.89 1.68A2 2 0 0 0 2.7 21l2.36 4a2 2 0 0 0 1.73 1a2 2 0 0 0 .64-.1l2.43-.82a11.35 11.35 0 0 0 1.31.75l.51 2.52a2 2 0 0 0 2 1.61h4.72a2 2 0 0 0 2-1.61l.51-2.52a11.48 11.48 0 0 0 1.32-.75l2.42.82a2 2 0 0 0 .64.1a2 2 0 0 0 1.73-1l2.28-4a2 2 0 0 0-.41-2.51zM25.21 24l-3.43-1.16a8.86 8.86 0 0 1-2.71 1.57L18.36 28h-4.72l-.71-3.55a9.36 9.36 0 0 1-2.7-1.57L6.79 24l-2.36-4l2.72-2.4a8.9 8.9 0 0 1 0-3.13L4.43 12l2.36-4l3.43 1.16a8.86 8.86 0 0 1 2.71-1.57L13.64 4h4.72l.71 3.55a9.36 9.36 0 0 1 2.7 1.57L25.21 8l2.36 4l-2.72 2.4a8.9 8.9 0 0 1 0 3.13L27.57 20z`,fill:`currentColor`},null,-1),L(`path`,{d:`M16 22a6 6 0 1 1 6-6a5.94 5.94 0 0 1-6 6zm0-10a3.91 3.91 0 0 0-4 4a3.91 3.91 0 0 0 4 4a3.91 3.91 0 0 0 4-4a3.91 3.91 0 0 0-4-4z`,fill:`currentColor`},null,-1)])}}),HN={xmlns:`http://www.w3.org/2000/svg`,"xmlns:xlink":`http://www.w3.org/1999/xlink`,viewBox:`0 0 24 24`},UN=P({name:`Key24Regular`,render:function(e,t){return F(),I(`svg`,HN,t[0]||=[L(`g`,{fill:`none`},[L(`path`,{d:`M18.25 7a1.25 1.25 0 1 1-2.5 0a1.25 1.25 0 0 1 2.5 0zM15.5 2.05A6.554 6.554 0 0 0 8.95 8.6c0 .387.05.76.11 1.104a.275.275 0 0 1-.07.244l-6.235 6.236a2.75 2.75 0 0 0-.806 1.944V20.3c0 .966.784 1.75 1.75 1.75h2.5a1.75 1.75 0 0 0 1.75-1.75v-1.25H9.7c.69 0 1.25-.56 1.25-1.25v-1.75h1.75a1.25 1.25 0 0 0 1.25-1.204c.496.128 1.02.204 1.55.204a6.554 6.554 0 0 0 6.55-6.55c0-3.631-2.953-6.45-6.55-6.45zM10.45 8.6a5.054 5.054 0 0 1 5.05-5.05c2.802 0 5.05 2.181 5.05 4.95a5.054 5.054 0 0 1-5.05 5.05c-.68 0-1.38-.171-2.005-.44a.75.75 0 0 0-1.046.69v.75H10.7c-.69 0-1.25.56-1.25 1.25v1.75H7.7c-.69 0-1.25.56-1.25 1.25v1.5a.25.25 0 0 1-.25.25H3.7a.25.25 0 0 1-.25-.25v-2.172c0-.331.132-.65.366-.884l6.236-6.235a1.774 1.774 0 0 0 .486-1.564a4.917 4.917 0 0 1-.088-.845z`,fill:`currentColor`})],-1)])}}),WN={key:1,class:`place-block`},GN={class:`message-header`},KN={class:`message-content`},qN={key:0},JN={class:`message-image-border`},YN=[`src`],XN={class:`key-block`},ZN={key:0,class:`hr`},QN={class:`gray-block`},$N={key:0},eP={class:`key-block`},tP={key:3,class:`place-block`},nP=[`src`],rP={style:{display:`flex`,"align-items":`center`,width:`100%`}},iP={style:{display:`flex`,"flex-direction":`column`}},aP={style:{display:`flex`,"flex-direction":`column`,width:`100%`}},oP={class:`door-add-block`},sP={class:`door-field`},cP={style:{display:`flex`,"align-items":`center`,width:`100%`}},lP={style:{display:`flex`,"align-items":`center`,width:`100%`}},uP={class:`slot-block`},dP=pN(P({__name:`PlaceBlock`,props:{newPlaceCode:{type:String},newPlaceName:{type:String},newPlaceText:{type:String},place:{type:Object},mode:{type:String,required:!0}},emits:[`update:newPlaceCode`,`update:newPlaceName`,`update:newPlaceText`,`update:mode`],setup(e,{emit:t}){let n=e,r=t,i=e=>{r(`update:newPlaceCode`,e)},a=e=>{r(`update:newPlaceName`,e)},o=e=>{r(`update:newPlaceText`,e)},s=e=>{r(`update:mode`,e)};function c(){return{name:void 0,image:void 0}}function l(){return{code:void 0,name:void 0,keys:void 0}}function u(){return{name:void 0}}return(t,r)=>(F(),I(pa,null,[e.mode==`mini-add`?(F(),I(`div`,{key:0,class:`place-block-hover show-editor-block`,onClick:r[0]||=e=>s(`add`)},[...r[12]||=[L(`p`,{class:`place-image-plus`},`+`,-1)]])):ja(``,!0),e.mode==`add`?(F(),I(`div`,WN,[R(A(_D),{vertical:``},{default:M(()=>[R(A(hw),null,{default:M(()=>[R(A(pw),{style:{width:`20%`},value:e.newPlaceCode,"onUpdate:value":i,type:`text`,placeholder:`Ы-1`},null,8,[`value`]),R(A(pw),{style:{width:`80%`},value:e.newPlaceName,"onUpdate:value":a,type:`text`,placeholder:`Дом №Ы`},null,8,[`value`])]),_:1}),R(A(pw),{value:e.newPlaceText,"onUpdate:value":o,type:`textarea`,autosize:{minRows:3},placeholder:`В начале было слово...`},null,8,[`value`]),Qr(t.$slots,`default`,{},void 0,!0)]),_:3})])):ja(``,!0),e.mode==`show-editor`?(F(),I(`div`,{key:2,class:`place-block-hover show-editor-block`,onClick:r[1]||=e=>s(`edit`)},[L(`div`,GN,Ce(n.place.code)+`: `+Ce(n.place.name),1),r[13]||=L(`hr`,{class:`hr`},null,-1),L(`div`,KN,[n.place.image?(F(),I(`div`,qN,[L(`div`,JN,[L(`img`,{src:n.place.image,class:`message-image`},null,8,YN)])])):ja(``,!0),z(` `+Ce(n.place.text),1)]),(F(!0),I(pa,null,Zr(n.place.doors,e=>(F(),I(`div`,{key:e.code,class:`door-block`},[z(Ce(e.name)+` `,1),(F(!0),I(pa,null,Zr(e.keys,e=>(F(),I(`span`,XN,[R(A(tN),{class:`lock-icon`},{default:M(()=>[R(A(vM))]),_:1}),z(` `+Ce(e.name),1)]))),256))]))),128)),n.place.applications.length?(F(),I(`hr`,ZN)):ja(``,!0),(F(!0),I(pa,null,Zr(n.place.applications,e=>(F(),I(`div`,{class:`message-footer application-block`,key:e.name},` Приложение: `+Ce(e.name),1))),128)),L(`p`,QN,[e.place.hidden?(F(),I(`span`,$N,` Скрытая точка `)):ja(``,!0),(F(!0),I(pa,null,Zr(e.place.keys,e=>(F(),I(`span`,eP,[R(A(tN),{class:`lock-icon`},{default:M(()=>[R(A(UN))]),_:1}),z(` `+Ce(e.name),1)]))),256))])])):ja(``,!0),e.mode==`edit`?(F(),I(`div`,tP,[R(A(_D),{vertical:``},{default:M(()=>[R(A(hw),null,{default:M(()=>[R(A(pw),{style:{width:`20%`},value:n.place.code,"onUpdate:value":r[2]||=e=>n.place.code=e,type:`text`,placeholder:`Ы-1`},null,8,[`value`]),R(A(pw),{style:{width:`80%`},value:n.place.name,"onUpdate:value":r[3]||=e=>n.place.name=e,type:`text`,placeholder:`Дом №Ы`},null,8,[`value`])]),_:1}),R(A(pw),{value:n.place.text,"onUpdate:value":r[4]||=e=>n.place.text=e,type:`textarea`,autosize:{minRows:3},placeholder:`В начале было слово...`},null,8,[`value`]),r[25]||=L(`p`,{class:`settings-header`},`Картинка`,-1),L(`div`,null,[R(A(_D),null,{default:M(()=>[R(A(_D),{vertical:``},{default:M(()=>[L(`img`,{src:n.place.image,class:`message-edit-image`},null,8,nP),R(A(Xw),{onClick:r[5]||=e=>(n.place.image=``,n.place.fileList=null)},{default:M(()=>[...r[14]||=[z(`Убрать картинку`,-1)]]),_:1})]),_:1}),R(A(_D),{vertical:``},{default:M(()=>[R(A(pw),{value:n.place.image,"onUpdate:value":r[6]||=e=>n.place.image=e,type:`text`,placeholder:`Не задано`,disabled:``},null,8,[`value`]),R(A(mA),{"directory-dnd":``,max:1,"file-list":n.place.fileList,"onUpdate:fileList":r[7]||=e=>n.place.fileList=e},{default:M(()=>[R(A(zk),null,{default:M(()=>[R(A(Ik),{style:{"font-size":`16px`}},{default:M(()=>[...r[15]||=[z(` Щелкните или перетащите файл в эту область для загрузки `,-1)]]),_:1})]),_:1})]),_:1},8,[`file-list`])]),_:1})]),_:1})]),r[26]||=L(`p`,{class:`settings-header`},`Видимость точки`,-1),R(A(Ck),{value:n.place.hidden,"onUpdate:value":r[8]||=e=>n.place.hidden=e},{checked:M(()=>[...r[16]||=[z(` Скрытая точка `,-1)]]),unchecked:M(()=>[...r[17]||=[z(` Обычная точка `,-1)]]),_:1},8,[`value`]),r[27]||=z(` Улики `,-1),R(A(uD),{value:n.place.applications,"onUpdate:value":r[9]||=e=>n.place.applications=e,"on-create":c},{"create-button-default":M(()=>[...r[18]||=[z(` Добавить улику `,-1)]]),default:M(({value:e})=>[L(`div`,rP,[R(A(pw),{value:e.name,"onUpdate:value":t=>e.name=t,type:`text`,placeholder:`Название`},null,8,[`value`,`onUpdate:value`])])]),_:1},8,[`value`]),r[28]||=z(` Действия `,-1),R(A(uD),{value:n.place.doors,"onUpdate:value":r[10]||=e=>n.place.doors=e,"on-create":l},{"create-button-default":M(()=>[...r[19]||=[z(` Добавить действие `,-1)]]),action:M(({index:e,create:t,remove:n})=>[L(`div`,iP,[R(A(Xw),{onClick:()=>t(e),class:`plus-minus-buttons`},{default:M(()=>[...r[20]||=[z(`+`,-1)]]),_:1},8,[`onClick`]),R(A(Xw),{disabled:``,onClick:()=>n(e),class:`plus-minus-buttons`},{default:M(()=>[...r[21]||=[z(`-`,-1)]]),_:1},8,[`onClick`])])]),default:M(({value:e})=>[L(`div`,aP,[L(`div`,oP,[R(A(hw),null,{default:M(()=>[R(A(pw),{style:{width:`30%`},value:e.code,"onUpdate:value":t=>e.code=t,type:`text`,placeholder:`Код`},null,8,[`value`,`onUpdate:value`]),R(A(pw),{style:{width:`70%`},value:e.name,"onUpdate:value":t=>e.name=t,type:`text`,placeholder:`Название`},null,8,[`value`,`onUpdate:value`])]),_:2},1024),r[23]||=L(`p`,{class:`need-keys-text`},`Требуемые ключи`,-1),L(`div`,sP,[R(A(uD),{value:e.keys,"onUpdate:value":t=>e.keys=t,"on-create":u},{"create-button-default":M(()=>[...r[22]||=[z(` Добавить ключ `,-1)]]),default:M(({value:e})=>[L(`div`,cP,[R(A(pw),{value:e.name,"onUpdate:value":t=>e.name=t,type:`text`,placeholder:`Название`},null,8,[`value`,`onUpdate:value`])])]),_:1},8,[`value`,`onUpdate:value`])])])])]),_:1},8,[`value`]),r[29]||=z(` Получаемые ключи `,-1),R(A(uD),{value:n.place.keys,"onUpdate:value":r[11]||=e=>n.place.keys=e,"on-create":u},{"create-button-default":M(()=>[...r[24]||=[z(` Добавить ключ `,-1)]]),default:M(({value:e})=>[L(`div`,lP,[R(A(pw),{value:e.name,"onUpdate:value":t=>e.name=t,type:`text`,placeholder:`Название`},null,8,[`value`,`onUpdate:value`])])]),_:1},8,[`value`]),L(`div`,uP,[Qr(t.$slots,`default`,{},void 0,!0)])]),_:3})])):ja(``,!0)],64))}}),[[`__scopeId`,`data-v-8927f3b5`]]),fP={class:`center-block-custom-big`},pP={class:`places-container`},mP={class:`settings-block`},hP={key:0},gP={key:1},_P=pN(P({__name:`ScenariosEditorPage`,setup(e){let t=sN(),n=NA().params.id,r=k(!1),i=k(``),a=k(``),o=qE(),s=k([]),c=k({id:void 0,name:void 0,story:void 0,author:void 0,status:void 0,updatedAt:void 0,createdAt:void 0,publishedAt:void 0});async function l(e){let n=await t.GetFullScenario({id:e});if(n.error!=``){o.error(n.error);return}c.value=n.scenario,c.value.story?.places?.forEach(e=>{e.oldCode=e.code,e.mode=`show-editor`})}l(Number(n));async function u(e){let n=await t.DeleteScenario({id:e});if(n.error!=``){o.error(n.error);return}eF.push(`/scenarios`)}async function d(e){let a=await t.PublicScenario({id:e});if(a.error!=``){o.error(a.error);return}await l(Number(n)),i.value=``,r.value=!1}async function f(e){let a=await t.DraftScenario({id:e});if(a.error!=``){o.error(a.error);return}await l(Number(n)),i.value=``,r.value=!1}async function p(e,n){if(!e)return``;let r=await e.arrayBuffer(),i=new Uint8Array(r),a=await t.UploadFile({filename:n,data:h(i)});return a.error==``?a.filename||``:(o.error(a.error),``)}async function m(){let e=``;if(s.value&&s.value.length>0){let t=s.value[0].file||null;if(t==null||(e=await p(t,`scenarios_`+c.value.id+`_`+t.name),e===``))return}let i=await t.UpdateScenario({id:c.value.id,name:c.value.name,description:c.value.description,image:e});if(i.error!=``){o.error(i.error);return}await l(Number(n)),r.value=!1}function h(e){let t=String.fromCharCode(...e);return btoa(t)}let g=k(``),_=k(``),v=k(``),y=k(`mini-add`);async function b(){let e=await t.AddScenarioPlace({id:c.value.id,place:{code:g.value,name:_.value,text:v.value,image:void 0,hidden:void 0,applications:void 0,doors:void 0,keys:void 0}});if(e.error!=``){o.error(e.error);return}await l(Number(n)),g.value=``,_.value=``,v.value=``,y.value=`add`}async function x(){g.value=``,_.value=``,v.value=``,y.value=`mini-add`}async function S(e,n){for(let r of n.doors||[])if(e.story?.places?.find(e=>e.code==r.code)==null){let n=await t.AddScenarioPlace({id:e.id,place:{code:r.code,name:r.name,text:void 0,image:void 0,hidden:!0,applications:void 0,doors:void 0,keys:void 0}});if(n.error!=``){o.error(n.error);return}}}async function C(e){await l(Number(n)),e.mode=`show-editor`}async function w(e){if(e.fileList&&e.fileList.length>0){let t=e.fileList[0].file||null;if(t==null)return;let n=await p(t,`scenarios_`+c.value.id+`_place_`+e.code+`_`+t.name);if(n===``)return;e.image=n}await S(c.value,e);let r=await t.UpdateScenarioPlace({id:c.value.id,code:e.oldCode,place:e});if(r.error!=``){o.error(r.error);return}await l(Number(n)),e.mode=`show-editor`}async function T(e){let r=await t.DeleteScenarioPlace({id:c.value.id,code:e.oldCode});if(r.error!=``){o.error(r.error);return}await l(Number(n))}return(e,t)=>(F(),I(pa,null,[L(`div`,fP,[L(`div`,pP,[c.value.status==`public`?(F(),Ca(A(YC),{key:0,title:`Сценарий опубликован`,type:`warning`,style:{"margin-bottom":`20px`}},{default:M(()=>[...t[19]||=[z(` Не рекомендуется редактировать сценарий когда он опубликован. `,-1)]]),_:1})):ja(``,!0),L(`div`,mP,[z(` Точек: `+Ce(c.value.story?.places?.length)+` `,1),R(A(Xw),{quaternary:``,onClick:t[0]||=e=>r.value=!0,class:`settings-button`},{default:M(()=>[R(A(tN),{class:`settings-icon`},{default:M(()=>[R(A(VN))]),_:1}),t[20]||=z(` Настройки `,-1)]),_:1})]),R(dP,{mode:y.value,"onUpdate:mode":t[3]||=e=>y.value=e,newPlaceCode:g.value,"onUpdate:newPlaceCode":t[4]||=e=>g.value=e,newPlaceName:_.value,"onUpdate:newPlaceName":t[5]||=e=>_.value=e,newPlaceText:v.value,"onUpdate:newPlaceText":t[6]||=e=>v.value=e},{default:M(()=>[R(A(wD),{justify:`end`},{default:M(()=>[R(A(Xw),{onClick:t[1]||=e=>x()},{default:M(()=>[...t[21]||=[z(`Отмена`,-1)]]),_:1}),R(A(Xw),{onClick:t[2]||=e=>b(),disabled:!g.value},{default:M(()=>[...t[22]||=[z(`Добавить точку`,-1)]]),_:1},8,[`disabled`])]),_:1})]),_:1},8,[`mode`,`newPlaceCode`,`newPlaceName`,`newPlaceText`]),(F(!0),I(pa,null,Zr(c.value.story?.places,e=>(F(),Ca(dP,{place:e,mode:e.mode,"onUpdate:mode":t=>e.mode=t,key:e.oldCode},{default:M(()=>[R(A(wD),{justify:`end`},{default:M(()=>[R(A(Xw),{onClick:t=>T(e),type:`error`,ghost:``},{default:M(()=>[...t[23]||=[z(`Удалить`,-1)]]),_:1},8,[`onClick`]),R(A(Xw),{onClick:t=>C(e)},{default:M(()=>[...t[24]||=[z(`Отмена`,-1)]]),_:1},8,[`onClick`]),R(A(Xw),{onClick:t=>w(e),disabled:e.code==``},{default:M(()=>[...t[25]||=[z(`Сохранить`,-1)]]),_:1},8,[`onClick`,`disabled`])]),_:2},1024)]),_:2},1032,[`place`,`mode`,`onUpdate:mode`]))),128))])]),R(A(ME),{show:r.value,"onUpdate:show":t[18]||=e=>r.value=e},{default:M(()=>[R(A(mT),{style:{width:`600px`},title:`Настройки сценария`,bordered:!1,size:`huge`,role:`dialog`,"aria-modal":`true`},{"header-extra":M(()=>[R(A(Xw),{onClick:t[7]||=e=>r.value=!1},{default:M(()=>[...t[26]||=[z(` x `,-1)]]),_:1})]),footer:M(()=>[...t[42]||=[]]),default:M(()=>[R(A(_D),{vertical:``},{default:M(()=>[t[36]||=L(`p`,null,`Название`,-1),R(A(pw),{value:c.value.name,"onUpdate:value":t[8]||=e=>c.value.name=e,type:`text`,placeholder:`Дело №0 "Следствие ведут овечки"`},null,8,[`value`]),t[37]||=L(`p`,{class:`settings-header`},`Описание`,-1),R(A(pw),{value:c.value.description,"onUpdate:value":t[9]||=e=>c.value.description=e,type:`textarea`,placeholder:`Убийство пастуха...`},null,8,[`value`]),t[38]||=L(`p`,{class:`settings-header`},`Картинка`,-1),R(A(pw),{value:c.value.image,"onUpdate:value":t[10]||=e=>c.value.image=e,type:`text`,placeholder:`default_scenario.png`,disabled:``},null,8,[`value`]),R(A(mA),{"directory-dnd":``,max:1,"file-list":s.value,"onUpdate:fileList":t[11]||=e=>s.value=e},{default:M(()=>[R(A(zk),null,{default:M(()=>[R(A(Ik),{style:{"font-size":`16px`}},{default:M(()=>[...t[27]||=[z(` Щелкните или перетащите файл в эту область для загрузки `,-1)]]),_:1})]),_:1})]),_:1},8,[`file-list`]),R(A(Xw),{onClick:t[12]||=e=>m(),ghost:``},{default:M(()=>[...t[28]||=[z(` Сохранить изменения `,-1)]]),_:1}),t[39]||=L(`hr`,{class:`settings-hr`},null,-1),t[40]||=L(`p`,null,`Публикация`,-1),L(`p`,null,[t[29]||=z(`Статус: `,-1),c.value.status==`public`?(F(),I(`span`,hP,`опубликовано`)):ja(``,!0),c.value.status==`draft`?(F(),I(`span`,gP,`в разработке`)):ja(``,!0)]),L(`p`,null,[t[30]||=z(` Введите название сценария `,-1),R(A(Ik),{class:`name-text`,strong:``},{default:M(()=>[z(Ce(c.value.name),1)]),_:1})]),R(A(pw),{value:i.value,"onUpdate:value":t[13]||=e=>i.value=e,type:`text`,placeholder:`Дело №0 "Следствие ведут овечки"`},null,8,[`value`]),c.value.status==`public`?ja(``,!0):(F(),Ca(A(Xw),{key:0,onClick:t[14]||=e=>d(c.value.id),ghost:``,disabled:i.value!=c.value.name},{default:M(()=>[...t[31]||=[z(` Опубликовать сценарий `,-1)]]),_:1},8,[`disabled`])),c.value.status==`draft`?ja(``,!0):(F(),Ca(A(Xw),{key:1,onClick:t[15]||=e=>f(c.value.id),ghost:``,disabled:i.value!=c.value.name},{default:M(()=>[...t[32]||=[z(` Снять сценарий с публикации `,-1)]]),_:1},8,[`disabled`])),t[41]||=L(`hr`,{class:`settings-hr`},null,-1),L(`p`,null,[t[33]||=z(` Введите название сценария `,-1),R(A(Ik),{class:`name-text`,strong:``},{default:M(()=>[z(Ce(c.value.name),1)]),_:1}),t[34]||=z(` чтобы удалить его `,-1)]),R(A(pw),{value:a.value,"onUpdate:value":t[16]||=e=>a.value=e,type:`text`,placeholder:`Дело №0 "Следствие ведут овечки"`},null,8,[`value`]),R(A(Xw),{onClick:t[17]||=e=>u(c.value.id),type:`error`,ghost:``,disabled:a.value!=c.value.name},{default:M(()=>[...t[35]||=[z(` Удалить сценарий `,-1)]]),_:1},8,[`disabled`])]),_:1})]),_:1})]),_:1},8,[`show`]),R(mN,{active:`scenarios`})],64))}}),[[`__scopeId`,`data-v-4c06554a`]]),vP=P({__name:`ScenariosEditorView`,setup(e){return(e,t)=>(F(),Ca(_P))}}),yP={class:`center-block-custom-big content-block`},bP={class:`scenarios-container`},xP=[`onClick`],SP={class:`scenario-content-block`},CP={class:`scenario-title`},wP={class:`scenario-label`},TP=pN(P({__name:`ScenariosPage`,setup(e){let t=sN(),n=k([]),r=MA(),i=qE(),a=k(!1),o=k(``);async function s(){n.value=[];let e=await t.GetMyScenarios({});n.value=e.scenarios}async function c(e){let n=await t.AddScenario({name:e});if(n.error!=``){i.error(n.error);return}await l(n.id)}async function l(e){r.push(`/scenarios/`+e+`/editor`)}return s(),(e,t)=>(F(),I(pa,null,[L(`div`,yP,[L(`div`,bP,[L(`div`,{class:`scenario-block`,onClick:t[0]||=e=>a.value=!0},[...t[5]||=[L(`div`,{class:`scenario-image-block scenario-image-plus`},`+`,-1),L(`div`,{class:`scenario-content-block`},[L(`p`,{class:`scenario-title`},`Создать новый сценарий`)],-1)]]),(F(!0),I(pa,null,Zr(n.value,e=>(F(),I(`div`,{class:`scenario-block`,onClick:t=>l(e.id),key:e.id},[L(`div`,{class:`scenario-image-block scenario-image`,style:de({backgroundImage:`url(${e.image})`})},null,4),L(`div`,SP,[L(`p`,CP,Ce(e.name),1),L(`p`,wP,[e.status==`public`?(F(),Ca(A(MC),{key:0,bordered:!1,type:`success`,class:`status-block`},{default:M(()=>[...t[6]||=[z(`Опубликовано`,-1)]]),_:1})):ja(``,!0),e.status==`draft`?(F(),Ca(A(MC),{key:1,bordered:!1,type:`warning`,class:`status-block`},{default:M(()=>[...t[7]||=[z(`В разработке`,-1)]]),_:1})):ja(``,!0)])])],8,xP))),128))])]),R(A(ME),{show:a.value,"onUpdate:show":t[4]||=e=>a.value=e},{default:M(()=>[R(A(mT),{style:{width:`600px`},title:`Создание сценария`,bordered:!1,size:`huge`,role:`dialog`,"aria-modal":`true`},{"header-extra":M(()=>[R(A(Xw),{onClick:t[1]||=e=>a.value=!1},{default:M(()=>[...t[8]||=[z(` x `,-1)]]),_:1})]),footer:M(()=>[R(A(Xw),{onClick:t[3]||=e=>c(o.value),disabled:o.value.length==0},{default:M(()=>[...t[9]||=[z(` Создать `,-1)]]),_:1},8,[`disabled`])]),default:M(()=>[R(A(pw),{value:o.value,"onUpdate:value":t[2]||=e=>o.value=e,type:`text`,placeholder:`Дело №0 "Следствие ведут овечки"`},null,8,[`value`])]),_:1})]),_:1},8,[`show`]),R(mN,{active:`scenarios`})],64))}}),[[`__scopeId`,`data-v-c46f610b`]]),EP=P({__name:`ScenariosView`,setup(e){return(e,t)=>(F(),Ca(TP))}}),DP={};function OP(e,t){return`Пользовательское соглашение`}var kP=pN(DP,[[`render`,OP]]),AP={class:`center-block-custom content-block`},jP={class:`users-container`},MP={class:`user-field`},NP={class:`user-field`},PP={class:`user-field`},FP=pN(P({__name:`UsersPage`,setup(e){let t=sN(),n=qE(),r=k([]);async function i(){let e=await t.GetUsers({});if(e.error!=``){n.error(e.error);return}r.value=e.users}i();async function a(e,r){let a=await t.AddUserRole({id:e,role:r});if(a.error!=``){n.error(a.error);return}await i()}async function o(e,r){let a=await t.DeleteUserRole({id:e,role:r});if(a.error!=``){n.error(a.error);return}await i()}return(e,t)=>(F(),I(pa,null,[L(`div`,AP,[L(`div`,jP,[(F(!0),I(pa,null,Zr(r.value,e=>(F(),I(`div`,{key:e.id,class:`user-block`},[L(`div`,MP,` Позывной: `+Ce(e.username),1),L(`div`,NP,` Почта: `+Ce(e.email),1),L(`div`,PP,[R(A(_D),null,{default:M(()=>[t[0]||=z(` Роли: `,-1),(F(!0),I(pa,null,Zr(e.roles,e=>(F(),Ca(A(MC),{bordered:!1,key:e},{default:M(()=>[z(Ce(e),1)]),_:2},1024))),128))]),_:2},1024)]),R(A(wD),{justify:`end`,class:`roles-buttons-block`},{default:M(()=>[e.roles?.includes(`author`)?(F(),Ca(A(Xw),{key:1,onClick:t=>o(e.id,`author`)},{default:M(()=>[...t[2]||=[z(`Забрать роль автора`,-1)]]),_:1},8,[`onClick`])):(F(),Ca(A(Xw),{key:0,onClick:t=>a(e.id,`author`)},{default:M(()=>[...t[1]||=[z(`Сделать автором`,-1)]]),_:1},8,[`onClick`])),e.roles?.includes(`organizer`)?(F(),Ca(A(Xw),{key:3,onClick:t=>o(e.id,`organizer`)},{default:M(()=>[...t[4]||=[z(`Забрать роль организатора`,-1)]]),_:1},8,[`onClick`])):(F(),Ca(A(Xw),{key:2,onClick:t=>a(e.id,`organizer`)},{default:M(()=>[...t[3]||=[z(`Сделать организатором`,-1)]]),_:1},8,[`onClick`]))]),_:2},1024)]))),128))])]),R(mN,{active:`users`})],64))}}),[[`__scopeId`,`data-v-eba2cf43`]]),IP=P({__name:`UsersView`,setup(e){return(e,t)=>(F(),Ca(FP))}}),LP={class:`center-block-custom-big content-block`},RP={class:`scenarios-container`},zP=[`onClick`],BP={class:`scenario-content-block`},VP={class:`scenario-title`},HP={class:`scenario-description`},UP={class:`scenario-label`},WP=pN(P({__name:`CatalogPage`,setup(e){let t=sN(),n=k([]),r=MA();async function i(){n.value=[];let e=await t.GetScenariosCatalog({});n.value=e.scenarios}async function a(e){r.push(`/scenarios/`+e)}return i(),(e,t)=>(F(),I(pa,null,[L(`div`,LP,[L(`div`,RP,[(F(!0),I(pa,null,Zr(n.value,e=>(F(),I(`div`,{class:`scenario-block`,onClick:t=>a(e.id),key:e.id},[L(`div`,{class:`scenario-image-block scenario-image`,style:de({backgroundImage:`url(${e.image})`})},null,4),L(`div`,BP,[L(`p`,VP,Ce(e.name),1),L(`p`,HP,Ce(e.description),1),L(`p`,UP,[R(A(MC),{bordered:!1,type:`success`,class:`status-block`},{default:M(()=>[z(`Автор: `+Ce(e.author?.username),1)]),_:2},1024)])])],8,zP))),128))])]),R(mN,{active:`catalog`})],64))}}),[[`__scopeId`,`data-v-32efaf45`]]),GP=P({__name:`CatalogView`,setup(e){return(e,t)=>(F(),Ca(WP))}}),KP={class:`center-block-custom`},qP={class:`scenario-container`},JP={class:`scenario-title`},YP=[`src`],XP={class:`scenario-description`},ZP={class:`scenario-author`},QP=pN(P({__name:`ScenarioPage`,setup(e){let t=qE(),n=sN(),r=NA().params.id,i=k({id:void 0,name:void 0,story:void 0,author:void 0,status:void 0,updatedAt:void 0,createdAt:void 0,publishedAt:void 0});async function a(e){let r=await n.GetScenario({id:e});if(r.error!=``){t.error(r.error);return}i.value=r.scenario}return a(Number(r)),(e,t)=>(F(),I(pa,null,[L(`div`,KP,[L(`div`,qP,[L(`div`,JP,Ce(i.value.name),1),L(`img`,{class:`scenario-image`,src:i.value.image},null,8,YP),L(`div`,XP,Ce(i.value.description),1),L(`div`,ZP,[R(A(MC),{bordered:!1,type:`success`,class:`status-block`},{default:M(()=>[z(`Автор: `+Ce(i.value.author?.username),1)]),_:1})])])]),R(mN,{active:`catalog`})],64))}}),[[`__scopeId`,`data-v-230da08c`]]),$P=P({__name:`ScenarioView`,setup(e){return(e,t)=>(F(),Ca(QP))}}),eF=hM({history:Lj(`/`),routes:[{path:`/`,name:`home`,component:_N},{path:`/login`,name:`login`,component:NN},{path:`/office`,name:`office`,component:IN},{path:`/user-agreement`,name:`user-agreement`,component:kP},{path:`/privacy-policy`,name:`privacy-policy`,component:zN},{path:`/games`,name:`games`,component:gN},{path:`/scenarios`,name:`scenarios`,component:EP},{path:`/catalog`,name:`CatalogView`,component:GP},{path:`/scenarios/:id/editor`,name:`ScenariosEditorView`,component:vP},{path:`/scenarios/:id`,name:`ScenarioView`,component:$P},{path:`/users`,name:`users`,component:IP}]}),tF=Ts(gM);tF.use(Ks()),tF.use(eF),tF.mount(`#app`); \ No newline at end of file diff --git a/dist/assets/index-CnSILpQu.css b/dist/assets/index-Dq4E0b3K.css similarity index 94% rename from dist/assets/index-CnSILpQu.css rename to dist/assets/index-Dq4E0b3K.css index 1dcf021..25ae306 100644 --- a/dist/assets/index-CnSILpQu.css +++ b/dist/assets/index-Dq4E0b3K.css @@ -1 +1 @@ -:root{--vt-c-white:#fff;--vt-c-white-soft:#f8f8f8;--vt-c-white-mute:#f2f2f2;--vt-c-black:#181818;--vt-c-black-soft:#222;--vt-c-black-mute:#282828;--vt-c-indigo:#2c3e50;--vt-c-divider-light-1:#3c3c3c4a;--vt-c-divider-light-2:#3c3c3c1f;--vt-c-divider-dark-1:#545454a6;--vt-c-divider-dark-2:#5454547a;--vt-c-text-light-1:var(--vt-c-indigo);--vt-c-text-light-2:#3c3c3ca8;--vt-c-text-dark-1:var(--vt-c-white);--vt-c-text-dark-2:#ebebeba3;--main-color:#22323c;--second-color:burlywood;--main-back-color:#f0f0f0;--main-back-item-color:#fefefe;--color-background:var(--vt-c-white);--color-background-soft:var(--vt-c-white-soft);--color-background-mute:var(--vt-c-white-mute);--color-border:var(--vt-c-divider-light-2);--color-border-hover:var(--vt-c-divider-light-1);--color-heading:var(--vt-c-text-light-1);--color-text:var(--vt-c-text-light-1);--section-gap:160px}@media (prefers-color-scheme:dark){:root{--color-background:var(--vt-c-black);--color-background-soft:var(--vt-c-black-soft);--color-background-mute:var(--vt-c-black-mute);--color-border:var(--vt-c-divider-dark-2);--color-border-hover:var(--vt-c-divider-dark-1);--color-heading:var(--vt-c-text-dark-1);--color-text:var(--vt-c-text-dark-2)}}*,:before,:after{box-sizing:border-box;margin:0;font-weight:400}body{min-height:100vh;color:#eee;background:var(--color-background);text-rendering:optimizelegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;scrollbar-width:none;background-color:#111;font-family:Inter,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif;font-size:15px;line-height:1.6;transition:color .5s,background-color .5s;overflow:hidden}@font-face{font-family:font_old_typer;src:url(/assets/a_OldTyper-BsgRTrmO.ttf)}.center-message{text-align:center;justify-content:center;align-items:center;height:calc(100dvh - 100px);display:flex}.content-block{margin-top:70px;padding:20px}.height80{height:80vh}.center-block-custom,.center-block-custom-big{margin-top:70px}@media (width>=1024px){.center-block-custom{width:700px;margin:70px auto 0}.center-block-custom-big{width:1200px;margin:70px auto 0}.center-middle-block-custom{place-items:center;display:grid}.content-block{margin-top:70px;padding:20px 0}}.menu-block[data-v-5e423637]{background-color:#222;justify-content:space-between;align-items:center;width:100%;height:70px;padding:20px;display:flex;position:fixed;top:0;left:0}.menu-item-block[data-v-5e423637]{cursor:pointer;margin-left:10px;padding:5px;font-size:1.1em;display:inline-block}.menu-item-block[data-v-5e423637]:hover{color:#63e2b7;opacity:.8}.right[data-v-5e423637]{margin-left:auto}.active[data-v-5e423637]{color:#63e2b7}@media (width>=1024px){.burger-button[data-v-5e423637]{display:none}}@media (width<1024px){.menu-buttons-block[data-v-5e423637]{background-color:#222;flex-direction:column;width:100%;padding-bottom:5px;display:flex;position:fixed;top:70px;left:0}.menu-buttons-block div[data-v-5e423637]{padding:15px 5px}.menu-buttons-block-active[data-v-5e423637]{position:relative;top:-1000px}.burger-icon[data-v-5e423637]{position:relative;top:5px}}.font-text{font-family:font_old_typer}.content-text{float:right;position:relative;top:100px;right:0}@media (width>=1024px){.font-text{position:relative;left:-50px}.content-text{position:relative;top:100px;right:-50px}}.sign-card[data-v-c1fd645b]{background-color:#1d1d1d}.form-label[data-v-c1fd645b]{margin-top:10px}.form-button-wrapper[data-v-c1fd645b]{justify-content:center;display:flex}.docs-link[data-v-c1fd645b]{color:#45aa89}.docs-link[data-v-c1fd645b]:hover{color:#63e2b7}@media (width>=1024px){.sign-card[data-v-c1fd645b]{width:380px}}.hr[data-v-8927f3b5]{border:1px dashed #eee;margin:10px 0}.place-block-hover[data-v-8927f3b5],.place-block[data-v-8927f3b5]{border:1px solid #444;border-radius:10px;margin:10px 0;padding:20px}.place-block-hover[data-v-8927f3b5]:hover{color:#63e2b7}.place-image-plus[data-v-8927f3b5]{justify-content:center;align-items:center;font-size:30px;display:flex}.show-editor-block[data-v-8927f3b5]{cursor:pointer}.message-content[data-v-8927f3b5]{white-space:pre-wrap;font-weight:500}.gray-block[data-v-8927f3b5]{color:#777;margin-top:5px}.application-block[data-v-8927f3b5]{color:#deb887;margin-right:5px}.door-block[data-v-8927f3b5]{color:#eee;background-color:#222;border-radius:5px;margin:10px 5px 10px 0;padding:5px 10px;display:inline-block}.door-add-block[data-v-8927f3b5]{color:#eee;background-color:#222;border-radius:5px;padding:10px}.key-block[data-v-8927f3b5]{color:gold;margin-left:10px}.lock-icon[data-v-8927f3b5]{position:relative;top:2px}.door-field[data-v-8927f3b5]{margin-top:10px}.need-keys-text[data-v-8927f3b5]{color:gold;margin:15px 0 0;padding:0}.slot-block[data-v-8927f3b5]{margin-top:10px}.plus-minus-buttons[data-v-8927f3b5]{text-align:center;color:#eee;border:1px solid #444;border-radius:40px;margin:0 0 10px 5px;padding:0 13px;font-size:25px}.plus-minus-buttons[data-v-8927f3b5]:hover{cursor:pointer;color:#63e2b7}.message-image-border[data-v-8927f3b5]{float:left;background-image:url(/assets/paper_white-ZSlTzOTx.jpg);background-size:cover;width:40%;max-width:200px;margin-right:15px;padding:7px;transform:rotate(-3deg);box-shadow:0 3px 15px #626262}.message-image[data-v-8927f3b5]{width:100%}.message-edit-image[data-v-8927f3b5]{width:135px;height:135px}.message-header[data-v-8927f3b5]{padding-right:50px;font-size:20px}.message-footer[data-v-8927f3b5]{color:var(--second-color);padding-right:50px;font-weight:400;position:relative}.settings-block[data-v-bbecc975]{height:40px}.settings-button[data-v-bbecc975]{float:right}.settings-icon[data-v-bbecc975]{width:20px}.name-text[data-v-bbecc975]{background-color:#ffffff1a;border-radius:3px;padding:3px}.settings-header[data-v-bbecc975]{margin-top:20px}.settings-hr[data-v-bbecc975]{margin:20px 0}.places-container[data-v-bbecc975]{flex-flow:column;height:calc(100vh - 150px);margin-top:70px;padding:20px;display:flex;overflow-y:auto}@media (width>=1024px){.places-container[data-v-bbecc975]{height:calc(100vh - 70px);padding:20px 250px}}.scenarios-container[data-v-c46f610b]{flex-flow:wrap;justify-content:center;height:calc(100vh - 150px);padding:0;display:flex;overflow-y:auto}.scenario-block[data-v-c46f610b]{cursor:pointer;background-color:#333;border:2px solid #333;border-radius:12px;width:160px;height:300px;margin:10px;position:relative}.scenario-content-block[data-v-c46f610b]{padding:2px 10px}.scenario-block[data-v-c46f610b]:hover{color:#63e2b7;border:2px solid #63e2b7}.scenario-image-block[data-v-c46f610b]{background-color:#111;border-radius:10px;height:160px}.scenario-image-plus[data-v-c46f610b]{background-color:#111;justify-content:center;align-items:center;font-size:120px;display:flex}.scenario-image[data-v-c46f610b]{background-position:50%;background-size:cover}.scenario-title[data-v-c46f610b]{padding:5px 0}.status-block[data-v-c46f610b]{position:absolute;bottom:15px;right:15px}@media (width>=1024px){.scenarios-container[data-v-c46f610b]{height:calc(100vh - 70px)}.scenario-block[data-v-c46f610b]{width:250px;height:400px}.scenario-image-block[data-v-c46f610b]{height:250px}.scenario-content-block[data-v-c46f610b]{padding:4px 10px}}.users-container[data-v-eba2cf43]{padding-bottom:20px}.user-block[data-v-eba2cf43]{border:1px solid #444;border-radius:10px;margin:0 0 20px;padding:20px}.user-field[data-v-eba2cf43]{margin:10px}.roles-buttons-block[data-v-eba2cf43]{margin-top:20px}.scenarios-container[data-v-32efaf45]{flex-flow:wrap;justify-content:center;height:calc(100vh - 150px);padding:0;display:flex;overflow-y:auto}.scenario-block[data-v-32efaf45]{cursor:pointer;background-color:#333;border:2px solid #333;border-radius:12px;width:160px;height:300px;margin:10px;position:relative}.scenario-content-block[data-v-32efaf45]{padding:2px 10px}.scenario-block[data-v-32efaf45]:hover{color:#63e2b7;border:2px solid #63e2b7}.scenario-image-block[data-v-32efaf45]{background-color:#111;border-radius:10px;height:160px}.scenario-image[data-v-32efaf45]{background-position:50%;background-size:cover}.scenario-title[data-v-32efaf45]{padding:5px 0}.scenario-description[data-v-32efaf45]{color:#aaa;display:none}.status-block[data-v-32efaf45]{position:absolute;bottom:15px;right:15px}@media (width>=1024px){.scenarios-container[data-v-32efaf45]{height:calc(100vh - 70px)}.scenario-block[data-v-32efaf45]{width:250px;height:400px}.scenario-image-block[data-v-32efaf45]{height:250px}.scenario-content-block[data-v-32efaf45]{padding:4px 10px}.scenario-description[data-v-32efaf45]{color:#aaa;display:block}}.scenario-container[data-v-230da08c]{padding:20px}.scenario-title[data-v-230da08c]{margin-bottom:10px;font-size:24px}.scenario-image[data-v-230da08c]{width:100%;max-width:400px;margin-bottom:10px}.scenario-description[data-v-230da08c]{color:#aaa;margin-bottom:10px} +:root{--vt-c-white:#fff;--vt-c-white-soft:#f8f8f8;--vt-c-white-mute:#f2f2f2;--vt-c-black:#181818;--vt-c-black-soft:#222;--vt-c-black-mute:#282828;--vt-c-indigo:#2c3e50;--vt-c-divider-light-1:#3c3c3c4a;--vt-c-divider-light-2:#3c3c3c1f;--vt-c-divider-dark-1:#545454a6;--vt-c-divider-dark-2:#5454547a;--vt-c-text-light-1:var(--vt-c-indigo);--vt-c-text-light-2:#3c3c3ca8;--vt-c-text-dark-1:var(--vt-c-white);--vt-c-text-dark-2:#ebebeba3;--main-color:#22323c;--second-color:burlywood;--main-back-color:#f0f0f0;--main-back-item-color:#fefefe;--color-background:var(--vt-c-white);--color-background-soft:var(--vt-c-white-soft);--color-background-mute:var(--vt-c-white-mute);--color-border:var(--vt-c-divider-light-2);--color-border-hover:var(--vt-c-divider-light-1);--color-heading:var(--vt-c-text-light-1);--color-text:var(--vt-c-text-light-1);--section-gap:160px}@media (prefers-color-scheme:dark){:root{--color-background:var(--vt-c-black);--color-background-soft:var(--vt-c-black-soft);--color-background-mute:var(--vt-c-black-mute);--color-border:var(--vt-c-divider-dark-2);--color-border-hover:var(--vt-c-divider-dark-1);--color-heading:var(--vt-c-text-dark-1);--color-text:var(--vt-c-text-dark-2)}}*,:before,:after{box-sizing:border-box;margin:0;font-weight:400}body{min-height:100vh;color:#eee;background:var(--color-background);text-rendering:optimizelegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;scrollbar-width:none;background-color:#111;font-family:Inter,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif;font-size:15px;line-height:1.6;transition:color .5s,background-color .5s;overflow:hidden}@font-face{font-family:font_old_typer;src:url(/assets/a_OldTyper-BsgRTrmO.ttf)}.center-message{text-align:center;justify-content:center;align-items:center;height:calc(100dvh - 100px);display:flex}.content-block{margin-top:70px;padding:20px}.height80{height:80vh}.center-block-custom,.center-block-custom-big{margin-top:70px}@media (width>=1024px){.center-block-custom{width:700px;margin:70px auto 0}.center-block-custom-big{width:1200px;margin:70px auto 0}.center-middle-block-custom{place-items:center;display:grid}.content-block{margin-top:70px;padding:20px 0}}.menu-block[data-v-5e423637]{background-color:#222;justify-content:space-between;align-items:center;width:100%;height:70px;padding:20px;display:flex;position:fixed;top:0;left:0}.menu-item-block[data-v-5e423637]{cursor:pointer;margin-left:10px;padding:5px;font-size:1.1em;display:inline-block}.menu-item-block[data-v-5e423637]:hover{color:#63e2b7;opacity:.8}.right[data-v-5e423637]{margin-left:auto}.active[data-v-5e423637]{color:#63e2b7}@media (width>=1024px){.burger-button[data-v-5e423637]{display:none}}@media (width<1024px){.menu-buttons-block[data-v-5e423637]{background-color:#222;flex-direction:column;width:100%;padding-bottom:5px;display:flex;position:fixed;top:70px;left:0}.menu-buttons-block div[data-v-5e423637]{padding:15px 5px}.menu-buttons-block-active[data-v-5e423637]{position:relative;top:-1000px}.burger-icon[data-v-5e423637]{position:relative;top:5px}}.font-text{font-family:font_old_typer}.content-text{float:right;position:relative;top:100px;right:0}@media (width>=1024px){.font-text{position:relative;left:-50px}.content-text{position:relative;top:100px;right:-50px}}.sign-card[data-v-c1fd645b]{background-color:#1d1d1d}.form-label[data-v-c1fd645b]{margin-top:10px}.form-button-wrapper[data-v-c1fd645b]{justify-content:center;display:flex}.docs-link[data-v-c1fd645b]{color:#45aa89}.docs-link[data-v-c1fd645b]:hover{color:#63e2b7}@media (width>=1024px){.sign-card[data-v-c1fd645b]{width:380px}}.hr[data-v-8927f3b5]{border:1px dashed #eee;margin:10px 0}.place-block-hover[data-v-8927f3b5],.place-block[data-v-8927f3b5]{border:1px solid #444;border-radius:10px;margin:10px 0;padding:20px}.place-block-hover[data-v-8927f3b5]:hover{color:#63e2b7}.place-image-plus[data-v-8927f3b5]{justify-content:center;align-items:center;font-size:30px;display:flex}.show-editor-block[data-v-8927f3b5]{cursor:pointer}.message-content[data-v-8927f3b5]{white-space:pre-wrap;font-weight:500}.gray-block[data-v-8927f3b5]{color:#777;margin-top:5px}.application-block[data-v-8927f3b5]{color:#deb887;margin-right:5px}.door-block[data-v-8927f3b5]{color:#eee;background-color:#222;border-radius:5px;margin:10px 5px 10px 0;padding:5px 10px;display:inline-block}.door-add-block[data-v-8927f3b5]{color:#eee;background-color:#222;border-radius:5px;padding:10px}.key-block[data-v-8927f3b5]{color:gold;margin-left:10px}.lock-icon[data-v-8927f3b5]{position:relative;top:2px}.door-field[data-v-8927f3b5]{margin-top:10px}.need-keys-text[data-v-8927f3b5]{color:gold;margin:15px 0 0;padding:0}.slot-block[data-v-8927f3b5]{margin-top:10px}.plus-minus-buttons[data-v-8927f3b5]{text-align:center;color:#eee;border:1px solid #444;border-radius:40px;margin:0 0 10px 5px;padding:0 13px;font-size:25px}.plus-minus-buttons[data-v-8927f3b5]:hover{cursor:pointer;color:#63e2b7}.message-image-border[data-v-8927f3b5]{float:left;background-image:url(/assets/paper_white-ZSlTzOTx.jpg);background-size:cover;width:40%;max-width:200px;margin-right:15px;padding:7px;transform:rotate(-3deg);box-shadow:0 3px 15px #626262}.message-image[data-v-8927f3b5]{width:100%}.message-edit-image[data-v-8927f3b5]{width:135px;height:135px}.message-header[data-v-8927f3b5]{padding-right:50px;font-size:20px}.message-footer[data-v-8927f3b5]{color:var(--second-color);padding-right:50px;font-weight:400;position:relative}.settings-block[data-v-4c06554a]{height:40px}.settings-button[data-v-4c06554a]{float:right}.settings-icon[data-v-4c06554a]{width:20px}.name-text[data-v-4c06554a]{background-color:#ffffff1a;border-radius:3px;padding:3px}.settings-header[data-v-4c06554a]{margin-top:20px}.settings-hr[data-v-4c06554a]{margin:20px 0}.places-container[data-v-4c06554a]{flex-flow:column;height:calc(100vh - 150px);margin-top:70px;padding:20px;display:flex;overflow-y:auto}@media (width>=1024px){.places-container[data-v-4c06554a]{height:calc(100vh - 70px);padding:20px 250px}}.scenarios-container[data-v-c46f610b]{flex-flow:wrap;justify-content:center;height:calc(100vh - 150px);padding:0;display:flex;overflow-y:auto}.scenario-block[data-v-c46f610b]{cursor:pointer;background-color:#333;border:2px solid #333;border-radius:12px;width:160px;height:300px;margin:10px;position:relative}.scenario-content-block[data-v-c46f610b]{padding:2px 10px}.scenario-block[data-v-c46f610b]:hover{color:#63e2b7;border:2px solid #63e2b7}.scenario-image-block[data-v-c46f610b]{background-color:#111;border-radius:10px;height:160px}.scenario-image-plus[data-v-c46f610b]{background-color:#111;justify-content:center;align-items:center;font-size:120px;display:flex}.scenario-image[data-v-c46f610b]{background-position:50%;background-size:cover}.scenario-title[data-v-c46f610b]{padding:5px 0}.status-block[data-v-c46f610b]{position:absolute;bottom:15px;right:15px}@media (width>=1024px){.scenarios-container[data-v-c46f610b]{height:calc(100vh - 70px)}.scenario-block[data-v-c46f610b]{width:250px;height:400px}.scenario-image-block[data-v-c46f610b]{height:250px}.scenario-content-block[data-v-c46f610b]{padding:4px 10px}}.users-container[data-v-eba2cf43]{padding-bottom:20px}.user-block[data-v-eba2cf43]{border:1px solid #444;border-radius:10px;margin:0 0 20px;padding:20px}.user-field[data-v-eba2cf43]{margin:10px}.roles-buttons-block[data-v-eba2cf43]{margin-top:20px}.scenarios-container[data-v-32efaf45]{flex-flow:wrap;justify-content:center;height:calc(100vh - 150px);padding:0;display:flex;overflow-y:auto}.scenario-block[data-v-32efaf45]{cursor:pointer;background-color:#333;border:2px solid #333;border-radius:12px;width:160px;height:300px;margin:10px;position:relative}.scenario-content-block[data-v-32efaf45]{padding:2px 10px}.scenario-block[data-v-32efaf45]:hover{color:#63e2b7;border:2px solid #63e2b7}.scenario-image-block[data-v-32efaf45]{background-color:#111;border-radius:10px;height:160px}.scenario-image[data-v-32efaf45]{background-position:50%;background-size:cover}.scenario-title[data-v-32efaf45]{padding:5px 0}.scenario-description[data-v-32efaf45]{color:#aaa;display:none}.status-block[data-v-32efaf45]{position:absolute;bottom:15px;right:15px}@media (width>=1024px){.scenarios-container[data-v-32efaf45]{height:calc(100vh - 70px)}.scenario-block[data-v-32efaf45]{width:250px;height:400px}.scenario-image-block[data-v-32efaf45]{height:250px}.scenario-content-block[data-v-32efaf45]{padding:4px 10px}.scenario-description[data-v-32efaf45]{color:#aaa;display:block}}.scenario-container[data-v-230da08c]{padding:20px}.scenario-title[data-v-230da08c]{margin-bottom:10px;font-size:24px}.scenario-image[data-v-230da08c]{width:100%;max-width:400px;margin-bottom:10px}.scenario-description[data-v-230da08c]{color:#aaa;margin-bottom:10px} diff --git a/dist/index.html b/dist/index.html index 6171395..930dfb7 100644 --- a/dist/index.html +++ b/dist/index.html @@ -5,8 +5,8 @@ Вечерний детектив - - + +
diff --git a/src/components/ScenariosEditorPage.vue b/src/components/ScenariosEditorPage.vue index e755c5f..88cc43a 100644 --- a/src/components/ScenariosEditorPage.vue +++ b/src/components/ScenariosEditorPage.vue @@ -277,11 +277,11 @@ async function deletePlace(place: Place) { + v-bind:key="place.oldCode"> Удалить Отмена - Сохранить + Сохранить