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