@famibee/skynovel 1.64.11 → 1.64.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (75) hide show
  1. package/dist/CmnTween.js +118 -125
  2. package/dist/CmnTween.js.map +1 -1
  3. package/dist/EventMng.js +91 -92
  4. package/dist/EventMng.js.map +1 -1
  5. package/dist/GrpLayer.js +16 -11
  6. package/dist/GrpLayer.js.map +1 -1
  7. package/dist/LayerMng.js +92 -93
  8. package/dist/LayerMng.js.map +1 -1
  9. package/dist/Main.js.map +1 -1
  10. package/dist/PropParser.js +60 -58
  11. package/dist/PropParser.js.map +1 -1
  12. package/dist/Reading.js +5 -4
  13. package/dist/Reading.js.map +1 -1
  14. package/dist/ScriptIterator.js +97 -97
  15. package/dist/ScriptIterator.js.map +1 -1
  16. package/dist/SndBuf.js +37 -35
  17. package/dist/SndBuf.js.map +1 -1
  18. package/dist/Variable.js +89 -94
  19. package/dist/Variable.js.map +1 -1
  20. package/dist/sn/CmnTween.d.ts +4 -15
  21. package/dist/sn/CmnTween.d.ts.map +1 -1
  22. package/dist/sn/EventMng.d.ts.map +1 -1
  23. package/dist/sn/GrpLayer.d.ts +1 -1
  24. package/dist/sn/GrpLayer.d.ts.map +1 -1
  25. package/dist/sn/Layer.d.ts +1 -1
  26. package/dist/sn/Layer.d.ts.map +1 -1
  27. package/dist/sn/LayerMng.d.ts.map +1 -1
  28. package/dist/sn/Main.d.ts.map +1 -1
  29. package/dist/sn/PropParser.d.ts +7 -4
  30. package/dist/sn/PropParser.d.ts.map +1 -1
  31. package/dist/sn/Reading.d.ts +1 -1
  32. package/dist/sn/Reading.d.ts.map +1 -1
  33. package/dist/sn/ScriptIterator.d.ts.map +1 -1
  34. package/dist/sn/SndBuf.d.ts.map +1 -1
  35. package/dist/sn/Variable.d.ts.map +1 -1
  36. package/dist/web2.js +3 -3
  37. package/dist/web2.js.map +1 -1
  38. package/dist_app/CmnTween.js +118 -125
  39. package/dist_app/CmnTween.js.map +1 -1
  40. package/dist_app/EventMng.js +244 -245
  41. package/dist_app/EventMng.js.map +1 -1
  42. package/dist_app/GrpLayer.js +16 -11
  43. package/dist_app/GrpLayer.js.map +1 -1
  44. package/dist_app/LayerMng.js +59 -60
  45. package/dist_app/LayerMng.js.map +1 -1
  46. package/dist_app/Main.js.map +1 -1
  47. package/dist_app/PropParser.js +37 -35
  48. package/dist_app/PropParser.js.map +1 -1
  49. package/dist_app/Reading.js +5 -4
  50. package/dist_app/Reading.js.map +1 -1
  51. package/dist_app/ScriptIterator.js +151 -151
  52. package/dist_app/ScriptIterator.js.map +1 -1
  53. package/dist_app/SndBuf.js +37 -35
  54. package/dist_app/SndBuf.js.map +1 -1
  55. package/dist_app/Variable.js +89 -94
  56. package/dist_app/Variable.js.map +1 -1
  57. package/dist_app/app2.js +3 -3
  58. package/dist_app/app2.js.map +1 -1
  59. package/dist_app/sn/CmnTween.d.ts +4 -15
  60. package/dist_app/sn/CmnTween.d.ts.map +1 -1
  61. package/dist_app/sn/EventMng.d.ts.map +1 -1
  62. package/dist_app/sn/GrpLayer.d.ts +1 -1
  63. package/dist_app/sn/GrpLayer.d.ts.map +1 -1
  64. package/dist_app/sn/Layer.d.ts +1 -1
  65. package/dist_app/sn/Layer.d.ts.map +1 -1
  66. package/dist_app/sn/LayerMng.d.ts.map +1 -1
  67. package/dist_app/sn/Main.d.ts.map +1 -1
  68. package/dist_app/sn/PropParser.d.ts +7 -4
  69. package/dist_app/sn/PropParser.d.ts.map +1 -1
  70. package/dist_app/sn/Reading.d.ts +1 -1
  71. package/dist_app/sn/Reading.d.ts.map +1 -1
  72. package/dist_app/sn/ScriptIterator.d.ts.map +1 -1
  73. package/dist_app/sn/SndBuf.d.ts.map +1 -1
  74. package/dist_app/sn/Variable.d.ts.map +1 -1
  75. package/package.json +5 -5
