@famibee/skynovel 1.64.9 → 1.64.10

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 (219) hide show
  1. package/README.md +1 -1
  2. package/dist/Button.js +162 -0
  3. package/dist/Button.js.map +1 -0
  4. package/dist/CallStack.js.map +1 -1
  5. package/dist/CmnTween.js +201 -0
  6. package/dist/CmnTween.js.map +1 -0
  7. package/dist/DebugMng.js +105 -0
  8. package/dist/DebugMng.js.map +1 -0
  9. package/dist/EventMng.js +40 -39
  10. package/dist/EventMng.js.map +1 -1
  11. package/dist/GrpLayer.js +192 -0
  12. package/dist/GrpLayer.js.map +1 -0
  13. package/dist/LayerMng.js +475 -2415
  14. package/dist/LayerMng.js.map +1 -1
  15. package/dist/Main.js +394 -0
  16. package/dist/Main.js.map +1 -0
  17. package/dist/PropParser.js +1 -1
  18. package/dist/PropParser.js.map +1 -1
  19. package/dist/Reading.js +11 -11
  20. package/dist/Reading.js.map +1 -1
  21. package/dist/RubySpliter.js +90 -0
  22. package/dist/RubySpliter.js.map +1 -0
  23. package/dist/ScriptIterator.js +263 -353
  24. package/dist/ScriptIterator.js.map +1 -1
  25. package/dist/SndBuf.js +746 -949
  26. package/dist/SndBuf.js.map +1 -1
  27. package/dist/SoundMng.js +1 -1
  28. package/dist/SoundMng.js.map +1 -1
  29. package/dist/SpritesMng.js +229 -0
  30. package/dist/SpritesMng.js.map +1 -0
  31. package/dist/TxtLayer.js +1402 -0
  32. package/dist/TxtLayer.js.map +1 -0
  33. package/dist/Variable.js +157 -164
  34. package/dist/Variable.js.map +1 -1
  35. package/dist/app.d.ts +4 -4
  36. package/dist/app.d.ts.map +1 -1
  37. package/dist/appMain.d.ts.map +1 -1
  38. package/dist/appMain_cmn.d.ts.map +1 -1
  39. package/dist/index.d.ts +0 -1
  40. package/dist/index.d.ts.map +1 -1
  41. package/dist/platform.js +369 -0
  42. package/dist/platform.js.map +1 -0
  43. package/dist/sn/Button.d.ts +2 -2
  44. package/dist/sn/CallStack.d.ts +2 -2
  45. package/dist/sn/CmnInterface.d.ts +39 -41
  46. package/dist/sn/CmnInterface.d.ts.map +1 -1
  47. package/dist/sn/CmnLib.d.ts +11 -7
  48. package/dist/sn/CmnLib.d.ts.map +1 -1
  49. package/dist/sn/CmnTween.d.ts +9 -9
  50. package/dist/sn/Config.d.ts.map +1 -1
  51. package/dist/sn/ConfigBase.d.ts +16 -17
  52. package/dist/sn/ConfigBase.d.ts.map +1 -1
  53. package/dist/sn/DebugMng.d.ts +2 -2
  54. package/dist/sn/DebugMng.d.ts.map +1 -1
  55. package/dist/sn/DesignCast.d.ts +9 -9
  56. package/dist/sn/DesignCast.d.ts.map +1 -1
  57. package/dist/sn/EventMng.d.ts +4 -4
  58. package/dist/sn/EventMng.d.ts.map +1 -1
  59. package/dist/sn/FrameMng.d.ts +5 -5
  60. package/dist/sn/FrameMng.d.ts.map +1 -1
  61. package/dist/sn/Grammar.d.ts +124 -124
  62. package/dist/sn/Grammar.d.ts.map +1 -1
  63. package/dist/sn/GrpLayer.d.ts +7 -7
  64. package/dist/sn/GrpLayer.d.ts.map +1 -1
  65. package/dist/sn/Hyphenation.d.ts +2 -2
  66. package/dist/sn/Layer.d.ts +10 -10
  67. package/dist/sn/LayerMng.d.ts +7 -8
  68. package/dist/sn/LayerMng.d.ts.map +1 -1
  69. package/dist/sn/Log.d.ts +3 -3
  70. package/dist/sn/Log.d.ts.map +1 -1
  71. package/dist/sn/Main.d.ts +6 -5
  72. package/dist/sn/Main.d.ts.map +1 -1
  73. package/dist/sn/Pages.d.ts +8 -8
  74. package/dist/sn/Pages.d.ts.map +1 -1
  75. package/dist/sn/PropParser.d.ts +3 -3
  76. package/dist/sn/PropParser.d.ts.map +1 -1
  77. package/dist/sn/Reading.d.ts +12 -12
  78. package/dist/sn/Reading.d.ts.map +1 -1
  79. package/dist/sn/RubySpliter.d.ts +4 -4
  80. package/dist/sn/RubySpliter.d.ts.map +1 -1
  81. package/dist/sn/ScriptIterator.d.ts +5 -6
  82. package/dist/sn/ScriptIterator.d.ts.map +1 -1
  83. package/dist/sn/SndBuf.d.ts +12 -12
  84. package/dist/sn/SndBuf.d.ts.map +1 -1
  85. package/dist/sn/SoundMng.d.ts +4 -4
  86. package/dist/sn/SoundMng.d.ts.map +1 -1
  87. package/dist/sn/SpritesMng.d.ts +5 -5
  88. package/dist/sn/SpritesMng.d.ts.map +1 -1
  89. package/dist/sn/SysApp.d.ts +13 -10
  90. package/dist/sn/SysApp.d.ts.map +1 -1
  91. package/dist/sn/SysBase.d.ts +33 -32
  92. package/dist/sn/SysBase.d.ts.map +1 -1
  93. package/dist/sn/SysWeb.d.ts +7 -11
  94. package/dist/sn/SysWeb.d.ts.map +1 -1
  95. package/dist/sn/TxtLayer.d.ts +10 -8
  96. package/dist/sn/TxtLayer.d.ts.map +1 -1
  97. package/dist/sn/TxtStage.d.ts +5 -5
  98. package/dist/sn/TxtStage.d.ts.map +1 -1
  99. package/dist/sn/Variable.d.ts +9 -8
  100. package/dist/sn/Variable.d.ts.map +1 -1
  101. package/dist/test/SysTest.d.ts +2 -2
  102. package/dist/test/ValTest.d.ts +4 -4
  103. package/dist/test/ValTest.d.ts.map +1 -1
  104. package/dist/web.d.ts +4 -4
  105. package/dist/web.d.ts.map +1 -1
  106. package/dist/web.js +3 -3
  107. package/dist/web2.js +6959 -8339
  108. package/dist/web2.js.map +1 -1
  109. package/dist_app/Button.js +162 -0
  110. package/dist_app/Button.js.map +1 -0
  111. package/dist_app/CallStack.js.map +1 -1
  112. package/dist_app/CmnTween.js +201 -0
  113. package/dist_app/CmnTween.js.map +1 -0
  114. package/dist_app/EventMng.js +40 -39
  115. package/dist_app/EventMng.js.map +1 -1
  116. package/dist_app/GrpLayer.js +192 -0
  117. package/dist_app/GrpLayer.js.map +1 -0
  118. package/dist_app/LayerMng.js +475 -2415
  119. package/dist_app/LayerMng.js.map +1 -1
  120. package/dist_app/Main.js +393 -0
  121. package/dist_app/Main.js.map +1 -0
  122. package/dist_app/PropParser.js.map +1 -1
  123. package/dist_app/Reading.js +19 -19
  124. package/dist_app/Reading.js.map +1 -1
  125. package/dist_app/RubySpliter.js +90 -0
  126. package/dist_app/RubySpliter.js.map +1 -0
  127. package/dist_app/ScriptIterator.js +216 -307
  128. package/dist_app/ScriptIterator.js.map +1 -1
  129. package/dist_app/SndBuf.js +746 -949
  130. package/dist_app/SndBuf.js.map +1 -1
  131. package/dist_app/SoundMng.js +1 -1
  132. package/dist_app/SoundMng.js.map +1 -1
  133. package/dist_app/SpritesMng.js +228 -0
  134. package/dist_app/SpritesMng.js.map +1 -0
  135. package/dist_app/TxtLayer.js +1401 -0
  136. package/dist_app/TxtLayer.js.map +1 -0
  137. package/dist_app/Variable.js +157 -164
  138. package/dist_app/Variable.js.map +1 -1
  139. package/dist_app/app.d.ts +4 -4
  140. package/dist_app/app.d.ts.map +1 -1
  141. package/dist_app/app.js +2 -2
  142. package/dist_app/app2.js +3075 -4351
  143. package/dist_app/app2.js.map +1 -1
  144. package/dist_app/appMain.d.ts.map +1 -1
  145. package/dist_app/appMain.js +18 -18
  146. package/dist_app/appMain.js.map +1 -1
  147. package/dist_app/appMain_cmn.d.ts.map +1 -1
  148. package/dist_app/index.d.ts +0 -1
  149. package/dist_app/index.d.ts.map +1 -1
  150. package/dist_app/platform.js +369 -0
  151. package/dist_app/platform.js.map +1 -0
  152. package/dist_app/sn/Button.d.ts +2 -2
  153. package/dist_app/sn/CallStack.d.ts +2 -2
  154. package/dist_app/sn/CmnInterface.d.ts +39 -41
  155. package/dist_app/sn/CmnInterface.d.ts.map +1 -1
  156. package/dist_app/sn/CmnLib.d.ts +11 -7
  157. package/dist_app/sn/CmnLib.d.ts.map +1 -1
  158. package/dist_app/sn/CmnTween.d.ts +9 -9
  159. package/dist_app/sn/Config.d.ts.map +1 -1
  160. package/dist_app/sn/ConfigBase.d.ts +16 -17
  161. package/dist_app/sn/ConfigBase.d.ts.map +1 -1
  162. package/dist_app/sn/DebugMng.d.ts +2 -2
  163. package/dist_app/sn/DebugMng.d.ts.map +1 -1
  164. package/dist_app/sn/DesignCast.d.ts +9 -9
  165. package/dist_app/sn/DesignCast.d.ts.map +1 -1
  166. package/dist_app/sn/EventMng.d.ts +4 -4
  167. package/dist_app/sn/EventMng.d.ts.map +1 -1
  168. package/dist_app/sn/FrameMng.d.ts +5 -5
  169. package/dist_app/sn/FrameMng.d.ts.map +1 -1
  170. package/dist_app/sn/Grammar.d.ts +124 -124
  171. package/dist_app/sn/Grammar.d.ts.map +1 -1
  172. package/dist_app/sn/GrpLayer.d.ts +7 -7
  173. package/dist_app/sn/GrpLayer.d.ts.map +1 -1
  174. package/dist_app/sn/Hyphenation.d.ts +2 -2
  175. package/dist_app/sn/Layer.d.ts +10 -10
  176. package/dist_app/sn/LayerMng.d.ts +7 -8
  177. package/dist_app/sn/LayerMng.d.ts.map +1 -1
  178. package/dist_app/sn/Log.d.ts +3 -3
  179. package/dist_app/sn/Log.d.ts.map +1 -1
  180. package/dist_app/sn/Main.d.ts +6 -5
  181. package/dist_app/sn/Main.d.ts.map +1 -1
  182. package/dist_app/sn/Pages.d.ts +8 -8
  183. package/dist_app/sn/Pages.d.ts.map +1 -1
  184. package/dist_app/sn/PropParser.d.ts +3 -3
  185. package/dist_app/sn/PropParser.d.ts.map +1 -1
  186. package/dist_app/sn/Reading.d.ts +12 -12
  187. package/dist_app/sn/Reading.d.ts.map +1 -1
  188. package/dist_app/sn/RubySpliter.d.ts +4 -4
  189. package/dist_app/sn/RubySpliter.d.ts.map +1 -1
  190. package/dist_app/sn/ScriptIterator.d.ts +5 -6
  191. package/dist_app/sn/ScriptIterator.d.ts.map +1 -1
  192. package/dist_app/sn/SndBuf.d.ts +12 -12
  193. package/dist_app/sn/SndBuf.d.ts.map +1 -1
  194. package/dist_app/sn/SoundMng.d.ts +4 -4
  195. package/dist_app/sn/SoundMng.d.ts.map +1 -1
  196. package/dist_app/sn/SpritesMng.d.ts +5 -5
  197. package/dist_app/sn/SpritesMng.d.ts.map +1 -1
  198. package/dist_app/sn/SysApp.d.ts +13 -10
  199. package/dist_app/sn/SysApp.d.ts.map +1 -1
  200. package/dist_app/sn/SysBase.d.ts +33 -32
  201. package/dist_app/sn/SysBase.d.ts.map +1 -1
  202. package/dist_app/sn/SysWeb.d.ts +7 -11
  203. package/dist_app/sn/SysWeb.d.ts.map +1 -1
  204. package/dist_app/sn/TxtLayer.d.ts +10 -8
  205. package/dist_app/sn/TxtLayer.d.ts.map +1 -1
  206. package/dist_app/sn/TxtStage.d.ts +5 -5
  207. package/dist_app/sn/TxtStage.d.ts.map +1 -1
  208. package/dist_app/sn/Variable.d.ts +9 -8
  209. package/dist_app/sn/Variable.d.ts.map +1 -1
  210. package/dist_app/test/SysTest.d.ts +2 -2
  211. package/dist_app/test/ValTest.d.ts +4 -4
  212. package/dist_app/test/ValTest.d.ts.map +1 -1
  213. package/dist_app/web.d.ts +4 -4
  214. package/dist_app/web.d.ts.map +1 -1
  215. package/package.json +3 -3
  216. package/dist/sn/SysNode.d.ts +0 -15
  217. package/dist/sn/SysNode.d.ts.map +0 -1
  218. package/dist_app/sn/SysNode.d.ts +0 -15
  219. package/dist_app/sn/SysNode.d.ts.map +0 -1
