@famibee/skynovel 1.65.0 → 2.0.1

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