@@ -1,19 +1,19 @@
1
1
  import { a as v, S, b as w, R as P, e as d, L as B, l as C, h as D } from "./web2.js";
2
- import { c as O, C as y, a as L } from "./CallStack.js";
3
- import { G as I, A as M, t as T, a as $ } from "./Main.js";
2
+ import { c as O, C as L, a as $ } from "./CallStack.js";
3
+ import { G as I, A as M, t as T, a as x } from "./Main.js";
4
4
  import { R as j } from "./RubySpliter.js";
5
5
  import { D as k } from "./DebugMng.js";
6
- import { C as x } from "./CmnTween.js";
6
+ import { C as y } from "./CmnTween.js";
7
7
  import { a as _, R as N } from "./Reading.js";
8
8
  import { a as W } from "./SndBuf.js";
9
9
  class p {
10
10
  //MARK: コンストラクタ
11
- constructor(t, s, i, n, h, r, a) {
12
- this.cfg = t, this.hTag = s, this.main = i, this.val = n, this.prpPrs = h, this.sndMng = r, this.sys = a, s.let_ml = (e) => this.#Z(e), s.endlet_ml = () => !1, s.dump_stack = () => this.#tt(), s.dump_script = (e) => this.#st(e), s.else = // その他ifブロック開始
11
+ constructor(t, s, i, h, n, r, a) {
12
+ this.cfg = t, this.hTag = s, this.main = i, this.val = h, this.prpPrs = n, this.sndMng = r, this.sys = a, s.let_ml = (e) => this.#Z(e), s.endlet_ml = () => !1, s.dump_stack = () => this.#tt(), s.dump_script = (e) => this.#st(e), s.else = // その他ifブロック開始
13
13
  s.elsif = // 別条件のifブロック開始
14
14
  s.endif = () => this.#et(), s.if = (e) => this.#nt(e), s.call = (e) => this.#ht(e), s.jump = (e) => this.#at(e), s.pop_stack = (e) => this.#ot(e), s.return = (e) => this.#j(e), s.bracket2macro = (e) => this.#kt(e), s.char2macro = (e) => this.#gt(e), s.endmacro = (e) => this.#j(e), s.macro = (e) => this.#bt(e), s.load = (e) => this.#vt(e), s.reload_script = (e) => this.#St(e), s.record_place = () => this.#q(), s.save = (e) => this.#wt(e), t.oCfg.debug.token && (this.#F = (e) => {
15
15
  e.trim() !== "" && console.log(`🌱 トークン ${this.#i}:${String(this.#e)} (i:${String(this.#t)} cs:${String(this.#n.length)}) %c【${e}】`, "background-color:#350;");
16
- }), t.oCfg.debug.tag && (this.#D = (e) => console.log(`🌲 タグ解析 ${this.#i}:${String(this.#e)} (i:${String(this.#t)} cs:${String(this.#n.length)}) %c[${e} %o]`, "background-color:#30B;", this.#r.hPrm)), n.defTmp("const.sn.aIfStk.length", () => this.#o.length), n.defTmp("const.sn.vctCallStk.length", () => this.#n.length), this.#l = new I(t);
16
+ }), t.oCfg.debug.tag && (this.#D = (e) => console.log(`🌲 タグ解析 ${this.#i}:${String(this.#e)} (i:${String(this.#t)} cs:${String(this.#n.length)}) %c[${e} %o]`, "background-color:#30B;", this.#r.hPrm)), h.defTmp("const.sn.aIfStk.length", () => this.#o.length), h.defTmp("const.sn.vctCallStk.length", () => this.#n.length), this.#l = new I(t);
17
17
  const l = t.oCfg.init.escape;
18
18
  if (this.#l.setEscape(l), j.setEscape(l), v.isDbg) {
19
19
  this.#k, a.addHook((c, f) => this.#k[c]?.(f)), this.isBreak = (c) => this.#A(c);
@@ -181,13 +181,13 @@ class p {
181
181
  if (i.condition) {
182
182
  if (!this.prpPrs.parse(i.condition)) break;
183
183
  } else if ("hitCondition" in i && --i.hitCondition > 0) break;
184
- const n = this.#h === 0;
185
- this.#h = 2, this.main.setLoop(!1, n ? (
184
+ const h = this.#h === 0;
185
+ this.#h = 2, this.main.setLoop(!1, h ? (
186
186
  // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
187
187
  (i.condition ? "条件" : "ヒットカウント") + "ブレーク"
188
188
  ) : "ステップ実行");
189
- const h = n ? "stopOnBreakpoint" : "stopOnStep";
190
- this.sys.callHook(h, {}), this.sys.send2Dbg(h, {});
189
+ const n = h ? "stopOnBreakpoint" : "stopOnStep";
190
+ this.sys.callHook(n, {}), this.sys.send2Dbg(n, {});
191
191
  }
