@2uinc/frontend-component-xpert-chatbot 1.40.5 → 1.40.6-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib/index.min.js +1069 -1068
- package/package.json +1 -1
package/dist/lib/index.min.js
CHANGED
|
@@ -187,8 +187,8 @@ Qn.exports;
|
|
|
187
187
|
var Au;
|
|
188
188
|
function B0() {
|
|
189
189
|
return Au || (Au = 1, (function(e, t) {
|
|
190
|
-
var n = 200, r = "__lodash_hash_undefined__", a = 800, i = 16, u = 9007199254740991, s = "[object Arguments]", l = "[object Array]", c = "[object AsyncFunction]", d = "[object Boolean]", f = "[object Date]", p = "[object Error]", h = "[object Function]", b = "[object GeneratorFunction]", m = "[object Map]", T = "[object Number]", g = "[object Null]", D = "[object Object]", P = "[object Proxy]",
|
|
191
|
-
v[Y] = v[$] = v[
|
|
190
|
+
var n = 200, r = "__lodash_hash_undefined__", a = 800, i = 16, u = 9007199254740991, s = "[object Arguments]", l = "[object Array]", c = "[object AsyncFunction]", d = "[object Boolean]", f = "[object Date]", p = "[object Error]", h = "[object Function]", b = "[object GeneratorFunction]", m = "[object Map]", T = "[object Number]", g = "[object Null]", D = "[object Object]", P = "[object Proxy]", X = "[object RegExp]", F = "[object Set]", x = "[object String]", w = "[object Undefined]", V = "[object WeakMap]", q = "[object ArrayBuffer]", te = "[object DataView]", Y = "[object Float32Array]", $ = "[object Float64Array]", k = "[object Int8Array]", I = "[object Int16Array]", L = "[object Int32Array]", B = "[object Uint8Array]", W = "[object Uint8ClampedArray]", H = "[object Uint16Array]", z = "[object Uint32Array]", y = /[\\^$.*+?()[\]{}|]/g, ne = /^\[object .+?Constructor\]$/, ae = /^(?:0|[1-9]\d*)$/, v = {};
|
|
191
|
+
v[Y] = v[$] = v[k] = v[I] = v[L] = v[B] = v[W] = v[H] = v[z] = !0, v[s] = v[l] = v[q] = v[d] = v[te] = v[f] = v[p] = v[h] = v[m] = v[T] = v[D] = v[X] = v[F] = v[x] = v[V] = !1;
|
|
192
192
|
var se = typeof Ar == "object" && Ar && Ar.Object === Object && Ar, _e = typeof self == "object" && self && self.Object === Object && self, pe = se || _e || Function("return this")(), Se = t && !t.nodeType && t, Oe = Se && !0 && e && !e.nodeType && e, ze = Oe && Oe.exports === Se, Ie = ze && se.process, nt = (function() {
|
|
193
193
|
try {
|
|
194
194
|
var S = Oe && Oe.require && Oe.require("util").types;
|
|
@@ -230,7 +230,7 @@ function B0() {
|
|
|
230
230
|
var Qt = Array.prototype, Bn = Function.prototype, ue = Object.prototype, be = pe["__core-js_shared__"], Me = Bn.toString, ye = ue.hasOwnProperty, Ye = (function() {
|
|
231
231
|
var S = /[^.]+$/.exec(be && be.keys && be.keys.IE_PROTO || "");
|
|
232
232
|
return S ? "Symbol(src)_1." + S : "";
|
|
233
|
-
})(), Fe = ue.toString, Ce = Me.call(Object),
|
|
233
|
+
})(), Fe = ue.toString, Ce = Me.call(Object), U = RegExp(
|
|
234
234
|
"^" + Me.call(ye).replace(y, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
|
|
235
235
|
), K = ze ? pe.Buffer : void 0, ie = pe.Symbol, Ee = pe.Uint8Array;
|
|
236
236
|
K && K.allocUnsafe;
|
|
@@ -403,7 +403,7 @@ function B0() {
|
|
|
403
403
|
}
|
|
404
404
|
var Kd = l0();
|
|
405
405
|
function yr(S) {
|
|
406
|
-
return S == null ? S === void 0 ?
|
|
406
|
+
return S == null ? S === void 0 ? w : g : Be && Be in Object(S) ? c0(S) : g0(S);
|
|
407
407
|
}
|
|
408
408
|
function cu(S) {
|
|
409
409
|
return Un(S) && yr(S) == s;
|
|
@@ -411,7 +411,7 @@ function B0() {
|
|
|
411
411
|
function Qd(S) {
|
|
412
412
|
if (!Jt(S) || p0(S))
|
|
413
413
|
return !1;
|
|
414
|
-
var N = ha(S) ?
|
|
414
|
+
var N = ha(S) ? U : ne;
|
|
415
415
|
return N.test(y0(S));
|
|
416
416
|
}
|
|
417
417
|
function Zd(S) {
|
|
@@ -1610,14 +1610,14 @@ const Ou = 991, Z0 = () => {
|
|
|
1610
1610
|
externalLoadingHistory: n = !1,
|
|
1611
1611
|
externalStreaming: r = !1
|
|
1612
1612
|
}) => {
|
|
1613
|
-
const [a, i] = le(!1), [u, s] = le(!1), [l, c] = le(!1), [d, f] = le(!0), [p, h] = le(!1), [b, m] = le(!1), [T, g] = le(!1), [D, P] = le(Nt.XPERT),
|
|
1613
|
+
const [a, i] = le(!1), [u, s] = le(!1), [l, c] = le(!1), [d, f] = le(!0), [p, h] = le(!1), [b, m] = le(!1), [T, g] = le(!1), [D, P] = le(Nt.XPERT), X = Z0(), F = {
|
|
1614
1614
|
disabledScroll: a,
|
|
1615
1615
|
externalStreaming: r,
|
|
1616
1616
|
hasError: u,
|
|
1617
1617
|
hasNewMessage: l,
|
|
1618
1618
|
internalStreaming: T,
|
|
1619
|
-
isMobile:
|
|
1620
|
-
isNormalSize: d ||
|
|
1619
|
+
isMobile: X,
|
|
1620
|
+
isNormalSize: d || X,
|
|
1621
1621
|
loading: p || t,
|
|
1622
1622
|
loadingHistory: b || n,
|
|
1623
1623
|
streaming: T || r,
|
|
@@ -1631,7 +1631,7 @@ const Ou = 991, Z0 = () => {
|
|
|
1631
1631
|
setStreaming: g,
|
|
1632
1632
|
setMode: P
|
|
1633
1633
|
};
|
|
1634
|
-
return /* @__PURE__ */ _.jsx(tt.Provider, { value:
|
|
1634
|
+
return /* @__PURE__ */ _.jsx(tt.Provider, { value: F, children: e });
|
|
1635
1635
|
};
|
|
1636
1636
|
Ms.propTypes = {
|
|
1637
1637
|
children: A.element.isRequired,
|
|
@@ -1689,7 +1689,7 @@ const $t = Xr({}), ve = {
|
|
|
1689
1689
|
onFeedbackSelection: n,
|
|
1690
1690
|
onMessageSent: r,
|
|
1691
1691
|
onStreamingStop: a,
|
|
1692
|
-
pushXpertMessage: (
|
|
1692
|
+
pushXpertMessage: (X) => m((F) => [...F, X]),
|
|
1693
1693
|
setConversationId: f,
|
|
1694
1694
|
setDeleteConversationModal: h,
|
|
1695
1695
|
setXpertMessages: m,
|
|
@@ -1809,8 +1809,8 @@ eyes follow your mouse when you hover near it.`, js = ({
|
|
|
1809
1809
|
i.current.querySelectorAll(
|
|
1810
1810
|
".xpert_chatbot__animated_graduate__pupil"
|
|
1811
1811
|
).forEach((g) => {
|
|
1812
|
-
const D = g.getBoundingClientRect(), P = (b.pageX - window.scrollX - D.left) / 30 / 16 + "rem",
|
|
1813
|
-
g.style.transform = "translate3d(" + P + "," +
|
|
1812
|
+
const D = g.getBoundingClientRect(), P = (b.pageX - window.scrollX - D.left) / 30 / 16 + "rem", X = (b.pageY - window.scrollY - D.top) / 30 / 16 + "rem";
|
|
1813
|
+
g.style.transform = "translate3d(" + P + "," + X + ", 0rem)";
|
|
1814
1814
|
});
|
|
1815
1815
|
};
|
|
1816
1816
|
return window.addEventListener("mousemove", h), () => {
|
|
@@ -2374,70 +2374,70 @@ var wu = {
|
|
|
2374
2374
|
delayInitialFocusTimer: void 0,
|
|
2375
2375
|
// the most recent KeyboardEvent for the configured nav key (typically [SHIFT+]TAB), if any
|
|
2376
2376
|
recentNavEvent: void 0
|
|
2377
|
-
}, s, l = function(
|
|
2378
|
-
return
|
|
2379
|
-
}, c = function(
|
|
2380
|
-
var
|
|
2381
|
-
return u.containerGroups.findIndex(function(
|
|
2382
|
-
var
|
|
2383
|
-
return
|
|
2384
|
-
return z ===
|
|
2377
|
+
}, s, l = function(k, I, L) {
|
|
2378
|
+
return k && k[I] !== void 0 ? k[I] : i[L || I];
|
|
2379
|
+
}, c = function(k, I) {
|
|
2380
|
+
var L = typeof I?.composedPath == "function" ? I.composedPath() : void 0;
|
|
2381
|
+
return u.containerGroups.findIndex(function(B) {
|
|
2382
|
+
var W = B.container, H = B.tabbableNodes;
|
|
2383
|
+
return W.contains(k) || L?.includes(W) || H.find(function(z) {
|
|
2384
|
+
return z === k;
|
|
2385
2385
|
});
|
|
2386
2386
|
});
|
|
2387
|
-
}, d = function(
|
|
2388
|
-
var I = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {},
|
|
2389
|
-
if (typeof z == "function" && (z = z.apply(void 0, vf(
|
|
2387
|
+
}, d = function(k) {
|
|
2388
|
+
var I = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, L = I.hasFallback, B = L === void 0 ? !1 : L, W = I.params, H = W === void 0 ? [] : W, z = i[k];
|
|
2389
|
+
if (typeof z == "function" && (z = z.apply(void 0, vf(H))), z === !0 && (z = void 0), !z) {
|
|
2390
2390
|
if (z === void 0 || z === !1)
|
|
2391
2391
|
return z;
|
|
2392
|
-
throw new Error("`".concat(
|
|
2392
|
+
throw new Error("`".concat(k, "` was specified but was not a node, or did not return a node"));
|
|
2393
2393
|
}
|
|
2394
2394
|
var y = z;
|
|
2395
2395
|
if (typeof z == "string") {
|
|
2396
2396
|
try {
|
|
2397
2397
|
y = r.querySelector(z);
|
|
2398
2398
|
} catch (ne) {
|
|
2399
|
-
throw new Error("`".concat(
|
|
2399
|
+
throw new Error("`".concat(k, '` appears to be an invalid selector; error="').concat(ne.message, '"'));
|
|
2400
2400
|
}
|
|
2401
|
-
if (!y && !
|
|
2402
|
-
throw new Error("`".concat(
|
|
2401
|
+
if (!y && !B)
|
|
2402
|
+
throw new Error("`".concat(k, "` as selector refers to no known node"));
|
|
2403
2403
|
}
|
|
2404
2404
|
return y;
|
|
2405
2405
|
}, f = function() {
|
|
2406
|
-
var
|
|
2406
|
+
var k = d("initialFocus", {
|
|
2407
2407
|
hasFallback: !0
|
|
2408
2408
|
});
|
|
2409
|
-
if (
|
|
2409
|
+
if (k === !1)
|
|
2410
2410
|
return !1;
|
|
2411
|
-
if (
|
|
2411
|
+
if (k === void 0 || k && !wr(k, i.tabbableOptions))
|
|
2412
2412
|
if (c(r.activeElement) >= 0)
|
|
2413
|
-
|
|
2413
|
+
k = r.activeElement;
|
|
2414
2414
|
else {
|
|
2415
|
-
var I = u.tabbableGroups[0],
|
|
2416
|
-
|
|
2415
|
+
var I = u.tabbableGroups[0], L = I && I.firstTabbableNode;
|
|
2416
|
+
k = L || d("fallbackFocus");
|
|
2417
2417
|
}
|
|
2418
|
-
else
|
|
2419
|
-
if (!
|
|
2418
|
+
else k === null && (k = d("fallbackFocus"));
|
|
2419
|
+
if (!k)
|
|
2420
2420
|
throw new Error("Your focus-trap needs to have at least one focusable element");
|
|
2421
|
-
return
|
|
2421
|
+
return k;
|
|
2422
2422
|
}, p = function() {
|
|
2423
|
-
if (u.containerGroups = u.containers.map(function(
|
|
2424
|
-
var I = Ks(
|
|
2423
|
+
if (u.containerGroups = u.containers.map(function(k) {
|
|
2424
|
+
var I = Ks(k, i.tabbableOptions), L = Qs(k, i.tabbableOptions), B = I.length > 0 ? I[0] : void 0, W = I.length > 0 ? I[I.length - 1] : void 0, H = L.find(function(ne) {
|
|
2425
2425
|
return rn(ne);
|
|
2426
|
-
}), z =
|
|
2426
|
+
}), z = L.slice().reverse().find(function(ne) {
|
|
2427
2427
|
return rn(ne);
|
|
2428
2428
|
}), y = !!I.find(function(ne) {
|
|
2429
2429
|
return Xt(ne) > 0;
|
|
2430
2430
|
});
|
|
2431
2431
|
return {
|
|
2432
|
-
container:
|
|
2432
|
+
container: k,
|
|
2433
2433
|
tabbableNodes: I,
|
|
2434
|
-
focusableNodes:
|
|
2434
|
+
focusableNodes: L,
|
|
2435
2435
|
/** True if at least one node with positive `tabindex` was found in this container. */
|
|
2436
2436
|
posTabIndexesFound: y,
|
|
2437
2437
|
/** First tabbable node in container, __tabindex__ order; `undefined` if none. */
|
|
2438
|
-
firstTabbableNode:
|
|
2438
|
+
firstTabbableNode: B,
|
|
2439
2439
|
/** Last tabbable node in container, __tabindex__ order; `undefined` if none. */
|
|
2440
|
-
lastTabbableNode:
|
|
2440
|
+
lastTabbableNode: W,
|
|
2441
2441
|
// NOTE: DOM order is NOT NECESSARILY "document position" order, but figuring that out
|
|
2442
2442
|
// would require more than just https://developer.mozilla.org/en-US/docs/Web/API/Node/compareDocumentPosition
|
|
2443
2443
|
// because that API doesn't work with Shadow DOM as well as it should (@see
|
|
@@ -2446,7 +2446,7 @@ var wu = {
|
|
|
2446
2446
|
// "close enough most of the time" alternative for positive tabindexes which should generally
|
|
2447
2447
|
// be avoided anyway...
|
|
2448
2448
|
/** First tabbable node in container, __DOM__ order; `undefined` if none. */
|
|
2449
|
-
firstDomTabbableNode:
|
|
2449
|
+
firstDomTabbableNode: H,
|
|
2450
2450
|
/** Last tabbable node in container, __DOM__ order; `undefined` if none. */
|
|
2451
2451
|
lastDomTabbableNode: z,
|
|
2452
2452
|
/**
|
|
@@ -2459,57 +2459,57 @@ var wu = {
|
|
|
2459
2459
|
*/
|
|
2460
2460
|
nextTabbableNode: function(ae) {
|
|
2461
2461
|
var v = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0, se = I.indexOf(ae);
|
|
2462
|
-
return se < 0 ? v ?
|
|
2462
|
+
return se < 0 ? v ? L.slice(L.indexOf(ae) + 1).find(function(_e) {
|
|
2463
2463
|
return rn(_e);
|
|
2464
|
-
}) :
|
|
2464
|
+
}) : L.slice(0, L.indexOf(ae)).reverse().find(function(_e) {
|
|
2465
2465
|
return rn(_e);
|
|
2466
2466
|
}) : I[se + (v ? 1 : -1)];
|
|
2467
2467
|
}
|
|
2468
2468
|
};
|
|
2469
|
-
}), u.tabbableGroups = u.containerGroups.filter(function(
|
|
2470
|
-
return
|
|
2469
|
+
}), u.tabbableGroups = u.containerGroups.filter(function(k) {
|
|
2470
|
+
return k.tabbableNodes.length > 0;
|
|
2471
2471
|
}), u.tabbableGroups.length <= 0 && !d("fallbackFocus"))
|
|
2472
2472
|
throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times");
|
|
2473
|
-
if (u.containerGroups.find(function(
|
|
2474
|
-
return
|
|
2473
|
+
if (u.containerGroups.find(function(k) {
|
|
2474
|
+
return k.posTabIndexesFound;
|
|
2475
2475
|
}) && u.containerGroups.length > 1)
|
|
2476
2476
|
throw new Error("At least one node with a positive tabindex was found in one of your focus-trap's multiple containers. Positive tabindexes are only supported in single-container focus-traps.");
|
|
2477
|
-
}, h = function(
|
|
2478
|
-
var I =
|
|
2477
|
+
}, h = function(k) {
|
|
2478
|
+
var I = k.activeElement;
|
|
2479
2479
|
if (I)
|
|
2480
2480
|
return I.shadowRoot && I.shadowRoot.activeElement !== null ? h(I.shadowRoot) : I;
|
|
2481
|
-
}, b = function(
|
|
2482
|
-
if (
|
|
2483
|
-
if (!
|
|
2481
|
+
}, b = function(k) {
|
|
2482
|
+
if (k !== !1 && k !== h(document)) {
|
|
2483
|
+
if (!k || !k.focus) {
|
|
2484
2484
|
b(f());
|
|
2485
2485
|
return;
|
|
2486
2486
|
}
|
|
2487
|
-
|
|
2487
|
+
k.focus({
|
|
2488
2488
|
preventScroll: !!i.preventScroll
|
|
2489
|
-
}), u.mostRecentlyFocusedNode =
|
|
2489
|
+
}), u.mostRecentlyFocusedNode = k, kf(k) && k.select();
|
|
2490
2490
|
}
|
|
2491
|
-
}, m = function(
|
|
2491
|
+
}, m = function(k) {
|
|
2492
2492
|
var I = d("setReturnFocus", {
|
|
2493
|
-
params: [
|
|
2493
|
+
params: [k]
|
|
2494
2494
|
});
|
|
2495
|
-
return I || (I === !1 ? !1 :
|
|
2496
|
-
}, T = function(
|
|
2497
|
-
var I =
|
|
2498
|
-
I = I || xr(
|
|
2499
|
-
var
|
|
2495
|
+
return I || (I === !1 ? !1 : k);
|
|
2496
|
+
}, T = function(k) {
|
|
2497
|
+
var I = k.target, L = k.event, B = k.isBackward, W = B === void 0 ? !1 : B;
|
|
2498
|
+
I = I || xr(L), p();
|
|
2499
|
+
var H = null;
|
|
2500
2500
|
if (u.tabbableGroups.length > 0) {
|
|
2501
|
-
var z = c(I,
|
|
2501
|
+
var z = c(I, L), y = z >= 0 ? u.containerGroups[z] : void 0;
|
|
2502
2502
|
if (z < 0)
|
|
2503
|
-
|
|
2504
|
-
else if (
|
|
2503
|
+
W ? H = u.tabbableGroups[u.tabbableGroups.length - 1].lastTabbableNode : H = u.tabbableGroups[0].firstTabbableNode;
|
|
2504
|
+
else if (W) {
|
|
2505
2505
|
var ne = u.tabbableGroups.findIndex(function(Se) {
|
|
2506
2506
|
var Oe = Se.firstTabbableNode;
|
|
2507
2507
|
return I === Oe;
|
|
2508
2508
|
});
|
|
2509
2509
|
if (ne < 0 && (y.container === I || wr(I, i.tabbableOptions) && !rn(I, i.tabbableOptions) && !y.nextTabbableNode(I, !1)) && (ne = z), ne >= 0) {
|
|
2510
2510
|
var ae = ne === 0 ? u.tabbableGroups.length - 1 : ne - 1, v = u.tabbableGroups[ae];
|
|
2511
|
-
|
|
2512
|
-
} else Jn(
|
|
2511
|
+
H = Xt(I) >= 0 ? v.lastTabbableNode : v.lastDomTabbableNode;
|
|
2512
|
+
} else Jn(L) || (H = y.nextTabbableNode(I, !1));
|
|
2513
2513
|
} else {
|
|
2514
2514
|
var se = u.tabbableGroups.findIndex(function(Se) {
|
|
2515
2515
|
var Oe = Se.lastTabbableNode;
|
|
@@ -2517,16 +2517,16 @@ var wu = {
|
|
|
2517
2517
|
});
|
|
2518
2518
|
if (se < 0 && (y.container === I || wr(I, i.tabbableOptions) && !rn(I, i.tabbableOptions) && !y.nextTabbableNode(I)) && (se = z), se >= 0) {
|
|
2519
2519
|
var _e = se === u.tabbableGroups.length - 1 ? 0 : se + 1, pe = u.tabbableGroups[_e];
|
|
2520
|
-
|
|
2521
|
-
} else Jn(
|
|
2520
|
+
H = Xt(I) >= 0 ? pe.firstTabbableNode : pe.firstDomTabbableNode;
|
|
2521
|
+
} else Jn(L) || (H = y.nextTabbableNode(I));
|
|
2522
2522
|
}
|
|
2523
2523
|
} else
|
|
2524
|
-
|
|
2525
|
-
return
|
|
2526
|
-
}, g = function(
|
|
2527
|
-
var I = xr(
|
|
2528
|
-
if (!(c(I,
|
|
2529
|
-
if (qn(i.clickOutsideDeactivates,
|
|
2524
|
+
H = d("fallbackFocus");
|
|
2525
|
+
return H;
|
|
2526
|
+
}, g = function(k) {
|
|
2527
|
+
var I = xr(k);
|
|
2528
|
+
if (!(c(I, k) >= 0)) {
|
|
2529
|
+
if (qn(i.clickOutsideDeactivates, k)) {
|
|
2530
2530
|
s.deactivate({
|
|
2531
2531
|
// NOTE: by setting `returnFocus: false`, deactivate() will do nothing,
|
|
2532
2532
|
// which will result in the outside click setting focus to the node
|
|
@@ -2538,56 +2538,56 @@ var wu = {
|
|
|
2538
2538
|
});
|
|
2539
2539
|
return;
|
|
2540
2540
|
}
|
|
2541
|
-
qn(i.allowOutsideClick,
|
|
2541
|
+
qn(i.allowOutsideClick, k) || k.preventDefault();
|
|
2542
2542
|
}
|
|
2543
|
-
}, D = function(
|
|
2544
|
-
var I = xr(
|
|
2545
|
-
if (
|
|
2546
|
-
|
|
2543
|
+
}, D = function(k) {
|
|
2544
|
+
var I = xr(k), L = c(I, k) >= 0;
|
|
2545
|
+
if (L || I instanceof Document)
|
|
2546
|
+
L && (u.mostRecentlyFocusedNode = I);
|
|
2547
2547
|
else {
|
|
2548
|
-
|
|
2549
|
-
var
|
|
2548
|
+
k.stopImmediatePropagation();
|
|
2549
|
+
var B, W = !0;
|
|
2550
2550
|
if (u.mostRecentlyFocusedNode)
|
|
2551
2551
|
if (Xt(u.mostRecentlyFocusedNode) > 0) {
|
|
2552
|
-
var
|
|
2552
|
+
var H = c(u.mostRecentlyFocusedNode), z = u.containerGroups[H].tabbableNodes;
|
|
2553
2553
|
if (z.length > 0) {
|
|
2554
2554
|
var y = z.findIndex(function(ne) {
|
|
2555
2555
|
return ne === u.mostRecentlyFocusedNode;
|
|
2556
2556
|
});
|
|
2557
|
-
y >= 0 && (i.isKeyForward(u.recentNavEvent) ? y + 1 < z.length && (
|
|
2557
|
+
y >= 0 && (i.isKeyForward(u.recentNavEvent) ? y + 1 < z.length && (B = z[y + 1], W = !1) : y - 1 >= 0 && (B = z[y - 1], W = !1));
|
|
2558
2558
|
}
|
|
2559
2559
|
} else
|
|
2560
2560
|
u.containerGroups.some(function(ne) {
|
|
2561
2561
|
return ne.tabbableNodes.some(function(ae) {
|
|
2562
2562
|
return Xt(ae) > 0;
|
|
2563
2563
|
});
|
|
2564
|
-
}) || (
|
|
2564
|
+
}) || (W = !1);
|
|
2565
2565
|
else
|
|
2566
|
-
|
|
2567
|
-
|
|
2566
|
+
W = !1;
|
|
2567
|
+
W && (B = T({
|
|
2568
2568
|
// move FROM the MRU node, not event-related node (which will be the node that is
|
|
2569
2569
|
// outside the trap causing the focus escape we're trying to fix)
|
|
2570
2570
|
target: u.mostRecentlyFocusedNode,
|
|
2571
2571
|
isBackward: i.isKeyBackward(u.recentNavEvent)
|
|
2572
|
-
})), b(
|
|
2572
|
+
})), b(B || u.mostRecentlyFocusedNode || f());
|
|
2573
2573
|
}
|
|
2574
2574
|
u.recentNavEvent = void 0;
|
|
2575
|
-
}, P = function(
|
|
2575
|
+
}, P = function(k) {
|
|
2576
2576
|
var I = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1;
|
|
2577
|
-
u.recentNavEvent =
|
|
2578
|
-
var
|
|
2579
|
-
event:
|
|
2577
|
+
u.recentNavEvent = k;
|
|
2578
|
+
var L = T({
|
|
2579
|
+
event: k,
|
|
2580
2580
|
isBackward: I
|
|
2581
2581
|
});
|
|
2582
|
-
|
|
2583
|
-
},
|
|
2584
|
-
(i.isKeyForward(
|
|
2585
|
-
},
|
|
2586
|
-
Lf(
|
|
2587
|
-
}, x = function(
|
|
2588
|
-
var I = xr(
|
|
2589
|
-
c(I,
|
|
2590
|
-
},
|
|
2582
|
+
L && (Jn(k) && k.preventDefault(), b(L));
|
|
2583
|
+
}, X = function(k) {
|
|
2584
|
+
(i.isKeyForward(k) || i.isKeyBackward(k)) && P(k, i.isKeyBackward(k));
|
|
2585
|
+
}, F = function(k) {
|
|
2586
|
+
Lf(k) && qn(i.escapeDeactivates, k) !== !1 && (k.preventDefault(), s.deactivate());
|
|
2587
|
+
}, x = function(k) {
|
|
2588
|
+
var I = xr(k);
|
|
2589
|
+
c(I, k) >= 0 || qn(i.clickOutsideDeactivates, k) || qn(i.allowOutsideClick, k) || (k.preventDefault(), k.stopImmediatePropagation());
|
|
2590
|
+
}, w = function() {
|
|
2591
2591
|
if (u.active)
|
|
2592
2592
|
return wu.activateTrap(a, s), u.delayInitialFocusTimer = i.delayInitialFocus ? Ru(function() {
|
|
2593
2593
|
b(f());
|
|
@@ -2600,24 +2600,24 @@ var wu = {
|
|
|
2600
2600
|
}), r.addEventListener("click", x, {
|
|
2601
2601
|
capture: !0,
|
|
2602
2602
|
passive: !1
|
|
2603
|
-
}), r.addEventListener("keydown",
|
|
2603
|
+
}), r.addEventListener("keydown", X, {
|
|
2604
2604
|
capture: !0,
|
|
2605
2605
|
passive: !1
|
|
2606
|
-
}), r.addEventListener("keydown",
|
|
2607
|
-
},
|
|
2606
|
+
}), r.addEventListener("keydown", F), s;
|
|
2607
|
+
}, V = function() {
|
|
2608
2608
|
if (u.active)
|
|
2609
|
-
return r.removeEventListener("focusin", D, !0), r.removeEventListener("mousedown", g, !0), r.removeEventListener("touchstart", g, !0), r.removeEventListener("click", x, !0), r.removeEventListener("keydown",
|
|
2610
|
-
}, q = function(
|
|
2611
|
-
var I =
|
|
2612
|
-
var
|
|
2613
|
-
return
|
|
2614
|
-
return
|
|
2609
|
+
return r.removeEventListener("focusin", D, !0), r.removeEventListener("mousedown", g, !0), r.removeEventListener("touchstart", g, !0), r.removeEventListener("click", x, !0), r.removeEventListener("keydown", X, !0), r.removeEventListener("keydown", F), s;
|
|
2610
|
+
}, q = function(k) {
|
|
2611
|
+
var I = k.some(function(L) {
|
|
2612
|
+
var B = Array.from(L.removedNodes);
|
|
2613
|
+
return B.some(function(W) {
|
|
2614
|
+
return W === u.mostRecentlyFocusedNode;
|
|
2615
2615
|
});
|
|
2616
2616
|
});
|
|
2617
2617
|
I && b(f());
|
|
2618
2618
|
}, te = typeof window < "u" && "MutationObserver" in window ? new MutationObserver(q) : void 0, Y = function() {
|
|
2619
|
-
te && (te.disconnect(), u.active && !u.paused && u.containers.map(function(
|
|
2620
|
-
te.observe(
|
|
2619
|
+
te && (te.disconnect(), u.active && !u.paused && u.containers.map(function(k) {
|
|
2620
|
+
te.observe(k, {
|
|
2621
2621
|
subtree: !0,
|
|
2622
2622
|
childList: !0
|
|
2623
2623
|
});
|
|
@@ -2630,44 +2630,44 @@ var wu = {
|
|
|
2630
2630
|
get paused() {
|
|
2631
2631
|
return u.paused;
|
|
2632
2632
|
},
|
|
2633
|
-
activate: function(
|
|
2633
|
+
activate: function(k) {
|
|
2634
2634
|
if (u.active)
|
|
2635
2635
|
return this;
|
|
2636
|
-
var I = l(
|
|
2637
|
-
|
|
2638
|
-
var
|
|
2639
|
-
|
|
2636
|
+
var I = l(k, "onActivate"), L = l(k, "onPostActivate"), B = l(k, "checkCanFocusTrap");
|
|
2637
|
+
B || p(), u.active = !0, u.paused = !1, u.nodeFocusedBeforeActivation = h(r), I?.();
|
|
2638
|
+
var W = function() {
|
|
2639
|
+
B && p(), w(), Y(), L?.();
|
|
2640
2640
|
};
|
|
2641
|
-
return
|
|
2641
|
+
return B ? (B(u.containers.concat()).then(W, W), this) : (W(), this);
|
|
2642
2642
|
},
|
|
2643
|
-
deactivate: function(
|
|
2643
|
+
deactivate: function(k) {
|
|
2644
2644
|
if (!u.active)
|
|
2645
2645
|
return this;
|
|
2646
2646
|
var I = Lu({
|
|
2647
2647
|
onDeactivate: i.onDeactivate,
|
|
2648
2648
|
onPostDeactivate: i.onPostDeactivate,
|
|
2649
2649
|
checkCanReturnFocus: i.checkCanReturnFocus
|
|
2650
|
-
},
|
|
2651
|
-
clearTimeout(u.delayInitialFocusTimer), u.delayInitialFocusTimer = void 0,
|
|
2652
|
-
var
|
|
2653
|
-
|
|
2650
|
+
}, k);
|
|
2651
|
+
clearTimeout(u.delayInitialFocusTimer), u.delayInitialFocusTimer = void 0, V(), u.active = !1, u.paused = !1, Y(), wu.deactivateTrap(a, s);
|
|
2652
|
+
var L = l(I, "onDeactivate"), B = l(I, "onPostDeactivate"), W = l(I, "checkCanReturnFocus"), H = l(I, "returnFocus", "returnFocusOnDeactivate");
|
|
2653
|
+
L?.();
|
|
2654
2654
|
var z = function() {
|
|
2655
2655
|
Ru(function() {
|
|
2656
|
-
|
|
2656
|
+
H && b(m(u.nodeFocusedBeforeActivation)), B?.();
|
|
2657
2657
|
});
|
|
2658
2658
|
};
|
|
2659
|
-
return
|
|
2659
|
+
return H && W ? (W(m(u.nodeFocusedBeforeActivation)).then(z, z), this) : (z(), this);
|
|
2660
2660
|
},
|
|
2661
|
-
pause: function(
|
|
2662
|
-
return u.active ? (u.manuallyPaused = !0, this._setPausedState(!0,
|
|
2661
|
+
pause: function(k) {
|
|
2662
|
+
return u.active ? (u.manuallyPaused = !0, this._setPausedState(!0, k)) : this;
|
|
2663
2663
|
},
|
|
2664
|
-
unpause: function(
|
|
2665
|
-
return u.active ? (u.manuallyPaused = !1, a[a.length - 1] !== this ? this : this._setPausedState(!1,
|
|
2664
|
+
unpause: function(k) {
|
|
2665
|
+
return u.active ? (u.manuallyPaused = !1, a[a.length - 1] !== this ? this : this._setPausedState(!1, k)) : this;
|
|
2666
2666
|
},
|
|
2667
|
-
updateContainerElements: function(
|
|
2668
|
-
var I = [].concat(
|
|
2669
|
-
return u.containers = I.map(function(
|
|
2670
|
-
return typeof
|
|
2667
|
+
updateContainerElements: function(k) {
|
|
2668
|
+
var I = [].concat(k).filter(Boolean);
|
|
2669
|
+
return u.containers = I.map(function(L) {
|
|
2670
|
+
return typeof L == "string" ? r.querySelector(L) : L;
|
|
2671
2671
|
}), u.active && p(), Y(), this;
|
|
2672
2672
|
}
|
|
2673
2673
|
}, Object.defineProperties(s, {
|
|
@@ -2677,15 +2677,15 @@ var wu = {
|
|
|
2677
2677
|
}
|
|
2678
2678
|
},
|
|
2679
2679
|
_setPausedState: {
|
|
2680
|
-
value: function(
|
|
2681
|
-
if (u.paused ===
|
|
2680
|
+
value: function(k, I) {
|
|
2681
|
+
if (u.paused === k)
|
|
2682
2682
|
return this;
|
|
2683
|
-
if (u.paused =
|
|
2684
|
-
var
|
|
2685
|
-
|
|
2683
|
+
if (u.paused = k, k) {
|
|
2684
|
+
var L = l(I, "onPause"), B = l(I, "onPostPause");
|
|
2685
|
+
L?.(), V(), Y(), B?.();
|
|
2686
2686
|
} else {
|
|
2687
|
-
var
|
|
2688
|
-
|
|
2687
|
+
var W = l(I, "onUnpause"), H = l(I, "onPostUnpause");
|
|
2688
|
+
W?.(), p(), w(), Y(), H?.();
|
|
2689
2689
|
}
|
|
2690
2690
|
return this;
|
|
2691
2691
|
}
|
|
@@ -2702,30 +2702,30 @@ function Hf() {
|
|
|
2702
2702
|
Du = 1;
|
|
2703
2703
|
function e(x) {
|
|
2704
2704
|
"@babel/helpers - typeof";
|
|
2705
|
-
return e = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(
|
|
2706
|
-
return typeof
|
|
2707
|
-
} : function(
|
|
2708
|
-
return
|
|
2705
|
+
return e = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(w) {
|
|
2706
|
+
return typeof w;
|
|
2707
|
+
} : function(w) {
|
|
2708
|
+
return w && typeof Symbol == "function" && w.constructor === Symbol && w !== Symbol.prototype ? "symbol" : typeof w;
|
|
2709
2709
|
}, e(x);
|
|
2710
2710
|
}
|
|
2711
|
-
function t(x,
|
|
2712
|
-
if (!(x instanceof
|
|
2711
|
+
function t(x, w) {
|
|
2712
|
+
if (!(x instanceof w)) throw new TypeError("Cannot call a class as a function");
|
|
2713
2713
|
}
|
|
2714
|
-
function n(x,
|
|
2715
|
-
for (var
|
|
2716
|
-
var q =
|
|
2714
|
+
function n(x, w) {
|
|
2715
|
+
for (var V = 0; V < w.length; V++) {
|
|
2716
|
+
var q = w[V];
|
|
2717
2717
|
q.enumerable = q.enumerable || !1, q.configurable = !0, "value" in q && (q.writable = !0), Object.defineProperty(x, p(q.key), q);
|
|
2718
2718
|
}
|
|
2719
2719
|
}
|
|
2720
|
-
function r(x,
|
|
2721
|
-
return
|
|
2720
|
+
function r(x, w, V) {
|
|
2721
|
+
return w && n(x.prototype, w), Object.defineProperty(x, "prototype", { writable: !1 }), x;
|
|
2722
2722
|
}
|
|
2723
|
-
function a(x,
|
|
2724
|
-
return
|
|
2723
|
+
function a(x, w, V) {
|
|
2724
|
+
return w = l(w), i(x, s() ? Reflect.construct(w, V || [], l(x).constructor) : w.apply(x, V));
|
|
2725
2725
|
}
|
|
2726
|
-
function i(x,
|
|
2727
|
-
if (
|
|
2728
|
-
if (
|
|
2726
|
+
function i(x, w) {
|
|
2727
|
+
if (w && (e(w) == "object" || typeof w == "function")) return w;
|
|
2728
|
+
if (w !== void 0) throw new TypeError("Derived constructors may only return object or undefined");
|
|
2729
2729
|
return u(x);
|
|
2730
2730
|
}
|
|
2731
2731
|
function u(x) {
|
|
@@ -2743,58 +2743,58 @@ function Hf() {
|
|
|
2743
2743
|
})();
|
|
2744
2744
|
}
|
|
2745
2745
|
function l(x) {
|
|
2746
|
-
return l = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(
|
|
2747
|
-
return
|
|
2746
|
+
return l = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(w) {
|
|
2747
|
+
return w.__proto__ || Object.getPrototypeOf(w);
|
|
2748
2748
|
}, l(x);
|
|
2749
2749
|
}
|
|
2750
|
-
function c(x,
|
|
2751
|
-
if (typeof
|
|
2752
|
-
x.prototype = Object.create(
|
|
2750
|
+
function c(x, w) {
|
|
2751
|
+
if (typeof w != "function" && w !== null) throw new TypeError("Super expression must either be null or a function");
|
|
2752
|
+
x.prototype = Object.create(w && w.prototype, { constructor: { value: x, writable: !0, configurable: !0 } }), Object.defineProperty(x, "prototype", { writable: !1 }), w && d(x, w);
|
|
2753
2753
|
}
|
|
2754
|
-
function d(x,
|
|
2755
|
-
return d = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(
|
|
2756
|
-
return
|
|
2757
|
-
}, d(x,
|
|
2754
|
+
function d(x, w) {
|
|
2755
|
+
return d = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(V, q) {
|
|
2756
|
+
return V.__proto__ = q, V;
|
|
2757
|
+
}, d(x, w);
|
|
2758
2758
|
}
|
|
2759
|
-
function f(x,
|
|
2760
|
-
return (
|
|
2759
|
+
function f(x, w, V) {
|
|
2760
|
+
return (w = p(w)) in x ? Object.defineProperty(x, w, { value: V, enumerable: !0, configurable: !0, writable: !0 }) : x[w] = V, x;
|
|
2761
2761
|
}
|
|
2762
2762
|
function p(x) {
|
|
2763
|
-
var
|
|
2764
|
-
return e(
|
|
2763
|
+
var w = h(x, "string");
|
|
2764
|
+
return e(w) == "symbol" ? w : w + "";
|
|
2765
2765
|
}
|
|
2766
|
-
function h(x,
|
|
2766
|
+
function h(x, w) {
|
|
2767
2767
|
if (e(x) != "object" || !x) return x;
|
|
2768
|
-
var
|
|
2769
|
-
if (
|
|
2770
|
-
var q =
|
|
2768
|
+
var V = x[Symbol.toPrimitive];
|
|
2769
|
+
if (V !== void 0) {
|
|
2770
|
+
var q = V.call(x, w);
|
|
2771
2771
|
if (e(q) != "object") return q;
|
|
2772
2772
|
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
2773
2773
|
}
|
|
2774
|
-
return (
|
|
2774
|
+
return (w === "string" ? String : Number)(x);
|
|
2775
2775
|
}
|
|
2776
|
-
var b = Ct, m = /* @__PURE__ */ Ds(), T = Ff, g = T.createFocusTrap, D = Bf, P = D.isFocusable,
|
|
2777
|
-
function
|
|
2776
|
+
var b = Ct, m = /* @__PURE__ */ Ds(), T = Ff, g = T.createFocusTrap, D = Bf, P = D.isFocusable, X = /* @__PURE__ */ (function(x) {
|
|
2777
|
+
function w(V) {
|
|
2778
2778
|
var q;
|
|
2779
|
-
t(this,
|
|
2780
|
-
var
|
|
2779
|
+
t(this, w), q = a(this, w, [V]), f(q, "getNodeForOption", function($) {
|
|
2780
|
+
var k, I = (k = this.internalOptions[$]) !== null && k !== void 0 ? k : this.originalOptions[$];
|
|
2781
2781
|
if (typeof I == "function") {
|
|
2782
|
-
for (var
|
|
2783
|
-
|
|
2784
|
-
I = I.apply(void 0,
|
|
2782
|
+
for (var L = arguments.length, B = new Array(L > 1 ? L - 1 : 0), W = 1; W < L; W++)
|
|
2783
|
+
B[W - 1] = arguments[W];
|
|
2784
|
+
I = I.apply(void 0, B);
|
|
2785
2785
|
}
|
|
2786
2786
|
if (I === !0 && (I = void 0), !I) {
|
|
2787
2787
|
if (I === void 0 || I === !1)
|
|
2788
2788
|
return I;
|
|
2789
2789
|
throw new Error("`".concat($, "` was specified but was not a node, or did not return a node"));
|
|
2790
2790
|
}
|
|
2791
|
-
var
|
|
2791
|
+
var H = I;
|
|
2792
2792
|
if (typeof I == "string") {
|
|
2793
2793
|
var z;
|
|
2794
|
-
if (
|
|
2794
|
+
if (H = (z = this.getDocument()) === null || z === void 0 ? void 0 : z.querySelector(I), !H)
|
|
2795
2795
|
throw new Error("`".concat($, "` as selector refers to no known node"));
|
|
2796
2796
|
}
|
|
2797
|
-
return
|
|
2797
|
+
return H;
|
|
2798
2798
|
}), q.handleDeactivate = q.handleDeactivate.bind(q), q.handlePostDeactivate = q.handlePostDeactivate.bind(q), q.handleClickOutsideDeactivates = q.handleClickOutsideDeactivates.bind(q), q.internalOptions = {
|
|
2799
2799
|
// We need to hijack the returnFocusOnDeactivate option,
|
|
2800
2800
|
// because React can move focus into the element before we arrived at
|
|
@@ -2825,7 +2825,7 @@ function Hf() {
|
|
|
2825
2825
|
// the user's setting, defaulted to false since focus-trap defaults this to false
|
|
2826
2826
|
clickOutsideDeactivates: !1
|
|
2827
2827
|
};
|
|
2828
|
-
var te =
|
|
2828
|
+
var te = V.focusTrapOptions;
|
|
2829
2829
|
for (var Y in te)
|
|
2830
2830
|
if (Object.prototype.hasOwnProperty.call(te, Y)) {
|
|
2831
2831
|
if (Y === "returnFocusOnDeactivate" || Y === "onDeactivate" || Y === "onPostDeactivate" || Y === "checkCanReturnFocus" || Y === "clickOutsideDeactivates") {
|
|
@@ -2834,9 +2834,9 @@ function Hf() {
|
|
|
2834
2834
|
}
|
|
2835
2835
|
q.internalOptions[Y] = te[Y];
|
|
2836
2836
|
}
|
|
2837
|
-
return q.outsideClick = null, q.focusTrapElements =
|
|
2837
|
+
return q.outsideClick = null, q.focusTrapElements = V.containerElements || [], q.updatePreviousElement(), q;
|
|
2838
2838
|
}
|
|
2839
|
-
return c(
|
|
2839
|
+
return c(w, x), r(w, [{
|
|
2840
2840
|
key: "getDocument",
|
|
2841
2841
|
value: function() {
|
|
2842
2842
|
return this.props.focusTrapOptions.document || (typeof document < "u" ? document : void 0);
|
|
@@ -2892,16 +2892,16 @@ function Hf() {
|
|
|
2892
2892
|
key: "handlePostDeactivate",
|
|
2893
2893
|
value: function() {
|
|
2894
2894
|
var q = this, te = function() {
|
|
2895
|
-
var $ = q.getReturnFocusNode(),
|
|
2895
|
+
var $ = q.getReturnFocusNode(), k = !!// did the consumer allow it?
|
|
2896
2896
|
(q.originalOptions.returnFocusOnDeactivate && // can we actually focus the node?
|
|
2897
2897
|
$ !== null && $ !== void 0 && $.focus && // was there an outside click that allowed deactivation?
|
|
2898
2898
|
(!q.outsideClick || // did the consumer allow deactivation when the outside node was clicked?
|
|
2899
2899
|
q.outsideClick.allowDeactivation && // is the outside node NOT focusable (implying that it did NOT receive focus
|
|
2900
2900
|
// as a result of the click-through) -- in which case do NOT restore focus
|
|
2901
2901
|
// to `returnFocusNode` because focus should remain on the outside node
|
|
2902
|
-
!P(q.outsideClick.target, q.internalOptions.tabbableOptions))), I = q.internalOptions.preventScroll,
|
|
2903
|
-
|
|
2904
|
-
preventScroll:
|
|
2902
|
+
!P(q.outsideClick.target, q.internalOptions.tabbableOptions))), I = q.internalOptions.preventScroll, L = I === void 0 ? !1 : I;
|
|
2903
|
+
k && $.focus({
|
|
2904
|
+
preventScroll: L
|
|
2905
2905
|
}), q.originalOptions.onPostDeactivate && q.originalOptions.onPostDeactivate.call(null), q.outsideClick = null;
|
|
2906
2906
|
};
|
|
2907
2907
|
this.originalOptions.checkCanReturnFocus ? this.originalOptions.checkCanReturnFocus.call(null, this.getReturnFocusNode()).then(te, te) : te();
|
|
@@ -2926,12 +2926,12 @@ function Hf() {
|
|
|
2926
2926
|
value: function(q) {
|
|
2927
2927
|
if (this.focusTrap) {
|
|
2928
2928
|
q.containerElements !== this.props.containerElements && this.focusTrap.updateContainerElements(this.props.containerElements);
|
|
2929
|
-
var te = !q.active && this.props.active, Y = q.active && !this.props.active, $ = !q.paused && this.props.paused,
|
|
2929
|
+
var te = !q.active && this.props.active, Y = q.active && !this.props.active, $ = !q.paused && this.props.paused, k = q.paused && !this.props.paused;
|
|
2930
2930
|
if (te && (this.updatePreviousElement(), this.focusTrap.activate()), Y) {
|
|
2931
2931
|
this.deactivateTrap();
|
|
2932
2932
|
return;
|
|
2933
2933
|
}
|
|
2934
|
-
$ && this.focusTrap.pause(),
|
|
2934
|
+
$ && this.focusTrap.pause(), k && this.focusTrap.unpause();
|
|
2935
2935
|
} else
|
|
2936
2936
|
q.containerElements !== this.props.containerElements && (this.focusTrapElements = this.props.containerElements), this.props.active && (this.updatePreviousElement(), this.setupFocusTrap());
|
|
2937
2937
|
}
|
|
@@ -2948,8 +2948,8 @@ function Hf() {
|
|
|
2948
2948
|
if (te.type && te.type === b.Fragment)
|
|
2949
2949
|
throw new Error("A focus-trap cannot use a Fragment as its child container. Try replacing it with a <div> element.");
|
|
2950
2950
|
var Y = function(I) {
|
|
2951
|
-
var
|
|
2952
|
-
te && (typeof te.ref == "function" ? te.ref(I) : te.ref && (te.ref.current = I)), q.focusTrapElements =
|
|
2951
|
+
var L = q.props.containerElements;
|
|
2952
|
+
te && (typeof te.ref == "function" ? te.ref(I) : te.ref && (te.ref.current = I)), q.focusTrapElements = L || [I];
|
|
2953
2953
|
}, $ = b.cloneElement(te, {
|
|
2954
2954
|
ref: Y
|
|
2955
2955
|
});
|
|
@@ -2958,8 +2958,8 @@ function Hf() {
|
|
|
2958
2958
|
return null;
|
|
2959
2959
|
}
|
|
2960
2960
|
}]);
|
|
2961
|
-
})(b.Component),
|
|
2962
|
-
return
|
|
2961
|
+
})(b.Component), F = typeof Element > "u" ? Function : Element;
|
|
2962
|
+
return X.propTypes = {
|
|
2963
2963
|
active: m.bool,
|
|
2964
2964
|
paused: m.bool,
|
|
2965
2965
|
focusTrapOptions: m.shape({
|
|
@@ -2974,9 +2974,9 @@ function Hf() {
|
|
|
2974
2974
|
onDeactivate: m.func,
|
|
2975
2975
|
onPostDeactivate: m.func,
|
|
2976
2976
|
checkCanReturnFocus: m.func,
|
|
2977
|
-
initialFocus: m.oneOfType([m.instanceOf(
|
|
2977
|
+
initialFocus: m.oneOfType([m.instanceOf(F), m.string, m.bool, m.func]),
|
|
2978
2978
|
fallbackFocus: m.oneOfType([
|
|
2979
|
-
m.instanceOf(
|
|
2979
|
+
m.instanceOf(F),
|
|
2980
2980
|
m.string,
|
|
2981
2981
|
// NOTE: does not support `false` as value (or return value from function)
|
|
2982
2982
|
m.func
|
|
@@ -2984,7 +2984,7 @@ function Hf() {
|
|
|
2984
2984
|
escapeDeactivates: m.oneOfType([m.bool, m.func]),
|
|
2985
2985
|
clickOutsideDeactivates: m.oneOfType([m.bool, m.func]),
|
|
2986
2986
|
returnFocusOnDeactivate: m.bool,
|
|
2987
|
-
setReturnFocus: m.oneOfType([m.instanceOf(
|
|
2987
|
+
setReturnFocus: m.oneOfType([m.instanceOf(F), m.string, m.bool, m.func]),
|
|
2988
2988
|
allowOutsideClick: m.oneOfType([m.bool, m.func]),
|
|
2989
2989
|
preventScroll: m.bool,
|
|
2990
2990
|
tabbableOptions: m.shape({
|
|
@@ -2995,23 +2995,23 @@ function Hf() {
|
|
|
2995
2995
|
isKeyForward: m.func,
|
|
2996
2996
|
isKeyBackward: m.func
|
|
2997
2997
|
}),
|
|
2998
|
-
containerElements: m.arrayOf(m.instanceOf(
|
|
2998
|
+
containerElements: m.arrayOf(m.instanceOf(F)),
|
|
2999
2999
|
// DOM element ONLY
|
|
3000
3000
|
children: m.oneOfType([
|
|
3001
3001
|
m.element,
|
|
3002
3002
|
// React element
|
|
3003
|
-
m.instanceOf(
|
|
3003
|
+
m.instanceOf(F)
|
|
3004
3004
|
// DOM element
|
|
3005
3005
|
])
|
|
3006
3006
|
// NOTE: _createFocusTrap is internal, for testing purposes only, so we don't
|
|
3007
3007
|
// specify it here. It's expected to be set to the function returned from
|
|
3008
3008
|
// require('focus-trap'), or one with a compatible interface.
|
|
3009
|
-
},
|
|
3009
|
+
}, X.defaultProps = {
|
|
3010
3010
|
active: !0,
|
|
3011
3011
|
paused: !1,
|
|
3012
3012
|
focusTrapOptions: {},
|
|
3013
3013
|
_createFocusTrap: g
|
|
3014
|
-
}, Ca =
|
|
3014
|
+
}, Ca = X, Ca;
|
|
3015
3015
|
}
|
|
3016
3016
|
var Uf = Hf();
|
|
3017
3017
|
const jf = /* @__PURE__ */ Ft(Uf);
|
|
@@ -3347,19 +3347,19 @@ function nh(e, t) {
|
|
|
3347
3347
|
const T = [], g = m.hFlip, D = m.vFlip;
|
|
3348
3348
|
let P = m.rotate;
|
|
3349
3349
|
g ? D ? P += 2 : (T.push("translate(" + (a.width + a.left).toString() + " " + (0 - a.top).toString() + ")"), T.push("scale(-1 1)"), a.top = a.left = 0) : D && (T.push("translate(" + (0 - a.left).toString() + " " + (a.height + a.top).toString() + ")"), T.push("scale(1 -1)"), a.top = a.left = 0);
|
|
3350
|
-
let
|
|
3350
|
+
let X;
|
|
3351
3351
|
switch (P < 0 && (P -= Math.floor(P / 4) * 4), P = P % 4, P) {
|
|
3352
3352
|
case 1:
|
|
3353
|
-
|
|
3353
|
+
X = a.height / 2 + a.top, T.unshift("rotate(90 " + X.toString() + " " + X.toString() + ")");
|
|
3354
3354
|
break;
|
|
3355
3355
|
case 2:
|
|
3356
3356
|
T.unshift("rotate(180 " + (a.width / 2 + a.left).toString() + " " + (a.height / 2 + a.top).toString() + ")");
|
|
3357
3357
|
break;
|
|
3358
3358
|
case 3:
|
|
3359
|
-
|
|
3359
|
+
X = a.width / 2 + a.left, T.unshift("rotate(-90 " + X.toString() + " " + X.toString() + ")");
|
|
3360
3360
|
break;
|
|
3361
3361
|
}
|
|
3362
|
-
P % 2 === 1 && (a.left !== a.top && (
|
|
3362
|
+
P % 2 === 1 && (a.left !== a.top && (X = a.left, a.left = a.top, a.top = X), a.width !== a.height && (X = a.width, a.width = a.height, a.height = X)), T.length && (i = eh(i, '<g transform="' + T.join(" ") + '">', "</g>"));
|
|
3363
3363
|
});
|
|
3364
3364
|
const u = r.width, s = r.height, l = a.width, c = a.height;
|
|
3365
3365
|
let d, f;
|
|
@@ -3619,8 +3619,8 @@ function Ch(e, t, n, r) {
|
|
|
3619
3619
|
if (e.random) {
|
|
3620
3620
|
let x = e.resources.slice(0);
|
|
3621
3621
|
for (u = []; x.length > 1; ) {
|
|
3622
|
-
const
|
|
3623
|
-
u.push(x[
|
|
3622
|
+
const w = Math.floor(Math.random() * x.length);
|
|
3623
|
+
u.push(x[w]), x = x.slice(0, w).concat(x.slice(w + 1));
|
|
3624
3624
|
}
|
|
3625
3625
|
u = u.concat(x);
|
|
3626
3626
|
} else u = e.resources.slice(i).concat(e.resources.slice(0, i));
|
|
@@ -3635,8 +3635,8 @@ function Ch(e, t, n, r) {
|
|
|
3635
3635
|
x.status === "pending" && (x.status = "aborted");
|
|
3636
3636
|
}), p = [];
|
|
3637
3637
|
}
|
|
3638
|
-
function T(x,
|
|
3639
|
-
|
|
3638
|
+
function T(x, w) {
|
|
3639
|
+
w && (h = []), typeof x == "function" && h.push(x);
|
|
3640
3640
|
}
|
|
3641
3641
|
function g() {
|
|
3642
3642
|
return {
|
|
@@ -3659,8 +3659,8 @@ function Ch(e, t, n, r) {
|
|
|
3659
3659
|
x.status === "pending" && (x.status = "aborted");
|
|
3660
3660
|
}), p = [];
|
|
3661
3661
|
}
|
|
3662
|
-
function
|
|
3663
|
-
const q =
|
|
3662
|
+
function X(x, w, V) {
|
|
3663
|
+
const q = w !== "success";
|
|
3664
3664
|
switch (p = p.filter((te) => te !== x), l) {
|
|
3665
3665
|
case "pending":
|
|
3666
3666
|
break;
|
|
@@ -3670,12 +3670,12 @@ function Ch(e, t, n, r) {
|
|
|
3670
3670
|
default:
|
|
3671
3671
|
return;
|
|
3672
3672
|
}
|
|
3673
|
-
if (
|
|
3674
|
-
d =
|
|
3673
|
+
if (w === "abort") {
|
|
3674
|
+
d = V, D();
|
|
3675
3675
|
return;
|
|
3676
3676
|
}
|
|
3677
3677
|
if (q) {
|
|
3678
|
-
d =
|
|
3678
|
+
d = V, p.length || (u.length ? F() : D());
|
|
3679
3679
|
return;
|
|
3680
3680
|
}
|
|
3681
3681
|
if (b(), P(), !e.random) {
|
|
@@ -3683,10 +3683,10 @@ function Ch(e, t, n, r) {
|
|
|
3683
3683
|
te !== -1 && te !== e.index && (e.index = te);
|
|
3684
3684
|
}
|
|
3685
3685
|
l = "completed", h.forEach((te) => {
|
|
3686
|
-
te(
|
|
3686
|
+
te(V);
|
|
3687
3687
|
});
|
|
3688
3688
|
}
|
|
3689
|
-
function
|
|
3689
|
+
function F() {
|
|
3690
3690
|
if (l !== "pending") return;
|
|
3691
3691
|
b();
|
|
3692
3692
|
const x = u.shift();
|
|
@@ -3700,16 +3700,16 @@ function Ch(e, t, n, r) {
|
|
|
3700
3700
|
D();
|
|
3701
3701
|
return;
|
|
3702
3702
|
}
|
|
3703
|
-
const
|
|
3703
|
+
const w = {
|
|
3704
3704
|
status: "pending",
|
|
3705
3705
|
resource: x,
|
|
3706
|
-
callback: (
|
|
3707
|
-
|
|
3706
|
+
callback: (V, q) => {
|
|
3707
|
+
X(w, V, q);
|
|
3708
3708
|
}
|
|
3709
3709
|
};
|
|
3710
|
-
p.push(
|
|
3710
|
+
p.push(w), c++, f = setTimeout(F, e.rotate), n(x, t, w.callback);
|
|
3711
3711
|
}
|
|
3712
|
-
return setTimeout(
|
|
3712
|
+
return setTimeout(F), g;
|
|
3713
3713
|
}
|
|
3714
3714
|
function cl(e) {
|
|
3715
3715
|
const t = {
|
|
@@ -4185,30 +4185,30 @@ function Ni({
|
|
|
4185
4185
|
inputRef: r,
|
|
4186
4186
|
handleChange: a
|
|
4187
4187
|
}) {
|
|
4188
|
-
const i = et(!1), { conversationScreen: u } = oe($e), { handleStop:
|
|
4189
|
-
hasError:
|
|
4190
|
-
hasNewMessage:
|
|
4191
|
-
loading:
|
|
4192
|
-
loadingHistory:
|
|
4193
|
-
streaming:
|
|
4194
|
-
internalStreaming:
|
|
4195
|
-
externalStreaming:
|
|
4196
|
-
} = oe(tt), [
|
|
4197
|
-
(
|
|
4198
|
-
|
|
4188
|
+
const i = et(!1), { conversationScreen: u, primaryColor: s } = oe($e), { handleStop: l, onStreamingStop: c } = oe($t), {
|
|
4189
|
+
hasError: d,
|
|
4190
|
+
hasNewMessage: f,
|
|
4191
|
+
loading: p,
|
|
4192
|
+
loadingHistory: h,
|
|
4193
|
+
streaming: b,
|
|
4194
|
+
internalStreaming: m,
|
|
4195
|
+
externalStreaming: T
|
|
4196
|
+
} = oe(tt), [g, D] = le(""), P = dt(
|
|
4197
|
+
(V) => {
|
|
4198
|
+
V.preventDefault(), D(V.target.value), a && a(V);
|
|
4199
4199
|
},
|
|
4200
|
-
[a,
|
|
4201
|
-
),
|
|
4202
|
-
|
|
4203
|
-
},
|
|
4200
|
+
[a, D]
|
|
4201
|
+
), X = () => {
|
|
4202
|
+
D(""), r.current && (r.current.style.height = "auto");
|
|
4203
|
+
}, F = e || p || h || b;
|
|
4204
4204
|
Le(() => {
|
|
4205
|
-
i.current && !
|
|
4206
|
-
}, [
|
|
4207
|
-
(
|
|
4208
|
-
}, [
|
|
4209
|
-
const
|
|
4210
|
-
|
|
4211
|
-
},
|
|
4205
|
+
i.current && !F && r.current?.focus(), i.current = F;
|
|
4206
|
+
}, [F, r]), Le(() => {
|
|
4207
|
+
(d || f) && r.current?.focus();
|
|
4208
|
+
}, [f, d, r]);
|
|
4209
|
+
const x = (V) => {
|
|
4210
|
+
V.key === "Enter" && g.trim() === "" || V.key === "Enter" && !V.shiftKey && (V.preventDefault(), t(g), X());
|
|
4211
|
+
}, w = () => {
|
|
4212
4212
|
/* istanbul ignore next @preserve */
|
|
4213
4213
|
r.current && (r.current.style.height = "auto", r.current.style.height = `${Math.min(
|
|
4214
4214
|
r.current?.scrollHeight,
|
|
@@ -4220,16 +4220,16 @@ function Ni({
|
|
|
4220
4220
|
"textarea",
|
|
4221
4221
|
{
|
|
4222
4222
|
"data-testid": "ConversationInput",
|
|
4223
|
-
disabled:
|
|
4224
|
-
value:
|
|
4223
|
+
disabled: F,
|
|
4224
|
+
value: g,
|
|
4225
4225
|
ref: r,
|
|
4226
|
-
onInput:
|
|
4227
|
-
onChange:
|
|
4226
|
+
onInput: w,
|
|
4227
|
+
onChange: P,
|
|
4228
4228
|
placeholder: "Write a message",
|
|
4229
4229
|
cols: "5",
|
|
4230
4230
|
rows: "1",
|
|
4231
4231
|
maxLength: u?.input?.maxLength ?? 5e3,
|
|
4232
|
-
onKeyDown:
|
|
4232
|
+
onKeyDown: x,
|
|
4233
4233
|
style: {
|
|
4234
4234
|
margin: "0",
|
|
4235
4235
|
borderRadius: "1rem",
|
|
@@ -4242,17 +4242,18 @@ function Ni({
|
|
|
4242
4242
|
minHeight: "3.25rem",
|
|
4243
4243
|
padding: "12.5px 45px 12.5px 12.5px",
|
|
4244
4244
|
resize: "none",
|
|
4245
|
-
width: "100%"
|
|
4245
|
+
width: "100%",
|
|
4246
|
+
border: `2px solid ${s}`
|
|
4246
4247
|
}
|
|
4247
4248
|
}
|
|
4248
4249
|
),
|
|
4249
|
-
|
|
4250
|
+
T && c || p || m ? /* @__PURE__ */ _.jsx(
|
|
4250
4251
|
"button",
|
|
4251
4252
|
{
|
|
4252
4253
|
"data-testid": "Stop",
|
|
4253
4254
|
className: "xpert-chatbot-popup__input--stop-btn",
|
|
4254
|
-
onClick: (
|
|
4255
|
-
|
|
4255
|
+
onClick: (V) => {
|
|
4256
|
+
V.preventDefault(), l();
|
|
4256
4257
|
},
|
|
4257
4258
|
"aria-label": "Stop streaming",
|
|
4258
4259
|
children: /* @__PURE__ */ _.jsx(kt, { icon: "material-symbols:stop", style: { fontSize: "1.75rem" } })
|
|
@@ -4261,10 +4262,10 @@ function Ni({
|
|
|
4261
4262
|
"button",
|
|
4262
4263
|
{
|
|
4263
4264
|
"data-testid": "Send",
|
|
4264
|
-
disabled:
|
|
4265
|
+
disabled: F,
|
|
4265
4266
|
className: "xpert-chatbot-popup__input--send-btn",
|
|
4266
|
-
onClick: (
|
|
4267
|
-
|
|
4267
|
+
onClick: (V) => {
|
|
4268
|
+
V.preventDefault(), t(g), X();
|
|
4268
4269
|
},
|
|
4269
4270
|
"aria-label": "Send message",
|
|
4270
4271
|
children: /* @__PURE__ */ _.jsx(kt, { icon: "material-symbols:send", style: { fontSize: "1.75rem" } })
|
|
@@ -4945,45 +4946,45 @@ function bl() {
|
|
|
4945
4946
|
function l(m, ...T) {
|
|
4946
4947
|
let g;
|
|
4947
4948
|
if (wa("use", r), m != null) if (typeof m == "function")
|
|
4948
|
-
|
|
4949
|
+
F(m, ...T);
|
|
4949
4950
|
else if (typeof m == "object")
|
|
4950
|
-
Array.isArray(m) ?
|
|
4951
|
+
Array.isArray(m) ? X(m) : P(m);
|
|
4951
4952
|
else
|
|
4952
4953
|
throw new TypeError("Expected usable value, not `" + m + "`");
|
|
4953
4954
|
return g && (n.settings = Object.assign(n.settings || {}, g)), i;
|
|
4954
4955
|
function D(x) {
|
|
4955
4956
|
if (typeof x == "function")
|
|
4956
|
-
|
|
4957
|
+
F(x);
|
|
4957
4958
|
else if (typeof x == "object")
|
|
4958
4959
|
if (Array.isArray(x)) {
|
|
4959
|
-
const [
|
|
4960
|
-
|
|
4960
|
+
const [w, ...V] = x;
|
|
4961
|
+
F(w, ...V);
|
|
4961
4962
|
} else
|
|
4962
4963
|
P(x);
|
|
4963
4964
|
else
|
|
4964
4965
|
throw new TypeError("Expected usable value, not `" + x + "`");
|
|
4965
4966
|
}
|
|
4966
4967
|
function P(x) {
|
|
4967
|
-
|
|
4968
|
+
X(x.plugins), x.settings && (g = Object.assign(g || {}, x.settings));
|
|
4968
4969
|
}
|
|
4969
|
-
function
|
|
4970
|
-
let
|
|
4970
|
+
function X(x) {
|
|
4971
|
+
let w = -1;
|
|
4971
4972
|
if (x != null) if (Array.isArray(x))
|
|
4972
|
-
for (; ++
|
|
4973
|
-
const
|
|
4974
|
-
D(
|
|
4973
|
+
for (; ++w < x.length; ) {
|
|
4974
|
+
const V = x[w];
|
|
4975
|
+
D(V);
|
|
4975
4976
|
}
|
|
4976
4977
|
else
|
|
4977
4978
|
throw new TypeError("Expected a list of plugins, not `" + x + "`");
|
|
4978
4979
|
}
|
|
4979
|
-
function
|
|
4980
|
-
let
|
|
4981
|
-
for (; ++
|
|
4982
|
-
if (t[
|
|
4983
|
-
q = t[
|
|
4980
|
+
function F(x, w) {
|
|
4981
|
+
let V = -1, q;
|
|
4982
|
+
for (; ++V < t.length; )
|
|
4983
|
+
if (t[V][0] === x) {
|
|
4984
|
+
q = t[V];
|
|
4984
4985
|
break;
|
|
4985
4986
|
}
|
|
4986
|
-
q ? (oi(q[1]) && oi(
|
|
4987
|
+
q ? (oi(q[1]) && oi(w) && (w = Ju(!0, q[1], w)), q[1] = w) : t.push([...arguments]);
|
|
4987
4988
|
}
|
|
4988
4989
|
}
|
|
4989
4990
|
function c(m) {
|
|
@@ -5000,18 +5001,18 @@ function bl() {
|
|
|
5000
5001
|
if (to(m), i.freeze(), !g && typeof T == "function" && (g = T, T = void 0), !g)
|
|
5001
5002
|
return new Promise(D);
|
|
5002
5003
|
D(null, g);
|
|
5003
|
-
function D(P,
|
|
5004
|
-
e.run(m, $n(T),
|
|
5005
|
-
function
|
|
5006
|
-
|
|
5004
|
+
function D(P, X) {
|
|
5005
|
+
e.run(m, $n(T), F);
|
|
5006
|
+
function F(x, w, V) {
|
|
5007
|
+
w = w || m, x ? X(x) : P ? P(w) : g(null, w, V);
|
|
5007
5008
|
}
|
|
5008
5009
|
}
|
|
5009
5010
|
}
|
|
5010
5011
|
function p(m, T) {
|
|
5011
5012
|
let g, D;
|
|
5012
5013
|
return i.run(m, T, P), no("runSync", "run", D), g;
|
|
5013
|
-
function P(
|
|
5014
|
-
Qu(
|
|
5014
|
+
function P(X, F) {
|
|
5015
|
+
Qu(X), g = F, D = !0;
|
|
5015
5016
|
}
|
|
5016
5017
|
}
|
|
5017
5018
|
function h(m, T) {
|
|
@@ -5019,17 +5020,17 @@ function bl() {
|
|
|
5019
5020
|
return new Promise(g);
|
|
5020
5021
|
g(null, T);
|
|
5021
5022
|
function g(D, P) {
|
|
5022
|
-
const
|
|
5023
|
-
i.run(i.parse(
|
|
5024
|
-
if (x || !
|
|
5025
|
-
|
|
5023
|
+
const X = $n(m);
|
|
5024
|
+
i.run(i.parse(X), X, (x, w, V) => {
|
|
5025
|
+
if (x || !w || !V)
|
|
5026
|
+
F(x);
|
|
5026
5027
|
else {
|
|
5027
|
-
const q = i.stringify(
|
|
5028
|
-
q == null || (cp(q) ?
|
|
5028
|
+
const q = i.stringify(w, V);
|
|
5029
|
+
q == null || (cp(q) ? V.value = q : V.result = q), F(x, V);
|
|
5029
5030
|
}
|
|
5030
5031
|
});
|
|
5031
|
-
function
|
|
5032
|
-
x || !
|
|
5032
|
+
function F(x, w) {
|
|
5033
|
+
x || !w ? P(x) : D ? D(w) : T(null, w);
|
|
5033
5034
|
}
|
|
5034
5035
|
}
|
|
5035
5036
|
}
|
|
@@ -5226,9 +5227,9 @@ function yp(e) {
|
|
|
5226
5227
|
return s;
|
|
5227
5228
|
function s(P) {
|
|
5228
5229
|
if (r < n.length) {
|
|
5229
|
-
const
|
|
5230
|
-
return t.containerState =
|
|
5231
|
-
|
|
5230
|
+
const X = n[r];
|
|
5231
|
+
return t.containerState = X[1], e.attempt(
|
|
5232
|
+
X[0].continuation,
|
|
5232
5233
|
l,
|
|
5233
5234
|
c
|
|
5234
5235
|
)(P);
|
|
@@ -5238,23 +5239,23 @@ function yp(e) {
|
|
|
5238
5239
|
function l(P) {
|
|
5239
5240
|
if (r++, t.containerState._closeFlow) {
|
|
5240
5241
|
t.containerState._closeFlow = void 0, a && D();
|
|
5241
|
-
const
|
|
5242
|
-
let
|
|
5243
|
-
for (;
|
|
5244
|
-
if (t.events[
|
|
5245
|
-
x = t.events[
|
|
5242
|
+
const X = t.events.length;
|
|
5243
|
+
let F = X, x;
|
|
5244
|
+
for (; F--; )
|
|
5245
|
+
if (t.events[F][0] === "exit" && t.events[F][1].type === "chunkFlow") {
|
|
5246
|
+
x = t.events[F][1].end;
|
|
5246
5247
|
break;
|
|
5247
5248
|
}
|
|
5248
5249
|
g(r);
|
|
5249
|
-
let
|
|
5250
|
-
for (;
|
|
5251
|
-
t.events[
|
|
5250
|
+
let w = X;
|
|
5251
|
+
for (; w < t.events.length; )
|
|
5252
|
+
t.events[w][1].end = Object.assign({}, x), w++;
|
|
5252
5253
|
return Mt(
|
|
5253
5254
|
t.events,
|
|
5254
|
-
|
|
5255
|
+
F + 1,
|
|
5255
5256
|
0,
|
|
5256
|
-
t.events.slice(
|
|
5257
|
-
), t.events.length =
|
|
5257
|
+
t.events.slice(X)
|
|
5258
|
+
), t.events.length = w, c(P);
|
|
5258
5259
|
}
|
|
5259
5260
|
return s(P);
|
|
5260
5261
|
}
|
|
@@ -5306,9 +5307,9 @@ function yp(e) {
|
|
|
5306
5307
|
}
|
|
5307
5308
|
return ki(P) ? (e.consume(P), T(e.exit("chunkFlow")), r = 0, t.interrupt = void 0, s) : (e.consume(P), m);
|
|
5308
5309
|
}
|
|
5309
|
-
function T(P,
|
|
5310
|
-
const
|
|
5311
|
-
if (
|
|
5310
|
+
function T(P, X) {
|
|
5311
|
+
const F = t.sliceStream(P);
|
|
5312
|
+
if (X && F.push(null), P.previous = i, i && (i.next = P), i = P, a.defineSkip(P.start), a.write(F), t.parser.lazy[P.start.line]) {
|
|
5312
5313
|
let x = a.events.length;
|
|
5313
5314
|
for (; x--; )
|
|
5314
5315
|
if (
|
|
@@ -5318,31 +5319,31 @@ function yp(e) {
|
|
|
5318
5319
|
a.events[x][1].end.offset > u)
|
|
5319
5320
|
)
|
|
5320
5321
|
return;
|
|
5321
|
-
const
|
|
5322
|
-
let
|
|
5323
|
-
for (;
|
|
5324
|
-
if (t.events[
|
|
5322
|
+
const w = t.events.length;
|
|
5323
|
+
let V = w, q, te;
|
|
5324
|
+
for (; V--; )
|
|
5325
|
+
if (t.events[V][0] === "exit" && t.events[V][1].type === "chunkFlow") {
|
|
5325
5326
|
if (q) {
|
|
5326
|
-
te = t.events[
|
|
5327
|
+
te = t.events[V][1].end;
|
|
5327
5328
|
break;
|
|
5328
5329
|
}
|
|
5329
5330
|
q = !0;
|
|
5330
5331
|
}
|
|
5331
|
-
for (g(r), x =
|
|
5332
|
+
for (g(r), x = w; x < t.events.length; )
|
|
5332
5333
|
t.events[x][1].end = Object.assign({}, te), x++;
|
|
5333
5334
|
Mt(
|
|
5334
5335
|
t.events,
|
|
5335
|
-
|
|
5336
|
+
V + 1,
|
|
5336
5337
|
0,
|
|
5337
|
-
t.events.slice(
|
|
5338
|
+
t.events.slice(w)
|
|
5338
5339
|
), t.events.length = x;
|
|
5339
5340
|
}
|
|
5340
5341
|
}
|
|
5341
5342
|
function g(P) {
|
|
5342
|
-
let
|
|
5343
|
-
for (;
|
|
5344
|
-
const
|
|
5345
|
-
t.containerState =
|
|
5343
|
+
let X = n.length;
|
|
5344
|
+
for (; X-- > P; ) {
|
|
5345
|
+
const F = n[X];
|
|
5346
|
+
t.containerState = F[1], F[0].exit.call(t, e);
|
|
5346
5347
|
}
|
|
5347
5348
|
n.length = P;
|
|
5348
5349
|
}
|
|
@@ -5641,7 +5642,7 @@ const co = {
|
|
|
5641
5642
|
};
|
|
5642
5643
|
function Up(e, t, n) {
|
|
5643
5644
|
const r = this, a = {
|
|
5644
|
-
tokenize:
|
|
5645
|
+
tokenize: F,
|
|
5645
5646
|
partial: !0
|
|
5646
5647
|
};
|
|
5647
5648
|
let i = 0, u = 0, s;
|
|
@@ -5650,14 +5651,14 @@ function Up(e, t, n) {
|
|
|
5650
5651
|
return c(x);
|
|
5651
5652
|
}
|
|
5652
5653
|
function c(x) {
|
|
5653
|
-
const
|
|
5654
|
-
return i =
|
|
5654
|
+
const w = r.events[r.events.length - 1];
|
|
5655
|
+
return i = w && w[1].type === "linePrefix" ? w[2].sliceSerialize(w[1], !0).length : 0, s = x, e.enter("codeFenced"), e.enter("codeFencedFence"), e.enter("codeFencedFenceSequence"), d(x);
|
|
5655
5656
|
}
|
|
5656
5657
|
function d(x) {
|
|
5657
5658
|
return x === s ? (u++, e.consume(x), d) : u < 3 ? n(x) : (e.exit("codeFencedFenceSequence"), ke(x) ? Pe(e, f, "whitespace")(x) : f(x));
|
|
5658
5659
|
}
|
|
5659
5660
|
function f(x) {
|
|
5660
|
-
return x === null || ge(x) ? (e.exit("codeFencedFence"), r.interrupt ? t(x) : e.check(co, m,
|
|
5661
|
+
return x === null || ge(x) ? (e.exit("codeFencedFence"), r.interrupt ? t(x) : e.check(co, m, X)(x)) : (e.enter("codeFencedFenceInfo"), e.enter("chunkString", {
|
|
5661
5662
|
contentType: "string"
|
|
5662
5663
|
}), p(x));
|
|
5663
5664
|
}
|
|
@@ -5673,7 +5674,7 @@ function Up(e, t, n) {
|
|
|
5673
5674
|
return x === null || ge(x) ? (e.exit("chunkString"), e.exit("codeFencedFenceMeta"), f(x)) : x === 96 && x === s ? n(x) : (e.consume(x), b);
|
|
5674
5675
|
}
|
|
5675
5676
|
function m(x) {
|
|
5676
|
-
return e.attempt(a,
|
|
5677
|
+
return e.attempt(a, X, T)(x);
|
|
5677
5678
|
}
|
|
5678
5679
|
function T(x) {
|
|
5679
5680
|
return e.enter("lineEnding"), e.consume(x), e.exit("lineEnding"), g;
|
|
@@ -5687,36 +5688,36 @@ function Up(e, t, n) {
|
|
|
5687
5688
|
)(x) : D(x);
|
|
5688
5689
|
}
|
|
5689
5690
|
function D(x) {
|
|
5690
|
-
return x === null || ge(x) ? e.check(co, m,
|
|
5691
|
+
return x === null || ge(x) ? e.check(co, m, X)(x) : (e.enter("codeFlowValue"), P(x));
|
|
5691
5692
|
}
|
|
5692
5693
|
function P(x) {
|
|
5693
5694
|
return x === null || ge(x) ? (e.exit("codeFlowValue"), D(x)) : (e.consume(x), P);
|
|
5694
5695
|
}
|
|
5695
|
-
function
|
|
5696
|
+
function X(x) {
|
|
5696
5697
|
return e.exit("codeFenced"), t(x);
|
|
5697
5698
|
}
|
|
5698
|
-
function
|
|
5699
|
+
function F(x, w, V) {
|
|
5699
5700
|
let q = 0;
|
|
5700
5701
|
return te;
|
|
5701
|
-
function te(
|
|
5702
|
-
return x.enter("lineEnding"), x.consume(
|
|
5702
|
+
function te(L) {
|
|
5703
|
+
return x.enter("lineEnding"), x.consume(L), x.exit("lineEnding"), Y;
|
|
5703
5704
|
}
|
|
5704
|
-
function Y(
|
|
5705
|
-
return x.enter("codeFencedFence"), ke(
|
|
5705
|
+
function Y(L) {
|
|
5706
|
+
return x.enter("codeFencedFence"), ke(L) ? Pe(
|
|
5706
5707
|
x,
|
|
5707
5708
|
$,
|
|
5708
5709
|
"linePrefix",
|
|
5709
5710
|
r.parser.constructs.disable.null.includes("codeIndented") ? void 0 : 4
|
|
5710
|
-
)(
|
|
5711
|
+
)(L) : $(L);
|
|
5711
5712
|
}
|
|
5712
|
-
function $(
|
|
5713
|
-
return
|
|
5713
|
+
function $(L) {
|
|
5714
|
+
return L === s ? (x.enter("codeFencedFenceSequence"), k(L)) : V(L);
|
|
5714
5715
|
}
|
|
5715
|
-
function L
|
|
5716
|
-
return
|
|
5716
|
+
function k(L) {
|
|
5717
|
+
return L === s ? (q++, x.consume(L), k) : q >= u ? (x.exit("codeFencedFenceSequence"), ke(L) ? Pe(x, I, "whitespace")(L) : I(L)) : V(L);
|
|
5717
5718
|
}
|
|
5718
|
-
function I(
|
|
5719
|
-
return
|
|
5719
|
+
function I(L) {
|
|
5720
|
+
return L === null || ge(L) ? (x.exit("codeFencedFence"), w(L)) : V(L);
|
|
5720
5721
|
}
|
|
5721
5722
|
}
|
|
5722
5723
|
}
|
|
@@ -6270,22 +6271,22 @@ function y1(e, t, n) {
|
|
|
6270
6271
|
return ke(v) ? (e.consume(v), D) : te(v);
|
|
6271
6272
|
}
|
|
6272
6273
|
function P(v) {
|
|
6273
|
-
return v === 47 ? (e.consume(v), te) : v === 58 || v === 95 || Pt(v) ? (e.consume(v),
|
|
6274
|
+
return v === 47 ? (e.consume(v), te) : v === 58 || v === 95 || Pt(v) ? (e.consume(v), X) : ke(v) ? (e.consume(v), P) : te(v);
|
|
6274
6275
|
}
|
|
6275
|
-
function
|
|
6276
|
-
return v === 45 || v === 46 || v === 58 || v === 95 || It(v) ? (e.consume(v),
|
|
6276
|
+
function X(v) {
|
|
6277
|
+
return v === 45 || v === 46 || v === 58 || v === 95 || It(v) ? (e.consume(v), X) : F(v);
|
|
6277
6278
|
}
|
|
6278
|
-
function
|
|
6279
|
-
return v === 61 ? (e.consume(v), x) : ke(v) ? (e.consume(v),
|
|
6279
|
+
function F(v) {
|
|
6280
|
+
return v === 61 ? (e.consume(v), x) : ke(v) ? (e.consume(v), F) : P(v);
|
|
6280
6281
|
}
|
|
6281
6282
|
function x(v) {
|
|
6282
|
-
return v === null || v === 60 || v === 61 || v === 62 || v === 96 ? n(v) : v === 34 || v === 39 ? (e.consume(v), l = v,
|
|
6283
|
+
return v === null || v === 60 || v === 61 || v === 62 || v === 96 ? n(v) : v === 34 || v === 39 ? (e.consume(v), l = v, w) : ke(v) ? (e.consume(v), x) : V(v);
|
|
6283
6284
|
}
|
|
6284
|
-
function
|
|
6285
|
-
return v === l ? (e.consume(v), l = null, q) : v === null || ge(v) ? n(v) : (e.consume(v),
|
|
6285
|
+
function w(v) {
|
|
6286
|
+
return v === l ? (e.consume(v), l = null, q) : v === null || ge(v) ? n(v) : (e.consume(v), w);
|
|
6286
6287
|
}
|
|
6287
|
-
function
|
|
6288
|
-
return v === null || v === 34 || v === 39 || v === 47 || v === 60 || v === 61 || v === 62 || v === 96 || At(v) ?
|
|
6288
|
+
function V(v) {
|
|
6289
|
+
return v === null || v === 34 || v === 39 || v === 47 || v === 60 || v === 61 || v === 62 || v === 96 || At(v) ? F(v) : (e.consume(v), V);
|
|
6289
6290
|
}
|
|
6290
6291
|
function q(v) {
|
|
6291
6292
|
return v === 47 || v === 62 || ke(v) ? P(v) : n(v);
|
|
@@ -6297,13 +6298,13 @@ function y1(e, t, n) {
|
|
|
6297
6298
|
return v === null || ge(v) ? $(v) : ke(v) ? (e.consume(v), Y) : n(v);
|
|
6298
6299
|
}
|
|
6299
6300
|
function $(v) {
|
|
6300
|
-
return v === 45 && a === 2 ? (e.consume(v),
|
|
6301
|
+
return v === 45 && a === 2 ? (e.consume(v), B) : v === 60 && a === 1 ? (e.consume(v), W) : v === 62 && a === 4 ? (e.consume(v), ne) : v === 63 && a === 3 ? (e.consume(v), y) : v === 93 && a === 5 ? (e.consume(v), z) : ge(v) && (a === 6 || a === 7) ? (e.exit("htmlFlowData"), e.check(
|
|
6301
6302
|
b1,
|
|
6302
6303
|
ae,
|
|
6303
|
-
|
|
6304
|
-
)(v)) : v === null || ge(v) ? (e.exit("htmlFlowData"),
|
|
6304
|
+
k
|
|
6305
|
+
)(v)) : v === null || ge(v) ? (e.exit("htmlFlowData"), k(v)) : (e.consume(v), $);
|
|
6305
6306
|
}
|
|
6306
|
-
function
|
|
6307
|
+
function k(v) {
|
|
6307
6308
|
return e.check(
|
|
6308
6309
|
E1,
|
|
6309
6310
|
I,
|
|
@@ -6311,23 +6312,23 @@ function y1(e, t, n) {
|
|
|
6311
6312
|
)(v);
|
|
6312
6313
|
}
|
|
6313
6314
|
function I(v) {
|
|
6314
|
-
return e.enter("lineEnding"), e.consume(v), e.exit("lineEnding"),
|
|
6315
|
+
return e.enter("lineEnding"), e.consume(v), e.exit("lineEnding"), L;
|
|
6315
6316
|
}
|
|
6316
|
-
function
|
|
6317
|
-
return v === null || ge(v) ?
|
|
6317
|
+
function L(v) {
|
|
6318
|
+
return v === null || ge(v) ? k(v) : (e.enter("htmlFlowData"), $(v));
|
|
6318
6319
|
}
|
|
6319
|
-
function
|
|
6320
|
+
function B(v) {
|
|
6320
6321
|
return v === 45 ? (e.consume(v), y) : $(v);
|
|
6321
6322
|
}
|
|
6322
|
-
function
|
|
6323
|
-
return v === 47 ? (e.consume(v), u = "",
|
|
6323
|
+
function W(v) {
|
|
6324
|
+
return v === 47 ? (e.consume(v), u = "", H) : $(v);
|
|
6324
6325
|
}
|
|
6325
|
-
function
|
|
6326
|
+
function H(v) {
|
|
6326
6327
|
if (v === 62) {
|
|
6327
6328
|
const se = u.toLowerCase();
|
|
6328
6329
|
return go.includes(se) ? (e.consume(v), ne) : $(v);
|
|
6329
6330
|
}
|
|
6330
|
-
return Pt(v) && u.length < 8 ? (e.consume(v), u += String.fromCharCode(v),
|
|
6331
|
+
return Pt(v) && u.length < 8 ? (e.consume(v), u += String.fromCharCode(v), H) : $(v);
|
|
6331
6332
|
}
|
|
6332
6333
|
function z(v) {
|
|
6333
6334
|
return v === 93 ? (e.consume(v), y) : $(v);
|
|
@@ -6370,7 +6371,7 @@ function S1(e, t, n) {
|
|
|
6370
6371
|
return e.enter("htmlText"), e.enter("htmlTextData"), e.consume(y), l;
|
|
6371
6372
|
}
|
|
6372
6373
|
function l(y) {
|
|
6373
|
-
return y === 33 ? (e.consume(y), c) : y === 47 ? (e.consume(y),
|
|
6374
|
+
return y === 33 ? (e.consume(y), c) : y === 47 ? (e.consume(y), F) : y === 63 ? (e.consume(y), P) : Pt(y) ? (e.consume(y), V) : n(y);
|
|
6374
6375
|
}
|
|
6375
6376
|
function c(y) {
|
|
6376
6377
|
return y === 45 ? (e.consume(y), d) : y === 91 ? (e.consume(y), i = 0, b) : Pt(y) ? (e.consume(y), D) : n(y);
|
|
@@ -6379,76 +6380,76 @@ function S1(e, t, n) {
|
|
|
6379
6380
|
return y === 45 ? (e.consume(y), h) : n(y);
|
|
6380
6381
|
}
|
|
6381
6382
|
function f(y) {
|
|
6382
|
-
return y === null ? n(y) : y === 45 ? (e.consume(y), p) : ge(y) ? (u = f,
|
|
6383
|
+
return y === null ? n(y) : y === 45 ? (e.consume(y), p) : ge(y) ? (u = f, W(y)) : (e.consume(y), f);
|
|
6383
6384
|
}
|
|
6384
6385
|
function p(y) {
|
|
6385
6386
|
return y === 45 ? (e.consume(y), h) : f(y);
|
|
6386
6387
|
}
|
|
6387
6388
|
function h(y) {
|
|
6388
|
-
return y === 62 ?
|
|
6389
|
+
return y === 62 ? B(y) : y === 45 ? p(y) : f(y);
|
|
6389
6390
|
}
|
|
6390
6391
|
function b(y) {
|
|
6391
6392
|
const ne = "CDATA[";
|
|
6392
6393
|
return y === ne.charCodeAt(i++) ? (e.consume(y), i === ne.length ? m : b) : n(y);
|
|
6393
6394
|
}
|
|
6394
6395
|
function m(y) {
|
|
6395
|
-
return y === null ? n(y) : y === 93 ? (e.consume(y), T) : ge(y) ? (u = m,
|
|
6396
|
+
return y === null ? n(y) : y === 93 ? (e.consume(y), T) : ge(y) ? (u = m, W(y)) : (e.consume(y), m);
|
|
6396
6397
|
}
|
|
6397
6398
|
function T(y) {
|
|
6398
6399
|
return y === 93 ? (e.consume(y), g) : m(y);
|
|
6399
6400
|
}
|
|
6400
6401
|
function g(y) {
|
|
6401
|
-
return y === 62 ?
|
|
6402
|
+
return y === 62 ? B(y) : y === 93 ? (e.consume(y), g) : m(y);
|
|
6402
6403
|
}
|
|
6403
6404
|
function D(y) {
|
|
6404
|
-
return y === null || y === 62 ?
|
|
6405
|
+
return y === null || y === 62 ? B(y) : ge(y) ? (u = D, W(y)) : (e.consume(y), D);
|
|
6405
6406
|
}
|
|
6406
6407
|
function P(y) {
|
|
6407
|
-
return y === null ? n(y) : y === 63 ? (e.consume(y),
|
|
6408
|
+
return y === null ? n(y) : y === 63 ? (e.consume(y), X) : ge(y) ? (u = P, W(y)) : (e.consume(y), P);
|
|
6408
6409
|
}
|
|
6409
|
-
function
|
|
6410
|
-
return y === 62 ?
|
|
6410
|
+
function X(y) {
|
|
6411
|
+
return y === 62 ? B(y) : P(y);
|
|
6411
6412
|
}
|
|
6412
|
-
function
|
|
6413
|
+
function F(y) {
|
|
6413
6414
|
return Pt(y) ? (e.consume(y), x) : n(y);
|
|
6414
6415
|
}
|
|
6415
6416
|
function x(y) {
|
|
6416
|
-
return y === 45 || It(y) ? (e.consume(y), x) :
|
|
6417
|
+
return y === 45 || It(y) ? (e.consume(y), x) : w(y);
|
|
6417
6418
|
}
|
|
6418
|
-
function
|
|
6419
|
-
return ge(y) ? (u =
|
|
6419
|
+
function w(y) {
|
|
6420
|
+
return ge(y) ? (u = w, W(y)) : ke(y) ? (e.consume(y), w) : B(y);
|
|
6420
6421
|
}
|
|
6421
|
-
function
|
|
6422
|
-
return y === 45 || It(y) ? (e.consume(y),
|
|
6422
|
+
function V(y) {
|
|
6423
|
+
return y === 45 || It(y) ? (e.consume(y), V) : y === 47 || y === 62 || At(y) ? q(y) : n(y);
|
|
6423
6424
|
}
|
|
6424
6425
|
function q(y) {
|
|
6425
|
-
return y === 47 ? (e.consume(y),
|
|
6426
|
+
return y === 47 ? (e.consume(y), B) : y === 58 || y === 95 || Pt(y) ? (e.consume(y), te) : ge(y) ? (u = q, W(y)) : ke(y) ? (e.consume(y), q) : B(y);
|
|
6426
6427
|
}
|
|
6427
6428
|
function te(y) {
|
|
6428
6429
|
return y === 45 || y === 46 || y === 58 || y === 95 || It(y) ? (e.consume(y), te) : Y(y);
|
|
6429
6430
|
}
|
|
6430
6431
|
function Y(y) {
|
|
6431
|
-
return y === 61 ? (e.consume(y), $) : ge(y) ? (u = Y,
|
|
6432
|
+
return y === 61 ? (e.consume(y), $) : ge(y) ? (u = Y, W(y)) : ke(y) ? (e.consume(y), Y) : q(y);
|
|
6432
6433
|
}
|
|
6433
6434
|
function $(y) {
|
|
6434
|
-
return y === null || y === 60 || y === 61 || y === 62 || y === 96 ? n(y) : y === 34 || y === 39 ? (e.consume(y), a = y,
|
|
6435
|
+
return y === null || y === 60 || y === 61 || y === 62 || y === 96 ? n(y) : y === 34 || y === 39 ? (e.consume(y), a = y, k) : ge(y) ? (u = $, W(y)) : ke(y) ? (e.consume(y), $) : (e.consume(y), I);
|
|
6435
6436
|
}
|
|
6436
|
-
function
|
|
6437
|
-
return y === a ? (e.consume(y), a = void 0,
|
|
6437
|
+
function k(y) {
|
|
6438
|
+
return y === a ? (e.consume(y), a = void 0, L) : y === null ? n(y) : ge(y) ? (u = k, W(y)) : (e.consume(y), k);
|
|
6438
6439
|
}
|
|
6439
6440
|
function I(y) {
|
|
6440
6441
|
return y === null || y === 34 || y === 39 || y === 60 || y === 61 || y === 96 ? n(y) : y === 47 || y === 62 || At(y) ? q(y) : (e.consume(y), I);
|
|
6441
6442
|
}
|
|
6442
|
-
function
|
|
6443
|
+
function L(y) {
|
|
6443
6444
|
return y === 47 || y === 62 || At(y) ? q(y) : n(y);
|
|
6444
6445
|
}
|
|
6445
|
-
function
|
|
6446
|
+
function B(y) {
|
|
6446
6447
|
return y === 62 ? (e.consume(y), e.exit("htmlTextData"), e.exit("htmlText"), t) : n(y);
|
|
6447
6448
|
}
|
|
6448
|
-
function
|
|
6449
|
-
return e.exit("htmlTextData"), e.enter("lineEnding"), e.consume(y), e.exit("lineEnding"),
|
|
6449
|
+
function W(y) {
|
|
6450
|
+
return e.exit("htmlTextData"), e.enter("lineEnding"), e.consume(y), e.exit("lineEnding"), H;
|
|
6450
6451
|
}
|
|
6451
|
-
function
|
|
6452
|
+
function H(y) {
|
|
6452
6453
|
return ke(y) ? Pe(
|
|
6453
6454
|
e,
|
|
6454
6455
|
z,
|
|
@@ -7010,10 +7011,10 @@ function tm(e, t, n) {
|
|
|
7010
7011
|
const l = {
|
|
7011
7012
|
consume: D,
|
|
7012
7013
|
enter: P,
|
|
7013
|
-
exit:
|
|
7014
|
-
attempt:
|
|
7015
|
-
check:
|
|
7016
|
-
interrupt:
|
|
7014
|
+
exit: X,
|
|
7015
|
+
attempt: w(F),
|
|
7016
|
+
check: w(x),
|
|
7017
|
+
interrupt: w(x, {
|
|
7017
7018
|
interrupt: !0
|
|
7018
7019
|
})
|
|
7019
7020
|
}, c = {
|
|
@@ -7031,7 +7032,7 @@ function tm(e, t, n) {
|
|
|
7031
7032
|
let d = t.tokenize.call(c, l);
|
|
7032
7033
|
return t.resolveAll && i.push(t), c;
|
|
7033
7034
|
function f(Y) {
|
|
7034
|
-
return u = yt(u, Y), T(), u[u.length - 1] !== null ? [] : (
|
|
7035
|
+
return u = yt(u, Y), T(), u[u.length - 1] !== null ? [] : (V(t, 0), c.events = Li(i, c.events, c), c.events);
|
|
7035
7036
|
}
|
|
7036
7037
|
function p(Y, $) {
|
|
7037
7038
|
return rm(h(Y), $);
|
|
@@ -7040,13 +7041,13 @@ function tm(e, t, n) {
|
|
|
7040
7041
|
return nm(u, Y);
|
|
7041
7042
|
}
|
|
7042
7043
|
function b() {
|
|
7043
|
-
const { line: Y, column: $, offset:
|
|
7044
|
+
const { line: Y, column: $, offset: k, _index: I, _bufferIndex: L } = r;
|
|
7044
7045
|
return {
|
|
7045
7046
|
line: Y,
|
|
7046
7047
|
column: $,
|
|
7047
|
-
offset:
|
|
7048
|
+
offset: k,
|
|
7048
7049
|
_index: I,
|
|
7049
|
-
_bufferIndex:
|
|
7050
|
+
_bufferIndex: L
|
|
7050
7051
|
};
|
|
7051
7052
|
}
|
|
7052
7053
|
function m(Y) {
|
|
@@ -7070,23 +7071,23 @@ function tm(e, t, n) {
|
|
|
7070
7071
|
ki(Y) ? (r.line++, r.column = 1, r.offset += Y === -3 ? 2 : 1, te()) : Y !== -1 && (r.column++, r.offset++), r._bufferIndex < 0 ? r._index++ : (r._bufferIndex++, r._bufferIndex === u[r._index].length && (r._bufferIndex = -1, r._index++)), c.previous = Y;
|
|
7071
7072
|
}
|
|
7072
7073
|
function P(Y, $) {
|
|
7073
|
-
const
|
|
7074
|
-
return
|
|
7074
|
+
const k = $ || {};
|
|
7075
|
+
return k.type = Y, k.start = b(), c.events.push(["enter", k, c]), s.push(k), k;
|
|
7075
7076
|
}
|
|
7076
|
-
function
|
|
7077
|
+
function X(Y) {
|
|
7077
7078
|
const $ = s.pop();
|
|
7078
7079
|
return $.end = b(), c.events.push(["exit", $, c]), $;
|
|
7079
7080
|
}
|
|
7080
|
-
function
|
|
7081
|
-
|
|
7081
|
+
function F(Y, $) {
|
|
7082
|
+
V(Y, $.from);
|
|
7082
7083
|
}
|
|
7083
7084
|
function x(Y, $) {
|
|
7084
7085
|
$.restore();
|
|
7085
7086
|
}
|
|
7086
|
-
function
|
|
7087
|
-
return
|
|
7088
|
-
function
|
|
7089
|
-
let
|
|
7087
|
+
function w(Y, $) {
|
|
7088
|
+
return k;
|
|
7089
|
+
function k(I, L, B) {
|
|
7090
|
+
let W, H, z, y;
|
|
7090
7091
|
return Array.isArray(I) ? ae(I) : "tokenize" in I ? (
|
|
7091
7092
|
// @ts-expect-error Looks like a construct.
|
|
7092
7093
|
ae([I])
|
|
@@ -7104,7 +7105,7 @@ function tm(e, t, n) {
|
|
|
7104
7105
|
}
|
|
7105
7106
|
}
|
|
7106
7107
|
function ae(pe) {
|
|
7107
|
-
return
|
|
7108
|
+
return W = pe, H = 0, pe.length === 0 ? B : v(pe[H]);
|
|
7108
7109
|
}
|
|
7109
7110
|
function v(pe) {
|
|
7110
7111
|
return Se;
|
|
@@ -7121,14 +7122,14 @@ function tm(e, t, n) {
|
|
|
7121
7122
|
}
|
|
7122
7123
|
}
|
|
7123
7124
|
function se(pe) {
|
|
7124
|
-
return Y(z, y),
|
|
7125
|
+
return Y(z, y), L;
|
|
7125
7126
|
}
|
|
7126
7127
|
function _e(pe) {
|
|
7127
|
-
return y.restore(), ++
|
|
7128
|
+
return y.restore(), ++H < W.length ? v(W[H]) : B;
|
|
7128
7129
|
}
|
|
7129
7130
|
}
|
|
7130
7131
|
}
|
|
7131
|
-
function
|
|
7132
|
+
function V(Y, $) {
|
|
7132
7133
|
Y.resolveAll && !i.includes(Y) && i.push(Y), Y.resolve && Mt(
|
|
7133
7134
|
c.events,
|
|
7134
7135
|
$,
|
|
@@ -7137,13 +7138,13 @@ function tm(e, t, n) {
|
|
|
7137
7138
|
), Y.resolveTo && (c.events = Y.resolveTo(c.events, c));
|
|
7138
7139
|
}
|
|
7139
7140
|
function q() {
|
|
7140
|
-
const Y = b(), $ = c.previous,
|
|
7141
|
+
const Y = b(), $ = c.previous, k = c.currentConstruct, I = c.events.length, L = Array.from(s);
|
|
7141
7142
|
return {
|
|
7142
|
-
restore:
|
|
7143
|
+
restore: B,
|
|
7143
7144
|
from: I
|
|
7144
7145
|
};
|
|
7145
|
-
function
|
|
7146
|
-
r = Y, c.previous = $, c.currentConstruct =
|
|
7146
|
+
function B() {
|
|
7147
|
+
r = Y, c.previous = $, c.currentConstruct = k, c.events.length = I, s = L, te();
|
|
7147
7148
|
}
|
|
7148
7149
|
}
|
|
7149
7150
|
function te() {
|
|
@@ -7426,7 +7427,7 @@ function _m(e) {
|
|
|
7426
7427
|
},
|
|
7427
7428
|
exit: {
|
|
7428
7429
|
atxHeading: d(),
|
|
7429
|
-
atxHeadingSequence:
|
|
7430
|
+
atxHeadingSequence: w,
|
|
7430
7431
|
autolink: d(),
|
|
7431
7432
|
autolinkEmail: Ie,
|
|
7432
7433
|
autolinkProtocol: ze,
|
|
@@ -7441,25 +7442,25 @@ function _m(e) {
|
|
|
7441
7442
|
codeFencedFenceMeta: T,
|
|
7442
7443
|
codeFlowValue: $,
|
|
7443
7444
|
codeIndented: d(P),
|
|
7444
|
-
codeText: d(
|
|
7445
|
+
codeText: d(W),
|
|
7445
7446
|
codeTextData: $,
|
|
7446
7447
|
data: $,
|
|
7447
7448
|
definition: d(),
|
|
7448
7449
|
definitionDestinationString: x,
|
|
7449
|
-
definitionLabelString:
|
|
7450
|
-
definitionTitleString:
|
|
7450
|
+
definitionLabelString: X,
|
|
7451
|
+
definitionTitleString: F,
|
|
7451
7452
|
emphasis: d(),
|
|
7452
7453
|
hardBreakEscape: d(I),
|
|
7453
7454
|
hardBreakTrailing: d(I),
|
|
7454
|
-
htmlFlow: d(
|
|
7455
|
+
htmlFlow: d(L),
|
|
7455
7456
|
htmlFlowData: $,
|
|
7456
|
-
htmlText: d(
|
|
7457
|
+
htmlText: d(B),
|
|
7457
7458
|
htmlTextData: $,
|
|
7458
7459
|
image: d(z),
|
|
7459
7460
|
label: ne,
|
|
7460
7461
|
labelText: y,
|
|
7461
|
-
lineEnding:
|
|
7462
|
-
link: d(
|
|
7462
|
+
lineEnding: k,
|
|
7463
|
+
link: d(H),
|
|
7463
7464
|
listItem: d(),
|
|
7464
7465
|
listOrdered: d(),
|
|
7465
7466
|
listUnordered: d(),
|
|
@@ -7470,7 +7471,7 @@ function _m(e) {
|
|
|
7470
7471
|
resource: se,
|
|
7471
7472
|
setextHeading: d(te),
|
|
7472
7473
|
setextHeadingLineSequence: q,
|
|
7473
|
-
setextHeadingText:
|
|
7474
|
+
setextHeadingText: V,
|
|
7474
7475
|
strong: d(),
|
|
7475
7476
|
thematicBreak: d()
|
|
7476
7477
|
}
|
|
@@ -7478,7 +7479,7 @@ function _m(e) {
|
|
|
7478
7479
|
Ll(t, (e || {}).mdastExtensions || []);
|
|
7479
7480
|
const n = {};
|
|
7480
7481
|
return r;
|
|
7481
|
-
function r(
|
|
7482
|
+
function r(U) {
|
|
7482
7483
|
let K = {
|
|
7483
7484
|
type: "root",
|
|
7484
7485
|
children: []
|
|
@@ -7495,24 +7496,24 @@ function _m(e) {
|
|
|
7495
7496
|
getData: u
|
|
7496
7497
|
}, Ee = [];
|
|
7497
7498
|
let he = -1;
|
|
7498
|
-
for (; ++he <
|
|
7499
|
-
if (
|
|
7500
|
-
if (
|
|
7499
|
+
for (; ++he < U.length; )
|
|
7500
|
+
if (U[he][1].type === "listOrdered" || U[he][1].type === "listUnordered")
|
|
7501
|
+
if (U[he][0] === "enter")
|
|
7501
7502
|
Ee.push(he);
|
|
7502
7503
|
else {
|
|
7503
7504
|
const Qe = Ee.pop();
|
|
7504
|
-
he = a(
|
|
7505
|
+
he = a(U, Qe, he);
|
|
7505
7506
|
}
|
|
7506
|
-
for (he = -1; ++he <
|
|
7507
|
-
const Qe = t[
|
|
7508
|
-
kl.call(Qe,
|
|
7507
|
+
for (he = -1; ++he < U.length; ) {
|
|
7508
|
+
const Qe = t[U[he][0]];
|
|
7509
|
+
kl.call(Qe, U[he][1].type) && Qe[U[he][1].type].call(
|
|
7509
7510
|
Object.assign(
|
|
7510
7511
|
{
|
|
7511
|
-
sliceSerialize:
|
|
7512
|
+
sliceSerialize: U[he][2].sliceSerialize
|
|
7512
7513
|
},
|
|
7513
7514
|
ie
|
|
7514
7515
|
),
|
|
7515
|
-
|
|
7516
|
+
U[he][1]
|
|
7516
7517
|
);
|
|
7517
7518
|
}
|
|
7518
7519
|
if (ie.tokenStack.length > 0) {
|
|
@@ -7521,14 +7522,14 @@ function _m(e) {
|
|
|
7521
7522
|
}
|
|
7522
7523
|
for (K.position = {
|
|
7523
7524
|
start: Vt(
|
|
7524
|
-
|
|
7525
|
+
U.length > 0 ? U[0][1].start : {
|
|
7525
7526
|
line: 1,
|
|
7526
7527
|
column: 1,
|
|
7527
7528
|
offset: 0
|
|
7528
7529
|
}
|
|
7529
7530
|
),
|
|
7530
7531
|
end: Vt(
|
|
7531
|
-
|
|
7532
|
+
U.length > 0 ? U[U.length - 2][1].end : {
|
|
7532
7533
|
line: 1,
|
|
7533
7534
|
column: 1,
|
|
7534
7535
|
offset: 0
|
|
@@ -7538,24 +7539,24 @@ function _m(e) {
|
|
|
7538
7539
|
K = t.transforms[he](K) || K;
|
|
7539
7540
|
return K;
|
|
7540
7541
|
}
|
|
7541
|
-
function a(
|
|
7542
|
+
function a(U, K, ie) {
|
|
7542
7543
|
let Ee = K - 1, he = -1, Qe = !1, ut, Ve, Be, rt;
|
|
7543
7544
|
for (; ++Ee <= ie; ) {
|
|
7544
|
-
const He =
|
|
7545
|
+
const He = U[Ee];
|
|
7545
7546
|
if (He[1].type === "listUnordered" || He[1].type === "listOrdered" || He[1].type === "blockQuote" ? (He[0] === "enter" ? he++ : he--, rt = void 0) : He[1].type === "lineEndingBlank" ? He[0] === "enter" && (ut && !rt && !he && !Be && (Be = Ee), rt = void 0) : He[1].type === "linePrefix" || He[1].type === "listItemValue" || He[1].type === "listItemMarker" || He[1].type === "listItemPrefix" || He[1].type === "listItemPrefixWhitespace" || (rt = void 0), !he && He[0] === "enter" && He[1].type === "listItemPrefix" || he === -1 && He[0] === "exit" && (He[1].type === "listUnordered" || He[1].type === "listOrdered")) {
|
|
7546
7547
|
if (ut) {
|
|
7547
7548
|
let ot = Ee;
|
|
7548
7549
|
for (Ve = void 0; ot--; ) {
|
|
7549
|
-
const vt =
|
|
7550
|
+
const vt = U[ot];
|
|
7550
7551
|
if (vt[1].type === "lineEnding" || vt[1].type === "lineEndingBlank") {
|
|
7551
7552
|
if (vt[0] === "exit") continue;
|
|
7552
|
-
Ve && (
|
|
7553
|
+
Ve && (U[Ve][1].type = "lineEndingBlank", Qe = !0), vt[1].type = "lineEnding", Ve = ot;
|
|
7553
7554
|
} else if (!(vt[1].type === "linePrefix" || vt[1].type === "blockQuotePrefix" || vt[1].type === "blockQuotePrefixWhitespace" || vt[1].type === "blockQuoteMarker" || vt[1].type === "listItemIndent")) break;
|
|
7554
7555
|
}
|
|
7555
7556
|
Be && (!Ve || Be < Ve) && (ut._spread = !0), ut.end = Object.assign(
|
|
7556
7557
|
{},
|
|
7557
|
-
Ve ?
|
|
7558
|
-
),
|
|
7558
|
+
Ve ? U[Ve][1].start : He[1].end
|
|
7559
|
+
), U.splice(Ve || Ee, 0, ["exit", ut, He[2]]), Ee++, ie++;
|
|
7559
7560
|
}
|
|
7560
7561
|
He[1].type === "listItemPrefix" && (ut = {
|
|
7561
7562
|
type: "listItem",
|
|
@@ -7563,21 +7564,21 @@ function _m(e) {
|
|
|
7563
7564
|
start: Object.assign({}, He[1].start),
|
|
7564
7565
|
// @ts-expect-error: we’ll add `end` in a second.
|
|
7565
7566
|
end: void 0
|
|
7566
|
-
},
|
|
7567
|
+
}, U.splice(Ee, 0, ["enter", ut, He[2]]), Ee++, ie++, Be = void 0, rt = !0);
|
|
7567
7568
|
}
|
|
7568
7569
|
}
|
|
7569
|
-
return
|
|
7570
|
+
return U[K][1]._spread = Qe, ie;
|
|
7570
7571
|
}
|
|
7571
|
-
function i(
|
|
7572
|
-
n[
|
|
7572
|
+
function i(U, K) {
|
|
7573
|
+
n[U] = K;
|
|
7573
7574
|
}
|
|
7574
|
-
function u(
|
|
7575
|
-
return n[
|
|
7575
|
+
function u(U) {
|
|
7576
|
+
return n[U];
|
|
7576
7577
|
}
|
|
7577
|
-
function s(
|
|
7578
|
+
function s(U, K) {
|
|
7578
7579
|
return ie;
|
|
7579
7580
|
function ie(Ee) {
|
|
7580
|
-
c.call(this,
|
|
7581
|
+
c.call(this, U(Ee), Ee), K && K.call(this, Ee);
|
|
7581
7582
|
}
|
|
7582
7583
|
}
|
|
7583
7584
|
function l() {
|
|
@@ -7586,28 +7587,28 @@ function _m(e) {
|
|
|
7586
7587
|
children: []
|
|
7587
7588
|
});
|
|
7588
7589
|
}
|
|
7589
|
-
function c(
|
|
7590
|
-
return this.stack[this.stack.length - 1].children.push(
|
|
7590
|
+
function c(U, K, ie) {
|
|
7591
|
+
return this.stack[this.stack.length - 1].children.push(U), this.stack.push(U), this.tokenStack.push([K, ie]), U.position = {
|
|
7591
7592
|
start: Vt(K.start)
|
|
7592
|
-
},
|
|
7593
|
+
}, U;
|
|
7593
7594
|
}
|
|
7594
|
-
function d(
|
|
7595
|
+
function d(U) {
|
|
7595
7596
|
return K;
|
|
7596
7597
|
function K(ie) {
|
|
7597
|
-
|
|
7598
|
+
U && U.call(this, ie), f.call(this, ie);
|
|
7598
7599
|
}
|
|
7599
7600
|
}
|
|
7600
|
-
function f(
|
|
7601
|
+
function f(U, K) {
|
|
7601
7602
|
const ie = this.stack.pop(), Ee = this.tokenStack.pop();
|
|
7602
7603
|
if (Ee)
|
|
7603
|
-
Ee[0].type !==
|
|
7604
|
+
Ee[0].type !== U.type && (K ? K.call(this, U, Ee[0]) : (Ee[1] || To).call(this, U, Ee[0]));
|
|
7604
7605
|
else throw new Error(
|
|
7605
|
-
"Cannot close `" +
|
|
7606
|
-
start:
|
|
7607
|
-
end:
|
|
7606
|
+
"Cannot close `" + U.type + "` (" + tr({
|
|
7607
|
+
start: U.start,
|
|
7608
|
+
end: U.end
|
|
7608
7609
|
}) + "): it’s not open"
|
|
7609
7610
|
);
|
|
7610
|
-
return ie.position.end = Vt(
|
|
7611
|
+
return ie.position.end = Vt(U.end), ie;
|
|
7611
7612
|
}
|
|
7612
7613
|
function p() {
|
|
7613
7614
|
return fp(this.stack.pop());
|
|
@@ -7615,134 +7616,134 @@ function _m(e) {
|
|
|
7615
7616
|
function h() {
|
|
7616
7617
|
i("expectingFirstListItemValue", !0);
|
|
7617
7618
|
}
|
|
7618
|
-
function b(
|
|
7619
|
+
function b(U) {
|
|
7619
7620
|
if (u("expectingFirstListItemValue")) {
|
|
7620
7621
|
const K = this.stack[this.stack.length - 2];
|
|
7621
|
-
K.start = Number.parseInt(this.sliceSerialize(
|
|
7622
|
+
K.start = Number.parseInt(this.sliceSerialize(U), 10), i("expectingFirstListItemValue");
|
|
7622
7623
|
}
|
|
7623
7624
|
}
|
|
7624
7625
|
function m() {
|
|
7625
|
-
const
|
|
7626
|
-
K.lang =
|
|
7626
|
+
const U = this.resume(), K = this.stack[this.stack.length - 1];
|
|
7627
|
+
K.lang = U;
|
|
7627
7628
|
}
|
|
7628
7629
|
function T() {
|
|
7629
|
-
const
|
|
7630
|
-
K.meta =
|
|
7630
|
+
const U = this.resume(), K = this.stack[this.stack.length - 1];
|
|
7631
|
+
K.meta = U;
|
|
7631
7632
|
}
|
|
7632
7633
|
function g() {
|
|
7633
7634
|
u("flowCodeInside") || (this.buffer(), i("flowCodeInside", !0));
|
|
7634
7635
|
}
|
|
7635
7636
|
function D() {
|
|
7636
|
-
const
|
|
7637
|
-
K.value =
|
|
7637
|
+
const U = this.resume(), K = this.stack[this.stack.length - 1];
|
|
7638
|
+
K.value = U.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g, ""), i("flowCodeInside");
|
|
7638
7639
|
}
|
|
7639
7640
|
function P() {
|
|
7640
|
-
const
|
|
7641
|
-
K.value =
|
|
7641
|
+
const U = this.resume(), K = this.stack[this.stack.length - 1];
|
|
7642
|
+
K.value = U.replace(/(\r?\n|\r)$/g, "");
|
|
7642
7643
|
}
|
|
7643
|
-
function
|
|
7644
|
+
function X(U) {
|
|
7644
7645
|
const K = this.resume(), ie = this.stack[this.stack.length - 1];
|
|
7645
7646
|
ie.label = K, ie.identifier = Cn(
|
|
7646
|
-
this.sliceSerialize(
|
|
7647
|
+
this.sliceSerialize(U)
|
|
7647
7648
|
).toLowerCase();
|
|
7648
7649
|
}
|
|
7649
|
-
function
|
|
7650
|
-
const
|
|
7651
|
-
K.title =
|
|
7650
|
+
function F() {
|
|
7651
|
+
const U = this.resume(), K = this.stack[this.stack.length - 1];
|
|
7652
|
+
K.title = U;
|
|
7652
7653
|
}
|
|
7653
7654
|
function x() {
|
|
7654
|
-
const
|
|
7655
|
-
K.url =
|
|
7655
|
+
const U = this.resume(), K = this.stack[this.stack.length - 1];
|
|
7656
|
+
K.url = U;
|
|
7656
7657
|
}
|
|
7657
|
-
function
|
|
7658
|
+
function w(U) {
|
|
7658
7659
|
const K = this.stack[this.stack.length - 1];
|
|
7659
7660
|
if (!K.depth) {
|
|
7660
|
-
const ie = this.sliceSerialize(
|
|
7661
|
+
const ie = this.sliceSerialize(U).length;
|
|
7661
7662
|
K.depth = ie;
|
|
7662
7663
|
}
|
|
7663
7664
|
}
|
|
7664
|
-
function
|
|
7665
|
+
function V() {
|
|
7665
7666
|
i("setextHeadingSlurpLineEnding", !0);
|
|
7666
7667
|
}
|
|
7667
|
-
function q(
|
|
7668
|
+
function q(U) {
|
|
7668
7669
|
const K = this.stack[this.stack.length - 1];
|
|
7669
|
-
K.depth = this.sliceSerialize(
|
|
7670
|
+
K.depth = this.sliceSerialize(U).charCodeAt(0) === 61 ? 1 : 2;
|
|
7670
7671
|
}
|
|
7671
7672
|
function te() {
|
|
7672
7673
|
i("setextHeadingSlurpLineEnding");
|
|
7673
7674
|
}
|
|
7674
|
-
function Y(
|
|
7675
|
+
function Y(U) {
|
|
7675
7676
|
const K = this.stack[this.stack.length - 1];
|
|
7676
7677
|
let ie = K.children[K.children.length - 1];
|
|
7677
7678
|
(!ie || ie.type !== "text") && (ie = Fe(), ie.position = {
|
|
7678
|
-
start: Vt(
|
|
7679
|
+
start: Vt(U.start)
|
|
7679
7680
|
}, K.children.push(ie)), this.stack.push(ie);
|
|
7680
7681
|
}
|
|
7681
|
-
function $(
|
|
7682
|
+
function $(U) {
|
|
7682
7683
|
const K = this.stack.pop();
|
|
7683
|
-
K.value += this.sliceSerialize(
|
|
7684
|
+
K.value += this.sliceSerialize(U), K.position.end = Vt(U.end);
|
|
7684
7685
|
}
|
|
7685
|
-
function
|
|
7686
|
+
function k(U) {
|
|
7686
7687
|
const K = this.stack[this.stack.length - 1];
|
|
7687
7688
|
if (u("atHardBreak")) {
|
|
7688
7689
|
const ie = K.children[K.children.length - 1];
|
|
7689
|
-
ie.position.end = Vt(
|
|
7690
|
+
ie.position.end = Vt(U.end), i("atHardBreak");
|
|
7690
7691
|
return;
|
|
7691
7692
|
}
|
|
7692
|
-
!u("setextHeadingSlurpLineEnding") && t.canContainEols.includes(K.type) && (Y.call(this,
|
|
7693
|
+
!u("setextHeadingSlurpLineEnding") && t.canContainEols.includes(K.type) && (Y.call(this, U), $.call(this, U));
|
|
7693
7694
|
}
|
|
7694
7695
|
function I() {
|
|
7695
7696
|
i("atHardBreak", !0);
|
|
7696
7697
|
}
|
|
7697
|
-
function
|
|
7698
|
-
const
|
|
7699
|
-
K.value =
|
|
7698
|
+
function L() {
|
|
7699
|
+
const U = this.resume(), K = this.stack[this.stack.length - 1];
|
|
7700
|
+
K.value = U;
|
|
7700
7701
|
}
|
|
7701
|
-
function
|
|
7702
|
-
const
|
|
7703
|
-
K.value =
|
|
7702
|
+
function B() {
|
|
7703
|
+
const U = this.resume(), K = this.stack[this.stack.length - 1];
|
|
7704
|
+
K.value = U;
|
|
7704
7705
|
}
|
|
7705
|
-
function
|
|
7706
|
-
const
|
|
7707
|
-
K.value =
|
|
7706
|
+
function W() {
|
|
7707
|
+
const U = this.resume(), K = this.stack[this.stack.length - 1];
|
|
7708
|
+
K.value = U;
|
|
7708
7709
|
}
|
|
7709
|
-
function
|
|
7710
|
-
const
|
|
7710
|
+
function H() {
|
|
7711
|
+
const U = this.stack[this.stack.length - 1];
|
|
7711
7712
|
if (u("inReference")) {
|
|
7712
7713
|
const K = u("referenceType") || "shortcut";
|
|
7713
|
-
|
|
7714
|
+
U.type += "Reference", U.referenceType = K, delete U.url, delete U.title;
|
|
7714
7715
|
} else
|
|
7715
|
-
delete
|
|
7716
|
+
delete U.identifier, delete U.label;
|
|
7716
7717
|
i("referenceType");
|
|
7717
7718
|
}
|
|
7718
7719
|
function z() {
|
|
7719
|
-
const
|
|
7720
|
+
const U = this.stack[this.stack.length - 1];
|
|
7720
7721
|
if (u("inReference")) {
|
|
7721
7722
|
const K = u("referenceType") || "shortcut";
|
|
7722
|
-
|
|
7723
|
+
U.type += "Reference", U.referenceType = K, delete U.url, delete U.title;
|
|
7723
7724
|
} else
|
|
7724
|
-
delete
|
|
7725
|
+
delete U.identifier, delete U.label;
|
|
7725
7726
|
i("referenceType");
|
|
7726
7727
|
}
|
|
7727
|
-
function y(
|
|
7728
|
-
const K = this.sliceSerialize(
|
|
7728
|
+
function y(U) {
|
|
7729
|
+
const K = this.sliceSerialize(U), ie = this.stack[this.stack.length - 2];
|
|
7729
7730
|
ie.label = Em(K), ie.identifier = Cn(K).toLowerCase();
|
|
7730
7731
|
}
|
|
7731
7732
|
function ne() {
|
|
7732
|
-
const
|
|
7733
|
+
const U = this.stack[this.stack.length - 1], K = this.resume(), ie = this.stack[this.stack.length - 1];
|
|
7733
7734
|
if (i("inReference", !0), ie.type === "link") {
|
|
7734
|
-
const Ee =
|
|
7735
|
+
const Ee = U.children;
|
|
7735
7736
|
ie.children = Ee;
|
|
7736
7737
|
} else
|
|
7737
7738
|
ie.alt = K;
|
|
7738
7739
|
}
|
|
7739
7740
|
function ae() {
|
|
7740
|
-
const
|
|
7741
|
-
K.url =
|
|
7741
|
+
const U = this.resume(), K = this.stack[this.stack.length - 1];
|
|
7742
|
+
K.url = U;
|
|
7742
7743
|
}
|
|
7743
7744
|
function v() {
|
|
7744
|
-
const
|
|
7745
|
-
K.title =
|
|
7745
|
+
const U = this.resume(), K = this.stack[this.stack.length - 1];
|
|
7746
|
+
K.title = U;
|
|
7746
7747
|
}
|
|
7747
7748
|
function se() {
|
|
7748
7749
|
i("inReference");
|
|
@@ -7750,34 +7751,34 @@ function _m(e) {
|
|
|
7750
7751
|
function _e() {
|
|
7751
7752
|
i("referenceType", "collapsed");
|
|
7752
7753
|
}
|
|
7753
|
-
function pe(
|
|
7754
|
+
function pe(U) {
|
|
7754
7755
|
const K = this.resume(), ie = this.stack[this.stack.length - 1];
|
|
7755
7756
|
ie.label = K, ie.identifier = Cn(
|
|
7756
|
-
this.sliceSerialize(
|
|
7757
|
+
this.sliceSerialize(U)
|
|
7757
7758
|
).toLowerCase(), i("referenceType", "full");
|
|
7758
7759
|
}
|
|
7759
|
-
function Se(
|
|
7760
|
-
i("characterReferenceType",
|
|
7760
|
+
function Se(U) {
|
|
7761
|
+
i("characterReferenceType", U.type);
|
|
7761
7762
|
}
|
|
7762
|
-
function Oe(
|
|
7763
|
-
const K = this.sliceSerialize(
|
|
7763
|
+
function Oe(U) {
|
|
7764
|
+
const K = this.sliceSerialize(U), ie = u("characterReferenceType");
|
|
7764
7765
|
let Ee;
|
|
7765
7766
|
ie ? (Ee = Nl(
|
|
7766
7767
|
K,
|
|
7767
7768
|
ie === "characterReferenceMarkerNumeric" ? 10 : 16
|
|
7768
7769
|
), i("characterReferenceType")) : Ee = wi(K);
|
|
7769
7770
|
const he = this.stack.pop();
|
|
7770
|
-
he.value += Ee, he.position.end = Vt(
|
|
7771
|
+
he.value += Ee, he.position.end = Vt(U.end);
|
|
7771
7772
|
}
|
|
7772
|
-
function ze(
|
|
7773
|
-
$.call(this,
|
|
7773
|
+
function ze(U) {
|
|
7774
|
+
$.call(this, U);
|
|
7774
7775
|
const K = this.stack[this.stack.length - 1];
|
|
7775
|
-
K.url = this.sliceSerialize(
|
|
7776
|
+
K.url = this.sliceSerialize(U);
|
|
7776
7777
|
}
|
|
7777
|
-
function Ie(
|
|
7778
|
-
$.call(this,
|
|
7778
|
+
function Ie(U) {
|
|
7779
|
+
$.call(this, U);
|
|
7779
7780
|
const K = this.stack[this.stack.length - 1];
|
|
7780
|
-
K.url = "mailto:" + this.sliceSerialize(
|
|
7781
|
+
K.url = "mailto:" + this.sliceSerialize(U);
|
|
7781
7782
|
}
|
|
7782
7783
|
function nt() {
|
|
7783
7784
|
return {
|
|
@@ -7848,19 +7849,19 @@ function _m(e) {
|
|
|
7848
7849
|
children: []
|
|
7849
7850
|
};
|
|
7850
7851
|
}
|
|
7851
|
-
function be(
|
|
7852
|
+
function be(U) {
|
|
7852
7853
|
return {
|
|
7853
7854
|
type: "list",
|
|
7854
|
-
ordered:
|
|
7855
|
+
ordered: U.type === "listOrdered",
|
|
7855
7856
|
start: null,
|
|
7856
|
-
spread:
|
|
7857
|
+
spread: U._spread,
|
|
7857
7858
|
children: []
|
|
7858
7859
|
};
|
|
7859
7860
|
}
|
|
7860
|
-
function Me(
|
|
7861
|
+
function Me(U) {
|
|
7861
7862
|
return {
|
|
7862
7863
|
type: "listItem",
|
|
7863
|
-
spread:
|
|
7864
|
+
spread: U._spread,
|
|
7864
7865
|
checked: null,
|
|
7865
7866
|
children: []
|
|
7866
7867
|
};
|
|
@@ -10009,78 +10010,78 @@ function L2() {
|
|
|
10009
10010
|
if (!m) return [];
|
|
10010
10011
|
T = T || {};
|
|
10011
10012
|
var g = 1, D = 1;
|
|
10012
|
-
function P(
|
|
10013
|
-
var I =
|
|
10013
|
+
function P(k) {
|
|
10014
|
+
var I = k.match(t);
|
|
10014
10015
|
I && (g += I.length);
|
|
10015
|
-
var
|
|
10016
|
-
D = ~
|
|
10016
|
+
var L = k.lastIndexOf(l);
|
|
10017
|
+
D = ~L ? k.length - L : D + k.length;
|
|
10017
10018
|
}
|
|
10018
|
-
function
|
|
10019
|
-
var
|
|
10019
|
+
function X() {
|
|
10020
|
+
var k = { line: g, column: D };
|
|
10020
10021
|
return function(I) {
|
|
10021
|
-
return I.position = new
|
|
10022
|
+
return I.position = new F(k), V(), I;
|
|
10022
10023
|
};
|
|
10023
10024
|
}
|
|
10024
|
-
function
|
|
10025
|
-
this.start =
|
|
10025
|
+
function F(k) {
|
|
10026
|
+
this.start = k, this.end = { line: g, column: D }, this.source = T.source;
|
|
10026
10027
|
}
|
|
10027
|
-
|
|
10028
|
-
function x(
|
|
10028
|
+
F.prototype.content = m;
|
|
10029
|
+
function x(k) {
|
|
10029
10030
|
var I = new Error(
|
|
10030
|
-
T.source + ":" + g + ":" + D + ": " +
|
|
10031
|
+
T.source + ":" + g + ":" + D + ": " + k
|
|
10031
10032
|
);
|
|
10032
|
-
if (I.reason =
|
|
10033
|
+
if (I.reason = k, I.filename = T.source, I.line = g, I.column = D, I.source = m, !T.silent) throw I;
|
|
10033
10034
|
}
|
|
10034
|
-
function k
|
|
10035
|
-
var I =
|
|
10035
|
+
function w(k) {
|
|
10036
|
+
var I = k.exec(m);
|
|
10036
10037
|
if (I) {
|
|
10037
|
-
var
|
|
10038
|
-
return P(
|
|
10038
|
+
var L = I[0];
|
|
10039
|
+
return P(L), m = m.slice(L.length), I;
|
|
10039
10040
|
}
|
|
10040
10041
|
}
|
|
10041
|
-
function
|
|
10042
|
-
|
|
10042
|
+
function V() {
|
|
10043
|
+
w(n);
|
|
10043
10044
|
}
|
|
10044
|
-
function q(
|
|
10045
|
+
function q(k) {
|
|
10045
10046
|
var I;
|
|
10046
|
-
for (
|
|
10047
|
-
I !== !1 &&
|
|
10048
|
-
return
|
|
10047
|
+
for (k = k || []; I = te(); )
|
|
10048
|
+
I !== !1 && k.push(I);
|
|
10049
|
+
return k;
|
|
10049
10050
|
}
|
|
10050
10051
|
function te() {
|
|
10051
|
-
var
|
|
10052
|
+
var k = X();
|
|
10052
10053
|
if (!(c != m.charAt(0) || d != m.charAt(1))) {
|
|
10053
10054
|
for (var I = 2; f != m.charAt(I) && (d != m.charAt(I) || c != m.charAt(I + 1)); )
|
|
10054
10055
|
++I;
|
|
10055
10056
|
if (I += 2, f === m.charAt(I - 1))
|
|
10056
10057
|
return x("End of comment missing");
|
|
10057
|
-
var
|
|
10058
|
-
return D += 2, P(
|
|
10058
|
+
var L = m.slice(2, I - 2);
|
|
10059
|
+
return D += 2, P(L), m = m.slice(I), D += 2, k({
|
|
10059
10060
|
type: p,
|
|
10060
|
-
comment:
|
|
10061
|
+
comment: L
|
|
10061
10062
|
});
|
|
10062
10063
|
}
|
|
10063
10064
|
}
|
|
10064
10065
|
function Y() {
|
|
10065
|
-
var
|
|
10066
|
+
var k = X(), I = w(r);
|
|
10066
10067
|
if (I) {
|
|
10067
|
-
if (te(), !
|
|
10068
|
-
var
|
|
10068
|
+
if (te(), !w(a)) return x("property missing ':'");
|
|
10069
|
+
var L = w(i), B = k({
|
|
10069
10070
|
type: h,
|
|
10070
10071
|
property: b(I[0].replace(e, f)),
|
|
10071
|
-
value:
|
|
10072
|
+
value: L ? b(L[0].replace(e, f)) : f
|
|
10072
10073
|
});
|
|
10073
|
-
return
|
|
10074
|
+
return w(u), B;
|
|
10074
10075
|
}
|
|
10075
10076
|
}
|
|
10076
10077
|
function $() {
|
|
10077
|
-
var
|
|
10078
|
-
q(
|
|
10078
|
+
var k = [];
|
|
10079
|
+
q(k);
|
|
10079
10080
|
for (var I; I = Y(); )
|
|
10080
|
-
I !== !1 && (
|
|
10081
|
-
return
|
|
10081
|
+
I !== !1 && (k.push(I), q(k));
|
|
10082
|
+
return k;
|
|
10082
10083
|
}
|
|
10083
|
-
return
|
|
10084
|
+
return V(), $();
|
|
10084
10085
|
};
|
|
10085
10086
|
function b(m) {
|
|
10086
10087
|
return m ? m.replace(s, f) : f;
|
|
@@ -13302,10 +13303,10 @@ function Ac(e) {
|
|
|
13302
13303
|
function Sc(e) {
|
|
13303
13304
|
return e >= 64976 && e <= 65007 || Pg.has(e);
|
|
13304
13305
|
}
|
|
13305
|
-
var
|
|
13306
|
+
var j;
|
|
13306
13307
|
(function(e) {
|
|
13307
13308
|
e.controlCharacterInInputStream = "control-character-in-input-stream", e.noncharacterInInputStream = "noncharacter-in-input-stream", e.surrogateInInputStream = "surrogate-in-input-stream", e.nonVoidHtmlElementStartTagWithTrailingSolidus = "non-void-html-element-start-tag-with-trailing-solidus", e.endTagWithAttributes = "end-tag-with-attributes", e.endTagWithTrailingSolidus = "end-tag-with-trailing-solidus", e.unexpectedSolidusInTag = "unexpected-solidus-in-tag", e.unexpectedNullCharacter = "unexpected-null-character", e.unexpectedQuestionMarkInsteadOfTagName = "unexpected-question-mark-instead-of-tag-name", e.invalidFirstCharacterOfTagName = "invalid-first-character-of-tag-name", e.unexpectedEqualsSignBeforeAttributeName = "unexpected-equals-sign-before-attribute-name", e.missingEndTagName = "missing-end-tag-name", e.unexpectedCharacterInAttributeName = "unexpected-character-in-attribute-name", e.unknownNamedCharacterReference = "unknown-named-character-reference", e.missingSemicolonAfterCharacterReference = "missing-semicolon-after-character-reference", e.unexpectedCharacterAfterDoctypeSystemIdentifier = "unexpected-character-after-doctype-system-identifier", e.unexpectedCharacterInUnquotedAttributeValue = "unexpected-character-in-unquoted-attribute-value", e.eofBeforeTagName = "eof-before-tag-name", e.eofInTag = "eof-in-tag", e.missingAttributeValue = "missing-attribute-value", e.missingWhitespaceBetweenAttributes = "missing-whitespace-between-attributes", e.missingWhitespaceAfterDoctypePublicKeyword = "missing-whitespace-after-doctype-public-keyword", e.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers = "missing-whitespace-between-doctype-public-and-system-identifiers", e.missingWhitespaceAfterDoctypeSystemKeyword = "missing-whitespace-after-doctype-system-keyword", e.missingQuoteBeforeDoctypePublicIdentifier = "missing-quote-before-doctype-public-identifier", e.missingQuoteBeforeDoctypeSystemIdentifier = "missing-quote-before-doctype-system-identifier", e.missingDoctypePublicIdentifier = "missing-doctype-public-identifier", e.missingDoctypeSystemIdentifier = "missing-doctype-system-identifier", e.abruptDoctypePublicIdentifier = "abrupt-doctype-public-identifier", e.abruptDoctypeSystemIdentifier = "abrupt-doctype-system-identifier", e.cdataInHtmlContent = "cdata-in-html-content", e.incorrectlyOpenedComment = "incorrectly-opened-comment", e.eofInScriptHtmlCommentLikeText = "eof-in-script-html-comment-like-text", e.eofInDoctype = "eof-in-doctype", e.nestedComment = "nested-comment", e.abruptClosingOfEmptyComment = "abrupt-closing-of-empty-comment", e.eofInComment = "eof-in-comment", e.incorrectlyClosedComment = "incorrectly-closed-comment", e.eofInCdata = "eof-in-cdata", e.absenceOfDigitsInNumericCharacterReference = "absence-of-digits-in-numeric-character-reference", e.nullCharacterReference = "null-character-reference", e.surrogateCharacterReference = "surrogate-character-reference", e.characterReferenceOutsideUnicodeRange = "character-reference-outside-unicode-range", e.controlCharacterReference = "control-character-reference", e.noncharacterCharacterReference = "noncharacter-character-reference", e.missingWhitespaceBeforeDoctypeName = "missing-whitespace-before-doctype-name", e.missingDoctypeName = "missing-doctype-name", e.invalidCharacterSequenceAfterDoctypeName = "invalid-character-sequence-after-doctype-name", e.duplicateAttribute = "duplicate-attribute", e.nonConformingDoctype = "non-conforming-doctype", e.missingDoctype = "missing-doctype", e.misplacedDoctype = "misplaced-doctype", e.endTagWithoutMatchingOpenElement = "end-tag-without-matching-open-element", e.closingOfElementWithOpenChildElements = "closing-of-element-with-open-child-elements", e.disallowedContentInNoscriptInHead = "disallowed-content-in-noscript-in-head", e.openElementsLeftAfterEof = "open-elements-left-after-eof", e.abandonedHeadElementChild = "abandoned-head-element-child", e.misplacedStartTagForHeadElement = "misplaced-start-tag-for-head-element", e.nestedNoscriptInHead = "nested-noscript-in-head", e.eofInElementThatCanContainOnlyText = "eof-in-element-that-can-contain-only-text";
|
|
13308
|
-
})(
|
|
13309
|
+
})(j || (j = {}));
|
|
13309
13310
|
const Bg = 65536;
|
|
13310
13311
|
class Hg {
|
|
13311
13312
|
constructor(t) {
|
|
@@ -13343,7 +13344,7 @@ class Hg {
|
|
|
13343
13344
|
return this.pos++, this._addGap(), Fg(t, n);
|
|
13344
13345
|
} else if (!this.lastChunkWritten)
|
|
13345
13346
|
return this.endOfChunkHit = !0, E.EOF;
|
|
13346
|
-
return this._err(
|
|
13347
|
+
return this._err(j.surrogateInInputStream), t;
|
|
13347
13348
|
}
|
|
13348
13349
|
willDropParsedChunk() {
|
|
13349
13350
|
return this.pos > this.bufferWaterline;
|
|
@@ -13381,7 +13382,7 @@ class Hg {
|
|
|
13381
13382
|
return t === E.CARRIAGE_RETURN ? (this.isEol = !0, this.skipNextNewLine = !0, E.LINE_FEED) : t === E.LINE_FEED && (this.isEol = !0, this.skipNextNewLine) ? (this.line--, this.skipNextNewLine = !1, this._addGap(), this.advance()) : (this.skipNextNewLine = !1, Cc(t) && (t = this._processSurrogate(t)), this.handler.onParseError === null || t > 31 && t < 127 || t === E.LINE_FEED || t === E.CARRIAGE_RETURN || t > 159 && t < 64976 || this._checkForProblematicCharacters(t), t);
|
|
13382
13383
|
}
|
|
13383
13384
|
_checkForProblematicCharacters(t) {
|
|
13384
|
-
Ac(t) ? this._err(
|
|
13385
|
+
Ac(t) ? this._err(j.controlCharacterInInputStream) : Sc(t) && this._err(j.noncharacterInInputStream);
|
|
13385
13386
|
}
|
|
13386
13387
|
retreat(t) {
|
|
13387
13388
|
for (this.pos -= t; this.pos < this.lastGapPos; )
|
|
@@ -13674,10 +13675,10 @@ function Gg(e, t, n, r) {
|
|
|
13674
13675
|
}
|
|
13675
13676
|
return -1;
|
|
13676
13677
|
}
|
|
13677
|
-
var
|
|
13678
|
+
var G;
|
|
13678
13679
|
(function(e) {
|
|
13679
13680
|
e.HTML = "http://www.w3.org/1999/xhtml", e.MATHML = "http://www.w3.org/1998/Math/MathML", e.SVG = "http://www.w3.org/2000/svg", e.XLINK = "http://www.w3.org/1999/xlink", e.XML = "http://www.w3.org/XML/1998/namespace", e.XMLNS = "http://www.w3.org/2000/xmlns/";
|
|
13680
|
-
})(
|
|
13681
|
+
})(G || (G = {}));
|
|
13681
13682
|
var on;
|
|
13682
13683
|
(function(e) {
|
|
13683
13684
|
e.TYPE = "type", e.ACTION = "action", e.ENCODING = "encoding", e.PROMPT = "prompt", e.NAME = "name", e.COLOR = "color", e.FACE = "face", e.SIZE = "size";
|
|
@@ -13824,7 +13825,7 @@ function Dn(e) {
|
|
|
13824
13825
|
return (t = Xg.get(e)) !== null && t !== void 0 ? t : o.UNKNOWN;
|
|
13825
13826
|
}
|
|
13826
13827
|
const Q = o, Kg = {
|
|
13827
|
-
[
|
|
13828
|
+
[G.HTML]: /* @__PURE__ */ new Set([
|
|
13828
13829
|
Q.ADDRESS,
|
|
13829
13830
|
Q.APPLET,
|
|
13830
13831
|
Q.AREA,
|
|
@@ -13907,11 +13908,11 @@ const Q = o, Kg = {
|
|
|
13907
13908
|
Q.WBR,
|
|
13908
13909
|
Q.XMP
|
|
13909
13910
|
]),
|
|
13910
|
-
[
|
|
13911
|
-
[
|
|
13912
|
-
[
|
|
13913
|
-
[
|
|
13914
|
-
[
|
|
13911
|
+
[G.MATHML]: /* @__PURE__ */ new Set([Q.MI, Q.MO, Q.MN, Q.MS, Q.MTEXT, Q.ANNOTATION_XML]),
|
|
13912
|
+
[G.SVG]: /* @__PURE__ */ new Set([Q.TITLE, Q.FOREIGN_OBJECT, Q.DESC]),
|
|
13913
|
+
[G.XLINK]: /* @__PURE__ */ new Set(),
|
|
13914
|
+
[G.XML]: /* @__PURE__ */ new Set(),
|
|
13915
|
+
[G.XMLNS]: /* @__PURE__ */ new Set()
|
|
13915
13916
|
}, yi = /* @__PURE__ */ new Set([Q.H1, Q.H2, Q.H3, Q.H4, Q.H5, Q.H6]);
|
|
13916
13917
|
R.STYLE, R.SCRIPT, R.XMP, R.IFRAME, R.NOEMBED, R.NOFRAMES, R.PLAINTEXT;
|
|
13917
13918
|
var C;
|
|
@@ -13951,7 +13952,7 @@ function Qo(e) {
|
|
|
13951
13952
|
return vc(e) || e === E.SOLIDUS || e === E.GREATER_THAN_SIGN;
|
|
13952
13953
|
}
|
|
13953
13954
|
function Jg(e) {
|
|
13954
|
-
return e === E.NULL ?
|
|
13955
|
+
return e === E.NULL ? j.nullCharacterReference : e > 1114111 ? j.characterReferenceOutsideUnicodeRange : Cc(e) ? j.surrogateCharacterReference : Sc(e) ? j.noncharacterCharacterReference : Ac(e) || e === E.CARRIAGE_RETURN ? j.controlCharacterReference : null;
|
|
13955
13956
|
}
|
|
13956
13957
|
class eb {
|
|
13957
13958
|
constructor(t, n) {
|
|
@@ -13959,10 +13960,10 @@ class eb {
|
|
|
13959
13960
|
this.preprocessor.pos = this.entityStartPos + a - 1, this._flushCodePointConsumedAsCharacterReference(r);
|
|
13960
13961
|
}, n.onParseError ? {
|
|
13961
13962
|
missingSemicolonAfterCharacterReference: () => {
|
|
13962
|
-
this._err(
|
|
13963
|
+
this._err(j.missingSemicolonAfterCharacterReference, 1);
|
|
13963
13964
|
},
|
|
13964
13965
|
absenceOfDigitsInNumericCharacterReference: (r) => {
|
|
13965
|
-
this._err(
|
|
13966
|
+
this._err(j.absenceOfDigitsInNumericCharacterReference, this.entityStartPos - this.preprocessor.pos + r);
|
|
13966
13967
|
},
|
|
13967
13968
|
validateNumericCharacterReference: (r) => {
|
|
13968
13969
|
const a = Jg(r);
|
|
@@ -14090,7 +14091,7 @@ class eb {
|
|
|
14090
14091
|
a[this.currentAttr.name] = this.currentLocation, this._leaveAttrValue();
|
|
14091
14092
|
}
|
|
14092
14093
|
} else
|
|
14093
|
-
this._err(
|
|
14094
|
+
this._err(j.duplicateAttribute);
|
|
14094
14095
|
}
|
|
14095
14096
|
_leaveAttrValue() {
|
|
14096
14097
|
this.currentLocation && (this.currentLocation.endLine = this.preprocessor.line, this.currentLocation.endCol = this.preprocessor.col, this.currentLocation.endOffset = this.preprocessor.offset);
|
|
@@ -14101,7 +14102,7 @@ class eb {
|
|
|
14101
14102
|
}
|
|
14102
14103
|
emitCurrentTagToken() {
|
|
14103
14104
|
const t = this.currentToken;
|
|
14104
|
-
this.prepareToken(t), t.tagID = Dn(t.tagName), t.type === me.START_TAG ? (this.lastStartTagName = t.tagName, this.handler.onStartTag(t)) : (t.attrs.length > 0 && this._err(
|
|
14105
|
+
this.prepareToken(t), t.tagID = Dn(t.tagName), t.type === me.START_TAG ? (this.lastStartTagName = t.tagName, this.handler.onStartTag(t)) : (t.attrs.length > 0 && this._err(j.endTagWithAttributes), t.selfClosing && this._err(j.endTagWithTrailingSolidus), this.handler.onEndTag(t)), this.preprocessor.dropParsedChunk();
|
|
14105
14106
|
}
|
|
14106
14107
|
emitCurrentComment(t) {
|
|
14107
14108
|
this.prepareToken(t), this.handler.onComment(t), this.preprocessor.dropParsedChunk();
|
|
@@ -14482,7 +14483,7 @@ class eb {
|
|
|
14482
14483
|
break;
|
|
14483
14484
|
}
|
|
14484
14485
|
case E.NULL: {
|
|
14485
|
-
this._err(
|
|
14486
|
+
this._err(j.unexpectedNullCharacter), this._emitCodePoint(t);
|
|
14486
14487
|
break;
|
|
14487
14488
|
}
|
|
14488
14489
|
case E.EOF: {
|
|
@@ -14506,7 +14507,7 @@ class eb {
|
|
|
14506
14507
|
break;
|
|
14507
14508
|
}
|
|
14508
14509
|
case E.NULL: {
|
|
14509
|
-
this._err(
|
|
14510
|
+
this._err(j.unexpectedNullCharacter), this._emitChars(qe);
|
|
14510
14511
|
break;
|
|
14511
14512
|
}
|
|
14512
14513
|
case E.EOF: {
|
|
@@ -14526,7 +14527,7 @@ class eb {
|
|
|
14526
14527
|
break;
|
|
14527
14528
|
}
|
|
14528
14529
|
case E.NULL: {
|
|
14529
|
-
this._err(
|
|
14530
|
+
this._err(j.unexpectedNullCharacter), this._emitChars(qe);
|
|
14530
14531
|
break;
|
|
14531
14532
|
}
|
|
14532
14533
|
case E.EOF: {
|
|
@@ -14546,7 +14547,7 @@ class eb {
|
|
|
14546
14547
|
break;
|
|
14547
14548
|
}
|
|
14548
14549
|
case E.NULL: {
|
|
14549
|
-
this._err(
|
|
14550
|
+
this._err(j.unexpectedNullCharacter), this._emitChars(qe);
|
|
14550
14551
|
break;
|
|
14551
14552
|
}
|
|
14552
14553
|
case E.EOF: {
|
|
@@ -14562,7 +14563,7 @@ class eb {
|
|
|
14562
14563
|
_statePlaintext(t) {
|
|
14563
14564
|
switch (t) {
|
|
14564
14565
|
case E.NULL: {
|
|
14565
|
-
this._err(
|
|
14566
|
+
this._err(j.unexpectedNullCharacter), this._emitChars(qe);
|
|
14566
14567
|
break;
|
|
14567
14568
|
}
|
|
14568
14569
|
case E.EOF: {
|
|
@@ -14589,15 +14590,15 @@ class eb {
|
|
|
14589
14590
|
break;
|
|
14590
14591
|
}
|
|
14591
14592
|
case E.QUESTION_MARK: {
|
|
14592
|
-
this._err(
|
|
14593
|
+
this._err(j.unexpectedQuestionMarkInsteadOfTagName), this._createCommentToken(1), this.state = C.BOGUS_COMMENT, this._stateBogusComment(t);
|
|
14593
14594
|
break;
|
|
14594
14595
|
}
|
|
14595
14596
|
case E.EOF: {
|
|
14596
|
-
this._err(
|
|
14597
|
+
this._err(j.eofBeforeTagName), this._emitChars("<"), this._emitEOFToken();
|
|
14597
14598
|
break;
|
|
14598
14599
|
}
|
|
14599
14600
|
default:
|
|
14600
|
-
this._err(
|
|
14601
|
+
this._err(j.invalidFirstCharacterOfTagName), this._emitChars("<"), this.state = C.DATA, this._stateData(t);
|
|
14601
14602
|
}
|
|
14602
14603
|
}
|
|
14603
14604
|
// End tag open state
|
|
@@ -14608,15 +14609,15 @@ class eb {
|
|
|
14608
14609
|
else
|
|
14609
14610
|
switch (t) {
|
|
14610
14611
|
case E.GREATER_THAN_SIGN: {
|
|
14611
|
-
this._err(
|
|
14612
|
+
this._err(j.missingEndTagName), this.state = C.DATA;
|
|
14612
14613
|
break;
|
|
14613
14614
|
}
|
|
14614
14615
|
case E.EOF: {
|
|
14615
|
-
this._err(
|
|
14616
|
+
this._err(j.eofBeforeTagName), this._emitChars("</"), this._emitEOFToken();
|
|
14616
14617
|
break;
|
|
14617
14618
|
}
|
|
14618
14619
|
default:
|
|
14619
|
-
this._err(
|
|
14620
|
+
this._err(j.invalidFirstCharacterOfTagName), this._createCommentToken(2), this.state = C.BOGUS_COMMENT, this._stateBogusComment(t);
|
|
14620
14621
|
}
|
|
14621
14622
|
}
|
|
14622
14623
|
// Tag name state
|
|
@@ -14640,11 +14641,11 @@ class eb {
|
|
|
14640
14641
|
break;
|
|
14641
14642
|
}
|
|
14642
14643
|
case E.NULL: {
|
|
14643
|
-
this._err(
|
|
14644
|
+
this._err(j.unexpectedNullCharacter), n.tagName += qe;
|
|
14644
14645
|
break;
|
|
14645
14646
|
}
|
|
14646
14647
|
case E.EOF: {
|
|
14647
|
-
this._err(
|
|
14648
|
+
this._err(j.eofInTag), this._emitEOFToken();
|
|
14648
14649
|
break;
|
|
14649
14650
|
}
|
|
14650
14651
|
default:
|
|
@@ -14749,11 +14750,11 @@ class eb {
|
|
|
14749
14750
|
break;
|
|
14750
14751
|
}
|
|
14751
14752
|
case E.NULL: {
|
|
14752
|
-
this._err(
|
|
14753
|
+
this._err(j.unexpectedNullCharacter), this._emitChars(qe);
|
|
14753
14754
|
break;
|
|
14754
14755
|
}
|
|
14755
14756
|
case E.EOF: {
|
|
14756
|
-
this._err(
|
|
14757
|
+
this._err(j.eofInScriptHtmlCommentLikeText), this._emitEOFToken();
|
|
14757
14758
|
break;
|
|
14758
14759
|
}
|
|
14759
14760
|
default:
|
|
@@ -14773,11 +14774,11 @@ class eb {
|
|
|
14773
14774
|
break;
|
|
14774
14775
|
}
|
|
14775
14776
|
case E.NULL: {
|
|
14776
|
-
this._err(
|
|
14777
|
+
this._err(j.unexpectedNullCharacter), this.state = C.SCRIPT_DATA_ESCAPED, this._emitChars(qe);
|
|
14777
14778
|
break;
|
|
14778
14779
|
}
|
|
14779
14780
|
case E.EOF: {
|
|
14780
|
-
this._err(
|
|
14781
|
+
this._err(j.eofInScriptHtmlCommentLikeText), this._emitEOFToken();
|
|
14781
14782
|
break;
|
|
14782
14783
|
}
|
|
14783
14784
|
default:
|
|
@@ -14801,11 +14802,11 @@ class eb {
|
|
|
14801
14802
|
break;
|
|
14802
14803
|
}
|
|
14803
14804
|
case E.NULL: {
|
|
14804
|
-
this._err(
|
|
14805
|
+
this._err(j.unexpectedNullCharacter), this.state = C.SCRIPT_DATA_ESCAPED, this._emitChars(qe);
|
|
14805
14806
|
break;
|
|
14806
14807
|
}
|
|
14807
14808
|
case E.EOF: {
|
|
14808
|
-
this._err(
|
|
14809
|
+
this._err(j.eofInScriptHtmlCommentLikeText), this._emitEOFToken();
|
|
14809
14810
|
break;
|
|
14810
14811
|
}
|
|
14811
14812
|
default:
|
|
@@ -14850,11 +14851,11 @@ class eb {
|
|
|
14850
14851
|
break;
|
|
14851
14852
|
}
|
|
14852
14853
|
case E.NULL: {
|
|
14853
|
-
this._err(
|
|
14854
|
+
this._err(j.unexpectedNullCharacter), this._emitChars(qe);
|
|
14854
14855
|
break;
|
|
14855
14856
|
}
|
|
14856
14857
|
case E.EOF: {
|
|
14857
|
-
this._err(
|
|
14858
|
+
this._err(j.eofInScriptHtmlCommentLikeText), this._emitEOFToken();
|
|
14858
14859
|
break;
|
|
14859
14860
|
}
|
|
14860
14861
|
default:
|
|
@@ -14874,11 +14875,11 @@ class eb {
|
|
|
14874
14875
|
break;
|
|
14875
14876
|
}
|
|
14876
14877
|
case E.NULL: {
|
|
14877
|
-
this._err(
|
|
14878
|
+
this._err(j.unexpectedNullCharacter), this.state = C.SCRIPT_DATA_DOUBLE_ESCAPED, this._emitChars(qe);
|
|
14878
14879
|
break;
|
|
14879
14880
|
}
|
|
14880
14881
|
case E.EOF: {
|
|
14881
|
-
this._err(
|
|
14882
|
+
this._err(j.eofInScriptHtmlCommentLikeText), this._emitEOFToken();
|
|
14882
14883
|
break;
|
|
14883
14884
|
}
|
|
14884
14885
|
default:
|
|
@@ -14902,11 +14903,11 @@ class eb {
|
|
|
14902
14903
|
break;
|
|
14903
14904
|
}
|
|
14904
14905
|
case E.NULL: {
|
|
14905
|
-
this._err(
|
|
14906
|
+
this._err(j.unexpectedNullCharacter), this.state = C.SCRIPT_DATA_DOUBLE_ESCAPED, this._emitChars(qe);
|
|
14906
14907
|
break;
|
|
14907
14908
|
}
|
|
14908
14909
|
case E.EOF: {
|
|
14909
|
-
this._err(
|
|
14910
|
+
this._err(j.eofInScriptHtmlCommentLikeText), this._emitEOFToken();
|
|
14910
14911
|
break;
|
|
14911
14912
|
}
|
|
14912
14913
|
default:
|
|
@@ -14944,7 +14945,7 @@ class eb {
|
|
|
14944
14945
|
break;
|
|
14945
14946
|
}
|
|
14946
14947
|
case E.EQUALS_SIGN: {
|
|
14947
|
-
this._err(
|
|
14948
|
+
this._err(j.unexpectedEqualsSignBeforeAttributeName), this._createAttr("="), this.state = C.ATTRIBUTE_NAME;
|
|
14948
14949
|
break;
|
|
14949
14950
|
}
|
|
14950
14951
|
default:
|
|
@@ -14972,11 +14973,11 @@ class eb {
|
|
|
14972
14973
|
case E.QUOTATION_MARK:
|
|
14973
14974
|
case E.APOSTROPHE:
|
|
14974
14975
|
case E.LESS_THAN_SIGN: {
|
|
14975
|
-
this._err(
|
|
14976
|
+
this._err(j.unexpectedCharacterInAttributeName), this.currentAttr.name += String.fromCodePoint(t);
|
|
14976
14977
|
break;
|
|
14977
14978
|
}
|
|
14978
14979
|
case E.NULL: {
|
|
14979
|
-
this._err(
|
|
14980
|
+
this._err(j.unexpectedNullCharacter), this.currentAttr.name += qe;
|
|
14980
14981
|
break;
|
|
14981
14982
|
}
|
|
14982
14983
|
default:
|
|
@@ -15005,7 +15006,7 @@ class eb {
|
|
|
15005
15006
|
break;
|
|
15006
15007
|
}
|
|
15007
15008
|
case E.EOF: {
|
|
15008
|
-
this._err(
|
|
15009
|
+
this._err(j.eofInTag), this._emitEOFToken();
|
|
15009
15010
|
break;
|
|
15010
15011
|
}
|
|
15011
15012
|
default:
|
|
@@ -15030,7 +15031,7 @@ class eb {
|
|
|
15030
15031
|
break;
|
|
15031
15032
|
}
|
|
15032
15033
|
case E.GREATER_THAN_SIGN: {
|
|
15033
|
-
this._err(
|
|
15034
|
+
this._err(j.missingAttributeValue), this.state = C.DATA, this.emitCurrentTagToken();
|
|
15034
15035
|
break;
|
|
15035
15036
|
}
|
|
15036
15037
|
default:
|
|
@@ -15050,11 +15051,11 @@ class eb {
|
|
|
15050
15051
|
break;
|
|
15051
15052
|
}
|
|
15052
15053
|
case E.NULL: {
|
|
15053
|
-
this._err(
|
|
15054
|
+
this._err(j.unexpectedNullCharacter), this.currentAttr.value += qe;
|
|
15054
15055
|
break;
|
|
15055
15056
|
}
|
|
15056
15057
|
case E.EOF: {
|
|
15057
|
-
this._err(
|
|
15058
|
+
this._err(j.eofInTag), this._emitEOFToken();
|
|
15058
15059
|
break;
|
|
15059
15060
|
}
|
|
15060
15061
|
default:
|
|
@@ -15074,11 +15075,11 @@ class eb {
|
|
|
15074
15075
|
break;
|
|
15075
15076
|
}
|
|
15076
15077
|
case E.NULL: {
|
|
15077
|
-
this._err(
|
|
15078
|
+
this._err(j.unexpectedNullCharacter), this.currentAttr.value += qe;
|
|
15078
15079
|
break;
|
|
15079
15080
|
}
|
|
15080
15081
|
case E.EOF: {
|
|
15081
|
-
this._err(
|
|
15082
|
+
this._err(j.eofInTag), this._emitEOFToken();
|
|
15082
15083
|
break;
|
|
15083
15084
|
}
|
|
15084
15085
|
default:
|
|
@@ -15105,7 +15106,7 @@ class eb {
|
|
|
15105
15106
|
break;
|
|
15106
15107
|
}
|
|
15107
15108
|
case E.NULL: {
|
|
15108
|
-
this._err(
|
|
15109
|
+
this._err(j.unexpectedNullCharacter), this.currentAttr.value += qe;
|
|
15109
15110
|
break;
|
|
15110
15111
|
}
|
|
15111
15112
|
case E.QUOTATION_MARK:
|
|
@@ -15113,11 +15114,11 @@ class eb {
|
|
|
15113
15114
|
case E.LESS_THAN_SIGN:
|
|
15114
15115
|
case E.EQUALS_SIGN:
|
|
15115
15116
|
case E.GRAVE_ACCENT: {
|
|
15116
|
-
this._err(
|
|
15117
|
+
this._err(j.unexpectedCharacterInUnquotedAttributeValue), this.currentAttr.value += String.fromCodePoint(t);
|
|
15117
15118
|
break;
|
|
15118
15119
|
}
|
|
15119
15120
|
case E.EOF: {
|
|
15120
|
-
this._err(
|
|
15121
|
+
this._err(j.eofInTag), this._emitEOFToken();
|
|
15121
15122
|
break;
|
|
15122
15123
|
}
|
|
15123
15124
|
default:
|
|
@@ -15144,11 +15145,11 @@ class eb {
|
|
|
15144
15145
|
break;
|
|
15145
15146
|
}
|
|
15146
15147
|
case E.EOF: {
|
|
15147
|
-
this._err(
|
|
15148
|
+
this._err(j.eofInTag), this._emitEOFToken();
|
|
15148
15149
|
break;
|
|
15149
15150
|
}
|
|
15150
15151
|
default:
|
|
15151
|
-
this._err(
|
|
15152
|
+
this._err(j.missingWhitespaceBetweenAttributes), this.state = C.BEFORE_ATTRIBUTE_NAME, this._stateBeforeAttributeName(t);
|
|
15152
15153
|
}
|
|
15153
15154
|
}
|
|
15154
15155
|
// Self-closing start tag state
|
|
@@ -15161,11 +15162,11 @@ class eb {
|
|
|
15161
15162
|
break;
|
|
15162
15163
|
}
|
|
15163
15164
|
case E.EOF: {
|
|
15164
|
-
this._err(
|
|
15165
|
+
this._err(j.eofInTag), this._emitEOFToken();
|
|
15165
15166
|
break;
|
|
15166
15167
|
}
|
|
15167
15168
|
default:
|
|
15168
|
-
this._err(
|
|
15169
|
+
this._err(j.unexpectedSolidusInTag), this.state = C.BEFORE_ATTRIBUTE_NAME, this._stateBeforeAttributeName(t);
|
|
15169
15170
|
}
|
|
15170
15171
|
}
|
|
15171
15172
|
// Bogus comment state
|
|
@@ -15182,7 +15183,7 @@ class eb {
|
|
|
15182
15183
|
break;
|
|
15183
15184
|
}
|
|
15184
15185
|
case E.NULL: {
|
|
15185
|
-
this._err(
|
|
15186
|
+
this._err(j.unexpectedNullCharacter), n.data += qe;
|
|
15186
15187
|
break;
|
|
15187
15188
|
}
|
|
15188
15189
|
default:
|
|
@@ -15192,7 +15193,7 @@ class eb {
|
|
|
15192
15193
|
// Markup declaration open state
|
|
15193
15194
|
//------------------------------------------------------------------
|
|
15194
15195
|
_stateMarkupDeclarationOpen(t) {
|
|
15195
|
-
this._consumeSequenceIfMatch(lt.DASH_DASH, !0) ? (this._createCommentToken(lt.DASH_DASH.length + 1), this.state = C.COMMENT_START) : this._consumeSequenceIfMatch(lt.DOCTYPE, !1) ? (this.currentLocation = this.getCurrentLocation(lt.DOCTYPE.length + 1), this.state = C.DOCTYPE) : this._consumeSequenceIfMatch(lt.CDATA_START, !0) ? this.inForeignNode ? this.state = C.CDATA_SECTION : (this._err(
|
|
15196
|
+
this._consumeSequenceIfMatch(lt.DASH_DASH, !0) ? (this._createCommentToken(lt.DASH_DASH.length + 1), this.state = C.COMMENT_START) : this._consumeSequenceIfMatch(lt.DOCTYPE, !1) ? (this.currentLocation = this.getCurrentLocation(lt.DOCTYPE.length + 1), this.state = C.DOCTYPE) : this._consumeSequenceIfMatch(lt.CDATA_START, !0) ? this.inForeignNode ? this.state = C.CDATA_SECTION : (this._err(j.cdataInHtmlContent), this._createCommentToken(lt.CDATA_START.length + 1), this.currentToken.data = "[CDATA[", this.state = C.BOGUS_COMMENT) : this._ensureHibernation() || (this._err(j.incorrectlyOpenedComment), this._createCommentToken(2), this.state = C.BOGUS_COMMENT, this._stateBogusComment(t));
|
|
15196
15197
|
}
|
|
15197
15198
|
// Comment start state
|
|
15198
15199
|
//------------------------------------------------------------------
|
|
@@ -15203,7 +15204,7 @@ class eb {
|
|
|
15203
15204
|
break;
|
|
15204
15205
|
}
|
|
15205
15206
|
case E.GREATER_THAN_SIGN: {
|
|
15206
|
-
this._err(
|
|
15207
|
+
this._err(j.abruptClosingOfEmptyComment), this.state = C.DATA;
|
|
15207
15208
|
const n = this.currentToken;
|
|
15208
15209
|
this.emitCurrentComment(n);
|
|
15209
15210
|
break;
|
|
@@ -15222,11 +15223,11 @@ class eb {
|
|
|
15222
15223
|
break;
|
|
15223
15224
|
}
|
|
15224
15225
|
case E.GREATER_THAN_SIGN: {
|
|
15225
|
-
this._err(
|
|
15226
|
+
this._err(j.abruptClosingOfEmptyComment), this.state = C.DATA, this.emitCurrentComment(n);
|
|
15226
15227
|
break;
|
|
15227
15228
|
}
|
|
15228
15229
|
case E.EOF: {
|
|
15229
|
-
this._err(
|
|
15230
|
+
this._err(j.eofInComment), this.emitCurrentComment(n), this._emitEOFToken();
|
|
15230
15231
|
break;
|
|
15231
15232
|
}
|
|
15232
15233
|
default:
|
|
@@ -15247,11 +15248,11 @@ class eb {
|
|
|
15247
15248
|
break;
|
|
15248
15249
|
}
|
|
15249
15250
|
case E.NULL: {
|
|
15250
|
-
this._err(
|
|
15251
|
+
this._err(j.unexpectedNullCharacter), n.data += qe;
|
|
15251
15252
|
break;
|
|
15252
15253
|
}
|
|
15253
15254
|
case E.EOF: {
|
|
15254
|
-
this._err(
|
|
15255
|
+
this._err(j.eofInComment), this.emitCurrentComment(n), this._emitEOFToken();
|
|
15255
15256
|
break;
|
|
15256
15257
|
}
|
|
15257
15258
|
default:
|
|
@@ -15288,7 +15289,7 @@ class eb {
|
|
|
15288
15289
|
// Comment less-than sign bang dash dash state
|
|
15289
15290
|
//------------------------------------------------------------------
|
|
15290
15291
|
_stateCommentLessThanSignBangDashDash(t) {
|
|
15291
|
-
t !== E.GREATER_THAN_SIGN && t !== E.EOF && this._err(
|
|
15292
|
+
t !== E.GREATER_THAN_SIGN && t !== E.EOF && this._err(j.nestedComment), this.state = C.COMMENT_END, this._stateCommentEnd(t);
|
|
15292
15293
|
}
|
|
15293
15294
|
// Comment end dash state
|
|
15294
15295
|
//------------------------------------------------------------------
|
|
@@ -15300,7 +15301,7 @@ class eb {
|
|
|
15300
15301
|
break;
|
|
15301
15302
|
}
|
|
15302
15303
|
case E.EOF: {
|
|
15303
|
-
this._err(
|
|
15304
|
+
this._err(j.eofInComment), this.emitCurrentComment(n), this._emitEOFToken();
|
|
15304
15305
|
break;
|
|
15305
15306
|
}
|
|
15306
15307
|
default:
|
|
@@ -15325,7 +15326,7 @@ class eb {
|
|
|
15325
15326
|
break;
|
|
15326
15327
|
}
|
|
15327
15328
|
case E.EOF: {
|
|
15328
|
-
this._err(
|
|
15329
|
+
this._err(j.eofInComment), this.emitCurrentComment(n), this._emitEOFToken();
|
|
15329
15330
|
break;
|
|
15330
15331
|
}
|
|
15331
15332
|
default:
|
|
@@ -15342,11 +15343,11 @@ class eb {
|
|
|
15342
15343
|
break;
|
|
15343
15344
|
}
|
|
15344
15345
|
case E.GREATER_THAN_SIGN: {
|
|
15345
|
-
this._err(
|
|
15346
|
+
this._err(j.incorrectlyClosedComment), this.state = C.DATA, this.emitCurrentComment(n);
|
|
15346
15347
|
break;
|
|
15347
15348
|
}
|
|
15348
15349
|
case E.EOF: {
|
|
15349
|
-
this._err(
|
|
15350
|
+
this._err(j.eofInComment), this.emitCurrentComment(n), this._emitEOFToken();
|
|
15350
15351
|
break;
|
|
15351
15352
|
}
|
|
15352
15353
|
default:
|
|
@@ -15369,13 +15370,13 @@ class eb {
|
|
|
15369
15370
|
break;
|
|
15370
15371
|
}
|
|
15371
15372
|
case E.EOF: {
|
|
15372
|
-
this._err(
|
|
15373
|
+
this._err(j.eofInDoctype), this._createDoctypeToken(null);
|
|
15373
15374
|
const n = this.currentToken;
|
|
15374
15375
|
n.forceQuirks = !0, this.emitCurrentDoctype(n), this._emitEOFToken();
|
|
15375
15376
|
break;
|
|
15376
15377
|
}
|
|
15377
15378
|
default:
|
|
15378
|
-
this._err(
|
|
15379
|
+
this._err(j.missingWhitespaceBeforeDoctypeName), this.state = C.BEFORE_DOCTYPE_NAME, this._stateBeforeDoctypeName(t);
|
|
15379
15380
|
}
|
|
15380
15381
|
}
|
|
15381
15382
|
// Before DOCTYPE name state
|
|
@@ -15391,17 +15392,17 @@ class eb {
|
|
|
15391
15392
|
case E.FORM_FEED:
|
|
15392
15393
|
break;
|
|
15393
15394
|
case E.NULL: {
|
|
15394
|
-
this._err(
|
|
15395
|
+
this._err(j.unexpectedNullCharacter), this._createDoctypeToken(qe), this.state = C.DOCTYPE_NAME;
|
|
15395
15396
|
break;
|
|
15396
15397
|
}
|
|
15397
15398
|
case E.GREATER_THAN_SIGN: {
|
|
15398
|
-
this._err(
|
|
15399
|
+
this._err(j.missingDoctypeName), this._createDoctypeToken(null);
|
|
15399
15400
|
const n = this.currentToken;
|
|
15400
15401
|
n.forceQuirks = !0, this.emitCurrentDoctype(n), this.state = C.DATA;
|
|
15401
15402
|
break;
|
|
15402
15403
|
}
|
|
15403
15404
|
case E.EOF: {
|
|
15404
|
-
this._err(
|
|
15405
|
+
this._err(j.eofInDoctype), this._createDoctypeToken(null);
|
|
15405
15406
|
const n = this.currentToken;
|
|
15406
15407
|
n.forceQuirks = !0, this.emitCurrentDoctype(n), this._emitEOFToken();
|
|
15407
15408
|
break;
|
|
@@ -15427,11 +15428,11 @@ class eb {
|
|
|
15427
15428
|
break;
|
|
15428
15429
|
}
|
|
15429
15430
|
case E.NULL: {
|
|
15430
|
-
this._err(
|
|
15431
|
+
this._err(j.unexpectedNullCharacter), n.name += qe;
|
|
15431
15432
|
break;
|
|
15432
15433
|
}
|
|
15433
15434
|
case E.EOF: {
|
|
15434
|
-
this._err(
|
|
15435
|
+
this._err(j.eofInDoctype), n.forceQuirks = !0, this.emitCurrentDoctype(n), this._emitEOFToken();
|
|
15435
15436
|
break;
|
|
15436
15437
|
}
|
|
15437
15438
|
default:
|
|
@@ -15453,11 +15454,11 @@ class eb {
|
|
|
15453
15454
|
break;
|
|
15454
15455
|
}
|
|
15455
15456
|
case E.EOF: {
|
|
15456
|
-
this._err(
|
|
15457
|
+
this._err(j.eofInDoctype), n.forceQuirks = !0, this.emitCurrentDoctype(n), this._emitEOFToken();
|
|
15457
15458
|
break;
|
|
15458
15459
|
}
|
|
15459
15460
|
default:
|
|
15460
|
-
this._consumeSequenceIfMatch(lt.PUBLIC, !1) ? this.state = C.AFTER_DOCTYPE_PUBLIC_KEYWORD : this._consumeSequenceIfMatch(lt.SYSTEM, !1) ? this.state = C.AFTER_DOCTYPE_SYSTEM_KEYWORD : this._ensureHibernation() || (this._err(
|
|
15461
|
+
this._consumeSequenceIfMatch(lt.PUBLIC, !1) ? this.state = C.AFTER_DOCTYPE_PUBLIC_KEYWORD : this._consumeSequenceIfMatch(lt.SYSTEM, !1) ? this.state = C.AFTER_DOCTYPE_SYSTEM_KEYWORD : this._ensureHibernation() || (this._err(j.invalidCharacterSequenceAfterDoctypeName), n.forceQuirks = !0, this.state = C.BOGUS_DOCTYPE, this._stateBogusDoctype(t));
|
|
15461
15462
|
}
|
|
15462
15463
|
}
|
|
15463
15464
|
// After DOCTYPE public keyword state
|
|
@@ -15473,23 +15474,23 @@ class eb {
|
|
|
15473
15474
|
break;
|
|
15474
15475
|
}
|
|
15475
15476
|
case E.QUOTATION_MARK: {
|
|
15476
|
-
this._err(
|
|
15477
|
+
this._err(j.missingWhitespaceAfterDoctypePublicKeyword), n.publicId = "", this.state = C.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;
|
|
15477
15478
|
break;
|
|
15478
15479
|
}
|
|
15479
15480
|
case E.APOSTROPHE: {
|
|
15480
|
-
this._err(
|
|
15481
|
+
this._err(j.missingWhitespaceAfterDoctypePublicKeyword), n.publicId = "", this.state = C.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;
|
|
15481
15482
|
break;
|
|
15482
15483
|
}
|
|
15483
15484
|
case E.GREATER_THAN_SIGN: {
|
|
15484
|
-
this._err(
|
|
15485
|
+
this._err(j.missingDoctypePublicIdentifier), n.forceQuirks = !0, this.state = C.DATA, this.emitCurrentDoctype(n);
|
|
15485
15486
|
break;
|
|
15486
15487
|
}
|
|
15487
15488
|
case E.EOF: {
|
|
15488
|
-
this._err(
|
|
15489
|
+
this._err(j.eofInDoctype), n.forceQuirks = !0, this.emitCurrentDoctype(n), this._emitEOFToken();
|
|
15489
15490
|
break;
|
|
15490
15491
|
}
|
|
15491
15492
|
default:
|
|
15492
|
-
this._err(
|
|
15493
|
+
this._err(j.missingQuoteBeforeDoctypePublicIdentifier), n.forceQuirks = !0, this.state = C.BOGUS_DOCTYPE, this._stateBogusDoctype(t);
|
|
15493
15494
|
}
|
|
15494
15495
|
}
|
|
15495
15496
|
// Before DOCTYPE public identifier state
|
|
@@ -15511,15 +15512,15 @@ class eb {
|
|
|
15511
15512
|
break;
|
|
15512
15513
|
}
|
|
15513
15514
|
case E.GREATER_THAN_SIGN: {
|
|
15514
|
-
this._err(
|
|
15515
|
+
this._err(j.missingDoctypePublicIdentifier), n.forceQuirks = !0, this.state = C.DATA, this.emitCurrentDoctype(n);
|
|
15515
15516
|
break;
|
|
15516
15517
|
}
|
|
15517
15518
|
case E.EOF: {
|
|
15518
|
-
this._err(
|
|
15519
|
+
this._err(j.eofInDoctype), n.forceQuirks = !0, this.emitCurrentDoctype(n), this._emitEOFToken();
|
|
15519
15520
|
break;
|
|
15520
15521
|
}
|
|
15521
15522
|
default:
|
|
15522
|
-
this._err(
|
|
15523
|
+
this._err(j.missingQuoteBeforeDoctypePublicIdentifier), n.forceQuirks = !0, this.state = C.BOGUS_DOCTYPE, this._stateBogusDoctype(t);
|
|
15523
15524
|
}
|
|
15524
15525
|
}
|
|
15525
15526
|
// DOCTYPE public identifier (double-quoted) state
|
|
@@ -15532,15 +15533,15 @@ class eb {
|
|
|
15532
15533
|
break;
|
|
15533
15534
|
}
|
|
15534
15535
|
case E.NULL: {
|
|
15535
|
-
this._err(
|
|
15536
|
+
this._err(j.unexpectedNullCharacter), n.publicId += qe;
|
|
15536
15537
|
break;
|
|
15537
15538
|
}
|
|
15538
15539
|
case E.GREATER_THAN_SIGN: {
|
|
15539
|
-
this._err(
|
|
15540
|
+
this._err(j.abruptDoctypePublicIdentifier), n.forceQuirks = !0, this.emitCurrentDoctype(n), this.state = C.DATA;
|
|
15540
15541
|
break;
|
|
15541
15542
|
}
|
|
15542
15543
|
case E.EOF: {
|
|
15543
|
-
this._err(
|
|
15544
|
+
this._err(j.eofInDoctype), n.forceQuirks = !0, this.emitCurrentDoctype(n), this._emitEOFToken();
|
|
15544
15545
|
break;
|
|
15545
15546
|
}
|
|
15546
15547
|
default:
|
|
@@ -15557,15 +15558,15 @@ class eb {
|
|
|
15557
15558
|
break;
|
|
15558
15559
|
}
|
|
15559
15560
|
case E.NULL: {
|
|
15560
|
-
this._err(
|
|
15561
|
+
this._err(j.unexpectedNullCharacter), n.publicId += qe;
|
|
15561
15562
|
break;
|
|
15562
15563
|
}
|
|
15563
15564
|
case E.GREATER_THAN_SIGN: {
|
|
15564
|
-
this._err(
|
|
15565
|
+
this._err(j.abruptDoctypePublicIdentifier), n.forceQuirks = !0, this.emitCurrentDoctype(n), this.state = C.DATA;
|
|
15565
15566
|
break;
|
|
15566
15567
|
}
|
|
15567
15568
|
case E.EOF: {
|
|
15568
|
-
this._err(
|
|
15569
|
+
this._err(j.eofInDoctype), n.forceQuirks = !0, this.emitCurrentDoctype(n), this._emitEOFToken();
|
|
15569
15570
|
break;
|
|
15570
15571
|
}
|
|
15571
15572
|
default:
|
|
@@ -15589,19 +15590,19 @@ class eb {
|
|
|
15589
15590
|
break;
|
|
15590
15591
|
}
|
|
15591
15592
|
case E.QUOTATION_MARK: {
|
|
15592
|
-
this._err(
|
|
15593
|
+
this._err(j.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers), n.systemId = "", this.state = C.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;
|
|
15593
15594
|
break;
|
|
15594
15595
|
}
|
|
15595
15596
|
case E.APOSTROPHE: {
|
|
15596
|
-
this._err(
|
|
15597
|
+
this._err(j.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers), n.systemId = "", this.state = C.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;
|
|
15597
15598
|
break;
|
|
15598
15599
|
}
|
|
15599
15600
|
case E.EOF: {
|
|
15600
|
-
this._err(
|
|
15601
|
+
this._err(j.eofInDoctype), n.forceQuirks = !0, this.emitCurrentDoctype(n), this._emitEOFToken();
|
|
15601
15602
|
break;
|
|
15602
15603
|
}
|
|
15603
15604
|
default:
|
|
15604
|
-
this._err(
|
|
15605
|
+
this._err(j.missingQuoteBeforeDoctypeSystemIdentifier), n.forceQuirks = !0, this.state = C.BOGUS_DOCTYPE, this._stateBogusDoctype(t);
|
|
15605
15606
|
}
|
|
15606
15607
|
}
|
|
15607
15608
|
// Between DOCTYPE public and system identifiers state
|
|
@@ -15627,11 +15628,11 @@ class eb {
|
|
|
15627
15628
|
break;
|
|
15628
15629
|
}
|
|
15629
15630
|
case E.EOF: {
|
|
15630
|
-
this._err(
|
|
15631
|
+
this._err(j.eofInDoctype), n.forceQuirks = !0, this.emitCurrentDoctype(n), this._emitEOFToken();
|
|
15631
15632
|
break;
|
|
15632
15633
|
}
|
|
15633
15634
|
default:
|
|
15634
|
-
this._err(
|
|
15635
|
+
this._err(j.missingQuoteBeforeDoctypeSystemIdentifier), n.forceQuirks = !0, this.state = C.BOGUS_DOCTYPE, this._stateBogusDoctype(t);
|
|
15635
15636
|
}
|
|
15636
15637
|
}
|
|
15637
15638
|
// After DOCTYPE system keyword state
|
|
@@ -15647,23 +15648,23 @@ class eb {
|
|
|
15647
15648
|
break;
|
|
15648
15649
|
}
|
|
15649
15650
|
case E.QUOTATION_MARK: {
|
|
15650
|
-
this._err(
|
|
15651
|
+
this._err(j.missingWhitespaceAfterDoctypeSystemKeyword), n.systemId = "", this.state = C.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;
|
|
15651
15652
|
break;
|
|
15652
15653
|
}
|
|
15653
15654
|
case E.APOSTROPHE: {
|
|
15654
|
-
this._err(
|
|
15655
|
+
this._err(j.missingWhitespaceAfterDoctypeSystemKeyword), n.systemId = "", this.state = C.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;
|
|
15655
15656
|
break;
|
|
15656
15657
|
}
|
|
15657
15658
|
case E.GREATER_THAN_SIGN: {
|
|
15658
|
-
this._err(
|
|
15659
|
+
this._err(j.missingDoctypeSystemIdentifier), n.forceQuirks = !0, this.state = C.DATA, this.emitCurrentDoctype(n);
|
|
15659
15660
|
break;
|
|
15660
15661
|
}
|
|
15661
15662
|
case E.EOF: {
|
|
15662
|
-
this._err(
|
|
15663
|
+
this._err(j.eofInDoctype), n.forceQuirks = !0, this.emitCurrentDoctype(n), this._emitEOFToken();
|
|
15663
15664
|
break;
|
|
15664
15665
|
}
|
|
15665
15666
|
default:
|
|
15666
|
-
this._err(
|
|
15667
|
+
this._err(j.missingQuoteBeforeDoctypeSystemIdentifier), n.forceQuirks = !0, this.state = C.BOGUS_DOCTYPE, this._stateBogusDoctype(t);
|
|
15667
15668
|
}
|
|
15668
15669
|
}
|
|
15669
15670
|
// Before DOCTYPE system identifier state
|
|
@@ -15685,15 +15686,15 @@ class eb {
|
|
|
15685
15686
|
break;
|
|
15686
15687
|
}
|
|
15687
15688
|
case E.GREATER_THAN_SIGN: {
|
|
15688
|
-
this._err(
|
|
15689
|
+
this._err(j.missingDoctypeSystemIdentifier), n.forceQuirks = !0, this.state = C.DATA, this.emitCurrentDoctype(n);
|
|
15689
15690
|
break;
|
|
15690
15691
|
}
|
|
15691
15692
|
case E.EOF: {
|
|
15692
|
-
this._err(
|
|
15693
|
+
this._err(j.eofInDoctype), n.forceQuirks = !0, this.emitCurrentDoctype(n), this._emitEOFToken();
|
|
15693
15694
|
break;
|
|
15694
15695
|
}
|
|
15695
15696
|
default:
|
|
15696
|
-
this._err(
|
|
15697
|
+
this._err(j.missingQuoteBeforeDoctypeSystemIdentifier), n.forceQuirks = !0, this.state = C.BOGUS_DOCTYPE, this._stateBogusDoctype(t);
|
|
15697
15698
|
}
|
|
15698
15699
|
}
|
|
15699
15700
|
// DOCTYPE system identifier (double-quoted) state
|
|
@@ -15706,15 +15707,15 @@ class eb {
|
|
|
15706
15707
|
break;
|
|
15707
15708
|
}
|
|
15708
15709
|
case E.NULL: {
|
|
15709
|
-
this._err(
|
|
15710
|
+
this._err(j.unexpectedNullCharacter), n.systemId += qe;
|
|
15710
15711
|
break;
|
|
15711
15712
|
}
|
|
15712
15713
|
case E.GREATER_THAN_SIGN: {
|
|
15713
|
-
this._err(
|
|
15714
|
+
this._err(j.abruptDoctypeSystemIdentifier), n.forceQuirks = !0, this.emitCurrentDoctype(n), this.state = C.DATA;
|
|
15714
15715
|
break;
|
|
15715
15716
|
}
|
|
15716
15717
|
case E.EOF: {
|
|
15717
|
-
this._err(
|
|
15718
|
+
this._err(j.eofInDoctype), n.forceQuirks = !0, this.emitCurrentDoctype(n), this._emitEOFToken();
|
|
15718
15719
|
break;
|
|
15719
15720
|
}
|
|
15720
15721
|
default:
|
|
@@ -15731,15 +15732,15 @@ class eb {
|
|
|
15731
15732
|
break;
|
|
15732
15733
|
}
|
|
15733
15734
|
case E.NULL: {
|
|
15734
|
-
this._err(
|
|
15735
|
+
this._err(j.unexpectedNullCharacter), n.systemId += qe;
|
|
15735
15736
|
break;
|
|
15736
15737
|
}
|
|
15737
15738
|
case E.GREATER_THAN_SIGN: {
|
|
15738
|
-
this._err(
|
|
15739
|
+
this._err(j.abruptDoctypeSystemIdentifier), n.forceQuirks = !0, this.emitCurrentDoctype(n), this.state = C.DATA;
|
|
15739
15740
|
break;
|
|
15740
15741
|
}
|
|
15741
15742
|
case E.EOF: {
|
|
15742
|
-
this._err(
|
|
15743
|
+
this._err(j.eofInDoctype), n.forceQuirks = !0, this.emitCurrentDoctype(n), this._emitEOFToken();
|
|
15743
15744
|
break;
|
|
15744
15745
|
}
|
|
15745
15746
|
default:
|
|
@@ -15761,11 +15762,11 @@ class eb {
|
|
|
15761
15762
|
break;
|
|
15762
15763
|
}
|
|
15763
15764
|
case E.EOF: {
|
|
15764
|
-
this._err(
|
|
15765
|
+
this._err(j.eofInDoctype), n.forceQuirks = !0, this.emitCurrentDoctype(n), this._emitEOFToken();
|
|
15765
15766
|
break;
|
|
15766
15767
|
}
|
|
15767
15768
|
default:
|
|
15768
|
-
this._err(
|
|
15769
|
+
this._err(j.unexpectedCharacterAfterDoctypeSystemIdentifier), this.state = C.BOGUS_DOCTYPE, this._stateBogusDoctype(t);
|
|
15769
15770
|
}
|
|
15770
15771
|
}
|
|
15771
15772
|
// Bogus DOCTYPE state
|
|
@@ -15778,7 +15779,7 @@ class eb {
|
|
|
15778
15779
|
break;
|
|
15779
15780
|
}
|
|
15780
15781
|
case E.NULL: {
|
|
15781
|
-
this._err(
|
|
15782
|
+
this._err(j.unexpectedNullCharacter);
|
|
15782
15783
|
break;
|
|
15783
15784
|
}
|
|
15784
15785
|
case E.EOF: {
|
|
@@ -15796,7 +15797,7 @@ class eb {
|
|
|
15796
15797
|
break;
|
|
15797
15798
|
}
|
|
15798
15799
|
case E.EOF: {
|
|
15799
|
-
this._err(
|
|
15800
|
+
this._err(j.eofInCdata), this._emitEOFToken();
|
|
15800
15801
|
break;
|
|
15801
15802
|
}
|
|
15802
15803
|
default:
|
|
@@ -15840,7 +15841,7 @@ class eb {
|
|
|
15840
15841
|
// Ambiguos ampersand state
|
|
15841
15842
|
//------------------------------------------------------------------
|
|
15842
15843
|
_stateAmbiguousAmpersand(t) {
|
|
15843
|
-
Ko(t) ? this._flushCodePointConsumedAsCharacterReference(t) : (t === E.SEMICOLON && this._err(
|
|
15844
|
+
Ko(t) ? this._flushCodePointConsumedAsCharacterReference(t) : (t === E.SEMICOLON && this._err(j.unknownNamedCharacterReference), this.state = this.returnState, this._callState(t));
|
|
15844
15845
|
}
|
|
15845
15846
|
}
|
|
15846
15847
|
const Oc = /* @__PURE__ */ new Set([o.DD, o.DT, o.LI, o.OPTGROUP, o.OPTION, o.P, o.RB, o.RP, o.RT, o.RTC]), Zo = /* @__PURE__ */ new Set([
|
|
@@ -15877,7 +15878,7 @@ class ob {
|
|
|
15877
15878
|
}
|
|
15878
15879
|
//Update current element
|
|
15879
15880
|
_isInTemplate() {
|
|
15880
|
-
return this.currentTagId === o.TEMPLATE && this.treeAdapter.getNamespaceURI(this.current) ===
|
|
15881
|
+
return this.currentTagId === o.TEMPLATE && this.treeAdapter.getNamespaceURI(this.current) === G.HTML;
|
|
15881
15882
|
}
|
|
15882
15883
|
_updateCurrentElement() {
|
|
15883
15884
|
this.current = this.items[this.stackTop], this.currentTagId = this.tagIDs[this.stackTop];
|
|
@@ -15902,7 +15903,7 @@ class ob {
|
|
|
15902
15903
|
let n = this.stackTop + 1;
|
|
15903
15904
|
do
|
|
15904
15905
|
n = this.tagIDs.lastIndexOf(t, n - 1);
|
|
15905
|
-
while (n > 0 && this.treeAdapter.getNamespaceURI(this.items[n]) !==
|
|
15906
|
+
while (n > 0 && this.treeAdapter.getNamespaceURI(this.items[n]) !== G.HTML);
|
|
15906
15907
|
this.shortenToLength(Math.max(n, 0));
|
|
15907
15908
|
}
|
|
15908
15909
|
shortenToLength(t) {
|
|
@@ -15920,10 +15921,10 @@ class ob {
|
|
|
15920
15921
|
this.shortenToLength(Math.max(r, 0));
|
|
15921
15922
|
}
|
|
15922
15923
|
popUntilNumberedHeaderPopped() {
|
|
15923
|
-
this.popUntilPopped(yi,
|
|
15924
|
+
this.popUntilPopped(yi, G.HTML);
|
|
15924
15925
|
}
|
|
15925
15926
|
popUntilTableCellPopped() {
|
|
15926
|
-
this.popUntilPopped(ub,
|
|
15927
|
+
this.popUntilPopped(ub, G.HTML);
|
|
15927
15928
|
}
|
|
15928
15929
|
popAllUpToHtmlElement() {
|
|
15929
15930
|
this.tmplCount = 0, this.shortenToLength(1);
|
|
@@ -15939,13 +15940,13 @@ class ob {
|
|
|
15939
15940
|
this.shortenToLength(r + 1);
|
|
15940
15941
|
}
|
|
15941
15942
|
clearBackToTableContext() {
|
|
15942
|
-
this.clearBackTo(ib,
|
|
15943
|
+
this.clearBackTo(ib, G.HTML);
|
|
15943
15944
|
}
|
|
15944
15945
|
clearBackToTableBodyContext() {
|
|
15945
|
-
this.clearBackTo(ab,
|
|
15946
|
+
this.clearBackTo(ab, G.HTML);
|
|
15946
15947
|
}
|
|
15947
15948
|
clearBackToTableRowContext() {
|
|
15948
|
-
this.clearBackTo(rb,
|
|
15949
|
+
this.clearBackTo(rb, G.HTML);
|
|
15949
15950
|
}
|
|
15950
15951
|
remove(t) {
|
|
15951
15952
|
const n = this._indexOf(t);
|
|
@@ -15970,19 +15971,19 @@ class ob {
|
|
|
15970
15971
|
for (let r = this.stackTop; r >= 0; r--) {
|
|
15971
15972
|
const a = this.tagIDs[r];
|
|
15972
15973
|
switch (this.treeAdapter.getNamespaceURI(this.items[r])) {
|
|
15973
|
-
case
|
|
15974
|
+
case G.HTML: {
|
|
15974
15975
|
if (a === t)
|
|
15975
15976
|
return !0;
|
|
15976
15977
|
if (n.has(a))
|
|
15977
15978
|
return !1;
|
|
15978
15979
|
break;
|
|
15979
15980
|
}
|
|
15980
|
-
case
|
|
15981
|
+
case G.SVG: {
|
|
15981
15982
|
if (es.has(a))
|
|
15982
15983
|
return !1;
|
|
15983
15984
|
break;
|
|
15984
15985
|
}
|
|
15985
|
-
case
|
|
15986
|
+
case G.MATHML: {
|
|
15986
15987
|
if (Jo.has(a))
|
|
15987
15988
|
return !1;
|
|
15988
15989
|
break;
|
|
@@ -16004,19 +16005,19 @@ class ob {
|
|
|
16004
16005
|
for (let t = this.stackTop; t >= 0; t--) {
|
|
16005
16006
|
const n = this.tagIDs[t];
|
|
16006
16007
|
switch (this.treeAdapter.getNamespaceURI(this.items[t])) {
|
|
16007
|
-
case
|
|
16008
|
+
case G.HTML: {
|
|
16008
16009
|
if (yi.has(n))
|
|
16009
16010
|
return !0;
|
|
16010
16011
|
if (Vr.has(n))
|
|
16011
16012
|
return !1;
|
|
16012
16013
|
break;
|
|
16013
16014
|
}
|
|
16014
|
-
case
|
|
16015
|
+
case G.SVG: {
|
|
16015
16016
|
if (es.has(n))
|
|
16016
16017
|
return !1;
|
|
16017
16018
|
break;
|
|
16018
16019
|
}
|
|
16019
|
-
case
|
|
16020
|
+
case G.MATHML: {
|
|
16020
16021
|
if (Jo.has(n))
|
|
16021
16022
|
return !1;
|
|
16022
16023
|
break;
|
|
@@ -16027,7 +16028,7 @@ class ob {
|
|
|
16027
16028
|
}
|
|
16028
16029
|
hasInTableScope(t) {
|
|
16029
16030
|
for (let n = this.stackTop; n >= 0; n--)
|
|
16030
|
-
if (this.treeAdapter.getNamespaceURI(this.items[n]) ===
|
|
16031
|
+
if (this.treeAdapter.getNamespaceURI(this.items[n]) === G.HTML)
|
|
16031
16032
|
switch (this.tagIDs[n]) {
|
|
16032
16033
|
case t:
|
|
16033
16034
|
return !0;
|
|
@@ -16039,7 +16040,7 @@ class ob {
|
|
|
16039
16040
|
}
|
|
16040
16041
|
hasTableBodyContextInTableScope() {
|
|
16041
16042
|
for (let t = this.stackTop; t >= 0; t--)
|
|
16042
|
-
if (this.treeAdapter.getNamespaceURI(this.items[t]) ===
|
|
16043
|
+
if (this.treeAdapter.getNamespaceURI(this.items[t]) === G.HTML)
|
|
16043
16044
|
switch (this.tagIDs[t]) {
|
|
16044
16045
|
case o.TBODY:
|
|
16045
16046
|
case o.THEAD:
|
|
@@ -16053,7 +16054,7 @@ class ob {
|
|
|
16053
16054
|
}
|
|
16054
16055
|
hasInSelectScope(t) {
|
|
16055
16056
|
for (let n = this.stackTop; n >= 0; n--)
|
|
16056
|
-
if (this.treeAdapter.getNamespaceURI(this.items[n]) ===
|
|
16057
|
+
if (this.treeAdapter.getNamespaceURI(this.items[n]) === G.HTML)
|
|
16057
16058
|
switch (this.tagIDs[n]) {
|
|
16058
16059
|
case t:
|
|
16059
16060
|
return !0;
|
|
@@ -16473,17 +16474,17 @@ const rs = {
|
|
|
16473
16474
|
"yChannelSelector",
|
|
16474
16475
|
"zoomAndPan"
|
|
16475
16476
|
].map((e) => [e.toLowerCase(), e])), Tb = /* @__PURE__ */ new Map([
|
|
16476
|
-
["xlink:actuate", { prefix: "xlink", name: "actuate", namespace:
|
|
16477
|
-
["xlink:arcrole", { prefix: "xlink", name: "arcrole", namespace:
|
|
16478
|
-
["xlink:href", { prefix: "xlink", name: "href", namespace:
|
|
16479
|
-
["xlink:role", { prefix: "xlink", name: "role", namespace:
|
|
16480
|
-
["xlink:show", { prefix: "xlink", name: "show", namespace:
|
|
16481
|
-
["xlink:title", { prefix: "xlink", name: "title", namespace:
|
|
16482
|
-
["xlink:type", { prefix: "xlink", name: "type", namespace:
|
|
16483
|
-
["xml:lang", { prefix: "xml", name: "lang", namespace:
|
|
16484
|
-
["xml:space", { prefix: "xml", name: "space", namespace:
|
|
16485
|
-
["xmlns", { prefix: "", name: "xmlns", namespace:
|
|
16486
|
-
["xmlns:xlink", { prefix: "xmlns", name: "xlink", namespace:
|
|
16477
|
+
["xlink:actuate", { prefix: "xlink", name: "actuate", namespace: G.XLINK }],
|
|
16478
|
+
["xlink:arcrole", { prefix: "xlink", name: "arcrole", namespace: G.XLINK }],
|
|
16479
|
+
["xlink:href", { prefix: "xlink", name: "href", namespace: G.XLINK }],
|
|
16480
|
+
["xlink:role", { prefix: "xlink", name: "role", namespace: G.XLINK }],
|
|
16481
|
+
["xlink:show", { prefix: "xlink", name: "show", namespace: G.XLINK }],
|
|
16482
|
+
["xlink:title", { prefix: "xlink", name: "title", namespace: G.XLINK }],
|
|
16483
|
+
["xlink:type", { prefix: "xlink", name: "type", namespace: G.XLINK }],
|
|
16484
|
+
["xml:lang", { prefix: "xml", name: "lang", namespace: G.XML }],
|
|
16485
|
+
["xml:space", { prefix: "xml", name: "space", namespace: G.XML }],
|
|
16486
|
+
["xmlns", { prefix: "", name: "xmlns", namespace: G.XMLNS }],
|
|
16487
|
+
["xmlns:xlink", { prefix: "xmlns", name: "xlink", namespace: G.XMLNS }]
|
|
16487
16488
|
]), yb = new Map([
|
|
16488
16489
|
"altGlyph",
|
|
16489
16490
|
"altGlyphDef",
|
|
@@ -16595,20 +16596,20 @@ function Ab(e) {
|
|
|
16595
16596
|
t != null && (e.tagName = t, e.tagID = Dn(e.tagName));
|
|
16596
16597
|
}
|
|
16597
16598
|
function Sb(e, t) {
|
|
16598
|
-
return t ===
|
|
16599
|
+
return t === G.MATHML && (e === o.MI || e === o.MO || e === o.MN || e === o.MS || e === o.MTEXT);
|
|
16599
16600
|
}
|
|
16600
16601
|
function xb(e, t, n) {
|
|
16601
|
-
if (t ===
|
|
16602
|
+
if (t === G.MATHML && e === o.ANNOTATION_XML) {
|
|
16602
16603
|
for (let r = 0; r < n.length; r++)
|
|
16603
16604
|
if (n[r].name === on.ENCODING) {
|
|
16604
16605
|
const a = n[r].value.toLowerCase();
|
|
16605
16606
|
return a === rs.TEXT_HTML || a === rs.APPLICATION_XML;
|
|
16606
16607
|
}
|
|
16607
16608
|
}
|
|
16608
|
-
return t ===
|
|
16609
|
+
return t === G.SVG && (e === o.FOREIGN_OBJECT || e === o.DESC || e === o.TITLE);
|
|
16609
16610
|
}
|
|
16610
16611
|
function vb(e, t, n, r) {
|
|
16611
|
-
return (!r || r ===
|
|
16612
|
+
return (!r || r === G.HTML) && xb(e, t, n) || (!r || r === G.MATHML) && Sb(e, t);
|
|
16612
16613
|
}
|
|
16613
16614
|
const Ob = "hidden", Ib = 8, Nb = 3;
|
|
16614
16615
|
var O;
|
|
@@ -16645,8 +16646,8 @@ class is {
|
|
|
16645
16646
|
...as,
|
|
16646
16647
|
...n
|
|
16647
16648
|
};
|
|
16648
|
-
t ?? (t = r.treeAdapter.createElement(R.TEMPLATE,
|
|
16649
|
-
const a = r.treeAdapter.createElement("documentmock",
|
|
16649
|
+
t ?? (t = r.treeAdapter.createElement(R.TEMPLATE, G.HTML, []));
|
|
16650
|
+
const a = r.treeAdapter.createElement("documentmock", G.HTML, []), i = new this(r, a, t);
|
|
16650
16651
|
return i.fragmentContextID === o.TEMPLATE && i.tmplInsertionModeStack.unshift(O.IN_TEMPLATE), i._initTokenizerForFragmentParsing(), i._insertFakeRootElement(), i._resetInsertionMode(), i._findFormInFragmentContext(), i;
|
|
16651
16652
|
}
|
|
16652
16653
|
getFragment() {
|
|
@@ -16685,12 +16686,12 @@ class is {
|
|
|
16685
16686
|
}
|
|
16686
16687
|
}
|
|
16687
16688
|
_setContextModes(t, n) {
|
|
16688
|
-
const r = t === this.document || t && this.treeAdapter.getNamespaceURI(t) ===
|
|
16689
|
+
const r = t === this.document || t && this.treeAdapter.getNamespaceURI(t) === G.HTML;
|
|
16689
16690
|
this.currentNotInHTML = !r, this.tokenizer.inForeignNode = !r && t !== void 0 && n !== void 0 && !this._isIntegrationPoint(n, t);
|
|
16690
16691
|
}
|
|
16691
16692
|
/** @protected */
|
|
16692
16693
|
_switchToTextParsing(t, n) {
|
|
16693
|
-
this._insertElement(t,
|
|
16694
|
+
this._insertElement(t, G.HTML), this.tokenizer.state = n, this.originalInsertionMode = this.insertionMode, this.insertionMode = O.TEXT;
|
|
16694
16695
|
}
|
|
16695
16696
|
switchToPlaintextParsing() {
|
|
16696
16697
|
this.insertionMode = O.TEXT, this.originalInsertionMode = O.IN_BODY, this.tokenizer.state = We.PLAINTEXT;
|
|
@@ -16712,7 +16713,7 @@ class is {
|
|
|
16712
16713
|
}
|
|
16713
16714
|
}
|
|
16714
16715
|
_initTokenizerForFragmentParsing() {
|
|
16715
|
-
if (!(!this.fragmentContext || this.treeAdapter.getNamespaceURI(this.fragmentContext) !==
|
|
16716
|
+
if (!(!this.fragmentContext || this.treeAdapter.getNamespaceURI(this.fragmentContext) !== G.HTML))
|
|
16716
16717
|
switch (this.fragmentContextID) {
|
|
16717
16718
|
case o.TITLE:
|
|
16718
16719
|
case o.TEXTAREA: {
|
|
@@ -16779,17 +16780,17 @@ class is {
|
|
|
16779
16780
|
}
|
|
16780
16781
|
/** @protected */
|
|
16781
16782
|
_insertFakeElement(t, n) {
|
|
16782
|
-
const r = this.treeAdapter.createElement(t,
|
|
16783
|
+
const r = this.treeAdapter.createElement(t, G.HTML, []);
|
|
16783
16784
|
this._attachElementToTree(r, null), this.openElements.push(r, n);
|
|
16784
16785
|
}
|
|
16785
16786
|
/** @protected */
|
|
16786
16787
|
_insertTemplate(t) {
|
|
16787
|
-
const n = this.treeAdapter.createElement(t.tagName,
|
|
16788
|
+
const n = this.treeAdapter.createElement(t.tagName, G.HTML, t.attrs), r = this.treeAdapter.createDocumentFragment();
|
|
16788
16789
|
this.treeAdapter.setTemplateContent(n, r), this._attachElementToTree(n, t.location), this.openElements.push(n, t.tagID), this.options.sourceCodeLocationInfo && this.treeAdapter.setNodeSourceCodeLocation(r, null);
|
|
16789
16790
|
}
|
|
16790
16791
|
/** @protected */
|
|
16791
16792
|
_insertFakeRootElement() {
|
|
16792
|
-
const t = this.treeAdapter.createElement(R.HTML,
|
|
16793
|
+
const t = this.treeAdapter.createElement(R.HTML, G.HTML, []);
|
|
16793
16794
|
this.options.sourceCodeLocationInfo && this.treeAdapter.setNodeSourceCodeLocation(t, null), this.treeAdapter.appendChild(this.openElements.current, t), this.openElements.push(t, o.HTML);
|
|
16794
16795
|
}
|
|
16795
16796
|
/** @protected */
|
|
@@ -16838,11 +16839,11 @@ class is {
|
|
|
16838
16839
|
if (!this.currentNotInHTML)
|
|
16839
16840
|
return !1;
|
|
16840
16841
|
let n, r;
|
|
16841
|
-
return this.openElements.stackTop === 0 && this.fragmentContext ? (n = this.fragmentContext, r = this.fragmentContextID) : { current: n, currentTagId: r } = this.openElements, t.tagID === o.SVG && this.treeAdapter.getTagName(n) === R.ANNOTATION_XML && this.treeAdapter.getNamespaceURI(n) ===
|
|
16842
|
+
return this.openElements.stackTop === 0 && this.fragmentContext ? (n = this.fragmentContext, r = this.fragmentContextID) : { current: n, currentTagId: r } = this.openElements, t.tagID === o.SVG && this.treeAdapter.getTagName(n) === R.ANNOTATION_XML && this.treeAdapter.getNamespaceURI(n) === G.MATHML ? !1 : (
|
|
16842
16843
|
// Check that `current` is not an integration point for HTML or MathML elements.
|
|
16843
16844
|
this.tokenizer.inForeignNode || // If it _is_ an integration point, then we might have to check that it is not an HTML
|
|
16844
16845
|
// integration point.
|
|
16845
|
-
(t.tagID === o.MGLYPH || t.tagID === o.MALIGNMARK) && r !== void 0 && !this._isIntegrationPoint(r, n,
|
|
16846
|
+
(t.tagID === o.MGLYPH || t.tagID === o.MALIGNMARK) && r !== void 0 && !this._isIntegrationPoint(r, n, G.HTML)
|
|
16846
16847
|
);
|
|
16847
16848
|
}
|
|
16848
16849
|
/** @protected */
|
|
@@ -17003,7 +17004,7 @@ class is {
|
|
|
17003
17004
|
const n = this.openElements.items[t];
|
|
17004
17005
|
switch (this.openElements.tagIDs[t]) {
|
|
17005
17006
|
case o.TEMPLATE: {
|
|
17006
|
-
if (this.treeAdapter.getNamespaceURI(n) ===
|
|
17007
|
+
if (this.treeAdapter.getNamespaceURI(n) === G.HTML)
|
|
17007
17008
|
return { parent: this.treeAdapter.getTemplateContent(n), beforeElement: null };
|
|
17008
17009
|
break;
|
|
17009
17010
|
}
|
|
@@ -17203,7 +17204,7 @@ class is {
|
|
|
17203
17204
|
case O.IN_HEAD:
|
|
17204
17205
|
case O.IN_HEAD_NO_SCRIPT:
|
|
17205
17206
|
case O.AFTER_HEAD: {
|
|
17206
|
-
this._err(t,
|
|
17207
|
+
this._err(t, j.misplacedDoctype);
|
|
17207
17208
|
break;
|
|
17208
17209
|
}
|
|
17209
17210
|
case O.IN_TABLE_TEXT: {
|
|
@@ -17214,7 +17215,7 @@ class is {
|
|
|
17214
17215
|
}
|
|
17215
17216
|
/** @internal */
|
|
17216
17217
|
onStartTag(t) {
|
|
17217
|
-
this.skipNextNewLine = !1, this.currentToken = t, this._processStartTag(t), t.selfClosing && !t.ackSelfClosing && this._err(t,
|
|
17218
|
+
this.skipNextNewLine = !1, this.currentToken = t, this._processStartTag(t), t.selfClosing && !t.ackSelfClosing && this._err(t, j.nonVoidHtmlElementStartTagWithTrailingSolidus);
|
|
17218
17219
|
}
|
|
17219
17220
|
/**
|
|
17220
17221
|
* Processes a given start tag.
|
|
@@ -17561,7 +17562,7 @@ function Pb(e, t, n) {
|
|
|
17561
17562
|
e._fosterParentElement(n);
|
|
17562
17563
|
else {
|
|
17563
17564
|
const i = e.treeAdapter.getNamespaceURI(t);
|
|
17564
|
-
a === o.TEMPLATE && i ===
|
|
17565
|
+
a === o.TEMPLATE && i === G.HTML && (t = e.treeAdapter.getTemplateContent(t)), e.treeAdapter.appendChild(t, n);
|
|
17565
17566
|
}
|
|
17566
17567
|
}
|
|
17567
17568
|
function Mb(e, t, n) {
|
|
@@ -17607,13 +17608,13 @@ function Qi(e, t) {
|
|
|
17607
17608
|
function Hb(e, t) {
|
|
17608
17609
|
e._setDocumentType(t);
|
|
17609
17610
|
const n = t.forceQuirks ? _t.QUIRKS : mb(t);
|
|
17610
|
-
pb(t) || e._err(t,
|
|
17611
|
+
pb(t) || e._err(t, j.nonConformingDoctype), e.treeAdapter.setDocumentMode(e.document, n), e.insertionMode = O.BEFORE_HTML;
|
|
17611
17612
|
}
|
|
17612
17613
|
function Wn(e, t) {
|
|
17613
|
-
e._err(t,
|
|
17614
|
+
e._err(t, j.missingDoctype, !0), e.treeAdapter.setDocumentMode(e.document, _t.QUIRKS), e.insertionMode = O.BEFORE_HTML, e._processToken(t);
|
|
17614
17615
|
}
|
|
17615
17616
|
function Ub(e, t) {
|
|
17616
|
-
t.tagID === o.HTML ? (e._insertElement(t,
|
|
17617
|
+
t.tagID === o.HTML ? (e._insertElement(t, G.HTML), e.insertionMode = O.BEFORE_HEAD) : ar(e, t);
|
|
17617
17618
|
}
|
|
17618
17619
|
function jb(e, t) {
|
|
17619
17620
|
const n = t.tagID;
|
|
@@ -17629,7 +17630,7 @@ function qb(e, t) {
|
|
|
17629
17630
|
break;
|
|
17630
17631
|
}
|
|
17631
17632
|
case o.HEAD: {
|
|
17632
|
-
e._insertElement(t,
|
|
17633
|
+
e._insertElement(t, G.HTML), e.headElement = e.openElements.current, e.insertionMode = O.IN_HEAD;
|
|
17633
17634
|
break;
|
|
17634
17635
|
}
|
|
17635
17636
|
default:
|
|
@@ -17638,7 +17639,7 @@ function qb(e, t) {
|
|
|
17638
17639
|
}
|
|
17639
17640
|
function zb(e, t) {
|
|
17640
17641
|
const n = t.tagID;
|
|
17641
|
-
n === o.HEAD || n === o.BODY || n === o.HTML || n === o.BR ? ir(e, t) : e._err(t,
|
|
17642
|
+
n === o.HEAD || n === o.BODY || n === o.HTML || n === o.BR ? ir(e, t) : e._err(t, j.endTagWithoutMatchingOpenElement);
|
|
17642
17643
|
}
|
|
17643
17644
|
function ir(e, t) {
|
|
17644
17645
|
e._insertFakeElement(R.HEAD, o.HEAD), e.headElement = e.openElements.current, e.insertionMode = O.IN_HEAD, e._processToken(t);
|
|
@@ -17654,7 +17655,7 @@ function Lt(e, t) {
|
|
|
17654
17655
|
case o.BGSOUND:
|
|
17655
17656
|
case o.LINK:
|
|
17656
17657
|
case o.META: {
|
|
17657
|
-
e._appendElement(t,
|
|
17658
|
+
e._appendElement(t, G.HTML), t.ackSelfClosing = !0;
|
|
17658
17659
|
break;
|
|
17659
17660
|
}
|
|
17660
17661
|
case o.TITLE: {
|
|
@@ -17662,7 +17663,7 @@ function Lt(e, t) {
|
|
|
17662
17663
|
break;
|
|
17663
17664
|
}
|
|
17664
17665
|
case o.NOSCRIPT: {
|
|
17665
|
-
e.options.scriptingEnabled ? e._switchToTextParsing(t, We.RAWTEXT) : (e._insertElement(t,
|
|
17666
|
+
e.options.scriptingEnabled ? e._switchToTextParsing(t, We.RAWTEXT) : (e._insertElement(t, G.HTML), e.insertionMode = O.IN_HEAD_NO_SCRIPT);
|
|
17666
17667
|
break;
|
|
17667
17668
|
}
|
|
17668
17669
|
case o.NOFRAMES:
|
|
@@ -17679,7 +17680,7 @@ function Lt(e, t) {
|
|
|
17679
17680
|
break;
|
|
17680
17681
|
}
|
|
17681
17682
|
case o.HEAD: {
|
|
17682
|
-
e._err(t,
|
|
17683
|
+
e._err(t, j.misplacedStartTagForHeadElement);
|
|
17683
17684
|
break;
|
|
17684
17685
|
}
|
|
17685
17686
|
default:
|
|
@@ -17703,11 +17704,11 @@ function Yb(e, t) {
|
|
|
17703
17704
|
break;
|
|
17704
17705
|
}
|
|
17705
17706
|
default:
|
|
17706
|
-
e._err(t,
|
|
17707
|
+
e._err(t, j.endTagWithoutMatchingOpenElement);
|
|
17707
17708
|
}
|
|
17708
17709
|
}
|
|
17709
17710
|
function fn(e, t) {
|
|
17710
|
-
e.openElements.tmplCount > 0 ? (e.openElements.generateImpliedEndTagsThoroughly(), e.openElements.currentTagId !== o.TEMPLATE && e._err(t,
|
|
17711
|
+
e.openElements.tmplCount > 0 ? (e.openElements.generateImpliedEndTagsThoroughly(), e.openElements.currentTagId !== o.TEMPLATE && e._err(t, j.closingOfElementWithOpenChildElements), e.openElements.popUntilTagNamePopped(o.TEMPLATE), e.activeFormattingElements.clearToLastMarker(), e.tmplInsertionModeStack.shift(), e._resetInsertionMode()) : e._err(t, j.endTagWithoutMatchingOpenElement);
|
|
17711
17712
|
}
|
|
17712
17713
|
function ur(e, t) {
|
|
17713
17714
|
e.openElements.pop(), e.insertionMode = O.AFTER_HEAD, e._processToken(t);
|
|
@@ -17729,7 +17730,7 @@ function $b(e, t) {
|
|
|
17729
17730
|
break;
|
|
17730
17731
|
}
|
|
17731
17732
|
case o.NOSCRIPT: {
|
|
17732
|
-
e._err(t,
|
|
17733
|
+
e._err(t, j.nestedNoscriptInHead);
|
|
17733
17734
|
break;
|
|
17734
17735
|
}
|
|
17735
17736
|
default:
|
|
@@ -17747,11 +17748,11 @@ function Vb(e, t) {
|
|
|
17747
17748
|
break;
|
|
17748
17749
|
}
|
|
17749
17750
|
default:
|
|
17750
|
-
e._err(t,
|
|
17751
|
+
e._err(t, j.endTagWithoutMatchingOpenElement);
|
|
17751
17752
|
}
|
|
17752
17753
|
}
|
|
17753
17754
|
function or(e, t) {
|
|
17754
|
-
const n = t.type === me.EOF ?
|
|
17755
|
+
const n = t.type === me.EOF ? j.openElementsLeftAfterEof : j.disallowedContentInNoscriptInHead;
|
|
17755
17756
|
e._err(t, n), e.openElements.pop(), e.insertionMode = O.IN_HEAD, e._processToken(t);
|
|
17756
17757
|
}
|
|
17757
17758
|
function Wb(e, t) {
|
|
@@ -17761,11 +17762,11 @@ function Wb(e, t) {
|
|
|
17761
17762
|
break;
|
|
17762
17763
|
}
|
|
17763
17764
|
case o.BODY: {
|
|
17764
|
-
e._insertElement(t,
|
|
17765
|
+
e._insertElement(t, G.HTML), e.framesetOk = !1, e.insertionMode = O.IN_BODY;
|
|
17765
17766
|
break;
|
|
17766
17767
|
}
|
|
17767
17768
|
case o.FRAMESET: {
|
|
17768
|
-
e._insertElement(t,
|
|
17769
|
+
e._insertElement(t, G.HTML), e.insertionMode = O.IN_FRAMESET;
|
|
17769
17770
|
break;
|
|
17770
17771
|
}
|
|
17771
17772
|
case o.BASE:
|
|
@@ -17778,11 +17779,11 @@ function Wb(e, t) {
|
|
|
17778
17779
|
case o.STYLE:
|
|
17779
17780
|
case o.TEMPLATE:
|
|
17780
17781
|
case o.TITLE: {
|
|
17781
|
-
e._err(t,
|
|
17782
|
+
e._err(t, j.abandonedHeadElementChild), e.openElements.push(e.headElement, o.HEAD), Lt(e, t), e.openElements.remove(e.headElement);
|
|
17782
17783
|
break;
|
|
17783
17784
|
}
|
|
17784
17785
|
case o.HEAD: {
|
|
17785
|
-
e._err(t,
|
|
17786
|
+
e._err(t, j.misplacedStartTagForHeadElement);
|
|
17786
17787
|
break;
|
|
17787
17788
|
}
|
|
17788
17789
|
default:
|
|
@@ -17802,7 +17803,7 @@ function Gb(e, t) {
|
|
|
17802
17803
|
break;
|
|
17803
17804
|
}
|
|
17804
17805
|
default:
|
|
17805
|
-
e._err(t,
|
|
17806
|
+
e._err(t, j.endTagWithoutMatchingOpenElement);
|
|
17806
17807
|
}
|
|
17807
17808
|
}
|
|
17808
17809
|
function sr(e, t) {
|
|
@@ -17851,20 +17852,20 @@ function Kb(e, t) {
|
|
|
17851
17852
|
}
|
|
17852
17853
|
function Qb(e, t) {
|
|
17853
17854
|
const n = e.openElements.tryPeekProperlyNestedBodyElement();
|
|
17854
|
-
e.framesetOk && n && (e.treeAdapter.detachNode(n), e.openElements.popAllUpToHtmlElement(), e._insertElement(t,
|
|
17855
|
+
e.framesetOk && n && (e.treeAdapter.detachNode(n), e.openElements.popAllUpToHtmlElement(), e._insertElement(t, G.HTML), e.insertionMode = O.IN_FRAMESET);
|
|
17855
17856
|
}
|
|
17856
17857
|
function Zb(e, t) {
|
|
17857
|
-
e.openElements.hasInButtonScope(o.P) && e._closePElement(), e._insertElement(t,
|
|
17858
|
+
e.openElements.hasInButtonScope(o.P) && e._closePElement(), e._insertElement(t, G.HTML);
|
|
17858
17859
|
}
|
|
17859
17860
|
function Jb(e, t) {
|
|
17860
|
-
e.openElements.hasInButtonScope(o.P) && e._closePElement(), e.openElements.currentTagId !== void 0 && yi.has(e.openElements.currentTagId) && e.openElements.pop(), e._insertElement(t,
|
|
17861
|
+
e.openElements.hasInButtonScope(o.P) && e._closePElement(), e.openElements.currentTagId !== void 0 && yi.has(e.openElements.currentTagId) && e.openElements.pop(), e._insertElement(t, G.HTML);
|
|
17861
17862
|
}
|
|
17862
17863
|
function eE(e, t) {
|
|
17863
|
-
e.openElements.hasInButtonScope(o.P) && e._closePElement(), e._insertElement(t,
|
|
17864
|
+
e.openElements.hasInButtonScope(o.P) && e._closePElement(), e._insertElement(t, G.HTML), e.skipNextNewLine = !0, e.framesetOk = !1;
|
|
17864
17865
|
}
|
|
17865
17866
|
function tE(e, t) {
|
|
17866
17867
|
const n = e.openElements.tmplCount > 0;
|
|
17867
|
-
(!e.formElement || n) && (e.openElements.hasInButtonScope(o.P) && e._closePElement(), e._insertElement(t,
|
|
17868
|
+
(!e.formElement || n) && (e.openElements.hasInButtonScope(o.P) && e._closePElement(), e._insertElement(t, G.HTML), n || (e.formElement = e.openElements.current));
|
|
17868
17869
|
}
|
|
17869
17870
|
function nE(e, t) {
|
|
17870
17871
|
e.framesetOk = !1;
|
|
@@ -17878,51 +17879,51 @@ function nE(e, t) {
|
|
|
17878
17879
|
if (a !== o.ADDRESS && a !== o.DIV && a !== o.P && e._isSpecialElement(e.openElements.items[r], a))
|
|
17879
17880
|
break;
|
|
17880
17881
|
}
|
|
17881
|
-
e.openElements.hasInButtonScope(o.P) && e._closePElement(), e._insertElement(t,
|
|
17882
|
+
e.openElements.hasInButtonScope(o.P) && e._closePElement(), e._insertElement(t, G.HTML);
|
|
17882
17883
|
}
|
|
17883
17884
|
function rE(e, t) {
|
|
17884
|
-
e.openElements.hasInButtonScope(o.P) && e._closePElement(), e._insertElement(t,
|
|
17885
|
+
e.openElements.hasInButtonScope(o.P) && e._closePElement(), e._insertElement(t, G.HTML), e.tokenizer.state = We.PLAINTEXT;
|
|
17885
17886
|
}
|
|
17886
17887
|
function aE(e, t) {
|
|
17887
|
-
e.openElements.hasInScope(o.BUTTON) && (e.openElements.generateImpliedEndTags(), e.openElements.popUntilTagNamePopped(o.BUTTON)), e._reconstructActiveFormattingElements(), e._insertElement(t,
|
|
17888
|
+
e.openElements.hasInScope(o.BUTTON) && (e.openElements.generateImpliedEndTags(), e.openElements.popUntilTagNamePopped(o.BUTTON)), e._reconstructActiveFormattingElements(), e._insertElement(t, G.HTML), e.framesetOk = !1;
|
|
17888
17889
|
}
|
|
17889
17890
|
function iE(e, t) {
|
|
17890
17891
|
const n = e.activeFormattingElements.getElementEntryInScopeWithTagName(R.A);
|
|
17891
|
-
n && (Ki(e, t), e.openElements.remove(n.element), e.activeFormattingElements.removeEntry(n)), e._reconstructActiveFormattingElements(), e._insertElement(t,
|
|
17892
|
+
n && (Ki(e, t), e.openElements.remove(n.element), e.activeFormattingElements.removeEntry(n)), e._reconstructActiveFormattingElements(), e._insertElement(t, G.HTML), e.activeFormattingElements.pushElement(e.openElements.current, t);
|
|
17892
17893
|
}
|
|
17893
17894
|
function uE(e, t) {
|
|
17894
|
-
e._reconstructActiveFormattingElements(), e._insertElement(t,
|
|
17895
|
+
e._reconstructActiveFormattingElements(), e._insertElement(t, G.HTML), e.activeFormattingElements.pushElement(e.openElements.current, t);
|
|
17895
17896
|
}
|
|
17896
17897
|
function oE(e, t) {
|
|
17897
|
-
e._reconstructActiveFormattingElements(), e.openElements.hasInScope(o.NOBR) && (Ki(e, t), e._reconstructActiveFormattingElements()), e._insertElement(t,
|
|
17898
|
+
e._reconstructActiveFormattingElements(), e.openElements.hasInScope(o.NOBR) && (Ki(e, t), e._reconstructActiveFormattingElements()), e._insertElement(t, G.HTML), e.activeFormattingElements.pushElement(e.openElements.current, t);
|
|
17898
17899
|
}
|
|
17899
17900
|
function sE(e, t) {
|
|
17900
|
-
e._reconstructActiveFormattingElements(), e._insertElement(t,
|
|
17901
|
+
e._reconstructActiveFormattingElements(), e._insertElement(t, G.HTML), e.activeFormattingElements.insertMarker(), e.framesetOk = !1;
|
|
17901
17902
|
}
|
|
17902
17903
|
function lE(e, t) {
|
|
17903
|
-
e.treeAdapter.getDocumentMode(e.document) !== _t.QUIRKS && e.openElements.hasInButtonScope(o.P) && e._closePElement(), e._insertElement(t,
|
|
17904
|
+
e.treeAdapter.getDocumentMode(e.document) !== _t.QUIRKS && e.openElements.hasInButtonScope(o.P) && e._closePElement(), e._insertElement(t, G.HTML), e.framesetOk = !1, e.insertionMode = O.IN_TABLE;
|
|
17904
17905
|
}
|
|
17905
17906
|
function Mc(e, t) {
|
|
17906
|
-
e._reconstructActiveFormattingElements(), e._appendElement(t,
|
|
17907
|
+
e._reconstructActiveFormattingElements(), e._appendElement(t, G.HTML), e.framesetOk = !1, t.ackSelfClosing = !0;
|
|
17907
17908
|
}
|
|
17908
17909
|
function Fc(e) {
|
|
17909
17910
|
const t = xc(e, on.TYPE);
|
|
17910
17911
|
return t != null && t.toLowerCase() === Ob;
|
|
17911
17912
|
}
|
|
17912
17913
|
function cE(e, t) {
|
|
17913
|
-
e._reconstructActiveFormattingElements(), e._appendElement(t,
|
|
17914
|
+
e._reconstructActiveFormattingElements(), e._appendElement(t, G.HTML), Fc(t) || (e.framesetOk = !1), t.ackSelfClosing = !0;
|
|
17914
17915
|
}
|
|
17915
17916
|
function dE(e, t) {
|
|
17916
|
-
e._appendElement(t,
|
|
17917
|
+
e._appendElement(t, G.HTML), t.ackSelfClosing = !0;
|
|
17917
17918
|
}
|
|
17918
17919
|
function fE(e, t) {
|
|
17919
|
-
e.openElements.hasInButtonScope(o.P) && e._closePElement(), e._appendElement(t,
|
|
17920
|
+
e.openElements.hasInButtonScope(o.P) && e._closePElement(), e._appendElement(t, G.HTML), e.framesetOk = !1, t.ackSelfClosing = !0;
|
|
17920
17921
|
}
|
|
17921
17922
|
function hE(e, t) {
|
|
17922
17923
|
t.tagName = R.IMG, t.tagID = o.IMG, Mc(e, t);
|
|
17923
17924
|
}
|
|
17924
17925
|
function pE(e, t) {
|
|
17925
|
-
e._insertElement(t,
|
|
17926
|
+
e._insertElement(t, G.HTML), e.skipNextNewLine = !0, e.tokenizer.state = We.RCDATA, e.originalInsertionMode = e.insertionMode, e.framesetOk = !1, e.insertionMode = O.TEXT;
|
|
17926
17927
|
}
|
|
17927
17928
|
function mE(e, t) {
|
|
17928
17929
|
e.openElements.hasInButtonScope(o.P) && e._closePElement(), e._reconstructActiveFormattingElements(), e.framesetOk = !1, e._switchToTextParsing(t, We.RAWTEXT);
|
|
@@ -17934,25 +17935,25 @@ function us(e, t) {
|
|
|
17934
17935
|
e._switchToTextParsing(t, We.RAWTEXT);
|
|
17935
17936
|
}
|
|
17936
17937
|
function bE(e, t) {
|
|
17937
|
-
e._reconstructActiveFormattingElements(), e._insertElement(t,
|
|
17938
|
+
e._reconstructActiveFormattingElements(), e._insertElement(t, G.HTML), e.framesetOk = !1, e.insertionMode = e.insertionMode === O.IN_TABLE || e.insertionMode === O.IN_CAPTION || e.insertionMode === O.IN_TABLE_BODY || e.insertionMode === O.IN_ROW || e.insertionMode === O.IN_CELL ? O.IN_SELECT_IN_TABLE : O.IN_SELECT;
|
|
17938
17939
|
}
|
|
17939
17940
|
function EE(e, t) {
|
|
17940
|
-
e.openElements.currentTagId === o.OPTION && e.openElements.pop(), e._reconstructActiveFormattingElements(), e._insertElement(t,
|
|
17941
|
+
e.openElements.currentTagId === o.OPTION && e.openElements.pop(), e._reconstructActiveFormattingElements(), e._insertElement(t, G.HTML);
|
|
17941
17942
|
}
|
|
17942
17943
|
function TE(e, t) {
|
|
17943
|
-
e.openElements.hasInScope(o.RUBY) && e.openElements.generateImpliedEndTags(), e._insertElement(t,
|
|
17944
|
+
e.openElements.hasInScope(o.RUBY) && e.openElements.generateImpliedEndTags(), e._insertElement(t, G.HTML);
|
|
17944
17945
|
}
|
|
17945
17946
|
function yE(e, t) {
|
|
17946
|
-
e.openElements.hasInScope(o.RUBY) && e.openElements.generateImpliedEndTagsWithExclusion(o.RTC), e._insertElement(t,
|
|
17947
|
+
e.openElements.hasInScope(o.RUBY) && e.openElements.generateImpliedEndTagsWithExclusion(o.RTC), e._insertElement(t, G.HTML);
|
|
17947
17948
|
}
|
|
17948
17949
|
function _E(e, t) {
|
|
17949
|
-
e._reconstructActiveFormattingElements(), Lc(t), Xi(t), t.selfClosing ? e._appendElement(t,
|
|
17950
|
+
e._reconstructActiveFormattingElements(), Lc(t), Xi(t), t.selfClosing ? e._appendElement(t, G.MATHML) : e._insertElement(t, G.MATHML), t.ackSelfClosing = !0;
|
|
17950
17951
|
}
|
|
17951
17952
|
function CE(e, t) {
|
|
17952
|
-
e._reconstructActiveFormattingElements(), wc(t), Xi(t), t.selfClosing ? e._appendElement(t,
|
|
17953
|
+
e._reconstructActiveFormattingElements(), wc(t), Xi(t), t.selfClosing ? e._appendElement(t, G.SVG) : e._insertElement(t, G.SVG), t.ackSelfClosing = !0;
|
|
17953
17954
|
}
|
|
17954
17955
|
function os(e, t) {
|
|
17955
|
-
e._reconstructActiveFormattingElements(), e._insertElement(t,
|
|
17956
|
+
e._reconstructActiveFormattingElements(), e._insertElement(t, G.HTML);
|
|
17956
17957
|
}
|
|
17957
17958
|
function it(e, t) {
|
|
17958
17959
|
switch (t.tagID) {
|
|
@@ -18322,7 +18323,7 @@ function RE(e, t) {
|
|
|
18322
18323
|
t.tagID === o.SCRIPT && ((n = e.scriptHandler) === null || n === void 0 || n.call(e, e.openElements.current)), e.openElements.pop(), e.insertionMode = e.originalInsertionMode;
|
|
18323
18324
|
}
|
|
18324
18325
|
function DE(e, t) {
|
|
18325
|
-
e._err(t,
|
|
18326
|
+
e._err(t, j.eofInElementThatCanContainOnlyText), e.openElements.pop(), e.insertionMode = e.originalInsertionMode, e.onEof(t);
|
|
18326
18327
|
}
|
|
18327
18328
|
function qa(e, t) {
|
|
18328
18329
|
if (e.openElements.currentTagId !== void 0 && Rc.has(e.openElements.currentTagId))
|
|
@@ -18340,16 +18341,16 @@ function qa(e, t) {
|
|
|
18340
18341
|
gr(e, t);
|
|
18341
18342
|
}
|
|
18342
18343
|
function PE(e, t) {
|
|
18343
|
-
e.openElements.clearBackToTableContext(), e.activeFormattingElements.insertMarker(), e._insertElement(t,
|
|
18344
|
+
e.openElements.clearBackToTableContext(), e.activeFormattingElements.insertMarker(), e._insertElement(t, G.HTML), e.insertionMode = O.IN_CAPTION;
|
|
18344
18345
|
}
|
|
18345
18346
|
function ME(e, t) {
|
|
18346
|
-
e.openElements.clearBackToTableContext(), e._insertElement(t,
|
|
18347
|
+
e.openElements.clearBackToTableContext(), e._insertElement(t, G.HTML), e.insertionMode = O.IN_COLUMN_GROUP;
|
|
18347
18348
|
}
|
|
18348
18349
|
function FE(e, t) {
|
|
18349
18350
|
e.openElements.clearBackToTableContext(), e._insertFakeElement(R.COLGROUP, o.COLGROUP), e.insertionMode = O.IN_COLUMN_GROUP, Zi(e, t);
|
|
18350
18351
|
}
|
|
18351
18352
|
function BE(e, t) {
|
|
18352
|
-
e.openElements.clearBackToTableContext(), e._insertElement(t,
|
|
18353
|
+
e.openElements.clearBackToTableContext(), e._insertElement(t, G.HTML), e.insertionMode = O.IN_TABLE_BODY;
|
|
18353
18354
|
}
|
|
18354
18355
|
function HE(e, t) {
|
|
18355
18356
|
e.openElements.clearBackToTableContext(), e._insertFakeElement(R.TBODY, o.TBODY), e.insertionMode = O.IN_TABLE_BODY, ra(e, t);
|
|
@@ -18358,10 +18359,10 @@ function UE(e, t) {
|
|
|
18358
18359
|
e.openElements.hasInTableScope(o.TABLE) && (e.openElements.popUntilTagNamePopped(o.TABLE), e._resetInsertionMode(), e._processStartTag(t));
|
|
18359
18360
|
}
|
|
18360
18361
|
function jE(e, t) {
|
|
18361
|
-
Fc(t) ? e._appendElement(t,
|
|
18362
|
+
Fc(t) ? e._appendElement(t, G.HTML) : gr(e, t), t.ackSelfClosing = !0;
|
|
18362
18363
|
}
|
|
18363
18364
|
function qE(e, t) {
|
|
18364
|
-
!e.formElement && e.openElements.tmplCount === 0 && (e._insertElement(t,
|
|
18365
|
+
!e.formElement && e.openElements.tmplCount === 0 && (e._insertElement(t, G.HTML), e.formElement = e.openElements.current, e.openElements.pop());
|
|
18365
18366
|
}
|
|
18366
18367
|
function On(e, t) {
|
|
18367
18368
|
switch (t.tagID) {
|
|
@@ -18492,7 +18493,7 @@ function Zi(e, t) {
|
|
|
18492
18493
|
break;
|
|
18493
18494
|
}
|
|
18494
18495
|
case o.COL: {
|
|
18495
|
-
e._appendElement(t,
|
|
18496
|
+
e._appendElement(t, G.HTML), t.ackSelfClosing = !0;
|
|
18496
18497
|
break;
|
|
18497
18498
|
}
|
|
18498
18499
|
case o.TEMPLATE: {
|
|
@@ -18525,7 +18526,7 @@ function Wr(e, t) {
|
|
|
18525
18526
|
function ra(e, t) {
|
|
18526
18527
|
switch (t.tagID) {
|
|
18527
18528
|
case o.TR: {
|
|
18528
|
-
e.openElements.clearBackToTableBodyContext(), e._insertElement(t,
|
|
18529
|
+
e.openElements.clearBackToTableBodyContext(), e._insertElement(t, G.HTML), e.insertionMode = O.IN_ROW;
|
|
18529
18530
|
break;
|
|
18530
18531
|
}
|
|
18531
18532
|
case o.TH:
|
|
@@ -18576,7 +18577,7 @@ function aa(e, t) {
|
|
|
18576
18577
|
switch (t.tagID) {
|
|
18577
18578
|
case o.TH:
|
|
18578
18579
|
case o.TD: {
|
|
18579
|
-
e.openElements.clearBackToTableRowContext(), e._insertElement(t,
|
|
18580
|
+
e.openElements.clearBackToTableRowContext(), e._insertElement(t, G.HTML), e.insertionMode = O.IN_CELL, e.activeFormattingElements.insertMarker();
|
|
18580
18581
|
break;
|
|
18581
18582
|
}
|
|
18582
18583
|
case o.CAPTION:
|
|
@@ -18658,15 +18659,15 @@ function Yc(e, t) {
|
|
|
18658
18659
|
break;
|
|
18659
18660
|
}
|
|
18660
18661
|
case o.OPTION: {
|
|
18661
|
-
e.openElements.currentTagId === o.OPTION && e.openElements.pop(), e._insertElement(t,
|
|
18662
|
+
e.openElements.currentTagId === o.OPTION && e.openElements.pop(), e._insertElement(t, G.HTML);
|
|
18662
18663
|
break;
|
|
18663
18664
|
}
|
|
18664
18665
|
case o.OPTGROUP: {
|
|
18665
|
-
e.openElements.currentTagId === o.OPTION && e.openElements.pop(), e.openElements.currentTagId === o.OPTGROUP && e.openElements.pop(), e._insertElement(t,
|
|
18666
|
+
e.openElements.currentTagId === o.OPTION && e.openElements.pop(), e.openElements.currentTagId === o.OPTGROUP && e.openElements.pop(), e._insertElement(t, G.HTML);
|
|
18666
18667
|
break;
|
|
18667
18668
|
}
|
|
18668
18669
|
case o.HR: {
|
|
18669
|
-
e.openElements.currentTagId === o.OPTION && e.openElements.pop(), e.openElements.currentTagId === o.OPTGROUP && e.openElements.pop(), e._appendElement(t,
|
|
18670
|
+
e.openElements.currentTagId === o.OPTION && e.openElements.pop(), e.openElements.currentTagId === o.OPTGROUP && e.openElements.pop(), e._appendElement(t, G.HTML), t.ackSelfClosing = !0;
|
|
18670
18671
|
break;
|
|
18671
18672
|
}
|
|
18672
18673
|
case o.INPUT:
|
|
@@ -18783,11 +18784,11 @@ function JE(e, t) {
|
|
|
18783
18784
|
break;
|
|
18784
18785
|
}
|
|
18785
18786
|
case o.FRAMESET: {
|
|
18786
|
-
e._insertElement(t,
|
|
18787
|
+
e._insertElement(t, G.HTML);
|
|
18787
18788
|
break;
|
|
18788
18789
|
}
|
|
18789
18790
|
case o.FRAME: {
|
|
18790
|
-
e._appendElement(t,
|
|
18791
|
+
e._appendElement(t, G.HTML), t.ackSelfClosing = !0;
|
|
18791
18792
|
break;
|
|
18792
18793
|
}
|
|
18793
18794
|
case o.NOFRAMES: {
|
|
@@ -18839,7 +18840,7 @@ function uT(e, t) {
|
|
|
18839
18840
|
e._insertCharacters(t), e.framesetOk = !1;
|
|
18840
18841
|
}
|
|
18841
18842
|
function Gc(e) {
|
|
18842
|
-
for (; e.treeAdapter.getNamespaceURI(e.openElements.current) !==
|
|
18843
|
+
for (; e.treeAdapter.getNamespaceURI(e.openElements.current) !== G.HTML && e.openElements.currentTagId !== void 0 && !e._isIntegrationPoint(e.openElements.currentTagId, e.openElements.current); )
|
|
18843
18844
|
e.openElements.pop();
|
|
18844
18845
|
}
|
|
18845
18846
|
function oT(e, t) {
|
|
@@ -18847,7 +18848,7 @@ function oT(e, t) {
|
|
|
18847
18848
|
Gc(e), e._startTagOutsideForeignContent(t);
|
|
18848
18849
|
else {
|
|
18849
18850
|
const n = e._getAdjustedCurrentElement(), r = e.treeAdapter.getNamespaceURI(n);
|
|
18850
|
-
r ===
|
|
18851
|
+
r === G.MATHML ? Lc(t) : r === G.SVG && (Ab(t), wc(t)), Xi(t), t.selfClosing ? e._appendElement(t, r) : e._insertElement(t, r), t.ackSelfClosing = !0;
|
|
18851
18852
|
}
|
|
18852
18853
|
}
|
|
18853
18854
|
function sT(e, t) {
|
|
@@ -18857,7 +18858,7 @@ function sT(e, t) {
|
|
|
18857
18858
|
}
|
|
18858
18859
|
for (let n = e.openElements.stackTop; n > 0; n--) {
|
|
18859
18860
|
const r = e.openElements.items[n];
|
|
18860
|
-
if (e.treeAdapter.getNamespaceURI(r) ===
|
|
18861
|
+
if (e.treeAdapter.getNamespaceURI(r) === G.HTML) {
|
|
18861
18862
|
e._endTagOutsideForeignContent(t);
|
|
18862
18863
|
break;
|
|
18863
18864
|
}
|
|
@@ -19233,95 +19234,95 @@ function DT() {
|
|
|
19233
19234
|
e.exports = r();
|
|
19234
19235
|
})(RT, (function() {
|
|
19235
19236
|
var n = 1e3, r = 6e4, a = 36e5, i = "millisecond", u = "second", s = "minute", l = "hour", c = "day", d = "week", f = "month", p = "quarter", h = "year", b = "date", m = "Invalid Date", T = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, g = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, D = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function(I) {
|
|
19236
|
-
var
|
|
19237
|
-
return "[" + I + (
|
|
19238
|
-
} }, P = function(I,
|
|
19239
|
-
var
|
|
19240
|
-
return !
|
|
19241
|
-
},
|
|
19242
|
-
var
|
|
19243
|
-
return (
|
|
19244
|
-
}, m: function I(
|
|
19245
|
-
if (
|
|
19246
|
-
var
|
|
19247
|
-
return +(-(
|
|
19237
|
+
var L = ["th", "st", "nd", "rd"], B = I % 100;
|
|
19238
|
+
return "[" + I + (L[(B - 20) % 10] || L[B] || L[0]) + "]";
|
|
19239
|
+
} }, P = function(I, L, B) {
|
|
19240
|
+
var W = String(I);
|
|
19241
|
+
return !W || W.length >= L ? I : "" + Array(L + 1 - W.length).join(B) + I;
|
|
19242
|
+
}, X = { s: P, z: function(I) {
|
|
19243
|
+
var L = -I.utcOffset(), B = Math.abs(L), W = Math.floor(B / 60), H = B % 60;
|
|
19244
|
+
return (L <= 0 ? "+" : "-") + P(W, 2, "0") + ":" + P(H, 2, "0");
|
|
19245
|
+
}, m: function I(L, B) {
|
|
19246
|
+
if (L.date() < B.date()) return -I(B, L);
|
|
19247
|
+
var W = 12 * (B.year() - L.year()) + (B.month() - L.month()), H = L.clone().add(W, f), z = B - H < 0, y = L.clone().add(W + (z ? -1 : 1), f);
|
|
19248
|
+
return +(-(W + (B - H) / (z ? H - y : y - H)) || 0);
|
|
19248
19249
|
}, a: function(I) {
|
|
19249
19250
|
return I < 0 ? Math.ceil(I) || 0 : Math.floor(I);
|
|
19250
19251
|
}, p: function(I) {
|
|
19251
19252
|
return { M: f, y: h, w: d, d: c, D: b, h: l, m: s, s: u, ms: i, Q: p }[I] || String(I || "").toLowerCase().replace(/s$/, "");
|
|
19252
19253
|
}, u: function(I) {
|
|
19253
19254
|
return I === void 0;
|
|
19254
|
-
} },
|
|
19255
|
-
x[
|
|
19256
|
-
var
|
|
19257
|
-
return I instanceof $ || !(!I || !I[
|
|
19258
|
-
}, q = function I(
|
|
19259
|
-
var
|
|
19260
|
-
if (!
|
|
19261
|
-
if (typeof
|
|
19262
|
-
var z =
|
|
19263
|
-
x[z] && (
|
|
19264
|
-
var y =
|
|
19265
|
-
if (!
|
|
19255
|
+
} }, F = "en", x = {};
|
|
19256
|
+
x[F] = D;
|
|
19257
|
+
var w = "$isDayjsObject", V = function(I) {
|
|
19258
|
+
return I instanceof $ || !(!I || !I[w]);
|
|
19259
|
+
}, q = function I(L, B, W) {
|
|
19260
|
+
var H;
|
|
19261
|
+
if (!L) return F;
|
|
19262
|
+
if (typeof L == "string") {
|
|
19263
|
+
var z = L.toLowerCase();
|
|
19264
|
+
x[z] && (H = z), B && (x[z] = B, H = z);
|
|
19265
|
+
var y = L.split("-");
|
|
19266
|
+
if (!H && y.length > 1) return I(y[0]);
|
|
19266
19267
|
} else {
|
|
19267
|
-
var ne =
|
|
19268
|
-
x[ne] =
|
|
19268
|
+
var ne = L.name;
|
|
19269
|
+
x[ne] = L, H = ne;
|
|
19269
19270
|
}
|
|
19270
|
-
return !
|
|
19271
|
-
}, te = function(I,
|
|
19272
|
-
if (
|
|
19273
|
-
var
|
|
19274
|
-
return
|
|
19275
|
-
}, Y =
|
|
19276
|
-
Y.l = q, Y.i =
|
|
19277
|
-
return te(I, { locale:
|
|
19271
|
+
return !W && H && (F = H), H || !W && F;
|
|
19272
|
+
}, te = function(I, L) {
|
|
19273
|
+
if (V(I)) return I.clone();
|
|
19274
|
+
var B = typeof L == "object" ? L : {};
|
|
19275
|
+
return B.date = I, B.args = arguments, new $(B);
|
|
19276
|
+
}, Y = X;
|
|
19277
|
+
Y.l = q, Y.i = V, Y.w = function(I, L) {
|
|
19278
|
+
return te(I, { locale: L.$L, utc: L.$u, x: L.$x, $offset: L.$offset });
|
|
19278
19279
|
};
|
|
19279
19280
|
var $ = (function() {
|
|
19280
|
-
function I(
|
|
19281
|
-
this.$L = q(
|
|
19281
|
+
function I(B) {
|
|
19282
|
+
this.$L = q(B.locale, null, !0), this.parse(B), this.$x = this.$x || B.x || {}, this[w] = !0;
|
|
19282
19283
|
}
|
|
19283
|
-
var
|
|
19284
|
-
return
|
|
19285
|
-
this.$d = (function(
|
|
19286
|
-
var
|
|
19287
|
-
if (
|
|
19288
|
-
if (Y.u(
|
|
19289
|
-
if (
|
|
19290
|
-
if (typeof
|
|
19291
|
-
var y =
|
|
19284
|
+
var L = I.prototype;
|
|
19285
|
+
return L.parse = function(B) {
|
|
19286
|
+
this.$d = (function(W) {
|
|
19287
|
+
var H = W.date, z = W.utc;
|
|
19288
|
+
if (H === null) return /* @__PURE__ */ new Date(NaN);
|
|
19289
|
+
if (Y.u(H)) return /* @__PURE__ */ new Date();
|
|
19290
|
+
if (H instanceof Date) return new Date(H);
|
|
19291
|
+
if (typeof H == "string" && !/Z$/i.test(H)) {
|
|
19292
|
+
var y = H.match(T);
|
|
19292
19293
|
if (y) {
|
|
19293
19294
|
var ne = y[2] - 1 || 0, ae = (y[7] || "0").substring(0, 3);
|
|
19294
19295
|
return z ? new Date(Date.UTC(y[1], ne, y[3] || 1, y[4] || 0, y[5] || 0, y[6] || 0, ae)) : new Date(y[1], ne, y[3] || 1, y[4] || 0, y[5] || 0, y[6] || 0, ae);
|
|
19295
19296
|
}
|
|
19296
19297
|
}
|
|
19297
|
-
return new Date(
|
|
19298
|
-
})(
|
|
19299
|
-
},
|
|
19300
|
-
var
|
|
19301
|
-
this.$y =
|
|
19302
|
-
},
|
|
19298
|
+
return new Date(H);
|
|
19299
|
+
})(B), this.init();
|
|
19300
|
+
}, L.init = function() {
|
|
19301
|
+
var B = this.$d;
|
|
19302
|
+
this.$y = B.getFullYear(), this.$M = B.getMonth(), this.$D = B.getDate(), this.$W = B.getDay(), this.$H = B.getHours(), this.$m = B.getMinutes(), this.$s = B.getSeconds(), this.$ms = B.getMilliseconds();
|
|
19303
|
+
}, L.$utils = function() {
|
|
19303
19304
|
return Y;
|
|
19304
|
-
},
|
|
19305
|
+
}, L.isValid = function() {
|
|
19305
19306
|
return this.$d.toString() !== m;
|
|
19306
|
-
},
|
|
19307
|
-
var
|
|
19308
|
-
return this.startOf(
|
|
19309
|
-
},
|
|
19310
|
-
return te(
|
|
19311
|
-
},
|
|
19312
|
-
return this.endOf(
|
|
19313
|
-
},
|
|
19314
|
-
return Y.u(
|
|
19315
|
-
},
|
|
19307
|
+
}, L.isSame = function(B, W) {
|
|
19308
|
+
var H = te(B);
|
|
19309
|
+
return this.startOf(W) <= H && H <= this.endOf(W);
|
|
19310
|
+
}, L.isAfter = function(B, W) {
|
|
19311
|
+
return te(B) < this.startOf(W);
|
|
19312
|
+
}, L.isBefore = function(B, W) {
|
|
19313
|
+
return this.endOf(W) < te(B);
|
|
19314
|
+
}, L.$g = function(B, W, H) {
|
|
19315
|
+
return Y.u(B) ? this[W] : this.set(H, B);
|
|
19316
|
+
}, L.unix = function() {
|
|
19316
19317
|
return Math.floor(this.valueOf() / 1e3);
|
|
19317
|
-
},
|
|
19318
|
+
}, L.valueOf = function() {
|
|
19318
19319
|
return this.$d.getTime();
|
|
19319
|
-
},
|
|
19320
|
-
var
|
|
19321
|
-
var nt = Y.w(
|
|
19320
|
+
}, L.startOf = function(B, W) {
|
|
19321
|
+
var H = this, z = !!Y.u(W) || W, y = Y.p(B), ne = function(ze, Ie) {
|
|
19322
|
+
var nt = Y.w(H.$u ? Date.UTC(H.$y, Ie, ze) : new Date(H.$y, Ie, ze), H);
|
|
19322
19323
|
return z ? nt : nt.endOf(c);
|
|
19323
19324
|
}, ae = function(ze, Ie) {
|
|
19324
|
-
return Y.w(
|
|
19325
|
+
return Y.w(H.toDate()[ze].apply(H.toDate("s"), (z ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(Ie)), H);
|
|
19325
19326
|
}, v = this.$W, se = this.$M, _e = this.$D, pe = "set" + (this.$u ? "UTC" : "");
|
|
19326
19327
|
switch (y) {
|
|
19327
19328
|
case h:
|
|
@@ -19343,39 +19344,39 @@ function DT() {
|
|
|
19343
19344
|
default:
|
|
19344
19345
|
return this.clone();
|
|
19345
19346
|
}
|
|
19346
|
-
},
|
|
19347
|
-
return this.startOf(
|
|
19348
|
-
},
|
|
19349
|
-
var
|
|
19347
|
+
}, L.endOf = function(B) {
|
|
19348
|
+
return this.startOf(B, !1);
|
|
19349
|
+
}, L.$set = function(B, W) {
|
|
19350
|
+
var H, z = Y.p(B), y = "set" + (this.$u ? "UTC" : ""), ne = (H = {}, H[c] = y + "Date", H[b] = y + "Date", H[f] = y + "Month", H[h] = y + "FullYear", H[l] = y + "Hours", H[s] = y + "Minutes", H[u] = y + "Seconds", H[i] = y + "Milliseconds", H)[z], ae = z === c ? this.$D + (W - this.$W) : W;
|
|
19350
19351
|
if (z === f || z === h) {
|
|
19351
19352
|
var v = this.clone().set(b, 1);
|
|
19352
19353
|
v.$d[ne](ae), v.init(), this.$d = v.set(b, Math.min(this.$D, v.daysInMonth())).$d;
|
|
19353
19354
|
} else ne && this.$d[ne](ae);
|
|
19354
19355
|
return this.init(), this;
|
|
19355
|
-
},
|
|
19356
|
-
return this.clone().$set(
|
|
19357
|
-
},
|
|
19358
|
-
return this[Y.p(
|
|
19359
|
-
},
|
|
19360
|
-
var
|
|
19361
|
-
|
|
19362
|
-
var y = Y.p(
|
|
19356
|
+
}, L.set = function(B, W) {
|
|
19357
|
+
return this.clone().$set(B, W);
|
|
19358
|
+
}, L.get = function(B) {
|
|
19359
|
+
return this[Y.p(B)]();
|
|
19360
|
+
}, L.add = function(B, W) {
|
|
19361
|
+
var H, z = this;
|
|
19362
|
+
B = Number(B);
|
|
19363
|
+
var y = Y.p(W), ne = function(se) {
|
|
19363
19364
|
var _e = te(z);
|
|
19364
|
-
return Y.w(_e.date(_e.date() + Math.round(se *
|
|
19365
|
+
return Y.w(_e.date(_e.date() + Math.round(se * B)), z);
|
|
19365
19366
|
};
|
|
19366
|
-
if (y === f) return this.set(f, this.$M +
|
|
19367
|
-
if (y === h) return this.set(h, this.$y +
|
|
19367
|
+
if (y === f) return this.set(f, this.$M + B);
|
|
19368
|
+
if (y === h) return this.set(h, this.$y + B);
|
|
19368
19369
|
if (y === c) return ne(1);
|
|
19369
19370
|
if (y === d) return ne(7);
|
|
19370
|
-
var ae = (
|
|
19371
|
+
var ae = (H = {}, H[s] = r, H[l] = a, H[u] = n, H)[y] || 1, v = this.$d.getTime() + B * ae;
|
|
19371
19372
|
return Y.w(v, this);
|
|
19372
|
-
},
|
|
19373
|
-
return this.add(-1 *
|
|
19374
|
-
},
|
|
19375
|
-
var
|
|
19376
|
-
if (!this.isValid()) return
|
|
19377
|
-
var z =
|
|
19378
|
-
return Ie && (Ie[nt] || Ie(
|
|
19373
|
+
}, L.subtract = function(B, W) {
|
|
19374
|
+
return this.add(-1 * B, W);
|
|
19375
|
+
}, L.format = function(B) {
|
|
19376
|
+
var W = this, H = this.$locale();
|
|
19377
|
+
if (!this.isValid()) return H.invalidDate || m;
|
|
19378
|
+
var z = B || "YYYY-MM-DDTHH:mm:ssZ", y = Y.z(this), ne = this.$H, ae = this.$m, v = this.$M, se = H.weekdays, _e = H.months, pe = H.meridiem, Se = function(Ie, nt, st, wt) {
|
|
19379
|
+
return Ie && (Ie[nt] || Ie(W, z)) || st[nt].slice(0, wt);
|
|
19379
19380
|
}, Oe = function(Ie) {
|
|
19380
19381
|
return Y.s(ne % 12 || 12, Ie, "0");
|
|
19381
19382
|
}, ze = pe || function(Ie, nt, st) {
|
|
@@ -19386,29 +19387,29 @@ function DT() {
|
|
|
19386
19387
|
return nt || (function(st) {
|
|
19387
19388
|
switch (st) {
|
|
19388
19389
|
case "YY":
|
|
19389
|
-
return String(
|
|
19390
|
+
return String(W.$y).slice(-2);
|
|
19390
19391
|
case "YYYY":
|
|
19391
|
-
return Y.s(
|
|
19392
|
+
return Y.s(W.$y, 4, "0");
|
|
19392
19393
|
case "M":
|
|
19393
19394
|
return v + 1;
|
|
19394
19395
|
case "MM":
|
|
19395
19396
|
return Y.s(v + 1, 2, "0");
|
|
19396
19397
|
case "MMM":
|
|
19397
|
-
return Se(
|
|
19398
|
+
return Se(H.monthsShort, v, _e, 3);
|
|
19398
19399
|
case "MMMM":
|
|
19399
19400
|
return Se(_e, v);
|
|
19400
19401
|
case "D":
|
|
19401
|
-
return
|
|
19402
|
+
return W.$D;
|
|
19402
19403
|
case "DD":
|
|
19403
|
-
return Y.s(
|
|
19404
|
+
return Y.s(W.$D, 2, "0");
|
|
19404
19405
|
case "d":
|
|
19405
|
-
return String(
|
|
19406
|
+
return String(W.$W);
|
|
19406
19407
|
case "dd":
|
|
19407
|
-
return Se(
|
|
19408
|
+
return Se(H.weekdaysMin, W.$W, se, 2);
|
|
19408
19409
|
case "ddd":
|
|
19409
|
-
return Se(
|
|
19410
|
+
return Se(H.weekdaysShort, W.$W, se, 3);
|
|
19410
19411
|
case "dddd":
|
|
19411
|
-
return se[
|
|
19412
|
+
return se[W.$W];
|
|
19412
19413
|
case "H":
|
|
19413
19414
|
return String(ne);
|
|
19414
19415
|
case "HH":
|
|
@@ -19426,21 +19427,21 @@ function DT() {
|
|
|
19426
19427
|
case "mm":
|
|
19427
19428
|
return Y.s(ae, 2, "0");
|
|
19428
19429
|
case "s":
|
|
19429
|
-
return String(
|
|
19430
|
+
return String(W.$s);
|
|
19430
19431
|
case "ss":
|
|
19431
|
-
return Y.s(
|
|
19432
|
+
return Y.s(W.$s, 2, "0");
|
|
19432
19433
|
case "SSS":
|
|
19433
|
-
return Y.s(
|
|
19434
|
+
return Y.s(W.$ms, 3, "0");
|
|
19434
19435
|
case "Z":
|
|
19435
19436
|
return y;
|
|
19436
19437
|
}
|
|
19437
19438
|
return null;
|
|
19438
19439
|
})(Ie) || y.replace(":", "");
|
|
19439
19440
|
}));
|
|
19440
|
-
},
|
|
19441
|
+
}, L.utcOffset = function() {
|
|
19441
19442
|
return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
|
|
19442
|
-
},
|
|
19443
|
-
var z, y = this, ne = Y.p(
|
|
19443
|
+
}, L.diff = function(B, W, H) {
|
|
19444
|
+
var z, y = this, ne = Y.p(W), ae = te(B), v = (ae.utcOffset() - this.utcOffset()) * r, se = this - ae, _e = function() {
|
|
19444
19445
|
return Y.m(y, ae);
|
|
19445
19446
|
};
|
|
19446
19447
|
switch (ne) {
|
|
@@ -19471,36 +19472,36 @@ function DT() {
|
|
|
19471
19472
|
default:
|
|
19472
19473
|
z = se;
|
|
19473
19474
|
}
|
|
19474
|
-
return
|
|
19475
|
-
},
|
|
19475
|
+
return H ? z : Y.a(z);
|
|
19476
|
+
}, L.daysInMonth = function() {
|
|
19476
19477
|
return this.endOf(f).$D;
|
|
19477
|
-
},
|
|
19478
|
+
}, L.$locale = function() {
|
|
19478
19479
|
return x[this.$L];
|
|
19479
|
-
},
|
|
19480
|
-
if (!
|
|
19481
|
-
var
|
|
19482
|
-
return z && (
|
|
19483
|
-
},
|
|
19480
|
+
}, L.locale = function(B, W) {
|
|
19481
|
+
if (!B) return this.$L;
|
|
19482
|
+
var H = this.clone(), z = q(B, W, !0);
|
|
19483
|
+
return z && (H.$L = z), H;
|
|
19484
|
+
}, L.clone = function() {
|
|
19484
19485
|
return Y.w(this.$d, this);
|
|
19485
|
-
},
|
|
19486
|
+
}, L.toDate = function() {
|
|
19486
19487
|
return new Date(this.valueOf());
|
|
19487
|
-
},
|
|
19488
|
+
}, L.toJSON = function() {
|
|
19488
19489
|
return this.isValid() ? this.toISOString() : null;
|
|
19489
|
-
},
|
|
19490
|
+
}, L.toISOString = function() {
|
|
19490
19491
|
return this.$d.toISOString();
|
|
19491
|
-
},
|
|
19492
|
+
}, L.toString = function() {
|
|
19492
19493
|
return this.$d.toUTCString();
|
|
19493
19494
|
}, I;
|
|
19494
|
-
})(),
|
|
19495
|
-
return te.prototype =
|
|
19496
|
-
|
|
19497
|
-
return this.$g(
|
|
19495
|
+
})(), k = $.prototype;
|
|
19496
|
+
return te.prototype = k, [["$ms", i], ["$s", u], ["$m", s], ["$H", l], ["$W", c], ["$M", f], ["$y", h], ["$D", b]].forEach((function(I) {
|
|
19497
|
+
k[I[1]] = function(L) {
|
|
19498
|
+
return this.$g(L, I[0], I[1]);
|
|
19498
19499
|
};
|
|
19499
|
-
})), te.extend = function(I,
|
|
19500
|
-
return I.$i || (I(
|
|
19501
|
-
}, te.locale = q, te.isDayjs =
|
|
19500
|
+
})), te.extend = function(I, L) {
|
|
19501
|
+
return I.$i || (I(L, $, te), I.$i = !0), te;
|
|
19502
|
+
}, te.locale = q, te.isDayjs = V, te.unix = function(I) {
|
|
19502
19503
|
return te(1e3 * I);
|
|
19503
|
-
}, te.en = x[
|
|
19504
|
+
}, te.en = x[F], te.Ls = x, te.p = {}, te;
|
|
19504
19505
|
}));
|
|
19505
19506
|
})(Br)), Br.exports;
|
|
19506
19507
|
}
|
|
@@ -19964,14 +19965,14 @@ const GT = (e) => ({
|
|
|
19964
19965
|
d?.userMessageBubble?.style
|
|
19965
19966
|
),
|
|
19966
19967
|
[c, d?.userMessageBubble?.style]
|
|
19967
|
-
),
|
|
19968
|
+
), X = un(
|
|
19968
19969
|
() => GT(l)(f),
|
|
19969
19970
|
[f, l]
|
|
19970
|
-
),
|
|
19971
|
+
), F = un(() => {
|
|
19971
19972
|
if (!D) return null;
|
|
19972
19973
|
if (T === ve.USER)
|
|
19973
|
-
return
|
|
19974
|
-
const x = XT(
|
|
19974
|
+
return X;
|
|
19975
|
+
const x = XT(X);
|
|
19975
19976
|
return /* @__PURE__ */ _.jsx(
|
|
19976
19977
|
Ui,
|
|
19977
19978
|
{
|
|
@@ -19987,7 +19988,7 @@ const GT = (e) => ({
|
|
|
19987
19988
|
);
|
|
19988
19989
|
}, [
|
|
19989
19990
|
D,
|
|
19990
|
-
|
|
19991
|
+
X,
|
|
19991
19992
|
i,
|
|
19992
19993
|
P,
|
|
19993
19994
|
T
|
|
@@ -20020,7 +20021,7 @@ const GT = (e) => ({
|
|
|
20020
20021
|
className: P[T].bubbleClassName,
|
|
20021
20022
|
style: P[T].bubbleStyle,
|
|
20022
20023
|
children: [
|
|
20023
|
-
|
|
20024
|
+
F,
|
|
20024
20025
|
g && /* @__PURE__ */ _.jsxs(_.Fragment, { children: [
|
|
20025
20026
|
/* @__PURE__ */ _.jsx("div", { children: KT }),
|
|
20026
20027
|
/* @__PURE__ */ _.jsx(
|
|
@@ -20667,9 +20668,9 @@ function JT() {
|
|
|
20667
20668
|
return m && window.clearTimeout(m);
|
|
20668
20669
|
};
|
|
20669
20670
|
}, c = function(d, f, p, h, b, m, T) {
|
|
20670
|
-
var g = f.setLastMessage, D = f.setReadyState, P,
|
|
20671
|
-
return p.current.fromSocketIO && (P = (0, t.setUpSocketIOPing)(T)), i(d, p, g, m), u(d, p, D, b, m),
|
|
20672
|
-
D(r.ReadyState.CLOSING),
|
|
20671
|
+
var g = f.setLastMessage, D = f.setReadyState, P, X, F;
|
|
20672
|
+
return p.current.fromSocketIO && (P = (0, t.setUpSocketIOPing)(T)), i(d, p, g, m), u(d, p, D, b, m), X = s(d, p, D, h, b), F = l(d, p, D, h, b), function() {
|
|
20673
|
+
D(r.ReadyState.CLOSING), X(), F(), d.close(), P && clearInterval(P);
|
|
20673
20674
|
};
|
|
20674
20675
|
};
|
|
20675
20676
|
return en.attachListeners = c, en;
|
|
@@ -20881,22 +20882,22 @@ function n3() {
|
|
|
20881
20882
|
for (var d = [], f = 2; f < arguments.length; f++)
|
|
20882
20883
|
d[f - 2] = arguments[f];
|
|
20883
20884
|
return t(void 0, r([l, c], d, !0), void 0, function(p, h, b) {
|
|
20884
|
-
var m, T, g, D, P,
|
|
20885
|
-
return b === void 0 && (b = 0), n(this, function(
|
|
20886
|
-
switch (
|
|
20885
|
+
var m, T, g, D, P, X, F, x;
|
|
20886
|
+
return b === void 0 && (b = 0), n(this, function(w) {
|
|
20887
|
+
switch (w.label) {
|
|
20887
20888
|
case 0:
|
|
20888
20889
|
if (typeof p != "function") return [3, 10];
|
|
20889
|
-
|
|
20890
|
+
w.label = 1;
|
|
20890
20891
|
case 1:
|
|
20891
|
-
return
|
|
20892
|
+
return w.trys.push([1, 3, , 9]), [4, p()];
|
|
20892
20893
|
case 2:
|
|
20893
|
-
return m =
|
|
20894
|
+
return m = w.sent(), [3, 9];
|
|
20894
20895
|
case 3:
|
|
20895
|
-
return
|
|
20896
|
+
return w.sent(), h.current.retryOnError ? (T = (X = h.current.reconnectAttempts) !== null && X !== void 0 ? X : i.DEFAULT_RECONNECT_LIMIT, b < T ? (g = typeof h.current.reconnectInterval == "function" ? h.current.reconnectInterval(b) : h.current.reconnectInterval, [4, u(g ?? i.DEFAULT_RECONNECT_INTERVAL_MS)]) : [3, 5]) : [3, 7];
|
|
20896
20897
|
case 4:
|
|
20897
|
-
return
|
|
20898
|
+
return w.sent(), [2, (0, e.getUrl)(p, h, b + 1)];
|
|
20898
20899
|
case 5:
|
|
20899
|
-
return (x = (
|
|
20900
|
+
return (x = (F = h.current).onReconnectStop) === null || x === void 0 || x.call(F, b), [2, null];
|
|
20900
20901
|
case 6:
|
|
20901
20902
|
return [3, 8];
|
|
20902
20903
|
case 7:
|
|
@@ -20906,7 +20907,7 @@ function n3() {
|
|
|
20906
20907
|
case 9:
|
|
20907
20908
|
return [3, 11];
|
|
20908
20909
|
case 10:
|
|
20909
|
-
m = p,
|
|
20910
|
+
m = p, w.label = 11;
|
|
20910
20911
|
case 11:
|
|
20911
20912
|
return D = h.current.fromSocketIO ? (0, a.parseSocketIOUrl)(m) : m, P = h.current.queryParams ? (0, a.appendQueryParams)(D, h.current.queryParams) : D, [2, P];
|
|
20912
20913
|
}
|
|
@@ -20956,22 +20957,22 @@ function su() {
|
|
|
20956
20957
|
return new (b || (b = Promise))(function(g, D) {
|
|
20957
20958
|
function P(x) {
|
|
20958
20959
|
try {
|
|
20959
|
-
|
|
20960
|
-
} catch (
|
|
20961
|
-
D(
|
|
20960
|
+
F(m.next(x));
|
|
20961
|
+
} catch (w) {
|
|
20962
|
+
D(w);
|
|
20962
20963
|
}
|
|
20963
20964
|
}
|
|
20964
|
-
function
|
|
20965
|
+
function X(x) {
|
|
20965
20966
|
try {
|
|
20966
|
-
|
|
20967
|
-
} catch (
|
|
20968
|
-
D(
|
|
20967
|
+
F(m.throw(x));
|
|
20968
|
+
} catch (w) {
|
|
20969
|
+
D(w);
|
|
20969
20970
|
}
|
|
20970
20971
|
}
|
|
20971
|
-
function
|
|
20972
|
-
x.done ? g(x.value) : T(x.value).then(P,
|
|
20972
|
+
function F(x) {
|
|
20973
|
+
x.done ? g(x.value) : T(x.value).then(P, X);
|
|
20973
20974
|
}
|
|
20974
|
-
|
|
20975
|
+
F((m = m.apply(p, h || [])).next());
|
|
20975
20976
|
});
|
|
20976
20977
|
}, n = gt && gt.__generator || function(p, h) {
|
|
20977
20978
|
var b = { label: 0, sent: function() {
|
|
@@ -20981,56 +20982,56 @@ function su() {
|
|
|
20981
20982
|
return D.next = P(0), D.throw = P(1), D.return = P(2), typeof Symbol == "function" && (D[Symbol.iterator] = function() {
|
|
20982
20983
|
return this;
|
|
20983
20984
|
}), D;
|
|
20984
|
-
function P(
|
|
20985
|
+
function P(F) {
|
|
20985
20986
|
return function(x) {
|
|
20986
|
-
return
|
|
20987
|
+
return X([F, x]);
|
|
20987
20988
|
};
|
|
20988
20989
|
}
|
|
20989
|
-
function
|
|
20990
|
+
function X(F) {
|
|
20990
20991
|
if (m) throw new TypeError("Generator is already executing.");
|
|
20991
|
-
for (; D && (D = 0,
|
|
20992
|
-
if (m = 1, T && (g =
|
|
20993
|
-
switch (T = 0, g && (
|
|
20992
|
+
for (; D && (D = 0, F[0] && (b = 0)), b; ) try {
|
|
20993
|
+
if (m = 1, T && (g = F[0] & 2 ? T.return : F[0] ? T.throw || ((g = T.return) && g.call(T), 0) : T.next) && !(g = g.call(T, F[1])).done) return g;
|
|
20994
|
+
switch (T = 0, g && (F = [F[0] & 2, g.value]), F[0]) {
|
|
20994
20995
|
case 0:
|
|
20995
20996
|
case 1:
|
|
20996
|
-
g =
|
|
20997
|
+
g = F;
|
|
20997
20998
|
break;
|
|
20998
20999
|
case 4:
|
|
20999
|
-
return b.label++, { value:
|
|
21000
|
+
return b.label++, { value: F[1], done: !1 };
|
|
21000
21001
|
case 5:
|
|
21001
|
-
b.label++, T =
|
|
21002
|
+
b.label++, T = F[1], F = [0];
|
|
21002
21003
|
continue;
|
|
21003
21004
|
case 7:
|
|
21004
|
-
|
|
21005
|
+
F = b.ops.pop(), b.trys.pop();
|
|
21005
21006
|
continue;
|
|
21006
21007
|
default:
|
|
21007
|
-
if (g = b.trys, !(g = g.length > 0 && g[g.length - 1]) && (
|
|
21008
|
+
if (g = b.trys, !(g = g.length > 0 && g[g.length - 1]) && (F[0] === 6 || F[0] === 2)) {
|
|
21008
21009
|
b = 0;
|
|
21009
21010
|
continue;
|
|
21010
21011
|
}
|
|
21011
|
-
if (
|
|
21012
|
-
b.label =
|
|
21012
|
+
if (F[0] === 3 && (!g || F[1] > g[0] && F[1] < g[3])) {
|
|
21013
|
+
b.label = F[1];
|
|
21013
21014
|
break;
|
|
21014
21015
|
}
|
|
21015
|
-
if (
|
|
21016
|
-
b.label = g[1], g =
|
|
21016
|
+
if (F[0] === 6 && b.label < g[1]) {
|
|
21017
|
+
b.label = g[1], g = F;
|
|
21017
21018
|
break;
|
|
21018
21019
|
}
|
|
21019
21020
|
if (g && b.label < g[2]) {
|
|
21020
|
-
b.label = g[2], b.ops.push(
|
|
21021
|
+
b.label = g[2], b.ops.push(F);
|
|
21021
21022
|
break;
|
|
21022
21023
|
}
|
|
21023
21024
|
g[2] && b.ops.pop(), b.trys.pop();
|
|
21024
21025
|
continue;
|
|
21025
21026
|
}
|
|
21026
|
-
|
|
21027
|
+
F = h.call(p, b);
|
|
21027
21028
|
} catch (x) {
|
|
21028
|
-
|
|
21029
|
+
F = [6, x], T = 0;
|
|
21029
21030
|
} finally {
|
|
21030
21031
|
m = g = 0;
|
|
21031
21032
|
}
|
|
21032
|
-
if (
|
|
21033
|
-
return { value:
|
|
21033
|
+
if (F[0] & 5) throw F[1];
|
|
21034
|
+
return { value: F[0] ? F[1] : void 0, done: !0 };
|
|
21034
21035
|
}
|
|
21035
21036
|
}, r = gt && gt.__importDefault || function(p) {
|
|
21036
21037
|
return p && p.__esModule ? p : { default: p };
|
|
@@ -21038,7 +21039,7 @@ function su() {
|
|
|
21038
21039
|
Object.defineProperty(gt, "__esModule", { value: !0 }), gt.useWebSocket = void 0;
|
|
21039
21040
|
var a = Ct, i = w0, u = Bt(), s = t3(), l = n3(), c = r(r3()), d = ou(), f = function(p, h, b) {
|
|
21040
21041
|
h === void 0 && (h = u.DEFAULT_OPTIONS), b === void 0 && (b = !0);
|
|
21041
|
-
var m = (0, a.useState)(null), T = m[0], g = m[1], D = (0, a.useState)({}), P = D[0],
|
|
21042
|
+
var m = (0, a.useState)(null), T = m[0], g = m[1], D = (0, a.useState)({}), P = D[0], X = D[1], F = (0, a.useMemo)(function() {
|
|
21042
21043
|
if (!h.disableJson && T)
|
|
21043
21044
|
try {
|
|
21044
21045
|
return JSON.parse(T.data);
|
|
@@ -21046,20 +21047,20 @@ function su() {
|
|
|
21046
21047
|
return u.UNPARSABLE_JSON_OBJECT;
|
|
21047
21048
|
}
|
|
21048
21049
|
return null;
|
|
21049
|
-
}, [T, h.disableJson]), x = (0, a.useRef)(null),
|
|
21050
|
-
}), q = (0, a.useRef)(0), te = (0, a.useRef)(Date.now()), Y = (0, a.useRef)([]), $ = (0, a.useRef)(null),
|
|
21051
|
-
|
|
21052
|
-
var I = x.current && P[x.current] !== void 0 ? P[x.current] : p !== null && b === !0 ? u.ReadyState.CONNECTING : u.ReadyState.UNINSTANTIATED,
|
|
21050
|
+
}, [T, h.disableJson]), x = (0, a.useRef)(null), w = (0, a.useRef)(null), V = (0, a.useRef)(function() {
|
|
21051
|
+
}), q = (0, a.useRef)(0), te = (0, a.useRef)(Date.now()), Y = (0, a.useRef)([]), $ = (0, a.useRef)(null), k = (0, a.useRef)(h);
|
|
21052
|
+
k.current = h;
|
|
21053
|
+
var I = x.current && P[x.current] !== void 0 ? P[x.current] : p !== null && b === !0 ? u.ReadyState.CONNECTING : u.ReadyState.UNINSTANTIATED, L = h.queryParams ? JSON.stringify(h.queryParams) : null, B = (0, a.useCallback)(function(z, y) {
|
|
21053
21054
|
var ne;
|
|
21054
|
-
if (y === void 0 && (y = !0), u.isEventSourceSupported &&
|
|
21055
|
+
if (y === void 0 && (y = !0), u.isEventSourceSupported && w.current instanceof EventSource) {
|
|
21055
21056
|
console.warn("Unable to send a message from an eventSource");
|
|
21056
21057
|
return;
|
|
21057
21058
|
}
|
|
21058
|
-
((ne =
|
|
21059
|
-
}, []),
|
|
21060
|
-
y === void 0 && (y = !0),
|
|
21061
|
-
}, [
|
|
21062
|
-
return
|
|
21059
|
+
((ne = w.current) === null || ne === void 0 ? void 0 : ne.readyState) === u.ReadyState.OPEN ? ((0, d.assertIsWebSocket)(w.current, k.current.skipAssert), w.current.send(z)) : y && Y.current.push(z);
|
|
21060
|
+
}, []), W = (0, a.useCallback)(function(z, y) {
|
|
21061
|
+
y === void 0 && (y = !0), B(JSON.stringify(z), y);
|
|
21062
|
+
}, [B]), H = (0, a.useCallback)(function() {
|
|
21063
|
+
return k.current.share !== !0 || u.isEventSourceSupported && w.current instanceof EventSource ? w.current : ($.current === null && w.current && ((0, d.assertIsWebSocket)(w.current, k.current.skipAssert), $.current = (0, c.default)(w.current, V)), $.current);
|
|
21063
21064
|
}, []);
|
|
21064
21065
|
return (0, a.useEffect)(function() {
|
|
21065
21066
|
if (p !== null && b === !0) {
|
|
@@ -21069,10 +21070,10 @@ function su() {
|
|
|
21069
21070
|
return n(this, function(pe) {
|
|
21070
21071
|
switch (pe.label) {
|
|
21071
21072
|
case 0:
|
|
21072
|
-
return v = x, [4, (0, l.getUrl)(p,
|
|
21073
|
+
return v = x, [4, (0, l.getUrl)(p, k)];
|
|
21073
21074
|
case 1:
|
|
21074
21075
|
return v.current = pe.sent(), x.current === null ? (console.error("Failed to get a valid URL. WebSocket connection aborted."), x.current = "ABORTED", (0, i.flushSync)(function() {
|
|
21075
|
-
return
|
|
21076
|
+
return X(function(Se) {
|
|
21076
21077
|
return e(e({}, Se), { ABORTED: u.ReadyState.CLOSED });
|
|
21077
21078
|
});
|
|
21078
21079
|
}), [
|
|
@@ -21084,12 +21085,12 @@ function su() {
|
|
|
21084
21085
|
});
|
|
21085
21086
|
}, _e = function(Se) {
|
|
21086
21087
|
y || (0, i.flushSync)(function() {
|
|
21087
|
-
return
|
|
21088
|
+
return X(function(Oe) {
|
|
21088
21089
|
var ze;
|
|
21089
21090
|
return e(e({}, Oe), x.current && (ze = {}, ze[x.current] = Se, ze));
|
|
21090
21091
|
});
|
|
21091
21092
|
});
|
|
21092
|
-
}, ne && (z = (0, s.createOrJoinSocket)(
|
|
21093
|
+
}, ne && (z = (0, s.createOrJoinSocket)(w, x.current, _e, k, se, V, q, te, B)), [
|
|
21093
21094
|
2
|
|
21094
21095
|
/*return*/
|
|
21095
21096
|
]);
|
|
@@ -21097,26 +21098,26 @@ function su() {
|
|
|
21097
21098
|
});
|
|
21098
21099
|
});
|
|
21099
21100
|
};
|
|
21100
|
-
return
|
|
21101
|
+
return V.current = function() {
|
|
21101
21102
|
y || ($.current && ($.current = null), z?.(), ae());
|
|
21102
21103
|
}, ae(), function() {
|
|
21103
21104
|
y = !0, ne = !1, $.current && ($.current = null), z?.(), g(null);
|
|
21104
21105
|
};
|
|
21105
|
-
} else (p === null || b === !1) && (q.current = 0,
|
|
21106
|
+
} else (p === null || b === !1) && (q.current = 0, X(function(v) {
|
|
21106
21107
|
var se;
|
|
21107
21108
|
return e(e({}, v), x.current && (se = {}, se[x.current] = u.ReadyState.CLOSED, se));
|
|
21108
21109
|
}));
|
|
21109
|
-
}, [p, b,
|
|
21110
|
+
}, [p, b, L, B]), (0, a.useEffect)(function() {
|
|
21110
21111
|
I === u.ReadyState.OPEN && Y.current.splice(0).forEach(function(z) {
|
|
21111
|
-
|
|
21112
|
+
B(z);
|
|
21112
21113
|
});
|
|
21113
21114
|
}, [I]), {
|
|
21114
|
-
sendMessage:
|
|
21115
|
-
sendJsonMessage:
|
|
21115
|
+
sendMessage: B,
|
|
21116
|
+
sendJsonMessage: W,
|
|
21116
21117
|
lastMessage: T,
|
|
21117
|
-
lastJsonMessage:
|
|
21118
|
+
lastJsonMessage: F,
|
|
21118
21119
|
readyState: I,
|
|
21119
|
-
getWebSocket:
|
|
21120
|
+
getWebSocket: H
|
|
21120
21121
|
};
|
|
21121
21122
|
};
|
|
21122
21123
|
return gt.useWebSocket = f, gt;
|
|
@@ -21199,8 +21200,8 @@ function i3() {
|
|
|
21199
21200
|
var b = (0, r.useWebSocket)(u, p, l), m = b.lastMessage, T = b.readyState, g = b.getWebSocket;
|
|
21200
21201
|
return (0, n.useEffect)(function() {
|
|
21201
21202
|
m?.type && Object.entries(h.current).forEach(function(D) {
|
|
21202
|
-
var P = D[0],
|
|
21203
|
-
P === m.type &&
|
|
21203
|
+
var P = D[0], X = D[1];
|
|
21204
|
+
P === m.type && X(m);
|
|
21204
21205
|
});
|
|
21205
21206
|
}, [m]), {
|
|
21206
21207
|
lastEvent: m,
|
|
@@ -21257,8 +21258,8 @@ const c3 = "This conversation with a live agent has ended. Please note that a tr
|
|
|
21257
21258
|
CONVERSATION: "CONVERSATION",
|
|
21258
21259
|
FORM: "FORM"
|
|
21259
21260
|
}, pn = Xr({}), hd = ({ children: e, liveChatPayload: t }) => {
|
|
21260
|
-
const { conversationScreen: n } = oe($e), { pushXpertMessage: r } = oe($t), { setHasError: a, setMode: i } = oe(tt), [u, s] = le(""), [l, c] = le(!1), [, d] = le(""), [f, p] = le([]), [h, b] = le(null), [m, T] = le(Yt.FORM), [g, D] = le(null), P = (
|
|
21261
|
-
const z = await l3(
|
|
21261
|
+
const { conversationScreen: n } = oe($e), { pushXpertMessage: r } = oe($t), { setHasError: a, setMode: i } = oe(tt), [u, s] = le(""), [l, c] = le(!1), [, d] = le(""), [f, p] = le([]), [h, b] = le(null), [m, T] = le(Yt.FORM), [g, D] = le(null), P = (H) => p((z) => [...z, H]), X = async (H) => {
|
|
21262
|
+
const z = await l3(H.data), { conversation_id: y, event_type: ne, body: ae } = z;
|
|
21262
21263
|
switch (ne) {
|
|
21263
21264
|
case "AGENT_TYPING":
|
|
21264
21265
|
return te();
|
|
@@ -21269,7 +21270,7 @@ const c3 = "This conversation with a live agent has ended. Please note that a tr
|
|
|
21269
21270
|
case "CONVERSATION_ERROR":
|
|
21270
21271
|
return;
|
|
21271
21272
|
case "CONVERSATION_TERMINATED":
|
|
21272
|
-
return
|
|
21273
|
+
return V();
|
|
21273
21274
|
case "CONVERSATION_TRANSFERRED_TO_GROUP":
|
|
21274
21275
|
return;
|
|
21275
21276
|
case "CONVERSATION_TRANSFERRED_TO_AGENT":
|
|
@@ -21283,18 +21284,18 @@ const c3 = "This conversation with a live agent has ended. Please note that a tr
|
|
|
21283
21284
|
default:
|
|
21284
21285
|
return;
|
|
21285
21286
|
}
|
|
21286
|
-
}, { sendJsonMessage:
|
|
21287
|
-
onMessage:
|
|
21287
|
+
}, { sendJsonMessage: F } = s3(h, {
|
|
21288
|
+
onMessage: X
|
|
21288
21289
|
}), x = () => {
|
|
21289
21290
|
T(Yt.FORM);
|
|
21290
|
-
const
|
|
21291
|
-
(!
|
|
21292
|
-
},
|
|
21293
|
-
|
|
21291
|
+
const H = n?.liveChat?.form;
|
|
21292
|
+
(!H || H.length === 0) && i(Nt.XPERT);
|
|
21293
|
+
}, w = () => {
|
|
21294
|
+
F({
|
|
21294
21295
|
action: "sendmessage",
|
|
21295
21296
|
event: "TERMINATE_CONVERSATION"
|
|
21296
21297
|
});
|
|
21297
|
-
},
|
|
21298
|
+
}, V = () => {
|
|
21298
21299
|
r({
|
|
21299
21300
|
content: c3,
|
|
21300
21301
|
role: ve.INFO
|
|
@@ -21303,21 +21304,21 @@ const c3 = "This conversation with a live agent has ended. Please note that a tr
|
|
|
21303
21304
|
d(""), b(null), T(Yt.FORM), i(Nt.XPERT);
|
|
21304
21305
|
}, te = () => {
|
|
21305
21306
|
g && clearTimeout(g), c(!0);
|
|
21306
|
-
const
|
|
21307
|
+
const H = setTimeout(() => {
|
|
21307
21308
|
c(!1);
|
|
21308
21309
|
}, 5e3);
|
|
21309
|
-
D(
|
|
21310
|
-
}, Y = (
|
|
21311
|
-
const { displayName: z } =
|
|
21310
|
+
D(H);
|
|
21311
|
+
}, Y = (H) => {
|
|
21312
|
+
const { displayName: z } = H;
|
|
21312
21313
|
p([]), s(z ?? "An agent"), T(Yt.CONVERSATION);
|
|
21313
|
-
}, $ = (
|
|
21314
|
-
const { messageId: z, text: y, timestamp: ne } =
|
|
21314
|
+
}, $ = (H) => {
|
|
21315
|
+
const { messageId: z, text: y, timestamp: ne } = H;
|
|
21315
21316
|
P({
|
|
21316
21317
|
content: y ?? "",
|
|
21317
21318
|
id: z ?? "",
|
|
21318
21319
|
role: ve.AGENT,
|
|
21319
21320
|
timestamp: ne ? new Date(ne) : void 0
|
|
21320
|
-
}),
|
|
21321
|
+
}), F({
|
|
21321
21322
|
action: "sendmessage",
|
|
21322
21323
|
messages: [
|
|
21323
21324
|
{
|
|
@@ -21327,27 +21328,27 @@ const c3 = "This conversation with a live agent has ended. Please note that a tr
|
|
|
21327
21328
|
],
|
|
21328
21329
|
event: "ACKNOWLEDGE_MESSAGE"
|
|
21329
21330
|
}), c(!1);
|
|
21330
|
-
},
|
|
21331
|
+
}, W = {
|
|
21331
21332
|
agentName: u,
|
|
21332
21333
|
agentTyping: l,
|
|
21333
21334
|
cancelLiveChatConnection: x,
|
|
21334
|
-
endLiveChat:
|
|
21335
|
+
endLiveChat: V,
|
|
21335
21336
|
liveChatMessages: f,
|
|
21336
21337
|
pushLiveChatMessage: P,
|
|
21337
|
-
sendMessage: (
|
|
21338
|
+
sendMessage: (H) => {
|
|
21338
21339
|
P({
|
|
21339
|
-
content:
|
|
21340
|
+
content: H,
|
|
21340
21341
|
id: "",
|
|
21341
21342
|
role: ve.USER,
|
|
21342
21343
|
timestamp: /* @__PURE__ */ new Date()
|
|
21343
|
-
}),
|
|
21344
|
+
}), F({
|
|
21344
21345
|
action: "sendmessage",
|
|
21345
21346
|
event: "OUTGOING_MESSAGE",
|
|
21346
|
-
message:
|
|
21347
|
+
message: H
|
|
21347
21348
|
});
|
|
21348
21349
|
},
|
|
21349
21350
|
sendTypingEvent: async () => {
|
|
21350
|
-
|
|
21351
|
+
F({
|
|
21351
21352
|
action: "sendmessage",
|
|
21352
21353
|
event: "TYPING"
|
|
21353
21354
|
});
|
|
@@ -21355,10 +21356,10 @@ const c3 = "This conversation with a live agent has ended. Please note that a tr
|
|
|
21355
21356
|
setLiveChatMessages: p,
|
|
21356
21357
|
step: m,
|
|
21357
21358
|
setStep: T,
|
|
21358
|
-
startLiveChat: (
|
|
21359
|
+
startLiveChat: (H) => {
|
|
21359
21360
|
try {
|
|
21360
21361
|
T(Yt.CONNECTING);
|
|
21361
|
-
const z = new URLSearchParams({ ...t, ...
|
|
21362
|
+
const z = new URLSearchParams({ ...t, ...H });
|
|
21362
21363
|
z.append("url", window.location.href), b(
|
|
21363
21364
|
`${n?.liveChat?.socketUrl}?${z.toString()}`
|
|
21364
21365
|
);
|
|
@@ -21372,11 +21373,11 @@ const c3 = "This conversation with a live agent has ended. Please note that a tr
|
|
|
21372
21373
|
icon: "check",
|
|
21373
21374
|
iconColor: "#30A171",
|
|
21374
21375
|
role: ve.NOTIFICATION
|
|
21375
|
-
}),
|
|
21376
|
+
}), V();
|
|
21376
21377
|
},
|
|
21377
|
-
terminateConversation:
|
|
21378
|
+
terminateConversation: w
|
|
21378
21379
|
};
|
|
21379
|
-
return /* @__PURE__ */ _.jsx(pn.Provider, { value:
|
|
21380
|
+
return /* @__PURE__ */ _.jsx(pn.Provider, { value: W, children: e });
|
|
21380
21381
|
};
|
|
21381
21382
|
hd.propTypes = {
|
|
21382
21383
|
children: A.element.isRequired,
|
|
@@ -21898,47 +21899,47 @@ function _d() {
|
|
|
21898
21899
|
), T = () => {
|
|
21899
21900
|
r(Nt.XPERT);
|
|
21900
21901
|
}, g = () => {
|
|
21901
|
-
p("privacyCheck"), f((
|
|
21902
|
-
}, D = (
|
|
21903
|
-
const
|
|
21904
|
-
p(x), c(x,
|
|
21902
|
+
p("privacyCheck"), f((F) => !F);
|
|
21903
|
+
}, D = (F, x) => {
|
|
21904
|
+
const w = F.target.value;
|
|
21905
|
+
p(x), c(x, w);
|
|
21905
21906
|
}, P = () => {
|
|
21906
|
-
|
|
21907
|
+
X() && n(l);
|
|
21907
21908
|
};
|
|
21908
21909
|
Le(() => {
|
|
21909
21910
|
(!a || a.length === 0) && n();
|
|
21910
21911
|
}, [a, n]);
|
|
21911
|
-
const
|
|
21912
|
-
const
|
|
21913
|
-
const { key:
|
|
21914
|
-
if (!te) return { ...x, [
|
|
21912
|
+
const X = () => {
|
|
21913
|
+
const F = a.reduce((x, w) => {
|
|
21914
|
+
const { key: V, validations: q = [] } = w, te = l[V];
|
|
21915
|
+
if (!te) return { ...x, [V]: "Required" };
|
|
21915
21916
|
if (q?.length > 0)
|
|
21916
21917
|
for (const Y of q)
|
|
21917
21918
|
switch (Y) {
|
|
21918
21919
|
case "email": {
|
|
21919
21920
|
if (!E3(te))
|
|
21920
|
-
return { ...x, [
|
|
21921
|
+
return { ...x, [V]: "Should be email" };
|
|
21921
21922
|
break;
|
|
21922
21923
|
}
|
|
21923
21924
|
}
|
|
21924
21925
|
return x;
|
|
21925
21926
|
}, {});
|
|
21926
|
-
return !d && s && (
|
|
21927
|
+
return !d && s && (F.privacyCheck = "Required"), b(F), Object.keys(F).length === 0;
|
|
21927
21928
|
};
|
|
21928
21929
|
return /* @__PURE__ */ _.jsxs("div", { className: "live-chat-form", children: [
|
|
21929
21930
|
i && /* @__PURE__ */ _.jsx("p", { children: i }),
|
|
21930
|
-
(a ?? []).map(({ key:
|
|
21931
|
+
(a ?? []).map(({ key: F, name: x }) => /* @__PURE__ */ _.jsxs(k0, { children: [
|
|
21931
21932
|
/* @__PURE__ */ _.jsx(
|
|
21932
21933
|
"input",
|
|
21933
21934
|
{
|
|
21934
|
-
className: `live-chat-form-input ${h[
|
|
21935
|
+
className: `live-chat-form-input ${h[F] ? "error" : ""}`,
|
|
21935
21936
|
name: x,
|
|
21936
21937
|
placeholder: x,
|
|
21937
|
-
onChange: (
|
|
21938
|
+
onChange: (w) => D(w, F)
|
|
21938
21939
|
}
|
|
21939
21940
|
),
|
|
21940
|
-
h[
|
|
21941
|
-
] },
|
|
21941
|
+
h[F] && /* @__PURE__ */ _.jsx("p", { className: "live-chat-form-error", children: h[F] })
|
|
21942
|
+
] }, F)),
|
|
21942
21943
|
s && /* @__PURE__ */ _.jsxs(_.Fragment, { children: [
|
|
21943
21944
|
/* @__PURE__ */ _.jsx(
|
|
21944
21945
|
"div",
|
|
@@ -21983,7 +21984,7 @@ function _d() {
|
|
|
21983
21984
|
},
|
|
21984
21985
|
type: "checkbox",
|
|
21985
21986
|
onChange: g,
|
|
21986
|
-
onKeyDown: (
|
|
21987
|
+
onKeyDown: (F) => F.key === "Enter" && g()
|
|
21987
21988
|
}
|
|
21988
21989
|
),
|
|
21989
21990
|
/* @__PURE__ */ _.jsx("label", { htmlFor: "privacy-check", children: "Yes, I accept" })
|
|
@@ -22211,19 +22212,19 @@ function Sd({ submitEventExternal: e = null }) {
|
|
|
22211
22212
|
isMobile: g,
|
|
22212
22213
|
mode: D,
|
|
22213
22214
|
setDisableScroll: P,
|
|
22214
|
-
setHasError:
|
|
22215
|
-
setHasNewMessage:
|
|
22215
|
+
setHasError: X,
|
|
22216
|
+
setHasNewMessage: F,
|
|
22216
22217
|
setIsNormalSize: x,
|
|
22217
|
-
setLoading:
|
|
22218
|
-
setLoadingHistory:
|
|
22218
|
+
setLoading: w,
|
|
22219
|
+
setLoadingHistory: V,
|
|
22219
22220
|
setStreaming: q
|
|
22220
|
-
} = oe(tt), [, te] = le(!1), [, Y] = le(!1), [$,
|
|
22221
|
+
} = oe(tt), [, te] = le(!1), [, Y] = le(!1), [$, k] = le(!1), [I, L] = le(!1), [B, W] = le(!1), H = $ || !c, z = et(null), y = et(null), ne = ft.get(`${a}-test`) === "1";
|
|
22221
22222
|
Le(() => {
|
|
22222
|
-
D === Nt.XPERT &&
|
|
22223
|
-
}, [D,
|
|
22223
|
+
D === Nt.XPERT && H && z.current && z.current.focus();
|
|
22224
|
+
}, [D, H]), C3(
|
|
22224
22225
|
r?.liveChat?.enabled,
|
|
22225
22226
|
I,
|
|
22226
|
-
|
|
22227
|
+
L
|
|
22227
22228
|
);
|
|
22228
22229
|
const ae = dt(
|
|
22229
22230
|
({ name: ue, payload: be }) => {
|
|
@@ -22249,13 +22250,13 @@ function Sd({ submitEventExternal: e = null }) {
|
|
|
22249
22250
|
for (; !ye(); ) {
|
|
22250
22251
|
if (Ce >= Ye)
|
|
22251
22252
|
return !1;
|
|
22252
|
-
await new Promise((
|
|
22253
|
+
await new Promise((U) => setTimeout(U, Fe)), Ce += Fe;
|
|
22253
22254
|
}
|
|
22254
22255
|
return !0;
|
|
22255
22256
|
})(
|
|
22256
22257
|
() => window?.OnetrustActiveGroups && window.OnetrustActiveGroups.split(",").includes("C0003")
|
|
22257
22258
|
))) {
|
|
22258
|
-
|
|
22259
|
+
V(!0);
|
|
22259
22260
|
try {
|
|
22260
22261
|
let ye = Ns(a);
|
|
22261
22262
|
const Ye = t?.baseUrl?.includes("xpert-api-services") ? "/v1/history" : "/xpert/v2/history", Fe = `conversation_id=${ye}&client_id=${t?.payloadParams?.client_id}`, Ce = await fetch(
|
|
@@ -22269,22 +22270,22 @@ function Sd({ submitEventExternal: e = null }) {
|
|
|
22269
22270
|
);
|
|
22270
22271
|
if (!Ce.ok)
|
|
22271
22272
|
throw new Error(`HTTPError: ${Ce.status} ${Ce.statusText}`);
|
|
22272
|
-
const
|
|
22273
|
+
const U = await Ce.json();
|
|
22273
22274
|
m(
|
|
22274
|
-
|
|
22275
|
+
U.map((K) => ({
|
|
22275
22276
|
...K,
|
|
22276
22277
|
disableFeedback: !0,
|
|
22277
22278
|
toolCalls: K.tool_calls,
|
|
22278
22279
|
toolCallId: K.tool_call_id
|
|
22279
22280
|
}))
|
|
22280
|
-
), P(!0),
|
|
22281
|
+
), P(!0), F(!0);
|
|
22281
22282
|
} catch (ye) {
|
|
22282
22283
|
console.error(ye);
|
|
22283
22284
|
} finally {
|
|
22284
|
-
|
|
22285
|
+
V(!1);
|
|
22285
22286
|
}
|
|
22286
22287
|
}
|
|
22287
|
-
}, se = r?.conversationHistory?.enabled &&
|
|
22288
|
+
}, se = r?.conversationHistory?.enabled && H && !I;
|
|
22288
22289
|
S3(
|
|
22289
22290
|
() => se && v()
|
|
22290
22291
|
), Le(() => {
|
|
@@ -22385,12 +22386,12 @@ function Sd({ submitEventExternal: e = null }) {
|
|
|
22385
22386
|
});
|
|
22386
22387
|
}
|
|
22387
22388
|
);
|
|
22388
|
-
const
|
|
22389
|
+
const U = Ce.filter(({ content: he }) => !!he), K = U.map((he) => he.content ?? "").join("");
|
|
22389
22390
|
pe(K, be);
|
|
22390
22391
|
const ie = /* @__PURE__ */ new Date(), Ee = ks(JSON.stringify(ye));
|
|
22391
22392
|
return Se({
|
|
22392
22393
|
conversationByteSize: Ee,
|
|
22393
|
-
conversationSize:
|
|
22394
|
+
conversationSize: U.length + T.filter(({ content: he }) => !!he).length + 1,
|
|
22394
22395
|
userInputMessage: Me,
|
|
22395
22396
|
apiResponseMessage: K,
|
|
22396
22397
|
elapsedSeconds: Is(Ye, ie),
|
|
@@ -22398,7 +22399,7 @@ function Sd({ submitEventExternal: e = null }) {
|
|
|
22398
22399
|
}), Ce;
|
|
22399
22400
|
}, ze = async (ue, be, Me, ye, Ye) => {
|
|
22400
22401
|
const Fe = new TextDecoder("utf-8");
|
|
22401
|
-
let Ce = [],
|
|
22402
|
+
let Ce = [], U = 0;
|
|
22402
22403
|
const K = /* @__PURE__ */ new Date();
|
|
22403
22404
|
for (; ; ) {
|
|
22404
22405
|
const { value: Ee, done: he } = await ue.read();
|
|
@@ -22415,12 +22416,12 @@ function Sd({ submitEventExternal: e = null }) {
|
|
|
22415
22416
|
toolCallId: Be.tool_call_id
|
|
22416
22417
|
})
|
|
22417
22418
|
);
|
|
22418
|
-
if (Ve.length >
|
|
22419
|
-
for (let ot =
|
|
22419
|
+
if (Ve.length > U) {
|
|
22420
|
+
for (let ot = U; ot < Ve.length; ot++)
|
|
22420
22421
|
b({
|
|
22421
22422
|
content: "",
|
|
22422
22423
|
disableFeedback: !0
|
|
22423
|
-
}),
|
|
22424
|
+
}), U++;
|
|
22424
22425
|
const Be = /* @__PURE__ */ new Date(), rt = ks(
|
|
22425
22426
|
JSON.stringify(ye)
|
|
22426
22427
|
), He = Ve.filter(({ content: ot }) => !!ot);
|
|
@@ -22461,7 +22462,7 @@ function Sd({ submitEventExternal: e = null }) {
|
|
|
22461
22462
|
if (ue.trim().length === 0)
|
|
22462
22463
|
return;
|
|
22463
22464
|
const be = /* @__PURE__ */ new Date();
|
|
22464
|
-
|
|
22465
|
+
F(!1), X(!1);
|
|
22465
22466
|
const Me = T.filter((Ce) => Ce.role === ve.USER).length + 1;
|
|
22466
22467
|
if (ae({
|
|
22467
22468
|
name: `${s.prefix}.bi.xpert.chatbot.popup.chat.message.sent`,
|
|
@@ -22472,8 +22473,8 @@ function Sd({ submitEventExternal: e = null }) {
|
|
|
22472
22473
|
userInputMessage: ue,
|
|
22473
22474
|
isTestUser: ne
|
|
22474
22475
|
}
|
|
22475
|
-
}),
|
|
22476
|
-
await h(ue),
|
|
22476
|
+
}), w(!0), h) {
|
|
22477
|
+
await h(ue), w(!1);
|
|
22477
22478
|
return;
|
|
22478
22479
|
}
|
|
22479
22480
|
let ye = null;
|
|
@@ -22511,7 +22512,7 @@ function Sd({ submitEventExternal: e = null }) {
|
|
|
22511
22512
|
});
|
|
22512
22513
|
if (!Fe.ok)
|
|
22513
22514
|
throw new Error(`HTTPError: ${Fe.status} ${Fe.statusText}`);
|
|
22514
|
-
|
|
22515
|
+
w(!1), t.payloadParams?.stream ? await Ie(
|
|
22515
22516
|
Fe,
|
|
22516
22517
|
ye,
|
|
22517
22518
|
ue,
|
|
@@ -22523,14 +22524,14 @@ function Sd({ submitEventExternal: e = null }) {
|
|
|
22523
22524
|
ue,
|
|
22524
22525
|
Ye,
|
|
22525
22526
|
be
|
|
22526
|
-
), P(!1),
|
|
22527
|
+
), P(!1), F(!0);
|
|
22527
22528
|
} catch (be) {
|
|
22528
22529
|
if (be.name === "AbortError")
|
|
22529
22530
|
return;
|
|
22530
|
-
|
|
22531
|
+
w(!1), X(!0), console.error(be);
|
|
22531
22532
|
}
|
|
22532
22533
|
}, st = () => {
|
|
22533
|
-
|
|
22534
|
+
L(!1), k(!0), x(!0), v(), ae({
|
|
22534
22535
|
name: `${s.prefix}.bi.xpert.chatbot.action.button.clicked`,
|
|
22535
22536
|
payload: {
|
|
22536
22537
|
category: "2u",
|
|
@@ -22548,7 +22549,7 @@ function Sd({ submitEventExternal: e = null }) {
|
|
|
22548
22549
|
}
|
|
22549
22550
|
}), x(ue);
|
|
22550
22551
|
}, Mn = () => {
|
|
22551
|
-
|
|
22552
|
+
k(!0), x(!0), v(), ae({
|
|
22552
22553
|
name: `${s.prefix}.bi.xpert.chatbot.proactive.message.clicked`,
|
|
22553
22554
|
payload: {
|
|
22554
22555
|
category: "2u",
|
|
@@ -22566,7 +22567,7 @@ function Sd({ submitEventExternal: e = null }) {
|
|
|
22566
22567
|
}
|
|
22567
22568
|
});
|
|
22568
22569
|
}, mn = () => {
|
|
22569
|
-
|
|
22570
|
+
k(!1), W(!1), ae({
|
|
22570
22571
|
name: `${s.prefix}.bi.xpert.chatbot.popup.chat.minimized`,
|
|
22571
22572
|
payload: {
|
|
22572
22573
|
category: "2u",
|
|
@@ -22601,7 +22602,7 @@ function Sd({ submitEventExternal: e = null }) {
|
|
|
22601
22602
|
u?.enabled && /* @__PURE__ */ _.jsx(
|
|
22602
22603
|
Ad,
|
|
22603
22604
|
{
|
|
22604
|
-
showMessage: !
|
|
22605
|
+
showMessage: !H,
|
|
22605
22606
|
style: Bn,
|
|
22606
22607
|
onClose: Fn,
|
|
22607
22608
|
onClick: Mn,
|
|
@@ -22645,7 +22646,7 @@ function Sd({ submitEventExternal: e = null }) {
|
|
|
22645
22646
|
}
|
|
22646
22647
|
),
|
|
22647
22648
|
c && /* @__PURE__ */ _.jsx(p3, {}),
|
|
22648
|
-
|
|
22649
|
+
H && !I && /* @__PURE__ */ _.jsx(Js, { isMounted: B, children: /* @__PURE__ */ _.jsx(
|
|
22649
22650
|
"div",
|
|
22650
22651
|
{
|
|
22651
22652
|
ref: d,
|
|
@@ -22656,8 +22657,8 @@ function Sd({ submitEventExternal: e = null }) {
|
|
|
22656
22657
|
{
|
|
22657
22658
|
onClose: mn,
|
|
22658
22659
|
handleResizeButtonClick: wt,
|
|
22659
|
-
isMounted:
|
|
22660
|
-
setIsMounted:
|
|
22660
|
+
isMounted: B,
|
|
22661
|
+
setIsMounted: W
|
|
22661
22662
|
}
|
|
22662
22663
|
),
|
|
22663
22664
|
/* @__PURE__ */ _.jsx(h3, {}),
|
|
@@ -22669,7 +22670,7 @@ function Sd({ submitEventExternal: e = null }) {
|
|
|
22669
22670
|
handleSend: nt,
|
|
22670
22671
|
inputRef: z,
|
|
22671
22672
|
isTestUser: ne,
|
|
22672
|
-
setLiveChatOpen:
|
|
22673
|
+
setLiveChatOpen: L,
|
|
22673
22674
|
submitEvent: ae
|
|
22674
22675
|
}
|
|
22675
22676
|
),
|