@2uinc/frontend-component-xpert-chatbot 1.40.6-beta.10 → 1.40.6-beta.12
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 +1082 -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,
|
|
@@ -4219,27 +4219,41 @@ function Ni({
|
|
|
4219
4219
|
/* @__PURE__ */ _.jsx(
|
|
4220
4220
|
"textarea",
|
|
4221
4221
|
{
|
|
4222
|
-
className: "xpert-chatbot-popup__input--textarea",
|
|
4223
4222
|
"data-testid": "ConversationInput",
|
|
4224
|
-
disabled:
|
|
4225
|
-
value:
|
|
4223
|
+
disabled: F,
|
|
4224
|
+
value: g,
|
|
4226
4225
|
ref: r,
|
|
4227
|
-
onInput:
|
|
4228
|
-
onChange:
|
|
4226
|
+
onInput: w,
|
|
4227
|
+
onChange: P,
|
|
4229
4228
|
placeholder: "Write a message",
|
|
4230
4229
|
cols: "5",
|
|
4231
4230
|
rows: "1",
|
|
4232
4231
|
maxLength: u?.input?.maxLength ?? 5e3,
|
|
4233
|
-
onKeyDown:
|
|
4232
|
+
onKeyDown: x,
|
|
4233
|
+
style: {
|
|
4234
|
+
margin: "0",
|
|
4235
|
+
borderRadius: "1rem",
|
|
4236
|
+
boxSizing: "border-box",
|
|
4237
|
+
fontFamily: "inherit",
|
|
4238
|
+
fontSize: "1rem",
|
|
4239
|
+
// required to avoid IOS mobile scaling when input is focused
|
|
4240
|
+
fontWeight: "300",
|
|
4241
|
+
lineHeight: "1.56rem",
|
|
4242
|
+
minHeight: "3.25rem",
|
|
4243
|
+
padding: "12.5px 45px 12.5px 12.5px",
|
|
4244
|
+
resize: "none",
|
|
4245
|
+
width: "100%",
|
|
4246
|
+
outlineColor: s
|
|
4247
|
+
}
|
|
4234
4248
|
}
|
|
4235
4249
|
),
|
|
4236
|
-
|
|
4250
|
+
T && c || p || m ? /* @__PURE__ */ _.jsx(
|
|
4237
4251
|
"button",
|
|
4238
4252
|
{
|
|
4239
4253
|
"data-testid": "Stop",
|
|
4240
4254
|
className: "xpert-chatbot-popup__input--stop-btn",
|
|
4241
|
-
onClick: (
|
|
4242
|
-
|
|
4255
|
+
onClick: (V) => {
|
|
4256
|
+
V.preventDefault(), l();
|
|
4243
4257
|
},
|
|
4244
4258
|
"aria-label": "Stop streaming",
|
|
4245
4259
|
children: /* @__PURE__ */ _.jsx(kt, { icon: "material-symbols:stop", style: { fontSize: "1.75rem" } })
|
|
@@ -4248,10 +4262,10 @@ function Ni({
|
|
|
4248
4262
|
"button",
|
|
4249
4263
|
{
|
|
4250
4264
|
"data-testid": "Send",
|
|
4251
|
-
disabled:
|
|
4265
|
+
disabled: F,
|
|
4252
4266
|
className: "xpert-chatbot-popup__input--send-btn",
|
|
4253
|
-
onClick: (
|
|
4254
|
-
|
|
4267
|
+
onClick: (V) => {
|
|
4268
|
+
V.preventDefault(), t(g), X();
|
|
4255
4269
|
},
|
|
4256
4270
|
"aria-label": "Send message",
|
|
4257
4271
|
children: /* @__PURE__ */ _.jsx(kt, { icon: "material-symbols:send", style: { fontSize: "1.75rem" } })
|
|
@@ -4932,45 +4946,45 @@ function bl() {
|
|
|
4932
4946
|
function l(m, ...T) {
|
|
4933
4947
|
let g;
|
|
4934
4948
|
if (wa("use", r), m != null) if (typeof m == "function")
|
|
4935
|
-
|
|
4949
|
+
F(m, ...T);
|
|
4936
4950
|
else if (typeof m == "object")
|
|
4937
|
-
Array.isArray(m) ?
|
|
4951
|
+
Array.isArray(m) ? X(m) : P(m);
|
|
4938
4952
|
else
|
|
4939
4953
|
throw new TypeError("Expected usable value, not `" + m + "`");
|
|
4940
4954
|
return g && (n.settings = Object.assign(n.settings || {}, g)), i;
|
|
4941
4955
|
function D(x) {
|
|
4942
4956
|
if (typeof x == "function")
|
|
4943
|
-
|
|
4957
|
+
F(x);
|
|
4944
4958
|
else if (typeof x == "object")
|
|
4945
4959
|
if (Array.isArray(x)) {
|
|
4946
|
-
const [
|
|
4947
|
-
|
|
4960
|
+
const [w, ...V] = x;
|
|
4961
|
+
F(w, ...V);
|
|
4948
4962
|
} else
|
|
4949
4963
|
P(x);
|
|
4950
4964
|
else
|
|
4951
4965
|
throw new TypeError("Expected usable value, not `" + x + "`");
|
|
4952
4966
|
}
|
|
4953
4967
|
function P(x) {
|
|
4954
|
-
|
|
4968
|
+
X(x.plugins), x.settings && (g = Object.assign(g || {}, x.settings));
|
|
4955
4969
|
}
|
|
4956
|
-
function
|
|
4957
|
-
let
|
|
4970
|
+
function X(x) {
|
|
4971
|
+
let w = -1;
|
|
4958
4972
|
if (x != null) if (Array.isArray(x))
|
|
4959
|
-
for (; ++
|
|
4960
|
-
const
|
|
4961
|
-
D(
|
|
4973
|
+
for (; ++w < x.length; ) {
|
|
4974
|
+
const V = x[w];
|
|
4975
|
+
D(V);
|
|
4962
4976
|
}
|
|
4963
4977
|
else
|
|
4964
4978
|
throw new TypeError("Expected a list of plugins, not `" + x + "`");
|
|
4965
4979
|
}
|
|
4966
|
-
function
|
|
4967
|
-
let
|
|
4968
|
-
for (; ++
|
|
4969
|
-
if (t[
|
|
4970
|
-
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];
|
|
4971
4985
|
break;
|
|
4972
4986
|
}
|
|
4973
|
-
q ? (oi(q[1]) && oi(
|
|
4987
|
+
q ? (oi(q[1]) && oi(w) && (w = Ju(!0, q[1], w)), q[1] = w) : t.push([...arguments]);
|
|
4974
4988
|
}
|
|
4975
4989
|
}
|
|
4976
4990
|
function c(m) {
|
|
@@ -4987,18 +5001,18 @@ function bl() {
|
|
|
4987
5001
|
if (to(m), i.freeze(), !g && typeof T == "function" && (g = T, T = void 0), !g)
|
|
4988
5002
|
return new Promise(D);
|
|
4989
5003
|
D(null, g);
|
|
4990
|
-
function D(P,
|
|
4991
|
-
e.run(m, $n(T),
|
|
4992
|
-
function
|
|
4993
|
-
|
|
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);
|
|
4994
5008
|
}
|
|
4995
5009
|
}
|
|
4996
5010
|
}
|
|
4997
5011
|
function p(m, T) {
|
|
4998
5012
|
let g, D;
|
|
4999
5013
|
return i.run(m, T, P), no("runSync", "run", D), g;
|
|
5000
|
-
function P(
|
|
5001
|
-
Qu(
|
|
5014
|
+
function P(X, F) {
|
|
5015
|
+
Qu(X), g = F, D = !0;
|
|
5002
5016
|
}
|
|
5003
5017
|
}
|
|
5004
5018
|
function h(m, T) {
|
|
@@ -5006,17 +5020,17 @@ function bl() {
|
|
|
5006
5020
|
return new Promise(g);
|
|
5007
5021
|
g(null, T);
|
|
5008
5022
|
function g(D, P) {
|
|
5009
|
-
const
|
|
5010
|
-
i.run(i.parse(
|
|
5011
|
-
if (x || !
|
|
5012
|
-
|
|
5023
|
+
const X = $n(m);
|
|
5024
|
+
i.run(i.parse(X), X, (x, w, V) => {
|
|
5025
|
+
if (x || !w || !V)
|
|
5026
|
+
F(x);
|
|
5013
5027
|
else {
|
|
5014
|
-
const q = i.stringify(
|
|
5015
|
-
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);
|
|
5016
5030
|
}
|
|
5017
5031
|
});
|
|
5018
|
-
function
|
|
5019
|
-
x || !
|
|
5032
|
+
function F(x, w) {
|
|
5033
|
+
x || !w ? P(x) : D ? D(w) : T(null, w);
|
|
5020
5034
|
}
|
|
5021
5035
|
}
|
|
5022
5036
|
}
|
|
@@ -5213,9 +5227,9 @@ function yp(e) {
|
|
|
5213
5227
|
return s;
|
|
5214
5228
|
function s(P) {
|
|
5215
5229
|
if (r < n.length) {
|
|
5216
|
-
const
|
|
5217
|
-
return t.containerState =
|
|
5218
|
-
|
|
5230
|
+
const X = n[r];
|
|
5231
|
+
return t.containerState = X[1], e.attempt(
|
|
5232
|
+
X[0].continuation,
|
|
5219
5233
|
l,
|
|
5220
5234
|
c
|
|
5221
5235
|
)(P);
|
|
@@ -5225,23 +5239,23 @@ function yp(e) {
|
|
|
5225
5239
|
function l(P) {
|
|
5226
5240
|
if (r++, t.containerState._closeFlow) {
|
|
5227
5241
|
t.containerState._closeFlow = void 0, a && D();
|
|
5228
|
-
const
|
|
5229
|
-
let
|
|
5230
|
-
for (;
|
|
5231
|
-
if (t.events[
|
|
5232
|
-
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;
|
|
5233
5247
|
break;
|
|
5234
5248
|
}
|
|
5235
5249
|
g(r);
|
|
5236
|
-
let
|
|
5237
|
-
for (;
|
|
5238
|
-
t.events[
|
|
5250
|
+
let w = X;
|
|
5251
|
+
for (; w < t.events.length; )
|
|
5252
|
+
t.events[w][1].end = Object.assign({}, x), w++;
|
|
5239
5253
|
return Mt(
|
|
5240
5254
|
t.events,
|
|
5241
|
-
|
|
5255
|
+
F + 1,
|
|
5242
5256
|
0,
|
|
5243
|
-
t.events.slice(
|
|
5244
|
-
), t.events.length =
|
|
5257
|
+
t.events.slice(X)
|
|
5258
|
+
), t.events.length = w, c(P);
|
|
5245
5259
|
}
|
|
5246
5260
|
return s(P);
|
|
5247
5261
|
}
|
|
@@ -5293,9 +5307,9 @@ function yp(e) {
|
|
|
5293
5307
|
}
|
|
5294
5308
|
return ki(P) ? (e.consume(P), T(e.exit("chunkFlow")), r = 0, t.interrupt = void 0, s) : (e.consume(P), m);
|
|
5295
5309
|
}
|
|
5296
|
-
function T(P,
|
|
5297
|
-
const
|
|
5298
|
-
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]) {
|
|
5299
5313
|
let x = a.events.length;
|
|
5300
5314
|
for (; x--; )
|
|
5301
5315
|
if (
|
|
@@ -5305,31 +5319,31 @@ function yp(e) {
|
|
|
5305
5319
|
a.events[x][1].end.offset > u)
|
|
5306
5320
|
)
|
|
5307
5321
|
return;
|
|
5308
|
-
const
|
|
5309
|
-
let
|
|
5310
|
-
for (;
|
|
5311
|
-
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") {
|
|
5312
5326
|
if (q) {
|
|
5313
|
-
te = t.events[
|
|
5327
|
+
te = t.events[V][1].end;
|
|
5314
5328
|
break;
|
|
5315
5329
|
}
|
|
5316
5330
|
q = !0;
|
|
5317
5331
|
}
|
|
5318
|
-
for (g(r), x =
|
|
5332
|
+
for (g(r), x = w; x < t.events.length; )
|
|
5319
5333
|
t.events[x][1].end = Object.assign({}, te), x++;
|
|
5320
5334
|
Mt(
|
|
5321
5335
|
t.events,
|
|
5322
|
-
|
|
5336
|
+
V + 1,
|
|
5323
5337
|
0,
|
|
5324
|
-
t.events.slice(
|
|
5338
|
+
t.events.slice(w)
|
|
5325
5339
|
), t.events.length = x;
|
|
5326
5340
|
}
|
|
5327
5341
|
}
|
|
5328
5342
|
function g(P) {
|
|
5329
|
-
let
|
|
5330
|
-
for (;
|
|
5331
|
-
const
|
|
5332
|
-
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);
|
|
5333
5347
|
}
|
|
5334
5348
|
n.length = P;
|
|
5335
5349
|
}
|
|
@@ -5628,7 +5642,7 @@ const co = {
|
|
|
5628
5642
|
};
|
|
5629
5643
|
function Up(e, t, n) {
|
|
5630
5644
|
const r = this, a = {
|
|
5631
|
-
tokenize:
|
|
5645
|
+
tokenize: F,
|
|
5632
5646
|
partial: !0
|
|
5633
5647
|
};
|
|
5634
5648
|
let i = 0, u = 0, s;
|
|
@@ -5637,14 +5651,14 @@ function Up(e, t, n) {
|
|
|
5637
5651
|
return c(x);
|
|
5638
5652
|
}
|
|
5639
5653
|
function c(x) {
|
|
5640
|
-
const
|
|
5641
|
-
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);
|
|
5642
5656
|
}
|
|
5643
5657
|
function d(x) {
|
|
5644
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));
|
|
5645
5659
|
}
|
|
5646
5660
|
function f(x) {
|
|
5647
|
-
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", {
|
|
5648
5662
|
contentType: "string"
|
|
5649
5663
|
}), p(x));
|
|
5650
5664
|
}
|
|
@@ -5660,7 +5674,7 @@ function Up(e, t, n) {
|
|
|
5660
5674
|
return x === null || ge(x) ? (e.exit("chunkString"), e.exit("codeFencedFenceMeta"), f(x)) : x === 96 && x === s ? n(x) : (e.consume(x), b);
|
|
5661
5675
|
}
|
|
5662
5676
|
function m(x) {
|
|
5663
|
-
return e.attempt(a,
|
|
5677
|
+
return e.attempt(a, X, T)(x);
|
|
5664
5678
|
}
|
|
5665
5679
|
function T(x) {
|
|
5666
5680
|
return e.enter("lineEnding"), e.consume(x), e.exit("lineEnding"), g;
|
|
@@ -5674,36 +5688,36 @@ function Up(e, t, n) {
|
|
|
5674
5688
|
)(x) : D(x);
|
|
5675
5689
|
}
|
|
5676
5690
|
function D(x) {
|
|
5677
|
-
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));
|
|
5678
5692
|
}
|
|
5679
5693
|
function P(x) {
|
|
5680
5694
|
return x === null || ge(x) ? (e.exit("codeFlowValue"), D(x)) : (e.consume(x), P);
|
|
5681
5695
|
}
|
|
5682
|
-
function
|
|
5696
|
+
function X(x) {
|
|
5683
5697
|
return e.exit("codeFenced"), t(x);
|
|
5684
5698
|
}
|
|
5685
|
-
function
|
|
5699
|
+
function F(x, w, V) {
|
|
5686
5700
|
let q = 0;
|
|
5687
5701
|
return te;
|
|
5688
|
-
function te(
|
|
5689
|
-
return x.enter("lineEnding"), x.consume(
|
|
5702
|
+
function te(L) {
|
|
5703
|
+
return x.enter("lineEnding"), x.consume(L), x.exit("lineEnding"), Y;
|
|
5690
5704
|
}
|
|
5691
|
-
function Y(
|
|
5692
|
-
return x.enter("codeFencedFence"), ke(
|
|
5705
|
+
function Y(L) {
|
|
5706
|
+
return x.enter("codeFencedFence"), ke(L) ? Pe(
|
|
5693
5707
|
x,
|
|
5694
5708
|
$,
|
|
5695
5709
|
"linePrefix",
|
|
5696
5710
|
r.parser.constructs.disable.null.includes("codeIndented") ? void 0 : 4
|
|
5697
|
-
)(
|
|
5711
|
+
)(L) : $(L);
|
|
5698
5712
|
}
|
|
5699
|
-
function $(
|
|
5700
|
-
return
|
|
5713
|
+
function $(L) {
|
|
5714
|
+
return L === s ? (x.enter("codeFencedFenceSequence"), k(L)) : V(L);
|
|
5701
5715
|
}
|
|
5702
|
-
function L
|
|
5703
|
-
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);
|
|
5704
5718
|
}
|
|
5705
|
-
function I(
|
|
5706
|
-
return
|
|
5719
|
+
function I(L) {
|
|
5720
|
+
return L === null || ge(L) ? (x.exit("codeFencedFence"), w(L)) : V(L);
|
|
5707
5721
|
}
|
|
5708
5722
|
}
|
|
5709
5723
|
}
|
|
@@ -6257,22 +6271,22 @@ function y1(e, t, n) {
|
|
|
6257
6271
|
return ke(v) ? (e.consume(v), D) : te(v);
|
|
6258
6272
|
}
|
|
6259
6273
|
function P(v) {
|
|
6260
|
-
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);
|
|
6261
6275
|
}
|
|
6262
|
-
function
|
|
6263
|
-
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);
|
|
6264
6278
|
}
|
|
6265
|
-
function
|
|
6266
|
-
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);
|
|
6267
6281
|
}
|
|
6268
6282
|
function x(v) {
|
|
6269
|
-
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);
|
|
6270
6284
|
}
|
|
6271
|
-
function
|
|
6272
|
-
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);
|
|
6273
6287
|
}
|
|
6274
|
-
function
|
|
6275
|
-
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);
|
|
6276
6290
|
}
|
|
6277
6291
|
function q(v) {
|
|
6278
6292
|
return v === 47 || v === 62 || ke(v) ? P(v) : n(v);
|
|
@@ -6284,13 +6298,13 @@ function y1(e, t, n) {
|
|
|
6284
6298
|
return v === null || ge(v) ? $(v) : ke(v) ? (e.consume(v), Y) : n(v);
|
|
6285
6299
|
}
|
|
6286
6300
|
function $(v) {
|
|
6287
|
-
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(
|
|
6288
6302
|
b1,
|
|
6289
6303
|
ae,
|
|
6290
|
-
|
|
6291
|
-
)(v)) : v === null || ge(v) ? (e.exit("htmlFlowData"),
|
|
6304
|
+
k
|
|
6305
|
+
)(v)) : v === null || ge(v) ? (e.exit("htmlFlowData"), k(v)) : (e.consume(v), $);
|
|
6292
6306
|
}
|
|
6293
|
-
function
|
|
6307
|
+
function k(v) {
|
|
6294
6308
|
return e.check(
|
|
6295
6309
|
E1,
|
|
6296
6310
|
I,
|
|
@@ -6298,23 +6312,23 @@ function y1(e, t, n) {
|
|
|
6298
6312
|
)(v);
|
|
6299
6313
|
}
|
|
6300
6314
|
function I(v) {
|
|
6301
|
-
return e.enter("lineEnding"), e.consume(v), e.exit("lineEnding"),
|
|
6315
|
+
return e.enter("lineEnding"), e.consume(v), e.exit("lineEnding"), L;
|
|
6302
6316
|
}
|
|
6303
|
-
function
|
|
6304
|
-
return v === null || ge(v) ?
|
|
6317
|
+
function L(v) {
|
|
6318
|
+
return v === null || ge(v) ? k(v) : (e.enter("htmlFlowData"), $(v));
|
|
6305
6319
|
}
|
|
6306
|
-
function
|
|
6320
|
+
function B(v) {
|
|
6307
6321
|
return v === 45 ? (e.consume(v), y) : $(v);
|
|
6308
6322
|
}
|
|
6309
|
-
function
|
|
6310
|
-
return v === 47 ? (e.consume(v), u = "",
|
|
6323
|
+
function W(v) {
|
|
6324
|
+
return v === 47 ? (e.consume(v), u = "", H) : $(v);
|
|
6311
6325
|
}
|
|
6312
|
-
function
|
|
6326
|
+
function H(v) {
|
|
6313
6327
|
if (v === 62) {
|
|
6314
6328
|
const se = u.toLowerCase();
|
|
6315
6329
|
return go.includes(se) ? (e.consume(v), ne) : $(v);
|
|
6316
6330
|
}
|
|
6317
|
-
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);
|
|
6318
6332
|
}
|
|
6319
6333
|
function z(v) {
|
|
6320
6334
|
return v === 93 ? (e.consume(v), y) : $(v);
|
|
@@ -6357,7 +6371,7 @@ function S1(e, t, n) {
|
|
|
6357
6371
|
return e.enter("htmlText"), e.enter("htmlTextData"), e.consume(y), l;
|
|
6358
6372
|
}
|
|
6359
6373
|
function l(y) {
|
|
6360
|
-
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);
|
|
6361
6375
|
}
|
|
6362
6376
|
function c(y) {
|
|
6363
6377
|
return y === 45 ? (e.consume(y), d) : y === 91 ? (e.consume(y), i = 0, b) : Pt(y) ? (e.consume(y), D) : n(y);
|
|
@@ -6366,76 +6380,76 @@ function S1(e, t, n) {
|
|
|
6366
6380
|
return y === 45 ? (e.consume(y), h) : n(y);
|
|
6367
6381
|
}
|
|
6368
6382
|
function f(y) {
|
|
6369
|
-
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);
|
|
6370
6384
|
}
|
|
6371
6385
|
function p(y) {
|
|
6372
6386
|
return y === 45 ? (e.consume(y), h) : f(y);
|
|
6373
6387
|
}
|
|
6374
6388
|
function h(y) {
|
|
6375
|
-
return y === 62 ?
|
|
6389
|
+
return y === 62 ? B(y) : y === 45 ? p(y) : f(y);
|
|
6376
6390
|
}
|
|
6377
6391
|
function b(y) {
|
|
6378
6392
|
const ne = "CDATA[";
|
|
6379
6393
|
return y === ne.charCodeAt(i++) ? (e.consume(y), i === ne.length ? m : b) : n(y);
|
|
6380
6394
|
}
|
|
6381
6395
|
function m(y) {
|
|
6382
|
-
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);
|
|
6383
6397
|
}
|
|
6384
6398
|
function T(y) {
|
|
6385
6399
|
return y === 93 ? (e.consume(y), g) : m(y);
|
|
6386
6400
|
}
|
|
6387
6401
|
function g(y) {
|
|
6388
|
-
return y === 62 ?
|
|
6402
|
+
return y === 62 ? B(y) : y === 93 ? (e.consume(y), g) : m(y);
|
|
6389
6403
|
}
|
|
6390
6404
|
function D(y) {
|
|
6391
|
-
return y === null || y === 62 ?
|
|
6405
|
+
return y === null || y === 62 ? B(y) : ge(y) ? (u = D, W(y)) : (e.consume(y), D);
|
|
6392
6406
|
}
|
|
6393
6407
|
function P(y) {
|
|
6394
|
-
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);
|
|
6395
6409
|
}
|
|
6396
|
-
function
|
|
6397
|
-
return y === 62 ?
|
|
6410
|
+
function X(y) {
|
|
6411
|
+
return y === 62 ? B(y) : P(y);
|
|
6398
6412
|
}
|
|
6399
|
-
function
|
|
6413
|
+
function F(y) {
|
|
6400
6414
|
return Pt(y) ? (e.consume(y), x) : n(y);
|
|
6401
6415
|
}
|
|
6402
6416
|
function x(y) {
|
|
6403
|
-
return y === 45 || It(y) ? (e.consume(y), x) :
|
|
6417
|
+
return y === 45 || It(y) ? (e.consume(y), x) : w(y);
|
|
6404
6418
|
}
|
|
6405
|
-
function
|
|
6406
|
-
return ge(y) ? (u =
|
|
6419
|
+
function w(y) {
|
|
6420
|
+
return ge(y) ? (u = w, W(y)) : ke(y) ? (e.consume(y), w) : B(y);
|
|
6407
6421
|
}
|
|
6408
|
-
function
|
|
6409
|
-
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);
|
|
6410
6424
|
}
|
|
6411
6425
|
function q(y) {
|
|
6412
|
-
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);
|
|
6413
6427
|
}
|
|
6414
6428
|
function te(y) {
|
|
6415
6429
|
return y === 45 || y === 46 || y === 58 || y === 95 || It(y) ? (e.consume(y), te) : Y(y);
|
|
6416
6430
|
}
|
|
6417
6431
|
function Y(y) {
|
|
6418
|
-
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);
|
|
6419
6433
|
}
|
|
6420
6434
|
function $(y) {
|
|
6421
|
-
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);
|
|
6422
6436
|
}
|
|
6423
|
-
function
|
|
6424
|
-
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);
|
|
6425
6439
|
}
|
|
6426
6440
|
function I(y) {
|
|
6427
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);
|
|
6428
6442
|
}
|
|
6429
|
-
function
|
|
6443
|
+
function L(y) {
|
|
6430
6444
|
return y === 47 || y === 62 || At(y) ? q(y) : n(y);
|
|
6431
6445
|
}
|
|
6432
|
-
function
|
|
6446
|
+
function B(y) {
|
|
6433
6447
|
return y === 62 ? (e.consume(y), e.exit("htmlTextData"), e.exit("htmlText"), t) : n(y);
|
|
6434
6448
|
}
|
|
6435
|
-
function
|
|
6436
|
-
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;
|
|
6437
6451
|
}
|
|
6438
|
-
function
|
|
6452
|
+
function H(y) {
|
|
6439
6453
|
return ke(y) ? Pe(
|
|
6440
6454
|
e,
|
|
6441
6455
|
z,
|
|
@@ -6997,10 +7011,10 @@ function tm(e, t, n) {
|
|
|
6997
7011
|
const l = {
|
|
6998
7012
|
consume: D,
|
|
6999
7013
|
enter: P,
|
|
7000
|
-
exit:
|
|
7001
|
-
attempt:
|
|
7002
|
-
check:
|
|
7003
|
-
interrupt:
|
|
7014
|
+
exit: X,
|
|
7015
|
+
attempt: w(F),
|
|
7016
|
+
check: w(x),
|
|
7017
|
+
interrupt: w(x, {
|
|
7004
7018
|
interrupt: !0
|
|
7005
7019
|
})
|
|
7006
7020
|
}, c = {
|
|
@@ -7018,7 +7032,7 @@ function tm(e, t, n) {
|
|
|
7018
7032
|
let d = t.tokenize.call(c, l);
|
|
7019
7033
|
return t.resolveAll && i.push(t), c;
|
|
7020
7034
|
function f(Y) {
|
|
7021
|
-
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);
|
|
7022
7036
|
}
|
|
7023
7037
|
function p(Y, $) {
|
|
7024
7038
|
return rm(h(Y), $);
|
|
@@ -7027,13 +7041,13 @@ function tm(e, t, n) {
|
|
|
7027
7041
|
return nm(u, Y);
|
|
7028
7042
|
}
|
|
7029
7043
|
function b() {
|
|
7030
|
-
const { line: Y, column: $, offset:
|
|
7044
|
+
const { line: Y, column: $, offset: k, _index: I, _bufferIndex: L } = r;
|
|
7031
7045
|
return {
|
|
7032
7046
|
line: Y,
|
|
7033
7047
|
column: $,
|
|
7034
|
-
offset:
|
|
7048
|
+
offset: k,
|
|
7035
7049
|
_index: I,
|
|
7036
|
-
_bufferIndex:
|
|
7050
|
+
_bufferIndex: L
|
|
7037
7051
|
};
|
|
7038
7052
|
}
|
|
7039
7053
|
function m(Y) {
|
|
@@ -7057,23 +7071,23 @@ function tm(e, t, n) {
|
|
|
7057
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;
|
|
7058
7072
|
}
|
|
7059
7073
|
function P(Y, $) {
|
|
7060
|
-
const
|
|
7061
|
-
return
|
|
7074
|
+
const k = $ || {};
|
|
7075
|
+
return k.type = Y, k.start = b(), c.events.push(["enter", k, c]), s.push(k), k;
|
|
7062
7076
|
}
|
|
7063
|
-
function
|
|
7077
|
+
function X(Y) {
|
|
7064
7078
|
const $ = s.pop();
|
|
7065
7079
|
return $.end = b(), c.events.push(["exit", $, c]), $;
|
|
7066
7080
|
}
|
|
7067
|
-
function
|
|
7068
|
-
|
|
7081
|
+
function F(Y, $) {
|
|
7082
|
+
V(Y, $.from);
|
|
7069
7083
|
}
|
|
7070
7084
|
function x(Y, $) {
|
|
7071
7085
|
$.restore();
|
|
7072
7086
|
}
|
|
7073
|
-
function
|
|
7074
|
-
return
|
|
7075
|
-
function
|
|
7076
|
-
let
|
|
7087
|
+
function w(Y, $) {
|
|
7088
|
+
return k;
|
|
7089
|
+
function k(I, L, B) {
|
|
7090
|
+
let W, H, z, y;
|
|
7077
7091
|
return Array.isArray(I) ? ae(I) : "tokenize" in I ? (
|
|
7078
7092
|
// @ts-expect-error Looks like a construct.
|
|
7079
7093
|
ae([I])
|
|
@@ -7091,7 +7105,7 @@ function tm(e, t, n) {
|
|
|
7091
7105
|
}
|
|
7092
7106
|
}
|
|
7093
7107
|
function ae(pe) {
|
|
7094
|
-
return
|
|
7108
|
+
return W = pe, H = 0, pe.length === 0 ? B : v(pe[H]);
|
|
7095
7109
|
}
|
|
7096
7110
|
function v(pe) {
|
|
7097
7111
|
return Se;
|
|
@@ -7108,14 +7122,14 @@ function tm(e, t, n) {
|
|
|
7108
7122
|
}
|
|
7109
7123
|
}
|
|
7110
7124
|
function se(pe) {
|
|
7111
|
-
return Y(z, y),
|
|
7125
|
+
return Y(z, y), L;
|
|
7112
7126
|
}
|
|
7113
7127
|
function _e(pe) {
|
|
7114
|
-
return y.restore(), ++
|
|
7128
|
+
return y.restore(), ++H < W.length ? v(W[H]) : B;
|
|
7115
7129
|
}
|
|
7116
7130
|
}
|
|
7117
7131
|
}
|
|
7118
|
-
function
|
|
7132
|
+
function V(Y, $) {
|
|
7119
7133
|
Y.resolveAll && !i.includes(Y) && i.push(Y), Y.resolve && Mt(
|
|
7120
7134
|
c.events,
|
|
7121
7135
|
$,
|
|
@@ -7124,13 +7138,13 @@ function tm(e, t, n) {
|
|
|
7124
7138
|
), Y.resolveTo && (c.events = Y.resolveTo(c.events, c));
|
|
7125
7139
|
}
|
|
7126
7140
|
function q() {
|
|
7127
|
-
const Y = b(), $ = c.previous,
|
|
7141
|
+
const Y = b(), $ = c.previous, k = c.currentConstruct, I = c.events.length, L = Array.from(s);
|
|
7128
7142
|
return {
|
|
7129
|
-
restore:
|
|
7143
|
+
restore: B,
|
|
7130
7144
|
from: I
|
|
7131
7145
|
};
|
|
7132
|
-
function
|
|
7133
|
-
r = Y, c.previous = $, c.currentConstruct =
|
|
7146
|
+
function B() {
|
|
7147
|
+
r = Y, c.previous = $, c.currentConstruct = k, c.events.length = I, s = L, te();
|
|
7134
7148
|
}
|
|
7135
7149
|
}
|
|
7136
7150
|
function te() {
|
|
@@ -7413,7 +7427,7 @@ function _m(e) {
|
|
|
7413
7427
|
},
|
|
7414
7428
|
exit: {
|
|
7415
7429
|
atxHeading: d(),
|
|
7416
|
-
atxHeadingSequence:
|
|
7430
|
+
atxHeadingSequence: w,
|
|
7417
7431
|
autolink: d(),
|
|
7418
7432
|
autolinkEmail: Ie,
|
|
7419
7433
|
autolinkProtocol: ze,
|
|
@@ -7428,25 +7442,25 @@ function _m(e) {
|
|
|
7428
7442
|
codeFencedFenceMeta: T,
|
|
7429
7443
|
codeFlowValue: $,
|
|
7430
7444
|
codeIndented: d(P),
|
|
7431
|
-
codeText: d(
|
|
7445
|
+
codeText: d(W),
|
|
7432
7446
|
codeTextData: $,
|
|
7433
7447
|
data: $,
|
|
7434
7448
|
definition: d(),
|
|
7435
7449
|
definitionDestinationString: x,
|
|
7436
|
-
definitionLabelString:
|
|
7437
|
-
definitionTitleString:
|
|
7450
|
+
definitionLabelString: X,
|
|
7451
|
+
definitionTitleString: F,
|
|
7438
7452
|
emphasis: d(),
|
|
7439
7453
|
hardBreakEscape: d(I),
|
|
7440
7454
|
hardBreakTrailing: d(I),
|
|
7441
|
-
htmlFlow: d(
|
|
7455
|
+
htmlFlow: d(L),
|
|
7442
7456
|
htmlFlowData: $,
|
|
7443
|
-
htmlText: d(
|
|
7457
|
+
htmlText: d(B),
|
|
7444
7458
|
htmlTextData: $,
|
|
7445
7459
|
image: d(z),
|
|
7446
7460
|
label: ne,
|
|
7447
7461
|
labelText: y,
|
|
7448
|
-
lineEnding:
|
|
7449
|
-
link: d(
|
|
7462
|
+
lineEnding: k,
|
|
7463
|
+
link: d(H),
|
|
7450
7464
|
listItem: d(),
|
|
7451
7465
|
listOrdered: d(),
|
|
7452
7466
|
listUnordered: d(),
|
|
@@ -7457,7 +7471,7 @@ function _m(e) {
|
|
|
7457
7471
|
resource: se,
|
|
7458
7472
|
setextHeading: d(te),
|
|
7459
7473
|
setextHeadingLineSequence: q,
|
|
7460
|
-
setextHeadingText:
|
|
7474
|
+
setextHeadingText: V,
|
|
7461
7475
|
strong: d(),
|
|
7462
7476
|
thematicBreak: d()
|
|
7463
7477
|
}
|
|
@@ -7465,7 +7479,7 @@ function _m(e) {
|
|
|
7465
7479
|
Ll(t, (e || {}).mdastExtensions || []);
|
|
7466
7480
|
const n = {};
|
|
7467
7481
|
return r;
|
|
7468
|
-
function r(
|
|
7482
|
+
function r(U) {
|
|
7469
7483
|
let K = {
|
|
7470
7484
|
type: "root",
|
|
7471
7485
|
children: []
|
|
@@ -7482,24 +7496,24 @@ function _m(e) {
|
|
|
7482
7496
|
getData: u
|
|
7483
7497
|
}, Ee = [];
|
|
7484
7498
|
let he = -1;
|
|
7485
|
-
for (; ++he <
|
|
7486
|
-
if (
|
|
7487
|
-
if (
|
|
7499
|
+
for (; ++he < U.length; )
|
|
7500
|
+
if (U[he][1].type === "listOrdered" || U[he][1].type === "listUnordered")
|
|
7501
|
+
if (U[he][0] === "enter")
|
|
7488
7502
|
Ee.push(he);
|
|
7489
7503
|
else {
|
|
7490
7504
|
const Qe = Ee.pop();
|
|
7491
|
-
he = a(
|
|
7505
|
+
he = a(U, Qe, he);
|
|
7492
7506
|
}
|
|
7493
|
-
for (he = -1; ++he <
|
|
7494
|
-
const Qe = t[
|
|
7495
|
-
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(
|
|
7496
7510
|
Object.assign(
|
|
7497
7511
|
{
|
|
7498
|
-
sliceSerialize:
|
|
7512
|
+
sliceSerialize: U[he][2].sliceSerialize
|
|
7499
7513
|
},
|
|
7500
7514
|
ie
|
|
7501
7515
|
),
|
|
7502
|
-
|
|
7516
|
+
U[he][1]
|
|
7503
7517
|
);
|
|
7504
7518
|
}
|
|
7505
7519
|
if (ie.tokenStack.length > 0) {
|
|
@@ -7508,14 +7522,14 @@ function _m(e) {
|
|
|
7508
7522
|
}
|
|
7509
7523
|
for (K.position = {
|
|
7510
7524
|
start: Vt(
|
|
7511
|
-
|
|
7525
|
+
U.length > 0 ? U[0][1].start : {
|
|
7512
7526
|
line: 1,
|
|
7513
7527
|
column: 1,
|
|
7514
7528
|
offset: 0
|
|
7515
7529
|
}
|
|
7516
7530
|
),
|
|
7517
7531
|
end: Vt(
|
|
7518
|
-
|
|
7532
|
+
U.length > 0 ? U[U.length - 2][1].end : {
|
|
7519
7533
|
line: 1,
|
|
7520
7534
|
column: 1,
|
|
7521
7535
|
offset: 0
|
|
@@ -7525,24 +7539,24 @@ function _m(e) {
|
|
|
7525
7539
|
K = t.transforms[he](K) || K;
|
|
7526
7540
|
return K;
|
|
7527
7541
|
}
|
|
7528
|
-
function a(
|
|
7542
|
+
function a(U, K, ie) {
|
|
7529
7543
|
let Ee = K - 1, he = -1, Qe = !1, ut, Ve, Be, rt;
|
|
7530
7544
|
for (; ++Ee <= ie; ) {
|
|
7531
|
-
const He =
|
|
7545
|
+
const He = U[Ee];
|
|
7532
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")) {
|
|
7533
7547
|
if (ut) {
|
|
7534
7548
|
let ot = Ee;
|
|
7535
7549
|
for (Ve = void 0; ot--; ) {
|
|
7536
|
-
const vt =
|
|
7550
|
+
const vt = U[ot];
|
|
7537
7551
|
if (vt[1].type === "lineEnding" || vt[1].type === "lineEndingBlank") {
|
|
7538
7552
|
if (vt[0] === "exit") continue;
|
|
7539
|
-
Ve && (
|
|
7553
|
+
Ve && (U[Ve][1].type = "lineEndingBlank", Qe = !0), vt[1].type = "lineEnding", Ve = ot;
|
|
7540
7554
|
} else if (!(vt[1].type === "linePrefix" || vt[1].type === "blockQuotePrefix" || vt[1].type === "blockQuotePrefixWhitespace" || vt[1].type === "blockQuoteMarker" || vt[1].type === "listItemIndent")) break;
|
|
7541
7555
|
}
|
|
7542
7556
|
Be && (!Ve || Be < Ve) && (ut._spread = !0), ut.end = Object.assign(
|
|
7543
7557
|
{},
|
|
7544
|
-
Ve ?
|
|
7545
|
-
),
|
|
7558
|
+
Ve ? U[Ve][1].start : He[1].end
|
|
7559
|
+
), U.splice(Ve || Ee, 0, ["exit", ut, He[2]]), Ee++, ie++;
|
|
7546
7560
|
}
|
|
7547
7561
|
He[1].type === "listItemPrefix" && (ut = {
|
|
7548
7562
|
type: "listItem",
|
|
@@ -7550,21 +7564,21 @@ function _m(e) {
|
|
|
7550
7564
|
start: Object.assign({}, He[1].start),
|
|
7551
7565
|
// @ts-expect-error: we’ll add `end` in a second.
|
|
7552
7566
|
end: void 0
|
|
7553
|
-
},
|
|
7567
|
+
}, U.splice(Ee, 0, ["enter", ut, He[2]]), Ee++, ie++, Be = void 0, rt = !0);
|
|
7554
7568
|
}
|
|
7555
7569
|
}
|
|
7556
|
-
return
|
|
7570
|
+
return U[K][1]._spread = Qe, ie;
|
|
7557
7571
|
}
|
|
7558
|
-
function i(
|
|
7559
|
-
n[
|
|
7572
|
+
function i(U, K) {
|
|
7573
|
+
n[U] = K;
|
|
7560
7574
|
}
|
|
7561
|
-
function u(
|
|
7562
|
-
return n[
|
|
7575
|
+
function u(U) {
|
|
7576
|
+
return n[U];
|
|
7563
7577
|
}
|
|
7564
|
-
function s(
|
|
7578
|
+
function s(U, K) {
|
|
7565
7579
|
return ie;
|
|
7566
7580
|
function ie(Ee) {
|
|
7567
|
-
c.call(this,
|
|
7581
|
+
c.call(this, U(Ee), Ee), K && K.call(this, Ee);
|
|
7568
7582
|
}
|
|
7569
7583
|
}
|
|
7570
7584
|
function l() {
|
|
@@ -7573,28 +7587,28 @@ function _m(e) {
|
|
|
7573
7587
|
children: []
|
|
7574
7588
|
});
|
|
7575
7589
|
}
|
|
7576
|
-
function c(
|
|
7577
|
-
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 = {
|
|
7578
7592
|
start: Vt(K.start)
|
|
7579
|
-
},
|
|
7593
|
+
}, U;
|
|
7580
7594
|
}
|
|
7581
|
-
function d(
|
|
7595
|
+
function d(U) {
|
|
7582
7596
|
return K;
|
|
7583
7597
|
function K(ie) {
|
|
7584
|
-
|
|
7598
|
+
U && U.call(this, ie), f.call(this, ie);
|
|
7585
7599
|
}
|
|
7586
7600
|
}
|
|
7587
|
-
function f(
|
|
7601
|
+
function f(U, K) {
|
|
7588
7602
|
const ie = this.stack.pop(), Ee = this.tokenStack.pop();
|
|
7589
7603
|
if (Ee)
|
|
7590
|
-
Ee[0].type !==
|
|
7604
|
+
Ee[0].type !== U.type && (K ? K.call(this, U, Ee[0]) : (Ee[1] || To).call(this, U, Ee[0]));
|
|
7591
7605
|
else throw new Error(
|
|
7592
|
-
"Cannot close `" +
|
|
7593
|
-
start:
|
|
7594
|
-
end:
|
|
7606
|
+
"Cannot close `" + U.type + "` (" + tr({
|
|
7607
|
+
start: U.start,
|
|
7608
|
+
end: U.end
|
|
7595
7609
|
}) + "): it’s not open"
|
|
7596
7610
|
);
|
|
7597
|
-
return ie.position.end = Vt(
|
|
7611
|
+
return ie.position.end = Vt(U.end), ie;
|
|
7598
7612
|
}
|
|
7599
7613
|
function p() {
|
|
7600
7614
|
return fp(this.stack.pop());
|
|
@@ -7602,134 +7616,134 @@ function _m(e) {
|
|
|
7602
7616
|
function h() {
|
|
7603
7617
|
i("expectingFirstListItemValue", !0);
|
|
7604
7618
|
}
|
|
7605
|
-
function b(
|
|
7619
|
+
function b(U) {
|
|
7606
7620
|
if (u("expectingFirstListItemValue")) {
|
|
7607
7621
|
const K = this.stack[this.stack.length - 2];
|
|
7608
|
-
K.start = Number.parseInt(this.sliceSerialize(
|
|
7622
|
+
K.start = Number.parseInt(this.sliceSerialize(U), 10), i("expectingFirstListItemValue");
|
|
7609
7623
|
}
|
|
7610
7624
|
}
|
|
7611
7625
|
function m() {
|
|
7612
|
-
const
|
|
7613
|
-
K.lang =
|
|
7626
|
+
const U = this.resume(), K = this.stack[this.stack.length - 1];
|
|
7627
|
+
K.lang = U;
|
|
7614
7628
|
}
|
|
7615
7629
|
function T() {
|
|
7616
|
-
const
|
|
7617
|
-
K.meta =
|
|
7630
|
+
const U = this.resume(), K = this.stack[this.stack.length - 1];
|
|
7631
|
+
K.meta = U;
|
|
7618
7632
|
}
|
|
7619
7633
|
function g() {
|
|
7620
7634
|
u("flowCodeInside") || (this.buffer(), i("flowCodeInside", !0));
|
|
7621
7635
|
}
|
|
7622
7636
|
function D() {
|
|
7623
|
-
const
|
|
7624
|
-
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");
|
|
7625
7639
|
}
|
|
7626
7640
|
function P() {
|
|
7627
|
-
const
|
|
7628
|
-
K.value =
|
|
7641
|
+
const U = this.resume(), K = this.stack[this.stack.length - 1];
|
|
7642
|
+
K.value = U.replace(/(\r?\n|\r)$/g, "");
|
|
7629
7643
|
}
|
|
7630
|
-
function
|
|
7644
|
+
function X(U) {
|
|
7631
7645
|
const K = this.resume(), ie = this.stack[this.stack.length - 1];
|
|
7632
7646
|
ie.label = K, ie.identifier = Cn(
|
|
7633
|
-
this.sliceSerialize(
|
|
7647
|
+
this.sliceSerialize(U)
|
|
7634
7648
|
).toLowerCase();
|
|
7635
7649
|
}
|
|
7636
|
-
function
|
|
7637
|
-
const
|
|
7638
|
-
K.title =
|
|
7650
|
+
function F() {
|
|
7651
|
+
const U = this.resume(), K = this.stack[this.stack.length - 1];
|
|
7652
|
+
K.title = U;
|
|
7639
7653
|
}
|
|
7640
7654
|
function x() {
|
|
7641
|
-
const
|
|
7642
|
-
K.url =
|
|
7655
|
+
const U = this.resume(), K = this.stack[this.stack.length - 1];
|
|
7656
|
+
K.url = U;
|
|
7643
7657
|
}
|
|
7644
|
-
function
|
|
7658
|
+
function w(U) {
|
|
7645
7659
|
const K = this.stack[this.stack.length - 1];
|
|
7646
7660
|
if (!K.depth) {
|
|
7647
|
-
const ie = this.sliceSerialize(
|
|
7661
|
+
const ie = this.sliceSerialize(U).length;
|
|
7648
7662
|
K.depth = ie;
|
|
7649
7663
|
}
|
|
7650
7664
|
}
|
|
7651
|
-
function
|
|
7665
|
+
function V() {
|
|
7652
7666
|
i("setextHeadingSlurpLineEnding", !0);
|
|
7653
7667
|
}
|
|
7654
|
-
function q(
|
|
7668
|
+
function q(U) {
|
|
7655
7669
|
const K = this.stack[this.stack.length - 1];
|
|
7656
|
-
K.depth = this.sliceSerialize(
|
|
7670
|
+
K.depth = this.sliceSerialize(U).charCodeAt(0) === 61 ? 1 : 2;
|
|
7657
7671
|
}
|
|
7658
7672
|
function te() {
|
|
7659
7673
|
i("setextHeadingSlurpLineEnding");
|
|
7660
7674
|
}
|
|
7661
|
-
function Y(
|
|
7675
|
+
function Y(U) {
|
|
7662
7676
|
const K = this.stack[this.stack.length - 1];
|
|
7663
7677
|
let ie = K.children[K.children.length - 1];
|
|
7664
7678
|
(!ie || ie.type !== "text") && (ie = Fe(), ie.position = {
|
|
7665
|
-
start: Vt(
|
|
7679
|
+
start: Vt(U.start)
|
|
7666
7680
|
}, K.children.push(ie)), this.stack.push(ie);
|
|
7667
7681
|
}
|
|
7668
|
-
function $(
|
|
7682
|
+
function $(U) {
|
|
7669
7683
|
const K = this.stack.pop();
|
|
7670
|
-
K.value += this.sliceSerialize(
|
|
7684
|
+
K.value += this.sliceSerialize(U), K.position.end = Vt(U.end);
|
|
7671
7685
|
}
|
|
7672
|
-
function
|
|
7686
|
+
function k(U) {
|
|
7673
7687
|
const K = this.stack[this.stack.length - 1];
|
|
7674
7688
|
if (u("atHardBreak")) {
|
|
7675
7689
|
const ie = K.children[K.children.length - 1];
|
|
7676
|
-
ie.position.end = Vt(
|
|
7690
|
+
ie.position.end = Vt(U.end), i("atHardBreak");
|
|
7677
7691
|
return;
|
|
7678
7692
|
}
|
|
7679
|
-
!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));
|
|
7680
7694
|
}
|
|
7681
7695
|
function I() {
|
|
7682
7696
|
i("atHardBreak", !0);
|
|
7683
7697
|
}
|
|
7684
|
-
function
|
|
7685
|
-
const
|
|
7686
|
-
K.value =
|
|
7698
|
+
function L() {
|
|
7699
|
+
const U = this.resume(), K = this.stack[this.stack.length - 1];
|
|
7700
|
+
K.value = U;
|
|
7687
7701
|
}
|
|
7688
|
-
function
|
|
7689
|
-
const
|
|
7690
|
-
K.value =
|
|
7702
|
+
function B() {
|
|
7703
|
+
const U = this.resume(), K = this.stack[this.stack.length - 1];
|
|
7704
|
+
K.value = U;
|
|
7691
7705
|
}
|
|
7692
|
-
function
|
|
7693
|
-
const
|
|
7694
|
-
K.value =
|
|
7706
|
+
function W() {
|
|
7707
|
+
const U = this.resume(), K = this.stack[this.stack.length - 1];
|
|
7708
|
+
K.value = U;
|
|
7695
7709
|
}
|
|
7696
|
-
function
|
|
7697
|
-
const
|
|
7710
|
+
function H() {
|
|
7711
|
+
const U = this.stack[this.stack.length - 1];
|
|
7698
7712
|
if (u("inReference")) {
|
|
7699
7713
|
const K = u("referenceType") || "shortcut";
|
|
7700
|
-
|
|
7714
|
+
U.type += "Reference", U.referenceType = K, delete U.url, delete U.title;
|
|
7701
7715
|
} else
|
|
7702
|
-
delete
|
|
7716
|
+
delete U.identifier, delete U.label;
|
|
7703
7717
|
i("referenceType");
|
|
7704
7718
|
}
|
|
7705
7719
|
function z() {
|
|
7706
|
-
const
|
|
7720
|
+
const U = this.stack[this.stack.length - 1];
|
|
7707
7721
|
if (u("inReference")) {
|
|
7708
7722
|
const K = u("referenceType") || "shortcut";
|
|
7709
|
-
|
|
7723
|
+
U.type += "Reference", U.referenceType = K, delete U.url, delete U.title;
|
|
7710
7724
|
} else
|
|
7711
|
-
delete
|
|
7725
|
+
delete U.identifier, delete U.label;
|
|
7712
7726
|
i("referenceType");
|
|
7713
7727
|
}
|
|
7714
|
-
function y(
|
|
7715
|
-
const K = this.sliceSerialize(
|
|
7728
|
+
function y(U) {
|
|
7729
|
+
const K = this.sliceSerialize(U), ie = this.stack[this.stack.length - 2];
|
|
7716
7730
|
ie.label = Em(K), ie.identifier = Cn(K).toLowerCase();
|
|
7717
7731
|
}
|
|
7718
7732
|
function ne() {
|
|
7719
|
-
const
|
|
7733
|
+
const U = this.stack[this.stack.length - 1], K = this.resume(), ie = this.stack[this.stack.length - 1];
|
|
7720
7734
|
if (i("inReference", !0), ie.type === "link") {
|
|
7721
|
-
const Ee =
|
|
7735
|
+
const Ee = U.children;
|
|
7722
7736
|
ie.children = Ee;
|
|
7723
7737
|
} else
|
|
7724
7738
|
ie.alt = K;
|
|
7725
7739
|
}
|
|
7726
7740
|
function ae() {
|
|
7727
|
-
const
|
|
7728
|
-
K.url =
|
|
7741
|
+
const U = this.resume(), K = this.stack[this.stack.length - 1];
|
|
7742
|
+
K.url = U;
|
|
7729
7743
|
}
|
|
7730
7744
|
function v() {
|
|
7731
|
-
const
|
|
7732
|
-
K.title =
|
|
7745
|
+
const U = this.resume(), K = this.stack[this.stack.length - 1];
|
|
7746
|
+
K.title = U;
|
|
7733
7747
|
}
|
|
7734
7748
|
function se() {
|
|
7735
7749
|
i("inReference");
|
|
@@ -7737,34 +7751,34 @@ function _m(e) {
|
|
|
7737
7751
|
function _e() {
|
|
7738
7752
|
i("referenceType", "collapsed");
|
|
7739
7753
|
}
|
|
7740
|
-
function pe(
|
|
7754
|
+
function pe(U) {
|
|
7741
7755
|
const K = this.resume(), ie = this.stack[this.stack.length - 1];
|
|
7742
7756
|
ie.label = K, ie.identifier = Cn(
|
|
7743
|
-
this.sliceSerialize(
|
|
7757
|
+
this.sliceSerialize(U)
|
|
7744
7758
|
).toLowerCase(), i("referenceType", "full");
|
|
7745
7759
|
}
|
|
7746
|
-
function Se(
|
|
7747
|
-
i("characterReferenceType",
|
|
7760
|
+
function Se(U) {
|
|
7761
|
+
i("characterReferenceType", U.type);
|
|
7748
7762
|
}
|
|
7749
|
-
function Oe(
|
|
7750
|
-
const K = this.sliceSerialize(
|
|
7763
|
+
function Oe(U) {
|
|
7764
|
+
const K = this.sliceSerialize(U), ie = u("characterReferenceType");
|
|
7751
7765
|
let Ee;
|
|
7752
7766
|
ie ? (Ee = Nl(
|
|
7753
7767
|
K,
|
|
7754
7768
|
ie === "characterReferenceMarkerNumeric" ? 10 : 16
|
|
7755
7769
|
), i("characterReferenceType")) : Ee = wi(K);
|
|
7756
7770
|
const he = this.stack.pop();
|
|
7757
|
-
he.value += Ee, he.position.end = Vt(
|
|
7771
|
+
he.value += Ee, he.position.end = Vt(U.end);
|
|
7758
7772
|
}
|
|
7759
|
-
function ze(
|
|
7760
|
-
$.call(this,
|
|
7773
|
+
function ze(U) {
|
|
7774
|
+
$.call(this, U);
|
|
7761
7775
|
const K = this.stack[this.stack.length - 1];
|
|
7762
|
-
K.url = this.sliceSerialize(
|
|
7776
|
+
K.url = this.sliceSerialize(U);
|
|
7763
7777
|
}
|
|
7764
|
-
function Ie(
|
|
7765
|
-
$.call(this,
|
|
7778
|
+
function Ie(U) {
|
|
7779
|
+
$.call(this, U);
|
|
7766
7780
|
const K = this.stack[this.stack.length - 1];
|
|
7767
|
-
K.url = "mailto:" + this.sliceSerialize(
|
|
7781
|
+
K.url = "mailto:" + this.sliceSerialize(U);
|
|
7768
7782
|
}
|
|
7769
7783
|
function nt() {
|
|
7770
7784
|
return {
|
|
@@ -7835,19 +7849,19 @@ function _m(e) {
|
|
|
7835
7849
|
children: []
|
|
7836
7850
|
};
|
|
7837
7851
|
}
|
|
7838
|
-
function be(
|
|
7852
|
+
function be(U) {
|
|
7839
7853
|
return {
|
|
7840
7854
|
type: "list",
|
|
7841
|
-
ordered:
|
|
7855
|
+
ordered: U.type === "listOrdered",
|
|
7842
7856
|
start: null,
|
|
7843
|
-
spread:
|
|
7857
|
+
spread: U._spread,
|
|
7844
7858
|
children: []
|
|
7845
7859
|
};
|
|
7846
7860
|
}
|
|
7847
|
-
function Me(
|
|
7861
|
+
function Me(U) {
|
|
7848
7862
|
return {
|
|
7849
7863
|
type: "listItem",
|
|
7850
|
-
spread:
|
|
7864
|
+
spread: U._spread,
|
|
7851
7865
|
checked: null,
|
|
7852
7866
|
children: []
|
|
7853
7867
|
};
|
|
@@ -9996,78 +10010,78 @@ function L2() {
|
|
|
9996
10010
|
if (!m) return [];
|
|
9997
10011
|
T = T || {};
|
|
9998
10012
|
var g = 1, D = 1;
|
|
9999
|
-
function P(
|
|
10000
|
-
var I =
|
|
10013
|
+
function P(k) {
|
|
10014
|
+
var I = k.match(t);
|
|
10001
10015
|
I && (g += I.length);
|
|
10002
|
-
var
|
|
10003
|
-
D = ~
|
|
10016
|
+
var L = k.lastIndexOf(l);
|
|
10017
|
+
D = ~L ? k.length - L : D + k.length;
|
|
10004
10018
|
}
|
|
10005
|
-
function
|
|
10006
|
-
var
|
|
10019
|
+
function X() {
|
|
10020
|
+
var k = { line: g, column: D };
|
|
10007
10021
|
return function(I) {
|
|
10008
|
-
return I.position = new
|
|
10022
|
+
return I.position = new F(k), V(), I;
|
|
10009
10023
|
};
|
|
10010
10024
|
}
|
|
10011
|
-
function
|
|
10012
|
-
this.start =
|
|
10025
|
+
function F(k) {
|
|
10026
|
+
this.start = k, this.end = { line: g, column: D }, this.source = T.source;
|
|
10013
10027
|
}
|
|
10014
|
-
|
|
10015
|
-
function x(
|
|
10028
|
+
F.prototype.content = m;
|
|
10029
|
+
function x(k) {
|
|
10016
10030
|
var I = new Error(
|
|
10017
|
-
T.source + ":" + g + ":" + D + ": " +
|
|
10031
|
+
T.source + ":" + g + ":" + D + ": " + k
|
|
10018
10032
|
);
|
|
10019
|
-
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;
|
|
10020
10034
|
}
|
|
10021
|
-
function k
|
|
10022
|
-
var I =
|
|
10035
|
+
function w(k) {
|
|
10036
|
+
var I = k.exec(m);
|
|
10023
10037
|
if (I) {
|
|
10024
|
-
var
|
|
10025
|
-
return P(
|
|
10038
|
+
var L = I[0];
|
|
10039
|
+
return P(L), m = m.slice(L.length), I;
|
|
10026
10040
|
}
|
|
10027
10041
|
}
|
|
10028
|
-
function
|
|
10029
|
-
|
|
10042
|
+
function V() {
|
|
10043
|
+
w(n);
|
|
10030
10044
|
}
|
|
10031
|
-
function q(
|
|
10045
|
+
function q(k) {
|
|
10032
10046
|
var I;
|
|
10033
|
-
for (
|
|
10034
|
-
I !== !1 &&
|
|
10035
|
-
return
|
|
10047
|
+
for (k = k || []; I = te(); )
|
|
10048
|
+
I !== !1 && k.push(I);
|
|
10049
|
+
return k;
|
|
10036
10050
|
}
|
|
10037
10051
|
function te() {
|
|
10038
|
-
var
|
|
10052
|
+
var k = X();
|
|
10039
10053
|
if (!(c != m.charAt(0) || d != m.charAt(1))) {
|
|
10040
10054
|
for (var I = 2; f != m.charAt(I) && (d != m.charAt(I) || c != m.charAt(I + 1)); )
|
|
10041
10055
|
++I;
|
|
10042
10056
|
if (I += 2, f === m.charAt(I - 1))
|
|
10043
10057
|
return x("End of comment missing");
|
|
10044
|
-
var
|
|
10045
|
-
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({
|
|
10046
10060
|
type: p,
|
|
10047
|
-
comment:
|
|
10061
|
+
comment: L
|
|
10048
10062
|
});
|
|
10049
10063
|
}
|
|
10050
10064
|
}
|
|
10051
10065
|
function Y() {
|
|
10052
|
-
var
|
|
10066
|
+
var k = X(), I = w(r);
|
|
10053
10067
|
if (I) {
|
|
10054
|
-
if (te(), !
|
|
10055
|
-
var
|
|
10068
|
+
if (te(), !w(a)) return x("property missing ':'");
|
|
10069
|
+
var L = w(i), B = k({
|
|
10056
10070
|
type: h,
|
|
10057
10071
|
property: b(I[0].replace(e, f)),
|
|
10058
|
-
value:
|
|
10072
|
+
value: L ? b(L[0].replace(e, f)) : f
|
|
10059
10073
|
});
|
|
10060
|
-
return
|
|
10074
|
+
return w(u), B;
|
|
10061
10075
|
}
|
|
10062
10076
|
}
|
|
10063
10077
|
function $() {
|
|
10064
|
-
var
|
|
10065
|
-
q(
|
|
10078
|
+
var k = [];
|
|
10079
|
+
q(k);
|
|
10066
10080
|
for (var I; I = Y(); )
|
|
10067
|
-
I !== !1 && (
|
|
10068
|
-
return
|
|
10081
|
+
I !== !1 && (k.push(I), q(k));
|
|
10082
|
+
return k;
|
|
10069
10083
|
}
|
|
10070
|
-
return
|
|
10084
|
+
return V(), $();
|
|
10071
10085
|
};
|
|
10072
10086
|
function b(m) {
|
|
10073
10087
|
return m ? m.replace(s, f) : f;
|
|
@@ -13289,10 +13303,10 @@ function Ac(e) {
|
|
|
13289
13303
|
function Sc(e) {
|
|
13290
13304
|
return e >= 64976 && e <= 65007 || Pg.has(e);
|
|
13291
13305
|
}
|
|
13292
|
-
var
|
|
13306
|
+
var j;
|
|
13293
13307
|
(function(e) {
|
|
13294
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";
|
|
13295
|
-
})(
|
|
13309
|
+
})(j || (j = {}));
|
|
13296
13310
|
const Bg = 65536;
|
|
13297
13311
|
class Hg {
|
|
13298
13312
|
constructor(t) {
|
|
@@ -13330,7 +13344,7 @@ class Hg {
|
|
|
13330
13344
|
return this.pos++, this._addGap(), Fg(t, n);
|
|
13331
13345
|
} else if (!this.lastChunkWritten)
|
|
13332
13346
|
return this.endOfChunkHit = !0, E.EOF;
|
|
13333
|
-
return this._err(
|
|
13347
|
+
return this._err(j.surrogateInInputStream), t;
|
|
13334
13348
|
}
|
|
13335
13349
|
willDropParsedChunk() {
|
|
13336
13350
|
return this.pos > this.bufferWaterline;
|
|
@@ -13368,7 +13382,7 @@ class Hg {
|
|
|
13368
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);
|
|
13369
13383
|
}
|
|
13370
13384
|
_checkForProblematicCharacters(t) {
|
|
13371
|
-
Ac(t) ? this._err(
|
|
13385
|
+
Ac(t) ? this._err(j.controlCharacterInInputStream) : Sc(t) && this._err(j.noncharacterInInputStream);
|
|
13372
13386
|
}
|
|
13373
13387
|
retreat(t) {
|
|
13374
13388
|
for (this.pos -= t; this.pos < this.lastGapPos; )
|
|
@@ -13661,10 +13675,10 @@ function Gg(e, t, n, r) {
|
|
|
13661
13675
|
}
|
|
13662
13676
|
return -1;
|
|
13663
13677
|
}
|
|
13664
|
-
var
|
|
13678
|
+
var G;
|
|
13665
13679
|
(function(e) {
|
|
13666
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/";
|
|
13667
|
-
})(
|
|
13681
|
+
})(G || (G = {}));
|
|
13668
13682
|
var on;
|
|
13669
13683
|
(function(e) {
|
|
13670
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";
|
|
@@ -13811,7 +13825,7 @@ function Dn(e) {
|
|
|
13811
13825
|
return (t = Xg.get(e)) !== null && t !== void 0 ? t : o.UNKNOWN;
|
|
13812
13826
|
}
|
|
13813
13827
|
const Q = o, Kg = {
|
|
13814
|
-
[
|
|
13828
|
+
[G.HTML]: /* @__PURE__ */ new Set([
|
|
13815
13829
|
Q.ADDRESS,
|
|
13816
13830
|
Q.APPLET,
|
|
13817
13831
|
Q.AREA,
|
|
@@ -13894,11 +13908,11 @@ const Q = o, Kg = {
|
|
|
13894
13908
|
Q.WBR,
|
|
13895
13909
|
Q.XMP
|
|
13896
13910
|
]),
|
|
13897
|
-
[
|
|
13898
|
-
[
|
|
13899
|
-
[
|
|
13900
|
-
[
|
|
13901
|
-
[
|
|
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()
|
|
13902
13916
|
}, yi = /* @__PURE__ */ new Set([Q.H1, Q.H2, Q.H3, Q.H4, Q.H5, Q.H6]);
|
|
13903
13917
|
R.STYLE, R.SCRIPT, R.XMP, R.IFRAME, R.NOEMBED, R.NOFRAMES, R.PLAINTEXT;
|
|
13904
13918
|
var C;
|
|
@@ -13938,7 +13952,7 @@ function Qo(e) {
|
|
|
13938
13952
|
return vc(e) || e === E.SOLIDUS || e === E.GREATER_THAN_SIGN;
|
|
13939
13953
|
}
|
|
13940
13954
|
function Jg(e) {
|
|
13941
|
-
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;
|
|
13942
13956
|
}
|
|
13943
13957
|
class eb {
|
|
13944
13958
|
constructor(t, n) {
|
|
@@ -13946,10 +13960,10 @@ class eb {
|
|
|
13946
13960
|
this.preprocessor.pos = this.entityStartPos + a - 1, this._flushCodePointConsumedAsCharacterReference(r);
|
|
13947
13961
|
}, n.onParseError ? {
|
|
13948
13962
|
missingSemicolonAfterCharacterReference: () => {
|
|
13949
|
-
this._err(
|
|
13963
|
+
this._err(j.missingSemicolonAfterCharacterReference, 1);
|
|
13950
13964
|
},
|
|
13951
13965
|
absenceOfDigitsInNumericCharacterReference: (r) => {
|
|
13952
|
-
this._err(
|
|
13966
|
+
this._err(j.absenceOfDigitsInNumericCharacterReference, this.entityStartPos - this.preprocessor.pos + r);
|
|
13953
13967
|
},
|
|
13954
13968
|
validateNumericCharacterReference: (r) => {
|
|
13955
13969
|
const a = Jg(r);
|
|
@@ -14077,7 +14091,7 @@ class eb {
|
|
|
14077
14091
|
a[this.currentAttr.name] = this.currentLocation, this._leaveAttrValue();
|
|
14078
14092
|
}
|
|
14079
14093
|
} else
|
|
14080
|
-
this._err(
|
|
14094
|
+
this._err(j.duplicateAttribute);
|
|
14081
14095
|
}
|
|
14082
14096
|
_leaveAttrValue() {
|
|
14083
14097
|
this.currentLocation && (this.currentLocation.endLine = this.preprocessor.line, this.currentLocation.endCol = this.preprocessor.col, this.currentLocation.endOffset = this.preprocessor.offset);
|
|
@@ -14088,7 +14102,7 @@ class eb {
|
|
|
14088
14102
|
}
|
|
14089
14103
|
emitCurrentTagToken() {
|
|
14090
14104
|
const t = this.currentToken;
|
|
14091
|
-
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();
|
|
14092
14106
|
}
|
|
14093
14107
|
emitCurrentComment(t) {
|
|
14094
14108
|
this.prepareToken(t), this.handler.onComment(t), this.preprocessor.dropParsedChunk();
|
|
@@ -14469,7 +14483,7 @@ class eb {
|
|
|
14469
14483
|
break;
|
|
14470
14484
|
}
|
|
14471
14485
|
case E.NULL: {
|
|
14472
|
-
this._err(
|
|
14486
|
+
this._err(j.unexpectedNullCharacter), this._emitCodePoint(t);
|
|
14473
14487
|
break;
|
|
14474
14488
|
}
|
|
14475
14489
|
case E.EOF: {
|
|
@@ -14493,7 +14507,7 @@ class eb {
|
|
|
14493
14507
|
break;
|
|
14494
14508
|
}
|
|
14495
14509
|
case E.NULL: {
|
|
14496
|
-
this._err(
|
|
14510
|
+
this._err(j.unexpectedNullCharacter), this._emitChars(qe);
|
|
14497
14511
|
break;
|
|
14498
14512
|
}
|
|
14499
14513
|
case E.EOF: {
|
|
@@ -14513,7 +14527,7 @@ class eb {
|
|
|
14513
14527
|
break;
|
|
14514
14528
|
}
|
|
14515
14529
|
case E.NULL: {
|
|
14516
|
-
this._err(
|
|
14530
|
+
this._err(j.unexpectedNullCharacter), this._emitChars(qe);
|
|
14517
14531
|
break;
|
|
14518
14532
|
}
|
|
14519
14533
|
case E.EOF: {
|
|
@@ -14533,7 +14547,7 @@ class eb {
|
|
|
14533
14547
|
break;
|
|
14534
14548
|
}
|
|
14535
14549
|
case E.NULL: {
|
|
14536
|
-
this._err(
|
|
14550
|
+
this._err(j.unexpectedNullCharacter), this._emitChars(qe);
|
|
14537
14551
|
break;
|
|
14538
14552
|
}
|
|
14539
14553
|
case E.EOF: {
|
|
@@ -14549,7 +14563,7 @@ class eb {
|
|
|
14549
14563
|
_statePlaintext(t) {
|
|
14550
14564
|
switch (t) {
|
|
14551
14565
|
case E.NULL: {
|
|
14552
|
-
this._err(
|
|
14566
|
+
this._err(j.unexpectedNullCharacter), this._emitChars(qe);
|
|
14553
14567
|
break;
|
|
14554
14568
|
}
|
|
14555
14569
|
case E.EOF: {
|
|
@@ -14576,15 +14590,15 @@ class eb {
|
|
|
14576
14590
|
break;
|
|
14577
14591
|
}
|
|
14578
14592
|
case E.QUESTION_MARK: {
|
|
14579
|
-
this._err(
|
|
14593
|
+
this._err(j.unexpectedQuestionMarkInsteadOfTagName), this._createCommentToken(1), this.state = C.BOGUS_COMMENT, this._stateBogusComment(t);
|
|
14580
14594
|
break;
|
|
14581
14595
|
}
|
|
14582
14596
|
case E.EOF: {
|
|
14583
|
-
this._err(
|
|
14597
|
+
this._err(j.eofBeforeTagName), this._emitChars("<"), this._emitEOFToken();
|
|
14584
14598
|
break;
|
|
14585
14599
|
}
|
|
14586
14600
|
default:
|
|
14587
|
-
this._err(
|
|
14601
|
+
this._err(j.invalidFirstCharacterOfTagName), this._emitChars("<"), this.state = C.DATA, this._stateData(t);
|
|
14588
14602
|
}
|
|
14589
14603
|
}
|
|
14590
14604
|
// End tag open state
|
|
@@ -14595,15 +14609,15 @@ class eb {
|
|
|
14595
14609
|
else
|
|
14596
14610
|
switch (t) {
|
|
14597
14611
|
case E.GREATER_THAN_SIGN: {
|
|
14598
|
-
this._err(
|
|
14612
|
+
this._err(j.missingEndTagName), this.state = C.DATA;
|
|
14599
14613
|
break;
|
|
14600
14614
|
}
|
|
14601
14615
|
case E.EOF: {
|
|
14602
|
-
this._err(
|
|
14616
|
+
this._err(j.eofBeforeTagName), this._emitChars("</"), this._emitEOFToken();
|
|
14603
14617
|
break;
|
|
14604
14618
|
}
|
|
14605
14619
|
default:
|
|
14606
|
-
this._err(
|
|
14620
|
+
this._err(j.invalidFirstCharacterOfTagName), this._createCommentToken(2), this.state = C.BOGUS_COMMENT, this._stateBogusComment(t);
|
|
14607
14621
|
}
|
|
14608
14622
|
}
|
|
14609
14623
|
// Tag name state
|
|
@@ -14627,11 +14641,11 @@ class eb {
|
|
|
14627
14641
|
break;
|
|
14628
14642
|
}
|
|
14629
14643
|
case E.NULL: {
|
|
14630
|
-
this._err(
|
|
14644
|
+
this._err(j.unexpectedNullCharacter), n.tagName += qe;
|
|
14631
14645
|
break;
|
|
14632
14646
|
}
|
|
14633
14647
|
case E.EOF: {
|
|
14634
|
-
this._err(
|
|
14648
|
+
this._err(j.eofInTag), this._emitEOFToken();
|
|
14635
14649
|
break;
|
|
14636
14650
|
}
|
|
14637
14651
|
default:
|
|
@@ -14736,11 +14750,11 @@ class eb {
|
|
|
14736
14750
|
break;
|
|
14737
14751
|
}
|
|
14738
14752
|
case E.NULL: {
|
|
14739
|
-
this._err(
|
|
14753
|
+
this._err(j.unexpectedNullCharacter), this._emitChars(qe);
|
|
14740
14754
|
break;
|
|
14741
14755
|
}
|
|
14742
14756
|
case E.EOF: {
|
|
14743
|
-
this._err(
|
|
14757
|
+
this._err(j.eofInScriptHtmlCommentLikeText), this._emitEOFToken();
|
|
14744
14758
|
break;
|
|
14745
14759
|
}
|
|
14746
14760
|
default:
|
|
@@ -14760,11 +14774,11 @@ class eb {
|
|
|
14760
14774
|
break;
|
|
14761
14775
|
}
|
|
14762
14776
|
case E.NULL: {
|
|
14763
|
-
this._err(
|
|
14777
|
+
this._err(j.unexpectedNullCharacter), this.state = C.SCRIPT_DATA_ESCAPED, this._emitChars(qe);
|
|
14764
14778
|
break;
|
|
14765
14779
|
}
|
|
14766
14780
|
case E.EOF: {
|
|
14767
|
-
this._err(
|
|
14781
|
+
this._err(j.eofInScriptHtmlCommentLikeText), this._emitEOFToken();
|
|
14768
14782
|
break;
|
|
14769
14783
|
}
|
|
14770
14784
|
default:
|
|
@@ -14788,11 +14802,11 @@ class eb {
|
|
|
14788
14802
|
break;
|
|
14789
14803
|
}
|
|
14790
14804
|
case E.NULL: {
|
|
14791
|
-
this._err(
|
|
14805
|
+
this._err(j.unexpectedNullCharacter), this.state = C.SCRIPT_DATA_ESCAPED, this._emitChars(qe);
|
|
14792
14806
|
break;
|
|
14793
14807
|
}
|
|
14794
14808
|
case E.EOF: {
|
|
14795
|
-
this._err(
|
|
14809
|
+
this._err(j.eofInScriptHtmlCommentLikeText), this._emitEOFToken();
|
|
14796
14810
|
break;
|
|
14797
14811
|
}
|
|
14798
14812
|
default:
|
|
@@ -14837,11 +14851,11 @@ class eb {
|
|
|
14837
14851
|
break;
|
|
14838
14852
|
}
|
|
14839
14853
|
case E.NULL: {
|
|
14840
|
-
this._err(
|
|
14854
|
+
this._err(j.unexpectedNullCharacter), this._emitChars(qe);
|
|
14841
14855
|
break;
|
|
14842
14856
|
}
|
|
14843
14857
|
case E.EOF: {
|
|
14844
|
-
this._err(
|
|
14858
|
+
this._err(j.eofInScriptHtmlCommentLikeText), this._emitEOFToken();
|
|
14845
14859
|
break;
|
|
14846
14860
|
}
|
|
14847
14861
|
default:
|
|
@@ -14861,11 +14875,11 @@ class eb {
|
|
|
14861
14875
|
break;
|
|
14862
14876
|
}
|
|
14863
14877
|
case E.NULL: {
|
|
14864
|
-
this._err(
|
|
14878
|
+
this._err(j.unexpectedNullCharacter), this.state = C.SCRIPT_DATA_DOUBLE_ESCAPED, this._emitChars(qe);
|
|
14865
14879
|
break;
|
|
14866
14880
|
}
|
|
14867
14881
|
case E.EOF: {
|
|
14868
|
-
this._err(
|
|
14882
|
+
this._err(j.eofInScriptHtmlCommentLikeText), this._emitEOFToken();
|
|
14869
14883
|
break;
|
|
14870
14884
|
}
|
|
14871
14885
|
default:
|
|
@@ -14889,11 +14903,11 @@ class eb {
|
|
|
14889
14903
|
break;
|
|
14890
14904
|
}
|
|
14891
14905
|
case E.NULL: {
|
|
14892
|
-
this._err(
|
|
14906
|
+
this._err(j.unexpectedNullCharacter), this.state = C.SCRIPT_DATA_DOUBLE_ESCAPED, this._emitChars(qe);
|
|
14893
14907
|
break;
|
|
14894
14908
|
}
|
|
14895
14909
|
case E.EOF: {
|
|
14896
|
-
this._err(
|
|
14910
|
+
this._err(j.eofInScriptHtmlCommentLikeText), this._emitEOFToken();
|
|
14897
14911
|
break;
|
|
14898
14912
|
}
|
|
14899
14913
|
default:
|
|
@@ -14931,7 +14945,7 @@ class eb {
|
|
|
14931
14945
|
break;
|
|
14932
14946
|
}
|
|
14933
14947
|
case E.EQUALS_SIGN: {
|
|
14934
|
-
this._err(
|
|
14948
|
+
this._err(j.unexpectedEqualsSignBeforeAttributeName), this._createAttr("="), this.state = C.ATTRIBUTE_NAME;
|
|
14935
14949
|
break;
|
|
14936
14950
|
}
|
|
14937
14951
|
default:
|
|
@@ -14959,11 +14973,11 @@ class eb {
|
|
|
14959
14973
|
case E.QUOTATION_MARK:
|
|
14960
14974
|
case E.APOSTROPHE:
|
|
14961
14975
|
case E.LESS_THAN_SIGN: {
|
|
14962
|
-
this._err(
|
|
14976
|
+
this._err(j.unexpectedCharacterInAttributeName), this.currentAttr.name += String.fromCodePoint(t);
|
|
14963
14977
|
break;
|
|
14964
14978
|
}
|
|
14965
14979
|
case E.NULL: {
|
|
14966
|
-
this._err(
|
|
14980
|
+
this._err(j.unexpectedNullCharacter), this.currentAttr.name += qe;
|
|
14967
14981
|
break;
|
|
14968
14982
|
}
|
|
14969
14983
|
default:
|
|
@@ -14992,7 +15006,7 @@ class eb {
|
|
|
14992
15006
|
break;
|
|
14993
15007
|
}
|
|
14994
15008
|
case E.EOF: {
|
|
14995
|
-
this._err(
|
|
15009
|
+
this._err(j.eofInTag), this._emitEOFToken();
|
|
14996
15010
|
break;
|
|
14997
15011
|
}
|
|
14998
15012
|
default:
|
|
@@ -15017,7 +15031,7 @@ class eb {
|
|
|
15017
15031
|
break;
|
|
15018
15032
|
}
|
|
15019
15033
|
case E.GREATER_THAN_SIGN: {
|
|
15020
|
-
this._err(
|
|
15034
|
+
this._err(j.missingAttributeValue), this.state = C.DATA, this.emitCurrentTagToken();
|
|
15021
15035
|
break;
|
|
15022
15036
|
}
|
|
15023
15037
|
default:
|
|
@@ -15037,11 +15051,11 @@ class eb {
|
|
|
15037
15051
|
break;
|
|
15038
15052
|
}
|
|
15039
15053
|
case E.NULL: {
|
|
15040
|
-
this._err(
|
|
15054
|
+
this._err(j.unexpectedNullCharacter), this.currentAttr.value += qe;
|
|
15041
15055
|
break;
|
|
15042
15056
|
}
|
|
15043
15057
|
case E.EOF: {
|
|
15044
|
-
this._err(
|
|
15058
|
+
this._err(j.eofInTag), this._emitEOFToken();
|
|
15045
15059
|
break;
|
|
15046
15060
|
}
|
|
15047
15061
|
default:
|
|
@@ -15061,11 +15075,11 @@ class eb {
|
|
|
15061
15075
|
break;
|
|
15062
15076
|
}
|
|
15063
15077
|
case E.NULL: {
|
|
15064
|
-
this._err(
|
|
15078
|
+
this._err(j.unexpectedNullCharacter), this.currentAttr.value += qe;
|
|
15065
15079
|
break;
|
|
15066
15080
|
}
|
|
15067
15081
|
case E.EOF: {
|
|
15068
|
-
this._err(
|
|
15082
|
+
this._err(j.eofInTag), this._emitEOFToken();
|
|
15069
15083
|
break;
|
|
15070
15084
|
}
|
|
15071
15085
|
default:
|
|
@@ -15092,7 +15106,7 @@ class eb {
|
|
|
15092
15106
|
break;
|
|
15093
15107
|
}
|
|
15094
15108
|
case E.NULL: {
|
|
15095
|
-
this._err(
|
|
15109
|
+
this._err(j.unexpectedNullCharacter), this.currentAttr.value += qe;
|
|
15096
15110
|
break;
|
|
15097
15111
|
}
|
|
15098
15112
|
case E.QUOTATION_MARK:
|
|
@@ -15100,11 +15114,11 @@ class eb {
|
|
|
15100
15114
|
case E.LESS_THAN_SIGN:
|
|
15101
15115
|
case E.EQUALS_SIGN:
|
|
15102
15116
|
case E.GRAVE_ACCENT: {
|
|
15103
|
-
this._err(
|
|
15117
|
+
this._err(j.unexpectedCharacterInUnquotedAttributeValue), this.currentAttr.value += String.fromCodePoint(t);
|
|
15104
15118
|
break;
|
|
15105
15119
|
}
|
|
15106
15120
|
case E.EOF: {
|
|
15107
|
-
this._err(
|
|
15121
|
+
this._err(j.eofInTag), this._emitEOFToken();
|
|
15108
15122
|
break;
|
|
15109
15123
|
}
|
|
15110
15124
|
default:
|
|
@@ -15131,11 +15145,11 @@ class eb {
|
|
|
15131
15145
|
break;
|
|
15132
15146
|
}
|
|
15133
15147
|
case E.EOF: {
|
|
15134
|
-
this._err(
|
|
15148
|
+
this._err(j.eofInTag), this._emitEOFToken();
|
|
15135
15149
|
break;
|
|
15136
15150
|
}
|
|
15137
15151
|
default:
|
|
15138
|
-
this._err(
|
|
15152
|
+
this._err(j.missingWhitespaceBetweenAttributes), this.state = C.BEFORE_ATTRIBUTE_NAME, this._stateBeforeAttributeName(t);
|
|
15139
15153
|
}
|
|
15140
15154
|
}
|
|
15141
15155
|
// Self-closing start tag state
|
|
@@ -15148,11 +15162,11 @@ class eb {
|
|
|
15148
15162
|
break;
|
|
15149
15163
|
}
|
|
15150
15164
|
case E.EOF: {
|
|
15151
|
-
this._err(
|
|
15165
|
+
this._err(j.eofInTag), this._emitEOFToken();
|
|
15152
15166
|
break;
|
|
15153
15167
|
}
|
|
15154
15168
|
default:
|
|
15155
|
-
this._err(
|
|
15169
|
+
this._err(j.unexpectedSolidusInTag), this.state = C.BEFORE_ATTRIBUTE_NAME, this._stateBeforeAttributeName(t);
|
|
15156
15170
|
}
|
|
15157
15171
|
}
|
|
15158
15172
|
// Bogus comment state
|
|
@@ -15169,7 +15183,7 @@ class eb {
|
|
|
15169
15183
|
break;
|
|
15170
15184
|
}
|
|
15171
15185
|
case E.NULL: {
|
|
15172
|
-
this._err(
|
|
15186
|
+
this._err(j.unexpectedNullCharacter), n.data += qe;
|
|
15173
15187
|
break;
|
|
15174
15188
|
}
|
|
15175
15189
|
default:
|
|
@@ -15179,7 +15193,7 @@ class eb {
|
|
|
15179
15193
|
// Markup declaration open state
|
|
15180
15194
|
//------------------------------------------------------------------
|
|
15181
15195
|
_stateMarkupDeclarationOpen(t) {
|
|
15182
|
-
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));
|
|
15183
15197
|
}
|
|
15184
15198
|
// Comment start state
|
|
15185
15199
|
//------------------------------------------------------------------
|
|
@@ -15190,7 +15204,7 @@ class eb {
|
|
|
15190
15204
|
break;
|
|
15191
15205
|
}
|
|
15192
15206
|
case E.GREATER_THAN_SIGN: {
|
|
15193
|
-
this._err(
|
|
15207
|
+
this._err(j.abruptClosingOfEmptyComment), this.state = C.DATA;
|
|
15194
15208
|
const n = this.currentToken;
|
|
15195
15209
|
this.emitCurrentComment(n);
|
|
15196
15210
|
break;
|
|
@@ -15209,11 +15223,11 @@ class eb {
|
|
|
15209
15223
|
break;
|
|
15210
15224
|
}
|
|
15211
15225
|
case E.GREATER_THAN_SIGN: {
|
|
15212
|
-
this._err(
|
|
15226
|
+
this._err(j.abruptClosingOfEmptyComment), this.state = C.DATA, this.emitCurrentComment(n);
|
|
15213
15227
|
break;
|
|
15214
15228
|
}
|
|
15215
15229
|
case E.EOF: {
|
|
15216
|
-
this._err(
|
|
15230
|
+
this._err(j.eofInComment), this.emitCurrentComment(n), this._emitEOFToken();
|
|
15217
15231
|
break;
|
|
15218
15232
|
}
|
|
15219
15233
|
default:
|
|
@@ -15234,11 +15248,11 @@ class eb {
|
|
|
15234
15248
|
break;
|
|
15235
15249
|
}
|
|
15236
15250
|
case E.NULL: {
|
|
15237
|
-
this._err(
|
|
15251
|
+
this._err(j.unexpectedNullCharacter), n.data += qe;
|
|
15238
15252
|
break;
|
|
15239
15253
|
}
|
|
15240
15254
|
case E.EOF: {
|
|
15241
|
-
this._err(
|
|
15255
|
+
this._err(j.eofInComment), this.emitCurrentComment(n), this._emitEOFToken();
|
|
15242
15256
|
break;
|
|
15243
15257
|
}
|
|
15244
15258
|
default:
|
|
@@ -15275,7 +15289,7 @@ class eb {
|
|
|
15275
15289
|
// Comment less-than sign bang dash dash state
|
|
15276
15290
|
//------------------------------------------------------------------
|
|
15277
15291
|
_stateCommentLessThanSignBangDashDash(t) {
|
|
15278
|
-
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);
|
|
15279
15293
|
}
|
|
15280
15294
|
// Comment end dash state
|
|
15281
15295
|
//------------------------------------------------------------------
|
|
@@ -15287,7 +15301,7 @@ class eb {
|
|
|
15287
15301
|
break;
|
|
15288
15302
|
}
|
|
15289
15303
|
case E.EOF: {
|
|
15290
|
-
this._err(
|
|
15304
|
+
this._err(j.eofInComment), this.emitCurrentComment(n), this._emitEOFToken();
|
|
15291
15305
|
break;
|
|
15292
15306
|
}
|
|
15293
15307
|
default:
|
|
@@ -15312,7 +15326,7 @@ class eb {
|
|
|
15312
15326
|
break;
|
|
15313
15327
|
}
|
|
15314
15328
|
case E.EOF: {
|
|
15315
|
-
this._err(
|
|
15329
|
+
this._err(j.eofInComment), this.emitCurrentComment(n), this._emitEOFToken();
|
|
15316
15330
|
break;
|
|
15317
15331
|
}
|
|
15318
15332
|
default:
|
|
@@ -15329,11 +15343,11 @@ class eb {
|
|
|
15329
15343
|
break;
|
|
15330
15344
|
}
|
|
15331
15345
|
case E.GREATER_THAN_SIGN: {
|
|
15332
|
-
this._err(
|
|
15346
|
+
this._err(j.incorrectlyClosedComment), this.state = C.DATA, this.emitCurrentComment(n);
|
|
15333
15347
|
break;
|
|
15334
15348
|
}
|
|
15335
15349
|
case E.EOF: {
|
|
15336
|
-
this._err(
|
|
15350
|
+
this._err(j.eofInComment), this.emitCurrentComment(n), this._emitEOFToken();
|
|
15337
15351
|
break;
|
|
15338
15352
|
}
|
|
15339
15353
|
default:
|
|
@@ -15356,13 +15370,13 @@ class eb {
|
|
|
15356
15370
|
break;
|
|
15357
15371
|
}
|
|
15358
15372
|
case E.EOF: {
|
|
15359
|
-
this._err(
|
|
15373
|
+
this._err(j.eofInDoctype), this._createDoctypeToken(null);
|
|
15360
15374
|
const n = this.currentToken;
|
|
15361
15375
|
n.forceQuirks = !0, this.emitCurrentDoctype(n), this._emitEOFToken();
|
|
15362
15376
|
break;
|
|
15363
15377
|
}
|
|
15364
15378
|
default:
|
|
15365
|
-
this._err(
|
|
15379
|
+
this._err(j.missingWhitespaceBeforeDoctypeName), this.state = C.BEFORE_DOCTYPE_NAME, this._stateBeforeDoctypeName(t);
|
|
15366
15380
|
}
|
|
15367
15381
|
}
|
|
15368
15382
|
// Before DOCTYPE name state
|
|
@@ -15378,17 +15392,17 @@ class eb {
|
|
|
15378
15392
|
case E.FORM_FEED:
|
|
15379
15393
|
break;
|
|
15380
15394
|
case E.NULL: {
|
|
15381
|
-
this._err(
|
|
15395
|
+
this._err(j.unexpectedNullCharacter), this._createDoctypeToken(qe), this.state = C.DOCTYPE_NAME;
|
|
15382
15396
|
break;
|
|
15383
15397
|
}
|
|
15384
15398
|
case E.GREATER_THAN_SIGN: {
|
|
15385
|
-
this._err(
|
|
15399
|
+
this._err(j.missingDoctypeName), this._createDoctypeToken(null);
|
|
15386
15400
|
const n = this.currentToken;
|
|
15387
15401
|
n.forceQuirks = !0, this.emitCurrentDoctype(n), this.state = C.DATA;
|
|
15388
15402
|
break;
|
|
15389
15403
|
}
|
|
15390
15404
|
case E.EOF: {
|
|
15391
|
-
this._err(
|
|
15405
|
+
this._err(j.eofInDoctype), this._createDoctypeToken(null);
|
|
15392
15406
|
const n = this.currentToken;
|
|
15393
15407
|
n.forceQuirks = !0, this.emitCurrentDoctype(n), this._emitEOFToken();
|
|
15394
15408
|
break;
|
|
@@ -15414,11 +15428,11 @@ class eb {
|
|
|
15414
15428
|
break;
|
|
15415
15429
|
}
|
|
15416
15430
|
case E.NULL: {
|
|
15417
|
-
this._err(
|
|
15431
|
+
this._err(j.unexpectedNullCharacter), n.name += qe;
|
|
15418
15432
|
break;
|
|
15419
15433
|
}
|
|
15420
15434
|
case E.EOF: {
|
|
15421
|
-
this._err(
|
|
15435
|
+
this._err(j.eofInDoctype), n.forceQuirks = !0, this.emitCurrentDoctype(n), this._emitEOFToken();
|
|
15422
15436
|
break;
|
|
15423
15437
|
}
|
|
15424
15438
|
default:
|
|
@@ -15440,11 +15454,11 @@ class eb {
|
|
|
15440
15454
|
break;
|
|
15441
15455
|
}
|
|
15442
15456
|
case E.EOF: {
|
|
15443
|
-
this._err(
|
|
15457
|
+
this._err(j.eofInDoctype), n.forceQuirks = !0, this.emitCurrentDoctype(n), this._emitEOFToken();
|
|
15444
15458
|
break;
|
|
15445
15459
|
}
|
|
15446
15460
|
default:
|
|
15447
|
-
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));
|
|
15448
15462
|
}
|
|
15449
15463
|
}
|
|
15450
15464
|
// After DOCTYPE public keyword state
|
|
@@ -15460,23 +15474,23 @@ class eb {
|
|
|
15460
15474
|
break;
|
|
15461
15475
|
}
|
|
15462
15476
|
case E.QUOTATION_MARK: {
|
|
15463
|
-
this._err(
|
|
15477
|
+
this._err(j.missingWhitespaceAfterDoctypePublicKeyword), n.publicId = "", this.state = C.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;
|
|
15464
15478
|
break;
|
|
15465
15479
|
}
|
|
15466
15480
|
case E.APOSTROPHE: {
|
|
15467
|
-
this._err(
|
|
15481
|
+
this._err(j.missingWhitespaceAfterDoctypePublicKeyword), n.publicId = "", this.state = C.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;
|
|
15468
15482
|
break;
|
|
15469
15483
|
}
|
|
15470
15484
|
case E.GREATER_THAN_SIGN: {
|
|
15471
|
-
this._err(
|
|
15485
|
+
this._err(j.missingDoctypePublicIdentifier), n.forceQuirks = !0, this.state = C.DATA, this.emitCurrentDoctype(n);
|
|
15472
15486
|
break;
|
|
15473
15487
|
}
|
|
15474
15488
|
case E.EOF: {
|
|
15475
|
-
this._err(
|
|
15489
|
+
this._err(j.eofInDoctype), n.forceQuirks = !0, this.emitCurrentDoctype(n), this._emitEOFToken();
|
|
15476
15490
|
break;
|
|
15477
15491
|
}
|
|
15478
15492
|
default:
|
|
15479
|
-
this._err(
|
|
15493
|
+
this._err(j.missingQuoteBeforeDoctypePublicIdentifier), n.forceQuirks = !0, this.state = C.BOGUS_DOCTYPE, this._stateBogusDoctype(t);
|
|
15480
15494
|
}
|
|
15481
15495
|
}
|
|
15482
15496
|
// Before DOCTYPE public identifier state
|
|
@@ -15498,15 +15512,15 @@ class eb {
|
|
|
15498
15512
|
break;
|
|
15499
15513
|
}
|
|
15500
15514
|
case E.GREATER_THAN_SIGN: {
|
|
15501
|
-
this._err(
|
|
15515
|
+
this._err(j.missingDoctypePublicIdentifier), n.forceQuirks = !0, this.state = C.DATA, this.emitCurrentDoctype(n);
|
|
15502
15516
|
break;
|
|
15503
15517
|
}
|
|
15504
15518
|
case E.EOF: {
|
|
15505
|
-
this._err(
|
|
15519
|
+
this._err(j.eofInDoctype), n.forceQuirks = !0, this.emitCurrentDoctype(n), this._emitEOFToken();
|
|
15506
15520
|
break;
|
|
15507
15521
|
}
|
|
15508
15522
|
default:
|
|
15509
|
-
this._err(
|
|
15523
|
+
this._err(j.missingQuoteBeforeDoctypePublicIdentifier), n.forceQuirks = !0, this.state = C.BOGUS_DOCTYPE, this._stateBogusDoctype(t);
|
|
15510
15524
|
}
|
|
15511
15525
|
}
|
|
15512
15526
|
// DOCTYPE public identifier (double-quoted) state
|
|
@@ -15519,15 +15533,15 @@ class eb {
|
|
|
15519
15533
|
break;
|
|
15520
15534
|
}
|
|
15521
15535
|
case E.NULL: {
|
|
15522
|
-
this._err(
|
|
15536
|
+
this._err(j.unexpectedNullCharacter), n.publicId += qe;
|
|
15523
15537
|
break;
|
|
15524
15538
|
}
|
|
15525
15539
|
case E.GREATER_THAN_SIGN: {
|
|
15526
|
-
this._err(
|
|
15540
|
+
this._err(j.abruptDoctypePublicIdentifier), n.forceQuirks = !0, this.emitCurrentDoctype(n), this.state = C.DATA;
|
|
15527
15541
|
break;
|
|
15528
15542
|
}
|
|
15529
15543
|
case E.EOF: {
|
|
15530
|
-
this._err(
|
|
15544
|
+
this._err(j.eofInDoctype), n.forceQuirks = !0, this.emitCurrentDoctype(n), this._emitEOFToken();
|
|
15531
15545
|
break;
|
|
15532
15546
|
}
|
|
15533
15547
|
default:
|
|
@@ -15544,15 +15558,15 @@ class eb {
|
|
|
15544
15558
|
break;
|
|
15545
15559
|
}
|
|
15546
15560
|
case E.NULL: {
|
|
15547
|
-
this._err(
|
|
15561
|
+
this._err(j.unexpectedNullCharacter), n.publicId += qe;
|
|
15548
15562
|
break;
|
|
15549
15563
|
}
|
|
15550
15564
|
case E.GREATER_THAN_SIGN: {
|
|
15551
|
-
this._err(
|
|
15565
|
+
this._err(j.abruptDoctypePublicIdentifier), n.forceQuirks = !0, this.emitCurrentDoctype(n), this.state = C.DATA;
|
|
15552
15566
|
break;
|
|
15553
15567
|
}
|
|
15554
15568
|
case E.EOF: {
|
|
15555
|
-
this._err(
|
|
15569
|
+
this._err(j.eofInDoctype), n.forceQuirks = !0, this.emitCurrentDoctype(n), this._emitEOFToken();
|
|
15556
15570
|
break;
|
|
15557
15571
|
}
|
|
15558
15572
|
default:
|
|
@@ -15576,19 +15590,19 @@ class eb {
|
|
|
15576
15590
|
break;
|
|
15577
15591
|
}
|
|
15578
15592
|
case E.QUOTATION_MARK: {
|
|
15579
|
-
this._err(
|
|
15593
|
+
this._err(j.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers), n.systemId = "", this.state = C.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;
|
|
15580
15594
|
break;
|
|
15581
15595
|
}
|
|
15582
15596
|
case E.APOSTROPHE: {
|
|
15583
|
-
this._err(
|
|
15597
|
+
this._err(j.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers), n.systemId = "", this.state = C.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;
|
|
15584
15598
|
break;
|
|
15585
15599
|
}
|
|
15586
15600
|
case E.EOF: {
|
|
15587
|
-
this._err(
|
|
15601
|
+
this._err(j.eofInDoctype), n.forceQuirks = !0, this.emitCurrentDoctype(n), this._emitEOFToken();
|
|
15588
15602
|
break;
|
|
15589
15603
|
}
|
|
15590
15604
|
default:
|
|
15591
|
-
this._err(
|
|
15605
|
+
this._err(j.missingQuoteBeforeDoctypeSystemIdentifier), n.forceQuirks = !0, this.state = C.BOGUS_DOCTYPE, this._stateBogusDoctype(t);
|
|
15592
15606
|
}
|
|
15593
15607
|
}
|
|
15594
15608
|
// Between DOCTYPE public and system identifiers state
|
|
@@ -15614,11 +15628,11 @@ class eb {
|
|
|
15614
15628
|
break;
|
|
15615
15629
|
}
|
|
15616
15630
|
case E.EOF: {
|
|
15617
|
-
this._err(
|
|
15631
|
+
this._err(j.eofInDoctype), n.forceQuirks = !0, this.emitCurrentDoctype(n), this._emitEOFToken();
|
|
15618
15632
|
break;
|
|
15619
15633
|
}
|
|
15620
15634
|
default:
|
|
15621
|
-
this._err(
|
|
15635
|
+
this._err(j.missingQuoteBeforeDoctypeSystemIdentifier), n.forceQuirks = !0, this.state = C.BOGUS_DOCTYPE, this._stateBogusDoctype(t);
|
|
15622
15636
|
}
|
|
15623
15637
|
}
|
|
15624
15638
|
// After DOCTYPE system keyword state
|
|
@@ -15634,23 +15648,23 @@ class eb {
|
|
|
15634
15648
|
break;
|
|
15635
15649
|
}
|
|
15636
15650
|
case E.QUOTATION_MARK: {
|
|
15637
|
-
this._err(
|
|
15651
|
+
this._err(j.missingWhitespaceAfterDoctypeSystemKeyword), n.systemId = "", this.state = C.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;
|
|
15638
15652
|
break;
|
|
15639
15653
|
}
|
|
15640
15654
|
case E.APOSTROPHE: {
|
|
15641
|
-
this._err(
|
|
15655
|
+
this._err(j.missingWhitespaceAfterDoctypeSystemKeyword), n.systemId = "", this.state = C.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;
|
|
15642
15656
|
break;
|
|
15643
15657
|
}
|
|
15644
15658
|
case E.GREATER_THAN_SIGN: {
|
|
15645
|
-
this._err(
|
|
15659
|
+
this._err(j.missingDoctypeSystemIdentifier), n.forceQuirks = !0, this.state = C.DATA, this.emitCurrentDoctype(n);
|
|
15646
15660
|
break;
|
|
15647
15661
|
}
|
|
15648
15662
|
case E.EOF: {
|
|
15649
|
-
this._err(
|
|
15663
|
+
this._err(j.eofInDoctype), n.forceQuirks = !0, this.emitCurrentDoctype(n), this._emitEOFToken();
|
|
15650
15664
|
break;
|
|
15651
15665
|
}
|
|
15652
15666
|
default:
|
|
15653
|
-
this._err(
|
|
15667
|
+
this._err(j.missingQuoteBeforeDoctypeSystemIdentifier), n.forceQuirks = !0, this.state = C.BOGUS_DOCTYPE, this._stateBogusDoctype(t);
|
|
15654
15668
|
}
|
|
15655
15669
|
}
|
|
15656
15670
|
// Before DOCTYPE system identifier state
|
|
@@ -15672,15 +15686,15 @@ class eb {
|
|
|
15672
15686
|
break;
|
|
15673
15687
|
}
|
|
15674
15688
|
case E.GREATER_THAN_SIGN: {
|
|
15675
|
-
this._err(
|
|
15689
|
+
this._err(j.missingDoctypeSystemIdentifier), n.forceQuirks = !0, this.state = C.DATA, this.emitCurrentDoctype(n);
|
|
15676
15690
|
break;
|
|
15677
15691
|
}
|
|
15678
15692
|
case E.EOF: {
|
|
15679
|
-
this._err(
|
|
15693
|
+
this._err(j.eofInDoctype), n.forceQuirks = !0, this.emitCurrentDoctype(n), this._emitEOFToken();
|
|
15680
15694
|
break;
|
|
15681
15695
|
}
|
|
15682
15696
|
default:
|
|
15683
|
-
this._err(
|
|
15697
|
+
this._err(j.missingQuoteBeforeDoctypeSystemIdentifier), n.forceQuirks = !0, this.state = C.BOGUS_DOCTYPE, this._stateBogusDoctype(t);
|
|
15684
15698
|
}
|
|
15685
15699
|
}
|
|
15686
15700
|
// DOCTYPE system identifier (double-quoted) state
|
|
@@ -15693,15 +15707,15 @@ class eb {
|
|
|
15693
15707
|
break;
|
|
15694
15708
|
}
|
|
15695
15709
|
case E.NULL: {
|
|
15696
|
-
this._err(
|
|
15710
|
+
this._err(j.unexpectedNullCharacter), n.systemId += qe;
|
|
15697
15711
|
break;
|
|
15698
15712
|
}
|
|
15699
15713
|
case E.GREATER_THAN_SIGN: {
|
|
15700
|
-
this._err(
|
|
15714
|
+
this._err(j.abruptDoctypeSystemIdentifier), n.forceQuirks = !0, this.emitCurrentDoctype(n), this.state = C.DATA;
|
|
15701
15715
|
break;
|
|
15702
15716
|
}
|
|
15703
15717
|
case E.EOF: {
|
|
15704
|
-
this._err(
|
|
15718
|
+
this._err(j.eofInDoctype), n.forceQuirks = !0, this.emitCurrentDoctype(n), this._emitEOFToken();
|
|
15705
15719
|
break;
|
|
15706
15720
|
}
|
|
15707
15721
|
default:
|
|
@@ -15718,15 +15732,15 @@ class eb {
|
|
|
15718
15732
|
break;
|
|
15719
15733
|
}
|
|
15720
15734
|
case E.NULL: {
|
|
15721
|
-
this._err(
|
|
15735
|
+
this._err(j.unexpectedNullCharacter), n.systemId += qe;
|
|
15722
15736
|
break;
|
|
15723
15737
|
}
|
|
15724
15738
|
case E.GREATER_THAN_SIGN: {
|
|
15725
|
-
this._err(
|
|
15739
|
+
this._err(j.abruptDoctypeSystemIdentifier), n.forceQuirks = !0, this.emitCurrentDoctype(n), this.state = C.DATA;
|
|
15726
15740
|
break;
|
|
15727
15741
|
}
|
|
15728
15742
|
case E.EOF: {
|
|
15729
|
-
this._err(
|
|
15743
|
+
this._err(j.eofInDoctype), n.forceQuirks = !0, this.emitCurrentDoctype(n), this._emitEOFToken();
|
|
15730
15744
|
break;
|
|
15731
15745
|
}
|
|
15732
15746
|
default:
|
|
@@ -15748,11 +15762,11 @@ class eb {
|
|
|
15748
15762
|
break;
|
|
15749
15763
|
}
|
|
15750
15764
|
case E.EOF: {
|
|
15751
|
-
this._err(
|
|
15765
|
+
this._err(j.eofInDoctype), n.forceQuirks = !0, this.emitCurrentDoctype(n), this._emitEOFToken();
|
|
15752
15766
|
break;
|
|
15753
15767
|
}
|
|
15754
15768
|
default:
|
|
15755
|
-
this._err(
|
|
15769
|
+
this._err(j.unexpectedCharacterAfterDoctypeSystemIdentifier), this.state = C.BOGUS_DOCTYPE, this._stateBogusDoctype(t);
|
|
15756
15770
|
}
|
|
15757
15771
|
}
|
|
15758
15772
|
// Bogus DOCTYPE state
|
|
@@ -15765,7 +15779,7 @@ class eb {
|
|
|
15765
15779
|
break;
|
|
15766
15780
|
}
|
|
15767
15781
|
case E.NULL: {
|
|
15768
|
-
this._err(
|
|
15782
|
+
this._err(j.unexpectedNullCharacter);
|
|
15769
15783
|
break;
|
|
15770
15784
|
}
|
|
15771
15785
|
case E.EOF: {
|
|
@@ -15783,7 +15797,7 @@ class eb {
|
|
|
15783
15797
|
break;
|
|
15784
15798
|
}
|
|
15785
15799
|
case E.EOF: {
|
|
15786
|
-
this._err(
|
|
15800
|
+
this._err(j.eofInCdata), this._emitEOFToken();
|
|
15787
15801
|
break;
|
|
15788
15802
|
}
|
|
15789
15803
|
default:
|
|
@@ -15827,7 +15841,7 @@ class eb {
|
|
|
15827
15841
|
// Ambiguos ampersand state
|
|
15828
15842
|
//------------------------------------------------------------------
|
|
15829
15843
|
_stateAmbiguousAmpersand(t) {
|
|
15830
|
-
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));
|
|
15831
15845
|
}
|
|
15832
15846
|
}
|
|
15833
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([
|
|
@@ -15864,7 +15878,7 @@ class ob {
|
|
|
15864
15878
|
}
|
|
15865
15879
|
//Update current element
|
|
15866
15880
|
_isInTemplate() {
|
|
15867
|
-
return this.currentTagId === o.TEMPLATE && this.treeAdapter.getNamespaceURI(this.current) ===
|
|
15881
|
+
return this.currentTagId === o.TEMPLATE && this.treeAdapter.getNamespaceURI(this.current) === G.HTML;
|
|
15868
15882
|
}
|
|
15869
15883
|
_updateCurrentElement() {
|
|
15870
15884
|
this.current = this.items[this.stackTop], this.currentTagId = this.tagIDs[this.stackTop];
|
|
@@ -15889,7 +15903,7 @@ class ob {
|
|
|
15889
15903
|
let n = this.stackTop + 1;
|
|
15890
15904
|
do
|
|
15891
15905
|
n = this.tagIDs.lastIndexOf(t, n - 1);
|
|
15892
|
-
while (n > 0 && this.treeAdapter.getNamespaceURI(this.items[n]) !==
|
|
15906
|
+
while (n > 0 && this.treeAdapter.getNamespaceURI(this.items[n]) !== G.HTML);
|
|
15893
15907
|
this.shortenToLength(Math.max(n, 0));
|
|
15894
15908
|
}
|
|
15895
15909
|
shortenToLength(t) {
|
|
@@ -15907,10 +15921,10 @@ class ob {
|
|
|
15907
15921
|
this.shortenToLength(Math.max(r, 0));
|
|
15908
15922
|
}
|
|
15909
15923
|
popUntilNumberedHeaderPopped() {
|
|
15910
|
-
this.popUntilPopped(yi,
|
|
15924
|
+
this.popUntilPopped(yi, G.HTML);
|
|
15911
15925
|
}
|
|
15912
15926
|
popUntilTableCellPopped() {
|
|
15913
|
-
this.popUntilPopped(ub,
|
|
15927
|
+
this.popUntilPopped(ub, G.HTML);
|
|
15914
15928
|
}
|
|
15915
15929
|
popAllUpToHtmlElement() {
|
|
15916
15930
|
this.tmplCount = 0, this.shortenToLength(1);
|
|
@@ -15926,13 +15940,13 @@ class ob {
|
|
|
15926
15940
|
this.shortenToLength(r + 1);
|
|
15927
15941
|
}
|
|
15928
15942
|
clearBackToTableContext() {
|
|
15929
|
-
this.clearBackTo(ib,
|
|
15943
|
+
this.clearBackTo(ib, G.HTML);
|
|
15930
15944
|
}
|
|
15931
15945
|
clearBackToTableBodyContext() {
|
|
15932
|
-
this.clearBackTo(ab,
|
|
15946
|
+
this.clearBackTo(ab, G.HTML);
|
|
15933
15947
|
}
|
|
15934
15948
|
clearBackToTableRowContext() {
|
|
15935
|
-
this.clearBackTo(rb,
|
|
15949
|
+
this.clearBackTo(rb, G.HTML);
|
|
15936
15950
|
}
|
|
15937
15951
|
remove(t) {
|
|
15938
15952
|
const n = this._indexOf(t);
|
|
@@ -15957,19 +15971,19 @@ class ob {
|
|
|
15957
15971
|
for (let r = this.stackTop; r >= 0; r--) {
|
|
15958
15972
|
const a = this.tagIDs[r];
|
|
15959
15973
|
switch (this.treeAdapter.getNamespaceURI(this.items[r])) {
|
|
15960
|
-
case
|
|
15974
|
+
case G.HTML: {
|
|
15961
15975
|
if (a === t)
|
|
15962
15976
|
return !0;
|
|
15963
15977
|
if (n.has(a))
|
|
15964
15978
|
return !1;
|
|
15965
15979
|
break;
|
|
15966
15980
|
}
|
|
15967
|
-
case
|
|
15981
|
+
case G.SVG: {
|
|
15968
15982
|
if (es.has(a))
|
|
15969
15983
|
return !1;
|
|
15970
15984
|
break;
|
|
15971
15985
|
}
|
|
15972
|
-
case
|
|
15986
|
+
case G.MATHML: {
|
|
15973
15987
|
if (Jo.has(a))
|
|
15974
15988
|
return !1;
|
|
15975
15989
|
break;
|
|
@@ -15991,19 +16005,19 @@ class ob {
|
|
|
15991
16005
|
for (let t = this.stackTop; t >= 0; t--) {
|
|
15992
16006
|
const n = this.tagIDs[t];
|
|
15993
16007
|
switch (this.treeAdapter.getNamespaceURI(this.items[t])) {
|
|
15994
|
-
case
|
|
16008
|
+
case G.HTML: {
|
|
15995
16009
|
if (yi.has(n))
|
|
15996
16010
|
return !0;
|
|
15997
16011
|
if (Vr.has(n))
|
|
15998
16012
|
return !1;
|
|
15999
16013
|
break;
|
|
16000
16014
|
}
|
|
16001
|
-
case
|
|
16015
|
+
case G.SVG: {
|
|
16002
16016
|
if (es.has(n))
|
|
16003
16017
|
return !1;
|
|
16004
16018
|
break;
|
|
16005
16019
|
}
|
|
16006
|
-
case
|
|
16020
|
+
case G.MATHML: {
|
|
16007
16021
|
if (Jo.has(n))
|
|
16008
16022
|
return !1;
|
|
16009
16023
|
break;
|
|
@@ -16014,7 +16028,7 @@ class ob {
|
|
|
16014
16028
|
}
|
|
16015
16029
|
hasInTableScope(t) {
|
|
16016
16030
|
for (let n = this.stackTop; n >= 0; n--)
|
|
16017
|
-
if (this.treeAdapter.getNamespaceURI(this.items[n]) ===
|
|
16031
|
+
if (this.treeAdapter.getNamespaceURI(this.items[n]) === G.HTML)
|
|
16018
16032
|
switch (this.tagIDs[n]) {
|
|
16019
16033
|
case t:
|
|
16020
16034
|
return !0;
|
|
@@ -16026,7 +16040,7 @@ class ob {
|
|
|
16026
16040
|
}
|
|
16027
16041
|
hasTableBodyContextInTableScope() {
|
|
16028
16042
|
for (let t = this.stackTop; t >= 0; t--)
|
|
16029
|
-
if (this.treeAdapter.getNamespaceURI(this.items[t]) ===
|
|
16043
|
+
if (this.treeAdapter.getNamespaceURI(this.items[t]) === G.HTML)
|
|
16030
16044
|
switch (this.tagIDs[t]) {
|
|
16031
16045
|
case o.TBODY:
|
|
16032
16046
|
case o.THEAD:
|
|
@@ -16040,7 +16054,7 @@ class ob {
|
|
|
16040
16054
|
}
|
|
16041
16055
|
hasInSelectScope(t) {
|
|
16042
16056
|
for (let n = this.stackTop; n >= 0; n--)
|
|
16043
|
-
if (this.treeAdapter.getNamespaceURI(this.items[n]) ===
|
|
16057
|
+
if (this.treeAdapter.getNamespaceURI(this.items[n]) === G.HTML)
|
|
16044
16058
|
switch (this.tagIDs[n]) {
|
|
16045
16059
|
case t:
|
|
16046
16060
|
return !0;
|
|
@@ -16460,17 +16474,17 @@ const rs = {
|
|
|
16460
16474
|
"yChannelSelector",
|
|
16461
16475
|
"zoomAndPan"
|
|
16462
16476
|
].map((e) => [e.toLowerCase(), e])), Tb = /* @__PURE__ */ new Map([
|
|
16463
|
-
["xlink:actuate", { prefix: "xlink", name: "actuate", namespace:
|
|
16464
|
-
["xlink:arcrole", { prefix: "xlink", name: "arcrole", namespace:
|
|
16465
|
-
["xlink:href", { prefix: "xlink", name: "href", namespace:
|
|
16466
|
-
["xlink:role", { prefix: "xlink", name: "role", namespace:
|
|
16467
|
-
["xlink:show", { prefix: "xlink", name: "show", namespace:
|
|
16468
|
-
["xlink:title", { prefix: "xlink", name: "title", namespace:
|
|
16469
|
-
["xlink:type", { prefix: "xlink", name: "type", namespace:
|
|
16470
|
-
["xml:lang", { prefix: "xml", name: "lang", namespace:
|
|
16471
|
-
["xml:space", { prefix: "xml", name: "space", namespace:
|
|
16472
|
-
["xmlns", { prefix: "", name: "xmlns", namespace:
|
|
16473
|
-
["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 }]
|
|
16474
16488
|
]), yb = new Map([
|
|
16475
16489
|
"altGlyph",
|
|
16476
16490
|
"altGlyphDef",
|
|
@@ -16582,20 +16596,20 @@ function Ab(e) {
|
|
|
16582
16596
|
t != null && (e.tagName = t, e.tagID = Dn(e.tagName));
|
|
16583
16597
|
}
|
|
16584
16598
|
function Sb(e, t) {
|
|
16585
|
-
return t ===
|
|
16599
|
+
return t === G.MATHML && (e === o.MI || e === o.MO || e === o.MN || e === o.MS || e === o.MTEXT);
|
|
16586
16600
|
}
|
|
16587
16601
|
function xb(e, t, n) {
|
|
16588
|
-
if (t ===
|
|
16602
|
+
if (t === G.MATHML && e === o.ANNOTATION_XML) {
|
|
16589
16603
|
for (let r = 0; r < n.length; r++)
|
|
16590
16604
|
if (n[r].name === on.ENCODING) {
|
|
16591
16605
|
const a = n[r].value.toLowerCase();
|
|
16592
16606
|
return a === rs.TEXT_HTML || a === rs.APPLICATION_XML;
|
|
16593
16607
|
}
|
|
16594
16608
|
}
|
|
16595
|
-
return t ===
|
|
16609
|
+
return t === G.SVG && (e === o.FOREIGN_OBJECT || e === o.DESC || e === o.TITLE);
|
|
16596
16610
|
}
|
|
16597
16611
|
function vb(e, t, n, r) {
|
|
16598
|
-
return (!r || r ===
|
|
16612
|
+
return (!r || r === G.HTML) && xb(e, t, n) || (!r || r === G.MATHML) && Sb(e, t);
|
|
16599
16613
|
}
|
|
16600
16614
|
const Ob = "hidden", Ib = 8, Nb = 3;
|
|
16601
16615
|
var O;
|
|
@@ -16632,8 +16646,8 @@ class is {
|
|
|
16632
16646
|
...as,
|
|
16633
16647
|
...n
|
|
16634
16648
|
};
|
|
16635
|
-
t ?? (t = r.treeAdapter.createElement(R.TEMPLATE,
|
|
16636
|
-
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);
|
|
16637
16651
|
return i.fragmentContextID === o.TEMPLATE && i.tmplInsertionModeStack.unshift(O.IN_TEMPLATE), i._initTokenizerForFragmentParsing(), i._insertFakeRootElement(), i._resetInsertionMode(), i._findFormInFragmentContext(), i;
|
|
16638
16652
|
}
|
|
16639
16653
|
getFragment() {
|
|
@@ -16672,12 +16686,12 @@ class is {
|
|
|
16672
16686
|
}
|
|
16673
16687
|
}
|
|
16674
16688
|
_setContextModes(t, n) {
|
|
16675
|
-
const r = t === this.document || t && this.treeAdapter.getNamespaceURI(t) ===
|
|
16689
|
+
const r = t === this.document || t && this.treeAdapter.getNamespaceURI(t) === G.HTML;
|
|
16676
16690
|
this.currentNotInHTML = !r, this.tokenizer.inForeignNode = !r && t !== void 0 && n !== void 0 && !this._isIntegrationPoint(n, t);
|
|
16677
16691
|
}
|
|
16678
16692
|
/** @protected */
|
|
16679
16693
|
_switchToTextParsing(t, n) {
|
|
16680
|
-
this._insertElement(t,
|
|
16694
|
+
this._insertElement(t, G.HTML), this.tokenizer.state = n, this.originalInsertionMode = this.insertionMode, this.insertionMode = O.TEXT;
|
|
16681
16695
|
}
|
|
16682
16696
|
switchToPlaintextParsing() {
|
|
16683
16697
|
this.insertionMode = O.TEXT, this.originalInsertionMode = O.IN_BODY, this.tokenizer.state = We.PLAINTEXT;
|
|
@@ -16699,7 +16713,7 @@ class is {
|
|
|
16699
16713
|
}
|
|
16700
16714
|
}
|
|
16701
16715
|
_initTokenizerForFragmentParsing() {
|
|
16702
|
-
if (!(!this.fragmentContext || this.treeAdapter.getNamespaceURI(this.fragmentContext) !==
|
|
16716
|
+
if (!(!this.fragmentContext || this.treeAdapter.getNamespaceURI(this.fragmentContext) !== G.HTML))
|
|
16703
16717
|
switch (this.fragmentContextID) {
|
|
16704
16718
|
case o.TITLE:
|
|
16705
16719
|
case o.TEXTAREA: {
|
|
@@ -16766,17 +16780,17 @@ class is {
|
|
|
16766
16780
|
}
|
|
16767
16781
|
/** @protected */
|
|
16768
16782
|
_insertFakeElement(t, n) {
|
|
16769
|
-
const r = this.treeAdapter.createElement(t,
|
|
16783
|
+
const r = this.treeAdapter.createElement(t, G.HTML, []);
|
|
16770
16784
|
this._attachElementToTree(r, null), this.openElements.push(r, n);
|
|
16771
16785
|
}
|
|
16772
16786
|
/** @protected */
|
|
16773
16787
|
_insertTemplate(t) {
|
|
16774
|
-
const n = this.treeAdapter.createElement(t.tagName,
|
|
16788
|
+
const n = this.treeAdapter.createElement(t.tagName, G.HTML, t.attrs), r = this.treeAdapter.createDocumentFragment();
|
|
16775
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);
|
|
16776
16790
|
}
|
|
16777
16791
|
/** @protected */
|
|
16778
16792
|
_insertFakeRootElement() {
|
|
16779
|
-
const t = this.treeAdapter.createElement(R.HTML,
|
|
16793
|
+
const t = this.treeAdapter.createElement(R.HTML, G.HTML, []);
|
|
16780
16794
|
this.options.sourceCodeLocationInfo && this.treeAdapter.setNodeSourceCodeLocation(t, null), this.treeAdapter.appendChild(this.openElements.current, t), this.openElements.push(t, o.HTML);
|
|
16781
16795
|
}
|
|
16782
16796
|
/** @protected */
|
|
@@ -16825,11 +16839,11 @@ class is {
|
|
|
16825
16839
|
if (!this.currentNotInHTML)
|
|
16826
16840
|
return !1;
|
|
16827
16841
|
let n, r;
|
|
16828
|
-
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 : (
|
|
16829
16843
|
// Check that `current` is not an integration point for HTML or MathML elements.
|
|
16830
16844
|
this.tokenizer.inForeignNode || // If it _is_ an integration point, then we might have to check that it is not an HTML
|
|
16831
16845
|
// integration point.
|
|
16832
|
-
(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)
|
|
16833
16847
|
);
|
|
16834
16848
|
}
|
|
16835
16849
|
/** @protected */
|
|
@@ -16990,7 +17004,7 @@ class is {
|
|
|
16990
17004
|
const n = this.openElements.items[t];
|
|
16991
17005
|
switch (this.openElements.tagIDs[t]) {
|
|
16992
17006
|
case o.TEMPLATE: {
|
|
16993
|
-
if (this.treeAdapter.getNamespaceURI(n) ===
|
|
17007
|
+
if (this.treeAdapter.getNamespaceURI(n) === G.HTML)
|
|
16994
17008
|
return { parent: this.treeAdapter.getTemplateContent(n), beforeElement: null };
|
|
16995
17009
|
break;
|
|
16996
17010
|
}
|
|
@@ -17190,7 +17204,7 @@ class is {
|
|
|
17190
17204
|
case O.IN_HEAD:
|
|
17191
17205
|
case O.IN_HEAD_NO_SCRIPT:
|
|
17192
17206
|
case O.AFTER_HEAD: {
|
|
17193
|
-
this._err(t,
|
|
17207
|
+
this._err(t, j.misplacedDoctype);
|
|
17194
17208
|
break;
|
|
17195
17209
|
}
|
|
17196
17210
|
case O.IN_TABLE_TEXT: {
|
|
@@ -17201,7 +17215,7 @@ class is {
|
|
|
17201
17215
|
}
|
|
17202
17216
|
/** @internal */
|
|
17203
17217
|
onStartTag(t) {
|
|
17204
|
-
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);
|
|
17205
17219
|
}
|
|
17206
17220
|
/**
|
|
17207
17221
|
* Processes a given start tag.
|
|
@@ -17548,7 +17562,7 @@ function Pb(e, t, n) {
|
|
|
17548
17562
|
e._fosterParentElement(n);
|
|
17549
17563
|
else {
|
|
17550
17564
|
const i = e.treeAdapter.getNamespaceURI(t);
|
|
17551
|
-
a === o.TEMPLATE && i ===
|
|
17565
|
+
a === o.TEMPLATE && i === G.HTML && (t = e.treeAdapter.getTemplateContent(t)), e.treeAdapter.appendChild(t, n);
|
|
17552
17566
|
}
|
|
17553
17567
|
}
|
|
17554
17568
|
function Mb(e, t, n) {
|
|
@@ -17594,13 +17608,13 @@ function Qi(e, t) {
|
|
|
17594
17608
|
function Hb(e, t) {
|
|
17595
17609
|
e._setDocumentType(t);
|
|
17596
17610
|
const n = t.forceQuirks ? _t.QUIRKS : mb(t);
|
|
17597
|
-
pb(t) || e._err(t,
|
|
17611
|
+
pb(t) || e._err(t, j.nonConformingDoctype), e.treeAdapter.setDocumentMode(e.document, n), e.insertionMode = O.BEFORE_HTML;
|
|
17598
17612
|
}
|
|
17599
17613
|
function Wn(e, t) {
|
|
17600
|
-
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);
|
|
17601
17615
|
}
|
|
17602
17616
|
function Ub(e, t) {
|
|
17603
|
-
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);
|
|
17604
17618
|
}
|
|
17605
17619
|
function jb(e, t) {
|
|
17606
17620
|
const n = t.tagID;
|
|
@@ -17616,7 +17630,7 @@ function qb(e, t) {
|
|
|
17616
17630
|
break;
|
|
17617
17631
|
}
|
|
17618
17632
|
case o.HEAD: {
|
|
17619
|
-
e._insertElement(t,
|
|
17633
|
+
e._insertElement(t, G.HTML), e.headElement = e.openElements.current, e.insertionMode = O.IN_HEAD;
|
|
17620
17634
|
break;
|
|
17621
17635
|
}
|
|
17622
17636
|
default:
|
|
@@ -17625,7 +17639,7 @@ function qb(e, t) {
|
|
|
17625
17639
|
}
|
|
17626
17640
|
function zb(e, t) {
|
|
17627
17641
|
const n = t.tagID;
|
|
17628
|
-
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);
|
|
17629
17643
|
}
|
|
17630
17644
|
function ir(e, t) {
|
|
17631
17645
|
e._insertFakeElement(R.HEAD, o.HEAD), e.headElement = e.openElements.current, e.insertionMode = O.IN_HEAD, e._processToken(t);
|
|
@@ -17641,7 +17655,7 @@ function Lt(e, t) {
|
|
|
17641
17655
|
case o.BGSOUND:
|
|
17642
17656
|
case o.LINK:
|
|
17643
17657
|
case o.META: {
|
|
17644
|
-
e._appendElement(t,
|
|
17658
|
+
e._appendElement(t, G.HTML), t.ackSelfClosing = !0;
|
|
17645
17659
|
break;
|
|
17646
17660
|
}
|
|
17647
17661
|
case o.TITLE: {
|
|
@@ -17649,7 +17663,7 @@ function Lt(e, t) {
|
|
|
17649
17663
|
break;
|
|
17650
17664
|
}
|
|
17651
17665
|
case o.NOSCRIPT: {
|
|
17652
|
-
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);
|
|
17653
17667
|
break;
|
|
17654
17668
|
}
|
|
17655
17669
|
case o.NOFRAMES:
|
|
@@ -17666,7 +17680,7 @@ function Lt(e, t) {
|
|
|
17666
17680
|
break;
|
|
17667
17681
|
}
|
|
17668
17682
|
case o.HEAD: {
|
|
17669
|
-
e._err(t,
|
|
17683
|
+
e._err(t, j.misplacedStartTagForHeadElement);
|
|
17670
17684
|
break;
|
|
17671
17685
|
}
|
|
17672
17686
|
default:
|
|
@@ -17690,11 +17704,11 @@ function Yb(e, t) {
|
|
|
17690
17704
|
break;
|
|
17691
17705
|
}
|
|
17692
17706
|
default:
|
|
17693
|
-
e._err(t,
|
|
17707
|
+
e._err(t, j.endTagWithoutMatchingOpenElement);
|
|
17694
17708
|
}
|
|
17695
17709
|
}
|
|
17696
17710
|
function fn(e, t) {
|
|
17697
|
-
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);
|
|
17698
17712
|
}
|
|
17699
17713
|
function ur(e, t) {
|
|
17700
17714
|
e.openElements.pop(), e.insertionMode = O.AFTER_HEAD, e._processToken(t);
|
|
@@ -17716,7 +17730,7 @@ function $b(e, t) {
|
|
|
17716
17730
|
break;
|
|
17717
17731
|
}
|
|
17718
17732
|
case o.NOSCRIPT: {
|
|
17719
|
-
e._err(t,
|
|
17733
|
+
e._err(t, j.nestedNoscriptInHead);
|
|
17720
17734
|
break;
|
|
17721
17735
|
}
|
|
17722
17736
|
default:
|
|
@@ -17734,11 +17748,11 @@ function Vb(e, t) {
|
|
|
17734
17748
|
break;
|
|
17735
17749
|
}
|
|
17736
17750
|
default:
|
|
17737
|
-
e._err(t,
|
|
17751
|
+
e._err(t, j.endTagWithoutMatchingOpenElement);
|
|
17738
17752
|
}
|
|
17739
17753
|
}
|
|
17740
17754
|
function or(e, t) {
|
|
17741
|
-
const n = t.type === me.EOF ?
|
|
17755
|
+
const n = t.type === me.EOF ? j.openElementsLeftAfterEof : j.disallowedContentInNoscriptInHead;
|
|
17742
17756
|
e._err(t, n), e.openElements.pop(), e.insertionMode = O.IN_HEAD, e._processToken(t);
|
|
17743
17757
|
}
|
|
17744
17758
|
function Wb(e, t) {
|
|
@@ -17748,11 +17762,11 @@ function Wb(e, t) {
|
|
|
17748
17762
|
break;
|
|
17749
17763
|
}
|
|
17750
17764
|
case o.BODY: {
|
|
17751
|
-
e._insertElement(t,
|
|
17765
|
+
e._insertElement(t, G.HTML), e.framesetOk = !1, e.insertionMode = O.IN_BODY;
|
|
17752
17766
|
break;
|
|
17753
17767
|
}
|
|
17754
17768
|
case o.FRAMESET: {
|
|
17755
|
-
e._insertElement(t,
|
|
17769
|
+
e._insertElement(t, G.HTML), e.insertionMode = O.IN_FRAMESET;
|
|
17756
17770
|
break;
|
|
17757
17771
|
}
|
|
17758
17772
|
case o.BASE:
|
|
@@ -17765,11 +17779,11 @@ function Wb(e, t) {
|
|
|
17765
17779
|
case o.STYLE:
|
|
17766
17780
|
case o.TEMPLATE:
|
|
17767
17781
|
case o.TITLE: {
|
|
17768
|
-
e._err(t,
|
|
17782
|
+
e._err(t, j.abandonedHeadElementChild), e.openElements.push(e.headElement, o.HEAD), Lt(e, t), e.openElements.remove(e.headElement);
|
|
17769
17783
|
break;
|
|
17770
17784
|
}
|
|
17771
17785
|
case o.HEAD: {
|
|
17772
|
-
e._err(t,
|
|
17786
|
+
e._err(t, j.misplacedStartTagForHeadElement);
|
|
17773
17787
|
break;
|
|
17774
17788
|
}
|
|
17775
17789
|
default:
|
|
@@ -17789,7 +17803,7 @@ function Gb(e, t) {
|
|
|
17789
17803
|
break;
|
|
17790
17804
|
}
|
|
17791
17805
|
default:
|
|
17792
|
-
e._err(t,
|
|
17806
|
+
e._err(t, j.endTagWithoutMatchingOpenElement);
|
|
17793
17807
|
}
|
|
17794
17808
|
}
|
|
17795
17809
|
function sr(e, t) {
|
|
@@ -17838,20 +17852,20 @@ function Kb(e, t) {
|
|
|
17838
17852
|
}
|
|
17839
17853
|
function Qb(e, t) {
|
|
17840
17854
|
const n = e.openElements.tryPeekProperlyNestedBodyElement();
|
|
17841
|
-
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);
|
|
17842
17856
|
}
|
|
17843
17857
|
function Zb(e, t) {
|
|
17844
|
-
e.openElements.hasInButtonScope(o.P) && e._closePElement(), e._insertElement(t,
|
|
17858
|
+
e.openElements.hasInButtonScope(o.P) && e._closePElement(), e._insertElement(t, G.HTML);
|
|
17845
17859
|
}
|
|
17846
17860
|
function Jb(e, t) {
|
|
17847
|
-
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);
|
|
17848
17862
|
}
|
|
17849
17863
|
function eE(e, t) {
|
|
17850
|
-
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;
|
|
17851
17865
|
}
|
|
17852
17866
|
function tE(e, t) {
|
|
17853
17867
|
const n = e.openElements.tmplCount > 0;
|
|
17854
|
-
(!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));
|
|
17855
17869
|
}
|
|
17856
17870
|
function nE(e, t) {
|
|
17857
17871
|
e.framesetOk = !1;
|
|
@@ -17865,51 +17879,51 @@ function nE(e, t) {
|
|
|
17865
17879
|
if (a !== o.ADDRESS && a !== o.DIV && a !== o.P && e._isSpecialElement(e.openElements.items[r], a))
|
|
17866
17880
|
break;
|
|
17867
17881
|
}
|
|
17868
|
-
e.openElements.hasInButtonScope(o.P) && e._closePElement(), e._insertElement(t,
|
|
17882
|
+
e.openElements.hasInButtonScope(o.P) && e._closePElement(), e._insertElement(t, G.HTML);
|
|
17869
17883
|
}
|
|
17870
17884
|
function rE(e, t) {
|
|
17871
|
-
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;
|
|
17872
17886
|
}
|
|
17873
17887
|
function aE(e, t) {
|
|
17874
|
-
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;
|
|
17875
17889
|
}
|
|
17876
17890
|
function iE(e, t) {
|
|
17877
17891
|
const n = e.activeFormattingElements.getElementEntryInScopeWithTagName(R.A);
|
|
17878
|
-
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);
|
|
17879
17893
|
}
|
|
17880
17894
|
function uE(e, t) {
|
|
17881
|
-
e._reconstructActiveFormattingElements(), e._insertElement(t,
|
|
17895
|
+
e._reconstructActiveFormattingElements(), e._insertElement(t, G.HTML), e.activeFormattingElements.pushElement(e.openElements.current, t);
|
|
17882
17896
|
}
|
|
17883
17897
|
function oE(e, t) {
|
|
17884
|
-
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);
|
|
17885
17899
|
}
|
|
17886
17900
|
function sE(e, t) {
|
|
17887
|
-
e._reconstructActiveFormattingElements(), e._insertElement(t,
|
|
17901
|
+
e._reconstructActiveFormattingElements(), e._insertElement(t, G.HTML), e.activeFormattingElements.insertMarker(), e.framesetOk = !1;
|
|
17888
17902
|
}
|
|
17889
17903
|
function lE(e, t) {
|
|
17890
|
-
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;
|
|
17891
17905
|
}
|
|
17892
17906
|
function Mc(e, t) {
|
|
17893
|
-
e._reconstructActiveFormattingElements(), e._appendElement(t,
|
|
17907
|
+
e._reconstructActiveFormattingElements(), e._appendElement(t, G.HTML), e.framesetOk = !1, t.ackSelfClosing = !0;
|
|
17894
17908
|
}
|
|
17895
17909
|
function Fc(e) {
|
|
17896
17910
|
const t = xc(e, on.TYPE);
|
|
17897
17911
|
return t != null && t.toLowerCase() === Ob;
|
|
17898
17912
|
}
|
|
17899
17913
|
function cE(e, t) {
|
|
17900
|
-
e._reconstructActiveFormattingElements(), e._appendElement(t,
|
|
17914
|
+
e._reconstructActiveFormattingElements(), e._appendElement(t, G.HTML), Fc(t) || (e.framesetOk = !1), t.ackSelfClosing = !0;
|
|
17901
17915
|
}
|
|
17902
17916
|
function dE(e, t) {
|
|
17903
|
-
e._appendElement(t,
|
|
17917
|
+
e._appendElement(t, G.HTML), t.ackSelfClosing = !0;
|
|
17904
17918
|
}
|
|
17905
17919
|
function fE(e, t) {
|
|
17906
|
-
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;
|
|
17907
17921
|
}
|
|
17908
17922
|
function hE(e, t) {
|
|
17909
17923
|
t.tagName = R.IMG, t.tagID = o.IMG, Mc(e, t);
|
|
17910
17924
|
}
|
|
17911
17925
|
function pE(e, t) {
|
|
17912
|
-
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;
|
|
17913
17927
|
}
|
|
17914
17928
|
function mE(e, t) {
|
|
17915
17929
|
e.openElements.hasInButtonScope(o.P) && e._closePElement(), e._reconstructActiveFormattingElements(), e.framesetOk = !1, e._switchToTextParsing(t, We.RAWTEXT);
|
|
@@ -17921,25 +17935,25 @@ function us(e, t) {
|
|
|
17921
17935
|
e._switchToTextParsing(t, We.RAWTEXT);
|
|
17922
17936
|
}
|
|
17923
17937
|
function bE(e, t) {
|
|
17924
|
-
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;
|
|
17925
17939
|
}
|
|
17926
17940
|
function EE(e, t) {
|
|
17927
|
-
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);
|
|
17928
17942
|
}
|
|
17929
17943
|
function TE(e, t) {
|
|
17930
|
-
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);
|
|
17931
17945
|
}
|
|
17932
17946
|
function yE(e, t) {
|
|
17933
|
-
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);
|
|
17934
17948
|
}
|
|
17935
17949
|
function _E(e, t) {
|
|
17936
|
-
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;
|
|
17937
17951
|
}
|
|
17938
17952
|
function CE(e, t) {
|
|
17939
|
-
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;
|
|
17940
17954
|
}
|
|
17941
17955
|
function os(e, t) {
|
|
17942
|
-
e._reconstructActiveFormattingElements(), e._insertElement(t,
|
|
17956
|
+
e._reconstructActiveFormattingElements(), e._insertElement(t, G.HTML);
|
|
17943
17957
|
}
|
|
17944
17958
|
function it(e, t) {
|
|
17945
17959
|
switch (t.tagID) {
|
|
@@ -18309,7 +18323,7 @@ function RE(e, t) {
|
|
|
18309
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;
|
|
18310
18324
|
}
|
|
18311
18325
|
function DE(e, t) {
|
|
18312
|
-
e._err(t,
|
|
18326
|
+
e._err(t, j.eofInElementThatCanContainOnlyText), e.openElements.pop(), e.insertionMode = e.originalInsertionMode, e.onEof(t);
|
|
18313
18327
|
}
|
|
18314
18328
|
function qa(e, t) {
|
|
18315
18329
|
if (e.openElements.currentTagId !== void 0 && Rc.has(e.openElements.currentTagId))
|
|
@@ -18327,16 +18341,16 @@ function qa(e, t) {
|
|
|
18327
18341
|
gr(e, t);
|
|
18328
18342
|
}
|
|
18329
18343
|
function PE(e, t) {
|
|
18330
|
-
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;
|
|
18331
18345
|
}
|
|
18332
18346
|
function ME(e, t) {
|
|
18333
|
-
e.openElements.clearBackToTableContext(), e._insertElement(t,
|
|
18347
|
+
e.openElements.clearBackToTableContext(), e._insertElement(t, G.HTML), e.insertionMode = O.IN_COLUMN_GROUP;
|
|
18334
18348
|
}
|
|
18335
18349
|
function FE(e, t) {
|
|
18336
18350
|
e.openElements.clearBackToTableContext(), e._insertFakeElement(R.COLGROUP, o.COLGROUP), e.insertionMode = O.IN_COLUMN_GROUP, Zi(e, t);
|
|
18337
18351
|
}
|
|
18338
18352
|
function BE(e, t) {
|
|
18339
|
-
e.openElements.clearBackToTableContext(), e._insertElement(t,
|
|
18353
|
+
e.openElements.clearBackToTableContext(), e._insertElement(t, G.HTML), e.insertionMode = O.IN_TABLE_BODY;
|
|
18340
18354
|
}
|
|
18341
18355
|
function HE(e, t) {
|
|
18342
18356
|
e.openElements.clearBackToTableContext(), e._insertFakeElement(R.TBODY, o.TBODY), e.insertionMode = O.IN_TABLE_BODY, ra(e, t);
|
|
@@ -18345,10 +18359,10 @@ function UE(e, t) {
|
|
|
18345
18359
|
e.openElements.hasInTableScope(o.TABLE) && (e.openElements.popUntilTagNamePopped(o.TABLE), e._resetInsertionMode(), e._processStartTag(t));
|
|
18346
18360
|
}
|
|
18347
18361
|
function jE(e, t) {
|
|
18348
|
-
Fc(t) ? e._appendElement(t,
|
|
18362
|
+
Fc(t) ? e._appendElement(t, G.HTML) : gr(e, t), t.ackSelfClosing = !0;
|
|
18349
18363
|
}
|
|
18350
18364
|
function qE(e, t) {
|
|
18351
|
-
!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());
|
|
18352
18366
|
}
|
|
18353
18367
|
function On(e, t) {
|
|
18354
18368
|
switch (t.tagID) {
|
|
@@ -18479,7 +18493,7 @@ function Zi(e, t) {
|
|
|
18479
18493
|
break;
|
|
18480
18494
|
}
|
|
18481
18495
|
case o.COL: {
|
|
18482
|
-
e._appendElement(t,
|
|
18496
|
+
e._appendElement(t, G.HTML), t.ackSelfClosing = !0;
|
|
18483
18497
|
break;
|
|
18484
18498
|
}
|
|
18485
18499
|
case o.TEMPLATE: {
|
|
@@ -18512,7 +18526,7 @@ function Wr(e, t) {
|
|
|
18512
18526
|
function ra(e, t) {
|
|
18513
18527
|
switch (t.tagID) {
|
|
18514
18528
|
case o.TR: {
|
|
18515
|
-
e.openElements.clearBackToTableBodyContext(), e._insertElement(t,
|
|
18529
|
+
e.openElements.clearBackToTableBodyContext(), e._insertElement(t, G.HTML), e.insertionMode = O.IN_ROW;
|
|
18516
18530
|
break;
|
|
18517
18531
|
}
|
|
18518
18532
|
case o.TH:
|
|
@@ -18563,7 +18577,7 @@ function aa(e, t) {
|
|
|
18563
18577
|
switch (t.tagID) {
|
|
18564
18578
|
case o.TH:
|
|
18565
18579
|
case o.TD: {
|
|
18566
|
-
e.openElements.clearBackToTableRowContext(), e._insertElement(t,
|
|
18580
|
+
e.openElements.clearBackToTableRowContext(), e._insertElement(t, G.HTML), e.insertionMode = O.IN_CELL, e.activeFormattingElements.insertMarker();
|
|
18567
18581
|
break;
|
|
18568
18582
|
}
|
|
18569
18583
|
case o.CAPTION:
|
|
@@ -18645,15 +18659,15 @@ function Yc(e, t) {
|
|
|
18645
18659
|
break;
|
|
18646
18660
|
}
|
|
18647
18661
|
case o.OPTION: {
|
|
18648
|
-
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);
|
|
18649
18663
|
break;
|
|
18650
18664
|
}
|
|
18651
18665
|
case o.OPTGROUP: {
|
|
18652
|
-
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);
|
|
18653
18667
|
break;
|
|
18654
18668
|
}
|
|
18655
18669
|
case o.HR: {
|
|
18656
|
-
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;
|
|
18657
18671
|
break;
|
|
18658
18672
|
}
|
|
18659
18673
|
case o.INPUT:
|
|
@@ -18770,11 +18784,11 @@ function JE(e, t) {
|
|
|
18770
18784
|
break;
|
|
18771
18785
|
}
|
|
18772
18786
|
case o.FRAMESET: {
|
|
18773
|
-
e._insertElement(t,
|
|
18787
|
+
e._insertElement(t, G.HTML);
|
|
18774
18788
|
break;
|
|
18775
18789
|
}
|
|
18776
18790
|
case o.FRAME: {
|
|
18777
|
-
e._appendElement(t,
|
|
18791
|
+
e._appendElement(t, G.HTML), t.ackSelfClosing = !0;
|
|
18778
18792
|
break;
|
|
18779
18793
|
}
|
|
18780
18794
|
case o.NOFRAMES: {
|
|
@@ -18826,7 +18840,7 @@ function uT(e, t) {
|
|
|
18826
18840
|
e._insertCharacters(t), e.framesetOk = !1;
|
|
18827
18841
|
}
|
|
18828
18842
|
function Gc(e) {
|
|
18829
|
-
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); )
|
|
18830
18844
|
e.openElements.pop();
|
|
18831
18845
|
}
|
|
18832
18846
|
function oT(e, t) {
|
|
@@ -18834,7 +18848,7 @@ function oT(e, t) {
|
|
|
18834
18848
|
Gc(e), e._startTagOutsideForeignContent(t);
|
|
18835
18849
|
else {
|
|
18836
18850
|
const n = e._getAdjustedCurrentElement(), r = e.treeAdapter.getNamespaceURI(n);
|
|
18837
|
-
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;
|
|
18838
18852
|
}
|
|
18839
18853
|
}
|
|
18840
18854
|
function sT(e, t) {
|
|
@@ -18844,7 +18858,7 @@ function sT(e, t) {
|
|
|
18844
18858
|
}
|
|
18845
18859
|
for (let n = e.openElements.stackTop; n > 0; n--) {
|
|
18846
18860
|
const r = e.openElements.items[n];
|
|
18847
|
-
if (e.treeAdapter.getNamespaceURI(r) ===
|
|
18861
|
+
if (e.treeAdapter.getNamespaceURI(r) === G.HTML) {
|
|
18848
18862
|
e._endTagOutsideForeignContent(t);
|
|
18849
18863
|
break;
|
|
18850
18864
|
}
|
|
@@ -19220,95 +19234,95 @@ function DT() {
|
|
|
19220
19234
|
e.exports = r();
|
|
19221
19235
|
})(RT, (function() {
|
|
19222
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) {
|
|
19223
|
-
var
|
|
19224
|
-
return "[" + I + (
|
|
19225
|
-
} }, P = function(I,
|
|
19226
|
-
var
|
|
19227
|
-
return !
|
|
19228
|
-
},
|
|
19229
|
-
var
|
|
19230
|
-
return (
|
|
19231
|
-
}, m: function I(
|
|
19232
|
-
if (
|
|
19233
|
-
var
|
|
19234
|
-
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);
|
|
19235
19249
|
}, a: function(I) {
|
|
19236
19250
|
return I < 0 ? Math.ceil(I) || 0 : Math.floor(I);
|
|
19237
19251
|
}, p: function(I) {
|
|
19238
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$/, "");
|
|
19239
19253
|
}, u: function(I) {
|
|
19240
19254
|
return I === void 0;
|
|
19241
|
-
} },
|
|
19242
|
-
x[
|
|
19243
|
-
var
|
|
19244
|
-
return I instanceof $ || !(!I || !I[
|
|
19245
|
-
}, q = function I(
|
|
19246
|
-
var
|
|
19247
|
-
if (!
|
|
19248
|
-
if (typeof
|
|
19249
|
-
var z =
|
|
19250
|
-
x[z] && (
|
|
19251
|
-
var y =
|
|
19252
|
-
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]);
|
|
19253
19267
|
} else {
|
|
19254
|
-
var ne =
|
|
19255
|
-
x[ne] =
|
|
19268
|
+
var ne = L.name;
|
|
19269
|
+
x[ne] = L, H = ne;
|
|
19256
19270
|
}
|
|
19257
|
-
return !
|
|
19258
|
-
}, te = function(I,
|
|
19259
|
-
if (
|
|
19260
|
-
var
|
|
19261
|
-
return
|
|
19262
|
-
}, Y =
|
|
19263
|
-
Y.l = q, Y.i =
|
|
19264
|
-
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 });
|
|
19265
19279
|
};
|
|
19266
19280
|
var $ = (function() {
|
|
19267
|
-
function I(
|
|
19268
|
-
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;
|
|
19269
19283
|
}
|
|
19270
|
-
var
|
|
19271
|
-
return
|
|
19272
|
-
this.$d = (function(
|
|
19273
|
-
var
|
|
19274
|
-
if (
|
|
19275
|
-
if (Y.u(
|
|
19276
|
-
if (
|
|
19277
|
-
if (typeof
|
|
19278
|
-
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);
|
|
19279
19293
|
if (y) {
|
|
19280
19294
|
var ne = y[2] - 1 || 0, ae = (y[7] || "0").substring(0, 3);
|
|
19281
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);
|
|
19282
19296
|
}
|
|
19283
19297
|
}
|
|
19284
|
-
return new Date(
|
|
19285
|
-
})(
|
|
19286
|
-
},
|
|
19287
|
-
var
|
|
19288
|
-
this.$y =
|
|
19289
|
-
},
|
|
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() {
|
|
19290
19304
|
return Y;
|
|
19291
|
-
},
|
|
19305
|
+
}, L.isValid = function() {
|
|
19292
19306
|
return this.$d.toString() !== m;
|
|
19293
|
-
},
|
|
19294
|
-
var
|
|
19295
|
-
return this.startOf(
|
|
19296
|
-
},
|
|
19297
|
-
return te(
|
|
19298
|
-
},
|
|
19299
|
-
return this.endOf(
|
|
19300
|
-
},
|
|
19301
|
-
return Y.u(
|
|
19302
|
-
},
|
|
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() {
|
|
19303
19317
|
return Math.floor(this.valueOf() / 1e3);
|
|
19304
|
-
},
|
|
19318
|
+
}, L.valueOf = function() {
|
|
19305
19319
|
return this.$d.getTime();
|
|
19306
|
-
},
|
|
19307
|
-
var
|
|
19308
|
-
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);
|
|
19309
19323
|
return z ? nt : nt.endOf(c);
|
|
19310
19324
|
}, ae = function(ze, Ie) {
|
|
19311
|
-
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);
|
|
19312
19326
|
}, v = this.$W, se = this.$M, _e = this.$D, pe = "set" + (this.$u ? "UTC" : "");
|
|
19313
19327
|
switch (y) {
|
|
19314
19328
|
case h:
|
|
@@ -19330,39 +19344,39 @@ function DT() {
|
|
|
19330
19344
|
default:
|
|
19331
19345
|
return this.clone();
|
|
19332
19346
|
}
|
|
19333
|
-
},
|
|
19334
|
-
return this.startOf(
|
|
19335
|
-
},
|
|
19336
|
-
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;
|
|
19337
19351
|
if (z === f || z === h) {
|
|
19338
19352
|
var v = this.clone().set(b, 1);
|
|
19339
19353
|
v.$d[ne](ae), v.init(), this.$d = v.set(b, Math.min(this.$D, v.daysInMonth())).$d;
|
|
19340
19354
|
} else ne && this.$d[ne](ae);
|
|
19341
19355
|
return this.init(), this;
|
|
19342
|
-
},
|
|
19343
|
-
return this.clone().$set(
|
|
19344
|
-
},
|
|
19345
|
-
return this[Y.p(
|
|
19346
|
-
},
|
|
19347
|
-
var
|
|
19348
|
-
|
|
19349
|
-
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) {
|
|
19350
19364
|
var _e = te(z);
|
|
19351
|
-
return Y.w(_e.date(_e.date() + Math.round(se *
|
|
19365
|
+
return Y.w(_e.date(_e.date() + Math.round(se * B)), z);
|
|
19352
19366
|
};
|
|
19353
|
-
if (y === f) return this.set(f, this.$M +
|
|
19354
|
-
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);
|
|
19355
19369
|
if (y === c) return ne(1);
|
|
19356
19370
|
if (y === d) return ne(7);
|
|
19357
|
-
var ae = (
|
|
19371
|
+
var ae = (H = {}, H[s] = r, H[l] = a, H[u] = n, H)[y] || 1, v = this.$d.getTime() + B * ae;
|
|
19358
19372
|
return Y.w(v, this);
|
|
19359
|
-
},
|
|
19360
|
-
return this.add(-1 *
|
|
19361
|
-
},
|
|
19362
|
-
var
|
|
19363
|
-
if (!this.isValid()) return
|
|
19364
|
-
var z =
|
|
19365
|
-
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);
|
|
19366
19380
|
}, Oe = function(Ie) {
|
|
19367
19381
|
return Y.s(ne % 12 || 12, Ie, "0");
|
|
19368
19382
|
}, ze = pe || function(Ie, nt, st) {
|
|
@@ -19373,29 +19387,29 @@ function DT() {
|
|
|
19373
19387
|
return nt || (function(st) {
|
|
19374
19388
|
switch (st) {
|
|
19375
19389
|
case "YY":
|
|
19376
|
-
return String(
|
|
19390
|
+
return String(W.$y).slice(-2);
|
|
19377
19391
|
case "YYYY":
|
|
19378
|
-
return Y.s(
|
|
19392
|
+
return Y.s(W.$y, 4, "0");
|
|
19379
19393
|
case "M":
|
|
19380
19394
|
return v + 1;
|
|
19381
19395
|
case "MM":
|
|
19382
19396
|
return Y.s(v + 1, 2, "0");
|
|
19383
19397
|
case "MMM":
|
|
19384
|
-
return Se(
|
|
19398
|
+
return Se(H.monthsShort, v, _e, 3);
|
|
19385
19399
|
case "MMMM":
|
|
19386
19400
|
return Se(_e, v);
|
|
19387
19401
|
case "D":
|
|
19388
|
-
return
|
|
19402
|
+
return W.$D;
|
|
19389
19403
|
case "DD":
|
|
19390
|
-
return Y.s(
|
|
19404
|
+
return Y.s(W.$D, 2, "0");
|
|
19391
19405
|
case "d":
|
|
19392
|
-
return String(
|
|
19406
|
+
return String(W.$W);
|
|
19393
19407
|
case "dd":
|
|
19394
|
-
return Se(
|
|
19408
|
+
return Se(H.weekdaysMin, W.$W, se, 2);
|
|
19395
19409
|
case "ddd":
|
|
19396
|
-
return Se(
|
|
19410
|
+
return Se(H.weekdaysShort, W.$W, se, 3);
|
|
19397
19411
|
case "dddd":
|
|
19398
|
-
return se[
|
|
19412
|
+
return se[W.$W];
|
|
19399
19413
|
case "H":
|
|
19400
19414
|
return String(ne);
|
|
19401
19415
|
case "HH":
|
|
@@ -19413,21 +19427,21 @@ function DT() {
|
|
|
19413
19427
|
case "mm":
|
|
19414
19428
|
return Y.s(ae, 2, "0");
|
|
19415
19429
|
case "s":
|
|
19416
|
-
return String(
|
|
19430
|
+
return String(W.$s);
|
|
19417
19431
|
case "ss":
|
|
19418
|
-
return Y.s(
|
|
19432
|
+
return Y.s(W.$s, 2, "0");
|
|
19419
19433
|
case "SSS":
|
|
19420
|
-
return Y.s(
|
|
19434
|
+
return Y.s(W.$ms, 3, "0");
|
|
19421
19435
|
case "Z":
|
|
19422
19436
|
return y;
|
|
19423
19437
|
}
|
|
19424
19438
|
return null;
|
|
19425
19439
|
})(Ie) || y.replace(":", "");
|
|
19426
19440
|
}));
|
|
19427
|
-
},
|
|
19441
|
+
}, L.utcOffset = function() {
|
|
19428
19442
|
return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
|
|
19429
|
-
},
|
|
19430
|
-
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() {
|
|
19431
19445
|
return Y.m(y, ae);
|
|
19432
19446
|
};
|
|
19433
19447
|
switch (ne) {
|
|
@@ -19458,36 +19472,36 @@ function DT() {
|
|
|
19458
19472
|
default:
|
|
19459
19473
|
z = se;
|
|
19460
19474
|
}
|
|
19461
|
-
return
|
|
19462
|
-
},
|
|
19475
|
+
return H ? z : Y.a(z);
|
|
19476
|
+
}, L.daysInMonth = function() {
|
|
19463
19477
|
return this.endOf(f).$D;
|
|
19464
|
-
},
|
|
19478
|
+
}, L.$locale = function() {
|
|
19465
19479
|
return x[this.$L];
|
|
19466
|
-
},
|
|
19467
|
-
if (!
|
|
19468
|
-
var
|
|
19469
|
-
return z && (
|
|
19470
|
-
},
|
|
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() {
|
|
19471
19485
|
return Y.w(this.$d, this);
|
|
19472
|
-
},
|
|
19486
|
+
}, L.toDate = function() {
|
|
19473
19487
|
return new Date(this.valueOf());
|
|
19474
|
-
},
|
|
19488
|
+
}, L.toJSON = function() {
|
|
19475
19489
|
return this.isValid() ? this.toISOString() : null;
|
|
19476
|
-
},
|
|
19490
|
+
}, L.toISOString = function() {
|
|
19477
19491
|
return this.$d.toISOString();
|
|
19478
|
-
},
|
|
19492
|
+
}, L.toString = function() {
|
|
19479
19493
|
return this.$d.toUTCString();
|
|
19480
19494
|
}, I;
|
|
19481
|
-
})(),
|
|
19482
|
-
return te.prototype =
|
|
19483
|
-
|
|
19484
|
-
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]);
|
|
19485
19499
|
};
|
|
19486
|
-
})), te.extend = function(I,
|
|
19487
|
-
return I.$i || (I(
|
|
19488
|
-
}, 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) {
|
|
19489
19503
|
return te(1e3 * I);
|
|
19490
|
-
}, te.en = x[
|
|
19504
|
+
}, te.en = x[F], te.Ls = x, te.p = {}, te;
|
|
19491
19505
|
}));
|
|
19492
19506
|
})(Br)), Br.exports;
|
|
19493
19507
|
}
|
|
@@ -19951,14 +19965,14 @@ const GT = (e) => ({
|
|
|
19951
19965
|
d?.userMessageBubble?.style
|
|
19952
19966
|
),
|
|
19953
19967
|
[c, d?.userMessageBubble?.style]
|
|
19954
|
-
),
|
|
19968
|
+
), X = un(
|
|
19955
19969
|
() => GT(l)(f),
|
|
19956
19970
|
[f, l]
|
|
19957
|
-
),
|
|
19971
|
+
), F = un(() => {
|
|
19958
19972
|
if (!D) return null;
|
|
19959
19973
|
if (T === ve.USER)
|
|
19960
|
-
return
|
|
19961
|
-
const x = XT(
|
|
19974
|
+
return X;
|
|
19975
|
+
const x = XT(X);
|
|
19962
19976
|
return /* @__PURE__ */ _.jsx(
|
|
19963
19977
|
Ui,
|
|
19964
19978
|
{
|
|
@@ -19974,7 +19988,7 @@ const GT = (e) => ({
|
|
|
19974
19988
|
);
|
|
19975
19989
|
}, [
|
|
19976
19990
|
D,
|
|
19977
|
-
|
|
19991
|
+
X,
|
|
19978
19992
|
i,
|
|
19979
19993
|
P,
|
|
19980
19994
|
T
|
|
@@ -20007,7 +20021,7 @@ const GT = (e) => ({
|
|
|
20007
20021
|
className: P[T].bubbleClassName,
|
|
20008
20022
|
style: P[T].bubbleStyle,
|
|
20009
20023
|
children: [
|
|
20010
|
-
|
|
20024
|
+
F,
|
|
20011
20025
|
g && /* @__PURE__ */ _.jsxs(_.Fragment, { children: [
|
|
20012
20026
|
/* @__PURE__ */ _.jsx("div", { children: KT }),
|
|
20013
20027
|
/* @__PURE__ */ _.jsx(
|
|
@@ -20654,9 +20668,9 @@ function JT() {
|
|
|
20654
20668
|
return m && window.clearTimeout(m);
|
|
20655
20669
|
};
|
|
20656
20670
|
}, c = function(d, f, p, h, b, m, T) {
|
|
20657
|
-
var g = f.setLastMessage, D = f.setReadyState, P,
|
|
20658
|
-
return p.current.fromSocketIO && (P = (0, t.setUpSocketIOPing)(T)), i(d, p, g, m), u(d, p, D, b, m),
|
|
20659
|
-
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);
|
|
20660
20674
|
};
|
|
20661
20675
|
};
|
|
20662
20676
|
return en.attachListeners = c, en;
|
|
@@ -20868,22 +20882,22 @@ function n3() {
|
|
|
20868
20882
|
for (var d = [], f = 2; f < arguments.length; f++)
|
|
20869
20883
|
d[f - 2] = arguments[f];
|
|
20870
20884
|
return t(void 0, r([l, c], d, !0), void 0, function(p, h, b) {
|
|
20871
|
-
var m, T, g, D, P,
|
|
20872
|
-
return b === void 0 && (b = 0), n(this, function(
|
|
20873
|
-
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) {
|
|
20874
20888
|
case 0:
|
|
20875
20889
|
if (typeof p != "function") return [3, 10];
|
|
20876
|
-
|
|
20890
|
+
w.label = 1;
|
|
20877
20891
|
case 1:
|
|
20878
|
-
return
|
|
20892
|
+
return w.trys.push([1, 3, , 9]), [4, p()];
|
|
20879
20893
|
case 2:
|
|
20880
|
-
return m =
|
|
20894
|
+
return m = w.sent(), [3, 9];
|
|
20881
20895
|
case 3:
|
|
20882
|
-
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];
|
|
20883
20897
|
case 4:
|
|
20884
|
-
return
|
|
20898
|
+
return w.sent(), [2, (0, e.getUrl)(p, h, b + 1)];
|
|
20885
20899
|
case 5:
|
|
20886
|
-
return (x = (
|
|
20900
|
+
return (x = (F = h.current).onReconnectStop) === null || x === void 0 || x.call(F, b), [2, null];
|
|
20887
20901
|
case 6:
|
|
20888
20902
|
return [3, 8];
|
|
20889
20903
|
case 7:
|
|
@@ -20893,7 +20907,7 @@ function n3() {
|
|
|
20893
20907
|
case 9:
|
|
20894
20908
|
return [3, 11];
|
|
20895
20909
|
case 10:
|
|
20896
|
-
m = p,
|
|
20910
|
+
m = p, w.label = 11;
|
|
20897
20911
|
case 11:
|
|
20898
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];
|
|
20899
20913
|
}
|
|
@@ -20943,22 +20957,22 @@ function su() {
|
|
|
20943
20957
|
return new (b || (b = Promise))(function(g, D) {
|
|
20944
20958
|
function P(x) {
|
|
20945
20959
|
try {
|
|
20946
|
-
|
|
20947
|
-
} catch (
|
|
20948
|
-
D(
|
|
20960
|
+
F(m.next(x));
|
|
20961
|
+
} catch (w) {
|
|
20962
|
+
D(w);
|
|
20949
20963
|
}
|
|
20950
20964
|
}
|
|
20951
|
-
function
|
|
20965
|
+
function X(x) {
|
|
20952
20966
|
try {
|
|
20953
|
-
|
|
20954
|
-
} catch (
|
|
20955
|
-
D(
|
|
20967
|
+
F(m.throw(x));
|
|
20968
|
+
} catch (w) {
|
|
20969
|
+
D(w);
|
|
20956
20970
|
}
|
|
20957
20971
|
}
|
|
20958
|
-
function
|
|
20959
|
-
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);
|
|
20960
20974
|
}
|
|
20961
|
-
|
|
20975
|
+
F((m = m.apply(p, h || [])).next());
|
|
20962
20976
|
});
|
|
20963
20977
|
}, n = gt && gt.__generator || function(p, h) {
|
|
20964
20978
|
var b = { label: 0, sent: function() {
|
|
@@ -20968,56 +20982,56 @@ function su() {
|
|
|
20968
20982
|
return D.next = P(0), D.throw = P(1), D.return = P(2), typeof Symbol == "function" && (D[Symbol.iterator] = function() {
|
|
20969
20983
|
return this;
|
|
20970
20984
|
}), D;
|
|
20971
|
-
function P(
|
|
20985
|
+
function P(F) {
|
|
20972
20986
|
return function(x) {
|
|
20973
|
-
return
|
|
20987
|
+
return X([F, x]);
|
|
20974
20988
|
};
|
|
20975
20989
|
}
|
|
20976
|
-
function
|
|
20990
|
+
function X(F) {
|
|
20977
20991
|
if (m) throw new TypeError("Generator is already executing.");
|
|
20978
|
-
for (; D && (D = 0,
|
|
20979
|
-
if (m = 1, T && (g =
|
|
20980
|
-
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]) {
|
|
20981
20995
|
case 0:
|
|
20982
20996
|
case 1:
|
|
20983
|
-
g =
|
|
20997
|
+
g = F;
|
|
20984
20998
|
break;
|
|
20985
20999
|
case 4:
|
|
20986
|
-
return b.label++, { value:
|
|
21000
|
+
return b.label++, { value: F[1], done: !1 };
|
|
20987
21001
|
case 5:
|
|
20988
|
-
b.label++, T =
|
|
21002
|
+
b.label++, T = F[1], F = [0];
|
|
20989
21003
|
continue;
|
|
20990
21004
|
case 7:
|
|
20991
|
-
|
|
21005
|
+
F = b.ops.pop(), b.trys.pop();
|
|
20992
21006
|
continue;
|
|
20993
21007
|
default:
|
|
20994
|
-
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)) {
|
|
20995
21009
|
b = 0;
|
|
20996
21010
|
continue;
|
|
20997
21011
|
}
|
|
20998
|
-
if (
|
|
20999
|
-
b.label =
|
|
21012
|
+
if (F[0] === 3 && (!g || F[1] > g[0] && F[1] < g[3])) {
|
|
21013
|
+
b.label = F[1];
|
|
21000
21014
|
break;
|
|
21001
21015
|
}
|
|
21002
|
-
if (
|
|
21003
|
-
b.label = g[1], g =
|
|
21016
|
+
if (F[0] === 6 && b.label < g[1]) {
|
|
21017
|
+
b.label = g[1], g = F;
|
|
21004
21018
|
break;
|
|
21005
21019
|
}
|
|
21006
21020
|
if (g && b.label < g[2]) {
|
|
21007
|
-
b.label = g[2], b.ops.push(
|
|
21021
|
+
b.label = g[2], b.ops.push(F);
|
|
21008
21022
|
break;
|
|
21009
21023
|
}
|
|
21010
21024
|
g[2] && b.ops.pop(), b.trys.pop();
|
|
21011
21025
|
continue;
|
|
21012
21026
|
}
|
|
21013
|
-
|
|
21027
|
+
F = h.call(p, b);
|
|
21014
21028
|
} catch (x) {
|
|
21015
|
-
|
|
21029
|
+
F = [6, x], T = 0;
|
|
21016
21030
|
} finally {
|
|
21017
21031
|
m = g = 0;
|
|
21018
21032
|
}
|
|
21019
|
-
if (
|
|
21020
|
-
return { value:
|
|
21033
|
+
if (F[0] & 5) throw F[1];
|
|
21034
|
+
return { value: F[0] ? F[1] : void 0, done: !0 };
|
|
21021
21035
|
}
|
|
21022
21036
|
}, r = gt && gt.__importDefault || function(p) {
|
|
21023
21037
|
return p && p.__esModule ? p : { default: p };
|
|
@@ -21025,7 +21039,7 @@ function su() {
|
|
|
21025
21039
|
Object.defineProperty(gt, "__esModule", { value: !0 }), gt.useWebSocket = void 0;
|
|
21026
21040
|
var a = Ct, i = w0, u = Bt(), s = t3(), l = n3(), c = r(r3()), d = ou(), f = function(p, h, b) {
|
|
21027
21041
|
h === void 0 && (h = u.DEFAULT_OPTIONS), b === void 0 && (b = !0);
|
|
21028
|
-
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() {
|
|
21029
21043
|
if (!h.disableJson && T)
|
|
21030
21044
|
try {
|
|
21031
21045
|
return JSON.parse(T.data);
|
|
@@ -21033,20 +21047,20 @@ function su() {
|
|
|
21033
21047
|
return u.UNPARSABLE_JSON_OBJECT;
|
|
21034
21048
|
}
|
|
21035
21049
|
return null;
|
|
21036
|
-
}, [T, h.disableJson]), x = (0, a.useRef)(null),
|
|
21037
|
-
}), q = (0, a.useRef)(0), te = (0, a.useRef)(Date.now()), Y = (0, a.useRef)([]), $ = (0, a.useRef)(null),
|
|
21038
|
-
|
|
21039
|
-
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) {
|
|
21040
21054
|
var ne;
|
|
21041
|
-
if (y === void 0 && (y = !0), u.isEventSourceSupported &&
|
|
21055
|
+
if (y === void 0 && (y = !0), u.isEventSourceSupported && w.current instanceof EventSource) {
|
|
21042
21056
|
console.warn("Unable to send a message from an eventSource");
|
|
21043
21057
|
return;
|
|
21044
21058
|
}
|
|
21045
|
-
((ne =
|
|
21046
|
-
}, []),
|
|
21047
|
-
y === void 0 && (y = !0),
|
|
21048
|
-
}, [
|
|
21049
|
-
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);
|
|
21050
21064
|
}, []);
|
|
21051
21065
|
return (0, a.useEffect)(function() {
|
|
21052
21066
|
if (p !== null && b === !0) {
|
|
@@ -21056,10 +21070,10 @@ function su() {
|
|
|
21056
21070
|
return n(this, function(pe) {
|
|
21057
21071
|
switch (pe.label) {
|
|
21058
21072
|
case 0:
|
|
21059
|
-
return v = x, [4, (0, l.getUrl)(p,
|
|
21073
|
+
return v = x, [4, (0, l.getUrl)(p, k)];
|
|
21060
21074
|
case 1:
|
|
21061
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() {
|
|
21062
|
-
return
|
|
21076
|
+
return X(function(Se) {
|
|
21063
21077
|
return e(e({}, Se), { ABORTED: u.ReadyState.CLOSED });
|
|
21064
21078
|
});
|
|
21065
21079
|
}), [
|
|
@@ -21071,12 +21085,12 @@ function su() {
|
|
|
21071
21085
|
});
|
|
21072
21086
|
}, _e = function(Se) {
|
|
21073
21087
|
y || (0, i.flushSync)(function() {
|
|
21074
|
-
return
|
|
21088
|
+
return X(function(Oe) {
|
|
21075
21089
|
var ze;
|
|
21076
21090
|
return e(e({}, Oe), x.current && (ze = {}, ze[x.current] = Se, ze));
|
|
21077
21091
|
});
|
|
21078
21092
|
});
|
|
21079
|
-
}, ne && (z = (0, s.createOrJoinSocket)(
|
|
21093
|
+
}, ne && (z = (0, s.createOrJoinSocket)(w, x.current, _e, k, se, V, q, te, B)), [
|
|
21080
21094
|
2
|
|
21081
21095
|
/*return*/
|
|
21082
21096
|
]);
|
|
@@ -21084,26 +21098,26 @@ function su() {
|
|
|
21084
21098
|
});
|
|
21085
21099
|
});
|
|
21086
21100
|
};
|
|
21087
|
-
return
|
|
21101
|
+
return V.current = function() {
|
|
21088
21102
|
y || ($.current && ($.current = null), z?.(), ae());
|
|
21089
21103
|
}, ae(), function() {
|
|
21090
21104
|
y = !0, ne = !1, $.current && ($.current = null), z?.(), g(null);
|
|
21091
21105
|
};
|
|
21092
|
-
} else (p === null || b === !1) && (q.current = 0,
|
|
21106
|
+
} else (p === null || b === !1) && (q.current = 0, X(function(v) {
|
|
21093
21107
|
var se;
|
|
21094
21108
|
return e(e({}, v), x.current && (se = {}, se[x.current] = u.ReadyState.CLOSED, se));
|
|
21095
21109
|
}));
|
|
21096
|
-
}, [p, b,
|
|
21110
|
+
}, [p, b, L, B]), (0, a.useEffect)(function() {
|
|
21097
21111
|
I === u.ReadyState.OPEN && Y.current.splice(0).forEach(function(z) {
|
|
21098
|
-
|
|
21112
|
+
B(z);
|
|
21099
21113
|
});
|
|
21100
21114
|
}, [I]), {
|
|
21101
|
-
sendMessage:
|
|
21102
|
-
sendJsonMessage:
|
|
21115
|
+
sendMessage: B,
|
|
21116
|
+
sendJsonMessage: W,
|
|
21103
21117
|
lastMessage: T,
|
|
21104
|
-
lastJsonMessage:
|
|
21118
|
+
lastJsonMessage: F,
|
|
21105
21119
|
readyState: I,
|
|
21106
|
-
getWebSocket:
|
|
21120
|
+
getWebSocket: H
|
|
21107
21121
|
};
|
|
21108
21122
|
};
|
|
21109
21123
|
return gt.useWebSocket = f, gt;
|
|
@@ -21186,8 +21200,8 @@ function i3() {
|
|
|
21186
21200
|
var b = (0, r.useWebSocket)(u, p, l), m = b.lastMessage, T = b.readyState, g = b.getWebSocket;
|
|
21187
21201
|
return (0, n.useEffect)(function() {
|
|
21188
21202
|
m?.type && Object.entries(h.current).forEach(function(D) {
|
|
21189
|
-
var P = D[0],
|
|
21190
|
-
P === m.type &&
|
|
21203
|
+
var P = D[0], X = D[1];
|
|
21204
|
+
P === m.type && X(m);
|
|
21191
21205
|
});
|
|
21192
21206
|
}, [m]), {
|
|
21193
21207
|
lastEvent: m,
|
|
@@ -21244,8 +21258,8 @@ const c3 = "This conversation with a live agent has ended. Please note that a tr
|
|
|
21244
21258
|
CONVERSATION: "CONVERSATION",
|
|
21245
21259
|
FORM: "FORM"
|
|
21246
21260
|
}, pn = Xr({}), hd = ({ children: e, liveChatPayload: t }) => {
|
|
21247
|
-
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 = (
|
|
21248
|
-
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;
|
|
21249
21263
|
switch (ne) {
|
|
21250
21264
|
case "AGENT_TYPING":
|
|
21251
21265
|
return te();
|
|
@@ -21256,7 +21270,7 @@ const c3 = "This conversation with a live agent has ended. Please note that a tr
|
|
|
21256
21270
|
case "CONVERSATION_ERROR":
|
|
21257
21271
|
return;
|
|
21258
21272
|
case "CONVERSATION_TERMINATED":
|
|
21259
|
-
return
|
|
21273
|
+
return V();
|
|
21260
21274
|
case "CONVERSATION_TRANSFERRED_TO_GROUP":
|
|
21261
21275
|
return;
|
|
21262
21276
|
case "CONVERSATION_TRANSFERRED_TO_AGENT":
|
|
@@ -21270,18 +21284,18 @@ const c3 = "This conversation with a live agent has ended. Please note that a tr
|
|
|
21270
21284
|
default:
|
|
21271
21285
|
return;
|
|
21272
21286
|
}
|
|
21273
|
-
}, { sendJsonMessage:
|
|
21274
|
-
onMessage:
|
|
21287
|
+
}, { sendJsonMessage: F } = s3(h, {
|
|
21288
|
+
onMessage: X
|
|
21275
21289
|
}), x = () => {
|
|
21276
21290
|
T(Yt.FORM);
|
|
21277
|
-
const
|
|
21278
|
-
(!
|
|
21279
|
-
},
|
|
21280
|
-
|
|
21291
|
+
const H = n?.liveChat?.form;
|
|
21292
|
+
(!H || H.length === 0) && i(Nt.XPERT);
|
|
21293
|
+
}, w = () => {
|
|
21294
|
+
F({
|
|
21281
21295
|
action: "sendmessage",
|
|
21282
21296
|
event: "TERMINATE_CONVERSATION"
|
|
21283
21297
|
});
|
|
21284
|
-
},
|
|
21298
|
+
}, V = () => {
|
|
21285
21299
|
r({
|
|
21286
21300
|
content: c3,
|
|
21287
21301
|
role: ve.INFO
|
|
@@ -21290,21 +21304,21 @@ const c3 = "This conversation with a live agent has ended. Please note that a tr
|
|
|
21290
21304
|
d(""), b(null), T(Yt.FORM), i(Nt.XPERT);
|
|
21291
21305
|
}, te = () => {
|
|
21292
21306
|
g && clearTimeout(g), c(!0);
|
|
21293
|
-
const
|
|
21307
|
+
const H = setTimeout(() => {
|
|
21294
21308
|
c(!1);
|
|
21295
21309
|
}, 5e3);
|
|
21296
|
-
D(
|
|
21297
|
-
}, Y = (
|
|
21298
|
-
const { displayName: z } =
|
|
21310
|
+
D(H);
|
|
21311
|
+
}, Y = (H) => {
|
|
21312
|
+
const { displayName: z } = H;
|
|
21299
21313
|
p([]), s(z ?? "An agent"), T(Yt.CONVERSATION);
|
|
21300
|
-
}, $ = (
|
|
21301
|
-
const { messageId: z, text: y, timestamp: ne } =
|
|
21314
|
+
}, $ = (H) => {
|
|
21315
|
+
const { messageId: z, text: y, timestamp: ne } = H;
|
|
21302
21316
|
P({
|
|
21303
21317
|
content: y ?? "",
|
|
21304
21318
|
id: z ?? "",
|
|
21305
21319
|
role: ve.AGENT,
|
|
21306
21320
|
timestamp: ne ? new Date(ne) : void 0
|
|
21307
|
-
}),
|
|
21321
|
+
}), F({
|
|
21308
21322
|
action: "sendmessage",
|
|
21309
21323
|
messages: [
|
|
21310
21324
|
{
|
|
@@ -21314,27 +21328,27 @@ const c3 = "This conversation with a live agent has ended. Please note that a tr
|
|
|
21314
21328
|
],
|
|
21315
21329
|
event: "ACKNOWLEDGE_MESSAGE"
|
|
21316
21330
|
}), c(!1);
|
|
21317
|
-
},
|
|
21331
|
+
}, W = {
|
|
21318
21332
|
agentName: u,
|
|
21319
21333
|
agentTyping: l,
|
|
21320
21334
|
cancelLiveChatConnection: x,
|
|
21321
|
-
endLiveChat:
|
|
21335
|
+
endLiveChat: V,
|
|
21322
21336
|
liveChatMessages: f,
|
|
21323
21337
|
pushLiveChatMessage: P,
|
|
21324
|
-
sendMessage: (
|
|
21338
|
+
sendMessage: (H) => {
|
|
21325
21339
|
P({
|
|
21326
|
-
content:
|
|
21340
|
+
content: H,
|
|
21327
21341
|
id: "",
|
|
21328
21342
|
role: ve.USER,
|
|
21329
21343
|
timestamp: /* @__PURE__ */ new Date()
|
|
21330
|
-
}),
|
|
21344
|
+
}), F({
|
|
21331
21345
|
action: "sendmessage",
|
|
21332
21346
|
event: "OUTGOING_MESSAGE",
|
|
21333
|
-
message:
|
|
21347
|
+
message: H
|
|
21334
21348
|
});
|
|
21335
21349
|
},
|
|
21336
21350
|
sendTypingEvent: async () => {
|
|
21337
|
-
|
|
21351
|
+
F({
|
|
21338
21352
|
action: "sendmessage",
|
|
21339
21353
|
event: "TYPING"
|
|
21340
21354
|
});
|
|
@@ -21342,10 +21356,10 @@ const c3 = "This conversation with a live agent has ended. Please note that a tr
|
|
|
21342
21356
|
setLiveChatMessages: p,
|
|
21343
21357
|
step: m,
|
|
21344
21358
|
setStep: T,
|
|
21345
|
-
startLiveChat: (
|
|
21359
|
+
startLiveChat: (H) => {
|
|
21346
21360
|
try {
|
|
21347
21361
|
T(Yt.CONNECTING);
|
|
21348
|
-
const z = new URLSearchParams({ ...t, ...
|
|
21362
|
+
const z = new URLSearchParams({ ...t, ...H });
|
|
21349
21363
|
z.append("url", window.location.href), b(
|
|
21350
21364
|
`${n?.liveChat?.socketUrl}?${z.toString()}`
|
|
21351
21365
|
);
|
|
@@ -21359,11 +21373,11 @@ const c3 = "This conversation with a live agent has ended. Please note that a tr
|
|
|
21359
21373
|
icon: "check",
|
|
21360
21374
|
iconColor: "#30A171",
|
|
21361
21375
|
role: ve.NOTIFICATION
|
|
21362
|
-
}),
|
|
21376
|
+
}), V();
|
|
21363
21377
|
},
|
|
21364
|
-
terminateConversation:
|
|
21378
|
+
terminateConversation: w
|
|
21365
21379
|
};
|
|
21366
|
-
return /* @__PURE__ */ _.jsx(pn.Provider, { value:
|
|
21380
|
+
return /* @__PURE__ */ _.jsx(pn.Provider, { value: W, children: e });
|
|
21367
21381
|
};
|
|
21368
21382
|
hd.propTypes = {
|
|
21369
21383
|
children: A.element.isRequired,
|
|
@@ -21885,47 +21899,47 @@ function _d() {
|
|
|
21885
21899
|
), T = () => {
|
|
21886
21900
|
r(Nt.XPERT);
|
|
21887
21901
|
}, g = () => {
|
|
21888
|
-
p("privacyCheck"), f((
|
|
21889
|
-
}, D = (
|
|
21890
|
-
const
|
|
21891
|
-
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);
|
|
21892
21906
|
}, P = () => {
|
|
21893
|
-
|
|
21907
|
+
X() && n(l);
|
|
21894
21908
|
};
|
|
21895
21909
|
Le(() => {
|
|
21896
21910
|
(!a || a.length === 0) && n();
|
|
21897
21911
|
}, [a, n]);
|
|
21898
|
-
const
|
|
21899
|
-
const
|
|
21900
|
-
const { key:
|
|
21901
|
-
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" };
|
|
21902
21916
|
if (q?.length > 0)
|
|
21903
21917
|
for (const Y of q)
|
|
21904
21918
|
switch (Y) {
|
|
21905
21919
|
case "email": {
|
|
21906
21920
|
if (!E3(te))
|
|
21907
|
-
return { ...x, [
|
|
21921
|
+
return { ...x, [V]: "Should be email" };
|
|
21908
21922
|
break;
|
|
21909
21923
|
}
|
|
21910
21924
|
}
|
|
21911
21925
|
return x;
|
|
21912
21926
|
}, {});
|
|
21913
|
-
return !d && s && (
|
|
21927
|
+
return !d && s && (F.privacyCheck = "Required"), b(F), Object.keys(F).length === 0;
|
|
21914
21928
|
};
|
|
21915
21929
|
return /* @__PURE__ */ _.jsxs("div", { className: "live-chat-form", children: [
|
|
21916
21930
|
i && /* @__PURE__ */ _.jsx("p", { children: i }),
|
|
21917
|
-
(a ?? []).map(({ key:
|
|
21931
|
+
(a ?? []).map(({ key: F, name: x }) => /* @__PURE__ */ _.jsxs(k0, { children: [
|
|
21918
21932
|
/* @__PURE__ */ _.jsx(
|
|
21919
21933
|
"input",
|
|
21920
21934
|
{
|
|
21921
|
-
className: `live-chat-form-input ${h[
|
|
21935
|
+
className: `live-chat-form-input ${h[F] ? "error" : ""}`,
|
|
21922
21936
|
name: x,
|
|
21923
21937
|
placeholder: x,
|
|
21924
|
-
onChange: (
|
|
21938
|
+
onChange: (w) => D(w, F)
|
|
21925
21939
|
}
|
|
21926
21940
|
),
|
|
21927
|
-
h[
|
|
21928
|
-
] },
|
|
21941
|
+
h[F] && /* @__PURE__ */ _.jsx("p", { className: "live-chat-form-error", children: h[F] })
|
|
21942
|
+
] }, F)),
|
|
21929
21943
|
s && /* @__PURE__ */ _.jsxs(_.Fragment, { children: [
|
|
21930
21944
|
/* @__PURE__ */ _.jsx(
|
|
21931
21945
|
"div",
|
|
@@ -21970,7 +21984,7 @@ function _d() {
|
|
|
21970
21984
|
},
|
|
21971
21985
|
type: "checkbox",
|
|
21972
21986
|
onChange: g,
|
|
21973
|
-
onKeyDown: (
|
|
21987
|
+
onKeyDown: (F) => F.key === "Enter" && g()
|
|
21974
21988
|
}
|
|
21975
21989
|
),
|
|
21976
21990
|
/* @__PURE__ */ _.jsx("label", { htmlFor: "privacy-check", children: "Yes, I accept" })
|
|
@@ -22198,19 +22212,19 @@ function Sd({ submitEventExternal: e = null }) {
|
|
|
22198
22212
|
isMobile: g,
|
|
22199
22213
|
mode: D,
|
|
22200
22214
|
setDisableScroll: P,
|
|
22201
|
-
setHasError:
|
|
22202
|
-
setHasNewMessage:
|
|
22215
|
+
setHasError: X,
|
|
22216
|
+
setHasNewMessage: F,
|
|
22203
22217
|
setIsNormalSize: x,
|
|
22204
|
-
setLoading:
|
|
22205
|
-
setLoadingHistory:
|
|
22218
|
+
setLoading: w,
|
|
22219
|
+
setLoadingHistory: V,
|
|
22206
22220
|
setStreaming: q
|
|
22207
|
-
} = 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";
|
|
22208
22222
|
Le(() => {
|
|
22209
|
-
D === Nt.XPERT &&
|
|
22210
|
-
}, [D,
|
|
22223
|
+
D === Nt.XPERT && H && z.current && z.current.focus();
|
|
22224
|
+
}, [D, H]), C3(
|
|
22211
22225
|
r?.liveChat?.enabled,
|
|
22212
22226
|
I,
|
|
22213
|
-
|
|
22227
|
+
L
|
|
22214
22228
|
);
|
|
22215
22229
|
const ae = dt(
|
|
22216
22230
|
({ name: ue, payload: be }) => {
|
|
@@ -22236,13 +22250,13 @@ function Sd({ submitEventExternal: e = null }) {
|
|
|
22236
22250
|
for (; !ye(); ) {
|
|
22237
22251
|
if (Ce >= Ye)
|
|
22238
22252
|
return !1;
|
|
22239
|
-
await new Promise((
|
|
22253
|
+
await new Promise((U) => setTimeout(U, Fe)), Ce += Fe;
|
|
22240
22254
|
}
|
|
22241
22255
|
return !0;
|
|
22242
22256
|
})(
|
|
22243
22257
|
() => window?.OnetrustActiveGroups && window.OnetrustActiveGroups.split(",").includes("C0003")
|
|
22244
22258
|
))) {
|
|
22245
|
-
|
|
22259
|
+
V(!0);
|
|
22246
22260
|
try {
|
|
22247
22261
|
let ye = Ns(a);
|
|
22248
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(
|
|
@@ -22256,22 +22270,22 @@ function Sd({ submitEventExternal: e = null }) {
|
|
|
22256
22270
|
);
|
|
22257
22271
|
if (!Ce.ok)
|
|
22258
22272
|
throw new Error(`HTTPError: ${Ce.status} ${Ce.statusText}`);
|
|
22259
|
-
const
|
|
22273
|
+
const U = await Ce.json();
|
|
22260
22274
|
m(
|
|
22261
|
-
|
|
22275
|
+
U.map((K) => ({
|
|
22262
22276
|
...K,
|
|
22263
22277
|
disableFeedback: !0,
|
|
22264
22278
|
toolCalls: K.tool_calls,
|
|
22265
22279
|
toolCallId: K.tool_call_id
|
|
22266
22280
|
}))
|
|
22267
|
-
), P(!0),
|
|
22281
|
+
), P(!0), F(!0);
|
|
22268
22282
|
} catch (ye) {
|
|
22269
22283
|
console.error(ye);
|
|
22270
22284
|
} finally {
|
|
22271
|
-
|
|
22285
|
+
V(!1);
|
|
22272
22286
|
}
|
|
22273
22287
|
}
|
|
22274
|
-
}, se = r?.conversationHistory?.enabled &&
|
|
22288
|
+
}, se = r?.conversationHistory?.enabled && H && !I;
|
|
22275
22289
|
S3(
|
|
22276
22290
|
() => se && v()
|
|
22277
22291
|
), Le(() => {
|
|
@@ -22372,12 +22386,12 @@ function Sd({ submitEventExternal: e = null }) {
|
|
|
22372
22386
|
});
|
|
22373
22387
|
}
|
|
22374
22388
|
);
|
|
22375
|
-
const
|
|
22389
|
+
const U = Ce.filter(({ content: he }) => !!he), K = U.map((he) => he.content ?? "").join("");
|
|
22376
22390
|
pe(K, be);
|
|
22377
22391
|
const ie = /* @__PURE__ */ new Date(), Ee = ks(JSON.stringify(ye));
|
|
22378
22392
|
return Se({
|
|
22379
22393
|
conversationByteSize: Ee,
|
|
22380
|
-
conversationSize:
|
|
22394
|
+
conversationSize: U.length + T.filter(({ content: he }) => !!he).length + 1,
|
|
22381
22395
|
userInputMessage: Me,
|
|
22382
22396
|
apiResponseMessage: K,
|
|
22383
22397
|
elapsedSeconds: Is(Ye, ie),
|
|
@@ -22385,7 +22399,7 @@ function Sd({ submitEventExternal: e = null }) {
|
|
|
22385
22399
|
}), Ce;
|
|
22386
22400
|
}, ze = async (ue, be, Me, ye, Ye) => {
|
|
22387
22401
|
const Fe = new TextDecoder("utf-8");
|
|
22388
|
-
let Ce = [],
|
|
22402
|
+
let Ce = [], U = 0;
|
|
22389
22403
|
const K = /* @__PURE__ */ new Date();
|
|
22390
22404
|
for (; ; ) {
|
|
22391
22405
|
const { value: Ee, done: he } = await ue.read();
|
|
@@ -22402,12 +22416,12 @@ function Sd({ submitEventExternal: e = null }) {
|
|
|
22402
22416
|
toolCallId: Be.tool_call_id
|
|
22403
22417
|
})
|
|
22404
22418
|
);
|
|
22405
|
-
if (Ve.length >
|
|
22406
|
-
for (let ot =
|
|
22419
|
+
if (Ve.length > U) {
|
|
22420
|
+
for (let ot = U; ot < Ve.length; ot++)
|
|
22407
22421
|
b({
|
|
22408
22422
|
content: "",
|
|
22409
22423
|
disableFeedback: !0
|
|
22410
|
-
}),
|
|
22424
|
+
}), U++;
|
|
22411
22425
|
const Be = /* @__PURE__ */ new Date(), rt = ks(
|
|
22412
22426
|
JSON.stringify(ye)
|
|
22413
22427
|
), He = Ve.filter(({ content: ot }) => !!ot);
|
|
@@ -22448,7 +22462,7 @@ function Sd({ submitEventExternal: e = null }) {
|
|
|
22448
22462
|
if (ue.trim().length === 0)
|
|
22449
22463
|
return;
|
|
22450
22464
|
const be = /* @__PURE__ */ new Date();
|
|
22451
|
-
|
|
22465
|
+
F(!1), X(!1);
|
|
22452
22466
|
const Me = T.filter((Ce) => Ce.role === ve.USER).length + 1;
|
|
22453
22467
|
if (ae({
|
|
22454
22468
|
name: `${s.prefix}.bi.xpert.chatbot.popup.chat.message.sent`,
|
|
@@ -22459,8 +22473,8 @@ function Sd({ submitEventExternal: e = null }) {
|
|
|
22459
22473
|
userInputMessage: ue,
|
|
22460
22474
|
isTestUser: ne
|
|
22461
22475
|
}
|
|
22462
|
-
}),
|
|
22463
|
-
await h(ue),
|
|
22476
|
+
}), w(!0), h) {
|
|
22477
|
+
await h(ue), w(!1);
|
|
22464
22478
|
return;
|
|
22465
22479
|
}
|
|
22466
22480
|
let ye = null;
|
|
@@ -22498,7 +22512,7 @@ function Sd({ submitEventExternal: e = null }) {
|
|
|
22498
22512
|
});
|
|
22499
22513
|
if (!Fe.ok)
|
|
22500
22514
|
throw new Error(`HTTPError: ${Fe.status} ${Fe.statusText}`);
|
|
22501
|
-
|
|
22515
|
+
w(!1), t.payloadParams?.stream ? await Ie(
|
|
22502
22516
|
Fe,
|
|
22503
22517
|
ye,
|
|
22504
22518
|
ue,
|
|
@@ -22510,14 +22524,14 @@ function Sd({ submitEventExternal: e = null }) {
|
|
|
22510
22524
|
ue,
|
|
22511
22525
|
Ye,
|
|
22512
22526
|
be
|
|
22513
|
-
), P(!1),
|
|
22527
|
+
), P(!1), F(!0);
|
|
22514
22528
|
} catch (be) {
|
|
22515
22529
|
if (be.name === "AbortError")
|
|
22516
22530
|
return;
|
|
22517
|
-
|
|
22531
|
+
w(!1), X(!0), console.error(be);
|
|
22518
22532
|
}
|
|
22519
22533
|
}, st = () => {
|
|
22520
|
-
|
|
22534
|
+
L(!1), k(!0), x(!0), v(), ae({
|
|
22521
22535
|
name: `${s.prefix}.bi.xpert.chatbot.action.button.clicked`,
|
|
22522
22536
|
payload: {
|
|
22523
22537
|
category: "2u",
|
|
@@ -22535,7 +22549,7 @@ function Sd({ submitEventExternal: e = null }) {
|
|
|
22535
22549
|
}
|
|
22536
22550
|
}), x(ue);
|
|
22537
22551
|
}, Mn = () => {
|
|
22538
|
-
|
|
22552
|
+
k(!0), x(!0), v(), ae({
|
|
22539
22553
|
name: `${s.prefix}.bi.xpert.chatbot.proactive.message.clicked`,
|
|
22540
22554
|
payload: {
|
|
22541
22555
|
category: "2u",
|
|
@@ -22553,7 +22567,7 @@ function Sd({ submitEventExternal: e = null }) {
|
|
|
22553
22567
|
}
|
|
22554
22568
|
});
|
|
22555
22569
|
}, mn = () => {
|
|
22556
|
-
|
|
22570
|
+
k(!1), W(!1), ae({
|
|
22557
22571
|
name: `${s.prefix}.bi.xpert.chatbot.popup.chat.minimized`,
|
|
22558
22572
|
payload: {
|
|
22559
22573
|
category: "2u",
|
|
@@ -22588,7 +22602,7 @@ function Sd({ submitEventExternal: e = null }) {
|
|
|
22588
22602
|
u?.enabled && /* @__PURE__ */ _.jsx(
|
|
22589
22603
|
Ad,
|
|
22590
22604
|
{
|
|
22591
|
-
showMessage: !
|
|
22605
|
+
showMessage: !H,
|
|
22592
22606
|
style: Bn,
|
|
22593
22607
|
onClose: Fn,
|
|
22594
22608
|
onClick: Mn,
|
|
@@ -22632,7 +22646,7 @@ function Sd({ submitEventExternal: e = null }) {
|
|
|
22632
22646
|
}
|
|
22633
22647
|
),
|
|
22634
22648
|
c && /* @__PURE__ */ _.jsx(p3, {}),
|
|
22635
|
-
|
|
22649
|
+
H && !I && /* @__PURE__ */ _.jsx(Js, { isMounted: B, children: /* @__PURE__ */ _.jsx(
|
|
22636
22650
|
"div",
|
|
22637
22651
|
{
|
|
22638
22652
|
ref: d,
|
|
@@ -22643,8 +22657,8 @@ function Sd({ submitEventExternal: e = null }) {
|
|
|
22643
22657
|
{
|
|
22644
22658
|
onClose: mn,
|
|
22645
22659
|
handleResizeButtonClick: wt,
|
|
22646
|
-
isMounted:
|
|
22647
|
-
setIsMounted:
|
|
22660
|
+
isMounted: B,
|
|
22661
|
+
setIsMounted: W
|
|
22648
22662
|
}
|
|
22649
22663
|
),
|
|
22650
22664
|
/* @__PURE__ */ _.jsx(h3, {}),
|
|
@@ -22656,7 +22670,7 @@ function Sd({ submitEventExternal: e = null }) {
|
|
|
22656
22670
|
handleSend: nt,
|
|
22657
22671
|
inputRef: z,
|
|
22658
22672
|
isTestUser: ne,
|
|
22659
|
-
setLiveChatOpen:
|
|
22673
|
+
setLiveChatOpen: L,
|
|
22660
22674
|
submitEvent: ae
|
|
22661
22675
|
}
|
|
22662
22676
|
),
|