@kubohiroya/turbowarp-bubble 0.1.0 → 0.2.0
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/README.md +225 -31
- package/dist/composition.js +696 -625
- package/dist/extension-manifest.json +22 -22
- package/dist/turbowarp-adapter.js +1209 -533
- package/dist/turbowarp-bubble.js +1800 -346
- package/dist/types/composition.d.ts +49 -17
- package/dist/types/turbowarp-adapter.d.ts +10 -2
- package/docs/assets/animation-mode-guide.svg +2 -2
- package/docs/assets/block-quick-start.svg +8 -8
- package/docs/assets/bubble-lifecycle.gif +0 -0
- package/docs/block-manual.ja.md +37 -37
- package/docs/block-manual.md +44 -44
- package/docs/index.html +31 -31
- package/docs/ja/index.html +23 -23
- package/package.json +40 -31
package/dist/composition.js
CHANGED
|
@@ -173,28 +173,28 @@ function b(e) {
|
|
|
173
173
|
}
|
|
174
174
|
//#endregion
|
|
175
175
|
//#region src/actor-transform.ts
|
|
176
|
-
var
|
|
176
|
+
var x = 12, S = 18, ee = Object.freeze({
|
|
177
177
|
x: 0,
|
|
178
178
|
y: 0,
|
|
179
179
|
scalePercent: 100
|
|
180
180
|
});
|
|
181
|
-
function
|
|
181
|
+
function C(e, t) {
|
|
182
182
|
if (typeof e != "number" || !Number.isFinite(e)) throw TypeError(`${t} must be a finite number.`);
|
|
183
183
|
return e;
|
|
184
184
|
}
|
|
185
|
-
function
|
|
186
|
-
let t =
|
|
185
|
+
function w(e) {
|
|
186
|
+
let t = C(e, "Bubble distance");
|
|
187
187
|
if (t < 0) throw TypeError("Bubble distance must be zero or greater.");
|
|
188
188
|
return t;
|
|
189
189
|
}
|
|
190
|
-
function
|
|
191
|
-
let t =
|
|
190
|
+
function te(e) {
|
|
191
|
+
let t = C(e, "Bubble tail length");
|
|
192
192
|
if (t <= 0) throw TypeError("Bubble tail length must be greater than zero.");
|
|
193
193
|
return t;
|
|
194
194
|
}
|
|
195
|
-
function
|
|
195
|
+
function T(e) {
|
|
196
196
|
if (!Array.isArray(e) || e.length !== 2 && e.length !== 3) throw TypeError("Bubble offset must be [x, y] or [x, y, scale].");
|
|
197
|
-
let t =
|
|
197
|
+
let t = C(e[0], "Bubble offset x"), n = C(e[1], "Bubble offset y"), r = C(e.length === 3 ? e[2] : 100, "Bubble offset scale");
|
|
198
198
|
if (r <= 0) throw TypeError("Bubble offset scale must be greater than zero.");
|
|
199
199
|
return Object.freeze({
|
|
200
200
|
x: t,
|
|
@@ -202,7 +202,7 @@ function w(e) {
|
|
|
202
202
|
scalePercent: r
|
|
203
203
|
});
|
|
204
204
|
}
|
|
205
|
-
function
|
|
205
|
+
function ne(e) {
|
|
206
206
|
let t = (e.bounds.left + e.bounds.right) / 2, n = (e.bounds.top + e.bounds.bottom) / 2, r = b(e.direction), i = e.distance + e.tailLength, a = r.x < 0 ? t - e.bounds.left + i + e.bubbleWidth / 2 : e.bounds.right - t + i + e.bubbleWidth / 2, o = r.y < 0 ? n - e.bounds.bottom + i + e.bubbleHeight / 2 : e.bounds.top - n + i + e.bubbleHeight / 2, s = Math.min(r.x === 0 ? Infinity : a / Math.abs(r.x), r.y === 0 ? Infinity : o / Math.abs(r.y));
|
|
207
207
|
return Object.freeze({
|
|
208
208
|
x: t + r.x * s + e.offset.x,
|
|
@@ -211,7 +211,7 @@ function re(e) {
|
|
|
211
211
|
}
|
|
212
212
|
//#endregion
|
|
213
213
|
//#region node_modules/.pnpm/jsclipper@https+++codeload.github.com+platener+jsclipper+tar.gz+56aed19845113e1939d8971c47233054659436b1/node_modules/jsclipper/jsclipper.js
|
|
214
|
-
var
|
|
214
|
+
var re = /* @__PURE__ */ o(((e, t) => {
|
|
215
215
|
(function() {
|
|
216
216
|
var e = {}, n = !1;
|
|
217
217
|
t !== void 0 && t.exports ? (t.exports = e, n = !0) : typeof document < "u" ? window.ClipperLib = e : self.ClipperLib = e;
|
|
@@ -270,14 +270,14 @@ var ie = /* @__PURE__ */ o(((e, t) => {
|
|
|
270
270
|
for (var t = this.t - 1; t >= 0; --t) e[t] = this[t];
|
|
271
271
|
e.t = this.t, e.s = this.s;
|
|
272
272
|
}
|
|
273
|
-
function
|
|
273
|
+
function x(e) {
|
|
274
274
|
this.t = 1, this.s = e < 0 ? -1 : 0, e > 0 ? this[0] = e : e < -1 ? this[0] = e + this.DV : this.t = 0;
|
|
275
275
|
}
|
|
276
|
-
function
|
|
276
|
+
function S(e) {
|
|
277
277
|
var t = l();
|
|
278
278
|
return t.fromInt(e), t;
|
|
279
279
|
}
|
|
280
|
-
function
|
|
280
|
+
function ee(e, t) {
|
|
281
281
|
var n;
|
|
282
282
|
if (t == 16) n = 4;
|
|
283
283
|
else if (t == 8) n = 3;
|
|
@@ -300,10 +300,10 @@ var ie = /* @__PURE__ */ o(((e, t) => {
|
|
|
300
300
|
}
|
|
301
301
|
n == 8 && e[0] & 128 && (this.s = -1, a > 0 && (this[this.t - 1] |= (1 << this.DB - a) - 1 << a)), this.clamp(), i && c.ZERO.subTo(this, this);
|
|
302
302
|
}
|
|
303
|
-
function
|
|
303
|
+
function C() {
|
|
304
304
|
for (var e = this.s & this.DM; this.t > 0 && this[this.t - 1] == e;) --this.t;
|
|
305
305
|
}
|
|
306
|
-
function
|
|
306
|
+
function w(e) {
|
|
307
307
|
if (this.s < 0) return "-" + this.negate().toString(e);
|
|
308
308
|
var t;
|
|
309
309
|
if (e == 16) t = 4;
|
|
@@ -316,14 +316,14 @@ var ie = /* @__PURE__ */ o(((e, t) => {
|
|
|
316
316
|
if (o-- > 0) for (s < this.DB && (r = this[o] >> s) > 0 && (i = !0, a = v(r)); o >= 0;) s < t ? (r = (this[o] & (1 << s) - 1) << t - s, r |= this[--o] >> (s += this.DB - t)) : (r = this[o] >> (s -= t) & n, s <= 0 && (s += this.DB, --o)), r > 0 && (i = !0), i && (a += v(r));
|
|
317
317
|
return i ? a : "0";
|
|
318
318
|
}
|
|
319
|
-
function
|
|
319
|
+
function te() {
|
|
320
320
|
var e = l();
|
|
321
321
|
return c.ZERO.subTo(this, e), e;
|
|
322
322
|
}
|
|
323
|
-
function
|
|
323
|
+
function T() {
|
|
324
324
|
return this.s < 0 ? this.negate() : this;
|
|
325
325
|
}
|
|
326
|
-
function
|
|
326
|
+
function ne(e) {
|
|
327
327
|
var t = this.s - e.s;
|
|
328
328
|
if (t != 0) return t;
|
|
329
329
|
var n = this.t;
|
|
@@ -331,30 +331,30 @@ var ie = /* @__PURE__ */ o(((e, t) => {
|
|
|
331
331
|
for (; --n >= 0;) if ((t = this[n] - e[n]) != 0) return t;
|
|
332
332
|
return 0;
|
|
333
333
|
}
|
|
334
|
-
function
|
|
334
|
+
function re(e) {
|
|
335
335
|
var t = 1, n;
|
|
336
336
|
return (n = e >>> 16) != 0 && (e = n, t += 16), (n = e >> 8) != 0 && (e = n, t += 8), (n = e >> 4) != 0 && (e = n, t += 4), (n = e >> 2) != 0 && (e = n, t += 2), (n = e >> 1) != 0 && (e = n, t += 1), t;
|
|
337
337
|
}
|
|
338
|
-
function
|
|
339
|
-
return this.t <= 0 ? 0 : this.DB * (this.t - 1) +
|
|
338
|
+
function ie() {
|
|
339
|
+
return this.t <= 0 ? 0 : this.DB * (this.t - 1) + re(this[this.t - 1] ^ this.s & this.DM);
|
|
340
340
|
}
|
|
341
|
-
function
|
|
341
|
+
function ae(e, t) {
|
|
342
342
|
var n;
|
|
343
343
|
for (n = this.t - 1; n >= 0; --n) t[n + e] = this[n];
|
|
344
344
|
for (n = e - 1; n >= 0; --n) t[n] = 0;
|
|
345
345
|
t.t = this.t + e, t.s = this.s;
|
|
346
346
|
}
|
|
347
|
-
function
|
|
347
|
+
function E(e, t) {
|
|
348
348
|
for (var n = e; n < this.t; ++n) t[n - e] = this[n];
|
|
349
349
|
t.t = Math.max(this.t - e, 0), t.s = this.s;
|
|
350
350
|
}
|
|
351
|
-
function
|
|
351
|
+
function D(e, t) {
|
|
352
352
|
var n = e % this.DB, r = this.DB - n, i = (1 << r) - 1, a = Math.floor(e / this.DB), o = this.s << n & this.DM, s;
|
|
353
353
|
for (s = this.t - 1; s >= 0; --s) t[s + a + 1] = this[s] >> r | o, o = (this[s] & i) << n;
|
|
354
354
|
for (s = a - 1; s >= 0; --s) t[s] = 0;
|
|
355
355
|
t[a] = o, t.t = this.t + a + 1, t.s = this.s, t.clamp();
|
|
356
356
|
}
|
|
357
|
-
function
|
|
357
|
+
function oe(e, t) {
|
|
358
358
|
t.s = this.s;
|
|
359
359
|
var n = Math.floor(e / this.DB);
|
|
360
360
|
if (n >= this.t) {
|
|
@@ -366,7 +366,7 @@ var ie = /* @__PURE__ */ o(((e, t) => {
|
|
|
366
366
|
for (var o = n + 1; o < this.t; ++o) t[o - n - 1] |= (this[o] & a) << i, t[o - n] = this[o] >> r;
|
|
367
367
|
r > 0 && (t[this.t - n - 1] |= (this.s & a) << i), t.t = this.t - n, t.clamp();
|
|
368
368
|
}
|
|
369
|
-
function
|
|
369
|
+
function O(e, t) {
|
|
370
370
|
for (var n = 0, r = 0, i = Math.min(e.t, this.t); n < i;) r += this[n] - e[n], t[n++] = r & this.DM, r >>= this.DB;
|
|
371
371
|
if (e.t < this.t) {
|
|
372
372
|
for (r -= e.s; n < this.t;) r += this[n], t[n++] = r & this.DM, r >>= this.DB;
|
|
@@ -377,13 +377,13 @@ var ie = /* @__PURE__ */ o(((e, t) => {
|
|
|
377
377
|
}
|
|
378
378
|
t.s = r < 0 ? -1 : 0, r < -1 ? t[n++] = this.DV + r : r > 0 && (t[n++] = r), t.t = n, t.clamp();
|
|
379
379
|
}
|
|
380
|
-
function
|
|
380
|
+
function se(e, t) {
|
|
381
381
|
var n = this.abs(), r = e.abs(), i = n.t;
|
|
382
382
|
for (t.t = i + r.t; --i >= 0;) t[i] = 0;
|
|
383
383
|
for (i = 0; i < r.t; ++i) t[i + n.t] = n.am(0, r[i], t, i, 0, n.t);
|
|
384
384
|
t.s = 0, t.clamp(), this.s != e.s && c.ZERO.subTo(t, t);
|
|
385
385
|
}
|
|
386
|
-
function
|
|
386
|
+
function ce(e) {
|
|
387
387
|
for (var t = this.abs(), n = e.t = 2 * t.t; --n >= 0;) e[n] = 0;
|
|
388
388
|
for (n = 0; n < t.t - 1; ++n) {
|
|
389
389
|
var r = t.am(n, t[n], e, 2 * n, 0, 1);
|
|
@@ -391,7 +391,7 @@ var ie = /* @__PURE__ */ o(((e, t) => {
|
|
|
391
391
|
}
|
|
392
392
|
e.t > 0 && (e[e.t - 1] += t.am(n, t[n], e, 2 * n, 0, 1)), e.s = 0, e.clamp();
|
|
393
393
|
}
|
|
394
|
-
function
|
|
394
|
+
function le(e, t, n) {
|
|
395
395
|
var r = e.abs();
|
|
396
396
|
if (!(r.t <= 0)) {
|
|
397
397
|
var i = this.abs();
|
|
@@ -400,7 +400,7 @@ var ie = /* @__PURE__ */ o(((e, t) => {
|
|
|
400
400
|
return;
|
|
401
401
|
}
|
|
402
402
|
n ??= l();
|
|
403
|
-
var a = l(), o = this.s, s = e.s, u = this.DB -
|
|
403
|
+
var a = l(), o = this.s, s = e.s, u = this.DB - re(r[r.t - 1]);
|
|
404
404
|
u > 0 ? (r.lShiftTo(u, a), i.lShiftTo(u, n)) : (r.copyTo(a), i.copyTo(n));
|
|
405
405
|
var d = a.t, f = a[d - 1];
|
|
406
406
|
if (f != 0) {
|
|
@@ -414,48 +414,48 @@ var ie = /* @__PURE__ */ o(((e, t) => {
|
|
|
414
414
|
}
|
|
415
415
|
}
|
|
416
416
|
}
|
|
417
|
-
function
|
|
417
|
+
function k(e) {
|
|
418
418
|
var t = l();
|
|
419
419
|
return this.abs().divRemTo(e, null, t), this.s < 0 && t.compareTo(c.ZERO) > 0 && e.subTo(t, t), t;
|
|
420
420
|
}
|
|
421
|
-
function
|
|
421
|
+
function A(e) {
|
|
422
422
|
this.m = e;
|
|
423
423
|
}
|
|
424
|
-
function
|
|
424
|
+
function j(e) {
|
|
425
425
|
return e.s < 0 || e.compareTo(this.m) >= 0 ? e.mod(this.m) : e;
|
|
426
426
|
}
|
|
427
|
-
function
|
|
427
|
+
function ue(e) {
|
|
428
428
|
return e;
|
|
429
429
|
}
|
|
430
|
-
function
|
|
430
|
+
function de(e) {
|
|
431
431
|
e.divRemTo(this.m, null, e);
|
|
432
432
|
}
|
|
433
|
-
function
|
|
433
|
+
function fe(e, t, n) {
|
|
434
434
|
e.multiplyTo(t, n), this.reduce(n);
|
|
435
435
|
}
|
|
436
|
-
function
|
|
436
|
+
function pe(e, t) {
|
|
437
437
|
e.squareTo(t), this.reduce(t);
|
|
438
438
|
}
|
|
439
|
-
|
|
440
|
-
function
|
|
439
|
+
A.prototype.convert = j, A.prototype.revert = ue, A.prototype.reduce = de, A.prototype.mulTo = fe, A.prototype.sqrTo = pe;
|
|
440
|
+
function me() {
|
|
441
441
|
if (this.t < 1) return 0;
|
|
442
442
|
var e = this[0];
|
|
443
443
|
if (!(e & 1)) return 0;
|
|
444
444
|
var t = e & 3;
|
|
445
445
|
return t = t * (2 - (e & 15) * t) & 15, t = t * (2 - (e & 255) * t) & 255, t = t * (2 - ((e & 65535) * t & 65535)) & 65535, t = t * (2 - e * t % this.DV) % this.DV, t > 0 ? this.DV - t : -t;
|
|
446
446
|
}
|
|
447
|
-
function
|
|
447
|
+
function M(e) {
|
|
448
448
|
this.m = e, this.mp = e.invDigit(), this.mpl = this.mp & 32767, this.mph = this.mp >> 15, this.um = (1 << e.DB - 15) - 1, this.mt2 = 2 * e.t;
|
|
449
449
|
}
|
|
450
|
-
function
|
|
450
|
+
function he(e) {
|
|
451
451
|
var t = l();
|
|
452
452
|
return e.abs().dlShiftTo(this.m.t, t), t.divRemTo(this.m, null, t), e.s < 0 && t.compareTo(c.ZERO) > 0 && this.m.subTo(t, t), t;
|
|
453
453
|
}
|
|
454
|
-
function
|
|
454
|
+
function ge(e) {
|
|
455
455
|
var t = l();
|
|
456
456
|
return e.copyTo(t), this.reduce(t), t;
|
|
457
457
|
}
|
|
458
|
-
function
|
|
458
|
+
function _e(e) {
|
|
459
459
|
for (; e.t <= this.mt2;) e[e.t++] = 0;
|
|
460
460
|
for (var t = 0; t < this.m.t; ++t) {
|
|
461
461
|
var n = e[t] & 32767, r = n * this.mpl + ((n * this.mph + (e[t] >> 15) * this.mpl & this.um) << 15) & e.DM;
|
|
@@ -463,19 +463,19 @@ var ie = /* @__PURE__ */ o(((e, t) => {
|
|
|
463
463
|
}
|
|
464
464
|
e.clamp(), e.drShiftTo(this.m.t, e), e.compareTo(this.m) >= 0 && e.subTo(this.m, e);
|
|
465
465
|
}
|
|
466
|
-
function
|
|
466
|
+
function ve(e, t) {
|
|
467
467
|
e.squareTo(t), this.reduce(t);
|
|
468
468
|
}
|
|
469
|
-
function
|
|
469
|
+
function ye(e, t, n) {
|
|
470
470
|
e.multiplyTo(t, n), this.reduce(n);
|
|
471
471
|
}
|
|
472
|
-
|
|
473
|
-
function
|
|
472
|
+
M.prototype.convert = he, M.prototype.revert = ge, M.prototype.reduce = _e, M.prototype.mulTo = ye, M.prototype.sqrTo = ve;
|
|
473
|
+
function be() {
|
|
474
474
|
return (this.t > 0 ? this[0] & 1 : this.s) == 0;
|
|
475
475
|
}
|
|
476
|
-
function
|
|
476
|
+
function xe(e, t) {
|
|
477
477
|
if (e > 4294967295 || e < 1) return c.ONE;
|
|
478
|
-
var n = l(), r = l(), i = t.convert(this), a =
|
|
478
|
+
var n = l(), r = l(), i = t.convert(this), a = re(e) - 1;
|
|
479
479
|
for (i.copyTo(n); --a >= 0;) if (t.sqrTo(n, r), (e & 1 << a) > 0) t.mulTo(r, i, n);
|
|
480
480
|
else {
|
|
481
481
|
var o = n;
|
|
@@ -483,16 +483,16 @@ var ie = /* @__PURE__ */ o(((e, t) => {
|
|
|
483
483
|
}
|
|
484
484
|
return t.revert(n);
|
|
485
485
|
}
|
|
486
|
-
function
|
|
487
|
-
var n = e < 256 || t.isEven() ? new
|
|
486
|
+
function Se(e, t) {
|
|
487
|
+
var n = e < 256 || t.isEven() ? new A(t) : new M(t);
|
|
488
488
|
return this.exp(e, n);
|
|
489
489
|
}
|
|
490
|
-
c.prototype.copyTo = b, c.prototype.fromInt =
|
|
491
|
-
function
|
|
490
|
+
c.prototype.copyTo = b, c.prototype.fromInt = x, c.prototype.fromString = ee, c.prototype.clamp = C, c.prototype.dlShiftTo = ae, c.prototype.drShiftTo = E, c.prototype.lShiftTo = D, c.prototype.rShiftTo = oe, c.prototype.subTo = O, c.prototype.multiplyTo = se, c.prototype.squareTo = ce, c.prototype.divRemTo = le, c.prototype.invDigit = me, c.prototype.isEven = be, c.prototype.exp = xe, c.prototype.toString = w, c.prototype.negate = te, c.prototype.abs = T, c.prototype.compareTo = ne, c.prototype.bitLength = ie, c.prototype.mod = k, c.prototype.modPowInt = Se, c.ZERO = S(0), c.ONE = S(1);
|
|
491
|
+
function Ce() {
|
|
492
492
|
var e = l();
|
|
493
493
|
return this.copyTo(e), e;
|
|
494
494
|
}
|
|
495
|
-
function
|
|
495
|
+
function we() {
|
|
496
496
|
if (this.s < 0) {
|
|
497
497
|
if (this.t == 1) return this[0] - this.DV;
|
|
498
498
|
if (this.t == 0) return -1;
|
|
@@ -500,25 +500,25 @@ var ie = /* @__PURE__ */ o(((e, t) => {
|
|
|
500
500
|
else if (this.t == 0) return 0;
|
|
501
501
|
return (this[1] & (1 << 32 - this.DB) - 1) << this.DB | this[0];
|
|
502
502
|
}
|
|
503
|
-
function
|
|
503
|
+
function Te() {
|
|
504
504
|
return this.t == 0 ? this.s : this[0] << 24 >> 24;
|
|
505
505
|
}
|
|
506
|
-
function
|
|
506
|
+
function Ee() {
|
|
507
507
|
return this.t == 0 ? this.s : this[0] << 16 >> 16;
|
|
508
508
|
}
|
|
509
|
-
function
|
|
509
|
+
function De(e) {
|
|
510
510
|
return Math.floor(Math.LN2 * this.DB / Math.log(e));
|
|
511
511
|
}
|
|
512
|
-
function
|
|
512
|
+
function Oe() {
|
|
513
513
|
return this.s < 0 ? -1 : this.t <= 0 || this.t == 1 && this[0] <= 0 ? 0 : 1;
|
|
514
514
|
}
|
|
515
|
-
function
|
|
515
|
+
function N(e) {
|
|
516
516
|
if (e ??= 10, this.signum() == 0 || e < 2 || e > 36) return "0";
|
|
517
|
-
var t = this.chunkSize(e), n = e ** +t, r =
|
|
517
|
+
var t = this.chunkSize(e), n = e ** +t, r = S(n), i = l(), a = l(), o = "";
|
|
518
518
|
for (this.divRemTo(r, i, a); i.signum() > 0;) o = (n + a.intValue()).toString(e).substr(1) + o, i.divRemTo(r, i, a);
|
|
519
519
|
return a.intValue().toString(e) + o;
|
|
520
520
|
}
|
|
521
|
-
function
|
|
521
|
+
function P(e, t) {
|
|
522
522
|
this.fromInt(0), t ??= 10;
|
|
523
523
|
for (var n = this.chunkSize(t), r = t ** +n, i = !1, a = 0, o = 0, s = 0; s < e.length; ++s) {
|
|
524
524
|
var l = y(e, s);
|
|
@@ -530,32 +530,32 @@ var ie = /* @__PURE__ */ o(((e, t) => {
|
|
|
530
530
|
}
|
|
531
531
|
a > 0 && (this.dMultiply(t ** +a), this.dAddOffset(o, 0)), i && c.ZERO.subTo(this, this);
|
|
532
532
|
}
|
|
533
|
-
function
|
|
533
|
+
function ke(e, t, n) {
|
|
534
534
|
if (typeof t == "number") {
|
|
535
535
|
if (e < 2) this.fromInt(1);
|
|
536
|
-
else for (this.fromNumber(e, n), this.testBit(e - 1) || this.bitwiseTo(c.ONE.shiftLeft(e - 1),
|
|
536
|
+
else for (this.fromNumber(e, n), this.testBit(e - 1) || this.bitwiseTo(c.ONE.shiftLeft(e - 1), Le, this), this.isEven() && this.dAddOffset(1, 0); !this.isProbablePrime(t);) this.dAddOffset(2, 0), this.bitLength() > e && this.subTo(c.ONE.shiftLeft(e - 1), this);
|
|
537
537
|
} else {
|
|
538
538
|
var r = [], i = e & 7;
|
|
539
539
|
r.length = (e >> 3) + 1, t.nextBytes(r), i > 0 ? r[0] &= (1 << i) - 1 : r[0] = 0, this.fromString(r, 256);
|
|
540
540
|
}
|
|
541
541
|
}
|
|
542
|
-
function
|
|
542
|
+
function Ae() {
|
|
543
543
|
var e = this.t, t = [];
|
|
544
544
|
t[0] = this.s;
|
|
545
545
|
var n = this.DB - e * this.DB % 8, r, i = 0;
|
|
546
546
|
if (e-- > 0) for (n < this.DB && (r = this[e] >> n) != (this.s & this.DM) >> n && (t[i++] = r | this.s << this.DB - n); e >= 0;) n < 8 ? (r = (this[e] & (1 << n) - 1) << 8 - n, r |= this[--e] >> (n += this.DB - 8)) : (r = this[e] >> (n -= 8) & 255, n <= 0 && (n += this.DB, --e)), r & 128 && (r |= -256), i == 0 && (this.s & 128) != (r & 128) && ++i, (i > 0 || r != this.s) && (t[i++] = r);
|
|
547
547
|
return t;
|
|
548
548
|
}
|
|
549
|
-
function
|
|
549
|
+
function je(e) {
|
|
550
550
|
return this.compareTo(e) == 0;
|
|
551
551
|
}
|
|
552
|
-
function
|
|
552
|
+
function Me(e) {
|
|
553
553
|
return this.compareTo(e) < 0 ? this : e;
|
|
554
554
|
}
|
|
555
|
-
function
|
|
555
|
+
function Ne(e) {
|
|
556
556
|
return this.compareTo(e) > 0 ? this : e;
|
|
557
557
|
}
|
|
558
|
-
function
|
|
558
|
+
function Pe(e, t, n) {
|
|
559
559
|
var r, i, a = Math.min(e.t, this.t);
|
|
560
560
|
for (r = 0; r < a; ++r) n[r] = t(this[r], e[r]);
|
|
561
561
|
if (e.t < this.t) {
|
|
@@ -567,81 +567,81 @@ var ie = /* @__PURE__ */ o(((e, t) => {
|
|
|
567
567
|
}
|
|
568
568
|
n.s = t(this.s, e.s), n.clamp();
|
|
569
569
|
}
|
|
570
|
-
function
|
|
570
|
+
function Fe(e, t) {
|
|
571
571
|
return e & t;
|
|
572
572
|
}
|
|
573
|
-
function
|
|
573
|
+
function Ie(e) {
|
|
574
574
|
var t = l();
|
|
575
|
-
return this.bitwiseTo(e,
|
|
575
|
+
return this.bitwiseTo(e, Fe, t), t;
|
|
576
576
|
}
|
|
577
|
-
function
|
|
577
|
+
function Le(e, t) {
|
|
578
578
|
return e | t;
|
|
579
579
|
}
|
|
580
|
-
function
|
|
580
|
+
function Re(e) {
|
|
581
581
|
var t = l();
|
|
582
|
-
return this.bitwiseTo(e,
|
|
582
|
+
return this.bitwiseTo(e, Le, t), t;
|
|
583
583
|
}
|
|
584
|
-
function
|
|
584
|
+
function ze(e, t) {
|
|
585
585
|
return e ^ t;
|
|
586
586
|
}
|
|
587
|
-
function
|
|
587
|
+
function F(e) {
|
|
588
588
|
var t = l();
|
|
589
|
-
return this.bitwiseTo(e,
|
|
589
|
+
return this.bitwiseTo(e, ze, t), t;
|
|
590
590
|
}
|
|
591
|
-
function
|
|
591
|
+
function I(e, t) {
|
|
592
592
|
return e & ~t;
|
|
593
593
|
}
|
|
594
|
-
function
|
|
594
|
+
function Be(e) {
|
|
595
595
|
var t = l();
|
|
596
|
-
return this.bitwiseTo(e,
|
|
596
|
+
return this.bitwiseTo(e, I, t), t;
|
|
597
597
|
}
|
|
598
|
-
function
|
|
598
|
+
function Ve() {
|
|
599
599
|
for (var e = l(), t = 0; t < this.t; ++t) e[t] = this.DM & ~this[t];
|
|
600
600
|
return e.t = this.t, e.s = ~this.s, e;
|
|
601
601
|
}
|
|
602
|
-
function
|
|
602
|
+
function He(e) {
|
|
603
603
|
var t = l();
|
|
604
604
|
return e < 0 ? this.rShiftTo(-e, t) : this.lShiftTo(e, t), t;
|
|
605
605
|
}
|
|
606
|
-
function
|
|
606
|
+
function Ue(e) {
|
|
607
607
|
var t = l();
|
|
608
608
|
return e < 0 ? this.lShiftTo(-e, t) : this.rShiftTo(e, t), t;
|
|
609
609
|
}
|
|
610
|
-
function
|
|
610
|
+
function We(e) {
|
|
611
611
|
if (e == 0) return -1;
|
|
612
612
|
var t = 0;
|
|
613
613
|
return e & 65535 || (e >>= 16, t += 16), e & 255 || (e >>= 8, t += 8), e & 15 || (e >>= 4, t += 4), e & 3 || (e >>= 2, t += 2), e & 1 || ++t, t;
|
|
614
614
|
}
|
|
615
|
-
function
|
|
616
|
-
for (var e = 0; e < this.t; ++e) if (this[e] != 0) return e * this.DB +
|
|
615
|
+
function Ge() {
|
|
616
|
+
for (var e = 0; e < this.t; ++e) if (this[e] != 0) return e * this.DB + We(this[e]);
|
|
617
617
|
return this.s < 0 ? this.t * this.DB : -1;
|
|
618
618
|
}
|
|
619
|
-
function
|
|
619
|
+
function L(e) {
|
|
620
620
|
for (var t = 0; e != 0;) e &= e - 1, ++t;
|
|
621
621
|
return t;
|
|
622
622
|
}
|
|
623
|
-
function
|
|
624
|
-
for (var e = 0, t = this.s & this.DM, n = 0; n < this.t; ++n) e +=
|
|
623
|
+
function Ke() {
|
|
624
|
+
for (var e = 0, t = this.s & this.DM, n = 0; n < this.t; ++n) e += L(this[n] ^ t);
|
|
625
625
|
return e;
|
|
626
626
|
}
|
|
627
|
-
function
|
|
627
|
+
function qe(e) {
|
|
628
628
|
var t = Math.floor(e / this.DB);
|
|
629
629
|
return t >= this.t ? this.s != 0 : !!(this[t] & 1 << e % this.DB);
|
|
630
630
|
}
|
|
631
|
-
function
|
|
631
|
+
function Je(e, t) {
|
|
632
632
|
var n = c.ONE.shiftLeft(e);
|
|
633
633
|
return this.bitwiseTo(n, t, n), n;
|
|
634
634
|
}
|
|
635
|
-
function
|
|
636
|
-
return this.changeBit(e,
|
|
635
|
+
function Ye(e) {
|
|
636
|
+
return this.changeBit(e, Le);
|
|
637
637
|
}
|
|
638
|
-
function
|
|
639
|
-
return this.changeBit(e,
|
|
638
|
+
function R(e) {
|
|
639
|
+
return this.changeBit(e, I);
|
|
640
640
|
}
|
|
641
|
-
function
|
|
642
|
-
return this.changeBit(e,
|
|
641
|
+
function Xe(e) {
|
|
642
|
+
return this.changeBit(e, ze);
|
|
643
643
|
}
|
|
644
|
-
function
|
|
644
|
+
function Ze(e, t) {
|
|
645
645
|
for (var n = 0, r = 0, i = Math.min(e.t, this.t); n < i;) r += this[n] + e[n], t[n++] = r & this.DM, r >>= this.DB;
|
|
646
646
|
if (e.t < this.t) {
|
|
647
647
|
for (r += e.s; n < this.t;) r += this[n], t[n++] = r & this.DM, r >>= this.DB;
|
|
@@ -652,58 +652,58 @@ var ie = /* @__PURE__ */ o(((e, t) => {
|
|
|
652
652
|
}
|
|
653
653
|
t.s = r < 0 ? -1 : 0, r > 0 ? t[n++] = r : r < -1 && (t[n++] = this.DV + r), t.t = n, t.clamp();
|
|
654
654
|
}
|
|
655
|
-
function
|
|
655
|
+
function Qe(e) {
|
|
656
656
|
var t = l();
|
|
657
657
|
return this.addTo(e, t), t;
|
|
658
658
|
}
|
|
659
|
-
function
|
|
659
|
+
function $e(e) {
|
|
660
660
|
var t = l();
|
|
661
661
|
return this.subTo(e, t), t;
|
|
662
662
|
}
|
|
663
|
-
function
|
|
663
|
+
function et(e) {
|
|
664
664
|
var t = l();
|
|
665
665
|
return this.multiplyTo(e, t), t;
|
|
666
666
|
}
|
|
667
|
-
function
|
|
667
|
+
function tt() {
|
|
668
668
|
var e = l();
|
|
669
669
|
return this.squareTo(e), e;
|
|
670
670
|
}
|
|
671
|
-
function
|
|
671
|
+
function nt(e) {
|
|
672
672
|
var t = l();
|
|
673
673
|
return this.divRemTo(e, t, null), t;
|
|
674
674
|
}
|
|
675
|
-
function
|
|
675
|
+
function rt(e) {
|
|
676
676
|
var t = l();
|
|
677
677
|
return this.divRemTo(e, null, t), t;
|
|
678
678
|
}
|
|
679
|
-
function
|
|
679
|
+
function it(e) {
|
|
680
680
|
var t = l(), n = l();
|
|
681
681
|
return this.divRemTo(e, t, n), [t, n];
|
|
682
682
|
}
|
|
683
|
-
function
|
|
683
|
+
function at(e) {
|
|
684
684
|
this[this.t] = this.am(0, e - 1, this, 0, 0, this.t), ++this.t, this.clamp();
|
|
685
685
|
}
|
|
686
|
-
function
|
|
686
|
+
function ot(e, t) {
|
|
687
687
|
if (e != 0) {
|
|
688
688
|
for (; this.t <= t;) this[this.t++] = 0;
|
|
689
689
|
for (this[t] += e; this[t] >= this.DV;) this[t] -= this.DV, ++t >= this.t && (this[this.t++] = 0), ++this[t];
|
|
690
690
|
}
|
|
691
691
|
}
|
|
692
|
-
function
|
|
693
|
-
function
|
|
692
|
+
function z() {}
|
|
693
|
+
function st(e) {
|
|
694
694
|
return e;
|
|
695
695
|
}
|
|
696
|
-
function
|
|
696
|
+
function ct(e, t, n) {
|
|
697
697
|
e.multiplyTo(t, n);
|
|
698
698
|
}
|
|
699
|
-
function
|
|
699
|
+
function lt(e, t) {
|
|
700
700
|
e.squareTo(t);
|
|
701
701
|
}
|
|
702
|
-
|
|
703
|
-
function
|
|
704
|
-
return this.exp(e, new
|
|
702
|
+
z.prototype.convert = st, z.prototype.revert = st, z.prototype.mulTo = ct, z.prototype.sqrTo = lt;
|
|
703
|
+
function ut(e) {
|
|
704
|
+
return this.exp(e, new z());
|
|
705
705
|
}
|
|
706
|
-
function
|
|
706
|
+
function dt(e, t, n) {
|
|
707
707
|
var r = Math.min(this.t + e.t, t);
|
|
708
708
|
for (n.s = 0, n.t = r; r > 0;) n[--r] = 0;
|
|
709
709
|
var i;
|
|
@@ -711,14 +711,14 @@ var ie = /* @__PURE__ */ o(((e, t) => {
|
|
|
711
711
|
for (i = Math.min(e.t, t); r < i; ++r) this.am(0, e[r], n, r, 0, t - r);
|
|
712
712
|
n.clamp();
|
|
713
713
|
}
|
|
714
|
-
function
|
|
714
|
+
function ft(e, t, n) {
|
|
715
715
|
--t;
|
|
716
716
|
var r = n.t = this.t + e.t - t;
|
|
717
717
|
for (n.s = 0; --r >= 0;) n[r] = 0;
|
|
718
718
|
for (r = Math.max(t - this.t, 0); r < e.t; ++r) n[this.t + r - t] = this.am(t - r, e[r], n, 0, 0, this.t + r - t);
|
|
719
719
|
n.clamp(), n.drShiftTo(1, n);
|
|
720
720
|
}
|
|
721
|
-
function
|
|
721
|
+
function pt(e) {
|
|
722
722
|
this.r2 = l(), this.q3 = l(), c.ONE.dlShiftTo(2 * e.t, this.r2), this.mu = this.r2.divide(e), this.m = e;
|
|
723
723
|
}
|
|
724
724
|
function mt(e) {
|
|
@@ -740,18 +740,18 @@ var ie = /* @__PURE__ */ o(((e, t) => {
|
|
|
740
740
|
function vt(e, t, n) {
|
|
741
741
|
e.multiplyTo(t, n), this.reduce(n);
|
|
742
742
|
}
|
|
743
|
-
|
|
743
|
+
pt.prototype.convert = mt, pt.prototype.revert = ht, pt.prototype.reduce = gt, pt.prototype.mulTo = vt, pt.prototype.sqrTo = _t;
|
|
744
744
|
function yt(e, t) {
|
|
745
|
-
var n = e.bitLength(), r, i =
|
|
745
|
+
var n = e.bitLength(), r, i = S(1), a;
|
|
746
746
|
if (n <= 0) return i;
|
|
747
|
-
r = n < 18 ? 1 : n < 48 ? 3 : n < 144 ? 4 : n < 768 ? 5 : 6, a = n < 8 ? new
|
|
747
|
+
r = n < 18 ? 1 : n < 48 ? 3 : n < 144 ? 4 : n < 768 ? 5 : 6, a = n < 8 ? new A(t) : t.isEven() ? new pt(t) : new M(t);
|
|
748
748
|
var o = [], s = 3, c = r - 1, u = (1 << r) - 1;
|
|
749
749
|
if (o[1] = a.convert(this), r > 1) {
|
|
750
750
|
var d = l();
|
|
751
751
|
for (a.sqrTo(o[1], d); s <= u;) o[s] = l(), a.mulTo(d, o[s - 2], o[s]), s += 2;
|
|
752
752
|
}
|
|
753
753
|
var f = e.t - 1, p, m = !0, h = l(), g;
|
|
754
|
-
for (n =
|
|
754
|
+
for (n = re(e[f]) - 1; f >= 0;) {
|
|
755
755
|
for (n >= c ? p = e[f] >> n - c & u : (p = (e[f] & (1 << n + 1) - 1) << c - n, f > 0 && (p |= e[f - 1] >> this.DB + n - c)), s = r; !(p & 1);) p >>= 1, --s;
|
|
756
756
|
if ((n -= s) < 0 && (n += this.DB, --f), m) o[p].copyTo(i), m = !1;
|
|
757
757
|
else {
|
|
@@ -773,7 +773,7 @@ var ie = /* @__PURE__ */ o(((e, t) => {
|
|
|
773
773
|
for (i < a && (a = i), a > 0 && (t.rShiftTo(a, t), n.rShiftTo(a, n)); t.signum() > 0;) (i = t.getLowestSetBit()) > 0 && t.rShiftTo(i, t), (i = n.getLowestSetBit()) > 0 && n.rShiftTo(i, n), t.compareTo(n) >= 0 ? (t.subTo(n, t), t.rShiftTo(1, t)) : (n.subTo(t, n), n.rShiftTo(1, n));
|
|
774
774
|
return a > 0 && n.lShiftTo(a, n), n;
|
|
775
775
|
}
|
|
776
|
-
function
|
|
776
|
+
function xt(e) {
|
|
777
777
|
if (e <= 0) return 0;
|
|
778
778
|
var t = this.DV % e, n = this.s < 0 ? e - 1 : 0;
|
|
779
779
|
if (this.t > 0) {
|
|
@@ -782,10 +782,10 @@ var ie = /* @__PURE__ */ o(((e, t) => {
|
|
|
782
782
|
}
|
|
783
783
|
return n;
|
|
784
784
|
}
|
|
785
|
-
function
|
|
785
|
+
function St(e) {
|
|
786
786
|
var t = e.isEven();
|
|
787
787
|
if (this.isEven() && t || e.signum() == 0) return c.ZERO;
|
|
788
|
-
for (var n = e.clone(), r = this.clone(), i =
|
|
788
|
+
for (var n = e.clone(), r = this.clone(), i = S(1), a = S(0), o = S(0), s = S(1); n.signum() != 0;) {
|
|
789
789
|
for (; n.isEven();) n.rShiftTo(1, n), t ? ((!i.isEven() || !a.isEven()) && (i.addTo(this, i), a.subTo(e, a)), i.rShiftTo(1, i)) : a.isEven() || a.subTo(e, a), a.rShiftTo(1, a);
|
|
790
790
|
for (; r.isEven();) r.rShiftTo(1, r), t ? ((!o.isEven() || !s.isEven()) && (o.addTo(this, o), s.subTo(e, s)), o.rShiftTo(1, o)) : s.isEven() || s.subTo(e, s), s.rShiftTo(1, s);
|
|
791
791
|
n.compareTo(r) >= 0 ? (n.subTo(r, n), t && i.subTo(o, i), a.subTo(s, a)) : (r.subTo(n, r), t && o.subTo(i, o), s.subTo(a, s));
|
|
@@ -796,7 +796,7 @@ var ie = /* @__PURE__ */ o(((e, t) => {
|
|
|
796
796
|
else return s;
|
|
797
797
|
return s.signum() < 0 ? s.add(e) : s;
|
|
798
798
|
}
|
|
799
|
-
var
|
|
799
|
+
var B = [
|
|
800
800
|
2,
|
|
801
801
|
3,
|
|
802
802
|
5,
|
|
@@ -965,27 +965,27 @@ var ie = /* @__PURE__ */ o(((e, t) => {
|
|
|
965
965
|
983,
|
|
966
966
|
991,
|
|
967
967
|
997
|
|
968
|
-
],
|
|
969
|
-
function
|
|
968
|
+
], V = (1 << 26) / B[B.length - 1];
|
|
969
|
+
function Ct(e) {
|
|
970
970
|
var t, n = this.abs();
|
|
971
|
-
if (n.t == 1 && n[0] <=
|
|
972
|
-
for (t = 0; t <
|
|
971
|
+
if (n.t == 1 && n[0] <= B[B.length - 1]) {
|
|
972
|
+
for (t = 0; t < B.length; ++t) if (n[0] == B[t]) return !0;
|
|
973
973
|
return !1;
|
|
974
974
|
}
|
|
975
975
|
if (n.isEven()) return !1;
|
|
976
|
-
for (t = 1; t <
|
|
977
|
-
for (var r =
|
|
978
|
-
for (r = n.modInt(r); t < i;) if (r %
|
|
976
|
+
for (t = 1; t < B.length;) {
|
|
977
|
+
for (var r = B[t], i = t + 1; i < B.length && r < V;) r *= B[i++];
|
|
978
|
+
for (r = n.modInt(r); t < i;) if (r % B[t++] == 0) return !1;
|
|
979
979
|
}
|
|
980
980
|
return n.millerRabin(e);
|
|
981
981
|
}
|
|
982
|
-
function
|
|
982
|
+
function wt(e) {
|
|
983
983
|
var t = this.subtract(c.ONE), n = t.getLowestSetBit();
|
|
984
984
|
if (n <= 0) return !1;
|
|
985
985
|
var r = t.shiftRight(n);
|
|
986
|
-
e = e + 1 >> 1, e >
|
|
986
|
+
e = e + 1 >> 1, e > B.length && (e = B.length);
|
|
987
987
|
for (var i = l(), a = 0; a < e; ++a) {
|
|
988
|
-
i.fromInt(
|
|
988
|
+
i.fromInt(B[Math.floor(Math.random() * B.length)]);
|
|
989
989
|
var o = i.modPow(r, this);
|
|
990
990
|
if (o.compareTo(c.ONE) != 0 && o.compareTo(t) != 0) {
|
|
991
991
|
for (var s = 1; s++ < n && o.compareTo(t) != 0;) if (o = o.modPowInt(2, this), o.compareTo(c.ONE) == 0) return !1;
|
|
@@ -994,29 +994,29 @@ var ie = /* @__PURE__ */ o(((e, t) => {
|
|
|
994
994
|
}
|
|
995
995
|
return !0;
|
|
996
996
|
}
|
|
997
|
-
c.prototype.chunkSize =
|
|
998
|
-
var
|
|
999
|
-
if (
|
|
1000
|
-
return this.compareTo(
|
|
1001
|
-
},
|
|
997
|
+
c.prototype.chunkSize = De, c.prototype.toRadix = N, c.prototype.fromRadix = P, c.prototype.fromNumber = ke, c.prototype.bitwiseTo = Pe, c.prototype.changeBit = Je, c.prototype.addTo = Ze, c.prototype.dMultiply = at, c.prototype.dAddOffset = ot, c.prototype.multiplyLowerTo = dt, c.prototype.multiplyUpperTo = ft, c.prototype.modInt = xt, c.prototype.millerRabin = wt, c.prototype.clone = Ce, c.prototype.intValue = we, c.prototype.byteValue = Te, c.prototype.shortValue = Ee, c.prototype.signum = Oe, c.prototype.toByteArray = Ae, c.prototype.equals = je, c.prototype.min = Me, c.prototype.max = Ne, c.prototype.and = Ie, c.prototype.or = Re, c.prototype.xor = F, c.prototype.andNot = Be, c.prototype.not = Ve, c.prototype.shiftLeft = He, c.prototype.shiftRight = Ue, c.prototype.getLowestSetBit = Ge, c.prototype.bitCount = Ke, c.prototype.testBit = qe, c.prototype.setBit = Ye, c.prototype.clearBit = R, c.prototype.flipBit = Xe, c.prototype.add = Qe, c.prototype.subtract = $e, c.prototype.multiply = et, c.prototype.divide = nt, c.prototype.remainder = rt, c.prototype.divideAndRemainder = it, c.prototype.modPow = yt, c.prototype.modInverse = St, c.prototype.pow = ut, c.prototype.gcd = bt, c.prototype.isProbablePrime = Ct, c.prototype.square = tt;
|
|
998
|
+
var H = c;
|
|
999
|
+
if (H.prototype.IsNegative = function() {
|
|
1000
|
+
return this.compareTo(H.ZERO) == -1;
|
|
1001
|
+
}, H.op_Equality = function(e, t) {
|
|
1002
1002
|
return e.compareTo(t) == 0;
|
|
1003
|
-
},
|
|
1003
|
+
}, H.op_Inequality = function(e, t) {
|
|
1004
1004
|
return e.compareTo(t) != 0;
|
|
1005
|
-
},
|
|
1005
|
+
}, H.op_GreaterThan = function(e, t) {
|
|
1006
1006
|
return e.compareTo(t) > 0;
|
|
1007
|
-
},
|
|
1007
|
+
}, H.op_LessThan = function(e, t) {
|
|
1008
1008
|
return e.compareTo(t) < 0;
|
|
1009
|
-
},
|
|
1010
|
-
return new
|
|
1011
|
-
},
|
|
1012
|
-
return new
|
|
1013
|
-
},
|
|
1014
|
-
return new
|
|
1015
|
-
},
|
|
1009
|
+
}, H.op_Addition = function(e, t) {
|
|
1010
|
+
return new H(e).add(new H(t));
|
|
1011
|
+
}, H.op_Subtraction = function(e, t) {
|
|
1012
|
+
return new H(e).subtract(new H(t));
|
|
1013
|
+
}, H.Int128Mul = function(e, t) {
|
|
1014
|
+
return new H(e).multiply(new H(t));
|
|
1015
|
+
}, H.op_Division = function(e, t) {
|
|
1016
1016
|
return e.divide(t);
|
|
1017
|
-
},
|
|
1017
|
+
}, H.prototype.ToDouble = function() {
|
|
1018
1018
|
return parseFloat(this.toString());
|
|
1019
|
-
},
|
|
1019
|
+
}, Tt === void 0) var Tt = function(e, t) {
|
|
1020
1020
|
var n;
|
|
1021
1021
|
if (Object.getOwnPropertyNames === void 0) {
|
|
1022
1022
|
for (n in t.prototype) (e.prototype[n] === void 0 || e.prototype[n] == Object.prototype[n]) && (e.prototype[n] = t.prototype[n]);
|
|
@@ -1072,7 +1072,7 @@ var ie = /* @__PURE__ */ o(((e, t) => {
|
|
|
1072
1072
|
return this.m_Childs.length > 0 ? this.m_Childs[0] : null;
|
|
1073
1073
|
}, e.PolyTree.prototype.Total = function() {
|
|
1074
1074
|
return this.m_AllPolys.length;
|
|
1075
|
-
},
|
|
1075
|
+
}, Tt(e.PolyTree, e.PolyNode), e.Math_Abs_Int64 = e.Math_Abs_Int32 = e.Math_Abs_Double = function(e) {
|
|
1076
1076
|
return Math.abs(e);
|
|
1077
1077
|
}, e.Math_Max_Int32_Int32 = function(e, t) {
|
|
1078
1078
|
return Math.max(e, t);
|
|
@@ -1185,7 +1185,7 @@ var ie = /* @__PURE__ */ o(((e, t) => {
|
|
|
1185
1185
|
} while (r != n);
|
|
1186
1186
|
return !1;
|
|
1187
1187
|
}, e.ClipperBase.prototype.PointOnLineSegment = function(e, t, n, r) {
|
|
1188
|
-
return r ? e.X == t.X && e.Y == t.Y || e.X == n.X && e.Y == n.Y || e.X > t.X == e.X < n.X && e.Y > t.Y == e.Y < n.Y &&
|
|
1188
|
+
return r ? e.X == t.X && e.Y == t.Y || e.X == n.X && e.Y == n.Y || e.X > t.X == e.X < n.X && e.Y > t.Y == e.Y < n.Y && H.op_Equality(H.Int128Mul(e.X - t.X, n.Y - t.Y), H.Int128Mul(n.X - t.X, e.Y - t.Y)) : e.X == t.X && e.Y == t.Y || e.X == n.X && e.Y == n.Y || e.X > t.X == e.X < n.X && e.Y > t.Y == e.Y < n.Y && (e.X - t.X) * (n.Y - t.Y) == (n.X - t.X) * (e.Y - t.Y);
|
|
1189
1189
|
}, e.ClipperBase.prototype.PointOnPolygon = function(e, t, n) {
|
|
1190
1190
|
for (var r = t;;) {
|
|
1191
1191
|
if (this.PointOnLineSegment(e, r.Pt, r.Next.Pt, n)) return !0;
|
|
@@ -1194,13 +1194,13 @@ var ie = /* @__PURE__ */ o(((e, t) => {
|
|
|
1194
1194
|
return !1;
|
|
1195
1195
|
}, e.ClipperBase.prototype.SlopesEqual = e.ClipperBase.SlopesEqual = function() {
|
|
1196
1196
|
var t = arguments, n = t.length, r, i, a, o, s, c, l;
|
|
1197
|
-
return n == 3 ? (r = t[0], i = t[1], l = t[2], l ?
|
|
1197
|
+
return n == 3 ? (r = t[0], i = t[1], l = t[2], l ? H.op_Equality(H.Int128Mul(r.Delta.Y, i.Delta.X), H.Int128Mul(r.Delta.X, i.Delta.Y)) : e.Cast_Int64(r.Delta.Y * i.Delta.X) == e.Cast_Int64(r.Delta.X * i.Delta.Y)) : n == 4 ? (a = t[0], o = t[1], s = t[2], l = t[3], l ? H.op_Equality(H.Int128Mul(a.Y - o.Y, o.X - s.X), H.Int128Mul(a.X - o.X, o.Y - s.Y)) : e.Cast_Int64((a.Y - o.Y) * (o.X - s.X)) - e.Cast_Int64((a.X - o.X) * (o.Y - s.Y)) === 0) : (a = t[0], o = t[1], s = t[2], c = t[3], l = t[4], l ? H.op_Equality(H.Int128Mul(a.Y - o.Y, s.X - c.X), H.Int128Mul(a.X - o.X, s.Y - c.Y)) : e.Cast_Int64((a.Y - o.Y) * (s.X - c.X)) - e.Cast_Int64((a.X - o.X) * (s.Y - c.Y)) === 0);
|
|
1198
1198
|
}, e.ClipperBase.SlopesEqual3 = function(t, n, r) {
|
|
1199
|
-
return r ?
|
|
1199
|
+
return r ? H.op_Equality(H.Int128Mul(t.Delta.Y, n.Delta.X), H.Int128Mul(t.Delta.X, n.Delta.Y)) : e.Cast_Int64(t.Delta.Y * n.Delta.X) == e.Cast_Int64(t.Delta.X * n.Delta.Y);
|
|
1200
1200
|
}, e.ClipperBase.SlopesEqual4 = function(t, n, r, i) {
|
|
1201
|
-
return i ?
|
|
1201
|
+
return i ? H.op_Equality(H.Int128Mul(t.Y - n.Y, n.X - r.X), H.Int128Mul(t.X - n.X, n.Y - r.Y)) : e.Cast_Int64((t.Y - n.Y) * (n.X - r.X)) - e.Cast_Int64((t.X - n.X) * (n.Y - r.Y)) === 0;
|
|
1202
1202
|
}, e.ClipperBase.SlopesEqual5 = function(t, n, r, i, a) {
|
|
1203
|
-
return a ?
|
|
1203
|
+
return a ? H.op_Equality(H.Int128Mul(t.Y - n.Y, r.X - i.X), H.Int128Mul(t.X - n.X, r.Y - i.Y)) : e.Cast_Int64((t.Y - n.Y) * (r.X - i.X)) - e.Cast_Int64((t.X - n.X) * (r.Y - i.Y)) === 0;
|
|
1204
1204
|
}, e.ClipperBase.prototype.Clear = function() {
|
|
1205
1205
|
this.DisposeLocalMinimaList();
|
|
1206
1206
|
for (var t = 0, n = this.m_edges.length; t < n; ++t) {
|
|
@@ -1878,16 +1878,16 @@ var ie = /* @__PURE__ */ o(((e, t) => {
|
|
|
1878
1878
|
}
|
|
1879
1879
|
this.m_IntersectList.length = 0;
|
|
1880
1880
|
};
|
|
1881
|
-
var
|
|
1881
|
+
var Et = function(e) {
|
|
1882
1882
|
return e < 0 ? Math.ceil(e - .5) : Math.round(e);
|
|
1883
|
-
}, Et = function(e) {
|
|
1884
|
-
return e < 0 ? Math.ceil(e - .5) : Math.floor(e + .5);
|
|
1885
1883
|
}, Dt = function(e) {
|
|
1886
|
-
return e < 0 ?
|
|
1884
|
+
return e < 0 ? Math.ceil(e - .5) : Math.floor(e + .5);
|
|
1887
1885
|
}, Ot = function(e) {
|
|
1886
|
+
return e < 0 ? -Math.round(Math.abs(e)) : Math.round(e);
|
|
1887
|
+
}, kt = function(e) {
|
|
1888
1888
|
return e < 0 ? (e -= .5, e < -2147483648 ? Math.ceil(e) : e | 0) : (e += .5, e > 2147483647 ? Math.floor(e) : e | 0);
|
|
1889
1889
|
};
|
|
1890
|
-
a.msie ? e.Clipper.Round =
|
|
1890
|
+
a.msie ? e.Clipper.Round = Et : a.chromium ? e.Clipper.Round = Ot : a.safari ? e.Clipper.Round = kt : e.Clipper.Round = Dt, e.Clipper.TopX = function(t, n) {
|
|
1891
1891
|
return n == t.Top.Y ? t.Top.X : t.Bot.X + e.Clipper.Round(t.Dx * (n - t.Bot.Y));
|
|
1892
1892
|
}, e.Clipper.prototype.IntersectPoint = function(t, n, r) {
|
|
1893
1893
|
r.X = 0, r.Y = 0;
|
|
@@ -2265,7 +2265,7 @@ var ie = /* @__PURE__ */ o(((e, t) => {
|
|
|
2265
2265
|
}, e.Clipper.ClosedPathsFromPolyTree = function(t) {
|
|
2266
2266
|
var n = new e.Paths();
|
|
2267
2267
|
return e.Clipper.AddPolyNodeToPaths(t, e.Clipper.NodeType.ntClosed, n), n;
|
|
2268
|
-
},
|
|
2268
|
+
}, Tt(e.Clipper, e.ClipperBase), e.Clipper.NodeType = {
|
|
2269
2269
|
ntAny: 0,
|
|
2270
2270
|
ntOpen: 1,
|
|
2271
2271
|
ntClosed: 2
|
|
@@ -2461,13 +2461,13 @@ var ie = /* @__PURE__ */ o(((e, t) => {
|
|
|
2461
2461
|
if (typeof n != "number" || n === null) return e.Error("Tolerance is not a number in Lighten()."), e.JS.Clone(t);
|
|
2462
2462
|
if (t.length === 0 || t.length == 1 && t[0].length === 0 || n < 0) return e.JS.Clone(t);
|
|
2463
2463
|
t[0] instanceof Array || (t = [t]);
|
|
2464
|
-
var r, i, a, o, s, c, l, u, d, f, p, m, h, g, _, v, y, b = t.length,
|
|
2464
|
+
var r, i, a, o, s, c, l, u, d, f, p, m, h, g, _, v, y, b = t.length, x = n * n, S = [];
|
|
2465
2465
|
for (r = 0; r < b; r++) if (a = t[r], c = a.length, c != 0) {
|
|
2466
2466
|
for (o = 0; o < 1e6; o++) {
|
|
2467
2467
|
for (s = [], c = a.length, a[c - 1].X != a[0].X || a[c - 1].Y != a[0].Y ? (m = 1, a.push({
|
|
2468
2468
|
X: a[0].X,
|
|
2469
2469
|
Y: a[0].Y
|
|
2470
|
-
}), c = a.length) : m = 0, p = [], i = 0; i < c - 2; i++) l = a[i], d = a[i + 1], u = a[i + 2], v = l.X, y = l.Y, h = u.X - v, g = u.Y - y, (h !== 0 || g !== 0) && (_ = ((d.X - v) * h + (d.Y - y) * g) / (h * h + g * g), _ > 1 ? (v = u.X, y = u.Y) : _ > 0 && (v += h * _, y += g * _)), h = d.X - v, g = d.Y - y, f = h * h + g * g, f <=
|
|
2470
|
+
}), c = a.length) : m = 0, p = [], i = 0; i < c - 2; i++) l = a[i], d = a[i + 1], u = a[i + 2], v = l.X, y = l.Y, h = u.X - v, g = u.Y - y, (h !== 0 || g !== 0) && (_ = ((d.X - v) * h + (d.Y - y) * g) / (h * h + g * g), _ > 1 ? (v = u.X, y = u.Y) : _ > 0 && (v += h * _, y += g * _)), h = d.X - v, g = d.Y - y, f = h * h + g * g, f <= x && (p[i + 1] = 1, i++);
|
|
2471
2471
|
for (s.push({
|
|
2472
2472
|
X: a[0].X,
|
|
2473
2473
|
Y: a[0].Y
|
|
@@ -2481,9 +2481,9 @@ var ie = /* @__PURE__ */ o(((e, t) => {
|
|
|
2481
2481
|
}), m && a.pop(), p.length) a = s;
|
|
2482
2482
|
else break;
|
|
2483
2483
|
}
|
|
2484
|
-
c = s.length, s[c - 1].X == s[0].X && s[c - 1].Y == s[0].Y && s.pop(), s.length > 2 &&
|
|
2484
|
+
c = s.length, s[c - 1].X == s[0].X && s[c - 1].Y == s[0].Y && s.pop(), s.length > 2 && S.push(s);
|
|
2485
2485
|
}
|
|
2486
|
-
return !t[0] instanceof Array && (
|
|
2486
|
+
return !t[0] instanceof Array && (S = S[0]), S === void 0 && (S = [[]]), S;
|
|
2487
2487
|
}, e.JS.PerimeterOfPath = function(e, t, n) {
|
|
2488
2488
|
if (e === void 0) return 0;
|
|
2489
2489
|
var r = Math.sqrt, i = 0, a, o, s = 0, c = 0, l = 0, u = 0, d = e.length;
|
|
@@ -2528,8 +2528,8 @@ var ie = /* @__PURE__ */ o(((e, t) => {
|
|
|
2528
2528
|
return n;
|
|
2529
2529
|
};
|
|
2530
2530
|
})();
|
|
2531
|
-
})),
|
|
2532
|
-
var n =
|
|
2531
|
+
})), ie = /* @__PURE__ */ c((/* @__PURE__ */ o(((e, t) => {
|
|
2532
|
+
var n = re(), r = 10 ** 5;
|
|
2533
2533
|
function i(e) {
|
|
2534
2534
|
return e.map(function(e) {
|
|
2535
2535
|
return {
|
|
@@ -2714,16 +2714,16 @@ var ie = /* @__PURE__ */ o(((e, t) => {
|
|
|
2714
2714
|
Polygon: _,
|
|
2715
2715
|
ClipperLib: n
|
|
2716
2716
|
};
|
|
2717
|
-
})))(), 1),
|
|
2717
|
+
})))(), 1), ae = 18, E = Object.freeze({
|
|
2718
2718
|
x: 0,
|
|
2719
2719
|
y: 0,
|
|
2720
2720
|
scalePercent: 100
|
|
2721
2721
|
});
|
|
2722
|
-
function
|
|
2722
|
+
function D(e) {
|
|
2723
2723
|
if (typeof e != "number" || !Number.isFinite(e) || e <= 0) throw TypeError("Bubble tail length must be greater than zero.");
|
|
2724
2724
|
return e;
|
|
2725
2725
|
}
|
|
2726
|
-
function
|
|
2726
|
+
function oe(e) {
|
|
2727
2727
|
if (e.length !== 2 && e.length !== 3) throw TypeError("Bubble offset must be [x, y] or [x, y, scale].");
|
|
2728
2728
|
let [t, n, r = 100] = e;
|
|
2729
2729
|
if (![
|
|
@@ -2737,7 +2737,7 @@ function se(e) {
|
|
|
2737
2737
|
scalePercent: r
|
|
2738
2738
|
});
|
|
2739
2739
|
}
|
|
2740
|
-
var
|
|
2740
|
+
var O = Object.freeze([
|
|
2741
2741
|
"NORMAL",
|
|
2742
2742
|
"THINKING",
|
|
2743
2743
|
"DREAMING",
|
|
@@ -2749,21 +2749,21 @@ var D = Object.freeze([
|
|
|
2749
2749
|
"NARRATION",
|
|
2750
2750
|
"NO_BUBBLE"
|
|
2751
2751
|
]);
|
|
2752
|
-
function
|
|
2752
|
+
function se(e) {
|
|
2753
2753
|
return e.replaceAll("&", "&").replaceAll("<", "<").replaceAll(">", ">").replaceAll("\"", """).replaceAll("'", "'");
|
|
2754
2754
|
}
|
|
2755
|
-
function
|
|
2755
|
+
function ce(e, t) {
|
|
2756
2756
|
let n = e ?? t;
|
|
2757
2757
|
if (!Number.isFinite(n) || n <= 0) throw TypeError("Bubble SVG dimensions must be positive and finite.");
|
|
2758
2758
|
return n;
|
|
2759
2759
|
}
|
|
2760
|
-
function
|
|
2760
|
+
function le(e) {
|
|
2761
2761
|
if (e === null) return null;
|
|
2762
2762
|
let t = e ?? 180;
|
|
2763
2763
|
if (!Number.isFinite(t)) throw TypeError("tailDirection must be finite.");
|
|
2764
2764
|
return (t % 360 + 360) % 360;
|
|
2765
2765
|
}
|
|
2766
|
-
function
|
|
2766
|
+
function k(e, t, n = 18) {
|
|
2767
2767
|
let r = e - 24, i = t - 24;
|
|
2768
2768
|
return [
|
|
2769
2769
|
{
|
|
@@ -2794,24 +2794,24 @@ function O(e, t, n = 18) {
|
|
|
2794
2794
|
};
|
|
2795
2795
|
}));
|
|
2796
2796
|
}
|
|
2797
|
-
function
|
|
2797
|
+
function A(e, t) {
|
|
2798
2798
|
return e.x * t.y - e.y * t.x;
|
|
2799
2799
|
}
|
|
2800
|
-
function
|
|
2800
|
+
function j(e, t) {
|
|
2801
2801
|
return {
|
|
2802
2802
|
x: e.x - t.x,
|
|
2803
2803
|
y: e.y - t.y
|
|
2804
2804
|
};
|
|
2805
2805
|
}
|
|
2806
|
-
function
|
|
2806
|
+
function ue(e, t) {
|
|
2807
2807
|
return Math.hypot(e.x - t.x, e.y - t.y);
|
|
2808
2808
|
}
|
|
2809
|
-
function
|
|
2809
|
+
function de(e, t, n, r) {
|
|
2810
2810
|
let i = t, a = r;
|
|
2811
2811
|
for (; a > 0;) {
|
|
2812
2812
|
let t = (i + n + e.length) % e.length, r = e[i], o = e[t];
|
|
2813
2813
|
if (!r || !o) throw Error("Bubble border path is invalid.");
|
|
2814
|
-
let s =
|
|
2814
|
+
let s = ue(r, o);
|
|
2815
2815
|
if (a <= s) {
|
|
2816
2816
|
let e = a / s;
|
|
2817
2817
|
return {
|
|
@@ -2825,14 +2825,14 @@ function fe(e, t, n, r) {
|
|
|
2825
2825
|
if (!o) throw Error("Bubble border path is empty.");
|
|
2826
2826
|
return o;
|
|
2827
2827
|
}
|
|
2828
|
-
function
|
|
2828
|
+
function fe(e, t, n, r, i) {
|
|
2829
2829
|
let a;
|
|
2830
2830
|
for (let r = 0; r < e.length; r += 1) {
|
|
2831
2831
|
let i = e[r], o = e[(r + 1) % e.length];
|
|
2832
2832
|
if (!i || !o) continue;
|
|
2833
|
-
let s =
|
|
2833
|
+
let s = j(o, i), c = A(n, s);
|
|
2834
2834
|
if (Math.abs(c) < 1e-9) continue;
|
|
2835
|
-
let l =
|
|
2835
|
+
let l = j(i, t), u = A(l, s) / c, d = A(l, n) / c;
|
|
2836
2836
|
u < 0 || d < -1e-9 || d > 1 + 1e-9 || a && u >= a.rayScale || (a = {
|
|
2837
2837
|
edgeIndex: r,
|
|
2838
2838
|
point: {
|
|
@@ -2850,61 +2850,61 @@ function pe(e, t, n, r, i) {
|
|
|
2850
2850
|
], s = a.edgeIndex + 1;
|
|
2851
2851
|
return {
|
|
2852
2852
|
borderPoint: a.point,
|
|
2853
|
-
base: [
|
|
2853
|
+
base: [de(o, s, -1, 9), de(o, s, 1, 9)],
|
|
2854
2854
|
tip: {
|
|
2855
2855
|
x: i?.x ?? t.x + n.x * (a.rayScale + r),
|
|
2856
2856
|
y: i?.y ?? t.y + n.y * (a.rayScale + r)
|
|
2857
2857
|
}
|
|
2858
2858
|
};
|
|
2859
2859
|
}
|
|
2860
|
-
function
|
|
2860
|
+
function pe(e) {
|
|
2861
2861
|
let t = e * Math.PI / 180;
|
|
2862
2862
|
return {
|
|
2863
2863
|
x: Math.sin(t),
|
|
2864
2864
|
y: -Math.cos(t)
|
|
2865
2865
|
};
|
|
2866
2866
|
}
|
|
2867
|
-
function
|
|
2867
|
+
function me(e, t, n, r) {
|
|
2868
2868
|
return {
|
|
2869
2869
|
x: n.x + (e.x - t.x) * r,
|
|
2870
2870
|
y: n.y + (e.y - t.y) * r
|
|
2871
2871
|
};
|
|
2872
2872
|
}
|
|
2873
|
-
function
|
|
2873
|
+
function M(e, t, n, r, i, a) {
|
|
2874
2874
|
let o = {
|
|
2875
2875
|
x: t / 2,
|
|
2876
2876
|
y: n / 2
|
|
2877
|
-
}, s =
|
|
2877
|
+
}, s = pe(r), c = fe(e, o, s, i), l = ue(o, c.borderPoint), u = a.scalePercent / 100, d = {
|
|
2878
2878
|
x: o.x - s.x * l * (u - 1) + a.x,
|
|
2879
2879
|
y: o.y - s.y * l * (u - 1) - a.y
|
|
2880
2880
|
};
|
|
2881
2881
|
return {
|
|
2882
|
-
body: e.map((e) =>
|
|
2882
|
+
body: e.map((e) => me(e, o, d, u)),
|
|
2883
2883
|
bodyCenter: d,
|
|
2884
2884
|
tip: c.tip
|
|
2885
2885
|
};
|
|
2886
2886
|
}
|
|
2887
|
-
function
|
|
2887
|
+
function he(e) {
|
|
2888
2888
|
let t = e[0];
|
|
2889
2889
|
if (!t) throw Error("Bubble polygon is empty.");
|
|
2890
2890
|
return `M ${t.x.toFixed(4)} ${t.y.toFixed(4)} ${e.slice(1).map(({ x: e, y: t }) => `L ${e.toFixed(4)} ${t.toFixed(4)}`).join(" ")} Z`;
|
|
2891
2891
|
}
|
|
2892
|
-
function
|
|
2892
|
+
function ge(e) {
|
|
2893
2893
|
return Math.abs(e.reduce((t, n, r) => {
|
|
2894
2894
|
let i = e[(r + 1) % e.length];
|
|
2895
2895
|
return i ? t + n.x * i.y - i.x * n.y : t;
|
|
2896
2896
|
}, 0) / 2);
|
|
2897
2897
|
}
|
|
2898
|
-
function
|
|
2899
|
-
return `<path d="${
|
|
2898
|
+
function _e(e, t, n, r = "") {
|
|
2899
|
+
return `<path d="${he(e)}" fill="${t}" stroke="${n}" stroke-width="3" stroke-linejoin="round" ${r}/>`;
|
|
2900
2900
|
}
|
|
2901
|
-
function
|
|
2902
|
-
let o =
|
|
2901
|
+
function ve(e, t, n, r, i, a = "") {
|
|
2902
|
+
let o = j(n, t), s = Math.hypot(o.x, o.y);
|
|
2903
2903
|
if (!(s > 0)) throw TypeError("Bubble body center and tail tip must differ.");
|
|
2904
|
-
let c =
|
|
2904
|
+
let c = fe(e, t, {
|
|
2905
2905
|
x: o.x / s,
|
|
2906
2906
|
y: o.y / s
|
|
2907
|
-
}, 0, n), l = (e) => e.map(({ x: e, y: t }) => [e, t]), u =
|
|
2907
|
+
}, 0, n), l = (e) => e.map(({ x: e, y: t }) => [e, t]), u = ie.default.union([l(e)], [[l([
|
|
2908
2908
|
c.base[0],
|
|
2909
2909
|
c.tip,
|
|
2910
2910
|
c.base[1]
|
|
@@ -2913,11 +2913,11 @@ function ye(e, t, n, r, i, a = "") {
|
|
|
2913
2913
|
let d = u.map((e) => e.map(([e, t]) => ({
|
|
2914
2914
|
x: e,
|
|
2915
2915
|
y: t
|
|
2916
|
-
}))).sort((e, t) =>
|
|
2916
|
+
}))).sort((e, t) => ge(t) - ge(e))[0];
|
|
2917
2917
|
if (!d) throw Error("JSClipper returned an empty Bubble outline.");
|
|
2918
|
-
return `<path d="${
|
|
2918
|
+
return `<path d="${he(d)}" fill="${r}" stroke="${i}" stroke-width="3" stroke-linejoin="round" data-boolean-operation="union" data-tail-base-on-border="true" ${a}/>`;
|
|
2919
2919
|
}
|
|
2920
|
-
function
|
|
2920
|
+
function ye(e, t, n, r) {
|
|
2921
2921
|
let i = e - 24, a = t - 24, o = e / 2, s = t / 2;
|
|
2922
2922
|
return `<path d="M 42 ${s}
|
|
2923
2923
|
C 22 ${s - 20}, 32 42, 60 44
|
|
@@ -2930,8 +2930,8 @@ function be(e, t, n, r) {
|
|
|
2930
2930
|
C 31 ${a + 2}, 17 ${s + 20}, 42 ${s} Z"
|
|
2931
2931
|
fill="${n}" stroke="${r}" stroke-width="3" stroke-linejoin="round"/>`;
|
|
2932
2932
|
}
|
|
2933
|
-
function
|
|
2934
|
-
let o =
|
|
2933
|
+
function be(e, t, n, r, i, a) {
|
|
2934
|
+
let o = j(n, t), s = Math.hypot(o.x, o.y), c = fe(e, t, {
|
|
2935
2935
|
x: o.x / s,
|
|
2936
2936
|
y: o.y / s
|
|
2937
2937
|
}, 0, n), l = {
|
|
@@ -2959,7 +2959,7 @@ function xe(e, t, n, r, i, a) {
|
|
|
2959
2959
|
radius: 3.5
|
|
2960
2960
|
}]).map(({ ratio: e, radius: t }) => `<circle cx="${l.x + (c.tip.x - l.x) * e}" cy="${l.y + (c.tip.y - l.y) * e}" r="${t}" fill="${r}" stroke="${i}" stroke-width="2"/>`).join("");
|
|
2961
2961
|
}
|
|
2962
|
-
function
|
|
2962
|
+
function xe(e, t) {
|
|
2963
2963
|
let n = e / 2, r = t / 2;
|
|
2964
2964
|
return Array.from({ length: 28 }, (i, a) => {
|
|
2965
2965
|
let o = a * Math.PI * 2 / 28 - Math.PI / 2, s = a % 2 == 0, c = s ? e / 2 - 6 : e / 2 - 22, l = s ? t / 2 - 6 : t / 2 - 22;
|
|
@@ -2969,7 +2969,7 @@ function Se(e, t) {
|
|
|
2969
2969
|
};
|
|
2970
2970
|
});
|
|
2971
2971
|
}
|
|
2972
|
-
function
|
|
2972
|
+
function Se(e, t) {
|
|
2973
2973
|
let n = e - 24, r = t - 24, i = Array.from({ length: 21 }, (e, t) => {
|
|
2974
2974
|
let n = t / 20;
|
|
2975
2975
|
return {
|
|
@@ -3002,59 +3002,59 @@ function Ce(e, t) {
|
|
|
3002
3002
|
}))
|
|
3003
3003
|
];
|
|
3004
3004
|
}
|
|
3005
|
-
function
|
|
3006
|
-
return e === "YELLING" ?
|
|
3005
|
+
function Ce(e, t, n) {
|
|
3006
|
+
return e === "YELLING" ? xe(t, n) : e === "WAVY" ? Se(t, n) : k(t, n);
|
|
3007
3007
|
}
|
|
3008
|
-
function
|
|
3009
|
-
let t =
|
|
3008
|
+
function we(e) {
|
|
3009
|
+
let t = ce(e.width, 220), n = ce(e.height, 112), r = le(e.tailDirection);
|
|
3010
3010
|
if (r === null) throw TypeError("Bubble body center offset requires a tail direction.");
|
|
3011
|
-
let i =
|
|
3011
|
+
let i = D(e.tailLength ?? ae), a = oe(e.offset), o = {
|
|
3012
3012
|
x: t / 2,
|
|
3013
3013
|
y: n / 2
|
|
3014
|
-
}, s =
|
|
3014
|
+
}, s = M(Ce(e.style, t, n), t, n, r, i, a);
|
|
3015
3015
|
return Object.freeze({
|
|
3016
3016
|
x: s.bodyCenter.x - o.x,
|
|
3017
3017
|
y: s.bodyCenter.y - o.y
|
|
3018
3018
|
});
|
|
3019
3019
|
}
|
|
3020
|
-
function
|
|
3021
|
-
let c =
|
|
3022
|
-
if (r === null) return
|
|
3023
|
-
let l =
|
|
3024
|
-
return
|
|
3020
|
+
function Te(e, t, n, r, i, a, o, s) {
|
|
3021
|
+
let c = k(t, n), l = (e) => r === null ? e : M(e, t, n, r, o, s).body, u = (e, c = "") => {
|
|
3022
|
+
if (r === null) return _e(e, i, a, c);
|
|
3023
|
+
let l = M(e, t, n, r, o, s);
|
|
3024
|
+
return ve(l.body, l.bodyCenter, l.tip, i, a, c);
|
|
3025
3025
|
};
|
|
3026
3026
|
switch (e) {
|
|
3027
3027
|
case "NO_BUBBLE": return "";
|
|
3028
3028
|
case "THINKING":
|
|
3029
3029
|
case "DREAMING": {
|
|
3030
|
-
if (r === null) return
|
|
3031
|
-
let l =
|
|
3030
|
+
if (r === null) return ye(t, n, i, a);
|
|
3031
|
+
let l = M(c, t, n, r, o, s), u = s.scalePercent / 100, d = {
|
|
3032
3032
|
x: t / 2,
|
|
3033
3033
|
y: n / 2
|
|
3034
3034
|
}, f = l.bodyCenter.x - d.x * u, p = l.bodyCenter.y - d.y * u;
|
|
3035
|
-
return `${
|
|
3035
|
+
return `${be(l.body, l.bodyCenter, l.tip, i, a, e === "DREAMING")}<g transform="translate(${f} ${p}) scale(${u})">${ye(t, n, i, a)}</g>`;
|
|
3036
3036
|
}
|
|
3037
|
-
case "YELLING": return u(
|
|
3038
|
-
case "WAVY": return u(
|
|
3037
|
+
case "YELLING": return u(xe(t, n));
|
|
3038
|
+
case "WAVY": return u(Se(t, n));
|
|
3039
3039
|
case "WHISPERING": return u(c, "stroke-dasharray=\"5 5\"");
|
|
3040
3040
|
case "ANNOUNCEMENT": return `${u(c)}<rect x="30" y="30" width="${t - 60}" height="${n - 60}" rx="13" fill="none" stroke="${a}" stroke-width="1.5"/>`;
|
|
3041
|
-
case "NARRATION": return
|
|
3041
|
+
case "NARRATION": return _e(l(c), i, a);
|
|
3042
3042
|
case "OFF_PANEL": return u(c);
|
|
3043
3043
|
case "NORMAL": return u(c);
|
|
3044
3044
|
}
|
|
3045
3045
|
}
|
|
3046
|
-
function
|
|
3047
|
-
if (!
|
|
3046
|
+
function Ee(e) {
|
|
3047
|
+
if (!O.includes(e.style)) throw TypeError(`Unsupported Bubble visual style: ${String(e.style)}`);
|
|
3048
3048
|
if (!Array.isArray(e.lines) || e.lines.some((e) => typeof e != "string")) throw TypeError("lines must be an array of strings.");
|
|
3049
|
-
let t =
|
|
3049
|
+
let t = ce(e.width, 220), n = ce(e.height, 112), r = ce(e.fontSize, 15), i = le(e.tailDirection), a = D(e.tailLength ?? ae), o = e.offset === void 0 ? E : oe(e.offset), s = e.fillColor ?? "#fff4cc", c = e.borderColor ?? "#6f5b45", l = e.textColor ?? "#25283a", u = e.fontFamily ?? "Noto Sans JP, sans-serif", d = r * 1.35, f = n / 2 - (e.lines.length - 1) * d / 2 + r * .35, p = i === null ? 1 : o.scalePercent / 100, m = i === null ? {
|
|
3050
3050
|
x: t / 2,
|
|
3051
3051
|
y: n / 2
|
|
3052
|
-
} :
|
|
3053
|
-
return `<svg xmlns="http://www.w3.org/2000/svg" width="${t}" height="${n}" viewBox="0 0 ${t} ${n}" role="img" data-bubble-renderer="canonical" data-bubble-style="${e.style}"><title>${g}</title>${
|
|
3052
|
+
} : M(k(t, n), t, n, i, a, o).bodyCenter, h = e.lines.map((e, t) => `<text x="${m.x}" y="${m.y + (f + t * d - n / 2) * p}" text-anchor="middle" fill="${se(l)}" font-family="${se(u)}" font-size="${r * p}">${se(e)}</text>`).join(""), g = se(e.title ?? `${e.style} bubble`);
|
|
3053
|
+
return `<svg xmlns="http://www.w3.org/2000/svg" width="${t}" height="${n}" viewBox="0 0 ${t} ${n}" role="img" data-bubble-renderer="canonical" data-bubble-style="${e.style}"><title>${g}</title>${Te(e.style, t, n, i, s, c, a, o)}${h}</svg>`;
|
|
3054
3054
|
}
|
|
3055
3055
|
//#endregion
|
|
3056
3056
|
//#region node_modules/.pnpm/@cto.af+unicode-trie-runtime@3.2.9/node_modules/@cto.af/unicode-trie-runtime/constants.js
|
|
3057
|
-
var
|
|
3057
|
+
var De = 2048, Oe = 2112, N = Uint8Array, P = Uint16Array, ke = Int32Array, Ae = new N([
|
|
3058
3058
|
0,
|
|
3059
3059
|
0,
|
|
3060
3060
|
0,
|
|
@@ -3087,7 +3087,7 @@ var Oe = 2048, ke = 2112, M = Uint8Array, N = Uint16Array, Ae = Int32Array, je =
|
|
|
3087
3087
|
0,
|
|
3088
3088
|
0,
|
|
3089
3089
|
0
|
|
3090
|
-
]),
|
|
3090
|
+
]), je = new N([
|
|
3091
3091
|
0,
|
|
3092
3092
|
0,
|
|
3093
3093
|
0,
|
|
@@ -3120,7 +3120,7 @@ var Oe = 2048, ke = 2112, M = Uint8Array, N = Uint16Array, Ae = Int32Array, je =
|
|
|
3120
3120
|
13,
|
|
3121
3121
|
0,
|
|
3122
3122
|
0
|
|
3123
|
-
]),
|
|
3123
|
+
]), Me = new N([
|
|
3124
3124
|
16,
|
|
3125
3125
|
17,
|
|
3126
3126
|
18,
|
|
@@ -3140,51 +3140,51 @@ var Oe = 2048, ke = 2112, M = Uint8Array, N = Uint16Array, Ae = Int32Array, je =
|
|
|
3140
3140
|
14,
|
|
3141
3141
|
1,
|
|
3142
3142
|
15
|
|
3143
|
-
]),
|
|
3144
|
-
for (var n = new
|
|
3145
|
-
for (var i = new
|
|
3143
|
+
]), Ne = function(e, t) {
|
|
3144
|
+
for (var n = new P(31), r = 0; r < 31; ++r) n[r] = t += 1 << e[r - 1];
|
|
3145
|
+
for (var i = new ke(n[30]), r = 1; r < 30; ++r) for (var a = n[r]; a < n[r + 1]; ++a) i[a] = a - n[r] << 5 | r;
|
|
3146
3146
|
return {
|
|
3147
3147
|
b: n,
|
|
3148
3148
|
r: i
|
|
3149
3149
|
};
|
|
3150
|
-
},
|
|
3151
|
-
|
|
3152
|
-
var
|
|
3153
|
-
|
|
3154
|
-
for (var
|
|
3155
|
-
var
|
|
3156
|
-
|
|
3150
|
+
}, Pe = Ne(Ae, 2), Fe = Pe.b, Ie = Pe.r;
|
|
3151
|
+
Fe[28] = 258, Ie[258] = 28;
|
|
3152
|
+
var Le = Ne(je, 0), Re = Le.b;
|
|
3153
|
+
Le.r;
|
|
3154
|
+
for (var ze = new P(32768), F = 0; F < 32768; ++F) {
|
|
3155
|
+
var I = (F & 43690) >> 1 | (F & 21845) << 1;
|
|
3156
|
+
I = (I & 52428) >> 2 | (I & 13107) << 2, I = (I & 61680) >> 4 | (I & 3855) << 4, ze[F] = ((I & 65280) >> 8 | (I & 255) << 8) >> 1;
|
|
3157
3157
|
}
|
|
3158
|
-
for (var
|
|
3159
|
-
for (var r = e.length, i = 0, a = new
|
|
3160
|
-
var o = new
|
|
3158
|
+
for (var Be = (function(e, t, n) {
|
|
3159
|
+
for (var r = e.length, i = 0, a = new P(t); i < r; ++i) e[i] && ++a[e[i] - 1];
|
|
3160
|
+
var o = new P(t);
|
|
3161
3161
|
for (i = 1; i < t; ++i) o[i] = o[i - 1] + a[i - 1] << 1;
|
|
3162
3162
|
var s;
|
|
3163
3163
|
if (n) {
|
|
3164
|
-
s = new
|
|
3164
|
+
s = new P(1 << t);
|
|
3165
3165
|
var c = 15 - t;
|
|
3166
|
-
for (i = 0; i < r; ++i) if (e[i]) for (var l = i << 4 | e[i], u = t - e[i], d = o[e[i] - 1]++ << u, f = d | (1 << u) - 1; d <= f; ++d) s[
|
|
3167
|
-
} else for (s = new
|
|
3166
|
+
for (i = 0; i < r; ++i) if (e[i]) for (var l = i << 4 | e[i], u = t - e[i], d = o[e[i] - 1]++ << u, f = d | (1 << u) - 1; d <= f; ++d) s[ze[d] >> c] = l;
|
|
3167
|
+
} else for (s = new P(r), i = 0; i < r; ++i) e[i] && (s[i] = ze[o[e[i] - 1]++] >> 15 - e[i]);
|
|
3168
3168
|
return s;
|
|
3169
|
-
}),
|
|
3170
|
-
for (var
|
|
3171
|
-
for (var
|
|
3172
|
-
for (var
|
|
3173
|
-
for (var
|
|
3174
|
-
var
|
|
3169
|
+
}), Ve = new N(288), F = 0; F < 144; ++F) Ve[F] = 8;
|
|
3170
|
+
for (var F = 144; F < 256; ++F) Ve[F] = 9;
|
|
3171
|
+
for (var F = 256; F < 280; ++F) Ve[F] = 7;
|
|
3172
|
+
for (var F = 280; F < 288; ++F) Ve[F] = 8;
|
|
3173
|
+
for (var He = new N(32), F = 0; F < 32; ++F) He[F] = 5;
|
|
3174
|
+
var Ue = /*#__PURE__*/ Be(Ve, 9, 1), We = /*#__PURE__*/ Be(He, 5, 1), Ge = function(e) {
|
|
3175
3175
|
for (var t = e[0], n = 1; n < e.length; ++n) e[n] > t && (t = e[n]);
|
|
3176
3176
|
return t;
|
|
3177
|
-
},
|
|
3177
|
+
}, L = function(e, t, n) {
|
|
3178
3178
|
var r = t / 8 | 0;
|
|
3179
3179
|
return (e[r] | e[r + 1] << 8) >> (t & 7) & n;
|
|
3180
|
-
},
|
|
3180
|
+
}, Ke = function(e, t) {
|
|
3181
3181
|
var n = t / 8 | 0;
|
|
3182
3182
|
return (e[n] | e[n + 1] << 8 | e[n + 2] << 16) >> (t & 7);
|
|
3183
|
-
},
|
|
3183
|
+
}, qe = function(e) {
|
|
3184
3184
|
return (e + 7) / 8 | 0;
|
|
3185
|
-
},
|
|
3186
|
-
return (t == null || t < 0) && (t = 0), (n == null || n > e.length) && (n = e.length), new
|
|
3187
|
-
},
|
|
3185
|
+
}, Je = function(e, t, n) {
|
|
3186
|
+
return (t == null || t < 0) && (t = 0), (n == null || n > e.length) && (n = e.length), new N(e.subarray(t, n));
|
|
3187
|
+
}, Ye = [
|
|
3188
3188
|
"unexpected EOF",
|
|
3189
3189
|
"invalid block type",
|
|
3190
3190
|
"invalid length/literal",
|
|
@@ -3199,121 +3199,121 @@ var We = /*#__PURE__*/ Ve(He, 9, 1), Ge = /*#__PURE__*/ Ve(Ue, 5, 1), Ke = funct
|
|
|
3199
3199
|
"filename too long",
|
|
3200
3200
|
"stream finishing",
|
|
3201
3201
|
"invalid zip data"
|
|
3202
|
-
],
|
|
3203
|
-
var r = Error(t ||
|
|
3204
|
-
if (r.code = e, Error.captureStackTrace && Error.captureStackTrace(r,
|
|
3202
|
+
], R = function(e, t, n) {
|
|
3203
|
+
var r = Error(t || Ye[e]);
|
|
3204
|
+
if (r.code = e, Error.captureStackTrace && Error.captureStackTrace(r, R), !n) throw r;
|
|
3205
3205
|
return r;
|
|
3206
|
-
},
|
|
3206
|
+
}, Xe = function(e, t, n, r) {
|
|
3207
3207
|
var i = e.length, a = r ? r.length : 0;
|
|
3208
|
-
if (!i || t.f && !t.l) return n || new
|
|
3208
|
+
if (!i || t.f && !t.l) return n || new N(0);
|
|
3209
3209
|
var o = !n, s = o || t.i != 2, c = t.i;
|
|
3210
|
-
o && (n = new
|
|
3210
|
+
o && (n = new N(i * 3));
|
|
3211
3211
|
var l = function(e) {
|
|
3212
3212
|
var t = n.length;
|
|
3213
3213
|
if (e > t) {
|
|
3214
|
-
var r = new
|
|
3214
|
+
var r = new N(Math.max(t * 2, e));
|
|
3215
3215
|
r.set(n), n = r;
|
|
3216
3216
|
}
|
|
3217
3217
|
}, u = t.f || 0, d = t.p || 0, f = t.b || 0, p = t.l, m = t.d, h = t.m, g = t.n, _ = i * 8;
|
|
3218
3218
|
do {
|
|
3219
3219
|
if (!p) {
|
|
3220
|
-
u =
|
|
3221
|
-
var v =
|
|
3220
|
+
u = L(e, d, 1);
|
|
3221
|
+
var v = L(e, d + 1, 3);
|
|
3222
3222
|
if (d += 3, !v) {
|
|
3223
|
-
var y =
|
|
3224
|
-
if (
|
|
3225
|
-
c &&
|
|
3223
|
+
var y = qe(d) + 4, b = e[y - 4] | e[y - 3] << 8, x = y + b;
|
|
3224
|
+
if (x > i) {
|
|
3225
|
+
c && R(0);
|
|
3226
3226
|
break;
|
|
3227
3227
|
}
|
|
3228
|
-
s && l(f + b), n.set(e.subarray(y,
|
|
3228
|
+
s && l(f + b), n.set(e.subarray(y, x), f), t.b = f += b, t.p = d = x * 8, t.f = u;
|
|
3229
3229
|
continue;
|
|
3230
3230
|
}
|
|
3231
|
-
if (v == 1) p =
|
|
3231
|
+
if (v == 1) p = Ue, m = We, h = 9, g = 5;
|
|
3232
3232
|
else if (v == 2) {
|
|
3233
|
-
var
|
|
3233
|
+
var S = L(e, d, 31) + 257, ee = L(e, d + 10, 15) + 4, C = S + L(e, d + 5, 31) + 1;
|
|
3234
3234
|
d += 14;
|
|
3235
|
-
for (var
|
|
3236
|
-
d +=
|
|
3237
|
-
for (var
|
|
3238
|
-
var
|
|
3239
|
-
d +=
|
|
3240
|
-
var y =
|
|
3241
|
-
if (y < 16)
|
|
3235
|
+
for (var w = new N(C), te = new N(19), T = 0; T < ee; ++T) te[Me[T]] = L(e, d + T * 3, 7);
|
|
3236
|
+
d += ee * 3;
|
|
3237
|
+
for (var ne = Ge(te), re = (1 << ne) - 1, ie = Be(te, ne, 1), T = 0; T < C;) {
|
|
3238
|
+
var ae = ie[L(e, d, re)];
|
|
3239
|
+
d += ae & 15;
|
|
3240
|
+
var y = ae >> 4;
|
|
3241
|
+
if (y < 16) w[T++] = y;
|
|
3242
3242
|
else {
|
|
3243
|
-
var
|
|
3244
|
-
for (y == 16 ? (
|
|
3243
|
+
var E = 0, D = 0;
|
|
3244
|
+
for (y == 16 ? (D = 3 + L(e, d, 3), d += 2, E = w[T - 1]) : y == 17 ? (D = 3 + L(e, d, 7), d += 3) : y == 18 && (D = 11 + L(e, d, 127), d += 7); D--;) w[T++] = E;
|
|
3245
3245
|
}
|
|
3246
3246
|
}
|
|
3247
|
-
var
|
|
3248
|
-
h =
|
|
3249
|
-
} else
|
|
3247
|
+
var oe = w.subarray(0, S), O = w.subarray(S);
|
|
3248
|
+
h = Ge(oe), g = Ge(O), p = Be(oe, h, 1), m = Be(O, g, 1);
|
|
3249
|
+
} else R(1);
|
|
3250
3250
|
if (d > _) {
|
|
3251
|
-
c &&
|
|
3251
|
+
c && R(0);
|
|
3252
3252
|
break;
|
|
3253
3253
|
}
|
|
3254
3254
|
}
|
|
3255
3255
|
s && l(f + 131072);
|
|
3256
|
-
for (var
|
|
3257
|
-
var
|
|
3258
|
-
if (d +=
|
|
3259
|
-
c &&
|
|
3256
|
+
for (var se = (1 << h) - 1, ce = (1 << g) - 1, le = d;; le = d) {
|
|
3257
|
+
var E = p[Ke(e, d) & se], k = E >> 4;
|
|
3258
|
+
if (d += E & 15, d > _) {
|
|
3259
|
+
c && R(0);
|
|
3260
3260
|
break;
|
|
3261
3261
|
}
|
|
3262
|
-
if (
|
|
3263
|
-
else if (
|
|
3264
|
-
|
|
3262
|
+
if (E || R(2), k < 256) n[f++] = k;
|
|
3263
|
+
else if (k == 256) {
|
|
3264
|
+
le = d, p = null;
|
|
3265
3265
|
break;
|
|
3266
3266
|
} else {
|
|
3267
|
-
var
|
|
3268
|
-
if (
|
|
3269
|
-
var
|
|
3270
|
-
|
|
3267
|
+
var A = k - 254;
|
|
3268
|
+
if (k > 264) {
|
|
3269
|
+
var T = k - 257, j = Ae[T];
|
|
3270
|
+
A = L(e, d, (1 << j) - 1) + Fe[T], d += j;
|
|
3271
3271
|
}
|
|
3272
|
-
var
|
|
3273
|
-
|
|
3274
|
-
var
|
|
3275
|
-
if (
|
|
3276
|
-
var
|
|
3277
|
-
|
|
3272
|
+
var ue = m[Ke(e, d) & ce], de = ue >> 4;
|
|
3273
|
+
ue || R(3), d += ue & 15;
|
|
3274
|
+
var O = Re[de];
|
|
3275
|
+
if (de > 3) {
|
|
3276
|
+
var j = je[de];
|
|
3277
|
+
O += Ke(e, d) & (1 << j) - 1, d += j;
|
|
3278
3278
|
}
|
|
3279
3279
|
if (d > _) {
|
|
3280
|
-
c &&
|
|
3280
|
+
c && R(0);
|
|
3281
3281
|
break;
|
|
3282
3282
|
}
|
|
3283
3283
|
s && l(f + 131072);
|
|
3284
|
-
var
|
|
3285
|
-
if (f <
|
|
3286
|
-
var
|
|
3287
|
-
for (
|
|
3284
|
+
var fe = f + A;
|
|
3285
|
+
if (f < O) {
|
|
3286
|
+
var pe = a - O, me = Math.min(O, fe);
|
|
3287
|
+
for (pe + f < 0 && R(3); f < me; ++f) n[f] = r[pe + f];
|
|
3288
3288
|
}
|
|
3289
|
-
for (; f <
|
|
3289
|
+
for (; f < fe; ++f) n[f] = n[f - O];
|
|
3290
3290
|
}
|
|
3291
3291
|
}
|
|
3292
|
-
t.l = p, t.p =
|
|
3292
|
+
t.l = p, t.p = le, t.b = f, t.f = u, p && (u = 1, t.m = h, t.d = m, t.n = g);
|
|
3293
3293
|
} while (!u);
|
|
3294
|
-
return f != n.length && o ?
|
|
3295
|
-
},
|
|
3296
|
-
(e[0] != 31 || e[1] != 139 || e[2] != 8) &&
|
|
3294
|
+
return f != n.length && o ? Je(n, 0, f) : n.subarray(0, f);
|
|
3295
|
+
}, Ze = /*#__PURE__*/ new N(0), Qe = function(e) {
|
|
3296
|
+
(e[0] != 31 || e[1] != 139 || e[2] != 8) && R(6, "invalid gzip data");
|
|
3297
3297
|
var t = e[3], n = 10;
|
|
3298
3298
|
t & 4 && (n += (e[10] | e[11] << 8) + 2);
|
|
3299
3299
|
for (var r = (t >> 3 & 1) + (t >> 4 & 1); r > 0; r -= !e[n++]);
|
|
3300
3300
|
return n + (t & 2);
|
|
3301
|
-
},
|
|
3301
|
+
}, $e = function(e) {
|
|
3302
3302
|
var t = e.length;
|
|
3303
3303
|
return (e[t - 4] | e[t - 3] << 8 | e[t - 2] << 16 | e[t - 1] << 24) >>> 0;
|
|
3304
3304
|
};
|
|
3305
|
-
function
|
|
3306
|
-
var n =
|
|
3307
|
-
return n + 8 > e.length &&
|
|
3305
|
+
function et(e, t) {
|
|
3306
|
+
var n = Qe(e);
|
|
3307
|
+
return n + 8 > e.length && R(6, "invalid gzip data"), Xe(e.subarray(n, -8), { i: 2 }, t && t.out || new N($e(e)), t && t.dictionary);
|
|
3308
3308
|
}
|
|
3309
|
-
var
|
|
3309
|
+
var tt = typeof TextDecoder < "u" && /*#__PURE__*/ new TextDecoder();
|
|
3310
3310
|
try {
|
|
3311
|
-
|
|
3311
|
+
tt.decode(Ze, { stream: !0 });
|
|
3312
3312
|
} catch {}
|
|
3313
3313
|
//#endregion
|
|
3314
3314
|
//#region node_modules/.pnpm/@cto.af+unicode-trie-runtime@3.2.9/node_modules/@cto.af/unicode-trie-runtime/swap.js
|
|
3315
|
-
var
|
|
3316
|
-
function
|
|
3315
|
+
var nt = new Uint8Array(new Uint32Array([305419896]).buffer)[0] === 18;
|
|
3316
|
+
function rt(e) {
|
|
3317
3317
|
let t = e.length;
|
|
3318
3318
|
for (let n = 0; n < t; n += 4) [e[n], e[n + 1], e[n + 2], e[n + 3]] = [
|
|
3319
3319
|
e[n + 3],
|
|
@@ -3322,15 +3322,15 @@ function it(e) {
|
|
|
3322
3322
|
e[n]
|
|
3323
3323
|
];
|
|
3324
3324
|
}
|
|
3325
|
-
function
|
|
3326
|
-
var
|
|
3325
|
+
function it(e) {}
|
|
3326
|
+
var at = nt ? rt : it, ot = new TextDecoder(), z = class e {
|
|
3327
3327
|
constructor(e) {
|
|
3328
3328
|
if (e instanceof Uint8Array) {
|
|
3329
3329
|
let t = 0, n = new DataView(e.buffer);
|
|
3330
3330
|
if (this.highStart = n.getUint32(0, !0), this.errorValue = n.getUint32(4, !0), t = n.getUint32(8, !0), t !== 4294967295) throw Error("Trie created with old version of @cto.af/unicode-trie.");
|
|
3331
3331
|
if (t = n.getUint32(12, !0), 16 + t > e.byteLength) throw RangeError("Invalid input length");
|
|
3332
3332
|
let r = e.subarray(16 + t);
|
|
3333
|
-
this.values = r.length ? JSON.parse(
|
|
3333
|
+
this.values = r.length ? JSON.parse(ot.decode(et(r))) : [], e = et(e.subarray(16, 16 + t)), at(e), this.data = new Int32Array(e.buffer);
|
|
3334
3334
|
} else ({data: this.data, highStart: this.highStart, errorValue: this.errorValue, values: this.values = []} = e);
|
|
3335
3335
|
}
|
|
3336
3336
|
static fromBase64(t) {
|
|
@@ -3343,10 +3343,10 @@ var ot = rt ? it : at, st = new TextDecoder(), R = class e {
|
|
|
3343
3343
|
let n = (this.data[e >> 5] << 2) + (e & 31);
|
|
3344
3344
|
t = this.data[n];
|
|
3345
3345
|
} else if (e <= 65535) {
|
|
3346
|
-
let n = (this.data[
|
|
3346
|
+
let n = (this.data[De + (e - 55296 >> 5)] << 2) + (e & 31);
|
|
3347
3347
|
t = this.data[n];
|
|
3348
3348
|
} else if (e < this.highStart) {
|
|
3349
|
-
let n = this.data[
|
|
3349
|
+
let n = this.data[Oe - 32 + (e >> 11)];
|
|
3350
3350
|
n = this.data[n + (e >> 5 & 63)], n = (n << 2) + (e & 31), t = this.data[n];
|
|
3351
3351
|
} else t = this.data[this.data.length - 4];
|
|
3352
3352
|
return t;
|
|
@@ -3355,26 +3355,26 @@ var ot = rt ? it : at, st = new TextDecoder(), R = class e {
|
|
|
3355
3355
|
let t = this.get(e);
|
|
3356
3356
|
return this.values[t] ?? t;
|
|
3357
3357
|
}
|
|
3358
|
-
},
|
|
3358
|
+
}, st = z.fromBase64("AAgOAAEAAAD/////nRQAAB+LCAC4xcFoAgPtnQnwlkUdx1+URLxABcUUghTEEK8Cmwp0LJAa\n MRrFbBSPSXHSAUYNdFQoBWMKyQrUCo/EyMIjD3TIAxXJM5NBHBm0RDSPzDOVdAz7/nB/07bt\n s8/e+/zhfef9zD7HPs/e129/u8/yzVutVWANeBl079xq9QJ9wUCwDxjqYQ4DI8BoMBYcBY4D\n 48FEw3NTwDTp/BxwAZgJLgaXgCvAAnADuA3cDe4Hj0rPLQerwLPgJfAaeBe8Az4EnT/Ram0D\n eoBdwe5gENgX0DsOhHkQGAlGgTHgaHACGA8mgilgGpgBLgJzweVgPlgIbgF3iPOl4BGwAqwG\n a8Er4C2wDnwEumzRanUDPUFv0B8MBgeAL4BDwNfAN8C3wIngO+A0cCZowd/nwrwA/Eic/wzm\n L8EMHM+HuRDcDP4g7t8Hk3hYmI8BCv+TwvwLTOZvglfBawKyQ7wrjv8Ns1OXVqsroPNuwuwJ\n szfoL86JwTgeIp3HYJj0vhE4Hg3GgnHgZMDhnYDjyWCqZP9CHM8Gc8S1y2BeBa4FvweLxPN3\n wVwq7Dwirp0KVuB4NVgLXgSvg/fA+6C1Jf6gO+gF+oI9wQa3YQ4FwwDlwREwR4Mj+L6GY3Dv\n eMN9OY7JPAV2Jwn7Z8E8F0wHs8AcMA9cA64Dt4I7wT3gQfA4eAI8DdaKd7wizLdgvg86dUWa\n g+1BL0D3+sIcAAaLc5X9xfUDYR4EDlUYJR2PAUeCY8FJ4DRwJjgXTAezwBwwD1wDrgO3gjuF\n G/fAfBA8Js5XwnwaPF/htypeFfbfhvm+w7OdtkL6Axe3thP2uSzuhPM+YICA6tZ9YA4FwwGV\n 55F0XTBGOlY5GhwHxoOJYAqYBn4AfiyOLwVXgvnSc9dKxzeC28XxEoNbbdq0iQvXEe24aNOm\n TZs2bdq0aePC0ob55yFhPg5IHlI3Rl4Je8+I/vALMN+T7v3DMN5+B/c+BJ23hhwQ0LUeMM+G\n OQrshuM9AMkJ94b5WfBF8GVwKPg6+CYgOc7xME8BLFsiJuH8LPA9MFO8/yJhMnNxfjm4AlwJ\n rgK/AleD+e177Xvte+177XvR7/0O3ARuBSQzLcmd8ENJSoe/TZsmE9qfvR9l7FHwhNL3c+Ep\n zbPP4trz4FXwT/AB2Gyb/7WzJc67g16gLxgIBgOasxkCcxgoXf/c2+1jDu7ean0fLDbwDvjc\n 9pi7Aj8H8r1V4vxlmLvtgLlCMBesBNvs+PG9g2GeBxaB5aB7j1brOczh9UN8nAiuBs8BGg8c\n BqgP/xOqI2n+VvAQzile53T6L6NwLts5G+eLwSpxfT3M4dtiTg0sAevB8O1wDuT35GZJA9yX\n 461NmzZtNiXWow6cTrpKaCNGU3uhtPNjcW0cOEFq28fjeAI4HUwWz8iQbIvsrYM5VTw3HSbp\n Fs2EebG4dpnGPYL0hM4n3SfcXyDsLhTmzTBvA3eI86VKn6MK0lshfao/kt9x/pjk7ydFW7lG\n vIt0rl4W99+EuQ58BEh3jP3bBW1oVxHObjjeCfQB7B7bG8DXYJ5OelYwvwS+Ath9fuY0KT4O\n E88dKcxjYJIs8NswT5WeVSG/k/0zYOcccL54nuLvh+QHmD8V5jJA8fILnP8Lz10N87eAdMRu\n grlY9Bfo/AGYfwYrxPl9eOdqHK8l/+D47zDfFv76AOZmyFeTcLwVzB1AL9AXDAT7gSFgGBgB\n yH87ks4ZjseK86+CcdQ+a8JI90/GvQniPtufjPOp4vkLYc4Gc8Hl4NfgesP7Fin3OE3uwvVl\n 4BGwQrKzGsd/BS+C18Hb4APhdif0J7sC1unbHsf83C7SMd3vh/O9yC4YCoaBQ8Aoyd4YHB8J\n jgUngVMBlQ8qG2dI9nScg/sXgJngYsnupTi+EvxG+DMnXI7UuCZuNPjn9pqwboxQOeXwc50Q\n gyUinh8wxPfDFfeW4/qqAvmmaVDb6PvsGiX+XvLM2/1Qb76xEZeLGOlEdTC1i+tEnNMx1Z8f\n ivPOGJtvDXYEJNfw9eeueL4uHLvDziBA/Rb5+gG4Rvq0n5feQTKJXHp8rlBfaiT8R7KcKnnV\n 4Yb42BQ4wjL9joG9E8Apjul9uBL3TS+/kxC+74LzGpAvTHl7BvznUyYuwnM05iGoLM/F+Tzl\n XdyHqStbZM4S5/PxjoXgJvEuWqvAdkmuKIeL6hV5TET9e6r/qsJPazHIvBfveQgsF248BXMF\n 1YcOcXGERXv4AslIPeNXhuL3TVFnroO5HmwB2WtT8j21Mdsa/NMT93qDDevFkJ79Fbsb1s7g\n 2hDLMFE/cZh434iAeKD3jDY8T/fHGu5TuMfVuH+y8KeOCeJZPp+cIU1JD4fcmiq5NVvIIaqe\n oXJyIezPBpeAK8AC8Xxvi/5YXd1+A951C6C1R4uFeTdMurdMmC78Cc+sBM+ANdLzNF/xBlgH\n PpKud8G8xXagB9gZ9AF0fQ+Yg8QxcQCOh4rz4TBHimM5TQ/HNT5egHDQfdZFOkrcI/nEcTge\n Dyh+JsKcIt41TZgzYM5S3j9H8gsxD+dXSe4x10rXrleeyc2iwu6XhsJ/F8WBqMeJ/ysfBpaJ\n PNKReXzzThvYDKd1YFn0hscg/tsALZ21ec4GsTS0hWLZou4kDX9oaELHdI1EeiT24ntUtVGX\n g0yq7igpbCD7BL2HIXfl89RQWCgMHJ7ckPuUlpj63XBO8Y9pyE2aTf2nK5NQC4hWvuvoKfIl\n lXkqGwzlz50EfMx1BOVhztP8HNvdWXlWhp6Xz8ndlOWN/V6K0u43Dc4fch7gc9s4U/OU/Azn\n vZLkKrdNheqTKnzeVxff/FOvc19D/dW9SzZjkuKdMfPmxlrn5Ix3mzzWBKhs9NL4l9rxqj5J\n 06HwcD6W8zQf01iDzLrfLhmpc1vNVza/qvGXnP7UZ2PUcZlLnHOcksk0KZ+nyGe2412KW13c\n p65rOQ3qwmCyo8afzi7bsY2PmPV4yfYqZl7qKO1F6nhyreNs6rvY+S9XnOjaai7TssxAHqfn\n 8GuV/9XrVfZi5PVcZaXK367u636hfuP8bCtL8u3np+6vURhK9BObUPZjxm+scZ0810DkrFfV\n 8uY6zgotWy5ygSq35DJYlyZqedWVX5s2UTeeqQqT6pZr+vJ4QRc/fF1uj6rCZYprU1hypG/d\n sRznpnS1Sd+6dKzLa3X5wzZ9dfWEa5/Mtfzq0qRE+vqWX10eqErfkL6tOubxLb8s1zG54RLO\n nPWzb/3pkl9z1J8ufcQqP9fl9ao6w9Re6cKsS7u6a3Xto2s81NWvpjxqW/5s5IEpxpncTtr2\n 4XPWpbHGWa79Idv0NMWZKR5i1aemn+38oxwum2dKpm+M9jJm+pr6RrHSV9eH9dXnyN0XijEO\n i5GedX16VzluqvZXHr9UpY1P/9a1zSs176m2kbb+NY13qvKLjYwqtP1V/eLT//5kQ1B/1G8I\n eZ/LfA3LgUzxw8dVcZYiLuvcjB33IX7wybe6NKM+gox8jfRq+JjSi87l+ViGrut0buvaqdhy\n QPKj3MawSbqApBfLZoi81kcuXqV3XXc9VHbeBH0L+nF5N7W/Nm2NnBer+rasD9bEute1flTD\n lst9Ux1vK8PWjZFD+x27Fma3wvQujG/fMFQ/0iX/hD7f9PClnr9OHX8+Mh65PTS1Iyn9UULX\n M/b8vq9uKf9ID7KkjkvOtOe+om/8cxvu6meXubpY+jcuc0Wx3TeNBVOH33e+LKQ+rZM55pQd\n cNz3kc4578rygFhy7Fj1H4872f88FpD1hNV1Iy76tbnr35Dyn1v3yCT3KhEnJdpnG1mui46u\n ryzBNNaiH5eH0HFfbPlWqvouVX0ZKjdW65S68XQqfWC1nJSUO8eoj0OfjxGGUjI1V/erZGIh\n P507n8qIa7z1tXinLK/sZwnb/7TS7+drNtj43+Y9sttN00121aMOnR+wTb/UuIZ/d4FrfydV\n PSOXCRmf+jfl/E9KuUMpuVPMfnKMdQIucze69X6m8YPvngAl9yOwqWNt5Wsu+hSp9xRoytr0\n UN3tunhPHQ91brDsoqqOZSivyed7iDzXX8p/JJ8le2QSA4C8lwntkcP7bvGxfC7bJfaUIDd5\n j7CqsiCv/dYh+4HcIbkTYdpLgOWwbNdk31R/k/tqnKpy2oGB43o1H9js0cPhk/ebUfegsZVT\n h8pW5D2aVNQ9nFzQPStf4+MQN4jYfZ4Q+TDndzUNTfqAVfs7uazFtc03KfaP0u3LZYvP877u\n ++6zpf5SuOfiJ9+w6PylXtPdZ1Pdx80UZ1VxoYahLl/Y7tflUxbqwhyr7OjioCpuTOexymmM\n 99vGWe5960LdoT5PrDlkNn39yrIdFzdTxKkqa0o9n5NyfjbFL6T9i03O9jTEjVT9CZt61qWe\n DAmTbX1rkw4ubWysflyu/Uh19Utdv8QUb/wevs/vlN3YK0J95hvGWP26FP0CXV0ix6XOfmi8\n lNw7tlSc284PqXnZlKf5umpfVx7Ue3K5q4onnT9079H5h8ubyX5VGZHfIVOiPynLz2RkPSTV\n /2p/0NZM2Ufw7dPm3tveJp46kn5prDC7miXDUCoOc7QdKeU9KeZZbNZTsw6ZKjPna6G6jLZ6\n v6Y9S0rqHMbaN8j3flUbVIdpnonTleaP+JsiapunntfVOer7WUdXNw+jCyvNYxE6P9Ix+7Mu\n TCa3uM3mb9JUmfLe1q59N19yulXnD5dfU/yRyn/8vR2Cr9H8JB/btsm29undfCw/56tbVmVX\n d53nXtV0+Iw4rjNTk8udOvdtwl13j1B1YuT5b04HMpsW/7HCr8t/dF0Of846J3W9HPtdNnUf\n x7UvpdsiV1mJjawiFLWODEm73G1mLF1J2/GB7X7UtvqhJeeTfPc4T7mPtLpuWqWJ66malIZV\n Oq6uerCp9Oh1dlzCzrpIudKf92/hsZbP+hIbHa0Q/fQYe/v4lmd5T5s6veq6vYViyzJT69KV\n 2t/FlN451zKFrm3i9U0264J0fQOX9U5Vfe6S+xPRL8VaHJe8rK69qpNJqe92jX81XX3X2fr8\n XPaHsq1PdPWWa12Sag1GaXmwT98pZ/2vy8+h7e8gsHdGcrvn+ou5l5j6K7GfmPobXJiY4xLb\n d9C3GKnM2H7Xkd7j+z1I03X5ftWxjd9KwDLy0mNPV/fUtSCh4wyeF5DXS8nzWnSd9Jqrfrye\n UWfa3NP1O131E9TnTDItvs/rn9Qwm9y3lS/yuiSdDK2J32LmH61l4/l7DpMcFl0cy/HpKvNU\n 5Z6yuzmgsPj4PZX78jydfMzx1BFk7Gr61smlU9yXf7w+UL7Pa5Fc9pe3lTntI+YJYvTvQ9Y9\n x9gbNOU66lxyYJPsuqPtBRpjvW7uX6n9Y3LpfMUe8+fYy6sJ+99x2QyVR1TJrEvlz9Lxmzq8\n Kct+jO8mpnIrV35pYv3rso+6j2w1RzkxpWeOslpV38Xey7lJ7XVVnDdFVyDn2o2m7A1s871r\n U3+hbp661LfjbL6l6vL9O5v5uiqdcd/9mG3sVrlrktHl3m+5Ln46Qply/f51rDq2afV3U92P\n 9Z2CVPu71+kExf4uhm265Mpfcrjl9S+p/WGjb9FEeYmrHlhsXTLb772b2v3U8bKvoAk6VaQ3\n ZdqvWf2FytNd9g1W/c57VNf9+JuMuXT+ZJ1tnZ6T7U+un1PXpSm/BxKiZ+b6nUC5P+bybdoU\n 3wWR9zP1WcOrrtc06dG7rA9gf6lzCCVlQKl1cKvW16r7MjdxPqHue3m55l5M6yRy1q8p6i+d\n GzbfR5Dtqeeu1D2rulVlp+67ulXfzlDPqS/AP52us+kb5aoetdp226wrqOtHuvxc9InlsMrX\n 5HCkgvtULt80VtPB5tvHlLbU51R1leQ+nW0ftknjClM7Ktf7Pt9n161FKfULHbeU/P5brO/5\n 8PeveZ2l+s31OpmmizxP5z/VrssvNP7Vb9XbUGr+LWSdWKr4c/lemct7U/1KfJcs5nfiXNcz\n Va3lCf2OXi75c+gaSd/4SyH/pmds+8G2fWCbvmwMeZapf6v2g9hU16vF7l/65K8cc6uh7bIs\n W8jdLyyxp4BPPOru6+Qx8rd8beIyhew8xjoMtU8l90dcyldseUOJPpPLevpc7ZnvL8f4oaRO\n ad34WVeefPYVSdG+27T7vPdESj0VV5leyvXoufQvffKZTpZmGy+27UNKfYCc5dWmj2fbp44Z\n P6G/WN9X1cl8beoieS7ad7+PGP14nz1ATO1q3Xx2jHnpWO1xR1uPovumYQndrFD9uyrdvpD4\n b9L8Yaz9wxl5bbVu/XlT9j2X/Rr6Hl7brYPd0V1jM5bOk+84oUn7xpeeH7IhVJ7j25+IrU9s\n ig+XOi7lGMtGj9pGB903/kuMQVPuORpjv7+c35AvvYYkNO1CviFvU4/HkF+qe2ZTG+VTn1bt\n fV7y5/PtqNR76oeuy4zlH3n/9ND3qPuxu7xb3cuj7heahiXq4ljrC1R5vm5M39HGFz7yzRLr\n k1PoMMfcPzeGvDPWPssxw6Rzo8QcXmp3XGSSHX2/Et08k67f5dtmuupKN2FvMpOsKObeDnVx\n k3ofp1h6VrFIVVdV7T2fYm9013l7k/5rbNlKaBuXso7LLV+K1d67uuWiJ19ShhcjvUP97FsO\n Q+V7pdfDpy5rtv2qEPkU7XFY0v3Q+Oc8FpqHdHV9Xf415XFbPTPfPk7qNWsufow9vkqlz6v+\n eA4udH9l3XxtiA5ZyN5XpvxSNzdetRdQlWnKjzbP695Xt9+WTz/bJk5y6tDVlYHUe0Crv9Bv\n vMf+bnzq79DHenfs/ZD3y4TO7b0S7vPM8Z5yL2mTG1XXKcyMLh5093OzvwbVfzr/1hHDby7u\n ufhH5z/Vrm1YZPsheUtn2pQh+RnfMmCqy3PN7aSeN0oRtrp8m6oONOXflHVfrnj0ccdU1lVS\n yYu7Ssjz96ZwxEgz13rX1c3Y+Sp2vJve7eN+zP3nYsojYunAhMq1cs2vM1X9J99+Q2g+d+1z\n 5OznpXJD1zcKcc/U33KN39TzgCnr4lz95Fz1cW79kxT6SDF00UruT5ZDZ8Xl9x83MV0I0CwB\n AB+LCAC4xcFoAgMdjksWhCAMBO/CelYzJ4gMCqiI4t/n/a9hyk29JN3p5DL7bj7GTQrbKypR\n dDVVywyhZCz4xkUhnSIj5EExoFoQisIfbICE2WJOoAESSK7wecCscDJSxRXMbBAlfLCyIbTh\n T8tr5/YikvVFSYq3dURbKo/gf+Q3zBCELycCXW/uB2mPjCb8AAAA"), ct = Object.fromEntries(st.values.map((e, t) => [e, t])), { values: lt } = st, { AI: ut, AL: dt, CJ: ft, CM: pt, NS: mt, SA: ht, SG: gt, SP: _t, XX: vt } = ct;
|
|
3359
3359
|
function yt(e) {
|
|
3360
3360
|
switch (e) {
|
|
3361
3361
|
case null: return null;
|
|
3362
3362
|
case -1: return "sot";
|
|
3363
3363
|
case -2: return "eot";
|
|
3364
|
-
default: return
|
|
3364
|
+
default: return lt[e];
|
|
3365
3365
|
}
|
|
3366
3366
|
}
|
|
3367
3367
|
function bt(e, t) {
|
|
3368
3368
|
switch (e) {
|
|
3369
|
-
case
|
|
3369
|
+
case ut:
|
|
3370
3370
|
case gt:
|
|
3371
|
-
case vt: return
|
|
3372
|
-
case ht: return /^[\p{gc=Mn}\p{gc=Mc}]$/u.test(t) ?
|
|
3373
|
-
case
|
|
3371
|
+
case vt: return dt;
|
|
3372
|
+
case ht: return /^[\p{gc=Mn}\p{gc=Mc}]$/u.test(t) ? pt : dt;
|
|
3373
|
+
case ft: return mt;
|
|
3374
3374
|
}
|
|
3375
3375
|
return e;
|
|
3376
3376
|
}
|
|
3377
|
-
var
|
|
3377
|
+
var xt = class {
|
|
3378
3378
|
cp = -Infinity;
|
|
3379
3379
|
cls = -1;
|
|
3380
3380
|
char = "";
|
|
@@ -3386,13 +3386,13 @@ var B = class {
|
|
|
3386
3386
|
[Symbol.for("nodejs.util.inspect.custom")](e, t, n) {
|
|
3387
3387
|
return `${yt(this.cls)}(${this.cp.toString(16).padStart(4, "0")}:${JSON.stringify(this.char)})${this.ignored ? "Ig" : ""}`;
|
|
3388
3388
|
}
|
|
3389
|
-
},
|
|
3389
|
+
}, St = class {
|
|
3390
3390
|
str = "";
|
|
3391
3391
|
len = 0;
|
|
3392
3392
|
prevChunk = 0;
|
|
3393
|
-
prev = new
|
|
3394
|
-
cur = new
|
|
3395
|
-
next = new
|
|
3393
|
+
prev = new xt(-1, -Infinity, "", 0);
|
|
3394
|
+
cur = new xt(-1, -Infinity, "", 0);
|
|
3395
|
+
next = new xt(-1, -Infinity, "", 0);
|
|
3396
3396
|
LB8 = !1;
|
|
3397
3397
|
spaces = !1;
|
|
3398
3398
|
RI = 0;
|
|
@@ -3405,13 +3405,13 @@ var B = class {
|
|
|
3405
3405
|
this.next.ignored ? this.cur.len = this.next.len : (this.prev = this.cur, this.cur = this.next), this.next = e;
|
|
3406
3406
|
}
|
|
3407
3407
|
pushEnd() {
|
|
3408
|
-
this.push(new
|
|
3408
|
+
this.push(new xt(-2, Infinity, "", this.next.len));
|
|
3409
3409
|
}
|
|
3410
3410
|
*codePoints(e, t = !0) {
|
|
3411
3411
|
if (t) for (; e < this.len;) if (e === this.cur.len && this.next.cls >= 0) yield this.next, e += this.next.char.length;
|
|
3412
3412
|
else {
|
|
3413
|
-
let t = this.str.codePointAt(e), n = String.fromCodePoint(t), r =
|
|
3414
|
-
e += n.length, yield new
|
|
3413
|
+
let t = this.str.codePointAt(e), n = String.fromCodePoint(t), r = st.get(t);
|
|
3414
|
+
e += n.length, yield new xt(bt(r, n), t, n, e);
|
|
3415
3415
|
}
|
|
3416
3416
|
else for (; e > 0;) if (e === this.cur.len) yield this.cur, e -= this.cur.char.length;
|
|
3417
3417
|
else if (e === this.prev.len) yield this.prev, e -= this.prev.char.length;
|
|
@@ -3419,7 +3419,7 @@ var B = class {
|
|
|
3419
3419
|
let t = e - 1, n = this.str.charCodeAt(t);
|
|
3420
3420
|
n >= 56320 && n <= 57343 && t--;
|
|
3421
3421
|
let r = this.str.codePointAt(t), i = String.fromCodePoint(r);
|
|
3422
|
-
yield new
|
|
3422
|
+
yield new xt(bt(st.get(r), i), r, i, e), e = t;
|
|
3423
3423
|
}
|
|
3424
3424
|
}
|
|
3425
3425
|
classAfterSpaces(e) {
|
|
@@ -3437,324 +3437,324 @@ var B = class {
|
|
|
3437
3437
|
let r = `${n(this.prev)} => ${n(this.cur)} => ${n(this.next)}`;
|
|
3438
3438
|
return this.LB8 && (r += " LB8"), this.spaces && (r += " spaces"), this.RI > 0 && (r += ` RI: ${this.RI}`), this.props && (r += ` ${JSON.stringify(this.props)}`), r;
|
|
3439
3439
|
}
|
|
3440
|
-
},
|
|
3440
|
+
}, B = class {
|
|
3441
3441
|
string = void 0;
|
|
3442
3442
|
props = void 0;
|
|
3443
3443
|
constructor(e, t = !1) {
|
|
3444
3444
|
this.position = e, this.required = t;
|
|
3445
3445
|
}
|
|
3446
|
-
},
|
|
3447
|
-
Object.fromEntries(
|
|
3448
|
-
var { values:
|
|
3446
|
+
}, V = z.fromBase64("AAAEAAAAAAD/////wQIAAB+LCAC1xcFoAgPtmj1IHUEQxzd5FiaEkMLSKqQIViEQCEmTjyqk\n SUgR7OySTrHxdVoIYqUg2AgqFhYWFhYidpYqKDaClVZaqJWF2qj/xT1cjjtv772Z3T1uHvzY\n 753d2b252ds3+1SpRbAMVkGSrlMo5LNjIfqoB/uEfR2Ao5yy4zb7PgUX4Brcgo6GUi9AF+gG\n r0EPeAc+AN3mM8KvJu6DH0bWb08yeyEneV77rHia/yjbMvEBxJum7mCqzQjSo1beuBWfRFy3\n 1fHpR2QJgiAIgiAIgiAIQpoZc45c8HhGd2WJYUyy5oIgCP5oRPhuEQQh7vvPVuAe34q5x1lH\n uJFh15J7HRt9Z7MJ9iKwg1fP72kG4osqz3ynUlNPHjhC2i5/9UypX8DOa6bSa0hfAbsf33zE\n /EPLr7NtOYj4zlTfD+v7dG0r8uzhXM39qEPH9TtBvTNwUXK9dyv0frzE3DSxje8mZ0yNjuz8\n zlT+S6T1OnQh7M5oo+f+Bvk67EGY/OfiPeKfTL5+hr6ZuM13k/cT4R/QC86tMfdZbf4a2Un6\n H9L9OXNIGCoo12yDYdR7mzG+tP8yhjoTpt607tuh/6r7b1VG7yv5ya/OP7iZQXEdYyi9UNel\n WKM83YTQE/f8qftudz9y7G/OdWlXLxTPYRm9cu+ZMutMaYuK2tnjyqpb5jnPa8+xH7n3eJFO\n ivRGbTNC6su3PeHYM0V7OxZ/hUtWLP5ZFfzDmMYQSieU8qj78rF3fMsI+axX5fwWYvw+5t9u\n f0VnNR964yh31bdLOce8qfYb11ndVWeUvibHfCj8tZD2LNZvTRyyW/GfQr1/OM8gob/LcPn8\n If3iVmVT23Iu/69KaxHzOYn6XenTNw1551DW/3V5X7v6c9Tfh7jPX9TrFtqOhjgPttqeW28u\n 33192kvqs2vW7w7BeyuJcEoAAB+LCAC1xcFoAgOLVvJT0lGKVIoFANHfAiwJAAAA");
|
|
3447
|
+
Object.fromEntries(V.values.map((e, t) => [e, t]));
|
|
3448
|
+
var { values: Ct } = V, { AK: wt, AL: H, AP: Tt, AS: Et, B2: Dt, BA: Ot, BB: kt, BK: At, CB: jt, CL: Mt, CM: Nt, CP: Pt, CR: Ft, EB: It, EM: Lt, EX: Rt, GL: zt, H2: Bt, H3: Vt, HH: Ht, HL: U, HY: Ut, ID: Wt, IN: Gt, IS: W, JL: Kt, JT: qt, JV: Jt, LF: Yt, NU: G, OP: Xt, NL: Zt, NS: Qt, PO: $t, PR: en, RI: tn, SP: K, SY: nn, QU: q, VF: rn, VI: an, WJ: on, ZW: sn, ZWJ: cn } = ct, ln = /* @__PURE__ */ new Set([
|
|
3449
|
+
H,
|
|
3449
3450
|
U,
|
|
3450
|
-
|
|
3451
|
-
K
|
|
3452
|
-
]), ln = /* @__PURE__ */ new Set([
|
|
3453
|
-
kt,
|
|
3454
|
-
Pt,
|
|
3455
|
-
Jt,
|
|
3456
|
-
Xt,
|
|
3457
|
-
q,
|
|
3458
|
-
on
|
|
3451
|
+
G
|
|
3459
3452
|
]), un = /* @__PURE__ */ new Set([
|
|
3460
|
-
|
|
3453
|
+
At,
|
|
3461
3454
|
Ft,
|
|
3462
|
-
|
|
3455
|
+
Yt,
|
|
3456
|
+
Zt,
|
|
3457
|
+
K,
|
|
3458
|
+
sn
|
|
3463
3459
|
]), dn = /* @__PURE__ */ new Set([
|
|
3464
|
-
|
|
3465
|
-
|
|
3466
|
-
|
|
3467
|
-
Bt
|
|
3460
|
+
Wt,
|
|
3461
|
+
It,
|
|
3462
|
+
Lt
|
|
3468
3463
|
]), fn = /* @__PURE__ */ new Set([
|
|
3469
|
-
Gt,
|
|
3470
|
-
qt,
|
|
3471
3464
|
Kt,
|
|
3465
|
+
Jt,
|
|
3466
|
+
Bt,
|
|
3467
|
+
Vt
|
|
3468
|
+
]), pn = /* @__PURE__ */ new Set([
|
|
3469
|
+
Kt,
|
|
3470
|
+
Jt,
|
|
3471
|
+
qt,
|
|
3472
|
+
Bt,
|
|
3473
|
+
Vt
|
|
3474
|
+
]), mn = /* @__PURE__ */ new Set([Jt, qt]), hn = /* @__PURE__ */ new Set([
|
|
3475
|
+
K,
|
|
3472
3476
|
zt,
|
|
3473
|
-
|
|
3474
|
-
|
|
3477
|
+
on,
|
|
3478
|
+
Mt,
|
|
3475
3479
|
q,
|
|
3476
|
-
Rt,
|
|
3477
|
-
an,
|
|
3478
|
-
jt,
|
|
3479
|
-
J,
|
|
3480
|
-
Nt,
|
|
3481
|
-
Lt,
|
|
3482
|
-
G,
|
|
3483
|
-
tn,
|
|
3484
|
-
kt,
|
|
3485
3480
|
Pt,
|
|
3486
|
-
|
|
3487
|
-
|
|
3488
|
-
|
|
3489
|
-
|
|
3481
|
+
Rt,
|
|
3482
|
+
W,
|
|
3483
|
+
nn,
|
|
3484
|
+
At,
|
|
3485
|
+
Ft,
|
|
3486
|
+
Yt,
|
|
3487
|
+
Zt,
|
|
3488
|
+
sn
|
|
3489
|
+
]), gn = /* @__PURE__ */ new Set([
|
|
3490
3490
|
-1,
|
|
3491
|
-
|
|
3492
|
-
|
|
3493
|
-
Jt,
|
|
3494
|
-
Xt,
|
|
3491
|
+
At,
|
|
3492
|
+
Ft,
|
|
3495
3493
|
Yt,
|
|
3496
|
-
|
|
3497
|
-
|
|
3494
|
+
Zt,
|
|
3495
|
+
Xt,
|
|
3498
3496
|
q,
|
|
3499
|
-
|
|
3500
|
-
|
|
3497
|
+
zt,
|
|
3498
|
+
K,
|
|
3499
|
+
sn
|
|
3500
|
+
]), J = Symbol("PASS"), Y = Symbol("NO_BREAK"), X = Symbol("MAY_BREAK"), _n = Symbol("MUST_BREAK");
|
|
3501
3501
|
function vn(e) {
|
|
3502
|
-
return e.cur.cls === -1 && e.next.cls !== -2 ?
|
|
3502
|
+
return e.cur.cls === -1 && e.next.cls !== -2 ? Y : J;
|
|
3503
3503
|
}
|
|
3504
3504
|
function yn(e) {
|
|
3505
|
-
return e.next.cls === -2 && (e.cur.len === 0 || e.cur.len !== e.prevChunk) ? _n :
|
|
3505
|
+
return e.next.cls === -2 && (e.cur.len === 0 || e.cur.len !== e.prevChunk) ? _n : J;
|
|
3506
3506
|
}
|
|
3507
3507
|
function bn(e) {
|
|
3508
|
-
return e.cur.cls ===
|
|
3508
|
+
return e.cur.cls === At ? _n : J;
|
|
3509
3509
|
}
|
|
3510
3510
|
function xn(e) {
|
|
3511
3511
|
switch (e.cur.cls) {
|
|
3512
|
-
case
|
|
3513
|
-
case
|
|
3514
|
-
case
|
|
3512
|
+
case Ft: return e.next.cls === Yt ? Y : _n;
|
|
3513
|
+
case Yt:
|
|
3514
|
+
case Zt: return _n;
|
|
3515
3515
|
}
|
|
3516
|
-
return
|
|
3516
|
+
return J;
|
|
3517
3517
|
}
|
|
3518
3518
|
function Sn(e) {
|
|
3519
3519
|
switch (e.next.cls) {
|
|
3520
|
-
case
|
|
3521
|
-
case
|
|
3522
|
-
case
|
|
3523
|
-
case
|
|
3520
|
+
case At:
|
|
3521
|
+
case Ft:
|
|
3522
|
+
case Yt:
|
|
3523
|
+
case Zt: return Y;
|
|
3524
3524
|
}
|
|
3525
|
-
return
|
|
3525
|
+
return J;
|
|
3526
3526
|
}
|
|
3527
3527
|
function Cn(e) {
|
|
3528
|
-
return e.cur.cls !==
|
|
3528
|
+
return e.cur.cls !== tn && (e.RI = 0), e.spaces ? (e.next.cls !== K && (e.spaces = !1), Y) : J;
|
|
3529
3529
|
}
|
|
3530
3530
|
function wn(e) {
|
|
3531
|
-
if (e.next.cls ===
|
|
3532
|
-
if (e.next.cls ===
|
|
3533
|
-
case
|
|
3534
|
-
case
|
|
3535
|
-
case
|
|
3536
|
-
case
|
|
3537
|
-
case
|
|
3538
|
-
case
|
|
3539
|
-
default: return
|
|
3531
|
+
if (e.next.cls === sn) return Y;
|
|
3532
|
+
if (e.next.cls === K) switch (e.cur.cls) {
|
|
3533
|
+
case sn:
|
|
3534
|
+
case Xt:
|
|
3535
|
+
case q:
|
|
3536
|
+
case Mt:
|
|
3537
|
+
case Pt:
|
|
3538
|
+
case Dt: break;
|
|
3539
|
+
default: return Y;
|
|
3540
3540
|
}
|
|
3541
|
-
return
|
|
3541
|
+
return J;
|
|
3542
3542
|
}
|
|
3543
3543
|
function Tn(e) {
|
|
3544
|
-
return e.LB8 ? (e.LB8 = !1,
|
|
3544
|
+
return e.LB8 ? (e.LB8 = !1, X) : e.cur.cls === sn ? e.next.cls === K ? (e.LB8 = !0, Y) : X : J;
|
|
3545
3545
|
}
|
|
3546
3546
|
function En(e) {
|
|
3547
|
-
return e.cur.cls ===
|
|
3547
|
+
return e.cur.cls === cn ? Y : J;
|
|
3548
3548
|
}
|
|
3549
3549
|
function Dn(e) {
|
|
3550
|
-
return !
|
|
3550
|
+
return !un.has(e.cur.cls) && (e.next.cls === Nt || e.next.cls === cn) ? (e.next.ignored = !0, Y) : J;
|
|
3551
3551
|
}
|
|
3552
3552
|
function On(e) {
|
|
3553
|
-
return e.cur.cls ===
|
|
3553
|
+
return e.cur.cls === Nt && (e.cur.cls = H), e.next.cls === Nt && (e.next.cls = H), J;
|
|
3554
3554
|
}
|
|
3555
3555
|
function kn(e) {
|
|
3556
|
-
return e.next.cls ===
|
|
3556
|
+
return e.next.cls === on || e.cur.cls === on ? Y : J;
|
|
3557
3557
|
}
|
|
3558
3558
|
function An(e) {
|
|
3559
|
-
return e.cur.cls ===
|
|
3559
|
+
return e.cur.cls === zt ? Y : J;
|
|
3560
3560
|
}
|
|
3561
3561
|
function jn(e) {
|
|
3562
|
-
if (e.next.cls ===
|
|
3563
|
-
case
|
|
3564
|
-
case
|
|
3565
|
-
case
|
|
3566
|
-
case
|
|
3567
|
-
default: return
|
|
3562
|
+
if (e.next.cls === zt) switch (e.cur.cls) {
|
|
3563
|
+
case K:
|
|
3564
|
+
case Ot:
|
|
3565
|
+
case Ut:
|
|
3566
|
+
case Ht: return J;
|
|
3567
|
+
default: return Y;
|
|
3568
3568
|
}
|
|
3569
|
-
return
|
|
3569
|
+
return J;
|
|
3570
3570
|
}
|
|
3571
3571
|
function Mn(e) {
|
|
3572
3572
|
switch (e.next.cls) {
|
|
3573
|
-
case
|
|
3574
|
-
case
|
|
3575
|
-
case
|
|
3576
|
-
case
|
|
3573
|
+
case Mt:
|
|
3574
|
+
case Pt:
|
|
3575
|
+
case Rt:
|
|
3576
|
+
case nn: return Y;
|
|
3577
3577
|
}
|
|
3578
|
-
return
|
|
3578
|
+
return J;
|
|
3579
3579
|
}
|
|
3580
3580
|
function Nn(e) {
|
|
3581
|
-
return e.cur.cls ===
|
|
3581
|
+
return e.cur.cls === Xt ? (e.next.cls === K && (e.spaces = !0), Y) : J;
|
|
3582
3582
|
}
|
|
3583
3583
|
function Pn(e) {
|
|
3584
|
-
return
|
|
3584
|
+
return gn.has(e.prev.cls) && /^\p{Pi}$/u.test(e.cur.char) && e.cur.cls === q ? (e.spaces = !0, Y) : J;
|
|
3585
3585
|
}
|
|
3586
3586
|
function Fn(e) {
|
|
3587
|
-
if (/^\p{gc=Pf}$/u.test(e.next.char) && e.next.cls ===
|
|
3587
|
+
if (/^\p{gc=Pf}$/u.test(e.next.char) && e.next.cls === q) {
|
|
3588
3588
|
let t = e.afterNext();
|
|
3589
|
-
if (!t ||
|
|
3589
|
+
if (!t || hn.has(t.cls)) return Y;
|
|
3590
3590
|
}
|
|
3591
|
-
return
|
|
3591
|
+
return J;
|
|
3592
3592
|
}
|
|
3593
3593
|
function In(e) {
|
|
3594
|
-
return e.cur.cls ===
|
|
3594
|
+
return e.cur.cls === K && e.next.cls === W && e.afterNext()?.cls === G ? X : J;
|
|
3595
3595
|
}
|
|
3596
3596
|
function Ln(e) {
|
|
3597
|
-
return e.next.cls ===
|
|
3597
|
+
return e.next.cls === W ? Y : J;
|
|
3598
3598
|
}
|
|
3599
3599
|
function Rn(e) {
|
|
3600
|
-
if (e.cur.cls ===
|
|
3601
|
-
if (e.classAfterSpaces(e.cur.len) ===
|
|
3602
|
-
if (e.next.cls ===
|
|
3600
|
+
if (e.cur.cls === Mt || e.cur.cls === Pt) {
|
|
3601
|
+
if (e.classAfterSpaces(e.cur.len) === Qt) return e.next.cls === K && (e.spaces = !0), Y;
|
|
3602
|
+
if (e.next.cls === K) return Y;
|
|
3603
3603
|
}
|
|
3604
|
-
return
|
|
3604
|
+
return J;
|
|
3605
3605
|
}
|
|
3606
3606
|
function zn(e) {
|
|
3607
|
-
if (e.cur.cls ===
|
|
3608
|
-
if (e.classAfterSpaces(e.cur.len) ===
|
|
3609
|
-
if (e.next.cls ===
|
|
3607
|
+
if (e.cur.cls === Dt) {
|
|
3608
|
+
if (e.classAfterSpaces(e.cur.len) === Dt) return e.next.cls === K && (e.spaces = !0), Y;
|
|
3609
|
+
if (e.next.cls === K) return Y;
|
|
3610
3610
|
}
|
|
3611
|
-
return
|
|
3611
|
+
return J;
|
|
3612
3612
|
}
|
|
3613
3613
|
function Bn(e) {
|
|
3614
|
-
return e.cur.cls ===
|
|
3614
|
+
return e.cur.cls === K ? X : J;
|
|
3615
3615
|
}
|
|
3616
3616
|
function Vn(e) {
|
|
3617
|
-
return e.next.cls ===
|
|
3617
|
+
return e.next.cls === q && !/^\p{Pi}$/u.test(e.next.char) || e.cur.cls === q && !/^\p{Pf}$/u.test(e.cur.char) ? Y : J;
|
|
3618
3618
|
}
|
|
3619
3619
|
function Hn(e) {
|
|
3620
|
-
if (!
|
|
3621
|
-
if (e.next.cls ===
|
|
3620
|
+
if (!V.get(e.cur.cp) && e.next.cls === q) return Y;
|
|
3621
|
+
if (e.next.cls === q) {
|
|
3622
3622
|
let t = e.afterNext();
|
|
3623
|
-
if (!t || !
|
|
3623
|
+
if (!t || !V.get(t.cp)) return Y;
|
|
3624
3624
|
}
|
|
3625
|
-
return e.cur.cls ===
|
|
3625
|
+
return e.cur.cls === q && !V.get(e.next.cp) || (e.prev.cls === -1 || !V.get(e.prev.cp)) && e.cur.cls === q ? Y : J;
|
|
3626
3626
|
}
|
|
3627
3627
|
function Un(e) {
|
|
3628
|
-
return e.cur.cls ===
|
|
3628
|
+
return e.cur.cls === jt || e.next.cls === jt ? X : J;
|
|
3629
3629
|
}
|
|
3630
3630
|
var Wn = /* @__PURE__ */ new Set([
|
|
3631
3631
|
-1,
|
|
3632
|
-
kt,
|
|
3633
|
-
Pt,
|
|
3634
|
-
Jt,
|
|
3635
|
-
Xt,
|
|
3636
|
-
q,
|
|
3637
|
-
on,
|
|
3638
3632
|
At,
|
|
3639
|
-
|
|
3633
|
+
Ft,
|
|
3634
|
+
Yt,
|
|
3635
|
+
Zt,
|
|
3636
|
+
K,
|
|
3637
|
+
sn,
|
|
3638
|
+
jt,
|
|
3639
|
+
zt
|
|
3640
3640
|
]);
|
|
3641
3641
|
function Gn(e) {
|
|
3642
|
-
return Wn.has(e.prev.cls) && (e.cur.cls ===
|
|
3642
|
+
return Wn.has(e.prev.cls) && (e.cur.cls === Ut || e.cur.cls === Ht) && (e.next.cls === H || e.next.cls === U) ? Y : J;
|
|
3643
3643
|
}
|
|
3644
3644
|
function Kn(e) {
|
|
3645
|
-
if (e.cur.cls ===
|
|
3645
|
+
if (e.cur.cls === kt) return Y;
|
|
3646
3646
|
switch (e.next.cls) {
|
|
3647
|
-
case
|
|
3648
|
-
case Vt:
|
|
3647
|
+
case Ot:
|
|
3649
3648
|
case Ht:
|
|
3650
|
-
case
|
|
3649
|
+
case Ut:
|
|
3650
|
+
case Qt: return Y;
|
|
3651
3651
|
}
|
|
3652
|
-
return
|
|
3652
|
+
return J;
|
|
3653
3653
|
}
|
|
3654
3654
|
function qn(e) {
|
|
3655
|
-
return e.prev.cls ===
|
|
3655
|
+
return e.prev.cls === U && (e.cur.cls === Ut || e.cur.cls === Ht) && e.next.cls !== U ? Y : J;
|
|
3656
3656
|
}
|
|
3657
3657
|
function Jn(e) {
|
|
3658
|
-
return e.cur.cls ===
|
|
3658
|
+
return e.cur.cls === nn && e.next.cls === U ? Y : J;
|
|
3659
3659
|
}
|
|
3660
3660
|
function Yn(e) {
|
|
3661
|
-
return e.next.cls ===
|
|
3661
|
+
return e.next.cls === Gt ? Y : J;
|
|
3662
3662
|
}
|
|
3663
3663
|
function Xn(e) {
|
|
3664
3664
|
switch (e.cur.cls) {
|
|
3665
|
+
case H:
|
|
3665
3666
|
case U:
|
|
3666
|
-
|
|
3667
|
-
if (e.next.cls === K) return X;
|
|
3667
|
+
if (e.next.cls === G) return Y;
|
|
3668
3668
|
break;
|
|
3669
|
-
case
|
|
3669
|
+
case G: if (e.next.cls === H || e.next.cls === U) return Y;
|
|
3670
3670
|
}
|
|
3671
|
-
return
|
|
3671
|
+
return J;
|
|
3672
3672
|
}
|
|
3673
3673
|
function Zn(e) {
|
|
3674
|
-
return e.cur.cls ===
|
|
3674
|
+
return e.cur.cls === en && dn.has(e.next.cls) || e.next.cls === $t && dn.has(e.cur.cls) ? Y : J;
|
|
3675
3675
|
}
|
|
3676
3676
|
function Qn(e) {
|
|
3677
|
-
return (e.cur.cls ===
|
|
3677
|
+
return (e.cur.cls === en || e.cur.cls === $t) && (e.next.cls === H || e.next.cls === U) || (e.cur.cls === H || e.cur.cls === U) && (e.next.cls === en || e.next.cls === $t) ? Y : J;
|
|
3678
3678
|
}
|
|
3679
|
-
var $n = /* @__PURE__ */ new Set([
|
|
3679
|
+
var $n = /* @__PURE__ */ new Set([$t, en]), er = /* @__PURE__ */ new Set([Mt, Pt]);
|
|
3680
3680
|
function tr(e) {
|
|
3681
3681
|
let t = null;
|
|
3682
|
-
if ($n.has(e.next.cls) ? t = er.has(e.cur.cls) ? e.prev.len : e.cur.len : e.next.cls ===
|
|
3683
|
-
case
|
|
3684
|
-
case
|
|
3685
|
-
case
|
|
3682
|
+
if ($n.has(e.next.cls) ? t = er.has(e.cur.cls) ? e.prev.len : e.cur.len : e.next.cls === G && (t = e.cur.len), t !== null) SyIsLoop: for (let { cls: n } of e.codePoints(t, !1)) switch (n) {
|
|
3683
|
+
case nn:
|
|
3684
|
+
case W: continue;
|
|
3685
|
+
case G: return Y;
|
|
3686
3686
|
default: break SyIsLoop;
|
|
3687
3687
|
}
|
|
3688
|
-
if (e.cur.cls ===
|
|
3689
|
-
if (e.next.cls ===
|
|
3688
|
+
if (e.cur.cls === $t || e.cur.cls === en) {
|
|
3689
|
+
if (e.next.cls === Xt) {
|
|
3690
3690
|
let t = e.afterNext();
|
|
3691
|
-
if (t && (t.cls ===
|
|
3692
|
-
} else if (e.next.cls ===
|
|
3691
|
+
if (t && (t.cls === G || t.cls === W && e.afterNext(2)?.cls === G)) return Y;
|
|
3692
|
+
} else if (e.next.cls === G) return Y;
|
|
3693
3693
|
}
|
|
3694
|
-
return e.cur.cls ===
|
|
3694
|
+
return e.cur.cls === Ut && e.next.cls === G || e.cur.cls === W && e.next.cls === G ? Y : J;
|
|
3695
3695
|
}
|
|
3696
3696
|
function nr(e) {
|
|
3697
3697
|
switch (e.cur.cls) {
|
|
3698
|
-
case
|
|
3699
|
-
if (
|
|
3698
|
+
case Kt:
|
|
3699
|
+
if (fn.has(e.next.cls)) return Y;
|
|
3700
3700
|
break;
|
|
3701
|
-
case
|
|
3702
|
-
case
|
|
3703
|
-
if (
|
|
3701
|
+
case Jt:
|
|
3702
|
+
case Bt:
|
|
3703
|
+
if (mn.has(e.next.cls)) return Y;
|
|
3704
3704
|
break;
|
|
3705
|
-
case
|
|
3706
|
-
case
|
|
3705
|
+
case qt:
|
|
3706
|
+
case Vt: if (e.next.cls === qt) return Y;
|
|
3707
3707
|
}
|
|
3708
|
-
return
|
|
3708
|
+
return J;
|
|
3709
3709
|
}
|
|
3710
3710
|
function rr(e) {
|
|
3711
3711
|
switch (e.cur.cls) {
|
|
3712
|
-
case Gt:
|
|
3713
|
-
case qt:
|
|
3714
3712
|
case Kt:
|
|
3715
|
-
case
|
|
3713
|
+
case Jt:
|
|
3714
|
+
case qt:
|
|
3716
3715
|
case Bt:
|
|
3717
|
-
|
|
3716
|
+
case Vt:
|
|
3717
|
+
if (e.next.cls === $t) return Y;
|
|
3718
3718
|
break;
|
|
3719
|
-
case
|
|
3719
|
+
case en: if (pn.has(e.next.cls)) return Y;
|
|
3720
3720
|
}
|
|
3721
|
-
return
|
|
3721
|
+
return J;
|
|
3722
3722
|
}
|
|
3723
3723
|
function ar(e) {
|
|
3724
|
-
return (e.cur.cls ===
|
|
3724
|
+
return (e.cur.cls === H || e.cur.cls === U) && (e.next.cls === H || e.next.cls === U) ? Y : J;
|
|
3725
3725
|
}
|
|
3726
3726
|
function or(e) {
|
|
3727
3727
|
let { prev: t, cur: n, next: r } = e;
|
|
3728
3728
|
function i(e) {
|
|
3729
|
-
return e.cls ===
|
|
3729
|
+
return e.cls === wt || e.char === "◌" || e.cls === Et;
|
|
3730
3730
|
}
|
|
3731
|
-
return n.cls ===
|
|
3731
|
+
return n.cls === Tt && i(r) || i(n) && (r.cls === rn || r.cls === an) || i(t) && n.cls === an && (r.cls === wt || r.char === "◌") || i(n) && i(r) && e.afterNext()?.cls === rn ? Y : J;
|
|
3732
3732
|
}
|
|
3733
3733
|
function sr(e) {
|
|
3734
|
-
return e.cur.cls ===
|
|
3734
|
+
return e.cur.cls === W && (e.next.cls === H || e.next.cls === U) ? Y : J;
|
|
3735
3735
|
}
|
|
3736
3736
|
function cr(e) {
|
|
3737
3737
|
switch (e.cur.cls) {
|
|
3738
|
+
case H:
|
|
3738
3739
|
case U:
|
|
3739
|
-
case
|
|
3740
|
-
|
|
3741
|
-
if (e.next.cls === Yt && !H.get(e.next.cp)) return X;
|
|
3740
|
+
case G:
|
|
3741
|
+
if (e.next.cls === Xt && !V.get(e.next.cp)) return Y;
|
|
3742
3742
|
break;
|
|
3743
|
-
case
|
|
3743
|
+
case Pt: if (!V.get(e.cur.cp) && ln.has(e.next.cls)) return Y;
|
|
3744
3744
|
}
|
|
3745
|
-
return
|
|
3745
|
+
return J;
|
|
3746
3746
|
}
|
|
3747
3747
|
function lr(e) {
|
|
3748
|
-
if (e.cur.cls ===
|
|
3749
|
-
if (e.next.cls ===
|
|
3748
|
+
if (e.cur.cls === tn) {
|
|
3749
|
+
if (e.next.cls === tn && ++e.RI % 2 != 0) return Y;
|
|
3750
3750
|
} else e.RI = 0;
|
|
3751
|
-
return
|
|
3751
|
+
return J;
|
|
3752
3752
|
}
|
|
3753
3753
|
function ur(e) {
|
|
3754
|
-
return e.cur.cls ===
|
|
3754
|
+
return e.cur.cls === It && e.next.cls === Lt || e.next.cls === Lt && /^\p{ExtPict}$/u.test(e.cur.char) && /^\p{gc=Cn}$/u.test(e.cur.char) ? Y : J;
|
|
3755
3755
|
}
|
|
3756
3756
|
function dr() {
|
|
3757
|
-
return
|
|
3757
|
+
return X;
|
|
3758
3758
|
}
|
|
3759
3759
|
var fr = [
|
|
3760
3760
|
vn,
|
|
@@ -3810,7 +3810,7 @@ var fr = [
|
|
|
3810
3810
|
verbose: !1,
|
|
3811
3811
|
...e
|
|
3812
3812
|
}, this.rules = [...fr], this.#e.example7) throw Error("'example7' flag deprecated");
|
|
3813
|
-
this.#e.verbose && this.rules.unshift((e) => (console.log(e.cur.len, e),
|
|
3813
|
+
this.#e.verbose && this.rules.unshift((e) => (console.log(e.cur.len, e), J));
|
|
3814
3814
|
}
|
|
3815
3815
|
removeRule(...e) {
|
|
3816
3816
|
let t = [];
|
|
@@ -3835,10 +3835,10 @@ var fr = [
|
|
|
3835
3835
|
for (let t of this.rules) {
|
|
3836
3836
|
let n = t.call(this, e);
|
|
3837
3837
|
switch (n) {
|
|
3838
|
-
case
|
|
3839
|
-
case
|
|
3840
|
-
case
|
|
3841
|
-
case _n: return this.#e.verbose && console.log(` ${t.name}: MUST_BREAK`), new
|
|
3838
|
+
case J: break;
|
|
3839
|
+
case Y: return this.#e.verbose && console.log(` ${t.name}: NO_BREAK`), null;
|
|
3840
|
+
case X: return this.#e.verbose && console.log(` ${t.name}: MAY_BREAK`), new B(e.cur.len);
|
|
3841
|
+
case _n: return this.#e.verbose && console.log(` ${t.name}: MUST_BREAK`), new B(e.cur.len, !0);
|
|
3842
3842
|
default: throw Error(`Invalid state: "${n}"`);
|
|
3843
3843
|
}
|
|
3844
3844
|
}
|
|
@@ -3849,7 +3849,7 @@ var fr = [
|
|
|
3849
3849
|
t && (this.#e.string && (t.string = e.str.slice(e.prevChunk, e.cur.len)), e.props &&= (t.props = e.props, void 0), yield t, e.prevChunk = e.cur.len);
|
|
3850
3850
|
}
|
|
3851
3851
|
*breaks(e) {
|
|
3852
|
-
let t = new
|
|
3852
|
+
let t = new St(e);
|
|
3853
3853
|
for (let e of t.codePoints(0)) t.push(e), yield* this.#n(t);
|
|
3854
3854
|
t.pushEnd(), yield* this.#n(t);
|
|
3855
3855
|
}
|
|
@@ -3953,7 +3953,7 @@ var Z = class extends Error {
|
|
|
3953
3953
|
}, Cr = /* @__PURE__ */ new Set(["say", "think"]), wr = /* @__PURE__ */ new Set([
|
|
3954
3954
|
"idle",
|
|
3955
3955
|
"talking",
|
|
3956
|
-
"awaiting-
|
|
3956
|
+
"awaiting-continue"
|
|
3957
3957
|
]);
|
|
3958
3958
|
function Q(e) {
|
|
3959
3959
|
return typeof e == "object" && !!e && !Array.isArray(e);
|
|
@@ -3978,26 +3978,28 @@ function Er(e, t, n) {
|
|
|
3978
3978
|
}
|
|
3979
3979
|
function Dr(e) {
|
|
3980
3980
|
if (!Q(e)) throw new Z("BUBBLE-COMPOSITION-001", "Bubble portrait must be an object.");
|
|
3981
|
-
Tr(e, ["base"], ["blink", "
|
|
3982
|
-
let t = e.blink === void 0 ? void 0 : Er(e.blink, "Bubble portrait blink", 1), n = e.
|
|
3981
|
+
Tr(e, ["base"], ["blink", "lipSync"], "Bubble portrait");
|
|
3982
|
+
let t = e.blink === void 0 ? void 0 : Er(e.blink, "Bubble portrait blink", 1), n = e.lipSync === void 0 ? void 0 : Er(e.lipSync, "Bubble portrait lip-sync", 1);
|
|
3983
3983
|
return Object.freeze({
|
|
3984
3984
|
base: $(e.base, "Bubble portrait base"),
|
|
3985
3985
|
...t === void 0 ? {} : { blink: t },
|
|
3986
|
-
...n === void 0 ? {} : {
|
|
3986
|
+
...n === void 0 ? {} : { lipSync: n }
|
|
3987
3987
|
});
|
|
3988
3988
|
}
|
|
3989
3989
|
function Or(e) {
|
|
3990
3990
|
if (!Q(e)) throw new Z("BUBBLE-COMPOSITION-001", "Bubble style must be an object.");
|
|
3991
3991
|
Tr(e, ["name", "textStyle"], [
|
|
3992
3992
|
"placement",
|
|
3993
|
+
"maxWidth",
|
|
3994
|
+
"textLocale",
|
|
3993
3995
|
"distance",
|
|
3994
3996
|
"tailLength",
|
|
3995
3997
|
"offset",
|
|
3996
3998
|
"visualStyle",
|
|
3997
3999
|
"portrait",
|
|
3998
|
-
"
|
|
4000
|
+
"continueIndicator"
|
|
3999
4001
|
], "Bubble style");
|
|
4000
|
-
let t = e.portrait === void 0 ? void 0 : Dr(e.portrait), n = e.
|
|
4002
|
+
let t = e.portrait === void 0 ? void 0 : Dr(e.portrait), n = e.continueIndicator === void 0 ? void 0 : Er(e.continueIndicator, "Bubble continue indicator", 2), r;
|
|
4001
4003
|
try {
|
|
4002
4004
|
r = y(e.placement ?? "up-right");
|
|
4003
4005
|
} catch (e) {
|
|
@@ -4005,82 +4007,110 @@ function Or(e) {
|
|
|
4005
4007
|
}
|
|
4006
4008
|
let i, a, o;
|
|
4007
4009
|
try {
|
|
4008
|
-
i =
|
|
4010
|
+
i = w(e.distance ?? 12), a = te(e.tailLength ?? 18), o = e.offset === void 0 ? ee : T(e.offset);
|
|
4009
4011
|
} catch (e) {
|
|
4010
4012
|
throw new Z("BUBBLE-COMPOSITION-001", e instanceof Error ? e.message : "Bubble actor-relative transform is invalid.");
|
|
4011
4013
|
}
|
|
4012
4014
|
let s = e.visualStyle ?? "NORMAL";
|
|
4013
|
-
if (typeof s != "string" || !
|
|
4015
|
+
if (typeof s != "string" || !O.includes(s)) throw new Z("BUBBLE-COMPOSITION-001", `Unsupported Bubble visual style: ${String(s)}`);
|
|
4016
|
+
let c;
|
|
4017
|
+
if (e.maxWidth !== void 0) {
|
|
4018
|
+
if (typeof e.maxWidth != "number" || !Number.isFinite(e.maxWidth) || e.maxWidth <= 0) throw new Z("BUBBLE-COMPOSITION-001", "Bubble style maxWidth must be a positive finite number.");
|
|
4019
|
+
c = e.maxWidth;
|
|
4020
|
+
}
|
|
4021
|
+
let l = e.textLocale === void 0 ? void 0 : $(e.textLocale, "Bubble style text locale");
|
|
4014
4022
|
return Object.freeze({
|
|
4015
4023
|
name: $(e.name, "Bubble style name"),
|
|
4016
4024
|
textStyle: $(e.textStyle, "Bubble text style name"),
|
|
4025
|
+
...c === void 0 ? {} : { maxWidth: c },
|
|
4026
|
+
...l === void 0 ? {} : { textLocale: l },
|
|
4017
4027
|
placement: r,
|
|
4018
4028
|
distance: i,
|
|
4019
4029
|
tailLength: a,
|
|
4020
4030
|
offset: o,
|
|
4021
4031
|
visualStyle: s,
|
|
4022
4032
|
...t === void 0 ? {} : { portrait: t },
|
|
4023
|
-
...n === void 0 ? {} : {
|
|
4033
|
+
...n === void 0 ? {} : { continueIndicator: n }
|
|
4024
4034
|
});
|
|
4025
4035
|
}
|
|
4026
4036
|
function kr(e) {
|
|
4027
|
-
if (
|
|
4028
|
-
|
|
4037
|
+
if (e !== void 0) {
|
|
4038
|
+
if (!Q(e) || typeof e.applyToTarget != "function" || typeof e.getMimeType != "function" || typeof e.isRegistered != "function") throw TypeError("Bubble image capability must provide applyToTarget, getMimeType, and isRegistered.");
|
|
4039
|
+
return e;
|
|
4040
|
+
}
|
|
4029
4041
|
}
|
|
4030
4042
|
function Ar(e) {
|
|
4043
|
+
if (e === void 0) throw new Z("BUBBLE-COMPOSITION-006", "Bubble image assets require an image capability. Provide options.imageResolver.");
|
|
4044
|
+
return e;
|
|
4045
|
+
}
|
|
4046
|
+
function jr(e) {
|
|
4031
4047
|
if (!Q(e) || typeof e.setText != "function" || typeof e.releaseTarget != "function") throw TypeError("Bubble SVG Text composition must provide setText and releaseTarget.");
|
|
4032
4048
|
return e;
|
|
4033
4049
|
}
|
|
4034
|
-
function
|
|
4050
|
+
function Mr() {
|
|
4035
4051
|
return Object.freeze({
|
|
4036
4052
|
setTimeout: (e, t) => globalThis.setTimeout(e, t),
|
|
4037
4053
|
clearTimeout: (e) => globalThis.clearTimeout(e)
|
|
4038
4054
|
});
|
|
4039
4055
|
}
|
|
4040
|
-
function
|
|
4056
|
+
function Nr(e) {
|
|
4041
4057
|
if (!Q(e) || typeof e.setTimeout != "function" || typeof e.clearTimeout != "function") throw TypeError("Bubble scheduler must provide setTimeout and clearTimeout.");
|
|
4042
4058
|
return e;
|
|
4043
4059
|
}
|
|
4044
|
-
function
|
|
4060
|
+
function Pr(e, t) {
|
|
4045
4061
|
if (!Q(e) || typeof e.id != "string" || e.id.length === 0 || typeof e.isStage != "boolean") throw new Z("BUBBLE-COMPOSITION-004", `${t} must provide id and isStage.`);
|
|
4046
4062
|
return e;
|
|
4047
4063
|
}
|
|
4048
|
-
function
|
|
4064
|
+
function Fr(e) {
|
|
4049
4065
|
if (!Q(e) || typeof e.drawableID != "number" || !Number.isInteger(e.drawableID) || e.drawableID < 0) throw new Z("BUBBLE-COMPOSITION-004", "Bubble text target must provide a non-negative integer drawableID.");
|
|
4050
4066
|
return e;
|
|
4051
4067
|
}
|
|
4052
|
-
function
|
|
4053
|
-
if (!Q(e) || !Q(e.targets) || typeof e.setLayerVisible != "function" || typeof e.show != "function" || typeof e.hide != "function" || typeof e.dispose != "function") throw new Z("BUBBLE-COMPOSITION-004", "Bubble surface is invalid.");
|
|
4068
|
+
function Ir(e, t) {
|
|
4069
|
+
if (!Q(e) || !Q(e.targets) || typeof e.setLayerVisible != "function" || typeof e.updateStyle != "function" || typeof e.show != "function" || typeof e.hide != "function" || typeof e.dispose != "function") throw new Z("BUBBLE-COMPOSITION-004", "Bubble surface is invalid.");
|
|
4054
4070
|
let n = e.targets;
|
|
4055
|
-
|
|
4071
|
+
Fr(n.text);
|
|
4056
4072
|
let r = /* @__PURE__ */ new Set(), i = (e, t) => {
|
|
4057
4073
|
let i = n[e];
|
|
4058
4074
|
if (!t && i === void 0) return;
|
|
4059
|
-
let a =
|
|
4075
|
+
let a = Pr(i, `Bubble surface ${e}`);
|
|
4060
4076
|
if (r.has(a.id)) throw new Z("BUBBLE-COMPOSITION-004", "Bubble image layers must use distinct target IDs.");
|
|
4061
4077
|
r.add(a.id);
|
|
4062
4078
|
};
|
|
4063
|
-
return i("portraitBase", t.portrait !== void 0), i("portraitBlink", t.portrait?.blink !== void 0), i("
|
|
4079
|
+
return i("portraitBase", t.portrait !== void 0), i("portraitBlink", t.portrait?.blink !== void 0), i("portraitLipSync", t.portrait?.lipSync !== void 0), i("continueIndicator", t.continueIndicator !== void 0), e;
|
|
4064
4080
|
}
|
|
4065
|
-
function
|
|
4081
|
+
function Lr(e, t) {
|
|
4082
|
+
if (e === void 0) throw new Z("BUBBLE-COMPOSITION-006", `Bubble image capability is required for: ${t}. Provide options.imageResolver.`);
|
|
4066
4083
|
if (!e.isRegistered(t)) throw new Z("BUBBLE-COMPOSITION-003", `Bubble image asset is not registered: ${t}`);
|
|
4067
4084
|
if (!e.getMimeType(t).startsWith("image/")) throw new Z("BUBBLE-COMPOSITION-003", `Bubble asset is not an image: ${t}`);
|
|
4068
4085
|
}
|
|
4069
|
-
function
|
|
4086
|
+
function Rr(e) {
|
|
4070
4087
|
return [...e.portrait === void 0 ? [] : [
|
|
4071
4088
|
e.portrait.base,
|
|
4072
4089
|
...e.portrait.blink?.frames ?? [],
|
|
4073
|
-
...e.portrait.
|
|
4074
|
-
], ...e.
|
|
4090
|
+
...e.portrait.lipSync?.frames ?? []
|
|
4091
|
+
], ...e.continueIndicator?.frames ?? []];
|
|
4092
|
+
}
|
|
4093
|
+
function zr(e, t, n) {
|
|
4094
|
+
if (t.maxWidth === void 0) return e;
|
|
4095
|
+
if (typeof n.measureText != "function") throw new Z("BUBBLE-COMPOSITION-007", "Bubble style maxWidth requires the text capability measureText method.");
|
|
4096
|
+
return Sr({
|
|
4097
|
+
text: e,
|
|
4098
|
+
maxWidth: t.maxWidth,
|
|
4099
|
+
...t.textLocale === void 0 ? {} : { locale: t.textLocale },
|
|
4100
|
+
measureText: (e) => n.measureText?.({
|
|
4101
|
+
styleName: t.textStyle,
|
|
4102
|
+
text: e
|
|
4103
|
+
}) ?? 0
|
|
4104
|
+
}).lines.map(({ text: e }) => e).join("\n");
|
|
4075
4105
|
}
|
|
4076
|
-
function
|
|
4106
|
+
function Br(e, t) {
|
|
4077
4107
|
if (e.length === 1) throw e[0];
|
|
4078
4108
|
if (e.length > 1) throw AggregateError(e, t);
|
|
4079
4109
|
}
|
|
4080
|
-
function
|
|
4110
|
+
function Vr(e) {
|
|
4081
4111
|
let t = !1, n = 0, r = 0, i, a = Promise.resolve(), o = async (t) => {
|
|
4082
4112
|
let n = e.animation.frames[t];
|
|
4083
|
-
n !== void 0 && await e.
|
|
4113
|
+
n !== void 0 && await e.imageResolver.applyToTarget(n, e.target);
|
|
4084
4114
|
}, s = (t, n) => {
|
|
4085
4115
|
e.onError?.(t, Object.freeze({
|
|
4086
4116
|
actorKey: e.actorKey,
|
|
@@ -4112,7 +4142,7 @@ function zr(e) {
|
|
|
4112
4142
|
}
|
|
4113
4143
|
});
|
|
4114
4144
|
}
|
|
4115
|
-
function
|
|
4145
|
+
function Hr(e) {
|
|
4116
4146
|
if (!Q(e)) throw new Z("BUBBLE-COMPOSITION-001", "Show bubble input must be an object.");
|
|
4117
4147
|
if (Tr(e, [
|
|
4118
4148
|
"actor",
|
|
@@ -4133,12 +4163,12 @@ function Br(e) {
|
|
|
4133
4163
|
animationMode: t
|
|
4134
4164
|
};
|
|
4135
4165
|
}
|
|
4136
|
-
function
|
|
4166
|
+
function Ur(e) {
|
|
4137
4167
|
if (!Q(e)) throw TypeError("Bubble composition options must be an object.");
|
|
4138
|
-
let t = kr(e.
|
|
4168
|
+
let t = kr(e.imageResolver), n = jr(e.svgText);
|
|
4139
4169
|
if (typeof e.createSurface != "function") throw TypeError("Bubble composition createSurface must be a function.");
|
|
4140
4170
|
if (e.onAnimationError !== void 0 && typeof e.onAnimationError != "function") throw TypeError("Bubble composition onAnimationError must be a function.");
|
|
4141
|
-
let r =
|
|
4171
|
+
let r = Nr(e.scheduler ?? Mr()), i = /* @__PURE__ */ new Map(), a = /* @__PURE__ */ new Map(), o = /* @__PURE__ */ new Map(), s = !1, c = () => {
|
|
4142
4172
|
if (s) throw new Z("BUBBLE-COMPOSITION-005", "Bubble composition has been disposed.");
|
|
4143
4173
|
}, l = async (e, t) => {
|
|
4144
4174
|
let n = (o.get(e) ?? Promise.resolve()).catch(() => void 0).then(t);
|
|
@@ -4152,129 +4182,170 @@ function Vr(e) {
|
|
|
4152
4182
|
c();
|
|
4153
4183
|
let s = i.get(o.styleName);
|
|
4154
4184
|
if (!s) throw new Z("BUBBLE-COMPOSITION-002", `Bubble style is not defined: ${o.styleName}`);
|
|
4155
|
-
|
|
4156
|
-
|
|
4157
|
-
|
|
4158
|
-
|
|
4159
|
-
|
|
4160
|
-
|
|
4161
|
-
|
|
4162
|
-
|
|
4163
|
-
|
|
4164
|
-
|
|
4165
|
-
|
|
4166
|
-
|
|
4167
|
-
|
|
4168
|
-
|
|
4169
|
-
|
|
4170
|
-
|
|
4171
|
-
|
|
4172
|
-
i.push(
|
|
4173
|
-
let e = s.portrait.blink?.frames[0];
|
|
4174
|
-
e !== void 0 && i.push(t.applyToTarget(e, u.targets.portraitBlink));
|
|
4175
|
-
let n = s.portrait.talk?.frames[0];
|
|
4176
|
-
n !== void 0 && i.push(t.applyToTarget(n, u.targets.portraitTalk));
|
|
4185
|
+
let l = s, u = o.text, d = (e) => {
|
|
4186
|
+
let n = new Set(Rr(e)), r = n.size === 0 ? void 0 : Ar(t);
|
|
4187
|
+
for (let e of n) Lr(r, e);
|
|
4188
|
+
return r;
|
|
4189
|
+
}, f = d(l), p = async (e, t, n) => {
|
|
4190
|
+
let r = Rr(e).length === 0 ? void 0 : Ar(t), i = [];
|
|
4191
|
+
if (e.portrait) {
|
|
4192
|
+
let t = Ar(r);
|
|
4193
|
+
i.push(Promise.resolve(t.applyToTarget(e.portrait.base, n.targets.portraitBase)));
|
|
4194
|
+
let a = e.portrait.blink?.frames[0];
|
|
4195
|
+
a !== void 0 && i.push(Promise.resolve(t.applyToTarget(a, n.targets.portraitBlink)));
|
|
4196
|
+
let o = e.portrait.lipSync?.frames[0];
|
|
4197
|
+
o !== void 0 && i.push(Promise.resolve(t.applyToTarget(o, n.targets.portraitLipSync)));
|
|
4198
|
+
}
|
|
4199
|
+
let a = e.continueIndicator?.frames[0];
|
|
4200
|
+
if (a !== void 0) {
|
|
4201
|
+
let e = Ar(r);
|
|
4202
|
+
i.push(Promise.resolve(e.applyToTarget(a, n.targets.continueIndicator)));
|
|
4177
4203
|
}
|
|
4178
|
-
|
|
4179
|
-
|
|
4204
|
+
await Promise.all(i);
|
|
4205
|
+
}, m = (t, n, i) => {
|
|
4206
|
+
y = t.portrait?.blink === void 0 ? void 0 : Vr({
|
|
4180
4207
|
actorKey: o.actorKey,
|
|
4181
4208
|
layer: "portraitBlink",
|
|
4182
|
-
animation:
|
|
4183
|
-
target:
|
|
4184
|
-
|
|
4209
|
+
animation: t.portrait.blink,
|
|
4210
|
+
target: i.targets.portraitBlink,
|
|
4211
|
+
imageResolver: Ar(n),
|
|
4185
4212
|
scheduler: r,
|
|
4186
4213
|
...e.onAnimationError === void 0 ? {} : { onError: e.onAnimationError }
|
|
4187
|
-
}),
|
|
4214
|
+
}), b = t.portrait?.lipSync === void 0 ? void 0 : Vr({
|
|
4188
4215
|
actorKey: o.actorKey,
|
|
4189
|
-
layer: "
|
|
4190
|
-
animation:
|
|
4191
|
-
target:
|
|
4192
|
-
|
|
4216
|
+
layer: "portraitLipSync",
|
|
4217
|
+
animation: t.portrait.lipSync,
|
|
4218
|
+
target: i.targets.portraitLipSync,
|
|
4219
|
+
imageResolver: Ar(n),
|
|
4193
4220
|
scheduler: r,
|
|
4194
4221
|
...e.onAnimationError === void 0 ? {} : { onError: e.onAnimationError }
|
|
4195
|
-
}),
|
|
4222
|
+
}), x = t.continueIndicator === void 0 ? void 0 : Vr({
|
|
4196
4223
|
actorKey: o.actorKey,
|
|
4197
|
-
layer: "
|
|
4198
|
-
animation:
|
|
4199
|
-
target:
|
|
4200
|
-
|
|
4224
|
+
layer: "continueIndicator",
|
|
4225
|
+
animation: t.continueIndicator,
|
|
4226
|
+
target: i.targets.continueIndicator,
|
|
4227
|
+
imageResolver: Ar(n),
|
|
4201
4228
|
scheduler: r,
|
|
4202
4229
|
...e.onAnimationError === void 0 ? {} : { onError: e.onAnimationError }
|
|
4203
4230
|
});
|
|
4204
|
-
|
|
4205
|
-
|
|
4231
|
+
}, h = a.get(o.actorKey);
|
|
4232
|
+
h && await h.close();
|
|
4233
|
+
let g, _ = !1, v = !1, y, b, x;
|
|
4234
|
+
try {
|
|
4235
|
+
g = Ir(await e.createSurface(Object.freeze({
|
|
4236
|
+
actor: o.actor,
|
|
4237
|
+
actorKey: o.actorKey,
|
|
4238
|
+
kind: o.kind,
|
|
4239
|
+
style: l
|
|
4240
|
+
})), l), n.setText({
|
|
4241
|
+
styleName: l.textStyle,
|
|
4242
|
+
target: g.targets.text,
|
|
4243
|
+
text: zr(o.text, l, n)
|
|
4244
|
+
}), _ = !0, await p(l, f, g), m(l, f, g);
|
|
4245
|
+
let t = "idle", r = !1, i = Promise.resolve(), s = async (e) => {
|
|
4246
|
+
e !== t && (e === "talking" ? (await x?.stop(), await g?.setLayerVisible("continueIndicator", !1), await g?.setLayerVisible("portraitLipSync", b !== void 0), await b?.start({ primed: !0 })) : e === "awaiting-continue" ? (await b?.stop({ reset: !0 }), await g?.setLayerVisible("portraitLipSync", !1), await g?.setLayerVisible("continueIndicator", x !== void 0), await x?.start({ primed: !0 })) : (await Promise.all([b?.stop({ reset: !0 }), x?.stop()]), await Promise.all([g?.setLayerVisible("portraitLipSync", !1), g?.setLayerVisible("continueIndicator", !1)])), t = e);
|
|
4206
4247
|
};
|
|
4207
4248
|
await Promise.all([
|
|
4208
|
-
|
|
4209
|
-
|
|
4210
|
-
|
|
4211
|
-
|
|
4212
|
-
]), await
|
|
4213
|
-
let
|
|
4249
|
+
g.setLayerVisible("portraitBase", l.portrait !== void 0),
|
|
4250
|
+
g.setLayerVisible("portraitBlink", l.portrait?.blink !== void 0),
|
|
4251
|
+
g.setLayerVisible("portraitLipSync", !1),
|
|
4252
|
+
g.setLayerVisible("continueIndicator", !1)
|
|
4253
|
+
]), await g.show(), v = !0, await y?.start({ primed: !0 }), await s(o.animationMode);
|
|
4254
|
+
let c = Object.freeze({
|
|
4214
4255
|
actorKey: o.actorKey,
|
|
4215
4256
|
kind: o.kind,
|
|
4216
4257
|
get animationMode() {
|
|
4217
|
-
return
|
|
4258
|
+
return t;
|
|
4218
4259
|
},
|
|
4219
4260
|
setText(e) {
|
|
4220
|
-
return
|
|
4221
|
-
|
|
4222
|
-
styleName:
|
|
4223
|
-
target:
|
|
4224
|
-
text: e
|
|
4225
|
-
}), await
|
|
4226
|
-
}),
|
|
4261
|
+
return r ? Promise.reject(new Z("BUBBLE-COMPOSITION-005", `Bubble is already closed: ${o.actorKey}`)) : typeof e == "string" ? (i = i.then(async () => {
|
|
4262
|
+
g && (n.setText({
|
|
4263
|
+
styleName: l.textStyle,
|
|
4264
|
+
target: g.targets.text,
|
|
4265
|
+
text: zr(e, l, n)
|
|
4266
|
+
}), u = e, await g.show());
|
|
4267
|
+
}), i) : Promise.reject(new Z("BUBBLE-COMPOSITION-001", "Bubble text must be a string."));
|
|
4268
|
+
},
|
|
4269
|
+
updateStyle(e) {
|
|
4270
|
+
if (r) return Promise.reject(new Z("BUBBLE-COMPOSITION-005", `Bubble is already closed: ${o.actorKey}`));
|
|
4271
|
+
let a;
|
|
4272
|
+
try {
|
|
4273
|
+
a = Or(e);
|
|
4274
|
+
} catch (e) {
|
|
4275
|
+
return Promise.reject(e);
|
|
4276
|
+
}
|
|
4277
|
+
return i = i.then(async () => {
|
|
4278
|
+
if (!g) return;
|
|
4279
|
+
Ir(g, a);
|
|
4280
|
+
let e = d(a);
|
|
4281
|
+
await Promise.all([
|
|
4282
|
+
y?.stop(),
|
|
4283
|
+
b?.stop(),
|
|
4284
|
+
x?.stop()
|
|
4285
|
+
]), await p(a, e, g), await g.updateStyle(a), l = a, n.setText({
|
|
4286
|
+
styleName: a.textStyle,
|
|
4287
|
+
target: g.targets.text,
|
|
4288
|
+
text: zr(u, a, n)
|
|
4289
|
+
}), m(a, e, g), await Promise.all([
|
|
4290
|
+
g.setLayerVisible("portraitBase", a.portrait !== void 0),
|
|
4291
|
+
g.setLayerVisible("portraitBlink", a.portrait?.blink !== void 0),
|
|
4292
|
+
g.setLayerVisible("portraitLipSync", !1),
|
|
4293
|
+
g.setLayerVisible("continueIndicator", !1)
|
|
4294
|
+
]);
|
|
4295
|
+
let r = t;
|
|
4296
|
+
t = "idle", await y?.start({ primed: !0 }), await s(r), await g.show();
|
|
4297
|
+
}), i;
|
|
4227
4298
|
},
|
|
4228
4299
|
setAnimationMode(e) {
|
|
4229
|
-
return
|
|
4300
|
+
return r ? Promise.reject(new Z("BUBBLE-COMPOSITION-005", `Bubble is already closed: ${o.actorKey}`)) : wr.has(e) ? (i = i.then(() => s(e)), i) : Promise.reject(new Z("BUBBLE-COMPOSITION-001", "Bubble animation mode is invalid."));
|
|
4230
4301
|
},
|
|
4231
4302
|
async close() {
|
|
4232
|
-
if (
|
|
4233
|
-
|
|
4303
|
+
if (r) return;
|
|
4304
|
+
r = !0;
|
|
4234
4305
|
let e = [];
|
|
4235
4306
|
try {
|
|
4236
|
-
await
|
|
4307
|
+
await i;
|
|
4237
4308
|
} catch (t) {
|
|
4238
4309
|
e.push(t);
|
|
4239
4310
|
}
|
|
4240
4311
|
for (let t of [
|
|
4241
|
-
() =>
|
|
4242
|
-
() =>
|
|
4243
|
-
() =>
|
|
4312
|
+
() => y?.stop(),
|
|
4313
|
+
() => b?.stop(),
|
|
4314
|
+
() => x?.stop(),
|
|
4244
4315
|
async () => {
|
|
4245
|
-
|
|
4316
|
+
v && await g?.hide();
|
|
4246
4317
|
},
|
|
4247
4318
|
async () => {
|
|
4248
|
-
|
|
4319
|
+
_ && g && n.releaseTarget(g.targets.text);
|
|
4249
4320
|
},
|
|
4250
|
-
async () =>
|
|
4321
|
+
async () => g?.dispose()
|
|
4251
4322
|
]) try {
|
|
4252
4323
|
await t();
|
|
4253
4324
|
} catch (t) {
|
|
4254
4325
|
e.push(t);
|
|
4255
4326
|
}
|
|
4256
|
-
a.get(o.actorKey) ===
|
|
4327
|
+
a.get(o.actorKey) === c && a.delete(o.actorKey), Br(e, `Failed to close bubble: ${o.actorKey}`);
|
|
4257
4328
|
}
|
|
4258
4329
|
});
|
|
4259
|
-
return a.set(o.actorKey,
|
|
4330
|
+
return a.set(o.actorKey, c), c;
|
|
4260
4331
|
} catch (e) {
|
|
4261
4332
|
let t = [], r = await Promise.allSettled([
|
|
4262
|
-
|
|
4263
|
-
|
|
4264
|
-
|
|
4333
|
+
y?.stop(),
|
|
4334
|
+
b?.stop(),
|
|
4335
|
+
x?.stop()
|
|
4265
4336
|
]);
|
|
4266
|
-
if (t.push(...r.flatMap((e) => e.status === "rejected" ? [e.reason] : [])),
|
|
4267
|
-
await
|
|
4337
|
+
if (t.push(...r.flatMap((e) => e.status === "rejected" ? [e.reason] : [])), v && g) try {
|
|
4338
|
+
await g.hide();
|
|
4268
4339
|
} catch (e) {
|
|
4269
4340
|
t.push(e);
|
|
4270
4341
|
}
|
|
4271
|
-
if (
|
|
4272
|
-
n.releaseTarget(
|
|
4342
|
+
if (_ && g) try {
|
|
4343
|
+
n.releaseTarget(g.targets.text);
|
|
4273
4344
|
} catch (e) {
|
|
4274
4345
|
t.push(e);
|
|
4275
4346
|
}
|
|
4276
|
-
if (
|
|
4277
|
-
await
|
|
4347
|
+
if (g) try {
|
|
4348
|
+
await g.dispose();
|
|
4278
4349
|
} catch (e) {
|
|
4279
4350
|
t.push(e);
|
|
4280
4351
|
}
|
|
@@ -4292,7 +4363,7 @@ function Vr(e) {
|
|
|
4292
4363
|
},
|
|
4293
4364
|
async show(e) {
|
|
4294
4365
|
c();
|
|
4295
|
-
let t =
|
|
4366
|
+
let t = Hr(e);
|
|
4296
4367
|
return l(t.actorKey, () => u(t));
|
|
4297
4368
|
},
|
|
4298
4369
|
releaseTarget(e) {
|
|
@@ -4303,15 +4374,15 @@ function Vr(e) {
|
|
|
4303
4374
|
});
|
|
4304
4375
|
},
|
|
4305
4376
|
async releaseAll() {
|
|
4306
|
-
c(), await Promise.allSettled([...o.values()]),
|
|
4377
|
+
c(), await Promise.allSettled([...o.values()]), Br((await Promise.allSettled([...a.values()].map((e) => e.close()))).flatMap((e) => e.status === "rejected" ? [e.reason] : []), "Failed to release all bubbles");
|
|
4307
4378
|
},
|
|
4308
4379
|
async dispose() {
|
|
4309
4380
|
if (s) return;
|
|
4310
4381
|
s = !0, await Promise.allSettled([...o.values()]);
|
|
4311
4382
|
let e = await Promise.allSettled([...a.values()].map((e) => e.close()));
|
|
4312
|
-
i.clear(),
|
|
4383
|
+
i.clear(), Br(e.flatMap((e) => e.status === "rejected" ? [e.reason] : []), "Failed to dispose bubble composition");
|
|
4313
4384
|
}
|
|
4314
4385
|
});
|
|
4315
4386
|
}
|
|
4316
4387
|
//#endregion
|
|
4317
|
-
export { Z as BubbleCompositionError, hr as UnicodeLineBreakProvider,
|
|
4388
|
+
export { Z as BubbleCompositionError, hr as UnicodeLineBreakProvider, ne as actorRelativeBubbleCenter, d as bubbleBackgroundRegions, we as bubbleBodyCenterOffset, u as bubbleDirectionAliases, l as bubbleDirectionNames, O as bubbleVisualStyles, Ur as createBubbleComposition, x as defaultBubbleDistance, ee as defaultBubbleOffset, f as defaultBubblePlacementInput, S as defaultBubbleTailLength, w as normalizeBubbleDistance, T as normalizeBubbleOffset, y as normalizeBubblePlacement, te as normalizeBubbleTailLength, Ee as renderBubbleSvg, Sr as wrapText };
|