@stonecrop/desktop 0.3.10 โ 0.3.11
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.
- package/dist/desktop.js +1291 -1175
- package/dist/desktop.js.map +1 -1
- package/dist/desktop.umd.cjs +20 -20
- package/dist/desktop.umd.cjs.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +5 -5
package/dist/desktop.umd.cjs
CHANGED
|
@@ -1,53 +1,53 @@
|
|
|
1
|
-
(function(J,r){typeof exports=="object"&&typeof module<"u"?r(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],r):(J=typeof globalThis<"u"?globalThis:J||self,r(J["@stonecrop/desktop"]={},J.Vue))})(this,function(J,r){"use strict";const lr={class:"action-menu-icon"},ur=["onclick"],dr={key:1},pr=["onClick"],fr={class:"dropdown-container"},hr={class:"dropdown"},mr=["onclick"],gr=["href"],yr={class:"dropdown-item"},wr=r.defineComponent({__name:"ActionSet",props:{elements:{}},setup(e){const t=r.ref(e.elements),n=r.ref(!1),o=r.ref(null),s=r.ref(!1),a=r.ref(!1);r.onMounted(()=>{i()});const i=()=>{for(const d of t.value)d.type==="dropdown"&&(d.show=!1)},c=()=>{s.value=!0,o.value=setTimeout(()=>{s.value&&(n.value=!0)},500)},p=()=>{s.value=!1,a.value=!1,clearTimeout(o.value),n.value=!1},l=d=>{const u=!t.value[d].show;i(),t.value[d].show=u};return(d,u)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass([{"open-set":n.value,"hovered-and-closed":a.value},"action-set collapse"]),onMouseover:c,onMouseleave:p},[r.createElementVNode("div",lr,[r.createElementVNode("div",{id:"chevron",onClick:u[0]||(u[0]=f=>a.value=!a.value)},u[1]||(u[1]=[r.createElementVNode("svg",{class:"leftBar",version:"1.1",id:"Layer_1",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",x:"0px",y:"0px",viewBox:"0 0 100 100","xml:space":"preserve",width:"50",height:"50"},[r.createElementVNode("polygon",{points:"54.2,33.4 29.2,58.8 25,54.6 50,29.2 "})],-1),r.createElementVNode("svg",{class:"rightBar",version:"1.1",id:"Layer_1",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",x:"0px",y:"0px",viewBox:"0 0 100 100","xml:space":"preserve",width:"50",height:"50"},[r.createElementVNode("polygon",{points:"70.8,58.8 45.8,33.4 50,29.2 75,54.6 "})],-1)]))]),u[2]||(u[2]=r.createElementVNode("div",{style:{"margin-right":"30px"}},null,-1)),(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(t.value,(f,h)=>(r.openBlock(),r.createElementBlock("div",{class:"action-element",key:f.label},[f.type=="button"?(r.openBlock(),r.createElementBlock("button",{key:0,onclick:f.action,class:"button-default"},r.toDisplayString(f.label),9,ur)):r.createCommentVNode("",!0),f.type=="dropdown"?(r.openBlock(),r.createElementBlock("div",dr,[r.createElementVNode("button",{class:"button-default",onClick:m=>l(h)},r.toDisplayString(f.label),9,pr),r.withDirectives(r.createElementVNode("div",fr,[r.createElementVNode("div",hr,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(f.actions,m=>(r.openBlock(),r.createElementBlock("div",{key:m.label},[m.action!=null?(r.openBlock(),r.createElementBlock("button",{key:0,onclick:m.action,class:"dropdown-item"},r.toDisplayString(m.label),9,mr)):m.link!=null?(r.openBlock(),r.createElementBlock("a",{key:1,href:m.link},[r.createElementVNode("button",yr,r.toDisplayString(m.label),1)],8,gr)):r.createCommentVNode("",!0)]))),128))])],512),[[r.vShow,f.show]])])):r.createCommentVNode("",!0)]))),128))],34))}}),dt=(e,t)=>{const n=e.__vccOpts||e;for(const[o,s]of t)n[o]=s;return n},an=dt(wr,[["__scopeId","data-v-38e7af34"]]),br={};function vr(e,t){return r.openBlock(),r.createElementBlock("dialog")}const cn=dt(br,[["render",vr]]),Er=(e,t)=>{const n=e.__vccOpts||e;for(const[o,s]of t)n[o]=s;return n};typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const _r={class:"aform"},kr=r.defineComponent({__name:"AForm",props:{modelValue:{},data:{},readonly:{type:Boolean}},emits:["update:modelValue"],setup(e,{emit:t}){const n=t,o=r.ref(e.data||{}),s=i=>{let c={};for(const[p,l]of Object.entries(i))["component","fieldtype"].includes(p)||(c[p]=l),p==="rows"&&l&&l.length===0&&(c.rows=o.value[i.fieldname]);return c},a=r.computed({get:()=>e.modelValue.map((i,c)=>r.computed({get(){return i.value},set:p=>{e.modelValue[c].value=p,n("update:modelValue",e.modelValue)}})),set:()=>{}});return(i,c)=>(r.openBlock(),r.createElementBlock("form",_r,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(i.modelValue,(p,l)=>(r.openBlock(),r.createBlock(r.resolveDynamicComponent(p.component),r.mergeProps({key:l,schema:p,modelValue:a.value[l].value,"onUpdate:modelValue":d=>a.value[l].value=d,data:o.value[p.fieldname],readonly:i.readonly,ref_for:!0},s(p)),null,16,["schema","modelValue","onUpdate:modelValue","data","readonly"]))),128))]))}}),Nr=Er(kr,[["__scopeId","data-v-68845234"]]);typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;var $r=Object.defineProperty,Sr=(e,t,n)=>t in e?$r(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Y=(e,t,n)=>Sr(e,typeof t!="symbol"?t+"":t,n);function pt(e){this.message=e||""}pt.prototype=Object.create(Error.prototype,{constructor:{value:pt},name:{value:"NotImplemented"},stack:{get:function(){return new Error().stack}}});const ln=class lt{constructor(t,n,o,s,a){if(Y(this,"name","Stonecrop"),Y(this,"registry"),Y(this,"store"),Y(this,"schema"),Y(this,"workflow"),Y(this,"actions"),lt._root)return lt._root;lt._root=this,this.registry=t,this.store=n,this.schema=o,this.workflow=s,this.actions=a}setup(t){this.getMeta(t),this.getWorkflow(t),this.getActions(t)}getMeta(t){return this.registry.getMeta?this.registry.getMeta(t.doctype):new pt(t.doctype)}getWorkflow(t){const n=this.registry.registry[t.slug];this.workflow=n.workflow}getActions(t){const n=this.registry.registry[t.slug];this.actions=n.actions}async getRecords(t,n){this.store.$patch({records:[]});const o=await(await fetch(`/${t.slug}`,n)).json();this.store.$patch({records:o})}async getRecord(t,n){this.store.$patch({record:{}});const o=await(await fetch(`/${t.slug}/${n}`)).json();this.store.$patch({record:o})}runAction(t,n,o){var s;const a=(s=this.registry.registry[t.slug].actions)==null?void 0:s.get(n);if(this.workflow){const{initialState:i}=this.workflow;this.workflow.transition(i,{type:n}),a&&a.length>0&&a.forEach(c=>{new Function(c)(o)})}}};Y(ln,"_root");let Or=ln;var un=!1;function qe(e,t,n){return Array.isArray(e)?(e.length=Math.max(e.length,t),e.splice(t,1,n),n):(e[t]=n,n)}function ft(e,t){if(Array.isArray(e)){e.splice(t,1);return}delete e[t]}function xr(){return dn().__VUE_DEVTOOLS_GLOBAL_HOOK__}function dn(){return typeof navigator<"u"&&typeof window<"u"?window:typeof globalThis<"u"?globalThis:{}}const Cr=typeof Proxy=="function",Pr="devtools-plugin:setup",Vr="plugin:settings:set";let Pe,ht;function Dr(){var e;return Pe!==void 0||(typeof window<"u"&&window.performance?(Pe=!0,ht=window.performance):typeof globalThis<"u"&&!((e=globalThis.perf_hooks)===null||e===void 0)&&e.performance?(Pe=!0,ht=globalThis.perf_hooks.performance):Pe=!1),Pe}function Ir(){return Dr()?ht.now():Date.now()}class Rr{constructor(t,n){this.target=null,this.targetQueue=[],this.onQueue=[],this.plugin=t,this.hook=n;const o={};if(t.settings)for(const i in t.settings){const c=t.settings[i];o[i]=c.defaultValue}const s=`__vue-devtools-plugin-settings__${t.id}`;let a=Object.assign({},o);try{const i=localStorage.getItem(s),c=JSON.parse(i);Object.assign(a,c)}catch{}this.fallbacks={getSettings(){return a},setSettings(i){try{localStorage.setItem(s,JSON.stringify(i))}catch{}a=i},now(){return Ir()}},n&&n.on(Vr,(i,c)=>{i===this.plugin.id&&this.fallbacks.setSettings(c)}),this.proxiedOn=new Proxy({},{get:(i,c)=>this.target?this.target.on[c]:(...p)=>{this.onQueue.push({method:c,args:p})}}),this.proxiedTarget=new Proxy({},{get:(i,c)=>this.target?this.target[c]:c==="on"?this.proxiedOn:Object.keys(this.fallbacks).includes(c)?(...p)=>(this.targetQueue.push({method:c,args:p,resolve:()=>{}}),this.fallbacks[c](...p)):(...p)=>new Promise(l=>{this.targetQueue.push({method:c,args:p,resolve:l})})})}async setRealTarget(t){this.target=t;for(const n of this.onQueue)this.target.on[n.method](...n.args);for(const n of this.targetQueue)n.resolve(await this.target[n.method](...n.args))}}function mt(e,t){const n=e,o=dn(),s=xr(),a=Cr&&n.enableEarlyProxy;if(s&&(o.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__||!a))s.emit(Pr,e,t);else{const i=a?new Rr(n,s):null;(o.__VUE_DEVTOOLS_PLUGINS__=o.__VUE_DEVTOOLS_PLUGINS__||[]).push({pluginDescriptor:n,setupFn:t,proxy:i}),i&&t(i.proxiedTarget)}}/*!
|
|
1
|
+
(function(J,r){typeof exports=="object"&&typeof module<"u"?r(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],r):(J=typeof globalThis<"u"?globalThis:J||self,r(J["@stonecrop/desktop"]={},J.Vue))})(this,function(J,r){"use strict";const yr={class:"action-menu-icon"},wr=["onclick"],vr={key:1},br=["onClick"],Er={class:"dropdown-container"},_r={class:"dropdown"},kr=["onclick"],Nr=["href"],$r={class:"dropdown-item"},Sr=r.defineComponent({__name:"ActionSet",props:{elements:{}},setup(e){const t=r.ref(e.elements),n=r.ref(!1),o=r.ref(null),s=r.ref(!1),a=r.ref(!1);r.onMounted(()=>{i()});const i=()=>{for(const d of t.value)d.type==="dropdown"&&(d.show=!1)},c=()=>{s.value=!0,o.value=setTimeout(()=>{s.value&&(n.value=!0)},500)},f=()=>{s.value=!1,a.value=!1,clearTimeout(o.value),n.value=!1},l=d=>{const u=!t.value[d].show;i(),t.value[d].show=u};return(d,u)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass([{"open-set":n.value,"hovered-and-closed":a.value},"action-set collapse"]),onMouseover:c,onMouseleave:f},[r.createElementVNode("div",yr,[r.createElementVNode("div",{id:"chevron",onClick:u[0]||(u[0]=p=>a.value=!a.value)},u[1]||(u[1]=[r.createElementVNode("svg",{class:"leftBar",version:"1.1",id:"Layer_1",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",x:"0px",y:"0px",viewBox:"0 0 100 100","xml:space":"preserve",width:"50",height:"50"},[r.createElementVNode("polygon",{points:"54.2,33.4 29.2,58.8 25,54.6 50,29.2 "})],-1),r.createElementVNode("svg",{class:"rightBar",version:"1.1",id:"Layer_1",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",x:"0px",y:"0px",viewBox:"0 0 100 100","xml:space":"preserve",width:"50",height:"50"},[r.createElementVNode("polygon",{points:"70.8,58.8 45.8,33.4 50,29.2 75,54.6 "})],-1)]))]),u[2]||(u[2]=r.createElementVNode("div",{style:{"margin-right":"30px"}},null,-1)),(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(t.value,(p,h)=>(r.openBlock(),r.createElementBlock("div",{class:"action-element",key:p.label},[p.type=="button"?(r.openBlock(),r.createElementBlock("button",{key:0,onclick:p.action,class:"button-default"},r.toDisplayString(p.label),9,wr)):r.createCommentVNode("",!0),p.type=="dropdown"?(r.openBlock(),r.createElementBlock("div",vr,[r.createElementVNode("button",{class:"button-default",onClick:m=>l(h)},r.toDisplayString(p.label),9,br),r.withDirectives(r.createElementVNode("div",Er,[r.createElementVNode("div",_r,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(p.actions,m=>(r.openBlock(),r.createElementBlock("div",{key:m.label},[m.action!=null?(r.openBlock(),r.createElementBlock("button",{key:0,onclick:m.action,class:"dropdown-item"},r.toDisplayString(m.label),9,kr)):m.link!=null?(r.openBlock(),r.createElementBlock("a",{key:1,href:m.link},[r.createElementVNode("button",$r,r.toDisplayString(m.label),1)],8,Nr)):r.createCommentVNode("",!0)]))),128))])],512),[[r.vShow,p.show]])])):r.createCommentVNode("",!0)]))),128))],34))}}),dt=(e,t)=>{const n=e.__vccOpts||e;for(const[o,s]of t)n[o]=s;return n},ln=dt(Sr,[["__scopeId","data-v-38e7af34"]]),Or={};function xr(e,t){return r.openBlock(),r.createElementBlock("dialog")}const un=dt(Or,[["render",xr]]),Cr=(e,t)=>{const n=e.__vccOpts||e;for(const[o,s]of t)n[o]=s;return n};function dn(e){return r.getCurrentScope()?(r.onScopeDispose(e),!0):!1}const fn=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const Pr=Object.prototype.toString,Vr=e=>Pr.call(e)==="[object Object]",pn=()=>{},hn=Dr();function Dr(){var e,t;return fn&&((e=window==null?void 0:window.navigator)==null?void 0:e.userAgent)&&(/iP(?:ad|hone|od)/.test(window.navigator.userAgent)||((t=window==null?void 0:window.navigator)==null?void 0:t.maxTouchPoints)>2&&/iPad|Macintosh/.test(window==null?void 0:window.navigator.userAgent))}function mn(e){return Array.isArray(e)?e:[e]}function Ir(...e){if(e.length!==1)return r.toRef(...e);const t=e[0];return typeof t=="function"?r.readonly(r.customRef(()=>({get:t,set:pn}))):r.ref(t)}const Rr=fn?window:void 0;function Ar(e){var t;const n=r.toValue(e);return(t=n==null?void 0:n.$el)!=null?t:n}function Tr(...e){let t,n,o,s;if(typeof e[0]=="string"||Array.isArray(e[0])?([n,o,s]=e,t=Rr):[t,n,o,s]=e,!t)return pn;n=mn(n),o=mn(o);const a=[],i=()=>{a.forEach(d=>d()),a.length=0},c=(d,u,p,h)=>(d.addEventListener(u,p,h),()=>d.removeEventListener(u,p,h)),f=r.watch(()=>[Ar(t),r.toValue(s)],([d,u])=>{if(i(),!d)return;const p=Vr(u)?{...u}:u;a.push(...n.flatMap(h=>o.map(m=>c(d,h,m,p))))},{immediate:!0,flush:"post"}),l=()=>{f(),i()};return dn(l),l}function ft(e){return typeof Window<"u"&&e instanceof Window?e.document.documentElement:typeof Document<"u"&&e instanceof Document?e.documentElement:e}function gn(e){const t=window.getComputedStyle(e);if(t.overflowX==="scroll"||t.overflowY==="scroll"||t.overflowX==="auto"&&e.clientWidth<e.scrollWidth||t.overflowY==="auto"&&e.clientHeight<e.scrollHeight)return!0;{const n=e.parentNode;return!n||n.tagName==="BODY"?!1:gn(n)}}function jr(e){const t=e||window.event,n=t.target;return gn(n)?!1:t.touches.length>1?!0:(t.preventDefault&&t.preventDefault(),!1)}const pt=new WeakMap;function Br(e,t=!1){const n=r.ref(t);let o=null,s="";r.watch(Ir(e),c=>{const f=ft(r.toValue(c));if(f){const l=f;if(pt.get(l)||pt.set(l,l.style.overflow),l.style.overflow!=="hidden"&&(s=l.style.overflow),l.style.overflow==="hidden")return n.value=!0;if(n.value)return l.style.overflow="hidden"}},{immediate:!0});const a=()=>{const c=ft(r.toValue(e));!c||n.value||(hn&&(o=Tr(c,"touchmove",f=>{jr(f)},{passive:!1})),c.style.overflow="hidden",n.value=!0)},i=()=>{const c=ft(r.toValue(e));!c||!n.value||(hn&&(o==null||o()),c.style.overflow=s,pt.delete(c),n.value=!1)};return dn(i),r.computed({get(){return n.value},set(c){c?a():i()}})}function Mr(){let e=!1;const t=r.ref(!1);return(n,o)=>{if(t.value=o.value,e)return;e=!0;const s=Br(n,o.value);r.watch(t,a=>s.value=a)}}Mr(),typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const Lr={class:"aform"},Wr=r.defineComponent({__name:"AForm",props:{modelValue:{},data:{},readonly:{type:Boolean}},emits:["update:modelValue"],setup(e,{emit:t}){const n=t,o=r.ref(e.data||{}),s=i=>{let c={};for(const[f,l]of Object.entries(i))["component","fieldtype"].includes(f)||(c[f]=l),f==="rows"&&l&&l.length===0&&(c.rows=o.value[i.fieldname]);return c},a=r.computed({get:()=>e.modelValue.map((i,c)=>r.computed({get(){return i.value},set:f=>{e.modelValue[c].value=f,n("update:modelValue",e.modelValue)}})),set:()=>{}});return(i,c)=>(r.openBlock(),r.createElementBlock("form",Lr,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(i.modelValue,(f,l)=>(r.openBlock(),r.createBlock(r.resolveDynamicComponent(f.component),r.mergeProps({key:l,schema:f,modelValue:a.value[l].value,"onUpdate:modelValue":d=>a.value[l].value=d,data:o.value[f.fieldname],readonly:i.readonly,ref_for:!0},s(f)),null,16,["schema","modelValue","onUpdate:modelValue","data","readonly"]))),128))]))}}),Ur=Cr(Wr,[["__scopeId","data-v-68845234"]]);typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;var Hr=Object.defineProperty,Fr=(e,t,n)=>t in e?Hr(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Y=(e,t,n)=>Fr(e,typeof t!="symbol"?t+"":t,n);function ht(e){this.message=e||""}ht.prototype=Object.create(Error.prototype,{constructor:{value:ht},name:{value:"NotImplemented"},stack:{get:function(){return new Error().stack}}});const yn=class lt{constructor(t,n,o,s,a){if(Y(this,"name","Stonecrop"),Y(this,"registry"),Y(this,"store"),Y(this,"schema"),Y(this,"workflow"),Y(this,"actions"),lt._root)return lt._root;lt._root=this,this.registry=t,this.store=n,this.schema=o,this.workflow=s,this.actions=a}setup(t){this.getMeta(t),this.getWorkflow(t),this.getActions(t)}getMeta(t){return this.registry.getMeta?this.registry.getMeta(t.doctype):new ht(t.doctype)}getWorkflow(t){const n=this.registry.registry[t.slug];this.workflow=n.workflow}getActions(t){const n=this.registry.registry[t.slug];this.actions=n.actions}async getRecords(t,n){this.store.$patch({records:[]});const o=await(await fetch(`/${t.slug}`,n)).json();this.store.$patch({records:o})}async getRecord(t,n){this.store.$patch({record:{}});const o=await(await fetch(`/${t.slug}/${n}`)).json();this.store.$patch({record:o})}runAction(t,n,o){var s;const a=(s=this.registry.registry[t.slug].actions)==null?void 0:s.get(n);if(this.workflow){const{initialState:i}=this.workflow;this.workflow.transition(i,{type:n}),a&&a.length>0&&a.forEach(c=>{new Function(c)(o)})}}};Y(yn,"_root");let zr=yn;var wn=!1;function qe(e,t,n){return Array.isArray(e)?(e.length=Math.max(e.length,t),e.splice(t,1,n),n):(e[t]=n,n)}function mt(e,t){if(Array.isArray(e)){e.splice(t,1);return}delete e[t]}function qr(){return vn().__VUE_DEVTOOLS_GLOBAL_HOOK__}function vn(){return typeof navigator<"u"&&typeof window<"u"?window:typeof globalThis<"u"?globalThis:{}}const Gr=typeof Proxy=="function",Jr="devtools-plugin:setup",Yr="plugin:settings:set";let Pe,gt;function Kr(){var e;return Pe!==void 0||(typeof window<"u"&&window.performance?(Pe=!0,gt=window.performance):typeof globalThis<"u"&&!((e=globalThis.perf_hooks)===null||e===void 0)&&e.performance?(Pe=!0,gt=globalThis.perf_hooks.performance):Pe=!1),Pe}function Qr(){return Kr()?gt.now():Date.now()}class Xr{constructor(t,n){this.target=null,this.targetQueue=[],this.onQueue=[],this.plugin=t,this.hook=n;const o={};if(t.settings)for(const i in t.settings){const c=t.settings[i];o[i]=c.defaultValue}const s=`__vue-devtools-plugin-settings__${t.id}`;let a=Object.assign({},o);try{const i=localStorage.getItem(s),c=JSON.parse(i);Object.assign(a,c)}catch{}this.fallbacks={getSettings(){return a},setSettings(i){try{localStorage.setItem(s,JSON.stringify(i))}catch{}a=i},now(){return Qr()}},n&&n.on(Yr,(i,c)=>{i===this.plugin.id&&this.fallbacks.setSettings(c)}),this.proxiedOn=new Proxy({},{get:(i,c)=>this.target?this.target.on[c]:(...f)=>{this.onQueue.push({method:c,args:f})}}),this.proxiedTarget=new Proxy({},{get:(i,c)=>this.target?this.target[c]:c==="on"?this.proxiedOn:Object.keys(this.fallbacks).includes(c)?(...f)=>(this.targetQueue.push({method:c,args:f,resolve:()=>{}}),this.fallbacks[c](...f)):(...f)=>new Promise(l=>{this.targetQueue.push({method:c,args:f,resolve:l})})})}async setRealTarget(t){this.target=t;for(const n of this.onQueue)this.target.on[n.method](...n.args);for(const n of this.targetQueue)n.resolve(await this.target[n.method](...n.args))}}function yt(e,t){const n=e,o=vn(),s=qr(),a=Gr&&n.enableEarlyProxy;if(s&&(o.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__||!a))s.emit(Jr,e,t);else{const i=a?new Xr(n,s):null;(o.__VUE_DEVTOOLS_PLUGINS__=o.__VUE_DEVTOOLS_PLUGINS__||[]).push({pluginDescriptor:n,setupFn:t,proxy:i}),i&&t(i.proxiedTarget)}}/*!
|
|
2
2
|
* pinia v2.3.0
|
|
3
3
|
* (c) 2024 Eduardo San Martin Morote
|
|
4
4
|
* @license MIT
|
|
5
|
-
*/let Ve;const De=e=>Ve=e,
|
|
5
|
+
*/let Ve;const De=e=>Ve=e,bn=process.env.NODE_ENV!=="production"?Symbol("pinia"):Symbol();function me(e){return e&&typeof e=="object"&&Object.prototype.toString.call(e)==="[object Object]"&&typeof e.toJSON!="function"}var ne;(function(e){e.direct="direct",e.patchObject="patch object",e.patchFunction="patch function"})(ne||(ne={}));const ue=typeof window<"u",En=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof global=="object"&&global.global===global?global:typeof globalThis=="object"?globalThis:{HTMLElement:null};function Zr(e,{autoBom:t=!1}={}){return t&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)?new Blob(["\uFEFF",e],{type:e.type}):e}function wt(e,t,n){const o=new XMLHttpRequest;o.open("GET",e),o.responseType="blob",o.onload=function(){Nn(o.response,t,n)},o.onerror=function(){console.error("could not download file")},o.send()}function _n(e){const t=new XMLHttpRequest;t.open("HEAD",e,!1);try{t.send()}catch{}return t.status>=200&&t.status<=299}function Ge(e){try{e.dispatchEvent(new MouseEvent("click"))}catch{const t=document.createEvent("MouseEvents");t.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),e.dispatchEvent(t)}}const Je=typeof navigator=="object"?navigator:{userAgent:""},kn=/Macintosh/.test(Je.userAgent)&&/AppleWebKit/.test(Je.userAgent)&&!/Safari/.test(Je.userAgent),Nn=ue?typeof HTMLAnchorElement<"u"&&"download"in HTMLAnchorElement.prototype&&!kn?es:"msSaveOrOpenBlob"in Je?ts:ns:()=>{};function es(e,t="download",n){const o=document.createElement("a");o.download=t,o.rel="noopener",typeof e=="string"?(o.href=e,o.origin!==location.origin?_n(o.href)?wt(e,t,n):(o.target="_blank",Ge(o)):Ge(o)):(o.href=URL.createObjectURL(e),setTimeout(function(){URL.revokeObjectURL(o.href)},4e4),setTimeout(function(){Ge(o)},0))}function ts(e,t="download",n){if(typeof e=="string")if(_n(e))wt(e,t,n);else{const o=document.createElement("a");o.href=e,o.target="_blank",setTimeout(function(){Ge(o)})}else navigator.msSaveOrOpenBlob(Zr(e,n),t)}function ns(e,t,n,o){if(o=o||open("","_blank"),o&&(o.document.title=o.document.body.innerText="downloading..."),typeof e=="string")return wt(e,t,n);const s=e.type==="application/octet-stream",a=/constructor/i.test(String(En.HTMLElement))||"safari"in En,i=/CriOS\/[\d]+/.test(navigator.userAgent);if((i||s&&a||kn)&&typeof FileReader<"u"){const c=new FileReader;c.onloadend=function(){let f=c.result;if(typeof f!="string")throw o=null,new Error("Wrong reader.result type");f=i?f:f.replace(/^data:[^;]*;/,"data:attachment/file;"),o?o.location.href=f:location.assign(f),o=null},c.readAsDataURL(e)}else{const c=URL.createObjectURL(e);o?o.location.assign(c):location.href=c,o=null,setTimeout(function(){URL.revokeObjectURL(c)},4e4)}}function U(e,t){const n="๐ "+e;typeof __VUE_DEVTOOLS_TOAST__=="function"?__VUE_DEVTOOLS_TOAST__(n,t):t==="error"?console.error(n):t==="warn"?console.warn(n):console.log(n)}function vt(e){return"_a"in e&&"install"in e}function $n(){if(!("clipboard"in navigator))return U("Your browser doesn't support the Clipboard API","error"),!0}function Sn(e){return e instanceof Error&&e.message.toLowerCase().includes("document is not focused")?(U('You need to activate the "Emulate a focused page" setting in the "Rendering" panel of devtools.',"warn"),!0):!1}async function os(e){if(!$n())try{await navigator.clipboard.writeText(JSON.stringify(e.state.value)),U("Global state copied to clipboard.")}catch(t){if(Sn(t))return;U("Failed to serialize the state. Check the console for more details.","error"),console.error(t)}}async function rs(e){if(!$n())try{On(e,JSON.parse(await navigator.clipboard.readText())),U("Global state pasted from clipboard.")}catch(t){if(Sn(t))return;U("Failed to deserialize the state from clipboard. Check the console for more details.","error"),console.error(t)}}async function ss(e){try{Nn(new Blob([JSON.stringify(e.state.value)],{type:"text/plain;charset=utf-8"}),"pinia-state.json")}catch(t){U("Failed to export the state as JSON. Check the console for more details.","error"),console.error(t)}}let oe;function as(){oe||(oe=document.createElement("input"),oe.type="file",oe.accept=".json");function e(){return new Promise((t,n)=>{oe.onchange=async()=>{const o=oe.files;if(!o)return t(null);const s=o.item(0);return t(s?{text:await s.text(),file:s}:null)},oe.oncancel=()=>t(null),oe.onerror=n,oe.click()})}return e}async function is(e){try{const t=await as()();if(!t)return;const{text:n,file:o}=t;On(e,JSON.parse(n)),U(`Global state imported from "${o.name}".`)}catch(t){U("Failed to import the state from JSON. Check the console for more details.","error"),console.error(t)}}function On(e,t){for(const n in t){const o=e.state.value[n];o?Object.assign(o,t[n]):e.state.value[n]=t[n]}}function ee(e){return{_custom:{display:e}}}const xn="๐ Pinia (root)",Ye="_root";function cs(e){return vt(e)?{id:Ye,label:xn}:{id:e.$id,label:e.$id}}function ls(e){if(vt(e)){const n=Array.from(e._s.keys()),o=e._s;return{state:n.map(s=>({editable:!0,key:s,value:e.state.value[s]})),getters:n.filter(s=>o.get(s)._getters).map(s=>{const a=o.get(s);return{editable:!1,key:s,value:a._getters.reduce((i,c)=>(i[c]=a[c],i),{})}})}}const t={state:Object.keys(e.$state).map(n=>({editable:!0,key:n,value:e.$state[n]}))};return e._getters&&e._getters.length&&(t.getters=e._getters.map(n=>({editable:!1,key:n,value:e[n]}))),e._customProperties.size&&(t.customProperties=Array.from(e._customProperties).map(n=>({editable:!0,key:n,value:e[n]}))),t}function us(e){return e?Array.isArray(e)?e.reduce((t,n)=>(t.keys.push(n.key),t.operations.push(n.type),t.oldValue[n.key]=n.oldValue,t.newValue[n.key]=n.newValue,t),{oldValue:{},keys:[],operations:[],newValue:{}}):{operation:ee(e.type),key:ee(e.key),oldValue:e.oldValue,newValue:e.newValue}:{}}function ds(e){switch(e){case ne.direct:return"mutation";case ne.patchFunction:return"$patch";case ne.patchObject:return"$patch";default:return"unknown"}}let ve=!0;const Ke=[],ge="pinia:mutations",F="pinia",{assign:fs}=Object,Qe=e=>"๐ "+e;function ps(e,t){yt({id:"dev.esm.pinia",label:"Pinia ๐",logo:"https://pinia.vuejs.org/logo.svg",packageName:"pinia",homepage:"https://pinia.vuejs.org",componentStateTypes:Ke,app:e},n=>{typeof n.now!="function"&&U("You seem to be using an outdated version of Vue Devtools. Are you still using the Beta release instead of the stable one? You can find the links at https://devtools.vuejs.org/guide/installation.html."),n.addTimelineLayer({id:ge,label:"Pinia ๐",color:15064968}),n.addInspector({id:F,label:"Pinia ๐",icon:"storage",treeFilterPlaceholder:"Search stores",actions:[{icon:"content_copy",action:()=>{os(t)},tooltip:"Serialize and copy the state"},{icon:"content_paste",action:async()=>{await rs(t),n.sendInspectorTree(F),n.sendInspectorState(F)},tooltip:"Replace the state with the content of your clipboard"},{icon:"save",action:()=>{ss(t)},tooltip:"Save the state as a JSON file"},{icon:"folder_open",action:async()=>{await is(t),n.sendInspectorTree(F),n.sendInspectorState(F)},tooltip:"Import the state from a JSON file"}],nodeActions:[{icon:"restore",tooltip:'Reset the state (with "$reset")',action:o=>{const s=t._s.get(o);s?typeof s.$reset!="function"?U(`Cannot reset "${o}" store because it doesn't have a "$reset" method implemented.`,"warn"):(s.$reset(),U(`Store "${o}" reset.`)):U(`Cannot reset "${o}" store because it wasn't found.`,"warn")}}]}),n.on.inspectComponent((o,s)=>{const a=o.componentInstance&&o.componentInstance.proxy;if(a&&a._pStores){const i=o.componentInstance.proxy._pStores;Object.values(i).forEach(c=>{o.instanceData.state.push({type:Qe(c.$id),key:"state",editable:!0,value:c._isOptionsAPI?{_custom:{value:r.toRaw(c.$state),actions:[{icon:"restore",tooltip:"Reset the state of this store",action:()=>c.$reset()}]}}:Object.keys(c.$state).reduce((f,l)=>(f[l]=c.$state[l],f),{})}),c._getters&&c._getters.length&&o.instanceData.state.push({type:Qe(c.$id),key:"getters",editable:!1,value:c._getters.reduce((f,l)=>{try{f[l]=c[l]}catch(d){f[l]=d}return f},{})})})}}),n.on.getInspectorTree(o=>{if(o.app===e&&o.inspectorId===F){let s=[t];s=s.concat(Array.from(t._s.values())),o.rootNodes=(o.filter?s.filter(a=>"$id"in a?a.$id.toLowerCase().includes(o.filter.toLowerCase()):xn.toLowerCase().includes(o.filter.toLowerCase())):s).map(cs)}}),globalThis.$pinia=t,n.on.getInspectorState(o=>{if(o.app===e&&o.inspectorId===F){const s=o.nodeId===Ye?t:t._s.get(o.nodeId);if(!s)return;s&&(o.nodeId!==Ye&&(globalThis.$store=r.toRaw(s)),o.state=ls(s))}}),n.on.editInspectorState((o,s)=>{if(o.app===e&&o.inspectorId===F){const a=o.nodeId===Ye?t:t._s.get(o.nodeId);if(!a)return U(`store "${o.nodeId}" not found`,"error");const{path:i}=o;vt(a)?i.unshift("state"):(i.length!==1||!a._customProperties.has(i[0])||i[0]in a.$state)&&i.unshift("$state"),ve=!1,o.set(a,i,o.state.value),ve=!0}}),n.on.editComponentState(o=>{if(o.type.startsWith("๐")){const s=o.type.replace(/^๐\s*/,""),a=t._s.get(s);if(!a)return U(`store "${s}" not found`,"error");const{path:i}=o;if(i[0]!=="state")return U(`Invalid path for store "${s}":
|
|
6
6
|
${i}
|
|
7
|
-
Only state can be modified.`);i[0]="$state",
|
|
7
|
+
Only state can be modified.`);i[0]="$state",ve=!1,o.set(a,i,o.state.value),ve=!0}})})}function hs(e,t){Ke.includes(Qe(t.$id))||Ke.push(Qe(t.$id)),yt({id:"dev.esm.pinia",label:"Pinia ๐",logo:"https://pinia.vuejs.org/logo.svg",packageName:"pinia",homepage:"https://pinia.vuejs.org",componentStateTypes:Ke,app:e,settings:{logStoreChanges:{label:"Notify about new/deleted stores",type:"boolean",defaultValue:!0}}},n=>{const o=typeof n.now=="function"?n.now.bind(n):Date.now;t.$onAction(({after:i,onError:c,name:f,args:l})=>{const d=Cn++;n.addTimelineEvent({layerId:ge,event:{time:o(),title:"๐ซ "+f,subtitle:"start",data:{store:ee(t.$id),action:ee(f),args:l},groupId:d}}),i(u=>{de=void 0,n.addTimelineEvent({layerId:ge,event:{time:o(),title:"๐ฌ "+f,subtitle:"end",data:{store:ee(t.$id),action:ee(f),args:l,result:u},groupId:d}})}),c(u=>{de=void 0,n.addTimelineEvent({layerId:ge,event:{time:o(),logType:"error",title:"๐ฅ "+f,subtitle:"end",data:{store:ee(t.$id),action:ee(f),args:l,error:u},groupId:d}})})},!0),t._customProperties.forEach(i=>{r.watch(()=>r.unref(t[i]),(c,f)=>{n.notifyComponentUpdate(),n.sendInspectorState(F),ve&&n.addTimelineEvent({layerId:ge,event:{time:o(),title:"Change",subtitle:i,data:{newValue:c,oldValue:f},groupId:de}})},{deep:!0})}),t.$subscribe(({events:i,type:c},f)=>{if(n.notifyComponentUpdate(),n.sendInspectorState(F),!ve)return;const l={time:o(),title:ds(c),data:fs({store:ee(t.$id)},us(i)),groupId:de};c===ne.patchFunction?l.subtitle="โคต๏ธ":c===ne.patchObject?l.subtitle="๐งฉ":i&&!Array.isArray(i)&&(l.subtitle=i.type),i&&(l.data["rawEvent(s)"]={_custom:{display:"DebuggerEvent",type:"object",tooltip:"raw DebuggerEvent[]",value:i}}),n.addTimelineEvent({layerId:ge,event:l})},{detached:!0,flush:"sync"});const s=t._hotUpdate;t._hotUpdate=r.markRaw(i=>{s(i),n.addTimelineEvent({layerId:ge,event:{time:o(),title:"๐ฅ "+t.$id,subtitle:"HMR update",data:{store:ee(t.$id),info:ee("HMR update")}}}),n.notifyComponentUpdate(),n.sendInspectorTree(F),n.sendInspectorState(F)});const{$dispose:a}=t;t.$dispose=()=>{a(),n.notifyComponentUpdate(),n.sendInspectorTree(F),n.sendInspectorState(F),n.getSettings().logStoreChanges&&U(`Disposed "${t.$id}" store ๐`)},n.notifyComponentUpdate(),n.sendInspectorTree(F),n.sendInspectorState(F),n.getSettings().logStoreChanges&&U(`"${t.$id}" store installed ๐`)})}let Cn=0,de;function Pn(e,t,n){const o=t.reduce((s,a)=>(s[a]=r.toRaw(e)[a],s),{});for(const s in o)e[s]=function(){const a=Cn,i=n?new Proxy(e,{get(...f){return de=a,Reflect.get(...f)},set(...f){return de=a,Reflect.set(...f)}}):e;de=a;const c=o[s].apply(i,arguments);return de=void 0,c}}function ms({app:e,store:t,options:n}){if(!t.$id.startsWith("__hot:")){if(t._isOptionsAPI=!!n.state,!t._p._testing){Pn(t,Object.keys(n.actions),t._isOptionsAPI);const o=t._hotUpdate;r.toRaw(t)._hotUpdate=function(s){o.apply(this,arguments),Pn(t,Object.keys(s._hmrPayload.actions),!!t._isOptionsAPI)}}hs(e,t)}}function gs(){const e=r.effectScope(!0),t=e.run(()=>r.ref({}));let n=[],o=[];const s=r.markRaw({install(a){De(s),s._a=a,a.provide(bn,s),a.config.globalProperties.$pinia=s,process.env.NODE_ENV!=="production"&&process.env.NODE_ENV!=="test"&&ue&&ps(a,s),o.forEach(i=>n.push(i)),o=[]},use(a){return!this._a&&!wn?o.push(a):n.push(a),this},_p:n,_a:null,_e:e,_s:new Map,state:t});return process.env.NODE_ENV!=="production"&&process.env.NODE_ENV!=="test"&&ue&&typeof Proxy<"u"&&s.use(ms),s}function Vn(e,t){for(const n in t){const o=t[n];if(!(n in e))continue;const s=e[n];me(s)&&me(o)&&!r.isRef(o)&&!r.isReactive(o)?e[n]=Vn(s,o):e[n]=o}return e}const Dn=()=>{};function In(e,t,n,o=Dn){e.push(t);const s=()=>{const a=e.indexOf(t);a>-1&&(e.splice(a,1),o())};return!n&&r.getCurrentScope()&&r.onScopeDispose(s),s}function be(e,...t){e.slice().forEach(n=>{n(...t)})}const ys=e=>e(),Rn=Symbol(),bt=Symbol();function Et(e,t){e instanceof Map&&t instanceof Map?t.forEach((n,o)=>e.set(o,n)):e instanceof Set&&t instanceof Set&&t.forEach(e.add,e);for(const n in t){if(!t.hasOwnProperty(n))continue;const o=t[n],s=e[n];me(s)&&me(o)&&e.hasOwnProperty(n)&&!r.isRef(o)&&!r.isReactive(o)?e[n]=Et(s,o):e[n]=o}return e}const ws=process.env.NODE_ENV!=="production"?Symbol("pinia:skipHydration"):Symbol();function vs(e){return!me(e)||!e.hasOwnProperty(ws)}const{assign:K}=Object;function An(e){return!!(r.isRef(e)&&e.effect)}function Tn(e,t,n,o){const{state:s,actions:a,getters:i}=t,c=n.state.value[e];let f;function l(){!c&&(process.env.NODE_ENV==="production"||!o)&&(n.state.value[e]=s?s():{});const d=process.env.NODE_ENV!=="production"&&o?r.toRefs(r.ref(s?s():{}).value):r.toRefs(n.state.value[e]);return K(d,a,Object.keys(i||{}).reduce((u,p)=>(process.env.NODE_ENV!=="production"&&p in d&&console.warn(`[๐]: A getter cannot have the same name as another state property. Rename one of them. Found with "${p}" in store "${e}".`),u[p]=r.markRaw(r.computed(()=>{De(n);const h=n._s.get(e);return i[p].call(h,h)})),u),{}))}return f=_t(e,l,t,n,o,!0),f}function _t(e,t,n={},o,s,a){let i;const c=K({actions:{}},n);if(process.env.NODE_ENV!=="production"&&!o._e.active)throw new Error("Pinia destroyed");const f={deep:!0};process.env.NODE_ENV!=="production"&&!wn&&(f.onTrigger=E=>{l?h=E:l==!1&&!g._hotUpdating&&(Array.isArray(h)?h.push(E):console.error("๐ debuggerEvents should be an array. This is most likely an internal Pinia bug."))});let l,d,u=[],p=[],h;const m=o.state.value[e];!a&&!m&&(process.env.NODE_ENV==="production"||!s)&&(o.state.value[e]={});const b=r.ref({});let _;function S(E){let y;l=d=!1,process.env.NODE_ENV!=="production"&&(h=[]),typeof E=="function"?(E(o.state.value[e]),y={type:ne.patchFunction,storeId:e,events:h}):(Et(o.state.value[e],E),y={type:ne.patchObject,payload:E,storeId:e,events:h});const v=_=Symbol();r.nextTick().then(()=>{_===v&&(l=!0)}),d=!0,be(u,y,o.state.value[e])}const $=a?function(){const{state:E}=n,y=E?E():{};this.$patch(v=>{K(v,y)})}:process.env.NODE_ENV!=="production"?()=>{throw new Error(`๐: Store "${e}" is built using the setup syntax and does not implement $reset().`)}:Dn;function V(){i.stop(),u=[],p=[],o._s.delete(e)}const j=(E,y="")=>{if(Rn in E)return E[bt]=y,E;const v=function(){De(o);const C=Array.from(arguments),B=[],te=[];function le(M){B.push(M)}function xe(M){te.push(M)}be(p,{args:C,name:v[bt],store:g,after:le,onError:xe});let Z;try{Z=E.apply(this&&this.$id===e?this:g,C)}catch(M){throw be(te,M),M}return Z instanceof Promise?Z.then(M=>(be(B,M),M)).catch(M=>(be(te,M),Promise.reject(M))):(be(B,Z),Z)};return v[Rn]=!0,v[bt]=y,v},R=r.markRaw({actions:{},getters:{},state:[],hotState:b}),H={_p:o,$id:e,$onAction:In.bind(null,p),$patch:S,$reset:$,$subscribe(E,y={}){const v=In(u,E,y.detached,()=>C()),C=i.run(()=>r.watch(()=>o.state.value[e],B=>{(y.flush==="sync"?d:l)&&E({storeId:e,type:ne.direct,events:h},B)},K({},f,y)));return v},$dispose:V},g=r.reactive(process.env.NODE_ENV!=="production"||process.env.NODE_ENV!=="production"&&process.env.NODE_ENV!=="test"&&ue?K({_hmrPayload:R,_customProperties:r.markRaw(new Set)},H):H);o._s.set(e,g);const x=(o._a&&o._a.runWithContext||ys)(()=>o._e.run(()=>(i=r.effectScope()).run(()=>t({action:j}))));for(const E in x){const y=x[E];if(r.isRef(y)&&!An(y)||r.isReactive(y))process.env.NODE_ENV!=="production"&&s?qe(b.value,E,r.toRef(x,E)):a||(m&&vs(y)&&(r.isRef(y)?y.value=m[E]:Et(y,m[E])),o.state.value[e][E]=y),process.env.NODE_ENV!=="production"&&R.state.push(E);else if(typeof y=="function"){const v=process.env.NODE_ENV!=="production"&&s?y:j(y,E);x[E]=v,process.env.NODE_ENV!=="production"&&(R.actions[E]=y),c.actions[E]=y}else process.env.NODE_ENV!=="production"&&An(y)&&(R.getters[E]=a?n.getters[E]:y,ue&&(x._getters||(x._getters=r.markRaw([]))).push(E))}if(K(g,x),K(r.toRaw(g),x),Object.defineProperty(g,"$state",{get:()=>process.env.NODE_ENV!=="production"&&s?b.value:o.state.value[e],set:E=>{if(process.env.NODE_ENV!=="production"&&s)throw new Error("cannot set hotState");S(y=>{K(y,E)})}}),process.env.NODE_ENV!=="production"&&(g._hotUpdate=r.markRaw(E=>{g._hotUpdating=!0,E._hmrPayload.state.forEach(y=>{if(y in g.$state){const v=E.$state[y],C=g.$state[y];typeof v=="object"&&me(v)&&me(C)?Vn(v,C):E.$state[y]=C}qe(g,y,r.toRef(E.$state,y))}),Object.keys(g.$state).forEach(y=>{y in E.$state||mt(g,y)}),l=!1,d=!1,o.state.value[e]=r.toRef(E._hmrPayload,"hotState"),d=!0,r.nextTick().then(()=>{l=!0});for(const y in E._hmrPayload.actions){const v=E[y];qe(g,y,j(v,y))}for(const y in E._hmrPayload.getters){const v=E._hmrPayload.getters[y],C=a?r.computed(()=>(De(o),v.call(g,g))):v;qe(g,y,C)}Object.keys(g._hmrPayload.getters).forEach(y=>{y in E._hmrPayload.getters||mt(g,y)}),Object.keys(g._hmrPayload.actions).forEach(y=>{y in E._hmrPayload.actions||mt(g,y)}),g._hmrPayload=E._hmrPayload,g._getters=E._getters,g._hotUpdating=!1})),process.env.NODE_ENV!=="production"&&process.env.NODE_ENV!=="test"&&ue){const E={writable:!0,configurable:!0,enumerable:!1};["_p","_hmrPayload","_getters","_customProperties"].forEach(y=>{Object.defineProperty(g,y,K({value:g[y]},E))})}return o._p.forEach(E=>{if(process.env.NODE_ENV!=="production"&&process.env.NODE_ENV!=="test"&&ue){const y=i.run(()=>E({store:g,app:o._a,pinia:o,options:c}));Object.keys(y||{}).forEach(v=>g._customProperties.add(v)),K(g,y)}else K(g,i.run(()=>E({store:g,app:o._a,pinia:o,options:c})))}),process.env.NODE_ENV!=="production"&&g.$state&&typeof g.$state=="object"&&typeof g.$state.constructor=="function"&&!g.$state.constructor.toString().includes("[native code]")&&console.warn(`[๐]: The "state" must be a plain object. It cannot be
|
|
8
8
|
state: () => new MyClass()
|
|
9
|
-
Found in store "${g.$id}".`),m&&a&&n.hydrate&&n.hydrate(g.$state,m),l=!0,d=!0,g}/*! #__NO_SIDE_EFFECTS__ */function
|
|
9
|
+
Found in store "${g.$id}".`),m&&a&&n.hydrate&&n.hydrate(g.$state,m),l=!0,d=!0,g}/*! #__NO_SIDE_EFFECTS__ */function bs(e,t,n){let o,s;const a=typeof t=="function";o=e,s=a?n:t;function i(c,f){const l=r.hasInjectionContext();if(c=(process.env.NODE_ENV==="test"&&Ve&&Ve._testing?null:c)||(l?r.inject(bn,null):null),c&&De(c),process.env.NODE_ENV!=="production"&&!Ve)throw new Error(`[๐]: "getActivePinia()" was called but there was no active Pinia. Are you trying to use a store before calling "app.use(pinia)"?
|
|
10
10
|
See https://pinia.vuejs.org/core-concepts/outside-component-usage.html for help.
|
|
11
|
-
This will fail in production.`);c=Ve,c._s.has(o)||(a?
|
|
11
|
+
This will fail in production.`);c=Ve,c._s.has(o)||(a?_t(o,t,s,c):Tn(o,s,c),process.env.NODE_ENV!=="production"&&(i._pinia=c));const d=c._s.get(o);if(process.env.NODE_ENV!=="production"&&f){const u="__hot:"+o,p=a?_t(u,t,s,c,!0):Tn(u,K({},s),c,!0);f._hotUpdate(p),delete c.state.value[u],c._s.delete(u)}if(process.env.NODE_ENV!=="production"&&ue){const u=r.getCurrentInstance();if(u&&u.proxy&&!f){const p=u.proxy,h="_pStores"in p?p._pStores:p._pStores={};h[o]=d}}return d}return i.$id=o,i}const Es=bs("data",()=>{const e=r.ref([]),t=r.ref({});return{records:e,record:t}});function jn(e){e||(e=r.inject("$registry"));let t;try{t=Es()}catch{throw new Error("Please enable the Stonecrop plugin before using the Stonecrop composable")}const n=r.ref(new zr(e,t)),o=r.ref(!1);return r.onBeforeMount(async()=>{var s,a,i;if(!e)return;const c=e.router.currentRoute.value,f=(s=c.params.records)==null?void 0:s.toString().toLowerCase(),l=(a=c.params.record)==null?void 0:a.toString().toLowerCase();if(!f&&!l)return;const d=await((i=e.getMeta)==null?void 0:i.call(e,f));d&&(e.addDoctype(d),n.value.setup(d),f&&(l?await n.value.getRecord(d,l):await n.value.getRecords(d)),n.value.runAction(d,"LOAD",l?[l]:void 0)),o.value=!0}),{stonecrop:n,isReady:o}}Y(class ut{constructor(t,n){if(Y(this,"name"),Y(this,"router"),Y(this,"registry"),Y(this,"getMeta"),ut._root)return ut._root;ut._root=this,this.name="Registry",this.router=t,this.registry={},this.getMeta=n}addDoctype(t){t.doctype in Object.keys(this.registry)||(this.registry[t.slug]=t),!this.router.hasRoute(t.doctype)&&t.component&&this.router.addRoute({path:`/${t.slug}`,name:t.slug,component:t.component})}},"_root");/*!
|
|
12
12
|
* vue-router v4.5.0
|
|
13
13
|
* (c) 2024 Eduardo San Martin Morote
|
|
14
14
|
* @license MIT
|
|
15
|
-
*/const re=typeof document<"u";function
|
|
15
|
+
*/const re=typeof document<"u";function Bn(e){return typeof e=="object"||"displayName"in e||"props"in e||"__vccOpts"in e}function _s(e){return e.__esModule||e[Symbol.toStringTag]==="Module"||e.default&&Bn(e.default)}const A=Object.assign;function kt(e,t){const n={};for(const o in t){const s=t[o];n[o]=G(s)?s.map(e):e(s)}return n}const Ie=()=>{},G=Array.isArray;function P(e){const t=Array.from(arguments).slice(1);console.warn.apply(console,["[Vue Router warn]: "+e].concat(t))}const Mn=/#/g,ks=/&/g,Ns=/\//g,$s=/=/g,Ss=/\?/g,Ln=/\+/g,Os=/%5B/g,xs=/%5D/g,Wn=/%5E/g,Cs=/%60/g,Un=/%7B/g,Ps=/%7C/g,Hn=/%7D/g,Vs=/%20/g;function Nt(e){return encodeURI(""+e).replace(Ps,"|").replace(Os,"[").replace(xs,"]")}function Ds(e){return Nt(e).replace(Un,"{").replace(Hn,"}").replace(Wn,"^")}function $t(e){return Nt(e).replace(Ln,"%2B").replace(Vs,"+").replace(Mn,"%23").replace(ks,"%26").replace(Cs,"`").replace(Un,"{").replace(Hn,"}").replace(Wn,"^")}function Is(e){return $t(e).replace($s,"%3D")}function Rs(e){return Nt(e).replace(Mn,"%23").replace(Ss,"%3F")}function As(e){return e==null?"":Rs(e).replace(Ns,"%2F")}function Ee(e){try{return decodeURIComponent(""+e)}catch{process.env.NODE_ENV!=="production"&&P(`Error decoding "${e}". Using original value`)}return""+e}const Ts=/\/$/,js=e=>e.replace(Ts,"");function St(e,t,n="/"){let o,s={},a="",i="";const c=t.indexOf("#");let f=t.indexOf("?");return c<f&&c>=0&&(f=-1),f>-1&&(o=t.slice(0,f),a=t.slice(f+1,c>-1?c:t.length),s=e(a)),c>-1&&(o=o||t.slice(0,c),i=t.slice(c,t.length)),o=Ls(o??t,n),{fullPath:o+(a&&"?")+a+i,path:o,query:s,hash:Ee(i)}}function Bs(e,t){const n=t.query?e(t.query):"";return t.path+(n&&"?")+n+(t.hash||"")}function Fn(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||"/"}function zn(e,t,n){const o=t.matched.length-1,s=n.matched.length-1;return o>-1&&o===s&&fe(t.matched[o],n.matched[s])&&qn(t.params,n.params)&&e(t.query)===e(n.query)&&t.hash===n.hash}function fe(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function qn(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(!Ms(e[n],t[n]))return!1;return!0}function Ms(e,t){return G(e)?Gn(e,t):G(t)?Gn(t,e):e===t}function Gn(e,t){return G(t)?e.length===t.length&&e.every((n,o)=>n===t[o]):e.length===1&&e[0]===t}function Ls(e,t){if(e.startsWith("/"))return e;if(process.env.NODE_ENV!=="production"&&!t.startsWith("/"))return P(`Cannot resolve a relative location without an absolute path. Trying to resolve "${e}" from "${t}". It should look like "/${t}".`),e;if(!e)return t;const n=t.split("/"),o=e.split("/"),s=o[o.length-1];(s===".."||s===".")&&o.push("");let a=n.length-1,i,c;for(i=0;i<o.length;i++)if(c=o[i],c!==".")if(c==="..")a>1&&a--;else break;return n.slice(0,a).join("/")+"/"+o.slice(i).join("/")}const pe={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0};var Re;(function(e){e.pop="pop",e.push="push"})(Re||(Re={}));var Ae;(function(e){e.back="back",e.forward="forward",e.unknown=""})(Ae||(Ae={}));function Ws(e){if(!e)if(re){const t=document.querySelector("base");e=t&&t.getAttribute("href")||"/",e=e.replace(/^\w+:\/\/[^\/]+/,"")}else e="/";return e[0]!=="/"&&e[0]!=="#"&&(e="/"+e),js(e)}const Us=/^[^#]+#/;function Hs(e,t){return e.replace(Us,"#")+t}function Fs(e,t){const n=document.documentElement.getBoundingClientRect(),o=e.getBoundingClientRect();return{behavior:t.behavior,left:o.left-n.left-(t.left||0),top:o.top-n.top-(t.top||0)}}const Xe=()=>({left:window.scrollX,top:window.scrollY});function zs(e){let t;if("el"in e){const n=e.el,o=typeof n=="string"&&n.startsWith("#");if(process.env.NODE_ENV!=="production"&&typeof e.el=="string"&&(!o||!document.getElementById(e.el.slice(1))))try{const a=document.querySelector(e.el);if(o&&a){P(`The selector "${e.el}" should be passed as "el: document.querySelector('${e.el}')" because it starts with "#".`);return}}catch{P(`The selector "${e.el}" is invalid. If you are using an id selector, make sure to escape it. You can find more information about escaping characters in selectors at https://mathiasbynens.be/notes/css-escapes or use CSS.escape (https://developer.mozilla.org/en-US/docs/Web/API/CSS/escape).`);return}const s=typeof n=="string"?o?document.getElementById(n.slice(1)):document.querySelector(n):n;if(!s){process.env.NODE_ENV!=="production"&&P(`Couldn't find element using selector "${e.el}" returned by scrollBehavior.`);return}t=Fs(s,e)}else t=e;"scrollBehavior"in document.documentElement.style?window.scrollTo(t):window.scrollTo(t.left!=null?t.left:window.scrollX,t.top!=null?t.top:window.scrollY)}function Jn(e,t){return(history.state?history.state.position-t:-1)+e}const Ot=new Map;function qs(e,t){Ot.set(e,t)}function Gs(e){const t=Ot.get(e);return Ot.delete(e),t}let Js=()=>location.protocol+"//"+location.host;function Yn(e,t){const{pathname:n,search:o,hash:s}=t,a=e.indexOf("#");if(a>-1){let i=s.includes(e.slice(a))?e.slice(a).length:1,c=s.slice(i);return c[0]!=="/"&&(c="/"+c),Fn(c,"")}return Fn(n,e)+o+s}function Ys(e,t,n,o){let s=[],a=[],i=null;const c=({state:p})=>{const h=Yn(e,location),m=n.value,b=t.value;let _=0;if(p){if(n.value=h,t.value=p,i&&i===m){i=null;return}_=b?p.position-b.position:0}else o(h);s.forEach(S=>{S(n.value,m,{delta:_,type:Re.pop,direction:_?_>0?Ae.forward:Ae.back:Ae.unknown})})};function f(){i=n.value}function l(p){s.push(p);const h=()=>{const m=s.indexOf(p);m>-1&&s.splice(m,1)};return a.push(h),h}function d(){const{history:p}=window;p.state&&p.replaceState(A({},p.state,{scroll:Xe()}),"")}function u(){for(const p of a)p();a=[],window.removeEventListener("popstate",c),window.removeEventListener("beforeunload",d)}return window.addEventListener("popstate",c),window.addEventListener("beforeunload",d,{passive:!0}),{pauseListeners:f,listen:l,destroy:u}}function Kn(e,t,n,o=!1,s=!1){return{back:e,current:t,forward:n,replaced:o,position:window.history.length,scroll:s?Xe():null}}function Ks(e){const{history:t,location:n}=window,o={value:Yn(e,n)},s={value:t.state};s.value||a(o.value,{back:null,current:o.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function a(f,l,d){const u=e.indexOf("#"),p=u>-1?(n.host&&document.querySelector("base")?e:e.slice(u))+f:Js()+e+f;try{t[d?"replaceState":"pushState"](l,"",p),s.value=l}catch(h){process.env.NODE_ENV!=="production"?P("Error with push/replace State",h):console.error(h),n[d?"replace":"assign"](p)}}function i(f,l){const d=A({},t.state,Kn(s.value.back,f,s.value.forward,!0),l,{position:s.value.position});a(f,d,!0),o.value=f}function c(f,l){const d=A({},s.value,t.state,{forward:f,scroll:Xe()});process.env.NODE_ENV!=="production"&&!t.state&&P(`history.state seems to have been manually replaced without preserving the necessary values. Make sure to preserve existing history state if you are manually calling history.replaceState:
|
|
16
16
|
|
|
17
17
|
history.replaceState(history.state, '', url)
|
|
18
18
|
|
|
19
|
-
You can find more information at https://router.vuejs.org/guide/migration/#Usage-of-history-state`),a(d.current,d,!0);const u=
|
|
19
|
+
You can find more information at https://router.vuejs.org/guide/migration/#Usage-of-history-state`),a(d.current,d,!0);const u=A({},Kn(o.value,f,null),{position:d.position+1},l);a(f,u,!1),o.value=f}return{location:o,state:s,push:c,replace:i}}function Qs(e){e=Ws(e);const t=Ks(e),n=Ys(e,t.state,t.location,t.replace);function o(a,i=!0){i||n.pauseListeners(),history.go(a)}const s=A({location:"",base:e,go:o,createHref:Hs.bind(null,e)},t,n);return Object.defineProperty(s,"location",{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(s,"state",{enumerable:!0,get:()=>t.state.value}),s}function Ze(e){return typeof e=="string"||e&&typeof e=="object"}function Qn(e){return typeof e=="string"||typeof e=="symbol"}const xt=Symbol(process.env.NODE_ENV!=="production"?"navigation failure":"");var Xn;(function(e){e[e.aborted=4]="aborted",e[e.cancelled=8]="cancelled",e[e.duplicated=16]="duplicated"})(Xn||(Xn={}));const Xs={1({location:e,currentLocation:t}){return`No match for
|
|
20
20
|
${JSON.stringify(e)}${t?`
|
|
21
21
|
while being at
|
|
22
|
-
`+JSON.stringify(t):""}`},2({from:e,to:t}){return`Redirected from "${e.fullPath}" to "${
|
|
23
|
-
See more at https://router.vuejs.org/guide/migration/#Removed-star-or-catch-all-routes.`);if($=
|
|
22
|
+
`+JSON.stringify(t):""}`},2({from:e,to:t}){return`Redirected from "${e.fullPath}" to "${ea(t)}" via a navigation guard.`},4({from:e,to:t}){return`Navigation aborted from "${e.fullPath}" to "${t.fullPath}" via a navigation guard.`},8({from:e,to:t}){return`Navigation cancelled from "${e.fullPath}" to "${t.fullPath}" with a new navigation.`},16({from:e,to:t}){return`Avoided redundant navigation to current location: "${e.fullPath}".`}};function _e(e,t){return process.env.NODE_ENV!=="production"?A(new Error(Xs[e](t)),{type:e,[xt]:!0},t):A(new Error,{type:e,[xt]:!0},t)}function se(e,t){return e instanceof Error&&xt in e&&(t==null||!!(e.type&t))}const Zs=["params","query","hash"];function ea(e){if(typeof e=="string")return e;if(e.path!=null)return e.path;const t={};for(const n of Zs)n in e&&(t[n]=e[n]);return JSON.stringify(t,null,2)}const Zn="[^/]+?",ta={sensitive:!1,strict:!1,start:!0,end:!0},na=/[.+*?^${}()[\]/\\]/g;function oa(e,t){const n=A({},ta,t),o=[];let s=n.start?"^":"";const a=[];for(const l of e){const d=l.length?[]:[90];n.strict&&!l.length&&(s+="/");for(let u=0;u<l.length;u++){const p=l[u];let h=40+(n.sensitive?.25:0);if(p.type===0)u||(s+="/"),s+=p.value.replace(na,"\\$&"),h+=40;else if(p.type===1){const{value:m,repeatable:b,optional:_,regexp:S}=p;a.push({name:m,repeatable:b,optional:_});const $=S||Zn;if($!==Zn){h+=10;try{new RegExp(`(${$})`)}catch(j){throw new Error(`Invalid custom RegExp for param "${m}" (${$}): `+j.message)}}let V=b?`((?:${$})(?:/(?:${$}))*)`:`(${$})`;u||(V=_&&l.length<2?`(?:/${V})`:"/"+V),_&&(V+="?"),s+=V,h+=20,_&&(h+=-8),b&&(h+=-20),$===".*"&&(h+=-50)}d.push(h)}o.push(d)}if(n.strict&&n.end){const l=o.length-1;o[l][o[l].length-1]+=.7000000000000001}n.strict||(s+="/?"),n.end?s+="$":n.strict&&!s.endsWith("/")&&(s+="(?:/|$)");const i=new RegExp(s,n.sensitive?"":"i");function c(l){const d=l.match(i),u={};if(!d)return null;for(let p=1;p<d.length;p++){const h=d[p]||"",m=a[p-1];u[m.name]=h&&m.repeatable?h.split("/"):h}return u}function f(l){let d="",u=!1;for(const p of e){(!u||!d.endsWith("/"))&&(d+="/"),u=!1;for(const h of p)if(h.type===0)d+=h.value;else if(h.type===1){const{value:m,repeatable:b,optional:_}=h,S=m in l?l[m]:"";if(G(S)&&!b)throw new Error(`Provided param "${m}" is an array but it is not repeatable (* or + modifiers)`);const $=G(S)?S.join("/"):S;if(!$)if(_)p.length<2&&(d.endsWith("/")?d=d.slice(0,-1):u=!0);else throw new Error(`Missing required param "${m}"`);d+=$}}return d||"/"}return{re:i,score:o,keys:a,parse:c,stringify:f}}function ra(e,t){let n=0;for(;n<e.length&&n<t.length;){const o=t[n]-e[n];if(o)return o;n++}return e.length<t.length?e.length===1&&e[0]===80?-1:1:e.length>t.length?t.length===1&&t[0]===80?1:-1:0}function eo(e,t){let n=0;const o=e.score,s=t.score;for(;n<o.length&&n<s.length;){const a=ra(o[n],s[n]);if(a)return a;n++}if(Math.abs(s.length-o.length)===1){if(to(o))return 1;if(to(s))return-1}return s.length-o.length}function to(e){const t=e[e.length-1];return e.length>0&&t[t.length-1]<0}const sa={type:0,value:""},aa=/[a-zA-Z0-9_]/;function ia(e){if(!e)return[[]];if(e==="/")return[[sa]];if(!e.startsWith("/"))throw new Error(process.env.NODE_ENV!=="production"?`Route paths should start with a "/": "${e}" should be "/${e}".`:`Invalid path "${e}"`);function t(h){throw new Error(`ERR (${n})/"${l}": ${h}`)}let n=0,o=n;const s=[];let a;function i(){a&&s.push(a),a=[]}let c=0,f,l="",d="";function u(){l&&(n===0?a.push({type:0,value:l}):n===1||n===2||n===3?(a.length>1&&(f==="*"||f==="+")&&t(`A repeatable param (${l}) must be alone in its segment. eg: '/:ids+.`),a.push({type:1,value:l,regexp:d,repeatable:f==="*"||f==="+",optional:f==="*"||f==="?"})):t("Invalid state to consume buffer"),l="")}function p(){l+=f}for(;c<e.length;){if(f=e[c++],f==="\\"&&n!==2){o=n,n=4;continue}switch(n){case 0:f==="/"?(l&&u(),i()):f===":"?(u(),n=1):p();break;case 4:p(),n=o;break;case 1:f==="("?n=2:aa.test(f)?p():(u(),n=0,f!=="*"&&f!=="?"&&f!=="+"&&c--);break;case 2:f===")"?d[d.length-1]=="\\"?d=d.slice(0,-1)+f:n=3:d+=f;break;case 3:u(),n=0,f!=="*"&&f!=="?"&&f!=="+"&&c--,d="";break;default:t("Unknown state");break}}return n===2&&t(`Unfinished custom RegExp for param "${l}"`),u(),i(),s}function ca(e,t,n){const o=oa(ia(e.path),n);if(process.env.NODE_ENV!=="production"){const a=new Set;for(const i of o.keys)a.has(i.name)&&P(`Found duplicated params with name "${i.name}" for path "${e.path}". Only the last one will be available on "$route.params".`),a.add(i.name)}const s=A(o,{record:e,parent:t,children:[],alias:[]});return t&&!s.record.aliasOf==!t.record.aliasOf&&t.children.push(s),s}function la(e,t){const n=[],o=new Map;t=so({strict:!1,end:!0,sensitive:!1},t);function s(u){return o.get(u)}function a(u,p,h){const m=!h,b=oo(u);process.env.NODE_ENV!=="production"&&pa(b,p),b.aliasOf=h&&h.record;const _=so(t,u),S=[b];if("alias"in u){const j=typeof u.alias=="string"?[u.alias]:u.alias;for(const R of j)S.push(oo(A({},b,{components:h?h.record.components:b.components,path:R,aliasOf:h?h.record:b})))}let $,V;for(const j of S){const{path:R}=j;if(p&&R[0]!=="/"){const H=p.record.path,g=H[H.length-1]==="/"?"":"/";j.path=p.record.path+(R&&g+R)}if(process.env.NODE_ENV!=="production"&&j.path==="*")throw new Error(`Catch all routes ("*") must now be defined using a param with a custom regexp.
|
|
23
|
+
See more at https://router.vuejs.org/guide/migration/#Removed-star-or-catch-all-routes.`);if($=ca(j,p,_),process.env.NODE_ENV!=="production"&&p&&R[0]==="/"&&ma($,p),h?(h.alias.push($),process.env.NODE_ENV!=="production"&&fa(h,$)):(V=V||$,V!==$&&V.alias.push($),m&&u.name&&!ro($)&&(process.env.NODE_ENV!=="production"&&ha(u,p),i(u.name))),ao($)&&f($),b.children){const H=b.children;for(let g=0;g<H.length;g++)a(H[g],$,h&&h.children[g])}h=h||$}return V?()=>{i(V)}:Ie}function i(u){if(Qn(u)){const p=o.get(u);p&&(o.delete(u),n.splice(n.indexOf(p),1),p.children.forEach(i),p.alias.forEach(i))}else{const p=n.indexOf(u);p>-1&&(n.splice(p,1),u.record.name&&o.delete(u.record.name),u.children.forEach(i),u.alias.forEach(i))}}function c(){return n}function f(u){const p=ga(u,n);n.splice(p,0,u),u.record.name&&!ro(u)&&o.set(u.record.name,u)}function l(u,p){let h,m={},b,_;if("name"in u&&u.name){if(h=o.get(u.name),!h)throw _e(1,{location:u});if(process.env.NODE_ENV!=="production"){const V=Object.keys(u.params||{}).filter(j=>!h.keys.find(R=>R.name===j));V.length&&P(`Discarded invalid param(s) "${V.join('", "')}" when navigating. See https://github.com/vuejs/router/blob/main/packages/router/CHANGELOG.md#414-2022-08-22 for more details.`)}_=h.record.name,m=A(no(p.params,h.keys.filter(V=>!V.optional).concat(h.parent?h.parent.keys.filter(V=>V.optional):[]).map(V=>V.name)),u.params&&no(u.params,h.keys.map(V=>V.name))),b=h.stringify(m)}else if(u.path!=null)b=u.path,process.env.NODE_ENV!=="production"&&!b.startsWith("/")&&P(`The Matcher cannot resolve relative paths but received "${b}". Unless you directly called \`matcher.resolve("${b}")\`, this is probably a bug in vue-router. Please open an issue at https://github.com/vuejs/router/issues/new/choose.`),h=n.find(V=>V.re.test(b)),h&&(m=h.parse(b),_=h.record.name);else{if(h=p.name?o.get(p.name):n.find(V=>V.re.test(p.path)),!h)throw _e(1,{location:u,currentLocation:p});_=h.record.name,m=A({},p.params,u.params),b=h.stringify(m)}const S=[];let $=h;for(;$;)S.unshift($.record),$=$.parent;return{name:_,path:b,params:m,matched:S,meta:da(S)}}e.forEach(u=>a(u));function d(){n.length=0,o.clear()}return{addRoute:a,resolve:l,removeRoute:i,clearRoutes:d,getRoutes:c,getRecordMatcher:s}}function no(e,t){const n={};for(const o of t)o in e&&(n[o]=e[o]);return n}function oo(e){const t={path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:e.aliasOf,beforeEnter:e.beforeEnter,props:ua(e),children:e.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in e?e.components||null:e.component&&{default:e.component}};return Object.defineProperty(t,"mods",{value:{}}),t}function ua(e){const t={},n=e.props||!1;if("component"in e)t.default=n;else for(const o in e.components)t[o]=typeof n=="object"?n[o]:n;return t}function ro(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function da(e){return e.reduce((t,n)=>A(t,n.meta),{})}function so(e,t){const n={};for(const o in e)n[o]=o in t?t[o]:e[o];return n}function Ct(e,t){return e.name===t.name&&e.optional===t.optional&&e.repeatable===t.repeatable}function fa(e,t){for(const n of e.keys)if(!n.optional&&!t.keys.find(Ct.bind(null,n)))return P(`Alias "${t.record.path}" and the original record: "${e.record.path}" must have the exact same param named "${n.name}"`);for(const n of t.keys)if(!n.optional&&!e.keys.find(Ct.bind(null,n)))return P(`Alias "${t.record.path}" and the original record: "${e.record.path}" must have the exact same param named "${n.name}"`)}function pa(e,t){t&&t.record.name&&!e.name&&!e.path&&P(`The route named "${String(t.record.name)}" has a child without a name and an empty path. Using that name won't render the empty path child so you probably want to move the name to the child instead. If this is intentional, add a name to the child route to remove the warning.`)}function ha(e,t){for(let n=t;n;n=n.parent)if(n.record.name===e.name)throw new Error(`A route named "${String(e.name)}" has been added as a ${t===n?"child":"descendant"} of a route with the same name. Route names must be unique and a nested route cannot use the same name as an ancestor.`)}function ma(e,t){for(const n of t.keys)if(!e.keys.find(Ct.bind(null,n)))return P(`Absolute path "${e.record.path}" must have the exact same param named "${n.name}" as its parent "${t.record.path}".`)}function ga(e,t){let n=0,o=t.length;for(;n!==o;){const a=n+o>>1;eo(e,t[a])<0?o=a:n=a+1}const s=ya(e);return s&&(o=t.lastIndexOf(s,o-1),process.env.NODE_ENV!=="production"&&o<0&&P(`Finding ancestor route "${s.record.path}" failed for "${e.record.path}"`)),o}function ya(e){let t=e;for(;t=t.parent;)if(ao(t)&&eo(e,t)===0)return t}function ao({record:e}){return!!(e.name||e.components&&Object.keys(e.components).length||e.redirect)}function wa(e){const t={};if(e===""||e==="?")return t;const n=(e[0]==="?"?e.slice(1):e).split("&");for(let o=0;o<n.length;++o){const s=n[o].replace(Ln," "),a=s.indexOf("="),i=Ee(a<0?s:s.slice(0,a)),c=a<0?null:Ee(s.slice(a+1));if(i in t){let f=t[i];G(f)||(f=t[i]=[f]),f.push(c)}else t[i]=c}return t}function io(e){let t="";for(let n in e){const o=e[n];if(n=Is(n),o==null){o!==void 0&&(t+=(t.length?"&":"")+n);continue}(G(o)?o.map(s=>s&&$t(s)):[o&&$t(o)]).forEach(s=>{s!==void 0&&(t+=(t.length?"&":"")+n,s!=null&&(t+="="+s))})}return t}function va(e){const t={};for(const n in e){const o=e[n];o!==void 0&&(t[n]=G(o)?o.map(s=>s==null?null:""+s):o==null?o:""+o)}return t}const ba=Symbol(process.env.NODE_ENV!=="production"?"router view location matched":""),co=Symbol(process.env.NODE_ENV!=="production"?"router view depth":""),Pt=Symbol(process.env.NODE_ENV!=="production"?"router":""),lo=Symbol(process.env.NODE_ENV!=="production"?"route location":""),Vt=Symbol(process.env.NODE_ENV!=="production"?"router view location":"");function Te(){let e=[];function t(o){return e.push(o),()=>{const s=e.indexOf(o);s>-1&&e.splice(s,1)}}function n(){e=[]}return{add:t,list:()=>e.slice(),reset:n}}function he(e,t,n,o,s,a=i=>i()){const i=o&&(o.enterCallbacks[s]=o.enterCallbacks[s]||[]);return()=>new Promise((c,f)=>{const l=p=>{p===!1?f(_e(4,{from:n,to:t})):p instanceof Error?f(p):Ze(p)?f(_e(2,{from:t,to:p})):(i&&o.enterCallbacks[s]===i&&typeof p=="function"&&i.push(p),c())},d=a(()=>e.call(o&&o.instances[s],t,n,process.env.NODE_ENV!=="production"?Ea(l,t,n):l));let u=Promise.resolve(d);if(e.length<3&&(u=u.then(l)),process.env.NODE_ENV!=="production"&&e.length>2){const p=`The "next" callback was never called inside of ${e.name?'"'+e.name+'"':""}:
|
|
24
24
|
${e.toString()}
|
|
25
|
-
. If you are returning a value instead of calling "next", make sure to remove the "next" parameter from your function.`;if(typeof d=="object"&&"then"in d)u=u.then(h=>l._called?h:(P(
|
|
25
|
+
. If you are returning a value instead of calling "next", make sure to remove the "next" parameter from your function.`;if(typeof d=="object"&&"then"in d)u=u.then(h=>l._called?h:(P(p),Promise.reject(new Error("Invalid navigation guard"))));else if(d!==void 0&&!l._called){P(p),f(new Error("Invalid navigation guard"));return}}u.catch(p=>f(p))})}function Ea(e,t,n){let o=0;return function(){o++===1&&P(`The "next" callback was called more than once in one navigation guard when going from "${n.fullPath}" to "${t.fullPath}". It should be called exactly one time in each navigation guard. This will fail in production.`),e._called=!0,o===1&&e.apply(null,arguments)}}function Dt(e,t,n,o,s=a=>a()){const a=[];for(const i of e){process.env.NODE_ENV!=="production"&&!i.components&&!i.children.length&&P(`Record with path "${i.path}" is either missing a "component(s)" or "children" property.`);for(const c in i.components){let f=i.components[c];if(process.env.NODE_ENV!=="production"){if(!f||typeof f!="object"&&typeof f!="function")throw P(`Component "${c}" in record with path "${i.path}" is not a valid component. Received "${String(f)}".`),new Error("Invalid route component");if("then"in f){P(`Component "${c}" in record with path "${i.path}" is a Promise instead of a function that returns a Promise. Did you write "import('./MyPage.vue')" instead of "() => import('./MyPage.vue')" ? This will break in production if not fixed.`);const l=f;f=()=>l}else f.__asyncLoader&&!f.__warnedDefineAsync&&(f.__warnedDefineAsync=!0,P(`Component "${c}" in record with path "${i.path}" is defined using "defineAsyncComponent()". Write "() => import('./MyPage.vue')" instead of "defineAsyncComponent(() => import('./MyPage.vue'))".`))}if(!(t!=="beforeRouteEnter"&&!i.instances[c]))if(Bn(f)){const l=(f.__vccOpts||f)[t];l&&a.push(he(l,n,o,i,c,s))}else{let l=f();process.env.NODE_ENV!=="production"&&!("catch"in l)&&(P(`Component "${c}" in record with path "${i.path}" is a function that does not return a Promise. If you were passing a functional component, make sure to add a "displayName" to the component. This will break in production if not fixed.`),l=Promise.resolve(l)),a.push(()=>l.then(d=>{if(!d)throw new Error(`Couldn't resolve component "${c}" at "${i.path}"`);const u=_s(d)?d.default:d;i.mods[c]=d,i.components[c]=u;const p=(u.__vccOpts||u)[t];return p&&he(p,n,o,i,c,s)()}))}}}return a}function uo(e){const t=r.inject(Pt),n=r.inject(lo);let o=!1,s=null;const a=r.computed(()=>{const d=r.unref(e.to);return process.env.NODE_ENV!=="production"&&(!o||d!==s)&&(Ze(d)||(o?P(`Invalid value for prop "to" in useLink()
|
|
26
26
|
- to:`,d,`
|
|
27
27
|
- previous to:`,s,`
|
|
28
28
|
- props:`,e):P(`Invalid value for prop "to" in useLink()
|
|
29
29
|
- to:`,d,`
|
|
30
|
-
- props:`,e)),s=d,o=!0),t.resolve(d)}),i=r.computed(()=>{const{matched:d}=a.value,{length:u}=d,
|
|
30
|
+
- props:`,e)),s=d,o=!0),t.resolve(d)}),i=r.computed(()=>{const{matched:d}=a.value,{length:u}=d,p=d[u-1],h=n.matched;if(!p||!h.length)return-1;const m=h.findIndex(fe.bind(null,p));if(m>-1)return m;const b=fo(d[u-2]);return u>1&&fo(p)===b&&h[h.length-1].path!==b?h.findIndex(fe.bind(null,d[u-2])):m}),c=r.computed(()=>i.value>-1&&Sa(n.params,a.value.params)),f=r.computed(()=>i.value>-1&&i.value===n.matched.length-1&&qn(n.params,a.value.params));function l(d={}){if($a(d)){const u=t[r.unref(e.replace)?"replace":"push"](r.unref(e.to)).catch(Ie);return e.viewTransition&&typeof document<"u"&&"startViewTransition"in document&&document.startViewTransition(()=>u),u}return Promise.resolve()}if(process.env.NODE_ENV!=="production"&&re){const d=r.getCurrentInstance();if(d){const u={route:a.value,isActive:c.value,isExactActive:f.value,error:null};d.__vrl_devtools=d.__vrl_devtools||[],d.__vrl_devtools.push(u),r.watchEffect(()=>{u.route=a.value,u.isActive=c.value,u.isExactActive=f.value,u.error=Ze(r.unref(e.to))?null:'Invalid "to" value'},{flush:"post"})}}return{route:a,href:r.computed(()=>a.value.href),isActive:c,isExactActive:f,navigate:l}}function _a(e){return e.length===1?e[0]:e}const ka=r.defineComponent({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"}},useLink:uo,setup(e,{slots:t}){const n=r.reactive(uo(e)),{options:o}=r.inject(Pt),s=r.computed(()=>({[po(e.activeClass,o.linkActiveClass,"router-link-active")]:n.isActive,[po(e.exactActiveClass,o.linkExactActiveClass,"router-link-exact-active")]:n.isExactActive}));return()=>{const a=t.default&&_a(t.default(n));return e.custom?a:r.h("a",{"aria-current":n.isExactActive?e.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:s.value},a)}}}),Na=ka;function $a(e){if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&!(e.button!==void 0&&e.button!==0)){if(e.currentTarget&&e.currentTarget.getAttribute){const t=e.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(t))return}return e.preventDefault&&e.preventDefault(),!0}}function Sa(e,t){for(const n in t){const o=t[n],s=e[n];if(typeof o=="string"){if(o!==s)return!1}else if(!G(s)||s.length!==o.length||o.some((a,i)=>a!==s[i]))return!1}return!0}function fo(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}const po=(e,t,n)=>e??t??n,Oa=r.defineComponent({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:n}){process.env.NODE_ENV!=="production"&&Ca();const o=r.inject(Vt),s=r.computed(()=>e.route||o.value),a=r.inject(co,0),i=r.computed(()=>{let l=r.unref(a);const{matched:d}=s.value;let u;for(;(u=d[l])&&!u.components;)l++;return l}),c=r.computed(()=>s.value.matched[i.value]);r.provide(co,r.computed(()=>i.value+1)),r.provide(ba,c),r.provide(Vt,s);const f=r.ref();return r.watch(()=>[f.value,c.value,e.name],([l,d,u],[p,h,m])=>{d&&(d.instances[u]=l,h&&h!==d&&l&&l===p&&(d.leaveGuards.size||(d.leaveGuards=h.leaveGuards),d.updateGuards.size||(d.updateGuards=h.updateGuards))),l&&d&&(!h||!fe(d,h)||!p)&&(d.enterCallbacks[u]||[]).forEach(b=>b(l))},{flush:"post"}),()=>{const l=s.value,d=e.name,u=c.value,p=u&&u.components[d];if(!p)return ho(n.default,{Component:p,route:l});const h=u.props[d],m=h?h===!0?l.params:typeof h=="function"?h(l):h:null,b=r.h(p,A({},m,t,{onVnodeUnmounted:_=>{_.component.isUnmounted&&(u.instances[d]=null)},ref:f}));if(process.env.NODE_ENV!=="production"&&re&&b.ref){const _={depth:i.value,name:u.name,path:u.path,meta:u.meta};(G(b.ref)?b.ref.map(S=>S.i):[b.ref.i]).forEach(S=>{S.__vrv_devtools=_})}return ho(n.default,{Component:b,route:l})||b}}});function ho(e,t){if(!e)return null;const n=e(t);return n.length===1?n[0]:n}const xa=Oa;function Ca(){const e=r.getCurrentInstance(),t=e.parent&&e.parent.type.name,n=e.parent&&e.parent.subTree&&e.parent.subTree.type;if(t&&(t==="KeepAlive"||t.includes("Transition"))&&typeof n=="object"&&n.name==="RouterView"){const o=t==="KeepAlive"?"keep-alive":"transition";P(`<router-view> can no longer be used directly inside <transition> or <keep-alive>.
|
|
31
31
|
Use slot props instead:
|
|
32
32
|
|
|
33
33
|
<router-view v-slot="{ Component }">
|
|
34
34
|
<${o}>
|
|
35
35
|
<component :is="Component" />
|
|
36
36
|
</${o}>
|
|
37
|
-
</router-view>`)}}function je(e,t){const n=
|
|
38
|
-
- Location:`,w),S({});let k;if(w.path!=null)process.env.NODE_ENV!=="production"&&"params"in w&&!("name"in w)&&Object.keys(w.params).length&&P(`Path "${w.path}" was passed with params but they will be ignored. Use a named route alongside params instead.`),k=
|
|
37
|
+
</router-view>`)}}function je(e,t){const n=A({},e,{matched:e.matched.map(o=>La(o,["instances","children","aliasOf"]))});return{_custom:{type:null,readOnly:!0,display:e.fullPath,tooltip:t,value:n}}}function et(e){return{_custom:{display:e}}}let Pa=0;function Va(e,t,n){if(t.__hasDevtools)return;t.__hasDevtools=!0;const o=Pa++;yt({id:"org.vuejs.router"+(o?"."+o:""),label:"Vue Router",packageName:"vue-router",homepage:"https://router.vuejs.org",logo:"https://router.vuejs.org/logo.png",componentStateTypes:["Routing"],app:e},s=>{typeof s.now!="function"&&console.warn("[Vue Router]: You seem to be using an outdated version of Vue Devtools. Are you still using the Beta release instead of the stable one? You can find the links at https://devtools.vuejs.org/guide/installation.html."),s.on.inspectComponent((d,u)=>{d.instanceData&&d.instanceData.state.push({type:"Routing",key:"$route",editable:!1,value:je(t.currentRoute.value,"Current Route")})}),s.on.visitComponentTree(({treeNode:d,componentInstance:u})=>{if(u.__vrv_devtools){const p=u.__vrv_devtools;d.tags.push({label:(p.name?`${p.name.toString()}: `:"")+p.path,textColor:0,tooltip:"This component is rendered by <router-view>",backgroundColor:mo})}G(u.__vrl_devtools)&&(u.__devtoolsApi=s,u.__vrl_devtools.forEach(p=>{let h=p.route.path,m=wo,b="",_=0;p.error?(h=p.error,m=Ta,_=ja):p.isExactActive?(m=yo,b="This is exactly active"):p.isActive&&(m=go,b="This link is active"),d.tags.push({label:h,textColor:_,tooltip:b,backgroundColor:m})}))}),r.watch(t.currentRoute,()=>{f(),s.notifyComponentUpdate(),s.sendInspectorTree(c),s.sendInspectorState(c)});const a="router:navigations:"+o;s.addTimelineLayer({id:a,label:`Router${o?" "+o:""} Navigations`,color:4237508}),t.onError((d,u)=>{s.addTimelineEvent({layerId:a,event:{title:"Error during Navigation",subtitle:u.fullPath,logType:"error",time:s.now(),data:{error:d},groupId:u.meta.__navigationId}})});let i=0;t.beforeEach((d,u)=>{const p={guard:et("beforeEach"),from:je(u,"Current Location during this navigation"),to:je(d,"Target location")};Object.defineProperty(d.meta,"__navigationId",{value:i++}),s.addTimelineEvent({layerId:a,event:{time:s.now(),title:"Start of navigation",subtitle:d.fullPath,data:p,groupId:d.meta.__navigationId}})}),t.afterEach((d,u,p)=>{const h={guard:et("afterEach")};p?(h.failure={_custom:{type:Error,readOnly:!0,display:p?p.message:"",tooltip:"Navigation Failure",value:p}},h.status=et("โ")):h.status=et("โ
"),h.from=je(u,"Current Location during this navigation"),h.to=je(d,"Target location"),s.addTimelineEvent({layerId:a,event:{title:"End of navigation",subtitle:d.fullPath,time:s.now(),data:h,logType:p?"warning":"default",groupId:d.meta.__navigationId}})});const c="router-inspector:"+o;s.addInspector({id:c,label:"Routes"+(o?" "+o:""),icon:"book",treeFilterPlaceholder:"Search routes"});function f(){if(!l)return;const d=l;let u=n.getRoutes().filter(p=>!p.parent||!p.parent.record.components);u.forEach(Eo),d.filter&&(u=u.filter(p=>It(p,d.filter.toLowerCase()))),u.forEach(p=>bo(p,t.currentRoute.value)),d.rootNodes=u.map(vo)}let l;s.on.getInspectorTree(d=>{l=d,d.app===e&&d.inspectorId===c&&f()}),s.on.getInspectorState(d=>{if(d.app===e&&d.inspectorId===c){const u=n.getRoutes().find(p=>p.record.__vd_id===d.nodeId);u&&(d.state={options:Ia(u)})}}),s.sendInspectorTree(c),s.sendInspectorState(c)})}function Da(e){return e.optional?e.repeatable?"*":"?":e.repeatable?"+":""}function Ia(e){const{record:t}=e,n=[{editable:!1,key:"path",value:t.path}];return t.name!=null&&n.push({editable:!1,key:"name",value:t.name}),n.push({editable:!1,key:"regexp",value:e.re}),e.keys.length&&n.push({editable:!1,key:"keys",value:{_custom:{type:null,readOnly:!0,display:e.keys.map(o=>`${o.name}${Da(o)}`).join(" "),tooltip:"Param keys",value:e.keys}}}),t.redirect!=null&&n.push({editable:!1,key:"redirect",value:t.redirect}),e.alias.length&&n.push({editable:!1,key:"aliases",value:e.alias.map(o=>o.record.path)}),Object.keys(e.record.meta).length&&n.push({editable:!1,key:"meta",value:e.record.meta}),n.push({key:"score",editable:!1,value:{_custom:{type:null,readOnly:!0,display:e.score.map(o=>o.join(", ")).join(" | "),tooltip:"Score used to sort routes",value:e.score}}}),n}const mo=15485081,go=2450411,yo=8702998,Ra=2282478,wo=16486972,Aa=6710886,Ta=16704226,ja=12131356;function vo(e){const t=[],{record:n}=e;n.name!=null&&t.push({label:String(n.name),textColor:0,backgroundColor:Ra}),n.aliasOf&&t.push({label:"alias",textColor:0,backgroundColor:wo}),e.__vd_match&&t.push({label:"matches",textColor:0,backgroundColor:mo}),e.__vd_exactActive&&t.push({label:"exact",textColor:0,backgroundColor:yo}),e.__vd_active&&t.push({label:"active",textColor:0,backgroundColor:go}),n.redirect&&t.push({label:typeof n.redirect=="string"?`redirect: ${n.redirect}`:"redirects",textColor:16777215,backgroundColor:Aa});let o=n.__vd_id;return o==null&&(o=String(Ba++),n.__vd_id=o),{id:o,label:n.path,tags:t,children:e.children.map(vo)}}let Ba=0;const Ma=/^\/(.*)\/([a-z]*)$/;function bo(e,t){const n=t.matched.length&&fe(t.matched[t.matched.length-1],e.record);e.__vd_exactActive=e.__vd_active=n,n||(e.__vd_active=t.matched.some(o=>fe(o,e.record))),e.children.forEach(o=>bo(o,t))}function Eo(e){e.__vd_match=!1,e.children.forEach(Eo)}function It(e,t){const n=String(e.re).match(Ma);if(e.__vd_match=!1,!n||n.length<3)return!1;if(new RegExp(n[1].replace(/\$$/,""),n[2]).test(t))return e.children.forEach(a=>It(a,t)),e.record.path!=="/"||t==="/"?(e.__vd_match=e.re.test(t),!0):!1;const o=e.record.path.toLowerCase(),s=Ee(o);return!t.startsWith("/")&&(s.includes(t)||o.includes(t))||s.startsWith(t)||o.startsWith(t)||e.record.name&&String(e.record.name).includes(t)?!0:e.children.some(a=>It(a,t))}function La(e,t){const n={};for(const o in e)t.includes(o)||(n[o]=e[o]);return n}function Wa(e){const t=la(e.routes,e),n=e.parseQuery||wa,o=e.stringifyQuery||io,s=e.history;if(process.env.NODE_ENV!=="production"&&!s)throw new Error('Provide the "history" option when calling "createRouter()": https://router.vuejs.org/api/interfaces/RouterOptions.html#history');const a=Te(),i=Te(),c=Te(),f=r.shallowRef(pe);let l=pe;re&&e.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const d=kt.bind(null,w=>""+w),u=kt.bind(null,As),p=kt.bind(null,Ee);function h(w,N){let k,O;return Qn(w)?(k=t.getRecordMatcher(w),process.env.NODE_ENV!=="production"&&!k&&P(`Parent route "${String(w)}" not found when adding child route`,N),O=N):O=w,t.addRoute(O,k)}function m(w){const N=t.getRecordMatcher(w);N?t.removeRoute(N):process.env.NODE_ENV!=="production"&&P(`Cannot remove non-existent route "${String(w)}"`)}function b(){return t.getRoutes().map(w=>w.record)}function _(w){return!!t.getRecordMatcher(w)}function S(w,N){if(N=A({},N||f.value),typeof w=="string"){const D=St(n,w,N.path),L=t.resolve({path:D.path},N),we=s.createHref(D.fullPath);return process.env.NODE_ENV!=="production"&&(we.startsWith("//")?P(`Location "${w}" resolved to "${we}". A resolved location cannot start with multiple slashes.`):L.matched.length||P(`No match found for location with path "${w}"`)),A(D,L,{params:p(L.params),hash:Ee(D.hash),redirectedFrom:void 0,href:we})}if(process.env.NODE_ENV!=="production"&&!Ze(w))return P(`router.resolve() was passed an invalid location. This will fail in production.
|
|
38
|
+
- Location:`,w),S({});let k;if(w.path!=null)process.env.NODE_ENV!=="production"&&"params"in w&&!("name"in w)&&Object.keys(w.params).length&&P(`Path "${w.path}" was passed with params but they will be ignored. Use a named route alongside params instead.`),k=A({},w,{path:St(n,w.path,N.path).path});else{const D=A({},w.params);for(const L in D)D[L]==null&&delete D[L];k=A({},w,{params:u(D)}),N.params=u(N.params)}const O=t.resolve(k,N),T=w.hash||"";process.env.NODE_ENV!=="production"&&T&&!T.startsWith("#")&&P(`A \`hash\` should always start with the character "#". Replace "${T}" with "#${T}".`),O.params=d(p(O.params));const W=Bs(o,A({},w,{hash:Ds(T),path:O.path})),I=s.createHref(W);return process.env.NODE_ENV!=="production"&&(I.startsWith("//")?P(`Location "${w}" resolved to "${I}". A resolved location cannot start with multiple slashes.`):O.matched.length||P(`No match found for location with path "${w.path!=null?w.path:w}"`)),A({fullPath:W,hash:T,query:o===io?va(w.query):w.query||{}},O,{redirectedFrom:void 0,href:I})}function $(w){return typeof w=="string"?St(n,w,f.value.path):A({},w)}function V(w,N){if(l!==w)return _e(8,{from:N,to:w})}function j(w){return g(w)}function R(w){return j(A($(w),{replace:!0}))}function H(w){const N=w.matched[w.matched.length-1];if(N&&N.redirect){const{redirect:k}=N;let O=typeof k=="function"?k(w):k;if(typeof O=="string"&&(O=O.includes("?")||O.includes("#")?O=$(O):{path:O},O.params={}),process.env.NODE_ENV!=="production"&&O.path==null&&!("name"in O))throw P(`Invalid redirect found:
|
|
39
39
|
${JSON.stringify(O,null,2)}
|
|
40
|
-
when navigating to "${w.fullPath}". A redirect must contain a name or path. This will break in production.`),new Error("Invalid redirect");return
|
|
41
|
-
Are you always returning a new location within a navigation guard? That would lead to this error. Only return when redirecting or aborting, that should fix this. This might break in production if not fixed.`),Promise.reject(new Error("Infinite redirect in navigation guard"))):g(T({replace:I},$(z.to),{state:typeof z.to=="object"?T({},A,z.to.state):A,force:W}),N||L)}else z=C(L,O,!0,I,A);return b(L,O,z),z})}function x(w,N){const k=V(w,N);return k?Promise.reject(k):Promise.resolve()}function E(w){const N=ct.values().next().value;return N&&typeof N.runWithContext=="function"?N.runWithContext(w):w()}function y(w,N){let k;const[O,A,W]=Na(w,N);k=Pt(O.reverse(),"beforeRouteLeave",w,N);for(const D of O)D.leaveGuards.forEach(L=>{k.push(he(L,w,N))});const I=x.bind(null,w,N);return k.push(I),Ce(k).then(()=>{k=[];for(const D of a.list())k.push(he(D,w,N));return k.push(I),Ce(k)}).then(()=>{k=Pt(A,"beforeRouteUpdate",w,N);for(const D of A)D.updateGuards.forEach(L=>{k.push(he(L,w,N))});return k.push(I),Ce(k)}).then(()=>{k=[];for(const D of W)if(D.beforeEnter)if(G(D.beforeEnter))for(const L of D.beforeEnter)k.push(he(L,w,N));else k.push(he(D.beforeEnter,w,N));return k.push(I),Ce(k)}).then(()=>(w.matched.forEach(D=>D.enterCallbacks={}),k=Pt(W,"beforeRouteEnter",w,N,E),k.push(I),Ce(k))).then(()=>{k=[];for(const D of i.list())k.push(he(D,w,N));return k.push(I),Ce(k)}).catch(D=>se(D,8)?D:Promise.reject(D))}function b(w,N,k){c.list().forEach(O=>E(()=>O(w,N,k)))}function C(w,N,k,O,A){const W=V(w,N);if(W)return W;const I=N===fe,D=re?history.state:{};k&&(O||I?s.replace(w.fullPath,T({scroll:I&&D&&D.scroll},A)):s.push(w.fullPath,A)),p.value=w,cr(w,N,k,I),on()}let B;function te(){B||(B=s.listen((w,N,k)=>{const O=S(w),A=F(O);if(A){g(T(A,{replace:!0,force:!0}),O).catch(Ie);return}l=O;const W=p.value;re&&xs(Ln(W.fullPath,k.delta),Xe()),y(O,W).catch(I=>se(I,12)?I:se(I,2)?(g(T($(I.to),{force:!0}),O).then(D=>{se(D,20)&&!k.delta&&k.type===Re.pop&&s.go(-1,!1)}).catch(Ie),Promise.reject()):(k.delta&&s.go(-k.delta,!1),M(I,O,W))).then(I=>{I=I||C(O,W,!1),I&&(k.delta&&!se(I,8)?s.go(-k.delta,!1):k.type===Re.pop&&se(I,20)&&s.go(-1,!1)),b(O,W,I)}).catch(Ie)}))}let le=Ae(),xe=Ae(),Z;function M(w,N,k){on(w);const O=xe.list();return O.length?O.forEach(A=>A(w,N,k)):(process.env.NODE_ENV!=="production"&&P("uncaught error during route navigation:"),console.error(w)),Promise.reject(w)}function q(){return Z&&p.value!==fe?Promise.resolve():new Promise((w,N)=>{le.add([w,N])})}function on(w){return Z||(Z=!w,te(),le.list().forEach(([N,k])=>w?k(w):N()),le.reset()),w}function cr(w,N,k,O){const{scrollBehavior:A}=e;if(!re||!A)return Promise.resolve();const W=!k&&Cs(Ln(w.fullPath,0))||(O||!k)&&history.state&&history.state.scroll||null;return r.nextTick().then(()=>A(w,N,W)).then(I=>I&&Os(I)).catch(I=>M(I,w,N))}const rn=w=>s.go(w);let sn;const ct=new Set,Tc={currentRoute:p,listening:!0,addRoute:h,removeRoute:m,clearRoutes:t.clearRoutes,hasRoute:_,getRoutes:v,resolve:S,options:e,push:j,replace:R,go:rn,back:()=>rn(-1),forward:()=>rn(1),beforeEach:a.add,beforeResolve:i.add,afterEach:c.add,onError:xe.add,isReady:q,install(w){const N=this;w.component("RouterLink",aa),w.component("RouterView",ua),w.config.globalProperties.$router=N,Object.defineProperty(w.config.globalProperties,"$route",{enumerable:!0,get:()=>r.unref(p)}),re&&!sn&&p.value===fe&&(sn=!0,j(s.location).catch(A=>{process.env.NODE_ENV!=="production"&&P("Unexpected error when starting the router:",A)}));const k={};for(const A in fe)Object.defineProperty(k,A,{get:()=>p.value[A],enumerable:!0});w.provide(xt,N),w.provide(to,r.shallowReactive(k)),w.provide(Ct,p);const O=w.unmount;ct.add(w),w.unmount=function(){ct.delete(w),ct.size<1&&(l=fe,B&&B(),B=null,p.value=fe,sn=!1,Z=!1),O()},process.env.NODE_ENV!=="production"&&re&&fa(w,N,t)}};function Ce(w){return w.reduce((N,k)=>N.then(()=>E(k)),Promise.resolve())}return Tc}function Na(e,t){const n=[],o=[],s=[],a=Math.max(t.matched.length,e.matched.length);for(let i=0;i<a;i++){const c=t.matched[i];c&&(e.matched.find(l=>pe(l,c))?o.push(c):n.push(c));const p=e.matched[i];p&&(t.matched.find(l=>pe(l,p))||s.push(p))}return[n,o,s]}ka({history:Is(),routes:[]});function $a(e){return e&&typeof e.then=="function"}Promise.resolve(!1),Promise.resolve(!0);var ke=Promise.resolve();function ho(e,t){return e||(e=0),new Promise(function(n){return setTimeout(function(){return n(t)},e)})}function Sa(e,t){return Math.floor(Math.random()*(t-e+1)+e)}function Dt(){return Math.random().toString(36).substring(2)}var mo=0,It=0;function tt(){var e=new Date().getTime();return e===mo?(It++,e*1e3+It):(mo=e,It=0,e*1e3)}var Oa=tt,xa="native";function Ca(e){var t={messagesCallback:null,bc:new BroadcastChannel(e),subFns:[]};return t.bc.onmessage=function(n){t.messagesCallback&&t.messagesCallback(n.data)},t}function Pa(e){e.bc.close(),e.subFns=[]}function Va(e,t){try{return e.bc.postMessage(t,!1),ke}catch(n){return Promise.reject(n)}}function Da(e,t){e.messagesCallback=t}function Ia(){if(typeof window>"u")return!1;if(typeof BroadcastChannel=="function"){if(BroadcastChannel._pubkey)throw new Error("BroadcastChannel: Do not overwrite window.BroadcastChannel with this module, this is not a polyfill");return!0}else return!1}function Ra(){return 150}var Ta={create:Ca,close:Pa,onMessage:Da,postMessage:Va,canBeUsed:Ia,type:xa,averageResponseTime:Ra,microSeconds:Oa},go=function(){function e(t){this.ttl=t,this.map=new Map,this._to=!1}return e.prototype.has=function(t){return this.map.has(t)},e.prototype.add=function(t){var n=this;this.map.set(t,yo()),this._to||(this._to=!0,setTimeout(function(){n._to=!1,Aa(n)},0))},e.prototype.clear=function(){this.map.clear()},e}();function Aa(e){for(var t=yo()-e.ttl,n=e.map[Symbol.iterator]();;){var o=n.next().value;if(!o)return;var s=o[0],a=o[1];if(a<t)e.map.delete(s);else return}}function yo(){return new Date().getTime()}function Rt(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=JSON.parse(JSON.stringify(e));return typeof t.webWorkerSupport>"u"&&(t.webWorkerSupport=!0),t.idb||(t.idb={}),t.idb.ttl||(t.idb.ttl=1e3*45),t.idb.fallbackInterval||(t.idb.fallbackInterval=150),e.idb&&typeof e.idb.onclose=="function"&&(t.idb.onclose=e.idb.onclose),t.localstorage||(t.localstorage={}),t.localstorage.removeTimeout||(t.localstorage.removeTimeout=1e3*60),e.methods&&(t.methods=e.methods),t.node||(t.node={}),t.node.ttl||(t.node.ttl=1e3*60*2),t.node.maxParallelWrites||(t.node.maxParallelWrites=2048),typeof t.node.useFastPath>"u"&&(t.node.useFastPath=!0),t}var ja=tt,Ba="pubkey.broadcast-channel-0-",ae="messages",nt={durability:"relaxed"},Ma="idb";function wo(){if(typeof indexedDB<"u")return indexedDB;if(typeof window<"u"){if(typeof window.mozIndexedDB<"u")return window.mozIndexedDB;if(typeof window.webkitIndexedDB<"u")return window.webkitIndexedDB;if(typeof window.msIndexedDB<"u")return window.msIndexedDB}return!1}function Tt(e){e.commit&&e.commit()}function La(e){var t=wo(),n=Ba+e,o=t.open(n);return o.onupgradeneeded=function(s){var a=s.target.result;a.createObjectStore(ae,{keyPath:"id",autoIncrement:!0})},new Promise(function(s,a){o.onerror=function(i){return a(i)},o.onsuccess=function(){s(o.result)}})}function Wa(e,t,n){var o=new Date().getTime(),s={uuid:t,time:o,data:n},a=e.transaction([ae],"readwrite",nt);return new Promise(function(i,c){a.oncomplete=function(){return i()},a.onerror=function(l){return c(l)};var p=a.objectStore(ae);p.add(s),Tt(a)})}function Ua(e,t){var n=e.transaction(ae,"readonly",nt),o=n.objectStore(ae),s=[],a=IDBKeyRange.bound(t+1,1/0);if(o.getAll){var i=o.getAll(a);return new Promise(function(p,l){i.onerror=function(d){return l(d)},i.onsuccess=function(d){p(d.target.result)}})}function c(){try{return a=IDBKeyRange.bound(t+1,1/0),o.openCursor(a)}catch{return o.openCursor()}}return new Promise(function(p,l){var d=c();d.onerror=function(u){return l(u)},d.onsuccess=function(u){var f=u.target.result;f?f.value.id<t+1?f.continue(t+1):(s.push(f.value),f.continue()):(Tt(n),p(s))}})}function Fa(e,t){if(e.closed)return Promise.resolve([]);var n=e.db.transaction(ae,"readwrite",nt),o=n.objectStore(ae);return Promise.all(t.map(function(s){var a=o.delete(s);return new Promise(function(i){a.onsuccess=function(){return i()}})}))}function Ha(e,t){var n=new Date().getTime()-t,o=e.transaction(ae,"readonly",nt),s=o.objectStore(ae),a=[];return new Promise(function(i){s.openCursor().onsuccess=function(c){var p=c.target.result;if(p){var l=p.value;l.time<n?(a.push(l),p.continue()):(Tt(o),i(a))}else i(a)}})}function za(e){return Ha(e.db,e.options.idb.ttl).then(function(t){return Fa(e,t.map(function(n){return n.id}))})}function qa(e,t){return t=Rt(t),La(e).then(function(n){var o={closed:!1,lastCursorId:0,channelName:e,options:t,uuid:Dt(),eMIs:new go(t.idb.ttl*2),writeBlockPromise:ke,messagesCallback:null,readQueuePromises:[],db:n};return n.onclose=function(){o.closed=!0,t.idb.onclose&&t.idb.onclose()},bo(o),o})}function bo(e){e.closed||vo(e).then(function(){return ho(e.options.idb.fallbackInterval)}).then(function(){return bo(e)})}function Ga(e,t){return!(e.uuid===t.uuid||t.eMIs.has(e.id)||e.data.time<t.messagesCallbackTime)}function vo(e){return e.closed||!e.messagesCallback?ke:Ua(e.db,e.lastCursorId).then(function(t){var n=t.filter(function(o){return!!o}).map(function(o){return o.id>e.lastCursorId&&(e.lastCursorId=o.id),o}).filter(function(o){return Ga(o,e)}).sort(function(o,s){return o.time-s.time});return n.forEach(function(o){e.messagesCallback&&(e.eMIs.add(o.id),e.messagesCallback(o.data))}),ke})}function Ja(e){e.closed=!0,e.db.close()}function Ya(e,t){return e.writeBlockPromise=e.writeBlockPromise.then(function(){return Wa(e.db,e.uuid,t)}).then(function(){Sa(0,10)===0&&za(e)}),e.writeBlockPromise}function Ka(e,t,n){e.messagesCallbackTime=n,e.messagesCallback=t,vo(e)}function Qa(){return!!wo()}function Xa(e){return e.idb.fallbackInterval*2}var Za={create:qa,close:Ja,onMessage:Ka,postMessage:Ya,canBeUsed:Qa,type:Ma,averageResponseTime:Xa,microSeconds:ja},ei=tt,ti="pubkey.broadcastChannel-",ni="localstorage";function Eo(){var e;if(typeof window>"u")return null;try{e=window.localStorage,e=window["ie8-eventlistener/storage"]||window.localStorage}catch{}return e}function _o(e){return ti+e}function oi(e,t){return new Promise(function(n){ho().then(function(){var o=_o(e.channelName),s={token:Dt(),time:new Date().getTime(),data:t,uuid:e.uuid},a=JSON.stringify(s);Eo().setItem(o,a);var i=document.createEvent("Event");i.initEvent("storage",!0,!0),i.key=o,i.newValue=a,window.dispatchEvent(i),n()})})}function ri(e,t){var n=_o(e),o=function(s){s.key===n&&t(JSON.parse(s.newValue))};return window.addEventListener("storage",o),o}function si(e){window.removeEventListener("storage",e)}function ai(e,t){if(t=Rt(t),!ko())throw new Error("BroadcastChannel: localstorage cannot be used");var n=Dt(),o=new go(t.localstorage.removeTimeout),s={channelName:e,uuid:n,eMIs:o};return s.listener=ri(e,function(a){s.messagesCallback&&a.uuid!==n&&(!a.token||o.has(a.token)||a.data.time&&a.data.time<s.messagesCallbackTime||(o.add(a.token),s.messagesCallback(a.data)))}),s}function ii(e){si(e.listener)}function ci(e,t,n){e.messagesCallbackTime=n,e.messagesCallback=t}function ko(){var e=Eo();if(!e)return!1;try{var t="__broadcastchannel_check";e.setItem(t,"works"),e.removeItem(t)}catch{return!1}return!0}function li(){var e=120,t=navigator.userAgent.toLowerCase();return t.includes("safari")&&!t.includes("chrome")?e*2:e}var ui={create:ai,close:ii,onMessage:ci,postMessage:oi,canBeUsed:ko,type:ni,averageResponseTime:li,microSeconds:ei},di=tt,pi="simulate",At=new Set;function fi(e){var t={name:e,messagesCallback:null};return At.add(t),t}function hi(e){At.delete(e)}function mi(e,t){return new Promise(function(n){return setTimeout(function(){var o=Array.from(At);o.filter(function(s){return s.name===e.name}).filter(function(s){return s!==e}).filter(function(s){return!!s.messagesCallback}).forEach(function(s){return s.messagesCallback(t)}),n()},5)})}function gi(e,t){e.messagesCallback=t}function yi(){return!0}function wi(){return 5}var bi={create:fi,close:hi,onMessage:gi,postMessage:mi,canBeUsed:yi,type:pi,averageResponseTime:wi,microSeconds:di},No=[Ta,Za,ui];function vi(e){var t=[].concat(e.methods,No).filter(Boolean);if(e.type){if(e.type==="simulate")return bi;var n=t.find(function(s){return s.type===e.type});if(n)return n;throw new Error("method-type "+e.type+" not found")}e.webWorkerSupport||(t=t.filter(function(s){return s.type!=="idb"}));var o=t.find(function(s){return s.canBeUsed()});if(o)return o;throw new Error("No usable method found in "+JSON.stringify(No.map(function(s){return s.type})))}var $o=new Set,Ei=0,jt=function(e,t){this.id=Ei++,$o.add(this),this.name=e,this.options=Rt(t),this.method=vi(this.options),this._iL=!1,this._onML=null,this._addEL={message:[],internal:[]},this._uMP=new Set,this._befC=[],this._prepP=null,_i(this)};jt._pubkey=!0,jt.prototype={postMessage:function(e){if(this.closed)throw new Error("BroadcastChannel.postMessage(): Cannot post message after channel has closed "+JSON.stringify(e));return So(this,"message",e)},postInternal:function(e){return So(this,"internal",e)},set onmessage(e){var t=this.method.microSeconds(),n={time:t,fn:e};Co(this,"message",this._onML),e&&typeof e=="function"?(this._onML=n,xo(this,"message",n)):this._onML=null},addEventListener:function(e,t){var n=this.method.microSeconds(),o={time:n,fn:t};xo(this,e,o)},removeEventListener:function(e,t){var n=this._addEL[e].find(function(o){return o.fn===t});Co(this,e,n)},close:function(){var e=this;if(!this.closed){$o.delete(this),this.closed=!0;var t=this._prepP?this._prepP:ke;return this._onML=null,this._addEL.message=[],t.then(function(){return Promise.all(Array.from(e._uMP))}).then(function(){return Promise.all(e._befC.map(function(n){return n()}))}).then(function(){return e.method.close(e._state)})}},get type(){return this.method.type},get isClosed(){return this.closed}};function So(e,t,n){var o=e.method.microSeconds(),s={time:o,type:t,data:n},a=e._prepP?e._prepP:ke;return a.then(function(){var i=e.method.postMessage(e._state,s);return e._uMP.add(i),i.catch().then(function(){return e._uMP.delete(i)}),i})}function _i(e){var t=e.method.create(e.name,e.options);$a(t)?(e._prepP=t,t.then(function(n){e._state=n})):e._state=t}function Oo(e){return e._addEL.message.length>0||e._addEL.internal.length>0}function xo(e,t,n){e._addEL[t].push(n),ki(e)}function Co(e,t,n){e._addEL[t]=e._addEL[t].filter(function(o){return o!==n}),Ni(e)}function ki(e){if(!e._iL&&Oo(e)){var t=function(o){e._addEL[o.type].forEach(function(s){var a=1e5,i=s.time-a;o.time>=i&&s.fn(o.data)})},n=e.method.microSeconds();e._prepP?e._prepP.then(function(){e._iL=!0,e.method.onMessage(e._state,t,n)}):(e._iL=!0,e.method.onMessage(e._state,t,n))}}function Ni(e){if(e._iL&&!Oo(e)){e._iL=!1;var t=e.method.microSeconds();e.method.onMessage(e._state,null,t)}}let Bt=class extends Error{constructor(t,n){super(t),this.name="DevalueError",this.path=n.join("")}};function Po(e){return Object(e)!==e}const $i=Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function Si(e){const t=Object.getPrototypeOf(e);return t===Object.prototype||t===null||Object.getOwnPropertyNames(t).sort().join("\0")===$i}function Oi(e){return Object.prototype.toString.call(e).slice(8,-1)}function xi(e){switch(e){case'"':return'\\"';case"<":return"\\u003C";case"\\":return"\\\\";case`
|
|
42
|
-
`:return"\\n";case"\r":return"\\r";case" ":return"\\t";case"\b":return"\\b";case"\f":return"\\f";case"\u2028":return"\\u2028";case"\u2029":return"\\u2029";default:return e<" "?`\\u${e.charCodeAt(0).toString(16).padStart(4,"0")}`:""}}function Ne(e){let t="",n=0;const o=e.length;for(let s=0;s<o;s+=1){const a=e[s],i=
|
|
40
|
+
when navigating to "${w.fullPath}". A redirect must contain a name or path. This will break in production.`),new Error("Invalid redirect");return A({query:w.query,hash:w.hash,params:O.path!=null?{}:w.params},O)}}function g(w,N){const k=l=S(w),O=f.value,T=w.state,W=w.force,I=w.replace===!0,D=H(k);if(D)return g(A($(D),{state:typeof D=="object"?A({},T,D.state):T,force:W,replace:I}),N||k);const L=k;L.redirectedFrom=N;let we;return!W&&zn(o,O,k)&&(we=_e(16,{to:L,from:O}),gr(O,O,!0,!1)),(we?Promise.resolve(we):y(L,O)).catch(z=>se(z)?se(z,2)?z:sn(z):M(z,L,O)).then(z=>{if(z){if(se(z,2))return process.env.NODE_ENV!=="production"&&zn(o,S(z.to),L)&&N&&(N._count=N._count?N._count+1:1)>30?(P(`Detected a possibly infinite redirection in a navigation guard when going from "${O.fullPath}" to "${L.fullPath}". Aborting to avoid a Stack Overflow.
|
|
41
|
+
Are you always returning a new location within a navigation guard? That would lead to this error. Only return when redirecting or aborting, that should fix this. This might break in production if not fixed.`),Promise.reject(new Error("Infinite redirect in navigation guard"))):g(A({replace:I},$(z.to),{state:typeof z.to=="object"?A({},T,z.to.state):T,force:W}),N||L)}else z=C(L,O,!0,I,T);return v(L,O,z),z})}function x(w,N){const k=V(w,N);return k?Promise.reject(k):Promise.resolve()}function E(w){const N=ct.values().next().value;return N&&typeof N.runWithContext=="function"?N.runWithContext(w):w()}function y(w,N){let k;const[O,T,W]=Ua(w,N);k=Dt(O.reverse(),"beforeRouteLeave",w,N);for(const D of O)D.leaveGuards.forEach(L=>{k.push(he(L,w,N))});const I=x.bind(null,w,N);return k.push(I),Ce(k).then(()=>{k=[];for(const D of a.list())k.push(he(D,w,N));return k.push(I),Ce(k)}).then(()=>{k=Dt(T,"beforeRouteUpdate",w,N);for(const D of T)D.updateGuards.forEach(L=>{k.push(he(L,w,N))});return k.push(I),Ce(k)}).then(()=>{k=[];for(const D of W)if(D.beforeEnter)if(G(D.beforeEnter))for(const L of D.beforeEnter)k.push(he(L,w,N));else k.push(he(D.beforeEnter,w,N));return k.push(I),Ce(k)}).then(()=>(w.matched.forEach(D=>D.enterCallbacks={}),k=Dt(W,"beforeRouteEnter",w,N,E),k.push(I),Ce(k))).then(()=>{k=[];for(const D of i.list())k.push(he(D,w,N));return k.push(I),Ce(k)}).catch(D=>se(D,8)?D:Promise.reject(D))}function v(w,N,k){c.list().forEach(O=>E(()=>O(w,N,k)))}function C(w,N,k,O,T){const W=V(w,N);if(W)return W;const I=N===pe,D=re?history.state:{};k&&(O||I?s.replace(w.fullPath,A({scroll:I&&D&&D.scroll},T)):s.push(w.fullPath,T)),f.value=w,gr(w,N,k,I),sn()}let B;function te(){B||(B=s.listen((w,N,k)=>{const O=S(w),T=H(O);if(T){g(A(T,{replace:!0,force:!0}),O).catch(Ie);return}l=O;const W=f.value;re&&qs(Jn(W.fullPath,k.delta),Xe()),y(O,W).catch(I=>se(I,12)?I:se(I,2)?(g(A($(I.to),{force:!0}),O).then(D=>{se(D,20)&&!k.delta&&k.type===Re.pop&&s.go(-1,!1)}).catch(Ie),Promise.reject()):(k.delta&&s.go(-k.delta,!1),M(I,O,W))).then(I=>{I=I||C(O,W,!1),I&&(k.delta&&!se(I,8)?s.go(-k.delta,!1):k.type===Re.pop&&se(I,20)&&s.go(-1,!1)),v(O,W,I)}).catch(Ie)}))}let le=Te(),xe=Te(),Z;function M(w,N,k){sn(w);const O=xe.list();return O.length?O.forEach(T=>T(w,N,k)):(process.env.NODE_ENV!=="production"&&P("uncaught error during route navigation:"),console.error(w)),Promise.reject(w)}function q(){return Z&&f.value!==pe?Promise.resolve():new Promise((w,N)=>{le.add([w,N])})}function sn(w){return Z||(Z=!w,te(),le.list().forEach(([N,k])=>w?k(w):N()),le.reset()),w}function gr(w,N,k,O){const{scrollBehavior:T}=e;if(!re||!T)return Promise.resolve();const W=!k&&Gs(Jn(w.fullPath,0))||(O||!k)&&history.state&&history.state.scroll||null;return r.nextTick().then(()=>T(w,N,W)).then(I=>I&&zs(I)).catch(I=>M(I,w,N))}const an=w=>s.go(w);let cn;const ct=new Set,Zc={currentRoute:f,listening:!0,addRoute:h,removeRoute:m,clearRoutes:t.clearRoutes,hasRoute:_,getRoutes:b,resolve:S,options:e,push:j,replace:R,go:an,back:()=>an(-1),forward:()=>an(1),beforeEach:a.add,beforeResolve:i.add,afterEach:c.add,onError:xe.add,isReady:q,install(w){const N=this;w.component("RouterLink",Na),w.component("RouterView",xa),w.config.globalProperties.$router=N,Object.defineProperty(w.config.globalProperties,"$route",{enumerable:!0,get:()=>r.unref(f)}),re&&!cn&&f.value===pe&&(cn=!0,j(s.location).catch(T=>{process.env.NODE_ENV!=="production"&&P("Unexpected error when starting the router:",T)}));const k={};for(const T in pe)Object.defineProperty(k,T,{get:()=>f.value[T],enumerable:!0});w.provide(Pt,N),w.provide(lo,r.shallowReactive(k)),w.provide(Vt,f);const O=w.unmount;ct.add(w),w.unmount=function(){ct.delete(w),ct.size<1&&(l=pe,B&&B(),B=null,f.value=pe,cn=!1,Z=!1),O()},process.env.NODE_ENV!=="production"&&re&&Va(w,N,t)}};function Ce(w){return w.reduce((N,k)=>N.then(()=>E(k)),Promise.resolve())}return Zc}function Ua(e,t){const n=[],o=[],s=[],a=Math.max(t.matched.length,e.matched.length);for(let i=0;i<a;i++){const c=t.matched[i];c&&(e.matched.find(l=>fe(l,c))?o.push(c):n.push(c));const f=e.matched[i];f&&(t.matched.find(l=>fe(l,f))||s.push(f))}return[n,o,s]}Wa({history:Qs(),routes:[]});function Ha(e){return e&&typeof e.then=="function"}Promise.resolve(!1),Promise.resolve(!0);var ke=Promise.resolve();function _o(e,t){return e||(e=0),new Promise(function(n){return setTimeout(function(){return n(t)},e)})}function Fa(e,t){return Math.floor(Math.random()*(t-e+1)+e)}function Rt(){return Math.random().toString(36).substring(2)}var ko=0,At=0;function tt(){var e=new Date().getTime();return e===ko?(At++,e*1e3+At):(ko=e,At=0,e*1e3)}var za=tt,qa="native";function Ga(e){var t={messagesCallback:null,bc:new BroadcastChannel(e),subFns:[]};return t.bc.onmessage=function(n){t.messagesCallback&&t.messagesCallback(n.data)},t}function Ja(e){e.bc.close(),e.subFns=[]}function Ya(e,t){try{return e.bc.postMessage(t,!1),ke}catch(n){return Promise.reject(n)}}function Ka(e,t){e.messagesCallback=t}function Qa(){if(typeof window>"u")return!1;if(typeof BroadcastChannel=="function"){if(BroadcastChannel._pubkey)throw new Error("BroadcastChannel: Do not overwrite window.BroadcastChannel with this module, this is not a polyfill");return!0}else return!1}function Xa(){return 150}var Za={create:Ga,close:Ja,onMessage:Ka,postMessage:Ya,canBeUsed:Qa,type:qa,averageResponseTime:Xa,microSeconds:za},No=function(){function e(t){this.ttl=t,this.map=new Map,this._to=!1}return e.prototype.has=function(t){return this.map.has(t)},e.prototype.add=function(t){var n=this;this.map.set(t,$o()),this._to||(this._to=!0,setTimeout(function(){n._to=!1,ei(n)},0))},e.prototype.clear=function(){this.map.clear()},e}();function ei(e){for(var t=$o()-e.ttl,n=e.map[Symbol.iterator]();;){var o=n.next().value;if(!o)return;var s=o[0],a=o[1];if(a<t)e.map.delete(s);else return}}function $o(){return new Date().getTime()}function Tt(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=JSON.parse(JSON.stringify(e));return typeof t.webWorkerSupport>"u"&&(t.webWorkerSupport=!0),t.idb||(t.idb={}),t.idb.ttl||(t.idb.ttl=1e3*45),t.idb.fallbackInterval||(t.idb.fallbackInterval=150),e.idb&&typeof e.idb.onclose=="function"&&(t.idb.onclose=e.idb.onclose),t.localstorage||(t.localstorage={}),t.localstorage.removeTimeout||(t.localstorage.removeTimeout=1e3*60),e.methods&&(t.methods=e.methods),t.node||(t.node={}),t.node.ttl||(t.node.ttl=1e3*60*2),t.node.maxParallelWrites||(t.node.maxParallelWrites=2048),typeof t.node.useFastPath>"u"&&(t.node.useFastPath=!0),t}var ti=tt,ni="pubkey.broadcast-channel-0-",ae="messages",nt={durability:"relaxed"},oi="idb";function So(){if(typeof indexedDB<"u")return indexedDB;if(typeof window<"u"){if(typeof window.mozIndexedDB<"u")return window.mozIndexedDB;if(typeof window.webkitIndexedDB<"u")return window.webkitIndexedDB;if(typeof window.msIndexedDB<"u")return window.msIndexedDB}return!1}function jt(e){e.commit&&e.commit()}function ri(e){var t=So(),n=ni+e,o=t.open(n);return o.onupgradeneeded=function(s){var a=s.target.result;a.createObjectStore(ae,{keyPath:"id",autoIncrement:!0})},new Promise(function(s,a){o.onerror=function(i){return a(i)},o.onsuccess=function(){s(o.result)}})}function si(e,t,n){var o=new Date().getTime(),s={uuid:t,time:o,data:n},a=e.transaction([ae],"readwrite",nt);return new Promise(function(i,c){a.oncomplete=function(){return i()},a.onerror=function(l){return c(l)};var f=a.objectStore(ae);f.add(s),jt(a)})}function ai(e,t){var n=e.transaction(ae,"readonly",nt),o=n.objectStore(ae),s=[],a=IDBKeyRange.bound(t+1,1/0);if(o.getAll){var i=o.getAll(a);return new Promise(function(f,l){i.onerror=function(d){return l(d)},i.onsuccess=function(d){f(d.target.result)}})}function c(){try{return a=IDBKeyRange.bound(t+1,1/0),o.openCursor(a)}catch{return o.openCursor()}}return new Promise(function(f,l){var d=c();d.onerror=function(u){return l(u)},d.onsuccess=function(u){var p=u.target.result;p?p.value.id<t+1?p.continue(t+1):(s.push(p.value),p.continue()):(jt(n),f(s))}})}function ii(e,t){if(e.closed)return Promise.resolve([]);var n=e.db.transaction(ae,"readwrite",nt),o=n.objectStore(ae);return Promise.all(t.map(function(s){var a=o.delete(s);return new Promise(function(i){a.onsuccess=function(){return i()}})}))}function ci(e,t){var n=new Date().getTime()-t,o=e.transaction(ae,"readonly",nt),s=o.objectStore(ae),a=[];return new Promise(function(i){s.openCursor().onsuccess=function(c){var f=c.target.result;if(f){var l=f.value;l.time<n?(a.push(l),f.continue()):(jt(o),i(a))}else i(a)}})}function li(e){return ci(e.db,e.options.idb.ttl).then(function(t){return ii(e,t.map(function(n){return n.id}))})}function ui(e,t){return t=Tt(t),ri(e).then(function(n){var o={closed:!1,lastCursorId:0,channelName:e,options:t,uuid:Rt(),eMIs:new No(t.idb.ttl*2),writeBlockPromise:ke,messagesCallback:null,readQueuePromises:[],db:n};return n.onclose=function(){o.closed=!0,t.idb.onclose&&t.idb.onclose()},Oo(o),o})}function Oo(e){e.closed||xo(e).then(function(){return _o(e.options.idb.fallbackInterval)}).then(function(){return Oo(e)})}function di(e,t){return!(e.uuid===t.uuid||t.eMIs.has(e.id)||e.data.time<t.messagesCallbackTime)}function xo(e){return e.closed||!e.messagesCallback?ke:ai(e.db,e.lastCursorId).then(function(t){var n=t.filter(function(o){return!!o}).map(function(o){return o.id>e.lastCursorId&&(e.lastCursorId=o.id),o}).filter(function(o){return di(o,e)}).sort(function(o,s){return o.time-s.time});return n.forEach(function(o){e.messagesCallback&&(e.eMIs.add(o.id),e.messagesCallback(o.data))}),ke})}function fi(e){e.closed=!0,e.db.close()}function pi(e,t){return e.writeBlockPromise=e.writeBlockPromise.then(function(){return si(e.db,e.uuid,t)}).then(function(){Fa(0,10)===0&&li(e)}),e.writeBlockPromise}function hi(e,t,n){e.messagesCallbackTime=n,e.messagesCallback=t,xo(e)}function mi(){return!!So()}function gi(e){return e.idb.fallbackInterval*2}var yi={create:ui,close:fi,onMessage:hi,postMessage:pi,canBeUsed:mi,type:oi,averageResponseTime:gi,microSeconds:ti},wi=tt,vi="pubkey.broadcastChannel-",bi="localstorage";function Co(){var e;if(typeof window>"u")return null;try{e=window.localStorage,e=window["ie8-eventlistener/storage"]||window.localStorage}catch{}return e}function Po(e){return vi+e}function Ei(e,t){return new Promise(function(n){_o().then(function(){var o=Po(e.channelName),s={token:Rt(),time:new Date().getTime(),data:t,uuid:e.uuid},a=JSON.stringify(s);Co().setItem(o,a);var i=document.createEvent("Event");i.initEvent("storage",!0,!0),i.key=o,i.newValue=a,window.dispatchEvent(i),n()})})}function _i(e,t){var n=Po(e),o=function(s){s.key===n&&t(JSON.parse(s.newValue))};return window.addEventListener("storage",o),o}function ki(e){window.removeEventListener("storage",e)}function Ni(e,t){if(t=Tt(t),!Vo())throw new Error("BroadcastChannel: localstorage cannot be used");var n=Rt(),o=new No(t.localstorage.removeTimeout),s={channelName:e,uuid:n,eMIs:o};return s.listener=_i(e,function(a){s.messagesCallback&&a.uuid!==n&&(!a.token||o.has(a.token)||a.data.time&&a.data.time<s.messagesCallbackTime||(o.add(a.token),s.messagesCallback(a.data)))}),s}function $i(e){ki(e.listener)}function Si(e,t,n){e.messagesCallbackTime=n,e.messagesCallback=t}function Vo(){var e=Co();if(!e)return!1;try{var t="__broadcastchannel_check";e.setItem(t,"works"),e.removeItem(t)}catch{return!1}return!0}function Oi(){var e=120,t=navigator.userAgent.toLowerCase();return t.includes("safari")&&!t.includes("chrome")?e*2:e}var xi={create:Ni,close:$i,onMessage:Si,postMessage:Ei,canBeUsed:Vo,type:bi,averageResponseTime:Oi,microSeconds:wi},Ci=tt,Pi="simulate",Bt=new Set;function Vi(e){var t={name:e,messagesCallback:null};return Bt.add(t),t}function Di(e){Bt.delete(e)}function Ii(e,t){return new Promise(function(n){return setTimeout(function(){var o=Array.from(Bt);o.filter(function(s){return s.name===e.name}).filter(function(s){return s!==e}).filter(function(s){return!!s.messagesCallback}).forEach(function(s){return s.messagesCallback(t)}),n()},5)})}function Ri(e,t){e.messagesCallback=t}function Ai(){return!0}function Ti(){return 5}var ji={create:Vi,close:Di,onMessage:Ri,postMessage:Ii,canBeUsed:Ai,type:Pi,averageResponseTime:Ti,microSeconds:Ci},Do=[Za,yi,xi];function Bi(e){var t=[].concat(e.methods,Do).filter(Boolean);if(e.type){if(e.type==="simulate")return ji;var n=t.find(function(s){return s.type===e.type});if(n)return n;throw new Error("method-type "+e.type+" not found")}e.webWorkerSupport||(t=t.filter(function(s){return s.type!=="idb"}));var o=t.find(function(s){return s.canBeUsed()});if(o)return o;throw new Error("No usable method found in "+JSON.stringify(Do.map(function(s){return s.type})))}var Io=new Set,Mi=0,Mt=function(e,t){this.id=Mi++,Io.add(this),this.name=e,this.options=Tt(t),this.method=Bi(this.options),this._iL=!1,this._onML=null,this._addEL={message:[],internal:[]},this._uMP=new Set,this._befC=[],this._prepP=null,Li(this)};Mt._pubkey=!0,Mt.prototype={postMessage:function(e){if(this.closed)throw new Error("BroadcastChannel.postMessage(): Cannot post message after channel has closed "+JSON.stringify(e));return Ro(this,"message",e)},postInternal:function(e){return Ro(this,"internal",e)},set onmessage(e){var t=this.method.microSeconds(),n={time:t,fn:e};jo(this,"message",this._onML),e&&typeof e=="function"?(this._onML=n,To(this,"message",n)):this._onML=null},addEventListener:function(e,t){var n=this.method.microSeconds(),o={time:n,fn:t};To(this,e,o)},removeEventListener:function(e,t){var n=this._addEL[e].find(function(o){return o.fn===t});jo(this,e,n)},close:function(){var e=this;if(!this.closed){Io.delete(this),this.closed=!0;var t=this._prepP?this._prepP:ke;return this._onML=null,this._addEL.message=[],t.then(function(){return Promise.all(Array.from(e._uMP))}).then(function(){return Promise.all(e._befC.map(function(n){return n()}))}).then(function(){return e.method.close(e._state)})}},get type(){return this.method.type},get isClosed(){return this.closed}};function Ro(e,t,n){var o=e.method.microSeconds(),s={time:o,type:t,data:n},a=e._prepP?e._prepP:ke;return a.then(function(){var i=e.method.postMessage(e._state,s);return e._uMP.add(i),i.catch().then(function(){return e._uMP.delete(i)}),i})}function Li(e){var t=e.method.create(e.name,e.options);Ha(t)?(e._prepP=t,t.then(function(n){e._state=n})):e._state=t}function Ao(e){return e._addEL.message.length>0||e._addEL.internal.length>0}function To(e,t,n){e._addEL[t].push(n),Wi(e)}function jo(e,t,n){e._addEL[t]=e._addEL[t].filter(function(o){return o!==n}),Ui(e)}function Wi(e){if(!e._iL&&Ao(e)){var t=function(o){e._addEL[o.type].forEach(function(s){var a=1e5,i=s.time-a;o.time>=i&&s.fn(o.data)})},n=e.method.microSeconds();e._prepP?e._prepP.then(function(){e._iL=!0,e.method.onMessage(e._state,t,n)}):(e._iL=!0,e.method.onMessage(e._state,t,n))}}function Ui(e){if(e._iL&&!Ao(e)){e._iL=!1;var t=e.method.microSeconds();e.method.onMessage(e._state,null,t)}}let Lt=class extends Error{constructor(t,n){super(t),this.name="DevalueError",this.path=n.join("")}};function Bo(e){return Object(e)!==e}const Hi=Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function Fi(e){const t=Object.getPrototypeOf(e);return t===Object.prototype||t===null||Object.getOwnPropertyNames(t).sort().join("\0")===Hi}function zi(e){return Object.prototype.toString.call(e).slice(8,-1)}function qi(e){switch(e){case'"':return'\\"';case"<":return"\\u003C";case"\\":return"\\\\";case`
|
|
42
|
+
`:return"\\n";case"\r":return"\\r";case" ":return"\\t";case"\b":return"\\b";case"\f":return"\\f";case"\u2028":return"\\u2028";case"\u2029":return"\\u2029";default:return e<" "?`\\u${e.charCodeAt(0).toString(16).padStart(4,"0")}`:""}}function Ne(e){let t="",n=0;const o=e.length;for(let s=0;s<o;s+=1){const a=e[s],i=qi(a);i&&(t+=e.slice(n,s)+i,n=s+1)}return`"${n===0?e:t+e.slice(n)}"`}const Wt=-1,Mo=-2,Lo=-3,Wo=-4,Uo=-5,Ut=-6;function Ho(e,t){return Gi(JSON.parse(e))}function Gi(e,t){if(typeof e=="number")return s(e,!0);if(!Array.isArray(e)||e.length===0)throw new Error("Invalid input");const n=e,o=Array(n.length);function s(a,i=!1){if(a===Wt)return;if(a===Lo)return NaN;if(a===Wo)return 1/0;if(a===Uo)return-1/0;if(a===Ut)return-0;if(i)throw new Error("Invalid input");if(a in o)return o[a];const c=n[a];if(!c||typeof c!="object")o[a]=c;else if(Array.isArray(c))if(typeof c[0]=="string"){const f=c[0];switch(f){case"Date":o[a]=new Date(c[1]);break;case"Set":const l=new Set;o[a]=l;for(let p=1;p<c.length;p+=1)l.add(s(c[p]));break;case"Map":const d=new Map;o[a]=d;for(let p=1;p<c.length;p+=2)d.set(s(c[p]),s(c[p+1]));break;case"RegExp":o[a]=new RegExp(c[1],c[2]);break;case"Object":o[a]=Object(c[1]);break;case"BigInt":o[a]=BigInt(c[1]);break;case"null":const u=Object.create(null);o[a]=u;for(let p=1;p<c.length;p+=2)u[c[p]]=s(c[p+1]);break;default:throw new Error(`Unknown type ${f}`)}}else{const f=new Array(c.length);o[a]=f;for(let l=0;l<c.length;l+=1){const d=c[l];d!==Mo&&(f[l]=s(d))}}else{const f={};o[a]=f;for(const l in c){const d=c[l];f[l]=s(d)}}return o[a]}return s(0)}function Fo(e,t){const n=[],o=new Map,s=[];for(const l in t)s.push({key:l,fn:t[l]});const a=[];let i=0;function c(l){if(typeof l=="function")throw new Lt("Cannot stringify a function",a);if(o.has(l))return o.get(l);if(l===void 0)return Wt;if(Number.isNaN(l))return Lo;if(l===1/0)return Wo;if(l===-1/0)return Uo;if(l===0&&1/l<0)return Ut;const d=i++;o.set(l,d);for(const{key:p,fn:h}of s){const m=h(l);if(m)return n[d]=`["${p}",${c(m)}]`,d}let u="";if(Bo(l))u=Ht(l);else switch(zi(l)){case"Number":case"String":case"Boolean":u=`["Object",${Ht(l)}]`;break;case"BigInt":u=`["BigInt",${l}]`;break;case"Date":u=`["Date","${isNaN(l.getDate())?"":l.toISOString()}"]`;break;case"RegExp":const{source:p,flags:h}=l;u=h?`["RegExp",${Ne(p)},"${h}"]`:`["RegExp",${Ne(p)}]`;break;case"Array":u="[";for(let m=0;m<l.length;m+=1)m>0&&(u+=","),m in l?(a.push(`[${m}]`),u+=c(l[m]),a.pop()):u+=Mo;u+="]";break;case"Set":u='["Set"';for(const m of l)u+=`,${c(m)}`;u+="]";break;case"Map":u='["Map"';for(const[m,b]of l)a.push(`.get(${Bo(m)?Ht(m):"..."})`),u+=`,${c(m)},${c(b)}`,a.pop();u+="]";break;default:if(!Fi(l))throw new Lt("Cannot stringify arbitrary non-POJOs",a);if(Object.getOwnPropertySymbols(l).length>0)throw new Lt("Cannot stringify POJOs with symbolic keys",a);if(Object.getPrototypeOf(l)===null){u='["null"';for(const m in l)a.push(`.${m}`),u+=`,${Ne(m)},${c(l[m])}`,a.pop();u+="]"}else{u="{";let m=!1;for(const b in l)m&&(u+=","),m=!0,a.push(`.${b}`),u+=`${Ne(b)}:${c(l[b])}`,a.pop();u+="}"}}return n[d]=u,d}const f=c(e);return f<0?`${f}`:`[${n.join(",")}]`}function Ht(e){const t=typeof e;return t==="string"?Ne(e):e instanceof String?Ne(e.toString()):e===void 0?Wt.toString():e===0&&1/e<0?Ut.toString():t==="bigint"?`["BigInt","${e}"]`:String(e)}function Ji(e,t,{initialize:n,type:o}){let s=`${t.$id}-${e.toString()}`,a=new Mt(s,{type:o}),i=!1,c=0;r.watch(()=>t[e],d=>{i||(c=Date.now(),a.postMessage({timestamp:c,state:Ho(Fo(d))})),i=!1},{deep:!0}),a.onmessage=d=>{if(d===void 0){a.postMessage({timestamp:c,state:Ho(Fo(t[e]))});return}d.timestamp<=c||(i=!0,c=d.timestamp,t[e]=d.state)};let f=()=>a.postMessage(void 0),l=()=>a.close();return n&&f(),{sync:f,unshare:l}}var Yi=(e,t)=>Object.keys(t).includes(e),Ki=({initialize:e=!0,enable:t=!0,type:n})=>({store:o,options:s})=>{var a,i;let c=((a=s==null?void 0:s.share)==null?void 0:a.enable)??t,f=((i=s==null?void 0:s.share)==null?void 0:i.omit)??[];!c||Object.keys(o.$state).forEach(l=>{var d;f.includes(l)||!Yi(l,o.$state)||Ji(l,o,{initialize:((d=s==null?void 0:s.share)==null?void 0:d.initialize)??e,type:n})})};gs().use(Ki({enable:!0,initialize:!0}));const zo=r.defineComponent({__name:"Doctype",setup(e){const{stonecrop:t,isReady:n}=jn(),o=r.ref([]);return r.watch(n,()=>{if(n.value){let s=t.value.schema.schema.toArray();s.forEach((a,i)=>{const f=t.value.store.record[a.fieldname];s[i].value=f}),o.value=s}}),(s,a)=>r.unref(n)?(r.openBlock(),r.createBlock(r.unref(Ur),{key:0,class:"aform-main",modelValue:o.value,"onUpdate:modelValue":a[0]||(a[0]=i=>o.value=i)},null,8,["modelValue"])):r.createCommentVNode("",!0)}});var Qi=!1;function ot(e,t,n){return Array.isArray(e)?(e.length=Math.max(e.length,t),e.splice(t,1,n),n):(e[t]=n,n)}function Ft(e,t){if(Array.isArray(e)){e.splice(t,1);return}delete e[t]}/*!
|
|
43
43
|
* pinia v2.3.0
|
|
44
44
|
* (c) 2024 Eduardo San Martin Morote
|
|
45
45
|
* @license MIT
|
|
46
|
-
*/let Be;const rt=e=>Be=e,
|
|
46
|
+
*/let Be;const rt=e=>Be=e,Xi=process.env.NODE_ENV!=="production"?Symbol("pinia"):Symbol();function ye(e){return e&&typeof e=="object"&&Object.prototype.toString.call(e)==="[object Object]"&&typeof e.toJSON!="function"}var Me;(function(e){e.direct="direct",e.patchObject="patch object",e.patchFunction="patch function"})(Me||(Me={}));const Le=typeof window<"u";function qo(e,t){for(const n in t){const o=t[n];if(!(n in e))continue;const s=e[n];ye(s)&&ye(o)&&!r.isRef(o)&&!r.isReactive(o)?e[n]=qo(s,o):e[n]=o}return e}const Go=()=>{};function Jo(e,t,n,o=Go){e.push(t);const s=()=>{const a=e.indexOf(t);a>-1&&(e.splice(a,1),o())};return!n&&r.getCurrentScope()&&r.onScopeDispose(s),s}function $e(e,...t){e.slice().forEach(n=>{n(...t)})}const Zi=e=>e(),Yo=Symbol(),zt=Symbol();function qt(e,t){e instanceof Map&&t instanceof Map?t.forEach((n,o)=>e.set(o,n)):e instanceof Set&&t instanceof Set&&t.forEach(e.add,e);for(const n in t){if(!t.hasOwnProperty(n))continue;const o=t[n],s=e[n];ye(s)&&ye(o)&&e.hasOwnProperty(n)&&!r.isRef(o)&&!r.isReactive(o)?e[n]=qt(s,o):e[n]=o}return e}const ec=process.env.NODE_ENV!=="production"?Symbol("pinia:skipHydration"):Symbol();function tc(e){return!ye(e)||!e.hasOwnProperty(ec)}const{assign:Q}=Object;function Ko(e){return!!(r.isRef(e)&&e.effect)}function Qo(e,t,n,o){const{state:s,actions:a,getters:i}=t,c=n.state.value[e];let f;function l(){!c&&(process.env.NODE_ENV==="production"||!o)&&(n.state.value[e]=s?s():{});const d=process.env.NODE_ENV!=="production"&&o?r.toRefs(r.ref(s?s():{}).value):r.toRefs(n.state.value[e]);return Q(d,a,Object.keys(i||{}).reduce((u,p)=>(process.env.NODE_ENV!=="production"&&p in d&&console.warn(`[๐]: A getter cannot have the same name as another state property. Rename one of them. Found with "${p}" in store "${e}".`),u[p]=r.markRaw(r.computed(()=>{rt(n);const h=n._s.get(e);return i[p].call(h,h)})),u),{}))}return f=Gt(e,l,t,n,o,!0),f}function Gt(e,t,n={},o,s,a){let i;const c=Q({actions:{}},n);if(process.env.NODE_ENV!=="production"&&!o._e.active)throw new Error("Pinia destroyed");const f={deep:!0};process.env.NODE_ENV!=="production"&&!Qi&&(f.onTrigger=y=>{l?h=y:l==!1&&!g._hotUpdating&&(Array.isArray(h)?h.push(y):console.error("๐ debuggerEvents should be an array. This is most likely an internal Pinia bug."))});let l,d,u=[],p=[],h;const m=o.state.value[e];!a&&!m&&(process.env.NODE_ENV==="production"||!s)&&(o.state.value[e]={});const b=r.ref({});let _;function S(y){let v;l=d=!1,process.env.NODE_ENV!=="production"&&(h=[]),typeof y=="function"?(y(o.state.value[e]),v={type:Me.patchFunction,storeId:e,events:h}):(qt(o.state.value[e],y),v={type:Me.patchObject,payload:y,storeId:e,events:h});const C=_=Symbol();r.nextTick().then(()=>{_===C&&(l=!0)}),d=!0,$e(u,v,o.state.value[e])}const $=a?function(){const{state:v}=n,C=v?v():{};this.$patch(B=>{Q(B,C)})}:process.env.NODE_ENV!=="production"?()=>{throw new Error(`๐: Store "${e}" is built using the setup syntax and does not implement $reset().`)}:Go;function V(){i.stop(),u=[],p=[],o._s.delete(e)}const j=(y,v="")=>{if(Yo in y)return y[zt]=v,y;const C=function(){rt(o);const B=Array.from(arguments),te=[],le=[];function xe(q){te.push(q)}function Z(q){le.push(q)}$e(p,{args:B,name:C[zt],store:g,after:xe,onError:Z});let M;try{M=y.apply(this&&this.$id===e?this:g,B)}catch(q){throw $e(le,q),q}return M instanceof Promise?M.then(q=>($e(te,q),q)).catch(q=>($e(le,q),Promise.reject(q))):($e(te,M),M)};return C[Yo]=!0,C[zt]=v,C},R=r.markRaw({actions:{},getters:{},state:[],hotState:b}),H={_p:o,$id:e,$onAction:Jo.bind(null,p),$patch:S,$reset:$,$subscribe(y,v={}){const C=Jo(u,y,v.detached,()=>B()),B=i.run(()=>r.watch(()=>o.state.value[e],te=>{(v.flush==="sync"?d:l)&&y({storeId:e,type:Me.direct,events:h},te)},Q({},f,v)));return C},$dispose:V},g=r.reactive(process.env.NODE_ENV!=="production"||process.env.NODE_ENV!=="production"&&process.env.NODE_ENV!=="test"&&Le?Q({_hmrPayload:R,_customProperties:r.markRaw(new Set)},H):H);o._s.set(e,g);const E=(o._a&&o._a.runWithContext||Zi)(()=>o._e.run(()=>(i=r.effectScope()).run(()=>t({action:j}))));for(const y in E){const v=E[y];if(r.isRef(v)&&!Ko(v)||r.isReactive(v))process.env.NODE_ENV!=="production"&&s?ot(b.value,y,r.toRef(E,y)):a||(m&&tc(v)&&(r.isRef(v)?v.value=m[y]:qt(v,m[y])),o.state.value[e][y]=v),process.env.NODE_ENV!=="production"&&R.state.push(y);else if(typeof v=="function"){const C=process.env.NODE_ENV!=="production"&&s?v:j(v,y);E[y]=C,process.env.NODE_ENV!=="production"&&(R.actions[y]=v),c.actions[y]=v}else process.env.NODE_ENV!=="production"&&Ko(v)&&(R.getters[y]=a?n.getters[y]:v,Le&&(E._getters||(E._getters=r.markRaw([]))).push(y))}if(Q(g,E),Q(r.toRaw(g),E),Object.defineProperty(g,"$state",{get:()=>process.env.NODE_ENV!=="production"&&s?b.value:o.state.value[e],set:y=>{if(process.env.NODE_ENV!=="production"&&s)throw new Error("cannot set hotState");S(v=>{Q(v,y)})}}),process.env.NODE_ENV!=="production"&&(g._hotUpdate=r.markRaw(y=>{g._hotUpdating=!0,y._hmrPayload.state.forEach(v=>{if(v in g.$state){const C=y.$state[v],B=g.$state[v];typeof C=="object"&&ye(C)&&ye(B)?qo(C,B):y.$state[v]=B}ot(g,v,r.toRef(y.$state,v))}),Object.keys(g.$state).forEach(v=>{v in y.$state||Ft(g,v)}),l=!1,d=!1,o.state.value[e]=r.toRef(y._hmrPayload,"hotState"),d=!0,r.nextTick().then(()=>{l=!0});for(const v in y._hmrPayload.actions){const C=y[v];ot(g,v,j(C,v))}for(const v in y._hmrPayload.getters){const C=y._hmrPayload.getters[v],B=a?r.computed(()=>(rt(o),C.call(g,g))):C;ot(g,v,B)}Object.keys(g._hmrPayload.getters).forEach(v=>{v in y._hmrPayload.getters||Ft(g,v)}),Object.keys(g._hmrPayload.actions).forEach(v=>{v in y._hmrPayload.actions||Ft(g,v)}),g._hmrPayload=y._hmrPayload,g._getters=y._getters,g._hotUpdating=!1})),process.env.NODE_ENV!=="production"&&process.env.NODE_ENV!=="test"&&Le){const y={writable:!0,configurable:!0,enumerable:!1};["_p","_hmrPayload","_getters","_customProperties"].forEach(v=>{Object.defineProperty(g,v,Q({value:g[v]},y))})}return o._p.forEach(y=>{if(process.env.NODE_ENV!=="production"&&process.env.NODE_ENV!=="test"&&Le){const v=i.run(()=>y({store:g,app:o._a,pinia:o,options:c}));Object.keys(v||{}).forEach(C=>g._customProperties.add(C)),Q(g,v)}else Q(g,i.run(()=>y({store:g,app:o._a,pinia:o,options:c})))}),process.env.NODE_ENV!=="production"&&g.$state&&typeof g.$state=="object"&&typeof g.$state.constructor=="function"&&!g.$state.constructor.toString().includes("[native code]")&&console.warn(`[๐]: The "state" must be a plain object. It cannot be
|
|
47
47
|
state: () => new MyClass()
|
|
48
|
-
Found in store "${g.$id}".`),m&&a&&n.hydrate&&n.hydrate(g.$state,m),l=!0,d=!0,g}/*! #__NO_SIDE_EFFECTS__ */function
|
|
48
|
+
Found in store "${g.$id}".`),m&&a&&n.hydrate&&n.hydrate(g.$state,m),l=!0,d=!0,g}/*! #__NO_SIDE_EFFECTS__ */function nc(e,t,n){let o,s;const a=typeof t=="function";if(typeof e=="string")o=e,s=a?n:t;else if(s=e,o=e.id,process.env.NODE_ENV!=="production"&&typeof o!="string")throw new Error('[๐]: "defineStore()" must be passed a store id as its first argument.');function i(c,f){const l=r.hasInjectionContext();if(c=(process.env.NODE_ENV==="test"&&Be&&Be._testing?null:c)||(l?r.inject(Xi,null):null),c&&rt(c),process.env.NODE_ENV!=="production"&&!Be)throw new Error(`[๐]: "getActivePinia()" was called but there was no active Pinia. Are you trying to use a store before calling "app.use(pinia)"?
|
|
49
49
|
See https://pinia.vuejs.org/core-concepts/outside-component-usage.html for help.
|
|
50
|
-
This will fail in production.`);c=Be,c._s.has(o)||(a?zt(o,t,s,c):Fo(o,s,c),process.env.NODE_ENV!=="production"&&(i._pinia=c));const d=c._s.get(o);if(process.env.NODE_ENV!=="production"&&p){const u="__hot:"+o,f=a?zt(u,t,s,c,!0):Fo(u,Q({},s),c,!0);p._hotUpdate(f),delete c.state.value[u],c._s.delete(u)}if(process.env.NODE_ENV!=="production"&&Le){const u=r.getCurrentInstance();if(u&&u.proxy&&!p){const f=u.proxy,h="_pStores"in f?f._pStores:f._pStores={};h[o]=d}}return d}return i.$id=o,i}function Ho(e){return r.getCurrentScope()?(r.onScopeDispose(e),!0):!1}function qt(e){return typeof e=="function"?e():r.unref(e)}const Mi=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const Li=e=>e!=null,Wi=Object.prototype.toString,Ui=e=>Wi.call(e)==="[object Object]",Fi=()=>{},We=Mi?window:void 0;function Ue(e){var t;const n=qt(e);return(t=n==null?void 0:n.$el)!=null?t:n}function Fe(...e){let t,n,o,s;if(typeof e[0]=="string"||Array.isArray(e[0])?([n,o,s]=e,t=We):[t,n,o,s]=e,!t)return Fi;Array.isArray(n)||(n=[n]),Array.isArray(o)||(o=[o]);const a=[],i=()=>{a.forEach(d=>d()),a.length=0},c=(d,u,f,h)=>(d.addEventListener(u,f,h),()=>d.removeEventListener(u,f,h)),p=r.watch(()=>[Ue(t),qt(s)],([d,u])=>{if(i(),!d)return;const f=Ui(u)?{...u}:u;a.push(...n.flatMap(h=>o.map(m=>c(d,h,m,f))))},{immediate:!0,flush:"post"}),l=()=>{p(),i()};return Ho(l),l}function Hi(){const e=r.ref(!1),t=r.getCurrentInstance();return t&&r.onMounted(()=>{e.value=!0},t),e}function zi(e){const t=Hi();return r.computed(()=>(t.value,!!e()))}function qi(e,t,n={}){const{window:o=We,...s}=n;let a;const i=zi(()=>o&&"MutationObserver"in o),c=()=>{a&&(a.disconnect(),a=void 0)},p=r.computed(()=>{const f=qt(e),h=(Array.isArray(f)?f:[f]).map(Ue).filter(Li);return new Set(h)}),l=r.watch(()=>p.value,f=>{c(),i.value&&f.size&&(a=new MutationObserver(t),f.forEach(h=>a.observe(h,s)))},{immediate:!0,flush:"post"}),d=()=>a==null?void 0:a.takeRecords(),u=()=>{l(),c()};return Ho(u),{isSupported:i,stop:u,takeRecords:d}}function Gi(e={}){var t;const{window:n=We,deep:o=!0,triggerOnRemoval:s=!1}=e,a=(t=e.document)!=null?t:n==null?void 0:n.document,i=()=>{var l;let d=a==null?void 0:a.activeElement;if(o)for(;d!=null&&d.shadowRoot;)d=(l=d==null?void 0:d.shadowRoot)==null?void 0:l.activeElement;return d},c=r.ref(),p=()=>{c.value=i()};return n&&(Fe(n,"blur",l=>{l.relatedTarget===null&&p()},!0),Fe(n,"focus",p,!0)),s&&qi(a,l=>{l.filter(d=>d.removedNodes.length).map(d=>Array.from(d.removedNodes)).flat().forEach(d=>{d===c.value&&p()})},{childList:!0,subtree:!0}),p(),c}const Ji="focusin",Yi="focusout";function Ki(e,t={}){const{window:n=We}=t,o=r.computed(()=>Ue(e)),s=r.ref(!1),a=r.computed(()=>s.value),i=Gi(t);return!n||!i.value?{focused:a}:(Fe(o,Ji,()=>s.value=!0),Fe(o,Yi,()=>s.value=!1),{focused:a})}function Qi(e,{window:t=We,scrollTarget:n}={}){const o=r.ref(!1),s=()=>{if(!t)return;const a=t.document,i=Ue(e);if(!i)o.value=!1;else{const c=i.getBoundingClientRect();o.value=c.top<=(t.innerHeight||a.documentElement.clientHeight)&&c.left<=(t.innerWidth||a.documentElement.clientWidth)&&c.bottom>=0&&c.right>=0}};return r.watch(()=>Ue(e),()=>s(),{immediate:!0,flush:"post"}),t&&Fe(n||t,"scroll",s,{capture:!1,passive:!0}),o}const ie=e=>{let t=Qi(e).value;return t=t&&e.offsetHeight>0,t},ce=e=>e.tabIndex>=0,zo=e=>{const t=e.target;return Gt(t)},Gt=e=>{var t;let n;if(e instanceof HTMLTableCellElement){const o=(t=e.parentElement)==null?void 0:t.previousElementSibling;if(o){const s=Array.from(o.children)[e.cellIndex];s&&(n=s)}}else if(e instanceof HTMLTableRowElement){const o=e.previousElementSibling;o&&(n=o)}return n&&(!ce(n)||!ie(n))?Gt(n):n},Xi=e=>{var t;const n=e.target;let o;if(n instanceof HTMLTableCellElement){const s=(t=n.parentElement)==null?void 0:t.parentElement;if(s){const a=s.firstElementChild,i=a==null?void 0:a.children[n.cellIndex];i&&(o=i)}}else if(n instanceof HTMLTableRowElement){const s=n.parentElement;if(s){const a=s.firstElementChild;a&&(o=a)}}return o&&(!ce(o)||!ie(o))?Jt(o):o},qo=e=>{const t=e.target;return Jt(t)},Jt=e=>{var t;let n;if(e instanceof HTMLTableCellElement){const o=(t=e.parentElement)==null?void 0:t.nextElementSibling;if(o){const s=Array.from(o.children)[e.cellIndex];s&&(n=s)}}else if(e instanceof HTMLTableRowElement){const o=e.nextElementSibling;o&&(n=o)}return n&&(!ce(n)||!ie(n))?Jt(n):n},Zi=e=>{var t;const n=e.target;let o;if(n instanceof HTMLTableCellElement){const s=(t=n.parentElement)==null?void 0:t.parentElement;if(s){const a=s.lastElementChild,i=a==null?void 0:a.children[n.cellIndex];i&&(o=i)}}else if(n instanceof HTMLTableRowElement){const s=n.parentElement;if(s){const a=s.lastElementChild;a&&(o=a)}}return o&&(!ce(o)||!ie(o))?Gt(o):o},Go=e=>{const t=e.target;return Yt(t)},Yt=e=>{var t;let n;if(e.previousElementSibling)n=e.previousElementSibling;else{const o=(t=e.parentElement)==null?void 0:t.previousElementSibling;n=o==null?void 0:o.lastElementChild}return n&&(!ce(n)||!ie(n))?Yt(n):n},Jo=e=>{const t=e.target;return Kt(t)},Kt=e=>{var t;let n;if(e.nextElementSibling)n=e.nextElementSibling;else{const o=(t=e.parentElement)==null?void 0:t.nextElementSibling;n=o==null?void 0:o.firstElementChild}return n&&(!ce(n)||!ie(n))?Kt(n):n},Yo=e=>{const t=e.target.parentElement,n=t==null?void 0:t.firstElementChild;return n&&(!ce(n)||!ie(n))?Kt(n):n},Ko=e=>{const t=e.target.parentElement,n=t==null?void 0:t.lastElementChild;return n&&(!ce(n)||!ie(n))?Yt(n):n},st=["alt","control","shift","meta"],ec={ArrowUp:"up",ArrowDown:"down",ArrowLeft:"left",ArrowRight:"right"},Qt={"keydown.up":e=>{const t=zo(e);t&&(e.preventDefault(),e.stopPropagation(),t.focus())},"keydown.down":e=>{const t=qo(e);t&&(e.preventDefault(),e.stopPropagation(),t.focus())},"keydown.left":e=>{const t=Go(e);e.preventDefault(),e.stopPropagation(),t&&t.focus()},"keydown.right":e=>{const t=Jo(e);e.preventDefault(),e.stopPropagation(),t&&t.focus()},"keydown.control.up":e=>{const t=Xi(e);t&&(e.preventDefault(),e.stopPropagation(),t.focus())},"keydown.control.down":e=>{const t=Zi(e);t&&(e.preventDefault(),e.stopPropagation(),t.focus())},"keydown.control.left":e=>{const t=Yo(e);t&&(e.preventDefault(),e.stopPropagation(),t.focus())},"keydown.control.right":e=>{const t=Ko(e);t&&(e.preventDefault(),e.stopPropagation(),t.focus())},"keydown.end":e=>{const t=Ko(e);t&&(e.preventDefault(),e.stopPropagation(),t.focus())},"keydown.enter":e=>{if(e.target instanceof HTMLTableCellElement){e.preventDefault(),e.stopPropagation();const t=qo(e);t&&t.focus()}},"keydown.shift.enter":e=>{if(e.target instanceof HTMLTableCellElement){e.preventDefault(),e.stopPropagation();const t=zo(e);t&&t.focus()}},"keydown.home":e=>{const t=Yo(e);t&&(e.preventDefault(),e.stopPropagation(),t.focus())},"keydown.tab":e=>{const t=Jo(e);t&&(e.preventDefault(),e.stopPropagation(),t.focus())},"keydown.shift.tab":e=>{const t=Go(e);t&&(e.preventDefault(),e.stopPropagation(),t.focus())}};function Qo(e){const t=i=>{let c=null;return i.parent&&(typeof i.parent=="string"?c=document.querySelector(i.parent):i.parent instanceof HTMLElement?c=i.parent:c=i.parent.value),c},n=i=>{var c;const p=t(i);let l=[];if(typeof i.selectors=="string")l=p?Array.from(p.querySelectorAll(i.selectors)):Array.from(document.querySelectorAll(i.selectors));else if(Array.isArray(i.selectors))for(const d of i.selectors)d instanceof HTMLElement?l.push(d):l.push(d.$el);else if(i.selectors instanceof HTMLElement)l.push(i.selectors);else if((c=i.selectors)!=null&&c.value)if(Array.isArray(i.selectors.value))for(const d of i.selectors.value)d instanceof HTMLElement?l.push(d):l.push(d.$el);else l.push(i.selectors.value);return l},o=i=>{const c=t(i);let p=[];return i.selectors?p=n(i):c&&(p=Array.from(c.children).filter(l=>ce(l)&&ie(l))),p},s=i=>c=>{const p=ec[c.key]||c.key.toLowerCase();if(st.includes(p))return;const l=i.handlers||Qt;for(const d of Object.keys(l)){const[u,...f]=d.split(".");if(u==="keydown"&&f.includes(p)){const h=l[d],m=f.filter(_=>st.includes(_)),v=st.some(_=>{const S=_.charAt(0).toUpperCase()+_.slice(1);return c.getModifierState(S)});if(m.length>0){if(v){for(const _ of st)if(f.includes(_)){const S=_.charAt(0).toUpperCase()+_.slice(1);c.getModifierState(S)&&h(c)}}}else v||h(c)}}},a=[];r.onMounted(()=>{for(const i of e){const c=t(i),p=o(i),l=s(i),d=c?[c]:p;for(const u of d){const{focused:f}=Ki(r.ref(u)),h=r.watch(f,m=>{m?u.addEventListener("keydown",l):u.removeEventListener("keydown",l)});a.push(h)}}}),r.onBeforeUnmount(()=>{for(const i of a)i()})}function He(e){return r.getCurrentScope()?(r.onScopeDispose(e),!0):!1}function X(e){return typeof e=="function"?e():r.unref(e)}const Xt=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const tc=e=>e!=null,nc=Object.prototype.toString,Xo=e=>nc.call(e)==="[object Object]",Se=()=>{},Zt=oc();function oc(){var e,t;return Xt&&((e=window==null?void 0:window.navigator)==null?void 0:e.userAgent)&&(/iP(?:ad|hone|od)/.test(window.navigator.userAgent)||((t=window==null?void 0:window.navigator)==null?void 0:t.maxTouchPoints)>2&&/iPad|Macintosh/.test(window==null?void 0:window.navigator.userAgent))}function rc(e){return r.getCurrentInstance()}function sc(...e){if(e.length!==1)return r.toRef(...e);const t=e[0];return typeof t=="function"?r.readonly(r.customRef(()=>({get:t,set:Se}))):r.ref(t)}function ac(e,t=!0,n){rc()?r.onMounted(e,n):t?e():r.nextTick(e)}const at=Xt?window:void 0;function Oe(e){var t;const n=X(e);return(t=n==null?void 0:n.$el)!=null?t:n}function en(...e){let t,n,o,s;if(typeof e[0]=="string"||Array.isArray(e[0])?([n,o,s]=e,t=at):[t,n,o,s]=e,!t)return Se;Array.isArray(n)||(n=[n]),Array.isArray(o)||(o=[o]);const a=[],i=()=>{a.forEach(d=>d()),a.length=0},c=(d,u,f,h)=>(d.addEventListener(u,f,h),()=>d.removeEventListener(u,f,h)),p=r.watch(()=>[Oe(t),X(s)],([d,u])=>{if(i(),!d)return;const f=Xo(u)?{...u}:u;a.push(...n.flatMap(h=>o.map(m=>c(d,h,m,f))))},{immediate:!0,flush:"post"}),l=()=>{p(),i()};return He(l),l}function ic(){const e=r.ref(!1),t=r.getCurrentInstance();return t&&r.onMounted(()=>{e.value=!0},t),e}function Zo(e){const t=ic();return r.computed(()=>(t.value,!!e()))}function er(e,t,n={}){const{window:o=at,...s}=n;let a;const i=Zo(()=>o&&"MutationObserver"in o),c=()=>{a&&(a.disconnect(),a=void 0)},p=r.computed(()=>{const f=X(e),h=(Array.isArray(f)?f:[f]).map(Oe).filter(tc);return new Set(h)}),l=r.watch(()=>p.value,f=>{c(),i.value&&f.size&&(a=new MutationObserver(t),f.forEach(h=>a.observe(h,s)))},{immediate:!0,flush:"post"}),d=()=>a==null?void 0:a.takeRecords(),u=()=>{l(),c()};return He(u),{isSupported:i,stop:u,takeRecords:d}}function cc(e,t,n={}){const{window:o=at,...s}=n;let a;const i=Zo(()=>o&&"ResizeObserver"in o),c=()=>{a&&(a.disconnect(),a=void 0)},p=r.computed(()=>{const u=X(e);return Array.isArray(u)?u.map(f=>Oe(f)):[Oe(u)]}),l=r.watch(p,u=>{if(c(),i.value&&o){a=new ResizeObserver(t);for(const f of u)f&&a.observe(f,s)}},{immediate:!0,flush:"post"}),d=()=>{c(),l()};return He(d),{isSupported:i,stop:d}}function tr(e,t={}){const{reset:n=!0,windowResize:o=!0,windowScroll:s=!0,immediate:a=!0,updateTiming:i="sync"}=t,c=r.ref(0),p=r.ref(0),l=r.ref(0),d=r.ref(0),u=r.ref(0),f=r.ref(0),h=r.ref(0),m=r.ref(0);function v(){const S=Oe(e);if(!S){n&&(c.value=0,p.value=0,l.value=0,d.value=0,u.value=0,f.value=0,h.value=0,m.value=0);return}const $=S.getBoundingClientRect();c.value=$.height,p.value=$.bottom,l.value=$.left,d.value=$.right,u.value=$.top,f.value=$.width,h.value=$.x,m.value=$.y}function _(){i==="sync"?v():i==="next-frame"&&requestAnimationFrame(()=>v())}return cc(e,_),r.watch(()=>Oe(e),S=>!S&&_()),er(e,_,{attributeFilter:["style","class"]}),s&&en("scroll",_,{capture:!0,passive:!0}),o&&en("resize",_,{passive:!0}),ac(()=>{a&&_()}),{height:c,bottom:p,left:l,right:d,top:u,width:f,x:h,y:m,update:_}}function lc(e={}){const{window:t=at,behavior:n="auto"}=e;if(!t)return{x:r.ref(0),y:r.ref(0)};const o=r.ref(t.scrollX),s=r.ref(t.scrollY),a=r.computed({get(){return o.value},set(c){scrollTo({left:c,behavior:n})}}),i=r.computed({get(){return s.value},set(c){scrollTo({top:c,behavior:n})}});return en(t,"scroll",()=>{o.value=t.scrollX,s.value=t.scrollY},{capture:!1,passive:!0}),{x:a,y:i}}const uc=e=>{const t=new DOMParser().parseFromString(e,"text/html");return Array.from(t.body.childNodes).some(n=>n.nodeType===1)},dc=["data-colindex","data-rowindex","data-editable","contenteditable","tabindex"],pc=["innerHTML"],fc={key:2},hc=r.defineComponent({__name:"ACell",props:{colIndex:{},rowIndex:{},store:{},addNavigation:{type:[Boolean,Object],default:!0},tabIndex:{default:0},pinned:{type:Boolean}},emits:["cellInput"],setup(e,{emit:t}){const n=t,o=r.useTemplateRef("cell"),s=e.store.getCellData(e.colIndex,e.rowIndex),a=r.ref(""),i=r.ref(!1),c=e.store.columns[e.colIndex],p=e.store.rows[e.rowIndex],l=c.align||"center",d=c.width||"40ch",u=r.computed(()=>e.store.getCellDisplayValue(e.colIndex,e.rowIndex)),f=r.computed(()=>typeof u.value=="string"?uc(u.value):!1),h=r.computed(()=>{var S;return{textAlign:l,width:d,backgroundColor:i.value?"var(--sc-cell-changed-color)":"inherit",fontWeight:i.value?"bold":"inherit",paddingLeft:e.store.getIndent(e.colIndex,(S=e.store.display[e.rowIndex])==null?void 0:S.indent)}}),m=()=>{const{left:S,bottom:$,width:V,height:j}=tr(o);c.mask,c.modalComponent&&e.store.$patch(R=>{R.modal.visible=!0,R.modal.colIndex=e.colIndex,R.modal.rowIndex=e.rowIndex,R.modal.left=S,R.modal.bottom=$,R.modal.width=V,R.modal.height=j,typeof c.modalComponent=="function"?R.modal.component=c.modalComponent({table:R.table,row:p,column:c}):R.modal.component=c.modalComponent,R.modal.componentProps=c.modalComponentExtraProps})};if(e.addNavigation){let S={...Qt,"keydown.f2":m,"keydown.alt.up":m,"keydown.alt.down":m,"keydown.alt.left":m,"keydown.alt.right":m};typeof e.addNavigation=="object"&&(S={...S,...e.addNavigation}),Qo([{selectors:o,handlers:S}])}const v=()=>{o.value&&(a.value=o.value.textContent)},_=S=>{const $=S.target;$.textContent!==a.value&&(n("cellInput",e.colIndex,e.rowIndex,$.textContent,a.value),a.value=$.textContent,c.format?(i.value=$.textContent!==e.store.getFormattedValue(e.colIndex,e.rowIndex,s),e.store.setCellText(e.colIndex,e.rowIndex,$.textContent)):(i.value=$.textContent!==s,e.store.setCellData(e.colIndex,e.rowIndex,$.textContent)))};return(S,$)=>(r.openBlock(),r.createElementBlock("td",{ref:"cell","data-colindex":S.colIndex,"data-rowindex":S.rowIndex,"data-editable":r.unref(c).edit,contenteditable:r.unref(c).edit,tabindex:S.tabIndex,spellcheck:!1,style:r.normalizeStyle(h.value),onFocus:v,onPaste:_,onInput:_,onClick:m,class:r.normalizeClass(["atable-cell",S.pinned?"sticky-column":""])},[r.unref(c).cellComponent?(r.openBlock(),r.createBlock(r.resolveDynamicComponent(r.unref(c).cellComponent),r.mergeProps({key:0,value:u.value},r.unref(c).cellComponentProps),null,16,["value"])):f.value?(r.openBlock(),r.createElementBlock("span",{key:1,innerHTML:u.value},null,8,pc)):(r.openBlock(),r.createElementBlock("span",fc,r.toDisplayString(u.value),1))],46,dc))}}),mc=["tabindex"],gc=r.defineComponent({__name:"ARow",props:{rowIndex:{},store:{},tabIndex:{default:()=>-1},addNavigation:{type:[Boolean,Object],default:!1}},setup(e){const t=r.useTemplateRef("rowEl"),n=r.computed(()=>e.store.isRowVisible(e.rowIndex)),o=r.computed(()=>e.store.getRowExpandSymbol(e.rowIndex));if(e.addNavigation){let s=Qt;typeof e.addNavigation=="object"&&(s={...s,...e.addNavigation}),Qo([{selectors:t,handlers:s}])}return(s,a)=>r.withDirectives((r.openBlock(),r.createElementBlock("tr",{ref:"rowEl",tabindex:s.tabIndex,class:"table-row"},[s.store.config.view!=="uncounted"?r.renderSlot(s.$slots,"index",{key:0},()=>[s.store.config.view==="list"?(r.openBlock(),r.createElementBlock("td",{key:0,tabIndex:-1,class:r.normalizeClass(["list-index",s.store.hasPinnedColumns?"sticky-index":""])},r.toDisplayString(s.rowIndex+1),3)):s.store.config.view==="tree"?(r.openBlock(),r.createElementBlock("td",{key:1,tabIndex:-1,class:r.normalizeClass(["tree-index",s.store.hasPinnedColumns?"sticky-index":""]),onClick:a[0]||(a[0]=i=>s.store.toggleRowExpand(s.rowIndex))},r.toDisplayString(o.value),3)):r.createCommentVNode("",!0)]):r.createCommentVNode("",!0),r.renderSlot(s.$slots,"default")],8,mc)),[[r.vShow,n.value]])}}),nr=Xt?window:void 0;function ze(e){var t;const n=X(e);return(t=n==null?void 0:n.$el)!=null?t:n}function it(...e){let t,n,o,s;if(typeof e[0]=="string"||Array.isArray(e[0])?([n,o,s]=e,t=nr):[t,n,o,s]=e,!t)return Se;Array.isArray(n)||(n=[n]),Array.isArray(o)||(o=[o]);const a=[],i=()=>{a.forEach(d=>d()),a.length=0},c=(d,u,f,h)=>(d.addEventListener(u,f,h),()=>d.removeEventListener(u,f,h)),p=r.watch(()=>[ze(t),X(s)],([d,u])=>{if(i(),!d)return;const f=Xo(u)?{...u}:u;a.push(...n.flatMap(h=>o.map(m=>c(d,h,m,f))))},{immediate:!0,flush:"post"}),l=()=>{p(),i()};return He(l),l}let or=!1;function rr(e,t,n={}){const{window:o=nr,ignore:s=[],capture:a=!0,detectIframe:i=!1}=n;if(!o)return Se;Zt&&!or&&(or=!0,Array.from(o.document.body.children).forEach(m=>m.addEventListener("click",Se)),o.document.documentElement.addEventListener("click",Se));let c=!0;const p=m=>X(s).some(v=>{if(typeof v=="string")return Array.from(o.document.querySelectorAll(v)).some(_=>_===m.target||m.composedPath().includes(_));{const _=ze(v);return _&&(m.target===_||m.composedPath().includes(_))}});function l(m){const v=X(m);return v&&v.$.subTree.shapeFlag===16}function d(m,v){const _=X(m),S=_.$.subTree&&_.$.subTree.children;return S==null||!Array.isArray(S)?!1:S.some($=>$.el===v.target||v.composedPath().includes($.el))}const u=m=>{const v=ze(e);if(m.target!=null&&!(!(v instanceof Element)&&l(e)&&d(e,m))&&!(!v||v===m.target||m.composedPath().includes(v))){if(m.detail===0&&(c=!p(m)),!c){c=!0;return}t(m)}};let f=!1;const h=[it(o,"click",m=>{f||(f=!0,setTimeout(()=>{f=!1},0),u(m))},{passive:!0,capture:a}),it(o,"pointerdown",m=>{const v=ze(e);c=!p(m)&&!!(v&&!m.composedPath().includes(v))},{passive:!0}),i&&it(o,"blur",m=>{setTimeout(()=>{var v;const _=ze(e);((v=o.document.activeElement)==null?void 0:v.tagName)==="IFRAME"&&!(_!=null&&_.contains(o.document.activeElement))&&t(m)},0)})].filter(Boolean);return()=>h.forEach(m=>m())}const yc={mounted(e,t){const n=!t.modifiers.bubble;if(typeof t.value=="function")e.__onClickOutside_stop=rr(e,t.value,{capture:n});else{const[o,s]=t.value;e.__onClickOutside_stop=rr(e,o,Object.assign({capture:n},s))}},unmounted(e){e.__onClickOutside_stop()}};function tn(e){return typeof Window<"u"&&e instanceof Window?e.document.documentElement:typeof Document<"u"&&e instanceof Document?e.documentElement:e}function sr(e){const t=window.getComputedStyle(e);if(t.overflowX==="scroll"||t.overflowY==="scroll"||t.overflowX==="auto"&&e.clientWidth<e.scrollWidth||t.overflowY==="auto"&&e.clientHeight<e.scrollHeight)return!0;{const n=e.parentNode;return!n||n.tagName==="BODY"?!1:sr(n)}}function wc(e){const t=e||window.event,n=t.target;return sr(n)?!1:t.touches.length>1?!0:(t.preventDefault&&t.preventDefault(),!1)}const nn=new WeakMap;function bc(e,t=!1){const n=r.ref(t);let o=null,s="";r.watch(sc(e),c=>{const p=tn(X(c));if(p){const l=p;if(nn.get(l)||nn.set(l,l.style.overflow),l.style.overflow!=="hidden"&&(s=l.style.overflow),l.style.overflow==="hidden")return n.value=!0;if(n.value)return l.style.overflow="hidden"}},{immediate:!0});const a=()=>{const c=tn(X(e));!c||n.value||(Zt&&(o=it(c,"touchmove",p=>{wc(p)},{passive:!1})),c.style.overflow="hidden",n.value=!0)},i=()=>{const c=tn(X(e));!c||!n.value||(Zt&&(o==null||o()),c.style.overflow=s,nn.delete(c),n.value=!1)};return He(i),r.computed({get(){return n.value},set(c){c?a():i()}})}function vc(){let e=!1;const t=r.ref(!1);return(n,o)=>{if(t.value=o.value,e)return;e=!0;const s=bc(n,o.value);r.watch(t,a=>s.value=a)}}vc();const Ec={key:0,id:"resizable"},_c={class:"atable-header-row",tabindex:"-1"},kc=r.defineComponent({__name:"ATableHeader",props:{columns:{},store:{}},setup(e){return(t,n)=>t.columns.length?(r.openBlock(),r.createElementBlock("thead",Ec,[r.createElementVNode("tr",_c,[t.store.zeroColumn?(r.openBlock(),r.createElementBlock("th",{key:0,id:"header-index",class:r.normalizeClass([[t.store.hasPinnedColumns?"sticky-index":"",t.store.config.view==="tree"?"tree-index":"",t.store.config.view==="list-expansion"?"list-expansion-index":""],"list-index"])},null,2)):r.createCommentVNode("",!0),(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(t.columns,(o,s)=>(r.openBlock(),r.createElementBlock("th",{key:o.name,tabindex:"-1",style:r.normalizeStyle(t.store.getHeaderCellStyle(o)),class:r.normalizeClass(o.pinned?"sticky-column":"")},[r.renderSlot(t.$slots,"default",{},()=>[r.createTextVNode(r.toDisplayString(o.label||String.fromCharCode(s+97).toUpperCase()),1)])],6))),128))])])):r.createCommentVNode("",!0)}}),Nc=r.defineComponent({__name:"ATableModal",props:{store:{}},setup(e){const t=r.useTemplateRef("amodal"),{width:n,height:o}=tr(t),{y:s}=lc(),a=r.computed(()=>{if(!(e.store.modal.height&&e.store.modal.width&&e.store.modal.left&&e.store.modal.bottom))return;const c=document.body,p=document.documentElement,l=Math.max(c.scrollHeight,c.offsetHeight,p.clientHeight,p.scrollHeight,p.offsetHeight),d=Math.max(c.scrollWidth,c.offsetWidth,p.clientWidth,p.scrollWidth,p.offsetWidth),u=e.store.modal.bottom+o.value+s.value<=l?e.store.modal.bottom:e.store.modal.bottom-o.value-e.store.modal.height;return{left:`${e.store.modal.left+n.value<=d?e.store.modal.left:e.store.modal.left-(n.value-e.store.modal.width)}px`,top:`${u}px`}}),i=c=>{c.stopPropagation()};return(c,p)=>(r.openBlock(),r.createElementBlock("div",{class:"amodal",ref:"amodal",tabindex:"-1",onClick:i,onInput:i,style:r.normalizeStyle(a.value)},[r.renderSlot(c.$slots,"default")],36))}}),$c=e=>{const t=e.id||crypto.randomUUID();return Bi(`table-${t}`,()=>{const n=()=>{const g={};for(const[x,E]of s.value.entries())for(const[y,b]of a.value.entries())g[`${x}:${y}`]=b[E.name];return g},o=g=>{const x=[Object.assign({},{rowModified:!1})];if(g&&"0:0"in g)return g;const E=new Set;for(let y=a.value.length-1;y>=0;y--){const b=a.value[y];b.parent&&E.add(b.parent),x[y]={childrenOpen:!1,expanded:!1,indent:b.indent||0,isParent:E.has(y),isRoot:b.parent===null||b.parent===void 0,rowModified:!1,open:b.parent===null||b.parent===void 0,parent:b.parent}}return x},s=r.ref(e.columns),a=r.ref(e.rows),i=r.ref(e.config||{}),c=r.ref(e.table||n()),p=r.ref(o(e.display)),l=r.ref(e.modal||{visible:!1}),d=r.ref({}),u=r.computed(()=>s.value.some(g=>g.pinned)),f=r.computed(()=>`${Math.ceil(a.value.length/100+1)}ch`),h=r.computed(()=>i.value.view?["list","tree","list-expansion"].includes(i.value.view):!1),m=(g,x)=>c.value[`${g}:${x}`],v=(g,x,E)=>{const y=`${g}:${x}`,b=s.value[g];c.value[y]!==E&&(p.value[x].rowModified=!0),c.value[y]=E,a.value[x][b.name]=E},_=(g,x,E)=>{const y=`${g}:${x}`;c.value[y]!==E&&(p.value[x].rowModified=!0,d.value[y]=E)},S=g=>({minWidth:g.width||"40ch",textAlign:g.align||"center",width:i.value.fullWidth?"auto":void 0}),$=g=>i.value.view!=="tree"||p.value[g].isRoot||p.value[g].open,V=g=>i.value.view!=="tree"?"":p.value[g].isRoot||p.value[g].isParent?p.value[g].childrenOpen?"-":"+":"",j=g=>{if(i.value.view==="tree"){p.value[g].childrenOpen=!p.value[g].childrenOpen;for(let x=a.value.length-1;x>=0;x--)p.value[x].parent===g&&(p.value[x].open=!p.value[x].open,p.value[x].childrenOpen&&j(x))}else i.value.view==="list-expansion"&&(p.value[g].expanded=!p.value[g].expanded)},R=(g,x)=>{const E=m(g,x);return F(g,x,E)},F=(g,x,E)=>{const y=s.value[g],b=a.value[x],C=y.format;return C?typeof C=="function"?C(E,{table:c.value,row:b,column:y}):typeof C=="string"?Function(`"use strict";return (${C})`)()(E,{table:c.value,row:b,column:y}):E:E};return{columns:s,config:i,display:p,modal:l,rows:a,table:c,updates:d,hasPinnedColumns:u,numberedRowWidth:f,zeroColumn:h,closeModal:g=>{var x;g.target instanceof Node&&(x=l.value.parent)!=null&&x.contains(g.target)||l.value.visible&&(l.value.visible=!1)},getCellData:m,getCellDisplayValue:R,getFormattedValue:F,getHeaderCellStyle:S,getIndent:(g,x)=>x&&g===0&&x>0?`${x}ch`:"inherit",getRowExpandSymbol:V,isRowVisible:$,setCellData:v,setCellText:_,toggleRowExpand:j}})()},Sc=r.defineComponent({__name:"ATable",props:{id:{},modelValue:{},columns:{},rows:{default:()=>[]},config:{default:()=>new Object}},emits:["update:modelValue","cellUpdate"],setup(e,{expose:t,emit:n}){const o=n,s=r.useTemplateRef("table"),a=e.modelValue?e.modelValue:e.rows,i=$c({columns:e.columns,rows:a,id:e.id,config:e.config});i.$onAction(({name:l,store:d,args:u,after:f})=>{if(l==="setCellData"){const[h,m,v]=u,_=d.getCellData(h,m);f(()=>{o("cellUpdate",h,m,v,_)})}}),r.watch(()=>i.rows,l=>{o("update:modelValue",l)},{deep:!0}),r.onMounted(()=>{e.columns.some(l=>l.pinned)&&(p(),i.config.view==="tree"&&er(s,p,{childList:!0,subtree:!0}))});const c=(l,d,u,f)=>{o("cellUpdate",l,d,u,f)},p=()=>{const l=s.value,d=l==null?void 0:l.rows[0],u=l==null?void 0:l.rows[1],f=d?Array.from(d.cells):[];for(const[h,m]of f.entries()){const v=u==null?void 0:u.cells[h];v&&(m.style.width=`${v.offsetWidth}px`)}for(const h of(l==null?void 0:l.rows)||[]){let m=0;const v=[];for(const _ of h.cells)(_.classList.contains("sticky-column")||_.classList.contains("sticky-index"))&&(_.style.left=`${m}px`,m+=_.offsetWidth,v.push(_));v.length>0&&v[v.length-1].classList.add("sticky-column-edge")}};return window.addEventListener("keydown",l=>{if(l.key==="Escape"&&i.modal.visible){i.modal.visible=!1;const d=i.modal.parent;d&&r.nextTick().then(()=>{d.focus()})}}),t({store:i}),(l,d)=>r.withDirectives((r.openBlock(),r.createElementBlock("table",{ref:"table",class:"atable",style:r.normalizeStyle({width:r.unref(i).config.fullWidth?"100%":"auto"})},[r.renderSlot(l.$slots,"header",{data:r.unref(i)},()=>[r.createVNode(kc,{columns:r.unref(i).columns,store:r.unref(i)},null,8,["columns","store"])],!0),r.createElementVNode("tbody",null,[r.renderSlot(l.$slots,"body",{data:r.unref(i)},()=>[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(i).rows,(u,f)=>(r.openBlock(),r.createBlock(gc,{key:u.id,row:u,rowIndex:f,store:r.unref(i)},{default:r.withCtx(()=>[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(i).columns,(h,m)=>(r.openBlock(),r.createBlock(hc,{key:h.name,store:r.unref(i),col:h,spellcheck:"false",pinned:h.pinned,rowIndex:f,colIndex:m,component:h.cellComponent,style:r.normalizeStyle({textAlign:(h==null?void 0:h.align)||"center",minWidth:(h==null?void 0:h.width)||"40ch",width:r.unref(i).config.fullWidth?"auto":null}),onCellInput:c},null,8,["store","col","pinned","rowIndex","colIndex","component","style"]))),128))]),_:2},1032,["row","rowIndex","store"]))),128))],!0)]),r.renderSlot(l.$slots,"footer",{data:r.unref(i)},void 0,!0),r.renderSlot(l.$slots,"modal",{data:r.unref(i)},()=>[r.withDirectives(r.createVNode(Nc,{store:r.unref(i)},{default:r.withCtx(()=>[(r.openBlock(),r.createBlock(r.resolveDynamicComponent(r.unref(i).modal.component),r.mergeProps({key:`${r.unref(i).modal.rowIndex}:${r.unref(i).modal.colIndex}`,colIndex:r.unref(i).modal.colIndex,rowIndex:r.unref(i).modal.rowIndex,store:r.unref(i)},r.unref(i).modal.componentProps),null,16,["colIndex","rowIndex","store"]))]),_:1},8,["store"]),[[r.vShow,r.unref(i).modal.visible]])],!0)],4)),[[r.unref(yc),r.unref(i).closeModal]])}}),Oc=(e,t)=>{const n=e.__vccOpts||e;for(const[o,s]of t)n[o]=s;return n},xc=Oc(Sc,[["__scopeId","data-v-bd5101d3"]]),ar=r.defineComponent({__name:"Records",setup(e){const{stonecrop:t,isReady:n}=Cn(),o={view:"list"};return(s,a)=>r.unref(n)?(r.openBlock(),r.createBlock(r.unref(xc),{key:0,columns:r.unref(t).schema.schema.toArray(),rows:r.unref(t).store.records,config:o},null,8,["columns","rows"])):r.createCommentVNode("",!0)}}),Cc={class:"tabs"},Pc={tabindex:"0"},Vc={version:"1.1",id:"Capa_1",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",x:"0px",y:"0px",viewBox:"0 0 424.098 424.098",style:{"enable-background":"new 0 0 424.098 424.098"},"xml:space":"preserve"},Dc={tabindex:"0"},Ic={style:{width:"11pt"}},ir=dt(r.defineComponent({__name:"SheetNav",props:{breadcrumbs:{default:()=>[]}},setup(e){const t=r.ref(!0),n=r.ref(!1),o=r.ref(""),s=r.useTemplateRef("searchinput"),a=r.computed(()=>t.value?"unrotated":"rotated"),i=()=>{t.value=!t.value},c=async()=>{n.value=!n.value,await r.nextTick(()=>{s.value.focus()})},p=u=>{u.preventDefault(),u.stopPropagation()},l=async u=>{u.preventDefault(),u.stopPropagation(),await c()},d=()=>{};return(u,f)=>{const h=r.resolveComponent("router-link");return r.openBlock(),r.createElementBlock("footer",null,[r.createElementVNode("ul",Cc,[r.createElementVNode("li",{class:"hidebreadcrumbs",onClick:i,onKeydown:r.withKeys(i,["enter"])},[r.createElementVNode("a",Pc,[r.createElementVNode("div",{class:r.normalizeClass(a.value)},"ร",2)])],32),r.createElementVNode("li",{class:"hometab",onClick:d,onKeydown:r.withKeys(d,["enter"]),style:r.normalizeStyle({display:t.value?"block":"none"})},[r.createVNode(h,{to:"/home",tabindex:"0"},{default:r.withCtx(()=>[(r.openBlock(),r.createElementBlock("svg",Vc,f[5]||(f[5]=[r.createElementVNode("g",null,[r.createElementVNode("path",{style:{fill:"#010002"},d:`M351.191,401.923H72.901c-4.487,0-8.129-3.633-8.129-8.129V242.262l-56.664-0.114
|
|
50
|
+
This will fail in production.`);c=Be,c._s.has(o)||(a?Gt(o,t,s,c):Qo(o,s,c),process.env.NODE_ENV!=="production"&&(i._pinia=c));const d=c._s.get(o);if(process.env.NODE_ENV!=="production"&&f){const u="__hot:"+o,p=a?Gt(u,t,s,c,!0):Qo(u,Q({},s),c,!0);f._hotUpdate(p),delete c.state.value[u],c._s.delete(u)}if(process.env.NODE_ENV!=="production"&&Le){const u=r.getCurrentInstance();if(u&&u.proxy&&!f){const p=u.proxy,h="_pStores"in p?p._pStores:p._pStores={};h[o]=d}}return d}return i.$id=o,i}function Xo(e){return r.getCurrentScope()?(r.onScopeDispose(e),!0):!1}function Jt(e){return typeof e=="function"?e():r.unref(e)}const oc=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const rc=e=>e!=null,sc=Object.prototype.toString,ac=e=>sc.call(e)==="[object Object]",ic=()=>{},We=oc?window:void 0;function Ue(e){var t;const n=Jt(e);return(t=n==null?void 0:n.$el)!=null?t:n}function He(...e){let t,n,o,s;if(typeof e[0]=="string"||Array.isArray(e[0])?([n,o,s]=e,t=We):[t,n,o,s]=e,!t)return ic;Array.isArray(n)||(n=[n]),Array.isArray(o)||(o=[o]);const a=[],i=()=>{a.forEach(d=>d()),a.length=0},c=(d,u,p,h)=>(d.addEventListener(u,p,h),()=>d.removeEventListener(u,p,h)),f=r.watch(()=>[Ue(t),Jt(s)],([d,u])=>{if(i(),!d)return;const p=ac(u)?{...u}:u;a.push(...n.flatMap(h=>o.map(m=>c(d,h,m,p))))},{immediate:!0,flush:"post"}),l=()=>{f(),i()};return Xo(l),l}function cc(){const e=r.ref(!1),t=r.getCurrentInstance();return t&&r.onMounted(()=>{e.value=!0},t),e}function lc(e){const t=cc();return r.computed(()=>(t.value,!!e()))}function uc(e,t,n={}){const{window:o=We,...s}=n;let a;const i=lc(()=>o&&"MutationObserver"in o),c=()=>{a&&(a.disconnect(),a=void 0)},f=r.computed(()=>{const p=Jt(e),h=(Array.isArray(p)?p:[p]).map(Ue).filter(rc);return new Set(h)}),l=r.watch(()=>f.value,p=>{c(),i.value&&p.size&&(a=new MutationObserver(t),p.forEach(h=>a.observe(h,s)))},{immediate:!0,flush:"post"}),d=()=>a==null?void 0:a.takeRecords(),u=()=>{l(),c()};return Xo(u),{isSupported:i,stop:u,takeRecords:d}}function dc(e={}){var t;const{window:n=We,deep:o=!0,triggerOnRemoval:s=!1}=e,a=(t=e.document)!=null?t:n==null?void 0:n.document,i=()=>{var l;let d=a==null?void 0:a.activeElement;if(o)for(;d!=null&&d.shadowRoot;)d=(l=d==null?void 0:d.shadowRoot)==null?void 0:l.activeElement;return d},c=r.ref(),f=()=>{c.value=i()};return n&&(He(n,"blur",l=>{l.relatedTarget===null&&f()},!0),He(n,"focus",f,!0)),s&&uc(a,l=>{l.filter(d=>d.removedNodes.length).map(d=>Array.from(d.removedNodes)).flat().forEach(d=>{d===c.value&&f()})},{childList:!0,subtree:!0}),f(),c}const fc="focusin",pc="focusout";function hc(e,t={}){const{window:n=We}=t,o=r.computed(()=>Ue(e)),s=r.ref(!1),a=r.computed(()=>s.value),i=dc(t);return!n||!i.value?{focused:a}:(He(o,fc,()=>s.value=!0),He(o,pc,()=>s.value=!1),{focused:a})}function mc(e,{window:t=We,scrollTarget:n}={}){const o=r.ref(!1),s=()=>{if(!t)return;const a=t.document,i=Ue(e);if(!i)o.value=!1;else{const c=i.getBoundingClientRect();o.value=c.top<=(t.innerHeight||a.documentElement.clientHeight)&&c.left<=(t.innerWidth||a.documentElement.clientWidth)&&c.bottom>=0&&c.right>=0}};return r.watch(()=>Ue(e),()=>s(),{immediate:!0,flush:"post"}),t&&He(n||t,"scroll",s,{capture:!1,passive:!0}),o}const ie=e=>{let t=mc(e).value;return t=t&&e.offsetHeight>0,t},ce=e=>e.tabIndex>=0,Zo=e=>{const t=e.target;return Yt(t)},Yt=e=>{var t;let n;if(e instanceof HTMLTableCellElement){const o=(t=e.parentElement)==null?void 0:t.previousElementSibling;if(o){const s=Array.from(o.children)[e.cellIndex];s&&(n=s)}}else if(e instanceof HTMLTableRowElement){const o=e.previousElementSibling;o&&(n=o)}return n&&(!ce(n)||!ie(n))?Yt(n):n},gc=e=>{var t;const n=e.target;let o;if(n instanceof HTMLTableCellElement){const s=(t=n.parentElement)==null?void 0:t.parentElement;if(s){const a=s.firstElementChild,i=a==null?void 0:a.children[n.cellIndex];i&&(o=i)}}else if(n instanceof HTMLTableRowElement){const s=n.parentElement;if(s){const a=s.firstElementChild;a&&(o=a)}}return o&&(!ce(o)||!ie(o))?Kt(o):o},er=e=>{const t=e.target;return Kt(t)},Kt=e=>{var t;let n;if(e instanceof HTMLTableCellElement){const o=(t=e.parentElement)==null?void 0:t.nextElementSibling;if(o){const s=Array.from(o.children)[e.cellIndex];s&&(n=s)}}else if(e instanceof HTMLTableRowElement){const o=e.nextElementSibling;o&&(n=o)}return n&&(!ce(n)||!ie(n))?Kt(n):n},yc=e=>{var t;const n=e.target;let o;if(n instanceof HTMLTableCellElement){const s=(t=n.parentElement)==null?void 0:t.parentElement;if(s){const a=s.lastElementChild,i=a==null?void 0:a.children[n.cellIndex];i&&(o=i)}}else if(n instanceof HTMLTableRowElement){const s=n.parentElement;if(s){const a=s.lastElementChild;a&&(o=a)}}return o&&(!ce(o)||!ie(o))?Yt(o):o},tr=e=>{const t=e.target;return Qt(t)},Qt=e=>{var t;let n;if(e.previousElementSibling)n=e.previousElementSibling;else{const o=(t=e.parentElement)==null?void 0:t.previousElementSibling;n=o==null?void 0:o.lastElementChild}return n&&(!ce(n)||!ie(n))?Qt(n):n},nr=e=>{const t=e.target;return Xt(t)},Xt=e=>{var t;let n;if(e.nextElementSibling)n=e.nextElementSibling;else{const o=(t=e.parentElement)==null?void 0:t.nextElementSibling;n=o==null?void 0:o.firstElementChild}return n&&(!ce(n)||!ie(n))?Xt(n):n},or=e=>{const t=e.target.parentElement,n=t==null?void 0:t.firstElementChild;return n&&(!ce(n)||!ie(n))?Xt(n):n},rr=e=>{const t=e.target.parentElement,n=t==null?void 0:t.lastElementChild;return n&&(!ce(n)||!ie(n))?Qt(n):n},st=["alt","control","shift","meta"],wc={ArrowUp:"up",ArrowDown:"down",ArrowLeft:"left",ArrowRight:"right"},Zt={"keydown.up":e=>{const t=Zo(e);t&&(e.preventDefault(),e.stopPropagation(),t.focus())},"keydown.down":e=>{const t=er(e);t&&(e.preventDefault(),e.stopPropagation(),t.focus())},"keydown.left":e=>{const t=tr(e);e.preventDefault(),e.stopPropagation(),t&&t.focus()},"keydown.right":e=>{const t=nr(e);e.preventDefault(),e.stopPropagation(),t&&t.focus()},"keydown.control.up":e=>{const t=gc(e);t&&(e.preventDefault(),e.stopPropagation(),t.focus())},"keydown.control.down":e=>{const t=yc(e);t&&(e.preventDefault(),e.stopPropagation(),t.focus())},"keydown.control.left":e=>{const t=or(e);t&&(e.preventDefault(),e.stopPropagation(),t.focus())},"keydown.control.right":e=>{const t=rr(e);t&&(e.preventDefault(),e.stopPropagation(),t.focus())},"keydown.end":e=>{const t=rr(e);t&&(e.preventDefault(),e.stopPropagation(),t.focus())},"keydown.enter":e=>{if(e.target instanceof HTMLTableCellElement){e.preventDefault(),e.stopPropagation();const t=er(e);t&&t.focus()}},"keydown.shift.enter":e=>{if(e.target instanceof HTMLTableCellElement){e.preventDefault(),e.stopPropagation();const t=Zo(e);t&&t.focus()}},"keydown.home":e=>{const t=or(e);t&&(e.preventDefault(),e.stopPropagation(),t.focus())},"keydown.tab":e=>{const t=nr(e);t&&(e.preventDefault(),e.stopPropagation(),t.focus())},"keydown.shift.tab":e=>{const t=tr(e);t&&(e.preventDefault(),e.stopPropagation(),t.focus())}};function sr(e){const t=i=>{let c=null;return i.parent&&(typeof i.parent=="string"?c=document.querySelector(i.parent):i.parent instanceof HTMLElement?c=i.parent:c=i.parent.value),c},n=i=>{var c;const f=t(i);let l=[];if(typeof i.selectors=="string")l=f?Array.from(f.querySelectorAll(i.selectors)):Array.from(document.querySelectorAll(i.selectors));else if(Array.isArray(i.selectors))for(const d of i.selectors)d instanceof HTMLElement?l.push(d):l.push(d.$el);else if(i.selectors instanceof HTMLElement)l.push(i.selectors);else if((c=i.selectors)!=null&&c.value)if(Array.isArray(i.selectors.value))for(const d of i.selectors.value)d instanceof HTMLElement?l.push(d):l.push(d.$el);else l.push(i.selectors.value);return l},o=i=>{const c=t(i);let f=[];return i.selectors?f=n(i):c&&(f=Array.from(c.children).filter(l=>ce(l)&&ie(l))),f},s=i=>c=>{const f=wc[c.key]||c.key.toLowerCase();if(st.includes(f))return;const l=i.handlers||Zt;for(const d of Object.keys(l)){const[u,...p]=d.split(".");if(u==="keydown"&&p.includes(f)){const h=l[d],m=p.filter(_=>st.includes(_)),b=st.some(_=>{const S=_.charAt(0).toUpperCase()+_.slice(1);return c.getModifierState(S)});if(m.length>0){if(b){for(const _ of st)if(p.includes(_)){const S=_.charAt(0).toUpperCase()+_.slice(1);c.getModifierState(S)&&h(c)}}}else b||h(c)}}},a=[];r.onMounted(()=>{for(const i of e){const c=t(i),f=o(i),l=s(i),d=c?[c]:f;for(const u of d){const{focused:p}=hc(r.ref(u)),h=r.watch(p,m=>{m?u.addEventListener("keydown",l):u.removeEventListener("keydown",l)});a.push(h)}}}),r.onBeforeUnmount(()=>{for(const i of a)i()})}function Fe(e){return r.getCurrentScope()?(r.onScopeDispose(e),!0):!1}function X(e){return typeof e=="function"?e():r.unref(e)}const en=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const vc=e=>e!=null,bc=Object.prototype.toString,ar=e=>bc.call(e)==="[object Object]",Se=()=>{},tn=Ec();function Ec(){var e,t;return en&&((e=window==null?void 0:window.navigator)==null?void 0:e.userAgent)&&(/iP(?:ad|hone|od)/.test(window.navigator.userAgent)||((t=window==null?void 0:window.navigator)==null?void 0:t.maxTouchPoints)>2&&/iPad|Macintosh/.test(window==null?void 0:window.navigator.userAgent))}function _c(e){return r.getCurrentInstance()}function kc(...e){if(e.length!==1)return r.toRef(...e);const t=e[0];return typeof t=="function"?r.readonly(r.customRef(()=>({get:t,set:Se}))):r.ref(t)}function Nc(e,t=!0,n){_c()?r.onMounted(e,n):t?e():r.nextTick(e)}const at=en?window:void 0;function Oe(e){var t;const n=X(e);return(t=n==null?void 0:n.$el)!=null?t:n}function nn(...e){let t,n,o,s;if(typeof e[0]=="string"||Array.isArray(e[0])?([n,o,s]=e,t=at):[t,n,o,s]=e,!t)return Se;Array.isArray(n)||(n=[n]),Array.isArray(o)||(o=[o]);const a=[],i=()=>{a.forEach(d=>d()),a.length=0},c=(d,u,p,h)=>(d.addEventListener(u,p,h),()=>d.removeEventListener(u,p,h)),f=r.watch(()=>[Oe(t),X(s)],([d,u])=>{if(i(),!d)return;const p=ar(u)?{...u}:u;a.push(...n.flatMap(h=>o.map(m=>c(d,h,m,p))))},{immediate:!0,flush:"post"}),l=()=>{f(),i()};return Fe(l),l}function $c(){const e=r.ref(!1),t=r.getCurrentInstance();return t&&r.onMounted(()=>{e.value=!0},t),e}function ir(e){const t=$c();return r.computed(()=>(t.value,!!e()))}function cr(e,t,n={}){const{window:o=at,...s}=n;let a;const i=ir(()=>o&&"MutationObserver"in o),c=()=>{a&&(a.disconnect(),a=void 0)},f=r.computed(()=>{const p=X(e),h=(Array.isArray(p)?p:[p]).map(Oe).filter(vc);return new Set(h)}),l=r.watch(()=>f.value,p=>{c(),i.value&&p.size&&(a=new MutationObserver(t),p.forEach(h=>a.observe(h,s)))},{immediate:!0,flush:"post"}),d=()=>a==null?void 0:a.takeRecords(),u=()=>{l(),c()};return Fe(u),{isSupported:i,stop:u,takeRecords:d}}function Sc(e,t,n={}){const{window:o=at,...s}=n;let a;const i=ir(()=>o&&"ResizeObserver"in o),c=()=>{a&&(a.disconnect(),a=void 0)},f=r.computed(()=>{const u=X(e);return Array.isArray(u)?u.map(p=>Oe(p)):[Oe(u)]}),l=r.watch(f,u=>{if(c(),i.value&&o){a=new ResizeObserver(t);for(const p of u)p&&a.observe(p,s)}},{immediate:!0,flush:"post"}),d=()=>{c(),l()};return Fe(d),{isSupported:i,stop:d}}function lr(e,t={}){const{reset:n=!0,windowResize:o=!0,windowScroll:s=!0,immediate:a=!0,updateTiming:i="sync"}=t,c=r.ref(0),f=r.ref(0),l=r.ref(0),d=r.ref(0),u=r.ref(0),p=r.ref(0),h=r.ref(0),m=r.ref(0);function b(){const S=Oe(e);if(!S){n&&(c.value=0,f.value=0,l.value=0,d.value=0,u.value=0,p.value=0,h.value=0,m.value=0);return}const $=S.getBoundingClientRect();c.value=$.height,f.value=$.bottom,l.value=$.left,d.value=$.right,u.value=$.top,p.value=$.width,h.value=$.x,m.value=$.y}function _(){i==="sync"?b():i==="next-frame"&&requestAnimationFrame(()=>b())}return Sc(e,_),r.watch(()=>Oe(e),S=>!S&&_()),cr(e,_,{attributeFilter:["style","class"]}),s&&nn("scroll",_,{capture:!0,passive:!0}),o&&nn("resize",_,{passive:!0}),Nc(()=>{a&&_()}),{height:c,bottom:f,left:l,right:d,top:u,width:p,x:h,y:m,update:_}}function Oc(e={}){const{window:t=at,behavior:n="auto"}=e;if(!t)return{x:r.ref(0),y:r.ref(0)};const o=r.ref(t.scrollX),s=r.ref(t.scrollY),a=r.computed({get(){return o.value},set(c){scrollTo({left:c,behavior:n})}}),i=r.computed({get(){return s.value},set(c){scrollTo({top:c,behavior:n})}});return nn(t,"scroll",()=>{o.value=t.scrollX,s.value=t.scrollY},{capture:!1,passive:!0}),{x:a,y:i}}const xc=e=>{const t=new DOMParser().parseFromString(e,"text/html");return Array.from(t.body.childNodes).some(n=>n.nodeType===1)},Cc=["data-colindex","data-rowindex","data-editable","contenteditable","tabindex"],Pc=["innerHTML"],Vc={key:2},Dc=r.defineComponent({__name:"ACell",props:{colIndex:{},rowIndex:{},store:{},addNavigation:{type:[Boolean,Object],default:!0},tabIndex:{default:0},pinned:{type:Boolean}},emits:["cellInput"],setup(e,{emit:t}){const n=t,o=r.useTemplateRef("cell"),s=e.store.getCellData(e.colIndex,e.rowIndex),a=r.ref(""),i=r.ref(!1),c=e.store.columns[e.colIndex],f=e.store.rows[e.rowIndex],l=c.align||"center",d=c.width||"40ch",u=r.computed(()=>e.store.getCellDisplayValue(e.colIndex,e.rowIndex)),p=r.computed(()=>typeof u.value=="string"?xc(u.value):!1),h=r.computed(()=>{var S;return{textAlign:l,width:d,backgroundColor:i.value?"var(--sc-cell-changed-color)":"inherit",fontWeight:i.value?"bold":"inherit",paddingLeft:e.store.getIndent(e.colIndex,(S=e.store.display[e.rowIndex])==null?void 0:S.indent)}}),m=()=>{const{left:S,bottom:$,width:V,height:j}=lr(o);c.mask,c.modalComponent&&e.store.$patch(R=>{R.modal.visible=!0,R.modal.colIndex=e.colIndex,R.modal.rowIndex=e.rowIndex,R.modal.left=S,R.modal.bottom=$,R.modal.width=V,R.modal.height=j,typeof c.modalComponent=="function"?R.modal.component=c.modalComponent({table:R.table,row:f,column:c}):R.modal.component=c.modalComponent,R.modal.componentProps=c.modalComponentExtraProps})};if(e.addNavigation){let S={...Zt,"keydown.f2":m,"keydown.alt.up":m,"keydown.alt.down":m,"keydown.alt.left":m,"keydown.alt.right":m};typeof e.addNavigation=="object"&&(S={...S,...e.addNavigation}),sr([{selectors:o,handlers:S}])}const b=()=>{o.value&&(a.value=o.value.textContent)},_=S=>{const $=S.target;$.textContent!==a.value&&(n("cellInput",e.colIndex,e.rowIndex,$.textContent,a.value),a.value=$.textContent,c.format?(i.value=$.textContent!==e.store.getFormattedValue(e.colIndex,e.rowIndex,s),e.store.setCellText(e.colIndex,e.rowIndex,$.textContent)):(i.value=$.textContent!==s,e.store.setCellData(e.colIndex,e.rowIndex,$.textContent)))};return(S,$)=>(r.openBlock(),r.createElementBlock("td",{ref:"cell","data-colindex":S.colIndex,"data-rowindex":S.rowIndex,"data-editable":r.unref(c).edit,contenteditable:r.unref(c).edit,tabindex:S.tabIndex,spellcheck:!1,style:r.normalizeStyle(h.value),onFocus:b,onPaste:_,onInput:_,onClick:m,class:r.normalizeClass(["atable-cell",S.pinned?"sticky-column":""])},[r.unref(c).cellComponent?(r.openBlock(),r.createBlock(r.resolveDynamicComponent(r.unref(c).cellComponent),r.mergeProps({key:0,value:u.value},r.unref(c).cellComponentProps),null,16,["value"])):p.value?(r.openBlock(),r.createElementBlock("span",{key:1,innerHTML:u.value},null,8,Pc)):(r.openBlock(),r.createElementBlock("span",Vc,r.toDisplayString(u.value),1))],46,Cc))}}),Ic=["tabindex"],Rc=r.defineComponent({__name:"ARow",props:{rowIndex:{},store:{},tabIndex:{default:()=>-1},addNavigation:{type:[Boolean,Object],default:!1}},setup(e){const t=r.useTemplateRef("rowEl"),n=r.computed(()=>e.store.isRowVisible(e.rowIndex)),o=r.computed(()=>e.store.getRowExpandSymbol(e.rowIndex));if(e.addNavigation){let s=Zt;typeof e.addNavigation=="object"&&(s={...s,...e.addNavigation}),sr([{selectors:t,handlers:s}])}return(s,a)=>r.withDirectives((r.openBlock(),r.createElementBlock("tr",{ref:"rowEl",tabindex:s.tabIndex,class:"table-row"},[s.store.config.view!=="uncounted"?r.renderSlot(s.$slots,"index",{key:0},()=>[s.store.config.view==="list"?(r.openBlock(),r.createElementBlock("td",{key:0,tabIndex:-1,class:r.normalizeClass(["list-index",s.store.hasPinnedColumns?"sticky-index":""])},r.toDisplayString(s.rowIndex+1),3)):s.store.config.view==="tree"?(r.openBlock(),r.createElementBlock("td",{key:1,tabIndex:-1,class:r.normalizeClass(["tree-index",s.store.hasPinnedColumns?"sticky-index":""]),onClick:a[0]||(a[0]=i=>s.store.toggleRowExpand(s.rowIndex))},r.toDisplayString(o.value),3)):r.createCommentVNode("",!0)]):r.createCommentVNode("",!0),r.renderSlot(s.$slots,"default")],8,Ic)),[[r.vShow,n.value]])}}),ur=en?window:void 0;function ze(e){var t;const n=X(e);return(t=n==null?void 0:n.$el)!=null?t:n}function it(...e){let t,n,o,s;if(typeof e[0]=="string"||Array.isArray(e[0])?([n,o,s]=e,t=ur):[t,n,o,s]=e,!t)return Se;Array.isArray(n)||(n=[n]),Array.isArray(o)||(o=[o]);const a=[],i=()=>{a.forEach(d=>d()),a.length=0},c=(d,u,p,h)=>(d.addEventListener(u,p,h),()=>d.removeEventListener(u,p,h)),f=r.watch(()=>[ze(t),X(s)],([d,u])=>{if(i(),!d)return;const p=ar(u)?{...u}:u;a.push(...n.flatMap(h=>o.map(m=>c(d,h,m,p))))},{immediate:!0,flush:"post"}),l=()=>{f(),i()};return Fe(l),l}let dr=!1;function fr(e,t,n={}){const{window:o=ur,ignore:s=[],capture:a=!0,detectIframe:i=!1}=n;if(!o)return Se;tn&&!dr&&(dr=!0,Array.from(o.document.body.children).forEach(m=>m.addEventListener("click",Se)),o.document.documentElement.addEventListener("click",Se));let c=!0;const f=m=>X(s).some(b=>{if(typeof b=="string")return Array.from(o.document.querySelectorAll(b)).some(_=>_===m.target||m.composedPath().includes(_));{const _=ze(b);return _&&(m.target===_||m.composedPath().includes(_))}});function l(m){const b=X(m);return b&&b.$.subTree.shapeFlag===16}function d(m,b){const _=X(m),S=_.$.subTree&&_.$.subTree.children;return S==null||!Array.isArray(S)?!1:S.some($=>$.el===b.target||b.composedPath().includes($.el))}const u=m=>{const b=ze(e);if(m.target!=null&&!(!(b instanceof Element)&&l(e)&&d(e,m))&&!(!b||b===m.target||m.composedPath().includes(b))){if(m.detail===0&&(c=!f(m)),!c){c=!0;return}t(m)}};let p=!1;const h=[it(o,"click",m=>{p||(p=!0,setTimeout(()=>{p=!1},0),u(m))},{passive:!0,capture:a}),it(o,"pointerdown",m=>{const b=ze(e);c=!f(m)&&!!(b&&!m.composedPath().includes(b))},{passive:!0}),i&&it(o,"blur",m=>{setTimeout(()=>{var b;const _=ze(e);((b=o.document.activeElement)==null?void 0:b.tagName)==="IFRAME"&&!(_!=null&&_.contains(o.document.activeElement))&&t(m)},0)})].filter(Boolean);return()=>h.forEach(m=>m())}const Ac={mounted(e,t){const n=!t.modifiers.bubble;if(typeof t.value=="function")e.__onClickOutside_stop=fr(e,t.value,{capture:n});else{const[o,s]=t.value;e.__onClickOutside_stop=fr(e,o,Object.assign({capture:n},s))}},unmounted(e){e.__onClickOutside_stop()}};function on(e){return typeof Window<"u"&&e instanceof Window?e.document.documentElement:typeof Document<"u"&&e instanceof Document?e.documentElement:e}function pr(e){const t=window.getComputedStyle(e);if(t.overflowX==="scroll"||t.overflowY==="scroll"||t.overflowX==="auto"&&e.clientWidth<e.scrollWidth||t.overflowY==="auto"&&e.clientHeight<e.scrollHeight)return!0;{const n=e.parentNode;return!n||n.tagName==="BODY"?!1:pr(n)}}function Tc(e){const t=e||window.event,n=t.target;return pr(n)?!1:t.touches.length>1?!0:(t.preventDefault&&t.preventDefault(),!1)}const rn=new WeakMap;function jc(e,t=!1){const n=r.ref(t);let o=null,s="";r.watch(kc(e),c=>{const f=on(X(c));if(f){const l=f;if(rn.get(l)||rn.set(l,l.style.overflow),l.style.overflow!=="hidden"&&(s=l.style.overflow),l.style.overflow==="hidden")return n.value=!0;if(n.value)return l.style.overflow="hidden"}},{immediate:!0});const a=()=>{const c=on(X(e));!c||n.value||(tn&&(o=it(c,"touchmove",f=>{Tc(f)},{passive:!1})),c.style.overflow="hidden",n.value=!0)},i=()=>{const c=on(X(e));!c||!n.value||(tn&&(o==null||o()),c.style.overflow=s,rn.delete(c),n.value=!1)};return Fe(i),r.computed({get(){return n.value},set(c){c?a():i()}})}function Bc(){let e=!1;const t=r.ref(!1);return(n,o)=>{if(t.value=o.value,e)return;e=!0;const s=jc(n,o.value);r.watch(t,a=>s.value=a)}}Bc();const Mc={key:0,id:"resizable"},Lc={class:"atable-header-row",tabindex:"-1"},Wc=r.defineComponent({__name:"ATableHeader",props:{columns:{},store:{}},setup(e){return(t,n)=>t.columns.length?(r.openBlock(),r.createElementBlock("thead",Mc,[r.createElementVNode("tr",Lc,[t.store.zeroColumn?(r.openBlock(),r.createElementBlock("th",{key:0,id:"header-index",class:r.normalizeClass([[t.store.hasPinnedColumns?"sticky-index":"",t.store.config.view==="tree"?"tree-index":"",t.store.config.view==="list-expansion"?"list-expansion-index":""],"list-index"])},null,2)):r.createCommentVNode("",!0),(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(t.columns,(o,s)=>(r.openBlock(),r.createElementBlock("th",{key:o.name,tabindex:"-1",style:r.normalizeStyle(t.store.getHeaderCellStyle(o)),class:r.normalizeClass(o.pinned?"sticky-column":"")},[r.renderSlot(t.$slots,"default",{},()=>[r.createTextVNode(r.toDisplayString(o.label||String.fromCharCode(s+97).toUpperCase()),1)])],6))),128))])])):r.createCommentVNode("",!0)}}),Uc=r.defineComponent({__name:"ATableModal",props:{store:{}},setup(e){const t=r.useTemplateRef("amodal"),{width:n,height:o}=lr(t),{y:s}=Oc(),a=r.computed(()=>{if(!(e.store.modal.height&&e.store.modal.width&&e.store.modal.left&&e.store.modal.bottom))return;const c=document.body,f=document.documentElement,l=Math.max(c.scrollHeight,c.offsetHeight,f.clientHeight,f.scrollHeight,f.offsetHeight),d=Math.max(c.scrollWidth,c.offsetWidth,f.clientWidth,f.scrollWidth,f.offsetWidth),u=e.store.modal.bottom+o.value+s.value<=l?e.store.modal.bottom:e.store.modal.bottom-o.value-e.store.modal.height;return{left:`${e.store.modal.left+n.value<=d?e.store.modal.left:e.store.modal.left-(n.value-e.store.modal.width)}px`,top:`${u}px`}}),i=c=>{c.stopPropagation()};return(c,f)=>(r.openBlock(),r.createElementBlock("div",{class:"amodal",ref:"amodal",tabindex:"-1",onClick:i,onInput:i,style:r.normalizeStyle(a.value)},[r.renderSlot(c.$slots,"default")],36))}}),Hc=e=>{const t=e.id||crypto.randomUUID();return nc(`table-${t}`,()=>{const n=()=>{const g={};for(const[x,E]of s.value.entries())for(const[y,v]of a.value.entries())g[`${x}:${y}`]=v[E.name];return g},o=g=>{const x=[Object.assign({},{rowModified:!1})];if(g&&"0:0"in g)return g;const E=new Set;for(let y=a.value.length-1;y>=0;y--){const v=a.value[y];v.parent&&E.add(v.parent),x[y]={childrenOpen:!1,expanded:!1,indent:v.indent||0,isParent:E.has(y),isRoot:v.parent===null||v.parent===void 0,rowModified:!1,open:v.parent===null||v.parent===void 0,parent:v.parent}}return x},s=r.ref(e.columns),a=r.ref(e.rows),i=r.ref(e.config||{}),c=r.ref(e.table||n()),f=r.ref(o(e.display)),l=r.ref(e.modal||{visible:!1}),d=r.ref({}),u=r.computed(()=>s.value.some(g=>g.pinned)),p=r.computed(()=>`${Math.ceil(a.value.length/100+1)}ch`),h=r.computed(()=>i.value.view?["list","tree","list-expansion"].includes(i.value.view):!1),m=(g,x)=>c.value[`${g}:${x}`],b=(g,x,E)=>{const y=`${g}:${x}`,v=s.value[g];c.value[y]!==E&&(f.value[x].rowModified=!0),c.value[y]=E,a.value[x][v.name]=E},_=(g,x,E)=>{const y=`${g}:${x}`;c.value[y]!==E&&(f.value[x].rowModified=!0,d.value[y]=E)},S=g=>({minWidth:g.width||"40ch",textAlign:g.align||"center",width:i.value.fullWidth?"auto":void 0}),$=g=>i.value.view!=="tree"||f.value[g].isRoot||f.value[g].open,V=g=>i.value.view!=="tree"?"":f.value[g].isRoot||f.value[g].isParent?f.value[g].childrenOpen?"-":"+":"",j=g=>{if(i.value.view==="tree"){f.value[g].childrenOpen=!f.value[g].childrenOpen;for(let x=a.value.length-1;x>=0;x--)f.value[x].parent===g&&(f.value[x].open=!f.value[x].open,f.value[x].childrenOpen&&j(x))}else i.value.view==="list-expansion"&&(f.value[g].expanded=!f.value[g].expanded)},R=(g,x)=>{const E=m(g,x);return H(g,x,E)},H=(g,x,E)=>{const y=s.value[g],v=a.value[x],C=y.format;return C?typeof C=="function"?C(E,{table:c.value,row:v,column:y}):typeof C=="string"?Function(`"use strict";return (${C})`)()(E,{table:c.value,row:v,column:y}):E:E};return{columns:s,config:i,display:f,modal:l,rows:a,table:c,updates:d,hasPinnedColumns:u,numberedRowWidth:p,zeroColumn:h,closeModal:g=>{var x;g.target instanceof Node&&(x=l.value.parent)!=null&&x.contains(g.target)||l.value.visible&&(l.value.visible=!1)},getCellData:m,getCellDisplayValue:R,getFormattedValue:H,getHeaderCellStyle:S,getIndent:(g,x)=>x&&g===0&&x>0?`${x}ch`:"inherit",getRowExpandSymbol:V,isRowVisible:$,setCellData:b,setCellText:_,toggleRowExpand:j}})()},Fc=r.defineComponent({__name:"ATable",props:{id:{},modelValue:{},columns:{},rows:{default:()=>[]},config:{default:()=>new Object}},emits:["update:modelValue","cellUpdate"],setup(e,{expose:t,emit:n}){const o=n,s=r.useTemplateRef("table"),a=e.modelValue?e.modelValue:e.rows,i=Hc({columns:e.columns,rows:a,id:e.id,config:e.config});i.$onAction(({name:l,store:d,args:u,after:p})=>{if(l==="setCellData"){const[h,m,b]=u,_=d.getCellData(h,m);p(()=>{o("cellUpdate",h,m,b,_)})}}),r.watch(()=>i.rows,l=>{o("update:modelValue",l)},{deep:!0}),r.onMounted(()=>{e.columns.some(l=>l.pinned)&&(f(),i.config.view==="tree"&&cr(s,f,{childList:!0,subtree:!0}))});const c=(l,d,u,p)=>{o("cellUpdate",l,d,u,p)},f=()=>{const l=s.value,d=l==null?void 0:l.rows[0],u=l==null?void 0:l.rows[1],p=d?Array.from(d.cells):[];for(const[h,m]of p.entries()){const b=u==null?void 0:u.cells[h];b&&(m.style.width=`${b.offsetWidth}px`)}for(const h of(l==null?void 0:l.rows)||[]){let m=0;const b=[];for(const _ of h.cells)(_.classList.contains("sticky-column")||_.classList.contains("sticky-index"))&&(_.style.left=`${m}px`,m+=_.offsetWidth,b.push(_));b.length>0&&b[b.length-1].classList.add("sticky-column-edge")}};return window.addEventListener("keydown",l=>{if(l.key==="Escape"&&i.modal.visible){i.modal.visible=!1;const d=i.modal.parent;d&&r.nextTick().then(()=>{d.focus()})}}),t({store:i}),(l,d)=>r.withDirectives((r.openBlock(),r.createElementBlock("table",{ref:"table",class:"atable",style:r.normalizeStyle({width:r.unref(i).config.fullWidth?"100%":"auto"})},[r.renderSlot(l.$slots,"header",{data:r.unref(i)},()=>[r.createVNode(Wc,{columns:r.unref(i).columns,store:r.unref(i)},null,8,["columns","store"])],!0),r.createElementVNode("tbody",null,[r.renderSlot(l.$slots,"body",{data:r.unref(i)},()=>[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(i).rows,(u,p)=>(r.openBlock(),r.createBlock(Rc,{key:u.id,row:u,rowIndex:p,store:r.unref(i)},{default:r.withCtx(()=>[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(i).columns,(h,m)=>(r.openBlock(),r.createBlock(Dc,{key:h.name,store:r.unref(i),col:h,spellcheck:"false",pinned:h.pinned,rowIndex:p,colIndex:m,component:h.cellComponent,style:r.normalizeStyle({textAlign:(h==null?void 0:h.align)||"center",minWidth:(h==null?void 0:h.width)||"40ch",width:r.unref(i).config.fullWidth?"auto":null}),onCellInput:c},null,8,["store","col","pinned","rowIndex","colIndex","component","style"]))),128))]),_:2},1032,["row","rowIndex","store"]))),128))],!0)]),r.renderSlot(l.$slots,"footer",{data:r.unref(i)},void 0,!0),r.renderSlot(l.$slots,"modal",{data:r.unref(i)},()=>[r.withDirectives(r.createVNode(Uc,{store:r.unref(i)},{default:r.withCtx(()=>[(r.openBlock(),r.createBlock(r.resolveDynamicComponent(r.unref(i).modal.component),r.mergeProps({key:`${r.unref(i).modal.rowIndex}:${r.unref(i).modal.colIndex}`,colIndex:r.unref(i).modal.colIndex,rowIndex:r.unref(i).modal.rowIndex,store:r.unref(i)},r.unref(i).modal.componentProps),null,16,["colIndex","rowIndex","store"]))]),_:1},8,["store"]),[[r.vShow,r.unref(i).modal.visible]])],!0)],4)),[[r.unref(Ac),r.unref(i).closeModal]])}}),zc=(e,t)=>{const n=e.__vccOpts||e;for(const[o,s]of t)n[o]=s;return n},qc=zc(Fc,[["__scopeId","data-v-bd5101d3"]]),hr=r.defineComponent({__name:"Records",setup(e){const{stonecrop:t,isReady:n}=jn(),o={view:"list"};return(s,a)=>r.unref(n)?(r.openBlock(),r.createBlock(r.unref(qc),{key:0,columns:r.unref(t).schema.schema.toArray(),rows:r.unref(t).store.records,config:o},null,8,["columns","rows"])):r.createCommentVNode("",!0)}}),Gc={class:"tabs"},Jc={tabindex:"0"},Yc={version:"1.1",id:"Capa_1",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",x:"0px",y:"0px",viewBox:"0 0 424.098 424.098",style:{"enable-background":"new 0 0 424.098 424.098"},"xml:space":"preserve"},Kc={tabindex:"0"},Qc={style:{width:"11pt"}},mr=dt(r.defineComponent({__name:"SheetNav",props:{breadcrumbs:{default:()=>[]}},setup(e){const t=r.ref(!0),n=r.ref(!1),o=r.ref(""),s=r.useTemplateRef("searchinput"),a=r.computed(()=>t.value?"unrotated":"rotated"),i=()=>{t.value=!t.value},c=async()=>{n.value=!n.value,await r.nextTick(()=>{s.value.focus()})},f=u=>{u.preventDefault(),u.stopPropagation()},l=async u=>{u.preventDefault(),u.stopPropagation(),await c()},d=()=>{};return(u,p)=>{const h=r.resolveComponent("router-link");return r.openBlock(),r.createElementBlock("footer",null,[r.createElementVNode("ul",Gc,[r.createElementVNode("li",{class:"hidebreadcrumbs",onClick:i,onKeydown:r.withKeys(i,["enter"])},[r.createElementVNode("a",Jc,[r.createElementVNode("div",{class:r.normalizeClass(a.value)},"ร",2)])],32),r.createElementVNode("li",{class:"hometab",onClick:d,onKeydown:r.withKeys(d,["enter"]),style:r.normalizeStyle({display:t.value?"block":"none"})},[r.createVNode(h,{to:"/home",tabindex:"0"},{default:r.withCtx(()=>[(r.openBlock(),r.createElementBlock("svg",Yc,p[5]||(p[5]=[r.createElementVNode("g",null,[r.createElementVNode("path",{style:{fill:"#010002"},d:`M351.191,401.923H72.901c-4.487,0-8.129-3.633-8.129-8.129V242.262l-56.664-0.114
|
|
51
51
|
c-3.284-0.008-6.243-1.992-7.495-5.023c-1.252-3.04-0.553-6.527,1.764-8.852L206.104,24.546c1.853-1.845,4.503-2.666,7.047-2.276
|
|
52
52
|
c2.414,0.39,4.511,1.845,5.731,3.942l47.43,47.43V58.499c0-4.487,3.633-8.129,8.129-8.129h47.755c4.495,0,8.129,3.642,8.129,8.129
|
|
53
53
|
v79.156l91.39,91.398c2.325,2.325,3.024,5.828,1.764,8.868c-1.26,3.032-4.227,5.007-7.511,5.007c-0.008,0-0.008,0-0.016,0
|
|
@@ -55,5 +55,5 @@ This will fail in production.`);c=Be,c._s.has(o)||(a?zt(o,t,s,c):Fo(o,s,c),proce
|
|
|
55
55
|
c0-2.162,0.854-4.235,2.39-5.755c1.528-1.52,3.585-2.374,5.739-2.374c0.008,0,0.008,0,0.016,0l45.105,0.089l-79.855-79.863
|
|
56
56
|
c-1.528-1.528-2.382-3.593-2.382-5.747V66.628h-31.498v26.645c0,3.284-1.975,6.251-5.015,7.511
|
|
57
57
|
c-3.032,1.268-6.527,0.569-8.86-1.764l-57.038-57.038l-183.95,183.95l45.203,0.089c4.487,0.008,8.112,3.642,8.112,8.129
|
|
58
|
-
C81.03,234.149,81.03,385.666,81.03,385.666z`})],-1)])))]),_:1})],36),r.createElementVNode("li",{class:"searchtab",onClick:c,onKeydown:r.withKeys(c,["enter"]),style:r.normalizeStyle({display:t.value?"block":"none"})},[r.createElementVNode("a",
|
|
58
|
+
C81.03,234.149,81.03,385.666,81.03,385.666z`})],-1)])))]),_:1})],36),r.createElementVNode("li",{class:"searchtab",onClick:c,onKeydown:r.withKeys(c,["enter"]),style:r.normalizeStyle({display:t.value?"block":"none"})},[r.createElementVNode("a",Kc,[r.createElementVNode("span",{style:r.normalizeStyle({display:n.value?"none":"block"})},[(r.openBlock(),r.createElementBlock("svg",Qc,p[6]||(p[6]=[r.createElementVNode("g",{transform:"matrix(-0.08088215,0,0,0.08088215,9.8016177,3.1263021e-6)"},[r.createElementVNode("path",{d:"M 93.148438,80.832031 C 109.5,57.742188 104.03125,25.769531 80.941406,9.421875 57.851562,-6.925781 25.878906,-1.460938 9.53125,21.632812 -6.816406,44.722656 -1.351562,76.691406 21.742188,93.039062 38.222656,104.70703 60.011719,105.60547 77.394531,95.339844 l 37.769529,37.542966 c 4.07813,4.29297 10.86328,4.46485 15.15625,0.38672 4.29297,-4.07422 4.46485,-10.85937 0.39063,-15.15234 -0.12891,-0.13672 -0.25391,-0.26172 -0.39063,-0.39063 z m -41.839844,3.5 C 33.0625,84.335938 18.269531,69.554688 18.257812,51.308594 18.253906,33.0625 33.035156,18.269531 51.285156,18.261719 c 18.222656,-0.0078 33.007813,14.75 33.042969,32.972656 0.03125,18.25 -14.742187,33.066406 -32.996094,33.097656 -0.0078,0 -0.01172,0 -0.02344,0 z m 0,0",style:{fill:"#000000","fill-opacity":"1","fill-rule":"nonzero",stroke:"none"},id:"path2"})],-1)])))],4),r.withDirectives(r.createElementVNode("input",{"onUpdate:modelValue":p[0]||(p[0]=m=>o.value=m),ref:"searchinput",style:r.normalizeStyle({display:n.value?"block":"none"}),onClick:p[1]||(p[1]=m=>f(m)),onInput:p[2]||(p[2]=m=>f(m)),onBlur:p[3]||(p[3]=m=>l(m)),onKeydown:p[4]||(p[4]=r.withKeys(m=>l(m),["enter"])),type:"text"},null,36),[[r.vModelText,o.value]])])],36),(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(u.breadcrumbs,m=>(r.openBlock(),r.createElementBlock("li",{key:m.title,style:r.normalizeStyle({display:t.value?"block":"none"})},[r.createVNode(h,{tabindex:"0",to:m.to},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(m.title),1)]),_:2},1032,["to"])],4))),128))])])}}}),[["__scopeId","data-v-a650f215"]]),Xc={install:e=>{e.component("ActionSet",ln),e.component("CommandPalette",un),e.component("Doctype",zo),e.component("Records",hr),e.component("SheetNav",mr)}};J.ActionSet=ln,J.CommandPalette=un,J.Doctype=zo,J.Records=hr,J.SheetNav=mr,J.StonecropDesktop=Xc,Object.defineProperty(J,Symbol.toStringTag,{value:"Module"})});
|
|
59
59
|
//# sourceMappingURL=desktop.umd.cjs.map
|