@stonecrop/stonecrop 0.4.28 → 0.4.29
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/composable.js +3 -4
- package/dist/doctype.js +12 -1
- package/dist/index.js +2 -1
- package/dist/registry.js +5 -5
- package/dist/src/composable.d.ts.map +1 -1
- package/dist/src/doctype.d.ts +12 -1
- package/dist/src/doctype.d.ts.map +1 -1
- package/dist/src/index.d.ts +2 -1
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/registry.d.ts +4 -4
- package/dist/src/registry.d.ts.map +1 -1
- package/dist/src/stonecrop.d.ts +8 -58
- package/dist/src/stonecrop.d.ts.map +1 -1
- package/dist/src/stores/index.d.ts.map +1 -1
- package/dist/src/types/index.d.ts +3 -3
- package/dist/src/types/index.d.ts.map +1 -1
- package/dist/stonecrop.d.ts +31 -69
- package/dist/stonecrop.js +3772 -1723
- package/dist/stonecrop.js.map +1 -1
- package/dist/stonecrop.umd.cjs +8 -6
- package/dist/stonecrop.umd.cjs.map +1 -1
- package/dist/stores/index.js +0 -2
- package/package.json +14 -7
- package/src/composable.ts +3 -5
- package/src/doctype.ts +12 -1
- package/src/index.ts +2 -1
- package/src/registry.ts +22 -9
- package/src/stonecrop.ts +25 -87
- package/src/stores/index.ts +0 -2
- package/src/types/index.ts +3 -3
- package/dist/src/stores/xstate.d.ts +0 -31
- package/dist/src/stores/xstate.d.ts.map +0 -1
- package/dist/stores/xstate.js +0 -29
- package/src/stores/xstate.ts +0 -34
package/dist/stonecrop.umd.cjs
CHANGED
|
@@ -1,12 +1,14 @@
|
|
|
1
|
-
(function(V,v){typeof exports=="object"&&typeof module<"u"?v(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],v):(V=typeof globalThis<"u"?globalThis:V||self,v(V["@stonecrop/stonecrop"]={},V.Vue))})(this,function(V,v){"use strict";var Di=Object.defineProperty;var Ii=(V,v,Z)=>v in V?Di(V,v,{enumerable:!0,configurable:!0,writable:!0,value:Z}):V[v]=Z;var k=(V,v,Z)=>Ii(V,typeof v!="symbol"?v+"":v,Z);function Z(e){this.message=e||""}Z.prototype=Object.create(Error.prototype,{constructor:{value:Z},name:{value:"NotImplemented"},stack:{get:function(){return new Error().stack}}});const Ee=class Ee{constructor(t,n,r,o,s){k(this,"name","Stonecrop");k(this,"registry");k(this,"store");k(this,"schema");k(this,"workflow");k(this,"actions");if(Ee._root)return Ee._root;Ee._root=this,this.registry=t,this.store=n,this.schema=r,this.workflow=o,this.actions=s}setup(t){this.getMeta(t),this.getWorkflow(t),this.getActions(t)}getMeta(t){return this.registry.getMeta?this.registry.getMeta(t.doctype):new Z(t.doctype)}getWorkflow(t){const n=this.registry.registry[t.slug];this.workflow=n.workflow}getActions(t){const n=this.registry.registry[t.slug];this.actions=n.actions}async getRecords(t,n){this.store.$patch({records:[]});const o=await(await fetch(`/${t.slug}`,n)).json();this.store.$patch({records:o})}async getRecord(t,n){this.store.$patch({record:{}});const o=await(await fetch(`/${t.slug}/${n}`)).json();this.store.$patch({record:o})}runAction(t,n,r){var u;const s=(u=this.registry.registry[t.slug].actions)==null?void 0:u.get(n);if(this.workflow){const{initialState:i}=this.workflow;this.workflow.transition(i,{type:n}),s&&s.length>0&&s.forEach(a=>{new Function(a)(r)})}}};k(Ee,"_root");let Ge=Ee;var Xr=Object.create,Dt=Object.defineProperty,Zr=Object.getOwnPropertyDescriptor,We=Object.getOwnPropertyNames,Jr=Object.getPrototypeOf,Qr=Object.prototype.hasOwnProperty,eo=(e,t)=>function(){return e&&(t=(0,e[We(e)[0]])(e=0)),t},to=(e,t)=>function(){return t||(0,e[We(e)[0]])((t={exports:{}}).exports,t),t.exports},no=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of We(t))!Qr.call(e,o)&&o!==n&&Dt(e,o,{get:()=>t[o],enumerable:!(r=Zr(t,o))||r.enumerable});return e},ro=(e,t,n)=>(n=e!=null?Xr(Jr(e)):{},no(Dt(n,"default",{value:e,enumerable:!0}),e)),ye=eo({"../../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"(){}}),oo=to({"../../node_modules/.pnpm/rfdc@1.4.1/node_modules/rfdc/index.js"(e,t){ye(),t.exports=r;function n(s){return s instanceof Buffer?Buffer.from(s):new s.constructor(s.buffer.slice(),s.byteOffset,s.length)}function r(s){if(s=s||{},s.circles)return o(s);const u=new Map;if(u.set(Date,f=>new Date(f)),u.set(Map,(f,O)=>new Map(a(Array.from(f),O))),u.set(Set,(f,O)=>new Set(a(Array.from(f),O))),s.constructorHandlers)for(const f of s.constructorHandlers)u.set(f[0],f[1]);let i=null;return s.proto?E:l;function a(f,O){const d=Object.keys(f),p=new Array(d.length);for(let A=0;A<d.length;A++){const _=d[A],g=f[_];typeof g!="object"||g===null?p[_]=g:g.constructor!==Object&&(i=u.get(g.constructor))?p[_]=i(g,O):ArrayBuffer.isView(g)?p[_]=n(g):p[_]=O(g)}return p}function l(f){if(typeof f!="object"||f===null)return f;if(Array.isArray(f))return a(f,l);if(f.constructor!==Object&&(i=u.get(f.constructor)))return i(f,l);const O={};for(const d in f){if(Object.hasOwnProperty.call(f,d)===!1)continue;const p=f[d];typeof p!="object"||p===null?O[d]=p:p.constructor!==Object&&(i=u.get(p.constructor))?O[d]=i(p,l):ArrayBuffer.isView(p)?O[d]=n(p):O[d]=l(p)}return O}function E(f){if(typeof f!="object"||f===null)return f;if(Array.isArray(f))return a(f,E);if(f.constructor!==Object&&(i=u.get(f.constructor)))return i(f,E);const O={};for(const d in f){const p=f[d];typeof p!="object"||p===null?O[d]=p:p.constructor!==Object&&(i=u.get(p.constructor))?O[d]=i(p,E):ArrayBuffer.isView(p)?O[d]=n(p):O[d]=E(p)}return O}}function o(s){const u=[],i=[],a=new Map;if(a.set(Date,d=>new Date(d)),a.set(Map,(d,p)=>new Map(E(Array.from(d),p))),a.set(Set,(d,p)=>new Set(E(Array.from(d),p))),s.constructorHandlers)for(const d of s.constructorHandlers)a.set(d[0],d[1]);let l=null;return s.proto?O:f;function E(d,p){const A=Object.keys(d),_=new Array(A.length);for(let g=0;g<A.length;g++){const w=A[g],T=d[w];if(typeof T!="object"||T===null)_[w]=T;else if(T.constructor!==Object&&(l=a.get(T.constructor)))_[w]=l(T,p);else if(ArrayBuffer.isView(T))_[w]=n(T);else{const B=u.indexOf(T);B!==-1?_[w]=i[B]:_[w]=p(T)}}return _}function f(d){if(typeof d!="object"||d===null)return d;if(Array.isArray(d))return E(d,f);if(d.constructor!==Object&&(l=a.get(d.constructor)))return l(d,f);const p={};u.push(d),i.push(p);for(const A in d){if(Object.hasOwnProperty.call(d,A)===!1)continue;const _=d[A];if(typeof _!="object"||_===null)p[A]=_;else if(_.constructor!==Object&&(l=a.get(_.constructor)))p[A]=l(_,f);else if(ArrayBuffer.isView(_))p[A]=n(_);else{const g=u.indexOf(_);g!==-1?p[A]=i[g]:p[A]=f(_)}}return u.pop(),i.pop(),p}function O(d){if(typeof d!="object"||d===null)return d;if(Array.isArray(d))return E(d,O);if(d.constructor!==Object&&(l=a.get(d.constructor)))return l(d,O);const p={};u.push(d),i.push(p);for(const A in d){const _=d[A];if(typeof _!="object"||_===null)p[A]=_;else if(_.constructor!==Object&&(l=a.get(_.constructor)))p[A]=l(_,O);else if(ArrayBuffer.isView(_))p[A]=n(_);else{const g=u.indexOf(_);g!==-1?p[A]=i[g]:p[A]=O(_)}}return u.pop(),i.pop(),p}}}});ye(),ye(),ye();var It=typeof navigator<"u",h=typeof window<"u"?window:typeof globalThis<"u"?globalThis:typeof global<"u"?global:{};typeof h.chrome<"u"&&h.chrome.devtools,It&&(h.self,h.top);var kt;typeof navigator<"u"&&((kt=navigator.userAgent)==null||kt.toLowerCase().includes("electron")),ye();var so=ro(oo()),uo=/(?:^|[-_/])(\w)/g;function io(e,t){return t?t.toUpperCase():""}function ao(e){return e&&`${e}`.replace(uo,io)}function co(e,t){let n=e.replace(/^[a-z]:/i,"").replace(/\\/g,"/");n.endsWith(`index${t}`)&&(n=n.replace(`/index${t}`,t));const r=n.lastIndexOf("/"),o=n.substring(r+1);{const s=o.lastIndexOf(t);return o.substring(0,s)}}var Pt=(0,so.default)({circles:!0});const lo={trailing:!0};function ae(e,t=25,n={}){if(n={...lo,...n},!Number.isFinite(t))throw new TypeError("Expected `wait` to be a finite number");let r,o,s=[],u,i;const a=(l,E)=>(u=fo(e,l,E),u.finally(()=>{if(u=null,n.trailing&&i&&!o){const f=a(l,i);return i=null,f}}),u);return function(...l){return u?(n.trailing&&(i=l),u):new Promise(E=>{const f=!o&&n.leading;clearTimeout(o),o=setTimeout(()=>{o=null;const O=n.leading?r:a(this,l);for(const d of s)d(O);s=[]},t),f?(r=a(this,l),E(r)):s.push(E)})}}async function fo(e,t,n){return await e.apply(t,n)}function Ye(e,t={},n){for(const r in e){const o=e[r],s=n?`${n}:${r}`:r;typeof o=="object"&&o!==null?Ye(o,t,s):typeof o=="function"&&(t[s]=o)}return t}const _o={run:e=>e()},po=()=>_o,Rt=typeof console.createTask<"u"?console.createTask:po;function ho(e,t){const n=t.shift(),r=Rt(n);return e.reduce((o,s)=>o.then(()=>r.run(()=>s(...t))),Promise.resolve())}function Eo(e,t){const n=t.shift(),r=Rt(n);return Promise.all(e.map(o=>r.run(()=>o(...t))))}function qe(e,t){for(const n of[...e])n(t)}class go{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(t,n,r={}){if(!t||typeof n!="function")return()=>{};const o=t;let s;for(;this._deprecatedHooks[t];)s=this._deprecatedHooks[t],t=s.to;if(s&&!r.allowDeprecated){let u=s.message;u||(u=`${o} hook has been deprecated`+(s.to?`, please use ${s.to}`:"")),this._deprecatedMessages||(this._deprecatedMessages=new Set),this._deprecatedMessages.has(u)||(console.warn(u),this._deprecatedMessages.add(u))}if(!n.name)try{Object.defineProperty(n,"name",{get:()=>"_"+t.replace(/\W+/g,"_")+"_hook_cb",configurable:!0})}catch{}return this._hooks[t]=this._hooks[t]||[],this._hooks[t].push(n),()=>{n&&(this.removeHook(t,n),n=void 0)}}hookOnce(t,n){let r,o=(...s)=>(typeof r=="function"&&r(),r=void 0,o=void 0,n(...s));return r=this.hook(t,o),r}removeHook(t,n){if(this._hooks[t]){const r=this._hooks[t].indexOf(n);r!==-1&&this._hooks[t].splice(r,1),this._hooks[t].length===0&&delete this._hooks[t]}}deprecateHook(t,n){this._deprecatedHooks[t]=typeof n=="string"?{to:n}:n;const r=this._hooks[t]||[];delete this._hooks[t];for(const o of r)this.hook(t,o)}deprecateHooks(t){Object.assign(this._deprecatedHooks,t);for(const n in t)this.deprecateHook(n,t[n])}addHooks(t){const n=Ye(t),r=Object.keys(n).map(o=>this.hook(o,n[o]));return()=>{for(const o of r.splice(0,r.length))o()}}removeHooks(t){const n=Ye(t);for(const r in n)this.removeHook(r,n[r])}removeAllHooks(){for(const t in this._hooks)delete this._hooks[t]}callHook(t,...n){return n.unshift(t),this.callHookWith(ho,t,...n)}callHookParallel(t,...n){return n.unshift(t),this.callHookWith(Eo,t,...n)}callHookWith(t,n,...r){const o=this._before||this._after?{name:n,args:r,context:{}}:void 0;this._before&&qe(this._before,o);const s=t(n in this._hooks?[...this._hooks[n]]:[],r);return s instanceof Promise?s.finally(()=>{this._after&&o&&qe(this._after,o)}):(this._after&&o&&qe(this._after,o),s)}beforeEach(t){return this._before=this._before||[],this._before.push(t),()=>{if(this._before!==void 0){const n=this._before.indexOf(t);n!==-1&&this._before.splice(n,1)}}}afterEach(t){return this._after=this._after||[],this._after.push(t),()=>{if(this._after!==void 0){const n=this._after.indexOf(t);n!==-1&&this._after.splice(n,1)}}}}function Nt(){return new go}var mo=Object.create,Vt=Object.defineProperty,vo=Object.getOwnPropertyDescriptor,Xe=Object.getOwnPropertyNames,yo=Object.getPrototypeOf,Oo=Object.prototype.hasOwnProperty,Ao=(e,t)=>function(){return e&&(t=(0,e[Xe(e)[0]])(e=0)),t},xt=(e,t)=>function(){return t||(0,e[Xe(e)[0]])((t={exports:{}}).exports,t),t.exports},bo=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of Xe(t))!Oo.call(e,o)&&o!==n&&Vt(e,o,{get:()=>t[o],enumerable:!(r=vo(t,o))||r.enumerable});return e},So=(e,t,n)=>(n=e!=null?mo(yo(e)):{},bo(Vt(n,"default",{value:e,enumerable:!0}),e)),c=Ao({"../../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"(){}}),wo=xt({"../../node_modules/.pnpm/speakingurl@14.0.1/node_modules/speakingurl/lib/speakingurl.js"(e,t){c(),function(n){var r={À:"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"},o=["်","ް"],s={"ာ":"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"},u={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"}},i={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"}},a=[";","?",":","@","&","=","+","$",",","/"].join(""),l=[";","?",":","@","&","=","+","$",","].join(""),E=[".","!","~","*","'","(",")"].join(""),f=function(_,g){var w="-",T="",B="",te=!0,$={},b,ke,F,y,m,C,N,j,me,K,S,Y,I,ve,ne="";if(typeof _!="string")return"";if(typeof g=="string"&&(w=g),N=i.en,j=u.en,typeof g=="object"){b=g.maintainCase||!1,$=g.custom&&typeof g.custom=="object"?g.custom:$,F=+g.truncate>1&&g.truncate||!1,y=g.uric||!1,m=g.uricNoSlash||!1,C=g.mark||!1,te=!(g.symbols===!1||g.lang===!1),w=g.separator||w,y&&(ne+=a),m&&(ne+=l),C&&(ne+=E),N=g.lang&&i[g.lang]&&te?i[g.lang]:te?i.en:{},j=g.lang&&u[g.lang]?u[g.lang]:g.lang===!1||g.lang===!0?{}:u.en,g.titleCase&&typeof g.titleCase.length=="number"&&Array.prototype.toString.call(g.titleCase)?(g.titleCase.forEach(function(z){$[z+""]=z+""}),ke=!0):ke=!!g.titleCase,g.custom&&typeof g.custom.length=="number"&&Array.prototype.toString.call(g.custom)&&g.custom.forEach(function(z){$[z+""]=z+""}),Object.keys($).forEach(function(z){var Pe;z.length>1?Pe=new RegExp("\\b"+d(z)+"\\b","gi"):Pe=new RegExp(d(z),"gi"),_=_.replace(Pe,$[z])});for(S in $)ne+=S}for(ne+=w,ne=d(ne),_=_.replace(/(^\s+|\s+$)/g,""),I=!1,ve=!1,K=0,Y=_.length;K<Y;K++)S=_[K],p(S,$)?I=!1:j[S]?(S=I&&j[S].match(/[A-Za-z0-9]/)?" "+j[S]:j[S],I=!1):S in r?(K+1<Y&&o.indexOf(_[K+1])>=0?(B+=S,S=""):ve===!0?(S=s[B]+r[S],B=""):S=I&&r[S].match(/[A-Za-z0-9]/)?" "+r[S]:r[S],I=!1,ve=!1):S in s?(B+=S,S="",K===Y-1&&(S=s[B]),ve=!0):N[S]&&!(y&&a.indexOf(S)!==-1)&&!(m&&l.indexOf(S)!==-1)?(S=I||T.substr(-1).match(/[A-Za-z0-9]/)?w+N[S]:N[S],S+=_[K+1]!==void 0&&_[K+1].match(/[A-Za-z0-9]/)?w:"",I=!0):(ve===!0?(S=s[B]+S,B="",ve=!1):I&&(/[A-Za-z0-9]/.test(S)||T.substr(-1).match(/A-Za-z0-9]/))&&(S=" "+S),I=!1),T+=S.replace(new RegExp("[^\\w\\s"+ne+"_-]","g"),w);return ke&&(T=T.replace(/(\w)(\S*)/g,function(z,Pe,qr){var Ct=Pe.toUpperCase()+(qr!==null?qr:"");return Object.keys($).indexOf(Ct.toLowerCase())<0?Ct:Ct.toLowerCase()})),T=T.replace(/\s+/g,w).replace(new RegExp("\\"+w+"+","g"),w).replace(new RegExp("(^\\"+w+"+|\\"+w+"+$)","g"),""),F&&T.length>F&&(me=T.charAt(F)===w,T=T.slice(0,F),me||(T=T.slice(0,T.lastIndexOf(w)))),!b&&!ke&&(T=T.toLowerCase()),T},O=function(_){return function(w){return f(w,_)}},d=function(_){return _.replace(/[-\\^$*+?.()|[\]{}\/]/g,"\\$&")},p=function(A,_){for(var g in _)if(_[g]===A)return!0};if(typeof t<"u"&&t.exports)t.exports=f,t.exports.createSlug=O;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=O}catch{}}(e)}}),To=xt({"../../node_modules/.pnpm/speakingurl@14.0.1/node_modules/speakingurl/index.js"(e,t){c(),t.exports=wo()}});c(),c(),c(),c(),c(),c(),c(),c();function Co(e){var t;const n=e.name||e._componentTag||e.__VUE_DEVTOOLS_COMPONENT_GUSSED_NAME__||e.__name;return n==="index"&&((t=e.__file)!=null&&t.endsWith("index.vue"))?"":n}function Do(e){const t=e.__file;if(t)return ao(co(t,".vue"))}function Lt(e,t){return e.type.__VUE_DEVTOOLS_COMPONENT_GUSSED_NAME__=t,t}function Ze(e){if(e.__VUE_DEVTOOLS_NEXT_APP_RECORD__)return e.__VUE_DEVTOOLS_NEXT_APP_RECORD__;if(e.root)return e.appContext.app.__VUE_DEVTOOLS_NEXT_APP_RECORD__}function Bt(e){var t,n;const r=(t=e.subTree)==null?void 0:t.type,o=Ze(e);return o?((n=o==null?void 0:o.types)==null?void 0:n.Fragment)===r:!1}function Re(e){var t,n,r;const o=Co((e==null?void 0:e.type)||{});if(o)return o;if((e==null?void 0:e.root)===e)return"Root";for(const u in(n=(t=e.parent)==null?void 0:t.type)==null?void 0:n.components)if(e.parent.type.components[u]===(e==null?void 0:e.type))return Lt(e,u);for(const u in(r=e.appContext)==null?void 0:r.components)if(e.appContext.components[u]===(e==null?void 0:e.type))return Lt(e,u);const s=Do((e==null?void 0:e.type)||{});return s||"Anonymous Component"}function Io(e){var t,n,r;const o=(r=(n=(t=e==null?void 0:e.appContext)==null?void 0:t.app)==null?void 0:n.__VUE_DEVTOOLS_NEXT_APP_RECORD_ID__)!=null?r:0,s=e===(e==null?void 0:e.root)?"root":e.uid;return`${o}:${s}`}function Je(e,t){return t=t||`${e.id}:root`,e.instanceMap.get(t)||e.instanceMap.get(":root")}function ko(){const e={top:0,bottom:0,left:0,right:0,get width(){return e.right-e.left},get height(){return e.bottom-e.top}};return e}var Ne;function Po(e){return Ne||(Ne=document.createRange()),Ne.selectNode(e),Ne.getBoundingClientRect()}function Ro(e){const t=ko();if(!e.children)return t;for(let n=0,r=e.children.length;n<r;n++){const o=e.children[n];let s;if(o.component)s=re(o.component);else if(o.el){const u=o.el;u.nodeType===1||u.getBoundingClientRect?s=u.getBoundingClientRect():u.nodeType===3&&u.data.trim()&&(s=Po(u))}s&&No(t,s)}return t}function No(e,t){return(!e.top||t.top<e.top)&&(e.top=t.top),(!e.bottom||t.bottom>e.bottom)&&(e.bottom=t.bottom),(!e.left||t.left<e.left)&&(e.left=t.left),(!e.right||t.right>e.right)&&(e.right=t.right),e}var Ft={top:0,left:0,right:0,bottom:0,width:0,height:0};function re(e){const t=e.subTree.el;return typeof window>"u"?Ft:Bt(e)?Ro(e.subTree):(t==null?void 0:t.nodeType)===1?t==null?void 0:t.getBoundingClientRect():e.subTree.component?re(e.subTree.component):Ft}c();function Qe(e){return Bt(e)?Vo(e.subTree):e.subTree?[e.subTree.el]:[]}function Vo(e){if(!e.children)return[];const t=[];return e.children.forEach(n=>{n.component?t.push(...Qe(n.component)):n!=null&&n.el&&t.push(n.el)}),t}var Ut="__vue-devtools-component-inspector__",Mt="__vue-devtools-component-inspector__card__",$t="__vue-devtools-component-inspector__name__",jt="__vue-devtools-component-inspector__indicator__",Ht={display:"block",zIndex:2147483640,position:"fixed",backgroundColor:"#42b88325",border:"1px solid #42b88350",borderRadius:"5px",transition:"all 0.1s ease-in",pointerEvents:"none"},xo={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)"},Lo={display:"inline-block",fontWeight:400,fontStyle:"normal",fontSize:"12px",opacity:.7};function ce(){return document.getElementById(Ut)}function Bo(){return document.getElementById(Mt)}function Fo(){return document.getElementById(jt)}function Uo(){return document.getElementById($t)}function et(e){return{left:`${Math.round(e.left*100)/100}px`,top:`${Math.round(e.top*100)/100}px`,width:`${Math.round(e.width*100)/100}px`,height:`${Math.round(e.height*100)/100}px`}}function tt(e){var t;const n=document.createElement("div");n.id=(t=e.elementId)!=null?t:Ut,Object.assign(n.style,{...Ht,...et(e.bounds),...e.style});const r=document.createElement("span");r.id=Mt,Object.assign(r.style,{...xo,top:e.bounds.top<35?0:"-35px"});const o=document.createElement("span");o.id=$t,o.innerHTML=`<${e.name}> `;const s=document.createElement("i");return s.id=jt,s.innerHTML=`${Math.round(e.bounds.width*100)/100} x ${Math.round(e.bounds.height*100)/100}`,Object.assign(s.style,Lo),r.appendChild(o),r.appendChild(s),n.appendChild(r),document.body.appendChild(n),n}function nt(e){const t=ce(),n=Bo(),r=Uo(),o=Fo();t&&(Object.assign(t.style,{...Ht,...et(e.bounds)}),Object.assign(n.style,{top:e.bounds.top<35?0:"-35px"}),r.innerHTML=`<${e.name}> `,o.innerHTML=`${Math.round(e.bounds.width*100)/100} x ${Math.round(e.bounds.height*100)/100}`)}function Mo(e){const t=re(e);if(!t.width&&!t.height)return;const n=Re(e);ce()?nt({bounds:t,name:n}):tt({bounds:t,name:n})}function Kt(){const e=ce();e&&(e.style.display="none")}var rt=null;function ot(e){const t=e.target;if(t){const n=t.__vueParentComponent;if(n&&(rt=n,n.vnode.el)){const o=re(n),s=Re(n);ce()?nt({bounds:o,name:s}):tt({bounds:o,name:s})}}}function $o(e,t){if(e.preventDefault(),e.stopPropagation(),rt){const n=Io(rt);t(n)}}var Ve=null;function jo(){Kt(),window.removeEventListener("mouseover",ot),window.removeEventListener("click",Ve,!0),Ve=null}function Ho(){return window.addEventListener("mouseover",ot),new Promise(e=>{function t(n){n.preventDefault(),n.stopPropagation(),$o(n,r=>{window.removeEventListener("click",t,!0),Ve=null,window.removeEventListener("mouseover",ot);const o=ce();o&&(o.style.display="none"),e(JSON.stringify({id:r}))})}Ve=t,window.addEventListener("click",t,!0)})}function Ko(e){const t=Je(L.value,e.id);if(t){const[n]=Qe(t);if(typeof n.scrollIntoView=="function")n.scrollIntoView({behavior:"smooth"});else{const r=re(t),o=document.createElement("div"),s={...et(r),position:"absolute"};Object.assign(o.style,s),document.body.appendChild(o),o.scrollIntoView({behavior:"smooth"}),setTimeout(()=>{document.body.removeChild(o)},2e3)}setTimeout(()=>{const r=re(t);if(r.width||r.height){const o=Re(t),s=ce();s?nt({...e,name:o,bounds:r}):tt({...e,name:o,bounds:r}),setTimeout(()=>{s&&(s.style.display="none")},1500)}},1200)}}c();var zt,Gt;(Gt=(zt=h).__VUE_DEVTOOLS_COMPONENT_INSPECTOR_ENABLED__)!=null||(zt.__VUE_DEVTOOLS_COMPONENT_INSPECTOR_ENABLED__=!0);function zo(e){let t=0;const n=setInterval(()=>{h.__VUE_INSPECTOR__&&(clearInterval(n),t+=30,e()),t>=5e3&&clearInterval(n)},30)}function Go(){const e=h.__VUE_INSPECTOR__,t=e.openInEditor;e.openInEditor=async(...n)=>{e.disable(),t(...n)}}function Wo(){return new Promise(e=>{function t(){Go(),e(h.__VUE_INSPECTOR__)}h.__VUE_INSPECTOR__?t():zo(()=>{t()})})}c(),c();function Yo(e){return!!(e&&e.__v_isReadonly)}function Wt(e){return Yo(e)?Wt(e.__v_raw):!!(e&&e.__v_isReactive)}function st(e){return!!(e&&e.__v_isRef===!0)}function Oe(e){const t=e&&e.__v_raw;return t?Oe(t):e}var qo=class{constructor(){this.refEditor=new Xo}set(e,t,n,r){const o=Array.isArray(t)?t:t.split(".");for(;o.length>1;){const i=o.shift();e instanceof Map?e=e.get(i):e instanceof Set?e=Array.from(e.values())[i]:e=e[i],this.refEditor.isRef(e)&&(e=this.refEditor.get(e))}const s=o[0],u=this.refEditor.get(e)[s];r?r(e,s,n):this.refEditor.isRef(u)?this.refEditor.set(u,n):e[s]=n}get(e,t){const n=Array.isArray(t)?t:t.split(".");for(let r=0;r<n.length;r++)if(e instanceof Map?e=e.get(n[r]):e=e[n[r]],this.refEditor.isRef(e)&&(e=this.refEditor.get(e)),!e)return;return e}has(e,t,n=!1){if(typeof e>"u")return!1;const r=Array.isArray(t)?t.slice():t.split("."),o=n?2:1;for(;e&&r.length>o;){const s=r.shift();e=e[s],this.refEditor.isRef(e)&&(e=this.refEditor.get(e))}return e!=null&&Object.prototype.hasOwnProperty.call(e,r[0])}createDefaultSetCallback(e){return(t,n,r)=>{if((e.remove||e.newKey)&&(Array.isArray(t)?t.splice(n,1):Oe(t)instanceof Map?t.delete(n):Oe(t)instanceof Set?t.delete(Array.from(t.values())[n]):Reflect.deleteProperty(t,n)),!e.remove){const o=t[e.newKey||n];this.refEditor.isRef(o)?this.refEditor.set(o,r):Oe(t)instanceof Map?t.set(e.newKey||n,r):Oe(t)instanceof Set?t.add(r):t[e.newKey||n]=r}}}},Xo=class{set(e,t){if(st(e))e.value=t;else{if(e instanceof Set&&Array.isArray(t)){e.clear(),t.forEach(o=>e.add(o));return}const n=Object.keys(t);if(e instanceof Map){const o=new Set(e.keys());n.forEach(s=>{e.set(s,Reflect.get(t,s)),o.delete(s)}),o.forEach(s=>e.delete(s));return}const r=new Set(Object.keys(e));n.forEach(o=>{Reflect.set(e,o,Reflect.get(t,o)),r.delete(o)}),r.forEach(o=>Reflect.deleteProperty(e,o))}}get(e){return st(e)?e.value:e}isRef(e){return st(e)||Wt(e)}};c(),c(),c();var Zo="__VUE_DEVTOOLS_KIT_TIMELINE_LAYERS_STATE__";function Jo(){if(!It||typeof localStorage>"u"||localStorage===null)return{recordingState:!1,mouseEventEnabled:!1,keyboardEventEnabled:!1,componentEventEnabled:!1,performanceEventEnabled:!1,selected:""};const e=localStorage.getItem(Zo);return e?JSON.parse(e):{recordingState:!1,mouseEventEnabled:!1,keyboardEventEnabled:!1,componentEventEnabled:!1,performanceEventEnabled:!1,selected:""}}c(),c(),c();var Yt,qt;(qt=(Yt=h).__VUE_DEVTOOLS_KIT_TIMELINE_LAYERS)!=null||(Yt.__VUE_DEVTOOLS_KIT_TIMELINE_LAYERS=[]);var Qo=new Proxy(h.__VUE_DEVTOOLS_KIT_TIMELINE_LAYERS,{get(e,t,n){return Reflect.get(e,t,n)}});function es(e,t){P.timelineLayersState[t.id]=!1,Qo.push({...e,descriptorId:t.id,appRecord:Ze(t.app)})}var Xt,Zt;(Zt=(Xt=h).__VUE_DEVTOOLS_KIT_INSPECTOR__)!=null||(Xt.__VUE_DEVTOOLS_KIT_INSPECTOR__=[]);var ut=new Proxy(h.__VUE_DEVTOOLS_KIT_INSPECTOR__,{get(e,t,n){return Reflect.get(e,t,n)}}),Jt=ae(()=>{fe.hooks.callHook("sendInspectorToClient",Qt())});function ts(e,t){var n,r;ut.push({options:e,descriptor:t,treeFilterPlaceholder:(n=e.treeFilterPlaceholder)!=null?n:"Search tree...",stateFilterPlaceholder:(r=e.stateFilterPlaceholder)!=null?r:"Search state...",treeFilter:"",selectedNodeId:"",appRecord:Ze(t.app)}),Jt()}function Qt(){return ut.filter(e=>e.descriptor.app===L.value.app).filter(e=>e.descriptor.id!=="components").map(e=>{var t;const n=e.descriptor,r=e.options;return{id:r.id,label:r.label,logo:n.logo,icon:`custom-ic-baseline-${(t=r==null?void 0:r.icon)==null?void 0:t.replace(/_/g,"-")}`,packageName:n.packageName,homepage:n.homepage,pluginId:n.id}})}function xe(e,t){return ut.find(n=>n.options.id===e&&(t?n.descriptor.app===t:!0))}function ns(){const e=Nt();e.hook("addInspector",({inspector:r,plugin:o})=>{ts(r,o.descriptor)});const t=ae(async({inspectorId:r,plugin:o})=>{var s;if(!r||!((s=o==null?void 0:o.descriptor)!=null&&s.app)||P.highPerfModeEnabled)return;const u=xe(r,o.descriptor.app),i={app:o.descriptor.app,inspectorId:r,filter:(u==null?void 0:u.treeFilter)||"",rootNodes:[]};await new Promise(a=>{e.callHookWith(async l=>{await Promise.all(l.map(E=>E(i))),a()},"getInspectorTree")}),e.callHookWith(async a=>{await Promise.all(a.map(l=>l({inspectorId:r,rootNodes:i.rootNodes})))},"sendInspectorTreeToClient")},120);e.hook("sendInspectorTree",t);const n=ae(async({inspectorId:r,plugin:o})=>{var s;if(!r||!((s=o==null?void 0:o.descriptor)!=null&&s.app)||P.highPerfModeEnabled)return;const u=xe(r,o.descriptor.app),i={app:o.descriptor.app,inspectorId:r,nodeId:(u==null?void 0:u.selectedNodeId)||"",state:null},a={currentTab:`custom-inspector:${r}`};i.nodeId&&await new Promise(l=>{e.callHookWith(async E=>{await Promise.all(E.map(f=>f(i,a))),l()},"getInspectorState")}),e.callHookWith(async l=>{await Promise.all(l.map(E=>E({inspectorId:r,nodeId:i.nodeId,state:i.state})))},"sendInspectorStateToClient")},120);return e.hook("sendInspectorState",n),e.hook("customInspectorSelectNode",({inspectorId:r,nodeId:o,plugin:s})=>{const u=xe(r,s.descriptor.app);u&&(u.selectedNodeId=o)}),e.hook("timelineLayerAdded",({options:r,plugin:o})=>{es(r,o.descriptor)}),e.hook("timelineEventAdded",({options:r,plugin:o})=>{var s;const u=["performance","component-event","keyboard","mouse"];P.highPerfModeEnabled||!((s=P.timelineLayersState)!=null&&s[o.descriptor.id])&&!u.includes(r.layerId)||e.callHookWith(async i=>{await Promise.all(i.map(a=>a(r)))},"sendTimelineEventToClient")}),e.hook("getComponentInstances",async({app:r})=>{const o=r.__VUE_DEVTOOLS_NEXT_APP_RECORD__;if(!o)return null;const s=o.id.toString();return[...o.instanceMap].filter(([i])=>i.split(":")[0]===s).map(([,i])=>i)}),e.hook("getComponentBounds",async({instance:r})=>re(r)),e.hook("getComponentName",({instance:r})=>Re(r)),e.hook("componentHighlight",({uid:r})=>{const o=L.value.instanceMap.get(r);o&&Mo(o)}),e.hook("componentUnhighlight",()=>{Kt()}),e}var en,tn;(tn=(en=h).__VUE_DEVTOOLS_KIT_APP_RECORDS__)!=null||(en.__VUE_DEVTOOLS_KIT_APP_RECORDS__=[]);var nn,rn;(rn=(nn=h).__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD__)!=null||(nn.__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD__={});var on,sn;(sn=(on=h).__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD_ID__)!=null||(on.__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD_ID__="");var un,an;(an=(un=h).__VUE_DEVTOOLS_KIT_CUSTOM_TABS__)!=null||(un.__VUE_DEVTOOLS_KIT_CUSTOM_TABS__=[]);var cn,ln;(ln=(cn=h).__VUE_DEVTOOLS_KIT_CUSTOM_COMMANDS__)!=null||(cn.__VUE_DEVTOOLS_KIT_CUSTOM_COMMANDS__=[]);var oe="__VUE_DEVTOOLS_KIT_GLOBAL_STATE__";function rs(){return{connected:!1,clientConnected:!1,vitePluginDetected:!0,appRecords:[],activeAppRecordId:"",tabs:[],commands:[],highPerfModeEnabled:!0,devtoolsClientDetected:{},perfUniqueGroupId:0,timelineLayersState:Jo()}}var fn,dn;(dn=(fn=h)[oe])!=null||(fn[oe]=rs());var os=ae(e=>{fe.hooks.callHook("devtoolsStateUpdated",{state:e})});ae((e,t)=>{fe.hooks.callHook("devtoolsConnectedUpdated",{state:e,oldState:t})});var Le=new Proxy(h.__VUE_DEVTOOLS_KIT_APP_RECORDS__,{get(e,t,n){return t==="value"?h.__VUE_DEVTOOLS_KIT_APP_RECORDS__:h.__VUE_DEVTOOLS_KIT_APP_RECORDS__[t]}}),L=new Proxy(h.__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD__,{get(e,t,n){return t==="value"?h.__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD__:t==="id"?h.__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD_ID__:h.__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD__[t]}});function _n(){os({...h[oe],appRecords:Le.value,activeAppRecordId:L.id,tabs:h.__VUE_DEVTOOLS_KIT_CUSTOM_TABS__,commands:h.__VUE_DEVTOOLS_KIT_CUSTOM_COMMANDS__})}function ss(e){h.__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD__=e,_n()}function us(e){h.__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD_ID__=e,_n()}var P=new Proxy(h[oe],{get(e,t){return t==="appRecords"?Le:t==="activeAppRecordId"?L.id:t==="tabs"?h.__VUE_DEVTOOLS_KIT_CUSTOM_TABS__:t==="commands"?h.__VUE_DEVTOOLS_KIT_CUSTOM_COMMANDS__:h[oe][t]},deleteProperty(e,t){return delete e[t],!0},set(e,t,n){return{...h[oe]},e[t]=n,h[oe][t]=n,!0}});function is(e={}){var t,n,r;const{file:o,host:s,baseUrl:u=window.location.origin,line:i=0,column:a=0}=e;if(o){if(s==="chrome-extension"){const l=o.replace(/\\/g,"\\\\"),E=(n=(t=window.VUE_DEVTOOLS_CONFIG)==null?void 0:t.openInEditorHost)!=null?n:"/";fetch(`${E}__open-in-editor?file=${encodeURI(o)}`).then(f=>{if(!f.ok){const O=`Opening component ${l} failed`;console.log(`%c${O}`,"color:red")}})}else if(P.vitePluginDetected){const l=(r=h.__VUE_DEVTOOLS_OPEN_IN_EDITOR_BASE_URL__)!=null?r:u;h.__VUE_INSPECTOR__.openInEditor(l,o,i,a)}}}c(),c(),c(),c(),c();var pn,hn;(hn=(pn=h).__VUE_DEVTOOLS_KIT_PLUGIN_BUFFER__)!=null||(pn.__VUE_DEVTOOLS_KIT_PLUGIN_BUFFER__=[]);var it=new Proxy(h.__VUE_DEVTOOLS_KIT_PLUGIN_BUFFER__,{get(e,t,n){return Reflect.get(e,t,n)}});function at(e){const t={};return Object.keys(e).forEach(n=>{t[n]=e[n].defaultValue}),t}function ct(e){return`__VUE_DEVTOOLS_NEXT_PLUGIN_SETTINGS__${e}__`}function as(e){var t,n,r;const o=(n=(t=it.find(s=>{var u;return s[0].id===e&&!!((u=s[0])!=null&&u.settings)}))==null?void 0:t[0])!=null?n:null;return(r=o==null?void 0:o.settings)!=null?r:null}function En(e,t){var n,r,o;const s=ct(e);if(s){const u=localStorage.getItem(s);if(u)return JSON.parse(u)}if(e){const u=(r=(n=it.find(i=>i[0].id===e))==null?void 0:n[0])!=null?r:null;return at((o=u==null?void 0:u.settings)!=null?o:{})}return at(t)}function cs(e,t){const n=ct(e);localStorage.getItem(n)||localStorage.setItem(n,JSON.stringify(at(t)))}function ls(e,t,n){const r=ct(e),o=localStorage.getItem(r),s=JSON.parse(o||"{}"),u={...s,[t]:n};localStorage.setItem(r,JSON.stringify(u)),fe.hooks.callHookWith(i=>{i.forEach(a=>a({pluginId:e,key:t,oldValue:s[t],newValue:n,settings:u}))},"setPluginSettings")}c(),c(),c(),c(),c(),c(),c(),c(),c(),c(),c();var gn,mn,U=(mn=(gn=h).__VUE_DEVTOOLS_HOOK)!=null?mn:gn.__VUE_DEVTOOLS_HOOK=Nt(),fs={vueAppInit(e){U.hook("app:init",e)},vueAppUnmount(e){U.hook("app:unmount",e)},vueAppConnected(e){U.hook("app:connected",e)},componentAdded(e){return U.hook("component:added",e)},componentEmit(e){return U.hook("component:emit",e)},componentUpdated(e){return U.hook("component:updated",e)},componentRemoved(e){return U.hook("component:removed",e)},setupDevtoolsPlugin(e){U.hook("devtools-plugin:setup",e)},perfStart(e){return U.hook("perf:start",e)},perfEnd(e){return U.hook("perf:end",e)}},vn={on:fs,setupDevToolsPlugin(e,t){return U.callHook("devtools-plugin:setup",e,t)}},ds=class{constructor({plugin:e,ctx:t}){this.hooks=t.hooks,this.plugin=e}get on(){return{visitComponentTree:e=>{this.hooks.hook("visitComponentTree",e)},inspectComponent:e=>{this.hooks.hook("inspectComponent",e)},editComponentState:e=>{this.hooks.hook("editComponentState",e)},getInspectorTree:e=>{this.hooks.hook("getInspectorTree",e)},getInspectorState:e=>{this.hooks.hook("getInspectorState",e)},editInspectorState:e=>{this.hooks.hook("editInspectorState",e)},inspectTimelineEvent:e=>{this.hooks.hook("inspectTimelineEvent",e)},timelineCleared:e=>{this.hooks.hook("timelineCleared",e)},setPluginSettings:e=>{this.hooks.hook("setPluginSettings",e)}}}notifyComponentUpdate(e){var t;if(P.highPerfModeEnabled)return;const n=Qt().find(r=>r.packageName===this.plugin.descriptor.packageName);if(n!=null&&n.id){if(e){const r=[e.appContext.app,e.uid,(t=e.parent)==null?void 0:t.uid,e];U.callHook("component:updated",...r)}else U.callHook("component:updated");this.hooks.callHook("sendInspectorState",{inspectorId:n.id,plugin:this.plugin})}}addInspector(e){this.hooks.callHook("addInspector",{inspector:e,plugin:this.plugin}),this.plugin.descriptor.settings&&cs(e.id,this.plugin.descriptor.settings)}sendInspectorTree(e){P.highPerfModeEnabled||this.hooks.callHook("sendInspectorTree",{inspectorId:e,plugin:this.plugin})}sendInspectorState(e){P.highPerfModeEnabled||this.hooks.callHook("sendInspectorState",{inspectorId:e,plugin:this.plugin})}selectInspectorNode(e,t){this.hooks.callHook("customInspectorSelectNode",{inspectorId:e,nodeId:t,plugin:this.plugin})}visitComponentTree(e){return this.hooks.callHook("visitComponentTree",e)}now(){return P.highPerfModeEnabled?0:Date.now()}addTimelineLayer(e){this.hooks.callHook("timelineLayerAdded",{options:e,plugin:this.plugin})}addTimelineEvent(e){P.highPerfModeEnabled||this.hooks.callHook("timelineEventAdded",{options:e,plugin:this.plugin})}getSettings(e){return En(e??this.plugin.descriptor.id,this.plugin.descriptor.settings)}getComponentInstances(e){return this.hooks.callHook("getComponentInstances",{app:e})}getComponentBounds(e){return this.hooks.callHook("getComponentBounds",{instance:e})}getComponentName(e){return this.hooks.callHook("getComponentName",{instance:e})}highlightElement(e){const t=e.__VUE_DEVTOOLS_NEXT_UID__;return this.hooks.callHook("componentHighlight",{uid:t})}unhighlightElement(){return this.hooks.callHook("componentUnhighlight")}},_s=ds;c(),c(),c(),c();var ps="__vue_devtool_undefined__",hs="__vue_devtool_infinity__",Es="__vue_devtool_negative_infinity__",gs="__vue_devtool_nan__";c(),c();var ms={[ps]:"undefined",[gs]:"NaN",[hs]:"Infinity",[Es]:"-Infinity"};Object.entries(ms).reduce((e,[t,n])=>(e[n]=t,e),{}),c(),c(),c(),c(),c();var yn,On;(On=(yn=h).__VUE_DEVTOOLS_KIT__REGISTERED_PLUGIN_APPS__)!=null||(yn.__VUE_DEVTOOLS_KIT__REGISTERED_PLUGIN_APPS__=new Set);function An(e,t){return vn.setupDevToolsPlugin(e,t)}function vs(e,t){const[n,r]=e;if(n.app!==t)return;const o=new _s({plugin:{setupFn:r,descriptor:n},ctx:fe});n.packageName==="vuex"&&o.on.editInspectorState(s=>{o.sendInspectorState(s.inspectorId)}),r(o)}function bn(e,t){h.__VUE_DEVTOOLS_KIT__REGISTERED_PLUGIN_APPS__.has(e)||P.highPerfModeEnabled&&!(t!=null&&t.inspectingComponent)||(h.__VUE_DEVTOOLS_KIT__REGISTERED_PLUGIN_APPS__.add(e),it.forEach(n=>{vs(n,e)}))}c(),c();var Ae="__VUE_DEVTOOLS_ROUTER__",le="__VUE_DEVTOOLS_ROUTER_INFO__",Sn,wn;(wn=(Sn=h)[le])!=null||(Sn[le]={currentRoute:null,routes:[]});var Tn,Cn;(Cn=(Tn=h)[Ae])!=null||(Tn[Ae]={}),new Proxy(h[le],{get(e,t){return h[le][t]}}),new Proxy(h[Ae],{get(e,t){if(t==="value")return h[Ae]}});function ys(e){const t=new Map;return((e==null?void 0:e.getRoutes())||[]).filter(n=>!t.has(n.path)&&t.set(n.path,1))}function lt(e){return e.map(t=>{let{path:n,name:r,children:o,meta:s}=t;return o!=null&&o.length&&(o=lt(o)),{path:n,name:r,children:o,meta:s}})}function Os(e){if(e){const{fullPath:t,hash:n,href:r,path:o,name:s,matched:u,params:i,query:a}=e;return{fullPath:t,hash:n,href:r,path:o,name:s,params:i,query:a,matched:lt(u)}}return e}function As(e,t){function n(){var r;const o=(r=e.app)==null?void 0:r.config.globalProperties.$router,s=Os(o==null?void 0:o.currentRoute.value),u=lt(ys(o)),i=console.warn;console.warn=()=>{},h[le]={currentRoute:s?Pt(s):{},routes:Pt(u)},h[Ae]=o,console.warn=i}n(),vn.on.componentUpdated(ae(()=>{var r;((r=t.value)==null?void 0:r.app)===e.app&&(n(),!P.highPerfModeEnabled&&fe.hooks.callHook("routerInfoUpdated",{state:h[le]}))},200))}function bs(e){return{async getInspectorTree(t){const n={...t,app:L.value.app,rootNodes:[]};return await new Promise(r=>{e.callHookWith(async o=>{await Promise.all(o.map(s=>s(n))),r()},"getInspectorTree")}),n.rootNodes},async getInspectorState(t){const n={...t,app:L.value.app,state:null},r={currentTab:`custom-inspector:${t.inspectorId}`};return await new Promise(o=>{e.callHookWith(async s=>{await Promise.all(s.map(u=>u(n,r))),o()},"getInspectorState")}),n.state},editInspectorState(t){const n=new qo,r={...t,app:L.value.app,set:(o,s=t.path,u=t.state.value,i)=>{n.set(o,s,u,i||n.createDefaultSetCallback(t.state))}};e.callHookWith(o=>{o.forEach(s=>s(r))},"editInspectorState")},sendInspectorState(t){const n=xe(t);e.callHook("sendInspectorState",{inspectorId:t,plugin:{descriptor:n.descriptor,setupFn:()=>({})}})},inspectComponentInspector(){return Ho()},cancelInspectComponentInspector(){return jo()},getComponentRenderCode(t){const n=Je(L.value,t);if(n)return typeof(n==null?void 0:n.type)!="function"?n.render.toString():n.type.toString()},scrollToComponent(t){return Ko({id:t})},openInEditor:is,getVueInspector:Wo,toggleApp(t,n){const r=Le.value.find(o=>o.id===t);r&&(us(t),ss(r),As(r,L),Jt(),bn(r.app,n))},inspectDOM(t){const n=Je(L.value,t);if(n){const[r]=Qe(n);r&&(h.__VUE_DEVTOOLS_INSPECT_DOM_TARGET__=r)}},updatePluginSettings(t,n,r){ls(t,n,r)},getPluginSettings(t){return{options:as(t),values:En(t)}}}}c();var Dn,In;(In=(Dn=h).__VUE_DEVTOOLS_ENV__)!=null||(Dn.__VUE_DEVTOOLS_ENV__={vitePluginDetected:!1});var kn=ns(),Pn,Rn;(Rn=(Pn=h).__VUE_DEVTOOLS_KIT_CONTEXT__)!=null||(Pn.__VUE_DEVTOOLS_KIT_CONTEXT__={hooks:kn,get state(){return{...P,activeAppRecordId:L.id,activeAppRecord:L.value,appRecords:Le.value}},api:bs(kn)});var fe=h.__VUE_DEVTOOLS_KIT_CONTEXT__;c(),So(To());var Nn,Vn;(Vn=(Nn=h).__VUE_DEVTOOLS_NEXT_APP_RECORD_INFO__)!=null||(Nn.__VUE_DEVTOOLS_NEXT_APP_RECORD_INFO__={id:0,appIds:new Set}),c(),c();function Ss(e){P.highPerfModeEnabled=e??!P.highPerfModeEnabled,!e&&L.value&&bn(L.value.app)}c(),c(),c();function ws(e){P.devtoolsClientDetected={...P.devtoolsClientDetected,...e};const t=Object.values(P.devtoolsClientDetected).some(Boolean);Ss(!t)}var xn,Ln;(Ln=(xn=h).__VUE_DEVTOOLS_UPDATE_CLIENT_DETECTED__)!=null||(xn.__VUE_DEVTOOLS_UPDATE_CLIENT_DETECTED__=ws),c(),c(),c(),c(),c(),c(),c();var Ts=class{constructor(){this.keyToValue=new Map,this.valueToKey=new Map}set(e,t){this.keyToValue.set(e,t),this.valueToKey.set(t,e)}getByKey(e){return this.keyToValue.get(e)}getByValue(e){return this.valueToKey.get(e)}clear(){this.keyToValue.clear(),this.valueToKey.clear()}},Bn=class{constructor(t){this.generateIdentifier=t,this.kv=new Ts}register(t,n){this.kv.getByValue(t)||(n||(n=this.generateIdentifier(t)),this.kv.set(n,t))}clear(){this.kv.clear()}getIdentifier(t){return this.kv.getByValue(t)}getValue(t){return this.kv.getByKey(t)}},Cs=class extends Bn{constructor(){super(e=>e.name),this.classToAllowedProps=new Map}register(e,t){typeof t=="object"?(t.allowProps&&this.classToAllowedProps.set(e,t.allowProps),super.register(e,t.identifier)):super.register(e,t)}getAllowedProps(e){return this.classToAllowedProps.get(e)}};c(),c();function Ds(e){if("values"in Object)return Object.values(e);const t=[];for(const n in e)e.hasOwnProperty(n)&&t.push(e[n]);return t}function Is(e,t){const n=Ds(e);if("find"in n)return n.find(t);const r=n;for(let o=0;o<r.length;o++){const s=r[o];if(t(s))return s}}function de(e,t){Object.entries(e).forEach(([n,r])=>t(r,n))}function Be(e,t){return e.indexOf(t)!==-1}function Fn(e,t){for(let n=0;n<e.length;n++){const r=e[n];if(t(r))return r}}var ks=class{constructor(){this.transfomers={}}register(e){this.transfomers[e.name]=e}findApplicable(e){return Is(this.transfomers,t=>t.isApplicable(e))}findByName(e){return this.transfomers[e]}};c(),c();var Ps=e=>Object.prototype.toString.call(e).slice(8,-1),Un=e=>typeof e>"u",Rs=e=>e===null,be=e=>typeof e!="object"||e===null||e===Object.prototype?!1:Object.getPrototypeOf(e)===null?!0:Object.getPrototypeOf(e)===Object.prototype,ft=e=>be(e)&&Object.keys(e).length===0,J=e=>Array.isArray(e),Ns=e=>typeof e=="string",Vs=e=>typeof e=="number"&&!isNaN(e),xs=e=>typeof e=="boolean",Ls=e=>e instanceof RegExp,Se=e=>e instanceof Map,we=e=>e instanceof Set,Mn=e=>Ps(e)==="Symbol",Bs=e=>e instanceof Date&&!isNaN(e.valueOf()),Fs=e=>e instanceof Error,$n=e=>typeof e=="number"&&isNaN(e),Us=e=>xs(e)||Rs(e)||Un(e)||Vs(e)||Ns(e)||Mn(e),Ms=e=>typeof e=="bigint",$s=e=>e===1/0||e===-1/0,js=e=>ArrayBuffer.isView(e)&&!(e instanceof DataView),Hs=e=>e instanceof URL;c();var jn=e=>e.replace(/\./g,"\\."),dt=e=>e.map(String).map(jn).join("."),Te=e=>{const t=[];let n="";for(let o=0;o<e.length;o++){let s=e.charAt(o);if(s==="\\"&&e.charAt(o+1)==="."){n+=".",o++;continue}if(s==="."){t.push(n),n="";continue}n+=s}const r=n;return t.push(r),t};c();function G(e,t,n,r){return{isApplicable:e,annotation:t,transform:n,untransform:r}}var Hn=[G(Un,"undefined",()=>null,()=>{}),G(Ms,"bigint",e=>e.toString(),e=>typeof BigInt<"u"?BigInt(e):(console.error("Please add a BigInt polyfill."),e)),G(Bs,"Date",e=>e.toISOString(),e=>new Date(e)),G(Fs,"Error",(e,t)=>{const n={name:e.name,message:e.message};return t.allowedErrorProps.forEach(r=>{n[r]=e[r]}),n},(e,t)=>{const n=new Error(e.message);return n.name=e.name,n.stack=e.stack,t.allowedErrorProps.forEach(r=>{n[r]=e[r]}),n}),G(Ls,"regexp",e=>""+e,e=>{const t=e.slice(1,e.lastIndexOf("/")),n=e.slice(e.lastIndexOf("/")+1);return new RegExp(t,n)}),G(we,"set",e=>[...e.values()],e=>new Set(e)),G(Se,"map",e=>[...e.entries()],e=>new Map(e)),G(e=>$n(e)||$s(e),"number",e=>$n(e)?"NaN":e>0?"Infinity":"-Infinity",Number),G(e=>e===0&&1/e===-1/0,"number",()=>"-0",Number),G(Hs,"URL",e=>e.toString(),e=>new URL(e))];function Fe(e,t,n,r){return{isApplicable:e,annotation:t,transform:n,untransform:r}}var Kn=Fe((e,t)=>Mn(e)?!!t.symbolRegistry.getIdentifier(e):!1,(e,t)=>["symbol",t.symbolRegistry.getIdentifier(e)],e=>e.description,(e,t,n)=>{const r=n.symbolRegistry.getValue(t[1]);if(!r)throw new Error("Trying to deserialize unknown symbol");return r}),Ks=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array,Uint8ClampedArray].reduce((e,t)=>(e[t.name]=t,e),{}),zn=Fe(js,e=>["typed-array",e.constructor.name],e=>[...e],(e,t)=>{const n=Ks[t[1]];if(!n)throw new Error("Trying to deserialize unknown typed array");return new n(e)});function Gn(e,t){return e!=null&&e.constructor?!!t.classRegistry.getIdentifier(e.constructor):!1}var Wn=Fe(Gn,(e,t)=>["class",t.classRegistry.getIdentifier(e.constructor)],(e,t)=>{const n=t.classRegistry.getAllowedProps(e.constructor);if(!n)return{...e};const r={};return n.forEach(o=>{r[o]=e[o]}),r},(e,t,n)=>{const r=n.classRegistry.getValue(t[1]);if(!r)throw new Error(`Trying to deserialize unknown class '${t[1]}' - check https://github.com/blitz-js/superjson/issues/116#issuecomment-773996564`);return Object.assign(Object.create(r.prototype),e)}),Yn=Fe((e,t)=>!!t.customTransformerRegistry.findApplicable(e),(e,t)=>["custom",t.customTransformerRegistry.findApplicable(e).name],(e,t)=>t.customTransformerRegistry.findApplicable(e).serialize(e),(e,t,n)=>{const r=n.customTransformerRegistry.findByName(t[1]);if(!r)throw new Error("Trying to deserialize unknown custom value");return r.deserialize(e)}),zs=[Wn,Kn,Yn,zn],qn=(e,t)=>{const n=Fn(zs,o=>o.isApplicable(e,t));if(n)return{value:n.transform(e,t),type:n.annotation(e,t)};const r=Fn(Hn,o=>o.isApplicable(e,t));if(r)return{value:r.transform(e,t),type:r.annotation}},Xn={};Hn.forEach(e=>{Xn[e.annotation]=e});var Gs=(e,t,n)=>{if(J(t))switch(t[0]){case"symbol":return Kn.untransform(e,t,n);case"class":return Wn.untransform(e,t,n);case"custom":return Yn.untransform(e,t,n);case"typed-array":return zn.untransform(e,t,n);default:throw new Error("Unknown transformation: "+t)}else{const r=Xn[t];if(!r)throw new Error("Unknown transformation: "+t);return r.untransform(e,n)}};c();var _e=(e,t)=>{if(t>e.size)throw new Error("index out of bounds");const n=e.keys();for(;t>0;)n.next(),t--;return n.next().value};function Zn(e){if(Be(e,"__proto__"))throw new Error("__proto__ is not allowed as a property");if(Be(e,"prototype"))throw new Error("prototype is not allowed as a property");if(Be(e,"constructor"))throw new Error("constructor is not allowed as a property")}var Ws=(e,t)=>{Zn(t);for(let n=0;n<t.length;n++){const r=t[n];if(we(e))e=_e(e,+r);else if(Se(e)){const o=+r,s=+t[++n]==0?"key":"value",u=_e(e,o);switch(s){case"key":e=u;break;case"value":e=e.get(u);break}}else e=e[r]}return e},_t=(e,t,n)=>{if(Zn(t),t.length===0)return n(e);let r=e;for(let s=0;s<t.length-1;s++){const u=t[s];if(J(r)){const i=+u;r=r[i]}else if(be(r))r=r[u];else if(we(r)){const i=+u;r=_e(r,i)}else if(Se(r)){if(s===t.length-2)break;const a=+u,l=+t[++s]==0?"key":"value",E=_e(r,a);switch(l){case"key":r=E;break;case"value":r=r.get(E);break}}}const o=t[t.length-1];if(J(r)?r[+o]=n(r[+o]):be(r)&&(r[o]=n(r[o])),we(r)){const s=_e(r,+o),u=n(s);s!==u&&(r.delete(s),r.add(u))}if(Se(r)){const s=+t[t.length-2],u=_e(r,s);switch(+o==0?"key":"value"){case"key":{const a=n(u);r.set(a,r.get(u)),a!==u&&r.delete(u);break}case"value":{r.set(u,n(r.get(u)));break}}}return e};function pt(e,t,n=[]){if(!e)return;if(!J(e)){de(e,(s,u)=>pt(s,t,[...n,...Te(u)]));return}const[r,o]=e;o&&de(o,(s,u)=>{pt(s,t,[...n,...Te(u)])}),t(r,n)}function Ys(e,t,n){return pt(t,(r,o)=>{e=_t(e,o,s=>Gs(s,r,n))}),e}function qs(e,t){function n(r,o){const s=Ws(e,Te(o));r.map(Te).forEach(u=>{e=_t(e,u,()=>s)})}if(J(t)){const[r,o]=t;r.forEach(s=>{e=_t(e,Te(s),()=>e)}),o&&de(o,n)}else de(t,n);return e}var Xs=(e,t)=>be(e)||J(e)||Se(e)||we(e)||Gn(e,t);function Zs(e,t,n){const r=n.get(e);r?r.push(t):n.set(e,[t])}function Js(e,t){const n={};let r;return e.forEach(o=>{if(o.length<=1)return;t||(o=o.map(i=>i.map(String)).sort((i,a)=>i.length-a.length));const[s,...u]=o;s.length===0?r=u.map(dt):n[dt(s)]=u.map(dt)}),r?ft(n)?[r]:[r,n]:ft(n)?void 0:n}var Jn=(e,t,n,r,o=[],s=[],u=new Map)=>{var i;const a=Us(e);if(!a){Zs(e,o,t);const p=u.get(e);if(p)return r?{transformedValue:null}:p}if(!Xs(e,n)){const p=qn(e,n),A=p?{transformedValue:p.value,annotations:[p.type]}:{transformedValue:e};return a||u.set(e,A),A}if(Be(s,e))return{transformedValue:null};const l=qn(e,n),E=(i=l==null?void 0:l.value)!=null?i:e,f=J(E)?[]:{},O={};de(E,(p,A)=>{if(A==="__proto__"||A==="constructor"||A==="prototype")throw new Error(`Detected property ${A}. This is a prototype pollution risk, please remove it from your object.`);const _=Jn(p,t,n,r,[...o,A],[...s,e],u);f[A]=_.transformedValue,J(_.annotations)?O[A]=_.annotations:be(_.annotations)&&de(_.annotations,(g,w)=>{O[jn(A)+"."+w]=g})});const d=ft(O)?{transformedValue:f,annotations:l?[l.type]:void 0}:{transformedValue:f,annotations:l?[l.type,O]:O};return a||u.set(e,d),d};c(),c();function Qn(e){return Object.prototype.toString.call(e).slice(8,-1)}function er(e){return Qn(e)==="Array"}function Qs(e){if(Qn(e)!=="Object")return!1;const t=Object.getPrototypeOf(e);return!!t&&t.constructor===Object&&t===Object.prototype}function eu(e,t,n,r,o){const s={}.propertyIsEnumerable.call(r,t)?"enumerable":"nonenumerable";s==="enumerable"&&(e[t]=n),o&&s==="nonenumerable"&&Object.defineProperty(e,t,{value:n,enumerable:!1,writable:!0,configurable:!0})}function ht(e,t={}){if(er(e))return e.map(o=>ht(o,t));if(!Qs(e))return e;const n=Object.getOwnPropertyNames(e),r=Object.getOwnPropertySymbols(e);return[...n,...r].reduce((o,s)=>{if(er(t.props)&&!t.props.includes(s))return o;const u=e[s],i=ht(u,t);return eu(o,s,i,e,t.nonenumerable),o},{})}var D=class{constructor({dedupe:e=!1}={}){this.classRegistry=new Cs,this.symbolRegistry=new Bn(t=>{var n;return(n=t.description)!=null?n:""}),this.customTransformerRegistry=new ks,this.allowedErrorProps=[],this.dedupe=e}serialize(e){const t=new Map,n=Jn(e,t,this,this.dedupe),r={json:n.transformedValue};n.annotations&&(r.meta={...r.meta,values:n.annotations});const o=Js(t,this.dedupe);return o&&(r.meta={...r.meta,referentialEqualities:o}),r}deserialize(e){const{json:t,meta:n}=e;let r=ht(t);return n!=null&&n.values&&(r=Ys(r,n.values,this)),n!=null&&n.referentialEqualities&&(r=qs(r,n.referentialEqualities)),r}stringify(e){return JSON.stringify(this.serialize(e))}parse(e){return this.deserialize(JSON.parse(e))}registerClass(e,t){this.classRegistry.register(e,t)}registerSymbol(e,t){this.symbolRegistry.register(e,t)}registerCustom(e,t){this.customTransformerRegistry.register({name:t,...e})}allowErrorProps(...e){this.allowedErrorProps.push(...e)}};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),c(),c(),c(),c(),c(),c(),c(),c(),c(),c(),c(),c(),c(),c(),c(),c(),c(),c(),c(),c(),c(),c(),c();var tr,nr;(nr=(tr=h).__VUE_DEVTOOLS_KIT_MESSAGE_CHANNELS__)!=null||(tr.__VUE_DEVTOOLS_KIT_MESSAGE_CHANNELS__=[]);var rr,or;(or=(rr=h).__VUE_DEVTOOLS_KIT_RPC_CLIENT__)!=null||(rr.__VUE_DEVTOOLS_KIT_RPC_CLIENT__=null);var sr,ur;(ur=(sr=h).__VUE_DEVTOOLS_KIT_RPC_SERVER__)!=null||(sr.__VUE_DEVTOOLS_KIT_RPC_SERVER__=null);var ir,ar;(ar=(ir=h).__VUE_DEVTOOLS_KIT_VITE_RPC_CLIENT__)!=null||(ir.__VUE_DEVTOOLS_KIT_VITE_RPC_CLIENT__=null);var cr,lr;(lr=(cr=h).__VUE_DEVTOOLS_KIT_VITE_RPC_SERVER__)!=null||(cr.__VUE_DEVTOOLS_KIT_VITE_RPC_SERVER__=null);var fr,dr;(dr=(fr=h).__VUE_DEVTOOLS_KIT_BROADCAST_RPC_SERVER__)!=null||(fr.__VUE_DEVTOOLS_KIT_BROADCAST_RPC_SERVER__=null),c(),c(),c(),c(),c(),c(),c();/*!
|
|
1
|
+
(function(N,S){typeof exports=="object"&&typeof module<"u"?S(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],S):(N=typeof globalThis<"u"?globalThis:N||self,S(N["@stonecrop/stonecrop"]={},N.Vue))})(this,function(N,S){"use strict";var Yc=Object.defineProperty;var qc=(N,S,pe)=>S in N?Yc(N,S,{enumerable:!0,configurable:!0,writable:!0,value:pe}):N[S]=pe;var P=(N,S,pe)=>qc(N,typeof S!="symbol"?S+"":S,pe);function pe(){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 fo(){const e=pe();if(e.__xstate__)return e.__xstate__}const ho=e=>{if(typeof window>"u")return;const t=fo();t&&t.register(e)};class gn{constructor(t){this._process=t,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(t){const n={value:t,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 t=this._current;this._process(t.value),this._current=t.next}this._last=null}}const mn=".",po="",En="",_o="#",go="*",yn="xstate.init",_t="xstate.stop";function mo(e,t){return{type:`xstate.after.${e}.${t}`}}function gt(e,t){return{type:`xstate.done.state.${e}`,output:t}}function Eo(e,t){return{type:`xstate.done.actor.${e}`,output:t,actorId:e}}function yo(e,t){return{type:`xstate.error.actor.${e}`,error:t,actorId:e}}function vn(e){return{type:yn,input:e}}function J(e){setTimeout(()=>{throw e})}const vo=typeof Symbol=="function"&&Symbol.observable||"@@observable";function Sn(e,t){const n=bn(e),r=bn(t);return typeof r=="string"?typeof n=="string"?r===n:!1:typeof n=="string"?n in r:Object.keys(n).every(s=>s in r?Sn(n[s],r[s]):!1)}function mt(e){if(On(e))return e;const t=[];let n="";for(let r=0;r<e.length;r++){switch(e.charCodeAt(r)){case 92:n+=e[r+1],r++;continue;case 46:t.push(n),n="";continue}n+=e[r]}return t.push(n),t}function bn(e){if(ei(e))return e.value;if(typeof e!="string")return e;const t=mt(e);return So(t)}function So(e){if(e.length===1)return e[0];const t={};let n=t;for(let r=0;r<e.length-1;r++)if(r===e.length-2)n[e[r]]=e[r+1];else{const s=n;n={},s[e[r]]=n}return t}function An(e,t){const n={},r=Object.keys(e);for(let s=0;s<r.length;s++){const o=r[s];n[o]=t(e[o],o,e,s)}return n}function wn(e){return On(e)?e:[e]}function Q(e){return e===void 0?[]:wn(e)}function Et(e,t,n,r){return typeof e=="function"?e({context:t,event:n,self:r}):e}function On(e){return Array.isArray(e)}function bo(e){return e.type.startsWith("xstate.error.actor")}function _e(e){return wn(e).map(t=>typeof t>"u"||typeof t=="string"?{target:t}:t)}function Tn(e){if(!(e===void 0||e===po))return Q(e)}function yt(e,t,n){var o,i,u;const r=typeof e=="object",s=r?e:void 0;return{next:(o=r?e.next:e)==null?void 0:o.bind(s),error:(i=r?e.error:t)==null?void 0:i.bind(s),complete:(u=r?e.complete:n)==null?void 0:u.bind(s)}}function In(e,t){return`${t}.${e}`}function vt(e,t){const n=t.match(/^xstate\.invoke\.(\d+)\.(.*)/);if(!n)return e.implementations.actors[t];const[,r,s]=n,i=e.getStateNodeById(s).config.invoke;return(Array.isArray(i)?i[r]:i).src}function kn(e,t){return`${e.sessionId}.${t}`}let Ao=0;function wo(e,t){const n=new Map,r=new Map,s=new WeakMap,o=new Set,i={},{clock:u,logger:a}=t,c={schedule:(f,h,d,m,g=Math.random().toString(36).slice(2))=>{const E={source:f,target:h,event:d,delay:m,id:g,startedAt:Date.now()},w=kn(f,g);l._snapshot._scheduledEvents[w]=E;const T=u.setTimeout(()=>{delete i[w],delete l._snapshot._scheduledEvents[w],l._relay(f,h,d)},m);i[w]=T},cancel:(f,h)=>{const d=kn(f,h),m=i[d];delete i[d],delete l._snapshot._scheduledEvents[d],m!==void 0&&u.clearTimeout(m)},cancelAll:f=>{for(const h in l._snapshot._scheduledEvents){const d=l._snapshot._scheduledEvents[h];d.source===f&&c.cancel(f,d.id)}}},p=f=>{if(!o.size)return;const h={...f,rootId:e.sessionId};o.forEach(d=>{var m;return(m=d.next)==null?void 0:m.call(d,h)})},l={_snapshot:{_scheduledEvents:((t==null?void 0:t.snapshot)&&t.snapshot.scheduler)??{}},_bookId:()=>`x:${Ao++}`,_register:(f,h)=>(n.set(f,h),f),_unregister:f=>{n.delete(f.sessionId);const h=s.get(f);h!==void 0&&(r.delete(h),s.delete(f))},get:f=>r.get(f),_set:(f,h)=>{const d=r.get(f);if(d&&d!==h)throw new Error(`Actor with system ID '${f}' already exists.`);r.set(f,h),s.set(h,f)},inspect:f=>{const h=yt(f);return o.add(h),{unsubscribe(){o.delete(h)}}},_sendInspectionEvent:p,_relay:(f,h,d)=>{l._sendInspectionEvent({type:"@xstate.event",sourceRef:f,actorRef:h,event:d}),h._send(d)},scheduler:c,getSnapshot:()=>({_scheduledEvents:{...l._snapshot._scheduledEvents}}),start:()=>{const f=l._snapshot._scheduledEvents;l._snapshot._scheduledEvents={};for(const h in f){const{source:d,target:m,event:g,delay:E,id:w}=f[h];c.schedule(d,m,g,E,w)}},_clock:u,_logger:a};return l}let St=!1;const bt=1;let M=function(e){return e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped",e}({});const Oo={clock:{setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e)},logger:console.log.bind(console),devTools:!1};class To{constructor(t,n){this.logic=t,this._snapshot=void 0,this.clock=void 0,this.options=void 0,this.id=void 0,this.mailbox=new gn(this._process.bind(this)),this.observers=new Set,this.eventListeners=new Map,this.logger=void 0,this._processingStatus=M.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 r={...Oo,...n},{clock:s,logger:o,parent:i,syncSnapshot:u,id:a,systemId:c,inspect:p}=r;this.system=i?i.system:wo(this,{clock:s,logger:o}),p&&!i&&this.system.inspect(yt(p)),this.sessionId=this.system._bookId(),this.id=a??this.sessionId,this.logger=(n==null?void 0:n.logger)??this.system._logger,this.clock=(n==null?void 0:n.clock)??this.system._clock,this._parent=i,this._syncSnapshot=u,this.options=r,this.src=r.src??t,this.ref=this,this._actorScope={self:this,id:this.id,sessionId:this.sessionId,logger:this.logger,defer:l=>{this._deferred.push(l)},system:this.system,stopChild:l=>{if(l._parent!==this)throw new Error(`Cannot stop child actor ${l.id} of ${this.id} because it is not a child`);l._stop()},emit:l=>{const f=this.eventListeners.get(l.type),h=this.eventListeners.get("*");if(!f&&!h)return;const d=[...f?f.values():[],...h?h.values():[]];for(const m of d)m(l)},actionExecutor:l=>{const f=()=>{if(this._actorScope.system._sendInspectionEvent({type:"@xstate.action",actorRef:this,action:{type:l.type,params:l.params}}),!l.exec)return;const h=St;try{St=!0,l.exec(l.info,l.params)}finally{St=h}};this._processingStatus===M.Running?f():this._deferred.push(f)}},this.send=this.send.bind(this),this.system._sendInspectionEvent({type:"@xstate.actor",actorRef:this}),c&&(this._systemId=c,this.system._set(c,this)),this._initState((n==null?void 0:n.snapshot)??(n==null?void 0:n.state)),c&&this._snapshot.status!=="active"&&this.system._unregister(this)}_initState(t){var n;try{this._snapshot=t?this.logic.restoreSnapshot?this.logic.restoreSnapshot(t,this._actorScope):t:this.logic.getInitialSnapshot(this._actorScope,(n=this.options)==null?void 0:n.input)}catch(r){this._snapshot={status:"error",output:void 0,error:r}}}update(t,n){var s,o;this._snapshot=t;let r;for(;r=this._deferred.shift();)try{r()}catch(i){this._deferred.length=0,this._snapshot={...t,status:"error",error:i}}switch(this._snapshot.status){case"active":for(const i of this.observers)try{(s=i.next)==null||s.call(i,t)}catch(u){J(u)}break;case"done":for(const i of this.observers)try{(o=i.next)==null||o.call(i,t)}catch(u){J(u)}this._stopProcedure(),this._complete(),this._doneEvent=Eo(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:t})}subscribe(t,n,r){var o;const s=yt(t,n,r);if(this._processingStatus!==M.Stopped)this.observers.add(s);else switch(this._snapshot.status){case"done":try{(o=s.complete)==null||o.call(s)}catch(i){J(i)}break;case"error":{const i=this._snapshot.error;if(!s.error)J(i);else try{s.error(i)}catch(u){J(u)}break}}return{unsubscribe:()=>{this.observers.delete(s)}}}on(t,n){let r=this.eventListeners.get(t);r||(r=new Set,this.eventListeners.set(t,r));const s=n.bind(void 0);return r.add(s),{unsubscribe:()=>{r.delete(s)}}}start(){if(this._processingStatus===M.Running)return this;this._syncSnapshot&&this.subscribe({next:r=>{r.status==="active"&&this.system._relay(this,this._parent,{type:`xstate.snapshot.${this.id}`,snapshot:r})},error:()=>{}}),this.system._register(this.sessionId,this),this._systemId&&this.system._set(this._systemId,this),this._processingStatus=M.Running;const t=vn(this.options.input);switch(this.system._sendInspectionEvent({type:"@xstate.event",sourceRef:this._parent,actorRef:this,event:t}),this._snapshot.status){case"done":return this.update(this._snapshot,t),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(r){return this._snapshot={...this._snapshot,status:"error",error:r},this._error(r),this}return this.update(this._snapshot,t),this.options.devTools&&this.attachDevTools(),this.mailbox.start(),this}_process(t){let n,r;try{n=this.logic.transition(this._snapshot,t,this._actorScope)}catch(s){r={err:s}}if(r){const{err:s}=r;this._snapshot={...this._snapshot,status:"error",error:s},this._error(s);return}this.update(n,t),t.type===_t&&(this._stopProcedure(),this._complete())}_stop(){return this._processingStatus===M.Stopped?this:(this.mailbox.clear(),this._processingStatus===M.NotStarted?(this._processingStatus=M.Stopped,this):(this.mailbox.enqueue({type:_t}),this))}stop(){if(this._parent)throw new Error("A non-root actor cannot be stopped directly.");return this._stop()}_complete(){var t;for(const n of this.observers)try{(t=n.complete)==null||t.call(n)}catch(r){J(r)}this.observers.clear()}_reportError(t){if(!this.observers.size){this._parent||J(t);return}let n=!1;for(const r of this.observers){const s=r.error;n||(n=!s);try{s==null||s(t)}catch(o){J(o)}}this.observers.clear(),n&&J(t)}_error(t){this._stopProcedure(),this._reportError(t),this._parent&&this.system._relay(this,this._parent,yo(this.id,t))}_stopProcedure(){return this._processingStatus!==M.Running?this:(this.system.scheduler.cancelAll(this),this.mailbox.clear(),this.mailbox=new gn(this._process.bind(this)),this._processingStatus=M.Stopped,this.system._unregister(this),this)}_send(t){this._processingStatus!==M.Stopped&&this.mailbox.enqueue(t)}send(t){this.system._relay(void 0,this,t)}attachDevTools(){const{devTools:t}=this.options;t&&(typeof t=="function"?t:ho)(this)}toJSON(){return{xstate$$type:bt,id:this.id}}getPersistedSnapshot(t){return this.logic.getPersistedSnapshot(this._snapshot,t)}[vo](){return this}getSnapshot(){return this._snapshot}}function Pe(e,...[t]){return new To(e,t)}function Io(e,t,n,r,{sendId:s}){const o=typeof s=="function"?s(n,r):s;return[t,{sendId:o},void 0]}function ko(e,t){e.defer(()=>{e.system.scheduler.cancel(e.self,t.sendId)})}function Co(e){function t(n,r){}return t.type="xstate.cancel",t.sendId=e,t.resolve=Io,t.execute=ko,t}function Do(e,t,n,r,{id:s,systemId:o,src:i,input:u,syncSnapshot:a}){const c=typeof i=="string"?vt(t.machine,i):i,p=typeof s=="function"?s(n):s;let l,f;return c&&(f=typeof u=="function"?u({context:t.context,event:n.event,self:e.self}):u,l=Pe(c,{id:p,src:i,parent:e.self,syncSnapshot:a,systemId:o,input:f})),[ae(t,{children:{...t.children,[p]:l}}),{id:s,systemId:o,actorRef:l,src:i,input:f},void 0]}function xo(e,{actorRef:t}){t&&e.defer(()=>{t._processingStatus!==M.Stopped&&t.start()})}function Ro(...[e,{id:t,systemId:n,input:r,syncSnapshot:s=!1}={}]){function o(i,u){}return o.type="xstate.spawnChild",o.id=t,o.systemId=n,o.src=e,o.input=r,o.syncSnapshot=s,o.resolve=Do,o.execute=xo,o}function Po(e,t,n,r,{actorRef:s}){const o=typeof s=="function"?s(n,r):s,i=typeof o=="string"?t.children[o]:o;let u=t.children;return i&&(u={...u},delete u[i.id]),[ae(t,{children:u}),i,void 0]}function No(e,t){if(t){if(e.system._unregister(t),t._processingStatus!==M.Running){e.stopChild(t);return}e.defer(()=>{e.stopChild(t)})}}function Cn(e){function t(n,r){}return t.type="xstate.stopChild",t.actorRef=e,t.resolve=Po,t.execute=No,t}function At(e,t,n,r){const{machine:s}=r,o=typeof e=="function",i=o?e:s.implementations.guards[typeof e=="string"?e:e.type];if(!o&&!i)throw new Error(`Guard '${typeof e=="string"?e:e.type}' is not implemented.'.`);if(typeof i!="function")return At(i,t,n,r);const u={context:t,event:n},a=o||typeof e=="string"?void 0:"params"in e?typeof e.params=="function"?e.params({context:t,event:n}):e.params:void 0;return"check"in i?i.check(r,u,i):i(u,a)}const wt=e=>e.type==="atomic"||e.type==="final";function ge(e){return Object.values(e.states).filter(t=>t.type!=="history")}function Ne(e,t){const n=[];if(t===e)return n;let r=e.parent;for(;r&&r!==t;)n.push(r),r=r.parent;return n}function Ye(e){const t=new Set(e),n=xn(t);for(const r of t)if(r.type==="compound"&&(!n.get(r)||!n.get(r).length))Nn(r).forEach(s=>t.add(s));else if(r.type==="parallel"){for(const s of ge(r))if(s.type!=="history"&&!t.has(s)){const o=Nn(s);for(const i of o)t.add(i)}}for(const r of t){let s=r.parent;for(;s;)t.add(s),s=s.parent}return t}function Dn(e,t){const n=t.get(e);if(!n)return{};if(e.type==="compound"){const s=n[0];if(s){if(wt(s))return s.key}else return{}}const r={};for(const s of n)r[s.key]=Dn(s,t);return r}function xn(e){const t=new Map;for(const n of e)t.has(n)||t.set(n,[]),n.parent&&(t.has(n.parent)||t.set(n.parent,[]),t.get(n.parent).push(n));return t}function Rn(e,t){const n=Ye(t);return Dn(e,xn(n))}function Ot(e,t){return t.type==="compound"?ge(t).some(n=>n.type==="final"&&e.has(n)):t.type==="parallel"?ge(t).every(n=>Ot(e,n)):t.type==="final"}const qe=e=>e[0]===_o;function Vo(e,t){return e.transitions.get(t)||[...e.transitions.keys()].filter(r=>{if(r===go)return!0;if(!r.endsWith(".*"))return!1;const s=r.split("."),o=t.split(".");for(let i=0;i<s.length;i++){const u=s[i],a=o[i];if(u==="*")return i===s.length-1;if(u!==a)return!1}return!0}).sort((r,s)=>s.length-r.length).flatMap(r=>e.transitions.get(r))}function Lo(e){const t=e.config.after;if(!t)return[];const n=s=>{const o=mo(s,e.id),i=o.type;return e.entry.push(li(o,{id:i,delay:s})),e.exit.push(Co(i)),i};return Object.keys(t).flatMap(s=>{const o=t[s],i=typeof o=="string"?{target:o}:o,u=Number.isNaN(+s)?s:+s,a=n(u);return Q(i).map(c=>({...c,event:a,delay:u}))}).map(s=>{const{delay:o}=s;return{...ie(e,s.event,s),delay:o}})}function ie(e,t,n){const r=Tn(n.target),s=n.reenter??!1,o=$o(e,r),i={...n,actions:Q(n.actions),guard:n.guard,target:o,source:e,reenter:s,eventType:t,toJSON:()=>({...i,source:`#${e.id}`,target:o?o.map(u=>`#${u.id}`):void 0})};return i}function Mo(e){const t=new Map;if(e.config.on)for(const n of Object.keys(e.config.on)){if(n===En)throw new Error('Null events ("") cannot be specified as a transition key. Use `always: { ... }` instead.');const r=e.config.on[n];t.set(n,_e(r).map(s=>ie(e,n,s)))}if(e.config.onDone){const n=`xstate.done.state.${e.id}`;t.set(n,_e(e.config.onDone).map(r=>ie(e,n,r)))}for(const n of e.invoke){if(n.onDone){const r=`xstate.done.actor.${n.id}`;t.set(r,_e(n.onDone).map(s=>ie(e,r,s)))}if(n.onError){const r=`xstate.error.actor.${n.id}`;t.set(r,_e(n.onError).map(s=>ie(e,r,s)))}if(n.onSnapshot){const r=`xstate.snapshot.${n.id}`;t.set(r,_e(n.onSnapshot).map(s=>ie(e,r,s)))}}for(const n of e.after){let r=t.get(n.eventType);r||(r=[],t.set(n.eventType,r)),r.push(n)}return t}function Bo(e,t){const n=typeof t=="string"?e.states[t]:t?e.states[t.target]:void 0;if(!n&&t)throw new Error(`Initial state node "${t}" not found on parent state node #${e.id}`);const r={source:e,actions:!t||typeof t=="string"?[]:Q(t.actions),eventType:null,reenter:!1,target:n?[n]:[],toJSON:()=>({...r,source:`#${e.id}`,target:n?[`#${n.id}`]:[]})};return r}function $o(e,t){if(t!==void 0)return t.map(n=>{if(typeof n!="string")return n;if(qe(n))return e.machine.getStateNodeById(n);const r=n[0]===mn;if(r&&!e.parent)return Je(e,n.slice(1));const s=r?e.key+n:n;if(e.parent)try{return Je(e.parent,s)}catch(o){throw new Error(`Invalid transition definition for state node '${e.id}':
|
|
2
|
+
${o.message}`)}else throw new Error(`Invalid target: "${n}" is not a valid target from the root node. Did you mean ".${n}"?`)})}function Pn(e){const t=Tn(e.config.target);return t?{target:t.map(n=>typeof n=="string"?Je(e.parent,n):n)}:e.parent.initial}function ue(e){return e.type==="history"}function Nn(e){const t=Vn(e);for(const n of t)for(const r of Ne(n,e))t.add(r);return t}function Vn(e){const t=new Set;function n(r){if(!t.has(r)){if(t.add(r),r.type==="compound")n(r.initial.target[0]);else if(r.type==="parallel")for(const s of ge(r))n(s)}}return n(e),t}function me(e,t){if(qe(t))return e.machine.getStateNodeById(t);if(!e.states)throw new Error(`Unable to retrieve child state '${t}' from '${e.id}'; no child states exist.`);const n=e.states[t];if(!n)throw new Error(`Child state '${t}' does not exist on '${e.id}'`);return n}function Je(e,t){if(typeof t=="string"&&qe(t))try{return e.machine.getStateNodeById(t)}catch{}const n=mt(t).slice();let r=e;for(;n.length;){const s=n.shift();if(!s.length)break;r=me(r,s)}return r}function Xe(e,t){if(typeof t=="string"){const s=e.states[t];if(!s)throw new Error(`State '${t}' does not exist on '${e.id}'`);return[e,s]}const n=Object.keys(t),r=n.map(s=>me(e,s)).filter(Boolean);return[e.machine.root,e].concat(r,n.reduce((s,o)=>{const i=me(e,o);if(!i)return s;const u=Xe(i,t[o]);return s.concat(u)},[]))}function Uo(e,t,n,r){const o=me(e,t).next(n,r);return!o||!o.length?e.next(n,r):o}function Fo(e,t,n,r){const s=Object.keys(t),o=me(e,s[0]),i=Tt(o,t[s[0]],n,r);return!i||!i.length?e.next(n,r):i}function jo(e,t,n,r){const s=[];for(const o of Object.keys(t)){const i=t[o];if(!i)continue;const u=me(e,o),a=Tt(u,i,n,r);a&&s.push(...a)}return s.length?s:e.next(n,r)}function Tt(e,t,n,r){return typeof t=="string"?Uo(e,t,n,r):Object.keys(t).length===1?Fo(e,t,n,r):jo(e,t,n,r)}function Ho(e){return Object.keys(e.states).map(t=>e.states[t]).filter(t=>t.type==="history")}function ee(e,t){let n=e;for(;n.parent&&n.parent!==t;)n=n.parent;return n.parent===t}function zo(e,t){const n=new Set(e),r=new Set(t);for(const s of n)if(r.has(s))return!0;for(const s of r)if(n.has(s))return!0;return!1}function Ln(e,t,n){const r=new Set;for(const s of e){let o=!1;const i=new Set;for(const u of r)if(zo(kt([s],t,n),kt([u],t,n)))if(ee(s.source,u.source))i.add(u);else{o=!0;break}if(!o){for(const u of i)r.delete(u);r.add(s)}}return Array.from(r)}function Ko(e){const[t,...n]=e;for(const r of Ne(t,void 0))if(n.every(s=>ee(s,r)))return r}function It(e,t){if(!e.target)return[];const n=new Set;for(const r of e.target)if(ue(r))if(t[r.id])for(const s of t[r.id])n.add(s);else for(const s of It(Pn(r),t))n.add(s);else n.add(r);return[...n]}function Mn(e,t){const n=It(e,t);if(!n)return;if(!e.reenter&&n.every(s=>s===e.source||ee(s,e.source)))return e.source;const r=Ko(n.concat(e.source));if(r)return r;if(!e.reenter)return e.source.machine.root}function kt(e,t,n){var s;const r=new Set;for(const o of e)if((s=o.target)!=null&&s.length){const i=Mn(o,n);o.reenter&&o.source===i&&r.add(i);for(const u of t)ee(u,i)&&r.add(u)}return[...r]}function Go(e,t){if(e.length!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0}function Ct(e,t,n,r,s,o){if(!e.length)return t;const i=new Set(t._nodes);let u=t.historyValue;const a=Ln(e,i,u);let c=t;s||([c,u]=Jo(c,r,n,a,i,u,o,n.actionExecutor)),c=ye(c,r,n,a.flatMap(l=>l.actions),o,void 0),c=Yo(c,r,n,a,i,o,u,s);const p=[...i];c.status==="done"&&(c=ye(c,r,n,p.sort((l,f)=>f.order-l.order).flatMap(l=>l.exit),o,void 0));try{return u===t.historyValue&&Go(t._nodes,i)?c:ae(c,{_nodes:p,historyValue:u})}catch(l){throw l}}function Wo(e,t,n,r,s){if(r.output===void 0)return;const o=gt(s.id,s.output!==void 0&&s.parent?Et(s.output,e.context,t,n.self):void 0);return Et(r.output,e.context,o,n.self)}function Yo(e,t,n,r,s,o,i,u){let a=e;const c=new Set,p=new Set;qo(r,i,p,c),u&&p.add(e.machine.root);const l=new Set;for(const f of[...c].sort((h,d)=>h.order-d.order)){s.add(f);const h=[];h.push(...f.entry);for(const d of f.invoke)h.push(Ro(d.src,{...d,syncSnapshot:!!d.onSnapshot}));if(p.has(f)){const d=f.initial.actions;h.push(...d)}if(a=ye(a,t,n,h,o,f.invoke.map(d=>d.id)),f.type==="final"){const d=f.parent;let m=(d==null?void 0:d.type)==="parallel"?d:d==null?void 0:d.parent,g=m||f;for((d==null?void 0:d.type)==="compound"&&o.push(gt(d.id,f.output!==void 0?Et(f.output,a.context,t,n.self):void 0));(m==null?void 0:m.type)==="parallel"&&!l.has(m)&&Ot(s,m);)l.add(m),o.push(gt(m.id)),g=m,m=m.parent;if(m)continue;a=ae(a,{status:"done",output:Wo(a,t,n,a.machine.root,g)})}}return a}function qo(e,t,n,r){for(const s of e){const o=Mn(s,t);for(const u of s.target||[])!ue(u)&&(s.source!==u||s.source!==o||s.reenter)&&(r.add(u),n.add(u)),Ee(u,t,n,r);const i=It(s,t);for(const u of i){const a=Ne(u,o);(o==null?void 0:o.type)==="parallel"&&a.push(o),Bn(r,t,n,a,!s.source.parent&&s.reenter?void 0:o)}}}function Ee(e,t,n,r){var s;if(ue(e))if(t[e.id]){const o=t[e.id];for(const i of o)r.add(i),Ee(i,t,n,r);for(const i of o)Dt(i,e.parent,r,t,n)}else{const o=Pn(e);for(const i of o.target)r.add(i),o===((s=e.parent)==null?void 0:s.initial)&&n.add(e.parent),Ee(i,t,n,r);for(const i of o.target)Dt(i,e.parent,r,t,n)}else if(e.type==="compound"){const[o]=e.initial.target;ue(o)||(r.add(o),n.add(o)),Ee(o,t,n,r),Dt(o,e,r,t,n)}else if(e.type==="parallel")for(const o of ge(e).filter(i=>!ue(i)))[...r].some(i=>ee(i,o))||(ue(o)||(r.add(o),n.add(o)),Ee(o,t,n,r))}function Bn(e,t,n,r,s){for(const o of r)if((!s||ee(o,s))&&e.add(o),o.type==="parallel")for(const i of ge(o).filter(u=>!ue(u)))[...e].some(u=>ee(u,i))||(e.add(i),Ee(i,t,n,e))}function Dt(e,t,n,r,s){Bn(n,r,s,Ne(e,t))}function Jo(e,t,n,r,s,o,i,u){let a=e;const c=kt(r,s,o);c.sort((l,f)=>f.order-l.order);let p;for(const l of c)for(const f of Ho(l)){let h;f.history==="deep"?h=d=>wt(d)&&ee(d,l):h=d=>d.parent===l,p??(p={...o}),p[f.id]=Array.from(s).filter(h)}for(const l of c)a=ye(a,t,n,[...l.exit,...l.invoke.map(f=>Cn(f.id))],i,void 0),s.delete(l);return[a,p||o]}function Xo(e,t){return e.implementations.actions[t]}function $n(e,t,n,r,s,o){const{machine:i}=e;let u=e;for(const a of r){const c=typeof a=="function",p=c?a:Xo(i,typeof a=="string"?a:a.type),l={context:u.context,event:t,self:n.self,system:n.system},f=c||typeof a=="string"?void 0:"params"in a?typeof a.params=="function"?a.params({context:u.context,event:t}):a.params:void 0;if(!p||!("resolve"in p)){n.actionExecutor({type:typeof a=="string"?a:typeof a=="object"?a.type:a.name||"(anonymous)",info:l,params:f,exec:p});continue}const h=p,[d,m,g]=h.resolve(n,u,l,f,p,s);u=d,"retryResolve"in h&&(o==null||o.push([h,m])),"execute"in h&&n.actionExecutor({type:h.type,info:l,params:m,exec:h.execute.bind(null,n,m)}),g&&(u=$n(u,t,n,g,s,o))}return u}function ye(e,t,n,r,s,o){const i=o?[]:void 0,u=$n(e,t,n,r,{internalQueue:s,deferredActorIds:o},i);return i==null||i.forEach(([a,c])=>{a.retryResolve(n,u,c)}),u}function xt(e,t,n,r){let s=e;const o=[];function i(c,p,l){n.system._sendInspectionEvent({type:"@xstate.microstep",actorRef:n.self,event:p,snapshot:c,_transitions:l}),o.push(c)}if(t.type===_t)return s=ae(Un(s,t,n),{status:"stopped"}),i(s,t,[]),{snapshot:s,microstates:o};let u=t;if(u.type!==yn){const c=u,p=bo(c),l=Fn(c,s);if(p&&!l.length)return s=ae(e,{status:"error",error:c.error}),i(s,c,[]),{snapshot:s,microstates:o};s=Ct(l,e,n,u,!1,r),i(s,c,l)}let a=!0;for(;s.status==="active";){let c=a?Zo(s,u):[];const p=c.length?s:void 0;if(!c.length){if(!r.length)break;u=r.shift(),c=Fn(u,s)}s=Ct(c,s,n,u,!1,r),a=s!==p,i(s,u,c)}return s.status!=="active"&&Un(s,u,n),{snapshot:s,microstates:o}}function Un(e,t,n){return ye(e,t,n,Object.values(e.children).map(r=>Cn(r)),[],void 0)}function Fn(e,t){return t.machine.getTransitionData(t,e)}function Zo(e,t){const n=new Set,r=e._nodes.filter(wt);for(const s of r)e:for(const o of[s].concat(Ne(s,void 0)))if(o.always){for(const i of o.always)if(i.guard===void 0||At(i.guard,e.context,t,e)){n.add(i);break e}}return Ln(Array.from(n),new Set(e._nodes),e.historyValue)}function Qo(e,t){const n=Ye(Xe(e,t));return Rn(e,[...n])}function ei(e){return!!e&&typeof e=="object"&&"machine"in e&&"value"in e}const ti=function(t){return Sn(t,this.value)},ni=function(t){return this.tags.has(t)},ri=function(t){const n=this.machine.getTransitionData(this,t);return!!(n!=null&&n.length)&&n.some(r=>r.target!==void 0||r.actions.length)},si=function(){const{_nodes:t,tags:n,machine:r,getMeta:s,toJSON:o,can:i,hasTag:u,matches:a,...c}=this;return{...c,tags:Array.from(n)}},oi=function(){return this._nodes.reduce((t,n)=>(n.meta!==void 0&&(t[n.id]=n.meta),t),{})};function Ze(e,t){return{status:e.status,output:e.output,error:e.error,machine:t,context:e.context,_nodes:e._nodes,value:Rn(t.root,e._nodes),tags:new Set(e._nodes.flatMap(n=>n.tags)),children:e.children,historyValue:e.historyValue||{},matches:ti,hasTag:ni,can:ri,getMeta:oi,toJSON:si}}function ae(e,t={}){return Ze({...e,...t},e.machine)}function ii(e){if(typeof e!="object"||e===null)return{};const t={};for(const n in e){const r=e[n];Array.isArray(r)&&(t[n]=r.map(s=>({id:s.id})))}return t}function ui(e,t){const{_nodes:n,tags:r,machine:s,children:o,context:i,can:u,hasTag:a,matches:c,getMeta:p,toJSON:l,...f}=e,h={};for(const m in o){const g=o[m];h[m]={snapshot:g.getPersistedSnapshot(t),src:g.src,systemId:g._systemId,syncSnapshot:g._syncSnapshot}}return{...f,context:jn(i),children:h,historyValue:ii(f.historyValue)}}function jn(e){let t;for(const n in e){const r=e[n];if(r&&typeof r=="object")if("sessionId"in r&&"send"in r&&"ref"in r)t??(t=Array.isArray(e)?e.slice():{...e}),t[n]={xstate$$type:bt,id:r.id};else{const s=jn(r);s!==r&&(t??(t=Array.isArray(e)?e.slice():{...e}),t[n]=s)}}return t??e}function ai(e,t,n,r,{event:s,id:o,delay:i},{internalQueue:u}){const a=t.machine.implementations.delays;if(typeof s=="string")throw new Error(`Only event objects may be used with raise; use raise({ type: "${s}" }) instead`);const c=typeof s=="function"?s(n,r):s;let p;if(typeof i=="string"){const l=a&&a[i];p=typeof l=="function"?l(n,r):l}else p=typeof i=="function"?i(n,r):i;return typeof p!="number"&&u.push(c),[t,{event:c,id:o,delay:p},void 0]}function ci(e,t){const{event:n,delay:r,id:s}=t;if(typeof r=="number"){e.defer(()=>{const o=e.self;e.system.scheduler.schedule(o,o,n,r,s)});return}}function li(e,t){function n(r,s){}return n.type="xstate.raise",n.event=e,n.id=t==null?void 0:t.id,n.delay=t==null?void 0:t.delay,n.resolve=ai,n.execute=ci,n}function fi(e,{machine:t,context:n},r,s){const o=(i,u)=>{if(typeof i=="string"){const a=vt(t,i);if(!a)throw new Error(`Actor logic '${i}' not implemented in machine '${t.id}'`);const c=Pe(a,{id:u==null?void 0:u.id,parent:e.self,syncSnapshot:u==null?void 0:u.syncSnapshot,input:typeof(u==null?void 0:u.input)=="function"?u.input({context:n,event:r,self:e.self}):u==null?void 0:u.input,src:i,systemId:u==null?void 0:u.systemId});return s[c.id]=c,c}else return Pe(i,{id:u==null?void 0:u.id,parent:e.self,syncSnapshot:u==null?void 0:u.syncSnapshot,input:u==null?void 0:u.input,src:i,systemId:u==null?void 0:u.systemId})};return(i,u)=>{const a=o(i,u);return s[a.id]=a,e.defer(()=>{a._processingStatus!==M.Stopped&&a.start()}),a}}function di(e,t,n,r,{assignment:s}){if(!t.context)throw new Error("Cannot assign to undefined `context`. Ensure that `context` is defined in the machine config.");const o={},i={context:t.context,event:n.event,spawn:fi(e,t,n.event,o),self:e.self,system:e.system};let u={};if(typeof s=="function")u=s(i,r);else for(const c of Object.keys(s)){const p=s[c];u[c]=typeof p=="function"?p(i,r):p}const a=Object.assign({},t.context,u);return[ae(t,{context:a,children:Object.keys(o).length?{...t.children,...o}:t.children}),void 0,void 0]}function hi(e){function t(n,r){}return t.type="xstate.assign",t.assignment=e,t.resolve=di,t}const Hn=new WeakMap;function ve(e,t,n){let r=Hn.get(e);return r?t in r||(r[t]=n()):(r={[t]:n()},Hn.set(e,r)),r[t]}const pi={},Ve=e=>typeof e=="string"?{type:e}:typeof e=="function"?"resolve"in e?{type:e.type}:{type:e.name}:e;class Qe{constructor(t,n){if(this.config=t,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(mn),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?An(this.config.states,(r,s)=>new Qe(r,{_parent:this,_key:s,_machine:this.machine})):pi,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=Q(this.config.entry).slice(),this.exit=Q(this.config.exit).slice(),this.meta=this.config.meta,this.output=this.type==="final"||!this.parent?this.config.output:void 0,this.tags=Q(t.tags).slice()}_initialize(){this.transitions=Mo(this),this.config.always&&(this.always=_e(this.config.always).map(t=>ie(this,En,t))),Object.keys(this.states).forEach(t=>{this.states[t]._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(Ve),eventType:null,reenter:!1,toJSON:()=>({target:this.initial.target.map(t=>`#${t.id}`),source:`#${this.id}`,actions:this.initial.actions.map(Ve),eventType:null})}:void 0,history:this.history,states:An(this.states,t=>t.definition),on:this.on,transitions:[...this.transitions.values()].flat().map(t=>({...t,actions:t.actions.map(Ve)})),entry:this.entry.map(Ve),exit:this.exit.map(Ve),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 ve(this,"invoke",()=>Q(this.config.invoke).map((t,n)=>{const{src:r,systemId:s}=t,o=t.id??In(this.id,n),i=typeof r=="string"?r:`xstate.invoke.${In(this.id,n)}`;return{...t,src:i,id:o,systemId:s,toJSON(){const{onDone:u,onError:a,...c}=t;return{...c,type:"xstate.invoke",src:i,id:o}}}}))}get on(){return ve(this,"on",()=>[...this.transitions].flatMap(([n,r])=>r.map(s=>[n,s])).reduce((n,[r,s])=>(n[r]=n[r]||[],n[r].push(s),n),{}))}get after(){return ve(this,"delayedTransitions",()=>Lo(this))}get initial(){return ve(this,"initial",()=>Bo(this,this.config.initial))}next(t,n){const r=n.type,s=[];let o;const i=ve(this,`candidates-${r}`,()=>Vo(this,r));for(const u of i){const{guard:a}=u,c=t.context;let p=!1;try{p=!a||At(a,c,n,t)}catch(l){const f=typeof a=="string"?a:typeof a=="object"?a.type:void 0;throw new Error(`Unable to evaluate guard ${f?`'${f}' `:""}in transition for event '${r}' in state node '${this.id}':
|
|
3
|
+
${l.message}`)}if(p){s.push(...u.actions),o=u;break}}return o?[o]:void 0}get events(){return ve(this,"events",()=>{const{states:t}=this,n=new Set(this.ownEvents);if(t)for(const r of Object.keys(t)){const s=t[r];if(s.states)for(const o of s.events)n.add(`${o}`)}return Array.from(n)})}get ownEvents(){const t=new Set([...this.transitions.keys()].filter(n=>this.transitions.get(n).some(r=>!(!r.target&&!r.actions.length&&!r.reenter))));return Array.from(t)}}const _i="#";class Rt{constructor(t,n){this.config=t,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=t.id||"(machine)",this.implementations={actors:(n==null?void 0:n.actors)??{},actions:(n==null?void 0:n.actions)??{},delays:(n==null?void 0:n.delays)??{},guards:(n==null?void 0: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 Qe(t,{_key:this.id,_machine:this}),this.root._initialize(),this.states=this.root.states,this.events=this.root.events}provide(t){const{actions:n,guards:r,actors:s,delays:o}=this.implementations;return new Rt(this.config,{actions:{...n,...t.actions},guards:{...r,...t.guards},actors:{...s,...t.actors},delays:{...o,...t.delays}})}resolveState(t){const n=Qo(this.root,t.value),r=Ye(Xe(this.root,n));return Ze({_nodes:[...r],context:t.context||{},children:{},status:Ot(r,this.root)?"done":t.status||"active",output:t.output,error:t.error,historyValue:t.historyValue},this)}transition(t,n,r){return xt(t,n,r,[]).snapshot}microstep(t,n,r){return xt(t,n,r,[]).microstates}getTransitionData(t,n){return Tt(this.root,t.value,t,n)||[]}getPreInitialState(t,n,r){const{context:s}=this.config,o=Ze({context:typeof s!="function"&&s?s:{},_nodes:[this.root],children:{},status:"active"},this);return typeof s=="function"?ye(o,n,t,[hi(({spawn:u,event:a,self:c})=>s({spawn:u,input:a.input,self:c}))],r,void 0):o}getInitialSnapshot(t,n){const r=vn(n),s=[],o=this.getPreInitialState(t,r,s),i=Ct([{target:[...Vn(this.root)],source:this.root,reenter:!0,actions:[],eventType:null,toJSON:null}],o,t,r,!0,s),{snapshot:u}=xt(i,r,t,s);return u}start(t){Object.values(t.children).forEach(n=>{n.getSnapshot().status==="active"&&n.start()})}getStateNodeById(t){const n=mt(t),r=n.slice(1),s=qe(n[0])?n[0].slice(_i.length):n[0],o=this.idMap.get(s);if(!o)throw new Error(`Child state node '#${s}' does not exist on machine '${this.id}'`);return Je(o,r)}get definition(){return this.root.definition}toJSON(){return this.definition}getPersistedSnapshot(t,n){return ui(t,n)}restoreSnapshot(t,n){const r={},s=t.children;Object.keys(s).forEach(l=>{const f=s[l],h=f.snapshot,d=f.src,m=typeof d=="string"?vt(this,d):d;if(!m)return;const g=Pe(m,{id:l,parent:n.self,syncSnapshot:f.syncSnapshot,snapshot:h,src:d,systemId:f.systemId});r[l]=g});function o(l,f){if(f instanceof Qe)return f;try{return l.machine.getStateNodeById(f.id)}catch{}}function i(l,f){if(!f||typeof f!="object")return{};const h={};for(const d in f){const m=f[d];for(const g of m){const E=o(l,g);E&&(h[d]??(h[d]=[]),h[d].push(E))}}return h}const u=i(this.root,t.historyValue),a=Ze({...t,children:r,_nodes:Array.from(Ye(Xe(this.root,t.value))),historyValue:u},this),c=new Set;function p(l,f){if(!c.has(l)){c.add(l);for(const h in l){const d=l[h];if(d&&typeof d=="object"){if("xstate$$type"in d&&d.xstate$$type===bt){l[h]=f[d.id];continue}p(d,f)}}}}return p(a.context,r),a}}function gi(e,t){return new Rt(e,t)}function Pt(e){this.message=e||""}Pt.prototype=Object.create(Error.prototype,{constructor:{value:Pt},name:{value:"NotImplemented"},stack:{get:function(){return new Error().stack}}});const Ce=class Ce{constructor(t,n){P(this,"name","Stonecrop");P(this,"registry");P(this,"store");if(Ce._root)return Ce._root;Ce._root=this,this.registry=t,this.store=n}setup(t){this.getMeta(t.doctype)}async getMeta(t){if(!this.registry.getMeta)throw new Pt(`getMeta function is not implemented for ${t} in the registry`);return await this.registry.getMeta(t)}async getRecords(t,n){this.store.$patch({records:[]});const s=await(await fetch(`/${t.slug}`,n)).json();this.store.$patch({records:s})}async getRecord(t,n){this.store.$patch({record:{}});const s=await(await fetch(`/${t.slug}/${n}`)).json();this.store.$patch({record:s})}runAction(t,n,r){var u;const s=this.registry.registry[t.slug],o=(u=s.actions)==null?void 0:u.get(n),i=s.workflow;if(i){const a=gi(i),c=Pe(a);c.start(),c.send({type:n,id:r}),o&&o.length>0&&o.forEach(p=>{new Function(p)(r)})}}};P(Ce,"_root");let et=Ce;var mi=Object.create,zn=Object.defineProperty,Ei=Object.getOwnPropertyDescriptor,Nt=Object.getOwnPropertyNames,yi=Object.getPrototypeOf,vi=Object.prototype.hasOwnProperty,Si=(e,t)=>function(){return e&&(t=(0,e[Nt(e)[0]])(e=0)),t},bi=(e,t)=>function(){return t||(0,e[Nt(e)[0]])((t={exports:{}}).exports,t),t.exports},Ai=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of Nt(t))!vi.call(e,s)&&s!==n&&zn(e,s,{get:()=>t[s],enumerable:!(r=Ei(t,s))||r.enumerable});return e},wi=(e,t,n)=>(n=e!=null?mi(yi(e)):{},Ai(zn(n,"default",{value:e,enumerable:!0}),e)),Le=Si({"../../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"(){}}),Oi=bi({"../../node_modules/.pnpm/rfdc@1.4.1/node_modules/rfdc/index.js"(e,t){Le(),t.exports=r;function n(o){return o instanceof Buffer?Buffer.from(o):new o.constructor(o.buffer.slice(),o.byteOffset,o.length)}function r(o){if(o=o||{},o.circles)return s(o);const i=new Map;if(i.set(Date,l=>new Date(l)),i.set(Map,(l,f)=>new Map(a(Array.from(l),f))),i.set(Set,(l,f)=>new Set(a(Array.from(l),f))),o.constructorHandlers)for(const l of o.constructorHandlers)i.set(l[0],l[1]);let u=null;return o.proto?p:c;function a(l,f){const h=Object.keys(l),d=new Array(h.length);for(let m=0;m<h.length;m++){const g=h[m],E=l[g];typeof E!="object"||E===null?d[g]=E:E.constructor!==Object&&(u=i.get(E.constructor))?d[g]=u(E,f):ArrayBuffer.isView(E)?d[g]=n(E):d[g]=f(E)}return d}function c(l){if(typeof l!="object"||l===null)return l;if(Array.isArray(l))return a(l,c);if(l.constructor!==Object&&(u=i.get(l.constructor)))return u(l,c);const f={};for(const h in l){if(Object.hasOwnProperty.call(l,h)===!1)continue;const d=l[h];typeof d!="object"||d===null?f[h]=d:d.constructor!==Object&&(u=i.get(d.constructor))?f[h]=u(d,c):ArrayBuffer.isView(d)?f[h]=n(d):f[h]=c(d)}return f}function p(l){if(typeof l!="object"||l===null)return l;if(Array.isArray(l))return a(l,p);if(l.constructor!==Object&&(u=i.get(l.constructor)))return u(l,p);const f={};for(const h in l){const d=l[h];typeof d!="object"||d===null?f[h]=d:d.constructor!==Object&&(u=i.get(d.constructor))?f[h]=u(d,p):ArrayBuffer.isView(d)?f[h]=n(d):f[h]=p(d)}return f}}function s(o){const i=[],u=[],a=new Map;if(a.set(Date,h=>new Date(h)),a.set(Map,(h,d)=>new Map(p(Array.from(h),d))),a.set(Set,(h,d)=>new Set(p(Array.from(h),d))),o.constructorHandlers)for(const h of o.constructorHandlers)a.set(h[0],h[1]);let c=null;return o.proto?f:l;function p(h,d){const m=Object.keys(h),g=new Array(m.length);for(let E=0;E<m.length;E++){const w=m[E],T=h[w];if(typeof T!="object"||T===null)g[w]=T;else if(T.constructor!==Object&&(c=a.get(T.constructor)))g[w]=c(T,d);else if(ArrayBuffer.isView(T))g[w]=n(T);else{const B=i.indexOf(T);B!==-1?g[w]=u[B]:g[w]=d(T)}}return g}function l(h){if(typeof h!="object"||h===null)return h;if(Array.isArray(h))return p(h,l);if(h.constructor!==Object&&(c=a.get(h.constructor)))return c(h,l);const d={};i.push(h),u.push(d);for(const m in h){if(Object.hasOwnProperty.call(h,m)===!1)continue;const g=h[m];if(typeof g!="object"||g===null)d[m]=g;else if(g.constructor!==Object&&(c=a.get(g.constructor)))d[m]=c(g,l);else if(ArrayBuffer.isView(g))d[m]=n(g);else{const E=i.indexOf(g);E!==-1?d[m]=u[E]:d[m]=l(g)}}return i.pop(),u.pop(),d}function f(h){if(typeof h!="object"||h===null)return h;if(Array.isArray(h))return p(h,f);if(h.constructor!==Object&&(c=a.get(h.constructor)))return c(h,f);const d={};i.push(h),u.push(d);for(const m in h){const g=h[m];if(typeof g!="object"||g===null)d[m]=g;else if(g.constructor!==Object&&(c=a.get(g.constructor)))d[m]=c(g,f);else if(ArrayBuffer.isView(g))d[m]=n(g);else{const E=i.indexOf(g);E!==-1?d[m]=u[E]:d[m]=f(g)}}return i.pop(),u.pop(),d}}}});Le(),Le(),Le();var Kn=typeof navigator<"u",y=typeof window<"u"?window:typeof globalThis<"u"?globalThis:typeof global<"u"?global:{};typeof y.chrome<"u"&&y.chrome.devtools,Kn&&(y.self,y.top);var Gn;typeof navigator<"u"&&((Gn=navigator.userAgent)==null||Gn.toLowerCase().includes("electron")),Le();var Ti=wi(Oi()),Ii=/(?:^|[-_/])(\w)/g;function ki(e,t){return t?t.toUpperCase():""}function Ci(e){return e&&`${e}`.replace(Ii,ki)}function Di(e,t){let n=e.replace(/^[a-z]:/i,"").replace(/\\/g,"/");n.endsWith(`index${t}`)&&(n=n.replace(`/index${t}`,t));const r=n.lastIndexOf("/"),s=n.substring(r+1);{const o=s.lastIndexOf(t);return s.substring(0,o)}}var Wn=(0,Ti.default)({circles:!0});const xi={trailing:!0};function Se(e,t=25,n={}){if(n={...xi,...n},!Number.isFinite(t))throw new TypeError("Expected `wait` to be a finite number");let r,s,o=[],i,u;const a=(c,p)=>(i=Ri(e,c,p),i.finally(()=>{if(i=null,n.trailing&&u&&!s){const l=a(c,u);return u=null,l}}),i);return function(...c){return i?(n.trailing&&(u=c),i):new Promise(p=>{const l=!s&&n.leading;clearTimeout(s),s=setTimeout(()=>{s=null;const f=n.leading?r:a(this,c);for(const h of o)h(f);o=[]},t),l?(r=a(this,c),p(r)):o.push(p)})}}async function Ri(e,t,n){return await e.apply(t,n)}function Vt(e,t={},n){for(const r in e){const s=e[r],o=n?`${n}:${r}`:r;typeof s=="object"&&s!==null?Vt(s,t,o):typeof s=="function"&&(t[o]=s)}return t}const Pi={run:e=>e()},Ni=()=>Pi,Yn=typeof console.createTask<"u"?console.createTask:Ni;function Vi(e,t){const n=t.shift(),r=Yn(n);return e.reduce((s,o)=>s.then(()=>r.run(()=>o(...t))),Promise.resolve())}function Li(e,t){const n=t.shift(),r=Yn(n);return Promise.all(e.map(s=>r.run(()=>s(...t))))}function Lt(e,t){for(const n of[...e])n(t)}class Mi{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(t,n,r={}){if(!t||typeof n!="function")return()=>{};const s=t;let o;for(;this._deprecatedHooks[t];)o=this._deprecatedHooks[t],t=o.to;if(o&&!r.allowDeprecated){let i=o.message;i||(i=`${s} hook has been deprecated`+(o.to?`, please use ${o.to}`:"")),this._deprecatedMessages||(this._deprecatedMessages=new Set),this._deprecatedMessages.has(i)||(console.warn(i),this._deprecatedMessages.add(i))}if(!n.name)try{Object.defineProperty(n,"name",{get:()=>"_"+t.replace(/\W+/g,"_")+"_hook_cb",configurable:!0})}catch{}return this._hooks[t]=this._hooks[t]||[],this._hooks[t].push(n),()=>{n&&(this.removeHook(t,n),n=void 0)}}hookOnce(t,n){let r,s=(...o)=>(typeof r=="function"&&r(),r=void 0,s=void 0,n(...o));return r=this.hook(t,s),r}removeHook(t,n){if(this._hooks[t]){const r=this._hooks[t].indexOf(n);r!==-1&&this._hooks[t].splice(r,1),this._hooks[t].length===0&&delete this._hooks[t]}}deprecateHook(t,n){this._deprecatedHooks[t]=typeof n=="string"?{to:n}:n;const r=this._hooks[t]||[];delete this._hooks[t];for(const s of r)this.hook(t,s)}deprecateHooks(t){Object.assign(this._deprecatedHooks,t);for(const n in t)this.deprecateHook(n,t[n])}addHooks(t){const n=Vt(t),r=Object.keys(n).map(s=>this.hook(s,n[s]));return()=>{for(const s of r.splice(0,r.length))s()}}removeHooks(t){const n=Vt(t);for(const r in n)this.removeHook(r,n[r])}removeAllHooks(){for(const t in this._hooks)delete this._hooks[t]}callHook(t,...n){return n.unshift(t),this.callHookWith(Vi,t,...n)}callHookParallel(t,...n){return n.unshift(t),this.callHookWith(Li,t,...n)}callHookWith(t,n,...r){const s=this._before||this._after?{name:n,args:r,context:{}}:void 0;this._before&&Lt(this._before,s);const o=t(n in this._hooks?[...this._hooks[n]]:[],r);return o instanceof Promise?o.finally(()=>{this._after&&s&&Lt(this._after,s)}):(this._after&&s&&Lt(this._after,s),o)}beforeEach(t){return this._before=this._before||[],this._before.push(t),()=>{if(this._before!==void 0){const n=this._before.indexOf(t);n!==-1&&this._before.splice(n,1)}}}afterEach(t){return this._after=this._after||[],this._after.push(t),()=>{if(this._after!==void 0){const n=this._after.indexOf(t);n!==-1&&this._after.splice(n,1)}}}}function qn(){return new Mi}var Bi=Object.create,Jn=Object.defineProperty,$i=Object.getOwnPropertyDescriptor,Mt=Object.getOwnPropertyNames,Ui=Object.getPrototypeOf,Fi=Object.prototype.hasOwnProperty,ji=(e,t)=>function(){return e&&(t=(0,e[Mt(e)[0]])(e=0)),t},Xn=(e,t)=>function(){return t||(0,e[Mt(e)[0]])((t={exports:{}}).exports,t),t.exports},Hi=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of Mt(t))!Fi.call(e,s)&&s!==n&&Jn(e,s,{get:()=>t[s],enumerable:!(r=$i(t,s))||r.enumerable});return e},zi=(e,t,n)=>(n=e!=null?Bi(Ui(e)):{},Hi(Jn(n,"default",{value:e,enumerable:!0}),e)),_=ji({"../../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"(){}}),Ki=Xn({"../../node_modules/.pnpm/speakingurl@14.0.1/node_modules/speakingurl/lib/speakingurl.js"(e,t){_(),function(n){var r={À:"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=["်","ް"],o={"ာ":"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"},i={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"}},u={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"}},a=[";","?",":","@","&","=","+","$",",","/"].join(""),c=[";","?",":","@","&","=","+","$",","].join(""),p=[".","!","~","*","'","(",")"].join(""),l=function(g,E){var w="-",T="",B="",se=!0,j={},A,Ge,$,b,v,I,R,H,xe,K,O,q,C,Re,oe="";if(typeof g!="string")return"";if(typeof E=="string"&&(w=E),R=u.en,H=i.en,typeof E=="object"){A=E.maintainCase||!1,j=E.custom&&typeof E.custom=="object"?E.custom:j,$=+E.truncate>1&&E.truncate||!1,b=E.uric||!1,v=E.uricNoSlash||!1,I=E.mark||!1,se=!(E.symbols===!1||E.lang===!1),w=E.separator||w,b&&(oe+=a),v&&(oe+=c),I&&(oe+=p),R=E.lang&&u[E.lang]&&se?u[E.lang]:se?u.en:{},H=E.lang&&i[E.lang]?i[E.lang]:E.lang===!1||E.lang===!0?{}:i.en,E.titleCase&&typeof E.titleCase.length=="number"&&Array.prototype.toString.call(E.titleCase)?(E.titleCase.forEach(function(G){j[G+""]=G+""}),Ge=!0):Ge=!!E.titleCase,E.custom&&typeof E.custom.length=="number"&&Array.prototype.toString.call(E.custom)&&E.custom.forEach(function(G){j[G+""]=G+""}),Object.keys(j).forEach(function(G){var We;G.length>1?We=new RegExp("\\b"+h(G)+"\\b","gi"):We=new RegExp(h(G),"gi"),g=g.replace(We,j[G])});for(O in j)oe+=O}for(oe+=w,oe=h(oe),g=g.replace(/(^\s+|\s+$)/g,""),C=!1,Re=!1,K=0,q=g.length;K<q;K++)O=g[K],d(O,j)?C=!1:H[O]?(O=C&&H[O].match(/[A-Za-z0-9]/)?" "+H[O]:H[O],C=!1):O in r?(K+1<q&&s.indexOf(g[K+1])>=0?(B+=O,O=""):Re===!0?(O=o[B]+r[O],B=""):O=C&&r[O].match(/[A-Za-z0-9]/)?" "+r[O]:r[O],C=!1,Re=!1):O in o?(B+=O,O="",K===q-1&&(O=o[B]),Re=!0):R[O]&&!(b&&a.indexOf(O)!==-1)&&!(v&&c.indexOf(O)!==-1)?(O=C||T.substr(-1).match(/[A-Za-z0-9]/)?w+R[O]:R[O],O+=g[K+1]!==void 0&&g[K+1].match(/[A-Za-z0-9]/)?w:"",C=!0):(Re===!0?(O=o[B]+O,B="",Re=!1):C&&(/[A-Za-z0-9]/.test(O)||T.substr(-1).match(/A-Za-z0-9]/))&&(O=" "+O),C=!1),T+=O.replace(new RegExp("[^\\w\\s"+oe+"_-]","g"),w);return Ge&&(T=T.replace(/(\w)(\S*)/g,function(G,We,lo){var _n=We.toUpperCase()+(lo!==null?lo:"");return Object.keys(j).indexOf(_n.toLowerCase())<0?_n:_n.toLowerCase()})),T=T.replace(/\s+/g,w).replace(new RegExp("\\"+w+"+","g"),w).replace(new RegExp("(^\\"+w+"+|\\"+w+"+$)","g"),""),$&&T.length>$&&(xe=T.charAt($)===w,T=T.slice(0,$),xe||(T=T.slice(0,T.lastIndexOf(w)))),!A&&!Ge&&(T=T.toLowerCase()),T},f=function(g){return function(w){return l(w,g)}},h=function(g){return g.replace(/[-\\^$*+?.()|[\]{}\/]/g,"\\$&")},d=function(m,g){for(var E in g)if(g[E]===m)return!0};if(typeof t<"u"&&t.exports)t.exports=l,t.exports.createSlug=f;else if(typeof define<"u"&&define.amd)define([],function(){return l});else try{if(n.getSlug||n.createSlug)throw"speakingurl: globals exists /(getSlug|createSlug)/";n.getSlug=l,n.createSlug=f}catch{}}(e)}}),Gi=Xn({"../../node_modules/.pnpm/speakingurl@14.0.1/node_modules/speakingurl/index.js"(e,t){_(),t.exports=Ki()}});_(),_(),_(),_(),_(),_(),_(),_();function Wi(e){var t;const n=e.name||e._componentTag||e.__VUE_DEVTOOLS_COMPONENT_GUSSED_NAME__||e.__name;return n==="index"&&((t=e.__file)!=null&&t.endsWith("index.vue"))?"":n}function Yi(e){const t=e.__file;if(t)return Ci(Di(t,".vue"))}function Zn(e,t){return e.type.__VUE_DEVTOOLS_COMPONENT_GUSSED_NAME__=t,t}function Bt(e){if(e.__VUE_DEVTOOLS_NEXT_APP_RECORD__)return e.__VUE_DEVTOOLS_NEXT_APP_RECORD__;if(e.root)return e.appContext.app.__VUE_DEVTOOLS_NEXT_APP_RECORD__}function Qn(e){var t,n;const r=(t=e.subTree)==null?void 0:t.type,s=Bt(e);return s?((n=s==null?void 0:s.types)==null?void 0:n.Fragment)===r:!1}function tt(e){var t,n,r;const s=Wi((e==null?void 0:e.type)||{});if(s)return s;if((e==null?void 0:e.root)===e)return"Root";for(const i in(n=(t=e.parent)==null?void 0:t.type)==null?void 0:n.components)if(e.parent.type.components[i]===(e==null?void 0:e.type))return Zn(e,i);for(const i in(r=e.appContext)==null?void 0:r.components)if(e.appContext.components[i]===(e==null?void 0:e.type))return Zn(e,i);const o=Yi((e==null?void 0:e.type)||{});return o||"Anonymous Component"}function qi(e){var t,n,r;const s=(r=(n=(t=e==null?void 0:e.appContext)==null?void 0:t.app)==null?void 0:n.__VUE_DEVTOOLS_NEXT_APP_RECORD_ID__)!=null?r:0,o=e===(e==null?void 0:e.root)?"root":e.uid;return`${s}:${o}`}function $t(e,t){return t=t||`${e.id}:root`,e.instanceMap.get(t)||e.instanceMap.get(":root")}function Ji(){const e={top:0,bottom:0,left:0,right:0,get width(){return e.right-e.left},get height(){return e.bottom-e.top}};return e}var nt;function Xi(e){return nt||(nt=document.createRange()),nt.selectNode(e),nt.getBoundingClientRect()}function Zi(e){const t=Ji();if(!e.children)return t;for(let n=0,r=e.children.length;n<r;n++){const s=e.children[n];let o;if(s.component)o=ce(s.component);else if(s.el){const i=s.el;i.nodeType===1||i.getBoundingClientRect?o=i.getBoundingClientRect():i.nodeType===3&&i.data.trim()&&(o=Xi(i))}o&&Qi(t,o)}return t}function Qi(e,t){return(!e.top||t.top<e.top)&&(e.top=t.top),(!e.bottom||t.bottom>e.bottom)&&(e.bottom=t.bottom),(!e.left||t.left<e.left)&&(e.left=t.left),(!e.right||t.right>e.right)&&(e.right=t.right),e}var er={top:0,left:0,right:0,bottom:0,width:0,height:0};function ce(e){const t=e.subTree.el;return typeof window>"u"?er:Qn(e)?Zi(e.subTree):(t==null?void 0:t.nodeType)===1?t==null?void 0:t.getBoundingClientRect():e.subTree.component?ce(e.subTree.component):er}_();function Ut(e){return Qn(e)?eu(e.subTree):e.subTree?[e.subTree.el]:[]}function eu(e){if(!e.children)return[];const t=[];return e.children.forEach(n=>{n.component?t.push(...Ut(n.component)):n!=null&&n.el&&t.push(n.el)}),t}var tr="__vue-devtools-component-inspector__",nr="__vue-devtools-component-inspector__card__",rr="__vue-devtools-component-inspector__name__",sr="__vue-devtools-component-inspector__indicator__",or={display:"block",zIndex:2147483640,position:"fixed",backgroundColor:"#42b88325",border:"1px solid #42b88350",borderRadius:"5px",transition:"all 0.1s ease-in",pointerEvents:"none"},tu={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)"},nu={display:"inline-block",fontWeight:400,fontStyle:"normal",fontSize:"12px",opacity:.7};function be(){return document.getElementById(tr)}function ru(){return document.getElementById(nr)}function su(){return document.getElementById(sr)}function ou(){return document.getElementById(rr)}function Ft(e){return{left:`${Math.round(e.left*100)/100}px`,top:`${Math.round(e.top*100)/100}px`,width:`${Math.round(e.width*100)/100}px`,height:`${Math.round(e.height*100)/100}px`}}function jt(e){var t;const n=document.createElement("div");n.id=(t=e.elementId)!=null?t:tr,Object.assign(n.style,{...or,...Ft(e.bounds),...e.style});const r=document.createElement("span");r.id=nr,Object.assign(r.style,{...tu,top:e.bounds.top<35?0:"-35px"});const s=document.createElement("span");s.id=rr,s.innerHTML=`<${e.name}> `;const o=document.createElement("i");return o.id=sr,o.innerHTML=`${Math.round(e.bounds.width*100)/100} x ${Math.round(e.bounds.height*100)/100}`,Object.assign(o.style,nu),r.appendChild(s),r.appendChild(o),n.appendChild(r),document.body.appendChild(n),n}function Ht(e){const t=be(),n=ru(),r=ou(),s=su();t&&(Object.assign(t.style,{...or,...Ft(e.bounds)}),Object.assign(n.style,{top:e.bounds.top<35?0:"-35px"}),r.innerHTML=`<${e.name}> `,s.innerHTML=`${Math.round(e.bounds.width*100)/100} x ${Math.round(e.bounds.height*100)/100}`)}function iu(e){const t=ce(e);if(!t.width&&!t.height)return;const n=tt(e);be()?Ht({bounds:t,name:n}):jt({bounds:t,name:n})}function ir(){const e=be();e&&(e.style.display="none")}var zt=null;function Kt(e){const t=e.target;if(t){const n=t.__vueParentComponent;if(n&&(zt=n,n.vnode.el)){const s=ce(n),o=tt(n);be()?Ht({bounds:s,name:o}):jt({bounds:s,name:o})}}}function uu(e,t){if(e.preventDefault(),e.stopPropagation(),zt){const n=qi(zt);t(n)}}var rt=null;function au(){ir(),window.removeEventListener("mouseover",Kt),window.removeEventListener("click",rt,!0),rt=null}function cu(){return window.addEventListener("mouseover",Kt),new Promise(e=>{function t(n){n.preventDefault(),n.stopPropagation(),uu(n,r=>{window.removeEventListener("click",t,!0),rt=null,window.removeEventListener("mouseover",Kt);const s=be();s&&(s.style.display="none"),e(JSON.stringify({id:r}))})}rt=t,window.addEventListener("click",t,!0)})}function lu(e){const t=$t(L.value,e.id);if(t){const[n]=Ut(t);if(typeof n.scrollIntoView=="function")n.scrollIntoView({behavior:"smooth"});else{const r=ce(t),s=document.createElement("div"),o={...Ft(r),position:"absolute"};Object.assign(s.style,o),document.body.appendChild(s),s.scrollIntoView({behavior:"smooth"}),setTimeout(()=>{document.body.removeChild(s)},2e3)}setTimeout(()=>{const r=ce(t);if(r.width||r.height){const s=tt(t),o=be();o?Ht({...e,name:s,bounds:r}):jt({...e,name:s,bounds:r}),setTimeout(()=>{o&&(o.style.display="none")},1500)}},1200)}}_();var ur,ar;(ar=(ur=y).__VUE_DEVTOOLS_COMPONENT_INSPECTOR_ENABLED__)!=null||(ur.__VUE_DEVTOOLS_COMPONENT_INSPECTOR_ENABLED__=!0);function fu(e){let t=0;const n=setInterval(()=>{y.__VUE_INSPECTOR__&&(clearInterval(n),t+=30,e()),t>=5e3&&clearInterval(n)},30)}function du(){const e=y.__VUE_INSPECTOR__,t=e.openInEditor;e.openInEditor=async(...n)=>{e.disable(),t(...n)}}function hu(){return new Promise(e=>{function t(){du(),e(y.__VUE_INSPECTOR__)}y.__VUE_INSPECTOR__?t():fu(()=>{t()})})}_(),_();function pu(e){return!!(e&&e.__v_isReadonly)}function cr(e){return pu(e)?cr(e.__v_raw):!!(e&&e.__v_isReactive)}function Gt(e){return!!(e&&e.__v_isRef===!0)}function Me(e){const t=e&&e.__v_raw;return t?Me(t):e}var _u=class{constructor(){this.refEditor=new gu}set(e,t,n,r){const s=Array.isArray(t)?t:t.split(".");for(;s.length>1;){const u=s.shift();e instanceof Map?e=e.get(u):e instanceof Set?e=Array.from(e.values())[u]:e=e[u],this.refEditor.isRef(e)&&(e=this.refEditor.get(e))}const o=s[0],i=this.refEditor.get(e)[o];r?r(e,o,n):this.refEditor.isRef(i)?this.refEditor.set(i,n):e[o]=n}get(e,t){const n=Array.isArray(t)?t:t.split(".");for(let r=0;r<n.length;r++)if(e instanceof Map?e=e.get(n[r]):e=e[n[r]],this.refEditor.isRef(e)&&(e=this.refEditor.get(e)),!e)return;return e}has(e,t,n=!1){if(typeof e>"u")return!1;const r=Array.isArray(t)?t.slice():t.split("."),s=n?2:1;for(;e&&r.length>s;){const o=r.shift();e=e[o],this.refEditor.isRef(e)&&(e=this.refEditor.get(e))}return e!=null&&Object.prototype.hasOwnProperty.call(e,r[0])}createDefaultSetCallback(e){return(t,n,r)=>{if((e.remove||e.newKey)&&(Array.isArray(t)?t.splice(n,1):Me(t)instanceof Map?t.delete(n):Me(t)instanceof Set?t.delete(Array.from(t.values())[n]):Reflect.deleteProperty(t,n)),!e.remove){const s=t[e.newKey||n];this.refEditor.isRef(s)?this.refEditor.set(s,r):Me(t)instanceof Map?t.set(e.newKey||n,r):Me(t)instanceof Set?t.add(r):t[e.newKey||n]=r}}}},gu=class{set(e,t){if(Gt(e))e.value=t;else{if(e instanceof Set&&Array.isArray(t)){e.clear(),t.forEach(s=>e.add(s));return}const n=Object.keys(t);if(e instanceof Map){const s=new Set(e.keys());n.forEach(o=>{e.set(o,Reflect.get(t,o)),s.delete(o)}),s.forEach(o=>e.delete(o));return}const r=new Set(Object.keys(e));n.forEach(s=>{Reflect.set(e,s,Reflect.get(t,s)),r.delete(s)}),r.forEach(s=>Reflect.deleteProperty(e,s))}}get(e){return Gt(e)?e.value:e}isRef(e){return Gt(e)||cr(e)}};_(),_(),_();var mu="__VUE_DEVTOOLS_KIT_TIMELINE_LAYERS_STATE__";function Eu(){if(!Kn||typeof localStorage>"u"||localStorage===null)return{recordingState:!1,mouseEventEnabled:!1,keyboardEventEnabled:!1,componentEventEnabled:!1,performanceEventEnabled:!1,selected:""};const e=localStorage.getItem(mu);return e?JSON.parse(e):{recordingState:!1,mouseEventEnabled:!1,keyboardEventEnabled:!1,componentEventEnabled:!1,performanceEventEnabled:!1,selected:""}}_(),_(),_();var lr,fr;(fr=(lr=y).__VUE_DEVTOOLS_KIT_TIMELINE_LAYERS)!=null||(lr.__VUE_DEVTOOLS_KIT_TIMELINE_LAYERS=[]);var yu=new Proxy(y.__VUE_DEVTOOLS_KIT_TIMELINE_LAYERS,{get(e,t,n){return Reflect.get(e,t,n)}});function vu(e,t){D.timelineLayersState[t.id]=!1,yu.push({...e,descriptorId:t.id,appRecord:Bt(t.app)})}var dr,hr;(hr=(dr=y).__VUE_DEVTOOLS_KIT_INSPECTOR__)!=null||(dr.__VUE_DEVTOOLS_KIT_INSPECTOR__=[]);var Wt=new Proxy(y.__VUE_DEVTOOLS_KIT_INSPECTOR__,{get(e,t,n){return Reflect.get(e,t,n)}}),pr=Se(()=>{we.hooks.callHook("sendInspectorToClient",_r())});function Su(e,t){var n,r;Wt.push({options:e,descriptor:t,treeFilterPlaceholder:(n=e.treeFilterPlaceholder)!=null?n:"Search tree...",stateFilterPlaceholder:(r=e.stateFilterPlaceholder)!=null?r:"Search state...",treeFilter:"",selectedNodeId:"",appRecord:Bt(t.app)}),pr()}function _r(){return Wt.filter(e=>e.descriptor.app===L.value.app).filter(e=>e.descriptor.id!=="components").map(e=>{var t;const n=e.descriptor,r=e.options;return{id:r.id,label:r.label,logo:n.logo,icon:`custom-ic-baseline-${(t=r==null?void 0:r.icon)==null?void 0:t.replace(/_/g,"-")}`,packageName:n.packageName,homepage:n.homepage,pluginId:n.id}})}function st(e,t){return Wt.find(n=>n.options.id===e&&(t?n.descriptor.app===t:!0))}function bu(){const e=qn();e.hook("addInspector",({inspector:r,plugin:s})=>{Su(r,s.descriptor)});const t=Se(async({inspectorId:r,plugin:s})=>{var o;if(!r||!((o=s==null?void 0:s.descriptor)!=null&&o.app)||D.highPerfModeEnabled)return;const i=st(r,s.descriptor.app),u={app:s.descriptor.app,inspectorId:r,filter:(i==null?void 0:i.treeFilter)||"",rootNodes:[]};await new Promise(a=>{e.callHookWith(async c=>{await Promise.all(c.map(p=>p(u))),a()},"getInspectorTree")}),e.callHookWith(async a=>{await Promise.all(a.map(c=>c({inspectorId:r,rootNodes:u.rootNodes})))},"sendInspectorTreeToClient")},120);e.hook("sendInspectorTree",t);const n=Se(async({inspectorId:r,plugin:s})=>{var o;if(!r||!((o=s==null?void 0:s.descriptor)!=null&&o.app)||D.highPerfModeEnabled)return;const i=st(r,s.descriptor.app),u={app:s.descriptor.app,inspectorId:r,nodeId:(i==null?void 0:i.selectedNodeId)||"",state:null},a={currentTab:`custom-inspector:${r}`};u.nodeId&&await new Promise(c=>{e.callHookWith(async p=>{await Promise.all(p.map(l=>l(u,a))),c()},"getInspectorState")}),e.callHookWith(async c=>{await Promise.all(c.map(p=>p({inspectorId:r,nodeId:u.nodeId,state:u.state})))},"sendInspectorStateToClient")},120);return e.hook("sendInspectorState",n),e.hook("customInspectorSelectNode",({inspectorId:r,nodeId:s,plugin:o})=>{const i=st(r,o.descriptor.app);i&&(i.selectedNodeId=s)}),e.hook("timelineLayerAdded",({options:r,plugin:s})=>{vu(r,s.descriptor)}),e.hook("timelineEventAdded",({options:r,plugin:s})=>{var o;const i=["performance","component-event","keyboard","mouse"];D.highPerfModeEnabled||!((o=D.timelineLayersState)!=null&&o[s.descriptor.id])&&!i.includes(r.layerId)||e.callHookWith(async u=>{await Promise.all(u.map(a=>a(r)))},"sendTimelineEventToClient")}),e.hook("getComponentInstances",async({app:r})=>{const s=r.__VUE_DEVTOOLS_NEXT_APP_RECORD__;if(!s)return null;const o=s.id.toString();return[...s.instanceMap].filter(([u])=>u.split(":")[0]===o).map(([,u])=>u)}),e.hook("getComponentBounds",async({instance:r})=>ce(r)),e.hook("getComponentName",({instance:r})=>tt(r)),e.hook("componentHighlight",({uid:r})=>{const s=L.value.instanceMap.get(r);s&&iu(s)}),e.hook("componentUnhighlight",()=>{ir()}),e}var gr,mr;(mr=(gr=y).__VUE_DEVTOOLS_KIT_APP_RECORDS__)!=null||(gr.__VUE_DEVTOOLS_KIT_APP_RECORDS__=[]);var Er,yr;(yr=(Er=y).__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD__)!=null||(Er.__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD__={});var vr,Sr;(Sr=(vr=y).__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD_ID__)!=null||(vr.__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD_ID__="");var br,Ar;(Ar=(br=y).__VUE_DEVTOOLS_KIT_CUSTOM_TABS__)!=null||(br.__VUE_DEVTOOLS_KIT_CUSTOM_TABS__=[]);var wr,Or;(Or=(wr=y).__VUE_DEVTOOLS_KIT_CUSTOM_COMMANDS__)!=null||(wr.__VUE_DEVTOOLS_KIT_CUSTOM_COMMANDS__=[]);var le="__VUE_DEVTOOLS_KIT_GLOBAL_STATE__";function Au(){return{connected:!1,clientConnected:!1,vitePluginDetected:!0,appRecords:[],activeAppRecordId:"",tabs:[],commands:[],highPerfModeEnabled:!0,devtoolsClientDetected:{},perfUniqueGroupId:0,timelineLayersState:Eu()}}var Tr,Ir;(Ir=(Tr=y)[le])!=null||(Tr[le]=Au());var wu=Se(e=>{we.hooks.callHook("devtoolsStateUpdated",{state:e})});Se((e,t)=>{we.hooks.callHook("devtoolsConnectedUpdated",{state:e,oldState:t})});var ot=new Proxy(y.__VUE_DEVTOOLS_KIT_APP_RECORDS__,{get(e,t,n){return t==="value"?y.__VUE_DEVTOOLS_KIT_APP_RECORDS__:y.__VUE_DEVTOOLS_KIT_APP_RECORDS__[t]}}),L=new Proxy(y.__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD__,{get(e,t,n){return t==="value"?y.__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD__:t==="id"?y.__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD_ID__:y.__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD__[t]}});function kr(){wu({...y[le],appRecords:ot.value,activeAppRecordId:L.id,tabs:y.__VUE_DEVTOOLS_KIT_CUSTOM_TABS__,commands:y.__VUE_DEVTOOLS_KIT_CUSTOM_COMMANDS__})}function Ou(e){y.__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD__=e,kr()}function Tu(e){y.__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD_ID__=e,kr()}var D=new Proxy(y[le],{get(e,t){return t==="appRecords"?ot:t==="activeAppRecordId"?L.id:t==="tabs"?y.__VUE_DEVTOOLS_KIT_CUSTOM_TABS__:t==="commands"?y.__VUE_DEVTOOLS_KIT_CUSTOM_COMMANDS__:y[le][t]},deleteProperty(e,t){return delete e[t],!0},set(e,t,n){return{...y[le]},e[t]=n,y[le][t]=n,!0}});function Iu(e={}){var t,n,r;const{file:s,host:o,baseUrl:i=window.location.origin,line:u=0,column:a=0}=e;if(s){if(o==="chrome-extension"){const c=s.replace(/\\/g,"\\\\"),p=(n=(t=window.VUE_DEVTOOLS_CONFIG)==null?void 0:t.openInEditorHost)!=null?n:"/";fetch(`${p}__open-in-editor?file=${encodeURI(s)}`).then(l=>{if(!l.ok){const f=`Opening component ${c} failed`;console.log(`%c${f}`,"color:red")}})}else if(D.vitePluginDetected){const c=(r=y.__VUE_DEVTOOLS_OPEN_IN_EDITOR_BASE_URL__)!=null?r:i;y.__VUE_INSPECTOR__.openInEditor(c,s,u,a)}}}_(),_(),_(),_(),_();var Cr,Dr;(Dr=(Cr=y).__VUE_DEVTOOLS_KIT_PLUGIN_BUFFER__)!=null||(Cr.__VUE_DEVTOOLS_KIT_PLUGIN_BUFFER__=[]);var Yt=new Proxy(y.__VUE_DEVTOOLS_KIT_PLUGIN_BUFFER__,{get(e,t,n){return Reflect.get(e,t,n)}});function qt(e){const t={};return Object.keys(e).forEach(n=>{t[n]=e[n].defaultValue}),t}function Jt(e){return`__VUE_DEVTOOLS_NEXT_PLUGIN_SETTINGS__${e}__`}function ku(e){var t,n,r;const s=(n=(t=Yt.find(o=>{var i;return o[0].id===e&&!!((i=o[0])!=null&&i.settings)}))==null?void 0:t[0])!=null?n:null;return(r=s==null?void 0:s.settings)!=null?r:null}function xr(e,t){var n,r,s;const o=Jt(e);if(o){const i=localStorage.getItem(o);if(i)return JSON.parse(i)}if(e){const i=(r=(n=Yt.find(u=>u[0].id===e))==null?void 0:n[0])!=null?r:null;return qt((s=i==null?void 0:i.settings)!=null?s:{})}return qt(t)}function Cu(e,t){const n=Jt(e);localStorage.getItem(n)||localStorage.setItem(n,JSON.stringify(qt(t)))}function Du(e,t,n){const r=Jt(e),s=localStorage.getItem(r),o=JSON.parse(s||"{}"),i={...o,[t]:n};localStorage.setItem(r,JSON.stringify(i)),we.hooks.callHookWith(u=>{u.forEach(a=>a({pluginId:e,key:t,oldValue:o[t],newValue:n,settings:i}))},"setPluginSettings")}_(),_(),_(),_(),_(),_(),_(),_(),_(),_(),_();var Rr,Pr,U=(Pr=(Rr=y).__VUE_DEVTOOLS_HOOK)!=null?Pr:Rr.__VUE_DEVTOOLS_HOOK=qn(),xu={vueAppInit(e){U.hook("app:init",e)},vueAppUnmount(e){U.hook("app:unmount",e)},vueAppConnected(e){U.hook("app:connected",e)},componentAdded(e){return U.hook("component:added",e)},componentEmit(e){return U.hook("component:emit",e)},componentUpdated(e){return U.hook("component:updated",e)},componentRemoved(e){return U.hook("component:removed",e)},setupDevtoolsPlugin(e){U.hook("devtools-plugin:setup",e)},perfStart(e){return U.hook("perf:start",e)},perfEnd(e){return U.hook("perf:end",e)}},Nr={on:xu,setupDevToolsPlugin(e,t){return U.callHook("devtools-plugin:setup",e,t)}},Ru=class{constructor({plugin:e,ctx:t}){this.hooks=t.hooks,this.plugin=e}get on(){return{visitComponentTree:e=>{this.hooks.hook("visitComponentTree",e)},inspectComponent:e=>{this.hooks.hook("inspectComponent",e)},editComponentState:e=>{this.hooks.hook("editComponentState",e)},getInspectorTree:e=>{this.hooks.hook("getInspectorTree",e)},getInspectorState:e=>{this.hooks.hook("getInspectorState",e)},editInspectorState:e=>{this.hooks.hook("editInspectorState",e)},inspectTimelineEvent:e=>{this.hooks.hook("inspectTimelineEvent",e)},timelineCleared:e=>{this.hooks.hook("timelineCleared",e)},setPluginSettings:e=>{this.hooks.hook("setPluginSettings",e)}}}notifyComponentUpdate(e){var t;if(D.highPerfModeEnabled)return;const n=_r().find(r=>r.packageName===this.plugin.descriptor.packageName);if(n!=null&&n.id){if(e){const r=[e.appContext.app,e.uid,(t=e.parent)==null?void 0:t.uid,e];U.callHook("component:updated",...r)}else U.callHook("component:updated");this.hooks.callHook("sendInspectorState",{inspectorId:n.id,plugin:this.plugin})}}addInspector(e){this.hooks.callHook("addInspector",{inspector:e,plugin:this.plugin}),this.plugin.descriptor.settings&&Cu(e.id,this.plugin.descriptor.settings)}sendInspectorTree(e){D.highPerfModeEnabled||this.hooks.callHook("sendInspectorTree",{inspectorId:e,plugin:this.plugin})}sendInspectorState(e){D.highPerfModeEnabled||this.hooks.callHook("sendInspectorState",{inspectorId:e,plugin:this.plugin})}selectInspectorNode(e,t){this.hooks.callHook("customInspectorSelectNode",{inspectorId:e,nodeId:t,plugin:this.plugin})}visitComponentTree(e){return this.hooks.callHook("visitComponentTree",e)}now(){return D.highPerfModeEnabled?0:Date.now()}addTimelineLayer(e){this.hooks.callHook("timelineLayerAdded",{options:e,plugin:this.plugin})}addTimelineEvent(e){D.highPerfModeEnabled||this.hooks.callHook("timelineEventAdded",{options:e,plugin:this.plugin})}getSettings(e){return xr(e??this.plugin.descriptor.id,this.plugin.descriptor.settings)}getComponentInstances(e){return this.hooks.callHook("getComponentInstances",{app:e})}getComponentBounds(e){return this.hooks.callHook("getComponentBounds",{instance:e})}getComponentName(e){return this.hooks.callHook("getComponentName",{instance:e})}highlightElement(e){const t=e.__VUE_DEVTOOLS_NEXT_UID__;return this.hooks.callHook("componentHighlight",{uid:t})}unhighlightElement(){return this.hooks.callHook("componentUnhighlight")}},Pu=Ru;_(),_(),_(),_();var Nu="__vue_devtool_undefined__",Vu="__vue_devtool_infinity__",Lu="__vue_devtool_negative_infinity__",Mu="__vue_devtool_nan__";_(),_();var Bu={[Nu]:"undefined",[Mu]:"NaN",[Vu]:"Infinity",[Lu]:"-Infinity"};Object.entries(Bu).reduce((e,[t,n])=>(e[n]=t,e),{}),_(),_(),_(),_(),_();var Vr,Lr;(Lr=(Vr=y).__VUE_DEVTOOLS_KIT__REGISTERED_PLUGIN_APPS__)!=null||(Vr.__VUE_DEVTOOLS_KIT__REGISTERED_PLUGIN_APPS__=new Set);function Mr(e,t){return Nr.setupDevToolsPlugin(e,t)}function $u(e,t){const[n,r]=e;if(n.app!==t)return;const s=new Pu({plugin:{setupFn:r,descriptor:n},ctx:we});n.packageName==="vuex"&&s.on.editInspectorState(o=>{s.sendInspectorState(o.inspectorId)}),r(s)}function Br(e,t){y.__VUE_DEVTOOLS_KIT__REGISTERED_PLUGIN_APPS__.has(e)||D.highPerfModeEnabled&&!(t!=null&&t.inspectingComponent)||(y.__VUE_DEVTOOLS_KIT__REGISTERED_PLUGIN_APPS__.add(e),Yt.forEach(n=>{$u(n,e)}))}_(),_();var Be="__VUE_DEVTOOLS_ROUTER__",Ae="__VUE_DEVTOOLS_ROUTER_INFO__",$r,Ur;(Ur=($r=y)[Ae])!=null||($r[Ae]={currentRoute:null,routes:[]});var Fr,jr;(jr=(Fr=y)[Be])!=null||(Fr[Be]={}),new Proxy(y[Ae],{get(e,t){return y[Ae][t]}}),new Proxy(y[Be],{get(e,t){if(t==="value")return y[Be]}});function Uu(e){const t=new Map;return((e==null?void 0:e.getRoutes())||[]).filter(n=>!t.has(n.path)&&t.set(n.path,1))}function Xt(e){return e.map(t=>{let{path:n,name:r,children:s,meta:o}=t;return s!=null&&s.length&&(s=Xt(s)),{path:n,name:r,children:s,meta:o}})}function Fu(e){if(e){const{fullPath:t,hash:n,href:r,path:s,name:o,matched:i,params:u,query:a}=e;return{fullPath:t,hash:n,href:r,path:s,name:o,params:u,query:a,matched:Xt(i)}}return e}function ju(e,t){function n(){var r;const s=(r=e.app)==null?void 0:r.config.globalProperties.$router,o=Fu(s==null?void 0:s.currentRoute.value),i=Xt(Uu(s)),u=console.warn;console.warn=()=>{},y[Ae]={currentRoute:o?Wn(o):{},routes:Wn(i)},y[Be]=s,console.warn=u}n(),Nr.on.componentUpdated(Se(()=>{var r;((r=t.value)==null?void 0:r.app)===e.app&&(n(),!D.highPerfModeEnabled&&we.hooks.callHook("routerInfoUpdated",{state:y[Ae]}))},200))}function Hu(e){return{async getInspectorTree(t){const n={...t,app:L.value.app,rootNodes:[]};return await new Promise(r=>{e.callHookWith(async s=>{await Promise.all(s.map(o=>o(n))),r()},"getInspectorTree")}),n.rootNodes},async getInspectorState(t){const n={...t,app:L.value.app,state:null},r={currentTab:`custom-inspector:${t.inspectorId}`};return await new Promise(s=>{e.callHookWith(async o=>{await Promise.all(o.map(i=>i(n,r))),s()},"getInspectorState")}),n.state},editInspectorState(t){const n=new _u,r={...t,app:L.value.app,set:(s,o=t.path,i=t.state.value,u)=>{n.set(s,o,i,u||n.createDefaultSetCallback(t.state))}};e.callHookWith(s=>{s.forEach(o=>o(r))},"editInspectorState")},sendInspectorState(t){const n=st(t);e.callHook("sendInspectorState",{inspectorId:t,plugin:{descriptor:n.descriptor,setupFn:()=>({})}})},inspectComponentInspector(){return cu()},cancelInspectComponentInspector(){return au()},getComponentRenderCode(t){const n=$t(L.value,t);if(n)return typeof(n==null?void 0:n.type)!="function"?n.render.toString():n.type.toString()},scrollToComponent(t){return lu({id:t})},openInEditor:Iu,getVueInspector:hu,toggleApp(t,n){const r=ot.value.find(s=>s.id===t);r&&(Tu(t),Ou(r),ju(r,L),pr(),Br(r.app,n))},inspectDOM(t){const n=$t(L.value,t);if(n){const[r]=Ut(n);r&&(y.__VUE_DEVTOOLS_INSPECT_DOM_TARGET__=r)}},updatePluginSettings(t,n,r){Du(t,n,r)},getPluginSettings(t){return{options:ku(t),values:xr(t)}}}}_();var Hr,zr;(zr=(Hr=y).__VUE_DEVTOOLS_ENV__)!=null||(Hr.__VUE_DEVTOOLS_ENV__={vitePluginDetected:!1});var Kr=bu(),Gr,Wr;(Wr=(Gr=y).__VUE_DEVTOOLS_KIT_CONTEXT__)!=null||(Gr.__VUE_DEVTOOLS_KIT_CONTEXT__={hooks:Kr,get state(){return{...D,activeAppRecordId:L.id,activeAppRecord:L.value,appRecords:ot.value}},api:Hu(Kr)});var we=y.__VUE_DEVTOOLS_KIT_CONTEXT__;_(),zi(Gi());var Yr,qr;(qr=(Yr=y).__VUE_DEVTOOLS_NEXT_APP_RECORD_INFO__)!=null||(Yr.__VUE_DEVTOOLS_NEXT_APP_RECORD_INFO__={id:0,appIds:new Set}),_(),_();function zu(e){D.highPerfModeEnabled=e??!D.highPerfModeEnabled,!e&&L.value&&Br(L.value.app)}_(),_(),_();function Ku(e){D.devtoolsClientDetected={...D.devtoolsClientDetected,...e};const t=Object.values(D.devtoolsClientDetected).some(Boolean);zu(!t)}var Jr,Xr;(Xr=(Jr=y).__VUE_DEVTOOLS_UPDATE_CLIENT_DETECTED__)!=null||(Jr.__VUE_DEVTOOLS_UPDATE_CLIENT_DETECTED__=Ku),_(),_(),_(),_(),_(),_(),_();var Gu=class{constructor(){this.keyToValue=new Map,this.valueToKey=new Map}set(e,t){this.keyToValue.set(e,t),this.valueToKey.set(t,e)}getByKey(e){return this.keyToValue.get(e)}getByValue(e){return this.valueToKey.get(e)}clear(){this.keyToValue.clear(),this.valueToKey.clear()}},Zr=class{constructor(t){this.generateIdentifier=t,this.kv=new Gu}register(t,n){this.kv.getByValue(t)||(n||(n=this.generateIdentifier(t)),this.kv.set(n,t))}clear(){this.kv.clear()}getIdentifier(t){return this.kv.getByValue(t)}getValue(t){return this.kv.getByKey(t)}},Wu=class extends Zr{constructor(){super(e=>e.name),this.classToAllowedProps=new Map}register(e,t){typeof t=="object"?(t.allowProps&&this.classToAllowedProps.set(e,t.allowProps),super.register(e,t.identifier)):super.register(e,t)}getAllowedProps(e){return this.classToAllowedProps.get(e)}};_(),_();function Yu(e){if("values"in Object)return Object.values(e);const t=[];for(const n in e)e.hasOwnProperty(n)&&t.push(e[n]);return t}function qu(e,t){const n=Yu(e);if("find"in n)return n.find(t);const r=n;for(let s=0;s<r.length;s++){const o=r[s];if(t(o))return o}}function Oe(e,t){Object.entries(e).forEach(([n,r])=>t(r,n))}function it(e,t){return e.indexOf(t)!==-1}function Qr(e,t){for(let n=0;n<e.length;n++){const r=e[n];if(t(r))return r}}var Ju=class{constructor(){this.transfomers={}}register(e){this.transfomers[e.name]=e}findApplicable(e){return qu(this.transfomers,t=>t.isApplicable(e))}findByName(e){return this.transfomers[e]}};_(),_();var Xu=e=>Object.prototype.toString.call(e).slice(8,-1),es=e=>typeof e>"u",Zu=e=>e===null,$e=e=>typeof e!="object"||e===null||e===Object.prototype?!1:Object.getPrototypeOf(e)===null?!0:Object.getPrototypeOf(e)===Object.prototype,Zt=e=>$e(e)&&Object.keys(e).length===0,te=e=>Array.isArray(e),Qu=e=>typeof e=="string",ea=e=>typeof e=="number"&&!isNaN(e),ta=e=>typeof e=="boolean",na=e=>e instanceof RegExp,Ue=e=>e instanceof Map,Fe=e=>e instanceof Set,ts=e=>Xu(e)==="Symbol",ra=e=>e instanceof Date&&!isNaN(e.valueOf()),sa=e=>e instanceof Error,ns=e=>typeof e=="number"&&isNaN(e),oa=e=>ta(e)||Zu(e)||es(e)||ea(e)||Qu(e)||ts(e),ia=e=>typeof e=="bigint",ua=e=>e===1/0||e===-1/0,aa=e=>ArrayBuffer.isView(e)&&!(e instanceof DataView),ca=e=>e instanceof URL;_();var rs=e=>e.replace(/\./g,"\\."),Qt=e=>e.map(String).map(rs).join("."),je=e=>{const t=[];let n="";for(let s=0;s<e.length;s++){let o=e.charAt(s);if(o==="\\"&&e.charAt(s+1)==="."){n+=".",s++;continue}if(o==="."){t.push(n),n="";continue}n+=o}const r=n;return t.push(r),t};_();function W(e,t,n,r){return{isApplicable:e,annotation:t,transform:n,untransform:r}}var ss=[W(es,"undefined",()=>null,()=>{}),W(ia,"bigint",e=>e.toString(),e=>typeof BigInt<"u"?BigInt(e):(console.error("Please add a BigInt polyfill."),e)),W(ra,"Date",e=>e.toISOString(),e=>new Date(e)),W(sa,"Error",(e,t)=>{const n={name:e.name,message:e.message};return t.allowedErrorProps.forEach(r=>{n[r]=e[r]}),n},(e,t)=>{const n=new Error(e.message);return n.name=e.name,n.stack=e.stack,t.allowedErrorProps.forEach(r=>{n[r]=e[r]}),n}),W(na,"regexp",e=>""+e,e=>{const t=e.slice(1,e.lastIndexOf("/")),n=e.slice(e.lastIndexOf("/")+1);return new RegExp(t,n)}),W(Fe,"set",e=>[...e.values()],e=>new Set(e)),W(Ue,"map",e=>[...e.entries()],e=>new Map(e)),W(e=>ns(e)||ua(e),"number",e=>ns(e)?"NaN":e>0?"Infinity":"-Infinity",Number),W(e=>e===0&&1/e===-1/0,"number",()=>"-0",Number),W(ca,"URL",e=>e.toString(),e=>new URL(e))];function ut(e,t,n,r){return{isApplicable:e,annotation:t,transform:n,untransform:r}}var os=ut((e,t)=>ts(e)?!!t.symbolRegistry.getIdentifier(e):!1,(e,t)=>["symbol",t.symbolRegistry.getIdentifier(e)],e=>e.description,(e,t,n)=>{const r=n.symbolRegistry.getValue(t[1]);if(!r)throw new Error("Trying to deserialize unknown symbol");return r}),la=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array,Uint8ClampedArray].reduce((e,t)=>(e[t.name]=t,e),{}),is=ut(aa,e=>["typed-array",e.constructor.name],e=>[...e],(e,t)=>{const n=la[t[1]];if(!n)throw new Error("Trying to deserialize unknown typed array");return new n(e)});function us(e,t){return e!=null&&e.constructor?!!t.classRegistry.getIdentifier(e.constructor):!1}var as=ut(us,(e,t)=>["class",t.classRegistry.getIdentifier(e.constructor)],(e,t)=>{const n=t.classRegistry.getAllowedProps(e.constructor);if(!n)return{...e};const r={};return n.forEach(s=>{r[s]=e[s]}),r},(e,t,n)=>{const r=n.classRegistry.getValue(t[1]);if(!r)throw new Error(`Trying to deserialize unknown class '${t[1]}' - check https://github.com/blitz-js/superjson/issues/116#issuecomment-773996564`);return Object.assign(Object.create(r.prototype),e)}),cs=ut((e,t)=>!!t.customTransformerRegistry.findApplicable(e),(e,t)=>["custom",t.customTransformerRegistry.findApplicable(e).name],(e,t)=>t.customTransformerRegistry.findApplicable(e).serialize(e),(e,t,n)=>{const r=n.customTransformerRegistry.findByName(t[1]);if(!r)throw new Error("Trying to deserialize unknown custom value");return r.deserialize(e)}),fa=[as,os,cs,is],ls=(e,t)=>{const n=Qr(fa,s=>s.isApplicable(e,t));if(n)return{value:n.transform(e,t),type:n.annotation(e,t)};const r=Qr(ss,s=>s.isApplicable(e,t));if(r)return{value:r.transform(e,t),type:r.annotation}},fs={};ss.forEach(e=>{fs[e.annotation]=e});var da=(e,t,n)=>{if(te(t))switch(t[0]){case"symbol":return os.untransform(e,t,n);case"class":return as.untransform(e,t,n);case"custom":return cs.untransform(e,t,n);case"typed-array":return is.untransform(e,t,n);default:throw new Error("Unknown transformation: "+t)}else{const r=fs[t];if(!r)throw new Error("Unknown transformation: "+t);return r.untransform(e,n)}};_();var Te=(e,t)=>{if(t>e.size)throw new Error("index out of bounds");const n=e.keys();for(;t>0;)n.next(),t--;return n.next().value};function ds(e){if(it(e,"__proto__"))throw new Error("__proto__ is not allowed as a property");if(it(e,"prototype"))throw new Error("prototype is not allowed as a property");if(it(e,"constructor"))throw new Error("constructor is not allowed as a property")}var ha=(e,t)=>{ds(t);for(let n=0;n<t.length;n++){const r=t[n];if(Fe(e))e=Te(e,+r);else if(Ue(e)){const s=+r,o=+t[++n]==0?"key":"value",i=Te(e,s);switch(o){case"key":e=i;break;case"value":e=e.get(i);break}}else e=e[r]}return e},en=(e,t,n)=>{if(ds(t),t.length===0)return n(e);let r=e;for(let o=0;o<t.length-1;o++){const i=t[o];if(te(r)){const u=+i;r=r[u]}else if($e(r))r=r[i];else if(Fe(r)){const u=+i;r=Te(r,u)}else if(Ue(r)){if(o===t.length-2)break;const a=+i,c=+t[++o]==0?"key":"value",p=Te(r,a);switch(c){case"key":r=p;break;case"value":r=r.get(p);break}}}const s=t[t.length-1];if(te(r)?r[+s]=n(r[+s]):$e(r)&&(r[s]=n(r[s])),Fe(r)){const o=Te(r,+s),i=n(o);o!==i&&(r.delete(o),r.add(i))}if(Ue(r)){const o=+t[t.length-2],i=Te(r,o);switch(+s==0?"key":"value"){case"key":{const a=n(i);r.set(a,r.get(i)),a!==i&&r.delete(i);break}case"value":{r.set(i,n(r.get(i)));break}}}return e};function tn(e,t,n=[]){if(!e)return;if(!te(e)){Oe(e,(o,i)=>tn(o,t,[...n,...je(i)]));return}const[r,s]=e;s&&Oe(s,(o,i)=>{tn(o,t,[...n,...je(i)])}),t(r,n)}function pa(e,t,n){return tn(t,(r,s)=>{e=en(e,s,o=>da(o,r,n))}),e}function _a(e,t){function n(r,s){const o=ha(e,je(s));r.map(je).forEach(i=>{e=en(e,i,()=>o)})}if(te(t)){const[r,s]=t;r.forEach(o=>{e=en(e,je(o),()=>e)}),s&&Oe(s,n)}else Oe(t,n);return e}var ga=(e,t)=>$e(e)||te(e)||Ue(e)||Fe(e)||us(e,t);function ma(e,t,n){const r=n.get(e);r?r.push(t):n.set(e,[t])}function Ea(e,t){const n={};let r;return e.forEach(s=>{if(s.length<=1)return;t||(s=s.map(u=>u.map(String)).sort((u,a)=>u.length-a.length));const[o,...i]=s;o.length===0?r=i.map(Qt):n[Qt(o)]=i.map(Qt)}),r?Zt(n)?[r]:[r,n]:Zt(n)?void 0:n}var hs=(e,t,n,r,s=[],o=[],i=new Map)=>{var u;const a=oa(e);if(!a){ma(e,s,t);const d=i.get(e);if(d)return r?{transformedValue:null}:d}if(!ga(e,n)){const d=ls(e,n),m=d?{transformedValue:d.value,annotations:[d.type]}:{transformedValue:e};return a||i.set(e,m),m}if(it(o,e))return{transformedValue:null};const c=ls(e,n),p=(u=c==null?void 0:c.value)!=null?u:e,l=te(p)?[]:{},f={};Oe(p,(d,m)=>{if(m==="__proto__"||m==="constructor"||m==="prototype")throw new Error(`Detected property ${m}. This is a prototype pollution risk, please remove it from your object.`);const g=hs(d,t,n,r,[...s,m],[...o,e],i);l[m]=g.transformedValue,te(g.annotations)?f[m]=g.annotations:$e(g.annotations)&&Oe(g.annotations,(E,w)=>{f[rs(m)+"."+w]=E})});const h=Zt(f)?{transformedValue:l,annotations:c?[c.type]:void 0}:{transformedValue:l,annotations:c?[c.type,f]:f};return a||i.set(e,h),h};_(),_();function ps(e){return Object.prototype.toString.call(e).slice(8,-1)}function _s(e){return ps(e)==="Array"}function ya(e){if(ps(e)!=="Object")return!1;const t=Object.getPrototypeOf(e);return!!t&&t.constructor===Object&&t===Object.prototype}function va(e,t,n,r,s){const o={}.propertyIsEnumerable.call(r,t)?"enumerable":"nonenumerable";o==="enumerable"&&(e[t]=n),s&&o==="nonenumerable"&&Object.defineProperty(e,t,{value:n,enumerable:!1,writable:!0,configurable:!0})}function nn(e,t={}){if(_s(e))return e.map(s=>nn(s,t));if(!ya(e))return e;const n=Object.getOwnPropertyNames(e),r=Object.getOwnPropertySymbols(e);return[...n,...r].reduce((s,o)=>{if(_s(t.props)&&!t.props.includes(o))return s;const i=e[o],u=nn(i,t);return va(s,o,u,e,t.nonenumerable),s},{})}var k=class{constructor({dedupe:e=!1}={}){this.classRegistry=new Wu,this.symbolRegistry=new Zr(t=>{var n;return(n=t.description)!=null?n:""}),this.customTransformerRegistry=new Ju,this.allowedErrorProps=[],this.dedupe=e}serialize(e){const t=new Map,n=hs(e,t,this,this.dedupe),r={json:n.transformedValue};n.annotations&&(r.meta={...r.meta,values:n.annotations});const s=Ea(t,this.dedupe);return s&&(r.meta={...r.meta,referentialEqualities:s}),r}deserialize(e){const{json:t,meta:n}=e;let r=nn(t);return n!=null&&n.values&&(r=pa(r,n.values,this)),n!=null&&n.referentialEqualities&&(r=_a(r,n.referentialEqualities)),r}stringify(e){return JSON.stringify(this.serialize(e))}parse(e){return this.deserialize(JSON.parse(e))}registerClass(e,t){this.classRegistry.register(e,t)}registerSymbol(e,t){this.symbolRegistry.register(e,t)}registerCustom(e,t){this.customTransformerRegistry.register({name:t,...e})}allowErrorProps(...e){this.allowedErrorProps.push(...e)}};k.defaultInstance=new k,k.serialize=k.defaultInstance.serialize.bind(k.defaultInstance),k.deserialize=k.defaultInstance.deserialize.bind(k.defaultInstance),k.stringify=k.defaultInstance.stringify.bind(k.defaultInstance),k.parse=k.defaultInstance.parse.bind(k.defaultInstance),k.registerClass=k.defaultInstance.registerClass.bind(k.defaultInstance),k.registerSymbol=k.defaultInstance.registerSymbol.bind(k.defaultInstance),k.registerCustom=k.defaultInstance.registerCustom.bind(k.defaultInstance),k.allowErrorProps=k.defaultInstance.allowErrorProps.bind(k.defaultInstance),_(),_(),_(),_(),_(),_(),_(),_(),_(),_(),_(),_(),_(),_(),_(),_(),_(),_(),_(),_(),_(),_(),_();var gs,ms;(ms=(gs=y).__VUE_DEVTOOLS_KIT_MESSAGE_CHANNELS__)!=null||(gs.__VUE_DEVTOOLS_KIT_MESSAGE_CHANNELS__=[]);var Es,ys;(ys=(Es=y).__VUE_DEVTOOLS_KIT_RPC_CLIENT__)!=null||(Es.__VUE_DEVTOOLS_KIT_RPC_CLIENT__=null);var vs,Ss;(Ss=(vs=y).__VUE_DEVTOOLS_KIT_RPC_SERVER__)!=null||(vs.__VUE_DEVTOOLS_KIT_RPC_SERVER__=null);var bs,As;(As=(bs=y).__VUE_DEVTOOLS_KIT_VITE_RPC_CLIENT__)!=null||(bs.__VUE_DEVTOOLS_KIT_VITE_RPC_CLIENT__=null);var ws,Os;(Os=(ws=y).__VUE_DEVTOOLS_KIT_VITE_RPC_SERVER__)!=null||(ws.__VUE_DEVTOOLS_KIT_VITE_RPC_SERVER__=null);var Ts,Is;(Is=(Ts=y).__VUE_DEVTOOLS_KIT_BROADCAST_RPC_SERVER__)!=null||(Ts.__VUE_DEVTOOLS_KIT_BROADCAST_RPC_SERVER__=null),_(),_(),_(),_(),_(),_(),_();/*!
|
|
2
4
|
* pinia v3.0.3
|
|
3
5
|
* (c) 2025 Eduardo San Martin Morote
|
|
4
6
|
* @license MIT
|
|
5
|
-
*/let
|
|
6
|
-
${
|
|
7
|
-
Only state can be modified.`);
|
|
7
|
+
*/let He;const ze=e=>He=e,ks=process.env.NODE_ENV!=="production"?Symbol("pinia"):Symbol();function fe(e){return e&&typeof e=="object"&&Object.prototype.toString.call(e)==="[object Object]"&&typeof e.toJSON!="function"}var Y;(function(e){e.direct="direct",e.patchObject="patch object",e.patchFunction="patch function"})(Y||(Y={}));const ne=typeof window<"u",Cs=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 Sa(e,{autoBom:t=!1}={}){return t&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)?new Blob(["\uFEFF",e],{type:e.type}):e}function rn(e,t,n){const r=new XMLHttpRequest;r.open("GET",e),r.responseType="blob",r.onload=function(){Rs(r.response,t,n)},r.onerror=function(){console.error("could not download file")},r.send()}function Ds(e){const t=new XMLHttpRequest;t.open("HEAD",e,!1);try{t.send()}catch{}return t.status>=200&&t.status<=299}function at(e){try{e.dispatchEvent(new MouseEvent("click"))}catch{const n=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});e.dispatchEvent(n)}}const ct=typeof navigator=="object"?navigator:{userAgent:""},xs=/Macintosh/.test(ct.userAgent)&&/AppleWebKit/.test(ct.userAgent)&&!/Safari/.test(ct.userAgent),Rs=ne?typeof HTMLAnchorElement<"u"&&"download"in HTMLAnchorElement.prototype&&!xs?ba:"msSaveOrOpenBlob"in ct?Aa:wa:()=>{};function ba(e,t="download",n){const r=document.createElement("a");r.download=t,r.rel="noopener",typeof e=="string"?(r.href=e,r.origin!==location.origin?Ds(r.href)?rn(e,t,n):(r.target="_blank",at(r)):at(r)):(r.href=URL.createObjectURL(e),setTimeout(function(){URL.revokeObjectURL(r.href)},4e4),setTimeout(function(){at(r)},0))}function Aa(e,t="download",n){if(typeof e=="string")if(Ds(e))rn(e,t,n);else{const r=document.createElement("a");r.href=e,r.target="_blank",setTimeout(function(){at(r)})}else navigator.msSaveOrOpenBlob(Sa(e,n),t)}function wa(e,t,n,r){if(r=r||open("","_blank"),r&&(r.document.title=r.document.body.innerText="downloading..."),typeof e=="string")return rn(e,t,n);const s=e.type==="application/octet-stream",o=/constructor/i.test(String(Cs.HTMLElement))||"safari"in Cs,i=/CriOS\/[\d]+/.test(navigator.userAgent);if((i||s&&o||xs)&&typeof FileReader<"u"){const u=new FileReader;u.onloadend=function(){let a=u.result;if(typeof a!="string")throw r=null,new Error("Wrong reader.result type");a=i?a:a.replace(/^data:[^;]*;/,"data:attachment/file;"),r?r.location.href=a:location.assign(a),r=null},u.readAsDataURL(e)}else{const u=URL.createObjectURL(e);r?r.location.assign(u):location.href=u,r=null,setTimeout(function(){URL.revokeObjectURL(u)},4e4)}}function x(e,t){const n="🍍 "+e;typeof __VUE_DEVTOOLS_TOAST__=="function"?__VUE_DEVTOOLS_TOAST__(n,t):t==="error"?console.error(n):t==="warn"?console.warn(n):console.log(n)}function sn(e){return"_a"in e&&"install"in e}function Ps(){if(!("clipboard"in navigator))return x("Your browser doesn't support the Clipboard API","error"),!0}function Ns(e){return e instanceof Error&&e.message.toLowerCase().includes("document is not focused")?(x('You need to activate the "Emulate a focused page" setting in the "Rendering" panel of devtools.',"warn"),!0):!1}async function Oa(e){if(!Ps())try{await navigator.clipboard.writeText(JSON.stringify(e.state.value)),x("Global state copied to clipboard.")}catch(t){if(Ns(t))return;x("Failed to serialize the state. Check the console for more details.","error"),console.error(t)}}async function Ta(e){if(!Ps())try{Vs(e,JSON.parse(await navigator.clipboard.readText())),x("Global state pasted from clipboard.")}catch(t){if(Ns(t))return;x("Failed to deserialize the state from clipboard. Check the console for more details.","error"),console.error(t)}}async function Ia(e){try{Rs(new Blob([JSON.stringify(e.state.value)],{type:"text/plain;charset=utf-8"}),"pinia-state.json")}catch(t){x("Failed to export the state as JSON. Check the console for more details.","error"),console.error(t)}}let X;function ka(){X||(X=document.createElement("input"),X.type="file",X.accept=".json");function e(){return new Promise((t,n)=>{X.onchange=async()=>{const r=X.files;if(!r)return t(null);const s=r.item(0);return t(s?{text:await s.text(),file:s}:null)},X.oncancel=()=>t(null),X.onerror=n,X.click()})}return e}async function Ca(e){try{const n=await ka()();if(!n)return;const{text:r,file:s}=n;Vs(e,JSON.parse(r)),x(`Global state imported from "${s.name}".`)}catch(t){x("Failed to import the state from JSON. Check the console for more details.","error"),console.error(t)}}function Vs(e,t){for(const n in t){const r=e.state.value[n];r?Object.assign(r,t[n]):e.state.value[n]=t[n]}}function z(e){return{_custom:{display:e}}}const Ls="🍍 Pinia (root)",lt="_root";function Da(e){return sn(e)?{id:lt,label:Ls}:{id:e.$id,label:e.$id}}function xa(e){if(sn(e)){const n=Array.from(e._s.keys()),r=e._s;return{state:n.map(o=>({editable:!0,key:o,value:e.state.value[o]})),getters:n.filter(o=>r.get(o)._getters).map(o=>{const i=r.get(o);return{editable:!1,key:o,value:i._getters.reduce((u,a)=>(u[a]=i[a],u),{})}})}}const t={state:Object.keys(e.$state).map(n=>({editable:!0,key:n,value:e.$state[n]}))};return e._getters&&e._getters.length&&(t.getters=e._getters.map(n=>({editable:!1,key:n,value:e[n]}))),e._customProperties.size&&(t.customProperties=Array.from(e._customProperties).map(n=>({editable:!0,key:n,value:e[n]}))),t}function Ra(e){return e?Array.isArray(e)?e.reduce((t,n)=>(t.keys.push(n.key),t.operations.push(n.type),t.oldValue[n.key]=n.oldValue,t.newValue[n.key]=n.newValue,t),{oldValue:{},keys:[],operations:[],newValue:{}}):{operation:z(e.type),key:z(e.key),oldValue:e.oldValue,newValue:e.newValue}:{}}function Pa(e){switch(e){case Y.direct:return"mutation";case Y.patchFunction:return"$patch";case Y.patchObject:return"$patch";default:return"unknown"}}let Ie=!0;const ft=[],de="pinia:mutations",V="pinia",{assign:Na}=Object,dt=e=>"🍍 "+e;function Va(e,t){Mr({id:"dev.esm.pinia",label:"Pinia 🍍",logo:"https://pinia.vuejs.org/logo.svg",packageName:"pinia",homepage:"https://pinia.vuejs.org",componentStateTypes:ft,app:e},n=>{typeof n.now!="function"&&x("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:de,label:"Pinia 🍍",color:15064968}),n.addInspector({id:V,label:"Pinia 🍍",icon:"storage",treeFilterPlaceholder:"Search stores",actions:[{icon:"content_copy",action:()=>{Oa(t)},tooltip:"Serialize and copy the state"},{icon:"content_paste",action:async()=>{await Ta(t),n.sendInspectorTree(V),n.sendInspectorState(V)},tooltip:"Replace the state with the content of your clipboard"},{icon:"save",action:()=>{Ia(t)},tooltip:"Save the state as a JSON file"},{icon:"folder_open",action:async()=>{await Ca(t),n.sendInspectorTree(V),n.sendInspectorState(V)},tooltip:"Import the state from a JSON file"}],nodeActions:[{icon:"restore",tooltip:'Reset the state (with "$reset")',action:r=>{const s=t._s.get(r);s?typeof s.$reset!="function"?x(`Cannot reset "${r}" store because it doesn't have a "$reset" method implemented.`,"warn"):(s.$reset(),x(`Store "${r}" reset.`)):x(`Cannot reset "${r}" store because it wasn't found.`,"warn")}}]}),n.on.inspectComponent(r=>{const s=r.componentInstance&&r.componentInstance.proxy;if(s&&s._pStores){const o=r.componentInstance.proxy._pStores;Object.values(o).forEach(i=>{r.instanceData.state.push({type:dt(i.$id),key:"state",editable:!0,value:i._isOptionsAPI?{_custom:{value:S.toRaw(i.$state),actions:[{icon:"restore",tooltip:"Reset the state of this store",action:()=>i.$reset()}]}}:Object.keys(i.$state).reduce((u,a)=>(u[a]=i.$state[a],u),{})}),i._getters&&i._getters.length&&r.instanceData.state.push({type:dt(i.$id),key:"getters",editable:!1,value:i._getters.reduce((u,a)=>{try{u[a]=i[a]}catch(c){u[a]=c}return u},{})})})}}),n.on.getInspectorTree(r=>{if(r.app===e&&r.inspectorId===V){let s=[t];s=s.concat(Array.from(t._s.values())),r.rootNodes=(r.filter?s.filter(o=>"$id"in o?o.$id.toLowerCase().includes(r.filter.toLowerCase()):Ls.toLowerCase().includes(r.filter.toLowerCase())):s).map(Da)}}),globalThis.$pinia=t,n.on.getInspectorState(r=>{if(r.app===e&&r.inspectorId===V){const s=r.nodeId===lt?t:t._s.get(r.nodeId);if(!s)return;s&&(r.nodeId!==lt&&(globalThis.$store=S.toRaw(s)),r.state=xa(s))}}),n.on.editInspectorState(r=>{if(r.app===e&&r.inspectorId===V){const s=r.nodeId===lt?t:t._s.get(r.nodeId);if(!s)return x(`store "${r.nodeId}" not found`,"error");const{path:o}=r;sn(s)?o.unshift("state"):(o.length!==1||!s._customProperties.has(o[0])||o[0]in s.$state)&&o.unshift("$state"),Ie=!1,r.set(s,o,r.state.value),Ie=!0}}),n.on.editComponentState(r=>{if(r.type.startsWith("🍍")){const s=r.type.replace(/^🍍\s*/,""),o=t._s.get(s);if(!o)return x(`store "${s}" not found`,"error");const{path:i}=r;if(i[0]!=="state")return x(`Invalid path for store "${s}":
|
|
8
|
+
${i}
|
|
9
|
+
Only state can be modified.`);i[0]="$state",Ie=!1,r.set(o,i,r.state.value),Ie=!0}})})}function La(e,t){ft.includes(dt(t.$id))||ft.push(dt(t.$id)),Mr({id:"dev.esm.pinia",label:"Pinia 🍍",logo:"https://pinia.vuejs.org/logo.svg",packageName:"pinia",homepage:"https://pinia.vuejs.org",componentStateTypes:ft,app:e,settings:{logStoreChanges:{label:"Notify about new/deleted stores",type:"boolean",defaultValue:!0}}},n=>{const r=typeof n.now=="function"?n.now.bind(n):Date.now;t.$onAction(({after:i,onError:u,name:a,args:c})=>{const p=Ms++;n.addTimelineEvent({layerId:de,event:{time:r(),title:"🛫 "+a,subtitle:"start",data:{store:z(t.$id),action:z(a),args:c},groupId:p}}),i(l=>{re=void 0,n.addTimelineEvent({layerId:de,event:{time:r(),title:"🛬 "+a,subtitle:"end",data:{store:z(t.$id),action:z(a),args:c,result:l},groupId:p}})}),u(l=>{re=void 0,n.addTimelineEvent({layerId:de,event:{time:r(),logType:"error",title:"💥 "+a,subtitle:"end",data:{store:z(t.$id),action:z(a),args:c,error:l},groupId:p}})})},!0),t._customProperties.forEach(i=>{S.watch(()=>S.unref(t[i]),(u,a)=>{n.notifyComponentUpdate(),n.sendInspectorState(V),Ie&&n.addTimelineEvent({layerId:de,event:{time:r(),title:"Change",subtitle:i,data:{newValue:u,oldValue:a},groupId:re}})},{deep:!0})}),t.$subscribe(({events:i,type:u},a)=>{if(n.notifyComponentUpdate(),n.sendInspectorState(V),!Ie)return;const c={time:r(),title:Pa(u),data:Na({store:z(t.$id)},Ra(i)),groupId:re};u===Y.patchFunction?c.subtitle="⤵️":u===Y.patchObject?c.subtitle="🧩":i&&!Array.isArray(i)&&(c.subtitle=i.type),i&&(c.data["rawEvent(s)"]={_custom:{display:"DebuggerEvent",type:"object",tooltip:"raw DebuggerEvent[]",value:i}}),n.addTimelineEvent({layerId:de,event:c})},{detached:!0,flush:"sync"});const s=t._hotUpdate;t._hotUpdate=S.markRaw(i=>{s(i),n.addTimelineEvent({layerId:de,event:{time:r(),title:"🔥 "+t.$id,subtitle:"HMR update",data:{store:z(t.$id),info:z("HMR update")}}}),n.notifyComponentUpdate(),n.sendInspectorTree(V),n.sendInspectorState(V)});const{$dispose:o}=t;t.$dispose=()=>{o(),n.notifyComponentUpdate(),n.sendInspectorTree(V),n.sendInspectorState(V),n.getSettings().logStoreChanges&&x(`Disposed "${t.$id}" store 🗑`)},n.notifyComponentUpdate(),n.sendInspectorTree(V),n.sendInspectorState(V),n.getSettings().logStoreChanges&&x(`"${t.$id}" store installed 🆕`)})}let Ms=0,re;function Bs(e,t,n){const r=t.reduce((s,o)=>(s[o]=S.toRaw(e)[o],s),{});for(const s in r)e[s]=function(){const o=Ms,i=n?new Proxy(e,{get(...a){return re=o,Reflect.get(...a)},set(...a){return re=o,Reflect.set(...a)}}):e;re=o;const u=r[s].apply(i,arguments);return re=void 0,u}}function Ma({app:e,store:t,options:n}){if(!t.$id.startsWith("__hot:")){if(t._isOptionsAPI=!!n.state,!t._p._testing){Bs(t,Object.keys(n.actions),t._isOptionsAPI);const r=t._hotUpdate;S.toRaw(t)._hotUpdate=function(s){r.apply(this,arguments),Bs(t,Object.keys(s._hmrPayload.actions),!!t._isOptionsAPI)}}La(e,t)}}function Ba(){const e=S.effectScope(!0),t=e.run(()=>S.ref({}));let n=[],r=[];const s=S.markRaw({install(o){ze(s),s._a=o,o.provide(ks,s),o.config.globalProperties.$pinia=s,process.env.NODE_ENV!=="production"&&process.env.NODE_ENV!=="test"&&ne&&Va(o,s),r.forEach(i=>n.push(i)),r=[]},use(o){return this._a?n.push(o):r.push(o),this},_p:n,_a:null,_e:e,_s:new Map,state:t});return process.env.NODE_ENV!=="production"&&process.env.NODE_ENV!=="test"&&ne&&typeof Proxy<"u"&&s.use(Ma),s}function $s(e,t){for(const n in t){const r=t[n];if(!(n in e))continue;const s=e[n];fe(s)&&fe(r)&&!S.isRef(r)&&!S.isReactive(r)?e[n]=$s(s,r):e[n]=r}return e}const Us=()=>{};function Fs(e,t,n,r=Us){e.push(t);const s=()=>{const o=e.indexOf(t);o>-1&&(e.splice(o,1),r())};return!n&&S.getCurrentScope()&&S.onScopeDispose(s),s}function ke(e,...t){e.slice().forEach(n=>{n(...t)})}const $a=e=>e(),js=Symbol(),on=Symbol();function un(e,t){e instanceof Map&&t instanceof Map?t.forEach((n,r)=>e.set(r,n)):e instanceof Set&&t instanceof Set&&t.forEach(e.add,e);for(const n in t){if(!t.hasOwnProperty(n))continue;const r=t[n],s=e[n];fe(s)&&fe(r)&&e.hasOwnProperty(n)&&!S.isRef(r)&&!S.isReactive(r)?e[n]=un(s,r):e[n]=r}return e}const Ua=process.env.NODE_ENV!=="production"?Symbol("pinia:skipHydration"):Symbol();function Fa(e){return!fe(e)||!Object.prototype.hasOwnProperty.call(e,Ua)}const{assign:F}=Object;function Hs(e){return!!(S.isRef(e)&&e.effect)}function zs(e,t,n,r){const{state:s,actions:o,getters:i}=t,u=n.state.value[e];let a;function c(){!u&&(process.env.NODE_ENV==="production"||!r)&&(n.state.value[e]=s?s():{});const p=process.env.NODE_ENV!=="production"&&r?S.toRefs(S.ref(s?s():{}).value):S.toRefs(n.state.value[e]);return F(p,o,Object.keys(i||{}).reduce((l,f)=>(process.env.NODE_ENV!=="production"&&f in p&&console.warn(`[🍍]: A getter cannot have the same name as another state property. Rename one of them. Found with "${f}" in store "${e}".`),l[f]=S.markRaw(S.computed(()=>{ze(n);const h=n._s.get(e);return i[f].call(h,h)})),l),{}))}return a=an(e,c,t,n,r,!0),a}function an(e,t,n={},r,s,o){let i;const u=F({actions:{}},n);if(process.env.NODE_ENV!=="production"&&!r._e.active)throw new Error("Pinia destroyed");const a={deep:!0};process.env.NODE_ENV!=="production"&&(a.onTrigger=b=>{c?h=b:c==!1&&!A._hotUpdating&&(Array.isArray(h)?h.push(b):console.error("🍍 debuggerEvents should be an array. This is most likely an internal Pinia bug."))});let c,p,l=[],f=[],h;const d=r.state.value[e];!o&&!d&&(process.env.NODE_ENV==="production"||!s)&&(r.state.value[e]={});const m=S.ref({});let g;function E(b){let v;c=p=!1,process.env.NODE_ENV!=="production"&&(h=[]),typeof b=="function"?(b(r.state.value[e]),v={type:Y.patchFunction,storeId:e,events:h}):(un(r.state.value[e],b),v={type:Y.patchObject,payload:b,storeId:e,events:h});const I=g=Symbol();S.nextTick().then(()=>{g===I&&(c=!0)}),p=!0,ke(l,v,r.state.value[e])}const w=o?function(){const{state:v}=n,I=v?v():{};this.$patch(R=>{F(R,I)})}:process.env.NODE_ENV!=="production"?()=>{throw new Error(`🍍: Store "${e}" is built using the setup syntax and does not implement $reset().`)}:Us;function T(){i.stop(),l=[],f=[],r._s.delete(e)}const B=(b,v="")=>{if(js in b)return b[on]=v,b;const I=function(){ze(r);const R=Array.from(arguments),H=[],xe=[];function K(C){H.push(C)}function O(C){xe.push(C)}ke(f,{args:R,name:I[on],store:A,after:K,onError:O});let q;try{q=b.apply(this&&this.$id===e?this:A,R)}catch(C){throw ke(xe,C),C}return q instanceof Promise?q.then(C=>(ke(H,C),C)).catch(C=>(ke(xe,C),Promise.reject(C))):(ke(H,q),q)};return I[js]=!0,I[on]=v,I},se=S.markRaw({actions:{},getters:{},state:[],hotState:m}),j={_p:r,$id:e,$onAction:Fs.bind(null,f),$patch:E,$reset:w,$subscribe(b,v={}){const I=Fs(l,b,v.detached,()=>R()),R=i.run(()=>S.watch(()=>r.state.value[e],H=>{(v.flush==="sync"?p:c)&&b({storeId:e,type:Y.direct,events:h},H)},F({},a,v)));return I},$dispose:T},A=S.reactive(process.env.NODE_ENV!=="production"||process.env.NODE_ENV!=="production"&&process.env.NODE_ENV!=="test"&&ne?F({_hmrPayload:se,_customProperties:S.markRaw(new Set)},j):j);r._s.set(e,A);const $=(r._a&&r._a.runWithContext||$a)(()=>r._e.run(()=>(i=S.effectScope()).run(()=>t({action:B}))));for(const b in $){const v=$[b];if(S.isRef(v)&&!Hs(v)||S.isReactive(v))process.env.NODE_ENV!=="production"&&s?m.value[b]=S.toRef($,b):o||(d&&Fa(v)&&(S.isRef(v)?v.value=d[b]:un(v,d[b])),r.state.value[e][b]=v),process.env.NODE_ENV!=="production"&&se.state.push(b);else if(typeof v=="function"){const I=process.env.NODE_ENV!=="production"&&s?v:B(v,b);$[b]=I,process.env.NODE_ENV!=="production"&&(se.actions[b]=v),u.actions[b]=v}else process.env.NODE_ENV!=="production"&&Hs(v)&&(se.getters[b]=o?n.getters[b]:v,ne&&($._getters||($._getters=S.markRaw([]))).push(b))}if(F(A,$),F(S.toRaw(A),$),Object.defineProperty(A,"$state",{get:()=>process.env.NODE_ENV!=="production"&&s?m.value:r.state.value[e],set:b=>{if(process.env.NODE_ENV!=="production"&&s)throw new Error("cannot set hotState");E(v=>{F(v,b)})}}),process.env.NODE_ENV!=="production"&&(A._hotUpdate=S.markRaw(b=>{A._hotUpdating=!0,b._hmrPayload.state.forEach(v=>{if(v in A.$state){const I=b.$state[v],R=A.$state[v];typeof I=="object"&&fe(I)&&fe(R)?$s(I,R):b.$state[v]=R}A[v]=S.toRef(b.$state,v)}),Object.keys(A.$state).forEach(v=>{v in b.$state||delete A[v]}),c=!1,p=!1,r.state.value[e]=S.toRef(b._hmrPayload,"hotState"),p=!0,S.nextTick().then(()=>{c=!0});for(const v in b._hmrPayload.actions){const I=b[v];A[v]=B(I,v)}for(const v in b._hmrPayload.getters){const I=b._hmrPayload.getters[v],R=o?S.computed(()=>(ze(r),I.call(A,A))):I;A[v]=R}Object.keys(A._hmrPayload.getters).forEach(v=>{v in b._hmrPayload.getters||delete A[v]}),Object.keys(A._hmrPayload.actions).forEach(v=>{v in b._hmrPayload.actions||delete A[v]}),A._hmrPayload=b._hmrPayload,A._getters=b._getters,A._hotUpdating=!1})),process.env.NODE_ENV!=="production"&&process.env.NODE_ENV!=="test"&&ne){const b={writable:!0,configurable:!0,enumerable:!1};["_p","_hmrPayload","_getters","_customProperties"].forEach(v=>{Object.defineProperty(A,v,F({value:A[v]},b))})}return r._p.forEach(b=>{if(process.env.NODE_ENV!=="production"&&process.env.NODE_ENV!=="test"&&ne){const v=i.run(()=>b({store:A,app:r._a,pinia:r,options:u}));Object.keys(v||{}).forEach(I=>A._customProperties.add(I)),F(A,v)}else F(A,i.run(()=>b({store:A,app:r._a,pinia:r,options:u})))}),process.env.NODE_ENV!=="production"&&A.$state&&typeof A.$state=="object"&&typeof A.$state.constructor=="function"&&!A.$state.constructor.toString().includes("[native code]")&&console.warn(`[🍍]: The "state" must be a plain object. It cannot be
|
|
8
10
|
state: () => new MyClass()
|
|
9
|
-
Found in store "${
|
|
11
|
+
Found in store "${A.$id}".`),d&&o&&n.hydrate&&n.hydrate(A.$state,d),c=!0,p=!0,A}/*! #__NO_SIDE_EFFECTS__ */function ja(e,t,n){let r;const s=typeof t=="function";r=s?n:t;function o(i,u){const a=S.hasInjectionContext();if(i=(process.env.NODE_ENV==="test"&&He&&He._testing?null:i)||(a?S.inject(ks,null):null),i&&ze(i),process.env.NODE_ENV!=="production"&&!He)throw new Error(`[🍍]: "getActivePinia()" was called but there was no active Pinia. Are you trying to use a store before calling "app.use(pinia)"?
|
|
10
12
|
See https://pinia.vuejs.org/core-concepts/outside-component-usage.html for help.
|
|
11
|
-
This will fail in production.`);u=Ce,u._s.has(e)||(o?yt(e,t,r,u):Ir(e,r,u),process.env.NODE_ENV!=="production"&&(s._pinia=u));const l=u._s.get(e);if(process.env.NODE_ENV!=="production"&&i){const E="__hot:"+e,f=o?yt(E,t,r,u,!0):Ir(E,M({},r),u,!0);i._hotUpdate(f),delete u.state.value[E],u._s.delete(E)}if(process.env.NODE_ENV!=="production"&&Q){const E=v.getCurrentInstance();if(E&&E.proxy&&!i){const f=E.proxy,O="_pStores"in f?f._pStores:f._pStores={};O[e]=l}}return l}return s.$id=e,s}const bu=Au("data",()=>{const e=v.ref([]),t=v.ref({});return{records:e,record:t}});function Su(e){const t=v.ref();return v.onMounted(async()=>{var i,a,l;e||(e=v.inject("$registry"));let n;try{n=bu()}catch{throw new Error("Please enable the Stonecrop plugin before using the Stonecrop composable")}if(t.value=new Ge(e,n),!e||!e.router)return;const r=e.router.currentRoute.value,o=(i=r.params.records)==null?void 0:i.toString().toLowerCase(),s=(a=r.params.record)==null?void 0:a.toString().toLowerCase();if(!o&&!s)return;const u=await((l=e.getMeta)==null?void 0:l.call(e,o));u&&(e.addDoctype(u),t.value.setup(u),o&&(s?await t.value.getRecord(u,s):await t.value.getRecords(u)),t.value.runAction(u,"LOAD",s?[s]:void 0))}),{stonecrop:t}}class wu{constructor(t,n,r,o,s){k(this,"doctype");k(this,"schema");k(this,"workflow");k(this,"actions");k(this,"component");this.doctype=t,this.schema=n,this.workflow=r,this.actions=o,this.component=s}get slug(){return this.doctype.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase()}}const ge=class ge{constructor(t,n){k(this,"name");k(this,"registry");k(this,"router");k(this,"getMeta");if(ge._root)return ge._root;ge._root=this,this.name="Registry",this.registry={},this.router=t,this.getMeta=n}addDoctype(t){t.doctype in Object.keys(this.registry)||(this.registry[t.slug]=t),t.component&&this.router&&!this.router.hasRoute(t.doctype)&&this.router.addRoute({path:`/${t.slug}`,name:t.slug,component:t.component})}};k(ge,"_root");let Ke=ge;function Tu(e){return e&&typeof e.then=="function"}Promise.resolve(!1),Promise.resolve(!0);var ie=Promise.resolve();function kr(e,t){return e||(e=0),new Promise(function(n){return setTimeout(function(){return n(t)},e)})}function Cu(e,t){return Math.floor(Math.random()*(t-e+1)+e)}function Ot(){return Math.random().toString(36).substring(2)}var At=0;function Ie(){var e=Date.now()*1e3;return e<=At&&(e=At+1),At=e,e}var Du=Ie,Iu="native";function ku(e){var t={time:Ie(),messagesCallback:null,bc:new BroadcastChannel(e),subFns:[]};return t.bc.onmessage=function(n){t.messagesCallback&&t.messagesCallback(n.data)},t}function Pu(e){e.bc.close(),e.subFns=[]}function Ru(e,t){try{return e.bc.postMessage(t,!1),ie}catch(n){return Promise.reject(n)}}function Nu(e,t){e.messagesCallback=t}function Vu(){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 xu(){return 150}var Lu={create:ku,close:Pu,onMessage:Nu,postMessage:Ru,canBeUsed:Vu,type:Iu,averageResponseTime:xu,microSeconds:Du};class Pr{constructor(t){k(this,"ttl");k(this,"map",new Map);k(this,"_to",!1);this.ttl=t}has(t){return this.map.has(t)}add(t){this.map.set(t,Rr()),this._to||(this._to=!0,setTimeout(()=>{this._to=!1,Bu(this)},0))}clear(){this.map.clear()}}function Bu(e){const t=Rr()-e.ttl,n=e.map[Symbol.iterator]();for(;;){const r=n.next().value;if(!r)return;const o=r[0];if(r[1]<t)e.map.delete(o);else return}}function Rr(){return Date.now()}function bt(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=JSON.parse(JSON.stringify(e));return typeof t.webWorkerSupport>"u"&&(t.webWorkerSupport=!0),t.idb||(t.idb={}),t.idb.ttl||(t.idb.ttl=1e3*45),t.idb.fallbackInterval||(t.idb.fallbackInterval=150),e.idb&&typeof e.idb.onclose=="function"&&(t.idb.onclose=e.idb.onclose),t.localstorage||(t.localstorage={}),t.localstorage.removeTimeout||(t.localstorage.removeTimeout=1e3*60),e.methods&&(t.methods=e.methods),t.node||(t.node={}),t.node.ttl||(t.node.ttl=1e3*60*2),t.node.maxParallelWrites||(t.node.maxParallelWrites=2048),typeof t.node.useFastPath>"u"&&(t.node.useFastPath=!0),t}var Fu=Ie,Uu="pubkey.broadcast-channel-0-",X="messages",ze={durability:"relaxed"},Mu="idb";function Nr(){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 St(e){e.commit&&e.commit()}function $u(e){var t=Nr(),n=Uu+e,r=t.open(n);return r.onupgradeneeded=function(o){var s=o.target.result;s.createObjectStore(X,{keyPath:"id",autoIncrement:!0})},new Promise(function(o,s){r.onerror=function(u){return s(u)},r.onsuccess=function(){o(r.result)}})}function ju(e,t,n){var r=Date.now(),o={uuid:t,time:r,data:n},s=e.transaction([X],"readwrite",ze);return new Promise(function(u,i){s.oncomplete=function(){return u()},s.onerror=function(l){return i(l)};var a=s.objectStore(X);a.add(o),St(s)})}function Hu(e,t){var n=e.transaction(X,"readonly",ze),r=n.objectStore(X),o=[],s=IDBKeyRange.bound(t+1,1/0);if(r.getAll){var u=r.getAll(s);return new Promise(function(a,l){u.onerror=function(E){return l(E)},u.onsuccess=function(E){a(E.target.result)}})}function i(){try{return s=IDBKeyRange.bound(t+1,1/0),r.openCursor(s)}catch{return r.openCursor()}}return new Promise(function(a,l){var E=i();E.onerror=function(f){return l(f)},E.onsuccess=function(f){var O=f.target.result;O?O.value.id<t+1?O.continue(t+1):(o.push(O.value),O.continue()):(St(n),a(o))}})}function Ku(e,t){if(e.closed)return Promise.resolve([]);var n=e.db.transaction(X,"readwrite",ze),r=n.objectStore(X);return Promise.all(t.map(function(o){var s=r.delete(o);return new Promise(function(u){s.onsuccess=function(){return u()}})}))}function zu(e,t){var n=Date.now()-t,r=e.transaction(X,"readonly",ze),o=r.objectStore(X),s=[];return new Promise(function(u){o.openCursor().onsuccess=function(i){var a=i.target.result;if(a){var l=a.value;l.time<n?(s.push(l),a.continue()):(St(r),u(s))}else u(s)}})}function Gu(e){return zu(e.db,e.options.idb.ttl).then(function(t){return Ku(e,t.map(function(n){return n.id}))})}function Wu(e,t){return t=bt(t),$u(e).then(function(n){var r={closed:!1,lastCursorId:0,channelName:e,options:t,uuid:Ot(),eMIs:new Pr(t.idb.ttl*2),writeBlockPromise:ie,messagesCallback:null,readQueuePromises:[],db:n};return n.onclose=function(){r.closed=!0,t.idb.onclose&&t.idb.onclose()},Vr(r),r})}function Vr(e){e.closed||xr(e).then(function(){return kr(e.options.idb.fallbackInterval)}).then(function(){return Vr(e)})}function Yu(e,t){return!(e.uuid===t.uuid||t.eMIs.has(e.id)||e.data.time<t.messagesCallbackTime)}function xr(e){return e.closed||!e.messagesCallback?ie:Hu(e.db,e.lastCursorId).then(function(t){var n=t.filter(function(r){return!!r}).map(function(r){return r.id>e.lastCursorId&&(e.lastCursorId=r.id),r}).filter(function(r){return Yu(r,e)}).sort(function(r,o){return r.time-o.time});return n.forEach(function(r){e.messagesCallback&&(e.eMIs.add(r.id),e.messagesCallback(r.data))}),ie})}function qu(e){e.closed=!0,e.db.close()}function Xu(e,t){return e.writeBlockPromise=e.writeBlockPromise.then(function(){return ju(e.db,e.uuid,t)}).then(function(){Cu(0,10)===0&&Gu(e)}),e.writeBlockPromise}function Zu(e,t,n){e.messagesCallbackTime=n,e.messagesCallback=t,xr(e)}function Ju(){return!!Nr()}function Qu(e){return e.idb.fallbackInterval*2}var ei={create:Wu,close:qu,onMessage:Zu,postMessage:Xu,canBeUsed:Ju,type:Mu,averageResponseTime:Qu,microSeconds:Fu},ti=Ie,ni="pubkey.broadcastChannel-",ri="localstorage";function Lr(){var e;if(typeof window>"u")return null;try{e=window.localStorage,e=window["ie8-eventlistener/storage"]||window.localStorage}catch{}return e}function Br(e){return ni+e}function oi(e,t){return new Promise(function(n){kr().then(function(){var r=Br(e.channelName),o={token:Ot(),time:Date.now(),data:t,uuid:e.uuid},s=JSON.stringify(o);Lr().setItem(r,s);var u=document.createEvent("Event");u.initEvent("storage",!0,!0),u.key=r,u.newValue=s,window.dispatchEvent(u),n()})})}function si(e,t){var n=Br(e),r=function(s){s.key===n&&t(JSON.parse(s.newValue))};return window.addEventListener("storage",r),r}function ui(e){window.removeEventListener("storage",e)}function ii(e,t){if(t=bt(t),!Fr())throw new Error("BroadcastChannel: localstorage cannot be used");var n=Ot(),r=new Pr(t.localstorage.removeTimeout),o={channelName:e,uuid:n,eMIs:r};return o.listener=si(e,function(s){o.messagesCallback&&s.uuid!==n&&(!s.token||r.has(s.token)||s.data.time&&s.data.time<o.messagesCallbackTime||(r.add(s.token),o.messagesCallback(s.data)))}),o}function ai(e){ui(e.listener)}function ci(e,t,n){e.messagesCallbackTime=n,e.messagesCallback=t}function Fr(){var e=Lr();if(!e)return!1;try{var t="__broadcastchannel_check";e.setItem(t,"works"),e.removeItem(t)}catch{return!1}return!0}function li(){var e=120,t=navigator.userAgent.toLowerCase();return t.includes("safari")&&!t.includes("chrome")?e*2:e}var fi={create:ii,close:ai,onMessage:ci,postMessage:oi,canBeUsed:Fr,type:ri,averageResponseTime:li,microSeconds:ti},Ur=Ie,di="simulate",wt=new Set;function _i(e){var t={time:Ur(),name:e,messagesCallback:null};return wt.add(t),t}function pi(e){wt.delete(e)}var Mr=5;function hi(e,t){return new Promise(function(n){return setTimeout(function(){var r=Array.from(wt);r.forEach(function(o){o.name===e.name&&o!==e&&o.messagesCallback&&o.time<t.time&&o.messagesCallback(t)}),n()},Mr)})}function Ei(e,t){e.messagesCallback=t}function gi(){return!0}function mi(){return Mr}var vi={create:_i,close:pi,onMessage:Ei,postMessage:hi,canBeUsed:gi,type:di,averageResponseTime:mi,microSeconds:Ur},$r=[Lu,ei,fi];function yi(e){var t=[].concat(e.methods,$r).filter(Boolean);if(e.type){if(e.type==="simulate")return vi;var n=t.find(function(o){return o.type===e.type});if(n)return n;throw new Error("method-type "+e.type+" not found")}e.webWorkerSupport||(t=t.filter(function(o){return o.type!=="idb"}));var r=t.find(function(o){return o.canBeUsed()});if(r)return r;throw new Error("No usable method found in "+JSON.stringify($r.map(function(o){return o.type})))}var jr=new Set,Oi=0,Tt=function(t,n){this.id=Oi++,jr.add(this),this.name=t,this.options=bt(n),this.method=yi(this.options),this._iL=!1,this._onML=null,this._addEL={message:[],internal:[]},this._uMP=new Set,this._befC=[],this._prepP=null,Ai(this)};Tt._pubkey=!0,Tt.prototype={postMessage:function(t){if(this.closed)throw new Error("BroadcastChannel.postMessage(): Cannot post message after channel has closed "+JSON.stringify(t));return Hr(this,"message",t)},postInternal:function(t){return Hr(this,"internal",t)},set onmessage(e){var t=this.method.microSeconds(),n={time:t,fn:e};Gr(this,"message",this._onML),e&&typeof e=="function"?(this._onML=n,zr(this,"message",n)):this._onML=null},addEventListener:function(t,n){var r=this.method.microSeconds(),o={time:r,fn:n};zr(this,t,o)},removeEventListener:function(t,n){var r=this._addEL[t].find(function(o){return o.fn===n});Gr(this,t,r)},close:function(){var t=this;if(!this.closed){jr.delete(this),this.closed=!0;var n=this._prepP?this._prepP:ie;return this._onML=null,this._addEL.message=[],n.then(function(){return Promise.all(Array.from(t._uMP))}).then(function(){return Promise.all(t._befC.map(function(r){return r()}))}).then(function(){return t.method.close(t._state)})}},get type(){return this.method.type},get isClosed(){return this.closed}};function Hr(e,t,n){var r=e.method.microSeconds(),o={time:r,type:t,data:n},s=e._prepP?e._prepP:ie;return s.then(function(){var u=e.method.postMessage(e._state,o);return e._uMP.add(u),u.catch().then(function(){return e._uMP.delete(u)}),u})}function Ai(e){var t=e.method.create(e.name,e.options);Tu(t)?(e._prepP=t,t.then(function(n){e._state=n})):e._state=t}function Kr(e){return e._addEL.message.length>0||e._addEL.internal.length>0}function zr(e,t,n){e._addEL[t].push(n),bi(e)}function Gr(e,t,n){e._addEL[t]=e._addEL[t].filter(function(r){return r!==n}),Si(e)}function bi(e){if(!e._iL&&Kr(e)){var t=function(o){e._addEL[o.type].forEach(function(s){o.time>=s.time&&s.fn(o.data)})},n=e.method.microSeconds();e._prepP?e._prepP.then(function(){e._iL=!0,e.method.onMessage(e._state,t,n)}):(e._iL=!0,e.method.onMessage(e._state,t,n))}}function Si(e){if(e._iL&&!Kr(e)){e._iL=!1;var t=e.method.microSeconds();e.method.onMessage(e._state,null,t)}}function Wr(e,t={serialize:JSON.stringify,deserialize:JSON.parse}){return t.deserialize(t.serialize(e))}function wi(e,t){return Object.keys(t).includes(e)}function Ti({enable:e=!0,initialize:t=!0,type:n,serializer:r}){return({store:o,options:s})=>{var d,p,A;const u=((d=s==null?void 0:s.share)==null?void 0:d.enable)??e,i=((p=s==null?void 0:s.share)==null?void 0:p.omit)??[];if(!u)return;const a=new Tt(o.$id,{type:n});let l=0,E=!1;const f=Object.keys(o.$state).filter(_=>!i.includes(_)&&wi(_,o.$state));a.onmessage=_=>{if(_===void 0){a.postMessage({timestamp:l,state:Wr(o.$state,r)});return}_.timestamp<=l||(E=!0,l=_.timestamp,o.$patch(g=>{f.forEach(w=>{g[w]=_.state[w]})}))},(((A=s==null?void 0:s.share)==null?void 0:A.initialize)??t)&&a.postMessage(void 0),o.$subscribe((_,g)=>{E||(l=Date.now(),a.postMessage({timestamp:l,state:Wr(g,r)})),E=!1})}}const Yr=mu();Yr.use(Ti({enable:!0,initialize:!0}));const Ci={install:(e,t)=>{const n=e.config.globalProperties.$router,r=n||(t==null?void 0:t.router),o=new Ke(r,t==null?void 0:t.getMeta);if(!n&&r&&e.use(r),e.use(Yr),e.provide("$registry",o),t!=null&&t.components)for(const[s,u]of Object.entries(t.components))e.component(s,u)}};V.DoctypeMeta=wu,V.Registry=Ke,V.Stonecrop=Ci,V.useStonecrop=Su,Object.defineProperty(V,Symbol.toStringTag,{value:"Module"})});
|
|
13
|
+
This will fail in production.`);i=He,i._s.has(e)||(s?an(e,t,r,i):zs(e,r,i),process.env.NODE_ENV!=="production"&&(o._pinia=i));const c=i._s.get(e);if(process.env.NODE_ENV!=="production"&&u){const p="__hot:"+e,l=s?an(p,t,r,i,!0):zs(p,F({},r),i,!0);u._hotUpdate(l),delete i.state.value[p],i._s.delete(p)}if(process.env.NODE_ENV!=="production"&&ne){const p=S.getCurrentInstance();if(p&&p.proxy&&!u){const l=p.proxy,f="_pStores"in l?l._pStores:l._pStores={};f[e]=c}}return c}return o.$id=e,o}const Ha=ja("data",()=>{const e=S.ref([]),t=S.ref({});return{records:e,record:t}});function za(e){const t=S.ref();return S.onMounted(async()=>{var u,a,c;if(e||(e=S.inject("$registry")),!e||!e.router)return;let n;try{n=Ha()}catch{throw new Error("Please enable the Stonecrop plugin before using the Stonecrop composable")}t.value=new et(e,n);const r=e.router.currentRoute.value,s=(u=r.params.records)==null?void 0:u.toString().toLowerCase(),o=(a=r.params.record)==null?void 0:a.toString().toLowerCase();if(!s&&!o)return;const i=await((c=e.getMeta)==null?void 0:c.call(e,s));i&&(e.addDoctype(i),t.value.setup(i),s&&(o?await t.value.getRecord(i,o):await t.value.getRecords(i)),t.value.runAction(i,"load",o?[o]:void 0))}),{stonecrop:t}}class Ka{constructor(t,n,r,s,o){P(this,"doctype");P(this,"schema");P(this,"workflow");P(this,"actions");P(this,"component");this.doctype=t,this.schema=n,this.workflow=r,this.actions=s,this.component=o}get slug(){return this.doctype.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase()}}const De=class De{constructor(t,n){P(this,"name");P(this,"registry");P(this,"router");P(this,"getMeta");if(De._root)return De._root;De._root=this,this.name="Registry",this.registry={},this.router=t,this.getMeta=n}addDoctype(t){t.doctype in Object.keys(this.registry)||(this.registry[t.slug]=t),t.component&&this.router&&!this.router.hasRoute(t.doctype)&&this.router.addRoute({path:`/${t.slug}`,name:t.slug,component:t.component})}};P(De,"_root");let ht=De;function Ga(e){return e&&typeof e.then=="function"}Promise.resolve(!1),Promise.resolve(!0);var he=Promise.resolve();function Ks(e,t){return e||(e=0),new Promise(function(n){return setTimeout(function(){return n(t)},e)})}function Wa(e,t){return Math.floor(Math.random()*(t-e+1)+e)}function cn(){return Math.random().toString(36).substring(2)}var ln=0;function Ke(){var e=Date.now()*1e3;return e<=ln&&(e=ln+1),ln=e,e}var Ya=Ke,qa="native";function Ja(e){var t={time:Ke(),messagesCallback:null,bc:new BroadcastChannel(e),subFns:[]};return t.bc.onmessage=function(n){t.messagesCallback&&t.messagesCallback(n.data)},t}function Xa(e){e.bc.close(),e.subFns=[]}function Za(e,t){try{return e.bc.postMessage(t,!1),he}catch(n){return Promise.reject(n)}}function Qa(e,t){e.messagesCallback=t}function ec(){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 tc(){return 150}var nc={create:Ja,close:Xa,onMessage:Qa,postMessage:Za,canBeUsed:ec,type:qa,averageResponseTime:tc,microSeconds:Ya};class Gs{constructor(t){P(this,"ttl");P(this,"map",new Map);P(this,"_to",!1);this.ttl=t}has(t){return this.map.has(t)}add(t){this.map.set(t,Ws()),this._to||(this._to=!0,setTimeout(()=>{this._to=!1,rc(this)},0))}clear(){this.map.clear()}}function rc(e){const t=Ws()-e.ttl,n=e.map[Symbol.iterator]();for(;;){const r=n.next().value;if(!r)return;const s=r[0];if(r[1]<t)e.map.delete(s);else return}}function Ws(){return Date.now()}function fn(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=JSON.parse(JSON.stringify(e));return typeof t.webWorkerSupport>"u"&&(t.webWorkerSupport=!0),t.idb||(t.idb={}),t.idb.ttl||(t.idb.ttl=1e3*45),t.idb.fallbackInterval||(t.idb.fallbackInterval=150),e.idb&&typeof e.idb.onclose=="function"&&(t.idb.onclose=e.idb.onclose),t.localstorage||(t.localstorage={}),t.localstorage.removeTimeout||(t.localstorage.removeTimeout=1e3*60),e.methods&&(t.methods=e.methods),t.node||(t.node={}),t.node.ttl||(t.node.ttl=1e3*60*2),t.node.maxParallelWrites||(t.node.maxParallelWrites=2048),typeof t.node.useFastPath>"u"&&(t.node.useFastPath=!0),t}var sc=Ke,oc="pubkey.broadcast-channel-0-",Z="messages",pt={durability:"relaxed"},ic="idb";function Ys(){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 dn(e){e.commit&&e.commit()}function uc(e){var t=Ys(),n=oc+e,r=t.open(n);return r.onupgradeneeded=function(s){var o=s.target.result;o.createObjectStore(Z,{keyPath:"id",autoIncrement:!0})},new Promise(function(s,o){r.onerror=function(i){return o(i)},r.onsuccess=function(){s(r.result)}})}function ac(e,t,n){var r=Date.now(),s={uuid:t,time:r,data:n},o=e.transaction([Z],"readwrite",pt);return new Promise(function(i,u){o.oncomplete=function(){return i()},o.onerror=function(c){return u(c)};var a=o.objectStore(Z);a.add(s),dn(o)})}function cc(e,t){var n=e.transaction(Z,"readonly",pt),r=n.objectStore(Z),s=[],o=IDBKeyRange.bound(t+1,1/0);if(r.getAll){var i=r.getAll(o);return new Promise(function(a,c){i.onerror=function(p){return c(p)},i.onsuccess=function(p){a(p.target.result)}})}function u(){try{return o=IDBKeyRange.bound(t+1,1/0),r.openCursor(o)}catch{return r.openCursor()}}return new Promise(function(a,c){var p=u();p.onerror=function(l){return c(l)},p.onsuccess=function(l){var f=l.target.result;f?f.value.id<t+1?f.continue(t+1):(s.push(f.value),f.continue()):(dn(n),a(s))}})}function lc(e,t){if(e.closed)return Promise.resolve([]);var n=e.db.transaction(Z,"readwrite",pt),r=n.objectStore(Z);return Promise.all(t.map(function(s){var o=r.delete(s);return new Promise(function(i){o.onsuccess=function(){return i()}})}))}function fc(e,t){var n=Date.now()-t,r=e.transaction(Z,"readonly",pt),s=r.objectStore(Z),o=[];return new Promise(function(i){s.openCursor().onsuccess=function(u){var a=u.target.result;if(a){var c=a.value;c.time<n?(o.push(c),a.continue()):(dn(r),i(o))}else i(o)}})}function dc(e){return fc(e.db,e.options.idb.ttl).then(function(t){return lc(e,t.map(function(n){return n.id}))})}function hc(e,t){return t=fn(t),uc(e).then(function(n){var r={closed:!1,lastCursorId:0,channelName:e,options:t,uuid:cn(),eMIs:new Gs(t.idb.ttl*2),writeBlockPromise:he,messagesCallback:null,readQueuePromises:[],db:n};return n.onclose=function(){r.closed=!0,t.idb.onclose&&t.idb.onclose()},qs(r),r})}function qs(e){e.closed||Js(e).then(function(){return Ks(e.options.idb.fallbackInterval)}).then(function(){return qs(e)})}function pc(e,t){return!(e.uuid===t.uuid||t.eMIs.has(e.id)||e.data.time<t.messagesCallbackTime)}function Js(e){return e.closed||!e.messagesCallback?he:cc(e.db,e.lastCursorId).then(function(t){var n=t.filter(function(r){return!!r}).map(function(r){return r.id>e.lastCursorId&&(e.lastCursorId=r.id),r}).filter(function(r){return pc(r,e)}).sort(function(r,s){return r.time-s.time});return n.forEach(function(r){e.messagesCallback&&(e.eMIs.add(r.id),e.messagesCallback(r.data))}),he})}function _c(e){e.closed=!0,e.db.close()}function gc(e,t){return e.writeBlockPromise=e.writeBlockPromise.then(function(){return ac(e.db,e.uuid,t)}).then(function(){Wa(0,10)===0&&dc(e)}),e.writeBlockPromise}function mc(e,t,n){e.messagesCallbackTime=n,e.messagesCallback=t,Js(e)}function Ec(){return!!Ys()}function yc(e){return e.idb.fallbackInterval*2}var vc={create:hc,close:_c,onMessage:mc,postMessage:gc,canBeUsed:Ec,type:ic,averageResponseTime:yc,microSeconds:sc},Sc=Ke,bc="pubkey.broadcastChannel-",Ac="localstorage";function Xs(){var e;if(typeof window>"u")return null;try{e=window.localStorage,e=window["ie8-eventlistener/storage"]||window.localStorage}catch{}return e}function Zs(e){return bc+e}function wc(e,t){return new Promise(function(n){Ks().then(function(){var r=Zs(e.channelName),s={token:cn(),time:Date.now(),data:t,uuid:e.uuid},o=JSON.stringify(s);Xs().setItem(r,o);var i=document.createEvent("Event");i.initEvent("storage",!0,!0),i.key=r,i.newValue=o,window.dispatchEvent(i),n()})})}function Oc(e,t){var n=Zs(e),r=function(o){o.key===n&&t(JSON.parse(o.newValue))};return window.addEventListener("storage",r),r}function Tc(e){window.removeEventListener("storage",e)}function Ic(e,t){if(t=fn(t),!Qs())throw new Error("BroadcastChannel: localstorage cannot be used");var n=cn(),r=new Gs(t.localstorage.removeTimeout),s={channelName:e,uuid:n,eMIs:r};return s.listener=Oc(e,function(o){s.messagesCallback&&o.uuid!==n&&(!o.token||r.has(o.token)||o.data.time&&o.data.time<s.messagesCallbackTime||(r.add(o.token),s.messagesCallback(o.data)))}),s}function kc(e){Tc(e.listener)}function Cc(e,t,n){e.messagesCallbackTime=n,e.messagesCallback=t}function Qs(){var e=Xs();if(!e)return!1;try{var t="__broadcastchannel_check";e.setItem(t,"works"),e.removeItem(t)}catch{return!1}return!0}function Dc(){var e=120,t=navigator.userAgent.toLowerCase();return t.includes("safari")&&!t.includes("chrome")?e*2:e}var xc={create:Ic,close:kc,onMessage:Cc,postMessage:wc,canBeUsed:Qs,type:Ac,averageResponseTime:Dc,microSeconds:Sc},eo=Ke,Rc="simulate",hn=new Set;function Pc(e){var t={time:eo(),name:e,messagesCallback:null};return hn.add(t),t}function Nc(e){hn.delete(e)}var to=5;function Vc(e,t){return new Promise(function(n){return setTimeout(function(){var r=Array.from(hn);r.forEach(function(s){s.name===e.name&&s!==e&&s.messagesCallback&&s.time<t.time&&s.messagesCallback(t)}),n()},to)})}function Lc(e,t){e.messagesCallback=t}function Mc(){return!0}function Bc(){return to}var $c={create:Pc,close:Nc,onMessage:Lc,postMessage:Vc,canBeUsed:Mc,type:Rc,averageResponseTime:Bc,microSeconds:eo},no=[nc,vc,xc];function Uc(e){var t=[].concat(e.methods,no).filter(Boolean);if(e.type){if(e.type==="simulate")return $c;var n=t.find(function(s){return s.type===e.type});if(n)return n;throw new Error("method-type "+e.type+" not found")}e.webWorkerSupport||(t=t.filter(function(s){return s.type!=="idb"}));var r=t.find(function(s){return s.canBeUsed()});if(r)return r;throw new Error("No usable method found in "+JSON.stringify(no.map(function(s){return s.type})))}var ro=new Set,Fc=0,pn=function(t,n){this.id=Fc++,ro.add(this),this.name=t,this.options=fn(n),this.method=Uc(this.options),this._iL=!1,this._onML=null,this._addEL={message:[],internal:[]},this._uMP=new Set,this._befC=[],this._prepP=null,jc(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 so(this,"message",t)},postInternal:function(t){return so(this,"internal",t)},set onmessage(e){var t=this.method.microSeconds(),n={time:t,fn:e};uo(this,"message",this._onML),e&&typeof e=="function"?(this._onML=n,io(this,"message",n)):this._onML=null},addEventListener:function(t,n){var r=this.method.microSeconds(),s={time:r,fn:n};io(this,t,s)},removeEventListener:function(t,n){var r=this._addEL[t].find(function(s){return s.fn===n});uo(this,t,r)},close:function(){var t=this;if(!this.closed){ro.delete(this),this.closed=!0;var n=this._prepP?this._prepP:he;return this._onML=null,this._addEL.message=[],n.then(function(){return Promise.all(Array.from(t._uMP))}).then(function(){return Promise.all(t._befC.map(function(r){return r()}))}).then(function(){return t.method.close(t._state)})}},get type(){return this.method.type},get isClosed(){return this.closed}};function so(e,t,n){var r=e.method.microSeconds(),s={time:r,type:t,data:n},o=e._prepP?e._prepP:he;return o.then(function(){var i=e.method.postMessage(e._state,s);return e._uMP.add(i),i.catch().then(function(){return e._uMP.delete(i)}),i})}function jc(e){var t=e.method.create(e.name,e.options);Ga(t)?(e._prepP=t,t.then(function(n){e._state=n})):e._state=t}function oo(e){return e._addEL.message.length>0||e._addEL.internal.length>0}function io(e,t,n){e._addEL[t].push(n),Hc(e)}function uo(e,t,n){e._addEL[t]=e._addEL[t].filter(function(r){return r!==n}),zc(e)}function Hc(e){if(!e._iL&&oo(e)){var t=function(s){e._addEL[s.type].forEach(function(o){s.time>=o.time&&o.fn(s.data)})},n=e.method.microSeconds();e._prepP?e._prepP.then(function(){e._iL=!0,e.method.onMessage(e._state,t,n)}):(e._iL=!0,e.method.onMessage(e._state,t,n))}}function zc(e){if(e._iL&&!oo(e)){e._iL=!1;var t=e.method.microSeconds();e.method.onMessage(e._state,null,t)}}function ao(e,t={serialize:JSON.stringify,deserialize:JSON.parse}){return t.deserialize(t.serialize(e))}function Kc(e,t){return Object.keys(t).includes(e)}function Gc({enable:e=!0,initialize:t=!0,type:n,serializer:r}){return({store:s,options:o})=>{var h,d,m;const i=((h=o==null?void 0:o.share)==null?void 0:h.enable)??e,u=((d=o==null?void 0:o.share)==null?void 0:d.omit)??[];if(!i)return;const a=new pn(s.$id,{type:n});let c=0,p=!1;const l=Object.keys(s.$state).filter(g=>!u.includes(g)&&Kc(g,s.$state));a.onmessage=g=>{if(g===void 0){a.postMessage({timestamp:c,state:ao(s.$state,r)});return}g.timestamp<=c||(p=!0,c=g.timestamp,s.$patch(E=>{l.forEach(w=>{E[w]=g.state[w]})}))},(((m=o==null?void 0:o.share)==null?void 0:m.initialize)??t)&&a.postMessage(void 0),s.$subscribe((g,E)=>{p||(c=Date.now(),a.postMessage({timestamp:c,state:ao(E,r)})),p=!1})}}const co=Ba();co.use(Gc({enable:!0,initialize:!0}));const Wc={install:(e,t)=>{const n=e.config.globalProperties.$router,r=n||(t==null?void 0:t.router),s=new ht(r,t==null?void 0:t.getMeta);if(!n&&r&&e.use(r),e.use(co),e.provide("$registry",s),t!=null&&t.components)for(const[o,i]of Object.entries(t.components))e.component(o,i)}};N.DoctypeMeta=Ka,N.Registry=ht,N.Stonecrop=Wc,N.StonecropClass=et,N.useStonecrop=za,Object.defineProperty(N,Symbol.toStringTag,{value:"Module"})});
|
|
12
14
|
//# sourceMappingURL=stonecrop.umd.cjs.map
|