Files
prod/frontend/dist/assets/PlaceBlock-E3YDUB9T.js
2026-10-27 22:40:37 +07:00

207 lines
42 KiB
JavaScript

import{At as e,Cn as t,Ct as n,Dt as r,Hn as i,It as a,Pt as o,Qt as s,Sn as c,St as l,Tn as u,Tt as d,U as f,Un as p,Vn as m,W as h,X as g,Xt as _,Yt as v,Z as y,Zt as b,_ as x,at as S,cn as C,ct as w,f as T,fn as E,gt as D,h as O,jt as k,kt as A,m as j,nt as M,ot as N,p as P,r as ee,rt as F,st as I,wt as L,xt as R,yn as z}from"./client-Be0b5AZU.js";import{a as B,c as V,i as te,n as ne}from"./ui-DePKLhY8.js";import{i as re}from"./Suffix-LrhQ5FSC.js";import{t as ie}from"./Modal-NIBfo4YE.js";import{t as ae}from"./use-merged-state-DltLwRXB.js";import{r as oe,t as H}from"./Button-B0cBJTB7.js";import{a as se,c as U,i as ce,o as W,r as le,t as ue}from"./_plugin-vue_export-helper-C_Iw6R3j.js";import{n as de,t as fe}from"./Upload-DzBLiGw0.js";import{n as pe,t as me}from"./use-form-item-DRm_M51j.js";import{t as he}from"./Add-Ze6Y1L3B.js";import{t as G}from"./Input-CVjrphZx.js";import{t as ge}from"./Remove-Bax1fA0y.js";import{t as _e}from"./Card-2FpXQWHo.js";import{t as K}from"./Space-DM1L-JDA.js";import{t as ve}from"./text-C5pf6EwB.js";import{G as ye,N as be,Q as q,V as xe,Z as Se,d as Ce,j as we,mt as J,ot as Te,y as Ee}from"./index-DpxjEbFc.js";import{n as Y,r as X,t as De}from"./application-T8uHIr7B.js";import{t as Oe}from"./MessagePaper-rRZLlad3.js";var ke=k({name:`ArrowDown`,render(){return o(`svg`,{viewBox:`0 0 28 28`,version:`1.1`,xmlns:`http://www.w3.org/2000/svg`},o(`g`,{stroke:`none`,"stroke-width":`1`,"fill-rule":`evenodd`},o(`g`,{"fill-rule":`nonzero`},o(`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`}))))}}),Ae=k({name:`ArrowUp`,render(){return o(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 20 20`},o(`g`,{fill:`none`},o(`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`})))}}),je=F(`input-group`,`
display: inline-flex;
width: 100%;
flex-wrap: nowrap;
vertical-align: bottom;
`,[M(`>`,[F(`input`,[M(`&:not(:last-child)`,`
border-top-right-radius: 0!important;
border-bottom-right-radius: 0!important;
`),M(`&:not(:first-child)`,`
border-top-left-radius: 0!important;
border-bottom-left-radius: 0!important;
margin-left: -1px!important;
`)]),F(`button`,[M(`&:not(:last-child)`,`
border-top-right-radius: 0!important;
border-bottom-right-radius: 0!important;
`,[S(`state-border, border`,`
border-top-right-radius: 0!important;
border-bottom-right-radius: 0!important;
`)]),M(`&:not(:first-child)`,`
border-top-left-radius: 0!important;
border-bottom-left-radius: 0!important;
`,[S(`state-border, border`,`
border-top-left-radius: 0!important;
border-bottom-left-radius: 0!important;
`)])]),M(`*`,[M(`&:not(:last-child)`,`
border-top-right-radius: 0!important;
border-bottom-right-radius: 0!important;
`,[M(`>`,[F(`input`,`
border-top-right-radius: 0!important;
border-bottom-right-radius: 0!important;
`),F(`base-selection`,[F(`base-selection-label`,`
border-top-right-radius: 0!important;
border-bottom-right-radius: 0!important;
`),F(`base-selection-tags`,`
border-top-right-radius: 0!important;
border-bottom-right-radius: 0!important;
`),S(`box-shadow, border, state-border`,`
border-top-right-radius: 0!important;
border-bottom-right-radius: 0!important;
`)])])]),M(`&:not(:first-child)`,`
margin-left: -1px!important;
border-top-left-radius: 0!important;
border-bottom-left-radius: 0!important;
`,[M(`>`,[F(`input`,`
border-top-left-radius: 0!important;
border-bottom-left-radius: 0!important;
`),F(`base-selection`,[F(`base-selection-label`,`
border-top-left-radius: 0!important;
border-bottom-left-radius: 0!important;
`),F(`base-selection-tags`,`
border-top-left-radius: 0!important;
border-bottom-left-radius: 0!important;
`),S(`box-shadow, border, state-border`,`
border-top-left-radius: 0!important;
border-bottom-left-radius: 0!important;
`)])])])])])]),Me=k({name:`InputGroup`,props:{},setup(e){let{mergedClsPrefixRef:t}=h(e);return O(`-input-group`,je,t),{mergedClsPrefix:t}},render(){let{mergedClsPrefix:e}=this;return o(`div`,{class:`${e}-input-group`},this.$slots)}}),Z=`0!important`,Ne=`-1px!important`;function Q(e){return N(`${e}-type`,[M(`& +`,[F(`button`,{},[N(`${e}-type`,[S(`border`,{borderLeftWidth:Z}),S(`state-border`,{left:Ne})])])])])}function $(e){return N(`${e}-type`,[M(`& +`,[F(`button`,[N(`${e}-type`,[S(`border`,{borderTopWidth:Z}),S(`state-border`,{top:Ne})])])])])}var Pe=F(`button-group`,`
flex-wrap: nowrap;
display: inline-flex;
position: relative;
`,[I(`vertical`,{flexDirection:`row`},[I(`rtl`,[F(`button`,[M(`&:first-child:not(:last-child)`,`
margin-right: ${Z};
border-top-right-radius: ${Z};
border-bottom-right-radius: ${Z};
`),M(`&:last-child:not(:first-child)`,`
margin-left: ${Z};
border-top-left-radius: ${Z};
border-bottom-left-radius: ${Z};
`),M(`&:not(:first-child):not(:last-child)`,`
margin-left: ${Z};
margin-right: ${Z};
border-radius: ${Z};
`),Q(`default`),N(`ghost`,[Q(`primary`),Q(`info`),Q(`success`),Q(`warning`),Q(`error`)])])])]),N(`vertical`,{flexDirection:`column`},[F(`button`,[M(`&:first-child:not(:last-child)`,`
margin-bottom: ${Z};
margin-left: ${Z};
margin-right: ${Z};
border-bottom-left-radius: ${Z};
border-bottom-right-radius: ${Z};
`),M(`&:last-child:not(:first-child)`,`
margin-top: ${Z};
margin-left: ${Z};
margin-right: ${Z};
border-top-left-radius: ${Z};
border-top-right-radius: ${Z};
`),M(`&:not(:first-child):not(:last-child)`,`
margin: ${Z};
border-radius: ${Z};
`),$(`default`),N(`ghost`,[$(`primary`),$(`info`),$(`success`),$(`warning`),$(`error`)])])])]),Fe=k({name:`ButtonGroup`,props:{size:String,vertical:Boolean},setup(e){let{mergedClsPrefixRef:t,mergedRtlRef:n}=h(e);return O(`-button-group`,Pe,t),_(oe,e),{rtlEnabled:x(`ButtonGroup`,n,t),mergedClsPrefix:t}},render(){let{mergedClsPrefix:e}=this;return o(`div`,{class:[`${e}-button-group`,this.rtlEnabled&&`${e}-button-group--rtl`,this.vertical&&`${e}-button-group--vertical`],role:`group`},this.$slots)}});function Ie(){return Ee}var Le=P({name:`DynamicInput`,common:T,peers:{Input:be,Button:we},self:Ie}),Re=g(`n-dynamic-input`),ze=k({name:`DynamicInputInputPreset`,props:{clsPrefix:{type:String,required:!0},value:{type:String,default:``},disabled:Boolean,parentPath:String,path:String,onUpdateValue:{type:Function,required:!0}},setup(){let{mergedThemeRef:e,placeholderRef:t}=a(Re);return{mergedTheme:e,placeholder:t}},render(){let{mergedTheme:e,placeholder:t,value:n,clsPrefix:r,onUpdateValue:i,disabled:a}=this;return o(`div`,{class:`${r}-dynamic-input-preset-input`},o(G,{theme:e.peers.Input,"theme-overrides":e.peerOverrides.Input,value:n,placeholder:t,onUpdateValue:i,disabled:a}))}}),Be=k({name:`DynamicInputPairPreset`,props:{clsPrefix:{type:String,required:!0},value:{type:Object,default:()=>({key:``,value:``})},disabled:Boolean,parentPath:String,path:String,onUpdateValue:{type:Function,required:!0}},setup(e){let{mergedThemeRef:t,keyPlaceholderRef:n,valuePlaceholderRef:r}=a(Re);return{mergedTheme:t,keyPlaceholder:n,valuePlaceholder:r,handleKeyInput(t){e.onUpdateValue({key:t,value:e.value.value})},handleValueInput(t){e.onUpdateValue({key:e.value.key,value:t})}}},render(){let{mergedTheme:e,keyPlaceholder:t,valuePlaceholder:n,value:r,clsPrefix:i,disabled:a}=this;return o(`div`,{class:`${i}-dynamic-input-preset-pair`},o(G,{theme:e.peers.Input,"theme-overrides":e.peerOverrides.Input,value:r.key,class:`${i}-dynamic-input-pair-input`,placeholder:t,onUpdateValue:this.handleKeyInput,disabled:a}),o(G,{theme:e.peers.Input,"theme-overrides":e.peerOverrides.Input,value:r.value,class:`${i}-dynamic-input-pair-input`,placeholder:n,onUpdateValue:this.handleValueInput,disabled:a}))}}),Ve=F(`dynamic-input`,{width:`100%`},[F(`dynamic-input-item`,`
margin-bottom: 10px;
display: flex;
flex-wrap: nowrap;
`,[F(`dynamic-input-preset-input`,{flex:1,alignItems:`center`}),F(`dynamic-input-preset-pair`,`
flex: 1;
display: flex;
align-items: center;
`,[F(`dynamic-input-pair-input`,[M(`&:first-child`,{"margin-right":`12px`})])]),S(`action`,`
align-self: flex-start;
display: flex;
justify-content: flex-end;
flex-shrink: 0;
flex-grow: 0;
margin: var(--action-margin);
`,[N(`icon`,{cursor:`pointer`})]),M(`&:last-child`,{marginBottom:0})]),F(`form-item`,`
padding-top: 0 !important;
margin-right: 0 !important;
`,[F(`form-item-blank`,{paddingTop:`0 !important`})])]),He=new WeakMap,Ue=k({name:`DynamicInput`,props:Object.assign(Object.assign({},j.props),{max:Number,min:{type:Number,default:0},value:Array,defaultValue:{type:Array,default:()=>[]},preset:{type:String,default:`input`},keyField:String,itemClass:String,itemStyle:[String,Object],keyPlaceholder:{type:String,default:``},valuePlaceholder:{type:String,default:``},placeholder:{type:String,default:``},disabled:Boolean,showSortButton:Boolean,createButtonProps:Object,onCreate:Function,onRemove:Function,"onUpdate:value":[Function,Array],onUpdateValue:[Function,Array],onClear:Function,onInput:[Function,Array]}),setup(e,{slots:n}){let{mergedComponentPropsRef:r,mergedClsPrefixRef:i,mergedRtlRef:o,inlineThemeDisabled:s}=h(),l=a(me,null),u=z(e.defaultValue),d=ae(t(e,`value`),u),p=j(`DynamicInput`,`-dynamic-input`,Ve,Le,e,i),m=R(()=>{let{value:t}=d;if(Array.isArray(t)){let{max:n}=e;return n!==void 0&&t.length>=n}return!1}),g=R(()=>{let{value:t}=d;return Array.isArray(t)?t.length<=e.min:!0}),v=R(()=>r?.value?.DynamicInput?.buttonSize);function y(t){let{onInput:n,"onUpdate:value":r,onUpdateValue:i}=e;n&&U(n,t),r&&U(r,t),i&&U(i,t),u.value=t}function b(e,t){if(typeof e!=`object`||!e)return t;let n=E(e)?c(e):e,r=He.get(n);return r===void 0&&He.set(n,r=Te()),r}function S(e,t){let{value:n}=d,r=Array.from(n??[]),i=r[e];if(r[e]=t,i&&t&&typeof i==`object`&&typeof t==`object`){let e=E(i)?c(i):i,n=E(t)?c(t):t,r=He.get(e);r!==void 0&&He.set(n,r)}y(r)}function C(){w(-1)}function w(t){let{value:r}=d,{onCreate:i}=e,a=Array.from(r??[]);if(i)a.splice(t+1,0,i(t+1)),y(a);else if(n.default)a.splice(t+1,0,null),y(a);else switch(e.preset){case`input`:a.splice(t+1,0,``),y(a);break;case`pair`:a.splice(t+1,0,{key:``,value:``}),y(a);break}}function T(t){let{value:n}=d;if(!Array.isArray(n))return;let{min:r}=e;if(n.length<=r)return;let{onRemove:i}=e;i&&i(t);let a=Array.from(n);a.splice(t,1),y(a)}function D(e,t,n){if(t<0||n<0||t>=e.length||n>=e.length||t===n)return;let r=e[t];e[t]=e[n],e[n]=r}function O(e,t){let{value:n}=d;if(!Array.isArray(n))return;let r=Array.from(n);e===`up`&&D(r,t,t-1),e===`down`&&D(r,t,t+1),y(r)}_(Re,{mergedThemeRef:p,keyPlaceholderRef:t(e,`keyPlaceholder`),valuePlaceholderRef:t(e,`valuePlaceholder`),placeholderRef:t(e,`placeholder`)});let k=x(`DynamicInput`,o,i),A=R(()=>{let{self:{actionMargin:e,actionMarginRtl:t}}=p.value;return{"--action-margin":e,"--action-margin-rtl":t}}),M=s?f(`dynamic-input`,void 0,A,e):void 0;return{locale:re(`DynamicInput`).localeRef,rtlEnabled:k,buttonSize:v,mergedClsPrefix:i,NFormItem:l,uncontrolledValue:u,mergedValue:d,insertionDisabled:m,removeDisabled:g,handleCreateClick:C,ensureKey:b,handleValueChange:S,remove:T,move:O,createItem:w,mergedTheme:p,cssVars:s?void 0:A,themeClass:M?.themeClass,onRender:M?.onRender}},render(){let{$slots:e,itemClass:t,buttonSize:n,mergedClsPrefix:r,mergedValue:i,locale:a,mergedTheme:s,keyField:c,itemStyle:l,preset:u,showSortButton:d,NFormItem:f,ensureKey:p,handleValueChange:m,remove:h,createItem:g,move:_,onRender:v,disabled:y}=this;return v?.(),o(`div`,{class:[`${r}-dynamic-input`,this.rtlEnabled&&`${r}-dynamic-input--rtl`,this.themeClass],style:this.cssVars},!Array.isArray(i)||i.length===0?o(H,Object.assign({block:!0,ghost:!0,dashed:!0,size:n},this.createButtonProps,{disabled:this.insertionDisabled||y,theme:s.peers.Button,themeOverrides:s.peerOverrides.Button,onClick:this.handleCreateClick}),{default:()=>ce(e[`create-button-default`],()=>[a.create]),icon:()=>ce(e[`create-button-icon`],()=>[o(q,{clsPrefix:r},{default:()=>o(he,null)})])}):i.map((a,v)=>o(`div`,{key:c?a[c]:p(a,v),"data-key":c?a[c]:p(a,v),class:[`${r}-dynamic-input-item`,t],style:l},se(e.default,{value:i[v],index:v},()=>[u===`input`?o(ze,{disabled:y,clsPrefix:r,value:i[v],parentPath:f?f.path.value:void 0,path:f?.path.value?`${f.path.value}[${v}]`:void 0,onUpdateValue:e=>{m(v,e)}}):u===`pair`?o(Be,{disabled:y,clsPrefix:r,value:i[v],parentPath:f?f.path.value:void 0,path:f?.path.value?`${f.path.value}[${v}]`:void 0,onUpdateValue:e=>{m(v,e)}}):null]),se(e.action,{value:i[v],index:v,create:g,remove:h,move:_},()=>[o(`div`,{class:`${r}-dynamic-input-item__action`},o(Fe,{size:n},{default:()=>[o(H,{disabled:this.removeDisabled||y,theme:s.peers.Button,themeOverrides:s.peerOverrides.Button,circle:!0,onClick:()=>{h(v)}},{icon:()=>o(q,{clsPrefix:r},{default:()=>o(ge,null)})}),o(H,{disabled:this.insertionDisabled||y,circle:!0,theme:s.peers.Button,themeOverrides:s.peerOverrides.Button,onClick:()=>{g(v)}},{icon:()=>o(q,{clsPrefix:r},{default:()=>o(he,null)})}),d?o(H,{disabled:v===0||y,circle:!0,theme:s.peers.Button,themeOverrides:s.peerOverrides.Button,onClick:()=>{_(`up`,v)}},{icon:()=>o(q,{clsPrefix:r},{default:()=>o(Ae,null)})}):null,d?o(H,{disabled:v===i.length-1||y,circle:!0,theme:s.peers.Button,themeOverrides:s.peerOverrides.Button,onClick:()=>{_(`down`,v)}},{icon:()=>o(q,{clsPrefix:r},{default:()=>o(ke,null)})}):null]}))]))))}});function We(e){let{primaryColor:t,opacityDisabled:n,borderRadius:r,textColor3:i}=e;return Object.assign(Object.assign({},Ce),{iconColor:i,textColor:`white`,loadingColor:t,opacityDisabled:n,railColor:`rgba(0, 0, 0, .14)`,railColorActive:t,buttonBoxShadow:`0 1px 4px 0 rgba(0, 0, 0, 0.3), inset 0 0 1px 0 rgba(0, 0, 0, 0.05)`,buttonColor:`#FFF`,railBorderRadiusSmall:r,railBorderRadiusMedium:r,railBorderRadiusLarge:r,buttonBorderRadiusSmall:r,buttonBorderRadiusMedium:r,buttonBorderRadiusLarge:r,boxShadowFocus:`0 0 0 2px ${y(t,{alpha:.2})}`})}var Ge={name:`Switch`,common:T,self:We},Ke=F(`switch`,`
height: var(--n-height);
min-width: var(--n-width);
vertical-align: middle;
user-select: none;
-webkit-user-select: none;
display: inline-flex;
outline: none;
justify-content: center;
align-items: center;
`,[S(`children-placeholder`,`
height: var(--n-rail-height);
display: flex;
flex-direction: column;
overflow: hidden;
pointer-events: none;
visibility: hidden;
`),S(`rail-placeholder`,`
display: flex;
flex-wrap: none;
`),S(`button-placeholder`,`
width: calc(1.75 * var(--n-rail-height));
height: var(--n-rail-height);
`),F(`base-loading`,`
position: absolute;
top: 50%;
left: 50%;
transform: translateX(-50%) translateY(-50%);
font-size: calc(var(--n-button-width) - 4px);
color: var(--n-loading-color);
transition: color .3s var(--n-bezier);
`,[ye({left:`50%`,top:`50%`,originalTransform:`translateX(-50%) translateY(-50%)`})]),S(`checked, unchecked`,`
transition: color .3s var(--n-bezier);
color: var(--n-text-color);
box-sizing: border-box;
position: absolute;
white-space: nowrap;
top: 0;
bottom: 0;
display: flex;
align-items: center;
line-height: 1;
`),S(`checked`,`
right: 0;
padding-right: calc(1.25 * var(--n-rail-height) - var(--n-offset));
`),S(`unchecked`,`
left: 0;
justify-content: flex-end;
padding-left: calc(1.25 * var(--n-rail-height) - var(--n-offset));
`),M(`&:focus`,[S(`rail`,`
box-shadow: var(--n-box-shadow-focus);
`)]),N(`round`,[S(`rail`,`border-radius: calc(var(--n-rail-height) / 2);`,[S(`button`,`border-radius: calc(var(--n-button-height) / 2);`)])]),I(`disabled`,[I(`icon`,[N(`rubber-band`,[N(`pressed`,[S(`rail`,[S(`button`,`max-width: var(--n-button-width-pressed);`)])]),S(`rail`,[M(`&:active`,[S(`button`,`max-width: var(--n-button-width-pressed);`)])]),N(`active`,[N(`pressed`,[S(`rail`,[S(`button`,`left: calc(100% - var(--n-offset) - var(--n-button-width-pressed));`)])]),S(`rail`,[M(`&:active`,[S(`button`,`left: calc(100% - var(--n-offset) - var(--n-button-width-pressed));`)])])])])])]),N(`active`,[S(`rail`,[S(`button`,`left: calc(100% - var(--n-button-width) - var(--n-offset))`)])]),S(`rail`,`
overflow: hidden;
height: var(--n-rail-height);
min-width: var(--n-rail-width);
border-radius: var(--n-rail-border-radius);
cursor: pointer;
position: relative;
transition:
opacity .3s var(--n-bezier),
background .3s var(--n-bezier),
box-shadow .3s var(--n-bezier);
background-color: var(--n-rail-color);
`,[S(`button-icon`,`
color: var(--n-icon-color);
transition: color .3s var(--n-bezier);
font-size: calc(var(--n-button-height) - 4px);
position: absolute;
left: 0;
right: 0;
top: 0;
bottom: 0;
display: flex;
justify-content: center;
align-items: center;
line-height: 1;
`,[ye()]),S(`button`,`
align-items: center;
top: var(--n-offset);
left: var(--n-offset);
height: var(--n-button-height);
width: var(--n-button-width-pressed);
max-width: var(--n-button-width);
border-radius: var(--n-button-border-radius);
background-color: var(--n-button-color);
box-shadow: var(--n-button-box-shadow);
box-sizing: border-box;
cursor: inherit;
content: "";
position: absolute;
transition:
background-color .3s var(--n-bezier),
left .3s var(--n-bezier),
opacity .3s var(--n-bezier),
max-width .3s var(--n-bezier),
box-shadow .3s var(--n-bezier);
`)]),N(`active`,[S(`rail`,`background-color: var(--n-rail-color-active);`)]),N(`loading`,[S(`rail`,`
cursor: wait;
`)]),N(`disabled`,[S(`rail`,`
cursor: not-allowed;
opacity: .5;
`)])]),qe=Object.assign(Object.assign({},j.props),{size:String,value:{type:[String,Number,Boolean],default:void 0},loading:Boolean,defaultValue:{type:[String,Number,Boolean],default:!1},disabled:{type:Boolean,default:void 0},round:{type:Boolean,default:!0},"onUpdate:value":[Function,Array],onUpdateValue:[Function,Array],checkedValue:{type:[String,Number,Boolean],default:!0},uncheckedValue:{type:[String,Number,Boolean],default:!1},railStyle:Function,rubberBand:{type:Boolean,default:!0},spinProps:Object,onChange:[Function,Array]}),Je,Ye=k({name:`Switch`,props:qe,slots:Object,setup(e){Je===void 0&&(Je=typeof CSS<`u`?CSS.supports===void 0?!1:CSS.supports(`width`,`max(1px)`):!0);let{mergedClsPrefixRef:n,inlineThemeDisabled:r,mergedComponentPropsRef:i}=h(e),a=j(`Switch`,`-switch`,Ke,Ge,e,n),o=pe(e,{mergedSize(t){return e.size===void 0?t?t.mergedSize.value:i?.value?.Switch?.size||`medium`:e.size}}),{mergedSizeRef:s,mergedDisabledRef:c}=o,l=z(e.defaultValue),u=ae(t(e,`value`),l),d=R(()=>u.value===e.checkedValue),p=z(!1),m=z(!1),g=R(()=>{let{railStyle:t}=e;if(t)return t({focused:m.value,checked:d.value})});function _(t){let{"onUpdate:value":n,onChange:r,onUpdateValue:i}=e,{nTriggerFormInput:a,nTriggerFormChange:s}=o;n&&U(n,t),i&&U(i,t),r&&U(r,t),l.value=t,a(),s()}function v(){let{nTriggerFormFocus:e}=o;e()}function y(){let{nTriggerFormBlur:e}=o;e()}function b(){e.loading||c.value||(u.value===e.checkedValue?_(e.uncheckedValue):_(e.checkedValue))}function x(){m.value=!0,v()}function S(){m.value=!1,y(),p.value=!1}function C(t){e.loading||c.value||t.key===` `&&(u.value===e.checkedValue?_(e.uncheckedValue):_(e.checkedValue),p.value=!1)}function T(t){e.loading||c.value||t.key===` `&&(t.preventDefault(),p.value=!0)}let E=R(()=>{let{value:e}=s,{self:{opacityDisabled:t,railColor:n,railColorActive:r,buttonBoxShadow:i,buttonColor:o,boxShadowFocus:c,loadingColor:l,textColor:u,iconColor:d,[w(`buttonHeight`,e)]:f,[w(`buttonWidth`,e)]:p,[w(`buttonWidthPressed`,e)]:m,[w(`railHeight`,e)]:h,[w(`railWidth`,e)]:g,[w(`railBorderRadius`,e)]:_,[w(`buttonBorderRadius`,e)]:v},common:{cubicBezierEaseInOut:y}}=a.value,b,x,S;return Je?(b=`calc((${h} - ${f}) / 2)`,x=`max(${h}, ${f})`,S=`max(${g}, calc(${g} + ${f} - ${h}))`):(b=V((B(h)-B(f))/2),x=V(Math.max(B(h),B(f))),S=B(h)>B(f)?g:V(B(g)+B(f)-B(h))),{"--n-bezier":y,"--n-button-border-radius":v,"--n-button-box-shadow":i,"--n-button-color":o,"--n-button-width":p,"--n-button-width-pressed":m,"--n-button-height":f,"--n-height":x,"--n-offset":b,"--n-opacity-disabled":t,"--n-rail-border-radius":_,"--n-rail-color":n,"--n-rail-color-active":r,"--n-rail-height":h,"--n-rail-width":g,"--n-width":S,"--n-box-shadow-focus":c,"--n-loading-color":l,"--n-text-color":u,"--n-icon-color":d}}),D=r?f(`switch`,R(()=>s.value[0]),E,e):void 0;return{handleClick:b,handleBlur:S,handleFocus:x,handleKeyup:C,handleKeydown:T,mergedRailStyle:g,pressed:p,mergedClsPrefix:n,mergedValue:u,checked:d,mergedDisabled:c,cssVars:r?void 0:E,themeClass:D?.themeClass,onRender:D?.onRender}},render(){let{mergedClsPrefix:e,mergedDisabled:t,checked:n,mergedRailStyle:r,onRender:i,$slots:a}=this;i?.();let{checked:s,unchecked:c,icon:l,"checked-icon":u,"unchecked-icon":d}=a,f=!(le(l)&&le(u)&&le(d));return o(`div`,{role:`switch`,"aria-checked":n,class:[`${e}-switch`,this.themeClass,f&&`${e}-switch--icon`,n&&`${e}-switch--active`,t&&`${e}-switch--disabled`,this.round&&`${e}-switch--round`,this.loading&&`${e}-switch--loading`,this.pressed&&`${e}-switch--pressed`,this.rubberBand&&`${e}-switch--rubber-band`],tabindex:this.mergedDisabled?void 0:0,style:this.cssVars,onClick:this.handleClick,onFocus:this.handleFocus,onBlur:this.handleBlur,onKeyup:this.handleKeyup,onKeydown:this.handleKeydown},o(`div`,{class:`${e}-switch__rail`,"aria-hidden":`true`,style:r},W(s,t=>W(c,n=>t||n?o(`div`,{"aria-hidden":!0,class:`${e}-switch__children-placeholder`},o(`div`,{class:`${e}-switch__rail-placeholder`},o(`div`,{class:`${e}-switch__button-placeholder`}),t),o(`div`,{class:`${e}-switch__rail-placeholder`},o(`div`,{class:`${e}-switch__button-placeholder`}),n)):null)),o(`div`,{class:`${e}-switch__button`},W(l,t=>W(u,n=>W(d,r=>o(Se,null,{default:()=>this.loading?o(xe,Object.assign({key:`loading`,clsPrefix:e,strokeWidth:20},this.spinProps)):this.checked&&(n||t)?o(`div`,{class:`${e}-switch__button-icon`,key:n?`checked-icon`:`icon`},n||t):!this.checked&&(r||t)?o(`div`,{class:`${e}-switch__button-icon`,key:r?`unchecked-icon`:`icon`},r||t):null})))),W(s,t=>t&&o(`div`,{key:`checked`,class:`${e}-switch__checked`},t)),W(c,t=>t&&o(`div`,{key:`unchecked`,class:`${e}-switch__unchecked`},t)))))}}),Xe={xmlns:`http://www.w3.org/2000/svg`,"xmlns:xlink":`http://www.w3.org/1999/xlink`,viewBox:`0 0 24 24`},Ze=k({name:`CloseOutlined`,render:function(e,t){return v(),d(`svg`,Xe,t[0]||=[l(`path`,{d:`M19 6.41L17.59 5L12 10.59L6.41 5L5 6.41L10.59 12L5 17.59L6.41 19L12 13.41L17.59 19L19 17.59L13.41 12L19 6.41z`,fill:`currentColor`},null,-1)])}}),Qe={xmlns:`http://www.w3.org/2000/svg`,"xmlns:xlink":`http://www.w3.org/1999/xlink`,viewBox:`0 0 24 24`},$e=k({name:`LockOutlined`,render:function(e,t){return v(),d(`svg`,Qe,t[0]||=[l(`path`,{d:`M18 8h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2zM9 6c0-1.66 1.34-3 3-3s3 1.34 3 3v2H9V6zm9 14H6V10h12v10zm-6-3c1.1 0 2-.9 2-2s-.9-2-2-2s-2 .9-2 2s.9 2 2 2z`,fill:`currentColor`},null,-1)])}}),et={key:0},tt={class:`intro-text font`},nt={key:0,class:`intro-audio-block`},rt=[`src`],it={class:`message-content`},at={key:0},ot={key:1,class:`intro-empty`},st={key:2,class:`intro-audio-block`},ct=[`src`],lt={key:2,class:`place-block`},ut={class:`intro-edit-audio`},dt=[`src`],ft={class:`slot-block`},pt=ue(k({__name:`IntroBlock`,props:{introduction:{},mode:{}},emits:[`update:mode`],setup(t,{emit:r}){let i=t,a=r,o=e=>{a(`update:mode`,e)},c=R(()=>!!i.introduction?.text),f=R(()=>!!i.introduction?.audio),m=R(()=>{let e=i.introduction?.audio;if(e)return/^https?:\/\//i.test(e)?e:`${ee()}/api/files/${encodeURIComponent(e)}`}),h=()=>{i.introduction&&(i.introduction.audio=``,i.introduction.fileList=void 0)};return(r,a)=>(v(),d(D,null,[t.mode==`show`?(v(),d(`div`,et,[e(Oe,null,{default:C(()=>[a[4]||=l(`div`,{class:`font`},`Вступление`,-1),a[5]||=l(`hr`,{class:`intro-hr`},null,-1),l(`div`,tt,p(t.introduction.text),1),f.value?(v(),d(`div`,nt,[l(`audio`,{src:m.value,controls:``,preload:`none`,class:`intro-audio`},null,8,rt)])):L(``,!0)]),_:1})])):L(``,!0),t.mode==`show-editor`?(v(),d(`div`,{key:1,class:`place-block-hover show-editor-block`,onClick:a[0]||=e=>o(`edit`)},[a[6]||=l(`div`,{class:`message-header`},`Вступление`,-1),a[7]||=l(`hr`,{class:`hr`},null,-1),l(`div`,it,[c.value?(v(),d(`span`,at,p(t.introduction.text),1)):(v(),d(`span`,ot,`Введение не задано — нажмите, чтобы добавить`)),f.value?(v(),d(`div`,st,[l(`audio`,{src:m.value,controls:``,preload:`none`,class:`intro-audio`},null,8,ct)])):L(``,!0)])])):L(``,!0),t.mode==`edit`?(v(),d(`div`,lt,[e(u(K),{vertical:``},{default:C(()=>[a[11]||=l(`p`,{class:`settings-header`},`Текст вступления`,-1),e(u(G),{value:i.introduction.text,"onUpdate:value":a[1]||=e=>i.introduction.text=e,type:`textarea`,autosize:{minRows:4,maxRows:12},placeholder:`Дорогие сыщики! В этом деле вам предстоит...`},null,8,[`value`]),a[12]||=l(`p`,{class:`settings-header`},`Аудио вступления`,-1),l(`div`,ut,[e(u(K),{vertical:``},{default:C(()=>[f.value?(v(),d(`audio`,{key:0,src:m.value,controls:``,preload:`none`,class:`intro-audio`},null,8,dt)):(v(),n(u(ve),{key:1,depth:`3`},{default:C(()=>[...a[8]||=[A(`Аудио не задано`,-1)]]),_:1})),e(u(H),{onClick:a[2]||=e=>h(),disabled:!f.value},{default:C(()=>[...a[9]||=[A(`Убрать аудио`,-1)]]),_:1},8,[`disabled`])]),_:1}),e(u(fe),{"directory-dnd":``,max:1,"file-list":i.introduction.fileList,"onUpdate:fileList":a[3]||=e=>i.introduction.fileList=e},{default:C(()=>[e(u(de),null,{default:C(()=>[e(u(ve),{style:{"font-size":`16px`}},{default:C(()=>[...a[10]||=[A(` Щелкните или перетащите аудиофайл в эту область для загрузки `,-1)]]),_:1})]),_:1})]),_:1},8,[`file-list`])]),l(`div`,ft,[s(r.$slots,`default`,{},void 0,!0)])]),_:3})])):L(``,!0)],64))}}),[[`__scopeId`,`data-v-11f63e45`]]),mt={xmlns:`http://www.w3.org/2000/svg`,"xmlns:xlink":`http://www.w3.org/1999/xlink`,viewBox:`0 0 24 24`},ht=k({name:`Key24Regular`,render:function(e,t){return v(),d(`svg`,mt,t[0]||=[l(`g`,{fill:`none`},[l(`path`,{d:`M18.25 7a1.25 1.25 0 1 1-2.5 0a1.25 1.25 0 0 1 2.5 0zM15.5 2.05A6.554 6.554 0 0 0 8.95 8.6c0 .387.05.76.11 1.104a.275.275 0 0 1-.07.244l-6.235 6.236a2.75 2.75 0 0 0-.806 1.944V20.3c0 .966.784 1.75 1.75 1.75h2.5a1.75 1.75 0 0 0 1.75-1.75v-1.25H9.7c.69 0 1.25-.56 1.25-1.25v-1.75h1.75a1.25 1.25 0 0 0 1.25-1.204c.496.128 1.02.204 1.55.204a6.554 6.554 0 0 0 6.55-6.55c0-3.631-2.953-6.45-6.55-6.45zM10.45 8.6a5.054 5.054 0 0 1 5.05-5.05c2.802 0 5.05 2.181 5.05 4.95a5.054 5.054 0 0 1-5.05 5.05c-.68 0-1.38-.171-2.005-.44a.75.75 0 0 0-1.046.69v.75H10.7c-.69 0-1.25.56-1.25 1.25v1.75H7.7c-.69 0-1.25.56-1.25 1.25v1.5a.25.25 0 0 1-.25.25H3.7a.25.25 0 0 1-.25-.25v-2.172c0-.331.132-.65.366-.884l6.236-6.235a1.774 1.774 0 0 0 .486-1.564a4.917 4.917 0 0 1-.088-.845z`,fill:`currentColor`})],-1)])}}),gt={key:1,class:`place-block`},_t={class:`message-header`},vt={class:`message-content`},yt={key:0},bt=[`src`,`alt`],xt={class:`door-button-label`},St={key:0,class:`hr`},Ct={class:`application-name`},wt=[`onClick`],Tt=[`src`,`alt`],Et=[`src`],Dt=[`href`],Ot={class:`gray-block`},kt={key:0},At={key:3},jt={class:`message-show-header font`},Mt={key:0,class:`mcp-label`,title:`Ход сделан через MCP`},Nt={class:`message-show-content font`},Pt={key:0},Ft=[`src`,`alt`],It=[`src`,`alt`],Lt={key:2,class:`show-applications-block`},Rt=[`onClick`],zt=[`src`,`alt`],Bt={key:0,class:`show-hr`},Vt=[`onClick`],Ht={class:`button-dialog-text`},Ut={key:1,class:`show-hr`},Wt=[`href`],Gt={class:`application-label`},Kt=[`src`],qt={key:4},Jt={class:`message-header font`},Yt={key:0,class:`mcp-label`,title:`Ход сделан через MCP`},Xt={key:5,class:`place-block`},Zt=[`src`,`alt`],Qt={style:{display:`flex`,"flex-direction":`column`,width:`100%`}},$t={key:0,class:`application-edit-file`},en=[`src`,`alt`],tn=[`src`],nn=[`href`],rn={style:{display:`flex`,"flex-direction":`column`}},an={style:{display:`flex`,"flex-direction":`column`,width:`100%`}},on={class:`door-add-block`},sn={class:`door-field`},cn={style:{"align-items":`center`,display:`flex`,width:`100%`}},ln={style:{"align-items":`center`,display:`flex`,width:`100%`}},un={class:`slot-block`},dn={key:0,class:`view-application-image-block`},fn=[`src`,`alt`],pn=[`src`],mn=[`src`],hn={key:3,class:`view-application-image-block`},gn=[`src`,`alt`],_n=ue(k({__name:`PlaceBlock`,props:{newPlaceCode:{},newPlaceName:{},newPlaceText:{},place:{},mode:{},mcp:{type:Boolean,default:!1},addAction:{}},emits:[`update:newPlaceCode`,`update:newPlaceName`,`update:newPlaceText`,`update:mode`,`navigate`],setup(t,{emit:n}){let a=t,o=n,c=e=>{o(`update:newPlaceCode`,e)},f=e=>{o(`update:newPlaceName`,e)},h=e=>{o(`update:newPlaceText`,e)},g=e=>{o(`update:mode`,e)};function _(){return{name:void 0,image:void 0,file_type:void 0}}function y(){return{code:void 0,name:void 0,keys:void 0}}function x(){return{name:void 0}}function S(e){return e}function w(e){e.image=void 0,e.file_type=void 0,e.fileList=void 0}let T=z(null),E=z(null),O=z(!1),k=R(()=>E.value?E.value.url:Y(T.value||void 0)==`image`?X(T.value?.image):``);function j(e){T.value=e,E.value=null,O.value=!0}function M(e,t){E.value={title:e,url:t},T.value=null,O.value=!0}function N(){O.value=!1,T.value=null,E.value=null}function P(e){let t=e||``;if(t.length==0)return{before:``,after:``};let n=Math.min(t.length,Math.max(120,Math.floor(t.length*.45))),r=-1,i=1/0;for(let e=0;e<t.length;e++){let a=t[e];if(a!=`
`&&a!=` `)continue;let o=Math.abs(t.length-e-n);o<i&&(i=o,r=e)}return r<0?{before:t,after:``}:{before:t.slice(0,r),after:t.slice(r)}}let ee=R(()=>P(a.place?.text).before),F=R(()=>P(a.place?.text).after),I=R(()=>a.place?.image?null:(a.place?.applications||[]).find(e=>Y(e)==`image`&&e.image)||null),B=R(()=>(a.place?.applications||[]).filter(e=>e===I.value?!1:Y(e)==`image`&&e.image)),V=R(()=>(a.place?.applications||[]).filter(e=>e===I.value?!1:!(Y(e)==`image`&&e.image)));return(n,P)=>(v(),d(D,null,[t.mode==`mini-add`?(v(),d(`div`,{key:0,class:`place-block-hover show-editor-block`,onClick:P[0]||=e=>g(`add`)},[...P[21]||=[l(`p`,{class:`place-image-plus`},`+`,-1)]])):L(``,!0),t.mode==`add`?(v(),d(`div`,gt,[e(u(K),{vertical:``},{default:C(()=>[e(u(Me),null,{default:C(()=>[e(u(G),{style:{width:`20%`},value:t.newPlaceCode,"onUpdate:value":c,type:`text`,placeholder:`Ы-1`},null,8,[`value`]),e(u(G),{style:{width:`80%`},value:t.newPlaceName,"onUpdate:value":f,type:`text`,placeholder:`Дом №Ы`},null,8,[`value`])]),_:1}),e(u(G),{value:t.newPlaceText,"onUpdate:value":h,type:`textarea`,autosize:{minRows:3},placeholder:`В начале было слово...`},null,8,[`value`]),s(n.$slots,`default`,{},void 0,!0)]),_:3})])):L(``,!0),t.mode==`show-editor`?(v(),d(`div`,{key:2,class:`place-block-hover show-editor-block`,onClick:P[4]||=e=>g(`edit`)},[l(`div`,_t,p(a.place?.code)+`: `+p(a.place?.name),1),P[22]||=l(`hr`,{class:`hr`},null,-1),l(`div`,vt,[a.place?.image?(v(),d(`div`,yt,[l(`div`,{class:`message-image-border`,onClick:P[1]||=J(e=>M(a.place?.name||``,a.place?.image||``),[`stop`])},[l(`img`,{src:a.place?.image,alt:a.place?.name||`Изображение точки`,class:`message-image`},null,8,bt)])])):L(``,!0),l(`span`,null,p(a.place?.text),1)]),(v(!0),d(D,null,b(a.place?.doors,t=>(v(),d(`div`,{key:t.code,class:`door-block`},[e(u(H),{class:`door-button`,onClick:J(e=>o(`navigate`,t.code),[`stop`])},{default:C(()=>[l(`span`,xt,p(t.name||t.code||`Перейти к точке`),1)]),_:2},1032,[`onClick`]),(v(!0),d(D,null,b(t.keys,t=>(v(),d(`span`,{key:t.name,class:`key-block`},[e(u(ne),{class:`lock-icon`},{default:C(()=>[e(u($e))]),_:1}),A(` `+p(t.name),1)]))),128))]))),128)),a.place?.applications?.length?(v(),d(`hr`,St)):L(``,!0),(v(!0),d(D,null,b(a.place?.applications,e=>(v(),d(`div`,{class:`message-footer application-block`,key:e.name},[l(`div`,Ct,`Приложение: `+p(e.name),1),u(Y)(e)==`image`&&e.image?(v(),d(`div`,{key:0,class:`application-image-border`,onClick:J(t=>j(e),[`stop`])},[l(`img`,{src:u(X)(e.image),alt:e.name||`Изображение улики`,class:`application-image`},null,8,Tt)],8,wt)):u(Y)(e)==`audio`&&e.image?(v(),d(`audio`,{key:1,src:u(X)(e.image),controls:``,preload:`none`,class:`application-audio`,onClick:P[2]||=J(()=>{},[`stop`])},null,8,Et)):u(Y)(e)==`pdf`&&e.image?(v(),d(`a`,{key:2,href:u(X)(e.image),target:`_blank`,rel:`noopener`,class:`application-pdf-link`,onClick:P[3]||=J(()=>{},[`stop`])},` PDF `,8,Dt)):L(``,!0)]))),128)),l(`p`,Ot,[a.place?.hidden?(v(),d(`span`,kt,` Скрытая точка `)):L(``,!0),(v(!0),d(D,null,b(a.place?.keys,t=>(v(),d(`span`,{key:t.name,class:`key-block`},[e(u(ne),{class:`lock-icon`},{default:C(()=>[e(u(ht))]),_:1}),A(` `+p(t.name),1)]))),128))])])):L(``,!0),t.mode==`show`?(v(),d(`div`,At,[e(Oe,null,{default:C(()=>[l(`div`,jt,[t.mcp?(v(),d(`span`,Mt,`MCP`)):L(``,!0),A(` `+p(t.place?.code)+`: `+p(t.place?.name)+` `,1),l(`span`,{class:`collapse-icon collapse-icon-up`,onClick:P[5]||=e=>g(`show-collapse`)})]),P[23]||=l(`hr`,{class:`show-hr`},null,-1),l(`div`,Nt,[t.place?.image?.length?(v(),d(`div`,Pt,[l(`div`,{class:`message-image-border`,onClick:P[6]||=e=>M(t.place?.name||``,t.place?.image||``)},[l(`img`,{src:t.place?.image,alt:t.place?.name||`Изображение точки`,class:`message-image`},null,8,Ft)])])):I.value?(v(),d(`div`,{key:1,class:`message-image-border`,onClick:P[7]||=e=>j(I.value)},[l(`img`,{src:u(X)(I.value.image),alt:I.value.name||`Изображение улики`,class:`message-image`},null,8,It)])):L(``,!0),l(`span`,null,p(ee.value),1),B.value.length?(v(),d(`div`,Lt,[(v(!0),d(D,null,b(B.value,e=>(v(),d(`div`,{class:`show-application`,key:e.name},[l(`div`,{class:`application-image-block`,onClick:t=>j(e)},[l(`img`,{src:u(X)(e.image),alt:e.name||`Изображение улики`,class:`application-image`},null,8,zt)],8,Rt)]))),128))])):L(``,!0),l(`span`,null,p(F.value),1)]),a.place?.doors?.length?(v(),d(`hr`,Bt)):L(``,!0),(v(!0),d(D,null,b(a.place?.doors,e=>(v(),d(`div`,{key:e.code,class:`button-dialog font`,onClick:n=>t.addAction(e.code)},[l(`div`,Ht,p(e.code)+` `+p(e.name),1)],8,Vt))),128)),V.value.length?(v(),d(`hr`,Ut)):L(``,!0),(v(!0),d(D,null,b(V.value,e=>(v(),d(`div`,{class:`message-show-footer font`,key:e.name},[u(Y)(e)==`pdf`&&e.image?(v(),d(`a`,{key:0,href:u(X)(e.image),target:`_blank`,rel:`noopener`,class:`pdf-application-name`},` Приложение: `+p(e.name),9,Wt)):(v(),d(D,{key:1},[l(`div`,Gt,`Приложение: `+p(e.name),1),u(Y)(e)==`audio`&&e.image?(v(),d(`audio`,{key:0,src:u(X)(e.image),controls:``,preload:`none`,class:`application-audio`},null,8,Kt)):L(``,!0)],64))]))),128))]),_:1})])):L(``,!0),t.mode==`show-collapse`?(v(),d(`div`,qt,[e(Oe,null,{default:C(()=>[l(`div`,Jt,[t.mcp?(v(),d(`span`,Yt,`MCP`)):L(``,!0),A(` `+p(t.place?.code)+`: `+p(t.place?.name)+` `,1),l(`span`,{class:`collapse-icon`,onClick:P[8]||=e=>g(`show`)})])]),_:1})])):L(``,!0),t.mode==`edit`?(v(),d(`div`,Xt,[e(u(K),{vertical:``},{default:C(()=>[e(u(Me),null,{default:C(()=>[e(u(G),{style:{width:`20%`},value:a.place.code,"onUpdate:value":P[9]||=e=>a.place.code=e,type:`text`,placeholder:`Ы-1`},null,8,[`value`]),e(u(G),{style:{width:`80%`},value:a.place.name,"onUpdate:value":P[10]||=e=>a.place.name=e,type:`text`,placeholder:`Дом №Ы`},null,8,[`value`])]),_:1}),e(u(G),{value:a.place.text,"onUpdate:value":P[11]||=e=>a.place.text=e,type:`textarea`,autosize:{minRows:3},placeholder:`В начале было слово...`},null,8,[`value`]),P[37]||=l(`p`,{class:`settings-header`},`Картинка`,-1),l(`div`,null,[e(u(K),null,{default:C(()=>[e(u(K),{vertical:``},{default:C(()=>[l(`img`,{src:a.place.image,alt:a.place?.name||`Изображение точки`,class:`message-edit-image`},null,8,Zt),e(u(H),{onClick:P[12]||=e=>(a.place.image=``,a.place.fileList=void 0)},{default:C(()=>[...P[24]||=[A(`Убрать картинку`,-1)]]),_:1})]),_:1}),e(u(K),{vertical:``},{default:C(()=>[e(u(G),{value:a.place.image,"onUpdate:value":P[13]||=e=>a.place.image=e,type:`text`,placeholder:`Не задано`,disabled:``},null,8,[`value`]),e(u(fe),{"directory-dnd":``,max:1,"file-list":a.place.fileList,"onUpdate:fileList":P[14]||=e=>a.place.fileList=e},{default:C(()=>[e(u(de),null,{default:C(()=>[e(u(ve),{style:{"font-size":`16px`}},{default:C(()=>[...P[25]||=[A(` Щелкните или перетащите файл в эту область для загрузки `,-1)]]),_:1})]),_:1})]),_:1},8,[`file-list`])]),_:1})]),_:1})]),P[38]||=l(`p`,{class:`settings-header`},`Видимость точки`,-1),e(u(Ye),{value:a.place.hidden,"onUpdate:value":P[15]||=e=>a.place.hidden=e},{checked:C(()=>[...P[26]||=[A(` Скрытая точка `,-1)]]),unchecked:C(()=>[...P[27]||=[A(` Обычная точка `,-1)]]),_:1},8,[`value`]),P[39]||=A(` Улики `,-1),e(u(Ue),{value:a.place.applications,"onUpdate:value":P[16]||=e=>a.place.applications=e,"on-create":_},{"create-button-default":C(()=>[...P[28]||=[A(` Добавить улику `,-1)]]),default:C(({value:t})=>[l(`div`,Qt,[e(u(G),{value:t.name,"onUpdate:value":e=>t.name=e,type:`text`,placeholder:`Название`},null,8,[`value`,`onUpdate:value`]),t.image?(v(),d(`div`,$t,[e(u(K),{align:`center`,justify:`space-between`},{default:C(()=>[e(u(ve),{depth:`3`},{default:C(()=>[A(p(u(De)(t.image))+` `,1),e(u(te),{size:`small`,bordered:!1},{default:C(()=>[A(p(u(Y)(t)||`файл`),1)]),_:2},1024)]),_:2},1024),e(u(H),{size:`small`,quaternary:``,onClick:e=>w(S(t))},{default:C(()=>[...P[29]||=[A(` Убрать файл `,-1)]]),_:1},8,[`onClick`])]),_:2},1024),u(Y)(t)==`image`?(v(),d(`img`,{key:0,src:u(X)(t.image),alt:t.name||`Изображение улики`,class:`application-edit-image`},null,8,en)):u(Y)(t)==`audio`?(v(),d(`audio`,{key:1,src:u(X)(t.image),controls:``,preload:`none`,class:`application-edit-audio`},null,8,tn)):u(Y)(t)==`pdf`?(v(),d(`a`,{key:2,href:u(X)(t.image),target:`_blank`,rel:`noopener`,class:`application-pdf-link`},` PDF `,8,nn)):L(``,!0)])):L(``,!0),e(u(fe),{max:1,"file-list":S(t).fileList,"onUpdate:fileList":e=>S(t).fileList=e,accept:`image/*,application/pdf,audio/*`},{default:C(()=>[e(u(H),{size:`small`},{default:C(()=>[...P[30]||=[A(`Загрузить файл улики`,-1)]]),_:1})]),_:1},8,[`file-list`,`onUpdate:fileList`])])]),_:1},8,[`value`]),P[40]||=A(` Действия `,-1),e(u(Ue),{value:a.place.doors,"onUpdate:value":P[17]||=e=>a.place.doors=e,"on-create":y},{"create-button-default":C(()=>[...P[31]||=[A(` Добавить действие `,-1)]]),action:C(({index:t,create:n,remove:r})=>[l(`div`,rn,[e(u(H),{onClick:()=>n(t),class:`plus-minus-buttons`},{default:C(()=>[...P[32]||=[A(`+`,-1)]]),_:1},8,[`onClick`]),e(u(H),{onClick:()=>r(t),class:`plus-minus-buttons`},{default:C(()=>[...P[33]||=[A(`-`,-1)]]),_:1},8,[`onClick`])])]),default:C(({value:t})=>[l(`div`,an,[l(`div`,on,[e(u(Me),null,{default:C(()=>[e(u(G),{style:{width:`30%`},value:t.code,"onUpdate:value":e=>t.code=e,type:`text`,placeholder:`Код`},null,8,[`value`,`onUpdate:value`]),e(u(G),{style:{width:`70%`},value:t.name,"onUpdate:value":e=>t.name=e,type:`text`,placeholder:`Название`},null,8,[`value`,`onUpdate:value`])]),_:2},1024),P[35]||=l(`p`,{class:`need-keys-text`},`Требуемые ключи`,-1),l(`div`,sn,[e(u(Ue),{value:t.keys,"onUpdate:value":e=>t.keys=e,"on-create":x},{"create-button-default":C(()=>[...P[34]||=[A(` Добавить ключ `,-1)]]),default:C(({value:t})=>[l(`div`,cn,[e(u(G),{value:t.name,"onUpdate:value":e=>t.name=e,type:`text`,placeholder:`Название`},null,8,[`value`,`onUpdate:value`])])]),_:1},8,[`value`,`onUpdate:value`])])])])]),_:1},8,[`value`]),P[41]||=A(` Получаемые ключи `,-1),e(u(Ue),{value:a.place.keys,"onUpdate:value":P[18]||=e=>a.place.keys=e,"on-create":x},{"create-button-default":C(()=>[...P[36]||=[A(` Добавить ключ `,-1)]]),default:C(({value:t})=>[l(`div`,ln,[e(u(G),{value:t.name,"onUpdate:value":e=>t.name=e,type:`text`,placeholder:`Название`},null,8,[`value`,`onUpdate:value`])])]),_:1},8,[`value`]),l(`div`,un,[s(n.$slots,`default`,{},void 0,!0)])]),_:3})])):L(``,!0),e(u(ie),{show:O.value,"onUpdate:show":P[20]||=e=>O.value=e,"mask-closable":!0},{default:C(()=>[e(u(_e),{class:m({"photo-paper":k.value}),"theme-overrides":k.value?{titleTextColor:`black`,actionColor:`transparent`,paddingMedium:`14px`,borderRadius:`10px`}:void 0,style:i({maxWidth:`min(94vw, 1200px)`,width:k.value?`max-content`:`min(94vw, 1200px)`}),bordered:!1,role:`dialog`,"aria-modal":`true`,"header-style":k.value?{paddingBottom:`10px`}:void 0,"content-style":{padding:k.value?`0 14px`:`14px`}},r({header:C(()=>[l(`span`,{class:m({"photo-paper-title":k.value})},p(T.value?.name||E.value?.title),3)]),"header-extra":C(()=>[e(u(H),{quaternary:``,circle:``,"theme-overrides":k.value?{textColor:`black`,textColorHover:`#63e2b7`}:void 0,"aria-label":`Закрыть`,onClick:P[19]||=e=>N()},{default:C(()=>[e(u(ne),{size:`20`},{default:C(()=>[e(u(Ze))]),_:1})]),_:1},8,[`theme-overrides`])]),default:C(()=>[T.value&&u(Y)(T.value)==`image`?(v(),d(`div`,dn,[l(`img`,{src:u(X)(T.value.image),alt:T.value.name||`Фото улики`,class:`view-application-image`},null,8,fn)])):T.value&&u(Y)(T.value)==`pdf`?(v(),d(`iframe`,{key:1,src:u(X)(T.value.image),class:`view-application-pdf`},null,8,pn)):T.value&&u(Y)(T.value)==`audio`?(v(),d(`audio`,{key:2,src:u(X)(T.value.image),controls:``,autoplay:``,class:`view-application-audio`},null,8,mn)):E.value?(v(),d(`div`,hn,[l(`img`,{src:E.value.url,alt:E.value.title||`Фото точки`,class:`view-application-image`},null,8,gn)])):L(``,!0)]),_:2},[k.value?{name:`action`,fn:C(()=>[e(u(H),{class:`photo-paper-action`,tag:`a`,href:k.value,target:`_blank`,rel:`noopener noreferrer`,bordered:!1,"theme-overrides":{textColor:`#bfa07d`,textColorHover:`#63e2b7`}},{default:C(()=>[...P[42]||=[A(` Открыть в новой вкладке `,-1)]]),_:1},8,[`href`])]),key:`0`}:void 0]),1032,[`class`,`theme-overrides`,`style`,`header-style`,`content-style`])]),_:1},8,[`show`])],64))}}),[[`__scopeId`,`data-v-c907363d`]]);export{pt as n,Me as r,_n as t};