@stonecrop/desktop 0.4.32 → 0.4.34
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 +1861 -1836
- package/dist/desktop.js.map +1 -1
- package/dist/desktop.umd.cjs +11 -11
- package/dist/desktop.umd.cjs.map +1 -1
- package/package.json +5 -5
package/dist/desktop.umd.cjs
CHANGED
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
(function(q,i){typeof exports=="object"&&typeof module<"u"?i(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],i):(q=typeof globalThis<"u"?globalThis:q||self,i(q["@stonecrop/desktop"]={},q.Vue))})(this,function(q,i){"use strict";const ei={class:"action-menu-icon"},ni=["onclick"],oi={key:1},si=["onClick"],ri={class:"dropdown-container"},ii={class:"dropdown"},ai=["onclick"],ci=["href"],li={class:"dropdown-item"},ui=i.defineComponent({__name:"ActionSet",props:{elements:{}},setup(t){const e=i.ref(t.elements),n=i.ref(!1),o=i.ref(null),s=i.ref(!1),r=i.ref(!1);i.onMounted(()=>{a()});const a=()=>{for(const h of e.value)h.type==="dropdown"&&(h.show=!1)},c=()=>{s.value=!0,o.value=setTimeout(()=>{s.value&&(n.value=!0)},500)},l=()=>{s.value=!1,r.value=!1,clearTimeout(o.value),n.value=!1},u=h=>{const f=!e.value[h].show;a(),e.value[h].show=f};return(h,f)=>(i.openBlock(),i.createElementBlock("div",{class:i.normalizeClass([{"open-set":n.value,"hovered-and-closed":r.value},"action-set collapse"]),onMouseover:c,onMouseleave:l},[i.createElementVNode("div",ei,[i.createElementVNode("div",{id:"chevron",onClick:f[0]||(f[0]=d=>r.value=!r.value)},f[1]||(f[1]=[i.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"},[i.createElementVNode("polygon",{points:"54.2,33.4 29.2,58.8 25,54.6 50,29.2 "})],-1),i.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"},[i.createElementVNode("polygon",{points:"70.8,58.8 45.8,33.4 50,29.2 75,54.6 "})],-1)]))]),f[2]||(f[2]=i.createElementVNode("div",{style:{"margin-right":"30px"}},null,-1)),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(e.value,(d,p)=>(i.openBlock(),i.createElementBlock("div",{class:"action-element",key:d.label},[d.type=="button"?(i.openBlock(),i.createElementBlock("button",{key:0,onclick:d.action,class:"button-default"},i.toDisplayString(d.label),9,ni)):i.createCommentVNode("",!0),d.type=="dropdown"?(i.openBlock(),i.createElementBlock("div",oi,[i.createElementVNode("button",{class:"button-default",onClick:m=>u(p)},i.toDisplayString(d.label),9,si),i.withDirectives(i.createElementVNode("div",ri,[i.createElementVNode("div",ii,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(d.actions,m=>(i.openBlock(),i.createElementBlock("div",{key:m.label},[m.action!=null?(i.openBlock(),i.createElementBlock("button",{key:0,onclick:m.action,class:"dropdown-item"},i.toDisplayString(m.label),9,ai)):m.link!=null?(i.openBlock(),i.createElementBlock("a",{key:1,href:m.link},[i.createElementVNode("button",li,i.toDisplayString(m.label),1)],8,ci)):i.createCommentVNode("",!0)]))),128))])],512),[[i.vShow,d.show]])])):i.createCommentVNode("",!0)]))),128))],34))}}),qn=(t,e)=>{const n=t.__vccOpts||t;for(const[o,s]of e)n[o]=s;return n},Xn=qn(ui,[["__scopeId","data-v-38e7af34"]]),di={class:"command-palette-header"},fi=["placeholder"],pi={key:0,class:"command-palette-results"},hi=["onClick","onMouseover"],mi={class:"result-title"},gi={class:"result-content"},_i={key:1,class:"command-palette-no-results"},Zn=i.defineComponent({__name:"CommandPalette",props:{search:{type:Function},isOpen:{type:Boolean,default:!1},placeholder:{default:"Type a command or search..."},maxResults:{default:10}},emits:["select","close"],setup(t,{emit:e}){const n=e,o=i.ref(""),s=i.ref(0),r=i.useTemplateRef("input"),a=i.computed(()=>o.value?t.search(o.value).slice(0,t.maxResults):[]);i.watch(()=>t.isOpen,async h=>{h&&(o.value="",s.value=0,await i.nextTick(),r.value?.focus())}),i.watch(a,()=>{s.value=0});const c=()=>{n("close")},l=h=>{switch(h.key){case"Escape":c();break;case"ArrowDown":h.preventDefault(),a.value.length&&(s.value=(s.value+1)%a.value.length);break;case"ArrowUp":h.preventDefault(),a.value.length&&(s.value=(s.value-1+a.value.length)%a.value.length);break;case"Enter":a.value.length&&s.value>=0&&u(a.value[s.value]);break}},u=h=>{n("select",h),c()};return(h,f)=>(i.openBlock(),i.createBlock(i.Teleport,{to:"body"},[i.createVNode(i.Transition,{name:"fade"},{default:i.withCtx(()=>[h.isOpen?(i.openBlock(),i.createElementBlock("div",{key:0,class:"command-palette-overlay",onClick:c},[i.createElementVNode("div",{class:"command-palette",onClick:f[1]||(f[1]=i.withModifiers(()=>{},["stop"]))},[i.createElementVNode("div",di,[i.withDirectives(i.createElementVNode("input",{ref:"input","onUpdate:modelValue":f[0]||(f[0]=d=>o.value=d),type:"text",class:"command-palette-input",placeholder:h.placeholder,autofocus:"",onKeydown:l},null,40,fi),[[i.vModelText,o.value]])]),a.value.length?(i.openBlock(),i.createElementBlock("div",pi,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(a.value,(d,p)=>(i.openBlock(),i.createElementBlock("div",{key:p,class:i.normalizeClass(["command-palette-result",{selected:p===s.value}]),onClick:m=>u(d),onMouseover:m=>s.value=p},[i.createElementVNode("div",mi,[i.renderSlot(h.$slots,"title",{result:d})]),i.createElementVNode("div",gi,[i.renderSlot(h.$slots,"content",{result:d})])],42,hi))),128))])):o.value&&!a.value.length?(i.openBlock(),i.createElementBlock("div",_i,[i.renderSlot(h.$slots,"empty",{},()=>[i.createTextVNode(' No results found for "'+i.toDisplayString(o.value)+'" ',1)])])):i.createCommentVNode("",!0)])])):i.createCommentVNode("",!0)]),_:3})]))}}),yi=(t,e)=>{const n=t.__vccOpts||t;for(const[o,s]of e)n[o]=s;return n};function Qn(t){return i.getCurrentScope()?(i.onScopeDispose(t),!0):!1}const to=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const wi=Object.prototype.toString,Ei=t=>wi.call(t)==="[object Object]",bi=()=>{},eo=vi();function vi(){var t,e;return to&&((t=window?.navigator)==null?void 0:t.userAgent)&&(/iP(?:ad|hone|od)/.test(window.navigator.userAgent)||((e=window?.navigator)==null?void 0:e.maxTouchPoints)>2&&/iPad|Macintosh/.test(window?.navigator.userAgent))}function ki(...t){if(t.length!==1)return i.toRef(...t);const e=t[0];return typeof e=="function"?i.readonly(i.customRef(()=>({get:e,set:bi}))):i.ref(e)}function $e(t){return Array.isArray(t)?t:[t]}function Si(t,e,n){return i.watch(t,e,{...n,immediate:!0})}const Oi=to?window:void 0;function Ii(t){var e;const n=i.toValue(t);return(e=n?.$el)!=null?e:n}function Ti(...t){const e=[],n=()=>{e.forEach(c=>c()),e.length=0},o=(c,l,u,h)=>(c.addEventListener(l,u,h),()=>c.removeEventListener(l,u,h)),s=i.computed(()=>{const c=$e(i.toValue(t[0])).filter(l=>l!=null);return c.every(l=>typeof l!="string")?c:void 0}),r=Si(()=>{var c,l;return[(l=(c=s.value)==null?void 0:c.map(u=>Ii(u)))!=null?l:[Oi].filter(u=>u!=null),$e(i.toValue(s.value?t[1]:t[0])),$e(i.unref(s.value?t[2]:t[1])),i.toValue(s.value?t[3]:t[2])]},([c,l,u,h])=>{if(n(),!c?.length||!l?.length||!u?.length)return;const f=Ei(h)?{...h}:h;e.push(...c.flatMap(d=>l.flatMap(p=>u.map(m=>o(d,p,m,f)))))},{flush:"post"}),a=()=>{r(),n()};return Qn(n),a}function Pe(t){return typeof Window<"u"&&t instanceof Window?t.document.documentElement:typeof Document<"u"&&t instanceof Document?t.documentElement:t}function no(t){const e=window.getComputedStyle(t);if(e.overflowX==="scroll"||e.overflowY==="scroll"||e.overflowX==="auto"&&t.clientWidth<t.scrollWidth||e.overflowY==="auto"&&t.clientHeight<t.scrollHeight)return!0;{const n=t.parentNode;return!n||n.tagName==="BODY"?!1:no(n)}}function xi(t){const e=t||window.event,n=e.target;return no(n)?!1:e.touches.length>1?!0:(e.preventDefault&&e.preventDefault(),!1)}const Re=new WeakMap;function Vi(t,e=!1){const n=i.shallowRef(e);let o=null,s="";i.watch(ki(t),c=>{const l=Pe(i.toValue(c));if(l){const u=l;if(Re.get(u)||Re.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 r=()=>{const c=Pe(i.toValue(t));!c||n.value||(eo&&(o=Ti(c,"touchmove",l=>{xi(l)},{passive:!1})),c.style.overflow="hidden",n.value=!0)},a=()=>{const c=Pe(i.toValue(t));!c||!n.value||(eo&&o?.(),c.style.overflow=s,Re.delete(c),n.value=!1)};return Qn(a),i.computed({get(){return n.value},set(c){c?r():a()}})}function Ni(){let t=!1;const e=i.shallowRef(!1);return(n,o)=>{if(e.value=o.value,t)return;t=!0;const s=Vi(n,o.value);i.watch(e,r=>s.value=r)}}Ni(),typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const Ci={class:"aform"},$i=i.defineComponent({__name:"AForm",props:{modelValue:{},data:{},readonly:{type:Boolean}},emits:["update:modelValue"],setup(t,{emit:e}){const n=e,o=i.ref(t.data||{}),s=a=>{let c={};for(const[l,u]of Object.entries(a))["component","fieldtype"].includes(l)||(c[l]=u),l==="rows"&&u&&u.length===0&&(c.rows=o.value[a.fieldname]);return c},r=i.computed({get:()=>t.modelValue.map((a,c)=>i.computed({get(){return a.value},set:l=>{t.modelValue[c].value=l,n("update:modelValue",t.modelValue)}})),set:()=>{}});return(a,c)=>(i.openBlock(),i.createElementBlock("form",Ci,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(a.modelValue,(l,u)=>(i.openBlock(),i.createBlock(i.resolveDynamicComponent(l.component),i.mergeProps({key:u,schema:l,modelValue:r.value[u].value,"onUpdate:modelValue":h=>r.value[u].value=h,data:o.value[l.fieldname],readonly:a.readonly},{ref_for:!0},s(l)),null,16,["schema","modelValue","onUpdate:modelValue","data","readonly"]))),128))]))}}),Pi=yi($i,[["__scopeId","data-v-68845234"]]);function Ri(){if(typeof globalThis<"u")return globalThis;if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global}function Di(){const t=Ri();if(t.__xstate__)return t.__xstate__}const Ai=t=>{if(typeof window>"u")return;const e=Di();e&&e.register(t)};class oo{constructor(e){this._process=e,this._active=!1,this._current=null,this._last=null}start(){this._active=!0,this.flush()}clear(){this._current&&(this._current.next=null,this._last=this._current)}enqueue(e){const n={value:e,next:null};if(this._current){this._last.next=n,this._last=n;return}this._current=n,this._last=n,this._active&&this.flush()}flush(){for(;this._current;){const e=this._current;this._process(e.value),this._current=e.next}this._last=null}}const so=".",Li="",ro="",ji="#",Mi="*",io="xstate.init",De="xstate.stop";function Bi(t,e){return{type:`xstate.after.${t}.${e}`}}function Ae(t,e){return{type:`xstate.done.state.${t}`,output:e}}function Ui(t,e){return{type:`xstate.done.actor.${t}`,output:e,actorId:t}}function zi(t,e){return{type:`xstate.error.actor.${t}`,error:e,actorId:t}}function ao(t){return{type:io,input:t}}function nt(t){setTimeout(()=>{throw t})}const Hi=typeof Symbol=="function"&&Symbol.observable||"@@observable";function co(t,e){const n=lo(t),o=lo(e);return typeof o=="string"?typeof n=="string"?o===n:!1:typeof n=="string"?n in o:Object.keys(n).every(s=>s in o?co(n[s],o[s]):!1)}function Le(t){if(po(t))return t;const e=[];let n="";for(let o=0;o<t.length;o++){switch(t.charCodeAt(o)){case 92:n+=t[o+1],o++;continue;case 46:e.push(n),n="";continue}n+=t[o]}return e.push(n),e}function lo(t){if(ka(t))return t.value;if(typeof t!="string")return t;const e=Le(t);return Ki(e)}function Ki(t){if(t.length===1)return t[0];const e={};let n=e;for(let o=0;o<t.length-1;o++)if(o===t.length-2)n[t[o]]=t[o+1];else{const s=n;n={},s[t[o]]=n}return e}function uo(t,e){const n={},o=Object.keys(t);for(let s=0;s<o.length;s++){const r=o[s];n[r]=e(t[r],r,t,s)}return n}function fo(t){return po(t)?t:[t]}function at(t){return t===void 0?[]:fo(t)}function je(t,e,n,o){return typeof t=="function"?t({context:e,event:n,self:o}):t}function po(t){return Array.isArray(t)}function Fi(t){return t.type.startsWith("xstate.error.actor")}function St(t){return fo(t).map(e=>typeof e>"u"||typeof e=="string"?{target:e}:e)}function ho(t){if(!(t===void 0||t===Li))return at(t)}function Me(t,e,n){const o=typeof t=="object",s=o?t:void 0;return{next:(o?t.next:t)?.bind(s),error:(o?t.error:e)?.bind(s),complete:(o?t.complete:n)?.bind(s)}}function mo(t,e){return`${e}.${t}`}function Be(t,e){const n=e.match(/^xstate\.invoke\.(\d+)\.(.*)/);if(!n)return t.implementations.actors[e];const[,o,s]=n,r=t.getStateNodeById(s).config.invoke;return(Array.isArray(r)?r[o]:r).src}function go(t,e){return`${t.sessionId}.${e}`}let Wi=0;function Gi(t,e){const n=new Map,o=new Map,s=new WeakMap,r=new Set,a={},{clock:c,logger:l}=e,u={schedule:(d,p,m,y,g=Math.random().toString(36).slice(2))=>{const w={source:d,target:p,event:m,delay:y,id:g,startedAt:Date.now()},O=go(d,g);f._snapshot._scheduledEvents[O]=w;const V=c.setTimeout(()=>{delete a[O],delete f._snapshot._scheduledEvents[O],f._relay(d,p,m)},y);a[O]=V},cancel:(d,p)=>{const m=go(d,p),y=a[m];delete a[m],delete f._snapshot._scheduledEvents[m],y!==void 0&&c.clearTimeout(y)},cancelAll:d=>{for(const p in f._snapshot._scheduledEvents){const m=f._snapshot._scheduledEvents[p];m.source===d&&u.cancel(d,m.id)}}},h=d=>{if(!r.size)return;const p={...d,rootId:t.sessionId};r.forEach(m=>m.next?.(p))},f={_snapshot:{_scheduledEvents:(e?.snapshot&&e.snapshot.scheduler)??{}},_bookId:()=>`x:${Wi++}`,_register:(d,p)=>(n.set(d,p),d),_unregister:d=>{n.delete(d.sessionId);const p=s.get(d);p!==void 0&&(o.delete(p),s.delete(d))},get:d=>o.get(d),_set:(d,p)=>{const m=o.get(d);if(m&&m!==p)throw new Error(`Actor with system ID '${d}' already exists.`);o.set(d,p),s.set(p,d)},inspect:d=>{const p=Me(d);return r.add(p),{unsubscribe(){r.delete(p)}}},_sendInspectionEvent:h,_relay:(d,p,m)=>{f._sendInspectionEvent({type:"@xstate.event",sourceRef:d,actorRef:p,event:m}),p._send(m)},scheduler:u,getSnapshot:()=>({_scheduledEvents:{...f._snapshot._scheduledEvents}}),start:()=>{const d=f._snapshot._scheduledEvents;f._snapshot._scheduledEvents={};for(const p in d){const{source:m,target:y,event:g,delay:w,id:O}=d[p];u.schedule(m,y,g,w,O)}},_clock:c,_logger:l};return f}let Ue=!1;const ze=1;let W=function(t){return t[t.NotStarted=0]="NotStarted",t[t.Running=1]="Running",t[t.Stopped=2]="Stopped",t}({});const Ji={clock:{setTimeout:(t,e)=>setTimeout(t,e),clearTimeout:t=>clearTimeout(t)},logger:console.log.bind(console),devTools:!1};class Yi{constructor(e,n){this.logic=e,this._snapshot=void 0,this.clock=void 0,this.options=void 0,this.id=void 0,this.mailbox=new oo(this._process.bind(this)),this.observers=new Set,this.eventListeners=new Map,this.logger=void 0,this._processingStatus=W.NotStarted,this._parent=void 0,this._syncSnapshot=void 0,this.ref=void 0,this._actorScope=void 0,this._systemId=void 0,this.sessionId=void 0,this.system=void 0,this._doneEvent=void 0,this.src=void 0,this._deferred=[];const o={...Ji,...n},{clock:s,logger:r,parent:a,syncSnapshot:c,id:l,systemId:u,inspect:h}=o;this.system=a?a.system:Gi(this,{clock:s,logger:r}),h&&!a&&this.system.inspect(Me(h)),this.sessionId=this.system._bookId(),this.id=l??this.sessionId,this.logger=n?.logger??this.system._logger,this.clock=n?.clock??this.system._clock,this._parent=a,this._syncSnapshot=c,this.options=o,this.src=o.src??e,this.ref=this,this._actorScope={self:this,id:this.id,sessionId:this.sessionId,logger:this.logger,defer:f=>{this._deferred.push(f)},system:this.system,stopChild:f=>{if(f._parent!==this)throw new Error(`Cannot stop child actor ${f.id} of ${this.id} because it is not a child`);f._stop()},emit:f=>{const d=this.eventListeners.get(f.type),p=this.eventListeners.get("*");if(!d&&!p)return;const m=[...d?d.values():[],...p?p.values():[]];for(const y of m)y(f)},actionExecutor:f=>{const d=()=>{if(this._actorScope.system._sendInspectionEvent({type:"@xstate.action",actorRef:this,action:{type:f.type,params:f.params}}),!f.exec)return;const p=Ue;try{Ue=!0,f.exec(f.info,f.params)}finally{Ue=p}};this._processingStatus===W.Running?d():this._deferred.push(d)}},this.send=this.send.bind(this),this.system._sendInspectionEvent({type:"@xstate.actor",actorRef:this}),u&&(this._systemId=u,this.system._set(u,this)),this._initState(n?.snapshot??n?.state),u&&this._snapshot.status!=="active"&&this.system._unregister(this)}_initState(e){try{this._snapshot=e?this.logic.restoreSnapshot?this.logic.restoreSnapshot(e,this._actorScope):e:this.logic.getInitialSnapshot(this._actorScope,this.options?.input)}catch(n){this._snapshot={status:"error",output:void 0,error:n}}}update(e,n){this._snapshot=e;let o;for(;o=this._deferred.shift();)try{o()}catch(s){this._deferred.length=0,this._snapshot={...e,status:"error",error:s}}switch(this._snapshot.status){case"active":for(const s of this.observers)try{s.next?.(e)}catch(r){nt(r)}break;case"done":for(const s of this.observers)try{s.next?.(e)}catch(r){nt(r)}this._stopProcedure(),this._complete(),this._doneEvent=Ui(this.id,this._snapshot.output),this._parent&&this.system._relay(this,this._parent,this._doneEvent);break;case"error":this._error(this._snapshot.error);break}this.system._sendInspectionEvent({type:"@xstate.snapshot",actorRef:this,event:n,snapshot:e})}subscribe(e,n,o){const s=Me(e,n,o);if(this._processingStatus!==W.Stopped)this.observers.add(s);else switch(this._snapshot.status){case"done":try{s.complete?.()}catch(r){nt(r)}break;case"error":{const r=this._snapshot.error;if(!s.error)nt(r);else try{s.error(r)}catch(a){nt(a)}break}}return{unsubscribe:()=>{this.observers.delete(s)}}}on(e,n){let o=this.eventListeners.get(e);o||(o=new Set,this.eventListeners.set(e,o));const s=n.bind(void 0);return o.add(s),{unsubscribe:()=>{o.delete(s)}}}start(){if(this._processingStatus===W.Running)return this;this._syncSnapshot&&this.subscribe({next:n=>{n.status==="active"&&this.system._relay(this,this._parent,{type:`xstate.snapshot.${this.id}`,snapshot:n})},error:()=>{}}),this.system._register(this.sessionId,this),this._systemId&&this.system._set(this._systemId,this),this._processingStatus=W.Running;const e=ao(this.options.input);switch(this.system._sendInspectionEvent({type:"@xstate.event",sourceRef:this._parent,actorRef:this,event:e}),this._snapshot.status){case"done":return this.update(this._snapshot,e),this;case"error":return this._error(this._snapshot.error),this}if(this._parent||this.system.start(),this.logic.start)try{this.logic.start(this._snapshot,this._actorScope)}catch(n){return this._snapshot={...this._snapshot,status:"error",error:n},this._error(n),this}return this.update(this._snapshot,e),this.options.devTools&&this.attachDevTools(),this.mailbox.start(),this}_process(e){let n,o;try{n=this.logic.transition(this._snapshot,e,this._actorScope)}catch(s){o={err:s}}if(o){const{err:s}=o;this._snapshot={...this._snapshot,status:"error",error:s},this._error(s);return}this.update(n,e),e.type===De&&(this._stopProcedure(),this._complete())}_stop(){return this._processingStatus===W.Stopped?this:(this.mailbox.clear(),this._processingStatus===W.NotStarted?(this._processingStatus=W.Stopped,this):(this.mailbox.enqueue({type:De}),this))}stop(){if(this._parent)throw new Error("A non-root actor cannot be stopped directly.");return this._stop()}_complete(){for(const e of this.observers)try{e.complete?.()}catch(n){nt(n)}this.observers.clear()}_reportError(e){if(!this.observers.size){this._parent||nt(e);return}let n=!1;for(const o of this.observers){const s=o.error;n||=!s;try{s?.(e)}catch(r){nt(r)}}this.observers.clear(),n&&nt(e)}_error(e){this._stopProcedure(),this._reportError(e),this._parent&&this.system._relay(this,this._parent,zi(this.id,e))}_stopProcedure(){return this._processingStatus!==W.Running?this:(this.system.scheduler.cancelAll(this),this.mailbox.clear(),this.mailbox=new oo(this._process.bind(this)),this._processingStatus=W.Stopped,this.system._unregister(this),this)}_send(e){this._processingStatus!==W.Stopped&&this.mailbox.enqueue(e)}send(e){this.system._relay(void 0,this,e)}attachDevTools(){const{devTools:e}=this.options;e&&(typeof e=="function"?e:Ai)(this)}toJSON(){return{xstate$$type:ze,id:this.id}}getPersistedSnapshot(e){return this.logic.getPersistedSnapshot(this._snapshot,e)}[Hi](){return this}getSnapshot(){return this._snapshot}}function Kt(t,...[e]){return new Yi(t,e)}function qi(t,e,n,o,{sendId:s}){const r=typeof s=="function"?s(n,o):s;return[e,{sendId:r},void 0]}function Xi(t,e){t.defer(()=>{t.system.scheduler.cancel(t.self,e.sendId)})}function Zi(t){function e(n,o){}return e.type="xstate.cancel",e.sendId=t,e.resolve=qi,e.execute=Xi,e}function Qi(t,e,n,o,{id:s,systemId:r,src:a,input:c,syncSnapshot:l}){const u=typeof a=="string"?Be(e.machine,a):a,h=typeof s=="function"?s(n):s;let f,d;return u&&(d=typeof c=="function"?c({context:e.context,event:n.event,self:t.self}):c,f=Kt(u,{id:h,src:a,parent:t.self,syncSnapshot:l,systemId:r,input:d})),[ht(e,{children:{...e.children,[h]:f}}),{id:s,systemId:r,actorRef:f,src:a,input:d},void 0]}function ta(t,{actorRef:e}){e&&t.defer(()=>{e._processingStatus!==W.Stopped&&e.start()})}function ea(...[t,{id:e,systemId:n,input:o,syncSnapshot:s=!1}={}]){function r(a,c){}return r.type="xstate.spawnChild",r.id=e,r.systemId=n,r.src=t,r.input=o,r.syncSnapshot=s,r.resolve=Qi,r.execute=ta,r}function na(t,e,n,o,{actorRef:s}){const r=typeof s=="function"?s(n,o):s,a=typeof r=="string"?e.children[r]:r;let c=e.children;return a&&(c={...c},delete c[a.id]),[ht(e,{children:c}),a,void 0]}function oa(t,e){if(e){if(t.system._unregister(e),e._processingStatus!==W.Running){t.stopChild(e);return}t.defer(()=>{t.stopChild(e)})}}function _o(t){function e(n,o){}return e.type="xstate.stopChild",e.actorRef=t,e.resolve=na,e.execute=oa,e}function He(t,e,n,o){const{machine:s}=o,r=typeof t=="function",a=r?t:s.implementations.guards[typeof t=="string"?t:t.type];if(!r&&!a)throw new Error(`Guard '${typeof t=="string"?t:t.type}' is not implemented.'.`);if(typeof a!="function")return He(a,e,n,o);const c={context:e,event:n},l=r||typeof t=="string"?void 0:"params"in t?typeof t.params=="function"?t.params({context:e,event:n}):t.params:void 0;return"check"in a?a.check(o,c,a):a(c,l)}const Ke=t=>t.type==="atomic"||t.type==="final";function Ot(t){return Object.values(t.states).filter(e=>e.type!=="history")}function Ft(t,e){const n=[];if(e===t)return n;let o=t.parent;for(;o&&o!==e;)n.push(o),o=o.parent;return n}function ae(t){const e=new Set(t),n=wo(e);for(const o of e)if(o.type==="compound"&&(!n.get(o)||!n.get(o).length))vo(o).forEach(s=>e.add(s));else if(o.type==="parallel"){for(const s of Ot(o))if(s.type!=="history"&&!e.has(s)){const r=vo(s);for(const a of r)e.add(a)}}for(const o of e){let s=o.parent;for(;s;)e.add(s),s=s.parent}return e}function yo(t,e){const n=e.get(t);if(!n)return{};if(t.type==="compound"){const s=n[0];if(s){if(Ke(s))return s.key}else return{}}const o={};for(const s of n)o[s.key]=yo(s,e);return o}function wo(t){const e=new Map;for(const n of t)e.has(n)||e.set(n,[]),n.parent&&(e.has(n.parent)||e.set(n.parent,[]),e.get(n.parent).push(n));return e}function Eo(t,e){const n=ae(e);return yo(t,wo(n))}function Fe(t,e){return e.type==="compound"?Ot(e).some(n=>n.type==="final"&&t.has(n)):e.type==="parallel"?Ot(e).every(n=>Fe(t,n)):e.type==="final"}const ce=t=>t[0]===ji;function sa(t,e){return t.transitions.get(e)||[...t.transitions.keys()].filter(n=>{if(n===Mi)return!0;if(!n.endsWith(".*"))return!1;const o=n.split("."),s=e.split(".");for(let r=0;r<o.length;r++){const a=o[r],c=s[r];if(a==="*")return r===o.length-1;if(a!==c)return!1}return!0}).sort((n,o)=>o.length-n.length).flatMap(n=>t.transitions.get(n))}function ra(t){const e=t.config.after;if(!e)return[];const n=o=>{const s=Bi(o,t.id),r=s.type;return t.entry.push(Pa(s,{id:r,delay:o})),t.exit.push(Zi(r)),r};return Object.keys(e).flatMap(o=>{const s=e[o],r=typeof s=="string"?{target:s}:s,a=Number.isNaN(+o)?o:+o,c=n(a);return at(r).map(l=>({...l,event:c,delay:a}))}).map(o=>{const{delay:s}=o;return{...ft(t,o.event,o),delay:s}})}function ft(t,e,n){const o=ho(n.target),s=n.reenter??!1,r=ca(t,o),a={...n,actions:at(n.actions),guard:n.guard,target:r,source:t,reenter:s,eventType:e,toJSON:()=>({...a,source:`#${t.id}`,target:r?r.map(c=>`#${c.id}`):void 0})};return a}function ia(t){const e=new Map;if(t.config.on)for(const n of Object.keys(t.config.on)){if(n===ro)throw new Error('Null events ("") cannot be specified as a transition key. Use `always: { ... }` instead.');const o=t.config.on[n];e.set(n,St(o).map(s=>ft(t,n,s)))}if(t.config.onDone){const n=`xstate.done.state.${t.id}`;e.set(n,St(t.config.onDone).map(o=>ft(t,n,o)))}for(const n of t.invoke){if(n.onDone){const o=`xstate.done.actor.${n.id}`;e.set(o,St(n.onDone).map(s=>ft(t,o,s)))}if(n.onError){const o=`xstate.error.actor.${n.id}`;e.set(o,St(n.onError).map(s=>ft(t,o,s)))}if(n.onSnapshot){const o=`xstate.snapshot.${n.id}`;e.set(o,St(n.onSnapshot).map(s=>ft(t,o,s)))}}for(const n of t.after){let o=e.get(n.eventType);o||(o=[],e.set(n.eventType,o)),o.push(n)}return e}function aa(t,e){const n=typeof e=="string"?t.states[e]:e?t.states[e.target]:void 0;if(!n&&e)throw new Error(`Initial state node "${e}" not found on parent state node #${t.id}`);const o={source:t,actions:!e||typeof e=="string"?[]:at(e.actions),eventType:null,reenter:!1,target:n?[n]:[],toJSON:()=>({...o,source:`#${t.id}`,target:n?[`#${n.id}`]:[]})};return o}function ca(t,e){if(e!==void 0)return e.map(n=>{if(typeof n!="string")return n;if(ce(n))return t.machine.getStateNodeById(n);const o=n[0]===so;if(o&&!t.parent)return le(t,n.slice(1));const s=o?t.key+n:n;if(t.parent)try{return le(t.parent,s)}catch(r){throw new Error(`Invalid transition definition for state node '${t.id}':
|
|
2
|
-
${r.message}`)}else throw new Error(`Invalid target: "${n}" is not a valid target from the root node. Did you mean ".${n}"?`)})}function bo(t){const e=ho(t.config.target);return e?{target:e.map(n=>typeof n=="string"?le(t.parent,n):n)}:t.parent.initial}function pt(t){return t.type==="history"}function vo(t){const e=ko(t);for(const n of e)for(const o of Ft(n,t))e.add(o);return e}function ko(t){const e=new Set;function n(o){if(!e.has(o)){if(e.add(o),o.type==="compound")n(o.initial.target[0]);else if(o.type==="parallel")for(const s of Ot(o))n(s)}}return n(t),e}function It(t,e){if(ce(e))return t.machine.getStateNodeById(e);if(!t.states)throw new Error(`Unable to retrieve child state '${e}' from '${t.id}'; no child states exist.`);const n=t.states[e];if(!n)throw new Error(`Child state '${e}' does not exist on '${t.id}'`);return n}function le(t,e){if(typeof e=="string"&&ce(e))try{return t.machine.getStateNodeById(e)}catch{}const n=Le(e).slice();let o=t;for(;n.length;){const s=n.shift();if(!s.length)break;o=It(o,s)}return o}function ue(t,e){if(typeof e=="string"){const s=t.states[e];if(!s)throw new Error(`State '${e}' does not exist on '${t.id}'`);return[t,s]}const n=Object.keys(e),o=n.map(s=>It(t,s)).filter(Boolean);return[t.machine.root,t].concat(o,n.reduce((s,r)=>{const a=It(t,r);if(!a)return s;const c=ue(a,e[r]);return s.concat(c)},[]))}function la(t,e,n,o){const s=It(t,e).next(n,o);return!s||!s.length?t.next(n,o):s}function ua(t,e,n,o){const s=Object.keys(e),r=It(t,s[0]),a=We(r,e[s[0]],n,o);return!a||!a.length?t.next(n,o):a}function da(t,e,n,o){const s=[];for(const r of Object.keys(e)){const a=e[r];if(!a)continue;const c=It(t,r),l=We(c,a,n,o);l&&s.push(...l)}return s.length?s:t.next(n,o)}function We(t,e,n,o){return typeof e=="string"?la(t,e,n,o):Object.keys(e).length===1?ua(t,e,n,o):da(t,e,n,o)}function fa(t){return Object.keys(t.states).map(e=>t.states[e]).filter(e=>e.type==="history")}function ct(t,e){let n=t;for(;n.parent&&n.parent!==e;)n=n.parent;return n.parent===e}function pa(t,e){const n=new Set(t),o=new Set(e);for(const s of n)if(o.has(s))return!0;for(const s of o)if(n.has(s))return!0;return!1}function So(t,e,n){const o=new Set;for(const s of t){let r=!1;const a=new Set;for(const c of o)if(pa(Je([s],e,n),Je([c],e,n)))if(ct(s.source,c.source))a.add(c);else{r=!0;break}if(!r){for(const c of a)o.delete(c);o.add(s)}}return Array.from(o)}function ha(t){const[e,...n]=t;for(const o of Ft(e,void 0))if(n.every(s=>ct(s,o)))return o}function Ge(t,e){if(!t.target)return[];const n=new Set;for(const o of t.target)if(pt(o))if(e[o.id])for(const s of e[o.id])n.add(s);else for(const s of Ge(bo(o),e))n.add(s);else n.add(o);return[...n]}function Oo(t,e){const n=Ge(t,e);if(!n)return;if(!t.reenter&&n.every(s=>s===t.source||ct(s,t.source)))return t.source;const o=ha(n.concat(t.source));if(o)return o;if(!t.reenter)return t.source.machine.root}function Je(t,e,n){const o=new Set;for(const s of t)if(s.target?.length){const r=Oo(s,n);s.reenter&&s.source===r&&o.add(r);for(const a of e)ct(a,r)&&o.add(a)}return[...o]}function ma(t,e){if(t.length!==e.size)return!1;for(const n of t)if(!e.has(n))return!1;return!0}function Ye(t,e,n,o,s,r){if(!t.length)return e;const a=new Set(e._nodes);let c=e.historyValue;const l=So(t,a,c);let u=e;s||([u,c]=wa(u,o,n,l,a,c,r,n.actionExecutor)),u=xt(u,o,n,l.flatMap(f=>f.actions),r,void 0),u=_a(u,o,n,l,a,r,c,s);const h=[...a];u.status==="done"&&(u=xt(u,o,n,h.sort((f,d)=>d.order-f.order).flatMap(f=>f.exit),r,void 0));try{return c===e.historyValue&&ma(e._nodes,a)?u:ht(u,{_nodes:h,historyValue:c})}catch(f){throw f}}function ga(t,e,n,o,s){if(o.output===void 0)return;const r=Ae(s.id,s.output!==void 0&&s.parent?je(s.output,t.context,e,n.self):void 0);return je(o.output,t.context,r,n.self)}function _a(t,e,n,o,s,r,a,c){let l=t;const u=new Set,h=new Set;ya(o,a,h,u),c&&h.add(t.machine.root);const f=new Set;for(const d of[...u].sort((p,m)=>p.order-m.order)){s.add(d);const p=[];p.push(...d.entry);for(const m of d.invoke)p.push(ea(m.src,{...m,syncSnapshot:!!m.onSnapshot}));if(h.has(d)){const m=d.initial.actions;p.push(...m)}if(l=xt(l,e,n,p,r,d.invoke.map(m=>m.id)),d.type==="final"){const m=d.parent;let y=m?.type==="parallel"?m:m?.parent,g=y||d;for(m?.type==="compound"&&r.push(Ae(m.id,d.output!==void 0?je(d.output,l.context,e,n.self):void 0));y?.type==="parallel"&&!f.has(y)&&Fe(s,y);)f.add(y),r.push(Ae(y.id)),g=y,y=y.parent;if(y)continue;l=ht(l,{status:"done",output:ga(l,e,n,l.machine.root,g)})}}return l}function ya(t,e,n,o){for(const s of t){const r=Oo(s,e);for(const c of s.target||[])!pt(c)&&(s.source!==c||s.source!==r||s.reenter)&&(o.add(c),n.add(c)),Tt(c,e,n,o);const a=Ge(s,e);for(const c of a){const l=Ft(c,r);r?.type==="parallel"&&l.push(r),Io(o,e,n,l,!s.source.parent&&s.reenter?void 0:r)}}}function Tt(t,e,n,o){if(pt(t))if(e[t.id]){const s=e[t.id];for(const r of s)o.add(r),Tt(r,e,n,o);for(const r of s)qe(r,t.parent,o,e,n)}else{const s=bo(t);for(const r of s.target)o.add(r),s===t.parent?.initial&&n.add(t.parent),Tt(r,e,n,o);for(const r of s.target)qe(r,t.parent,o,e,n)}else if(t.type==="compound"){const[s]=t.initial.target;pt(s)||(o.add(s),n.add(s)),Tt(s,e,n,o),qe(s,t,o,e,n)}else if(t.type==="parallel")for(const s of Ot(t).filter(r=>!pt(r)))[...o].some(r=>ct(r,s))||(pt(s)||(o.add(s),n.add(s)),Tt(s,e,n,o))}function Io(t,e,n,o,s){for(const r of o)if((!s||ct(r,s))&&t.add(r),r.type==="parallel")for(const a of Ot(r).filter(c=>!pt(c)))[...t].some(c=>ct(c,a))||(t.add(a),Tt(a,e,n,t))}function qe(t,e,n,o,s){Io(n,o,s,Ft(t,e))}function wa(t,e,n,o,s,r,a,c){let l=t;const u=Je(o,s,r);u.sort((f,d)=>d.order-f.order);let h;for(const f of u)for(const d of fa(f)){let p;d.history==="deep"?p=m=>Ke(m)&&ct(m,f):p=m=>m.parent===f,h??={...r},h[d.id]=Array.from(s).filter(p)}for(const f of u)l=xt(l,e,n,[...f.exit,...f.invoke.map(d=>_o(d.id))],a,void 0),s.delete(f);return[l,h||r]}function Ea(t,e){return t.implementations.actions[e]}function To(t,e,n,o,s,r){const{machine:a}=t;let c=t;for(const l of o){const u=typeof l=="function",h=u?l:Ea(a,typeof l=="string"?l:l.type),f={context:c.context,event:e,self:n.self,system:n.system},d=u||typeof l=="string"?void 0:"params"in l?typeof l.params=="function"?l.params({context:c.context,event:e}):l.params:void 0;if(!h||!("resolve"in h)){n.actionExecutor({type:typeof l=="string"?l:typeof l=="object"?l.type:l.name||"(anonymous)",info:f,params:d,exec:h});continue}const p=h,[m,y,g]=p.resolve(n,c,f,d,h,s);c=m,"retryResolve"in p&&r?.push([p,y]),"execute"in p&&n.actionExecutor({type:p.type,info:f,params:y,exec:p.execute.bind(null,n,y)}),g&&(c=To(c,e,n,g,s,r))}return c}function xt(t,e,n,o,s,r){const a=r?[]:void 0,c=To(t,e,n,o,{internalQueue:s,deferredActorIds:r},a);return a?.forEach(([l,u])=>{l.retryResolve(n,c,u)}),c}function Xe(t,e,n,o){let s=t;const r=[];function a(u,h,f){n.system._sendInspectionEvent({type:"@xstate.microstep",actorRef:n.self,event:h,snapshot:u,_transitions:f}),r.push(u)}if(e.type===De)return s=ht(xo(s,e,n),{status:"stopped"}),a(s,e,[]),{snapshot:s,microstates:r};let c=e;if(c.type!==io){const u=c,h=Fi(u),f=Vo(u,s);if(h&&!f.length)return s=ht(t,{status:"error",error:u.error}),a(s,u,[]),{snapshot:s,microstates:r};s=Ye(f,t,n,c,!1,o),a(s,u,f)}let l=!0;for(;s.status==="active";){let u=l?ba(s,c):[];const h=u.length?s:void 0;if(!u.length){if(!o.length)break;c=o.shift(),u=Vo(c,s)}s=Ye(u,s,n,c,!1,o),l=s!==h,a(s,c,u)}return s.status!=="active"&&xo(s,c,n),{snapshot:s,microstates:r}}function xo(t,e,n){return xt(t,e,n,Object.values(t.children).map(o=>_o(o)),[],void 0)}function Vo(t,e){return e.machine.getTransitionData(e,t)}function ba(t,e){const n=new Set,o=t._nodes.filter(Ke);for(const s of o)t:for(const r of[s].concat(Ft(s,void 0)))if(r.always){for(const a of r.always)if(a.guard===void 0||He(a.guard,t.context,e,t)){n.add(a);break t}}return So(Array.from(n),new Set(t._nodes),t.historyValue)}function va(t,e){const n=ae(ue(t,e));return Eo(t,[...n])}function ka(t){return!!t&&typeof t=="object"&&"machine"in t&&"value"in t}const Sa=function(t){return co(t,this.value)},Oa=function(t){return this.tags.has(t)},Ia=function(t){const e=this.machine.getTransitionData(this,t);return!!e?.length&&e.some(n=>n.target!==void 0||n.actions.length)},Ta=function(){const{_nodes:t,tags:e,machine:n,getMeta:o,toJSON:s,can:r,hasTag:a,matches:c,...l}=this;return{...l,tags:Array.from(e)}},xa=function(){return this._nodes.reduce((t,e)=>(e.meta!==void 0&&(t[e.id]=e.meta),t),{})};function de(t,e){return{status:t.status,output:t.output,error:t.error,machine:e,context:t.context,_nodes:t._nodes,value:Eo(e.root,t._nodes),tags:new Set(t._nodes.flatMap(n=>n.tags)),children:t.children,historyValue:t.historyValue||{},matches:Sa,hasTag:Oa,can:Ia,getMeta:xa,toJSON:Ta}}function ht(t,e={}){return de({...t,...e},t.machine)}function Va(t){if(typeof t!="object"||t===null)return{};const e={};for(const n in t){const o=t[n];Array.isArray(o)&&(e[n]=o.map(s=>({id:s.id})))}return e}function Na(t,e){const{_nodes:n,tags:o,machine:s,children:r,context:a,can:c,hasTag:l,matches:u,getMeta:h,toJSON:f,...d}=t,p={};for(const m in r){const y=r[m];p[m]={snapshot:y.getPersistedSnapshot(e),src:y.src,systemId:y._systemId,syncSnapshot:y._syncSnapshot}}return{...d,context:No(a),children:p,historyValue:Va(d.historyValue)}}function No(t){let e;for(const n in t){const o=t[n];if(o&&typeof o=="object")if("sessionId"in o&&"send"in o&&"ref"in o)e??=Array.isArray(t)?t.slice():{...t},e[n]={xstate$$type:ze,id:o.id};else{const s=No(o);s!==o&&(e??=Array.isArray(t)?t.slice():{...t},e[n]=s)}}return e??t}function Ca(t,e,n,o,{event:s,id:r,delay:a},{internalQueue:c}){const l=e.machine.implementations.delays;if(typeof s=="string")throw new Error(`Only event objects may be used with raise; use raise({ type: "${s}" }) instead`);const u=typeof s=="function"?s(n,o):s;let h;if(typeof a=="string"){const f=l&&l[a];h=typeof f=="function"?f(n,o):f}else h=typeof a=="function"?a(n,o):a;return typeof h!="number"&&c.push(u),[e,{event:u,id:r,delay:h},void 0]}function $a(t,e){const{event:n,delay:o,id:s}=e;if(typeof o=="number"){t.defer(()=>{const r=t.self;t.system.scheduler.schedule(r,r,n,o,s)});return}}function Pa(t,e){function n(o,s){}return n.type="xstate.raise",n.event=t,n.id=e?.id,n.delay=e?.delay,n.resolve=Ca,n.execute=$a,n}function Ra(t,{machine:e,context:n},o,s){const r=(a,c)=>{if(typeof a=="string"){const l=Be(e,a);if(!l)throw new Error(`Actor logic '${a}' not implemented in machine '${e.id}'`);const u=Kt(l,{id:c?.id,parent:t.self,syncSnapshot:c?.syncSnapshot,input:typeof c?.input=="function"?c.input({context:n,event:o,self:t.self}):c?.input,src:a,systemId:c?.systemId});return s[u.id]=u,u}else return Kt(a,{id:c?.id,parent:t.self,syncSnapshot:c?.syncSnapshot,input:c?.input,src:a,systemId:c?.systemId})};return(a,c)=>{const l=r(a,c);return s[l.id]=l,t.defer(()=>{l._processingStatus!==W.Stopped&&l.start()}),l}}function Da(t,e,n,o,{assignment:s}){if(!e.context)throw new Error("Cannot assign to undefined `context`. Ensure that `context` is defined in the machine config.");const r={},a={context:e.context,event:n.event,spawn:Ra(t,e,n.event,r),self:t.self,system:t.system};let c={};if(typeof s=="function")c=s(a,o);else for(const u of Object.keys(s)){const h=s[u];c[u]=typeof h=="function"?h(a,o):h}const l=Object.assign({},e.context,c);return[ht(e,{context:l,children:Object.keys(r).length?{...e.children,...r}:e.children}),void 0,void 0]}function Aa(t){function e(n,o){}return e.type="xstate.assign",e.assignment=t,e.resolve=Da,e}const Co=new WeakMap;function Vt(t,e,n){let o=Co.get(t);return o?e in o||(o[e]=n()):(o={[e]:n()},Co.set(t,o)),o[e]}const La={},Wt=t=>typeof t=="string"?{type:t}:typeof t=="function"?"resolve"in t?{type:t.type}:{type:t.name}:t;class fe{constructor(e,n){if(this.config=e,this.key=void 0,this.id=void 0,this.type=void 0,this.path=void 0,this.states=void 0,this.history=void 0,this.entry=void 0,this.exit=void 0,this.parent=void 0,this.machine=void 0,this.meta=void 0,this.output=void 0,this.order=-1,this.description=void 0,this.tags=[],this.transitions=void 0,this.always=void 0,this.parent=n._parent,this.key=n._key,this.machine=n._machine,this.path=this.parent?this.parent.path.concat(this.key):[],this.id=this.config.id||[this.machine.id,...this.path].join(so),this.type=this.config.type||(this.config.states&&Object.keys(this.config.states).length?"compound":this.config.history?"history":"atomic"),this.description=this.config.description,this.order=this.machine.idMap.size,this.machine.idMap.set(this.id,this),this.states=this.config.states?uo(this.config.states,(o,s)=>new fe(o,{_parent:this,_key:s,_machine:this.machine})):La,this.type==="compound"&&!this.config.initial)throw new Error(`No initial state specified for compound state node "#${this.id}". Try adding { initial: "${Object.keys(this.states)[0]}" } to the state config.`);this.history=this.config.history===!0?"shallow":this.config.history||!1,this.entry=at(this.config.entry).slice(),this.exit=at(this.config.exit).slice(),this.meta=this.config.meta,this.output=this.type==="final"||!this.parent?this.config.output:void 0,this.tags=at(e.tags).slice()}_initialize(){this.transitions=ia(this),this.config.always&&(this.always=St(this.config.always).map(e=>ft(this,ro,e))),Object.keys(this.states).forEach(e=>{this.states[e]._initialize()})}get definition(){return{id:this.id,key:this.key,version:this.machine.version,type:this.type,initial:this.initial?{target:this.initial.target,source:this,actions:this.initial.actions.map(Wt),eventType:null,reenter:!1,toJSON:()=>({target:this.initial.target.map(e=>`#${e.id}`),source:`#${this.id}`,actions:this.initial.actions.map(Wt),eventType:null})}:void 0,history:this.history,states:uo(this.states,e=>e.definition),on:this.on,transitions:[...this.transitions.values()].flat().map(e=>({...e,actions:e.actions.map(Wt)})),entry:this.entry.map(Wt),exit:this.exit.map(Wt),meta:this.meta,order:this.order||-1,output:this.output,invoke:this.invoke,description:this.description,tags:this.tags}}toJSON(){return this.definition}get invoke(){return Vt(this,"invoke",()=>at(this.config.invoke).map((e,n)=>{const{src:o,systemId:s}=e,r=e.id??mo(this.id,n),a=typeof o=="string"?o:`xstate.invoke.${mo(this.id,n)}`;return{...e,src:a,id:r,systemId:s,toJSON(){const{onDone:c,onError:l,...u}=e;return{...u,type:"xstate.invoke",src:a,id:r}}}}))}get on(){return Vt(this,"on",()=>[...this.transitions].flatMap(([e,n])=>n.map(o=>[e,o])).reduce((e,[n,o])=>(e[n]=e[n]||[],e[n].push(o),e),{}))}get after(){return Vt(this,"delayedTransitions",()=>ra(this))}get initial(){return Vt(this,"initial",()=>aa(this,this.config.initial))}next(e,n){const o=n.type,s=[];let r;const a=Vt(this,`candidates-${o}`,()=>sa(this,o));for(const c of a){const{guard:l}=c,u=e.context;let h=!1;try{h=!l||He(l,u,n,e)}catch(f){const d=typeof l=="string"?l:typeof l=="object"?l.type:void 0;throw new Error(`Unable to evaluate guard ${d?`'${d}' `:""}in transition for event '${o}' in state node '${this.id}':
|
|
3
|
-
${f.message}`)}if(h){s.push(...c.actions),r=c;break}}return r?[r]:void 0}get events(){return Vt(this,"events",()=>{const{states:e}=this,n=new Set(this.ownEvents);if(e)for(const o of Object.keys(e)){const s=e[o];if(s.states)for(const r of s.events)n.add(`${r}`)}return Array.from(n)})}get ownEvents(){const e=new Set([...this.transitions.keys()].filter(n=>this.transitions.get(n).some(o=>!(!o.target&&!o.actions.length&&!o.reenter))));return Array.from(e)}}const ja="#";let Ma=class ti{constructor(e,n){this.config=e,this.version=void 0,this.schemas=void 0,this.implementations=void 0,this.__xstatenode=!0,this.idMap=new Map,this.root=void 0,this.id=void 0,this.states=void 0,this.events=void 0,this.id=e.id||"(machine)",this.implementations={actors:n?.actors??{},actions:n?.actions??{},delays:n?.delays??{},guards:n?.guards??{}},this.version=this.config.version,this.schemas=this.config.schemas,this.transition=this.transition.bind(this),this.getInitialSnapshot=this.getInitialSnapshot.bind(this),this.getPersistedSnapshot=this.getPersistedSnapshot.bind(this),this.restoreSnapshot=this.restoreSnapshot.bind(this),this.start=this.start.bind(this),this.root=new fe(e,{_key:this.id,_machine:this}),this.root._initialize(),this.states=this.root.states,this.events=this.root.events}provide(e){const{actions:n,guards:o,actors:s,delays:r}=this.implementations;return new ti(this.config,{actions:{...n,...e.actions},guards:{...o,...e.guards},actors:{...s,...e.actors},delays:{...r,...e.delays}})}resolveState(e){const n=va(this.root,e.value),o=ae(ue(this.root,n));return de({_nodes:[...o],context:e.context||{},children:{},status:Fe(o,this.root)?"done":e.status||"active",output:e.output,error:e.error,historyValue:e.historyValue},this)}transition(e,n,o){return Xe(e,n,o,[]).snapshot}microstep(e,n,o){return Xe(e,n,o,[]).microstates}getTransitionData(e,n){return We(this.root,e.value,e,n)||[]}getPreInitialState(e,n,o){const{context:s}=this.config,r=de({context:typeof s!="function"&&s?s:{},_nodes:[this.root],children:{},status:"active"},this);return typeof s=="function"?xt(r,n,e,[Aa(({spawn:a,event:c,self:l})=>s({spawn:a,input:c.input,self:l}))],o,void 0):r}getInitialSnapshot(e,n){const o=ao(n),s=[],r=this.getPreInitialState(e,o,s),a=Ye([{target:[...ko(this.root)],source:this.root,reenter:!0,actions:[],eventType:null,toJSON:null}],r,e,o,!0,s),{snapshot:c}=Xe(a,o,e,s);return c}start(e){Object.values(e.children).forEach(n=>{n.getSnapshot().status==="active"&&n.start()})}getStateNodeById(e){const n=Le(e),o=n.slice(1),s=ce(n[0])?n[0].slice(ja.length):n[0],r=this.idMap.get(s);if(!r)throw new Error(`Child state node '#${s}' does not exist on machine '${this.id}'`);return le(r,o)}get definition(){return this.root.definition}toJSON(){return this.definition}getPersistedSnapshot(e,n){return Na(e,n)}restoreSnapshot(e,n){const o={},s=e.children;Object.keys(s).forEach(f=>{const d=s[f],p=d.snapshot,m=d.src,y=typeof m=="string"?Be(this,m):m;if(!y)return;const g=Kt(y,{id:f,parent:n.self,syncSnapshot:d.syncSnapshot,snapshot:p,src:m,systemId:d.systemId});o[f]=g});function r(f,d){if(d instanceof fe)return d;try{return f.machine.getStateNodeById(d.id)}catch{}}function a(f,d){if(!d||typeof d!="object")return{};const p={};for(const m in d){const y=d[m];for(const g of y){const w=r(f,g);w&&(p[m]??=[],p[m].push(w))}}return p}const c=a(this.root,e.historyValue),l=de({...e,children:o,_nodes:Array.from(ae(ue(this.root,e.value))),historyValue:c},this),u=new Set;function h(f,d){if(!u.has(f)){u.add(f);for(const p in f){const m=f[p];if(m&&typeof m=="object"){if("xstate$$type"in m&&m.xstate$$type===ze){f[p]=d[m.id];continue}h(m,d)}}}}return h(l.context,o),l}};function Ba(t,e){return new Ma(t,e)}function Ze(t){this.message=t||""}Ze.prototype=Object.create(Error.prototype,{constructor:{value:Ze},name:{value:"NotImplemented"},stack:{get:function(){return new Error().stack}}});let Ua=class Ce{static _root;name="Stonecrop";registry;store;constructor(e,n){if(Ce._root)return Ce._root;Ce._root=this,this.registry=e,this.store=n}setup(e){this.getMeta(e.doctype)}async getMeta(e){if(!this.registry.getMeta)throw new Ze(`getMeta function is not implemented for ${e} in the registry`);return await this.registry.getMeta(e)}async getRecords(e,n){this.store.$patch({records:[]});const o=await(await fetch(`/${e.slug}`,n)).json();this.store.$patch({records:o})}async getRecord(e,n){this.store.$patch({record:{}});const o=await(await fetch(`/${e.slug}/${n}`)).json();this.store.$patch({record:o})}runAction(e,n,o){const s=this.registry.registry[e.slug],r=s.actions?.get(n),a=s.workflow;if(a){const c=Ba(a),l=Kt(c);l.start(),l.send({type:n,id:o}),r&&r.length>0&&r.forEach(u=>{new Function(u)(o)})}}};var za=Object.create,$o=Object.defineProperty,Ha=Object.getOwnPropertyDescriptor,Qe=Object.getOwnPropertyNames,Ka=Object.getPrototypeOf,Fa=Object.prototype.hasOwnProperty,Wa=(t,e)=>function(){return t&&(e=(0,t[Qe(t)[0]])(t=0)),e},Ga=(t,e)=>function(){return e||(0,t[Qe(t)[0]])((e={exports:{}}).exports,e),e.exports},Ja=(t,e,n,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of Qe(e))!Fa.call(t,s)&&s!==n&&$o(t,s,{get:()=>e[s],enumerable:!(o=Ha(e,s))||o.enumerable});return t},Ya=(t,e,n)=>(n=t!=null?za(Ka(t)):{},Ja($o(n,"default",{value:t,enumerable:!0}),t)),Gt=Wa({"../../node_modules/.pnpm/tsup@8.4.0_@microsoft+api-extractor@7.51.1_@types+node@22.13.14__jiti@2.4.2_postcss@8.5_96eb05a9d65343021e53791dd83f3773/node_modules/tsup/assets/esm_shims.js"(){}}),qa=Ga({"../../node_modules/.pnpm/rfdc@1.4.1/node_modules/rfdc/index.js"(t,e){Gt(),e.exports=o;function n(r){return r instanceof Buffer?Buffer.from(r):new r.constructor(r.buffer.slice(),r.byteOffset,r.length)}function o(r){if(r=r||{},r.circles)return s(r);const a=new Map;if(a.set(Date,f=>new Date(f)),a.set(Map,(f,d)=>new Map(l(Array.from(f),d))),a.set(Set,(f,d)=>new Set(l(Array.from(f),d))),r.constructorHandlers)for(const f of r.constructorHandlers)a.set(f[0],f[1]);let c=null;return r.proto?h:u;function l(f,d){const p=Object.keys(f),m=new Array(p.length);for(let y=0;y<p.length;y++){const g=p[y],w=f[g];typeof w!="object"||w===null?m[g]=w:w.constructor!==Object&&(c=a.get(w.constructor))?m[g]=c(w,d):ArrayBuffer.isView(w)?m[g]=n(w):m[g]=d(w)}return m}function u(f){if(typeof f!="object"||f===null)return f;if(Array.isArray(f))return l(f,u);if(f.constructor!==Object&&(c=a.get(f.constructor)))return c(f,u);const d={};for(const p in f){if(Object.hasOwnProperty.call(f,p)===!1)continue;const m=f[p];typeof m!="object"||m===null?d[p]=m:m.constructor!==Object&&(c=a.get(m.constructor))?d[p]=c(m,u):ArrayBuffer.isView(m)?d[p]=n(m):d[p]=u(m)}return d}function h(f){if(typeof f!="object"||f===null)return f;if(Array.isArray(f))return l(f,h);if(f.constructor!==Object&&(c=a.get(f.constructor)))return c(f,h);const d={};for(const p in f){const m=f[p];typeof m!="object"||m===null?d[p]=m:m.constructor!==Object&&(c=a.get(m.constructor))?d[p]=c(m,h):ArrayBuffer.isView(m)?d[p]=n(m):d[p]=h(m)}return d}}function s(r){const a=[],c=[],l=new Map;if(l.set(Date,p=>new Date(p)),l.set(Map,(p,m)=>new Map(h(Array.from(p),m))),l.set(Set,(p,m)=>new Set(h(Array.from(p),m))),r.constructorHandlers)for(const p of r.constructorHandlers)l.set(p[0],p[1]);let u=null;return r.proto?d:f;function h(p,m){const y=Object.keys(p),g=new Array(y.length);for(let w=0;w<y.length;w++){const O=y[w],V=p[O];if(typeof V!="object"||V===null)g[O]=V;else if(V.constructor!==Object&&(u=l.get(V.constructor)))g[O]=u(V,m);else if(ArrayBuffer.isView(V))g[O]=n(V);else{const P=a.indexOf(V);P!==-1?g[O]=c[P]:g[O]=m(V)}}return g}function f(p){if(typeof p!="object"||p===null)return p;if(Array.isArray(p))return h(p,f);if(p.constructor!==Object&&(u=l.get(p.constructor)))return u(p,f);const m={};a.push(p),c.push(m);for(const y in p){if(Object.hasOwnProperty.call(p,y)===!1)continue;const g=p[y];if(typeof g!="object"||g===null)m[y]=g;else if(g.constructor!==Object&&(u=l.get(g.constructor)))m[y]=u(g,f);else if(ArrayBuffer.isView(g))m[y]=n(g);else{const w=a.indexOf(g);w!==-1?m[y]=c[w]:m[y]=f(g)}}return a.pop(),c.pop(),m}function d(p){if(typeof p!="object"||p===null)return p;if(Array.isArray(p))return h(p,d);if(p.constructor!==Object&&(u=l.get(p.constructor)))return u(p,d);const m={};a.push(p),c.push(m);for(const y in p){const g=p[y];if(typeof g!="object"||g===null)m[y]=g;else if(g.constructor!==Object&&(u=l.get(g.constructor)))m[y]=u(g,d);else if(ArrayBuffer.isView(g))m[y]=n(g);else{const w=a.indexOf(g);w!==-1?m[y]=c[w]:m[y]=d(g)}}return a.pop(),c.pop(),m}}}});Gt(),Gt(),Gt();var Po=typeof navigator<"u",T=typeof window<"u"?window:typeof globalThis<"u"?globalThis:typeof global<"u"?global:{};typeof T.chrome<"u"&&T.chrome.devtools,Po&&(T.self,T.top);var Ro;typeof navigator<"u"&&((Ro=navigator.userAgent)==null||Ro.toLowerCase().includes("electron")),Gt();var Xa=Ya(qa()),Za=/(?:^|[-_/])(\w)/g;function Qa(t,e){return e?e.toUpperCase():""}function tc(t){return t&&`${t}`.replace(Za,Qa)}function ec(t,e){let n=t.replace(/^[a-z]:/i,"").replace(/\\/g,"/");n.endsWith(`index${e}`)&&(n=n.replace(`/index${e}`,e));const o=n.lastIndexOf("/"),s=n.substring(o+1);{const r=s.lastIndexOf(e);return s.substring(0,r)}}var Do=(0,Xa.default)({circles:!0});const nc={trailing:!0};function Nt(t,e=25,n={}){if(n={...nc,...n},!Number.isFinite(e))throw new TypeError("Expected `wait` to be a finite number");let o,s,r=[],a,c;const l=(u,h)=>(a=oc(t,u,h),a.finally(()=>{if(a=null,n.trailing&&c&&!s){const f=l(u,c);return c=null,f}}),a);return function(...u){return a?(n.trailing&&(c=u),a):new Promise(h=>{const f=!s&&n.leading;clearTimeout(s),s=setTimeout(()=>{s=null;const d=n.leading?o:l(this,u);for(const p of r)p(d);r=[]},e),f?(o=l(this,u),h(o)):r.push(h)})}}async function oc(t,e,n){return await t.apply(e,n)}function tn(t,e={},n){for(const o in t){const s=t[o],r=n?`${n}:${o}`:o;typeof s=="object"&&s!==null?tn(s,e,r):typeof s=="function"&&(e[r]=s)}return e}const sc={run:t=>t()},rc=()=>sc,Ao=typeof console.createTask<"u"?console.createTask:rc;function ic(t,e){const n=e.shift(),o=Ao(n);return t.reduce((s,r)=>s.then(()=>o.run(()=>r(...e))),Promise.resolve())}function ac(t,e){const n=e.shift(),o=Ao(n);return Promise.all(t.map(s=>o.run(()=>s(...e))))}function en(t,e){for(const n of[...t])n(e)}class cc{constructor(){this._hooks={},this._before=void 0,this._after=void 0,this._deprecatedMessages=void 0,this._deprecatedHooks={},this.hook=this.hook.bind(this),this.callHook=this.callHook.bind(this),this.callHookWith=this.callHookWith.bind(this)}hook(e,n,o={}){if(!e||typeof n!="function")return()=>{};const s=e;let r;for(;this._deprecatedHooks[e];)r=this._deprecatedHooks[e],e=r.to;if(r&&!o.allowDeprecated){let a=r.message;a||(a=`${s} hook has been deprecated`+(r.to?`, please use ${r.to}`:"")),this._deprecatedMessages||(this._deprecatedMessages=new Set),this._deprecatedMessages.has(a)||(console.warn(a),this._deprecatedMessages.add(a))}if(!n.name)try{Object.defineProperty(n,"name",{get:()=>"_"+e.replace(/\W+/g,"_")+"_hook_cb",configurable:!0})}catch{}return this._hooks[e]=this._hooks[e]||[],this._hooks[e].push(n),()=>{n&&(this.removeHook(e,n),n=void 0)}}hookOnce(e,n){let o,s=(...r)=>(typeof o=="function"&&o(),o=void 0,s=void 0,n(...r));return o=this.hook(e,s),o}removeHook(e,n){if(this._hooks[e]){const o=this._hooks[e].indexOf(n);o!==-1&&this._hooks[e].splice(o,1),this._hooks[e].length===0&&delete this._hooks[e]}}deprecateHook(e,n){this._deprecatedHooks[e]=typeof n=="string"?{to:n}:n;const o=this._hooks[e]||[];delete this._hooks[e];for(const s of o)this.hook(e,s)}deprecateHooks(e){Object.assign(this._deprecatedHooks,e);for(const n in e)this.deprecateHook(n,e[n])}addHooks(e){const n=tn(e),o=Object.keys(n).map(s=>this.hook(s,n[s]));return()=>{for(const s of o.splice(0,o.length))s()}}removeHooks(e){const n=tn(e);for(const o in n)this.removeHook(o,n[o])}removeAllHooks(){for(const e in this._hooks)delete this._hooks[e]}callHook(e,...n){return n.unshift(e),this.callHookWith(ic,e,...n)}callHookParallel(e,...n){return n.unshift(e),this.callHookWith(ac,e,...n)}callHookWith(e,n,...o){const s=this._before||this._after?{name:n,args:o,context:{}}:void 0;this._before&&en(this._before,s);const r=e(n in this._hooks?[...this._hooks[n]]:[],o);return r instanceof Promise?r.finally(()=>{this._after&&s&&en(this._after,s)}):(this._after&&s&&en(this._after,s),r)}beforeEach(e){return this._before=this._before||[],this._before.push(e),()=>{if(this._before!==void 0){const n=this._before.indexOf(e);n!==-1&&this._before.splice(n,1)}}}afterEach(e){return this._after=this._after||[],this._after.push(e),()=>{if(this._after!==void 0){const n=this._after.indexOf(e);n!==-1&&this._after.splice(n,1)}}}}function Lo(){return new cc}var lc=Object.create,jo=Object.defineProperty,uc=Object.getOwnPropertyDescriptor,nn=Object.getOwnPropertyNames,dc=Object.getPrototypeOf,fc=Object.prototype.hasOwnProperty,pc=(t,e)=>function(){return t&&(e=(0,t[nn(t)[0]])(t=0)),e},Mo=(t,e)=>function(){return e||(0,t[nn(t)[0]])((e={exports:{}}).exports,e),e.exports},hc=(t,e,n,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of nn(e))!fc.call(t,s)&&s!==n&&jo(t,s,{get:()=>e[s],enumerable:!(o=uc(e,s))||o.enumerable});return t},mc=(t,e,n)=>(n=t!=null?lc(dc(t)):{},hc(jo(n,"default",{value:t,enumerable:!0}),t)),v=pc({"../../node_modules/.pnpm/tsup@8.4.0_@microsoft+api-extractor@7.51.1_@types+node@22.13.14__jiti@2.4.2_postcss@8.5_96eb05a9d65343021e53791dd83f3773/node_modules/tsup/assets/esm_shims.js"(){}}),gc=Mo({"../../node_modules/.pnpm/speakingurl@14.0.1/node_modules/speakingurl/lib/speakingurl.js"(t,e){v(),function(n){var o={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"Ae",Å:"A",Æ:"AE",Ç:"C",È:"E",É:"E",Ê:"E",Ë:"E",Ì:"I",Í:"I",Î:"I",Ï:"I",Ð:"D",Ñ:"N",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"Oe",Ő:"O",Ø:"O",Ù:"U",Ú:"U",Û:"U",Ü:"Ue",Ű:"U",Ý:"Y",Þ:"TH",ß:"ss",à:"a",á:"a",â:"a",ã:"a",ä:"ae",å:"a",æ:"ae",ç:"c",è:"e",é:"e",ê:"e",ë:"e",ì:"i",í:"i",î:"i",ï:"i",ð:"d",ñ:"n",ò:"o",ó:"o",ô:"o",õ:"o",ö:"oe",ő:"o",ø:"o",ù:"u",ú:"u",û:"u",ü:"ue",ű:"u",ý:"y",þ:"th",ÿ:"y","ẞ":"SS",ا:"a",أ:"a",إ:"i",آ:"aa",ؤ:"u",ئ:"e",ء:"a",ب:"b",ت:"t",ث:"th",ج:"j",ح:"h",خ:"kh",د:"d",ذ:"th",ر:"r",ز:"z",س:"s",ش:"sh",ص:"s",ض:"dh",ط:"t",ظ:"z",ع:"a",غ:"gh",ف:"f",ق:"q",ك:"k",ل:"l",م:"m",ن:"n",ه:"h",و:"w",ي:"y",ى:"a",ة:"h",ﻻ:"la",ﻷ:"laa",ﻹ:"lai",ﻵ:"laa",گ:"g",چ:"ch",پ:"p",ژ:"zh",ک:"k",ی:"y","َ":"a","ً":"an","ِ":"e","ٍ":"en","ُ":"u","ٌ":"on","ْ":"","٠":"0","١":"1","٢":"2","٣":"3","٤":"4","٥":"5","٦":"6","٧":"7","٨":"8","٩":"9","۰":"0","۱":"1","۲":"2","۳":"3","۴":"4","۵":"5","۶":"6","۷":"7","۸":"8","۹":"9",က:"k",ခ:"kh",ဂ:"g",ဃ:"ga",င:"ng",စ:"s",ဆ:"sa",ဇ:"z","စျ":"za",ည:"ny",ဋ:"t",ဌ:"ta",ဍ:"d",ဎ:"da",ဏ:"na",တ:"t",ထ:"ta",ဒ:"d",ဓ:"da",န:"n",ပ:"p",ဖ:"pa",ဗ:"b",ဘ:"ba",မ:"m",ယ:"y",ရ:"ya",လ:"l",ဝ:"w",သ:"th",ဟ:"h",ဠ:"la",အ:"a","ြ":"y","ျ":"ya","ွ":"w","ြွ":"yw","ျွ":"ywa","ှ":"h",ဧ:"e","၏":"-e",ဣ:"i",ဤ:"-i",ဉ:"u",ဦ:"-u",ဩ:"aw","သြော":"aw",ဪ:"aw","၀":"0","၁":"1","၂":"2","၃":"3","၄":"4","၅":"5","၆":"6","၇":"7","၈":"8","၉":"9","္":"","့":"","း":"",č:"c",ď:"d",ě:"e",ň:"n",ř:"r",š:"s",ť:"t",ů:"u",ž:"z",Č:"C",Ď:"D",Ě:"E",Ň:"N",Ř:"R",Š:"S",Ť:"T",Ů:"U",Ž:"Z",ހ:"h",ށ:"sh",ނ:"n",ރ:"r",ބ:"b",ޅ:"lh",ކ:"k",އ:"a",ވ:"v",މ:"m",ފ:"f",ދ:"dh",ތ:"th",ލ:"l",ގ:"g",ޏ:"gn",ސ:"s",ޑ:"d",ޒ:"z",ޓ:"t",ޔ:"y",ޕ:"p",ޖ:"j",ޗ:"ch",ޘ:"tt",ޙ:"hh",ޚ:"kh",ޛ:"th",ޜ:"z",ޝ:"sh",ޞ:"s",ޟ:"d",ޠ:"t",ޡ:"z",ޢ:"a",ޣ:"gh",ޤ:"q",ޥ:"w","ަ":"a","ާ":"aa","ި":"i","ީ":"ee","ު":"u","ޫ":"oo","ެ":"e","ޭ":"ey","ޮ":"o","ޯ":"oa","ް":"",ა:"a",ბ:"b",გ:"g",დ:"d",ე:"e",ვ:"v",ზ:"z",თ:"t",ი:"i",კ:"k",ლ:"l",მ:"m",ნ:"n",ო:"o",პ:"p",ჟ:"zh",რ:"r",ს:"s",ტ:"t",უ:"u",ფ:"p",ქ:"k",ღ:"gh",ყ:"q",შ:"sh",ჩ:"ch",ც:"ts",ძ:"dz",წ:"ts",ჭ:"ch",ხ:"kh",ჯ:"j",ჰ:"h",α:"a",β:"v",γ:"g",δ:"d",ε:"e",ζ:"z",η:"i",θ:"th",ι:"i",κ:"k",λ:"l",μ:"m",ν:"n",ξ:"ks",ο:"o",π:"p",ρ:"r",σ:"s",τ:"t",υ:"y",φ:"f",χ:"x",ψ:"ps",ω:"o",ά:"a",έ:"e",ί:"i",ό:"o",ύ:"y",ή:"i",ώ:"o",ς:"s",ϊ:"i",ΰ:"y",ϋ:"y",ΐ:"i",Α:"A",Β:"B",Γ:"G",Δ:"D",Ε:"E",Ζ:"Z",Η:"I",Θ:"TH",Ι:"I",Κ:"K",Λ:"L",Μ:"M",Ν:"N",Ξ:"KS",Ο:"O",Π:"P",Ρ:"R",Σ:"S",Τ:"T",Υ:"Y",Φ:"F",Χ:"X",Ψ:"PS",Ω:"O",Ά:"A",Έ:"E",Ί:"I",Ό:"O",Ύ:"Y",Ή:"I",Ώ:"O",Ϊ:"I",Ϋ:"Y",ā:"a",ē:"e",ģ:"g",ī:"i",ķ:"k",ļ:"l",ņ:"n",ū:"u",Ā:"A",Ē:"E",Ģ:"G",Ī:"I",Ķ:"k",Ļ:"L",Ņ:"N",Ū:"U",Ќ:"Kj",ќ:"kj",Љ:"Lj",љ:"lj",Њ:"Nj",њ:"nj",Тс:"Ts",тс:"ts",ą:"a",ć:"c",ę:"e",ł:"l",ń:"n",ś:"s",ź:"z",ż:"z",Ą:"A",Ć:"C",Ę:"E",Ł:"L",Ń:"N",Ś:"S",Ź:"Z",Ż:"Z",Є:"Ye",І:"I",Ї:"Yi",Ґ:"G",є:"ye",і:"i",ї:"yi",ґ:"g",ă:"a",Ă:"A",ș:"s",Ș:"S",ț:"t",Ț:"T",ţ:"t",Ţ:"T",а:"a",б:"b",в:"v",г:"g",д:"d",е:"e",ё:"yo",ж:"zh",з:"z",и:"i",й:"i",к:"k",л:"l",м:"m",н:"n",о:"o",п:"p",р:"r",с:"s",т:"t",у:"u",ф:"f",х:"kh",ц:"c",ч:"ch",ш:"sh",щ:"sh",ъ:"",ы:"y",ь:"",э:"e",ю:"yu",я:"ya",А:"A",Б:"B",В:"V",Г:"G",Д:"D",Е:"E",Ё:"Yo",Ж:"Zh",З:"Z",И:"I",Й:"I",К:"K",Л:"L",М:"M",Н:"N",О:"O",П:"P",Р:"R",С:"S",Т:"T",У:"U",Ф:"F",Х:"Kh",Ц:"C",Ч:"Ch",Ш:"Sh",Щ:"Sh",Ъ:"",Ы:"Y",Ь:"",Э:"E",Ю:"Yu",Я:"Ya",ђ:"dj",ј:"j",ћ:"c",џ:"dz",Ђ:"Dj",Ј:"j",Ћ:"C",Џ:"Dz",ľ:"l",ĺ:"l",ŕ:"r",Ľ:"L",Ĺ:"L",Ŕ:"R",ş:"s",Ş:"S",ı:"i",İ:"I",ğ:"g",Ğ:"G",ả:"a",Ả:"A",ẳ:"a",Ẳ:"A",ẩ:"a",Ẩ:"A",đ:"d",Đ:"D",ẹ:"e",Ẹ:"E",ẽ:"e",Ẽ:"E",ẻ:"e",Ẻ:"E",ế:"e",Ế:"E",ề:"e",Ề:"E",ệ:"e",Ệ:"E",ễ:"e",Ễ:"E",ể:"e",Ể:"E",ỏ:"o",ọ:"o",Ọ:"o",ố:"o",Ố:"O",ồ:"o",Ồ:"O",ổ:"o",Ổ:"O",ộ:"o",Ộ:"O",ỗ:"o",Ỗ:"O",ơ:"o",Ơ:"O",ớ:"o",Ớ:"O",ờ:"o",Ờ:"O",ợ:"o",Ợ:"O",ỡ:"o",Ỡ:"O",Ở:"o",ở:"o",ị:"i",Ị:"I",ĩ:"i",Ĩ:"I",ỉ:"i",Ỉ:"i",ủ:"u",Ủ:"U",ụ:"u",Ụ:"U",ũ:"u",Ũ:"U",ư:"u",Ư:"U",ứ:"u",Ứ:"U",ừ:"u",Ừ:"U",ự:"u",Ự:"U",ữ:"u",Ữ:"U",ử:"u",Ử:"ư",ỷ:"y",Ỷ:"y",ỳ:"y",Ỳ:"Y",ỵ:"y",Ỵ:"Y",ỹ:"y",Ỹ:"Y",ạ:"a",Ạ:"A",ấ:"a",Ấ:"A",ầ:"a",Ầ:"A",ậ:"a",Ậ:"A",ẫ:"a",Ẫ:"A",ắ:"a",Ắ:"A",ằ:"a",Ằ:"A",ặ:"a",Ặ:"A",ẵ:"a",Ẵ:"A","⓪":"0","①":"1","②":"2","③":"3","④":"4","⑤":"5","⑥":"6","⑦":"7","⑧":"8","⑨":"9","⑩":"10","⑪":"11","⑫":"12","⑬":"13","⑭":"14","⑮":"15","⑯":"16","⑰":"17","⑱":"18","⑲":"18","⑳":"18","⓵":"1","⓶":"2","⓷":"3","⓸":"4","⓹":"5","⓺":"6","⓻":"7","⓼":"8","⓽":"9","⓾":"10","⓿":"0","⓫":"11","⓬":"12","⓭":"13","⓮":"14","⓯":"15","⓰":"16","⓱":"17","⓲":"18","⓳":"19","⓴":"20","Ⓐ":"A","Ⓑ":"B","Ⓒ":"C","Ⓓ":"D","Ⓔ":"E","Ⓕ":"F","Ⓖ":"G","Ⓗ":"H","Ⓘ":"I","Ⓙ":"J","Ⓚ":"K","Ⓛ":"L","Ⓜ":"M","Ⓝ":"N","Ⓞ":"O","Ⓟ":"P","Ⓠ":"Q","Ⓡ":"R","Ⓢ":"S","Ⓣ":"T","Ⓤ":"U","Ⓥ":"V","Ⓦ":"W","Ⓧ":"X","Ⓨ":"Y","Ⓩ":"Z","ⓐ":"a","ⓑ":"b","ⓒ":"c","ⓓ":"d","ⓔ":"e","ⓕ":"f","ⓖ":"g","ⓗ":"h","ⓘ":"i","ⓙ":"j","ⓚ":"k","ⓛ":"l","ⓜ":"m","ⓝ":"n","ⓞ":"o","ⓟ":"p","ⓠ":"q","ⓡ":"r","ⓢ":"s","ⓣ":"t","ⓤ":"u","ⓦ":"v","ⓥ":"w","ⓧ":"x","ⓨ":"y","ⓩ":"z","“":'"',"”":'"',"‘":"'","’":"'","∂":"d",ƒ:"f","™":"(TM)","©":"(C)",œ:"oe",Œ:"OE","®":"(R)","†":"+","℠":"(SM)","…":"...","˚":"o",º:"o",ª:"a","•":"*","၊":",","။":".",$:"USD","€":"EUR","₢":"BRN","₣":"FRF","£":"GBP","₤":"ITL","₦":"NGN","₧":"ESP","₩":"KRW","₪":"ILS","₫":"VND","₭":"LAK","₮":"MNT","₯":"GRD","₱":"ARS","₲":"PYG","₳":"ARA","₴":"UAH","₵":"GHS","¢":"cent","¥":"CNY",元:"CNY",円:"YEN","﷼":"IRR","₠":"EWE","฿":"THB","₨":"INR","₹":"INR","₰":"PF","₺":"TRY","؋":"AFN","₼":"AZN",лв:"BGN","៛":"KHR","₡":"CRC","₸":"KZT",ден:"MKD",zł:"PLN","₽":"RUB","₾":"GEL"},s=["်","ް"],r={"ာ":"a","ါ":"a","ေ":"e","ဲ":"e","ိ":"i","ီ":"i","ို":"o","ု":"u","ူ":"u","ေါင်":"aung","ော":"aw","ော်":"aw","ေါ":"aw","ေါ်":"aw","်":"်","က်":"et","ိုက်":"aik","ောက်":"auk","င်":"in","ိုင်":"aing","ောင်":"aung","စ်":"it","ည်":"i","တ်":"at","ိတ်":"eik","ုတ်":"ok","ွတ်":"ut","ေတ်":"it","ဒ်":"d","ိုဒ်":"ok","ုဒ်":"ait","န်":"an","ာန်":"an","ိန်":"ein","ုန်":"on","ွန်":"un","ပ်":"at","ိပ်":"eik","ုပ်":"ok","ွပ်":"ut","န်ုပ်":"nub","မ်":"an","ိမ်":"ein","ုမ်":"on","ွမ်":"un","ယ်":"e","ိုလ်":"ol","ဉ်":"in","ံ":"an","ိံ":"ein","ုံ":"on","ައް":"ah","ަށް":"ah"},a={en:{},az:{ç:"c",ə:"e",ğ:"g",ı:"i",ö:"o",ş:"s",ü:"u",Ç:"C",Ə:"E",Ğ:"G",İ:"I",Ö:"O",Ş:"S",Ü:"U"},cs:{č:"c",ď:"d",ě:"e",ň:"n",ř:"r",š:"s",ť:"t",ů:"u",ž:"z",Č:"C",Ď:"D",Ě:"E",Ň:"N",Ř:"R",Š:"S",Ť:"T",Ů:"U",Ž:"Z"},fi:{ä:"a",Ä:"A",ö:"o",Ö:"O"},hu:{ä:"a",Ä:"A",ö:"o",Ö:"O",ü:"u",Ü:"U",ű:"u",Ű:"U"},lt:{ą:"a",č:"c",ę:"e",ė:"e",į:"i",š:"s",ų:"u",ū:"u",ž:"z",Ą:"A",Č:"C",Ę:"E",Ė:"E",Į:"I",Š:"S",Ų:"U",Ū:"U"},lv:{ā:"a",č:"c",ē:"e",ģ:"g",ī:"i",ķ:"k",ļ:"l",ņ:"n",š:"s",ū:"u",ž:"z",Ā:"A",Č:"C",Ē:"E",Ģ:"G",Ī:"i",Ķ:"k",Ļ:"L",Ņ:"N",Š:"S",Ū:"u",Ž:"Z"},pl:{ą:"a",ć:"c",ę:"e",ł:"l",ń:"n",ó:"o",ś:"s",ź:"z",ż:"z",Ą:"A",Ć:"C",Ę:"e",Ł:"L",Ń:"N",Ó:"O",Ś:"S",Ź:"Z",Ż:"Z"},sv:{ä:"a",Ä:"A",ö:"o",Ö:"O"},sk:{ä:"a",Ä:"A"},sr:{љ:"lj",њ:"nj",Љ:"Lj",Њ:"Nj",đ:"dj",Đ:"Dj"},tr:{Ü:"U",Ö:"O",ü:"u",ö:"o"}},c={ar:{"∆":"delta","∞":"la-nihaya","♥":"hob","&":"wa","|":"aw","<":"aqal-men",">":"akbar-men","∑":"majmou","¤":"omla"},az:{},ca:{"∆":"delta","∞":"infinit","♥":"amor","&":"i","|":"o","<":"menys que",">":"mes que","∑":"suma dels","¤":"moneda"},cs:{"∆":"delta","∞":"nekonecno","♥":"laska","&":"a","|":"nebo","<":"mensi nez",">":"vetsi nez","∑":"soucet","¤":"mena"},de:{"∆":"delta","∞":"unendlich","♥":"Liebe","&":"und","|":"oder","<":"kleiner als",">":"groesser als","∑":"Summe von","¤":"Waehrung"},dv:{"∆":"delta","∞":"kolunulaa","♥":"loabi","&":"aai","|":"noonee","<":"ah vure kuda",">":"ah vure bodu","∑":"jumula","¤":"faisaa"},en:{"∆":"delta","∞":"infinity","♥":"love","&":"and","|":"or","<":"less than",">":"greater than","∑":"sum","¤":"currency"},es:{"∆":"delta","∞":"infinito","♥":"amor","&":"y","|":"u","<":"menos que",">":"mas que","∑":"suma de los","¤":"moneda"},fa:{"∆":"delta","∞":"bi-nahayat","♥":"eshgh","&":"va","|":"ya","<":"kamtar-az",">":"bishtar-az","∑":"majmooe","¤":"vahed"},fi:{"∆":"delta","∞":"aarettomyys","♥":"rakkaus","&":"ja","|":"tai","<":"pienempi kuin",">":"suurempi kuin","∑":"summa","¤":"valuutta"},fr:{"∆":"delta","∞":"infiniment","♥":"Amour","&":"et","|":"ou","<":"moins que",">":"superieure a","∑":"somme des","¤":"monnaie"},ge:{"∆":"delta","∞":"usasruloba","♥":"siqvaruli","&":"da","|":"an","<":"naklebi",">":"meti","∑":"jami","¤":"valuta"},gr:{},hu:{"∆":"delta","∞":"vegtelen","♥":"szerelem","&":"es","|":"vagy","<":"kisebb mint",">":"nagyobb mint","∑":"szumma","¤":"penznem"},it:{"∆":"delta","∞":"infinito","♥":"amore","&":"e","|":"o","<":"minore di",">":"maggiore di","∑":"somma","¤":"moneta"},lt:{"∆":"delta","∞":"begalybe","♥":"meile","&":"ir","|":"ar","<":"maziau nei",">":"daugiau nei","∑":"suma","¤":"valiuta"},lv:{"∆":"delta","∞":"bezgaliba","♥":"milestiba","&":"un","|":"vai","<":"mazak neka",">":"lielaks neka","∑":"summa","¤":"valuta"},my:{"∆":"kwahkhyaet","∞":"asaonasme","♥":"akhyait","&":"nhin","|":"tho","<":"ngethaw",">":"kyithaw","∑":"paungld","¤":"ngwekye"},mk:{},nl:{"∆":"delta","∞":"oneindig","♥":"liefde","&":"en","|":"of","<":"kleiner dan",">":"groter dan","∑":"som","¤":"valuta"},pl:{"∆":"delta","∞":"nieskonczonosc","♥":"milosc","&":"i","|":"lub","<":"mniejsze niz",">":"wieksze niz","∑":"suma","¤":"waluta"},pt:{"∆":"delta","∞":"infinito","♥":"amor","&":"e","|":"ou","<":"menor que",">":"maior que","∑":"soma","¤":"moeda"},ro:{"∆":"delta","∞":"infinit","♥":"dragoste","&":"si","|":"sau","<":"mai mic ca",">":"mai mare ca","∑":"suma","¤":"valuta"},ru:{"∆":"delta","∞":"beskonechno","♥":"lubov","&":"i","|":"ili","<":"menshe",">":"bolshe","∑":"summa","¤":"valjuta"},sk:{"∆":"delta","∞":"nekonecno","♥":"laska","&":"a","|":"alebo","<":"menej ako",">":"viac ako","∑":"sucet","¤":"mena"},sr:{},tr:{"∆":"delta","∞":"sonsuzluk","♥":"ask","&":"ve","|":"veya","<":"kucuktur",">":"buyuktur","∑":"toplam","¤":"para birimi"},uk:{"∆":"delta","∞":"bezkinechnist","♥":"lubov","&":"i","|":"abo","<":"menshe",">":"bilshe","∑":"suma","¤":"valjuta"},vn:{"∆":"delta","∞":"vo cuc","♥":"yeu","&":"va","|":"hoac","<":"nho hon",">":"lon hon","∑":"tong","¤":"tien te"}},l=[";","?",":","@","&","=","+","$",",","/"].join(""),u=[";","?",":","@","&","=","+","$",","].join(""),h=[".","!","~","*","'","(",")"].join(""),f=function(y,g){var w="-",O="",V="",P=!0,A={},Y,k,L,I,E,S,N,R,G,U,$,F,_,b,x="";if(typeof y!="string")return"";if(typeof g=="string"&&(w=g),N=c.en,R=a.en,typeof g=="object"){Y=g.maintainCase||!1,A=g.custom&&typeof g.custom=="object"?g.custom:A,L=+g.truncate>1&&g.truncate||!1,I=g.uric||!1,E=g.uricNoSlash||!1,S=g.mark||!1,P=!(g.symbols===!1||g.lang===!1),w=g.separator||w,I&&(x+=l),E&&(x+=u),S&&(x+=h),N=g.lang&&c[g.lang]&&P?c[g.lang]:P?c.en:{},R=g.lang&&a[g.lang]?a[g.lang]:g.lang===!1||g.lang===!0?{}:a.en,g.titleCase&&typeof g.titleCase.length=="number"&&Array.prototype.toString.call(g.titleCase)?(g.titleCase.forEach(function(C){A[C+""]=C+""}),k=!0):k=!!g.titleCase,g.custom&&typeof g.custom.length=="number"&&Array.prototype.toString.call(g.custom)&&g.custom.forEach(function(C){A[C+""]=C+""}),Object.keys(A).forEach(function(C){var j;C.length>1?j=new RegExp("\\b"+p(C)+"\\b","gi"):j=new RegExp(p(C),"gi"),y=y.replace(j,A[C])});for($ in A)x+=$}for(x+=w,x=p(x),y=y.replace(/(^\s+|\s+$)/g,""),_=!1,b=!1,U=0,F=y.length;U<F;U++)$=y[U],m($,A)?_=!1:R[$]?($=_&&R[$].match(/[A-Za-z0-9]/)?" "+R[$]:R[$],_=!1):$ in o?(U+1<F&&s.indexOf(y[U+1])>=0?(V+=$,$=""):b===!0?($=r[V]+o[$],V=""):$=_&&o[$].match(/[A-Za-z0-9]/)?" "+o[$]:o[$],_=!1,b=!1):$ in r?(V+=$,$="",U===F-1&&($=r[V]),b=!0):N[$]&&!(I&&l.indexOf($)!==-1)&&!(E&&u.indexOf($)!==-1)?($=_||O.substr(-1).match(/[A-Za-z0-9]/)?w+N[$]:N[$],$+=y[U+1]!==void 0&&y[U+1].match(/[A-Za-z0-9]/)?w:"",_=!0):(b===!0?($=r[V]+$,V="",b=!1):_&&(/[A-Za-z0-9]/.test($)||O.substr(-1).match(/A-Za-z0-9]/))&&($=" "+$),_=!1),O+=$.replace(new RegExp("[^\\w\\s"+x+"_-]","g"),w);return k&&(O=O.replace(/(\w)(\S*)/g,function(C,j,H){var kt=j.toUpperCase()+(H!==null?H:"");return Object.keys(A).indexOf(kt.toLowerCase())<0?kt:kt.toLowerCase()})),O=O.replace(/\s+/g,w).replace(new RegExp("\\"+w+"+","g"),w).replace(new RegExp("(^\\"+w+"+|\\"+w+"+$)","g"),""),L&&O.length>L&&(G=O.charAt(L)===w,O=O.slice(0,L),G||(O=O.slice(0,O.lastIndexOf(w)))),!Y&&!k&&(O=O.toLowerCase()),O},d=function(y){return function(g){return f(g,y)}},p=function(y){return y.replace(/[-\\^$*+?.()|[\]{}\/]/g,"\\$&")},m=function(y,g){for(var w in g)if(g[w]===y)return!0};if(typeof e<"u"&&e.exports)e.exports=f,e.exports.createSlug=d;else if(typeof define<"u"&&define.amd)define([],function(){return f});else try{if(n.getSlug||n.createSlug)throw"speakingurl: globals exists /(getSlug|createSlug)/";n.getSlug=f,n.createSlug=d}catch{}}(t)}}),_c=Mo({"../../node_modules/.pnpm/speakingurl@14.0.1/node_modules/speakingurl/index.js"(t,e){v(),e.exports=gc()}});v(),v(),v(),v(),v(),v(),v(),v();function yc(t){var e;const n=t.name||t._componentTag||t.__VUE_DEVTOOLS_COMPONENT_GUSSED_NAME__||t.__name;return n==="index"&&(e=t.__file)!=null&&e.endsWith("index.vue")?"":n}function wc(t){const e=t.__file;if(e)return tc(ec(e,".vue"))}function Bo(t,e){return t.type.__VUE_DEVTOOLS_COMPONENT_GUSSED_NAME__=e,e}function on(t){if(t.__VUE_DEVTOOLS_NEXT_APP_RECORD__)return t.__VUE_DEVTOOLS_NEXT_APP_RECORD__;if(t.root)return t.appContext.app.__VUE_DEVTOOLS_NEXT_APP_RECORD__}function Uo(t){var e,n;const o=(e=t.subTree)==null?void 0:e.type,s=on(t);return s?((n=s?.types)==null?void 0:n.Fragment)===o:!1}function pe(t){var e,n,o;const s=yc(t?.type||{});if(s)return s;if(t?.root===t)return"Root";for(const a in(n=(e=t.parent)==null?void 0:e.type)==null?void 0:n.components)if(t.parent.type.components[a]===t?.type)return Bo(t,a);for(const a in(o=t.appContext)==null?void 0:o.components)if(t.appContext.components[a]===t?.type)return Bo(t,a);return wc(t?.type||{})||"Anonymous Component"}function Ec(t){var e,n,o;const s=(o=(n=(e=t?.appContext)==null?void 0:e.app)==null?void 0:n.__VUE_DEVTOOLS_NEXT_APP_RECORD_ID__)!=null?o:0,r=t===t?.root?"root":t.uid;return`${s}:${r}`}function sn(t,e){return e=e||`${t.id}:root`,t.instanceMap.get(e)||t.instanceMap.get(":root")}function bc(){const t={top:0,bottom:0,left:0,right:0,get width(){return t.right-t.left},get height(){return t.bottom-t.top}};return t}var he;function vc(t){return he||(he=document.createRange()),he.selectNode(t),he.getBoundingClientRect()}function kc(t){const e=bc();if(!t.children)return e;for(let n=0,o=t.children.length;n<o;n++){const s=t.children[n];let r;if(s.component)r=mt(s.component);else if(s.el){const a=s.el;a.nodeType===1||a.getBoundingClientRect?r=a.getBoundingClientRect():a.nodeType===3&&a.data.trim()&&(r=vc(a))}r&&Sc(e,r)}return e}function Sc(t,e){return(!t.top||e.top<t.top)&&(t.top=e.top),(!t.bottom||e.bottom>t.bottom)&&(t.bottom=e.bottom),(!t.left||e.left<t.left)&&(t.left=e.left),(!t.right||e.right>t.right)&&(t.right=e.right),t}var zo={top:0,left:0,right:0,bottom:0,width:0,height:0};function mt(t){const e=t.subTree.el;return typeof window>"u"?zo:Uo(t)?kc(t.subTree):e?.nodeType===1?e?.getBoundingClientRect():t.subTree.component?mt(t.subTree.component):zo}v();function rn(t){return Uo(t)?Oc(t.subTree):t.subTree?[t.subTree.el]:[]}function Oc(t){if(!t.children)return[];const e=[];return t.children.forEach(n=>{n.component?e.push(...rn(n.component)):n?.el&&e.push(n.el)}),e}var Ho="__vue-devtools-component-inspector__",Ko="__vue-devtools-component-inspector__card__",Fo="__vue-devtools-component-inspector__name__",Wo="__vue-devtools-component-inspector__indicator__",Go={display:"block",zIndex:2147483640,position:"fixed",backgroundColor:"#42b88325",border:"1px solid #42b88350",borderRadius:"5px",transition:"all 0.1s ease-in",pointerEvents:"none"},Ic={fontFamily:"Arial, Helvetica, sans-serif",padding:"5px 8px",borderRadius:"4px",textAlign:"left",position:"absolute",left:0,color:"#e9e9e9",fontSize:"14px",fontWeight:600,lineHeight:"24px",backgroundColor:"#42b883",boxShadow:"0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1)"},Tc={display:"inline-block",fontWeight:400,fontStyle:"normal",fontSize:"12px",opacity:.7};function Ct(){return document.getElementById(Ho)}function xc(){return document.getElementById(Ko)}function Vc(){return document.getElementById(Wo)}function Nc(){return document.getElementById(Fo)}function an(t){return{left:`${Math.round(t.left*100)/100}px`,top:`${Math.round(t.top*100)/100}px`,width:`${Math.round(t.width*100)/100}px`,height:`${Math.round(t.height*100)/100}px`}}function cn(t){var e;const n=document.createElement("div");n.id=(e=t.elementId)!=null?e:Ho,Object.assign(n.style,{...Go,...an(t.bounds),...t.style});const o=document.createElement("span");o.id=Ko,Object.assign(o.style,{...Ic,top:t.bounds.top<35?0:"-35px"});const s=document.createElement("span");s.id=Fo,s.innerHTML=`<${t.name}> `;const r=document.createElement("i");return r.id=Wo,r.innerHTML=`${Math.round(t.bounds.width*100)/100} x ${Math.round(t.bounds.height*100)/100}`,Object.assign(r.style,Tc),o.appendChild(s),o.appendChild(r),n.appendChild(o),document.body.appendChild(n),n}function ln(t){const e=Ct(),n=xc(),o=Nc(),s=Vc();e&&(Object.assign(e.style,{...Go,...an(t.bounds)}),Object.assign(n.style,{top:t.bounds.top<35?0:"-35px"}),o.innerHTML=`<${t.name}> `,s.innerHTML=`${Math.round(t.bounds.width*100)/100} x ${Math.round(t.bounds.height*100)/100}`)}function Cc(t){const e=mt(t);if(!e.width&&!e.height)return;const n=pe(t);Ct()?ln({bounds:e,name:n}):cn({bounds:e,name:n})}function Jo(){const t=Ct();t&&(t.style.display="none")}var un=null;function dn(t){const e=t.target;if(e){const n=e.__vueParentComponent;if(n&&(un=n,n.vnode.el)){const o=mt(n),s=pe(n);Ct()?ln({bounds:o,name:s}):cn({bounds:o,name:s})}}}function $c(t,e){if(t.preventDefault(),t.stopPropagation(),un){const n=Ec(un);e(n)}}var me=null;function Pc(){Jo(),window.removeEventListener("mouseover",dn),window.removeEventListener("click",me,!0),me=null}function Rc(){return window.addEventListener("mouseover",dn),new Promise(t=>{function e(n){n.preventDefault(),n.stopPropagation(),$c(n,o=>{window.removeEventListener("click",e,!0),me=null,window.removeEventListener("mouseover",dn);const s=Ct();s&&(s.style.display="none"),t(JSON.stringify({id:o}))})}me=e,window.addEventListener("click",e,!0)})}function Dc(t){const e=sn(K.value,t.id);if(e){const[n]=rn(e);if(typeof n.scrollIntoView=="function")n.scrollIntoView({behavior:"smooth"});else{const o=mt(e),s=document.createElement("div"),r={...an(o),position:"absolute"};Object.assign(s.style,r),document.body.appendChild(s),s.scrollIntoView({behavior:"smooth"}),setTimeout(()=>{document.body.removeChild(s)},2e3)}setTimeout(()=>{const o=mt(e);if(o.width||o.height){const s=pe(e),r=Ct();r?ln({...t,name:s,bounds:o}):cn({...t,name:s,bounds:o}),setTimeout(()=>{r&&(r.style.display="none")},1500)}},1200)}}v();var Yo;(Yo=T).__VUE_DEVTOOLS_COMPONENT_INSPECTOR_ENABLED__!=null||(Yo.__VUE_DEVTOOLS_COMPONENT_INSPECTOR_ENABLED__=!0);function Ac(t){let e=0;const n=setInterval(()=>{T.__VUE_INSPECTOR__&&(clearInterval(n),e+=30,t()),e>=5e3&&clearInterval(n)},30)}function Lc(){const t=T.__VUE_INSPECTOR__,e=t.openInEditor;t.openInEditor=async(...n)=>{t.disable(),e(...n)}}function jc(){return new Promise(t=>{function e(){Lc(),t(T.__VUE_INSPECTOR__)}T.__VUE_INSPECTOR__?e():Ac(()=>{e()})})}v(),v();function Mc(t){return!!(t&&t.__v_isReadonly)}function qo(t){return Mc(t)?qo(t.__v_raw):!!(t&&t.__v_isReactive)}function fn(t){return!!(t&&t.__v_isRef===!0)}function Jt(t){const e=t&&t.__v_raw;return e?Jt(e):t}var Bc=class{constructor(){this.refEditor=new Uc}set(t,e,n,o){const s=Array.isArray(e)?e:e.split(".");for(;s.length>1;){const c=s.shift();t instanceof Map?t=t.get(c):t instanceof Set?t=Array.from(t.values())[c]:t=t[c],this.refEditor.isRef(t)&&(t=this.refEditor.get(t))}const r=s[0],a=this.refEditor.get(t)[r];o?o(t,r,n):this.refEditor.isRef(a)?this.refEditor.set(a,n):t[r]=n}get(t,e){const n=Array.isArray(e)?e:e.split(".");for(let o=0;o<n.length;o++)if(t instanceof Map?t=t.get(n[o]):t=t[n[o]],this.refEditor.isRef(t)&&(t=this.refEditor.get(t)),!t)return;return t}has(t,e,n=!1){if(typeof t>"u")return!1;const o=Array.isArray(e)?e.slice():e.split("."),s=n?2:1;for(;t&&o.length>s;){const r=o.shift();t=t[r],this.refEditor.isRef(t)&&(t=this.refEditor.get(t))}return t!=null&&Object.prototype.hasOwnProperty.call(t,o[0])}createDefaultSetCallback(t){return(e,n,o)=>{if((t.remove||t.newKey)&&(Array.isArray(e)?e.splice(n,1):Jt(e)instanceof Map?e.delete(n):Jt(e)instanceof Set?e.delete(Array.from(e.values())[n]):Reflect.deleteProperty(e,n)),!t.remove){const s=e[t.newKey||n];this.refEditor.isRef(s)?this.refEditor.set(s,o):Jt(e)instanceof Map?e.set(t.newKey||n,o):Jt(e)instanceof Set?e.add(o):e[t.newKey||n]=o}}}},Uc=class{set(t,e){if(fn(t))t.value=e;else{if(t instanceof Set&&Array.isArray(e)){t.clear(),e.forEach(s=>t.add(s));return}const n=Object.keys(e);if(t instanceof Map){const s=new Set(t.keys());n.forEach(r=>{t.set(r,Reflect.get(e,r)),s.delete(r)}),s.forEach(r=>t.delete(r));return}const o=new Set(Object.keys(t));n.forEach(s=>{Reflect.set(t,s,Reflect.get(e,s)),o.delete(s)}),o.forEach(s=>Reflect.deleteProperty(t,s))}}get(t){return fn(t)?t.value:t}isRef(t){return fn(t)||qo(t)}};v(),v(),v();var zc="__VUE_DEVTOOLS_KIT_TIMELINE_LAYERS_STATE__";function Hc(){if(!Po||typeof localStorage>"u"||localStorage===null)return{recordingState:!1,mouseEventEnabled:!1,keyboardEventEnabled:!1,componentEventEnabled:!1,performanceEventEnabled:!1,selected:""};const t=localStorage.getItem(zc);return t?JSON.parse(t):{recordingState:!1,mouseEventEnabled:!1,keyboardEventEnabled:!1,componentEventEnabled:!1,performanceEventEnabled:!1,selected:""}}v(),v(),v();var Xo;(Xo=T).__VUE_DEVTOOLS_KIT_TIMELINE_LAYERS!=null||(Xo.__VUE_DEVTOOLS_KIT_TIMELINE_LAYERS=[]);var Kc=new Proxy(T.__VUE_DEVTOOLS_KIT_TIMELINE_LAYERS,{get(t,e,n){return Reflect.get(t,e,n)}});function Fc(t,e){M.timelineLayersState[e.id]=!1,Kc.push({...t,descriptorId:e.id,appRecord:on(e.app)})}var Zo;(Zo=T).__VUE_DEVTOOLS_KIT_INSPECTOR__!=null||(Zo.__VUE_DEVTOOLS_KIT_INSPECTOR__=[]);var pn=new Proxy(T.__VUE_DEVTOOLS_KIT_INSPECTOR__,{get(t,e,n){return Reflect.get(t,e,n)}}),Qo=Nt(()=>{Pt.hooks.callHook("sendInspectorToClient",ts())});function Wc(t,e){var n,o;pn.push({options:t,descriptor:e,treeFilterPlaceholder:(n=t.treeFilterPlaceholder)!=null?n:"Search tree...",stateFilterPlaceholder:(o=t.stateFilterPlaceholder)!=null?o:"Search state...",treeFilter:"",selectedNodeId:"",appRecord:on(e.app)}),Qo()}function ts(){return pn.filter(t=>t.descriptor.app===K.value.app).filter(t=>t.descriptor.id!=="components").map(t=>{var e;const n=t.descriptor,o=t.options;return{id:o.id,label:o.label,logo:n.logo,icon:`custom-ic-baseline-${(e=o?.icon)==null?void 0:e.replace(/_/g,"-")}`,packageName:n.packageName,homepage:n.homepage,pluginId:n.id}})}function ge(t,e){return pn.find(n=>n.options.id===t&&(e?n.descriptor.app===e:!0))}function Gc(){const t=Lo();t.hook("addInspector",({inspector:o,plugin:s})=>{Wc(o,s.descriptor)});const e=Nt(async({inspectorId:o,plugin:s})=>{var r;if(!o||!((r=s?.descriptor)!=null&&r.app)||M.highPerfModeEnabled)return;const a=ge(o,s.descriptor.app),c={app:s.descriptor.app,inspectorId:o,filter:a?.treeFilter||"",rootNodes:[]};await new Promise(l=>{t.callHookWith(async u=>{await Promise.all(u.map(h=>h(c))),l()},"getInspectorTree")}),t.callHookWith(async l=>{await Promise.all(l.map(u=>u({inspectorId:o,rootNodes:c.rootNodes})))},"sendInspectorTreeToClient")},120);t.hook("sendInspectorTree",e);const n=Nt(async({inspectorId:o,plugin:s})=>{var r;if(!o||!((r=s?.descriptor)!=null&&r.app)||M.highPerfModeEnabled)return;const a=ge(o,s.descriptor.app),c={app:s.descriptor.app,inspectorId:o,nodeId:a?.selectedNodeId||"",state:null},l={currentTab:`custom-inspector:${o}`};c.nodeId&&await new Promise(u=>{t.callHookWith(async h=>{await Promise.all(h.map(f=>f(c,l))),u()},"getInspectorState")}),t.callHookWith(async u=>{await Promise.all(u.map(h=>h({inspectorId:o,nodeId:c.nodeId,state:c.state})))},"sendInspectorStateToClient")},120);return t.hook("sendInspectorState",n),t.hook("customInspectorSelectNode",({inspectorId:o,nodeId:s,plugin:r})=>{const a=ge(o,r.descriptor.app);a&&(a.selectedNodeId=s)}),t.hook("timelineLayerAdded",({options:o,plugin:s})=>{Fc(o,s.descriptor)}),t.hook("timelineEventAdded",({options:o,plugin:s})=>{var r;const a=["performance","component-event","keyboard","mouse"];M.highPerfModeEnabled||!((r=M.timelineLayersState)!=null&&r[s.descriptor.id])&&!a.includes(o.layerId)||t.callHookWith(async c=>{await Promise.all(c.map(l=>l(o)))},"sendTimelineEventToClient")}),t.hook("getComponentInstances",async({app:o})=>{const s=o.__VUE_DEVTOOLS_NEXT_APP_RECORD__;if(!s)return null;const r=s.id.toString();return[...s.instanceMap].filter(([a])=>a.split(":")[0]===r).map(([,a])=>a)}),t.hook("getComponentBounds",async({instance:o})=>mt(o)),t.hook("getComponentName",({instance:o})=>pe(o)),t.hook("componentHighlight",({uid:o})=>{const s=K.value.instanceMap.get(o);s&&Cc(s)}),t.hook("componentUnhighlight",()=>{Jo()}),t}var es;(es=T).__VUE_DEVTOOLS_KIT_APP_RECORDS__!=null||(es.__VUE_DEVTOOLS_KIT_APP_RECORDS__=[]);var ns;(ns=T).__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD__!=null||(ns.__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD__={});var os;(os=T).__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD_ID__!=null||(os.__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD_ID__="");var ss;(ss=T).__VUE_DEVTOOLS_KIT_CUSTOM_TABS__!=null||(ss.__VUE_DEVTOOLS_KIT_CUSTOM_TABS__=[]);var rs;(rs=T).__VUE_DEVTOOLS_KIT_CUSTOM_COMMANDS__!=null||(rs.__VUE_DEVTOOLS_KIT_CUSTOM_COMMANDS__=[]);var gt="__VUE_DEVTOOLS_KIT_GLOBAL_STATE__";function Jc(){return{connected:!1,clientConnected:!1,vitePluginDetected:!0,appRecords:[],activeAppRecordId:"",tabs:[],commands:[],highPerfModeEnabled:!0,devtoolsClientDetected:{},perfUniqueGroupId:0,timelineLayersState:Hc()}}var is;(is=T)[gt]!=null||(is[gt]=Jc());var Yc=Nt(t=>{Pt.hooks.callHook("devtoolsStateUpdated",{state:t})});Nt((t,e)=>{Pt.hooks.callHook("devtoolsConnectedUpdated",{state:t,oldState:e})});var _e=new Proxy(T.__VUE_DEVTOOLS_KIT_APP_RECORDS__,{get(t,e,n){return e==="value"?T.__VUE_DEVTOOLS_KIT_APP_RECORDS__:T.__VUE_DEVTOOLS_KIT_APP_RECORDS__[e]}}),K=new Proxy(T.__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD__,{get(t,e,n){return e==="value"?T.__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD__:e==="id"?T.__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD_ID__:T.__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD__[e]}});function as(){Yc({...T[gt],appRecords:_e.value,activeAppRecordId:K.id,tabs:T.__VUE_DEVTOOLS_KIT_CUSTOM_TABS__,commands:T.__VUE_DEVTOOLS_KIT_CUSTOM_COMMANDS__})}function qc(t){T.__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD__=t,as()}function Xc(t){T.__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD_ID__=t,as()}var M=new Proxy(T[gt],{get(t,e){return e==="appRecords"?_e:e==="activeAppRecordId"?K.id:e==="tabs"?T.__VUE_DEVTOOLS_KIT_CUSTOM_TABS__:e==="commands"?T.__VUE_DEVTOOLS_KIT_CUSTOM_COMMANDS__:T[gt][e]},deleteProperty(t,e){return delete t[e],!0},set(t,e,n){return{...T[gt]},t[e]=n,T[gt][e]=n,!0}});function Zc(t={}){var e,n,o;const{file:s,host:r,baseUrl:a=window.location.origin,line:c=0,column:l=0}=t;if(s){if(r==="chrome-extension"){const u=s.replace(/\\/g,"\\\\"),h=(n=(e=window.VUE_DEVTOOLS_CONFIG)==null?void 0:e.openInEditorHost)!=null?n:"/";fetch(`${h}__open-in-editor?file=${encodeURI(s)}`).then(f=>{if(!f.ok){const d=`Opening component ${u} failed`;console.log(`%c${d}`,"color:red")}})}else if(M.vitePluginDetected){const u=(o=T.__VUE_DEVTOOLS_OPEN_IN_EDITOR_BASE_URL__)!=null?o:a;T.__VUE_INSPECTOR__.openInEditor(u,s,c,l)}}}v(),v(),v(),v(),v();var cs;(cs=T).__VUE_DEVTOOLS_KIT_PLUGIN_BUFFER__!=null||(cs.__VUE_DEVTOOLS_KIT_PLUGIN_BUFFER__=[]);var hn=new Proxy(T.__VUE_DEVTOOLS_KIT_PLUGIN_BUFFER__,{get(t,e,n){return Reflect.get(t,e,n)}});function mn(t){const e={};return Object.keys(t).forEach(n=>{e[n]=t[n].defaultValue}),e}function gn(t){return`__VUE_DEVTOOLS_NEXT_PLUGIN_SETTINGS__${t}__`}function Qc(t){var e,n,o;return(o=((n=(e=hn.find(r=>{var a;return r[0].id===t&&!!((a=r[0])!=null&&a.settings)}))==null?void 0:e[0])!=null?n:null)?.settings)!=null?o:null}function ls(t,e){var n,o,s;const r=gn(t);if(r){const a=localStorage.getItem(r);if(a)return JSON.parse(a)}if(t){const a=(o=(n=hn.find(c=>c[0].id===t))==null?void 0:n[0])!=null?o:null;return mn((s=a?.settings)!=null?s:{})}return mn(e)}function tl(t,e){const n=gn(t);localStorage.getItem(n)||localStorage.setItem(n,JSON.stringify(mn(e)))}function el(t,e,n){const o=gn(t),s=localStorage.getItem(o),r=JSON.parse(s||"{}"),a={...r,[e]:n};localStorage.setItem(o,JSON.stringify(a)),Pt.hooks.callHookWith(c=>{c.forEach(l=>l({pluginId:t,key:e,oldValue:r[e],newValue:n,settings:a}))},"setPluginSettings")}v(),v(),v(),v(),v(),v(),v(),v(),v(),v(),v();var us,ds,J=(ds=(us=T).__VUE_DEVTOOLS_HOOK)!=null?ds:us.__VUE_DEVTOOLS_HOOK=Lo(),nl={vueAppInit(t){J.hook("app:init",t)},vueAppUnmount(t){J.hook("app:unmount",t)},vueAppConnected(t){J.hook("app:connected",t)},componentAdded(t){return J.hook("component:added",t)},componentEmit(t){return J.hook("component:emit",t)},componentUpdated(t){return J.hook("component:updated",t)},componentRemoved(t){return J.hook("component:removed",t)},setupDevtoolsPlugin(t){J.hook("devtools-plugin:setup",t)},perfStart(t){return J.hook("perf:start",t)},perfEnd(t){return J.hook("perf:end",t)}},fs={on:nl,setupDevToolsPlugin(t,e){return J.callHook("devtools-plugin:setup",t,e)}},ol=class{constructor({plugin:t,ctx:e}){this.hooks=e.hooks,this.plugin=t}get on(){return{visitComponentTree:t=>{this.hooks.hook("visitComponentTree",t)},inspectComponent:t=>{this.hooks.hook("inspectComponent",t)},editComponentState:t=>{this.hooks.hook("editComponentState",t)},getInspectorTree:t=>{this.hooks.hook("getInspectorTree",t)},getInspectorState:t=>{this.hooks.hook("getInspectorState",t)},editInspectorState:t=>{this.hooks.hook("editInspectorState",t)},inspectTimelineEvent:t=>{this.hooks.hook("inspectTimelineEvent",t)},timelineCleared:t=>{this.hooks.hook("timelineCleared",t)},setPluginSettings:t=>{this.hooks.hook("setPluginSettings",t)}}}notifyComponentUpdate(t){var e;if(M.highPerfModeEnabled)return;const n=ts().find(o=>o.packageName===this.plugin.descriptor.packageName);if(n?.id){if(t){const o=[t.appContext.app,t.uid,(e=t.parent)==null?void 0:e.uid,t];J.callHook("component:updated",...o)}else J.callHook("component:updated");this.hooks.callHook("sendInspectorState",{inspectorId:n.id,plugin:this.plugin})}}addInspector(t){this.hooks.callHook("addInspector",{inspector:t,plugin:this.plugin}),this.plugin.descriptor.settings&&tl(t.id,this.plugin.descriptor.settings)}sendInspectorTree(t){M.highPerfModeEnabled||this.hooks.callHook("sendInspectorTree",{inspectorId:t,plugin:this.plugin})}sendInspectorState(t){M.highPerfModeEnabled||this.hooks.callHook("sendInspectorState",{inspectorId:t,plugin:this.plugin})}selectInspectorNode(t,e){this.hooks.callHook("customInspectorSelectNode",{inspectorId:t,nodeId:e,plugin:this.plugin})}visitComponentTree(t){return this.hooks.callHook("visitComponentTree",t)}now(){return M.highPerfModeEnabled?0:Date.now()}addTimelineLayer(t){this.hooks.callHook("timelineLayerAdded",{options:t,plugin:this.plugin})}addTimelineEvent(t){M.highPerfModeEnabled||this.hooks.callHook("timelineEventAdded",{options:t,plugin:this.plugin})}getSettings(t){return ls(t??this.plugin.descriptor.id,this.plugin.descriptor.settings)}getComponentInstances(t){return this.hooks.callHook("getComponentInstances",{app:t})}getComponentBounds(t){return this.hooks.callHook("getComponentBounds",{instance:t})}getComponentName(t){return this.hooks.callHook("getComponentName",{instance:t})}highlightElement(t){const e=t.__VUE_DEVTOOLS_NEXT_UID__;return this.hooks.callHook("componentHighlight",{uid:e})}unhighlightElement(){return this.hooks.callHook("componentUnhighlight")}},sl=ol;v(),v(),v(),v();var rl="__vue_devtool_undefined__",il="__vue_devtool_infinity__",al="__vue_devtool_negative_infinity__",cl="__vue_devtool_nan__";v(),v();var ll={[rl]:"undefined",[cl]:"NaN",[il]:"Infinity",[al]:"-Infinity"};Object.entries(ll).reduce((t,[e,n])=>(t[n]=e,t),{}),v(),v(),v(),v(),v();var ps;(ps=T).__VUE_DEVTOOLS_KIT__REGISTERED_PLUGIN_APPS__!=null||(ps.__VUE_DEVTOOLS_KIT__REGISTERED_PLUGIN_APPS__=new Set);function hs(t,e){return fs.setupDevToolsPlugin(t,e)}function ul(t,e){const[n,o]=t;if(n.app!==e)return;const s=new sl({plugin:{setupFn:o,descriptor:n},ctx:Pt});n.packageName==="vuex"&&s.on.editInspectorState(r=>{s.sendInspectorState(r.inspectorId)}),o(s)}function ms(t,e){T.__VUE_DEVTOOLS_KIT__REGISTERED_PLUGIN_APPS__.has(t)||M.highPerfModeEnabled&&!e?.inspectingComponent||(T.__VUE_DEVTOOLS_KIT__REGISTERED_PLUGIN_APPS__.add(t),hn.forEach(n=>{ul(n,t)}))}v(),v();var Yt="__VUE_DEVTOOLS_ROUTER__",$t="__VUE_DEVTOOLS_ROUTER_INFO__",gs;(gs=T)[$t]!=null||(gs[$t]={currentRoute:null,routes:[]});var _s;(_s=T)[Yt]!=null||(_s[Yt]={}),new Proxy(T[$t],{get(t,e){return T[$t][e]}}),new Proxy(T[Yt],{get(t,e){if(e==="value")return T[Yt]}});function dl(t){const e=new Map;return(t?.getRoutes()||[]).filter(n=>!e.has(n.path)&&e.set(n.path,1))}function _n(t){return t.map(e=>{let{path:n,name:o,children:s,meta:r}=e;return s?.length&&(s=_n(s)),{path:n,name:o,children:s,meta:r}})}function fl(t){if(t){const{fullPath:e,hash:n,href:o,path:s,name:r,matched:a,params:c,query:l}=t;return{fullPath:e,hash:n,href:o,path:s,name:r,params:c,query:l,matched:_n(a)}}return t}function pl(t,e){function n(){var o;const s=(o=t.app)==null?void 0:o.config.globalProperties.$router,r=fl(s?.currentRoute.value),a=_n(dl(s)),c=console.warn;console.warn=()=>{},T[$t]={currentRoute:r?Do(r):{},routes:Do(a)},T[Yt]=s,console.warn=c}n(),fs.on.componentUpdated(Nt(()=>{var o;((o=e.value)==null?void 0:o.app)===t.app&&(n(),!M.highPerfModeEnabled&&Pt.hooks.callHook("routerInfoUpdated",{state:T[$t]}))},200))}function hl(t){return{async getInspectorTree(e){const n={...e,app:K.value.app,rootNodes:[]};return await new Promise(o=>{t.callHookWith(async s=>{await Promise.all(s.map(r=>r(n))),o()},"getInspectorTree")}),n.rootNodes},async getInspectorState(e){const n={...e,app:K.value.app,state:null},o={currentTab:`custom-inspector:${e.inspectorId}`};return await new Promise(s=>{t.callHookWith(async r=>{await Promise.all(r.map(a=>a(n,o))),s()},"getInspectorState")}),n.state},editInspectorState(e){const n=new Bc,o={...e,app:K.value.app,set:(s,r=e.path,a=e.state.value,c)=>{n.set(s,r,a,c||n.createDefaultSetCallback(e.state))}};t.callHookWith(s=>{s.forEach(r=>r(o))},"editInspectorState")},sendInspectorState(e){const n=ge(e);t.callHook("sendInspectorState",{inspectorId:e,plugin:{descriptor:n.descriptor,setupFn:()=>({})}})},inspectComponentInspector(){return Rc()},cancelInspectComponentInspector(){return Pc()},getComponentRenderCode(e){const n=sn(K.value,e);if(n)return typeof n?.type!="function"?n.render.toString():n.type.toString()},scrollToComponent(e){return Dc({id:e})},openInEditor:Zc,getVueInspector:jc,toggleApp(e,n){const o=_e.value.find(s=>s.id===e);o&&(Xc(e),qc(o),pl(o,K),Qo(),ms(o.app,n))},inspectDOM(e){const n=sn(K.value,e);if(n){const[o]=rn(n);o&&(T.__VUE_DEVTOOLS_INSPECT_DOM_TARGET__=o)}},updatePluginSettings(e,n,o){el(e,n,o)},getPluginSettings(e){return{options:Qc(e),values:ls(e)}}}}v();var ys;(ys=T).__VUE_DEVTOOLS_ENV__!=null||(ys.__VUE_DEVTOOLS_ENV__={vitePluginDetected:!1});var ws=Gc(),Es;(Es=T).__VUE_DEVTOOLS_KIT_CONTEXT__!=null||(Es.__VUE_DEVTOOLS_KIT_CONTEXT__={hooks:ws,get state(){return{...M,activeAppRecordId:K.id,activeAppRecord:K.value,appRecords:_e.value}},api:hl(ws)});var Pt=T.__VUE_DEVTOOLS_KIT_CONTEXT__;v(),mc(_c());var bs;(bs=T).__VUE_DEVTOOLS_NEXT_APP_RECORD_INFO__!=null||(bs.__VUE_DEVTOOLS_NEXT_APP_RECORD_INFO__={id:0,appIds:new Set}),v(),v();function ml(t){M.highPerfModeEnabled=t??!M.highPerfModeEnabled,!t&&K.value&&ms(K.value.app)}v(),v(),v();function gl(t){M.devtoolsClientDetected={...M.devtoolsClientDetected,...t};const e=Object.values(M.devtoolsClientDetected).some(Boolean);ml(!e)}var vs;(vs=T).__VUE_DEVTOOLS_UPDATE_CLIENT_DETECTED__!=null||(vs.__VUE_DEVTOOLS_UPDATE_CLIENT_DETECTED__=gl),v(),v(),v(),v(),v(),v(),v();var _l=class{constructor(){this.keyToValue=new Map,this.valueToKey=new Map}set(t,e){this.keyToValue.set(t,e),this.valueToKey.set(e,t)}getByKey(t){return this.keyToValue.get(t)}getByValue(t){return this.valueToKey.get(t)}clear(){this.keyToValue.clear(),this.valueToKey.clear()}},ks=class{constructor(t){this.generateIdentifier=t,this.kv=new _l}register(t,e){this.kv.getByValue(t)||(e||(e=this.generateIdentifier(t)),this.kv.set(e,t))}clear(){this.kv.clear()}getIdentifier(t){return this.kv.getByValue(t)}getValue(t){return this.kv.getByKey(t)}},yl=class extends ks{constructor(){super(t=>t.name),this.classToAllowedProps=new Map}register(t,e){typeof e=="object"?(e.allowProps&&this.classToAllowedProps.set(t,e.allowProps),super.register(t,e.identifier)):super.register(t,e)}getAllowedProps(t){return this.classToAllowedProps.get(t)}};v(),v();function wl(t){if("values"in Object)return Object.values(t);const e=[];for(const n in t)t.hasOwnProperty(n)&&e.push(t[n]);return e}function El(t,e){const n=wl(t);if("find"in n)return n.find(e);const o=n;for(let s=0;s<o.length;s++){const r=o[s];if(e(r))return r}}function Rt(t,e){Object.entries(t).forEach(([n,o])=>e(o,n))}function ye(t,e){return t.indexOf(e)!==-1}function Ss(t,e){for(let n=0;n<t.length;n++){const o=t[n];if(e(o))return o}}var bl=class{constructor(){this.transfomers={}}register(t){this.transfomers[t.name]=t}findApplicable(t){return El(this.transfomers,e=>e.isApplicable(t))}findByName(t){return this.transfomers[t]}};v(),v();var vl=t=>Object.prototype.toString.call(t).slice(8,-1),Os=t=>typeof t>"u",kl=t=>t===null,qt=t=>typeof t!="object"||t===null||t===Object.prototype?!1:Object.getPrototypeOf(t)===null?!0:Object.getPrototypeOf(t)===Object.prototype,yn=t=>qt(t)&&Object.keys(t).length===0,lt=t=>Array.isArray(t),Sl=t=>typeof t=="string",Ol=t=>typeof t=="number"&&!isNaN(t),Il=t=>typeof t=="boolean",Tl=t=>t instanceof RegExp,Xt=t=>t instanceof Map,Zt=t=>t instanceof Set,Is=t=>vl(t)==="Symbol",xl=t=>t instanceof Date&&!isNaN(t.valueOf()),Vl=t=>t instanceof Error,Ts=t=>typeof t=="number"&&isNaN(t),Nl=t=>Il(t)||kl(t)||Os(t)||Ol(t)||Sl(t)||Is(t),Cl=t=>typeof t=="bigint",$l=t=>t===1/0||t===-1/0,Pl=t=>ArrayBuffer.isView(t)&&!(t instanceof DataView),Rl=t=>t instanceof URL;v();var xs=t=>t.replace(/\./g,"\\."),wn=t=>t.map(String).map(xs).join("."),Qt=t=>{const e=[];let n="";for(let s=0;s<t.length;s++){let r=t.charAt(s);if(r==="\\"&&t.charAt(s+1)==="."){n+=".",s++;continue}if(r==="."){e.push(n),n="";continue}n+=r}const o=n;return e.push(o),e};v();function tt(t,e,n,o){return{isApplicable:t,annotation:e,transform:n,untransform:o}}var Vs=[tt(Os,"undefined",()=>null,()=>{}),tt(Cl,"bigint",t=>t.toString(),t=>typeof BigInt<"u"?BigInt(t):(console.error("Please add a BigInt polyfill."),t)),tt(xl,"Date",t=>t.toISOString(),t=>new Date(t)),tt(Vl,"Error",(t,e)=>{const n={name:t.name,message:t.message};return e.allowedErrorProps.forEach(o=>{n[o]=t[o]}),n},(t,e)=>{const n=new Error(t.message);return n.name=t.name,n.stack=t.stack,e.allowedErrorProps.forEach(o=>{n[o]=t[o]}),n}),tt(Tl,"regexp",t=>""+t,t=>{const e=t.slice(1,t.lastIndexOf("/")),n=t.slice(t.lastIndexOf("/")+1);return new RegExp(e,n)}),tt(Zt,"set",t=>[...t.values()],t=>new Set(t)),tt(Xt,"map",t=>[...t.entries()],t=>new Map(t)),tt(t=>Ts(t)||$l(t),"number",t=>Ts(t)?"NaN":t>0?"Infinity":"-Infinity",Number),tt(t=>t===0&&1/t===-1/0,"number",()=>"-0",Number),tt(Rl,"URL",t=>t.toString(),t=>new URL(t))];function we(t,e,n,o){return{isApplicable:t,annotation:e,transform:n,untransform:o}}var Ns=we((t,e)=>Is(t)?!!e.symbolRegistry.getIdentifier(t):!1,(t,e)=>["symbol",e.symbolRegistry.getIdentifier(t)],t=>t.description,(t,e,n)=>{const o=n.symbolRegistry.getValue(e[1]);if(!o)throw new Error("Trying to deserialize unknown symbol");return o}),Dl=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array,Uint8ClampedArray].reduce((t,e)=>(t[e.name]=e,t),{}),Cs=we(Pl,t=>["typed-array",t.constructor.name],t=>[...t],(t,e)=>{const n=Dl[e[1]];if(!n)throw new Error("Trying to deserialize unknown typed array");return new n(t)});function $s(t,e){return t?.constructor?!!e.classRegistry.getIdentifier(t.constructor):!1}var Ps=we($s,(t,e)=>["class",e.classRegistry.getIdentifier(t.constructor)],(t,e)=>{const n=e.classRegistry.getAllowedProps(t.constructor);if(!n)return{...t};const o={};return n.forEach(s=>{o[s]=t[s]}),o},(t,e,n)=>{const o=n.classRegistry.getValue(e[1]);if(!o)throw new Error(`Trying to deserialize unknown class '${e[1]}' - check https://github.com/blitz-js/superjson/issues/116#issuecomment-773996564`);return Object.assign(Object.create(o.prototype),t)}),Rs=we((t,e)=>!!e.customTransformerRegistry.findApplicable(t),(t,e)=>["custom",e.customTransformerRegistry.findApplicable(t).name],(t,e)=>e.customTransformerRegistry.findApplicable(t).serialize(t),(t,e,n)=>{const o=n.customTransformerRegistry.findByName(e[1]);if(!o)throw new Error("Trying to deserialize unknown custom value");return o.deserialize(t)}),Al=[Ps,Ns,Rs,Cs],Ds=(t,e)=>{const n=Ss(Al,s=>s.isApplicable(t,e));if(n)return{value:n.transform(t,e),type:n.annotation(t,e)};const o=Ss(Vs,s=>s.isApplicable(t,e));if(o)return{value:o.transform(t,e),type:o.annotation}},As={};Vs.forEach(t=>{As[t.annotation]=t});var Ll=(t,e,n)=>{if(lt(e))switch(e[0]){case"symbol":return Ns.untransform(t,e,n);case"class":return Ps.untransform(t,e,n);case"custom":return Rs.untransform(t,e,n);case"typed-array":return Cs.untransform(t,e,n);default:throw new Error("Unknown transformation: "+e)}else{const o=As[e];if(!o)throw new Error("Unknown transformation: "+e);return o.untransform(t,n)}};v();var Dt=(t,e)=>{if(e>t.size)throw new Error("index out of bounds");const n=t.keys();for(;e>0;)n.next(),e--;return n.next().value};function Ls(t){if(ye(t,"__proto__"))throw new Error("__proto__ is not allowed as a property");if(ye(t,"prototype"))throw new Error("prototype is not allowed as a property");if(ye(t,"constructor"))throw new Error("constructor is not allowed as a property")}var jl=(t,e)=>{Ls(e);for(let n=0;n<e.length;n++){const o=e[n];if(Zt(t))t=Dt(t,+o);else if(Xt(t)){const s=+o,r=+e[++n]==0?"key":"value",a=Dt(t,s);switch(r){case"key":t=a;break;case"value":t=t.get(a);break}}else t=t[o]}return t},En=(t,e,n)=>{if(Ls(e),e.length===0)return n(t);let o=t;for(let r=0;r<e.length-1;r++){const a=e[r];if(lt(o)){const c=+a;o=o[c]}else if(qt(o))o=o[a];else if(Zt(o)){const c=+a;o=Dt(o,c)}else if(Xt(o)){if(r===e.length-2)break;const c=+a,l=+e[++r]==0?"key":"value",u=Dt(o,c);switch(l){case"key":o=u;break;case"value":o=o.get(u);break}}}const s=e[e.length-1];if(lt(o)?o[+s]=n(o[+s]):qt(o)&&(o[s]=n(o[s])),Zt(o)){const r=Dt(o,+s),a=n(r);r!==a&&(o.delete(r),o.add(a))}if(Xt(o)){const r=+e[e.length-2],a=Dt(o,r);switch(+s==0?"key":"value"){case"key":{const c=n(a);o.set(c,o.get(a)),c!==a&&o.delete(a);break}case"value":{o.set(a,n(o.get(a)));break}}}return t};function bn(t,e,n=[]){if(!t)return;if(!lt(t)){Rt(t,(r,a)=>bn(r,e,[...n,...Qt(a)]));return}const[o,s]=t;s&&Rt(s,(r,a)=>{bn(r,e,[...n,...Qt(a)])}),e(o,n)}function Ml(t,e,n){return bn(e,(o,s)=>{t=En(t,s,r=>Ll(r,o,n))}),t}function Bl(t,e){function n(o,s){const r=jl(t,Qt(s));o.map(Qt).forEach(a=>{t=En(t,a,()=>r)})}if(lt(e)){const[o,s]=e;o.forEach(r=>{t=En(t,Qt(r),()=>t)}),s&&Rt(s,n)}else Rt(e,n);return t}var Ul=(t,e)=>qt(t)||lt(t)||Xt(t)||Zt(t)||$s(t,e);function zl(t,e,n){const o=n.get(t);o?o.push(e):n.set(t,[e])}function Hl(t,e){const n={};let o;return t.forEach(s=>{if(s.length<=1)return;e||(s=s.map(c=>c.map(String)).sort((c,l)=>c.length-l.length));const[r,...a]=s;r.length===0?o=a.map(wn):n[wn(r)]=a.map(wn)}),o?yn(n)?[o]:[o,n]:yn(n)?void 0:n}var js=(t,e,n,o,s=[],r=[],a=new Map)=>{var c;const l=Nl(t);if(!l){zl(t,s,e);const m=a.get(t);if(m)return o?{transformedValue:null}:m}if(!Ul(t,n)){const m=Ds(t,n),y=m?{transformedValue:m.value,annotations:[m.type]}:{transformedValue:t};return l||a.set(t,y),y}if(ye(r,t))return{transformedValue:null};const u=Ds(t,n),h=(c=u?.value)!=null?c:t,f=lt(h)?[]:{},d={};Rt(h,(m,y)=>{if(y==="__proto__"||y==="constructor"||y==="prototype")throw new Error(`Detected property ${y}. This is a prototype pollution risk, please remove it from your object.`);const g=js(m,e,n,o,[...s,y],[...r,t],a);f[y]=g.transformedValue,lt(g.annotations)?d[y]=g.annotations:qt(g.annotations)&&Rt(g.annotations,(w,O)=>{d[xs(y)+"."+O]=w})});const p=yn(d)?{transformedValue:f,annotations:u?[u.type]:void 0}:{transformedValue:f,annotations:u?[u.type,d]:d};return l||a.set(t,p),p};v(),v();function Ms(t){return Object.prototype.toString.call(t).slice(8,-1)}function Bs(t){return Ms(t)==="Array"}function Kl(t){if(Ms(t)!=="Object")return!1;const e=Object.getPrototypeOf(t);return!!e&&e.constructor===Object&&e===Object.prototype}function Fl(t,e,n,o,s){const r={}.propertyIsEnumerable.call(o,e)?"enumerable":"nonenumerable";r==="enumerable"&&(t[e]=n),s&&r==="nonenumerable"&&Object.defineProperty(t,e,{value:n,enumerable:!1,writable:!0,configurable:!0})}function vn(t,e={}){if(Bs(t))return t.map(s=>vn(s,e));if(!Kl(t))return t;const n=Object.getOwnPropertyNames(t),o=Object.getOwnPropertySymbols(t);return[...n,...o].reduce((s,r)=>{if(Bs(e.props)&&!e.props.includes(r))return s;const a=t[r],c=vn(a,e);return Fl(s,r,c,t,e.nonenumerable),s},{})}var D=class{constructor({dedupe:t=!1}={}){this.classRegistry=new yl,this.symbolRegistry=new ks(e=>{var n;return(n=e.description)!=null?n:""}),this.customTransformerRegistry=new bl,this.allowedErrorProps=[],this.dedupe=t}serialize(t){const e=new Map,n=js(t,e,this,this.dedupe),o={json:n.transformedValue};n.annotations&&(o.meta={...o.meta,values:n.annotations});const s=Hl(e,this.dedupe);return s&&(o.meta={...o.meta,referentialEqualities:s}),o}deserialize(t){const{json:e,meta:n}=t;let o=vn(e);return n?.values&&(o=Ml(o,n.values,this)),n?.referentialEqualities&&(o=Bl(o,n.referentialEqualities)),o}stringify(t){return JSON.stringify(this.serialize(t))}parse(t){return this.deserialize(JSON.parse(t))}registerClass(t,e){this.classRegistry.register(t,e)}registerSymbol(t,e){this.symbolRegistry.register(t,e)}registerCustom(t,e){this.customTransformerRegistry.register({name:e,...t})}allowErrorProps(...t){this.allowedErrorProps.push(...t)}};D.defaultInstance=new D,D.serialize=D.defaultInstance.serialize.bind(D.defaultInstance),D.deserialize=D.defaultInstance.deserialize.bind(D.defaultInstance),D.stringify=D.defaultInstance.stringify.bind(D.defaultInstance),D.parse=D.defaultInstance.parse.bind(D.defaultInstance),D.registerClass=D.defaultInstance.registerClass.bind(D.defaultInstance),D.registerSymbol=D.defaultInstance.registerSymbol.bind(D.defaultInstance),D.registerCustom=D.defaultInstance.registerCustom.bind(D.defaultInstance),D.allowErrorProps=D.defaultInstance.allowErrorProps.bind(D.defaultInstance),v(),v(),v(),v(),v(),v(),v(),v(),v(),v(),v(),v(),v(),v(),v(),v(),v(),v(),v(),v(),v(),v(),v();var Us;(Us=T).__VUE_DEVTOOLS_KIT_MESSAGE_CHANNELS__!=null||(Us.__VUE_DEVTOOLS_KIT_MESSAGE_CHANNELS__=[]);var zs;(zs=T).__VUE_DEVTOOLS_KIT_RPC_CLIENT__!=null||(zs.__VUE_DEVTOOLS_KIT_RPC_CLIENT__=null);var Hs;(Hs=T).__VUE_DEVTOOLS_KIT_RPC_SERVER__!=null||(Hs.__VUE_DEVTOOLS_KIT_RPC_SERVER__=null);var Ks;(Ks=T).__VUE_DEVTOOLS_KIT_VITE_RPC_CLIENT__!=null||(Ks.__VUE_DEVTOOLS_KIT_VITE_RPC_CLIENT__=null);var Fs;(Fs=T).__VUE_DEVTOOLS_KIT_VITE_RPC_SERVER__!=null||(Fs.__VUE_DEVTOOLS_KIT_VITE_RPC_SERVER__=null);var Ws;(Ws=T).__VUE_DEVTOOLS_KIT_BROADCAST_RPC_SERVER__!=null||(Ws.__VUE_DEVTOOLS_KIT_BROADCAST_RPC_SERVER__=null),v(),v(),v(),v(),v(),v(),v();/*!
|
|
1
|
+
(function(X,i){typeof exports=="object"&&typeof module<"u"?i(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],i):(X=typeof globalThis<"u"?globalThis:X||self,i(X["@stonecrop/desktop"]={},X.Vue))})(this,function(X,i){"use strict";const ni={class:"action-menu-icon"},oi=["onclick"],si={key:1},ri=["onClick"],ii={class:"dropdown-container"},ai={class:"dropdown"},ci=["onclick"],li=["href"],ui={class:"dropdown-item"},di=i.defineComponent({__name:"ActionSet",props:{elements:{}},setup(t){const e=i.ref(t.elements),n=i.ref(!1),o=i.ref(null),s=i.ref(!1),r=i.ref(!1);i.onMounted(()=>{a()});const a=()=>{for(const h of e.value)h.type==="dropdown"&&(h.show=!1)},c=()=>{s.value=!0,o.value=setTimeout(()=>{s.value&&(n.value=!0)},500)},l=()=>{s.value=!1,r.value=!1,clearTimeout(o.value),n.value=!1},u=h=>{const f=!e.value[h].show;a(),e.value[h].show=f};return(h,f)=>(i.openBlock(),i.createElementBlock("div",{class:i.normalizeClass([{"open-set":n.value,"hovered-and-closed":r.value},"action-set collapse"]),onMouseover:c,onMouseleave:l},[i.createElementVNode("div",ni,[i.createElementVNode("div",{id:"chevron",onClick:f[0]||(f[0]=d=>r.value=!r.value)},f[1]||(f[1]=[i.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"},[i.createElementVNode("polygon",{points:"54.2,33.4 29.2,58.8 25,54.6 50,29.2 "})],-1),i.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"},[i.createElementVNode("polygon",{points:"70.8,58.8 45.8,33.4 50,29.2 75,54.6 "})],-1)]))]),f[2]||(f[2]=i.createElementVNode("div",{style:{"margin-right":"30px"}},null,-1)),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(e.value,(d,p)=>(i.openBlock(),i.createElementBlock("div",{class:"action-element",key:d.label},[d.type=="button"?(i.openBlock(),i.createElementBlock("button",{key:0,onclick:d.action,class:"button-default"},i.toDisplayString(d.label),9,oi)):i.createCommentVNode("",!0),d.type=="dropdown"?(i.openBlock(),i.createElementBlock("div",si,[i.createElementVNode("button",{class:"button-default",onClick:m=>u(p)},i.toDisplayString(d.label),9,ri),i.withDirectives(i.createElementVNode("div",ii,[i.createElementVNode("div",ai,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(d.actions,m=>(i.openBlock(),i.createElementBlock("div",{key:m.label},[m.action!=null?(i.openBlock(),i.createElementBlock("button",{key:0,onclick:m.action,class:"dropdown-item"},i.toDisplayString(m.label),9,ci)):m.link!=null?(i.openBlock(),i.createElementBlock("a",{key:1,href:m.link},[i.createElementVNode("button",ui,i.toDisplayString(m.label),1)],8,li)):i.createCommentVNode("",!0)]))),128))])],512),[[i.vShow,d.show]])])):i.createCommentVNode("",!0)]))),128))],34))}}),Xn=(t,e)=>{const n=t.__vccOpts||t;for(const[o,s]of e)n[o]=s;return n},Zn=Xn(di,[["__scopeId","data-v-38e7af34"]]),fi={class:"command-palette-header"},pi=["placeholder"],hi={key:0,class:"command-palette-results"},mi=["onClick","onMouseover"],gi={class:"result-title"},_i={class:"result-content"},yi={key:1,class:"command-palette-no-results"},Qn=i.defineComponent({__name:"CommandPalette",props:{search:{type:Function},isOpen:{type:Boolean,default:!1},placeholder:{default:"Type a command or search..."},maxResults:{default:10}},emits:["select","close"],setup(t,{emit:e}){const n=e,o=i.ref(""),s=i.ref(0),r=i.useTemplateRef("input"),a=i.computed(()=>o.value?t.search(o.value).slice(0,t.maxResults):[]);i.watch(()=>t.isOpen,async h=>{h&&(o.value="",s.value=0,await i.nextTick(),r.value?.focus())}),i.watch(a,()=>{s.value=0});const c=()=>{n("close")},l=h=>{switch(h.key){case"Escape":c();break;case"ArrowDown":h.preventDefault(),a.value.length&&(s.value=(s.value+1)%a.value.length);break;case"ArrowUp":h.preventDefault(),a.value.length&&(s.value=(s.value-1+a.value.length)%a.value.length);break;case"Enter":a.value.length&&s.value>=0&&u(a.value[s.value]);break}},u=h=>{n("select",h),c()};return(h,f)=>(i.openBlock(),i.createBlock(i.Teleport,{to:"body"},[i.createVNode(i.Transition,{name:"fade"},{default:i.withCtx(()=>[h.isOpen?(i.openBlock(),i.createElementBlock("div",{key:0,class:"command-palette-overlay",onClick:c},[i.createElementVNode("div",{class:"command-palette",onClick:f[1]||(f[1]=i.withModifiers(()=>{},["stop"]))},[i.createElementVNode("div",fi,[i.withDirectives(i.createElementVNode("input",{ref:"input","onUpdate:modelValue":f[0]||(f[0]=d=>o.value=d),type:"text",class:"command-palette-input",placeholder:h.placeholder,autofocus:"",onKeydown:l},null,40,pi),[[i.vModelText,o.value]])]),a.value.length?(i.openBlock(),i.createElementBlock("div",hi,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(a.value,(d,p)=>(i.openBlock(),i.createElementBlock("div",{key:p,class:i.normalizeClass(["command-palette-result",{selected:p===s.value}]),onClick:m=>u(d),onMouseover:m=>s.value=p},[i.createElementVNode("div",gi,[i.renderSlot(h.$slots,"title",{result:d})]),i.createElementVNode("div",_i,[i.renderSlot(h.$slots,"content",{result:d})])],42,mi))),128))])):o.value&&!a.value.length?(i.openBlock(),i.createElementBlock("div",yi,[i.renderSlot(h.$slots,"empty",{},()=>[i.createTextVNode(' No results found for "'+i.toDisplayString(o.value)+'" ',1)])])):i.createCommentVNode("",!0)])])):i.createCommentVNode("",!0)]),_:3})]))}}),wi=(t,e)=>{const n=t.__vccOpts||t;for(const[o,s]of e)n[o]=s;return n};function to(t){return i.getCurrentScope()?(i.onScopeDispose(t),!0):!1}const eo=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const Ei=Object.prototype.toString,bi=t=>Ei.call(t)==="[object Object]",vi=()=>{},no=ki();function ki(){var t,e;return eo&&((t=window?.navigator)==null?void 0:t.userAgent)&&(/iP(?:ad|hone|od)/.test(window.navigator.userAgent)||((e=window?.navigator)==null?void 0:e.maxTouchPoints)>2&&/iPad|Macintosh/.test(window?.navigator.userAgent))}function Si(...t){if(t.length!==1)return i.toRef(...t);const e=t[0];return typeof e=="function"?i.readonly(i.customRef(()=>({get:e,set:vi}))):i.ref(e)}function Pe(t){return Array.isArray(t)?t:[t]}function Oi(t,e,n){return i.watch(t,e,{...n,immediate:!0})}const Ii=eo?window:void 0;function Ti(t){var e;const n=i.toValue(t);return(e=n?.$el)!=null?e:n}function xi(...t){const e=[],n=()=>{e.forEach(c=>c()),e.length=0},o=(c,l,u,h)=>(c.addEventListener(l,u,h),()=>c.removeEventListener(l,u,h)),s=i.computed(()=>{const c=Pe(i.toValue(t[0])).filter(l=>l!=null);return c.every(l=>typeof l!="string")?c:void 0}),r=Oi(()=>{var c,l;return[(l=(c=s.value)==null?void 0:c.map(u=>Ti(u)))!=null?l:[Ii].filter(u=>u!=null),Pe(i.toValue(s.value?t[1]:t[0])),Pe(i.unref(s.value?t[2]:t[1])),i.toValue(s.value?t[3]:t[2])]},([c,l,u,h])=>{if(n(),!c?.length||!l?.length||!u?.length)return;const f=bi(h)?{...h}:h;e.push(...c.flatMap(d=>l.flatMap(p=>u.map(m=>o(d,p,m,f)))))},{flush:"post"}),a=()=>{r(),n()};return to(n),a}function Re(t){return typeof Window<"u"&&t instanceof Window?t.document.documentElement:typeof Document<"u"&&t instanceof Document?t.documentElement:t}function oo(t){const e=window.getComputedStyle(t);if(e.overflowX==="scroll"||e.overflowY==="scroll"||e.overflowX==="auto"&&t.clientWidth<t.scrollWidth||e.overflowY==="auto"&&t.clientHeight<t.scrollHeight)return!0;{const n=t.parentNode;return!n||n.tagName==="BODY"?!1:oo(n)}}function Vi(t){const e=t||window.event,n=e.target;return oo(n)?!1:e.touches.length>1?!0:(e.preventDefault&&e.preventDefault(),!1)}const De=new WeakMap;function Ni(t,e=!1){const n=i.shallowRef(e);let o=null,s="";i.watch(Si(t),c=>{const l=Re(i.toValue(c));if(l){const u=l;if(De.get(u)||De.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 r=()=>{const c=Re(i.toValue(t));!c||n.value||(no&&(o=xi(c,"touchmove",l=>{Vi(l)},{passive:!1})),c.style.overflow="hidden",n.value=!0)},a=()=>{const c=Re(i.toValue(t));!c||!n.value||(no&&o?.(),c.style.overflow=s,De.delete(c),n.value=!1)};return to(a),i.computed({get(){return n.value},set(c){c?r():a()}})}function Ci(){let t=!1;const e=i.shallowRef(!1);return(n,o)=>{if(e.value=o.value,t)return;t=!0;const s=Ni(n,o.value);i.watch(e,r=>s.value=r)}}Ci(),typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const $i={class:"aform"},Pi=i.defineComponent({__name:"AForm",props:{modelValue:{},data:{},readonly:{type:Boolean}},emits:["update:modelValue"],setup(t,{emit:e}){const n=e,o=i.ref(t.data||{}),s=a=>{let c={};for(const[l,u]of Object.entries(a))["component","fieldtype"].includes(l)||(c[l]=u),l==="rows"&&u&&u.length===0&&(c.rows=o.value[a.fieldname]);return c},r=i.computed({get:()=>t.modelValue.map((a,c)=>i.computed({get(){return a.value},set:l=>{t.modelValue[c].value=l,n("update:modelValue",t.modelValue)}})),set:()=>{}});return(a,c)=>(i.openBlock(),i.createElementBlock("form",$i,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(a.modelValue,(l,u)=>(i.openBlock(),i.createBlock(i.resolveDynamicComponent(l.component),i.mergeProps({key:u,schema:l,modelValue:r.value[u].value,"onUpdate:modelValue":h=>r.value[u].value=h,data:o.value[l.fieldname],readonly:a.readonly},{ref_for:!0},s(l)),null,16,["schema","modelValue","onUpdate:modelValue","data","readonly"]))),128))]))}}),Ri=wi(Pi,[["__scopeId","data-v-68845234"]]);function Di(){if(typeof globalThis<"u")return globalThis;if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global}function Ai(){const t=Di();if(t.__xstate__)return t.__xstate__}const Li=t=>{if(typeof window>"u")return;const e=Ai();e&&e.register(t)};class so{constructor(e){this._process=e,this._active=!1,this._current=null,this._last=null}start(){this._active=!0,this.flush()}clear(){this._current&&(this._current.next=null,this._last=this._current)}enqueue(e){const n={value:e,next:null};if(this._current){this._last.next=n,this._last=n;return}this._current=n,this._last=n,this._active&&this.flush()}flush(){for(;this._current;){const e=this._current;this._process(e.value),this._current=e.next}this._last=null}}const ro=".",ji="",io="",Mi="#",Bi="*",ao="xstate.init",Ae="xstate.stop";function Ui(t,e){return{type:`xstate.after.${t}.${e}`}}function Le(t,e){return{type:`xstate.done.state.${t}`,output:e}}function zi(t,e){return{type:`xstate.done.actor.${t}`,output:e,actorId:t}}function Hi(t,e){return{type:`xstate.error.actor.${t}`,error:e,actorId:t}}function co(t){return{type:ao,input:t}}function ot(t){setTimeout(()=>{throw t})}const Ki=typeof Symbol=="function"&&Symbol.observable||"@@observable";function lo(t,e){const n=uo(t),o=uo(e);return typeof o=="string"?typeof n=="string"?o===n:!1:typeof n=="string"?n in o:Object.keys(n).every(s=>s in o?lo(n[s],o[s]):!1)}function je(t){if(ho(t))return t;const e=[];let n="";for(let o=0;o<t.length;o++){switch(t.charCodeAt(o)){case 92:n+=t[o+1],o++;continue;case 46:e.push(n),n="";continue}n+=t[o]}return e.push(n),e}function uo(t){if(Sa(t))return t.value;if(typeof t!="string")return t;const e=je(t);return Fi(e)}function Fi(t){if(t.length===1)return t[0];const e={};let n=e;for(let o=0;o<t.length-1;o++)if(o===t.length-2)n[t[o]]=t[o+1];else{const s=n;n={},s[t[o]]=n}return e}function fo(t,e){const n={},o=Object.keys(t);for(let s=0;s<o.length;s++){const r=o[s];n[r]=e(t[r],r,t,s)}return n}function po(t){return ho(t)?t:[t]}function ct(t){return t===void 0?[]:po(t)}function Me(t,e,n,o){return typeof t=="function"?t({context:e,event:n,self:o}):t}function ho(t){return Array.isArray(t)}function Wi(t){return t.type.startsWith("xstate.error.actor")}function St(t){return po(t).map(e=>typeof e>"u"||typeof e=="string"?{target:e}:e)}function mo(t){if(!(t===void 0||t===ji))return ct(t)}function Be(t,e,n){const o=typeof t=="object",s=o?t:void 0;return{next:(o?t.next:t)?.bind(s),error:(o?t.error:e)?.bind(s),complete:(o?t.complete:n)?.bind(s)}}function go(t,e){return`${e}.${t}`}function Ue(t,e){const n=e.match(/^xstate\.invoke\.(\d+)\.(.*)/);if(!n)return t.implementations.actors[e];const[,o,s]=n,r=t.getStateNodeById(s).config.invoke;return(Array.isArray(r)?r[o]:r).src}function _o(t,e){return`${t.sessionId}.${e}`}let Gi=0;function Ji(t,e){const n=new Map,o=new Map,s=new WeakMap,r=new Set,a={},{clock:c,logger:l}=e,u={schedule:(d,p,m,y,g=Math.random().toString(36).slice(2))=>{const w={source:d,target:p,event:m,delay:y,id:g,startedAt:Date.now()},O=_o(d,g);f._snapshot._scheduledEvents[O]=w;const V=c.setTimeout(()=>{delete a[O],delete f._snapshot._scheduledEvents[O],f._relay(d,p,m)},y);a[O]=V},cancel:(d,p)=>{const m=_o(d,p),y=a[m];delete a[m],delete f._snapshot._scheduledEvents[m],y!==void 0&&c.clearTimeout(y)},cancelAll:d=>{for(const p in f._snapshot._scheduledEvents){const m=f._snapshot._scheduledEvents[p];m.source===d&&u.cancel(d,m.id)}}},h=d=>{if(!r.size)return;const p={...d,rootId:t.sessionId};r.forEach(m=>m.next?.(p))},f={_snapshot:{_scheduledEvents:(e?.snapshot&&e.snapshot.scheduler)??{}},_bookId:()=>`x:${Gi++}`,_register:(d,p)=>(n.set(d,p),d),_unregister:d=>{n.delete(d.sessionId);const p=s.get(d);p!==void 0&&(o.delete(p),s.delete(d))},get:d=>o.get(d),_set:(d,p)=>{const m=o.get(d);if(m&&m!==p)throw new Error(`Actor with system ID '${d}' already exists.`);o.set(d,p),s.set(p,d)},inspect:d=>{const p=Be(d);return r.add(p),{unsubscribe(){r.delete(p)}}},_sendInspectionEvent:h,_relay:(d,p,m)=>{f._sendInspectionEvent({type:"@xstate.event",sourceRef:d,actorRef:p,event:m}),p._send(m)},scheduler:u,getSnapshot:()=>({_scheduledEvents:{...f._snapshot._scheduledEvents}}),start:()=>{const d=f._snapshot._scheduledEvents;f._snapshot._scheduledEvents={};for(const p in d){const{source:m,target:y,event:g,delay:w,id:O}=d[p];u.schedule(m,y,g,w,O)}},_clock:c,_logger:l};return f}let ze=!1;const He=1;let G=function(t){return t[t.NotStarted=0]="NotStarted",t[t.Running=1]="Running",t[t.Stopped=2]="Stopped",t}({});const Yi={clock:{setTimeout:(t,e)=>setTimeout(t,e),clearTimeout:t=>clearTimeout(t)},logger:console.log.bind(console),devTools:!1};class qi{constructor(e,n){this.logic=e,this._snapshot=void 0,this.clock=void 0,this.options=void 0,this.id=void 0,this.mailbox=new so(this._process.bind(this)),this.observers=new Set,this.eventListeners=new Map,this.logger=void 0,this._processingStatus=G.NotStarted,this._parent=void 0,this._syncSnapshot=void 0,this.ref=void 0,this._actorScope=void 0,this._systemId=void 0,this.sessionId=void 0,this.system=void 0,this._doneEvent=void 0,this.src=void 0,this._deferred=[];const o={...Yi,...n},{clock:s,logger:r,parent:a,syncSnapshot:c,id:l,systemId:u,inspect:h}=o;this.system=a?a.system:Ji(this,{clock:s,logger:r}),h&&!a&&this.system.inspect(Be(h)),this.sessionId=this.system._bookId(),this.id=l??this.sessionId,this.logger=n?.logger??this.system._logger,this.clock=n?.clock??this.system._clock,this._parent=a,this._syncSnapshot=c,this.options=o,this.src=o.src??e,this.ref=this,this._actorScope={self:this,id:this.id,sessionId:this.sessionId,logger:this.logger,defer:f=>{this._deferred.push(f)},system:this.system,stopChild:f=>{if(f._parent!==this)throw new Error(`Cannot stop child actor ${f.id} of ${this.id} because it is not a child`);f._stop()},emit:f=>{const d=this.eventListeners.get(f.type),p=this.eventListeners.get("*");if(!d&&!p)return;const m=[...d?d.values():[],...p?p.values():[]];for(const y of m)y(f)},actionExecutor:f=>{const d=()=>{if(this._actorScope.system._sendInspectionEvent({type:"@xstate.action",actorRef:this,action:{type:f.type,params:f.params}}),!f.exec)return;const p=ze;try{ze=!0,f.exec(f.info,f.params)}finally{ze=p}};this._processingStatus===G.Running?d():this._deferred.push(d)}},this.send=this.send.bind(this),this.system._sendInspectionEvent({type:"@xstate.actor",actorRef:this}),u&&(this._systemId=u,this.system._set(u,this)),this._initState(n?.snapshot??n?.state),u&&this._snapshot.status!=="active"&&this.system._unregister(this)}_initState(e){try{this._snapshot=e?this.logic.restoreSnapshot?this.logic.restoreSnapshot(e,this._actorScope):e:this.logic.getInitialSnapshot(this._actorScope,this.options?.input)}catch(n){this._snapshot={status:"error",output:void 0,error:n}}}update(e,n){this._snapshot=e;let o;for(;o=this._deferred.shift();)try{o()}catch(s){this._deferred.length=0,this._snapshot={...e,status:"error",error:s}}switch(this._snapshot.status){case"active":for(const s of this.observers)try{s.next?.(e)}catch(r){ot(r)}break;case"done":for(const s of this.observers)try{s.next?.(e)}catch(r){ot(r)}this._stopProcedure(),this._complete(),this._doneEvent=zi(this.id,this._snapshot.output),this._parent&&this.system._relay(this,this._parent,this._doneEvent);break;case"error":this._error(this._snapshot.error);break}this.system._sendInspectionEvent({type:"@xstate.snapshot",actorRef:this,event:n,snapshot:e})}subscribe(e,n,o){const s=Be(e,n,o);if(this._processingStatus!==G.Stopped)this.observers.add(s);else switch(this._snapshot.status){case"done":try{s.complete?.()}catch(r){ot(r)}break;case"error":{const r=this._snapshot.error;if(!s.error)ot(r);else try{s.error(r)}catch(a){ot(a)}break}}return{unsubscribe:()=>{this.observers.delete(s)}}}on(e,n){let o=this.eventListeners.get(e);o||(o=new Set,this.eventListeners.set(e,o));const s=n.bind(void 0);return o.add(s),{unsubscribe:()=>{o.delete(s)}}}start(){if(this._processingStatus===G.Running)return this;this._syncSnapshot&&this.subscribe({next:n=>{n.status==="active"&&this.system._relay(this,this._parent,{type:`xstate.snapshot.${this.id}`,snapshot:n})},error:()=>{}}),this.system._register(this.sessionId,this),this._systemId&&this.system._set(this._systemId,this),this._processingStatus=G.Running;const e=co(this.options.input);switch(this.system._sendInspectionEvent({type:"@xstate.event",sourceRef:this._parent,actorRef:this,event:e}),this._snapshot.status){case"done":return this.update(this._snapshot,e),this;case"error":return this._error(this._snapshot.error),this}if(this._parent||this.system.start(),this.logic.start)try{this.logic.start(this._snapshot,this._actorScope)}catch(n){return this._snapshot={...this._snapshot,status:"error",error:n},this._error(n),this}return this.update(this._snapshot,e),this.options.devTools&&this.attachDevTools(),this.mailbox.start(),this}_process(e){let n,o;try{n=this.logic.transition(this._snapshot,e,this._actorScope)}catch(s){o={err:s}}if(o){const{err:s}=o;this._snapshot={...this._snapshot,status:"error",error:s},this._error(s);return}this.update(n,e),e.type===Ae&&(this._stopProcedure(),this._complete())}_stop(){return this._processingStatus===G.Stopped?this:(this.mailbox.clear(),this._processingStatus===G.NotStarted?(this._processingStatus=G.Stopped,this):(this.mailbox.enqueue({type:Ae}),this))}stop(){if(this._parent)throw new Error("A non-root actor cannot be stopped directly.");return this._stop()}_complete(){for(const e of this.observers)try{e.complete?.()}catch(n){ot(n)}this.observers.clear()}_reportError(e){if(!this.observers.size){this._parent||ot(e);return}let n=!1;for(const o of this.observers){const s=o.error;n||=!s;try{s?.(e)}catch(r){ot(r)}}this.observers.clear(),n&&ot(e)}_error(e){this._stopProcedure(),this._reportError(e),this._parent&&this.system._relay(this,this._parent,Hi(this.id,e))}_stopProcedure(){return this._processingStatus!==G.Running?this:(this.system.scheduler.cancelAll(this),this.mailbox.clear(),this.mailbox=new so(this._process.bind(this)),this._processingStatus=G.Stopped,this.system._unregister(this),this)}_send(e){this._processingStatus!==G.Stopped&&this.mailbox.enqueue(e)}send(e){this.system._relay(void 0,this,e)}attachDevTools(){const{devTools:e}=this.options;e&&(typeof e=="function"?e:Li)(this)}toJSON(){return{xstate$$type:He,id:this.id}}getPersistedSnapshot(e){return this.logic.getPersistedSnapshot(this._snapshot,e)}[Ki](){return this}getSnapshot(){return this._snapshot}}function Kt(t,...[e]){return new qi(t,e)}function Xi(t,e,n,o,{sendId:s}){const r=typeof s=="function"?s(n,o):s;return[e,{sendId:r},void 0]}function Zi(t,e){t.defer(()=>{t.system.scheduler.cancel(t.self,e.sendId)})}function Qi(t){function e(n,o){}return e.type="xstate.cancel",e.sendId=t,e.resolve=Xi,e.execute=Zi,e}function ta(t,e,n,o,{id:s,systemId:r,src:a,input:c,syncSnapshot:l}){const u=typeof a=="string"?Ue(e.machine,a):a,h=typeof s=="function"?s(n):s;let f,d;return u&&(d=typeof c=="function"?c({context:e.context,event:n.event,self:t.self}):c,f=Kt(u,{id:h,src:a,parent:t.self,syncSnapshot:l,systemId:r,input:d})),[mt(e,{children:{...e.children,[h]:f}}),{id:s,systemId:r,actorRef:f,src:a,input:d},void 0]}function ea(t,{actorRef:e}){e&&t.defer(()=>{e._processingStatus!==G.Stopped&&e.start()})}function na(...[t,{id:e,systemId:n,input:o,syncSnapshot:s=!1}={}]){function r(a,c){}return r.type="xstate.spawnChild",r.id=e,r.systemId=n,r.src=t,r.input=o,r.syncSnapshot=s,r.resolve=ta,r.execute=ea,r}function oa(t,e,n,o,{actorRef:s}){const r=typeof s=="function"?s(n,o):s,a=typeof r=="string"?e.children[r]:r;let c=e.children;return a&&(c={...c},delete c[a.id]),[mt(e,{children:c}),a,void 0]}function sa(t,e){if(e){if(t.system._unregister(e),e._processingStatus!==G.Running){t.stopChild(e);return}t.defer(()=>{t.stopChild(e)})}}function yo(t){function e(n,o){}return e.type="xstate.stopChild",e.actorRef=t,e.resolve=oa,e.execute=sa,e}function Ke(t,e,n,o){const{machine:s}=o,r=typeof t=="function",a=r?t:s.implementations.guards[typeof t=="string"?t:t.type];if(!r&&!a)throw new Error(`Guard '${typeof t=="string"?t:t.type}' is not implemented.'.`);if(typeof a!="function")return Ke(a,e,n,o);const c={context:e,event:n},l=r||typeof t=="string"?void 0:"params"in t?typeof t.params=="function"?t.params({context:e,event:n}):t.params:void 0;return"check"in a?a.check(o,c,a):a(c,l)}const Fe=t=>t.type==="atomic"||t.type==="final";function Ot(t){return Object.values(t.states).filter(e=>e.type!=="history")}function Ft(t,e){const n=[];if(e===t)return n;let o=t.parent;for(;o&&o!==e;)n.push(o),o=o.parent;return n}function ce(t){const e=new Set(t),n=Eo(e);for(const o of e)if(o.type==="compound"&&(!n.get(o)||!n.get(o).length))ko(o).forEach(s=>e.add(s));else if(o.type==="parallel"){for(const s of Ot(o))if(s.type!=="history"&&!e.has(s)){const r=ko(s);for(const a of r)e.add(a)}}for(const o of e){let s=o.parent;for(;s;)e.add(s),s=s.parent}return e}function wo(t,e){const n=e.get(t);if(!n)return{};if(t.type==="compound"){const s=n[0];if(s){if(Fe(s))return s.key}else return{}}const o={};for(const s of n)o[s.key]=wo(s,e);return o}function Eo(t){const e=new Map;for(const n of t)e.has(n)||e.set(n,[]),n.parent&&(e.has(n.parent)||e.set(n.parent,[]),e.get(n.parent).push(n));return e}function bo(t,e){const n=ce(e);return wo(t,Eo(n))}function We(t,e){return e.type==="compound"?Ot(e).some(n=>n.type==="final"&&t.has(n)):e.type==="parallel"?Ot(e).every(n=>We(t,n)):e.type==="final"}const le=t=>t[0]===Mi;function ra(t,e){return t.transitions.get(e)||[...t.transitions.keys()].filter(n=>{if(n===Bi)return!0;if(!n.endsWith(".*"))return!1;const o=n.split("."),s=e.split(".");for(let r=0;r<o.length;r++){const a=o[r],c=s[r];if(a==="*")return r===o.length-1;if(a!==c)return!1}return!0}).sort((n,o)=>o.length-n.length).flatMap(n=>t.transitions.get(n))}function ia(t){const e=t.config.after;if(!e)return[];const n=o=>{const s=Ui(o,t.id),r=s.type;return t.entry.push(Ra(s,{id:r,delay:o})),t.exit.push(Qi(r)),r};return Object.keys(e).flatMap(o=>{const s=e[o],r=typeof s=="string"?{target:s}:s,a=Number.isNaN(+o)?o:+o,c=n(a);return ct(r).map(l=>({...l,event:c,delay:a}))}).map(o=>{const{delay:s}=o;return{...pt(t,o.event,o),delay:s}})}function pt(t,e,n){const o=mo(n.target),s=n.reenter??!1,r=la(t,o),a={...n,actions:ct(n.actions),guard:n.guard,target:r,source:t,reenter:s,eventType:e,toJSON:()=>({...a,source:`#${t.id}`,target:r?r.map(c=>`#${c.id}`):void 0})};return a}function aa(t){const e=new Map;if(t.config.on)for(const n of Object.keys(t.config.on)){if(n===io)throw new Error('Null events ("") cannot be specified as a transition key. Use `always: { ... }` instead.');const o=t.config.on[n];e.set(n,St(o).map(s=>pt(t,n,s)))}if(t.config.onDone){const n=`xstate.done.state.${t.id}`;e.set(n,St(t.config.onDone).map(o=>pt(t,n,o)))}for(const n of t.invoke){if(n.onDone){const o=`xstate.done.actor.${n.id}`;e.set(o,St(n.onDone).map(s=>pt(t,o,s)))}if(n.onError){const o=`xstate.error.actor.${n.id}`;e.set(o,St(n.onError).map(s=>pt(t,o,s)))}if(n.onSnapshot){const o=`xstate.snapshot.${n.id}`;e.set(o,St(n.onSnapshot).map(s=>pt(t,o,s)))}}for(const n of t.after){let o=e.get(n.eventType);o||(o=[],e.set(n.eventType,o)),o.push(n)}return e}function ca(t,e){const n=typeof e=="string"?t.states[e]:e?t.states[e.target]:void 0;if(!n&&e)throw new Error(`Initial state node "${e}" not found on parent state node #${t.id}`);const o={source:t,actions:!e||typeof e=="string"?[]:ct(e.actions),eventType:null,reenter:!1,target:n?[n]:[],toJSON:()=>({...o,source:`#${t.id}`,target:n?[`#${n.id}`]:[]})};return o}function la(t,e){if(e!==void 0)return e.map(n=>{if(typeof n!="string")return n;if(le(n))return t.machine.getStateNodeById(n);const o=n[0]===ro;if(o&&!t.parent)return ue(t,n.slice(1));const s=o?t.key+n:n;if(t.parent)try{return ue(t.parent,s)}catch(r){throw new Error(`Invalid transition definition for state node '${t.id}':
|
|
2
|
+
${r.message}`)}else throw new Error(`Invalid target: "${n}" is not a valid target from the root node. Did you mean ".${n}"?`)})}function vo(t){const e=mo(t.config.target);return e?{target:e.map(n=>typeof n=="string"?ue(t.parent,n):n)}:t.parent.initial}function ht(t){return t.type==="history"}function ko(t){const e=So(t);for(const n of e)for(const o of Ft(n,t))e.add(o);return e}function So(t){const e=new Set;function n(o){if(!e.has(o)){if(e.add(o),o.type==="compound")n(o.initial.target[0]);else if(o.type==="parallel")for(const s of Ot(o))n(s)}}return n(t),e}function It(t,e){if(le(e))return t.machine.getStateNodeById(e);if(!t.states)throw new Error(`Unable to retrieve child state '${e}' from '${t.id}'; no child states exist.`);const n=t.states[e];if(!n)throw new Error(`Child state '${e}' does not exist on '${t.id}'`);return n}function ue(t,e){if(typeof e=="string"&&le(e))try{return t.machine.getStateNodeById(e)}catch{}const n=je(e).slice();let o=t;for(;n.length;){const s=n.shift();if(!s.length)break;o=It(o,s)}return o}function de(t,e){if(typeof e=="string"){const s=t.states[e];if(!s)throw new Error(`State '${e}' does not exist on '${t.id}'`);return[t,s]}const n=Object.keys(e),o=n.map(s=>It(t,s)).filter(Boolean);return[t.machine.root,t].concat(o,n.reduce((s,r)=>{const a=It(t,r);if(!a)return s;const c=de(a,e[r]);return s.concat(c)},[]))}function ua(t,e,n,o){const s=It(t,e).next(n,o);return!s||!s.length?t.next(n,o):s}function da(t,e,n,o){const s=Object.keys(e),r=It(t,s[0]),a=Ge(r,e[s[0]],n,o);return!a||!a.length?t.next(n,o):a}function fa(t,e,n,o){const s=[];for(const r of Object.keys(e)){const a=e[r];if(!a)continue;const c=It(t,r),l=Ge(c,a,n,o);l&&s.push(...l)}return s.length?s:t.next(n,o)}function Ge(t,e,n,o){return typeof e=="string"?ua(t,e,n,o):Object.keys(e).length===1?da(t,e,n,o):fa(t,e,n,o)}function pa(t){return Object.keys(t.states).map(e=>t.states[e]).filter(e=>e.type==="history")}function lt(t,e){let n=t;for(;n.parent&&n.parent!==e;)n=n.parent;return n.parent===e}function ha(t,e){const n=new Set(t),o=new Set(e);for(const s of n)if(o.has(s))return!0;for(const s of o)if(n.has(s))return!0;return!1}function Oo(t,e,n){const o=new Set;for(const s of t){let r=!1;const a=new Set;for(const c of o)if(ha(Ye([s],e,n),Ye([c],e,n)))if(lt(s.source,c.source))a.add(c);else{r=!0;break}if(!r){for(const c of a)o.delete(c);o.add(s)}}return Array.from(o)}function ma(t){const[e,...n]=t;for(const o of Ft(e,void 0))if(n.every(s=>lt(s,o)))return o}function Je(t,e){if(!t.target)return[];const n=new Set;for(const o of t.target)if(ht(o))if(e[o.id])for(const s of e[o.id])n.add(s);else for(const s of Je(vo(o),e))n.add(s);else n.add(o);return[...n]}function Io(t,e){const n=Je(t,e);if(!n)return;if(!t.reenter&&n.every(s=>s===t.source||lt(s,t.source)))return t.source;const o=ma(n.concat(t.source));if(o)return o;if(!t.reenter)return t.source.machine.root}function Ye(t,e,n){const o=new Set;for(const s of t)if(s.target?.length){const r=Io(s,n);s.reenter&&s.source===r&&o.add(r);for(const a of e)lt(a,r)&&o.add(a)}return[...o]}function ga(t,e){if(t.length!==e.size)return!1;for(const n of t)if(!e.has(n))return!1;return!0}function qe(t,e,n,o,s,r){if(!t.length)return e;const a=new Set(e._nodes);let c=e.historyValue;const l=Oo(t,a,c);let u=e;s||([u,c]=Ea(u,o,n,l,a,c,r,n.actionExecutor)),u=xt(u,o,n,l.flatMap(f=>f.actions),r,void 0),u=ya(u,o,n,l,a,r,c,s);const h=[...a];u.status==="done"&&(u=xt(u,o,n,h.sort((f,d)=>d.order-f.order).flatMap(f=>f.exit),r,void 0));try{return c===e.historyValue&&ga(e._nodes,a)?u:mt(u,{_nodes:h,historyValue:c})}catch(f){throw f}}function _a(t,e,n,o,s){if(o.output===void 0)return;const r=Le(s.id,s.output!==void 0&&s.parent?Me(s.output,t.context,e,n.self):void 0);return Me(o.output,t.context,r,n.self)}function ya(t,e,n,o,s,r,a,c){let l=t;const u=new Set,h=new Set;wa(o,a,h,u),c&&h.add(t.machine.root);const f=new Set;for(const d of[...u].sort((p,m)=>p.order-m.order)){s.add(d);const p=[];p.push(...d.entry);for(const m of d.invoke)p.push(na(m.src,{...m,syncSnapshot:!!m.onSnapshot}));if(h.has(d)){const m=d.initial.actions;p.push(...m)}if(l=xt(l,e,n,p,r,d.invoke.map(m=>m.id)),d.type==="final"){const m=d.parent;let y=m?.type==="parallel"?m:m?.parent,g=y||d;for(m?.type==="compound"&&r.push(Le(m.id,d.output!==void 0?Me(d.output,l.context,e,n.self):void 0));y?.type==="parallel"&&!f.has(y)&&We(s,y);)f.add(y),r.push(Le(y.id)),g=y,y=y.parent;if(y)continue;l=mt(l,{status:"done",output:_a(l,e,n,l.machine.root,g)})}}return l}function wa(t,e,n,o){for(const s of t){const r=Io(s,e);for(const c of s.target||[])!ht(c)&&(s.source!==c||s.source!==r||s.reenter)&&(o.add(c),n.add(c)),Tt(c,e,n,o);const a=Je(s,e);for(const c of a){const l=Ft(c,r);r?.type==="parallel"&&l.push(r),To(o,e,n,l,!s.source.parent&&s.reenter?void 0:r)}}}function Tt(t,e,n,o){if(ht(t))if(e[t.id]){const s=e[t.id];for(const r of s)o.add(r),Tt(r,e,n,o);for(const r of s)Xe(r,t.parent,o,e,n)}else{const s=vo(t);for(const r of s.target)o.add(r),s===t.parent?.initial&&n.add(t.parent),Tt(r,e,n,o);for(const r of s.target)Xe(r,t.parent,o,e,n)}else if(t.type==="compound"){const[s]=t.initial.target;ht(s)||(o.add(s),n.add(s)),Tt(s,e,n,o),Xe(s,t,o,e,n)}else if(t.type==="parallel")for(const s of Ot(t).filter(r=>!ht(r)))[...o].some(r=>lt(r,s))||(ht(s)||(o.add(s),n.add(s)),Tt(s,e,n,o))}function To(t,e,n,o,s){for(const r of o)if((!s||lt(r,s))&&t.add(r),r.type==="parallel")for(const a of Ot(r).filter(c=>!ht(c)))[...t].some(c=>lt(c,a))||(t.add(a),Tt(a,e,n,t))}function Xe(t,e,n,o,s){To(n,o,s,Ft(t,e))}function Ea(t,e,n,o,s,r,a,c){let l=t;const u=Ye(o,s,r);u.sort((f,d)=>d.order-f.order);let h;for(const f of u)for(const d of pa(f)){let p;d.history==="deep"?p=m=>Fe(m)&<(m,f):p=m=>m.parent===f,h??={...r},h[d.id]=Array.from(s).filter(p)}for(const f of u)l=xt(l,e,n,[...f.exit,...f.invoke.map(d=>yo(d.id))],a,void 0),s.delete(f);return[l,h||r]}function ba(t,e){return t.implementations.actions[e]}function xo(t,e,n,o,s,r){const{machine:a}=t;let c=t;for(const l of o){const u=typeof l=="function",h=u?l:ba(a,typeof l=="string"?l:l.type),f={context:c.context,event:e,self:n.self,system:n.system},d=u||typeof l=="string"?void 0:"params"in l?typeof l.params=="function"?l.params({context:c.context,event:e}):l.params:void 0;if(!h||!("resolve"in h)){n.actionExecutor({type:typeof l=="string"?l:typeof l=="object"?l.type:l.name||"(anonymous)",info:f,params:d,exec:h});continue}const p=h,[m,y,g]=p.resolve(n,c,f,d,h,s);c=m,"retryResolve"in p&&r?.push([p,y]),"execute"in p&&n.actionExecutor({type:p.type,info:f,params:y,exec:p.execute.bind(null,n,y)}),g&&(c=xo(c,e,n,g,s,r))}return c}function xt(t,e,n,o,s,r){const a=r?[]:void 0,c=xo(t,e,n,o,{internalQueue:s,deferredActorIds:r},a);return a?.forEach(([l,u])=>{l.retryResolve(n,c,u)}),c}function Ze(t,e,n,o){let s=t;const r=[];function a(u,h,f){n.system._sendInspectionEvent({type:"@xstate.microstep",actorRef:n.self,event:h,snapshot:u,_transitions:f}),r.push(u)}if(e.type===Ae)return s=mt(Vo(s,e,n),{status:"stopped"}),a(s,e,[]),{snapshot:s,microstates:r};let c=e;if(c.type!==ao){const u=c,h=Wi(u),f=No(u,s);if(h&&!f.length)return s=mt(t,{status:"error",error:u.error}),a(s,u,[]),{snapshot:s,microstates:r};s=qe(f,t,n,c,!1,o),a(s,u,f)}let l=!0;for(;s.status==="active";){let u=l?va(s,c):[];const h=u.length?s:void 0;if(!u.length){if(!o.length)break;c=o.shift(),u=No(c,s)}s=qe(u,s,n,c,!1,o),l=s!==h,a(s,c,u)}return s.status!=="active"&&Vo(s,c,n),{snapshot:s,microstates:r}}function Vo(t,e,n){return xt(t,e,n,Object.values(t.children).map(o=>yo(o)),[],void 0)}function No(t,e){return e.machine.getTransitionData(e,t)}function va(t,e){const n=new Set,o=t._nodes.filter(Fe);for(const s of o)t:for(const r of[s].concat(Ft(s,void 0)))if(r.always){for(const a of r.always)if(a.guard===void 0||Ke(a.guard,t.context,e,t)){n.add(a);break t}}return Oo(Array.from(n),new Set(t._nodes),t.historyValue)}function ka(t,e){const n=ce(de(t,e));return bo(t,[...n])}function Sa(t){return!!t&&typeof t=="object"&&"machine"in t&&"value"in t}const Oa=function(t){return lo(t,this.value)},Ia=function(t){return this.tags.has(t)},Ta=function(t){const e=this.machine.getTransitionData(this,t);return!!e?.length&&e.some(n=>n.target!==void 0||n.actions.length)},xa=function(){const{_nodes:t,tags:e,machine:n,getMeta:o,toJSON:s,can:r,hasTag:a,matches:c,...l}=this;return{...l,tags:Array.from(e)}},Va=function(){return this._nodes.reduce((t,e)=>(e.meta!==void 0&&(t[e.id]=e.meta),t),{})};function fe(t,e){return{status:t.status,output:t.output,error:t.error,machine:e,context:t.context,_nodes:t._nodes,value:bo(e.root,t._nodes),tags:new Set(t._nodes.flatMap(n=>n.tags)),children:t.children,historyValue:t.historyValue||{},matches:Oa,hasTag:Ia,can:Ta,getMeta:Va,toJSON:xa}}function mt(t,e={}){return fe({...t,...e},t.machine)}function Na(t){if(typeof t!="object"||t===null)return{};const e={};for(const n in t){const o=t[n];Array.isArray(o)&&(e[n]=o.map(s=>({id:s.id})))}return e}function Ca(t,e){const{_nodes:n,tags:o,machine:s,children:r,context:a,can:c,hasTag:l,matches:u,getMeta:h,toJSON:f,...d}=t,p={};for(const m in r){const y=r[m];p[m]={snapshot:y.getPersistedSnapshot(e),src:y.src,systemId:y._systemId,syncSnapshot:y._syncSnapshot}}return{...d,context:Co(a),children:p,historyValue:Na(d.historyValue)}}function Co(t){let e;for(const n in t){const o=t[n];if(o&&typeof o=="object")if("sessionId"in o&&"send"in o&&"ref"in o)e??=Array.isArray(t)?t.slice():{...t},e[n]={xstate$$type:He,id:o.id};else{const s=Co(o);s!==o&&(e??=Array.isArray(t)?t.slice():{...t},e[n]=s)}}return e??t}function $a(t,e,n,o,{event:s,id:r,delay:a},{internalQueue:c}){const l=e.machine.implementations.delays;if(typeof s=="string")throw new Error(`Only event objects may be used with raise; use raise({ type: "${s}" }) instead`);const u=typeof s=="function"?s(n,o):s;let h;if(typeof a=="string"){const f=l&&l[a];h=typeof f=="function"?f(n,o):f}else h=typeof a=="function"?a(n,o):a;return typeof h!="number"&&c.push(u),[e,{event:u,id:r,delay:h},void 0]}function Pa(t,e){const{event:n,delay:o,id:s}=e;if(typeof o=="number"){t.defer(()=>{const r=t.self;t.system.scheduler.schedule(r,r,n,o,s)});return}}function Ra(t,e){function n(o,s){}return n.type="xstate.raise",n.event=t,n.id=e?.id,n.delay=e?.delay,n.resolve=$a,n.execute=Pa,n}function Da(t,{machine:e,context:n},o,s){const r=(a,c)=>{if(typeof a=="string"){const l=Ue(e,a);if(!l)throw new Error(`Actor logic '${a}' not implemented in machine '${e.id}'`);const u=Kt(l,{id:c?.id,parent:t.self,syncSnapshot:c?.syncSnapshot,input:typeof c?.input=="function"?c.input({context:n,event:o,self:t.self}):c?.input,src:a,systemId:c?.systemId});return s[u.id]=u,u}else return Kt(a,{id:c?.id,parent:t.self,syncSnapshot:c?.syncSnapshot,input:c?.input,src:a,systemId:c?.systemId})};return(a,c)=>{const l=r(a,c);return s[l.id]=l,t.defer(()=>{l._processingStatus!==G.Stopped&&l.start()}),l}}function Aa(t,e,n,o,{assignment:s}){if(!e.context)throw new Error("Cannot assign to undefined `context`. Ensure that `context` is defined in the machine config.");const r={},a={context:e.context,event:n.event,spawn:Da(t,e,n.event,r),self:t.self,system:t.system};let c={};if(typeof s=="function")c=s(a,o);else for(const u of Object.keys(s)){const h=s[u];c[u]=typeof h=="function"?h(a,o):h}const l=Object.assign({},e.context,c);return[mt(e,{context:l,children:Object.keys(r).length?{...e.children,...r}:e.children}),void 0,void 0]}function La(t){function e(n,o){}return e.type="xstate.assign",e.assignment=t,e.resolve=Aa,e}const $o=new WeakMap;function Vt(t,e,n){let o=$o.get(t);return o?e in o||(o[e]=n()):(o={[e]:n()},$o.set(t,o)),o[e]}const ja={},Wt=t=>typeof t=="string"?{type:t}:typeof t=="function"?"resolve"in t?{type:t.type}:{type:t.name}:t;class pe{constructor(e,n){if(this.config=e,this.key=void 0,this.id=void 0,this.type=void 0,this.path=void 0,this.states=void 0,this.history=void 0,this.entry=void 0,this.exit=void 0,this.parent=void 0,this.machine=void 0,this.meta=void 0,this.output=void 0,this.order=-1,this.description=void 0,this.tags=[],this.transitions=void 0,this.always=void 0,this.parent=n._parent,this.key=n._key,this.machine=n._machine,this.path=this.parent?this.parent.path.concat(this.key):[],this.id=this.config.id||[this.machine.id,...this.path].join(ro),this.type=this.config.type||(this.config.states&&Object.keys(this.config.states).length?"compound":this.config.history?"history":"atomic"),this.description=this.config.description,this.order=this.machine.idMap.size,this.machine.idMap.set(this.id,this),this.states=this.config.states?fo(this.config.states,(o,s)=>new pe(o,{_parent:this,_key:s,_machine:this.machine})):ja,this.type==="compound"&&!this.config.initial)throw new Error(`No initial state specified for compound state node "#${this.id}". Try adding { initial: "${Object.keys(this.states)[0]}" } to the state config.`);this.history=this.config.history===!0?"shallow":this.config.history||!1,this.entry=ct(this.config.entry).slice(),this.exit=ct(this.config.exit).slice(),this.meta=this.config.meta,this.output=this.type==="final"||!this.parent?this.config.output:void 0,this.tags=ct(e.tags).slice()}_initialize(){this.transitions=aa(this),this.config.always&&(this.always=St(this.config.always).map(e=>pt(this,io,e))),Object.keys(this.states).forEach(e=>{this.states[e]._initialize()})}get definition(){return{id:this.id,key:this.key,version:this.machine.version,type:this.type,initial:this.initial?{target:this.initial.target,source:this,actions:this.initial.actions.map(Wt),eventType:null,reenter:!1,toJSON:()=>({target:this.initial.target.map(e=>`#${e.id}`),source:`#${this.id}`,actions:this.initial.actions.map(Wt),eventType:null})}:void 0,history:this.history,states:fo(this.states,e=>e.definition),on:this.on,transitions:[...this.transitions.values()].flat().map(e=>({...e,actions:e.actions.map(Wt)})),entry:this.entry.map(Wt),exit:this.exit.map(Wt),meta:this.meta,order:this.order||-1,output:this.output,invoke:this.invoke,description:this.description,tags:this.tags}}toJSON(){return this.definition}get invoke(){return Vt(this,"invoke",()=>ct(this.config.invoke).map((e,n)=>{const{src:o,systemId:s}=e,r=e.id??go(this.id,n),a=typeof o=="string"?o:`xstate.invoke.${go(this.id,n)}`;return{...e,src:a,id:r,systemId:s,toJSON(){const{onDone:c,onError:l,...u}=e;return{...u,type:"xstate.invoke",src:a,id:r}}}}))}get on(){return Vt(this,"on",()=>[...this.transitions].flatMap(([e,n])=>n.map(o=>[e,o])).reduce((e,[n,o])=>(e[n]=e[n]||[],e[n].push(o),e),{}))}get after(){return Vt(this,"delayedTransitions",()=>ia(this))}get initial(){return Vt(this,"initial",()=>ca(this,this.config.initial))}next(e,n){const o=n.type,s=[];let r;const a=Vt(this,`candidates-${o}`,()=>ra(this,o));for(const c of a){const{guard:l}=c,u=e.context;let h=!1;try{h=!l||Ke(l,u,n,e)}catch(f){const d=typeof l=="string"?l:typeof l=="object"?l.type:void 0;throw new Error(`Unable to evaluate guard ${d?`'${d}' `:""}in transition for event '${o}' in state node '${this.id}':
|
|
3
|
+
${f.message}`)}if(h){s.push(...c.actions),r=c;break}}return r?[r]:void 0}get events(){return Vt(this,"events",()=>{const{states:e}=this,n=new Set(this.ownEvents);if(e)for(const o of Object.keys(e)){const s=e[o];if(s.states)for(const r of s.events)n.add(`${r}`)}return Array.from(n)})}get ownEvents(){const e=new Set([...this.transitions.keys()].filter(n=>this.transitions.get(n).some(o=>!(!o.target&&!o.actions.length&&!o.reenter))));return Array.from(e)}}const Ma="#";let Ba=class ei{constructor(e,n){this.config=e,this.version=void 0,this.schemas=void 0,this.implementations=void 0,this.__xstatenode=!0,this.idMap=new Map,this.root=void 0,this.id=void 0,this.states=void 0,this.events=void 0,this.id=e.id||"(machine)",this.implementations={actors:n?.actors??{},actions:n?.actions??{},delays:n?.delays??{},guards:n?.guards??{}},this.version=this.config.version,this.schemas=this.config.schemas,this.transition=this.transition.bind(this),this.getInitialSnapshot=this.getInitialSnapshot.bind(this),this.getPersistedSnapshot=this.getPersistedSnapshot.bind(this),this.restoreSnapshot=this.restoreSnapshot.bind(this),this.start=this.start.bind(this),this.root=new pe(e,{_key:this.id,_machine:this}),this.root._initialize(),this.states=this.root.states,this.events=this.root.events}provide(e){const{actions:n,guards:o,actors:s,delays:r}=this.implementations;return new ei(this.config,{actions:{...n,...e.actions},guards:{...o,...e.guards},actors:{...s,...e.actors},delays:{...r,...e.delays}})}resolveState(e){const n=ka(this.root,e.value),o=ce(de(this.root,n));return fe({_nodes:[...o],context:e.context||{},children:{},status:We(o,this.root)?"done":e.status||"active",output:e.output,error:e.error,historyValue:e.historyValue},this)}transition(e,n,o){return Ze(e,n,o,[]).snapshot}microstep(e,n,o){return Ze(e,n,o,[]).microstates}getTransitionData(e,n){return Ge(this.root,e.value,e,n)||[]}getPreInitialState(e,n,o){const{context:s}=this.config,r=fe({context:typeof s!="function"&&s?s:{},_nodes:[this.root],children:{},status:"active"},this);return typeof s=="function"?xt(r,n,e,[La(({spawn:a,event:c,self:l})=>s({spawn:a,input:c.input,self:l}))],o,void 0):r}getInitialSnapshot(e,n){const o=co(n),s=[],r=this.getPreInitialState(e,o,s),a=qe([{target:[...So(this.root)],source:this.root,reenter:!0,actions:[],eventType:null,toJSON:null}],r,e,o,!0,s),{snapshot:c}=Ze(a,o,e,s);return c}start(e){Object.values(e.children).forEach(n=>{n.getSnapshot().status==="active"&&n.start()})}getStateNodeById(e){const n=je(e),o=n.slice(1),s=le(n[0])?n[0].slice(Ma.length):n[0],r=this.idMap.get(s);if(!r)throw new Error(`Child state node '#${s}' does not exist on machine '${this.id}'`);return ue(r,o)}get definition(){return this.root.definition}toJSON(){return this.definition}getPersistedSnapshot(e,n){return Ca(e,n)}restoreSnapshot(e,n){const o={},s=e.children;Object.keys(s).forEach(f=>{const d=s[f],p=d.snapshot,m=d.src,y=typeof m=="string"?Ue(this,m):m;if(!y)return;const g=Kt(y,{id:f,parent:n.self,syncSnapshot:d.syncSnapshot,snapshot:p,src:m,systemId:d.systemId});o[f]=g});function r(f,d){if(d instanceof pe)return d;try{return f.machine.getStateNodeById(d.id)}catch{}}function a(f,d){if(!d||typeof d!="object")return{};const p={};for(const m in d){const y=d[m];for(const g of y){const w=r(f,g);w&&(p[m]??=[],p[m].push(w))}}return p}const c=a(this.root,e.historyValue),l=fe({...e,children:o,_nodes:Array.from(ce(de(this.root,e.value))),historyValue:c},this),u=new Set;function h(f,d){if(!u.has(f)){u.add(f);for(const p in f){const m=f[p];if(m&&typeof m=="object"){if("xstate$$type"in m&&m.xstate$$type===He){f[p]=d[m.id];continue}h(m,d)}}}}return h(l.context,o),l}};function Ua(t,e){return new Ba(t,e)}function Qe(t){this.message=t||""}Qe.prototype=Object.create(Error.prototype,{constructor:{value:Qe},name:{value:"NotImplemented"},stack:{get:function(){return new Error().stack}}});let za=class $e{static _root;name="Stonecrop";registry;store;constructor(e,n){if($e._root)return $e._root;$e._root=this,this.registry=e,this.store=n}setup(e){this.getMeta(e.doctype)}async getMeta(e){if(!this.registry.getMeta)throw new Qe(`getMeta function is not implemented for ${e} in the registry`);return await this.registry.getMeta(e)}async getRecords(e,n){this.store.$patch({records:[]});const o=await(await fetch(`/${e.slug}`,n)).json();this.store.$patch({records:o})}async getRecord(e,n){this.store.$patch({record:{}});const o=await(await fetch(`/${e.slug}/${n}`)).json();this.store.$patch({record:o})}runAction(e,n,o){const s=this.registry.registry[e.slug],r=s.actions?.get(n),a=s.workflow;if(a){const c=Ua(a),l=Kt(c);l.start(),l.send({type:n,id:o}),r&&r.length>0&&r.forEach(u=>{new Function(u)(o)})}}};var Ha=Object.create,Po=Object.defineProperty,Ka=Object.getOwnPropertyDescriptor,tn=Object.getOwnPropertyNames,Fa=Object.getPrototypeOf,Wa=Object.prototype.hasOwnProperty,Ga=(t,e)=>function(){return t&&(e=(0,t[tn(t)[0]])(t=0)),e},Ja=(t,e)=>function(){return e||(0,t[tn(t)[0]])((e={exports:{}}).exports,e),e.exports},Ya=(t,e,n,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of tn(e))!Wa.call(t,s)&&s!==n&&Po(t,s,{get:()=>e[s],enumerable:!(o=Ka(e,s))||o.enumerable});return t},qa=(t,e,n)=>(n=t!=null?Ha(Fa(t)):{},Ya(Po(n,"default",{value:t,enumerable:!0}),t)),Gt=Ga({"../../node_modules/.pnpm/tsup@8.4.0_@microsoft+api-extractor@7.51.1_@types+node@22.13.14__jiti@2.4.2_postcss@8.5_96eb05a9d65343021e53791dd83f3773/node_modules/tsup/assets/esm_shims.js"(){}}),Xa=Ja({"../../node_modules/.pnpm/rfdc@1.4.1/node_modules/rfdc/index.js"(t,e){Gt(),e.exports=o;function n(r){return r instanceof Buffer?Buffer.from(r):new r.constructor(r.buffer.slice(),r.byteOffset,r.length)}function o(r){if(r=r||{},r.circles)return s(r);const a=new Map;if(a.set(Date,f=>new Date(f)),a.set(Map,(f,d)=>new Map(l(Array.from(f),d))),a.set(Set,(f,d)=>new Set(l(Array.from(f),d))),r.constructorHandlers)for(const f of r.constructorHandlers)a.set(f[0],f[1]);let c=null;return r.proto?h:u;function l(f,d){const p=Object.keys(f),m=new Array(p.length);for(let y=0;y<p.length;y++){const g=p[y],w=f[g];typeof w!="object"||w===null?m[g]=w:w.constructor!==Object&&(c=a.get(w.constructor))?m[g]=c(w,d):ArrayBuffer.isView(w)?m[g]=n(w):m[g]=d(w)}return m}function u(f){if(typeof f!="object"||f===null)return f;if(Array.isArray(f))return l(f,u);if(f.constructor!==Object&&(c=a.get(f.constructor)))return c(f,u);const d={};for(const p in f){if(Object.hasOwnProperty.call(f,p)===!1)continue;const m=f[p];typeof m!="object"||m===null?d[p]=m:m.constructor!==Object&&(c=a.get(m.constructor))?d[p]=c(m,u):ArrayBuffer.isView(m)?d[p]=n(m):d[p]=u(m)}return d}function h(f){if(typeof f!="object"||f===null)return f;if(Array.isArray(f))return l(f,h);if(f.constructor!==Object&&(c=a.get(f.constructor)))return c(f,h);const d={};for(const p in f){const m=f[p];typeof m!="object"||m===null?d[p]=m:m.constructor!==Object&&(c=a.get(m.constructor))?d[p]=c(m,h):ArrayBuffer.isView(m)?d[p]=n(m):d[p]=h(m)}return d}}function s(r){const a=[],c=[],l=new Map;if(l.set(Date,p=>new Date(p)),l.set(Map,(p,m)=>new Map(h(Array.from(p),m))),l.set(Set,(p,m)=>new Set(h(Array.from(p),m))),r.constructorHandlers)for(const p of r.constructorHandlers)l.set(p[0],p[1]);let u=null;return r.proto?d:f;function h(p,m){const y=Object.keys(p),g=new Array(y.length);for(let w=0;w<y.length;w++){const O=y[w],V=p[O];if(typeof V!="object"||V===null)g[O]=V;else if(V.constructor!==Object&&(u=l.get(V.constructor)))g[O]=u(V,m);else if(ArrayBuffer.isView(V))g[O]=n(V);else{const R=a.indexOf(V);R!==-1?g[O]=c[R]:g[O]=m(V)}}return g}function f(p){if(typeof p!="object"||p===null)return p;if(Array.isArray(p))return h(p,f);if(p.constructor!==Object&&(u=l.get(p.constructor)))return u(p,f);const m={};a.push(p),c.push(m);for(const y in p){if(Object.hasOwnProperty.call(p,y)===!1)continue;const g=p[y];if(typeof g!="object"||g===null)m[y]=g;else if(g.constructor!==Object&&(u=l.get(g.constructor)))m[y]=u(g,f);else if(ArrayBuffer.isView(g))m[y]=n(g);else{const w=a.indexOf(g);w!==-1?m[y]=c[w]:m[y]=f(g)}}return a.pop(),c.pop(),m}function d(p){if(typeof p!="object"||p===null)return p;if(Array.isArray(p))return h(p,d);if(p.constructor!==Object&&(u=l.get(p.constructor)))return u(p,d);const m={};a.push(p),c.push(m);for(const y in p){const g=p[y];if(typeof g!="object"||g===null)m[y]=g;else if(g.constructor!==Object&&(u=l.get(g.constructor)))m[y]=u(g,d);else if(ArrayBuffer.isView(g))m[y]=n(g);else{const w=a.indexOf(g);w!==-1?m[y]=c[w]:m[y]=d(g)}}return a.pop(),c.pop(),m}}}});Gt(),Gt(),Gt();var Ro=typeof navigator<"u",T=typeof window<"u"?window:typeof globalThis<"u"?globalThis:typeof global<"u"?global:{};typeof T.chrome<"u"&&T.chrome.devtools,Ro&&(T.self,T.top);var Do;typeof navigator<"u"&&((Do=navigator.userAgent)==null||Do.toLowerCase().includes("electron")),Gt();var Za=qa(Xa()),Qa=/(?:^|[-_/])(\w)/g;function tc(t,e){return e?e.toUpperCase():""}function ec(t){return t&&`${t}`.replace(Qa,tc)}function nc(t,e){let n=t.replace(/^[a-z]:/i,"").replace(/\\/g,"/");n.endsWith(`index${e}`)&&(n=n.replace(`/index${e}`,e));const o=n.lastIndexOf("/"),s=n.substring(o+1);{const r=s.lastIndexOf(e);return s.substring(0,r)}}var Ao=(0,Za.default)({circles:!0});const oc={trailing:!0};function Nt(t,e=25,n={}){if(n={...oc,...n},!Number.isFinite(e))throw new TypeError("Expected `wait` to be a finite number");let o,s,r=[],a,c;const l=(u,h)=>(a=sc(t,u,h),a.finally(()=>{if(a=null,n.trailing&&c&&!s){const f=l(u,c);return c=null,f}}),a);return function(...u){return a?(n.trailing&&(c=u),a):new Promise(h=>{const f=!s&&n.leading;clearTimeout(s),s=setTimeout(()=>{s=null;const d=n.leading?o:l(this,u);for(const p of r)p(d);r=[]},e),f?(o=l(this,u),h(o)):r.push(h)})}}async function sc(t,e,n){return await t.apply(e,n)}function en(t,e={},n){for(const o in t){const s=t[o],r=n?`${n}:${o}`:o;typeof s=="object"&&s!==null?en(s,e,r):typeof s=="function"&&(e[r]=s)}return e}const rc={run:t=>t()},ic=()=>rc,Lo=typeof console.createTask<"u"?console.createTask:ic;function ac(t,e){const n=e.shift(),o=Lo(n);return t.reduce((s,r)=>s.then(()=>o.run(()=>r(...e))),Promise.resolve())}function cc(t,e){const n=e.shift(),o=Lo(n);return Promise.all(t.map(s=>o.run(()=>s(...e))))}function nn(t,e){for(const n of[...t])n(e)}class lc{constructor(){this._hooks={},this._before=void 0,this._after=void 0,this._deprecatedMessages=void 0,this._deprecatedHooks={},this.hook=this.hook.bind(this),this.callHook=this.callHook.bind(this),this.callHookWith=this.callHookWith.bind(this)}hook(e,n,o={}){if(!e||typeof n!="function")return()=>{};const s=e;let r;for(;this._deprecatedHooks[e];)r=this._deprecatedHooks[e],e=r.to;if(r&&!o.allowDeprecated){let a=r.message;a||(a=`${s} hook has been deprecated`+(r.to?`, please use ${r.to}`:"")),this._deprecatedMessages||(this._deprecatedMessages=new Set),this._deprecatedMessages.has(a)||(console.warn(a),this._deprecatedMessages.add(a))}if(!n.name)try{Object.defineProperty(n,"name",{get:()=>"_"+e.replace(/\W+/g,"_")+"_hook_cb",configurable:!0})}catch{}return this._hooks[e]=this._hooks[e]||[],this._hooks[e].push(n),()=>{n&&(this.removeHook(e,n),n=void 0)}}hookOnce(e,n){let o,s=(...r)=>(typeof o=="function"&&o(),o=void 0,s=void 0,n(...r));return o=this.hook(e,s),o}removeHook(e,n){if(this._hooks[e]){const o=this._hooks[e].indexOf(n);o!==-1&&this._hooks[e].splice(o,1),this._hooks[e].length===0&&delete this._hooks[e]}}deprecateHook(e,n){this._deprecatedHooks[e]=typeof n=="string"?{to:n}:n;const o=this._hooks[e]||[];delete this._hooks[e];for(const s of o)this.hook(e,s)}deprecateHooks(e){Object.assign(this._deprecatedHooks,e);for(const n in e)this.deprecateHook(n,e[n])}addHooks(e){const n=en(e),o=Object.keys(n).map(s=>this.hook(s,n[s]));return()=>{for(const s of o.splice(0,o.length))s()}}removeHooks(e){const n=en(e);for(const o in n)this.removeHook(o,n[o])}removeAllHooks(){for(const e in this._hooks)delete this._hooks[e]}callHook(e,...n){return n.unshift(e),this.callHookWith(ac,e,...n)}callHookParallel(e,...n){return n.unshift(e),this.callHookWith(cc,e,...n)}callHookWith(e,n,...o){const s=this._before||this._after?{name:n,args:o,context:{}}:void 0;this._before&&nn(this._before,s);const r=e(n in this._hooks?[...this._hooks[n]]:[],o);return r instanceof Promise?r.finally(()=>{this._after&&s&&nn(this._after,s)}):(this._after&&s&&nn(this._after,s),r)}beforeEach(e){return this._before=this._before||[],this._before.push(e),()=>{if(this._before!==void 0){const n=this._before.indexOf(e);n!==-1&&this._before.splice(n,1)}}}afterEach(e){return this._after=this._after||[],this._after.push(e),()=>{if(this._after!==void 0){const n=this._after.indexOf(e);n!==-1&&this._after.splice(n,1)}}}}function jo(){return new lc}var uc=Object.create,Mo=Object.defineProperty,dc=Object.getOwnPropertyDescriptor,on=Object.getOwnPropertyNames,fc=Object.getPrototypeOf,pc=Object.prototype.hasOwnProperty,hc=(t,e)=>function(){return t&&(e=(0,t[on(t)[0]])(t=0)),e},Bo=(t,e)=>function(){return e||(0,t[on(t)[0]])((e={exports:{}}).exports,e),e.exports},mc=(t,e,n,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of on(e))!pc.call(t,s)&&s!==n&&Mo(t,s,{get:()=>e[s],enumerable:!(o=dc(e,s))||o.enumerable});return t},gc=(t,e,n)=>(n=t!=null?uc(fc(t)):{},mc(Mo(n,"default",{value:t,enumerable:!0}),t)),v=hc({"../../node_modules/.pnpm/tsup@8.4.0_@microsoft+api-extractor@7.51.1_@types+node@22.13.14__jiti@2.4.2_postcss@8.5_96eb05a9d65343021e53791dd83f3773/node_modules/tsup/assets/esm_shims.js"(){}}),_c=Bo({"../../node_modules/.pnpm/speakingurl@14.0.1/node_modules/speakingurl/lib/speakingurl.js"(t,e){v(),function(n){var o={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"Ae",Å:"A",Æ:"AE",Ç:"C",È:"E",É:"E",Ê:"E",Ë:"E",Ì:"I",Í:"I",Î:"I",Ï:"I",Ð:"D",Ñ:"N",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"Oe",Ő:"O",Ø:"O",Ù:"U",Ú:"U",Û:"U",Ü:"Ue",Ű:"U",Ý:"Y",Þ:"TH",ß:"ss",à:"a",á:"a",â:"a",ã:"a",ä:"ae",å:"a",æ:"ae",ç:"c",è:"e",é:"e",ê:"e",ë:"e",ì:"i",í:"i",î:"i",ï:"i",ð:"d",ñ:"n",ò:"o",ó:"o",ô:"o",õ:"o",ö:"oe",ő:"o",ø:"o",ù:"u",ú:"u",û:"u",ü:"ue",ű:"u",ý:"y",þ:"th",ÿ:"y","ẞ":"SS",ا:"a",أ:"a",إ:"i",آ:"aa",ؤ:"u",ئ:"e",ء:"a",ب:"b",ت:"t",ث:"th",ج:"j",ح:"h",خ:"kh",د:"d",ذ:"th",ر:"r",ز:"z",س:"s",ش:"sh",ص:"s",ض:"dh",ط:"t",ظ:"z",ع:"a",غ:"gh",ف:"f",ق:"q",ك:"k",ل:"l",م:"m",ن:"n",ه:"h",و:"w",ي:"y",ى:"a",ة:"h",ﻻ:"la",ﻷ:"laa",ﻹ:"lai",ﻵ:"laa",گ:"g",چ:"ch",پ:"p",ژ:"zh",ک:"k",ی:"y","َ":"a","ً":"an","ِ":"e","ٍ":"en","ُ":"u","ٌ":"on","ْ":"","٠":"0","١":"1","٢":"2","٣":"3","٤":"4","٥":"5","٦":"6","٧":"7","٨":"8","٩":"9","۰":"0","۱":"1","۲":"2","۳":"3","۴":"4","۵":"5","۶":"6","۷":"7","۸":"8","۹":"9",က:"k",ခ:"kh",ဂ:"g",ဃ:"ga",င:"ng",စ:"s",ဆ:"sa",ဇ:"z","စျ":"za",ည:"ny",ဋ:"t",ဌ:"ta",ဍ:"d",ဎ:"da",ဏ:"na",တ:"t",ထ:"ta",ဒ:"d",ဓ:"da",န:"n",ပ:"p",ဖ:"pa",ဗ:"b",ဘ:"ba",မ:"m",ယ:"y",ရ:"ya",လ:"l",ဝ:"w",သ:"th",ဟ:"h",ဠ:"la",အ:"a","ြ":"y","ျ":"ya","ွ":"w","ြွ":"yw","ျွ":"ywa","ှ":"h",ဧ:"e","၏":"-e",ဣ:"i",ဤ:"-i",ဉ:"u",ဦ:"-u",ဩ:"aw","သြော":"aw",ဪ:"aw","၀":"0","၁":"1","၂":"2","၃":"3","၄":"4","၅":"5","၆":"6","၇":"7","၈":"8","၉":"9","္":"","့":"","း":"",č:"c",ď:"d",ě:"e",ň:"n",ř:"r",š:"s",ť:"t",ů:"u",ž:"z",Č:"C",Ď:"D",Ě:"E",Ň:"N",Ř:"R",Š:"S",Ť:"T",Ů:"U",Ž:"Z",ހ:"h",ށ:"sh",ނ:"n",ރ:"r",ބ:"b",ޅ:"lh",ކ:"k",އ:"a",ވ:"v",މ:"m",ފ:"f",ދ:"dh",ތ:"th",ލ:"l",ގ:"g",ޏ:"gn",ސ:"s",ޑ:"d",ޒ:"z",ޓ:"t",ޔ:"y",ޕ:"p",ޖ:"j",ޗ:"ch",ޘ:"tt",ޙ:"hh",ޚ:"kh",ޛ:"th",ޜ:"z",ޝ:"sh",ޞ:"s",ޟ:"d",ޠ:"t",ޡ:"z",ޢ:"a",ޣ:"gh",ޤ:"q",ޥ:"w","ަ":"a","ާ":"aa","ި":"i","ީ":"ee","ު":"u","ޫ":"oo","ެ":"e","ޭ":"ey","ޮ":"o","ޯ":"oa","ް":"",ა:"a",ბ:"b",გ:"g",დ:"d",ე:"e",ვ:"v",ზ:"z",თ:"t",ი:"i",კ:"k",ლ:"l",მ:"m",ნ:"n",ო:"o",პ:"p",ჟ:"zh",რ:"r",ს:"s",ტ:"t",უ:"u",ფ:"p",ქ:"k",ღ:"gh",ყ:"q",შ:"sh",ჩ:"ch",ც:"ts",ძ:"dz",წ:"ts",ჭ:"ch",ხ:"kh",ჯ:"j",ჰ:"h",α:"a",β:"v",γ:"g",δ:"d",ε:"e",ζ:"z",η:"i",θ:"th",ι:"i",κ:"k",λ:"l",μ:"m",ν:"n",ξ:"ks",ο:"o",π:"p",ρ:"r",σ:"s",τ:"t",υ:"y",φ:"f",χ:"x",ψ:"ps",ω:"o",ά:"a",έ:"e",ί:"i",ό:"o",ύ:"y",ή:"i",ώ:"o",ς:"s",ϊ:"i",ΰ:"y",ϋ:"y",ΐ:"i",Α:"A",Β:"B",Γ:"G",Δ:"D",Ε:"E",Ζ:"Z",Η:"I",Θ:"TH",Ι:"I",Κ:"K",Λ:"L",Μ:"M",Ν:"N",Ξ:"KS",Ο:"O",Π:"P",Ρ:"R",Σ:"S",Τ:"T",Υ:"Y",Φ:"F",Χ:"X",Ψ:"PS",Ω:"O",Ά:"A",Έ:"E",Ί:"I",Ό:"O",Ύ:"Y",Ή:"I",Ώ:"O",Ϊ:"I",Ϋ:"Y",ā:"a",ē:"e",ģ:"g",ī:"i",ķ:"k",ļ:"l",ņ:"n",ū:"u",Ā:"A",Ē:"E",Ģ:"G",Ī:"I",Ķ:"k",Ļ:"L",Ņ:"N",Ū:"U",Ќ:"Kj",ќ:"kj",Љ:"Lj",љ:"lj",Њ:"Nj",њ:"nj",Тс:"Ts",тс:"ts",ą:"a",ć:"c",ę:"e",ł:"l",ń:"n",ś:"s",ź:"z",ż:"z",Ą:"A",Ć:"C",Ę:"E",Ł:"L",Ń:"N",Ś:"S",Ź:"Z",Ż:"Z",Є:"Ye",І:"I",Ї:"Yi",Ґ:"G",є:"ye",і:"i",ї:"yi",ґ:"g",ă:"a",Ă:"A",ș:"s",Ș:"S",ț:"t",Ț:"T",ţ:"t",Ţ:"T",а:"a",б:"b",в:"v",г:"g",д:"d",е:"e",ё:"yo",ж:"zh",з:"z",и:"i",й:"i",к:"k",л:"l",м:"m",н:"n",о:"o",п:"p",р:"r",с:"s",т:"t",у:"u",ф:"f",х:"kh",ц:"c",ч:"ch",ш:"sh",щ:"sh",ъ:"",ы:"y",ь:"",э:"e",ю:"yu",я:"ya",А:"A",Б:"B",В:"V",Г:"G",Д:"D",Е:"E",Ё:"Yo",Ж:"Zh",З:"Z",И:"I",Й:"I",К:"K",Л:"L",М:"M",Н:"N",О:"O",П:"P",Р:"R",С:"S",Т:"T",У:"U",Ф:"F",Х:"Kh",Ц:"C",Ч:"Ch",Ш:"Sh",Щ:"Sh",Ъ:"",Ы:"Y",Ь:"",Э:"E",Ю:"Yu",Я:"Ya",ђ:"dj",ј:"j",ћ:"c",џ:"dz",Ђ:"Dj",Ј:"j",Ћ:"C",Џ:"Dz",ľ:"l",ĺ:"l",ŕ:"r",Ľ:"L",Ĺ:"L",Ŕ:"R",ş:"s",Ş:"S",ı:"i",İ:"I",ğ:"g",Ğ:"G",ả:"a",Ả:"A",ẳ:"a",Ẳ:"A",ẩ:"a",Ẩ:"A",đ:"d",Đ:"D",ẹ:"e",Ẹ:"E",ẽ:"e",Ẽ:"E",ẻ:"e",Ẻ:"E",ế:"e",Ế:"E",ề:"e",Ề:"E",ệ:"e",Ệ:"E",ễ:"e",Ễ:"E",ể:"e",Ể:"E",ỏ:"o",ọ:"o",Ọ:"o",ố:"o",Ố:"O",ồ:"o",Ồ:"O",ổ:"o",Ổ:"O",ộ:"o",Ộ:"O",ỗ:"o",Ỗ:"O",ơ:"o",Ơ:"O",ớ:"o",Ớ:"O",ờ:"o",Ờ:"O",ợ:"o",Ợ:"O",ỡ:"o",Ỡ:"O",Ở:"o",ở:"o",ị:"i",Ị:"I",ĩ:"i",Ĩ:"I",ỉ:"i",Ỉ:"i",ủ:"u",Ủ:"U",ụ:"u",Ụ:"U",ũ:"u",Ũ:"U",ư:"u",Ư:"U",ứ:"u",Ứ:"U",ừ:"u",Ừ:"U",ự:"u",Ự:"U",ữ:"u",Ữ:"U",ử:"u",Ử:"ư",ỷ:"y",Ỷ:"y",ỳ:"y",Ỳ:"Y",ỵ:"y",Ỵ:"Y",ỹ:"y",Ỹ:"Y",ạ:"a",Ạ:"A",ấ:"a",Ấ:"A",ầ:"a",Ầ:"A",ậ:"a",Ậ:"A",ẫ:"a",Ẫ:"A",ắ:"a",Ắ:"A",ằ:"a",Ằ:"A",ặ:"a",Ặ:"A",ẵ:"a",Ẵ:"A","⓪":"0","①":"1","②":"2","③":"3","④":"4","⑤":"5","⑥":"6","⑦":"7","⑧":"8","⑨":"9","⑩":"10","⑪":"11","⑫":"12","⑬":"13","⑭":"14","⑮":"15","⑯":"16","⑰":"17","⑱":"18","⑲":"18","⑳":"18","⓵":"1","⓶":"2","⓷":"3","⓸":"4","⓹":"5","⓺":"6","⓻":"7","⓼":"8","⓽":"9","⓾":"10","⓿":"0","⓫":"11","⓬":"12","⓭":"13","⓮":"14","⓯":"15","⓰":"16","⓱":"17","⓲":"18","⓳":"19","⓴":"20","Ⓐ":"A","Ⓑ":"B","Ⓒ":"C","Ⓓ":"D","Ⓔ":"E","Ⓕ":"F","Ⓖ":"G","Ⓗ":"H","Ⓘ":"I","Ⓙ":"J","Ⓚ":"K","Ⓛ":"L","Ⓜ":"M","Ⓝ":"N","Ⓞ":"O","Ⓟ":"P","Ⓠ":"Q","Ⓡ":"R","Ⓢ":"S","Ⓣ":"T","Ⓤ":"U","Ⓥ":"V","Ⓦ":"W","Ⓧ":"X","Ⓨ":"Y","Ⓩ":"Z","ⓐ":"a","ⓑ":"b","ⓒ":"c","ⓓ":"d","ⓔ":"e","ⓕ":"f","ⓖ":"g","ⓗ":"h","ⓘ":"i","ⓙ":"j","ⓚ":"k","ⓛ":"l","ⓜ":"m","ⓝ":"n","ⓞ":"o","ⓟ":"p","ⓠ":"q","ⓡ":"r","ⓢ":"s","ⓣ":"t","ⓤ":"u","ⓦ":"v","ⓥ":"w","ⓧ":"x","ⓨ":"y","ⓩ":"z","“":'"',"”":'"',"‘":"'","’":"'","∂":"d",ƒ:"f","™":"(TM)","©":"(C)",œ:"oe",Œ:"OE","®":"(R)","†":"+","℠":"(SM)","…":"...","˚":"o",º:"o",ª:"a","•":"*","၊":",","။":".",$:"USD","€":"EUR","₢":"BRN","₣":"FRF","£":"GBP","₤":"ITL","₦":"NGN","₧":"ESP","₩":"KRW","₪":"ILS","₫":"VND","₭":"LAK","₮":"MNT","₯":"GRD","₱":"ARS","₲":"PYG","₳":"ARA","₴":"UAH","₵":"GHS","¢":"cent","¥":"CNY",元:"CNY",円:"YEN","﷼":"IRR","₠":"EWE","฿":"THB","₨":"INR","₹":"INR","₰":"PF","₺":"TRY","؋":"AFN","₼":"AZN",лв:"BGN","៛":"KHR","₡":"CRC","₸":"KZT",ден:"MKD",zł:"PLN","₽":"RUB","₾":"GEL"},s=["်","ް"],r={"ာ":"a","ါ":"a","ေ":"e","ဲ":"e","ိ":"i","ီ":"i","ို":"o","ု":"u","ူ":"u","ေါင်":"aung","ော":"aw","ော်":"aw","ေါ":"aw","ေါ်":"aw","်":"်","က်":"et","ိုက်":"aik","ောက်":"auk","င်":"in","ိုင်":"aing","ောင်":"aung","စ်":"it","ည်":"i","တ်":"at","ိတ်":"eik","ုတ်":"ok","ွတ်":"ut","ေတ်":"it","ဒ်":"d","ိုဒ်":"ok","ုဒ်":"ait","န်":"an","ာန်":"an","ိန်":"ein","ုန်":"on","ွန်":"un","ပ်":"at","ိပ်":"eik","ုပ်":"ok","ွပ်":"ut","န်ုပ်":"nub","မ်":"an","ိမ်":"ein","ုမ်":"on","ွမ်":"un","ယ်":"e","ိုလ်":"ol","ဉ်":"in","ံ":"an","ိံ":"ein","ုံ":"on","ައް":"ah","ަށް":"ah"},a={en:{},az:{ç:"c",ə:"e",ğ:"g",ı:"i",ö:"o",ş:"s",ü:"u",Ç:"C",Ə:"E",Ğ:"G",İ:"I",Ö:"O",Ş:"S",Ü:"U"},cs:{č:"c",ď:"d",ě:"e",ň:"n",ř:"r",š:"s",ť:"t",ů:"u",ž:"z",Č:"C",Ď:"D",Ě:"E",Ň:"N",Ř:"R",Š:"S",Ť:"T",Ů:"U",Ž:"Z"},fi:{ä:"a",Ä:"A",ö:"o",Ö:"O"},hu:{ä:"a",Ä:"A",ö:"o",Ö:"O",ü:"u",Ü:"U",ű:"u",Ű:"U"},lt:{ą:"a",č:"c",ę:"e",ė:"e",į:"i",š:"s",ų:"u",ū:"u",ž:"z",Ą:"A",Č:"C",Ę:"E",Ė:"E",Į:"I",Š:"S",Ų:"U",Ū:"U"},lv:{ā:"a",č:"c",ē:"e",ģ:"g",ī:"i",ķ:"k",ļ:"l",ņ:"n",š:"s",ū:"u",ž:"z",Ā:"A",Č:"C",Ē:"E",Ģ:"G",Ī:"i",Ķ:"k",Ļ:"L",Ņ:"N",Š:"S",Ū:"u",Ž:"Z"},pl:{ą:"a",ć:"c",ę:"e",ł:"l",ń:"n",ó:"o",ś:"s",ź:"z",ż:"z",Ą:"A",Ć:"C",Ę:"e",Ł:"L",Ń:"N",Ó:"O",Ś:"S",Ź:"Z",Ż:"Z"},sv:{ä:"a",Ä:"A",ö:"o",Ö:"O"},sk:{ä:"a",Ä:"A"},sr:{љ:"lj",њ:"nj",Љ:"Lj",Њ:"Nj",đ:"dj",Đ:"Dj"},tr:{Ü:"U",Ö:"O",ü:"u",ö:"o"}},c={ar:{"∆":"delta","∞":"la-nihaya","♥":"hob","&":"wa","|":"aw","<":"aqal-men",">":"akbar-men","∑":"majmou","¤":"omla"},az:{},ca:{"∆":"delta","∞":"infinit","♥":"amor","&":"i","|":"o","<":"menys que",">":"mes que","∑":"suma dels","¤":"moneda"},cs:{"∆":"delta","∞":"nekonecno","♥":"laska","&":"a","|":"nebo","<":"mensi nez",">":"vetsi nez","∑":"soucet","¤":"mena"},de:{"∆":"delta","∞":"unendlich","♥":"Liebe","&":"und","|":"oder","<":"kleiner als",">":"groesser als","∑":"Summe von","¤":"Waehrung"},dv:{"∆":"delta","∞":"kolunulaa","♥":"loabi","&":"aai","|":"noonee","<":"ah vure kuda",">":"ah vure bodu","∑":"jumula","¤":"faisaa"},en:{"∆":"delta","∞":"infinity","♥":"love","&":"and","|":"or","<":"less than",">":"greater than","∑":"sum","¤":"currency"},es:{"∆":"delta","∞":"infinito","♥":"amor","&":"y","|":"u","<":"menos que",">":"mas que","∑":"suma de los","¤":"moneda"},fa:{"∆":"delta","∞":"bi-nahayat","♥":"eshgh","&":"va","|":"ya","<":"kamtar-az",">":"bishtar-az","∑":"majmooe","¤":"vahed"},fi:{"∆":"delta","∞":"aarettomyys","♥":"rakkaus","&":"ja","|":"tai","<":"pienempi kuin",">":"suurempi kuin","∑":"summa","¤":"valuutta"},fr:{"∆":"delta","∞":"infiniment","♥":"Amour","&":"et","|":"ou","<":"moins que",">":"superieure a","∑":"somme des","¤":"monnaie"},ge:{"∆":"delta","∞":"usasruloba","♥":"siqvaruli","&":"da","|":"an","<":"naklebi",">":"meti","∑":"jami","¤":"valuta"},gr:{},hu:{"∆":"delta","∞":"vegtelen","♥":"szerelem","&":"es","|":"vagy","<":"kisebb mint",">":"nagyobb mint","∑":"szumma","¤":"penznem"},it:{"∆":"delta","∞":"infinito","♥":"amore","&":"e","|":"o","<":"minore di",">":"maggiore di","∑":"somma","¤":"moneta"},lt:{"∆":"delta","∞":"begalybe","♥":"meile","&":"ir","|":"ar","<":"maziau nei",">":"daugiau nei","∑":"suma","¤":"valiuta"},lv:{"∆":"delta","∞":"bezgaliba","♥":"milestiba","&":"un","|":"vai","<":"mazak neka",">":"lielaks neka","∑":"summa","¤":"valuta"},my:{"∆":"kwahkhyaet","∞":"asaonasme","♥":"akhyait","&":"nhin","|":"tho","<":"ngethaw",">":"kyithaw","∑":"paungld","¤":"ngwekye"},mk:{},nl:{"∆":"delta","∞":"oneindig","♥":"liefde","&":"en","|":"of","<":"kleiner dan",">":"groter dan","∑":"som","¤":"valuta"},pl:{"∆":"delta","∞":"nieskonczonosc","♥":"milosc","&":"i","|":"lub","<":"mniejsze niz",">":"wieksze niz","∑":"suma","¤":"waluta"},pt:{"∆":"delta","∞":"infinito","♥":"amor","&":"e","|":"ou","<":"menor que",">":"maior que","∑":"soma","¤":"moeda"},ro:{"∆":"delta","∞":"infinit","♥":"dragoste","&":"si","|":"sau","<":"mai mic ca",">":"mai mare ca","∑":"suma","¤":"valuta"},ru:{"∆":"delta","∞":"beskonechno","♥":"lubov","&":"i","|":"ili","<":"menshe",">":"bolshe","∑":"summa","¤":"valjuta"},sk:{"∆":"delta","∞":"nekonecno","♥":"laska","&":"a","|":"alebo","<":"menej ako",">":"viac ako","∑":"sucet","¤":"mena"},sr:{},tr:{"∆":"delta","∞":"sonsuzluk","♥":"ask","&":"ve","|":"veya","<":"kucuktur",">":"buyuktur","∑":"toplam","¤":"para birimi"},uk:{"∆":"delta","∞":"bezkinechnist","♥":"lubov","&":"i","|":"abo","<":"menshe",">":"bilshe","∑":"suma","¤":"valjuta"},vn:{"∆":"delta","∞":"vo cuc","♥":"yeu","&":"va","|":"hoac","<":"nho hon",">":"lon hon","∑":"tong","¤":"tien te"}},l=[";","?",":","@","&","=","+","$",",","/"].join(""),u=[";","?",":","@","&","=","+","$",","].join(""),h=[".","!","~","*","'","(",")"].join(""),f=function(y,g){var w="-",O="",V="",R=!0,j={},q,k,M,I,E,S,N,D,J,H,C,W,_,b,x="";if(typeof y!="string")return"";if(typeof g=="string"&&(w=g),N=c.en,D=a.en,typeof g=="object"){q=g.maintainCase||!1,j=g.custom&&typeof g.custom=="object"?g.custom:j,M=+g.truncate>1&&g.truncate||!1,I=g.uric||!1,E=g.uricNoSlash||!1,S=g.mark||!1,R=!(g.symbols===!1||g.lang===!1),w=g.separator||w,I&&(x+=l),E&&(x+=u),S&&(x+=h),N=g.lang&&c[g.lang]&&R?c[g.lang]:R?c.en:{},D=g.lang&&a[g.lang]?a[g.lang]:g.lang===!1||g.lang===!0?{}:a.en,g.titleCase&&typeof g.titleCase.length=="number"&&Array.prototype.toString.call(g.titleCase)?(g.titleCase.forEach(function($){j[$+""]=$+""}),k=!0):k=!!g.titleCase,g.custom&&typeof g.custom.length=="number"&&Array.prototype.toString.call(g.custom)&&g.custom.forEach(function($){j[$+""]=$+""}),Object.keys(j).forEach(function($){var B;$.length>1?B=new RegExp("\\b"+p($)+"\\b","gi"):B=new RegExp(p($),"gi"),y=y.replace(B,j[$])});for(C in j)x+=C}for(x+=w,x=p(x),y=y.replace(/(^\s+|\s+$)/g,""),_=!1,b=!1,H=0,W=y.length;H<W;H++)C=y[H],m(C,j)?_=!1:D[C]?(C=_&&D[C].match(/[A-Za-z0-9]/)?" "+D[C]:D[C],_=!1):C in o?(H+1<W&&s.indexOf(y[H+1])>=0?(V+=C,C=""):b===!0?(C=r[V]+o[C],V=""):C=_&&o[C].match(/[A-Za-z0-9]/)?" "+o[C]:o[C],_=!1,b=!1):C in r?(V+=C,C="",H===W-1&&(C=r[V]),b=!0):N[C]&&!(I&&l.indexOf(C)!==-1)&&!(E&&u.indexOf(C)!==-1)?(C=_||O.substr(-1).match(/[A-Za-z0-9]/)?w+N[C]:N[C],C+=y[H+1]!==void 0&&y[H+1].match(/[A-Za-z0-9]/)?w:"",_=!0):(b===!0?(C=r[V]+C,V="",b=!1):_&&(/[A-Za-z0-9]/.test(C)||O.substr(-1).match(/A-Za-z0-9]/))&&(C=" "+C),_=!1),O+=C.replace(new RegExp("[^\\w\\s"+x+"_-]","g"),w);return k&&(O=O.replace(/(\w)(\S*)/g,function($,B,P){var L=B.toUpperCase()+(P!==null?P:"");return Object.keys(j).indexOf(L.toLowerCase())<0?L:L.toLowerCase()})),O=O.replace(/\s+/g,w).replace(new RegExp("\\"+w+"+","g"),w).replace(new RegExp("(^\\"+w+"+|\\"+w+"+$)","g"),""),M&&O.length>M&&(J=O.charAt(M)===w,O=O.slice(0,M),J||(O=O.slice(0,O.lastIndexOf(w)))),!q&&!k&&(O=O.toLowerCase()),O},d=function(y){return function(g){return f(g,y)}},p=function(y){return y.replace(/[-\\^$*+?.()|[\]{}\/]/g,"\\$&")},m=function(y,g){for(var w in g)if(g[w]===y)return!0};if(typeof e<"u"&&e.exports)e.exports=f,e.exports.createSlug=d;else if(typeof define<"u"&&define.amd)define([],function(){return f});else try{if(n.getSlug||n.createSlug)throw"speakingurl: globals exists /(getSlug|createSlug)/";n.getSlug=f,n.createSlug=d}catch{}}(t)}}),yc=Bo({"../../node_modules/.pnpm/speakingurl@14.0.1/node_modules/speakingurl/index.js"(t,e){v(),e.exports=_c()}});v(),v(),v(),v(),v(),v(),v(),v();function wc(t){var e;const n=t.name||t._componentTag||t.__VUE_DEVTOOLS_COMPONENT_GUSSED_NAME__||t.__name;return n==="index"&&(e=t.__file)!=null&&e.endsWith("index.vue")?"":n}function Ec(t){const e=t.__file;if(e)return ec(nc(e,".vue"))}function Uo(t,e){return t.type.__VUE_DEVTOOLS_COMPONENT_GUSSED_NAME__=e,e}function sn(t){if(t.__VUE_DEVTOOLS_NEXT_APP_RECORD__)return t.__VUE_DEVTOOLS_NEXT_APP_RECORD__;if(t.root)return t.appContext.app.__VUE_DEVTOOLS_NEXT_APP_RECORD__}function zo(t){var e,n;const o=(e=t.subTree)==null?void 0:e.type,s=sn(t);return s?((n=s?.types)==null?void 0:n.Fragment)===o:!1}function he(t){var e,n,o;const s=wc(t?.type||{});if(s)return s;if(t?.root===t)return"Root";for(const a in(n=(e=t.parent)==null?void 0:e.type)==null?void 0:n.components)if(t.parent.type.components[a]===t?.type)return Uo(t,a);for(const a in(o=t.appContext)==null?void 0:o.components)if(t.appContext.components[a]===t?.type)return Uo(t,a);return Ec(t?.type||{})||"Anonymous Component"}function bc(t){var e,n,o;const s=(o=(n=(e=t?.appContext)==null?void 0:e.app)==null?void 0:n.__VUE_DEVTOOLS_NEXT_APP_RECORD_ID__)!=null?o:0,r=t===t?.root?"root":t.uid;return`${s}:${r}`}function rn(t,e){return e=e||`${t.id}:root`,t.instanceMap.get(e)||t.instanceMap.get(":root")}function vc(){const t={top:0,bottom:0,left:0,right:0,get width(){return t.right-t.left},get height(){return t.bottom-t.top}};return t}var me;function kc(t){return me||(me=document.createRange()),me.selectNode(t),me.getBoundingClientRect()}function Sc(t){const e=vc();if(!t.children)return e;for(let n=0,o=t.children.length;n<o;n++){const s=t.children[n];let r;if(s.component)r=gt(s.component);else if(s.el){const a=s.el;a.nodeType===1||a.getBoundingClientRect?r=a.getBoundingClientRect():a.nodeType===3&&a.data.trim()&&(r=kc(a))}r&&Oc(e,r)}return e}function Oc(t,e){return(!t.top||e.top<t.top)&&(t.top=e.top),(!t.bottom||e.bottom>t.bottom)&&(t.bottom=e.bottom),(!t.left||e.left<t.left)&&(t.left=e.left),(!t.right||e.right>t.right)&&(t.right=e.right),t}var Ho={top:0,left:0,right:0,bottom:0,width:0,height:0};function gt(t){const e=t.subTree.el;return typeof window>"u"?Ho:zo(t)?Sc(t.subTree):e?.nodeType===1?e?.getBoundingClientRect():t.subTree.component?gt(t.subTree.component):Ho}v();function an(t){return zo(t)?Ic(t.subTree):t.subTree?[t.subTree.el]:[]}function Ic(t){if(!t.children)return[];const e=[];return t.children.forEach(n=>{n.component?e.push(...an(n.component)):n?.el&&e.push(n.el)}),e}var Ko="__vue-devtools-component-inspector__",Fo="__vue-devtools-component-inspector__card__",Wo="__vue-devtools-component-inspector__name__",Go="__vue-devtools-component-inspector__indicator__",Jo={display:"block",zIndex:2147483640,position:"fixed",backgroundColor:"#42b88325",border:"1px solid #42b88350",borderRadius:"5px",transition:"all 0.1s ease-in",pointerEvents:"none"},Tc={fontFamily:"Arial, Helvetica, sans-serif",padding:"5px 8px",borderRadius:"4px",textAlign:"left",position:"absolute",left:0,color:"#e9e9e9",fontSize:"14px",fontWeight:600,lineHeight:"24px",backgroundColor:"#42b883",boxShadow:"0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1)"},xc={display:"inline-block",fontWeight:400,fontStyle:"normal",fontSize:"12px",opacity:.7};function Ct(){return document.getElementById(Ko)}function Vc(){return document.getElementById(Fo)}function Nc(){return document.getElementById(Go)}function Cc(){return document.getElementById(Wo)}function cn(t){return{left:`${Math.round(t.left*100)/100}px`,top:`${Math.round(t.top*100)/100}px`,width:`${Math.round(t.width*100)/100}px`,height:`${Math.round(t.height*100)/100}px`}}function ln(t){var e;const n=document.createElement("div");n.id=(e=t.elementId)!=null?e:Ko,Object.assign(n.style,{...Jo,...cn(t.bounds),...t.style});const o=document.createElement("span");o.id=Fo,Object.assign(o.style,{...Tc,top:t.bounds.top<35?0:"-35px"});const s=document.createElement("span");s.id=Wo,s.innerHTML=`<${t.name}> `;const r=document.createElement("i");return r.id=Go,r.innerHTML=`${Math.round(t.bounds.width*100)/100} x ${Math.round(t.bounds.height*100)/100}`,Object.assign(r.style,xc),o.appendChild(s),o.appendChild(r),n.appendChild(o),document.body.appendChild(n),n}function un(t){const e=Ct(),n=Vc(),o=Cc(),s=Nc();e&&(Object.assign(e.style,{...Jo,...cn(t.bounds)}),Object.assign(n.style,{top:t.bounds.top<35?0:"-35px"}),o.innerHTML=`<${t.name}> `,s.innerHTML=`${Math.round(t.bounds.width*100)/100} x ${Math.round(t.bounds.height*100)/100}`)}function $c(t){const e=gt(t);if(!e.width&&!e.height)return;const n=he(t);Ct()?un({bounds:e,name:n}):ln({bounds:e,name:n})}function Yo(){const t=Ct();t&&(t.style.display="none")}var dn=null;function fn(t){const e=t.target;if(e){const n=e.__vueParentComponent;if(n&&(dn=n,n.vnode.el)){const o=gt(n),s=he(n);Ct()?un({bounds:o,name:s}):ln({bounds:o,name:s})}}}function Pc(t,e){if(t.preventDefault(),t.stopPropagation(),dn){const n=bc(dn);e(n)}}var ge=null;function Rc(){Yo(),window.removeEventListener("mouseover",fn),window.removeEventListener("click",ge,!0),ge=null}function Dc(){return window.addEventListener("mouseover",fn),new Promise(t=>{function e(n){n.preventDefault(),n.stopPropagation(),Pc(n,o=>{window.removeEventListener("click",e,!0),ge=null,window.removeEventListener("mouseover",fn);const s=Ct();s&&(s.style.display="none"),t(JSON.stringify({id:o}))})}ge=e,window.addEventListener("click",e,!0)})}function Ac(t){const e=rn(F.value,t.id);if(e){const[n]=an(e);if(typeof n.scrollIntoView=="function")n.scrollIntoView({behavior:"smooth"});else{const o=gt(e),s=document.createElement("div"),r={...cn(o),position:"absolute"};Object.assign(s.style,r),document.body.appendChild(s),s.scrollIntoView({behavior:"smooth"}),setTimeout(()=>{document.body.removeChild(s)},2e3)}setTimeout(()=>{const o=gt(e);if(o.width||o.height){const s=he(e),r=Ct();r?un({...t,name:s,bounds:o}):ln({...t,name:s,bounds:o}),setTimeout(()=>{r&&(r.style.display="none")},1500)}},1200)}}v();var qo;(qo=T).__VUE_DEVTOOLS_COMPONENT_INSPECTOR_ENABLED__!=null||(qo.__VUE_DEVTOOLS_COMPONENT_INSPECTOR_ENABLED__=!0);function Lc(t){let e=0;const n=setInterval(()=>{T.__VUE_INSPECTOR__&&(clearInterval(n),e+=30,t()),e>=5e3&&clearInterval(n)},30)}function jc(){const t=T.__VUE_INSPECTOR__,e=t.openInEditor;t.openInEditor=async(...n)=>{t.disable(),e(...n)}}function Mc(){return new Promise(t=>{function e(){jc(),t(T.__VUE_INSPECTOR__)}T.__VUE_INSPECTOR__?e():Lc(()=>{e()})})}v(),v();function Bc(t){return!!(t&&t.__v_isReadonly)}function Xo(t){return Bc(t)?Xo(t.__v_raw):!!(t&&t.__v_isReactive)}function pn(t){return!!(t&&t.__v_isRef===!0)}function Jt(t){const e=t&&t.__v_raw;return e?Jt(e):t}var Uc=class{constructor(){this.refEditor=new zc}set(t,e,n,o){const s=Array.isArray(e)?e:e.split(".");for(;s.length>1;){const c=s.shift();t instanceof Map?t=t.get(c):t instanceof Set?t=Array.from(t.values())[c]:t=t[c],this.refEditor.isRef(t)&&(t=this.refEditor.get(t))}const r=s[0],a=this.refEditor.get(t)[r];o?o(t,r,n):this.refEditor.isRef(a)?this.refEditor.set(a,n):t[r]=n}get(t,e){const n=Array.isArray(e)?e:e.split(".");for(let o=0;o<n.length;o++)if(t instanceof Map?t=t.get(n[o]):t=t[n[o]],this.refEditor.isRef(t)&&(t=this.refEditor.get(t)),!t)return;return t}has(t,e,n=!1){if(typeof t>"u")return!1;const o=Array.isArray(e)?e.slice():e.split("."),s=n?2:1;for(;t&&o.length>s;){const r=o.shift();t=t[r],this.refEditor.isRef(t)&&(t=this.refEditor.get(t))}return t!=null&&Object.prototype.hasOwnProperty.call(t,o[0])}createDefaultSetCallback(t){return(e,n,o)=>{if((t.remove||t.newKey)&&(Array.isArray(e)?e.splice(n,1):Jt(e)instanceof Map?e.delete(n):Jt(e)instanceof Set?e.delete(Array.from(e.values())[n]):Reflect.deleteProperty(e,n)),!t.remove){const s=e[t.newKey||n];this.refEditor.isRef(s)?this.refEditor.set(s,o):Jt(e)instanceof Map?e.set(t.newKey||n,o):Jt(e)instanceof Set?e.add(o):e[t.newKey||n]=o}}}},zc=class{set(t,e){if(pn(t))t.value=e;else{if(t instanceof Set&&Array.isArray(e)){t.clear(),e.forEach(s=>t.add(s));return}const n=Object.keys(e);if(t instanceof Map){const s=new Set(t.keys());n.forEach(r=>{t.set(r,Reflect.get(e,r)),s.delete(r)}),s.forEach(r=>t.delete(r));return}const o=new Set(Object.keys(t));n.forEach(s=>{Reflect.set(t,s,Reflect.get(e,s)),o.delete(s)}),o.forEach(s=>Reflect.deleteProperty(t,s))}}get(t){return pn(t)?t.value:t}isRef(t){return pn(t)||Xo(t)}};v(),v(),v();var Hc="__VUE_DEVTOOLS_KIT_TIMELINE_LAYERS_STATE__";function Kc(){if(!Ro||typeof localStorage>"u"||localStorage===null)return{recordingState:!1,mouseEventEnabled:!1,keyboardEventEnabled:!1,componentEventEnabled:!1,performanceEventEnabled:!1,selected:""};const t=localStorage.getItem(Hc);return t?JSON.parse(t):{recordingState:!1,mouseEventEnabled:!1,keyboardEventEnabled:!1,componentEventEnabled:!1,performanceEventEnabled:!1,selected:""}}v(),v(),v();var Zo;(Zo=T).__VUE_DEVTOOLS_KIT_TIMELINE_LAYERS!=null||(Zo.__VUE_DEVTOOLS_KIT_TIMELINE_LAYERS=[]);var Fc=new Proxy(T.__VUE_DEVTOOLS_KIT_TIMELINE_LAYERS,{get(t,e,n){return Reflect.get(t,e,n)}});function Wc(t,e){U.timelineLayersState[e.id]=!1,Fc.push({...t,descriptorId:e.id,appRecord:sn(e.app)})}var Qo;(Qo=T).__VUE_DEVTOOLS_KIT_INSPECTOR__!=null||(Qo.__VUE_DEVTOOLS_KIT_INSPECTOR__=[]);var hn=new Proxy(T.__VUE_DEVTOOLS_KIT_INSPECTOR__,{get(t,e,n){return Reflect.get(t,e,n)}}),ts=Nt(()=>{Pt.hooks.callHook("sendInspectorToClient",es())});function Gc(t,e){var n,o;hn.push({options:t,descriptor:e,treeFilterPlaceholder:(n=t.treeFilterPlaceholder)!=null?n:"Search tree...",stateFilterPlaceholder:(o=t.stateFilterPlaceholder)!=null?o:"Search state...",treeFilter:"",selectedNodeId:"",appRecord:sn(e.app)}),ts()}function es(){return hn.filter(t=>t.descriptor.app===F.value.app).filter(t=>t.descriptor.id!=="components").map(t=>{var e;const n=t.descriptor,o=t.options;return{id:o.id,label:o.label,logo:n.logo,icon:`custom-ic-baseline-${(e=o?.icon)==null?void 0:e.replace(/_/g,"-")}`,packageName:n.packageName,homepage:n.homepage,pluginId:n.id}})}function _e(t,e){return hn.find(n=>n.options.id===t&&(e?n.descriptor.app===e:!0))}function Jc(){const t=jo();t.hook("addInspector",({inspector:o,plugin:s})=>{Gc(o,s.descriptor)});const e=Nt(async({inspectorId:o,plugin:s})=>{var r;if(!o||!((r=s?.descriptor)!=null&&r.app)||U.highPerfModeEnabled)return;const a=_e(o,s.descriptor.app),c={app:s.descriptor.app,inspectorId:o,filter:a?.treeFilter||"",rootNodes:[]};await new Promise(l=>{t.callHookWith(async u=>{await Promise.all(u.map(h=>h(c))),l()},"getInspectorTree")}),t.callHookWith(async l=>{await Promise.all(l.map(u=>u({inspectorId:o,rootNodes:c.rootNodes})))},"sendInspectorTreeToClient")},120);t.hook("sendInspectorTree",e);const n=Nt(async({inspectorId:o,plugin:s})=>{var r;if(!o||!((r=s?.descriptor)!=null&&r.app)||U.highPerfModeEnabled)return;const a=_e(o,s.descriptor.app),c={app:s.descriptor.app,inspectorId:o,nodeId:a?.selectedNodeId||"",state:null},l={currentTab:`custom-inspector:${o}`};c.nodeId&&await new Promise(u=>{t.callHookWith(async h=>{await Promise.all(h.map(f=>f(c,l))),u()},"getInspectorState")}),t.callHookWith(async u=>{await Promise.all(u.map(h=>h({inspectorId:o,nodeId:c.nodeId,state:c.state})))},"sendInspectorStateToClient")},120);return t.hook("sendInspectorState",n),t.hook("customInspectorSelectNode",({inspectorId:o,nodeId:s,plugin:r})=>{const a=_e(o,r.descriptor.app);a&&(a.selectedNodeId=s)}),t.hook("timelineLayerAdded",({options:o,plugin:s})=>{Wc(o,s.descriptor)}),t.hook("timelineEventAdded",({options:o,plugin:s})=>{var r;const a=["performance","component-event","keyboard","mouse"];U.highPerfModeEnabled||!((r=U.timelineLayersState)!=null&&r[s.descriptor.id])&&!a.includes(o.layerId)||t.callHookWith(async c=>{await Promise.all(c.map(l=>l(o)))},"sendTimelineEventToClient")}),t.hook("getComponentInstances",async({app:o})=>{const s=o.__VUE_DEVTOOLS_NEXT_APP_RECORD__;if(!s)return null;const r=s.id.toString();return[...s.instanceMap].filter(([a])=>a.split(":")[0]===r).map(([,a])=>a)}),t.hook("getComponentBounds",async({instance:o})=>gt(o)),t.hook("getComponentName",({instance:o})=>he(o)),t.hook("componentHighlight",({uid:o})=>{const s=F.value.instanceMap.get(o);s&&$c(s)}),t.hook("componentUnhighlight",()=>{Yo()}),t}var ns;(ns=T).__VUE_DEVTOOLS_KIT_APP_RECORDS__!=null||(ns.__VUE_DEVTOOLS_KIT_APP_RECORDS__=[]);var os;(os=T).__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD__!=null||(os.__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD__={});var ss;(ss=T).__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD_ID__!=null||(ss.__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD_ID__="");var rs;(rs=T).__VUE_DEVTOOLS_KIT_CUSTOM_TABS__!=null||(rs.__VUE_DEVTOOLS_KIT_CUSTOM_TABS__=[]);var is;(is=T).__VUE_DEVTOOLS_KIT_CUSTOM_COMMANDS__!=null||(is.__VUE_DEVTOOLS_KIT_CUSTOM_COMMANDS__=[]);var _t="__VUE_DEVTOOLS_KIT_GLOBAL_STATE__";function Yc(){return{connected:!1,clientConnected:!1,vitePluginDetected:!0,appRecords:[],activeAppRecordId:"",tabs:[],commands:[],highPerfModeEnabled:!0,devtoolsClientDetected:{},perfUniqueGroupId:0,timelineLayersState:Kc()}}var as;(as=T)[_t]!=null||(as[_t]=Yc());var qc=Nt(t=>{Pt.hooks.callHook("devtoolsStateUpdated",{state:t})});Nt((t,e)=>{Pt.hooks.callHook("devtoolsConnectedUpdated",{state:t,oldState:e})});var ye=new Proxy(T.__VUE_DEVTOOLS_KIT_APP_RECORDS__,{get(t,e,n){return e==="value"?T.__VUE_DEVTOOLS_KIT_APP_RECORDS__:T.__VUE_DEVTOOLS_KIT_APP_RECORDS__[e]}}),F=new Proxy(T.__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD__,{get(t,e,n){return e==="value"?T.__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD__:e==="id"?T.__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD_ID__:T.__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD__[e]}});function cs(){qc({...T[_t],appRecords:ye.value,activeAppRecordId:F.id,tabs:T.__VUE_DEVTOOLS_KIT_CUSTOM_TABS__,commands:T.__VUE_DEVTOOLS_KIT_CUSTOM_COMMANDS__})}function Xc(t){T.__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD__=t,cs()}function Zc(t){T.__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD_ID__=t,cs()}var U=new Proxy(T[_t],{get(t,e){return e==="appRecords"?ye:e==="activeAppRecordId"?F.id:e==="tabs"?T.__VUE_DEVTOOLS_KIT_CUSTOM_TABS__:e==="commands"?T.__VUE_DEVTOOLS_KIT_CUSTOM_COMMANDS__:T[_t][e]},deleteProperty(t,e){return delete t[e],!0},set(t,e,n){return{...T[_t]},t[e]=n,T[_t][e]=n,!0}});function Qc(t={}){var e,n,o;const{file:s,host:r,baseUrl:a=window.location.origin,line:c=0,column:l=0}=t;if(s){if(r==="chrome-extension"){const u=s.replace(/\\/g,"\\\\"),h=(n=(e=window.VUE_DEVTOOLS_CONFIG)==null?void 0:e.openInEditorHost)!=null?n:"/";fetch(`${h}__open-in-editor?file=${encodeURI(s)}`).then(f=>{if(!f.ok){const d=`Opening component ${u} failed`;console.log(`%c${d}`,"color:red")}})}else if(U.vitePluginDetected){const u=(o=T.__VUE_DEVTOOLS_OPEN_IN_EDITOR_BASE_URL__)!=null?o:a;T.__VUE_INSPECTOR__.openInEditor(u,s,c,l)}}}v(),v(),v(),v(),v();var ls;(ls=T).__VUE_DEVTOOLS_KIT_PLUGIN_BUFFER__!=null||(ls.__VUE_DEVTOOLS_KIT_PLUGIN_BUFFER__=[]);var mn=new Proxy(T.__VUE_DEVTOOLS_KIT_PLUGIN_BUFFER__,{get(t,e,n){return Reflect.get(t,e,n)}});function gn(t){const e={};return Object.keys(t).forEach(n=>{e[n]=t[n].defaultValue}),e}function _n(t){return`__VUE_DEVTOOLS_NEXT_PLUGIN_SETTINGS__${t}__`}function tl(t){var e,n,o;return(o=((n=(e=mn.find(r=>{var a;return r[0].id===t&&!!((a=r[0])!=null&&a.settings)}))==null?void 0:e[0])!=null?n:null)?.settings)!=null?o:null}function us(t,e){var n,o,s;const r=_n(t);if(r){const a=localStorage.getItem(r);if(a)return JSON.parse(a)}if(t){const a=(o=(n=mn.find(c=>c[0].id===t))==null?void 0:n[0])!=null?o:null;return gn((s=a?.settings)!=null?s:{})}return gn(e)}function el(t,e){const n=_n(t);localStorage.getItem(n)||localStorage.setItem(n,JSON.stringify(gn(e)))}function nl(t,e,n){const o=_n(t),s=localStorage.getItem(o),r=JSON.parse(s||"{}"),a={...r,[e]:n};localStorage.setItem(o,JSON.stringify(a)),Pt.hooks.callHookWith(c=>{c.forEach(l=>l({pluginId:t,key:e,oldValue:r[e],newValue:n,settings:a}))},"setPluginSettings")}v(),v(),v(),v(),v(),v(),v(),v(),v(),v(),v();var ds,fs,Y=(fs=(ds=T).__VUE_DEVTOOLS_HOOK)!=null?fs:ds.__VUE_DEVTOOLS_HOOK=jo(),ol={vueAppInit(t){Y.hook("app:init",t)},vueAppUnmount(t){Y.hook("app:unmount",t)},vueAppConnected(t){Y.hook("app:connected",t)},componentAdded(t){return Y.hook("component:added",t)},componentEmit(t){return Y.hook("component:emit",t)},componentUpdated(t){return Y.hook("component:updated",t)},componentRemoved(t){return Y.hook("component:removed",t)},setupDevtoolsPlugin(t){Y.hook("devtools-plugin:setup",t)},perfStart(t){return Y.hook("perf:start",t)},perfEnd(t){return Y.hook("perf:end",t)}},ps={on:ol,setupDevToolsPlugin(t,e){return Y.callHook("devtools-plugin:setup",t,e)}},sl=class{constructor({plugin:t,ctx:e}){this.hooks=e.hooks,this.plugin=t}get on(){return{visitComponentTree:t=>{this.hooks.hook("visitComponentTree",t)},inspectComponent:t=>{this.hooks.hook("inspectComponent",t)},editComponentState:t=>{this.hooks.hook("editComponentState",t)},getInspectorTree:t=>{this.hooks.hook("getInspectorTree",t)},getInspectorState:t=>{this.hooks.hook("getInspectorState",t)},editInspectorState:t=>{this.hooks.hook("editInspectorState",t)},inspectTimelineEvent:t=>{this.hooks.hook("inspectTimelineEvent",t)},timelineCleared:t=>{this.hooks.hook("timelineCleared",t)},setPluginSettings:t=>{this.hooks.hook("setPluginSettings",t)}}}notifyComponentUpdate(t){var e;if(U.highPerfModeEnabled)return;const n=es().find(o=>o.packageName===this.plugin.descriptor.packageName);if(n?.id){if(t){const o=[t.appContext.app,t.uid,(e=t.parent)==null?void 0:e.uid,t];Y.callHook("component:updated",...o)}else Y.callHook("component:updated");this.hooks.callHook("sendInspectorState",{inspectorId:n.id,plugin:this.plugin})}}addInspector(t){this.hooks.callHook("addInspector",{inspector:t,plugin:this.plugin}),this.plugin.descriptor.settings&&el(t.id,this.plugin.descriptor.settings)}sendInspectorTree(t){U.highPerfModeEnabled||this.hooks.callHook("sendInspectorTree",{inspectorId:t,plugin:this.plugin})}sendInspectorState(t){U.highPerfModeEnabled||this.hooks.callHook("sendInspectorState",{inspectorId:t,plugin:this.plugin})}selectInspectorNode(t,e){this.hooks.callHook("customInspectorSelectNode",{inspectorId:t,nodeId:e,plugin:this.plugin})}visitComponentTree(t){return this.hooks.callHook("visitComponentTree",t)}now(){return U.highPerfModeEnabled?0:Date.now()}addTimelineLayer(t){this.hooks.callHook("timelineLayerAdded",{options:t,plugin:this.plugin})}addTimelineEvent(t){U.highPerfModeEnabled||this.hooks.callHook("timelineEventAdded",{options:t,plugin:this.plugin})}getSettings(t){return us(t??this.plugin.descriptor.id,this.plugin.descriptor.settings)}getComponentInstances(t){return this.hooks.callHook("getComponentInstances",{app:t})}getComponentBounds(t){return this.hooks.callHook("getComponentBounds",{instance:t})}getComponentName(t){return this.hooks.callHook("getComponentName",{instance:t})}highlightElement(t){const e=t.__VUE_DEVTOOLS_NEXT_UID__;return this.hooks.callHook("componentHighlight",{uid:e})}unhighlightElement(){return this.hooks.callHook("componentUnhighlight")}},rl=sl;v(),v(),v(),v();var il="__vue_devtool_undefined__",al="__vue_devtool_infinity__",cl="__vue_devtool_negative_infinity__",ll="__vue_devtool_nan__";v(),v();var ul={[il]:"undefined",[ll]:"NaN",[al]:"Infinity",[cl]:"-Infinity"};Object.entries(ul).reduce((t,[e,n])=>(t[n]=e,t),{}),v(),v(),v(),v(),v();var hs;(hs=T).__VUE_DEVTOOLS_KIT__REGISTERED_PLUGIN_APPS__!=null||(hs.__VUE_DEVTOOLS_KIT__REGISTERED_PLUGIN_APPS__=new Set);function ms(t,e){return ps.setupDevToolsPlugin(t,e)}function dl(t,e){const[n,o]=t;if(n.app!==e)return;const s=new rl({plugin:{setupFn:o,descriptor:n},ctx:Pt});n.packageName==="vuex"&&s.on.editInspectorState(r=>{s.sendInspectorState(r.inspectorId)}),o(s)}function gs(t,e){T.__VUE_DEVTOOLS_KIT__REGISTERED_PLUGIN_APPS__.has(t)||U.highPerfModeEnabled&&!e?.inspectingComponent||(T.__VUE_DEVTOOLS_KIT__REGISTERED_PLUGIN_APPS__.add(t),mn.forEach(n=>{dl(n,t)}))}v(),v();var Yt="__VUE_DEVTOOLS_ROUTER__",$t="__VUE_DEVTOOLS_ROUTER_INFO__",_s;(_s=T)[$t]!=null||(_s[$t]={currentRoute:null,routes:[]});var ys;(ys=T)[Yt]!=null||(ys[Yt]={}),new Proxy(T[$t],{get(t,e){return T[$t][e]}}),new Proxy(T[Yt],{get(t,e){if(e==="value")return T[Yt]}});function fl(t){const e=new Map;return(t?.getRoutes()||[]).filter(n=>!e.has(n.path)&&e.set(n.path,1))}function yn(t){return t.map(e=>{let{path:n,name:o,children:s,meta:r}=e;return s?.length&&(s=yn(s)),{path:n,name:o,children:s,meta:r}})}function pl(t){if(t){const{fullPath:e,hash:n,href:o,path:s,name:r,matched:a,params:c,query:l}=t;return{fullPath:e,hash:n,href:o,path:s,name:r,params:c,query:l,matched:yn(a)}}return t}function hl(t,e){function n(){var o;const s=(o=t.app)==null?void 0:o.config.globalProperties.$router,r=pl(s?.currentRoute.value),a=yn(fl(s)),c=console.warn;console.warn=()=>{},T[$t]={currentRoute:r?Ao(r):{},routes:Ao(a)},T[Yt]=s,console.warn=c}n(),ps.on.componentUpdated(Nt(()=>{var o;((o=e.value)==null?void 0:o.app)===t.app&&(n(),!U.highPerfModeEnabled&&Pt.hooks.callHook("routerInfoUpdated",{state:T[$t]}))},200))}function ml(t){return{async getInspectorTree(e){const n={...e,app:F.value.app,rootNodes:[]};return await new Promise(o=>{t.callHookWith(async s=>{await Promise.all(s.map(r=>r(n))),o()},"getInspectorTree")}),n.rootNodes},async getInspectorState(e){const n={...e,app:F.value.app,state:null},o={currentTab:`custom-inspector:${e.inspectorId}`};return await new Promise(s=>{t.callHookWith(async r=>{await Promise.all(r.map(a=>a(n,o))),s()},"getInspectorState")}),n.state},editInspectorState(e){const n=new Uc,o={...e,app:F.value.app,set:(s,r=e.path,a=e.state.value,c)=>{n.set(s,r,a,c||n.createDefaultSetCallback(e.state))}};t.callHookWith(s=>{s.forEach(r=>r(o))},"editInspectorState")},sendInspectorState(e){const n=_e(e);t.callHook("sendInspectorState",{inspectorId:e,plugin:{descriptor:n.descriptor,setupFn:()=>({})}})},inspectComponentInspector(){return Dc()},cancelInspectComponentInspector(){return Rc()},getComponentRenderCode(e){const n=rn(F.value,e);if(n)return typeof n?.type!="function"?n.render.toString():n.type.toString()},scrollToComponent(e){return Ac({id:e})},openInEditor:Qc,getVueInspector:Mc,toggleApp(e,n){const o=ye.value.find(s=>s.id===e);o&&(Zc(e),Xc(o),hl(o,F),ts(),gs(o.app,n))},inspectDOM(e){const n=rn(F.value,e);if(n){const[o]=an(n);o&&(T.__VUE_DEVTOOLS_INSPECT_DOM_TARGET__=o)}},updatePluginSettings(e,n,o){nl(e,n,o)},getPluginSettings(e){return{options:tl(e),values:us(e)}}}}v();var ws;(ws=T).__VUE_DEVTOOLS_ENV__!=null||(ws.__VUE_DEVTOOLS_ENV__={vitePluginDetected:!1});var Es=Jc(),bs;(bs=T).__VUE_DEVTOOLS_KIT_CONTEXT__!=null||(bs.__VUE_DEVTOOLS_KIT_CONTEXT__={hooks:Es,get state(){return{...U,activeAppRecordId:F.id,activeAppRecord:F.value,appRecords:ye.value}},api:ml(Es)});var Pt=T.__VUE_DEVTOOLS_KIT_CONTEXT__;v(),gc(yc());var vs;(vs=T).__VUE_DEVTOOLS_NEXT_APP_RECORD_INFO__!=null||(vs.__VUE_DEVTOOLS_NEXT_APP_RECORD_INFO__={id:0,appIds:new Set}),v(),v();function gl(t){U.highPerfModeEnabled=t??!U.highPerfModeEnabled,!t&&F.value&&gs(F.value.app)}v(),v(),v();function _l(t){U.devtoolsClientDetected={...U.devtoolsClientDetected,...t};const e=Object.values(U.devtoolsClientDetected).some(Boolean);gl(!e)}var ks;(ks=T).__VUE_DEVTOOLS_UPDATE_CLIENT_DETECTED__!=null||(ks.__VUE_DEVTOOLS_UPDATE_CLIENT_DETECTED__=_l),v(),v(),v(),v(),v(),v(),v();var yl=class{constructor(){this.keyToValue=new Map,this.valueToKey=new Map}set(t,e){this.keyToValue.set(t,e),this.valueToKey.set(e,t)}getByKey(t){return this.keyToValue.get(t)}getByValue(t){return this.valueToKey.get(t)}clear(){this.keyToValue.clear(),this.valueToKey.clear()}},Ss=class{constructor(t){this.generateIdentifier=t,this.kv=new yl}register(t,e){this.kv.getByValue(t)||(e||(e=this.generateIdentifier(t)),this.kv.set(e,t))}clear(){this.kv.clear()}getIdentifier(t){return this.kv.getByValue(t)}getValue(t){return this.kv.getByKey(t)}},wl=class extends Ss{constructor(){super(t=>t.name),this.classToAllowedProps=new Map}register(t,e){typeof e=="object"?(e.allowProps&&this.classToAllowedProps.set(t,e.allowProps),super.register(t,e.identifier)):super.register(t,e)}getAllowedProps(t){return this.classToAllowedProps.get(t)}};v(),v();function El(t){if("values"in Object)return Object.values(t);const e=[];for(const n in t)t.hasOwnProperty(n)&&e.push(t[n]);return e}function bl(t,e){const n=El(t);if("find"in n)return n.find(e);const o=n;for(let s=0;s<o.length;s++){const r=o[s];if(e(r))return r}}function Rt(t,e){Object.entries(t).forEach(([n,o])=>e(o,n))}function we(t,e){return t.indexOf(e)!==-1}function Os(t,e){for(let n=0;n<t.length;n++){const o=t[n];if(e(o))return o}}var vl=class{constructor(){this.transfomers={}}register(t){this.transfomers[t.name]=t}findApplicable(t){return bl(this.transfomers,e=>e.isApplicable(t))}findByName(t){return this.transfomers[t]}};v(),v();var kl=t=>Object.prototype.toString.call(t).slice(8,-1),Is=t=>typeof t>"u",Sl=t=>t===null,qt=t=>typeof t!="object"||t===null||t===Object.prototype?!1:Object.getPrototypeOf(t)===null?!0:Object.getPrototypeOf(t)===Object.prototype,wn=t=>qt(t)&&Object.keys(t).length===0,ut=t=>Array.isArray(t),Ol=t=>typeof t=="string",Il=t=>typeof t=="number"&&!isNaN(t),Tl=t=>typeof t=="boolean",xl=t=>t instanceof RegExp,Xt=t=>t instanceof Map,Zt=t=>t instanceof Set,Ts=t=>kl(t)==="Symbol",Vl=t=>t instanceof Date&&!isNaN(t.valueOf()),Nl=t=>t instanceof Error,xs=t=>typeof t=="number"&&isNaN(t),Cl=t=>Tl(t)||Sl(t)||Is(t)||Il(t)||Ol(t)||Ts(t),$l=t=>typeof t=="bigint",Pl=t=>t===1/0||t===-1/0,Rl=t=>ArrayBuffer.isView(t)&&!(t instanceof DataView),Dl=t=>t instanceof URL;v();var Vs=t=>t.replace(/\./g,"\\."),En=t=>t.map(String).map(Vs).join("."),Qt=t=>{const e=[];let n="";for(let s=0;s<t.length;s++){let r=t.charAt(s);if(r==="\\"&&t.charAt(s+1)==="."){n+=".",s++;continue}if(r==="."){e.push(n),n="";continue}n+=r}const o=n;return e.push(o),e};v();function et(t,e,n,o){return{isApplicable:t,annotation:e,transform:n,untransform:o}}var Ns=[et(Is,"undefined",()=>null,()=>{}),et($l,"bigint",t=>t.toString(),t=>typeof BigInt<"u"?BigInt(t):(console.error("Please add a BigInt polyfill."),t)),et(Vl,"Date",t=>t.toISOString(),t=>new Date(t)),et(Nl,"Error",(t,e)=>{const n={name:t.name,message:t.message};return e.allowedErrorProps.forEach(o=>{n[o]=t[o]}),n},(t,e)=>{const n=new Error(t.message);return n.name=t.name,n.stack=t.stack,e.allowedErrorProps.forEach(o=>{n[o]=t[o]}),n}),et(xl,"regexp",t=>""+t,t=>{const e=t.slice(1,t.lastIndexOf("/")),n=t.slice(t.lastIndexOf("/")+1);return new RegExp(e,n)}),et(Zt,"set",t=>[...t.values()],t=>new Set(t)),et(Xt,"map",t=>[...t.entries()],t=>new Map(t)),et(t=>xs(t)||Pl(t),"number",t=>xs(t)?"NaN":t>0?"Infinity":"-Infinity",Number),et(t=>t===0&&1/t===-1/0,"number",()=>"-0",Number),et(Dl,"URL",t=>t.toString(),t=>new URL(t))];function Ee(t,e,n,o){return{isApplicable:t,annotation:e,transform:n,untransform:o}}var Cs=Ee((t,e)=>Ts(t)?!!e.symbolRegistry.getIdentifier(t):!1,(t,e)=>["symbol",e.symbolRegistry.getIdentifier(t)],t=>t.description,(t,e,n)=>{const o=n.symbolRegistry.getValue(e[1]);if(!o)throw new Error("Trying to deserialize unknown symbol");return o}),Al=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array,Uint8ClampedArray].reduce((t,e)=>(t[e.name]=e,t),{}),$s=Ee(Rl,t=>["typed-array",t.constructor.name],t=>[...t],(t,e)=>{const n=Al[e[1]];if(!n)throw new Error("Trying to deserialize unknown typed array");return new n(t)});function Ps(t,e){return t?.constructor?!!e.classRegistry.getIdentifier(t.constructor):!1}var Rs=Ee(Ps,(t,e)=>["class",e.classRegistry.getIdentifier(t.constructor)],(t,e)=>{const n=e.classRegistry.getAllowedProps(t.constructor);if(!n)return{...t};const o={};return n.forEach(s=>{o[s]=t[s]}),o},(t,e,n)=>{const o=n.classRegistry.getValue(e[1]);if(!o)throw new Error(`Trying to deserialize unknown class '${e[1]}' - check https://github.com/blitz-js/superjson/issues/116#issuecomment-773996564`);return Object.assign(Object.create(o.prototype),t)}),Ds=Ee((t,e)=>!!e.customTransformerRegistry.findApplicable(t),(t,e)=>["custom",e.customTransformerRegistry.findApplicable(t).name],(t,e)=>e.customTransformerRegistry.findApplicable(t).serialize(t),(t,e,n)=>{const o=n.customTransformerRegistry.findByName(e[1]);if(!o)throw new Error("Trying to deserialize unknown custom value");return o.deserialize(t)}),Ll=[Rs,Cs,Ds,$s],As=(t,e)=>{const n=Os(Ll,s=>s.isApplicable(t,e));if(n)return{value:n.transform(t,e),type:n.annotation(t,e)};const o=Os(Ns,s=>s.isApplicable(t,e));if(o)return{value:o.transform(t,e),type:o.annotation}},Ls={};Ns.forEach(t=>{Ls[t.annotation]=t});var jl=(t,e,n)=>{if(ut(e))switch(e[0]){case"symbol":return Cs.untransform(t,e,n);case"class":return Rs.untransform(t,e,n);case"custom":return Ds.untransform(t,e,n);case"typed-array":return $s.untransform(t,e,n);default:throw new Error("Unknown transformation: "+e)}else{const o=Ls[e];if(!o)throw new Error("Unknown transformation: "+e);return o.untransform(t,n)}};v();var Dt=(t,e)=>{if(e>t.size)throw new Error("index out of bounds");const n=t.keys();for(;e>0;)n.next(),e--;return n.next().value};function js(t){if(we(t,"__proto__"))throw new Error("__proto__ is not allowed as a property");if(we(t,"prototype"))throw new Error("prototype is not allowed as a property");if(we(t,"constructor"))throw new Error("constructor is not allowed as a property")}var Ml=(t,e)=>{js(e);for(let n=0;n<e.length;n++){const o=e[n];if(Zt(t))t=Dt(t,+o);else if(Xt(t)){const s=+o,r=+e[++n]==0?"key":"value",a=Dt(t,s);switch(r){case"key":t=a;break;case"value":t=t.get(a);break}}else t=t[o]}return t},bn=(t,e,n)=>{if(js(e),e.length===0)return n(t);let o=t;for(let r=0;r<e.length-1;r++){const a=e[r];if(ut(o)){const c=+a;o=o[c]}else if(qt(o))o=o[a];else if(Zt(o)){const c=+a;o=Dt(o,c)}else if(Xt(o)){if(r===e.length-2)break;const c=+a,l=+e[++r]==0?"key":"value",u=Dt(o,c);switch(l){case"key":o=u;break;case"value":o=o.get(u);break}}}const s=e[e.length-1];if(ut(o)?o[+s]=n(o[+s]):qt(o)&&(o[s]=n(o[s])),Zt(o)){const r=Dt(o,+s),a=n(r);r!==a&&(o.delete(r),o.add(a))}if(Xt(o)){const r=+e[e.length-2],a=Dt(o,r);switch(+s==0?"key":"value"){case"key":{const c=n(a);o.set(c,o.get(a)),c!==a&&o.delete(a);break}case"value":{o.set(a,n(o.get(a)));break}}}return t};function vn(t,e,n=[]){if(!t)return;if(!ut(t)){Rt(t,(r,a)=>vn(r,e,[...n,...Qt(a)]));return}const[o,s]=t;s&&Rt(s,(r,a)=>{vn(r,e,[...n,...Qt(a)])}),e(o,n)}function Bl(t,e,n){return vn(e,(o,s)=>{t=bn(t,s,r=>jl(r,o,n))}),t}function Ul(t,e){function n(o,s){const r=Ml(t,Qt(s));o.map(Qt).forEach(a=>{t=bn(t,a,()=>r)})}if(ut(e)){const[o,s]=e;o.forEach(r=>{t=bn(t,Qt(r),()=>t)}),s&&Rt(s,n)}else Rt(e,n);return t}var zl=(t,e)=>qt(t)||ut(t)||Xt(t)||Zt(t)||Ps(t,e);function Hl(t,e,n){const o=n.get(t);o?o.push(e):n.set(t,[e])}function Kl(t,e){const n={};let o;return t.forEach(s=>{if(s.length<=1)return;e||(s=s.map(c=>c.map(String)).sort((c,l)=>c.length-l.length));const[r,...a]=s;r.length===0?o=a.map(En):n[En(r)]=a.map(En)}),o?wn(n)?[o]:[o,n]:wn(n)?void 0:n}var Ms=(t,e,n,o,s=[],r=[],a=new Map)=>{var c;const l=Cl(t);if(!l){Hl(t,s,e);const m=a.get(t);if(m)return o?{transformedValue:null}:m}if(!zl(t,n)){const m=As(t,n),y=m?{transformedValue:m.value,annotations:[m.type]}:{transformedValue:t};return l||a.set(t,y),y}if(we(r,t))return{transformedValue:null};const u=As(t,n),h=(c=u?.value)!=null?c:t,f=ut(h)?[]:{},d={};Rt(h,(m,y)=>{if(y==="__proto__"||y==="constructor"||y==="prototype")throw new Error(`Detected property ${y}. This is a prototype pollution risk, please remove it from your object.`);const g=Ms(m,e,n,o,[...s,y],[...r,t],a);f[y]=g.transformedValue,ut(g.annotations)?d[y]=g.annotations:qt(g.annotations)&&Rt(g.annotations,(w,O)=>{d[Vs(y)+"."+O]=w})});const p=wn(d)?{transformedValue:f,annotations:u?[u.type]:void 0}:{transformedValue:f,annotations:u?[u.type,d]:d};return l||a.set(t,p),p};v(),v();function Bs(t){return Object.prototype.toString.call(t).slice(8,-1)}function Us(t){return Bs(t)==="Array"}function Fl(t){if(Bs(t)!=="Object")return!1;const e=Object.getPrototypeOf(t);return!!e&&e.constructor===Object&&e===Object.prototype}function Wl(t,e,n,o,s){const r={}.propertyIsEnumerable.call(o,e)?"enumerable":"nonenumerable";r==="enumerable"&&(t[e]=n),s&&r==="nonenumerable"&&Object.defineProperty(t,e,{value:n,enumerable:!1,writable:!0,configurable:!0})}function kn(t,e={}){if(Us(t))return t.map(s=>kn(s,e));if(!Fl(t))return t;const n=Object.getOwnPropertyNames(t),o=Object.getOwnPropertySymbols(t);return[...n,...o].reduce((s,r)=>{if(Us(e.props)&&!e.props.includes(r))return s;const a=t[r],c=kn(a,e);return Wl(s,r,c,t,e.nonenumerable),s},{})}var A=class{constructor({dedupe:t=!1}={}){this.classRegistry=new wl,this.symbolRegistry=new Ss(e=>{var n;return(n=e.description)!=null?n:""}),this.customTransformerRegistry=new vl,this.allowedErrorProps=[],this.dedupe=t}serialize(t){const e=new Map,n=Ms(t,e,this,this.dedupe),o={json:n.transformedValue};n.annotations&&(o.meta={...o.meta,values:n.annotations});const s=Kl(e,this.dedupe);return s&&(o.meta={...o.meta,referentialEqualities:s}),o}deserialize(t){const{json:e,meta:n}=t;let o=kn(e);return n?.values&&(o=Bl(o,n.values,this)),n?.referentialEqualities&&(o=Ul(o,n.referentialEqualities)),o}stringify(t){return JSON.stringify(this.serialize(t))}parse(t){return this.deserialize(JSON.parse(t))}registerClass(t,e){this.classRegistry.register(t,e)}registerSymbol(t,e){this.symbolRegistry.register(t,e)}registerCustom(t,e){this.customTransformerRegistry.register({name:e,...t})}allowErrorProps(...t){this.allowedErrorProps.push(...t)}};A.defaultInstance=new A,A.serialize=A.defaultInstance.serialize.bind(A.defaultInstance),A.deserialize=A.defaultInstance.deserialize.bind(A.defaultInstance),A.stringify=A.defaultInstance.stringify.bind(A.defaultInstance),A.parse=A.defaultInstance.parse.bind(A.defaultInstance),A.registerClass=A.defaultInstance.registerClass.bind(A.defaultInstance),A.registerSymbol=A.defaultInstance.registerSymbol.bind(A.defaultInstance),A.registerCustom=A.defaultInstance.registerCustom.bind(A.defaultInstance),A.allowErrorProps=A.defaultInstance.allowErrorProps.bind(A.defaultInstance),v(),v(),v(),v(),v(),v(),v(),v(),v(),v(),v(),v(),v(),v(),v(),v(),v(),v(),v(),v(),v(),v(),v();var zs;(zs=T).__VUE_DEVTOOLS_KIT_MESSAGE_CHANNELS__!=null||(zs.__VUE_DEVTOOLS_KIT_MESSAGE_CHANNELS__=[]);var Hs;(Hs=T).__VUE_DEVTOOLS_KIT_RPC_CLIENT__!=null||(Hs.__VUE_DEVTOOLS_KIT_RPC_CLIENT__=null);var Ks;(Ks=T).__VUE_DEVTOOLS_KIT_RPC_SERVER__!=null||(Ks.__VUE_DEVTOOLS_KIT_RPC_SERVER__=null);var Fs;(Fs=T).__VUE_DEVTOOLS_KIT_VITE_RPC_CLIENT__!=null||(Fs.__VUE_DEVTOOLS_KIT_VITE_RPC_CLIENT__=null);var Ws;(Ws=T).__VUE_DEVTOOLS_KIT_VITE_RPC_SERVER__!=null||(Ws.__VUE_DEVTOOLS_KIT_VITE_RPC_SERVER__=null);var Gs;(Gs=T).__VUE_DEVTOOLS_KIT_BROADCAST_RPC_SERVER__!=null||(Gs.__VUE_DEVTOOLS_KIT_BROADCAST_RPC_SERVER__=null),v(),v(),v(),v(),v(),v(),v();/*!
|
|
4
4
|
* pinia v3.0.3
|
|
5
5
|
* (c) 2025 Eduardo San Martin Morote
|
|
6
6
|
* @license MIT
|
|
7
|
-
*/let te;const ee=t=>te=t,
|
|
7
|
+
*/let te;const ee=t=>te=t,Js=process.env.NODE_ENV!=="production"?Symbol("pinia"):Symbol();function yt(t){return t&&typeof t=="object"&&Object.prototype.toString.call(t)==="[object Object]"&&typeof t.toJSON!="function"}var nt;(function(t){t.direct="direct",t.patchObject="patch object",t.patchFunction="patch function"})(nt||(nt={}));const dt=typeof window<"u",Ys=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 Gl(t,{autoBom:e=!1}={}){return e&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(t.type)?new Blob(["\uFEFF",t],{type:t.type}):t}function Sn(t,e,n){const o=new XMLHttpRequest;o.open("GET",t),o.responseType="blob",o.onload=function(){Zs(o.response,e,n)},o.onerror=function(){console.error("could not download file")},o.send()}function qs(t){const e=new XMLHttpRequest;e.open("HEAD",t,!1);try{e.send()}catch{}return e.status>=200&&e.status<=299}function be(t){try{t.dispatchEvent(new MouseEvent("click"))}catch{const e=new MouseEvent("click",{bubbles:!0,cancelable:!0,view:window,detail:0,screenX:80,screenY:20,clientX:80,clientY:20,ctrlKey:!1,altKey:!1,shiftKey:!1,metaKey:!1,button:0,relatedTarget:null});t.dispatchEvent(e)}}const ve=typeof navigator=="object"?navigator:{userAgent:""},Xs=/Macintosh/.test(ve.userAgent)&&/AppleWebKit/.test(ve.userAgent)&&!/Safari/.test(ve.userAgent),Zs=dt?typeof HTMLAnchorElement<"u"&&"download"in HTMLAnchorElement.prototype&&!Xs?Jl:"msSaveOrOpenBlob"in ve?Yl:ql:()=>{};function Jl(t,e="download",n){const o=document.createElement("a");o.download=e,o.rel="noopener",typeof t=="string"?(o.href=t,o.origin!==location.origin?qs(o.href)?Sn(t,e,n):(o.target="_blank",be(o)):be(o)):(o.href=URL.createObjectURL(t),setTimeout(function(){URL.revokeObjectURL(o.href)},4e4),setTimeout(function(){be(o)},0))}function Yl(t,e="download",n){if(typeof t=="string")if(qs(t))Sn(t,e,n);else{const o=document.createElement("a");o.href=t,o.target="_blank",setTimeout(function(){be(o)})}else navigator.msSaveOrOpenBlob(Gl(t,n),e)}function ql(t,e,n,o){if(o=o||open("","_blank"),o&&(o.document.title=o.document.body.innerText="downloading..."),typeof t=="string")return Sn(t,e,n);const s=t.type==="application/octet-stream",r=/constructor/i.test(String(Ys.HTMLElement))||"safari"in Ys,a=/CriOS\/[\d]+/.test(navigator.userAgent);if((a||s&&r||Xs)&&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=a?l:l.replace(/^data:[^;]*;/,"data:attachment/file;"),o?o.location.href=l:location.assign(l),o=null},c.readAsDataURL(t)}else{const c=URL.createObjectURL(t);o?o.location.assign(c):location.href=c,o=null,setTimeout(function(){URL.revokeObjectURL(c)},4e4)}}function z(t,e){const n="🍍 "+t;typeof __VUE_DEVTOOLS_TOAST__=="function"?__VUE_DEVTOOLS_TOAST__(n,e):e==="error"?console.error(n):e==="warn"?console.warn(n):console.log(n)}function On(t){return"_a"in t&&"install"in t}function Qs(){if(!("clipboard"in navigator))return z("Your browser doesn't support the Clipboard API","error"),!0}function tr(t){return t instanceof Error&&t.message.toLowerCase().includes("document is not focused")?(z('You need to activate the "Emulate a focused page" setting in the "Rendering" panel of devtools.',"warn"),!0):!1}async function Xl(t){if(!Qs())try{await navigator.clipboard.writeText(JSON.stringify(t.state.value)),z("Global state copied to clipboard.")}catch(e){if(tr(e))return;z("Failed to serialize the state. Check the console for more details.","error"),console.error(e)}}async function Zl(t){if(!Qs())try{er(t,JSON.parse(await navigator.clipboard.readText())),z("Global state pasted from clipboard.")}catch(e){if(tr(e))return;z("Failed to deserialize the state from clipboard. Check the console for more details.","error"),console.error(e)}}async function Ql(t){try{Zs(new Blob([JSON.stringify(t.state.value)],{type:"text/plain;charset=utf-8"}),"pinia-state.json")}catch(e){z("Failed to export the state as JSON. Check the console for more details.","error"),console.error(e)}}let st;function tu(){st||(st=document.createElement("input"),st.type="file",st.accept=".json");function t(){return new Promise((e,n)=>{st.onchange=async()=>{const o=st.files;if(!o)return e(null);const s=o.item(0);return e(s?{text:await s.text(),file:s}:null)},st.oncancel=()=>e(null),st.onerror=n,st.click()})}return t}async function eu(t){try{const e=await tu()();if(!e)return;const{text:n,file:o}=e;er(t,JSON.parse(n)),z(`Global state imported from "${o.name}".`)}catch(e){z("Failed to import the state from JSON. Check the console for more details.","error"),console.error(e)}}function er(t,e){for(const n in e){const o=t.state.value[n];o?Object.assign(o,e[n]):t.state.value[n]=e[n]}}function tt(t){return{_custom:{display:t}}}const nr="🍍 Pinia (root)",ke="_root";function nu(t){return On(t)?{id:ke,label:nr}:{id:t.$id,label:t.$id}}function ou(t){if(On(t)){const n=Array.from(t._s.keys()),o=t._s;return{state:n.map(s=>({editable:!0,key:s,value:t.state.value[s]})),getters:n.filter(s=>o.get(s)._getters).map(s=>{const r=o.get(s);return{editable:!1,key:s,value:r._getters.reduce((a,c)=>(a[c]=r[c],a),{})}})}}const e={state:Object.keys(t.$state).map(n=>({editable:!0,key:n,value:t.$state[n]}))};return t._getters&&t._getters.length&&(e.getters=t._getters.map(n=>({editable:!1,key:n,value:t[n]}))),t._customProperties.size&&(e.customProperties=Array.from(t._customProperties).map(n=>({editable:!0,key:n,value:t[n]}))),e}function su(t){return t?Array.isArray(t)?t.reduce((e,n)=>(e.keys.push(n.key),e.operations.push(n.type),e.oldValue[n.key]=n.oldValue,e.newValue[n.key]=n.newValue,e),{oldValue:{},keys:[],operations:[],newValue:{}}):{operation:tt(t.type),key:tt(t.key),oldValue:t.oldValue,newValue:t.newValue}:{}}function ru(t){switch(t){case nt.direct:return"mutation";case nt.patchFunction:return"$patch";case nt.patchObject:return"$patch";default:return"unknown"}}let At=!0;const Se=[],wt="pinia:mutations",K="pinia",{assign:iu}=Object,Oe=t=>"🍍 "+t;function au(t,e){ms({id:"dev.esm.pinia",label:"Pinia 🍍",logo:"https://pinia.vuejs.org/logo.svg",packageName:"pinia",homepage:"https://pinia.vuejs.org",componentStateTypes:Se,app:t},n=>{typeof n.now!="function"&&z("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:wt,label:"Pinia 🍍",color:15064968}),n.addInspector({id:K,label:"Pinia 🍍",icon:"storage",treeFilterPlaceholder:"Search stores",actions:[{icon:"content_copy",action:()=>{Xl(e)},tooltip:"Serialize and copy the state"},{icon:"content_paste",action:async()=>{await Zl(e),n.sendInspectorTree(K),n.sendInspectorState(K)},tooltip:"Replace the state with the content of your clipboard"},{icon:"save",action:()=>{Ql(e)},tooltip:"Save the state as a JSON file"},{icon:"folder_open",action:async()=>{await eu(e),n.sendInspectorTree(K),n.sendInspectorState(K)},tooltip:"Import the state from a JSON file"}],nodeActions:[{icon:"restore",tooltip:'Reset the state (with "$reset")',action:o=>{const s=e._s.get(o);s?typeof s.$reset!="function"?z(`Cannot reset "${o}" store because it doesn't have a "$reset" method implemented.`,"warn"):(s.$reset(),z(`Store "${o}" reset.`)):z(`Cannot reset "${o}" store because it wasn't found.`,"warn")}}]}),n.on.inspectComponent(o=>{const s=o.componentInstance&&o.componentInstance.proxy;if(s&&s._pStores){const r=o.componentInstance.proxy._pStores;Object.values(r).forEach(a=>{o.instanceData.state.push({type:Oe(a.$id),key:"state",editable:!0,value:a._isOptionsAPI?{_custom:{value:i.toRaw(a.$state),actions:[{icon:"restore",tooltip:"Reset the state of this store",action:()=>a.$reset()}]}}:Object.keys(a.$state).reduce((c,l)=>(c[l]=a.$state[l],c),{})}),a._getters&&a._getters.length&&o.instanceData.state.push({type:Oe(a.$id),key:"getters",editable:!1,value:a._getters.reduce((c,l)=>{try{c[l]=a[l]}catch(u){c[l]=u}return c},{})})})}}),n.on.getInspectorTree(o=>{if(o.app===t&&o.inspectorId===K){let s=[e];s=s.concat(Array.from(e._s.values())),o.rootNodes=(o.filter?s.filter(r=>"$id"in r?r.$id.toLowerCase().includes(o.filter.toLowerCase()):nr.toLowerCase().includes(o.filter.toLowerCase())):s).map(nu)}}),globalThis.$pinia=e,n.on.getInspectorState(o=>{if(o.app===t&&o.inspectorId===K){const s=o.nodeId===ke?e:e._s.get(o.nodeId);if(!s)return;s&&(o.nodeId!==ke&&(globalThis.$store=i.toRaw(s)),o.state=ou(s))}}),n.on.editInspectorState(o=>{if(o.app===t&&o.inspectorId===K){const s=o.nodeId===ke?e:e._s.get(o.nodeId);if(!s)return z(`store "${o.nodeId}" not found`,"error");const{path:r}=o;On(s)?r.unshift("state"):(r.length!==1||!s._customProperties.has(r[0])||r[0]in s.$state)&&r.unshift("$state"),At=!1,o.set(s,r,o.state.value),At=!0}}),n.on.editComponentState(o=>{if(o.type.startsWith("🍍")){const s=o.type.replace(/^🍍\s*/,""),r=e._s.get(s);if(!r)return z(`store "${s}" not found`,"error");const{path:a}=o;if(a[0]!=="state")return z(`Invalid path for store "${s}":
|
|
8
8
|
${a}
|
|
9
|
-
Only state can be modified.`);a[0]="$state",At=!1,o.set(r,a,o.state.value),At=!0}})})}function
|
|
9
|
+
Only state can be modified.`);a[0]="$state",At=!1,o.set(r,a,o.state.value),At=!0}})})}function cu(t,e){Se.includes(Oe(e.$id))||Se.push(Oe(e.$id)),ms({id:"dev.esm.pinia",label:"Pinia 🍍",logo:"https://pinia.vuejs.org/logo.svg",packageName:"pinia",homepage:"https://pinia.vuejs.org",componentStateTypes:Se,app:t,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;e.$onAction(({after:a,onError:c,name:l,args:u})=>{const h=or++;n.addTimelineEvent({layerId:wt,event:{time:o(),title:"🛫 "+l,subtitle:"start",data:{store:tt(e.$id),action:tt(l),args:u},groupId:h}}),a(f=>{ft=void 0,n.addTimelineEvent({layerId:wt,event:{time:o(),title:"🛬 "+l,subtitle:"end",data:{store:tt(e.$id),action:tt(l),args:u,result:f},groupId:h}})}),c(f=>{ft=void 0,n.addTimelineEvent({layerId:wt,event:{time:o(),logType:"error",title:"💥 "+l,subtitle:"end",data:{store:tt(e.$id),action:tt(l),args:u,error:f},groupId:h}})})},!0),e._customProperties.forEach(a=>{i.watch(()=>i.unref(e[a]),(c,l)=>{n.notifyComponentUpdate(),n.sendInspectorState(K),At&&n.addTimelineEvent({layerId:wt,event:{time:o(),title:"Change",subtitle:a,data:{newValue:c,oldValue:l},groupId:ft}})},{deep:!0})}),e.$subscribe(({events:a,type:c},l)=>{if(n.notifyComponentUpdate(),n.sendInspectorState(K),!At)return;const u={time:o(),title:ru(c),data:iu({store:tt(e.$id)},su(a)),groupId:ft};c===nt.patchFunction?u.subtitle="⤵️":c===nt.patchObject?u.subtitle="🧩":a&&!Array.isArray(a)&&(u.subtitle=a.type),a&&(u.data["rawEvent(s)"]={_custom:{display:"DebuggerEvent",type:"object",tooltip:"raw DebuggerEvent[]",value:a}}),n.addTimelineEvent({layerId:wt,event:u})},{detached:!0,flush:"sync"});const s=e._hotUpdate;e._hotUpdate=i.markRaw(a=>{s(a),n.addTimelineEvent({layerId:wt,event:{time:o(),title:"🔥 "+e.$id,subtitle:"HMR update",data:{store:tt(e.$id),info:tt("HMR update")}}}),n.notifyComponentUpdate(),n.sendInspectorTree(K),n.sendInspectorState(K)});const{$dispose:r}=e;e.$dispose=()=>{r(),n.notifyComponentUpdate(),n.sendInspectorTree(K),n.sendInspectorState(K),n.getSettings().logStoreChanges&&z(`Disposed "${e.$id}" store 🗑`)},n.notifyComponentUpdate(),n.sendInspectorTree(K),n.sendInspectorState(K),n.getSettings().logStoreChanges&&z(`"${e.$id}" store installed 🆕`)})}let or=0,ft;function sr(t,e,n){const o=e.reduce((s,r)=>(s[r]=i.toRaw(t)[r],s),{});for(const s in o)t[s]=function(){const r=or,a=n?new Proxy(t,{get(...l){return ft=r,Reflect.get(...l)},set(...l){return ft=r,Reflect.set(...l)}}):t;ft=r;const c=o[s].apply(a,arguments);return ft=void 0,c}}function lu({app:t,store:e,options:n}){if(!e.$id.startsWith("__hot:")){if(e._isOptionsAPI=!!n.state,!e._p._testing){sr(e,Object.keys(n.actions),e._isOptionsAPI);const o=e._hotUpdate;i.toRaw(e)._hotUpdate=function(s){o.apply(this,arguments),sr(e,Object.keys(s._hmrPayload.actions),!!e._isOptionsAPI)}}cu(t,e)}}function uu(){const t=i.effectScope(!0),e=t.run(()=>i.ref({}));let n=[],o=[];const s=i.markRaw({install(r){ee(s),s._a=r,r.provide(Js,s),r.config.globalProperties.$pinia=s,process.env.NODE_ENV!=="production"&&process.env.NODE_ENV!=="test"&&dt&&au(r,s),o.forEach(a=>n.push(a)),o=[]},use(r){return this._a?n.push(r):o.push(r),this},_p:n,_a:null,_e:t,_s:new Map,state:e});return process.env.NODE_ENV!=="production"&&process.env.NODE_ENV!=="test"&&dt&&typeof Proxy<"u"&&s.use(lu),s}function rr(t,e){for(const n in e){const o=e[n];if(!(n in t))continue;const s=t[n];yt(s)&&yt(o)&&!i.isRef(o)&&!i.isReactive(o)?t[n]=rr(s,o):t[n]=o}return t}const ir=()=>{};function ar(t,e,n,o=ir){t.push(e);const s=()=>{const r=t.indexOf(e);r>-1&&(t.splice(r,1),o())};return!n&&i.getCurrentScope()&&i.onScopeDispose(s),s}function Lt(t,...e){t.slice().forEach(n=>{n(...e)})}const du=t=>t(),cr=Symbol(),In=Symbol();function Tn(t,e){t instanceof Map&&e instanceof Map?e.forEach((n,o)=>t.set(o,n)):t instanceof Set&&e instanceof Set&&e.forEach(t.add,t);for(const n in e){if(!e.hasOwnProperty(n))continue;const o=e[n],s=t[n];yt(s)&&yt(o)&&t.hasOwnProperty(n)&&!i.isRef(o)&&!i.isReactive(o)?t[n]=Tn(s,o):t[n]=o}return t}const fu=process.env.NODE_ENV!=="production"?Symbol("pinia:skipHydration"):Symbol();function pu(t){return!yt(t)||!Object.prototype.hasOwnProperty.call(t,fu)}const{assign:Z}=Object;function lr(t){return!!(i.isRef(t)&&t.effect)}function ur(t,e,n,o){const{state:s,actions:r,getters:a}=e,c=n.state.value[t];let l;function u(){!c&&(process.env.NODE_ENV==="production"||!o)&&(n.state.value[t]=s?s():{});const h=process.env.NODE_ENV!=="production"&&o?i.toRefs(i.ref(s?s():{}).value):i.toRefs(n.state.value[t]);return Z(h,r,Object.keys(a||{}).reduce((f,d)=>(process.env.NODE_ENV!=="production"&&d in h&&console.warn(`[🍍]: A getter cannot have the same name as another state property. Rename one of them. Found with "${d}" in store "${t}".`),f[d]=i.markRaw(i.computed(()=>{ee(n);const p=n._s.get(t);return a[d].call(p,p)})),f),{}))}return l=xn(t,u,e,n,o,!0),l}function xn(t,e,n={},o,s,r){let a;const c=Z({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"&&(l.onTrigger=I=>{u?p=I:u==!1&&!k._hotUpdating&&(Array.isArray(p)?p.push(I):console.error("🍍 debuggerEvents should be an array. This is most likely an internal Pinia bug."))});let u,h,f=[],d=[],p;const m=o.state.value[t];!r&&!m&&(process.env.NODE_ENV==="production"||!s)&&(o.state.value[t]={});const y=i.ref({});let g;function w(I){let E;u=h=!1,process.env.NODE_ENV!=="production"&&(p=[]),typeof I=="function"?(I(o.state.value[t]),E={type:nt.patchFunction,storeId:t,events:p}):(Tn(o.state.value[t],I),E={type:nt.patchObject,payload:I,storeId:t,events:p});const S=g=Symbol();i.nextTick().then(()=>{g===S&&(u=!0)}),h=!0,Lt(f,E,o.state.value[t])}const O=r?function(){const{state:I}=n,E=I?I():{};this.$patch(S=>{Z(S,E)})}:process.env.NODE_ENV!=="production"?()=>{throw new Error(`🍍: Store "${t}" is built using the setup syntax and does not implement $reset().`)}:ir;function V(){a.stop(),f=[],d=[],o._s.delete(t)}const R=(I,E="")=>{if(cr in I)return I[In]=E,I;const S=function(){ee(o);const N=Array.from(arguments),D=[],J=[];function H(_){D.push(_)}function C(_){J.push(_)}Lt(d,{args:N,name:S[In],store:k,after:H,onError:C});let W;try{W=I.apply(this&&this.$id===t?this:k,N)}catch(_){throw Lt(J,_),_}return W instanceof Promise?W.then(_=>(Lt(D,_),_)).catch(_=>(Lt(J,_),Promise.reject(_))):(Lt(D,W),W)};return S[cr]=!0,S[In]=E,S},j=i.markRaw({actions:{},getters:{},state:[],hotState:y}),q={_p:o,$id:t,$onAction:ar.bind(null,d),$patch:w,$reset:O,$subscribe(I,E={}){const S=ar(f,I,E.detached,()=>N()),N=a.run(()=>i.watch(()=>o.state.value[t],D=>{(E.flush==="sync"?h:u)&&I({storeId:t,type:nt.direct,events:p},D)},Z({},l,E)));return S},$dispose:V},k=i.reactive(process.env.NODE_ENV!=="production"||process.env.NODE_ENV!=="production"&&process.env.NODE_ENV!=="test"&&dt?Z({_hmrPayload:j,_customProperties:i.markRaw(new Set)},q):q);o._s.set(t,k);const M=(o._a&&o._a.runWithContext||du)(()=>o._e.run(()=>(a=i.effectScope()).run(()=>e({action:R}))));for(const I in M){const E=M[I];if(i.isRef(E)&&!lr(E)||i.isReactive(E))process.env.NODE_ENV!=="production"&&s?y.value[I]=i.toRef(M,I):r||(m&&pu(E)&&(i.isRef(E)?E.value=m[I]:Tn(E,m[I])),o.state.value[t][I]=E),process.env.NODE_ENV!=="production"&&j.state.push(I);else if(typeof E=="function"){const S=process.env.NODE_ENV!=="production"&&s?E:R(E,I);M[I]=S,process.env.NODE_ENV!=="production"&&(j.actions[I]=E),c.actions[I]=E}else process.env.NODE_ENV!=="production"&&lr(E)&&(j.getters[I]=r?n.getters[I]:E,dt&&(M._getters||(M._getters=i.markRaw([]))).push(I))}if(Z(k,M),Z(i.toRaw(k),M),Object.defineProperty(k,"$state",{get:()=>process.env.NODE_ENV!=="production"&&s?y.value:o.state.value[t],set:I=>{if(process.env.NODE_ENV!=="production"&&s)throw new Error("cannot set hotState");w(E=>{Z(E,I)})}}),process.env.NODE_ENV!=="production"&&(k._hotUpdate=i.markRaw(I=>{k._hotUpdating=!0,I._hmrPayload.state.forEach(E=>{if(E in k.$state){const S=I.$state[E],N=k.$state[E];typeof S=="object"&&yt(S)&&yt(N)?rr(S,N):I.$state[E]=N}k[E]=i.toRef(I.$state,E)}),Object.keys(k.$state).forEach(E=>{E in I.$state||delete k[E]}),u=!1,h=!1,o.state.value[t]=i.toRef(I._hmrPayload,"hotState"),h=!0,i.nextTick().then(()=>{u=!0});for(const E in I._hmrPayload.actions){const S=I[E];k[E]=R(S,E)}for(const E in I._hmrPayload.getters){const S=I._hmrPayload.getters[E],N=r?i.computed(()=>(ee(o),S.call(k,k))):S;k[E]=N}Object.keys(k._hmrPayload.getters).forEach(E=>{E in I._hmrPayload.getters||delete k[E]}),Object.keys(k._hmrPayload.actions).forEach(E=>{E in I._hmrPayload.actions||delete k[E]}),k._hmrPayload=I._hmrPayload,k._getters=I._getters,k._hotUpdating=!1})),process.env.NODE_ENV!=="production"&&process.env.NODE_ENV!=="test"&&dt){const I={writable:!0,configurable:!0,enumerable:!1};["_p","_hmrPayload","_getters","_customProperties"].forEach(E=>{Object.defineProperty(k,E,Z({value:k[E]},I))})}return o._p.forEach(I=>{if(process.env.NODE_ENV!=="production"&&process.env.NODE_ENV!=="test"&&dt){const E=a.run(()=>I({store:k,app:o._a,pinia:o,options:c}));Object.keys(E||{}).forEach(S=>k._customProperties.add(S)),Z(k,E)}else Z(k,a.run(()=>I({store:k,app:o._a,pinia:o,options:c})))}),process.env.NODE_ENV!=="production"&&k.$state&&typeof k.$state=="object"&&typeof k.$state.constructor=="function"&&!k.$state.constructor.toString().includes("[native code]")&&console.warn(`[🍍]: The "state" must be a plain object. It cannot be
|
|
10
10
|
state: () => new MyClass()
|
|
11
|
-
Found in store "${k.$id}".`),m&&r&&n.hydrate&&n.hydrate(k.$state,m),u=!0,h=!0,k}/*! #__NO_SIDE_EFFECTS__ */function
|
|
11
|
+
Found in store "${k.$id}".`),m&&r&&n.hydrate&&n.hydrate(k.$state,m),u=!0,h=!0,k}/*! #__NO_SIDE_EFFECTS__ */function hu(t,e,n){let o;const s=typeof e=="function";o=s?n:e;function r(a,c){const l=i.hasInjectionContext();if(a=(process.env.NODE_ENV==="test"&&te&&te._testing?null:a)||(l?i.inject(Js,null):null),a&&ee(a),process.env.NODE_ENV!=="production"&&!te)throw new Error(`[🍍]: "getActivePinia()" was called but there was no active Pinia. Are you trying to use a store before calling "app.use(pinia)"?
|
|
12
12
|
See https://pinia.vuejs.org/core-concepts/outside-component-usage.html for help.
|
|
13
|
-
This will fail in production.`);a=te,a._s.has(t)||(s?Tn(t,e,o,a):lr(t,o,a),process.env.NODE_ENV!=="production"&&(r._pinia=a));const u=a._s.get(t);if(process.env.NODE_ENV!=="production"&&c){const h="__hot:"+t,f=s?Tn(h,e,o,a,!0):lr(h,X({},o),a,!0);c._hotUpdate(f),delete a.state.value[h],a._s.delete(h)}if(process.env.NODE_ENV!=="production"&&ut){const h=i.getCurrentInstance();if(h&&h.proxy&&!c){const f=h.proxy,d="_pStores"in f?f._pStores:f._pStores={};d[t]=u}}return u}return r.$id=t,r}const hu=pu("data",()=>{const t=i.ref([]),e=i.ref({});return{records:t,record:e}});function ur(t){const e=i.ref();return i.onMounted(async()=>{if(t||(t=i.inject("$registry")),!t||!t.router)return;let n;try{n=hu()}catch{throw new Error("Please enable the Stonecrop plugin before using the Stonecrop composable")}e.value=new Ua(t,n);const o=t.router.currentRoute.value,s=o.params.records?.toString().toLowerCase(),r=o.params.record?.toString().toLowerCase();if(!s&&!r)return;const a=await t.getMeta?.(s);a&&(t.addDoctype(a),e.value.setup(a),s&&(r?await e.value.getRecord(a,r):await e.value.getRecords(a)),e.value.runAction(a,"load",r?[r]:void 0))}),{stonecrop:e}}function mu(t){return t&&typeof t.then=="function"}Promise.resolve(!1),Promise.resolve(!0);var jt=Promise.resolve();function dr(t,e){return t||(t=0),new Promise(function(n){return setTimeout(function(){return n(e)},t)})}function gu(t,e){return Math.floor(Math.random()*(e-t+1)+t)}function xn(){return Math.random().toString(36).substring(2)}var Vn=0;function ne(){var t=Date.now()*1e3;return t<=Vn&&(t=Vn+1),Vn=t,t}var _u=ne,yu="native";function wu(t){var e={time:ne(),messagesCallback:null,bc:new BroadcastChannel(t),subFns:[]};return e.bc.onmessage=function(n){e.messagesCallback&&e.messagesCallback(n.data)},e}function Eu(t){t.bc.close(),t.subFns=[]}function bu(t,e){try{return t.bc.postMessage(e,!1),jt}catch(n){return Promise.reject(n)}}function vu(t,e){t.messagesCallback=e}function ku(){if(typeof globalThis<"u"&&globalThis.Deno&&globalThis.Deno.args)return!0;if((typeof window<"u"||typeof self<"u")&&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 Su(){return 150}var Ou={create:wu,close:Eu,onMessage:vu,postMessage:bu,canBeUsed:ku,type:yu,averageResponseTime:Su,microSeconds:_u};class fr{ttl;map=new Map;_to=!1;constructor(e){this.ttl=e}has(e){return this.map.has(e)}add(e){this.map.set(e,pr()),this._to||(this._to=!0,setTimeout(()=>{this._to=!1,Iu(this)},0))}clear(){this.map.clear()}}function Iu(t){const e=pr()-t.ttl,n=t.map[Symbol.iterator]();for(;;){const o=n.next().value;if(!o)return;const s=o[0];if(o[1]<e)t.map.delete(s);else return}}function pr(){return Date.now()}function Nn(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},e=JSON.parse(JSON.stringify(t));return typeof e.webWorkerSupport>"u"&&(e.webWorkerSupport=!0),e.idb||(e.idb={}),e.idb.ttl||(e.idb.ttl=1e3*45),e.idb.fallbackInterval||(e.idb.fallbackInterval=150),t.idb&&typeof t.idb.onclose=="function"&&(e.idb.onclose=t.idb.onclose),e.localstorage||(e.localstorage={}),e.localstorage.removeTimeout||(e.localstorage.removeTimeout=1e3*60),t.methods&&(e.methods=t.methods),e.node||(e.node={}),e.node.ttl||(e.node.ttl=1e3*60*2),e.node.maxParallelWrites||(e.node.maxParallelWrites=2048),typeof e.node.useFastPath>"u"&&(e.node.useFastPath=!0),e}var Tu=ne,xu="pubkey.broadcast-channel-0-",st="messages",Oe={durability:"relaxed"},Vu="idb";function hr(){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 Cn(t){t.commit&&t.commit()}function Nu(t){var e=hr(),n=xu+t,o=e.open(n);return o.onupgradeneeded=function(s){var r=s.target.result;r.createObjectStore(st,{keyPath:"id",autoIncrement:!0})},new Promise(function(s,r){o.onerror=function(a){return r(a)},o.onsuccess=function(){s(o.result)}})}function Cu(t,e,n){var o=Date.now(),s={uuid:e,time:o,data:n},r=t.transaction([st],"readwrite",Oe);return new Promise(function(a,c){r.oncomplete=function(){return a()},r.onerror=function(u){return c(u)};var l=r.objectStore(st);l.add(s),Cn(r)})}function $u(t,e){var n=t.transaction(st,"readonly",Oe),o=n.objectStore(st),s=[],r=IDBKeyRange.bound(e+1,1/0);if(o.getAll){var a=o.getAll(r);return new Promise(function(l,u){a.onerror=function(h){return u(h)},a.onsuccess=function(h){l(h.target.result)}})}function c(){try{return r=IDBKeyRange.bound(e+1,1/0),o.openCursor(r)}catch{return o.openCursor()}}return new Promise(function(l,u){var h=c();h.onerror=function(f){return u(f)},h.onsuccess=function(f){var d=f.target.result;d?d.value.id<e+1?d.continue(e+1):(s.push(d.value),d.continue()):(Cn(n),l(s))}})}function Pu(t,e){if(t.closed)return Promise.resolve([]);var n=t.db.transaction(st,"readwrite",Oe),o=n.objectStore(st);return Promise.all(e.map(function(s){var r=o.delete(s);return new Promise(function(a){r.onsuccess=function(){return a()}})}))}function Ru(t,e){var n=Date.now()-e,o=t.transaction(st,"readonly",Oe),s=o.objectStore(st),r=[];return new Promise(function(a){s.openCursor().onsuccess=function(c){var l=c.target.result;if(l){var u=l.value;u.time<n?(r.push(u),l.continue()):(Cn(o),a(r))}else a(r)}})}function Du(t){return Ru(t.db,t.options.idb.ttl).then(function(e){return Pu(t,e.map(function(n){return n.id}))})}function Au(t,e){return e=Nn(e),Nu(t).then(function(n){var o={closed:!1,lastCursorId:0,channelName:t,options:e,uuid:xn(),eMIs:new fr(e.idb.ttl*2),writeBlockPromise:jt,messagesCallback:null,readQueuePromises:[],db:n};return n.onclose=function(){o.closed=!0,e.idb.onclose&&e.idb.onclose()},mr(o),o})}function mr(t){t.closed||gr(t).then(function(){return dr(t.options.idb.fallbackInterval)}).then(function(){return mr(t)})}function Lu(t,e){return!(t.uuid===e.uuid||e.eMIs.has(t.id)||t.data.time<e.messagesCallbackTime)}function gr(t){return t.closed||!t.messagesCallback?jt:$u(t.db,t.lastCursorId).then(function(e){var n=e.filter(function(o){return!!o}).map(function(o){return o.id>t.lastCursorId&&(t.lastCursorId=o.id),o}).filter(function(o){return Lu(o,t)}).sort(function(o,s){return o.time-s.time});return n.forEach(function(o){t.messagesCallback&&(t.eMIs.add(o.id),t.messagesCallback(o.data))}),jt})}function ju(t){t.closed=!0,t.db.close()}function Mu(t,e){return t.writeBlockPromise=t.writeBlockPromise.then(function(){return Cu(t.db,t.uuid,e)}).then(function(){gu(0,10)===0&&Du(t)}),t.writeBlockPromise}function Bu(t,e,n){t.messagesCallbackTime=n,t.messagesCallback=e,gr(t)}function Uu(){return!!hr()}function zu(t){return t.idb.fallbackInterval*2}var Hu={create:Au,close:ju,onMessage:Bu,postMessage:Mu,canBeUsed:Uu,type:Vu,averageResponseTime:zu,microSeconds:Tu},Ku=ne,Fu="pubkey.broadcastChannel-",Wu="localstorage";function _r(){var t;if(typeof window>"u")return null;try{t=window.localStorage,t=window["ie8-eventlistener/storage"]||window.localStorage}catch{}return t}function yr(t){return Fu+t}function Gu(t,e){return new Promise(function(n){dr().then(function(){var o=yr(t.channelName),s={token:xn(),time:Date.now(),data:e,uuid:t.uuid},r=JSON.stringify(s);_r().setItem(o,r);var a=document.createEvent("Event");a.initEvent("storage",!0,!0),a.key=o,a.newValue=r,window.dispatchEvent(a),n()})})}function Ju(t,e){var n=yr(t),o=function(s){s.key===n&&e(JSON.parse(s.newValue))};return window.addEventListener("storage",o),o}function Yu(t){window.removeEventListener("storage",t)}function qu(t,e){if(e=Nn(e),!wr())throw new Error("BroadcastChannel: localstorage cannot be used");var n=xn(),o=new fr(e.localstorage.removeTimeout),s={channelName:t,uuid:n,eMIs:o};return s.listener=Ju(t,function(r){s.messagesCallback&&r.uuid!==n&&(!r.token||o.has(r.token)||r.data.time&&r.data.time<s.messagesCallbackTime||(o.add(r.token),s.messagesCallback(r.data)))}),s}function Xu(t){Yu(t.listener)}function Zu(t,e,n){t.messagesCallbackTime=n,t.messagesCallback=e}function wr(){var t=_r();if(!t)return!1;try{var e="__broadcastchannel_check";t.setItem(e,"works"),t.removeItem(e)}catch{return!1}return!0}function Qu(){var t=120,e=navigator.userAgent.toLowerCase();return e.includes("safari")&&!e.includes("chrome")?t*2:t}var td={create:qu,close:Xu,onMessage:Zu,postMessage:Gu,canBeUsed:wr,type:Wu,averageResponseTime:Qu,microSeconds:Ku},Er=ne,ed="simulate",$n=new Set;function nd(t){var e={time:Er(),name:t,messagesCallback:null};return $n.add(e),e}function od(t){$n.delete(t)}var br=5;function sd(t,e){return new Promise(function(n){return setTimeout(function(){var o=Array.from($n);o.forEach(function(s){s.name===t.name&&s!==t&&s.messagesCallback&&s.time<e.time&&s.messagesCallback(e)}),n()},br)})}function rd(t,e){t.messagesCallback=e}function id(){return!0}function ad(){return br}var cd={create:nd,close:od,onMessage:rd,postMessage:sd,canBeUsed:id,type:ed,averageResponseTime:ad,microSeconds:Er},vr=[Ou,Hu,td];function ld(t){var e=[].concat(t.methods,vr).filter(Boolean);if(t.type){if(t.type==="simulate")return cd;var n=e.find(function(s){return s.type===t.type});if(n)return n;throw new Error("method-type "+t.type+" not found")}t.webWorkerSupport||(e=e.filter(function(s){return s.type!=="idb"}));var o=e.find(function(s){return s.canBeUsed()});if(o)return o;throw new Error("No usable method found in "+JSON.stringify(vr.map(function(s){return s.type})))}var kr=new Set,ud=0,Pn=function(t,e){this.id=ud++,kr.add(this),this.name=t,this.options=Nn(e),this.method=ld(this.options),this._iL=!1,this._onML=null,this._addEL={message:[],internal:[]},this._uMP=new Set,this._befC=[],this._prepP=null,dd(this)};Pn._pubkey=!0,Pn.prototype={postMessage:function(t){if(this.closed)throw new Error("BroadcastChannel.postMessage(): Cannot post message after channel has closed "+JSON.stringify(t));return Sr(this,"message",t)},postInternal:function(t){return Sr(this,"internal",t)},set onmessage(t){var e=this.method.microSeconds(),n={time:e,fn:t};Tr(this,"message",this._onML),t&&typeof t=="function"?(this._onML=n,Ir(this,"message",n)):this._onML=null},addEventListener:function(t,e){var n=this.method.microSeconds(),o={time:n,fn:e};Ir(this,t,o)},removeEventListener:function(t,e){var n=this._addEL[t].find(function(o){return o.fn===e});Tr(this,t,n)},close:function(){var t=this;if(!this.closed){kr.delete(this),this.closed=!0;var e=this._prepP?this._prepP:jt;return this._onML=null,this._addEL.message=[],e.then(function(){return Promise.all(Array.from(t._uMP))}).then(function(){return Promise.all(t._befC.map(function(n){return n()}))}).then(function(){return t.method.close(t._state)})}},get type(){return this.method.type},get isClosed(){return this.closed}};function Sr(t,e,n){var o=t.method.microSeconds(),s={time:o,type:e,data:n},r=t._prepP?t._prepP:jt;return r.then(function(){var a=t.method.postMessage(t._state,s);return t._uMP.add(a),a.catch().then(function(){return t._uMP.delete(a)}),a})}function dd(t){var e=t.method.create(t.name,t.options);mu(e)?(t._prepP=e,e.then(function(n){t._state=n})):t._state=e}function Or(t){return t._addEL.message.length>0||t._addEL.internal.length>0}function Ir(t,e,n){t._addEL[e].push(n),fd(t)}function Tr(t,e,n){t._addEL[e]=t._addEL[e].filter(function(o){return o!==n}),pd(t)}function fd(t){if(!t._iL&&Or(t)){var e=function(o){t._addEL[o.type].forEach(function(s){o.time>=s.time&&s.fn(o.data)})},n=t.method.microSeconds();t._prepP?t._prepP.then(function(){t._iL=!0,t.method.onMessage(t._state,e,n)}):(t._iL=!0,t.method.onMessage(t._state,e,n))}}function pd(t){if(t._iL&&!Or(t)){t._iL=!1;var e=t.method.microSeconds();t.method.onMessage(t._state,null,e)}}function xr(t,e={serialize:JSON.stringify,deserialize:JSON.parse}){return e.deserialize(e.serialize(t))}function hd(t,e){return Object.keys(e).includes(t)}function md({enable:t=!0,initialize:e=!0,type:n,serializer:o}){return({store:s,options:r})=>{const a=r?.share?.enable??t,c=r?.share?.omit??[];if(!a)return;const l=new Pn(s.$id,{type:n});let u=0,h=!1;const f=Object.keys(s.$state).filter(d=>!c.includes(d)&&hd(d,s.$state));l.onmessage=d=>{if(d===void 0){l.postMessage({timestamp:u,state:xr(s.$state,o)});return}d.timestamp<=u||(h=!0,u=d.timestamp,s.$patch(p=>{f.forEach(m=>{p[m]=d.state[m]})}))},(r?.share?.initialize??e)&&l.postMessage(void 0),s.$subscribe((d,p)=>{h||(u=Date.now(),l.postMessage({timestamp:u,state:xr(p,o)})),h=!1})}}lu().use(md({enable:!0,initialize:!0}));const Vr=i.defineComponent({__name:"Doctype",setup(t){const{stonecrop:e}=ur(),n=i.ref([]);return i.watch(e,()=>{if(e.value){let o=e.value.schema?.schema.toArray();o||(o=[]),o.forEach((s,r)=>{const c=e.value?.store.record?.[s.fieldname];o[r].value=c}),n.value=o}}),(o,s)=>(i.openBlock(),i.createBlock(i.unref(Pi),{class:"aform-main",modelValue:n.value,"onUpdate:modelValue":s[0]||(s[0]=r=>n.value=r)},null,8,["modelValue"]))}});/*!
|
|
13
|
+
This will fail in production.`);a=te,a._s.has(t)||(s?xn(t,e,o,a):ur(t,o,a),process.env.NODE_ENV!=="production"&&(r._pinia=a));const u=a._s.get(t);if(process.env.NODE_ENV!=="production"&&c){const h="__hot:"+t,f=s?xn(h,e,o,a,!0):ur(h,Z({},o),a,!0);c._hotUpdate(f),delete a.state.value[h],a._s.delete(h)}if(process.env.NODE_ENV!=="production"&&dt){const h=i.getCurrentInstance();if(h&&h.proxy&&!c){const f=h.proxy,d="_pStores"in f?f._pStores:f._pStores={};d[t]=u}}return u}return r.$id=t,r}const mu=hu("data",()=>{const t=i.ref([]),e=i.ref({});return{records:t,record:e}});function dr(t){const e=i.ref();return i.onMounted(async()=>{if(t||(t=i.inject("$registry")),!t||!t.router)return;let n;try{n=mu()}catch{throw new Error("Please enable the Stonecrop plugin before using the Stonecrop composable")}e.value=new za(t,n);const o=t.router.currentRoute.value,s=o.params.records?.toString().toLowerCase(),r=o.params.record?.toString().toLowerCase();if(!s&&!r)return;const a=await t.getMeta?.(s);a&&(t.addDoctype(a),e.value.setup(a),s&&(r?await e.value.getRecord(a,r):await e.value.getRecords(a)),e.value.runAction(a,"load",r?[r]:void 0))}),{stonecrop:e}}function gu(t){return t&&typeof t.then=="function"}Promise.resolve(!1),Promise.resolve(!0);var jt=Promise.resolve();function fr(t,e){return t||(t=0),new Promise(function(n){return setTimeout(function(){return n(e)},t)})}function _u(t,e){return Math.floor(Math.random()*(e-t+1)+t)}function Vn(){return Math.random().toString(36).substring(2)}var Nn=0;function ne(){var t=Date.now()*1e3;return t<=Nn&&(t=Nn+1),Nn=t,t}var yu=ne,wu="native";function Eu(t){var e={time:ne(),messagesCallback:null,bc:new BroadcastChannel(t),subFns:[]};return e.bc.onmessage=function(n){e.messagesCallback&&e.messagesCallback(n.data)},e}function bu(t){t.bc.close(),t.subFns=[]}function vu(t,e){try{return t.bc.postMessage(e,!1),jt}catch(n){return Promise.reject(n)}}function ku(t,e){t.messagesCallback=e}function Su(){if(typeof globalThis<"u"&&globalThis.Deno&&globalThis.Deno.args)return!0;if((typeof window<"u"||typeof self<"u")&&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 Ou(){return 150}var Iu={create:Eu,close:bu,onMessage:ku,postMessage:vu,canBeUsed:Su,type:wu,averageResponseTime:Ou,microSeconds:yu};class pr{ttl;map=new Map;_to=!1;constructor(e){this.ttl=e}has(e){return this.map.has(e)}add(e){this.map.set(e,hr()),this._to||(this._to=!0,setTimeout(()=>{this._to=!1,Tu(this)},0))}clear(){this.map.clear()}}function Tu(t){const e=hr()-t.ttl,n=t.map[Symbol.iterator]();for(;;){const o=n.next().value;if(!o)return;const s=o[0];if(o[1]<e)t.map.delete(s);else return}}function hr(){return Date.now()}function Cn(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},e=JSON.parse(JSON.stringify(t));return typeof e.webWorkerSupport>"u"&&(e.webWorkerSupport=!0),e.idb||(e.idb={}),e.idb.ttl||(e.idb.ttl=1e3*45),e.idb.fallbackInterval||(e.idb.fallbackInterval=150),t.idb&&typeof t.idb.onclose=="function"&&(e.idb.onclose=t.idb.onclose),e.localstorage||(e.localstorage={}),e.localstorage.removeTimeout||(e.localstorage.removeTimeout=1e3*60),t.methods&&(e.methods=t.methods),e.node||(e.node={}),e.node.ttl||(e.node.ttl=1e3*60*2),e.node.maxParallelWrites||(e.node.maxParallelWrites=2048),typeof e.node.useFastPath>"u"&&(e.node.useFastPath=!0),e}var xu=ne,Vu="pubkey.broadcast-channel-0-",rt="messages",Ie={durability:"relaxed"},Nu="idb";function mr(){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 $n(t){t.commit&&t.commit()}function Cu(t){var e=mr(),n=Vu+t,o=e.open(n);return o.onupgradeneeded=function(s){var r=s.target.result;r.createObjectStore(rt,{keyPath:"id",autoIncrement:!0})},new Promise(function(s,r){o.onerror=function(a){return r(a)},o.onsuccess=function(){s(o.result)}})}function $u(t,e,n){var o=Date.now(),s={uuid:e,time:o,data:n},r=t.transaction([rt],"readwrite",Ie);return new Promise(function(a,c){r.oncomplete=function(){return a()},r.onerror=function(u){return c(u)};var l=r.objectStore(rt);l.add(s),$n(r)})}function Pu(t,e){var n=t.transaction(rt,"readonly",Ie),o=n.objectStore(rt),s=[],r=IDBKeyRange.bound(e+1,1/0);if(o.getAll){var a=o.getAll(r);return new Promise(function(l,u){a.onerror=function(h){return u(h)},a.onsuccess=function(h){l(h.target.result)}})}function c(){try{return r=IDBKeyRange.bound(e+1,1/0),o.openCursor(r)}catch{return o.openCursor()}}return new Promise(function(l,u){var h=c();h.onerror=function(f){return u(f)},h.onsuccess=function(f){var d=f.target.result;d?d.value.id<e+1?d.continue(e+1):(s.push(d.value),d.continue()):($n(n),l(s))}})}function Ru(t,e){if(t.closed)return Promise.resolve([]);var n=t.db.transaction(rt,"readwrite",Ie),o=n.objectStore(rt);return Promise.all(e.map(function(s){var r=o.delete(s);return new Promise(function(a){r.onsuccess=function(){return a()}})}))}function Du(t,e){var n=Date.now()-e,o=t.transaction(rt,"readonly",Ie),s=o.objectStore(rt),r=[];return new Promise(function(a){s.openCursor().onsuccess=function(c){var l=c.target.result;if(l){var u=l.value;u.time<n?(r.push(u),l.continue()):($n(o),a(r))}else a(r)}})}function Au(t){return Du(t.db,t.options.idb.ttl).then(function(e){return Ru(t,e.map(function(n){return n.id}))})}function Lu(t,e){return e=Cn(e),Cu(t).then(function(n){var o={closed:!1,lastCursorId:0,channelName:t,options:e,uuid:Vn(),eMIs:new pr(e.idb.ttl*2),writeBlockPromise:jt,messagesCallback:null,readQueuePromises:[],db:n};return n.onclose=function(){o.closed=!0,e.idb.onclose&&e.idb.onclose()},gr(o),o})}function gr(t){t.closed||_r(t).then(function(){return fr(t.options.idb.fallbackInterval)}).then(function(){return gr(t)})}function ju(t,e){return!(t.uuid===e.uuid||e.eMIs.has(t.id)||t.data.time<e.messagesCallbackTime)}function _r(t){return t.closed||!t.messagesCallback?jt:Pu(t.db,t.lastCursorId).then(function(e){var n=e.filter(function(o){return!!o}).map(function(o){return o.id>t.lastCursorId&&(t.lastCursorId=o.id),o}).filter(function(o){return ju(o,t)}).sort(function(o,s){return o.time-s.time});return n.forEach(function(o){t.messagesCallback&&(t.eMIs.add(o.id),t.messagesCallback(o.data))}),jt})}function Mu(t){t.closed=!0,t.db.close()}function Bu(t,e){return t.writeBlockPromise=t.writeBlockPromise.then(function(){return $u(t.db,t.uuid,e)}).then(function(){_u(0,10)===0&&Au(t)}),t.writeBlockPromise}function Uu(t,e,n){t.messagesCallbackTime=n,t.messagesCallback=e,_r(t)}function zu(){return!!mr()}function Hu(t){return t.idb.fallbackInterval*2}var Ku={create:Lu,close:Mu,onMessage:Uu,postMessage:Bu,canBeUsed:zu,type:Nu,averageResponseTime:Hu,microSeconds:xu},Fu=ne,Wu="pubkey.broadcastChannel-",Gu="localstorage";function yr(){var t;if(typeof window>"u")return null;try{t=window.localStorage,t=window["ie8-eventlistener/storage"]||window.localStorage}catch{}return t}function wr(t){return Wu+t}function Ju(t,e){return new Promise(function(n){fr().then(function(){var o=wr(t.channelName),s={token:Vn(),time:Date.now(),data:e,uuid:t.uuid},r=JSON.stringify(s);yr().setItem(o,r);var a=document.createEvent("Event");a.initEvent("storage",!0,!0),a.key=o,a.newValue=r,window.dispatchEvent(a),n()})})}function Yu(t,e){var n=wr(t),o=function(s){s.key===n&&e(JSON.parse(s.newValue))};return window.addEventListener("storage",o),o}function qu(t){window.removeEventListener("storage",t)}function Xu(t,e){if(e=Cn(e),!Er())throw new Error("BroadcastChannel: localstorage cannot be used");var n=Vn(),o=new pr(e.localstorage.removeTimeout),s={channelName:t,uuid:n,eMIs:o};return s.listener=Yu(t,function(r){s.messagesCallback&&r.uuid!==n&&(!r.token||o.has(r.token)||r.data.time&&r.data.time<s.messagesCallbackTime||(o.add(r.token),s.messagesCallback(r.data)))}),s}function Zu(t){qu(t.listener)}function Qu(t,e,n){t.messagesCallbackTime=n,t.messagesCallback=e}function Er(){var t=yr();if(!t)return!1;try{var e="__broadcastchannel_check";t.setItem(e,"works"),t.removeItem(e)}catch{return!1}return!0}function td(){var t=120,e=navigator.userAgent.toLowerCase();return e.includes("safari")&&!e.includes("chrome")?t*2:t}var ed={create:Xu,close:Zu,onMessage:Qu,postMessage:Ju,canBeUsed:Er,type:Gu,averageResponseTime:td,microSeconds:Fu},br=ne,nd="simulate",Pn=new Set;function od(t){var e={time:br(),name:t,messagesCallback:null};return Pn.add(e),e}function sd(t){Pn.delete(t)}var vr=5;function rd(t,e){return new Promise(function(n){return setTimeout(function(){var o=Array.from(Pn);o.forEach(function(s){s.name===t.name&&s!==t&&s.messagesCallback&&s.time<e.time&&s.messagesCallback(e)}),n()},vr)})}function id(t,e){t.messagesCallback=e}function ad(){return!0}function cd(){return vr}var ld={create:od,close:sd,onMessage:id,postMessage:rd,canBeUsed:ad,type:nd,averageResponseTime:cd,microSeconds:br},kr=[Iu,Ku,ed];function ud(t){var e=[].concat(t.methods,kr).filter(Boolean);if(t.type){if(t.type==="simulate")return ld;var n=e.find(function(s){return s.type===t.type});if(n)return n;throw new Error("method-type "+t.type+" not found")}t.webWorkerSupport||(e=e.filter(function(s){return s.type!=="idb"}));var o=e.find(function(s){return s.canBeUsed()});if(o)return o;throw new Error("No usable method found in "+JSON.stringify(kr.map(function(s){return s.type})))}var Sr=new Set,dd=0,Rn=function(t,e){this.id=dd++,Sr.add(this),this.name=t,this.options=Cn(e),this.method=ud(this.options),this._iL=!1,this._onML=null,this._addEL={message:[],internal:[]},this._uMP=new Set,this._befC=[],this._prepP=null,fd(this)};Rn._pubkey=!0,Rn.prototype={postMessage:function(t){if(this.closed)throw new Error("BroadcastChannel.postMessage(): Cannot post message after channel has closed "+JSON.stringify(t));return Or(this,"message",t)},postInternal:function(t){return Or(this,"internal",t)},set onmessage(t){var e=this.method.microSeconds(),n={time:e,fn:t};xr(this,"message",this._onML),t&&typeof t=="function"?(this._onML=n,Tr(this,"message",n)):this._onML=null},addEventListener:function(t,e){var n=this.method.microSeconds(),o={time:n,fn:e};Tr(this,t,o)},removeEventListener:function(t,e){var n=this._addEL[t].find(function(o){return o.fn===e});xr(this,t,n)},close:function(){var t=this;if(!this.closed){Sr.delete(this),this.closed=!0;var e=this._prepP?this._prepP:jt;return this._onML=null,this._addEL.message=[],e.then(function(){return Promise.all(Array.from(t._uMP))}).then(function(){return Promise.all(t._befC.map(function(n){return n()}))}).then(function(){return t.method.close(t._state)})}},get type(){return this.method.type},get isClosed(){return this.closed}};function Or(t,e,n){var o=t.method.microSeconds(),s={time:o,type:e,data:n},r=t._prepP?t._prepP:jt;return r.then(function(){var a=t.method.postMessage(t._state,s);return t._uMP.add(a),a.catch().then(function(){return t._uMP.delete(a)}),a})}function fd(t){var e=t.method.create(t.name,t.options);gu(e)?(t._prepP=e,e.then(function(n){t._state=n})):t._state=e}function Ir(t){return t._addEL.message.length>0||t._addEL.internal.length>0}function Tr(t,e,n){t._addEL[e].push(n),pd(t)}function xr(t,e,n){t._addEL[e]=t._addEL[e].filter(function(o){return o!==n}),hd(t)}function pd(t){if(!t._iL&&Ir(t)){var e=function(o){t._addEL[o.type].forEach(function(s){o.time>=s.time&&s.fn(o.data)})},n=t.method.microSeconds();t._prepP?t._prepP.then(function(){t._iL=!0,t.method.onMessage(t._state,e,n)}):(t._iL=!0,t.method.onMessage(t._state,e,n))}}function hd(t){if(t._iL&&!Ir(t)){t._iL=!1;var e=t.method.microSeconds();t.method.onMessage(t._state,null,e)}}function Vr(t,e={serialize:JSON.stringify,deserialize:JSON.parse}){return e.deserialize(e.serialize(t))}function md(t,e){return Object.keys(e).includes(t)}function gd({enable:t=!0,initialize:e=!0,type:n,serializer:o}){return({store:s,options:r})=>{const a=r?.share?.enable??t,c=r?.share?.omit??[];if(!a)return;const l=new Rn(s.$id,{type:n});let u=0,h=!1;const f=Object.keys(s.$state).filter(d=>!c.includes(d)&&md(d,s.$state));l.onmessage=d=>{if(d===void 0){l.postMessage({timestamp:u,state:Vr(s.$state,o)});return}d.timestamp<=u||(h=!0,u=d.timestamp,s.$patch(p=>{f.forEach(m=>{p[m]=d.state[m]})}))},(r?.share?.initialize??e)&&l.postMessage(void 0),s.$subscribe((d,p)=>{h||(u=Date.now(),l.postMessage({timestamp:u,state:Vr(p,o)})),h=!1})}}uu().use(gd({enable:!0,initialize:!0}));const Nr=i.defineComponent({__name:"Doctype",setup(t){const{stonecrop:e}=dr(),n=i.ref([]);return i.watch(e,()=>{if(e.value){let o=e.value.schema?.schema.toArray();o||(o=[]),o.forEach((s,r)=>{const c=e.value?.store.record?.[s.fieldname];o[r].value=c}),n.value=o}}),(o,s)=>(i.openBlock(),i.createBlock(i.unref(Ri),{class:"aform-main",modelValue:n.value,"onUpdate:modelValue":s[0]||(s[0]=r=>n.value=r)},null,8,["modelValue"]))}});/*!
|
|
14
14
|
* pinia v3.0.3
|
|
15
15
|
* (c) 2025 Eduardo San Martin Morote
|
|
16
16
|
* @license MIT
|
|
17
|
-
*/let oe;const
|
|
17
|
+
*/let oe;const Te=t=>oe=t,_d=process.env.NODE_ENV!=="production"?Symbol("pinia"):Symbol();function Et(t){return t&&typeof t=="object"&&Object.prototype.toString.call(t)==="[object Object]"&&typeof t.toJSON!="function"}var se;(function(t){t.direct="direct",t.patchObject="patch object",t.patchFunction="patch function"})(se||(se={}));const re=typeof window<"u";function Cr(t,e){for(const n in e){const o=e[n];if(!(n in t))continue;const s=t[n];Et(s)&&Et(o)&&!i.isRef(o)&&!i.isReactive(o)?t[n]=Cr(s,o):t[n]=o}return t}const $r=()=>{};function Pr(t,e,n,o=$r){t.push(e);const s=()=>{const r=t.indexOf(e);r>-1&&(t.splice(r,1),o())};return!n&&i.getCurrentScope()&&i.onScopeDispose(s),s}function Mt(t,...e){t.slice().forEach(n=>{n(...e)})}const yd=t=>t(),Rr=Symbol(),Dn=Symbol();function An(t,e){t instanceof Map&&e instanceof Map?e.forEach((n,o)=>t.set(o,n)):t instanceof Set&&e instanceof Set&&e.forEach(t.add,t);for(const n in e){if(!e.hasOwnProperty(n))continue;const o=e[n],s=t[n];Et(s)&&Et(o)&&t.hasOwnProperty(n)&&!i.isRef(o)&&!i.isReactive(o)?t[n]=An(s,o):t[n]=o}return t}const wd=process.env.NODE_ENV!=="production"?Symbol("pinia:skipHydration"):Symbol();function Ed(t){return!Et(t)||!Object.prototype.hasOwnProperty.call(t,wd)}const{assign:Q}=Object;function Dr(t){return!!(i.isRef(t)&&t.effect)}function Ar(t,e,n,o){const{state:s,actions:r,getters:a}=e,c=n.state.value[t];let l;function u(){!c&&(process.env.NODE_ENV==="production"||!o)&&(n.state.value[t]=s?s():{});const h=process.env.NODE_ENV!=="production"&&o?i.toRefs(i.ref(s?s():{}).value):i.toRefs(n.state.value[t]);return Q(h,r,Object.keys(a||{}).reduce((f,d)=>(process.env.NODE_ENV!=="production"&&d in h&&console.warn(`[🍍]: A getter cannot have the same name as another state property. Rename one of them. Found with "${d}" in store "${t}".`),f[d]=i.markRaw(i.computed(()=>{Te(n);const p=n._s.get(t);return a[d].call(p,p)})),f),{}))}return l=Ln(t,u,e,n,o,!0),l}function Ln(t,e,n={},o,s,r){let a;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"&&(l.onTrigger=E=>{u?p=E:u==!1&&!k._hotUpdating&&(Array.isArray(p)?p.push(E):console.error("🍍 debuggerEvents should be an array. This is most likely an internal Pinia bug."))});let u,h,f=[],d=[],p;const m=o.state.value[t];!r&&!m&&(process.env.NODE_ENV==="production"||!s)&&(o.state.value[t]={});const y=i.ref({});let g;function w(E){let S;u=h=!1,process.env.NODE_ENV!=="production"&&(p=[]),typeof E=="function"?(E(o.state.value[t]),S={type:se.patchFunction,storeId:t,events:p}):(An(o.state.value[t],E),S={type:se.patchObject,payload:E,storeId:t,events:p});const N=g=Symbol();i.nextTick().then(()=>{g===N&&(u=!0)}),h=!0,Mt(f,S,o.state.value[t])}const O=r?function(){const{state:S}=n,N=S?S():{};this.$patch(D=>{Q(D,N)})}:process.env.NODE_ENV!=="production"?()=>{throw new Error(`🍍: Store "${t}" is built using the setup syntax and does not implement $reset().`)}:$r;function V(){a.stop(),f=[],d=[],o._s.delete(t)}const R=(E,S="")=>{if(Rr in E)return E[Dn]=S,E;const N=function(){Te(o);const D=Array.from(arguments),J=[],H=[];function C(b){J.push(b)}function W(b){H.push(b)}Mt(d,{args:D,name:N[Dn],store:k,after:C,onError:W});let _;try{_=E.apply(this&&this.$id===t?this:k,D)}catch(b){throw Mt(H,b),b}return _ instanceof Promise?_.then(b=>(Mt(J,b),b)).catch(b=>(Mt(H,b),Promise.reject(b))):(Mt(J,_),_)};return N[Rr]=!0,N[Dn]=S,N},j=i.markRaw({actions:{},getters:{},state:[],hotState:y}),q={_p:o,$id:t,$onAction:Pr.bind(null,d),$patch:w,$reset:O,$subscribe(E,S={}){const N=Pr(f,E,S.detached,()=>D()),D=a.run(()=>i.watch(()=>o.state.value[t],J=>{(S.flush==="sync"?h:u)&&E({storeId:t,type:se.direct,events:p},J)},Q({},l,S)));return N},$dispose:V},k=i.reactive(process.env.NODE_ENV!=="production"||process.env.NODE_ENV!=="production"&&process.env.NODE_ENV!=="test"&&re?Q({_hmrPayload:j,_customProperties:i.markRaw(new Set)},q):q);o._s.set(t,k);const I=(o._a&&o._a.runWithContext||yd)(()=>o._e.run(()=>(a=i.effectScope()).run(()=>e({action:R}))));for(const E in I){const S=I[E];if(i.isRef(S)&&!Dr(S)||i.isReactive(S))process.env.NODE_ENV!=="production"&&s?y.value[E]=i.toRef(I,E):r||(m&&Ed(S)&&(i.isRef(S)?S.value=m[E]:An(S,m[E])),o.state.value[t][E]=S),process.env.NODE_ENV!=="production"&&j.state.push(E);else if(typeof S=="function"){const N=process.env.NODE_ENV!=="production"&&s?S:R(S,E);I[E]=N,process.env.NODE_ENV!=="production"&&(j.actions[E]=S),c.actions[E]=S}else process.env.NODE_ENV!=="production"&&Dr(S)&&(j.getters[E]=r?n.getters[E]:S,re&&(I._getters||(I._getters=i.markRaw([]))).push(E))}if(Q(k,I),Q(i.toRaw(k),I),Object.defineProperty(k,"$state",{get:()=>process.env.NODE_ENV!=="production"&&s?y.value:o.state.value[t],set:E=>{if(process.env.NODE_ENV!=="production"&&s)throw new Error("cannot set hotState");w(S=>{Q(S,E)})}}),process.env.NODE_ENV!=="production"&&(k._hotUpdate=i.markRaw(E=>{k._hotUpdating=!0,E._hmrPayload.state.forEach(S=>{if(S in k.$state){const N=E.$state[S],D=k.$state[S];typeof N=="object"&&Et(N)&&Et(D)?Cr(N,D):E.$state[S]=D}k[S]=i.toRef(E.$state,S)}),Object.keys(k.$state).forEach(S=>{S in E.$state||delete k[S]}),u=!1,h=!1,o.state.value[t]=i.toRef(E._hmrPayload,"hotState"),h=!0,i.nextTick().then(()=>{u=!0});for(const S in E._hmrPayload.actions){const N=E[S];k[S]=R(N,S)}for(const S in E._hmrPayload.getters){const N=E._hmrPayload.getters[S],D=r?i.computed(()=>(Te(o),N.call(k,k))):N;k[S]=D}Object.keys(k._hmrPayload.getters).forEach(S=>{S in E._hmrPayload.getters||delete k[S]}),Object.keys(k._hmrPayload.actions).forEach(S=>{S in E._hmrPayload.actions||delete k[S]}),k._hmrPayload=E._hmrPayload,k._getters=E._getters,k._hotUpdating=!1})),process.env.NODE_ENV!=="production"&&process.env.NODE_ENV!=="test"&&re){const E={writable:!0,configurable:!0,enumerable:!1};["_p","_hmrPayload","_getters","_customProperties"].forEach(S=>{Object.defineProperty(k,S,Q({value:k[S]},E))})}return o._p.forEach(E=>{if(process.env.NODE_ENV!=="production"&&process.env.NODE_ENV!=="test"&&re){const S=a.run(()=>E({store:k,app:o._a,pinia:o,options:c}));Object.keys(S||{}).forEach(N=>k._customProperties.add(N)),Q(k,S)}else Q(k,a.run(()=>E({store:k,app:o._a,pinia:o,options:c})))}),process.env.NODE_ENV!=="production"&&k.$state&&typeof k.$state=="object"&&typeof k.$state.constructor=="function"&&!k.$state.constructor.toString().includes("[native code]")&&console.warn(`[🍍]: The "state" must be a plain object. It cannot be
|
|
18
18
|
state: () => new MyClass()
|
|
19
|
-
Found in store "${k.$id}".`),m&&r&&n.hydrate&&n.hydrate(k.$state,m),u=!0,h=!0,k}/*! #__NO_SIDE_EFFECTS__ */function
|
|
19
|
+
Found in store "${k.$id}".`),m&&r&&n.hydrate&&n.hydrate(k.$state,m),u=!0,h=!0,k}/*! #__NO_SIDE_EFFECTS__ */function bd(t,e,n){let o;const s=typeof e=="function";o=s?n:e;function r(a,c){const l=i.hasInjectionContext();if(a=(process.env.NODE_ENV==="test"&&oe&&oe._testing?null:a)||(l?i.inject(_d,null):null),a&&Te(a),process.env.NODE_ENV!=="production"&&!oe)throw new Error(`[🍍]: "getActivePinia()" was called but there was no active Pinia. Are you trying to use a store before calling "app.use(pinia)"?
|
|
20
20
|
See https://pinia.vuejs.org/core-concepts/outside-component-usage.html for help.
|
|
21
|
-
This will fail in production.`);a=oe,a._s.has(t)||(s?An(t,e,o,a):Dr(t,o,a),process.env.NODE_ENV!=="production"&&(r._pinia=a));const u=a._s.get(t);if(process.env.NODE_ENV!=="production"&&c){const h="__hot:"+t,f=s?An(h,e,o,a,!0):Dr(h,Z({},o),a,!0);c._hotUpdate(f),delete a.state.value[h],a._s.delete(h)}if(process.env.NODE_ENV!=="production"&&re){const h=i.getCurrentInstance();if(h&&h.proxy&&!c){const f=h.proxy,d="_pStores"in f?f._pStores:f._pStores={};d[t]=u}}return u}return r.$id=t,r}function Ln(t){return i.getCurrentScope()?(i.onScopeDispose(t),!0):!1}const bd=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const vd=t=>t!=null,kd=Object.prototype.toString,Sd=t=>kd.call(t)==="[object Object]",Od=()=>{};function Te(t){return Array.isArray(t)?t:[t]}function Id(t,e,n){return i.watch(t,e,{...n,immediate:!0})}const Bt=bd?window:void 0;function Ut(t){var e;const n=i.toValue(t);return(e=n?.$el)!=null?e:n}function ie(...t){const e=[],n=()=>{e.forEach(c=>c()),e.length=0},o=(c,l,u,h)=>(c.addEventListener(l,u,h),()=>c.removeEventListener(l,u,h)),s=i.computed(()=>{const c=Te(i.toValue(t[0])).filter(l=>l!=null);return c.every(l=>typeof l!="string")?c:void 0}),r=Id(()=>{var c,l;return[(l=(c=s.value)==null?void 0:c.map(u=>Ut(u)))!=null?l:[Bt].filter(u=>u!=null),Te(i.toValue(s.value?t[1]:t[0])),Te(i.unref(s.value?t[2]:t[1])),i.toValue(s.value?t[3]:t[2])]},([c,l,u,h])=>{if(n(),!c?.length||!l?.length||!u?.length)return;const f=Sd(h)?{...h}:h;e.push(...c.flatMap(d=>l.flatMap(p=>u.map(m=>o(d,p,m,f)))))},{flush:"post"}),a=()=>{r(),n()};return Ln(n),a}function Td(){const t=i.shallowRef(!1),e=i.getCurrentInstance();return e&&i.onMounted(()=>{t.value=!0},e),t}function xd(t){const e=Td();return i.computed(()=>(e.value,!!t()))}function Vd(t,e,n={}){const{window:o=Bt,...s}=n;let r;const a=xd(()=>o&&"MutationObserver"in o),c=()=>{r&&(r.disconnect(),r=void 0)},l=i.computed(()=>{const d=i.toValue(t),p=Te(d).map(Ut).filter(vd);return new Set(p)}),u=i.watch(()=>l.value,d=>{c(),a.value&&d.size&&(r=new MutationObserver(e),d.forEach(p=>r.observe(p,s)))},{immediate:!0,flush:"post"}),h=()=>r?.takeRecords(),f=()=>{u(),c()};return Ln(f),{isSupported:a,stop:f,takeRecords:h}}function Nd(t,e,n={}){const{window:o=Bt,document:s=o?.document,flush:r="sync"}=n;if(!o||!s)return Od;let a;const c=h=>{a?.(),a=h},l=i.watchEffect(()=>{const h=Ut(t);if(h){const{stop:f}=Vd(s,d=>{d.map(p=>[...p.removedNodes]).flat().some(p=>p===h||p.contains(h))&&e(d)},{window:o,childList:!0,subtree:!0});c(f)}},{flush:r}),u=()=>{l(),c()};return Ln(u),u}function Cd(t={}){var e;const{window:n=Bt,deep:o=!0,triggerOnRemoval:s=!1}=t,r=(e=t.document)!=null?e:n?.document,a=()=>{var u;let h=r?.activeElement;if(o)for(;h?.shadowRoot;)h=(u=h?.shadowRoot)==null?void 0:u.activeElement;return h},c=i.shallowRef(),l=()=>{c.value=a()};if(n){const u={capture:!0,passive:!0};ie(n,"blur",h=>{h.relatedTarget===null&&l()},u),ie(n,"focus",l,u)}return s&&Nd(c,l,{document:r}),l(),c}const $d="focusin",Pd="focusout",Rd=":focus-within";function Dd(t,e={}){const{window:n=Bt}=e,o=i.computed(()=>Ut(t)),s=i.shallowRef(!1),r=i.computed(()=>s.value);if(!n||!Cd(e).value)return{focused:r};const a={passive:!0};return ie(o,$d,()=>s.value=!0,a),ie(o,Pd,()=>{var c,l,u;return s.value=(u=(l=(c=o.value)==null?void 0:c.matches)==null?void 0:l.call(c,Rd))!=null?u:!1},a),{focused:r}}function Ad(t,{window:e=Bt,scrollTarget:n}={}){const o=i.ref(!1),s=()=>{if(!e)return;const r=e.document,a=Ut(t);if(!a)o.value=!1;else{const c=a.getBoundingClientRect();o.value=c.top<=(e.innerHeight||r.documentElement.clientHeight)&&c.left<=(e.innerWidth||r.documentElement.clientWidth)&&c.bottom>=0&&c.right>=0}};return i.watch(()=>Ut(t),()=>s(),{immediate:!0,flush:"post"}),e&&ie(n||e,"scroll",s,{capture:!1,passive:!0}),o}const rt=t=>{let e=Ad(t).value;return e=e&&t.offsetHeight>0,e},it=t=>t.tabIndex>=0,Ar=t=>{const e=t.target;return jn(e)},jn=t=>{let e;if(t instanceof HTMLTableCellElement){const n=t.parentElement?.previousElementSibling;if(n){const o=Array.from(n.children)[t.cellIndex];o&&(e=o)}}else if(t instanceof HTMLTableRowElement){const n=t.previousElementSibling;n&&(e=n)}return e&&(!it(e)||!rt(e))?jn(e):e},Ld=t=>{const e=t.target;let n;if(e instanceof HTMLTableCellElement){const o=e.parentElement?.parentElement;if(o){const s=o.firstElementChild?.children[e.cellIndex];s&&(n=s)}}else if(e instanceof HTMLTableRowElement){const o=e.parentElement;if(o){const s=o.firstElementChild;s&&(n=s)}}return n&&(!it(n)||!rt(n))?Mn(n):n},Lr=t=>{const e=t.target;return Mn(e)},Mn=t=>{let e;if(t instanceof HTMLTableCellElement){const n=t.parentElement?.nextElementSibling;if(n){const o=Array.from(n.children)[t.cellIndex];o&&(e=o)}}else if(t instanceof HTMLTableRowElement){const n=t.nextElementSibling;n&&(e=n)}return e&&(!it(e)||!rt(e))?Mn(e):e},jd=t=>{const e=t.target;let n;if(e instanceof HTMLTableCellElement){const o=e.parentElement?.parentElement;if(o){const s=o.lastElementChild?.children[e.cellIndex];s&&(n=s)}}else if(e instanceof HTMLTableRowElement){const o=e.parentElement;if(o){const s=o.lastElementChild;s&&(n=s)}}return n&&(!it(n)||!rt(n))?jn(n):n},jr=t=>{const e=t.target;return Bn(e)},Bn=t=>{let e;return t.previousElementSibling?e=t.previousElementSibling:e=t.parentElement?.previousElementSibling?.lastElementChild,e&&(!it(e)||!rt(e))?Bn(e):e},Mr=t=>{const e=t.target;return Un(e)},Un=t=>{let e;return t.nextElementSibling?e=t.nextElementSibling:e=t.parentElement?.nextElementSibling?.firstElementChild,e&&(!it(e)||!rt(e))?Un(e):e},Br=t=>{const e=t.target.parentElement?.firstElementChild;return e&&(!it(e)||!rt(e))?Un(e):e},Ur=t=>{const e=t.target.parentElement?.lastElementChild;return e&&(!it(e)||!rt(e))?Bn(e):e},xe=["alt","control","shift","meta"],Md={ArrowUp:"up",ArrowDown:"down",ArrowLeft:"left",ArrowRight:"right"},zr={"keydown.up":t=>{const e=Ar(t);e&&(t.preventDefault(),t.stopPropagation(),e.focus())},"keydown.down":t=>{const e=Lr(t);e&&(t.preventDefault(),t.stopPropagation(),e.focus())},"keydown.left":t=>{const e=jr(t);t.preventDefault(),t.stopPropagation(),e&&e.focus()},"keydown.right":t=>{const e=Mr(t);t.preventDefault(),t.stopPropagation(),e&&e.focus()},"keydown.control.up":t=>{const e=Ld(t);e&&(t.preventDefault(),t.stopPropagation(),e.focus())},"keydown.control.down":t=>{const e=jd(t);e&&(t.preventDefault(),t.stopPropagation(),e.focus())},"keydown.control.left":t=>{const e=Br(t);e&&(t.preventDefault(),t.stopPropagation(),e.focus())},"keydown.control.right":t=>{const e=Ur(t);e&&(t.preventDefault(),t.stopPropagation(),e.focus())},"keydown.end":t=>{const e=Ur(t);e&&(t.preventDefault(),t.stopPropagation(),e.focus())},"keydown.enter":t=>{if(t.target instanceof HTMLTableCellElement){t.preventDefault(),t.stopPropagation();const e=Lr(t);e&&e.focus()}},"keydown.shift.enter":t=>{if(t.target instanceof HTMLTableCellElement){t.preventDefault(),t.stopPropagation();const e=Ar(t);e&&e.focus()}},"keydown.home":t=>{const e=Br(t);e&&(t.preventDefault(),t.stopPropagation(),e.focus())},"keydown.tab":t=>{const e=Mr(t);e&&(t.preventDefault(),t.stopPropagation(),e.focus())},"keydown.shift.tab":t=>{const e=jr(t);e&&(t.preventDefault(),t.stopPropagation(),e.focus())}};function Bd(t){const e=a=>{let c=null;return a.parent&&(typeof a.parent=="string"?c=document.querySelector(a.parent):a.parent instanceof HTMLElement?c=a.parent:c=a.parent.value),c},n=a=>{const c=e(a);let l=[];if(typeof a.selectors=="string")l=c?Array.from(c.querySelectorAll(a.selectors)):Array.from(document.querySelectorAll(a.selectors));else if(Array.isArray(a.selectors))for(const u of a.selectors)u instanceof HTMLElement?l.push(u):l.push(u.$el);else if(a.selectors instanceof HTMLElement)l.push(a.selectors);else if(a.selectors?.value)if(Array.isArray(a.selectors.value))for(const u of a.selectors.value)u instanceof HTMLElement?l.push(u):l.push(u.$el);else l.push(a.selectors.value);return l},o=a=>{const c=e(a);let l=[];return a.selectors?l=n(a):c&&(l=Array.from(c.children).filter(u=>it(u)&&rt(u))),l},s=a=>c=>{const l=Md[c.key]||c.key.toLowerCase();if(xe.includes(l))return;const u=a.handlers||zr;for(const h of Object.keys(u)){const[f,...d]=h.split(".");if(f==="keydown"&&d.includes(l)){const p=u[h],m=d.filter(g=>xe.includes(g)),y=xe.some(g=>{const w=g.charAt(0).toUpperCase()+g.slice(1);return c.getModifierState(w)});if(m.length>0){if(y){for(const g of xe)if(d.includes(g)){const w=g.charAt(0).toUpperCase()+g.slice(1);c.getModifierState(w)&&p(c)}}}else y||p(c)}}},r=[];i.onMounted(()=>{for(const a of t){const c=e(a),l=o(a),u=s(a),h=c?[c]:l;for(const f of h){const{focused:d}=Dd(i.ref(f)),p=i.watch(d,m=>{m?f.addEventListener("keydown",u):f.removeEventListener("keydown",u)});r.push(p)}}}),i.onBeforeUnmount(()=>{for(const a of r)a()})}function zt(t){return i.getCurrentScope()?(i.onScopeDispose(t),!0):!1}const zn=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const Ud=t=>t!=null,zd=Object.prototype.toString,Hr=t=>zd.call(t)==="[object Object]",Et=()=>{},Hn=Hd();function Hd(){var t,e;return zn&&((t=window?.navigator)==null?void 0:t.userAgent)&&(/iP(?:ad|hone|od)/.test(window.navigator.userAgent)||((e=window?.navigator)==null?void 0:e.maxTouchPoints)>2&&/iPad|Macintosh/.test(window?.navigator.userAgent))}function Kd(...t){if(t.length!==1)return i.toRef(...t);const e=t[0];return typeof e=="function"?i.readonly(i.customRef(()=>({get:e,set:Et}))):i.ref(e)}function bt(t){return Array.isArray(t)?t:[t]}function Fd(t){return i.getCurrentInstance()}function Wd(t,e=!0,n){Fd()?i.onMounted(t,n):e?t():i.nextTick(t)}function Kr(t,e,n){return i.watch(t,e,{...n,immediate:!0})}const Kn=zn?window:void 0;function Ht(t){var e;const n=i.toValue(t);return(e=n?.$el)!=null?e:n}function Fr(...t){const e=[],n=()=>{e.forEach(c=>c()),e.length=0},o=(c,l,u,h)=>(c.addEventListener(l,u,h),()=>c.removeEventListener(l,u,h)),s=i.computed(()=>{const c=bt(i.toValue(t[0])).filter(l=>l!=null);return c.every(l=>typeof l!="string")?c:void 0}),r=Kr(()=>{var c,l;return[(l=(c=s.value)==null?void 0:c.map(u=>Ht(u)))!=null?l:[Kn].filter(u=>u!=null),bt(i.toValue(s.value?t[1]:t[0])),bt(i.unref(s.value?t[2]:t[1])),i.toValue(s.value?t[3]:t[2])]},([c,l,u,h])=>{if(n(),!c?.length||!l?.length||!u?.length)return;const f=Hr(h)?{...h}:h;e.push(...c.flatMap(d=>l.flatMap(p=>u.map(m=>o(d,p,m,f)))))},{flush:"post"}),a=()=>{r(),n()};return zt(n),a}function Gd(){const t=i.shallowRef(!1),e=i.getCurrentInstance();return e&&i.onMounted(()=>{t.value=!0},e),t}function Wr(t){const e=Gd();return i.computed(()=>(e.value,!!t()))}function Gr(t,e,n={}){const{window:o=Kn,...s}=n;let r;const a=Wr(()=>o&&"MutationObserver"in o),c=()=>{r&&(r.disconnect(),r=void 0)},l=i.computed(()=>{const d=i.toValue(t),p=bt(d).map(Ht).filter(Ud);return new Set(p)}),u=i.watch(()=>l.value,d=>{c(),a.value&&d.size&&(r=new MutationObserver(e),d.forEach(p=>r.observe(p,s)))},{immediate:!0,flush:"post"}),h=()=>r?.takeRecords(),f=()=>{u(),c()};return zt(f),{isSupported:a,stop:f,takeRecords:h}}function Jd(t,e,n={}){const{window:o=Kn,...s}=n;let r;const a=Wr(()=>o&&"ResizeObserver"in o),c=()=>{r&&(r.disconnect(),r=void 0)},l=i.computed(()=>{const f=i.toValue(t);return Array.isArray(f)?f.map(d=>Ht(d)):[Ht(f)]}),u=i.watch(l,f=>{if(c(),a.value&&o){r=new ResizeObserver(e);for(const d of f)d&&r.observe(d,s)}},{immediate:!0,flush:"post"}),h=()=>{c(),u()};return zt(h),{isSupported:a,stop:h}}function Yd(t,e={}){const{reset:n=!0,windowResize:o=!0,windowScroll:s=!0,immediate:r=!0,updateTiming:a="sync"}=e,c=i.shallowRef(0),l=i.shallowRef(0),u=i.shallowRef(0),h=i.shallowRef(0),f=i.shallowRef(0),d=i.shallowRef(0),p=i.shallowRef(0),m=i.shallowRef(0);function y(){const w=Ht(t);if(!w){n&&(c.value=0,l.value=0,u.value=0,h.value=0,f.value=0,d.value=0,p.value=0,m.value=0);return}const O=w.getBoundingClientRect();c.value=O.height,l.value=O.bottom,u.value=O.left,h.value=O.right,f.value=O.top,d.value=O.width,p.value=O.x,m.value=O.y}function g(){a==="sync"?y():a==="next-frame"&&requestAnimationFrame(()=>y())}return Jd(t,g),i.watch(()=>Ht(t),w=>!w&&g()),Gr(t,g,{attributeFilter:["style","class"]}),s&&Fr("scroll",g,{capture:!0,passive:!0}),o&&Fr("resize",g,{passive:!0}),Wd(()=>{r&&g()}),{height:c,bottom:l,left:u,right:h,top:f,width:d,x:p,y:m,update:g}}const qd=(t=8)=>Array.from({length:t},()=>Math.floor(Math.random()*16).toString(16)).join(""),Fn=(t,e)=>{const n=t.__vccOpts||t;for(const[o,s]of e)n[o]=s;return n},Xd=["tabindex"],Zd=i.defineComponent({__name:"ARow",props:{rowIndex:{},store:{},tabIndex:{default:()=>-1},addNavigation:{type:[Boolean,Object],default:!1}},setup(t){const e=i.useTemplateRef("rowEl"),n=i.computed(()=>t.store.isRowVisible(t.rowIndex)),o=i.computed(()=>t.store.getRowExpandSymbol(t.rowIndex));if(t.addNavigation){let s=zr;typeof t.addNavigation=="object"&&(s={...s,...t.addNavigation}),Bd([{selectors:e,handlers:s}])}return(s,r)=>i.withDirectives((i.openBlock(),i.createElementBlock("tr",{ref:"rowEl",tabindex:s.tabIndex,class:"atable-row"},[s.store.config.view!=="uncounted"?i.renderSlot(s.$slots,"index",{key:0},()=>[s.store.config.view==="list"?(i.openBlock(),i.createElementBlock("td",{key:0,tabIndex:-1,class:i.normalizeClass(["list-index",s.store.hasPinnedColumns?"sticky-index":""])},i.toDisplayString(s.rowIndex+1),3)):s.store.isTreeView?(i.openBlock(),i.createElementBlock("td",{key:1,tabIndex:-1,class:i.normalizeClass(["tree-index",s.store.hasPinnedColumns?"sticky-index":""]),onClick:r[0]||(r[0]=a=>s.store.toggleRowExpand(s.rowIndex))},i.toDisplayString(o.value),3)):i.createCommentVNode("",!0)],!0):i.createCommentVNode("",!0),i.renderSlot(s.$slots,"default",{},void 0,!0)],8,Xd)),[[i.vShow,n.value]])}}),Qd=Fn(Zd,[["__scopeId","data-v-c554ee0f"]]),Wn=zn?window:void 0;function vt(t){var e;const n=i.toValue(t);return(e=n?.$el)!=null?e:n}function Ve(...t){const e=[],n=()=>{e.forEach(c=>c()),e.length=0},o=(c,l,u,h)=>(c.addEventListener(l,u,h),()=>c.removeEventListener(l,u,h)),s=i.computed(()=>{const c=bt(i.toValue(t[0])).filter(l=>l!=null);return c.every(l=>typeof l!="string")?c:void 0}),r=Kr(()=>{var c,l;return[(l=(c=s.value)==null?void 0:c.map(u=>vt(u)))!=null?l:[Wn].filter(u=>u!=null),bt(i.toValue(s.value?t[1]:t[0])),bt(i.unref(s.value?t[2]:t[1])),i.toValue(s.value?t[3]:t[2])]},([c,l,u,h])=>{if(n(),!c?.length||!l?.length||!u?.length)return;const f=Hr(h)?{...h}:h;e.push(...c.flatMap(d=>l.flatMap(p=>u.map(m=>o(d,p,m,f)))))},{flush:"post"}),a=()=>{r(),n()};return zt(n),a}let Jr=!1;function Yr(t,e,n={}){const{window:o=Wn,ignore:s=[],capture:r=!0,detectIframe:a=!1,controls:c=!1}=n;if(!o)return c?{stop:Et,cancel:Et,trigger:Et}:Et;if(Hn&&!Jr){Jr=!0;const g={passive:!0};Array.from(o.document.body.children).forEach(w=>w.addEventListener("click",Et,g)),o.document.documentElement.addEventListener("click",Et,g)}let l=!0;const u=g=>i.toValue(s).some(w=>{if(typeof w=="string")return Array.from(o.document.querySelectorAll(w)).some(O=>O===g.target||g.composedPath().includes(O));{const O=vt(w);return O&&(g.target===O||g.composedPath().includes(O))}});function h(g){const w=i.toValue(g);return w&&w.$.subTree.shapeFlag===16}function f(g,w){const O=i.toValue(g),V=O.$.subTree&&O.$.subTree.children;return V==null||!Array.isArray(V)?!1:V.some(P=>P.el===w.target||w.composedPath().includes(P.el))}const d=g=>{const w=vt(t);if(g.target!=null&&!(!(w instanceof Element)&&h(t)&&f(t,g))&&!(!w||w===g.target||g.composedPath().includes(w))){if("detail"in g&&g.detail===0&&(l=!u(g)),!l){l=!0;return}e(g)}};let p=!1;const m=[Ve(o,"click",g=>{p||(p=!0,setTimeout(()=>{p=!1},0),d(g))},{passive:!0,capture:r}),Ve(o,"pointerdown",g=>{const w=vt(t);l=!u(g)&&!!(w&&!g.composedPath().includes(w))},{passive:!0}),a&&Ve(o,"blur",g=>{setTimeout(()=>{var w;const O=vt(t);((w=o.document.activeElement)==null?void 0:w.tagName)==="IFRAME"&&!O?.contains(o.document.activeElement)&&e(g)},0)},{passive:!0})].filter(Boolean),y=()=>m.forEach(g=>g());return c?{stop:y,cancel:()=>{l=!1},trigger:g=>{l=!0,d(g),l=!1}}:y}const Gn=new WeakMap,tf={mounted(t,e){const n=!e.modifiers.bubble;let o;if(typeof e.value=="function")o=Yr(t,e.value,{capture:n});else{const[s,r]=e.value;o=Yr(t,s,Object.assign({capture:n},r))}Gn.set(t,o)},unmounted(t){const e=Gn.get(t);e&&typeof e=="function"?e():e?.stop(),Gn.delete(t)}};function ef(){const t=i.shallowRef(!1),e=i.getCurrentInstance();return e&&i.onMounted(()=>{t.value=!0},e),t}function nf(t){const e=ef();return i.computed(()=>(e.value,!!t()))}function qr(t,e,n={}){const{window:o=Wn,...s}=n;let r;const a=nf(()=>o&&"ResizeObserver"in o),c=()=>{r&&(r.disconnect(),r=void 0)},l=i.computed(()=>{const f=i.toValue(t);return Array.isArray(f)?f.map(d=>vt(d)):[vt(f)]}),u=i.watch(l,f=>{if(c(),a.value&&o){r=new ResizeObserver(e);for(const d of f)d&&r.observe(d,s)}},{immediate:!0,flush:"post"}),h=()=>{c(),u()};return zt(h),{isSupported:a,stop:h}}function Jn(t){return typeof Window<"u"&&t instanceof Window?t.document.documentElement:typeof Document<"u"&&t instanceof Document?t.documentElement:t}const of={mounted(t,e){typeof e.value=="function"?qr(t,e.value):qr(t,...e.value)}};function Xr(t){const e=window.getComputedStyle(t);if(e.overflowX==="scroll"||e.overflowY==="scroll"||e.overflowX==="auto"&&t.clientWidth<t.scrollWidth||e.overflowY==="auto"&&t.clientHeight<t.scrollHeight)return!0;{const n=t.parentNode;return!n||n.tagName==="BODY"?!1:Xr(n)}}function sf(t){const e=t||window.event,n=e.target;return Xr(n)?!1:e.touches.length>1?!0:(e.preventDefault&&e.preventDefault(),!1)}const Yn=new WeakMap;function rf(t,e=!1){const n=i.shallowRef(e);let o=null,s="";i.watch(Kd(t),c=>{const l=Jn(i.toValue(c));if(l){const u=l;if(Yn.get(u)||Yn.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 r=()=>{const c=Jn(i.toValue(t));!c||n.value||(Hn&&(o=Ve(c,"touchmove",l=>{sf(l)},{passive:!1})),c.style.overflow="hidden",n.value=!0)},a=()=>{const c=Jn(i.toValue(t));!c||!n.value||(Hn&&o?.(),c.style.overflow=s,Yn.delete(c),n.value=!1)};return zt(a),i.computed({get(){return n.value},set(c){c?r():a()}})}function af(){let t=!1;const e=i.shallowRef(!1);return(n,o)=>{if(e.value=o.value,t)return;t=!0;const s=rf(n,o.value);i.watch(e,r=>s.value=r)}}af();const cf={class:"gantt-connection-overlay"},lf={class:"connection-svg",style:{position:"absolute",top:0,left:0,width:"100%",height:"100%",pointerEvents:"none",zIndex:1}},uf=["d","stroke-width","onDblclick"],df=["d","stroke","stroke-width","id","onDblclick"],ff=.25,Ne=16,pf=i.defineComponent({__name:"AGanttConnection",props:{store:{}},emits:["connection:delete"],setup(t,{emit:e}){const n=e,o=i.computed(()=>t.store.connectionPaths.filter(a=>{const c=t.store.ganttBars.find(u=>u.id===a.from.barId),l=t.store.ganttBars.find(u=>u.id===a.to.barId);return c&&l})),s=(a,c=!1)=>{const l=t.store.connectionHandles.find(L=>L.barId===a.from.barId&&L.side===a.from.side),u=t.store.connectionHandles.find(L=>L.barId===a.to.barId&&L.side===a.to.side);if(!l||!u)return"";const h=l.position.x+Ne/2,f=l.position.y+Ne/2,d=u.position.x+Ne/2,p=u.position.y+Ne/2,m=Math.abs(d-h),y=Math.max(m*ff,50),g=h+(a.from.side==="left"?-y:y),w=d+(a.to.side==="left"?-y:y),O={x:.5*h+.5*g,y:.5*f+.5*f},V={x:.5*g+.5*w,y:.5*f+.5*p},P={x:.5*w+.5*d,y:.5*p+.5*p},A={x:.5*O.x+.5*V.x,y:.5*O.y+.5*V.y},Y={x:.5*V.x+.5*P.x,y:.5*V.y+.5*P.y},k={x:.5*A.x+.5*Y.x,y:.5*A.y+.5*Y.y};return`M ${h} ${f} Q ${g} ${f}, ${k.x} ${k.y} Q ${w} ${p}, ${d} ${p}`},r=a=>{t.store.deleteConnection(a.id)&&n("connection:delete",a)};return(a,c)=>(i.openBlock(),i.createElementBlock("div",cf,[(i.openBlock(),i.createElementBlock("svg",lf,[c[0]||(c[0]=i.createElementVNode("defs",null,[i.createElementVNode("path",{id:"arrowhead",d:"M 0 -7 L 20 0 L 0 7Z",stroke:"black","stroke-width":"1",fill:"currentColor"}),i.createElementVNode("marker",{id:"arrowhead-marker",markerWidth:"10",markerHeight:"7",refX:"5",refY:"3.5",orient:"auto",markerUnits:"strokeWidth"},[i.createElementVNode("polygon",{points:"0 0, 10 3.5, 0 7",fill:"currentColor"})])],-1)),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(o.value,l=>(i.openBlock(),i.createElementBlock("path",{key:`${l.id}-hitbox`,d:s(l),stroke:"transparent","stroke-width":(l.style?.width||2)+10,fill:"none",class:"connection-hitbox",onDblclick:u=>r(l)},null,40,uf))),128)),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(o.value,l=>(i.openBlock(),i.createElementBlock("path",{key:l.id,d:s(l),stroke:l.style?.color||"#666","stroke-width":l.style?.width||2,fill:"none","marker-mid":"url(#arrowhead-marker)",id:l.id,class:"connection-path animated-path",onDblclick:u=>r(l)},null,40,df))),128))]))]))}}),hf=Fn(pf,[["__scopeId","data-v-955111b6"]]),mf={key:0},gf={class:"atable-header-row",tabindex:"-1"},_f=["data-colindex"],yf=i.defineComponent({__name:"ATableHeader",props:{columns:{},store:{}},setup(t){const e=n=>{for(const o of n){if(o.borderBoxSize.length===0)continue;const s=o.borderBoxSize[0].inlineSize,r=Number(o.target.dataset.colindex),a=t.store.columns[r]?.width;typeof a=="number"&&a!==s&&t.store.resizeColumn(r,s)}};return(n,o)=>n.columns.length?(i.openBlock(),i.createElementBlock("thead",mf,[i.createElementVNode("tr",gf,[n.store.zeroColumn?(i.openBlock(),i.createElementBlock("th",{key:0,id:"header-index",class:i.normalizeClass([[n.store.hasPinnedColumns?"sticky-index":"",n.store.isTreeView?"tree-index":"",n.store.config.view==="list-expansion"?"list-expansion-index":""],"list-index"])},null,2)):i.createCommentVNode("",!0),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(n.columns,(s,r)=>i.withDirectives((i.openBlock(),i.createElementBlock("th",{key:s.name,"data-colindex":r,tabindex:"-1",style:i.normalizeStyle(n.store.getHeaderCellStyle(s)),class:i.normalizeClass(s.pinned?"sticky-column":"")},[i.renderSlot(n.$slots,"default",{},()=>[i.createTextVNode(i.toDisplayString(s.label||String.fromCharCode(r+97).toUpperCase()),1)])],14,_f)),[[i.unref(of),e]])),128))])])):i.createCommentVNode("",!0)}}),wf=i.defineComponent({__name:"ATableModal",props:{store:{}},setup(t){const e=i.useTemplateRef("amodal"),{width:n,height:o}=Yd(e),s=i.computed(()=>{if(!(t.store.modal.height&&t.store.modal.width&&t.store.modal.left&&t.store.modal.bottom))return;const r=t.store.modal.cell?.closest("table"),a=r.offsetHeight||0,c=r.offsetWidth||0;let l=t.store.modal.cell?.offsetTop||0;const u=r.querySelector("thead")?.offsetHeight||0;l+=u,l=l+o.value<a?l:l-(o.value+t.store.modal.height);let h=t.store.modal.cell?.offsetLeft||0;return h=h+n.value<=c?h:h-(n.value-t.store.modal.width),{left:`${h}px`,top:`${l}px`}});return(r,a)=>(i.openBlock(),i.createElementBlock("div",{class:"amodal",ref:"amodal",tabindex:"-1",onClick:a[0]||(a[0]=i.withModifiers(()=>{},["stop"])),onInput:a[1]||(a[1]=i.withModifiers(()=>{},["stop"])),style:i.normalizeStyle(s.value)},[i.renderSlot(r.$slots,"default")],36))}}),Ef=t=>{const e=t.id||qd();return Ed(`table-${e}`,()=>{const n=()=>{const _=[Object.assign({},{rowModified:!1})],b=new Set;for(let x=0;x<s.value.length;x++){const C=s.value[x];C.parent!==null&&C.parent!==void 0&&b.add(C.parent)}for(let x=0;x<s.value.length;x++){const C=s.value[x];_[x]={childrenOpen:!1,expanded:!1,indent:C.indent||0,isParent:b.has(x),isRoot:C.parent===null||C.parent===void 0,rowModified:!1,open:C.parent===null||C.parent===void 0,parent:C.parent}}return _},o=i.ref(t.columns),s=i.ref(t.rows),r=i.ref(t.config||{}),a=i.ref({}),c=i.ref({}),l=i.computed(()=>{const _={};for(const[b,x]of o.value.entries())for(const[C,j]of s.value.entries())_[`${b}:${C}`]=j[x.name];return _}),u=i.computed({get:()=>{const _=n();for(let b=0;b<_.length;b++)a.value[b]&&(_[b].rowModified=a.value[b]),c.value[b]&&(c.value[b].childrenOpen!==void 0&&(_[b].childrenOpen=c.value[b].childrenOpen),c.value[b].expanded!==void 0&&(_[b].expanded=c.value[b].expanded));if(w.value){const b=(x,C)=>{const j=C[x];if(j.isRoot||j.parent===null||j.parent===void 0)return!0;const H=j.parent;return H<0||H>=C.length?!1:(C[H].childrenOpen||!1)&&b(H,C)};for(let x=0;x<_.length;x++)_[x].isRoot||(_[x].open=b(x,_))}return _},set:_=>{JSON.stringify(_)!==JSON.stringify(u.value)&&(u.value=_)}}),h=i.ref(t.modal||{visible:!1}),f=i.ref({}),d=i.ref([]),p=i.ref([]),m=i.ref([]),y=i.computed(()=>o.value.some(_=>_.pinned)),g=i.computed(()=>r.value.view==="gantt"||r.value.view==="tree-gantt"),w=i.computed(()=>r.value.view==="tree"||r.value.view==="tree-gantt"),O=i.computed(()=>r.value.dependencyGraph!==!1),V=i.computed(()=>`${Math.ceil(s.value.length/100+1)}ch`),P=i.computed(()=>r.value.view?["list","tree","tree-gantt","list-expansion"].includes(r.value.view):!1),A=(_,b)=>l.value[`${_}:${b}`],Y=(_,b,x)=>{const C=`${_}:${b}`,j=o.value[_];l.value[C]!==x&&(a.value[b]=!0),l.value[C]=x,s.value[b]={...s.value[b],[j.name]:x}},k=_=>{s.value=_},L=(_,b,x)=>{const C=`${_}:${b}`;l.value[C]!==x&&(a.value[b]=!0,f.value[C]=x)},I=_=>{const b=o.value.indexOf(_)===o.value.length-1,x=r.value.fullWidth?_.resizable&&!b:_.resizable;return{width:_.width||"40ch",textAlign:_.align||"center",...x&&{resize:"horizontal",overflow:"hidden",whiteSpace:"nowrap"}}},E=(_,b)=>{if(_<0||_>=o.value.length)return;const x=Math.max(b,40);o.value[_]={...o.value[_],width:`${x}px`}},S=_=>{const b=s.value[_];return g.value&&b.gantt!==void 0},N=_=>!w.value||u.value[_].isRoot||u.value[_].open,R=_=>!w.value&&r.value.view!=="list-expansion"?"":w.value&&(u.value[_].isRoot||u.value[_].isParent)?u.value[_].childrenOpen?"▼":"►":r.value.view==="list-expansion"?u.value[_].expanded?"▼":"►":"",G=_=>{if(w.value){const b=c.value[_]||{},x=!(b.childrenOpen??u.value[_].childrenOpen);c.value[_]={...b,childrenOpen:x},x||U(_)}else if(r.value.view==="list-expansion"){const b=c.value[_]||{},x=b.expanded??u.value[_].expanded;c.value[_]={...b,expanded:!x}}},U=_=>{for(let b=0;b<s.value.length;b++)if(u.value[b].parent===_){const x=c.value[b]||{};c.value[b]={...x,childrenOpen:!1},U(b)}},$=(_,b)=>{const x=A(_,b);return F(_,b,x)},F=(_,b,x)=>{const C=o.value[_],j=s.value[b],H=C.format;return H?typeof H=="function"?H(x,{table:l.value,row:j,column:C}):typeof H=="string"?Function(`"use strict";return (${H})`)()(x,{table:l.value,row:j,column:C}):x:x};return{columns:o,config:r,connectionHandles:p,connectionPaths:m,display:u,ganttBars:d,modal:h,rows:s,table:l,updates:f,hasPinnedColumns:y,isGanttView:g,isTreeView:w,isDependencyGraphEnabled:O,numberedRowWidth:V,zeroColumn:P,closeModal:_=>{_.target instanceof Node&&h.value.parent?.contains(_.target)||h.value.visible&&(h.value.visible=!1)},createConnection:(_,b,x)=>{const C=p.value.find(kt=>kt.id===_),j=p.value.find(kt=>kt.id===b);if(!C||!j)return console.warn("Cannot create connection: handle not found"),null;const H={id:`connection-${_}-${b}`,from:{barId:C.barId,side:C.side},to:{barId:j.barId,side:j.side},style:x?.style,label:x?.label};return m.value.push(H),H},deleteConnection:_=>{const b=m.value.findIndex(x=>x.id===_);return b>=0?(m.value.splice(b,1),!0):!1},getCellData:A,getCellDisplayValue:$,getConnectionsForBar:_=>m.value.filter(b=>b.from.barId===_||b.to.barId===_),getFormattedValue:F,getHandlesForBar:_=>p.value.filter(b=>b.barId===_),getHeaderCellStyle:I,getIndent:(_,b)=>b&&_===0&&b>0?`${b}ch`:"inherit",getRowExpandSymbol:R,isRowGantt:S,isRowVisible:N,registerConnectionHandle:_=>{const b=p.value.findIndex(x=>x.id===_.id);b>=0?p.value[b]=_:p.value.push(_)},registerGanttBar:_=>{const b=d.value.findIndex(x=>x.id===_.id);b>=0?d.value[b]=_:d.value.push(_)},resizeColumn:E,setCellData:Y,setCellText:L,toggleRowExpand:G,unregisterConnectionHandle:_=>{const b=p.value.findIndex(x=>x.id===_);b>=0&&p.value.splice(b,1)},unregisterGanttBar:_=>{const b=d.value.findIndex(x=>x.id===_);b>=0&&d.value.splice(b,1)},updateGanttBar:_=>{const b=s.value[_.rowIndex]?.gantt;b&&(_.type==="resize"?_.edge==="start"?(b.startIndex=_.newStart,b.endIndex=_.end,b.colspan=b.endIndex-b.startIndex):_.edge==="end"&&(b.startIndex=_.start,b.endIndex=_.newEnd,b.colspan=b.endIndex-b.startIndex):_.type==="bar"&&(b.startIndex=_.newStart,b.endIndex=_.newEnd,b.colspan=b.endIndex-b.startIndex))},updateRows:k}})()},bf={class:"atable-container",style:{position:"relative"}},vf=i.defineComponent({__name:"ATable",props:i.mergeModels({id:{},config:{default:()=>new Object}},{rows:{required:!0},rowsModifiers:{},columns:{required:!0},columnsModifiers:{}}),emits:i.mergeModels(["cellUpdate","gantt:drag","connection:event","columns:update"],["update:rows","update:columns"]),setup(t,{expose:e,emit:n}){const o=i.useModel(t,"rows"),s=i.useModel(t,"columns"),r=n,a=i.useTemplateRef("table"),c=Ef({columns:s.value,rows:o.value,id:t.id,config:t.config});c.$onAction(({name:p,store:m,args:y,after:g})=>{if(p==="setCellData"||p==="setCellText"){const[w,O,V]=y,P=m.getCellData(w,O);g(()=>{o.value=[...m.rows],r("cellUpdate",{colIndex:w,rowIndex:O,newValue:V,oldValue:P})})}else if(p==="updateGanttBar"){const[w]=y;let O=!1;w.type==="resize"?O=w.oldColspan!==w.newColspan:w.type==="bar"&&(O=w.oldStart!==w.newStart||w.oldEnd!==w.newEnd),O&&g(()=>{r("gantt:drag",w)})}else p==="resizeColumn"&&g(()=>{s.value=[...m.columns],r("columns:update",[...m.columns])})}),i.watch(()=>o.value,p=>{JSON.stringify(p)!==JSON.stringify(c.rows)&&(c.rows=[...p])},{deep:!0}),i.watch(s,p=>{JSON.stringify(p)!==JSON.stringify(c.columns)&&(c.columns=[...p],r("columns:update",[...p]))},{deep:!0}),i.onMounted(()=>{s.value.some(p=>p.pinned)&&(u(),c.isTreeView&&Gr(a,u,{childList:!0,subtree:!0}))});const l=i.computed(()=>c.columns.filter(p=>p.pinned).length),u=()=>{const p=a.value,m=p?.rows[0],y=p?.rows[1],g=m?Array.from(m.cells):[];for(const[w,O]of g.entries()){const V=y?.cells[w];V&&(O.style.width=`${V.offsetWidth}px`)}for(const w of p?.rows||[]){let O=0;const V=[];for(const P of w.cells)(P.classList.contains("sticky-column")||P.classList.contains("sticky-index"))&&(P.style.left=`${O}px`,O+=P.offsetWidth,V.push(P));V.length>0&&V[V.length-1].classList.add("sticky-column-edge")}};window.addEventListener("keydown",p=>{if(p.key==="Escape"&&c.modal.visible){c.modal.visible=!1;const m=c.modal.parent;m&&i.nextTick().then(()=>{m.focus()})}});const h=p=>{if(!p.gantt||l.value===0)return c.columns;const m=[];for(let y=0;y<l.value;y++){const g={...c.columns[y]};g.originalIndex=y,m.push(g)}return m.push({...c.columns[l.value],isGantt:!0,colspan:p.gantt?.colspan||c.columns.length-l.value,originalIndex:l.value,width:"auto"}),m},f=p=>{r("connection:event",{type:"create",connection:p})},d=p=>{r("connection:event",{type:"delete",connection:p})};return e({store:c,createConnection:c.createConnection,deleteConnection:c.deleteConnection,getConnectionsForBar:c.getConnectionsForBar,getHandlesForBar:c.getHandlesForBar}),(p,m)=>(i.openBlock(),i.createElementBlock("div",bf,[i.withDirectives((i.openBlock(),i.createElementBlock("table",{ref:"table",class:"atable",style:i.normalizeStyle({width:i.unref(c).config.fullWidth?"100%":"auto"})},[i.renderSlot(p.$slots,"header",{data:i.unref(c)},()=>[i.createVNode(yf,{columns:i.unref(c).columns,store:i.unref(c)},null,8,["columns","store"])],!0),i.createElementVNode("tbody",null,[i.renderSlot(p.$slots,"body",{data:i.unref(c)},()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(i.unref(c).rows,(y,g)=>(i.openBlock(),i.createBlock(Qd,{key:y.id,row:y,rowIndex:g,store:i.unref(c)},{default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(h(y),(w,O)=>(i.openBlock(),i.createElementBlock(i.Fragment,{key:w.name},[w.isGantt?(i.openBlock(),i.createBlock(i.resolveDynamicComponent(w.ganttComponent||"AGanttCell"),{key:0,store:i.unref(c),columnsCount:i.unref(c).columns.length-l.value,color:y.gantt?.color,start:y.gantt?.startIndex,end:y.gantt?.endIndex,colspan:w.colspan,pinned:w.pinned,rowIndex:g,colIndex:w.originalIndex??O,style:i.normalizeStyle({textAlign:w?.align||"center",minWidth:w?.width||"40ch",width:i.unref(c).config.fullWidth?"auto":null}),"onConnection:create":f},null,40,["store","columnsCount","color","start","end","colspan","pinned","rowIndex","colIndex","style"])):(i.openBlock(),i.createBlock(i.resolveDynamicComponent(w.cellComponent||"ACell"),{key:1,store:i.unref(c),pinned:w.pinned,rowIndex:g,colIndex:O,style:i.normalizeStyle({textAlign:w?.align||"center",width:i.unref(c).config.fullWidth?"auto":null}),spellcheck:"false"},null,8,["store","pinned","rowIndex","colIndex","style"]))],64))),128))]),_:2},1032,["row","rowIndex","store"]))),128))],!0)]),i.renderSlot(p.$slots,"footer",{data:i.unref(c)},void 0,!0),i.renderSlot(p.$slots,"modal",{data:i.unref(c)},()=>[i.withDirectives(i.createVNode(wf,{store:i.unref(c)},{default:i.withCtx(()=>[(i.openBlock(),i.createBlock(i.resolveDynamicComponent(i.unref(c).modal.component),i.mergeProps({key:`${i.unref(c).modal.rowIndex}:${i.unref(c).modal.colIndex}`,colIndex:i.unref(c).modal.colIndex,rowIndex:i.unref(c).modal.rowIndex,store:i.unref(c)},i.unref(c).modal.componentProps),null,16,["colIndex","rowIndex","store"]))]),_:1},8,["store"]),[[i.vShow,i.unref(c).modal.visible]])],!0)],4)),[[i.unref(tf),i.unref(c).closeModal]]),i.unref(c).isGanttView&&i.unref(c).isDependencyGraphEnabled?(i.openBlock(),i.createBlock(hf,{key:0,store:i.unref(c),"onConnection:delete":d},null,8,["store"])):i.createCommentVNode("",!0)]))}}),kf=Fn(vf,[["__scopeId","data-v-51a03d16"]]),Zr=i.defineComponent({__name:"Records",setup(t){const{stonecrop:e}=ur(),n=i.computed(()=>e.value?.store.records),o=i.computed(()=>e.value?.schema?.schema?.toArray()),s={view:"list"};return(r,a)=>(i.openBlock(),i.createBlock(i.unref(kf),{rows:n.value,"onUpdate:rows":a[0]||(a[0]=c=>n.value=c),columns:o.value,"onUpdate:columns":a[1]||(a[1]=c=>o.value=c),config:s},null,8,["rows","columns"]))}}),Sf={class:"tabs"},Of={tabindex:"0"},If={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"},Tf={tabindex:"0"},xf={style:{width:"11pt"}},Qr=qn(i.defineComponent({__name:"SheetNav",props:{breadcrumbs:{default:()=>[]}},setup(t){const e=i.ref(!0),n=i.ref(!1),o=i.ref(""),s=i.useTemplateRef("searchinput"),r=i.computed(()=>e.value?"unrotated":"rotated"),a=()=>{e.value=!e.value},c=async()=>{n.value=!n.value,await i.nextTick(()=>{s.value.focus()})},l=f=>{f.preventDefault(),f.stopPropagation()},u=async f=>{f.preventDefault(),f.stopPropagation(),await c()},h=()=>{};return(f,d)=>{const p=i.resolveComponent("router-link");return i.openBlock(),i.createElementBlock("footer",null,[i.createElementVNode("ul",Sf,[i.createElementVNode("li",{class:"hidebreadcrumbs",onClick:a,onKeydown:i.withKeys(a,["enter"])},[i.createElementVNode("a",Of,[i.createElementVNode("div",{class:i.normalizeClass(r.value)},"×",2)])],32),i.createElementVNode("li",{class:"hometab",onClick:h,onKeydown:i.withKeys(h,["enter"]),style:i.normalizeStyle({display:e.value?"block":"none"})},[i.createVNode(p,{to:"/home",tabindex:"0"},{default:i.withCtx(()=>[(i.openBlock(),i.createElementBlock("svg",If,d[5]||(d[5]=[i.createElementVNode("g",null,[i.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
|
|
21
|
+
This will fail in production.`);a=oe,a._s.has(t)||(s?Ln(t,e,o,a):Ar(t,o,a),process.env.NODE_ENV!=="production"&&(r._pinia=a));const u=a._s.get(t);if(process.env.NODE_ENV!=="production"&&c){const h="__hot:"+t,f=s?Ln(h,e,o,a,!0):Ar(h,Q({},o),a,!0);c._hotUpdate(f),delete a.state.value[h],a._s.delete(h)}if(process.env.NODE_ENV!=="production"&&re){const h=i.getCurrentInstance();if(h&&h.proxy&&!c){const f=h.proxy,d="_pStores"in f?f._pStores:f._pStores={};d[t]=u}}return u}return r.$id=t,r}function jn(t){return i.getCurrentScope()?(i.onScopeDispose(t),!0):!1}const vd=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const kd=t=>t!=null,Sd=Object.prototype.toString,Od=t=>Sd.call(t)==="[object Object]",Id=()=>{};function xe(t){return Array.isArray(t)?t:[t]}function Td(t,e,n){return i.watch(t,e,{...n,immediate:!0})}const Bt=vd?window:void 0;function Ut(t){var e;const n=i.toValue(t);return(e=n?.$el)!=null?e:n}function ie(...t){const e=[],n=()=>{e.forEach(c=>c()),e.length=0},o=(c,l,u,h)=>(c.addEventListener(l,u,h),()=>c.removeEventListener(l,u,h)),s=i.computed(()=>{const c=xe(i.toValue(t[0])).filter(l=>l!=null);return c.every(l=>typeof l!="string")?c:void 0}),r=Td(()=>{var c,l;return[(l=(c=s.value)==null?void 0:c.map(u=>Ut(u)))!=null?l:[Bt].filter(u=>u!=null),xe(i.toValue(s.value?t[1]:t[0])),xe(i.unref(s.value?t[2]:t[1])),i.toValue(s.value?t[3]:t[2])]},([c,l,u,h])=>{if(n(),!c?.length||!l?.length||!u?.length)return;const f=Od(h)?{...h}:h;e.push(...c.flatMap(d=>l.flatMap(p=>u.map(m=>o(d,p,m,f)))))},{flush:"post"}),a=()=>{r(),n()};return jn(n),a}function xd(){const t=i.shallowRef(!1),e=i.getCurrentInstance();return e&&i.onMounted(()=>{t.value=!0},e),t}function Vd(t){const e=xd();return i.computed(()=>(e.value,!!t()))}function Nd(t,e,n={}){const{window:o=Bt,...s}=n;let r;const a=Vd(()=>o&&"MutationObserver"in o),c=()=>{r&&(r.disconnect(),r=void 0)},l=i.computed(()=>{const d=i.toValue(t),p=xe(d).map(Ut).filter(kd);return new Set(p)}),u=i.watch(()=>l.value,d=>{c(),a.value&&d.size&&(r=new MutationObserver(e),d.forEach(p=>r.observe(p,s)))},{immediate:!0,flush:"post"}),h=()=>r?.takeRecords(),f=()=>{u(),c()};return jn(f),{isSupported:a,stop:f,takeRecords:h}}function Cd(t,e,n={}){const{window:o=Bt,document:s=o?.document,flush:r="sync"}=n;if(!o||!s)return Id;let a;const c=h=>{a?.(),a=h},l=i.watchEffect(()=>{const h=Ut(t);if(h){const{stop:f}=Nd(s,d=>{d.map(p=>[...p.removedNodes]).flat().some(p=>p===h||p.contains(h))&&e(d)},{window:o,childList:!0,subtree:!0});c(f)}},{flush:r}),u=()=>{l(),c()};return jn(u),u}function $d(t={}){var e;const{window:n=Bt,deep:o=!0,triggerOnRemoval:s=!1}=t,r=(e=t.document)!=null?e:n?.document,a=()=>{var u;let h=r?.activeElement;if(o)for(;h?.shadowRoot;)h=(u=h?.shadowRoot)==null?void 0:u.activeElement;return h},c=i.shallowRef(),l=()=>{c.value=a()};if(n){const u={capture:!0,passive:!0};ie(n,"blur",h=>{h.relatedTarget===null&&l()},u),ie(n,"focus",l,u)}return s&&Cd(c,l,{document:r}),l(),c}const Pd="focusin",Rd="focusout",Dd=":focus-within";function Ad(t,e={}){const{window:n=Bt}=e,o=i.computed(()=>Ut(t)),s=i.shallowRef(!1),r=i.computed(()=>s.value);if(!n||!$d(e).value)return{focused:r};const a={passive:!0};return ie(o,Pd,()=>s.value=!0,a),ie(o,Rd,()=>{var c,l,u;return s.value=(u=(l=(c=o.value)==null?void 0:c.matches)==null?void 0:l.call(c,Dd))!=null?u:!1},a),{focused:r}}function Ld(t,{window:e=Bt,scrollTarget:n}={}){const o=i.ref(!1),s=()=>{if(!e)return;const r=e.document,a=Ut(t);if(!a)o.value=!1;else{const c=a.getBoundingClientRect();o.value=c.top<=(e.innerHeight||r.documentElement.clientHeight)&&c.left<=(e.innerWidth||r.documentElement.clientWidth)&&c.bottom>=0&&c.right>=0}};return i.watch(()=>Ut(t),()=>s(),{immediate:!0,flush:"post"}),e&&ie(n||e,"scroll",s,{capture:!1,passive:!0}),o}const it=t=>{let e=Ld(t).value;return e=e&&t.offsetHeight>0,e},at=t=>t.tabIndex>=0,Lr=t=>{const e=t.target;return Mn(e)},Mn=t=>{let e;if(t instanceof HTMLTableCellElement){const n=t.parentElement?.previousElementSibling;if(n){const o=Array.from(n.children)[t.cellIndex];o&&(e=o)}}else if(t instanceof HTMLTableRowElement){const n=t.previousElementSibling;n&&(e=n)}return e&&(!at(e)||!it(e))?Mn(e):e},jd=t=>{const e=t.target;let n;if(e instanceof HTMLTableCellElement){const o=e.parentElement?.parentElement;if(o){const s=o.firstElementChild?.children[e.cellIndex];s&&(n=s)}}else if(e instanceof HTMLTableRowElement){const o=e.parentElement;if(o){const s=o.firstElementChild;s&&(n=s)}}return n&&(!at(n)||!it(n))?Bn(n):n},jr=t=>{const e=t.target;return Bn(e)},Bn=t=>{let e;if(t instanceof HTMLTableCellElement){const n=t.parentElement?.nextElementSibling;if(n){const o=Array.from(n.children)[t.cellIndex];o&&(e=o)}}else if(t instanceof HTMLTableRowElement){const n=t.nextElementSibling;n&&(e=n)}return e&&(!at(e)||!it(e))?Bn(e):e},Md=t=>{const e=t.target;let n;if(e instanceof HTMLTableCellElement){const o=e.parentElement?.parentElement;if(o){const s=o.lastElementChild?.children[e.cellIndex];s&&(n=s)}}else if(e instanceof HTMLTableRowElement){const o=e.parentElement;if(o){const s=o.lastElementChild;s&&(n=s)}}return n&&(!at(n)||!it(n))?Mn(n):n},Mr=t=>{const e=t.target;return Un(e)},Un=t=>{let e;return t.previousElementSibling?e=t.previousElementSibling:e=t.parentElement?.previousElementSibling?.lastElementChild,e&&(!at(e)||!it(e))?Un(e):e},Br=t=>{const e=t.target;return zn(e)},zn=t=>{let e;return t.nextElementSibling?e=t.nextElementSibling:e=t.parentElement?.nextElementSibling?.firstElementChild,e&&(!at(e)||!it(e))?zn(e):e},Ur=t=>{const e=t.target.parentElement?.firstElementChild;return e&&(!at(e)||!it(e))?zn(e):e},zr=t=>{const e=t.target.parentElement?.lastElementChild;return e&&(!at(e)||!it(e))?Un(e):e},Ve=["alt","control","shift","meta"],Bd={ArrowUp:"up",ArrowDown:"down",ArrowLeft:"left",ArrowRight:"right"},Hr={"keydown.up":t=>{const e=Lr(t);e&&(t.preventDefault(),t.stopPropagation(),e.focus())},"keydown.down":t=>{const e=jr(t);e&&(t.preventDefault(),t.stopPropagation(),e.focus())},"keydown.left":t=>{const e=Mr(t);t.preventDefault(),t.stopPropagation(),e&&e.focus()},"keydown.right":t=>{const e=Br(t);t.preventDefault(),t.stopPropagation(),e&&e.focus()},"keydown.control.up":t=>{const e=jd(t);e&&(t.preventDefault(),t.stopPropagation(),e.focus())},"keydown.control.down":t=>{const e=Md(t);e&&(t.preventDefault(),t.stopPropagation(),e.focus())},"keydown.control.left":t=>{const e=Ur(t);e&&(t.preventDefault(),t.stopPropagation(),e.focus())},"keydown.control.right":t=>{const e=zr(t);e&&(t.preventDefault(),t.stopPropagation(),e.focus())},"keydown.end":t=>{const e=zr(t);e&&(t.preventDefault(),t.stopPropagation(),e.focus())},"keydown.enter":t=>{if(t.target instanceof HTMLTableCellElement){t.preventDefault(),t.stopPropagation();const e=jr(t);e&&e.focus()}},"keydown.shift.enter":t=>{if(t.target instanceof HTMLTableCellElement){t.preventDefault(),t.stopPropagation();const e=Lr(t);e&&e.focus()}},"keydown.home":t=>{const e=Ur(t);e&&(t.preventDefault(),t.stopPropagation(),e.focus())},"keydown.tab":t=>{const e=Br(t);e&&(t.preventDefault(),t.stopPropagation(),e.focus())},"keydown.shift.tab":t=>{const e=Mr(t);e&&(t.preventDefault(),t.stopPropagation(),e.focus())}};function Ud(t){const e=a=>{let c=null;return a.parent&&(typeof a.parent=="string"?c=document.querySelector(a.parent):a.parent instanceof HTMLElement?c=a.parent:c=a.parent.value),c},n=a=>{const c=e(a);let l=[];if(typeof a.selectors=="string")l=c?Array.from(c.querySelectorAll(a.selectors)):Array.from(document.querySelectorAll(a.selectors));else if(Array.isArray(a.selectors))for(const u of a.selectors)u instanceof HTMLElement?l.push(u):l.push(u.$el);else if(a.selectors instanceof HTMLElement)l.push(a.selectors);else if(a.selectors?.value)if(Array.isArray(a.selectors.value))for(const u of a.selectors.value)u instanceof HTMLElement?l.push(u):l.push(u.$el);else l.push(a.selectors.value);return l},o=a=>{const c=e(a);let l=[];return a.selectors?l=n(a):c&&(l=Array.from(c.children).filter(u=>at(u)&&it(u))),l},s=a=>c=>{const l=Bd[c.key]||c.key.toLowerCase();if(Ve.includes(l))return;const u=a.handlers||Hr;for(const h of Object.keys(u)){const[f,...d]=h.split(".");if(f==="keydown"&&d.includes(l)){const p=u[h],m=d.filter(g=>Ve.includes(g)),y=Ve.some(g=>{const w=g.charAt(0).toUpperCase()+g.slice(1);return c.getModifierState(w)});if(m.length>0){if(y){for(const g of Ve)if(d.includes(g)){const w=g.charAt(0).toUpperCase()+g.slice(1);c.getModifierState(w)&&p(c)}}}else y||p(c)}}},r=[];i.onMounted(()=>{for(const a of t){const c=e(a),l=o(a),u=s(a),h=c?[c]:l;for(const f of h){const{focused:d}=Ad(i.ref(f)),p=i.watch(d,m=>{m?f.addEventListener("keydown",u):f.removeEventListener("keydown",u)});r.push(p)}}}),i.onBeforeUnmount(()=>{for(const a of r)a()})}function zt(t){return i.getCurrentScope()?(i.onScopeDispose(t),!0):!1}const Hn=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const zd=t=>t!=null,Hd=Object.prototype.toString,Kr=t=>Hd.call(t)==="[object Object]",bt=()=>{},Kn=Kd();function Kd(){var t,e;return Hn&&((t=window?.navigator)==null?void 0:t.userAgent)&&(/iP(?:ad|hone|od)/.test(window.navigator.userAgent)||((e=window?.navigator)==null?void 0:e.maxTouchPoints)>2&&/iPad|Macintosh/.test(window?.navigator.userAgent))}function Fd(...t){if(t.length!==1)return i.toRef(...t);const e=t[0];return typeof e=="function"?i.readonly(i.customRef(()=>({get:e,set:bt}))):i.ref(e)}function vt(t){return Array.isArray(t)?t:[t]}function Wd(t){return i.getCurrentInstance()}function Gd(t,e=!0,n){Wd()?i.onMounted(t,n):e?t():i.nextTick(t)}function Fr(t,e,n){return i.watch(t,e,{...n,immediate:!0})}const Fn=Hn?window:void 0;function Ht(t){var e;const n=i.toValue(t);return(e=n?.$el)!=null?e:n}function Wr(...t){const e=[],n=()=>{e.forEach(c=>c()),e.length=0},o=(c,l,u,h)=>(c.addEventListener(l,u,h),()=>c.removeEventListener(l,u,h)),s=i.computed(()=>{const c=vt(i.toValue(t[0])).filter(l=>l!=null);return c.every(l=>typeof l!="string")?c:void 0}),r=Fr(()=>{var c,l;return[(l=(c=s.value)==null?void 0:c.map(u=>Ht(u)))!=null?l:[Fn].filter(u=>u!=null),vt(i.toValue(s.value?t[1]:t[0])),vt(i.unref(s.value?t[2]:t[1])),i.toValue(s.value?t[3]:t[2])]},([c,l,u,h])=>{if(n(),!c?.length||!l?.length||!u?.length)return;const f=Kr(h)?{...h}:h;e.push(...c.flatMap(d=>l.flatMap(p=>u.map(m=>o(d,p,m,f)))))},{flush:"post"}),a=()=>{r(),n()};return zt(n),a}function Jd(){const t=i.shallowRef(!1),e=i.getCurrentInstance();return e&&i.onMounted(()=>{t.value=!0},e),t}function Gr(t){const e=Jd();return i.computed(()=>(e.value,!!t()))}function Jr(t,e,n={}){const{window:o=Fn,...s}=n;let r;const a=Gr(()=>o&&"MutationObserver"in o),c=()=>{r&&(r.disconnect(),r=void 0)},l=i.computed(()=>{const d=i.toValue(t),p=vt(d).map(Ht).filter(zd);return new Set(p)}),u=i.watch(()=>l.value,d=>{c(),a.value&&d.size&&(r=new MutationObserver(e),d.forEach(p=>r.observe(p,s)))},{immediate:!0,flush:"post"}),h=()=>r?.takeRecords(),f=()=>{u(),c()};return zt(f),{isSupported:a,stop:f,takeRecords:h}}function Yd(t,e,n={}){const{window:o=Fn,...s}=n;let r;const a=Gr(()=>o&&"ResizeObserver"in o),c=()=>{r&&(r.disconnect(),r=void 0)},l=i.computed(()=>{const f=i.toValue(t);return Array.isArray(f)?f.map(d=>Ht(d)):[Ht(f)]}),u=i.watch(l,f=>{if(c(),a.value&&o){r=new ResizeObserver(e);for(const d of f)d&&r.observe(d,s)}},{immediate:!0,flush:"post"}),h=()=>{c(),u()};return zt(h),{isSupported:a,stop:h}}function qd(t,e={}){const{reset:n=!0,windowResize:o=!0,windowScroll:s=!0,immediate:r=!0,updateTiming:a="sync"}=e,c=i.shallowRef(0),l=i.shallowRef(0),u=i.shallowRef(0),h=i.shallowRef(0),f=i.shallowRef(0),d=i.shallowRef(0),p=i.shallowRef(0),m=i.shallowRef(0);function y(){const w=Ht(t);if(!w){n&&(c.value=0,l.value=0,u.value=0,h.value=0,f.value=0,d.value=0,p.value=0,m.value=0);return}const O=w.getBoundingClientRect();c.value=O.height,l.value=O.bottom,u.value=O.left,h.value=O.right,f.value=O.top,d.value=O.width,p.value=O.x,m.value=O.y}function g(){a==="sync"?y():a==="next-frame"&&requestAnimationFrame(()=>y())}return Yd(t,g),i.watch(()=>Ht(t),w=>!w&&g()),Jr(t,g,{attributeFilter:["style","class"]}),s&&Wr("scroll",g,{capture:!0,passive:!0}),o&&Wr("resize",g,{passive:!0}),Gd(()=>{r&&g()}),{height:c,bottom:l,left:u,right:h,top:f,width:d,x:p,y:m,update:g}}const Xd=(t=8)=>Array.from({length:t},()=>Math.floor(Math.random()*16).toString(16)).join(""),Wn=(t,e)=>{const n=t.__vccOpts||t;for(const[o,s]of e)n[o]=s;return n},Zd=["tabindex"],Qd=i.defineComponent({__name:"ARow",props:{rowIndex:{},store:{},tabIndex:{default:()=>-1},addNavigation:{type:[Boolean,Object],default:!1}},setup(t){const e=i.useTemplateRef("rowEl"),n=i.computed(()=>t.store.isRowVisible(t.rowIndex)),o=i.computed(()=>t.store.getRowExpandSymbol(t.rowIndex));if(t.addNavigation){let s=Hr;typeof t.addNavigation=="object"&&(s={...s,...t.addNavigation}),Ud([{selectors:e,handlers:s}])}return(s,r)=>i.withDirectives((i.openBlock(),i.createElementBlock("tr",{ref:"rowEl",tabindex:s.tabIndex,class:"atable-row"},[s.store.config.view!=="uncounted"?i.renderSlot(s.$slots,"index",{key:0},()=>[s.store.config.view==="list"?(i.openBlock(),i.createElementBlock("td",{key:0,tabIndex:-1,class:i.normalizeClass(["list-index",s.store.hasPinnedColumns?"sticky-index":""])},i.toDisplayString(s.rowIndex+1),3)):s.store.isTreeView?(i.openBlock(),i.createElementBlock("td",{key:1,tabIndex:-1,class:i.normalizeClass(["tree-index",s.store.hasPinnedColumns?"sticky-index":""]),onClick:r[0]||(r[0]=a=>s.store.toggleRowExpand(s.rowIndex))},i.toDisplayString(o.value),3)):i.createCommentVNode("",!0)],!0):i.createCommentVNode("",!0),i.renderSlot(s.$slots,"default",{},void 0,!0)],8,Zd)),[[i.vShow,n.value]])}}),tf=Wn(Qd,[["__scopeId","data-v-c554ee0f"]]),Gn=Hn?window:void 0;function kt(t){var e;const n=i.toValue(t);return(e=n?.$el)!=null?e:n}function Ne(...t){const e=[],n=()=>{e.forEach(c=>c()),e.length=0},o=(c,l,u,h)=>(c.addEventListener(l,u,h),()=>c.removeEventListener(l,u,h)),s=i.computed(()=>{const c=vt(i.toValue(t[0])).filter(l=>l!=null);return c.every(l=>typeof l!="string")?c:void 0}),r=Fr(()=>{var c,l;return[(l=(c=s.value)==null?void 0:c.map(u=>kt(u)))!=null?l:[Gn].filter(u=>u!=null),vt(i.toValue(s.value?t[1]:t[0])),vt(i.unref(s.value?t[2]:t[1])),i.toValue(s.value?t[3]:t[2])]},([c,l,u,h])=>{if(n(),!c?.length||!l?.length||!u?.length)return;const f=Kr(h)?{...h}:h;e.push(...c.flatMap(d=>l.flatMap(p=>u.map(m=>o(d,p,m,f)))))},{flush:"post"}),a=()=>{r(),n()};return zt(n),a}let Yr=!1;function qr(t,e,n={}){const{window:o=Gn,ignore:s=[],capture:r=!0,detectIframe:a=!1,controls:c=!1}=n;if(!o)return c?{stop:bt,cancel:bt,trigger:bt}:bt;if(Kn&&!Yr){Yr=!0;const g={passive:!0};Array.from(o.document.body.children).forEach(w=>w.addEventListener("click",bt,g)),o.document.documentElement.addEventListener("click",bt,g)}let l=!0;const u=g=>i.toValue(s).some(w=>{if(typeof w=="string")return Array.from(o.document.querySelectorAll(w)).some(O=>O===g.target||g.composedPath().includes(O));{const O=kt(w);return O&&(g.target===O||g.composedPath().includes(O))}});function h(g){const w=i.toValue(g);return w&&w.$.subTree.shapeFlag===16}function f(g,w){const O=i.toValue(g),V=O.$.subTree&&O.$.subTree.children;return V==null||!Array.isArray(V)?!1:V.some(R=>R.el===w.target||w.composedPath().includes(R.el))}const d=g=>{const w=kt(t);if(g.target!=null&&!(!(w instanceof Element)&&h(t)&&f(t,g))&&!(!w||w===g.target||g.composedPath().includes(w))){if("detail"in g&&g.detail===0&&(l=!u(g)),!l){l=!0;return}e(g)}};let p=!1;const m=[Ne(o,"click",g=>{p||(p=!0,setTimeout(()=>{p=!1},0),d(g))},{passive:!0,capture:r}),Ne(o,"pointerdown",g=>{const w=kt(t);l=!u(g)&&!!(w&&!g.composedPath().includes(w))},{passive:!0}),a&&Ne(o,"blur",g=>{setTimeout(()=>{var w;const O=kt(t);((w=o.document.activeElement)==null?void 0:w.tagName)==="IFRAME"&&!O?.contains(o.document.activeElement)&&e(g)},0)},{passive:!0})].filter(Boolean),y=()=>m.forEach(g=>g());return c?{stop:y,cancel:()=>{l=!1},trigger:g=>{l=!0,d(g),l=!1}}:y}const Jn=new WeakMap,ef={mounted(t,e){const n=!e.modifiers.bubble;let o;if(typeof e.value=="function")o=qr(t,e.value,{capture:n});else{const[s,r]=e.value;o=qr(t,s,Object.assign({capture:n},r))}Jn.set(t,o)},unmounted(t){const e=Jn.get(t);e&&typeof e=="function"?e():e?.stop(),Jn.delete(t)}};function nf(){const t=i.shallowRef(!1),e=i.getCurrentInstance();return e&&i.onMounted(()=>{t.value=!0},e),t}function of(t){const e=nf();return i.computed(()=>(e.value,!!t()))}function Xr(t,e,n={}){const{window:o=Gn,...s}=n;let r;const a=of(()=>o&&"ResizeObserver"in o),c=()=>{r&&(r.disconnect(),r=void 0)},l=i.computed(()=>{const f=i.toValue(t);return Array.isArray(f)?f.map(d=>kt(d)):[kt(f)]}),u=i.watch(l,f=>{if(c(),a.value&&o){r=new ResizeObserver(e);for(const d of f)d&&r.observe(d,s)}},{immediate:!0,flush:"post"}),h=()=>{c(),u()};return zt(h),{isSupported:a,stop:h}}function Yn(t){return typeof Window<"u"&&t instanceof Window?t.document.documentElement:typeof Document<"u"&&t instanceof Document?t.documentElement:t}const sf={mounted(t,e){typeof e.value=="function"?Xr(t,e.value):Xr(t,...e.value)}};function Zr(t){const e=window.getComputedStyle(t);if(e.overflowX==="scroll"||e.overflowY==="scroll"||e.overflowX==="auto"&&t.clientWidth<t.scrollWidth||e.overflowY==="auto"&&t.clientHeight<t.scrollHeight)return!0;{const n=t.parentNode;return!n||n.tagName==="BODY"?!1:Zr(n)}}function rf(t){const e=t||window.event,n=e.target;return Zr(n)?!1:e.touches.length>1?!0:(e.preventDefault&&e.preventDefault(),!1)}const qn=new WeakMap;function af(t,e=!1){const n=i.shallowRef(e);let o=null,s="";i.watch(Fd(t),c=>{const l=Yn(i.toValue(c));if(l){const u=l;if(qn.get(u)||qn.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 r=()=>{const c=Yn(i.toValue(t));!c||n.value||(Kn&&(o=Ne(c,"touchmove",l=>{rf(l)},{passive:!1})),c.style.overflow="hidden",n.value=!0)},a=()=>{const c=Yn(i.toValue(t));!c||!n.value||(Kn&&o?.(),c.style.overflow=s,qn.delete(c),n.value=!1)};return zt(a),i.computed({get(){return n.value},set(c){c?r():a()}})}function cf(){let t=!1;const e=i.shallowRef(!1);return(n,o)=>{if(e.value=o.value,t)return;t=!0;const s=af(n,o.value);i.watch(e,r=>s.value=r)}}cf();const lf={class:"gantt-connection-overlay"},uf={class:"connection-svg",style:{position:"absolute",top:0,left:0,width:"100%",height:"100%",pointerEvents:"none",zIndex:1}},df=["d","stroke-width","onDblclick"],ff=["d","stroke","stroke-width","id","onDblclick"],pf=.25,Ce=16,hf=i.defineComponent({__name:"AGanttConnection",props:{store:{}},emits:["connection:delete"],setup(t,{emit:e}){const n=e,o=i.computed(()=>t.store.connectionPaths.filter(a=>{const c=t.store.ganttBars.find(u=>u.id===a.from.barId),l=t.store.ganttBars.find(u=>u.id===a.to.barId);return c&&l})),s=(a,c=!1)=>{const l=t.store.connectionHandles.find(M=>M.barId===a.from.barId&&M.side===a.from.side),u=t.store.connectionHandles.find(M=>M.barId===a.to.barId&&M.side===a.to.side);if(!l||!u)return"";const h=l.position.x+Ce/2,f=l.position.y+Ce/2,d=u.position.x+Ce/2,p=u.position.y+Ce/2,m=Math.abs(d-h),y=Math.max(m*pf,50),g=h+(a.from.side==="left"?-y:y),w=d+(a.to.side==="left"?-y:y),O={x:.5*h+.5*g,y:.5*f+.5*f},V={x:.5*g+.5*w,y:.5*f+.5*p},R={x:.5*w+.5*d,y:.5*p+.5*p},j={x:.5*O.x+.5*V.x,y:.5*O.y+.5*V.y},q={x:.5*V.x+.5*R.x,y:.5*V.y+.5*R.y},k={x:.5*j.x+.5*q.x,y:.5*j.y+.5*q.y};return`M ${h} ${f} Q ${g} ${f}, ${k.x} ${k.y} Q ${w} ${p}, ${d} ${p}`},r=a=>{t.store.deleteConnection(a.id)&&n("connection:delete",a)};return(a,c)=>(i.openBlock(),i.createElementBlock("div",lf,[(i.openBlock(),i.createElementBlock("svg",uf,[c[0]||(c[0]=i.createElementVNode("defs",null,[i.createElementVNode("path",{id:"arrowhead",d:"M 0 -7 L 20 0 L 0 7Z",stroke:"black","stroke-width":"1",fill:"currentColor"}),i.createElementVNode("marker",{id:"arrowhead-marker",markerWidth:"10",markerHeight:"7",refX:"5",refY:"3.5",orient:"auto",markerUnits:"strokeWidth"},[i.createElementVNode("polygon",{points:"0 0, 10 3.5, 0 7",fill:"currentColor"})])],-1)),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(o.value,l=>(i.openBlock(),i.createElementBlock("path",{key:`${l.id}-hitbox`,d:s(l),stroke:"transparent","stroke-width":(l.style?.width||2)+10,fill:"none",class:"connection-hitbox",onDblclick:u=>r(l)},null,40,df))),128)),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(o.value,l=>(i.openBlock(),i.createElementBlock("path",{key:l.id,d:s(l),stroke:l.style?.color||"#666","stroke-width":l.style?.width||2,fill:"none","marker-mid":"url(#arrowhead-marker)",id:l.id,class:"connection-path animated-path",onDblclick:u=>r(l)},null,40,ff))),128))]))]))}}),mf=Wn(hf,[["__scopeId","data-v-955111b6"]]),gf={key:0},_f={class:"atable-header-row",tabindex:"-1"},yf=["data-colindex"],wf=i.defineComponent({__name:"ATableHeader",props:{columns:{},store:{}},setup(t){const e=n=>{for(const o of n){if(o.borderBoxSize.length===0)continue;const s=o.borderBoxSize[0].inlineSize,r=Number(o.target.dataset.colindex),a=t.store.columns[r]?.width;typeof a=="number"&&a!==s&&t.store.resizeColumn(r,s)}};return(n,o)=>n.columns.length?(i.openBlock(),i.createElementBlock("thead",gf,[i.createElementVNode("tr",_f,[n.store.zeroColumn?(i.openBlock(),i.createElementBlock("th",{key:0,id:"header-index",class:i.normalizeClass([[n.store.hasPinnedColumns?"sticky-index":"",n.store.isTreeView?"tree-index":"",n.store.config.view==="list-expansion"?"list-expansion-index":""],"list-index"])},null,2)):i.createCommentVNode("",!0),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(n.columns,(s,r)=>i.withDirectives((i.openBlock(),i.createElementBlock("th",{key:s.name,"data-colindex":r,tabindex:"-1",style:i.normalizeStyle(n.store.getHeaderCellStyle(s)),class:i.normalizeClass(s.pinned?"sticky-column":"")},[i.renderSlot(n.$slots,"default",{},()=>[i.createTextVNode(i.toDisplayString(s.label||String.fromCharCode(r+97).toUpperCase()),1)])],14,yf)),[[i.unref(sf),e]])),128))])])):i.createCommentVNode("",!0)}}),Ef=i.defineComponent({__name:"ATableModal",props:{store:{}},setup(t){const e=i.useTemplateRef("amodal"),{width:n,height:o}=qd(e),s=i.computed(()=>{if(!(t.store.modal.height&&t.store.modal.width&&t.store.modal.left&&t.store.modal.bottom))return;const r=t.store.modal.cell?.closest("table"),a=r.offsetHeight||0,c=r.offsetWidth||0;let l=t.store.modal.cell?.offsetTop||0;const u=r.querySelector("thead")?.offsetHeight||0;l+=u,l=l+o.value<a?l:l-(o.value+t.store.modal.height);let h=t.store.modal.cell?.offsetLeft||0;return h=h+n.value<=c?h:h-(n.value-t.store.modal.width),{left:`${h}px`,top:`${l}px`}});return(r,a)=>(i.openBlock(),i.createElementBlock("div",{class:"amodal",ref:"amodal",tabindex:"-1",onClick:a[0]||(a[0]=i.withModifiers(()=>{},["stop"])),onInput:a[1]||(a[1]=i.withModifiers(()=>{},["stop"])),style:i.normalizeStyle(s.value)},[i.renderSlot(r.$slots,"default")],36))}}),bf=t=>{const e=t.id||Xd();return bd(`table-${e}`,()=>{const n=()=>{const _=[Object.assign({},{rowModified:!1})],b=new Set;for(let P=0;P<s.value.length;P++){const L=s.value[P];L.parent!==null&&L.parent!==void 0&&b.add(L.parent)}const x=P=>s.value[P]?.gantt!==void 0,$=P=>{for(let L=0;L<s.value.length;L++)if(s.value[L].parent===P&&(x(L)||$(L)))return!0;return!1},B=P=>{const L=r.value,ae=L.view==="tree"||L.view==="tree-gantt"?L.defaultTreeExpansion:void 0;if(!ae)return!0;switch(ae){case"root":return!1;case"branch":return $(P);case"leaf":return!0;default:return!0}};for(let P=0;P<s.value.length;P++){const L=s.value[P],ae=L.parent===null||L.parent===void 0,Cf=b.has(P);_[P]={childrenOpen:B(P),expanded:!1,indent:L.indent||0,isParent:Cf,isRoot:ae,rowModified:!1,open:ae,parent:L.parent}}return _},o=i.ref(t.columns),s=i.ref(t.rows),r=i.ref(t.config||{}),a=i.ref({}),c=i.ref({}),l=i.computed(()=>{const _={};for(const[b,x]of o.value.entries())for(const[$,B]of s.value.entries())_[`${b}:${$}`]=B[x.name];return _}),u=i.computed({get:()=>{const _=n();for(let b=0;b<_.length;b++)a.value[b]&&(_[b].rowModified=a.value[b]),c.value[b]&&(c.value[b].childrenOpen!==void 0&&(_[b].childrenOpen=c.value[b].childrenOpen),c.value[b].expanded!==void 0&&(_[b].expanded=c.value[b].expanded));if(w.value){const b=(x,$)=>{const B=$[x];if(B.isRoot||B.parent===null||B.parent===void 0)return!0;const P=B.parent;return P<0||P>=$.length?!1:($[P].childrenOpen||!1)&&b(P,$)};for(let x=0;x<_.length;x++)_[x].isRoot||(_[x].open=b(x,_))}return _},set:_=>{JSON.stringify(_)!==JSON.stringify(u.value)&&(u.value=_)}}),h=i.ref(t.modal||{visible:!1}),f=i.ref({}),d=i.ref([]),p=i.ref([]),m=i.ref([]),y=i.computed(()=>o.value.some(_=>_.pinned)),g=i.computed(()=>r.value.view==="gantt"||r.value.view==="tree-gantt"),w=i.computed(()=>r.value.view==="tree"||r.value.view==="tree-gantt"),O=i.computed(()=>{const _=r.value;return _.view==="gantt"||_.view==="tree-gantt"?_.dependencyGraph!==!1:!0}),V=i.computed(()=>`${Math.ceil(s.value.length/100+1)}ch`),R=i.computed(()=>r.value.view?["list","tree","tree-gantt","list-expansion"].includes(r.value.view):!1),j=(_,b)=>l.value[`${_}:${b}`],q=(_,b,x)=>{const $=`${_}:${b}`,B=o.value[_];l.value[$]!==x&&(a.value[b]=!0),l.value[$]=x,s.value[b]={...s.value[b],[B.name]:x}},k=_=>{s.value=_},M=(_,b,x)=>{const $=`${_}:${b}`;l.value[$]!==x&&(a.value[b]=!0,f.value[$]=x)},I=_=>{const b=o.value.indexOf(_)===o.value.length-1,x=r.value.fullWidth?_.resizable&&!b:_.resizable;return{width:_.width||"40ch",textAlign:_.align||"center",...x&&{resize:"horizontal",overflow:"hidden",whiteSpace:"nowrap"}}},E=(_,b)=>{if(_<0||_>=o.value.length)return;const x=Math.max(b,40);o.value[_]={...o.value[_],width:`${x}px`}},S=_=>{const b=s.value[_];return g.value&&b.gantt!==void 0},N=_=>!w.value||u.value[_].isRoot||u.value[_].open,D=_=>!w.value&&r.value.view!=="list-expansion"?"":w.value&&(u.value[_].isRoot||u.value[_].isParent)?u.value[_].childrenOpen?"▼":"►":r.value.view==="list-expansion"?u.value[_].expanded?"▼":"►":"",J=_=>{if(w.value){const b=c.value[_]||{},x=!(b.childrenOpen??u.value[_].childrenOpen);c.value[_]={...b,childrenOpen:x},x||H(_)}else if(r.value.view==="list-expansion"){const b=c.value[_]||{},x=b.expanded??u.value[_].expanded;c.value[_]={...b,expanded:!x}}},H=_=>{for(let b=0;b<s.value.length;b++)if(u.value[b].parent===_){const x=c.value[b]||{};c.value[b]={...x,childrenOpen:!1},H(b)}},C=(_,b)=>{const x=j(_,b);return W(_,b,x)},W=(_,b,x)=>{const $=o.value[_],B=s.value[b],P=$.format;return P?typeof P=="function"?P(x,{table:l.value,row:B,column:$}):typeof P=="string"?Function(`"use strict";return (${P})`)()(x,{table:l.value,row:B,column:$}):x:x};return{columns:o,config:r,connectionHandles:p,connectionPaths:m,display:u,ganttBars:d,modal:h,rows:s,table:l,updates:f,hasPinnedColumns:y,isGanttView:g,isTreeView:w,isDependencyGraphEnabled:O,numberedRowWidth:V,zeroColumn:R,closeModal:_=>{_.target instanceof Node&&h.value.parent?.contains(_.target)||h.value.visible&&(h.value.visible=!1)},createConnection:(_,b,x)=>{const $=p.value.find(L=>L.id===_),B=p.value.find(L=>L.id===b);if(!$||!B)return console.warn("Cannot create connection: handle not found"),null;const P={id:`connection-${_}-${b}`,from:{barId:$.barId,side:$.side},to:{barId:B.barId,side:B.side},style:x?.style,label:x?.label};return m.value.push(P),P},deleteConnection:_=>{const b=m.value.findIndex(x=>x.id===_);return b>=0?(m.value.splice(b,1),!0):!1},getCellData:j,getCellDisplayValue:C,getConnectionsForBar:_=>m.value.filter(b=>b.from.barId===_||b.to.barId===_),getFormattedValue:W,getHandlesForBar:_=>p.value.filter(b=>b.barId===_),getHeaderCellStyle:I,getIndent:(_,b)=>b&&_===0&&b>0?`${b}ch`:"inherit",getRowExpandSymbol:D,isRowGantt:S,isRowVisible:N,registerConnectionHandle:_=>{const b=p.value.findIndex(x=>x.id===_.id);b>=0?p.value[b]=_:p.value.push(_)},registerGanttBar:_=>{const b=d.value.findIndex(x=>x.id===_.id);b>=0?d.value[b]=_:d.value.push(_)},resizeColumn:E,setCellData:q,setCellText:M,toggleRowExpand:J,unregisterConnectionHandle:_=>{const b=p.value.findIndex(x=>x.id===_);b>=0&&p.value.splice(b,1)},unregisterGanttBar:_=>{const b=d.value.findIndex(x=>x.id===_);b>=0&&d.value.splice(b,1)},updateGanttBar:_=>{const b=s.value[_.rowIndex]?.gantt;b&&(_.type==="resize"?_.edge==="start"?(b.startIndex=_.newStart,b.endIndex=_.end,b.colspan=b.endIndex-b.startIndex):_.edge==="end"&&(b.startIndex=_.start,b.endIndex=_.newEnd,b.colspan=b.endIndex-b.startIndex):_.type==="bar"&&(b.startIndex=_.newStart,b.endIndex=_.newEnd,b.colspan=b.endIndex-b.startIndex))},updateRows:k}})()},vf={class:"atable-container",style:{position:"relative"}},kf=i.defineComponent({__name:"ATable",props:i.mergeModels({id:{},config:{default:()=>new Object}},{rows:{required:!0},rowsModifiers:{},columns:{required:!0},columnsModifiers:{}}),emits:i.mergeModels(["cellUpdate","gantt:drag","connection:event","columns:update"],["update:rows","update:columns"]),setup(t,{expose:e,emit:n}){const o=i.useModel(t,"rows"),s=i.useModel(t,"columns"),r=n,a=i.useTemplateRef("table"),c=bf({columns:s.value,rows:o.value,id:t.id,config:t.config});c.$onAction(({name:p,store:m,args:y,after:g})=>{if(p==="setCellData"||p==="setCellText"){const[w,O,V]=y,R=m.getCellData(w,O);g(()=>{o.value=[...m.rows],r("cellUpdate",{colIndex:w,rowIndex:O,newValue:V,oldValue:R})})}else if(p==="updateGanttBar"){const[w]=y;let O=!1;w.type==="resize"?O=w.oldColspan!==w.newColspan:w.type==="bar"&&(O=w.oldStart!==w.newStart||w.oldEnd!==w.newEnd),O&&g(()=>{r("gantt:drag",w)})}else p==="resizeColumn"&&g(()=>{s.value=[...m.columns],r("columns:update",[...m.columns])})}),i.watch(()=>o.value,p=>{JSON.stringify(p)!==JSON.stringify(c.rows)&&(c.rows=[...p])},{deep:!0}),i.watch(s,p=>{JSON.stringify(p)!==JSON.stringify(c.columns)&&(c.columns=[...p],r("columns:update",[...p]))},{deep:!0}),i.onMounted(()=>{s.value.some(p=>p.pinned)&&(u(),c.isTreeView&&Jr(a,u,{childList:!0,subtree:!0}))});const l=i.computed(()=>c.columns.filter(p=>p.pinned).length),u=()=>{const p=a.value,m=p?.rows[0],y=p?.rows[1],g=m?Array.from(m.cells):[];for(const[w,O]of g.entries()){const V=y?.cells[w];V&&(O.style.width=`${V.offsetWidth}px`)}for(const w of p?.rows||[]){let O=0;const V=[];for(const R of w.cells)(R.classList.contains("sticky-column")||R.classList.contains("sticky-index"))&&(R.style.left=`${O}px`,O+=R.offsetWidth,V.push(R));V.length>0&&V[V.length-1].classList.add("sticky-column-edge")}};window.addEventListener("keydown",p=>{if(p.key==="Escape"&&c.modal.visible){c.modal.visible=!1;const m=c.modal.parent;m&&i.nextTick().then(()=>{m.focus()})}});const h=p=>{if(!p.gantt||l.value===0)return c.columns;const m=[];for(let y=0;y<l.value;y++){const g={...c.columns[y]};g.originalIndex=y,m.push(g)}return m.push({...c.columns[l.value],isGantt:!0,colspan:p.gantt?.colspan||c.columns.length-l.value,originalIndex:l.value,width:"auto"}),m},f=p=>{r("connection:event",{type:"create",connection:p})},d=p=>{r("connection:event",{type:"delete",connection:p})};return e({store:c,createConnection:c.createConnection,deleteConnection:c.deleteConnection,getConnectionsForBar:c.getConnectionsForBar,getHandlesForBar:c.getHandlesForBar}),(p,m)=>(i.openBlock(),i.createElementBlock("div",vf,[i.withDirectives((i.openBlock(),i.createElementBlock("table",{ref:"table",class:"atable",style:i.normalizeStyle({width:i.unref(c).config.fullWidth?"100%":"auto"})},[i.renderSlot(p.$slots,"header",{data:i.unref(c)},()=>[i.createVNode(wf,{columns:i.unref(c).columns,store:i.unref(c)},null,8,["columns","store"])],!0),i.createElementVNode("tbody",null,[i.renderSlot(p.$slots,"body",{data:i.unref(c)},()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(i.unref(c).rows,(y,g)=>(i.openBlock(),i.createBlock(tf,{key:y.id,row:y,rowIndex:g,store:i.unref(c)},{default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(h(y),(w,O)=>(i.openBlock(),i.createElementBlock(i.Fragment,{key:w.name},[w.isGantt?(i.openBlock(),i.createBlock(i.resolveDynamicComponent(w.ganttComponent||"AGanttCell"),{key:0,store:i.unref(c),columnsCount:i.unref(c).columns.length-l.value,color:y.gantt?.color,start:y.gantt?.startIndex,end:y.gantt?.endIndex,colspan:w.colspan,pinned:w.pinned,rowIndex:g,colIndex:w.originalIndex??O,style:i.normalizeStyle({textAlign:w?.align||"center",minWidth:w?.width||"40ch",width:i.unref(c).config.fullWidth?"auto":null}),"onConnection:create":f},null,40,["store","columnsCount","color","start","end","colspan","pinned","rowIndex","colIndex","style"])):(i.openBlock(),i.createBlock(i.resolveDynamicComponent(w.cellComponent||"ACell"),{key:1,store:i.unref(c),pinned:w.pinned,rowIndex:g,colIndex:O,style:i.normalizeStyle({textAlign:w?.align||"center",width:i.unref(c).config.fullWidth?"auto":null}),spellcheck:"false"},null,8,["store","pinned","rowIndex","colIndex","style"]))],64))),128))]),_:2},1032,["row","rowIndex","store"]))),128))],!0)]),i.renderSlot(p.$slots,"footer",{data:i.unref(c)},void 0,!0),i.renderSlot(p.$slots,"modal",{data:i.unref(c)},()=>[i.withDirectives(i.createVNode(Ef,{store:i.unref(c)},{default:i.withCtx(()=>[(i.openBlock(),i.createBlock(i.resolveDynamicComponent(i.unref(c).modal.component),i.mergeProps({key:`${i.unref(c).modal.rowIndex}:${i.unref(c).modal.colIndex}`,colIndex:i.unref(c).modal.colIndex,rowIndex:i.unref(c).modal.rowIndex,store:i.unref(c)},i.unref(c).modal.componentProps),null,16,["colIndex","rowIndex","store"]))]),_:1},8,["store"]),[[i.vShow,i.unref(c).modal.visible]])],!0)],4)),[[i.unref(ef),i.unref(c).closeModal]]),i.unref(c).isGanttView&&i.unref(c).isDependencyGraphEnabled?(i.openBlock(),i.createBlock(mf,{key:0,store:i.unref(c),"onConnection:delete":d},null,8,["store"])):i.createCommentVNode("",!0)]))}}),Sf=Wn(kf,[["__scopeId","data-v-51a03d16"]]),Qr=i.defineComponent({__name:"Records",setup(t){const{stonecrop:e}=dr(),n=i.computed(()=>e.value?.store.records),o=i.computed(()=>e.value?.schema?.schema?.toArray()),s={view:"list"};return(r,a)=>(i.openBlock(),i.createBlock(i.unref(Sf),{rows:n.value,"onUpdate:rows":a[0]||(a[0]=c=>n.value=c),columns:o.value,"onUpdate:columns":a[1]||(a[1]=c=>o.value=c),config:s},null,8,["rows","columns"]))}}),Of={class:"tabs"},If={tabindex:"0"},Tf={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"},xf={tabindex:"0"},Vf={style:{width:"11pt"}},ti=Xn(i.defineComponent({__name:"SheetNav",props:{breadcrumbs:{default:()=>[]}},setup(t){const e=i.ref(!0),n=i.ref(!1),o=i.ref(""),s=i.useTemplateRef("searchinput"),r=i.computed(()=>e.value?"unrotated":"rotated"),a=()=>{e.value=!e.value},c=async()=>{n.value=!n.value,await i.nextTick(()=>{s.value.focus()})},l=f=>{f.preventDefault(),f.stopPropagation()},u=async f=>{f.preventDefault(),f.stopPropagation(),await c()},h=()=>{};return(f,d)=>{const p=i.resolveComponent("router-link");return i.openBlock(),i.createElementBlock("footer",null,[i.createElementVNode("ul",Of,[i.createElementVNode("li",{class:"hidebreadcrumbs",onClick:a,onKeydown:i.withKeys(a,["enter"])},[i.createElementVNode("a",If,[i.createElementVNode("div",{class:i.normalizeClass(r.value)},"×",2)])],32),i.createElementVNode("li",{class:"hometab",onClick:h,onKeydown:i.withKeys(h,["enter"]),style:i.normalizeStyle({display:e.value?"block":"none"})},[i.createVNode(p,{to:"/home",tabindex:"0"},{default:i.withCtx(()=>[(i.openBlock(),i.createElementBlock("svg",Tf,d[5]||(d[5]=[i.createElementVNode("g",null,[i.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
|
|
22
22
|
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
|
|
23
23
|
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
|
|
24
24
|
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
|
|
@@ -26,5 +26,5 @@ This will fail in production.`);a=oe,a._s.has(t)||(s?An(t,e,o,a):Dr(t,o,a),proce
|
|
|
26
26
|
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
|
|
27
27
|
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
|
|
28
28
|
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
|
|
29
|
-
C81.03,234.149,81.03,385.666,81.03,385.666z`})],-1)])))]),_:1})],36),i.createElementVNode("li",{class:"searchtab",onClick:c,onKeydown:i.withKeys(c,["enter"]),style:i.normalizeStyle({display:e.value?"block":"none"})},[i.createElementVNode("a",
|
|
29
|
+
C81.03,234.149,81.03,385.666,81.03,385.666z`})],-1)])))]),_:1})],36),i.createElementVNode("li",{class:"searchtab",onClick:c,onKeydown:i.withKeys(c,["enter"]),style:i.normalizeStyle({display:e.value?"block":"none"})},[i.createElementVNode("a",xf,[i.createElementVNode("span",{style:i.normalizeStyle({display:n.value?"none":"block"})},[(i.openBlock(),i.createElementBlock("svg",Vf,d[6]||(d[6]=[i.createElementVNode("g",{transform:"matrix(-0.08088215,0,0,0.08088215,9.8016177,3.1263021e-6)"},[i.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),i.withDirectives(i.createElementVNode("input",{"onUpdate:modelValue":d[0]||(d[0]=m=>o.value=m),ref:"searchinput",style:i.normalizeStyle({display:n.value?"block":"none"}),onClick:d[1]||(d[1]=m=>l(m)),onInput:d[2]||(d[2]=m=>l(m)),onBlur:d[3]||(d[3]=m=>u(m)),onKeydown:d[4]||(d[4]=i.withKeys(m=>u(m),["enter"])),type:"text"},null,36),[[i.vModelText,o.value]])])],36),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(f.breadcrumbs,m=>(i.openBlock(),i.createElementBlock("li",{key:m.title,style:i.normalizeStyle({display:e.value?"block":"none"})},[i.createVNode(p,{tabindex:"0",to:m.to},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(m.title),1)]),_:2},1032,["to"])],4))),128))])])}}}),[["__scopeId","data-v-a650f215"]]),Nf={install:t=>{t.component("ActionSet",Zn),t.component("CommandPalette",Qn),t.component("Doctype",Nr),t.component("Records",Qr),t.component("SheetNav",ti)}};X.ActionSet=Zn,X.CommandPalette=Qn,X.Doctype=Nr,X.Records=Qr,X.SheetNav=ti,X.StonecropDesktop=Nf,Object.defineProperty(X,Symbol.toStringTag,{value:"Module"})});
|
|
30
30
|
//# sourceMappingURL=desktop.umd.cjs.map
|