smarteye-e-components 0.0.71 → 0.0.72

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -24,5 +24,5 @@ ${c}`:i)}else throw s},onCacheKey:s=>_o(t,n,s)}}function or(e,t,n,o){const{modif
24
24
  * vue-i18n v9.2.2
25
25
  * (c) 2022 kazuya kawaguchi
26
26
  * Released under the MIT License.
27
- */const _r="9.2.2";function pr(){let e=!1;typeof __INTLIFY_PROD_DEVTOOLS__!="boolean"&&(Ke().__INTLIFY_PROD_DEVTOOLS__=!1),process.env.NODE_ENV!=="production"&&e&&console.warn("You are running the esm-bundler build of vue-i18n. It is recommended to configure your bundler to explicitly replace feature flag globals with boolean literals to get proper tree-shaking in the final bundle.")}let _n=W.__EXTEND_POINT__;const ae=()=>++_n,K={FALLBACK_TO_ROOT:_n,NOT_SUPPORTED_PRESERVE:ae(),NOT_SUPPORTED_FORMATTER:ae(),NOT_SUPPORTED_PRESERVE_DIRECTIVE:ae(),NOT_SUPPORTED_GET_CHOICE_INDEX:ae(),COMPONENT_NAME_LEGACY_COMPATIBLE:ae(),NOT_FOUND_PARENT_SCOPE:ae()},gr={[K.FALLBACK_TO_ROOT]:"Fall back to {type} '{key}' with root locale.",[K.NOT_SUPPORTED_PRESERVE]:"Not supported 'preserve'.",[K.NOT_SUPPORTED_FORMATTER]:"Not supported 'formatter'.",[K.NOT_SUPPORTED_PRESERVE_DIRECTIVE]:"Not supported 'preserveDirectiveContent'.",[K.NOT_SUPPORTED_GET_CHOICE_INDEX]:"Not supported 'getChoiceIndex'.",[K.COMPONENT_NAME_LEGACY_COMPATIBLE]:"Component name legacy compatible: '{name}' -> 'i18n'",[K.NOT_FOUND_PARENT_SCOPE]:"Not found parent scope. use the global scope."};function Ce(e,...t){return Ye(gr[e],...t)}let pn=R.__EXTEND_POINT__;const x=()=>++pn,A={UNEXPECTED_RETURN_TYPE:pn,INVALID_ARGUMENT:x(),MUST_BE_CALL_SETUP_TOP:x(),NOT_INSLALLED:x(),NOT_AVAILABLE_IN_LEGACY_MODE:x(),REQUIRED_VALUE:x(),INVALID_VALUE:x(),CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN:x(),NOT_INSLALLED_WITH_PROVIDE:x(),UNEXPECTED_ERROR:x(),NOT_COMPATIBLE_LEGACY_VUE_I18N:x(),BRIDGE_SUPPORT_VUE_2_ONLY:x(),MUST_DEFINE_I18N_OPTION_IN_ALLOW_COMPOSITION:x(),NOT_AVAILABLE_COMPOSITION_IN_LEGACY:x(),__EXTEND_POINT__:x()};function H(e,...t){return qt(e,null,process.env.NODE_ENV!=="production"?{messages:hr,args:t}:void 0)}const hr={[A.UNEXPECTED_RETURN_TYPE]:"Unexpected return type in composer",[A.INVALID_ARGUMENT]:"Invalid argument",[A.MUST_BE_CALL_SETUP_TOP]:"Must be called at the top of a `setup` function",[A.NOT_INSLALLED]:"Need to install with `app.use` function",[A.UNEXPECTED_ERROR]:"Unexpected error",[A.NOT_AVAILABLE_IN_LEGACY_MODE]:"Not available in legacy mode",[A.REQUIRED_VALUE]:"Required in value: {0}",[A.INVALID_VALUE]:"Invalid value",[A.CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN]:"Cannot setup vue-devtools plugin",[A.NOT_INSLALLED_WITH_PROVIDE]:"Need to install with `provide` function",[A.NOT_COMPATIBLE_LEGACY_VUE_I18N]:"Not compatible legacy VueI18n.",[A.BRIDGE_SUPPORT_VUE_2_ONLY]:"vue-i18n-bridge support Vue 2.x only",[A.MUST_DEFINE_I18N_OPTION_IN_ALLOW_COMPOSITION]:"Must define \u2018i18n\u2019 option or custom block in Composition API with using local scope in Legacy API mode",[A.NOT_AVAILABLE_COMPOSITION_IN_LEGACY]:"Not available Compostion API in Legacy API mode. Please make sure that the legacy API mode is working properly"},Ue=Q("__transrateVNode"),Be=Q("__datetimeParts"),xe=Q("__numberParts"),ge=Q("__enableEmitter"),Ge=Q("__disableEmitter"),vr=Q("__setPluralRules");Q("__intlifyMeta");const Er=Q("__injectWithOption");function We(e){if(!S(e))return e;for(const t in e)if(!!Xe(e,t))if(!t.includes("."))S(e[t])&&We(e[t]);else{const n=t.split("."),o=n.length-1;let r=e;for(let l=0;l<o;l++)n[l]in r||(r[n[l]]={}),r=r[n[l]];r[n[o]]=e[t],delete e[t],S(r[n[o]])&&We(r[n[o]])}return e}function gn(e,t){const{messages:n,__i18n:o,messageResolver:r,flatJson:l}=t,s=I(n)?n:P(o)?{}:{[e]:{}};if(P(o)&&o.forEach(i=>{if("locale"in i&&"resource"in i){const{locale:c,resource:u}=i;c?(s[c]=s[c]||{},me(u,s[c])):me(u,s)}else y(i)&&me(JSON.parse(i),s)}),r==null&&l)for(const i in s)Xe(s,i)&&We(s[i]);return s}const Ne=e=>!S(e)||P(e);function me(e,t){if(Ne(e)||Ne(t))throw H(A.INVALID_VALUE);for(const n in e)Xe(e,n)&&(Ne(e[n])||Ne(t[n])?t[n]=e[n]:me(e[n],t[n]))}function hn(e){return e.type}function yr(e,t,n){let o=S(t.messages)?t.messages:{};"__i18nGlobal"in n&&(o=gn(e.locale.value,{messages:o,__i18n:n.__i18nGlobal}));const r=Object.keys(o);r.length&&r.forEach(l=>{e.mergeLocaleMessage(l,o[l])});{if(S(t.datetimeFormats)){const l=Object.keys(t.datetimeFormats);l.length&&l.forEach(s=>{e.mergeDateTimeFormat(s,t.datetimeFormats[s])})}if(S(t.numberFormats)){const l=Object.keys(t.numberFormats);l.length&&l.forEach(s=>{e.mergeNumberFormat(s,t.numberFormats[s])})}}}function Tt(e){return a.createVNode(a.Text,null,e,0)}const It="__INTLIFY_META__";let wt=0;function St(e){return(t,n,o,r)=>e(n,o,a.getCurrentInstance()||void 0,r)}const Nr=()=>{const e=a.getCurrentInstance();let t=null;return e&&(t=hn(e)[It])?{[It]:t}:null};function vn(e={},t){const{__root:n}=e,o=n===void 0;let r=D(e.inheritLocale)?e.inheritLocale:!0;const l=a.ref(n&&r?n.locale.value:y(e.locale)?e.locale:Qe),s=a.ref(n&&r?n.fallbackLocale.value:y(e.fallbackLocale)||P(e.fallbackLocale)||I(e.fallbackLocale)||e.fallbackLocale===!1?e.fallbackLocale:l.value),i=a.ref(gn(l.value,e)),c=a.ref(I(e.datetimeFormats)?e.datetimeFormats:{[l.value]:{}}),u=a.ref(I(e.numberFormats)?e.numberFormats:{[l.value]:{}});let m=n?n.missingWarn:D(e.missingWarn)||Oe(e.missingWarn)?e.missingWarn:!0,p=n?n.fallbackWarn:D(e.fallbackWarn)||Oe(e.fallbackWarn)?e.fallbackWarn:!0,f=n?n.fallbackRoot:D(e.fallbackRoot)?e.fallbackRoot:!0,v=!!e.fallbackFormat,b=V(e.missing)?e.missing:null,_=V(e.missing)?St(e.missing):null,g=V(e.postTranslation)?e.postTranslation:null,N=n?n.warnHtmlMessage:D(e.warnHtmlMessage)?e.warnHtmlMessage:!0,O=!!e.escapeParameter;const T=n?n.modifiers:I(e.modifiers)?e.modifiers:{};let L=e.pluralRules||n&&n.pluralRules,E;E=(()=>{o&&gt(null);const d={version:_r,locale:l.value,fallbackLocale:s.value,messages:i.value,modifiers:T,pluralRules:L,missing:_===null?void 0:_,missingWarn:m,fallbackWarn:p,fallbackFormat:v,unresolving:!0,postTranslation:g===null?void 0:g,warnHtmlMessage:N,escapeParameter:O,messageResolver:e.messageResolver,__meta:{framework:"vue"}};d.datetimeFormats=c.value,d.numberFormats=u.value,d.__datetimeFormatters=I(E)?E.__datetimeFormatters:void 0,d.__numberFormatters=I(E)?E.__numberFormatters:void 0,process.env.NODE_ENV!=="production"&&(d.__v_emitter=I(E)?E.__v_emitter:void 0);const h=qo(d);return o&&gt(h),h})(),fe(E,l.value,s.value);function w(){return[l.value,s.value,i.value,c.value,u.value]}const F=a.computed({get:()=>l.value,set:d=>{l.value=d,E.locale=l.value}}),G=a.computed({get:()=>s.value,set:d=>{s.value=d,E.fallbackLocale=s.value,fe(E,l.value,d)}}),z=a.computed(()=>i.value),Y=a.computed(()=>c.value),ve=a.computed(()=>u.value);function Ee(){return V(g)?g:null}function Bn(d){g=d,E.postTranslation=d}function xn(){return b}function Gn(d){d!==null&&(_=St(d)),b=d,E.missing=_}function Wn(d,h){return d!=="translate"||!h.resolvedMessage}const re=(d,h,B,M,De,ye)=>{w();let se;if(process.env.NODE_ENV!=="production"||__INTLIFY_PROD_DEVTOOLS__)try{pt(Nr()),o||(E.fallbackContext=n?Qo():void 0),se=d(E)}finally{pt(null),o||(E.fallbackContext=void 0)}else se=d(E);if($(se)&&se===we){const[te,uo]=h();if(process.env.NODE_ENV!=="production"&&n&&y(te)&&Wn(B,uo)&&(f&&(Se(p,te)||sn(m,te))&&ue(Ce(K.FALLBACK_TO_ROOT,{key:te,type:B})),process.env.NODE_ENV!=="production")){const{__v_emitter:at}=E;at&&f&&at.emit("fallback",{type:B,key:te,to:"global",groupId:`${B}:${te}`})}return n&&f?M(n):De(te)}else{if(ye(se))return se;throw H(A.UNEXPECTED_RETURN_TYPE)}};function st(...d){return re(h=>Reflect.apply(Et,null,[h,...d]),()=>$e(...d),"translate",h=>Reflect.apply(h.t,h,[...d]),h=>h,h=>y(h))}function jn(...d){const[h,B,M]=d;if(M&&!S(M))throw H(A.INVALID_ARGUMENT);return st(h,B,U({resolvedMessage:!0},M||{}))}function Hn(...d){return re(h=>Reflect.apply(Nt,null,[h,...d]),()=>Fe(...d),"datetime format",h=>Reflect.apply(h.d,h,[...d]),()=>Le,h=>y(h))}function zn(...d){return re(h=>Reflect.apply(Ot,null,[h,...d]),()=>Re(...d),"number format",h=>Reflect.apply(h.n,h,[...d]),()=>Le,h=>y(h))}function Yn(d){return d.map(h=>y(h)||$(h)||D(h)?Tt(String(h)):h)}const Kn={normalize:Yn,interpolate:d=>d,type:"vnode"};function Xn(...d){return re(h=>{let B;const M=h;try{M.processor=Kn,B=Reflect.apply(Et,null,[M,...d])}finally{M.processor=null}return B},()=>$e(...d),"translate",h=>h[Ue](...d),h=>[Tt(h)],h=>P(h))}function Jn(...d){return re(h=>Reflect.apply(Ot,null,[h,...d]),()=>Re(...d),"number format",h=>h[xe](...d),()=>[],h=>y(h)||P(h))}function Qn(...d){return re(h=>Reflect.apply(Nt,null,[h,...d]),()=>Fe(...d),"datetime format",h=>h[Be](...d),()=>[],h=>y(h)||P(h))}function qn(d){L=d,E.pluralRules=L}function Zn(d,h){const B=y(h)?h:l.value,M=lt(B);return E.messageResolver(M,d)!==null}function eo(d){let h=null;const B=en(E,s.value,l.value);for(let M=0;M<B.length;M++){const De=i.value[B[M]]||{},ye=E.messageResolver(De,d);if(ye!=null){h=ye;break}}return h}function to(d){const h=eo(d);return h!=null?h:n?n.tm(d)||{}:{}}function lt(d){return i.value[d]||{}}function no(d,h){i.value[d]=h,E.messages=i.value}function oo(d,h){i.value[d]=i.value[d]||{},me(h,i.value[d]),E.messages=i.value}function ro(d){return c.value[d]||{}}function so(d,h){c.value[d]=h,E.datetimeFormats=c.value,bt(E,d,h)}function lo(d,h){c.value[d]=U(c.value[d]||{},h),E.datetimeFormats=c.value,bt(E,d,h)}function ao(d){return u.value[d]||{}}function io(d,h){u.value[d]=h,E.numberFormats=u.value,Lt(E,d,h)}function co(d,h){u.value[d]=U(u.value[d]||{},h),E.numberFormats=u.value,Lt(E,d,h)}wt++,n&&J&&(a.watch(n.locale,d=>{r&&(l.value=d,E.locale=d,fe(E,l.value,s.value))}),a.watch(n.fallbackLocale,d=>{r&&(s.value=d,E.fallbackLocale=d,fe(E,l.value,s.value))}));const k={id:wt,locale:F,fallbackLocale:G,get inheritLocale(){return r},set inheritLocale(d){r=d,d&&n&&(l.value=n.locale.value,s.value=n.fallbackLocale.value,fe(E,l.value,s.value))},get availableLocales(){return Object.keys(i.value).sort()},messages:z,get modifiers(){return T},get pluralRules(){return L||{}},get isGlobal(){return o},get missingWarn(){return m},set missingWarn(d){m=d,E.missingWarn=m},get fallbackWarn(){return p},set fallbackWarn(d){p=d,E.fallbackWarn=p},get fallbackRoot(){return f},set fallbackRoot(d){f=d},get fallbackFormat(){return v},set fallbackFormat(d){v=d,E.fallbackFormat=v},get warnHtmlMessage(){return N},set warnHtmlMessage(d){N=d,E.warnHtmlMessage=d},get escapeParameter(){return O},set escapeParameter(d){O=d,E.escapeParameter=d},t:st,getLocaleMessage:lt,setLocaleMessage:no,mergeLocaleMessage:oo,getPostTranslationHandler:Ee,setPostTranslationHandler:Bn,getMissingHandler:xn,setMissingHandler:Gn,[vr]:qn};return k.datetimeFormats=Y,k.numberFormats=ve,k.rt=jn,k.te=Zn,k.tm=to,k.d=Hn,k.n=zn,k.getDateTimeFormat=ro,k.setDateTimeFormat=so,k.mergeDateTimeFormat=lo,k.getNumberFormat=ao,k.setNumberFormat=io,k.mergeNumberFormat=co,k[Er]=e.__injectWithOption,k[Ue]=Xn,k[Be]=Qn,k[xe]=Jn,process.env.NODE_ENV!=="production"&&(k[ge]=d=>{E.__v_emitter=d},k[Ge]=()=>{E.__v_emitter=void 0}),k}const Ze={tag:{type:[String,Object]},locale:{type:String},scope:{type:String,validator:e=>e==="parent"||e==="global",default:"parent"},i18n:{type:Object}};function br({slots:e},t){return t.length===1&&t[0]==="default"?(e.default?e.default():[]).reduce((o,r)=>o=[...o,...P(r.children)?r.children:[r]],[]):t.reduce((n,o)=>{const r=e[o];return r&&(n[o]=r()),n},{})}function En(e){return a.Fragment}const Ve={name:"i18n-t",props:U({keypath:{type:String,required:!0},plural:{type:[Number,String],validator:e=>$(e)||!isNaN(e)}},Ze),setup(e,t){const{slots:n,attrs:o}=t,r=e.i18n||tt({useScope:e.scope,__useComponent:!0});return()=>{const l=Object.keys(n).filter(p=>p!=="_"),s={};e.locale&&(s.locale=e.locale),e.plural!==void 0&&(s.plural=y(e.plural)?+e.plural:e.plural);const i=br(t,l),c=r[Ue](e.keypath,i,s),u=U({},o),m=y(e.tag)||S(e.tag)?e.tag:En();return a.h(m,u,c)}}};function Or(e){return P(e)&&!y(e[0])}function yn(e,t,n,o){const{slots:r,attrs:l}=t;return()=>{const s={part:!0};let i={};e.locale&&(s.locale=e.locale),y(e.format)?s.key=e.format:S(e.format)&&(y(e.format.key)&&(s.key=e.format.key),i=Object.keys(e.format).reduce((f,v)=>n.includes(v)?U({},f,{[v]:e.format[v]}):f,{}));const c=o(e.value,s,i);let u=[s.key];P(c)?u=c.map((f,v)=>{const b=r[f.type],_=b?b({[f.type]:f.value,index:v,parts:c}):[f.value];return Or(_)&&(_[0].key=`${f.type}-${v}`),_}):y(c)&&(u=[c]);const m=U({},l),p=y(e.tag)||S(e.tag)?e.tag:En();return a.h(p,m,u)}}const Ct={name:"i18n-n",props:U({value:{type:Number,required:!0},format:{type:[String,Object]}},Ze),setup(e,t){const n=e.i18n||tt({useScope:"parent",__useComponent:!0});return yn(e,t,dn,(...o)=>n[xe](...o))}},At={name:"i18n-d",props:U({value:{type:[Number,Date],required:!0},format:{type:[String,Object]}},Ze),setup(e,t){const n=e.i18n||tt({useScope:"parent",__useComponent:!0});return yn(e,t,fn,(...o)=>n[Be](...o))}};function Lr(e,t){const n=e;if(e.mode==="composition")return n.__getInstance(t)||e.global;{const o=n.__getInstance(t);return o!=null?o.__composer:e.global.__composer}}function Tr(e){const t=s=>{const{instance:i,modifiers:c,value:u}=s;if(!i||!i.$)throw H(A.UNEXPECTED_ERROR);const m=Lr(e,i.$);process.env.NODE_ENV!=="production"&&c.preserve&&ue(Ce(K.NOT_SUPPORTED_PRESERVE));const p=Dt(u);return[Reflect.apply(m.t,m,[...Pt(p)]),m]};return{created:(s,i)=>{const[c,u]=t(i);J&&e.global===u&&(s.__i18nWatcher=a.watch(u.locale,()=>{i.instance&&i.instance.$forceUpdate()})),s.__composer=u,s.textContent=c},unmounted:s=>{J&&s.__i18nWatcher&&(s.__i18nWatcher(),s.__i18nWatcher=void 0,delete s.__i18nWatcher),s.__composer&&(s.__composer=void 0,delete s.__composer)},beforeUpdate:(s,{value:i})=>{if(s.__composer){const c=s.__composer,u=Dt(i);s.textContent=Reflect.apply(c.t,c,[...Pt(u)])}},getSSRProps:s=>{const[i]=t(s);return{textContent:i}}}}function Dt(e){if(y(e))return{path:e};if(I(e)){if(!("path"in e))throw H(A.REQUIRED_VALUE,"path");return e}else throw H(A.INVALID_VALUE)}function Pt(e){const{path:t,locale:n,args:o,choice:r,plural:l}=e,s={},i=o||{};return y(n)&&(s.locale=n),$(r)&&(s.plural=r),$(l)&&(s.plural=l),[t,i,s]}function Ir(e,t,...n){const o=I(n[0])?n[0]:{},r=!!o.useI18nComponentName,l=D(o.globalInstall)?o.globalInstall:!0;process.env.NODE_ENV!=="production"&&l&&r&&ue(Ce(K.COMPONENT_NAME_LEGACY_COMPATIBLE,{name:Ve.name})),l&&(e.component(r?"i18n":Ve.name,Ve),e.component(Ct.name,Ct),e.component(At.name,At)),e.directive("t",Tr(t))}const Nn="vue-i18n: composer properties";let je;async function wr(e,t){return new Promise((n,o)=>{try{fr({id:"vue-devtools-plugin-vue-i18n",label:ke["vue-devtools-plugin-vue-i18n"],packageName:"vue-i18n",homepage:"https://vue-i18n.intlify.dev",logo:"https://vue-i18n.intlify.dev/vue-i18n-devtools-logo.png",componentStateTypes:[Nn],app:e},r=>{je=r,r.on.visitComponentTree(({componentInstance:s,treeNode:i})=>{Sr(s,i,t)}),r.on.inspectComponent(({componentInstance:s,instanceData:i})=>{s.vnode.el&&s.vnode.el.__VUE_I18N__&&i&&(t.mode==="legacy"?s.vnode.el.__VUE_I18N__!==t.global.__composer&&kt(i,s.vnode.el.__VUE_I18N__):kt(i,s.vnode.el.__VUE_I18N__))}),r.addInspector({id:"vue-i18n-resource-inspector",label:ke["vue-i18n-resource-inspector"],icon:"language",treeFilterPlaceholder:dr["vue-i18n-resource-inspector"]}),r.on.getInspectorTree(s=>{s.app===e&&s.inspectorId==="vue-i18n-resource-inspector"&&kr(s,t)});const l=new Map;r.on.getInspectorState(async s=>{if(s.app===e&&s.inspectorId==="vue-i18n-resource-inspector")if(r.unhighlightElement(),$r(s,t),s.nodeId==="global"){if(!l.has(s.app)){const[i]=await r.getComponentInstances(s.app);l.set(s.app,i)}r.highlightElement(l.get(s.app))}else{const i=Vr(s.nodeId,t);i&&r.highlightElement(i)}}),r.on.editInspectorState(s=>{s.app===e&&s.inspectorId==="vue-i18n-resource-inspector"&&Rr(s,t)}),r.addTimelineLayer({id:"vue-i18n-timeline",label:ke["vue-i18n-timeline"],color:mr["vue-i18n-timeline"]}),n(!0)})}catch(r){console.error(r),o(!1)}})}function bn(e){return e.type.name||e.type.displayName||e.type.__file||"Anonymous"}function Sr(e,t,n){const o=n.mode==="composition"?n.global:n.global.__composer;if(e&&e.vnode.el&&e.vnode.el.__VUE_I18N__&&e.vnode.el.__VUE_I18N__!==o){const r={label:`i18n (${bn(e)} Scope)`,textColor:0,backgroundColor:16764185};t.tags.push(r)}}function kt(e,t){const n=Nn;e.state.push({type:n,key:"locale",editable:!0,value:t.locale.value}),e.state.push({type:n,key:"availableLocales",editable:!1,value:t.availableLocales}),e.state.push({type:n,key:"fallbackLocale",editable:!0,value:t.fallbackLocale.value}),e.state.push({type:n,key:"inheritLocale",editable:!0,value:t.inheritLocale}),e.state.push({type:n,key:"messages",editable:!1,value:et(t.messages.value)}),e.state.push({type:n,key:"datetimeFormats",editable:!1,value:t.datetimeFormats.value}),e.state.push({type:n,key:"numberFormats",editable:!1,value:t.numberFormats.value})}function et(e){const t={};return Object.keys(e).forEach(n=>{const o=e[n];V(o)&&"source"in o?t[n]=Pr(o):S(o)?t[n]=et(o):t[n]=o}),t}const Cr={"<":"&lt;",">":"&gt;",'"':"&quot;","&":"&amp;"};function Ar(e){return e.replace(/[<>"&]/g,Dr)}function Dr(e){return Cr[e]||e}function Pr(e){const t=e.source?`("${Ar(e.source)}")`:"(?)";return{_custom:{type:"function",display:`<span>\u0192</span> ${t}`}}}function kr(e,t){e.rootNodes.push({id:"global",label:"Global Scope"});const n=t.mode==="composition"?t.global:t.global.__composer;for(const[o,r]of t.__instances){const l=t.mode==="composition"?r:r.__composer;n!==l&&e.rootNodes.push({id:l.id.toString(),label:`${bn(o)} Scope`})}}function Vr(e,t){let n=null;if(e!=="global"){for(const[o,r]of t.__instances.entries())if(r.id.toString()===e){n=o;break}}return n}function On(e,t){if(e==="global")return t.mode==="composition"?t.global:t.global.__composer;{const n=Array.from(t.__instances.values()).find(o=>o.id.toString()===e);return n?t.mode==="composition"?n:n.__composer:null}}function $r(e,t){const n=On(e.nodeId,t);return n&&(e.state=Fr(n)),null}function Fr(e){const t={},n="Locale related info",o=[{type:n,key:"locale",editable:!0,value:e.locale.value},{type:n,key:"fallbackLocale",editable:!0,value:e.fallbackLocale.value},{type:n,key:"availableLocales",editable:!1,value:e.availableLocales},{type:n,key:"inheritLocale",editable:!0,value:e.inheritLocale}];t[n]=o;const r="Locale messages info",l=[{type:r,key:"messages",editable:!1,value:et(e.messages.value)}];t[r]=l;{const s="Datetime formats info",i=[{type:s,key:"datetimeFormats",editable:!1,value:e.datetimeFormats.value}];t[s]=i;const c="Datetime formats info",u=[{type:c,key:"numberFormats",editable:!1,value:e.numberFormats.value}];t[c]=u}return t}function He(e,t){if(je){let n;t&&"groupId"in t&&(n=t.groupId,delete t.groupId),je.addTimelineEvent({layerId:"vue-i18n-timeline",event:{title:e,groupId:n,time:Date.now(),meta:{},data:t||{},logType:e==="compile-error"?"error":e==="fallback"||e==="missing"?"warning":"default"}})}}function Rr(e,t){const n=On(e.nodeId,t);if(n){const[o]=e.path;o==="locale"&&y(e.state.value)?n.locale.value=e.state.value:o==="fallbackLocale"&&(y(e.state.value)||P(e.state.value)||S(e.state.value))?n.fallbackLocale.value=e.state.value:o==="inheritLocale"&&D(e.state.value)&&(n.inheritLocale=e.state.value)}}const Mr=Q("global-vue-i18n");function Ur(e={},t){const n=D(e.globalInjection)?e.globalInjection:!0,o=!0,r=new Map,[l,s]=Br(e),i=Q(process.env.NODE_ENV!=="production"?"vue-i18n":"");function c(p){return r.get(p)||null}function u(p,f){r.set(p,f)}function m(p){r.delete(p)}{const p={get mode(){return"composition"},get allowComposition(){return o},async install(f,...v){process.env.NODE_ENV!=="production"&&(f.__VUE_I18N__=p),f.__VUE_I18N_SYMBOL__=i,f.provide(f.__VUE_I18N_SYMBOL__,p),n&&Kr(f,p.global),Ir(f,p,...v);const b=f.unmount;if(f.unmount=()=>{p.dispose(),b()},process.env.NODE_ENV!=="production"||!1){if(!await wr(f,p))throw H(A.CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN);const g=Qt();{const N=s;N[ge]&&N[ge](g)}g.on("*",He)}},get global(){return s},dispose(){l.stop()},__instances:r,__getInstance:c,__setInstance:u,__deleteInstance:m};return p}}function tt(e={}){const t=a.getCurrentInstance();if(t==null)throw H(A.MUST_BE_CALL_SETUP_TOP);if(!t.isCE&&t.appContext.app!=null&&!t.appContext.app.__VUE_I18N_SYMBOL__)throw H(A.NOT_INSLALLED);const n=xr(t),o=Wr(n),r=hn(t),l=Gr(e,r);if(l==="global")return yr(o,e,r),o;if(l==="parent"){let c=jr(n,t,e.__useComponent);return c==null&&(process.env.NODE_ENV!=="production"&&ue(Ce(K.NOT_FOUND_PARENT_SCOPE)),c=o),c}const s=n;let i=s.__getInstance(t);if(i==null){const c=U({},e);"__i18n"in r&&(c.__i18n=r.__i18n),o&&(c.__root=o),i=vn(c),Hr(s,t,i),s.__setInstance(t,i)}return i}function Br(e,t,n){const o=a.effectScope();{const r=o.run(()=>vn(e));if(r==null)throw H(A.UNEXPECTED_ERROR);return[o,r]}}function xr(e){{const t=a.inject(e.isCE?Mr:e.appContext.app.__VUE_I18N_SYMBOL__);if(!t)throw H(e.isCE?A.NOT_INSLALLED_WITH_PROVIDE:A.UNEXPECTED_ERROR);return t}}function Gr(e,t){return Ie(e)?"__i18n"in t?"local":"global":e.useScope?e.useScope:"local"}function Wr(e){return e.mode==="composition"?e.global:e.global.__composer}function jr(e,t,n=!1){let o=null;const r=t.root;let l=t.parent;for(;l!=null;){const s=e;if(e.mode==="composition"&&(o=s.__getInstance(l)),o!=null||r===l)break;l=l.parent}return o}function Hr(e,t,n){let o=null;a.onMounted(()=>{if((process.env.NODE_ENV!=="production"||!1)&&!0&&t.vnode.el){t.vnode.el.__VUE_I18N__=n,o=Qt();const r=n;r[ge]&&r[ge](o),o.on("*",He)}},t),a.onUnmounted(()=>{if((process.env.NODE_ENV!=="production"||!1)&&!0&&t.vnode.el&&t.vnode.el.__VUE_I18N__){o&&o.off("*",He);const r=n;r[Ge]&&r[Ge](),delete t.vnode.el.__VUE_I18N__}e.__deleteInstance(t)},t)}const zr=["locale","fallbackLocale","availableLocales"],Yr=["t","rt","d","n","tm"];function Kr(e,t){const n=Object.create(null);zr.forEach(o=>{const r=Object.getOwnPropertyDescriptor(t,o);if(!r)throw H(A.UNEXPECTED_ERROR);const l=a.isRef(r.value)?{get(){return r.value.value},set(s){r.value.value=s}}:{get(){return r.get&&r.get()}};Object.defineProperty(n,o,l)}),e.config.globalProperties.$i18n=n,Yr.forEach(o=>{const r=Object.getOwnPropertyDescriptor(t,o);if(!r||!r.value)throw H(A.UNEXPECTED_ERROR);Object.defineProperty(e.config.globalProperties,`$${o}`,r)})}Ko(So);Xo(en);pr();if(process.env.NODE_ENV!=="production"||__INTLIFY_PROD_DEVTOOLS__){const e=Ke();e.__INTLIFY__=!0,Ro(e.__INTLIFY_DEVTOOLS_GLOBAL_HOOK__)}process.env.NODE_ENV;const Xr={"zhi-xian-shi-zai-xian-she-bei":e=>{const{normalize:t}=e;return t(["\u53EA\u663E\u793A\u5728\u7EBF\u8BBE\u5907"])},"qing-xuan-ze-bu-ju-yang-shi":e=>{const{normalize:t}=e;return t(["\u8BF7\u9009\u62E9\u5E03\u5C40\u6837\u5F0F"])},"biao-zhun-bu-ju":e=>{const{normalize:t}=e;return t(["\u6807\u51C6\u5E03\u5C40"])},"zi-ding-yi-bu-ju":e=>{const{normalize:t}=e;return t(["\u81EA\u5B9A\u4E49\u5E03\u5C40"])}},Jr={"zhi-xian-shi-zai-xian-she-bei":e=>{const{normalize:t}=e;return t(["online only"])},"qing-xuan-ze-bu-ju-yang-shi":e=>{const{normalize:t}=e;return t(["Please Select Play Area Layout"])},"biao-zhun-bu-ju":e=>{const{normalize:t}=e;return t(["Classical"])},"zi-ding-yi-bu-ju":e=>{const{normalize:t}=e;return t(["Custom"])}};var Ln=(e=>(e.zh="zh",e.en="en",e))(Ln||{});let _e;function Qr(e){_e&&_e.dispose(),_e=Ur({locale:e,messages:{zh:Xr,en:Jr},fallbackLocale:"en",silentTranslationWarn:!0,silentFallbackWarn:!0})}function qr(e){Qr(e),_e.global.locale=e}function nt(e){return _e.global.t(e)}var ot=(e=>(e.UserFirst="UserFirst",e.PUFirst="PUFirst",e))(ot||{});const Tn=a.ref("UserFirst");function In(e){Tn.value=e}function Zr(){return Tn}exports.RecursionDeviceGroup=void 0;(e=>{(n=>{function o(s,i){const c=[];for(let u=0;u<s;u++)c.push({id:"testId",pid:"",name:`device-${u}`,online:u%2==0&&i,channels:[]});return c}function r(s){const i=[];for(let c=0;c<s;c++)i.push({id:`groupid-${c}`,name:`group-${c}`,pid:"",onlineCount:0,totalCount:0,devices:o(14,s%2==0),items:r(s-c-1)});return i}function l(s){const i=r(s);return i[s-1].items.push({id:"groupid-ttttttt",name:"group-ttttt",pid:"",onlineCount:0,totalCount:0,devices:[{id:"testId",pid:"",name:"999999",online:!1,channels:[]}],items:[]}),console.log(i),{name:"hah",onlineCount:0,totalCount:0,items:i}}n.RandomDeviceGroup=l})(e.Test||(e.Test={}));function t(n,o){for(let r=0;r<n.length;r++)o(n[r]),t(n[r].items,o)}(n=>{function o(r){const l={},s={};return t(r.items,i=>{l[i.id]=i;for(let c=0;c<i.devices.length;c++)s[i.devices[c].id]=i.devices[c]}),{getGroup(i){return l[i]},getDevice(i){return s[i]},foreachGroup(i){for(let c in l)i(l[c])}}}n.AccessSession=o})(e.Utils||(e.Utils={}))})(exports.RecursionDeviceGroup||(exports.RecursionDeviceGroup={}));exports.VideoAreaLayout=void 0;(e=>{function t(n,o,r){if(r){let s=n*o;return r.forEach(([i,c,u,m])=>{s-=(m-c)*(u-i)-1}),{count:s,row:n,col:o,name:`${s<10?`0${s}`:s}`,areas:r.map(([i,c,u,m])=>({leftTop:{col:i,row:c},rightBottom:{col:u,row:m}}))}}const l=n*o;return{count:l,row:n,col:o,name:`${l<10?`0${l}`:l}`}}e.genLayout=t,(n=>{function o(l,s,i){if(i){const u=l*s-(i[3]-i[1])*(i[2]-i[0])+1;return{count:u,row:l,col:s,name:`${u<10?`0${u}`:u}`,area:{leftTop:{row:i[1],col:i[0]},rightBottom:{row:i[3],col:i[2]}}}}const c=l*s;return{count:c,row:l,col:s,name:`${c<10?`0${c}`:c}`}}n.genLayout=o;function r(){return{count:25,row:5,col:5,name:"12"}}n.getTestLayout=r})(e.Test||(e.Test={}))})(exports.VideoAreaLayout||(exports.VideoAreaLayout={}));const wn=String.prototype.includes,Sn=function(e,t){const n=this.toLocaleLowerCase(),o=e.toLocaleLowerCase();String.prototype.includes=wn;const r=n.includes(o,t);return String.prototype.includes=Sn,r};function Te(e){String.prototype.includes=Sn;const t=e();return String.prototype.includes=wn,t}const es=a.defineComponent({props:{countInfo:Object,controlParams:Object},setup(e){function t(r,l){if(l){let s=0;return l.items.forEach(i=>{s+=t(r,i)}),r(l)+s}return 0}const n=a.computed(()=>t(r=>{var l,s;if(r.devices){let i=(l=r.devices)==null?void 0:l.filter(u=>u.online);const c=(s=e.controlParams)==null?void 0:s.searchStr;return c&&(i=i.filter(u=>Te(()=>{var m;return u.name.includes(c)||((m=u.user)==null?void 0:m.includes(c))||u.id.includes(c)}))),i.length}return 0},e.countInfo));return{totalCount:a.computed(()=>t(r=>{var l;if(r.devices){let s=r.devices;const i=(l=e.controlParams)==null?void 0:l.searchStr;return i&&(s=s.filter(c=>Te(()=>{var u;return c.name.includes(i)||((u=c.user)==null?void 0:u.includes(i))||c.id.includes(i)}))),s.length}return r.totalCount},e.countInfo)),onlineCount:n}}});const Z=(e,t)=>{const n=e.__vccOpts||e;for(const[o,r]of t)n[o]=r;return n},ts={class:"root"},ns={class:"count-show"},os={class:"count-show-online"},rs={key:0};function ss(e,t,n,o,r,l){var s;return a.openBlock(),a.createElementBlock("div",ts,[a.renderSlot(e.$slots,"default",{total:e.totalCount,online:e.onlineCount},void 0,!0),a.createElementVNode("span",ns,[a.createElementVNode("span",os,a.toDisplayString(e.onlineCount),1),(s=e.controlParams)!=null&&s.onlyShowOnline?a.createCommentVNode("",!0):(a.openBlock(),a.createElementBlock("span",rs,"/"+a.toDisplayString(e.totalCount),1))])])}const Cn=Z(es,[["render",ss],["__scopeId","data-v-f6bf9449"]]),An=Object.freeze({left:0,top:0,width:16,height:16}),Dn=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),rt=Object.freeze({...An,...Dn});Object.freeze({...rt,body:"",hidden:!1});({...An});const Pn=Object.freeze({width:null,height:null}),kn=Object.freeze({...Pn,...Dn});function ls(e,t){const n={...e};for(const o in t){const r=t[o],l=typeof r;o in Pn?(r===null||r&&(l==="string"||l==="number"))&&(n[o]=r):l===typeof n[o]&&(n[o]=o==="rotate"?r%4:r)}return n}const as=/[\s,]+/;function is(e,t){t.split(as).forEach(n=>{switch(n.trim()){case"horizontal":e.hFlip=!0;break;case"vertical":e.vFlip=!0;break}})}function cs(e,t=0){const n=e.replace(/^-?[0-9.]*/,"");function o(r){for(;r<0;)r+=4;return r%4}if(n===""){const r=parseInt(e);return isNaN(r)?0:o(r)}else if(n!==e){let r=0;switch(n){case"%":r=25;break;case"deg":r=90}if(r){let l=parseFloat(e.slice(0,e.length-n.length));return isNaN(l)?0:(l=l/r,l%1===0?o(l):0)}}return t}const us=/(-?[0-9.]*[0-9]+[0-9.]*)/g,fs=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function Vt(e,t,n){if(t===1)return e;if(n=n||100,typeof e=="number")return Math.ceil(e*t*n)/n;if(typeof e!="string")return e;const o=e.split(us);if(o===null||!o.length)return e;const r=[];let l=o.shift(),s=fs.test(l);for(;;){if(s){const i=parseFloat(l);isNaN(i)?r.push(l):r.push(Math.ceil(i*t*n)/n)}else r.push(l);if(l=o.shift(),l===void 0)return r.join("");s=!s}}function ds(e,t){const n={...rt,...e},o={...kn,...t},r={left:n.left,top:n.top,width:n.width,height:n.height};let l=n.body;[n,o].forEach(v=>{const b=[],_=v.hFlip,g=v.vFlip;let N=v.rotate;_?g?N+=2:(b.push("translate("+(r.width+r.left).toString()+" "+(0-r.top).toString()+")"),b.push("scale(-1 1)"),r.top=r.left=0):g&&(b.push("translate("+(0-r.left).toString()+" "+(r.height+r.top).toString()+")"),b.push("scale(1 -1)"),r.top=r.left=0);let O;switch(N<0&&(N-=Math.floor(N/4)*4),N=N%4,N){case 1:O=r.height/2+r.top,b.unshift("rotate(90 "+O.toString()+" "+O.toString()+")");break;case 2:b.unshift("rotate(180 "+(r.width/2+r.left).toString()+" "+(r.height/2+r.top).toString()+")");break;case 3:O=r.width/2+r.left,b.unshift("rotate(-90 "+O.toString()+" "+O.toString()+")");break}N%2===1&&(r.left!==r.top&&(O=r.left,r.left=r.top,r.top=O),r.width!==r.height&&(O=r.width,r.width=r.height,r.height=O)),b.length&&(l='<g transform="'+b.join(" ")+'">'+l+"</g>")});const s=o.width,i=o.height,c=r.width,u=r.height;let m,p;return s===null?(p=i===null?"1em":i==="auto"?u:i,m=Vt(p,c/u)):(m=s==="auto"?c:s,p=i===null?Vt(m,u/c):i==="auto"?u:i),{attributes:{width:m.toString(),height:p.toString(),viewBox:r.left.toString()+" "+r.top.toString()+" "+c.toString()+" "+u.toString()},body:l}}const ms=/\sid="(\S+)"/g,_s="IconifyId"+Date.now().toString(16)+(Math.random()*16777216|0).toString(16);let ps=0;function gs(e,t=_s){const n=[];let o;for(;o=ms.exec(e);)n.push(o[1]);return n.length&&n.forEach(r=>{const l=typeof t=="function"?t(r):t+(ps++).toString(),s=r.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+s+')([")]|\\.[a-z])',"g"),"$1"+l+"$3")}),e}function hs(e,t){let n=e.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const o in t)n+=" "+o+'="'+t[o]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+n+">"+e+"</svg>"}function vs(e){return e.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}function Es(e){return'url("data:image/svg+xml,'+vs(e)+'")'}const $t={...kn,inline:!1},ys={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":!0,role:"img"},Ns={display:"inline-block"},ze={backgroundColor:"currentColor"},Vn={backgroundColor:"transparent"},Ft={Image:"var(--svg)",Repeat:"no-repeat",Size:"100% 100%"},Rt={webkitMask:ze,mask:ze,background:Vn};for(const e in Rt){const t=Rt[e];for(const n in Ft)t[e+n]=Ft[n]}const be={};["horizontal","vertical"].forEach(e=>{const t=e.slice(0,1)+"Flip";be[e+"-flip"]=t,be[e.slice(0,1)+"-flip"]=t,be[e+"Flip"]=t});function Mt(e){return e+(e.match(/^[-0-9.]+$/)?"px":"")}const bs=(e,t)=>{const n=ls($t,t),o={...ys},r=t.mode||"svg",l={},s=t.style,i=typeof s=="object"&&!(s instanceof Array)?s:{};for(let _ in t){const g=t[_];if(g!==void 0)switch(_){case"icon":case"style":case"onLoad":case"mode":break;case"inline":case"hFlip":case"vFlip":n[_]=g===!0||g==="true"||g===1;break;case"flip":typeof g=="string"&&is(n,g);break;case"color":l.color=g;break;case"rotate":typeof g=="string"?n[_]=cs(g):typeof g=="number"&&(n[_]=g);break;case"ariaHidden":case"aria-hidden":g!==!0&&g!=="true"&&delete o["aria-hidden"];break;default:{const N=be[_];N?(g===!0||g==="true"||g===1)&&(n[N]=!0):$t[_]===void 0&&(o[_]=g)}}}const c=ds(e,n),u=c.attributes;if(n.inline&&(l.verticalAlign="-0.125em"),r==="svg"){o.style={...l,...i},Object.assign(o,u);let _=0,g=t.id;return typeof g=="string"&&(g=g.replace(/-/g,"_")),o.innerHTML=gs(c.body,g?()=>g+"ID"+_++:"iconifyVue"),a.h("svg",o)}const{body:m,width:p,height:f}=e,v=r==="mask"||(r==="bg"?!1:m.indexOf("currentColor")!==-1),b=hs(m,{...u,width:p+"",height:f+""});return o.style={...l,"--svg":Es(b),width:Mt(u.width),height:Mt(u.height),...Ns,...v?ze:Vn,...i},a.h("span",o)},$n=Object.create(null);function oe(e,t){$n[e]=t}const Ae=a.defineComponent({inheritAttrs:!1,render(){const e=this.$attrs,t=e.icon,n=typeof t=="string"?$n[t]:typeof t=="object"?t:null;return n===null||typeof n!="object"||typeof n.body!="string"?this.$slots.default?this.$slots.default():null:bs({...rt,...n},e)}});var Os=Object.defineProperty,Ls=Object.defineProperties,Ts=Object.getOwnPropertyDescriptors,Ut=Object.getOwnPropertySymbols,Is=Object.prototype.hasOwnProperty,ws=Object.prototype.propertyIsEnumerable,Bt=(e,t,n)=>t in e?Os(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,xt=(e,t)=>{for(var n in t||(t={}))Is.call(t,n)&&Bt(e,n,t[n]);if(Ut)for(var n of Ut(t))ws.call(t,n)&&Bt(e,n,t[n]);return e},Ss=(e,t)=>Ls(e,Ts(t)),Cs=(e,t,n)=>new Promise((o,r)=>{var l=c=>{try{i(n.next(c))}catch(u){r(u)}},s=c=>{try{i(n.throw(c))}catch(u){r(u)}},i=c=>c.done?o(c.value):Promise.resolve(c.value).then(l,s);i((n=n.apply(e,t)).next())});const As={name:"VirtualList",props:{listData:{type:Object,default:()=>[]},itemSize:{type:Number,default:200}},setup(e){const t={screenHeight:a.ref(0),startOffset:a.ref(0),start:a.ref(0),end:a.ref(0)},n=a.ref(),o={listHeight:a.computed(()=>e.listData.length*e.itemSize),visibleCount:a.computed(()=>Math.ceil(t.screenHeight.value/e.itemSize)),getTransform:a.computed(()=>`translate3d(0,${t.startOffset.value}px,0)`),visibleData:a.computed(()=>e.listData.slice(t.start.value,Math.min(t.end.value,e.listData.length)))};return xt(Ss(xt({},o),{virList:n}),t)},mounted(){this.init(),a.watch(()=>this.listData.length,()=>Cs(this,null,function*(){yield this.$nextTick(),this.init()}))},methods:{init(){this.screenHeight=this.$el.clientHeight,this.screenHeight==0&&(this.screenHeight=400),this.start=0,this.end=this.start+this.visibleCount},scrollEvent(){if(this.virList){let e=this.virList.scrollTop;this.start=Math.floor(e/this.itemSize),this.end=this.start+this.visibleCount,this.startOffset=e-e%this.itemSize}}}};function Ds(e,t,n,o,r,l){return a.openBlock(),a.createElementBlock("div",{ref:"virList",class:"infinite-list-container",onScroll:t[0]||(t[0]=s=>l.scrollEvent())},[a.createElementVNode("div",{class:"infinite-list-phantom",style:a.normalizeStyle({height:e.listHeight+"px"})},null,4),a.createElementVNode("div",{class:"infinite-list",style:a.normalizeStyle({transform:e.getTransform})},[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(e.visibleData,s=>(a.openBlock(),a.createElementBlock("div",{ref_for:!0,ref:"items",class:"infinite-list-item",key:s.id,style:a.normalizeStyle({height:n.itemSize+"px",lineHeight:n.itemSize+"px"})},[a.renderSlot(e.$slots,"default",{data:s},void 0,!0)],4))),128))],4)],544)}const Ps=Z(As,[["render",Ds],["__scopeId","data-v-12d2a294"]]);var ks=Object.defineProperty,Vs=Object.defineProperties,$s=Object.getOwnPropertyDescriptors,Gt=Object.getOwnPropertySymbols,Fs=Object.prototype.hasOwnProperty,Rs=Object.prototype.propertyIsEnumerable,Wt=(e,t,n)=>t in e?ks(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Ms=(e,t)=>{for(var n in t||(t={}))Fs.call(t,n)&&Wt(e,n,t[n]);if(Gt)for(var n of Gt(t))Rs.call(t,n)&&Wt(e,n,t[n]);return e},Us=(e,t)=>Vs(e,$s(t));const Bs=a.defineComponent({components:{VirtualList:Ps,CountShow:Cn,Icon:Ae},name:"group-show",props:{deviceGroup:Object,controlParams:Object,uiParams:Object},setup(e,t){const n=Zr(),o=a.ref(),r=a.inject("theme"),l={filterDevice(f){var v;let b=!0;b=Te(()=>{var g,N,O,T;return(g=e.controlParams)!=null&&g.searchStr?f.name.includes((N=e.controlParams)==null?void 0:N.searchStr)||f.id.includes((O=e.controlParams)==null?void 0:O.searchStr)||typeof f.user=="string"&&f.user.includes((T=e.controlParams)==null?void 0:T.searchStr):b});let _=!0;return(v=e.controlParams)!=null&&v.onlyShowOnline&&(_=f.online),b&&_},deviceText(f){return f.user?n.value==ot.PUFirst?f.name.length>0?`${f.name} [${f.id}] [${f.user}]`:` [${f.id}] [${f.user}]`:f.name.length>0?`${f.user} [${f.id}] [${f.name}]`:`${f.user} [${f.id}] []`:f.name.length>0?`${f.name} [${f.id}]`:` [${f.id}]`},groupText(f){if(f)return f.name.length>0?f.name:f.id}},s={filteredDevices:a.computed(()=>{var f;const v=(f=e.deviceGroup)==null?void 0:f.devices,b=v&&v.filter(g=>l.filterDevice(g))||[];return b.filter(g=>g.online).concat(b.filter(g=>!g.online))})},i=a.computed(()=>s.filteredDevices.value.length>10?"400px":`${s.filteredDevices.value.length*40}px`);function c(f,v){return Te(()=>{if(v.length==0)return!0;let b=!1;if((f==null?void 0:f.name.indexOf(v))>0&&(b=!0),b||(b=(f==null?void 0:f.devices.find(_=>_.name.includes(v)||_.id.includes(v)||_.user&&_.user.includes(v)))!=null),!b){for(let _=0;_<f.items.length;_++)if(c(f.items[_],v))return!0}return b})}const u=a.computed(()=>{if(e.controlParams){const f=e.controlParams.searchStr;if(e.deviceGroup)return e.deviceGroup.id==="PGRoot"&&e.deviceGroup.devices.length<=0?!1:c(e.deviceGroup,f)}return!1}),m=a.ref(!1);function p(){var f;(f=e.uiParams)!=null&&f.dbclickExpandsDisable||(m.value=!m.value)}return Us(Ms({OnHeadDbClick:p,innerUtils:l},s),{devicePanelHeight:i,showGroup:u,bShow:m,theme:r,countRef:o})}});const xs={key:0,class:"head-op"},Gs={key:1,style:{display:"inline-block",width:"25px"}},Ws={key:0,class:"group-head-count"},js=["title"],Hs={class:"group-slot"},zs={key:0,style:{"margin-left":"26px"}},Ys=["title"],Ks={class:"device-slot"};function Xs(e,t,n,o,r,l){var s,i,c;const u=a.resolveComponent("Icon"),m=a.resolveComponent("CountShow"),p=a.resolveComponent("group-show"),f=a.resolveComponent("VirtualList");return e.showGroup?a.withDirectives((a.openBlock(),a.createElementBlock("div",{key:0,class:a.normalizeClass("group "+e.theme)},[a.createVNode(m,{countInfo:e.deviceGroup,controlParams:e.controlParams,ref:"countRef"},{default:a.withCtx(({online:v,total:b})=>{var _,g;return[e.deviceGroup&&e.deviceGroup.devices.length+e.deviceGroup.items.length>0?(a.openBlock(),a.createElementBlock("span",xs,[a.createVNode(u,{icon:e.bShow?"minus":"plus",width:"20",onClick:t[0]||(t[0]=N=>e.bShow=!e.bShow),class:"handle-ls-svg"},null,8,["icon"])])):(a.openBlock(),a.createElementBlock("span",Gs)),a.createElementVNode("span",{class:"group-head-db-click",onDblclick:t[1]||(t[1]=(...N)=>e.OnHeadDbClick&&e.OnHeadDbClick(...N))},[a.createVNode(u,{icon:e.bShow?"group":"group-closed",width:"24",class:"group-avatar"},null,8,["icon"]),e.bShow?a.createCommentVNode("",!0):(a.openBlock(),a.createElementBlock("span",Ws,a.toDisplayString((_=e.deviceGroup)==null?void 0:_.items.length),1)),a.renderSlot(e.$slots,"groupHead",{group:e.deviceGroup},void 0,!0),a.createElementVNode("span",{class:"group-name",title:(g=e.deviceGroup)==null?void 0:g.name},a.toDisplayString(e.innerUtils.groupText(e.deviceGroup)),9,js)],32),a.createElementVNode("div",Hs,[a.renderSlot(e.$slots,"group",{group:e.deviceGroup},void 0,!0)])]}),_:3},8,["countInfo","controlParams"]),e.bShow?(a.openBlock(),a.createElementBlock("div",zs,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList((s=e.deviceGroup)==null?void 0:s.items,(v,b)=>(a.openBlock(),a.createBlock(p,{key:b,deviceGroup:v,"ui-params":e.uiParams,controlParams:e.controlParams},{groupHead:a.withCtx(({group:_})=>[a.renderSlot(e.$slots,"groupHead",{group:_},void 0,!0)]),group:a.withCtx(({group:_})=>[a.renderSlot(e.$slots,"group",{group:_},void 0,!0)]),deviceHead:a.withCtx(({device:_,group:g})=>[a.renderSlot(e.$slots,"deviceHead",{device:_,group:g},void 0,!0)]),device:a.withCtx(({device:_,group:g})=>[a.renderSlot(e.$slots,"device",{device:_,group:g},void 0,!0)]),_:2},1032,["deviceGroup","ui-params","controlParams"]))),128)),a.createElementVNode("div",{class:"device-show-div",style:a.normalizeStyle(`height: ${e.filteredDevices.length>10?"400px":`${e.filteredDevices.length*40}px`}`)},[a.createVNode(f,{"list-data":e.filteredDevices,"item-size":40},{default:a.withCtx(({data:v})=>[a.createElementVNode("div",{class:a.normalizeClass(v.online&&"online-device")},[a.createVNode(u,{icon:"user",width:"16",class:"device-avatar"}),a.renderSlot(e.$slots,"deviceHead",{device:v,group:e.deviceGroup},void 0,!0),a.createElementVNode("span",{title:e.innerUtils.deviceText(v),class:"device-name"},a.toDisplayString(e.innerUtils.deviceText(v)),9,Ys),a.createElementVNode("div",Ks,[a.renderSlot(e.$slots,"device",{device:v,group:e.deviceGroup},void 0,!0)])],2)]),_:3},8,["list-data"])],4)])):a.createCommentVNode("",!0)],2)),[[a.vShow,!((i=e.controlParams)!=null&&i.onlyShowOnline)||((c=e.countRef)==null?void 0:c.onlineCount)]]):a.createCommentVNode("",!0)}const Js=Z(Bs,[["render",Xs],["__scopeId","data-v-83ef1e48"]]),Qs={width:1024,height:1024,body:'<path fill="currentColor" d="M384 192v640l384-320.064z"/>'},qs={width:1024,height:1024,body:'<path fill="currentColor" d="M878.08 448H241.92l-96 384h636.16l96-384zM832 384v-64H485.76L357.504 192H128v448l57.92-231.744A32 32 0 0 1 216.96 384H832zm-24.96 512H96a32 32 0 0 1-32-32V160a32 32 0 0 1 32-32h287.872l128.384 128H864a32 32 0 0 1 32 32v96h23.04a32 32 0 0 1 31.04 39.744l-112 448A32 32 0 0 1 807.04 896z"/>'},Zs={width:1024,height:1024,body:'<path fill="currentColor" d="M128 192v640h768V320H485.76L357.504 192H128zm-32-64h287.872l128.384 128H928a32 32 0 0 1 32 32v576a32 32 0 0 1-32 32H96a32 32 0 0 1-32-32V160a32 32 0 0 1 32-32z"/>'},el={width:1024,height:1024,body:'<path fill="currentColor" d="M628.736 528.896A416 416 0 0 1 928 928H96a415.872 415.872 0 0 1 299.264-399.104L512 704l116.736-175.104zM720 304a208 208 0 1 1-416 0a208 208 0 0 1 416 0z"/>'},tl={width:1024,height:1024,body:'<path fill="currentColor" d="M480 480V128a32 32 0 0 1 64 0v352h352a32 32 0 1 1 0 64H544v352a32 32 0 1 1-64 0V544H128a32 32 0 0 1 0-64h352z"/>'},nl={width:1024,height:1024,body:'<path fill="currentColor" d="M128 544h768a32 32 0 1 0 0-64H128a32 32 0 0 0 0 64z"/>'};oe("right",Qs);oe("group",qs);oe("group-closed",Zs);oe("user",el);oe("plus",tl);oe("minus",nl);const ol=a.defineComponent({components:{CountShow:Cn,GroupShow:Js},props:{deviceGroup:Object,theme:{type:String,default:""},locale:String,uiControl:Object},methods:{onCheckBoxChange(e){const t=typeof e=="boolean"?e:!this.controlParams.onlyShowOnline;this.controlParams.onlyShowOnline=t,this.inputShowOnlineOnly&&(this.inputShowOnlineOnly.checked=t)},onSearchChange(){var e;this.inputSearchRef&&(this.controlParams.searchStr=(e=this.inputSearchRef)==null?void 0:e.value)},search(e){this.controlParams.searchStr=e}},setup(e){a.provide("theme",e.theme);const t=a.ref({onlyShowOnline:!1,searchStr:""}),n=a.ref(),o=a.ref();return{i18nT:nt,inputShowOnlineOnly:n,inputSearchRef:o,controlParams:t}}});const rl={class:"device-group-list"},sl={class:"search-panel"},ll={for:"onlineShow"},al={class:"device-panel"};function il(e,t,n,o,r,l){var s;const i=a.resolveComponent("CountShow"),c=a.resolveComponent("group-show");return a.openBlock(),a.createElementBlock("div",rl,[a.createElementVNode("div",sl,[a.createVNode(i,{countInfo:e.deviceGroup,"control-params":e.controlParams},{default:a.withCtx(()=>[a.createElementVNode("input",{type:"checkbox",id:"onlineShow",value:"onlineShow",onChange:t[0]||(t[0]=()=>e.onCheckBoxChange()),ref:"inputShowOnlineOnly"},null,544),a.createElementVNode("label",ll,a.toDisplayString(e.i18nT("zhi-xian-shi-zai-xian-she-bei")),1)]),_:1},8,["countInfo","control-params"])]),a.createElementVNode("div",al,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList((s=e.deviceGroup)==null?void 0:s.items,(u,m)=>(a.openBlock(),a.createBlock(c,{controlParams:e.controlParams,key:m,"ui-params":e.uiControl,deviceGroup:u},{groupHead:a.withCtx(({group:p})=>[a.renderSlot(e.$slots,"groupHead",{group:p},void 0,!0)]),group:a.withCtx(({group:p})=>[a.renderSlot(e.$slots,"group",{group:p},void 0,!0)]),deviceHead:a.withCtx(({device:p,group:f})=>[a.renderSlot(e.$slots,"deviceHead",{device:p,group:f},void 0,!0)]),device:a.withCtx(({device:p,group:f})=>[a.renderSlot(e.$slots,"device",{device:p,group:f},void 0,!0)]),_:2},1032,["controlParams","ui-params","deviceGroup"]))),128))])])}const cl=Z(ol,[["render",il],["__scopeId","data-v-beb643d9"]]);var ul=Object.defineProperty,fl=Object.defineProperties,dl=Object.getOwnPropertyDescriptors,jt=Object.getOwnPropertySymbols,ml=Object.prototype.hasOwnProperty,_l=Object.prototype.propertyIsEnumerable,Ht=(e,t,n)=>t in e?ul(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Fn=(e,t)=>{for(var n in t||(t={}))ml.call(t,n)&&Ht(e,n,t[n]);if(jt)for(var n of jt(t))_l.call(t,n)&&Ht(e,n,t[n]);return e},pl=(e,t)=>fl(e,dl(t));const de=6,zt=de*2;function gl(e,t){return e.map(({leftTop:{col:n,row:o},rightBottom:{col:r,row:l}})=>`<line x1="${n*t.col+de}" y1="${o*t.row+de}" x2="${r*t.col+de}" y2="${l*t.row+de}" stroke="black" stroke-width="5"/>`).join(" ")}function hl(e,t,n){return n.findIndex(o=>e>=o.leftTop.row&&e<o.rightBottom.row&&t>=o.leftTop.col&&t<o.rightBottom.col)>=0}function vl(e,t,n){n.forEach(o=>{const r=pl(Fn({},o.leftTop),{id:Rn(o.leftTop),layout:{left:100/t.col*o.leftTop.col,top:100/t.row*o.leftTop.row,width:100/t.col*(o.rightBottom.col-o.leftTop.col),height:100/t.row*(o.rightBottom.row-o.leftTop.row)},h:o.rightBottom.col-o.leftTop.col,w:o.rightBottom.row-o.leftTop.row});e.push(r)})}function Rn(e){return`${e.row}-${e.col}`}const Yt="ComponentsDefaultLayoutKeyAF84566",Kt="ComponentsCustomLayoutsKeyAF84566";function El(e){const t=[],n=[];for(let o=0;o<e.points.length/2;o++)n.push(e.points.slice(o*2,o*2+2));if(typeof e.row=="number"){const o=e.row;n.forEach(([r,l])=>{t.push({leftTop:{row:o,col:r},rightBottom:{row:o,col:l}})})}if(typeof e.col=="number"){const o=e.col;n.forEach(([r,l])=>{t.push({leftTop:{col:o,row:r},rightBottom:{col:o,row:l}})})}return t}const he={TransLayoutToFrams(e){const t=[];e.area&&t.push(e.area),e.areas&&t.push(...e.areas);const n=[];for(let o=0;o<e.row;o++)for(let r=0;r<e.col;r++){if(hl(o,r,t))continue;const l=Fn({layout:{left:100/e.col*r,top:100/e.row*o,width:100/e.col,height:100/e.row},id:Rn({row:o,col:r})},{row:o,col:r,w:1,h:1});n.push(l)}return vl(n,e,t),n},TransLayoutToSVG(e,t){const n=[];e.area&&n.push(e.area),e.areas&&n.push(...e.areas);const o=[],r=[];for(let u=0;u<=e.row;u++)o.push({row:u,points:[0,e.col]});for(let u=0;u<=e.col;u++)r.push({col:u,points:[0,e.row]});n.forEach(({leftTop:{row:u,col:m},rightBottom:{row:p,col:f}})=>{for(let v=u+1;v<p;v++)o[v].points.push(m,f);for(let v=m+1;v<f;v++)r[v].points.push(u,p)});const l=o.concat(...r),s=[];l.forEach(u=>{u.points=u.points.sort(),s.push(...El(u))});const i={row:t.height/e.row,col:t.width/e.col},c=gl(s,i);return`<svg viewBox='0 0 ${t.width+zt} ${t.height+zt} ' width="100%" height="100%"> ${c} </svg>`},StorageDefaultLayout:{get(){const e=localStorage.getItem(Yt);if(e==null)return null;try{return JSON.parse(e)}catch{return null}},set(e){localStorage.setItem(Yt,JSON.stringify(e))}},CustomLayouts:{get(){const e=localStorage.getItem(Kt);if(e==null)return[];try{return JSON.parse(e)}catch{return[]}},set(e){localStorage.setItem(Kt,JSON.stringify(e))}}},yl=a.defineComponent({emits:{onselect(e,t){return!0}},props:{defaultLayout:{type:Object},layouts:{type:Object}},setup(e){const t=a.ref([]);return e.layouts&&e.layouts.forEach(n=>{t.value.push({svg:he.TransLayoutToSVG(n,{width:100,height:100}),layout:n,select:JSON.stringify(n)==JSON.stringify(e.defaultLayout)})}),{layoutInfos:t}},mounted(){const e=this.layoutInfos.find(t=>t.select);e&&this.$emit("onselect",{layout:e.layout,cancel:!1},e.svg)},methods:{SelectLayoutById(e){const t=this.layoutInfos.find(n=>JSON.stringify(n.layout)==e);return t?(t.select||this.selectClick(t),!0):!1},selectClick(e){if(e.select==!1){const t={layout:e.layout,cancel:!1};this.$emit("onselect",t,e.svg),t.cancel||(this.layoutInfos.forEach(n=>{n.select=!1}),e.select=!0)}}}});const Nl=["onClick"],bl={style:{position:"relative",display:"inline-block",margin:"10px"}},Ol=["innerHTML"],Ll={style:{"vertical-align":"middle"}};function Tl(e,t,n,o,r,l){return a.openBlock(),a.createElementBlock("div",null,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(e.layoutInfos,s=>(a.openBlock(),a.createElementBlock("div",{class:a.normalizeClass(s.select?"layout-item layout-item-select":"layout-item"),onClick:i=>e.selectClick(s)},[a.createElementVNode("div",bl,[a.createElementVNode("div",{innerHTML:s.svg,class:"svg-style"},null,8,Ol),a.createElementVNode("span",Ll,a.toDisplayString(s.layout.name),1)])],10,Nl))),256))])}const Mn=Z(yl,[["render",Tl],["__scopeId","data-v-775da49d"]]),Il=a.defineComponent({props:{layout:{type:Object}},setup(e){const t=a.computed(()=>e.layout?he.TransLayoutToFrams(e.layout).sort((o,r)=>o.row==r.row?o.col-r.col:o.row-r.row):[]);return{areas:a.computed(()=>t.value.map(o=>({id:o.id,row:o.row,col:o.col,h:o.h,w:o.w}))),frameRef:t}}});const wl={style:{position:"relative",height:"100%",width:"100%"}};function Sl(e,t,n,o,r,l){return a.openBlock(),a.createElementBlock("div",wl,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(e.frameRef,({layout:s,id:i,row:c,col:u,w:m,h:p},f)=>(a.openBlock(),a.createElementBlock("div",{class:"play-area",key:f,style:a.normalizeStyle(`position: absolute; top: calc(${s.top}%); left: calc(${s.left}%); width: calc(${s.width}%); height: calc(${s.height}%);`)},[a.renderSlot(e.$slots,"default",{id:i,row:c,col:u,w:m,h:p,index:f,areas:e.areas},void 0,!0)],4))),128))])}const Un=Z(Il,[["render",Sl],["__scopeId","data-v-e6baa31a"]]),Cl={width:1024,height:1024,body:'<path fill="currentColor" d="M195.2 195.2a64 64 0 0 1 90.496 0L512 421.504L738.304 195.2a64 64 0 0 1 90.496 90.496L602.496 512L828.8 738.304a64 64 0 0 1-90.496 90.496L512 602.496L285.696 828.8a64 64 0 0 1-90.496-90.496L421.504 512L195.2 285.696a64 64 0 0 1 0-90.496z"/>'};oe("close",Cl);const Al=a.defineComponent({components:{VideoAreaLayoutShow:Un,Icon:Ae},setup(){const e=a.ref(3),t=a.ref(3),n=a.ref([]),o=a.computed(()=>exports.VideoAreaLayout.genLayout(e.value,t.value,n.value)),r=a.ref({}),l=a.ref([]);return{areas:n,row:e,col:t,layout:o,selectAreaInfo:r,tempSelectAreaInfo:l}},mounted(){window.addEventListener("mouseup",this.onMouseUp)},unmounted(){window.removeEventListener("mouseup",this.onMouseUp)},methods:{onDelLayout(e){console.log(this.layout,e);const t=this.areas.findIndex(([n,o])=>e.row==o&&e.col==n);t>=0&&this.areas.splice(t,1)},onMouseUp(){if(this.selectAreaInfo.error){this.selectAreaInfo.start=void 0,this.selectAreaInfo.end=void 0,this.selectAreaInfo.error=void 0;return}if(this.selectAreaInfo.start){const e=this.GetLayouts();e&&((e[1].row-e[0].row>0||e[1].col-e[0].col>0)&&this.areas.push([e[0].col,e[0].row,e[1].col+1,e[1].row+1]),console.log(this.areas),this.selectAreaInfo.start=void 0,this.selectAreaInfo.end=void 0)}},GetLayouts(){var e,t,n,o,r,l,s,i;if(this.selectAreaInfo.start&&this.selectAreaInfo.end)return[{id:"",col:Math.min((e=this.selectAreaInfo.start)==null?void 0:e.col,(t=this.selectAreaInfo.end)==null?void 0:t.col),row:Math.min((n=this.selectAreaInfo.start)==null?void 0:n.row,(o=this.selectAreaInfo.end)==null?void 0:o.row),areas:[]},{id:"",col:Math.max((r=this.selectAreaInfo.start)==null?void 0:r.col,(l=this.selectAreaInfo.end)==null?void 0:l.col),row:Math.max((s=this.selectAreaInfo.start)==null?void 0:s.row,(i=this.selectAreaInfo.end)==null?void 0:i.row),areas:[]}]},genClass(e){if(e.w&&e.w>1||e.h&&e.h>1)return"area-item area-compose";if(this.selectAreaInfo.error&&e.row==this.selectAreaInfo.error.row&&e.col==this.selectAreaInfo.error.col)return"area-item area-select-cant";let t="area-item";const n=this.GetLayouts();if(n){const[o,r]=n;this.checkVaild([o.col,o.row,r.col,r.row])?e.col>=o.col&&e.col<=r.col&&e.row>=o.row&&e.row<=r.row&&(t+=" area-select"):t+=" area-select-cant"}return t},onMouseDown(e){e.w&&e.w>1||e.h&&e.h>1||(this.selectAreaInfo.start=e,this.selectAreaInfo.end=e)},checkVaild(e){e[0]>e[2];const[t,n]=e[0]>e[2]?[e[2],e[0]]:[e[0],e[2]],[o,r]=e[1]>e[3]?[e[3],e[1]]:[e[1],e[3]];console.log(t,n,o,r);for(let l=t;l<=n;l++)for(let s=o;s<=r;s++)if(this.areas.find(i=>this.checkPointInArea([l,s],i)))return!1;return!0},checkPointInArea([e,t],[n,o,r,l]){return console.log(e,t,n,o,r,l),e>=n&&e<r&&t>=o&&t<l},onMouseOver(e,t){t.w&&t.w>1||t.h&&t.h>1||(e.buttons==1?this.selectAreaInfo.start&&(this.selectAreaInfo.error=void 0,this.checkVaild([this.selectAreaInfo.start.col,this.selectAreaInfo.start.row,t.col,t.row])?this.selectAreaInfo.end=t:this.selectAreaInfo.error=t):this.selectAreaInfo.start&&(this.selectAreaInfo.start=void 0,this.selectAreaInfo.end=void 0))}}});const Dl={style:{height:"calc(100% - 80px)",width:"calc(100%)",position:"relative"}},Pl=["onMouseenter","onMousedown"],kl={style:{"font-size":"32px"}},Vl={style:{display:"inline-block",width:"40px","text-align":"center"}},$l={style:{display:"inline-block",width:"calc(100% - 40px)","text-align":"right","vertical-align":"middle"}},Fl=["onClick"];function Rl(e,t,n,o,r,l){const s=a.resolveComponent("Icon"),i=a.resolveComponent("VideoAreaLayoutShow");return a.openBlock(),a.createElementBlock("div",Dl,[a.createVNode(i,{layout:e.layout},{default:a.withCtx(c=>[a.createElementVNode("div",{class:a.normalizeClass(e.genClass(c)),onMouseenter:u=>e.onMouseOver(u,c),onMousedown:u=>e.onMouseDown(c),style:{"user-select":"none"}},[a.createElementVNode("div",kl,[a.createElementVNode("div",Vl,a.toDisplayString(c.index+1),1),a.createElementVNode("div",$l,[a.createElementVNode("span",{onClick:u=>e.onDelLayout(c)},[c.w>1||c.h>1?(a.openBlock(),a.createBlock(s,{key:0,icon:"close",class:"close-btn"})):a.createCommentVNode("",!0)],8,Fl)])])],42,Pl)]),_:1},8,["layout"])])}const Ml=Z(Al,[["render",Rl],["__scopeId","data-v-c3d9b21a"]]),Ul=a.defineComponent({components:{Icon:Ae,LayoutShow:Mn,CustomLayoutGen:Ml},setup(){return{layout:a.ref(he.CustomLayouts.get()),i18nT:nt}}});const Bl={style:{"margin-left":"10px","margin-top":"10px"}},xl={class:"plus-custom-layout"},Gl=a.createTextVNode("\u6DFB\u52A0\u5E03\u5C40 "),Wl={style:{"margin-top":"10px"}},jl={style:{height:"300px"}};function Hl(e,t,n,o,r,l){const s=a.resolveComponent("Icon"),i=a.resolveComponent("CustomLayoutGen");return a.openBlock(),a.createElementBlock("div",Bl,[a.createElementVNode("span",null,[a.createTextVNode(a.toDisplayString(e.i18nT("zi-ding-yi-bu-ju"))+"\uFF1A ",1),a.createElementVNode("span",xl,[a.createVNode(s,{icon:"plus",style:{"vertical-align":"text-top"}}),Gl])]),a.createElementVNode("div",Wl,[a.createElementVNode("div",jl,[a.createVNode(i)])])])}const zl=Z(Ul,[["render",Hl],["__scopeId","data-v-f8b51862"]]),Yl=a.defineComponent({emits:{LayoutChange(e,t,n){return!0}},components:{UseCustomLayoutSelector:zl,LayoutShow:Mn,Icon:Ae},setup(e,t){const n=[exports.VideoAreaLayout.Test.genLayout(1,1),exports.VideoAreaLayout.Test.genLayout(1,2),exports.VideoAreaLayout.Test.genLayout(2,2),exports.VideoAreaLayout.Test.genLayout(2,3),exports.VideoAreaLayout.genLayout(3,3,[[0,0,2,2],[2,0,3,2]]),exports.VideoAreaLayout.Test.genLayout(3,3,[0,0,2,2]),exports.VideoAreaLayout.Test.genLayout(3,3,[1,0,2,3]),exports.VideoAreaLayout.Test.genLayout(4,4,[0,0,3,3]),exports.VideoAreaLayout.Test.genLayout(3,3),exports.VideoAreaLayout.Test.genLayout(5,5,[0,0,4,4]),exports.VideoAreaLayout.Test.genLayout(6,6,[0,0,5,5]),exports.VideoAreaLayout.Test.genLayout(4,4,[1,1,3,3]),exports.VideoAreaLayout.Test.genLayout(4,4),exports.VideoAreaLayout.Test.genLayout(5,5),exports.VideoAreaLayout.Test.genLayout(6,6),exports.VideoAreaLayout.genLayout(8,8,[[0,0,3,3],[3,0,5,2],[5,0,7,2]])],o=a.ref();let r=he.StorageDefaultLayout.get();const l=r||n[2];function s(_,g){return t.emit("LayoutChange",JSON.stringify(_.layout),_,()=>{m.value&&p()}),_.cancel||(u.value=g),!_.cancel}let i=!0;const c=function(_,g){JSON.stringify(r)!=JSON.stringify(_)&&s(_,g)&&i&&(r=_.layout,he.StorageDefaultLayout.set(_.layout)),u.value.length==0&&s(_,g)},u=a.ref(""),m=a.ref(!1),p=()=>{m.value=!m.value,m.value?window.addEventListener("click",f):window.removeEventListener("click",f)},f=_=>{m.value&&_.composedPath().findIndex(({className:N})=>N=="layout-switcher")<0&&(m.value=!1,window.removeEventListener("click",f))};return{i18nT:nt,selectClassicalLayout:(_,g,N)=>{var O;N||(i=!1);const T=n.find(L=>L.row==_&&L.col==g&&typeof L.area>"u"&&typeof L.areas>"u");T&&((O=o.value)==null||O.SelectLayoutById(JSON.stringify(T))),N=!0},selectLoyoutById:(_,g)=>{var N;g||(i=!1),(N=o.value)==null||N.SelectLayoutById(_),g=!0},refLayoutShow:o,clickShowSelectPanel:p,showSelectPanel:m,onselect:c,svgSelect:u,layout:n,defaultLayout:l}},expose:["selectLoyoutById","selectClassicalLayout"]});const Kl={class:"layout-switcher"},Xl=["innerHTML"],Jl={class:"switch-panel"},Ql={style:{"margin-left":"10px"}},ql={style:{"margin-left":"10px",padding:"10px"}},Zl={style:{"margin-left":"10px"}};function ea(e,t,n,o,r,l){const s=a.resolveComponent("LayoutShow");return a.openBlock(),a.createElementBlock("div",Kl,[a.createElementVNode("div",{onClick:t[0]||(t[0]=(...i)=>e.clickShowSelectPanel&&e.clickShowSelectPanel(...i)),class:"switch-switcher"},[a.createElementVNode("div",{innerHTML:e.svgSelect,style:{height:"32px",display:"inline-block","vertical-align":"middle",width:"32px"}},null,8,Xl)]),a.withDirectives(a.createElementVNode("div",Jl,[a.createElementVNode("div",Ql,[a.createElementVNode("span",null,a.toDisplayString(e.i18nT("qing-xuan-ze-bu-ju-yang-shi")),1)]),a.createElementVNode("div",ql,[a.createElementVNode("div",Zl,[a.createElementVNode("span",null,a.toDisplayString(e.i18nT("biao-zhun-bu-ju"))+"\uFF1A",1),a.createVNode(s,{ref:"refLayoutShow",layouts:e.layout,defaultLayout:e.defaultLayout,onOnselect:e.onselect},null,8,["layouts","defaultLayout","onOnselect"])])])],512),[[a.vShow,e.showSelectPanel]])])}const ta=Z(Yl,[["render",ea],["__scopeId","data-v-336e6f2c"]]),Xt={RecursionDeviceGroup:cl,VideoAreasLayoutShow:Un,MultiVideoAreaLayoutSwitch:ta},na={install(e,t){qr(t&&typeof t.locale<"u"?t.locale:Ln.en),t.deviceListDisplayStyle&&In(t.deviceListDisplayStyle);for(const n in Xt){const o=Xt[n];e.component(n,o)}}};exports.DeviceListNameDisplayStyle=ot;exports.SetDeviceListNameDisplayStyle=In;exports.default=na;
27
+ */const _r="9.2.2";function pr(){let e=!1;typeof __INTLIFY_PROD_DEVTOOLS__!="boolean"&&(Ke().__INTLIFY_PROD_DEVTOOLS__=!1),process.env.NODE_ENV!=="production"&&e&&console.warn("You are running the esm-bundler build of vue-i18n. It is recommended to configure your bundler to explicitly replace feature flag globals with boolean literals to get proper tree-shaking in the final bundle.")}let _n=W.__EXTEND_POINT__;const ae=()=>++_n,K={FALLBACK_TO_ROOT:_n,NOT_SUPPORTED_PRESERVE:ae(),NOT_SUPPORTED_FORMATTER:ae(),NOT_SUPPORTED_PRESERVE_DIRECTIVE:ae(),NOT_SUPPORTED_GET_CHOICE_INDEX:ae(),COMPONENT_NAME_LEGACY_COMPATIBLE:ae(),NOT_FOUND_PARENT_SCOPE:ae()},gr={[K.FALLBACK_TO_ROOT]:"Fall back to {type} '{key}' with root locale.",[K.NOT_SUPPORTED_PRESERVE]:"Not supported 'preserve'.",[K.NOT_SUPPORTED_FORMATTER]:"Not supported 'formatter'.",[K.NOT_SUPPORTED_PRESERVE_DIRECTIVE]:"Not supported 'preserveDirectiveContent'.",[K.NOT_SUPPORTED_GET_CHOICE_INDEX]:"Not supported 'getChoiceIndex'.",[K.COMPONENT_NAME_LEGACY_COMPATIBLE]:"Component name legacy compatible: '{name}' -> 'i18n'",[K.NOT_FOUND_PARENT_SCOPE]:"Not found parent scope. use the global scope."};function Ce(e,...t){return Ye(gr[e],...t)}let pn=R.__EXTEND_POINT__;const x=()=>++pn,A={UNEXPECTED_RETURN_TYPE:pn,INVALID_ARGUMENT:x(),MUST_BE_CALL_SETUP_TOP:x(),NOT_INSLALLED:x(),NOT_AVAILABLE_IN_LEGACY_MODE:x(),REQUIRED_VALUE:x(),INVALID_VALUE:x(),CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN:x(),NOT_INSLALLED_WITH_PROVIDE:x(),UNEXPECTED_ERROR:x(),NOT_COMPATIBLE_LEGACY_VUE_I18N:x(),BRIDGE_SUPPORT_VUE_2_ONLY:x(),MUST_DEFINE_I18N_OPTION_IN_ALLOW_COMPOSITION:x(),NOT_AVAILABLE_COMPOSITION_IN_LEGACY:x(),__EXTEND_POINT__:x()};function H(e,...t){return qt(e,null,process.env.NODE_ENV!=="production"?{messages:hr,args:t}:void 0)}const hr={[A.UNEXPECTED_RETURN_TYPE]:"Unexpected return type in composer",[A.INVALID_ARGUMENT]:"Invalid argument",[A.MUST_BE_CALL_SETUP_TOP]:"Must be called at the top of a `setup` function",[A.NOT_INSLALLED]:"Need to install with `app.use` function",[A.UNEXPECTED_ERROR]:"Unexpected error",[A.NOT_AVAILABLE_IN_LEGACY_MODE]:"Not available in legacy mode",[A.REQUIRED_VALUE]:"Required in value: {0}",[A.INVALID_VALUE]:"Invalid value",[A.CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN]:"Cannot setup vue-devtools plugin",[A.NOT_INSLALLED_WITH_PROVIDE]:"Need to install with `provide` function",[A.NOT_COMPATIBLE_LEGACY_VUE_I18N]:"Not compatible legacy VueI18n.",[A.BRIDGE_SUPPORT_VUE_2_ONLY]:"vue-i18n-bridge support Vue 2.x only",[A.MUST_DEFINE_I18N_OPTION_IN_ALLOW_COMPOSITION]:"Must define \u2018i18n\u2019 option or custom block in Composition API with using local scope in Legacy API mode",[A.NOT_AVAILABLE_COMPOSITION_IN_LEGACY]:"Not available Compostion API in Legacy API mode. Please make sure that the legacy API mode is working properly"},Ue=Q("__transrateVNode"),Be=Q("__datetimeParts"),xe=Q("__numberParts"),ge=Q("__enableEmitter"),Ge=Q("__disableEmitter"),vr=Q("__setPluralRules");Q("__intlifyMeta");const Er=Q("__injectWithOption");function We(e){if(!S(e))return e;for(const t in e)if(!!Xe(e,t))if(!t.includes("."))S(e[t])&&We(e[t]);else{const n=t.split("."),o=n.length-1;let r=e;for(let l=0;l<o;l++)n[l]in r||(r[n[l]]={}),r=r[n[l]];r[n[o]]=e[t],delete e[t],S(r[n[o]])&&We(r[n[o]])}return e}function gn(e,t){const{messages:n,__i18n:o,messageResolver:r,flatJson:l}=t,s=I(n)?n:P(o)?{}:{[e]:{}};if(P(o)&&o.forEach(i=>{if("locale"in i&&"resource"in i){const{locale:c,resource:u}=i;c?(s[c]=s[c]||{},me(u,s[c])):me(u,s)}else y(i)&&me(JSON.parse(i),s)}),r==null&&l)for(const i in s)Xe(s,i)&&We(s[i]);return s}const Ne=e=>!S(e)||P(e);function me(e,t){if(Ne(e)||Ne(t))throw H(A.INVALID_VALUE);for(const n in e)Xe(e,n)&&(Ne(e[n])||Ne(t[n])?t[n]=e[n]:me(e[n],t[n]))}function hn(e){return e.type}function yr(e,t,n){let o=S(t.messages)?t.messages:{};"__i18nGlobal"in n&&(o=gn(e.locale.value,{messages:o,__i18n:n.__i18nGlobal}));const r=Object.keys(o);r.length&&r.forEach(l=>{e.mergeLocaleMessage(l,o[l])});{if(S(t.datetimeFormats)){const l=Object.keys(t.datetimeFormats);l.length&&l.forEach(s=>{e.mergeDateTimeFormat(s,t.datetimeFormats[s])})}if(S(t.numberFormats)){const l=Object.keys(t.numberFormats);l.length&&l.forEach(s=>{e.mergeNumberFormat(s,t.numberFormats[s])})}}}function Tt(e){return a.createVNode(a.Text,null,e,0)}const It="__INTLIFY_META__";let wt=0;function St(e){return(t,n,o,r)=>e(n,o,a.getCurrentInstance()||void 0,r)}const Nr=()=>{const e=a.getCurrentInstance();let t=null;return e&&(t=hn(e)[It])?{[It]:t}:null};function vn(e={},t){const{__root:n}=e,o=n===void 0;let r=D(e.inheritLocale)?e.inheritLocale:!0;const l=a.ref(n&&r?n.locale.value:y(e.locale)?e.locale:Qe),s=a.ref(n&&r?n.fallbackLocale.value:y(e.fallbackLocale)||P(e.fallbackLocale)||I(e.fallbackLocale)||e.fallbackLocale===!1?e.fallbackLocale:l.value),i=a.ref(gn(l.value,e)),c=a.ref(I(e.datetimeFormats)?e.datetimeFormats:{[l.value]:{}}),u=a.ref(I(e.numberFormats)?e.numberFormats:{[l.value]:{}});let m=n?n.missingWarn:D(e.missingWarn)||Oe(e.missingWarn)?e.missingWarn:!0,p=n?n.fallbackWarn:D(e.fallbackWarn)||Oe(e.fallbackWarn)?e.fallbackWarn:!0,f=n?n.fallbackRoot:D(e.fallbackRoot)?e.fallbackRoot:!0,v=!!e.fallbackFormat,b=V(e.missing)?e.missing:null,_=V(e.missing)?St(e.missing):null,g=V(e.postTranslation)?e.postTranslation:null,N=n?n.warnHtmlMessage:D(e.warnHtmlMessage)?e.warnHtmlMessage:!0,O=!!e.escapeParameter;const T=n?n.modifiers:I(e.modifiers)?e.modifiers:{};let L=e.pluralRules||n&&n.pluralRules,E;E=(()=>{o&&gt(null);const d={version:_r,locale:l.value,fallbackLocale:s.value,messages:i.value,modifiers:T,pluralRules:L,missing:_===null?void 0:_,missingWarn:m,fallbackWarn:p,fallbackFormat:v,unresolving:!0,postTranslation:g===null?void 0:g,warnHtmlMessage:N,escapeParameter:O,messageResolver:e.messageResolver,__meta:{framework:"vue"}};d.datetimeFormats=c.value,d.numberFormats=u.value,d.__datetimeFormatters=I(E)?E.__datetimeFormatters:void 0,d.__numberFormatters=I(E)?E.__numberFormatters:void 0,process.env.NODE_ENV!=="production"&&(d.__v_emitter=I(E)?E.__v_emitter:void 0);const h=qo(d);return o&&gt(h),h})(),fe(E,l.value,s.value);function w(){return[l.value,s.value,i.value,c.value,u.value]}const F=a.computed({get:()=>l.value,set:d=>{l.value=d,E.locale=l.value}}),G=a.computed({get:()=>s.value,set:d=>{s.value=d,E.fallbackLocale=s.value,fe(E,l.value,d)}}),z=a.computed(()=>i.value),Y=a.computed(()=>c.value),ve=a.computed(()=>u.value);function Ee(){return V(g)?g:null}function Bn(d){g=d,E.postTranslation=d}function xn(){return b}function Gn(d){d!==null&&(_=St(d)),b=d,E.missing=_}function Wn(d,h){return d!=="translate"||!h.resolvedMessage}const re=(d,h,B,M,De,ye)=>{w();let se;if(process.env.NODE_ENV!=="production"||__INTLIFY_PROD_DEVTOOLS__)try{pt(Nr()),o||(E.fallbackContext=n?Qo():void 0),se=d(E)}finally{pt(null),o||(E.fallbackContext=void 0)}else se=d(E);if($(se)&&se===we){const[te,uo]=h();if(process.env.NODE_ENV!=="production"&&n&&y(te)&&Wn(B,uo)&&(f&&(Se(p,te)||sn(m,te))&&ue(Ce(K.FALLBACK_TO_ROOT,{key:te,type:B})),process.env.NODE_ENV!=="production")){const{__v_emitter:at}=E;at&&f&&at.emit("fallback",{type:B,key:te,to:"global",groupId:`${B}:${te}`})}return n&&f?M(n):De(te)}else{if(ye(se))return se;throw H(A.UNEXPECTED_RETURN_TYPE)}};function st(...d){return re(h=>Reflect.apply(Et,null,[h,...d]),()=>$e(...d),"translate",h=>Reflect.apply(h.t,h,[...d]),h=>h,h=>y(h))}function jn(...d){const[h,B,M]=d;if(M&&!S(M))throw H(A.INVALID_ARGUMENT);return st(h,B,U({resolvedMessage:!0},M||{}))}function Hn(...d){return re(h=>Reflect.apply(Nt,null,[h,...d]),()=>Fe(...d),"datetime format",h=>Reflect.apply(h.d,h,[...d]),()=>Le,h=>y(h))}function zn(...d){return re(h=>Reflect.apply(Ot,null,[h,...d]),()=>Re(...d),"number format",h=>Reflect.apply(h.n,h,[...d]),()=>Le,h=>y(h))}function Yn(d){return d.map(h=>y(h)||$(h)||D(h)?Tt(String(h)):h)}const Kn={normalize:Yn,interpolate:d=>d,type:"vnode"};function Xn(...d){return re(h=>{let B;const M=h;try{M.processor=Kn,B=Reflect.apply(Et,null,[M,...d])}finally{M.processor=null}return B},()=>$e(...d),"translate",h=>h[Ue](...d),h=>[Tt(h)],h=>P(h))}function Jn(...d){return re(h=>Reflect.apply(Ot,null,[h,...d]),()=>Re(...d),"number format",h=>h[xe](...d),()=>[],h=>y(h)||P(h))}function Qn(...d){return re(h=>Reflect.apply(Nt,null,[h,...d]),()=>Fe(...d),"datetime format",h=>h[Be](...d),()=>[],h=>y(h)||P(h))}function qn(d){L=d,E.pluralRules=L}function Zn(d,h){const B=y(h)?h:l.value,M=lt(B);return E.messageResolver(M,d)!==null}function eo(d){let h=null;const B=en(E,s.value,l.value);for(let M=0;M<B.length;M++){const De=i.value[B[M]]||{},ye=E.messageResolver(De,d);if(ye!=null){h=ye;break}}return h}function to(d){const h=eo(d);return h!=null?h:n?n.tm(d)||{}:{}}function lt(d){return i.value[d]||{}}function no(d,h){i.value[d]=h,E.messages=i.value}function oo(d,h){i.value[d]=i.value[d]||{},me(h,i.value[d]),E.messages=i.value}function ro(d){return c.value[d]||{}}function so(d,h){c.value[d]=h,E.datetimeFormats=c.value,bt(E,d,h)}function lo(d,h){c.value[d]=U(c.value[d]||{},h),E.datetimeFormats=c.value,bt(E,d,h)}function ao(d){return u.value[d]||{}}function io(d,h){u.value[d]=h,E.numberFormats=u.value,Lt(E,d,h)}function co(d,h){u.value[d]=U(u.value[d]||{},h),E.numberFormats=u.value,Lt(E,d,h)}wt++,n&&J&&(a.watch(n.locale,d=>{r&&(l.value=d,E.locale=d,fe(E,l.value,s.value))}),a.watch(n.fallbackLocale,d=>{r&&(s.value=d,E.fallbackLocale=d,fe(E,l.value,s.value))}));const k={id:wt,locale:F,fallbackLocale:G,get inheritLocale(){return r},set inheritLocale(d){r=d,d&&n&&(l.value=n.locale.value,s.value=n.fallbackLocale.value,fe(E,l.value,s.value))},get availableLocales(){return Object.keys(i.value).sort()},messages:z,get modifiers(){return T},get pluralRules(){return L||{}},get isGlobal(){return o},get missingWarn(){return m},set missingWarn(d){m=d,E.missingWarn=m},get fallbackWarn(){return p},set fallbackWarn(d){p=d,E.fallbackWarn=p},get fallbackRoot(){return f},set fallbackRoot(d){f=d},get fallbackFormat(){return v},set fallbackFormat(d){v=d,E.fallbackFormat=v},get warnHtmlMessage(){return N},set warnHtmlMessage(d){N=d,E.warnHtmlMessage=d},get escapeParameter(){return O},set escapeParameter(d){O=d,E.escapeParameter=d},t:st,getLocaleMessage:lt,setLocaleMessage:no,mergeLocaleMessage:oo,getPostTranslationHandler:Ee,setPostTranslationHandler:Bn,getMissingHandler:xn,setMissingHandler:Gn,[vr]:qn};return k.datetimeFormats=Y,k.numberFormats=ve,k.rt=jn,k.te=Zn,k.tm=to,k.d=Hn,k.n=zn,k.getDateTimeFormat=ro,k.setDateTimeFormat=so,k.mergeDateTimeFormat=lo,k.getNumberFormat=ao,k.setNumberFormat=io,k.mergeNumberFormat=co,k[Er]=e.__injectWithOption,k[Ue]=Xn,k[Be]=Qn,k[xe]=Jn,process.env.NODE_ENV!=="production"&&(k[ge]=d=>{E.__v_emitter=d},k[Ge]=()=>{E.__v_emitter=void 0}),k}const Ze={tag:{type:[String,Object]},locale:{type:String},scope:{type:String,validator:e=>e==="parent"||e==="global",default:"parent"},i18n:{type:Object}};function br({slots:e},t){return t.length===1&&t[0]==="default"?(e.default?e.default():[]).reduce((o,r)=>o=[...o,...P(r.children)?r.children:[r]],[]):t.reduce((n,o)=>{const r=e[o];return r&&(n[o]=r()),n},{})}function En(e){return a.Fragment}const Ve={name:"i18n-t",props:U({keypath:{type:String,required:!0},plural:{type:[Number,String],validator:e=>$(e)||!isNaN(e)}},Ze),setup(e,t){const{slots:n,attrs:o}=t,r=e.i18n||tt({useScope:e.scope,__useComponent:!0});return()=>{const l=Object.keys(n).filter(p=>p!=="_"),s={};e.locale&&(s.locale=e.locale),e.plural!==void 0&&(s.plural=y(e.plural)?+e.plural:e.plural);const i=br(t,l),c=r[Ue](e.keypath,i,s),u=U({},o),m=y(e.tag)||S(e.tag)?e.tag:En();return a.h(m,u,c)}}};function Or(e){return P(e)&&!y(e[0])}function yn(e,t,n,o){const{slots:r,attrs:l}=t;return()=>{const s={part:!0};let i={};e.locale&&(s.locale=e.locale),y(e.format)?s.key=e.format:S(e.format)&&(y(e.format.key)&&(s.key=e.format.key),i=Object.keys(e.format).reduce((f,v)=>n.includes(v)?U({},f,{[v]:e.format[v]}):f,{}));const c=o(e.value,s,i);let u=[s.key];P(c)?u=c.map((f,v)=>{const b=r[f.type],_=b?b({[f.type]:f.value,index:v,parts:c}):[f.value];return Or(_)&&(_[0].key=`${f.type}-${v}`),_}):y(c)&&(u=[c]);const m=U({},l),p=y(e.tag)||S(e.tag)?e.tag:En();return a.h(p,m,u)}}const Ct={name:"i18n-n",props:U({value:{type:Number,required:!0},format:{type:[String,Object]}},Ze),setup(e,t){const n=e.i18n||tt({useScope:"parent",__useComponent:!0});return yn(e,t,dn,(...o)=>n[xe](...o))}},At={name:"i18n-d",props:U({value:{type:[Number,Date],required:!0},format:{type:[String,Object]}},Ze),setup(e,t){const n=e.i18n||tt({useScope:"parent",__useComponent:!0});return yn(e,t,fn,(...o)=>n[Be](...o))}};function Lr(e,t){const n=e;if(e.mode==="composition")return n.__getInstance(t)||e.global;{const o=n.__getInstance(t);return o!=null?o.__composer:e.global.__composer}}function Tr(e){const t=s=>{const{instance:i,modifiers:c,value:u}=s;if(!i||!i.$)throw H(A.UNEXPECTED_ERROR);const m=Lr(e,i.$);process.env.NODE_ENV!=="production"&&c.preserve&&ue(Ce(K.NOT_SUPPORTED_PRESERVE));const p=Dt(u);return[Reflect.apply(m.t,m,[...Pt(p)]),m]};return{created:(s,i)=>{const[c,u]=t(i);J&&e.global===u&&(s.__i18nWatcher=a.watch(u.locale,()=>{i.instance&&i.instance.$forceUpdate()})),s.__composer=u,s.textContent=c},unmounted:s=>{J&&s.__i18nWatcher&&(s.__i18nWatcher(),s.__i18nWatcher=void 0,delete s.__i18nWatcher),s.__composer&&(s.__composer=void 0,delete s.__composer)},beforeUpdate:(s,{value:i})=>{if(s.__composer){const c=s.__composer,u=Dt(i);s.textContent=Reflect.apply(c.t,c,[...Pt(u)])}},getSSRProps:s=>{const[i]=t(s);return{textContent:i}}}}function Dt(e){if(y(e))return{path:e};if(I(e)){if(!("path"in e))throw H(A.REQUIRED_VALUE,"path");return e}else throw H(A.INVALID_VALUE)}function Pt(e){const{path:t,locale:n,args:o,choice:r,plural:l}=e,s={},i=o||{};return y(n)&&(s.locale=n),$(r)&&(s.plural=r),$(l)&&(s.plural=l),[t,i,s]}function Ir(e,t,...n){const o=I(n[0])?n[0]:{},r=!!o.useI18nComponentName,l=D(o.globalInstall)?o.globalInstall:!0;process.env.NODE_ENV!=="production"&&l&&r&&ue(Ce(K.COMPONENT_NAME_LEGACY_COMPATIBLE,{name:Ve.name})),l&&(e.component(r?"i18n":Ve.name,Ve),e.component(Ct.name,Ct),e.component(At.name,At)),e.directive("t",Tr(t))}const Nn="vue-i18n: composer properties";let je;async function wr(e,t){return new Promise((n,o)=>{try{fr({id:"vue-devtools-plugin-vue-i18n",label:ke["vue-devtools-plugin-vue-i18n"],packageName:"vue-i18n",homepage:"https://vue-i18n.intlify.dev",logo:"https://vue-i18n.intlify.dev/vue-i18n-devtools-logo.png",componentStateTypes:[Nn],app:e},r=>{je=r,r.on.visitComponentTree(({componentInstance:s,treeNode:i})=>{Sr(s,i,t)}),r.on.inspectComponent(({componentInstance:s,instanceData:i})=>{s.vnode.el&&s.vnode.el.__VUE_I18N__&&i&&(t.mode==="legacy"?s.vnode.el.__VUE_I18N__!==t.global.__composer&&kt(i,s.vnode.el.__VUE_I18N__):kt(i,s.vnode.el.__VUE_I18N__))}),r.addInspector({id:"vue-i18n-resource-inspector",label:ke["vue-i18n-resource-inspector"],icon:"language",treeFilterPlaceholder:dr["vue-i18n-resource-inspector"]}),r.on.getInspectorTree(s=>{s.app===e&&s.inspectorId==="vue-i18n-resource-inspector"&&kr(s,t)});const l=new Map;r.on.getInspectorState(async s=>{if(s.app===e&&s.inspectorId==="vue-i18n-resource-inspector")if(r.unhighlightElement(),$r(s,t),s.nodeId==="global"){if(!l.has(s.app)){const[i]=await r.getComponentInstances(s.app);l.set(s.app,i)}r.highlightElement(l.get(s.app))}else{const i=Vr(s.nodeId,t);i&&r.highlightElement(i)}}),r.on.editInspectorState(s=>{s.app===e&&s.inspectorId==="vue-i18n-resource-inspector"&&Rr(s,t)}),r.addTimelineLayer({id:"vue-i18n-timeline",label:ke["vue-i18n-timeline"],color:mr["vue-i18n-timeline"]}),n(!0)})}catch(r){console.error(r),o(!1)}})}function bn(e){return e.type.name||e.type.displayName||e.type.__file||"Anonymous"}function Sr(e,t,n){const o=n.mode==="composition"?n.global:n.global.__composer;if(e&&e.vnode.el&&e.vnode.el.__VUE_I18N__&&e.vnode.el.__VUE_I18N__!==o){const r={label:`i18n (${bn(e)} Scope)`,textColor:0,backgroundColor:16764185};t.tags.push(r)}}function kt(e,t){const n=Nn;e.state.push({type:n,key:"locale",editable:!0,value:t.locale.value}),e.state.push({type:n,key:"availableLocales",editable:!1,value:t.availableLocales}),e.state.push({type:n,key:"fallbackLocale",editable:!0,value:t.fallbackLocale.value}),e.state.push({type:n,key:"inheritLocale",editable:!0,value:t.inheritLocale}),e.state.push({type:n,key:"messages",editable:!1,value:et(t.messages.value)}),e.state.push({type:n,key:"datetimeFormats",editable:!1,value:t.datetimeFormats.value}),e.state.push({type:n,key:"numberFormats",editable:!1,value:t.numberFormats.value})}function et(e){const t={};return Object.keys(e).forEach(n=>{const o=e[n];V(o)&&"source"in o?t[n]=Pr(o):S(o)?t[n]=et(o):t[n]=o}),t}const Cr={"<":"&lt;",">":"&gt;",'"':"&quot;","&":"&amp;"};function Ar(e){return e.replace(/[<>"&]/g,Dr)}function Dr(e){return Cr[e]||e}function Pr(e){const t=e.source?`("${Ar(e.source)}")`:"(?)";return{_custom:{type:"function",display:`<span>\u0192</span> ${t}`}}}function kr(e,t){e.rootNodes.push({id:"global",label:"Global Scope"});const n=t.mode==="composition"?t.global:t.global.__composer;for(const[o,r]of t.__instances){const l=t.mode==="composition"?r:r.__composer;n!==l&&e.rootNodes.push({id:l.id.toString(),label:`${bn(o)} Scope`})}}function Vr(e,t){let n=null;if(e!=="global"){for(const[o,r]of t.__instances.entries())if(r.id.toString()===e){n=o;break}}return n}function On(e,t){if(e==="global")return t.mode==="composition"?t.global:t.global.__composer;{const n=Array.from(t.__instances.values()).find(o=>o.id.toString()===e);return n?t.mode==="composition"?n:n.__composer:null}}function $r(e,t){const n=On(e.nodeId,t);return n&&(e.state=Fr(n)),null}function Fr(e){const t={},n="Locale related info",o=[{type:n,key:"locale",editable:!0,value:e.locale.value},{type:n,key:"fallbackLocale",editable:!0,value:e.fallbackLocale.value},{type:n,key:"availableLocales",editable:!1,value:e.availableLocales},{type:n,key:"inheritLocale",editable:!0,value:e.inheritLocale}];t[n]=o;const r="Locale messages info",l=[{type:r,key:"messages",editable:!1,value:et(e.messages.value)}];t[r]=l;{const s="Datetime formats info",i=[{type:s,key:"datetimeFormats",editable:!1,value:e.datetimeFormats.value}];t[s]=i;const c="Datetime formats info",u=[{type:c,key:"numberFormats",editable:!1,value:e.numberFormats.value}];t[c]=u}return t}function He(e,t){if(je){let n;t&&"groupId"in t&&(n=t.groupId,delete t.groupId),je.addTimelineEvent({layerId:"vue-i18n-timeline",event:{title:e,groupId:n,time:Date.now(),meta:{},data:t||{},logType:e==="compile-error"?"error":e==="fallback"||e==="missing"?"warning":"default"}})}}function Rr(e,t){const n=On(e.nodeId,t);if(n){const[o]=e.path;o==="locale"&&y(e.state.value)?n.locale.value=e.state.value:o==="fallbackLocale"&&(y(e.state.value)||P(e.state.value)||S(e.state.value))?n.fallbackLocale.value=e.state.value:o==="inheritLocale"&&D(e.state.value)&&(n.inheritLocale=e.state.value)}}const Mr=Q("global-vue-i18n");function Ur(e={},t){const n=D(e.globalInjection)?e.globalInjection:!0,o=!0,r=new Map,[l,s]=Br(e),i=Q(process.env.NODE_ENV!=="production"?"vue-i18n":"");function c(p){return r.get(p)||null}function u(p,f){r.set(p,f)}function m(p){r.delete(p)}{const p={get mode(){return"composition"},get allowComposition(){return o},async install(f,...v){process.env.NODE_ENV!=="production"&&(f.__VUE_I18N__=p),f.__VUE_I18N_SYMBOL__=i,f.provide(f.__VUE_I18N_SYMBOL__,p),n&&Kr(f,p.global),Ir(f,p,...v);const b=f.unmount;if(f.unmount=()=>{p.dispose(),b()},process.env.NODE_ENV!=="production"||!1){if(!await wr(f,p))throw H(A.CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN);const g=Qt();{const N=s;N[ge]&&N[ge](g)}g.on("*",He)}},get global(){return s},dispose(){l.stop()},__instances:r,__getInstance:c,__setInstance:u,__deleteInstance:m};return p}}function tt(e={}){const t=a.getCurrentInstance();if(t==null)throw H(A.MUST_BE_CALL_SETUP_TOP);if(!t.isCE&&t.appContext.app!=null&&!t.appContext.app.__VUE_I18N_SYMBOL__)throw H(A.NOT_INSLALLED);const n=xr(t),o=Wr(n),r=hn(t),l=Gr(e,r);if(l==="global")return yr(o,e,r),o;if(l==="parent"){let c=jr(n,t,e.__useComponent);return c==null&&(process.env.NODE_ENV!=="production"&&ue(Ce(K.NOT_FOUND_PARENT_SCOPE)),c=o),c}const s=n;let i=s.__getInstance(t);if(i==null){const c=U({},e);"__i18n"in r&&(c.__i18n=r.__i18n),o&&(c.__root=o),i=vn(c),Hr(s,t,i),s.__setInstance(t,i)}return i}function Br(e,t,n){const o=a.effectScope();{const r=o.run(()=>vn(e));if(r==null)throw H(A.UNEXPECTED_ERROR);return[o,r]}}function xr(e){{const t=a.inject(e.isCE?Mr:e.appContext.app.__VUE_I18N_SYMBOL__);if(!t)throw H(e.isCE?A.NOT_INSLALLED_WITH_PROVIDE:A.UNEXPECTED_ERROR);return t}}function Gr(e,t){return Ie(e)?"__i18n"in t?"local":"global":e.useScope?e.useScope:"local"}function Wr(e){return e.mode==="composition"?e.global:e.global.__composer}function jr(e,t,n=!1){let o=null;const r=t.root;let l=t.parent;for(;l!=null;){const s=e;if(e.mode==="composition"&&(o=s.__getInstance(l)),o!=null||r===l)break;l=l.parent}return o}function Hr(e,t,n){let o=null;a.onMounted(()=>{if((process.env.NODE_ENV!=="production"||!1)&&!0&&t.vnode.el){t.vnode.el.__VUE_I18N__=n,o=Qt();const r=n;r[ge]&&r[ge](o),o.on("*",He)}},t),a.onUnmounted(()=>{if((process.env.NODE_ENV!=="production"||!1)&&!0&&t.vnode.el&&t.vnode.el.__VUE_I18N__){o&&o.off("*",He);const r=n;r[Ge]&&r[Ge](),delete t.vnode.el.__VUE_I18N__}e.__deleteInstance(t)},t)}const zr=["locale","fallbackLocale","availableLocales"],Yr=["t","rt","d","n","tm"];function Kr(e,t){const n=Object.create(null);zr.forEach(o=>{const r=Object.getOwnPropertyDescriptor(t,o);if(!r)throw H(A.UNEXPECTED_ERROR);const l=a.isRef(r.value)?{get(){return r.value.value},set(s){r.value.value=s}}:{get(){return r.get&&r.get()}};Object.defineProperty(n,o,l)}),e.config.globalProperties.$i18n=n,Yr.forEach(o=>{const r=Object.getOwnPropertyDescriptor(t,o);if(!r||!r.value)throw H(A.UNEXPECTED_ERROR);Object.defineProperty(e.config.globalProperties,`$${o}`,r)})}Ko(So);Xo(en);pr();if(process.env.NODE_ENV!=="production"||__INTLIFY_PROD_DEVTOOLS__){const e=Ke();e.__INTLIFY__=!0,Ro(e.__INTLIFY_DEVTOOLS_GLOBAL_HOOK__)}process.env.NODE_ENV;const Xr={"zhi-xian-shi-zai-xian-she-bei":e=>{const{normalize:t}=e;return t(["\u53EA\u663E\u793A\u5728\u7EBF\u8BBE\u5907"])},"qing-xuan-ze-bu-ju-yang-shi":e=>{const{normalize:t}=e;return t(["\u8BF7\u9009\u62E9\u5E03\u5C40\u6837\u5F0F"])},"biao-zhun-bu-ju":e=>{const{normalize:t}=e;return t(["\u6807\u51C6\u5E03\u5C40"])},"zi-ding-yi-bu-ju":e=>{const{normalize:t}=e;return t(["\u81EA\u5B9A\u4E49\u5E03\u5C40"])}},Jr={"zhi-xian-shi-zai-xian-she-bei":e=>{const{normalize:t}=e;return t(["online only"])},"qing-xuan-ze-bu-ju-yang-shi":e=>{const{normalize:t}=e;return t(["Please Select Play Area Layout"])},"biao-zhun-bu-ju":e=>{const{normalize:t}=e;return t(["Classical"])},"zi-ding-yi-bu-ju":e=>{const{normalize:t}=e;return t(["Custom"])}};var Ln=(e=>(e.zh="zh",e.en="en",e))(Ln||{});let _e;function Qr(e){_e&&_e.dispose(),_e=Ur({locale:e,messages:{zh:Xr,en:Jr},fallbackLocale:"en",silentTranslationWarn:!0,silentFallbackWarn:!0})}function qr(e){Qr(e),_e.global.locale=e}function nt(e){return _e.global.t(e)}var ot=(e=>(e.UserFirst="UserFirst",e.PUFirst="PUFirst",e))(ot||{});const Tn=a.ref("UserFirst");function In(e){Tn.value=e}function Zr(){return Tn}exports.RecursionDeviceGroup=void 0;(e=>{(n=>{function o(s,i){const c=[];for(let u=0;u<s;u++)c.push({id:"testId",pid:"",name:`device-${u}`,online:u%2==0&&i,channels:[]});return c}function r(s){const i=[];for(let c=0;c<s;c++)i.push({id:`groupid-${c}`,name:`group-${c}`,pid:"",onlineCount:0,totalCount:0,devices:o(14,s%2==0),items:r(s-c-1)});return i}function l(s){const i=r(s);return i[s-1].items.push({id:"groupid-ttttttt",name:"group-ttttt",pid:"",onlineCount:0,totalCount:0,devices:[{id:"testId",pid:"",name:"999999",online:!1,channels:[]}],items:[]}),console.log(i),{name:"hah",onlineCount:0,totalCount:0,items:i}}n.RandomDeviceGroup=l})(e.Test||(e.Test={}));function t(n,o){for(let r=0;r<n.length;r++)o(n[r]),t(n[r].items,o)}(n=>{function o(r){const l={},s={};return t(r.items,i=>{l[i.id]=i;for(let c=0;c<i.devices.length;c++)s[i.devices[c].id]=i.devices[c]}),{getGroup(i){return l[i]},getDevice(i){return s[i]},foreachGroup(i){for(let c in l)i(l[c])}}}n.AccessSession=o})(e.Utils||(e.Utils={}))})(exports.RecursionDeviceGroup||(exports.RecursionDeviceGroup={}));exports.VideoAreaLayout=void 0;(e=>{function t(n,o,r){if(r){let s=n*o;return r.forEach(([i,c,u,m])=>{s-=(m-c)*(u-i)-1}),{count:s,row:n,col:o,name:`${s<10?`0${s}`:s}`,areas:r.map(([i,c,u,m])=>({leftTop:{col:i,row:c},rightBottom:{col:u,row:m}}))}}const l=n*o;return{count:l,row:n,col:o,name:`${l<10?`0${l}`:l}`}}e.genLayout=t,(n=>{function o(l,s,i){if(i){const u=l*s-(i[3]-i[1])*(i[2]-i[0])+1;return{count:u,row:l,col:s,name:`${u<10?`0${u}`:u}`,area:{leftTop:{row:i[1],col:i[0]},rightBottom:{row:i[3],col:i[2]}}}}const c=l*s;return{count:c,row:l,col:s,name:`${c<10?`0${c}`:c}`}}n.genLayout=o;function r(){return{count:25,row:5,col:5,name:"12"}}n.getTestLayout=r})(e.Test||(e.Test={}))})(exports.VideoAreaLayout||(exports.VideoAreaLayout={}));const wn=String.prototype.includes,Sn=function(e,t){const n=this.toLocaleLowerCase(),o=e.toLocaleLowerCase();String.prototype.includes=wn;const r=n.includes(o,t);return String.prototype.includes=Sn,r};function Te(e){String.prototype.includes=Sn;const t=e();return String.prototype.includes=wn,t}const es=a.defineComponent({props:{countInfo:Object,controlParams:Object},setup(e){function t(r,l){if(l){let s=0;return l.items.forEach(i=>{s+=t(r,i)}),r(l)+s}return 0}const n=a.computed(()=>t(r=>{var l,s;if(r.devices){let i=(l=r.devices)==null?void 0:l.filter(u=>u.online);const c=(s=e.controlParams)==null?void 0:s.searchStr;return c&&(i=i.filter(u=>Te(()=>{var m;return u.name.includes(c)||((m=u.user)==null?void 0:m.includes(c))||u.id.includes(c)}))),i.length}return 0},e.countInfo));return{totalCount:a.computed(()=>t(r=>{var l;if(r.devices){let s=r.devices;const i=(l=e.controlParams)==null?void 0:l.searchStr;return i&&(s=s.filter(c=>Te(()=>{var u;return c.name.includes(i)||((u=c.user)==null?void 0:u.includes(i))||c.id.includes(i)}))),s.length}return r.totalCount},e.countInfo)),onlineCount:n}}});const Z=(e,t)=>{const n=e.__vccOpts||e;for(const[o,r]of t)n[o]=r;return n},ts={class:"root"},ns={class:"count-show"},os={class:"count-show-online"},rs={key:0};function ss(e,t,n,o,r,l){var s;return a.openBlock(),a.createElementBlock("div",ts,[a.renderSlot(e.$slots,"default",{total:e.totalCount,online:e.onlineCount},void 0,!0),a.createElementVNode("span",ns,[a.createElementVNode("span",os,a.toDisplayString(e.onlineCount),1),(s=e.controlParams)!=null&&s.onlyShowOnline?a.createCommentVNode("",!0):(a.openBlock(),a.createElementBlock("span",rs,"/"+a.toDisplayString(e.totalCount),1))])])}const Cn=Z(es,[["render",ss],["__scopeId","data-v-f6bf9449"]]),An=Object.freeze({left:0,top:0,width:16,height:16}),Dn=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),rt=Object.freeze({...An,...Dn});Object.freeze({...rt,body:"",hidden:!1});({...An});const Pn=Object.freeze({width:null,height:null}),kn=Object.freeze({...Pn,...Dn});function ls(e,t){const n={...e};for(const o in t){const r=t[o],l=typeof r;o in Pn?(r===null||r&&(l==="string"||l==="number"))&&(n[o]=r):l===typeof n[o]&&(n[o]=o==="rotate"?r%4:r)}return n}const as=/[\s,]+/;function is(e,t){t.split(as).forEach(n=>{switch(n.trim()){case"horizontal":e.hFlip=!0;break;case"vertical":e.vFlip=!0;break}})}function cs(e,t=0){const n=e.replace(/^-?[0-9.]*/,"");function o(r){for(;r<0;)r+=4;return r%4}if(n===""){const r=parseInt(e);return isNaN(r)?0:o(r)}else if(n!==e){let r=0;switch(n){case"%":r=25;break;case"deg":r=90}if(r){let l=parseFloat(e.slice(0,e.length-n.length));return isNaN(l)?0:(l=l/r,l%1===0?o(l):0)}}return t}const us=/(-?[0-9.]*[0-9]+[0-9.]*)/g,fs=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function Vt(e,t,n){if(t===1)return e;if(n=n||100,typeof e=="number")return Math.ceil(e*t*n)/n;if(typeof e!="string")return e;const o=e.split(us);if(o===null||!o.length)return e;const r=[];let l=o.shift(),s=fs.test(l);for(;;){if(s){const i=parseFloat(l);isNaN(i)?r.push(l):r.push(Math.ceil(i*t*n)/n)}else r.push(l);if(l=o.shift(),l===void 0)return r.join("");s=!s}}function ds(e,t){const n={...rt,...e},o={...kn,...t},r={left:n.left,top:n.top,width:n.width,height:n.height};let l=n.body;[n,o].forEach(v=>{const b=[],_=v.hFlip,g=v.vFlip;let N=v.rotate;_?g?N+=2:(b.push("translate("+(r.width+r.left).toString()+" "+(0-r.top).toString()+")"),b.push("scale(-1 1)"),r.top=r.left=0):g&&(b.push("translate("+(0-r.left).toString()+" "+(r.height+r.top).toString()+")"),b.push("scale(1 -1)"),r.top=r.left=0);let O;switch(N<0&&(N-=Math.floor(N/4)*4),N=N%4,N){case 1:O=r.height/2+r.top,b.unshift("rotate(90 "+O.toString()+" "+O.toString()+")");break;case 2:b.unshift("rotate(180 "+(r.width/2+r.left).toString()+" "+(r.height/2+r.top).toString()+")");break;case 3:O=r.width/2+r.left,b.unshift("rotate(-90 "+O.toString()+" "+O.toString()+")");break}N%2===1&&(r.left!==r.top&&(O=r.left,r.left=r.top,r.top=O),r.width!==r.height&&(O=r.width,r.width=r.height,r.height=O)),b.length&&(l='<g transform="'+b.join(" ")+'">'+l+"</g>")});const s=o.width,i=o.height,c=r.width,u=r.height;let m,p;return s===null?(p=i===null?"1em":i==="auto"?u:i,m=Vt(p,c/u)):(m=s==="auto"?c:s,p=i===null?Vt(m,u/c):i==="auto"?u:i),{attributes:{width:m.toString(),height:p.toString(),viewBox:r.left.toString()+" "+r.top.toString()+" "+c.toString()+" "+u.toString()},body:l}}const ms=/\sid="(\S+)"/g,_s="IconifyId"+Date.now().toString(16)+(Math.random()*16777216|0).toString(16);let ps=0;function gs(e,t=_s){const n=[];let o;for(;o=ms.exec(e);)n.push(o[1]);return n.length&&n.forEach(r=>{const l=typeof t=="function"?t(r):t+(ps++).toString(),s=r.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+s+')([")]|\\.[a-z])',"g"),"$1"+l+"$3")}),e}function hs(e,t){let n=e.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const o in t)n+=" "+o+'="'+t[o]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+n+">"+e+"</svg>"}function vs(e){return e.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}function Es(e){return'url("data:image/svg+xml,'+vs(e)+'")'}const $t={...kn,inline:!1},ys={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":!0,role:"img"},Ns={display:"inline-block"},ze={backgroundColor:"currentColor"},Vn={backgroundColor:"transparent"},Ft={Image:"var(--svg)",Repeat:"no-repeat",Size:"100% 100%"},Rt={webkitMask:ze,mask:ze,background:Vn};for(const e in Rt){const t=Rt[e];for(const n in Ft)t[e+n]=Ft[n]}const be={};["horizontal","vertical"].forEach(e=>{const t=e.slice(0,1)+"Flip";be[e+"-flip"]=t,be[e.slice(0,1)+"-flip"]=t,be[e+"Flip"]=t});function Mt(e){return e+(e.match(/^[-0-9.]+$/)?"px":"")}const bs=(e,t)=>{const n=ls($t,t),o={...ys},r=t.mode||"svg",l={},s=t.style,i=typeof s=="object"&&!(s instanceof Array)?s:{};for(let _ in t){const g=t[_];if(g!==void 0)switch(_){case"icon":case"style":case"onLoad":case"mode":break;case"inline":case"hFlip":case"vFlip":n[_]=g===!0||g==="true"||g===1;break;case"flip":typeof g=="string"&&is(n,g);break;case"color":l.color=g;break;case"rotate":typeof g=="string"?n[_]=cs(g):typeof g=="number"&&(n[_]=g);break;case"ariaHidden":case"aria-hidden":g!==!0&&g!=="true"&&delete o["aria-hidden"];break;default:{const N=be[_];N?(g===!0||g==="true"||g===1)&&(n[N]=!0):$t[_]===void 0&&(o[_]=g)}}}const c=ds(e,n),u=c.attributes;if(n.inline&&(l.verticalAlign="-0.125em"),r==="svg"){o.style={...l,...i},Object.assign(o,u);let _=0,g=t.id;return typeof g=="string"&&(g=g.replace(/-/g,"_")),o.innerHTML=gs(c.body,g?()=>g+"ID"+_++:"iconifyVue"),a.h("svg",o)}const{body:m,width:p,height:f}=e,v=r==="mask"||(r==="bg"?!1:m.indexOf("currentColor")!==-1),b=hs(m,{...u,width:p+"",height:f+""});return o.style={...l,"--svg":Es(b),width:Mt(u.width),height:Mt(u.height),...Ns,...v?ze:Vn,...i},a.h("span",o)},$n=Object.create(null);function oe(e,t){$n[e]=t}const Ae=a.defineComponent({inheritAttrs:!1,render(){const e=this.$attrs,t=e.icon,n=typeof t=="string"?$n[t]:typeof t=="object"?t:null;return n===null||typeof n!="object"||typeof n.body!="string"?this.$slots.default?this.$slots.default():null:bs({...rt,...n},e)}});var Os=Object.defineProperty,Ls=Object.defineProperties,Ts=Object.getOwnPropertyDescriptors,Ut=Object.getOwnPropertySymbols,Is=Object.prototype.hasOwnProperty,ws=Object.prototype.propertyIsEnumerable,Bt=(e,t,n)=>t in e?Os(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,xt=(e,t)=>{for(var n in t||(t={}))Is.call(t,n)&&Bt(e,n,t[n]);if(Ut)for(var n of Ut(t))ws.call(t,n)&&Bt(e,n,t[n]);return e},Ss=(e,t)=>Ls(e,Ts(t)),Cs=(e,t,n)=>new Promise((o,r)=>{var l=c=>{try{i(n.next(c))}catch(u){r(u)}},s=c=>{try{i(n.throw(c))}catch(u){r(u)}},i=c=>c.done?o(c.value):Promise.resolve(c.value).then(l,s);i((n=n.apply(e,t)).next())});const As={name:"VirtualList",props:{listData:{type:Object,default:()=>[]},itemSize:{type:Number,default:200}},setup(e){const t={screenHeight:a.ref(0),startOffset:a.ref(0),start:a.ref(0),end:a.ref(0)},n=a.ref(),o={listHeight:a.computed(()=>e.listData.length*e.itemSize),visibleCount:a.computed(()=>Math.ceil(t.screenHeight.value/e.itemSize)),getTransform:a.computed(()=>`translate3d(0,${t.startOffset.value}px,0)`),visibleData:a.computed(()=>e.listData.slice(t.start.value,Math.min(t.end.value,e.listData.length)))};return xt(Ss(xt({},o),{virList:n}),t)},mounted(){this.init(),a.watch(()=>this.listData.length,()=>Cs(this,null,function*(){yield this.$nextTick(),this.init()}))},methods:{init(){this.screenHeight=this.$el.clientHeight,this.screenHeight==0&&(this.screenHeight=400),this.start=0,this.end=this.start+this.visibleCount},scrollEvent(){if(this.virList){let e=this.virList.scrollTop;this.start=Math.floor(e/this.itemSize),this.end=this.start+this.visibleCount,this.startOffset=e-e%this.itemSize}}}};function Ds(e,t,n,o,r,l){return a.openBlock(),a.createElementBlock("div",{ref:"virList",class:"infinite-list-container",onScroll:t[0]||(t[0]=s=>l.scrollEvent())},[a.createElementVNode("div",{class:"infinite-list-phantom",style:a.normalizeStyle({height:e.listHeight+"px"})},null,4),a.createElementVNode("div",{class:"infinite-list",style:a.normalizeStyle({transform:e.getTransform})},[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(e.visibleData,s=>(a.openBlock(),a.createElementBlock("div",{ref_for:!0,ref:"items",class:"infinite-list-item",key:s.id,style:a.normalizeStyle({height:n.itemSize+"px",lineHeight:n.itemSize+"px"})},[a.renderSlot(e.$slots,"default",{data:s},void 0,!0)],4))),128))],4)],544)}const Ps=Z(As,[["render",Ds],["__scopeId","data-v-12d2a294"]]);var ks=Object.defineProperty,Vs=Object.defineProperties,$s=Object.getOwnPropertyDescriptors,Gt=Object.getOwnPropertySymbols,Fs=Object.prototype.hasOwnProperty,Rs=Object.prototype.propertyIsEnumerable,Wt=(e,t,n)=>t in e?ks(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Ms=(e,t)=>{for(var n in t||(t={}))Fs.call(t,n)&&Wt(e,n,t[n]);if(Gt)for(var n of Gt(t))Rs.call(t,n)&&Wt(e,n,t[n]);return e},Us=(e,t)=>Vs(e,$s(t));const Bs=a.defineComponent({components:{VirtualList:Ps,CountShow:Cn,Icon:Ae},name:"group-show",props:{deviceGroup:Object,controlParams:Object,uiParams:Object},setup(e,t){const n=Zr(),o=a.ref(),r=a.inject("theme"),l={filterDevice(f){var v;let b=!0;b=Te(()=>{var g,N,O,T;return(g=e.controlParams)!=null&&g.searchStr?f.name.includes((N=e.controlParams)==null?void 0:N.searchStr)||f.id.includes((O=e.controlParams)==null?void 0:O.searchStr)||typeof f.user=="string"&&f.user.includes((T=e.controlParams)==null?void 0:T.searchStr):b});let _=!0;return(v=e.controlParams)!=null&&v.onlyShowOnline&&(_=f.online),b&&_},deviceText(f){return f.user?n.value==ot.PUFirst?f.name.length>0?`${f.name} [${f.id}] [${f.user}]`:` [${f.id}] [${f.user}]`:f.name.length>0?`${f.user} [${f.id}] [${f.name}]`:`${f.user} [${f.id}] []`:f.name.length>0?`${f.name} [${f.id}]`:` [${f.id}]`},groupText(f){if(f)return f.name.length>0?f.name:f.id}},s={filteredDevices:a.computed(()=>{var f;const v=(f=e.deviceGroup)==null?void 0:f.devices,b=v&&v.filter(g=>l.filterDevice(g))||[];return b.filter(g=>g.online).concat(b.filter(g=>!g.online))})},i=a.computed(()=>s.filteredDevices.value.length>10?"400px":`${s.filteredDevices.value.length*40}px`);function c(f,v){return Te(()=>{if(v.length==0)return!0;let b=!1;if((f==null?void 0:f.name.indexOf(v))>0&&(b=!0),b||(b=(f==null?void 0:f.devices.find(_=>_.name.includes(v)||_.id.includes(v)||_.user&&_.user.includes(v)))!=null),!b){for(let _=0;_<f.items.length;_++)if(c(f.items[_],v))return!0}return b})}const u=a.computed(()=>{if(e.controlParams){const f=e.controlParams.searchStr;if(e.deviceGroup)return e.deviceGroup.id==="PGRoot"&&e.deviceGroup.devices.length<=0?!1:c(e.deviceGroup,f)}return!1}),m=a.ref(!1);function p(){var f;(f=e.uiParams)!=null&&f.dbclickExpandsDisable||(m.value=!m.value)}return Us(Ms({OnHeadDbClick:p,innerUtils:l},s),{devicePanelHeight:i,showGroup:u,bShow:m,theme:r,countRef:o})}});const xs={key:0,class:"head-op"},Gs={key:1,style:{display:"inline-block",width:"25px"}},Ws={key:0,class:"group-head-count"},js=["title"],Hs={class:"group-slot"},zs={key:0,style:{"margin-left":"26px"}},Ys=["title"],Ks={class:"device-slot"};function Xs(e,t,n,o,r,l){var s,i,c;const u=a.resolveComponent("Icon"),m=a.resolveComponent("CountShow"),p=a.resolveComponent("group-show"),f=a.resolveComponent("VirtualList");return e.showGroup?a.withDirectives((a.openBlock(),a.createElementBlock("div",{key:0,class:a.normalizeClass("group "+e.theme)},[a.createVNode(m,{countInfo:e.deviceGroup,controlParams:e.controlParams,ref:"countRef"},{default:a.withCtx(({online:v,total:b})=>{var _,g;return[e.deviceGroup&&e.deviceGroup.devices.length+e.deviceGroup.items.length>0?(a.openBlock(),a.createElementBlock("span",xs,[a.createVNode(u,{icon:e.bShow?"minus":"plus",width:"20",onClick:t[0]||(t[0]=N=>e.bShow=!e.bShow),class:"handle-ls-svg"},null,8,["icon"])])):(a.openBlock(),a.createElementBlock("span",Gs)),a.createElementVNode("span",{class:"group-head-db-click",onDblclick:t[1]||(t[1]=(...N)=>e.OnHeadDbClick&&e.OnHeadDbClick(...N))},[a.createVNode(u,{icon:e.bShow?"group":"group-closed",width:"24",class:"group-avatar"},null,8,["icon"]),e.bShow?a.createCommentVNode("",!0):(a.openBlock(),a.createElementBlock("span",Ws,a.toDisplayString((_=e.deviceGroup)==null?void 0:_.items.length),1)),a.renderSlot(e.$slots,"groupHead",{group:e.deviceGroup},void 0,!0),a.createElementVNode("span",{class:"group-name",title:(g=e.deviceGroup)==null?void 0:g.name},a.toDisplayString(e.innerUtils.groupText(e.deviceGroup)),9,js)],32),a.createElementVNode("div",Hs,[a.renderSlot(e.$slots,"group",{group:e.deviceGroup},void 0,!0)])]}),_:3},8,["countInfo","controlParams"]),e.bShow?(a.openBlock(),a.createElementBlock("div",zs,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList((s=e.deviceGroup)==null?void 0:s.items,(v,b)=>(a.openBlock(),a.createBlock(p,{key:b,deviceGroup:v,"ui-params":e.uiParams,controlParams:e.controlParams},{groupHead:a.withCtx(({group:_})=>[a.renderSlot(e.$slots,"groupHead",{group:_},void 0,!0)]),group:a.withCtx(({group:_})=>[a.renderSlot(e.$slots,"group",{group:_},void 0,!0)]),deviceHead:a.withCtx(({device:_,group:g})=>[a.renderSlot(e.$slots,"deviceHead",{device:_,group:g},void 0,!0)]),device:a.withCtx(({device:_,group:g})=>[a.renderSlot(e.$slots,"device",{device:_,group:g},void 0,!0)]),_:2},1032,["deviceGroup","ui-params","controlParams"]))),128)),a.createElementVNode("div",{class:"device-show-div",style:a.normalizeStyle(`height: ${e.filteredDevices.length>10?"400px":`${e.filteredDevices.length*40}px`}`)},[a.createVNode(f,{"list-data":e.filteredDevices,"item-size":40},{default:a.withCtx(({data:v})=>[a.createElementVNode("div",{class:a.normalizeClass(v.online&&"online-device")},[a.createVNode(u,{icon:"user",width:"16",class:"device-avatar"}),a.renderSlot(e.$slots,"deviceHead",{device:v,group:e.deviceGroup},void 0,!0),a.createElementVNode("span",{title:e.innerUtils.deviceText(v),class:"device-name"},a.toDisplayString(e.innerUtils.deviceText(v)),9,Ys),a.createElementVNode("div",Ks,[a.renderSlot(e.$slots,"device",{device:v,group:e.deviceGroup},void 0,!0)])],2)]),_:3},8,["list-data"])],4)])):a.createCommentVNode("",!0)],2)),[[a.vShow,!((i=e.controlParams)!=null&&i.onlyShowOnline)||((c=e.countRef)==null?void 0:c.onlineCount)]]):a.createCommentVNode("",!0)}const Js=Z(Bs,[["render",Xs],["__scopeId","data-v-83ef1e48"]]),Qs={width:1024,height:1024,body:'<path fill="currentColor" d="M384 192v640l384-320.064z"/>'},qs={width:1024,height:1024,body:'<path fill="currentColor" d="M878.08 448H241.92l-96 384h636.16l96-384zM832 384v-64H485.76L357.504 192H128v448l57.92-231.744A32 32 0 0 1 216.96 384H832zm-24.96 512H96a32 32 0 0 1-32-32V160a32 32 0 0 1 32-32h287.872l128.384 128H864a32 32 0 0 1 32 32v96h23.04a32 32 0 0 1 31.04 39.744l-112 448A32 32 0 0 1 807.04 896z"/>'},Zs={width:1024,height:1024,body:'<path fill="currentColor" d="M128 192v640h768V320H485.76L357.504 192H128zm-32-64h287.872l128.384 128H928a32 32 0 0 1 32 32v576a32 32 0 0 1-32 32H96a32 32 0 0 1-32-32V160a32 32 0 0 1 32-32z"/>'},el={width:1024,height:1024,body:'<path fill="currentColor" d="M628.736 528.896A416 416 0 0 1 928 928H96a415.872 415.872 0 0 1 299.264-399.104L512 704l116.736-175.104zM720 304a208 208 0 1 1-416 0a208 208 0 0 1 416 0z"/>'},tl={width:1024,height:1024,body:'<path fill="currentColor" d="M480 480V128a32 32 0 0 1 64 0v352h352a32 32 0 1 1 0 64H544v352a32 32 0 1 1-64 0V544H128a32 32 0 0 1 0-64h352z"/>'},nl={width:1024,height:1024,body:'<path fill="currentColor" d="M128 544h768a32 32 0 1 0 0-64H128a32 32 0 0 0 0 64z"/>'};oe("right",Qs);oe("group",qs);oe("group-closed",Zs);oe("user",el);oe("plus",tl);oe("minus",nl);const ol=a.defineComponent({components:{CountShow:Cn,GroupShow:Js},props:{deviceGroup:Object,theme:{type:String,default:""},locale:String,uiControl:Object},methods:{onCheckBoxChange(e){const t=typeof e=="boolean"?e:!this.controlParams.onlyShowOnline;this.controlParams.onlyShowOnline=t,this.inputShowOnlineOnly&&(this.inputShowOnlineOnly.checked=t)},onSearchChange(){var e;this.inputSearchRef&&(this.controlParams.searchStr=(e=this.inputSearchRef)==null?void 0:e.value)},search(e){this.controlParams.searchStr=e}},setup(e){a.provide("theme",e.theme);const t=a.ref({onlyShowOnline:!1,searchStr:""}),n=a.ref(),o=a.ref();return{i18nT:nt,inputShowOnlineOnly:n,inputSearchRef:o,controlParams:t}}});const rl={class:"device-group-list"},sl={class:"search-panel"},ll={for:"onlineShow"},al={class:"device-panel"};function il(e,t,n,o,r,l){var s;const i=a.resolveComponent("CountShow"),c=a.resolveComponent("group-show");return a.openBlock(),a.createElementBlock("div",rl,[a.createElementVNode("div",sl,[a.createVNode(i,{countInfo:e.deviceGroup,"control-params":e.controlParams},{default:a.withCtx(()=>[a.createElementVNode("input",{type:"checkbox",id:"onlineShow",value:"onlineShow",onChange:t[0]||(t[0]=()=>e.onCheckBoxChange()),ref:"inputShowOnlineOnly"},null,544),a.createElementVNode("label",ll,a.toDisplayString(e.i18nT("zhi-xian-shi-zai-xian-she-bei")),1)]),_:1},8,["countInfo","control-params"])]),a.createElementVNode("div",al,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList((s=e.deviceGroup)==null?void 0:s.items,(u,m)=>(a.openBlock(),a.createBlock(c,{controlParams:e.controlParams,key:m,"ui-params":e.uiControl,deviceGroup:u},{groupHead:a.withCtx(({group:p})=>[a.renderSlot(e.$slots,"groupHead",{group:p},void 0,!0)]),group:a.withCtx(({group:p})=>[a.renderSlot(e.$slots,"group",{group:p},void 0,!0)]),deviceHead:a.withCtx(({device:p,group:f})=>[a.renderSlot(e.$slots,"deviceHead",{device:p,group:f},void 0,!0)]),device:a.withCtx(({device:p,group:f})=>[a.renderSlot(e.$slots,"device",{device:p,group:f},void 0,!0)]),_:2},1032,["controlParams","ui-params","deviceGroup"]))),128))])])}const cl=Z(ol,[["render",il],["__scopeId","data-v-beb643d9"]]);var ul=Object.defineProperty,fl=Object.defineProperties,dl=Object.getOwnPropertyDescriptors,jt=Object.getOwnPropertySymbols,ml=Object.prototype.hasOwnProperty,_l=Object.prototype.propertyIsEnumerable,Ht=(e,t,n)=>t in e?ul(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Fn=(e,t)=>{for(var n in t||(t={}))ml.call(t,n)&&Ht(e,n,t[n]);if(jt)for(var n of jt(t))_l.call(t,n)&&Ht(e,n,t[n]);return e},pl=(e,t)=>fl(e,dl(t));const de=6,zt=de*2;function gl(e,t){return e.map(({leftTop:{col:n,row:o},rightBottom:{col:r,row:l}})=>`<line x1="${n*t.col+de}" y1="${o*t.row+de}" x2="${r*t.col+de}" y2="${l*t.row+de}" stroke="black" stroke-width="5"/>`).join(" ")}function hl(e,t,n){return n.findIndex(o=>e>=o.leftTop.row&&e<o.rightBottom.row&&t>=o.leftTop.col&&t<o.rightBottom.col)>=0}function vl(e,t,n){n.forEach(o=>{const r=pl(Fn({},o.leftTop),{id:Rn(o.leftTop),layout:{left:100/t.col*o.leftTop.col,top:100/t.row*o.leftTop.row,width:100/t.col*(o.rightBottom.col-o.leftTop.col),height:100/t.row*(o.rightBottom.row-o.leftTop.row)},h:o.rightBottom.col-o.leftTop.col,w:o.rightBottom.row-o.leftTop.row});e.push(r)})}function Rn(e){return`${e.row}-${e.col}`}const Yt="ComponentsDefaultLayoutKeyAF84566",Kt="ComponentsCustomLayoutsKeyAF84566";function El(e){const t=[],n=[];for(let o=0;o<e.points.length/2;o++)n.push(e.points.slice(o*2,o*2+2));if(typeof e.row=="number"){const o=e.row;n.forEach(([r,l])=>{t.push({leftTop:{row:o,col:r},rightBottom:{row:o,col:l}})})}if(typeof e.col=="number"){const o=e.col;n.forEach(([r,l])=>{t.push({leftTop:{col:o,row:r},rightBottom:{col:o,row:l}})})}return t}const he={TransLayoutToFrams(e){const t=[];e.area&&t.push(e.area),e.areas&&t.push(...e.areas);const n=[];for(let o=0;o<e.row;o++)for(let r=0;r<e.col;r++){if(hl(o,r,t))continue;const l=Fn({layout:{left:100/e.col*r,top:100/e.row*o,width:100/e.col,height:100/e.row},id:Rn({row:o,col:r})},{row:o,col:r,w:1,h:1});n.push(l)}return vl(n,e,t),n},TransLayoutToSVG(e,t){const n=[];e.area&&n.push(e.area),e.areas&&n.push(...e.areas);const o=[],r=[];for(let u=0;u<=e.row;u++)o.push({row:u,points:[0,e.col]});for(let u=0;u<=e.col;u++)r.push({col:u,points:[0,e.row]});n.forEach(({leftTop:{row:u,col:m},rightBottom:{row:p,col:f}})=>{for(let v=u+1;v<p;v++)o[v].points.push(m,f);for(let v=m+1;v<f;v++)r[v].points.push(u,p)});const l=o.concat(...r),s=[];l.forEach(u=>{u.points=u.points.sort(),s.push(...El(u))});const i={row:t.height/e.row,col:t.width/e.col},c=gl(s,i);return`<svg viewBox='0 0 ${t.width+zt} ${t.height+zt} ' width="100%" height="100%"> ${c} </svg>`},StorageDefaultLayout:{get(){const e=localStorage.getItem(Yt);if(e==null)return null;try{return JSON.parse(e)}catch{return null}},set(e){localStorage.setItem(Yt,JSON.stringify(e))}},CustomLayouts:{get(){const e=localStorage.getItem(Kt);if(e==null)return[];try{return JSON.parse(e)}catch{return[]}},set(e){localStorage.setItem(Kt,JSON.stringify(e))}}},yl=a.defineComponent({emits:{onselect(e,t){return!0}},props:{defaultLayout:{type:Object},layouts:{type:Object}},setup(e){const t=a.ref([]);return e.layouts&&e.layouts.forEach(n=>{t.value.push({svg:he.TransLayoutToSVG(n,{width:100,height:100}),layout:n,select:JSON.stringify(n)==JSON.stringify(e.defaultLayout)})}),{layoutInfos:t}},mounted(){const e=this.layoutInfos.find(t=>t.select);e&&this.$emit("onselect",{layout:e.layout,cancel:!1},e.svg)},methods:{SelectLayoutById(e){const t=this.layoutInfos.find(n=>JSON.stringify(n.layout)==e);return t?(t.select||this.selectClick(t),!0):!1},selectClick(e){if(e.select==!1){const t={layout:e.layout,cancel:!1};this.$emit("onselect",t,e.svg),t.cancel||(this.layoutInfos.forEach(n=>{n.select=!1}),e.select=!0)}}}});const Nl=["onClick"],bl={style:{position:"relative",display:"inline-block",margin:"10px"}},Ol=["innerHTML"],Ll={style:{"vertical-align":"middle"}};function Tl(e,t,n,o,r,l){return a.openBlock(),a.createElementBlock("div",null,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(e.layoutInfos,s=>(a.openBlock(),a.createElementBlock("div",{class:a.normalizeClass(s.select?"layout-item layout-item-select":"layout-item"),onClick:i=>e.selectClick(s)},[a.createElementVNode("div",bl,[a.createElementVNode("div",{innerHTML:s.svg,class:"svg-style"},null,8,Ol),a.createElementVNode("span",Ll,a.toDisplayString(s.layout.name),1)])],10,Nl))),256))])}const Mn=Z(yl,[["render",Tl],["__scopeId","data-v-775da49d"]]),Il=a.defineComponent({props:{layout:{type:Object}},setup(e){const t=a.computed(()=>e.layout?he.TransLayoutToFrams(e.layout).sort((o,r)=>o.row==r.row?o.col-r.col:o.row-r.row):[]);return{areas:a.computed(()=>t.value.map(o=>({id:o.id,row:o.row,col:o.col,h:o.h,w:o.w}))),frameRef:t}}});const wl={style:{position:"relative",height:"100%",width:"100%"}};function Sl(e,t,n,o,r,l){return a.openBlock(),a.createElementBlock("div",wl,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(e.frameRef,({layout:s,id:i,row:c,col:u,w:m,h:p},f)=>(a.openBlock(),a.createElementBlock("div",{class:"play-area",key:f,style:a.normalizeStyle(`position: absolute; top: calc(${s.top}%); left: calc(${s.left}%); width: calc(${s.width}%); height: calc(${s.height}%);`)},[a.renderSlot(e.$slots,"default",{id:i,row:c,col:u,w:m,h:p,index:f,areas:e.areas},void 0,!0)],4))),128))])}const Un=Z(Il,[["render",Sl],["__scopeId","data-v-e6baa31a"]]),Cl={width:1024,height:1024,body:'<path fill="currentColor" d="M195.2 195.2a64 64 0 0 1 90.496 0L512 421.504L738.304 195.2a64 64 0 0 1 90.496 90.496L602.496 512L828.8 738.304a64 64 0 0 1-90.496 90.496L512 602.496L285.696 828.8a64 64 0 0 1-90.496-90.496L421.504 512L195.2 285.696a64 64 0 0 1 0-90.496z"/>'};oe("close",Cl);const Al=a.defineComponent({components:{VideoAreaLayoutShow:Un,Icon:Ae},setup(){const e=a.ref(3),t=a.ref(3),n=a.ref([]),o=a.computed(()=>exports.VideoAreaLayout.genLayout(e.value,t.value,n.value)),r=a.ref({}),l=a.ref([]);return{areas:n,row:e,col:t,layout:o,selectAreaInfo:r,tempSelectAreaInfo:l}},mounted(){window.addEventListener("mouseup",this.onMouseUp)},unmounted(){window.removeEventListener("mouseup",this.onMouseUp)},methods:{onDelLayout(e){console.log(this.layout,e);const t=this.areas.findIndex(([n,o])=>e.row==o&&e.col==n);t>=0&&this.areas.splice(t,1)},onMouseUp(){if(this.selectAreaInfo.error){this.selectAreaInfo.start=void 0,this.selectAreaInfo.end=void 0,this.selectAreaInfo.error=void 0;return}if(this.selectAreaInfo.start){const e=this.GetLayouts();e&&((e[1].row-e[0].row>0||e[1].col-e[0].col>0)&&this.areas.push([e[0].col,e[0].row,e[1].col+1,e[1].row+1]),console.log(this.areas),this.selectAreaInfo.start=void 0,this.selectAreaInfo.end=void 0)}},GetLayouts(){var e,t,n,o,r,l,s,i;if(this.selectAreaInfo.start&&this.selectAreaInfo.end)return[{id:"",col:Math.min((e=this.selectAreaInfo.start)==null?void 0:e.col,(t=this.selectAreaInfo.end)==null?void 0:t.col),row:Math.min((n=this.selectAreaInfo.start)==null?void 0:n.row,(o=this.selectAreaInfo.end)==null?void 0:o.row),areas:[]},{id:"",col:Math.max((r=this.selectAreaInfo.start)==null?void 0:r.col,(l=this.selectAreaInfo.end)==null?void 0:l.col),row:Math.max((s=this.selectAreaInfo.start)==null?void 0:s.row,(i=this.selectAreaInfo.end)==null?void 0:i.row),areas:[]}]},genClass(e){if(e.w&&e.w>1||e.h&&e.h>1)return"area-item area-compose";if(this.selectAreaInfo.error&&e.row==this.selectAreaInfo.error.row&&e.col==this.selectAreaInfo.error.col)return"area-item area-select-cant";let t="area-item";const n=this.GetLayouts();if(n){const[o,r]=n;this.checkVaild([o.col,o.row,r.col,r.row])?e.col>=o.col&&e.col<=r.col&&e.row>=o.row&&e.row<=r.row&&(t+=" area-select"):t+=" area-select-cant"}return t},onMouseDown(e){e.w&&e.w>1||e.h&&e.h>1||(this.selectAreaInfo.start=e,this.selectAreaInfo.end=e)},checkVaild(e){e[0]>e[2];const[t,n]=e[0]>e[2]?[e[2],e[0]]:[e[0],e[2]],[o,r]=e[1]>e[3]?[e[3],e[1]]:[e[1],e[3]];console.log(t,n,o,r);for(let l=t;l<=n;l++)for(let s=o;s<=r;s++)if(this.areas.find(i=>this.checkPointInArea([l,s],i)))return!1;return!0},checkPointInArea([e,t],[n,o,r,l]){return console.log(e,t,n,o,r,l),e>=n&&e<r&&t>=o&&t<l},onMouseOver(e,t){t.w&&t.w>1||t.h&&t.h>1||(e.buttons==1?this.selectAreaInfo.start&&(this.selectAreaInfo.error=void 0,this.checkVaild([this.selectAreaInfo.start.col,this.selectAreaInfo.start.row,t.col,t.row])?this.selectAreaInfo.end=t:this.selectAreaInfo.error=t):this.selectAreaInfo.start&&(this.selectAreaInfo.start=void 0,this.selectAreaInfo.end=void 0))}}});const Dl={style:{height:"calc(100% - 80px)",width:"calc(100%)",position:"relative"}},Pl=["onMouseenter","onMousedown"],kl={style:{"font-size":"32px"}},Vl={style:{display:"inline-block",width:"40px","text-align":"center"}},$l={style:{display:"inline-block",width:"calc(100% - 40px)","text-align":"right","vertical-align":"middle"}},Fl=["onClick"];function Rl(e,t,n,o,r,l){const s=a.resolveComponent("Icon"),i=a.resolveComponent("VideoAreaLayoutShow");return a.openBlock(),a.createElementBlock("div",Dl,[a.createVNode(i,{layout:e.layout},{default:a.withCtx(c=>[a.createElementVNode("div",{class:a.normalizeClass(e.genClass(c)),onMouseenter:u=>e.onMouseOver(u,c),onMousedown:u=>e.onMouseDown(c),style:{"user-select":"none"}},[a.createElementVNode("div",kl,[a.createElementVNode("div",Vl,a.toDisplayString(c.index+1),1),a.createElementVNode("div",$l,[a.createElementVNode("span",{onClick:u=>e.onDelLayout(c)},[c.w>1||c.h>1?(a.openBlock(),a.createBlock(s,{key:0,icon:"close",class:"close-btn"})):a.createCommentVNode("",!0)],8,Fl)])])],42,Pl)]),_:1},8,["layout"])])}const Ml=Z(Al,[["render",Rl],["__scopeId","data-v-c3d9b21a"]]),Ul=a.defineComponent({components:{Icon:Ae,LayoutShow:Mn,CustomLayoutGen:Ml},setup(){return{layout:a.ref(he.CustomLayouts.get()),i18nT:nt}}});const Bl={style:{"margin-left":"10px","margin-top":"10px"}},xl={class:"plus-custom-layout"},Gl=a.createTextVNode("\u6DFB\u52A0\u5E03\u5C40 "),Wl={style:{"margin-top":"10px"}},jl={style:{height:"300px"}};function Hl(e,t,n,o,r,l){const s=a.resolveComponent("Icon"),i=a.resolveComponent("CustomLayoutGen");return a.openBlock(),a.createElementBlock("div",Bl,[a.createElementVNode("span",null,[a.createTextVNode(a.toDisplayString(e.i18nT("zi-ding-yi-bu-ju"))+"\uFF1A ",1),a.createElementVNode("span",xl,[a.createVNode(s,{icon:"plus",style:{"vertical-align":"text-top"}}),Gl])]),a.createElementVNode("div",Wl,[a.createElementVNode("div",jl,[a.createVNode(i)])])])}const zl=Z(Ul,[["render",Hl],["__scopeId","data-v-f8b51862"]]),Yl=a.defineComponent({emits:{LayoutChange(e,t,n){return!0}},components:{UseCustomLayoutSelector:zl,LayoutShow:Mn,Icon:Ae},setup(e,t){const n=[exports.VideoAreaLayout.Test.genLayout(1,1),exports.VideoAreaLayout.Test.genLayout(1,2),exports.VideoAreaLayout.Test.genLayout(2,2),exports.VideoAreaLayout.Test.genLayout(2,3),exports.VideoAreaLayout.genLayout(3,3,[[0,0,2,2],[2,0,3,2]]),exports.VideoAreaLayout.Test.genLayout(3,3,[0,0,2,2]),exports.VideoAreaLayout.Test.genLayout(3,3,[1,0,2,3]),exports.VideoAreaLayout.Test.genLayout(4,4,[0,0,3,3]),exports.VideoAreaLayout.Test.genLayout(3,3),exports.VideoAreaLayout.Test.genLayout(5,5,[0,0,4,4]),exports.VideoAreaLayout.Test.genLayout(6,6,[0,0,5,5]),exports.VideoAreaLayout.Test.genLayout(4,4,[1,1,3,3]),exports.VideoAreaLayout.Test.genLayout(4,4),exports.VideoAreaLayout.Test.genLayout(5,5),exports.VideoAreaLayout.Test.genLayout(6,6),exports.VideoAreaLayout.genLayout(8,8,[[0,0,3,3],[3,0,5,2],[5,0,7,2]])],o=a.ref();let r=he.StorageDefaultLayout.get();const l=r||n[2];function s(_,g){return t.emit("LayoutChange",JSON.stringify(_.layout),_,()=>{m.value&&p()}),_.cancel||(u.value=g),!_.cancel}let i=!0;const c=function(_,g){JSON.stringify(r)!=JSON.stringify(_)&&s(_,g)&&i&&(r=_.layout,he.StorageDefaultLayout.set(_.layout)),u.value.length==0&&s(_,g)},u=a.ref(""),m=a.ref(!1),p=()=>{m.value=!m.value,m.value?window.addEventListener("click",f):window.removeEventListener("click",f)},f=_=>{m.value&&_.composedPath().findIndex(({className:N})=>N=="layout-switcher")<0&&(m.value=!1,window.removeEventListener("click",f))};return{i18nT:nt,selectClassicalLayout:(_,g,N)=>{var O;N||(i=!1);const T=n.find(L=>L.row==_&&L.col==g&&typeof L.area>"u"&&typeof L.areas>"u");T&&((O=o.value)==null||O.SelectLayoutById(JSON.stringify(T))),N=!0},selectLoyoutById:(_,g)=>{var N;g||(i=!1),(N=o.value)==null||N.SelectLayoutById(_),g=!0},refLayoutShow:o,clickShowSelectPanel:p,showSelectPanel:m,onselect:c,svgSelect:u,layout:n,defaultLayout:l}},expose:["selectLoyoutById","selectClassicalLayout"]});const Kl={class:"layout-switcher"},Xl=["innerHTML"],Jl={class:"switch-panel"},Ql={style:{"margin-left":"10px"}},ql={style:{"margin-left":"10px",padding:"10px"}},Zl={style:{"margin-left":"10px"}};function ea(e,t,n,o,r,l){const s=a.resolveComponent("LayoutShow");return a.openBlock(),a.createElementBlock("div",Kl,[a.createElementVNode("div",{onClick:t[0]||(t[0]=(...i)=>e.clickShowSelectPanel&&e.clickShowSelectPanel(...i)),class:"switch-switcher"},[a.createElementVNode("div",{innerHTML:e.svgSelect,style:{height:"32px",display:"inline-block","vertical-align":"middle",width:"32px"}},null,8,Xl)]),a.withDirectives(a.createElementVNode("div",Jl,[a.createElementVNode("div",Ql,[a.createElementVNode("span",null,a.toDisplayString(e.i18nT("qing-xuan-ze-bu-ju-yang-shi")),1)]),a.createElementVNode("div",ql,[a.createElementVNode("div",Zl,[a.createElementVNode("span",null,a.toDisplayString(e.i18nT("biao-zhun-bu-ju"))+"\uFF1A",1),a.createVNode(s,{ref:"refLayoutShow",layouts:e.layout,defaultLayout:e.defaultLayout,onOnselect:e.onselect},null,8,["layouts","defaultLayout","onOnselect"])])])],512),[[a.vShow,e.showSelectPanel]])])}const ta=Z(Yl,[["render",ea],["__scopeId","data-v-5f91d49c"]]),Xt={RecursionDeviceGroup:cl,VideoAreasLayoutShow:Un,MultiVideoAreaLayoutSwitch:ta},na={install(e,t){qr(t&&typeof t.locale<"u"?t.locale:Ln.en),t.deviceListDisplayStyle&&In(t.deviceListDisplayStyle);for(const n in Xt){const o=Xt[n];e.component(n,o)}}};exports.DeviceListNameDisplayStyle=ot;exports.SetDeviceListNameDisplayStyle=In;exports.default=na;
28
28
  //# sourceMappingURL=smarteye-e-components.js.map