@drincs/pixi-vn 1.5.16 → 1.5.17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/core.cjs CHANGED
@@ -1 +1 @@
1
- 'use strict';var p=Object.defineProperty;var g=(r,t,o)=>t in r?p(r,t,{enumerable:true,configurable:true,writable:true,value:o}):r[t]=o;var i=(r,t,o)=>g(r,typeof t!="symbol"?t+"":t,o);var a;(l=>(l.log=(s,...m)=>console.log(`[Pixi\u2019VN] ${s}`,...m),l.warn=(s,...m)=>console.warn(`[Pixi\u2019VN] ${s}`,...m),l.error=(s,...m)=>console.error(`[Pixi\u2019VN] ${s}`,...m),l.info=(s,...m)=>console.info(`[Pixi\u2019VN] ${s}`,...m)))(a||(a={}));var n=class extends Error{constructor(o,u){super(`[Pixi\u2019VN] ${u}`);i(this,"code");this.code=o;}};var e=class e{static init(t){t.navigate&&(e._navigate=t.navigate),e._getStepCounter=t.getStepCounter,e._setStepCounter=t.setStepCounter,e._getCurrentGameStepState=t.getCurrentGameStepState,e._restoreGameStepState=t.restoreGameStepState,e._getOpenedLabels=t.getOpenedLabels,t.onPreContinue&&e.addOnPreContinue(t.onPreContinue),e._processNavigationRequests=t.processNavigationRequests,e._getVariable=t.getVariable,e._setVariable=t.setVariable,e._removeVariable=t.removeVariable,e._getFlag=t.getFlag,e._setFlag=t.setFlag,t.onLabelClosing&&(e._onLabelClosing=t.onLabelClosing),e._addHistoryItem=t.addHistoryItem,e._getCharacter=t.getCharacter;}static get navigate(){return e._navigate}static set navigate(t){e._navigate=t;}static get stepCounter(){return e._getStepCounter()}static set stepCounter(t){e._setStepCounter(t);}static get currentGameStepState(){return e._getCurrentGameStepState()}static get restoreGameStepState(){return e._restoreGameStepState}static get openedLabels(){return e._getOpenedLabels()}static addOnPreContinue(t){e._onPreContinueHandlers.push(t);}static removeOnPreContinue(t){e._onPreContinueHandlers=e._onPreContinueHandlers.filter(o=>o!==t);}static clearOnPreContinueHandlers(){e._onPreContinueHandlers=[];}static async runOnPreContinue(){let t=e._onPreContinueHandlers.slice();await Promise.all(t.map(o=>o()));}static get onPreContinue(){return e.runOnPreContinue}static get continueRequestsCount(){return e.navigationRequestsCount}static increaseContinueRequest(t=1){e.navigationRequestsCount+=t;}static get backRequestsCount(){return -1*e.navigationRequestsCount}static increaseBackRequest(t=1){e.navigationRequestsCount-=t;}static async processNavigationRequests(t){let o=e._processNavigationRequests(e.navigationRequestsCount,t);return e.navigationRequestsCount=o.newValue,await o.result}static get getVariable(){return e._getVariable}static get setVariable(){return e._setVariable}static get removeVariable(){return e._removeVariable}static get getFlag(){return e._getFlag}static get setFlag(){return e._setFlag}static get onLabelClosing(){return e._onLabelClosing}static get addHistoryItem(){return e._addHistoryItem}static get getCharacter(){return e._getCharacter}static get animate(){return e._animate}};i(e,"_navigate",()=>{a.warn("Navigate function not initialized. You should add the navigate function in the Game.init() method.");}),i(e,"_getStepCounter",()=>{throw a.error("Method not implemented, you should initialize the Game: Game.init()"),new n("not_implemented","Method not implemented, you should initialize the Game: Game.init()")}),i(e,"_setStepCounter",()=>{throw a.error("Method not implemented, you should initialize the Game: Game.init()"),new n("not_implemented","Method not implemented, you should initialize the Game: Game.init()")}),i(e,"_getCurrentGameStepState",()=>{throw a.error("Method not implemented, you should initialize the Game: Game.init()"),new n("not_implemented","Method not implemented, you should initialize the Game: Game.init()")}),i(e,"_restoreGameStepState",()=>{throw a.error("Method not implemented, you should initialize the Game: Game.init()"),new n("not_implemented","Method not implemented, you should initialize the Game: Game.init()")}),i(e,"_getOpenedLabels",()=>{throw a.error("Method not implemented, you should initialize the Game: Game.init()"),new n("not_implemented","Method not implemented, you should initialize the Game: Game.init()")}),i(e,"_onPreContinueHandlers",[]),i(e,"navigationRequestsCount",0),i(e,"processNavigationLock",Promise.resolve()),i(e,"_processNavigationRequests",()=>{throw a.error("Method not implemented, you should initialize the Game: Game.init()"),new n("not_implemented","Method not implemented, you should initialize the Game: Game.init()")}),i(e,"_getVariable",()=>{throw a.error("Method not implemented, you should initialize the Game: Game.init()"),new n("not_implemented","Method not implemented, you should initialize the Game: Game.init()")}),i(e,"_setVariable",()=>{throw a.error("Method not implemented, you should initialize the Game: Game.init()"),new n("not_implemented","Method not implemented, you should initialize the Game: Game.init()")}),i(e,"_removeVariable",()=>{throw a.error("Method not implemented, you should initialize the Game: Game.init()"),new n("not_implemented","Method not implemented, you should initialize the Game: Game.init()")}),i(e,"_getFlag",()=>{throw a.error("Method not implemented, you should initialize the Game: Game.init()"),new n("not_implemented","Method not implemented, you should initialize the Game: Game.init()")}),i(e,"_setFlag",()=>{throw a.error("Method not implemented, you should initialize the Game: Game.init()"),new n("not_implemented","Method not implemented, you should initialize the Game: Game.init()")}),i(e,"_onLabelClosing",()=>{}),i(e,"_addHistoryItem",()=>{throw a.error("Method not implemented, you should initialize the Game: Game.init()"),new n("not_implemented","Method not implemented, you should initialize the Game: Game.init()")}),i(e,"runningStepsCount",0),i(e,"_getCharacter",()=>{throw a.error("Method not implemented, you should initialize the Game: Game.init()"),new n("not_implemented","Method not implemented.")}),i(e,"onEnd"),i(e,"onError"),i(e,"_animate");var d=e;exports.GameUnifier=d;exports.PixiError=n;
1
+ 'use strict';var p=Object.defineProperty;var g=(r,t,o)=>t in r?p(r,t,{enumerable:true,configurable:true,writable:true,value:o}):r[t]=o;var i=(r,t,o)=>g(r,typeof t!="symbol"?t+"":t,o);var a;(l=>(l.log=(s,...m)=>console.log(`[Pixi\u2019VN] ${s}`,...m),l.warn=(s,...m)=>console.warn(`[Pixi\u2019VN] ${s}`,...m),l.error=(s,...m)=>console.error(`[Pixi\u2019VN] ${s}`,...m),l.info=(s,...m)=>console.info(`[Pixi\u2019VN] ${s}`,...m)))(a||(a={}));var n=class extends Error{constructor(o,u){super(`[Pixi\u2019VN] ${u}`);i(this,"code");this.code=o;}};var e=class e{static init(t){t.navigate&&(e._navigate=t.navigate),e._getStepCounter=t.getStepCounter,e._setStepCounter=t.setStepCounter,e._getCurrentGameStepState=t.getCurrentGameStepState,e._restoreGameStepState=t.restoreGameStepState,e._getOpenedLabels=t.getOpenedLabels,t.onPreContinue&&e.addOnPreContinue(t.onPreContinue),e._processNavigationRequests=t.processNavigationRequests,e._getVariable=t.getVariable,e._setVariable=t.setVariable,e._removeVariable=t.removeVariable,e._getFlag=t.getFlag,e._setFlag=t.setFlag,t.onLabelClosing&&(e._onLabelClosing=t.onLabelClosing),e._addHistoryItem=t.addHistoryItem,e._getCharacter=t.getCharacter,e._animate=t.animate;}static get navigate(){return e._navigate}static set navigate(t){e._navigate=t;}static get stepCounter(){return e._getStepCounter()}static set stepCounter(t){e._setStepCounter(t);}static get currentGameStepState(){return e._getCurrentGameStepState()}static get restoreGameStepState(){return e._restoreGameStepState}static get openedLabels(){return e._getOpenedLabels()}static addOnPreContinue(t){e._onPreContinueHandlers.push(t);}static removeOnPreContinue(t){e._onPreContinueHandlers=e._onPreContinueHandlers.filter(o=>o!==t);}static clearOnPreContinueHandlers(){e._onPreContinueHandlers=[];}static async runOnPreContinue(){let t=e._onPreContinueHandlers.slice();await Promise.all(t.map(o=>o()));}static get onPreContinue(){return e.runOnPreContinue}static get continueRequestsCount(){return e.navigationRequestsCount}static increaseContinueRequest(t=1){e.navigationRequestsCount+=t;}static get backRequestsCount(){return -1*e.navigationRequestsCount}static increaseBackRequest(t=1){e.navigationRequestsCount-=t;}static async processNavigationRequests(t){let o=e._processNavigationRequests(e.navigationRequestsCount,t);return e.navigationRequestsCount=o.newValue,await o.result}static get getVariable(){return e._getVariable}static get setVariable(){return e._setVariable}static get removeVariable(){return e._removeVariable}static get getFlag(){return e._getFlag}static get setFlag(){return e._setFlag}static get onLabelClosing(){return e._onLabelClosing}static get addHistoryItem(){return e._addHistoryItem}static get getCharacter(){return e._getCharacter}static get animate(){return e._animate}};i(e,"_navigate",()=>{a.warn("Navigate function not initialized. You should add the navigate function in the Game.init() method.");}),i(e,"_getStepCounter",()=>{throw a.error("Method not implemented, you should initialize the Game: Game.init()"),new n("not_implemented","Method not implemented, you should initialize the Game: Game.init()")}),i(e,"_setStepCounter",()=>{throw a.error("Method not implemented, you should initialize the Game: Game.init()"),new n("not_implemented","Method not implemented, you should initialize the Game: Game.init()")}),i(e,"_getCurrentGameStepState",()=>{throw a.error("Method not implemented, you should initialize the Game: Game.init()"),new n("not_implemented","Method not implemented, you should initialize the Game: Game.init()")}),i(e,"_restoreGameStepState",()=>{throw a.error("Method not implemented, you should initialize the Game: Game.init()"),new n("not_implemented","Method not implemented, you should initialize the Game: Game.init()")}),i(e,"_getOpenedLabels",()=>{throw a.error("Method not implemented, you should initialize the Game: Game.init()"),new n("not_implemented","Method not implemented, you should initialize the Game: Game.init()")}),i(e,"_onPreContinueHandlers",[]),i(e,"navigationRequestsCount",0),i(e,"processNavigationLock",Promise.resolve()),i(e,"_processNavigationRequests",()=>{throw a.error("Method not implemented, you should initialize the Game: Game.init()"),new n("not_implemented","Method not implemented, you should initialize the Game: Game.init()")}),i(e,"_getVariable",()=>{throw a.error("Method not implemented, you should initialize the Game: Game.init()"),new n("not_implemented","Method not implemented, you should initialize the Game: Game.init()")}),i(e,"_setVariable",()=>{throw a.error("Method not implemented, you should initialize the Game: Game.init()"),new n("not_implemented","Method not implemented, you should initialize the Game: Game.init()")}),i(e,"_removeVariable",()=>{throw a.error("Method not implemented, you should initialize the Game: Game.init()"),new n("not_implemented","Method not implemented, you should initialize the Game: Game.init()")}),i(e,"_getFlag",()=>{throw a.error("Method not implemented, you should initialize the Game: Game.init()"),new n("not_implemented","Method not implemented, you should initialize the Game: Game.init()")}),i(e,"_setFlag",()=>{throw a.error("Method not implemented, you should initialize the Game: Game.init()"),new n("not_implemented","Method not implemented, you should initialize the Game: Game.init()")}),i(e,"_onLabelClosing",()=>{}),i(e,"_addHistoryItem",()=>{throw a.error("Method not implemented, you should initialize the Game: Game.init()"),new n("not_implemented","Method not implemented, you should initialize the Game: Game.init()")}),i(e,"runningStepsCount",0),i(e,"_getCharacter",()=>{throw a.error("Method not implemented, you should initialize the Game: Game.init()"),new n("not_implemented","Method not implemented.")}),i(e,"onEnd"),i(e,"onError"),i(e,"_animate",()=>{throw a.error("Method not implemented, you should initialize the Game: Game.init()"),new n("not_implemented","Method not implemented, you should initialize the Game: Game.init()")});var d=e;exports.GameUnifier=d;exports.PixiError=n;
package/dist/core.d.cts CHANGED
@@ -387,7 +387,7 @@ declare class GameUnifier {
387
387
  * @returns The id of tickers.
388
388
  * @template T - The type of Pixi’VN component(s) being animated.
389
389
  */
390
- static get animate(): <T>(components: T | string | (string | T)[], keyframes: any, options?: any, priority?: UPDATE_PRIORITY) => string | undefined;
390
+ static get animate(): <T extends CanvasBaseInterface<any>>(components: T | string | (string | T)[], keyframes: any, options?: any, priority?: UPDATE_PRIORITY) => string | undefined;
391
391
  }
392
392
 
