@drincs/pixi-vn 1.8.0 → 1.8.2

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.
Files changed (49) hide show
  1. package/README.md +3 -47
  2. package/dist/{HistoryChoiceMenuOption-BP9Tsbyd.d.ts → HistoryChoiceMenuOption-CS41KG13.d.ts} +2 -2
  3. package/dist/{HistoryChoiceMenuOption-DSSNUXEq.d.cts → HistoryChoiceMenuOption-DdwePsOm.d.cts} +2 -2
  4. package/dist/{StorageElementType-DkJ394kq.d.cts → StorageElementType-C7ETezlL.d.cts} +1 -1
  5. package/dist/{StorageElementType-DkJ394kq.d.ts → StorageElementType-C7ETezlL.d.ts} +1 -1
  6. package/dist/{StoredClassModel-a4pvgJXD.d.ts → StoredClassModel-C9mQxPg-.d.cts} +9 -6
  7. package/dist/{StoredClassModel-LtyakzOw.d.cts → StoredClassModel-upXPNQTp.d.ts} +9 -6
  8. package/dist/canvas.cjs +1 -1
  9. package/dist/canvas.mjs +2 -2
  10. package/dist/characters.cjs +1 -1
  11. package/dist/characters.d.cts +54 -50
  12. package/dist/characters.d.ts +54 -50
  13. package/dist/characters.mjs +1 -1
  14. package/dist/chunk-3BBZHKU4.mjs +1 -0
  15. package/dist/chunk-K7JIC2F2.mjs +1 -0
  16. package/dist/chunk-V34PMA2H.mjs +1 -0
  17. package/dist/{chunk-3SLELYPF.mjs → chunk-YCWXA3OR.mjs} +1 -1
  18. package/dist/{chunk-6HI66YQL.mjs → chunk-Z4GZCINS.mjs} +1 -1
  19. package/dist/history.cjs +1 -1
  20. package/dist/history.d.cts +2 -2
  21. package/dist/history.d.ts +2 -2
  22. package/dist/history.mjs +1 -1
  23. package/dist/index.cjs +2 -2
  24. package/dist/index.d.cts +21 -6
  25. package/dist/index.d.ts +21 -6
  26. package/dist/index.mjs +2 -2
  27. package/dist/narration.cjs +1 -1
  28. package/dist/narration.d.cts +3 -3
  29. package/dist/narration.d.ts +3 -3
  30. package/dist/narration.mjs +1 -1
  31. package/dist/sound.cjs +1 -1
  32. package/dist/sound.d.cts +6 -2
  33. package/dist/sound.d.ts +6 -2
  34. package/dist/sound.mjs +1 -1
  35. package/dist/storage.cjs +1 -1
  36. package/dist/storage.d.cts +12 -8
  37. package/dist/storage.d.ts +12 -8
  38. package/dist/storage.mjs +1 -1
  39. package/dist/vite-listener.cjs +1 -1
  40. package/dist/vite-listener.d.cts +31 -5
  41. package/dist/vite-listener.d.ts +31 -5
  42. package/dist/vite-listener.mjs +1 -1
  43. package/dist/vite.cjs +1 -1
  44. package/dist/vite.d.cts +89 -21
  45. package/dist/vite.d.ts +89 -21
  46. package/dist/vite.mjs +1 -1
  47. package/package.json +14 -6
  48. package/dist/chunk-TTRUPDAB.mjs +0 -1
  49. package/dist/chunk-XYO5SLSM.mjs +0 -1
