@famibee/skynovel 1.48.13 → 1.63.11

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 (289) hide show
  1. package/README.md +2 -1
  2. package/dist/CallStack.js +25 -0
  3. package/dist/CallStack.js.map +1 -0
  4. package/dist/EventMng.js +1588 -0
  5. package/dist/EventMng.js.map +1 -0
  6. package/dist/LayerMng.js +2924 -0
  7. package/dist/LayerMng.js.map +1 -0
  8. package/dist/PropParser.js +833 -0
  9. package/dist/PropParser.js.map +1 -0
  10. package/dist/Reading.js +784 -0
  11. package/dist/Reading.js.map +1 -0
  12. package/dist/ScriptIterator.js +1125 -0
  13. package/dist/ScriptIterator.js.map +1 -0
  14. package/dist/SndBuf.js +1519 -0
  15. package/dist/SndBuf.js.map +1 -0
  16. package/dist/SoundMng.js +136 -0
  17. package/dist/SoundMng.js.map +1 -0
  18. package/dist/Variable.js +479 -0
  19. package/dist/Variable.js.map +1 -0
  20. package/dist/app.d.ts +5 -1
  21. package/dist/app.d.ts.map +1 -1
  22. package/dist/appMain.d.ts +6 -6
  23. package/dist/appMain.d.ts.map +1 -1
  24. package/dist/appMain_cmn.d.ts +30 -0
  25. package/dist/appMain_cmn.d.ts.map +1 -0
  26. package/dist/build.d.ts +2 -0
  27. package/dist/build.d.ts.map +1 -0
  28. package/dist/gamepad.js +511 -0
  29. package/dist/gamepad.js.map +1 -0
  30. package/dist/index.d.ts +32 -38
  31. package/dist/index.d.ts.map +1 -1
  32. package/dist/preload.d.ts +34 -31
  33. package/dist/preload.d.ts.map +1 -1
  34. package/dist/sn/AnalyzeTagArg.d.ts +10 -6
  35. package/dist/sn/AnalyzeTagArg.d.ts.map +1 -1
  36. package/dist/sn/Areas.d.ts +7 -5
  37. package/dist/sn/Areas.d.ts.map +1 -1
  38. package/dist/sn/Button.d.ts +2 -2
  39. package/dist/sn/Button.d.ts.map +1 -1
  40. package/dist/sn/CallStack.d.ts +12 -5
  41. package/dist/sn/CallStack.d.ts.map +1 -1
  42. package/dist/sn/CmnInterface.d.ts +178 -117
  43. package/dist/sn/CmnInterface.d.ts.map +1 -1
  44. package/dist/sn/CmnLib.d.ts +20 -19
  45. package/dist/sn/CmnLib.d.ts.map +1 -1
  46. package/dist/sn/CmnTween.d.ts +6 -8
  47. package/dist/sn/CmnTween.d.ts.map +1 -1
  48. package/dist/sn/Config.d.ts +6 -4
  49. package/dist/sn/Config.d.ts.map +1 -1
  50. package/dist/sn/ConfigBase.d.ts +39 -24
  51. package/dist/sn/ConfigBase.d.ts.map +1 -1
  52. package/dist/sn/DebugMng.d.ts +3 -2
  53. package/dist/sn/DebugMng.d.ts.map +1 -1
  54. package/dist/sn/DesignCast.d.ts +5 -6
  55. package/dist/sn/DesignCast.d.ts.map +1 -1
  56. package/dist/sn/EventListenerCtn.d.ts +3 -3
  57. package/dist/sn/EventListenerCtn.d.ts.map +1 -1
  58. package/dist/sn/EventMng.d.ts +5 -11
  59. package/dist/sn/EventMng.d.ts.map +1 -1
  60. package/dist/sn/FocusMng.d.ts.map +1 -1
  61. package/dist/sn/FrameMng.d.ts +3 -4
  62. package/dist/sn/FrameMng.d.ts.map +1 -1
  63. package/dist/sn/Grammar.d.ts +133 -16
  64. package/dist/sn/Grammar.d.ts.map +1 -1
  65. package/dist/sn/GrpLayer.d.ts +8 -4
  66. package/dist/sn/GrpLayer.d.ts.map +1 -1
  67. package/dist/sn/Hyphenation.d.ts +42 -0
  68. package/dist/sn/Hyphenation.d.ts.map +1 -0
  69. package/dist/sn/Layer.d.ts +24 -4
  70. package/dist/sn/Layer.d.ts.map +1 -1
  71. package/dist/sn/LayerMng.d.ts +17 -24
  72. package/dist/sn/LayerMng.d.ts.map +1 -1
  73. package/dist/sn/Log.d.ts +18 -0
  74. package/dist/sn/Log.d.ts.map +1 -0
  75. package/dist/sn/Main.d.ts +4 -6
  76. package/dist/sn/Main.d.ts.map +1 -1
  77. package/dist/sn/Pages.d.ts +1 -1
  78. package/dist/sn/Pages.d.ts.map +1 -1
  79. package/dist/sn/PropParser.d.ts +2 -2
  80. package/dist/sn/PropParser.d.ts.map +1 -1
  81. package/dist/sn/Reading.d.ts +86 -0
  82. package/dist/sn/Reading.d.ts.map +1 -0
  83. package/dist/sn/RubySpliter.d.ts +1 -3
  84. package/dist/sn/RubySpliter.d.ts.map +1 -1
  85. package/dist/sn/ScriptIterator.d.ts +20 -10
  86. package/dist/sn/ScriptIterator.d.ts.map +1 -1
  87. package/dist/sn/SndBuf.d.ts +15 -5
  88. package/dist/sn/SndBuf.d.ts.map +1 -1
  89. package/dist/sn/SoundMng.d.ts +3 -2
  90. package/dist/sn/SoundMng.d.ts.map +1 -1
  91. package/dist/sn/SpritesMng.d.ts +4 -4
  92. package/dist/sn/SpritesMng.d.ts.map +1 -1
  93. package/dist/sn/SysApp.d.ts +12 -16
  94. package/dist/sn/SysApp.d.ts.map +1 -1
  95. package/dist/sn/SysBase.d.ts +24 -27
  96. package/dist/sn/SysBase.d.ts.map +1 -1
  97. package/dist/sn/SysNode.d.ts +9 -9
  98. package/dist/sn/SysNode.d.ts.map +1 -1
  99. package/dist/sn/SysWeb.d.ts +10 -14
  100. package/dist/sn/SysWeb.d.ts.map +1 -1
  101. package/dist/sn/TxtLayer.d.ts +79 -7
  102. package/dist/sn/TxtLayer.d.ts.map +1 -1
  103. package/dist/sn/TxtStage.d.ts +45 -30
  104. package/dist/sn/TxtStage.d.ts.map +1 -1
  105. package/dist/sn/Variable.d.ts +33 -13
  106. package/dist/sn/Variable.d.ts.map +1 -1
  107. package/dist/sn/htm2tx.d.ts +3 -0
  108. package/dist/sn/htm2tx.d.ts.map +1 -0
  109. package/dist/test/AnalyzeTagArg.test.d.ts +2 -0
  110. package/dist/test/AnalyzeTagArg.test.d.ts.map +1 -0
  111. package/dist/test/AreasTest.test.d.ts +2 -0
  112. package/dist/test/AreasTest.test.d.ts.map +1 -0
  113. package/dist/test/CmnLib.test.d.ts +2 -0
  114. package/dist/test/CmnLib.test.d.ts.map +1 -0
  115. package/dist/test/Config.test.d.ts +2 -0
  116. package/dist/test/Config.test.d.ts.map +1 -0
  117. package/dist/test/Grammar.test.d.ts +2 -0
  118. package/dist/test/Grammar.test.d.ts.map +1 -0
  119. package/dist/test/HyphTest.test.d.ts +2 -0
  120. package/dist/test/HyphTest.test.d.ts.map +1 -0
  121. package/dist/test/Log.test.d.ts +2 -0
  122. package/dist/test/Log.test.d.ts.map +1 -0
  123. package/dist/test/PropParser.test.d.ts +2 -0
  124. package/dist/test/PropParser.test.d.ts.map +1 -0
  125. package/dist/test/RubySpliter.test.d.ts +2 -0
  126. package/dist/test/RubySpliter.test.d.ts.map +1 -0
  127. package/dist/test/SysTest.d.ts +5 -0
  128. package/dist/test/SysTest.d.ts.map +1 -0
  129. package/dist/test/ValTest.d.ts +31 -0
  130. package/dist/test/ValTest.d.ts.map +1 -0
  131. package/dist/test/Variable.test.d.ts +2 -0
  132. package/dist/test/Variable.test.d.ts.map +1 -0
  133. package/dist/web.d.ts +5 -1
  134. package/dist/web.d.ts.map +1 -1
  135. package/dist/web.js +6 -30102
  136. package/dist/web.js.map +1 -1
  137. package/dist/web2.js +23020 -0
  138. package/dist/web2.js.map +1 -0
  139. package/dist_app/CallStack.js +25 -0
  140. package/dist_app/CallStack.js.map +1 -0
  141. package/dist_app/EventMng.js +1588 -0
  142. package/dist_app/EventMng.js.map +1 -0
  143. package/dist_app/LayerMng.js +2924 -0
  144. package/dist_app/LayerMng.js.map +1 -0
  145. package/dist_app/PropParser.js +833 -0
  146. package/dist_app/PropParser.js.map +1 -0
  147. package/dist_app/Reading.js +784 -0
  148. package/dist_app/Reading.js.map +1 -0
  149. package/dist_app/ScriptIterator.js +1125 -0
  150. package/dist_app/ScriptIterator.js.map +1 -0
  151. package/dist_app/SndBuf.js +1519 -0
  152. package/dist_app/SndBuf.js.map +1 -0
  153. package/dist_app/SoundMng.js +136 -0
  154. package/dist_app/SoundMng.js.map +1 -0
  155. package/dist_app/Variable.js +479 -0
  156. package/dist_app/Variable.js.map +1 -0
  157. package/dist_app/app.d.ts +9 -0
  158. package/dist_app/app.d.ts.map +1 -0
  159. package/dist_app/app.js +9 -0
  160. package/dist_app/app.js.map +1 -0
  161. package/dist_app/app2.js +19819 -0
  162. package/dist_app/app2.js.map +1 -0
  163. package/dist_app/appMain.d.ts +9 -0
  164. package/dist_app/appMain.d.ts.map +1 -0
  165. package/dist_app/appMain.js +23 -0
  166. package/dist_app/appMain.js.map +1 -0
  167. package/dist_app/appMain_cmn.d.ts +30 -0
  168. package/dist_app/appMain_cmn.d.ts.map +1 -0
  169. package/dist_app/build.d.ts +2 -0
  170. package/dist_app/build.d.ts.map +1 -0
  171. package/dist_app/gamepad.js +511 -0
  172. package/dist_app/gamepad.js.map +1 -0
  173. package/dist_app/index.d.ts +33 -0
  174. package/dist_app/index.d.ts.map +1 -0
  175. package/dist_app/preload.d.ts +47 -0
  176. package/dist_app/preload.d.ts.map +1 -0
  177. package/dist_app/preload.js +2 -0
  178. package/dist_app/preload.js.map +1 -0
  179. package/dist_app/sn/AnalyzeTagArg.d.ts +28 -0
  180. package/dist_app/sn/AnalyzeTagArg.d.ts.map +1 -0
  181. package/dist_app/sn/Areas.d.ts +15 -0
  182. package/dist_app/sn/Areas.d.ts.map +1 -0
  183. package/dist_app/sn/Button.d.ts +23 -0
  184. package/dist_app/sn/Button.d.ts.map +1 -0
  185. package/dist_app/sn/CallStack.d.ts +23 -0
  186. package/dist_app/sn/CallStack.d.ts.map +1 -0
  187. package/dist_app/sn/CmnInterface.d.ts +227 -0
  188. package/dist_app/sn/CmnInterface.d.ts.map +1 -0
  189. package/dist_app/sn/CmnLib.d.ts +46 -0
  190. package/dist_app/sn/CmnLib.d.ts.map +1 -0
  191. package/dist_app/sn/CmnTween.d.ts +35 -0
  192. package/dist_app/sn/CmnTween.d.ts.map +1 -0
  193. package/dist_app/sn/Config.d.ts +12 -0
  194. package/dist_app/sn/Config.d.ts.map +1 -0
  195. package/dist_app/sn/ConfigBase.d.ts +111 -0
  196. package/dist_app/sn/ConfigBase.d.ts.map +1 -0
  197. package/dist_app/sn/DebugMng.d.ts +14 -0
  198. package/dist_app/sn/DebugMng.d.ts.map +1 -0
  199. package/dist_app/sn/DesignCast.d.ts +53 -0
  200. package/dist_app/sn/DesignCast.d.ts.map +1 -0
  201. package/dist_app/sn/EventListenerCtn.d.ts +13 -0
  202. package/dist_app/sn/EventListenerCtn.d.ts.map +1 -0
  203. package/dist_app/sn/EventMng.d.ts +29 -0
  204. package/dist_app/sn/EventMng.d.ts.map +1 -0
  205. package/dist_app/sn/FocusMng.d.ts +13 -0
  206. package/dist_app/sn/FocusMng.d.ts.map +1 -0
  207. package/dist_app/sn/FrameMng.d.ts +20 -0
  208. package/dist_app/sn/FrameMng.d.ts.map +1 -0
  209. package/dist_app/sn/Grammar.d.ts +291 -0
  210. package/dist_app/sn/Grammar.d.ts.map +1 -0
  211. package/dist_app/sn/GrpLayer.d.ts +49 -0
  212. package/dist_app/sn/GrpLayer.d.ts.map +1 -0
  213. package/dist_app/sn/Hyphenation.d.ts +42 -0
  214. package/dist_app/sn/Hyphenation.d.ts.map +1 -0
  215. package/dist_app/sn/Layer.d.ts +86 -0
  216. package/dist_app/sn/Layer.d.ts.map +1 -0
  217. package/dist_app/sn/LayerMng.d.ts +46 -0
  218. package/dist_app/sn/LayerMng.d.ts.map +1 -0
  219. package/dist_app/sn/Log.d.ts +18 -0
  220. package/dist_app/sn/Log.d.ts.map +1 -0
  221. package/dist_app/sn/Main.d.ts +16 -0
  222. package/dist_app/sn/Main.d.ts.map +1 -0
  223. package/dist_app/sn/Pages.d.ts +26 -0
  224. package/dist_app/sn/Pages.d.ts.map +1 -0
  225. package/dist_app/sn/PropParser.d.ts +12 -0
  226. package/dist_app/sn/PropParser.d.ts.map +1 -0
  227. package/dist_app/sn/Reading.d.ts +86 -0
  228. package/dist_app/sn/Reading.d.ts.map +1 -0
  229. package/dist_app/sn/RubySpliter.d.ts +14 -0
  230. package/dist_app/sn/RubySpliter.d.ts.map +1 -0
  231. package/dist_app/sn/ScriptIterator.d.ts +58 -0
  232. package/dist_app/sn/ScriptIterator.d.ts.map +1 -0
  233. package/dist_app/sn/SndBuf.d.ts +30 -0
  234. package/dist_app/sn/SndBuf.d.ts.map +1 -0
  235. package/dist_app/sn/SoundMng.d.ts +16 -0
  236. package/dist_app/sn/SoundMng.d.ts.map +1 -0
  237. package/dist_app/sn/SpritesMng.d.ts +27 -0
  238. package/dist_app/sn/SpritesMng.d.ts.map +1 -0
  239. package/dist_app/sn/SysApp.d.ts +32 -0
  240. package/dist_app/sn/SysApp.d.ts.map +1 -0
  241. package/dist_app/sn/SysBase.d.ts +79 -0
  242. package/dist_app/sn/SysBase.d.ts.map +1 -0
  243. package/dist_app/sn/SysNode.d.ts +15 -0
  244. package/dist_app/sn/SysNode.d.ts.map +1 -0
  245. package/dist_app/sn/SysWeb.d.ts +26 -0
  246. package/dist_app/sn/SysWeb.d.ts.map +1 -0
  247. package/dist_app/sn/TxtLayer.d.ts +121 -0
  248. package/dist_app/sn/TxtLayer.d.ts.map +1 -0
  249. package/dist_app/sn/TxtStage.d.ts +90 -0
  250. package/dist_app/sn/TxtStage.d.ts.map +1 -0
  251. package/dist_app/sn/Variable.d.ts +48 -0
  252. package/dist_app/sn/Variable.d.ts.map +1 -0
  253. package/dist_app/sn/htm2tx.d.ts +3 -0
  254. package/dist_app/sn/htm2tx.d.ts.map +1 -0
  255. package/dist_app/test/AnalyzeTagArg.test.d.ts +2 -0
  256. package/dist_app/test/AnalyzeTagArg.test.d.ts.map +1 -0
  257. package/dist_app/test/AreasTest.test.d.ts +2 -0
  258. package/dist_app/test/AreasTest.test.d.ts.map +1 -0
  259. package/dist_app/test/CmnLib.test.d.ts +2 -0
  260. package/dist_app/test/CmnLib.test.d.ts.map +1 -0
  261. package/dist_app/test/Config.test.d.ts +2 -0
  262. package/dist_app/test/Config.test.d.ts.map +1 -0
  263. package/dist_app/test/Grammar.test.d.ts +2 -0
  264. package/dist_app/test/Grammar.test.d.ts.map +1 -0
  265. package/dist_app/test/HyphTest.test.d.ts +2 -0
  266. package/dist_app/test/HyphTest.test.d.ts.map +1 -0
  267. package/dist_app/test/Log.test.d.ts +2 -0
  268. package/dist_app/test/Log.test.d.ts.map +1 -0
  269. package/dist_app/test/PropParser.test.d.ts +2 -0
  270. package/dist_app/test/PropParser.test.d.ts.map +1 -0
  271. package/dist_app/test/RubySpliter.test.d.ts +2 -0
  272. package/dist_app/test/RubySpliter.test.d.ts.map +1 -0
  273. package/dist_app/test/SysTest.d.ts +5 -0
  274. package/dist_app/test/SysTest.d.ts.map +1 -0
  275. package/dist_app/test/ValTest.d.ts +31 -0
  276. package/dist_app/test/ValTest.d.ts.map +1 -0
  277. package/dist_app/test/Variable.test.d.ts +2 -0
  278. package/dist_app/test/Variable.test.d.ts.map +1 -0
  279. package/dist_app/web.d.ts +9 -0
  280. package/dist_app/web.d.ts.map +1 -0
  281. package/package.json +57 -51
  282. package/dist/app.js +0 -28154
  283. package/dist/app.js.map +0 -1
  284. package/dist/appMain.js +0 -16
  285. package/dist/appMain.js.map +0 -1
  286. package/dist/preload.js +0 -2
  287. package/dist/preload.js.map +0 -1
  288. package/dist/sn/ReadState.d.ts +0 -79
  289. package/dist/sn/ReadState.d.ts.map +0 -1
