(function(r,f){typeof exports=="object"&&typeof module<"u"?f(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],f):(r=typeof globalThis<"u"?globalThis:r||self,f(r["lj-pinia"]={},r.Vue))})(this,function(r,f){"use strict";const l=Symbol("storeKey");function b(e,o){let n,t;typeof e=="string"?(n=e,t=o):typeof e=="object"&&(n=e.id,t=e);function c(){if(f.getCurrentInstance()){let s=f.inject(l);const u=s==null?void 0:s._stores;return u!=null&&u.has(n)?u.get(n):(typeof t=="function"?a(n,t,s):typeof t=="object"&&d(n,t,s),s==null?void 0:s._stores.get(n))}}return c}function a(e,o,n){const t=f.reactive({}),c=o();for(const i in c)typeof c[i]=="function"?t[i]=c[i].call(c):t[i]=c[i];Object.assign(t,c),n._stores.set(e,t)}function d(e,o,n){const{state:t,actions:c}=o,i=o.getters||{};function s(){let u=t?t():{};const y={};for(const g in i)y[g]=f.computed(()=>{const j=n._stores.get(e);return i[g].call(j,j)});return Object.assign(u,c,y)}a(e,s,n)}const p=()=>{const e={_stores:new Map,state:{},install(o){+o.version[0]>2?o.provide(l,e):o.config.globalProperties.$pinia=e,console.log("my-pinia injected successfully!")}};return e};r.createPinia=p,r.defineStore=b,Object.defineProperty(r,Symbol.toStringTag,{value:"Module"})});