192
192
  return !0;
193
193
  }
@@ -198,9 +198,9 @@ class p {
198
198
  t?.hitCondition && --t.hitCondition;
199
199
  }
200
200
  #J() {
201
- const t = this.#h === 3 ? 1 : 0, s = this.#s.aToken[this.#t - 1 + t], i = this.#_(this.#i), n = T(s), h = n ? `[${n}]` : s, r = String(this.val.getVal("mp:const.sn.macro") ?? "{}");
202
- if (this.#t === 0) return [{ fn: i, ln: 1, col: 1, nm: h, ma: r }];
203
- const a = this.#c(this.#s, this.#t), l = [{ fn: i, ln: a.ln, col: a.col_s + 1, nm: h, ma: r }], e = this.#n.length;
201
+ const t = this.#h === 3 ? 1 : 0, s = this.#s.aToken[this.#t - 1 + t], i = this.#_(this.#i), h = T(s), n = h ? `[${h}]` : s, r = String(this.val.getVal("mp:const.sn.macro") ?? "{}");
202
+ if (this.#t === 0) return [{ fn: i, ln: 1, col: 1, nm: n, ma: r }];
203
+ const a = this.#c(this.#s, this.#t), l = [{ fn: i, ln: a.ln, col: a.col_s + 1, nm: n, ma: r }], e = this.#n.length;
204
204
  if (e === 0) return l;
205
205
  for (let c = e - 1; c >= 0; --c) {
206
206
  const f = this.#n[c], o = this.#a[f.fn];
@@ -226,45 +226,45 @@ class p {
226
226
  const i = this.hTag[t];
227
227
  if (!i) throw `未定義のタグ【${t}】です`;
228
228
  this.#r.parse(s), this.#D(t);
229
- const n = this.#r.hPrm;
230
- if (n.cond) {
231
- const e = n.cond.val;
229
+ const h = this.#r.hPrm;
230
+ if (h.cond) {
231
+ const e = h.cond.val;
232
232
  if (!e || e.startsWith("&")) throw "属性condは「&」が不要です";
233
233
  const c = this.prpPrs.parse(e), f = String(c);
234
234
  if (f === "null" || f === "undefined" || !c) return !1;
235
235
  }
236
- let h = {};
236
+ let n = {};
237
237
  const r = this.#n.at(-1)?.csArg ?? O(), a = this.#n.length;
238
238
  if (this.#r.isKomeParam) {
239
239
  if (a === 0) throw "属性「*」はマクロのみ有効です";
240
- h = { ...r };
240
+ n = { ...r };
241
241
  }
242
- h[":タグ名"] = t;
243
- for (const [e, { val: c, def: f }] of Object.entries(n)) {
242
+ n[":タグ名"] = t;
243
+ for (const [e, { val: c, def: f }] of Object.entries(h)) {
244
244
  let o = c;
245
245
  if (c.startsWith("%")) {
246
246
  if (a === 0) throw "属性「%」はマクロ定義内でのみ使用できます(そのマクロの引数を示す簡略文法であるため)";
247
247
  const u = r[o.slice(1)];
248
248
  if (u) {
249
- h[e] = u;
249
+ n[e] = u;
250
250
  continue;
251
251
  }
252
252
  if (f === void 0 || f === "null") continue;
253
253
  o = f;
254
254
  }
255
255
  if (o = this.prpPrs.getValAmpersand(o ?? ""), o !== "undefined") {
256
- h[e] = o;
256
+ n[e] = o;
257
257
  continue;
258
258
  }
259
- f !== void 0 && (o = this.prpPrs.getValAmpersand(f), o !== "undefined" && (h[e] = o));
259
+ f !== void 0 && (o = this.prpPrs.getValAmpersand(f), o !== "undefined" && (n[e] = o));
260
260
  }
261
261
  if (_.needGoTxt && this.#U.has(t)) {
262
262
  const { promise: e, resolve: c } = Promise.withResolvers();
263
263
  _.beginProc(P, () => c(0), !1, () => c(0)), _.goTxt(), this.val.saveKidoku(), await e;
264
264
  }
265
- this.#X.has(t) && (this.#x.hideHint(), await x.closeTrans());
265
+ this.#X.has(t) && (this.#x.hideHint(), y.stopEndTrans());
266
266
  const l = this.#Q[t];
267
- return l && d(h, "canskip", this.#Y[t] ?? !0) && this.#x.isSkipping ? l(n) : i(h);
267
+ return l && d(n, "canskip", this.#Y[t] ?? !0) && this.#x.isSkipping ? l(n) : i(n);
268
268
  }
269
269
  // 文字出現演出を待つタグ
270
270
  // ここで列挙せずタグ処理で文字表示を始めたい場合、goTxt()すること
@@ -430,7 +430,7 @@ class p {
430
430
  ]);
431
431
  // キー押しっぱなしスキップで処理せずスルーするタグ
432
432
  #Q = {
433
- wt: () => !1,
433
+ wt: () => (y.stopEndTrans(), !1),
434
434
  // トランス終了待ち
435
435
  wait_tsy: (t) => this.hTag.stop_tsy(t),
436
436
  // トゥイーン終了待ち
@@ -487,8 +487,8 @@ class p {
487
487
  const { name: s } = t;
488
488
  if (!s) throw "nameは必須です";
489
489
  let i = "";
490
- const n = this.#s.len;
491
- for (; this.#t < n && (i = this.#s.aToken[this.#t], i === ""); ++this.#t)
490
+ const h = this.#s.len;
491
+ for (; this.#t < h && (i = this.#s.aToken[this.#t], i === ""); ++this.#t)
492
492
  ;
493
493
  return t.text = i, t.cast = "str", this.hTag.let(t), this.#t += 2, this.#e += (i.match(/\n/g) ?? []).length, !1;
494
494
  }
@@ -501,10 +501,10 @@ class p {
501
501
  const i = this.#n.length;
502
502
  if (i > 0) {
503
503
  console.info(s);
504
- for (let n = i - 1; n >= 0; --n) {
505
- const h = this.#n[n], r = h.csArg[":hMp"], a = r ? r[":タグ名"] : void 0, l = h.csArg[":タグ名"] ?? "", e = this.#c(this.#a[h.fn], h.idx);
504
+ for (let h = i - 1; h >= 0; --h) {
505
+ const n = this.#n[h], r = n.csArg[":hMp"], a = r ? r[":タグ名"] : void 0, l = n.csArg[":タグ名"] ?? "", e = this.#c(this.#a[n.fn], n.idx);
506
506
  console.info(
507
- `${String(i - n)}つ前のコール元 fn:${h.fn} line:${String(e.ln)} col:${String(e.col_s + 1)}${a ? "([" + a + "]マクロ内)" : " "}で [${l} ...]をコール`
507
+ `${String(i - h)}つ前のコール元 fn:${n.fn} line:${String(e.ln)} col:${String(e.col_s + 1)}${a ? "([" + a + "]マクロ内)" : " "}で [${l} ...]をコール`
508
508
  );
509
509
  }
510
510
  }
@@ -513,16 +513,16 @@ class p {
513
513
  #c(t, s) {
514
514
  const i = { ln: 1, col_s: 0, col_e: 0 };
515
515
  if (!t) return i;
516
- let n = s - 1;
517
- const h = i.ln = t.aLNum[n];
518
- for (; t.aLNum[n] === h; ) {
519
- const r = t.aToken[n];
516
+ let h = s - 1;
517
+ const n = i.ln = t.aLNum[h];
518
+ for (; t.aLNum[h] === n; ) {
519
+ const r = t.aToken[h];
520
520
  if (!r.startsWith(`
521
521
  `)) {
522
522
  const a = r.length;
523
523
  i.col_e > 0 && (i.col_s += a), i.col_e += a;
524
524
  }
525
- if (--n < 0) break;
525
+ if (--h < 0) break;
526
526
  }
527
527
  return i;
528
528
  }
@@ -535,10 +535,10 @@ class p {
535
535
  return this.#y = () => {
536
536
  }, !1;
537
537
  }
538
- if (this.noticeBreak = (n) => {
538
+ if (this.noticeBreak = (h) => {
539
539
  this.#O !== this.#i && (this.#O = this.#i, this.#y(
540
540
  this.#it[this.#i] ??= this.#s.aToken.join("")
541
- )), this.#L(this.#e, n);
541
+ )), this.#L(this.#e, h);
542
542
  }, this.noticeBreak(!0), !i) return !1;
543
543
  if (this.#L = globalThis[i], !this.#L) {
544
544
  if (d(t, "need_err", !0)) throw `HTML内に関数${i}が見つかりません`;
@@ -567,11 +567,11 @@ class p {
567
567
  const s = t.split(`
568
568
  `).slice(-this.#I), i = s.length;
569
569
  console.group(`🥟 Error line (from ${String(i)} rows before) fn:${this.#i}`);
570
- const n = String(this.#e).length, h = this.#c(this.#s, this.#t);
570
+ const h = String(this.#e).length, n = this.#c(this.#s, this.#t);
571
571
  for (let r = 0; r < i; ++r) {
572
- const a = this.#e - i + r + 1, l = `${String(a).padStart(n, " ")}: %c`, e = s[r], c = e.length > 75 ? e.slice(0, 75) + "…" : e;
572
+ const a = this.#e - i + r + 1, l = `${String(a).padStart(h, " ")}: %c`, e = s[r], c = e.length > 75 ? e.slice(0, 75) + "…" : e;
573
573
  r === i - 1 ? console.info(
574
- l + c.slice(0, h.col_s) + "%c" + c.slice(h.col_s),
574
+ l + c.slice(0, n.col_s) + "%c" + c.slice(n.col_s),
575
575
  "color: black; background-color: skyblue;",
576
576
  "color: black; background-color: pink;"
577
577
  ) : console.info(l + c, "color: black; background-color: skyblue;");
@@ -592,8 +592,8 @@ class p {
592
592
  const { exp: s } = t;
593
593
  if (!s) throw "expは必須です";
594
594
  if (s.startsWith("&")) throw "属性expは「&」が不要です";
595
- let i = 0, n = this.prpPrs.parse(s) ? this.#t : -1;
596
- const h = this.#s.aLNum[this.#t], r = this.#e - ((h ?? 0) || 0), a = this.#s.len;
595
+ let i = 0, h = this.prpPrs.parse(s) ? this.#t : -1;
596
+ const n = this.#s.aLNum[this.#t], r = this.#e - ((n ?? 0) || 0), a = this.#s.len;
597
597
  for (; this.#t < a; ++this.#t) {
598
598
  const l = this.#s.aLNum[this.#t];
599
599
  this.#s.aLNum[this.#t] = ((l ?? 0) || 0) + r;
@@ -605,7 +605,7 @@ class p {
605
605
  continue;
606
606
  }
607
607
  if (c !== 91) continue;
608
- const [f, o] = $(e);
608
+ const [f, o] = x(e);
609
609
  if (!(f in this.hTag)) throw `未定義のタグ[${f}]です`;
610
610
  switch (this.#r.parse(o), f) {
611
611
  case "if":
@@ -613,23 +613,23 @@ class p {
613
613
  break;
614
614
  case "elsif":
615
615
  {
616
- if (i > 0 || n > -1) break;
616
+ if (i > 0 || h > -1) break;
617
617
  const u = this.#r.hPrm.exp?.val;
618
618
  if (!u) throw "expは必須です";
619
619
  if (u.startsWith("&")) throw "属性expは「&」が不要です";
620
- this.prpPrs.parse(u) && (n = this.#t + 1);
620
+ this.prpPrs.parse(u) && (h = this.#t + 1);
621
621
  }
622
622
  break;
623
623
  case "else":
624
624
  if (i > 0) break;
625
- n === -1 && (n = this.#t + 1);
625
+ h === -1 && (h = this.#t + 1);
626
626
  break;
627
627
  case "endif":
628
628
  if (i > 0) {
629
629
  --i;
630
630
  break;
631
631
  }
632
- return n === -1 ? (++this.#t, this.#s.aLNum[this.#t] += r) : (this.#o.unshift(this.#t + 1), this.#t = n, this.#e = this.#s.aLNum[this.#t]), !1;
632
+ return h === -1 ? (++this.#t, this.#s.aLNum[this.#t] += r) : (this.#o.unshift(this.#t + 1), this.#t = h, this.#e = this.#s.aLNum[this.#t]), !1;
633
633
  }
634
634
  }
635
635
  throw "[endif]がないままスクリプト終端です";
@@ -647,7 +647,7 @@ class p {
647
647
  ":hMp": this.val.cloneMp(),
648
648
  ":lenIfStk": this.#o.length
649
649
  };
650
- this.#s.aLNum[this.#t] = this.#e, this.#W || (i[":resvToken"] = "", this.#$()), this.#n.push(new y(this.#i, this.#t, i)), this.#o.unshift(-1);
650
+ this.#s.aLNum[this.#t] = this.#e, this.#W || (i[":resvToken"] = "", this.#$()), this.#n.push(new L(this.#i, this.#t, i)), this.#o.unshift(-1);
651
651
  }
652
652
  //MARK: シナリオジャンプ
653
653
  #at(t) {
@@ -657,7 +657,7 @@ class p {
657
657
  #ot(t) {
658
658
  if (d(t, "clear", !1)) this.#n = [];
659
659
  else if (!this.#n.pop()) throw "スタックが空です";
660
- return this.#$(), this.#o = [-1], this.val.setMp(L()), !1;
660
+ return this.#$(), this.#o = [-1], this.val.setMp($()), !1;
661
661
  }
662
662
  //MARK: サブルーチンから戻る
663
663
  #j(t) {
@@ -665,10 +665,10 @@ class p {
665
665
  if (!s) throw "スタックが空です";
666
666
  const i = s.csArg;
667
667
  this.#o = this.#o.slice(-i[":lenIfStk"]);
668
- const n = i[":hMp"];
669
- n && this.val.setMp(n);
670
- const h = i[":resvToken"];
671
- h ? this.nextToken = () => (this.#$(), h) : this.#$(), i[":hEvt1Time"] && N.pushLocalEvts(i[":hEvt1Time"]);
668
+ const h = i[":hMp"];
669
+ h && this.val.setMp(h);
670
+ const n = i[":resvToken"];
671
+ n ? this.nextToken = () => (this.#$(), n) : this.#$(), i[":hEvt1Time"] && N.pushLocalEvts(i[":hEvt1Time"]);
672
672
  const { fn: r, label: a } = t;
673
673
  return r || a ? this.#f(r, a) : s.fn in this.#a ? (this.#z(s), !1) : this.#f(s.fn, "", s.idx);
674
674
  }
@@ -681,21 +681,21 @@ class p {
681
681
  if (v.debugLog && console.log(`📜 %c1:jumpWork%c fn:${t} lbl:${s} idx:${String(i)}`, "color:#3B0;", ""), !t && !s && this.main.errScript("[jump系] fnまたはlabelは必須です"), s ? (s.startsWith("*") || this.main.errScript("[jump系] labelは*で始まります"), this.#v = s, this.#v.startsWith("**") || (this.#t = i)) : (this.#v = "", this.#t = i), !t)
682
682
  return this.analyzeInit(), !1;
683
683
  if (t.includes("@")) throw "[jump系] fn には文字「@」は禁止です";
684
- const n = this.#g(t);
684
+ const h = this.#g(t);
685
685
  if (t === this.#i)
686
686
  return this.analyzeInit(), !1;
687
687
  this.#i = t;
688
- const h = this.#a[t];
689
- if (h)
690
- return this.#s = h, this.analyzeInit(), !1;
688
+ const n = this.#a[t];
689
+ if (n)
690
+ return this.#s = n, this.analyzeInit(), !1;
691
691
  const r = `jumpWork fn:${t}`;
692
692
  _.beginProc(r);
693
693
  let a = "";
694
694
  const l = new B();
695
695
  try {
696
- a = this.#g(t + "@"), l.add({ name: t + ":base", url: n }), l.add({ name: t, url: a });
696
+ a = this.#g(t + "@"), l.add({ name: t + ":base", url: h }), l.add({ name: t, url: a });
697
697
  } catch {
698
- l.add({ name: t, url: n });
698
+ l.add({ name: t, url: h });
699
699
  }
700
700
  return l.use((e, c) => {
701
701
  this.sys.dec(e.extension, e.data).then((f) => {
@@ -737,30 +737,30 @@ class p {
737
737
  #rt = /(\*{2,})([^|]*)/;
738
738
  #lt = /^\[macro\s/;
739
739
  #K = /^\[endmacro[\s\]]/;
740
- #ct(t, s, i, n, h) {
740
+ #ct(t, s, i, h, n) {
741
741
  const r = t.aToken.length;
742
- let a = i, l = n;
742
+ let a = i, l = h;
743
743
  if (!l) {
744
- if (this.#H()) return { idx: h, ln: a };
745
- if (t.aLNum[h])
746
- a = t.aLNum[h];
744
+ if (this.#H()) return { idx: n, ln: a };
745
+ if (t.aLNum[n])
746
+ a = t.aLNum[n];
747
747
  else {
748
748
  a = 1;
749
- for (let o = 0; o < h; ++o) {
749
+ for (let o = 0; o < n; ++o) {
750
750
  t.aLNum[o] ||= a;
751
751
  const u = t.aToken[o];
752
752
  u.startsWith(`
753
753
  `) ? a += u.length : a += (u.match(/\n/g) ?? []).length;
754
754
  }
755
- t.aLNum[h] = a;
755
+ t.aLNum[n] = a;
756
756
  }
757
- return { idx: h, ln: a };
757
+ return { idx: n, ln: a };
758
758
  }
759
759
  t.aLNum[0] = 1;
760
760
  const e = l.match(this.#rt);
761
761
  if (e) {
762
762
  l = e[1];
763
- let o = h;
763
+ let o = n;
764
764
  switch (e[2]) {
765
765
  case "before":
766
766
  for (; t.aToken[--o] !== l; )
@@ -826,14 +826,14 @@ class p {
826
826
  for (let s = t.len - 1; s >= 0; --s) {
827
827
  const i = t.aToken[s];
828
828
  if (!this.#ut.test(i)) continue;
829
- const [n, h] = $(i);
830
- this.#r.parse(h);
829
+ const [h, n] = x(i);
830
+ this.#r.parse(n);
831
831
  const r = this.#r.hPrm.fn;
832
832
  if (!r) continue;
833
833
  const { val: a } = r;
834
834
  if (!a.endsWith("*")) continue;
835
835
  t.aToken.splice(s, 1, " ", "; " + i), t.aLNum.splice(s, 1, NaN, NaN);
836
- const l = n === "loadplugin" ? S.CSS : S.SN, e = this.cfg.matchPath("^" + a.slice(0, -1) + ".*", l);
836
+ const l = h === "loadplugin" ? S.CSS : S.SN, e = this.cfg.matchPath("^" + a.slice(0, -1) + ".*", l);
837
837
  for (const c of e) {
838
838
  const f = i.replace(
839
839
  this.#pt,
@@ -862,8 +862,8 @@ class p {
862
862
  get isNextKidoku() {
863
863
  let t = this.#i, s = this.#t, i = this.#s.len;
864
864
  if (this.#n.length > 0) {
865
- const h = this.#n[0];
866
- t = h.fn, s = h.idx;
865
+ const n = this.#n[0];
866
+ t = n.fn, s = n.idx;
867
867
  const r = this.#a[t];
868
868
  r && (i = r.len);
869
869
  }
@@ -888,19 +888,19 @@ class p {
888
888
  if (!s) throw "nameは必須です";
889
889
  if (s in this.hTag) throw `[${s}]はタグかすでに定義済みのマクロです`;
890
890
  if (this.#_t.test(s)) throw `[${s}]はマクロ名として異常です`;
891
- const i = this.#e, n = new y(this.#i, this.#t);
892
- for (this.#G += "|" + s, this.#N = new RegExp(`\\[(${this.#G})\\b`), this.hTag[s] = (h) => (h.design_unit = t.design_unit, this.#M(h), this.val.setMp({
893
- ...h,
891
+ const i = this.#e, h = new L(this.#i, this.#t);
892
+ for (this.#G += "|" + s, this.#N = new RegExp(`\\[(${this.#G})\\b`), this.hTag[s] = (n) => (n.design_unit = t.design_unit, this.#M(n), this.val.setMp({
893
+ ...n,
894
894
  "const.sn.macro": JSON.stringify({ name: t.name }),
895
895
  // ムダに大きいスクリプター用情報を削除、名前だけに
896
896
  "const.sn.me_call_scriptFn": this.#i
897
- }), this.val.setVal_Nochk("mp", "const.sn.me_call_scriptFn", this.#i), this.#e = i, this.#z(n), !1); this.#t < this.#s.len; ++this.#t) {
897
+ }), this.val.setVal_Nochk("mp", "const.sn.me_call_scriptFn", this.#i), this.#e = i, this.#z(h), !1); this.#t < this.#s.len; ++this.#t) {
898
898
  this.#s.aLNum[this.#t] ||= this.#e;
899
- const h = this.#s.aToken[this.#t];
900
- if (h.search(this.#K) > -1)
899
+ const n = this.#s.aToken[this.#t];
900
+ if (n.search(this.#K) > -1)
901
901
  return ++this.#t, !1;
902
- const r = h.charCodeAt(0);
903
- r === 10 ? this.#e += h.length : r === 91 && (this.#e += (h.match(/\n/g) ?? []).length);
902
+ const r = n.charCodeAt(0);
903
+ r === 10 ? this.#e += n.length : r === 91 && (this.#e += (n.match(/\n/g) ?? []).length);
904
904
  }
905
905
  throw `マクロ[${s}]定義の終端・[endmacro]がありません`;
906
906
  }
@@ -920,9 +920,9 @@ class p {
920
920
  );
921
921
  }
922
922
  loadFromMark(t, s, i = 0) {
923
- this.hTag.clear_event({}), this.val.mark2save(s), this.val.setMp(L()), this.#m.recPagebreak();
924
- let n = [];
925
- i !== 1 && (n = this.sndMng.playLoopFromSaveObj(
923
+ this.hTag.clear_event({}), this.val.mark2save(s), this.val.setMp($()), this.#m.recPagebreak();
924
+ let h = [];
925
+ i !== 1 && (h = this.sndMng.playLoopFromSaveObj(
926
926
  i === 2
927
927
  /* ALL_STOP_AND_PLAY */
928
928
  )), d(t, "do_rec", !0) && (this.#u = {
@@ -930,13 +930,13 @@ class p {
930
930
  hPages: { ...s.hPages },
931
931
  aIfStk: [...s.aIfStk]
932
932
  });
933
- const h = {
933
+ const n = {
934
934
  enabled: !!this.val.getVal("save:const.sn.autowc.enabled"),
935
935
  text: String(this.val.getVal("save:const.sn.autowc.text")),
936
936
  time: Number(this.val.getVal("save:const.sn.autowc.time"))
937
937
  };
938
- this.hTag.autowc(h), this.#o = [...this.#u.aIfStk], this.#n = [], x.stopAllTw();
939
- const r = Promise.allSettled([...n, ...this.#m.playback(this.#u.hPages)]).then(() => this.#m.cover(!1)), { index: a, fn: l } = t;
938
+ this.hTag.autowc(n), this.#o = [...this.#u.aIfStk], this.#n = [], y.stopAllTw();
939
+ const r = Promise.allSettled([...h, ...this.#m.playback(this.#u.hPages)]).then(() => this.#m.cover(!1)), { index: a, fn: l } = t;
940
940
  if (a)
941
941
  return v.debugLog && console.log(`📜 %cloadFromMark index:${String(a)} move!%c fn:${l ?? ""}`, "color:#3B0;", ""), r.then(() => {
942
942
  this.#f(l, "", a) || this.main.resume();
@@ -957,11 +957,11 @@ class p {
957
957
  if (!s) return !1;
958
958
  delete this.#a[w(s.hSave["const.sn.scriptFn"])];
959
959
  const i = {};
960
- for (const n in this.#a)
960
+ for (const h in this.#a)
961
961
  try {
962
- this.#g(n + "@");
962
+ this.#g(h + "@");
963
963
  } catch {
964
- i[n] = this.#a[n];
964
+ i[h] = this.#a[h];
965
965
  }
966
966
  return this.#a = i, t.do_rec = !1, this.loadFromMark(
967
967
  t,
@@ -1000,8 +1000,8 @@ class p {
1000
1000
  }
1001
1001
  //MARK: スクリプト停止位置(マクロなどなら最上位の呼び元)
1002
1002
  nowScrFnLn() {
1003
- const { fn: t, idx: s } = this.nowScrIdx(), i = this.#a[t], n = this.#c(i, s);
1004
- return { fn: t, ...n };
1003
+ const { fn: t, idx: s } = this.nowScrIdx(), i = this.#a[t], h = this.#c(i, s);
1004
+ return { fn: t, ...h };
1005
1005
  }
1006
1006
  //MARK: しおりの保存
1007
1007
  #wt(t) {
@@ -1013,17 +1013,17 @@ class p {
1013
1013
  }
1014
1014
  recodeDesign(t) {
1015
1015
  let s = "", i = 0;
1016
- const n = this.#n.length;
1017
- if (t.design_unit && n > 0) {
1016
+ const h = this.#n.length;
1017
+ if (t.design_unit && h > 0) {
1018
1018
  const l = this.#n[0];
1019
1019
  s = l.fn, i = l.idx;
1020
1020
  } else
1021
1021
  s = this.#i, i = this.#t;
1022
1022
  t[":path"] = this.#_(s);
1023
- const h = this.#a[s], r = this.#c(h, i);
1023
+ const n = this.#a[s], r = this.#c(n, i);
1024
1024
  t[":ln"] = r.ln, t[":col_s"] = r.col_s, t[":col_e"] = r.col_e;
1025
1025
  const a = i - 1;
1026
- t[":idx_tkn"] = a, t[":token"] = h.aToken[a], this.sys.send2Dbg("_recodeDesign", t);
1026
+ t[":idx_tkn"] = a, t[":token"] = n.aToken[a], this.sys.send2Dbg("_recodeDesign", t);
1027
1027
  }
1028
1028
  replace(t, s) {
1029
1029
  this.#s.aToken[t] = s;