@@ -0,0 +1,784 @@
1
+ import { e as _, g as d, C as N, k as x, d as R, f as B, E as j } from "./app2.js";
2
+ var E = Object.freeze({
3
+ Linear: Object.freeze({
4
+ None: function(e) {
5
+ return e;
6
+ },
7
+ In: function(e) {
8
+ return e;
9
+ },
10
+ Out: function(e) {
11
+ return e;
12
+ },
13
+ InOut: function(e) {
14
+ return e;
15
+ }
16
+ }),
17
+ Quadratic: Object.freeze({
18
+ In: function(e) {
19
+ return e * e;
20
+ },
21
+ Out: function(e) {
22
+ return e * (2 - e);
23
+ },
24
+ InOut: function(e) {
25
+ return (e *= 2) < 1 ? 0.5 * e * e : -0.5 * (--e * (e - 2) - 1);
26
+ }
27
+ }),
28
+ Cubic: Object.freeze({
29
+ In: function(e) {
30
+ return e * e * e;
31
+ },
32
+ Out: function(e) {
33
+ return --e * e * e + 1;
34
+ },
35
+ InOut: function(e) {
36
+ return (e *= 2) < 1 ? 0.5 * e * e * e : 0.5 * ((e -= 2) * e * e + 2);
37
+ }
38
+ }),
39
+ Quartic: Object.freeze({
40
+ In: function(e) {
41
+ return e * e * e * e;
42
+ },
43
+ Out: function(e) {
44
+ return 1 - --e * e * e * e;
45
+ },
46
+ InOut: function(e) {
47
+ return (e *= 2) < 1 ? 0.5 * e * e * e * e : -0.5 * ((e -= 2) * e * e * e - 2);
48
+ }
49
+ }),
50
+ Quintic: Object.freeze({
51
+ In: function(e) {
52
+ return e * e * e * e * e;
53
+ },
54
+ Out: function(e) {
55
+ return --e * e * e * e * e + 1;
56
+ },
57
+ InOut: function(e) {
58
+ return (e *= 2) < 1 ? 0.5 * e * e * e * e * e : 0.5 * ((e -= 2) * e * e * e * e + 2);
59
+ }
60
+ }),
61
+ Sinusoidal: Object.freeze({
62
+ In: function(e) {
63
+ return 1 - Math.sin((1 - e) * Math.PI / 2);
64
+ },
65
+ Out: function(e) {
66
+ return Math.sin(e * Math.PI / 2);
67
+ },
68
+ InOut: function(e) {
69
+ return 0.5 * (1 - Math.sin(Math.PI * (0.5 - e)));
70
+ }
71
+ }),
72
+ Exponential: Object.freeze({
73
+ In: function(e) {
74
+ return e === 0 ? 0 : Math.pow(1024, e - 1);
75
+ },
76
+ Out: function(e) {
77
+ return e === 1 ? 1 : 1 - Math.pow(2, -10 * e);
78
+ },
79
+ InOut: function(e) {
80
+ return e === 0 ? 0 : e === 1 ? 1 : (e *= 2) < 1 ? 0.5 * Math.pow(1024, e - 1) : 0.5 * (-Math.pow(2, -10 * (e - 1)) + 2);
81
+ }
82
+ }),
83
+ Circular: Object.freeze({
84
+ In: function(e) {
85
+ return 1 - Math.sqrt(1 - e * e);
86
+ },
87
+ Out: function(e) {
88
+ return Math.sqrt(1 - --e * e);
89
+ },
90
+ InOut: function(e) {
91
+ return (e *= 2) < 1 ? -0.5 * (Math.sqrt(1 - e * e) - 1) : 0.5 * (Math.sqrt(1 - (e -= 2) * e) + 1);
92
+ }
93
+ }),
94
+ Elastic: Object.freeze({
95
+ In: function(e) {
96
+ return e === 0 ? 0 : e === 1 ? 1 : -Math.pow(2, 10 * (e - 1)) * Math.sin((e - 1.1) * 5 * Math.PI);
97
+ },
98
+ Out: function(e) {
99
+ return e === 0 ? 0 : e === 1 ? 1 : Math.pow(2, -10 * e) * Math.sin((e - 0.1) * 5 * Math.PI) + 1;
100
+ },
101
+ InOut: function(e) {
102
+ return e === 0 ? 0 : e === 1 ? 1 : (e *= 2, e < 1 ? -0.5 * Math.pow(2, 10 * (e - 1)) * Math.sin((e - 1.1) * 5 * Math.PI) : 0.5 * Math.pow(2, -10 * (e - 1)) * Math.sin((e - 1.1) * 5 * Math.PI) + 1);
103
+ }
104
+ }),
105
+ Back: Object.freeze({
106
+ In: function(e) {
107
+ var t = 1.70158;
108
+ return e === 1 ? 1 : e * e * ((t + 1) * e - t);
109
+ },
110
+ Out: function(e) {
111
+ var t = 1.70158;
112
+ return e === 0 ? 0 : --e * e * ((t + 1) * e + t) + 1;
113
+ },
114
+ InOut: function(e) {
115
+ var t = 2.5949095;
116
+ return (e *= 2) < 1 ? 0.5 * (e * e * ((t + 1) * e - t)) : 0.5 * ((e -= 2) * e * ((t + 1) * e + t) + 2);
117
+ }
118
+ }),
119
+ Bounce: Object.freeze({
120
+ In: function(e) {
121
+ return 1 - E.Bounce.Out(1 - e);
122
+ },
123
+ Out: function(e) {
124
+ return e < 1 / 2.75 ? 7.5625 * e * e : e < 2 / 2.75 ? 7.5625 * (e -= 1.5 / 2.75) * e + 0.75 : e < 2.5 / 2.75 ? 7.5625 * (e -= 2.25 / 2.75) * e + 0.9375 : 7.5625 * (e -= 2.625 / 2.75) * e + 0.984375;
125
+ },
126
+ InOut: function(e) {
127
+ return e < 0.5 ? E.Bounce.In(e * 2) * 0.5 : E.Bounce.Out(e * 2 - 1) * 0.5 + 0.5;
128
+ }
129
+ }),
130
+ generatePow: function(e) {
131
+ return e === void 0 && (e = 4), e = e < Number.EPSILON ? Number.EPSILON : e, e = e > 1e4 ? 1e4 : e, {
132
+ In: function(t) {
133
+ return Math.pow(t, e);
134
+ },
135
+ Out: function(t) {
136
+ return 1 - Math.pow(1 - t, e);
137
+ },
138
+ InOut: function(t) {
139
+ return t < 0.5 ? Math.pow(t * 2, e) / 2 : (1 - Math.pow(2 - t * 2, e)) / 2 + 0.5;
140
+ }
141
+ };
142
+ }
143
+ }), y = function() {
144
+ return performance.now();
145
+ }, W = (
146
+ /** @class */
147
+ function() {
148
+ function e() {
149
+ this._tweens = {}, this._tweensAddedDuringUpdate = {};
150
+ }
151
+ return e.prototype.getAll = function() {
152
+ var t = this;
153
+ return Object.keys(this._tweens).map(function(i) {
154
+ return t._tweens[i];
155
+ });
156
+ }, e.prototype.removeAll = function() {
157
+ this._tweens = {};
158
+ }, e.prototype.add = function(t) {
159
+ this._tweens[t.getId()] = t, this._tweensAddedDuringUpdate[t.getId()] = t;
160
+ }, e.prototype.remove = function(t) {
161
+ delete this._tweens[t.getId()], delete this._tweensAddedDuringUpdate[t.getId()];
162
+ }, e.prototype.update = function(t, i) {
163
+ t === void 0 && (t = y()), i === void 0 && (i = !1);
164
+ var s = Object.keys(this._tweens);
165
+ if (s.length === 0)
166
+ return !1;
167
+ for (; s.length > 0; ) {
168
+ this._tweensAddedDuringUpdate = {};
169
+ for (var r = 0; r < s.length; r++) {
170
+ var o = this._tweens[s[r]], l = !i;
171
+ o && o.update(t, l) === !1 && !i && delete this._tweens[s[r]];
172
+ }
173
+ s = Object.keys(this._tweensAddedDuringUpdate);
174
+ }
175
+ return !0;
176
+ }, e;
177
+ }()
178
+ ), C = {
179
+ Linear: function(e, t) {
180
+ var i = e.length - 1, s = i * t, r = Math.floor(s), o = C.Utils.Linear;
181
+ return t < 0 ? o(e[0], e[1], s) : t > 1 ? o(e[i], e[i - 1], i - s) : o(e[r], e[r + 1 > i ? i : r + 1], s - r);
182
+ },
183
+ Utils: {
184
+ Linear: function(e, t, i) {
185
+ return (t - e) * i + e;
186
+ }
187
+ }
188
+ }, F = (
189
+ /** @class */
190
+ function() {
191
+ function e() {
192
+ }
193
+ return e.nextId = function() {
194
+ return e._nextId++;
195
+ }, e._nextId = 0, e;
196
+ }()
197
+ ), L = new W(), D = (
198
+ /** @class */
199
+ function() {
200
+ function e(t, i) {
201
+ i === void 0 && (i = L), this._object = t, this._group = i, this._isPaused = !1, this._pauseStart = 0, this._valuesStart = {}, this._valuesEnd = {}, this._valuesStartRepeat = {}, this._duration = 1e3, this._isDynamic = !1, this._initialRepeat = 0, this._repeat = 0, this._yoyo = !1, this._isPlaying = !1, this._reversed = !1, this._delayTime = 0, this._startTime = 0, this._easingFunction = E.Linear.None, this._interpolationFunction = C.Linear, this._chainedTweens = [], this._onStartCallbackFired = !1, this._onEveryStartCallbackFired = !1, this._id = F.nextId(), this._isChainStopped = !1, this._propertiesAreSetUp = !1, this._goToEnd = !1;
202
+ }
203
+ return e.prototype.getId = function() {
204
+ return this._id;
205
+ }, e.prototype.isPlaying = function() {
206
+ return this._isPlaying;
207
+ }, e.prototype.isPaused = function() {
208
+ return this._isPaused;
209
+ }, e.prototype.getDuration = function() {
210
+ return this._duration;
211
+ }, e.prototype.to = function(t, i) {
212
+ if (i === void 0 && (i = 1e3), this._isPlaying)
213
+ throw new Error("Can not call Tween.to() while Tween is already started or paused. Stop the Tween first.");
214
+ return this._valuesEnd = t, this._propertiesAreSetUp = !1, this._duration = i < 0 ? 0 : i, this;
215
+ }, e.prototype.duration = function(t) {
216
+ return t === void 0 && (t = 1e3), this._duration = t < 0 ? 0 : t, this;
217
+ }, e.prototype.dynamic = function(t) {
218
+ return t === void 0 && (t = !1), this._isDynamic = t, this;
219
+ }, e.prototype.start = function(t, i) {
220
+ if (t === void 0 && (t = y()), i === void 0 && (i = !1), this._isPlaying)
221
+ return this;
222
+ if (this._group && this._group.add(this), this._repeat = this._initialRepeat, this._reversed) {
223
+ this._reversed = !1;
224
+ for (var s in this._valuesStartRepeat)
225
+ this._swapEndStartRepeatValues(s), this._valuesStart[s] = this._valuesStartRepeat[s];
226
+ }
227
+ if (this._isPlaying = !0, this._isPaused = !1, this._onStartCallbackFired = !1, this._onEveryStartCallbackFired = !1, this._isChainStopped = !1, this._startTime = t, this._startTime += this._delayTime, !this._propertiesAreSetUp || i) {
228
+ if (this._propertiesAreSetUp = !0, !this._isDynamic) {
229
+ var r = {};
230
+ for (var o in this._valuesEnd)
231
+ r[o] = this._valuesEnd[o];
232
+ this._valuesEnd = r;
233
+ }
234
+ this._setupProperties(this._object, this._valuesStart, this._valuesEnd, this._valuesStartRepeat, i);
235
+ }
236
+ return this;
237
+ }, e.prototype.startFromCurrentValues = function(t) {
238
+ return this.start(t, !0);
239
+ }, e.prototype._setupProperties = function(t, i, s, r, o) {
240
+ for (var l in s) {
241
+ var c = t[l], f = Array.isArray(c), g = f ? "array" : typeof c, h = !f && Array.isArray(s[l]);
242
+ if (!(g === "undefined" || g === "function")) {
243
+ if (h) {
244
+ var u = s[l];
245
+ if (u.length === 0)
246
+ continue;
247
+ for (var S = [c], P = 0, b = u.length; P < b; P += 1) {
248
+ var T = this._handleRelativeValue(c, u[P]);
249
+ if (isNaN(T)) {
250
+ h = !1, console.warn("Found invalid interpolation list. Skipping.");
251
+ break;
252
+ }
253
+ S.push(T);
254
+ }
255
+ h && (s[l] = S);
256
+ }
257
+ if ((g === "object" || f) && c && !h) {
258
+ i[l] = f ? [] : {};
259
+ var k = c;
260
+ for (var v in k)
261
+ i[l][v] = k[v];
262
+ r[l] = f ? [] : {};
263
+ var u = s[l];
264
+ if (!this._isDynamic) {
265
+ var w = {};
266
+ for (var v in u)
267
+ w[v] = u[v];
268
+ s[l] = u = w;
269
+ }
270
+ this._setupProperties(k, i[l], u, r[l], o);
271
+ } else
272
+ (typeof i[l] > "u" || o) && (i[l] = c), f || (i[l] *= 1), h ? r[l] = s[l].slice().reverse() : r[l] = i[l] || 0;
273
+ }
274
+ }
275
+ }, e.prototype.stop = function() {
276
+ return this._isChainStopped || (this._isChainStopped = !0, this.stopChainedTweens()), this._isPlaying ? (this._group && this._group.remove(this), this._isPlaying = !1, this._isPaused = !1, this._onStopCallback && this._onStopCallback(this._object), this) : this;
277
+ }, e.prototype.end = function() {
278
+ return this._goToEnd = !0, this.update(1 / 0), this;
279
+ }, e.prototype.pause = function(t) {
280
+ return t === void 0 && (t = y()), this._isPaused || !this._isPlaying ? this : (this._isPaused = !0, this._pauseStart = t, this._group && this._group.remove(this), this);
281
+ }, e.prototype.resume = function(t) {
282
+ return t === void 0 && (t = y()), !this._isPaused || !this._isPlaying ? this : (this._isPaused = !1, this._startTime += t - this._pauseStart, this._pauseStart = 0, this._group && this._group.add(this), this);
283
+ }, e.prototype.stopChainedTweens = function() {
284
+ for (var t = 0, i = this._chainedTweens.length; t < i; t++)
285
+ this._chainedTweens[t].stop();
286
+ return this;
287
+ }, e.prototype.group = function(t) {
288
+ return t === void 0 && (t = L), this._group = t, this;
289
+ }, e.prototype.delay = function(t) {
290
+ return t === void 0 && (t = 0), this._delayTime = t, this;
291
+ }, e.prototype.repeat = function(t) {
292
+ return t === void 0 && (t = 0), this._initialRepeat = t, this._repeat = t, this;
293
+ }, e.prototype.repeatDelay = function(t) {
294
+ return this._repeatDelayTime = t, this;
295
+ }, e.prototype.yoyo = function(t) {
296
+ return t === void 0 && (t = !1), this._yoyo = t, this;
297
+ }, e.prototype.easing = function(t) {
298
+ return t === void 0 && (t = E.Linear.None), this._easingFunction = t, this;
299
+ }, e.prototype.interpolation = function(t) {
300
+ return t === void 0 && (t = C.Linear), this._interpolationFunction = t, this;
301
+ }, e.prototype.chain = function() {
302
+ for (var t = [], i = 0; i < arguments.length; i++)
303
+ t[i] = arguments[i];
304
+ return this._chainedTweens = t, this;
305
+ }, e.prototype.onStart = function(t) {
306
+ return this._onStartCallback = t, this;
307
+ }, e.prototype.onEveryStart = function(t) {
308
+ return this._onEveryStartCallback = t, this;
309
+ }, e.prototype.onUpdate = function(t) {
310
+ return this._onUpdateCallback = t, this;
311
+ }, e.prototype.onRepeat = function(t) {
312
+ return this._onRepeatCallback = t, this;
313
+ }, e.prototype.onComplete = function(t) {
314
+ return this._onCompleteCallback = t, this;
315
+ }, e.prototype.onStop = function(t) {
316
+ return this._onStopCallback = t, this;
317
+ }, e.prototype.update = function(t, i) {
318
+ var s = this, r;
319
+ if (t === void 0 && (t = y()), i === void 0 && (i = !0), this._isPaused)
320
+ return !0;
321
+ var o, l = this._startTime + this._duration;
322
+ if (!this._goToEnd && !this._isPlaying) {
323
+ if (t > l)
324
+ return !1;
325
+ i && this.start(t, !0);
326
+ }
327
+ if (this._goToEnd = !1, t < this._startTime)
328
+ return !0;
329
+ this._onStartCallbackFired === !1 && (this._onStartCallback && this._onStartCallback(this._object), this._onStartCallbackFired = !0), this._onEveryStartCallbackFired === !1 && (this._onEveryStartCallback && this._onEveryStartCallback(this._object), this._onEveryStartCallbackFired = !0);
330
+ var c = t - this._startTime, f = this._duration + ((r = this._repeatDelayTime) !== null && r !== void 0 ? r : this._delayTime), g = this._duration + this._repeat * f, h = function() {
331
+ if (s._duration === 0 || c > g)
332
+ return 1;
333
+ var k = Math.trunc(c / f), v = c - k * f, w = Math.min(v / s._duration, 1);
334
+ return w === 0 && c === s._duration ? 1 : w;
335
+ }, u = h(), S = this._easingFunction(u);
336
+ if (this._updateProperties(this._object, this._valuesStart, this._valuesEnd, S), this._onUpdateCallback && this._onUpdateCallback(this._object, u), this._duration === 0 || c >= this._duration)
337
+ if (this._repeat > 0) {
338
+ var P = Math.min(Math.trunc((c - this._duration) / f) + 1, this._repeat);
339
+ isFinite(this._repeat) && (this._repeat -= P);
340
+ for (o in this._valuesStartRepeat)
341
+ !this._yoyo && typeof this._valuesEnd[o] == "string" && (this._valuesStartRepeat[o] = // eslint-disable-next-line
342
+ // @ts-ignore FIXME?
343
+ this._valuesStartRepeat[o] + parseFloat(this._valuesEnd[o])), this._yoyo && this._swapEndStartRepeatValues(o), this._valuesStart[o] = this._valuesStartRepeat[o];
344
+ return this._yoyo && (this._reversed = !this._reversed), this._startTime += f * P, this._onRepeatCallback && this._onRepeatCallback(this._object), this._onEveryStartCallbackFired = !1, !0;
345
+ } else {
346
+ this._onCompleteCallback && this._onCompleteCallback(this._object);
347
+ for (var b = 0, T = this._chainedTweens.length; b < T; b++)
348
+ this._chainedTweens[b].start(this._startTime + this._duration, !1);
349
+ return this._isPlaying = !1, !1;
350
+ }
351
+ return !0;
352
+ }, e.prototype._updateProperties = function(t, i, s, r) {
353
+ for (var o in s)
354
+ if (i[o] !== void 0) {
355
+ var l = i[o] || 0, c = s[o], f = Array.isArray(t[o]), g = Array.isArray(c), h = !f && g;
356
+ h ? t[o] = this._interpolationFunction(c, r) : typeof c == "object" && c ? this._updateProperties(t[o], l, c, r) : (c = this._handleRelativeValue(l, c), typeof c == "number" && (t[o] = l + (c - l) * r));
357
+ }
358
+ }, e.prototype._handleRelativeValue = function(t, i) {
359
+ return typeof i != "string" ? i : i.charAt(0) === "+" || i.charAt(0) === "-" ? t + parseFloat(i) : parseFloat(i);
360
+ }, e.prototype._swapEndStartRepeatValues = function(t) {
361
+ var i = this._valuesStartRepeat[t], s = this._valuesEnd[t];
362
+ typeof s == "string" ? this._valuesStartRepeat[t] = this._valuesStartRepeat[t] + parseFloat(s) : this._valuesStartRepeat[t] = this._valuesEnd[t], this._valuesEnd[t] = i;
363
+ }, e;
364
+ }()
365
+ );
366
+ F.nextId;
367
+ var p = L;
368
+ p.getAll.bind(p);
369
+ var K = p.removeAll.bind(p);
370
+ p.add.bind(p);
371
+ var U = p.remove.bind(p), z = p.update.bind(p);
372
+ class n {
373
+ static #i;
374
+ static get rs() {
375
+ return this.#i;
376
+ }
377
+ constructor() {
378
+ n.#i = this;
379
+ }
380
+ static #t = {};
381
+ static #e = {};
382
+ static setEvt2Fnc(t, i, s) {
383
+ t ? this.#e[i] = s : this.#t[i] = s;
384
+ }
385
+ static getEvt2Fnc = (t) => this.#t[t] ?? this.#e[t];
386
+ static clear_eventer(t, i, s) {
387
+ if (!t.startsWith("dom=")) return;
388
+ const r = i ? this.#e[s] : this.#t[s];
389
+ r && this.getHtmlElmList(t).el.forEach((o) => o.removeEventListener("click", r)), i ? delete this.#e[s] : delete this.#t[s];
390
+ }
391
+ static popLocalEvts() {
392
+ const t = this.#t;
393
+ return this.#t = {}, t;
394
+ }
395
+ static pushLocalEvts(t) {
396
+ this.#t = t;
397
+ }
398
+ static clear_event(t) {
399
+ const i = _(t, "global", !1), s = i ? this.#e : this.#t;
400
+ for (const [r, o] of Object.entries(s))
401
+ r.startsWith("dom=") && this.getHtmlElmList(r).el.forEach((l) => l.removeEventListener("click", o));
402
+ return i ? this.#e = {} : this.#t = {}, !1;
403
+ }
404
+ static getHtmlElmList(t) {
405
+ const i = t.indexOf(":");
406
+ let s = "";
407
+ if (i >= 0) {
408
+ const r = t.slice(4, i), o = `const.sn.frm.${r}`;
409
+ if (!a.val.getVal(`tmp:${o}`, 0)) throw `HTML【${r}】が読み込まれていません`;
410
+ const l = document.getElementById(r);
411
+ if (!l) throw `HTML【${r}】の要素(id=${r})がありません`;
412
+ const c = l.contentWindow;
413
+ return s = t.slice(i + 1), { el: c.document.querySelectorAll(s), id: r, sel: s };
414
+ }
415
+ return s = t.slice(4), { el: document.querySelectorAll(s), id: "", sel: s };
416
+ }
417
+ // 予約イベントの発生待ち
418
+ static waitRsvEvent(t, i) {
419
+ a.val.saveKidoku(), i ? this.#t.click = this.#t.enter = this.#t.arrowdown = // hTag.event({key:'downwheel', breakout: fnc});
420
+ this.#t["wheel.y>0"] = () => i() : (delete this.#t.click, delete this.#t.enter, delete this.#t.arrowdown, delete this.#t["wheel.y>0"]), this.getEvt2Fnc = t ? (s) => this.#t[s] ?? this.#e[s] : (s) => this.#t[s], a.scrItr.noticeWait(), d.debugLog && console.log("🎍 wait event... %o", {
421
+ local: Object.keys(this.#t),
422
+ global: Object.keys(this.#e)
423
+ });
424
+ }
425
+ static waitRsvEvent4Paging() {
426
+ if (this.waitRsvEvent(!0), this.aKeysAtPaging.length === 0) {
427
+ this.getEvt2Fnc = (i) => this.#t[i] ?? this.#e[i];
428
+ return;
429
+ }
430
+ const t = {};
431
+ for (const i of this.aKeysAtPaging) {
432
+ const s = this.#e[i];
433
+ s && (t[i] = s);
434
+ }
435
+ this.getEvt2Fnc = (i) => this.#t[i] ?? t[i];
436
+ }
437
+ fire(t, i) {
438
+ const s = t.toLowerCase();
439
+ switch (s) {
440
+ case "click":
441
+ case "rightclick":
442
+ // 右クリックメニューに入って出られない
443
+ case "middleclick":
444
+ // 〃
445
+ case "enter":
446
+ case "arrowdown":
447
+ if (!n.isFirstFire()) return;
448
+ break;
449
+ }
450
+ if (s === "enter") {
451
+ const o = a.fcs.getFocus();
452
+ if (o instanceof N) {
453
+ o.emit(x, new PointerEvent(x));
454
+ return;
455
+ }
456
+ }
457
+ const r = n.getEvt2Fnc(s);
458
+ r && (i.stopImmediatePropagation(), !(!s.startsWith("dom=") && a.layMng.clickTxtLay()) && r(i));
459
+ }
460
+ get isSkipping() {
461
+ return a.skip_enabled;
462
+ }
463
+ isWait = !1;
464
+ // イベント複数発生回避(ボタンとステージクリックなど)
465
+ static #s = !1;
466
+ static isFirstFire() {
467
+ return n.#s ? !1 : (n.#s = !0, !0);
468
+ }
469
+ static resetFired() {
470
+ n.#s = !1;
471
+ }
472
+ static aPage;
473
+ static lenPage = 0;
474
+ static posPage = 0;
475
+ static styPaging;
476
+ static INI_STYPAGE = "color: yellow; text-shadow: 1px 1px 0 #000, -1px 1px 0 #000, 1px -1px 0 #000, -1px -1px 0 #000;";
477
+ static aKeysAtPaging = [];
478
+ static recodePage(t = !1) {
479
+ if (!a.val.getVal("save:sn.doRecLog")) return;
480
+ const { fn: i, idx: s } = a.scrItr.nowScrIdx(), r = `${s - 1}:` + i;
481
+ if (this.aPage.findIndex((l) => l.key === r) > -1) return;
482
+ d.debugLog && console.log(`📜 %crecodePage === week:${t} lenPage:${this.lenPage} len:${this.aPage.length} POP:${this.aPage.at(-1)?.week}`, "color:#3B0;"), this.aPage.at(-1)?.week && this.aPage.pop();
483
+ const { max_len: o } = a.cfg.oCfg.log;
484
+ if (this.aPage.push({
485
+ key: r,
486
+ week: t,
487
+ fn: a.val.getVal("save:const.sn.scriptFn", i),
488
+ index: a.val.getVal("save:const.sn.scriptIdx", 0),
489
+ mark: a.scrItr.nowMark()
490
+ }) > o && (this.aPage = this.aPage.slice(-o)), this.lenPage = this.aPage.length, d.debugLog) {
491
+ const l = a.scrItr.nowMark();
492
+ console.log(` %clenPage:${this.lenPage} (base=${l.hPages.base.fore.sBkFn} 0=${l.hPages[0].fore.sBkFn} mes=${/color: \w+;/.exec(l.hPages.mes.fore.txs.cssText)})%c mark:%o`, "color:#3B0;", "", l), console.table(this.aPage);
493
+ }
494
+ a.val.setVal_Nochk("sys", "const.sn.aPageLog", JSON.stringify(this.aPage));
495
+ }
496
+ static playbackPage(t, i) {
497
+ this.aPage = JSON.parse(t), this.lenPage = this.aPage.length, this.posPage >= this.lenPage && (this.posPage = this.lenPage - 1), this.styPaging = i;
498
+ }
499
+ beginProc() {
500
+ new $();
501
+ }
502
+ endProc() {
503
+ new I();
504
+ }
505
+ // タグ処理
506
+ l(t) {
507
+ if (!a.tagL_enabled) return !1;
508
+ if (n.recodePage(!0), a.auto_enabled)
509
+ return t.time = Number(a.val.getVal(`sys:sn.auto.msecLineWait${a.scrItr.isKidoku ? "_Kidoku" : ""}`)), this.wait(t);
510
+ if (a.skip_enabled) {
511
+ if (!a.skip_all && !a.scrItr.isNextKidoku)
512
+ a.cancelAutoSkip();
513
+ else if ("ps".includes(String(a.val.getVal("sys:sn.skip.mode"))))
514
+ return t.time = 50, this.wait(t);
515
+ }
516
+ return _(t, "visible", !0) && (a.layMng.breakLine(t), a.goTxt()), new M(t), !0;
517
+ }
518
+ p(t) {
519
+ if (n.recodePage(), a.auto_enabled)
520
+ return t.time = Number(a.val.getVal(`sys:sn.auto.msecPageWait${a.scrItr.isKidoku ? "_Kidoku" : ""}`)), this.wait(t);
521
+ if (a.skip_enabled) {
522
+ if (!a.skip_all && !a.scrItr.isNextKidoku)
523
+ a.cancelAutoSkip();
524
+ else if (String(a.val.getVal("sys:sn.skip.mode")) === "s")
525
+ return t.time = 50, this.wait(t);
526
+ }
527
+ return _(t, "visible", !0) && (a.layMng.breakPage(t), a.goTxt()), new M(t), !0;
528
+ }
529
+ s(t) {
530
+ return n.recodePage(), a.cancelAutoSkip(), new M(t), !0;
531
+ }
532
+ wait(t) {
533
+ const i = R(t, "time", NaN);
534
+ if (a.skip_enabled)
535
+ return !a.skip_all && !a.scrItr.isNextKidoku && a.cancelAutoSkip(), !1;
536
+ const s = new D({}), r = "wait", o = () => {
537
+ U(s), a.notifyEndProc(r);
538
+ };
539
+ s.to({}, i).onComplete(o).start();
540
+ const l = _(t, "canskip", !0);
541
+ return a.beginProc(r, o, !0, l ? o : void 0), !0;
542
+ }
543
+ page(t) {
544
+ if (!("clear" in t || "to" in t || "style" in t)) throw "clear,style,to いずれかは必須です";
545
+ const { key: i, style: s } = t;
546
+ return i && (n.aKeysAtPaging = i.split(",")), s ? (n.styPaging = s, a.val.setVal_Nochk("save", "const.sn.styPaging", s), !1) : (_(t, "clear", !1) && (n.aPage = [], n.lenPage = 0, n.posPage = 0, a.val.setVal_Nochk("sys", "const.sn.aPageLog", "[]"), a.val.setVal_Nochk("save", "const.sn.styPaging", n.INI_STYPAGE)), !1);
547
+ }
548
+ static destroy() {
549
+ this.#t = {}, this.#e = {}, this.aPage = [], this.lenPage = 0, this.posPage = 0;
550
+ }
551
+ }
552
+ class I extends n {
553
+ constructor() {
554
+ super(), d.debugLog && console.log("📖 => %cReadingState_go", "color:#3B0;"), a.main.resume();
555
+ }
556
+ fire(t, i) {
557
+ }
558
+ // システムボタンなど無効化
559
+ }
560
+ class $ extends n {
561
+ constructor() {
562
+ super(), d.debugLog && console.log("📖 => %cReadingState_proc", "color:#3B0;");
563
+ }
564
+ fire(t, i) {
565
+ }
566
+ // システムボタンなど無効化
567
+ }
568
+ class M extends n {
569
+ constructor(t) {
570
+ super(), d.debugLog && console.log("📖 => %cReadingState_wait", "color:#3B0;");
571
+ let i = () => {
572
+ };
573
+ const s = _(t, "global", !0);
574
+ switch (t[":タグ名"]) {
575
+ case "wait":
576
+ return;
577
+ // 予約イベント待ち【しない】
578
+ case "s":
579
+ n.waitRsvEvent(s);
580
+ return;
581
+ case "p":
582
+ i = () => {
583
+ _(t, "er", !1) && a.hTag.er(t), a.sndMng.clearCache(), new I();
584
+ };
585
+ break;
586
+ default:
587
+ i = () => new I();
588
+ }
589
+ n.waitRsvEvent(s, i);
590
+ }
591
+ isWait = !0;
592
+ page(t) {
593
+ const i = super.page(t), { to: s } = t;
594
+ if (!s) return i;
595
+ if (n.lenPage < 2) return !1;
596
+ switch (s) {
597
+ case "oldest":
598
+ t.to = "prev", n.posPage = 1;
599
+ break;
600
+ case "newest":
601
+ case "prev":
602
+ t.to = "prev", n.posPage = n.lenPage - 1;
603
+ break;
604
+ // case 'next': // スルー
605
+ default:
606
+ return !1;
607
+ }
608
+ return O.go(t);
609
+ }
610
+ }
611
+ class O extends n {
612
+ constructor() {
613
+ super(), d.debugLog && console.log("📖 => %cReadingState_page", "color:#3B0;"), a.val.setVal_Nochk("tmp", "const.sn.isPaging", !0);
614
+ }
615
+ static go(t) {
616
+ return new O().page(t);
617
+ }
618
+ #i = !0;
619
+ get isSkipping() {
620
+ return this.#i;
621
+ }
622
+ isWait = !1;
623
+ beginProc() {
624
+ a.main.stop();
625
+ }
626
+ endProc() {
627
+ a.main.resume();
628
+ }
629
+ // タグ処理
630
+ l(t) {
631
+ return this.#i ? n.posPage === n.lenPage - 1 ? (this.#t(), new I().l(t)) : (_(t, "visible", !0) && a.layMng.breakLine(t), a.layMng.setAllStyle2TxtLay(n.styPaging), a.goTxt(), n.aPage[n.posPage]?.week ? (n.waitRsvEvent4Paging(), !0) : !1) : super.l(t);
632
+ }
633
+ p(t) {
634
+ return this.#i ? n.posPage === n.lenPage - 1 ? (this.#t(), new I().p(t)) : (_(t, "visible", !0) && a.layMng.breakPage(t), a.layMng.setAllStyle2TxtLay(n.styPaging), a.goTxt(), n.waitRsvEvent4Paging(), !0) : super.p(t);
635
+ }
636
+ s(t) {
637
+ return new M(t), !0;
638
+ }
639
+ wait() {
640
+ return !1;
641
+ }
642
+ page(t) {
643
+ const { to: i, style: s, clear: r } = t;
644
+ if (s || r) return !1;
645
+ switch (d.debugLog && console.log(`📜 %cpage() pos:${n.posPage}%c len:${n.lenPage} to:${i}`, "color:#3B0;", ""), i) {
646
+ case "oldest":
647
+ if (n.posPage === 0) return !1;
648
+ n.posPage = 0;
649
+ break;
650
+ case "prev":
651
+ if (n.posPage === 0) return !1;
652
+ --n.posPage;
653
+ break;
654
+ case "next":
655
+ if (n.posPage === n.lenPage - 1) return !1;
656
+ ++n.posPage;
657
+ break;
658
+ case "newest":
659
+ if (n.posPage === n.lenPage - 1) return !1;
660
+ n.posPage = n.lenPage - 1;
661
+ break;
662
+ case "exit":
663
+ n.posPage = n.lenPage - 1;
664
+ break;
665
+ case "load":
666
+ n.lenPage = n.posPage + 1, n.aPage = n.aPage.slice(0, n.lenPage), this.#t();
667
+ break;
668
+ default:
669
+ throw `属性to「${i}」は異常です`;
670
+ }
671
+ n.posPage === n.lenPage - 1 && this.#t();
672
+ const o = n.aPage[n.posPage];
673
+ if (!o) throw `posPage異常:${n.posPage}`;
674
+ const { fn: l, index: c, mark: f } = o;
675
+ if (d.debugLog) {
676
+ const g = a.scrItr.nowMark(), { week: h } = n.aPage[n.posPage] ?? { week: !1 };
677
+ console.log(` -- fn:${l} i:${c} pos:${n.posPage} (base=%c${g.hPages.base.fore.sBkFn}%c 0=%c${g.hPages[0].fore.sBkFn}%c mes=%c${/color: \w+;/.exec(g.hPages.mes.fore.txs.cssText)}%c) week:${h} A:${n.posPage === n.lenPage - 1}
678
+ styPaging=%c${n.styPaging}%c
679
+ mark:%o`, "background-color:#3B0; color:#000;", "", "background-color:#B4F; color:#000;", "", "color:#B68;", "", n.styPaging, "", f);
680
+ }
681
+ return a.scrItr.loadFromMark({ fn: l, index: c }, f);
682
+ }
683
+ #t() {
684
+ a.val.setVal_Nochk("tmp", "const.sn.isPaging", !1), this.#i = !1;
685
+ }
686
+ }
687
+ class a {
688
+ static beginProc(t, i, s = !0, r) {
689
+ if (d.debugLog && console.log(`📖.beginProc id:%c${t}%c onNotify:${i} endProc:${s} onClickSkip:${r}`, "color:#3B0;", ""), this.#i(), this.#s = t, i) {
690
+ const { promise: o, resolve: l } = Promise.withResolvers();
691
+ o.then((c) => {
692
+ d.debugLog && console.log(`📖.callBack id:%c${c}%c`, "color:#3B0;", ""), i(), s ? this.endProc(c) : this.#i();
693
+ }), this.#e = l;
694
+ }
695
+ if (r) {
696
+ const o = () => {
697
+ this.cancelAutoSkip(), r(), s && this.endProc(t);
698
+ };
699
+ this.#t.add(this.main.cvs, x, (l) => {
700
+ l.stopPropagation(), o();
701
+ }), this.#t.add(document, B, (l) => {
702
+ l.isComposing || (l.stopPropagation(), o());
703
+ }), this.procWheel4wle(this.#t, o);
704
+ }
705
+ n.rs.beginProc();
706
+ }
707
+ static #i() {
708
+ this.#s = "", this.#e = () => {
709
+ }, this.#t.clear();
710
+ }
711
+ static #t = new j();
712
+ static #e = () => {
713
+ };
714
+ static notifyEndProc(t) {
715
+ d.debugLog && console.log(`📖.notifyEndProc id:%c${t}%c=${this.#s === t}`, "color:#3B0;", ""), this.#s === t && this.#e(t);
716
+ }
717
+ static endProc(t) {
718
+ d.debugLog && console.log(`📖.endProc id:%c${t}%c=${this.#s === t}`, "color:#3B0;", ""), this.#s === t && (n.rs.endProc(), this.#i());
719
+ }
720
+ static #s = "";
721
+ static get procID() {
722
+ return `RP_${this.scrItr.scriptFn}:${this.scrItr.idxToken}_`;
723
+ }
724
+ static fire(t, i, s = !1) {
725
+ s && this.cancelAutoSkip(), n.rs.fire(t, i);
726
+ }
727
+ static get isSkipping() {
728
+ return n.rs.isSkipping;
729
+ }
730
+ static get isWait() {
731
+ return n.rs.isWait;
732
+ }
733
+ // 予約イベントの発生待ち中か
734
+ static tagL_enabled = !0;
735
+ // 頁末まで一気に読み進むか(l無視)
736
+ static skip_all = !1;
737
+ // falseなら既読のみをスキップ
738
+ static skip_enabled = !1;
739
+ // 次の選択肢(/未読)まで進むが有効か
740
+ static auto_enabled = !1;
741
+ // 自動読みすすみモードかどうか
742
+ static cfg;
743
+ static hTag;
744
+ static main;
745
+ static val;
746
+ static scrItr;
747
+ static layMng;
748
+ static goTxt = () => {
749
+ };
750
+ static get needGoTxt() {
751
+ return this.layMng.needGoTxt;
752
+ }
753
+ static evtMng;
754
+ static sndMng;
755
+ static procWheel4wle;
756
+ static fcs;
757
+ static init(t, i, s, r, o, l, c, f, g) {
758
+ this.cfg = t, this.hTag = i, this.main = s, this.val = r, this.scrItr = o, this.layMng = l, this.goTxt = () => l.goTxt(), this.evtMng = c, this.sndMng = f, this.procWheel4wle = g, r.defTmp("sn.tagL.enabled", () => this.tagL_enabled), r.defValTrg("tmp:sn.tagL.enabled", (h, u) => {
759
+ this.tagL_enabled = String(u) !== "false";
760
+ }), r.defTmp("sn.skip.all", () => this.skip_all), r.defValTrg("tmp:sn.skip.all", (h, u) => {
761
+ this.skip_all = String(u) !== "false";
762
+ }), r.defTmp("sn.skip.enabled", () => this.skip_enabled), r.defValTrg("tmp:sn.skip.enabled", (h, u) => {
763
+ this.skip_enabled = String(u) !== "false";
764
+ }), r.defTmp("sn.auto.enabled", () => this.auto_enabled), r.defValTrg("tmp:sn.auto.enabled", (h, u) => {
765
+ this.auto_enabled = String(u) !== "false";
766
+ }), i.l = (h) => n.rs.l(h), i.p = (h) => n.rs.p(h), i.s = (h) => n.rs.s(h), i.wait = (h) => n.rs.wait(h), i.waitclick = (h) => n.rs.s(h), i.page = (h) => n.rs.page(h), new $(), i.jump({ fn: "main" });
767
+ }
768
+ static setFcs(t) {
769
+ this.fcs = t;
770
+ }
771
+ static cancelAutoSkip() {
772
+ this.tagL_enabled || (this.tagL_enabled = !0, this.val.setVal_Nochk("tmp", "sn.tagL.enabled", !0)), this.skip_enabled && (this.skip_enabled = !1, this.val.setVal_Nochk("tmp", "sn.skip.enabled", !1)), this.auto_enabled && (this.auto_enabled = !1, this.val.setVal_Nochk("tmp", "sn.auto.enabled", !1));
773
+ }
774
+ }
775
+ export {
776
+ E,
777
+ n as R,
778
+ D as T,
779
+ a,
780
+ U as b,
781
+ K as r,
782
+ z as u
783
+ };
784
+ //# sourceMappingURL=Reading.js.map