@famibee/skynovel 1.64.19 → 1.64.21

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 (71) hide show
  1. package/dist/CmnTween.js +26 -27
  2. package/dist/CmnTween.js.map +1 -1
  3. package/dist/DebugMng.js +2 -2
  4. package/dist/DebugMng.js.map +1 -1
  5. package/dist/EventMng.js +218 -213
  6. package/dist/EventMng.js.map +1 -1
  7. package/dist/LayerMng.js +64 -52
  8. package/dist/LayerMng.js.map +1 -1
  9. package/dist/Reading.js +34 -28
  10. package/dist/Reading.js.map +1 -1
  11. package/dist/ScriptIterator.js +1 -1
  12. package/dist/ScriptIterator.js.map +1 -1
  13. package/dist/SndBuf.js +22 -22
  14. package/dist/SndBuf.js.map +1 -1
  15. package/dist/TxtLayer.js +238 -239
  16. package/dist/TxtLayer.js.map +1 -1
  17. package/dist/appMain_cmn.d.ts.map +1 -1
  18. package/dist/sn/CmnInterface.d.ts +1 -1
  19. package/dist/sn/CmnInterface.d.ts.map +1 -1
  20. package/dist/sn/CmnLib.d.ts +1 -0
  21. package/dist/sn/CmnLib.d.ts.map +1 -1
  22. package/dist/sn/CmnTween.d.ts.map +1 -1
  23. package/dist/sn/EventMng.d.ts.map +1 -1
  24. package/dist/sn/FocusMng.d.ts +2 -0
  25. package/dist/sn/FocusMng.d.ts.map +1 -1
  26. package/dist/sn/FrameMng.d.ts.map +1 -1
  27. package/dist/sn/Hyphenation.d.ts.map +1 -1
  28. package/dist/sn/Layer.d.ts.map +1 -1
  29. package/dist/sn/Reading.d.ts.map +1 -1
  30. package/dist/sn/SndBuf.d.ts.map +1 -1
  31. package/dist/sn/TxtLayer.d.ts.map +1 -1
  32. package/dist/sn/TxtStage.d.ts.map +1 -1
  33. package/dist/sn/htm2tx.d.ts.map +1 -1
  34. package/dist/web2.js +4 -4
  35. package/dist/web2.js.map +1 -1
  36. package/dist_app/CmnTween.js +28 -29
  37. package/dist_app/CmnTween.js.map +1 -1
  38. package/dist_app/EventMng.js +326 -321
  39. package/dist_app/EventMng.js.map +1 -1
  40. package/dist_app/LayerMng.js +64 -52
  41. package/dist_app/LayerMng.js.map +1 -1
  42. package/dist_app/Reading.js +34 -28
  43. package/dist_app/Reading.js.map +1 -1
  44. package/dist_app/ScriptIterator.js +1 -1
  45. package/dist_app/ScriptIterator.js.map +1 -1
  46. package/dist_app/SndBuf.js +22 -22
  47. package/dist_app/SndBuf.js.map +1 -1
  48. package/dist_app/TxtLayer.js +306 -307
  49. package/dist_app/TxtLayer.js.map +1 -1
  50. package/dist_app/app2.js +6 -6
  51. package/dist_app/app2.js.map +1 -1
  52. package/dist_app/appMain.js +1 -1
  53. package/dist_app/appMain.js.map +1 -1
  54. package/dist_app/appMain_cmn.d.ts.map +1 -1
  55. package/dist_app/sn/CmnInterface.d.ts +1 -1
  56. package/dist_app/sn/CmnInterface.d.ts.map +1 -1
  57. package/dist_app/sn/CmnLib.d.ts +1 -0
  58. package/dist_app/sn/CmnLib.d.ts.map +1 -1
  59. package/dist_app/sn/CmnTween.d.ts.map +1 -1
  60. package/dist_app/sn/EventMng.d.ts.map +1 -1
  61. package/dist_app/sn/FocusMng.d.ts +2 -2
  62. package/dist_app/sn/FocusMng.d.ts.map +1 -1
  63. package/dist_app/sn/FrameMng.d.ts.map +1 -1
  64. package/dist_app/sn/Hyphenation.d.ts.map +1 -1
  65. package/dist_app/sn/Layer.d.ts.map +1 -1
  66. package/dist_app/sn/Reading.d.ts.map +1 -1
  67. package/dist_app/sn/SndBuf.d.ts.map +1 -1
  68. package/dist_app/sn/TxtLayer.d.ts.map +1 -1
  69. package/dist_app/sn/TxtStage.d.ts.map +1 -1
  70. package/dist_app/sn/htm2tx.d.ts.map +1 -1
  71. package/package.json +2 -2
@@ -1,14 +1,14 @@
1
- import { e as F, k as v, y as lt, D as K, o as T, a as j, R as A, G as B, x as G, N as X, z as tt, O as ot, w as V, S as et, u as O, r as rt } from "./app2.js";
1
+ import { e as F, k as v, y as lt, D as K, o as T, a as j, R as A, G as B, x as G, N as X, z as tt, O as rt, w as V, S as et, u as O, r as ot } from "./app2.js";
2
2
  import { C as ct } from "./CmnTween.js";
3
3
  import { S as I } from "./SpritesMng.js";
4
4
  import { a as W, T as dt } from "./Reading.js";
5
5
  import { R as st } from "./RubySpliter.js";
6
6
  import { Button as pt } from "./Button.js";
