@drincs/pixi-vn-json 1.10.3 → 1.11.0
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 +2 -1
- package/dist/core.cjs.map +1 -0
- package/dist/core.d.cts +9 -8
- package/dist/core.d.ts +9 -8
- package/dist/core.mjs +2 -1
- package/dist/core.mjs.map +1 -0
- package/dist/importer.cjs +2 -1
- package/dist/importer.cjs.map +1 -0
- package/dist/importer.d.cts +9 -8
- package/dist/importer.d.ts +9 -8
- package/dist/importer.mjs +2 -1
- package/dist/importer.mjs.map +1 -0
- package/dist/index.cjs +2 -2
- package/dist/index.d.cts +9 -8
- package/dist/index.d.ts +9 -8
- package/dist/index.mjs +2 -2
- package/dist/translator.cjs +2 -1
- package/dist/translator.cjs.map +1 -0
- package/dist/translator.d.cts +9 -8
- package/dist/translator.d.ts +9 -8
- package/dist/translator.mjs +2 -1
- package/dist/translator.mjs.map +1 -0
- package/package.json +4 -4
package/dist/core.cjs
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
'use strict';var pixiVn=require('@drincs/pixi-vn');var d=Object.defineProperty;var P=(s,i,p)=>i in s?d(s,i,{enumerable:true,configurable:true,writable:true,value:p}):s[i]=p;var o=(s,i,p)=>P(s,typeof i!="symbol"?i+"":i,p);var t;(c=>(c.log=(n,...r)=>console.log(`[Pixi\u2019VN Json] ${n}`,...r),c.warn=(n,...r)=>console.warn(`[Pixi\u2019VN Json] ${n}`,...r),c.error=(n,...r)=>console.error(`[Pixi\u2019VN Json] ${n}`,...r),c.info=(n,...r)=>console.info(`[Pixi\u2019VN Json] ${n}`,...r)))(t||(t={}));var e=class e{static init(i){i.loadAssets&&(e._loadAssets=i.loadAssets),i.soundOperation&&(e._soundOperation=i.soundOperation),i.imageOperation&&(e._imageOperation=i.imageOperation),i.videoOperation&&(e._videoOperation=i.videoOperation),i.imageContainerOperation&&(e._imageContainerOperation=i.imageContainerOperation),i.textOperation&&(e._textOperation=i.textOperation),i.canvasElementOperation&&(e._canvasElementOperation=i.canvasElementOperation),i.setStorageValue&&(e._setStorageValue=i.setStorageValue),i.setInitialStorageValue&&(e._setInitialStorageValue=i.setInitialStorageValue),i.narrationOperation&&(e._narrationOperation=i.narrationOperation),i.effectOperation&&(e._effectOperation=i.effectOperation),i.animateOperation&&(e._animateOperation=i.animateOperation),i.getLogichValue&&(e._getLogichValue=i.getLogichValue),i.getConditionalStep&&(e._getConditionalStep=i.getConditionalStep);}static get loadAssets(){return e._loadAssets}static get soundOperation(){return e._soundOperation}static get imageOperation(){return e._imageOperation}static get videoOperation(){return e._videoOperation}static get textOperation(){return e._textOperation}static get imageContainerOperation(){return e._imageContainerOperation}static get canvasElementOperation(){return e._canvasElementOperation}static get setStorageValue(){return e._setStorageValue}static get setInitialStorageValue(){return e._setInitialStorageValue}static get narrationOperation(){return e._narrationOperation}static get effectOperation(){return e._effectOperation}static get animateOperation(){return e._animateOperation}static get getLogichValue(){return e._getLogichValue}static get getConditionalStep(){return e._getConditionalStep}};o(e,"_loadAssets",()=>{}),o(e,"_soundOperation",()=>{throw t.error("An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue."),new pixiVn.PixiError("invalid_usage","An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue.")}),o(e,"_imageOperation",()=>{throw t.error("An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue."),new pixiVn.PixiError("invalid_usage","An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue.")}),o(e,"_videoOperation",()=>{throw t.error("An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue."),new pixiVn.PixiError("invalid_usage","An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue.")}),o(e,"_imageContainerOperation",()=>{throw t.error("An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue."),new pixiVn.PixiError("invalid_usage","An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue.")}),o(e,"_textOperation",()=>{throw t.error("An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue."),new pixiVn.PixiError("invalid_usage","An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue.")}),o(e,"_canvasElementOperation",()=>{throw t.error("An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue."),new pixiVn.PixiError("invalid_usage","An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue.")}),o(e,"_setStorageValue",()=>{throw t.error("An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue."),new pixiVn.PixiError("invalid_usage","An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue.")}),o(e,"_setInitialStorageValue",()=>{throw t.error("An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue."),new pixiVn.PixiError("invalid_usage","An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue.")}),o(e,"_narrationOperation",()=>{throw t.error("An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue."),new pixiVn.PixiError("invalid_usage","An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue.")}),o(e,"_effectOperation",()=>{throw t.error("An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue."),new pixiVn.PixiError("invalid_usage","An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue.")}),o(e,"_animateOperation",()=>{throw t.error("An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue."),new pixiVn.PixiError("invalid_usage","An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue.")}),o(e,"_getLogichValue",()=>{throw t.error("An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue."),new pixiVn.PixiError("invalid_usage","An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue.")}),o(e,"_getConditionalStep",()=>{throw t.error("An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue."),new pixiVn.PixiError("invalid_usage","An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue.")});var x=e;exports.JsonUnifier=x
|
|
1
|
+
'use strict';var pixiVn=require('@drincs/pixi-vn');var d=Object.defineProperty;var P=(s,i,p)=>i in s?d(s,i,{enumerable:true,configurable:true,writable:true,value:p}):s[i]=p;var o=(s,i,p)=>P(s,typeof i!="symbol"?i+"":i,p);var t;(c=>(c.log=(n,...r)=>console.log(`[Pixi\u2019VN Json] ${n}`,...r),c.warn=(n,...r)=>console.warn(`[Pixi\u2019VN Json] ${n}`,...r),c.error=(n,...r)=>console.error(`[Pixi\u2019VN Json] ${n}`,...r),c.info=(n,...r)=>console.info(`[Pixi\u2019VN Json] ${n}`,...r)))(t||(t={}));var e=class e{static init(i){i.loadAssets&&(e._loadAssets=i.loadAssets),i.soundOperation&&(e._soundOperation=i.soundOperation),i.imageOperation&&(e._imageOperation=i.imageOperation),i.videoOperation&&(e._videoOperation=i.videoOperation),i.imageContainerOperation&&(e._imageContainerOperation=i.imageContainerOperation),i.textOperation&&(e._textOperation=i.textOperation),i.canvasElementOperation&&(e._canvasElementOperation=i.canvasElementOperation),i.setStorageValue&&(e._setStorageValue=i.setStorageValue),i.setInitialStorageValue&&(e._setInitialStorageValue=i.setInitialStorageValue),i.narrationOperation&&(e._narrationOperation=i.narrationOperation),i.effectOperation&&(e._effectOperation=i.effectOperation),i.animateOperation&&(e._animateOperation=i.animateOperation),i.getLogichValue&&(e._getLogichValue=i.getLogichValue),i.getConditionalStep&&(e._getConditionalStep=i.getConditionalStep);}static get loadAssets(){return e._loadAssets}static get soundOperation(){return e._soundOperation}static get imageOperation(){return e._imageOperation}static get videoOperation(){return e._videoOperation}static get textOperation(){return e._textOperation}static get imageContainerOperation(){return e._imageContainerOperation}static get canvasElementOperation(){return e._canvasElementOperation}static get setStorageValue(){return e._setStorageValue}static get setInitialStorageValue(){return e._setInitialStorageValue}static get narrationOperation(){return e._narrationOperation}static get effectOperation(){return e._effectOperation}static get animateOperation(){return e._animateOperation}static get getLogichValue(){return e._getLogichValue}static get getConditionalStep(){return e._getConditionalStep}};o(e,"_loadAssets",()=>{}),o(e,"_soundOperation",()=>{throw t.error("An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue."),new pixiVn.PixiError("invalid_usage","An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue.")}),o(e,"_imageOperation",()=>{throw t.error("An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue."),new pixiVn.PixiError("invalid_usage","An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue.")}),o(e,"_videoOperation",()=>{throw t.error("An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue."),new pixiVn.PixiError("invalid_usage","An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue.")}),o(e,"_imageContainerOperation",()=>{throw t.error("An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue."),new pixiVn.PixiError("invalid_usage","An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue.")}),o(e,"_textOperation",()=>{throw t.error("An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue."),new pixiVn.PixiError("invalid_usage","An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue.")}),o(e,"_canvasElementOperation",()=>{throw t.error("An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue."),new pixiVn.PixiError("invalid_usage","An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue.")}),o(e,"_setStorageValue",()=>{throw t.error("An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue."),new pixiVn.PixiError("invalid_usage","An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue.")}),o(e,"_setInitialStorageValue",()=>{throw t.error("An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue."),new pixiVn.PixiError("invalid_usage","An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue.")}),o(e,"_narrationOperation",()=>{throw t.error("An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue."),new pixiVn.PixiError("invalid_usage","An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue.")}),o(e,"_effectOperation",()=>{throw t.error("An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue."),new pixiVn.PixiError("invalid_usage","An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue.")}),o(e,"_animateOperation",()=>{throw t.error("An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue."),new pixiVn.PixiError("invalid_usage","An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue.")}),o(e,"_getLogichValue",()=>{throw t.error("An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue."),new pixiVn.PixiError("invalid_usage","An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue.")}),o(e,"_getConditionalStep",()=>{throw t.error("An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue."),new pixiVn.PixiError("invalid_usage","An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue.")});var x=e;exports.JsonUnifier=x;//# sourceMappingURL=core.cjs.map
|
|
2
|
+
//# sourceMappingURL=core.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/utils/log-utility.ts","../src/core/JsonUnifier.ts"],"names":["logger","message","optionalParams","_JsonUnifier","options","__publicField","PixiError","JsonUnifier"],"mappings":"6NAAO,IAAUA,CAAAA,CAAAA,CAAAA,CAAAA,GACAA,EAAA,GAAA,CAAM,CAACC,CAAAA,CAAAA,GAAkBC,CAAAA,GAClC,OAAA,CAA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ACN,eAAA,CACA,2GACJ,CACJ,CAAA,CAAA,CAlPJ,IAAqBC,CAAAA,CAArBJ","file":"core.cjs","sourcesContent":["export namespace logger {\n export const log = (message?: any, ...optionalParams: any[]) =>\n console.log(`[Pixi’VN Json] ${message}`, ...optionalParams);\n export const warn = (message?: any, ...optionalParams: any[]) =>\n console.warn(`[Pixi’VN Json] ${message}`, ...optionalParams);\n export const error = (message?: any, ...optionalParams: any[]) =>\n console.error(`[Pixi’VN Json] ${message}`, ...optionalParams);\n export const info = (message?: any, ...optionalParams: any[]) =>\n console.info(`[Pixi’VN Json] ${message}`, ...optionalParams);\n}\n","import {\n PixiError,\n type ContainerChild,\n type ContainerMemory,\n type ImageSpriteMemory,\n type StorageElementType,\n type VideoSpriteMemory,\n} from \"@drincs/pixi-vn\";\nimport {\n PixiVNJsonArithmeticOperations,\n PixiVNJsonCanvasAnimate,\n PixiVNJsonCanvasEffect,\n PixiVNJsonConditionalStatements,\n PixiVNJsonConditions,\n PixiVNJsonIfElse,\n PixiVNJsonLabelStep,\n PixiVNJsonNarration,\n PixiVNJsonOperation,\n PixiVNJsonOperationString,\n PixiVNJsonSound,\n PixiVNJsonValueGet,\n PixiVNJsonValueSet,\n} from \"../interface\";\nimport {\n PixiVNJsonCanvasImageContainerShow,\n PixiVNJsonCanvasImageVideoShow,\n PixiVNJsonCanvasRemove,\n PixiVNJsonCanvasTextShow,\n PixiVNJsonImageContainerEdit,\n PixiVNJsonImageEdit,\n PixiVNJsonTextEdit,\n PixiVNJsonUnknownEdit,\n PixiVNJsonVideoEdit,\n PixiVNJsonVideoPauseResume,\n} from \"../interface/PixiVNJsonCanvas\";\nimport { PixiVNJsonOnlyStorageSet } from \"../interface/PixiVNJsonValue\";\nimport { logger } from \"../utils/log-utility\";\n\nexport default class JsonUnifier {\n static init(options: {\n loadAssets?: (\n origin: PixiVNJsonOperation | PixiVNJsonIfElse<PixiVNJsonOperation> | PixiVNJsonOperationString,\n ) => Promise<void> | void;\n soundOperation?: (operation: PixiVNJsonSound) => void;\n imageOperation?: (\n operation: PixiVNJsonCanvasImageVideoShow | PixiVNJsonImageEdit | PixiVNJsonCanvasRemove,\n ) => Promise<void>;\n videoOperation?: (\n operation:\n | PixiVNJsonCanvasImageVideoShow\n | PixiVNJsonCanvasRemove\n | PixiVNJsonVideoEdit\n | PixiVNJsonVideoPauseResume,\n ) => Promise<void>;\n imageContainerOperation?: (\n operation: PixiVNJsonCanvasRemove | PixiVNJsonCanvasImageContainerShow | PixiVNJsonImageContainerEdit,\n ) => Promise<void>;\n textOperation?: (\n operation: PixiVNJsonCanvasRemove | PixiVNJsonCanvasTextShow | PixiVNJsonTextEdit,\n ) => Promise<void>;\n canvasElementOperation?: (\n operation:\n | PixiVNJsonCanvasRemove\n | PixiVNJsonUnknownEdit<ImageSpriteMemory | VideoSpriteMemory | ContainerMemory<ContainerChild>>,\n ) => Promise<void>;\n setStorageValue?: (value: PixiVNJsonValueSet) => void;\n setInitialStorageValue: (value: PixiVNJsonOnlyStorageSet) => void;\n narrationOperation?: (operation: PixiVNJsonNarration) => void;\n effectOperation?: (operation: PixiVNJsonCanvasEffect) => Promise<void>;\n animateOperation?: (operation: PixiVNJsonCanvasAnimate) => void;\n getLogichValue?: <T = StorageElementType>(\n value:\n | T\n | PixiVNJsonValueGet\n | PixiVNJsonArithmeticOperations\n | PixiVNJsonConditions\n | PixiVNJsonConditionalStatements<\n T | PixiVNJsonValueGet | PixiVNJsonArithmeticOperations | PixiVNJsonConditions\n >,\n ) => T | undefined;\n getConditionalStep?: (originalStep: PixiVNJsonLabelStep) => PixiVNJsonLabelStep;\n }) {\n if (options.loadAssets) JsonUnifier._loadAssets = options.loadAssets;\n if (options.soundOperation) JsonUnifier._soundOperation = options.soundOperation;\n if (options.imageOperation) JsonUnifier._imageOperation = options.imageOperation;\n if (options.videoOperation) JsonUnifier._videoOperation = options.videoOperation;\n if (options.imageContainerOperation) JsonUnifier._imageContainerOperation = options.imageContainerOperation;\n if (options.textOperation) JsonUnifier._textOperation = options.textOperation;\n if (options.canvasElementOperation) JsonUnifier._canvasElementOperation = options.canvasElementOperation;\n if (options.setStorageValue) JsonUnifier._setStorageValue = options.setStorageValue;\n if (options.setInitialStorageValue) JsonUnifier._setInitialStorageValue = options.setInitialStorageValue;\n if (options.narrationOperation) JsonUnifier._narrationOperation = options.narrationOperation;\n if (options.effectOperation) JsonUnifier._effectOperation = options.effectOperation;\n if (options.animateOperation) JsonUnifier._animateOperation = options.animateOperation;\n if (options.getLogichValue) JsonUnifier._getLogichValue = options.getLogichValue;\n if (options.getConditionalStep) JsonUnifier._getConditionalStep = options.getConditionalStep;\n }\n private static _loadAssets: (\n origin: PixiVNJsonOperation | PixiVNJsonIfElse<PixiVNJsonOperation> | PixiVNJsonOperationString,\n ) => Promise<void> | void = () => {};\n static get loadAssets() {\n return JsonUnifier._loadAssets;\n }\n private static _soundOperation: (operation: PixiVNJsonSound) => void = () => {\n logger.error(\n \"An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue.\",\n );\n throw new PixiError(\n \"invalid_usage\",\n \"An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue.\",\n );\n };\n static get soundOperation() {\n return JsonUnifier._soundOperation;\n }\n private static _imageOperation: (\n operation: PixiVNJsonCanvasImageVideoShow | PixiVNJsonImageEdit | PixiVNJsonCanvasRemove,\n ) => Promise<void> = () => {\n logger.error(\n \"An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue.\",\n );\n throw new PixiError(\n \"invalid_usage\",\n \"An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue.\",\n );\n };\n static get imageOperation() {\n return JsonUnifier._imageOperation;\n }\n private static _videoOperation: (\n operation:\n | PixiVNJsonCanvasImageVideoShow\n | PixiVNJsonCanvasRemove\n | PixiVNJsonVideoEdit\n | PixiVNJsonVideoPauseResume,\n ) => Promise<void> = () => {\n logger.error(\n \"An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue.\",\n );\n throw new PixiError(\n \"invalid_usage\",\n \"An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue.\",\n );\n };\n static get videoOperation() {\n return JsonUnifier._videoOperation;\n }\n private static _imageContainerOperation: (\n operation: PixiVNJsonCanvasRemove | PixiVNJsonCanvasImageContainerShow | PixiVNJsonImageContainerEdit,\n ) => Promise<void> = () => {\n logger.error(\n \"An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue.\",\n );\n throw new PixiError(\n \"invalid_usage\",\n \"An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue.\",\n );\n };\n static get textOperation() {\n return JsonUnifier._textOperation;\n }\n private static _textOperation: (\n operation: PixiVNJsonCanvasRemove | PixiVNJsonCanvasTextShow | PixiVNJsonTextEdit,\n ) => Promise<void> = () => {\n logger.error(\n \"An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue.\",\n );\n throw new PixiError(\n \"invalid_usage\",\n \"An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue.\",\n );\n };\n static get imageContainerOperation() {\n return JsonUnifier._imageContainerOperation;\n }\n private static _canvasElementOperation: (\n operation:\n | PixiVNJsonCanvasRemove\n | PixiVNJsonUnknownEdit<ImageSpriteMemory | VideoSpriteMemory | ContainerMemory<ContainerChild>>,\n ) => Promise<void> = () => {\n logger.error(\n \"An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue.\",\n );\n throw new PixiError(\n \"invalid_usage\",\n \"An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue.\",\n );\n };\n static get canvasElementOperation() {\n return JsonUnifier._canvasElementOperation;\n }\n private static _setStorageValue: (value: PixiVNJsonValueSet) => void = () => {\n logger.error(\n \"An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue.\",\n );\n throw new PixiError(\n \"invalid_usage\",\n \"An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue.\",\n );\n };\n static get setStorageValue() {\n return JsonUnifier._setStorageValue;\n }\n private static _setInitialStorageValue: (value: PixiVNJsonOnlyStorageSet) => void = () => {\n logger.error(\n \"An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue.\",\n );\n throw new PixiError(\n \"invalid_usage\",\n \"An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue.\",\n );\n };\n static get setInitialStorageValue() {\n return JsonUnifier._setInitialStorageValue;\n }\n private static _narrationOperation: (operation: PixiVNJsonNarration) => void = () => {\n logger.error(\n \"An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue.\",\n );\n throw new PixiError(\n \"invalid_usage\",\n \"An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue.\",\n );\n };\n static get narrationOperation() {\n return JsonUnifier._narrationOperation;\n }\n private static _effectOperation: (operation: PixiVNJsonCanvasEffect) => Promise<void> = () => {\n logger.error(\n \"An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue.\",\n );\n throw new PixiError(\n \"invalid_usage\",\n \"An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue.\",\n );\n };\n static get effectOperation() {\n return JsonUnifier._effectOperation;\n }\n private static _animateOperation: (operation: PixiVNJsonCanvasAnimate) => void = () => {\n logger.error(\n \"An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue.\",\n );\n throw new PixiError(\n \"invalid_usage\",\n \"An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue.\",\n );\n };\n static get animateOperation() {\n return JsonUnifier._animateOperation;\n }\n private static _getLogichValue: <T = StorageElementType>(\n value:\n | T\n | PixiVNJsonValueGet\n | PixiVNJsonArithmeticOperations\n | PixiVNJsonConditions\n | PixiVNJsonConditionalStatements<\n T | PixiVNJsonValueGet | PixiVNJsonArithmeticOperations | PixiVNJsonConditions\n >,\n ) => T | undefined = () => {\n logger.error(\n \"An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue.\",\n );\n throw new PixiError(\n \"invalid_usage\",\n \"An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue.\",\n );\n };\n static get getLogichValue() {\n return JsonUnifier._getLogichValue;\n }\n private static _getConditionalStep: (originalStep: PixiVNJsonLabelStep) => PixiVNJsonLabelStep = () => {\n logger.error(\n \"An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue.\",\n );\n throw new PixiError(\n \"invalid_usage\",\n \"An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue.\",\n );\n };\n static get getConditionalStep() {\n return JsonUnifier._getConditionalStep;\n }\n}\n"]}
|
package/dist/core.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { StorageElementType, CanvasBaseInterface, ImageSprite, ShakeEffectProps, ShowWithDissolveTransitionProps, ShowWithFadeTransitionProps, MoveInOutProps, ZoomInOutProps, PushInOutProps, ImageContainerOptions, ImageSpriteOptions, TextOptions, ImageSpriteMemory, VideoSpriteMemory, ImageContainerMemory, TextMemory, ContainerOptions, ContainerMemory,
|
|
1
|
+
import { StorageElementType, CanvasBaseInterface, ImageSprite, ShakeEffectProps, ShowWithDissolveTransitionProps, ShowWithFadeTransitionProps, MoveInOutProps, ZoomInOutProps, PushInOutProps, ImageContainerOptions, ImageSpriteOptions, TextOptions, ImageSpriteMemory, VideoSpriteMemory, ImageContainerMemory, TextMemory, ContainerOptions, ContainerMemory, SoundPlayOptionsWithChannel, IMediaInstance, LabelRunModeType, StorageObjectType, StepLabelPropsType, ContainerChild } from '@drincs/pixi-vn';
|
|
2
2
|
import { KeyframesType, AnimationOptions, ObjectSegment, ObjectSegmentWithTransition, SequenceOptions } from '@drincs/pixi-vn/motion';
|
|
3
3
|
import { UPDATE_PRIORITY } from 'pixi.js';
|
|
4
4
|
|
|
@@ -351,7 +351,7 @@ type PixiVNJsonTextEdit = {
|
|
|
351
351
|
alias: string;
|
|
352
352
|
props?: Partial<TextMemory>;
|
|
353
353
|
};
|
|
354
|
-
type PixiVNJsonUnknownEdit<T extends ContainerOptions
|
|
354
|
+
type PixiVNJsonUnknownEdit<T extends ContainerOptions<any>> = {
|
|
355
355
|
type: "canvaselement";
|
|
356
356
|
operationType: "edit";
|
|
357
357
|
alias: string;
|
|
@@ -393,7 +393,8 @@ type PixiVNJsonSoundPlay = {
|
|
|
393
393
|
type: "sound";
|
|
394
394
|
operationType: "play";
|
|
395
395
|
alias: string;
|
|
396
|
-
|
|
396
|
+
url?: string;
|
|
397
|
+
props?: SoundPlayOptionsWithChannel;
|
|
397
398
|
};
|
|
398
399
|
type PixiVNJsonSoundRemove = {
|
|
399
400
|
type: "sound";
|
|
@@ -401,17 +402,17 @@ type PixiVNJsonSoundRemove = {
|
|
|
401
402
|
alias: string;
|
|
402
403
|
};
|
|
403
404
|
type PixiVNJsonSoundPauseResume = {
|
|
404
|
-
type: "sound";
|
|
405
|
+
type: "sound" | "channel" | "all";
|
|
405
406
|
operationType: "pause" | "resume";
|
|
406
407
|
alias: string;
|
|
407
408
|
};
|
|
408
|
-
type
|
|
409
|
+
type PixiVNJsonSoundEdit = {
|
|
409
410
|
type: "sound";
|
|
410
|
-
operationType: "
|
|
411
|
+
operationType: "edit";
|
|
411
412
|
alias: string;
|
|
412
|
-
|
|
413
|
+
props: Partial<Pick<IMediaInstance, "speed" | "volume" | "muted" | "loop" | "paused">>;
|
|
413
414
|
};
|
|
414
|
-
type PixiVNJsonSound = PixiVNJsonSoundPlay | PixiVNJsonSoundRemove | PixiVNJsonSoundPauseResume |
|
|
415
|
+
type PixiVNJsonSound = PixiVNJsonSoundPlay | PixiVNJsonSoundRemove | PixiVNJsonSoundPauseResume | PixiVNJsonSoundEdit;
|
|
415
416
|
|
|
416
417
|
type PixiVNJsonOperationString = {
|
|
417
418
|
type: "operationtoconvert";
|
package/dist/core.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { StorageElementType, CanvasBaseInterface, ImageSprite, ShakeEffectProps, ShowWithDissolveTransitionProps, ShowWithFadeTransitionProps, MoveInOutProps, ZoomInOutProps, PushInOutProps, ImageContainerOptions, ImageSpriteOptions, TextOptions, ImageSpriteMemory, VideoSpriteMemory, ImageContainerMemory, TextMemory, ContainerOptions, ContainerMemory,
|
|
1
|
+
import { StorageElementType, CanvasBaseInterface, ImageSprite, ShakeEffectProps, ShowWithDissolveTransitionProps, ShowWithFadeTransitionProps, MoveInOutProps, ZoomInOutProps, PushInOutProps, ImageContainerOptions, ImageSpriteOptions, TextOptions, ImageSpriteMemory, VideoSpriteMemory, ImageContainerMemory, TextMemory, ContainerOptions, ContainerMemory, SoundPlayOptionsWithChannel, IMediaInstance, LabelRunModeType, StorageObjectType, StepLabelPropsType, ContainerChild } from '@drincs/pixi-vn';
|
|
2
2
|
import { KeyframesType, AnimationOptions, ObjectSegment, ObjectSegmentWithTransition, SequenceOptions } from '@drincs/pixi-vn/motion';
|
|
3
3
|
import { UPDATE_PRIORITY } from 'pixi.js';
|
|
4
4
|
|
|
@@ -351,7 +351,7 @@ type PixiVNJsonTextEdit = {
|
|
|
351
351
|
alias: string;
|
|
352
352
|
props?: Partial<TextMemory>;
|
|
353
353
|
};
|
|
354
|
-
type PixiVNJsonUnknownEdit<T extends ContainerOptions
|
|
354
|
+
type PixiVNJsonUnknownEdit<T extends ContainerOptions<any>> = {
|
|
355
355
|
type: "canvaselement";
|
|
356
356
|
operationType: "edit";
|
|
357
357
|
alias: string;
|
|
@@ -393,7 +393,8 @@ type PixiVNJsonSoundPlay = {
|
|
|
393
393
|
type: "sound";
|
|
394
394
|
operationType: "play";
|
|
395
395
|
alias: string;
|
|
396
|
-
|
|
396
|
+
url?: string;
|
|
397
|
+
props?: SoundPlayOptionsWithChannel;
|
|
397
398
|
};
|
|
398
399
|
type PixiVNJsonSoundRemove = {
|
|
399
400
|
type: "sound";
|
|
@@ -401,17 +402,17 @@ type PixiVNJsonSoundRemove = {
|
|
|
401
402
|
alias: string;
|
|
402
403
|
};
|
|
403
404
|
type PixiVNJsonSoundPauseResume = {
|
|
404
|
-
type: "sound";
|
|
405
|
+
type: "sound" | "channel" | "all";
|
|
405
406
|
operationType: "pause" | "resume";
|
|
406
407
|
alias: string;
|
|
407
408
|
};
|
|
408
|
-
type
|
|
409
|
+
type PixiVNJsonSoundEdit = {
|
|
409
410
|
type: "sound";
|
|
410
|
-
operationType: "
|
|
411
|
+
operationType: "edit";
|
|
411
412
|
alias: string;
|
|
412
|
-
|
|
413
|
+
props: Partial<Pick<IMediaInstance, "speed" | "volume" | "muted" | "loop" | "paused">>;
|
|
413
414
|
};
|
|
414
|
-
type PixiVNJsonSound = PixiVNJsonSoundPlay | PixiVNJsonSoundRemove | PixiVNJsonSoundPauseResume |
|
|
415
|
+
type PixiVNJsonSound = PixiVNJsonSoundPlay | PixiVNJsonSoundRemove | PixiVNJsonSoundPauseResume | PixiVNJsonSoundEdit;
|
|
415
416
|
|
|
416
417
|
type PixiVNJsonOperationString = {
|
|
417
418
|
type: "operationtoconvert";
|
package/dist/core.mjs
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
import {PixiError}from'@drincs/pixi-vn';var d=Object.defineProperty;var P=(s,i,p)=>i in s?d(s,i,{enumerable:true,configurable:true,writable:true,value:p}):s[i]=p;var o=(s,i,p)=>P(s,typeof i!="symbol"?i+"":i,p);var t;(c=>(c.log=(n,...r)=>console.log(`[Pixi\u2019VN Json] ${n}`,...r),c.warn=(n,...r)=>console.warn(`[Pixi\u2019VN Json] ${n}`,...r),c.error=(n,...r)=>console.error(`[Pixi\u2019VN Json] ${n}`,...r),c.info=(n,...r)=>console.info(`[Pixi\u2019VN Json] ${n}`,...r)))(t||(t={}));var e=class e{static init(i){i.loadAssets&&(e._loadAssets=i.loadAssets),i.soundOperation&&(e._soundOperation=i.soundOperation),i.imageOperation&&(e._imageOperation=i.imageOperation),i.videoOperation&&(e._videoOperation=i.videoOperation),i.imageContainerOperation&&(e._imageContainerOperation=i.imageContainerOperation),i.textOperation&&(e._textOperation=i.textOperation),i.canvasElementOperation&&(e._canvasElementOperation=i.canvasElementOperation),i.setStorageValue&&(e._setStorageValue=i.setStorageValue),i.setInitialStorageValue&&(e._setInitialStorageValue=i.setInitialStorageValue),i.narrationOperation&&(e._narrationOperation=i.narrationOperation),i.effectOperation&&(e._effectOperation=i.effectOperation),i.animateOperation&&(e._animateOperation=i.animateOperation),i.getLogichValue&&(e._getLogichValue=i.getLogichValue),i.getConditionalStep&&(e._getConditionalStep=i.getConditionalStep);}static get loadAssets(){return e._loadAssets}static get soundOperation(){return e._soundOperation}static get imageOperation(){return e._imageOperation}static get videoOperation(){return e._videoOperation}static get textOperation(){return e._textOperation}static get imageContainerOperation(){return e._imageContainerOperation}static get canvasElementOperation(){return e._canvasElementOperation}static get setStorageValue(){return e._setStorageValue}static get setInitialStorageValue(){return e._setInitialStorageValue}static get narrationOperation(){return e._narrationOperation}static get effectOperation(){return e._effectOperation}static get animateOperation(){return e._animateOperation}static get getLogichValue(){return e._getLogichValue}static get getConditionalStep(){return e._getConditionalStep}};o(e,"_loadAssets",()=>{}),o(e,"_soundOperation",()=>{throw t.error("An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue."),new PixiError("invalid_usage","An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue.")}),o(e,"_imageOperation",()=>{throw t.error("An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue."),new PixiError("invalid_usage","An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue.")}),o(e,"_videoOperation",()=>{throw t.error("An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue."),new PixiError("invalid_usage","An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue.")}),o(e,"_imageContainerOperation",()=>{throw t.error("An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue."),new PixiError("invalid_usage","An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue.")}),o(e,"_textOperation",()=>{throw t.error("An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue."),new PixiError("invalid_usage","An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue.")}),o(e,"_canvasElementOperation",()=>{throw t.error("An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue."),new PixiError("invalid_usage","An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue.")}),o(e,"_setStorageValue",()=>{throw t.error("An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue."),new PixiError("invalid_usage","An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue.")}),o(e,"_setInitialStorageValue",()=>{throw t.error("An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue."),new PixiError("invalid_usage","An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue.")}),o(e,"_narrationOperation",()=>{throw t.error("An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue."),new PixiError("invalid_usage","An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue.")}),o(e,"_effectOperation",()=>{throw t.error("An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue."),new PixiError("invalid_usage","An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue.")}),o(e,"_animateOperation",()=>{throw t.error("An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue."),new PixiError("invalid_usage","An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue.")}),o(e,"_getLogichValue",()=>{throw t.error("An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue."),new PixiError("invalid_usage","An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue.")}),o(e,"_getConditionalStep",()=>{throw t.error("An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue."),new PixiError("invalid_usage","An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue.")});var x=e;export{x as JsonUnifier}
|
|
1
|
+
import {PixiError}from'@drincs/pixi-vn';var d=Object.defineProperty;var P=(s,i,p)=>i in s?d(s,i,{enumerable:true,configurable:true,writable:true,value:p}):s[i]=p;var o=(s,i,p)=>P(s,typeof i!="symbol"?i+"":i,p);var t;(c=>(c.log=(n,...r)=>console.log(`[Pixi\u2019VN Json] ${n}`,...r),c.warn=(n,...r)=>console.warn(`[Pixi\u2019VN Json] ${n}`,...r),c.error=(n,...r)=>console.error(`[Pixi\u2019VN Json] ${n}`,...r),c.info=(n,...r)=>console.info(`[Pixi\u2019VN Json] ${n}`,...r)))(t||(t={}));var e=class e{static init(i){i.loadAssets&&(e._loadAssets=i.loadAssets),i.soundOperation&&(e._soundOperation=i.soundOperation),i.imageOperation&&(e._imageOperation=i.imageOperation),i.videoOperation&&(e._videoOperation=i.videoOperation),i.imageContainerOperation&&(e._imageContainerOperation=i.imageContainerOperation),i.textOperation&&(e._textOperation=i.textOperation),i.canvasElementOperation&&(e._canvasElementOperation=i.canvasElementOperation),i.setStorageValue&&(e._setStorageValue=i.setStorageValue),i.setInitialStorageValue&&(e._setInitialStorageValue=i.setInitialStorageValue),i.narrationOperation&&(e._narrationOperation=i.narrationOperation),i.effectOperation&&(e._effectOperation=i.effectOperation),i.animateOperation&&(e._animateOperation=i.animateOperation),i.getLogichValue&&(e._getLogichValue=i.getLogichValue),i.getConditionalStep&&(e._getConditionalStep=i.getConditionalStep);}static get loadAssets(){return e._loadAssets}static get soundOperation(){return e._soundOperation}static get imageOperation(){return e._imageOperation}static get videoOperation(){return e._videoOperation}static get textOperation(){return e._textOperation}static get imageContainerOperation(){return e._imageContainerOperation}static get canvasElementOperation(){return e._canvasElementOperation}static get setStorageValue(){return e._setStorageValue}static get setInitialStorageValue(){return e._setInitialStorageValue}static get narrationOperation(){return e._narrationOperation}static get effectOperation(){return e._effectOperation}static get animateOperation(){return e._animateOperation}static get getLogichValue(){return e._getLogichValue}static get getConditionalStep(){return e._getConditionalStep}};o(e,"_loadAssets",()=>{}),o(e,"_soundOperation",()=>{throw t.error("An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue."),new PixiError("invalid_usage","An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue.")}),o(e,"_imageOperation",()=>{throw t.error("An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue."),new PixiError("invalid_usage","An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue.")}),o(e,"_videoOperation",()=>{throw t.error("An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue."),new PixiError("invalid_usage","An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue.")}),o(e,"_imageContainerOperation",()=>{throw t.error("An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue."),new PixiError("invalid_usage","An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue.")}),o(e,"_textOperation",()=>{throw t.error("An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue."),new PixiError("invalid_usage","An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue.")}),o(e,"_canvasElementOperation",()=>{throw t.error("An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue."),new PixiError("invalid_usage","An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue.")}),o(e,"_setStorageValue",()=>{throw t.error("An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue."),new PixiError("invalid_usage","An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue.")}),o(e,"_setInitialStorageValue",()=>{throw t.error("An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue."),new PixiError("invalid_usage","An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue.")}),o(e,"_narrationOperation",()=>{throw t.error("An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue."),new PixiError("invalid_usage","An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue.")}),o(e,"_effectOperation",()=>{throw t.error("An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue."),new PixiError("invalid_usage","An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue.")}),o(e,"_animateOperation",()=>{throw t.error("An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue."),new PixiError("invalid_usage","An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue.")}),o(e,"_getLogichValue",()=>{throw t.error("An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue."),new PixiError("invalid_usage","An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue.")}),o(e,"_getConditionalStep",()=>{throw t.error("An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue."),new PixiError("invalid_usage","An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue.")});var x=e;export{x as JsonUnifier};//# sourceMappingURL=core.mjs.map
|
|
2
|
+
//# sourceMappingURL=core.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/utils/log-utility.ts","../src/core/JsonUnifier.ts"],"names":["logger","message","optionalParams","_JsonUnifier","options","__publicField","PixiError","JsonUnifier"],"mappings":"kNAAO,IAAUA,CAAAA,CAAAA,CAAAA,CAAAA,GACAA,EAAA,GAAA,CAAM,CAACC,CAAAA,CAAAA,GAAkBC,CAAAA,GAClC,OAAA,CAAQ,GAAA,CAAI,uBAAkBD,CAAO,CAAA,CAAA,CAAI,GAAGC,CAAc,CAAA,CACjDF,CAAAA,CAAA,IAAA,CAAO,CAACC,CAAAA,CAAAA,GAAkBC,CAAAA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CAyJF,kBAAA,CAAwD,IAAM,CACzE,MAAAH,CAAAA,CAAO,KAAA,CACH,2GACJ,CAAA,CACM,IAAIM,UACN,eAAA,CACA,2GACJ,CACJ,CAAA,CAAA,CAIAD,CAAAA,CArKiBF,CAAAA,CAqKF,yBAAA,CAAqE,IAAM,CACtF,MAAAH,CAAAA,CAAO,KAAA,CACH,2GACJ,CAAA,CACM,IAAIM,SAAAA,CACN,eAAA,CACA,2GACJ,CACJ,CAAA,CAAA,CAIAD,CAAAA,CAjLiBF,CAAAA,CAiLF,qBAAA,CAAgE,IAAM,CACjF,MAAAH,CAAAA,CAAO,KAAA,CACH,2GACJ,EACM,IAAIM,SAAAA,CACN,eAAA,CACA,2GACJ,CACJ,CAAA,CAAA,CAIAD,CAAAA,CA7LiBF,CAAAA,CA6LF,kBAAA,CAAyE,IAAM,CAC1F,MAAAH,CAAAA,CAAO,KAAA,CACH,2GACJ,CAAA,CACM,IAAIM,SAAAA,CACN,eAAA,CACA,2GACJ,CACJ,GAIAD,CAAAA,CAzMiBF,CAAAA,CAyMF,mBAAA,CAAkE,IAAM,CACnF,MAAAH,EAAO,KAAA,CACH,2GACJ,CAAA,CACM,IAAIM,SAAAA,CACN,eAAA,CACA,2GACJ,CACJ,CAAA,CAAA,CAIAD,CAAAA,CArNiBF,CAAAA,CAqNF,iBAAA,CASM,IAAM,CACvB,MAAAH,CAAAA,CAAO,KAAA,CACH,2GACJ,CAAA,CACM,IAAIM,SAAAA,CACN,eAAA,CACA,2GACJ,CACJ,CAAA,CAAA,CAIAD,CAAAA,CA1OiBF,CAAAA,CA0OF,qBAAA,CAAkF,IAAM,CACnG,MAAAH,CAAAA,CAAO,KAAA,CACH,2GACJ,CAAA,CACM,IAAIM,SAAAA,CACN,eAAA,CACA,2GACJ,CACJ,CAAA,CAAA,CAlPJ,IAAqBC,CAAAA,CAArBJ","file":"core.mjs","sourcesContent":["export namespace logger {\n export const log = (message?: any, ...optionalParams: any[]) =>\n console.log(`[Pixi’VN Json] ${message}`, ...optionalParams);\n export const warn = (message?: any, ...optionalParams: any[]) =>\n console.warn(`[Pixi’VN Json] ${message}`, ...optionalParams);\n export const error = (message?: any, ...optionalParams: any[]) =>\n console.error(`[Pixi’VN Json] ${message}`, ...optionalParams);\n export const info = (message?: any, ...optionalParams: any[]) =>\n console.info(`[Pixi’VN Json] ${message}`, ...optionalParams);\n}\n","import {\n PixiError,\n type ContainerChild,\n type ContainerMemory,\n type ImageSpriteMemory,\n type StorageElementType,\n type VideoSpriteMemory,\n} from \"@drincs/pixi-vn\";\nimport {\n PixiVNJsonArithmeticOperations,\n PixiVNJsonCanvasAnimate,\n PixiVNJsonCanvasEffect,\n PixiVNJsonConditionalStatements,\n PixiVNJsonConditions,\n PixiVNJsonIfElse,\n PixiVNJsonLabelStep,\n PixiVNJsonNarration,\n PixiVNJsonOperation,\n PixiVNJsonOperationString,\n PixiVNJsonSound,\n PixiVNJsonValueGet,\n PixiVNJsonValueSet,\n} from \"../interface\";\nimport {\n PixiVNJsonCanvasImageContainerShow,\n PixiVNJsonCanvasImageVideoShow,\n PixiVNJsonCanvasRemove,\n PixiVNJsonCanvasTextShow,\n PixiVNJsonImageContainerEdit,\n PixiVNJsonImageEdit,\n PixiVNJsonTextEdit,\n PixiVNJsonUnknownEdit,\n PixiVNJsonVideoEdit,\n PixiVNJsonVideoPauseResume,\n} from \"../interface/PixiVNJsonCanvas\";\nimport { PixiVNJsonOnlyStorageSet } from \"../interface/PixiVNJsonValue\";\nimport { logger } from \"../utils/log-utility\";\n\nexport default class JsonUnifier {\n static init(options: {\n loadAssets?: (\n origin: PixiVNJsonOperation | PixiVNJsonIfElse<PixiVNJsonOperation> | PixiVNJsonOperationString,\n ) => Promise<void> | void;\n soundOperation?: (operation: PixiVNJsonSound) => void;\n imageOperation?: (\n operation: PixiVNJsonCanvasImageVideoShow | PixiVNJsonImageEdit | PixiVNJsonCanvasRemove,\n ) => Promise<void>;\n videoOperation?: (\n operation:\n | PixiVNJsonCanvasImageVideoShow\n | PixiVNJsonCanvasRemove\n | PixiVNJsonVideoEdit\n | PixiVNJsonVideoPauseResume,\n ) => Promise<void>;\n imageContainerOperation?: (\n operation: PixiVNJsonCanvasRemove | PixiVNJsonCanvasImageContainerShow | PixiVNJsonImageContainerEdit,\n ) => Promise<void>;\n textOperation?: (\n operation: PixiVNJsonCanvasRemove | PixiVNJsonCanvasTextShow | PixiVNJsonTextEdit,\n ) => Promise<void>;\n canvasElementOperation?: (\n operation:\n | PixiVNJsonCanvasRemove\n | PixiVNJsonUnknownEdit<ImageSpriteMemory | VideoSpriteMemory | ContainerMemory<ContainerChild>>,\n ) => Promise<void>;\n setStorageValue?: (value: PixiVNJsonValueSet) => void;\n setInitialStorageValue: (value: PixiVNJsonOnlyStorageSet) => void;\n narrationOperation?: (operation: PixiVNJsonNarration) => void;\n effectOperation?: (operation: PixiVNJsonCanvasEffect) => Promise<void>;\n animateOperation?: (operation: PixiVNJsonCanvasAnimate) => void;\n getLogichValue?: <T = StorageElementType>(\n value:\n | T\n | PixiVNJsonValueGet\n | PixiVNJsonArithmeticOperations\n | PixiVNJsonConditions\n | PixiVNJsonConditionalStatements<\n T | PixiVNJsonValueGet | PixiVNJsonArithmeticOperations | PixiVNJsonConditions\n >,\n ) => T | undefined;\n getConditionalStep?: (originalStep: PixiVNJsonLabelStep) => PixiVNJsonLabelStep;\n }) {\n if (options.loadAssets) JsonUnifier._loadAssets = options.loadAssets;\n if (options.soundOperation) JsonUnifier._soundOperation = options.soundOperation;\n if (options.imageOperation) JsonUnifier._imageOperation = options.imageOperation;\n if (options.videoOperation) JsonUnifier._videoOperation = options.videoOperation;\n if (options.imageContainerOperation) JsonUnifier._imageContainerOperation = options.imageContainerOperation;\n if (options.textOperation) JsonUnifier._textOperation = options.textOperation;\n if (options.canvasElementOperation) JsonUnifier._canvasElementOperation = options.canvasElementOperation;\n if (options.setStorageValue) JsonUnifier._setStorageValue = options.setStorageValue;\n if (options.setInitialStorageValue) JsonUnifier._setInitialStorageValue = options.setInitialStorageValue;\n if (options.narrationOperation) JsonUnifier._narrationOperation = options.narrationOperation;\n if (options.effectOperation) JsonUnifier._effectOperation = options.effectOperation;\n if (options.animateOperation) JsonUnifier._animateOperation = options.animateOperation;\n if (options.getLogichValue) JsonUnifier._getLogichValue = options.getLogichValue;\n if (options.getConditionalStep) JsonUnifier._getConditionalStep = options.getConditionalStep;\n }\n private static _loadAssets: (\n origin: PixiVNJsonOperation | PixiVNJsonIfElse<PixiVNJsonOperation> | PixiVNJsonOperationString,\n ) => Promise<void> | void = () => {};\n static get loadAssets() {\n return JsonUnifier._loadAssets;\n }\n private static _soundOperation: (operation: PixiVNJsonSound) => void = () => {\n logger.error(\n \"An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue.\",\n );\n throw new PixiError(\n \"invalid_usage\",\n \"An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue.\",\n );\n };\n static get soundOperation() {\n return JsonUnifier._soundOperation;\n }\n private static _imageOperation: (\n operation: PixiVNJsonCanvasImageVideoShow | PixiVNJsonImageEdit | PixiVNJsonCanvasRemove,\n ) => Promise<void> = () => {\n logger.error(\n \"An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue.\",\n );\n throw new PixiError(\n \"invalid_usage\",\n \"An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue.\",\n );\n };\n static get imageOperation() {\n return JsonUnifier._imageOperation;\n }\n private static _videoOperation: (\n operation:\n | PixiVNJsonCanvasImageVideoShow\n | PixiVNJsonCanvasRemove\n | PixiVNJsonVideoEdit\n | PixiVNJsonVideoPauseResume,\n ) => Promise<void> = () => {\n logger.error(\n \"An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue.\",\n );\n throw new PixiError(\n \"invalid_usage\",\n \"An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue.\",\n );\n };\n static get videoOperation() {\n return JsonUnifier._videoOperation;\n }\n private static _imageContainerOperation: (\n operation: PixiVNJsonCanvasRemove | PixiVNJsonCanvasImageContainerShow | PixiVNJsonImageContainerEdit,\n ) => Promise<void> = () => {\n logger.error(\n \"An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue.\",\n );\n throw new PixiError(\n \"invalid_usage\",\n \"An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue.\",\n );\n };\n static get textOperation() {\n return JsonUnifier._textOperation;\n }\n private static _textOperation: (\n operation: PixiVNJsonCanvasRemove | PixiVNJsonCanvasTextShow | PixiVNJsonTextEdit,\n ) => Promise<void> = () => {\n logger.error(\n \"An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue.\",\n );\n throw new PixiError(\n \"invalid_usage\",\n \"An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue.\",\n );\n };\n static get imageContainerOperation() {\n return JsonUnifier._imageContainerOperation;\n }\n private static _canvasElementOperation: (\n operation:\n | PixiVNJsonCanvasRemove\n | PixiVNJsonUnknownEdit<ImageSpriteMemory | VideoSpriteMemory | ContainerMemory<ContainerChild>>,\n ) => Promise<void> = () => {\n logger.error(\n \"An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue.\",\n );\n throw new PixiError(\n \"invalid_usage\",\n \"An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue.\",\n );\n };\n static get canvasElementOperation() {\n return JsonUnifier._canvasElementOperation;\n }\n private static _setStorageValue: (value: PixiVNJsonValueSet) => void = () => {\n logger.error(\n \"An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue.\",\n );\n throw new PixiError(\n \"invalid_usage\",\n \"An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue.\",\n );\n };\n static get setStorageValue() {\n return JsonUnifier._setStorageValue;\n }\n private static _setInitialStorageValue: (value: PixiVNJsonOnlyStorageSet) => void = () => {\n logger.error(\n \"An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue.\",\n );\n throw new PixiError(\n \"invalid_usage\",\n \"An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue.\",\n );\n };\n static get setInitialStorageValue() {\n return JsonUnifier._setInitialStorageValue;\n }\n private static _narrationOperation: (operation: PixiVNJsonNarration) => void = () => {\n logger.error(\n \"An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue.\",\n );\n throw new PixiError(\n \"invalid_usage\",\n \"An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue.\",\n );\n };\n static get narrationOperation() {\n return JsonUnifier._narrationOperation;\n }\n private static _effectOperation: (operation: PixiVNJsonCanvasEffect) => Promise<void> = () => {\n logger.error(\n \"An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue.\",\n );\n throw new PixiError(\n \"invalid_usage\",\n \"An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue.\",\n );\n };\n static get effectOperation() {\n return JsonUnifier._effectOperation;\n }\n private static _animateOperation: (operation: PixiVNJsonCanvasAnimate) => void = () => {\n logger.error(\n \"An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue.\",\n );\n throw new PixiError(\n \"invalid_usage\",\n \"An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue.\",\n );\n };\n static get animateOperation() {\n return JsonUnifier._animateOperation;\n }\n private static _getLogichValue: <T = StorageElementType>(\n value:\n | T\n | PixiVNJsonValueGet\n | PixiVNJsonArithmeticOperations\n | PixiVNJsonConditions\n | PixiVNJsonConditionalStatements<\n T | PixiVNJsonValueGet | PixiVNJsonArithmeticOperations | PixiVNJsonConditions\n >,\n ) => T | undefined = () => {\n logger.error(\n \"An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue.\",\n );\n throw new PixiError(\n \"invalid_usage\",\n \"An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue.\",\n );\n };\n static get getLogichValue() {\n return JsonUnifier._getLogichValue;\n }\n private static _getConditionalStep: (originalStep: PixiVNJsonLabelStep) => PixiVNJsonLabelStep = () => {\n logger.error(\n \"An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue.\",\n );\n throw new PixiError(\n \"invalid_usage\",\n \"An error occurred! pixi-vn-json was not initialized. Please contact the Pixi'VN team to report the issue.\",\n );\n };\n static get getConditionalStep() {\n return JsonUnifier._getConditionalStep;\n }\n}\n"]}
|
package/dist/importer.cjs
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
'use strict';var narration=require('@drincs/pixi-vn/narration'),core=require('@drincs/pixi-vn-json/core'),pixiVn=require('@drincs/pixi-vn'),translator=require('@drincs/pixi-vn-json/translator'),storage=require('@drincs/pixi-vn/storage');var K=Object.create;var E=Object.defineProperty;var Q=Object.getOwnPropertyDescriptor;var Y=Object.getOwnPropertyNames;var Z=Object.getPrototypeOf,ee=Object.prototype.hasOwnProperty;var te=(a,i,t)=>i in a?E(a,i,{enumerable:true,configurable:true,writable:true,value:t}):a[i]=t;var H=(a=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(a,{get:(i,t)=>(typeof require<"u"?require:i)[t]}):a)(function(a){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+a+'" is not supported')});var R=(a,i)=>()=>(i||a((i={exports:{}}).exports,i),i.exports);var ie=(a,i,t,o)=>{if(i&&typeof i=="object"||typeof i=="function")for(let n of Y(i))!ee.call(a,n)&&n!==t&&E(a,n,{get:()=>i[n],enumerable:!(o=Q(i,n))||o.enumerable});return a};var ne=(a,i,t)=>(t=a!=null?K(Z(a)):{},ie(E(t,"default",{value:a,enumerable:true}),a));var T=(a,i,t)=>te(a,typeof i!="symbol"?i+"":i,t);var q=R((A,U)=>{(function(a,i){typeof A=="object"?U.exports=A=i():typeof define=="function"&&define.amd?define([],i):a.CryptoJS=i();})(A,function(){var a=a||(function(i,t){var o;if(typeof window<"u"&&window.crypto&&(o=window.crypto),typeof self<"u"&&self.crypto&&(o=self.crypto),typeof globalThis<"u"&&globalThis.crypto&&(o=globalThis.crypto),!o&&typeof window<"u"&&window.msCrypto&&(o=window.msCrypto),!o&&typeof global<"u"&&global.crypto&&(o=global.crypto),!o&&typeof H=="function")try{o=H("crypto");}catch{}var n=function(){if(o){if(typeof o.getRandomValues=="function")try{return o.getRandomValues(new Uint32Array(1))[0]}catch{}if(typeof o.randomBytes=="function")try{return o.randomBytes(4).readInt32LE()}catch{}}throw new Error("Native crypto module could not be used to get secure random number.")},s=Object.create||(function(){function e(){}return function(r){var c;return e.prototype=r,c=new e,e.prototype=null,c}})(),l={},u=l.lib={},g=u.Base=(function(){return {extend:function(e){var r=s(this);return e&&r.mixIn(e),(!r.hasOwnProperty("init")||this.init===r.init)&&(r.init=function(){r.$super.init.apply(this,arguments);}),r.init.prototype=r,r.$super=this,r},create:function(){var e=this.extend();return e.init.apply(e,arguments),e},init:function(){},mixIn:function(e){for(var r in e)e.hasOwnProperty(r)&&(this[r]=e[r]);e.hasOwnProperty("toString")&&(this.toString=e.toString);},clone:function(){return this.init.prototype.extend(this)}}})(),x=u.WordArray=g.extend({init:function(e,r){e=this.words=e||[],r!=t?this.sigBytes=r:this.sigBytes=e.length*4;},toString:function(e){return (e||V).stringify(this)},concat:function(e){var r=this.words,c=e.words,f=this.sigBytes,v=e.sigBytes;if(this.clamp(),f%4)for(var P=0;P<v;P++){var k=c[P>>>2]>>>24-P%4*8&255;r[f+P>>>2]|=k<<24-(f+P)%4*8;}else for(var L=0;L<v;L+=4)r[f+L>>>2]=c[L>>>2];return this.sigBytes+=v,this},clamp:function(){var e=this.words,r=this.sigBytes;e[r>>>2]&=4294967295<<32-r%4*8,e.length=i.ceil(r/4);},clone:function(){var e=g.clone.call(this);return e.words=this.words.slice(0),e},random:function(e){for(var r=[],c=0;c<e;c+=4)r.push(n());return new x.init(r,e)}}),p=l.enc={},V=p.Hex={stringify:function(e){for(var r=e.words,c=e.sigBytes,f=[],v=0;v<c;v++){var P=r[v>>>2]>>>24-v%4*8&255;f.push((P>>>4).toString(16)),f.push((P&15).toString(16));}return f.join("")},parse:function(e){for(var r=e.length,c=[],f=0;f<r;f+=2)c[f>>>3]|=parseInt(e.substr(f,2),16)<<24-f%8*4;return new x.init(c,r/2)}},b=p.Latin1={stringify:function(e){for(var r=e.words,c=e.sigBytes,f=[],v=0;v<c;v++){var P=r[v>>>2]>>>24-v%4*8&255;f.push(String.fromCharCode(P));}return f.join("")},parse:function(e){for(var r=e.length,c=[],f=0;f<r;f++)c[f>>>2]|=(e.charCodeAt(f)&255)<<24-f%4*8;return new x.init(c,r)}},N=p.Utf8={stringify:function(e){try{return decodeURIComponent(escape(b.stringify(e)))}catch{throw new Error("Malformed UTF-8 data")}},parse:function(e){return b.parse(unescape(encodeURIComponent(e)))}},h=u.BufferedBlockAlgorithm=g.extend({reset:function(){this._data=new x.init,this._nDataBytes=0;},_append:function(e){typeof e=="string"&&(e=N.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes;},_process:function(e){var r,c=this._data,f=c.words,v=c.sigBytes,P=this.blockSize,k=P*4,L=v/k;e?L=i.ceil(L):L=i.max((L|0)-this._minBufferSize,0);var C=L*P,j=i.min(C*4,v);if(C){for(var D=0;D<C;D+=P)this._doProcessBlock(f,D);r=f.splice(0,C),c.sigBytes-=j;}return new x.init(r,j)},clone:function(){var e=g.clone.call(this);return e._data=this._data.clone(),e},_minBufferSize:0});u.Hasher=h.extend({cfg:g.extend(),init:function(e){this.cfg=this.cfg.extend(e),this.reset();},reset:function(){h.reset.call(this),this._doReset();},update:function(e){return this._append(e),this._process(),this},finalize:function(e){e&&this._append(e);var r=this._doFinalize();return r},blockSize:512/32,_createHelper:function(e){return function(r,c){return new e.init(c).finalize(r)}},_createHmacHelper:function(e){return function(r,c){return new y.HMAC.init(e,c).finalize(r)}}});var y=l.algo={};return l})(Math);return a});});var M=R((B,F)=>{(function(a,i){typeof B=="object"?F.exports=B=i(q()):typeof define=="function"&&define.amd?define(["./core"],i):i(a.CryptoJS);})(B,function(a){return (function(){var i=a,t=i.lib,o=t.WordArray,n=t.Hasher,s=i.algo,l=[],u=s.SHA1=n.extend({_doReset:function(){this._hash=new o.init([1732584193,4023233417,2562383102,271733878,3285377520]);},_doProcessBlock:function(g,x){for(var p=this._hash.words,V=p[0],b=p[1],N=p[2],h=p[3],d=p[4],y=0;y<80;y++){if(y<16)l[y]=g[x+y]|0;else {var e=l[y-3]^l[y-8]^l[y-14]^l[y-16];l[y]=e<<1|e>>>31;}var r=(V<<5|V>>>27)+d+l[y];y<20?r+=(b&N|~b&h)+1518500249:y<40?r+=(b^N^h)+1859775393:y<60?r+=(b&N|b&h|N&h)-1894007588:r+=(b^N^h)-899497514,d=h,h=N,N=b<<30|b>>>2,b=V,V=r;}p[0]=p[0]+V|0,p[1]=p[1]+b|0,p[2]=p[2]+N|0,p[3]=p[3]+h|0,p[4]=p[4]+d|0;},_doFinalize:function(){var g=this._data,x=g.words,p=this._nDataBytes*8,V=g.sigBytes*8;return x[V>>>5]|=128<<24-V%32,x[(V+64>>>9<<4)+14]=Math.floor(p/4294967296),x[(V+64>>>9<<4)+15]=p,g.sigBytes=x.length*4,this._process(),this._hash},clone:function(){var g=n.clone.call(this);return g._hash=this._hash.clone(),g}});i.SHA1=n._createHelper(u),i.HmacSHA1=n._createHmacHelper(u);})(),a.SHA1});});var w;(n=>(n.log=(s,...l)=>console.log(`[Pixi\u2019VN Json] ${s}`,...l),n.warn=(s,...l)=>console.warn(`[Pixi\u2019VN Json] ${s}`,...l),n.error=(s,...l)=>console.error(`[Pixi\u2019VN Json] ${s}`,...l),n.info=(s,...l)=>console.info(`[Pixi\u2019VN Json] ${s}`,...l)))(w||(w={}));function z(a){let i="";return a.values.forEach(t=>{if(typeof t=="string")i+=t;else {let o=core.JsonUnifier.getLogichValue(t);i+=`${o}`;}}),i}async function I(a,i){let t=core.JsonUnifier.getLogichValue(a);if(t)switch(t.type){case "sound":core.JsonUnifier.soundOperation(t);break;case "assets":case "bundle":await core.JsonUnifier.loadAssets(t);break;case "image":await core.JsonUnifier.imageOperation(t);break;case "video":await core.JsonUnifier.videoOperation(t);break;case "imagecontainer":await core.JsonUnifier.imageContainerOperation(t);break;case "text":await core.JsonUnifier.textOperation(t);break;case "canvaselement":await core.JsonUnifier.canvasElementOperation(t);break;case "value":core.JsonUnifier.setStorageValue(t);break;case "operationtoconvert":if(i){let o=z(t),n=await i(o);n&&await I(n,i);}break;case "input":case "dialogue":core.JsonUnifier.narrationOperation(t);break;case "shake":await core.JsonUnifier.effectOperation(t);break;case "animate":case "animate-sequence":core.JsonUnifier.animateOperation(t);break}}function W(a){let i=core.JsonUnifier.getLogichValue(a);i&&i.type==="value"&&i.storageOperationType==="set"&&(i.storageType==="storage"||i.storageType==="tempstorage")&&core.JsonUnifier.setInitialStorageValue(i);}async function ae(a,i={}){if(!Array.isArray(a))if(typeof a=="object"||typeof a=="string")a=[a];else {w.error("Error parsing imported Pixi'VN JSON: data is not an object");return}let t=a.map(async s=>{if(typeof s=="string")try{s=JSON.parse(s);}catch(l){w.error("Error parsing imported Pixi'VN JSON",l),s={};}return s}),n=(await Promise.all(t)).map(async s=>{let l=[];if(s.initialOperations)for(let u of s.initialOperations)W(u);if(s.labels){let u=s.labels;for(let g in u)try{let x=u[g],p=new _(g,x,void 0,i);narration.RegisteredLabels.add(p);}catch(x){w.error(`Error creating JSON label ${g}`,x);}}return Promise.all(l)});await Promise.all(n);}var X=ne(M());var $="___param___";var _=class extends narration.LabelAbstract{constructor(t,o,n,s={}){n||(n={}),n.onLoadingLabel=async()=>{for(let l of o){let u;if(typeof l=="function"?u=l():u=l,u=core.JsonUnifier.getConditionalStep(u),u.operations)try{let g=u.operations.map(x=>core.JsonUnifier.loadAssets(x));await Promise.all(g);}catch(g){w.error("The operation in the onLoadingLabel function of the label has an error:",g);}}};super(t,n);T(this,"_steps");T(this,"operationStringConvert");T(this,"skipEmptyDialogs",false);this._steps=o,this.operationStringConvert=s.operationStringConvert,this.skipEmptyDialogs=s.skipEmptyDialogs||false;}get steps(){return this._steps.map(t=>this.stepConverter(t))}get stepCount(){return this._steps.length}getStepById(t){if(t<0||t>=this._steps.length)return;let o=this._steps[t];return this.stepConverter(o)}getStepSha(t){if(t<0||t>=this.steps.length)return;let o=this._steps[t];return (0, X.default)(o.toString().toLocaleLowerCase()).toString()}getDialogueText(t){let o="";if(Array.isArray(t)){let n=[];t.forEach(s=>{if(typeof s=="string")n.push(s);else if(s&&typeof s=="object"){let l=core.JsonUnifier.getLogichValue(s);l?(l&&!Array.isArray(l)&&typeof l=="object"&&(l=core.JsonUnifier.getLogichValue(l)||""),Array.isArray(l)?n=n.map(u=>`${u}`).concat(l):n.push(`${l}`)):n.push(`${s}`);}else n.push(`${s}`);}),o=n;}else {let n=core.JsonUnifier.getLogichValue(t);n&&!Array.isArray(n)&&typeof n=="object"&&(n=core.JsonUnifier.getLogichValue(n)),n&&Array.isArray(n)?o=n.map(s=>`${s}`):o=`${n}`;}return o}getDialogue(t){if(t==null)return;let o=core.JsonUnifier.getLogichValue(t);return o==null?`${o}`:typeof o=="object"&&"character"in o&&"text"in o?{character:o.character,text:translator.translator.t(this.getDialogueText(o.text))}:translator.translator.t(this.getDialogueText(o))}getChoices(t){return core.JsonUnifier.getLogichValue(t)?.map(s=>core.JsonUnifier.getLogichValue(s)).filter(s=>s!==void 0)}stepConverter(t){return async o=>{let n=typeof t=="function"?t():t;n=pixiVn.createExportableElement(n),n=core.JsonUnifier.getConditionalStep(n);let s=this.operationStringConvert?h=>this.operationStringConvert(h,n,o):void 0,{operations:l=[]}=n;for(let h of l)await I(h,s);let{labelToOpen:u=[]}=n,g=this.getChoices(n.choices),x=core.JsonUnifier.getLogichValue(n.glueEnabled),p=this.getDialogue(n.dialogue),V=[];Array.isArray(u)||(u=[u]),u.forEach(h=>{let d=core.JsonUnifier.getLogichValue(h);d&&V.push(d);});let b=core.JsonUnifier.getLogichValue(n.goNextStep),N=core.JsonUnifier.getLogichValue(n.end);if(g){let h=g.map(d=>{let y="";if(Array.isArray(d.text)){let r=[];d.text.forEach(c=>{if(typeof c=="string")r.push(translator.translator.t(c));else if(c&&typeof c=="object"){let f=core.JsonUnifier.getLogichValue(c);f&&!Array.isArray(f)&&typeof f=="object"&&(f=core.JsonUnifier.getLogichValue(f)||""),f&&(Array.isArray(f)?r=r.concat(translator.translator.t(f)):r.push(translator.translator.t(f)));}}),y=r;}else typeof d.text=="string"&&(y=translator.translator.t(d.text));return {label:d.label,text:y,props:d.props,type:d.type,oneTime:d.oneTime,onlyHaveNoChoice:d.onlyHaveNoChoice,autoSelect:d.autoSelect}});narration.narration.choices=h;}else narration.narration.choices=void 0;p!==void 0&&(narration.narration.dialogue=p,this.skipEmptyDialogs&&typeof p=="string"&&(p===""||RegExp(/^\s+$/).test(p))&&(b=true)),x?narration.narration.dialogGlue=true:x===false&&(narration.narration.dialogGlue=false);for(let h of V){let d=h.label;typeof d=="object"&&(d=core.JsonUnifier.getLogichValue(d)||"");let y=h.params?.map(e=>core.JsonUnifier.getLogichValue(e));o={...o,...h.props},h.type==="jump"?(narration.narration.openedLabels.length>0&&narration.narration.closeCurrentLabel(),storage.storage.setTempVariable(`${$}${narration.narration.openedLabels.length}`,y),await narration.narration.call(d,o)):(storage.storage.setTempVariable(`${$}${narration.narration.openedLabels.length}`,y),await narration.narration.call(d,o));}N==="game_end"?(narration.narration.closeAllLabels(),await narration.narration.continue(o,{runNow:true})):N==="label_end"&&narration.narration.closeCurrentLabel(),b&&await narration.narration.continue(o,{runNow:true});}}};exports.LabelJson=_;exports.importPixiVNJson=ae;
|
|
1
|
+
'use strict';var narration=require('@drincs/pixi-vn/narration'),core=require('@drincs/pixi-vn-json/core'),pixiVn=require('@drincs/pixi-vn'),translator=require('@drincs/pixi-vn-json/translator'),storage=require('@drincs/pixi-vn/storage');var K=Object.create;var E=Object.defineProperty;var Q=Object.getOwnPropertyDescriptor;var Y=Object.getOwnPropertyNames;var Z=Object.getPrototypeOf,ee=Object.prototype.hasOwnProperty;var te=(a,i,t)=>i in a?E(a,i,{enumerable:true,configurable:true,writable:true,value:t}):a[i]=t;var H=(a=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(a,{get:(i,t)=>(typeof require<"u"?require:i)[t]}):a)(function(a){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+a+'" is not supported')});var R=(a,i)=>()=>(i||a((i={exports:{}}).exports,i),i.exports);var ie=(a,i,t,o)=>{if(i&&typeof i=="object"||typeof i=="function")for(let n of Y(i))!ee.call(a,n)&&n!==t&&E(a,n,{get:()=>i[n],enumerable:!(o=Q(i,n))||o.enumerable});return a};var ne=(a,i,t)=>(t=a!=null?K(Z(a)):{},ie(E(t,"default",{value:a,enumerable:true}),a));var T=(a,i,t)=>te(a,typeof i!="symbol"?i+"":i,t);var q=R((A,U)=>{(function(a,i){typeof A=="object"?U.exports=A=i():typeof define=="function"&&define.amd?define([],i):a.CryptoJS=i();})(A,function(){var a=a||(function(i,t){var o;if(typeof window<"u"&&window.crypto&&(o=window.crypto),typeof self<"u"&&self.crypto&&(o=self.crypto),typeof globalThis<"u"&&globalThis.crypto&&(o=globalThis.crypto),!o&&typeof window<"u"&&window.msCrypto&&(o=window.msCrypto),!o&&typeof global<"u"&&global.crypto&&(o=global.crypto),!o&&typeof H=="function")try{o=H("crypto");}catch{}var n=function(){if(o){if(typeof o.getRandomValues=="function")try{return o.getRandomValues(new Uint32Array(1))[0]}catch{}if(typeof o.randomBytes=="function")try{return o.randomBytes(4).readInt32LE()}catch{}}throw new Error("Native crypto module could not be used to get secure random number.")},s=Object.create||(function(){function e(){}return function(r){var c;return e.prototype=r,c=new e,e.prototype=null,c}})(),l={},u=l.lib={},g=u.Base=(function(){return {extend:function(e){var r=s(this);return e&&r.mixIn(e),(!r.hasOwnProperty("init")||this.init===r.init)&&(r.init=function(){r.$super.init.apply(this,arguments);}),r.init.prototype=r,r.$super=this,r},create:function(){var e=this.extend();return e.init.apply(e,arguments),e},init:function(){},mixIn:function(e){for(var r in e)e.hasOwnProperty(r)&&(this[r]=e[r]);e.hasOwnProperty("toString")&&(this.toString=e.toString);},clone:function(){return this.init.prototype.extend(this)}}})(),x=u.WordArray=g.extend({init:function(e,r){e=this.words=e||[],r!=t?this.sigBytes=r:this.sigBytes=e.length*4;},toString:function(e){return (e||V).stringify(this)},concat:function(e){var r=this.words,c=e.words,f=this.sigBytes,v=e.sigBytes;if(this.clamp(),f%4)for(var P=0;P<v;P++){var k=c[P>>>2]>>>24-P%4*8&255;r[f+P>>>2]|=k<<24-(f+P)%4*8;}else for(var L=0;L<v;L+=4)r[f+L>>>2]=c[L>>>2];return this.sigBytes+=v,this},clamp:function(){var e=this.words,r=this.sigBytes;e[r>>>2]&=4294967295<<32-r%4*8,e.length=i.ceil(r/4);},clone:function(){var e=g.clone.call(this);return e.words=this.words.slice(0),e},random:function(e){for(var r=[],c=0;c<e;c+=4)r.push(n());return new x.init(r,e)}}),p=l.enc={},V=p.Hex={stringify:function(e){for(var r=e.words,c=e.sigBytes,f=[],v=0;v<c;v++){var P=r[v>>>2]>>>24-v%4*8&255;f.push((P>>>4).toString(16)),f.push((P&15).toString(16));}return f.join("")},parse:function(e){for(var r=e.length,c=[],f=0;f<r;f+=2)c[f>>>3]|=parseInt(e.substr(f,2),16)<<24-f%8*4;return new x.init(c,r/2)}},b=p.Latin1={stringify:function(e){for(var r=e.words,c=e.sigBytes,f=[],v=0;v<c;v++){var P=r[v>>>2]>>>24-v%4*8&255;f.push(String.fromCharCode(P));}return f.join("")},parse:function(e){for(var r=e.length,c=[],f=0;f<r;f++)c[f>>>2]|=(e.charCodeAt(f)&255)<<24-f%4*8;return new x.init(c,r)}},N=p.Utf8={stringify:function(e){try{return decodeURIComponent(escape(b.stringify(e)))}catch{throw new Error("Malformed UTF-8 data")}},parse:function(e){return b.parse(unescape(encodeURIComponent(e)))}},h=u.BufferedBlockAlgorithm=g.extend({reset:function(){this._data=new x.init,this._nDataBytes=0;},_append:function(e){typeof e=="string"&&(e=N.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes;},_process:function(e){var r,c=this._data,f=c.words,v=c.sigBytes,P=this.blockSize,k=P*4,L=v/k;e?L=i.ceil(L):L=i.max((L|0)-this._minBufferSize,0);var C=L*P,j=i.min(C*4,v);if(C){for(var D=0;D<C;D+=P)this._doProcessBlock(f,D);r=f.splice(0,C),c.sigBytes-=j;}return new x.init(r,j)},clone:function(){var e=g.clone.call(this);return e._data=this._data.clone(),e},_minBufferSize:0});u.Hasher=h.extend({cfg:g.extend(),init:function(e){this.cfg=this.cfg.extend(e),this.reset();},reset:function(){h.reset.call(this),this._doReset();},update:function(e){return this._append(e),this._process(),this},finalize:function(e){e&&this._append(e);var r=this._doFinalize();return r},blockSize:512/32,_createHelper:function(e){return function(r,c){return new e.init(c).finalize(r)}},_createHmacHelper:function(e){return function(r,c){return new y.HMAC.init(e,c).finalize(r)}}});var y=l.algo={};return l})(Math);return a});});var M=R((B,F)=>{(function(a,i){typeof B=="object"?F.exports=B=i(q()):typeof define=="function"&&define.amd?define(["./core"],i):i(a.CryptoJS);})(B,function(a){return (function(){var i=a,t=i.lib,o=t.WordArray,n=t.Hasher,s=i.algo,l=[],u=s.SHA1=n.extend({_doReset:function(){this._hash=new o.init([1732584193,4023233417,2562383102,271733878,3285377520]);},_doProcessBlock:function(g,x){for(var p=this._hash.words,V=p[0],b=p[1],N=p[2],h=p[3],d=p[4],y=0;y<80;y++){if(y<16)l[y]=g[x+y]|0;else {var e=l[y-3]^l[y-8]^l[y-14]^l[y-16];l[y]=e<<1|e>>>31;}var r=(V<<5|V>>>27)+d+l[y];y<20?r+=(b&N|~b&h)+1518500249:y<40?r+=(b^N^h)+1859775393:y<60?r+=(b&N|b&h|N&h)-1894007588:r+=(b^N^h)-899497514,d=h,h=N,N=b<<30|b>>>2,b=V,V=r;}p[0]=p[0]+V|0,p[1]=p[1]+b|0,p[2]=p[2]+N|0,p[3]=p[3]+h|0,p[4]=p[4]+d|0;},_doFinalize:function(){var g=this._data,x=g.words,p=this._nDataBytes*8,V=g.sigBytes*8;return x[V>>>5]|=128<<24-V%32,x[(V+64>>>9<<4)+14]=Math.floor(p/4294967296),x[(V+64>>>9<<4)+15]=p,g.sigBytes=x.length*4,this._process(),this._hash},clone:function(){var g=n.clone.call(this);return g._hash=this._hash.clone(),g}});i.SHA1=n._createHelper(u),i.HmacSHA1=n._createHmacHelper(u);})(),a.SHA1});});var w;(n=>(n.log=(s,...l)=>console.log(`[Pixi\u2019VN Json] ${s}`,...l),n.warn=(s,...l)=>console.warn(`[Pixi\u2019VN Json] ${s}`,...l),n.error=(s,...l)=>console.error(`[Pixi\u2019VN Json] ${s}`,...l),n.info=(s,...l)=>console.info(`[Pixi\u2019VN Json] ${s}`,...l)))(w||(w={}));function z(a){let i="";return a.values.forEach(t=>{if(typeof t=="string")i+=t;else {let o=core.JsonUnifier.getLogichValue(t);i+=`${o}`;}}),i}async function I(a,i){let t=core.JsonUnifier.getLogichValue(a);if(t)switch(t.type){case "sound":core.JsonUnifier.soundOperation(t);break;case "assets":case "bundle":await core.JsonUnifier.loadAssets(t);break;case "image":await core.JsonUnifier.imageOperation(t);break;case "video":await core.JsonUnifier.videoOperation(t);break;case "imagecontainer":await core.JsonUnifier.imageContainerOperation(t);break;case "text":await core.JsonUnifier.textOperation(t);break;case "canvaselement":await core.JsonUnifier.canvasElementOperation(t);break;case "value":core.JsonUnifier.setStorageValue(t);break;case "operationtoconvert":if(i){let o=z(t),n=await i(o);n&&await I(n,i);}break;case "input":case "dialogue":core.JsonUnifier.narrationOperation(t);break;case "shake":await core.JsonUnifier.effectOperation(t);break;case "animate":case "animate-sequence":core.JsonUnifier.animateOperation(t);break}}function W(a){let i=core.JsonUnifier.getLogichValue(a);i&&i.type==="value"&&i.storageOperationType==="set"&&(i.storageType==="storage"||i.storageType==="tempstorage")&&core.JsonUnifier.setInitialStorageValue(i);}async function ae(a,i={}){if(!Array.isArray(a))if(typeof a=="object"||typeof a=="string")a=[a];else {w.error("Error parsing imported Pixi'VN JSON: data is not an object");return}let t=a.map(async s=>{if(typeof s=="string")try{s=JSON.parse(s);}catch(l){w.error("Error parsing imported Pixi'VN JSON",l),s={};}return s}),n=(await Promise.all(t)).map(async s=>{let l=[];if(s.initialOperations)for(let u of s.initialOperations)W(u);if(s.labels){let u=s.labels;for(let g in u)try{let x=u[g],p=new _(g,x,void 0,i);narration.RegisteredLabels.add(p);}catch(x){w.error(`Error creating JSON label ${g}`,x);}}return Promise.all(l)});await Promise.all(n);}var X=ne(M());var $="___param___";var _=class extends narration.LabelAbstract{constructor(t,o,n,s={}){n||(n={}),n.onLoadingLabel=async()=>{for(let l of o){let u;if(typeof l=="function"?u=l():u=l,u=core.JsonUnifier.getConditionalStep(u),u.operations)try{let g=u.operations.map(x=>core.JsonUnifier.loadAssets(x));await Promise.all(g);}catch(g){w.error("The operation in the onLoadingLabel function of the label has an error:",g);}}};super(t,n);T(this,"_steps");T(this,"operationStringConvert");T(this,"skipEmptyDialogs",false);this._steps=o,this.operationStringConvert=s.operationStringConvert,this.skipEmptyDialogs=s.skipEmptyDialogs||false;}get steps(){return this._steps.map(t=>this.stepConverter(t))}get stepCount(){return this._steps.length}getStepById(t){if(t<0||t>=this._steps.length)return;let o=this._steps[t];return this.stepConverter(o)}getStepSha(t){if(t<0||t>=this.steps.length)return;let o=this._steps[t];return (0, X.default)(o.toString().toLocaleLowerCase()).toString()}getDialogueText(t){let o="";if(Array.isArray(t)){let n=[];t.forEach(s=>{if(typeof s=="string")n.push(s);else if(s&&typeof s=="object"){let l=core.JsonUnifier.getLogichValue(s);l?(l&&!Array.isArray(l)&&typeof l=="object"&&(l=core.JsonUnifier.getLogichValue(l)||""),Array.isArray(l)?n=n.map(u=>`${u}`).concat(l):n.push(`${l}`)):n.push(`${s}`);}else n.push(`${s}`);}),o=n;}else {let n=core.JsonUnifier.getLogichValue(t);n&&!Array.isArray(n)&&typeof n=="object"&&(n=core.JsonUnifier.getLogichValue(n)),n&&Array.isArray(n)?o=n.map(s=>`${s}`):o=`${n}`;}return o}getDialogue(t){if(t==null)return;let o=core.JsonUnifier.getLogichValue(t);return o==null?`${o}`:typeof o=="object"&&"character"in o&&"text"in o?{character:o.character,text:translator.translator.t(this.getDialogueText(o.text))}:translator.translator.t(this.getDialogueText(o))}getChoices(t){return core.JsonUnifier.getLogichValue(t)?.map(s=>core.JsonUnifier.getLogichValue(s)).filter(s=>s!==void 0)}stepConverter(t){return async o=>{let n=typeof t=="function"?t():t;n=pixiVn.createExportableElement(n),n=core.JsonUnifier.getConditionalStep(n);let s=this.operationStringConvert?h=>this.operationStringConvert(h,n,o):void 0,{operations:l=[]}=n;for(let h of l)await I(h,s);let{labelToOpen:u=[]}=n,g=this.getChoices(n.choices),x=core.JsonUnifier.getLogichValue(n.glueEnabled),p=this.getDialogue(n.dialogue),V=[];Array.isArray(u)||(u=[u]),u.forEach(h=>{let d=core.JsonUnifier.getLogichValue(h);d&&V.push(d);});let b=core.JsonUnifier.getLogichValue(n.goNextStep),N=core.JsonUnifier.getLogichValue(n.end);if(g){let h=g.map(d=>{let y="";if(Array.isArray(d.text)){let r=[];d.text.forEach(c=>{if(typeof c=="string")r.push(translator.translator.t(c));else if(c&&typeof c=="object"){let f=core.JsonUnifier.getLogichValue(c);f&&!Array.isArray(f)&&typeof f=="object"&&(f=core.JsonUnifier.getLogichValue(f)||""),f&&(Array.isArray(f)?r=r.concat(translator.translator.t(f)):r.push(translator.translator.t(f)));}}),y=r;}else typeof d.text=="string"&&(y=translator.translator.t(d.text));return {label:d.label,text:y,props:d.props,type:d.type,oneTime:d.oneTime,onlyHaveNoChoice:d.onlyHaveNoChoice,autoSelect:d.autoSelect}});narration.narration.choices=h;}else narration.narration.choices=void 0;p!==void 0&&(narration.narration.dialogue=p,this.skipEmptyDialogs&&typeof p=="string"&&(p===""||RegExp(/^\s+$/).test(p))&&(b=true)),x?narration.narration.dialogGlue=true:x===false&&(narration.narration.dialogGlue=false);for(let h of V){let d=h.label;typeof d=="object"&&(d=core.JsonUnifier.getLogichValue(d)||"");let y=h.params?.map(e=>core.JsonUnifier.getLogichValue(e));o={...o,...h.props},h.type==="jump"?(narration.narration.openedLabels.length>0&&narration.narration.closeCurrentLabel(),storage.storage.setTempVariable(`${$}${narration.narration.openedLabels.length}`,y),await narration.narration.call(d,o)):(storage.storage.setTempVariable(`${$}${narration.narration.openedLabels.length}`,y),await narration.narration.call(d,o));}N==="game_end"?(narration.narration.closeAllLabels(),await narration.narration.continue(o,{runNow:true})):N==="label_end"&&narration.narration.closeCurrentLabel(),b&&await narration.narration.continue(o,{runNow:true});}}};exports.LabelJson=_;exports.importPixiVNJson=ae;//# sourceMappingURL=importer.cjs.map
|
|
2
|
+
//# sourceMappingURL=importer.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../node_modules/crypto-js/core.js","../node_modules/crypto-js/sha1.js","../src/utils/log-utility.ts","../src/utils/operationtoconvert.ts","../src/importer/operation-utility.ts","../src/importer/importer.ts","../src/importer/LabelJson.ts","../src/constants.ts"],"names":["require_core","__commonJSMin","exports","module","root","factory","CryptoJS","Math","undefined","crypto","__require","cryptoSecureRandomInt","create","F","obj","subtype","C","C_lib","Base","overrides","instance","properties","propertyName","WordArray","words","sigBytes","encoder","Hex","wordArray","thisWords","thatWords","thisSigBytes","thatSigBytes","i","thatByte","j","clone","nBytes","C_enc","hexChars","bite","hexStr","hexStrLength","Latin1","latin1Chars","latin1Str","latin1StrLength","Utf8","utf8Str","BufferedBlockAlgorithm","data","doFlush","processedWords","dataWords","dataSigBytes","blockSize","blockSizeBytes","nBlocksReady","nWordsReady","nBytesReady","offset","cfg","messageUpdate","hash","hasher","message","key","C_algo","require_sha1","Hasher","W","SHA1","M","H","a","c","d","e","n","t","nBitsTotal","nBitsLeft","logger","optionalParams","operationStringToString","operation","stringOperation","value","res","JsonUnifier","runOperation","origin","operationStringConvert","op","runInitialOperation","importPixiVNJson","values","options","jsonsPromises","promises","labels","labelId","steps","label","LabelJson","RegisteredLabels","import_sha1","PIXIVNJSON_PARAM_ID","LabelAbstract","id","props","stepProp","step","error","__publicField","stepId","index","sha1","text","texts","v","dialogue","translator","option","createExportableElement","operations","tempLabelToOpen","choices","glueEnabled","labelToOpen","goNextStep","end","narration","labelString","labelParams","param","storage"],"mappings":"6OAAA,IAAA,CAAA,CAAA,MAAA,CAAA,MAAA,CAAA,IAAA,CAAA,CAAA,MAAA,CAAA,cAAA,CAAA,IAAA,CAAA,CAAA,MAAA,CAAA,wBAAA,CAAA,IAAA,CAAA,CAAA,MAAA,CAAA,mBAAA,CAAA,IAAA,CAAA,CAAA,MAAA,CAAA,cAAA,CAAA,EAAA,CAAA,MAAA,CAAA,SAAA,CAAA,cAAA,CAAA,IAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,GAAA,CAAA,IAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,UAAA,CAAA,IAAA,CAAA,YAAA,CAAA,IAAA,CAAA,QAAA,CAAA,IAAA,CAAA,KAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,IAAA,CAAA,CAAA,CAAA,CAAA,EAAA,OAAA,OAAA,CAAA,GAAA,CAAA,OAAA,CAAA,OAAA,KAAA,CAAA,GAAA,CAAA,IAAA,KAAA,CAAA,CAAA,CAAA,CAAA,GAAA,CAAA,CAAA,CAAA,CAAA,CAAA,GAAA,CAAA,OAAA,OAAA,CAAA,GAAA,CAAA,OAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,SAAA,CAAA,CAAA,CAAA,GAAA,OAAA,OAAA,CAAA,GAAA,CAAA,OAAA,OAAA,CAAA,KAAA,CAAA,IAAA,CAAA,SAAA,CAAA,CAAA,MAAA,KAAA,CAAA,sBAAA,CAAA,CAAA,CAAA,oBAAA,C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AQ,WAAA,EACfC,mBAAAA,CAAU,iBAAA,GAGVF,CAAAA,EACA,MAAME,mBAAAA,CAAU,QAAA,CAAStB,EAAO,CAAE,MAAA,CAAQ,IAAK,CAAC,EAExD,CACJ,CACJ","file":"importer.cjs","sourcesContent":[";(function (root, factory) {\n\tif (typeof exports === \"object\") {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory();\n\t}\n\telse if (typeof define === \"function\" && define.amd) {\n\t\t// AMD\n\t\tdefine([], factory);\n\t}\n\telse {\n\t\t// Global (browser)\n\t\troot.CryptoJS = factory();\n\t}\n}(this, function () {\n\n\t/*globals window, global, require*/\n\n\t/**\n\t * CryptoJS core components.\n\t */\n\tvar CryptoJS = CryptoJS || (function (Math, undefined) {\n\n\t var crypto;\n\n\t // Native crypto from window (Browser)\n\t if (typeof window !== 'undefined' && window.crypto) {\n\t crypto = window.crypto;\n\t }\n\n\t // Native crypto in web worker (Browser)\n\t if (typeof self !== 'undefined' && self.crypto) {\n\t crypto = self.crypto;\n\t }\n\n\t // Native crypto from worker\n\t if (typeof globalThis !== 'undefined' && globalThis.crypto) {\n\t crypto = globalThis.crypto;\n\t }\n\n\t // Native (experimental IE 11) crypto from window (Browser)\n\t if (!crypto && typeof window !== 'undefined' && window.msCrypto) {\n\t crypto = window.msCrypto;\n\t }\n\n\t // Native crypto from global (NodeJS)\n\t if (!crypto && typeof global !== 'undefined' && global.crypto) {\n\t crypto = global.crypto;\n\t }\n\n\t // Native crypto import via require (NodeJS)\n\t if (!crypto && typeof require === 'function') {\n\t try {\n\t crypto = require('crypto');\n\t } catch (err) {}\n\t }\n\n\t /*\n\t * Cryptographically secure pseudorandom number generator\n\t *\n\t * As Math.random() is cryptographically not safe to use\n\t */\n\t var cryptoSecureRandomInt = function () {\n\t if (crypto) {\n\t // Use getRandomValues method (Browser)\n\t if (typeof crypto.getRandomValues === 'function') {\n\t try {\n\t return crypto.getRandomValues(new Uint32Array(1))[0];\n\t } catch (err) {}\n\t }\n\n\t // Use randomBytes method (NodeJS)\n\t if (typeof crypto.randomBytes === 'function') {\n\t try {\n\t return crypto.randomBytes(4).readInt32LE();\n\t } catch (err) {}\n\t }\n\t }\n\n\t throw new Error('Native crypto module could not be used to get secure random number.');\n\t };\n\n\t /*\n\t * Local polyfill of Object.create\n\n\t */\n\t var create = Object.create || (function () {\n\t function F() {}\n\n\t return function (obj) {\n\t var subtype;\n\n\t F.prototype = obj;\n\n\t subtype = new F();\n\n\t F.prototype = null;\n\n\t return subtype;\n\t };\n\t }());\n\n\t /**\n\t * CryptoJS namespace.\n\t */\n\t var C = {};\n\n\t /**\n\t * Library namespace.\n\t */\n\t var C_lib = C.lib = {};\n\n\t /**\n\t * Base object for prototypal inheritance.\n\t */\n\t var Base = C_lib.Base = (function () {\n\n\n\t return {\n\t /**\n\t * Creates a new object that inherits from this object.\n\t *\n\t * @param {Object} overrides Properties to copy into the new object.\n\t *\n\t * @return {Object} The new object.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var MyType = CryptoJS.lib.Base.extend({\n\t * field: 'value',\n\t *\n\t * method: function () {\n\t * }\n\t * });\n\t */\n\t extend: function (overrides) {\n\t // Spawn\n\t var subtype = create(this);\n\n\t // Augment\n\t if (overrides) {\n\t subtype.mixIn(overrides);\n\t }\n\n\t // Create default initializer\n\t if (!subtype.hasOwnProperty('init') || this.init === subtype.init) {\n\t subtype.init = function () {\n\t subtype.$super.init.apply(this, arguments);\n\t };\n\t }\n\n\t // Initializer's prototype is the subtype object\n\t subtype.init.prototype = subtype;\n\n\t // Reference supertype\n\t subtype.$super = this;\n\n\t return subtype;\n\t },\n\n\t /**\n\t * Extends this object and runs the init method.\n\t * Arguments to create() will be passed to init().\n\t *\n\t * @return {Object} The new object.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var instance = MyType.create();\n\t */\n\t create: function () {\n\t var instance = this.extend();\n\t instance.init.apply(instance, arguments);\n\n\t return instance;\n\t },\n\n\t /**\n\t * Initializes a newly created object.\n\t * Override this method to add some logic when your objects are created.\n\t *\n\t * @example\n\t *\n\t * var MyType = CryptoJS.lib.Base.extend({\n\t * init: function () {\n\t * // ...\n\t * }\n\t * });\n\t */\n\t init: function () {\n\t },\n\n\t /**\n\t * Copies properties into this object.\n\t *\n\t * @param {Object} properties The properties to mix in.\n\t *\n\t * @example\n\t *\n\t * MyType.mixIn({\n\t * field: 'value'\n\t * });\n\t */\n\t mixIn: function (properties) {\n\t for (var propertyName in properties) {\n\t if (properties.hasOwnProperty(propertyName)) {\n\t this[propertyName] = properties[propertyName];\n\t }\n\t }\n\n\t // IE won't copy toString using the loop above\n\t if (properties.hasOwnProperty('toString')) {\n\t this.toString = properties.toString;\n\t }\n\t },\n\n\t /**\n\t * Creates a copy of this object.\n\t *\n\t * @return {Object} The clone.\n\t *\n\t * @example\n\t *\n\t * var clone = instance.clone();\n\t */\n\t clone: function () {\n\t return this.init.prototype.extend(this);\n\t }\n\t };\n\t }());\n\n\t /**\n\t * An array of 32-bit words.\n\t *\n\t * @property {Array} words The array of 32-bit words.\n\t * @property {number} sigBytes The number of significant bytes in this word array.\n\t */\n\t var WordArray = C_lib.WordArray = Base.extend({\n\t /**\n\t * Initializes a newly created word array.\n\t *\n\t * @param {Array} words (Optional) An array of 32-bit words.\n\t * @param {number} sigBytes (Optional) The number of significant bytes in the words.\n\t *\n\t * @example\n\t *\n\t * var wordArray = CryptoJS.lib.WordArray.create();\n\t * var wordArray = CryptoJS.lib.WordArray.create([0x00010203, 0x04050607]);\n\t * var wordArray = CryptoJS.lib.WordArray.create([0x00010203, 0x04050607], 6);\n\t */\n\t init: function (words, sigBytes) {\n\t words = this.words = words || [];\n\n\t if (sigBytes != undefined) {\n\t this.sigBytes = sigBytes;\n\t } else {\n\t this.sigBytes = words.length * 4;\n\t }\n\t },\n\n\t /**\n\t * Converts this word array to a string.\n\t *\n\t * @param {Encoder} encoder (Optional) The encoding strategy to use. Default: CryptoJS.enc.Hex\n\t *\n\t * @return {string} The stringified word array.\n\t *\n\t * @example\n\t *\n\t * var string = wordArray + '';\n\t * var string = wordArray.toString();\n\t * var string = wordArray.toString(CryptoJS.enc.Utf8);\n\t */\n\t toString: function (encoder) {\n\t return (encoder || Hex).stringify(this);\n\t },\n\n\t /**\n\t * Concatenates a word array to this word array.\n\t *\n\t * @param {WordArray} wordArray The word array to append.\n\t *\n\t * @return {WordArray} This word array.\n\t *\n\t * @example\n\t *\n\t * wordArray1.concat(wordArray2);\n\t */\n\t concat: function (wordArray) {\n\t // Shortcuts\n\t var thisWords = this.words;\n\t var thatWords = wordArray.words;\n\t var thisSigBytes = this.sigBytes;\n\t var thatSigBytes = wordArray.sigBytes;\n\n\t // Clamp excess bits\n\t this.clamp();\n\n\t // Concat\n\t if (thisSigBytes % 4) {\n\t // Copy one byte at a time\n\t for (var i = 0; i < thatSigBytes; i++) {\n\t var thatByte = (thatWords[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff;\n\t thisWords[(thisSigBytes + i) >>> 2] |= thatByte << (24 - ((thisSigBytes + i) % 4) * 8);\n\t }\n\t } else {\n\t // Copy one word at a time\n\t for (var j = 0; j < thatSigBytes; j += 4) {\n\t thisWords[(thisSigBytes + j) >>> 2] = thatWords[j >>> 2];\n\t }\n\t }\n\t this.sigBytes += thatSigBytes;\n\n\t // Chainable\n\t return this;\n\t },\n\n\t /**\n\t * Removes insignificant bits.\n\t *\n\t * @example\n\t *\n\t * wordArray.clamp();\n\t */\n\t clamp: function () {\n\t // Shortcuts\n\t var words = this.words;\n\t var sigBytes = this.sigBytes;\n\n\t // Clamp\n\t words[sigBytes >>> 2] &= 0xffffffff << (32 - (sigBytes % 4) * 8);\n\t words.length = Math.ceil(sigBytes / 4);\n\t },\n\n\t /**\n\t * Creates a copy of this word array.\n\t *\n\t * @return {WordArray} The clone.\n\t *\n\t * @example\n\t *\n\t * var clone = wordArray.clone();\n\t */\n\t clone: function () {\n\t var clone = Base.clone.call(this);\n\t clone.words = this.words.slice(0);\n\n\t return clone;\n\t },\n\n\t /**\n\t * Creates a word array filled with random bytes.\n\t *\n\t * @param {number} nBytes The number of random bytes to generate.\n\t *\n\t * @return {WordArray} The random word array.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var wordArray = CryptoJS.lib.WordArray.random(16);\n\t */\n\t random: function (nBytes) {\n\t var words = [];\n\n\t for (var i = 0; i < nBytes; i += 4) {\n\t words.push(cryptoSecureRandomInt());\n\t }\n\n\t return new WordArray.init(words, nBytes);\n\t }\n\t });\n\n\t /**\n\t * Encoder namespace.\n\t */\n\t var C_enc = C.enc = {};\n\n\t /**\n\t * Hex encoding strategy.\n\t */\n\t var Hex = C_enc.Hex = {\n\t /**\n\t * Converts a word array to a hex string.\n\t *\n\t * @param {WordArray} wordArray The word array.\n\t *\n\t * @return {string} The hex string.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var hexString = CryptoJS.enc.Hex.stringify(wordArray);\n\t */\n\t stringify: function (wordArray) {\n\t // Shortcuts\n\t var words = wordArray.words;\n\t var sigBytes = wordArray.sigBytes;\n\n\t // Convert\n\t var hexChars = [];\n\t for (var i = 0; i < sigBytes; i++) {\n\t var bite = (words[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff;\n\t hexChars.push((bite >>> 4).toString(16));\n\t hexChars.push((bite & 0x0f).toString(16));\n\t }\n\n\t return hexChars.join('');\n\t },\n\n\t /**\n\t * Converts a hex string to a word array.\n\t *\n\t * @param {string} hexStr The hex string.\n\t *\n\t * @return {WordArray} The word array.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var wordArray = CryptoJS.enc.Hex.parse(hexString);\n\t */\n\t parse: function (hexStr) {\n\t // Shortcut\n\t var hexStrLength = hexStr.length;\n\n\t // Convert\n\t var words = [];\n\t for (var i = 0; i < hexStrLength; i += 2) {\n\t words[i >>> 3] |= parseInt(hexStr.substr(i, 2), 16) << (24 - (i % 8) * 4);\n\t }\n\n\t return new WordArray.init(words, hexStrLength / 2);\n\t }\n\t };\n\n\t /**\n\t * Latin1 encoding strategy.\n\t */\n\t var Latin1 = C_enc.Latin1 = {\n\t /**\n\t * Converts a word array to a Latin1 string.\n\t *\n\t * @param {WordArray} wordArray The word array.\n\t *\n\t * @return {string} The Latin1 string.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var latin1String = CryptoJS.enc.Latin1.stringify(wordArray);\n\t */\n\t stringify: function (wordArray) {\n\t // Shortcuts\n\t var words = wordArray.words;\n\t var sigBytes = wordArray.sigBytes;\n\n\t // Convert\n\t var latin1Chars = [];\n\t for (var i = 0; i < sigBytes; i++) {\n\t var bite = (words[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff;\n\t latin1Chars.push(String.fromCharCode(bite));\n\t }\n\n\t return latin1Chars.join('');\n\t },\n\n\t /**\n\t * Converts a Latin1 string to a word array.\n\t *\n\t * @param {string} latin1Str The Latin1 string.\n\t *\n\t * @return {WordArray} The word array.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var wordArray = CryptoJS.enc.Latin1.parse(latin1String);\n\t */\n\t parse: function (latin1Str) {\n\t // Shortcut\n\t var latin1StrLength = latin1Str.length;\n\n\t // Convert\n\t var words = [];\n\t for (var i = 0; i < latin1StrLength; i++) {\n\t words[i >>> 2] |= (latin1Str.charCodeAt(i) & 0xff) << (24 - (i % 4) * 8);\n\t }\n\n\t return new WordArray.init(words, latin1StrLength);\n\t }\n\t };\n\n\t /**\n\t * UTF-8 encoding strategy.\n\t */\n\t var Utf8 = C_enc.Utf8 = {\n\t /**\n\t * Converts a word array to a UTF-8 string.\n\t *\n\t * @param {WordArray} wordArray The word array.\n\t *\n\t * @return {string} The UTF-8 string.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var utf8String = CryptoJS.enc.Utf8.stringify(wordArray);\n\t */\n\t stringify: function (wordArray) {\n\t try {\n\t return decodeURIComponent(escape(Latin1.stringify(wordArray)));\n\t } catch (e) {\n\t throw new Error('Malformed UTF-8 data');\n\t }\n\t },\n\n\t /**\n\t * Converts a UTF-8 string to a word array.\n\t *\n\t * @param {string} utf8Str The UTF-8 string.\n\t *\n\t * @return {WordArray} The word array.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var wordArray = CryptoJS.enc.Utf8.parse(utf8String);\n\t */\n\t parse: function (utf8Str) {\n\t return Latin1.parse(unescape(encodeURIComponent(utf8Str)));\n\t }\n\t };\n\n\t /**\n\t * Abstract buffered block algorithm template.\n\t *\n\t * The property blockSize must be implemented in a concrete subtype.\n\t *\n\t * @property {number} _minBufferSize The number of blocks that should be kept unprocessed in the buffer. Default: 0\n\t */\n\t var BufferedBlockAlgorithm = C_lib.BufferedBlockAlgorithm = Base.extend({\n\t /**\n\t * Resets this block algorithm's data buffer to its initial state.\n\t *\n\t * @example\n\t *\n\t * bufferedBlockAlgorithm.reset();\n\t */\n\t reset: function () {\n\t // Initial values\n\t this._data = new WordArray.init();\n\t this._nDataBytes = 0;\n\t },\n\n\t /**\n\t * Adds new data to this block algorithm's buffer.\n\t *\n\t * @param {WordArray|string} data The data to append. Strings are converted to a WordArray using UTF-8.\n\t *\n\t * @example\n\t *\n\t * bufferedBlockAlgorithm._append('data');\n\t * bufferedBlockAlgorithm._append(wordArray);\n\t */\n\t _append: function (data) {\n\t // Convert string to WordArray, else assume WordArray already\n\t if (typeof data == 'string') {\n\t data = Utf8.parse(data);\n\t }\n\n\t // Append\n\t this._data.concat(data);\n\t this._nDataBytes += data.sigBytes;\n\t },\n\n\t /**\n\t * Processes available data blocks.\n\t *\n\t * This method invokes _doProcessBlock(offset), which must be implemented by a concrete subtype.\n\t *\n\t * @param {boolean} doFlush Whether all blocks and partial blocks should be processed.\n\t *\n\t * @return {WordArray} The processed data.\n\t *\n\t * @example\n\t *\n\t * var processedData = bufferedBlockAlgorithm._process();\n\t * var processedData = bufferedBlockAlgorithm._process(!!'flush');\n\t */\n\t _process: function (doFlush) {\n\t var processedWords;\n\n\t // Shortcuts\n\t var data = this._data;\n\t var dataWords = data.words;\n\t var dataSigBytes = data.sigBytes;\n\t var blockSize = this.blockSize;\n\t var blockSizeBytes = blockSize * 4;\n\n\t // Count blocks ready\n\t var nBlocksReady = dataSigBytes / blockSizeBytes;\n\t if (doFlush) {\n\t // Round up to include partial blocks\n\t nBlocksReady = Math.ceil(nBlocksReady);\n\t } else {\n\t // Round down to include only full blocks,\n\t // less the number of blocks that must remain in the buffer\n\t nBlocksReady = Math.max((nBlocksReady | 0) - this._minBufferSize, 0);\n\t }\n\n\t // Count words ready\n\t var nWordsReady = nBlocksReady * blockSize;\n\n\t // Count bytes ready\n\t var nBytesReady = Math.min(nWordsReady * 4, dataSigBytes);\n\n\t // Process blocks\n\t if (nWordsReady) {\n\t for (var offset = 0; offset < nWordsReady; offset += blockSize) {\n\t // Perform concrete-algorithm logic\n\t this._doProcessBlock(dataWords, offset);\n\t }\n\n\t // Remove processed words\n\t processedWords = dataWords.splice(0, nWordsReady);\n\t data.sigBytes -= nBytesReady;\n\t }\n\n\t // Return processed words\n\t return new WordArray.init(processedWords, nBytesReady);\n\t },\n\n\t /**\n\t * Creates a copy of this object.\n\t *\n\t * @return {Object} The clone.\n\t *\n\t * @example\n\t *\n\t * var clone = bufferedBlockAlgorithm.clone();\n\t */\n\t clone: function () {\n\t var clone = Base.clone.call(this);\n\t clone._data = this._data.clone();\n\n\t return clone;\n\t },\n\n\t _minBufferSize: 0\n\t });\n\n\t /**\n\t * Abstract hasher template.\n\t *\n\t * @property {number} blockSize The number of 32-bit words this hasher operates on. Default: 16 (512 bits)\n\t */\n\t var Hasher = C_lib.Hasher = BufferedBlockAlgorithm.extend({\n\t /**\n\t * Configuration options.\n\t */\n\t cfg: Base.extend(),\n\n\t /**\n\t * Initializes a newly created hasher.\n\t *\n\t * @param {Object} cfg (Optional) The configuration options to use for this hash computation.\n\t *\n\t * @example\n\t *\n\t * var hasher = CryptoJS.algo.SHA256.create();\n\t */\n\t init: function (cfg) {\n\t // Apply config defaults\n\t this.cfg = this.cfg.extend(cfg);\n\n\t // Set initial values\n\t this.reset();\n\t },\n\n\t /**\n\t * Resets this hasher to its initial state.\n\t *\n\t * @example\n\t *\n\t * hasher.reset();\n\t */\n\t reset: function () {\n\t // Reset data buffer\n\t BufferedBlockAlgorithm.reset.call(this);\n\n\t // Perform concrete-hasher logic\n\t this._doReset();\n\t },\n\n\t /**\n\t * Updates this hasher with a message.\n\t *\n\t * @param {WordArray|string} messageUpdate The message to append.\n\t *\n\t * @return {Hasher} This hasher.\n\t *\n\t * @example\n\t *\n\t * hasher.update('message');\n\t * hasher.update(wordArray);\n\t */\n\t update: function (messageUpdate) {\n\t // Append\n\t this._append(messageUpdate);\n\n\t // Update the hash\n\t this._process();\n\n\t // Chainable\n\t return this;\n\t },\n\n\t /**\n\t * Finalizes the hash computation.\n\t * Note that the finalize operation is effectively a destructive, read-once operation.\n\t *\n\t * @param {WordArray|string} messageUpdate (Optional) A final message update.\n\t *\n\t * @return {WordArray} The hash.\n\t *\n\t * @example\n\t *\n\t * var hash = hasher.finalize();\n\t * var hash = hasher.finalize('message');\n\t * var hash = hasher.finalize(wordArray);\n\t */\n\t finalize: function (messageUpdate) {\n\t // Final message update\n\t if (messageUpdate) {\n\t this._append(messageUpdate);\n\t }\n\n\t // Perform concrete-hasher logic\n\t var hash = this._doFinalize();\n\n\t return hash;\n\t },\n\n\t blockSize: 512/32,\n\n\t /**\n\t * Creates a shortcut function to a hasher's object interface.\n\t *\n\t * @param {Hasher} hasher The hasher to create a helper for.\n\t *\n\t * @return {Function} The shortcut function.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var SHA256 = CryptoJS.lib.Hasher._createHelper(CryptoJS.algo.SHA256);\n\t */\n\t _createHelper: function (hasher) {\n\t return function (message, cfg) {\n\t return new hasher.init(cfg).finalize(message);\n\t };\n\t },\n\n\t /**\n\t * Creates a shortcut function to the HMAC's object interface.\n\t *\n\t * @param {Hasher} hasher The hasher to use in this HMAC helper.\n\t *\n\t * @return {Function} The shortcut function.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var HmacSHA256 = CryptoJS.lib.Hasher._createHmacHelper(CryptoJS.algo.SHA256);\n\t */\n\t _createHmacHelper: function (hasher) {\n\t return function (message, key) {\n\t return new C_algo.HMAC.init(hasher, key).finalize(message);\n\t };\n\t }\n\t });\n\n\t /**\n\t * Algorithm namespace.\n\t */\n\t var C_algo = C.algo = {};\n\n\t return C;\n\t}(Math));\n\n\n\treturn CryptoJS;\n\n}));",";(function (root, factory) {\n\tif (typeof exports === \"object\") {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(require(\"./core\"));\n\t}\n\telse if (typeof define === \"function\" && define.amd) {\n\t\t// AMD\n\t\tdefine([\"./core\"], factory);\n\t}\n\telse {\n\t\t// Global (browser)\n\t\tfactory(root.CryptoJS);\n\t}\n}(this, function (CryptoJS) {\n\n\t(function () {\n\t // Shortcuts\n\t var C = CryptoJS;\n\t var C_lib = C.lib;\n\t var WordArray = C_lib.WordArray;\n\t var Hasher = C_lib.Hasher;\n\t var C_algo = C.algo;\n\n\t // Reusable object\n\t var W = [];\n\n\t /**\n\t * SHA-1 hash algorithm.\n\t */\n\t var SHA1 = C_algo.SHA1 = Hasher.extend({\n\t _doReset: function () {\n\t this._hash = new WordArray.init([\n\t 0x67452301, 0xefcdab89,\n\t 0x98badcfe, 0x10325476,\n\t 0xc3d2e1f0\n\t ]);\n\t },\n\n\t _doProcessBlock: function (M, offset) {\n\t // Shortcut\n\t var H = this._hash.words;\n\n\t // Working variables\n\t var a = H[0];\n\t var b = H[1];\n\t var c = H[2];\n\t var d = H[3];\n\t var e = H[4];\n\n\t // Computation\n\t for (var i = 0; i < 80; i++) {\n\t if (i < 16) {\n\t W[i] = M[offset + i] | 0;\n\t } else {\n\t var n = W[i - 3] ^ W[i - 8] ^ W[i - 14] ^ W[i - 16];\n\t W[i] = (n << 1) | (n >>> 31);\n\t }\n\n\t var t = ((a << 5) | (a >>> 27)) + e + W[i];\n\t if (i < 20) {\n\t t += ((b & c) | (~b & d)) + 0x5a827999;\n\t } else if (i < 40) {\n\t t += (b ^ c ^ d) + 0x6ed9eba1;\n\t } else if (i < 60) {\n\t t += ((b & c) | (b & d) | (c & d)) - 0x70e44324;\n\t } else /* if (i < 80) */ {\n\t t += (b ^ c ^ d) - 0x359d3e2a;\n\t }\n\n\t e = d;\n\t d = c;\n\t c = (b << 30) | (b >>> 2);\n\t b = a;\n\t a = t;\n\t }\n\n\t // Intermediate hash value\n\t H[0] = (H[0] + a) | 0;\n\t H[1] = (H[1] + b) | 0;\n\t H[2] = (H[2] + c) | 0;\n\t H[3] = (H[3] + d) | 0;\n\t H[4] = (H[4] + e) | 0;\n\t },\n\n\t _doFinalize: function () {\n\t // Shortcuts\n\t var data = this._data;\n\t var dataWords = data.words;\n\n\t var nBitsTotal = this._nDataBytes * 8;\n\t var nBitsLeft = data.sigBytes * 8;\n\n\t // Add padding\n\t dataWords[nBitsLeft >>> 5] |= 0x80 << (24 - nBitsLeft % 32);\n\t dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 14] = Math.floor(nBitsTotal / 0x100000000);\n\t dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 15] = nBitsTotal;\n\t data.sigBytes = dataWords.length * 4;\n\n\t // Hash final blocks\n\t this._process();\n\n\t // Return final computed hash\n\t return this._hash;\n\t },\n\n\t clone: function () {\n\t var clone = Hasher.clone.call(this);\n\t clone._hash = this._hash.clone();\n\n\t return clone;\n\t }\n\t });\n\n\t /**\n\t * Shortcut function to the hasher's object interface.\n\t *\n\t * @param {WordArray|string} message The message to hash.\n\t *\n\t * @return {WordArray} The hash.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var hash = CryptoJS.SHA1('message');\n\t * var hash = CryptoJS.SHA1(wordArray);\n\t */\n\t C.SHA1 = Hasher._createHelper(SHA1);\n\n\t /**\n\t * Shortcut function to the HMAC's object interface.\n\t *\n\t * @param {WordArray|string} message The message to hash.\n\t * @param {WordArray|string} key The secret key.\n\t *\n\t * @return {WordArray} The HMAC.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var hmac = CryptoJS.HmacSHA1(message, key);\n\t */\n\t C.HmacSHA1 = Hasher._createHmacHelper(SHA1);\n\t}());\n\n\n\treturn CryptoJS.SHA1;\n\n}));","export namespace logger {\n export const log = (message?: any, ...optionalParams: any[]) =>\n console.log(`[Pixi’VN Json] ${message}`, ...optionalParams);\n export const warn = (message?: any, ...optionalParams: any[]) =>\n console.warn(`[Pixi’VN Json] ${message}`, ...optionalParams);\n export const error = (message?: any, ...optionalParams: any[]) =>\n console.error(`[Pixi’VN Json] ${message}`, ...optionalParams);\n export const info = (message?: any, ...optionalParams: any[]) =>\n console.info(`[Pixi’VN Json] ${message}`, ...optionalParams);\n}\n","import { JsonUnifier } from \"@drincs/pixi-vn-json/core\";\nimport { PixiVNJsonOperationString } from \"../interface\";\n\nexport function operationStringToString(operation: PixiVNJsonOperationString): string {\n let stringOperation = \"\";\n operation.values.forEach((value) => {\n if (typeof value === \"string\") {\n stringOperation += value;\n } else {\n let res = JsonUnifier.getLogichValue<string>(value);\n stringOperation += `${res}`;\n }\n });\n return stringOperation;\n}\n","import { JsonUnifier } from \"@drincs/pixi-vn-json/core\";\nimport { PixiVNJsonIfElse, PixiVNJsonOperation } from \"../interface\";\nimport { PixiVNJsonOperationString } from \"../interface/PixiVNJsonOperations\";\nimport { operationStringToString } from \"../utils/operationtoconvert\";\n\nexport async function runOperation(\n origin: PixiVNJsonOperation | PixiVNJsonIfElse<PixiVNJsonOperation> | PixiVNJsonOperationString,\n operationStringConvert?: (value: string) => Promise<PixiVNJsonOperation | undefined>,\n) {\n let operation = JsonUnifier.getLogichValue<PixiVNJsonOperation | PixiVNJsonOperationString>(origin);\n if (!operation) {\n return;\n }\n switch (operation.type) {\n case \"sound\":\n JsonUnifier.soundOperation(operation);\n break;\n case \"assets\":\n case \"bundle\":\n await JsonUnifier.loadAssets(operation);\n break;\n case \"image\":\n await JsonUnifier.imageOperation(operation);\n break;\n case \"video\":\n await JsonUnifier.videoOperation(operation);\n break;\n case \"imagecontainer\":\n await JsonUnifier.imageContainerOperation(operation);\n break;\n case \"text\":\n await JsonUnifier.textOperation(operation);\n break;\n case \"canvaselement\":\n await JsonUnifier.canvasElementOperation(operation);\n break;\n case \"value\":\n JsonUnifier.setStorageValue(operation);\n break;\n case \"operationtoconvert\":\n if (operationStringConvert) {\n let stringOperation = operationStringToString(operation);\n let op = await operationStringConvert(stringOperation);\n if (op) {\n await runOperation(op, operationStringConvert);\n }\n }\n break;\n case \"input\":\n case \"dialogue\":\n JsonUnifier.narrationOperation(operation);\n break;\n case \"shake\":\n await JsonUnifier.effectOperation(operation);\n break;\n case \"animate\":\n case \"animate-sequence\":\n JsonUnifier.animateOperation(operation);\n break;\n }\n}\n\nexport function runInitialOperation(\n origin: PixiVNJsonOperation | PixiVNJsonIfElse<PixiVNJsonOperation> | PixiVNJsonOperationString,\n) {\n let operation = JsonUnifier.getLogichValue<PixiVNJsonOperation | PixiVNJsonOperationString>(origin);\n if (!operation) {\n return;\n }\n switch (operation.type) {\n case \"value\":\n if (\n operation.storageOperationType === \"set\" &&\n (operation.storageType === \"storage\" || operation.storageType === \"tempstorage\")\n ) {\n JsonUnifier.setInitialStorageValue(operation);\n }\n break;\n }\n}\n","import { RegisteredLabels } from \"@drincs/pixi-vn/narration\";\nimport { LabelJson } from \".\";\nimport { PixiVNJson, PixiVNJsonLabelStep } from \"../interface\";\nimport { logger } from \"../utils/log-utility\";\nimport { LabelJsonOptions } from \"./LabelJson\";\nimport { runInitialOperation } from \"./operation-utility\";\n\n/**\n * Import a Pixi'VN JSON to the system.\n * This feature was created to give other developers the ability to create tools that can generate Pixi'VN labels or that generate Pixi'VN after extracting information from a programming language designed for writing narratives.\n * @param values The Pixi'VN JSON to be imported\n * @returns\n */\nexport async function importPixiVNJson(\n values: PixiVNJson | string | (PixiVNJson | string)[],\n options: LabelJsonOptions = {}\n) {\n if (!Array.isArray(values)) {\n if (typeof values === \"object\" || typeof values === \"string\") {\n values = [values];\n } else {\n logger.error(\"Error parsing imported Pixi'VN JSON: data is not an object\");\n return;\n }\n }\n\n const jsonsPromises: Promise<PixiVNJson>[] = values.map(async (data) => {\n if (typeof data === \"string\") {\n try {\n data = JSON.parse(data) as PixiVNJson;\n } catch (e) {\n logger.error(\"Error parsing imported Pixi'VN JSON\", e);\n data = {};\n }\n }\n return data;\n });\n const jsons = await Promise.all(jsonsPromises);\n\n const promises = jsons.map(async (data) => {\n const promises: Promise<void>[] = [];\n if (data.initialOperations) {\n for (let operation of data.initialOperations) {\n runInitialOperation(operation);\n }\n }\n if (data.labels) {\n let labels = data.labels;\n for (const labelId in labels) {\n try {\n const steps: PixiVNJsonLabelStep[] = labels[labelId];\n let label = new LabelJson(labelId, steps, undefined, options);\n RegisteredLabels.add(label);\n } catch (e) {\n logger.error(`Error creating JSON label ${labelId}`, e);\n }\n }\n }\n return Promise.all(promises);\n });\n\n await Promise.all(promises);\n}\n","import { createExportableElement } from \"@drincs/pixi-vn\";\nimport { JsonUnifier } from \"@drincs/pixi-vn-json/core\";\nimport { translator } from \"@drincs/pixi-vn-json/translator\";\nimport {\n LabelAbstract,\n LabelProps,\n narration,\n StepLabelPropsType,\n StepLabelType,\n StoredChoiceInterface,\n} from \"@drincs/pixi-vn/narration\";\nimport { storage } from \"@drincs/pixi-vn/storage\";\nimport sha1 from \"crypto-js/sha1\";\nimport { PIXIVNJSON_PARAM_ID } from \"../constants\";\nimport { PixiVNJsonLabelStep, PixiVNJsonOperation } from \"../interface\";\nimport PixiVNJsonConditionalStatements from \"../interface/PixiVNJsonConditionalStatements\";\nimport {\n PixiVNJsonChoice,\n PixiVNJsonChoices,\n PixiVNJsonDialog,\n PixiVNJsonDialogText,\n PixiVNJsonLabelToOpen,\n} from \"../interface/PixiVNJsonLabelStep\";\nimport { logger } from \"../utils/log-utility\";\nimport { runOperation } from \"./operation-utility\";\n\nexport type LabelJsonOptions = {\n /**\n * Function that converts a string to a {@link PixiVNJsonOperation}.\n * If is a special operation you can return undefined and can run the operation.\n */\n operationStringConvert?: (\n value: string,\n step: PixiVNJsonLabelStep,\n props: StepLabelPropsType | {},\n ) => Promise<PixiVNJsonOperation | undefined>;\n /**\n * If true and a dialog is empty or has only spaces, {@link PixiVNJsonLabelStep.goNextStep} will be set to true.\n */\n skipEmptyDialogs?: boolean;\n};\n\nexport default class LabelJson<T extends {} = {}> extends LabelAbstract<LabelJson<T>, T> {\n /**\n * @param id is the id of the label\n * @param steps is the list of steps that the label will perform\n * @param props is the properties of the label\n */\n constructor(\n id: string,\n steps: (PixiVNJsonLabelStep | (() => PixiVNJsonLabelStep))[],\n props?: LabelProps<LabelJson<T>>,\n options: LabelJsonOptions = {},\n ) {\n if (!props) {\n props = {};\n }\n props.onLoadingLabel = async () => {\n for (let stepProp of steps) {\n let step: PixiVNJsonLabelStep;\n if (typeof stepProp === \"function\") {\n step = stepProp();\n } else {\n step = stepProp;\n }\n\n step = JsonUnifier.getConditionalStep(step);\n\n if (step.operations) {\n try {\n let promises = step.operations.map((operation) => JsonUnifier.loadAssets(operation));\n await Promise.all(promises);\n } catch (error) {\n logger.error(\"The operation in the onLoadingLabel function of the label has an error:\", error);\n }\n }\n }\n };\n super(id, props);\n this._steps = steps;\n this.operationStringConvert = options.operationStringConvert;\n this.skipEmptyDialogs = options.skipEmptyDialogs || false;\n }\n\n private _steps: (PixiVNJsonLabelStep | (() => PixiVNJsonLabelStep))[];\n get steps(): StepLabelType<T>[] {\n return this._steps.map((step) => {\n return this.stepConverter(step);\n });\n }\n get stepCount(): number {\n return this._steps.length;\n }\n getStepById(stepId: number): StepLabelType<T> | undefined {\n if (stepId < 0 || stepId >= this._steps.length) {\n return undefined;\n }\n let step = this._steps[stepId];\n return this.stepConverter(step);\n }\n\n private operationStringConvert?: (\n value: string,\n step: PixiVNJsonLabelStep,\n props: StepLabelPropsType,\n ) => Promise<PixiVNJsonOperation | undefined>;\n private skipEmptyDialogs: boolean = false;\n\n public getStepSha(index: number): string | undefined {\n if (index < 0 || index >= this.steps.length) {\n return undefined;\n }\n let step = this._steps[index];\n let sha1String = sha1(step.toString().toLocaleLowerCase());\n return sha1String.toString();\n }\n\n private getDialogueText(origin: PixiVNJsonDialogText): string | string[] {\n let text: string | string[] = \"\";\n if (Array.isArray(origin)) {\n let texts: string[] = [];\n origin.forEach((t) => {\n if (typeof t === \"string\") {\n texts.push(t);\n } else if (t && typeof t === \"object\") {\n let res = JsonUnifier.getLogichValue<string | any[]>(t);\n if (res) {\n if (res && !Array.isArray(res) && typeof res === \"object\") {\n res = JsonUnifier.getLogichValue<string | string[]>(res) || \"\";\n }\n if (Array.isArray(res)) {\n texts = texts.map((v) => `${v}`).concat(res);\n } else {\n texts.push(`${res}`);\n }\n } else {\n texts.push(`${t}`);\n }\n } else {\n texts.push(`${t}`);\n }\n });\n text = texts;\n } else {\n let res = JsonUnifier.getLogichValue<string | any[]>(origin);\n if (res && !Array.isArray(res) && typeof res === \"object\") {\n res = JsonUnifier.getLogichValue<string | string[]>(res);\n }\n\n if (res && Array.isArray(res)) {\n text = res.map((v) => `${v}`);\n } else {\n text = `${res}`;\n }\n }\n return text;\n }\n private getDialogue(\n origin:\n | PixiVNJsonDialog<PixiVNJsonDialogText>\n | PixiVNJsonConditionalStatements<PixiVNJsonDialog<PixiVNJsonDialogText>>\n | undefined,\n ): PixiVNJsonDialog<string | string[]> | undefined {\n if (origin === undefined || origin === null) {\n return undefined;\n }\n let dialogue = JsonUnifier.getLogichValue<PixiVNJsonDialog<PixiVNJsonDialogText>>(origin);\n if (dialogue === undefined || dialogue === null) {\n return `${dialogue}`;\n }\n if (typeof dialogue === \"object\" && \"character\" in dialogue && \"text\" in dialogue) {\n return {\n character: dialogue.character,\n text: translator.t(this.getDialogueText(dialogue.text)),\n };\n } else {\n return translator.t(this.getDialogueText(dialogue));\n }\n }\n\n private getChoices(\n origin: PixiVNJsonChoices | PixiVNJsonConditionalStatements<PixiVNJsonChoices> | undefined,\n ): PixiVNJsonChoice[] | undefined {\n const choices = JsonUnifier.getLogichValue<PixiVNJsonChoices>(origin);\n const options = choices\n ?.map((option) => {\n return JsonUnifier.getLogichValue<PixiVNJsonChoice>(option);\n })\n .filter((option) => option !== undefined);\n return options;\n }\n\n private stepConverter(stepProp: PixiVNJsonLabelStep | (() => PixiVNJsonLabelStep)): StepLabelType<T> {\n return async (props) => {\n let step: PixiVNJsonLabelStep = typeof stepProp === \"function\" ? stepProp() : stepProp;\n step = createExportableElement(step);\n step = JsonUnifier.getConditionalStep(step);\n const operationStringConvert = this.operationStringConvert\n ? (value: string) => this.operationStringConvert!(value, step, props)\n : undefined;\n const { operations = [] } = step;\n for (let operation of operations) {\n await runOperation(operation, operationStringConvert);\n }\n\n let { labelToOpen: tempLabelToOpen = [] } = step;\n const choices = this.getChoices(step.choices);\n const glueEnabled = JsonUnifier.getLogichValue<boolean>(step.glueEnabled);\n const dialogue = this.getDialogue(step.dialogue);\n\n let labelToOpen: PixiVNJsonLabelToOpen[] = [];\n if (!Array.isArray(tempLabelToOpen)) {\n tempLabelToOpen = [tempLabelToOpen];\n }\n tempLabelToOpen.forEach((label) => {\n let i = JsonUnifier.getLogichValue<PixiVNJsonLabelToOpen<{}>>(label);\n if (i) {\n labelToOpen.push(i);\n }\n });\n\n let goNextStep = JsonUnifier.getLogichValue<boolean>(step.goNextStep);\n let end = JsonUnifier.getLogichValue<\"game_end\" | \"label_end\">(step.end);\n\n if (choices) {\n let options: StoredChoiceInterface[] = choices.map((option) => {\n let text: string | string[] = \"\";\n if (Array.isArray(option.text)) {\n let texts: string[] = [];\n option.text.forEach((t) => {\n if (typeof t === \"string\") {\n texts.push(translator.t(t));\n } else if (t && typeof t === \"object\") {\n let res = JsonUnifier.getLogichValue<string | any[]>(t);\n if (res && !Array.isArray(res) && typeof res === \"object\") {\n res = JsonUnifier.getLogichValue<string | string[]>(res) || \"\";\n }\n if (res) {\n if (Array.isArray(res)) {\n texts = texts.concat(translator.t(res));\n } else {\n texts.push(translator.t(res));\n }\n }\n }\n });\n text = texts;\n } else if (typeof option.text === \"string\") {\n text = translator.t(option.text);\n }\n const res: StoredChoiceInterface = {\n label: option.label,\n text: text,\n props: option.props,\n type: option.type,\n oneTime: option.oneTime,\n onlyHaveNoChoice: option.onlyHaveNoChoice,\n autoSelect: option.autoSelect,\n };\n return res;\n });\n narration.choices = options;\n } else {\n narration.choices = undefined;\n }\n\n if (dialogue !== undefined) {\n narration.dialogue = dialogue;\n if (\n this.skipEmptyDialogs &&\n typeof dialogue === \"string\" &&\n (dialogue === \"\" || RegExp(/^\\s+$/).test(dialogue))\n ) {\n goNextStep = true;\n }\n }\n if (glueEnabled) {\n narration.dialogGlue = true;\n } else if (glueEnabled === false) {\n narration.dialogGlue = false;\n }\n\n for (let label of labelToOpen) {\n let labelString = label.label;\n if (typeof labelString === \"object\") {\n labelString = JsonUnifier.getLogichValue<string>(labelString) || \"\";\n }\n let labelParams = label.params?.map((param) => {\n return JsonUnifier.getLogichValue(param);\n });\n props = {\n ...props,\n ...label.props,\n };\n if (label.type === \"jump\") {\n if (narration.openedLabels.length > 0) narration.closeCurrentLabel();\n storage.setTempVariable(`${PIXIVNJSON_PARAM_ID}${narration.openedLabels.length}`, labelParams);\n await narration.call(labelString, props);\n } else {\n storage.setTempVariable(`${PIXIVNJSON_PARAM_ID}${narration.openedLabels.length}`, labelParams);\n await narration.call(labelString, props);\n }\n }\n\n if (end === \"game_end\") {\n narration.closeAllLabels();\n await narration.continue(props, { runNow: true });\n } else if (end === \"label_end\") {\n narration.closeCurrentLabel();\n }\n\n if (goNextStep) {\n await narration.continue(props, { runNow: true });\n }\n };\n }\n}\n","export const PIXIVNJSON_PARAM_ID = \"___param___\"\n"]}
|
package/dist/importer.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { StorageElementType, CanvasBaseInterface, ImageSprite, ShakeEffectProps, ShowWithDissolveTransitionProps, ShowWithFadeTransitionProps, MoveInOutProps, ZoomInOutProps, PushInOutProps, ImageContainerOptions, ImageSpriteOptions, TextOptions, ImageSpriteMemory, VideoSpriteMemory, ImageContainerMemory, TextMemory, ContainerOptions, ContainerMemory,
|
|
1
|
+
import { StorageElementType, CanvasBaseInterface, ImageSprite, ShakeEffectProps, ShowWithDissolveTransitionProps, ShowWithFadeTransitionProps, MoveInOutProps, ZoomInOutProps, PushInOutProps, ImageContainerOptions, ImageSpriteOptions, TextOptions, ImageSpriteMemory, VideoSpriteMemory, ImageContainerMemory, TextMemory, ContainerOptions, ContainerMemory, SoundPlayOptionsWithChannel, IMediaInstance, LabelRunModeType, StorageObjectType, StepLabelPropsType } from '@drincs/pixi-vn';
|
|
2
2
|
import { KeyframesType, AnimationOptions, ObjectSegment, ObjectSegmentWithTransition, SequenceOptions } from '@drincs/pixi-vn/motion';
|
|
3
3
|
import { UPDATE_PRIORITY } from 'pixi.js';
|
|
4
4
|
import { LabelAbstract, LabelProps, StepLabelPropsType as StepLabelPropsType$1, StepLabelType } from '@drincs/pixi-vn/narration';
|
|
@@ -352,7 +352,7 @@ type PixiVNJsonTextEdit = {
|
|
|
352
352
|
alias: string;
|
|
353
353
|
props?: Partial<TextMemory>;
|
|
354
354
|
};
|
|
355
|
-
type PixiVNJsonUnknownEdit<T extends ContainerOptions
|
|
355
|
+
type PixiVNJsonUnknownEdit<T extends ContainerOptions<any>> = {
|
|
356
356
|
type: "canvaselement";
|
|
357
357
|
operationType: "edit";
|
|
358
358
|
alias: string;
|
|
@@ -394,7 +394,8 @@ type PixiVNJsonSoundPlay = {
|
|
|
394
394
|
type: "sound";
|
|
395
395
|
operationType: "play";
|
|
396
396
|
alias: string;
|
|
397
|
-
|
|
397
|
+
url?: string;
|
|
398
|
+
props?: SoundPlayOptionsWithChannel;
|
|
398
399
|
};
|
|
399
400
|
type PixiVNJsonSoundRemove = {
|
|
400
401
|
type: "sound";
|
|
@@ -402,17 +403,17 @@ type PixiVNJsonSoundRemove = {
|
|
|
402
403
|
alias: string;
|
|
403
404
|
};
|
|
404
405
|
type PixiVNJsonSoundPauseResume = {
|
|
405
|
-
type: "sound";
|
|
406
|
+
type: "sound" | "channel" | "all";
|
|
406
407
|
operationType: "pause" | "resume";
|
|
407
408
|
alias: string;
|
|
408
409
|
};
|
|
409
|
-
type
|
|
410
|
+
type PixiVNJsonSoundEdit = {
|
|
410
411
|
type: "sound";
|
|
411
|
-
operationType: "
|
|
412
|
+
operationType: "edit";
|
|
412
413
|
alias: string;
|
|
413
|
-
|
|
414
|
+
props: Partial<Pick<IMediaInstance, "speed" | "volume" | "muted" | "loop" | "paused">>;
|
|
414
415
|
};
|
|
415
|
-
type PixiVNJsonSound = PixiVNJsonSoundPlay | PixiVNJsonSoundRemove | PixiVNJsonSoundPauseResume |
|
|
416
|
+
type PixiVNJsonSound = PixiVNJsonSoundPlay | PixiVNJsonSoundRemove | PixiVNJsonSoundPauseResume | PixiVNJsonSoundEdit;
|
|
416
417
|
|
|
417
418
|
type PixiVNJsonOperationString = {
|
|
418
419
|
type: "operationtoconvert";
|