@stonecrop/desktop 0.3.0 โ 0.3.2
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 +1936 -1929
- package/dist/desktop.js.map +1 -1
- package/dist/desktop.umd.cjs +22 -22
- 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
|
|
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 cr={class:"action-menu-icon"},lr=["onclick"],ur={key:1},dr=["onClick"],pr={class:"dropdown-container"},fr={class:"dropdown"},hr=["onclick"],mr=["href"],gr={class:"dropdown-item"},yr=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 f of t.value)f.elementType==="dropdown"&&(f.show=!1)},c=()=>{s.value=!0,o.value=setTimeout(()=>{s.value&&(n.value=!0)},500)},l=()=>{s.value=!1,a.value=!1,clearTimeout(o.value),n.value=!1},u=f=>{const d=!t.value[f].show;i(),t.value[f].show=d};return(f,d)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass([{"open-set":n.value,"hovered-and-closed":a.value},"action-set collapse"]),onMouseover:c,onMouseleave:l},[r.createElementVNode("div",cr,[r.createElementVNode("div",{id:"chevron",onClick:d[0]||(d[0]=p=>a.value=!a.value)},d[1]||(d[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)]))]),d[2]||(d[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.elementType=="button"?(r.openBlock(),r.createElementBlock("button",{key:0,onclick:p.action,class:"button-default"},r.toDisplayString(p.label),9,lr)):r.createCommentVNode("",!0),p.elementType=="dropdown"?(r.openBlock(),r.createElementBlock("div",ur,[r.createElementVNode("button",{class:"button-default",onClick:m=>u(h)},r.toDisplayString(p.label),9,dr),r.withDirectives(r.createElementVNode("div",pr,[r.createElementVNode("div",fr,[(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,hr)):m.link!=null?(r.openBlock(),r.createElementBlock("a",{key:1,href:m.link},[r.createElementVNode("button",gr,r.toDisplayString(m.label),1)],8,mr)):r.createCommentVNode("",!0)]))),128))])],512),[[r.vShow,p.show]])])):r.createCommentVNode("",!0)]))),128))],34))}}),ut=(e,t)=>{const n=e.__vccOpts||e;for(const[o,s]of t)n[o]=s;return n},sn=ut(yr,[["__scopeId","data-v-4fb5c934"]]),wr={};function br(e,t){return r.openBlock(),r.createElementBlock("dialog")}const an=ut(wr,[["render",br]]),vr=(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 Er={class:"aform"},_r=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[l,u]of Object.entries(i))["component","fieldtype"].includes(l)||(c[l]=u),l==="rows"&&u&&u.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:l=>{e.modelValue[c].value=l,n("update:modelValue",e.modelValue)}})),set:()=>{}});return(i,c)=>(r.openBlock(),r.createElementBlock("form",Er,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(i.modelValue,(l,u)=>(r.openBlock(),r.createBlock(r.resolveDynamicComponent(l.component),r.mergeProps({key:u,schema:l,modelValue:a.value[u].value,"onUpdate:modelValue":f=>a.value[u].value=f,data:o.value[l.fieldname],readonly:i.readonly,ref_for:!0},s(l)),null,16,["schema","modelValue","onUpdate:modelValue","data","readonly"]))),128))]))}}),kr=vr(_r,[["__scopeId","data-v-68845234"]]);typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;var Nr=Object.defineProperty,$r=(e,t,n)=>t in e?Nr(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,K=(e,t,n)=>$r(e,typeof t!="symbol"?t+"":t,n);function dt(e){this.message=e||""}dt.prototype=Object.create(Error.prototype,{constructor:{value:dt},name:{value:"NotImplemented"},stack:{get:function(){return new Error().stack}}});const cn=class ct{constructor(t,n,o,s,a){if(K(this,"name","Stonecrop"),K(this,"registry"),K(this,"schema"),K(this,"workflow"),K(this,"actions"),K(this,"store"),ct._root)return ct._root;ct._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 dt(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){const s=this.registry.registry[t.slug].actions.get(n),{initialState:a}=this.workflow;this.workflow.transition(a,{type:n}),s.length>0&&s.forEach(i=>{new Function(i)(o)})}};K(cn,"_root");let Or=cn;var ln=!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 pt(e,t){if(Array.isArray(e)){e.splice(t,1);return}delete e[t]}function Sr(){return un().__VUE_DEVTOOLS_GLOBAL_HOOK__}function un(){return typeof navigator<"u"&&typeof window<"u"?window:typeof globalThis<"u"?globalThis:{}}const xr=typeof Proxy=="function",Cr="devtools-plugin:setup",Pr="plugin:settings:set";let Pe,ft;function Vr(){var e;return Pe!==void 0||(typeof window<"u"&&window.performance?(Pe=!0,ft=window.performance):typeof globalThis<"u"&&!((e=globalThis.perf_hooks)===null||e===void 0)&&e.performance?(Pe=!0,ft=globalThis.perf_hooks.performance):Pe=!1),Pe}function Dr(){return Vr()?ft.now():Date.now()}class Ir{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 Dr()}},n&&n.on(Pr,(i,c)=>{i===this.plugin.id&&this.fallbacks.setSettings(c)}),this.proxiedOn=new Proxy({},{get:(i,c)=>this.target?this.target.on[c]:(...l)=>{this.onQueue.push({method:c,args:l})}}),this.proxiedTarget=new Proxy({},{get:(i,c)=>this.target?this.target[c]:c==="on"?this.proxiedOn:Object.keys(this.fallbacks).includes(c)?(...l)=>(this.targetQueue.push({method:c,args:l,resolve:()=>{}}),this.fallbacks[c](...l)):(...l)=>new Promise(u=>{this.targetQueue.push({method:c,args:l,resolve:u})})})}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 ht(e,t){const n=e,o=un(),s=Sr(),a=xr&&n.enableEarlyProxy;if(s&&(o.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__||!a))s.emit(Cr,e,t);else{const i=a?new Ir(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
|
|
5
|
+
*/let Ve;const De=e=>Ve=e,dn=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",pn=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 Rr(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 mt(e,t,n){const o=new XMLHttpRequest;o.open("GET",e),o.responseType="blob",o.onload=function(){mn(o.response,t,n)},o.onerror=function(){console.error("could not download file")},o.send()}function fn(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:""},hn=/Macintosh/.test(Je.userAgent)&&/AppleWebKit/.test(Je.userAgent)&&!/Safari/.test(Je.userAgent),mn=ue?typeof HTMLAnchorElement<"u"&&"download"in HTMLAnchorElement.prototype&&!hn?Ar:"msSaveOrOpenBlob"in Je?Tr:jr:()=>{};function Ar(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?fn(o.href)?mt(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 Tr(e,t="download",n){if(typeof e=="string")if(fn(e))mt(e,t,n);else{const o=document.createElement("a");o.href=e,o.target="_blank",setTimeout(function(){Ge(o)})}else navigator.msSaveOrOpenBlob(Rr(e,n),t)}function jr(e,t,n,o){if(o=o||open("","_blank"),o&&(o.document.title=o.document.body.innerText="downloading..."),typeof e=="string")return mt(e,t,n);const s=e.type==="application/octet-stream",a=/constructor/i.test(String(pn.HTMLElement))||"safari"in pn,i=/CriOS\/[\d]+/.test(navigator.userAgent);if((i||s&&a||hn)&&typeof FileReader<"u"){const c=new FileReader;c.onloadend=function(){let l=c.result;if(typeof l!="string")throw o=null,new Error("Wrong reader.result type");l=i?l:l.replace(/^data:[^;]*;/,"data:attachment/file;"),o?o.location.href=l:location.assign(l),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 F(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 gt(e){return"_a"in e&&"install"in e}function gn(){if(!("clipboard"in navigator))return F("Your browser doesn't support the Clipboard API","error"),!0}function yn(e){return e instanceof Error&&e.message.toLowerCase().includes("document is not focused")?(F('You need to activate the "Emulate a focused page" setting in the "Rendering" panel of devtools.',"warn"),!0):!1}async function Br(e){if(!gn())try{await navigator.clipboard.writeText(JSON.stringify(e.state.value)),F("Global state copied to clipboard.")}catch(t){if(yn(t))return;F("Failed to serialize the state. Check the console for more details.","error"),console.error(t)}}async function Lr(e){if(!gn())try{wn(e,JSON.parse(await navigator.clipboard.readText())),F("Global state pasted from clipboard.")}catch(t){if(yn(t))return;F("Failed to deserialize the state from clipboard. Check the console for more details.","error"),console.error(t)}}async function Mr(e){try{mn(new Blob([JSON.stringify(e.state.value)],{type:"text/plain;charset=utf-8"}),"pinia-state.json")}catch(t){F("Failed to export the state as JSON. Check the console for more details.","error"),console.error(t)}}let oe;function Wr(){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 Ur(e){try{const t=await Wr()();if(!t)return;const{text:n,file:o}=t;wn(e,JSON.parse(n)),F(`Global state imported from "${o.name}".`)}catch(t){F("Failed to import the state from JSON. Check the console for more details.","error"),console.error(t)}}function wn(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 bn="๐ Pinia (root)",Ke="_root";function Fr(e){return gt(e)?{id:Ke,label:bn}:{id:e.$id,label:e.$id}}function Hr(e){if(gt(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 zr(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 qr(e){switch(e){case ne.direct:return"mutation";case ne.patchFunction:return"$patch";case ne.patchObject:return"$patch";default:return"unknown"}}let be=!0;const Ye=[],ge="pinia:mutations",H="pinia",{assign:Gr}=Object,Qe=e=>"๐ "+e;function Jr(e,t){ht({id:"dev.esm.pinia",label:"Pinia ๐",logo:"https://pinia.vuejs.org/logo.svg",packageName:"pinia",homepage:"https://pinia.vuejs.org",componentStateTypes:Ye,app:e},n=>{typeof n.now!="function"&&F("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:H,label:"Pinia ๐",icon:"storage",treeFilterPlaceholder:"Search stores",actions:[{icon:"content_copy",action:()=>{Br(t)},tooltip:"Serialize and copy the state"},{icon:"content_paste",action:async()=>{await Lr(t),n.sendInspectorTree(H),n.sendInspectorState(H)},tooltip:"Replace the state with the content of your clipboard"},{icon:"save",action:()=>{Mr(t)},tooltip:"Save the state as a JSON file"},{icon:"folder_open",action:async()=>{await Ur(t),n.sendInspectorTree(H),n.sendInspectorState(H)},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"?F(`Cannot reset "${o}" store because it doesn't have a "$reset" method implemented.`,"warn"):(s.$reset(),F(`Store "${o}" reset.`)):F(`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((l,u)=>(l[u]=c.$state[u],l),{})}),c._getters&&c._getters.length&&o.instanceData.state.push({type:Qe(c.$id),key:"getters",editable:!1,value:c._getters.reduce((l,u)=>{try{l[u]=c[u]}catch(f){l[u]=f}return l},{})})})}}),n.on.getInspectorTree(o=>{if(o.app===e&&o.inspectorId===H){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()):bn.toLowerCase().includes(o.filter.toLowerCase())):s).map(Fr)}}),globalThis.$pinia=t,n.on.getInspectorState(o=>{if(o.app===e&&o.inspectorId===H){const s=o.nodeId===Ke?t:t._s.get(o.nodeId);if(!s)return;s&&(o.nodeId!==Ke&&(globalThis.$store=r.toRaw(s)),o.state=Hr(s))}}),n.on.editInspectorState((o,s)=>{if(o.app===e&&o.inspectorId===H){const a=o.nodeId===Ke?t:t._s.get(o.nodeId);if(!a)return F(`store "${o.nodeId}" not found`,"error");const{path:i}=o;gt(a)?i.unshift("state"):(i.length!==1||!a._customProperties.has(i[0])||i[0]in a.$state)&&i.unshift("$state"),be=!1,o.set(a,i,o.state.value),be=!0}}),n.on.editComponentState(o=>{if(o.type.startsWith("๐")){const s=o.type.replace(/^๐\s*/,""),a=t._s.get(s);if(!a)return F(`store "${s}" not found`,"error");const{path:i}=o;if(i[0]!=="state")return F(`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",be=!1,o.set(a,i,o.state.value),be=!0}})})}function Kr(e,t){Ye.includes(Qe(t.$id))||Ye.push(Qe(t.$id)),ht({id:"dev.esm.pinia",label:"Pinia ๐",logo:"https://pinia.vuejs.org/logo.svg",packageName:"pinia",homepage:"https://pinia.vuejs.org",componentStateTypes:Ye,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:l,args:u})=>{const f=vn++;n.addTimelineEvent({layerId:ge,event:{time:o(),title:"๐ซ "+l,subtitle:"start",data:{store:ee(t.$id),action:ee(l),args:u},groupId:f}}),i(d=>{de=void 0,n.addTimelineEvent({layerId:ge,event:{time:o(),title:"๐ฌ "+l,subtitle:"end",data:{store:ee(t.$id),action:ee(l),args:u,result:d},groupId:f}})}),c(d=>{de=void 0,n.addTimelineEvent({layerId:ge,event:{time:o(),logType:"error",title:"๐ฅ "+l,subtitle:"end",data:{store:ee(t.$id),action:ee(l),args:u,error:d},groupId:f}})})},!0),t._customProperties.forEach(i=>{r.watch(()=>r.unref(t[i]),(c,l)=>{n.notifyComponentUpdate(),n.sendInspectorState(H),be&&n.addTimelineEvent({layerId:ge,event:{time:o(),title:"Change",subtitle:i,data:{newValue:c,oldValue:l},groupId:de}})},{deep:!0})}),t.$subscribe(({events:i,type:c},l)=>{if(n.notifyComponentUpdate(),n.sendInspectorState(H),!be)return;const u={time:o(),title:qr(c),data:Gr({store:ee(t.$id)},zr(i)),groupId:de};c===ne.patchFunction?u.subtitle="โคต๏ธ":c===ne.patchObject?u.subtitle="๐งฉ":i&&!Array.isArray(i)&&(u.subtitle=i.type),i&&(u.data["rawEvent(s)"]={_custom:{display:"DebuggerEvent",type:"object",tooltip:"raw DebuggerEvent[]",value:i}}),n.addTimelineEvent({layerId:ge,event:u})},{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(H),n.sendInspectorState(H)});const{$dispose:a}=t;t.$dispose=()=>{a(),n.notifyComponentUpdate(),n.sendInspectorTree(H),n.sendInspectorState(H),n.getSettings().logStoreChanges&&F(`Disposed "${t.$id}" store ๐`)},n.notifyComponentUpdate(),n.sendInspectorTree(H),n.sendInspectorState(H),n.getSettings().logStoreChanges&&F(`"${t.$id}" store installed ๐`)})}let vn=0,de;function En(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=vn,i=n?new Proxy(e,{get(...l){return de=a,Reflect.get(...l)},set(...l){return de=a,Reflect.set(...l)}}):e;de=a;const c=o[s].apply(i,arguments);return de=void 0,c}}function Yr({app:e,store:t,options:n}){if(!t.$id.startsWith("__hot:")){if(t._isOptionsAPI=!!n.state,!t._p._testing){En(t,Object.keys(n.actions),t._isOptionsAPI);const o=t._hotUpdate;r.toRaw(t)._hotUpdate=function(s){o.apply(this,arguments),En(t,Object.keys(s._hmrPayload.actions),!!t._isOptionsAPI)}}Kr(e,t)}}function Qr(){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(dn,s),a.config.globalProperties.$pinia=s,process.env.NODE_ENV!=="production"&&process.env.NODE_ENV!=="test"&&ue&&Jr(a,s),o.forEach(i=>n.push(i)),o=[]},use(a){return!this._a&&!ln?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(Yr),s}function _n(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]=_n(s,o):e[n]=o}return e}const kn=()=>{};function Nn(e,t,n,o=kn){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 ve(e,...t){e.slice().forEach(n=>{n(...t)})}const Xr=e=>e(),$n=Symbol(),yt=Symbol();function wt(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]=wt(s,o):e[n]=o}return e}const Zr=process.env.NODE_ENV!=="production"?Symbol("pinia:skipHydration"):Symbol();function es(e){return!me(e)||!e.hasOwnProperty(Zr)}const{assign:Y}=Object;function On(e){return!!(r.isRef(e)&&e.effect)}function Sn(e,t,n,o){const{state:s,actions:a,getters:i}=t,c=n.state.value[e];let l;function u(){!c&&(process.env.NODE_ENV==="production"||!o)&&(n.state.value[e]=s?s():{});const f=process.env.NODE_ENV!=="production"&&o?r.toRefs(r.ref(s?s():{}).value):r.toRefs(n.state.value[e]);return Y(f,a,Object.keys(i||{}).reduce((d,p)=>(process.env.NODE_ENV!=="production"&&p in f&&console.warn(`[๐]: A getter cannot have the same name as another state property. Rename one of them. Found with "${p}" in store "${e}".`),d[p]=r.markRaw(r.computed(()=>{De(n);const h=n._s.get(e);return i[p].call(h,h)})),d),{}))}return l=bt(e,u,t,n,o,!0),l}function bt(e,t,n={},o,s,a){let i;const c=Y({actions:{}},n);if(process.env.NODE_ENV!=="production"&&!o._e.active)throw new Error("Pinia destroyed");const l={deep:!0};process.env.NODE_ENV!=="production"&&!ln&&(l.onTrigger=E=>{u?h=E:u==!1&&!w._hotUpdating&&(Array.isArray(h)?h.push(E):console.error("๐ debuggerEvents should be an array. This is most likely an internal Pinia bug."))});let u,f,d=[],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 N;function _(E){let g;u=f=!1,process.env.NODE_ENV!=="production"&&(h=[]),typeof E=="function"?(E(o.state.value[e]),g={type:ne.patchFunction,storeId:e,events:h}):(wt(o.state.value[e],E),g={type:ne.patchObject,payload:E,storeId:e,events:h});const v=N=Symbol();r.nextTick().then(()=>{N===v&&(u=!0)}),f=!0,ve(d,g,o.state.value[e])}const x=a?function(){const{state:E}=n,g=E?E():{};this.$patch(v=>{Y(v,g)})}:process.env.NODE_ENV!=="production"?()=>{throw new Error(`๐: Store "${e}" is built using the setup syntax and does not implement $reset().`)}:kn;function I(){i.stop(),d=[],p=[],o._s.delete(e)}const B=(E,g="")=>{if($n in E)return E[yt]=g,E;const v=function(){De(o);const V=Array.from(arguments),L=[],te=[];function le(M){L.push(M)}function xe(M){te.push(M)}ve(p,{args:V,name:v[yt],store:w,after:le,onError:xe});let Z;try{Z=E.apply(this&&this.$id===e?this:w,V)}catch(M){throw ve(te,M),M}return Z instanceof Promise?Z.then(M=>(ve(L,M),M)).catch(M=>(ve(te,M),Promise.reject(M))):(ve(L,Z),Z)};return v[$n]=!0,v[yt]=g,v},O=r.markRaw({actions:{},getters:{},state:[],hotState:b}),C={_p:o,$id:e,$onAction:Nn.bind(null,p),$patch:_,$reset:x,$subscribe(E,g={}){const v=Nn(d,E,g.detached,()=>V()),V=i.run(()=>r.watch(()=>o.state.value[e],L=>{(g.flush==="sync"?f:u)&&E({storeId:e,type:ne.direct,events:h},L)},Y({},l,g)));return v},$dispose:I},w=r.reactive(process.env.NODE_ENV!=="production"||process.env.NODE_ENV!=="production"&&process.env.NODE_ENV!=="test"&&ue?Y({_hmrPayload:O,_customProperties:r.markRaw(new Set)},C):C);o._s.set(e,w);const j=(o._a&&o._a.runWithContext||Xr)(()=>o._e.run(()=>(i=r.effectScope()).run(()=>t({action:B}))));for(const E in j){const g=j[E];if(r.isRef(g)&&!On(g)||r.isReactive(g))process.env.NODE_ENV!=="production"&&s?qe(b.value,E,r.toRef(j,E)):a||(m&&es(g)&&(r.isRef(g)?g.value=m[E]:wt(g,m[E])),o.state.value[e][E]=g),process.env.NODE_ENV!=="production"&&O.state.push(E);else if(typeof g=="function"){const v=process.env.NODE_ENV!=="production"&&s?g:B(g,E);j[E]=v,process.env.NODE_ENV!=="production"&&(O.actions[E]=g),c.actions[E]=g}else process.env.NODE_ENV!=="production"&&On(g)&&(O.getters[E]=a?n.getters[E]:g,ue&&(j._getters||(j._getters=r.markRaw([]))).push(E))}if(Y(w,j),Y(r.toRaw(w),j),Object.defineProperty(w,"$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");_(g=>{Y(g,E)})}}),process.env.NODE_ENV!=="production"&&(w._hotUpdate=r.markRaw(E=>{w._hotUpdating=!0,E._hmrPayload.state.forEach(g=>{if(g in w.$state){const v=E.$state[g],V=w.$state[g];typeof v=="object"&&me(v)&&me(V)?_n(v,V):E.$state[g]=V}qe(w,g,r.toRef(E.$state,g))}),Object.keys(w.$state).forEach(g=>{g in E.$state||pt(w,g)}),u=!1,f=!1,o.state.value[e]=r.toRef(E._hmrPayload,"hotState"),f=!0,r.nextTick().then(()=>{u=!0});for(const g in E._hmrPayload.actions){const v=E[g];qe(w,g,B(v,g))}for(const g in E._hmrPayload.getters){const v=E._hmrPayload.getters[g],V=a?r.computed(()=>(De(o),v.call(w,w))):v;qe(w,g,V)}Object.keys(w._hmrPayload.getters).forEach(g=>{g in E._hmrPayload.getters||pt(w,g)}),Object.keys(w._hmrPayload.actions).forEach(g=>{g in E._hmrPayload.actions||pt(w,g)}),w._hmrPayload=E._hmrPayload,w._getters=E._getters,w._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(g=>{Object.defineProperty(w,g,Y({value:w[g]},E))})}return o._p.forEach(E=>{if(process.env.NODE_ENV!=="production"&&process.env.NODE_ENV!=="test"&&ue){const g=i.run(()=>E({store:w,app:o._a,pinia:o,options:c}));Object.keys(g||{}).forEach(v=>w._customProperties.add(v)),Y(w,g)}else Y(w,i.run(()=>E({store:w,app:o._a,pinia:o,options:c})))}),process.env.NODE_ENV!=="production"&&w.$state&&typeof w.$state=="object"&&typeof w.$state.constructor=="function"&&!w.$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 "${w.$id}".`),m&&a&&n.hydrate&&n.hydrate(w.$state,m),
|
|
9
|
+
Found in store "${w.$id}".`),m&&a&&n.hydrate&&n.hydrate(w.$state,m),u=!0,f=!0,w}/*! #__NO_SIDE_EFFECTS__ */function ts(e,t,n){let o,s;const a=typeof t=="function";o=e,s=a?n:t;function i(c,l){const u=r.hasInjectionContext();if(c=(process.env.NODE_ENV==="test"&&Ve&&Ve._testing?null:c)||(u?r.inject(dn,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=
|
|
11
|
+
This will fail in production.`);c=Ve,c._s.has(o)||(a?bt(o,t,s,c):Sn(o,s,c),process.env.NODE_ENV!=="production"&&(i._pinia=c));const f=c._s.get(o);if(process.env.NODE_ENV!=="production"&&l){const d="__hot:"+o,p=a?bt(d,t,s,c,!0):Sn(d,Y({},s),c,!0);l._hotUpdate(p),delete c.state.value[d],c._s.delete(d)}if(process.env.NODE_ENV!=="production"&&ue){const d=r.getCurrentInstance();if(d&&d.proxy&&!l){const p=d.proxy,h="_pStores"in p?p._pStores:p._pStores={};h[o]=f}}return f}return i.$id=o,i}const ns=ts("data",()=>{const e=r.ref([]),t=r.ref({});return{records:e,record:t}});function xn(e){e||(e=r.inject("$registry"));const t=ns(),n=r.ref(new Or(e,t)),o=r.ref(!1);return r.onBeforeMount(async()=>{var s,a;const i=e.router.currentRoute.value,c=(s=i.params.records)==null?void 0:s.toString().toLowerCase(),l=(a=i.params.record)==null?void 0:a.toString().toLowerCase();if(!c&&!l)return;const u=await e.getMeta(c);e.addDoctype(u),n.value.setup(u),c&&(l?await n.value.getRecord(u,l):await n.value.getRecords(u)),n.value.runAction(u,"LOAD",l?[l]:void 0),o.value=!0}),{stonecrop:n,isReady:o}}K(class lt{constructor(t,n){if(K(this,"name"),K(this,"router"),K(this,"registry"),K(this,"getMeta"),lt._root)return lt._root;lt._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)||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
|
|
15
|
+
*/const re=typeof document<"u";function Cn(e){return typeof e=="object"||"displayName"in e||"props"in e||"__vccOpts"in e}function os(e){return e.__esModule||e[Symbol.toStringTag]==="Module"||e.default&&Cn(e.default)}const A=Object.assign;function vt(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 Pn=/#/g,rs=/&/g,ss=/\//g,as=/=/g,is=/\?/g,Vn=/\+/g,cs=/%5B/g,ls=/%5D/g,Dn=/%5E/g,us=/%60/g,In=/%7B/g,ds=/%7C/g,Rn=/%7D/g,ps=/%20/g;function Et(e){return encodeURI(""+e).replace(ds,"|").replace(cs,"[").replace(ls,"]")}function fs(e){return Et(e).replace(In,"{").replace(Rn,"}").replace(Dn,"^")}function _t(e){return Et(e).replace(Vn,"%2B").replace(ps,"+").replace(Pn,"%23").replace(rs,"%26").replace(us,"`").replace(In,"{").replace(Rn,"}").replace(Dn,"^")}function hs(e){return _t(e).replace(as,"%3D")}function ms(e){return Et(e).replace(Pn,"%23").replace(is,"%3F")}function gs(e){return e==null?"":ms(e).replace(ss,"%2F")}function Ee(e){try{return decodeURIComponent(""+e)}catch{process.env.NODE_ENV!=="production"&&P(`Error decoding "${e}". Using original value`)}return""+e}const ys=/\/$/,ws=e=>e.replace(ys,"");function kt(e,t,n="/"){let o,s={},a="",i="";const c=t.indexOf("#");let l=t.indexOf("?");return c<l&&c>=0&&(l=-1),l>-1&&(o=t.slice(0,l),a=t.slice(l+1,c>-1?c:t.length),s=e(a)),c>-1&&(o=o||t.slice(0,c),i=t.slice(c,t.length)),o=Es(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 An(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||"/"}function Tn(e,t,n){const o=t.matched.length-1,s=n.matched.length-1;return o>-1&&o===s&&pe(t.matched[o],n.matched[s])&&jn(t.params,n.params)&&e(t.query)===e(n.query)&&t.hash===n.hash}function pe(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function jn(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(!vs(e[n],t[n]))return!1;return!0}function vs(e,t){return G(e)?Bn(e,t):G(t)?Bn(t,e):e===t}function Bn(e,t){return G(t)?e.length===t.length&&e.every((n,o)=>n===t[o]):e.length===1&&e[0]===t}function Es(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 fe={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 _s(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),ws(e)}const ks=/^[^#]+#/;function Ns(e,t){return e.replace(ks,"#")+t}function $s(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 Os(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=$s(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 Ln(e,t){return(history.state?history.state.position-t:-1)+e}const Nt=new Map;function Ss(e,t){Nt.set(e,t)}function xs(e){const t=Nt.get(e);return Nt.delete(e),t}let Cs=()=>location.protocol+"//"+location.host;function Mn(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),An(c,"")}return An(n,e)+o+s}function Ps(e,t,n,o){let s=[],a=[],i=null;const c=({state:p})=>{const h=Mn(e,location),m=n.value,b=t.value;let N=0;if(p){if(n.value=h,t.value=p,i&&i===m){i=null;return}N=b?p.position-b.position:0}else o(h);s.forEach(_=>{_(n.value,m,{delta:N,type:Re.pop,direction:N?N>0?Ae.forward:Ae.back:Ae.unknown})})};function l(){i=n.value}function u(p){s.push(p);const h=()=>{const m=s.indexOf(p);m>-1&&s.splice(m,1)};return a.push(h),h}function f(){const{history:p}=window;p.state&&p.replaceState(A({},p.state,{scroll:Xe()}),"")}function d(){for(const p of a)p();a=[],window.removeEventListener("popstate",c),window.removeEventListener("beforeunload",f)}return window.addEventListener("popstate",c),window.addEventListener("beforeunload",f,{passive:!0}),{pauseListeners:l,listen:u,destroy:d}}function Wn(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 Vs(e){const{history:t,location:n}=window,o={value:Mn(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(l,u,f){const d=e.indexOf("#"),p=d>-1?(n.host&&document.querySelector("base")?e:e.slice(d))+l:Cs()+e+l;try{t[f?"replaceState":"pushState"](u,"",p),s.value=u}catch(h){process.env.NODE_ENV!=="production"?P("Error with push/replace State",h):console.error(h),n[f?"replace":"assign"](p)}}function i(l,u){const f=A({},t.state,Wn(s.value.back,l,s.value.forward,!0),u,{position:s.value.position});a(l,f,!0),o.value=l}function c(l,u){const f=A({},s.value,t.state,{forward:l,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(
|
|
19
|
+
You can find more information at https://router.vuejs.org/guide/migration/#Usage-of-history-state`),a(f.current,f,!0);const d=A({},Wn(o.value,l,null),{position:f.position+1},u);a(l,d,!1),o.value=l}return{location:o,state:s,push:c,replace:i}}function Ds(e){e=_s(e);const t=Vs(e),n=Ps(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:Ns.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 Un(e){return typeof e=="string"||typeof e=="symbol"}const $t=Symbol(process.env.NODE_ENV!=="production"?"navigation failure":"");var Fn;(function(e){e[e.aborted=4]="aborted",e[e.cancelled=8]="cancelled",e[e.duplicated=16]="duplicated"})(Fn||(Fn={}));const Is={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(x=
|
|
22
|
+
`+JSON.stringify(t):""}`},2({from:e,to:t}){return`Redirected from "${e.fullPath}" to "${As(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(Is[e](t)),{type:e,[$t]:!0},t):A(new Error,{type:e,[$t]:!0},t)}function se(e,t){return e instanceof Error&&$t in e&&(t==null||!!(e.type&t))}const Rs=["params","query","hash"];function As(e){if(typeof e=="string")return e;if(e.path!=null)return e.path;const t={};for(const n of Rs)n in e&&(t[n]=e[n]);return JSON.stringify(t,null,2)}const Hn="[^/]+?",Ts={sensitive:!1,strict:!1,start:!0,end:!0},js=/[.+*?^${}()[\]/\\]/g;function Bs(e,t){const n=A({},Ts,t),o=[];let s=n.start?"^":"";const a=[];for(const u of e){const f=u.length?[]:[90];n.strict&&!u.length&&(s+="/");for(let d=0;d<u.length;d++){const p=u[d];let h=40+(n.sensitive?.25:0);if(p.type===0)d||(s+="/"),s+=p.value.replace(js,"\\$&"),h+=40;else if(p.type===1){const{value:m,repeatable:b,optional:N,regexp:_}=p;a.push({name:m,repeatable:b,optional:N});const x=_||Hn;if(x!==Hn){h+=10;try{new RegExp(`(${x})`)}catch(B){throw new Error(`Invalid custom RegExp for param "${m}" (${x}): `+B.message)}}let I=b?`((?:${x})(?:/(?:${x}))*)`:`(${x})`;d||(I=N&&u.length<2?`(?:/${I})`:"/"+I),N&&(I+="?"),s+=I,h+=20,N&&(h+=-8),b&&(h+=-20),x===".*"&&(h+=-50)}f.push(h)}o.push(f)}if(n.strict&&n.end){const u=o.length-1;o[u][o[u].length-1]+=.7000000000000001}n.strict||(s+="/?"),n.end?s+="$":n.strict&&!s.endsWith("/")&&(s+="(?:/|$)");const i=new RegExp(s,n.sensitive?"":"i");function c(u){const f=u.match(i),d={};if(!f)return null;for(let p=1;p<f.length;p++){const h=f[p]||"",m=a[p-1];d[m.name]=h&&m.repeatable?h.split("/"):h}return d}function l(u){let f="",d=!1;for(const p of e){(!d||!f.endsWith("/"))&&(f+="/"),d=!1;for(const h of p)if(h.type===0)f+=h.value;else if(h.type===1){const{value:m,repeatable:b,optional:N}=h,_=m in u?u[m]:"";if(G(_)&&!b)throw new Error(`Provided param "${m}" is an array but it is not repeatable (* or + modifiers)`);const x=G(_)?_.join("/"):_;if(!x)if(N)p.length<2&&(f.endsWith("/")?f=f.slice(0,-1):d=!0);else throw new Error(`Missing required param "${m}"`);f+=x}}return f||"/"}return{re:i,score:o,keys:a,parse:c,stringify:l}}function Ls(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 zn(e,t){let n=0;const o=e.score,s=t.score;for(;n<o.length&&n<s.length;){const a=Ls(o[n],s[n]);if(a)return a;n++}if(Math.abs(s.length-o.length)===1){if(qn(o))return 1;if(qn(s))return-1}return s.length-o.length}function qn(e){const t=e[e.length-1];return e.length>0&&t[t.length-1]<0}const Ms={type:0,value:""},Ws=/[a-zA-Z0-9_]/;function Us(e){if(!e)return[[]];if(e==="/")return[[Ms]];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})/"${u}": ${h}`)}let n=0,o=n;const s=[];let a;function i(){a&&s.push(a),a=[]}let c=0,l,u="",f="";function d(){u&&(n===0?a.push({type:0,value:u}):n===1||n===2||n===3?(a.length>1&&(l==="*"||l==="+")&&t(`A repeatable param (${u}) must be alone in its segment. eg: '/:ids+.`),a.push({type:1,value:u,regexp:f,repeatable:l==="*"||l==="+",optional:l==="*"||l==="?"})):t("Invalid state to consume buffer"),u="")}function p(){u+=l}for(;c<e.length;){if(l=e[c++],l==="\\"&&n!==2){o=n,n=4;continue}switch(n){case 0:l==="/"?(u&&d(),i()):l===":"?(d(),n=1):p();break;case 4:p(),n=o;break;case 1:l==="("?n=2:Ws.test(l)?p():(d(),n=0,l!=="*"&&l!=="?"&&l!=="+"&&c--);break;case 2:l===")"?f[f.length-1]=="\\"?f=f.slice(0,-1)+l:n=3:f+=l;break;case 3:d(),n=0,l!=="*"&&l!=="?"&&l!=="+"&&c--,f="";break;default:t("Unknown state");break}}return n===2&&t(`Unfinished custom RegExp for param "${u}"`),d(),i(),s}function Fs(e,t,n){const o=Bs(Us(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 Hs(e,t){const n=[],o=new Map;t=Yn({strict:!1,end:!0,sensitive:!1},t);function s(d){return o.get(d)}function a(d,p,h){const m=!h,b=Jn(d);process.env.NODE_ENV!=="production"&&Js(b,p),b.aliasOf=h&&h.record;const N=Yn(t,d),_=[b];if("alias"in d){const B=typeof d.alias=="string"?[d.alias]:d.alias;for(const O of B)_.push(Jn(A({},b,{components:h?h.record.components:b.components,path:O,aliasOf:h?h.record:b})))}let x,I;for(const B of _){const{path:O}=B;if(p&&O[0]!=="/"){const C=p.record.path,w=C[C.length-1]==="/"?"":"/";B.path=p.record.path+(O&&w+O)}if(process.env.NODE_ENV!=="production"&&B.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(x=Fs(B,p,N),process.env.NODE_ENV!=="production"&&p&&O[0]==="/"&&Ys(x,p),h?(h.alias.push(x),process.env.NODE_ENV!=="production"&&Gs(h,x)):(I=I||x,I!==x&&I.alias.push(x),m&&d.name&&!Kn(x)&&(process.env.NODE_ENV!=="production"&&Ks(d,p),i(d.name))),Qn(x)&&l(x),b.children){const C=b.children;for(let w=0;w<C.length;w++)a(C[w],x,h&&h.children[w])}h=h||x}return I?()=>{i(I)}:Ie}function i(d){if(Un(d)){const p=o.get(d);p&&(o.delete(d),n.splice(n.indexOf(p),1),p.children.forEach(i),p.alias.forEach(i))}else{const p=n.indexOf(d);p>-1&&(n.splice(p,1),d.record.name&&o.delete(d.record.name),d.children.forEach(i),d.alias.forEach(i))}}function c(){return n}function l(d){const p=Qs(d,n);n.splice(p,0,d),d.record.name&&!Kn(d)&&o.set(d.record.name,d)}function u(d,p){let h,m={},b,N;if("name"in d&&d.name){if(h=o.get(d.name),!h)throw _e(1,{location:d});if(process.env.NODE_ENV!=="production"){const I=Object.keys(d.params||{}).filter(B=>!h.keys.find(O=>O.name===B));I.length&&P(`Discarded invalid param(s) "${I.join('", "')}" when navigating. See https://github.com/vuejs/router/blob/main/packages/router/CHANGELOG.md#414-2022-08-22 for more details.`)}N=h.record.name,m=A(Gn(p.params,h.keys.filter(I=>!I.optional).concat(h.parent?h.parent.keys.filter(I=>I.optional):[]).map(I=>I.name)),d.params&&Gn(d.params,h.keys.map(I=>I.name))),b=h.stringify(m)}else if(d.path!=null)b=d.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(I=>I.re.test(b)),h&&(m=h.parse(b),N=h.record.name);else{if(h=p.name?o.get(p.name):n.find(I=>I.re.test(p.path)),!h)throw _e(1,{location:d,currentLocation:p});N=h.record.name,m=A({},p.params,d.params),b=h.stringify(m)}const _=[];let x=h;for(;x;)_.unshift(x.record),x=x.parent;return{name:N,path:b,params:m,matched:_,meta:qs(_)}}e.forEach(d=>a(d));function f(){n.length=0,o.clear()}return{addRoute:a,resolve:u,removeRoute:i,clearRoutes:f,getRoutes:c,getRecordMatcher:s}}function Gn(e,t){const n={};for(const o of t)o in e&&(n[o]=e[o]);return n}function Jn(e){const t={path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:e.aliasOf,beforeEnter:e.beforeEnter,props:zs(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 zs(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 Kn(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function qs(e){return e.reduce((t,n)=>A(t,n.meta),{})}function Yn(e,t){const n={};for(const o in e)n[o]=o in t?t[o]:e[o];return n}function Ot(e,t){return e.name===t.name&&e.optional===t.optional&&e.repeatable===t.repeatable}function Gs(e,t){for(const n of e.keys)if(!n.optional&&!t.keys.find(Ot.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(Ot.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 Js(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 Ks(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 Ys(e,t){for(const n of t.keys)if(!e.keys.find(Ot.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 Qs(e,t){let n=0,o=t.length;for(;n!==o;){const a=n+o>>1;zn(e,t[a])<0?o=a:n=a+1}const s=Xs(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 Xs(e){let t=e;for(;t=t.parent;)if(Qn(t)&&zn(e,t)===0)return t}function Qn({record:e}){return!!(e.name||e.components&&Object.keys(e.components).length||e.redirect)}function Zs(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(Vn," "),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 l=t[i];G(l)||(l=t[i]=[l]),l.push(c)}else t[i]=c}return t}function Xn(e){let t="";for(let n in e){const o=e[n];if(n=hs(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 ea(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 ta=Symbol(process.env.NODE_ENV!=="production"?"router view location matched":""),Zn=Symbol(process.env.NODE_ENV!=="production"?"router view depth":""),St=Symbol(process.env.NODE_ENV!=="production"?"router":""),eo=Symbol(process.env.NODE_ENV!=="production"?"route location":""),xt=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,l)=>{const u=p=>{p===!1?l(_e(4,{from:n,to:t})):p instanceof Error?l(p):Ze(p)?l(_e(2,{from:t,to:p})):(i&&o.enterCallbacks[s]===i&&typeof p=="function"&&i.push(p),c())},f=a(()=>e.call(o&&o.instances[s],t,n,process.env.NODE_ENV!=="production"?na(u,t,n):u));let d=Promise.resolve(f);if(e.length<3&&(d=d.then(u)),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
|
|
26
|
-
- to:`,
|
|
25
|
+
. If you are returning a value instead of calling "next", make sure to remove the "next" parameter from your function.`;if(typeof f=="object"&&"then"in f)d=d.then(h=>u._called?h:(P(p),Promise.reject(new Error("Invalid navigation guard"))));else if(f!==void 0&&!u._called){P(p),l(new Error("Invalid navigation guard"));return}}d.catch(p=>l(p))})}function na(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 Ct(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 l=i.components[c];if(process.env.NODE_ENV!=="production"){if(!l||typeof l!="object"&&typeof l!="function")throw P(`Component "${c}" in record with path "${i.path}" is not a valid component. Received "${String(l)}".`),new Error("Invalid route component");if("then"in l){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 u=l;l=()=>u}else l.__asyncLoader&&!l.__warnedDefineAsync&&(l.__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(Cn(l)){const u=(l.__vccOpts||l)[t];u&&a.push(he(u,n,o,i,c,s))}else{let u=l();process.env.NODE_ENV!=="production"&&!("catch"in u)&&(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.`),u=Promise.resolve(u)),a.push(()=>u.then(f=>{if(!f)throw new Error(`Couldn't resolve component "${c}" at "${i.path}"`);const d=os(f)?f.default:f;i.mods[c]=f,i.components[c]=d;const p=(d.__vccOpts||d)[t];return p&&he(p,n,o,i,c,s)()}))}}}return a}function to(e){const t=r.inject(St),n=r.inject(eo);let o=!1,s=null;const a=r.computed(()=>{const f=r.unref(e.to);return process.env.NODE_ENV!=="production"&&(!o||f!==s)&&(Ze(f)||(o?P(`Invalid value for prop "to" in useLink()
|
|
26
|
+
- to:`,f,`
|
|
27
27
|
- previous to:`,s,`
|
|
28
28
|
- props:`,e):P(`Invalid value for prop "to" in useLink()
|
|
29
|
-
- to:`,
|
|
30
|
-
- props:`,e)),s=
|
|
29
|
+
- to:`,f,`
|
|
30
|
+
- props:`,e)),s=f,o=!0),t.resolve(f)}),i=r.computed(()=>{const{matched:f}=a.value,{length:d}=f,p=f[d-1],h=n.matched;if(!p||!h.length)return-1;const m=h.findIndex(pe.bind(null,p));if(m>-1)return m;const b=no(f[d-2]);return d>1&&no(p)===b&&h[h.length-1].path!==b?h.findIndex(pe.bind(null,f[d-2])):m}),c=r.computed(()=>i.value>-1&&ia(n.params,a.value.params)),l=r.computed(()=>i.value>-1&&i.value===n.matched.length-1&&jn(n.params,a.value.params));function u(f={}){if(aa(f)){const d=t[r.unref(e.replace)?"replace":"push"](r.unref(e.to)).catch(Ie);return e.viewTransition&&typeof document<"u"&&"startViewTransition"in document&&document.startViewTransition(()=>d),d}return Promise.resolve()}if(process.env.NODE_ENV!=="production"&&re){const f=r.getCurrentInstance();if(f){const d={route:a.value,isActive:c.value,isExactActive:l.value,error:null};f.__vrl_devtools=f.__vrl_devtools||[],f.__vrl_devtools.push(d),r.watchEffect(()=>{d.route=a.value,d.isActive=c.value,d.isExactActive=l.value,d.error=Ze(r.unref(e.to))?null:'Invalid "to" value'},{flush:"post"})}}return{route:a,href:r.computed(()=>a.value.href),isActive:c,isExactActive:l,navigate:u}}function oa(e){return e.length===1?e[0]:e}const ra=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:to,setup(e,{slots:t}){const n=r.reactive(to(e)),{options:o}=r.inject(St),s=r.computed(()=>({[oo(e.activeClass,o.linkActiveClass,"router-link-active")]:n.isActive,[oo(e.exactActiveClass,o.linkExactActiveClass,"router-link-exact-active")]:n.isExactActive}));return()=>{const a=t.default&&oa(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)}}}),sa=ra;function aa(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 ia(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 no(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}const oo=(e,t,n)=>e??t??n,ca=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"&&ua();const o=r.inject(xt),s=r.computed(()=>e.route||o.value),a=r.inject(Zn,0),i=r.computed(()=>{let u=r.unref(a);const{matched:f}=s.value;let d;for(;(d=f[u])&&!d.components;)u++;return u}),c=r.computed(()=>s.value.matched[i.value]);r.provide(Zn,r.computed(()=>i.value+1)),r.provide(ta,c),r.provide(xt,s);const l=r.ref();return r.watch(()=>[l.value,c.value,e.name],([u,f,d],[p,h,m])=>{f&&(f.instances[d]=u,h&&h!==f&&u&&u===p&&(f.leaveGuards.size||(f.leaveGuards=h.leaveGuards),f.updateGuards.size||(f.updateGuards=h.updateGuards))),u&&f&&(!h||!pe(f,h)||!p)&&(f.enterCallbacks[d]||[]).forEach(b=>b(u))},{flush:"post"}),()=>{const u=s.value,f=e.name,d=c.value,p=d&&d.components[f];if(!p)return ro(n.default,{Component:p,route:u});const h=d.props[f],m=h?h===!0?u.params:typeof h=="function"?h(u):h:null,b=r.h(p,A({},m,t,{onVnodeUnmounted:N=>{N.component.isUnmounted&&(d.instances[f]=null)},ref:l}));if(process.env.NODE_ENV!=="production"&&re&&b.ref){const N={depth:i.value,name:d.name,path:d.path,meta:d.meta};(G(b.ref)?b.ref.map(_=>_.i):[b.ref.i]).forEach(_=>{_.__vrv_devtools=N})}return ro(n.default,{Component:b,route:u})||b}}});function ro(e,t){if(!e)return null;const n=e(t);return n.length===1?n[0]:n}const la=ca;function ua(){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
|
|
38
|
-
- Location:`,y),
|
|
37
|
+
</router-view>`)}}function je(e,t){const n=A({},e,{matched:e.matched.map(o=>Ea(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 da=0;function pa(e,t,n){if(t.__hasDevtools)return;t.__hasDevtools=!0;const o=da++;ht({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((f,d)=>{f.instanceData&&f.instanceData.state.push({type:"Routing",key:"$route",editable:!1,value:je(t.currentRoute.value,"Current Route")})}),s.on.visitComponentTree(({treeNode:f,componentInstance:d})=>{if(d.__vrv_devtools){const p=d.__vrv_devtools;f.tags.push({label:(p.name?`${p.name.toString()}: `:"")+p.path,textColor:0,tooltip:"This component is rendered by <router-view>",backgroundColor:so})}G(d.__vrl_devtools)&&(d.__devtoolsApi=s,d.__vrl_devtools.forEach(p=>{let h=p.route.path,m=co,b="",N=0;p.error?(h=p.error,m=ya,N=wa):p.isExactActive?(m=io,b="This is exactly active"):p.isActive&&(m=ao,b="This link is active"),f.tags.push({label:h,textColor:N,tooltip:b,backgroundColor:m})}))}),r.watch(t.currentRoute,()=>{l(),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((f,d)=>{s.addTimelineEvent({layerId:a,event:{title:"Error during Navigation",subtitle:d.fullPath,logType:"error",time:s.now(),data:{error:f},groupId:d.meta.__navigationId}})});let i=0;t.beforeEach((f,d)=>{const p={guard:et("beforeEach"),from:je(d,"Current Location during this navigation"),to:je(f,"Target location")};Object.defineProperty(f.meta,"__navigationId",{value:i++}),s.addTimelineEvent({layerId:a,event:{time:s.now(),title:"Start of navigation",subtitle:f.fullPath,data:p,groupId:f.meta.__navigationId}})}),t.afterEach((f,d,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(d,"Current Location during this navigation"),h.to=je(f,"Target location"),s.addTimelineEvent({layerId:a,event:{title:"End of navigation",subtitle:f.fullPath,time:s.now(),data:h,logType:p?"warning":"default",groupId:f.meta.__navigationId}})});const c="router-inspector:"+o;s.addInspector({id:c,label:"Routes"+(o?" "+o:""),icon:"book",treeFilterPlaceholder:"Search routes"});function l(){if(!u)return;const f=u;let d=n.getRoutes().filter(p=>!p.parent||!p.parent.record.components);d.forEach(po),f.filter&&(d=d.filter(p=>Pt(p,f.filter.toLowerCase()))),d.forEach(p=>uo(p,t.currentRoute.value)),f.rootNodes=d.map(lo)}let u;s.on.getInspectorTree(f=>{u=f,f.app===e&&f.inspectorId===c&&l()}),s.on.getInspectorState(f=>{if(f.app===e&&f.inspectorId===c){const d=n.getRoutes().find(p=>p.record.__vd_id===f.nodeId);d&&(f.state={options:ha(d)})}}),s.sendInspectorTree(c),s.sendInspectorState(c)})}function fa(e){return e.optional?e.repeatable?"*":"?":e.repeatable?"+":""}function ha(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}${fa(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 so=15485081,ao=2450411,io=8702998,ma=2282478,co=16486972,ga=6710886,ya=16704226,wa=12131356;function lo(e){const t=[],{record:n}=e;n.name!=null&&t.push({label:String(n.name),textColor:0,backgroundColor:ma}),n.aliasOf&&t.push({label:"alias",textColor:0,backgroundColor:co}),e.__vd_match&&t.push({label:"matches",textColor:0,backgroundColor:so}),e.__vd_exactActive&&t.push({label:"exact",textColor:0,backgroundColor:io}),e.__vd_active&&t.push({label:"active",textColor:0,backgroundColor:ao}),n.redirect&&t.push({label:typeof n.redirect=="string"?`redirect: ${n.redirect}`:"redirects",textColor:16777215,backgroundColor:ga});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(lo)}}let ba=0;const va=/^\/(.*)\/([a-z]*)$/;function uo(e,t){const n=t.matched.length&&pe(t.matched[t.matched.length-1],e.record);e.__vd_exactActive=e.__vd_active=n,n||(e.__vd_active=t.matched.some(o=>pe(o,e.record))),e.children.forEach(o=>uo(o,t))}function po(e){e.__vd_match=!1,e.children.forEach(po)}function Pt(e,t){const n=String(e.re).match(va);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=>Pt(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=>Pt(a,t))}function Ea(e,t){const n={};for(const o in e)t.includes(o)||(n[o]=e[o]);return n}function _a(e){const t=Hs(e.routes,e),n=e.parseQuery||Zs,o=e.stringifyQuery||Xn,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(),l=r.shallowRef(fe);let u=fe;re&&e.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const f=vt.bind(null,y=>""+y),d=vt.bind(null,gs),p=vt.bind(null,Ee);function h(y,$){let k,S;return Un(y)?(k=t.getRecordMatcher(y),process.env.NODE_ENV!=="production"&&!k&&P(`Parent route "${String(y)}" not found when adding child route`,$),S=$):S=y,t.addRoute(S,k)}function m(y){const $=t.getRecordMatcher(y);$?t.removeRoute($):process.env.NODE_ENV!=="production"&&P(`Cannot remove non-existent route "${String(y)}"`)}function b(){return t.getRoutes().map(y=>y.record)}function N(y){return!!t.getRecordMatcher(y)}function _(y,$){if($=A({},$||l.value),typeof y=="string"){const D=kt(n,y,$.path),W=t.resolve({path:D.path},$),we=s.createHref(D.fullPath);return process.env.NODE_ENV!=="production"&&(we.startsWith("//")?P(`Location "${y}" resolved to "${we}". A resolved location cannot start with multiple slashes.`):W.matched.length||P(`No match found for location with path "${y}"`)),A(D,W,{params:p(W.params),hash:Ee(D.hash),redirectedFrom:void 0,href:we})}if(process.env.NODE_ENV!=="production"&&!Ze(y))return P(`router.resolve() was passed an invalid location. This will fail in production.
|
|
38
|
+
- Location:`,y),_({});let k;if(y.path!=null)process.env.NODE_ENV!=="production"&&"params"in y&&!("name"in y)&&Object.keys(y.params).length&&P(`Path "${y.path}" was passed with params but they will be ignored. Use a named route alongside params instead.`),k=A({},y,{path:kt(n,y.path,$.path).path});else{const D=A({},y.params);for(const W in D)D[W]==null&&delete D[W];k=A({},y,{params:d(D)}),$.params=d($.params)}const S=t.resolve(k,$),T=y.hash||"";process.env.NODE_ENV!=="production"&&T&&!T.startsWith("#")&&P(`A \`hash\` should always start with the character "#". Replace "${T}" with "#${T}".`),S.params=f(p(S.params));const U=bs(o,A({},y,{hash:fs(T),path:S.path})),R=s.createHref(U);return process.env.NODE_ENV!=="production"&&(R.startsWith("//")?P(`Location "${y}" resolved to "${R}". A resolved location cannot start with multiple slashes.`):S.matched.length||P(`No match found for location with path "${y.path!=null?y.path:y}"`)),A({fullPath:U,hash:T,query:o===Xn?ea(y.query):y.query||{}},S,{redirectedFrom:void 0,href:R})}function x(y){return typeof y=="string"?kt(n,y,l.value.path):A({},y)}function I(y,$){if(u!==y)return _e(8,{from:$,to:y})}function B(y){return w(y)}function O(y){return B(A(x(y),{replace:!0}))}function C(y){const $=y.matched[y.matched.length-1];if($&&$.redirect){const{redirect:k}=$;let S=typeof k=="function"?k(y):k;if(typeof S=="string"&&(S=S.includes("?")||S.includes("#")?S=x(S):{path:S},S.params={}),process.env.NODE_ENV!=="production"&&S.path==null&&!("name"in S))throw P(`Invalid redirect found:
|
|
39
39
|
${JSON.stringify(S,null,2)}
|
|
40
|
-
when navigating to "${y.fullPath}". A redirect must contain a name or path. This will break in production.`),new Error("Invalid redirect");return A({query:y.query,hash:y.hash,params:S.path!=null?{}:y.params},S)}}function w(y
|
|
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"))):w(A({replace:R},x(H.to),{state:typeof H.to=="object"?A({},T,H.to.state):T,force:U}),k||W)}else H=V(W,S,!0,R,T);return b(W,S,H),H})}function j(y,k){const _=I(y,k);return _?Promise.reject(_):Promise.resolve()}function v(y){const k=it.values().next().value;return k&&typeof k.runWithContext=="function"?k.runWithContext(y):y()}function g(y,k){let _;const[S,T,U]=$a(y,k);_=Ct(S.reverse(),"beforeRouteLeave",y,k);for(const D of S)D.leaveGuards.forEach(W=>{_.push(fe(W,y,k))});const R=j.bind(null,y,k);return _.push(R),Se(_).then(()=>{_=[];for(const D of a.list())_.push(fe(D,y,k));return _.push(R),Se(_)}).then(()=>{_=Ct(T,"beforeRouteUpdate",y,k);for(const D of T)D.updateGuards.forEach(W=>{_.push(fe(W,y,k))});return _.push(R),Se(_)}).then(()=>{_=[];for(const D of U)if(D.beforeEnter)if(G(D.beforeEnter))for(const W of D.beforeEnter)_.push(fe(W,y,k));else _.push(fe(D.beforeEnter,y,k));return _.push(R),Se(_)}).then(()=>(y.matched.forEach(D=>D.enterCallbacks={}),_=Ct(U,"beforeRouteEnter",y,k,v),_.push(R),Se(_))).then(()=>{_=[];for(const D of i.list())_.push(fe(D,y,k));return _.push(R),Se(_)}).catch(D=>re(D,8)?D:Promise.reject(D))}function b(y,k,_){c.list().forEach(S=>v(()=>S(y,k,_)))}function V(y,k,_,S,T){const U=I(y,k);if(U)return U;const R=k===pe,D=oe?history.state:{};_&&(S||R?s.replace(y.fullPath,A({scroll:R&&D&&D.scroll},T)):s.push(y.fullPath,T)),l.value=y,lr(y,k,_,R),nn()}let L;function ee(){L||(L=s.listen((y,k,_)=>{const S=N(y),T=C(S);if(T){w(A(T,{replace:!0,force:!0}),S).catch(Ve);return}p=S;const U=l.value;oe&&Cs(Ln(U.fullPath,_.delta),Qe()),g(S,U).catch(R=>re(R,12)?R:re(R,2)?(w(A(x(R.to),{force:!0}),S).then(D=>{re(D,20)&&!_.delta&&_.type===De.pop&&s.go(-1,!1)}).catch(Ve),Promise.reject()):(_.delta&&s.go(-_.delta,!1),M(R,S,U))).then(R=>{R=R||V(S,U,!1),R&&(_.delta&&!re(R,8)?s.go(-_.delta,!1):_.type===De.pop&&re(R,20)&&s.go(-1,!1)),b(S,U,R)}).catch(Ve)}))}let ce=Re(),Oe=Re(),X;function M(y,k,_){nn(y);const S=Oe.list();return S.length?S.forEach(T=>T(y,k,_)):(process.env.NODE_ENV!=="production"&&P("uncaught error during route navigation:"),console.error(y)),Promise.reject(y)}function q(){return X&&l.value!==pe?Promise.resolve():new Promise((y,k)=>{ce.add([y,k])})}function nn(y){return X||(X=!y,ee(),ce.list().forEach(([k,_])=>y?_(y):k()),ce.reset()),y}function lr(y,k,_,S){const{scrollBehavior:T}=e;if(!oe||!T)return Promise.resolve();const U=!_&&Ps(Ln(y.fullPath,0))||(S||!_)&&history.state&&history.state.scroll||null;return r.nextTick().then(()=>T(y,k,U)).then(R=>R&&xs(R)).catch(R=>M(R,y,k))}const on=y=>s.go(y);let rn;const it=new Set,Wc={currentRoute:l,listening:!0,addRoute:h,removeRoute:m,clearRoutes:t.clearRoutes,hasRoute:O,getRoutes:E,resolve:N,options:e,push:B,replace:$,go:on,back:()=>on(-1),forward:()=>on(1),beforeEach:a.add,beforeResolve:i.add,afterEach:c.add,onError:Oe.add,isReady:q,install(y){const k=this;y.component("RouterLink",ia),y.component("RouterView",da),y.config.globalProperties.$router=k,Object.defineProperty(y.config.globalProperties,"$route",{enumerable:!0,get:()=>r.unref(l)}),oe&&!rn&&l.value===pe&&(rn=!0,B(s.location).catch(T=>{process.env.NODE_ENV!=="production"&&P("Unexpected error when starting the router:",T)}));const _={};for(const T in pe)Object.defineProperty(_,T,{get:()=>l.value[T],enumerable:!0});y.provide(St,k),y.provide(eo,r.shallowReactive(_)),y.provide(xt,l);const S=y.unmount;it.add(y),y.unmount=function(){it.delete(y),it.size<1&&(p=pe,L&&L(),L=null,l.value=pe,rn=!1,X=!1),S()},process.env.NODE_ENV!=="production"&&oe&&ha(y,k,t)}};function Se(y){return y.reduce((k,_)=>k.then(()=>v(_)),Promise.resolve())}return Wc}function $a(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(p=>de(p,c))?o.push(c):n.push(c));const l=e.matched[i];l&&(t.matched.find(p=>de(p,l))||s.push(l))}return[n,o,s]}Na({history:Rs(),routes:[]});function Oa(e){return e&&typeof e.then=="function"}Promise.resolve(!1),Promise.resolve(!0);var _e=Promise.resolve();function fo(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 Vt(){return Math.random().toString(36).substring(2)}var ho=0,Dt=0;function et(){var e=new Date().getTime();return e===ho?(Dt++,e*1e3+Dt):(ho=e,Dt=0,e*1e3)}var xa=et,Ca="native";function Pa(e){var t={messagesCallback:null,bc:new BroadcastChannel(e),subFns:[]};return t.bc.onmessage=function(n){t.messagesCallback&&t.messagesCallback(n.data)},t}function Va(e){e.bc.close(),e.subFns=[]}function Da(e,t){try{return e.bc.postMessage(t,!1),_e}catch(n){return Promise.reject(n)}}function Ia(e,t){e.messagesCallback=t}function Ra(){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 Aa(){return 150}var Ta={create:Pa,close:Va,onMessage:Ia,postMessage:Da,canBeUsed:Ra,type:Ca,averageResponseTime:Aa,microSeconds:xa},mo=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,go()),this._to||(this._to=!0,setTimeout(function(){n._to=!1,ja(n)},0))},e.prototype.clear=function(){this.map.clear()},e}();function ja(e){for(var t=go()-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 go(){return new Date().getTime()}function It(){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 Ba=et,La="pubkey.broadcast-channel-0-",se="messages",tt={durability:"relaxed"},Ma="idb";function yo(){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 Rt(e){e.commit&&e.commit()}function Wa(e){var t=yo(),n=La+e,o=t.open(n);return o.onupgradeneeded=function(s){var a=s.target.result;a.createObjectStore(se,{keyPath:"id",autoIncrement:!0})},new Promise(function(s,a){o.onerror=function(i){return a(i)},o.onsuccess=function(){s(o.result)}})}function Ua(e,t,n){var o=new Date().getTime(),s={uuid:t,time:o,data:n},a=e.transaction([se],"readwrite",tt);return new Promise(function(i,c){a.oncomplete=function(){return i()},a.onerror=function(p){return c(p)};var l=a.objectStore(se);l.add(s),Rt(a)})}function Fa(e,t){var n=e.transaction(se,"readonly",tt),o=n.objectStore(se),s=[],a=IDBKeyRange.bound(t+1,1/0);if(o.getAll){var i=o.getAll(a);return new Promise(function(l,p){i.onerror=function(d){return p(d)},i.onsuccess=function(d){l(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(l,p){var d=c();d.onerror=function(u){return p(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()):(Rt(n),l(s))}})}function za(e,t){if(e.closed)return Promise.resolve([]);var n=e.db.transaction(se,"readwrite",tt),o=n.objectStore(se);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(se,"readonly",tt),s=o.objectStore(se),a=[];return new Promise(function(i){s.openCursor().onsuccess=function(c){var l=c.target.result;if(l){var p=l.value;p.time<n?(a.push(p),l.continue()):(Rt(o),i(a))}else i(a)}})}function qa(e){return Ha(e.db,e.options.idb.ttl).then(function(t){return za(e,t.map(function(n){return n.id}))})}function Ga(e,t){return t=It(t),Wa(e).then(function(n){var o={closed:!1,lastCursorId:0,channelName:e,options:t,uuid:Vt(),eMIs:new mo(t.idb.ttl*2),writeBlockPromise:_e,messagesCallback:null,readQueuePromises:[],db:n};return n.onclose=function(){o.closed=!0,t.idb.onclose&&t.idb.onclose()},wo(o),o})}function wo(e){e.closed||bo(e).then(function(){return fo(e.options.idb.fallbackInterval)}).then(function(){return wo(e)})}function Ja(e,t){return!(e.uuid===t.uuid||t.eMIs.has(e.id)||e.data.time<t.messagesCallbackTime)}function bo(e){return e.closed||!e.messagesCallback?_e:Fa(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 Ja(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))}),_e})}function Ya(e){e.closed=!0,e.db.close()}function Ka(e,t){return e.writeBlockPromise=e.writeBlockPromise.then(function(){return Ua(e.db,e.uuid,t)}).then(function(){Sa(0,10)===0&&qa(e)}),e.writeBlockPromise}function Qa(e,t,n){e.messagesCallbackTime=n,e.messagesCallback=t,bo(e)}function Xa(){return!!yo()}function Za(e){return e.idb.fallbackInterval*2}var ei={create:Ga,close:Ya,onMessage:Qa,postMessage:Ka,canBeUsed:Xa,type:Ma,averageResponseTime:Za,microSeconds:Ba},ti=et,ni="pubkey.broadcastChannel-",oi="localstorage";function vo(){var e;if(typeof window>"u")return null;try{e=window.localStorage,e=window["ie8-eventlistener/storage"]||window.localStorage}catch{}return e}function Eo(e){return ni+e}function ri(e,t){return new Promise(function(n){fo().then(function(){var o=Eo(e.channelName),s={token:Vt(),time:new Date().getTime(),data:t,uuid:e.uuid},a=JSON.stringify(s);vo().setItem(o,a);var i=document.createEvent("Event");i.initEvent("storage",!0,!0),i.key=o,i.newValue=a,window.dispatchEvent(i),n()})})}function si(e,t){var n=Eo(e),o=function(s){s.key===n&&t(JSON.parse(s.newValue))};return window.addEventListener("storage",o),o}function ai(e){window.removeEventListener("storage",e)}function ii(e,t){if(t=It(t),!_o())throw new Error("BroadcastChannel: localstorage cannot be used");var n=Vt(),o=new mo(t.localstorage.removeTimeout),s={channelName:e,uuid:n,eMIs:o};return s.listener=si(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 ci(e){ai(e.listener)}function li(e,t,n){e.messagesCallbackTime=n,e.messagesCallback=t}function _o(){var e=vo();if(!e)return!1;try{var t="__broadcastchannel_check";e.setItem(t,"works"),e.removeItem(t)}catch{return!1}return!0}function ui(){var e=120,t=navigator.userAgent.toLowerCase();return t.includes("safari")&&!t.includes("chrome")?e*2:e}var di={create:ii,close:ci,onMessage:li,postMessage:ri,canBeUsed:_o,type:oi,averageResponseTime:ui,microSeconds:ti},pi=et,fi="simulate",At=new Set;function hi(e){var t={name:e,messagesCallback:null};return At.add(t),t}function mi(e){At.delete(e)}function gi(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 yi(e,t){e.messagesCallback=t}function wi(){return!0}function bi(){return 5}var vi={create:hi,close:mi,onMessage:yi,postMessage:gi,canBeUsed:wi,type:fi,averageResponseTime:bi,microSeconds:pi},ko=[Ta,ei,di];function Ei(e){var t=[].concat(e.methods,ko).filter(Boolean);if(e.type){if(e.type==="simulate")return vi;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(ko.map(function(s){return s.type})))}var No=new Set,_i=0,Tt=function(e,t){this.id=_i++,No.add(this),this.name=e,this.options=It(t),this.method=Ei(this.options),this._iL=!1,this._onML=null,this._addEL={message:[],internal:[]},this._uMP=new Set,this._befC=[],this._prepP=null,ki(this)};Tt._pubkey=!0,Tt.prototype={postMessage:function(e){if(this.closed)throw new Error("BroadcastChannel.postMessage(): Cannot post message after channel has closed "+JSON.stringify(e));return $o(this,"message",e)},postInternal:function(e){return $o(this,"internal",e)},set onmessage(e){var t=this.method.microSeconds(),n={time:t,fn:e};xo(this,"message",this._onML),e&&typeof e=="function"?(this._onML=n,So(this,"message",n)):this._onML=null},addEventListener:function(e,t){var n=this.method.microSeconds(),o={time:n,fn:t};So(this,e,o)},removeEventListener:function(e,t){var n=this._addEL[e].find(function(o){return o.fn===t});xo(this,e,n)},close:function(){var e=this;if(!this.closed){No.delete(this),this.closed=!0;var t=this._prepP?this._prepP:_e;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 $o(e,t,n){var o=e.method.microSeconds(),s={time:o,type:t,data:n},a=e._prepP?e._prepP:_e;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 ki(e){var t=e.method.create(e.name,e.options);Oa(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 So(e,t,n){e._addEL[t].push(n),Ni(e)}function xo(e,t,n){e._addEL[t]=e._addEL[t].filter(function(o){return o!==n}),$i(e)}function Ni(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 $i(e){if(e._iL&&!Oo(e)){e._iL=!1;var t=e.method.microSeconds();e.method.onMessage(e._state,null,t)}}let jt=class extends Error{constructor(t,n){super(t),this.name="DevalueError",this.path=n.join("")}};function Co(e){return Object(e)!==e}const Oi=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")===Oi}function xi(e){return Object.prototype.toString.call(e).slice(8,-1)}function Ci(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
|
|
40
|
+
when navigating to "${y.fullPath}". A redirect must contain a name or path. This will break in production.`),new Error("Invalid redirect");return A({query:y.query,hash:y.hash,params:S.path!=null?{}:y.params},S)}}function w(y,$){const k=u=_(y),S=l.value,T=y.state,U=y.force,R=y.replace===!0,D=C(k);if(D)return w(A(x(D),{state:typeof D=="object"?A({},T,D.state):T,force:U,replace:R}),$||k);const W=k;W.redirectedFrom=$;let we;return!U&&Tn(o,S,k)&&(we=_e(16,{to:W,from:S}),ir(S,S,!0,!1)),(we?Promise.resolve(we):g(W,S)).catch(z=>se(z)?se(z,2)?z:nn(z):M(z,W,S)).then(z=>{if(z){if(se(z,2))return process.env.NODE_ENV!=="production"&&Tn(o,_(z.to),W)&&$&&($._count=$._count?$._count+1:1)>30?(P(`Detected a possibly infinite redirection in a navigation guard when going from "${S.fullPath}" to "${W.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"))):w(A({replace:R},x(z.to),{state:typeof z.to=="object"?A({},T,z.to.state):T,force:U}),$||W)}else z=V(W,S,!0,R,T);return v(W,S,z),z})}function j(y,$){const k=I(y,$);return k?Promise.reject(k):Promise.resolve()}function E(y){const $=it.values().next().value;return $&&typeof $.runWithContext=="function"?$.runWithContext(y):y()}function g(y,$){let k;const[S,T,U]=ka(y,$);k=Ct(S.reverse(),"beforeRouteLeave",y,$);for(const D of S)D.leaveGuards.forEach(W=>{k.push(he(W,y,$))});const R=j.bind(null,y,$);return k.push(R),Ce(k).then(()=>{k=[];for(const D of a.list())k.push(he(D,y,$));return k.push(R),Ce(k)}).then(()=>{k=Ct(T,"beforeRouteUpdate",y,$);for(const D of T)D.updateGuards.forEach(W=>{k.push(he(W,y,$))});return k.push(R),Ce(k)}).then(()=>{k=[];for(const D of U)if(D.beforeEnter)if(G(D.beforeEnter))for(const W of D.beforeEnter)k.push(he(W,y,$));else k.push(he(D.beforeEnter,y,$));return k.push(R),Ce(k)}).then(()=>(y.matched.forEach(D=>D.enterCallbacks={}),k=Ct(U,"beforeRouteEnter",y,$,E),k.push(R),Ce(k))).then(()=>{k=[];for(const D of i.list())k.push(he(D,y,$));return k.push(R),Ce(k)}).catch(D=>se(D,8)?D:Promise.reject(D))}function v(y,$,k){c.list().forEach(S=>E(()=>S(y,$,k)))}function V(y,$,k,S,T){const U=I(y,$);if(U)return U;const R=$===fe,D=re?history.state:{};k&&(S||R?s.replace(y.fullPath,A({scroll:R&&D&&D.scroll},T)):s.push(y.fullPath,T)),l.value=y,ir(y,$,k,R),nn()}let L;function te(){L||(L=s.listen((y,$,k)=>{const S=_(y),T=C(S);if(T){w(A(T,{replace:!0,force:!0}),S).catch(Ie);return}u=S;const U=l.value;re&&Ss(Ln(U.fullPath,k.delta),Xe()),g(S,U).catch(R=>se(R,12)?R:se(R,2)?(w(A(x(R.to),{force:!0}),S).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(R,S,U))).then(R=>{R=R||V(S,U,!1),R&&(k.delta&&!se(R,8)?s.go(-k.delta,!1):k.type===Re.pop&&se(R,20)&&s.go(-1,!1)),v(S,U,R)}).catch(Ie)}))}let le=Te(),xe=Te(),Z;function M(y,$,k){nn(y);const S=xe.list();return S.length?S.forEach(T=>T(y,$,k)):(process.env.NODE_ENV!=="production"&&P("uncaught error during route navigation:"),console.error(y)),Promise.reject(y)}function q(){return Z&&l.value!==fe?Promise.resolve():new Promise((y,$)=>{le.add([y,$])})}function nn(y){return Z||(Z=!y,te(),le.list().forEach(([$,k])=>y?k(y):$()),le.reset()),y}function ir(y,$,k,S){const{scrollBehavior:T}=e;if(!re||!T)return Promise.resolve();const U=!k&&xs(Ln(y.fullPath,0))||(S||!k)&&history.state&&history.state.scroll||null;return r.nextTick().then(()=>T(y,$,U)).then(R=>R&&Os(R)).catch(R=>M(R,y,$))}const on=y=>s.go(y);let rn;const it=new Set,Rc={currentRoute:l,listening:!0,addRoute:h,removeRoute:m,clearRoutes:t.clearRoutes,hasRoute:N,getRoutes:b,resolve:_,options:e,push:B,replace:O,go:on,back:()=>on(-1),forward:()=>on(1),beforeEach:a.add,beforeResolve:i.add,afterEach:c.add,onError:xe.add,isReady:q,install(y){const $=this;y.component("RouterLink",sa),y.component("RouterView",la),y.config.globalProperties.$router=$,Object.defineProperty(y.config.globalProperties,"$route",{enumerable:!0,get:()=>r.unref(l)}),re&&!rn&&l.value===fe&&(rn=!0,B(s.location).catch(T=>{process.env.NODE_ENV!=="production"&&P("Unexpected error when starting the router:",T)}));const k={};for(const T in fe)Object.defineProperty(k,T,{get:()=>l.value[T],enumerable:!0});y.provide(St,$),y.provide(eo,r.shallowReactive(k)),y.provide(xt,l);const S=y.unmount;it.add(y),y.unmount=function(){it.delete(y),it.size<1&&(u=fe,L&&L(),L=null,l.value=fe,rn=!1,Z=!1),S()},process.env.NODE_ENV!=="production"&&re&&pa(y,$,t)}};function Ce(y){return y.reduce(($,k)=>$.then(()=>E(k)),Promise.resolve())}return Rc}function ka(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(u=>pe(u,c))?o.push(c):n.push(c));const l=e.matched[i];l&&(t.matched.find(u=>pe(u,l))||s.push(l))}return[n,o,s]}_a({history:Ds(),routes:[]});function Na(e){return e&&typeof e.then=="function"}Promise.resolve(!1),Promise.resolve(!0);var ke=Promise.resolve();function fo(e,t){return e||(e=0),new Promise(function(n){return setTimeout(function(){return n(t)},e)})}function $a(e,t){return Math.floor(Math.random()*(t-e+1)+e)}function Vt(){return Math.random().toString(36).substring(2)}var ho=0,Dt=0;function tt(){var e=new Date().getTime();return e===ho?(Dt++,e*1e3+Dt):(ho=e,Dt=0,e*1e3)}var Oa=tt,Sa="native";function xa(e){var t={messagesCallback:null,bc:new BroadcastChannel(e),subFns:[]};return t.bc.onmessage=function(n){t.messagesCallback&&t.messagesCallback(n.data)},t}function Ca(e){e.bc.close(),e.subFns=[]}function Pa(e,t){try{return e.bc.postMessage(t,!1),ke}catch(n){return Promise.reject(n)}}function Va(e,t){e.messagesCallback=t}function Da(){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 Ia(){return 150}var Ra={create:xa,close:Ca,onMessage:Va,postMessage:Pa,canBeUsed:Da,type:Sa,averageResponseTime:Ia,microSeconds:Oa},mo=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,go()),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=go()-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 go(){return new Date().getTime()}function It(){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 Ta=tt,ja="pubkey.broadcast-channel-0-",ae="messages",nt={durability:"relaxed"},Ba="idb";function yo(){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 Rt(e){e.commit&&e.commit()}function La(e){var t=yo(),n=ja+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 Ma(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(u){return c(u)};var l=a.objectStore(ae);l.add(s),Rt(a)})}function Wa(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(l,u){i.onerror=function(f){return u(f)},i.onsuccess=function(f){l(f.target.result)}})}function c(){try{return a=IDBKeyRange.bound(t+1,1/0),o.openCursor(a)}catch{return o.openCursor()}}return new Promise(function(l,u){var f=c();f.onerror=function(d){return u(d)},f.onsuccess=function(d){var p=d.target.result;p?p.value.id<t+1?p.continue(t+1):(s.push(p.value),p.continue()):(Rt(n),l(s))}})}function Ua(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 Fa(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 l=c.target.result;if(l){var u=l.value;u.time<n?(a.push(u),l.continue()):(Rt(o),i(a))}else i(a)}})}function Ha(e){return Fa(e.db,e.options.idb.ttl).then(function(t){return Ua(e,t.map(function(n){return n.id}))})}function za(e,t){return t=It(t),La(e).then(function(n){var o={closed:!1,lastCursorId:0,channelName:e,options:t,uuid:Vt(),eMIs:new mo(t.idb.ttl*2),writeBlockPromise:ke,messagesCallback:null,readQueuePromises:[],db:n};return n.onclose=function(){o.closed=!0,t.idb.onclose&&t.idb.onclose()},wo(o),o})}function wo(e){e.closed||bo(e).then(function(){return fo(e.options.idb.fallbackInterval)}).then(function(){return wo(e)})}function qa(e,t){return!(e.uuid===t.uuid||t.eMIs.has(e.id)||e.data.time<t.messagesCallbackTime)}function bo(e){return e.closed||!e.messagesCallback?ke:Wa(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 qa(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 Ga(e){e.closed=!0,e.db.close()}function Ja(e,t){return e.writeBlockPromise=e.writeBlockPromise.then(function(){return Ma(e.db,e.uuid,t)}).then(function(){$a(0,10)===0&&Ha(e)}),e.writeBlockPromise}function Ka(e,t,n){e.messagesCallbackTime=n,e.messagesCallback=t,bo(e)}function Ya(){return!!yo()}function Qa(e){return e.idb.fallbackInterval*2}var Xa={create:za,close:Ga,onMessage:Ka,postMessage:Ja,canBeUsed:Ya,type:Ba,averageResponseTime:Qa,microSeconds:Ta},Za=tt,ei="pubkey.broadcastChannel-",ti="localstorage";function vo(){var e;if(typeof window>"u")return null;try{e=window.localStorage,e=window["ie8-eventlistener/storage"]||window.localStorage}catch{}return e}function Eo(e){return ei+e}function ni(e,t){return new Promise(function(n){fo().then(function(){var o=Eo(e.channelName),s={token:Vt(),time:new Date().getTime(),data:t,uuid:e.uuid},a=JSON.stringify(s);vo().setItem(o,a);var i=document.createEvent("Event");i.initEvent("storage",!0,!0),i.key=o,i.newValue=a,window.dispatchEvent(i),n()})})}function oi(e,t){var n=Eo(e),o=function(s){s.key===n&&t(JSON.parse(s.newValue))};return window.addEventListener("storage",o),o}function ri(e){window.removeEventListener("storage",e)}function si(e,t){if(t=It(t),!_o())throw new Error("BroadcastChannel: localstorage cannot be used");var n=Vt(),o=new mo(t.localstorage.removeTimeout),s={channelName:e,uuid:n,eMIs:o};return s.listener=oi(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 ai(e){ri(e.listener)}function ii(e,t,n){e.messagesCallbackTime=n,e.messagesCallback=t}function _o(){var e=vo();if(!e)return!1;try{var t="__broadcastchannel_check";e.setItem(t,"works"),e.removeItem(t)}catch{return!1}return!0}function ci(){var e=120,t=navigator.userAgent.toLowerCase();return t.includes("safari")&&!t.includes("chrome")?e*2:e}var li={create:si,close:ai,onMessage:ii,postMessage:ni,canBeUsed:_o,type:ti,averageResponseTime:ci,microSeconds:Za},ui=tt,di="simulate",At=new Set;function pi(e){var t={name:e,messagesCallback:null};return At.add(t),t}function fi(e){At.delete(e)}function hi(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 mi(e,t){e.messagesCallback=t}function gi(){return!0}function yi(){return 5}var wi={create:pi,close:fi,onMessage:mi,postMessage:hi,canBeUsed:gi,type:di,averageResponseTime:yi,microSeconds:ui},ko=[Ra,Xa,li];function bi(e){var t=[].concat(e.methods,ko).filter(Boolean);if(e.type){if(e.type==="simulate")return wi;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(ko.map(function(s){return s.type})))}var No=new Set,vi=0,Tt=function(e,t){this.id=vi++,No.add(this),this.name=e,this.options=It(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,Ei(this)};Tt._pubkey=!0,Tt.prototype={postMessage:function(e){if(this.closed)throw new Error("BroadcastChannel.postMessage(): Cannot post message after channel has closed "+JSON.stringify(e));return $o(this,"message",e)},postInternal:function(e){return $o(this,"internal",e)},set onmessage(e){var t=this.method.microSeconds(),n={time:t,fn:e};xo(this,"message",this._onML),e&&typeof e=="function"?(this._onML=n,So(this,"message",n)):this._onML=null},addEventListener:function(e,t){var n=this.method.microSeconds(),o={time:n,fn:t};So(this,e,o)},removeEventListener:function(e,t){var n=this._addEL[e].find(function(o){return o.fn===t});xo(this,e,n)},close:function(){var e=this;if(!this.closed){No.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 $o(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 Ei(e){var t=e.method.create(e.name,e.options);Na(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 So(e,t,n){e._addEL[t].push(n),_i(e)}function xo(e,t,n){e._addEL[t]=e._addEL[t].filter(function(o){return o!==n}),ki(e)}function _i(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 ki(e){if(e._iL&&!Oo(e)){e._iL=!1;var t=e.method.microSeconds();e.method.onMessage(e._state,null,t)}}let jt=class extends Error{constructor(t,n){super(t),this.name="DevalueError",this.path=n.join("")}};function Co(e){return Object(e)!==e}const Ni=Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function $i(e){const t=Object.getPrototypeOf(e);return t===Object.prototype||t===null||Object.getOwnPropertyNames(t).sort().join("\0")===Ni}function Oi(e){return Object.prototype.toString.call(e).slice(8,-1)}function Si(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=Si(a);i&&(t+=e.slice(n,s)+i,n=s+1)}return`"${n===0?e:t+e.slice(n)}"`}const Bt=-1,Po=-2,Vo=-3,Do=-4,Io=-5,Lt=-6;function Ro(e,t){return xi(JSON.parse(e))}function xi(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===Bt)return;if(a===Vo)return NaN;if(a===Do)return 1/0;if(a===Io)return-1/0;if(a===Lt)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 l=c[0];switch(l){case"Date":o[a]=new Date(c[1]);break;case"Set":const u=new Set;o[a]=u;for(let p=1;p<c.length;p+=1)u.add(s(c[p]));break;case"Map":const f=new Map;o[a]=f;for(let p=1;p<c.length;p+=2)f.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 d=Object.create(null);o[a]=d;for(let p=1;p<c.length;p+=2)d[c[p]]=s(c[p+1]);break;default:throw new Error(`Unknown type ${l}`)}}else{const l=new Array(c.length);o[a]=l;for(let u=0;u<c.length;u+=1){const f=c[u];f!==Po&&(l[u]=s(f))}}else{const l={};o[a]=l;for(const u in c){const f=c[u];l[u]=s(f)}}return o[a]}return s(0)}function Ao(e,t){const n=[],o=new Map,s=[];for(const u in t)s.push({key:u,fn:t[u]});const a=[];let i=0;function c(u){if(typeof u=="function")throw new jt("Cannot stringify a function",a);if(o.has(u))return o.get(u);if(u===void 0)return Bt;if(Number.isNaN(u))return Vo;if(u===1/0)return Do;if(u===-1/0)return Io;if(u===0&&1/u<0)return Lt;const f=i++;o.set(u,f);for(const{key:p,fn:h}of s){const m=h(u);if(m)return n[f]=`["${p}",${c(m)}]`,f}let d="";if(Co(u))d=Mt(u);else switch(Oi(u)){case"Number":case"String":case"Boolean":d=`["Object",${Mt(u)}]`;break;case"BigInt":d=`["BigInt",${u}]`;break;case"Date":d=`["Date","${isNaN(u.getDate())?"":u.toISOString()}"]`;break;case"RegExp":const{source:p,flags:h}=u;d=h?`["RegExp",${Ne(p)},"${h}"]`:`["RegExp",${Ne(p)}]`;break;case"Array":d="[";for(let m=0;m<u.length;m+=1)m>0&&(d+=","),m in u?(a.push(`[${m}]`),d+=c(u[m]),a.pop()):d+=Po;d+="]";break;case"Set":d='["Set"';for(const m of u)d+=`,${c(m)}`;d+="]";break;case"Map":d='["Map"';for(const[m,b]of u)a.push(`.get(${Co(m)?Mt(m):"..."})`),d+=`,${c(m)},${c(b)}`,a.pop();d+="]";break;default:if(!$i(u))throw new jt("Cannot stringify arbitrary non-POJOs",a);if(Object.getOwnPropertySymbols(u).length>0)throw new jt("Cannot stringify POJOs with symbolic keys",a);if(Object.getPrototypeOf(u)===null){d='["null"';for(const m in u)a.push(`.${m}`),d+=`,${Ne(m)},${c(u[m])}`,a.pop();d+="]"}else{d="{";let m=!1;for(const b in u)m&&(d+=","),m=!0,a.push(`.${b}`),d+=`${Ne(b)}:${c(u[b])}`,a.pop();d+="}"}}return n[f]=d,f}const l=c(e);return l<0?`${l}`:`[${n.join(",")}]`}function Mt(e){const t=typeof e;return t==="string"?Ne(e):e instanceof String?Ne(e.toString()):e===void 0?Bt.toString():e===0&&1/e<0?Lt.toString():t==="bigint"?`["BigInt","${e}"]`:String(e)}function Ci(e,t,{initialize:n,type:o}){let s=`${t.$id}-${e.toString()}`,a=new Tt(s,{type:o}),i=!1,c=0;r.watch(()=>t[e],f=>{i||(c=Date.now(),a.postMessage({timestamp:c,state:Ro(Ao(f))})),i=!1},{deep:!0}),a.onmessage=f=>{if(f===void 0){a.postMessage({timestamp:c,state:Ro(Ao(t[e]))});return}f.timestamp<=c||(i=!0,c=f.timestamp,t[e]=f.state)};let l=()=>a.postMessage(void 0),u=()=>a.close();return n&&l(),{sync:l,unshare:u}}var Pi=(e,t)=>Object.keys(t).includes(e),Vi=({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,l=((i=s==null?void 0:s.share)==null?void 0:i.omit)??[];!c||Object.keys(o.$state).forEach(u=>{var f;l.includes(u)||!Pi(u,o.$state)||Ci(u,o,{initialize:((f=s==null?void 0:s.share)==null?void 0:f.initialize)??e,type:n})})};Qr().use(Vi({enable:!0,initialize:!0}));const To=r.defineComponent({__name:"Doctype",setup(e){const{stonecrop:t,isReady:n}=xn(),o=r.ref([]);return r.watch(n,()=>{if(n.value){let s=t.value.schema.schema.toArray();s.forEach((a,i)=>{const l=t.value.store.record[a.fieldname];s[i].value=l}),o.value=s}}),(s,a)=>r.unref(n)?(r.openBlock(),r.createBlock(r.unref(kr),{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 Di=!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 Wt(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
|
|
46
|
+
*/let Be;const rt=e=>Be=e,Ii=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 Le;(function(e){e.direct="direct",e.patchObject="patch object",e.patchFunction="patch function"})(Le||(Le={}));const Me=typeof window<"u";function jo(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]=jo(s,o):e[n]=o}return e}const Bo=()=>{};function Lo(e,t,n,o=Bo){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 Ri=e=>e(),Mo=Symbol(),Ut=Symbol();function Ft(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]=Ft(s,o):e[n]=o}return e}const Ai=process.env.NODE_ENV!=="production"?Symbol("pinia:skipHydration"):Symbol();function Ti(e){return!ye(e)||!e.hasOwnProperty(Ai)}const{assign:Q}=Object;function Wo(e){return!!(r.isRef(e)&&e.effect)}function Uo(e,t,n,o){const{state:s,actions:a,getters:i}=t,c=n.state.value[e];let l;function u(){!c&&(process.env.NODE_ENV==="production"||!o)&&(n.state.value[e]=s?s():{});const f=process.env.NODE_ENV!=="production"&&o?r.toRefs(r.ref(s?s():{}).value):r.toRefs(n.state.value[e]);return Q(f,a,Object.keys(i||{}).reduce((d,p)=>(process.env.NODE_ENV!=="production"&&p in f&&console.warn(`[๐]: A getter cannot have the same name as another state property. Rename one of them. Found with "${p}" in store "${e}".`),d[p]=r.markRaw(r.computed(()=>{rt(n);const h=n._s.get(e);return i[p].call(h,h)})),d),{}))}return l=Ht(e,u,t,n,o,!0),l}function Ht(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 l={deep:!0};process.env.NODE_ENV!=="production"&&!Di&&(l.onTrigger=g=>{u?h=g:u==!1&&!w._hotUpdating&&(Array.isArray(h)?h.push(g):console.error("๐ debuggerEvents should be an array. This is most likely an internal Pinia bug."))});let u,f,d=[],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 N;function _(g){let v;u=f=!1,process.env.NODE_ENV!=="production"&&(h=[]),typeof g=="function"?(g(o.state.value[e]),v={type:Le.patchFunction,storeId:e,events:h}):(Ft(o.state.value[e],g),v={type:Le.patchObject,payload:g,storeId:e,events:h});const V=N=Symbol();r.nextTick().then(()=>{N===V&&(u=!0)}),f=!0,$e(d,v,o.state.value[e])}const x=a?function(){const{state:v}=n,V=v?v():{};this.$patch(L=>{Q(L,V)})}:process.env.NODE_ENV!=="production"?()=>{throw new Error(`๐: Store "${e}" is built using the setup syntax and does not implement $reset().`)}:Bo;function I(){i.stop(),d=[],p=[],o._s.delete(e)}const B=(g,v="")=>{if(Mo in g)return g[Ut]=v,g;const V=function(){rt(o);const L=Array.from(arguments),te=[],le=[];function xe(q){te.push(q)}function Z(q){le.push(q)}$e(p,{args:L,name:V[Ut],store:w,after:xe,onError:Z});let M;try{M=g.apply(this&&this.$id===e?this:w,L)}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 V[Mo]=!0,V[Ut]=v,V},O=r.markRaw({actions:{},getters:{},state:[],hotState:b}),C={_p:o,$id:e,$onAction:Lo.bind(null,p),$patch:_,$reset:x,$subscribe(g,v={}){const V=Lo(d,g,v.detached,()=>L()),L=i.run(()=>r.watch(()=>o.state.value[e],te=>{(v.flush==="sync"?f:u)&&g({storeId:e,type:Le.direct,events:h},te)},Q({},l,v)));return V},$dispose:I},w=r.reactive(process.env.NODE_ENV!=="production"||process.env.NODE_ENV!=="production"&&process.env.NODE_ENV!=="test"&&Me?Q({_hmrPayload:O,_customProperties:r.markRaw(new Set)},C):C);o._s.set(e,w);const E=(o._a&&o._a.runWithContext||Ri)(()=>o._e.run(()=>(i=r.effectScope()).run(()=>t({action:B}))));for(const g in E){const v=E[g];if(r.isRef(v)&&!Wo(v)||r.isReactive(v))process.env.NODE_ENV!=="production"&&s?ot(b.value,g,r.toRef(E,g)):a||(m&&Ti(v)&&(r.isRef(v)?v.value=m[g]:Ft(v,m[g])),o.state.value[e][g]=v),process.env.NODE_ENV!=="production"&&O.state.push(g);else if(typeof v=="function"){const V=process.env.NODE_ENV!=="production"&&s?v:B(v,g);E[g]=V,process.env.NODE_ENV!=="production"&&(O.actions[g]=v),c.actions[g]=v}else process.env.NODE_ENV!=="production"&&Wo(v)&&(O.getters[g]=a?n.getters[g]:v,Me&&(E._getters||(E._getters=r.markRaw([]))).push(g))}if(Q(w,E),Q(r.toRaw(w),E),Object.defineProperty(w,"$state",{get:()=>process.env.NODE_ENV!=="production"&&s?b.value:o.state.value[e],set:g=>{if(process.env.NODE_ENV!=="production"&&s)throw new Error("cannot set hotState");_(v=>{Q(v,g)})}}),process.env.NODE_ENV!=="production"&&(w._hotUpdate=r.markRaw(g=>{w._hotUpdating=!0,g._hmrPayload.state.forEach(v=>{if(v in w.$state){const V=g.$state[v],L=w.$state[v];typeof V=="object"&&ye(V)&&ye(L)?jo(V,L):g.$state[v]=L}ot(w,v,r.toRef(g.$state,v))}),Object.keys(w.$state).forEach(v=>{v in g.$state||Wt(w,v)}),u=!1,f=!1,o.state.value[e]=r.toRef(g._hmrPayload,"hotState"),f=!0,r.nextTick().then(()=>{u=!0});for(const v in g._hmrPayload.actions){const V=g[v];ot(w,v,B(V,v))}for(const v in g._hmrPayload.getters){const V=g._hmrPayload.getters[v],L=a?r.computed(()=>(rt(o),V.call(w,w))):V;ot(w,v,L)}Object.keys(w._hmrPayload.getters).forEach(v=>{v in g._hmrPayload.getters||Wt(w,v)}),Object.keys(w._hmrPayload.actions).forEach(v=>{v in g._hmrPayload.actions||Wt(w,v)}),w._hmrPayload=g._hmrPayload,w._getters=g._getters,w._hotUpdating=!1})),process.env.NODE_ENV!=="production"&&process.env.NODE_ENV!=="test"&&Me){const g={writable:!0,configurable:!0,enumerable:!1};["_p","_hmrPayload","_getters","_customProperties"].forEach(v=>{Object.defineProperty(w,v,Q({value:w[v]},g))})}return o._p.forEach(g=>{if(process.env.NODE_ENV!=="production"&&process.env.NODE_ENV!=="test"&&Me){const v=i.run(()=>g({store:w,app:o._a,pinia:o,options:c}));Object.keys(v||{}).forEach(V=>w._customProperties.add(V)),Q(w,v)}else Q(w,i.run(()=>g({store:w,app:o._a,pinia:o,options:c})))}),process.env.NODE_ENV!=="production"&&w.$state&&typeof w.$state=="object"&&typeof w.$state.constructor=="function"&&!w.$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 "${w.$id}".`),m&&a&&n.hydrate&&n.hydrate(w.$state,m),
|
|
48
|
+
Found in store "${w.$id}".`),m&&a&&n.hydrate&&n.hydrate(w.$state,m),u=!0,f=!0,w}/*! #__NO_SIDE_EFFECTS__ */function ji(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,l){const u=r.hasInjectionContext();if(c=(process.env.NODE_ENV==="test"&&Be&&Be._testing?null:c)||(u?r.inject(Ii,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=Te,c._s.has(o)||(a?zt(o,t,s,c):Uo(o,s,c),process.env.NODE_ENV!=="production"&&(i._pinia=c));const d=c._s.get(o);if(process.env.NODE_ENV!=="production"&&l){const u="__hot:"+o,f=a?zt(u,t,s,c,!0):Uo(u,Q({},s),c,!0);l._hotUpdate(f),delete c.state.value[u],c._s.delete(u)}if(process.env.NODE_ENV!=="production"&&Be){const u=r.getCurrentInstance();if(u&&u.proxy&&!l){const f=u.proxy,h="_pStores"in f?f._pStores:f._pStores={};h[o]=d}}return d}return i.$id=o,i}function Fo(e){return r.getCurrentScope()?(r.onScopeDispose(e),!0):!1}function Ht(e){return typeof e=="function"?e():r.unref(e)}const Mi=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const Wi=e=>e!=null,Ui=Object.prototype.toString,Fi=e=>Ui.call(e)==="[object Object]",zi=()=>{},Le=Mi?window:void 0;function Me(e){var t;const n=Ht(e);return(t=n==null?void 0:n.$el)!=null?t:n}function We(...e){let t,n,o,s;if(typeof e[0]=="string"||Array.isArray(e[0])?([n,o,s]=e,t=Le):[t,n,o,s]=e,!t)return zi;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)),l=r.watch(()=>[Me(t),Ht(s)],([d,u])=>{if(i(),!d)return;const f=Fi(u)?{...u}:u;a.push(...n.flatMap(h=>o.map(m=>c(d,h,m,f))))},{immediate:!0,flush:"post"}),p=()=>{l(),i()};return Fo(p),p}function Hi(){const e=r.ref(!1),t=r.getCurrentInstance();return t&&r.onMounted(()=>{e.value=!0},t),e}function qi(e){const t=Hi();return r.computed(()=>(t.value,!!e()))}function Gi(e,t,n={}){const{window:o=Le,...s}=n;let a;const i=qi(()=>o&&"MutationObserver"in o),c=()=>{a&&(a.disconnect(),a=void 0)},l=r.computed(()=>{const f=Ht(e),h=(Array.isArray(f)?f:[f]).map(Me).filter(Wi);return new Set(h)}),p=r.watch(()=>l.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=()=>{p(),c()};return Fo(u),{isSupported:i,stop:u,takeRecords:d}}function Ji(e={}){var t;const{window:n=Le,deep:o=!0,triggerOnRemoval:s=!1}=e,a=(t=e.document)!=null?t:n==null?void 0:n.document,i=()=>{var p;let d=a==null?void 0:a.activeElement;if(o)for(;d!=null&&d.shadowRoot;)d=(p=d==null?void 0:d.shadowRoot)==null?void 0:p.activeElement;return d},c=r.ref(),l=()=>{c.value=i()};return n&&(We(n,"blur",p=>{p.relatedTarget===null&&l()},!0),We(n,"focus",l,!0)),s&&Gi(a,p=>{p.filter(d=>d.removedNodes.length).map(d=>Array.from(d.removedNodes)).flat().forEach(d=>{d===c.value&&l()})},{childList:!0,subtree:!0}),l(),c}const Yi="focusin",Ki="focusout";function Qi(e,t={}){const{window:n=Le}=t,o=r.computed(()=>Me(e)),s=r.ref(!1),a=r.computed(()=>s.value),i=Ji(t);return!n||!i.value?{focused:a}:(We(o,Yi,()=>s.value=!0),We(o,Ki,()=>s.value=!1),{focused:a})}function Xi(e,{window:t=Le,scrollTarget:n}={}){const o=r.ref(!1),s=()=>{if(!t)return;const a=t.document,i=Me(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(()=>Me(e),()=>s(),{immediate:!0,flush:"post"}),t&&We(n||t,"scroll",s,{capture:!1,passive:!0}),o}const ae=e=>{let t=Xi(e).value;return t=t&&e.offsetHeight>0,t},ie=e=>e.tabIndex>=0,zo=e=>{const t=e.target;return qt(t)},qt=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&&(!ie(n)||!ae(n))?qt(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.firstElementChild.children[n.cellIndex];a&&(o=a)}}else if(n instanceof HTMLTableRowElement){const s=n.parentElement;if(s){const a=s.firstElementChild;a&&(o=a)}}return o&&(!ie(o)||!ae(o))?Gt(o):o},Ho=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.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&&(!ie(n)||!ae(n))?Gt(n):n},ec=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.children[n.cellIndex];a&&(o=a)}}else if(n instanceof HTMLTableRowElement){const s=n.parentElement;if(s){const a=s.lastElementChild;a&&(o=a)}}return o&&(!ie(o)||!ae(o))?qt(o):o},qo=e=>{const t=e.target;return Jt(t)},Jt=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&&(!ie(n)||!ae(n))?Jt(n):n},Go=e=>{const t=e.target;return Yt(t)},Yt=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&&(!ie(n)||!ae(n))?Yt(n):n},Jo=e=>{const t=e.target.parentElement.firstElementChild;return t&&(!ie(t)||!ae(t))?Yt(t):t},Yo=e=>{const t=e.target.parentElement.lastElementChild;return t&&(!ie(t)||!ae(t))?Jt(t):t},rt=["alt","control","shift","meta"],tc={ArrowUp:"up",ArrowDown:"down",ArrowLeft:"left",ArrowRight:"right"},Kt={"keydown.up":e=>{const t=zo(e);t&&(e.preventDefault(),e.stopPropagation(),t.focus())},"keydown.down":e=>{const t=Ho(e);t&&(e.preventDefault(),e.stopPropagation(),t.focus())},"keydown.left":e=>{const t=qo(e);e.preventDefault(),e.stopPropagation(),t&&t.focus()},"keydown.right":e=>{const t=Go(e);e.preventDefault(),e.stopPropagation(),t&&t.focus()},"keydown.control.up":e=>{const t=Zi(e);t&&(e.preventDefault(),e.stopPropagation(),t.focus())},"keydown.control.down":e=>{const t=ec(e);t&&(e.preventDefault(),e.stopPropagation(),t.focus())},"keydown.control.left":e=>{const t=Jo(e);t&&(e.preventDefault(),e.stopPropagation(),t.focus())},"keydown.control.right":e=>{const t=Yo(e);t&&(e.preventDefault(),e.stopPropagation(),t.focus())},"keydown.end":e=>{const t=Yo(e);t&&(e.preventDefault(),e.stopPropagation(),t.focus())},"keydown.enter":e=>{if(e.target instanceof HTMLTableCellElement){e.preventDefault(),e.stopPropagation();const t=Ho(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=Jo(e);t&&(e.preventDefault(),e.stopPropagation(),t.focus())},"keydown.tab":e=>{const t=Go(e);t&&(e.preventDefault(),e.stopPropagation(),t.focus())},"keydown.shift.tab":e=>{const t=qo(e);t&&(e.preventDefault(),e.stopPropagation(),t.focus())}};function Ko(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=>{const c=t(i);let l=[];if(typeof i.selectors=="string")l=c?Array.from(c.querySelectorAll(i.selectors)):Array.from(document.querySelectorAll(i.selectors));else if(Array.isArray(i.selectors))for(const p of i.selectors)p instanceof HTMLElement?l.push(p):l.push(p.$el);else if(i.selectors instanceof HTMLElement)l.push(i.selectors);else if(Array.isArray(i.selectors.value))for(const p of i.selectors.value)p instanceof HTMLElement?l.push(p):l.push(p.$el);else l.push(i.selectors.value);return l},o=i=>{const c=t(i);let l=[];return i.selectors?l=n(i):c&&(l=Array.from(c.children).filter(p=>ie(p)&&ae(p))),l},s=i=>c=>{const l=tc[c.key]||c.key.toLowerCase();if(rt.includes(l))return;const p=i.handlers||Kt;for(const d of Object.keys(p)){const[u,...f]=d.split(".");if(u==="keydown"&&f.includes(l)){const h=p[d],m=f.filter(O=>rt.includes(O)),E=rt.some(O=>{const N=O.charAt(0).toUpperCase()+O.slice(1);return c.getModifierState(N)});if(m.length>0){if(E){for(const O of rt)if(f.includes(O)){const N=O.charAt(0).toUpperCase()+O.slice(1);c.getModifierState(N)&&h(c)}}}else E||h(c)}}},a=[];r.onMounted(()=>{for(const i of e){const c=t(i),l=o(i),p=s(i),d=c?[c]:l;for(const u of d){const{focused:f}=Qi(r.ref(u)),h=r.watch(f,m=>{m?u.addEventListener("keydown",p):u.removeEventListener("keydown",p)});a.push(h)}}}),r.onBeforeUnmount(()=>{for(const i of a)i()})}function Qo(e){return r.getCurrentScope()?(r.onScopeDispose(e),!0):!1}function Ue(e){return typeof e=="function"?e():r.unref(e)}const Xo=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const nc=Object.prototype.toString,oc=e=>nc.call(e)==="[object Object]",Fe=()=>{},Qt=rc();function rc(){var e,t;return Xo&&((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))}const Zo={mounted:"mounted",updated:"updated",unmounted:"unmounted"};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:Fe}))):r.ref(t)}function ze(e){var t;const n=Ue(e);return(t=n==null?void 0:n.$el)!=null?t:n}const er=Xo?window:void 0;function st(...e){let t,n,o,s;if(typeof e[0]=="string"||Array.isArray(e[0])?([n,o,s]=e,t=er):[t,n,o,s]=e,!t)return Fe;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)),l=r.watch(()=>[ze(t),Ue(s)],([d,u])=>{if(i(),!d)return;const f=oc(u)?{...u}:u;a.push(...n.flatMap(h=>o.map(m=>c(d,h,m,f))))},{immediate:!0,flush:"post"}),p=()=>{l(),i()};return Qo(p),p}let tr=!1;function nr(e,t,n={}){const{window:o=er,ignore:s=[],capture:a=!0,detectIframe:i=!1}=n;if(!o)return Fe;Qt&&!tr&&(tr=!0,Array.from(o.document.body.children).forEach(d=>d.addEventListener("click",Fe)),o.document.documentElement.addEventListener("click",Fe));let c=!0;const l=d=>s.some(u=>{if(typeof u=="string")return Array.from(o.document.querySelectorAll(u)).some(f=>f===d.target||d.composedPath().includes(f));{const f=ze(u);return f&&(d.target===f||d.composedPath().includes(f))}}),p=[st(o,"click",d=>{const u=ze(e);if(!(!u||u===d.target||d.composedPath().includes(u))){if(d.detail===0&&(c=!l(d)),!c){c=!0;return}t(d)}},{passive:!0,capture:a}),st(o,"pointerdown",d=>{const u=ze(e);c=!l(d)&&!!(u&&!d.composedPath().includes(u))},{passive:!0}),i&&st(o,"blur",d=>{setTimeout(()=>{var u;const f=ze(e);((u=o.document.activeElement)==null?void 0:u.tagName)==="IFRAME"&&!(f!=null&&f.contains(o.document.activeElement))&&t(d)},0)})].filter(Boolean);return()=>p.forEach(d=>d())}const ac={[Zo.mounted](e,t){const n=!t.modifiers.bubble;if(typeof t.value=="function")e.__onClickOutside_stop=nr(e,t.value,{capture:n});else{const[o,s]=t.value;e.__onClickOutside_stop=nr(e,o,Object.assign({capture:n},s))}},[Zo.unmounted](e){e.__onClickOutside_stop()}};function Xt(e){return typeof Window<"u"&&e instanceof Window?e.document.documentElement:typeof Document<"u"&&e instanceof Document?e.documentElement:e}function or(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:or(n)}}function ic(e){const t=e||window.event,n=t.target;return or(n)?!1:t.touches.length>1?!0:(t.preventDefault&&t.preventDefault(),!1)}const Zt=new WeakMap;function cc(e,t=!1){const n=r.ref(t);let o=null,s="";r.watch(sc(e),c=>{const l=Xt(Ue(c));if(l){const p=l;if(Zt.get(p)||Zt.set(p,p.style.overflow),p.style.overflow!=="hidden"&&(s=p.style.overflow),p.style.overflow==="hidden")return n.value=!0;if(n.value)return p.style.overflow="hidden"}},{immediate:!0});const a=()=>{const c=Xt(Ue(e));!c||n.value||(Qt&&(o=st(c,"touchmove",l=>{ic(l)},{passive:!1})),c.style.overflow="hidden",n.value=!0)},i=()=>{const c=Xt(Ue(e));!c||!n.value||(Qt&&(o==null||o()),c.style.overflow=s,Zt.delete(c),n.value=!1)};return Qo(i),r.computed({get(){return n.value},set(c){c?a():i()}})}function lc(){let e=!1;const t=r.ref(!1);return(n,o)=>{if(t.value=o.value,e)return;e=!0;const s=cc(n,o.value);r.watch(t,a=>s.value=a)}}lc();function en(e){return r.getCurrentScope()?(r.onScopeDispose(e),!0):!1}function at(e){return typeof e=="function"?e():r.unref(e)}const uc=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const dc=e=>e!=null,pc=Object.prototype.toString,fc=e=>pc.call(e)==="[object Object]",hc=()=>{};function mc(e){return r.getCurrentInstance()}function gc(e,t=!0,n){mc()?r.onMounted(e,n):t?e():r.nextTick(e)}const tn=uc?window:void 0;function $e(e){var t;const n=at(e);return(t=n==null?void 0:n.$el)!=null?t:n}function rr(...e){let t,n,o,s;if(typeof e[0]=="string"||Array.isArray(e[0])?([n,o,s]=e,t=tn):[t,n,o,s]=e,!t)return hc;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)),l=r.watch(()=>[$e(t),at(s)],([d,u])=>{if(i(),!d)return;const f=fc(u)?{...u}:u;a.push(...n.flatMap(h=>o.map(m=>c(d,h,m,f))))},{immediate:!0,flush:"post"}),p=()=>{l(),i()};return en(p),p}function yc(){const e=r.ref(!1),t=r.getCurrentInstance();return t&&r.onMounted(()=>{e.value=!0},t),e}function sr(e){const t=yc();return r.computed(()=>(t.value,!!e()))}function ar(e,t,n={}){const{window:o=tn,...s}=n;let a;const i=sr(()=>o&&"MutationObserver"in o),c=()=>{a&&(a.disconnect(),a=void 0)},l=r.computed(()=>{const f=at(e),h=(Array.isArray(f)?f:[f]).map($e).filter(dc);return new Set(h)}),p=r.watch(()=>l.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=()=>{p(),c()};return en(u),{isSupported:i,stop:u,takeRecords:d}}function wc(e,t,n={}){const{window:o=tn,...s}=n;let a;const i=sr(()=>o&&"ResizeObserver"in o),c=()=>{a&&(a.disconnect(),a=void 0)},l=r.computed(()=>{const u=at(e);return Array.isArray(u)?u.map(f=>$e(f)):[$e(u)]}),p=r.watch(l,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(),p()};return en(d),{isSupported:i,stop:d}}function bc(e,t={}){const{reset:n=!0,windowResize:o=!0,windowScroll:s=!0,immediate:a=!0,updateTiming:i="sync"}=t,c=r.ref(0),l=r.ref(0),p=r.ref(0),d=r.ref(0),u=r.ref(0),f=r.ref(0),h=r.ref(0),m=r.ref(0);function E(){const N=$e(e);if(!N){n&&(c.value=0,l.value=0,p.value=0,d.value=0,u.value=0,f.value=0,h.value=0,m.value=0);return}const x=N.getBoundingClientRect();c.value=x.height,l.value=x.bottom,p.value=x.left,d.value=x.right,u.value=x.top,f.value=x.width,h.value=x.x,m.value=x.y}function O(){i==="sync"?E():i==="next-frame"&&requestAnimationFrame(()=>E())}return wc(e,O),r.watch(()=>$e(e),N=>!N&&O()),ar(e,O,{attributeFilter:["style","class"]}),s&&rr("scroll",O,{capture:!0,passive:!0}),o&&rr("resize",O,{passive:!0}),gc(()=>{a&&O()}),{height:c,bottom:l,left:p,right:d,top:u,width:f,x:h,y:m,update:O}}const vc=e=>{const t=new DOMParser().parseFromString(e,"text/html");return Array.from(t.body.childNodes).some(n=>n.nodeType===1)},Ec=["data-colindex","data-rowindex","data-editable","contenteditable","tabindex"],_c=["innerHTML"],kc={key:2},Nc=r.defineComponent({__name:"ACell",props:{colIndex:{},rowIndex:{},store:{},addNavigation:{type:[Boolean,Object],default:!0},tabIndex:{default:0},pinned:{type:Boolean}},setup(e){const t=r.useTemplateRef("cell"),{bottom:n,left:o}=bc(t),s=e.store.getCellData(e.colIndex,e.rowIndex),a=e.store.getCellDisplayValue(e.colIndex,e.rowIndex),i=r.ref(""),c=r.ref(!1),l=e.store.columns[e.colIndex],p=e.store.rows[e.rowIndex],d=l.align||"center",u=l.width||"40ch",f=r.computed(()=>typeof a=="string"?vc(a):!1),h=r.computed(()=>{var N;return{textAlign:d,width:u,backgroundColor:c.value?"var(--sc-cell-changed-color)":"inherit",fontWeight:c.value?"bold":"inherit",paddingLeft:e.store.getIndent(e.colIndex,(N=e.store.display[e.rowIndex])==null?void 0:N.indent)}}),m=()=>{l.mask,l.modalComponent&&e.store.$patch(N=>{N.modal.visible=!0,N.modal.colIndex=e.colIndex,N.modal.rowIndex=e.rowIndex,N.modal.parent=t.value,N.modal.top=n.value,N.modal.left=o.value,N.modal.width=u,typeof l.modalComponent=="function"?N.modal.component=l.modalComponent({table:N.table,row:p,column:l}):N.modal.component=l.modalComponent,N.modal.componentProps=l.modalComponentExtraProps})};if(e.addNavigation){let N={...Kt,"keydown.f2":m,"keydown.alt.up":m,"keydown.alt.down":m,"keydown.alt.left":m,"keydown.alt.right":m};typeof e.addNavigation=="object"&&(N={...N,...e.addNavigation}),Ko([{selectors:t,handlers:N}])}const E=()=>{t.value&&(i.value=t.value.textContent)},O=()=>{t.value&&(l.format?c.value=t.value.textContent!==e.store.getFormattedValue(e.colIndex,e.rowIndex,s):c.value=t.value.textContent!==s,t.value.textContent!==i.value&&(i.value=t.value.textContent,t.value.dispatchEvent(new Event("change")),l.format||e.store.setCellData(e.colIndex,e.rowIndex,i.value)))};return(N,x)=>r.withDirectives((r.openBlock(),r.createElementBlock("td",{ref:"cell","data-colindex":N.colIndex,"data-rowindex":N.rowIndex,"data-editable":r.unref(l).edit,contenteditable:r.unref(l).edit,tabindex:N.tabIndex,spellcheck:!1,style:r.normalizeStyle(h.value),onFocus:E,onPaste:O,onBlur:O,onInput:O,onClick:m,class:r.normalizeClass(["atable-cell",N.pinned?"sticky-column":""])},[r.unref(l).cellComponent?(r.openBlock(),r.createBlock(r.resolveDynamicComponent(r.unref(l).cellComponent),r.mergeProps({key:0,value:r.unref(a)},r.unref(l).cellComponentProps),null,16,["value"])):f.value?(r.openBlock(),r.createElementBlock("span",{key:1,innerHTML:r.unref(a)},null,8,_c)):(r.openBlock(),r.createElementBlock("span",kc,r.toDisplayString(r.unref(a)),1))],46,Ec)),[[r.unref(ac),N.store.closeModal]])}}),$c=["tabindex"],Oc=r.defineComponent({__name:"ARow",props:{rowIndex:{},store:{},tabIndex:{default:()=>-1},addNavigation:{type:[Boolean,Object],default:!1}},setup(e){const t=r.useTemplateRef("rowEl"),n=e.store.isRowVisible(e.rowIndex),o=e.store.getRowExpandSymbol(e.rowIndex);if(e.addNavigation){let s=Kt;typeof e.addNavigation=="object"&&(s={...s,...e.addNavigation}),Ko([{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(r.unref(o)),3)):r.createCommentVNode("",!0)]):r.createCommentVNode("",!0),r.renderSlot(s.$slots,"default")],8,$c)),[[r.vShow,r.unref(n)]])}}),Sc={key:0,id:"resizable"},xc={class:"atable-header-row",tabindex:"-1"},Cc=r.defineComponent({__name:"ATableHeader",props:{columns:{},store:{}},setup(e){return(t,n)=>t.columns.length?(r.openBlock(),r.createElementBlock("thead",Sc,[r.createElementVNode("tr",xc,[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)}}),Pc=r.defineComponent({__name:"ATableModal",props:{colIndex:{},rowIndex:{},store:{}},setup(e){const t=n=>{n.stopPropagation()};return(n,o)=>(r.openBlock(),r.createElementBlock("div",{class:"amodal",tabindex:"-1",onClick:t,onInput:t},[r.renderSlot(n.$slots,"default")],32))}}),Vc=e=>{const t=e.id||crypto.randomUUID();return Li(`table-${t}`,()=>{const n=()=>{const $={};for(const[C,w]of s.value.entries())for(const[j,v]of a.value.entries())$[`${C}:${j}`]=v[w.name];return $},o=$=>{const C=[Object.assign({},{rowModified:!1})];if($&&"0:0"in $)return $;const w=new Set;for(let j=a.value.length-1;j>=0;j--){const v=a.value[j];v.parent&&w.add(v.parent),C[j]={childrenOpen:!1,expanded:!1,indent:v.indent||null,isParent:w.has(j),isRoot:v.parent===null||v.parent===void 0,rowModified:!1,open:v.parent===null||v.parent===void 0,parent:v.parent}}return C},s=r.ref(e.columns),a=r.ref(e.rows),i=r.ref(e.config||{}),c=r.ref(e.table||n()),l=r.ref(o(e.display)),p=r.ref(e.modal||{visible:!1}),d=r.computed(()=>s.value.some($=>$.pinned)),u=r.computed(()=>`${Math.ceil(a.value.length/100+1)}ch`),f=r.computed(()=>["list","tree","list-expansion"].includes(i.value.view)),h=($,C)=>c.value[`${$}:${C}`],m=($,C,w)=>{const j=`${$}:${C}`,v=s.value[$];c.value[j]!==w&&(l.value[C].rowModified=!0),c.value[j]=w,a.value[C][v.name]=w},E=$=>({minWidth:$.width||"40ch",textAlign:$.align||"center",width:i.value.fullWidth?"auto":null}),O=$=>i.value.view!=="tree"||l.value[$].isRoot||l.value[$].open,N=$=>i.value.view!=="tree"?"":l.value[$].isRoot||l.value[$].isParent?l.value[$].childrenOpen?"-":"+":"",x=$=>{if(i.value.view==="tree"){l.value[$].childrenOpen=!l.value[$].childrenOpen;for(let C=a.value.length-1;C>=0;C--)l.value[C].parent===$&&(l.value[C].open=!l.value[C].open,l.value[C].childrenOpen&&x(C))}else i.value.view==="list-expansion"&&(l.value[$].expanded=!l.value[$].expanded)},I=($,C)=>{const w=h($,C);return B($,C,w)},B=($,C,w)=>{const j=s.value[$],v=a.value[C],g=j.format;return g?typeof g=="function"?g(w,{table:c.value,row:v,column:j}):typeof g=="string"?Function(`"use strict";return (${g})`)()(w,{table:c.value,row:v,column:j}):w:w};return{columns:s,rows:a,config:i,table:c,display:l,modal:p,hasPinnedColumns:d,numberedRowWidth:u,zeroColumn:f,closeModal:$=>{var C;$.target instanceof Node&&(C=p.value.parent)!=null&&C.contains($.target)||p.value.visible&&(p.value.visible=!1)},getCellData:h,getCellDisplayValue:I,getFormattedValue:B,getHeaderCellStyle:E,getIndent:($,C)=>C&&$===0&&C>0?`${C}ch`:"inherit",getRowExpandSymbol:N,isRowVisible:O,setCellData:m,toggleRowExpand:x}})()},Dc=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=Vc({columns:e.columns,rows:a,id:e.id,config:e.config});i.$onAction(({name:l,store:p,args:d})=>{if(l==="setCellData"){const[u,f,h]=d,m=p.getCellData(u,f);o("cellUpdate",[u,f,h,m])}}),r.watch(()=>i.rows,l=>{o("update:modelValue",l)},{deep:!0}),r.onMounted(()=>{e.columns.some(l=>l.pinned)&&(c(),i.config.view==="tree"&&ar(s,c,{childList:!0,subtree:!0}))});const c=()=>{const l=s.value,p=l.rows[0],d=l.rows[1],u=p?Array.from(p.cells):[];for(const[f,h]of u.entries()){const m=d.cells[f];m&&(h.style.width=`${m.offsetWidth}px`)}for(const f of l.rows){let h=0;const m=[];for(const E of f.cells)(E.classList.contains("sticky-column")||E.classList.contains("sticky-index"))&&(E.style.left=`${h}px`,h+=E.offsetWidth,m.push(E));m.length>0&&m[m.length-1].classList.add("sticky-column-edge")}};return window.addEventListener("keydown",l=>{if(l.key==="Escape"&&i.modal.visible){i.modal.visible=!1;const p=i.modal.parent;p&&r.nextTick().then(()=>{p.focus()})}}),t({store:i}),(l,p)=>(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(Cc,{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,(d,u)=>(r.openBlock(),r.createBlock(Oc,{key:d.id,row:d,rowIndex:u,store:r.unref(i)},{default:r.withCtx(()=>[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(i).columns,(f,h)=>(r.openBlock(),r.createBlock(Nc,{key:f.name,store:r.unref(i),col:f,spellcheck:"false",pinned:f.pinned,rowIndex:u,colIndex:h,component:f.cellComponent,style:r.normalizeStyle({textAlign:(f==null?void 0:f.align)||"center",minWidth:(f==null?void 0:f.width)||"40ch",width:r.unref(i).config.fullWidth?"auto":null})},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(Pc,{colIndex:r.unref(i).modal.colIndex,rowIndex:r.unref(i).modal.rowIndex,store:r.unref(i),style:r.normalizeStyle({left:r.unref(i).modal.left+"px",top:r.unref(i).modal.top+"px",maxWidth:r.unref(i).modal.width+"px"})},{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,["colIndex","rowIndex","store","style"]),[[r.vShow,r.unref(i).modal.visible]])],!0)],4))}}),Ic=(e,t)=>{const n=e.__vccOpts||e;for(const[o,s]of t)n[o]=s;return n},Rc=Ic(Dc,[["__scopeId","data-v-89c2133f"]]),ir=r.defineComponent({__name:"Records",setup(e){const{stonecrop:t,isReady:n}=xn(),o={view:"list"};return(s,a)=>r.unref(n)?(r.openBlock(),r.createBlock(r.unref(Rc),{key:0,columns:r.unref(t).schema.schema.toArray(),rows:r.unref(t).store.records,config:o},null,8,["columns","rows"])):r.createCommentVNode("",!0)}}),Ac={class:"tabs"},Tc={tabindex:"0"},jc={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"},Bc={tabindex:"0"},Lc={style:{width:"11pt"}},cr=ut(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()})},l=u=>{u.preventDefault(),u.stopPropagation()},p=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",Ac,[r.createElementVNode("li",{class:"hidebreadcrumbs",onClick:i,onKeydown:r.withKeys(i,["enter"])},[r.createElementVNode("a",Tc,[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",jc,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?Ht(o,t,s,c):Uo(o,s,c),process.env.NODE_ENV!=="production"&&(i._pinia=c));const f=c._s.get(o);if(process.env.NODE_ENV!=="production"&&l){const d="__hot:"+o,p=a?Ht(d,t,s,c,!0):Uo(d,Q({},s),c,!0);l._hotUpdate(p),delete c.state.value[d],c._s.delete(d)}if(process.env.NODE_ENV!=="production"&&Me){const d=r.getCurrentInstance();if(d&&d.proxy&&!l){const p=d.proxy,h="_pStores"in p?p._pStores:p._pStores={};h[o]=f}}return f}return i.$id=o,i}function Fo(e){return r.getCurrentScope()?(r.onScopeDispose(e),!0):!1}function zt(e){return typeof e=="function"?e():r.unref(e)}const Bi=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const Li=e=>e!=null,Mi=Object.prototype.toString,Wi=e=>Mi.call(e)==="[object Object]",Ui=()=>{},We=Bi?window:void 0;function Ue(e){var t;const n=zt(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 Ui;Array.isArray(n)||(n=[n]),Array.isArray(o)||(o=[o]);const a=[],i=()=>{a.forEach(f=>f()),a.length=0},c=(f,d,p,h)=>(f.addEventListener(d,p,h),()=>f.removeEventListener(d,p,h)),l=r.watch(()=>[Ue(t),zt(s)],([f,d])=>{if(i(),!f)return;const p=Wi(d)?{...d}:d;a.push(...n.flatMap(h=>o.map(m=>c(f,h,m,p))))},{immediate:!0,flush:"post"}),u=()=>{l(),i()};return Fo(u),u}function Fi(){const e=r.ref(!1),t=r.getCurrentInstance();return t&&r.onMounted(()=>{e.value=!0},t),e}function Hi(e){const t=Fi();return r.computed(()=>(t.value,!!e()))}function zi(e,t,n={}){const{window:o=We,...s}=n;let a;const i=Hi(()=>o&&"MutationObserver"in o),c=()=>{a&&(a.disconnect(),a=void 0)},l=r.computed(()=>{const p=zt(e),h=(Array.isArray(p)?p:[p]).map(Ue).filter(Li);return new Set(h)}),u=r.watch(()=>l.value,p=>{c(),i.value&&p.size&&(a=new MutationObserver(t),p.forEach(h=>a.observe(h,s)))},{immediate:!0,flush:"post"}),f=()=>a==null?void 0:a.takeRecords(),d=()=>{u(),c()};return Fo(d),{isSupported:i,stop:d,takeRecords:f}}function qi(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 u;let f=a==null?void 0:a.activeElement;if(o)for(;f!=null&&f.shadowRoot;)f=(u=f==null?void 0:f.shadowRoot)==null?void 0:u.activeElement;return f},c=r.ref(),l=()=>{c.value=i()};return n&&(Fe(n,"blur",u=>{u.relatedTarget===null&&l()},!0),Fe(n,"focus",l,!0)),s&&zi(a,u=>{u.filter(f=>f.removedNodes.length).map(f=>Array.from(f.removedNodes)).flat().forEach(f=>{f===c.value&&l()})},{childList:!0,subtree:!0}),l(),c}const Gi="focusin",Ji="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=qi(t);return!n||!i.value?{focused:a}:(Fe(o,Gi,()=>s.value=!0),Fe(o,Ji,()=>s.value=!1),{focused:a})}function Yi(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=Yi(e).value;return t=t&&e.offsetHeight>0,t},ce=e=>e.tabIndex>=0,Ho=e=>{const t=e.target;return qt(t)},qt=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))?qt(n):n},Qi=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.children[n.cellIndex];a&&(o=a)}}else if(n instanceof HTMLTableRowElement){const s=n.parentElement;if(s){const a=s.firstElementChild;a&&(o=a)}}return o&&(!ce(o)||!ie(o))?Gt(o):o},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.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))?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.lastElementChild.children[n.cellIndex];a&&(o=a)}}else if(n instanceof HTMLTableRowElement){const s=n.parentElement;if(s){const a=s.lastElementChild;a&&(o=a)}}return o&&(!ce(o)||!ie(o))?qt(o):o},qo=e=>{const t=e.target;return Jt(t)},Jt=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))?Jt(n):n},Go=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},Jo=e=>{const t=e.target.parentElement.firstElementChild;return t&&(!ce(t)||!ie(t))?Kt(t):t},Ko=e=>{const t=e.target.parentElement.lastElementChild;return t&&(!ce(t)||!ie(t))?Jt(t):t},st=["alt","control","shift","meta"],Zi={ArrowUp:"up",ArrowDown:"down",ArrowLeft:"left",ArrowRight:"right"},Yt={"keydown.up":e=>{const t=Ho(e);t&&(e.preventDefault(),e.stopPropagation(),t.focus())},"keydown.down":e=>{const t=zo(e);t&&(e.preventDefault(),e.stopPropagation(),t.focus())},"keydown.left":e=>{const t=qo(e);e.preventDefault(),e.stopPropagation(),t&&t.focus()},"keydown.right":e=>{const t=Go(e);e.preventDefault(),e.stopPropagation(),t&&t.focus()},"keydown.control.up":e=>{const t=Qi(e);t&&(e.preventDefault(),e.stopPropagation(),t.focus())},"keydown.control.down":e=>{const t=Xi(e);t&&(e.preventDefault(),e.stopPropagation(),t.focus())},"keydown.control.left":e=>{const t=Jo(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=zo(e);t&&t.focus()}},"keydown.shift.enter":e=>{if(e.target instanceof HTMLTableCellElement){e.preventDefault(),e.stopPropagation();const t=Ho(e);t&&t.focus()}},"keydown.home":e=>{const t=Jo(e);t&&(e.preventDefault(),e.stopPropagation(),t.focus())},"keydown.tab":e=>{const t=Go(e);t&&(e.preventDefault(),e.stopPropagation(),t.focus())},"keydown.shift.tab":e=>{const t=qo(e);t&&(e.preventDefault(),e.stopPropagation(),t.focus())}};function Yo(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=>{const c=t(i);let l=[];if(typeof i.selectors=="string")l=c?Array.from(c.querySelectorAll(i.selectors)):Array.from(document.querySelectorAll(i.selectors));else if(Array.isArray(i.selectors))for(const u of i.selectors)u instanceof HTMLElement?l.push(u):l.push(u.$el);else if(i.selectors instanceof HTMLElement)l.push(i.selectors);else if(Array.isArray(i.selectors.value))for(const u of i.selectors.value)u instanceof HTMLElement?l.push(u):l.push(u.$el);else l.push(i.selectors.value);return l},o=i=>{const c=t(i);let l=[];return i.selectors?l=n(i):c&&(l=Array.from(c.children).filter(u=>ce(u)&&ie(u))),l},s=i=>c=>{const l=Zi[c.key]||c.key.toLowerCase();if(st.includes(l))return;const u=i.handlers||Yt;for(const f of Object.keys(u)){const[d,...p]=f.split(".");if(d==="keydown"&&p.includes(l)){const h=u[f],m=p.filter(N=>st.includes(N)),b=st.some(N=>{const _=N.charAt(0).toUpperCase()+N.slice(1);return c.getModifierState(_)});if(m.length>0){if(b){for(const N of st)if(p.includes(N)){const _=N.charAt(0).toUpperCase()+N.slice(1);c.getModifierState(_)&&h(c)}}}else b||h(c)}}},a=[];r.onMounted(()=>{for(const i of e){const c=t(i),l=o(i),u=s(i),f=c?[c]:l;for(const d of f){const{focused:p}=Ki(r.ref(d)),h=r.watch(p,m=>{m?d.addEventListener("keydown",u):d.removeEventListener("keydown",u)});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 Qt=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const ec=e=>e!=null,tc=Object.prototype.toString,Qo=e=>tc.call(e)==="[object Object]",Oe=()=>{},Xt=nc();function nc(){var e,t;return Qt&&((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 oc(e){return r.getCurrentInstance()}function rc(...e){if(e.length!==1)return r.toRef(...e);const t=e[0];return typeof t=="function"?r.readonly(r.customRef(()=>({get:t,set:Oe}))):r.ref(t)}function sc(e,t=!0,n){oc()?r.onMounted(e,n):t?e():r.nextTick(e)}const Zt=Qt?window:void 0;function Se(e){var t;const n=X(e);return(t=n==null?void 0:n.$el)!=null?t:n}function Xo(...e){let t,n,o,s;if(typeof e[0]=="string"||Array.isArray(e[0])?([n,o,s]=e,t=Zt):[t,n,o,s]=e,!t)return Oe;Array.isArray(n)||(n=[n]),Array.isArray(o)||(o=[o]);const a=[],i=()=>{a.forEach(f=>f()),a.length=0},c=(f,d,p,h)=>(f.addEventListener(d,p,h),()=>f.removeEventListener(d,p,h)),l=r.watch(()=>[Se(t),X(s)],([f,d])=>{if(i(),!f)return;const p=Qo(d)?{...d}:d;a.push(...n.flatMap(h=>o.map(m=>c(f,h,m,p))))},{immediate:!0,flush:"post"}),u=()=>{l(),i()};return He(u),u}function ac(){const e=r.ref(!1),t=r.getCurrentInstance();return t&&r.onMounted(()=>{e.value=!0},t),e}function Zo(e){const t=ac();return r.computed(()=>(t.value,!!e()))}function er(e,t,n={}){const{window:o=Zt,...s}=n;let a;const i=Zo(()=>o&&"MutationObserver"in o),c=()=>{a&&(a.disconnect(),a=void 0)},l=r.computed(()=>{const p=X(e),h=(Array.isArray(p)?p:[p]).map(Se).filter(ec);return new Set(h)}),u=r.watch(()=>l.value,p=>{c(),i.value&&p.size&&(a=new MutationObserver(t),p.forEach(h=>a.observe(h,s)))},{immediate:!0,flush:"post"}),f=()=>a==null?void 0:a.takeRecords(),d=()=>{u(),c()};return He(d),{isSupported:i,stop:d,takeRecords:f}}function ic(e,t,n={}){const{window:o=Zt,...s}=n;let a;const i=Zo(()=>o&&"ResizeObserver"in o),c=()=>{a&&(a.disconnect(),a=void 0)},l=r.computed(()=>{const d=X(e);return Array.isArray(d)?d.map(p=>Se(p)):[Se(d)]}),u=r.watch(l,d=>{if(c(),i.value&&o){a=new ResizeObserver(t);for(const p of d)p&&a.observe(p,s)}},{immediate:!0,flush:"post"}),f=()=>{c(),u()};return He(f),{isSupported:i,stop:f}}function cc(e,t={}){const{reset:n=!0,windowResize:o=!0,windowScroll:s=!0,immediate:a=!0,updateTiming:i="sync"}=t,c=r.ref(0),l=r.ref(0),u=r.ref(0),f=r.ref(0),d=r.ref(0),p=r.ref(0),h=r.ref(0),m=r.ref(0);function b(){const _=Se(e);if(!_){n&&(c.value=0,l.value=0,u.value=0,f.value=0,d.value=0,p.value=0,h.value=0,m.value=0);return}const x=_.getBoundingClientRect();c.value=x.height,l.value=x.bottom,u.value=x.left,f.value=x.right,d.value=x.top,p.value=x.width,h.value=x.x,m.value=x.y}function N(){i==="sync"?b():i==="next-frame"&&requestAnimationFrame(()=>b())}return ic(e,N),r.watch(()=>Se(e),_=>!_&&N()),er(e,N,{attributeFilter:["style","class"]}),s&&Xo("scroll",N,{capture:!0,passive:!0}),o&&Xo("resize",N,{passive:!0}),sc(()=>{a&&N()}),{height:c,bottom:l,left:u,right:f,top:d,width:p,x:h,y:m,update:N}}const lc=e=>{const t=new DOMParser().parseFromString(e,"text/html");return Array.from(t.body.childNodes).some(n=>n.nodeType===1)},uc=["data-colindex","data-rowindex","data-editable","contenteditable","tabindex"],dc=["innerHTML"],pc={key:2},fc=r.defineComponent({__name:"ACell",props:{colIndex:{},rowIndex:{},store:{},addNavigation:{type:[Boolean,Object],default:!0},tabIndex:{default:0},pinned:{type:Boolean}},setup(e){const t=r.useTemplateRef("cell"),{bottom:n,left:o}=cc(t),s=e.store.getCellData(e.colIndex,e.rowIndex),a=r.ref(e.store.getCellDisplayValue(e.colIndex,e.rowIndex)),i=r.ref(""),c=r.ref(!1),l=e.store.columns[e.colIndex],u=e.store.rows[e.rowIndex],f=l.align||"center",d=l.width||"40ch";r.watch(()=>e.store.getCellData(e.colIndex,e.rowIndex),_=>{a.value=e.store.getFormattedValue(e.colIndex,e.rowIndex,_)});const p=r.computed(()=>typeof a.value=="string"?lc(a.value):!1),h=r.computed(()=>{var _;return{textAlign:f,width:d,backgroundColor:c.value?"var(--sc-cell-changed-color)":"inherit",fontWeight:c.value?"bold":"inherit",paddingLeft:e.store.getIndent(e.colIndex,(_=e.store.display[e.rowIndex])==null?void 0:_.indent)}}),m=()=>{l.mask,l.modalComponent&&e.store.$patch(_=>{_.modal.visible=!0,_.modal.colIndex=e.colIndex,_.modal.rowIndex=e.rowIndex,_.modal.parent=t.value,_.modal.top=n.value,_.modal.left=o.value,_.modal.width=d,typeof l.modalComponent=="function"?_.modal.component=l.modalComponent({table:_.table,row:u,column:l}):_.modal.component=l.modalComponent,_.modal.componentProps=l.modalComponentExtraProps})};if(e.addNavigation){let _={...Yt,"keydown.f2":m,"keydown.alt.up":m,"keydown.alt.down":m,"keydown.alt.left":m,"keydown.alt.right":m};typeof e.addNavigation=="object"&&(_={..._,...e.addNavigation}),Yo([{selectors:t,handlers:_}])}const b=()=>{t.value&&(i.value=t.value.textContent)},N=()=>{t.value&&(l.format?c.value=t.value.textContent!==e.store.getFormattedValue(e.colIndex,e.rowIndex,s):c.value=t.value.textContent!==s,t.value.textContent!==i.value&&(i.value=t.value.textContent,t.value.dispatchEvent(new Event("change")),l.format||e.store.setCellData(e.colIndex,e.rowIndex,i.value)))};return(_,x)=>(r.openBlock(),r.createElementBlock("td",{ref:"cell","data-colindex":_.colIndex,"data-rowindex":_.rowIndex,"data-editable":r.unref(l).edit,contenteditable:r.unref(l).edit,tabindex:_.tabIndex,spellcheck:!1,style:r.normalizeStyle(h.value),onFocus:b,onPaste:N,onBlur:N,onInput:N,onClick:m,class:r.normalizeClass(["atable-cell",_.pinned?"sticky-column":""])},[r.unref(l).cellComponent?(r.openBlock(),r.createBlock(r.resolveDynamicComponent(r.unref(l).cellComponent),r.mergeProps({key:0,value:a.value},r.unref(l).cellComponentProps),null,16,["value"])):p.value?(r.openBlock(),r.createElementBlock("span",{key:1,innerHTML:a.value},null,8,dc)):(r.openBlock(),r.createElementBlock("span",pc,r.toDisplayString(a.value),1))],46,uc))}}),hc=["tabindex"],mc=r.defineComponent({__name:"ARow",props:{rowIndex:{},store:{},tabIndex:{default:()=>-1},addNavigation:{type:[Boolean,Object],default:!1}},setup(e){const t=r.useTemplateRef("rowEl"),n=e.store.isRowVisible(e.rowIndex),o=e.store.getRowExpandSymbol(e.rowIndex);if(e.addNavigation){let s=Yt;typeof e.addNavigation=="object"&&(s={...s,...e.addNavigation}),Yo([{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(r.unref(o)),3)):r.createCommentVNode("",!0)]):r.createCommentVNode("",!0),r.renderSlot(s.$slots,"default")],8,hc)),[[r.vShow,r.unref(n)]])}}),tr=Qt?window:void 0;function ze(e){var t;const n=X(e);return(t=n==null?void 0:n.$el)!=null?t:n}function at(...e){let t,n,o,s;if(typeof e[0]=="string"||Array.isArray(e[0])?([n,o,s]=e,t=tr):[t,n,o,s]=e,!t)return Oe;Array.isArray(n)||(n=[n]),Array.isArray(o)||(o=[o]);const a=[],i=()=>{a.forEach(f=>f()),a.length=0},c=(f,d,p,h)=>(f.addEventListener(d,p,h),()=>f.removeEventListener(d,p,h)),l=r.watch(()=>[ze(t),X(s)],([f,d])=>{if(i(),!f)return;const p=Qo(d)?{...d}:d;a.push(...n.flatMap(h=>o.map(m=>c(f,h,m,p))))},{immediate:!0,flush:"post"}),u=()=>{l(),i()};return He(u),u}let nr=!1;function or(e,t,n={}){const{window:o=tr,ignore:s=[],capture:a=!0,detectIframe:i=!1}=n;if(!o)return Oe;Xt&&!nr&&(nr=!0,Array.from(o.document.body.children).forEach(m=>m.addEventListener("click",Oe)),o.document.documentElement.addEventListener("click",Oe));let c=!0;const l=m=>X(s).some(b=>{if(typeof b=="string")return Array.from(o.document.querySelectorAll(b)).some(N=>N===m.target||m.composedPath().includes(N));{const N=ze(b);return N&&(m.target===N||m.composedPath().includes(N))}});function u(m){const b=X(m);return b&&b.$.subTree.shapeFlag===16}function f(m,b){const N=X(m),_=N.$.subTree&&N.$.subTree.children;return _==null||!Array.isArray(_)?!1:_.some(x=>x.el===b.target||b.composedPath().includes(x.el))}const d=m=>{const b=ze(e);if(m.target!=null&&!(!(b instanceof Element)&&u(e)&&f(e,m))&&!(!b||b===m.target||m.composedPath().includes(b))){if(m.detail===0&&(c=!l(m)),!c){c=!0;return}t(m)}};let p=!1;const h=[at(o,"click",m=>{p||(p=!0,setTimeout(()=>{p=!1},0),d(m))},{passive:!0,capture:a}),at(o,"pointerdown",m=>{const b=ze(e);c=!l(m)&&!!(b&&!m.composedPath().includes(b))},{passive:!0}),i&&at(o,"blur",m=>{setTimeout(()=>{var b;const N=ze(e);((b=o.document.activeElement)==null?void 0:b.tagName)==="IFRAME"&&!(N!=null&&N.contains(o.document.activeElement))&&t(m)},0)})].filter(Boolean);return()=>h.forEach(m=>m())}const gc={mounted(e,t){const n=!t.modifiers.bubble;if(typeof t.value=="function")e.__onClickOutside_stop=or(e,t.value,{capture:n});else{const[o,s]=t.value;e.__onClickOutside_stop=or(e,o,Object.assign({capture:n},s))}},unmounted(e){e.__onClickOutside_stop()}};function en(e){return typeof Window<"u"&&e instanceof Window?e.document.documentElement:typeof Document<"u"&&e instanceof Document?e.documentElement:e}function rr(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:rr(n)}}function yc(e){const t=e||window.event,n=t.target;return rr(n)?!1:t.touches.length>1?!0:(t.preventDefault&&t.preventDefault(),!1)}const tn=new WeakMap;function wc(e,t=!1){const n=r.ref(t);let o=null,s="";r.watch(rc(e),c=>{const l=en(X(c));if(l){const u=l;if(tn.get(u)||tn.set(u,u.style.overflow),u.style.overflow!=="hidden"&&(s=u.style.overflow),u.style.overflow==="hidden")return n.value=!0;if(n.value)return u.style.overflow="hidden"}},{immediate:!0});const a=()=>{const c=en(X(e));!c||n.value||(Xt&&(o=at(c,"touchmove",l=>{yc(l)},{passive:!1})),c.style.overflow="hidden",n.value=!0)},i=()=>{const c=en(X(e));!c||!n.value||(Xt&&(o==null||o()),c.style.overflow=s,tn.delete(c),n.value=!1)};return He(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=wc(n,o.value);r.watch(t,a=>s.value=a)}}bc();const vc={key:0,id:"resizable"},Ec={class:"atable-header-row",tabindex:"-1"},_c=r.defineComponent({__name:"ATableHeader",props:{columns:{},store:{}},setup(e){return(t,n)=>t.columns.length?(r.openBlock(),r.createElementBlock("thead",vc,[r.createElementVNode("tr",Ec,[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)}}),kc=r.defineComponent({__name:"ATableModal",props:{colIndex:{},rowIndex:{},store:{}},setup(e){const t=n=>{n.stopPropagation()};return(n,o)=>(r.openBlock(),r.createElementBlock("div",{class:"amodal",tabindex:"-1",onClick:t,onInput:t},[r.renderSlot(n.$slots,"default")],32))}}),Nc=e=>{const t=e.id||crypto.randomUUID();return ji(`table-${t}`,()=>{const n=()=>{const O={};for(const[C,w]of s.value.entries())for(const[j,E]of a.value.entries())O[`${C}:${j}`]=E[w.name];return O},o=O=>{const C=[Object.assign({},{rowModified:!1})];if(O&&"0:0"in O)return O;const w=new Set;for(let j=a.value.length-1;j>=0;j--){const E=a.value[j];E.parent&&w.add(E.parent),C[j]={childrenOpen:!1,expanded:!1,indent:E.indent||null,isParent:w.has(j),isRoot:E.parent===null||E.parent===void 0,rowModified:!1,open:E.parent===null||E.parent===void 0,parent:E.parent}}return C},s=r.ref(e.columns),a=r.ref(e.rows),i=r.ref(e.config||{}),c=r.ref(e.table||n()),l=r.ref(o(e.display)),u=r.ref(e.modal||{visible:!1}),f=r.computed(()=>s.value.some(O=>O.pinned)),d=r.computed(()=>`${Math.ceil(a.value.length/100+1)}ch`),p=r.computed(()=>["list","tree","list-expansion"].includes(i.value.view)),h=(O,C)=>c.value[`${O}:${C}`],m=(O,C,w)=>{const j=`${O}:${C}`,E=s.value[O];c.value[j]!==w&&(l.value[C].rowModified=!0),c.value[j]=w,a.value[C][E.name]=w},b=O=>({minWidth:O.width||"40ch",textAlign:O.align||"center",width:i.value.fullWidth?"auto":null}),N=O=>i.value.view!=="tree"||l.value[O].isRoot||l.value[O].open,_=O=>i.value.view!=="tree"?"":l.value[O].isRoot||l.value[O].isParent?l.value[O].childrenOpen?"-":"+":"",x=O=>{if(i.value.view==="tree"){l.value[O].childrenOpen=!l.value[O].childrenOpen;for(let C=a.value.length-1;C>=0;C--)l.value[C].parent===O&&(l.value[C].open=!l.value[C].open,l.value[C].childrenOpen&&x(C))}else i.value.view==="list-expansion"&&(l.value[O].expanded=!l.value[O].expanded)},I=(O,C)=>{const w=h(O,C);return B(O,C,w)},B=(O,C,w)=>{const j=s.value[O],E=a.value[C],g=j.format;return g?typeof g=="function"?g(w,{table:c.value,row:E,column:j}):typeof g=="string"?Function(`"use strict";return (${g})`)()(w,{table:c.value,row:E,column:j}):w:w};return{columns:s,rows:a,config:i,table:c,display:l,modal:u,hasPinnedColumns:f,numberedRowWidth:d,zeroColumn:p,closeModal:O=>{var C;O.target instanceof Node&&(C=u.value.parent)!=null&&C.contains(O.target)||u.value.visible&&(u.value.visible=!1)},getCellData:h,getCellDisplayValue:I,getFormattedValue:B,getHeaderCellStyle:b,getIndent:(O,C)=>C&&O===0&&C>0?`${C}ch`:"inherit",getRowExpandSymbol:_,isRowVisible:N,setCellData:m,toggleRowExpand:x}})()},$c=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=Nc({columns:e.columns,rows:a,id:e.id,config:e.config});i.$onAction(({name:l,store:u,args:f})=>{if(l==="setCellData"){const[d,p,h]=f,m=u.getCellData(d,p);o("cellUpdate",[d,p,h,m])}}),r.watch(()=>i.rows,l=>{o("update:modelValue",l)},{deep:!0}),r.onMounted(()=>{e.columns.some(l=>l.pinned)&&(c(),i.config.view==="tree"&&er(s,c,{childList:!0,subtree:!0}))});const c=()=>{const l=s.value,u=l.rows[0],f=l.rows[1],d=u?Array.from(u.cells):[];for(const[p,h]of d.entries()){const m=f==null?void 0:f.cells[p];m&&(h.style.width=`${m.offsetWidth}px`)}for(const p of l.rows){let h=0;const m=[];for(const b of p.cells)(b.classList.contains("sticky-column")||b.classList.contains("sticky-index"))&&(b.style.left=`${h}px`,h+=b.offsetWidth,m.push(b));m.length>0&&m[m.length-1].classList.add("sticky-column-edge")}};return window.addEventListener("keydown",l=>{if(l.key==="Escape"&&i.modal.visible){i.modal.visible=!1;const u=i.modal.parent;u&&r.nextTick().then(()=>{u.focus()})}}),t({store:i}),(l,u)=>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(_c,{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,(f,d)=>(r.openBlock(),r.createBlock(mc,{key:f.id,row:f,rowIndex:d,store:r.unref(i)},{default:r.withCtx(()=>[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(i).columns,(p,h)=>(r.openBlock(),r.createBlock(fc,{key:p.name,store:r.unref(i),col:p,spellcheck:"false",pinned:p.pinned,rowIndex:d,colIndex:h,component:p.cellComponent,style:r.normalizeStyle({textAlign:(p==null?void 0:p.align)||"center",minWidth:(p==null?void 0:p.width)||"40ch",width:r.unref(i).config.fullWidth?"auto":null})},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(kc,{colIndex:r.unref(i).modal.colIndex,rowIndex:r.unref(i).modal.rowIndex,store:r.unref(i),style:r.normalizeStyle({left:r.unref(i).modal.left+"px",top:r.unref(i).modal.top+"px",maxWidth:r.unref(i).modal.width+"px"})},{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,["colIndex","rowIndex","store","style"]),[[r.vShow,r.unref(i).modal.visible]])],!0)],4)),[[r.unref(gc),r.unref(i).closeModal]])}}),Oc=(e,t)=>{const n=e.__vccOpts||e;for(const[o,s]of t)n[o]=s;return n},Sc=Oc($c,[["__scopeId","data-v-a7848db7"]]),sr=r.defineComponent({__name:"Records",setup(e){const{stonecrop:t,isReady:n}=xn(),o={view:"list"};return(s,a)=>r.unref(n)?(r.openBlock(),r.createBlock(r.unref(Sc),{key:0,columns:r.unref(t).schema.schema.toArray(),rows:r.unref(t).store.records,config:o},null,8,["columns","rows"])):r.createCommentVNode("",!0)}}),xc={class:"tabs"},Cc={tabindex:"0"},Pc={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"},Vc={tabindex:"0"},Dc={style:{width:"11pt"}},ar=ut(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()})},l=d=>{d.preventDefault(),d.stopPropagation()},u=async d=>{d.preventDefault(),d.stopPropagation(),await c()},f=()=>{};return(d,p)=>{const h=r.resolveComponent("router-link");return r.openBlock(),r.createElementBlock("footer",null,[r.createElementVNode("ul",xc,[r.createElementVNode("li",{class:"hidebreadcrumbs",onClick:i,onKeydown:r.withKeys(i,["enter"])},[r.createElementVNode("a",Cc,[r.createElementVNode("div",{class:r.normalizeClass(a.value)},"ร",2)])],32),r.createElementVNode("li",{class:"hometab",onClick:f,onKeydown:r.withKeys(f,["enter"]),style:r.normalizeStyle({display:t.value?"block":"none"})},[r.createVNode(h,{to:"/home",tabindex:"0"},{default:r.withCtx(()=>[(r.openBlock(),r.createElementBlock("svg",Pc,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=Te,c._s.has(o)||(a?zt(o,t,s,c):Uo(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",Vc,[r.createElementVNode("span",{style:r.normalizeStyle({display:n.value?"none":"block"})},[(r.openBlock(),r.createElementBlock("svg",Dc,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=>l(m)),onInput:p[2]||(p[2]=m=>l(m)),onBlur:p[3]||(p[3]=m=>u(m)),onKeydown:p[4]||(p[4]=r.withKeys(m=>u(m),["enter"])),type:"text"},null,36),[[r.vModelText,o.value]])])],36),(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(d.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"]]),Ic={install:e=>{e.component("ActionSet",sn),e.component("CommandPalette",an),e.component("Doctype",To),e.component("Records",sr),e.component("SheetNav",ar)}};J.ActionSet=sn,J.CommandPalette=an,J.Doctype=To,J.Records=sr,J.SheetNav=ar,J.StonecropDesktop=Ic,Object.defineProperty(J,Symbol.toStringTag,{value:"Module"})});
|
|
59
59
|
//# sourceMappingURL=desktop.umd.cjs.map
|