@@ -1 +1 @@
1
- 'use strict';var core=require('@drincs/pixi-vn/core');var se=Object.defineProperty;var Xt=c=>{throw TypeError(c)};var ae=(c,i,e)=>i in c?se(c,i,{enumerable:true,configurable:true,writable:true,value:e}):c[i]=e;var _=(c,i,e)=>ae(c,typeof i!="symbol"?i+"":i,e),Yt=(c,i,e)=>i.has(c)||Xt("Cannot "+e);var t=(c,i,e)=>(Yt(c,i,"read from private field"),e?e.call(c):i.get(c)),m=(c,i,e)=>i.has(c)?Xt("Cannot add the same private member more than once"):i instanceof WeakSet?i.add(c):i.set(c,e),f=(c,i,e,r)=>(Yt(c,i,"write to private field"),i.set(c,e),e),h=(c,i,e)=>(Yt(c,i,"access private method"),e);var Mt=(c,i,e,r)=>({set _(a){f(c,i,a);},get _(){return t(c,i,r)}});var st="storage",ut="temp",Ft="flags",U={CHARACTER_CATEGORY_KEY:"character"};var k;(a=>(a.log=(o,...s)=>console.log(`[Pixi\u2019VN] ${o}`,...s),a.warn=(o,...s)=>console.warn(`[Pixi\u2019VN] ${o}`,...s),a.error=(o,...s)=>console.error(`[Pixi\u2019VN] ${o}`,...s),a.info=(o,...s)=>console.info(`[Pixi\u2019VN] ${o}`,...s)))(k||(k={}));function Rt(c){try{if(typeof c>"u")return c;let i=JSON.stringify(c);return JSON.parse(i)}catch(i){throw k.error("Error creating exportable element",c,i),new core.PixiError("not_json_serializable","Error creating exportable element")}}var ne=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,Zt=new Set,Kt=typeof process=="object"&&process?process:{},te=(c,i,e,r)=>{typeof Kt.emitWarning=="function"?Kt.emitWarning(c,i,e,r):console.error(`[${e}] ${i}: ${c}`);},Pt=globalThis.AbortController,Jt=globalThis.AbortSignal;if(typeof Pt>"u"){Jt=class{constructor(){_(this,"onabort");_(this,"_onabort",[]);_(this,"reason");_(this,"aborted",false);}addEventListener(e,r){this._onabort.push(r);}},Pt=class{constructor(){_(this,"signal",new Jt);i();}abort(e){if(!this.signal.aborted){this.signal.reason=e,this.signal.aborted=true;for(let r of this.signal._onabort)r(e);this.signal.onabort?.(e);}}};let c=Kt.env?.LRU_CACHE_IGNORE_AC_WARNING!=="1",i=()=>{c&&(c=false,te("AbortController is not defined. If using lru-cache in node 14, load an AbortController polyfill from the `node-abort-controller` package. A minimal polyfill is provided for use by LRUCache.fetch(), but it should not be relied upon in other contexts (eg, passing it to other APIs that use AbortController/AbortSignal might have undesirable effects). You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.","NO_ABORT_CONTROLLER","ENOTSUP",i));};}var le=c=>!Zt.has(c);var at=c=>c&&c===Math.floor(c)&&c>0&&isFinite(c),ee=c=>at(c)?c<=Math.pow(2,8)?Uint8Array:c<=Math.pow(2,16)?Uint16Array:c<=Math.pow(2,32)?Uint32Array:c<=Number.MAX_SAFE_INTEGER?Gt:null:null,Gt=class extends Array{constructor(c){super(c),this.fill(0);}},it,St,he=(it=class{constructor(i,e){_(this,"heap");_(this,"length");if(!t(it,St))throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new e(i),this.length=0;}static create(i){let e=ee(i);if(!e)return [];f(it,St,true);let r=new it(i,e);return f(it,St,false),r}push(i){this.heap[this.length++]=i;}pop(){return this.heap[--this.length]}},St=new WeakMap,m(it,St,false),it),qt,Qt,j,z,B,ft,X,Et,Tt,J,C,q,R,w,g,V,Y,M,D,Q,N,Z,tt,K,W,et,ht,L,bt,n,Wt,gt,rt,It,H,re,dt,yt,Dt,ot,nt,Ht,Vt,Lt,O,$t,Ct,lt,jt,At,ie=(At=class{constructor(i){m(this,n);m(this,j);m(this,z);m(this,B);m(this,ft);m(this,X);m(this,Et);m(this,Tt);m(this,J);_(this,"ttl");_(this,"ttlResolution");_(this,"ttlAutopurge");_(this,"updateAgeOnGet");_(this,"updateAgeOnHas");_(this,"allowStale");_(this,"noDisposeOnSet");_(this,"noUpdateTTL");_(this,"maxEntrySize");_(this,"sizeCalculation");_(this,"noDeleteOnFetchRejection");_(this,"noDeleteOnStaleGet");_(this,"allowStaleOnFetchAbort");_(this,"allowStaleOnFetchRejection");_(this,"ignoreFetchAbort");m(this,C);m(this,q);m(this,R);m(this,w);m(this,g);m(this,V);m(this,Y);m(this,M);m(this,D);m(this,Q);m(this,N);m(this,Z);m(this,tt);m(this,K);m(this,W);m(this,et);m(this,ht);m(this,L);m(this,bt);m(this,gt,()=>{});m(this,rt,()=>{});m(this,It,()=>{});m(this,H,()=>false);m(this,dt,i=>{});m(this,yt,(i,e,r)=>{});m(this,Dt,(i,e,r,a)=>{if(r||a)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0});_(this,qt,"LRUCache");let{max:e=0,ttl:r,ttlResolution:a=1,ttlAutopurge:o,updateAgeOnGet:s,updateAgeOnHas:l,allowStale:u,dispose:E,onInsert:I,disposeAfter:d,noDisposeOnSet:y,noUpdateTTL:b,maxSize:T=0,maxEntrySize:A=0,sizeCalculation:v,fetchMethod:p,memoMethod:F,noDeleteOnFetchRejection:P,noDeleteOnStaleGet:G,allowStaleOnFetchRejection:x,allowStaleOnFetchAbort:xt,ignoreFetchAbort:pt,perf:_t}=i;if(_t!==void 0&&typeof _t?.now!="function")throw new TypeError("perf option must have a now() method if specified");if(f(this,J,_t??ne),e!==0&&!at(e))throw new TypeError("max option must be a nonnegative integer");let mt=e?ee(e):Array;if(!mt)throw new Error("invalid max value: "+e);if(f(this,j,e),f(this,z,T),this.maxEntrySize=A||t(this,z),this.sizeCalculation=v,this.sizeCalculation){if(!t(this,z)&&!this.maxEntrySize)throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if(typeof this.sizeCalculation!="function")throw new TypeError("sizeCalculation set to non-function")}if(F!==void 0&&typeof F!="function")throw new TypeError("memoMethod must be a function if defined");if(f(this,Tt,F),p!==void 0&&typeof p!="function")throw new TypeError("fetchMethod must be a function if specified");if(f(this,Et,p),f(this,ht,!!p),f(this,R,new Map),f(this,w,new Array(e).fill(void 0)),f(this,g,new Array(e).fill(void 0)),f(this,V,new mt(e)),f(this,Y,new mt(e)),f(this,M,0),f(this,D,0),f(this,Q,he.create(e)),f(this,C,0),f(this,q,0),typeof E=="function"&&f(this,B,E),typeof I=="function"&&f(this,ft,I),typeof d=="function"?(f(this,X,d),f(this,N,[])):(f(this,X,void 0),f(this,N,void 0)),f(this,et,!!t(this,B)),f(this,bt,!!t(this,ft)),f(this,L,!!t(this,X)),this.noDisposeOnSet=!!y,this.noUpdateTTL=!!b,this.noDeleteOnFetchRejection=!!P,this.allowStaleOnFetchRejection=!!x,this.allowStaleOnFetchAbort=!!xt,this.ignoreFetchAbort=!!pt,this.maxEntrySize!==0){if(t(this,z)!==0&&!at(t(this,z)))throw new TypeError("maxSize must be a positive integer if specified");if(!at(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");h(this,n,re).call(this);}if(this.allowStale=!!u,this.noDeleteOnStaleGet=!!G,this.updateAgeOnGet=!!s,this.updateAgeOnHas=!!l,this.ttlResolution=at(a)||a===0?a:1,this.ttlAutopurge=!!o,this.ttl=r||0,this.ttl){if(!at(this.ttl))throw new TypeError("ttl must be a positive integer if specified");h(this,n,Wt).call(this);}if(t(this,j)===0&&this.ttl===0&&t(this,z)===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!t(this,j)&&!t(this,z)){let zt="LRU_CACHE_UNBOUNDED";le(zt)&&(Zt.add(zt),te("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",zt,At));}}get perf(){return t(this,J)}static unsafeExposeInternals(i){return {starts:t(i,tt),ttls:t(i,K),autopurgeTimers:t(i,W),sizes:t(i,Z),keyMap:t(i,R),keyList:t(i,w),valList:t(i,g),next:t(i,V),prev:t(i,Y),get head(){return t(i,M)},get tail(){return t(i,D)},free:t(i,Q),isBackgroundFetch:e=>{var r;return h(r=i,n,O).call(r,e)},backgroundFetch:(e,r,a,o)=>{var s;return h(s=i,n,Lt).call(s,e,r,a,o)},moveToTail:e=>{var r;return h(r=i,n,Ct).call(r,e)},indexes:e=>{var r;return h(r=i,n,ot).call(r,e)},rindexes:e=>{var r;return h(r=i,n,nt).call(r,e)},isStale:e=>{var r;return t(r=i,H).call(r,e)}}}get max(){return t(this,j)}get maxSize(){return t(this,z)}get calculatedSize(){return t(this,q)}get size(){return t(this,C)}get fetchMethod(){return t(this,Et)}get memoMethod(){return t(this,Tt)}get dispose(){return t(this,B)}get onInsert(){return t(this,ft)}get disposeAfter(){return t(this,X)}getRemainingTTL(i){return t(this,R).has(i)?1/0:0}*entries(){for(let i of h(this,n,ot).call(this))t(this,g)[i]!==void 0&&t(this,w)[i]!==void 0&&!h(this,n,O).call(this,t(this,g)[i])&&(yield [t(this,w)[i],t(this,g)[i]]);}*rentries(){for(let i of h(this,n,nt).call(this))t(this,g)[i]!==void 0&&t(this,w)[i]!==void 0&&!h(this,n,O).call(this,t(this,g)[i])&&(yield [t(this,w)[i],t(this,g)[i]]);}*keys(){for(let i of h(this,n,ot).call(this)){let e=t(this,w)[i];e!==void 0&&!h(this,n,O).call(this,t(this,g)[i])&&(yield e);}}*rkeys(){for(let i of h(this,n,nt).call(this)){let e=t(this,w)[i];e!==void 0&&!h(this,n,O).call(this,t(this,g)[i])&&(yield e);}}*values(){for(let i of h(this,n,ot).call(this))t(this,g)[i]!==void 0&&!h(this,n,O).call(this,t(this,g)[i])&&(yield t(this,g)[i]);}*rvalues(){for(let i of h(this,n,nt).call(this))t(this,g)[i]!==void 0&&!h(this,n,O).call(this,t(this,g)[i])&&(yield t(this,g)[i]);}[(Qt=Symbol.iterator,qt=Symbol.toStringTag,Qt)](){return this.entries()}find(i,e={}){for(let r of h(this,n,ot).call(this)){let a=t(this,g)[r],o=h(this,n,O).call(this,a)?a.__staleWhileFetching:a;if(o!==void 0&&i(o,t(this,w)[r],this))return this.get(t(this,w)[r],e)}}forEach(i,e=this){for(let r of h(this,n,ot).call(this)){let a=t(this,g)[r],o=h(this,n,O).call(this,a)?a.__staleWhileFetching:a;o!==void 0&&i.call(e,o,t(this,w)[r],this);}}rforEach(i,e=this){for(let r of h(this,n,nt).call(this)){let a=t(this,g)[r],o=h(this,n,O).call(this,a)?a.__staleWhileFetching:a;o!==void 0&&i.call(e,o,t(this,w)[r],this);}}purgeStale(){let i=false;for(let e of h(this,n,nt).call(this,{allowStale:true}))t(this,H).call(this,e)&&(h(this,n,lt).call(this,t(this,w)[e],"expire"),i=true);return i}info(i){let e=t(this,R).get(i);if(e===void 0)return;let r=t(this,g)[e],a=h(this,n,O).call(this,r)?r.__staleWhileFetching:r;if(a===void 0)return;let o={value:a};if(t(this,K)&&t(this,tt)){let s=t(this,K)[e],l=t(this,tt)[e];if(s&&l){let u=s-(t(this,J).now()-l);o.ttl=u,o.start=Date.now();}}return t(this,Z)&&(o.size=t(this,Z)[e]),o}dump(){let i=[];for(let e of h(this,n,ot).call(this,{allowStale:true})){let r=t(this,w)[e],a=t(this,g)[e],o=h(this,n,O).call(this,a)?a.__staleWhileFetching:a;if(o===void 0||r===void 0)continue;let s={value:o};if(t(this,K)&&t(this,tt)){s.ttl=t(this,K)[e];let l=t(this,J).now()-t(this,tt)[e];s.start=Math.floor(Date.now()-l);}t(this,Z)&&(s.size=t(this,Z)[e]),i.unshift([r,s]);}return i}load(i){this.clear();for(let[e,r]of i){if(r.start){let a=Date.now()-r.start;r.start=t(this,J).now()-a;}this.set(e,r.value,r);}}set(i,e,r={}){var y,b,T,A;if(e===void 0)return this.delete(i),this;let{ttl:a=this.ttl,start:o,noDisposeOnSet:s=this.noDisposeOnSet,sizeCalculation:l=this.sizeCalculation,status:u}=r,{noUpdateTTL:E=this.noUpdateTTL}=r,I=t(this,Dt).call(this,i,e,r.size||0,l);if(this.maxEntrySize&&I>this.maxEntrySize)return u&&(u.set="miss",u.maxEntrySizeExceeded=true),h(this,n,lt).call(this,i,"set"),this;let d=t(this,C)===0?void 0:t(this,R).get(i);if(d===void 0)d=t(this,C)===0?t(this,D):t(this,Q).length!==0?t(this,Q).pop():t(this,C)===t(this,j)?h(this,n,Vt).call(this,false):t(this,C),t(this,w)[d]=i,t(this,g)[d]=e,t(this,R).set(i,d),t(this,V)[t(this,D)]=d,t(this,Y)[d]=t(this,D),f(this,D,d),Mt(this,C)._++,t(this,yt).call(this,d,I,u),u&&(u.set="add"),E=false,t(this,bt)&&((y=t(this,ft))==null||y.call(this,e,i,"add"));else {h(this,n,Ct).call(this,d);let v=t(this,g)[d];if(e!==v){if(t(this,ht)&&h(this,n,O).call(this,v)){v.__abortController.abort(new Error("replaced"));let{__staleWhileFetching:p}=v;p!==void 0&&!s&&(t(this,et)&&((b=t(this,B))==null||b.call(this,p,i,"set")),t(this,L)&&t(this,N)?.push([p,i,"set"]));}else s||(t(this,et)&&((T=t(this,B))==null||T.call(this,v,i,"set")),t(this,L)&&t(this,N)?.push([v,i,"set"]));if(t(this,dt).call(this,d),t(this,yt).call(this,d,I,u),t(this,g)[d]=e,u){u.set="replace";let p=v&&h(this,n,O).call(this,v)?v.__staleWhileFetching:v;p!==void 0&&(u.oldValue=p);}}else u&&(u.set="update");t(this,bt)&&this.onInsert?.(e,i,e===v?"update":"replace");}if(a!==0&&!t(this,K)&&h(this,n,Wt).call(this),t(this,K)&&(E||t(this,It).call(this,d,a,o),u&&t(this,rt).call(this,u,d)),!s&&t(this,L)&&t(this,N)){let v=t(this,N),p;for(;p=v?.shift();)(A=t(this,X))==null||A.call(this,...p);}return this}pop(){var i;try{for(;t(this,C);){let e=t(this,g)[t(this,M)];if(h(this,n,Vt).call(this,!0),h(this,n,O).call(this,e)){if(e.__staleWhileFetching)return e.__staleWhileFetching}else if(e!==void 0)return e}}finally{if(t(this,L)&&t(this,N)){let e=t(this,N),r;for(;r=e?.shift();)(i=t(this,X))==null||i.call(this,...r);}}}has(i,e={}){let{updateAgeOnHas:r=this.updateAgeOnHas,status:a}=e,o=t(this,R).get(i);if(o!==void 0){let s=t(this,g)[o];if(h(this,n,O).call(this,s)&&s.__staleWhileFetching===void 0)return false;if(t(this,H).call(this,o))a&&(a.has="stale",t(this,rt).call(this,a,o));else return r&&t(this,gt).call(this,o),a&&(a.has="hit",t(this,rt).call(this,a,o)),true}else a&&(a.has="miss");return false}peek(i,e={}){let{allowStale:r=this.allowStale}=e,a=t(this,R).get(i);if(a===void 0||!r&&t(this,H).call(this,a))return;let o=t(this,g)[a];return h(this,n,O).call(this,o)?o.__staleWhileFetching:o}async fetch(i,e={}){let{allowStale:r=this.allowStale,updateAgeOnGet:a=this.updateAgeOnGet,noDeleteOnStaleGet:o=this.noDeleteOnStaleGet,ttl:s=this.ttl,noDisposeOnSet:l=this.noDisposeOnSet,size:u=0,sizeCalculation:E=this.sizeCalculation,noUpdateTTL:I=this.noUpdateTTL,noDeleteOnFetchRejection:d=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:y=this.allowStaleOnFetchRejection,ignoreFetchAbort:b=this.ignoreFetchAbort,allowStaleOnFetchAbort:T=this.allowStaleOnFetchAbort,context:A,forceRefresh:v=false,status:p,signal:F}=e;if(!t(this,ht))return p&&(p.fetch="get"),this.get(i,{allowStale:r,updateAgeOnGet:a,noDeleteOnStaleGet:o,status:p});let P={allowStale:r,updateAgeOnGet:a,noDeleteOnStaleGet:o,ttl:s,noDisposeOnSet:l,size:u,sizeCalculation:E,noUpdateTTL:I,noDeleteOnFetchRejection:d,allowStaleOnFetchRejection:y,allowStaleOnFetchAbort:T,ignoreFetchAbort:b,status:p,signal:F},G=t(this,R).get(i);if(G===void 0){p&&(p.fetch="miss");let x=h(this,n,Lt).call(this,i,G,P,A);return x.__returned=x}else {let x=t(this,g)[G];if(h(this,n,O).call(this,x)){let mt=r&&x.__staleWhileFetching!==void 0;return p&&(p.fetch="inflight",mt&&(p.returnedStale=true)),mt?x.__staleWhileFetching:x.__returned=x}let xt=t(this,H).call(this,G);if(!v&&!xt)return p&&(p.fetch="hit"),h(this,n,Ct).call(this,G),a&&t(this,gt).call(this,G),p&&t(this,rt).call(this,p,G),x;let pt=h(this,n,Lt).call(this,i,G,P,A),_t=pt.__staleWhileFetching!==void 0&&r;return p&&(p.fetch=xt?"stale":"refresh",_t&&xt&&(p.returnedStale=true)),_t?pt.__staleWhileFetching:pt.__returned=pt}}async forceFetch(i,e={}){let r=await this.fetch(i,e);if(r===void 0)throw new Error("fetch() returned undefined");return r}memo(i,e={}){let r=t(this,Tt);if(!r)throw new Error("no memoMethod provided to constructor");let{context:a,forceRefresh:o,...s}=e,l=this.get(i,s);if(!o&&l!==void 0)return l;let u=r(i,l,{options:s,context:a});return this.set(i,u,s),u}get(i,e={}){let{allowStale:r=this.allowStale,updateAgeOnGet:a=this.updateAgeOnGet,noDeleteOnStaleGet:o=this.noDeleteOnStaleGet,status:s}=e,l=t(this,R).get(i);if(l!==void 0){let u=t(this,g)[l],E=h(this,n,O).call(this,u);return s&&t(this,rt).call(this,s,l),t(this,H).call(this,l)?(s&&(s.get="stale"),E?(s&&r&&u.__staleWhileFetching!==void 0&&(s.returnedStale=true),r?u.__staleWhileFetching:void 0):(o||h(this,n,lt).call(this,i,"expire"),s&&r&&(s.returnedStale=true),r?u:void 0)):(s&&(s.get="hit"),E?u.__staleWhileFetching:(h(this,n,Ct).call(this,l),a&&t(this,gt).call(this,l),u))}else s&&(s.get="miss");}delete(i){return h(this,n,lt).call(this,i,"delete")}clear(){return h(this,n,jt).call(this,"delete")}},j=new WeakMap,z=new WeakMap,B=new WeakMap,ft=new WeakMap,X=new WeakMap,Et=new WeakMap,Tt=new WeakMap,J=new WeakMap,C=new WeakMap,q=new WeakMap,R=new WeakMap,w=new WeakMap,g=new WeakMap,V=new WeakMap,Y=new WeakMap,M=new WeakMap,D=new WeakMap,Q=new WeakMap,N=new WeakMap,Z=new WeakMap,tt=new WeakMap,K=new WeakMap,W=new WeakMap,et=new WeakMap,ht=new WeakMap,L=new WeakMap,bt=new WeakMap,n=new WeakSet,Wt=function(){let i=new Gt(t(this,j)),e=new Gt(t(this,j));f(this,K,i),f(this,tt,e);let r=this.ttlAutopurge?new Array(t(this,j)):void 0;f(this,W,r),f(this,It,(l,u,E=t(this,J).now())=>{e[l]=u!==0?E:0,i[l]=u,a(l,u);}),f(this,gt,l=>{e[l]=i[l]!==0?t(this,J).now():0,a(l,i[l]);});let a=this.ttlAutopurge?(l,u)=>{if(r?.[l]&&(clearTimeout(r[l]),r[l]=void 0),u&&u!==0&&r){let E=setTimeout(()=>{t(this,H).call(this,l)&&h(this,n,lt).call(this,t(this,w)[l],"expire");},u+1);E.unref&&E.unref(),r[l]=E;}}:()=>{};f(this,rt,(l,u)=>{if(i[u]){let E=i[u],I=e[u];if(!E||!I)return;l.ttl=E,l.start=I,l.now=o||s();let d=l.now-I;l.remainingTTL=E-d;}});let o=0,s=()=>{let l=t(this,J).now();if(this.ttlResolution>0){o=l;let u=setTimeout(()=>o=0,this.ttlResolution);u.unref&&u.unref();}return l};this.getRemainingTTL=l=>{let u=t(this,R).get(l);if(u===void 0)return 0;let E=i[u],I=e[u];if(!E||!I)return 1/0;let d=(o||s())-I;return E-d},f(this,H,l=>{let u=e[l],E=i[l];return !!E&&!!u&&(o||s())-u>E});},gt=new WeakMap,rt=new WeakMap,It=new WeakMap,H=new WeakMap,re=function(){let i=new Gt(t(this,j));f(this,q,0),f(this,Z,i),f(this,dt,e=>{f(this,q,t(this,q)-i[e]),i[e]=0;}),f(this,Dt,(e,r,a,o)=>{if(h(this,n,O).call(this,r))return 0;if(!at(a))if(o){if(typeof o!="function")throw new TypeError("sizeCalculation must be a function");if(a=o(r,e),!at(a))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}else throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");return a}),f(this,yt,(e,r,a)=>{if(i[e]=r,t(this,z)){let o=t(this,z)-i[e];for(;t(this,q)>o;)h(this,n,Vt).call(this,true);}f(this,q,t(this,q)+i[e]),a&&(a.entrySize=r,a.totalCalculatedSize=t(this,q));});},dt=new WeakMap,yt=new WeakMap,Dt=new WeakMap,ot=function*({allowStale:i=this.allowStale}={}){if(t(this,C))for(let e=t(this,D);!(!h(this,n,Ht).call(this,e)||((i||!t(this,H).call(this,e))&&(yield e),e===t(this,M)));)e=t(this,Y)[e];},nt=function*({allowStale:i=this.allowStale}={}){if(t(this,C))for(let e=t(this,M);!(!h(this,n,Ht).call(this,e)||((i||!t(this,H).call(this,e))&&(yield e),e===t(this,D)));)e=t(this,V)[e];},Ht=function(i){return i!==void 0&&t(this,R).get(t(this,w)[i])===i},Vt=function(i){var o;let e=t(this,M),r=t(this,w)[e],a=t(this,g)[e];return t(this,ht)&&h(this,n,O).call(this,a)?a.__abortController.abort(new Error("evicted")):(t(this,et)||t(this,L))&&(t(this,et)&&((o=t(this,B))==null||o.call(this,a,r,"evict")),t(this,L)&&t(this,N)?.push([a,r,"evict"])),t(this,dt).call(this,e),t(this,W)?.[e]&&(clearTimeout(t(this,W)[e]),t(this,W)[e]=void 0),i&&(t(this,w)[e]=void 0,t(this,g)[e]=void 0,t(this,Q).push(e)),t(this,C)===1?(f(this,M,f(this,D,0)),t(this,Q).length=0):f(this,M,t(this,V)[e]),t(this,R).delete(r),Mt(this,C)._--,e},Lt=function(i,e,r,a){let o=e===void 0?void 0:t(this,g)[e];if(h(this,n,O).call(this,o))return o;let s=new Pt,{signal:l}=r;l?.addEventListener("abort",()=>s.abort(l.reason),{signal:s.signal});let u={signal:s.signal,options:r,context:a},E=(A,v=false)=>{let{aborted:p}=s.signal,F=r.ignoreFetchAbort&&A!==void 0,P=r.ignoreFetchAbort||!!(r.allowStaleOnFetchAbort&&A!==void 0);if(r.status&&(p&&!v?(r.status.fetchAborted=true,r.status.fetchError=s.signal.reason,F&&(r.status.fetchAbortIgnored=true)):r.status.fetchResolved=true),p&&!F&&!v)return d(s.signal.reason,P);let G=b,x=t(this,g)[e];return (x===b||F&&v&&x===void 0)&&(A===void 0?G.__staleWhileFetching!==void 0?t(this,g)[e]=G.__staleWhileFetching:h(this,n,lt).call(this,i,"fetch"):(r.status&&(r.status.fetchUpdated=true),this.set(i,A,u.options))),A},I=A=>(r.status&&(r.status.fetchRejected=true,r.status.fetchError=A),d(A,false)),d=(A,v)=>{let{aborted:p}=s.signal,F=p&&r.allowStaleOnFetchAbort,P=F||r.allowStaleOnFetchRejection,G=P||r.noDeleteOnFetchRejection,x=b;if(t(this,g)[e]===b&&(!G||!v&&x.__staleWhileFetching===void 0?h(this,n,lt).call(this,i,"fetch"):F||(t(this,g)[e]=x.__staleWhileFetching)),P)return r.status&&x.__staleWhileFetching!==void 0&&(r.status.returnedStale=true),x.__staleWhileFetching;if(x.__returned===x)throw A},y=(A,v)=>{var F;let p=(F=t(this,Et))==null?void 0:F.call(this,i,o,u);p&&p instanceof Promise&&p.then(P=>A(P===void 0?void 0:P),v),s.signal.addEventListener("abort",()=>{(!r.ignoreFetchAbort||r.allowStaleOnFetchAbort)&&(A(void 0),r.allowStaleOnFetchAbort&&(A=P=>E(P,true)));});};r.status&&(r.status.fetchDispatched=true);let b=new Promise(y).then(E,I),T=Object.assign(b,{__abortController:s,__staleWhileFetching:o,__returned:void 0});return e===void 0?(this.set(i,T,{...u.options,status:void 0}),e=t(this,R).get(i)):t(this,g)[e]=T,T},O=function(i){if(!t(this,ht))return false;let e=i;return !!e&&e instanceof Promise&&e.hasOwnProperty("__staleWhileFetching")&&e.__abortController instanceof Pt},$t=function(i,e){t(this,Y)[e]=i,t(this,V)[i]=e;},Ct=function(i){i!==t(this,D)&&(i===t(this,M)?f(this,M,t(this,V)[i]):h(this,n,$t).call(this,t(this,Y)[i],t(this,V)[i]),h(this,n,$t).call(this,t(this,D),i),f(this,D,i));},lt=function(i,e){var a,o;let r=false;if(t(this,C)!==0){let s=t(this,R).get(i);if(s!==void 0)if(t(this,W)?.[s]&&(clearTimeout(t(this,W)?.[s]),t(this,W)[s]=void 0),r=true,t(this,C)===1)h(this,n,jt).call(this,e);else {t(this,dt).call(this,s);let l=t(this,g)[s];if(h(this,n,O).call(this,l)?l.__abortController.abort(new Error("deleted")):(t(this,et)||t(this,L))&&(t(this,et)&&((a=t(this,B))==null||a.call(this,l,i,e)),t(this,L)&&t(this,N)?.push([l,i,e])),t(this,R).delete(i),t(this,w)[s]=void 0,t(this,g)[s]=void 0,s===t(this,D))f(this,D,t(this,Y)[s]);else if(s===t(this,M))f(this,M,t(this,V)[s]);else {let u=t(this,Y)[s];t(this,V)[u]=t(this,V)[s];let E=t(this,V)[s];t(this,Y)[E]=t(this,Y)[s];}Mt(this,C)._--,t(this,Q).push(s);}}if(t(this,L)&&t(this,N)?.length){let s=t(this,N),l;for(;l=s?.shift();)(o=t(this,X))==null||o.call(this,...l);}return r},jt=function(i){var e,r;for(let a of h(this,n,nt).call(this,{allowStale:true})){let o=t(this,g)[a];if(h(this,n,O).call(this,o))o.__abortController.abort(new Error("deleted"));else {let s=t(this,w)[a];t(this,et)&&((e=t(this,B))==null||e.call(this,o,s,i)),t(this,L)&&t(this,N)?.push([o,s,i]);}}if(t(this,R).clear(),t(this,g).fill(void 0),t(this,w).fill(void 0),t(this,K)&&t(this,tt)){t(this,K).fill(0),t(this,tt).fill(0);for(let a of t(this,W)??[])a!==void 0&&clearTimeout(a);t(this,W)?.fill(void 0);}if(t(this,Z)&&t(this,Z).fill(0),f(this,M,0),f(this,D,0),t(this,Q).length=0,f(this,q,0),f(this,C,0),t(this,L)&&t(this,N)){let a=t(this,N),o;for(;o=a?.shift();)(r=t(this,X))==null||r.call(this,...o);}},At);var ct=class{constructor(i){_(this,"cache");_(this,"map",new Map);this.cache=new ie({max:i.cacheSize}),this.map=new Map;}get[Symbol.iterator](){return this.map[Symbol.iterator]}get[Symbol.toStringTag](){return this.map[Symbol.toStringTag]}clear(){return this.cache.clear(),this.map.clear()}delete(i){let e=this.map.delete(i);return e&&this.cache.delete(i),e}get forEach(){return this.map.forEach}get(i){let e=this.cache.get(i);return e||this.map.get(i)}has(i){return this.map.has(i)}set(i,e){return this.map.set(i,e),this.cache.set(i,e),this}get size(){return this.map.size}entries(){return this.map.entries()}keys(){return this.map.keys()}values(){return this.map.values()}};var kt;(d=>{d.storage=new ct({cacheSize:50}),d.defaultStorage=new ct({cacheSize:10}),d.tempStorageDeadlines=new Map;let r;function a(y){d.tempStorageDeadlines.forEach((b,T)=>{b>y&&(d.storage.delete(`${ut}:${T}`),r?.onClearOldTempVariable?.(T),d.tempStorageDeadlines.delete(T));});}d.clearOldTempVariables=a;function o(y){r=y;}d.setExternalStoreHandler=o;function s(y,b,T){T==null?d.storage.delete(`${y}:${b}`):d.storage.set(`${y}:${b}`,T),r?.onSetVariable?.(b,T);}d.setVariable=s;function l(y,b){let T=d.storage.get(`${y}:${b}`);return Rt(T)}d.getVariable=l;function u(y,b){d.storage.delete(`${y}:${b}`),r?.onRemoveVariable?.(b);}d.removeVariable=u;function E(y,b){let T=d.storage.get(Ft)||[];if(b)T.includes(y)||T.push(y);else {let A=T.indexOf(y);A>-1&&T.splice(A,1);}d.storage.set(Ft,T);}d.setFlag=E;function I(y){return (d.storage.get(Ft)||[]).includes(y)}d.getFlag=I;})(kt||(kt={}));var S=kt;var vt=class{constructor(i,e){_(this,"id");_(this,"categoryId");this.categoryId=i,this.id=e,this.migrateOldStorage();}migrateOldStorage(i=this.categoryId){let e=S.getVariable(st,i);e&&(Object.entries(e).forEach(([r,a])=>{typeof a=="object"&&a!==null&&Object.entries(a).forEach(([o,s])=>{S.setVariable(this.categoryId,`${r}:${o}`,s);});}),S.removeVariable(st,i));}setStorageProperty(i,e){S.setVariable(this.categoryId,`${this.id}:${i}`,e);}getStorageProperty(i,e=this.id){return S.getVariable(this.categoryId,`${e}:${i}`)}};var ue="@",Ot=class extends vt{constructor(e,r=""){super(U.CHARACTER_CATEGORY_KEY,e+(r?ue+r:""));_(this,"sourceId");this.sourceId=e,this.migrateOldStorage("___character___");}getStorageProperty(e){let r=super.getStorageProperty(e);return r===void 0&&(r=super.getStorageProperty(e,this.sourceId)),r}};var Ut=class extends Ot{constructor(e,r){super(typeof e=="string"?e:e.id,typeof e=="string"?"":e.emotion);_(this,"defaultName");_(this,"defaultSurname");_(this,"defaultAge");_(this,"_icon");_(this,"_color");this.defaultName=r.name,this.defaultSurname=r.surname,this.defaultAge=r.age,this._icon=r.icon,this._color=r.color;}get name(){return this.getStorageProperty("name")||this.defaultName||this.id}set name(e){this.setStorageProperty("name",e);}get surname(){return this.getStorageProperty("surname")||this.defaultSurname}set surname(e){this.setStorageProperty("surname",e);}get age(){return this.getStorageProperty("age")||this.defaultAge}set age(e){this.setStorageProperty("age",e);}get icon(){return this._icon}get color(){return this._color}};var wt=new ct({cacheSize:10}),Bt;(o=>{function c(s){try{let l=wt.get(s);if(!l){k.warn(`Character "${s}" not found, did you forget to register it with the RegisteredCharacters.add?`);return}return l}catch(l){k.error(`Error while getting Character "${s}"`,l);return}}o.get=c;function i(s){if(Array.isArray(s)){s.forEach(l=>{i(l);});return}wt.get(s.id)&&k.info(`Character id "${s.id}" already exists, it will be overwritten`),wt.set(s.id,s);}o.add=i;function e(){return Array.from(wt.values())}o.values=e;function r(s){return wt.has(s)}o.has=r;function a(){return Array.from(wt.keys())}o.keys=a;})(Bt||(Bt={}));var fe=Bt;exports.CharacterBaseModel=Ut;exports.CharacterStoredClass=Ot;exports.RegisteredCharacters=fe;
1
+ 'use strict';var core=require('@drincs/pixi-vn/core');var se=Object.defineProperty;var Xt=c=>{throw TypeError(c)};var ae=(c,i,e)=>i in c?se(c,i,{enumerable:true,configurable:true,writable:true,value:e}):c[i]=e;var _=(c,i,e)=>ae(c,typeof i!="symbol"?i+"":i,e),Yt=(c,i,e)=>i.has(c)||Xt("Cannot "+e);var t=(c,i,e)=>(Yt(c,i,"read from private field"),e?e.call(c):i.get(c)),m=(c,i,e)=>i.has(c)?Xt("Cannot add the same private member more than once"):i instanceof WeakSet?i.add(c):i.set(c,e),f=(c,i,e,r)=>(Yt(c,i,"write to private field"),i.set(c,e),e),h=(c,i,e)=>(Yt(c,i,"access private method"),e);var Mt=(c,i,e,r)=>({set _(a){f(c,i,a);},get _(){return t(c,i,r)}});var st="storage",ut="temp",Ft="flags",z={CHARACTER_CATEGORY_KEY:"character"};var oe=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,Zt=new Set,Kt=typeof process=="object"&&process?process:{},te=(c,i,e,r)=>{typeof Kt.emitWarning=="function"?Kt.emitWarning(c,i,e,r):console.error(`[${e}] ${i}: ${c}`);},Ut=globalThis.AbortController,Jt=globalThis.AbortSignal;if(typeof Ut>"u"){Jt=class{constructor(){_(this,"onabort");_(this,"_onabort",[]);_(this,"reason");_(this,"aborted",false);}addEventListener(e,r){this._onabort.push(r);}},Ut=class{constructor(){_(this,"signal",new Jt);i();}abort(e){if(!this.signal.aborted){this.signal.reason=e,this.signal.aborted=true;for(let r of this.signal._onabort)r(e);this.signal.onabort?.(e);}}};let c=Kt.env?.LRU_CACHE_IGNORE_AC_WARNING!=="1",i=()=>{c&&(c=false,te("AbortController is not defined. If using lru-cache in node 14, load an AbortController polyfill from the `node-abort-controller` package. A minimal polyfill is provided for use by LRUCache.fetch(), but it should not be relied upon in other contexts (eg, passing it to other APIs that use AbortController/AbortSignal might have undesirable effects). You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.","NO_ABORT_CONTROLLER","ENOTSUP",i));};}var ne=c=>!Zt.has(c);var at=c=>c&&c===Math.floor(c)&&c>0&&isFinite(c),ee=c=>at(c)?c<=Math.pow(2,8)?Uint8Array:c<=Math.pow(2,16)?Uint16Array:c<=Math.pow(2,32)?Uint32Array:c<=Number.MAX_SAFE_INTEGER?Gt:null:null,Gt=class extends Array{constructor(c){super(c),this.fill(0);}},it,St,le=(it=class{constructor(i,e){_(this,"heap");_(this,"length");if(!t(it,St))throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new e(i),this.length=0;}static create(i){let e=ee(i);if(!e)return [];f(it,St,true);let r=new it(i,e);return f(it,St,false),r}push(i){this.heap[this.length++]=i;}pop(){return this.heap[--this.length]}},St=new WeakMap,m(it,St,false),it),qt,Qt,j,P,k,ft,B,Et,Tt,X,C,J,R,w,g,V,Y,M,D,q,N,Q,Z,K,W,tt,ht,L,yt,n,Wt,gt,rt,Ct,H,re,dt,bt,It,ot,nt,Ht,Vt,Lt,v,$t,Rt,lt,jt,At,ie=(At=class{constructor(i){m(this,n);m(this,j);m(this,P);m(this,k);m(this,ft);m(this,B);m(this,Et);m(this,Tt);m(this,X);_(this,"ttl");_(this,"ttlResolution");_(this,"ttlAutopurge");_(this,"updateAgeOnGet");_(this,"updateAgeOnHas");_(this,"allowStale");_(this,"noDisposeOnSet");_(this,"noUpdateTTL");_(this,"maxEntrySize");_(this,"sizeCalculation");_(this,"noDeleteOnFetchRejection");_(this,"noDeleteOnStaleGet");_(this,"allowStaleOnFetchAbort");_(this,"allowStaleOnFetchRejection");_(this,"ignoreFetchAbort");m(this,C);m(this,J);m(this,R);m(this,w);m(this,g);m(this,V);m(this,Y);m(this,M);m(this,D);m(this,q);m(this,N);m(this,Q);m(this,Z);m(this,K);m(this,W);m(this,tt);m(this,ht);m(this,L);m(this,yt);m(this,gt,()=>{});m(this,rt,()=>{});m(this,Ct,()=>{});m(this,H,()=>false);m(this,dt,i=>{});m(this,bt,(i,e,r)=>{});m(this,It,(i,e,r,a)=>{if(r||a)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0});_(this,qt,"LRUCache");let{max:e=0,ttl:r,ttlResolution:a=1,ttlAutopurge:o,updateAgeOnGet:s,updateAgeOnHas:l,allowStale:u,dispose:E,onInsert:I,disposeAfter:d,noDisposeOnSet:b,noUpdateTTL:y,maxSize:T=0,maxEntrySize:A=0,sizeCalculation:O,fetchMethod:p,memoMethod:F,noDeleteOnFetchRejection:U,noDeleteOnStaleGet:G,allowStaleOnFetchRejection:x,allowStaleOnFetchAbort:xt,ignoreFetchAbort:pt,perf:_t}=i;if(_t!==void 0&&typeof _t?.now!="function")throw new TypeError("perf option must have a now() method if specified");if(f(this,X,_t??oe),e!==0&&!at(e))throw new TypeError("max option must be a nonnegative integer");let mt=e?ee(e):Array;if(!mt)throw new Error("invalid max value: "+e);if(f(this,j,e),f(this,P,T),this.maxEntrySize=A||t(this,P),this.sizeCalculation=O,this.sizeCalculation){if(!t(this,P)&&!this.maxEntrySize)throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if(typeof this.sizeCalculation!="function")throw new TypeError("sizeCalculation set to non-function")}if(F!==void 0&&typeof F!="function")throw new TypeError("memoMethod must be a function if defined");if(f(this,Tt,F),p!==void 0&&typeof p!="function")throw new TypeError("fetchMethod must be a function if specified");if(f(this,Et,p),f(this,ht,!!p),f(this,R,new Map),f(this,w,new Array(e).fill(void 0)),f(this,g,new Array(e).fill(void 0)),f(this,V,new mt(e)),f(this,Y,new mt(e)),f(this,M,0),f(this,D,0),f(this,q,le.create(e)),f(this,C,0),f(this,J,0),typeof E=="function"&&f(this,k,E),typeof I=="function"&&f(this,ft,I),typeof d=="function"?(f(this,B,d),f(this,N,[])):(f(this,B,void 0),f(this,N,void 0)),f(this,tt,!!t(this,k)),f(this,yt,!!t(this,ft)),f(this,L,!!t(this,B)),this.noDisposeOnSet=!!b,this.noUpdateTTL=!!y,this.noDeleteOnFetchRejection=!!U,this.allowStaleOnFetchRejection=!!x,this.allowStaleOnFetchAbort=!!xt,this.ignoreFetchAbort=!!pt,this.maxEntrySize!==0){if(t(this,P)!==0&&!at(t(this,P)))throw new TypeError("maxSize must be a positive integer if specified");if(!at(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");h(this,n,re).call(this);}if(this.allowStale=!!u,this.noDeleteOnStaleGet=!!G,this.updateAgeOnGet=!!s,this.updateAgeOnHas=!!l,this.ttlResolution=at(a)||a===0?a:1,this.ttlAutopurge=!!o,this.ttl=r||0,this.ttl){if(!at(this.ttl))throw new TypeError("ttl must be a positive integer if specified");h(this,n,Wt).call(this);}if(t(this,j)===0&&this.ttl===0&&t(this,P)===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!t(this,j)&&!t(this,P)){let Pt="LRU_CACHE_UNBOUNDED";ne(Pt)&&(Zt.add(Pt),te("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",Pt,At));}}get perf(){return t(this,X)}static unsafeExposeInternals(i){return {starts:t(i,Z),ttls:t(i,K),autopurgeTimers:t(i,W),sizes:t(i,Q),keyMap:t(i,R),keyList:t(i,w),valList:t(i,g),next:t(i,V),prev:t(i,Y),get head(){return t(i,M)},get tail(){return t(i,D)},free:t(i,q),isBackgroundFetch:e=>{var r;return h(r=i,n,v).call(r,e)},backgroundFetch:(e,r,a,o)=>{var s;return h(s=i,n,Lt).call(s,e,r,a,o)},moveToTail:e=>{var r;return h(r=i,n,Rt).call(r,e)},indexes:e=>{var r;return h(r=i,n,ot).call(r,e)},rindexes:e=>{var r;return h(r=i,n,nt).call(r,e)},isStale:e=>{var r;return t(r=i,H).call(r,e)}}}get max(){return t(this,j)}get maxSize(){return t(this,P)}get calculatedSize(){return t(this,J)}get size(){return t(this,C)}get fetchMethod(){return t(this,Et)}get memoMethod(){return t(this,Tt)}get dispose(){return t(this,k)}get onInsert(){return t(this,ft)}get disposeAfter(){return t(this,B)}getRemainingTTL(i){return t(this,R).has(i)?1/0:0}*entries(){for(let i of h(this,n,ot).call(this))t(this,g)[i]!==void 0&&t(this,w)[i]!==void 0&&!h(this,n,v).call(this,t(this,g)[i])&&(yield [t(this,w)[i],t(this,g)[i]]);}*rentries(){for(let i of h(this,n,nt).call(this))t(this,g)[i]!==void 0&&t(this,w)[i]!==void 0&&!h(this,n,v).call(this,t(this,g)[i])&&(yield [t(this,w)[i],t(this,g)[i]]);}*keys(){for(let i of h(this,n,ot).call(this)){let e=t(this,w)[i];e!==void 0&&!h(this,n,v).call(this,t(this,g)[i])&&(yield e);}}*rkeys(){for(let i of h(this,n,nt).call(this)){let e=t(this,w)[i];e!==void 0&&!h(this,n,v).call(this,t(this,g)[i])&&(yield e);}}*values(){for(let i of h(this,n,ot).call(this))t(this,g)[i]!==void 0&&!h(this,n,v).call(this,t(this,g)[i])&&(yield t(this,g)[i]);}*rvalues(){for(let i of h(this,n,nt).call(this))t(this,g)[i]!==void 0&&!h(this,n,v).call(this,t(this,g)[i])&&(yield t(this,g)[i]);}[(Qt=Symbol.iterator,qt=Symbol.toStringTag,Qt)](){return this.entries()}find(i,e={}){for(let r of h(this,n,ot).call(this)){let a=t(this,g)[r],o=h(this,n,v).call(this,a)?a.__staleWhileFetching:a;if(o!==void 0&&i(o,t(this,w)[r],this))return this.get(t(this,w)[r],e)}}forEach(i,e=this){for(let r of h(this,n,ot).call(this)){let a=t(this,g)[r],o=h(this,n,v).call(this,a)?a.__staleWhileFetching:a;o!==void 0&&i.call(e,o,t(this,w)[r],this);}}rforEach(i,e=this){for(let r of h(this,n,nt).call(this)){let a=t(this,g)[r],o=h(this,n,v).call(this,a)?a.__staleWhileFetching:a;o!==void 0&&i.call(e,o,t(this,w)[r],this);}}purgeStale(){let i=false;for(let e of h(this,n,nt).call(this,{allowStale:true}))t(this,H).call(this,e)&&(h(this,n,lt).call(this,t(this,w)[e],"expire"),i=true);return i}info(i){let e=t(this,R).get(i);if(e===void 0)return;let r=t(this,g)[e],a=h(this,n,v).call(this,r)?r.__staleWhileFetching:r;if(a===void 0)return;let o={value:a};if(t(this,K)&&t(this,Z)){let s=t(this,K)[e],l=t(this,Z)[e];if(s&&l){let u=s-(t(this,X).now()-l);o.ttl=u,o.start=Date.now();}}return t(this,Q)&&(o.size=t(this,Q)[e]),o}dump(){let i=[];for(let e of h(this,n,ot).call(this,{allowStale:true})){let r=t(this,w)[e],a=t(this,g)[e],o=h(this,n,v).call(this,a)?a.__staleWhileFetching:a;if(o===void 0||r===void 0)continue;let s={value:o};if(t(this,K)&&t(this,Z)){s.ttl=t(this,K)[e];let l=t(this,X).now()-t(this,Z)[e];s.start=Math.floor(Date.now()-l);}t(this,Q)&&(s.size=t(this,Q)[e]),i.unshift([r,s]);}return i}load(i){this.clear();for(let[e,r]of i){if(r.start){let a=Date.now()-r.start;r.start=t(this,X).now()-a;}this.set(e,r.value,r);}}set(i,e,r={}){var b,y,T,A;if(e===void 0)return this.delete(i),this;let{ttl:a=this.ttl,start:o,noDisposeOnSet:s=this.noDisposeOnSet,sizeCalculation:l=this.sizeCalculation,status:u}=r,{noUpdateTTL:E=this.noUpdateTTL}=r,I=t(this,It).call(this,i,e,r.size||0,l);if(this.maxEntrySize&&I>this.maxEntrySize)return u&&(u.set="miss",u.maxEntrySizeExceeded=true),h(this,n,lt).call(this,i,"set"),this;let d=t(this,C)===0?void 0:t(this,R).get(i);if(d===void 0)d=t(this,C)===0?t(this,D):t(this,q).length!==0?t(this,q).pop():t(this,C)===t(this,j)?h(this,n,Vt).call(this,false):t(this,C),t(this,w)[d]=i,t(this,g)[d]=e,t(this,R).set(i,d),t(this,V)[t(this,D)]=d,t(this,Y)[d]=t(this,D),f(this,D,d),Mt(this,C)._++,t(this,bt).call(this,d,I,u),u&&(u.set="add"),E=false,t(this,yt)&&((b=t(this,ft))==null||b.call(this,e,i,"add"));else {h(this,n,Rt).call(this,d);let O=t(this,g)[d];if(e!==O){if(t(this,ht)&&h(this,n,v).call(this,O)){O.__abortController.abort(new Error("replaced"));let{__staleWhileFetching:p}=O;p!==void 0&&!s&&(t(this,tt)&&((y=t(this,k))==null||y.call(this,p,i,"set")),t(this,L)&&t(this,N)?.push([p,i,"set"]));}else s||(t(this,tt)&&((T=t(this,k))==null||T.call(this,O,i,"set")),t(this,L)&&t(this,N)?.push([O,i,"set"]));if(t(this,dt).call(this,d),t(this,bt).call(this,d,I,u),t(this,g)[d]=e,u){u.set="replace";let p=O&&h(this,n,v).call(this,O)?O.__staleWhileFetching:O;p!==void 0&&(u.oldValue=p);}}else u&&(u.set="update");t(this,yt)&&this.onInsert?.(e,i,e===O?"update":"replace");}if(a!==0&&!t(this,K)&&h(this,n,Wt).call(this),t(this,K)&&(E||t(this,Ct).call(this,d,a,o),u&&t(this,rt).call(this,u,d)),!s&&t(this,L)&&t(this,N)){let O=t(this,N),p;for(;p=O?.shift();)(A=t(this,B))==null||A.call(this,...p);}return this}pop(){var i;try{for(;t(this,C);){let e=t(this,g)[t(this,M)];if(h(this,n,Vt).call(this,!0),h(this,n,v).call(this,e)){if(e.__staleWhileFetching)return e.__staleWhileFetching}else if(e!==void 0)return e}}finally{if(t(this,L)&&t(this,N)){let e=t(this,N),r;for(;r=e?.shift();)(i=t(this,B))==null||i.call(this,...r);}}}has(i,e={}){let{updateAgeOnHas:r=this.updateAgeOnHas,status:a}=e,o=t(this,R).get(i);if(o!==void 0){let s=t(this,g)[o];if(h(this,n,v).call(this,s)&&s.__staleWhileFetching===void 0)return false;if(t(this,H).call(this,o))a&&(a.has="stale",t(this,rt).call(this,a,o));else return r&&t(this,gt).call(this,o),a&&(a.has="hit",t(this,rt).call(this,a,o)),true}else a&&(a.has="miss");return false}peek(i,e={}){let{allowStale:r=this.allowStale}=e,a=t(this,R).get(i);if(a===void 0||!r&&t(this,H).call(this,a))return;let o=t(this,g)[a];return h(this,n,v).call(this,o)?o.__staleWhileFetching:o}async fetch(i,e={}){let{allowStale:r=this.allowStale,updateAgeOnGet:a=this.updateAgeOnGet,noDeleteOnStaleGet:o=this.noDeleteOnStaleGet,ttl:s=this.ttl,noDisposeOnSet:l=this.noDisposeOnSet,size:u=0,sizeCalculation:E=this.sizeCalculation,noUpdateTTL:I=this.noUpdateTTL,noDeleteOnFetchRejection:d=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:b=this.allowStaleOnFetchRejection,ignoreFetchAbort:y=this.ignoreFetchAbort,allowStaleOnFetchAbort:T=this.allowStaleOnFetchAbort,context:A,forceRefresh:O=false,status:p,signal:F}=e;if(!t(this,ht))return p&&(p.fetch="get"),this.get(i,{allowStale:r,updateAgeOnGet:a,noDeleteOnStaleGet:o,status:p});let U={allowStale:r,updateAgeOnGet:a,noDeleteOnStaleGet:o,ttl:s,noDisposeOnSet:l,size:u,sizeCalculation:E,noUpdateTTL:I,noDeleteOnFetchRejection:d,allowStaleOnFetchRejection:b,allowStaleOnFetchAbort:T,ignoreFetchAbort:y,status:p,signal:F},G=t(this,R).get(i);if(G===void 0){p&&(p.fetch="miss");let x=h(this,n,Lt).call(this,i,G,U,A);return x.__returned=x}else {let x=t(this,g)[G];if(h(this,n,v).call(this,x)){let mt=r&&x.__staleWhileFetching!==void 0;return p&&(p.fetch="inflight",mt&&(p.returnedStale=true)),mt?x.__staleWhileFetching:x.__returned=x}let xt=t(this,H).call(this,G);if(!O&&!xt)return p&&(p.fetch="hit"),h(this,n,Rt).call(this,G),a&&t(this,gt).call(this,G),p&&t(this,rt).call(this,p,G),x;let pt=h(this,n,Lt).call(this,i,G,U,A),_t=pt.__staleWhileFetching!==void 0&&r;return p&&(p.fetch=xt?"stale":"refresh",_t&&xt&&(p.returnedStale=true)),_t?pt.__staleWhileFetching:pt.__returned=pt}}async forceFetch(i,e={}){let r=await this.fetch(i,e);if(r===void 0)throw new Error("fetch() returned undefined");return r}memo(i,e={}){let r=t(this,Tt);if(!r)throw new Error("no memoMethod provided to constructor");let{context:a,forceRefresh:o,...s}=e,l=this.get(i,s);if(!o&&l!==void 0)return l;let u=r(i,l,{options:s,context:a});return this.set(i,u,s),u}get(i,e={}){let{allowStale:r=this.allowStale,updateAgeOnGet:a=this.updateAgeOnGet,noDeleteOnStaleGet:o=this.noDeleteOnStaleGet,status:s}=e,l=t(this,R).get(i);if(l!==void 0){let u=t(this,g)[l],E=h(this,n,v).call(this,u);return s&&t(this,rt).call(this,s,l),t(this,H).call(this,l)?(s&&(s.get="stale"),E?(s&&r&&u.__staleWhileFetching!==void 0&&(s.returnedStale=true),r?u.__staleWhileFetching:void 0):(o||h(this,n,lt).call(this,i,"expire"),s&&r&&(s.returnedStale=true),r?u:void 0)):(s&&(s.get="hit"),E?u.__staleWhileFetching:(h(this,n,Rt).call(this,l),a&&t(this,gt).call(this,l),u))}else s&&(s.get="miss");}delete(i){return h(this,n,lt).call(this,i,"delete")}clear(){return h(this,n,jt).call(this,"delete")}},j=new WeakMap,P=new WeakMap,k=new WeakMap,ft=new WeakMap,B=new WeakMap,Et=new WeakMap,Tt=new WeakMap,X=new WeakMap,C=new WeakMap,J=new WeakMap,R=new WeakMap,w=new WeakMap,g=new WeakMap,V=new WeakMap,Y=new WeakMap,M=new WeakMap,D=new WeakMap,q=new WeakMap,N=new WeakMap,Q=new WeakMap,Z=new WeakMap,K=new WeakMap,W=new WeakMap,tt=new WeakMap,ht=new WeakMap,L=new WeakMap,yt=new WeakMap,n=new WeakSet,Wt=function(){let i=new Gt(t(this,j)),e=new Gt(t(this,j));f(this,K,i),f(this,Z,e);let r=this.ttlAutopurge?new Array(t(this,j)):void 0;f(this,W,r),f(this,Ct,(l,u,E=t(this,X).now())=>{e[l]=u!==0?E:0,i[l]=u,a(l,u);}),f(this,gt,l=>{e[l]=i[l]!==0?t(this,X).now():0,a(l,i[l]);});let a=this.ttlAutopurge?(l,u)=>{if(r?.[l]&&(clearTimeout(r[l]),r[l]=void 0),u&&u!==0&&r){let E=setTimeout(()=>{t(this,H).call(this,l)&&h(this,n,lt).call(this,t(this,w)[l],"expire");},u+1);E.unref&&E.unref(),r[l]=E;}}:()=>{};f(this,rt,(l,u)=>{if(i[u]){let E=i[u],I=e[u];if(!E||!I)return;l.ttl=E,l.start=I,l.now=o||s();let d=l.now-I;l.remainingTTL=E-d;}});let o=0,s=()=>{let l=t(this,X).now();if(this.ttlResolution>0){o=l;let u=setTimeout(()=>o=0,this.ttlResolution);u.unref&&u.unref();}return l};this.getRemainingTTL=l=>{let u=t(this,R).get(l);if(u===void 0)return 0;let E=i[u],I=e[u];if(!E||!I)return 1/0;let d=(o||s())-I;return E-d},f(this,H,l=>{let u=e[l],E=i[l];return !!E&&!!u&&(o||s())-u>E});},gt=new WeakMap,rt=new WeakMap,Ct=new WeakMap,H=new WeakMap,re=function(){let i=new Gt(t(this,j));f(this,J,0),f(this,Q,i),f(this,dt,e=>{f(this,J,t(this,J)-i[e]),i[e]=0;}),f(this,It,(e,r,a,o)=>{if(h(this,n,v).call(this,r))return 0;if(!at(a))if(o){if(typeof o!="function")throw new TypeError("sizeCalculation must be a function");if(a=o(r,e),!at(a))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}else throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");return a}),f(this,bt,(e,r,a)=>{if(i[e]=r,t(this,P)){let o=t(this,P)-i[e];for(;t(this,J)>o;)h(this,n,Vt).call(this,true);}f(this,J,t(this,J)+i[e]),a&&(a.entrySize=r,a.totalCalculatedSize=t(this,J));});},dt=new WeakMap,bt=new WeakMap,It=new WeakMap,ot=function*({allowStale:i=this.allowStale}={}){if(t(this,C))for(let e=t(this,D);!(!h(this,n,Ht).call(this,e)||((i||!t(this,H).call(this,e))&&(yield e),e===t(this,M)));)e=t(this,Y)[e];},nt=function*({allowStale:i=this.allowStale}={}){if(t(this,C))for(let e=t(this,M);!(!h(this,n,Ht).call(this,e)||((i||!t(this,H).call(this,e))&&(yield e),e===t(this,D)));)e=t(this,V)[e];},Ht=function(i){return i!==void 0&&t(this,R).get(t(this,w)[i])===i},Vt=function(i){var o;let e=t(this,M),r=t(this,w)[e],a=t(this,g)[e];return t(this,ht)&&h(this,n,v).call(this,a)?a.__abortController.abort(new Error("evicted")):(t(this,tt)||t(this,L))&&(t(this,tt)&&((o=t(this,k))==null||o.call(this,a,r,"evict")),t(this,L)&&t(this,N)?.push([a,r,"evict"])),t(this,dt).call(this,e),t(this,W)?.[e]&&(clearTimeout(t(this,W)[e]),t(this,W)[e]=void 0),i&&(t(this,w)[e]=void 0,t(this,g)[e]=void 0,t(this,q).push(e)),t(this,C)===1?(f(this,M,f(this,D,0)),t(this,q).length=0):f(this,M,t(this,V)[e]),t(this,R).delete(r),Mt(this,C)._--,e},Lt=function(i,e,r,a){let o=e===void 0?void 0:t(this,g)[e];if(h(this,n,v).call(this,o))return o;let s=new Ut,{signal:l}=r;l?.addEventListener("abort",()=>s.abort(l.reason),{signal:s.signal});let u={signal:s.signal,options:r,context:a},E=(A,O=false)=>{let{aborted:p}=s.signal,F=r.ignoreFetchAbort&&A!==void 0,U=r.ignoreFetchAbort||!!(r.allowStaleOnFetchAbort&&A!==void 0);if(r.status&&(p&&!O?(r.status.fetchAborted=true,r.status.fetchError=s.signal.reason,F&&(r.status.fetchAbortIgnored=true)):r.status.fetchResolved=true),p&&!F&&!O)return d(s.signal.reason,U);let G=y,x=t(this,g)[e];return (x===y||F&&O&&x===void 0)&&(A===void 0?G.__staleWhileFetching!==void 0?t(this,g)[e]=G.__staleWhileFetching:h(this,n,lt).call(this,i,"fetch"):(r.status&&(r.status.fetchUpdated=true),this.set(i,A,u.options))),A},I=A=>(r.status&&(r.status.fetchRejected=true,r.status.fetchError=A),d(A,false)),d=(A,O)=>{let{aborted:p}=s.signal,F=p&&r.allowStaleOnFetchAbort,U=F||r.allowStaleOnFetchRejection,G=U||r.noDeleteOnFetchRejection,x=y;if(t(this,g)[e]===y&&(!G||!O&&x.__staleWhileFetching===void 0?h(this,n,lt).call(this,i,"fetch"):F||(t(this,g)[e]=x.__staleWhileFetching)),U)return r.status&&x.__staleWhileFetching!==void 0&&(r.status.returnedStale=true),x.__staleWhileFetching;if(x.__returned===x)throw A},b=(A,O)=>{var F;let p=(F=t(this,Et))==null?void 0:F.call(this,i,o,u);p&&p instanceof Promise&&p.then(U=>A(U===void 0?void 0:U),O),s.signal.addEventListener("abort",()=>{(!r.ignoreFetchAbort||r.allowStaleOnFetchAbort)&&(A(void 0),r.allowStaleOnFetchAbort&&(A=U=>E(U,true)));});};r.status&&(r.status.fetchDispatched=true);let y=new Promise(b).then(E,I),T=Object.assign(y,{__abortController:s,__staleWhileFetching:o,__returned:void 0});return e===void 0?(this.set(i,T,{...u.options,status:void 0}),e=t(this,R).get(i)):t(this,g)[e]=T,T},v=function(i){if(!t(this,ht))return false;let e=i;return !!e&&e instanceof Promise&&e.hasOwnProperty("__staleWhileFetching")&&e.__abortController instanceof Ut},$t=function(i,e){t(this,Y)[e]=i,t(this,V)[i]=e;},Rt=function(i){i!==t(this,D)&&(i===t(this,M)?f(this,M,t(this,V)[i]):h(this,n,$t).call(this,t(this,Y)[i],t(this,V)[i]),h(this,n,$t).call(this,t(this,D),i),f(this,D,i));},lt=function(i,e){var a,o;let r=false;if(t(this,C)!==0){let s=t(this,R).get(i);if(s!==void 0)if(t(this,W)?.[s]&&(clearTimeout(t(this,W)?.[s]),t(this,W)[s]=void 0),r=true,t(this,C)===1)h(this,n,jt).call(this,e);else {t(this,dt).call(this,s);let l=t(this,g)[s];if(h(this,n,v).call(this,l)?l.__abortController.abort(new Error("deleted")):(t(this,tt)||t(this,L))&&(t(this,tt)&&((a=t(this,k))==null||a.call(this,l,i,e)),t(this,L)&&t(this,N)?.push([l,i,e])),t(this,R).delete(i),t(this,w)[s]=void 0,t(this,g)[s]=void 0,s===t(this,D))f(this,D,t(this,Y)[s]);else if(s===t(this,M))f(this,M,t(this,V)[s]);else {let u=t(this,Y)[s];t(this,V)[u]=t(this,V)[s];let E=t(this,V)[s];t(this,Y)[E]=t(this,Y)[s];}Mt(this,C)._--,t(this,q).push(s);}}if(t(this,L)&&t(this,N)?.length){let s=t(this,N),l;for(;l=s?.shift();)(o=t(this,B))==null||o.call(this,...l);}return r},jt=function(i){var e,r;for(let a of h(this,n,nt).call(this,{allowStale:true})){let o=t(this,g)[a];if(h(this,n,v).call(this,o))o.__abortController.abort(new Error("deleted"));else {let s=t(this,w)[a];t(this,tt)&&((e=t(this,k))==null||e.call(this,o,s,i)),t(this,L)&&t(this,N)?.push([o,s,i]);}}if(t(this,R).clear(),t(this,g).fill(void 0),t(this,w).fill(void 0),t(this,K)&&t(this,Z)){t(this,K).fill(0),t(this,Z).fill(0);for(let a of t(this,W)??[])a!==void 0&&clearTimeout(a);t(this,W)?.fill(void 0);}if(t(this,Q)&&t(this,Q).fill(0),f(this,M,0),f(this,D,0),t(this,q).length=0,f(this,J,0),f(this,C,0),t(this,L)&&t(this,N)){let a=t(this,N),o;for(;o=a?.shift();)(r=t(this,B))==null||r.call(this,...o);}},At);var ct=class{constructor(i){_(this,"cache");_(this,"map",new Map);this.cache=new ie({max:i.cacheSize}),this.map=new Map;}get[Symbol.iterator](){return this.map[Symbol.iterator]}get[Symbol.toStringTag](){return this.map[Symbol.toStringTag]}clear(){this.cache.clear(),this.map.clear();}delete(i){let e=this.map.delete(i);return e&&this.cache.delete(i),e}get forEach(){return this.map.forEach}get(i){let e=this.cache.get(i);return e||this.map.get(i)}has(i){return this.map.has(i)}set(i,e){return this.map.set(i,e),this.cache.set(i,e),this}get size(){return this.map.size}entries(){return this.map.entries()}keys(){return this.map.keys()}values(){return this.map.values()}};var et;(a=>(a.log=(o,...s)=>console.log(`[Pixi\u2019VN] ${o}`,...s),a.warn=(o,...s)=>console.warn(`[Pixi\u2019VN] ${o}`,...s),a.error=(o,...s)=>console.error(`[Pixi\u2019VN] ${o}`,...s),a.info=(o,...s)=>console.info(`[Pixi\u2019VN] ${o}`,...s)))(et||(et={}));function Dt(c){try{if(typeof c>"u")return c;let i=JSON.stringify(c);return JSON.parse(i)}catch(i){throw et.error("Error creating exportable element",c,i),new core.PixiError("not_json_serializable","Error creating exportable element")}}var kt;(d=>{d.storage=new ct({cacheSize:50}),d.defaultStorage=new ct({cacheSize:10}),d.tempStorageDeadlines=new Map;let r;function a(b){d.tempStorageDeadlines.forEach((y,T)=>{y>b&&(d.storage.delete(`${ut}:${T}`),r?.onClearOldTempVariable?.(T),d.tempStorageDeadlines.delete(T));});}d.clearOldTempVariables=a;function o(b){r=b;}d.setExternalStoreHandler=o;function s(b,y,T){T==null?d.storage.delete(`${b}:${y}`):d.storage.set(`${b}:${y}`,T),r?.onSetVariable?.(y,T);}d.setVariable=s;function l(b,y){let T=d.storage.get(`${b}:${y}`);return Dt(T)}d.getVariable=l;function u(b,y){d.storage.delete(`${b}:${y}`),r?.onRemoveVariable?.(y);}d.removeVariable=u;function E(b,y){let T=d.storage.get(Ft)||[];if(y)T.includes(b)||T.push(b);else {let A=T.indexOf(b);A>-1&&T.splice(A,1);}d.storage.set(Ft,T);}d.setFlag=E;function I(b){return (d.storage.get(Ft)||[]).includes(b)}d.getFlag=I;})(kt||(kt={}));var S=kt;var Ot=class{constructor(i,e){_(this,"id");_(this,"categoryId");this.categoryId=i,this.id=e,this.migrateOldStorage();}migrateOldStorage(i=this.categoryId){let e=S.getVariable(st,i);e&&(Object.entries(e).forEach(([r,a])=>{typeof a=="object"&&a!==null&&Object.entries(a).forEach(([o,s])=>{S.setVariable(this.categoryId,`${r}:${o}`,s);});}),S.removeVariable(st,i));}setStorageProperty(i,e){S.setVariable(this.categoryId,`${this.id}:${i}`,e);}getStorageProperty(i,e=this.id){return S.getVariable(this.categoryId,`${e}:${i}`)}};var ue="@",vt=class extends Ot{constructor(e,r=""){super(z.CHARACTER_CATEGORY_KEY,e+(r?ue+r:""));_(this,"sourceId");this.sourceId=e,this.migrateOldStorage("___character___");}getStorageProperty(e){let r=super.getStorageProperty(e);return r===void 0&&(r=super.getStorageProperty(e,this.sourceId)),r}};var zt=class extends vt{constructor(e,r){super(typeof e=="string"?e:e.id,typeof e=="string"?"":e.emotion);_(this,"defaultName");_(this,"defaultSurname");_(this,"defaultAge");_(this,"icon");_(this,"color");this.defaultName=r.name,this.defaultSurname=r.surname,this.defaultAge=r.age,this.icon=r.icon,this.color=r.color;}get name(){return this.getStorageProperty("name")||this.defaultName||this.id}set name(e){this.setStorageProperty("name",e);}get surname(){return this.getStorageProperty("surname")||this.defaultSurname}set surname(e){this.setStorageProperty("surname",e);}get age(){return this.getStorageProperty("age")||this.defaultAge}set age(e){this.setStorageProperty("age",e);}};var wt=new ct({cacheSize:10}),Bt;(o=>{function c(s){try{let l=wt.get(s);if(!l){et.warn(`Character "${s}" not found, did you forget to register it with the RegisteredCharacters.add?`);return}return l}catch(l){et.error(`Error while getting Character "${s}"`,l);return}}o.get=c;function i(s){if(Array.isArray(s)){s.forEach(l=>{i(l);});return}wt.get(s.id)&&et.info(`Character id "${s.id}" already exists, it will be overwritten`),wt.set(s.id,s);}o.add=i;function e(){return Array.from(wt.values())}o.values=e;function r(s){return wt.has(s)}o.has=r;function a(){return Array.from(wt.keys())}o.keys=a;})(Bt||(Bt={}));var fe=Bt;exports.CharacterBaseModel=zt;exports.CharacterStoredClass=vt;exports.RegisteredCharacters=fe;
@@ -1,37 +1,45 @@
1
- import { S as StoredClassModel } from './StoredClassModel-LtyakzOw.cjs';
1
+ import { S as StoredClassModel } from './StoredClassModel-C9mQxPg-.cjs';
2
2
  import { CharacterInterface as CharacterInterface$1 } from '@drincs/pixi-vn';
3
- import './StorageElementType-DkJ394kq.cjs';
3
+ import './StorageElementType-C7ETezlL.cjs';
4
+
5
+ declare class CharacterStoredClass extends StoredClassModel {
6
+ private sourceId;
7
+ constructor(id: string, emotion?: string);
8
+ getStorageProperty<T>(propertyName: string): T | undefined;
9
+ }
4
10
 
5
11
  /**
6
12
  * CharacterBaseModelProps is an interface that is used to create a character model.
7
13
  */
8
14
  interface CharacterBaseModelProps {
9
15
  /**
10
- * The name of the character.
16
+ * The character's name.
11
17
  */
12
18
  name?: string;
13
19
  /**
14
- * The surname of the character.
20
+ * The character's surname.
15
21
  */
16
22
  surname?: string;
17
23
  /**
18
- * The age of the character.
24
+ * The character's age.
19
25
  */
20
26
  age?: number;
21
27
  /**
22
- * The icon of the character.
28
+ * The character's icon image URL.
23
29
  */
24
30
  icon?: string;
25
31
  /**
26
- * The color of the character.
32
+ * The character's color.
27
33
  */
28
34
  color?: string;
29
35
  }
30
36
 
31
- declare class CharacterStoredClass extends StoredClassModel {
32
- private sourceId;
33
- constructor(id: string, emotion?: string);
34
- getStorageProperty<T>(propertyName: string): T | undefined;
37
+ /**
38
+ * CharacterEmotionId is used to identify a character together with an emotion.
39
+ */
40
+ interface CharacterEmotionId {
41
+ id: string;
42
+ emotion: string;
35
43
  }
36
44
 
37
45
  /**
@@ -39,64 +47,63 @@ declare class CharacterStoredClass extends StoredClassModel {
39
47
  * You must use the {@link RegisteredCharacters.add} function to save the character in the game.
40
48
  * It is raccomended to create your own class Character, read more here: https://pixi-vn.web.app/start/character.html#custom-character
41
49
  * @example
42
- * ```typescript
43
- * export const liam = new CharacterBaseModel('liam', {
44
- * name: 'Liam',
45
- * surname: 'Smith',
50
+ * ```ts
51
+ * import { CharacterBaseModel, RegisteredCharacters } from "@drincs/pixi-vn";
52
+ *
53
+ * export const liam = new CharacterBaseModel("liam", {
54
+ * name: "Liam",
55
+ * surname: "Smith",
46
56
  * age: 25,
47
- * icon: "https://pixijs.com/assets/eggHead.png",
48
- * color: "#9e2e12"
57
+ * icon: "https://example.com/liam.png",
58
+ * color: "#9e2e12",
49
59
  * });
50
- * export const alice = new CharacterBaseModel('alice', {
51
- * name: 'Alice',
52
- * surname: 'Smith',
53
- * age: 25,
54
- * icon: "https://pixijs.com/assets/eggHead.png",
55
- * color: "#9e2e12"
60
+ *
61
+ * export const emma = new CharacterBaseModel("emma", {
62
+ * name: "Emma",
63
+ * surname: "Johnson",
64
+ * age: 23,
65
+ * icon: "https://example.com/emma.png",
66
+ * color: "#9e2e12",
56
67
  * });
57
- * RegisteredCharacters.add([liam, alice]);
68
+ *
69
+ * RegisteredCharacters.add([liam, emma]);
58
70
  * ```
59
71
  */
60
72
  declare class CharacterBaseModel extends CharacterStoredClass {
61
73
  /**
62
- * @param id The id of the character.
74
+ * @param id A unique identifier (string). It is used to reference the character in the game (must be unique). If you want to create a character with an "emotion", you can pass an object.
63
75
  * @param props The properties of the character.
64
76
  */
65
- constructor(id: string | {
66
- id: string;
67
- emotion: string;
68
- }, props: CharacterBaseModelProps);
69
- private defaultName?;
77
+ constructor(id: string | CharacterEmotionId, props: CharacterBaseModelProps);
78
+ readonly defaultName?: string;
70
79
  /***
71
80
  * The name of the character.
72
81
  * If you set undefined, it will return the default name.
73
82
  */
74
83
  get name(): string;
75
84
  set name(value: string | undefined);
76
- private defaultSurname?;
85
+ readonly defaultSurname?: string;
77
86
  /**
78
87
  * The surname of the character.
79
88
  * If you set undefined, it will return the default surname.
80
89
  */
81
90
  get surname(): string | undefined;
82
91
  set surname(value: string | undefined);
83
- private defaultAge?;
92
+ readonly defaultAge?: number | undefined;
84
93
  /**
85
94
  * The age of the character.
86
95
  * If you set undefined, it will return the default age.
87
96
  */
88
97
  get age(): number | undefined;
89
98
  set age(value: number | undefined);
90
- private _icon?;
91
99
  /**
92
100
  * The icon of the character.
93
101
  */
94
- get icon(): string | undefined;
95
- private _color?;
102
+ readonly icon?: string;
96
103
  /**
97
104
  * The color of the character.
98
105
  */
99
- get color(): string | undefined;
106
+ readonly color?: string | undefined;
100
107
  }
101
108
 
102
109
  declare namespace RegisteredCharacters {
@@ -167,38 +174,35 @@ declare namespace RegisteredCharacters {
167
174
  * this.defaultName = props.name
168
175
  * this.defaultSurname = props.surname
169
176
  * this.defaultAge = props.age
170
- * this._icon = props.icon
171
- * this._color = props.color
177
+ * this.icon = props.icon
178
+ * this.color = props.color
172
179
  * }
173
- * private defaultName: string = ""
180
+ * readonly defaultName: string = ""
174
181
  * get name(): string {
175
182
  * return this.getStorageProperty<string>("name") || this.defaultName
176
183
  * }
177
184
  * set name(value: string | undefined) {
178
- * this.setStorageProperty<string>("name", value)
185
+ * this.setStorageProperty("name", value)
179
186
  * }
180
- * private defaultSurname?: string
187
+ * readonly defaultSurname?: string
181
188
  * get surname(): string | undefined {
182
189
  * return this.getStorageProperty<string>("surname") || this.defaultSurname
183
190
  * }
184
191
  * set surname(value: string | undefined) {
185
- * this.setStorageProperty<string>("surname", value)
192
+ * this.setStorageProperty("surname", value)
186
193
  * }
187
- * private defaultAge?: number | undefined
194
+ * readonly defaultAge?: number | undefined
188
195
  * get age(): number | undefined {
189
196
  * return this.getStorageProperty<number>("age") || this.defaultAge
190
197
  * }
191
198
  * set age(value: number | undefined) {
192
- * this.setStorageProperty<number>("age", value)
199
+ * this.setStorageProperty("age", value)
193
200
  * }
194
- * private _icon?: string
201
+ * readonly icon?: string
195
202
  * get icon(): string | undefined {
196
203
  * return this._icon
197
204
  * }
198
- * private _color?: string | undefined
199
- * get color(): string | undefined {
200
- * return this._color
201
- * }
205
+ * readonly color?: string | undefined
202
206
  * }
203
207
  * ```
204
208
  */
@@ -209,4 +213,4 @@ interface CharacterInterface {
209
213
  id: string;
210
214
  }
211
215
 
212
- export { CharacterBaseModel, type CharacterInterface, CharacterStoredClass, RegisteredCharacters };
216
+ export { CharacterBaseModel, type CharacterEmotionId, type CharacterInterface, CharacterStoredClass, RegisteredCharacters };
@@ -1,37 +1,45 @@
1
- import { S as StoredClassModel } from './StoredClassModel-a4pvgJXD.js';
1
+ import { S as StoredClassModel } from './StoredClassModel-upXPNQTp.js';
2
2
  import { CharacterInterface as CharacterInterface$1 } from '@drincs/pixi-vn';
3
- import './StorageElementType-DkJ394kq.js';
3
+ import './StorageElementType-C7ETezlL.js';
4
+
5
+ declare class CharacterStoredClass extends StoredClassModel {
6
+ private sourceId;
7
+ constructor(id: string, emotion?: string);
8
+ getStorageProperty<T>(propertyName: string): T | undefined;
9
+ }
4
10
 
5
11
  /**
6
12
  * CharacterBaseModelProps is an interface that is used to create a character model.
7
13
  */
8
14
  interface CharacterBaseModelProps {
9
15
  /**
10
- * The name of the character.
16
+ * The character's name.
11
17
  */
12
18
  name?: string;
13
19
  /**
14
- * The surname of the character.
20
+ * The character's surname.
15
21
  */
16
22
  surname?: string;
17
23
  /**
18
- * The age of the character.
24
+ * The character's age.
19
25
  */
20
26
  age?: number;
21
27
  /**
22
- * The icon of the character.
28
+ * The character's icon image URL.
23
29
  */
24
30
  icon?: string;
25
31
  /**
26
- * The color of the character.
32
+ * The character's color.
27
33
  */
28
34
  color?: string;
29
35
  }
30
36
 
31
- declare class CharacterStoredClass extends StoredClassModel {
32
- private sourceId;
33
- constructor(id: string, emotion?: string);
34
- getStorageProperty<T>(propertyName: string): T | undefined;
37
+ /**
38
+ * CharacterEmotionId is used to identify a character together with an emotion.
39
+ */
40
+ interface CharacterEmotionId {
41
+ id: string;
42
+ emotion: string;
35
43
  }
36
44
 
37
45
  /**
@@ -39,64 +47,63 @@ declare class CharacterStoredClass extends StoredClassModel {
39
47
  * You must use the {@link RegisteredCharacters.add} function to save the character in the game.
40
48
  * It is raccomended to create your own class Character, read more here: https://pixi-vn.web.app/start/character.html#custom-character
41
49
  * @example
42
- * ```typescript
43
- * export const liam = new CharacterBaseModel('liam', {
44
- * name: 'Liam',
45
- * surname: 'Smith',
50
+ * ```ts
51
+ * import { CharacterBaseModel, RegisteredCharacters } from "@drincs/pixi-vn";
52
+ *
53
+ * export const liam = new CharacterBaseModel("liam", {
54
+ * name: "Liam",
55
+ * surname: "Smith",
46
56
  * age: 25,
47
- * icon: "https://pixijs.com/assets/eggHead.png",
48
- * color: "#9e2e12"
57
+ * icon: "https://example.com/liam.png",
58
+ * color: "#9e2e12",
49
59
  * });
50
- * export const alice = new CharacterBaseModel('alice', {
51
- * name: 'Alice',
52
- * surname: 'Smith',
53
- * age: 25,
54
- * icon: "https://pixijs.com/assets/eggHead.png",
55
- * color: "#9e2e12"
60
+ *
61
+ * export const emma = new CharacterBaseModel("emma", {
62
+ * name: "Emma",
63
+ * surname: "Johnson",
64
+ * age: 23,
65
+ * icon: "https://example.com/emma.png",
66
+ * color: "#9e2e12",
56
67
  * });
57
- * RegisteredCharacters.add([liam, alice]);
68
+ *
69
+ * RegisteredCharacters.add([liam, emma]);
58
70
  * ```
59
71
  */
60
72
  declare class CharacterBaseModel extends CharacterStoredClass {
61
73
  /**
62
- * @param id The id of the character.
74
+ * @param id A unique identifier (string). It is used to reference the character in the game (must be unique). If you want to create a character with an "emotion", you can pass an object.
63
75
  * @param props The properties of the character.
64
76
  */
65
- constructor(id: string | {
66
- id: string;
67
- emotion: string;
68
- }, props: CharacterBaseModelProps);
69
- private defaultName?;
77
+ constructor(id: string | CharacterEmotionId, props: CharacterBaseModelProps);
78
+ readonly defaultName?: string;
70
79
  /***
71
80
  * The name of the character.
72
81
  * If you set undefined, it will return the default name.
73
82
  */
74
83
  get name(): string;
75
84
  set name(value: string | undefined);
76
- private defaultSurname?;
85
+ readonly defaultSurname?: string;
77
86
  /**
78
87
  * The surname of the character.
79
88
  * If you set undefined, it will return the default surname.
80
89
  */
81
90
  get surname(): string | undefined;
82
91
  set surname(value: string | undefined);
83
- private defaultAge?;
92
+ readonly defaultAge?: number | undefined;
84
93
  /**
85
94
  * The age of the character.
86
95
  * If you set undefined, it will return the default age.
87
96
  */
88
97
  get age(): number | undefined;
89
98
  set age(value: number | undefined);
90
- private _icon?;
91
99
  /**
92
100
  * The icon of the character.
93
101
  */
94
- get icon(): string | undefined;
95
- private _color?;
102
+ readonly icon?: string;
96
103
  /**
97
104
  * The color of the character.
98
105
  */
99
- get color(): string | undefined;
106
+ readonly color?: string | undefined;
100
107
  }
101
108
 
102
109
  declare namespace RegisteredCharacters {
@@ -167,38 +174,35 @@ declare namespace RegisteredCharacters {
167
174
  * this.defaultName = props.name
168
175
  * this.defaultSurname = props.surname
169
176
  * this.defaultAge = props.age
170
- * this._icon = props.icon
171
- * this._color = props.color
177
+ * this.icon = props.icon
178
+ * this.color = props.color
172
179
  * }
173
- * private defaultName: string = ""
180
+ * readonly defaultName: string = ""
174
181
  * get name(): string {
175
182
  * return this.getStorageProperty<string>("name") || this.defaultName
176
183
  * }
177
184
  * set name(value: string | undefined) {
178
- * this.setStorageProperty<string>("name", value)
185
+ * this.setStorageProperty("name", value)
179
186
  * }
180
- * private defaultSurname?: string
187
+ * readonly defaultSurname?: string
181
188
  * get surname(): string | undefined {
182
189
  * return this.getStorageProperty<string>("surname") || this.defaultSurname
183
190
  * }
184
191
  * set surname(value: string | undefined) {
185
- * this.setStorageProperty<string>("surname", value)
192
+ * this.setStorageProperty("surname", value)
186
193
  * }
187
- * private defaultAge?: number | undefined
194
+ * readonly defaultAge?: number | undefined
188
195
  * get age(): number | undefined {
189
196
  * return this.getStorageProperty<number>("age") || this.defaultAge
190
197
  * }
191
198
  * set age(value: number | undefined) {
192
- * this.setStorageProperty<number>("age", value)
199
+ * this.setStorageProperty("age", value)
193
200
  * }
194
- * private _icon?: string
201
+ * readonly icon?: string
195
202
  * get icon(): string | undefined {
196
203
  * return this._icon
197
204
  * }
198
- * private _color?: string | undefined
199
- * get color(): string | undefined {
200
- * return this._color
201
- * }
205
+ * readonly color?: string | undefined
202
206
  * }
203
207
  * ```
204
208
  */
@@ -209,4 +213,4 @@ interface CharacterInterface {
209
213
  id: string;
210
214
  }
211
215
 
212
- export { CharacterBaseModel, type CharacterInterface, CharacterStoredClass, RegisteredCharacters };
216
+ export { CharacterBaseModel, type CharacterEmotionId, type CharacterInterface, CharacterStoredClass, RegisteredCharacters };
@@ -1 +1 @@
1
- import {b}from'./chunk-XYO5SLSM.mjs';import {n}from'./chunk-IWAXXFXE.mjs';import {e,f,d as d$1}from'./chunk-6HI66YQL.mjs';var l="@",i=class extends b{constructor(e,r=""){super(n.CHARACTER_CATEGORY_KEY,e+(r?l+r:""));d$1(this,"sourceId");this.sourceId=e,this.migrateOldStorage("___character___");}getStorageProperty(e){let r=super.getStorageProperty(e);return r===void 0&&(r=super.getStorageProperty(e,this.sourceId)),r}};var u=class extends i{constructor(e,r){super(typeof e=="string"?e:e.id,typeof e=="string"?"":e.emotion);d$1(this,"defaultName");d$1(this,"defaultSurname");d$1(this,"defaultAge");d$1(this,"_icon");d$1(this,"_color");this.defaultName=r.name,this.defaultSurname=r.surname,this.defaultAge=r.age,this._icon=r.icon,this._color=r.color;}get name(){return this.getStorageProperty("name")||this.defaultName||this.id}set name(e){this.setStorageProperty("name",e);}get surname(){return this.getStorageProperty("surname")||this.defaultSurname}set surname(e){this.setStorageProperty("surname",e);}get age(){return this.getStorageProperty("age")||this.defaultAge}set age(e){this.setStorageProperty("age",e);}get icon(){return this._icon}get color(){return this._color}};var s=new e({cacheSize:10}),d;(y=>{function f$1(t){try{let n=s.get(t);if(!n){f.warn(`Character "${t}" not found, did you forget to register it with the RegisteredCharacters.add?`);return}return n}catch(n){f.error(`Error while getting Character "${t}"`,n);return}}y.get=f$1;function g(t){if(Array.isArray(t)){t.forEach(n=>{g(n);});return}s.get(t.id)&&f.info(`Character id "${t.id}" already exists, it will be overwritten`),s.set(t.id,t);}y.add=g;function e(){return Array.from(s.values())}y.values=e;function r(t){return s.has(t)}y.has=r;function C(){return Array.from(s.keys())}y.keys=C;})(d||(d={}));var p=d;export{u as CharacterBaseModel,i as CharacterStoredClass,p as RegisteredCharacters};
1
+ import {b}from'./chunk-V34PMA2H.mjs';import {n}from'./chunk-IWAXXFXE.mjs';import {e,f as f$1,d as d$1}from'./chunk-Z4GZCINS.mjs';var l="@",o=class extends b{constructor(e,r=""){super(n.CHARACTER_CATEGORY_KEY,e+(r?l+r:""));d$1(this,"sourceId");this.sourceId=e,this.migrateOldStorage("___character___");}getStorageProperty(e){let r=super.getStorageProperty(e);return r===void 0&&(r=super.getStorageProperty(e,this.sourceId)),r}};var d=class extends o{constructor(e,r){super(typeof e=="string"?e:e.id,typeof e=="string"?"":e.emotion);d$1(this,"defaultName");d$1(this,"defaultSurname");d$1(this,"defaultAge");d$1(this,"icon");d$1(this,"color");this.defaultName=r.name,this.defaultSurname=r.surname,this.defaultAge=r.age,this.icon=r.icon,this.color=r.color;}get name(){return this.getStorageProperty("name")||this.defaultName||this.id}set name(e){this.setStorageProperty("name",e);}get surname(){return this.getStorageProperty("surname")||this.defaultSurname}set surname(e){this.setStorageProperty("surname",e);}get age(){return this.getStorageProperty("age")||this.defaultAge}set age(e){this.setStorageProperty("age",e);}};var s=new e({cacheSize:10}),f;(C=>{function c(t){try{let n=s.get(t);if(!n){f$1.warn(`Character "${t}" not found, did you forget to register it with the RegisteredCharacters.add?`);return}return n}catch(n){f$1.error(`Error while getting Character "${t}"`,n);return}}C.get=c;function u(t){if(Array.isArray(t)){t.forEach(n=>{u(n);});return}s.get(t.id)&&f$1.info(`Character id "${t.id}" already exists, it will be overwritten`),s.set(t.id,t);}C.add=u;function e(){return Array.from(s.values())}C.values=e;function r(t){return s.has(t)}C.has=r;function y(){return Array.from(s.keys())}C.keys=y;})(f||(f={}));var p=f;export{d as CharacterBaseModel,o as CharacterStoredClass,p as RegisteredCharacters};
@@ -0,0 +1 @@
1
+ var _="/__pixi-vn/characters",I="/__pixi-vn/labels",s="/__pixi-vn/assets/manifest",t="/__pixi-vn/canvas-options";export{_ as a,I as b,s as c,t as d};
@@ -0,0 +1 @@
1
+ var i=Object.create;var f=Object.defineProperty;var j=Object.getOwnPropertyDescriptor;var k=Object.getOwnPropertyNames;var l=Object.getPrototypeOf,m=Object.prototype.hasOwnProperty;var h=b=>{throw TypeError(b)};var n=(b,a,c)=>a in b?f(b,a,{enumerable:true,configurable:true,writable:true,value:c}):b[a]=c;var r=(b,a)=>()=>(a||b((a={exports:{}}).exports,a),a.exports),s=(b,a)=>{for(var c in a)f(b,c,{get:a[c],enumerable:true});},o=(b,a,c,d)=>{if(a&&typeof a=="object"||typeof a=="function")for(let e of k(a))!m.call(b,e)&&e!==c&&f(b,e,{get:()=>a[e],enumerable:!(d=j(a,e))||d.enumerable});return b};var t=(b,a,c)=>(c=b!=null?i(l(b)):{},o(a||!b||!b.__esModule?f(c,"default",{value:b,enumerable:true}):c,b));var u=(b,a,c)=>n(b,typeof a!="symbol"?a+"":a,c),g=(b,a,c)=>a.has(b)||h("Cannot "+c);var p=(b,a,c)=>(g(b,a,"read from private field"),c?c.call(b):a.get(b)),v=(b,a,c)=>a.has(b)?h("Cannot add the same private member more than once"):a instanceof WeakSet?a.add(b):a.set(b,c),q=(b,a,c,d)=>(g(b,a,"write to private field"),d?d.call(b,c):a.set(b,c),c),w=(b,a,c)=>(g(b,a,"access private method"),c);var x=(b,a,c,d)=>({set _(e){q(b,a,e,c);},get _(){return p(b,a,d)}});export{r as a,s as b,t as c,u as d,p as e,v as f,q as g,w as h,x as i};
@@ -0,0 +1 @@
1
+ import {k as k$1,m,j,l,n}from'./chunk-IWAXXFXE.mjs';import {e,g,f as f$1,d}from'./chunk-Z4GZCINS.mjs';import {GameUnifier}from'@drincs/pixi-vn/core';var T;(n=>{n.storage=new e({cacheSize:50}),n.defaultStorage=new e({cacheSize:10}),n.tempStorageDeadlines=new Map;let s;function c(r){n.tempStorageDeadlines.forEach((l,o)=>{l>r&&(n.storage.delete(`${k$1}:${o}`),s?.onClearOldTempVariable?.(o),n.tempStorageDeadlines.delete(o));});}n.clearOldTempVariables=c;function y(r){s=r;}n.setExternalStoreHandler=y;function V(r,l,o){o==null?n.storage.delete(`${r}:${l}`):n.storage.set(`${r}:${l}`,o),s?.onSetVariable?.(l,o);}n.setVariable=V;function O(r,l){let o=n.storage.get(`${r}:${l}`);return g(o)}n.getVariable=O;function M(r,l){n.storage.delete(`${r}:${l}`),s?.onRemoveVariable?.(l);}n.removeVariable=M;function D(r,l){let o=n.storage.get(m)||[];if(l)o.includes(r)||o.push(r);else {let x=o.indexOf(r);x>-1&&o.splice(x,1);}n.storage.set(m,o);}n.setFlag=D;function R(r){return (n.storage.get(m)||[]).includes(r)}n.getFlag=R;})(T||(T={}));var a=T;var S=class{get base(){return a.storage.map}get cache(){return a.storage.cache}get tempStorageDeadlines(){return a.tempStorageDeadlines}set default(t){Object.entries(t).forEach(([e,s])=>{a.defaultStorage.map.set(e,s);});}set(t,e){return a.setVariable(j,t,e)}get(t){let e=a.getVariable(k$1,t);return e===void 0&&(e=a.getVariable(j,t)),e===void 0&&(e=g(a.defaultStorage.get(t))),e}remove(t){return this.removeTempVariable(t),a.removeVariable(j,t)}setTempVariable(t,e){if(e==null){this.removeTempVariable(t);return}else a.setVariable(k$1,t,e),this.tempStorageDeadlines.has(t)||this.tempStorageDeadlines.set(t,GameUnifier.openedLabels);}removeTempVariable(t){a.removeVariable(k$1,t),this.tempStorageDeadlines.has(t)&&this.tempStorageDeadlines.delete(t);}setFlag(t,e){return a.setFlag(t,e)}getFlag(t){return a.getFlag(t)}setStorageHandler(t){a.setExternalStoreHandler(t);}clear(){this.base.clear(),this.cache.clear(),this.tempStorageDeadlines.clear();}export(){let t=[];[...this.base.keys()].forEach(s=>{t.push({key:s,value:this.base.get(s)});});let e=[];return [...a.tempStorageDeadlines.keys()].forEach(s=>{e.push({key:s,value:this.tempStorageDeadlines.get(s)});}),g({main:t,tempDeadlines:e})}restore(t){this.clear();try{t?(t.base?.forEach(e=>{switch(e.key){case "___current_dialogue_memory___":a.setVariable(l,n.CURRENT_DIALOGUE_MEMORY_KEY,e.value);break;case "___last_dialogue_added_in_step_memory___":a.setVariable(l,n.LAST_DIALOGUE_ADDED_IN_STEP_MEMORY_KEY,e.value);break;case "___current_menu_options_memory___":a.setVariable(l,n.CURRENT_MENU_OPTIONS_MEMORY_KEY,e.value);break;case "___last_menu_options_added_in_step_memory___":a.setVariable(l,n.LAST_MENU_OPTIONS_ADDED_IN_STEP_MEMORY_KEY,e.value);break;case "_input_value_":a.setVariable(l,n.CURRENT_INPUT_VALUE_MEMORY_KEY,e.value);break;case "___last_input_added_in_step_memory___":a.setVariable(l,n.LAST_INPUT_ADDED_IN_STEP_MEMORY_KEY,e.value);break;case "___current_input_info_memory___":a.setVariable(l,n.CURRENT_INPUT_INFO_MEMORY_KEY,e.value);break;case "___opened_labels_counter___":a.setVariable(l,n.OPENED_LABELS_COUNTER_KEY,e.value);break;case "___all_choices_made___":a.setVariable(l,n.ALL_CHOICES_MADE_KEY,e.value);break;case "___current_step_times_counter___":a.setVariable(l,n.CURRENT_STEP_TIMES_COUNTER_KEY,e.value);break;case "___last_step_glued___":a.setVariable(l,n.LAST_STEP_GLUED,e.value);break;default:a.setVariable(j,e.key,e.value);}}),t.temp?.forEach(e=>{a.setVariable(k$1,e.key,e.value);}),t.flags?.forEach(e=>{a.setFlag(e,!0);}),t.main?.forEach(e=>{this.base.set(e.key,e.value);}),t.tempDeadlines?.forEach(e=>{this.tempStorageDeadlines.set(e.key,e.value);})):f$1.warn("No storage data found");}catch(e){f$1.error("Error importing data",e);}}};var f=class{constructor(t,e){d(this,"id");d(this,"categoryId");this.categoryId=t,this.id=e,this.migrateOldStorage();}migrateOldStorage(t=this.categoryId){let e=a.getVariable(j,t);e&&(Object.entries(e).forEach(([s,c])=>{typeof c=="object"&&c!==null&&Object.entries(c).forEach(([y,V])=>{a.setVariable(this.categoryId,`${s}:${y}`,V);});}),a.removeVariable(j,t));}setStorageProperty(t,e){a.setVariable(this.categoryId,`${this.id}:${t}`,e);}getStorageProperty(t,e=this.id){return a.getVariable(this.categoryId,`${e}:${t}`)}};var k=new S;export{a,f as b,k as c};
@@ -1 +1 @@
1
- import {b,a}from'./chunk-6HI66YQL.mjs';var L=b((S,I)=>{(function(w,o){typeof S=="object"?I.exports=S=o():typeof define=="function"&&define.amd?define([],o):w.CryptoJS=o();})(S,function(){var w=w||(function(o,x){var a$1;if(typeof window<"u"&&window.crypto&&(a$1=window.crypto),typeof self<"u"&&self.crypto&&(a$1=self.crypto),typeof globalThis<"u"&&globalThis.crypto&&(a$1=globalThis.crypto),!a$1&&typeof window<"u"&&window.msCrypto&&(a$1=window.msCrypto),!a$1&&typeof global<"u"&&global.crypto&&(a$1=global.crypto),!a$1&&typeof a=="function")try{a$1=a("crypto");}catch{}var _=function(){if(a$1){if(typeof a$1.getRandomValues=="function")try{return a$1.getRandomValues(new Uint32Array(1))[0]}catch{}if(typeof a$1.randomBytes=="function")try{return a$1.randomBytes(4).readInt32LE()}catch{}}throw new Error("Native crypto module could not be used to get secure random number.")},C=Object.create||(function(){function t(){}return function(e){var n;return t.prototype=e,n=new t,t.prototype=null,n}})(),d={},B=d.lib={},u=B.Base=(function(){return {extend:function(t){var e=C(this);return t&&e.mixIn(t),(!e.hasOwnProperty("init")||this.init===e.init)&&(e.init=function(){e.$super.init.apply(this,arguments);}),e.init.prototype=e,e.$super=this,e},create:function(){var t=this.extend();return t.init.apply(t,arguments),t},init:function(){},mixIn:function(t){for(var e in t)t.hasOwnProperty(e)&&(this[e]=t[e]);t.hasOwnProperty("toString")&&(this.toString=t.toString);},clone:function(){return this.init.prototype.extend(this)}}})(),l=B.WordArray=u.extend({init:function(t,e){t=this.words=t||[],e!=x?this.sigBytes=e:this.sigBytes=t.length*4;},toString:function(t){return (t||v).stringify(this)},concat:function(t){var e=this.words,n=t.words,r=this.sigBytes,f=t.sigBytes;if(this.clamp(),r%4)for(var c=0;c<f;c++){var z=n[c>>>2]>>>24-c%4*8&255;e[r+c>>>2]|=z<<24-(r+c)%4*8;}else for(var g=0;g<f;g+=4)e[r+g>>>2]=n[g>>>2];return this.sigBytes+=f,this},clamp:function(){var t=this.words,e=this.sigBytes;t[e>>>2]&=4294967295<<32-e%4*8,t.length=o.ceil(e/4);},clone:function(){var t=u.clone.call(this);return t.words=this.words.slice(0),t},random:function(t){for(var e=[],n=0;n<t;n+=4)e.push(_());return new l.init(e,t)}}),i=d.enc={},v=i.Hex={stringify:function(t){for(var e=t.words,n=t.sigBytes,r=[],f=0;f<n;f++){var c=e[f>>>2]>>>24-f%4*8&255;r.push((c>>>4).toString(16)),r.push((c&15).toString(16));}return r.join("")},parse:function(t){for(var e=t.length,n=[],r=0;r<e;r+=2)n[r>>>3]|=parseInt(t.substr(r,2),16)<<24-r%8*4;return new l.init(n,e/2)}},h=i.Latin1={stringify:function(t){for(var e=t.words,n=t.sigBytes,r=[],f=0;f<n;f++){var c=e[f>>>2]>>>24-f%4*8&255;r.push(String.fromCharCode(c));}return r.join("")},parse:function(t){for(var e=t.length,n=[],r=0;r<e;r++)n[r>>>2]|=(t.charCodeAt(r)&255)<<24-r%4*8;return new l.init(n,e)}},p=i.Utf8={stringify:function(t){try{return decodeURIComponent(escape(h.stringify(t)))}catch{throw new Error("Malformed UTF-8 data")}},parse:function(t){return h.parse(unescape(encodeURIComponent(t)))}},y=B.BufferedBlockAlgorithm=u.extend({reset:function(){this._data=new l.init,this._nDataBytes=0;},_append:function(t){typeof t=="string"&&(t=p.parse(t)),this._data.concat(t),this._nDataBytes+=t.sigBytes;},_process:function(t){var e,n=this._data,r=n.words,f=n.sigBytes,c=this.blockSize,z=c*4,g=f/z;t?g=o.ceil(g):g=o.max((g|0)-this._minBufferSize,0);var b=g*c,R=o.min(b*4,f);if(b){for(var A=0;A<b;A+=c)this._doProcessBlock(r,A);e=r.splice(0,b),n.sigBytes-=R;}return new l.init(e,R)},clone:function(){var t=u.clone.call(this);return t._data=this._data.clone(),t},_minBufferSize:0});B.Hasher=y.extend({cfg:u.extend(),init:function(t){this.cfg=this.cfg.extend(t),this.reset();},reset:function(){y.reset.call(this),this._doReset();},update:function(t){return this._append(t),this._process(),this},finalize:function(t){t&&this._append(t);var e=this._doFinalize();return e},blockSize:512/32,_createHelper:function(t){return function(e,n){return new t.init(n).finalize(e)}},_createHmacHelper:function(t){return function(e,n){return new s.HMAC.init(t,n).finalize(e)}}});var s=d.algo={};return d})(Math);return w});});var T=b((H,P)=>{(function(w,o){typeof H=="object"?P.exports=H=o(L()):typeof define=="function"&&define.amd?define(["./core"],o):o(w.CryptoJS);})(H,function(w){return (function(){var o=w,x=o.lib,a=x.WordArray,_=x.Hasher,C=o.algo,d=[],B=C.SHA1=_.extend({_doReset:function(){this._hash=new a.init([1732584193,4023233417,2562383102,271733878,3285377520]);},_doProcessBlock:function(u,l){for(var i=this._hash.words,v=i[0],h=i[1],p=i[2],y=i[3],m=i[4],s=0;s<80;s++){if(s<16)d[s]=u[l+s]|0;else {var t=d[s-3]^d[s-8]^d[s-14]^d[s-16];d[s]=t<<1|t>>>31;}var e=(v<<5|v>>>27)+m+d[s];s<20?e+=(h&p|~h&y)+1518500249:s<40?e+=(h^p^y)+1859775393:s<60?e+=(h&p|h&y|p&y)-1894007588:e+=(h^p^y)-899497514,m=y,y=p,p=h<<30|h>>>2,h=v,v=e;}i[0]=i[0]+v|0,i[1]=i[1]+h|0,i[2]=i[2]+p|0,i[3]=i[3]+y|0,i[4]=i[4]+m|0;},_doFinalize:function(){var u=this._data,l=u.words,i=this._nDataBytes*8,v=u.sigBytes*8;return l[v>>>5]|=128<<24-v%32,l[(v+64>>>9<<4)+14]=Math.floor(i/4294967296),l[(v+64>>>9<<4)+15]=i,u.sigBytes=l.length*4,this._process(),this._hash},clone:function(){var u=_.clone.call(this);return u._hash=this._hash.clone(),u}});o.SHA1=_._createHelper(B),o.HmacSHA1=_._createHmacHelper(B);})(),w.SHA1});});export{T as a};
1
+ import {b,a}from'./chunk-Z4GZCINS.mjs';var L=b((S,I)=>{(function(w,o){typeof S=="object"?I.exports=S=o():typeof define=="function"&&define.amd?define([],o):w.CryptoJS=o();})(S,function(){var w=w||(function(o,x){var a$1;if(typeof window<"u"&&window.crypto&&(a$1=window.crypto),typeof self<"u"&&self.crypto&&(a$1=self.crypto),typeof globalThis<"u"&&globalThis.crypto&&(a$1=globalThis.crypto),!a$1&&typeof window<"u"&&window.msCrypto&&(a$1=window.msCrypto),!a$1&&typeof global<"u"&&global.crypto&&(a$1=global.crypto),!a$1&&typeof a=="function")try{a$1=a("crypto");}catch{}var _=function(){if(a$1){if(typeof a$1.getRandomValues=="function")try{return a$1.getRandomValues(new Uint32Array(1))[0]}catch{}if(typeof a$1.randomBytes=="function")try{return a$1.randomBytes(4).readInt32LE()}catch{}}throw new Error("Native crypto module could not be used to get secure random number.")},C=Object.create||(function(){function t(){}return function(e){var n;return t.prototype=e,n=new t,t.prototype=null,n}})(),d={},B=d.lib={},u=B.Base=(function(){return {extend:function(t){var e=C(this);return t&&e.mixIn(t),(!e.hasOwnProperty("init")||this.init===e.init)&&(e.init=function(){e.$super.init.apply(this,arguments);}),e.init.prototype=e,e.$super=this,e},create:function(){var t=this.extend();return t.init.apply(t,arguments),t},init:function(){},mixIn:function(t){for(var e in t)t.hasOwnProperty(e)&&(this[e]=t[e]);t.hasOwnProperty("toString")&&(this.toString=t.toString);},clone:function(){return this.init.prototype.extend(this)}}})(),l=B.WordArray=u.extend({init:function(t,e){t=this.words=t||[],e!=x?this.sigBytes=e:this.sigBytes=t.length*4;},toString:function(t){return (t||v).stringify(this)},concat:function(t){var e=this.words,n=t.words,r=this.sigBytes,f=t.sigBytes;if(this.clamp(),r%4)for(var c=0;c<f;c++){var z=n[c>>>2]>>>24-c%4*8&255;e[r+c>>>2]|=z<<24-(r+c)%4*8;}else for(var g=0;g<f;g+=4)e[r+g>>>2]=n[g>>>2];return this.sigBytes+=f,this},clamp:function(){var t=this.words,e=this.sigBytes;t[e>>>2]&=4294967295<<32-e%4*8,t.length=o.ceil(e/4);},clone:function(){var t=u.clone.call(this);return t.words=this.words.slice(0),t},random:function(t){for(var e=[],n=0;n<t;n+=4)e.push(_());return new l.init(e,t)}}),i=d.enc={},v=i.Hex={stringify:function(t){for(var e=t.words,n=t.sigBytes,r=[],f=0;f<n;f++){var c=e[f>>>2]>>>24-f%4*8&255;r.push((c>>>4).toString(16)),r.push((c&15).toString(16));}return r.join("")},parse:function(t){for(var e=t.length,n=[],r=0;r<e;r+=2)n[r>>>3]|=parseInt(t.substr(r,2),16)<<24-r%8*4;return new l.init(n,e/2)}},h=i.Latin1={stringify:function(t){for(var e=t.words,n=t.sigBytes,r=[],f=0;f<n;f++){var c=e[f>>>2]>>>24-f%4*8&255;r.push(String.fromCharCode(c));}return r.join("")},parse:function(t){for(var e=t.length,n=[],r=0;r<e;r++)n[r>>>2]|=(t.charCodeAt(r)&255)<<24-r%4*8;return new l.init(n,e)}},p=i.Utf8={stringify:function(t){try{return decodeURIComponent(escape(h.stringify(t)))}catch{throw new Error("Malformed UTF-8 data")}},parse:function(t){return h.parse(unescape(encodeURIComponent(t)))}},y=B.BufferedBlockAlgorithm=u.extend({reset:function(){this._data=new l.init,this._nDataBytes=0;},_append:function(t){typeof t=="string"&&(t=p.parse(t)),this._data.concat(t),this._nDataBytes+=t.sigBytes;},_process:function(t){var e,n=this._data,r=n.words,f=n.sigBytes,c=this.blockSize,z=c*4,g=f/z;t?g=o.ceil(g):g=o.max((g|0)-this._minBufferSize,0);var b=g*c,R=o.min(b*4,f);if(b){for(var A=0;A<b;A+=c)this._doProcessBlock(r,A);e=r.splice(0,b),n.sigBytes-=R;}return new l.init(e,R)},clone:function(){var t=u.clone.call(this);return t._data=this._data.clone(),t},_minBufferSize:0});B.Hasher=y.extend({cfg:u.extend(),init:function(t){this.cfg=this.cfg.extend(t),this.reset();},reset:function(){y.reset.call(this),this._doReset();},update:function(t){return this._append(t),this._process(),this},finalize:function(t){t&&this._append(t);var e=this._doFinalize();return e},blockSize:512/32,_createHelper:function(t){return function(e,n){return new t.init(n).finalize(e)}},_createHmacHelper:function(t){return function(e,n){return new s.HMAC.init(t,n).finalize(e)}}});var s=d.algo={};return d})(Math);return w});});var T=b((H,P)=>{(function(w,o){typeof H=="object"?P.exports=H=o(L()):typeof define=="function"&&define.amd?define(["./core"],o):o(w.CryptoJS);})(H,function(w){return (function(){var o=w,x=o.lib,a=x.WordArray,_=x.Hasher,C=o.algo,d=[],B=C.SHA1=_.extend({_doReset:function(){this._hash=new a.init([1732584193,4023233417,2562383102,271733878,3285377520]);},_doProcessBlock:function(u,l){for(var i=this._hash.words,v=i[0],h=i[1],p=i[2],y=i[3],m=i[4],s=0;s<80;s++){if(s<16)d[s]=u[l+s]|0;else {var t=d[s-3]^d[s-8]^d[s-14]^d[s-16];d[s]=t<<1|t>>>31;}var e=(v<<5|v>>>27)+m+d[s];s<20?e+=(h&p|~h&y)+1518500249:s<40?e+=(h^p^y)+1859775393:s<60?e+=(h&p|h&y|p&y)-1894007588:e+=(h^p^y)-899497514,m=y,y=p,p=h<<30|h>>>2,h=v,v=e;}i[0]=i[0]+v|0,i[1]=i[1]+h|0,i[2]=i[2]+p|0,i[3]=i[3]+y|0,i[4]=i[4]+m|0;},_doFinalize:function(){var u=this._data,l=u.words,i=this._nDataBytes*8,v=u.sigBytes*8;return l[v>>>5]|=128<<24-v%32,l[(v+64>>>9<<4)+14]=Math.floor(i/4294967296),l[(v+64>>>9<<4)+15]=i,u.sigBytes=l.length*4,this._process(),this._hash},clone:function(){var u=_.clone.call(this);return u._hash=this._hash.clone(),u}});o.SHA1=_._createHelper(B),o.HmacSHA1=_._createHmacHelper(B);})(),w.SHA1});});export{T as a};