@@ -1,121 +1,37 @@
1
- import { K as B, g as S, M as D, m as w, N as T, q as y, e as d, O as $, L as I, D as g, d as O, c as M } from "./app2.js";
2
- import { c as j, C as x, a as L } from "./CallStack.js";
3
- import { C as N, a as F } from "./SndBuf.js";
4
- import { a as b, R as E } from "./Reading.js";
5
- class k {
6
- static #s = "";
7
- static setting(t) {
8
- t.sesame && (k.#s = t.sesame);
9
- }
10
- static getSesame() {
11
- return k.#s;
12
- }
13
- static destroy() {
14
- k.#s = "ヽ";
15
- }
16
- #i = () => {
17
- };
18
- init(t) {
19
- this.#i = t;
20
- }
21
- /*
22
- ★Unicodeで「漢字」の正規表現 – ものかの http://tama-san.com/kanji-regex/
23
- 2E80..2FDF CJK部首補助+康熙部首
24
- 3005 々(漢字の踊り字)
25
- 3007 〇(漢数字のゼロ)
26
- 303B 〻(漢字の踊り字)
27
- 3400..4DBF CJK統合漢字拡張A
28
- 4E00..9FFF CJK統合漢字
29
- F900..FAFF CJK互換漢字
30
- 20000..2FFFF CJK統合漢字拡張B〜F+CJK互換漢字追加+念のためU+2FFFFまで
31
-
32
- [\x{2E80}-\x{2FDF}々〇〻\x{3400}-\x{4DBF}\x{4E00}-\x{9FFF}\x{F900}-\x{FAFF}\x{20000}-\x{2FFFF}]
33
- [\u2E80-\u2FDF々〇〻\u3400-\u4DBF\u4E00-\u9FFF\uF900-\uFAFF\u20000-\u2FFFF]
34
- [⺀-⿟々〇〻㐀-䶿一-鿿豈-﫿\u20000-\u2FFFF] // 含まれない文字がある
35
- [⺀-⿟々〇〻㐀-鿿豈-﫿\u20000-\u2FFFF] // ヽ--30FD が変に引っかかる。多分\u2000-\u2FFF解釈
36
- \\u{20000}-\\u{2FFFF} // 五桁だとエラー
37
-
38
- 【2022/10/03】ruby正規表現のUnicode プロパティ(とPOSIX文字クラス) - Qiita https://qiita.com/Takayuki_Nakano/items/8d38beaddb84b488d683
39
- > このHiraganaプロパティ、長音記号は含まれていません。
40
- > \p{Han}…簡体字や繁体字、韓国語の漢字…ベトナム語の漢字にもマッチ
41
-
42
- ・Unicode文字一覧表 - instant tools https://tools.m-bsys.com/ex/unicode_table.php
43
- */
44
- static #t;
45
- static setEscape(t) {
46
- k.#t = new RegExp(
47
- (t ? `(?<ce>\\${t}\\S)|` : "") + "|(?<str>[^《\\n]+)《(?<ruby>[^》\\n]+)》|(?:(?<kan>[⺀-⿟々〇〻㐀-鿿豈-﫿]+[ぁ-ヿ]*|[^ |《》\\n])《(?<kan_ruby>[^》\\n]+)》)|(?<txt>[\uD800-\uDBFF][\uDC00-\uDFFF]|[^|《》]+?|.)",
48
- "gs"
49
- );
50
- }
51
- putTxt(t) {
52
- for (const { groups: s } of t.matchAll(k.#t)) {
53
- const { ruby: i, kan_ruby: n, kan: a = "", ce: h, txt: o = "", str: r = "" } = s;
54
- if (i) {
55
- this.putTxtRb(decodeURIComponent(r), i);
56
- continue;
57
- }
58
- if (n) {
59
- this.putTxtRb(a, n);
60
- continue;
61
- }
62
- if (h) {
63
- this.#i(h.slice(1), "");
64
- continue;
65
- }
66
- for (const e of Array.from(o)) this.#i(e, "");
67
- }
68
- }
69
- putTxtRb(t, s) {
70
- if (/^\w+|{"/.test(s)) {
71
- this.#i(t, s);
72
- return;
73
- }
74
- const i = Array.from(t), n = i.length;
75
- if (/^\*.?$/.test(s)) {
76
- const r = "center|" + (s === "*" ? k.#s : s.charAt(1));
77
- for (let e = 0; e < n; ++e) this.#i(i[e], r);
78
- return;
79
- }
80
- if (n === 1 || !s.includes(" ")) {
81
- this.#i(t, decodeURIComponent(s));
82
- return;
83
- }
84
- const a = s.split(" "), h = a.length, o = h > n ? h : n;
85
- for (let r = 0; r < o; ++r) this.#i(
86
- r < n ? i[r] : "",
87
- r < h ? decodeURIComponent(a[r]) : ""
88
- );
89
- }
90
- }
91
- const C = "compChIn";
1
+ import { a as v, S, b as w, R as P, e as d, L as B, D as k, k as C, f as D } from "./app2.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";
4
+ import { R as j } from "./RubySpliter.js";
5
+ import { C as x } from "./CmnTween.js";
6
+ import { a as _, R as N } from "./Reading.js";
7
+ import { a as W } from "./SndBuf.js";
92
8
  class p {
93
9
  //MARK: コンストラクタ
94
- constructor(t, s, i, n, a, h, o) {
95
- this.cfg = t, this.hTag = s, this.main = i, this.val = n, this.prpPrs = a, this.sndMng = h, this.sys = o, 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ブロック開始
10
+ constructor(t, s, i, n, a, r, h) {
11
+ this.cfg = t, this.hTag = s, this.main = i, this.val = n, this.prpPrs = a, this.sndMng = r, this.sys = h, 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ブロック開始
96
12
  s.elsif = // 別条件のifブロック開始
97
- s.endif = () => this.#et(), s.if = (e) => this.#nt(e), s.call = (e) => this.#at(e), s.jump = (e) => this.#ht(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.#W = (e) => {
13
+ s.endif = () => this.#et(), s.if = (e) => this.#nt(e), s.call = (e) => this.#at(e), s.jump = (e) => this.#ht(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) => {
98
14
  e.trim() !== "" && console.log(`🌱 トークン ${this.#i}:${String(this.#e)} (i:${String(this.#t)} cs:${String(this.#n.length)}) %c【${e}】`, "background-color:#350;");
99
- }), 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.#c = new B(t);
100
- const r = t.oCfg.init.escape;
101
- if (this.#c.setEscape(r), k.setEscape(r), S.isDbg) {
102
- this.#k, o.addHook((l, f) => this.#k[l]?.(f)), this.isBreak = (l) => this.#U(l);
15
+ }), 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
+ const l = t.oCfg.init.escape;
17
+ if (this.#l.setEscape(l), j.setEscape(l), v.isDbg) {
18
+ this.#k, h.addHook((c, f) => this.#k[c]?.(f)), this.isBreak = (c) => this.#A(c);
103
19
  const e = () => this.analyzeInit();
104
20
  this.analyzeInit = () => {
105
21
  this.analyzeInit = () => {
106
22
  }, this.sys.send2Dbg("hi", {});
107
- }, this.#k.auth = (l) => {
108
- const f = l.hBreakpoint.hFn2hLineBP;
109
- for (const [c, u] of Object.entries(f)) this.#E(c, u);
23
+ }, this.#k.auth = (c) => {
24
+ const f = c.hBreakpoint.hFn2hLineBP;
25
+ for (const [o, u] of Object.entries(f)) this.#E(o, u);
110
26
  p.#p = {};
111
- for (const c of l.hBreakpoint.aFunc)
112
- p.#p[c.name] = 1;
113
- if (l.stopOnEntry) {
114
- let c;
115
- for (; c = this.nextToken(); ) {
116
- const u = c.charCodeAt(0);
117
- if (u === 91 || u === 38 || u === 42 && c.length === 1) break;
118
- u === 10 && (this.#e += c.length);
27
+ for (const o of c.hBreakpoint.aFunc)
28
+ p.#p[o.name] = 1;
29
+ if (c.stopOnEntry) {
30
+ let o;
31
+ for (; o = this.nextToken(); ) {
32
+ const u = o.charCodeAt(0);
33
+ if (u === 91 || u === 38 || u === 42 && o.length === 1) break;
34
+ u === 10 && (this.#e += o.length);
119
35
  }
120
36
  this.sys.callHook("stopOnEntry", {}), this.analyzeInit = e, this.analyzeInit();
121
37
  } else
@@ -152,8 +68,8 @@ class p {
152
68
  // 直前にジャンプ
153
69
  #n = [];
154
70
  // FILOバッファ(push/pop)
155
- #c;
156
- #r = new D();
71
+ #l;
72
+ #r = new M();
157
73
  noticeWait = () => {
158
74
  };
159
75
  #E(t, s) {
@@ -187,7 +103,7 @@ class p {
187
103
  },
188
104
  // 情報問い合わせ系
189
105
  // eslint-disable-next-line @typescript-eslint/no-unsafe-argument, @typescript-eslint/no-unsafe-member-access
190
- stack: (t) => this.sys.send2Dbg(t.ri, { a: this.#A() }),
106
+ stack: (t) => this.sys.send2Dbg(t.ri, { a: this.#J() }),
191
107
  // eslint-disable-next-line @typescript-eslint/no-unsafe-argument, @typescript-eslint/no-unsafe-member-access
192
108
  eval: (t) => {
193
109
  this.sys.send2Dbg(t.ri, { v: this.prpPrs.parse(t.txt) });
@@ -196,14 +112,14 @@ class p {
196
112
  continue: () => {
197
113
  this.#S() || (this.#t -= this.#b, this.#a = 3, this.main.setLoop(!0), this.main.resume());
198
114
  },
199
- stepover: (t) => this.#C(t),
115
+ stepover: (t) => this.#P(t),
200
116
  stepin: () => {
201
117
  if (this.#S()) return;
202
118
  const t = this.#s.aToken[this.#t - this.#b];
203
119
  this.sys.callHook(`stopOnStep${this.#N.test(t ?? "") ? "In" : ""}`, {}), this.#t -= this.#b, this.#a = this.#a === 1 ? 4 : 5, this.main.setLoop(!0), this.main.resume();
204
120
  },
205
121
  stepout: (t) => {
206
- this.#S() || (this.#n.length > 0 ? this.#P(!0) : this.#C(t));
122
+ this.#S() || (this.#n.length > 0 ? this.#B(!0) : this.#P(t));
207
123
  },
208
124
  pause: () => {
209
125
  this.#a = 4, this.main.setLoop(!1, "一時停止"), this.sys.send2Dbg("stopOnStep", {});
@@ -212,17 +128,17 @@ class p {
212
128
  this.#a = 4, this.main.setLoop(!1, "一時停止"), this.sys.send2Dbg("stopOnEntry", {});
213
129
  }
214
130
  };
215
- #g = (t) => this.cfg.searchPath(t, w.SCRIPT);
131
+ #g = (t) => this.cfg.searchPath(t, S.SCRIPT);
216
132
  #_ = (t) => this.sys.pathBaseCnvSnPath4Dbg + this.#g(t);
217
- #C(t) {
133
+ #P(t) {
218
134
  if (this.#S()) return;
219
135
  const s = this.#s.aToken[this.#t - this.#b];
220
- this.#N.test(s ?? "") ? this.#P(!1) : (this.sys.callHook("stopOnStep", {}), this.#k.stepin(t));
136
+ this.#N.test(s ?? "") ? this.#B(!1) : (this.sys.callHook("stopOnStep", {}), this.#k.stepin(t));
221
137
  }
222
- #P(t) {
223
- this.sys.callHook(`stopOnStep${t ? "Out" : ""}`, {}), this.#B = this.#n.length - (t ? 1 : 0), this.#t -= this.#b, this.#a = t ? 7 : 6, this.main.setLoop(!0), this.main.resume();
138
+ #B(t) {
139
+ this.sys.callHook(`stopOnStep${t ? "Out" : ""}`, {}), this.#C = this.#n.length - (t ? 1 : 0), this.#t -= this.#b, this.#a = t ? 7 : 6, this.main.setLoop(!0), this.main.resume();
224
140
  }
225
- #B = 0;
141
+ #C = 0;
226
142
  get #b() {
227
143
  return this.#a === 2 || this.#a === 4 ? 1 : 0;
228
144
  }
@@ -235,13 +151,13 @@ class p {
235
151
  #a = 0;
236
152
  // https://raw.githubusercontent.com/famibee/SKYNovel-vscode-extension/master/src/doc/BreakStateSMD.pu
237
153
  isBreak = (t) => !1;
238
- #U(t) {
154
+ #A(t) {
239
155
  switch (this.#a) {
240
156
  case 6:
241
157
  this.#T(), this.#a = 7;
242
158
  break;
243
159
  case 7:
244
- if (this.#n.length !== this.#B) break;
160
+ if (this.#n.length !== this.#C) break;
245
161
  return this.#a = 4, this.main.setLoop(!1, "ステップ実行"), this.sys.send2Dbg("stopOnStep", {}), !0;
246
162
  // タグを実行せず、直前停止
247
163
  case 5:
@@ -277,29 +193,29 @@ class p {
277
193
  return !1;
278
194
  }
279
195
  #T() {
280
- const t = p.#w[y(this.#i)]?.[this.#e];
196
+ const t = p.#w[w(this.#i)]?.[this.#e];
281
197
  t?.hitCondition && --t.hitCondition;
282
198
  }
283
- #A() {
284
- const t = this.#a === 3 ? 1 : 0, s = this.#s.aToken[this.#t - 1 + t], i = this.#_(this.#i), n = T(s), a = n ? `[${n}]` : s, h = String(this.val.getVal("mp:const.sn.macro") ?? "{}");
285
- if (this.#t === 0) return [{ fn: i, ln: 1, col: 1, nm: a, ma: h }];
286
- const o = this.#l(this.#s, this.#t), r = [{ fn: i, ln: o.ln, col: o.col_s + 1, nm: a, ma: h }], e = this.#n.length;
287
- if (e === 0) return r;
288
- for (let l = e - 1; l >= 0; --l) {
289
- const f = this.#n[l], c = this.#h[f.fn];
290
- if (!c) continue;
291
- const u = c.aToken[f.idx - 1];
199
+ #J() {
200
+ const t = this.#a === 3 ? 1 : 0, s = this.#s.aToken[this.#t - 1 + t], i = this.#_(this.#i), n = T(s), a = n ? `[${n}]` : s, r = String(this.val.getVal("mp:const.sn.macro") ?? "{}");
201
+ if (this.#t === 0) return [{ fn: i, ln: 1, col: 1, nm: a, ma: r }];
202
+ const h = this.#c(this.#s, this.#t), l = [{ fn: i, ln: h.ln, col: h.col_s + 1, nm: a, ma: r }], e = this.#n.length;
203
+ if (e === 0) return l;
204
+ for (let c = e - 1; c >= 0; --c) {
205
+ const f = this.#n[c], o = this.#h[f.fn];
206
+ if (!o) continue;
207
+ const u = o.aToken[f.idx - 1];
292
208
  if (!u) continue;
293
- const m = this.#l(c, f.idx), v = T(u);
294
- r.push({
209
+ const m = this.#c(o, f.idx), b = T(u);
210
+ l.push({
295
211
  fn: this.#_(f.fn),
296
212
  ln: m.ln,
297
213
  col: m.col_s + 1,
298
- nm: v ? `[${v}]` : u,
214
+ nm: b ? `[${b}]` : u,
299
215
  ma: f.csArg[":hMp"]["const.sn.macro"]
300
216
  });
301
217
  }
302
- return r;
218
+ return l;
303
219
  }
304
220
  // result = true : waitする resume()で再開
305
221
  #D = (t) => {
@@ -313,45 +229,45 @@ class p {
313
229
  if (n.cond) {
314
230
  const e = n.cond.val;
315
231
  if (!e || e.startsWith("&")) throw "属性condは「&」が不要です";
316
- const l = this.prpPrs.parse(e), f = String(l);
317
- if (f === "null" || f === "undefined" || !l) return !1;
232
+ const c = this.prpPrs.parse(e), f = String(c);
233
+ if (f === "null" || f === "undefined" || !c) return !1;
318
234
  }
319
235
  let a = {};
320
- const h = this.#n.at(-1)?.csArg ?? j(), o = this.#n.length;
236
+ const r = this.#n.at(-1)?.csArg ?? O(), h = this.#n.length;
321
237
  if (this.#r.isKomeParam) {
322
- if (o === 0) throw "属性「*」はマクロのみ有効です";
323
- a = { ...h };
238
+ if (h === 0) throw "属性「*」はマクロのみ有効です";
239
+ a = { ...r };
324
240
  }
325
241
  a[":タグ名"] = t;
326
- for (const [e, { val: l, def: f }] of Object.entries(n)) {
327
- let c = l;
328
- if (l.startsWith("%")) {
329
- if (o === 0) throw "属性「%」はマクロ定義内でのみ使用できます(そのマクロの引数を示す簡略文法であるため)";
330
- const u = h[c.slice(1)];
242
+ for (const [e, { val: c, def: f }] of Object.entries(n)) {
243
+ let o = c;
244
+ if (c.startsWith("%")) {
245
+ if (h === 0) throw "属性「%」はマクロ定義内でのみ使用できます(そのマクロの引数を示す簡略文法であるため)";
246
+ const u = r[o.slice(1)];
331
247
  if (u) {
332
248
  a[e] = u;
333
249
  continue;
334
250
  }
335
251
  if (f === void 0 || f === "null") continue;
336
- c = f;
252
+ o = f;
337
253
  }
338
- if (c = this.prpPrs.getValAmpersand(c ?? ""), c !== "undefined") {
339
- a[e] = c;
254
+ if (o = this.prpPrs.getValAmpersand(o ?? ""), o !== "undefined") {
255
+ a[e] = o;
340
256
  continue;
341
257
  }
342
- f !== void 0 && (c = this.prpPrs.getValAmpersand(f), c !== "undefined" && (a[e] = c));
258
+ f !== void 0 && (o = this.prpPrs.getValAmpersand(f), o !== "undefined" && (a[e] = o));
343
259
  }
344
- if (b.needGoTxt && this.#J.has(t)) {
345
- const { promise: e, resolve: l } = Promise.withResolvers();
346
- b.beginProc(C, () => l(0), !1, () => l(0)), b.goTxt(), this.val.saveKidoku(), await e;
260
+ if (_.needGoTxt && this.#U.has(t)) {
261
+ const { promise: e, resolve: c } = Promise.withResolvers();
262
+ _.beginProc(P, () => c(0), !1, () => c(0)), _.goTxt(), this.val.saveKidoku(), await e;
347
263
  }
348
- this.#X.has(t) && (this.#L.hideHint(), await N.closeTrans());
349
- const r = this.#Y[t];
350
- return r && d(a, "canskip", this.#Q[t] ?? !0) && this.#L.isSkipping ? r(n) : i(a);
264
+ this.#X.has(t) && (this.#x.hideHint(), await x.closeTrans());
265
+ const l = this.#Q[t];
266
+ return l && d(a, "canskip", this.#Y[t] ?? !0) && this.#x.isSkipping ? l(n) : i(a);
351
267
  }
352
268
  // 文字出現演出を待つタグ
353
269
  // ここで列挙せずタグ処理で文字表示を始めたい場合、goTxt()すること
354
- #J = /* @__PURE__ */ new Set([
270
+ #U = /* @__PURE__ */ new Set([
355
271
  // 変数操作
356
272
  // 'clearsysvar', // システム変数の全消去
357
273
  // 'clearvar', // ゲーム変数の全消去
@@ -512,7 +428,7 @@ class p {
512
428
  // フィルター追加
513
429
  ]);
514
430
  // キー押しっぱなしスキップで処理せずスルーするタグ
515
- #Y = {
431
+ #Q = {
516
432
  wt: () => !1,
517
433
  // トランス終了待ち
518
434
  wait_tsy: (t) => this.hTag.stop_tsy(t),
@@ -522,7 +438,7 @@ class p {
522
438
  // ウェイトを入れる
523
439
  // 'playbgm', :スルー不可 // BGM の演奏
524
440
  // 'playse', :タグ内部で処理 // 効果音の再生
525
- wb: () => this.hTag.stopfadese({ buf: F }),
441
+ wb: () => this.hTag.stopfadese({ buf: W }),
526
442
  // BGM フェードの終了待ち
527
443
  wf: (t) => this.hTag.stopfadese(t),
528
444
  // 効果音フェードの終了待ち
@@ -537,7 +453,7 @@ class p {
537
453
  // 画面を揺らす
538
454
  };
539
455
  // タグ処理中にクリックなどで即終わらせられるタグ(canskip 属性がある)
540
- #Q = {
456
+ #Y = {
541
457
  // デフォルト値
542
458
  wt: !0,
543
459
  // [wt]トランス終了待ち
@@ -560,10 +476,10 @@ class p {
560
476
  wq: !0
561
477
  // [wq]画面揺らし終了待ち
562
478
  };
563
- #L;
479
+ #x;
564
480
  #m;
565
481
  setOtherObj(t, s) {
566
- this.#L = t, this.#m = s;
482
+ this.#x = t, this.#m = s;
567
483
  }
568
484
  //MARK: インラインテキスト代入
569
485
  #Z(t) {
@@ -579,31 +495,31 @@ class p {
579
495
  #tt() {
580
496
  if (this.#t === 0)
581
497
  return console.group(`🥟 [dump_stack] スクリプト現在地 fn:${this.#i} line:1 col:0`), console.groupEnd(), !1;
582
- const t = this.#l(this.#s, this.#t), s = `スクリプト現在地 fn:${this.#i} line:${String(t.ln)} col:${String(t.col_s + 1)}`;
498
+ const t = this.#c(this.#s, this.#t), s = `スクリプト現在地 fn:${this.#i} line:${String(t.ln)} col:${String(t.col_s + 1)}`;
583
499
  console.group(`🥟 [dump_stack] ${s}`);
584
500
  const i = this.#n.length;
585
501
  if (i > 0) {
586
502
  console.info(s);
587
503
  for (let n = i - 1; n >= 0; --n) {
588
- const a = this.#n[n], h = a.csArg[":hMp"], o = h ? h[":タグ名"] : void 0, r = a.csArg[":タグ名"] ?? "", e = this.#l(this.#h[a.fn], a.idx);
504
+ const a = this.#n[n], r = a.csArg[":hMp"], h = r ? r[":タグ名"] : void 0, l = a.csArg[":タグ名"] ?? "", e = this.#c(this.#h[a.fn], a.idx);
589
505
  console.info(
590
- `${String(i - n)}つ前のコール元 fn:${a.fn} line:${String(e.ln)} col:${String(e.col_s + 1)}${o ? "([" + o + "]マクロ内)" : " "}で [${r} ...]をコール`
506
+ `${String(i - n)}つ前のコール元 fn:${a.fn} line:${String(e.ln)} col:${String(e.col_s + 1)}${h ? "([" + h + "]マクロ内)" : " "}で [${l} ...]をコール`
591
507
  );
592
508
  }
593
509
  }
594
510
  return console.groupEnd(), !1;
595
511
  }
596
- #l(t, s) {
512
+ #c(t, s) {
597
513
  const i = { ln: 1, col_s: 0, col_e: 0 };
598
514
  if (!t) return i;
599
515
  let n = s - 1;
600
516
  const a = i.ln = t.aLNum[n];
601
517
  for (; t.aLNum[n] === a; ) {
602
- const h = t.aToken[n];
603
- if (!h.startsWith(`
518
+ const r = t.aToken[n];
519
+ if (!r.startsWith(`
604
520
  `)) {
605
- const o = h.length;
606
- i.col_e > 0 && (i.col_s += o), i.col_e += o;
521
+ const h = r.length;
522
+ i.col_e > 0 && (i.col_s += h), i.col_e += h;
607
523
  }
608
524
  if (--n < 0) break;
609
525
  }
@@ -619,45 +535,45 @@ class p {
619
535
  }, !1;
620
536
  }
621
537
  if (this.noticeBreak = (n) => {
622
- this.#I !== this.#i && (this.#I = this.#i, this.#y(
538
+ this.#O !== this.#i && (this.#O = this.#i, this.#y(
623
539
  this.#it[this.#i] ??= this.#s.aToken.join("")
624
- )), this.#$(this.#e, n);
540
+ )), this.#L(this.#e, n);
625
541
  }, this.noticeBreak(!0), !i) return !1;
626
- if (this.#$ = globalThis[i], !this.#$) {
542
+ if (this.#L = globalThis[i], !this.#L) {
627
543
  if (d(t, "need_err", !0)) throw `HTML内に関数${i}が見つかりません`;
628
- this.#$ = () => {
544
+ this.#L = () => {
629
545
  };
630
546
  }
631
547
  return !1;
632
548
  }
633
549
  #y = () => {
634
550
  };
635
- #$ = () => {
551
+ #L = () => {
636
552
  };
637
- #I = "";
553
+ #O = "";
638
554
  #it = {};
639
555
  noticeBreak = (t) => {
640
556
  };
641
- #O = 5;
557
+ #I = 5;
642
558
  dumpErrForeLine() {
643
559
  if (this.#t === 0) {
644
560
  console.group(`🥟 Error line (from 0 rows before) fn:${this.#i}`), console.groupEnd();
645
561
  return;
646
562
  }
647
563
  let t = "";
648
- for (let h = this.#t - 1; h >= 0 && (t = String(this.#s.aToken[h]) + t, !((t.match(/\n/g) ?? []).length >= this.#O)); --h)
564
+ for (let r = this.#t - 1; r >= 0 && (t = String(this.#s.aToken[r]) + t, !((t.match(/\n/g) ?? []).length >= this.#I)); --r)
649
565
  ;
650
566
  const s = t.split(`
651
- `).slice(-this.#O), i = s.length;
567
+ `).slice(-this.#I), i = s.length;
652
568
  console.group(`🥟 Error line (from ${String(i)} rows before) fn:${this.#i}`);
653
- const n = String(this.#e).length, a = this.#l(this.#s, this.#t);
654
- for (let h = 0; h < i; ++h) {
655
- const o = this.#e - i + h + 1, r = `${String(o).padStart(n, " ")}: %c`, e = s[h], l = e.length > 75 ? e.slice(0, 75) + "…" : e;
656
- h === i - 1 ? console.info(
657
- r + l.slice(0, a.col_s) + "%c" + l.slice(a.col_s),
569
+ const n = String(this.#e).length, a = this.#c(this.#s, this.#t);
570
+ for (let r = 0; r < i; ++r) {
571
+ const h = this.#e - i + r + 1, l = `${String(h).padStart(n, " ")}: %c`, e = s[r], c = e.length > 75 ? e.slice(0, 75) + "…" : e;
572
+ r === i - 1 ? console.info(
573
+ l + c.slice(0, a.col_s) + "%c" + c.slice(a.col_s),
658
574
  "color: black; background-color: skyblue;",
659
575
  "color: black; background-color: pink;"
660
- ) : console.info(r + l, "color: black; background-color: skyblue;");
576
+ ) : console.info(l + c, "color: black; background-color: skyblue;");
661
577
  }
662
578
  console.groupEnd();
663
579
  }
@@ -676,21 +592,21 @@ class p {
676
592
  if (!s) throw "expは必須です";
677
593
  if (s.startsWith("&")) throw "属性expは「&」が不要です";
678
594
  let i = 0, n = this.prpPrs.parse(s) ? this.#t : -1;
679
- const a = this.#s.aLNum[this.#t], h = this.#e - ((a ?? 0) || 0), o = this.#s.len;
680
- for (; this.#t < o; ++this.#t) {
681
- const r = this.#s.aLNum[this.#t];
682
- this.#s.aLNum[this.#t] = ((r ?? 0) || 0) + h;
595
+ const a = this.#s.aLNum[this.#t], r = this.#e - ((a ?? 0) || 0), h = this.#s.len;
596
+ for (; this.#t < h; ++this.#t) {
597
+ const l = this.#s.aLNum[this.#t];
598
+ this.#s.aLNum[this.#t] = ((l ?? 0) || 0) + r;
683
599
  const e = this.#s.aToken[this.#t];
684
600
  if (!e) continue;
685
- const l = e.charCodeAt(0);
686
- if (l === 10) {
601
+ const c = e.charCodeAt(0);
602
+ if (c === 10) {
687
603
  this.#e += e.length;
688
604
  continue;
689
605
  }
690
- if (l !== 91) continue;
691
- const [f, c] = $(e);
606
+ if (c !== 91) continue;
607
+ const [f, o] = $(e);
692
608
  if (!(f in this.hTag)) throw `未定義のタグ[${f}]です`;
693
- switch (this.#r.parse(c), f) {
609
+ switch (this.#r.parse(o), f) {
694
610
  case "if":
695
611
  ++i;
696
612
  break;
@@ -712,7 +628,7 @@ class p {
712
628
  --i;
713
629
  break;
714
630
  }
715
- return n === -1 ? (++this.#t, this.#s.aLNum[this.#t] += h) : (this.#o.unshift(this.#t + 1), this.#t = n, this.#e = this.#s.aLNum[this.#t]), !1;
631
+ 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;
716
632
  }
717
633
  }
718
634
  throw "[endif]がないままスクリプト終端です";
@@ -721,7 +637,7 @@ class p {
721
637
  #at(t) {
722
638
  d(t, "count", !1) || this.#V();
723
639
  const { fn: s } = t;
724
- return s && this.#g(s), this.#M({ ...t }, E.popLocalEvts()), d(t, "clear_local_event", !1) && this.hTag.clear_event({}), this.#f(s, t.label);
640
+ return s && this.#g(s), this.#M({ ...t }, N.popLocalEvts()), d(t, "clear_local_event", !1) && this.hTag.clear_event({}), this.#f(s, t.label);
725
641
  }
726
642
  #M(t, s) {
727
643
  const i = {
@@ -730,7 +646,7 @@ class p {
730
646
  ":hMp": this.val.cloneMp(),
731
647
  ":lenIfStk": this.#o.length
732
648
  };
733
- this.#s.aLNum[this.#t] = this.#e, this.#F || (i[":resvToken"] = "", this.#x()), this.#n.push(new x(this.#i, this.#t, i)), this.#o.unshift(-1);
649
+ 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);
734
650
  }
735
651
  //MARK: シナリオジャンプ
736
652
  #ht(t) {
@@ -740,7 +656,7 @@ class p {
740
656
  #ot(t) {
741
657
  if (d(t, "clear", !1)) this.#n = [];
742
658
  else if (!this.#n.pop()) throw "スタックが空です";
743
- return this.#x(), this.#o = [-1], this.val.setMp(L()), !1;
659
+ return this.#$(), this.#o = [-1], this.val.setMp(L()), !1;
744
660
  }
745
661
  //MARK: サブルーチンから戻る
746
662
  #j(t) {
@@ -751,17 +667,17 @@ class p {
751
667
  const n = i[":hMp"];
752
668
  n && this.val.setMp(n);
753
669
  const a = i[":resvToken"];
754
- a ? this.nextToken = () => (this.#x(), a) : this.#x(), i[":hEvt1Time"] && E.pushLocalEvts(i[":hEvt1Time"]);
755
- const { fn: h, label: o } = t;
756
- return h || o ? this.#f(h, o) : s.fn in this.#h ? (this.#z(s), !1) : this.#f(s.fn, "", s.idx);
670
+ a ? this.nextToken = () => (this.#$(), a) : this.#$(), i[":hEvt1Time"] && N.pushLocalEvts(i[":hEvt1Time"]);
671
+ const { fn: r, label: h } = t;
672
+ return r || h ? this.#f(r, h) : s.fn in this.#h ? (this.#z(s), !1) : this.#f(s.fn, "", s.idx);
757
673
  }
758
- #F = "";
759
- #x() {
760
- this.#F = "", this.nextToken = () => this.#R();
674
+ #W = "";
675
+ #$() {
676
+ this.#W = "", this.nextToken = () => this.#R();
761
677
  }
762
678
  #v = "";
763
679
  #f(t = "", s = "", i = 0) {
764
- if (S.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)
680
+ 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)
765
681
  return this.analyzeInit(), !1;
766
682
  if (t.includes("@")) throw "[jump系] fn には文字「@」は禁止です";
767
683
  const n = this.#g(t);
@@ -771,36 +687,36 @@ class p {
771
687
  const a = this.#h[t];
772
688
  if (a)
773
689
  return this.#s = a, this.analyzeInit(), !1;
774
- const h = `jumpWork fn:${t}`;
775
- b.beginProc(h);
776
- let o = "";
777
- const r = new I();
690
+ const r = `jumpWork fn:${t}`;
691
+ _.beginProc(r);
692
+ let h = "";
693
+ const l = new B();
778
694
  try {
779
- o = this.#g(t + "@"), r.add({ name: t + ":base", url: n }), r.add({ name: t, url: o });
695
+ h = this.#g(t + "@"), l.add({ name: t + ":base", url: n }), l.add({ name: t, url: h });
780
696
  } catch {
781
- r.add({ name: t, url: n });
697
+ l.add({ name: t, url: n });
782
698
  }
783
- return r.use((e, l) => {
699
+ return l.use((e, c) => {
784
700
  this.sys.dec(e.extension, e.data).then((f) => {
785
- e.data = f, l();
701
+ e.data = f, c();
786
702
  }).catch((f) => {
787
- this.main.errScript(`[jump系]snロード失敗です fn:${e.name} ${String(f)}`, !1), l();
703
+ this.main.errScript(`[jump系]snロード失敗です fn:${e.name} ${String(f)}`, !1), c();
788
704
  });
789
- }).load((e, l) => {
790
- if (b.endProc(h), o) {
791
- const f = l[t + ":base"].data, c = l[t].data, u = f.split(`
792
- `), m = c.split(`
793
- `), v = u.length, P = m.length;
794
- for (let _ = 0; _ < P && _ < v; ++_) m[_] ||= u[_] ?? "";
795
- l[t].data = m.join(`
796
- `), delete l[t + ":base"];
705
+ }).load((e, c) => {
706
+ if (_.endProc(r), h) {
707
+ const f = c[t + ":base"].data, o = c[t].data, u = f.split(`
708
+ `), m = o.split(`
709
+ `), b = u.length, E = m.length;
710
+ for (let g = 0; g < E && g < b; ++g) m[g] ||= u[g] ?? "";
711
+ c[t].data = m.join(`
712
+ `), delete c[t + ":base"];
797
713
  }
798
- this.nextToken = this.#R, this.#e = 1, this.#ft(l[t].data), this.hTag.record_place({}), this.analyzeInit();
714
+ this.nextToken = this.#R, this.#e = 1, this.#ft(c[t].data), this.hTag.record_place({}), this.analyzeInit();
799
715
  }), !0;
800
716
  }
801
717
  analyzeInit() {
802
- S.debugLog && console.log(`📜 %c9:analyzeInit%c fn:${this.#i} lbl:${this.#v} idx:${String(this.#t)}`, "color:#3B0;", "");
803
- const t = this.#lt(this.#s, !!this.val.getVal("mp:const.sn.macro.name"), this.#e, this.#v, this.#t);
718
+ v.debugLog && console.log(`📜 %c9:analyzeInit%c fn:${this.#i} lbl:${this.#v} idx:${String(this.#t)}`, "color:#3B0;", "");
719
+ const t = this.#ct(this.#s, !!this.val.getVal("mp:const.sn.macro.name"), this.#e, this.#v, this.#t);
804
720
  this.#t = t.idx, this.#e = t.ln;
805
721
  }
806
722
  // シナリオ解析処理ループ・冒頭処理
@@ -810,80 +726,80 @@ class p {
810
726
  if (this.#H()) return "";
811
727
  this.#dt(), this.#s.aLNum[this.#t] ||= this.#e;
812
728
  const t = this.#s.aToken[this.#t];
813
- return this.#W(t), ++this.#t, t;
729
+ return this.#F(t), ++this.#t, t;
814
730
  }
815
- #W = (t) => {
731
+ #F = (t) => {
816
732
  };
817
733
  #H() {
818
734
  return this.#t < this.#s.len ? !1 : (this.main.errScript("スクリプト終端です errOverScr"), !0);
819
735
  }
820
736
  #rt = /(\*{2,})([^|]*)/;
821
- #ct = /^\[macro\s/;
737
+ #lt = /^\[macro\s/;
822
738
  #K = /^\[endmacro[\s\]]/;
823
- #lt(t, s, i, n, a) {
824
- const h = t.aToken.length;
825
- let o = i, r = n;
826
- if (!r) {
827
- if (this.#H()) return { idx: a, ln: o };
739
+ #ct(t, s, i, n, a) {
740
+ const r = t.aToken.length;
741
+ let h = i, l = n;
742
+ if (!l) {
743
+ if (this.#H()) return { idx: a, ln: h };
828
744
  if (t.aLNum[a])
829
- o = t.aLNum[a];
745
+ h = t.aLNum[a];
830
746
  else {
831
- o = 1;
832
- for (let c = 0; c < a; ++c) {
833
- t.aLNum[c] ||= o;
834
- const u = t.aToken[c];
747
+ h = 1;
748
+ for (let o = 0; o < a; ++o) {
749
+ t.aLNum[o] ||= h;
750
+ const u = t.aToken[o];
835
751
  u.startsWith(`
836
- `) ? o += u.length : o += (u.match(/\n/g) ?? []).length;
752
+ `) ? h += u.length : h += (u.match(/\n/g) ?? []).length;
837
753
  }
838
- t.aLNum[a] = o;
754
+ t.aLNum[a] = h;
839
755
  }
840
- return { idx: a, ln: o };
756
+ return { idx: a, ln: h };
841
757
  }
842
758
  t.aLNum[0] = 1;
843
- const e = r.match(this.#rt);
759
+ const e = l.match(this.#rt);
844
760
  if (e) {
845
- r = e[1];
846
- let c = a;
761
+ l = e[1];
762
+ let o = a;
847
763
  switch (e[2]) {
848
764
  case "before":
849
- for (; t.aToken[--c] !== r; )
850
- c === 0 && g.myTrace(`[jump系 無名ラベルbefore]
851
- ${String(o)} 行目以前で ${s ? "マクロ内に" : ""} ラベル【 ${r} 】がありません`, "ET"), s && t.aToken[c].search(this.#ct) > -1 && g.myTrace("[jump系 無名ラベルbefore] マクロ内にラベル【" + r + "】がありません", "ET");
852
- return { idx: c + 1, ln: t.aLNum[c] };
765
+ for (; t.aToken[--o] !== l; )
766
+ o === 0 && k.myTrace(`[jump系 無名ラベルbefore]
767
+ ${String(h)} 行目以前で ${s ? "マクロ内に" : ""} ラベル【 ${l} 】がありません`, "ET"), s && t.aToken[o].search(this.#lt) > -1 && k.myTrace("[jump系 無名ラベルbefore] マクロ内にラベル【" + l + "】がありません", "ET");
768
+ return { idx: o + 1, ln: t.aLNum[o] };
853
769
  // break;
854
770
  case "after":
855
- for (; t.aToken[++c] !== r; )
856
- c === h && g.myTrace(`[jump系 無名ラベルafter] ${String(o)} 行目以後でマクロ内にラベル【${r}】がありません`, "ET"), t.aToken[c].search(this.#K) > -1 && g.myTrace(`[jump系 無名ラベルafter] ${String(o)} 行目以後でマクロ内にラベル【 ${r} 】がありません`, "ET");
857
- return { idx: c + 1, ln: t.aLNum[c] };
771
+ for (; t.aToken[++o] !== l; )
772
+ o === r && k.myTrace(`[jump系 無名ラベルafter] ${String(h)} 行目以後でマクロ内にラベル【${l}】がありません`, "ET"), t.aToken[o].search(this.#K) > -1 && k.myTrace(`[jump系 無名ラベルafter] ${String(h)} 行目以後でマクロ内にラベル【 ${l} 】がありません`, "ET");
773
+ return { idx: o + 1, ln: t.aLNum[o] };
858
774
  // break;
859
775
  default:
860
- g.myTrace("[jump系] 無名ラベル指定【label=" + r + "】が間違っています", "ET");
776
+ k.myTrace("[jump系] 無名ラベル指定【label=" + l + "】が間違っています", "ET");
861
777
  }
862
778
  }
863
- o = 1;
864
- const l = new RegExp(
865
- "^" + r.replaceAll("*", "\\*") + "(?=\\s|;|\\[|\\||$)"
779
+ h = 1;
780
+ const c = new RegExp(
781
+ "^" + l.replaceAll("*", "\\*") + "(?=\\s|;|\\[|\\||$)"
866
782
  );
867
783
  let f = !1;
868
- for (let c = 0; c < h; ++c) {
869
- t.aLNum[c] ||= o;
870
- const u = t.aToken[c];
784
+ for (let o = 0; o < r; ++o) {
785
+ t.aLNum[o] ||= h;
786
+ const u = t.aToken[o];
871
787
  if (f) {
872
- this.#c.testTagEndLetml(u) ? f = !1 : o += (u.match(/\n/g) ?? []).length;
788
+ this.#l.testTagEndLetml(u) ? f = !1 : h += (u.match(/\n/g) ?? []).length;
873
789
  continue;
874
790
  }
875
791
  const m = u.charCodeAt(0);
876
792
  if (m === 10) {
877
- o += u.length;
793
+ h += u.length;
878
794
  continue;
879
795
  }
880
796
  if (m === 42) {
881
- if (u.search(l) > -1) return { idx: c + 1, ln: o };
797
+ if (u.search(c) > -1) return { idx: o + 1, ln: h };
882
798
  continue;
883
799
  }
884
- m === 91 && (o += (u.match(/\n/g) ?? []).length, this.#c.testTagLetml(u) && (f = !0));
800
+ m === 91 && (h += (u.match(/\n/g) ?? []).length, this.#l.testTagLetml(u) && (f = !0));
885
801
  }
886
- throw f ? "[let_ml]の終端・[endlet_ml]がありません" : (g.myTrace(`[jump系] ラベル【${r}】がありません`, "ET"), "Dummy");
802
+ throw f ? "[let_ml]の終端・[endlet_ml]がありません" : (k.myTrace(`[jump系] ラベル【${l}】がありません`, "ET"), "Dummy");
887
803
  }
888
804
  #h = /* @__PURE__ */ Object.create(null);
889
805
  //{} シナリオキャッシュ
@@ -891,7 +807,7 @@ class p {
891
807
  let s = "";
892
808
  try {
893
809
  s = "ScriptIterator.resolveScript";
894
- const i = this.#c.resolveScript(t);
810
+ const i = this.#l.resolveScript(t);
895
811
  s = "ScriptIterator.replaceScript_Wildcard", this.#mt(i), this.#h[this.#i] = this.#s = i;
896
812
  } catch (i) {
897
813
  i instanceof Error ? s += `例外 mes=${i.message}(${i.name})` : s = String(i), this.main.errScript(s, !1);
@@ -911,16 +827,16 @@ class p {
911
827
  if (!this.#ut.test(i)) continue;
912
828
  const [n, a] = $(i);
913
829
  this.#r.parse(a);
914
- const h = this.#r.hPrm.fn;
915
- if (!h) continue;
916
- const { val: o } = h;
917
- if (!o.endsWith("*")) continue;
830
+ const r = this.#r.hPrm.fn;
831
+ if (!r) continue;
832
+ const { val: h } = r;
833
+ if (!h.endsWith("*")) continue;
918
834
  t.aToken.splice(s, 1, " ", "; " + i), t.aLNum.splice(s, 1, NaN, NaN);
919
- const r = n === "loadplugin" ? w.CSS : w.SN, e = this.cfg.matchPath("^" + o.slice(0, -1) + ".*", r);
920
- for (const l of e) {
835
+ const l = n === "loadplugin" ? S.CSS : S.SN, e = this.cfg.matchPath("^" + h.slice(0, -1) + ".*", l);
836
+ for (const c of e) {
921
837
  const f = i.replace(
922
838
  this.#pt,
923
- "fn=" + decodeURIComponent(y(l[r]))
839
+ "fn=" + decodeURIComponent(w(c[l]))
924
840
  );
925
841
  t.aToken.splice(s, 0, f), t.aLNum.splice(s, 0, NaN);
926
842
  }
@@ -947,8 +863,8 @@ class p {
947
863
  if (this.#n.length > 0) {
948
864
  const a = this.#n[0];
949
865
  t = a.fn, s = a.idx;
950
- const h = this.#h[t];
951
- h && (i = h.len);
866
+ const r = this.#h[t];
867
+ r && (i = r.len);
952
868
  }
953
869
  return s === i ? !1 : this.val.getAreaKidoku(t)?.search(s) ?? !1;
954
870
  }
@@ -957,11 +873,11 @@ class p {
957
873
  }
958
874
  //MARK: 括弧マクロの定義
959
875
  #kt(t) {
960
- return this.#c.bracket2macro(t, this.hTag, this.#s, this.#t), !1;
876
+ return this.#l.bracket2macro(t, this.hTag, this.#s, this.#t), !1;
961
877
  }
962
878
  //MARK: 一文字マクロの定義
963
879
  #gt(t) {
964
- return this.#c.char2macro(t, this.hTag, this.#s, this.#t), !1;
880
+ return this.#l.char2macro(t, this.hTag, this.#s, this.#t), !1;
965
881
  }
966
882
  //MARK: マクロ定義の開始
967
883
  // eslint-disable-next-line no-irregular-whitespace
@@ -971,7 +887,7 @@ class p {
971
887
  if (!s) throw "nameは必須です";
972
888
  if (s in this.hTag) throw `[${s}]はタグかすでに定義済みのマクロです`;
973
889
  if (this.#_t.test(s)) throw `[${s}]はマクロ名として異常です`;
974
- const i = this.#e, n = new x(this.#i, this.#t);
890
+ const i = this.#e, n = new y(this.#i, this.#t);
975
891
  for (this.#G += "|" + s, this.#N = new RegExp(`\\[(${this.#G})\\b`), this.hTag[s] = (a) => (a.design_unit = t.design_unit, this.#M(a), this.val.setMp({
976
892
  ...a,
977
893
  "const.sn.macro": JSON.stringify({ name: t.name }),
@@ -982,8 +898,8 @@ class p {
982
898
  const a = this.#s.aToken[this.#t];
983
899
  if (a.search(this.#K) > -1)
984
900
  return ++this.#t, !1;
985
- const h = a.charCodeAt(0);
986
- h === 10 ? this.#e += a.length : h === 91 && (this.#e += (a.match(/\n/g) ?? []).length);
901
+ const r = a.charCodeAt(0);
902
+ r === 10 ? this.#e += a.length : r === 91 && (this.#e += (a.match(/\n/g) ?? []).length);
987
903
  }
988
904
  throw `マクロ[${s}]定義の終端・[endmacro]がありません`;
989
905
  }
@@ -993,7 +909,7 @@ class p {
993
909
  //MARK: しおりの読込
994
910
  #vt(t) {
995
911
  if ("fn" in t != "label" in t) throw "fnとlabelはセットで指定して下さい";
996
- const s = O(t, "place", 0), i = this.val.getMark(s);
912
+ const s = C(t, "place", 0), i = this.val.getMark(s);
997
913
  if (!i) throw `place=${String(s)} は存在しません`;
998
914
  return this.loadFromMark(
999
915
  t,
@@ -1018,27 +934,27 @@ class p {
1018
934
  text: String(this.val.getVal("save:const.sn.autowc.text")),
1019
935
  time: Number(this.val.getVal("save:const.sn.autowc.time"))
1020
936
  };
1021
- this.hTag.autowc(a), this.#o = [...this.#u.aIfStk], this.#n = [], N.stopAllTw();
1022
- const h = Promise.allSettled([...n, ...this.#m.playback(this.#u.hPages)]).then(() => this.#m.cover(!1)), { index: o, fn: r } = t;
1023
- if (o)
1024
- return S.debugLog && console.log(`📜 %cloadFromMark index:${String(o)} move!%c fn:${r ?? ""}`, "color:#3B0;", ""), h.then(() => {
1025
- this.#f(r, "", o) || this.main.resume();
1026
- }).catch((c) => console.error("loadFromMark e:%o", c)), !0;
937
+ this.hTag.autowc(a), this.#o = [...this.#u.aIfStk], this.#n = [], x.stopAllTw();
938
+ const r = Promise.allSettled([...n, ...this.#m.playback(this.#u.hPages)]).then(() => this.#m.cover(!1)), { index: h, fn: l } = t;
939
+ if (h)
940
+ return v.debugLog && console.log(`📜 %cloadFromMark index:${String(h)} move!%c fn:${l ?? ""}`, "color:#3B0;", ""), r.then(() => {
941
+ this.#f(l, "", h) || this.main.resume();
942
+ }).catch((o) => console.error("loadFromMark e:%o", o)), !0;
1027
943
  this.#m.cover(!0);
1028
- const e = String(this.val.getVal("save:const.sn.scriptFn")), l = Number(this.val.getVal("save:const.sn.scriptIdx"));
944
+ const e = String(this.val.getVal("save:const.sn.scriptFn")), c = Number(this.val.getVal("save:const.sn.scriptIdx"));
1029
945
  delete this.#h[e];
1030
946
  const { label: f } = t;
1031
- return h.then(f ? () => {
1032
- this.#i = e, this.#t = l, this.hTag.call({ fn: r, label: f }) || this.main.resume();
947
+ return r.then(f ? () => {
948
+ this.#i = e, this.#t = c, this.hTag.call({ fn: l, label: f }) || this.main.resume();
1033
949
  } : () => {
1034
- this.#f(e, "", l) || this.main.resume();
1035
- }).catch((c) => console.error("loadFromMark e:%o", c)), !0;
950
+ this.#f(e, "", c) || this.main.resume();
951
+ }).catch((o) => console.error("loadFromMark e:%o", o)), !0;
1036
952
  }
1037
953
  //MARK: スクリプト再読込
1038
954
  #St(t) {
1039
955
  const s = this.val.getMark(0);
1040
956
  if (!s) return !1;
1041
- delete this.#h[y(s.hSave["const.sn.scriptFn"])];
957
+ delete this.#h[w(s.hSave["const.sn.scriptFn"])];
1042
958
  const i = {};
1043
959
  for (const n in this.#h)
1044
960
  try {
@@ -1055,7 +971,7 @@ class p {
1055
971
  }
1056
972
  //MARK: セーブポイント指定
1057
973
  #u = {
1058
- hSave: M(),
974
+ hSave: D(),
1059
975
  hPages: {},
1060
976
  aIfStk: [-1]
1061
977
  };
@@ -1083,7 +999,7 @@ class p {
1083
999
  }
1084
1000
  //MARK: スクリプト停止位置(マクロなどなら最上位の呼び元)
1085
1001
  nowScrFnLn() {
1086
- const { fn: t, idx: s } = this.nowScrIdx(), i = this.#h[t], n = this.#l(i, s);
1002
+ const { fn: t, idx: s } = this.nowScrIdx(), i = this.#h[t], n = this.#c(i, s);
1087
1003
  return { fn: t, ...n };
1088
1004
  }
1089
1005
  //MARK: しおりの保存
@@ -1098,28 +1014,21 @@ class p {
1098
1014
  let s = "", i = 0;
1099
1015
  const n = this.#n.length;
1100
1016
  if (t.design_unit && n > 0) {
1101
- const r = this.#n[0];
1102
- s = r.fn, i = r.idx;
1017
+ const l = this.#n[0];
1018
+ s = l.fn, i = l.idx;
1103
1019
  } else
1104
1020
  s = this.#i, i = this.#t;
1105
1021
  t[":path"] = this.#_(s);
1106
- const a = this.#h[s], h = this.#l(a, i);
1107
- t[":ln"] = h.ln, t[":col_s"] = h.col_s, t[":col_e"] = h.col_e;
1108
- const o = i - 1;
1109
- t[":idx_tkn"] = o, t[":token"] = a.aToken[o], this.sys.send2Dbg("_recodeDesign", t);
1022
+ const a = this.#h[s], r = this.#c(a, i);
1023
+ t[":ln"] = r.ln, t[":col_s"] = r.col_s, t[":col_e"] = r.col_e;
1024
+ const h = i - 1;
1025
+ t[":idx_tkn"] = h, t[":token"] = a.aToken[h], this.sys.send2Dbg("_recodeDesign", t);
1110
1026
  }
1111
1027
  replace(t, s) {
1112
1028
  this.#s.aToken[t] = s;
1113
1029
  }
1114
1030
  }
1115
- const z = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1116
- __proto__: null,
1117
- RPN_COMP_CHIN: C,
1118
- ScriptIterator: p
1119
- }, Symbol.toStringTag, { value: "Module" }));
1120
1031
  export {
1121
- C as R,
1122
- z as S,
1123
- k as a
1032
+ p as ScriptIterator
1124
1033
  };
1125
1034
  //# sourceMappingURL=ScriptIterator.js.map