@gamelearn/arcade-components 3.31.5 → 3.31.6
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.
|
@@ -438,7 +438,7 @@ function requireReactJsxRuntime_development() {
|
|
|
438
438
|
ref: !0,
|
|
439
439
|
__self: !0,
|
|
440
440
|
__source: !0
|
|
441
|
-
},
|
|
441
|
+
}, Ye, lt, Be;
|
|
442
442
|
Be = {};
|
|
443
443
|
function rt(de) {
|
|
444
444
|
if (Fe.call(de, "ref")) {
|
|
@@ -465,7 +465,7 @@ function requireReactJsxRuntime_development() {
|
|
|
465
465
|
function De(de, be) {
|
|
466
466
|
{
|
|
467
467
|
var ze = function() {
|
|
468
|
-
|
|
468
|
+
Ye || (Ye = !0, R("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", be));
|
|
469
469
|
};
|
|
470
470
|
ze.isReactWarning = !0, Object.defineProperty(de, "key", {
|
|
471
471
|
get: ze,
|
|
@@ -531,7 +531,7 @@ function requireReactJsxRuntime_development() {
|
|
|
531
531
|
return ye(de, gt, kt, ht, tt, qe.current, vt);
|
|
532
532
|
}
|
|
533
533
|
}
|
|
534
|
-
var
|
|
534
|
+
var Xe = b.ReactCurrentOwner, Ft = b.ReactDebugCurrentFrame;
|
|
535
535
|
function Pt(de) {
|
|
536
536
|
if (de) {
|
|
537
537
|
var be = de._owner, ze = Re(de.type, de._source, be ? be.type : null);
|
|
@@ -546,8 +546,8 @@ function requireReactJsxRuntime_development() {
|
|
|
546
546
|
}
|
|
547
547
|
function Ct() {
|
|
548
548
|
{
|
|
549
|
-
if (
|
|
550
|
-
var de = B(
|
|
549
|
+
if (Xe.current) {
|
|
550
|
+
var de = B(Xe.current.type);
|
|
551
551
|
if (de)
|
|
552
552
|
return `
|
|
553
553
|
|
|
@@ -590,7 +590,7 @@ Check the top-level render call using <` + ze + ">.");
|
|
|
590
590
|
return;
|
|
591
591
|
wt[ze] = !0;
|
|
592
592
|
var tt = "";
|
|
593
|
-
de && de._owner && de._owner !==
|
|
593
|
+
de && de._owner && de._owner !== Xe.current && (tt = " It was passed a child from " + B(de._owner.type) + "."), Pt(de), R('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', ze, tt), Pt(null);
|
|
594
594
|
}
|
|
595
595
|
}
|
|
596
596
|
function ke(de, be) {
|
|
@@ -1260,8 +1260,8 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
|
|
|
1260
1260
|
try {
|
|
1261
1261
|
if (ye && typeof De == "string") {
|
|
1262
1262
|
if (ye.addDefaultProtocol && De.startsWith("www.")) {
|
|
1263
|
-
const
|
|
1264
|
-
(
|
|
1263
|
+
const Xe = De.match(/\./g);
|
|
1264
|
+
(Xe == null ? void 0 : Xe.length) >= 2 && (De = `http://${De}`);
|
|
1265
1265
|
}
|
|
1266
1266
|
if (ye.tryConvertEncoding)
|
|
1267
1267
|
try {
|
|
@@ -1339,8 +1339,8 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
|
|
|
1339
1339
|
if (Te < ye)
|
|
1340
1340
|
return String.fromCharCode.apply(null, De);
|
|
1341
1341
|
const Pe = [];
|
|
1342
|
-
for (let
|
|
1343
|
-
const Ft = Math.min(
|
|
1342
|
+
for (let Xe = 0; Xe < Te; Xe += ye) {
|
|
1343
|
+
const Ft = Math.min(Xe + ye, Te), Pt = De.subarray(Xe, Ft);
|
|
1344
1344
|
Pe.push(String.fromCharCode.apply(null, Pt));
|
|
1345
1345
|
}
|
|
1346
1346
|
return Pe.join("");
|
|
@@ -1413,23 +1413,23 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
|
|
|
1413
1413
|
return [Te[0] * ye[0] + Te[2] * ye[1], Te[1] * ye[0] + Te[3] * ye[1], Te[0] * ye[2] + Te[2] * ye[3], Te[1] * ye[2] + Te[3] * ye[3], Te[0] * ye[4] + Te[2] * ye[5] + Te[4], Te[1] * ye[4] + Te[3] * ye[5] + Te[5]];
|
|
1414
1414
|
}
|
|
1415
1415
|
static applyTransform(Te, ye) {
|
|
1416
|
-
const Pe = Te[0] * ye[0] + Te[1] * ye[2] + ye[4],
|
|
1417
|
-
return [Pe,
|
|
1416
|
+
const Pe = Te[0] * ye[0] + Te[1] * ye[2] + ye[4], Xe = Te[0] * ye[1] + Te[1] * ye[3] + ye[5];
|
|
1417
|
+
return [Pe, Xe];
|
|
1418
1418
|
}
|
|
1419
1419
|
static applyInverseTransform(Te, ye) {
|
|
1420
|
-
const Pe = ye[0] * ye[3] - ye[1] * ye[2],
|
|
1421
|
-
return [
|
|
1420
|
+
const Pe = ye[0] * ye[3] - ye[1] * ye[2], Xe = (Te[0] * ye[3] - Te[1] * ye[2] + ye[2] * ye[5] - ye[4] * ye[3]) / Pe, Ft = (-Te[0] * ye[1] + Te[1] * ye[0] + ye[4] * ye[1] - ye[5] * ye[0]) / Pe;
|
|
1421
|
+
return [Xe, Ft];
|
|
1422
1422
|
}
|
|
1423
1423
|
static getAxialAlignedBoundingBox(Te, ye) {
|
|
1424
|
-
const Pe = this.applyTransform(Te, ye),
|
|
1425
|
-
return [Math.min(Pe[0],
|
|
1424
|
+
const Pe = this.applyTransform(Te, ye), Xe = this.applyTransform(Te.slice(2, 4), ye), Ft = this.applyTransform([Te[0], Te[3]], ye), Pt = this.applyTransform([Te[2], Te[1]], ye);
|
|
1425
|
+
return [Math.min(Pe[0], Xe[0], Ft[0], Pt[0]), Math.min(Pe[1], Xe[1], Ft[1], Pt[1]), Math.max(Pe[0], Xe[0], Ft[0], Pt[0]), Math.max(Pe[1], Xe[1], Ft[1], Pt[1])];
|
|
1426
1426
|
}
|
|
1427
1427
|
static inverseTransform(Te) {
|
|
1428
1428
|
const ye = Te[0] * Te[3] - Te[1] * Te[2];
|
|
1429
1429
|
return [Te[3] / ye, -Te[1] / ye, -Te[2] / ye, Te[0] / ye, (Te[2] * Te[5] - Te[4] * Te[3]) / ye, (Te[4] * Te[1] - Te[5] * Te[0]) / ye];
|
|
1430
1430
|
}
|
|
1431
1431
|
static singularValueDecompose2dScale(Te) {
|
|
1432
|
-
const ye = [Te[0], Te[2], Te[1], Te[3]], Pe = Te[0] * ye[0] + Te[1] * ye[2],
|
|
1432
|
+
const ye = [Te[0], Te[2], Te[1], Te[3]], Pe = Te[0] * ye[0] + Te[1] * ye[2], Xe = Te[0] * ye[1] + Te[1] * ye[3], Ft = Te[2] * ye[0] + Te[3] * ye[2], Pt = Te[2] * ye[1] + Te[3] * ye[3], Ie = (Pe + Pt) / 2, mt = Math.sqrt((Pe + Pt) ** 2 - 4 * (Pe * Pt - Ft * Xe)) / 2, Ct = Ie + mt || 1, st = Ie - mt || 1;
|
|
1433
1433
|
return [Math.sqrt(Ct), Math.sqrt(st)];
|
|
1434
1434
|
}
|
|
1435
1435
|
static normalizeRect(Te) {
|
|
@@ -1437,17 +1437,17 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
|
|
|
1437
1437
|
return Te[0] > Te[2] && (ye[0] = Te[2], ye[2] = Te[0]), Te[1] > Te[3] && (ye[1] = Te[3], ye[3] = Te[1]), ye;
|
|
1438
1438
|
}
|
|
1439
1439
|
static intersect(Te, ye) {
|
|
1440
|
-
const Pe = Math.max(Math.min(Te[0], Te[2]), Math.min(ye[0], ye[2])),
|
|
1441
|
-
if (Pe >
|
|
1440
|
+
const Pe = Math.max(Math.min(Te[0], Te[2]), Math.min(ye[0], ye[2])), Xe = Math.min(Math.max(Te[0], Te[2]), Math.max(ye[0], ye[2]));
|
|
1441
|
+
if (Pe > Xe)
|
|
1442
1442
|
return null;
|
|
1443
1443
|
const Ft = Math.max(Math.min(Te[1], Te[3]), Math.min(ye[1], ye[3])), Pt = Math.min(Math.max(Te[1], Te[3]), Math.max(ye[1], ye[3]));
|
|
1444
|
-
return Ft > Pt ? null : [Pe, Ft,
|
|
1444
|
+
return Ft > Pt ? null : [Pe, Ft, Xe, Pt];
|
|
1445
1445
|
}
|
|
1446
|
-
static bezierBoundingBox(Te, ye, Pe,
|
|
1446
|
+
static bezierBoundingBox(Te, ye, Pe, Xe, Ft, Pt, Ie, mt) {
|
|
1447
1447
|
const Ct = [], st = [[], []];
|
|
1448
1448
|
let wt, Nt, qt, ke, pt, ot, _e, te;
|
|
1449
1449
|
for (let de = 0; de < 2; ++de) {
|
|
1450
|
-
if (de === 0 ? (Nt = 6 * Te - 12 * Pe + 6 * Ft, wt = -3 * Te + 9 * Pe - 9 * Ft + 3 * Ie, qt = 3 * Pe - 3 * Te) : (Nt = 6 * ye - 12 *
|
|
1450
|
+
if (de === 0 ? (Nt = 6 * Te - 12 * Pe + 6 * Ft, wt = -3 * Te + 9 * Pe - 9 * Ft + 3 * Ie, qt = 3 * Pe - 3 * Te) : (Nt = 6 * ye - 12 * Xe + 6 * Pt, wt = -3 * ye + 9 * Xe - 9 * Pt + 3 * mt, qt = 3 * Xe - 3 * ye), Math.abs(wt) < 1e-12) {
|
|
1451
1451
|
if (Math.abs(Nt) < 1e-12)
|
|
1452
1452
|
continue;
|
|
1453
1453
|
ke = -qt / Nt, 0 < ke && ke < 1 && Ct.push(ke);
|
|
@@ -1458,7 +1458,7 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
|
|
|
1458
1458
|
let me = Ct.length, Ee;
|
|
1459
1459
|
const we = me;
|
|
1460
1460
|
for (; me--; )
|
|
1461
|
-
ke = Ct[me], Ee = 1 - ke, st[0][me] = Ee * Ee * Ee * Te + 3 * Ee * Ee * ke * Pe + 3 * Ee * ke * ke * Ft + ke * ke * ke * Ie, st[1][me] = Ee * Ee * Ee * ye + 3 * Ee * Ee * ke *
|
|
1461
|
+
ke = Ct[me], Ee = 1 - ke, st[0][me] = Ee * Ee * Ee * Te + 3 * Ee * Ee * ke * Pe + 3 * Ee * ke * ke * Ft + ke * ke * ke * Ie, st[1][me] = Ee * Ee * Ee * ye + 3 * Ee * Ee * ke * Xe + 3 * Ee * ke * ke * Pt + ke * ke * ke * mt;
|
|
1462
1462
|
return st[0][we] = Te, st[1][we] = ye, st[0][we + 1] = Ie, st[1][we + 1] = mt, st[0].length = st[1].length = we + 2, [Math.min(...st[0]), Math.min(...st[1]), Math.max(...st[0]), Math.max(...st[1])];
|
|
1463
1463
|
}
|
|
1464
1464
|
}
|
|
@@ -1471,16 +1471,16 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
|
|
|
1471
1471
|
try {
|
|
1472
1472
|
const Pe = new TextDecoder(ye, {
|
|
1473
1473
|
fatal: !0
|
|
1474
|
-
}),
|
|
1475
|
-
return Pe.decode(
|
|
1474
|
+
}), Xe = ce(De);
|
|
1475
|
+
return Pe.decode(Xe);
|
|
1476
1476
|
} catch (Pe) {
|
|
1477
1477
|
se(`stringToPDFString: "${Pe}".`);
|
|
1478
1478
|
}
|
|
1479
1479
|
}
|
|
1480
1480
|
const Te = [];
|
|
1481
1481
|
for (let ye = 0, Pe = De.length; ye < Pe; ye++) {
|
|
1482
|
-
const
|
|
1483
|
-
Te.push(
|
|
1482
|
+
const Xe = yt[De.charCodeAt(ye)];
|
|
1483
|
+
Te.push(Xe ? String.fromCharCode(Xe) : De.charAt(ye));
|
|
1484
1484
|
}
|
|
1485
1485
|
return Te.join("");
|
|
1486
1486
|
}
|
|
@@ -1520,9 +1520,9 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
|
|
|
1520
1520
|
}
|
|
1521
1521
|
}
|
|
1522
1522
|
$e = new WeakMap(), e.PromiseCapability = St;
|
|
1523
|
-
let
|
|
1523
|
+
let Ye = null, lt = null;
|
|
1524
1524
|
function Be(De) {
|
|
1525
|
-
return
|
|
1525
|
+
return Ye || (Ye = /([\u00a0\u00b5\u037e\u0eb3\u2000-\u200a\u202f\u2126\ufb00-\ufb04\ufb06\ufb20-\ufb36\ufb38-\ufb3c\ufb3e\ufb40-\ufb41\ufb43-\ufb44\ufb46-\ufba1\ufba4-\ufba9\ufbae-\ufbb1\ufbd3-\ufbdc\ufbde-\ufbe7\ufbea-\ufbf8\ufbfc-\ufbfd\ufc00-\ufc5d\ufc64-\ufcf1\ufcf5-\ufd3d\ufd88\ufdf4\ufdfa-\ufdfb\ufe71\ufe77\ufe79\ufe7b\ufe7d]+)|(\ufb05+)/gu, lt = /* @__PURE__ */ new Map([["ſt", "ſt"]])), De.replaceAll(Ye, (Te, ye, Pe) => ye ? ye.normalize("NFKC") : lt.get(Pe));
|
|
1526
1526
|
}
|
|
1527
1527
|
function rt() {
|
|
1528
1528
|
if (typeof crypto < "u" && typeof (crypto == null ? void 0 : crypto.randomUUID) == "function")
|
|
@@ -1631,7 +1631,7 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
|
|
|
1631
1631
|
return ee.promise.then(function() {
|
|
1632
1632
|
if (k.destroyed)
|
|
1633
1633
|
throw new Error("Loading aborted");
|
|
1634
|
-
const St = _fetchDocument(ee, Oe),
|
|
1634
|
+
const St = _fetchDocument(ee, Oe), Ye = new Promise(function(lt) {
|
|
1635
1635
|
let Be;
|
|
1636
1636
|
re ? Be = new _transport_stream.PDFDataTransportStream({
|
|
1637
1637
|
length: at,
|
|
@@ -1650,7 +1650,7 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
|
|
|
1650
1650
|
disableStream: Fe
|
|
1651
1651
|
})), lt(Be);
|
|
1652
1652
|
});
|
|
1653
|
-
return Promise.all([St,
|
|
1653
|
+
return Promise.all([St, Ye]).then(function([lt, Be]) {
|
|
1654
1654
|
if (k.destroyed)
|
|
1655
1655
|
throw new Error("Loading aborted");
|
|
1656
1656
|
const rt = new _message_handler.MessageHandler(F, lt, ee.port), ft = new WorkerTransport(rt, k, Be, qe, Ke);
|
|
@@ -3538,37 +3538,37 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
|
|
|
3538
3538
|
};
|
|
3539
3539
|
window.addEventListener("pointerup", Qe), window.addEventListener("blur", Qe);
|
|
3540
3540
|
}, ee = new WeakSet(), Yv = function(V, G) {
|
|
3541
|
-
const [Y, ie] = this.parentDimensions, le = this.x, fe = this.y, ce = this.width, ge = this.height, Se = H.MIN_SIZE / Y, Re = H.MIN_SIZE / ie, Fe = (Pe) => Math.round(Pe * 1e4) / 1e4, Ne = Ue(this, j, Nm).call(this, this.rotation), Qe = (Pe,
|
|
3541
|
+
const [Y, ie] = this.parentDimensions, le = this.x, fe = this.y, ce = this.width, ge = this.height, Se = H.MIN_SIZE / Y, Re = H.MIN_SIZE / ie, Fe = (Pe) => Math.round(Pe * 1e4) / 1e4, Ne = Ue(this, j, Nm).call(this, this.rotation), Qe = (Pe, Xe) => [Ne[0] * Pe + Ne[2] * Xe, Ne[1] * Pe + Ne[3] * Xe], at = Ue(this, j, Nm).call(this, 360 - this.rotation), Ze = (Pe, Xe) => [at[0] * Pe + at[2] * Xe, at[1] * Pe + at[3] * Xe];
|
|
3542
3542
|
let yt, Ve, Me = !1, Le = !1;
|
|
3543
3543
|
switch (V) {
|
|
3544
3544
|
case "topLeft":
|
|
3545
|
-
Me = !0, yt = (Pe,
|
|
3545
|
+
Me = !0, yt = (Pe, Xe) => [0, 0], Ve = (Pe, Xe) => [Pe, Xe];
|
|
3546
3546
|
break;
|
|
3547
3547
|
case "topMiddle":
|
|
3548
|
-
yt = (Pe,
|
|
3548
|
+
yt = (Pe, Xe) => [Pe / 2, 0], Ve = (Pe, Xe) => [Pe / 2, Xe];
|
|
3549
3549
|
break;
|
|
3550
3550
|
case "topRight":
|
|
3551
|
-
Me = !0, yt = (Pe,
|
|
3551
|
+
Me = !0, yt = (Pe, Xe) => [Pe, 0], Ve = (Pe, Xe) => [0, Xe];
|
|
3552
3552
|
break;
|
|
3553
3553
|
case "middleRight":
|
|
3554
|
-
Le = !0, yt = (Pe,
|
|
3554
|
+
Le = !0, yt = (Pe, Xe) => [Pe, Xe / 2], Ve = (Pe, Xe) => [0, Xe / 2];
|
|
3555
3555
|
break;
|
|
3556
3556
|
case "bottomRight":
|
|
3557
|
-
Me = !0, yt = (Pe,
|
|
3557
|
+
Me = !0, yt = (Pe, Xe) => [Pe, Xe], Ve = (Pe, Xe) => [0, 0];
|
|
3558
3558
|
break;
|
|
3559
3559
|
case "bottomMiddle":
|
|
3560
|
-
yt = (Pe,
|
|
3560
|
+
yt = (Pe, Xe) => [Pe / 2, Xe], Ve = (Pe, Xe) => [Pe / 2, 0];
|
|
3561
3561
|
break;
|
|
3562
3562
|
case "bottomLeft":
|
|
3563
|
-
Me = !0, yt = (Pe,
|
|
3563
|
+
Me = !0, yt = (Pe, Xe) => [0, Xe], Ve = (Pe, Xe) => [Pe, 0];
|
|
3564
3564
|
break;
|
|
3565
3565
|
case "middleLeft":
|
|
3566
|
-
Le = !0, yt = (Pe,
|
|
3566
|
+
Le = !0, yt = (Pe, Xe) => [0, Xe / 2], Ve = (Pe, Xe) => [Pe, Xe / 2];
|
|
3567
3567
|
break;
|
|
3568
3568
|
}
|
|
3569
3569
|
const Ke = yt(ce, ge), Oe = Ve(ce, ge);
|
|
3570
3570
|
let qe = Qe(...Oe);
|
|
3571
|
-
const St = Fe(le + qe[0]),
|
|
3571
|
+
const St = Fe(le + qe[0]), Ye = Fe(fe + qe[1]);
|
|
3572
3572
|
let lt = 1, Be = 1, [rt, ft] = this.screenToPageTranslation(G.movementX, G.movementY);
|
|
3573
3573
|
if ([rt, ft] = Ze(rt / Y, ft / ie), Me) {
|
|
3574
3574
|
const Pe = Math.hypot(ce, ge);
|
|
@@ -3577,7 +3577,7 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
|
|
|
3577
3577
|
Le ? lt = Math.max(Se, Math.min(1, Math.abs(Oe[0] - Ke[0] - rt))) / ce : Be = Math.max(Re, Math.min(1, Math.abs(Oe[1] - Ke[1] - ft))) / ge;
|
|
3578
3578
|
const $e = Fe(ce * lt), De = Fe(ge * Be);
|
|
3579
3579
|
qe = Qe(...Ve($e, De));
|
|
3580
|
-
const Te = St - qe[0], ye =
|
|
3580
|
+
const Te = St - qe[0], ye = Ye - qe[1];
|
|
3581
3581
|
this.width = $e, this.height = De, this.x = Te, this.y = ye, this.setDims(Y * $e, ie * De), this.fixAndSetPosition();
|
|
3582
3582
|
}, ne = new WeakSet(), Om = async function() {
|
|
3583
3583
|
var Y;
|
|
@@ -3657,7 +3657,7 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
|
|
|
3657
3657
|
/* 5 */
|
|
3658
3658
|
/***/
|
|
3659
3659
|
(l, e, n) => {
|
|
3660
|
-
var x, S, g, v, b, km, w, C, N, D, P, Qv, M, j, B, z, X, re, se, ee, K, ne, ue, pe, J, H, W, V, G, Y, ie, le, fe, ce, ge, Se, Re, Fe, Ne, Qe, at, Ze, yt, Ve, Me, Le, Ke, Jv, qe, Fm,
|
|
3660
|
+
var x, S, g, v, b, km, w, C, N, D, P, Qv, M, j, B, z, X, re, se, ee, K, ne, ue, pe, J, H, W, V, G, Y, ie, le, fe, ce, ge, Se, Re, Fe, Ne, Qe, at, Ze, yt, Ve, Me, Le, Ke, Jv, qe, Fm, Ye, Mm, Be, zf, ft, Lm, De, jm, ye, Zi, Xe, Oc, Pt, Zv, mt, ey, st, Im, Nt, kc, ke, Um;
|
|
3661
3661
|
Object.defineProperty(e, "__esModule", {
|
|
3662
3662
|
value: !0
|
|
3663
3663
|
}), e.KeyboardManager = e.CommandManager = e.ColorManager = e.AnnotationEditorUIManager = void 0, e.bindEvents = o, e.opacityToHex = d;
|
|
@@ -3881,12 +3881,12 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
|
|
|
3881
3881
|
constructor(te, me, Ee, we, de, be) {
|
|
3882
3882
|
Ae(this, Ke);
|
|
3883
3883
|
Ae(this, qe);
|
|
3884
|
-
Ae(this,
|
|
3884
|
+
Ae(this, Ye);
|
|
3885
3885
|
Ae(this, Be);
|
|
3886
3886
|
Ae(this, ft);
|
|
3887
3887
|
Ae(this, De);
|
|
3888
3888
|
Ae(this, ye);
|
|
3889
|
-
Ae(this,
|
|
3889
|
+
Ae(this, Xe);
|
|
3890
3890
|
Ae(this, Pt);
|
|
3891
3891
|
Ae(this, mt);
|
|
3892
3892
|
Ae(this, st);
|
|
@@ -4054,7 +4054,7 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
|
|
|
4054
4054
|
}), me.focus();
|
|
4055
4055
|
}
|
|
4056
4056
|
addEditListeners() {
|
|
4057
|
-
Ue(this,
|
|
4057
|
+
Ue(this, Ye, Mm).call(this), Ue(this, ft, Lm).call(this);
|
|
4058
4058
|
}
|
|
4059
4059
|
removeEditListeners() {
|
|
4060
4060
|
Ue(this, Be, zf).call(this), Ue(this, De, jm).call(this);
|
|
@@ -4130,7 +4130,7 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
|
|
|
4130
4130
|
["undo", "redo", "delete", "selectAll"].includes(te.name) && this[te.name]();
|
|
4131
4131
|
}
|
|
4132
4132
|
setEditingState(te) {
|
|
4133
|
-
te ? (Ue(this, Ke, Jv).call(this), Ue(this,
|
|
4133
|
+
te ? (Ue(this, Ke, Jv).call(this), Ue(this, Ye, Mm).call(this), Ue(this, ft, Lm).call(this), Ue(this, ye, Zi).call(this, {
|
|
4134
4134
|
isEditing: Z(this, G) !== t.AnnotationEditorType.NONE,
|
|
4135
4135
|
isEmpty: Ue(this, Nt, kc).call(this),
|
|
4136
4136
|
hasSomethingToUndo: Z(this, re).hasSomethingToUndo(),
|
|
@@ -4144,7 +4144,7 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
|
|
|
4144
4144
|
if (!Z(this, ne)) {
|
|
4145
4145
|
We(this, ne, te);
|
|
4146
4146
|
for (const me of Z(this, ne))
|
|
4147
|
-
Ue(this,
|
|
4147
|
+
Ue(this, Xe, Oc).call(this, me.defaultPropertiesToUpdate);
|
|
4148
4148
|
}
|
|
4149
4149
|
}
|
|
4150
4150
|
getId() {
|
|
@@ -4234,7 +4234,7 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
|
|
|
4234
4234
|
Z(this, ee).delete(te.annotationElementId), te.deleted = !1;
|
|
4235
4235
|
}
|
|
4236
4236
|
setActiveEditor(te) {
|
|
4237
|
-
Z(this, M) !== te && (We(this, M, te), te && Ue(this,
|
|
4237
|
+
Z(this, M) !== te && (We(this, M, te), te && Ue(this, Xe, Oc).call(this, te.propertiesToUpdate));
|
|
4238
4238
|
}
|
|
4239
4239
|
toggleSelected(te) {
|
|
4240
4240
|
if (Z(this, Y).has(te)) {
|
|
@@ -4243,14 +4243,14 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
|
|
|
4243
4243
|
});
|
|
4244
4244
|
return;
|
|
4245
4245
|
}
|
|
4246
|
-
Z(this, Y).add(te), te.select(), Ue(this,
|
|
4246
|
+
Z(this, Y).add(te), te.select(), Ue(this, Xe, Oc).call(this, te.propertiesToUpdate), Ue(this, ye, Zi).call(this, {
|
|
4247
4247
|
hasSelectedEditor: !0
|
|
4248
4248
|
});
|
|
4249
4249
|
}
|
|
4250
4250
|
setSelected(te) {
|
|
4251
4251
|
for (const me of Z(this, Y))
|
|
4252
4252
|
me !== te && me.unselect();
|
|
4253
|
-
Z(this, Y).clear(), Z(this, Y).add(te), te.select(), Ue(this,
|
|
4253
|
+
Z(this, Y).clear(), Z(this, Y).add(te), te.select(), Ue(this, Xe, Oc).call(this, te.propertiesToUpdate), Ue(this, ye, Zi).call(this, {
|
|
4254
4254
|
hasSelectedEditor: !0
|
|
4255
4255
|
});
|
|
4256
4256
|
}
|
|
@@ -4432,7 +4432,7 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
|
|
|
4432
4432
|
window.addEventListener("focus", Z(this, fe)), window.addEventListener("blur", Z(this, le));
|
|
4433
4433
|
}, qe = new WeakSet(), Fm = function() {
|
|
4434
4434
|
window.removeEventListener("focus", Z(this, fe)), window.removeEventListener("blur", Z(this, le));
|
|
4435
|
-
},
|
|
4435
|
+
}, Ye = new WeakSet(), Mm = function() {
|
|
4436
4436
|
window.addEventListener("keydown", Z(this, Re), {
|
|
4437
4437
|
capture: !0
|
|
4438
4438
|
});
|
|
@@ -4449,7 +4449,7 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
|
|
|
4449
4449
|
source: this,
|
|
4450
4450
|
details: Object.assign(Z(this, Ze), te)
|
|
4451
4451
|
});
|
|
4452
|
-
},
|
|
4452
|
+
}, Xe = new WeakSet(), Oc = function(te) {
|
|
4453
4453
|
this._eventBus.dispatch("annotationeditorparamschanged", {
|
|
4454
4454
|
source: this,
|
|
4455
4455
|
details: te
|
|
@@ -4532,22 +4532,22 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
|
|
|
4532
4532
|
let Ke = Z(this, Y, tu).get(Le);
|
|
4533
4533
|
if (Ke)
|
|
4534
4534
|
return Ke;
|
|
4535
|
-
let Oe, qe, St,
|
|
4535
|
+
let Oe, qe, St, Ye;
|
|
4536
4536
|
if (Le.length === 1) {
|
|
4537
4537
|
const ft = Le[0], $e = new Array(256);
|
|
4538
4538
|
for (let De = 0; De < 256; De++)
|
|
4539
4539
|
$e[De] = ft[De] / 255;
|
|
4540
|
-
|
|
4540
|
+
Ye = Oe = qe = St = $e.join(",");
|
|
4541
4541
|
} else {
|
|
4542
4542
|
const [ft, $e, De] = Le, Te = new Array(256), ye = new Array(256), Pe = new Array(256);
|
|
4543
|
-
for (let
|
|
4544
|
-
Te[
|
|
4545
|
-
Oe = Te.join(","), qe = ye.join(","), St = Pe.join(","),
|
|
4543
|
+
for (let Xe = 0; Xe < 256; Xe++)
|
|
4544
|
+
Te[Xe] = ft[Xe] / 255, ye[Xe] = $e[Xe] / 255, Pe[Xe] = De[Xe] / 255;
|
|
4545
|
+
Oe = Te.join(","), qe = ye.join(","), St = Pe.join(","), Ye = `${Oe}${qe}${St}`;
|
|
4546
4546
|
}
|
|
4547
|
-
if (Ke = Z(this, Y, tu).get(
|
|
4547
|
+
if (Ke = Z(this, Y, tu).get(Ye), Ke)
|
|
4548
4548
|
return Z(this, Y, tu).set(Le, Ke), Ke;
|
|
4549
4549
|
const lt = `g_${Z(this, K)}_transfer_map_${Nc(this, G)._++}`, Be = `url(#${lt})`;
|
|
4550
|
-
Z(this, Y, tu).set(Le, Be), Z(this, Y, tu).set(
|
|
4550
|
+
Z(this, Y, tu).set(Le, Be), Z(this, Y, tu).set(Ye, Be);
|
|
4551
4551
|
const rt = Ue(this, Se, Gf).call(this, lt);
|
|
4552
4552
|
return Ue(this, Qe, Fc).call(this, Oe, qe, St, rt), Be;
|
|
4553
4553
|
}
|
|
@@ -4563,18 +4563,18 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
|
|
|
4563
4563
|
const St = Ue(this, Ze, Mc).call(this, Ke);
|
|
4564
4564
|
if (Ke = s.Util.makeHexColor(...St), Z(this, le, nu).style.color = "", Le === "#000000" && Ke === "#ffffff" || Le === Ke)
|
|
4565
4565
|
return Z(this, J);
|
|
4566
|
-
const
|
|
4566
|
+
const Ye = new Array(256);
|
|
4567
4567
|
for (let De = 0; De <= 255; De++) {
|
|
4568
4568
|
const Te = De / 255;
|
|
4569
|
-
|
|
4569
|
+
Ye[De] = Te <= 0.03928 ? Te / 12.92 : ((Te + 0.055) / 1.055) ** 2.4;
|
|
4570
4570
|
}
|
|
4571
|
-
const lt =
|
|
4571
|
+
const lt = Ye.join(","), Be = `g_${Z(this, K)}_hcm_filter`, rt = We(this, H, Ue(this, Se, Gf).call(this, Be));
|
|
4572
4572
|
Ue(this, Qe, Fc).call(this, lt, lt, lt, rt), Ue(this, ce, Bm).call(this, rt);
|
|
4573
4573
|
const ft = (De, Te) => {
|
|
4574
|
-
const ye = qe[De] / 255, Pe = St[De] / 255,
|
|
4574
|
+
const ye = qe[De] / 255, Pe = St[De] / 255, Xe = new Array(Te + 1);
|
|
4575
4575
|
for (let Ft = 0; Ft <= Te; Ft++)
|
|
4576
|
-
|
|
4577
|
-
return
|
|
4576
|
+
Xe[Ft] = ye + Ft / Te * (Pe - ye);
|
|
4577
|
+
return Xe.join(",");
|
|
4578
4578
|
};
|
|
4579
4579
|
return Ue(this, Qe, Fc).call(this, ft(0, 5), ft(1, 5), ft(2, 5), rt), We(this, J, `url(#${Be})`), Z(this, J);
|
|
4580
4580
|
}
|
|
@@ -4585,11 +4585,11 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
|
|
|
4585
4585
|
return Z(this, V);
|
|
4586
4586
|
if (We(this, W, St), We(this, V, "none"), (Pe = Z(this, H)) == null || Pe.remove(), !Le || !Ke)
|
|
4587
4587
|
return Z(this, V);
|
|
4588
|
-
const [
|
|
4589
|
-
let Be = Math.round(0.2126 *
|
|
4588
|
+
const [Ye, lt] = [Le, Ke].map(Ue(this, Ze, Mc).bind(this));
|
|
4589
|
+
let Be = Math.round(0.2126 * Ye[0] + 0.7152 * Ye[1] + 0.0722 * Ye[2]), rt = Math.round(0.2126 * lt[0] + 0.7152 * lt[1] + 0.0722 * lt[2]), [ft, $e] = [Oe, qe].map(Ue(this, Ze, Mc).bind(this));
|
|
4590
4590
|
rt < Be && ([Be, rt, ft, $e] = [rt, Be, $e, ft]), Z(this, le, nu).style.color = "";
|
|
4591
|
-
const De = (
|
|
4592
|
-
const Ie = new Array(256), mt = (rt - Be) / Pt, Ct =
|
|
4591
|
+
const De = (Xe, Ft, Pt) => {
|
|
4592
|
+
const Ie = new Array(256), mt = (rt - Be) / Pt, Ct = Xe / 255, st = (Ft - Xe) / (255 * Pt);
|
|
4593
4593
|
let wt = 0;
|
|
4594
4594
|
for (let Nt = 0; Nt <= Pt; Nt++) {
|
|
4595
4595
|
const qt = Math.round(Be + Nt * mt), ke = Ct + Nt * st;
|
|
@@ -4700,7 +4700,7 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
|
|
|
4700
4700
|
dontFlip: St = !1
|
|
4701
4701
|
}) {
|
|
4702
4702
|
this.viewBox = Me, this.scale = Le, this.rotation = Ke, this.offsetX = Oe, this.offsetY = qe;
|
|
4703
|
-
const
|
|
4703
|
+
const Ye = (Me[2] + Me[0]) / 2, lt = (Me[3] + Me[1]) / 2;
|
|
4704
4704
|
let Be, rt, ft, $e;
|
|
4705
4705
|
switch (Ke %= 360, Ke < 0 && (Ke += 360), Ke) {
|
|
4706
4706
|
case 180:
|
|
@@ -4720,7 +4720,7 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
|
|
|
4720
4720
|
}
|
|
4721
4721
|
St && (ft = -ft, $e = -$e);
|
|
4722
4722
|
let De, Te, ye, Pe;
|
|
4723
|
-
Be === 0 ? (De = Math.abs(lt - Me[1]) * Le + Oe, Te = Math.abs(
|
|
4723
|
+
Be === 0 ? (De = Math.abs(lt - Me[1]) * Le + Oe, Te = Math.abs(Ye - Me[0]) * Le + qe, ye = (Me[3] - Me[1]) * Le, Pe = (Me[2] - Me[0]) * Le) : (De = Math.abs(Ye - Me[0]) * Le + Oe, Te = Math.abs(lt - Me[1]) * Le + qe, ye = (Me[2] - Me[0]) * Le, Pe = (Me[3] - Me[1]) * Le), this.transform = [Be * Le, rt * Le, ft * Le, $e * Le, De - Be * Le * Ye - ft * Le * lt, Te - rt * Le * Ye - $e * Le * lt], this.width = ye, this.height = Pe;
|
|
4724
4724
|
}
|
|
4725
4725
|
get rawDims() {
|
|
4726
4726
|
const {
|
|
@@ -4869,15 +4869,15 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
|
|
|
4869
4869
|
qe = qe >= 1 && qe <= 31 ? qe : 1;
|
|
4870
4870
|
let St = parseInt(Le[4], 10);
|
|
4871
4871
|
St = St >= 0 && St <= 23 ? St : 0;
|
|
4872
|
-
let
|
|
4873
|
-
|
|
4872
|
+
let Ye = parseInt(Le[5], 10);
|
|
4873
|
+
Ye = Ye >= 0 && Ye <= 59 ? Ye : 0;
|
|
4874
4874
|
let lt = parseInt(Le[6], 10);
|
|
4875
4875
|
lt = lt >= 0 && lt <= 59 ? lt : 0;
|
|
4876
4876
|
const Be = Le[7] || "Z";
|
|
4877
4877
|
let rt = parseInt(Le[8], 10);
|
|
4878
4878
|
rt = rt >= 0 && rt <= 23 ? rt : 0;
|
|
4879
4879
|
let ft = parseInt(Le[9], 10) || 0;
|
|
4880
|
-
return ft = ft >= 0 && ft <= 59 ? ft : 0, Be === "-" ? (St += rt,
|
|
4880
|
+
return ft = ft >= 0 && ft <= 59 ? ft : 0, Be === "-" ? (St += rt, Ye += ft) : Be === "+" && (St -= rt, Ye -= ft), new Date(Date.UTC(Ke, Oe, qe, St, Ye, lt));
|
|
4881
4881
|
}
|
|
4882
4882
|
}
|
|
4883
4883
|
e.PDFDateString = k;
|
|
@@ -4941,7 +4941,7 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
|
|
|
4941
4941
|
pageHeight: qe
|
|
4942
4942
|
} = Me.rawDims, {
|
|
4943
4943
|
style: St
|
|
4944
|
-
} = Ve,
|
|
4944
|
+
} = Ve, Ye = s.FeatureTest.isCSSRoundSupported, lt = `var(--scale-factor) * ${Oe}px`, Be = `var(--scale-factor) * ${qe}px`, rt = Ye ? `round(${lt}, 1px)` : `calc(${lt})`, ft = Ye ? `round(${Be}, 1px)` : `calc(${Be})`;
|
|
4945
4945
|
!Le || Me.rotation % 180 === 0 ? (St.width = rt, St.height = ft) : (St.width = ft, St.height = rt);
|
|
4946
4946
|
}
|
|
4947
4947
|
Ke && Ve.setAttribute("data-main-rotation", Me.rotation);
|
|
@@ -5586,11 +5586,11 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
|
|
|
5586
5586
|
const Ke = at - fe;
|
|
5587
5587
|
let Oe = 0;
|
|
5588
5588
|
const qe = Ke > Ve ? V : Ke * 8 - 7, St = qe & -8;
|
|
5589
|
-
let
|
|
5589
|
+
let Ye = 0, lt = 0;
|
|
5590
5590
|
for (; Oe < St; Oe += 8)
|
|
5591
5591
|
lt = ge[fe++], Ze[ce++] = lt & 128 ? Me : Le, Ze[ce++] = lt & 64 ? Me : Le, Ze[ce++] = lt & 32 ? Me : Le, Ze[ce++] = lt & 16 ? Me : Le, Ze[ce++] = lt & 8 ? Me : Le, Ze[ce++] = lt & 4 ? Me : Le, Ze[ce++] = lt & 2 ? Me : Le, Ze[ce++] = lt & 1 ? Me : Le;
|
|
5592
5592
|
for (; Oe < qe; Oe++)
|
|
5593
|
-
|
|
5593
|
+
Ye === 0 && (lt = ge[fe++], Ye = 128), Ze[ce++] = lt & Ye ? Me : Le, Ye >>= 1;
|
|
5594
5594
|
}
|
|
5595
5595
|
for (; ce < yt; )
|
|
5596
5596
|
Ze[ce++] = 0;
|
|
@@ -5776,11 +5776,11 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
|
|
|
5776
5776
|
ce = JSON.stringify(ie ? le : [le.slice(0, 4), Y]), fe = this._cachedBitmapsMap.get(Oe), fe || (fe = /* @__PURE__ */ new Map(), this._cachedBitmapsMap.set(Oe, fe));
|
|
5777
5777
|
const qe = fe.get(ce);
|
|
5778
5778
|
if (qe && !ie) {
|
|
5779
|
-
const St = Math.round(Math.min(le[0], le[2]) + le[4]),
|
|
5779
|
+
const St = Math.round(Math.min(le[0], le[2]) + le[4]), Ye = Math.round(Math.min(le[1], le[3]) + le[5]);
|
|
5780
5780
|
return {
|
|
5781
5781
|
canvas: qe,
|
|
5782
5782
|
offsetX: St,
|
|
5783
|
-
offsetY:
|
|
5783
|
+
offsetY: Ye
|
|
5784
5784
|
};
|
|
5785
5785
|
}
|
|
5786
5786
|
ge = qe;
|
|
@@ -6093,7 +6093,7 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
|
|
|
6093
6093
|
continue;
|
|
6094
6094
|
}
|
|
6095
6095
|
let Oe = !1;
|
|
6096
|
-
const qe = (Ke.isSpace ? fe : 0) + le, St = Ke.fontChar,
|
|
6096
|
+
const qe = (Ke.isSpace ? fe : 0) + le, St = Ke.fontChar, Ye = Ke.accent;
|
|
6097
6097
|
let lt, Be, rt = Ke.width;
|
|
6098
6098
|
if (Re) {
|
|
6099
6099
|
const $e = Ke.vmetric || Ne, De = -(Ke.vmetric ? $e[1] : rt * 0.5) * Qe, Te = $e[2] * Qe;
|
|
@@ -6109,11 +6109,11 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
|
|
|
6109
6109
|
rt !== $e && (lt += (rt - $e) / 2e3 * G / ie);
|
|
6110
6110
|
}
|
|
6111
6111
|
if (this.contentVisible && (Ke.isInFont || V.missingFile)) {
|
|
6112
|
-
if (at && !
|
|
6112
|
+
if (at && !Ye)
|
|
6113
6113
|
Y.fillText(St, lt, Be);
|
|
6114
|
-
else if (this.paintChar(St, lt, Be, Ze),
|
|
6115
|
-
const $e = lt + G *
|
|
6116
|
-
this.paintChar(
|
|
6114
|
+
else if (this.paintChar(St, lt, Be, Ze), Ye) {
|
|
6115
|
+
const $e = lt + G * Ye.offset.x / ie, De = Be - G * Ye.offset.y / ie;
|
|
6116
|
+
this.paintChar(Ye.fontChar, $e, De, Ze);
|
|
6117
6117
|
}
|
|
6118
6118
|
}
|
|
6119
6119
|
const ft = Re ? rt * Qe - qe * ce : rt * Qe + qe * ce;
|
|
@@ -10080,7 +10080,7 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
|
|
|
10080
10080
|
/* 29 */
|
|
10081
10081
|
/***/
|
|
10082
10082
|
(l, e, n) => {
|
|
10083
|
-
var W, G, Uo, ie, oy, fe, ce, ge, Se, Re, Fe, Ne, Qe, at, Ze, yt, Ve, Me, Le, Ke, Oe, qe, St, ly, lt, Wf, rt, Ym, $e, qm, Te, ye, Pe,
|
|
10083
|
+
var W, G, Uo, ie, oy, fe, ce, ge, Se, Re, Fe, Ne, Qe, at, Ze, yt, Ve, Me, Le, Ke, Oe, qe, St, ly, lt, Wf, rt, Ym, $e, qm, Te, ye, Pe, Xe, Ft, Pt, Ie, Qm, Ct, st, wt, Nt, uy, ke, Jm;
|
|
10084
10084
|
Object.defineProperty(e, "__esModule", {
|
|
10085
10085
|
value: !0
|
|
10086
10086
|
}), e.StampAnnotationElement = e.InkAnnotationElement = e.FreeTextAnnotationElement = e.AnnotationLayer = void 0;
|
|
@@ -11443,7 +11443,7 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
|
|
|
11443
11443
|
isRenderable: !0,
|
|
11444
11444
|
ignoreBorder: !0
|
|
11445
11445
|
});
|
|
11446
|
-
Ae(this,
|
|
11446
|
+
Ae(this, Xe, null);
|
|
11447
11447
|
this.containerClassName = "polylineAnnotation", this.svgElementName = "svg:polyline";
|
|
11448
11448
|
}
|
|
11449
11449
|
render() {
|
|
@@ -11458,17 +11458,17 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
|
|
|
11458
11458
|
de.push(tt + "," + ht);
|
|
11459
11459
|
}
|
|
11460
11460
|
de = de.join(" ");
|
|
11461
|
-
const be = We(this,
|
|
11461
|
+
const be = We(this, Xe, this.svgFactory.createElement(this.svgElementName));
|
|
11462
11462
|
return be.setAttribute("points", de), be.setAttribute("stroke-width", te.borderStyle.width || 1), be.setAttribute("stroke", "transparent"), be.setAttribute("fill", "transparent"), we.append(be), this.container.append(we), !te.popupRef && this.hasPopupData && this._createPopup(), this.container;
|
|
11463
11463
|
}
|
|
11464
11464
|
getElementsToTriggerPopup() {
|
|
11465
|
-
return Z(this,
|
|
11465
|
+
return Z(this, Xe);
|
|
11466
11466
|
}
|
|
11467
11467
|
addHighlightArea() {
|
|
11468
11468
|
this.container.classList.add("highlightArea");
|
|
11469
11469
|
}
|
|
11470
11470
|
}
|
|
11471
|
-
|
|
11471
|
+
Xe = new WeakMap();
|
|
11472
11472
|
class X extends z {
|
|
11473
11473
|
constructor(_e) {
|
|
11474
11474
|
super(_e), this.containerClassName = "polygonAnnotation", this.svgElementName = "svg:polygon";
|
|
@@ -12026,12 +12026,12 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
|
|
|
12026
12026
|
/* 33 */
|
|
12027
12027
|
/***/
|
|
12028
12028
|
(l, e, n) => {
|
|
12029
|
-
var u, p, _, T, x, S, g, v, b, R, y, w, C, N, D, cy, k, dy, M, fy, B, hy, X, Zm, se, py, K, eg, ue, my, J, gy, W, vy, G, yy, ie, _y, fe, xa, ge, tg, Re, Kf, Ne, Xf, at, ru, yt, ng, Me, Yf, Ke, xy, qe, rg,
|
|
12029
|
+
var u, p, _, T, x, S, g, v, b, R, y, w, C, N, D, cy, k, dy, M, fy, B, hy, X, Zm, se, py, K, eg, ue, my, J, gy, W, vy, G, yy, ie, _y, fe, xa, ge, tg, Re, Kf, Ne, Xf, at, ru, yt, ng, Me, Yf, Ke, xy, qe, rg, Ye, Ey, Be, Sy, ft, ig, De, qf, ye, iu;
|
|
12030
12030
|
Object.defineProperty(e, "__esModule", {
|
|
12031
12031
|
value: !0
|
|
12032
12032
|
}), e.InkEditor = void 0;
|
|
12033
12033
|
var t = n(1), s = n(4), o = n(29), d = n(6), h = n(5);
|
|
12034
|
-
const
|
|
12034
|
+
const Xe = class Xe extends s.AnnotationEditor {
|
|
12035
12035
|
constructor(Ie) {
|
|
12036
12036
|
super({
|
|
12037
12037
|
...Ie,
|
|
@@ -12084,13 +12084,13 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
|
|
|
12084
12084
|
static updateDefaultParams(Ie, mt) {
|
|
12085
12085
|
switch (Ie) {
|
|
12086
12086
|
case t.AnnotationEditorParamsType.INK_THICKNESS:
|
|
12087
|
-
|
|
12087
|
+
Xe._defaultThickness = mt;
|
|
12088
12088
|
break;
|
|
12089
12089
|
case t.AnnotationEditorParamsType.INK_COLOR:
|
|
12090
|
-
|
|
12090
|
+
Xe._defaultColor = mt;
|
|
12091
12091
|
break;
|
|
12092
12092
|
case t.AnnotationEditorParamsType.INK_OPACITY:
|
|
12093
|
-
|
|
12093
|
+
Xe._defaultOpacity = mt / 100;
|
|
12094
12094
|
break;
|
|
12095
12095
|
}
|
|
12096
12096
|
}
|
|
@@ -12108,10 +12108,10 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
|
|
|
12108
12108
|
}
|
|
12109
12109
|
}
|
|
12110
12110
|
static get defaultPropertiesToUpdate() {
|
|
12111
|
-
return [[t.AnnotationEditorParamsType.INK_THICKNESS,
|
|
12111
|
+
return [[t.AnnotationEditorParamsType.INK_THICKNESS, Xe._defaultThickness], [t.AnnotationEditorParamsType.INK_COLOR, Xe._defaultColor || s.AnnotationEditor._defaultLineColor], [t.AnnotationEditorParamsType.INK_OPACITY, Math.round(Xe._defaultOpacity * 100)]];
|
|
12112
12112
|
}
|
|
12113
12113
|
get propertiesToUpdate() {
|
|
12114
|
-
return [[t.AnnotationEditorParamsType.INK_THICKNESS, this.thickness ||
|
|
12114
|
+
return [[t.AnnotationEditorParamsType.INK_THICKNESS, this.thickness || Xe._defaultThickness], [t.AnnotationEditorParamsType.INK_COLOR, this.color || Xe._defaultColor || s.AnnotationEditor._defaultLineColor], [t.AnnotationEditorParamsType.INK_OPACITY, Math.round(100 * (this.opacity ?? Xe._defaultOpacity))]];
|
|
12115
12115
|
}
|
|
12116
12116
|
rebuild() {
|
|
12117
12117
|
this.parent && (super.rebuild(), this.div !== null && (this.canvas || (Ue(this, Re, Kf).call(this), Ue(this, Ne, Xf).call(this)), this.isAttachedToDOM || (this.parent.add(this), Ue(this, at, ru).call(this)), Ue(this, ye, iu).call(this)));
|
|
@@ -12201,7 +12201,7 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
|
|
|
12201
12201
|
for (let {
|
|
12202
12202
|
bezier: ze
|
|
12203
12203
|
} of _e) {
|
|
12204
|
-
ze = Ue(we =
|
|
12204
|
+
ze = Ue(we = Xe, Ye, Ey).call(we, ze, te, me);
|
|
12205
12205
|
const tt = [];
|
|
12206
12206
|
st.paths.push(tt);
|
|
12207
12207
|
let ht = pt * (ze[0] - ot), At = pt * (ze[1] - ot);
|
|
@@ -12301,7 +12301,7 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
|
|
|
12301
12301
|
} = this;
|
|
12302
12302
|
Ie.lineWidth = st * wt / Nt, Ie.lineCap = "round", Ie.lineJoin = "round", Ie.miterLimit = 10, Ie.strokeStyle = `${mt}${(0, h.opacityToHex)(Ct)}`;
|
|
12303
12303
|
}, se = new WeakSet(), py = function(Ie, mt) {
|
|
12304
|
-
this.canvas.addEventListener("contextmenu", d.noContextMenu), this.canvas.addEventListener("pointerleave", Z(this, T)), this.canvas.addEventListener("pointermove", Z(this, _)), this.canvas.addEventListener("pointerup", Z(this, x)), this.canvas.removeEventListener("pointerdown", Z(this, S)), this.isEditing = !0, Z(this, R) || (We(this, R, !0), Ue(this, at, ru).call(this), this.thickness || (this.thickness =
|
|
12304
|
+
this.canvas.addEventListener("contextmenu", d.noContextMenu), this.canvas.addEventListener("pointerleave", Z(this, T)), this.canvas.addEventListener("pointermove", Z(this, _)), this.canvas.addEventListener("pointerup", Z(this, x)), this.canvas.removeEventListener("pointerdown", Z(this, S)), this.isEditing = !0, Z(this, R) || (We(this, R, !0), Ue(this, at, ru).call(this), this.thickness || (this.thickness = Xe._defaultThickness), this.color || (this.color = Xe._defaultColor || s.AnnotationEditor._defaultLineColor), this.opacity ?? (this.opacity = Xe._defaultOpacity)), this.currentPath.push([Ie, mt]), We(this, b, !1), Ue(this, X, Zm).call(this), We(this, N, () => {
|
|
12305
12305
|
Ue(this, W, vy).call(this), Z(this, N) && window.requestAnimationFrame(Z(this, N));
|
|
12306
12306
|
}), window.requestAnimationFrame(Z(this, N));
|
|
12307
12307
|
}, K = new WeakSet(), eg = function(Ie, mt) {
|
|
@@ -12441,7 +12441,7 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
|
|
|
12441
12441
|
throw new Error("Invalid rotation");
|
|
12442
12442
|
}
|
|
12443
12443
|
return Ie;
|
|
12444
|
-
},
|
|
12444
|
+
}, Ye = new WeakSet(), Ey = function(Ie, mt, Ct) {
|
|
12445
12445
|
const [st, wt, Nt, qt] = mt;
|
|
12446
12446
|
switch (Ct) {
|
|
12447
12447
|
case 0:
|
|
@@ -12478,8 +12478,8 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
|
|
|
12478
12478
|
Ee === 0 && (te.push(ht, At), me.push(ht, At)), te.push(vt, gt, kt, Mt, Ut, Kt), me.push(vt, gt), Ee === we - 1 && me.push(Ut, Kt);
|
|
12479
12479
|
}
|
|
12480
12480
|
wt.push({
|
|
12481
|
-
bezier: Ue(pt =
|
|
12482
|
-
points: Ue(ot =
|
|
12481
|
+
bezier: Ue(pt = Xe, qe, rg).call(pt, te, st, this.rotation),
|
|
12482
|
+
points: Ue(ot = Xe, qe, rg).call(ot, me, st, this.rotation)
|
|
12483
12483
|
});
|
|
12484
12484
|
}
|
|
12485
12485
|
return wt;
|
|
@@ -12508,8 +12508,8 @@ const __viteBrowserExternal = {}, __viteBrowserExternal$1 = /* @__PURE__ */ Obje
|
|
|
12508
12508
|
this.translationX = -mt[0], this.translationY = -mt[1], Ue(this, at, ru).call(this), Ue(this, fe, xa).call(this), We(this, w, st), We(this, C, wt), this.setDims(st, wt);
|
|
12509
12509
|
const ot = Ie ? Ct / this.scaleFactor / 2 : 0;
|
|
12510
12510
|
this.translate(ke - this.translationX - ot, pt - this.translationY - ot);
|
|
12511
|
-
}, Ae(
|
|
12512
|
-
let f =
|
|
12511
|
+
}, Ae(Xe, Ke), Ae(Xe, qe), Ae(Xe, Ye), Mn(Xe, "_defaultColor", null), Mn(Xe, "_defaultOpacity", 1), Mn(Xe, "_defaultThickness", 1), Mn(Xe, "_type", "ink");
|
|
12512
|
+
let f = Xe;
|
|
12513
12513
|
e.InkEditor = f;
|
|
12514
12514
|
},
|
|
12515
12515
|
/* 34 */
|
|
@@ -14266,11 +14266,11 @@ function Page(l) {
|
|
|
14266
14266
|
function St() {
|
|
14267
14267
|
return K ? jsxRuntimeExports.jsx(AnnotationLayer, {}, `${Le}_annotations`) : null;
|
|
14268
14268
|
}
|
|
14269
|
-
function
|
|
14269
|
+
function Ye() {
|
|
14270
14270
|
return jsxRuntimeExports.jsxs(PageContext.Provider, { value: Ve, children: [Oe(), qe(), St(), h] });
|
|
14271
14271
|
}
|
|
14272
14272
|
function lt() {
|
|
14273
|
-
return Se ? se === null || le === void 0 || le === null ? jsxRuntimeExports.jsx(Message$1, { type: "loading", children: typeof g == "function" ? g() : g }) : se === !1 || le === !1 ? jsxRuntimeExports.jsx(Message$1, { type: "error", children: typeof T == "function" ? T() : T }) :
|
|
14273
|
+
return Se ? se === null || le === void 0 || le === null ? jsxRuntimeExports.jsx(Message$1, { type: "loading", children: typeof g == "function" ? g() : g }) : se === !1 || le === !1 ? jsxRuntimeExports.jsx(Message$1, { type: "error", children: typeof T == "function" ? T() : T }) : Ye() : jsxRuntimeExports.jsx(Message$1, { type: "no-data", children: typeof v == "function" ? v() : v });
|
|
14274
14274
|
}
|
|
14275
14275
|
return jsxRuntimeExports.jsx("div", Object.assign({ className: clsx(t, f), "data-page-number": Se, ref: mergeRefs(S, ce), style: {
|
|
14276
14276
|
"--scale-factor": `${Fe}`,
|
|
@@ -22884,8 +22884,8 @@ var hls = { exports: {} };
|
|
|
22884
22884
|
se && (g |= M.length && re && (b && Math.abs(S - re / F) < 0.1 || Math.abs(M[0].pts - re - X) < F / 5)), g || (re = S * F), M.forEach(function(Oe) {
|
|
22885
22885
|
Oe.pts = z(Oe.pts - X, re), Oe.dts = z(Oe.dts - X, re);
|
|
22886
22886
|
}), M.sort(function(Oe, qe) {
|
|
22887
|
-
var St = Oe.dts - qe.dts,
|
|
22888
|
-
return St ||
|
|
22887
|
+
var St = Oe.dts - qe.dts, Ye = Oe.pts - qe.pts;
|
|
22888
|
+
return St || Ye || Oe.id - qe.id;
|
|
22889
22889
|
});
|
|
22890
22890
|
var ee = M.reduce(function(Oe, qe) {
|
|
22891
22891
|
return Math.max(Math.min(Oe, qe.pts - qe.dts), -18e3);
|
|
@@ -30434,23 +30434,23 @@ function ConversationalProComponent({
|
|
|
30434
30434
|
e({ type: "success" });
|
|
30435
30435
|
}, [e]), Ze = useCallback(
|
|
30436
30436
|
($e, De) => {
|
|
30437
|
-
const Te = [3, 2, 1][$e.id], Pe = o.filter((
|
|
30437
|
+
const Te = [3, 2, 1][$e.id], Pe = o.filter((Xe) => Xe.fromId === X.id).find((Xe) => parseInt(Xe.fromPointIndex) === Te);
|
|
30438
30438
|
if (Pe) {
|
|
30439
|
-
const
|
|
30440
|
-
Pe.fromId === Pe.toId ? De() :
|
|
30439
|
+
const Xe = s.findIndex((Ft) => Ft.id === Pe.toId);
|
|
30440
|
+
Pe.fromId === Pe.toId ? De() : Xe >= 0 ? (P(Xe), e({ type: "notifyProgress", payload: { line: Xe } })) : at();
|
|
30441
30441
|
} else
|
|
30442
30442
|
at();
|
|
30443
30443
|
},
|
|
30444
30444
|
[X.id, o, e, at, s]
|
|
30445
30445
|
), yt = useCallback(
|
|
30446
30446
|
($e = !0) => {
|
|
30447
|
-
const De = $e ? ["fromId", "toId"] : ["toId", "fromId"], Te = o.filter((
|
|
30447
|
+
const De = $e ? ["fromId", "toId"] : ["toId", "fromId"], Te = o.filter((Xe) => Xe[De[0]] === X.id), ye = Te.length === 1 ? Te[0] : Te.find((Xe) => Xe[De[1]] === V);
|
|
30448
30448
|
if (!(ye != null && ye[De[0]])) {
|
|
30449
30449
|
at();
|
|
30450
30450
|
return;
|
|
30451
30451
|
}
|
|
30452
30452
|
$e || W(H.slice(0, -1));
|
|
30453
|
-
const Pe = s.findIndex((
|
|
30453
|
+
const Pe = s.findIndex((Xe) => Xe.id === ye[De[1]]);
|
|
30454
30454
|
Pe >= 0 ? (P(Pe), e({ type: "notifyProgress", payload: { line: Pe } })) : at();
|
|
30455
30455
|
},
|
|
30456
30456
|
[X.id, o, H, e, at, V, s]
|
|
@@ -30460,7 +30460,7 @@ function ConversationalProComponent({
|
|
|
30460
30460
|
if ($e) {
|
|
30461
30461
|
const De = [3, 2, 1][$e.id], ye = o.filter((Pe) => Pe.fromId === X.id).find((Pe) => parseInt(Pe.fromPointIndex) === De);
|
|
30462
30462
|
if (ye) {
|
|
30463
|
-
const Pe = s.findIndex((
|
|
30463
|
+
const Pe = s.findIndex((Xe) => Xe.id === ye.toId);
|
|
30464
30464
|
Pe >= 0 && e({ type: "notifyProgress", payload: { line: Pe } });
|
|
30465
30465
|
} else
|
|
30466
30466
|
e({ type: "saveNode" });
|
|
@@ -30510,7 +30510,7 @@ function ConversationalProComponent({
|
|
|
30510
30510
|
M("click-ui"), Ke() ? at() : (w(!1), Me());
|
|
30511
30511
|
}, qe = () => {
|
|
30512
30512
|
M("click-ui"), w(!1), Le();
|
|
30513
|
-
}, St = y && !pe && !t && !J,
|
|
30513
|
+
}, St = y && !pe && !t && !J, Ye = useMemo(() => G() >= 0 && H.length === 0 && ne || D === 0 && !ne || ie() || le(), [G, H.length, ne, D, ie, le]);
|
|
30514
30514
|
useEkho({
|
|
30515
30515
|
audioType: X == null ? void 0 : X.audioType,
|
|
30516
30516
|
volume: X == null ? void 0 : X.audioVolume,
|
|
@@ -30573,7 +30573,7 @@ function ConversationalProComponent({
|
|
|
30573
30573
|
disabled: pe,
|
|
30574
30574
|
repeat: !1,
|
|
30575
30575
|
forward: Oe,
|
|
30576
|
-
rewind:
|
|
30576
|
+
rewind: Ye ? null : qe
|
|
30577
30577
|
});
|
|
30578
30578
|
if (useEffect(() => lt(), [lt]), J)
|
|
30579
30579
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
@@ -30623,8 +30623,8 @@ function ConversationalProComponent({
|
|
|
30623
30623
|
"button",
|
|
30624
30624
|
{
|
|
30625
30625
|
"data-testid": "conversational-pro-button-back",
|
|
30626
|
-
className: `gat--btn__round ${
|
|
30627
|
-
disabled:
|
|
30626
|
+
className: `gat--btn__round ${Ye ? "disabled" : ""}`,
|
|
30627
|
+
disabled: Ye ? !0 : "",
|
|
30628
30628
|
type: "button",
|
|
30629
30629
|
onClick: qe,
|
|
30630
30630
|
"aria-label": LangIsRtl() ? fe("storylines.misc.forward") : fe("storylines.misc.rewind"),
|
|
@@ -40120,11 +40120,11 @@ function requireScheduler_development() {
|
|
|
40120
40120
|
}
|
|
40121
40121
|
function f(Be, rt, ft) {
|
|
40122
40122
|
for (var $e = ft, De = Be.length, Te = De >>> 1; $e < Te; ) {
|
|
40123
|
-
var ye = ($e + 1) * 2 - 1, Pe = Be[ye],
|
|
40123
|
+
var ye = ($e + 1) * 2 - 1, Pe = Be[ye], Xe = ye + 1, Ft = Be[Xe];
|
|
40124
40124
|
if (u(Pe, rt) < 0)
|
|
40125
|
-
|
|
40126
|
-
else if (
|
|
40127
|
-
Be[$e] = Ft, Be[
|
|
40125
|
+
Xe < De && u(Ft, Pe) < 0 ? (Be[$e] = Ft, Be[Xe] = rt, $e = Xe) : (Be[$e] = Pe, Be[ye] = rt, $e = ye);
|
|
40126
|
+
else if (Xe < De && u(Ft, rt) < 0)
|
|
40127
|
+
Be[$e] = Ft, Be[Xe] = rt, $e = Xe;
|
|
40128
40128
|
else
|
|
40129
40129
|
return;
|
|
40130
40130
|
}
|
|
@@ -40275,7 +40275,7 @@ function requireScheduler_development() {
|
|
|
40275
40275
|
ye = D;
|
|
40276
40276
|
break;
|
|
40277
40277
|
}
|
|
40278
|
-
var Pe = De + ye,
|
|
40278
|
+
var Pe = De + ye, Xe = {
|
|
40279
40279
|
id: j++,
|
|
40280
40280
|
callback: rt,
|
|
40281
40281
|
priorityLevel: Be,
|
|
@@ -40283,7 +40283,7 @@ function requireScheduler_development() {
|
|
|
40283
40283
|
expirationTime: Pe,
|
|
40284
40284
|
sortIndex: -1
|
|
40285
40285
|
};
|
|
40286
|
-
return De > $e ? (
|
|
40286
|
+
return De > $e ? (Xe.sortIndex = De, s(M, Xe), o(F) === null && Xe === o(M) && (se ? St() : se = !0, qe(pe, De - $e))) : (Xe.sortIndex = Pe, s(F, Xe), !re && !X && (re = !0, Oe(J))), Xe;
|
|
40287
40287
|
}
|
|
40288
40288
|
function ie() {
|
|
40289
40289
|
}
|
|
@@ -40350,8 +40350,8 @@ function requireScheduler_development() {
|
|
|
40350
40350
|
function St() {
|
|
40351
40351
|
K(Fe), Fe = -1;
|
|
40352
40352
|
}
|
|
40353
|
-
var
|
|
40354
|
-
l.unstable_IdlePriority = S, l.unstable_ImmediatePriority = p, l.unstable_LowPriority = x, l.unstable_NormalPriority = T, l.unstable_Profiling = lt, l.unstable_UserBlockingPriority = _, l.unstable_cancelCallback = ce, l.unstable_continueExecution = le, l.unstable_forceFrameRate = yt, l.unstable_getCurrentPriorityLevel = ge, l.unstable_getFirstCallbackNode = fe, l.unstable_next = V, l.unstable_pauseExecution = ie, l.unstable_requestPaint =
|
|
40353
|
+
var Ye = Ze, lt = null;
|
|
40354
|
+
l.unstable_IdlePriority = S, l.unstable_ImmediatePriority = p, l.unstable_LowPriority = x, l.unstable_NormalPriority = T, l.unstable_Profiling = lt, l.unstable_UserBlockingPriority = _, l.unstable_cancelCallback = ce, l.unstable_continueExecution = le, l.unstable_forceFrameRate = yt, l.unstable_getCurrentPriorityLevel = ge, l.unstable_getFirstCallbackNode = fe, l.unstable_next = V, l.unstable_pauseExecution = ie, l.unstable_requestPaint = Ye, l.unstable_runWithPriority = W, l.unstable_scheduleCallback = Y, l.unstable_shouldYield = at, l.unstable_wrapCallback = G, typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error());
|
|
40355
40355
|
}();
|
|
40356
40356
|
}(scheduler_development)), scheduler_development;
|
|
40357
40357
|
}
|
|
@@ -40584,7 +40584,7 @@ function requireReactReconciler_production_min() {
|
|
|
40584
40584
|
}
|
|
40585
40585
|
return null;
|
|
40586
40586
|
}
|
|
40587
|
-
var X = Array.isArray, re = e.getPublicInstance, se = e.getRootHostContext, ee = e.getChildHostContext, K = e.prepareForCommit, ne = e.resetAfterCommit, ue = e.createInstance, pe = e.appendInitialChild, J = e.finalizeInitialChildren, H = e.prepareUpdate, W = e.shouldSetTextContent, V = e.createTextInstance, G = e.scheduleTimeout, Y = e.cancelTimeout, ie = e.noTimeout, le = e.isPrimaryRenderer, fe = e.supportsMutation, ce = e.supportsPersistence, ge = e.supportsHydration, Se = e.getInstanceFromNode, Re = e.preparePortalMount, Fe = e.getCurrentEventPriority, Ne = e.detachDeletedInstance, Qe = e.supportsMicrotasks, at = e.scheduleMicrotask, Ze = e.supportsTestSelectors, yt = e.findFiberRoot, Ve = e.getBoundingRect, Me = e.getTextContent, Le = e.isHiddenSubtree, Ke = e.matchAccessibilityRole, Oe = e.setFocusIfFocusable, qe = e.setupIntersectionObserver, St = e.appendChild,
|
|
40587
|
+
var X = Array.isArray, re = e.getPublicInstance, se = e.getRootHostContext, ee = e.getChildHostContext, K = e.prepareForCommit, ne = e.resetAfterCommit, ue = e.createInstance, pe = e.appendInitialChild, J = e.finalizeInitialChildren, H = e.prepareUpdate, W = e.shouldSetTextContent, V = e.createTextInstance, G = e.scheduleTimeout, Y = e.cancelTimeout, ie = e.noTimeout, le = e.isPrimaryRenderer, fe = e.supportsMutation, ce = e.supportsPersistence, ge = e.supportsHydration, Se = e.getInstanceFromNode, Re = e.preparePortalMount, Fe = e.getCurrentEventPriority, Ne = e.detachDeletedInstance, Qe = e.supportsMicrotasks, at = e.scheduleMicrotask, Ze = e.supportsTestSelectors, yt = e.findFiberRoot, Ve = e.getBoundingRect, Me = e.getTextContent, Le = e.isHiddenSubtree, Ke = e.matchAccessibilityRole, Oe = e.setFocusIfFocusable, qe = e.setupIntersectionObserver, St = e.appendChild, Ye = e.appendChildToContainer, lt = e.commitTextUpdate, Be = e.commitMount, rt = e.commitUpdate, ft = e.insertBefore, $e = e.insertInContainerBefore, De = e.removeChild, Te = e.removeChildFromContainer, ye = e.resetTextContent, Pe = e.hideInstance, Xe = e.hideTextInstance, Ft = e.unhideInstance, Pt = e.unhideTextInstance, Ie = e.clearContainer, mt = e.cloneInstance, Ct = e.createContainerChildSet, st = e.appendChildToContainerChildSet, wt = e.finalizeContainerChildren, Nt = e.replaceContainerChildren, qt = e.cloneHiddenInstance, ke = e.cloneHiddenTextInstance, pt = e.canHydrateInstance, ot = e.canHydrateTextInstance, _e = e.canHydrateSuspenseInstance, te = e.isSuspenseInstancePending, me = e.isSuspenseInstanceFallback, Ee = e.getSuspenseInstanceFallbackErrorDetails, we = e.registerSuspenseInstanceRetry, de = e.getNextHydratableSibling, be = e.getFirstHydratableChild, ze = e.getFirstHydratableChildWithinContainer, tt = e.getFirstHydratableChildWithinSuspenseInstance, ht = e.hydrateInstance, At = e.hydrateTextInstance, vt = e.hydrateSuspenseInstance, gt = e.getNextHydratableInstanceAfterSuspenseInstance, kt = e.commitHydratedContainer, Mt = e.commitHydratedSuspenseInstance, Ut = e.clearSuspenseBoundary, Kt = e.clearSuspenseBoundaryFromContainer, An = e.shouldDeleteUnhydratedTailInstances, _n = e.didNotMatchHydratedContainerTextInstance, zn = e.didNotMatchHydratedTextInstance, mi;
|
|
40588
40588
|
function Fr(E) {
|
|
40589
40589
|
if (mi === void 0)
|
|
40590
40590
|
try {
|
|
@@ -42728,7 +42728,7 @@ Error generating stack: ` + ae.message + `
|
|
|
42728
42728
|
function bl(E, A, I) {
|
|
42729
42729
|
var $ = E.tag;
|
|
42730
42730
|
if ($ === 5 || $ === 6)
|
|
42731
|
-
E = E.stateNode, A ? $e(I, E, A) :
|
|
42731
|
+
E = E.stateNode, A ? $e(I, E, A) : Ye(I, E);
|
|
42732
42732
|
else if ($ !== 4 && (E = E.child, E !== null))
|
|
42733
42733
|
for (bl(E, A, I), E = E.sibling; E !== null; )
|
|
42734
42734
|
bl(E, A, I), E = E.sibling;
|
|
@@ -43001,7 +43001,7 @@ Error generating stack: ` + ae.message + `
|
|
|
43001
43001
|
} else if (A.tag === 6) {
|
|
43002
43002
|
if ($ === null)
|
|
43003
43003
|
try {
|
|
43004
|
-
ae = A.stateNode, I ?
|
|
43004
|
+
ae = A.stateNode, I ? Xe(ae) : Pt(ae, A.memoizedProps);
|
|
43005
43005
|
} catch (It) {
|
|
43006
43006
|
vn(E, E.return, It);
|
|
43007
43007
|
}
|
|
@@ -44523,11 +44523,11 @@ function requireReactReconciler_development() {
|
|
|
44523
44523
|
function x(a, c) {
|
|
44524
44524
|
a._reactInternals = c;
|
|
44525
44525
|
}
|
|
44526
|
-
var S = !1, g = !1, v = !1, b = !1, R = !1, y = !0, w = !0, C = !0, N = 0, D = 1, P = 2, k = 3, F = 4, M = 5, j = 6, B = 7, z = 8, X = 9, re = 10, se = 11, ee = 12, K = 13, ne = 14, ue = 15, pe = 16, J = 17, H = 18, W = 19, V = 21, G = 22, Y = 23, ie = 24, le = 25, fe = Symbol.for("react.element"), ce = Symbol.for("react.portal"), ge = Symbol.for("react.fragment"), Se = Symbol.for("react.strict_mode"), Re = Symbol.for("react.profiler"), Fe = Symbol.for("react.provider"), Ne = Symbol.for("react.context"), Qe = Symbol.for("react.forward_ref"), at = Symbol.for("react.suspense"), Ze = Symbol.for("react.suspense_list"), yt = Symbol.for("react.memo"), Ve = Symbol.for("react.lazy"), Me = Symbol.for("react.scope"), Le = Symbol.for("react.debug_trace_mode"), Ke = Symbol.for("react.offscreen"), Oe = Symbol.for("react.legacy_hidden"), qe = Symbol.for("react.cache"), St = Symbol.for("react.tracing_marker"),
|
|
44526
|
+
var S = !1, g = !1, v = !1, b = !1, R = !1, y = !0, w = !0, C = !0, N = 0, D = 1, P = 2, k = 3, F = 4, M = 5, j = 6, B = 7, z = 8, X = 9, re = 10, se = 11, ee = 12, K = 13, ne = 14, ue = 15, pe = 16, J = 17, H = 18, W = 19, V = 21, G = 22, Y = 23, ie = 24, le = 25, fe = Symbol.for("react.element"), ce = Symbol.for("react.portal"), ge = Symbol.for("react.fragment"), Se = Symbol.for("react.strict_mode"), Re = Symbol.for("react.profiler"), Fe = Symbol.for("react.provider"), Ne = Symbol.for("react.context"), Qe = Symbol.for("react.forward_ref"), at = Symbol.for("react.suspense"), Ze = Symbol.for("react.suspense_list"), yt = Symbol.for("react.memo"), Ve = Symbol.for("react.lazy"), Me = Symbol.for("react.scope"), Le = Symbol.for("react.debug_trace_mode"), Ke = Symbol.for("react.offscreen"), Oe = Symbol.for("react.legacy_hidden"), qe = Symbol.for("react.cache"), St = Symbol.for("react.tracing_marker"), Ye = Symbol.iterator, lt = "@@iterator";
|
|
44527
44527
|
function Be(a) {
|
|
44528
44528
|
if (a === null || typeof a != "object")
|
|
44529
44529
|
return null;
|
|
44530
|
-
var c =
|
|
44530
|
+
var c = Ye && a[Ye] || a[lt];
|
|
44531
44531
|
return typeof c == "function" ? c : null;
|
|
44532
44532
|
}
|
|
44533
44533
|
function rt(a, c, O) {
|
|
@@ -44650,7 +44650,7 @@ function requireReactReconciler_development() {
|
|
|
44650
44650
|
var Pe = (
|
|
44651
44651
|
/* */
|
|
44652
44652
|
0
|
|
44653
|
-
),
|
|
44653
|
+
), Xe = (
|
|
44654
44654
|
/* */
|
|
44655
44655
|
1
|
|
44656
44656
|
), Ft = (
|
|
@@ -49189,7 +49189,7 @@ Visit https://reactjs.org/link/error-boundaries to learn more about error bounda
|
|
|
49189
49189
|
}
|
|
49190
49190
|
He(!1);
|
|
49191
49191
|
}
|
|
49192
|
-
return jn(), a !== null && !gs ? (kg(a, c, U), ga(a, c, U)) : (I() && Ce && Yu(c), c.flags |=
|
|
49192
|
+
return jn(), a !== null && !gs ? (kg(a, c, U), ga(a, c, U)) : (I() && Ce && Yu(c), c.flags |= Xe, di(a, c, ve, U), c.child);
|
|
49193
49193
|
}
|
|
49194
49194
|
function f0(a, c, O, L, U) {
|
|
49195
49195
|
if (a === null) {
|
|
@@ -49228,7 +49228,7 @@ Visit https://reactjs.org/link/error-boundaries to learn more about error bounda
|
|
|
49228
49228
|
if (Rt = Rt !== null ? Rt : Ge, Rt(Et, L) && a.ref === c.ref)
|
|
49229
49229
|
return ga(a, c, U);
|
|
49230
49230
|
}
|
|
49231
|
-
c.flags |=
|
|
49231
|
+
c.flags |= Xe;
|
|
49232
49232
|
var bt = Io(Je, L);
|
|
49233
49233
|
return bt.ref = c.ref, bt.return = c, c.child = bt, bt;
|
|
49234
49234
|
}
|
|
@@ -49355,7 +49355,7 @@ Visit https://reactjs.org/link/error-boundaries to learn more about error bounda
|
|
|
49355
49355
|
}
|
|
49356
49356
|
He(!1);
|
|
49357
49357
|
}
|
|
49358
|
-
return jn(), a !== null && !gs ? (kg(a, c, U), ga(a, c, U)) : (I() && Ce && Yu(c), c.flags |=
|
|
49358
|
+
return jn(), a !== null && !gs ? (kg(a, c, U), ga(a, c, U)) : (I() && Ce && Yu(c), c.flags |= Xe, di(a, c, ve, U), c.child);
|
|
49359
49359
|
}
|
|
49360
49360
|
function g0(a, c, O, L, U) {
|
|
49361
49361
|
{
|
|
@@ -49421,7 +49421,7 @@ Visit https://reactjs.org/link/error-boundaries to learn more about error bounda
|
|
|
49421
49421
|
}
|
|
49422
49422
|
jn();
|
|
49423
49423
|
}
|
|
49424
|
-
return c.flags |=
|
|
49424
|
+
return c.flags |= Xe, a !== null && oe ? c_(a, c, ve, q) : di(a, c, ve, q), c.memoizedState = he.state, U && ka(c, O, !0), c.child;
|
|
49425
49425
|
}
|
|
49426
49426
|
function v0(a) {
|
|
49427
49427
|
var c = a.stateNode;
|
|
@@ -49532,7 +49532,7 @@ Visit https://reactjs.org/link/error-boundaries to learn more about error bounda
|
|
|
49532
49532
|
}
|
|
49533
49533
|
c.mode & Tn && dt.recordLegacyContextWarning(c, null), He(!0), dc.current = c, he = $l(null, c, O, U, q, L), ve = Hl(), He(!1);
|
|
49534
49534
|
}
|
|
49535
|
-
if (jn(), c.flags |=
|
|
49535
|
+
if (jn(), c.flags |= Xe, typeof he == "object" && he !== null && typeof he.render == "function" && he.$$typeof === void 0) {
|
|
49536
49536
|
var je = $e(O) || "Unknown";
|
|
49537
49537
|
fc[je] || (u("The <%s /> component appears to be a function component that returns a class instance. Change %s to a class that extends React.Component instead. If you can't use a class try assigning the prototype on the function as a workaround. `%s.prototype = React.Component.prototype`. Don't use an arrow function since it cannot be called with `new` by React.", je, je, je), fc[je] = !0);
|
|
49538
49538
|
}
|
|
@@ -49971,7 +49971,7 @@ Check the render method of \`` + L + "`.");
|
|
|
49971
49971
|
var oe = fr(L);
|
|
49972
49972
|
aa(c);
|
|
49973
49973
|
var he;
|
|
49974
|
-
return dc.current = c, He(!0), he = q(oe), He(!1), jn(), c.flags |=
|
|
49974
|
+
return dc.current = c, He(!0), he = q(oe), He(!1), jn(), c.flags |= Xe, di(a, c, he, O), c.child;
|
|
49975
49975
|
}
|
|
49976
49976
|
function hc() {
|
|
49977
49977
|
gs = !0;
|
|
@@ -54409,7 +54409,7 @@ function ImageClickWrapperComponent(l) {
|
|
|
54409
54409
|
rewards: (Pe = h == null ? void 0 : h.timerFeedback) == null ? void 0 : Pe.rewards
|
|
54410
54410
|
};
|
|
54411
54411
|
}), W(!0), Oe(), Ke();
|
|
54412
|
-
}, [Oe, Ke, (De = h.timerFeedback) == null ? void 0 : De.desc, (Te = h.timerFeedback) == null ? void 0 : Te.rewards]),
|
|
54412
|
+
}, [Oe, Ke, (De = h.timerFeedback) == null ? void 0 : De.desc, (Te = h.timerFeedback) == null ? void 0 : Te.rewards]), Ye = useCallback(() => {
|
|
54413
54413
|
clearInterval(Y.current), Y.current = setInterval(() => {
|
|
54414
54414
|
G.current = Date.now(), G.current > ie.current && St();
|
|
54415
54415
|
}, 250);
|
|
@@ -54418,13 +54418,13 @@ function ImageClickWrapperComponent(l) {
|
|
|
54418
54418
|
var ye;
|
|
54419
54419
|
if ((u.length === B.length || x && B.length > 0) && !X) {
|
|
54420
54420
|
re(!0);
|
|
54421
|
-
const Pe = B[B.length - 1],
|
|
54421
|
+
const Pe = B[B.length - 1], Xe = C == null ? void 0 : C.correctFeedbacks.find((Ft) => Ft.id === Pe.id);
|
|
54422
54422
|
(!((ye = C == null ? void 0 : C.correctFeedbacks) != null && ye.length) || C != null && C.correctFeedbacks.some((Ft) => !Ft.desc) || x) && (ne((Ft) => ({
|
|
54423
54423
|
...Ft,
|
|
54424
54424
|
show: !0,
|
|
54425
54425
|
success: !0,
|
|
54426
|
-
text:
|
|
54427
|
-
rewards:
|
|
54426
|
+
text: Xe ? Xe.desc : h.solution.right.desc,
|
|
54427
|
+
rewards: Xe ? Xe.rewards : h.solution.right.rewards
|
|
54428
54428
|
})), T && (Oe(), qe()));
|
|
54429
54429
|
}
|
|
54430
54430
|
}, [
|
|
@@ -54461,11 +54461,11 @@ function ImageClickWrapperComponent(l) {
|
|
|
54461
54461
|
se && o(!0);
|
|
54462
54462
|
}, [se, o]);
|
|
54463
54463
|
const lt = (ye, Pe = !1) => {
|
|
54464
|
-
var
|
|
54464
|
+
var Xe, Ft;
|
|
54465
54465
|
if (!X) {
|
|
54466
54466
|
const { rewards: Pt, desc: Ie } = at.wrong;
|
|
54467
54467
|
let mt = Ie, Ct = Pt;
|
|
54468
|
-
const st = (
|
|
54468
|
+
const st = (Xe = C == null ? void 0 : C.wrongFeedbacks) == null ? void 0 : Xe.find((wt) => wt.id === ye.id);
|
|
54469
54469
|
st && (mt = st.desc, Ct = st.rewards), _ && (z([]), Pe && (Ft = h == null ? void 0 : h.orderFeedback) != null && Ft.desc && (mt = h.orderFeedback.desc, Ct = h.orderFeedback.rewards)), T && (Oe(), qe()), ne((wt) => ({
|
|
54470
54470
|
...wt,
|
|
54471
54471
|
show: !0,
|
|
@@ -54477,7 +54477,7 @@ function ImageClickWrapperComponent(l) {
|
|
|
54477
54477
|
}, Be = useCallback(() => {
|
|
54478
54478
|
fe.current = Date.now();
|
|
54479
54479
|
const ye = fe.current + ce.current;
|
|
54480
|
-
G.current = null, ie.current = ye, (T || H) && (K.success ? u.length === B.length || x && B.length > 0 ? Oe() : (Fe(ce.current * 1e-3), Me(),
|
|
54480
|
+
G.current = null, ie.current = ye, (T || H) && (K.success ? u.length === B.length || x && B.length > 0 ? Oe() : (Fe(ce.current * 1e-3), Me(), Ye()) : (z([]), J(!0), D())), Le(K.rewards, K.success), Qe("click-ui"), ne((Pe) => ({
|
|
54481
54481
|
...Pe,
|
|
54482
54482
|
show: !1,
|
|
54483
54483
|
success: !1,
|
|
@@ -54497,16 +54497,16 @@ function ImageClickWrapperComponent(l) {
|
|
|
54497
54497
|
D,
|
|
54498
54498
|
Oe,
|
|
54499
54499
|
Me,
|
|
54500
|
-
|
|
54500
|
+
Ye
|
|
54501
54501
|
]), rt = (ye) => {
|
|
54502
|
-
var Pe,
|
|
54502
|
+
var Pe, Xe;
|
|
54503
54503
|
if (!B.some((Ft) => Ft.index === ye.index) && !K.show && !X) {
|
|
54504
54504
|
Qe("click-ui");
|
|
54505
54505
|
let Ft = at.right.desc, { rewards: Pt } = at.right;
|
|
54506
54506
|
const Ie = [...B, ye];
|
|
54507
54507
|
if (_ && ye.index === B.length || !_) {
|
|
54508
54508
|
if (T && qe(Re), s(), (Pe = C == null ? void 0 : C.correctFeedbacks) != null && Pe.length) {
|
|
54509
|
-
const mt = (
|
|
54509
|
+
const mt = (Xe = C.correctFeedbacks) == null ? void 0 : Xe.find((Ct) => Ct.id === ye.id);
|
|
54510
54510
|
mt && (Ft = mt.desc, Pt = mt.rewards), !Ft && u.length > Ie.length && !x ? Le(Pt, !0) : Ft && !x && (ne((Ct) => ({
|
|
54511
54511
|
...Ct,
|
|
54512
54512
|
show: !0,
|
|
@@ -54520,13 +54520,13 @@ function ImageClickWrapperComponent(l) {
|
|
|
54520
54520
|
lt(ye, !0);
|
|
54521
54521
|
}
|
|
54522
54522
|
}, ft = useCallback(() => {
|
|
54523
|
-
Oe(), Fe(T), Me(), !ue.current && P && F(), J(!1), V.current = Date.now(), ie.current = V.current + T * 1e3,
|
|
54523
|
+
Oe(), Fe(T), Me(), !ue.current && P && F(), J(!1), V.current = Date.now(), ie.current = V.current + T * 1e3, Ye();
|
|
54524
54524
|
}, [
|
|
54525
54525
|
Oe,
|
|
54526
54526
|
T,
|
|
54527
54527
|
Me,
|
|
54528
54528
|
P,
|
|
54529
|
-
|
|
54529
|
+
Ye,
|
|
54530
54530
|
F
|
|
54531
54531
|
]);
|
|
54532
54532
|
return useEffect(() => {
|
|
@@ -54535,7 +54535,7 @@ function ImageClickWrapperComponent(l) {
|
|
|
54535
54535
|
T && Re === 0 && St();
|
|
54536
54536
|
}, [Re, St, T]), useEffect(() => {
|
|
54537
54537
|
T && (M ? (Oe(), qe()) : Me());
|
|
54538
|
-
}, [Oe,
|
|
54538
|
+
}, [Oe, Ye, M, qe, Me, T]), /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: b, children: [
|
|
54539
54539
|
K.show ? /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
54540
54540
|
FeedbackComponent$1,
|
|
54541
54541
|
{
|
|
@@ -56939,71 +56939,71 @@ function WriterPuzzleComponent({
|
|
|
56939
56939
|
backgroundImage: x,
|
|
56940
56940
|
hideBackgroundImageTheme: S = !1
|
|
56941
56941
|
}) {
|
|
56942
|
-
const g = (
|
|
56942
|
+
const g = (Ye) => e({ type: "translate", payload: Ye }), v = useRef(), [b, R] = useState(!1), [y, w] = useState(!1), [C, N] = useState(0), [D, P] = useState({
|
|
56943
56943
|
[`text_${C}`]: {
|
|
56944
56944
|
..._[C],
|
|
56945
56945
|
id: `text_${C}`,
|
|
56946
56946
|
correct: ""
|
|
56947
56947
|
}
|
|
56948
|
-
}), [k, F] = useState(!1), [M, j] = useState([]), [B, z] = useState(!1), [X, re] = useState(!1), [se, ee] = useState(!1), [K, ne] = useState(!0), [ue, pe] = useState([]), [J, H] = useState(!0), [W] = T, V = useRef({}), G = (
|
|
56948
|
+
}), [k, F] = useState(!1), [M, j] = useState([]), [B, z] = useState(!1), [X, re] = useState(!1), [se, ee] = useState(!1), [K, ne] = useState(!0), [ue, pe] = useState([]), [J, H] = useState(!0), [W] = T, V = useRef({}), G = (Ye) => {
|
|
56949
56949
|
let lt;
|
|
56950
|
-
return
|
|
56950
|
+
return Ye.electionTexts.forEach((Be, rt) => {
|
|
56951
56951
|
Be.correct && (lt = rt);
|
|
56952
56952
|
}), lt;
|
|
56953
56953
|
}, Y = useCallback(
|
|
56954
|
-
(
|
|
56954
|
+
(Ye) => M.filter((Be) => Be.currenTextParagraph === Ye)[0].fullText_labelId,
|
|
56955
56955
|
[M]
|
|
56956
56956
|
), ie = useCallback(
|
|
56957
|
-
() => _.map((
|
|
56958
|
-
if (
|
|
56959
|
-
return
|
|
56960
|
-
if (
|
|
56961
|
-
const Be = G(
|
|
56962
|
-
return Be >= 0 ?
|
|
56957
|
+
() => _.map((Ye, lt) => {
|
|
56958
|
+
if (Ye.type === "fixed")
|
|
56959
|
+
return Ye.fullText_labelId ?? Ye.fullText;
|
|
56960
|
+
if (Ye.type === "election") {
|
|
56961
|
+
const Be = G(Ye);
|
|
56962
|
+
return Be >= 0 ? Ye.electionTexts[Be].fullText_labelId : Y(lt);
|
|
56963
56963
|
}
|
|
56964
56964
|
return "";
|
|
56965
56965
|
}),
|
|
56966
56966
|
[Y, _]
|
|
56967
56967
|
), le = 12, fe = () => {
|
|
56968
56968
|
if (M) {
|
|
56969
|
-
const
|
|
56969
|
+
const Ye = M.length;
|
|
56970
56970
|
let lt = 0;
|
|
56971
|
-
for (let Be = 0; Be <
|
|
56971
|
+
for (let Be = 0; Be < Ye; Be += 1)
|
|
56972
56972
|
M[Be].isCorrect === "none" && (lt += 1);
|
|
56973
|
-
return lt ===
|
|
56973
|
+
return lt === Ye;
|
|
56974
56974
|
}
|
|
56975
56975
|
return !0;
|
|
56976
56976
|
}, ce = useCallback(() => {
|
|
56977
56977
|
if (M) {
|
|
56978
|
-
const
|
|
56978
|
+
const Ye = M.length;
|
|
56979
56979
|
let lt = 0;
|
|
56980
|
-
for (let Be = 0; Be <
|
|
56980
|
+
for (let Be = 0; Be < Ye; Be += 1)
|
|
56981
56981
|
M[Be].isCorrect === "green" && (lt += 1);
|
|
56982
|
-
return lt ===
|
|
56982
|
+
return lt === Ye;
|
|
56983
56983
|
}
|
|
56984
56984
|
return !0;
|
|
56985
|
-
}, [M]), ge = () => !!(M && M.length), Se = () => M.find((
|
|
56986
|
-
const { feedback: lt } = _[
|
|
56985
|
+
}, [M]), ge = () => !!(M && M.length), Se = () => M.find((Ye) => {
|
|
56986
|
+
const { feedback: lt } = _[Ye.currenTextParagraph].electionTexts[Ye.index];
|
|
56987
56987
|
return lt.body !== "";
|
|
56988
56988
|
}), Re = useCallback(() => {
|
|
56989
|
-
const
|
|
56989
|
+
const Ye = ie();
|
|
56990
56990
|
l({
|
|
56991
56991
|
type: "finishMedia",
|
|
56992
56992
|
payload: {
|
|
56993
56993
|
name: p,
|
|
56994
|
-
text:
|
|
56994
|
+
text: Ye,
|
|
56995
56995
|
documentType: d,
|
|
56996
56996
|
type: "text"
|
|
56997
56997
|
}
|
|
56998
56998
|
});
|
|
56999
56999
|
}, [ie, p, l, d]), Fe = useCallback(
|
|
57000
|
-
(
|
|
57000
|
+
(Ye) => {
|
|
57001
57001
|
const lt = ce();
|
|
57002
57002
|
W(y ? "fail" : lt ? "score" : "fail"), l({
|
|
57003
57003
|
type: "addPoints",
|
|
57004
57004
|
complex: !0,
|
|
57005
57005
|
finish: !0,
|
|
57006
|
-
payload:
|
|
57006
|
+
payload: Ye || ue,
|
|
57007
57007
|
onFinish: d !== "view" ? Re : null
|
|
57008
57008
|
}), l({ type: "passPuzzle" });
|
|
57009
57009
|
},
|
|
@@ -57030,15 +57030,15 @@ function WriterPuzzleComponent({
|
|
|
57030
57030
|
}, Qe = () => {
|
|
57031
57031
|
ge() ? fe() && (z(!0), Fe()) : (z(!0), ee(!0), Fe()), B ? (ne(!1), se && !X ? re(!0) : (X || !se && !X) && (!se && !X && s ? ce() ? Fe() : Ne() : Fe())) : (z(!0), Se() && ee(!0));
|
|
57032
57032
|
}, at = () => {
|
|
57033
|
-
const
|
|
57034
|
-
return
|
|
57035
|
-
}, Ze = (
|
|
57036
|
-
const lt = _[C].electionTexts[
|
|
57037
|
-
Be && Be[0] && Be[0].points && (V.current[`t${C}_e${
|
|
57033
|
+
const Ye = _[C].electionTexts.filter((Be) => Be.correct).length, lt = _[C].electionTexts;
|
|
57034
|
+
return Ye === 0 || Ye === lt;
|
|
57035
|
+
}, Ze = (Ye) => {
|
|
57036
|
+
const lt = _[C].electionTexts[Ye], Be = lt.feedback.rewards;
|
|
57037
|
+
Be && Be[0] && Be[0].points && (V.current[`t${C}_e${Ye}`] || (lt.correct && (V.current[`t${C}_e${Ye}`] = !0), pe([...ue, ...Be])));
|
|
57038
57038
|
const rt = () => at() ? "none" : lt.correct ? "green" : "red", ft = {
|
|
57039
57039
|
currenTextParagraph: C,
|
|
57040
57040
|
fullText: lt.fullText,
|
|
57041
|
-
index:
|
|
57041
|
+
index: Ye,
|
|
57042
57042
|
isCorrect: rt()
|
|
57043
57043
|
};
|
|
57044
57044
|
P({
|
|
@@ -57053,14 +57053,14 @@ function WriterPuzzleComponent({
|
|
|
57053
57053
|
v.current.scrollTop = v.current.scrollHeight + 100;
|
|
57054
57054
|
}, Ve = () => {
|
|
57055
57055
|
if (v.current.querySelector(".wrapfixed").offsetHeight > v.current.offsetHeight) {
|
|
57056
|
-
const
|
|
57056
|
+
const Ye = v.current.querySelector(".wrapfixed").offsetHeight;
|
|
57057
57057
|
v.current.scrollTo({
|
|
57058
|
-
top:
|
|
57058
|
+
top: Ye,
|
|
57059
57059
|
behavior: "smooth"
|
|
57060
57060
|
});
|
|
57061
57061
|
}
|
|
57062
|
-
}, Me = (
|
|
57063
|
-
const rt =
|
|
57062
|
+
}, Me = (Ye, lt, Be) => {
|
|
57063
|
+
const rt = Ye.fullText, ft = _[Be + 1] ? _[Be + 1].type : "", $e = (
|
|
57064
57064
|
// its magic
|
|
57065
57065
|
D[`text_${Be + 1}`] && D[`text_${Be + 1}`].type ? D[`text_${Be + 1}`].type : ft
|
|
57066
57066
|
);
|
|
@@ -57078,20 +57078,20 @@ function WriterPuzzleComponent({
|
|
|
57078
57078
|
},
|
|
57079
57079
|
Be.toString()
|
|
57080
57080
|
);
|
|
57081
|
-
}, Le = (
|
|
57082
|
-
const Be =
|
|
57083
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(FinishedTextComponent, { textToPrint: Be, correct:
|
|
57084
|
-
}, Ke = (
|
|
57081
|
+
}, Le = (Ye, lt) => {
|
|
57082
|
+
const Be = Ye.fullText;
|
|
57083
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(FinishedTextComponent, { textToPrint: Be, correct: Ye.correct }, lt);
|
|
57084
|
+
}, Ke = (Ye) => /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
57085
57085
|
ElectionComponent,
|
|
57086
57086
|
{
|
|
57087
57087
|
soundActions: T,
|
|
57088
|
-
textWithOpts:
|
|
57088
|
+
textWithOpts: Ye.electionTexts,
|
|
57089
57089
|
setCurrentDecisionSelected: Ze,
|
|
57090
57090
|
printed: yt,
|
|
57091
57091
|
disableExit: J
|
|
57092
57092
|
},
|
|
57093
|
-
|
|
57094
|
-
), Oe = (
|
|
57093
|
+
Ye.electionTexts
|
|
57094
|
+
), Oe = (Ye, lt, Be) => Ye.type === "fixed" ? Me(Ye, lt, Be) : Ke(Ye);
|
|
57095
57095
|
useEffect(() => {
|
|
57096
57096
|
k === !0 && (() => {
|
|
57097
57097
|
_[C + 1] ? (P({
|
|
@@ -57105,8 +57105,8 @@ function WriterPuzzleComponent({
|
|
|
57105
57105
|
})();
|
|
57106
57106
|
}, [k, C, D, _]);
|
|
57107
57107
|
const qe = useMemo(() => {
|
|
57108
|
-
let
|
|
57109
|
-
return S && (
|
|
57108
|
+
let Ye = `writer-puzzle writer-puzzle--${n}`;
|
|
57109
|
+
return S && (Ye += " disable-background-image"), Ye;
|
|
57110
57110
|
}, [S, n]), St = {
|
|
57111
57111
|
backgroundImage: x != null && x.url ? `url('${x.url}')` : ""
|
|
57112
57112
|
};
|
|
@@ -57139,9 +57139,9 @@ function WriterPuzzleComponent({
|
|
|
57139
57139
|
ref: v,
|
|
57140
57140
|
children: [
|
|
57141
57141
|
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "wrapfixed", children: K && !B && Object.values(D).map(
|
|
57142
|
-
(
|
|
57142
|
+
(Ye, lt) => Oe(Ye, Object.values(D).length - 1, lt)
|
|
57143
57143
|
) }),
|
|
57144
|
-
B && Object.values(D).map((
|
|
57144
|
+
B && Object.values(D).map((Ye, lt) => Le(Ye, lt))
|
|
57145
57145
|
]
|
|
57146
57146
|
}
|
|
57147
57147
|
) }),
|
|
@@ -60932,12 +60932,7 @@ function DialogComponent({
|
|
|
60932
60932
|
voiceOver: !1,
|
|
60933
60933
|
avatar: "",
|
|
60934
60934
|
show: !1
|
|
60935
|
-
})
|
|
60936
|
-
useFrame(() => {
|
|
60937
|
-
var ke;
|
|
60938
|
-
(ke = mt.current) != null && ke.node && (mt.current.node.weights.sil > 0.8 ? Xe() : St());
|
|
60939
|
-
});
|
|
60940
|
-
const Re = useMemo(() => t.reduce((ke, pt) => (pt.slots && pt.slots.filter((_e) => _e.uid).forEach((_e) => {
|
|
60935
|
+
}), Re = useMemo(() => t.reduce((ke, pt) => (pt.slots && pt.slots.filter((_e) => _e.uid).forEach((_e) => {
|
|
60941
60936
|
ke.includes(_e.uid) || ke.push(_e.uid);
|
|
60942
60937
|
}), ke), []), [t]), Fe = useCallback((ke) => n({ type: "translate", payload: ke }), [n]), [Ne, Qe] = useState([]), at = useMemo(() => Ne[Ne.length - 1], [Ne]), Ze = useCallback(() => {
|
|
60943
60938
|
const ke = o.find((ot) => ot.fromId === at) || o.find((ot) => ot.toId === at), pt = t.find((ot) => ot.id === (ke == null ? void 0 : ke.fromId));
|
|
@@ -61043,14 +61038,19 @@ function DialogComponent({
|
|
|
61043
61038
|
console.error(me);
|
|
61044
61039
|
});
|
|
61045
61040
|
}
|
|
61046
|
-
},
|
|
61041
|
+
}, Ye = () => {
|
|
61047
61042
|
if (!(K != null && K.uid) || z.current)
|
|
61048
61043
|
return;
|
|
61049
61044
|
const { emotion: ke, uid: pt, animation: ot } = K, _e = getCurrentVisible(pt, C);
|
|
61050
61045
|
if (_e) {
|
|
61051
61046
|
delete _e.userData._active;
|
|
61052
61047
|
const { isSeated: te } = _e;
|
|
61053
|
-
|
|
61048
|
+
if (V.current === pt)
|
|
61049
|
+
qe(pt, "neutral", null, te), V.current = null;
|
|
61050
|
+
else {
|
|
61051
|
+
const me = ke.includes("talking");
|
|
61052
|
+
qe(pt, me ? "neutral" : ke, me ? null : ot, te);
|
|
61053
|
+
}
|
|
61054
61054
|
}
|
|
61055
61055
|
}, lt = useCallback(() => {
|
|
61056
61056
|
z.current = !0, Se({ show: !1 }), Oe(), J(), h || e({ type: "success" });
|
|
@@ -61079,7 +61079,7 @@ function DialogComponent({
|
|
|
61079
61079
|
},
|
|
61080
61080
|
[j == null ? void 0 : j.id, o, lt, t]
|
|
61081
61081
|
), $e = useCallback(() => {
|
|
61082
|
-
if (ee.current = { ...K }, w(!1),
|
|
61082
|
+
if (ee.current = { ...K }, w(!1), Ye(), X)
|
|
61083
61083
|
rt(!1);
|
|
61084
61084
|
else if (!Ve()) {
|
|
61085
61085
|
const ke = x - 1;
|
|
@@ -61105,7 +61105,7 @@ function DialogComponent({
|
|
|
61105
61105
|
[o, x, t, e, j == null ? void 0 : j.id, X]
|
|
61106
61106
|
), Te = useCallback(
|
|
61107
61107
|
(ke, pt) => {
|
|
61108
|
-
if (ee.current = { ...K }, w(!1),
|
|
61108
|
+
if (ee.current = { ...K }, w(!1), Ye(), X)
|
|
61109
61109
|
Qe([...Ne, j.id]), ke ? ft(ke, pt) : rt();
|
|
61110
61110
|
else if (x < t.length - 1) {
|
|
61111
61111
|
const ot = x + 1;
|
|
@@ -61128,7 +61128,7 @@ function DialogComponent({
|
|
|
61128
61128
|
]
|
|
61129
61129
|
), ye = () => {
|
|
61130
61130
|
v(!1), $e();
|
|
61131
|
-
}, Pe = () => X ? j && j.type !== "conversationalDecision" && !o.find((ke) => ke.fromId === j.id) : x === t.length - 1,
|
|
61131
|
+
}, Pe = () => X ? j && j.type !== "conversationalDecision" && !o.find((ke) => ke.fromId === j.id) : x === t.length - 1, Xe = () => {
|
|
61132
61132
|
Pe() ? lt() : (v(!1), Te());
|
|
61133
61133
|
};
|
|
61134
61134
|
useEffect(() => {
|
|
@@ -61240,11 +61240,15 @@ function DialogComponent({
|
|
|
61240
61240
|
soundActions: d,
|
|
61241
61241
|
getEvent: n,
|
|
61242
61242
|
pauseTTS: p,
|
|
61243
|
+
onStart: () => {
|
|
61244
|
+
var ke;
|
|
61245
|
+
(ke = K == null ? void 0 : K.emotion) != null && ke.includes("think") || St();
|
|
61246
|
+
},
|
|
61243
61247
|
onError: () => {
|
|
61244
61248
|
w(!0);
|
|
61245
61249
|
},
|
|
61246
61250
|
onFinish: () => {
|
|
61247
|
-
|
|
61251
|
+
Ye(), ce && !p && Te();
|
|
61248
61252
|
}
|
|
61249
61253
|
});
|
|
61250
61254
|
useEffect(() => (Ct(), () => {
|
|
@@ -61256,7 +61260,7 @@ function DialogComponent({
|
|
|
61256
61260
|
const pt = characterMs * (((ke = ge == null ? void 0 : ge.text) == null ? void 0 : ke.length) || 0);
|
|
61257
61261
|
setTimeout(
|
|
61258
61262
|
() => {
|
|
61259
|
-
|
|
61263
|
+
Ye();
|
|
61260
61264
|
},
|
|
61261
61265
|
pt < minMs ? minMs : pt
|
|
61262
61266
|
);
|
|
@@ -61264,7 +61268,7 @@ function DialogComponent({
|
|
|
61264
61268
|
}, [
|
|
61265
61269
|
y,
|
|
61266
61270
|
j == null ? void 0 : j.audioType,
|
|
61267
|
-
|
|
61271
|
+
Ye,
|
|
61268
61272
|
St,
|
|
61269
61273
|
K == null ? void 0 : K.emotion,
|
|
61270
61274
|
ge
|
|
@@ -61292,7 +61296,7 @@ function DialogComponent({
|
|
|
61292
61296
|
const st = useMemo(() => yt() >= 0 && Ne.length === 0 && X || !X && x === 0 || Ve() || Me(), [x, Ve, Me, yt, Ne]), wt = l({
|
|
61293
61297
|
disabled: le || !ge.show,
|
|
61294
61298
|
repeat: !1,
|
|
61295
|
-
forward:
|
|
61299
|
+
forward: Xe,
|
|
61296
61300
|
rewind: st ? null : ye
|
|
61297
61301
|
});
|
|
61298
61302
|
useEffect(() => wt(), [wt]);
|
|
@@ -61367,7 +61371,7 @@ function DialogComponent({
|
|
|
61367
61371
|
"button",
|
|
61368
61372
|
{
|
|
61369
61373
|
type: "button",
|
|
61370
|
-
onClick:
|
|
61374
|
+
onClick: Xe,
|
|
61371
61375
|
disabled: !ge.show,
|
|
61372
61376
|
className: `gat--btn__round
|
|
61373
61377
|
${ge.show ? "" : "disabled"}
|
|
@@ -61784,8 +61788,8 @@ function MatchPuzzleComponent({
|
|
|
61784
61788
|
w(null);
|
|
61785
61789
|
return;
|
|
61786
61790
|
}
|
|
61787
|
-
const
|
|
61788
|
-
if (
|
|
61791
|
+
const Ye = qe(Oe.id), lt = qe(y), Be = St(Oe.id), rt = St(y);
|
|
61792
|
+
if (Ye && rt || Be && lt) {
|
|
61789
61793
|
K(Oe);
|
|
61790
61794
|
return;
|
|
61791
61795
|
}
|
|
@@ -61793,21 +61797,21 @@ function MatchPuzzleComponent({
|
|
|
61793
61797
|
}, se = (Oe) => {
|
|
61794
61798
|
let qe;
|
|
61795
61799
|
return Oe.startsWith("destination-item") ? qe = { [y]: Oe } : qe = { [Oe]: y }, _.some((St) => {
|
|
61796
|
-
const
|
|
61797
|
-
return
|
|
61800
|
+
const Ye = JSON.stringify(St), lt = JSON.stringify(qe);
|
|
61801
|
+
return Ye === lt;
|
|
61798
61802
|
});
|
|
61799
61803
|
}, ee = (Oe, qe) => {
|
|
61800
|
-
const St = new Map(Oe.map((
|
|
61801
|
-
return qe.forEach((
|
|
61802
|
-
St.has(
|
|
61804
|
+
const St = new Map(Oe.map((Ye) => [Ye.id, { ...Ye }]));
|
|
61805
|
+
return qe.forEach((Ye) => {
|
|
61806
|
+
St.has(Ye.id) ? St.get(Ye.id).points += Ye.points : St.set(Ye.id, { ...Ye });
|
|
61803
61807
|
}), Array.from(St.values());
|
|
61804
61808
|
}, K = (Oe) => {
|
|
61805
61809
|
var qe, St;
|
|
61806
61810
|
if (X("click-ui"), se(Oe.id)) {
|
|
61807
|
-
const
|
|
61811
|
+
const Ye = Oe.id.startsWith("source-item") ? Oe.id : y, lt = Oe.id.startsWith("destination-item") ? Oe.id : y, Be = [...b, { [Ye]: lt }];
|
|
61808
61812
|
if (R(Be), s.specificCorrectFeedbacks) {
|
|
61809
61813
|
const rt = s == null ? void 0 : s.correctFeedbacks.find(
|
|
61810
|
-
(De) => De.id === `${
|
|
61814
|
+
(De) => De.id === `${Ye}-${lt}`
|
|
61811
61815
|
), ft = ee(B, rt.rewards);
|
|
61812
61816
|
z([...ft]), ne(Be) && (Ze(), j(!0)), rt.desc && (F(rt == null ? void 0 : rt.desc), P(!0), N(!0), Ze());
|
|
61813
61817
|
const $e = ne(Be);
|
|
@@ -61823,18 +61827,18 @@ function MatchPuzzleComponent({
|
|
|
61823
61827
|
} else if (document.querySelector(`#${Oe.id}`).classList.add("match-button--error"), document.querySelector(`#${y}`).classList.add("match-button--error"), setTimeout(() => {
|
|
61824
61828
|
document.querySelector(`#${Oe.id}`).classList.remove("match-button--error"), document.querySelector(`#${y}`).classList.remove("match-button--error"), w(null);
|
|
61825
61829
|
}, 1e3), s.specificWrongFeedbacks) {
|
|
61826
|
-
const
|
|
61830
|
+
const Ye = Oe.id.startsWith("destination-item") ? Oe.id : y, lt = s == null ? void 0 : s.wrongFeedbacks.find((rt) => rt.id === Ye), Be = ee(B, lt.rewards);
|
|
61827
61831
|
z([...Be]), lt != null && lt.desc && (F(lt.desc), P(!1), N(!0), Ze());
|
|
61828
61832
|
} else {
|
|
61829
|
-
const
|
|
61830
|
-
z([...
|
|
61833
|
+
const Ye = ee(B, t.solution.wrong.rewards);
|
|
61834
|
+
z([...Ye]), (St = (qe = t.solution) == null ? void 0 : qe.wrong) != null && St.desc && (F(t.solution.wrong.desc), N(!0), Ze());
|
|
61831
61835
|
}
|
|
61832
61836
|
}, ne = (Oe) => {
|
|
61833
61837
|
if (_.length !== Oe.length)
|
|
61834
61838
|
return !1;
|
|
61835
|
-
const qe = new Set(_.map((
|
|
61836
|
-
for (const
|
|
61837
|
-
if (!qe.has(
|
|
61839
|
+
const qe = new Set(_.map((Ye) => JSON.stringify(Ye))), St = new Set(Oe.map((Ye) => JSON.stringify(Ye)));
|
|
61840
|
+
for (const Ye of St)
|
|
61841
|
+
if (!qe.has(Ye))
|
|
61838
61842
|
return !1;
|
|
61839
61843
|
return !0;
|
|
61840
61844
|
}, ue = (Oe) => {
|
|
@@ -61872,8 +61876,8 @@ function MatchPuzzleComponent({
|
|
|
61872
61876
|
o
|
|
61873
61877
|
]);
|
|
61874
61878
|
const W = (Oe, qe) => b.findIndex((St) => {
|
|
61875
|
-
const
|
|
61876
|
-
return
|
|
61879
|
+
const Ye = Object.keys(St)[0], lt = Object.values(St)[0];
|
|
61880
|
+
return Ye === Oe && lt === qe;
|
|
61877
61881
|
}), [V, G] = useState(!0), [Y, ie] = useState("storylines.misc.start"), [le, fe] = useState(!1), ce = () => {
|
|
61878
61882
|
ie("storylines.misc.retry"), G(!1), fe(!1), yt();
|
|
61879
61883
|
}, [ge, Se] = useState(!1), [Re, Fe] = useState(!1), [Ne, Qe] = useState(!1), at = () => {
|
|
@@ -61881,8 +61885,8 @@ function MatchPuzzleComponent({
|
|
|
61881
61885
|
if (s.specificCorrectFeedbacks) {
|
|
61882
61886
|
const qe = new Map(Oe.map((St) => [St.id, { ...St }]));
|
|
61883
61887
|
b.forEach((St) => {
|
|
61884
|
-
const
|
|
61885
|
-
(rt) => rt.id === `${
|
|
61888
|
+
const Ye = Object.keys(St)[0], lt = St[Ye], Be = s.correctFeedbacks.find(
|
|
61889
|
+
(rt) => rt.id === `${Ye}-${lt}`
|
|
61886
61890
|
);
|
|
61887
61891
|
Be != null && Be.rewards && Be.rewards.forEach((rt) => {
|
|
61888
61892
|
if (qe.has(rt.id)) {
|
|
@@ -61903,8 +61907,8 @@ function MatchPuzzleComponent({
|
|
|
61903
61907
|
const Oe = document.querySelector('button[id^="source-item"]'), qe = document.querySelector('button[id^="destination-item"]'), St = Oe.getBoundingClientRect().right, lt = qe.getBoundingClientRect().left + 6 - St;
|
|
61904
61908
|
u.items.forEach((Be, rt) => {
|
|
61905
61909
|
if (Be.matchDestinationId !== void 0 && Be.matchDestinationId !== null) {
|
|
61906
|
-
const ft = document.querySelector(`#${Be.id}`), $e = document.querySelector(`#${Be.matchDestinationId}`), De = ft.getBoundingClientRect().top, Te = $e.getBoundingClientRect().top, ye = Te > De, Pe = Math.abs(Te - De),
|
|
61907
|
-
Ft.style.setProperty("width", `${
|
|
61910
|
+
const ft = document.querySelector(`#${Be.id}`), $e = document.querySelector(`#${Be.matchDestinationId}`), De = ft.getBoundingClientRect().top, Te = $e.getBoundingClientRect().top, ye = Te > De, Pe = Math.abs(Te - De), Xe = Math.sqrt(lt * lt + Pe * Pe), Ft = ft.querySelector(".match-line__hipotenuse");
|
|
61911
|
+
Ft.style.setProperty("width", `${Xe}px`);
|
|
61908
61912
|
const Pt = Math.atan(Pe / lt), Ie = ye ? Pt * (180 / Math.PI) : -Pt * (180 / Math.PI);
|
|
61909
61913
|
Ft.style.setProperty("transform", `rotate(${Ie}deg)`);
|
|
61910
61914
|
}
|