@famibee/skynovel 1.48.6 → 1.48.7
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/app.js +1323 -1326
- package/dist/app.js.map +1 -1
- package/dist/sn/CmnLib.d.ts +1 -0
- package/dist/sn/CmnLib.d.ts.map +1 -1
- package/dist/sn/CmnTween.d.ts.map +1 -1
- package/dist/sn/EventMng.d.ts +1 -0
- package/dist/sn/EventMng.d.ts.map +1 -1
- package/dist/sn/GrpLayer.d.ts +1 -1
- package/dist/sn/GrpLayer.d.ts.map +1 -1
- package/dist/sn/ReadState.d.ts +2 -2
- package/dist/sn/ReadState.d.ts.map +1 -1
- package/dist/sn/ScriptIterator.d.ts.map +1 -1
- package/dist/web.js +400 -403
- package/dist/web.js.map +1 -1
- package/package.json +1 -1
package/dist/web.js
CHANGED
|
@@ -17276,7 +17276,7 @@ extensions.add(
|
|
|
17276
17276
|
);
|
|
17277
17277
|
class EventListenerCtn {
|
|
17278
17278
|
// リソースリーク対策
|
|
17279
|
-
#
|
|
17279
|
+
#t = [];
|
|
17280
17280
|
add(t, e, r, N = {}) {
|
|
17281
17281
|
if (t instanceof BaseTexture) {
|
|
17282
17282
|
switch (e) {
|
|
@@ -17284,24 +17284,24 @@ class EventListenerCtn {
|
|
|
17284
17284
|
case "update":
|
|
17285
17285
|
case "error":
|
|
17286
17286
|
case "dispose":
|
|
17287
|
-
t.on(e, r, N), this.#
|
|
17287
|
+
t.on(e, r, N), this.#t.push(() => t.off(e, r, N));
|
|
17288
17288
|
break;
|
|
17289
17289
|
}
|
|
17290
17290
|
return;
|
|
17291
17291
|
}
|
|
17292
17292
|
if (t instanceof i$1) {
|
|
17293
|
-
t.on(e, r, N), this.#
|
|
17293
|
+
t.on(e, r, N), this.#t.push(() => t.off(e, r, N));
|
|
17294
17294
|
return;
|
|
17295
17295
|
}
|
|
17296
|
-
t.addEventListener(e, r, N), this.#
|
|
17296
|
+
t.addEventListener(e, r, N), this.#t.push(() => t.removeEventListener(e, r, { capture: N.capture ?? !1 }));
|
|
17297
17297
|
}
|
|
17298
17298
|
clear() {
|
|
17299
|
-
for (const t of this.#
|
|
17299
|
+
for (const t of this.#t)
|
|
17300
17300
|
t();
|
|
17301
|
-
this.#
|
|
17301
|
+
this.#t = [];
|
|
17302
17302
|
}
|
|
17303
17303
|
get isEmpty() {
|
|
17304
|
-
return this.#
|
|
17304
|
+
return this.#t.length === 0;
|
|
17305
17305
|
}
|
|
17306
17306
|
}
|
|
17307
17307
|
var SEARCH_PATH_ARG_EXT = /* @__PURE__ */ ((o) => (o.DEFAULT = "", o.SP_GSM = "png|jpg|jpeg|json|svg|webp|mp4|webm", o.SCRIPT = "sn|ssn", o.FONT = "woff2|woff|otf|ttf", o.SOUND = "mp3|m4a|ogg|aac|flac|wav", o.HTML = "htm|html", o.CSS = "css", o.SN = "sn", o.PSD = "psd", o.TST_PNGPNG_ = "png|png_", o.TST_HH = "hh", o.TST_EEE = "eee", o.TST_GGG = "ggg", o.TST_PNGXML = "png|xml", o))(SEARCH_PATH_ARG_EXT || {});
|
|
@@ -17365,11 +17365,11 @@ class ConfigBase {
|
|
|
17365
17365
|
// 4tst public
|
|
17366
17366
|
hPathFn2Exts = {};
|
|
17367
17367
|
async load(t) {
|
|
17368
|
-
if (this.oCfg.save_ns = t?.save_ns ?? this.oCfg.save_ns, this.oCfg.window.width = Number(t?.window?.width ?? this.oCfg.window.width), this.oCfg.window.height = Number(t?.window?.height ?? this.oCfg.window.height), this.oCfg.book = { ...this.oCfg.book, ...t.book }, this.oCfg.log.max_len = t.log?.max_len?.max_len ?? this.oCfg.log.max_len, this.oCfg.init = { ...this.oCfg.init, ...t.init }, this.oCfg.debug = { ...this.oCfg.debug, ...t.debug }, this.oCfg.debuger_token = t.debuger_token, await this.sys.loadPath(this.hPathFn2Exts, this), this.#
|
|
17368
|
+
if (this.oCfg.save_ns = t?.save_ns ?? this.oCfg.save_ns, this.oCfg.window.width = Number(t?.window?.width ?? this.oCfg.window.width), this.oCfg.window.height = Number(t?.window?.height ?? this.oCfg.window.height), this.oCfg.book = { ...this.oCfg.book, ...t.book }, this.oCfg.log.max_len = t.log?.max_len?.max_len ?? this.oCfg.log.max_len, this.oCfg.init = { ...this.oCfg.init, ...t.init }, this.oCfg.debug = { ...this.oCfg.debug, ...t.debug }, this.oCfg.debuger_token = t.debuger_token, await this.sys.loadPath(this.hPathFn2Exts, this), this.#t = this.matchPath(
|
|
17369
17369
|
"^breakline$",
|
|
17370
17370
|
"png|jpg|jpeg|json|svg|webp|mp4|webm"
|
|
17371
17371
|
/* SP_GSM */
|
|
17372
|
-
).length > 0, this.#
|
|
17372
|
+
).length > 0, this.#e = this.matchPath(
|
|
17373
17373
|
"^breakpage$",
|
|
17374
17374
|
"png|jpg|jpeg|json|svg|webp|mp4|webm"
|
|
17375
17375
|
/* SP_GSM */
|
|
@@ -17383,13 +17383,13 @@ class ConfigBase {
|
|
|
17383
17383
|
throw `ファイル改竄エラーです fn:${D}`;
|
|
17384
17384
|
}
|
|
17385
17385
|
}
|
|
17386
|
-
#
|
|
17386
|
+
#t = !1;
|
|
17387
17387
|
get existsBreakline() {
|
|
17388
|
-
return this.#
|
|
17388
|
+
return this.#t;
|
|
17389
17389
|
}
|
|
17390
|
-
#
|
|
17390
|
+
#e = !1;
|
|
17391
17391
|
get existsBreakpage() {
|
|
17392
|
-
return this.#
|
|
17392
|
+
return this.#e;
|
|
17393
17393
|
}
|
|
17394
17394
|
getNs() {
|
|
17395
17395
|
return `skynovel.${this.oCfg.save_ns} - `;
|
|
@@ -17515,16 +17515,16 @@ class Grammar {
|
|
|
17515
17515
|
constructor() {
|
|
17516
17516
|
this.setEscape("");
|
|
17517
17517
|
}
|
|
17518
|
-
#
|
|
17518
|
+
#t;
|
|
17519
17519
|
setEscape(t) {
|
|
17520
17520
|
if (this.#o && t in this.#o)
|
|
17521
17521
|
throw "[エスケープ文字] char【" + t + "】が登録済みの括弧マクロまたは一文字マクロです";
|
|
17522
|
-
this.#
|
|
17522
|
+
this.#t = new RegExp(
|
|
17523
17523
|
(t ? `\\${t}\\S|` : "") + // エスケープシーケンス
|
|
17524
17524
|
`\\n+|\\t+|\\[let_ml\\s+[^\\]]+\\].+?(?=\\[endlet_ml[\\]\\s])|\\[(?:(?=([^"'#;\\]]+))\\1|(["'#]).*?\\2|;[^\\n]*)*?]|;[^\\n]*|&[^&\\n]+&|&&?[^&;\\n\\t]+|^\\*[^\\s\\[&;\\\\]+|[^\\n\\t\\[;${t ? `\\${t}` : ""}]+`,
|
|
17525
17525
|
// 本文
|
|
17526
17526
|
"gs"
|
|
17527
|
-
), this.#
|
|
17527
|
+
), this.#e = new RegExp(`[\\w\\s;[\\]*=&|《》${t ? `\\${t}` : ""}]`), this.#h = new RegExp(`[\\n\\t;\\[*&${t ? `\\${t}` : ""}]`);
|
|
17528
17528
|
}
|
|
17529
17529
|
// 括弧マクロの定義
|
|
17530
17530
|
bracket2macro(t, e, r, N) {
|
|
@@ -17546,9 +17546,9 @@ class Grammar {
|
|
|
17546
17546
|
throw "[bracket2macro] text【" + B + "】が登録済みの括弧マクロまたは一文字マクロです";
|
|
17547
17547
|
if ($ in this.#o)
|
|
17548
17548
|
throw "[bracket2macro] text【" + $ + "】が登録済みの括弧マクロまたは一文字マクロです";
|
|
17549
|
-
if (this.#
|
|
17549
|
+
if (this.#e.test(B))
|
|
17550
17550
|
throw "[bracket2macro] text【" + B + "】は括弧マクロに使用できない文字です";
|
|
17551
|
-
if (this.#
|
|
17551
|
+
if (this.#e.test($))
|
|
17552
17552
|
throw "[bracket2macro] text【" + $ + "】は括弧マクロに使用できない文字です";
|
|
17553
17553
|
this.#o[$] = "0", this.#o[B] = `[${k} text=`, this.addC2M(`\\${B}[^\\${$}]*\\${$}`, `\\${B}\\${$}`), this.#l(r, N);
|
|
17554
17554
|
}
|
|
@@ -17559,7 +17559,7 @@ class Grammar {
|
|
|
17559
17559
|
throw "[char2macro] charは必須です";
|
|
17560
17560
|
if (this.#o ??= {}, k in this.#o)
|
|
17561
17561
|
throw "[char2macro] char【" + k + "】が登録済みの括弧マクロまたは一文字マクロです";
|
|
17562
|
-
if (this.#
|
|
17562
|
+
if (this.#e.test(k))
|
|
17563
17563
|
throw "[char2macro] char【" + k + "】は一文字マクロに使用できない文字です";
|
|
17564
17564
|
if (!D)
|
|
17565
17565
|
throw "[char2macro] nameは必須です";
|
|
@@ -17567,7 +17567,7 @@ class Grammar {
|
|
|
17567
17567
|
throw `[char2macro] 未定義のタグ又はマクロ[${D}]です`;
|
|
17568
17568
|
this.#o[k] = `[${D}]`, this.addC2M(`\\${k}`, `\\${k}`), this.#l(r, N);
|
|
17569
17569
|
}
|
|
17570
|
-
#
|
|
17570
|
+
#e;
|
|
17571
17571
|
#r = new RegExp("");
|
|
17572
17572
|
#i = "";
|
|
17573
17573
|
#n = "";
|
|
@@ -17579,7 +17579,7 @@ class Grammar {
|
|
|
17579
17579
|
}
|
|
17580
17580
|
resolveScript(t) {
|
|
17581
17581
|
const e = t.replaceAll(/(\r\n|\r)/g, `
|
|
17582
|
-
`).match(this.#
|
|
17582
|
+
`).match(this.#t)?.flatMap((N) => {
|
|
17583
17583
|
if (!this.testTagLetml(N))
|
|
17584
17584
|
return N;
|
|
17585
17585
|
const k = /^([^\]]+?])(.*)$/s.exec(N);
|
|
@@ -17597,7 +17597,7 @@ class Grammar {
|
|
|
17597
17597
|
return /^\[endlet_ml\s*]/.test(t);
|
|
17598
17598
|
}
|
|
17599
17599
|
analyzToken(t) {
|
|
17600
|
-
return this.#
|
|
17600
|
+
return this.#t.lastIndex = 0, this.#t.exec(t);
|
|
17601
17601
|
}
|
|
17602
17602
|
#o;
|
|
17603
17603
|
#h;
|
|
@@ -17641,11 +17641,11 @@ class AnalyzeTagArg {
|
|
|
17641
17641
|
| (["'#]) (?<def2>.*?) \6 ) )?
|
|
17642
17642
|
| (?<literal>[^\s;]+)
|
|
17643
17643
|
*/
|
|
17644
|
-
#
|
|
17644
|
+
#t = /;[^\n]*|(?<key>[^\s="'#|;]+)(?:\s|;[^\n]*\n)*=(?:\s|;[^\n]*\n)*(?:(?<val>[^\s"'#|;]+)|(["'#])(?<val2>.*?)\3)(?:\|(?:(?<def>[^\s"'#;]+)|(["'#])(?<def2>.*?)\6))?|(?<literal>[^\s;]+)/g;
|
|
17645
17645
|
// 【属性 = 値 | 省略値】の分析
|
|
17646
17646
|
parse(t) {
|
|
17647
17647
|
this.#r = {}, this.#i = !1;
|
|
17648
|
-
for (const { groups: e } of t.matchAll(this.#
|
|
17648
|
+
for (const { groups: e } of t.matchAll(this.#t)) {
|
|
17649
17649
|
const { key: r, val: N, val2: k, def: D, def2: B, literal: $ } = e;
|
|
17650
17650
|
r ? this.#r[r] = {
|
|
17651
17651
|
val: N ?? k,
|
|
@@ -17656,13 +17656,13 @@ class AnalyzeTagArg {
|
|
|
17656
17656
|
// 属性と値の位置をまとめて返す
|
|
17657
17657
|
parseinDetail(t, e, r, N) {
|
|
17658
17658
|
const k = {}, D = t.slice(1 + e, -1);
|
|
17659
|
-
for (const { groups: B, index: $, 0: U } of D.matchAll(this.#
|
|
17659
|
+
for (const { groups: B, index: $, 0: U } of D.matchAll(this.#t)) {
|
|
17660
17660
|
if ($ === void 0)
|
|
17661
17661
|
continue;
|
|
17662
17662
|
const { key: H, val: z, val2: V, literal: X } = B;
|
|
17663
17663
|
if (X) {
|
|
17664
17664
|
if (X.at(-1) === "=") {
|
|
17665
|
-
const Z = X.length - 1, { ch: J } = this.#
|
|
17665
|
+
const Z = X.length - 1, { ch: J } = this.#e(e, r, N, D, $ + Z);
|
|
17666
17666
|
k[X.slice(0, -1)] = {
|
|
17667
17667
|
k_ln: r,
|
|
17668
17668
|
k_ch: J - Z,
|
|
@@ -17676,12 +17676,12 @@ class AnalyzeTagArg {
|
|
|
17676
17676
|
}
|
|
17677
17677
|
if (!H)
|
|
17678
17678
|
continue;
|
|
17679
|
-
const { ln: q, ch: W } = this.#
|
|
17679
|
+
const { ln: q, ch: W } = this.#e(e, r, N, D, $), { ln: Y, ch: K } = this.#e(e, r, N, D, $ + U.lastIndexOf(z ?? V) - (z ? 0 : 1));
|
|
17680
17680
|
k[H] = { k_ln: q, k_ch: W, v_ln: Y, v_ch: K, v_len: z ? z.length : V.length + 2 };
|
|
17681
17681
|
}
|
|
17682
17682
|
return k;
|
|
17683
17683
|
}
|
|
17684
|
-
#
|
|
17684
|
+
#e(t, e, r, N, k) {
|
|
17685
17685
|
const B = N.slice(0, k).split(`
|
|
17686
17686
|
`), $ = B.length;
|
|
17687
17687
|
return {
|
|
@@ -18394,7 +18394,7 @@ class PropParser {
|
|
|
18394
18394
|
), tt = this.val.getVal(J);
|
|
18395
18395
|
return tt == null ? ["!str!", tt] : typeof tt == "boolean" ? ["!bool!", tt] : Object.prototype.toString.call(tt) === "[object String]" ? ["!str!", String(tt)] : ["!num!", Number(tt)];
|
|
18396
18396
|
}).desc("string"), W = parsimmon_umd_minExports.lazy(
|
|
18397
|
-
() => parsimmon_umd_minExports.string("(").then(this.#
|
|
18397
|
+
() => parsimmon_umd_minExports.string("(").then(this.#t).skip(parsimmon_umd_minExports.string(")")).or(U).or(H).or(z).or(V).or(q)
|
|
18398
18398
|
), K = [
|
|
18399
18399
|
// 演算子の優先順位 - JavaScript | MDN https://developer.mozilla.org/ja/docs/Web/JavaScript/Reference/Operators/Operator_precedence
|
|
18400
18400
|
// 優先順位:18(メンバーへのアクセス、計算値によるメンバーへのアクセス)
|
|
@@ -18431,20 +18431,20 @@ class PropParser {
|
|
|
18431
18431
|
(Z, J) => J.type(J.ops, Z),
|
|
18432
18432
|
W
|
|
18433
18433
|
);
|
|
18434
|
-
this.#
|
|
18434
|
+
this.#t = K.trim(parsimmon_umd_minExports.optWhitespace);
|
|
18435
18435
|
}
|
|
18436
|
-
#
|
|
18436
|
+
#t = null;
|
|
18437
18437
|
parse(t) {
|
|
18438
|
-
const e = this.#
|
|
18438
|
+
const e = this.#t.parse(t);
|
|
18439
18439
|
if (!e.status)
|
|
18440
18440
|
throw Error("(PropParser)文法エラー【" + t + "】");
|
|
18441
18441
|
const r = e.value;
|
|
18442
|
-
return r[0] === "!str!" ? this.#o(r[1]) : this.#
|
|
18442
|
+
return r[0] === "!str!" ? this.#o(r[1]) : this.#e(r);
|
|
18443
18443
|
}
|
|
18444
|
-
#
|
|
18444
|
+
#e(t) {
|
|
18445
18445
|
const e = t.shift();
|
|
18446
18446
|
if (e instanceof Array)
|
|
18447
|
-
return this.#
|
|
18447
|
+
return this.#e(e);
|
|
18448
18448
|
const r = this.#r[e];
|
|
18449
18449
|
return r ? r(t) : Object(null);
|
|
18450
18450
|
}
|
|
@@ -18467,77 +18467,77 @@ class PropParser {
|
|
|
18467
18467
|
// 論理 NOT
|
|
18468
18468
|
"!": (t) => !this.#r.Boolean(t),
|
|
18469
18469
|
// チルダ演算子(ビット反転)
|
|
18470
|
-
"~": (t) => ~Number(this.#
|
|
18470
|
+
"~": (t) => ~Number(this.#e(t.shift())),
|
|
18471
18471
|
// UnaryNegate: a=> - Number(this.#calc(a.shift())),
|
|
18472
18472
|
UnaryNegate: (t) => -this.#r.Number(t),
|
|
18473
18473
|
// Unaryplus: a=> this.#hFnc['Number'](a),
|
|
18474
18474
|
// 乗算、除算、剰余
|
|
18475
|
-
"**": (t) => Number(this.#
|
|
18476
|
-
"*": (t) => Number(this.#
|
|
18477
|
-
"/": (t) => Number(this.#
|
|
18475
|
+
"**": (t) => Number(this.#e(t.shift())) ** Number(this.#e(t.shift())),
|
|
18476
|
+
"*": (t) => Number(this.#e(t.shift())) * Number(this.#e(t.shift())),
|
|
18477
|
+
"/": (t) => Number(this.#e(t.shift())) / Number(this.#e(t.shift())),
|
|
18478
18478
|
"¥": (t) => Math.floor(this.#r["/"](t)),
|
|
18479
|
-
"%": (t) => Number(this.#
|
|
18479
|
+
"%": (t) => Number(this.#e(t.shift())) % Number(this.#e(t.shift())),
|
|
18480
18480
|
// 加算、減算、文字列の連結
|
|
18481
18481
|
"+": (t) => {
|
|
18482
|
-
const e = this.#
|
|
18482
|
+
const e = this.#e(t.shift()), r = this.#e(t.shift());
|
|
18483
18483
|
return Object.prototype.toString.call(e) === "[object String]" || Object.prototype.toString.call(r) === "[object String]" ? String(e) + String(r) : Number(e) + Number(r);
|
|
18484
18484
|
},
|
|
18485
|
-
"-": (t) => Number(this.#
|
|
18485
|
+
"-": (t) => Number(this.#e(t.shift())) - Number(this.#e(t.shift())),
|
|
18486
18486
|
// 関数
|
|
18487
18487
|
int: (t) => int(this.#i(t.shift())),
|
|
18488
18488
|
parseInt: (t) => int(this.#r.Number(t)),
|
|
18489
18489
|
Number: (t) => {
|
|
18490
|
-
const e = this.#
|
|
18491
|
-
return Object.prototype.toString.call(e) === "[object String]" ? this.#i(this.#
|
|
18490
|
+
const e = this.#e(t.shift());
|
|
18491
|
+
return Object.prototype.toString.call(e) === "[object String]" ? this.#i(this.#t.parse(String(e)).value) : Number(e);
|
|
18492
18492
|
},
|
|
18493
18493
|
Boolean: (t) => {
|
|
18494
18494
|
const e = t.shift();
|
|
18495
|
-
return e[0] === "!bool!" ? !!e[1] : !!this.#
|
|
18495
|
+
return e[0] === "!bool!" ? !!e[1] : !!this.#e(e);
|
|
18496
18496
|
},
|
|
18497
18497
|
ceil: (t) => Math.ceil(this.#i(t.shift())),
|
|
18498
18498
|
floor: (t) => Math.floor(this.#i(t.shift())),
|
|
18499
18499
|
round: (t) => Math.round(this.#i(t.shift())),
|
|
18500
18500
|
isNaN: (t) => Number.isNaN(this.#i(t.shift())),
|
|
18501
18501
|
// ビットシフト
|
|
18502
|
-
"<<": (t) => Number(this.#
|
|
18503
|
-
">>": (t) => Number(this.#
|
|
18504
|
-
">>>": (t) => Number(this.#
|
|
18502
|
+
"<<": (t) => Number(this.#e(t.shift())) << Number(this.#e(t.shift())),
|
|
18503
|
+
">>": (t) => Number(this.#e(t.shift())) >> Number(this.#e(t.shift())),
|
|
18504
|
+
">>>": (t) => Number(this.#e(t.shift())) >>> Number(this.#e(t.shift())),
|
|
18505
18505
|
// 等値、非等値、厳密等価、厳密非等価
|
|
18506
|
-
"<": (t) => Number(this.#
|
|
18507
|
-
"<=": (t) => Number(this.#
|
|
18508
|
-
">": (t) => Number(this.#
|
|
18509
|
-
">=": (t) => Number(this.#
|
|
18506
|
+
"<": (t) => Number(this.#e(t.shift())) < Number(this.#e(t.shift())),
|
|
18507
|
+
"<=": (t) => Number(this.#e(t.shift())) <= Number(this.#e(t.shift())),
|
|
18508
|
+
">": (t) => Number(this.#e(t.shift())) > Number(this.#e(t.shift())),
|
|
18509
|
+
">=": (t) => Number(this.#e(t.shift())) >= Number(this.#e(t.shift())),
|
|
18510
18510
|
// 小なり、以下、大なり、以上
|
|
18511
18511
|
"==": (t) => {
|
|
18512
|
-
const e = this.#
|
|
18512
|
+
const e = this.#e(t.shift()), r = this.#e(t.shift());
|
|
18513
18513
|
return e == null && r == null && (!e || !r) ? e == r : String(e) === String(r);
|
|
18514
18514
|
},
|
|
18515
18515
|
"!=": (t) => !this.#r["=="](t),
|
|
18516
18516
|
"===": (t) => {
|
|
18517
|
-
const e = this.#
|
|
18517
|
+
const e = this.#e(t.shift()), r = this.#e(t.shift());
|
|
18518
18518
|
return Object.prototype.toString.call(e) != Object.prototype.toString.call(r) ? !1 : String(e) === String(r);
|
|
18519
18519
|
},
|
|
18520
18520
|
"!==": (t) => !this.#r["==="](t),
|
|
18521
18521
|
// ビット演算子
|
|
18522
|
-
"&": (t) => Number(this.#
|
|
18523
|
-
"^": (t) => Number(this.#
|
|
18524
|
-
"|": (t) => Number(this.#
|
|
18522
|
+
"&": (t) => Number(this.#e(t.shift())) & Number(this.#e(t.shift())),
|
|
18523
|
+
"^": (t) => Number(this.#e(t.shift())) ^ Number(this.#e(t.shift())),
|
|
18524
|
+
"|": (t) => Number(this.#e(t.shift())) | Number(this.#e(t.shift())),
|
|
18525
18525
|
// 論理 AND,OR
|
|
18526
|
-
"&&": (t) => String(this.#
|
|
18527
|
-
"||": (t) => String(this.#
|
|
18526
|
+
"&&": (t) => String(this.#e(t.shift())) === "true" && String(this.#e(t.shift())) === "true",
|
|
18527
|
+
"||": (t) => String(this.#e(t.shift())) === "true" || String(this.#e(t.shift())) === "true",
|
|
18528
18528
|
// 条件
|
|
18529
18529
|
"?": (t) => {
|
|
18530
18530
|
const e = this.#r.Boolean(t), r = t.shift();
|
|
18531
18531
|
if (r[0] !== ":")
|
|
18532
18532
|
throw Error("(PropParser)三項演算子の文法エラーです。: が見つかりません");
|
|
18533
|
-
return this.#
|
|
18533
|
+
return this.#e(r[e ? 1 : 2]);
|
|
18534
18534
|
},
|
|
18535
18535
|
":": () => {
|
|
18536
18536
|
throw Error("(PropParser)三項演算子の文法エラーです。? が見つかりません");
|
|
18537
18537
|
}
|
|
18538
18538
|
};
|
|
18539
18539
|
#i(t) {
|
|
18540
|
-
const e = this.#
|
|
18540
|
+
const e = this.#e(t);
|
|
18541
18541
|
if (Object.prototype.toString.call(e) !== "[object Number]")
|
|
18542
18542
|
throw Error("(PropParser)引数【" + e + "】が数値ではありません");
|
|
18543
18543
|
return Number(e);
|
|
@@ -18582,13 +18582,13 @@ class PropParser {
|
|
|
18582
18582
|
}
|
|
18583
18583
|
class DebugMng {
|
|
18584
18584
|
constructor(t, e, r) {
|
|
18585
|
-
this.sys = t, DebugMng.#
|
|
18585
|
+
this.sys = t, DebugMng.#t = r, DebugMng.#e = e, DebugMng.#r = e.title, DebugMng.myTrace = DebugMng.#l, e.log = (N) => this.#o(N), e.trace = (N) => this.#h(N), DebugMng.#i = document.createElement("span"), DebugMng.#i.hidden = !0, DebugMng.#i.textContent = "", DebugMng.#i.style.cssText = ` z-index: ${Number.MAX_SAFE_INTEGER};
|
|
18586
18586
|
position: absolute; left: 0; top: 0;
|
|
18587
18587
|
color: black;
|
|
18588
18588
|
background-color: rgba(255, 255, 255, 0.7);`, document.body.appendChild(DebugMng.#i);
|
|
18589
18589
|
}
|
|
18590
|
-
static #e;
|
|
18591
18590
|
static #t;
|
|
18591
|
+
static #e;
|
|
18592
18592
|
static #r;
|
|
18593
18593
|
static #i;
|
|
18594
18594
|
destroy() {
|
|
@@ -18601,7 +18601,7 @@ class DebugMng {
|
|
|
18601
18601
|
return this.#n && (this.#n = !1, e = `== ${platform.description} ==
|
|
18602
18602
|
`), this.sys.appendFile(
|
|
18603
18603
|
this.sys.path_downloads + "log.txt",
|
|
18604
|
-
`${e}--- ${getDateStr("-", "_", "")} [fn:${DebugMng.#
|
|
18604
|
+
`${e}--- ${getDateStr("-", "_", "")} [fn:${DebugMng.#t.scriptFn} line:${DebugMng.#t.lineNum}] prj:${this.sys.cur}
|
|
18605
18605
|
${t.text || `(text is ${t.text})`}
|
|
18606
18606
|
`,
|
|
18607
18607
|
(r) => {
|
|
@@ -18636,7 +18636,7 @@ ${t.text || `(text is ${t.text})`}
|
|
|
18636
18636
|
console.info("%c" + r, N);
|
|
18637
18637
|
}
|
|
18638
18638
|
static myTrace = DebugMng.trace_beforeNew;
|
|
18639
|
-
static strPos = () => DebugMng.#
|
|
18639
|
+
static strPos = () => DebugMng.#t && DebugMng.#t.lineNum > 0 ? `(fn:${DebugMng.#t.scriptFn} line:${DebugMng.#t.lineNum}) ` : "";
|
|
18640
18640
|
static #l(t, e = "E") {
|
|
18641
18641
|
let r = `{${e}} ` + DebugMng.strPos() + t;
|
|
18642
18642
|
DebugMng.#p(r, e);
|
|
@@ -18653,7 +18653,7 @@ ${t.text || `(text is ${t.text})`}
|
|
|
18653
18653
|
break;
|
|
18654
18654
|
case "ET":
|
|
18655
18655
|
case "E":
|
|
18656
|
-
if (DebugMng.#r({ text: t }), this.#
|
|
18656
|
+
if (DebugMng.#r({ text: t }), this.#e.dump_lay({}), this.#e.dump_val({}), DebugMng.#t.dumpErrForeLine(), this.#e.dump_stack({}), e === "ET")
|
|
18657
18657
|
throw r;
|
|
18658
18658
|
console.error("%c" + r, "color:#F30;");
|
|
18659
18659
|
return;
|
|
@@ -18736,7 +18736,7 @@ class Areas {
|
|
|
18736
18736
|
}
|
|
18737
18737
|
class Variable {
|
|
18738
18738
|
constructor(t, e) {
|
|
18739
|
-
if (this.cfg = t, e.let = (k) => this.#v(k), e.let_abs = (k) => this.#u(k), e.let_char_at = (k) => this.#b(k), e.let_index_of = (k) => this.#a(k), e.let_length = (k) => this.#m(k), e.let_replace = (k) => this.#y(k), e.let_round = (k) => this.#_(k), e.let_search = (k) => this.#T(k), e.let_substr = (k) => this.#I(k), e.clearsysvar = () => this.#S(), e.clearvar = () => this.#E(), e.dump_val = () => this.#O(), e.copybookmark = (k) => this.#f(k), e.erasebookmark = (k) => this.#d(k), this.#
|
|
18739
|
+
if (this.cfg = t, e.let = (k) => this.#v(k), e.let_abs = (k) => this.#u(k), e.let_char_at = (k) => this.#b(k), e.let_index_of = (k) => this.#a(k), e.let_length = (k) => this.#m(k), e.let_replace = (k) => this.#y(k), e.let_round = (k) => this.#_(k), e.let_search = (k) => this.#T(k), e.let_substr = (k) => this.#I(k), e.clearsysvar = () => this.#S(), e.clearvar = () => this.#E(), e.dump_val = () => this.#O(), e.copybookmark = (k) => this.#f(k), e.erasebookmark = (k) => this.#d(k), this.#e["sn.userFnTail"] = "", this.defTmp("const.sn.bookmark.json", () => {
|
|
18740
18740
|
const k = [];
|
|
18741
18741
|
for (const D of Object.keys(this.#n.mark).sort()) {
|
|
18742
18742
|
const B = { ...this.#n.mark[D].json };
|
|
@@ -18748,9 +18748,9 @@ class Variable {
|
|
|
18748
18748
|
const r = window, N = r.AudioContext ?? r.webkitAudioContext;
|
|
18749
18749
|
this.#r["const.sn.needClick2Play"] = () => new N().state === "suspended";
|
|
18750
18750
|
}
|
|
18751
|
-
#
|
|
18752
|
-
#
|
|
18753
|
-
#r = this.#
|
|
18751
|
+
#t = { sys: {}, save: {}, tmp: {}, mp: {} };
|
|
18752
|
+
#e = this.#t.save;
|
|
18753
|
+
#r = this.#t.tmp;
|
|
18754
18754
|
#i;
|
|
18755
18755
|
#n = { sys: {}, mark: {}, kidoku: {} };
|
|
18756
18756
|
#o;
|
|
@@ -18766,7 +18766,7 @@ class Variable {
|
|
|
18766
18766
|
k["sys:" + z] = V instanceof Function ? V() : V;
|
|
18767
18767
|
sessionStorage[r + "sys"] = JSON.stringify(k);
|
|
18768
18768
|
const D = {};
|
|
18769
|
-
for (const [z, V] of Object.entries(this.#
|
|
18769
|
+
for (const [z, V] of Object.entries(this.#e))
|
|
18770
18770
|
D["save:" + z] = V instanceof Function ? V() : V;
|
|
18771
18771
|
sessionStorage[r + "save"] = JSON.stringify(D);
|
|
18772
18772
|
const B = {};
|
|
@@ -18774,7 +18774,7 @@ class Variable {
|
|
|
18774
18774
|
B[z] = V instanceof Function ? V() : V;
|
|
18775
18775
|
sessionStorage[r + "tmp"] = JSON.stringify(B);
|
|
18776
18776
|
const $ = {};
|
|
18777
|
-
for (const [z, V] of Object.entries(this.#
|
|
18777
|
+
for (const [z, V] of Object.entries(this.#t.mp))
|
|
18778
18778
|
$[z] = V instanceof Function ? V() : V;
|
|
18779
18779
|
sessionStorage[r + "mp"] = JSON.stringify($);
|
|
18780
18780
|
const U = {};
|
|
@@ -18792,7 +18792,7 @@ class Variable {
|
|
|
18792
18792
|
}
|
|
18793
18793
|
#p = {
|
|
18794
18794
|
auth: (t, e) => this.#s(e.hBreakpoint.aData),
|
|
18795
|
-
var: (t, e) => this.#i.send2Dbg(e.ri, { v: this.#
|
|
18795
|
+
var: (t, e) => this.#i.send2Dbg(e.ri, { v: this.#t[e.scope] ?? {} }),
|
|
18796
18796
|
set_var: (t, e) => {
|
|
18797
18797
|
try {
|
|
18798
18798
|
this.#B(e.nm, e.val), this.#i.send2Dbg(e.ri, {});
|
|
@@ -18810,7 +18810,7 @@ class Variable {
|
|
|
18810
18810
|
Variable.#N[e.dataId] = 1;
|
|
18811
18811
|
}
|
|
18812
18812
|
updateData(t) {
|
|
18813
|
-
this.#n = t, this.#o = this.#
|
|
18813
|
+
this.#n = t, this.#o = this.#t.sys = this.#n.sys, this.#h = {};
|
|
18814
18814
|
for (const [e, r] of Object.entries(this.#n.kidoku)) {
|
|
18815
18815
|
const N = new Areas();
|
|
18816
18816
|
N.hAreas = { ...r }, this.#h[e] = N;
|
|
@@ -18831,20 +18831,20 @@ class Variable {
|
|
|
18831
18831
|
this.#r[t] = e;
|
|
18832
18832
|
}
|
|
18833
18833
|
cloneMp() {
|
|
18834
|
-
return { ...this.#
|
|
18834
|
+
return { ...this.#t.mp };
|
|
18835
18835
|
}
|
|
18836
18836
|
setMp(t) {
|
|
18837
|
-
this.#
|
|
18837
|
+
this.#t.mp = t;
|
|
18838
18838
|
}
|
|
18839
18839
|
setMark(t, e) {
|
|
18840
18840
|
this.#n.mark[t] = e, this.flush();
|
|
18841
18841
|
}
|
|
18842
18842
|
getMark = (t) => this.#n.mark[t];
|
|
18843
18843
|
cloneSave() {
|
|
18844
|
-
return { ...this.#
|
|
18844
|
+
return { ...this.#t.save };
|
|
18845
18845
|
}
|
|
18846
18846
|
mark2save(t) {
|
|
18847
|
-
this.#
|
|
18847
|
+
this.#e = this.#t.save = { ...t.hSave }, this.#x = this.#e["sn.doRecLog"] ?? !1;
|
|
18848
18848
|
}
|
|
18849
18849
|
// 既読系
|
|
18850
18850
|
loadScrWork(t) {
|
|
@@ -18953,16 +18953,16 @@ class Variable {
|
|
|
18953
18953
|
// // デバッグ・その他
|
|
18954
18954
|
// システム変数の全消去
|
|
18955
18955
|
#S() {
|
|
18956
|
-
const t = this.#o = this.#
|
|
18956
|
+
const t = this.#o = this.#t.sys = this.#n.sys = {};
|
|
18957
18957
|
typeof process < "u" || (this.setVal_Nochk("sys", "const.sn.window.x", 0), this.setVal_Nochk("sys", "const.sn.window.y", 0)), this.setVal_Nochk("sys", "sn.tagCh.doWait", !0), this.setVal_Nochk("sys", "sn.tagCh.doWait_Kidoku", !0), this.setVal_Nochk("sys", "sn.tagCh.msecWait", this.cfg.oCfg.init.tagch_msecwait), this.setVal_Nochk("sys", "sn.tagCh.msecWait_Kidoku", this.cfg.oCfg.init.tagch_msecwait), this.setVal_Nochk("sys", "sn.tagCh.canskip", !0), this.setVal_Nochk("sys", "sn.skip.mode", "s"), this.setVal_Nochk("sys", "sn.auto.msecPageWait", argChk_Num(t, "sn.auto.msecPageWait", this.cfg.oCfg.init.auto_msecpagewait ?? 3500)), this.setVal_Nochk("sys", "sn.auto.msecPageWait_Kidoku", argChk_Num(t, "sn.auto.msecPageWait", this.cfg.oCfg.init.auto_msecpagewait ?? 3500)), this.setVal_Nochk("sys", "sn.auto.msecLineWait", 500), this.setVal_Nochk("sys", "sn.auto.msecLineWait_Kidoku", 500), this.setVal_Nochk("sys", "const.sn.sound.BGM.volume", 1), this.setVal_Nochk("sys", "const.sn.sound.SE.volume", 1), this.setVal_Nochk("sys", "const.sn.sound.SYS.volume", 1);
|
|
18958
18958
|
for (const [r, N] of Object.entries(this.#n.kidoku))
|
|
18959
18959
|
N.hAreas = {}, this.#h[r].clear();
|
|
18960
|
-
return this.setVal_Nochk("sys", "TextLayer.Back.Alpha", 0.5), this.#
|
|
18960
|
+
return this.setVal_Nochk("sys", "TextLayer.Back.Alpha", 0.5), this.#t.mark = this.#n.mark = {}, this.setVal_Nochk("sys", "const.sn.save.place", 1), this.flush(), !1;
|
|
18961
18961
|
}
|
|
18962
18962
|
// ゲーム変数の全消去
|
|
18963
18963
|
#E() {
|
|
18964
|
-
const t = this.#
|
|
18965
|
-
return this.#
|
|
18964
|
+
const t = this.#e["const.sn.mesLayer"] ?? "", e = this.#e["sn.doRecLog"] ?? !1, r = this.#e["const.sn.sLog"] ?? "[]";
|
|
18965
|
+
return this.#e = this.#t.save = {}, this.setVal_Nochk("save", "const.sn.mesLayer", t), this.setVal_Nochk("save", "sn.doRecLog", e), this.setVal_Nochk("save", "const.sn.sLog", r), !1;
|
|
18966
18966
|
}
|
|
18967
18967
|
#B = (t, e, r = !0) => {
|
|
18968
18968
|
if (!t)
|
|
@@ -18972,7 +18972,7 @@ class Variable {
|
|
|
18972
18972
|
const N = PropParser.getValName(t);
|
|
18973
18973
|
if (N === null)
|
|
18974
18974
|
throw "[変数参照] name(" + t + ")が変数名として異常です";
|
|
18975
|
-
const k = this.#
|
|
18975
|
+
const k = this.#t[N.scope];
|
|
18976
18976
|
if (!k)
|
|
18977
18977
|
throw "[変数に値セット] scopeが異常【" + N.scope + "】です";
|
|
18978
18978
|
const D = N.name;
|
|
@@ -18981,7 +18981,7 @@ class Variable {
|
|
|
18981
18981
|
this.setVal_Nochk(N.scope, D, e, r);
|
|
18982
18982
|
};
|
|
18983
18983
|
setVal_Nochk(t, e, r, N = !1) {
|
|
18984
|
-
const k = this.#
|
|
18984
|
+
const k = this.#t[t];
|
|
18985
18985
|
N && (r = this.#P(r));
|
|
18986
18986
|
const D = t + ":" + e;
|
|
18987
18987
|
if (D in Variable.#N) {
|
|
@@ -19002,7 +19002,7 @@ class Variable {
|
|
|
19002
19002
|
const r = PropParser.getValName(t);
|
|
19003
19003
|
if (r === null)
|
|
19004
19004
|
throw "[変数参照] name(" + t + ")が変数名として異常です";
|
|
19005
|
-
const N = this.#
|
|
19005
|
+
const N = this.#t[r.scope];
|
|
19006
19006
|
if (!N)
|
|
19007
19007
|
throw "[変数参照] scopeが異常【" + r.scope + "】です";
|
|
19008
19008
|
const k = r.name;
|
|
@@ -19055,7 +19055,7 @@ class Variable {
|
|
|
19055
19055
|
#O = () => {
|
|
19056
19056
|
const t = { tmp: {}, sys: {}, save: {}, mp: {} };
|
|
19057
19057
|
for (let e in t) {
|
|
19058
|
-
const r = this.#
|
|
19058
|
+
const r = this.#t[e], N = t[e];
|
|
19059
19059
|
for (let [k, D] of Object.entries(r))
|
|
19060
19060
|
N[k] = Object.prototype.toString.call(D) === "[object Function]" ? D() : D;
|
|
19061
19061
|
}
|
|
@@ -19118,7 +19118,7 @@ class Variable {
|
|
|
19118
19118
|
argChk_Num(this.#o, t, 500);
|
|
19119
19119
|
}
|
|
19120
19120
|
#k(t) {
|
|
19121
|
-
return argChk_Boolean(this.#
|
|
19121
|
+
return argChk_Boolean(this.#e, t, !0);
|
|
19122
19122
|
}
|
|
19123
19123
|
}
|
|
19124
19124
|
var Easing = Object.freeze({
|
|
@@ -19509,12 +19509,12 @@ var removeAll = TWEEN.removeAll.bind(TWEEN);
|
|
|
19509
19509
|
TWEEN.add.bind(TWEEN);
|
|
19510
19510
|
var remove$6 = TWEEN.remove.bind(TWEEN), update = TWEEN.update.bind(TWEEN);
|
|
19511
19511
|
class CmnTween {
|
|
19512
|
-
static #
|
|
19513
|
-
static #
|
|
19512
|
+
static #t = {};
|
|
19513
|
+
static #e;
|
|
19514
19514
|
static #r;
|
|
19515
19515
|
static #i;
|
|
19516
19516
|
static init(t, e, r) {
|
|
19517
|
-
CmnTween.#
|
|
19517
|
+
CmnTween.#t = {}, CmnTween.#e = t, CmnTween.#r = e, CmnTween.#i = r, CmnTween.#i.ticker.add(CmnTween.#n);
|
|
19518
19518
|
}
|
|
19519
19519
|
static #n = () => update();
|
|
19520
19520
|
static destroy() {
|
|
@@ -19591,15 +19591,15 @@ class CmnTween {
|
|
|
19591
19591
|
}
|
|
19592
19592
|
// トゥイーン全停止
|
|
19593
19593
|
static stopAllTw() {
|
|
19594
|
-
CmnTween.#
|
|
19594
|
+
CmnTween.#t = {}, removeAll();
|
|
19595
19595
|
}
|
|
19596
19596
|
static tween(t, e, r, N, k, D, B) {
|
|
19597
19597
|
const $ = CmnTween.tweenA(t, e, r, N, k, D, B);
|
|
19598
19598
|
CmnTween.tweenB(e.chain, $);
|
|
19599
19599
|
}
|
|
19600
19600
|
static tweenA(t, e, r, N, k, D, B) {
|
|
19601
|
-
const $ = this.#
|
|
19602
|
-
CmnTween.setTwProp(U, e), CmnTween.#
|
|
19601
|
+
const $ = this.#e.isSkipping() ? 0 : argChk_Num(e, "time", NaN), U = new Tween(r).to(N, $).onUpdate(k);
|
|
19602
|
+
CmnTween.setTwProp(U, e), CmnTween.#t[t] = { tw: U, resume: !1, onEnd: B };
|
|
19603
19603
|
const { path: H } = e;
|
|
19604
19604
|
let z = U;
|
|
19605
19605
|
if (H) {
|
|
@@ -19624,13 +19624,13 @@ class CmnTween {
|
|
|
19624
19624
|
CmnLib.debugLog && console.groupEnd();
|
|
19625
19625
|
}
|
|
19626
19626
|
return z.onComplete(() => {
|
|
19627
|
-
const V = CmnTween.#
|
|
19628
|
-
V && (delete CmnTween.#
|
|
19627
|
+
const V = CmnTween.#t[t];
|
|
19628
|
+
V && (delete CmnTween.#t[t], V.tw = void 0, U.stop(), CmnTween.#e.finishLimitedEvent(), V.resume && CmnTween.#r.resume(), V.onEnd?.(), D());
|
|
19629
19629
|
}), U;
|
|
19630
19630
|
}
|
|
19631
19631
|
static tweenB(t, e) {
|
|
19632
19632
|
if (t) {
|
|
19633
|
-
const r = CmnTween.#
|
|
19633
|
+
const r = CmnTween.#t[t];
|
|
19634
19634
|
if (!r?.tw)
|
|
19635
19635
|
throw `${t}は存在しない・または終了したトゥイーンです`;
|
|
19636
19636
|
delete r.onEnd, r.tw.chain(e);
|
|
@@ -19657,17 +19657,17 @@ class CmnTween {
|
|
|
19657
19657
|
static #h = /\(\s*(?:(?<x>[-=\d\.]+)|(['"])(?<x2>.*?)\2)?(?:\s*,\s*(?:(?<y>[-=\d\.]+)|(['"])(?<y2>.*?)\5)?(?:\s*,\s*(?:(?<o>[-=\d\.]+)|(['"])(?<o2>.*?)\8))?)?|(?<json>\{[^{}]*})/g;
|
|
19658
19658
|
// トランス終了待ち
|
|
19659
19659
|
static wt(t) {
|
|
19660
|
-
const e = CmnTween.#
|
|
19661
|
-
return e?.tw ? e.resume = CmnTween.#
|
|
19660
|
+
const e = CmnTween.#t[CmnTween.TW_INT_TRANS];
|
|
19661
|
+
return e?.tw ? e.resume = CmnTween.#e.waitEvent(t, () => CmnTween.finish_trans()) : !1;
|
|
19662
19662
|
}
|
|
19663
19663
|
static TW_INT_TRANS = `trans
|
|
19664
19664
|
`;
|
|
19665
19665
|
static get isTrans() {
|
|
19666
|
-
return CmnTween.#
|
|
19666
|
+
return CmnTween.#t[CmnTween.TW_INT_TRANS]?.tw !== void 0;
|
|
19667
19667
|
}
|
|
19668
19668
|
// レイヤのトランジションの停止
|
|
19669
19669
|
static finish_trans() {
|
|
19670
|
-
return CmnTween.#
|
|
19670
|
+
return CmnTween.#t[CmnTween.TW_INT_TRANS]?.tw?.end(), !1;
|
|
19671
19671
|
}
|
|
19672
19672
|
// トゥイーン終了待ち
|
|
19673
19673
|
static wait_tsy(t) {
|
|
@@ -19675,8 +19675,8 @@ class CmnTween {
|
|
|
19675
19675
|
${r}` : N ?? e;
|
|
19676
19676
|
if (!k)
|
|
19677
19677
|
throw "トゥイーンが指定されていません";
|
|
19678
|
-
const D = CmnTween.#
|
|
19679
|
-
return D?.tw ? D.resume = CmnTween.#
|
|
19678
|
+
const D = CmnTween.#t[k];
|
|
19679
|
+
return D?.tw ? D.resume = CmnTween.#e.waitEvent(t, () => D.tw?.end()) : !1;
|
|
19680
19680
|
}
|
|
19681
19681
|
// トゥイーン中断
|
|
19682
19682
|
static stop_tsy(t) {
|
|
@@ -19684,7 +19684,7 @@ ${r}` : N ?? e;
|
|
|
19684
19684
|
${r}` : N ?? e;
|
|
19685
19685
|
if (!k)
|
|
19686
19686
|
throw "トゥイーンが指定されていません";
|
|
19687
|
-
return CmnTween.#
|
|
19687
|
+
return CmnTween.#t[k]?.tw?.end(), !1;
|
|
19688
19688
|
}
|
|
19689
19689
|
// 一時停止
|
|
19690
19690
|
static pause_tsy(t) {
|
|
@@ -19692,7 +19692,7 @@ ${r}` : N ?? e;
|
|
|
19692
19692
|
${r}` : N ?? e;
|
|
19693
19693
|
if (!k)
|
|
19694
19694
|
throw "トゥイーンが指定されていません";
|
|
19695
|
-
return CmnTween.#
|
|
19695
|
+
return CmnTween.#t[k]?.tw?.pause(), !1;
|
|
19696
19696
|
}
|
|
19697
19697
|
// 一時停止再開
|
|
19698
19698
|
static resume_tsy(t) {
|
|
@@ -19700,7 +19700,7 @@ ${r}` : N ?? e;
|
|
|
19700
19700
|
${r}` : N ?? e;
|
|
19701
19701
|
if (!k)
|
|
19702
19702
|
throw "トゥイーンが指定されていません";
|
|
19703
|
-
return CmnTween.#
|
|
19703
|
+
return CmnTween.#t[k]?.tw?.resume(), !1;
|
|
19704
19704
|
}
|
|
19705
19705
|
}
|
|
19706
19706
|
/*!
|
|
@@ -20675,17 +20675,17 @@ var y = p.filter(function(o) {
|
|
|
20675
20675
|
"extensions" in n ? extensions.add(m) : Loader.registerPlugin(m);
|
|
20676
20676
|
let cfg$1, val$1, main$3, sys, evtMng;
|
|
20677
20677
|
class SndBuf {
|
|
20678
|
-
static #
|
|
20678
|
+
static #t = {};
|
|
20679
20679
|
static init(t, e, r, N) {
|
|
20680
|
-
SndBuf.#
|
|
20680
|
+
SndBuf.#t = {}, cfg$1 = t, val$1 = e, main$3 = r, sys = N;
|
|
20681
20681
|
}
|
|
20682
20682
|
static setEvtMng(t) {
|
|
20683
20683
|
evtMng = t;
|
|
20684
20684
|
}
|
|
20685
20685
|
static delLoopPlay(t) {
|
|
20686
|
-
delete SndBuf.#
|
|
20686
|
+
delete SndBuf.#t[t];
|
|
20687
20687
|
const e = "const.sn.sound." + t + ".";
|
|
20688
|
-
val$1.setVal_Nochk("save", e + "fn", ""), val$1.setVal_Nochk("save", "const.sn.loopPlaying", JSON.stringify(SndBuf.#
|
|
20688
|
+
val$1.setVal_Nochk("save", e + "fn", ""), val$1.setVal_Nochk("save", "const.sn.loopPlaying", JSON.stringify(SndBuf.#t)), val$1.flush();
|
|
20689
20689
|
}
|
|
20690
20690
|
static getVol(t, e) {
|
|
20691
20691
|
const r = argChk_Num(t, "volume", e);
|
|
@@ -20696,9 +20696,9 @@ class SndBuf {
|
|
|
20696
20696
|
if (e === r)
|
|
20697
20697
|
return;
|
|
20698
20698
|
const N = "const.sn.sound." + e + ".", k = Number(val$1.getVal("save:" + N + "volume")), D = String(val$1.getVal("save:" + N + "fn")), B = "const.sn.sound." + r + ".", $ = Number(val$1.getVal("save:" + B + "volume")), U = String(val$1.getVal("save:" + B + "fn"));
|
|
20699
|
-
val$1.setVal_Nochk("save", N + "volume", $), val$1.setVal_Nochk("save", B + "volume", k), val$1.setVal_Nochk("save", N + "fn", U), val$1.setVal_Nochk("save", B + "fn", D), e in SndBuf.#
|
|
20699
|
+
val$1.setVal_Nochk("save", N + "volume", $), val$1.setVal_Nochk("save", B + "volume", k), val$1.setVal_Nochk("save", N + "fn", U), val$1.setVal_Nochk("save", B + "fn", D), e in SndBuf.#t != r in SndBuf.#t && (e in SndBuf.#t ? (delete SndBuf.#t[e], SndBuf.#t[r] = 0) : (delete SndBuf.#t[r], SndBuf.#t[e] = 0), val$1.setVal_Nochk("save", "const.sn.loopPlaying", JSON.stringify(SndBuf.#t))), val$1.flush();
|
|
20700
20700
|
}
|
|
20701
|
-
#
|
|
20701
|
+
#e;
|
|
20702
20702
|
static #r = 999e3;
|
|
20703
20703
|
init(t) {
|
|
20704
20704
|
const { buf: e = "SE", fn: r = "" } = t, N = argChk_Num(t, "start_ms", 0), k = argChk_Num(t, "end_ms", SndBuf.#r), D = argChk_Num(t, "ret_ms", 0), B = argChk_Num(t, "pan", 0), $ = argChk_Num(t, "speed", 1);
|
|
@@ -20717,9 +20717,9 @@ class SndBuf {
|
|
|
20717
20717
|
const H = SndBuf.getVol(t, 1);
|
|
20718
20718
|
val$1.setVal_Nochk("save", U + "volume", H);
|
|
20719
20719
|
const z = H * Number(val$1.getVal("sys:" + U + "volume", 1)), V = argChk_Boolean(t, "loop", !1);
|
|
20720
|
-
V ? (SndBuf.#
|
|
20720
|
+
V ? (SndBuf.#t[e] = 0, val$1.setVal_Nochk("save", "const.sn.loopPlaying", JSON.stringify(SndBuf.#t))) : SndBuf.delLoopPlay(e), val$1.setVal_Nochk("save", U + "start_ms", N), val$1.setVal_Nochk("save", U + "end_ms", k), val$1.setVal_Nochk("save", U + "ret_ms", D), val$1.setVal_Nochk("tmp", U + "playing", !0), val$1.flush();
|
|
20721
20721
|
const X = R.find(r);
|
|
20722
|
-
this.#
|
|
20722
|
+
this.#e = {
|
|
20723
20723
|
fn: r,
|
|
20724
20724
|
stt: X ? new SsPlaying() : new SsLoading(),
|
|
20725
20725
|
snd: X,
|
|
@@ -20738,7 +20738,7 @@ class SndBuf {
|
|
|
20738
20738
|
main$3.errScript(`Sound ロード失敗ですa fn:${r} ${K}`, !1);
|
|
20739
20739
|
return;
|
|
20740
20740
|
}
|
|
20741
|
-
Z && (this.#
|
|
20741
|
+
Z && (this.#e.snd = Z, this.#e.stt.onLoad(this.#e), B !== 0 && (Z.filters = [new T.StereoFilter(B)]));
|
|
20742
20742
|
}
|
|
20743
20743
|
};
|
|
20744
20744
|
let W = "";
|
|
@@ -20754,7 +20754,7 @@ class SndBuf {
|
|
|
20754
20754
|
Z(J, tt);
|
|
20755
20755
|
const et = tt, it = et.duration;
|
|
20756
20756
|
K.end < 0 && (K.end += it, et.removeSprites(W), et.addSprites(W, K)), K.end <= K.start && main$3.errScript(`[playse] end_ms:${k}(${K.end * 1e3}) >= start_ms:${N} は異常値です`), K.end * 1e3 <= D && main$3.errScript(`[playse] end_ms:${k}(${K.end * 1e3}) <= ret_ms:${D} は異常値です`), it <= K.start && main$3.errScript(`[playse] 音声ファイル再生時間:${it * 1e3} <= start_ms:${N} は異常値です`), k !== SndBuf.#r && it <= K.end && main$3.errScript(`[playse] 音声ファイル再生時間:${it * 1e3} <= end_ms:${k} は異常値です`), et.play(W, (st) => {
|
|
20757
|
-
q.complete?.(st), V || this.#
|
|
20757
|
+
q.complete?.(st), V || this.#e.stt.onPlayEnd();
|
|
20758
20758
|
});
|
|
20759
20759
|
};
|
|
20760
20760
|
} else
|
|
@@ -20777,13 +20777,13 @@ class SndBuf {
|
|
|
20777
20777
|
//- singleInstance?: boolean;
|
|
20778
20778
|
});
|
|
20779
20779
|
}) : q.complete = () => {
|
|
20780
|
-
stop2var(this.#
|
|
20780
|
+
stop2var(this.#e, e), this.#e.stt.onPlayEnd();
|
|
20781
20781
|
}, this.#i(), X) {
|
|
20782
20782
|
if (X.volume = z, W)
|
|
20783
20783
|
this.#n(r, q);
|
|
20784
20784
|
else if (X.isPlayable) {
|
|
20785
20785
|
const K = X.options.source;
|
|
20786
|
-
!(K instanceof ArrayBuffer) || K.byteLength === 0 ? X.play(q) : this.#
|
|
20786
|
+
!(K instanceof ArrayBuffer) || K.byteLength === 0 ? X.play(q) : this.#e.snd = E.from({
|
|
20787
20787
|
...q,
|
|
20788
20788
|
url: X.options.url,
|
|
20789
20789
|
source: K
|
|
@@ -20818,16 +20818,16 @@ class SndBuf {
|
|
|
20818
20818
|
e.source = k[t]?.data, E.from(e);
|
|
20819
20819
|
});
|
|
20820
20820
|
}
|
|
20821
|
-
ws = (t) => this.#
|
|
20821
|
+
ws = (t) => this.#e.stt.ws(this.#e, t);
|
|
20822
20822
|
stopse(t) {
|
|
20823
20823
|
const { buf: e = "SE" } = t;
|
|
20824
|
-
stop2var(this.#
|
|
20824
|
+
stop2var(this.#e, e), this.#e.stt.stopse(this.#e);
|
|
20825
20825
|
}
|
|
20826
20826
|
fade(t) {
|
|
20827
|
-
this.#
|
|
20827
|
+
this.#e.stt.fade(this.#e, t);
|
|
20828
20828
|
}
|
|
20829
|
-
wf = (t) => this.#
|
|
20830
|
-
stopfadese = (t) => this.#
|
|
20829
|
+
wf = (t) => this.#e.stt.wf(this.#e, t);
|
|
20830
|
+
stopfadese = (t) => this.#e.stt.stopfadese(this.#e, t);
|
|
20831
20831
|
}
|
|
20832
20832
|
function stop2var(o, t) {
|
|
20833
20833
|
if (o.loop)
|
|
@@ -20873,8 +20873,6 @@ class SsPlaying {
|
|
|
20873
20873
|
ws(t, e) {
|
|
20874
20874
|
if (t.loop)
|
|
20875
20875
|
return !1;
|
|
20876
|
-
if (!argChk_Boolean(e, "canskip", !1))
|
|
20877
|
-
return !0;
|
|
20878
20876
|
const { buf: r = "SE" } = e, N = argChk_Boolean(e, "stop", !0);
|
|
20879
20877
|
return argChk_Boolean(e, "canskip", !1), evtMng.waitEvent(e, () => {
|
|
20880
20878
|
stop2var(t, r), t.stt.onPlayEnd(), N && t.stt.stopse(t);
|
|
@@ -20917,7 +20915,7 @@ class SsWaitingStop {
|
|
|
20917
20915
|
ws = () => !1;
|
|
20918
20916
|
// ok
|
|
20919
20917
|
onPlayEnd() {
|
|
20920
|
-
main$3.resume();
|
|
20918
|
+
evtMng.finishLimitedEvent(), main$3.resume();
|
|
20921
20919
|
}
|
|
20922
20920
|
fade() {
|
|
20923
20921
|
}
|
|
@@ -20955,6 +20953,7 @@ class SsFade {
|
|
|
20955
20953
|
}
|
|
20956
20954
|
compFade() {
|
|
20957
20955
|
}
|
|
20956
|
+
// ok
|
|
20958
20957
|
stopfadese = () => stopfadese(this.tw);
|
|
20959
20958
|
}
|
|
20960
20959
|
class SsWaitingFade {
|
|
@@ -20978,7 +20977,7 @@ class SsWaitingFade {
|
|
|
20978
20977
|
wf = () => !1;
|
|
20979
20978
|
// ok
|
|
20980
20979
|
compFade() {
|
|
20981
|
-
main$3.resume();
|
|
20980
|
+
evtMng.finishLimitedEvent(), main$3.resume();
|
|
20982
20981
|
}
|
|
20983
20982
|
stopfadese = () => stopfadese(this.tw);
|
|
20984
20983
|
}
|
|
@@ -21014,8 +21013,8 @@ class SoundMng {
|
|
|
21014
21013
|
constructor(t, e, r, N, k) {
|
|
21015
21014
|
this.val = r, e.volume = (D) => this.#i(D), e.fadebgm = (D) => this.#l(D), e.fadeoutbgm = (D) => this.#o(D), e.fadeoutse = (D) => this.#h(D), e.fadese = (D) => this.#p(D), e.playbgm = (D) => this.#s(D), e.playse = (D) => this.#c(D), e.stop_allse = () => this.#g(), e.stopbgm = (D) => this.#f(D), e.stopse = (D) => this.#d(D), e.wb = (D) => this.#v(D), e.wf = (D) => this.#u(D), e.stopfadese = (D) => this.#b(D), e.wl = (D) => this.#a(D), e.ws = (D) => this.#m(D), e.xchgbuf = (D) => this.#y(D), r.setVal_Nochk("save", "const.sn.loopPlaying", "{}"), r.setVal_Nochk("tmp", "const.sn.sound.codecs", JSON.stringify(I.supported)), SndBuf.init(t, r, N, k), R.disableAutoPause = !0;
|
|
21016
21015
|
}
|
|
21017
|
-
#e = {};
|
|
21018
21016
|
#t = {};
|
|
21017
|
+
#e = {};
|
|
21019
21018
|
#r;
|
|
21020
21019
|
setEvtMng(t) {
|
|
21021
21020
|
this.#r = t, SndBuf.setEvtMng(t);
|
|
@@ -21047,7 +21046,7 @@ class SoundMng {
|
|
|
21047
21046
|
// 効果音のフェード
|
|
21048
21047
|
#p(t) {
|
|
21049
21048
|
const { buf: e = "SE" } = t;
|
|
21050
|
-
return this.#b(t), this.#
|
|
21049
|
+
return this.#b(t), this.#t[e]?.fade(t), !1;
|
|
21051
21050
|
}
|
|
21052
21051
|
// BGM の演奏
|
|
21053
21052
|
#s(t) {
|
|
@@ -21058,16 +21057,16 @@ class SoundMng {
|
|
|
21058
21057
|
const { buf: e = "SE", fn: r } = t;
|
|
21059
21058
|
if (this.#d({ buf: e }), !r)
|
|
21060
21059
|
throw `[playse] fnは必須です buf:${e}`;
|
|
21061
|
-
return argChk_Boolean(t, "canskip", !0) && this.#r.isSkipping() ? !1 : (this.#
|
|
21060
|
+
return argChk_Boolean(t, "canskip", !0) && this.#r.isSkipping() ? !1 : (this.#t[e] = new SndBuf()).init(t);
|
|
21062
21061
|
}
|
|
21063
21062
|
clearCache() {
|
|
21064
21063
|
R.removeAll();
|
|
21065
21064
|
}
|
|
21066
21065
|
// 全効果音再生の停止
|
|
21067
21066
|
#g() {
|
|
21068
|
-
for (const t of Object.keys(this.#
|
|
21067
|
+
for (const t of Object.keys(this.#t))
|
|
21069
21068
|
this.#d({ buf: t });
|
|
21070
|
-
return this.#
|
|
21069
|
+
return this.#t = {}, R.stopAll(), !1;
|
|
21071
21070
|
}
|
|
21072
21071
|
// BGM 演奏の停止(loadから使うのでマクロ化禁止)
|
|
21073
21072
|
#f(t) {
|
|
@@ -21076,7 +21075,7 @@ class SoundMng {
|
|
|
21076
21075
|
// 効果音再生の停止
|
|
21077
21076
|
#d(t) {
|
|
21078
21077
|
const { buf: e = "SE" } = t;
|
|
21079
|
-
return this.#
|
|
21078
|
+
return this.#t[e]?.stopse(t), !1;
|
|
21080
21079
|
}
|
|
21081
21080
|
// BGM フェードの終了待ち
|
|
21082
21081
|
#v(t) {
|
|
@@ -21085,12 +21084,12 @@ class SoundMng {
|
|
|
21085
21084
|
// 効果音フェードの終了待ち
|
|
21086
21085
|
#u(t) {
|
|
21087
21086
|
const { buf: e = "SE" } = t;
|
|
21088
|
-
return this.#
|
|
21087
|
+
return this.#t[e]?.wf(t);
|
|
21089
21088
|
}
|
|
21090
21089
|
// 音声フェードの停止
|
|
21091
21090
|
#b(t) {
|
|
21092
21091
|
const { buf: e = "SE" } = t;
|
|
21093
|
-
return this.#
|
|
21092
|
+
return this.#t[e]?.stopfadese(t), !1;
|
|
21094
21093
|
}
|
|
21095
21094
|
// BGM 再生の終了待ち
|
|
21096
21095
|
#a(t) {
|
|
@@ -21099,12 +21098,12 @@ class SoundMng {
|
|
|
21099
21098
|
// 効果音再生の終了待ち
|
|
21100
21099
|
#m(t) {
|
|
21101
21100
|
const { buf: e = "SE" } = t;
|
|
21102
|
-
return this.#
|
|
21101
|
+
return this.#t[e]?.ws(t);
|
|
21103
21102
|
}
|
|
21104
21103
|
// 再生トラックの交換
|
|
21105
21104
|
#y(t) {
|
|
21106
21105
|
const { buf: e = "SE", buf2: r = "SE" } = t;
|
|
21107
|
-
return e === r || ([this.#
|
|
21106
|
+
return e === r || ([this.#t[e], this.#t[r]] = [this.#t[r], this.#t[e]], SndBuf.xchgbuf(t)), !1;
|
|
21108
21107
|
}
|
|
21109
21108
|
// しおりの読込(BGM状態復元)
|
|
21110
21109
|
playLoopFromSaveObj() {
|
|
@@ -21112,8 +21111,8 @@ class SoundMng {
|
|
|
21112
21111
|
const t = String(this.val.getVal("save:const.sn.loopPlaying", "{}"));
|
|
21113
21112
|
if (t === "{}")
|
|
21114
21113
|
return;
|
|
21115
|
-
this.#
|
|
21116
|
-
const e = Object.keys(this.#
|
|
21114
|
+
this.#e = JSON.parse(t);
|
|
21115
|
+
const e = Object.keys(this.#e).map((r) => () => {
|
|
21117
21116
|
const N = "save:const.sn.sound." + r + ".";
|
|
21118
21117
|
if (this.val.getVal(N + "start_ms") === void 0)
|
|
21119
21118
|
return;
|
|
@@ -21142,16 +21141,16 @@ class Pages {
|
|
|
21142
21141
|
const H = U(), z = U();
|
|
21143
21142
|
H.layname = z.layname = t;
|
|
21144
21143
|
const V = k[":id_tag"] = `layer:${t} cls:${e} page:`;
|
|
21145
|
-
H.spLay.name = H.name = V + "A", H.spLay.name = z.name = V + "B", r.addChild(H.spLay), N.addChild(z.spLay), argChk_Boolean(k, "visible", !0), argChk_Boolean(k, "visible", !0), $.isWait = H.lay(k) || z.lay(k), this.#
|
|
21144
|
+
H.spLay.name = H.name = V + "A", H.spLay.name = z.name = V + "B", r.addChild(H.spLay), N.addChild(z.spLay), argChk_Boolean(k, "visible", !0), argChk_Boolean(k, "visible", !0), $.isWait = H.lay(k) || z.lay(k), this.#t = { fore: H, back: z };
|
|
21146
21145
|
const X = `const.sn.lay.${t}`;
|
|
21147
|
-
B.setVal_Nochk("tmp", X, !0), B.defTmp(X + ".fore.alpha", () => this.#
|
|
21146
|
+
B.setVal_Nochk("tmp", X, !0), B.defTmp(X + ".fore.alpha", () => this.#t.fore.alpha), B.defTmp(X + ".back.alpha", () => this.#t.back.alpha), B.defTmp(X + ".fore.height", () => this.#t.fore.height), B.defTmp(X + ".back.height", () => this.#t.back.height), B.defTmp(X + ".fore.visible", () => this.#t.fore.spLay.visible), B.defTmp(X + ".back.visible", () => this.#t.back.spLay.visible), B.defTmp(X + ".fore.width", () => this.#t.fore.width), B.defTmp(X + ".back.width", () => this.#t.back.width), B.defTmp(X + ".fore.x", () => this.#t.fore.x), B.defTmp(X + ".back.x", () => this.#t.back.x), B.defTmp(X + ".fore.y", () => this.#t.fore.y), B.defTmp(X + ".back.y", () => this.#t.back.y);
|
|
21148
21147
|
}
|
|
21149
|
-
#
|
|
21148
|
+
#t;
|
|
21150
21149
|
destroy() {
|
|
21151
|
-
this.#
|
|
21150
|
+
this.#t.fore.destroy(), this.#t.back.destroy();
|
|
21152
21151
|
}
|
|
21153
21152
|
lay = (t) => this.getPage(t).lay(t);
|
|
21154
|
-
getPage = (t) => Pages.argChk_page(t, "fore") !== "back" ? this.#
|
|
21153
|
+
getPage = (t) => Pages.argChk_page(t, "fore") !== "back" ? this.#t.fore : this.#t.back;
|
|
21155
21154
|
static argChk_page(t, e) {
|
|
21156
21155
|
const r = t.page ?? e;
|
|
21157
21156
|
if (r === "fore" || r === "back")
|
|
@@ -21159,13 +21158,13 @@ class Pages {
|
|
|
21159
21158
|
throw Error("属性 page【" + r + "】が不正です");
|
|
21160
21159
|
}
|
|
21161
21160
|
get fore() {
|
|
21162
|
-
return this.#
|
|
21161
|
+
return this.#t.fore;
|
|
21163
21162
|
}
|
|
21164
21163
|
get back() {
|
|
21165
|
-
return this.#
|
|
21164
|
+
return this.#t.back;
|
|
21166
21165
|
}
|
|
21167
21166
|
transPage(t) {
|
|
21168
|
-
[this.#
|
|
21167
|
+
[this.#t.back, this.#t.fore] = [this.#t.fore, this.#t.back], this.#t.back.copy(this.#t.fore, t);
|
|
21169
21168
|
}
|
|
21170
21169
|
}
|
|
21171
21170
|
class Layer {
|
|
@@ -21257,12 +21256,12 @@ class Layer {
|
|
|
21257
21256
|
static getBlendmodeNum(t) {
|
|
21258
21257
|
if (!t)
|
|
21259
21258
|
return BLEND_MODES.NORMAL;
|
|
21260
|
-
const e = Layer.#
|
|
21259
|
+
const e = Layer.#t[t];
|
|
21261
21260
|
if (e !== void 0)
|
|
21262
21261
|
return e;
|
|
21263
21262
|
throw `${t} はサポートされない blendmode です`;
|
|
21264
21263
|
}
|
|
21265
|
-
static #
|
|
21264
|
+
static #t = {
|
|
21266
21265
|
normal: BLEND_MODES.NORMAL,
|
|
21267
21266
|
add: BLEND_MODES.ADD,
|
|
21268
21267
|
multiply: BLEND_MODES.MULTIPLY,
|
|
@@ -21300,9 +21299,9 @@ class Layer {
|
|
|
21300
21299
|
*/
|
|
21301
21300
|
};
|
|
21302
21301
|
static getNum2Blendmode(t) {
|
|
21303
|
-
return Layer.#
|
|
21302
|
+
return Layer.#e[t] ?? "normal";
|
|
21304
21303
|
}
|
|
21305
|
-
static #
|
|
21304
|
+
static #e = {
|
|
21306
21305
|
0: "normal",
|
|
21307
21306
|
1: "add",
|
|
21308
21307
|
2: "multiply",
|
|
@@ -21460,8 +21459,8 @@ class PicBtnDesignCast extends BtnDesignCast {
|
|
|
21460
21459
|
}
|
|
21461
21460
|
}
|
|
21462
21461
|
class GrpLayer extends Layer {
|
|
21463
|
-
static #
|
|
21464
|
-
static #
|
|
21462
|
+
static #t = new EventListenerCtn();
|
|
21463
|
+
static #e = {};
|
|
21465
21464
|
static #r;
|
|
21466
21465
|
static #i;
|
|
21467
21466
|
static #n;
|
|
@@ -21490,7 +21489,7 @@ class GrpLayer extends Layer {
|
|
|
21490
21489
|
GrpLayer.#s = t;
|
|
21491
21490
|
}
|
|
21492
21491
|
static destroy() {
|
|
21493
|
-
GrpLayer.#
|
|
21492
|
+
GrpLayer.#t.clear(), GrpLayer.#e = {}, GrpLayer.hFn2ResAniSpr = {}, GrpLayer.hFn2VElm = {};
|
|
21494
21493
|
}
|
|
21495
21494
|
#c = new GrpLayDesignCast(this.spLay, this);
|
|
21496
21495
|
constructor() {
|
|
@@ -21547,7 +21546,7 @@ class GrpLayer extends Layer {
|
|
|
21547
21546
|
t.split(",").forEach((U, H) => {
|
|
21548
21547
|
if (!U)
|
|
21549
21548
|
throw "face属性に空要素が含まれます";
|
|
21550
|
-
const { dx: z, dy: V, blendmode: X, fn: q } = GrpLayer.#
|
|
21549
|
+
const { dx: z, dy: V, blendmode: X, fn: q } = GrpLayer.#e[U] || {
|
|
21551
21550
|
fn: U,
|
|
21552
21551
|
dx: 0,
|
|
21553
21552
|
dy: 0,
|
|
@@ -21652,11 +21651,13 @@ class GrpLayer extends Layer {
|
|
|
21652
21651
|
return GrpLayer.#T(e), !1;
|
|
21653
21652
|
const N = () => {
|
|
21654
21653
|
GrpLayer.#T(e), this.#r.resume();
|
|
21654
|
+
}, k = () => {
|
|
21655
|
+
this.#s.finishLimitedEvent(), N();
|
|
21655
21656
|
};
|
|
21656
|
-
return r.addEventListener("ended",
|
|
21657
|
+
return r.addEventListener("ended", k, { once: !0, passive: !0 }), GrpLayer.#s.waitEvent(
|
|
21657
21658
|
t,
|
|
21658
21659
|
() => {
|
|
21659
|
-
r.removeEventListener("ended",
|
|
21660
|
+
r.removeEventListener("ended", k), N();
|
|
21660
21661
|
}
|
|
21661
21662
|
);
|
|
21662
21663
|
}
|
|
@@ -21745,10 +21746,10 @@ class GrpLayer extends Layer {
|
|
|
21745
21746
|
const { name: e } = t;
|
|
21746
21747
|
if (!e)
|
|
21747
21748
|
throw "nameは必須です";
|
|
21748
|
-
if (e in GrpLayer.#
|
|
21749
|
+
if (e in GrpLayer.#e)
|
|
21749
21750
|
throw "一つのname(" + e + ")に対して同じ画像を複数割り当てられません";
|
|
21750
21751
|
const { fn: r = e } = t;
|
|
21751
|
-
return GrpLayer.#
|
|
21752
|
+
return GrpLayer.#e[e] = {
|
|
21752
21753
|
fn: r,
|
|
21753
21754
|
dx: argChk_Num(t, "dx", 0),
|
|
21754
21755
|
dy: argChk_Num(t, "dy", 0),
|
|
@@ -21756,7 +21757,7 @@ class GrpLayer extends Layer {
|
|
|
21756
21757
|
}, !1;
|
|
21757
21758
|
}
|
|
21758
21759
|
static clearFace2Name() {
|
|
21759
|
-
GrpLayer.#
|
|
21760
|
+
GrpLayer.#e = {};
|
|
21760
21761
|
}
|
|
21761
21762
|
// アニメ・動画を含むか
|
|
21762
21763
|
get containMovement() {
|
|
@@ -21807,12 +21808,12 @@ class GrpLayer extends Layer {
|
|
|
21807
21808
|
}
|
|
21808
21809
|
class TxtStage extends Container {
|
|
21809
21810
|
constructor(t, e, r) {
|
|
21810
|
-
super(), this.spLay = t, this.canFocus = e, this.sys = r, this.#i.classList.add("sn_tx"), this.#i.style.position = "absolute", TxtStage.#
|
|
21811
|
+
super(), this.spLay = t, this.canFocus = e, this.sys = r, this.#i.classList.add("sn_tx"), this.#i.style.position = "absolute", TxtStage.#e.view.parentElement.appendChild(this.#i), this.addChild(this.#n), this.addChild(this.#o), this.#o.name = "grpDbgMasume", this.#l = new TxtLayDesignCast(this.spLay, this), this.#l.adopt(this.#p);
|
|
21811
21812
|
}
|
|
21812
|
-
static #e;
|
|
21813
21813
|
static #t;
|
|
21814
|
+
static #e;
|
|
21814
21815
|
static init(t, e) {
|
|
21815
|
-
TxtStage.#
|
|
21816
|
+
TxtStage.#t = t, TxtStage.#e = e, TxtStage.#S = /[、。,.)]}〉」』】〕”〟ぁぃぅぇぉっゃゅょゎァィゥェォッャュョヮヵヶ!?!?‼⁉・ーゝゞヽヾ々]/, TxtStage.#E = /[[({〈「『【〔“〝]/, TxtStage.#B = /[─‥…]/;
|
|
21816
21817
|
}
|
|
21817
21818
|
static #r;
|
|
21818
21819
|
static setEvtMng(t) {
|
|
@@ -22106,7 +22107,7 @@ class TxtStage extends Container {
|
|
|
22106
22107
|
TxtStage.#$.visible = !1;
|
|
22107
22108
|
let r = this.#T.length, N = "";
|
|
22108
22109
|
if (r === 0) {
|
|
22109
|
-
if (TxtStage.#
|
|
22110
|
+
if (TxtStage.#t.oCfg.debug.masume && (CmnLib.debugLog && console.log(`🍌 masume ${this.name} v:${this.visible} l:${this.x} t:${this.y} a:${this.alpha} pl:${this.#s.pad_left} pr:${this.#s.pad_right} pt:${this.#s.pad_top} pb:${this.#s.pad_bottom} w:${this.#s.$width} h:${this.#s.$height}`), this.#o.clear().beginFill(3407616, 0.2).lineStyle(1, 3407616, 1).drawRect(-this.#s.pad_left, -this.#s.pad_top, this.#s.$width, this.#s.$height).endFill().beginFill(13311, 0.2).lineStyle(2, 13311, 1).drawRect(
|
|
22110
22111
|
0,
|
|
22111
22112
|
0,
|
|
22112
22113
|
this.#s.$width - this.#s.pad_left - this.#s.pad_right,
|
|
@@ -22196,7 +22197,7 @@ class TxtStage extends Container {
|
|
|
22196
22197
|
}
|
|
22197
22198
|
} while (H < 0);
|
|
22198
22199
|
const X = CmnLib.debugLog ? (Z, J) => console.log(`🍌 masume ch:${Z.ch} x:${J.x} y:${J.y} w:${J.width} h:${J.height}`) : () => {
|
|
22199
|
-
}, q = TxtStage.#
|
|
22200
|
+
}, q = TxtStage.#t.oCfg.debug.masume ? (Z, J) => {
|
|
22200
22201
|
X(Z, J), this.#o.beginFill(6737151, 0.5).lineStyle(2, 16724736, 1).drawRect(J.x, J.y, J.width, J.height).endFill();
|
|
22201
22202
|
} : () => {
|
|
22202
22203
|
}, W = CmnTween.ease(this.#R);
|
|
@@ -22469,20 +22470,20 @@ class TxtStage extends Container {
|
|
|
22469
22470
|
}
|
|
22470
22471
|
}
|
|
22471
22472
|
class RubySpliter {
|
|
22472
|
-
static #
|
|
22473
|
+
static #t = "ヽ";
|
|
22473
22474
|
static setting(t) {
|
|
22474
|
-
t.sesame && (RubySpliter.#
|
|
22475
|
+
t.sesame && (RubySpliter.#t = t.sesame);
|
|
22475
22476
|
}
|
|
22476
22477
|
static getSesame() {
|
|
22477
|
-
return RubySpliter.#
|
|
22478
|
+
return RubySpliter.#t;
|
|
22478
22479
|
}
|
|
22479
22480
|
static destroy() {
|
|
22480
|
-
RubySpliter.#
|
|
22481
|
+
RubySpliter.#t = "ヽ";
|
|
22481
22482
|
}
|
|
22482
|
-
#
|
|
22483
|
+
#e = () => {
|
|
22483
22484
|
};
|
|
22484
22485
|
init(t) {
|
|
22485
|
-
this.#
|
|
22486
|
+
this.#e = t;
|
|
22486
22487
|
}
|
|
22487
22488
|
/*
|
|
22488
22489
|
★Unicodeで「漢字」の正規表現 – ものかの http://tama-san.com/kanji-regex/
|
|
@@ -22526,32 +22527,32 @@ class RubySpliter {
|
|
|
22526
22527
|
continue;
|
|
22527
22528
|
}
|
|
22528
22529
|
if (D) {
|
|
22529
|
-
this.#
|
|
22530
|
+
this.#e(D.slice(1), "");
|
|
22530
22531
|
continue;
|
|
22531
22532
|
}
|
|
22532
22533
|
for (const U of Array.from(B))
|
|
22533
|
-
this.#
|
|
22534
|
+
this.#e(U, "");
|
|
22534
22535
|
}
|
|
22535
22536
|
}
|
|
22536
22537
|
putTxtRb(t, e) {
|
|
22537
22538
|
if (/^\w+|{"/.test(e)) {
|
|
22538
|
-
this.#
|
|
22539
|
+
this.#e(t, e);
|
|
22539
22540
|
return;
|
|
22540
22541
|
}
|
|
22541
22542
|
const r = Array.from(t), N = r.length;
|
|
22542
22543
|
if (/^\*.?$/.test(e)) {
|
|
22543
|
-
const $ = "center|" + (e === "*" ? RubySpliter.#
|
|
22544
|
+
const $ = "center|" + (e === "*" ? RubySpliter.#t : e.charAt(1));
|
|
22544
22545
|
for (let U = 0; U < N; ++U)
|
|
22545
|
-
this.#
|
|
22546
|
+
this.#e(r[U], $);
|
|
22546
22547
|
return;
|
|
22547
22548
|
}
|
|
22548
22549
|
if (N === 1 || e.indexOf(" ") === -1) {
|
|
22549
|
-
this.#
|
|
22550
|
+
this.#e(t, decodeURIComponent(e));
|
|
22550
22551
|
return;
|
|
22551
22552
|
}
|
|
22552
22553
|
const k = e.split(" "), D = k.length, B = D > N ? D : N;
|
|
22553
22554
|
for (let $ = 0; $ < B; ++$)
|
|
22554
|
-
this.#
|
|
22555
|
+
this.#e(
|
|
22555
22556
|
$ < N ? r[$] : "",
|
|
22556
22557
|
$ < D ? decodeURIComponent(k[$]) : ""
|
|
22557
22558
|
);
|
|
@@ -22621,7 +22622,7 @@ class Button extends Container {
|
|
|
22621
22622
|
(z) => {
|
|
22622
22623
|
Layer.setBlendmode(this, t), z && r();
|
|
22623
22624
|
}
|
|
22624
|
-
)), B.name = JSON.stringify(this.#n), this.addChild(B), this.#r.width = B.width, this.#r.height = B.height, t.b_pic || Layer.setBlendmode(this, t), Button.#
|
|
22625
|
+
)), B.name = JSON.stringify(this.#n), this.addChild(B), this.#r.width = B.width, this.#r.height = B.height, t.b_pic || Layer.setBlendmode(this, t), Button.#t(this, B), !this.#n.enabled) {
|
|
22625
22626
|
$ || r();
|
|
22626
22627
|
return;
|
|
22627
22628
|
}
|
|
@@ -22650,14 +22651,14 @@ class Button extends Container {
|
|
|
22650
22651
|
this.normal = () => B.style = D, this.#h = () => N() ? (B.style = U, !0) : !1, this.#l = () => B.style = H, $ || r();
|
|
22651
22652
|
}
|
|
22652
22653
|
static fontFamily = "'Hiragino Sans', 'Hiragino Kaku Gothic ProN', '游ゴシック Medium', meiryo, sans-serif";
|
|
22653
|
-
static #
|
|
22654
|
+
static #t = (t, e) => {
|
|
22654
22655
|
};
|
|
22655
|
-
static #
|
|
22656
|
+
static #e = (t, e, r, N) => {
|
|
22656
22657
|
};
|
|
22657
22658
|
static init(t) {
|
|
22658
|
-
t.oCfg.debug.masume && (Button.#
|
|
22659
|
+
t.oCfg.debug.masume && (Button.#t = (e, r) => e.addChild(
|
|
22659
22660
|
new Graphics().beginFill(8926088, 0.2).lineStyle(1, 8926088, 1).drawRect(r.x, r.y, r.width, r.height).endFill()
|
|
22660
|
-
), Button.#
|
|
22661
|
+
), Button.#e = (e, r, N, k) => e.addChild(
|
|
22661
22662
|
new Graphics().beginFill(8926088, 0.2).lineStyle(1, 8926088, 1).drawRect(r.x, r.y, N, k).endFill()
|
|
22662
22663
|
));
|
|
22663
22664
|
}
|
|
@@ -22699,20 +22700,20 @@ class Button extends Container {
|
|
|
22699
22700
|
#p(t) {
|
|
22700
22701
|
this.#n.alpha = t.alpha = argChk_Num(this.hArg, "alpha", t.alpha), this.#i.setSp(t);
|
|
22701
22702
|
const e = t.width / 3, r = this.#n.enabled ? e : t.width, N = t.height, k = t.texture.baseTexture, D = new Texture(k, new Rectangle(0, 0, e, N)), B = new Texture(k, new Rectangle(e, 0, e, N)), $ = new Texture(k, new Rectangle(e * 2, 0, e, N)), U = () => t.texture = D;
|
|
22702
|
-
this.#n.enabled && U(), this.normal = U, this.#h = () => this.canFocus() ? (t.texture = $, !0) : !1, this.#l = () => t.texture = B, "width" in this.hArg ? (this.#n.width = uint(this.hArg.width), this.scale.x *= this.#n.width / r) : this.#n.width = r, "height" in this.hArg ? (this.#n.height = uint(this.hArg.height), this.scale.y *= this.#n.height / N) : this.#n.height = N, t.name = JSON.stringify(this.#n), Button.#
|
|
22703
|
+
this.#n.enabled && U(), this.normal = U, this.#h = () => this.canFocus() ? (t.texture = $, !0) : !1, this.#l = () => t.texture = B, "width" in this.hArg ? (this.#n.width = uint(this.hArg.width), this.scale.x *= this.#n.width / r) : this.#n.width = r, "height" in this.hArg ? (this.#n.height = uint(this.hArg.height), this.scale.y *= this.#n.height / N) : this.#n.height = N, t.name = JSON.stringify(this.#n), Button.#e(this, t, r, N);
|
|
22703
22704
|
}
|
|
22704
22705
|
}
|
|
22705
22706
|
class TxtLayer extends Layer {
|
|
22706
|
-
static #e;
|
|
22707
22707
|
static #t;
|
|
22708
|
+
static #e;
|
|
22708
22709
|
static #r;
|
|
22709
22710
|
static #i;
|
|
22710
22711
|
static init(t, e, r, N, k, D) {
|
|
22711
|
-
TxtLayer.#
|
|
22712
|
+
TxtLayer.#t = t, TxtStage.init(t, D), TxtLayer.#e = r, TxtLayer.#i = N, TxtLayer.#r = k, r.setDoRecProc(TxtLayer.chgDoRec), e.autowc = (B) => TxtLayer.#g(B), e.autowc({ enabled: !1, text: "", time: 0 }), e.ch_in_style = (B) => TxtLayer.#n(B), e.ch_out_style = (B) => TxtLayer.#o(B), TxtStage.initChStyle(), initStyle(), addStyle(
|
|
22712
22713
|
t.matchPath(".+", SEARCH_PATH_ARG_EXT.FONT).flatMap((B) => Object.values(B).map(($) => `
|
|
22713
22714
|
@font-face {
|
|
22714
22715
|
font-family: '${$}';
|
|
22715
|
-
src: url('${this.#
|
|
22716
|
+
src: url('${this.#t.searchPath($, SEARCH_PATH_ARG_EXT.FONT)}');
|
|
22716
22717
|
}
|
|
22717
22718
|
`)).join("") + `
|
|
22718
22719
|
.sn_tx {
|
|
@@ -22797,19 +22798,19 @@ class TxtLayer extends Layer {
|
|
|
22797
22798
|
static #s = !1;
|
|
22798
22799
|
static #c = {};
|
|
22799
22800
|
static #g(t) {
|
|
22800
|
-
TxtLayer.#s = argChk_Boolean(t, "enabled", TxtLayer.#s), TxtLayer.#
|
|
22801
|
+
TxtLayer.#s = argChk_Boolean(t, "enabled", TxtLayer.#s), TxtLayer.#e.setVal_Nochk("save", "const.sn.autowc.enabled", TxtLayer.#s);
|
|
22801
22802
|
const { text: e } = t;
|
|
22802
22803
|
if ("text" in t != "time" in t)
|
|
22803
22804
|
throw "[autowc] textとtimeは同時指定必須です";
|
|
22804
|
-
if (TxtLayer.#
|
|
22805
|
-
return TxtLayer.#
|
|
22805
|
+
if (TxtLayer.#e.setVal_Nochk("save", "const.sn.autowc.text", e), !e)
|
|
22806
|
+
return TxtLayer.#e.setVal_Nochk("save", "const.sn.autowc.time", ""), !1;
|
|
22806
22807
|
const r = e.length;
|
|
22807
22808
|
if (TxtLayer.#s && r === 0)
|
|
22808
22809
|
throw '[autowc] enabled === false かつ text === "" は許されません';
|
|
22809
22810
|
const N = String(t.time).split(",");
|
|
22810
22811
|
if (N.length !== r)
|
|
22811
22812
|
throw "[autowc] text文字数とtimeに記述された待ち時間(コンマ区切り)は同数にして下さい";
|
|
22812
|
-
return TxtLayer.#c = {}, N.forEach((k, D) => TxtLayer.#c[e[D]] = uint(k)), TxtLayer.#
|
|
22813
|
+
return TxtLayer.#c = {}, N.forEach((k, D) => TxtLayer.#c[e[D]] = uint(k)), TxtLayer.#e.setVal_Nochk("save", "const.sn.autowc.time", t.time), !1;
|
|
22813
22814
|
}
|
|
22814
22815
|
// バック
|
|
22815
22816
|
#f = 0;
|
|
@@ -22918,7 +22919,7 @@ class TxtLayer extends Layer {
|
|
|
22918
22919
|
if ("back_clear" in t)
|
|
22919
22920
|
return argChk_Boolean(t, "back_clear", !1) && (this.#f = 0, this.#d = 0, this.#v = !1, this.#b = ""), e(!1), !1;
|
|
22920
22921
|
this.#d = argChk_Num(t, "b_alpha", this.#d), this.#v = argChk_Boolean(t, "b_alpha_isfixed", this.#v);
|
|
22921
|
-
const r = (this.#v ? 1 : Number(TxtLayer.#
|
|
22922
|
+
const r = (this.#v ? 1 : Number(TxtLayer.#e.getVal("sys:TextLayer.Back.Alpha"))) * this.#d;
|
|
22922
22923
|
if (t.b_pic) {
|
|
22923
22924
|
if (this.#b !== t.b_pic)
|
|
22924
22925
|
return this.#b = t.b_pic, this.#u && (this.spLay.removeChild(this.#u), this.#u.destroy()), GrpLayer.csv2Sprites(this.#b, this.spLay, (N) => {
|
|
@@ -23018,7 +23019,7 @@ class TxtLayer extends Layer {
|
|
|
23018
23019
|
}
|
|
23019
23020
|
#k = !1;
|
|
23020
23021
|
#M = (t, e) => {
|
|
23021
|
-
TxtLayer.#
|
|
23022
|
+
TxtLayer.#t.oCfg.debug.putCh && console.log(`🖊 文字表示 text:\`${t}\` ruby:\`${e}\` name:\`${this.name_}\``);
|
|
23022
23023
|
const r = e.split("|");
|
|
23023
23024
|
let N = "";
|
|
23024
23025
|
const [k, ...D] = r, B = D.join("|");
|
|
@@ -23080,7 +23081,7 @@ class TxtLayer extends Layer {
|
|
|
23080
23081
|
this.#V = !1, this.#k = !0;
|
|
23081
23082
|
{
|
|
23082
23083
|
const { t: $, r: U = "", wait: H = null, style: z = "", r_style: V = "" } = JSON.parse(B);
|
|
23083
|
-
TxtLayer.#
|
|
23084
|
+
TxtLayer.#e.doRecLog() && (this.#H += t + (e ? `《${e}》` : ""), this.#K += $);
|
|
23084
23085
|
const X = CmnLib.isSafari ? U.replaceAll(/[A-Za-z0-9]/g, (K) => String.fromCharCode(K.charCodeAt(0) + 65248)) : U, { cl: q, sty: W, lnk: Y } = this.#D(!0, H);
|
|
23085
23086
|
N = `<span${q} style='${W}${this.#x($)} ${z}'><ruby><span${Y} style='${W} display: inline;
|
|
23086
23087
|
text-combine-upright: all;
|
|
@@ -23119,7 +23120,7 @@ text-combine-upright: all;
|
|
|
23119
23120
|
};
|
|
23120
23121
|
#q(t, e, r) {
|
|
23121
23122
|
const N = t === " " ? " " : t;
|
|
23122
|
-
TxtLayer.#
|
|
23123
|
+
TxtLayer.#e.doRecLog() && (this.#H += N + (e ? `《${e}》` : ""), t !== " " && (this.#K += t));
|
|
23123
23124
|
const { cl: k, sty: D, lnk: B } = this.#D(!0, null, t);
|
|
23124
23125
|
return e ? `<span${k} style='${D} ${this.#x(t)}'><ruby>${// 文字個別に出現させるため以下にも ${cl} が必要
|
|
23125
23126
|
Array.from(t).map(($, U) => `<span${k}${B} style='${U > 0 ? this.#D(!0, null, t).sty : D} display: inline;'>${$ === " " ? " " : $}</span>`).join("")}<rt${B}${this.mkStyle_r_align(
|
|
@@ -23253,15 +23254,15 @@ class FrameMng {
|
|
|
23253
23254
|
constructor(t, e, r, N, k, D) {
|
|
23254
23255
|
this.cfg = t, this.appPixi = r, this.val = N, this.main = k, this.sys = D, e.add_frame = (B) => this.#r(B), e.let_frame = (B) => this.#o(B), e.set_frame = (B) => this.#h(B), e.frame = (B) => this.#p(B), e.tsy_frame = (B) => this.#s(B);
|
|
23255
23256
|
}
|
|
23256
|
-
#
|
|
23257
|
+
#t;
|
|
23257
23258
|
setEvtMng(t) {
|
|
23258
|
-
this.#
|
|
23259
|
+
this.#t = t;
|
|
23259
23260
|
}
|
|
23260
|
-
#
|
|
23261
|
+
#e = /* @__PURE__ */ Object.create(null);
|
|
23261
23262
|
destroy() {
|
|
23262
|
-
for (const t of Object.values(this.#
|
|
23263
|
+
for (const t of Object.values(this.#e))
|
|
23263
23264
|
t.parentElement.removeChild(t);
|
|
23264
|
-
this.#
|
|
23265
|
+
this.#e = /* @__PURE__ */ Object.create(null);
|
|
23265
23266
|
}
|
|
23266
23267
|
// HTMLフレーム
|
|
23267
23268
|
// フレーム追加
|
|
@@ -23286,13 +23287,13 @@ class FrameMng {
|
|
|
23286
23287
|
W?.();
|
|
23287
23288
|
}), X.load((q, W) => {
|
|
23288
23289
|
const Y = document.getElementById(e);
|
|
23289
|
-
this.#
|
|
23290
|
+
this.#e[e] = Y, this.#i[e] = !1, Y.srcdoc = String(W[r]?.data).replace("sn_repRes();", "").replaceAll(
|
|
23290
23291
|
/\s(?:src|href)=(["'])(\S+)\1/g,
|
|
23291
23292
|
(K, Z, J) => J.slice(0, 3) === "../" ? this.sys.cur + J.slice(4) : K.replace(Z, Z + V.slice(0, V.lastIndexOf("/") + 1))
|
|
23292
23293
|
), Y.onload = () => {
|
|
23293
23294
|
this.val.setVal_Nochk("tmp", $, !0), this.val.setVal_Nochk("tmp", $ + ".alpha", N), this.val.setVal_Nochk("tmp", $ + ".x", z.x), this.val.setVal_Nochk("tmp", $ + ".y", z.y), this.val.setVal_Nochk("tmp", $ + ".scale_x", k), this.val.setVal_Nochk("tmp", $ + ".scale_y", D), this.val.setVal_Nochk("tmp", $ + ".rotate", B), this.val.setVal_Nochk("tmp", $ + ".width", z.width), this.val.setVal_Nochk("tmp", $ + ".height", z.height), this.val.setVal_Nochk("tmp", $ + ".visible", U);
|
|
23294
23295
|
const K = Y.contentWindow;
|
|
23295
|
-
this.#
|
|
23296
|
+
this.#t.resvFlameEvent(K), K.sn_repRes?.((Z) => GrpLayer.loadPic2Img(Z.dataset.src ?? "", Z)), this.main.resume();
|
|
23296
23297
|
};
|
|
23297
23298
|
}), !0;
|
|
23298
23299
|
}
|
|
@@ -23310,7 +23311,7 @@ class FrameMng {
|
|
|
23310
23311
|
);
|
|
23311
23312
|
}
|
|
23312
23313
|
cvsResize() {
|
|
23313
|
-
for (const [t, e] of Object.entries(this.#
|
|
23314
|
+
for (const [t, e] of Object.entries(this.#e)) {
|
|
23314
23315
|
const r = "const.sn.frm." + t, N = Number(this.val.getVal(r + ".x")), k = Number(this.val.getVal(r + ".y")), D = Number(this.val.getVal(r + ".width")), B = Number(this.val.getVal(r + ".height"));
|
|
23315
23316
|
e.style.left = `${this.sys.ofsLeft4elm + N * this.sys.cvsScale}px`, e.style.top = `${this.sys.ofsTop4elm + k * this.sys.cvsScale}px`, e.width = String(D * this.sys.cvsScale), e.height = String(B * this.sys.cvsScale);
|
|
23316
23317
|
}
|
|
@@ -23462,7 +23463,7 @@ class LayerMng {
|
|
|
23462
23463
|
this.#d("grp|" + Y);
|
|
23463
23464
|
}), this.#n = parseColor(String(t.oCfg.init.bg_color));
|
|
23464
23465
|
const V = new Graphics();
|
|
23465
|
-
V.beginFill(this.#n, 1).lineStyle(0, this.#n).drawRect(0, 0, CmnLib.stageW, CmnLib.stageH).endFill(), this.#
|
|
23466
|
+
V.beginFill(this.#n, 1).lineStyle(0, this.#n).drawRect(0, 0, CmnLib.stageW, CmnLib.stageH).endFill(), this.#e.addChild(V.clone()), this.#r.addChild(V), this.#r.visible = !1, this.#e.name = "page:A", this.#r.name = "page:B", this.#t = r.stage, this.#t.addChild(this.#r), this.#t.addChild(this.#e), this.#t.addChild(this.#z), this.#t.addChild(this.#x), this.#t.name = "stage";
|
|
23466
23467
|
const X = (W, Y) => {
|
|
23467
23468
|
this.#f(Number(Y));
|
|
23468
23469
|
};
|
|
@@ -23474,8 +23475,8 @@ class LayerMng {
|
|
|
23474
23475
|
this.#h[W]?.(W, Y) && delete this.#h[W];
|
|
23475
23476
|
}));
|
|
23476
23477
|
}
|
|
23477
|
-
#
|
|
23478
|
-
#
|
|
23478
|
+
#t;
|
|
23479
|
+
#e = new Container();
|
|
23479
23480
|
#r = new Container();
|
|
23480
23481
|
#i;
|
|
23481
23482
|
#n;
|
|
@@ -23506,7 +23507,7 @@ class LayerMng {
|
|
|
23506
23507
|
getFrmDisabled = (t) => this.#i.getFrmDisabled(t);
|
|
23507
23508
|
#c = void 0;
|
|
23508
23509
|
cover(t, e = 0) {
|
|
23509
|
-
this.#c && (this.#
|
|
23510
|
+
this.#c && (this.#t.removeChild(this.#c), this.#c.destroy(), this.#c = void 0), t && this.#t.addChild(
|
|
23510
23511
|
(this.#c = new Graphics()).beginFill(e).lineStyle(0, e).drawRect(0, 0, CmnLib.stageW, CmnLib.stageH).endFill()
|
|
23511
23512
|
);
|
|
23512
23513
|
}
|
|
@@ -23564,7 +23565,7 @@ class LayerMng {
|
|
|
23564
23565
|
this.#r.visible = !0;
|
|
23565
23566
|
for (const H of this.#L)
|
|
23566
23567
|
D.render(H, { clear: !1 });
|
|
23567
|
-
this.#r.visible = !1, this.#z.visible = !0, this.#
|
|
23568
|
+
this.#r.visible = !1, this.#z.visible = !0, this.#e.filters = this.#x.filters, this.#e.visible = !0, D.render(this.#e, { clear: !1 }), this.#e.visible = !1, this.#e.filters = [], U();
|
|
23568
23569
|
}));
|
|
23569
23570
|
else
|
|
23570
23571
|
for (const U of this.#C(t.layer))
|
|
@@ -23573,7 +23574,7 @@ class LayerMng {
|
|
|
23573
23574
|
);
|
|
23574
23575
|
return Promise.allSettled(B).then(async () => {
|
|
23575
23576
|
const U = RenderTexture.create({ width: D.width, height: D.height });
|
|
23576
|
-
if (D.render(this.#
|
|
23577
|
+
if (D.render(this.#t, { renderTexture: U }), await this.sys.savePic(
|
|
23577
23578
|
r,
|
|
23578
23579
|
D.plugins.extract.base64(Sprite.from(U))
|
|
23579
23580
|
), !CmnTween.isTrans)
|
|
@@ -23615,7 +23616,7 @@ class LayerMng {
|
|
|
23615
23616
|
if (!r)
|
|
23616
23617
|
throw "clsは必須です";
|
|
23617
23618
|
const N = { isWait: !1 };
|
|
23618
|
-
switch (this.#a[e] = new Pages(e, r, this.#
|
|
23619
|
+
switch (this.#a[e] = new Pages(e, r, this.#e, this.#r, t, this.sys, this.val, N), this.#m.push(e), r) {
|
|
23619
23620
|
case "txt":
|
|
23620
23621
|
this.#y || (this.#j = () => {
|
|
23621
23622
|
}, this.#D = this.#W, this.#V = this.#U, this.hTag.current({ layer: e }), this.goTxt = () => {
|
|
@@ -23647,9 +23648,9 @@ class LayerMng {
|
|
|
23647
23648
|
#T(t) {
|
|
23648
23649
|
const e = this.#Y(t), r = this.#a[e], N = r.back.spLay, k = r.fore.spLay;
|
|
23649
23650
|
if (argChk_Boolean(t, "float", !1))
|
|
23650
|
-
this.#r.setChildIndex(N, this.#r.children.length - 1), this.#
|
|
23651
|
+
this.#r.setChildIndex(N, this.#r.children.length - 1), this.#e.setChildIndex(k, this.#e.children.length - 1), this.#I();
|
|
23651
23652
|
else if (t.index)
|
|
23652
|
-
argChk_Num(t, "index", 0) && (this.#r.setChildIndex(N, t.index), this.#
|
|
23653
|
+
argChk_Num(t, "index", 0) && (this.#r.setChildIndex(N, t.index), this.#e.setChildIndex(k, t.index), this.#I());
|
|
23653
23654
|
else if (t.dive) {
|
|
23654
23655
|
const { dive: D } = t;
|
|
23655
23656
|
let B = 0;
|
|
@@ -23658,8 +23659,8 @@ class LayerMng {
|
|
|
23658
23659
|
const $ = this.#a[D];
|
|
23659
23660
|
if (!$)
|
|
23660
23661
|
throw "[lay] 属性 dive【" + D + "】が不正です。レイヤーがありません";
|
|
23661
|
-
const U = $.back, H = $.fore, z = this.#r.getChildIndex(U.spLay), V = this.#
|
|
23662
|
-
B = z < V ? z : V, B > this.#r.getChildIndex(N) && --B, this.#
|
|
23662
|
+
const U = $.back, H = $.fore, z = this.#r.getChildIndex(U.spLay), V = this.#e.getChildIndex(H.spLay);
|
|
23663
|
+
B = z < V ? z : V, B > this.#r.getChildIndex(N) && --B, this.#e.setChildIndex(k, B), this.#r.setChildIndex(N, B), this.#I();
|
|
23663
23664
|
}
|
|
23664
23665
|
return t[":id_tag"] = r.fore.name.slice(0, -7), this.scrItr.recodeDesign(t), r.lay(t);
|
|
23665
23666
|
}
|
|
@@ -23748,9 +23749,9 @@ void main(void) {
|
|
|
23748
23749
|
}, Y();
|
|
23749
23750
|
};
|
|
23750
23751
|
}
|
|
23751
|
-
this.#O.resize(CmnLib.stageW, CmnLib.stageH), this.appPixi.renderer.render(this.#
|
|
23752
|
+
this.#O.resize(CmnLib.stageW, CmnLib.stageH), this.appPixi.renderer.render(this.#e, { renderTexture: this.#O });
|
|
23752
23753
|
let B = () => {
|
|
23753
|
-
this.#
|
|
23754
|
+
this.#e.visible = !0, this.appPixi.renderer.render(this.#e, { renderTexture: this.#O }), this.#e.visible = !1;
|
|
23754
23755
|
};
|
|
23755
23756
|
if (!N.some((Y) => Y.containMovement)) {
|
|
23756
23757
|
let Y = B;
|
|
@@ -23764,17 +23765,17 @@ void main(void) {
|
|
|
23764
23765
|
};
|
|
23765
23766
|
this.#x.alpha = 1;
|
|
23766
23767
|
const U = () => {
|
|
23767
|
-
this.appPixi.ticker?.remove($), [this.#
|
|
23768
|
+
this.appPixi.ticker?.remove($), [this.#e, this.#r] = [this.#r, this.#e];
|
|
23768
23769
|
const Y = [];
|
|
23769
23770
|
for (const [K, Z] of Object.entries(this.#a)) {
|
|
23770
23771
|
if (r[K]) {
|
|
23771
23772
|
Z.transPage(Y);
|
|
23772
23773
|
continue;
|
|
23773
23774
|
}
|
|
23774
|
-
const { fore: { spLay: J }, back: { spLay: tt } } = Z, et = this.#
|
|
23775
|
-
this.#
|
|
23775
|
+
const { fore: { spLay: J }, back: { spLay: tt } } = Z, et = this.#e.getChildIndex(tt);
|
|
23776
|
+
this.#e.removeChild(tt), this.#r.removeChild(J), this.#e.addChildAt(J, et), this.#r.addChildAt(tt, et);
|
|
23776
23777
|
}
|
|
23777
|
-
Promise.allSettled(Y), this.#
|
|
23778
|
+
Promise.allSettled(Y), this.#e.visible = !0, this.#r.visible = !1, this.#z.visible = !1, this.#x.visible = !1;
|
|
23778
23779
|
};
|
|
23779
23780
|
if (argChk_Num(t, "time", 0) === 0 || this.#g.isSkipping())
|
|
23780
23781
|
return U(), !1;
|
|
@@ -23814,7 +23815,7 @@ void main(void) {
|
|
|
23814
23815
|
}
|
|
23815
23816
|
#R(t = "") {
|
|
23816
23817
|
return this.#C(t).sort((e, r) => {
|
|
23817
|
-
const N = this.#
|
|
23818
|
+
const N = this.#e.getChildIndex(this.#a[e].fore.spLay), k = this.#e.getChildIndex(this.#a[r].fore.spLay);
|
|
23818
23819
|
return N < k ? -1 : N > k ? 1 : 0;
|
|
23819
23820
|
});
|
|
23820
23821
|
}
|
|
@@ -23827,13 +23828,13 @@ void main(void) {
|
|
|
23827
23828
|
N.push(this.#a[H].fore.spLay);
|
|
23828
23829
|
this.#O.resize(CmnLib.stageW, CmnLib.stageH);
|
|
23829
23830
|
const k = () => {
|
|
23830
|
-
this.#
|
|
23831
|
+
this.#e.visible = !0;
|
|
23831
23832
|
for (const H of N)
|
|
23832
23833
|
this.appPixi.renderer.render(
|
|
23833
23834
|
H,
|
|
23834
23835
|
{ renderTexture: this.#O, clear: !1 }
|
|
23835
23836
|
);
|
|
23836
|
-
this.#
|
|
23837
|
+
this.#e.visible = !1;
|
|
23837
23838
|
};
|
|
23838
23839
|
this.#x.visible = !0, this.#x.alpha = 1;
|
|
23839
23840
|
const D = uint(argChk_Num(t, "hmax", 10)), B = uint(argChk_Num(t, "vmax", 10)), $ = D === 0 ? () => {
|
|
@@ -23842,7 +23843,7 @@ void main(void) {
|
|
|
23842
23843
|
return this.#x.filters = [], CmnTween.tween(CmnTween.TW_INT_TRANS, t, this.#x, { x: 0, y: 0 }, () => {
|
|
23843
23844
|
$(), U();
|
|
23844
23845
|
}, () => {
|
|
23845
|
-
this.appPixi.ticker?.remove(k), this.#
|
|
23846
|
+
this.appPixi.ticker?.remove(k), this.#e.visible = !0, this.#x.visible = !1, this.#x.x = 0, this.#x.y = 0;
|
|
23846
23847
|
}, () => {
|
|
23847
23848
|
}), this.appPixi.ticker.add(k), !1;
|
|
23848
23849
|
}
|
|
@@ -24057,50 +24058,50 @@ void main(void) {
|
|
|
24057
24058
|
const r = [], N = [];
|
|
24058
24059
|
for (const [D, { fore: B, fore: { idx: $ }, back: U, cls: H }] of Object.entries(t)) {
|
|
24059
24060
|
N.push({ layer: D, idx: $ });
|
|
24060
|
-
const z = this.#a[D] ??= new Pages(D, H, this.#
|
|
24061
|
+
const z = this.#a[D] ??= new Pages(D, H, this.#e, this.#r, {}, this.sys, this.val, { isWait: !1 });
|
|
24061
24062
|
z.fore.playback(B, r), z.back.playback(U, r);
|
|
24062
24063
|
}
|
|
24063
|
-
const k = this.#
|
|
24064
|
+
const k = this.#e.children.length;
|
|
24064
24065
|
Promise.allSettled(r).then(() => {
|
|
24065
24066
|
for (const { layer: D, idx: B } of N.sort(({ idx: $ }, { idx: U }) => $ === U ? 0 : $ < U ? -1 : 1)) {
|
|
24066
24067
|
const { fore: $, back: U } = this.#a[D];
|
|
24067
24068
|
if (!$)
|
|
24068
24069
|
return;
|
|
24069
24070
|
const H = k > B ? B : k - 1;
|
|
24070
|
-
this.#
|
|
24071
|
+
this.#e.setChildIndex($.spLay, H), this.#r.setChildIndex(U.spLay, H);
|
|
24071
24072
|
}
|
|
24072
24073
|
e();
|
|
24073
24074
|
}).catch((D) => console.error("fn:LayerMng.ts playback e:%o", D));
|
|
24074
24075
|
}
|
|
24075
24076
|
}
|
|
24076
24077
|
class FocusMng {
|
|
24077
|
-
#
|
|
24078
|
-
#
|
|
24078
|
+
#t = [];
|
|
24079
|
+
#e = -1;
|
|
24079
24080
|
#r = new EventListenerCtn();
|
|
24080
24081
|
destroy() {
|
|
24081
|
-
this.#
|
|
24082
|
+
this.#t = [], this.#e = -1, this.#r.clear();
|
|
24082
24083
|
}
|
|
24083
24084
|
add(t, e, r) {
|
|
24084
|
-
if (this.#
|
|
24085
|
+
if (this.#t.findIndex((B) => B.btn === t) >= 0)
|
|
24085
24086
|
return;
|
|
24086
24087
|
if (t instanceof Container) {
|
|
24087
24088
|
t.on("pointerdown", () => {
|
|
24088
|
-
for (let B = this.#
|
|
24089
|
-
if (this.#
|
|
24090
|
-
this.#
|
|
24089
|
+
for (let B = this.#t.length - 1; B >= 0; --B)
|
|
24090
|
+
if (this.#t[B].btn === t) {
|
|
24091
|
+
this.#e = B;
|
|
24091
24092
|
return;
|
|
24092
24093
|
}
|
|
24093
|
-
this.#
|
|
24094
|
-
}), this.#
|
|
24094
|
+
this.#e = -1;
|
|
24095
|
+
}), this.#t.push({ btn: t, on: e, off: r });
|
|
24095
24096
|
return;
|
|
24096
24097
|
}
|
|
24097
24098
|
this.#r.add(t, "focus", () => {
|
|
24098
|
-
for (let B = this.#
|
|
24099
|
-
if (this.#
|
|
24100
|
-
this.#
|
|
24099
|
+
for (let B = this.#t.length - 1; B >= 0; --B)
|
|
24100
|
+
if (this.#t[B].btn === t) {
|
|
24101
|
+
this.#e = B;
|
|
24101
24102
|
return;
|
|
24102
24103
|
}
|
|
24103
|
-
this.#
|
|
24104
|
+
this.#e = -1;
|
|
24104
24105
|
});
|
|
24105
24106
|
let N = (B) => {
|
|
24106
24107
|
}, k = t.localName === "button" || t.localName === "a" ? (B) => !B.isTrusted && B.key === "Enter" : (B) => B.key === "Enter";
|
|
@@ -24135,11 +24136,11 @@ class FocusMng {
|
|
|
24135
24136
|
}
|
|
24136
24137
|
N(B);
|
|
24137
24138
|
}
|
|
24138
|
-
}, { passive: !0 }), t.hasAttribute("tabindex") || (t.tabIndex = 0), this.#
|
|
24139
|
+
}, { passive: !0 }), t.hasAttribute("tabindex") || (t.tabIndex = 0), this.#t.push({ btn: t, on: e, off: r });
|
|
24139
24140
|
}
|
|
24140
24141
|
remove(t) {
|
|
24141
|
-
const e = this.#
|
|
24142
|
-
e < 0 || (this.#
|
|
24142
|
+
const e = this.#t.findIndex((r) => r.btn === t);
|
|
24143
|
+
e < 0 || (this.#t.splice(e, 1), this.#t.length === 0 ? this.#e = -1 : e <= this.#e && --this.#e);
|
|
24143
24144
|
}
|
|
24144
24145
|
#i(t, e) {
|
|
24145
24146
|
const r = t.querySelectorAll("input[type]"), N = r.length;
|
|
@@ -24150,54 +24151,54 @@ class FocusMng {
|
|
|
24150
24151
|
}
|
|
24151
24152
|
}
|
|
24152
24153
|
isFocus(t) {
|
|
24153
|
-
return this.#
|
|
24154
|
+
return this.#e < 0 ? !1 : this.#t[this.#e].btn === t;
|
|
24154
24155
|
}
|
|
24155
24156
|
prev() {
|
|
24156
24157
|
this.#o();
|
|
24157
|
-
const t = this.#
|
|
24158
|
+
const t = this.#t.length;
|
|
24158
24159
|
if (t !== 0) {
|
|
24159
|
-
--this.#
|
|
24160
|
+
--this.#e < 0 && (this.#e = t - 1);
|
|
24160
24161
|
for (let e = t; e >= 1; --e) {
|
|
24161
|
-
const r = (this.#
|
|
24162
|
-
if (this.#
|
|
24163
|
-
this.#
|
|
24162
|
+
const r = (this.#e + e) % t;
|
|
24163
|
+
if (this.#t[r].on()) {
|
|
24164
|
+
this.#e = r, this.#n(r);
|
|
24164
24165
|
return;
|
|
24165
24166
|
}
|
|
24166
24167
|
}
|
|
24167
|
-
this.#
|
|
24168
|
+
this.#e = -1;
|
|
24168
24169
|
}
|
|
24169
24170
|
}
|
|
24170
24171
|
next() {
|
|
24171
24172
|
this.#o();
|
|
24172
|
-
const t = this.#
|
|
24173
|
+
const t = this.#t.length;
|
|
24173
24174
|
if (t !== 0) {
|
|
24174
|
-
++this.#
|
|
24175
|
+
++this.#e >= t && (this.#e = 0);
|
|
24175
24176
|
for (let e = 0; e < t; ++e) {
|
|
24176
|
-
const r = (this.#
|
|
24177
|
-
if (this.#
|
|
24178
|
-
this.#
|
|
24177
|
+
const r = (this.#e + e) % t;
|
|
24178
|
+
if (this.#t[r].on()) {
|
|
24179
|
+
this.#e = r, this.#n(r);
|
|
24179
24180
|
return;
|
|
24180
24181
|
}
|
|
24181
24182
|
}
|
|
24182
|
-
this.#
|
|
24183
|
+
this.#e = -1;
|
|
24183
24184
|
}
|
|
24184
24185
|
}
|
|
24185
|
-
#n = CmnLib.debugLog ? (t) => console.log(`👾 <FocusMng idx:${t} btn:%o`, this.#
|
|
24186
|
+
#n = CmnLib.debugLog ? (t) => console.log(`👾 <FocusMng idx:${t} btn:%o`, this.#t[t].btn) : () => {
|
|
24186
24187
|
};
|
|
24187
24188
|
getFocus() {
|
|
24188
|
-
if (this.#
|
|
24189
|
+
if (this.#e < 0)
|
|
24189
24190
|
return null;
|
|
24190
|
-
this.#o(), this.#
|
|
24191
|
-
const t = this.#
|
|
24191
|
+
this.#o(), this.#e >= this.#t.length && (this.#e = 0);
|
|
24192
|
+
const t = this.#t[this.#e];
|
|
24192
24193
|
return t.on() ? t.btn : null;
|
|
24193
24194
|
}
|
|
24194
24195
|
blur() {
|
|
24195
|
-
this.#o(), this.#
|
|
24196
|
+
this.#o(), this.#e = -1, globalThis.focus();
|
|
24196
24197
|
}
|
|
24197
24198
|
#o() {
|
|
24198
|
-
for (let t = this.#
|
|
24199
|
-
const e = this.#
|
|
24200
|
-
!(e.btn instanceof Container) || e.btn.parent ? e.off() : this.#
|
|
24199
|
+
for (let t = this.#t.length - 1; t >= 0; --t) {
|
|
24200
|
+
const e = this.#t[t];
|
|
24201
|
+
!(e.btn instanceof Container) || e.btn.parent ? e.off() : this.#t.splice(t, 1);
|
|
24201
24202
|
}
|
|
24202
24203
|
}
|
|
24203
24204
|
}
|
|
@@ -24207,21 +24208,19 @@ function cancelAutoSkip() {
|
|
|
24207
24208
|
tagL_enabled || (tagL_enabled = !0, val.setVal_Nochk("tmp", "sn.tagL.enabled", !0)), skip_enabled && (skip_enabled = !1, val.setVal_Nochk("tmp", "sn.skip.enabled", !1)), auto_enabled && (auto_enabled = !1, val.setVal_Nochk("tmp", "sn.auto.enabled", !1));
|
|
24208
24209
|
}
|
|
24209
24210
|
class WaitLimitedEventer {
|
|
24210
|
-
#
|
|
24211
|
-
#t = () => {
|
|
24212
|
-
};
|
|
24211
|
+
#t = new EventListenerCtn();
|
|
24213
24212
|
constructor(t, e) {
|
|
24214
|
-
|
|
24213
|
+
const r = () => {
|
|
24215
24214
|
this.destroy(), cancelAutoSkip(), e();
|
|
24216
|
-
}
|
|
24217
|
-
|
|
24218
|
-
|
|
24219
|
-
|
|
24220
|
-
|
|
24215
|
+
};
|
|
24216
|
+
skip_enabled && !skip_all && !scrItr.isNextKidoku && cancelAutoSkip(), argChk_Boolean(t, "canskip", !0) && (this.#t.add(window, "pointerdown", (N) => {
|
|
24217
|
+
N.stopPropagation(), r();
|
|
24218
|
+
}), this.#t.add(window, "keydown", (N) => {
|
|
24219
|
+
N.isComposing || (N.stopPropagation(), r());
|
|
24220
|
+
}), procWheel4wle(this.#t, r));
|
|
24221
24221
|
}
|
|
24222
24222
|
destroy() {
|
|
24223
|
-
this.#t
|
|
24224
|
-
}, this.#e.clear();
|
|
24223
|
+
this.#t.clear();
|
|
24225
24224
|
}
|
|
24226
24225
|
}
|
|
24227
24226
|
class ReadState {
|
|
@@ -24268,7 +24267,7 @@ class ReadState {
|
|
|
24268
24267
|
wait = (t) => skip_enabled ? (!skip_all && !scrItr.isNextKidoku && cancelAutoSkip(), !1) : Rs_Wait.go(t);
|
|
24269
24268
|
waitclick = (t) => Rs_WaitClick.go(t);
|
|
24270
24269
|
waitTxtAndTimer(t, e) {
|
|
24271
|
-
return ReadState.#
|
|
24270
|
+
return ReadState.#t.once(ReadState.#e, () => {
|
|
24272
24271
|
if (this.finishLimitedEvent(), t === 0) {
|
|
24273
24272
|
this.onFinish();
|
|
24274
24273
|
return;
|
|
@@ -24279,16 +24278,16 @@ class ReadState {
|
|
|
24279
24278
|
this.waitLimitedEvent(e, () => {
|
|
24280
24279
|
r.stop(), remove$6(r), this.onUserAct();
|
|
24281
24280
|
});
|
|
24282
|
-
}), this.waitLimitedEvent(e, () => {
|
|
24283
|
-
ReadState.#
|
|
24281
|
+
}), goTxt(), val.saveKidoku(), this.waitLimitedEvent(e, () => {
|
|
24282
|
+
ReadState.#t.removeAllListeners(), this.onUserAct();
|
|
24284
24283
|
});
|
|
24285
24284
|
}
|
|
24286
24285
|
static noticeCompTxt() {
|
|
24287
|
-
ReadState.#
|
|
24286
|
+
ReadState.#t.emit(ReadState.#e);
|
|
24288
24287
|
}
|
|
24289
|
-
static #
|
|
24288
|
+
static #t = new i$1();
|
|
24290
24289
|
// static必須
|
|
24291
|
-
static #
|
|
24290
|
+
static #e = "sn:notice_comp_txt";
|
|
24292
24291
|
static popLocalEvts() {
|
|
24293
24292
|
const t = hLocalEvt2Fnc;
|
|
24294
24293
|
return hLocalEvt2Fnc = {}, t;
|
|
@@ -24311,13 +24310,14 @@ class ReadState {
|
|
|
24311
24310
|
// 予約イベントの発生待ちしない waitRsvEvent()
|
|
24312
24311
|
// 使う場合、外部要因でキャンセルした際は finishLimitedEvent() で後始末を忘れないこと
|
|
24313
24312
|
waitLimitedEvent(t, e) {
|
|
24314
|
-
return this.#r.destroy(), this.#r = new WaitLimitedEventer(t, e),
|
|
24313
|
+
return this.#r.destroy(), this.#r = new WaitLimitedEventer(t, e), !0;
|
|
24315
24314
|
}
|
|
24316
24315
|
finishLimitedEvent() {
|
|
24317
24316
|
this.#r.destroy();
|
|
24318
24317
|
}
|
|
24319
24318
|
#r = new WaitLimitedEventer({}, () => {
|
|
24320
24319
|
});
|
|
24320
|
+
// ':タグ名' は未定義、デバッグ時に無視を
|
|
24321
24321
|
l(t) {
|
|
24322
24322
|
if (!tagL_enabled)
|
|
24323
24323
|
return !1;
|
|
@@ -24347,7 +24347,7 @@ class ReadState {
|
|
|
24347
24347
|
return Rs_P.go(t);
|
|
24348
24348
|
}
|
|
24349
24349
|
waitEvent(t, e) {
|
|
24350
|
-
return skip_enabled && !skip_all && !scrItr.isNextKidoku ?
|
|
24350
|
+
return skip_enabled && !skip_all && !scrItr.isNextKidoku ? Rs_Any_Wait.go(t, e) : Rs_Any.go(t, e);
|
|
24351
24351
|
}
|
|
24352
24352
|
onFinish() {
|
|
24353
24353
|
}
|
|
@@ -24396,7 +24396,7 @@ class RsEvtRsv extends ReadState {
|
|
|
24396
24396
|
super({}), main$2.resume(), elmHint.hidden = !0;
|
|
24397
24397
|
}
|
|
24398
24398
|
}
|
|
24399
|
-
class
|
|
24399
|
+
class Rs_S_fire extends ReadState {
|
|
24400
24400
|
isWait = !0;
|
|
24401
24401
|
// 予約イベントの発生待ち中か
|
|
24402
24402
|
fire(t, e) {
|
|
@@ -24419,7 +24419,7 @@ class Rs_S_base extends ReadState {
|
|
|
24419
24419
|
r.slice(-5) !== "wheel" && e.preventDefault?.(), e.stopPropagation(), !(r.slice(0, 4) !== "dom=" && layMng.clickTxtLay()) && N(e);
|
|
24420
24420
|
}
|
|
24421
24421
|
}
|
|
24422
|
-
class Rs_S extends
|
|
24422
|
+
class Rs_S extends Rs_S_fire {
|
|
24423
24423
|
static go = (t) => new Rs_S(t).waitTxtAndTimer(0, {});
|
|
24424
24424
|
onFinish() {
|
|
24425
24425
|
cancelAutoSkip();
|
|
@@ -24436,7 +24436,6 @@ class Rs_Wait extends ReadState {
|
|
|
24436
24436
|
const e = argChk_Num(t, "time", NaN);
|
|
24437
24437
|
return new Rs_Wait(t).waitTxtAndTimer(e, t);
|
|
24438
24438
|
};
|
|
24439
|
-
// 魔法数字、見えるぐらい少し待つ
|
|
24440
24439
|
onFinish() {
|
|
24441
24440
|
new RsEvtRsv();
|
|
24442
24441
|
}
|
|
@@ -24464,8 +24463,8 @@ class Rs_L_AutoSkip extends ReadState {
|
|
|
24464
24463
|
Rs_L_Wait.go(this.hArg);
|
|
24465
24464
|
}
|
|
24466
24465
|
}
|
|
24467
|
-
class Rs_L_Wait extends
|
|
24468
|
-
// [
|
|
24466
|
+
class Rs_L_Wait extends Rs_S_fire {
|
|
24467
|
+
// [l] クリック待ち
|
|
24469
24468
|
static go = (t) => {
|
|
24470
24469
|
argChk_Boolean(t, "visible", !0) && (layMng.breakLine(t), goTxt());
|
|
24471
24470
|
const e = argChk_Boolean(t, "global", !0);
|
|
@@ -24498,7 +24497,7 @@ class Rs_P_AutoSkip extends ReadState {
|
|
|
24498
24497
|
Rs_P_Wait.go(this.hArg);
|
|
24499
24498
|
}
|
|
24500
24499
|
}
|
|
24501
|
-
class Rs_P_Wait extends
|
|
24500
|
+
class Rs_P_Wait extends Rs_S_fire {
|
|
24502
24501
|
// [p] クリック待ち
|
|
24503
24502
|
static go = (t) => {
|
|
24504
24503
|
argChk_Boolean(t, "visible", !0) && (layMng.breakPage(t), goTxt());
|
|
@@ -24512,7 +24511,7 @@ class Rs_P_Wait extends Rs_S {
|
|
|
24512
24511
|
this.onFinish();
|
|
24513
24512
|
}
|
|
24514
24513
|
}
|
|
24515
|
-
class Rs_WaitClick extends
|
|
24514
|
+
class Rs_WaitClick extends Rs_S_fire {
|
|
24516
24515
|
static go = (t) => new Rs_WaitClick(t).waitTxtAndTimer(0, t);
|
|
24517
24516
|
onFinish() {
|
|
24518
24517
|
cancelAutoSkip();
|
|
@@ -24523,27 +24522,26 @@ class Rs_WaitClick extends Rs_S {
|
|
|
24523
24522
|
new RsEvtRsv();
|
|
24524
24523
|
}
|
|
24525
24524
|
}
|
|
24526
|
-
class
|
|
24525
|
+
class Rs_Any extends ReadState {
|
|
24527
24526
|
// 文字表示終了待ち(そして[*])
|
|
24528
24527
|
constructor(t, e) {
|
|
24529
24528
|
super(t), this.onIntr = e;
|
|
24530
24529
|
}
|
|
24531
|
-
static go = (t, e) => new
|
|
24530
|
+
static go = (t, e) => new Rs_Any(t, e).waitTxtAndTimer(0, t);
|
|
24532
24531
|
onFinish() {
|
|
24533
|
-
|
|
24532
|
+
Rs_Any_Wait.go(this.hArg, this.onIntr);
|
|
24534
24533
|
}
|
|
24535
24534
|
onUserAct() {
|
|
24536
24535
|
this.onFinish();
|
|
24537
24536
|
}
|
|
24538
24537
|
}
|
|
24539
|
-
class
|
|
24538
|
+
class Rs_Any_Wait extends Rs_S_fire {
|
|
24539
|
+
// fireがある → イベント受付する
|
|
24540
|
+
//class Rs_Any_Wait extends ReadState { // fireがない → イベント受付しない
|
|
24540
24541
|
constructor(t, e) {
|
|
24541
24542
|
super(t), this.onIntr = e;
|
|
24542
24543
|
}
|
|
24543
|
-
static go(t, e)
|
|
24544
|
-
const r = argChk_Boolean(t, "global", !0);
|
|
24545
|
-
return new Rs_WaitAny_Wait(t, e).waitRsvEvent(!0, r), !0;
|
|
24546
|
-
}
|
|
24544
|
+
static go = (t, e) => new Rs_Any_Wait(t, e).waitLimitedEvent(t, e);
|
|
24547
24545
|
onFinish() {
|
|
24548
24546
|
new RsEvtRsv();
|
|
24549
24547
|
}
|
|
@@ -24553,7 +24551,7 @@ class Rs_WaitAny_Wait extends Rs_S_base {
|
|
|
24553
24551
|
}
|
|
24554
24552
|
class RsPagination extends Rs_S {
|
|
24555
24553
|
get isSkipping() {
|
|
24556
|
-
return !ReadState.aPage[this.#
|
|
24554
|
+
return !ReadState.aPage[this.#t].week;
|
|
24557
24555
|
}
|
|
24558
24556
|
// return true で良いのだが、[l]でページ移動モードになったあと、[l]に戻ってモード終了してから、[p]に至る文字表示が瞬時表示になる対策
|
|
24559
24557
|
s = (t) => Rs_S.go(t);
|
|
@@ -24561,17 +24559,17 @@ class RsPagination extends Rs_S {
|
|
|
24561
24559
|
waitclick = () => !1;
|
|
24562
24560
|
waitTxtAndTimer = () => !1;
|
|
24563
24561
|
l(t) {
|
|
24564
|
-
if (!ReadState.aPage[this.#
|
|
24562
|
+
if (!ReadState.aPage[this.#t].week)
|
|
24565
24563
|
return !1;
|
|
24566
24564
|
const e = ReadState.aPage.length;
|
|
24567
|
-
return this.#
|
|
24565
|
+
return this.#t === e - 1 ? Rs_L_Wait.go(t) : (argChk_Boolean(t, "visible", !0) && (layMng.breakLine(t), goTxt()), this.waitRsvEvent(!1, !0), !0);
|
|
24568
24566
|
}
|
|
24569
24567
|
p(t) {
|
|
24570
24568
|
const e = ReadState.aPage.length;
|
|
24571
|
-
return this.#
|
|
24569
|
+
return this.#t === e - 1 ? Rs_P_Wait.go(t) : (argChk_Boolean(t, "visible", !0) && (layMng.breakPage(t), goTxt()), this.waitRsvEvent(!1, !0), !0);
|
|
24572
24570
|
}
|
|
24573
24571
|
static go = (t) => new RsPagination(t).page(t);
|
|
24574
|
-
#
|
|
24572
|
+
#t = ReadState.aPage.length - 1;
|
|
24575
24573
|
page(t) {
|
|
24576
24574
|
const { to: e } = t;
|
|
24577
24575
|
if (!e)
|
|
@@ -24579,23 +24577,23 @@ class RsPagination extends Rs_S {
|
|
|
24579
24577
|
const r = ReadState.aPage.length;
|
|
24580
24578
|
switch (e) {
|
|
24581
24579
|
case "prev":
|
|
24582
|
-
if (this.#
|
|
24580
|
+
if (this.#t === 0)
|
|
24583
24581
|
return !1;
|
|
24584
|
-
--this.#
|
|
24582
|
+
--this.#t;
|
|
24585
24583
|
break;
|
|
24586
24584
|
case "next":
|
|
24587
|
-
if (this.#
|
|
24585
|
+
if (this.#t === r - 1)
|
|
24588
24586
|
return !1;
|
|
24589
|
-
++this.#
|
|
24587
|
+
++this.#t;
|
|
24590
24588
|
break;
|
|
24591
24589
|
default:
|
|
24592
24590
|
throw `属性to「${e}」は異常です`;
|
|
24593
24591
|
}
|
|
24594
|
-
const { fn: N, index: k, mark: D } = ReadState.aPage[this.#
|
|
24592
|
+
const { fn: N, index: k, mark: D } = ReadState.aPage[this.#t];
|
|
24595
24593
|
return scrItr.loadFromMark({
|
|
24596
24594
|
fn: N,
|
|
24597
24595
|
index: k,
|
|
24598
|
-
style: this.#
|
|
24596
|
+
style: this.#t === r - 1 ? void 0 : ReadState.stylePage
|
|
24599
24597
|
//r_style までは不要か
|
|
24600
24598
|
}, D);
|
|
24601
24599
|
}
|
|
@@ -25565,7 +25563,7 @@ class EventMng {
|
|
|
25565
25563
|
<div class="sn_hint" role="tooltip">
|
|
25566
25564
|
<span>Dummy</span>
|
|
25567
25565
|
<div class="sn_hint_ar" data-popper-arrow></div>
|
|
25568
|
-
</div>`), this.#f = document.querySelector(".sn_hint"), this.#d = this.#f.querySelector("span"), this.#v = createPopper(this.#g, this.#f), this.#f.hidden = !0, r.stage.interactive = !0, CmnLib.isMobile ? r.stage.on("pointerdown", (Y) => this.fire("click", Y)) : this.#
|
|
25566
|
+
</div>`), this.#f = document.querySelector(".sn_hint"), this.#d = this.#f.querySelector("span"), this.#v = createPopper(this.#g, this.#f), this.#f.hidden = !0, r.stage.interactive = !0, CmnLib.isMobile ? r.stage.on("pointerdown", (Y) => this.fire("click", Y)) : this.#t.add(r.stage, "pointerdown", (Y) => {
|
|
25569
25567
|
switch (Y.data.button) {
|
|
25570
25568
|
case 0:
|
|
25571
25569
|
this.fire("click", Y);
|
|
@@ -25574,22 +25572,22 @@ class EventMng {
|
|
|
25574
25572
|
this.fire("middleclick", Y);
|
|
25575
25573
|
break;
|
|
25576
25574
|
}
|
|
25577
|
-
}), this.#
|
|
25575
|
+
}), this.#t.add(window, "keydown", (Y) => this.#o(Y)), this.#t.add(Main.cvs, "contextmenu", (Y) => this.#h(Y));
|
|
25578
25576
|
const H = () => D.setVal_Nochk("tmp", "const.sn.navigator.language", navigator.language);
|
|
25579
|
-
this.#
|
|
25577
|
+
this.#t.add(window, "languagechange", (Y) => {
|
|
25580
25578
|
H(), this.fire("sn:chgNavLang", Y), clearTextureCache();
|
|
25581
25579
|
}), H();
|
|
25582
25580
|
const z = (Y) => {
|
|
25583
25581
|
CmnLib.isDarkMode = Y.matches, D.setVal_Nochk("tmp", "const.sn.isDarkMode", CmnLib.isDarkMode);
|
|
25584
25582
|
}, V = globalThis.matchMedia("(prefers-color-scheme: dark)");
|
|
25585
|
-
z(V), this.#
|
|
25583
|
+
z(V), this.#t.add(V, "change", (Y) => {
|
|
25586
25584
|
z(Y), this.fire("sn:chgDarkMode", Y);
|
|
25587
25585
|
});
|
|
25588
25586
|
let X = (Y, K) => {
|
|
25589
25587
|
};
|
|
25590
|
-
"WheelEvent" in window && (this.#
|
|
25588
|
+
"WheelEvent" in window && (this.#t.add(Main.cvs, "wheel", (Y) => this.#l(Y), { passive: !0 }), this.#n = (Y) => this.#t.add(Y, "wheel", (K) => this.#l(K), { passive: !0 }), X = (Y, K) => Y.add(Main.cvs, "wheel", (Z) => {
|
|
25591
25589
|
Z.isComposing || Z.deltaY <= 0 || (Z.stopPropagation(), K());
|
|
25592
|
-
})), ReadState.init((Y) => this.#i = Y, N, D, k, $, B, e, this.#r, X, this.#f, t), CmnLib.debugLog && (this.#
|
|
25590
|
+
})), ReadState.init((Y) => this.#i = Y, N, D, k, $, B, e, this.#r, X, this.#f, t), CmnLib.debugLog && (this.#e.on("gamepad:connected", (Y) => console.log(`👺<'gamepad:connected' index:${Y.detail.index} id:${Y.detail.gamepad.id}`)), this.#e.on("gamepad:disconnected", (Y) => console.log(`👺<'gamepad:disconnected' index:${Y.detail.index} id:${Y.detail.gamepad.id}`)));
|
|
25593
25591
|
const q = [
|
|
25594
25592
|
"",
|
|
25595
25593
|
"ArrowUp",
|
|
@@ -25604,7 +25602,7 @@ class EventMng {
|
|
|
25604
25602
|
""
|
|
25605
25603
|
// '1', '2', '3',
|
|
25606
25604
|
], W = [0, 0];
|
|
25607
|
-
this.#
|
|
25605
|
+
this.#e.on("gamepad:axis", (Y) => {
|
|
25608
25606
|
if (!document.hasFocus() || Y.detail.stick !== 0)
|
|
25609
25607
|
return;
|
|
25610
25608
|
W[Y.detail.axis] = Y.detail.value;
|
|
@@ -25613,26 +25611,26 @@ class EventMng {
|
|
|
25613
25611
|
return;
|
|
25614
25612
|
const J = this.#r.getFocus();
|
|
25615
25613
|
(!J || J instanceof Container ? globalThis : J).dispatchEvent(new KeyboardEvent("keydown", { key: Z, bubbles: !0 })), !(!J || J instanceof Container) && J.getAttribute("type") === "range" && J.dispatchEvent(new InputEvent("input", { bubbles: !0 }));
|
|
25616
|
-
}), this.#
|
|
25614
|
+
}), this.#e.on("gamepad:button", (Y) => {
|
|
25617
25615
|
if (document.hasFocus())
|
|
25618
25616
|
if (Y.detail.button % 2 === 0) {
|
|
25619
25617
|
const K = this.#r.getFocus();
|
|
25620
25618
|
(!K || K instanceof Container ? globalThis : K).dispatchEvent(new KeyboardEvent("keydown", { key: "Enter", bubbles: !0 }));
|
|
25621
25619
|
} else
|
|
25622
25620
|
Main.cvs.dispatchEvent(new Event("contextmenu"));
|
|
25623
|
-
}), this.#
|
|
25621
|
+
}), this.#e.start(), this.#t.add(window, "keyup", (Y) => {
|
|
25624
25622
|
Y.isComposing || Y.key in this.#_ && (this.#_[Y.key] = 0);
|
|
25625
25623
|
}), D.defTmp("const.sn.key.alternate", () => this.#_.Alt > 0), D.defTmp("const.sn.key.command", () => this.#_.Meta > 0), D.defTmp("const.sn.key.control", () => this.#_.Control > 0), D.defTmp("const.sn.key.end", () => this.#_.End > 0), D.defTmp("const.sn.key.escape", () => this.#_.Escape > 0), D.defTmp("const.sn.key.back", () => this.#_.GoBack > 0);
|
|
25626
25624
|
}
|
|
25627
|
-
#
|
|
25628
|
-
#
|
|
25625
|
+
#t = new EventListenerCtn();
|
|
25626
|
+
#e = new GamepadListener({
|
|
25629
25627
|
analog: !1,
|
|
25630
25628
|
deadZone: 0.3
|
|
25631
25629
|
});
|
|
25632
25630
|
#r = new FocusMng();
|
|
25633
25631
|
#i;
|
|
25634
25632
|
resvFlameEvent(t) {
|
|
25635
|
-
this.#
|
|
25633
|
+
this.#t.add(t, "keydown", (e) => this.#o(e)), this.#t.add(t, "contextmenu", (e) => this.#h(e)), this.#n(t);
|
|
25636
25634
|
}
|
|
25637
25635
|
#n = (t) => {
|
|
25638
25636
|
};
|
|
@@ -25670,7 +25668,7 @@ class EventMng {
|
|
|
25670
25668
|
}, 250);
|
|
25671
25669
|
}
|
|
25672
25670
|
destroy() {
|
|
25673
|
-
this.#r.destroy(), this.#
|
|
25671
|
+
this.#r.destroy(), this.#t.clear();
|
|
25674
25672
|
}
|
|
25675
25673
|
fire(t, e) {
|
|
25676
25674
|
this.#i.fire(t, e);
|
|
@@ -25799,7 +25797,7 @@ class EventMng {
|
|
|
25799
25797
|
break;
|
|
25800
25798
|
}
|
|
25801
25799
|
B.forEach((U, H) => D.el.forEach((z) => {
|
|
25802
|
-
this.#
|
|
25800
|
+
this.#t.add(z, U, (V) => {
|
|
25803
25801
|
if (!this.#i.isWait || this.layMng.getFrmDisabled(D.id) || U === "keydown" && V.key !== "Enter")
|
|
25804
25802
|
return;
|
|
25805
25803
|
const X = z.dataset;
|
|
@@ -25862,13 +25860,12 @@ class EventMng {
|
|
|
25862
25860
|
}
|
|
25863
25861
|
return !1;
|
|
25864
25862
|
}
|
|
25865
|
-
//
|
|
25863
|
+
// テキスト表示待ちと処理終了待ち(予約イベント受付しない)
|
|
25864
|
+
// waitEvent を使用する場合、通常 break 時は finishLimitedEvent() すること
|
|
25866
25865
|
waitEvent = (t, e) => this.#i.waitEvent(t, e);
|
|
25867
|
-
|
|
25868
|
-
|
|
25869
|
-
|
|
25870
|
-
// }
|
|
25871
|
-
// finishLimitedEvent() {this.#rs.finishLimitedEvent()}
|
|
25866
|
+
finishLimitedEvent() {
|
|
25867
|
+
this.#i.finishLimitedEvent();
|
|
25868
|
+
}
|
|
25872
25869
|
noticeCompTxt() {
|
|
25873
25870
|
ReadState.noticeCompTxt();
|
|
25874
25871
|
}
|
|
@@ -25901,7 +25898,7 @@ class ScriptIterator {
|
|
|
25901
25898
|
constructor(t, e, r, N, k, D, B, $, U) {
|
|
25902
25899
|
this.cfg = t, this.hTag = e, this.main = r, this.val = N, this.alzTagArg = k, this.runAnalyze = D, this.prpPrs = B, this.sndMng = $, this.sys = U, e.let_ml = (z) => this.#B(z), e.endlet_ml = () => !1, e.dump_stack = () => this.#N(), e.dump_script = (z) => this.#z(z), e.else = // その他ifブロック開始
|
|
25903
25900
|
e.elsif = // 別条件のifブロック開始
|
|
25904
|
-
e.endif = () => this.#R(), e.if = (z) => this.#X(z), e.call = (z) => this.#k(z), e.jump = (z) => this.#q(z), e.pop_stack = (z) => this.#D(z), e.return = (z) => this.#W(z), e.bracket2macro = (z) => this.#lt(z), e.char2macro = (z) => this.#ut(z), e.endmacro = (z) => this.#W(z), e.macro = (z) => this.#pt(z), e.load = (z) => this.#vt(z), e.reload_script = (z) => this.#mt(z), e.record_place = () => this.#gt(), e.save = (z) => this.#yt(z), t.oCfg.debug.token && (this.#F = (z) => console.log(`🌱 トークン fn:${this.#
|
|
25901
|
+
e.endif = () => this.#R(), e.if = (z) => this.#X(z), e.call = (z) => this.#k(z), e.jump = (z) => this.#q(z), e.pop_stack = (z) => this.#D(z), e.return = (z) => this.#W(z), e.bracket2macro = (z) => this.#lt(z), e.char2macro = (z) => this.#ut(z), e.endmacro = (z) => this.#W(z), e.macro = (z) => this.#pt(z), e.load = (z) => this.#vt(z), e.reload_script = (z) => this.#mt(z), e.record_place = () => this.#gt(), e.save = (z) => this.#yt(z), t.oCfg.debug.token && (this.#F = (z) => console.log(`🌱 トークン fn:${this.#e} idx:${this.#r} ln:${this.#i} token【${z}】`)), N.defTmp("const.sn.aIfStk.length", () => this.#w.length), N.defTmp("const.sn.vctCallStk.length", () => this.#n.length);
|
|
25905
25902
|
const H = t.oCfg.init.escape;
|
|
25906
25903
|
if (this.#o.setEscape(H), RubySpliter.setEscape(H), CmnLib.isDbg) {
|
|
25907
25904
|
U.addHook((V, X) => this.#l[V]?.(X)), this.isBreak = this.#y;
|
|
@@ -25936,12 +25933,12 @@ class ScriptIterator {
|
|
|
25936
25933
|
} else
|
|
25937
25934
|
this.recodeDesign = () => {
|
|
25938
25935
|
};
|
|
25939
|
-
t.oCfg.debug.tag && (this.#I = (z) => console.log(`🌲 タグ解析 fn:${this.#
|
|
25936
|
+
t.oCfg.debug.tag && (this.#I = (z) => console.log(`🌲 タグ解析 fn:${this.#e} idx:${this.#r} ln:${this.#i} [${z} %o]`, this.alzTagArg.hPrm));
|
|
25940
25937
|
}
|
|
25941
|
-
#
|
|
25942
|
-
#
|
|
25938
|
+
#t = { aToken: [""], len: 1, aLNum: [1] };
|
|
25939
|
+
#e = "";
|
|
25943
25940
|
get scriptFn() {
|
|
25944
|
-
return this.#
|
|
25941
|
+
return this.#e;
|
|
25945
25942
|
}
|
|
25946
25943
|
#r = 0;
|
|
25947
25944
|
subIdxToken() {
|
|
@@ -25953,7 +25950,7 @@ class ScriptIterator {
|
|
|
25953
25950
|
}
|
|
25954
25951
|
addLineNum = (t) => this.#i += t;
|
|
25955
25952
|
jumpJustBefore() {
|
|
25956
|
-
this.#j(this.#
|
|
25953
|
+
this.#j(this.#e, "", --this.#r);
|
|
25957
25954
|
}
|
|
25958
25955
|
// 直前にジャンプ
|
|
25959
25956
|
#n = [];
|
|
@@ -25998,7 +25995,7 @@ class ScriptIterator {
|
|
|
25998
25995
|
stepin: () => {
|
|
25999
25996
|
if (this.#u())
|
|
26000
25997
|
return;
|
|
26001
|
-
const t = this.#
|
|
25998
|
+
const t = this.#t.aToken[this.#r - this.#v];
|
|
26002
25999
|
this.sys.callHook(`stopOnStep${this.#ct.test(t) ? "In" : ""}`, {}), this.#r -= this.#v, this.#m = this.#m === 1 ? 4 : 5, this.main.setLoop(!0), this.main.resume();
|
|
26003
26000
|
},
|
|
26004
26001
|
stepout: (t) => {
|
|
@@ -26014,12 +26011,12 @@ class ScriptIterator {
|
|
|
26014
26011
|
#p = (t) => this.cfg.searchPath(t, SEARCH_PATH_ARG_EXT.SCRIPT);
|
|
26015
26012
|
static #s = /(.+)\/crypto_prj\/([^\/]+)\/[^\.]+(\.\w+)/;
|
|
26016
26013
|
// https://regex101.com/r/Km54EK/1 141 steps (~0ms)
|
|
26017
|
-
#c = (t) => (this.sys.pathBaseCnvSnPath4Dbg + this.#p(t)).replace(ScriptIterator.#s, `$1/prj/$2/${this.#
|
|
26014
|
+
#c = (t) => (this.sys.pathBaseCnvSnPath4Dbg + this.#p(t)).replace(ScriptIterator.#s, `$1/prj/$2/${this.#e}$3`);
|
|
26018
26015
|
cnvPath4Dbg = (t) => this.sys.pathBaseCnvSnPath4Dbg + t.replace("/crypto_prj/", "/prj/");
|
|
26019
26016
|
#g(t) {
|
|
26020
26017
|
if (this.#u())
|
|
26021
26018
|
return;
|
|
26022
|
-
const e = this.#
|
|
26019
|
+
const e = this.#t.aToken[this.#r - this.#v];
|
|
26023
26020
|
this.#ct.test(e) ? this.#f(!1) : (this.sys.callHook("stopOnStep", {}), this.#l.stepin(t));
|
|
26024
26021
|
}
|
|
26025
26022
|
#f(t) {
|
|
@@ -26030,7 +26027,7 @@ class ScriptIterator {
|
|
|
26030
26027
|
return this.#m === 2 || this.#m === 4 ? 1 : 0;
|
|
26031
26028
|
}
|
|
26032
26029
|
#u() {
|
|
26033
|
-
return this.#r < this.#
|
|
26030
|
+
return this.#r < this.#t.len ? !1 : (this.sys.callHook("stopOnEntry", {}), this.main.setLoop(!1, "スクリプト終端です"), !0);
|
|
26034
26031
|
}
|
|
26035
26032
|
// reload 再生成 Main に受け渡すため static
|
|
26036
26033
|
static #b = {};
|
|
@@ -26059,7 +26056,7 @@ class ScriptIterator {
|
|
|
26059
26056
|
if (tagToken2Name(t) in ScriptIterator.#a)
|
|
26060
26057
|
return this.#m = 2, this.main.setLoop(!1, `関数 ${t} ブレーク`), this.sys.callHook("stopOnBreakpoint", {}), this.sys.send2Dbg("stopOnBreakpoint", {}), !0;
|
|
26061
26058
|
{
|
|
26062
|
-
const e = ScriptIterator.#b[this.#c(this.#
|
|
26059
|
+
const e = ScriptIterator.#b[this.#c(this.#e)];
|
|
26063
26060
|
if (!e)
|
|
26064
26061
|
break;
|
|
26065
26062
|
const r = e[this.#i];
|
|
@@ -26080,14 +26077,14 @@ class ScriptIterator {
|
|
|
26080
26077
|
return !1;
|
|
26081
26078
|
}
|
|
26082
26079
|
#_() {
|
|
26083
|
-
const t = ScriptIterator.#b[getFn(this.#
|
|
26080
|
+
const t = ScriptIterator.#b[getFn(this.#e)]?.[this.#i];
|
|
26084
26081
|
t?.hitCondition && --t.hitCondition;
|
|
26085
26082
|
}
|
|
26086
26083
|
#T() {
|
|
26087
|
-
const t = this.#m === 3 ? 1 : 0, e = this.#
|
|
26084
|
+
const t = this.#m === 3 ? 1 : 0, e = this.#t.aToken[this.#r - 1 + t], r = this.#c(this.#e), N = tagToken2Name(e), k = N ? `[${N}]` : e, D = this.val.getVal("mp:const.sn.macro") ?? "{}";
|
|
26088
26085
|
if (this.#r === 0)
|
|
26089
26086
|
return [{ fn: r, ln: 1, col: 1, nm: k, ma: D }];
|
|
26090
|
-
const B = this.#P(this.#
|
|
26087
|
+
const B = this.#P(this.#t, this.#r), $ = [{ fn: r, ln: B.ln, col: B.col_s + 1, nm: k, ma: D }], U = this.#n.length;
|
|
26091
26088
|
if (U === 0)
|
|
26092
26089
|
return $;
|
|
26093
26090
|
for (let H = U - 1; H >= 0; --H) {
|
|
@@ -26161,8 +26158,8 @@ class ScriptIterator {
|
|
|
26161
26158
|
if (!e)
|
|
26162
26159
|
throw "nameは必須です";
|
|
26163
26160
|
let r = "";
|
|
26164
|
-
const N = this.#
|
|
26165
|
-
for (; this.#r < N && (r = this.#
|
|
26161
|
+
const N = this.#t.len;
|
|
26162
|
+
for (; this.#r < N && (r = this.#t.aToken[this.#r], r === ""); ++this.#r)
|
|
26166
26163
|
;
|
|
26167
26164
|
return t.text = r, t.cast = "str", this.hTag.let(t), this.#r += 2, this.#i += (r.match(/\n/g) ?? []).length, !1;
|
|
26168
26165
|
}
|
|
@@ -26170,8 +26167,8 @@ class ScriptIterator {
|
|
|
26170
26167
|
// スタックのダンプ
|
|
26171
26168
|
#N() {
|
|
26172
26169
|
if (this.#r === 0)
|
|
26173
|
-
return console.group(`🥟 [dump_stack] スクリプト現在地 fn:${this.#
|
|
26174
|
-
const t = this.#P(this.#
|
|
26170
|
+
return console.group(`🥟 [dump_stack] スクリプト現在地 fn:${this.#e} line:1 col:0`), console.groupEnd(), !1;
|
|
26171
|
+
const t = this.#P(this.#t, this.#r), e = `スクリプト現在地 fn:${this.#e} line:${t.ln} col:${t.col_s + 1}`;
|
|
26175
26172
|
console.group(`🥟 [dump_stack] ${e}`);
|
|
26176
26173
|
const r = this.#n.length;
|
|
26177
26174
|
if (r > 0) {
|
|
@@ -26214,8 +26211,8 @@ class ScriptIterator {
|
|
|
26214
26211
|
}, !1;
|
|
26215
26212
|
}
|
|
26216
26213
|
if (this.noticeBreak = (N) => {
|
|
26217
|
-
this.#L !== this.#
|
|
26218
|
-
this.#$[this.#
|
|
26214
|
+
this.#L !== this.#e && (this.#L = this.#e, this.#O(
|
|
26215
|
+
this.#$[this.#e] ??= this.#t.aToken.join("")
|
|
26219
26216
|
)), this.#x(this.#i, N);
|
|
26220
26217
|
}, this.noticeBreak(!0), !r)
|
|
26221
26218
|
return !1;
|
|
@@ -26238,16 +26235,16 @@ class ScriptIterator {
|
|
|
26238
26235
|
#C = 5;
|
|
26239
26236
|
dumpErrForeLine() {
|
|
26240
26237
|
if (this.#r === 0) {
|
|
26241
|
-
console.group(`🥟 Error line (from 0 rows before) fn:${this.#
|
|
26238
|
+
console.group(`🥟 Error line (from 0 rows before) fn:${this.#e}`), console.groupEnd();
|
|
26242
26239
|
return;
|
|
26243
26240
|
}
|
|
26244
26241
|
let t = "";
|
|
26245
|
-
for (let D = this.#r - 1; D >= 0 && (t = this.#
|
|
26242
|
+
for (let D = this.#r - 1; D >= 0 && (t = this.#t.aToken[D] + t, !((t.match(/\n/g) ?? []).length >= this.#C)); --D)
|
|
26246
26243
|
;
|
|
26247
26244
|
const e = t.split(`
|
|
26248
26245
|
`).slice(-this.#C), r = e.length;
|
|
26249
|
-
console.group(`🥟 Error line (from ${r} rows before) fn:${this.#
|
|
26250
|
-
const N = String(this.#i).length, k = this.#P(this.#
|
|
26246
|
+
console.group(`🥟 Error line (from ${r} rows before) fn:${this.#e}`);
|
|
26247
|
+
const N = String(this.#i).length, k = this.#P(this.#t, this.#r);
|
|
26251
26248
|
for (let D = 0; D < r; ++D) {
|
|
26252
26249
|
const B = this.#i - r + D + 1, $ = `${String(B).padStart(N, " ")}: %c`, U = e[D], H = U.length > 75 ? U.slice(0, 75) + "…" : U;
|
|
26253
26250
|
D === r - 1 ? console.info(
|
|
@@ -26273,13 +26270,13 @@ class ScriptIterator {
|
|
|
26273
26270
|
if (e.at(0) === "&")
|
|
26274
26271
|
throw "属性expは「&」が不要です";
|
|
26275
26272
|
let r = 0, N = this.prpPrs.parse(e) ? this.#r : -1;
|
|
26276
|
-
const k = this.#
|
|
26273
|
+
const k = this.#t.aLNum[this.#r];
|
|
26277
26274
|
let D = this.#i - (k || 0);
|
|
26278
|
-
const B = this.#
|
|
26275
|
+
const B = this.#t.len;
|
|
26279
26276
|
for (; this.#r < B; ++this.#r) {
|
|
26280
|
-
const $ = this.#
|
|
26281
|
-
this.#
|
|
26282
|
-
const U = this.#
|
|
26277
|
+
const $ = this.#t.aLNum[this.#r];
|
|
26278
|
+
this.#t.aLNum[this.#r] = ($ || 0) + D;
|
|
26279
|
+
const U = this.#t.aToken[this.#r];
|
|
26283
26280
|
if (!U)
|
|
26284
26281
|
continue;
|
|
26285
26282
|
const H = U.charCodeAt(0);
|
|
@@ -26314,7 +26311,7 @@ class ScriptIterator {
|
|
|
26314
26311
|
--r;
|
|
26315
26312
|
break;
|
|
26316
26313
|
}
|
|
26317
|
-
return N === -1 ? (++this.#r, this.#
|
|
26314
|
+
return N === -1 ? (++this.#r, this.#t.aLNum[this.#r] += D) : (this.#w.unshift(this.#r + 1), this.#r = N, this.#i = this.#t.aLNum[this.#r]), !1;
|
|
26318
26315
|
}
|
|
26319
26316
|
}
|
|
26320
26317
|
throw "[endif]がないままスクリプト終端です";
|
|
@@ -26327,7 +26324,7 @@ class ScriptIterator {
|
|
|
26327
26324
|
return e && this.#p(e), this.#M({ ":hEvt1Time": this.#S.popLocalEvts(), ":hMp": this.val.cloneMp(), ":lenIfStk": this.#w.length }), argChk_Boolean(t, "clear_local_event", !1) && this.hTag.clear_event({}), this.#j(e, t.label), !0;
|
|
26328
26325
|
}
|
|
26329
26326
|
#M(t) {
|
|
26330
|
-
this.#
|
|
26327
|
+
this.#t.aLNum[this.#r] = this.#i, this.#V || (t[":resvToken"] = "", this.#U()), this.#n.push(new CallStack(this.#e, this.#r, t)), this.#w.unshift(-1);
|
|
26331
26328
|
}
|
|
26332
26329
|
// シナリオジャンプ
|
|
26333
26330
|
#q(t) {
|
|
@@ -26368,14 +26365,14 @@ class ScriptIterator {
|
|
|
26368
26365
|
if (t.includes("@"))
|
|
26369
26366
|
throw "[jump系] fn には文字「@」は禁止です";
|
|
26370
26367
|
const N = this.#p(t);
|
|
26371
|
-
if (t === this.#
|
|
26368
|
+
if (t === this.#e) {
|
|
26372
26369
|
this.analyzeInit();
|
|
26373
26370
|
return;
|
|
26374
26371
|
}
|
|
26375
|
-
this.#
|
|
26372
|
+
this.#e = t;
|
|
26376
26373
|
const k = this.#G[t];
|
|
26377
26374
|
if (k) {
|
|
26378
|
-
this.#
|
|
26375
|
+
this.#t = k, this.analyzeInit();
|
|
26379
26376
|
return;
|
|
26380
26377
|
}
|
|
26381
26378
|
const D = new Loader();
|
|
@@ -26406,7 +26403,7 @@ class ScriptIterator {
|
|
|
26406
26403
|
}), this.main.stop();
|
|
26407
26404
|
}
|
|
26408
26405
|
analyzeInit() {
|
|
26409
|
-
const t = this.#nt(this.#
|
|
26406
|
+
const t = this.#nt(this.#t, !!this.val.getVal("mp:const.sn.macro.name"), this.#i, this.#A, this.#r);
|
|
26410
26407
|
this.#r = t.idx, this.#i = t.ln, this.runAnalyze();
|
|
26411
26408
|
}
|
|
26412
26409
|
// シナリオ解析処理ループ・冒頭処理
|
|
@@ -26415,14 +26412,14 @@ class ScriptIterator {
|
|
|
26415
26412
|
#Y() {
|
|
26416
26413
|
if (this.#H())
|
|
26417
26414
|
return "";
|
|
26418
|
-
this.#ht(), this.#
|
|
26419
|
-
const t = this.#
|
|
26415
|
+
this.#ht(), this.#t.aLNum[this.#r] ||= this.#i;
|
|
26416
|
+
const t = this.#t.aToken[this.#r];
|
|
26420
26417
|
return this.#F(t), ++this.#r, t;
|
|
26421
26418
|
}
|
|
26422
26419
|
#F = (t) => {
|
|
26423
26420
|
};
|
|
26424
26421
|
#H() {
|
|
26425
|
-
return this.#r < this.#
|
|
26422
|
+
return this.#r < this.#t.len ? !1 : (this.main.errScript("スクリプト終端です"), !0);
|
|
26426
26423
|
}
|
|
26427
26424
|
#K = /(\*{2,})([^\|]*)/;
|
|
26428
26425
|
#it = /^\[macro\s/;
|
|
@@ -26496,16 +26493,16 @@ class ScriptIterator {
|
|
|
26496
26493
|
try {
|
|
26497
26494
|
e = "ScriptIterator.resolveScript";
|
|
26498
26495
|
const r = this.#o.resolveScript(t);
|
|
26499
|
-
e = "ScriptIterator.replaceScript_Wildcard", this.#ot(r), this.#G[this.#
|
|
26496
|
+
e = "ScriptIterator.replaceScript_Wildcard", this.#ot(r), this.#G[this.#e] = this.#t = r;
|
|
26500
26497
|
} catch (r) {
|
|
26501
26498
|
r instanceof Error ? e += `例外 mes=${r.message}(${r.name})` : e = r, this.main.errScript(e, !1);
|
|
26502
26499
|
}
|
|
26503
|
-
this.val.loadScrWork(this.#
|
|
26500
|
+
this.val.loadScrWork(this.#e);
|
|
26504
26501
|
}
|
|
26505
26502
|
#tt(t) {
|
|
26506
|
-
this.#
|
|
26507
|
-
const e = this.#G[this.#
|
|
26508
|
-
e && (this.#
|
|
26503
|
+
this.#e = t.fn, this.#r = t.idx;
|
|
26504
|
+
const e = this.#G[this.#e];
|
|
26505
|
+
e && (this.#t = e), this.#i = this.#t.aLNum[t.idx];
|
|
26509
26506
|
}
|
|
26510
26507
|
#et = /^\[(call|loadplugin)\s/;
|
|
26511
26508
|
#at = /\bfn\s*=\s*[^\s\]]+/;
|
|
@@ -26535,9 +26532,9 @@ class ScriptIterator {
|
|
|
26535
26532
|
t.len = t.aToken.length;
|
|
26536
26533
|
}
|
|
26537
26534
|
#ht() {
|
|
26538
|
-
const t = this.val.getAreaKidoku(this.#
|
|
26535
|
+
const t = this.val.getAreaKidoku(this.#e);
|
|
26539
26536
|
if (!t)
|
|
26540
|
-
throw `recordKidoku fn:'${this.#
|
|
26537
|
+
throw `recordKidoku fn:'${this.#e}' (areas === null)`;
|
|
26541
26538
|
if (this.#n.length > 0) {
|
|
26542
26539
|
t.record(this.#r);
|
|
26543
26540
|
return;
|
|
@@ -26549,10 +26546,10 @@ class ScriptIterator {
|
|
|
26549
26546
|
return this.#Z;
|
|
26550
26547
|
}
|
|
26551
26548
|
#rt() {
|
|
26552
|
-
this.val.getAreaKidoku(this.#
|
|
26549
|
+
this.val.getAreaKidoku(this.#e)?.erase(this.#r), this.#Z = !1;
|
|
26553
26550
|
}
|
|
26554
26551
|
get isNextKidoku() {
|
|
26555
|
-
let t = this.#
|
|
26552
|
+
let t = this.#e, e = this.#r, r = this.#t.len;
|
|
26556
26553
|
if (this.#n.length > 0) {
|
|
26557
26554
|
const k = this.#n[0];
|
|
26558
26555
|
t = k.fn, e = k.idx;
|
|
@@ -26568,11 +26565,11 @@ class ScriptIterator {
|
|
|
26568
26565
|
// // マクロ
|
|
26569
26566
|
// 括弧マクロの定義
|
|
26570
26567
|
#lt(t) {
|
|
26571
|
-
return this.#o.bracket2macro(t, this.hTag, this.#
|
|
26568
|
+
return this.#o.bracket2macro(t, this.hTag, this.#t, this.#r), !1;
|
|
26572
26569
|
}
|
|
26573
26570
|
// 一文字マクロの定義
|
|
26574
26571
|
#ut(t) {
|
|
26575
|
-
return this.#o.char2macro(t, this.hTag, this.#
|
|
26572
|
+
return this.#o.char2macro(t, this.hTag, this.#t, this.#r), !1;
|
|
26576
26573
|
}
|
|
26577
26574
|
// マクロ定義の開始
|
|
26578
26575
|
#dt = new RegExp(`["'#;\\] ]+`);
|
|
@@ -26584,12 +26581,12 @@ class ScriptIterator {
|
|
|
26584
26581
|
throw `[${e}]はタグかすでに定義済みのマクロです`;
|
|
26585
26582
|
if (this.#dt.test(e))
|
|
26586
26583
|
throw `[${e}]はマクロ名として異常です`;
|
|
26587
|
-
const r = this.#i, N = new CallStack(this.#
|
|
26584
|
+
const r = this.#i, N = new CallStack(this.#e, this.#r);
|
|
26588
26585
|
for (this.#ft += "|" + e, this.#ct = new RegExp(`\\[(${this.#ft})\\b`), this.hTag[e] = (k) => (k.design_unit = t.design_unit, this.#M({ ...k, ":hMp": this.val.cloneMp(), ":lenIfStk": this.#w.length }), this.val.setMp(k), this.val.setVal_Nochk("mp", "const.sn.macro", JSON.stringify({
|
|
26589
26586
|
name: t.name
|
|
26590
|
-
})), this.val.setVal_Nochk("mp", "const.sn.me_call_scriptFn", this.#
|
|
26591
|
-
this.#
|
|
26592
|
-
const k = this.#
|
|
26587
|
+
})), this.val.setVal_Nochk("mp", "const.sn.me_call_scriptFn", this.#e), this.#i = r, this.#tt(N), !1); this.#r < this.#t.len; ++this.#r) {
|
|
26588
|
+
this.#t.aLNum[this.#r] ||= this.#i;
|
|
26589
|
+
const k = this.#t.aToken[this.#r];
|
|
26593
26590
|
if (k.search(this.#Q) > -1)
|
|
26594
26591
|
return ++this.#r, !1;
|
|
26595
26592
|
const D = k.charCodeAt(0);
|
|
@@ -26632,7 +26629,7 @@ class ScriptIterator {
|
|
|
26632
26629
|
}), !0) : (delete this.#G[k], this.#E.playback(
|
|
26633
26630
|
this.#J.hPages,
|
|
26634
26631
|
"label" in t ? () => {
|
|
26635
|
-
this.#E.cover(!1), this.#
|
|
26632
|
+
this.#E.cover(!1), this.#e = k, this.#r = D, this.hTag.call({ fn: t.fn, label: t.label });
|
|
26636
26633
|
} : () => {
|
|
26637
26634
|
this.#E.cover(!1), this.#j(k, "", D);
|
|
26638
26635
|
}
|
|
@@ -26670,7 +26667,7 @@ class ScriptIterator {
|
|
|
26670
26667
|
nowScrIdx() {
|
|
26671
26668
|
if (this.#n.length === 0)
|
|
26672
26669
|
return {
|
|
26673
|
-
fn: this.#
|
|
26670
|
+
fn: this.#e,
|
|
26674
26671
|
idx: this.#r
|
|
26675
26672
|
};
|
|
26676
26673
|
const e = this.#n[0];
|
|
@@ -26698,7 +26695,7 @@ class ScriptIterator {
|
|
|
26698
26695
|
const B = this.#n[0];
|
|
26699
26696
|
e = B.fn, r = B.idx;
|
|
26700
26697
|
} else
|
|
26701
|
-
e = this.#
|
|
26698
|
+
e = this.#e, r = this.#r;
|
|
26702
26699
|
t[":path"] = this.#c(e);
|
|
26703
26700
|
const k = this.#P(this.#G[e], r);
|
|
26704
26701
|
t[":ln"] = k.ln, t[":col_s"] = k.col_s, t[":col_e"] = k.col_e;
|
|
@@ -26706,15 +26703,15 @@ class ScriptIterator {
|
|
|
26706
26703
|
t[":idx_tkn"] = D, t[":token"] = this.#G[e].aToken[D], this.sys.send2Dbg("_recodeDesign", t);
|
|
26707
26704
|
}
|
|
26708
26705
|
replace(t, e) {
|
|
26709
|
-
this.#
|
|
26706
|
+
this.#t.aToken[t] = e;
|
|
26710
26707
|
}
|
|
26711
26708
|
}
|
|
26712
26709
|
class Main {
|
|
26713
26710
|
constructor(t) {
|
|
26714
|
-
this.sys = t, skipHello(), Config.generate(t).then((e) => this.#
|
|
26711
|
+
this.sys = t, skipHello(), Config.generate(t).then((e) => this.#t = e).then(() => this.#v()).catch((e) => console.error("load err fn:prj.json e:%o", e));
|
|
26715
26712
|
}
|
|
26716
|
-
#e;
|
|
26717
26713
|
#t;
|
|
26714
|
+
#e;
|
|
26718
26715
|
static cvs;
|
|
26719
26716
|
#r = /* @__PURE__ */ Object.create(null);
|
|
26720
26717
|
// タグ処理辞書
|
|
@@ -26736,15 +26733,15 @@ class Main {
|
|
|
26736
26733
|
throw "argChk_Color err";
|
|
26737
26734
|
CmnLib.cc4ColorName = t;
|
|
26738
26735
|
const e = {
|
|
26739
|
-
width: this.#
|
|
26740
|
-
height: this.#
|
|
26741
|
-
backgroundColor: parseColor(String(this.#
|
|
26736
|
+
width: this.#t.oCfg.window.width,
|
|
26737
|
+
height: this.#t.oCfg.window.height,
|
|
26738
|
+
backgroundColor: parseColor(String(this.#t.oCfg.init.bg_color)),
|
|
26742
26739
|
// このString()は後方互換性のため必須
|
|
26743
26740
|
// resolution : sys.resolution,
|
|
26744
26741
|
resolution: globalThis.devicePixelRatio ?? 1
|
|
26745
26742
|
// 理想
|
|
26746
26743
|
}, r = document.getElementById(this.#d);
|
|
26747
|
-
r && (this.#_ = r.cloneNode(!0), this.#_.id = this.#d, e.view = r), this.#
|
|
26744
|
+
r && (this.#_ = r.cloneNode(!0), this.#_.id = this.#d, e.view = r), this.#e = new Application(e), Main.cvs = this.#e.view, r || (document.body.appendChild(Main.cvs), Main.cvs.id = this.#d), this.#i = new Variable(this.#t, this.#r), this.#n = new PropParser(this.#i, this.#t.oCfg.init.escape ?? "\\"), await Promise.allSettled(this.sys.init(this.#r, this.#e, this.#i, this)), this.#r.title({ text: this.#t.oCfg.book.title || "SKYNovel" }), this.#o = new SoundMng(this.#t, this.#r, this.#i, this, this.sys), this.#h = new ScriptIterator(this.#t, this.#r, this, this.#i, this.#g, () => this.#m(), this.#n, this.#o, this.sys), this.#l = new DebugMng(this.sys, this.#r, this.#h), this.#p = new LayerMng(this.#t, this.#r, this.#e, this.#i, this, this.#h, this.sys, this.#o, this.#g, this.#n), this.#s = new EventMng(this.#t, this.#r, this.#e, this, this.#p, this.#i, this.#o, this.#h, this.sys), this.#e.ticker.add(this.#u), this.resumeByJumpOrCall({ fn: "main" }), this.#f = !0;
|
|
26748
26745
|
}
|
|
26749
26746
|
#u = () => this.#c();
|
|
26750
26747
|
// thisの扱いによりメソッド代入はダメ
|
|
@@ -26841,7 +26838,7 @@ class Main {
|
|
|
26841
26838
|
this.#s.fire(t, e);
|
|
26842
26839
|
}
|
|
26843
26840
|
async destroy(t = 0) {
|
|
26844
|
-
this.#y || (this.#y = !0, this.#f && (this.stop(), this.#a = !1, this.#p.before_destroy(), t > 0 && await new Promise((e) => setTimeout(e, t)), this.#r = {}, this.#s.destroy(), this.#h.destroy(), this.#p.destroy(), this.#l.destroy(), this.#
|
|
26841
|
+
this.#y || (this.#y = !0, this.#f && (this.stop(), this.#a = !1, this.#p.before_destroy(), t > 0 && await new Promise((e) => setTimeout(e, t)), this.#r = {}, this.#s.destroy(), this.#h.destroy(), this.#p.destroy(), this.#l.destroy(), this.#e.ticker.remove(this.#u), this.#_ && this.#e && Main.cvs.parentNode.appendChild(this.#_), clearTextureCache(), this.#e.destroy(!0), this.sys.destroy()));
|
|
26845
26842
|
}
|
|
26846
26843
|
#y = !1;
|
|
26847
26844
|
isDestroyed = () => this.#y;
|
|
@@ -28975,16 +28972,16 @@ class SysBase {
|
|
|
28975
28972
|
initVal(t, e, r) {
|
|
28976
28973
|
}
|
|
28977
28974
|
flush() {
|
|
28978
|
-
if (this.#
|
|
28979
|
-
this.#
|
|
28975
|
+
if (this.#t) {
|
|
28976
|
+
this.#e = !0;
|
|
28980
28977
|
return;
|
|
28981
28978
|
}
|
|
28982
|
-
this.flushSub(), this.#
|
|
28983
|
-
this.#
|
|
28979
|
+
this.flushSub(), this.#t = setTimeout(() => {
|
|
28980
|
+
this.#t = void 0, this.#e && (this.#e = !1, this.flush());
|
|
28984
28981
|
}, 500);
|
|
28985
28982
|
}
|
|
28986
|
-
#
|
|
28987
|
-
#
|
|
28983
|
+
#t = void 0;
|
|
28984
|
+
#e = !1;
|
|
28988
28985
|
flushSub() {
|
|
28989
28986
|
}
|
|
28990
28987
|
async run() {
|
|
@@ -29838,11 +29835,11 @@ const devtools = {
|
|
|
29838
29835
|
main({ emitEvents: !1 });
|
|
29839
29836
|
setInterval(main, 500);
|
|
29840
29837
|
class SysWeb extends SysBase {
|
|
29841
|
-
#
|
|
29838
|
+
#t = "";
|
|
29842
29839
|
constructor(t = {}, e = { cur: "prj/", crypto: !1, dip: "" }) {
|
|
29843
29840
|
super(t, e);
|
|
29844
29841
|
const r = e.cur.split("/");
|
|
29845
|
-
this.#
|
|
29842
|
+
this.#t = r.length > 2 ? r.slice(0, -2).join("/") + "/" : "", globalThis.onload = async () => this.loaded(t, e);
|
|
29846
29843
|
}
|
|
29847
29844
|
async loaded(t, e) {
|
|
29848
29845
|
await super.loaded(t, e), document.querySelectorAll("[data-prj]").forEach((D) => {
|
|
@@ -29858,11 +29855,11 @@ class SysWeb extends SysBase {
|
|
|
29858
29855
|
return;
|
|
29859
29856
|
argChk_Boolean(CmnLib.hDip, "dbg", !1) && (CmnLib.isDbg = !0, this.fetch = (D) => fetch(D, { mode: "cors" })), this.extPort = argChk_Num(CmnLib.hDip, "port", this.extPort);
|
|
29860
29857
|
const k = r.get("cur");
|
|
29861
|
-
k && (e.cur = this.#
|
|
29858
|
+
k && (e.cur = this.#t + k + "/"), this.run();
|
|
29862
29859
|
}
|
|
29863
|
-
#
|
|
29860
|
+
#e = ":";
|
|
29864
29861
|
runSN(t) {
|
|
29865
|
-
this.arg.cur = this.#
|
|
29862
|
+
this.arg.cur = this.#t + t + "/", this.#e !== this.arg.cur && (this.#e = this.arg.cur, this.run());
|
|
29866
29863
|
}
|
|
29867
29864
|
run = async () => {
|
|
29868
29865
|
this.#r && (this.#r.destroy(10), await new Promise((e) => setTimeout(e, 10))), this.#r = new Main(this);
|