393
393
  declare class PixiError extends Error {
package/dist/core.d.ts CHANGED
@@ -387,7 +387,7 @@ declare class GameUnifier {
387
387
  * @returns The id of tickers.
388
388
  * @template T - The type of Pixi’VN component(s) being animated.
389
389
  */
390
- static get animate(): <T>(components: T | string | (string | T)[], keyframes: any, options?: any, priority?: UPDATE_PRIORITY) => string | undefined;
390
+ static get animate(): <T extends CanvasBaseInterface<any>>(components: T | string | (string | T)[], keyframes: any, options?: any, priority?: UPDATE_PRIORITY) => string | undefined;
391
391
  }
392
392
 
393
393
  declare class PixiError extends Error {
package/dist/core.mjs CHANGED
@@ -1 +1 @@
1
- var p=Object.defineProperty;var g=(r,t,o)=>t in r?p(r,t,{enumerable:true,configurable:true,writable:true,value:o}):r[t]=o;var i=(r,t,o)=>g(r,typeof t!="symbol"?t+"":t,o);var a;(l=>(l.log=(s,...m)=>console.log(`[Pixi\u2019VN] ${s}`,...m),l.warn=(s,...m)=>console.warn(`[Pixi\u2019VN] ${s}`,...m),l.error=(s,...m)=>console.error(`[Pixi\u2019VN] ${s}`,...m),l.info=(s,...m)=>console.info(`[Pixi\u2019VN] ${s}`,...m)))(a||(a={}));var n=class extends Error{constructor(o,u){super(`[Pixi\u2019VN] ${u}`);i(this,"code");this.code=o;}};var e=class e{static init(t){t.navigate&&(e._navigate=t.navigate),e._getStepCounter=t.getStepCounter,e._setStepCounter=t.setStepCounter,e._getCurrentGameStepState=t.getCurrentGameStepState,e._restoreGameStepState=t.restoreGameStepState,e._getOpenedLabels=t.getOpenedLabels,t.onPreContinue&&e.addOnPreContinue(t.onPreContinue),e._processNavigationRequests=t.processNavigationRequests,e._getVariable=t.getVariable,e._setVariable=t.setVariable,e._removeVariable=t.removeVariable,e._getFlag=t.getFlag,e._setFlag=t.setFlag,t.onLabelClosing&&(e._onLabelClosing=t.onLabelClosing),e._addHistoryItem=t.addHistoryItem,e._getCharacter=t.getCharacter;}static get navigate(){return e._navigate}static set navigate(t){e._navigate=t;}static get stepCounter(){return e._getStepCounter()}static set stepCounter(t){e._setStepCounter(t);}static get currentGameStepState(){return e._getCurrentGameStepState()}static get restoreGameStepState(){return e._restoreGameStepState}static get openedLabels(){return e._getOpenedLabels()}static addOnPreContinue(t){e._onPreContinueHandlers.push(t);}static removeOnPreContinue(t){e._onPreContinueHandlers=e._onPreContinueHandlers.filter(o=>o!==t);}static clearOnPreContinueHandlers(){e._onPreContinueHandlers=[];}static async runOnPreContinue(){let t=e._onPreContinueHandlers.slice();await Promise.all(t.map(o=>o()));}static get onPreContinue(){return e.runOnPreContinue}static get continueRequestsCount(){return e.navigationRequestsCount}static increaseContinueRequest(t=1){e.navigationRequestsCount+=t;}static get backRequestsCount(){return -1*e.navigationRequestsCount}static increaseBackRequest(t=1){e.navigationRequestsCount-=t;}static async processNavigationRequests(t){let o=e._processNavigationRequests(e.navigationRequestsCount,t);return e.navigationRequestsCount=o.newValue,await o.result}static get getVariable(){return e._getVariable}static get setVariable(){return e._setVariable}static get removeVariable(){return e._removeVariable}static get getFlag(){return e._getFlag}static get setFlag(){return e._setFlag}static get onLabelClosing(){return e._onLabelClosing}static get addHistoryItem(){return e._addHistoryItem}static get getCharacter(){return e._getCharacter}static get animate(){return e._animate}};i(e,"_navigate",()=>{a.warn("Navigate function not initialized. You should add the navigate function in the Game.init() method.");}),i(e,"_getStepCounter",()=>{throw a.error("Method not implemented, you should initialize the Game: Game.init()"),new n("not_implemented","Method not implemented, you should initialize the Game: Game.init()")}),i(e,"_setStepCounter",()=>{throw a.error("Method not implemented, you should initialize the Game: Game.init()"),new n("not_implemented","Method not implemented, you should initialize the Game: Game.init()")}),i(e,"_getCurrentGameStepState",()=>{throw a.error("Method not implemented, you should initialize the Game: Game.init()"),new n("not_implemented","Method not implemented, you should initialize the Game: Game.init()")}),i(e,"_restoreGameStepState",()=>{throw a.error("Method not implemented, you should initialize the Game: Game.init()"),new n("not_implemented","Method not implemented, you should initialize the Game: Game.init()")}),i(e,"_getOpenedLabels",()=>{throw a.error("Method not implemented, you should initialize the Game: Game.init()"),new n("not_implemented","Method not implemented, you should initialize the Game: Game.init()")}),i(e,"_onPreContinueHandlers",[]),i(e,"navigationRequestsCount",0),i(e,"processNavigationLock",Promise.resolve()),i(e,"_processNavigationRequests",()=>{throw a.error("Method not implemented, you should initialize the Game: Game.init()"),new n("not_implemented","Method not implemented, you should initialize the Game: Game.init()")}),i(e,"_getVariable",()=>{throw a.error("Method not implemented, you should initialize the Game: Game.init()"),new n("not_implemented","Method not implemented, you should initialize the Game: Game.init()")}),i(e,"_setVariable",()=>{throw a.error("Method not implemented, you should initialize the Game: Game.init()"),new n("not_implemented","Method not implemented, you should initialize the Game: Game.init()")}),i(e,"_removeVariable",()=>{throw a.error("Method not implemented, you should initialize the Game: Game.init()"),new n("not_implemented","Method not implemented, you should initialize the Game: Game.init()")}),i(e,"_getFlag",()=>{throw a.error("Method not implemented, you should initialize the Game: Game.init()"),new n("not_implemented","Method not implemented, you should initialize the Game: Game.init()")}),i(e,"_setFlag",()=>{throw a.error("Method not implemented, you should initialize the Game: Game.init()"),new n("not_implemented","Method not implemented, you should initialize the Game: Game.init()")}),i(e,"_onLabelClosing",()=>{}),i(e,"_addHistoryItem",()=>{throw a.error("Method not implemented, you should initialize the Game: Game.init()"),new n("not_implemented","Method not implemented, you should initialize the Game: Game.init()")}),i(e,"runningStepsCount",0),i(e,"_getCharacter",()=>{throw a.error("Method not implemented, you should initialize the Game: Game.init()"),new n("not_implemented","Method not implemented.")}),i(e,"onEnd"),i(e,"onError"),i(e,"_animate");var d=e;export{d as GameUnifier,n as PixiError};
1
+ var p=Object.defineProperty;var g=(r,t,o)=>t in r?p(r,t,{enumerable:true,configurable:true,writable:true,value:o}):r[t]=o;var i=(r,t,o)=>g(r,typeof t!="symbol"?t+"":t,o);var a;(l=>(l.log=(s,...m)=>console.log(`[Pixi\u2019VN] ${s}`,...m),l.warn=(s,...m)=>console.warn(`[Pixi\u2019VN] ${s}`,...m),l.error=(s,...m)=>console.error(`[Pixi\u2019VN] ${s}`,...m),l.info=(s,...m)=>console.info(`[Pixi\u2019VN] ${s}`,...m)))(a||(a={}));var n=class extends Error{constructor(o,u){super(`[Pixi\u2019VN] ${u}`);i(this,"code");this.code=o;}};var e=class e{static init(t){t.navigate&&(e._navigate=t.navigate),e._getStepCounter=t.getStepCounter,e._setStepCounter=t.setStepCounter,e._getCurrentGameStepState=t.getCurrentGameStepState,e._restoreGameStepState=t.restoreGameStepState,e._getOpenedLabels=t.getOpenedLabels,t.onPreContinue&&e.addOnPreContinue(t.onPreContinue),e._processNavigationRequests=t.processNavigationRequests,e._getVariable=t.getVariable,e._setVariable=t.setVariable,e._removeVariable=t.removeVariable,e._getFlag=t.getFlag,e._setFlag=t.setFlag,t.onLabelClosing&&(e._onLabelClosing=t.onLabelClosing),e._addHistoryItem=t.addHistoryItem,e._getCharacter=t.getCharacter,e._animate=t.animate;}static get navigate(){return e._navigate}static set navigate(t){e._navigate=t;}static get stepCounter(){return e._getStepCounter()}static set stepCounter(t){e._setStepCounter(t);}static get currentGameStepState(){return e._getCurrentGameStepState()}static get restoreGameStepState(){return e._restoreGameStepState}static get openedLabels(){return e._getOpenedLabels()}static addOnPreContinue(t){e._onPreContinueHandlers.push(t);}static removeOnPreContinue(t){e._onPreContinueHandlers=e._onPreContinueHandlers.filter(o=>o!==t);}static clearOnPreContinueHandlers(){e._onPreContinueHandlers=[];}static async runOnPreContinue(){let t=e._onPreContinueHandlers.slice();await Promise.all(t.map(o=>o()));}static get onPreContinue(){return e.runOnPreContinue}static get continueRequestsCount(){return e.navigationRequestsCount}static increaseContinueRequest(t=1){e.navigationRequestsCount+=t;}static get backRequestsCount(){return -1*e.navigationRequestsCount}static increaseBackRequest(t=1){e.navigationRequestsCount-=t;}static async processNavigationRequests(t){let o=e._processNavigationRequests(e.navigationRequestsCount,t);return e.navigationRequestsCount=o.newValue,await o.result}static get getVariable(){return e._getVariable}static get setVariable(){return e._setVariable}static get removeVariable(){return e._removeVariable}static get getFlag(){return e._getFlag}static get setFlag(){return e._setFlag}static get onLabelClosing(){return e._onLabelClosing}static get addHistoryItem(){return e._addHistoryItem}static get getCharacter(){return e._getCharacter}static get animate(){return e._animate}};i(e,"_navigate",()=>{a.warn("Navigate function not initialized. You should add the navigate function in the Game.init() method.");}),i(e,"_getStepCounter",()=>{throw a.error("Method not implemented, you should initialize the Game: Game.init()"),new n("not_implemented","Method not implemented, you should initialize the Game: Game.init()")}),i(e,"_setStepCounter",()=>{throw a.error("Method not implemented, you should initialize the Game: Game.init()"),new n("not_implemented","Method not implemented, you should initialize the Game: Game.init()")}),i(e,"_getCurrentGameStepState",()=>{throw a.error("Method not implemented, you should initialize the Game: Game.init()"),new n("not_implemented","Method not implemented, you should initialize the Game: Game.init()")}),i(e,"_restoreGameStepState",()=>{throw a.error("Method not implemented, you should initialize the Game: Game.init()"),new n("not_implemented","Method not implemented, you should initialize the Game: Game.init()")}),i(e,"_getOpenedLabels",()=>{throw a.error("Method not implemented, you should initialize the Game: Game.init()"),new n("not_implemented","Method not implemented, you should initialize the Game: Game.init()")}),i(e,"_onPreContinueHandlers",[]),i(e,"navigationRequestsCount",0),i(e,"processNavigationLock",Promise.resolve()),i(e,"_processNavigationRequests",()=>{throw a.error("Method not implemented, you should initialize the Game: Game.init()"),new n("not_implemented","Method not implemented, you should initialize the Game: Game.init()")}),i(e,"_getVariable",()=>{throw a.error("Method not implemented, you should initialize the Game: Game.init()"),new n("not_implemented","Method not implemented, you should initialize the Game: Game.init()")}),i(e,"_setVariable",()=>{throw a.error("Method not implemented, you should initialize the Game: Game.init()"),new n("not_implemented","Method not implemented, you should initialize the Game: Game.init()")}),i(e,"_removeVariable",()=>{throw a.error("Method not implemented, you should initialize the Game: Game.init()"),new n("not_implemented","Method not implemented, you should initialize the Game: Game.init()")}),i(e,"_getFlag",()=>{throw a.error("Method not implemented, you should initialize the Game: Game.init()"),new n("not_implemented","Method not implemented, you should initialize the Game: Game.init()")}),i(e,"_setFlag",()=>{throw a.error("Method not implemented, you should initialize the Game: Game.init()"),new n("not_implemented","Method not implemented, you should initialize the Game: Game.init()")}),i(e,"_onLabelClosing",()=>{}),i(e,"_addHistoryItem",()=>{throw a.error("Method not implemented, you should initialize the Game: Game.init()"),new n("not_implemented","Method not implemented, you should initialize the Game: Game.init()")}),i(e,"runningStepsCount",0),i(e,"_getCharacter",()=>{throw a.error("Method not implemented, you should initialize the Game: Game.init()"),new n("not_implemented","Method not implemented.")}),i(e,"onEnd"),i(e,"onError"),i(e,"_animate",()=>{throw a.error("Method not implemented, you should initialize the Game: Game.init()"),new n("not_implemented","Method not implemented, you should initialize the Game: Game.init()")});var d=e;export{d as GameUnifier,n as PixiError};
package/dist/index.cjs CHANGED
@@ -1,4 +1,4 @@
1
- 'use strict';Object.defineProperty(exports,'__esModule',{value:true});var I=require('@drincs/pixi-vn/canvas'),Bt=require('@drincs/pixi-vn/characters'),core=require('@drincs/pixi-vn/core'),tt=require('@drincs/pixi-vn/history'),j=require('@drincs/pixi-vn/narration'),ct=require('@drincs/pixi-vn/sound'),N=require('@drincs/pixi-vn/storage'),motion=require('@drincs/pixi-vn/motion');function _interopNamespace(e){if(e&&e.__esModule)return e;var n=Object.create(null);if(e){Object.keys(e).forEach(function(k){if(k!=='default'){var d=Object.getOwnPropertyDescriptor(e,k);Object.defineProperty(n,k,d.get?d:{enumerable:true,get:function(){return e[k]}});}})}n.default=e;return Object.freeze(n)}var I__namespace=/*#__PURE__*/_interopNamespace(I);var Bt__namespace=/*#__PURE__*/_interopNamespace(Bt);var tt__namespace=/*#__PURE__*/_interopNamespace(tt);var j__namespace=/*#__PURE__*/_interopNamespace(j);var ct__namespace=/*#__PURE__*/_interopNamespace(ct);var N__namespace=/*#__PURE__*/_interopNamespace(N);var Xt=Object.defineProperty;var Yt=l=>{throw TypeError(l)};var he=(l,e,i)=>e in l?Xt(l,e,{enumerable:true,configurable:true,writable:true,value:i}):l[e]=i;var le=(l,e)=>{for(var i in e)Xt(l,i,{get:e[i],enumerable:true});};var w=(l,e,i)=>he(l,typeof e!="symbol"?e+"":e,i),zt=(l,e,i)=>e.has(l)||Yt("Cannot "+i);var t=(l,e,i)=>(zt(l,e,"read from private field"),i?i.call(l):e.get(l)),g=(l,e,i)=>e.has(l)?Yt("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(l):e.set(l,i),p=(l,e,i,s)=>(zt(l,e,"write to private field"),e.set(l,i),i),c=(l,e,i)=>(zt(l,e,"access private method"),i);var Dt=(l,e,i,s)=>({set _(o){p(l,e,o);},get _(){return t(l,e,s)}});var ce=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,te=new Set,It=typeof process=="object"&&process?process:{},ee=(l,e,i,s)=>{typeof It.emitWarning=="function"?It.emitWarning(l,e,i,s):console.error(`[${i}] ${e}: ${l}`);},Pt=globalThis.AbortController,Jt=globalThis.AbortSignal;if(typeof Pt>"u"){Jt=class{constructor(){w(this,"onabort");w(this,"_onabort",[]);w(this,"reason");w(this,"aborted",false);}addEventListener(i,s){this._onabort.push(s);}},Pt=class{constructor(){w(this,"signal",new Jt);e();}abort(i){if(!this.signal.aborted){this.signal.reason=i,this.signal.aborted=true;for(let s of this.signal._onabort)s(i);this.signal.onabort?.(i);}}};let l=It.env?.LRU_CACHE_IGNORE_AC_WARNING!=="1",e=()=>{l&&(l=false,ee("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",e));};}var pe=l=>!te.has(l);var ot=l=>l&&l===Math.floor(l)&&l>0&&isFinite(l),ie=l=>ot(l)?l<=Math.pow(2,8)?Uint8Array:l<=Math.pow(2,16)?Uint16Array:l<=Math.pow(2,32)?Uint32Array:l<=Number.MAX_SAFE_INTEGER?Ct:null:null,Ct=class extends Array{constructor(l){super(l),this.fill(0);}},et,_t,de=(et=class{constructor(e,i){w(this,"heap");w(this,"length");if(!t(et,_t))throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new i(e),this.length=0;}static create(e){let i=ie(e);if(!i)return [];p(et,_t,true);let s=new et(e,i);return p(et,_t,false),s}push(e){this.heap[this.length++]=e;}pop(){return this.heap[--this.length]}},_t=new WeakMap,g(et,_t,false),et),Qt,Zt,q,M,K,pt,$,yt,St,B,D,X,T,E,m,L,V,P,C,Y,F,J,Q,W,H,Z,lt,z,xt,h,Nt,dt,st,Ut,k,re,ut,wt,Ot,nt,at,Gt,Ft,jt,A,Mt,Et,ht,Vt,bt,se=(bt=class{constructor(e){g(this,h);g(this,q);g(this,M);g(this,K);g(this,pt);g(this,$);g(this,yt);g(this,St);g(this,B);w(this,"ttl");w(this,"ttlResolution");w(this,"ttlAutopurge");w(this,"updateAgeOnGet");w(this,"updateAgeOnHas");w(this,"allowStale");w(this,"noDisposeOnSet");w(this,"noUpdateTTL");w(this,"maxEntrySize");w(this,"sizeCalculation");w(this,"noDeleteOnFetchRejection");w(this,"noDeleteOnStaleGet");w(this,"allowStaleOnFetchAbort");w(this,"allowStaleOnFetchRejection");w(this,"ignoreFetchAbort");g(this,D);g(this,X);g(this,T);g(this,E);g(this,m);g(this,L);g(this,V);g(this,P);g(this,C);g(this,Y);g(this,F);g(this,J);g(this,Q);g(this,W);g(this,H);g(this,Z);g(this,lt);g(this,z);g(this,xt);g(this,dt,()=>{});g(this,st,()=>{});g(this,Ut,()=>{});g(this,k,()=>false);g(this,ut,e=>{});g(this,wt,(e,i,s)=>{});g(this,Ot,(e,i,s,o)=>{if(s||o)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0});w(this,Qt,"LRUCache");let{max:i=0,ttl:s,ttlResolution:o=1,ttlAutopurge:a,updateAgeOnGet:r,updateAgeOnHas:d,allowStale:f,dispose:S,onInsert:R,disposeAfter:b,noDisposeOnSet:it,noUpdateTTL:G,maxSize:u=0,maxEntrySize:y=0,sizeCalculation:v,fetchMethod:n,memoMethod:_,noDeleteOnFetchRejection:U,noDeleteOnStaleGet:O,allowStaleOnFetchRejection:x,allowStaleOnFetchAbort:rt,ignoreFetchAbort:mt,perf:gt}=e;if(gt!==void 0&&typeof gt?.now!="function")throw new TypeError("perf option must have a now() method if specified");if(p(this,B,gt??ce),i!==0&&!ot(i))throw new TypeError("max option must be a nonnegative integer");let vt=i?ie(i):Array;if(!vt)throw new Error("invalid max value: "+i);if(p(this,q,i),p(this,M,u),this.maxEntrySize=y||t(this,M),this.sizeCalculation=v,this.sizeCalculation){if(!t(this,M)&&!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(_!==void 0&&typeof _!="function")throw new TypeError("memoMethod must be a function if defined");if(p(this,St,_),n!==void 0&&typeof n!="function")throw new TypeError("fetchMethod must be a function if specified");if(p(this,yt,n),p(this,lt,!!n),p(this,T,new Map),p(this,E,new Array(i).fill(void 0)),p(this,m,new Array(i).fill(void 0)),p(this,L,new vt(i)),p(this,V,new vt(i)),p(this,P,0),p(this,C,0),p(this,Y,de.create(i)),p(this,D,0),p(this,X,0),typeof S=="function"&&p(this,K,S),typeof R=="function"&&p(this,pt,R),typeof b=="function"?(p(this,$,b),p(this,F,[])):(p(this,$,void 0),p(this,F,void 0)),p(this,Z,!!t(this,K)),p(this,xt,!!t(this,pt)),p(this,z,!!t(this,$)),this.noDisposeOnSet=!!it,this.noUpdateTTL=!!G,this.noDeleteOnFetchRejection=!!U,this.allowStaleOnFetchRejection=!!x,this.allowStaleOnFetchAbort=!!rt,this.ignoreFetchAbort=!!mt,this.maxEntrySize!==0){if(t(this,M)!==0&&!ot(t(this,M)))throw new TypeError("maxSize must be a positive integer if specified");if(!ot(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");c(this,h,re).call(this);}if(this.allowStale=!!f,this.noDeleteOnStaleGet=!!O,this.updateAgeOnGet=!!r,this.updateAgeOnHas=!!d,this.ttlResolution=ot(o)||o===0?o:1,this.ttlAutopurge=!!a,this.ttl=s||0,this.ttl){if(!ot(this.ttl))throw new TypeError("ttl must be a positive integer if specified");c(this,h,Nt).call(this);}if(t(this,q)===0&&this.ttl===0&&t(this,M)===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!t(this,q)&&!t(this,M)){let Lt="LRU_CACHE_UNBOUNDED";pe(Lt)&&(te.add(Lt),ee("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",Lt,bt));}}get perf(){return t(this,B)}static unsafeExposeInternals(e){return {starts:t(e,Q),ttls:t(e,W),autopurgeTimers:t(e,H),sizes:t(e,J),keyMap:t(e,T),keyList:t(e,E),valList:t(e,m),next:t(e,L),prev:t(e,V),get head(){return t(e,P)},get tail(){return t(e,C)},free:t(e,Y),isBackgroundFetch:i=>{var s;return c(s=e,h,A).call(s,i)},backgroundFetch:(i,s,o,a)=>{var r;return c(r=e,h,jt).call(r,i,s,o,a)},moveToTail:i=>{var s;return c(s=e,h,Et).call(s,i)},indexes:i=>{var s;return c(s=e,h,nt).call(s,i)},rindexes:i=>{var s;return c(s=e,h,at).call(s,i)},isStale:i=>{var s;return t(s=e,k).call(s,i)}}}get max(){return t(this,q)}get maxSize(){return t(this,M)}get calculatedSize(){return t(this,X)}get size(){return t(this,D)}get fetchMethod(){return t(this,yt)}get memoMethod(){return t(this,St)}get dispose(){return t(this,K)}get onInsert(){return t(this,pt)}get disposeAfter(){return t(this,$)}getRemainingTTL(e){return t(this,T).has(e)?1/0:0}*entries(){for(let e of c(this,h,nt).call(this))t(this,m)[e]!==void 0&&t(this,E)[e]!==void 0&&!c(this,h,A).call(this,t(this,m)[e])&&(yield [t(this,E)[e],t(this,m)[e]]);}*rentries(){for(let e of c(this,h,at).call(this))t(this,m)[e]!==void 0&&t(this,E)[e]!==void 0&&!c(this,h,A).call(this,t(this,m)[e])&&(yield [t(this,E)[e],t(this,m)[e]]);}*keys(){for(let e of c(this,h,nt).call(this)){let i=t(this,E)[e];i!==void 0&&!c(this,h,A).call(this,t(this,m)[e])&&(yield i);}}*rkeys(){for(let e of c(this,h,at).call(this)){let i=t(this,E)[e];i!==void 0&&!c(this,h,A).call(this,t(this,m)[e])&&(yield i);}}*values(){for(let e of c(this,h,nt).call(this))t(this,m)[e]!==void 0&&!c(this,h,A).call(this,t(this,m)[e])&&(yield t(this,m)[e]);}*rvalues(){for(let e of c(this,h,at).call(this))t(this,m)[e]!==void 0&&!c(this,h,A).call(this,t(this,m)[e])&&(yield t(this,m)[e]);}[(Zt=Symbol.iterator,Qt=Symbol.toStringTag,Zt)](){return this.entries()}find(e,i={}){for(let s of c(this,h,nt).call(this)){let o=t(this,m)[s],a=c(this,h,A).call(this,o)?o.__staleWhileFetching:o;if(a!==void 0&&e(a,t(this,E)[s],this))return this.get(t(this,E)[s],i)}}forEach(e,i=this){for(let s of c(this,h,nt).call(this)){let o=t(this,m)[s],a=c(this,h,A).call(this,o)?o.__staleWhileFetching:o;a!==void 0&&e.call(i,a,t(this,E)[s],this);}}rforEach(e,i=this){for(let s of c(this,h,at).call(this)){let o=t(this,m)[s],a=c(this,h,A).call(this,o)?o.__staleWhileFetching:o;a!==void 0&&e.call(i,a,t(this,E)[s],this);}}purgeStale(){let e=false;for(let i of c(this,h,at).call(this,{allowStale:true}))t(this,k).call(this,i)&&(c(this,h,ht).call(this,t(this,E)[i],"expire"),e=true);return e}info(e){let i=t(this,T).get(e);if(i===void 0)return;let s=t(this,m)[i],o=c(this,h,A).call(this,s)?s.__staleWhileFetching:s;if(o===void 0)return;let a={value:o};if(t(this,W)&&t(this,Q)){let r=t(this,W)[i],d=t(this,Q)[i];if(r&&d){let f=r-(t(this,B).now()-d);a.ttl=f,a.start=Date.now();}}return t(this,J)&&(a.size=t(this,J)[i]),a}dump(){let e=[];for(let i of c(this,h,nt).call(this,{allowStale:true})){let s=t(this,E)[i],o=t(this,m)[i],a=c(this,h,A).call(this,o)?o.__staleWhileFetching:o;if(a===void 0||s===void 0)continue;let r={value:a};if(t(this,W)&&t(this,Q)){r.ttl=t(this,W)[i];let d=t(this,B).now()-t(this,Q)[i];r.start=Math.floor(Date.now()-d);}t(this,J)&&(r.size=t(this,J)[i]),e.unshift([s,r]);}return e}load(e){this.clear();for(let[i,s]of e){if(s.start){let o=Date.now()-s.start;s.start=t(this,B).now()-o;}this.set(i,s.value,s);}}set(e,i,s={}){var it,G,u,y;if(i===void 0)return this.delete(e),this;let{ttl:o=this.ttl,start:a,noDisposeOnSet:r=this.noDisposeOnSet,sizeCalculation:d=this.sizeCalculation,status:f}=s,{noUpdateTTL:S=this.noUpdateTTL}=s,R=t(this,Ot).call(this,e,i,s.size||0,d);if(this.maxEntrySize&&R>this.maxEntrySize)return f&&(f.set="miss",f.maxEntrySizeExceeded=true),c(this,h,ht).call(this,e,"set"),this;let b=t(this,D)===0?void 0:t(this,T).get(e);if(b===void 0)b=t(this,D)===0?t(this,C):t(this,Y).length!==0?t(this,Y).pop():t(this,D)===t(this,q)?c(this,h,Ft).call(this,false):t(this,D),t(this,E)[b]=e,t(this,m)[b]=i,t(this,T).set(e,b),t(this,L)[t(this,C)]=b,t(this,V)[b]=t(this,C),p(this,C,b),Dt(this,D)._++,t(this,wt).call(this,b,R,f),f&&(f.set="add"),S=false,t(this,xt)&&((it=t(this,pt))==null||it.call(this,i,e,"add"));else {c(this,h,Et).call(this,b);let v=t(this,m)[b];if(i!==v){if(t(this,lt)&&c(this,h,A).call(this,v)){v.__abortController.abort(new Error("replaced"));let{__staleWhileFetching:n}=v;n!==void 0&&!r&&(t(this,Z)&&((G=t(this,K))==null||G.call(this,n,e,"set")),t(this,z)&&t(this,F)?.push([n,e,"set"]));}else r||(t(this,Z)&&((u=t(this,K))==null||u.call(this,v,e,"set")),t(this,z)&&t(this,F)?.push([v,e,"set"]));if(t(this,ut).call(this,b),t(this,wt).call(this,b,R,f),t(this,m)[b]=i,f){f.set="replace";let n=v&&c(this,h,A).call(this,v)?v.__staleWhileFetching:v;n!==void 0&&(f.oldValue=n);}}else f&&(f.set="update");t(this,xt)&&this.onInsert?.(i,e,i===v?"update":"replace");}if(o!==0&&!t(this,W)&&c(this,h,Nt).call(this),t(this,W)&&(S||t(this,Ut).call(this,b,o,a),f&&t(this,st).call(this,f,b)),!r&&t(this,z)&&t(this,F)){let v=t(this,F),n;for(;n=v?.shift();)(y=t(this,$))==null||y.call(this,...n);}return this}pop(){var e;try{for(;t(this,D);){let i=t(this,m)[t(this,P)];if(c(this,h,Ft).call(this,!0),c(this,h,A).call(this,i)){if(i.__staleWhileFetching)return i.__staleWhileFetching}else if(i!==void 0)return i}}finally{if(t(this,z)&&t(this,F)){let i=t(this,F),s;for(;s=i?.shift();)(e=t(this,$))==null||e.call(this,...s);}}}has(e,i={}){let{updateAgeOnHas:s=this.updateAgeOnHas,status:o}=i,a=t(this,T).get(e);if(a!==void 0){let r=t(this,m)[a];if(c(this,h,A).call(this,r)&&r.__staleWhileFetching===void 0)return false;if(t(this,k).call(this,a))o&&(o.has="stale",t(this,st).call(this,o,a));else return s&&t(this,dt).call(this,a),o&&(o.has="hit",t(this,st).call(this,o,a)),true}else o&&(o.has="miss");return false}peek(e,i={}){let{allowStale:s=this.allowStale}=i,o=t(this,T).get(e);if(o===void 0||!s&&t(this,k).call(this,o))return;let a=t(this,m)[o];return c(this,h,A).call(this,a)?a.__staleWhileFetching:a}async fetch(e,i={}){let{allowStale:s=this.allowStale,updateAgeOnGet:o=this.updateAgeOnGet,noDeleteOnStaleGet:a=this.noDeleteOnStaleGet,ttl:r=this.ttl,noDisposeOnSet:d=this.noDisposeOnSet,size:f=0,sizeCalculation:S=this.sizeCalculation,noUpdateTTL:R=this.noUpdateTTL,noDeleteOnFetchRejection:b=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:it=this.allowStaleOnFetchRejection,ignoreFetchAbort:G=this.ignoreFetchAbort,allowStaleOnFetchAbort:u=this.allowStaleOnFetchAbort,context:y,forceRefresh:v=false,status:n,signal:_}=i;if(!t(this,lt))return n&&(n.fetch="get"),this.get(e,{allowStale:s,updateAgeOnGet:o,noDeleteOnStaleGet:a,status:n});let U={allowStale:s,updateAgeOnGet:o,noDeleteOnStaleGet:a,ttl:r,noDisposeOnSet:d,size:f,sizeCalculation:S,noUpdateTTL:R,noDeleteOnFetchRejection:b,allowStaleOnFetchRejection:it,allowStaleOnFetchAbort:u,ignoreFetchAbort:G,status:n,signal:_},O=t(this,T).get(e);if(O===void 0){n&&(n.fetch="miss");let x=c(this,h,jt).call(this,e,O,U,y);return x.__returned=x}else {let x=t(this,m)[O];if(c(this,h,A).call(this,x)){let vt=s&&x.__staleWhileFetching!==void 0;return n&&(n.fetch="inflight",vt&&(n.returnedStale=true)),vt?x.__staleWhileFetching:x.__returned=x}let rt=t(this,k).call(this,O);if(!v&&!rt)return n&&(n.fetch="hit"),c(this,h,Et).call(this,O),o&&t(this,dt).call(this,O),n&&t(this,st).call(this,n,O),x;let mt=c(this,h,jt).call(this,e,O,U,y),gt=mt.__staleWhileFetching!==void 0&&s;return n&&(n.fetch=rt?"stale":"refresh",gt&&rt&&(n.returnedStale=true)),gt?mt.__staleWhileFetching:mt.__returned=mt}}async forceFetch(e,i={}){let s=await this.fetch(e,i);if(s===void 0)throw new Error("fetch() returned undefined");return s}memo(e,i={}){let s=t(this,St);if(!s)throw new Error("no memoMethod provided to constructor");let{context:o,forceRefresh:a,...r}=i,d=this.get(e,r);if(!a&&d!==void 0)return d;let f=s(e,d,{options:r,context:o});return this.set(e,f,r),f}get(e,i={}){let{allowStale:s=this.allowStale,updateAgeOnGet:o=this.updateAgeOnGet,noDeleteOnStaleGet:a=this.noDeleteOnStaleGet,status:r}=i,d=t(this,T).get(e);if(d!==void 0){let f=t(this,m)[d],S=c(this,h,A).call(this,f);return r&&t(this,st).call(this,r,d),t(this,k).call(this,d)?(r&&(r.get="stale"),S?(r&&s&&f.__staleWhileFetching!==void 0&&(r.returnedStale=true),s?f.__staleWhileFetching:void 0):(a||c(this,h,ht).call(this,e,"expire"),r&&s&&(r.returnedStale=true),s?f:void 0)):(r&&(r.get="hit"),S?f.__staleWhileFetching:(c(this,h,Et).call(this,d),o&&t(this,dt).call(this,d),f))}else r&&(r.get="miss");}delete(e){return c(this,h,ht).call(this,e,"delete")}clear(){return c(this,h,Vt).call(this,"delete")}},q=new WeakMap,M=new WeakMap,K=new WeakMap,pt=new WeakMap,$=new WeakMap,yt=new WeakMap,St=new WeakMap,B=new WeakMap,D=new WeakMap,X=new WeakMap,T=new WeakMap,E=new WeakMap,m=new WeakMap,L=new WeakMap,V=new WeakMap,P=new WeakMap,C=new WeakMap,Y=new WeakMap,F=new WeakMap,J=new WeakMap,Q=new WeakMap,W=new WeakMap,H=new WeakMap,Z=new WeakMap,lt=new WeakMap,z=new WeakMap,xt=new WeakMap,h=new WeakSet,Nt=function(){let e=new Ct(t(this,q)),i=new Ct(t(this,q));p(this,W,e),p(this,Q,i);let s=this.ttlAutopurge?new Array(t(this,q)):void 0;p(this,H,s),p(this,Ut,(r,d,f=t(this,B).now())=>{if(i[r]=d!==0?f:0,e[r]=d,s?.[r]&&(clearTimeout(s[r]),s[r]=void 0),d!==0&&s){let S=setTimeout(()=>{t(this,k).call(this,r)&&c(this,h,ht).call(this,t(this,E)[r],"expire");},d+1);S.unref&&S.unref(),s[r]=S;}}),p(this,dt,r=>{i[r]=e[r]!==0?t(this,B).now():0;}),p(this,st,(r,d)=>{if(e[d]){let f=e[d],S=i[d];if(!f||!S)return;r.ttl=f,r.start=S,r.now=o||a();let R=r.now-S;r.remainingTTL=f-R;}});let o=0,a=()=>{let r=t(this,B).now();if(this.ttlResolution>0){o=r;let d=setTimeout(()=>o=0,this.ttlResolution);d.unref&&d.unref();}return r};this.getRemainingTTL=r=>{let d=t(this,T).get(r);if(d===void 0)return 0;let f=e[d],S=i[d];if(!f||!S)return 1/0;let R=(o||a())-S;return f-R},p(this,k,r=>{let d=i[r],f=e[r];return !!f&&!!d&&(o||a())-d>f});},dt=new WeakMap,st=new WeakMap,Ut=new WeakMap,k=new WeakMap,re=function(){let e=new Ct(t(this,q));p(this,X,0),p(this,J,e),p(this,ut,i=>{p(this,X,t(this,X)-e[i]),e[i]=0;}),p(this,Ot,(i,s,o,a)=>{if(c(this,h,A).call(this,s))return 0;if(!ot(o))if(a){if(typeof a!="function")throw new TypeError("sizeCalculation must be a function");if(o=a(s,i),!ot(o))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 o}),p(this,wt,(i,s,o)=>{if(e[i]=s,t(this,M)){let a=t(this,M)-e[i];for(;t(this,X)>a;)c(this,h,Ft).call(this,true);}p(this,X,t(this,X)+e[i]),o&&(o.entrySize=s,o.totalCalculatedSize=t(this,X));});},ut=new WeakMap,wt=new WeakMap,Ot=new WeakMap,nt=function*({allowStale:e=this.allowStale}={}){if(t(this,D))for(let i=t(this,C);!(!c(this,h,Gt).call(this,i)||((e||!t(this,k).call(this,i))&&(yield i),i===t(this,P)));)i=t(this,V)[i];},at=function*({allowStale:e=this.allowStale}={}){if(t(this,D))for(let i=t(this,P);!(!c(this,h,Gt).call(this,i)||((e||!t(this,k).call(this,i))&&(yield i),i===t(this,C)));)i=t(this,L)[i];},Gt=function(e){return e!==void 0&&t(this,T).get(t(this,E)[e])===e},Ft=function(e){var a;let i=t(this,P),s=t(this,E)[i],o=t(this,m)[i];return t(this,lt)&&c(this,h,A).call(this,o)?o.__abortController.abort(new Error("evicted")):(t(this,Z)||t(this,z))&&(t(this,Z)&&((a=t(this,K))==null||a.call(this,o,s,"evict")),t(this,z)&&t(this,F)?.push([o,s,"evict"])),t(this,ut).call(this,i),t(this,H)?.[i]&&(clearTimeout(t(this,H)[i]),t(this,H)[i]=void 0),e&&(t(this,E)[i]=void 0,t(this,m)[i]=void 0,t(this,Y).push(i)),t(this,D)===1?(p(this,P,p(this,C,0)),t(this,Y).length=0):p(this,P,t(this,L)[i]),t(this,T).delete(s),Dt(this,D)._--,i},jt=function(e,i,s,o){let a=i===void 0?void 0:t(this,m)[i];if(c(this,h,A).call(this,a))return a;let r=new Pt,{signal:d}=s;d?.addEventListener("abort",()=>r.abort(d.reason),{signal:r.signal});let f={signal:r.signal,options:s,context:o},S=(y,v=false)=>{let{aborted:n}=r.signal,_=s.ignoreFetchAbort&&y!==void 0,U=s.ignoreFetchAbort||!!(s.allowStaleOnFetchAbort&&y!==void 0);if(s.status&&(n&&!v?(s.status.fetchAborted=true,s.status.fetchError=r.signal.reason,_&&(s.status.fetchAbortIgnored=true)):s.status.fetchResolved=true),n&&!_&&!v)return b(r.signal.reason,U);let O=G,x=t(this,m)[i];return (x===G||_&&v&&x===void 0)&&(y===void 0?O.__staleWhileFetching!==void 0?t(this,m)[i]=O.__staleWhileFetching:c(this,h,ht).call(this,e,"fetch"):(s.status&&(s.status.fetchUpdated=true),this.set(e,y,f.options))),y},R=y=>(s.status&&(s.status.fetchRejected=true,s.status.fetchError=y),b(y,false)),b=(y,v)=>{let{aborted:n}=r.signal,_=n&&s.allowStaleOnFetchAbort,U=_||s.allowStaleOnFetchRejection,O=U||s.noDeleteOnFetchRejection,x=G;if(t(this,m)[i]===G&&(!O||!v&&x.__staleWhileFetching===void 0?c(this,h,ht).call(this,e,"fetch"):_||(t(this,m)[i]=x.__staleWhileFetching)),U)return s.status&&x.__staleWhileFetching!==void 0&&(s.status.returnedStale=true),x.__staleWhileFetching;if(x.__returned===x)throw y},it=(y,v)=>{var _;let n=(_=t(this,yt))==null?void 0:_.call(this,e,a,f);n&&n instanceof Promise&&n.then(U=>y(U===void 0?void 0:U),v),r.signal.addEventListener("abort",()=>{(!s.ignoreFetchAbort||s.allowStaleOnFetchAbort)&&(y(void 0),s.allowStaleOnFetchAbort&&(y=U=>S(U,true)));});};s.status&&(s.status.fetchDispatched=true);let G=new Promise(it).then(S,R),u=Object.assign(G,{__abortController:r,__staleWhileFetching:a,__returned:void 0});return i===void 0?(this.set(e,u,{...f.options,status:void 0}),i=t(this,T).get(e)):t(this,m)[i]=u,u},A=function(e){if(!t(this,lt))return false;let i=e;return !!i&&i instanceof Promise&&i.hasOwnProperty("__staleWhileFetching")&&i.__abortController instanceof Pt},Mt=function(e,i){t(this,V)[i]=e,t(this,L)[e]=i;},Et=function(e){e!==t(this,C)&&(e===t(this,P)?p(this,P,t(this,L)[e]):c(this,h,Mt).call(this,t(this,V)[e],t(this,L)[e]),c(this,h,Mt).call(this,t(this,C),e),p(this,C,e));},ht=function(e,i){var o,a;let s=false;if(t(this,D)!==0){let r=t(this,T).get(e);if(r!==void 0)if(t(this,H)?.[r]&&(clearTimeout(t(this,H)?.[r]),t(this,H)[r]=void 0),s=true,t(this,D)===1)c(this,h,Vt).call(this,i);else {t(this,ut).call(this,r);let d=t(this,m)[r];if(c(this,h,A).call(this,d)?d.__abortController.abort(new Error("deleted")):(t(this,Z)||t(this,z))&&(t(this,Z)&&((o=t(this,K))==null||o.call(this,d,e,i)),t(this,z)&&t(this,F)?.push([d,e,i])),t(this,T).delete(e),t(this,E)[r]=void 0,t(this,m)[r]=void 0,r===t(this,C))p(this,C,t(this,V)[r]);else if(r===t(this,P))p(this,P,t(this,L)[r]);else {let f=t(this,V)[r];t(this,L)[f]=t(this,L)[r];let S=t(this,L)[r];t(this,V)[S]=t(this,V)[r];}Dt(this,D)._--,t(this,Y).push(r);}}if(t(this,z)&&t(this,F)?.length){let r=t(this,F),d;for(;d=r?.shift();)(a=t(this,$))==null||a.call(this,...d);}return s},Vt=function(e){var i,s;for(let o of c(this,h,at).call(this,{allowStale:true})){let a=t(this,m)[o];if(c(this,h,A).call(this,a))a.__abortController.abort(new Error("deleted"));else {let r=t(this,E)[o];t(this,Z)&&((i=t(this,K))==null||i.call(this,a,r,e)),t(this,z)&&t(this,F)?.push([a,r,e]);}}if(t(this,T).clear(),t(this,m).fill(void 0),t(this,E).fill(void 0),t(this,W)&&t(this,Q)){t(this,W).fill(0),t(this,Q).fill(0);for(let o of t(this,H)??[])o!==void 0&&clearTimeout(o);t(this,H)?.fill(void 0);}if(t(this,J)&&t(this,J).fill(0),p(this,P,0),p(this,C,0),t(this,Y).length=0,p(this,X,0),p(this,D,0),t(this,z)&&t(this,F)){let o=t(this,F),a;for(;a=o?.shift();)(s=t(this,$))==null||s.call(this,...a);}},bt);var Rt=class{constructor(e){w(this,"cache");w(this,"map",new Map);this.cache=new se({max:e.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(e){let i=this.map.delete(e);return i&&this.cache.delete(e),i}get forEach(){return this.map.forEach}get(e){let i=this.cache.get(e);return i||this.map.get(e)}has(e){return this.map.has(e)}set(e,i){return this.map.set(e,i),this.cache.set(e,i),this}get size(){return this.map.size}entries(){return this.map.entries()}keys(){return this.map.keys()}values(){return this.map.values()}};var Tt="1.5.16";var Wt="repeat";function Ht(l){return {type:"pause",duration:l}}var kt="__game_layer__";var oe={};var qt={};le(qt,{createExportableElement:()=>ne});var At;(o=>(o.log=(a,...r)=>console.log(`[Pixi\u2019VN] ${a}`,...r),o.warn=(a,...r)=>console.warn(`[Pixi\u2019VN] ${a}`,...r),o.error=(a,...r)=>console.error(`[Pixi\u2019VN] ${a}`,...r),o.info=(a,...r)=>console.info(`[Pixi\u2019VN] ${a}`,...r)))(At||(At={}));function ne(l){try{if(typeof l>"u")return l;let e=JSON.stringify(l);return JSON.parse(e)}catch(e){throw At.error("Error creating exportable element",l,e),new core.PixiError("not_json_serializable","Error creating exportable element")}}function ae(){console.info(`
1
+ 'use strict';Object.defineProperty(exports,'__esModule',{value:true});var I=require('@drincs/pixi-vn/canvas'),Bt=require('@drincs/pixi-vn/characters'),core=require('@drincs/pixi-vn/core'),tt=require('@drincs/pixi-vn/history'),j=require('@drincs/pixi-vn/narration'),ct=require('@drincs/pixi-vn/sound'),N=require('@drincs/pixi-vn/storage'),motion=require('@drincs/pixi-vn/motion');function _interopNamespace(e){if(e&&e.__esModule)return e;var n=Object.create(null);if(e){Object.keys(e).forEach(function(k){if(k!=='default'){var d=Object.getOwnPropertyDescriptor(e,k);Object.defineProperty(n,k,d.get?d:{enumerable:true,get:function(){return e[k]}});}})}n.default=e;return Object.freeze(n)}var I__namespace=/*#__PURE__*/_interopNamespace(I);var Bt__namespace=/*#__PURE__*/_interopNamespace(Bt);var tt__namespace=/*#__PURE__*/_interopNamespace(tt);var j__namespace=/*#__PURE__*/_interopNamespace(j);var ct__namespace=/*#__PURE__*/_interopNamespace(ct);var N__namespace=/*#__PURE__*/_interopNamespace(N);var Xt=Object.defineProperty;var Yt=l=>{throw TypeError(l)};var he=(l,e,i)=>e in l?Xt(l,e,{enumerable:true,configurable:true,writable:true,value:i}):l[e]=i;var le=(l,e)=>{for(var i in e)Xt(l,i,{get:e[i],enumerable:true});};var w=(l,e,i)=>he(l,typeof e!="symbol"?e+"":e,i),zt=(l,e,i)=>e.has(l)||Yt("Cannot "+i);var t=(l,e,i)=>(zt(l,e,"read from private field"),i?i.call(l):e.get(l)),g=(l,e,i)=>e.has(l)?Yt("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(l):e.set(l,i),p=(l,e,i,s)=>(zt(l,e,"write to private field"),e.set(l,i),i),c=(l,e,i)=>(zt(l,e,"access private method"),i);var Dt=(l,e,i,s)=>({set _(o){p(l,e,o);},get _(){return t(l,e,s)}});var ce=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,te=new Set,It=typeof process=="object"&&process?process:{},ee=(l,e,i,s)=>{typeof It.emitWarning=="function"?It.emitWarning(l,e,i,s):console.error(`[${i}] ${e}: ${l}`);},Pt=globalThis.AbortController,Jt=globalThis.AbortSignal;if(typeof Pt>"u"){Jt=class{constructor(){w(this,"onabort");w(this,"_onabort",[]);w(this,"reason");w(this,"aborted",false);}addEventListener(i,s){this._onabort.push(s);}},Pt=class{constructor(){w(this,"signal",new Jt);e();}abort(i){if(!this.signal.aborted){this.signal.reason=i,this.signal.aborted=true;for(let s of this.signal._onabort)s(i);this.signal.onabort?.(i);}}};let l=It.env?.LRU_CACHE_IGNORE_AC_WARNING!=="1",e=()=>{l&&(l=false,ee("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",e));};}var pe=l=>!te.has(l);var ot=l=>l&&l===Math.floor(l)&&l>0&&isFinite(l),ie=l=>ot(l)?l<=Math.pow(2,8)?Uint8Array:l<=Math.pow(2,16)?Uint16Array:l<=Math.pow(2,32)?Uint32Array:l<=Number.MAX_SAFE_INTEGER?Ct:null:null,Ct=class extends Array{constructor(l){super(l),this.fill(0);}},et,_t,de=(et=class{constructor(e,i){w(this,"heap");w(this,"length");if(!t(et,_t))throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new i(e),this.length=0;}static create(e){let i=ie(e);if(!i)return [];p(et,_t,true);let s=new et(e,i);return p(et,_t,false),s}push(e){this.heap[this.length++]=e;}pop(){return this.heap[--this.length]}},_t=new WeakMap,g(et,_t,false),et),Qt,Zt,q,M,K,pt,$,yt,St,B,D,X,T,E,m,L,V,P,C,Y,F,J,Q,W,H,Z,lt,z,xt,h,Nt,dt,st,Ut,k,re,ut,wt,Ot,nt,at,Gt,Ft,jt,A,Mt,Et,ht,Vt,bt,se=(bt=class{constructor(e){g(this,h);g(this,q);g(this,M);g(this,K);g(this,pt);g(this,$);g(this,yt);g(this,St);g(this,B);w(this,"ttl");w(this,"ttlResolution");w(this,"ttlAutopurge");w(this,"updateAgeOnGet");w(this,"updateAgeOnHas");w(this,"allowStale");w(this,"noDisposeOnSet");w(this,"noUpdateTTL");w(this,"maxEntrySize");w(this,"sizeCalculation");w(this,"noDeleteOnFetchRejection");w(this,"noDeleteOnStaleGet");w(this,"allowStaleOnFetchAbort");w(this,"allowStaleOnFetchRejection");w(this,"ignoreFetchAbort");g(this,D);g(this,X);g(this,T);g(this,E);g(this,m);g(this,L);g(this,V);g(this,P);g(this,C);g(this,Y);g(this,F);g(this,J);g(this,Q);g(this,W);g(this,H);g(this,Z);g(this,lt);g(this,z);g(this,xt);g(this,dt,()=>{});g(this,st,()=>{});g(this,Ut,()=>{});g(this,k,()=>false);g(this,ut,e=>{});g(this,wt,(e,i,s)=>{});g(this,Ot,(e,i,s,o)=>{if(s||o)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0});w(this,Qt,"LRUCache");let{max:i=0,ttl:s,ttlResolution:o=1,ttlAutopurge:a,updateAgeOnGet:r,updateAgeOnHas:d,allowStale:f,dispose:S,onInsert:R,disposeAfter:b,noDisposeOnSet:it,noUpdateTTL:G,maxSize:u=0,maxEntrySize:y=0,sizeCalculation:v,fetchMethod:n,memoMethod:_,noDeleteOnFetchRejection:U,noDeleteOnStaleGet:O,allowStaleOnFetchRejection:x,allowStaleOnFetchAbort:rt,ignoreFetchAbort:mt,perf:gt}=e;if(gt!==void 0&&typeof gt?.now!="function")throw new TypeError("perf option must have a now() method if specified");if(p(this,B,gt??ce),i!==0&&!ot(i))throw new TypeError("max option must be a nonnegative integer");let vt=i?ie(i):Array;if(!vt)throw new Error("invalid max value: "+i);if(p(this,q,i),p(this,M,u),this.maxEntrySize=y||t(this,M),this.sizeCalculation=v,this.sizeCalculation){if(!t(this,M)&&!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(_!==void 0&&typeof _!="function")throw new TypeError("memoMethod must be a function if defined");if(p(this,St,_),n!==void 0&&typeof n!="function")throw new TypeError("fetchMethod must be a function if specified");if(p(this,yt,n),p(this,lt,!!n),p(this,T,new Map),p(this,E,new Array(i).fill(void 0)),p(this,m,new Array(i).fill(void 0)),p(this,L,new vt(i)),p(this,V,new vt(i)),p(this,P,0),p(this,C,0),p(this,Y,de.create(i)),p(this,D,0),p(this,X,0),typeof S=="function"&&p(this,K,S),typeof R=="function"&&p(this,pt,R),typeof b=="function"?(p(this,$,b),p(this,F,[])):(p(this,$,void 0),p(this,F,void 0)),p(this,Z,!!t(this,K)),p(this,xt,!!t(this,pt)),p(this,z,!!t(this,$)),this.noDisposeOnSet=!!it,this.noUpdateTTL=!!G,this.noDeleteOnFetchRejection=!!U,this.allowStaleOnFetchRejection=!!x,this.allowStaleOnFetchAbort=!!rt,this.ignoreFetchAbort=!!mt,this.maxEntrySize!==0){if(t(this,M)!==0&&!ot(t(this,M)))throw new TypeError("maxSize must be a positive integer if specified");if(!ot(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");c(this,h,re).call(this);}if(this.allowStale=!!f,this.noDeleteOnStaleGet=!!O,this.updateAgeOnGet=!!r,this.updateAgeOnHas=!!d,this.ttlResolution=ot(o)||o===0?o:1,this.ttlAutopurge=!!a,this.ttl=s||0,this.ttl){if(!ot(this.ttl))throw new TypeError("ttl must be a positive integer if specified");c(this,h,Nt).call(this);}if(t(this,q)===0&&this.ttl===0&&t(this,M)===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!t(this,q)&&!t(this,M)){let Lt="LRU_CACHE_UNBOUNDED";pe(Lt)&&(te.add(Lt),ee("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",Lt,bt));}}get perf(){return t(this,B)}static unsafeExposeInternals(e){return {starts:t(e,Q),ttls:t(e,W),autopurgeTimers:t(e,H),sizes:t(e,J),keyMap:t(e,T),keyList:t(e,E),valList:t(e,m),next:t(e,L),prev:t(e,V),get head(){return t(e,P)},get tail(){return t(e,C)},free:t(e,Y),isBackgroundFetch:i=>{var s;return c(s=e,h,A).call(s,i)},backgroundFetch:(i,s,o,a)=>{var r;return c(r=e,h,jt).call(r,i,s,o,a)},moveToTail:i=>{var s;return c(s=e,h,Et).call(s,i)},indexes:i=>{var s;return c(s=e,h,nt).call(s,i)},rindexes:i=>{var s;return c(s=e,h,at).call(s,i)},isStale:i=>{var s;return t(s=e,k).call(s,i)}}}get max(){return t(this,q)}get maxSize(){return t(this,M)}get calculatedSize(){return t(this,X)}get size(){return t(this,D)}get fetchMethod(){return t(this,yt)}get memoMethod(){return t(this,St)}get dispose(){return t(this,K)}get onInsert(){return t(this,pt)}get disposeAfter(){return t(this,$)}getRemainingTTL(e){return t(this,T).has(e)?1/0:0}*entries(){for(let e of c(this,h,nt).call(this))t(this,m)[e]!==void 0&&t(this,E)[e]!==void 0&&!c(this,h,A).call(this,t(this,m)[e])&&(yield [t(this,E)[e],t(this,m)[e]]);}*rentries(){for(let e of c(this,h,at).call(this))t(this,m)[e]!==void 0&&t(this,E)[e]!==void 0&&!c(this,h,A).call(this,t(this,m)[e])&&(yield [t(this,E)[e],t(this,m)[e]]);}*keys(){for(let e of c(this,h,nt).call(this)){let i=t(this,E)[e];i!==void 0&&!c(this,h,A).call(this,t(this,m)[e])&&(yield i);}}*rkeys(){for(let e of c(this,h,at).call(this)){let i=t(this,E)[e];i!==void 0&&!c(this,h,A).call(this,t(this,m)[e])&&(yield i);}}*values(){for(let e of c(this,h,nt).call(this))t(this,m)[e]!==void 0&&!c(this,h,A).call(this,t(this,m)[e])&&(yield t(this,m)[e]);}*rvalues(){for(let e of c(this,h,at).call(this))t(this,m)[e]!==void 0&&!c(this,h,A).call(this,t(this,m)[e])&&(yield t(this,m)[e]);}[(Zt=Symbol.iterator,Qt=Symbol.toStringTag,Zt)](){return this.entries()}find(e,i={}){for(let s of c(this,h,nt).call(this)){let o=t(this,m)[s],a=c(this,h,A).call(this,o)?o.__staleWhileFetching:o;if(a!==void 0&&e(a,t(this,E)[s],this))return this.get(t(this,E)[s],i)}}forEach(e,i=this){for(let s of c(this,h,nt).call(this)){let o=t(this,m)[s],a=c(this,h,A).call(this,o)?o.__staleWhileFetching:o;a!==void 0&&e.call(i,a,t(this,E)[s],this);}}rforEach(e,i=this){for(let s of c(this,h,at).call(this)){let o=t(this,m)[s],a=c(this,h,A).call(this,o)?o.__staleWhileFetching:o;a!==void 0&&e.call(i,a,t(this,E)[s],this);}}purgeStale(){let e=false;for(let i of c(this,h,at).call(this,{allowStale:true}))t(this,k).call(this,i)&&(c(this,h,ht).call(this,t(this,E)[i],"expire"),e=true);return e}info(e){let i=t(this,T).get(e);if(i===void 0)return;let s=t(this,m)[i],o=c(this,h,A).call(this,s)?s.__staleWhileFetching:s;if(o===void 0)return;let a={value:o};if(t(this,W)&&t(this,Q)){let r=t(this,W)[i],d=t(this,Q)[i];if(r&&d){let f=r-(t(this,B).now()-d);a.ttl=f,a.start=Date.now();}}return t(this,J)&&(a.size=t(this,J)[i]),a}dump(){let e=[];for(let i of c(this,h,nt).call(this,{allowStale:true})){let s=t(this,E)[i],o=t(this,m)[i],a=c(this,h,A).call(this,o)?o.__staleWhileFetching:o;if(a===void 0||s===void 0)continue;let r={value:a};if(t(this,W)&&t(this,Q)){r.ttl=t(this,W)[i];let d=t(this,B).now()-t(this,Q)[i];r.start=Math.floor(Date.now()-d);}t(this,J)&&(r.size=t(this,J)[i]),e.unshift([s,r]);}return e}load(e){this.clear();for(let[i,s]of e){if(s.start){let o=Date.now()-s.start;s.start=t(this,B).now()-o;}this.set(i,s.value,s);}}set(e,i,s={}){var it,G,u,y;if(i===void 0)return this.delete(e),this;let{ttl:o=this.ttl,start:a,noDisposeOnSet:r=this.noDisposeOnSet,sizeCalculation:d=this.sizeCalculation,status:f}=s,{noUpdateTTL:S=this.noUpdateTTL}=s,R=t(this,Ot).call(this,e,i,s.size||0,d);if(this.maxEntrySize&&R>this.maxEntrySize)return f&&(f.set="miss",f.maxEntrySizeExceeded=true),c(this,h,ht).call(this,e,"set"),this;let b=t(this,D)===0?void 0:t(this,T).get(e);if(b===void 0)b=t(this,D)===0?t(this,C):t(this,Y).length!==0?t(this,Y).pop():t(this,D)===t(this,q)?c(this,h,Ft).call(this,false):t(this,D),t(this,E)[b]=e,t(this,m)[b]=i,t(this,T).set(e,b),t(this,L)[t(this,C)]=b,t(this,V)[b]=t(this,C),p(this,C,b),Dt(this,D)._++,t(this,wt).call(this,b,R,f),f&&(f.set="add"),S=false,t(this,xt)&&((it=t(this,pt))==null||it.call(this,i,e,"add"));else {c(this,h,Et).call(this,b);let v=t(this,m)[b];if(i!==v){if(t(this,lt)&&c(this,h,A).call(this,v)){v.__abortController.abort(new Error("replaced"));let{__staleWhileFetching:n}=v;n!==void 0&&!r&&(t(this,Z)&&((G=t(this,K))==null||G.call(this,n,e,"set")),t(this,z)&&t(this,F)?.push([n,e,"set"]));}else r||(t(this,Z)&&((u=t(this,K))==null||u.call(this,v,e,"set")),t(this,z)&&t(this,F)?.push([v,e,"set"]));if(t(this,ut).call(this,b),t(this,wt).call(this,b,R,f),t(this,m)[b]=i,f){f.set="replace";let n=v&&c(this,h,A).call(this,v)?v.__staleWhileFetching:v;n!==void 0&&(f.oldValue=n);}}else f&&(f.set="update");t(this,xt)&&this.onInsert?.(i,e,i===v?"update":"replace");}if(o!==0&&!t(this,W)&&c(this,h,Nt).call(this),t(this,W)&&(S||t(this,Ut).call(this,b,o,a),f&&t(this,st).call(this,f,b)),!r&&t(this,z)&&t(this,F)){let v=t(this,F),n;for(;n=v?.shift();)(y=t(this,$))==null||y.call(this,...n);}return this}pop(){var e;try{for(;t(this,D);){let i=t(this,m)[t(this,P)];if(c(this,h,Ft).call(this,!0),c(this,h,A).call(this,i)){if(i.__staleWhileFetching)return i.__staleWhileFetching}else if(i!==void 0)return i}}finally{if(t(this,z)&&t(this,F)){let i=t(this,F),s;for(;s=i?.shift();)(e=t(this,$))==null||e.call(this,...s);}}}has(e,i={}){let{updateAgeOnHas:s=this.updateAgeOnHas,status:o}=i,a=t(this,T).get(e);if(a!==void 0){let r=t(this,m)[a];if(c(this,h,A).call(this,r)&&r.__staleWhileFetching===void 0)return false;if(t(this,k).call(this,a))o&&(o.has="stale",t(this,st).call(this,o,a));else return s&&t(this,dt).call(this,a),o&&(o.has="hit",t(this,st).call(this,o,a)),true}else o&&(o.has="miss");return false}peek(e,i={}){let{allowStale:s=this.allowStale}=i,o=t(this,T).get(e);if(o===void 0||!s&&t(this,k).call(this,o))return;let a=t(this,m)[o];return c(this,h,A).call(this,a)?a.__staleWhileFetching:a}async fetch(e,i={}){let{allowStale:s=this.allowStale,updateAgeOnGet:o=this.updateAgeOnGet,noDeleteOnStaleGet:a=this.noDeleteOnStaleGet,ttl:r=this.ttl,noDisposeOnSet:d=this.noDisposeOnSet,size:f=0,sizeCalculation:S=this.sizeCalculation,noUpdateTTL:R=this.noUpdateTTL,noDeleteOnFetchRejection:b=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:it=this.allowStaleOnFetchRejection,ignoreFetchAbort:G=this.ignoreFetchAbort,allowStaleOnFetchAbort:u=this.allowStaleOnFetchAbort,context:y,forceRefresh:v=false,status:n,signal:_}=i;if(!t(this,lt))return n&&(n.fetch="get"),this.get(e,{allowStale:s,updateAgeOnGet:o,noDeleteOnStaleGet:a,status:n});let U={allowStale:s,updateAgeOnGet:o,noDeleteOnStaleGet:a,ttl:r,noDisposeOnSet:d,size:f,sizeCalculation:S,noUpdateTTL:R,noDeleteOnFetchRejection:b,allowStaleOnFetchRejection:it,allowStaleOnFetchAbort:u,ignoreFetchAbort:G,status:n,signal:_},O=t(this,T).get(e);if(O===void 0){n&&(n.fetch="miss");let x=c(this,h,jt).call(this,e,O,U,y);return x.__returned=x}else {let x=t(this,m)[O];if(c(this,h,A).call(this,x)){let vt=s&&x.__staleWhileFetching!==void 0;return n&&(n.fetch="inflight",vt&&(n.returnedStale=true)),vt?x.__staleWhileFetching:x.__returned=x}let rt=t(this,k).call(this,O);if(!v&&!rt)return n&&(n.fetch="hit"),c(this,h,Et).call(this,O),o&&t(this,dt).call(this,O),n&&t(this,st).call(this,n,O),x;let mt=c(this,h,jt).call(this,e,O,U,y),gt=mt.__staleWhileFetching!==void 0&&s;return n&&(n.fetch=rt?"stale":"refresh",gt&&rt&&(n.returnedStale=true)),gt?mt.__staleWhileFetching:mt.__returned=mt}}async forceFetch(e,i={}){let s=await this.fetch(e,i);if(s===void 0)throw new Error("fetch() returned undefined");return s}memo(e,i={}){let s=t(this,St);if(!s)throw new Error("no memoMethod provided to constructor");let{context:o,forceRefresh:a,...r}=i,d=this.get(e,r);if(!a&&d!==void 0)return d;let f=s(e,d,{options:r,context:o});return this.set(e,f,r),f}get(e,i={}){let{allowStale:s=this.allowStale,updateAgeOnGet:o=this.updateAgeOnGet,noDeleteOnStaleGet:a=this.noDeleteOnStaleGet,status:r}=i,d=t(this,T).get(e);if(d!==void 0){let f=t(this,m)[d],S=c(this,h,A).call(this,f);return r&&t(this,st).call(this,r,d),t(this,k).call(this,d)?(r&&(r.get="stale"),S?(r&&s&&f.__staleWhileFetching!==void 0&&(r.returnedStale=true),s?f.__staleWhileFetching:void 0):(a||c(this,h,ht).call(this,e,"expire"),r&&s&&(r.returnedStale=true),s?f:void 0)):(r&&(r.get="hit"),S?f.__staleWhileFetching:(c(this,h,Et).call(this,d),o&&t(this,dt).call(this,d),f))}else r&&(r.get="miss");}delete(e){return c(this,h,ht).call(this,e,"delete")}clear(){return c(this,h,Vt).call(this,"delete")}},q=new WeakMap,M=new WeakMap,K=new WeakMap,pt=new WeakMap,$=new WeakMap,yt=new WeakMap,St=new WeakMap,B=new WeakMap,D=new WeakMap,X=new WeakMap,T=new WeakMap,E=new WeakMap,m=new WeakMap,L=new WeakMap,V=new WeakMap,P=new WeakMap,C=new WeakMap,Y=new WeakMap,F=new WeakMap,J=new WeakMap,Q=new WeakMap,W=new WeakMap,H=new WeakMap,Z=new WeakMap,lt=new WeakMap,z=new WeakMap,xt=new WeakMap,h=new WeakSet,Nt=function(){let e=new Ct(t(this,q)),i=new Ct(t(this,q));p(this,W,e),p(this,Q,i);let s=this.ttlAutopurge?new Array(t(this,q)):void 0;p(this,H,s),p(this,Ut,(r,d,f=t(this,B).now())=>{if(i[r]=d!==0?f:0,e[r]=d,s?.[r]&&(clearTimeout(s[r]),s[r]=void 0),d!==0&&s){let S=setTimeout(()=>{t(this,k).call(this,r)&&c(this,h,ht).call(this,t(this,E)[r],"expire");},d+1);S.unref&&S.unref(),s[r]=S;}}),p(this,dt,r=>{i[r]=e[r]!==0?t(this,B).now():0;}),p(this,st,(r,d)=>{if(e[d]){let f=e[d],S=i[d];if(!f||!S)return;r.ttl=f,r.start=S,r.now=o||a();let R=r.now-S;r.remainingTTL=f-R;}});let o=0,a=()=>{let r=t(this,B).now();if(this.ttlResolution>0){o=r;let d=setTimeout(()=>o=0,this.ttlResolution);d.unref&&d.unref();}return r};this.getRemainingTTL=r=>{let d=t(this,T).get(r);if(d===void 0)return 0;let f=e[d],S=i[d];if(!f||!S)return 1/0;let R=(o||a())-S;return f-R},p(this,k,r=>{let d=i[r],f=e[r];return !!f&&!!d&&(o||a())-d>f});},dt=new WeakMap,st=new WeakMap,Ut=new WeakMap,k=new WeakMap,re=function(){let e=new Ct(t(this,q));p(this,X,0),p(this,J,e),p(this,ut,i=>{p(this,X,t(this,X)-e[i]),e[i]=0;}),p(this,Ot,(i,s,o,a)=>{if(c(this,h,A).call(this,s))return 0;if(!ot(o))if(a){if(typeof a!="function")throw new TypeError("sizeCalculation must be a function");if(o=a(s,i),!ot(o))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 o}),p(this,wt,(i,s,o)=>{if(e[i]=s,t(this,M)){let a=t(this,M)-e[i];for(;t(this,X)>a;)c(this,h,Ft).call(this,true);}p(this,X,t(this,X)+e[i]),o&&(o.entrySize=s,o.totalCalculatedSize=t(this,X));});},ut=new WeakMap,wt=new WeakMap,Ot=new WeakMap,nt=function*({allowStale:e=this.allowStale}={}){if(t(this,D))for(let i=t(this,C);!(!c(this,h,Gt).call(this,i)||((e||!t(this,k).call(this,i))&&(yield i),i===t(this,P)));)i=t(this,V)[i];},at=function*({allowStale:e=this.allowStale}={}){if(t(this,D))for(let i=t(this,P);!(!c(this,h,Gt).call(this,i)||((e||!t(this,k).call(this,i))&&(yield i),i===t(this,C)));)i=t(this,L)[i];},Gt=function(e){return e!==void 0&&t(this,T).get(t(this,E)[e])===e},Ft=function(e){var a;let i=t(this,P),s=t(this,E)[i],o=t(this,m)[i];return t(this,lt)&&c(this,h,A).call(this,o)?o.__abortController.abort(new Error("evicted")):(t(this,Z)||t(this,z))&&(t(this,Z)&&((a=t(this,K))==null||a.call(this,o,s,"evict")),t(this,z)&&t(this,F)?.push([o,s,"evict"])),t(this,ut).call(this,i),t(this,H)?.[i]&&(clearTimeout(t(this,H)[i]),t(this,H)[i]=void 0),e&&(t(this,E)[i]=void 0,t(this,m)[i]=void 0,t(this,Y).push(i)),t(this,D)===1?(p(this,P,p(this,C,0)),t(this,Y).length=0):p(this,P,t(this,L)[i]),t(this,T).delete(s),Dt(this,D)._--,i},jt=function(e,i,s,o){let a=i===void 0?void 0:t(this,m)[i];if(c(this,h,A).call(this,a))return a;let r=new Pt,{signal:d}=s;d?.addEventListener("abort",()=>r.abort(d.reason),{signal:r.signal});let f={signal:r.signal,options:s,context:o},S=(y,v=false)=>{let{aborted:n}=r.signal,_=s.ignoreFetchAbort&&y!==void 0,U=s.ignoreFetchAbort||!!(s.allowStaleOnFetchAbort&&y!==void 0);if(s.status&&(n&&!v?(s.status.fetchAborted=true,s.status.fetchError=r.signal.reason,_&&(s.status.fetchAbortIgnored=true)):s.status.fetchResolved=true),n&&!_&&!v)return b(r.signal.reason,U);let O=G,x=t(this,m)[i];return (x===G||_&&v&&x===void 0)&&(y===void 0?O.__staleWhileFetching!==void 0?t(this,m)[i]=O.__staleWhileFetching:c(this,h,ht).call(this,e,"fetch"):(s.status&&(s.status.fetchUpdated=true),this.set(e,y,f.options))),y},R=y=>(s.status&&(s.status.fetchRejected=true,s.status.fetchError=y),b(y,false)),b=(y,v)=>{let{aborted:n}=r.signal,_=n&&s.allowStaleOnFetchAbort,U=_||s.allowStaleOnFetchRejection,O=U||s.noDeleteOnFetchRejection,x=G;if(t(this,m)[i]===G&&(!O||!v&&x.__staleWhileFetching===void 0?c(this,h,ht).call(this,e,"fetch"):_||(t(this,m)[i]=x.__staleWhileFetching)),U)return s.status&&x.__staleWhileFetching!==void 0&&(s.status.returnedStale=true),x.__staleWhileFetching;if(x.__returned===x)throw y},it=(y,v)=>{var _;let n=(_=t(this,yt))==null?void 0:_.call(this,e,a,f);n&&n instanceof Promise&&n.then(U=>y(U===void 0?void 0:U),v),r.signal.addEventListener("abort",()=>{(!s.ignoreFetchAbort||s.allowStaleOnFetchAbort)&&(y(void 0),s.allowStaleOnFetchAbort&&(y=U=>S(U,true)));});};s.status&&(s.status.fetchDispatched=true);let G=new Promise(it).then(S,R),u=Object.assign(G,{__abortController:r,__staleWhileFetching:a,__returned:void 0});return i===void 0?(this.set(e,u,{...f.options,status:void 0}),i=t(this,T).get(e)):t(this,m)[i]=u,u},A=function(e){if(!t(this,lt))return false;let i=e;return !!i&&i instanceof Promise&&i.hasOwnProperty("__staleWhileFetching")&&i.__abortController instanceof Pt},Mt=function(e,i){t(this,V)[i]=e,t(this,L)[e]=i;},Et=function(e){e!==t(this,C)&&(e===t(this,P)?p(this,P,t(this,L)[e]):c(this,h,Mt).call(this,t(this,V)[e],t(this,L)[e]),c(this,h,Mt).call(this,t(this,C),e),p(this,C,e));},ht=function(e,i){var o,a;let s=false;if(t(this,D)!==0){let r=t(this,T).get(e);if(r!==void 0)if(t(this,H)?.[r]&&(clearTimeout(t(this,H)?.[r]),t(this,H)[r]=void 0),s=true,t(this,D)===1)c(this,h,Vt).call(this,i);else {t(this,ut).call(this,r);let d=t(this,m)[r];if(c(this,h,A).call(this,d)?d.__abortController.abort(new Error("deleted")):(t(this,Z)||t(this,z))&&(t(this,Z)&&((o=t(this,K))==null||o.call(this,d,e,i)),t(this,z)&&t(this,F)?.push([d,e,i])),t(this,T).delete(e),t(this,E)[r]=void 0,t(this,m)[r]=void 0,r===t(this,C))p(this,C,t(this,V)[r]);else if(r===t(this,P))p(this,P,t(this,L)[r]);else {let f=t(this,V)[r];t(this,L)[f]=t(this,L)[r];let S=t(this,L)[r];t(this,V)[S]=t(this,V)[r];}Dt(this,D)._--,t(this,Y).push(r);}}if(t(this,z)&&t(this,F)?.length){let r=t(this,F),d;for(;d=r?.shift();)(a=t(this,$))==null||a.call(this,...d);}return s},Vt=function(e){var i,s;for(let o of c(this,h,at).call(this,{allowStale:true})){let a=t(this,m)[o];if(c(this,h,A).call(this,a))a.__abortController.abort(new Error("deleted"));else {let r=t(this,E)[o];t(this,Z)&&((i=t(this,K))==null||i.call(this,a,r,e)),t(this,z)&&t(this,F)?.push([a,r,e]);}}if(t(this,T).clear(),t(this,m).fill(void 0),t(this,E).fill(void 0),t(this,W)&&t(this,Q)){t(this,W).fill(0),t(this,Q).fill(0);for(let o of t(this,H)??[])o!==void 0&&clearTimeout(o);t(this,H)?.fill(void 0);}if(t(this,J)&&t(this,J).fill(0),p(this,P,0),p(this,C,0),t(this,Y).length=0,p(this,X,0),p(this,D,0),t(this,z)&&t(this,F)){let o=t(this,F),a;for(;a=o?.shift();)(s=t(this,$))==null||s.call(this,...a);}},bt);var Rt=class{constructor(e){w(this,"cache");w(this,"map",new Map);this.cache=new se({max:e.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(e){let i=this.map.delete(e);return i&&this.cache.delete(e),i}get forEach(){return this.map.forEach}get(e){let i=this.cache.get(e);return i||this.map.get(e)}has(e){return this.map.has(e)}set(e,i){return this.map.set(e,i),this.cache.set(e,i),this}get size(){return this.map.size}entries(){return this.map.entries()}keys(){return this.map.keys()}values(){return this.map.values()}};var Tt="1.5.17";var Wt="repeat";function Ht(l){return {type:"pause",duration:l}}var kt="__game_layer__";var oe={};var qt={};le(qt,{createExportableElement:()=>ne});var At;(o=>(o.log=(a,...r)=>console.log(`[Pixi\u2019VN] ${a}`,...r),o.warn=(a,...r)=>console.warn(`[Pixi\u2019VN] ${a}`,...r),o.error=(a,...r)=>console.error(`[Pixi\u2019VN] ${a}`,...r),o.info=(a,...r)=>console.info(`[Pixi\u2019VN] ${a}`,...r)))(At||(At={}));function ne(l){try{if(typeof l>"u")return l;let e=JSON.stringify(l);return JSON.parse(e)}catch(e){throw At.error("Error creating exportable element",l,e),new core.PixiError("not_json_serializable","Error creating exportable element")}}function ae(){console.info(`
2
2
  _______ _ _ _ ____ ____ ____ _____
3
3
  |_ __ \\ (_) (_) | | |_ _| |_ _||_ \\|_ _|
4
4
  | |__) |__ _ __ __ \\_| \\ \\ / / | \\ | |
package/dist/index.d.cts CHANGED
@@ -420,7 +420,7 @@ interface ContainerMemory<C extends ContainerChild = ContainerChild> extends Con
420
420
  elements: CanvasBaseItemMemory[];
421
421
  }
422
422
 
423
- var version = "1.5.16";
423
+ var version = "1.5.17";
424
424
 
425
425
  declare const Repeat: RepeatType;
426
426
  /**
package/dist/index.d.ts CHANGED
@@ -420,7 +420,7 @@ interface ContainerMemory<C extends ContainerChild = ContainerChild> extends Con
420
420
  elements: CanvasBaseItemMemory[];
421
421
  }
422
422
 
423
- var version = "1.5.16";
423
+ var version = "1.5.17";
424
424
 
425
425
  declare const Repeat: RepeatType;
426
426
  /**
package/dist/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import {b,d,a,c,e,f as f$1,g}from'./chunk-TTRUPDAB.mjs';import*as I from'@drincs/pixi-vn/canvas';export*from'@drincs/pixi-vn/canvas';import*as $t from'@drincs/pixi-vn/characters';export*from'@drincs/pixi-vn/characters';import {PixiError,GameUnifier}from'@drincs/pixi-vn/core';export*from'@drincs/pixi-vn/core';import*as tt from'@drincs/pixi-vn/history';export*from'@drincs/pixi-vn/history';import*as j from'@drincs/pixi-vn/narration';export*from'@drincs/pixi-vn/narration';import*as ct from'@drincs/pixi-vn/sound';export*from'@drincs/pixi-vn/sound';import*as N from'@drincs/pixi-vn/storage';export*from'@drincs/pixi-vn/storage';import {motion}from'@drincs/pixi-vn/motion';var ne=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,Jt=new Set,zt=typeof process=="object"&&process?process:{},Qt=(g,e,i,s)=>{typeof zt.emitWarning=="function"?zt.emitWarning(g,e,i,s):console.error(`[${i}] ${e}: ${g}`);},Pt=globalThis.AbortController,Bt=globalThis.AbortSignal;if(typeof Pt>"u"){Bt=class{constructor(){b(this,"onabort");b(this,"_onabort",[]);b(this,"reason");b(this,"aborted",false);}addEventListener(i,s){this._onabort.push(s);}},Pt=class{constructor(){b(this,"signal",new Bt);e();}abort(i){if(!this.signal.aborted){this.signal.reason=i,this.signal.aborted=true;for(let s of this.signal._onabort)s(i);this.signal.onabort?.(i);}}};let g=zt.env?.LRU_CACHE_IGNORE_AC_WARNING!=="1",e=()=>{g&&(g=false,Qt("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",e));};}var ae=g=>!Jt.has(g);var ot=g=>g&&g===Math.floor(g)&&g>0&&isFinite(g),Zt=g=>ot(g)?g<=Math.pow(2,8)?Uint8Array:g<=Math.pow(2,16)?Uint16Array:g<=Math.pow(2,32)?Uint32Array:g<=Number.MAX_SAFE_INTEGER?Ct:null:null,Ct=class extends Array{constructor(g){super(g),this.fill(0);}},et,_t,he=(et=class{constructor(e,i){b(this,"heap");b(this,"length");if(!c(et,_t))throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new i(e),this.length=0;}static create(e$1){let i=Zt(e$1);if(!i)return [];e(et,_t,true);let s=new et(e$1,i);return e(et,_t,false),s}push(e){this.heap[this.length++]=e;}pop(){return this.heap[--this.length]}},_t=new WeakMap,d(et,_t,false),et),Xt,Yt,q,M,K,pt,$,yt,St,B,D,X,T,E,f,L,V,P,C,Y,F,J,Q,W,H,Z,lt,z,xt,h,It,dt,st,Ut,k,ee,ut,wt,Ot,nt,at,Nt,Ft,jt,A,Gt,Et,ht,Mt,bt,te=(bt=class{constructor(e$1){d(this,h);d(this,q);d(this,M);d(this,K);d(this,pt);d(this,$);d(this,yt);d(this,St);d(this,B);b(this,"ttl");b(this,"ttlResolution");b(this,"ttlAutopurge");b(this,"updateAgeOnGet");b(this,"updateAgeOnHas");b(this,"allowStale");b(this,"noDisposeOnSet");b(this,"noUpdateTTL");b(this,"maxEntrySize");b(this,"sizeCalculation");b(this,"noDeleteOnFetchRejection");b(this,"noDeleteOnStaleGet");b(this,"allowStaleOnFetchAbort");b(this,"allowStaleOnFetchRejection");b(this,"ignoreFetchAbort");d(this,D);d(this,X);d(this,T);d(this,E);d(this,f);d(this,L);d(this,V);d(this,P);d(this,C);d(this,Y);d(this,F);d(this,J);d(this,Q);d(this,W);d(this,H);d(this,Z);d(this,lt);d(this,z);d(this,xt);d(this,dt,()=>{});d(this,st,()=>{});d(this,Ut,()=>{});d(this,k,()=>false);d(this,ut,e=>{});d(this,wt,(e,i,s)=>{});d(this,Ot,(e,i,s,o)=>{if(s||o)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0});b(this,Xt,"LRUCache");let{max:i=0,ttl:s,ttlResolution:o=1,ttlAutopurge:a,updateAgeOnGet:r,updateAgeOnHas:p,allowStale:u,dispose:S,onInsert:R,disposeAfter:b$1,noDisposeOnSet:it,noUpdateTTL:G,maxSize:d$1=0,maxEntrySize:y=0,sizeCalculation:v,fetchMethod:n,memoMethod:_,noDeleteOnFetchRejection:U,noDeleteOnStaleGet:O,allowStaleOnFetchRejection:x,allowStaleOnFetchAbort:rt,ignoreFetchAbort:mt,perf:gt}=e$1;if(gt!==void 0&&typeof gt?.now!="function")throw new TypeError("perf option must have a now() method if specified");if(e(this,B,gt??ne),i!==0&&!ot(i))throw new TypeError("max option must be a nonnegative integer");let vt=i?Zt(i):Array;if(!vt)throw new Error("invalid max value: "+i);if(e(this,q,i),e(this,M,d$1),this.maxEntrySize=y||c(this,M),this.sizeCalculation=v,this.sizeCalculation){if(!c(this,M)&&!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(_!==void 0&&typeof _!="function")throw new TypeError("memoMethod must be a function if defined");if(e(this,St,_),n!==void 0&&typeof n!="function")throw new TypeError("fetchMethod must be a function if specified");if(e(this,yt,n),e(this,lt,!!n),e(this,T,new Map),e(this,E,new Array(i).fill(void 0)),e(this,f,new Array(i).fill(void 0)),e(this,L,new vt(i)),e(this,V,new vt(i)),e(this,P,0),e(this,C,0),e(this,Y,he.create(i)),e(this,D,0),e(this,X,0),typeof S=="function"&&e(this,K,S),typeof R=="function"&&e(this,pt,R),typeof b$1=="function"?(e(this,$,b$1),e(this,F,[])):(e(this,$,void 0),e(this,F,void 0)),e(this,Z,!!c(this,K)),e(this,xt,!!c(this,pt)),e(this,z,!!c(this,$)),this.noDisposeOnSet=!!it,this.noUpdateTTL=!!G,this.noDeleteOnFetchRejection=!!U,this.allowStaleOnFetchRejection=!!x,this.allowStaleOnFetchAbort=!!rt,this.ignoreFetchAbort=!!mt,this.maxEntrySize!==0){if(c(this,M)!==0&&!ot(c(this,M)))throw new TypeError("maxSize must be a positive integer if specified");if(!ot(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");f$1(this,h,ee).call(this);}if(this.allowStale=!!u,this.noDeleteOnStaleGet=!!O,this.updateAgeOnGet=!!r,this.updateAgeOnHas=!!p,this.ttlResolution=ot(o)||o===0?o:1,this.ttlAutopurge=!!a,this.ttl=s||0,this.ttl){if(!ot(this.ttl))throw new TypeError("ttl must be a positive integer if specified");f$1(this,h,It).call(this);}if(c(this,q)===0&&this.ttl===0&&c(this,M)===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!c(this,q)&&!c(this,M)){let Lt="LRU_CACHE_UNBOUNDED";ae(Lt)&&(Jt.add(Lt),Qt("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",Lt,bt));}}get perf(){return c(this,B)}static unsafeExposeInternals(e){return {starts:c(e,Q),ttls:c(e,W),autopurgeTimers:c(e,H),sizes:c(e,J),keyMap:c(e,T),keyList:c(e,E),valList:c(e,f),next:c(e,L),prev:c(e,V),get head(){return c(e,P)},get tail(){return c(e,C)},free:c(e,Y),isBackgroundFetch:i=>{var s;return f$1(s=e,h,A).call(s,i)},backgroundFetch:(i,s,o,a)=>{var r;return f$1(r=e,h,jt).call(r,i,s,o,a)},moveToTail:i=>{var s;return f$1(s=e,h,Et).call(s,i)},indexes:i=>{var s;return f$1(s=e,h,nt).call(s,i)},rindexes:i=>{var s;return f$1(s=e,h,at).call(s,i)},isStale:i=>{var s;return c(s=e,k).call(s,i)}}}get max(){return c(this,q)}get maxSize(){return c(this,M)}get calculatedSize(){return c(this,X)}get size(){return c(this,D)}get fetchMethod(){return c(this,yt)}get memoMethod(){return c(this,St)}get dispose(){return c(this,K)}get onInsert(){return c(this,pt)}get disposeAfter(){return c(this,$)}getRemainingTTL(e){return c(this,T).has(e)?1/0:0}*entries(){for(let e of f$1(this,h,nt).call(this))c(this,f)[e]!==void 0&&c(this,E)[e]!==void 0&&!f$1(this,h,A).call(this,c(this,f)[e])&&(yield [c(this,E)[e],c(this,f)[e]]);}*rentries(){for(let e of f$1(this,h,at).call(this))c(this,f)[e]!==void 0&&c(this,E)[e]!==void 0&&!f$1(this,h,A).call(this,c(this,f)[e])&&(yield [c(this,E)[e],c(this,f)[e]]);}*keys(){for(let e of f$1(this,h,nt).call(this)){let i=c(this,E)[e];i!==void 0&&!f$1(this,h,A).call(this,c(this,f)[e])&&(yield i);}}*rkeys(){for(let e of f$1(this,h,at).call(this)){let i=c(this,E)[e];i!==void 0&&!f$1(this,h,A).call(this,c(this,f)[e])&&(yield i);}}*values(){for(let e of f$1(this,h,nt).call(this))c(this,f)[e]!==void 0&&!f$1(this,h,A).call(this,c(this,f)[e])&&(yield c(this,f)[e]);}*rvalues(){for(let e of f$1(this,h,at).call(this))c(this,f)[e]!==void 0&&!f$1(this,h,A).call(this,c(this,f)[e])&&(yield c(this,f)[e]);}[(Yt=Symbol.iterator,Xt=Symbol.toStringTag,Yt)](){return this.entries()}find(e,i={}){for(let s of f$1(this,h,nt).call(this)){let o=c(this,f)[s],a=f$1(this,h,A).call(this,o)?o.__staleWhileFetching:o;if(a!==void 0&&e(a,c(this,E)[s],this))return this.get(c(this,E)[s],i)}}forEach(e,i=this){for(let s of f$1(this,h,nt).call(this)){let o=c(this,f)[s],a=f$1(this,h,A).call(this,o)?o.__staleWhileFetching:o;a!==void 0&&e.call(i,a,c(this,E)[s],this);}}rforEach(e,i=this){for(let s of f$1(this,h,at).call(this)){let o=c(this,f)[s],a=f$1(this,h,A).call(this,o)?o.__staleWhileFetching:o;a!==void 0&&e.call(i,a,c(this,E)[s],this);}}purgeStale(){let e=false;for(let i of f$1(this,h,at).call(this,{allowStale:true}))c(this,k).call(this,i)&&(f$1(this,h,ht).call(this,c(this,E)[i],"expire"),e=true);return e}info(e){let i=c(this,T).get(e);if(i===void 0)return;let s=c(this,f)[i],o=f$1(this,h,A).call(this,s)?s.__staleWhileFetching:s;if(o===void 0)return;let a={value:o};if(c(this,W)&&c(this,Q)){let r=c(this,W)[i],p=c(this,Q)[i];if(r&&p){let u=r-(c(this,B).now()-p);a.ttl=u,a.start=Date.now();}}return c(this,J)&&(a.size=c(this,J)[i]),a}dump(){let e=[];for(let i of f$1(this,h,nt).call(this,{allowStale:true})){let s=c(this,E)[i],o=c(this,f)[i],a=f$1(this,h,A).call(this,o)?o.__staleWhileFetching:o;if(a===void 0||s===void 0)continue;let r={value:a};if(c(this,W)&&c(this,Q)){r.ttl=c(this,W)[i];let p=c(this,B).now()-c(this,Q)[i];r.start=Math.floor(Date.now()-p);}c(this,J)&&(r.size=c(this,J)[i]),e.unshift([s,r]);}return e}load(e){this.clear();for(let[i,s]of e){if(s.start){let o=Date.now()-s.start;s.start=c(this,B).now()-o;}this.set(i,s.value,s);}}set(e$1,i,s={}){var it,G,d,y;if(i===void 0)return this.delete(e$1),this;let{ttl:o=this.ttl,start:a,noDisposeOnSet:r=this.noDisposeOnSet,sizeCalculation:p=this.sizeCalculation,status:u}=s,{noUpdateTTL:S=this.noUpdateTTL}=s,R=c(this,Ot).call(this,e$1,i,s.size||0,p);if(this.maxEntrySize&&R>this.maxEntrySize)return u&&(u.set="miss",u.maxEntrySizeExceeded=true),f$1(this,h,ht).call(this,e$1,"set"),this;let b=c(this,D)===0?void 0:c(this,T).get(e$1);if(b===void 0)b=c(this,D)===0?c(this,C):c(this,Y).length!==0?c(this,Y).pop():c(this,D)===c(this,q)?f$1(this,h,Ft).call(this,false):c(this,D),c(this,E)[b]=e$1,c(this,f)[b]=i,c(this,T).set(e$1,b),c(this,L)[c(this,C)]=b,c(this,V)[b]=c(this,C),e(this,C,b),g(this,D)._++,c(this,wt).call(this,b,R,u),u&&(u.set="add"),S=false,c(this,xt)&&((it=c(this,pt))==null||it.call(this,i,e$1,"add"));else {f$1(this,h,Et).call(this,b);let v=c(this,f)[b];if(i!==v){if(c(this,lt)&&f$1(this,h,A).call(this,v)){v.__abortController.abort(new Error("replaced"));let{__staleWhileFetching:n}=v;n!==void 0&&!r&&(c(this,Z)&&((G=c(this,K))==null||G.call(this,n,e$1,"set")),c(this,z)&&c(this,F)?.push([n,e$1,"set"]));}else r||(c(this,Z)&&((d=c(this,K))==null||d.call(this,v,e$1,"set")),c(this,z)&&c(this,F)?.push([v,e$1,"set"]));if(c(this,ut).call(this,b),c(this,wt).call(this,b,R,u),c(this,f)[b]=i,u){u.set="replace";let n=v&&f$1(this,h,A).call(this,v)?v.__staleWhileFetching:v;n!==void 0&&(u.oldValue=n);}}else u&&(u.set="update");c(this,xt)&&this.onInsert?.(i,e$1,i===v?"update":"replace");}if(o!==0&&!c(this,W)&&f$1(this,h,It).call(this),c(this,W)&&(S||c(this,Ut).call(this,b,o,a),u&&c(this,st).call(this,u,b)),!r&&c(this,z)&&c(this,F)){let v=c(this,F),n;for(;n=v?.shift();)(y=c(this,$))==null||y.call(this,...n);}return this}pop(){var e;try{for(;c(this,D);){let i=c(this,f)[c(this,P)];if(f$1(this,h,Ft).call(this,!0),f$1(this,h,A).call(this,i)){if(i.__staleWhileFetching)return i.__staleWhileFetching}else if(i!==void 0)return i}}finally{if(c(this,z)&&c(this,F)){let i=c(this,F),s;for(;s=i?.shift();)(e=c(this,$))==null||e.call(this,...s);}}}has(e,i={}){let{updateAgeOnHas:s=this.updateAgeOnHas,status:o}=i,a=c(this,T).get(e);if(a!==void 0){let r=c(this,f)[a];if(f$1(this,h,A).call(this,r)&&r.__staleWhileFetching===void 0)return false;if(c(this,k).call(this,a))o&&(o.has="stale",c(this,st).call(this,o,a));else return s&&c(this,dt).call(this,a),o&&(o.has="hit",c(this,st).call(this,o,a)),true}else o&&(o.has="miss");return false}peek(e,i={}){let{allowStale:s=this.allowStale}=i,o=c(this,T).get(e);if(o===void 0||!s&&c(this,k).call(this,o))return;let a=c(this,f)[o];return f$1(this,h,A).call(this,a)?a.__staleWhileFetching:a}async fetch(e,i={}){let{allowStale:s=this.allowStale,updateAgeOnGet:o=this.updateAgeOnGet,noDeleteOnStaleGet:a=this.noDeleteOnStaleGet,ttl:r=this.ttl,noDisposeOnSet:p=this.noDisposeOnSet,size:u=0,sizeCalculation:S=this.sizeCalculation,noUpdateTTL:R=this.noUpdateTTL,noDeleteOnFetchRejection:b=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:it=this.allowStaleOnFetchRejection,ignoreFetchAbort:G=this.ignoreFetchAbort,allowStaleOnFetchAbort:d=this.allowStaleOnFetchAbort,context:y,forceRefresh:v=false,status:n,signal:_}=i;if(!c(this,lt))return n&&(n.fetch="get"),this.get(e,{allowStale:s,updateAgeOnGet:o,noDeleteOnStaleGet:a,status:n});let U={allowStale:s,updateAgeOnGet:o,noDeleteOnStaleGet:a,ttl:r,noDisposeOnSet:p,size:u,sizeCalculation:S,noUpdateTTL:R,noDeleteOnFetchRejection:b,allowStaleOnFetchRejection:it,allowStaleOnFetchAbort:d,ignoreFetchAbort:G,status:n,signal:_},O=c(this,T).get(e);if(O===void 0){n&&(n.fetch="miss");let x=f$1(this,h,jt).call(this,e,O,U,y);return x.__returned=x}else {let x=c(this,f)[O];if(f$1(this,h,A).call(this,x)){let vt=s&&x.__staleWhileFetching!==void 0;return n&&(n.fetch="inflight",vt&&(n.returnedStale=true)),vt?x.__staleWhileFetching:x.__returned=x}let rt=c(this,k).call(this,O);if(!v&&!rt)return n&&(n.fetch="hit"),f$1(this,h,Et).call(this,O),o&&c(this,dt).call(this,O),n&&c(this,st).call(this,n,O),x;let mt=f$1(this,h,jt).call(this,e,O,U,y),gt=mt.__staleWhileFetching!==void 0&&s;return n&&(n.fetch=rt?"stale":"refresh",gt&&rt&&(n.returnedStale=true)),gt?mt.__staleWhileFetching:mt.__returned=mt}}async forceFetch(e,i={}){let s=await this.fetch(e,i);if(s===void 0)throw new Error("fetch() returned undefined");return s}memo(e,i={}){let s=c(this,St);if(!s)throw new Error("no memoMethod provided to constructor");let{context:o,forceRefresh:a,...r}=i,p=this.get(e,r);if(!a&&p!==void 0)return p;let u=s(e,p,{options:r,context:o});return this.set(e,u,r),u}get(e,i={}){let{allowStale:s=this.allowStale,updateAgeOnGet:o=this.updateAgeOnGet,noDeleteOnStaleGet:a=this.noDeleteOnStaleGet,status:r}=i,p=c(this,T).get(e);if(p!==void 0){let u=c(this,f)[p],S=f$1(this,h,A).call(this,u);return r&&c(this,st).call(this,r,p),c(this,k).call(this,p)?(r&&(r.get="stale"),S?(r&&s&&u.__staleWhileFetching!==void 0&&(r.returnedStale=true),s?u.__staleWhileFetching:void 0):(a||f$1(this,h,ht).call(this,e,"expire"),r&&s&&(r.returnedStale=true),s?u:void 0)):(r&&(r.get="hit"),S?u.__staleWhileFetching:(f$1(this,h,Et).call(this,p),o&&c(this,dt).call(this,p),u))}else r&&(r.get="miss");}delete(e){return f$1(this,h,ht).call(this,e,"delete")}clear(){return f$1(this,h,Mt).call(this,"delete")}},q=new WeakMap,M=new WeakMap,K=new WeakMap,pt=new WeakMap,$=new WeakMap,yt=new WeakMap,St=new WeakMap,B=new WeakMap,D=new WeakMap,X=new WeakMap,T=new WeakMap,E=new WeakMap,f=new WeakMap,L=new WeakMap,V=new WeakMap,P=new WeakMap,C=new WeakMap,Y=new WeakMap,F=new WeakMap,J=new WeakMap,Q=new WeakMap,W=new WeakMap,H=new WeakMap,Z=new WeakMap,lt=new WeakMap,z=new WeakMap,xt=new WeakMap,h=new WeakSet,It=function(){let e$1=new Ct(c(this,q)),i=new Ct(c(this,q));e(this,W,e$1),e(this,Q,i);let s=this.ttlAutopurge?new Array(c(this,q)):void 0;e(this,H,s),e(this,Ut,(r,p,u=c(this,B).now())=>{if(i[r]=p!==0?u:0,e$1[r]=p,s?.[r]&&(clearTimeout(s[r]),s[r]=void 0),p!==0&&s){let S=setTimeout(()=>{c(this,k).call(this,r)&&f$1(this,h,ht).call(this,c(this,E)[r],"expire");},p+1);S.unref&&S.unref(),s[r]=S;}}),e(this,dt,r=>{i[r]=e$1[r]!==0?c(this,B).now():0;}),e(this,st,(r,p)=>{if(e$1[p]){let u=e$1[p],S=i[p];if(!u||!S)return;r.ttl=u,r.start=S,r.now=o||a();let R=r.now-S;r.remainingTTL=u-R;}});let o=0,a=()=>{let r=c(this,B).now();if(this.ttlResolution>0){o=r;let p=setTimeout(()=>o=0,this.ttlResolution);p.unref&&p.unref();}return r};this.getRemainingTTL=r=>{let p=c(this,T).get(r);if(p===void 0)return 0;let u=e$1[p],S=i[p];if(!u||!S)return 1/0;let R=(o||a())-S;return u-R},e(this,k,r=>{let p=i[r],u=e$1[r];return !!u&&!!p&&(o||a())-p>u});},dt=new WeakMap,st=new WeakMap,Ut=new WeakMap,k=new WeakMap,ee=function(){let e$1=new Ct(c(this,q));e(this,X,0),e(this,J,e$1),e(this,ut,i=>{e(this,X,c(this,X)-e$1[i]),e$1[i]=0;}),e(this,Ot,(i,s,o,a)=>{if(f$1(this,h,A).call(this,s))return 0;if(!ot(o))if(a){if(typeof a!="function")throw new TypeError("sizeCalculation must be a function");if(o=a(s,i),!ot(o))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 o}),e(this,wt,(i,s,o)=>{if(e$1[i]=s,c(this,M)){let a=c(this,M)-e$1[i];for(;c(this,X)>a;)f$1(this,h,Ft).call(this,true);}e(this,X,c(this,X)+e$1[i]),o&&(o.entrySize=s,o.totalCalculatedSize=c(this,X));});},ut=new WeakMap,wt=new WeakMap,Ot=new WeakMap,nt=function*({allowStale:e=this.allowStale}={}){if(c(this,D))for(let i=c(this,C);!(!f$1(this,h,Nt).call(this,i)||((e||!c(this,k).call(this,i))&&(yield i),i===c(this,P)));)i=c(this,V)[i];},at=function*({allowStale:e=this.allowStale}={}){if(c(this,D))for(let i=c(this,P);!(!f$1(this,h,Nt).call(this,i)||((e||!c(this,k).call(this,i))&&(yield i),i===c(this,C)));)i=c(this,L)[i];},Nt=function(e){return e!==void 0&&c(this,T).get(c(this,E)[e])===e},Ft=function(e$1){var a;let i=c(this,P),s=c(this,E)[i],o=c(this,f)[i];return c(this,lt)&&f$1(this,h,A).call(this,o)?o.__abortController.abort(new Error("evicted")):(c(this,Z)||c(this,z))&&(c(this,Z)&&((a=c(this,K))==null||a.call(this,o,s,"evict")),c(this,z)&&c(this,F)?.push([o,s,"evict"])),c(this,ut).call(this,i),c(this,H)?.[i]&&(clearTimeout(c(this,H)[i]),c(this,H)[i]=void 0),e$1&&(c(this,E)[i]=void 0,c(this,f)[i]=void 0,c(this,Y).push(i)),c(this,D)===1?(e(this,P,e(this,C,0)),c(this,Y).length=0):e(this,P,c(this,L)[i]),c(this,T).delete(s),g(this,D)._--,i},jt=function(e,i,s,o){let a=i===void 0?void 0:c(this,f)[i];if(f$1(this,h,A).call(this,a))return a;let r=new Pt,{signal:p}=s;p?.addEventListener("abort",()=>r.abort(p.reason),{signal:r.signal});let u={signal:r.signal,options:s,context:o},S=(y,v=false)=>{let{aborted:n}=r.signal,_=s.ignoreFetchAbort&&y!==void 0,U=s.ignoreFetchAbort||!!(s.allowStaleOnFetchAbort&&y!==void 0);if(s.status&&(n&&!v?(s.status.fetchAborted=true,s.status.fetchError=r.signal.reason,_&&(s.status.fetchAbortIgnored=true)):s.status.fetchResolved=true),n&&!_&&!v)return b(r.signal.reason,U);let O=G,x=c(this,f)[i];return (x===G||_&&v&&x===void 0)&&(y===void 0?O.__staleWhileFetching!==void 0?c(this,f)[i]=O.__staleWhileFetching:f$1(this,h,ht).call(this,e,"fetch"):(s.status&&(s.status.fetchUpdated=true),this.set(e,y,u.options))),y},R=y=>(s.status&&(s.status.fetchRejected=true,s.status.fetchError=y),b(y,false)),b=(y,v)=>{let{aborted:n}=r.signal,_=n&&s.allowStaleOnFetchAbort,U=_||s.allowStaleOnFetchRejection,O=U||s.noDeleteOnFetchRejection,x=G;if(c(this,f)[i]===G&&(!O||!v&&x.__staleWhileFetching===void 0?f$1(this,h,ht).call(this,e,"fetch"):_||(c(this,f)[i]=x.__staleWhileFetching)),U)return s.status&&x.__staleWhileFetching!==void 0&&(s.status.returnedStale=true),x.__staleWhileFetching;if(x.__returned===x)throw y},it=(y,v)=>{var _;let n=(_=c(this,yt))==null?void 0:_.call(this,e,a,u);n&&n instanceof Promise&&n.then(U=>y(U===void 0?void 0:U),v),r.signal.addEventListener("abort",()=>{(!s.ignoreFetchAbort||s.allowStaleOnFetchAbort)&&(y(void 0),s.allowStaleOnFetchAbort&&(y=U=>S(U,true)));});};s.status&&(s.status.fetchDispatched=true);let G=new Promise(it).then(S,R),d=Object.assign(G,{__abortController:r,__staleWhileFetching:a,__returned:void 0});return i===void 0?(this.set(e,d,{...u.options,status:void 0}),i=c(this,T).get(e)):c(this,f)[i]=d,d},A=function(e){if(!c(this,lt))return false;let i=e;return !!i&&i instanceof Promise&&i.hasOwnProperty("__staleWhileFetching")&&i.__abortController instanceof Pt},Gt=function(e,i){c(this,V)[i]=e,c(this,L)[e]=i;},Et=function(e$1){e$1!==c(this,C)&&(e$1===c(this,P)?e(this,P,c(this,L)[e$1]):f$1(this,h,Gt).call(this,c(this,V)[e$1],c(this,L)[e$1]),f$1(this,h,Gt).call(this,c(this,C),e$1),e(this,C,e$1));},ht=function(e$1,i){var o,a;let s=false;if(c(this,D)!==0){let r=c(this,T).get(e$1);if(r!==void 0)if(c(this,H)?.[r]&&(clearTimeout(c(this,H)?.[r]),c(this,H)[r]=void 0),s=true,c(this,D)===1)f$1(this,h,Mt).call(this,i);else {c(this,ut).call(this,r);let p=c(this,f)[r];if(f$1(this,h,A).call(this,p)?p.__abortController.abort(new Error("deleted")):(c(this,Z)||c(this,z))&&(c(this,Z)&&((o=c(this,K))==null||o.call(this,p,e$1,i)),c(this,z)&&c(this,F)?.push([p,e$1,i])),c(this,T).delete(e$1),c(this,E)[r]=void 0,c(this,f)[r]=void 0,r===c(this,C))e(this,C,c(this,V)[r]);else if(r===c(this,P))e(this,P,c(this,L)[r]);else {let u=c(this,V)[r];c(this,L)[u]=c(this,L)[r];let S=c(this,L)[r];c(this,V)[S]=c(this,V)[r];}g(this,D)._--,c(this,Y).push(r);}}if(c(this,z)&&c(this,F)?.length){let r=c(this,F),p;for(;p=r?.shift();)(a=c(this,$))==null||a.call(this,...p);}return s},Mt=function(e$1){var i,s;for(let o of f$1(this,h,at).call(this,{allowStale:true})){let a=c(this,f)[o];if(f$1(this,h,A).call(this,a))a.__abortController.abort(new Error("deleted"));else {let r=c(this,E)[o];c(this,Z)&&((i=c(this,K))==null||i.call(this,a,r,e$1)),c(this,z)&&c(this,F)?.push([a,r,e$1]);}}if(c(this,T).clear(),c(this,f).fill(void 0),c(this,E).fill(void 0),c(this,W)&&c(this,Q)){c(this,W).fill(0),c(this,Q).fill(0);for(let o of c(this,H)??[])o!==void 0&&clearTimeout(o);c(this,H)?.fill(void 0);}if(c(this,J)&&c(this,J).fill(0),e(this,P,0),e(this,C,0),c(this,Y).length=0,e(this,X,0),e(this,D,0),c(this,z)&&c(this,F)){let o=c(this,F),a;for(;a=o?.shift();)(s=c(this,$))==null||s.call(this,...a);}},bt);var Rt=class{constructor(e){b(this,"cache");b(this,"map",new Map);this.cache=new te({max:e.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(e){let i=this.map.delete(e);return i&&this.cache.delete(e),i}get forEach(){return this.map.forEach}get(e){let i=this.cache.get(e);return i||this.map.get(e)}has(e){return this.map.has(e)}set(e,i){return this.map.set(e,i),this.cache.set(e,i),this}get size(){return this.map.size}entries(){return this.map.entries()}keys(){return this.map.keys()}values(){return this.map.values()}};var Tt="1.5.16";var Vt="repeat";function Wt(g){return {type:"pause",duration:g}}var Ht="__game_layer__";var ie={};var kt={};a(kt,{createExportableElement:()=>se});var At;(o=>(o.log=(a,...r)=>console.log(`[Pixi\u2019VN] ${a}`,...r),o.warn=(a,...r)=>console.warn(`[Pixi\u2019VN] ${a}`,...r),o.error=(a,...r)=>console.error(`[Pixi\u2019VN] ${a}`,...r),o.info=(a,...r)=>console.info(`[Pixi\u2019VN] ${a}`,...r)))(At||(At={}));function se(g){try{if(typeof g>"u")return g;let e=JSON.stringify(g);return JSON.parse(e)}catch(e){throw At.error("Error creating exportable element",g,e),new PixiError("not_json_serializable","Error creating exportable element")}}function re(){console.info(`
1
+ import {b,d,a,c,e,f as f$1,g}from'./chunk-TTRUPDAB.mjs';import*as I from'@drincs/pixi-vn/canvas';export*from'@drincs/pixi-vn/canvas';import*as $t from'@drincs/pixi-vn/characters';export*from'@drincs/pixi-vn/characters';import {PixiError,GameUnifier}from'@drincs/pixi-vn/core';export*from'@drincs/pixi-vn/core';import*as tt from'@drincs/pixi-vn/history';export*from'@drincs/pixi-vn/history';import*as j from'@drincs/pixi-vn/narration';export*from'@drincs/pixi-vn/narration';import*as ct from'@drincs/pixi-vn/sound';export*from'@drincs/pixi-vn/sound';import*as N from'@drincs/pixi-vn/storage';export*from'@drincs/pixi-vn/storage';import {motion}from'@drincs/pixi-vn/motion';var ne=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,Jt=new Set,zt=typeof process=="object"&&process?process:{},Qt=(g,e,i,s)=>{typeof zt.emitWarning=="function"?zt.emitWarning(g,e,i,s):console.error(`[${i}] ${e}: ${g}`);},Pt=globalThis.AbortController,Bt=globalThis.AbortSignal;if(typeof Pt>"u"){Bt=class{constructor(){b(this,"onabort");b(this,"_onabort",[]);b(this,"reason");b(this,"aborted",false);}addEventListener(i,s){this._onabort.push(s);}},Pt=class{constructor(){b(this,"signal",new Bt);e();}abort(i){if(!this.signal.aborted){this.signal.reason=i,this.signal.aborted=true;for(let s of this.signal._onabort)s(i);this.signal.onabort?.(i);}}};let g=zt.env?.LRU_CACHE_IGNORE_AC_WARNING!=="1",e=()=>{g&&(g=false,Qt("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",e));};}var ae=g=>!Jt.has(g);var ot=g=>g&&g===Math.floor(g)&&g>0&&isFinite(g),Zt=g=>ot(g)?g<=Math.pow(2,8)?Uint8Array:g<=Math.pow(2,16)?Uint16Array:g<=Math.pow(2,32)?Uint32Array:g<=Number.MAX_SAFE_INTEGER?Ct:null:null,Ct=class extends Array{constructor(g){super(g),this.fill(0);}},et,_t,he=(et=class{constructor(e,i){b(this,"heap");b(this,"length");if(!c(et,_t))throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new i(e),this.length=0;}static create(e$1){let i=Zt(e$1);if(!i)return [];e(et,_t,true);let s=new et(e$1,i);return e(et,_t,false),s}push(e){this.heap[this.length++]=e;}pop(){return this.heap[--this.length]}},_t=new WeakMap,d(et,_t,false),et),Xt,Yt,q,M,K,pt,$,yt,St,B,D,X,T,E,f,L,V,P,C,Y,F,J,Q,W,H,Z,lt,z,xt,h,It,dt,st,Ut,k,ee,ut,wt,Ot,nt,at,Nt,Ft,jt,A,Gt,Et,ht,Mt,bt,te=(bt=class{constructor(e$1){d(this,h);d(this,q);d(this,M);d(this,K);d(this,pt);d(this,$);d(this,yt);d(this,St);d(this,B);b(this,"ttl");b(this,"ttlResolution");b(this,"ttlAutopurge");b(this,"updateAgeOnGet");b(this,"updateAgeOnHas");b(this,"allowStale");b(this,"noDisposeOnSet");b(this,"noUpdateTTL");b(this,"maxEntrySize");b(this,"sizeCalculation");b(this,"noDeleteOnFetchRejection");b(this,"noDeleteOnStaleGet");b(this,"allowStaleOnFetchAbort");b(this,"allowStaleOnFetchRejection");b(this,"ignoreFetchAbort");d(this,D);d(this,X);d(this,T);d(this,E);d(this,f);d(this,L);d(this,V);d(this,P);d(this,C);d(this,Y);d(this,F);d(this,J);d(this,Q);d(this,W);d(this,H);d(this,Z);d(this,lt);d(this,z);d(this,xt);d(this,dt,()=>{});d(this,st,()=>{});d(this,Ut,()=>{});d(this,k,()=>false);d(this,ut,e=>{});d(this,wt,(e,i,s)=>{});d(this,Ot,(e,i,s,o)=>{if(s||o)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0});b(this,Xt,"LRUCache");let{max:i=0,ttl:s,ttlResolution:o=1,ttlAutopurge:a,updateAgeOnGet:r,updateAgeOnHas:p,allowStale:u,dispose:S,onInsert:R,disposeAfter:b$1,noDisposeOnSet:it,noUpdateTTL:G,maxSize:d$1=0,maxEntrySize:y=0,sizeCalculation:v,fetchMethod:n,memoMethod:_,noDeleteOnFetchRejection:U,noDeleteOnStaleGet:O,allowStaleOnFetchRejection:x,allowStaleOnFetchAbort:rt,ignoreFetchAbort:mt,perf:gt}=e$1;if(gt!==void 0&&typeof gt?.now!="function")throw new TypeError("perf option must have a now() method if specified");if(e(this,B,gt??ne),i!==0&&!ot(i))throw new TypeError("max option must be a nonnegative integer");let vt=i?Zt(i):Array;if(!vt)throw new Error("invalid max value: "+i);if(e(this,q,i),e(this,M,d$1),this.maxEntrySize=y||c(this,M),this.sizeCalculation=v,this.sizeCalculation){if(!c(this,M)&&!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(_!==void 0&&typeof _!="function")throw new TypeError("memoMethod must be a function if defined");if(e(this,St,_),n!==void 0&&typeof n!="function")throw new TypeError("fetchMethod must be a function if specified");if(e(this,yt,n),e(this,lt,!!n),e(this,T,new Map),e(this,E,new Array(i).fill(void 0)),e(this,f,new Array(i).fill(void 0)),e(this,L,new vt(i)),e(this,V,new vt(i)),e(this,P,0),e(this,C,0),e(this,Y,he.create(i)),e(this,D,0),e(this,X,0),typeof S=="function"&&e(this,K,S),typeof R=="function"&&e(this,pt,R),typeof b$1=="function"?(e(this,$,b$1),e(this,F,[])):(e(this,$,void 0),e(this,F,void 0)),e(this,Z,!!c(this,K)),e(this,xt,!!c(this,pt)),e(this,z,!!c(this,$)),this.noDisposeOnSet=!!it,this.noUpdateTTL=!!G,this.noDeleteOnFetchRejection=!!U,this.allowStaleOnFetchRejection=!!x,this.allowStaleOnFetchAbort=!!rt,this.ignoreFetchAbort=!!mt,this.maxEntrySize!==0){if(c(this,M)!==0&&!ot(c(this,M)))throw new TypeError("maxSize must be a positive integer if specified");if(!ot(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");f$1(this,h,ee).call(this);}if(this.allowStale=!!u,this.noDeleteOnStaleGet=!!O,this.updateAgeOnGet=!!r,this.updateAgeOnHas=!!p,this.ttlResolution=ot(o)||o===0?o:1,this.ttlAutopurge=!!a,this.ttl=s||0,this.ttl){if(!ot(this.ttl))throw new TypeError("ttl must be a positive integer if specified");f$1(this,h,It).call(this);}if(c(this,q)===0&&this.ttl===0&&c(this,M)===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!c(this,q)&&!c(this,M)){let Lt="LRU_CACHE_UNBOUNDED";ae(Lt)&&(Jt.add(Lt),Qt("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",Lt,bt));}}get perf(){return c(this,B)}static unsafeExposeInternals(e){return {starts:c(e,Q),ttls:c(e,W),autopurgeTimers:c(e,H),sizes:c(e,J),keyMap:c(e,T),keyList:c(e,E),valList:c(e,f),next:c(e,L),prev:c(e,V),get head(){return c(e,P)},get tail(){return c(e,C)},free:c(e,Y),isBackgroundFetch:i=>{var s;return f$1(s=e,h,A).call(s,i)},backgroundFetch:(i,s,o,a)=>{var r;return f$1(r=e,h,jt).call(r,i,s,o,a)},moveToTail:i=>{var s;return f$1(s=e,h,Et).call(s,i)},indexes:i=>{var s;return f$1(s=e,h,nt).call(s,i)},rindexes:i=>{var s;return f$1(s=e,h,at).call(s,i)},isStale:i=>{var s;return c(s=e,k).call(s,i)}}}get max(){return c(this,q)}get maxSize(){return c(this,M)}get calculatedSize(){return c(this,X)}get size(){return c(this,D)}get fetchMethod(){return c(this,yt)}get memoMethod(){return c(this,St)}get dispose(){return c(this,K)}get onInsert(){return c(this,pt)}get disposeAfter(){return c(this,$)}getRemainingTTL(e){return c(this,T).has(e)?1/0:0}*entries(){for(let e of f$1(this,h,nt).call(this))c(this,f)[e]!==void 0&&c(this,E)[e]!==void 0&&!f$1(this,h,A).call(this,c(this,f)[e])&&(yield [c(this,E)[e],c(this,f)[e]]);}*rentries(){for(let e of f$1(this,h,at).call(this))c(this,f)[e]!==void 0&&c(this,E)[e]!==void 0&&!f$1(this,h,A).call(this,c(this,f)[e])&&(yield [c(this,E)[e],c(this,f)[e]]);}*keys(){for(let e of f$1(this,h,nt).call(this)){let i=c(this,E)[e];i!==void 0&&!f$1(this,h,A).call(this,c(this,f)[e])&&(yield i);}}*rkeys(){for(let e of f$1(this,h,at).call(this)){let i=c(this,E)[e];i!==void 0&&!f$1(this,h,A).call(this,c(this,f)[e])&&(yield i);}}*values(){for(let e of f$1(this,h,nt).call(this))c(this,f)[e]!==void 0&&!f$1(this,h,A).call(this,c(this,f)[e])&&(yield c(this,f)[e]);}*rvalues(){for(let e of f$1(this,h,at).call(this))c(this,f)[e]!==void 0&&!f$1(this,h,A).call(this,c(this,f)[e])&&(yield c(this,f)[e]);}[(Yt=Symbol.iterator,Xt=Symbol.toStringTag,Yt)](){return this.entries()}find(e,i={}){for(let s of f$1(this,h,nt).call(this)){let o=c(this,f)[s],a=f$1(this,h,A).call(this,o)?o.__staleWhileFetching:o;if(a!==void 0&&e(a,c(this,E)[s],this))return this.get(c(this,E)[s],i)}}forEach(e,i=this){for(let s of f$1(this,h,nt).call(this)){let o=c(this,f)[s],a=f$1(this,h,A).call(this,o)?o.__staleWhileFetching:o;a!==void 0&&e.call(i,a,c(this,E)[s],this);}}rforEach(e,i=this){for(let s of f$1(this,h,at).call(this)){let o=c(this,f)[s],a=f$1(this,h,A).call(this,o)?o.__staleWhileFetching:o;a!==void 0&&e.call(i,a,c(this,E)[s],this);}}purgeStale(){let e=false;for(let i of f$1(this,h,at).call(this,{allowStale:true}))c(this,k).call(this,i)&&(f$1(this,h,ht).call(this,c(this,E)[i],"expire"),e=true);return e}info(e){let i=c(this,T).get(e);if(i===void 0)return;let s=c(this,f)[i],o=f$1(this,h,A).call(this,s)?s.__staleWhileFetching:s;if(o===void 0)return;let a={value:o};if(c(this,W)&&c(this,Q)){let r=c(this,W)[i],p=c(this,Q)[i];if(r&&p){let u=r-(c(this,B).now()-p);a.ttl=u,a.start=Date.now();}}return c(this,J)&&(a.size=c(this,J)[i]),a}dump(){let e=[];for(let i of f$1(this,h,nt).call(this,{allowStale:true})){let s=c(this,E)[i],o=c(this,f)[i],a=f$1(this,h,A).call(this,o)?o.__staleWhileFetching:o;if(a===void 0||s===void 0)continue;let r={value:a};if(c(this,W)&&c(this,Q)){r.ttl=c(this,W)[i];let p=c(this,B).now()-c(this,Q)[i];r.start=Math.floor(Date.now()-p);}c(this,J)&&(r.size=c(this,J)[i]),e.unshift([s,r]);}return e}load(e){this.clear();for(let[i,s]of e){if(s.start){let o=Date.now()-s.start;s.start=c(this,B).now()-o;}this.set(i,s.value,s);}}set(e$1,i,s={}){var it,G,d,y;if(i===void 0)return this.delete(e$1),this;let{ttl:o=this.ttl,start:a,noDisposeOnSet:r=this.noDisposeOnSet,sizeCalculation:p=this.sizeCalculation,status:u}=s,{noUpdateTTL:S=this.noUpdateTTL}=s,R=c(this,Ot).call(this,e$1,i,s.size||0,p);if(this.maxEntrySize&&R>this.maxEntrySize)return u&&(u.set="miss",u.maxEntrySizeExceeded=true),f$1(this,h,ht).call(this,e$1,"set"),this;let b=c(this,D)===0?void 0:c(this,T).get(e$1);if(b===void 0)b=c(this,D)===0?c(this,C):c(this,Y).length!==0?c(this,Y).pop():c(this,D)===c(this,q)?f$1(this,h,Ft).call(this,false):c(this,D),c(this,E)[b]=e$1,c(this,f)[b]=i,c(this,T).set(e$1,b),c(this,L)[c(this,C)]=b,c(this,V)[b]=c(this,C),e(this,C,b),g(this,D)._++,c(this,wt).call(this,b,R,u),u&&(u.set="add"),S=false,c(this,xt)&&((it=c(this,pt))==null||it.call(this,i,e$1,"add"));else {f$1(this,h,Et).call(this,b);let v=c(this,f)[b];if(i!==v){if(c(this,lt)&&f$1(this,h,A).call(this,v)){v.__abortController.abort(new Error("replaced"));let{__staleWhileFetching:n}=v;n!==void 0&&!r&&(c(this,Z)&&((G=c(this,K))==null||G.call(this,n,e$1,"set")),c(this,z)&&c(this,F)?.push([n,e$1,"set"]));}else r||(c(this,Z)&&((d=c(this,K))==null||d.call(this,v,e$1,"set")),c(this,z)&&c(this,F)?.push([v,e$1,"set"]));if(c(this,ut).call(this,b),c(this,wt).call(this,b,R,u),c(this,f)[b]=i,u){u.set="replace";let n=v&&f$1(this,h,A).call(this,v)?v.__staleWhileFetching:v;n!==void 0&&(u.oldValue=n);}}else u&&(u.set="update");c(this,xt)&&this.onInsert?.(i,e$1,i===v?"update":"replace");}if(o!==0&&!c(this,W)&&f$1(this,h,It).call(this),c(this,W)&&(S||c(this,Ut).call(this,b,o,a),u&&c(this,st).call(this,u,b)),!r&&c(this,z)&&c(this,F)){let v=c(this,F),n;for(;n=v?.shift();)(y=c(this,$))==null||y.call(this,...n);}return this}pop(){var e;try{for(;c(this,D);){let i=c(this,f)[c(this,P)];if(f$1(this,h,Ft).call(this,!0),f$1(this,h,A).call(this,i)){if(i.__staleWhileFetching)return i.__staleWhileFetching}else if(i!==void 0)return i}}finally{if(c(this,z)&&c(this,F)){let i=c(this,F),s;for(;s=i?.shift();)(e=c(this,$))==null||e.call(this,...s);}}}has(e,i={}){let{updateAgeOnHas:s=this.updateAgeOnHas,status:o}=i,a=c(this,T).get(e);if(a!==void 0){let r=c(this,f)[a];if(f$1(this,h,A).call(this,r)&&r.__staleWhileFetching===void 0)return false;if(c(this,k).call(this,a))o&&(o.has="stale",c(this,st).call(this,o,a));else return s&&c(this,dt).call(this,a),o&&(o.has="hit",c(this,st).call(this,o,a)),true}else o&&(o.has="miss");return false}peek(e,i={}){let{allowStale:s=this.allowStale}=i,o=c(this,T).get(e);if(o===void 0||!s&&c(this,k).call(this,o))return;let a=c(this,f)[o];return f$1(this,h,A).call(this,a)?a.__staleWhileFetching:a}async fetch(e,i={}){let{allowStale:s=this.allowStale,updateAgeOnGet:o=this.updateAgeOnGet,noDeleteOnStaleGet:a=this.noDeleteOnStaleGet,ttl:r=this.ttl,noDisposeOnSet:p=this.noDisposeOnSet,size:u=0,sizeCalculation:S=this.sizeCalculation,noUpdateTTL:R=this.noUpdateTTL,noDeleteOnFetchRejection:b=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:it=this.allowStaleOnFetchRejection,ignoreFetchAbort:G=this.ignoreFetchAbort,allowStaleOnFetchAbort:d=this.allowStaleOnFetchAbort,context:y,forceRefresh:v=false,status:n,signal:_}=i;if(!c(this,lt))return n&&(n.fetch="get"),this.get(e,{allowStale:s,updateAgeOnGet:o,noDeleteOnStaleGet:a,status:n});let U={allowStale:s,updateAgeOnGet:o,noDeleteOnStaleGet:a,ttl:r,noDisposeOnSet:p,size:u,sizeCalculation:S,noUpdateTTL:R,noDeleteOnFetchRejection:b,allowStaleOnFetchRejection:it,allowStaleOnFetchAbort:d,ignoreFetchAbort:G,status:n,signal:_},O=c(this,T).get(e);if(O===void 0){n&&(n.fetch="miss");let x=f$1(this,h,jt).call(this,e,O,U,y);return x.__returned=x}else {let x=c(this,f)[O];if(f$1(this,h,A).call(this,x)){let vt=s&&x.__staleWhileFetching!==void 0;return n&&(n.fetch="inflight",vt&&(n.returnedStale=true)),vt?x.__staleWhileFetching:x.__returned=x}let rt=c(this,k).call(this,O);if(!v&&!rt)return n&&(n.fetch="hit"),f$1(this,h,Et).call(this,O),o&&c(this,dt).call(this,O),n&&c(this,st).call(this,n,O),x;let mt=f$1(this,h,jt).call(this,e,O,U,y),gt=mt.__staleWhileFetching!==void 0&&s;return n&&(n.fetch=rt?"stale":"refresh",gt&&rt&&(n.returnedStale=true)),gt?mt.__staleWhileFetching:mt.__returned=mt}}async forceFetch(e,i={}){let s=await this.fetch(e,i);if(s===void 0)throw new Error("fetch() returned undefined");return s}memo(e,i={}){let s=c(this,St);if(!s)throw new Error("no memoMethod provided to constructor");let{context:o,forceRefresh:a,...r}=i,p=this.get(e,r);if(!a&&p!==void 0)return p;let u=s(e,p,{options:r,context:o});return this.set(e,u,r),u}get(e,i={}){let{allowStale:s=this.allowStale,updateAgeOnGet:o=this.updateAgeOnGet,noDeleteOnStaleGet:a=this.noDeleteOnStaleGet,status:r}=i,p=c(this,T).get(e);if(p!==void 0){let u=c(this,f)[p],S=f$1(this,h,A).call(this,u);return r&&c(this,st).call(this,r,p),c(this,k).call(this,p)?(r&&(r.get="stale"),S?(r&&s&&u.__staleWhileFetching!==void 0&&(r.returnedStale=true),s?u.__staleWhileFetching:void 0):(a||f$1(this,h,ht).call(this,e,"expire"),r&&s&&(r.returnedStale=true),s?u:void 0)):(r&&(r.get="hit"),S?u.__staleWhileFetching:(f$1(this,h,Et).call(this,p),o&&c(this,dt).call(this,p),u))}else r&&(r.get="miss");}delete(e){return f$1(this,h,ht).call(this,e,"delete")}clear(){return f$1(this,h,Mt).call(this,"delete")}},q=new WeakMap,M=new WeakMap,K=new WeakMap,pt=new WeakMap,$=new WeakMap,yt=new WeakMap,St=new WeakMap,B=new WeakMap,D=new WeakMap,X=new WeakMap,T=new WeakMap,E=new WeakMap,f=new WeakMap,L=new WeakMap,V=new WeakMap,P=new WeakMap,C=new WeakMap,Y=new WeakMap,F=new WeakMap,J=new WeakMap,Q=new WeakMap,W=new WeakMap,H=new WeakMap,Z=new WeakMap,lt=new WeakMap,z=new WeakMap,xt=new WeakMap,h=new WeakSet,It=function(){let e$1=new Ct(c(this,q)),i=new Ct(c(this,q));e(this,W,e$1),e(this,Q,i);let s=this.ttlAutopurge?new Array(c(this,q)):void 0;e(this,H,s),e(this,Ut,(r,p,u=c(this,B).now())=>{if(i[r]=p!==0?u:0,e$1[r]=p,s?.[r]&&(clearTimeout(s[r]),s[r]=void 0),p!==0&&s){let S=setTimeout(()=>{c(this,k).call(this,r)&&f$1(this,h,ht).call(this,c(this,E)[r],"expire");},p+1);S.unref&&S.unref(),s[r]=S;}}),e(this,dt,r=>{i[r]=e$1[r]!==0?c(this,B).now():0;}),e(this,st,(r,p)=>{if(e$1[p]){let u=e$1[p],S=i[p];if(!u||!S)return;r.ttl=u,r.start=S,r.now=o||a();let R=r.now-S;r.remainingTTL=u-R;}});let o=0,a=()=>{let r=c(this,B).now();if(this.ttlResolution>0){o=r;let p=setTimeout(()=>o=0,this.ttlResolution);p.unref&&p.unref();}return r};this.getRemainingTTL=r=>{let p=c(this,T).get(r);if(p===void 0)return 0;let u=e$1[p],S=i[p];if(!u||!S)return 1/0;let R=(o||a())-S;return u-R},e(this,k,r=>{let p=i[r],u=e$1[r];return !!u&&!!p&&(o||a())-p>u});},dt=new WeakMap,st=new WeakMap,Ut=new WeakMap,k=new WeakMap,ee=function(){let e$1=new Ct(c(this,q));e(this,X,0),e(this,J,e$1),e(this,ut,i=>{e(this,X,c(this,X)-e$1[i]),e$1[i]=0;}),e(this,Ot,(i,s,o,a)=>{if(f$1(this,h,A).call(this,s))return 0;if(!ot(o))if(a){if(typeof a!="function")throw new TypeError("sizeCalculation must be a function");if(o=a(s,i),!ot(o))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 o}),e(this,wt,(i,s,o)=>{if(e$1[i]=s,c(this,M)){let a=c(this,M)-e$1[i];for(;c(this,X)>a;)f$1(this,h,Ft).call(this,true);}e(this,X,c(this,X)+e$1[i]),o&&(o.entrySize=s,o.totalCalculatedSize=c(this,X));});},ut=new WeakMap,wt=new WeakMap,Ot=new WeakMap,nt=function*({allowStale:e=this.allowStale}={}){if(c(this,D))for(let i=c(this,C);!(!f$1(this,h,Nt).call(this,i)||((e||!c(this,k).call(this,i))&&(yield i),i===c(this,P)));)i=c(this,V)[i];},at=function*({allowStale:e=this.allowStale}={}){if(c(this,D))for(let i=c(this,P);!(!f$1(this,h,Nt).call(this,i)||((e||!c(this,k).call(this,i))&&(yield i),i===c(this,C)));)i=c(this,L)[i];},Nt=function(e){return e!==void 0&&c(this,T).get(c(this,E)[e])===e},Ft=function(e$1){var a;let i=c(this,P),s=c(this,E)[i],o=c(this,f)[i];return c(this,lt)&&f$1(this,h,A).call(this,o)?o.__abortController.abort(new Error("evicted")):(c(this,Z)||c(this,z))&&(c(this,Z)&&((a=c(this,K))==null||a.call(this,o,s,"evict")),c(this,z)&&c(this,F)?.push([o,s,"evict"])),c(this,ut).call(this,i),c(this,H)?.[i]&&(clearTimeout(c(this,H)[i]),c(this,H)[i]=void 0),e$1&&(c(this,E)[i]=void 0,c(this,f)[i]=void 0,c(this,Y).push(i)),c(this,D)===1?(e(this,P,e(this,C,0)),c(this,Y).length=0):e(this,P,c(this,L)[i]),c(this,T).delete(s),g(this,D)._--,i},jt=function(e,i,s,o){let a=i===void 0?void 0:c(this,f)[i];if(f$1(this,h,A).call(this,a))return a;let r=new Pt,{signal:p}=s;p?.addEventListener("abort",()=>r.abort(p.reason),{signal:r.signal});let u={signal:r.signal,options:s,context:o},S=(y,v=false)=>{let{aborted:n}=r.signal,_=s.ignoreFetchAbort&&y!==void 0,U=s.ignoreFetchAbort||!!(s.allowStaleOnFetchAbort&&y!==void 0);if(s.status&&(n&&!v?(s.status.fetchAborted=true,s.status.fetchError=r.signal.reason,_&&(s.status.fetchAbortIgnored=true)):s.status.fetchResolved=true),n&&!_&&!v)return b(r.signal.reason,U);let O=G,x=c(this,f)[i];return (x===G||_&&v&&x===void 0)&&(y===void 0?O.__staleWhileFetching!==void 0?c(this,f)[i]=O.__staleWhileFetching:f$1(this,h,ht).call(this,e,"fetch"):(s.status&&(s.status.fetchUpdated=true),this.set(e,y,u.options))),y},R=y=>(s.status&&(s.status.fetchRejected=true,s.status.fetchError=y),b(y,false)),b=(y,v)=>{let{aborted:n}=r.signal,_=n&&s.allowStaleOnFetchAbort,U=_||s.allowStaleOnFetchRejection,O=U||s.noDeleteOnFetchRejection,x=G;if(c(this,f)[i]===G&&(!O||!v&&x.__staleWhileFetching===void 0?f$1(this,h,ht).call(this,e,"fetch"):_||(c(this,f)[i]=x.__staleWhileFetching)),U)return s.status&&x.__staleWhileFetching!==void 0&&(s.status.returnedStale=true),x.__staleWhileFetching;if(x.__returned===x)throw y},it=(y,v)=>{var _;let n=(_=c(this,yt))==null?void 0:_.call(this,e,a,u);n&&n instanceof Promise&&n.then(U=>y(U===void 0?void 0:U),v),r.signal.addEventListener("abort",()=>{(!s.ignoreFetchAbort||s.allowStaleOnFetchAbort)&&(y(void 0),s.allowStaleOnFetchAbort&&(y=U=>S(U,true)));});};s.status&&(s.status.fetchDispatched=true);let G=new Promise(it).then(S,R),d=Object.assign(G,{__abortController:r,__staleWhileFetching:a,__returned:void 0});return i===void 0?(this.set(e,d,{...u.options,status:void 0}),i=c(this,T).get(e)):c(this,f)[i]=d,d},A=function(e){if(!c(this,lt))return false;let i=e;return !!i&&i instanceof Promise&&i.hasOwnProperty("__staleWhileFetching")&&i.__abortController instanceof Pt},Gt=function(e,i){c(this,V)[i]=e,c(this,L)[e]=i;},Et=function(e$1){e$1!==c(this,C)&&(e$1===c(this,P)?e(this,P,c(this,L)[e$1]):f$1(this,h,Gt).call(this,c(this,V)[e$1],c(this,L)[e$1]),f$1(this,h,Gt).call(this,c(this,C),e$1),e(this,C,e$1));},ht=function(e$1,i){var o,a;let s=false;if(c(this,D)!==0){let r=c(this,T).get(e$1);if(r!==void 0)if(c(this,H)?.[r]&&(clearTimeout(c(this,H)?.[r]),c(this,H)[r]=void 0),s=true,c(this,D)===1)f$1(this,h,Mt).call(this,i);else {c(this,ut).call(this,r);let p=c(this,f)[r];if(f$1(this,h,A).call(this,p)?p.__abortController.abort(new Error("deleted")):(c(this,Z)||c(this,z))&&(c(this,Z)&&((o=c(this,K))==null||o.call(this,p,e$1,i)),c(this,z)&&c(this,F)?.push([p,e$1,i])),c(this,T).delete(e$1),c(this,E)[r]=void 0,c(this,f)[r]=void 0,r===c(this,C))e(this,C,c(this,V)[r]);else if(r===c(this,P))e(this,P,c(this,L)[r]);else {let u=c(this,V)[r];c(this,L)[u]=c(this,L)[r];let S=c(this,L)[r];c(this,V)[S]=c(this,V)[r];}g(this,D)._--,c(this,Y).push(r);}}if(c(this,z)&&c(this,F)?.length){let r=c(this,F),p;for(;p=r?.shift();)(a=c(this,$))==null||a.call(this,...p);}return s},Mt=function(e$1){var i,s;for(let o of f$1(this,h,at).call(this,{allowStale:true})){let a=c(this,f)[o];if(f$1(this,h,A).call(this,a))a.__abortController.abort(new Error("deleted"));else {let r=c(this,E)[o];c(this,Z)&&((i=c(this,K))==null||i.call(this,a,r,e$1)),c(this,z)&&c(this,F)?.push([a,r,e$1]);}}if(c(this,T).clear(),c(this,f).fill(void 0),c(this,E).fill(void 0),c(this,W)&&c(this,Q)){c(this,W).fill(0),c(this,Q).fill(0);for(let o of c(this,H)??[])o!==void 0&&clearTimeout(o);c(this,H)?.fill(void 0);}if(c(this,J)&&c(this,J).fill(0),e(this,P,0),e(this,C,0),c(this,Y).length=0,e(this,X,0),e(this,D,0),c(this,z)&&c(this,F)){let o=c(this,F),a;for(;a=o?.shift();)(s=c(this,$))==null||s.call(this,...a);}},bt);var Rt=class{constructor(e){b(this,"cache");b(this,"map",new Map);this.cache=new te({max:e.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(e){let i=this.map.delete(e);return i&&this.cache.delete(e),i}get forEach(){return this.map.forEach}get(e){let i=this.cache.get(e);return i||this.map.get(e)}has(e){return this.map.has(e)}set(e,i){return this.map.set(e,i),this.cache.set(e,i),this}get size(){return this.map.size}entries(){return this.map.entries()}keys(){return this.map.keys()}values(){return this.map.values()}};var Tt="1.5.17";var Vt="repeat";function Wt(g){return {type:"pause",duration:g}}var Ht="__game_layer__";var ie={};var kt={};a(kt,{createExportableElement:()=>se});var At;(o=>(o.log=(a,...r)=>console.log(`[Pixi\u2019VN] ${a}`,...r),o.warn=(a,...r)=>console.warn(`[Pixi\u2019VN] ${a}`,...r),o.error=(a,...r)=>console.error(`[Pixi\u2019VN] ${a}`,...r),o.info=(a,...r)=>console.info(`[Pixi\u2019VN] ${a}`,...r)))(At||(At={}));function se(g){try{if(typeof g>"u")return g;let e=JSON.stringify(g);return JSON.parse(e)}catch(e){throw At.error("Error creating exportable element",g,e),new PixiError("not_json_serializable","Error creating exportable element")}}function re(){console.info(`
2
2
  _______ _ _ _ ____ ____ ____ _____
3
3
  |_ __ \\ (_) (_) | | |_ _| |_ _||_ \\|_ _|
4
4
  | |__) |__ _ __ __ \\_| \\ \\ / / | \\ | |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@drincs/pixi-vn",
3
- "version": "1.5.16",
3
+ "version": "1.5.17",
4
4
  "type": "module",
5
5
  "description": "Pixi'VN is a npm package that provides various features for creating visual novels.",
6
6
  "main": "./dist/index.cjs",