skynovel
Version:
webgl novelgame framework
215 lines (186 loc) • 2.2 MB
JavaScript
(function webpackUniversalModuleDefinition(root, factory) {
if(typeof exports === 'object' && typeof module === 'object')
module.exports = factory();
else if(typeof define === 'function' && define.amd)
define([], factory);
else {
var a = factory();
for(var i in a) (typeof exports === 'object' ? exports : root)[i] = a[i];
}
})(window, function() {
return /******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
/******/
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/
/******/ // Check if module is in cache
/******/ if(installedModules[moduleId]) {
/******/ return installedModules[moduleId].exports;
/******/ }
/******/ // Create a new module (and put it into the cache)
/******/ var module = installedModules[moduleId] = {
/******/ i: moduleId,
/******/ l: false,
/******/ exports: {}
/******/ };
/******/
/******/ // Execute the module function
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/
/******/ // Flag the module as loaded
/******/ module.l = true;
/******/
/******/ // Return the exports of the module
/******/ return module.exports;
/******/ }
/******/
/******/
/******/ // expose the modules object (__webpack_modules__)
/******/ __webpack_require__.m = modules;
/******/
/******/ // expose the module cache
/******/ __webpack_require__.c = installedModules;
/******/
/******/ // define getter function for harmony exports
/******/ __webpack_require__.d = function(exports, name, getter) {
/******/ if(!__webpack_require__.o(exports, name)) {
/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
/******/ }
/******/ };
/******/
/******/ // define __esModule on exports
/******/ __webpack_require__.r = function(exports) {
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ }
/******/ Object.defineProperty(exports, '__esModule', { value: true });
/******/ };
/******/
/******/ // create a fake namespace object
/******/ // mode & 1: value is a module id, require it
/******/ // mode & 2: merge all properties of value into the ns
/******/ // mode & 4: return value when already ns object
/******/ // mode & 8|1: behave like require
/******/ __webpack_require__.t = function(value, mode) {
/******/ if(mode & 1) value = __webpack_require__(value);
/******/ if(mode & 8) return value;
/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
/******/ var ns = Object.create(null);
/******/ __webpack_require__.r(ns);
/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
/******/ return ns;
/******/ };
/******/
/******/ // getDefaultExport function for compatibility with non-harmony modules
/******/ __webpack_require__.n = function(module) {
/******/ var getter = module && module.__esModule ?
/******/ function getDefault() { return module['default']; } :
/******/ function getModuleExports() { return module; };
/******/ __webpack_require__.d(getter, 'a', getter);
/******/ return getter;
/******/ };
/******/
/******/ // Object.prototype.hasOwnProperty.call
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
/******/
/******/ // __webpack_public_path__
/******/ __webpack_require__.p = "";
/******/
/******/
/******/ // Load entry module and return exports
/******/ return __webpack_require__(__webpack_require__.s = 0);
/******/ })
/************************************************************************/
/******/ ({
/***/ "./core/src/sn/AnalyzeTagArg.ts":
/*!**************************************!*\
!*** ./core/src/sn/AnalyzeTagArg.ts ***!
\**************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.AnalyzeTagArg = void 0;\nclass AnalyzeTagArg {\n constructor() {\n this.REG_TAGARG = /;.*\\n|(?<key>\\w+)(?:\\s+|;[^\\n]*\\n)*=(?:\\s+|;.*\\n)*(?:(?<val>[^\\s\"'#|;]+)|([\"'#])(?<val2>.*?)\\3)(?:\\|(?:(?<def>[^\\s\"'#;]+)|([\"'#])(?<def2>.*?)\\6))?|(?<literal>[^\\s;]+)/g;\n this.$hPrm = {};\n this.$isKomeParam = false;\n }\n go(args) {\n var _a, _b;\n this.$hPrm = {};\n this.$isKomeParam = false;\n if (!args)\n return;\n let e = null;\n while (e = this.REG_TAGARG.exec(args)) {\n const g = e === null || e === void 0 ? void 0 : e.groups;\n if (!g)\n continue;\n if (g.key)\n this.$hPrm[g.key] = {\n val: (_a = g.val) !== null && _a !== void 0 ? _a : g.val2,\n def: (_b = g.def) !== null && _b !== void 0 ? _b : g.def2\n };\n else if (g.literal) {\n if (g.literal === '*')\n this.$isKomeParam = true;\n else\n this.$hPrm[g.literal] = { val: '1' };\n }\n }\n }\n get hPrm() { return this.$hPrm; }\n get isKomeParam() { return this.$isKomeParam; }\n}\nexports.AnalyzeTagArg = AnalyzeTagArg;\n\n\n//# sourceURL=webpack:///./core/src/sn/AnalyzeTagArg.ts?");
/***/ }),
/***/ "./core/src/sn/Areas.ts":
/*!******************************!*\
!*** ./core/src/sn/Areas.ts ***!
\******************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Areas = void 0;\nclass Areas {\n constructor() {\n this.hAreas = {};\n }\n search(idx) {\n for (const begin in this.hAreas) {\n if (idx < parseInt(begin))\n continue;\n if (idx <= this.hAreas[begin])\n return true;\n }\n return false;\n }\n record(idx) {\n if (this.search(idx))\n return;\n for (const begin in this.hAreas) {\n if (this.hAreas[begin] + 1 === idx) {\n if ((idx + 1) in this.hAreas) {\n this.hAreas[begin] = this.hAreas[idx + 1];\n delete this.hAreas[idx + 1];\n }\n else {\n this.hAreas[begin] = idx;\n }\n return;\n }\n }\n if ((idx + 1) in this.hAreas) {\n this.hAreas[idx] = this.hAreas[idx + 1];\n delete this.hAreas[idx + 1];\n return;\n }\n this.hAreas[idx] = idx;\n }\n erase(idx) {\n if (!this.search(idx))\n return;\n if (idx in this.hAreas) {\n if (this.hAreas[idx] > idx)\n this.hAreas[idx + 1] = this.hAreas[idx];\n delete this.hAreas[idx];\n return;\n }\n for (const begin in this.hAreas) {\n if (idx < parseInt(begin))\n continue;\n if (this.hAreas[begin] < idx)\n continue;\n if (this.hAreas[begin] === idx) {\n this.hAreas[begin] = idx - 1;\n return;\n }\n this.hAreas[idx + 1] = this.hAreas[begin];\n this.hAreas[begin] = idx - 1;\n return;\n }\n }\n get count() { return Object.keys(this.hAreas).length; }\n toString() {\n let ret = '';\n const aBegin = [];\n for (const begin in this.hAreas)\n aBegin.push(parseInt(begin));\n aBegin.sort(function (x, y) { return x - y; });\n for (const v of aBegin) {\n ret += true\n ? ''\n : undefined;\n }\n if (ret !== '')\n ret = ret.slice(1);\n return ret;\n }\n}\nexports.Areas = Areas;\n\n\n//# sourceURL=webpack:///./core/src/sn/Areas.ts?");
/***/ }),
/***/ "./core/src/sn/Button.ts":
/*!*******************************!*\
!*** ./core/src/sn/Button.ts ***!
\*******************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Button = void 0;\nconst pixi_js_1 = __webpack_require__(/*! pixi.js */ \"./node_modules/pixi.js/lib/pixi.es.js\");\nconst CmnLib_1 = __webpack_require__(/*! ./CmnLib */ \"./core/src/sn/CmnLib.ts\");\nconst GrpLayer_1 = __webpack_require__(/*! ./GrpLayer */ \"./core/src/sn/GrpLayer.ts\");\nconst Layer_1 = __webpack_require__(/*! ./Layer */ \"./core/src/sn/Layer.ts\");\nclass Button extends pixi_js_1.Container {\n constructor(main, evtMng, hArg) {\n var _a;\n super();\n this.main = main;\n this.evtMng = evtMng;\n this.isStop = false;\n const enabled = CmnLib_1.argChk_Boolean(hArg, 'enabled', true);\n if (enabled)\n this.evtMng.button(hArg, this);\n if ('text' in hArg) {\n const fontSize = CmnLib_1.uint(hArg.height || 30);\n const style = {\n fill: 'black',\n align: 'center',\n fontFamily: Button.fontFamily,\n fontSize: fontSize,\n padding: 5,\n dropShadow: true,\n dropShadowAlpha: 0.7,\n dropShadowColor: '#ffffff',\n dropShadowBlur: 7,\n dropShadowDistance: 0,\n };\n if (hArg.style)\n Button.s2hStyle(style, hArg.style);\n const txt = new pixi_js_1.Text((_a = hArg.text) !== null && _a !== void 0 ? _a : '', style);\n txt.alpha = CmnLib_1.argChk_Num(hArg, 'alpha', txt.alpha);\n txt.pivot.set(CmnLib_1.argChk_Num(hArg, 'pivot_x', txt.pivot.x), CmnLib_1.argChk_Num(hArg, 'pivot_y', txt.pivot.y));\n txt.rotation = CmnLib_1.argChk_Num(hArg, 'rotation', txt.rotation);\n txt.scale.set(CmnLib_1.argChk_Num(hArg, 'scale_x', txt.scale.x), CmnLib_1.argChk_Num(hArg, 'scale_y', txt.scale.y));\n txt.width = CmnLib_1.uint(hArg.width || 100);\n txt.height = fontSize;\n txt.x = CmnLib_1.uint(hArg.left || 0);\n txt.y = CmnLib_1.uint(hArg.top || 0);\n if (hArg.b_pic) {\n const cnt = new pixi_js_1.Container();\n this.addChild(cnt);\n this.isStop = GrpLayer_1.GrpLayer.csv2Sprites(hArg.b_pic, cnt, sp => {\n sp.alpha = txt.alpha;\n sp.rotation = txt.rotation;\n sp.x = txt.x;\n sp.y = txt.y;\n sp.pivot.set((sp.width - txt.width) / 2, (sp.height - txt.height) / 2);\n }, isStop => {\n Layer_1.Layer.setBlendmode(this, hArg);\n if (isStop)\n this.main.resume();\n });\n }\n this.addChild(txt);\n if (!hArg.b_pic)\n Layer_1.Layer.setBlendmode(this, hArg);\n if (!enabled)\n return;\n const normal = () => txt.style = { ...txt.style, ...style };\n const style_hover = { ...style };\n if (hArg.style_hover)\n Button.s2hStyle(style_hover, hArg.style_hover);\n else\n style_hover.fill = 'white';\n const hover = () => txt.style = { ...txt.style, ...style_hover };\n const style_clicked = { ...style_hover };\n if (hArg.style_clicked)\n Button.s2hStyle(style_clicked, hArg.style_clicked);\n else\n style_clicked.dropShadow = false;\n const clicked = () => txt.style = { ...txt.style, ...style_clicked };\n this.on('pointerover', hover);\n this.on('pointerout', normal);\n this.on('pointerdown', clicked);\n this.on('pointerup', CmnLib_1.CmnLib.isMobile ? normal : hover);\n return;\n }\n if (!hArg.pic)\n throw 'textまたはpic属性は必須です';\n this.isStop = GrpLayer_1.GrpLayer.csv2Sprites(hArg.pic, this, sp => {\n sp.alpha = CmnLib_1.argChk_Num(hArg, 'alpha', sp.alpha);\n sp.pivot.set(CmnLib_1.argChk_Num(hArg, 'pivot_x', sp.pivot.x), CmnLib_1.argChk_Num(hArg, 'pivot_y', sp.pivot.y));\n sp.rotation = CmnLib_1.argChk_Num(hArg, 'rotation', sp.rotation);\n sp.scale.set(CmnLib_1.argChk_Num(hArg, 'scale_x', sp.scale.x), CmnLib_1.argChk_Num(hArg, 'scale_y', sp.scale.y));\n sp.x = CmnLib_1.uint(hArg.left || 0);\n sp.y = CmnLib_1.uint(hArg.top || 0);\n const w3 = sp.width / 3;\n const h = sp.height;\n const tx = sp.texture.baseTexture;\n const txNormal = new pixi_js_1.Texture(tx, new pixi_js_1.Rectangle(0, 0, w3, h));\n const txClicked = new pixi_js_1.Texture(tx, new pixi_js_1.Rectangle(w3, 0, w3, h));\n const txHover = new pixi_js_1.Texture(tx, new pixi_js_1.Rectangle(w3 * 2, 0, w3, h));\n const normal = () => sp.texture = txNormal;\n const hover = () => sp.texture = txHover;\n const clicked = () => sp.texture = txClicked;\n this.on('pointerover', hover);\n this.on('pointerout', normal);\n this.on('pointerdown', clicked);\n this.on('pointerup', CmnLib_1.CmnLib.isMobile ? normal : hover);\n normal();\n }, isStop => { if (isStop)\n this.main.resume(); });\n }\n static s2hStyle(hStyle, style) {\n Button.cln = document.createElement('span');\n const s = Button.cln.style;\n s.cssText = style;\n const len = s.length;\n for (let i = 0; i < len; ++i) {\n const nm = s[i];\n hStyle[nm] = s[nm];\n }\n }\n}\nexports.Button = Button;\nButton.fontFamily = \"'Hiragino Sans', 'Hiragino Kaku Gothic ProN', '游ゴシック Medium', meiryo, sans-serif\";\n\n\n//# sourceURL=webpack:///./core/src/sn/Button.ts?");
/***/ }),
/***/ "./core/src/sn/CallStack.ts":
/*!**********************************!*\
!*** ./core/src/sn/CallStack.ts ***!
\**********************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.CallStack = void 0;\nclass CallStack {\n constructor($fn = '', $idx = 0, $hArg = null) {\n this.$fn = $fn;\n this.$idx = $idx;\n this.$hArg = $hArg;\n this.toString = () => `[fn:${this.$fn}, idx:${this.$idx}, hArg:${this.$hArg}]`;\n }\n get fn() { return this.$fn; }\n get idx() { return this.$idx; }\n get csArg() { return this.$hArg; }\n}\nexports.CallStack = CallStack;\n\n\n//# sourceURL=webpack:///./core/src/sn/CallStack.ts?");
/***/ }),
/***/ "./core/src/sn/CmnLib.ts":
/*!*******************************!*\
!*** ./core/src/sn/CmnLib.ts ***!
\*******************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.CmnLib = exports.getExt = exports.getFn = exports.argChk_Boolean = exports.argChk_Num = exports.cnvTweenArg = exports.hMemberCnt = exports.getDateStr = exports.uint = exports.int = void 0;\nfunction int(o) { return parseInt(String(o), 10); }\nexports.int = int;\nfunction uint(o) {\n const v = parseInt(String(o), 10);\n return v < 0 ? -v : v;\n}\nexports.uint = uint;\nif (!('toInt' in String.prototype)) {\n String.prototype.toInt = function () { return int(this); };\n}\nif (!('toUint' in String.prototype)) {\n String.prototype.toUint = function () {\n const v = int(this);\n return v < 0 ? -v : v;\n };\n}\nfunction getDateStr(spl_dd = '/', spl_dt = ' ', spl_tt = ':', spl_ms = '') {\n const now = new Date();\n return now.getFullYear()\n + spl_dd + String(100 + now.getMonth() + 1).slice(1, 3)\n + spl_dd + String(100 + now.getDate()).slice(1, 3)\n + spl_dt + String(100 + now.getHours()).slice(1, 3)\n + spl_tt + String(100 + now.getMinutes()).slice(1, 3)\n + (spl_ms === '' ? '' : spl_ms + String(now.getMilliseconds()));\n}\nexports.getDateStr = getDateStr;\nexports.hMemberCnt = {\n alpha: 0,\n height: 0,\n rotation: 0,\n scale_x: 0,\n scale_y: 0,\n width: 0,\n x: 0,\n y: 0,\n};\nfunction cnvTweenArg(hArg, lay) {\n const hTo = {};\n for (const nm in exports.hMemberCnt) {\n if (!(nm in hArg))\n continue;\n const v = String(hArg[nm]);\n const a = ((v.charAt(0) === '=') ? v.slice(1) : v).split(',');\n const a0 = hTo[nm] = parseFloat(a[0]);\n if (a.length > 1)\n hTo[nm] += Math.round(Math.random()\n * (parseFloat(a[1]) - a0 + 1));\n if (v.charAt(0) === '=')\n hTo[nm] += parseFloat(lay[nm]);\n }\n return hTo;\n}\nexports.cnvTweenArg = cnvTweenArg;\nfunction argChk_Num(hash, name, def) {\n const v = hash[name];\n if (!(name in hash)) {\n if (isNaN(def))\n throw `[${hash.タグ名}]属性 ${name} は必須です`;\n hash[name] = def;\n return def;\n }\n const n = (String(v).slice(0, 2) === '0x')\n ? parseInt(v)\n : parseFloat(v);\n if (isNaN(n))\n throw `[${hash.タグ名}]属性 ${name} の値【${v}】が数値ではありません`;\n return hash[name] = n;\n}\nexports.argChk_Num = argChk_Num;\nfunction argChk_Boolean(hash, name, def) {\n if (!(name in hash))\n return hash[name] = def;\n const v = hash[name];\n if (v === null)\n return false;\n const v2 = String(v);\n return hash[name] = (v2 === 'false') ? false : Boolean(v2);\n}\nexports.argChk_Boolean = argChk_Boolean;\nconst m_path = __webpack_require__(/*! path */ \"./node_modules/path-browserify/index.js\");\nfunction getFn(path) { return m_path.basename(path, m_path.extname(path)); }\nexports.getFn = getFn;\nfunction getExt(path) { return m_path.extname(path).slice(1); }\nexports.getExt = getExt;\nconst platform = __webpack_require__(/*! platform */ \"./node_modules/platform/platform.js\");\nclass CmnLib {\n static cvsResize(cvs) {\n var _a;\n const bk_cw = CmnLib.cvsWidth;\n const bk_ch = CmnLib.cvsHeight;\n let wiw = window.innerWidth;\n let wih = window.innerHeight;\n const wi = window;\n const lp = screen.orientation\n ? screen.orientation.type.charAt(0)\n : (((_a = wi.orientation) !== null && _a !== void 0 ? _a : 90) % 180 === 0) ? 'p' : 'l';\n if (CmnLib.isMobile &&\n ((lp === 'p' && wiw > wih) || (lp === 'l' && wiw < wih)))\n [wiw, wih] = [wih, wiw];\n if (argChk_Boolean(CmnLib.hDip, 'expanding', true) ||\n CmnLib.stageW > wiw ||\n CmnLib.stageH > wih) {\n if (CmnLib.stageW / CmnLib.stageH <= wiw / wih) {\n CmnLib.cvsHeight = wih;\n CmnLib.cvsWidth = CmnLib.stageW / CmnLib.stageH * wih;\n }\n else {\n CmnLib.cvsWidth = wiw;\n CmnLib.cvsHeight = CmnLib.stageH / CmnLib.stageW * wiw;\n }\n CmnLib.cvsScale = CmnLib.cvsWidth / CmnLib.stageW;\n const cr = cvs.getBoundingClientRect();\n CmnLib.ofsPadLeft_Dom2PIXI = (CmnLib.isMobile\n ? (window.innerWidth - CmnLib.cvsWidth) / 2\n : cr.left)\n * (1 - CmnLib.cvsScale);\n CmnLib.ofsPadTop_Dom2PIXI = (CmnLib.isMobile\n ? (window.innerHeight - CmnLib.cvsHeight) / 2\n : cr.top)\n * (1 - CmnLib.cvsScale);\n }\n else {\n CmnLib.cvsWidth = CmnLib.stageW;\n CmnLib.cvsHeight = CmnLib.stageH;\n CmnLib.cvsScale = 1;\n CmnLib.ofsPadLeft_Dom2PIXI = 0;\n CmnLib.ofsPadTop_Dom2PIXI = 0;\n }\n if (cvs.parentElement) {\n const ps = cvs.parentElement.style;\n ps.position = 'relative';\n const s = cvs.style;\n ps.width = s.width = `${CmnLib.cvsWidth}px`;\n ps.height = s.height = `${CmnLib.cvsHeight}px`;\n }\n return bk_cw !== CmnLib.cvsWidth || bk_ch !== CmnLib.cvsHeight;\n }\n}\nexports.CmnLib = CmnLib;\nCmnLib.stageW = 0;\nCmnLib.stageH = 0;\nCmnLib.ofsPadLeft_Dom2PIXI = 0;\nCmnLib.ofsPadTop_Dom2PIXI = 0;\nCmnLib.cvsWidth = 0;\nCmnLib.cvsHeight = 0;\nCmnLib.cvsScale = 1;\nCmnLib.debugLog = false;\nCmnLib.platform = { ...platform };\nCmnLib.isSafari = platform.name === 'Safari';\nCmnLib.isFirefox = platform.name === 'Firefox';\nCmnLib.isMac = new RegExp('OS X').test(CmnLib.platform.os.family);\nCmnLib.isMobile = !new RegExp('(Windows|OS X)').test(CmnLib.platform.os.family);\nCmnLib.hDip = {};\nCmnLib.isRetina = false;\nCmnLib.isDarkMode = false;\nCmnLib.retinaRate = 1;\nCmnLib.SN_ID = 'skynovel';\n\n\n//# sourceURL=webpack:///./core/src/sn/CmnLib.ts?");
/***/ }),
/***/ "./core/src/sn/CmnTween.ts":
/*!*********************************!*\
!*** ./core/src/sn/CmnTween.ts ***!
\*********************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.CmnTween = void 0;\nconst Tween = __webpack_require__(/*! @tweenjs/tween.js */ \"./node_modules/@tweenjs/tween.js/dist/tween.esm.js\").default;\nclass CmnTween {\n static ease(nm) {\n if (!nm)\n return k => Tween.Easing.Linear.None(k);\n if (!(nm in CmnTween.hEase))\n throw '異常なease指定です';\n return CmnTween.hEase[nm];\n }\n}\nexports.CmnTween = CmnTween;\nCmnTween.hEase = {\n 'Back.In': k => Tween.Easing.Back.In(k),\n 'Back.InOut': k => Tween.Easing.Back.InOut(k),\n 'Back.Out': k => Tween.Easing.Back.Out(k),\n 'Bounce.In': k => Tween.Easing.Bounce.In(k),\n 'Bounce.InOut': k => Tween.Easing.Bounce.InOut(k),\n 'Bounce.Out': k => Tween.Easing.Bounce.Out(k),\n 'Circular.In': k => Tween.Easing.Circular.In(k),\n 'Circular.InOut': k => Tween.Easing.Circular.InOut(k),\n 'Circular.Out': k => Tween.Easing.Circular.Out(k),\n 'Cubic.In': k => Tween.Easing.Cubic.In(k),\n 'Cubic.InOut': k => Tween.Easing.Cubic.InOut(k),\n 'Cubic.Out': k => Tween.Easing.Cubic.Out(k),\n 'Elastic.In': k => Tween.Easing.Elastic.In(k),\n 'Elastic.InOut': k => Tween.Easing.Elastic.InOut(k),\n 'Elastic.Out': k => Tween.Easing.Elastic.Out(k),\n 'Exponential.In': k => Tween.Easing.Exponential.In(k),\n 'Exponential.InOut': k => Tween.Easing.Exponential.InOut(k),\n 'Exponential.Out': k => Tween.Easing.Exponential.Out(k),\n 'Linear.None': k => Tween.Easing.Linear.None(k),\n 'Quadratic.In': k => Tween.Easing.Quadratic.In(k),\n 'Quadratic.InOut': k => Tween.Easing.Quadratic.InOut(k),\n 'Quadratic.Out': k => Tween.Easing.Quadratic.Out(k),\n 'Quartic.In': k => Tween.Easing.Quartic.In(k),\n 'Quartic.InOut': k => Tween.Easing.Quartic.InOut(k),\n 'Quartic.Out': k => Tween.Easing.Quartic.Out(k),\n 'Quintic.In': k => Tween.Easing.Quintic.In(k),\n 'Quintic.InOut': k => Tween.Easing.Quintic.InOut(k),\n 'Quintic.Out': k => Tween.Easing.Quintic.Out(k),\n 'Sinusoidal.In': k => Tween.Easing.Sinusoidal.In(k),\n 'Sinusoidal.InOut': k => Tween.Easing.Sinusoidal.InOut(k),\n 'Sinusoidal.Out': k => Tween.Easing.Sinusoidal.Out(k),\n};\n\n\n//# sourceURL=webpack:///./core/src/sn/CmnTween.ts?");
/***/ }),
/***/ "./core/src/sn/Config.ts":
/*!*******************************!*\
!*** ./core/src/sn/Config.ts ***!
\*******************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Config = void 0;\nconst CmnLib_1 = __webpack_require__(/*! ./CmnLib */ \"./core/src/sn/CmnLib.ts\");\nclass Config {\n constructor(sys, fncLoaded, oCfg4tst) {\n this.sys = sys;\n this.oCfg = {\n save_ns: '',\n coder: { len: 0x360 },\n window: {\n width: 300,\n height: 300,\n },\n book: {\n title: '',\n creator: '',\n cre_url: '',\n publisher: '',\n pub_url: '',\n detail: '',\n version: '1.0',\n },\n log: { max_len: 1024 },\n init: {\n bg_color: 0x000000,\n tagch_msecwait: 10,\n auto_msecpagewait: 3500,\n escape: '',\n },\n debug: {\n devtool: false,\n token: false,\n tag: false,\n putCh: false,\n debugLog: false,\n baseTx: false,\n masume: false,\n variable: false,\n },\n };\n this.userFnTail = '';\n this.hPathFn2Exts = {};\n this.getJsonSearchPath = () => JSON.stringify(this.hPathFn2Exts);\n this.$existsBreakline = false;\n this.$existsBreakpage = false;\n this.regPath = /([^\\/\\s]+)\\.([^\\d]\\w+)/;\n const load = (oCfg) => {\n var _a, _b, _c, _d, _e, _f, _g, _h, _j;\n this.oCfg.save_ns = (_a = oCfg === null || oCfg === void 0 ? void 0 : oCfg.save_ns) !== null && _a !== void 0 ? _a : this.oCfg.save_ns;\n this.oCfg.coder = (_b = oCfg === null || oCfg === void 0 ? void 0 : oCfg.coder) !== null && _b !== void 0 ? _b : this.oCfg.coder;\n CmnLib_1.CmnLib.stageW = this.oCfg.window.width = Number((_d = (_c = oCfg === null || oCfg === void 0 ? void 0 : oCfg.window) === null || _c === void 0 ? void 0 : _c.width) !== null && _d !== void 0 ? _d : this.oCfg.window.width);\n CmnLib_1.CmnLib.stageH = this.oCfg.window.height = Number((_f = (_e = oCfg === null || oCfg === void 0 ? void 0 : oCfg.window) === null || _e === void 0 ? void 0 : _e.height) !== null && _f !== void 0 ? _f : this.oCfg.window.height);\n this.oCfg.book = { ...this.oCfg.book, ...oCfg.book };\n this.oCfg.log.max_len = (_j = (_h = (_g = oCfg.log) === null || _g === void 0 ? void 0 : _g.max_len) === null || _h === void 0 ? void 0 : _h.max_len) !== null && _j !== void 0 ? _j : this.oCfg.log.max_len;\n this.oCfg.init = { ...this.oCfg.init, ...oCfg.init };\n if ('init' in oCfg) {\n for (const n in this.oCfg.init) {\n const v = String(this.oCfg.init[n]);\n if (v.charAt(0) === '#')\n this.oCfg.init[n] = parseInt(v.slice(1), 16);\n }\n }\n this.oCfg.debug = { ...this.oCfg.debug, ...oCfg.debug };\n CmnLib_1.CmnLib.debugLog = this.oCfg.debug.debugLog;\n sys.loadPathAndVal(this.hPathFn2Exts, async () => {\n this.$existsBreakline = this.matchPath('^breakline$', Config.EXT_SPRITE).length > 0;\n this.$existsBreakpage = this.matchPath('^breakpage$', Config.EXT_SPRITE).length > 0;\n if (this.sys.crypto)\n for (const nm in this.hPathFn2Exts) {\n const o = this.hPathFn2Exts[nm];\n for (const ext in o) {\n if (ext.slice(-10) !== ':RIPEMD160')\n continue;\n const hp = o[ext].slice(o[ext].lastIndexOf('/') + 1);\n const fn = o[ext.slice(0, -10)];\n const res = await sys.fetch(fn);\n const s = await res.text();\n const hf = sys.hash(s);\n if (hp !== hf)\n throw `ファイル改竄エラーです fn:${fn}`;\n }\n }\n fncLoaded();\n }, this);\n };\n if (oCfg4tst) {\n load(oCfg4tst);\n return;\n }\n const fn = sys.cur + 'prj.json';\n sys.fetch(fn)\n .then(res => res.text())\n .then(d => sys.pre('json', d))\n .then(s => JSON.parse(s))\n .then(load)\n .catch(e => console.error(`load err fn:prj.json e:%o`, e));\n }\n get existsBreakline() { return this.$existsBreakline; }\n get existsBreakpage() { return this.$existsBreakpage; }\n getNs() { return `skynovel.${this.oCfg.save_ns} - `; }\n searchPath(path, extptn = '') {\n if (!path)\n throw '[searchPath] fnが空です';\n if (path.slice(0, 7) === 'http://')\n return path;\n if (path.slice(0, 11) === 'downloads:/') {\n return this.sys.path_downloads + path.slice(11);\n }\n if (path.slice(0, 10) === 'userdata:/') {\n return this.sys.path_userdata + path.slice(10);\n }\n const a = path.match(this.regPath);\n let fn = a ? a[1] : path;\n const ext = a ? a[2] : '';\n if (this.userFnTail) {\n const utn = fn + '@@' + this.userFnTail;\n if (utn in this.hPathFn2Exts) {\n if (extptn === '')\n fn = utn;\n else\n for (let e3 in this.hPathFn2Exts[utn]) {\n if (`|${extptn}|`.indexOf(`|${e3}|`) === -1)\n continue;\n fn = utn;\n break;\n }\n }\n }\n const h_exts = this.hPathFn2Exts[fn];\n if (!h_exts)\n throw `サーチパスに存在しないファイル【${path}】です`;\n let ret = '';\n if (!ext) {\n const hcnt = CmnLib_1.int(h_exts[':cnt']);\n if (extptn === '') {\n if (hcnt > 1)\n throw `指定ファイル【${path}】が複数マッチします。サーチ対象拡張子群【${extptn}】で絞り込むか、ファイル名を個別にして下さい。`;\n return path;\n }\n const search_exts = `|${extptn}|`;\n if (hcnt > 1) {\n let cnt = 0;\n for (const e2 in h_exts) {\n if (search_exts.indexOf(`|${e2}|`) === -1)\n continue;\n if (++cnt > 1)\n throw `指定ファイル【${path}】が複数マッチします。サーチ対象拡張子群【${extptn}】で絞り込むか、ファイル名を個別にして下さい。`;\n }\n }\n for (let e in h_exts) {\n if (search_exts.indexOf(`|${e}|`) === -1)\n continue;\n return h_exts[e];\n }\n throw `サーチ対象拡張子群【${extptn}】にマッチするファイルがサーチパスに存在しません。探索ファイル名=【${path}】`;\n }\n if (extptn !== '') {\n const search_exts2 = `|${extptn}|`;\n if (search_exts2.indexOf(`|${ext}|`) === -1) {\n throw `指定ファイルの拡張子【${ext}】は、サーチ対象拡張子群【${extptn}】にマッチしません。探索ファイル名=【${path}】`;\n }\n }\n ret = h_exts[ext];\n if (!ret)\n throw `サーチパスに存在しない拡張子【${ext}】です。探索ファイル名=【${path}】、サーチ対象拡張子群【${extptn}】`;\n return ret;\n }\n matchPath(fnptn, extptn = '') {\n const aRet = [];\n const regPtn = new RegExp(fnptn);\n const regExt = new RegExp(extptn);\n for (let fn in this.hPathFn2Exts) {\n if (fn.search(regPtn) === -1)\n continue;\n const h_exts = this.hPathFn2Exts[fn];\n if (extptn === '') {\n aRet.push(h_exts);\n continue;\n }\n const o = {};\n let isa = false;\n for (const ext in h_exts) {\n if (ext.search(regExt) === -1)\n continue;\n o[ext] = h_exts[ext];\n isa = true;\n }\n if (isa)\n aRet.push(o);\n }\n return aRet;\n }\n}\nexports.Config = Config;\nConfig.EXT_SPRITE = 'png|jpg|jpeg|json|svg|webp|mp4|webm';\nConfig.EXT_SCRIPT = 'sn';\nConfig.EXT_FONT = 'woff2|otf|ttf';\nConfig.EXT_SOUND = 'mp3|m4a|ogg|aac|flac|wav';\nConfig.EXT_HTML = 'htm|html';\n\n\n//# sourceURL=webpack:///./core/src/sn/Config.ts?");
/***/ }),
/***/ "./core/src/sn/DebugMng.ts":
/*!*********************************!*\
!*** ./core/src/sn/DebugMng.ts ***!
\*********************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.DebugMng = void 0;\nconst CmnLib_1 = __webpack_require__(/*! ./CmnLib */ \"./core/src/sn/CmnLib.ts\");\nclass DebugMng {\n constructor(sys, hTag, scrItr) {\n this.sys = sys;\n this.first = true;\n DebugMng.scrItr = scrItr;\n DebugMng.hTag = hTag;\n DebugMng.title = hTag.title;\n DebugMng.myTrace = DebugMng.fncMyTrace;\n hTag.log = o => this.log(o);\n hTag.trace = o => this.trace(o);\n DebugMng.spnDbg = document.createElement('span');\n DebugMng.spnDbg.hidden = true;\n DebugMng.spnDbg.textContent = '';\n DebugMng.spnDbg.style.cssText =\n `\tz-index: ${Number.MAX_SAFE_INTEGER};\n\t\t\tposition: absolute; left: 0; top: 0;\n\t\t\tcolor: black;\n\t\t\tbackground-color: rgba(255, 255, 255, 0.7);`;\n document.body.appendChild(DebugMng.spnDbg);\n }\n destroy() {\n DebugMng.title = () => false;\n document.body.removeChild(DebugMng.spnDbg);\n }\n log(hArg) {\n let dat = '';\n if (this.first) {\n this.first = false;\n dat = `== ${CmnLib_1.CmnLib.platform.description} ==\\n`;\n }\n this.sys.appendFile(this.sys.path_downloads + 'log.txt', `${dat}--- ${CmnLib_1.getDateStr('-', '_', '')} [fn:${DebugMng.scrItr.scriptFn} line:${DebugMng.scrItr.lineNum}] prj:${this.sys.cur}\\n${hArg.text || `(text is ${hArg.text})`}\\n`, err => { if (err)\n console.log(err); });\n return false;\n }\n trace(hArg) {\n DebugMng.myTrace(hArg.text || `(text is ${hArg.text})`, 'I');\n return false;\n }\n static fncMyTrace(txt, lvl = 'E') {\n let mes = `{${lvl}} `;\n if (DebugMng.scrItr && DebugMng.scrItr.lineNum > 0)\n mes +=\n `(fn:${DebugMng.scrItr.scriptFn} line:${DebugMng.scrItr.lineNum}) `;\n mes += txt;\n DebugMng.dspDbg(mes, lvl);\n let sty = '';\n switch (lvl) {\n case 'D':\n sty = `color:#${CmnLib_1.CmnLib.isDarkMode ? '49F' : '05A'};`;\n break;\n case 'W':\n sty = 'color:#F80;';\n break;\n case 'F':\n sty = 'color:#B00;';\n break;\n case 'ET':\n case 'E':\n DebugMng.title({ text: txt });\n this.hTag.dump_lay({});\n this.hTag.dump_val({});\n DebugMng.scrItr.dumpErrForeLine();\n this.hTag.dump_stack({});\n if (lvl === 'ET')\n throw mes;\n console.error('%c' + mes, 'color:#F30;');\n return;\n default:\n sty = '';\n mes = ' ' + mes;\n }\n console.info('%c' + mes, sty);\n }\n static dspDbg(mes, lvl) {\n let sty = '';\n switch (lvl) {\n case 'D':\n sty = 'color:#05A;';\n break;\n case 'W':\n sty = 'color:#F80;';\n break;\n case 'F':\n sty = 'color:#B00;';\n break;\n case 'ET':\n case 'E':\n sty = 'color:#F30;';\n break;\n default: sty = '';\n }\n DebugMng.spnDbg.innerHTML += `<span style='${sty}'>${mes}</span><br/>`;\n DebugMng.spnDbg.hidden = false;\n }\n ;\n}\nexports.DebugMng = DebugMng;\nDebugMng.myTrace = (txt, lvl = 'E') => {\n let mes = `{${lvl}} ` + txt;\n let sty = '';\n switch (lvl) {\n case 'D':\n sty = `color:#${CmnLib_1.CmnLib.isDarkMode ? '49F' : '05A'};`;\n break;\n case 'W':\n sty = 'color:#FF8800;';\n break;\n case 'F':\n sty = 'color:#BB0000;';\n break;\n case 'ET': throw mes;\n case 'E':\n console.error('%c' + mes, 'color:#FF3300;');\n return;\n default:\n sty = 'color:black;';\n mes = ' ' + mes;\n }\n console.info('%c' + mes, sty);\n};\n\n\n//# sourceURL=webpack:///./core/src/sn/DebugMng.ts?");
/***/ }),
/***/ "./core/src/sn/EventListenerCtn.ts":
/*!*****************************************!*\
!*** ./core/src/sn/EventListenerCtn.ts ***!
\*****************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.EventListenerCtn = void 0;\nconst pixi_js_1 = __webpack_require__(/*! pixi.js */ \"./node_modules/pixi.js/lib/pixi.es.js\");\nclass EventListenerCtn {\n constructor() {\n this.vctEvt = [];\n }\n add(ed, type, fnc, ctx = {}) {\n if (ed instanceof pixi_js_1.BaseTexture) {\n switch (type) {\n case 'loaded':\n case 'update':\n case 'error':\n case 'dispose':\n ed.on(type, fnc, ctx);\n this.vctEvt.push(() => ed.off(type, fnc, ctx));\n break;\n }\n return;\n }\n if (ed instanceof pixi_js_1.utils.EventEmitter) {\n ed.on(type, fnc, ctx);\n this.vctEvt.push(() => ed.off(type, fnc, ctx));\n return;\n }\n ed.addEventListener(type, fnc, ctx);\n this.vctEvt.push(() => { var _a; return ed.removeEventListener(type, fnc, { capture: (_a = ctx.capture) !== null && _a !== void 0 ? _a : false }); });\n }\n clear() {\n for (const fnc of this.vctEvt)\n fnc();\n this.vctEvt = [];\n }\n}\nexports.EventListenerCtn = EventListenerCtn;\n\n\n//# sourceURL=webpack:///./core/src/sn/EventListenerCtn.ts?");
/***/ }),
/***/ "./core/src/sn/EventMng.ts":
/*!*********************************!*\
!*** ./core/src/sn/EventMng.ts ***!
\*********************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.EventMng = void 0;\nconst CmnLib_1 = __webpack_require__(/*! ./CmnLib */ \"./core/src/sn/CmnLib.ts\");\nconst TxtLayer_1 = __webpack_require__(/*! ./TxtLayer */ \"./core/src/sn/TxtLayer.ts\");\nconst EventListenerCtn_1 = __webpack_require__(/*! ./EventListenerCtn */ \"./core/src/sn/EventListenerCtn.ts\");\nconst Tween = __webpack_require__(/*! @tweenjs/tween.js */ \"./node_modules/@tweenjs/tween.js/dist/tween.esm.js\").default;\nconst Config_1 = __webpack_require__(/*! ./Config */ \"./core/src/sn/Config.ts\");\nconst Hammer = __webpack_require__(/*! hammerjs */ \"./node_modules/hammerjs/hammer.js\");\nclass EventMng {\n constructor(cfg, hTag, appPixi, main, layMng, val, sndMng, scrItr, sys) {\n this.cfg = cfg;\n this.hTag = hTag;\n this.appPixi = appPixi;\n this.main = main;\n this.layMng = layMng;\n this.val = val;\n this.sndMng = sndMng;\n this.scrItr = scrItr;\n this.sys = sys;\n this.elc = new EventListenerCtn_1.EventListenerCtn;\n this.hHamEv = {\n tap2: null,\n press: null,\n swipeleft: null,\n swiperight: null,\n swipeup: null,\n swipedown: null,\n };\n this.resvFlameEvent4Wheel = (_win) => { };\n this.wheeling = false;\n this.extend_wheel = false;\n this.hLocalEvt2Fnc = {};\n this.hGlobalEvt2Fnc = {};\n this.isWait = false;\n this.isBreak = false;\n this.waitCustomEvent4Wheel = (_elc, _fnc) => { };\n this.goTxt = () => this.layMng.goTxt();\n this.fncCancelSkip = () => { };\n this.hDownKeys = {\n 'Alt': 0,\n 'Meta': 0,\n 'Control': 0,\n 'ArrowDown': 0,\n 'End': 0,\n 'Enter': 0,\n 'Escape': 0,\n ' ': 0,\n 'GoBack': 0,\n };\n hTag.clear_event = o => this.clear_event(o);\n hTag.event = o => this.event(o);\n hTag.l = o => this.l(o);\n hTag.p = o => this.p(o);\n hTag.s = () => { this.stdWait(() => { }, false); return true; };\n hTag.set_cancel_skip = () => this.set_cancel_skip();\n hTag.wait = o => this.wait(o);\n hTag.waitclick = () => { this.stdWait(() => main.resume()); return true; };\n sndMng.setEvtMng(this);\n scrItr.setOtherObj(this, layMng);\n TxtLayer_1.TxtLayer.setEvtMng(main, this);\n layMng.setEvtMng(this);\n sys.setFire((KEY, e) => this.fire(KEY, e));\n sys.addHook((type, o) => this.procHook(type, o));\n this.ham = new Hammer(appPixi.view, { recognizers: [\n [Hammer.Press],\n [Hammer.Swipe, { direction: Hammer.DIRECTION_ALL }],\n ] });\n this.hHamEv.tap2 = null;\n for (const key in this.hHamEv) {\n const fnc = this.hHamEv[key] = (e) => {\n val.defTmp('sn.eventArg.type', e.type);\n val.defTmp('sn.eventArg.pointers', e.pointers);\n this.fire(e.type, e);\n };\n this.ham.on(key, fnc);\n }\n appPixi.stage.interactive = true;\n if (CmnLib_1.CmnLib.isMobile)\n appPixi.stage.on('pointerdown', (e) => this.fire('click', e));\n else\n this.elc.add(appPixi.stage, 'pointerdown', e => {\n switch (e.data.button) {\n case 0:\n this.fire('click', e);\n break;\n case 1:\n this.fire('middleclick', e);\n break;\n }\n });\n this.elc.add(window, 'keydown', e => this.ev_keydown(e));\n this.elc.add(appPixi.view, 'contextmenu', e => this.ev_contextmenu(e));\n if ('WheelEvent' in window) {\n this.elc.add(appPixi.view, 'wheel', e => this.ev_wheel(e), { passive: true });\n this.resvFlameEvent4Wheel = (win) => win.addEventListener('wheel', e => this.ev_wheel(e), { passive: true });\n this.waitCustomEvent4Wheel = (elc, fnc) => elc.add(this.appPixi.view, 'wheel', (e) => {\n if (e['isComposing'])\n return;\n if (e.deltaY <= 0)\n return;\n e.stopPropagation();\n fnc();\n });\n }\n this.elc.add(window, 'gamepadconnected', (e) => {\n if (CmnLib_1.CmnLib.debugLog)\n console.log('👺 Gamepad connected at index %d: %s. %d buttons, %d axes.', e['gamepad'].index, e['gamepad'].id, e['gamepad'].buttons.length, e['gamepad'].axes.length);\n const key = e.type;\n this.fire(key, e);\n });\n this.elc.add(window, 'gamepaddisconnected', (e) => {\n if (CmnLib_1.CmnLib.debugLog)\n console.log('👺 Gamepad disconnected from index %d: %s', e['gamepad'].index, e['gamepad'].id);\n const key = e.type;\n this.fire(key, e);\n });\n this.elc.add(window, 'keyup', (e) => {\n if (e['isComposing'])\n return;\n if (e.key in this.hDownKeys)\n this.hDownKeys[e.key] = 0;\n });\n val.defTmp('const.sn.key.alternate', () => (this.hDownKeys['Alt'] > 0));\n val.defTmp('const.sn.key.command', () => (this.hDownKeys['Meta'] > 0));\n val.defTmp('const.sn.key.control', () => (this.hDownKeys['Control'] > 0));\n val.defTmp('const.sn.key.end', () => (this.hDownKeys['End'] > 0));\n val.defTmp('const.sn.key.escape', () => (this.hDownKeys['Escape'] > 0));\n val.defTmp('const.sn.key.back', () => (this.hDownKeys['GoBack'] > 0));\n }\n resvFlameEvent(win) {\n win.addEventListener('keydown', e => this.ev_keydown(e));\n win.addEventListener('contextmenu', e => this.ev_contextmenu(e));\n this.resvFlameEvent4Wheel(win);\n }\n ev_keydown(e) {\n if (e['isComposing'])\n return;\n if (e.key in this.hDownKeys)\n this.hDownKeys[e.key] = e.repeat ? 2 : 1;\n const key = (e.altKey ? (e.key === 'Alt' ? '' : 'alt+') : '')\n + (e.ctrlKey ? (e.key === 'Control' ? '' : 'ctrl+') : '')\n + (e.shiftKey ? (e.key === 'Shift' ? '' : 'shift+') : '')\n + e.key;\n this.fire(key, e);\n }\n ev_contextmenu(e) {\n const key = (e.altKey ? (e.key === 'Alt' ? '' : 'alt+') : '')\n + (e.ctrlKey ? (e.key === 'Control' ? '' : 'ctrl+') : '')\n + (e.shiftKey ? (e.key === 'Shift' ? '' : 'shift+') : '')\n + 'rightclick';\n this.fire(key, e);\n e.preventDefault();\n }\n ev_wheel(e) {\n if (e['isComposing'])\n return;\n if (this.wheeling) {\n this.extend_wheel = true;\n return;\n }\n this.wheeling = true;\n this.ev_wheel_waitstop();\n const key = (e.altKey ? 'alt+' : '')\n + (e.ctrlKey ? 'ctrl+' : '')\n + (e.shiftKey ? 'shift+' : '')\n + (e.deltaY > 0 ? 'downwheel' : 'upwheel');\n this.fire(key, e);\n }\n ev_wheel_waitstop() {\n setTimeout(() => {\n if (this.extend_wheel) {\n this.extend_wheel = false;\n this.ev_wheel_waitstop();\n return;\n }\n this.wheeling = false;\n }, 250);\n }\n destroy() {\n this.elc.clear();\n for (const key in this.hHamEv) {\n this.ham.off(key);\n }\n this.ham.destroy();\n }\n fire(KEY, e) {\n var _a, _b;\n if (this.isBreak)\n return;\n const key = KEY.toLowerCase();\n const ke = this.hLocalEvt2Fnc[key]\n || this.hGlobalEvt2Fnc[key];\n if (!ke) {\n if (key.slice(0, 5) === 'swipe') {\n const esw = e;\n window.scrollBy(-((_a = esw.deltaX) !== null && _a !== void 0 ? _a : 0), -((_b = esw.deltaY) !== null && _b !== void 0 ? _b : 0));\n }\n return;\n }\n if ((key.slice(-5) !== 'wheel') && ('preventDefault' in e))\n e.preventDefault();\n e.stopPropagation();\n if (key.slice(0, 4) !== 'dom=' && this.layMng.clickTxtLay())\n return;\n if (!this.isWait)\n return;\n this.isWait = false;\n ke(e);\n }\n popLocalEvts() {\n if (this.isWait)\n return {};\n const ret = this.hLocalEvt2Fnc;\n this.hLocalEvt2Fnc = {};\n return ret;\n }\n pushLocalEvts(h) { this.hLocalEvt2Fnc = h; }\n stdWait(fnc, canskip = true) {\n this.goTxt();\n if (canskip) {\n const fncKey = () => fnc();\n this.hLocalEvt2Fnc['click'] = fncKey;\n this.hLocalEvt2Fnc['enter'] = fncKey;\n this.hLocalEvt2Fnc['arrowdown'] = fncKey;\n this.hLocalEvt2Fnc['wheel.y>0'] = fncKey;\n }\n else {\n delete this.hLocalEvt2Fnc['click'];\n delete this.hLocalEvt2Fnc['enter'];\n delete this.hLocalEvt2Fnc['arrowdown'];\n delete this.hLocalEvt2Fnc['wheel.y>0'];\n }\n this.val.saveKidoku();\n this.fncCancelSkip();\n this.isWait = true;\n }\n procHook(type, _o) {\n switch (type) {\n case 'continue':\n case 'disconnect':\n this.isBreak = false;\n break;\n default: this.isBreak = true;\n }\n }\n button(hArg, em) {\n var _a;\n if (!hArg.fn && !hArg.label)\n this.main.errScript('fnまたはlabelは必須です');\n em.interactive = em.buttonMode = true;\n const key = ((_a = hArg.key) !== null && _a !== void 0 ? _a : ' ').toLowerCase();\n if (!hArg.fn)\n hArg.fn = this.scrItr.scriptFn;\n const glb = CmnLib_1.argChk_Boolean(hArg, 'global', false);\n if (glb)\n this.hGlobalEvt2Fnc[key] = () => this.main.resumeByJumpOrCall(hArg);\n else\n this.hLocalEvt2Fnc[key] = () => this.main.resumeByJumpOrCall(hArg);\n em.on('pointerdown', (e) => this.fire(key, e));\n if (hArg.clickse) {\n this.cfg.searchPath(hArg.clickse, Config_1.Config.EXT_SOUND);\n em.on('pointerdown', () => {\n const o = { fn: hArg.clickse, join: false };\n if (hArg.clicksebuf)\n o.buf = hArg.clicksebuf;\n this.hTag.playse(o);\n });\n