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