generated from VLADIMIR/template_frontend
add
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import{A as e,D as t,N as n,it as r,v as i}from"./vue-router-bPs2Bq2h.js";import{B as a,G as o,J as s,K as c,M as l,N as u,V as d,Y as f,Z as p,o as m,r as h,t as g}from"./light-BDe84dgP.js";import{a as _,c as v,r as y}from"./resolve-slot-Cp3m6n7Y.js";import{C as b,F as x,I as S,L as C,M as w,N as T,R as E,V as D,w as O}from"./index-Cs-VwJrb.js";function k(e){let{lineHeight:t,borderRadius:n,fontWeightStrong:r,baseColor:i,dividerColor:o,actionColor:s,textColor1:c,textColor2:l,closeColorHover:u,closeColorPressed:f,closeIconColor:p,closeIconColorHover:m,closeIconColorPressed:h,infoColor:g,successColor:_,warningColor:v,errorColor:y,fontSize:b}=e;return Object.assign(Object.assign({},O),{fontSize:b,lineHeight:t,titleFontWeight:r,borderRadius:n,border:`1px solid ${o}`,color:s,titleTextColor:c,iconColor:l,contentTextColor:l,closeBorderRadius:n,closeColorHover:u,closeColorPressed:f,closeIconColor:p,closeIconColorHover:m,closeIconColorPressed:h,borderInfo:`1px solid ${d(i,a(g,{alpha:.25}))}`,colorInfo:d(i,a(g,{alpha:.08})),titleTextColorInfo:c,iconColorInfo:g,contentTextColorInfo:l,closeColorHoverInfo:u,closeColorPressedInfo:f,closeIconColorInfo:p,closeIconColorHoverInfo:m,closeIconColorPressedInfo:h,borderSuccess:`1px solid ${d(i,a(_,{alpha:.25}))}`,colorSuccess:d(i,a(_,{alpha:.08})),titleTextColorSuccess:c,iconColorSuccess:_,contentTextColorSuccess:l,closeColorHoverSuccess:u,closeColorPressedSuccess:f,closeIconColorSuccess:p,closeIconColorHoverSuccess:m,closeIconColorPressedSuccess:h,borderWarning:`1px solid ${d(i,a(v,{alpha:.33}))}`,colorWarning:d(i,a(v,{alpha:.08})),titleTextColorWarning:c,iconColorWarning:v,contentTextColorWarning:l,closeColorHoverWarning:u,closeColorPressedWarning:f,closeIconColorWarning:p,closeIconColorHoverWarning:m,closeIconColorPressedWarning:h,borderError:`1px solid ${d(i,a(y,{alpha:.25}))}`,colorError:d(i,a(y,{alpha:.08})),titleTextColorError:c,iconColorError:y,contentTextColorError:l,closeColorHoverError:u,closeColorPressedError:f,closeIconColorError:p,closeIconColorHoverError:m,closeIconColorPressedError:h})}var A={name:`Alert`,common:g,self:k},j=c(`alert`,`
|
||||
import{A as e,D as t,N as n,it as r,v as i}from"./vue-router-bPs2Bq2h.js";import{B as a,G as o,J as s,K as c,M as l,N as u,V as d,Y as f,Z as p,o as m,r as h,t as g}from"./light-BDe84dgP.js";import{a as _,c as v,r as y}from"./resolve-slot-Cp3m6n7Y.js";import{C as b,F as x,I as S,L as C,M as w,N as T,R as E,V as D,w as O}from"./index-ConzuMfl.js";function k(e){let{lineHeight:t,borderRadius:n,fontWeightStrong:r,baseColor:i,dividerColor:o,actionColor:s,textColor1:c,textColor2:l,closeColorHover:u,closeColorPressed:f,closeIconColor:p,closeIconColorHover:m,closeIconColorPressed:h,infoColor:g,successColor:_,warningColor:v,errorColor:y,fontSize:b}=e;return Object.assign(Object.assign({},O),{fontSize:b,lineHeight:t,titleFontWeight:r,borderRadius:n,border:`1px solid ${o}`,color:s,titleTextColor:c,iconColor:l,contentTextColor:l,closeBorderRadius:n,closeColorHover:u,closeColorPressed:f,closeIconColor:p,closeIconColorHover:m,closeIconColorPressed:h,borderInfo:`1px solid ${d(i,a(g,{alpha:.25}))}`,colorInfo:d(i,a(g,{alpha:.08})),titleTextColorInfo:c,iconColorInfo:g,contentTextColorInfo:l,closeColorHoverInfo:u,closeColorPressedInfo:f,closeIconColorInfo:p,closeIconColorHoverInfo:m,closeIconColorPressedInfo:h,borderSuccess:`1px solid ${d(i,a(_,{alpha:.25}))}`,colorSuccess:d(i,a(_,{alpha:.08})),titleTextColorSuccess:c,iconColorSuccess:_,contentTextColorSuccess:l,closeColorHoverSuccess:u,closeColorPressedSuccess:f,closeIconColorSuccess:p,closeIconColorHoverSuccess:m,closeIconColorPressedSuccess:h,borderWarning:`1px solid ${d(i,a(v,{alpha:.33}))}`,colorWarning:d(i,a(v,{alpha:.08})),titleTextColorWarning:c,iconColorWarning:v,contentTextColorWarning:l,closeColorHoverWarning:u,closeColorPressedWarning:f,closeIconColorWarning:p,closeIconColorHoverWarning:m,closeIconColorPressedWarning:h,borderError:`1px solid ${d(i,a(y,{alpha:.25}))}`,colorError:d(i,a(y,{alpha:.08})),titleTextColorError:c,iconColorError:y,contentTextColorError:l,closeColorHoverError:u,closeColorPressedError:f,closeIconColorError:p,closeIconColorHoverError:m,closeIconColorPressedError:h})}var A={name:`Alert`,common:g,self:k},j=c(`alert`,`
|
||||
line-height: var(--n-line-height);
|
||||
border-radius: var(--n-border-radius);
|
||||
position: relative;
|
||||
@@ -1,4 +1,4 @@
|
||||
import{A as e,D as t,v as n}from"./vue-router-bPs2Bq2h.js";import{$ as r,G as i,J as a,K as o,M as s,N as c,Q as l,W as u,Y as d,Z as f,o as p,r as m}from"./light-BDe84dgP.js";import{i as h}from"./Input-BoUB5066.js";import{a as g,c as _,t as v}from"./resolve-slot-Cp3m6n7Y.js";import{t as y}from"./call-ChHlm4-m.js";import{N as b,b as x}from"./index-Cs-VwJrb.js";function S(e){return Object.keys(e)}var C=o(`card-content`,`
|
||||
import{A as e,D as t,v as n}from"./vue-router-bPs2Bq2h.js";import{$ as r,G as i,J as a,K as o,M as s,N as c,Q as l,W as u,Y as d,Z as f,o as p,r as m}from"./light-BDe84dgP.js";import{i as h}from"./Input-CDUBW0gP.js";import{a as g,c as _,t as v}from"./resolve-slot-Cp3m6n7Y.js";import{t as y}from"./call-ChHlm4-m.js";import{N as b,b as x}from"./index-ConzuMfl.js";function S(e){return Object.keys(e)}var C=o(`card-content`,`
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
box-sizing: border-box;
|
||||
@@ -1 +1 @@
|
||||
import{D as e,Dt as t,E as n,Et as r,H as i,Q as a,S as o,T as s,W as c,b as l,it as u,lt as d,o as f,p,y as m}from"./vue-router-bPs2Bq2h.js";import{t as h}from"./Tag-D-qK3rwp.js";import{i as g,n as _,t as v}from"./HeaderMenu-Ag7dXVRR.js";var y={class:`center-block-custom`},b={class:`width1200 display-table`},x=[`onClick`],S={class:`scenario-content-block`},C={class:`scenario-title`},w={class:`scenario-description`},T={class:`scenario-label`},E=_(e({__name:`CatalogPage`,setup(e){let l=g(),_=u([]),E=f();async function D(){_.value=[];let e=await l.GetScenariosCatalog({});_.value=e.scenarios}async function O(e){E.push(`/scenarios/`+e)}return D(),(e,l)=>(i(),o(p,null,[m(`div`,y,[m(`div`,b,[(i(!0),o(p,null,c(_.value,e=>(i(),o(`div`,{class:`scenario-block`,onClick:t=>O(e.id),key:e.id},[m(`div`,{class:`scenario-image-block scenario-image`,style:r({backgroundImage:`url(${e.image})`})},null,4),m(`div`,S,[m(`p`,C,t(e.name),1),m(`p`,w,t(e.description),1),m(`p`,T,[n(d(h),{bordered:!1,type:`success`,class:`status-block`},{default:a(()=>[s(`Автор: `+t(e.author?.username),1)]),_:2},1024)])])],8,x))),128))])]),n(v,{active:`catalog`})],64))}}),[[`__scopeId`,`data-v-eeb868d7`]]),D=e({__name:`CatalogView`,setup(e){return(e,t)=>(i(),l(E))}});export{D as default};
|
||||
import{D as e,Dt as t,E as n,Et as r,H as i,Q as a,S as o,T as s,W as c,b as l,it as u,lt as d,o as f,p,y as m}from"./vue-router-bPs2Bq2h.js";import{t as h}from"./Tag-BKP4jMs4.js";import{i as g,n as _,t as v}from"./HeaderMenu-CpXTvgBL.js";var y={class:`center-block-custom`},b={class:`width1200 display-table`},x=[`onClick`],S={class:`scenario-content-block`},C={class:`scenario-title`},w={class:`scenario-description`},T={class:`scenario-label`},E=_(e({__name:`CatalogPage`,setup(e){let l=g(),_=u([]),E=f();async function D(){_.value=[];let e=await l.GetScenariosCatalog({});_.value=e.scenarios}async function O(e){E.push(`/scenarios/`+e)}return D(),(e,l)=>(i(),o(p,null,[m(`div`,y,[m(`div`,b,[(i(!0),o(p,null,c(_.value,e=>(i(),o(`div`,{class:`scenario-block`,onClick:t=>O(e.id),key:e.id},[m(`div`,{class:`scenario-image-block scenario-image`,style:r({backgroundImage:`url(${e.image})`})},null,4),m(`div`,S,[m(`p`,C,t(e.name),1),m(`p`,w,t(e.description),1),m(`p`,T,[n(d(h),{bordered:!1,type:`success`,class:`status-block`},{default:a(()=>[s(`Автор: `+t(e.author?.username),1)]),_:2},1024)])])],8,x))),128))])]),n(v,{active:`catalog`})],64))}}),[[`__scopeId`,`data-v-eeb868d7`]]),D=e({__name:`CatalogView`,setup(e){return(e,t)=>(i(),l(E))}});export{D as default};
|
||||
@@ -1 +1 @@
|
||||
import{D as e,E as t,H as n,S as r,p as i}from"./vue-router-bPs2Bq2h.js";import{t as a}from"./DocsPage-B61S0m9n.js";import{t as o}from"./HeaderMenu-Ag7dXVRR.js";var s=e({__name:`ConsentView`,setup(e){return(e,s)=>(n(),r(i,null,[t(a,{kind:`consent`}),t(o)],64))}});export{s as default};
|
||||
import{D as e,E as t,H as n,S as r,p as i}from"./vue-router-bPs2Bq2h.js";import{t as a}from"./DocsPage-D7pWnF5p.js";import{t as o}from"./HeaderMenu-CpXTvgBL.js";var s=e({__name:`ConsentView`,setup(e){return(e,s)=>(n(),r(i,null,[t(a,{kind:`consent`}),t(o)],64))}});export{s as default};
|
||||
@@ -1,4 +1,4 @@
|
||||
import{A as e,D as t,Dt as n,E as r,H as i,Q as a,S as o,T as s,Z as c,b as l,it as u,lt as d,t as f,v as p,y as m,z as h}from"./vue-router-bPs2Bq2h.js";import{G as g,K as _,M as v,N as y,Y as b,Z as x,r as S}from"./light-BDe84dgP.js";import{l as C}from"./resolve-slot-Cp3m6n7Y.js";import{t as w}from"./use-compitable-BcHeQzgm.js";import{t as T}from"./fade-in.cssr-CHZadXSL.js";import{t as E}from"./Alert-B-ZOdcVS.js";import{A as D,Y as O,j as k,o as A}from"./index-Cs-VwJrb.js";import{i as j,n as M}from"./HeaderMenu-Ag7dXVRR.js";import{t as N}from"./HeaderText-fBGVHZzZ.js";var P=g([g(`@keyframes spin-rotate`,`
|
||||
import{A as e,D as t,Dt as n,E as r,H as i,Q as a,S as o,T as s,Z as c,b as l,it as u,lt as d,t as f,v as p,y as m,z as h}from"./vue-router-bPs2Bq2h.js";import{G as g,K as _,M as v,N as y,Y as b,Z as x,r as S}from"./light-BDe84dgP.js";import{l as C}from"./resolve-slot-Cp3m6n7Y.js";import{t as w}from"./use-compitable-BcHeQzgm.js";import{t as T}from"./fade-in.cssr-CHZadXSL.js";import{t as E}from"./Alert-B5Ly9AST.js";import{A as D,Y as O,j as k,o as A}from"./index-ConzuMfl.js";import{i as j,n as M}from"./HeaderMenu-CpXTvgBL.js";import{t as N}from"./HeaderText-CItdqRGG.js";var P=g([g(`@keyframes spin-rotate`,`
|
||||
from {
|
||||
transform: rotate(0);
|
||||
}
|
||||
@@ -1 +1 @@
|
||||
import{A as e,D as t,v as n}from"./vue-router-bPs2Bq2h.js";import{N as r,Z as i,o as a,r as o}from"./light-BDe84dgP.js";import{o as s,s as c}from"./resolve-slot-Cp3m6n7Y.js";import{c as l}from"./use-message-wxnsal0S.js";import{t as u}from"./get-slot-6kXJmSMP.js";import{c as d}from"./index-Cs-VwJrb.js";function f(){return d}var p={name:`Flex`,self:f},m=t({name:`Flex`,props:Object.assign(Object.assign({},o.props),{align:String,justify:{type:String,default:`start`},inline:Boolean,vertical:Boolean,reverse:Boolean,size:{type:[String,Number,Array],default:`medium`},wrap:{type:Boolean,default:!0}}),setup(e){let{mergedClsPrefixRef:t,mergedRtlRef:l}=r(e),u=o(`Flex`,`-flex`,void 0,p,e,t);return{rtlEnabled:a(`Flex`,l,t),mergedClsPrefix:t,margin:n(()=>{let{size:t}=e;if(Array.isArray(t))return{horizontal:t[0],vertical:t[1]};if(typeof t==`number`)return{horizontal:t,vertical:t};let{self:{[i(`gap`,t)]:n}}=u.value,{row:r,col:a}=c(n);return{horizontal:s(a),vertical:s(r)}})}},render(){let{vertical:t,reverse:n,align:r,inline:i,justify:a,margin:o,wrap:s,mergedClsPrefix:c,rtlEnabled:d}=this,f=l(u(this),!1);return f.length?e(`div`,{role:`none`,class:[`${c}-flex`,d&&`${c}-flex--rtl`],style:{display:i?`inline-flex`:`flex`,flexDirection:t&&!n?`column`:t&&n?`column-reverse`:!t&&n?`row-reverse`:`row`,justifyContent:a,flexWrap:!s||t?`nowrap`:`wrap`,alignItems:r,gap:`${o.vertical}px ${o.horizontal}px`}},f):null}});export{m as t};
|
||||
import{A as e,D as t,v as n}from"./vue-router-bPs2Bq2h.js";import{N as r,Z as i,o as a,r as o}from"./light-BDe84dgP.js";import{o as s,s as c}from"./resolve-slot-Cp3m6n7Y.js";import{c as l}from"./use-message-BosemArq.js";import{t as u}from"./get-slot-6kXJmSMP.js";import{c as d}from"./index-ConzuMfl.js";function f(){return d}var p={name:`Flex`,self:f},m=t({name:`Flex`,props:Object.assign(Object.assign({},o.props),{align:String,justify:{type:String,default:`start`},inline:Boolean,vertical:Boolean,reverse:Boolean,size:{type:[String,Number,Array],default:`medium`},wrap:{type:Boolean,default:!0}}),setup(e){let{mergedClsPrefixRef:t,mergedRtlRef:l}=r(e),u=o(`Flex`,`-flex`,void 0,p,e,t);return{rtlEnabled:a(`Flex`,l,t),mergedClsPrefix:t,margin:n(()=>{let{size:t}=e;if(Array.isArray(t))return{horizontal:t[0],vertical:t[1]};if(typeof t==`number`)return{horizontal:t,vertical:t};let{self:{[i(`gap`,t)]:n}}=u.value,{row:r,col:a}=c(n);return{horizontal:s(a),vertical:s(r)}})}},render(){let{vertical:t,reverse:n,align:r,inline:i,justify:a,margin:o,wrap:s,mergedClsPrefix:c,rtlEnabled:d}=this,f=l(u(this),!1);return f.length?e(`div`,{role:`none`,class:[`${c}-flex`,d&&`${c}-flex--rtl`],style:{display:i?`inline-flex`:`flex`,flexDirection:t&&!n?`column`:t&&n?`column-reverse`:!t&&n?`row-reverse`:`row`,justifyContent:a,flexWrap:!s||t?`nowrap`:`wrap`,alignItems:r,gap:`${o.vertical}px ${o.horizontal}px`}},f):null}});export{m as t};
|
||||
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
@@ -1,4 +1,4 @@
|
||||
import{A as e,D as t,Dt as n,E as r,H as i,P as a,Q as o,S as s,T as c,W as l,X as u,a as ee,b as d,it as f,lt as p,o as te,p as m,st as h,v as g,x as _,y as v}from"./vue-router-bPs2Bq2h.js";import{G as y,H as b,K as x,N as S,n as C,o as w,r as T,t as E}from"./light-BDe84dgP.js";import{O as D,s as ne,t as O,w as k}from"./Input-BoUB5066.js";import{a as A,r as j}from"./resolve-slot-Cp3m6n7Y.js";import{t as M}from"./light-BY0jNPKU.js";import{t as N}from"./Modal-BYjBrqrI.js";import{n as P,r as re,s as ie,t as ae}from"./use-message-wxnsal0S.js";import{t as F}from"./call-ChHlm4-m.js";import{t as I}from"./Card-DxryFQNx.js";import{t as L}from"./Add-DIWmYlsC.js";import{i as R,n as oe,r as z}from"./application-BLck7f1E.js";import{t as B}from"./Tag-D-qK3rwp.js";import{t as V}from"./Space-BEiTYFC7.js";import{t as H}from"./Flex-C9wio4gF.js";import{n as se,t as ce}from"./useSimplePolling-Dhfe_hAe.js";import{t as le}from"./text-DD-GwQmf.js";import{J as U,V as W,x as G}from"./index-Cs-VwJrb.js";import{i as K,n as q,o as ue,r as J,t as de}from"./HeaderMenu-Ag7dXVRR.js";import{t as fe}from"./Settings-CfqkfQL3.js";import{n as pe,t as me}from"./datetime-BJNH0M1T.js";function he(e){let{textColorDisabled:t}=e;return{iconColorDisabled:t}}var ge=C({name:`InputNumber`,common:E,peers:{Button:G,Input:M},self:he}),_e=y([x(`input-number-suffix`,`
|
||||
import{A as e,D as t,Dt as n,E as r,H as i,P as a,Q as o,S as s,T as c,W as l,X as u,a as ee,b as d,it as f,lt as p,o as te,p as m,st as h,v as g,x as _,y as v}from"./vue-router-bPs2Bq2h.js";import{G as y,H as b,K as x,N as S,n as C,o as w,r as T,t as E}from"./light-BDe84dgP.js";import{O as D,s as ne,t as O,w as k}from"./Input-CDUBW0gP.js";import{a as A,r as j}from"./resolve-slot-Cp3m6n7Y.js";import{t as M}from"./light-BY0jNPKU.js";import{t as N}from"./Modal-DUvKpuna.js";import{n as P,r as re,s as ie,t as ae}from"./use-message-BosemArq.js";import{t as F}from"./call-ChHlm4-m.js";import{t as I}from"./Card-CMguhjRj.js";import{t as L}from"./Add-DIWmYlsC.js";import{i as R,n as oe,r as z}from"./application-DcVVuNt2.js";import{t as B}from"./Tag-BKP4jMs4.js";import{t as V}from"./Space-BpX6JKSK.js";import{t as H}from"./Flex-Cp_2ngpO.js";import{n as se,t as ce}from"./useSimplePolling-Dhfe_hAe.js";import{t as le}from"./text-7cJ8fGdJ.js";import{J as U,V as W,x as G}from"./index-ConzuMfl.js";import{i as K,n as q,o as ue,r as J,t as de}from"./HeaderMenu-CpXTvgBL.js";import{t as fe}from"./Settings-CfqkfQL3.js";import{n as pe,t as me}from"./datetime-BJNH0M1T.js";function he(e){let{textColorDisabled:t}=e;return{iconColorDisabled:t}}var ge=C({name:`InputNumber`,common:E,peers:{Button:G,Input:M},self:he}),_e=y([x(`input-number-suffix`,`
|
||||
display: inline-block;
|
||||
margin-right: 10px;
|
||||
`),x(`input-number-prefix`,`
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
|
||||
import{D as e,G as t,H as n,S as r}from"./vue-router-bPs2Bq2h.js";import{n as i}from"./HeaderMenu-Ag7dXVRR.js";var a={class:`text-with-font`},o=i(e({__name:`HeaderText`,setup(e){return(e,i)=>(n(),r(`span`,a,[t(e.$slots,`default`,{},void 0,!0)]))}}),[[`__scopeId`,`data-v-689794e0`]]);export{o as t};
|
||||
import{D as e,G as t,H as n,S as r}from"./vue-router-bPs2Bq2h.js";import{n as i}from"./HeaderMenu-CpXTvgBL.js";var a={class:`text-with-font`},o=i(e({__name:`HeaderText`,setup(e){return(e,i)=>(n(),r(`span`,a,[t(e.$slots,`default`,{},void 0,!0)]))}}),[[`__scopeId`,`data-v-689794e0`]]);export{o as t};
|
||||
@@ -1 +1 @@
|
||||
import{D as e,E as t,H as n,S as r,p as i,y as a}from"./vue-router-bPs2Bq2h.js";import{t as o}from"./HeaderMenu-Ag7dXVRR.js";var s=e({__name:`HomeView`,setup(e){return(e,s)=>(n(),r(i,null,[s[0]||=a(`div`,{class:`center-block-custom content-block center-middle-block-custom height80`},[a(`div`,null,[a(`h1`,{class:`font-text`},`Вечерний детектив`),a(`h3`,{class:`font-text`},`Дело №0`),a(`p`,{class:`content-text`},`Поиграем?`)])],-1),t(o,{active:`main`})],64))}});export{s as default};
|
||||
import{D as e,E as t,H as n,S as r,p as i,y as a}from"./vue-router-bPs2Bq2h.js";import{t as o}from"./HeaderMenu-CpXTvgBL.js";var s=e({__name:`HomeView`,setup(e){return(e,s)=>(n(),r(i,null,[s[0]||=a(`div`,{class:`center-block-custom content-block center-middle-block-custom height80`},[a(`div`,null,[a(`h1`,{class:`font-text`},`Вечерний детектив`),a(`h3`,{class:`font-text`},`Дело №0`),a(`p`,{class:`content-text`},`Поиграем?`)])],-1),t(o,{active:`main`})],64))}});export{s as default};
|
||||
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
|
||||
import{D as e,Dt as t,E as n,G as r,H as i,Q as a,S as o,T as s,b as c,lt as l,p as u,v as d,x as f,y as p}from"./vue-router-bPs2Bq2h.js";import{t as m}from"./Input-BoUB5066.js";import{n as h}from"./use-message-wxnsal0S.js";import{n as g,t as _}from"./Upload-CXA7omlT.js";import{t as v}from"./Space-BEiTYFC7.js";import{t as y}from"./text-DD-GwQmf.js";import{n as b,o as x}from"./HeaderMenu-Ag7dXVRR.js";var S={class:`main`},C={class:`message-cloud`},w=b(e({__name:`MessagePaper`,setup(e){return(e,t)=>(i(),o(`div`,S,[t[0]||=p(`div`,{class:`message-cloud-3`},null,-1),t[1]||=p(`div`,{class:`message-cloud-2`},null,-1),p(`div`,C,[r(e.$slots,`default`,{},void 0,!0)])]))}}),[[`__scopeId`,`data-v-0b1b8d3f`]]),T={key:0},E={class:`intro-text font`},D={key:0,class:`intro-audio-block`},O=[`src`],k={class:`message-content`},A={key:0},j={key:1,class:`intro-empty`},M={key:2,class:`intro-audio-block`},N=[`src`],P={key:2,class:`place-block`},F={class:`intro-edit-audio`},I=[`src`],L={class:`slot-block`},R=b(e({__name:`IntroBlock`,props:{introduction:{type:Object,required:!0},mode:{type:String,required:!0}},emits:[`update:mode`],setup(e,{emit:b}){let S=e,C=b,R=e=>{C(`update:mode`,e)},z=d(()=>!!S.introduction?.text),B=d(()=>!!S.introduction?.audio),V=d(()=>{let e=S.introduction?.audio;if(e)return/^https?:\/\//i.test(e)?e:`${x()}/api/files/${encodeURIComponent(e)}`}),H=()=>{S.introduction&&(S.introduction.audio=``,S.introduction.fileList=void 0)};return(d,b)=>(i(),o(u,null,[e.mode==`show`?(i(),o(`div`,T,[n(w,null,{default:a(()=>[b[4]||=p(`div`,{class:`font`},`Вступление`,-1),b[5]||=p(`hr`,{class:`intro-hr`},null,-1),p(`div`,E,t(e.introduction.text),1),B.value?(i(),o(`div`,D,[p(`audio`,{src:V.value,controls:``,preload:`none`,class:`intro-audio`},null,8,O)])):f(``,!0)]),_:1})])):f(``,!0),e.mode==`show-editor`?(i(),o(`div`,{key:1,class:`place-block-hover show-editor-block`,onClick:b[0]||=e=>R(`edit`)},[b[6]||=p(`div`,{class:`message-header`},`Вступление`,-1),b[7]||=p(`hr`,{class:`hr`},null,-1),p(`div`,k,[z.value?(i(),o(`span`,A,t(e.introduction.text),1)):(i(),o(`span`,j,`Введение не задано — нажмите, чтобы добавить`)),B.value?(i(),o(`div`,M,[p(`audio`,{src:V.value,controls:``,preload:`none`,class:`intro-audio`},null,8,N)])):f(``,!0)])])):f(``,!0),e.mode==`edit`?(i(),o(`div`,P,[n(l(v),{vertical:``},{default:a(()=>[b[11]||=p(`p`,{class:`settings-header`},`Текст вступления`,-1),n(l(m),{value:S.introduction.text,"onUpdate:value":b[1]||=e=>S.introduction.text=e,type:`textarea`,autosize:{minRows:4,maxRows:12},placeholder:`Дорогие сыщики! В этом деле вам предстоит...`},null,8,[`value`]),b[12]||=p(`p`,{class:`settings-header`},`Аудио вступления`,-1),p(`div`,F,[n(l(v),{vertical:``},{default:a(()=>[B.value?(i(),o(`audio`,{key:0,src:V.value,controls:``,preload:`none`,class:`intro-audio`},null,8,I)):(i(),c(l(y),{key:1,depth:`3`},{default:a(()=>[...b[8]||=[s(`Аудио не задано`,-1)]]),_:1})),n(l(h),{onClick:b[2]||=e=>H(),disabled:!B.value},{default:a(()=>[...b[9]||=[s(`Убрать аудио`,-1)]]),_:1},8,[`disabled`])]),_:1}),n(l(_),{"directory-dnd":``,max:1,"file-list":S.introduction.fileList,"onUpdate:fileList":b[3]||=e=>S.introduction.fileList=e},{default:a(()=>[n(l(g),null,{default:a(()=>[n(l(y),{style:{"font-size":`16px`}},{default:a(()=>[...b[10]||=[s(` Щелкните или перетащите аудиофайл в эту область для загрузки `,-1)]]),_:1})]),_:1})]),_:1},8,[`file-list`])]),p(`div`,L,[r(d.$slots,`default`,{},void 0,!0)])]),_:3})])):f(``,!0)],64))}}),[[`__scopeId`,`data-v-21997d9b`]]);export{w as n,R as t};
|
||||
import{D as e,Dt as t,E as n,G as r,H as i,Q as a,S as o,T as s,b as c,lt as l,p as u,v as d,x as f,y as p}from"./vue-router-bPs2Bq2h.js";import{t as m}from"./Input-CDUBW0gP.js";import{n as h}from"./use-message-BosemArq.js";import{n as g,t as _}from"./Upload-7JZLEojn.js";import{t as v}from"./Space-BpX6JKSK.js";import{t as y}from"./text-7cJ8fGdJ.js";import{n as b,o as x}from"./HeaderMenu-CpXTvgBL.js";var S={class:`main`},C={class:`message-cloud`},w=b(e({__name:`MessagePaper`,setup(e){return(e,t)=>(i(),o(`div`,S,[t[0]||=p(`div`,{class:`message-cloud-3`},null,-1),t[1]||=p(`div`,{class:`message-cloud-2`},null,-1),p(`div`,C,[r(e.$slots,`default`,{},void 0,!0)])]))}}),[[`__scopeId`,`data-v-0b1b8d3f`]]),T={key:0},E={class:`intro-text font`},D={key:0,class:`intro-audio-block`},O=[`src`],k={class:`message-content`},A={key:0},j={key:1,class:`intro-empty`},M={key:2,class:`intro-audio-block`},N=[`src`],P={key:2,class:`place-block`},F={class:`intro-edit-audio`},I=[`src`],L={class:`slot-block`},R=b(e({__name:`IntroBlock`,props:{introduction:{type:Object,required:!0},mode:{type:String,required:!0}},emits:[`update:mode`],setup(e,{emit:b}){let S=e,C=b,R=e=>{C(`update:mode`,e)},z=d(()=>!!S.introduction?.text),B=d(()=>!!S.introduction?.audio),V=d(()=>{let e=S.introduction?.audio;if(e)return/^https?:\/\//i.test(e)?e:`${x()}/api/files/${encodeURIComponent(e)}`}),H=()=>{S.introduction&&(S.introduction.audio=``,S.introduction.fileList=void 0)};return(d,b)=>(i(),o(u,null,[e.mode==`show`?(i(),o(`div`,T,[n(w,null,{default:a(()=>[b[4]||=p(`div`,{class:`font`},`Вступление`,-1),b[5]||=p(`hr`,{class:`intro-hr`},null,-1),p(`div`,E,t(e.introduction.text),1),B.value?(i(),o(`div`,D,[p(`audio`,{src:V.value,controls:``,preload:`none`,class:`intro-audio`},null,8,O)])):f(``,!0)]),_:1})])):f(``,!0),e.mode==`show-editor`?(i(),o(`div`,{key:1,class:`place-block-hover show-editor-block`,onClick:b[0]||=e=>R(`edit`)},[b[6]||=p(`div`,{class:`message-header`},`Вступление`,-1),b[7]||=p(`hr`,{class:`hr`},null,-1),p(`div`,k,[z.value?(i(),o(`span`,A,t(e.introduction.text),1)):(i(),o(`span`,j,`Введение не задано — нажмите, чтобы добавить`)),B.value?(i(),o(`div`,M,[p(`audio`,{src:V.value,controls:``,preload:`none`,class:`intro-audio`},null,8,N)])):f(``,!0)])])):f(``,!0),e.mode==`edit`?(i(),o(`div`,P,[n(l(v),{vertical:``},{default:a(()=>[b[11]||=p(`p`,{class:`settings-header`},`Текст вступления`,-1),n(l(m),{value:S.introduction.text,"onUpdate:value":b[1]||=e=>S.introduction.text=e,type:`textarea`,autosize:{minRows:4,maxRows:12},placeholder:`Дорогие сыщики! В этом деле вам предстоит...`},null,8,[`value`]),b[12]||=p(`p`,{class:`settings-header`},`Аудио вступления`,-1),p(`div`,F,[n(l(v),{vertical:``},{default:a(()=>[B.value?(i(),o(`audio`,{key:0,src:V.value,controls:``,preload:`none`,class:`intro-audio`},null,8,I)):(i(),c(l(y),{key:1,depth:`3`},{default:a(()=>[...b[8]||=[s(`Аудио не задано`,-1)]]),_:1})),n(l(h),{onClick:b[2]||=e=>H(),disabled:!B.value},{default:a(()=>[...b[9]||=[s(`Убрать аудио`,-1)]]),_:1},8,[`disabled`])]),_:1}),n(l(_),{"directory-dnd":``,max:1,"file-list":S.introduction.fileList,"onUpdate:fileList":b[3]||=e=>S.introduction.fileList=e},{default:a(()=>[n(l(g),null,{default:a(()=>[n(l(y),{style:{"font-size":`16px`}},{default:a(()=>[...b[10]||=[s(` Щелкните или перетащите аудиофайл в эту область для загрузки `,-1)]]),_:1})]),_:1})]),_:1},8,[`file-list`])]),p(`div`,L,[r(d.$slots,`default`,{},void 0,!0)])]),_:3})])):f(``,!0)],64))}}),[[`__scopeId`,`data-v-21997d9b`]]);export{w as n,R as t};
|
||||
@@ -1,4 +1,4 @@
|
||||
import{$ as e,A as t,D as n,E as r,H as i,N as a,P as o,Q as s,S as c,T as l,U as u,X as d,Z as f,_ as p,it as m,j as h,lt as g,o as _,p as v,st as y,v as b,y as x,z as S}from"./vue-router-bPs2Bq2h.js";import{$ as C,E as w,G as T,I as E,J as D,K as O,M as ee,N as k,Q as A,R as j,X as M,Y as N,Z as P,j as F,o as I,r as L,z as R}from"./light-BDe84dgP.js";import{a as z,i as B,l as te,n as V,o as H,r as U,t as W}from"./Follower-3CKGE3Da.js";import{a as ne,o as re,t as ie}from"./utils-CLPwML_t.js";import{O as ae,d as oe,f as G,g as K,k as q,r as se,t as J,w as Y}from"./Input-BoUB5066.js";import{a as X,c as Z,o as ce}from"./resolve-slot-Cp3m6n7Y.js";import{a as Q}from"./light-BY0jNPKU.js";import{t as le}from"./use-compitable-BcHeQzgm.js";import{c as ue,n as de,s as fe,t as pe}from"./use-message-wxnsal0S.js";import{t as $}from"./call-ChHlm4-m.js";import{t as me}from"./Card-DxryFQNx.js";import{t as he}from"./Add-DIWmYlsC.js";import{t as ge}from"./Space-BEiTYFC7.js";import{B as _e,G as ve,J as ye,K as be,N as xe,P as Se,Q as Ce,S as we,V as Te,W as Ee,X as De,Y as Oe,i as ke,q as Ae,y as je}from"./index-Cs-VwJrb.js";import{a as Me,n as Ne,t as Pe}from"./HeaderMenu-Ag7dXVRR.js";var Fe=V(`.v-x-scroll`,{overflow:`auto`,scrollbarWidth:`none`},[V(`&::-webkit-scrollbar`,{width:0,height:0})]),Ie=n({name:`XScroll`,props:{disabled:Boolean,onScroll:Function},setup(){let e=m(null);function t(e){!(e.currentTarget.offsetWidth<e.currentTarget.scrollWidth)||e.deltaY===0||(e.currentTarget.scrollLeft+=e.deltaY+e.deltaX,e.preventDefault())}let n=j();return Fe.mount({id:`vueuc/x-scroll`,head:!0,anchorMetaName:U,ssr:n}),Object.assign({selfRef:e,handleWheel:t},{scrollTo(...t){var n;(n=e.value)==null||n.scrollTo(...t)}})},render(){return t(`div`,{ref:`selfRef`,onScroll:this.onScroll,onWheel:this.disabled?void 0:this.handleWheel,class:`v-x-scroll`},this.$slots)}}),Le=/\s/;function Re(e){for(var t=e.length;t--&&Le.test(e.charAt(t)););return t}var ze=/^\s+/;function Be(e){return e&&e.slice(0,Re(e)+1).replace(ze,``)}var Ve=NaN,He=/^[-+]0x[0-9a-f]+$/i,Ue=/^0b[01]+$/i,We=/^0o[0-7]+$/i,Ge=parseInt;function Ke(e){if(typeof e==`number`)return e;if(Ee(e))return Ve;if(w(e)){var t=typeof e.valueOf==`function`?e.valueOf():e;e=w(t)?t+``:t}if(typeof e!=`string`)return e===0?e:+e;e=Be(e);var n=Ue.test(e);return n||We.test(e)?Ge(e.slice(2),n?2:8):He.test(e)?Ve:+e}var qe=function(){return F.Date.now()},Je=`Expected a function`,Ye=Math.max,Xe=Math.min;function Ze(e,t,n){var r,i,a,o,s,c,l=0,u=!1,d=!1,f=!0;if(typeof e!=`function`)throw TypeError(Je);t=Ke(t)||0,w(n)&&(u=!!n.leading,d=`maxWait`in n,a=d?Ye(Ke(n.maxWait)||0,t):a,f=`trailing`in n?!!n.trailing:f);function p(t){var n=r,a=i;return r=i=void 0,l=t,o=e.apply(a,n),o}function m(e){return l=e,s=setTimeout(_,t),u?p(e):o}function h(e){var n=e-c,r=e-l,i=t-n;return d?Xe(i,a-r):i}function g(e){var n=e-c,r=e-l;return c===void 0||n>=t||n<0||d&&r>=a}function _(){var e=qe();if(g(e))return v(e);s=setTimeout(_,h(e))}function v(e){return s=void 0,f&&r?p(e):(r=i=void 0,o)}function y(){s!==void 0&&clearTimeout(s),l=0,r=c=i=s=void 0}function b(){return s===void 0?o:v(qe())}function x(){var e=qe(),n=g(e);if(r=arguments,i=this,c=e,n){if(s===void 0)return m(c);if(d)return clearTimeout(s),s=setTimeout(_,t),p(c)}return s===void 0&&(s=setTimeout(_,t)),o}return x.cancel=y,x.flush=b,x}var Qe=`Expected a function`;function $e(e,t,n){var r=!0,i=!0;if(typeof e!=`function`)throw TypeError(Qe);return w(n)&&(r=`leading`in n?!!n.leading:r,i=`trailing`in n?!!n.trailing:i),Ze(e,t,{leading:r,maxWait:t,trailing:i})}var et=T([O(`auto-complete`,`
|
||||
import{$ as e,A as t,D as n,E as r,H as i,N as a,P as o,Q as s,S as c,T as l,U as u,X as d,Z as f,_ as p,it as m,j as h,lt as g,o as _,p as v,st as y,v as b,y as x,z as S}from"./vue-router-bPs2Bq2h.js";import{$ as C,E as w,G as T,I as E,J as D,K as O,M as ee,N as k,Q as A,R as j,X as M,Y as N,Z as P,j as F,o as I,r as L,z as R}from"./light-BDe84dgP.js";import{a as z,i as B,l as te,n as V,o as H,r as U,t as W}from"./Follower-BYC_JjEN.js";import{a as ne,o as re,t as ie}from"./utils-CZGxaoEI.js";import{O as ae,d as oe,f as G,g as K,k as q,r as se,t as J,w as Y}from"./Input-CDUBW0gP.js";import{a as X,c as Z,o as ce}from"./resolve-slot-Cp3m6n7Y.js";import{a as Q}from"./light-BY0jNPKU.js";import{t as le}from"./use-compitable-BcHeQzgm.js";import{c as ue,n as de,s as fe,t as pe}from"./use-message-BosemArq.js";import{t as $}from"./call-ChHlm4-m.js";import{t as me}from"./Card-CMguhjRj.js";import{t as he}from"./Add-DIWmYlsC.js";import{t as ge}from"./Space-BpX6JKSK.js";import{B as _e,G as ve,J as ye,K as be,N as xe,P as Se,Q as Ce,S as we,V as Te,W as Ee,X as De,Y as Oe,i as ke,q as Ae,y as je}from"./index-ConzuMfl.js";import{a as Me,n as Ne,t as Pe}from"./HeaderMenu-CpXTvgBL.js";var Fe=V(`.v-x-scroll`,{overflow:`auto`,scrollbarWidth:`none`},[V(`&::-webkit-scrollbar`,{width:0,height:0})]),Ie=n({name:`XScroll`,props:{disabled:Boolean,onScroll:Function},setup(){let e=m(null);function t(e){!(e.currentTarget.offsetWidth<e.currentTarget.scrollWidth)||e.deltaY===0||(e.currentTarget.scrollLeft+=e.deltaY+e.deltaX,e.preventDefault())}let n=j();return Fe.mount({id:`vueuc/x-scroll`,head:!0,anchorMetaName:U,ssr:n}),Object.assign({selfRef:e,handleWheel:t},{scrollTo(...t){var n;(n=e.value)==null||n.scrollTo(...t)}})},render(){return t(`div`,{ref:`selfRef`,onScroll:this.onScroll,onWheel:this.disabled?void 0:this.handleWheel,class:`v-x-scroll`},this.$slots)}}),Le=/\s/;function Re(e){for(var t=e.length;t--&&Le.test(e.charAt(t)););return t}var ze=/^\s+/;function Be(e){return e&&e.slice(0,Re(e)+1).replace(ze,``)}var Ve=NaN,He=/^[-+]0x[0-9a-f]+$/i,Ue=/^0b[01]+$/i,We=/^0o[0-7]+$/i,Ge=parseInt;function Ke(e){if(typeof e==`number`)return e;if(Ee(e))return Ve;if(w(e)){var t=typeof e.valueOf==`function`?e.valueOf():e;e=w(t)?t+``:t}if(typeof e!=`string`)return e===0?e:+e;e=Be(e);var n=Ue.test(e);return n||We.test(e)?Ge(e.slice(2),n?2:8):He.test(e)?Ve:+e}var qe=function(){return F.Date.now()},Je=`Expected a function`,Ye=Math.max,Xe=Math.min;function Ze(e,t,n){var r,i,a,o,s,c,l=0,u=!1,d=!1,f=!0;if(typeof e!=`function`)throw TypeError(Je);t=Ke(t)||0,w(n)&&(u=!!n.leading,d=`maxWait`in n,a=d?Ye(Ke(n.maxWait)||0,t):a,f=`trailing`in n?!!n.trailing:f);function p(t){var n=r,a=i;return r=i=void 0,l=t,o=e.apply(a,n),o}function m(e){return l=e,s=setTimeout(_,t),u?p(e):o}function h(e){var n=e-c,r=e-l,i=t-n;return d?Xe(i,a-r):i}function g(e){var n=e-c,r=e-l;return c===void 0||n>=t||n<0||d&&r>=a}function _(){var e=qe();if(g(e))return v(e);s=setTimeout(_,h(e))}function v(e){return s=void 0,f&&r?p(e):(r=i=void 0,o)}function y(){s!==void 0&&clearTimeout(s),l=0,r=c=i=s=void 0}function b(){return s===void 0?o:v(qe())}function x(){var e=qe(),n=g(e);if(r=arguments,i=this,c=e,n){if(s===void 0)return m(c);if(d)return clearTimeout(s),s=setTimeout(_,t),p(c)}return s===void 0&&(s=setTimeout(_,t)),o}return x.cancel=y,x.flush=b,x}var Qe=`Expected a function`;function $e(e,t,n){var r=!0,i=!0;if(typeof e!=`function`)throw TypeError(Qe);return w(n)&&(r=`leading`in n?!!n.leading:r,i=`trailing`in n?!!n.trailing:i),Ze(e,t,{leading:r,maxWait:t,trailing:i})}var et=T([O(`auto-complete`,`
|
||||
z-index: auto;
|
||||
position: relative;
|
||||
display: inline-flex;
|
||||
@@ -1,4 +1,4 @@
|
||||
import{$ as e,A as t,B as n,D as r,I as i,L as a,N as o,P as s,Tt as c,U as l,X as u,_ as d,it as f,j as p,rt as m,st as h,v as g,z as _}from"./vue-router-bPs2Bq2h.js";import{G as v,J as y,K as b,L as x,M as S,N as C,Q as w,W as T,Y as E,Z as D,o as O,r as k,z as A}from"./light-BDe84dgP.js";import{C as j,D as M,E as ee,O as N,S as te,T as P,b as ne,d as re,g as ie,h as ae,i as oe,k as se,m as ce,r as le,x as ue,y as de}from"./Input-BoUB5066.js";import{a as F,c as fe,r as I}from"./resolve-slot-Cp3m6n7Y.js";import{l as pe,n as L}from"./use-message-wxnsal0S.js";import{n as me,t as R}from"./keep-C8mRE25e.js";import{t as z}from"./call-ChHlm4-m.js";import{i as B,n as he,r as ge,t as _e}from"./Card-DxryFQNx.js";import{t as ve}from"./fade-in.cssr-CHZadXSL.js";import{F as ye,G as V,I as be,L as H,N as xe,Q as U,R as Se,V as Ce,Y as we,f as Te,p as Ee,q as De}from"./index-Cs-VwJrb.js";var W=f(null);function Oe(e){if(e.clientX>0||e.clientY>0)W.value={x:e.clientX,y:e.clientY};else{let{target:t}=e;if(t instanceof Element){let{left:e,top:n,width:r,height:i}=t.getBoundingClientRect();e>0||n>0?W.value={x:e+r/2,y:n+i/2}:W.value={x:0,y:0}}else W.value=null}}var G=0,ke=!0;function Ae(){if(!ee)return m(f(null));G===0&&N(`click`,document,Oe,!0);let e=()=>{G+=1};return(ke&&=P())?(i(e),a(()=>{--G,G===0&&M(`click`,document,Oe,!0)})):e(),m(W)}var je=f(void 0),K=0;function Me(){je.value=Date.now()}var Ne=!0;function Pe(e){if(!ee)return m(f(!1));let t=f(!1),n=null;function r(){n!==null&&window.clearTimeout(n)}function o(){r(),t.value=!0,n=window.setTimeout(()=>{t.value=!1},e)}K===0&&N(`click`,window,Me,!0);let s=()=>{K+=1,N(`click`,window,o,!0)};return(Ne&&=P())?(i(s),a(()=>{--K,K===0&&M(`click`,window,Me,!0),M(`click`,window,o,!0),r()})):s(),m(t)}var q=f(!1);function Fe(){q.value=!0}function Ie(){q.value=!1}var J=0;function Le(){return pe&&(i(()=>{J||(window.addEventListener(`compositionstart`,Fe),window.addEventListener(`compositionend`,Ie)),J++}),a(()=>{J<=1?(window.removeEventListener(`compositionstart`,Fe),window.removeEventListener(`compositionend`,Ie),J=0):J--})),q}var Y=0,Re=``,ze=``,Be=``,X=``,Ve=f(`0px`);function He(e){if(typeof document>`u`)return;let t=document.documentElement,n,r=!1,i=()=>{t.style.marginRight=Re,t.style.overflow=ze,t.style.overflowX=Be,t.style.overflowY=X,Ve.value=`0px`};_(()=>{n=u(e,e=>{if(e){if(!Y){let e=window.innerWidth-t.offsetWidth;e>0&&(Re=t.style.marginRight,t.style.marginRight=`${e}px`,Ve.value=`${e}px`),ze=t.style.overflow,Be=t.style.overflowX,X=t.style.overflowY,t.style.overflow=`hidden`,t.style.overflowX=`hidden`,t.style.overflowY=`hidden`}r=!0,Y++}else Y--,Y||i(),r=!1},{immediate:!0})}),a(()=>{n?.(),r&&=(Y--,Y||i(),!1)})}var Ue=new WeakSet;function We(e){Ue.add(e)}function Ge(e){return!Ue.has(e)}var Ke=A(`n-dialog-provider`);A(`n-dialog-api`),A(`n-dialog-reactive-list`);var Z={icon:Function,type:{type:String,default:`default`},title:[String,Function],closable:{type:Boolean,default:!0},negativeText:String,positiveText:String,positiveButtonProps:Object,negativeButtonProps:Object,content:[String,Function],action:Function,showIcon:{type:Boolean,default:!0},loading:Boolean,bordered:Boolean,iconPlacement:String,titleClass:[String,Array],titleStyle:[String,Object],contentClass:[String,Array],contentStyle:[String,Object],actionClass:[String,Array],actionStyle:[String,Object],onPositiveClick:Function,onNegativeClick:Function,onClose:Function,closeFocusable:Boolean},qe=B(Z),Je=v([b(`dialog`,`
|
||||
import{$ as e,A as t,B as n,D as r,I as i,L as a,N as o,P as s,Tt as c,U as l,X as u,_ as d,it as f,j as p,rt as m,st as h,v as g,z as _}from"./vue-router-bPs2Bq2h.js";import{G as v,J as y,K as b,L as x,M as S,N as C,Q as w,W as T,Y as E,Z as D,o as O,r as k,z as A}from"./light-BDe84dgP.js";import{C as j,D as M,E as ee,O as N,S as te,T as P,b as ne,d as re,g as ie,h as ae,i as oe,k as se,m as ce,r as le,x as ue,y as de}from"./Input-CDUBW0gP.js";import{a as F,c as fe,r as I}from"./resolve-slot-Cp3m6n7Y.js";import{l as pe,n as L}from"./use-message-BosemArq.js";import{n as me,t as R}from"./keep-Cd0pM6lu.js";import{t as z}from"./call-ChHlm4-m.js";import{i as B,n as he,r as ge,t as _e}from"./Card-CMguhjRj.js";import{t as ve}from"./fade-in.cssr-CHZadXSL.js";import{F as ye,G as V,I as be,L as H,N as xe,Q as U,R as Se,V as Ce,Y as we,f as Te,p as Ee,q as De}from"./index-ConzuMfl.js";var W=f(null);function Oe(e){if(e.clientX>0||e.clientY>0)W.value={x:e.clientX,y:e.clientY};else{let{target:t}=e;if(t instanceof Element){let{left:e,top:n,width:r,height:i}=t.getBoundingClientRect();e>0||n>0?W.value={x:e+r/2,y:n+i/2}:W.value={x:0,y:0}}else W.value=null}}var G=0,ke=!0;function Ae(){if(!ee)return m(f(null));G===0&&N(`click`,document,Oe,!0);let e=()=>{G+=1};return(ke&&=P())?(i(e),a(()=>{--G,G===0&&M(`click`,document,Oe,!0)})):e(),m(W)}var je=f(void 0),K=0;function Me(){je.value=Date.now()}var Ne=!0;function Pe(e){if(!ee)return m(f(!1));let t=f(!1),n=null;function r(){n!==null&&window.clearTimeout(n)}function o(){r(),t.value=!0,n=window.setTimeout(()=>{t.value=!1},e)}K===0&&N(`click`,window,Me,!0);let s=()=>{K+=1,N(`click`,window,o,!0)};return(Ne&&=P())?(i(s),a(()=>{--K,K===0&&M(`click`,window,Me,!0),M(`click`,window,o,!0),r()})):s(),m(t)}var q=f(!1);function Fe(){q.value=!0}function Ie(){q.value=!1}var J=0;function Le(){return pe&&(i(()=>{J||(window.addEventListener(`compositionstart`,Fe),window.addEventListener(`compositionend`,Ie)),J++}),a(()=>{J<=1?(window.removeEventListener(`compositionstart`,Fe),window.removeEventListener(`compositionend`,Ie),J=0):J--})),q}var Y=0,Re=``,ze=``,Be=``,X=``,Ve=f(`0px`);function He(e){if(typeof document>`u`)return;let t=document.documentElement,n,r=!1,i=()=>{t.style.marginRight=Re,t.style.overflow=ze,t.style.overflowX=Be,t.style.overflowY=X,Ve.value=`0px`};_(()=>{n=u(e,e=>{if(e){if(!Y){let e=window.innerWidth-t.offsetWidth;e>0&&(Re=t.style.marginRight,t.style.marginRight=`${e}px`,Ve.value=`${e}px`),ze=t.style.overflow,Be=t.style.overflowX,X=t.style.overflowY,t.style.overflow=`hidden`,t.style.overflowX=`hidden`,t.style.overflowY=`hidden`}r=!0,Y++}else Y--,Y||i(),r=!1},{immediate:!0})}),a(()=>{n?.(),r&&=(Y--,Y||i(),!1)})}var Ue=new WeakSet;function We(e){Ue.add(e)}function Ge(e){return!Ue.has(e)}var Ke=A(`n-dialog-provider`);A(`n-dialog-api`),A(`n-dialog-reactive-list`);var Z={icon:Function,type:{type:String,default:`default`},title:[String,Function],closable:{type:Boolean,default:!0},negativeText:String,positiveText:String,positiveButtonProps:Object,negativeButtonProps:Object,content:[String,Function],action:Function,showIcon:{type:Boolean,default:!0},loading:Boolean,bordered:Boolean,iconPlacement:String,titleClass:[String,Array],titleStyle:[String,Object],contentClass:[String,Array],contentStyle:[String,Object],actionClass:[String,Array],actionStyle:[String,Object],onPositiveClick:Function,onNegativeClick:Function,onClose:Function,closeFocusable:Boolean},qe=B(Z),Je=v([b(`dialog`,`
|
||||
--n-icon-margin: var(--n-icon-margin-top) var(--n-icon-margin-right) var(--n-icon-margin-bottom) var(--n-icon-margin-left);
|
||||
word-break: break-word;
|
||||
line-height: var(--n-line-height);
|
||||
File diff suppressed because one or more lines are too long
@@ -1,4 +1,4 @@
|
||||
import{A as e,D as t,Dt as n,E as r,Et as i,G as a,H as o,Q as s,S as c,T as l,Tt as u,U as d,W as f,et as p,it as m,j as h,lt as g,ot as _,p as v,st as y,v as b,w as x,x as S,y as C}from"./vue-router-bPs2Bq2h.js";import{B as w,G as T,J as E,K as D,M as O,N as k,X as A,Y as j,Z as M,i as N,n as P,o as F,r as I,t as L,z as ee}from"./light-BDe84dgP.js";import{s as te,t as R,w as z}from"./Input-BoUB5066.js";import{a as B,i as V,l as ne,n as re,o as H,r as ie}from"./resolve-slot-Cp3m6n7Y.js";import{a as ae,t as oe}from"./light-BY0jNPKU.js";import{t as se}from"./Modal-BYjBrqrI.js";import{i as ce,n as U,o as le,s as ue}from"./use-message-wxnsal0S.js";import{t as W}from"./call-ChHlm4-m.js";import{n as de,t as fe}from"./Upload-CXA7omlT.js";import{t as pe}from"./Card-DxryFQNx.js";import{t as me}from"./Add-DIWmYlsC.js";import{i as he,n as G,r as K,t as ge}from"./application-BLck7f1E.js";import{t as _e}from"./Tag-D-qK3rwp.js";import{t as q}from"./Space-BEiTYFC7.js";import{t as ve}from"./text-DD-GwQmf.js";import{A as ye,B as be,P as xe,V as J,a as Se,et as Y,u as Ce,x as we}from"./index-Cs-VwJrb.js";import{n as Te,r as Ee}from"./HeaderMenu-Ag7dXVRR.js";import{n as De}from"./IntroBlock-S5Wr8EmS.js";var Oe=t({name:`ArrowDown`,render(){return e(`svg`,{viewBox:`0 0 28 28`,version:`1.1`,xmlns:`http://www.w3.org/2000/svg`},e(`g`,{stroke:`none`,"stroke-width":`1`,"fill-rule":`evenodd`},e(`g`,{"fill-rule":`nonzero`},e(`path`,{d:`M23.7916,15.2664 C24.0788,14.9679 24.0696,14.4931 23.7711,14.206 C23.4726,13.9188 22.9978,13.928 22.7106,14.2265 L14.7511,22.5007 L14.7511,3.74792 C14.7511,3.33371 14.4153,2.99792 14.0011,2.99792 C13.5869,2.99792 13.2511,3.33371 13.2511,3.74793 L13.2511,22.4998 L5.29259,14.2265 C5.00543,13.928 4.53064,13.9188 4.23213,14.206 C3.93361,14.4931 3.9244,14.9679 4.21157,15.2664 L13.2809,24.6944 C13.6743,25.1034 14.3289,25.1034 14.7223,24.6944 L23.7916,15.2664 Z`}))))}}),ke=t({name:`ArrowUp`,render(){return e(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 20 20`},e(`g`,{fill:`none`},e(`path`,{d:`M3.13 9.163a.5.5 0 1 0 .74.674L9.5 3.67V17.5a.5.5 0 0 0 1 0V3.672l5.63 6.165a.5.5 0 0 0 .738-.674l-6.315-6.916a.746.746 0 0 0-.632-.24a.746.746 0 0 0-.476.24L3.131 9.163z`,fill:`currentColor`})))}}),Ae=D(`input-group`,`
|
||||
import{A as e,D as t,Dt as n,E as r,Et as i,G as a,H as o,Q as s,S as c,T as l,Tt as u,U as d,W as f,et as p,it as m,j as h,lt as g,ot as _,p as v,st as y,v as b,w as x,x as S,y as C}from"./vue-router-bPs2Bq2h.js";import{B as w,G as T,J as E,K as D,M as O,N as k,X as A,Y as j,Z as M,i as N,n as P,o as F,r as I,t as L,z as ee}from"./light-BDe84dgP.js";import{s as te,t as R,w as z}from"./Input-CDUBW0gP.js";import{a as B,i as V,l as ne,n as re,o as H,r as ie}from"./resolve-slot-Cp3m6n7Y.js";import{a as ae,t as oe}from"./light-BY0jNPKU.js";import{t as se}from"./Modal-DUvKpuna.js";import{i as ce,n as U,o as le,s as ue}from"./use-message-BosemArq.js";import{t as W}from"./call-ChHlm4-m.js";import{n as de,t as fe}from"./Upload-7JZLEojn.js";import{t as pe}from"./Card-CMguhjRj.js";import{t as me}from"./Add-DIWmYlsC.js";import{i as he,n as G,r as K,t as ge}from"./application-DcVVuNt2.js";import{t as _e}from"./Tag-BKP4jMs4.js";import{t as q}from"./Space-BpX6JKSK.js";import{t as ve}from"./text-7cJ8fGdJ.js";import{A as ye,B as be,P as xe,V as J,a as Se,et as Y,u as Ce,x as we}from"./index-ConzuMfl.js";import{n as Te,r as Ee}from"./HeaderMenu-CpXTvgBL.js";import{n as De}from"./IntroBlock-Bd19JB3i.js";var Oe=t({name:`ArrowDown`,render(){return e(`svg`,{viewBox:`0 0 28 28`,version:`1.1`,xmlns:`http://www.w3.org/2000/svg`},e(`g`,{stroke:`none`,"stroke-width":`1`,"fill-rule":`evenodd`},e(`g`,{"fill-rule":`nonzero`},e(`path`,{d:`M23.7916,15.2664 C24.0788,14.9679 24.0696,14.4931 23.7711,14.206 C23.4726,13.9188 22.9978,13.928 22.7106,14.2265 L14.7511,22.5007 L14.7511,3.74792 C14.7511,3.33371 14.4153,2.99792 14.0011,2.99792 C13.5869,2.99792 13.2511,3.33371 13.2511,3.74793 L13.2511,22.4998 L5.29259,14.2265 C5.00543,13.928 4.53064,13.9188 4.23213,14.206 C3.93361,14.4931 3.9244,14.9679 4.21157,15.2664 L13.2809,24.6944 C13.6743,25.1034 14.3289,25.1034 14.7223,24.6944 L23.7916,15.2664 Z`}))))}}),ke=t({name:`ArrowUp`,render(){return e(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 20 20`},e(`g`,{fill:`none`},e(`path`,{d:`M3.13 9.163a.5.5 0 1 0 .74.674L9.5 3.67V17.5a.5.5 0 0 0 1 0V3.672l5.63 6.165a.5.5 0 0 0 .738-.674l-6.315-6.916a.746.746 0 0 0-.632-.24a.746.746 0 0 0-.476.24L3.131 9.163z`,fill:`currentColor`})))}}),Ae=D(`input-group`,`
|
||||
display: inline-flex;
|
||||
width: 100%;
|
||||
flex-wrap: nowrap;
|
||||
File diff suppressed because one or more lines are too long
+1
-1
@@ -1 +1 @@
|
||||
import{D as e,E as t,H as n,S as r,p as i}from"./vue-router-bPs2Bq2h.js";import{t as a}from"./DocsPage-B61S0m9n.js";import{t as o}from"./HeaderMenu-Ag7dXVRR.js";var s=e({__name:`PrivacyPolicyView`,setup(e){return(e,s)=>(n(),r(i,null,[t(a,{kind:`privacy`}),t(o)],64))}});export{s as default};
|
||||
import{D as e,E as t,H as n,S as r,p as i}from"./vue-router-bPs2Bq2h.js";import{t as a}from"./DocsPage-D7pWnF5p.js";import{t as o}from"./HeaderMenu-CpXTvgBL.js";var s=e({__name:`PrivacyPolicyView`,setup(e){return(e,s)=>(n(),r(i,null,[t(a,{kind:`privacy`}),t(o)],64))}});export{s as default};
|
||||
+1
-1
@@ -1 +1 @@
|
||||
import{D as e,Dt as t,E as n,H as r,Q as i,S as a,T as o,a as s,b as c,it as l,lt as u,p as d,x as f,y as p}from"./vue-router-bPs2Bq2h.js";import{t as m}from"./use-message-wxnsal0S.js";import{t as h}from"./Tag-D-qK3rwp.js";import{i as g,n as _,t as v}from"./HeaderMenu-Ag7dXVRR.js";import{t as y}from"./IntroBlock-S5Wr8EmS.js";var b={class:`center-block-custom`},x={class:`width700`},S={class:`scenario-title`},C=[`src`],w={class:`scenario-description`},T={class:`scenario-author`},E=_(e({__name:`ScenarioPage`,setup(e){let _=m(),E=g(),D=s().params.id,O=l({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 k(e){let t=await E.GetScenario({id:e});if(t.error!=``){_.error(t.error);return}O.value=t.scenario}return k(Number(D)),(e,s)=>(r(),a(d,null,[p(`div`,b,[p(`div`,x,[p(`div`,S,t(O.value.name),1),p(`img`,{class:`scenario-image`,src:O.value.image},null,8,C),p(`div`,w,t(O.value.description),1),p(`div`,T,[n(u(h),{bordered:!1,type:`success`,class:`status-block`},{default:i(()=>[o(`Автор: `+t(O.value.author?.username),1)]),_:1})]),O.value.story?.introduction&&(O.value.story.introduction.text||O.value.story.introduction.audio)?(r(),c(y,{key:0,introduction:O.value.story.introduction,mode:`show`},null,8,[`introduction`])):f(``,!0)])]),n(v,{active:`catalog`})],64))}}),[[`__scopeId`,`data-v-223ef01a`]]),D=e({__name:`ScenarioView`,setup(e){return(e,t)=>(r(),c(E))}});export{D as default};
|
||||
import{D as e,Dt as t,E as n,H as r,Q as i,S as a,T as o,a as s,b as c,it as l,lt as u,p as d,x as f,y as p}from"./vue-router-bPs2Bq2h.js";import{t as m}from"./use-message-BosemArq.js";import{t as h}from"./Tag-BKP4jMs4.js";import{i as g,n as _,t as v}from"./HeaderMenu-CpXTvgBL.js";import{t as y}from"./IntroBlock-Bd19JB3i.js";var b={class:`center-block-custom`},x={class:`width700`},S={class:`scenario-title`},C=[`src`],w={class:`scenario-description`},T={class:`scenario-author`},E=_(e({__name:`ScenarioPage`,setup(e){let _=m(),E=g(),D=s().params.id,O=l({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 k(e){let t=await E.GetScenario({id:e});if(t.error!=``){_.error(t.error);return}O.value=t.scenario}return k(Number(D)),(e,s)=>(r(),a(d,null,[p(`div`,b,[p(`div`,x,[p(`div`,S,t(O.value.name),1),p(`img`,{class:`scenario-image`,src:O.value.image},null,8,C),p(`div`,w,t(O.value.description),1),p(`div`,T,[n(u(h),{bordered:!1,type:`success`,class:`status-block`},{default:i(()=>[o(`Автор: `+t(O.value.author?.username),1)]),_:1})]),O.value.story?.introduction&&(O.value.story.introduction.text||O.value.story.introduction.audio)?(r(),c(y,{key:0,introduction:O.value.story.introduction,mode:`show`},null,8,[`introduction`])):f(``,!0)])]),n(v,{active:`catalog`})],64))}}),[[`__scopeId`,`data-v-223ef01a`]]),D=e({__name:`ScenarioView`,setup(e){return(e,t)=>(r(),c(E))}});export{D as default};
|
||||
Vendored
+1
-1
@@ -1 +1 @@
|
||||
.place-block-hover[data-v-7bd7e4c0],.place-block[data-v-7bd7e4c0]{background-color:#222;border:1px solid #222;border-radius:10px;margin:10px 0;padding:20px}.place-block-hover[data-v-7bd7e4c0]:hover{color:#63e2b7;cursor:pointer;border:1px solid #63e2b7}.place-image-plus[data-v-7bd7e4c0]{justify-content:center;align-items:center;font-size:30px;display:flex}.show-editor-block[data-v-7bd7e4c0]{cursor:pointer;overflow-wrap:anywhere}.hr[data-v-7bd7e4c0]{border:1px dashed #eee;margin:10px 0}.message-header[data-v-7bd7e4c0]{padding-right:50px;font-size:20px}.message-content[data-v-7bd7e4c0]{font-weight:500}.intro-empty[data-v-7bd7e4c0]{color:#777}.correct-answer[data-v-7bd7e4c0]{color:gold;white-space:pre-wrap;margin-top:4px;font-weight:500;display:inline-block}.settings-header[data-v-7bd7e4c0]{margin-top:20px}.hint[data-v-7bd7e4c0]{margin-top:5px}.slot-block[data-v-7bd7e4c0]{margin-top:10px}.background-preview[data-v-a574010e]{object-fit:contain;max-width:100%;max-height:200px}.settings-block[data-v-a574010e]{height:40px}.settings-button[data-v-a574010e]{float:right}.settings-icon[data-v-a574010e]{width:20px}.name-text[data-v-a574010e]{background-color:#ffffff1a;border-radius:3px;padding:3px}.settings-header[data-v-a574010e]{margin-top:20px}.settings-hint[data-v-a574010e]{color:#999;margin-bottom:10px}.settings-hr[data-v-a574010e]{margin:20px 0}.questions-header[data-v-a574010e]{color:#aaa;margin:30px 0 5px;font-size:18px}.places-container[data-v-a574010e]{flex-flow:column;display:flex}
|
||||
.place-block-hover[data-v-7bd7e4c0],.place-block[data-v-7bd7e4c0]{background-color:#222;border:1px solid #222;border-radius:10px;margin:10px 0;padding:20px}.place-block-hover[data-v-7bd7e4c0]:hover{color:#63e2b7;cursor:pointer;border:1px solid #63e2b7}.place-image-plus[data-v-7bd7e4c0]{justify-content:center;align-items:center;font-size:30px;display:flex}.show-editor-block[data-v-7bd7e4c0]{cursor:pointer;overflow-wrap:anywhere}.hr[data-v-7bd7e4c0]{border:1px dashed #eee;margin:10px 0}.message-header[data-v-7bd7e4c0]{padding-right:50px;font-size:20px}.message-content[data-v-7bd7e4c0]{font-weight:500}.intro-empty[data-v-7bd7e4c0]{color:#777}.correct-answer[data-v-7bd7e4c0]{color:gold;white-space:pre-wrap;margin-top:4px;font-weight:500;display:inline-block}.settings-header[data-v-7bd7e4c0]{margin-top:20px}.hint[data-v-7bd7e4c0]{margin-top:5px}.slot-block[data-v-7bd7e4c0]{margin-top:10px}.conclusion-video[data-v-e5b2f3a1]{width:100%}.background-preview[data-v-e5b2f3a1]{object-fit:contain;max-width:100%;max-height:200px}.settings-block[data-v-e5b2f3a1]{height:40px}.settings-button[data-v-e5b2f3a1]{float:right}.settings-icon[data-v-e5b2f3a1]{width:20px}.name-text[data-v-e5b2f3a1]{background-color:#ffffff1a;border-radius:3px;padding:3px}.settings-header[data-v-e5b2f3a1]{margin-top:20px}.settings-hint[data-v-e5b2f3a1]{color:#999;margin-bottom:10px}.settings-hr[data-v-e5b2f3a1]{margin:20px 0}.questions-header[data-v-e5b2f3a1]{color:#aaa;margin:30px 0 5px;font-size:18px}.places-container[data-v-e5b2f3a1]{flex-flow:column;display:flex}
|
||||
-1
File diff suppressed because one or more lines are too long
+1
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
|
||||
import{A as e,D as t,f as n,v as r}from"./vue-router-bPs2Bq2h.js";import{N as i,Z as a,o,r as s}from"./light-BDe84dgP.js";import{o as c,s as l}from"./resolve-slot-Cp3m6n7Y.js";import{c as u,l as d}from"./use-message-wxnsal0S.js";import{t as f}from"./get-slot-6kXJmSMP.js";import{l as p}from"./index-Cs-VwJrb.js";function m(){return p}var h={name:`Space`,self:m},g;function _(){if(!d)return!0;if(g===void 0){let e=document.createElement(`div`);e.style.display=`flex`,e.style.flexDirection=`column`,e.style.rowGap=`1px`,e.appendChild(document.createElement(`div`)),e.appendChild(document.createElement(`div`)),document.body.appendChild(e);let t=e.scrollHeight===1;return document.body.removeChild(e),g=t}return g}var v=t({name:`Space`,props:Object.assign(Object.assign({},s.props),{align:String,justify:{type:String,default:`start`},inline:Boolean,vertical:Boolean,reverse:Boolean,size:[String,Number,Array],wrapItem:{type:Boolean,default:!0},itemClass:String,itemStyle:[String,Object],wrap:{type:Boolean,default:!0},internalUseGap:{type:Boolean,default:void 0}}),setup(e){let{mergedClsPrefixRef:t,mergedRtlRef:n,mergedComponentPropsRef:u}=i(e),d=r(()=>e.size||u?.value?.Space?.size||`medium`),f=s(`Space`,`-space`,void 0,h,e,t),p=o(`Space`,n,t);return{useGap:_(),rtlEnabled:p,mergedClsPrefix:t,margin:r(()=>{let e=d.value;if(Array.isArray(e))return{horizontal:e[0],vertical:e[1]};if(typeof e==`number`)return{horizontal:e,vertical:e};let{self:{[a(`gap`,e)]:t}}=f.value,{row:n,col:r}=l(t);return{horizontal:c(r),vertical:c(n)}})}},render(){let{vertical:t,reverse:r,align:i,inline:a,justify:o,itemClass:s,itemStyle:c,margin:l,wrap:d,mergedClsPrefix:p,rtlEnabled:m,useGap:h,wrapItem:g,internalUseGap:_}=this,v=u(f(this),!1);if(!v.length)return null;let y=`${l.horizontal}px`,b=`${l.horizontal/2}px`,x=`${l.vertical}px`,S=`${l.vertical/2}px`,C=v.length-1,w=o.startsWith(`space-`);return e(`div`,{role:`none`,class:[`${p}-space`,m&&`${p}-space--rtl`],style:{display:a?`inline-flex`:`flex`,flexDirection:t&&!r?`column`:t&&r?`column-reverse`:!t&&r?`row-reverse`:`row`,justifyContent:[`start`,`end`].includes(o)?`flex-${o}`:o,flexWrap:!d||t?`nowrap`:`wrap`,marginTop:h||t?``:`-${S}`,marginBottom:h||t?``:`-${S}`,alignItems:i,gap:h?`${l.vertical}px ${l.horizontal}px`:``}},!g&&(h||_)?v:v.map((r,i)=>r.type===n?r:e(`div`,{role:`none`,class:s,style:[c,{maxWidth:`100%`},h?``:t?{marginBottom:i===C?``:x}:m?{marginLeft:w?o===`space-between`&&i===C?``:b:i===C?``:y,marginRight:w?o===`space-between`&&i===0?``:b:``,paddingTop:S,paddingBottom:S}:{marginRight:w?o===`space-between`&&i===C?``:b:i===C?``:y,marginLeft:w?o===`space-between`&&i===0?``:b:``,paddingTop:S,paddingBottom:S}]},r)))}});export{v as t};
|
||||
import{A as e,D as t,f as n,v as r}from"./vue-router-bPs2Bq2h.js";import{N as i,Z as a,o,r as s}from"./light-BDe84dgP.js";import{o as c,s as l}from"./resolve-slot-Cp3m6n7Y.js";import{c as u,l as d}from"./use-message-BosemArq.js";import{t as f}from"./get-slot-6kXJmSMP.js";import{l as p}from"./index-ConzuMfl.js";function m(){return p}var h={name:`Space`,self:m},g;function _(){if(!d)return!0;if(g===void 0){let e=document.createElement(`div`);e.style.display=`flex`,e.style.flexDirection=`column`,e.style.rowGap=`1px`,e.appendChild(document.createElement(`div`)),e.appendChild(document.createElement(`div`)),document.body.appendChild(e);let t=e.scrollHeight===1;return document.body.removeChild(e),g=t}return g}var v=t({name:`Space`,props:Object.assign(Object.assign({},s.props),{align:String,justify:{type:String,default:`start`},inline:Boolean,vertical:Boolean,reverse:Boolean,size:[String,Number,Array],wrapItem:{type:Boolean,default:!0},itemClass:String,itemStyle:[String,Object],wrap:{type:Boolean,default:!0},internalUseGap:{type:Boolean,default:void 0}}),setup(e){let{mergedClsPrefixRef:t,mergedRtlRef:n,mergedComponentPropsRef:u}=i(e),d=r(()=>e.size||u?.value?.Space?.size||`medium`),f=s(`Space`,`-space`,void 0,h,e,t),p=o(`Space`,n,t);return{useGap:_(),rtlEnabled:p,mergedClsPrefix:t,margin:r(()=>{let e=d.value;if(Array.isArray(e))return{horizontal:e[0],vertical:e[1]};if(typeof e==`number`)return{horizontal:e,vertical:e};let{self:{[a(`gap`,e)]:t}}=f.value,{row:n,col:r}=l(t);return{horizontal:c(r),vertical:c(n)}})}},render(){let{vertical:t,reverse:r,align:i,inline:a,justify:o,itemClass:s,itemStyle:c,margin:l,wrap:d,mergedClsPrefix:p,rtlEnabled:m,useGap:h,wrapItem:g,internalUseGap:_}=this,v=u(f(this),!1);if(!v.length)return null;let y=`${l.horizontal}px`,b=`${l.horizontal/2}px`,x=`${l.vertical}px`,S=`${l.vertical/2}px`,C=v.length-1,w=o.startsWith(`space-`);return e(`div`,{role:`none`,class:[`${p}-space`,m&&`${p}-space--rtl`],style:{display:a?`inline-flex`:`flex`,flexDirection:t&&!r?`column`:t&&r?`column-reverse`:!t&&r?`row-reverse`:`row`,justifyContent:[`start`,`end`].includes(o)?`flex-${o}`:o,flexWrap:!d||t?`nowrap`:`wrap`,marginTop:h||t?``:`-${S}`,marginBottom:h||t?``:`-${S}`,alignItems:i,gap:h?`${l.vertical}px ${l.horizontal}px`:``}},!g&&(h||_)?v:v.map((r,i)=>r.type===n?r:e(`div`,{role:`none`,class:s,style:[c,{maxWidth:`100%`},h?``:t?{marginBottom:i===C?``:x}:m?{marginLeft:w?o===`space-between`&&i===C?``:b:i===C?``:y,marginRight:w?o===`space-between`&&i===0?``:b:``,paddingTop:S,paddingBottom:S}:{marginRight:w?o===`space-between`&&i===C?``:b:i===C?``:y,marginLeft:w?o===`space-between`&&i===0?``:b:``,paddingTop:S,paddingBottom:S}]},r)))}});export{v as t};
|
||||
@@ -1,4 +1,4 @@
|
||||
import{A as e,D as t,U as n,it as r,st as i,v as a}from"./vue-router-bPs2Bq2h.js";import{B as o,G as s,J as c,K as l,M as u,N as d,X as f,Y as p,Z as m,o as h,r as g,t as _,z as v}from"./light-BDe84dgP.js";import{a as y,c as b}from"./resolve-slot-Cp3m6n7Y.js";import{n as x,t as S}from"./call-ChHlm4-m.js";import{E as C,N as w}from"./index-Cs-VwJrb.js";function T(e){let{textColor2:t,primaryColorHover:n,primaryColorPressed:r,primaryColor:i,infoColor:a,successColor:s,warningColor:c,errorColor:l,baseColor:u,borderColor:d,opacityDisabled:f,tagColor:p,closeIconColor:m,closeIconColorHover:h,closeIconColorPressed:g,borderRadiusSmall:_,fontSizeMini:v,fontSizeTiny:y,fontSizeSmall:b,fontSizeMedium:x,heightMini:S,heightTiny:w,heightSmall:T,heightMedium:E,closeColorHover:D,closeColorPressed:O,buttonColor2Hover:k,buttonColor2Pressed:A,fontWeightStrong:j}=e;return Object.assign(Object.assign({},C),{closeBorderRadius:_,heightTiny:S,heightSmall:w,heightMedium:T,heightLarge:E,borderRadius:_,opacityDisabled:f,fontSizeTiny:v,fontSizeSmall:y,fontSizeMedium:b,fontSizeLarge:x,fontWeightStrong:j,textColorCheckable:t,textColorHoverCheckable:t,textColorPressedCheckable:t,textColorChecked:u,colorCheckable:`#0000`,colorHoverCheckable:k,colorPressedCheckable:A,colorChecked:i,colorCheckedHover:n,colorCheckedPressed:r,border:`1px solid ${d}`,textColor:t,color:p,colorBordered:`rgb(250, 250, 252)`,closeIconColor:m,closeIconColorHover:h,closeIconColorPressed:g,closeColorHover:D,closeColorPressed:O,borderPrimary:`1px solid ${o(i,{alpha:.3})}`,textColorPrimary:i,colorPrimary:o(i,{alpha:.12}),colorBorderedPrimary:o(i,{alpha:.1}),closeIconColorPrimary:i,closeIconColorHoverPrimary:i,closeIconColorPressedPrimary:i,closeColorHoverPrimary:o(i,{alpha:.12}),closeColorPressedPrimary:o(i,{alpha:.18}),borderInfo:`1px solid ${o(a,{alpha:.3})}`,textColorInfo:a,colorInfo:o(a,{alpha:.12}),colorBorderedInfo:o(a,{alpha:.1}),closeIconColorInfo:a,closeIconColorHoverInfo:a,closeIconColorPressedInfo:a,closeColorHoverInfo:o(a,{alpha:.12}),closeColorPressedInfo:o(a,{alpha:.18}),borderSuccess:`1px solid ${o(s,{alpha:.3})}`,textColorSuccess:s,colorSuccess:o(s,{alpha:.12}),colorBorderedSuccess:o(s,{alpha:.1}),closeIconColorSuccess:s,closeIconColorHoverSuccess:s,closeIconColorPressedSuccess:s,closeColorHoverSuccess:o(s,{alpha:.12}),closeColorPressedSuccess:o(s,{alpha:.18}),borderWarning:`1px solid ${o(c,{alpha:.35})}`,textColorWarning:c,colorWarning:o(c,{alpha:.15}),colorBorderedWarning:o(c,{alpha:.12}),closeIconColorWarning:c,closeIconColorHoverWarning:c,closeIconColorPressedWarning:c,closeColorHoverWarning:o(c,{alpha:.12}),closeColorPressedWarning:o(c,{alpha:.18}),borderError:`1px solid ${o(l,{alpha:.23})}`,textColorError:l,colorError:o(l,{alpha:.1}),colorBorderedError:o(l,{alpha:.08}),closeIconColorError:l,closeIconColorHoverError:l,closeIconColorPressedError:l,closeColorHoverError:o(l,{alpha:.12}),closeColorPressedError:o(l,{alpha:.18})})}var E={name:`Tag`,common:_,self:T},D={color:Object,type:{type:String,default:`default`},round:Boolean,size:String,closable:Boolean,disabled:{type:Boolean,default:void 0}},O=l(`tag`,`
|
||||
import{A as e,D as t,U as n,it as r,st as i,v as a}from"./vue-router-bPs2Bq2h.js";import{B as o,G as s,J as c,K as l,M as u,N as d,X as f,Y as p,Z as m,o as h,r as g,t as _,z as v}from"./light-BDe84dgP.js";import{a as y,c as b}from"./resolve-slot-Cp3m6n7Y.js";import{n as x,t as S}from"./call-ChHlm4-m.js";import{E as C,N as w}from"./index-ConzuMfl.js";function T(e){let{textColor2:t,primaryColorHover:n,primaryColorPressed:r,primaryColor:i,infoColor:a,successColor:s,warningColor:c,errorColor:l,baseColor:u,borderColor:d,opacityDisabled:f,tagColor:p,closeIconColor:m,closeIconColorHover:h,closeIconColorPressed:g,borderRadiusSmall:_,fontSizeMini:v,fontSizeTiny:y,fontSizeSmall:b,fontSizeMedium:x,heightMini:S,heightTiny:w,heightSmall:T,heightMedium:E,closeColorHover:D,closeColorPressed:O,buttonColor2Hover:k,buttonColor2Pressed:A,fontWeightStrong:j}=e;return Object.assign(Object.assign({},C),{closeBorderRadius:_,heightTiny:S,heightSmall:w,heightMedium:T,heightLarge:E,borderRadius:_,opacityDisabled:f,fontSizeTiny:v,fontSizeSmall:y,fontSizeMedium:b,fontSizeLarge:x,fontWeightStrong:j,textColorCheckable:t,textColorHoverCheckable:t,textColorPressedCheckable:t,textColorChecked:u,colorCheckable:`#0000`,colorHoverCheckable:k,colorPressedCheckable:A,colorChecked:i,colorCheckedHover:n,colorCheckedPressed:r,border:`1px solid ${d}`,textColor:t,color:p,colorBordered:`rgb(250, 250, 252)`,closeIconColor:m,closeIconColorHover:h,closeIconColorPressed:g,closeColorHover:D,closeColorPressed:O,borderPrimary:`1px solid ${o(i,{alpha:.3})}`,textColorPrimary:i,colorPrimary:o(i,{alpha:.12}),colorBorderedPrimary:o(i,{alpha:.1}),closeIconColorPrimary:i,closeIconColorHoverPrimary:i,closeIconColorPressedPrimary:i,closeColorHoverPrimary:o(i,{alpha:.12}),closeColorPressedPrimary:o(i,{alpha:.18}),borderInfo:`1px solid ${o(a,{alpha:.3})}`,textColorInfo:a,colorInfo:o(a,{alpha:.12}),colorBorderedInfo:o(a,{alpha:.1}),closeIconColorInfo:a,closeIconColorHoverInfo:a,closeIconColorPressedInfo:a,closeColorHoverInfo:o(a,{alpha:.12}),closeColorPressedInfo:o(a,{alpha:.18}),borderSuccess:`1px solid ${o(s,{alpha:.3})}`,textColorSuccess:s,colorSuccess:o(s,{alpha:.12}),colorBorderedSuccess:o(s,{alpha:.1}),closeIconColorSuccess:s,closeIconColorHoverSuccess:s,closeIconColorPressedSuccess:s,closeColorHoverSuccess:o(s,{alpha:.12}),closeColorPressedSuccess:o(s,{alpha:.18}),borderWarning:`1px solid ${o(c,{alpha:.35})}`,textColorWarning:c,colorWarning:o(c,{alpha:.15}),colorBorderedWarning:o(c,{alpha:.12}),closeIconColorWarning:c,closeIconColorHoverWarning:c,closeIconColorPressedWarning:c,closeColorHoverWarning:o(c,{alpha:.12}),closeColorPressedWarning:o(c,{alpha:.18}),borderError:`1px solid ${o(l,{alpha:.23})}`,textColorError:l,colorError:o(l,{alpha:.1}),colorBorderedError:o(l,{alpha:.08}),closeIconColorError:l,closeIconColorHoverError:l,closeIconColorPressedError:l,closeColorHoverError:o(l,{alpha:.12}),closeColorPressedError:o(l,{alpha:.18})})}var E={name:`Tag`,common:_,self:T},D={color:Object,type:{type:String,default:`default`},round:Boolean,size:String,closable:Boolean,disabled:{type:Boolean,default:void 0}},O=l(`tag`,`
|
||||
--n-close-margin: var(--n-close-margin-top) var(--n-close-margin-right) var(--n-close-margin-bottom) var(--n-close-margin-left);
|
||||
white-space: nowrap;
|
||||
position: relative;
|
||||
+1
-1
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+1
-1
@@ -1 +1 @@
|
||||
import{D as e,E as t,H as n,S as r,p as i}from"./vue-router-bPs2Bq2h.js";import{t as a}from"./DocsPage-B61S0m9n.js";import{t as o}from"./HeaderMenu-Ag7dXVRR.js";var s=e({__name:`UserAgreementView`,setup(e){return(e,s)=>(n(),r(i,null,[t(a,{kind:`terms`}),t(o)],64))}});export{s as default};
|
||||
import{D as e,E as t,H as n,S as r,p as i}from"./vue-router-bPs2Bq2h.js";import{t as a}from"./DocsPage-D7pWnF5p.js";import{t as o}from"./HeaderMenu-CpXTvgBL.js";var s=e({__name:`UserAgreementView`,setup(e){return(e,s)=>(n(),r(i,null,[t(a,{kind:`terms`}),t(o)],64))}});export{s as default};
|
||||
@@ -1 +1 @@
|
||||
import{D as e,Dt as t,E as n,H as r,Q as i,S as a,T as o,W as s,b as c,it as l,lt as u,p as d,y as f}from"./vue-router-bPs2Bq2h.js";import{n as p,t as m}from"./use-message-wxnsal0S.js";import{t as h}from"./Tag-D-qK3rwp.js";import{t as g}from"./Space-BEiTYFC7.js";import{t as _}from"./Flex-C9wio4gF.js";import{i as v,n as y,t as b}from"./HeaderMenu-Ag7dXVRR.js";var x={class:`center-block-custom`},S={class:`width700`},C={class:`user-field`},w={class:`user-field`},T={class:`user-field`},E=y(e({__name:`UsersPage`,setup(e){let y=v(),E=m(),D=l([]);async function O(){let e=await y.GetUsers({});if(e.error!=``){E.error(e.error);return}D.value=e.users}O();async function k(e,t){let n=await y.AddUserRole({id:e,role:t});if(n.error!=``){E.error(n.error);return}await O()}async function A(e,t){let n=await y.DeleteUserRole({id:e,role:t});if(n.error!=``){E.error(n.error);return}await O()}return(e,l)=>(r(),a(d,null,[f(`div`,x,[f(`div`,S,[(r(!0),a(d,null,s(D.value,e=>(r(),a(`div`,{key:e.id,class:`user-block`},[f(`div`,C,`Позывной: `+t(e.username),1),f(`div`,w,`Почта: `+t(e.email),1),f(`div`,T,[n(u(g),null,{default:i(()=>[l[0]||=o(` Роли: `,-1),(r(!0),a(d,null,s(e.roles,e=>(r(),c(u(h),{bordered:!1,key:e},{default:i(()=>[o(t(e),1)]),_:2},1024))),128))]),_:2},1024)]),n(u(_),{justify:`end`,class:`roles-buttons-block`},{default:i(()=>[e.roles?.includes(`author`)?(r(),c(u(p),{key:1,onClick:t=>A(e.id,`author`)},{default:i(()=>[...l[2]||=[o(`Забрать роль автора`,-1)]]),_:1},8,[`onClick`])):(r(),c(u(p),{key:0,onClick:t=>k(e.id,`author`)},{default:i(()=>[...l[1]||=[o(`Сделать автором`,-1)]]),_:1},8,[`onClick`])),e.roles?.includes(`organizer`)?(r(),c(u(p),{key:3,onClick:t=>A(e.id,`organizer`)},{default:i(()=>[...l[4]||=[o(`Забрать роль организатора`,-1)]]),_:1},8,[`onClick`])):(r(),c(u(p),{key:2,onClick:t=>k(e.id,`organizer`)},{default:i(()=>[...l[3]||=[o(`Сделать организатором`,-1)]]),_:1},8,[`onClick`]))]),_:2},1024)]))),128))])]),n(b,{active:`users`})],64))}}),[[`__scopeId`,`data-v-7c14036f`]]),D=e({__name:`UsersView`,setup(e){return(e,t)=>(r(),c(E))}});export{D as default};
|
||||
import{D as e,Dt as t,E as n,H as r,Q as i,S as a,T as o,W as s,b as c,it as l,lt as u,p as d,y as f}from"./vue-router-bPs2Bq2h.js";import{n as p,t as m}from"./use-message-BosemArq.js";import{t as h}from"./Tag-BKP4jMs4.js";import{t as g}from"./Space-BpX6JKSK.js";import{t as _}from"./Flex-Cp_2ngpO.js";import{i as v,n as y,t as b}from"./HeaderMenu-CpXTvgBL.js";var x={class:`center-block-custom`},S={class:`width700`},C={class:`user-field`},w={class:`user-field`},T={class:`user-field`},E=y(e({__name:`UsersPage`,setup(e){let y=v(),E=m(),D=l([]);async function O(){let e=await y.GetUsers({});if(e.error!=``){E.error(e.error);return}D.value=e.users}O();async function k(e,t){let n=await y.AddUserRole({id:e,role:t});if(n.error!=``){E.error(n.error);return}await O()}async function A(e,t){let n=await y.DeleteUserRole({id:e,role:t});if(n.error!=``){E.error(n.error);return}await O()}return(e,l)=>(r(),a(d,null,[f(`div`,x,[f(`div`,S,[(r(!0),a(d,null,s(D.value,e=>(r(),a(`div`,{key:e.id,class:`user-block`},[f(`div`,C,`Позывной: `+t(e.username),1),f(`div`,w,`Почта: `+t(e.email),1),f(`div`,T,[n(u(g),null,{default:i(()=>[l[0]||=o(` Роли: `,-1),(r(!0),a(d,null,s(e.roles,e=>(r(),c(u(h),{bordered:!1,key:e},{default:i(()=>[o(t(e),1)]),_:2},1024))),128))]),_:2},1024)]),n(u(_),{justify:`end`,class:`roles-buttons-block`},{default:i(()=>[e.roles?.includes(`author`)?(r(),c(u(p),{key:1,onClick:t=>A(e.id,`author`)},{default:i(()=>[...l[2]||=[o(`Забрать роль автора`,-1)]]),_:1},8,[`onClick`])):(r(),c(u(p),{key:0,onClick:t=>k(e.id,`author`)},{default:i(()=>[...l[1]||=[o(`Сделать автором`,-1)]]),_:1},8,[`onClick`])),e.roles?.includes(`organizer`)?(r(),c(u(p),{key:3,onClick:t=>A(e.id,`organizer`)},{default:i(()=>[...l[4]||=[o(`Забрать роль организатора`,-1)]]),_:1},8,[`onClick`])):(r(),c(u(p),{key:2,onClick:t=>k(e.id,`organizer`)},{default:i(()=>[...l[3]||=[o(`Сделать организатором`,-1)]]),_:1},8,[`onClick`]))]),_:2},1024)]))),128))])]),n(b,{active:`users`})],64))}}),[[`__scopeId`,`data-v-7c14036f`]]),D=e({__name:`UsersView`,setup(e){return(e,t)=>(r(),c(E))}});export{D as default};
|
||||
@@ -1,4 +1,4 @@
|
||||
import{A as e,D as t}from"./vue-router-bPs2Bq2h.js";import{o as n}from"./HeaderMenu-Ag7dXVRR.js";var r=t({name:`Remove`,render(){return e(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 512 512`},e(`line`,{x1:`400`,y1:`256`,x2:`112`,y2:`256`,style:`
|
||||
import{A as e,D as t}from"./vue-router-bPs2Bq2h.js";import{o as n}from"./HeaderMenu-CpXTvgBL.js";var r=t({name:`Remove`,render(){return e(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 512 512`},e(`line`,{x1:`400`,y1:`256`,x2:`112`,y2:`256`,style:`
|
||||
fill: none;
|
||||
stroke: currentColor;
|
||||
stroke-linecap: round;
|
||||
+1
-1
@@ -1 +1 @@
|
||||
import{a as e,o as t}from"./HeaderMenu-Ag7dXVRR.js";function n(){let t=e();return r(t.refreshTokenAction,t.getToken)}function r(e,n){async function r(r,i){let a={},o=n();o&&(a.Authorization=`Bearer ${o}`);let s=await fetch(`${t()}/${r}`,{...i,headers:{...a,...i.headers}});if(s.status==401){await e();let o=n();o&&(a.Authorization=`Bearer ${o}`),s=await fetch(`${t()}/${r}`,{...i,headers:{...a,...i.headers}})}return s}async function o(e){let t=await r(`api/scenarios/${e}/archive`,{method:`GET`});if(!t.ok)throw Error(await a(t));return{blob:await t.blob(),filename:i(t.headers.get(`Content-Disposition`))||`scenario-${e}.zip`}}async function s(e){let t=await r(`api/scenarios/archive`,{method:`POST`,headers:{"Content-Type":e.type||`application/zip`},body:e}),n=await t.json().catch(()=>null);if(!t.ok)return{id:null,error:n?.message||`Ошибка сервера (${t.status})`};let i=typeof n?.error==`string`&&n.error!==``?n.error:null;return{id:typeof n?.id==`number`?n.id:null,error:i}}return{downloadScenarioArchive:o,uploadScenarioArchive:s}}function i(e){if(!e)return``;let t=e.match(/filename="?([^";]+)"?/i);return(t?t[1]:``).replace(/[\\/:*?"<>|]/g,`_`)}async function a(e){let t=await e.json().catch(()=>null);return t&&typeof t.message==`string`&&t.message!==``?t.message:`Ошибка сервера (${e.status})`}export{n as t};
|
||||
import{a as e,o as t}from"./HeaderMenu-CpXTvgBL.js";function n(){let t=e();return r(t.refreshTokenAction,t.getToken)}function r(e,n){async function r(r,i){let a={},o=n();o&&(a.Authorization=`Bearer ${o}`);let s=await fetch(`${t()}/${r}`,{...i,headers:{...a,...i.headers}});if(s.status==401){await e();let o=n();o&&(a.Authorization=`Bearer ${o}`),s=await fetch(`${t()}/${r}`,{...i,headers:{...a,...i.headers}})}return s}async function o(e){let t=await r(`api/scenarios/${e}/archive`,{method:`GET`});if(!t.ok)throw Error(await a(t));return{blob:await t.blob(),filename:i(t.headers.get(`Content-Disposition`))||`scenario-${e}.zip`}}async function s(e){let t=await r(`api/scenarios/archive`,{method:`POST`,headers:{"Content-Type":e.type||`application/zip`},body:e}),n=await t.json().catch(()=>null);if(!t.ok)return{id:null,error:n?.message||`Ошибка сервера (${t.status})`};let i=typeof n?.error==`string`&&n.error!==``?n.error:null;return{id:typeof n?.id==`number`?n.id:null,error:i}}return{downloadScenarioArchive:o,uploadScenarioArchive:s}}function i(e){if(!e)return``;let t=e.match(/filename="?([^";]+)"?/i);return(t?t[1]:``).replace(/[\\/:*?"<>|]/g,`_`)}async function a(e){let t=await e.json().catch(()=>null);return t&&typeof t.message==`string`&&t.message!==``?t.message:`Ошибка сервера (${e.status})`}export{n as t};
|
||||
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
|
||||
import{A as e,D as t,L as n,X as r,it as i,p as a,z as o}from"./vue-router-bPs2Bq2h.js";import{D as s,O as c,k as l}from"./Input-BoUB5066.js";import{a as u}from"./light-BY0jNPKU.js";function d(e){return typeof e==`string`?document.querySelector(e):e()||null}function f(e){return e instanceof HTMLElement}function p(e){for(let t=0;t<e.childNodes.length;t++){let n=e.childNodes[t];if(f(n)&&(h(n)||p(n)))return!0}return!1}function m(e){for(let t=e.childNodes.length-1;t>=0;t--){let n=e.childNodes[t];if(f(n)&&(h(n)||m(n)))return!0}return!1}function h(e){if(!g(e))return!1;try{e.focus({preventScroll:!0})}catch{}return document.activeElement===e}function g(e){if(e.tabIndex>0||e.tabIndex===0&&e.getAttribute(`tabIndex`)!==null)return!0;if(e.getAttribute(`disabled`))return!1;switch(e.nodeName){case`A`:return!!e.href&&e.rel!==`ignore`;case`INPUT`:return e.type!==`hidden`&&e.type!==`file`;case`SELECT`:case`TEXTAREA`:return!0;default:return!1}}var _=[],v=t({name:`FocusTrap`,props:{disabled:Boolean,active:Boolean,autoFocus:{type:Boolean,default:!0},onEsc:Function,initialFocusTo:[String,Function],finalFocusTo:[String,Function],returnFocusOnDeactivated:{type:Boolean,default:!0}},setup(e){let t=u(),a=i(null),f=i(null),h=!1,g=!1,v=typeof document>`u`?null:document.activeElement;function y(){return _[_.length-1]===t}function b(t){var n;t.code===`Escape`&&y()&&((n=e.onEsc)==null||n.call(e,t))}o(()=>{r(()=>e.active,e=>{e?(C(),c(`keydown`,document,b)):(s(`keydown`,document,b),h&&w())},{immediate:!0})}),n(()=>{s(`keydown`,document,b),h&&w()});function x(e){if(!g&&y()){let t=S();if(t===null||t.contains(l(e)))return;T(`first`)}}function S(){let e=a.value;if(e===null)return null;let t=e;for(;t=t.nextSibling,!(t===null||t instanceof Element&&t.tagName===`DIV`););return t}function C(){var n;if(!e.disabled){if(_.push(t),e.autoFocus){let{initialFocusTo:t}=e;t===void 0?T(`first`):(n=d(t))==null||n.focus({preventScroll:!0})}h=!0,document.addEventListener(`focus`,x,!0)}}function w(){var n;if(e.disabled||(document.removeEventListener(`focus`,x,!0),_=_.filter(e=>e!==t),y()))return;let{finalFocusTo:r}=e;r===void 0?e.returnFocusOnDeactivated&&v instanceof HTMLElement&&(g=!0,v.focus({preventScroll:!0}),g=!1):(n=d(r))==null||n.focus({preventScroll:!0})}function T(t){if(y()&&e.active){let e=a.value,n=f.value;if(e!==null&&n!==null){let r=S();if(r==null||r===n){g=!0,e.focus({preventScroll:!0}),g=!1;return}g=!0;let i=t===`first`?p(r):m(r);g=!1,i||(g=!0,e.focus({preventScroll:!0}),g=!1)}}}function E(e){if(g)return;let t=S();t!==null&&(e.relatedTarget!==null&&t.contains(e.relatedTarget)?T(`last`):T(`first`))}function D(e){g||(e.relatedTarget!==null&&e.relatedTarget===a.value?T(`last`):T(`first`))}return{focusableStartRef:a,focusableEndRef:f,focusableStyle:`position: absolute; height: 0; width: 0;`,handleStartFocus:E,handleEndFocus:D}},render(){let{default:t}=this.$slots;if(t===void 0)return null;if(this.disabled)return t();let{active:n,focusableStyle:r}=this;return e(a,null,[e(`div`,{"aria-hidden":`true`,tabindex:n?`0`:`-1`,ref:`focusableStartRef`,style:r,onFocus:this.handleStartFocus}),t(),e(`div`,{"aria-hidden":`true`,style:r,ref:`focusableEndRef`,tabindex:n?`0`:`-1`,onFocus:this.handleEndFocus})])}});function y(e,t=[],n){let r={};return t.forEach(t=>{r[t]=e[t]}),Object.assign(r,n)}export{v as n,y as t};
|
||||
import{A as e,D as t,L as n,X as r,it as i,p as a,z as o}from"./vue-router-bPs2Bq2h.js";import{D as s,O as c,k as l}from"./Input-CDUBW0gP.js";import{a as u}from"./light-BY0jNPKU.js";function d(e){return typeof e==`string`?document.querySelector(e):e()||null}function f(e){return e instanceof HTMLElement}function p(e){for(let t=0;t<e.childNodes.length;t++){let n=e.childNodes[t];if(f(n)&&(h(n)||p(n)))return!0}return!1}function m(e){for(let t=e.childNodes.length-1;t>=0;t--){let n=e.childNodes[t];if(f(n)&&(h(n)||m(n)))return!0}return!1}function h(e){if(!g(e))return!1;try{e.focus({preventScroll:!0})}catch{}return document.activeElement===e}function g(e){if(e.tabIndex>0||e.tabIndex===0&&e.getAttribute(`tabIndex`)!==null)return!0;if(e.getAttribute(`disabled`))return!1;switch(e.nodeName){case`A`:return!!e.href&&e.rel!==`ignore`;case`INPUT`:return e.type!==`hidden`&&e.type!==`file`;case`SELECT`:case`TEXTAREA`:return!0;default:return!1}}var _=[],v=t({name:`FocusTrap`,props:{disabled:Boolean,active:Boolean,autoFocus:{type:Boolean,default:!0},onEsc:Function,initialFocusTo:[String,Function],finalFocusTo:[String,Function],returnFocusOnDeactivated:{type:Boolean,default:!0}},setup(e){let t=u(),a=i(null),f=i(null),h=!1,g=!1,v=typeof document>`u`?null:document.activeElement;function y(){return _[_.length-1]===t}function b(t){var n;t.code===`Escape`&&y()&&((n=e.onEsc)==null||n.call(e,t))}o(()=>{r(()=>e.active,e=>{e?(C(),c(`keydown`,document,b)):(s(`keydown`,document,b),h&&w())},{immediate:!0})}),n(()=>{s(`keydown`,document,b),h&&w()});function x(e){if(!g&&y()){let t=S();if(t===null||t.contains(l(e)))return;T(`first`)}}function S(){let e=a.value;if(e===null)return null;let t=e;for(;t=t.nextSibling,!(t===null||t instanceof Element&&t.tagName===`DIV`););return t}function C(){var n;if(!e.disabled){if(_.push(t),e.autoFocus){let{initialFocusTo:t}=e;t===void 0?T(`first`):(n=d(t))==null||n.focus({preventScroll:!0})}h=!0,document.addEventListener(`focus`,x,!0)}}function w(){var n;if(e.disabled||(document.removeEventListener(`focus`,x,!0),_=_.filter(e=>e!==t),y()))return;let{finalFocusTo:r}=e;r===void 0?e.returnFocusOnDeactivated&&v instanceof HTMLElement&&(g=!0,v.focus({preventScroll:!0}),g=!1):(n=d(r))==null||n.focus({preventScroll:!0})}function T(t){if(y()&&e.active){let e=a.value,n=f.value;if(e!==null&&n!==null){let r=S();if(r==null||r===n){g=!0,e.focus({preventScroll:!0}),g=!1;return}g=!0;let i=t===`first`?p(r):m(r);g=!1,i||(g=!0,e.focus({preventScroll:!0}),g=!1)}}}function E(e){if(g)return;let t=S();t!==null&&(e.relatedTarget!==null&&t.contains(e.relatedTarget)?T(`last`):T(`first`))}function D(e){g||(e.relatedTarget!==null&&e.relatedTarget===a.value?T(`last`):T(`first`))}return{focusableStartRef:a,focusableEndRef:f,focusableStyle:`position: absolute; height: 0; width: 0;`,handleStartFocus:E,handleEndFocus:D}},render(){let{default:t}=this.$slots;if(t===void 0)return null;if(this.disabled)return t();let{active:n,focusableStyle:r}=this;return e(a,null,[e(`div`,{"aria-hidden":`true`,tabindex:n?`0`:`-1`,ref:`focusableStartRef`,style:r,onFocus:this.handleStartFocus}),t(),e(`div`,{"aria-hidden":`true`,style:r,ref:`focusableEndRef`,tabindex:n?`0`:`-1`,onFocus:this.handleEndFocus})])}});function y(e,t=[],n){let r={};return t.forEach(t=>{r[t]=e[t]}),Object.assign(r,n)}export{v as n,y as t};
|
||||
@@ -1,4 +1,4 @@
|
||||
import{A as e,D as t,v as n}from"./vue-router-bPs2Bq2h.js";import{K as r,M as i,N as a,Y as o,Z as s,r as c}from"./light-BDe84dgP.js";import{t as l}from"./use-compitable-BcHeQzgm.js";import{r as u}from"./index-Cs-VwJrb.js";var d=r(`text`,`
|
||||
import{A as e,D as t,v as n}from"./vue-router-bPs2Bq2h.js";import{K as r,M as i,N as a,Y as o,Z as s,r as c}from"./light-BDe84dgP.js";import{t as l}from"./use-compitable-BcHeQzgm.js";import{r as u}from"./index-ConzuMfl.js";var d=r(`text`,`
|
||||
transition: color .3s var(--n-bezier);
|
||||
color: var(--n-text-color);
|
||||
`,[o(`strong`,`
|
||||
@@ -1,4 +1,4 @@
|
||||
import{A as e,D as t,L as n,P as r,T as i,U as a,f as o,it as s,j as c,p as l,st as u,v as d}from"./vue-router-bPs2Bq2h.js";import{B as f,G as p,I as m,J as h,K as g,M as _,N as v,V as y,X as b,Y as x,Z as S,a as C,i as w,o as T,r as E,z as D}from"./light-BDe84dgP.js";import{a as O,n as k}from"./resolve-slot-Cp3m6n7Y.js";import{n as A,t as j}from"./call-ChHlm4-m.js";import{A as M,B as N,J as P,M as F,P as I,d as L,x as R}from"./index-Cs-VwJrb.js";var z=typeof document<`u`&&typeof window<`u`;function B(e,t=!0,n=[]){return e.forEach(e=>{if(e!==null){if(typeof e!=`object`){(typeof e==`string`||typeof e==`number`)&&n.push(i(String(e)));return}if(Array.isArray(e)){B(e,t,n);return}if(e.type===l){if(e.children===null)return;Array.isArray(e.children)&&B(e.children,t,n)}else{if(e.type===o&&t)return;n.push(e)}}}),n}var V=D(`n-form-item`);function H(e,{defaultSize:t=`medium`,mergedSize:r,mergedDisabled:i}={}){let o=c(V,null);a(V,null);let s=d(r?()=>r(o):()=>{let{size:n}=e;if(n)return n;if(o){let{mergedSize:e}=o;if(e.value!==void 0)return e.value}return t}),l=d(i?()=>i(o):()=>{let{disabled:t}=e;return t===void 0?o?o.disabled.value:!1:t}),u=d(()=>{let{status:t}=e;return t||o?.mergedValidationStatus.value});return n(()=>{o&&o.restoreValidation()}),{mergedSizeRef:s,mergedDisabledRef:l,mergedStatusRef:u,nTriggerFormBlur(){o&&o.handleContentBlur()},nTriggerFormChange(){o&&o.handleContentChange()},nTriggerFormFocus(){o&&o.handleContentFocus()},nTriggerFormInput(){o&&o.handleContentInput()}}}var{cubicBezierEaseInOut:U}=C;function W({duration:e=`.2s`,delay:t=`.1s`}={}){return[p(`&.fade-in-width-expand-transition-leave-from, &.fade-in-width-expand-transition-enter-to`,{opacity:1}),p(`&.fade-in-width-expand-transition-leave-to, &.fade-in-width-expand-transition-enter-from`,`
|
||||
import{A as e,D as t,L as n,P as r,T as i,U as a,f as o,it as s,j as c,p as l,st as u,v as d}from"./vue-router-bPs2Bq2h.js";import{B as f,G as p,I as m,J as h,K as g,M as _,N as v,V as y,X as b,Y as x,Z as S,a as C,i as w,o as T,r as E,z as D}from"./light-BDe84dgP.js";import{a as O,n as k}from"./resolve-slot-Cp3m6n7Y.js";import{n as A,t as j}from"./call-ChHlm4-m.js";import{A as M,B as N,J as P,M as F,P as I,d as L,x as R}from"./index-ConzuMfl.js";var z=typeof document<`u`&&typeof window<`u`;function B(e,t=!0,n=[]){return e.forEach(e=>{if(e!==null){if(typeof e!=`object`){(typeof e==`string`||typeof e==`number`)&&n.push(i(String(e)));return}if(Array.isArray(e)){B(e,t,n);return}if(e.type===l){if(e.children===null)return;Array.isArray(e.children)&&B(e.children,t,n)}else{if(e.type===o&&t)return;n.push(e)}}}),n}var V=D(`n-form-item`);function H(e,{defaultSize:t=`medium`,mergedSize:r,mergedDisabled:i}={}){let o=c(V,null);a(V,null);let s=d(r?()=>r(o):()=>{let{size:n}=e;if(n)return n;if(o){let{mergedSize:e}=o;if(e.value!==void 0)return e.value}return t}),l=d(i?()=>i(o):()=>{let{disabled:t}=e;return t===void 0?o?o.disabled.value:!1:t}),u=d(()=>{let{status:t}=e;return t||o?.mergedValidationStatus.value});return n(()=>{o&&o.restoreValidation()}),{mergedSizeRef:s,mergedDisabledRef:l,mergedStatusRef:u,nTriggerFormBlur(){o&&o.handleContentBlur()},nTriggerFormChange(){o&&o.handleContentChange()},nTriggerFormFocus(){o&&o.handleContentFocus()},nTriggerFormInput(){o&&o.handleContentInput()}}}var{cubicBezierEaseInOut:U}=C;function W({duration:e=`.2s`,delay:t=`.1s`}={}){return[p(`&.fade-in-width-expand-transition-leave-from, &.fade-in-width-expand-transition-enter-to`,{opacity:1}),p(`&.fade-in-width-expand-transition-leave-to, &.fade-in-width-expand-transition-enter-from`,`
|
||||
opacity: 0!important;
|
||||
margin-left: 0!important;
|
||||
margin-right: 0!important;
|
||||
File diff suppressed because one or more lines are too long
Vendored
+1
-1
@@ -5,7 +5,7 @@
|
||||
<link rel="icon" href="/favicon.ico" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>Вечерний детектив</title>
|
||||
<script type="module" crossorigin src="/assets/index-Cs-VwJrb.js"></script>
|
||||
<script type="module" crossorigin src="/assets/index-ConzuMfl.js"></script>
|
||||
<link rel="modulepreload" crossorigin href="/assets/vue-router-bPs2Bq2h.js">
|
||||
<link rel="modulepreload" crossorigin href="/assets/light-BDe84dgP.js">
|
||||
<link rel="modulepreload" crossorigin href="/assets/light-BY0jNPKU.js">
|
||||
|
||||
+28
-1
@@ -420,6 +420,18 @@ service EveningDetectiveServer {
|
||||
};
|
||||
}
|
||||
|
||||
// Видео загружается через UploadFile (MP4/WebM). Пустая conclusion удаляет закрывашку.
|
||||
rpc UpdateScenarioConclusion(UpdateScenarioConclusionReq) returns (UpdateScenarioConclusionRsp) {
|
||||
option (google.api.http) = {
|
||||
put: "/api/scenarios/{id}/conclusion"
|
||||
body: "*"
|
||||
};
|
||||
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
|
||||
tags: "Сценарии";
|
||||
summary: "Обновить закрывашку сценария (игрокам не передаётся)";
|
||||
};
|
||||
}
|
||||
|
||||
rpc DownloadScenarioArchive(DownloadScenarioArchiveReq) returns (google.api.HttpBody) {
|
||||
option (google.api.http) = {
|
||||
get: "/api/scenarios/{id}/archive"
|
||||
@@ -837,7 +849,7 @@ message UploadFileReq {
|
||||
message UploadFileRsp {
|
||||
string error = 1;
|
||||
string filename = 2;
|
||||
// Тип загруженного файла: image | pdf | audio (определяется сервером по
|
||||
// Тип загруженного файла: image | pdf | audio | video (определяется сервером по
|
||||
// содержимому). Удобен редактору для предзаполнения file_type улики.
|
||||
string file_type = 3 [json_name = "file_type"];
|
||||
}
|
||||
@@ -892,12 +904,18 @@ message Scenario {
|
||||
}
|
||||
|
||||
message Story {
|
||||
Conclusion conclusion = 5; // Только в полном сценарии, игрокам не передаётся.
|
||||
string background = 4;
|
||||
Introduction introduction = 2;
|
||||
repeated Place places = 1;
|
||||
repeated Question questions = 3;
|
||||
}
|
||||
|
||||
message Conclusion {
|
||||
string text = 1;
|
||||
string video = 2;
|
||||
}
|
||||
|
||||
message Introduction {
|
||||
string text = 1;
|
||||
string audio = 2;
|
||||
@@ -1033,6 +1051,15 @@ message DeleteScenarioPlaceRsp {
|
||||
string error = 1;
|
||||
}
|
||||
|
||||
message UpdateScenarioConclusionReq {
|
||||
int32 id = 1;
|
||||
Conclusion conclusion = 2;
|
||||
}
|
||||
|
||||
message UpdateScenarioConclusionRsp {
|
||||
string error = 1;
|
||||
}
|
||||
|
||||
message UpdateScenarioIntroReq {
|
||||
int32 id = 1;
|
||||
Introduction introduction = 2;
|
||||
|
||||
@@ -166,7 +166,7 @@ export type UploadFileReq = {
|
||||
export type UploadFileRsp = {
|
||||
error: string | undefined;
|
||||
filename: string | undefined;
|
||||
// Тип загруженного файла: image | pdf | audio (определяется сервером по
|
||||
// Тип загруженного файла: image | pdf | audio | video (определяется сервером по
|
||||
// содержимому). Удобен редактору для предзаполнения file_type улики.
|
||||
file_type: string | undefined;
|
||||
};
|
||||
@@ -206,12 +206,18 @@ export type Scenario = {
|
||||
};
|
||||
|
||||
export type Story = {
|
||||
conclusion: Conclusion | undefined;
|
||||
background: string | undefined;
|
||||
introduction: Introduction | undefined;
|
||||
places: Place[] | undefined;
|
||||
questions: Question[] | undefined;
|
||||
};
|
||||
|
||||
export type Conclusion = {
|
||||
text: string | undefined;
|
||||
video: string | undefined;
|
||||
};
|
||||
|
||||
export type Introduction = {
|
||||
text: string | undefined;
|
||||
audio: string | undefined;
|
||||
@@ -370,6 +376,15 @@ export type DeleteScenarioPlaceRsp = {
|
||||
error: string | undefined;
|
||||
};
|
||||
|
||||
export type UpdateScenarioConclusionReq = {
|
||||
id: number | undefined;
|
||||
conclusion: Conclusion | undefined;
|
||||
};
|
||||
|
||||
export type UpdateScenarioConclusionRsp = {
|
||||
error: string | undefined;
|
||||
};
|
||||
|
||||
export type UpdateScenarioIntroReq = {
|
||||
id: number | undefined;
|
||||
introduction: Introduction | undefined;
|
||||
@@ -707,6 +722,8 @@ export interface EveningDetectiveServer {
|
||||
// Загрузить файл через UploadFile, затем передать его имя; пустое имя удаляет фон дела.
|
||||
UpdateScenarioBackground(request: UpdateScenarioBackgroundReq): Promise<UpdateScenarioBackgroundRsp>;
|
||||
UpdateScenarioIntro(request: UpdateScenarioIntroReq): Promise<UpdateScenarioIntroRsp>;
|
||||
// Видео загружается через UploadFile (MP4/WebM). Пустая conclusion удаляет закрывашку.
|
||||
UpdateScenarioConclusion(request: UpdateScenarioConclusionReq): Promise<UpdateScenarioConclusionRsp>;
|
||||
DownloadScenarioArchive(request: DownloadScenarioArchiveReq): Promise<googleapi_HttpBody>;
|
||||
UploadScenarioArchive(request: googleapi_HttpBody): Promise<UploadScenarioArchiveRsp>;
|
||||
AddGame(request: AddGameReq): Promise<AddGameRsp>;
|
||||
@@ -1409,6 +1426,26 @@ export function createEveningDetectiveServerClient(
|
||||
method: "UpdateScenarioIntro",
|
||||
}) as Promise<UpdateScenarioIntroRsp>;
|
||||
},
|
||||
UpdateScenarioConclusion(request) { // eslint-disable-line @typescript-eslint/no-unused-vars
|
||||
if (!request.id) {
|
||||
throw new Error("missing required field request.id");
|
||||
}
|
||||
const path = `api/scenarios/${request.id}/conclusion`; // eslint-disable-line quotes
|
||||
const body = JSON.stringify(request);
|
||||
const queryParams: string[] = [];
|
||||
let uri = path;
|
||||
if (queryParams.length > 0) {
|
||||
uri += `?${queryParams.join("&")}`
|
||||
}
|
||||
return handler({
|
||||
path: uri,
|
||||
method: "PUT",
|
||||
body,
|
||||
}, {
|
||||
service: "EveningDetectiveServer",
|
||||
method: "UpdateScenarioConclusion",
|
||||
}) as Promise<UpdateScenarioConclusionRsp>;
|
||||
},
|
||||
DownloadScenarioArchive(request) { // eslint-disable-line @typescript-eslint/no-unused-vars
|
||||
if (!request.id) {
|
||||
throw new Error("missing required field request.id");
|
||||
|
||||
@@ -19,7 +19,7 @@ import { useRoute } from 'vue-router'
|
||||
|
||||
import { getArchiveClient } from '@/api/archive_client'
|
||||
import { getAuthClient } from '@/api/auth_client'
|
||||
import type { Scenario } from '@/api/generated/crabs/evening_detective_server'
|
||||
import type { Conclusion, Scenario } from '@/api/generated/crabs/evening_detective_server'
|
||||
import HeaderMenu from '@/components/HeaderMenu.vue'
|
||||
import IntroBlock from '@/components/IntroBlock.vue'
|
||||
import PlaceBlock from '@/components/PlaceBlock.vue'
|
||||
@@ -32,6 +32,7 @@ import type {
|
||||
EditablePlace,
|
||||
EditableQuestion,
|
||||
} from '@/types/editor'
|
||||
import { applicationFileURL } from '@/utils/application'
|
||||
|
||||
const authStore = useAuthStore()
|
||||
const client = getAuthClient()
|
||||
@@ -64,6 +65,54 @@ const savingBackground = ref(false)
|
||||
|
||||
const intro = ref<EditableIntroduction>({ text: '', audio: '' })
|
||||
const introMode = ref('show-editor')
|
||||
const conclusion = ref<Conclusion>({ text: '', video: '' })
|
||||
const conclusionFiles = ref<UploadFileInfo[]>([])
|
||||
const savingConclusion = ref(false)
|
||||
const conclusionVideoURL = computed(() => applicationFileURL(conclusion.value.video))
|
||||
|
||||
function resetConclusion() {
|
||||
conclusion.value = { text: '', video: '', ...scenario.value.story?.conclusion }
|
||||
conclusionFiles.value = []
|
||||
}
|
||||
|
||||
function removeConclusionVideo() {
|
||||
conclusion.value.video = ''
|
||||
conclusionFiles.value = []
|
||||
}
|
||||
|
||||
async function updateConclusion(remove = false) {
|
||||
savingConclusion.value = true
|
||||
try {
|
||||
let video = toRawFilename(conclusion.value.video)
|
||||
if (!remove && conclusionFiles.value.length) {
|
||||
const file = conclusionFiles.value[0].file
|
||||
if (!file) return
|
||||
const uploaded = await uploadFile(
|
||||
file,
|
||||
'scenarios_' + scenario.value.id + '_conclusion_' + file.name,
|
||||
)
|
||||
if (!uploaded.filename) return
|
||||
if (uploaded.fileType !== 'video') {
|
||||
message.error('Закрывашка должна содержать видео MP4 или WebM')
|
||||
return
|
||||
}
|
||||
video = uploaded.filename
|
||||
}
|
||||
const saved = remove ? { text: '', video: '' } : { text: conclusion.value.text, video }
|
||||
const res = await client.UpdateScenarioConclusion({ id: scenario.value.id, conclusion: saved })
|
||||
if (res.error) {
|
||||
message.error(res.error!)
|
||||
return
|
||||
}
|
||||
scenario.value.story!.conclusion = saved
|
||||
resetConclusion()
|
||||
message.success(remove ? 'Закрывашка удалена' : 'Закрывашка сохранена')
|
||||
} catch {
|
||||
message.error('Не удалось сохранить закрывашку')
|
||||
} finally {
|
||||
savingConclusion.value = false
|
||||
}
|
||||
}
|
||||
|
||||
// Точки сценария со служебными полями редактора (oldCode, mode, fileList)
|
||||
const editorPlaces = computed<EditablePlace[]>(() => {
|
||||
@@ -82,6 +131,7 @@ async function getScenario(id: number) {
|
||||
return
|
||||
}
|
||||
scenario.value = res.scenario!
|
||||
resetConclusion()
|
||||
scenario.value.story?.places?.forEach((item) => {
|
||||
const editable = item as EditablePlace
|
||||
editable.oldCode = editable.code
|
||||
@@ -195,7 +245,7 @@ async function uploadFile(file: File | null, filename: string): Promise<UploadFi
|
||||
return { filename: '', fileType: '' }
|
||||
}
|
||||
|
||||
// file_type возвращает сервер по содержимому файла (image | pdf | audio) —
|
||||
// file_type возвращает сервер по содержимому файла (image | pdf | audio | video) —
|
||||
// редактор сохраняет его на улике.
|
||||
return {
|
||||
filename: resUploadFile.filename || '',
|
||||
@@ -621,6 +671,58 @@ function getRandomComplimentForNastya() {
|
||||
</n-flex>
|
||||
</IntroBlock>
|
||||
|
||||
<n-card title="Закрывашка сценария">
|
||||
<n-space vertical>
|
||||
<n-text depth="3">Разгадка дела для автора. Игрокам не показывается.</n-text>
|
||||
<n-input
|
||||
v-model:value="conclusion.text"
|
||||
type="textarea"
|
||||
:autosize="{ minRows: 4, maxRows: 12 }"
|
||||
placeholder="Текст закрывашки"
|
||||
aria-label="Текст закрывашки"
|
||||
:disabled="savingConclusion"
|
||||
/>
|
||||
<video
|
||||
v-if="conclusionVideoURL"
|
||||
:src="conclusionVideoURL"
|
||||
controls
|
||||
preload="none"
|
||||
class="conclusion-video"
|
||||
aria-label="Видео закрывашки"
|
||||
></video>
|
||||
<n-button
|
||||
v-if="conclusion.video"
|
||||
:disabled="savingConclusion"
|
||||
@click="removeConclusionVideo()"
|
||||
>Убрать видео</n-button
|
||||
>
|
||||
<n-upload
|
||||
v-model:file-list="conclusionFiles"
|
||||
accept=".mp4,.webm"
|
||||
:max="1"
|
||||
:default-upload="false"
|
||||
:disabled="savingConclusion"
|
||||
>
|
||||
<n-button :disabled="savingConclusion">Выбрать видео MP4/WebM</n-button>
|
||||
</n-upload>
|
||||
<n-flex justify="end">
|
||||
<n-button
|
||||
v-if="scenario.story?.conclusion?.text || scenario.story?.conclusion?.video"
|
||||
:disabled="savingConclusion"
|
||||
@click="updateConclusion(true)"
|
||||
>Удалить закрывашку</n-button
|
||||
>
|
||||
<n-button :disabled="savingConclusion" @click="resetConclusion()">Отмена</n-button>
|
||||
<n-button
|
||||
:loading="savingConclusion"
|
||||
:disabled="savingConclusion || !scenario.story"
|
||||
@click="updateConclusion()"
|
||||
>Сохранить закрывашку</n-button
|
||||
>
|
||||
</n-flex>
|
||||
</n-space>
|
||||
</n-card>
|
||||
|
||||
<div class="questions-header">Вопросы дела</div>
|
||||
|
||||
<QuestionBlock
|
||||
@@ -817,6 +919,10 @@ function getRandomComplimentForNastya() {
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
.conclusion-video {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.background-preview {
|
||||
max-height: 200px;
|
||||
max-width: 100%;
|
||||
|
||||
@@ -0,0 +1,98 @@
|
||||
// Run: node tests/conclusion.mjs
|
||||
import assert from 'node:assert/strict'
|
||||
import { readFileSync } from 'node:fs'
|
||||
import { runInNewContext } from 'node:vm'
|
||||
|
||||
import ts from 'typescript'
|
||||
import { compileTemplate, parse } from 'vue/compiler-sfc'
|
||||
|
||||
const source = readFileSync(
|
||||
new URL('../src/components/ScenariosEditorPage.vue', import.meta.url),
|
||||
'utf8',
|
||||
)
|
||||
const { descriptor, errors: parseErrors } = parse(source)
|
||||
assert.deepEqual(parseErrors, [])
|
||||
const template = compileTemplate({
|
||||
source: descriptor.template.content,
|
||||
filename: 'ScenariosEditorPage.vue',
|
||||
id: 'test',
|
||||
})
|
||||
assert.deepEqual(template.errors, [])
|
||||
const functions = ['resetConclusion', 'removeConclusionVideo', 'updateConclusion', 'toRawFilename']
|
||||
.map((name) => source.match(new RegExp(`(?:async )?function ${name}\\([^]*?\\n}`))[0])
|
||||
.join('\n')
|
||||
const calls = []
|
||||
const errors = []
|
||||
let upload = { filename: 'ending.mp4', fileType: 'video' }
|
||||
let response = {}
|
||||
const state = {
|
||||
scenario: { value: { id: 1, story: { conclusion: { text: 'Saved', video: 'old.mp4' } } } },
|
||||
conclusion: { value: { text: 'Draft', video: 'https://example.org/old.mp4' } },
|
||||
conclusionFiles: { value: [] },
|
||||
savingConclusion: { value: false },
|
||||
uploadFile: async () => upload,
|
||||
client: {
|
||||
UpdateScenarioConclusion: async (request) => {
|
||||
calls.push(request)
|
||||
return response
|
||||
},
|
||||
},
|
||||
message: { error: (error) => errors.push(error), success: () => {} },
|
||||
}
|
||||
runInNewContext(ts.transpile(functions, { target: ts.ScriptTarget.ES2022 }), state)
|
||||
await state.updateConclusion()
|
||||
assert.equal(calls.at(-1).conclusion.video, 'old.mp4')
|
||||
assert.equal(state.scenario.value.story.conclusion.text, 'Draft')
|
||||
|
||||
state.conclusionFiles.value = [{ file: { name: 'ending.mp4' } }]
|
||||
await state.updateConclusion()
|
||||
assert.equal(calls.at(-1).conclusion.video, 'ending.mp4')
|
||||
assert.equal(state.conclusionFiles.value.length, 0)
|
||||
|
||||
state.conclusionFiles.value = [{ file: { name: 'replacement.mp4' } }]
|
||||
state.removeConclusionVideo()
|
||||
assert.equal(state.conclusion.value.video, '')
|
||||
assert.equal(state.conclusionFiles.value.length, 0)
|
||||
assert.equal(state.scenario.value.story.conclusion.video, 'ending.mp4')
|
||||
|
||||
state.conclusion.value.text = 'Unsaved'
|
||||
state.resetConclusion()
|
||||
assert.equal(state.conclusion.value.text, 'Draft')
|
||||
|
||||
state.conclusionFiles.value = [{ file: { name: 'bad.png' } }]
|
||||
for (const invalid of [
|
||||
{ filename: '', fileType: '' },
|
||||
{ filename: 'bad.png', fileType: 'image' },
|
||||
]) {
|
||||
upload = invalid
|
||||
const count = calls.length
|
||||
await state.updateConclusion()
|
||||
assert.equal(calls.length, count)
|
||||
assert.equal(state.conclusionFiles.value.length, 1)
|
||||
assert.equal(state.savingConclusion.value, false)
|
||||
}
|
||||
|
||||
state.conclusionFiles.value = []
|
||||
state.conclusion.value.text = 'Keep draft'
|
||||
response = { error: 'Denied' }
|
||||
await state.updateConclusion()
|
||||
assert.equal(state.conclusion.value.text, 'Keep draft')
|
||||
assert.equal(state.scenario.value.story.conclusion.text, 'Draft')
|
||||
assert.equal(errors.at(-1), 'Denied')
|
||||
|
||||
state.client.UpdateScenarioConclusion = async () => {
|
||||
throw new Error('Offline')
|
||||
}
|
||||
await state.updateConclusion()
|
||||
assert.equal(state.savingConclusion.value, false)
|
||||
assert.equal(state.conclusion.value.text, 'Keep draft')
|
||||
|
||||
state.client.UpdateScenarioConclusion = async (request) => {
|
||||
calls.push(request)
|
||||
return {}
|
||||
}
|
||||
await state.updateConclusion(true)
|
||||
assert.equal(calls.at(-1).conclusion.text, '')
|
||||
assert.equal(calls.at(-1).conclusion.video, '')
|
||||
assert.equal(state.conclusion.value.text, '')
|
||||
console.log('Conclusion: save, upload, cancel, validation, errors and deletion passed')
|
||||
Reference in New Issue
Block a user