7
- const H = "、。,.)]}〉」』】〕”〟ぁぃぅぇぉっゃゅょゎァィゥェォッャュョヮヵヶ!?!?‼⁉・ーゝゞヽヾ々", U = "[({〈「『【〔“〝", q = "─‥…", Y = H, it = new RegExp(`[${H}]`), ft = new RegExp(`[${U}]`), ut = new RegExp(`[${q}]`), _t = it;
8
- class yt {
7
+ const H = "、。,.)]}〉」』】〕”〟ぁぃぅぇぉっゃゅょゎァィゥェォッャュョヮヵヶ!?!?‼⁉・ーゝゞヽヾ々", U = "[({〈「『【〔“〝", q = "─‥…", Y = H, it = new RegExp(`[${H}]`), ft = new RegExp(`[${U}]`), ut = new RegExp(`[${q}]`), gt = it;
8
+ class _t {
9
9
  #c = H;
10
10
  #n = U;
11
- #o = q;
11
+ #r = q;
12
12
  #a = Y;
13
13
  get 行頭禁則() {
14
14
  return this.#c;
@@ -17,7 +17,7 @@ class yt {
17
17
  return this.#n;
18
18
  }
19
19
  get 分割禁止() {
20
- return this.#o;
20
+ return this.#r;
21
21
  }
22
22
  get ぶら下げ() {
23
23
  return this.#a;
@@ -25,13 +25,13 @@ class yt {
25
25
  #e = it;
26
26
  #h = ft;
27
27
  #d = ut;
28
- #k = _t;
28
+ #k = gt;
29
29
  break_fixed = !1;
30
30
  break_fixed_left = 0;
31
31
  break_fixed_top = 0;
32
32
  bura = !1;
33
33
  lay(t) {
34
- t.kinsoku_sol && (this.#c = t.kinsoku_sol, this.#e = new RegExp(`[${this.#c}]`)), t.kinsoku_eol && (this.#n = t.kinsoku_eol, this.#l(), this.#h = new RegExp(`[${this.#n}]`)), t.kinsoku_dns && (this.#o = t.kinsoku_dns, this.#m(), this.#d = new RegExp(`[${this.#o}]`)), t.kinsoku_bura && (this.#a = t.kinsoku_bura, this.#l(), this.#m(), this.#k = new RegExp(`[${this.#a}]`)), "bura" in t && (this.bura = F(t, "bura", !1)), this.break_fixed = F(t, "break_fixed", this.break_fixed), this.break_fixed_left = v(t, "break_fixed_left", this.break_fixed_left), this.break_fixed_top = v(t, "break_fixed_top", this.break_fixed_top);
34
+ t.kinsoku_sol && (this.#c = t.kinsoku_sol, this.#e = new RegExp(`[${this.#c}]`)), t.kinsoku_eol && (this.#n = t.kinsoku_eol, this.#l(), this.#h = new RegExp(`[${this.#n}]`)), t.kinsoku_dns && (this.#r = t.kinsoku_dns, this.#y(), this.#d = new RegExp(`[${this.#r}]`)), t.kinsoku_bura && (this.#a = t.kinsoku_bura, this.#l(), this.#y(), this.#k = new RegExp(`[${this.#a}]`)), "bura" in t && (this.bura = F(t, "bura", !1)), this.break_fixed = F(t, "break_fixed", this.break_fixed), this.break_fixed_left = v(t, "break_fixed_left", this.break_fixed_left), this.break_fixed_top = v(t, "break_fixed_top", this.break_fixed_top);
35
35
  }
36
36
  // 禁則の競合(ぶら下げ と 行末禁則 の両方に含まれる文字があってはならない)
37
37
  #l() {
@@ -39,33 +39,33 @@ class yt {
39
39
  if (t < e)
40
40
  for (let s = 0; s < t; ++s) {
41
41
  const i = this.#n[s];
42
- if (this.#a.includes(i)) throw `禁則の競合があります。文字 ${i} がぶら下げ と 行末禁則 の両方に含まれます`;
42
+ if (this.#a.includes(i)) throw `禁則の競合があります。文字 ${String(i)} がぶら下げ と 行末禁則 の両方に含まれます`;
43
43
  }
44
44
  else
45
45
  for (let s = 0; s < e; ++s) {
46
46
  const i = this.#a[s];
47
- if (this.#n.includes(i)) throw `禁則の競合があります。文字 ${i} がぶら下げ と 行末禁則 の両方に含まれます`;
47
+ if (this.#n.includes(i)) throw `禁則の競合があります。文字 ${String(i)} がぶら下げ と 行末禁則 の両方に含まれます`;
48
48
  }
49
49
  }
50
50
  // 禁則の競合(ぶら下げ と 分割禁止 の両方に含まれる文字があってはならない)
51
- #m() {
52
- const t = this.#o.length, e = this.#a.length;
51
+ #y() {
52
+ const t = this.#r.length, e = this.#a.length;
53
53
  if (t < e)
54
54
  for (let s = 0; s < t; ++s) {
55
- const i = this.#o[s];
56
- if (this.#a.includes(i)) throw `禁則の競合があります。文字 ${i} がぶら下げ と 分割禁止 の両方に含まれます`;
55
+ const i = this.#r[s];
56
+ if (this.#a.includes(i)) throw `禁則の競合があります。文字 ${String(i)} がぶら下げ と 分割禁止 の両方に含まれます`;
57
57
  }
58
58
  else
59
59
  for (let s = 0; s < e; ++s) {
60
60
  const i = this.#a[s];
61
- if (this.#o.includes(i)) throw `禁則の競合があります。文字 ${i} がぶら下げ と 分割禁止 の両方に含まれます`;
61
+ if (this.#r.includes(i)) throw `禁則の競合があります。文字 ${String(i)} がぶら下げ と 分割禁止 の両方に含まれます`;
62
62
  }
63
63
  }
64
64
  reNew(t) {
65
- t.#t(this.#c, this.#n, this.#o, this.#a), t.break_fixed = this.break_fixed, t.break_fixed_left = this.break_fixed_left, t.break_fixed_top = this.break_fixed_top, t.bura = this.bura;
65
+ t.#t(this.#c, this.#n, this.#r, this.#a), t.break_fixed = this.break_fixed, t.break_fixed_left = this.break_fixed_left, t.break_fixed_top = this.break_fixed_top, t.bura = this.bura;
66
66
  }
67
67
  #t(t, e, s, i) {
68
- this.#c !== t && (this.#c = t, this.#e = new RegExp(`[${t}]`)), this.#n !== e && (this.#n = e, this.#h = new RegExp(`[${e}]`)), this.#o !== s && (this.#o = s, this.#d = new RegExp(`[${s}]`)), this.#a !== i && (this.#a = i, this.#k = new RegExp(`[${i}]`));
68
+ this.#c !== t && (this.#c = t, this.#e = new RegExp(`[${t}]`)), this.#n !== e && (this.#n = e, this.#h = new RegExp(`[${e}]`)), this.#r !== s && (this.#r = s, this.#d = new RegExp(`[${s}]`)), this.#a !== i && (this.#a = i, this.#k = new RegExp(`[${i}]`));
69
69
  }
70
70
  record() {
71
71
  const t = {
@@ -74,7 +74,7 @@ class yt {
74
74
  break_fixed_top: this.break_fixed_top,
75
75
  bura: this.bura
76
76
  };
77
- return this.#c === H && (t.行頭禁則 = this.#c), this.#n === U && (t.行末禁則 = this.#n), this.#o === q && (t.分割禁止 = this.#o), this.#a === Y && (t.ぶら下げ = this.#a), t;
77
+ return this.#c === H && (t.行頭禁則 = this.#c), this.#n === U && (t.行末禁則 = this.#n), this.#r === q && (t.分割禁止 = this.#r), this.#a === Y && (t.ぶら下げ = this.#a), t;
78
78
  }
79
79
  playback(t) {
80
80
  t && (this.#t(
@@ -85,34 +85,34 @@ class yt {
85
85
  ), this.break_fixed = t.break_fixed, this.break_fixed_left = t.break_fixed_left, this.break_fixed_top = t.break_fixed_top, this.bura = t.bura);
86
86
  }
87
87
  hyph(t, e, s, i, a) {
88
- let n, l = 0, h = 2, o = ($) => (o = () => !1, i === $ ? (i > 0 && (t.innerHTML = a.replaceAll('class="sn_ch"', 'class="sn_ch sn_ch_in_default"')), !0) : $ < 2);
88
+ let n, l = 0, h = 2, r = (b) => (r = () => !1, i === b ? (i > 0 && (t.innerHTML = a.replaceAll('class="sn_ch"', 'class="sn_ch sn_ch_in_default"')), !0) : b < 2);
89
89
  do {
90
- if (n = this.#_(t, e), l = n.length, o(l)) break;
91
- let $ = -1 / 0;
90
+ if (n = this.#g(t, e), l = n.length, r(l)) break;
91
+ let b = -1 / 0;
92
92
  for (; h < l; ++h) {
93
- const { elm: g, rect: k, ch: N } = n[h];
94
- if (g.tagName === "RT") continue;
95
- const E = s ? k.y : k.x;
96
- if ($ <= E || g.previousElementSibling?.tagName === "SPAN" && g.previousElementSibling?.innerHTML.includes("<br>") || g.parentElement?.previousElementSibling?.tagName === "SPAN" && g.parentElement?.previousElementSibling?.innerHTML.includes("<br>")) {
97
- $ = E, this.break_fixed || (this.break_fixed_left = k.x, this.break_fixed_top = k.y);
93
+ const { elm: _, rect: w, ch: E } = n[h];
94
+ if (_.tagName === "RT") continue;
95
+ const x = s ? w.y : w.x;
96
+ if (b <= x || _.previousElementSibling?.tagName === "SPAN" && _.previousElementSibling?.innerHTML.includes("<br>") || _.parentElement?.previousElementSibling?.tagName === "SPAN" && _.parentElement?.previousElementSibling?.innerHTML.includes("<br>")) {
97
+ b = x, this.break_fixed || (this.break_fixed_left = w.x, this.break_fixed_top = w.y);
98
98
  continue;
99
99
  }
100
- const u = this.#u(n, h), { elm: b, rect: w, ch: d } = n[u];
100
+ const u = this.#u(n, h), { elm: $, rect: S, ch: d } = n[u];
101
101
  if (!this.break_fixed) {
102
- this.break_fixed_left = w.x, this.break_fixed_top = w.y;
103
- const _ = globalThis.getComputedStyle(b), C = parseFloat(_.fontSize);
102
+ this.break_fixed_left = S.x, this.break_fixed_top = S.y;
103
+ const g = globalThis.getComputedStyle($), C = parseFloat(g.fontSize);
104
104
  s ? this.break_fixed_top += C : this.break_fixed_left += C;
105
105
  }
106
- $ = -1 / 0;
107
- const r = h, { cont: m, ins: y } = this.bura ? this.hyph_alg_bura(n, u, d, h) : this.hyph_alg(n, u, d, h, N);
106
+ b = -1 / 0;
107
+ const o = h, { cont: m, ins: y } = this.bura ? this.hyph_alg_bura(n, u, d, h) : this.hyph_alg(n, u, d, h, E);
108
108
  if (h = y, m) continue;
109
- const S = n[h].elm, f = S.parentElement, p = document.createElement("br");
110
- if (f.classList.contains("sn_tx")) f.insertBefore(p, S);
109
+ const R = n[h].elm, f = R.parentElement, p = document.createElement("br");
110
+ if (f.classList.contains("sn_tx")) f.insertBefore(p, R);
111
111
  else {
112
- const _ = f.parentElement;
113
- _.classList.contains("sn_ch") ? _.parentElement.insertBefore(p, _) : _.insertBefore(p, f);
112
+ const g = f.parentElement;
113
+ g.classList.contains("sn_ch") ? g.parentElement.insertBefore(p, g) : g.insertBefore(p, f);
114
114
  }
115
- h += 2, h < r && (h = r), l = -1;
115
+ h += 2, h < o && (h = o), l = -1;
116
116
  break;
117
117
  }
118
118
  } while (l < 0);
@@ -123,9 +123,9 @@ class yt {
123
123
  const s = e - 1, { elm: i } = t[s];
124
124
  return i.tagName !== "RT" ? s - (i.style.textCombineUpright === "all" ? Array.from(i.textContent).length - 1 : 0) : s - Array.from(i.textContent).length;
125
125
  }
126
- #_(t, e) {
126
+ #g(t, e) {
127
127
  const s = [];
128
- if (t.nodeType !== t.TEXT_NODE) return Array.from(t.childNodes).map((l) => this.#_(l, e)).flat();
128
+ if (t.nodeType !== t.TEXT_NODE) return Array.from(t.childNodes).map((l) => this.#g(l, e)).flat();
129
129
  const i = t.ownerDocument.createRange();
130
130
  i.selectNodeContents(t);
131
131
  let a = 0;
@@ -181,10 +181,10 @@ class yt {
181
181
  if (this.#k.test(n) || this.#e.test(n)) {
182
182
  let h = e;
183
183
  (this.#k.test(s) || this.#e.test(s)) && ++h;
184
- const o = this.#u(t, h), { ch: $ } = t[o], { ch: g } = t[h];
185
- if ($ === g && this.#d.test(g)) return { cont: !1, ins: o };
186
- if (!this.#h.test($)) return { cont: !1, ins: h };
187
- h = o;
184
+ const r = this.#u(t, h), { ch: b } = t[r], { ch: _ } = t[h];
185
+ if (b === _ && this.#d.test(_)) return { cont: !1, ins: r };
186
+ if (!this.#h.test(b)) return { cont: !1, ins: h };
187
+ h = r;
188
188
  do
189
189
  if (!this.#h.test(t[h].ch)) break;
190
190
  while ((h = this.#u(t, h)) >= 0);
@@ -196,161 +196,161 @@ class yt {
196
196
  if (this.#d.test(n) && h === n)
197
197
  return { cont: !1, ins: l };
198
198
  if (this.#h.test(h)) {
199
- let o = l;
200
- for (; (o = this.#u(t, o)) >= 0 && this.#h.test(t[o].ch); )
199
+ let r = l;
200
+ for (; (r = this.#u(t, r)) >= 0 && this.#h.test(t[r].ch); )
201
201
  ;
202
- return { cont: !1, ins: o + 1 };
202
+ return { cont: !1, ins: r + 1 };
203
203
  }
204
204
  }
205
205
  return { cont: !1, ins: a };
206
206
  }
207
207
  }
208
- function mt(Q, t, e, s, i, a = !0) {
208
+ function yt(Q, t, e, s, i, a = !0) {
209
209
  const n = {
210
210
  escape: (d) => d.replaceAll(/([.*+?^${}()|[\]/\\])/g, "\\$1"),
211
211
  mimeType: (d) => {
212
- const r = g(d).toLowerCase();
213
- return l()[r] || "";
212
+ const o = _(d).toLowerCase();
213
+ return l()[o] || "";
214
214
  },
215
215
  dataAsUrl: u,
216
- isDataUrl: k,
217
- resolveUrl: N,
218
- getAndEncode: E,
216
+ isDataUrl: w,
217
+ resolveUrl: E,
218
+ getAndEncode: x,
219
219
  asArray: (d) => {
220
- const r = [], m = d.length;
221
- for (let y = 0; y < m; ++y) r.push(d[y]);
222
- return r;
220
+ const o = [], m = d.length;
221
+ for (let y = 0; y < m; ++y) o.push(d[y]);
222
+ return o;
223
223
  }
224
224
  };
225
225
  function l() {
226
- const d = "application/font-woff", r = "image/jpeg";
226
+ const d = "application/font-woff", o = "image/jpeg";
227
227
  return {
228
228
  woff: d,
229
229
  woff2: d,
230
230
  ttf: "application/font-truetype",
231
231
  eot: "application/vnd.ms-fontobject",
232
232
  png: "image/png",
233
- jpg: r,
234
- jpeg: r,
233
+ jpg: o,
234
+ jpeg: o,
235
235
  gif: "image/gif",
236
236
  tiff: "image/tiff",
237
237
  svg: "image/svg+xml"
238
238
  };
239
239
  }
240
- const h = b(), o = w();
241
- function $(d) {
242
- return o.resolveAll().then((r) => {
240
+ const h = $(), r = S();
241
+ function b(d) {
242
+ return r.resolveAll().then((o) => {
243
243
  const m = document.createElement("style");
244
- return d.appendChild(m), m.appendChild(document.createTextNode(r)), d;
244
+ return d.appendChild(m), m.appendChild(document.createTextNode(o)), d;
245
245
  });
246
246
  }
247
- function g(d) {
247
+ function _(d) {
248
248
  return /\.([^./]*?)$/g.exec(d)?.[1] ?? "";
249
249
  }
250
- function k(d) {
250
+ function w(d) {
251
251
  return d.search(/^(data:)/) !== -1;
252
252
  }
253
- function N(d, r) {
253
+ function E(d, o) {
254
254
  const m = document.implementation.createHTMLDocument(), y = m.createElement("base");
255
255
  m.head.appendChild(y);
256
- const S = m.createElement("a");
257
- return m.body.appendChild(S), y.href = r, S.href = d, S.href;
256
+ const R = m.createElement("a");
257
+ return m.body.appendChild(R), y.href = o, R.href = d, R.href;
258
258
  }
259
- function E(d) {
259
+ function x(d) {
260
260
  return new Promise(function(m) {
261
261
  const y = new XMLHttpRequest();
262
- y.onreadystatechange = S, y.ontimeout = f, y.responseType = "blob", y.timeout = 3e4, y.open("GET", d, !0), y.send();
263
- function S() {
262
+ y.onreadystatechange = R, y.ontimeout = f, y.responseType = "blob", y.timeout = 3e4, y.open("GET", d, !0), y.send();
263
+ function R() {
264
264
  if (y.readyState !== 4) return;
265
265
  if (y.status !== 200) {
266
266
  p("cannot fetch resource: " + d + ", status: " + y.status);
267
267
  return;
268
268
  }
269
- const _ = new FileReader();
270
- _.onloadend = function() {
271
- const C = _.result.toString().split(/,/)[1];
269
+ const g = new FileReader();
270
+ g.onloadend = function() {
271
+ const C = g.result.toString().split(/,/)[1];
272
272
  m(C);
273
- }, _.readAsDataURL(y.response);
273
+ }, g.readAsDataURL(y.response);
274
274
  }
275
275
  function f() {
276
276
  p("timeout of 30000ms occured while fetching resource: " + d);
277
277
  }
278
- function p(_) {
279
- console.error(_), m("");
278
+ function p(g) {
279
+ console.error(g), m("");
280
280
  }
281
281
  });
282
282
  }
283
- function u(d, r) {
284
- return "data:" + r + ";base64," + d;
283
+ function u(d, o) {
284
+ return "data:" + o + ";base64," + d;
285
285
  }
286
- function b() {
286
+ function $() {
287
287
  const d = /url\(['"]?([^'"]+?)['"]?\)/g;
288
288
  return {
289
- inlineAll: S,
290
- shouldProcess: r
289
+ inlineAll: R,
290
+ shouldProcess: o
291
291
  };
292
- function r(f) {
292
+ function o(f) {
293
293
  return f.search(d) !== -1;
294
294
  }
295
295
  function m(f) {
296
296
  const p = [];
297
- let _;
298
- for (; _ = d.exec(f); )
299
- p.push(_[1]);
297
+ let g;
298
+ for (; g = d.exec(f); )
299
+ p.push(g[1]);
300
300
  return p.filter(function(C) {
301
301
  return !n.isDataUrl(C);
302
302
  });
303
303
  }
304
- function y(f, p, _, C) {
305
- return Promise.resolve(p).then((R) => _ ? n.resolveUrl(R, _) : R).then(C || n.getAndEncode).then((R) => n.dataAsUrl(R, n.mimeType(p))).then((R) => f.replace(M(p), "$1" + R + "$3"));
306
- function M(R) {
307
- return new RegExp(`(url\\(['"]?)(` + n.escape(R) + `)(['"]?\\))`, "g");
304
+ function y(f, p, g, C) {
305
+ return Promise.resolve(p).then((N) => g ? n.resolveUrl(N, g) : N).then(C || n.getAndEncode).then((N) => n.dataAsUrl(N, n.mimeType(p))).then((N) => f.replace(M(p), "$1" + N + "$3"));
306
+ function M(N) {
307
+ return new RegExp(`(url\\(['"]?)(` + n.escape(N) + `)(['"]?\\))`, "g");
308
308
  }
309
309
  }
310
- function S(f, p, _) {
310
+ function R(f, p, g) {
311
311
  if (C()) return Promise.resolve(f);
312
312
  return Promise.resolve(f).then(m).then((M) => {
313
- let R = Promise.resolve(f);
314
- for (const P of M) R = R.then((J) => y(J, P, p, _));
315
- return R;
313
+ let N = Promise.resolve(f);
314
+ for (const P of M) N = N.then((J) => y(J, P, p, g));
315
+ return N;
316
316
  });
317
317
  function C() {
318
- return !r(f);
318
+ return !o(f);
319
319
  }
320
320
  }
321
321
  }
322
- function w() {
322
+ function S() {
323
323
  return {
324
324
  resolveAll: d,
325
- impl: { readAll: r }
325
+ impl: { readAll: o }
326
326
  };
327
327
  function d() {
328
- return r().then((m) => Promise.allSettled(
328
+ return o().then((m) => Promise.allSettled(
329
329
  m.map((y) => y.resolve())
330
330
  )).then((m) => m.join(`
331
331
  `));
332
332
  }
333
- function r() {
334
- return Promise.resolve(n.asArray(document.styleSheets)).then(y).then(m).then((f) => f.map(S));
333
+ function o() {
334
+ return Promise.resolve(n.asArray(document.styleSheets)).then(y).then(m).then((f) => f.map(R));
335
335
  function m(f) {
336
336
  return f.filter((p) => p.type === CSSRule.FONT_FACE_RULE).filter((p) => h.shouldProcess(p.style.getPropertyValue("src")));
337
337
  }
338
338
  function y(f) {
339
339
  const p = [];
340
- for (const _ of f)
340
+ for (const g of f)
341
341
  try {
342
- if (_.href) continue;
343
- n.asArray(_.cssRules || []).forEach(p.push.bind(p));
342
+ if (g.href) continue;
343
+ n.asArray(g.cssRules || []).forEach(p.push.bind(p));
344
344
  } catch (C) {
345
- console.error("Error while reading CSS rules from " + _.href, String(C));
345
+ console.error("Error while reading CSS rules from " + g.href, String(C));
346
346
  }
347
347
  return p;
348
348
  }
349
- function S(f) {
349
+ function R(f) {
350
350
  return {
351
351
  resolve: function() {
352
- const _ = (f.parentStyleSheet || {}).href;
353
- return h.inlineAll(f.cssText, _);
352
+ const g = (f.parentStyleSheet || {}).href;
353
+ return h.inlineAll(f.cssText, g);
354
354
  },
355
355
  src() {
356
356
  return f.style.getPropertyValue("src");
@@ -360,29 +360,29 @@ function mt(Q, t, e, s, i, a = !0) {
360
360
  }
361
361
  }
362
362
  Promise.resolve(t).then((d) => {
363
- const r = d.cloneNode(!0);
364
- return r.style.padding = "0px", r.style.paddingRight = s + "px", r.style.paddingTop = i + "px", r.style.left = "0px", r.style.top = "0px", r.style.width = e.$width - e.pad_left - e.pad_right + "px", r.style.height = e.$height - e.pad_top - e.pad_bottom + "px", t.hidden = a, r;
365
- }).then($).then((d) => {
363
+ const o = d.cloneNode(!0);
364
+ return o.style.padding = "0px", o.style.paddingRight = s + "px", o.style.paddingTop = i + "px", o.style.left = "0px", o.style.top = "0px", o.style.width = e.$width - e.pad_left - e.pad_right + "px", o.style.height = e.$height - e.pad_top - e.pad_bottom + "px", t.hidden = a, o;
365
+ }).then(b).then((d) => {
366
366
  d.setAttribute("xmlns", "http://www.w3.org/1999/xhtml");
367
- const r = new Image();
368
- return r.src = `data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" width="${e.$width}px" height="${e.$height}px"><foreignObject x="0" y="0" width="100%" height="100%">${new XMLSerializer().serializeToString(d).replaceAll("#", "%23").replaceAll(`
367
+ const o = new Image();
368
+ return o.src = `data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" width="${String(e.$width)}px" height="${String(e.$height)}px"><foreignObject x="0" y="0" width="100%" height="100%">${new XMLSerializer().serializeToString(d).replaceAll("#", "%23").replaceAll(`
369
369
  `, "%0A")}</foreignObject></svg>`, new Promise((m) => {
370
- r.onload = () => m(r);
370
+ o.onload = () => m(o);
371
371
  });
372
- }).then((d) => new Promise((r) => setTimeout(() => r(d), 100))).then((d) => {
373
- const r = document.createElement("canvas");
374
- r.width = e.$width, r.height = e.$height, r.getContext("2d").drawImage(d, 0, 0), Q(lt.from(r));
375
- }).catch((d) => K.myTrace(`goTxt() = ${d}`));
372
+ }).then((d) => new Promise((o) => setTimeout(() => o(d), 100))).then((d) => {
373
+ const o = document.createElement("canvas");
374
+ o.width = e.$width, o.height = e.$height, o.getContext("2d").drawImage(d, 0, 0), Q(lt.from(o));
375
+ }).catch((d) => K.myTrace(`goTxt() = ${String(d)}`));
376
376
  }
377
377
  class c extends T {
378
378
  constructor(t, e, s) {
379
379
  super(), this.ctn = t, this.canFocus = e, this.sys = s, this.#e.classList.add("sn_tx"), this.#e.style.position = "absolute", c.#n.view.parentElement.appendChild(this.#e), this.addChild(this.#h), this.addChild(this.#d), this.#d.name = "grpDbgMasume";
380
- const i = j.debugLog ? ({ ch: a, rect: { x: n, y: l, width: h, height: o } }) => console.log(`🍌 masume ch:${a} x:${n} y:${l} w:${h} h:${o}`) : () => {
380
+ const i = j.debugLog ? ({ ch: a, rect: { x: n, y: l, width: h, height: r } }) => console.log(`🍌 masume ch:${a} x:${String(n)} y:${String(l)} w:${String(h)} h:${String(r)}`) : () => {
381
381
  };
382
- this.#m = c.#c.oCfg.debug.masume ? (a) => {
382
+ this.#y = c.#c.oCfg.debug.masume ? (a) => {
383
383
  i(a);
384
- const { x: n, y: l, width: h, height: o } = a.rect;
385
- this.#d.beginFill(6737151, 0.5).lineStyle(2, 16724736, 1).drawRect(n, l, h, o).endFill();
384
+ const { x: n, y: l, width: h, height: r } = a.rect;
385
+ this.#d.beginFill(6737151, 0.5).lineStyle(2, 16724736, 1).drawRect(n, l, h, r).endFill();
386
386
  } : () => {
387
387
  }, this.noticeCompTxt = s.isApp && c.#c.oCfg.debug.dumpHtm ? () => {
388
388
  W.notifyEndProc(A);
@@ -404,13 +404,13 @@ $1
404
404
  static init(t, e) {
405
405
  c.#c = t, c.#n = e;
406
406
  }
407
- static #o;
407
+ static #r;
408
408
  static #a;
409
409
  static setEvtMng(t, e) {
410
- c.#o = t, c.#a = e;
410
+ c.#r = t, c.#a = e;
411
411
  }
412
412
  static destroy() {
413
- c.#$ = /* @__PURE__ */ Object.create(null), c.#S = /* @__PURE__ */ Object.create(null), c.delBreak();
413
+ c.#$ = /* @__PURE__ */ Object.create(null), c.#v = /* @__PURE__ */ Object.create(null), c.delBreak();
414
414
  }
415
415
  #e = document.createElement("span");
416
416
  // サンプリング元
@@ -428,10 +428,10 @@ $1
428
428
  "margin-right": 0,
429
429
  "margin-top": 0
430
430
  };
431
- #l = new yt();
431
+ #l = new _t();
432
432
  noticeCompTxt = () => {
433
433
  };
434
- #m;
434
+ #y;
435
435
  // readonly #idc :TxtLayDesignCast;
436
436
  // readonly #idcCh = new TxtLayPadDesignCast(this);
437
437
  #t = {
@@ -466,7 +466,7 @@ $1
466
466
  !s.style.opacity && "alpha" in t && (e.opacity = String(this.ctn.alpha));
467
467
  } else this.#e.style.cssText = "";
468
468
  else "alpha" in t && (e.opacity = String(this.ctn.alpha));
469
- if ("width" in t && (e.width = String(t.width ?? "0") + "px"), "height" in t && (e.height = String(t.height ?? "0") + "px"), "pl" in t && (e.paddingLeft = String(t.pl ?? "0") + "px"), "pr" in t && (e.paddingRight = String(t.pr ?? "0") + "px"), "pt" in t && (e.paddingTop = String(t.pt ?? "0") + "px"), "pb" in t && (e.paddingBottom = String(t.pb ?? "0") + "px"), this.#l.lay(t), this.#_(), this.#r = this.ctn.position.x, e.transformOrigin = `${this.ctn.pivot.x}px ${this.ctn.pivot.y}px`, this.cvsResize(), e.display = this.ctn.visible ? "inline" : "none", ":redraw" in t && this.#g > 0) {
469
+ if ("width" in t && (e.width = String(t.width ?? "0") + "px"), "height" in t && (e.height = String(t.height ?? "0") + "px"), "pl" in t && (e.paddingLeft = String(t.pl ?? "0") + "px"), "pr" in t && (e.paddingRight = String(t.pr ?? "0") + "px"), "pt" in t && (e.paddingTop = String(t.pt ?? "0") + "px"), "pb" in t && (e.paddingBottom = String(t.pb ?? "0") + "px"), this.#l.lay(t), this.#g(), this.#o = this.ctn.position.x, e.transformOrigin = `${String(this.ctn.pivot.x)}px ${String(this.ctn.pivot.y)}px`, this.cvsResize(), e.display = this.ctn.visible ? "inline" : "none", ":redraw" in t && this.#m > 0) {
470
470
  const s = [
471
471
  this.#e.innerHTML.replaceAll(/(animation-delay: )\d+ms/g, "$10ms"),
472
472
  `<span class='sn_ch' data-add='{"ch_in_style":"default"}'>&emsp;</span>`
@@ -477,7 +477,7 @@ $1
477
477
  // oxlint-disable-next-line no-unused-private-class-members
478
478
  #u = 0;
479
479
  // 「g」などで下が欠ける問題対策
480
- #_() {
480
+ #g() {
481
481
  const t = this.#e.style, e = parseFloat(t.fontSize || "0");
482
482
  this.#t.fontsize = e, this.#t.pad_left = parseFloat(t.paddingLeft || "0"), this.#t.pad_right = parseFloat(t.paddingRight || "0"), this.#t.pad_top = parseFloat(t.paddingTop || "0"), this.#t.pad_bottom = parseFloat(t.paddingBottom || "0"), this.#t.$width = parseFloat(t.width || "0"), this.#t.$height = parseFloat(t.height || "0"), this.position.set(this.#t.pad_left, this.#t.pad_top), this.#p = t.writingMode === "vertical-rl", this.#i = 0, this.#b = 0;
483
483
  const s = t.lineHeight ?? "0";
@@ -485,9 +485,9 @@ $1
485
485
  }
486
486
  cvsResize() {
487
487
  const t = this.#e.style, e = this.sys.cvsScale;
488
- t.left = `${this.sys.ofsLeft4elm + this.#r * e}px`, t.top = `${this.sys.ofsTop4elm + this.ctn.position.y * e}px`, t.transform = `rotate(${this.ctn.angle}deg) scale(${this.ctn.scale.x * e}, ${this.ctn.scale.y * e})`;
488
+ t.left = `${String(this.sys.ofsLeft4elm + this.#o * e)}px`, t.top = `${String(this.sys.ofsTop4elm + this.ctn.position.y * e)}px`, t.transform = `rotate(${String(this.ctn.angle)}deg) scale(${String(this.ctn.scale.x * e)}, ${String(this.ctn.scale.y * e)})`;
489
489
  }
490
- #r = 0;
490
+ #o = 0;
491
491
  #p = !1;
492
492
  get tategaki() {
493
493
  return this.#p;
@@ -509,96 +509,95 @@ $1
509
509
  #s = [];
510
510
  // FIFO実行バッファ
511
511
  goTxt(t, e) {
512
- const s = () => this.#y(t, e);
512
+ const s = () => this.#_(t, e);
513
513
  this.#s.push(s) === 1 && s();
514
514
  }
515
515
  #F = [];
516
- #g = 0;
516
+ #m = 0;
517
517
  static #U = "<span class='sn_ch sn_ch_last'>&emsp;</span>";
518
- #y(t, e) {
518
+ #_(t, e) {
519
519
  c.#j.visible = !1;
520
520
  let s = this.#F.length, i = "";
521
521
  if (s === 0) {
522
- if (c.#c.oCfg.debug.masume && (j.debugLog && console.log(`🍌 masume ${// eslint-disable-next-line @typescript-eslint/restrict-template-expressions
523
- this.name} v:${this.visible} l:${this.x} t:${this.y} a:${this.alpha} pl:${this.#t.pad_left} pr:${this.#t.pad_right} pt:${this.#t.pad_top} pb:${this.#t.pad_bottom} w:${this.#t.$width} h:${this.#t.$height}`), this.#d.clear().beginFill(3407616, 0.2).lineStyle(1, 3407616, 1).drawRect(-this.#t.pad_left, -this.#t.pad_top, this.#t.$width, this.#t.$height).endFill().beginFill(13311, 0.2).lineStyle(2, 13311, 1).drawRect(
522
+ if (c.#c.oCfg.debug.masume && (j.debugLog && console.log(`🍌 masume ${this.name} v:${String(this.visible)} l:${String(this.x)} t:${String(this.y)} a:${String(this.alpha)} pl:${String(this.#t.pad_left)} pr:${String(this.#t.pad_right)} pt:${String(this.#t.pad_top)} pb:${String(this.#t.pad_bottom)} w:${String(this.#t.$width)} h:${String(this.#t.$height)}`), this.#d.clear().beginFill(3407616, 0.2).lineStyle(1, 3407616, 1).drawRect(-this.#t.pad_left, -this.#t.pad_top, this.#t.$width, this.#t.$height).endFill().beginFill(13311, 0.2).lineStyle(2, 13311, 1).drawRect(
524
523
  0,
525
524
  0,
526
525
  this.#t.$width - this.#t.pad_left - this.#t.pad_right,
527
526
  this.#t.$height - this.#t.pad_top - this.#t.pad_bottom
528
527
  ).endFill()), this.#e.innerHTML = [...t].join("").replaceAll(/[\n\t]/g, "") + c.#U, !this.#l.break_fixed) {
529
- const u = globalThis.getComputedStyle(this.#e), b = parseFloat(u.fontSize);
530
- this.#p ? (this.#l.break_fixed_left = (this.#t.$width - this.#t.pad_left - this.#t.pad_right - b * 1.5) * this.sys.cvsScale, this.#l.break_fixed_top = 0) : (this.#l.break_fixed_left = 0, this.#l.break_fixed_top = b / 2 * this.sys.cvsScale);
528
+ const u = globalThis.getComputedStyle(this.#e), $ = parseFloat(u.fontSize);
529
+ this.#p ? (this.#l.break_fixed_left = (this.#t.$width - this.#t.pad_left - this.#t.pad_right - $ * 1.5) * this.sys.cvsScale, this.#l.break_fixed_top = 0) : (this.#l.break_fixed_left = 0, this.#l.break_fixed_top = $ / 2 * this.sys.cvsScale);
531
530
  }
532
531
  } else
533
532
  i = this.#e.innerHTML, --s, this.#e.getElementsByClassName("sn_ch_last").item(0)?.remove(), this.#e.querySelectorAll(":scope > br").forEach((u) => u.remove()), this.#e.insertAdjacentHTML(
534
533
  "beforeend",
535
- t.slice(this.#g).join("").replaceAll(/[\n\t]/g, "") + c.#U
534
+ t.slice(this.#m).join("").replaceAll(/[\n\t]/g, "") + c.#U
536
535
  // 末尾改行削除挙動対策
537
536
  );
538
537
  this.#e.querySelectorAll(".sn_ch:has(> ruby)").forEach((u) => {
539
538
  u.style.background = "";
540
- }), this.#g = t.length;
539
+ }), this.#m = t.length;
541
540
  const a = this.sys.cvsScale, n = this.#e.getBoundingClientRect(), l = n.left + this.#t.pad_left, h = n.top + this.#t.pad_top;
542
- let o;
543
- if (a === 1) o = (u, b) => {
544
- const w = u.getBoundingClientRect();
541
+ let r;
542
+ if (a === 1) r = (u, $) => {
543
+ const S = u.getBoundingClientRect();
545
544
  return new X(
546
- w.left - l,
547
- w.top - h,
548
- w.width,
549
- w.height + ("gjqy".includes(b) ? this.#u : 0)
545
+ S.left - l,
546
+ S.top - h,
547
+ S.width,
548
+ S.height + ("gjqy".includes($) ? this.#u : 0)
550
549
  );
551
550
  };
552
551
  else {
553
- const u = this.sys.ofsPadLeft_Dom2PIXI + n.left * (1 - a), b = this.sys.ofsPadTop_Dom2PIXI + n.top * (1 - a);
554
- o = (w, d) => {
555
- const r = w.getBoundingClientRect();
552
+ const u = this.sys.ofsPadLeft_Dom2PIXI + n.left * (1 - a), $ = this.sys.ofsPadTop_Dom2PIXI + n.top * (1 - a);
553
+ r = (S, d) => {
554
+ const o = S.getBoundingClientRect();
556
555
  return new X(
557
- (r.left - u) / a - l,
558
- (r.top - b) / a - h,
559
- r.width / a,
560
- (r.height + ("gjqy".includes(d) ? this.#u : 0)) / a
556
+ (o.left - u) / a - l,
557
+ (o.top - $) / a - h,
558
+ o.width / a,
559
+ (o.height + ("gjqy".includes(d) ? this.#u : 0)) / a
561
560
  );
562
561
  };
563
562
  }
564
- const [$, g] = this.#l.hyph(this.#e, o, this.#p, s, i);
565
- this.#F = $;
566
- const k = ct.ease(this.#v);
567
- for (let u = s; u < g; ++u) {
568
- const b = this.#F[u], { elm: { dataset: w, parentElement: d }, rect: r } = b, m = JSON.parse(w.arg ?? '{"delay": 0}'), y = JSON.parse(w.add ?? "{}"), S = c.#$[y.ch_in_style];
569
- if (this.#m(b), w.cmd === "grp") {
563
+ const [b, _] = this.#l.hyph(this.#e, r, this.#p, s, i);
564
+ this.#F = b;
565
+ const w = ct.ease(this.#C);
566
+ for (let u = s; u < _; ++u) {
567
+ const $ = this.#F[u], { elm: { dataset: S, parentElement: d }, rect: o } = $, m = JSON.parse(S.arg ?? '{"delay": 0}'), y = JSON.parse(S.add ?? "{}"), R = c.#$[y.ch_in_style];
568
+ if (this.#y($), S.cmd === "grp") {
570
569
  const f = new T();
571
570
  this.#h.addChild(f), new I(m.pic, f, (p) => {
572
- this.#P(f, m, y, r, k, S ?? {}), f.parent || f.removeChild(p);
571
+ this.#P(f, m, y, o, w, R ?? {}), f.parent || f.removeChild(p);
573
572
  });
574
573
  }
575
- if (w.lnk) {
574
+ if (S.lnk) {
576
575
  const f = d.closest("[data-arg]"), p = JSON.parse(f.dataset.arg ?? "{}");
577
576
  p.key = `lnk=[${String(u)}] ` + this.name;
578
- const _ = new G();
579
- this.#P(_, p, y, r, k, S ?? {});
580
- const C = p.style ?? "", M = C + (p.style_hover ?? ""), R = C + (p.style_clicked ?? ""), P = p.r_style ?? "", J = P + (p.r_style_hover ?? ""), nt = P + (p.r_style_clicked ?? ""), Z = Array.from(f.getElementsByTagName("rt"));
577
+ const g = new G();
578
+ this.#P(g, p, y, o, w, R ?? {});
579
+ const C = p.style ?? "", M = C + (p.style_hover ?? ""), N = C + (p.style_clicked ?? ""), P = p.r_style ?? "", J = P + (p.r_style_hover ?? ""), nt = P + (p.r_style_clicked ?? ""), Z = Array.from(f.getElementsByTagName("rt"));
581
580
  for (const z of Z) z.dataset.st_r_bk = z.style.cssText;
582
581
  const at = f.style.cssText, D = (z, ht) => {
583
582
  f.style.cssText = at + z;
584
583
  for (const L of Z) L.style.cssText = L.dataset.st_r_bk + ht;
585
584
  };
586
- F(p, "enabled", !0) ? c.#o.button(
585
+ F(p, "enabled", !0) ? c.#r.button(
587
586
  p,
588
- _,
587
+ g,
589
588
  () => D(C, P),
590
589
  () => this.canFocus() ? (D(M, J), !0) : !1,
591
- () => D(R, nt)
590
+ () => D(N, nt)
592
591
  ) : D(
593
592
  C + (p.style_disable ?? "color: gray;"),
594
593
  P + (p.r_style_disable ?? "color: gray;")
595
- ), this.#h.addChild(_);
594
+ ), this.#h.addChild(g);
596
595
  }
597
596
  }
598
- const N = Array.from(this.#e.getElementsByClassName("sn_ch_yet"));
599
- this.#C = () => {
600
- this.#C = () => !1;
601
- for (const b of N) b.className = "sn_ch";
597
+ const E = Array.from(this.#e.getElementsByClassName("sn_ch_yet"));
598
+ this.#S = () => {
599
+ this.#S = () => !1;
600
+ for (const $ of E) $.className = "sn_ch";
602
601
  c.#j.position.set(
603
602
  this.#l.break_fixed_left,
604
603
  this.#l.break_fixed_top
@@ -606,23 +605,23 @@ $1
606
605
  const u = this.#s.shift();
607
606
  return this.#s.length > 0 && u(), !0;
608
607
  };
609
- for (const u of N) u.className = u.className.replace("sn_ch_yet sn", "go");
608
+ for (const u of E) u.className = u.className.replace("sn_ch_yet sn", "go");
610
609
  s > 0 && ++s;
611
- let E;
612
- for (let u = g - 2; u >= 0; --u) {
613
- const { elm: b } = this.#F[u];
614
- if (b.tagName === "SPAN") {
615
- E = b.parentElement?.tagName === "RUBY" ? b.parentElement.parentElement ?? b : b;
610
+ let x;
611
+ for (let u = _ - 2; u >= 0; --u) {
612
+ const { elm: $ } = this.#F[u];
613
+ if ($.tagName === "SPAN") {
614
+ x = $.parentElement?.tagName === "RUBY" ? $.parentElement.parentElement ?? $ : $;
616
615
  break;
617
616
  }
618
617
  }
619
- if (!E || e || s === g) {
620
- this.#C();
618
+ if (!x || e || s === _) {
619
+ this.#S();
621
620
  return;
622
621
  }
623
- E.addEventListener("animationend", () => this.#C(), { once: !0 });
622
+ x.addEventListener("animationend", () => this.#S(), { once: !0 });
624
623
  }
625
- #C = () => !1;
624
+ #S = () => !1;
626
625
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
627
626
  #P(t, e, s, i, a, n) {
628
627
  t.alpha = 0, e.x && (i.x = e.x.startsWith("=") ? i.x + parseInt(e.x.slice(1)) : parseInt(e.x)), e.y && (i.y = e.y.startsWith("=") ? i.y + parseInt(e.y.slice(1)) : parseInt(e.y)), e.width && (i.width = parseInt(e.width)), e.height && (i.height = parseInt(e.height)), e.wait && (n.wait = e.wait), t.width = i.width, t.height = i.height, n.x ? t.position.set(
@@ -641,7 +640,7 @@ $1
641
640
  }
642
641
  #O = [];
643
642
  skipChIn() {
644
- let t = this.#C();
643
+ let t = this.#S();
645
644
  for (const e of this.#O)
646
645
  e.tw && (e.tw.stop().end(), t = !0);
647
646
  return this.#O = [], t;
@@ -651,7 +650,7 @@ $1
651
650
  static #I = /[{\s.,*{]/;
652
651
  // https://regex101.com/r/APC91I/1
653
652
  static initChStyle() {
654
- c.#$ = /* @__PURE__ */ Object.create(null), c.#S = /* @__PURE__ */ Object.create(null);
653
+ c.#$ = /* @__PURE__ */ Object.create(null), c.#v = /* @__PURE__ */ Object.create(null);
655
654
  }
656
655
  static getChInStyle(t) {
657
656
  return c.#$[t];
@@ -686,17 +685,17 @@ $1
686
685
  };
687
686
  }
688
687
  // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
689
- static #S = /* @__PURE__ */ Object.create(null);
688
+ static #v = /* @__PURE__ */ Object.create(null);
690
689
  static getChOutStyle(t) {
691
- return c.#S[t];
690
+ return c.#v[t];
692
691
  }
693
692
  static ch_out_style(t) {
694
693
  const { name: e } = t;
695
694
  if (!e) throw "nameは必須です";
696
695
  if (c.#I.test(e)) throw `name【${e}】に使えない文字が含まれます`;
697
- if (e in c.#S) throw `name【${e}】はすでにあります`;
696
+ if (e in c.#v) throw `name【${e}】はすでにあります`;
698
697
  const s = String(t.x ?? "=0"), i = String(t.y ?? "=0");
699
- return c.#S[e] = {
698
+ return c.#v[e] = {
700
699
  wait: v(t, "wait", 500),
701
700
  // アニメ・FI時間
702
701
  alpha: v(t, "alpha", 0),
@@ -732,10 +731,10 @@ $1
732
731
  const t = c.#j;
733
732
  t.parent?.removeChild(t), c.#W.destroy();
734
733
  }
735
- #v = "Quadratic.Out";
734
+ #C = "Quadratic.Out";
736
735
  #E = "Quadratic.Out";
737
736
  #H() {
738
- this.#d.clear(), this.#F = [], this.#g = 0, this.#s = [], this.skipChIn();
737
+ this.#d.clear(), this.#F = [], this.#m = 0, this.#s = [], this.skipChIn();
739
738
  const t = this.#e.cloneNode(!0);
740
739
  t.textContent = "";
741
740
  const e = this.#e, s = Array.from(e.getElementsByClassName("sn_ch"));
@@ -749,7 +748,7 @@ $1
749
748
  // 縦中横
750
749
  );
751
750
  if (!l.ch_out_style) return;
752
- const h = c.#S[l.ch_out_style];
751
+ const h = c.#v[l.ch_out_style];
753
752
  if (h) {
754
753
  if (h.wait === 0) {
755
754
  n.style.display = "none";
@@ -761,14 +760,14 @@ $1
761
760
  const a = () => {
762
761
  e.parentElement.removeChild(e);
763
762
  for (const n of this.#h.removeChildren())
764
- n instanceof T && c.#o.unButton(n), n.destroy();
763
+ n instanceof T && c.#r.unButton(n), n.destroy();
765
764
  };
766
765
  i === 0 ? (this.#e.textContent = "", a()) : e.lastElementChild?.addEventListener("animationend", a, { once: !0 }), this.#e = t;
767
766
  }
768
767
  reNew() {
769
768
  this.#H();
770
769
  const t = new c(this.ctn, () => this.canFocus(), this.sys);
771
- return t.#t = this.#t, t.#e.style.cssText = this.#e.style.cssText, t.#r = this.#r, t.name = this.name, t.#_(), t.#M = this.#M, t.#v = this.#v, t.#E = this.#E, this.#l.reNew(t.#l), this.destroy(), t;
770
+ return t.#t = this.#t, t.#e.style.cssText = this.#e.style.cssText, t.#o = this.#o, t.name = this.name, t.#g(), t.#M = this.#M, t.#C = this.#C, t.#E = this.#E, this.#l.reNew(t.#l), this.destroy(), t;
772
771
  }
773
772
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
774
773
  #M = void 0;
@@ -777,16 +776,16 @@ $1
777
776
  return {
778
777
  infTL: this.#t,
779
778
  cssText: this.#e.style.cssText,
780
- left: this.#r,
779
+ left: this.#o,
781
780
  // idc_hArg : this.#idc.gethArg(),
782
781
  ch_filter: this.#M,
783
- fi_easing: this.#v,
782
+ fi_easing: this.#C,
784
783
  fo_easing: this.#E,
785
784
  hyph: this.#l.record()
786
785
  };
787
786
  }
788
787
  playback(t) {
789
- this.#t = t.infTL, this.position.set(this.#t.pad_left, this.#t.pad_top), this.#e.style.cssText = t.cssText, this.#r = t.left, this.#_(), this.#M = t.ch_filter, this.#v = t.fi_easing, this.#E = t.fo_easing, this.#l.playback(t.hyph);
788
+ this.#t = t.infTL, this.position.set(this.#t.pad_left, this.#t.pad_top), this.#e.style.cssText = t.cssText, this.#o = t.left, this.#g(), this.#M = t.ch_filter, this.#C = t.fi_easing, this.#E = t.fo_easing, this.#l.playback(t.hyph);
790
789
  }
791
790
  get cssText() {
792
791
  return this.#e.style.cssText;
@@ -796,11 +795,11 @@ $1
796
795
  }
797
796
  #f = void 0;
798
797
  snapshot(t, e) {
799
- mt((s) => {
800
- this.#f = G.from(s), this.#p && (this.#f.x += j.stageW - (this.#r + this.#t.$width)), this.#f.y -= this.#b, this.#f.texture.frame = new X(
798
+ yt((s) => {
799
+ this.#f = G.from(s), this.#p && (this.#f.x += j.stageW - (this.#o + this.#t.$width)), this.#f.y -= this.#b, this.#f.texture.frame = new X(
801
800
  0,
802
801
  0,
803
- Math.min(this.#f.width, this.#t.$width - this.#r),
802
+ Math.min(this.#f.width, this.#t.$width - this.#o),
804
803
  Math.min(this.#f.height, this.#t.$height)
805
804
  ), this.#h.addChild(this.#f), t.render(this.#f, { clear: !1 }), e();
806
805
  }, this.#e, this.#t, this.#i, this.#b, !1);
@@ -825,16 +824,16 @@ $1
825
824
  c.delBreak(), this.#e.parentElement.removeChild(this.#e), this.removeChild(this.#h), this.removeChild(this.#d), super.destroy();
826
825
  }
827
826
  }
828
- class x extends tt {
827
+ class k extends tt {
829
828
  static #c;
830
829
  static #n;
831
- static #o;
830
+ static #r;
832
831
  static #a;
833
832
  static init(t, e, s, i, a, n) {
834
- this.#c = t, c.init(t, n), this.#n = s, this.#a = i, this.#o = a, s.setDoRecProc((l) => this.chgDoRec(l)), e.autowc = (l) => this.#u(l), e.autowc({ enabled: !1, text: "", time: 0 }), e.ch_in_style = (l) => this.#e(l), e.ch_out_style = (l) => this.#h(l), c.initChStyle(), ot(), V(
833
+ this.#c = t, c.init(t, n), this.#n = s, this.#a = i, this.#r = a, s.setDoRecProc((l) => this.chgDoRec(l)), e.autowc = (l) => this.#u(l), e.autowc({ enabled: !1, text: "", time: 0 }), e.ch_in_style = (l) => this.#e(l), e.ch_out_style = (l) => this.#h(l), c.initChStyle(), rt(), V(
835
834
  t.matchPath(".+", et.FONT).flatMap((l) => Object.values(l).map((h) => `
836
835
  @font-face {
837
- font-family: '${h}';
836
+ font-family: '${String(h)}';
838
837
  src: url('${this.#c.searchPath(String(h), et.FONT)}');
839
838
  }
840
839
  `)).join("") + `
@@ -876,46 +875,46 @@ class x extends tt {
876
875
  }
877
876
  // 文字出現演出
878
877
  static #e(t) {
879
- const e = c.ch_in_style(t), s = e.x.startsWith("=") ? `${e.nx * 100}%` : `${e.nx}px`, i = e.y.startsWith("=") ? `${e.ny * 100}%` : `${e.ny}px`, { name: a } = t;
878
+ const { x: e, y: s, nx: i, ny: a, alpha: n, wait: l, ease: h, rotate: r, scale_x: b, scale_y: _ } = c.ch_in_style(t), w = e.startsWith("=") ? `${String(i * 100)}%` : `${String(i)}px`, E = s.startsWith("=") ? `${String(a * 100)}%` : `${String(a)}px`, { name: x = "" } = t;
880
879
  return V(`
881
- .sn_ch_in_${a} {
880
+ .sn_ch_in_${x} {
882
881
  position: relative;
883
882
  display: inline-block;
884
883
  }
885
- .go_ch_in_${a} {
886
- opacity: ${e.alpha};
884
+ .go_ch_in_${x} {
885
+ opacity: ${String(n)};
887
886
  position: relative;
888
887
  display: inline-block;
889
- animation: sn_ch_in_${a} ${e.wait}ms ${e.ease} 0s both;
888
+ animation: sn_ch_in_${x} ${String(l)}ms ${h} 0s both;
890
889
  }
891
- @keyframes sn_ch_in_${a} {
892
- from {transform: rotate(${e.rotate}deg) scale(${e.scale_x}, ${e.scale_y}) translate(${s}, ${i})}
890
+ @keyframes sn_ch_in_${x} {
891
+ from {transform: rotate(${String(r)}deg) scale(${String(b)}, ${String(_)}) translate(${w}, ${E})}
893
892
  to {opacity: 1; transform: none;}
894
893
  }
895
894
  `), !1;
896
895
  }
897
896
  // 文字消去演出
898
897
  static #h(t) {
899
- const e = c.ch_out_style(t), s = e.x.startsWith("=") ? `${e.nx * 100}%` : `${e.nx}px`, i = e.y.startsWith("=") ? `${e.ny * 100}%` : `${e.ny}px`, { name: a } = t;
898
+ const { x: e, y: s, nx: i, ny: a, alpha: n, wait: l, ease: h, rotate: r, scale_x: b, scale_y: _ } = c.ch_out_style(t), w = e.startsWith("=") ? `${String(i * 100)}%` : `${String(i)}px`, E = s.startsWith("=") ? `${String(a * 100)}%` : `${String(a)}px`, { name: x = "" } = t;
900
899
  return V(`
901
- .go_ch_out_${a} {
900
+ .go_ch_out_${x} {
902
901
  position: relative;
903
902
  display: inline-block;
904
- animation: go_ch_out_${a} ${e.wait}ms ${e.ease} 0s both;
903
+ animation: go_ch_out_${x} ${String(l)}ms ${h} 0s both;
905
904
  }
906
- @keyframes go_ch_out_${a} {
905
+ @keyframes go_ch_out_${x} {
907
906
  to {
908
- opacity: ${e.alpha};
909
- transform: rotate(${e.rotate}deg) scale(${e.scale_x}, ${e.scale_y}) translate(${s}, ${i});
907
+ opacity: ${String(n)};
908
+ transform: rotate(${String(r)}deg) scale(${String(b)}, ${String(_)}) translate(${w}, ${E});
910
909
  }
911
910
  `), !1;
912
911
  }
913
912
  static #d = 10;
914
913
  static set msecChWait(t) {
915
- x.#d = t;
914
+ k.#d = t;
916
915
  }
917
916
  static get msecChWait() {
918
- return x.#d;
917
+ return k.#d;
919
918
  }
920
919
  static #k;
921
920
  static #l;
@@ -923,16 +922,16 @@ class x extends tt {
923
922
  this.#k = t, this.#l = e, c.setEvtMng(t, s);
924
923
  }
925
924
  // 文字ごとのウェイト
926
- static #m = !1;
925
+ static #y = !1;
927
926
  static #t = {};
928
927
  static #u(t) {
929
- this.#m = F(t, "enabled", this.#m), this.#n.setVal_Nochk("save", "const.sn.autowc.enabled", this.#m);
928
+ this.#y = F(t, "enabled", this.#y), this.#n.setVal_Nochk("save", "const.sn.autowc.enabled", this.#y);
930
929
  const { text: e } = t;
931
930
  if ("text" in t != "time" in t) throw "[autowc] textとtimeは同時指定必須です";
932
931
  if (this.#n.setVal_Nochk("save", "const.sn.autowc.text", e), !e)
933
932
  return this.#n.setVal_Nochk("save", "const.sn.autowc.time", ""), !1;
934
933
  const s = e.length;
935
- if (this.#m && s === 0) throw '[autowc] enabled === false かつ text === "" は許されません';
934
+ if (this.#y && s === 0) throw '[autowc] enabled === false かつ text === "" は許されません';
936
935
  const i = String(t.time).split(",");
937
936
  if (i.length !== s) throw "[autowc] text文字数とtimeに記述された待ち時間(コンマ区切り)は同数にして下さい";
938
937
  this.#t = {};
@@ -940,16 +939,16 @@ class x extends tt {
940
939
  return this.#n.setVal_Nochk("save", "const.sn.autowc.time", t.time), !1;
941
940
  }
942
941
  // バック
943
- #_ = 0;
944
- #r = 0;
942
+ #g = 0;
943
+ #o = 0;
945
944
  #p = !1;
946
945
  #i = void 0;
947
946
  #b = "";
948
947
  // 背景画像無し(=単色塗り)
949
948
  // 文字表示
950
- #s = new c(this.ctn, () => this.canFocus(), x.#l);
949
+ #s = new c(this.ctn, () => this.canFocus(), k.#l);
951
950
  #F = new st();
952
- #g = document.createElement("span");
951
+ #m = document.createElement("span");
953
952
  // cssチェック・保存用
954
953
  static #U = {
955
954
  "text-align": 0,
@@ -961,15 +960,15 @@ class x extends tt {
961
960
  "padding-top": 0,
962
961
  "padding-bottom": 0
963
962
  };
964
- #y = new T();
963
+ #_ = new T();
965
964
  constructor() {
966
- super(), this.ctn.addChild(this.#s), this.#F.init(this.#Y), this.ctn.addChild(this.#y), this.#y.name = "cntBtn", this.lay({ style: `width: ${j.stageW}px; height: ${j.stageH}px; font-family: 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', '游ゴシック Medium', meiryo, sans-serif; color: white; font-size: 24px; line-height: 1.5; padding: 16px;`, in_style: "default", out_style: "default", back_clear: "true" });
965
+ super(), this.ctn.addChild(this.#s), this.#F.init(this.#Y), this.ctn.addChild(this.#_), this.#_.name = "cntBtn", this.lay({ style: `width: ${String(j.stageW)}px; height: ${String(j.stageH)}px; font-family: 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', '游ゴシック Medium', meiryo, sans-serif; color: white; font-size: 24px; line-height: 1.5; padding: ${String(16)}px;`, in_style: "default", out_style: "default", back_clear: "true" });
967
966
  }
968
967
  destroy() {
969
- this.#i && (this.ctn.removeChild(this.#i).destroy(), this.#i = void 0), x.#a.pagebreak(), this.#s.destroy();
968
+ this.#i && (this.ctn.removeChild(this.#i).destroy(), this.#i = void 0), k.#a.pagebreak(), this.#s.destroy();
970
969
  }
971
970
  static destroy() {
972
- this.#m = !1, this.#t = {}, this.#f = (t) => t;
971
+ this.#y = !1, this.#t = {}, this.#f = (t) => t;
973
972
  }
974
973
  set name(t) {
975
974
  this.name_ = t, this.#s.name = t;
@@ -982,7 +981,7 @@ class x extends tt {
982
981
  this.#s.cvsResize();
983
982
  }
984
983
  cvsResizeChildren() {
985
- for (const t of this.#y.children) t.cvsResize();
984
+ for (const t of this.#_.children) t.cvsResize();
986
985
  }
987
986
  procSetX(t) {
988
987
  this.#s.lay({ x: t });
@@ -991,29 +990,29 @@ class x extends tt {
991
990
  this.#s.lay({ y: t });
992
991
  }
993
992
  lay(t) {
994
- if (super.lay(t), tt.setXY(this.ctn, t, this.ctn), t[":id_tag"] = this.name_.slice(0, -7), st.setting(t), this.#W(t), this.#s.lay(t), "r_align" in t && (this.#x = t.r_align ?? ""), this.#z = j.isSafari ? this.#s.tategaki ? (i, a) => `text-align: start; height: ${a}em; padding-top: ${i}; padding-bottom: ${i};` : (i, a) => `text-align: start; width: ${a}em; padding-left: ${i}; padding-right: ${i};` : this.#s.tategaki ? (i) => `text-align: justify; text-align-last: justify; padding-top: ${i}; padding-bottom: ${i};` : (i) => `text-align: justify; text-align-last: justify; padding-left: ${i}; padding-right: ${i};`, j.isFirefox && (this.#q = this.#Z), "r_style" in t)
993
+ if (super.lay(t), tt.setXY(this.ctn, t, this.ctn), t[":id_tag"] = this.name_.slice(0, -7), st.setting(t), this.#W(t), this.#s.lay(t), "r_align" in t && (this.#x = t.r_align ?? ""), this.#z = j.isSafari ? this.#s.tategaki ? (i, a) => `text-align: start; height: ${String(a)}em; padding-top: ${i}; padding-bottom: ${i};` : (i, a) => `text-align: start; width: ${String(a)}em; padding-left: ${i}; padding-right: ${i};` : this.#s.tategaki ? (i) => `text-align: justify; text-align-last: justify; padding-top: ${i}; padding-bottom: ${i};` : (i) => `text-align: justify; text-align-last: justify; padding-left: ${i}; padding-right: ${i};`, j.isFirefox && (this.#q = this.#Z), "r_style" in t)
995
994
  if (t.r_style) {
996
995
  const i = document.createElement("span");
997
996
  i.style.cssText = t.r_style;
998
- const a = i.style.length, n = this.#g.style;
997
+ const a = i.style.length, n = this.#m.style;
999
998
  for (let l = 0; l < a; ++l) {
1000
999
  const h = i.style[l];
1001
- if (h in x.#U) {
1002
- K.myTrace(`${h}は指定できません`, "W");
1000
+ if (h in k.#U) {
1001
+ K.myTrace(`${String(h)}は指定できません`, "W");
1003
1002
  continue;
1004
1003
  }
1005
- const o = i.style[h];
1006
- o && (n[h] = o);
1004
+ const r = i.style[h];
1005
+ r && (n[h] = r);
1007
1006
  }
1008
- } else this.#g.style.cssText = "";
1009
- if ("alpha" in t) for (const i of this.#y.children) i.alpha = this.ctn.alpha;
1010
- this.#C(t), this.#$(t);
1007
+ } else this.#m.style.cssText = "";
1008
+ if ("alpha" in t) for (const i of this.#_.children) i.alpha = this.ctn.alpha;
1009
+ this.#S(t), this.#$(t);
1011
1010
  const e = W.procID + `TxtLayer lay name:${this.name_}`, s = this.#j(t, (i) => {
1012
1011
  i && W.endProc(e);
1013
1012
  });
1014
1013
  return s && W.beginProc(e), s;
1015
1014
  }
1016
- #C(t) {
1015
+ #S(t) {
1017
1016
  const { in_style: e } = t;
1018
1017
  if (!e) return;
1019
1018
  const s = c.getChInStyle(e);
@@ -1035,34 +1034,34 @@ class x extends tt {
1035
1034
  this.#I = e;
1036
1035
  }
1037
1036
  #I = "";
1038
- #S = new I();
1037
+ #v = new I();
1039
1038
  #j(t, e) {
1040
1039
  if ("back_clear" in t)
1041
- return F(t, "back_clear", !1) && (this.#_ = 0, this.#r = 0, this.#p = !1, this.#b = ""), e(!1), !1;
1042
- this.#r = v(t, "b_alpha", this.#r), this.#p = F(t, "b_alpha_isfixed", this.#p);
1043
- const s = (this.#p ? 1 : Number(x.#n.getVal("sys:TextLayer.Back.Alpha"))) * this.#r;
1040
+ return F(t, "back_clear", !1) && (this.#g = 0, this.#o = 0, this.#p = !1, this.#b = ""), e(!1), !1;
1041
+ this.#o = v(t, "b_alpha", this.#o), this.#p = F(t, "b_alpha_isfixed", this.#p);
1042
+ const s = (this.#p ? 1 : Number(k.#n.getVal("sys:TextLayer.Back.Alpha"))) * this.#o;
1044
1043
  if (t.b_pic) {
1045
1044
  if (this.#b !== t.b_pic)
1046
- return this.#b = t.b_pic, this.#i && (this.ctn.removeChild(this.#i), this.#i.destroy()), this.#S = new I(this.#b, this.ctn, (i) => {
1045
+ return this.#b = t.b_pic, this.#i && (this.ctn.removeChild(this.#i), this.#i.destroy()), this.#v = new I(this.#b, this.ctn, (i) => {
1047
1046
  this.#i = i, i.name = "back(pic)", i.visible = s > 0, i.alpha = s, this.#s.setMySize(i.width, i.height), this.ctn.setChildIndex(i, 0), e(!0);
1048
- }), this.#S.ret;
1049
- } else "b_color" in t && (this.#_ = rt(t, "b_color", 0), this.#i && (this.ctn.removeChild(this.#i), this.#i.destroy()), this.#b = "", this.ctn.addChildAt(
1050
- (this.#i = new B()).beginFill(this.#_, s).lineStyle(void 0).drawRect(0, 0, this.#s.getWidth, this.#s.getHeight).endFill(),
1047
+ }), this.#v.ret;
1048
+ } else "b_color" in t && (this.#g = ot(t, "b_color", 0), this.#i && (this.ctn.removeChild(this.#i), this.#i.destroy()), this.#b = "", this.ctn.addChildAt(
1049
+ (this.#i = new B()).beginFill(this.#g, s).lineStyle(void 0).drawRect(0, 0, this.#s.getWidth, this.#s.getHeight).endFill(),
1051
1050
  0
1052
1051
  ), this.#i.name = "back(color)");
1053
1052
  return this.#i && (this.#i.visible = s > 0, this.#i.alpha = s), e(!1), !1;
1054
1053
  }
1055
1054
  chgBackAlpha(t) {
1056
- const e = this.#p ? this.#r : t * this.#r;
1055
+ const e = this.#p ? this.#o : t * this.#o;
1057
1056
  this.#i instanceof B && (this.#i && (this.ctn.removeChild(this.#i), this.#i.destroy()), this.ctn.addChildAt(
1058
- (this.#i = new B()).beginFill(this.#_, e).lineStyle(void 0).drawRect(0, 0, this.#s.getWidth, this.#s.getHeight).endFill(),
1057
+ (this.#i = new B()).beginFill(this.#g, e).lineStyle(void 0).drawRect(0, 0, this.#s.getWidth, this.#s.getHeight).endFill(),
1059
1058
  0
1060
1059
  ), this.#i.name = "back(color)"), this.#i && (this.#i.visible = e > 0, this.#i.alpha = e);
1061
1060
  }
1062
1061
  #W(t) {
1063
- "noffs" in t && (this.#H = t.noffs ?? "", this.#M = new RegExp(`[ ${this.#H}]`)), "ffs" in t && (this.#v ??= "", this.#E = this.#v === "" ? () => "" : (e) => this.#M.test(e) ? "" : ` font-feature-settings: ${this.#v};`);
1062
+ "noffs" in t && (this.#H = t.noffs ?? "", this.#M = new RegExp(`[ ${this.#H}]`)), "ffs" in t && (this.#C ??= "", this.#E = this.#C === "" ? () => "" : (e) => this.#M.test(e) ? "" : ` font-feature-settings: ${this.#C};`);
1064
1063
  }
1065
- #v = "";
1064
+ #C = "";
1066
1065
  #E = (t) => "";
1067
1066
  #H = "";
1068
1067
  // eslint-disable-next-line no-irregular-whitespace
@@ -1084,10 +1083,10 @@ class x extends tt {
1084
1083
  n = this.#z("0", a);
1085
1084
  break;
1086
1085
  case "121":
1087
- n = this.#z(`calc(${(a - e.length) / (e.length * 2)}em)`, a);
1086
+ n = this.#z(`calc(${String((a - e.length) / (e.length * 2))}em)`, a);
1088
1087
  break;
1089
1088
  case "even":
1090
- n = this.#z(`calc(${(a - e.length) / (e.length + 1)}em)`, a);
1089
+ n = this.#z(`calc(${String((a - e.length) / (e.length + 1))}em)`, a);
1091
1090
  break;
1092
1091
  case "1ruby":
1093
1092
  n = this.#z("1em", a);
@@ -1121,8 +1120,8 @@ class x extends tt {
1121
1120
  break;
1122
1121
  case "even":
1123
1122
  {
1124
- const l = (a - e.length) / (e.length + 1);
1125
- n = "ruby-align: space-between; " + (this.#s.tategaki ? `padding-top: ${l}em; padding-bottom: ${l}em;` : `padding-left: ${l}em; padding-right: ${l}em;`);
1123
+ const l = ` ${String((a - e.length) / (e.length + 1))}em;`;
1124
+ n = "ruby-align: space-between; " + (this.#s.tategaki ? `padding-top:${l} padding-bottom:${l}` : `padding-left:${l} padding-right:${l}`);
1126
1125
  }
1127
1126
  break;
1128
1127
  case "1ruby":
@@ -1142,7 +1141,7 @@ class x extends tt {
1142
1141
  }
1143
1142
  #Y = (t, e) => {
1144
1143
  let s = e;
1145
- x.#c.oCfg.debug.putCh && console.log(`🖊 文字表示 text:\`${t}\`(${t.charCodeAt(0).toString(16)}) ruby:\`${s}\` name:\`${this.name_}\``);
1144
+ k.#c.oCfg.debug.putCh && console.log(`🖊 文字表示 text:\`${t}\`(${t.charCodeAt(0).toString(16)}) ruby:\`${s}\` name:\`${this.name_}\``);
1146
1145
  const i = s.split("|");
1147
1146
  let a = "";
1148
1147
  const [n, ...l] = i, h = l.join("|");
@@ -1176,15 +1175,15 @@ class x extends tt {
1176
1175
  this.#T = !1, this.#w = !0, a = this.#X(t, h, n);
1177
1176
  break;
1178
1177
  case "gotxt":
1179
- this.#V(), this.#w ? (this.isCur && x.#a.recText(
1178
+ this.#V(), this.#w ? (this.isCur && k.#a.recText(
1180
1179
  this.#R.join("").replace(/^<ruby>&emsp;<rt>&emsp;<\/rt><\/ruby>(<br\/>)+/, "").replaceAll(/style='(anim\S+ [^;]+;\s*)+/g, "style='").replaceAll(/( style=''| data-(add|arg|cmd)='[^']+'|\n+|\t+)/g, "").replaceAll(/class='sn_ch[^']+/g, "class='sn_ch").replaceAll("display: none;", "").replaceAll("class='offrec'", "style='display: none;'")
1181
1180
  ), this.#s.goTxt(this.#R, this.#B === 0), this.#w = !1, this.#B = 0) : this.isCur && this.#s.noticeCompTxt();
1182
1181
  return;
1183
1182
  // breakではない
1184
1183
  case "add":
1185
1184
  {
1186
- const o = JSON.parse(h), { style: $ = "", wait: g = null } = o, { cl: k, sty: N } = this.#D(!0, g ? O(g) : null);
1187
- this.#R.push(`<span${k} style='${N} display: inline; ${$}'>`), delete o.style, this.#K(o);
1185
+ const r = JSON.parse(h), { style: b = "", wait: _ = null } = r, { cl: w, sty: E } = this.#D(!0, _ ? O(_) : null);
1186
+ this.#R.push(`<span${w} style='${E} display: inline; ${b}'>`), delete r.style, this.#K(r);
1188
1187
  }
1189
1188
  return;
1190
1189
  // breakではない
@@ -1195,33 +1194,33 @@ class x extends tt {
1195
1194
  case "grp":
1196
1195
  this.#w = !0;
1197
1196
  {
1198
- const o = JSON.parse(h);
1199
- if (o.id ??= String(this.#R.length), o.id === "break") {
1200
- this.#s.dispBreak(o);
1197
+ const r = JSON.parse(h);
1198
+ if (r.id ??= String(this.#R.length), r.id === "break") {
1199
+ this.#s.dispBreak(r);
1201
1200
  return;
1202
1201
  }
1203
- this.#T = !1, o.delay = this.#B, o.r ??= "", o.style ??= "", o.r_style ??= "";
1204
- const { r: $, wait: g = null, r_style: k } = o, { cl: N, sty: E, lnk: u } = this.#D(!0, g ? O(g) : null);
1205
- a = `<span${N} style='${E} ${o.style}'><ruby><span data-cmd='grp' data-arg='${JSON.stringify(o)}'${u} style='${E} display: inline;'>&emsp;</span><rt${u}${this.#q(
1202
+ this.#T = !1, r.delay = this.#B, r.r ??= "", r.style ??= "", r.r_style ??= "";
1203
+ const { r: b, wait: _ = null, r_style: w } = r, { cl: E, sty: x, lnk: u } = this.#D(!0, _ ? O(_) : null);
1204
+ a = `<span${E} style='${x} ${r.style}'><ruby><span data-cmd='grp' data-arg='${JSON.stringify(r)}'${u} style='${x} display: inline;'>&emsp;</span><rt${u}${this.#q(
1206
1205
  " ",
1207
- $,
1206
+ b,
1208
1207
  this.#x,
1209
- this.#g.style.cssText + (this.#N.at(-1)?.o.r_style ?? "") + k
1210
- )}>${o.r}</rt></ruby></span>`;
1208
+ this.#m.style.cssText + (this.#N.at(-1)?.o.r_style ?? "") + w
1209
+ )}>${r.r}</rt></ruby></span>`;
1211
1210
  }
1212
1211
  break;
1213
1212
  case "tcy":
1214
1213
  this.#T = !1, this.#w = !0;
1215
1214
  {
1216
- const { t: o = "", r: $ = "", wait: g = null, style: k = "", r_style: N = "" } = JSON.parse(h);
1217
- x.#n.doRecLog() && (this.#G += t + (s ? `《${s}》` : ""), this.#J += o);
1218
- const E = j.isSafari ? $.replaceAll(/[A-Za-z0-9]/g, (d) => String.fromCharCode(d.charCodeAt(0) + 65248)) : $, { cl: u, sty: b, lnk: w } = this.#D(!0, g ? O(g) : null);
1219
- a = `<span${u} style='${b}${this.#E(o)} ${k}'><ruby><span${w} style='${b} display: inline; text-combine-upright: all;'>${o}</span><rt${w}${this.#q(
1220
- o,
1221
- E,
1215
+ const { t: r = "", r: b = "", wait: _ = null, style: w = "", r_style: E = "" } = JSON.parse(h);
1216
+ k.#n.doRecLog() && (this.#G += t + (s ? `《${s}》` : ""), this.#J += r);
1217
+ const x = j.isSafari ? b.replaceAll(/[A-Za-z0-9]/g, (d) => String.fromCharCode(d.charCodeAt(0) + 65248)) : b, { cl: u, sty: $, lnk: S } = this.#D(!0, _ ? O(_) : null);
1218
+ a = `<span${u} style='${$}${this.#E(r)} ${w}'><ruby><span${S} style='${$} display: inline; text-combine-upright: all;'>${r}</span><rt${S}${this.#q(
1219
+ r,
1220
+ x,
1222
1221
  this.#x,
1223
- this.#g.style.cssText + (this.#N.at(-1)?.o.r_style ?? "") + N
1224
- )}>${E}</rt></ruby></span>`;
1222
+ this.#m.style.cssText + (this.#N.at(-1)?.o.r_style ?? "") + E
1223
+ )}>${x}</rt></ruby></span>`;
1225
1224
  }
1226
1225
  break;
1227
1226
  case "del":
@@ -1235,10 +1234,10 @@ class x extends tt {
1235
1234
  case "link":
1236
1235
  this.#w = !0;
1237
1236
  {
1238
- const o = JSON.parse(h);
1239
- o[":link"] = " data-lnk='@'";
1240
- const { cl: $, sty: g, curpos: k } = this.#D(!1, o.wait ? O(o.wait) : null);
1241
- this.#R.push(`<span${$} style='${g} display: inline; ${o.style ?? ""}' ${k} data-arg='${h}'>`), delete o.style, this.#Q(o);
1237
+ const r = JSON.parse(h);
1238
+ r[":link"] = " data-lnk='@'";
1239
+ const { cl: b, sty: _, curpos: w } = this.#D(!1, r.wait ? O(r.wait) : null);
1240
+ this.#R.push(`<span${b} style='${_} display: inline; ${r.style ?? ""}' ${w} data-arg='${h}'>`), delete r.style, this.#Q(r);
1242
1241
  }
1243
1242
  return;
1244
1243
  // breakではない
@@ -1251,29 +1250,29 @@ class x extends tt {
1251
1250
  }
1252
1251
  break;
1253
1252
  }
1254
- this.#R.push(x.#f(a));
1253
+ this.#R.push(k.#f(a));
1255
1254
  };
1256
1255
  #X(t, e, s) {
1257
1256
  const i = t === " " ? "&nbsp;" : t === " " ? "&emsp;" : t;
1258
- x.#n.doRecLog() && (this.#G += i + (e ? `《${e}》` : ""), t !== " " && (this.#J += t));
1257
+ k.#n.doRecLog() && (this.#G += i + (e ? `《${e}》` : ""), t !== " " && (this.#J += t));
1259
1258
  const { cl: a, sty: n, lnk: l } = this.#D(!0, null, t);
1260
1259
  return e ? `<span${a} style='${n} ${this.#E(t)}'><ruby>${// 文字個別に出現させるため以下にも ${cl} が必要
1261
- Array.from(t).map((h, o) => `<span${a}${l} style='${o > 0 ? this.#D(!0, null, t).sty : n} display: inline;'>${h === " " ? "&nbsp;" : h === " " ? "&emsp;" : h}</span>`).join("")}<rt${l}${this.#q(
1260
+ Array.from(t).map((h, r) => `<span${a}${l} style='${r > 0 ? this.#D(!0, null, t).sty : n} display: inline;'>${h === " " ? "&nbsp;" : h === " " ? "&emsp;" : h}</span>`).join("")}<rt${l}${this.#q(
1262
1261
  t,
1263
1262
  e,
1264
1263
  s,
1265
- this.#g.style.cssText + (this.#N.at(-1)?.o.r_style ?? "")
1264
+ this.#m.style.cssText + (this.#N.at(-1)?.o.r_style ?? "")
1266
1265
  )}>${e}</rt></ruby></span>` : `<span${a} style='${n} ${this.#E(t)}'${l}>${i}</span>`;
1267
1266
  }
1268
1267
  #D(t, e, s = `
1269
1268
  `) {
1270
- const i = this.#O ? e ?? this.#N.at(0)?.o.wait ?? (x.#m ? x.#t[s.at(0) ?? ""] ?? 0 : x.msecChWait) : 0;
1271
- x.#k.isSkipping ? this.#B = 0 : t && this.#O && (this.#B += O(i));
1269
+ const i = this.#O ? e ?? this.#N.at(0)?.o.wait ?? (k.#y ? k.#t[s.at(0) ?? ""] ?? 0 : k.msecChWait) : 0;
1270
+ k.#k.isSkipping ? this.#B = 0 : t && this.#O && (this.#B += O(i));
1272
1271
  const a = `data-add='{"ch_in_style":"${this.#P}", "ch_out_style":"${this.#I}"}'`;
1273
1272
  return {
1274
1273
  cl: ` class='sn_ch sn_ch_yet sn_ch_in_${this.#P}'`,
1275
1274
  // TxtStage.goTxt()はこれ単位で文字出現させる
1276
- sty: `animation-delay: ${this.#B}ms;${this.#N.at(-1)?.o.style ?? ""}`,
1275
+ sty: `animation-delay: ${String(this.#B)}ms;${this.#N.at(-1)?.o.style ?? ""}`,
1277
1276
  // TxtStage.goTxt()はこれ単位で文字出現させる
1278
1277
  lnk: (this.#N.at(0)?.o[":link"] ?? "") + " " + a,
1279
1278
  curpos: a
@@ -1289,11 +1288,11 @@ class x extends tt {
1289
1288
  r_align: this.#x,
1290
1289
  ch_in_style: this.#P,
1291
1290
  ch_out_style: this.#I
1292
- }), t.r_align && (this.#x = t.r_align), this.#C(t), this.#$(t);
1291
+ }), t.r_align && (this.#x = t.r_align), this.#S(t), this.#$(t);
1293
1292
  }
1294
1293
  #V() {
1295
1294
  const t = this.#N.pop();
1296
- t && (this.#x = t.r_align, this.#C({ in_style: t.ch_in_style }), this.#$({ out_style: t.ch_out_style }));
1295
+ t && (this.#x = t.r_align, this.#S({ in_style: t.ch_in_style }), this.#$({ out_style: t.ch_out_style }));
1297
1296
  }
1298
1297
  #Q(t) {
1299
1298
  const e = this.#N.at(-1);
@@ -1301,11 +1300,11 @@ class x extends tt {
1301
1300
  this.#K(t);
1302
1301
  return;
1303
1302
  }
1304
- e.o = { ...e.o, ...t }, !t.style && !t.r_style && (e.o.style = "", e.o.r_style = ""), t.r_align && (this.#x = t.r_align), this.#C(t), this.#$(t);
1303
+ e.o = { ...e.o, ...t }, !t.style && !t.r_style && (e.o.style = "", e.o.r_style = ""), t.r_align && (this.#x = t.r_align), this.#S(t), this.#$(t);
1305
1304
  }
1306
1305
  click = () => !this.ctn.interactiveChildren || !this.ctn.visible ? !1 : this.#s.skipChIn();
1307
1306
  clearText() {
1308
- this.ctn.addChild(this.#s = this.#s.reNew()), this.#B = 0, this.#T = !0, this.#R = [], this.#G = "", this.#J = "", x.#a.pagebreak();
1307
+ this.ctn.addChild(this.#s = this.#s.reNew()), this.#B = 0, this.#T = !0, this.#R = [], this.#G = "", this.#J = "", k.#a.pagebreak();
1309
1308
  }
1310
1309
  #G = "";
1311
1310
  #J = "";
@@ -1322,35 +1321,35 @@ class x extends tt {
1322
1321
  this.ctn.interactiveChildren = t;
1323
1322
  }
1324
1323
  addButton = (t) => new Promise((e) => {
1325
- t.key = `btn=[${this.#y.children.length}] ` + this.name_, t[":id_tag"] = t.key.slice(0, -7), F(t, "hint_tate", this.#s.tategaki);
1326
- const s = new pt(t, x.#k, () => e(), () => this.canFocus());
1327
- s.name = JSON.stringify(t).replaceAll('"', "'"), this.#y.addChild(s);
1324
+ t.key = `btn=[${String(this.#_.children.length)}] ` + this.name_, t[":id_tag"] = t.key.slice(0, -7), F(t, "hint_tate", this.#s.tategaki);
1325
+ const s = new pt(t, k.#k, () => e(), () => this.canFocus());
1326
+ s.name = JSON.stringify(t).replaceAll('"', "'"), this.#_.addChild(s);
1328
1327
  });
1329
1328
  canFocus() {
1330
- return (this.ctn.interactiveChildren ?? !1) && this.ctn.visible && x.#o(this);
1329
+ return (this.ctn.interactiveChildren ?? !1) && this.ctn.visible && k.#r(this);
1331
1330
  }
1332
1331
  clearLay(t) {
1333
1332
  super.clearLay(t), this.clearText();
1334
- for (const e of this.#y.removeChildren()) e.destroy();
1333
+ for (const e of this.#_.removeChildren()) e.destroy();
1335
1334
  }
1336
1335
  record = () => ({
1337
1336
  ...super.record(),
1338
1337
  enabled: this.enabled,
1339
- r_cssText: this.#g.style.cssText,
1338
+ r_cssText: this.#m.style.cssText,
1340
1339
  r_align: this.#x,
1341
1340
  // バック
1342
1341
  b_do: this.#i === void 0 ? void 0 : this.#i instanceof G ? "Sprite" : "Graphics",
1343
1342
  b_pic: this.#b,
1344
- b_color: this.#_,
1345
- b_alpha: this.#r,
1343
+ b_color: this.#g,
1344
+ b_alpha: this.#o,
1346
1345
  b_alpha_isfixed: this.#p,
1347
- ffs: this.#v,
1346
+ ffs: this.#C,
1348
1347
  txs: this.#s.record(),
1349
1348
  strNoFFS: this.#H,
1350
- btns: this.#y.children.map((t) => t.name)
1349
+ btns: this.#_.children.map((t) => t.name)
1351
1350
  });
1352
1351
  playback(t, e) {
1353
- super.playback(t, e), this.enabled = t.enabled, this.#g.style.cssText = t.r_cssText, this.#x = t.r_align, this.cvsResize(), this.#W(t), this.#s.playback(t.txs), this.#r = t.b_alpha, this.#p = t.b_alpha_isfixed, e.push(
1352
+ super.playback(t, e), this.enabled = t.enabled, this.#m.style.cssText = t.r_cssText, this.#x = t.r_align, this.cvsResize(), this.#W(t), this.#s.playback(t.txs), this.#o = t.b_alpha, this.#p = t.b_alpha_isfixed, e.push(
1354
1353
  new Promise((s) => {
1355
1354
  const i = t.b_do ? t.b_do === "Sprite" ? { b_pic: t.b_pic } : { b_color: t.b_color } : { b_pic: "" };
1356
1355
  i.b_alpha = t.b_alpha, i.b_alpha_isfixed = t.b_alpha_isfixed, this.#j(i, (a) => {
@@ -1377,25 +1376,25 @@ class x extends tt {
1377
1376
  }
1378
1377
  makeDesignCastChildren(t) {
1379
1378
  if (this.ctn.visible)
1380
- for (const e of this.#y.children) e.makeDesignCast(t);
1379
+ for (const e of this.#_.children) e.makeDesignCast(t);
1381
1380
  }
1382
1381
  showDesignCast() {
1383
1382
  this.#s.showDesignCast();
1384
1383
  }
1385
1384
  showDesignCastChildren() {
1386
- for (const t of this.#y.children) t.showDesignCast();
1385
+ for (const t of this.#_.children) t.showDesignCast();
1387
1386
  }
1388
1387
  dump() {
1389
- return this.#Y("", "gotxt|"), super.dump() + `, "enabled":"${this.enabled}", ${this.#s.dump()}, "b_pic":"${this.#b}", "b_color":"${this.#_}", "b_alpha":${this.#r}, "b_alpha_isfixed":"${this.#p}", "width":${this.#s.getWidth}, "height":${this.#s.getHeight}, "pixi_obj":[${this.ctn.children.map((t) => `{"class":"${t instanceof G ? "Sprite" : t instanceof B ? "Graphics" : t instanceof T ? "Container" : "?"}", "name":"${t.name}", "alpha":${t.alpha}, "x":${t.x}, "y":${t.y}, "visible":"${t.visible}"}`).join(",")}], "button":[${this.#y.children.map((t) => t.children[0]?.name ?? "{}").join(",")}]`;
1388
+ return this.#Y("", "gotxt|"), super.dump() + `, "enabled":"${String(this.enabled)}", ${this.#s.dump()}, "b_pic":"${this.#b}", "b_color":"${String(this.#g)}", "b_alpha":${String(this.#o)}, "b_alpha_isfixed":"${String(this.#p)}", "width":${String(this.#s.getWidth)}, "height":${String(this.#s.getHeight)}, "pixi_obj":[${this.ctn.children.map((t) => `{"class":"${t instanceof G ? "Sprite" : t instanceof B ? "Graphics" : t instanceof T ? "Container" : "?"}", "name":"${t.name}", "alpha":${String(t.alpha)}, "x":${String(t.x)}, "y":${String(t.y)}, "visible":"${String(t.visible)}"}`).join(",")}], "button":[${this.#_.children.map((t) => t.children[0]?.name ?? "{}").join(",")}]`;
1390
1389
  }
1391
1390
  }
1392
- const vt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1391
+ const Ct = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1393
1392
  __proto__: null,
1394
- TxtLayer: x
1393
+ TxtLayer: k
1395
1394
  }, Symbol.toStringTag, { value: "Module" }));
1396
1395
  export {
1397
- x as T,
1396
+ k as T,
1398
1397
  c as a,
1399
- vt as b
1398
+ Ct as b
1400
1399
  };
1401
1400
  //# sourceMappingURL=TxtLayer.js.map