import{i as t}from"../vue-demi/vue-demi.4f3c4c97.js";import{ao as e,f as n,an as s,h as o,A as c,w as a,Y as r,B as i,aw as u,aa as f,X as p,n as l,Z as h,j as d}from"../@vue/@vue.5bfcce30.js"; /*! * pinia v2.0.14 * (c) 2022 Eduardo San Martin Morote * @license MIT */let y;const v=t=>y=t,b=Symbol();function _(t){return t&&"object"==typeof t&&"[object Object]"===Object.prototype.toString.call(t)&&"function"!=typeof t.toJSON}var j;function m(){const o=e(!0),c=o.run((()=>n({})));let a=[],r=[];const i=s({install(t){v(i),i._a=t,t.provide(b,i),t.config.globalProperties.$pinia=i,r.forEach((t=>a.push(t))),r=[]},use(e){return this._a||t?a.push(e):r.push(e),this},_p:a,_a:null,_e:o,_s:new Map,state:c});return i}!function(t){t.direct="direct",t.patchObject="patch object",t.patchFunction="patch function"}(j||(j={}));const $=()=>{};function O(t,e,n,s=$){t.push(e);const c=()=>{const n=t.indexOf(e);n>-1&&(t.splice(n,1),s())};return!n&&o()&&p(c),c}function g(t,...e){t.slice().forEach((t=>{t(...e)}))}function w(t,e){for(const n in e){if(!e.hasOwnProperty(n))continue;const s=e[n],o=t[n];_(o)&&_(s)&&t.hasOwnProperty(n)&&!i(s)&&!u(s)?t[n]=w(o,s):t[n]=s}return t}const P=Symbol();const{assign:S}=Object;function E(t,o,c={},p,h,d){let y;const b=S({actions:{}},c),m={deep:!0};let E,A,I,x=s([]),F=s([]);const k=p.state.value[t];let B;function J(e){let n;E=A=!1,"function"==typeof e?(e(p.state.value[t]),n={type:j.patchFunction,storeId:t,events:I}):(w(p.state.value[t],e),n={type:j.patchObject,payload:e,storeId:t,events:I});const s=B=Symbol();l().then((()=>{B===s&&(E=!0)})),A=!0,g(x,n,p.state.value[t])}d||k||(p.state.value[t]={}),n({});const M=$;function N(e,n){return function(){v(p);const s=Array.from(arguments),o=[],c=[];function a(t){o.push(t)}function r(t){c.push(t)}let i;g(F,{args:s,name:e,store:Y,after:a,onError:r});try{i=n.apply(this&&this.$id===t?this:Y,s)}catch(u){throw g(c,u),u}return i instanceof Promise?i.then((t=>(g(o,t),t))).catch((t=>(g(c,t),Promise.reject(t)))):(g(o,i),i)}}const X={_p:p,$id:t,$onAction:O.bind(null,F),$patch:J,$reset:M,$subscribe(e,n={}){const s=O(x,e,n.detached,(()=>o())),o=y.run((()=>a((()=>p.state.value[t]),(s=>{("sync"===n.flush?A:E)&&e({storeId:t,type:j.direct,events:I},s)}),S({},m,n))));return s},$dispose:function(){y.stop(),x=[],F=[],p._s.delete(t)}},Y=r(S({},X));p._s.set(t,Y);const Z=p._e.run((()=>(y=e(),y.run((()=>o())))));for(const e in Z){const n=Z[e];if(i(n)&&(!i(z=n)||!z.effect)||u(n))d||(!k||_(q=n)&&q.hasOwnProperty(P)||(i(n)?n.value=k[e]:w(n,k[e])),p.state.value[t][e]=n);else if("function"==typeof n){const t=N(e,n);Z[e]=t,b.actions[e]=n}}var q,z;return S(Y,Z),S(f(Y),Z),Object.defineProperty(Y,"$state",{get:()=>p.state.value[t],set:t=>{J((e=>{S(e,t)}))}}),p._p.forEach((t=>{S(Y,y.run((()=>t({store:Y,app:p._a,pinia:p,options:b}))))})),k&&d&&c.hydrate&&c.hydrate(Y.$state,k),E=!0,A=!0,Y}function A(t,e,n){let a,r;const i="function"==typeof e;function u(t,n){const u=o();(t=t||u&&c(b))&&v(t),(t=y)._s.has(a)||(i?E(a,e,r,t):function(t,e,n,o){const{state:c,actions:a,getters:r}=e,i=n.state.value[t];let u;u=E(t,(function(){i||(n.state.value[t]=c?c():{});const e=h(n.state.value[t]);return S(e,a,Object.keys(r||{}).reduce(((e,o)=>(e[o]=s(d((()=>{v(n);const e=n._s.get(t);return r[o].call(e,e)}))),e)),{}))}),e,n,0,!0),u.$reset=function(){const t=c?c():{};this.$patch((e=>{S(e,t)}))}}(a,r,t));return t._s.get(a)}return"string"==typeof t?(a=t,r=i?n:e):(r=t,a=t.id),u.$id=a,u}export{m as c,A as d};