@sciol/xyzen 0.1.2 → 0.1.4
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/xyzen.es.js +139 -127
- package/dist/xyzen.umd.js +2 -2
- package/package.json +3 -2
- package/src/app/App.tsx +221 -0
- package/src/assets/react.svg +1 -0
- package/src/components/layouts/XyzenChat.tsx +212 -0
- package/src/components/layouts/XyzenHistory.tsx +117 -0
- package/src/components/layouts/XyzenNodes.tsx +7 -0
- package/src/components/layouts/components/ChatBubble.tsx +140 -0
- package/src/components/layouts/components/ChatInput.tsx +173 -0
- package/src/components/layouts/components/EmptyChat.tsx +117 -0
- package/src/components/layouts/components/WelcomeMessage.tsx +104 -0
- package/src/configs/index.ts +1 -0
- package/src/context/XyzenProvider.tsx +0 -0
- package/src/hooks/useTheme.ts +79 -0
- package/src/index.ts +6 -0
- package/src/lib/Markdown.tsx +98 -0
- package/src/lib/formatDate.ts +32 -0
- package/src/main.tsx +9 -0
- package/src/service/xyzenService.ts +90 -0
- package/src/store/xyzenStore.ts +326 -0
- package/src/types/xyzen.d.ts +0 -0
- package/src/vite-env.d.ts +1 -0
package/dist/xyzen.es.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
"use client";
|
|
1
2
|
import * as Me from "react";
|
|
2
|
-
import rt, { useLayoutEffect as Rg, useEffect as
|
|
3
|
+
import rt, { useLayoutEffect as Rg, useEffect as We, useRef as Be, useMemo as Ze, useCallback as at, useState as Je, createContext as qn, memo as pI, useReducer as k4, useContext as Dt, forwardRef as N4, Fragment as co, isValidElement as R4, cloneElement as fI, createElement as C4, useId as Wo, useInsertionEffect as I4, Children as hI, Component as mI } from "react";
|
|
3
4
|
import { unstable_batchedUpdates as vs, createPortal as gI } from "react-dom";
|
|
4
5
|
var ll = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
5
6
|
function Bl(e) {
|
|
@@ -1169,7 +1170,7 @@ function B4(e) {
|
|
|
1169
1170
|
function Ci(e) {
|
|
1170
1171
|
return e ? Ri(e) ? e.document : Dg(e) ? Lg(e) ? e : jo(e) || B4(e) ? e.ownerDocument : document : document : document;
|
|
1171
1172
|
}
|
|
1172
|
-
const fa = ql ? Rg :
|
|
1173
|
+
const fa = ql ? Rg : We;
|
|
1173
1174
|
function Mg(e) {
|
|
1174
1175
|
const t = Be(e);
|
|
1175
1176
|
return fa(() => {
|
|
@@ -1218,7 +1219,7 @@ function ym(e) {
|
|
|
1218
1219
|
}
|
|
1219
1220
|
function vm(e) {
|
|
1220
1221
|
const t = Be();
|
|
1221
|
-
return
|
|
1222
|
+
return We(() => {
|
|
1222
1223
|
t.current = e;
|
|
1223
1224
|
}, [e]), t.current;
|
|
1224
1225
|
}
|
|
@@ -1351,7 +1352,7 @@ function QI() {
|
|
|
1351
1352
|
const z4 = /* @__PURE__ */ qn(null);
|
|
1352
1353
|
function JI(e) {
|
|
1353
1354
|
const t = Dt(z4);
|
|
1354
|
-
|
|
1355
|
+
We(() => {
|
|
1355
1356
|
if (!t)
|
|
1356
1357
|
throw new Error("useDndMonitor must be used within a children of <DndContext>");
|
|
1357
1358
|
return t(e);
|
|
@@ -1415,7 +1416,7 @@ function r6(e) {
|
|
|
1415
1416
|
announce: i,
|
|
1416
1417
|
announcement: o
|
|
1417
1418
|
} = QI(), s = Fg("DndLiveRegion"), [l, u] = Je(!1);
|
|
1418
|
-
if (
|
|
1419
|
+
if (We(() => {
|
|
1419
1420
|
u(!0);
|
|
1420
1421
|
}, []), JI(Ze(() => ({
|
|
1421
1422
|
onDragStart(d) {
|
|
@@ -2342,7 +2343,7 @@ function I6(e) {
|
|
|
2342
2343
|
const C = T.current.x * v.current.x, M = T.current.y * v.current.y;
|
|
2343
2344
|
S.scrollBy(C, M);
|
|
2344
2345
|
}, []), N = Ze(() => s === hl.TreeOrder ? [...u].reverse() : u, [s, u]);
|
|
2345
|
-
|
|
2346
|
+
We(
|
|
2346
2347
|
() => {
|
|
2347
2348
|
if (!i || !u.length || !y) {
|
|
2348
2349
|
g();
|
|
@@ -2487,21 +2488,21 @@ function P6(e, t) {
|
|
|
2487
2488
|
}
|
|
2488
2489
|
return v;
|
|
2489
2490
|
}, [e, i, n, d, l]);
|
|
2490
|
-
return
|
|
2491
|
+
return We(() => {
|
|
2491
2492
|
c.current = e;
|
|
2492
|
-
}, [e]),
|
|
2493
|
+
}, [e]), We(
|
|
2493
2494
|
() => {
|
|
2494
2495
|
d || f();
|
|
2495
2496
|
},
|
|
2496
2497
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
2497
2498
|
[n, d]
|
|
2498
|
-
),
|
|
2499
|
+
), We(
|
|
2499
2500
|
() => {
|
|
2500
2501
|
i && i.length > 0 && o(null);
|
|
2501
2502
|
},
|
|
2502
2503
|
//eslint-disable-next-line react-hooks/exhaustive-deps
|
|
2503
2504
|
[JSON.stringify(i)]
|
|
2504
|
-
),
|
|
2505
|
+
), We(
|
|
2505
2506
|
() => {
|
|
2506
2507
|
d || typeof s != "number" || b.current !== null || (b.current = setTimeout(() => {
|
|
2507
2508
|
f(), b.current = null;
|
|
@@ -2544,7 +2545,7 @@ function B6(e) {
|
|
|
2544
2545
|
} = window;
|
|
2545
2546
|
return new i(r);
|
|
2546
2547
|
}, [r, n]);
|
|
2547
|
-
return
|
|
2548
|
+
return We(() => () => a?.disconnect(), [a]), a;
|
|
2548
2549
|
}
|
|
2549
2550
|
function zg(e) {
|
|
2550
2551
|
let {
|
|
@@ -2563,7 +2564,7 @@ function zg(e) {
|
|
|
2563
2564
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
2564
2565
|
[n]
|
|
2565
2566
|
);
|
|
2566
|
-
return
|
|
2567
|
+
return We(() => () => a?.disconnect(), [a]), a;
|
|
2567
2568
|
}
|
|
2568
2569
|
function U6(e) {
|
|
2569
2570
|
return new Ug(Ko(e), e);
|
|
@@ -2614,7 +2615,7 @@ function H6(e) {
|
|
|
2614
2615
|
const rE = [];
|
|
2615
2616
|
function z6(e) {
|
|
2616
2617
|
const t = Be(e), n = Yo((r) => e ? r && r !== rE && e && t.current && e.parentNode === t.current.parentNode ? r : Bg(e) : rE, [e]);
|
|
2617
|
-
return
|
|
2618
|
+
return We(() => {
|
|
2618
2619
|
t.current = e;
|
|
2619
2620
|
}, [e]), n;
|
|
2620
2621
|
}
|
|
@@ -2623,7 +2624,7 @@ function $6(e) {
|
|
|
2623
2624
|
const o = _u(i.target);
|
|
2624
2625
|
o && n((s) => s ? (s.set(o, Sm(o)), new Map(s)) : null);
|
|
2625
2626
|
}, []);
|
|
2626
|
-
return
|
|
2627
|
+
return We(() => {
|
|
2627
2628
|
const i = r.current;
|
|
2628
2629
|
if (e !== i) {
|
|
2629
2630
|
o(i);
|
|
@@ -2649,19 +2650,19 @@ function $6(e) {
|
|
|
2649
2650
|
function aE(e, t) {
|
|
2650
2651
|
t === void 0 && (t = []);
|
|
2651
2652
|
const n = Be(null);
|
|
2652
|
-
return
|
|
2653
|
+
return We(
|
|
2653
2654
|
() => {
|
|
2654
2655
|
n.current = null;
|
|
2655
2656
|
},
|
|
2656
2657
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
2657
2658
|
t
|
|
2658
|
-
),
|
|
2659
|
+
), We(() => {
|
|
2659
2660
|
const r = e !== mr;
|
|
2660
2661
|
r && !n.current && (n.current = e), !r && n.current && (n.current = null);
|
|
2661
2662
|
}, [e]), n.current ? pl(e, n.current) : mr;
|
|
2662
2663
|
}
|
|
2663
2664
|
function q6(e) {
|
|
2664
|
-
|
|
2665
|
+
We(
|
|
2665
2666
|
() => {
|
|
2666
2667
|
if (!ql)
|
|
2667
2668
|
return;
|
|
@@ -2953,7 +2954,7 @@ function t5(e) {
|
|
|
2953
2954
|
activatorEvent: r,
|
|
2954
2955
|
draggableNodes: a
|
|
2955
2956
|
} = Dt($g), i = vm(r), o = vm(n?.id);
|
|
2956
|
-
return
|
|
2957
|
+
return We(() => {
|
|
2957
2958
|
if (!t && !r && i && o != null) {
|
|
2958
2959
|
if (!H4(i) || document.activeElement === i.target)
|
|
2959
2960
|
return;
|
|
@@ -3283,7 +3284,7 @@ const nx = /* @__PURE__ */ pI(function(t) {
|
|
|
3283
3284
|
}, [M, Mt]), Pt = M6(c, dn);
|
|
3284
3285
|
q6(c), fa(() => {
|
|
3285
3286
|
Ge && k === ua.Initializing && N(ua.Initialized);
|
|
3286
|
-
}, [Ge, k]),
|
|
3287
|
+
}, [Ge, k]), We(
|
|
3287
3288
|
() => {
|
|
3288
3289
|
const {
|
|
3289
3290
|
onDragMove: Ft
|
|
@@ -3314,7 +3315,7 @@ const nx = /* @__PURE__ */ pI(function(t) {
|
|
|
3314
3315
|
},
|
|
3315
3316
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
3316
3317
|
[J.x, J.y]
|
|
3317
|
-
),
|
|
3318
|
+
), We(
|
|
3318
3319
|
() => {
|
|
3319
3320
|
const {
|
|
3320
3321
|
active: Ft,
|
|
@@ -3603,7 +3604,7 @@ function sx() {
|
|
|
3603
3604
|
}, [
|
|
3604
3605
|
n
|
|
3605
3606
|
]);
|
|
3606
|
-
return
|
|
3607
|
+
return We(() => r, [
|
|
3607
3608
|
r
|
|
3608
3609
|
]), {
|
|
3609
3610
|
addGlobalListener: t,
|
|
@@ -3747,7 +3748,7 @@ function A5(e, t, n) {
|
|
|
3747
3748
|
return e = e || r.activeElement instanceof a && !_5.has(r.activeElement.type) || r.activeElement instanceof i || r.activeElement instanceof o && r.activeElement.isContentEditable, !(e && t === "keyboard" && n instanceof s && !v5[n.key]);
|
|
3748
3749
|
}
|
|
3749
3750
|
function w5(e, t, n) {
|
|
3750
|
-
Nm(),
|
|
3751
|
+
Nm(), We(() => {
|
|
3751
3752
|
let r = (a, i) => {
|
|
3752
3753
|
A5(!!n?.isTextInput, a, i) && e(hx());
|
|
3753
3754
|
};
|
|
@@ -3850,7 +3851,7 @@ function R5(e) {
|
|
|
3850
3851
|
pointerType: "",
|
|
3851
3852
|
target: null
|
|
3852
3853
|
}).current;
|
|
3853
|
-
|
|
3854
|
+
We(N5, []);
|
|
3854
3855
|
let { addGlobalListener: l, removeAllGlobalListeners: u } = sx(), { hoverProps: c, triggerHoverEnd: d } = Ze(() => {
|
|
3855
3856
|
let p = (g, T) => {
|
|
3856
3857
|
if (s.pointerType = T, a || T === "touch" || s.isHovered || !g.currentTarget.contains(g.target)) return;
|
|
@@ -3896,7 +3897,7 @@ function R5(e) {
|
|
|
3896
3897
|
l,
|
|
3897
3898
|
u
|
|
3898
3899
|
]);
|
|
3899
|
-
return
|
|
3900
|
+
return We(() => {
|
|
3900
3901
|
a && d({
|
|
3901
3902
|
currentTarget: s.target
|
|
3902
3903
|
}, s.pointerType);
|
|
@@ -4011,10 +4012,10 @@ function yx() {
|
|
|
4011
4012
|
}
|
|
4012
4013
|
function D5() {
|
|
4013
4014
|
let [e] = Je(yx);
|
|
4014
|
-
return
|
|
4015
|
+
return We(() => () => e.dispose(), [e]), e;
|
|
4015
4016
|
}
|
|
4016
4017
|
let Ti = (e, t) => {
|
|
4017
|
-
gx.isServer ?
|
|
4018
|
+
gx.isServer ? We(e, t) : Rg(e, t);
|
|
4018
4019
|
};
|
|
4019
4020
|
function io(e) {
|
|
4020
4021
|
let t = Be(e);
|
|
@@ -4180,7 +4181,7 @@ function q5(e, t) {
|
|
|
4180
4181
|
let _x = Oi(q5), G5 = Symbol();
|
|
4181
4182
|
function Zo(...e) {
|
|
4182
4183
|
let t = Be(e);
|
|
4183
|
-
|
|
4184
|
+
We(() => {
|
|
4184
4185
|
t.current = e;
|
|
4185
4186
|
}, [e]);
|
|
4186
4187
|
let n = wr((r) => {
|
|
@@ -4635,7 +4636,7 @@ function Zg(e) {
|
|
|
4635
4636
|
const t = Be(null);
|
|
4636
4637
|
return t.current === null && (t.current = e()), t.current;
|
|
4637
4638
|
}
|
|
4638
|
-
const Qg = typeof window < "u", xx = Qg ? Rg :
|
|
4639
|
+
const Qg = typeof window < "u", xx = Qg ? Rg : We, Wl = /* @__PURE__ */ qn(null);
|
|
4639
4640
|
function Jg(e, t) {
|
|
4640
4641
|
e.indexOf(t) === -1 && e.push(t);
|
|
4641
4642
|
}
|
|
@@ -6548,7 +6549,7 @@ function b3(e = !0) {
|
|
|
6548
6549
|
if (t === null)
|
|
6549
6550
|
return [!0, null];
|
|
6550
6551
|
const { isPresent: n, onExitComplete: r, register: a } = t, i = Wo();
|
|
6551
|
-
|
|
6552
|
+
We(() => {
|
|
6552
6553
|
if (e)
|
|
6553
6554
|
return a(i);
|
|
6554
6555
|
}, [e]);
|
|
@@ -7017,7 +7018,7 @@ function mL(e, t, n, r, a) {
|
|
|
7017
7018
|
const f = n[N3], b = Be(!!f && !window.MotionHandoffIsComplete?.(f) && window.MotionHasOptimisedAnimation?.(f));
|
|
7018
7019
|
return xx(() => {
|
|
7019
7020
|
c && (p.current = !0, window.MotionIsMounted = !0, c.updateFeatures(), c.scheduleRenderMicrotask(), b.current && c.animationState && c.animationState.animateChanges());
|
|
7020
|
-
}),
|
|
7021
|
+
}), We(() => {
|
|
7021
7022
|
c && (!b.current && c.animationState && c.animationState.animateChanges(), b.current && (queueMicrotask(() => {
|
|
7022
7023
|
window.MotionHandoffMarkAsComplete?.(f);
|
|
7023
7024
|
}), b.current = !1));
|
|
@@ -11283,7 +11284,7 @@ function Ui(e) {
|
|
|
11283
11284
|
}
|
|
11284
11285
|
return t.join("") + e.slice(r);
|
|
11285
11286
|
}
|
|
11286
|
-
function
|
|
11287
|
+
function Ye(e, t, n, r) {
|
|
11287
11288
|
const a = r ? r - 1 : Number.POSITIVE_INFINITY;
|
|
11288
11289
|
let i = 0;
|
|
11289
11290
|
return o;
|
|
@@ -11306,7 +11307,7 @@ function g9(e) {
|
|
|
11306
11307
|
e.consume(s);
|
|
11307
11308
|
return;
|
|
11308
11309
|
}
|
|
11309
|
-
return e.enter("lineEnding"), e.consume(s), e.exit("lineEnding"),
|
|
11310
|
+
return e.enter("lineEnding"), e.consume(s), e.exit("lineEnding"), Ye(e, t, "linePrefix");
|
|
11310
11311
|
}
|
|
11311
11312
|
function a(s) {
|
|
11312
11313
|
return e.enter("paragraph"), i(s);
|
|
@@ -11444,7 +11445,7 @@ function E9(e) {
|
|
|
11444
11445
|
}
|
|
11445
11446
|
}
|
|
11446
11447
|
function y9(e, t, n) {
|
|
11447
|
-
return
|
|
11448
|
+
return Ye(e, e.attempt(this.parser.constructs.document, t, n), "linePrefix", this.parser.constructs.disable.null.includes("codeIndented") ? void 0 : 4);
|
|
11448
11449
|
}
|
|
11449
11450
|
function wi(e) {
|
|
11450
11451
|
if (e === null || dt(e) || za(e))
|
|
@@ -11584,7 +11585,7 @@ const rs = {
|
|
|
11584
11585
|
function A9(e, t, n) {
|
|
11585
11586
|
return r;
|
|
11586
11587
|
function r(i) {
|
|
11587
|
-
return Xe(i) ?
|
|
11588
|
+
return Xe(i) ? Ye(e, a, "linePrefix")(i) : a(i);
|
|
11588
11589
|
}
|
|
11589
11590
|
function a(i) {
|
|
11590
11591
|
return i === null || Ae(i) ? t(i) : n(i);
|
|
@@ -11618,7 +11619,7 @@ function x9(e, t, n) {
|
|
|
11618
11619
|
const r = this;
|
|
11619
11620
|
return a;
|
|
11620
11621
|
function a(o) {
|
|
11621
|
-
return Xe(o) ?
|
|
11622
|
+
return Xe(o) ? Ye(e, i, "linePrefix", r.parser.constructs.disable.null.includes("codeIndented") ? void 0 : 4)(o) : i(o);
|
|
11622
11623
|
}
|
|
11623
11624
|
function i(o) {
|
|
11624
11625
|
return e.attempt(vk, t, n)(o);
|
|
@@ -11688,7 +11689,7 @@ function C9(e, t, n) {
|
|
|
11688
11689
|
return i = C && C[1].type === "linePrefix" ? C[2].sliceSerialize(C[1], !0).length : 0, s = S, e.enter("codeFenced"), e.enter("codeFencedFence"), e.enter("codeFencedFenceSequence"), c(S);
|
|
11689
11690
|
}
|
|
11690
11691
|
function c(S) {
|
|
11691
|
-
return S === s ? (o++, e.consume(S), c) : o < 3 ? n(S) : (e.exit("codeFencedFenceSequence"), Xe(S) ?
|
|
11692
|
+
return S === s ? (o++, e.consume(S), c) : o < 3 ? n(S) : (e.exit("codeFencedFenceSequence"), Xe(S) ? Ye(e, d, "whitespace")(S) : d(S));
|
|
11692
11693
|
}
|
|
11693
11694
|
function d(S) {
|
|
11694
11695
|
return S === null || Ae(S) ? (e.exit("codeFencedFence"), r.interrupt ? t(S) : e.check(zy, g, k)(S)) : (e.enter("codeFencedFenceInfo"), e.enter("chunkString", {
|
|
@@ -11696,7 +11697,7 @@ function C9(e, t, n) {
|
|
|
11696
11697
|
}), p(S));
|
|
11697
11698
|
}
|
|
11698
11699
|
function p(S) {
|
|
11699
|
-
return S === null || Ae(S) ? (e.exit("chunkString"), e.exit("codeFencedFenceInfo"), d(S)) : Xe(S) ? (e.exit("chunkString"), e.exit("codeFencedFenceInfo"),
|
|
11700
|
+
return S === null || Ae(S) ? (e.exit("chunkString"), e.exit("codeFencedFenceInfo"), d(S)) : Xe(S) ? (e.exit("chunkString"), e.exit("codeFencedFenceInfo"), Ye(e, f, "whitespace")(S)) : S === 96 && S === s ? n(S) : (e.consume(S), p);
|
|
11700
11701
|
}
|
|
11701
11702
|
function f(S) {
|
|
11702
11703
|
return S === null || Ae(S) ? d(S) : (e.enter("codeFencedFenceMeta"), e.enter("chunkString", {
|
|
@@ -11713,7 +11714,7 @@ function C9(e, t, n) {
|
|
|
11713
11714
|
return e.enter("lineEnding"), e.consume(S), e.exit("lineEnding"), v;
|
|
11714
11715
|
}
|
|
11715
11716
|
function v(S) {
|
|
11716
|
-
return i > 0 && Xe(S) ?
|
|
11717
|
+
return i > 0 && Xe(S) ? Ye(e, y, "linePrefix", i + 1)(S) : y(S);
|
|
11717
11718
|
}
|
|
11718
11719
|
function y(S) {
|
|
11719
11720
|
return S === null || Ae(S) ? e.check(zy, g, k)(S) : (e.enter("codeFlowValue"), _(S));
|
|
@@ -11731,13 +11732,13 @@ function C9(e, t, n) {
|
|
|
11731
11732
|
return S.enter("lineEnding"), S.consume(ee), S.exit("lineEnding"), z;
|
|
11732
11733
|
}
|
|
11733
11734
|
function z(ee) {
|
|
11734
|
-
return S.enter("codeFencedFence"), Xe(ee) ?
|
|
11735
|
+
return S.enter("codeFencedFence"), Xe(ee) ? Ye(S, G, "linePrefix", r.parser.constructs.disable.null.includes("codeIndented") ? void 0 : 4)(ee) : G(ee);
|
|
11735
11736
|
}
|
|
11736
11737
|
function G(ee) {
|
|
11737
11738
|
return ee === s ? (S.enter("codeFencedFenceSequence"), X(ee)) : M(ee);
|
|
11738
11739
|
}
|
|
11739
11740
|
function X(ee) {
|
|
11740
|
-
return ee === s ? (O++, S.consume(ee), X) : O >= o ? (S.exit("codeFencedFenceSequence"), Xe(ee) ?
|
|
11741
|
+
return ee === s ? (O++, S.consume(ee), X) : O >= o ? (S.exit("codeFencedFenceSequence"), Xe(ee) ? Ye(S, Y, "whitespace")(ee) : Y(ee)) : M(ee);
|
|
11741
11742
|
}
|
|
11742
11743
|
function Y(ee) {
|
|
11743
11744
|
return ee === null || Ae(ee) ? (S.exit("codeFencedFence"), C(ee)) : M(ee);
|
|
@@ -11765,7 +11766,7 @@ function D9(e, t, n) {
|
|
|
11765
11766
|
const r = this;
|
|
11766
11767
|
return a;
|
|
11767
11768
|
function a(u) {
|
|
11768
|
-
return e.enter("codeIndented"),
|
|
11769
|
+
return e.enter("codeIndented"), Ye(e, i, "linePrefix", 5)(u);
|
|
11769
11770
|
}
|
|
11770
11771
|
function i(u) {
|
|
11771
11772
|
const c = r.events[r.events.length - 1];
|
|
@@ -11785,7 +11786,7 @@ function L9(e, t, n) {
|
|
|
11785
11786
|
const r = this;
|
|
11786
11787
|
return a;
|
|
11787
11788
|
function a(o) {
|
|
11788
|
-
return r.parser.lazy[r.now().line] ? n(o) : Ae(o) ? (e.enter("lineEnding"), e.consume(o), e.exit("lineEnding"), a) :
|
|
11789
|
+
return r.parser.lazy[r.now().line] ? n(o) : Ae(o) ? (e.enter("lineEnding"), e.consume(o), e.exit("lineEnding"), a) : Ye(e, i, "linePrefix", 5)(o);
|
|
11789
11790
|
}
|
|
11790
11791
|
function i(o) {
|
|
11791
11792
|
const s = r.events[r.events.length - 1];
|
|
@@ -12089,7 +12090,7 @@ function V9(e, t, n) {
|
|
|
12089
12090
|
const r = this;
|
|
12090
12091
|
return a;
|
|
12091
12092
|
function a(o) {
|
|
12092
|
-
return e.exit("chunkContent"), e.enter("lineEnding"), e.consume(o), e.exit("lineEnding"),
|
|
12093
|
+
return e.exit("chunkContent"), e.enter("lineEnding"), e.consume(o), e.exit("lineEnding"), Ye(e, i, "linePrefix");
|
|
12093
12094
|
}
|
|
12094
12095
|
function i(o) {
|
|
12095
12096
|
if (o === null || Ae(o))
|
|
@@ -12159,7 +12160,7 @@ function xk(e, t, n, r, a, i) {
|
|
|
12159
12160
|
return p === o ? (e.enter(a), e.consume(p), e.exit(a), e.exit(r), t) : (e.enter(i), u(p));
|
|
12160
12161
|
}
|
|
12161
12162
|
function u(p) {
|
|
12162
|
-
return p === o ? (e.exit(i), l(o)) : p === null ? n(p) : Ae(p) ? (e.enter("lineEnding"), e.consume(p), e.exit("lineEnding"),
|
|
12163
|
+
return p === o ? (e.exit(i), l(o)) : p === null ? n(p) : Ae(p) ? (e.enter("lineEnding"), e.consume(p), e.exit("lineEnding"), Ye(e, u, "linePrefix")) : (e.enter("chunkString", {
|
|
12163
12164
|
contentType: "string"
|
|
12164
12165
|
}), c(p));
|
|
12165
12166
|
}
|
|
@@ -12174,7 +12175,7 @@ function To(e, t) {
|
|
|
12174
12175
|
let n;
|
|
12175
12176
|
return r;
|
|
12176
12177
|
function r(a) {
|
|
12177
|
-
return Ae(a) ? (e.enter("lineEnding"), e.consume(a), e.exit("lineEnding"), n = !0, r) : Xe(a) ?
|
|
12178
|
+
return Ae(a) ? (e.enter("lineEnding"), e.consume(a), e.exit("lineEnding"), n = !0, r) : Xe(a) ? Ye(e, r, n ? "linePrefix" : "lineSuffix")(a) : t(a);
|
|
12178
12179
|
}
|
|
12179
12180
|
}
|
|
12180
12181
|
const W9 = {
|
|
@@ -12226,7 +12227,7 @@ function Y9(e, t, n) {
|
|
|
12226
12227
|
return e.attempt(j9, d, d)(f);
|
|
12227
12228
|
}
|
|
12228
12229
|
function d(f) {
|
|
12229
|
-
return Xe(f) ?
|
|
12230
|
+
return Xe(f) ? Ye(e, p, "whitespace")(f) : p(f);
|
|
12230
12231
|
}
|
|
12231
12232
|
function p(f) {
|
|
12232
12233
|
return f === null || Ae(f) ? (e.exit("definition"), r.parser.defined.push(a), t(f)) : n(f);
|
|
@@ -12241,7 +12242,7 @@ function K9(e, t, n) {
|
|
|
12241
12242
|
return xk(e, i, n, "definitionTitle", "definitionTitleMarker", "definitionTitleString")(s);
|
|
12242
12243
|
}
|
|
12243
12244
|
function i(s) {
|
|
12244
|
-
return Xe(s) ?
|
|
12245
|
+
return Xe(s) ? Ye(e, o, "whitespace")(s) : o(s);
|
|
12245
12246
|
}
|
|
12246
12247
|
function o(s) {
|
|
12247
12248
|
return s === null || Ae(s) ? t(s) : n(s);
|
|
@@ -12291,7 +12292,7 @@ function eP(e, t, n) {
|
|
|
12291
12292
|
return c === 35 && r++ < 6 ? (e.consume(c), o) : c === null || dt(c) ? (e.exit("atxHeadingSequence"), s(c)) : n(c);
|
|
12292
12293
|
}
|
|
12293
12294
|
function s(c) {
|
|
12294
|
-
return c === 35 ? (e.enter("atxHeadingSequence"), l(c)) : c === null || Ae(c) ? (e.exit("atxHeading"), t(c)) : Xe(c) ?
|
|
12295
|
+
return c === 35 ? (e.enter("atxHeadingSequence"), l(c)) : c === null || Ae(c) ? (e.exit("atxHeading"), t(c)) : Xe(c) ? Ye(e, s, "whitespace")(c) : (e.enter("atxHeadingText"), u(c));
|
|
12295
12296
|
}
|
|
12296
12297
|
function l(c) {
|
|
12297
12298
|
return c === 35 ? (e.consume(c), l) : (e.exit("atxHeadingSequence"), s(c));
|
|
@@ -12592,7 +12593,7 @@ function cP(e, t, n) {
|
|
|
12592
12593
|
return e.exit("htmlTextData"), e.enter("lineEnding"), e.consume(w), e.exit("lineEnding"), Q;
|
|
12593
12594
|
}
|
|
12594
12595
|
function Q(w) {
|
|
12595
|
-
return Xe(w) ?
|
|
12596
|
+
return Xe(w) ? Ye(e, he, "linePrefix", r.parser.constructs.disable.null.includes("codeIndented") ? void 0 : 4)(w) : he(w);
|
|
12596
12597
|
}
|
|
12597
12598
|
function he(w) {
|
|
12598
12599
|
return e.enter("htmlTextData"), o(w);
|
|
@@ -12779,7 +12780,7 @@ const ju = {
|
|
|
12779
12780
|
function AP(e, t) {
|
|
12780
12781
|
return n;
|
|
12781
12782
|
function n(r) {
|
|
12782
|
-
return e.enter("lineEnding"), e.consume(r), e.exit("lineEnding"),
|
|
12783
|
+
return e.enter("lineEnding"), e.consume(r), e.exit("lineEnding"), Ye(e, t, "linePrefix");
|
|
12783
12784
|
}
|
|
12784
12785
|
}
|
|
12785
12786
|
const tl = {
|
|
@@ -12799,7 +12800,7 @@ function wP(e, t, n) {
|
|
|
12799
12800
|
return u === a ? (e.enter("thematicBreakSequence"), l(u)) : r >= 3 && (u === null || Ae(u)) ? (e.exit("thematicBreak"), t(u)) : n(u);
|
|
12800
12801
|
}
|
|
12801
12802
|
function l(u) {
|
|
12802
|
-
return u === a ? (e.consume(u), r++, l) : (e.exit("thematicBreakSequence"), Xe(u) ?
|
|
12803
|
+
return u === a ? (e.consume(u), r++, l) : (e.exit("thematicBreakSequence"), Xe(u) ? Ye(e, s, "whitespace")(u) : s(u));
|
|
12803
12804
|
}
|
|
12804
12805
|
}
|
|
12805
12806
|
const kn = {
|
|
@@ -12857,18 +12858,18 @@ function RP(e, t, n) {
|
|
|
12857
12858
|
const r = this;
|
|
12858
12859
|
return r.containerState._closeFlow = void 0, e.check(rs, a, i);
|
|
12859
12860
|
function a(s) {
|
|
12860
|
-
return r.containerState.furtherBlankLines = r.containerState.furtherBlankLines || r.containerState.initialBlankLine,
|
|
12861
|
+
return r.containerState.furtherBlankLines = r.containerState.furtherBlankLines || r.containerState.initialBlankLine, Ye(e, t, "listItemIndent", r.containerState.size + 1)(s);
|
|
12861
12862
|
}
|
|
12862
12863
|
function i(s) {
|
|
12863
12864
|
return r.containerState.furtherBlankLines || !Xe(s) ? (r.containerState.furtherBlankLines = void 0, r.containerState.initialBlankLine = void 0, o(s)) : (r.containerState.furtherBlankLines = void 0, r.containerState.initialBlankLine = void 0, e.attempt(kP, t, o)(s));
|
|
12864
12865
|
}
|
|
12865
12866
|
function o(s) {
|
|
12866
|
-
return r.containerState._closeFlow = !0, r.interrupt = void 0,
|
|
12867
|
+
return r.containerState._closeFlow = !0, r.interrupt = void 0, Ye(e, e.attempt(kn, t, n), "linePrefix", r.parser.constructs.disable.null.includes("codeIndented") ? void 0 : 4)(s);
|
|
12867
12868
|
}
|
|
12868
12869
|
}
|
|
12869
12870
|
function CP(e, t, n) {
|
|
12870
12871
|
const r = this;
|
|
12871
|
-
return
|
|
12872
|
+
return Ye(e, a, "listItemIndent", r.containerState.size + 1);
|
|
12872
12873
|
function a(i) {
|
|
12873
12874
|
const o = r.events[r.events.length - 1];
|
|
12874
12875
|
return o && o[1].type === "listItemIndent" && o[2].sliceSerialize(o[1], !0).length === r.containerState.size ? t(i) : n(i);
|
|
@@ -12879,7 +12880,7 @@ function IP(e) {
|
|
|
12879
12880
|
}
|
|
12880
12881
|
function OP(e, t, n) {
|
|
12881
12882
|
const r = this;
|
|
12882
|
-
return
|
|
12883
|
+
return Ye(e, a, "listItemPrefixWhitespace", r.parser.constructs.disable.null.includes("codeIndented") ? void 0 : 5);
|
|
12883
12884
|
function a(i) {
|
|
12884
12885
|
const o = r.events[r.events.length - 1];
|
|
12885
12886
|
return !Xe(i) && o && o[1].type === "listItemPrefixWhitespace" ? t(i) : n(i);
|
|
@@ -12931,7 +12932,7 @@ function LP(e, t, n) {
|
|
|
12931
12932
|
return e.enter("setextHeadingLineSequence"), s(u);
|
|
12932
12933
|
}
|
|
12933
12934
|
function s(u) {
|
|
12934
|
-
return u === a ? (e.consume(u), s) : (e.exit("setextHeadingLineSequence"), Xe(u) ?
|
|
12935
|
+
return u === a ? (e.consume(u), s) : (e.exit("setextHeadingLineSequence"), Xe(u) ? Ye(e, l, "lineSuffix")(u) : l(u));
|
|
12935
12936
|
}
|
|
12936
12937
|
function l(u) {
|
|
12937
12938
|
return u === null || Ae(u) ? (e.exit("setextHeadingLine"), t(u)) : n(u);
|
|
@@ -12946,7 +12947,7 @@ function PP(e) {
|
|
|
12946
12947
|
rs,
|
|
12947
12948
|
r,
|
|
12948
12949
|
// Try to parse initial flow (essentially, only code).
|
|
12949
|
-
e.attempt(this.parser.constructs.flowInitial, a,
|
|
12950
|
+
e.attempt(this.parser.constructs.flowInitial, a, Ye(e, e.attempt(this.parser.constructs.flow, a, e.attempt(z9, a)), "linePrefix"))
|
|
12950
12951
|
);
|
|
12951
12952
|
return n;
|
|
12952
12953
|
function r(i) {
|
|
@@ -65865,10 +65866,10 @@ class XX {
|
|
|
65865
65866
|
this.isEol = !1;
|
|
65866
65867
|
}
|
|
65867
65868
|
}
|
|
65868
|
-
var
|
|
65869
|
+
var je;
|
|
65869
65870
|
(function(e) {
|
|
65870
65871
|
e[e.CHARACTER = 0] = "CHARACTER", e[e.NULL_CHARACTER = 1] = "NULL_CHARACTER", e[e.WHITESPACE_CHARACTER = 2] = "WHITESPACE_CHARACTER", e[e.START_TAG = 3] = "START_TAG", e[e.END_TAG = 4] = "END_TAG", e[e.COMMENT = 5] = "COMMENT", e[e.DOCTYPE = 6] = "DOCTYPE", e[e.EOF = 7] = "EOF", e[e.HIBERNATION = 8] = "HIBERNATION";
|
|
65871
|
-
})(
|
|
65872
|
+
})(je || (je = {}));
|
|
65872
65873
|
function GR(e, t) {
|
|
65873
65874
|
for (let n = e.attrs.length - 1; n >= 0; n--)
|
|
65874
65875
|
if (e.attrs[n].name === t)
|
|
@@ -66506,7 +66507,7 @@ class dZ {
|
|
|
66506
66507
|
//Token creation
|
|
66507
66508
|
_createStartTagToken() {
|
|
66508
66509
|
this.currentToken = {
|
|
66509
|
-
type:
|
|
66510
|
+
type: je.START_TAG,
|
|
66510
66511
|
tagName: "",
|
|
66511
66512
|
tagID: h.UNKNOWN,
|
|
66512
66513
|
selfClosing: !1,
|
|
@@ -66517,7 +66518,7 @@ class dZ {
|
|
|
66517
66518
|
}
|
|
66518
66519
|
_createEndTagToken() {
|
|
66519
66520
|
this.currentToken = {
|
|
66520
|
-
type:
|
|
66521
|
+
type: je.END_TAG,
|
|
66521
66522
|
tagName: "",
|
|
66522
66523
|
tagID: h.UNKNOWN,
|
|
66523
66524
|
selfClosing: !1,
|
|
@@ -66528,14 +66529,14 @@ class dZ {
|
|
|
66528
66529
|
}
|
|
66529
66530
|
_createCommentToken(t) {
|
|
66530
66531
|
this.currentToken = {
|
|
66531
|
-
type:
|
|
66532
|
+
type: je.COMMENT,
|
|
66532
66533
|
data: "",
|
|
66533
66534
|
location: this.getCurrentLocation(t)
|
|
66534
66535
|
};
|
|
66535
66536
|
}
|
|
66536
66537
|
_createDoctypeToken(t) {
|
|
66537
66538
|
this.currentToken = {
|
|
66538
|
-
type:
|
|
66539
|
+
type: je.DOCTYPE,
|
|
66539
66540
|
name: t,
|
|
66540
66541
|
forceQuirks: !1,
|
|
66541
66542
|
publicId: null,
|
|
@@ -66577,7 +66578,7 @@ class dZ {
|
|
|
66577
66578
|
}
|
|
66578
66579
|
emitCurrentTagToken() {
|
|
66579
66580
|
const t = this.currentToken;
|
|
66580
|
-
this.prepareToken(t), t.tagID = Gi(t.tagName), t.type ===
|
|
66581
|
+
this.prepareToken(t), t.tagID = Gi(t.tagName), t.type === je.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();
|
|
66581
66582
|
}
|
|
66582
66583
|
emitCurrentComment(t) {
|
|
66583
66584
|
this.prepareToken(t), this.handler.onComment(t), this.preprocessor.dropParsedChunk();
|
|
@@ -66588,15 +66589,15 @@ class dZ {
|
|
|
66588
66589
|
_emitCurrentCharacterToken(t) {
|
|
66589
66590
|
if (this.currentCharacterToken) {
|
|
66590
66591
|
switch (t && this.currentCharacterToken.location && (this.currentCharacterToken.location.endLine = t.startLine, this.currentCharacterToken.location.endCol = t.startCol, this.currentCharacterToken.location.endOffset = t.startOffset), this.currentCharacterToken.type) {
|
|
66591
|
-
case
|
|
66592
|
+
case je.CHARACTER: {
|
|
66592
66593
|
this.handler.onCharacter(this.currentCharacterToken);
|
|
66593
66594
|
break;
|
|
66594
66595
|
}
|
|
66595
|
-
case
|
|
66596
|
+
case je.NULL_CHARACTER: {
|
|
66596
66597
|
this.handler.onNullCharacter(this.currentCharacterToken);
|
|
66597
66598
|
break;
|
|
66598
66599
|
}
|
|
66599
|
-
case
|
|
66600
|
+
case je.WHITESPACE_CHARACTER: {
|
|
66600
66601
|
this.handler.onWhitespaceCharacter(this.currentCharacterToken);
|
|
66601
66602
|
break;
|
|
66602
66603
|
}
|
|
@@ -66606,7 +66607,7 @@ class dZ {
|
|
|
66606
66607
|
}
|
|
66607
66608
|
_emitEOFToken() {
|
|
66608
66609
|
const t = this.getCurrentLocation(0);
|
|
66609
|
-
t && (t.endLine = t.startLine, t.endCol = t.startCol, t.endOffset = t.startOffset), this._emitCurrentCharacterToken(t), this.handler.onEof({ type:
|
|
66610
|
+
t && (t.endLine = t.startLine, t.endCol = t.startCol, t.endOffset = t.startOffset), this._emitCurrentCharacterToken(t), this.handler.onEof({ type: je.EOF, location: t }), this.active = !1;
|
|
66610
66611
|
}
|
|
66611
66612
|
//Characters emission
|
|
66612
66613
|
//OPTIMIZATION: The specification uses only one type of character token (one token per character).
|
|
@@ -66627,13 +66628,13 @@ class dZ {
|
|
|
66627
66628
|
this._createCharacterToken(t, n);
|
|
66628
66629
|
}
|
|
66629
66630
|
_emitCodePoint(t) {
|
|
66630
|
-
const n = VR(t) ?
|
|
66631
|
+
const n = VR(t) ? je.WHITESPACE_CHARACTER : t === R.NULL ? je.NULL_CHARACTER : je.CHARACTER;
|
|
66631
66632
|
this._appendCharToCurrentCharacterToken(n, String.fromCodePoint(t));
|
|
66632
66633
|
}
|
|
66633
66634
|
//NOTE: used when we emit characters explicitly.
|
|
66634
66635
|
//This is always for non-whitespace and non-null characters, which allows us to avoid additional checks.
|
|
66635
66636
|
_emitChars(t) {
|
|
66636
|
-
this._appendCharToCurrentCharacterToken(
|
|
66637
|
+
this._appendCharToCurrentCharacterToken(je.CHARACTER, t);
|
|
66637
66638
|
}
|
|
66638
66639
|
// Character reference helpers
|
|
66639
66640
|
_startCharacterReference() {
|
|
@@ -69295,7 +69296,7 @@ class o4 {
|
|
|
69295
69296
|
const r = n.location, a = this.treeAdapter.getTagName(t), i = (
|
|
69296
69297
|
// NOTE: For cases like <p> <p> </p> - First 'p' closes without a closing
|
|
69297
69298
|
// tag and for cases like <td> <p> </td> - 'p' closes without a closing tag.
|
|
69298
|
-
n.type ===
|
|
69299
|
+
n.type === je.END_TAG && a === n.tagName ? {
|
|
69299
69300
|
endTag: { ...r },
|
|
69300
69301
|
endLine: r.endLine,
|
|
69301
69302
|
endCol: r.endCol,
|
|
@@ -69324,35 +69325,35 @@ class o4 {
|
|
|
69324
69325
|
/** @protected */
|
|
69325
69326
|
_processToken(t) {
|
|
69326
69327
|
switch (t.type) {
|
|
69327
|
-
case
|
|
69328
|
+
case je.CHARACTER: {
|
|
69328
69329
|
this.onCharacter(t);
|
|
69329
69330
|
break;
|
|
69330
69331
|
}
|
|
69331
|
-
case
|
|
69332
|
+
case je.NULL_CHARACTER: {
|
|
69332
69333
|
this.onNullCharacter(t);
|
|
69333
69334
|
break;
|
|
69334
69335
|
}
|
|
69335
|
-
case
|
|
69336
|
+
case je.COMMENT: {
|
|
69336
69337
|
this.onComment(t);
|
|
69337
69338
|
break;
|
|
69338
69339
|
}
|
|
69339
|
-
case
|
|
69340
|
+
case je.DOCTYPE: {
|
|
69340
69341
|
this.onDoctype(t);
|
|
69341
69342
|
break;
|
|
69342
69343
|
}
|
|
69343
|
-
case
|
|
69344
|
+
case je.START_TAG: {
|
|
69344
69345
|
this._processStartTag(t);
|
|
69345
69346
|
break;
|
|
69346
69347
|
}
|
|
69347
|
-
case
|
|
69348
|
+
case je.END_TAG: {
|
|
69348
69349
|
this.onEndTag(t);
|
|
69349
69350
|
break;
|
|
69350
69351
|
}
|
|
69351
|
-
case
|
|
69352
|
+
case je.EOF: {
|
|
69352
69353
|
this.onEof(t);
|
|
69353
69354
|
break;
|
|
69354
69355
|
}
|
|
69355
|
-
case
|
|
69356
|
+
case je.WHITESPACE_CHARACTER: {
|
|
69356
69357
|
this.onWhitespaceCharacter(t);
|
|
69357
69358
|
break;
|
|
69358
69359
|
}
|
|
@@ -70227,7 +70228,7 @@ function rQ(e, t) {
|
|
|
70227
70228
|
}
|
|
70228
70229
|
}
|
|
70229
70230
|
function ko(e, t) {
|
|
70230
|
-
const n = t.type ===
|
|
70231
|
+
const n = t.type === je.EOF ? j.openElementsLeftAfterEof : j.disallowedContentInNoscriptInHead;
|
|
70231
70232
|
e._err(t, n), e.openElements.pop(), e.insertionMode = B.IN_HEAD, e._processToken(t);
|
|
70232
70233
|
}
|
|
70233
70234
|
function aQ(e, t) {
|
|
@@ -70286,27 +70287,27 @@ function No(e, t) {
|
|
|
70286
70287
|
}
|
|
70287
70288
|
function pu(e, t) {
|
|
70288
70289
|
switch (t.type) {
|
|
70289
|
-
case
|
|
70290
|
+
case je.CHARACTER: {
|
|
70290
70291
|
eC(e, t);
|
|
70291
70292
|
break;
|
|
70292
70293
|
}
|
|
70293
|
-
case
|
|
70294
|
+
case je.WHITESPACE_CHARACTER: {
|
|
70294
70295
|
JR(e, t);
|
|
70295
70296
|
break;
|
|
70296
70297
|
}
|
|
70297
|
-
case
|
|
70298
|
+
case je.COMMENT: {
|
|
70298
70299
|
xg(e, t);
|
|
70299
70300
|
break;
|
|
70300
70301
|
}
|
|
70301
|
-
case
|
|
70302
|
+
case je.START_TAG: {
|
|
70302
70303
|
bn(e, t);
|
|
70303
70304
|
break;
|
|
70304
70305
|
}
|
|
70305
|
-
case
|
|
70306
|
+
case je.END_TAG: {
|
|
70306
70307
|
fu(e, t);
|
|
70307
70308
|
break;
|
|
70308
70309
|
}
|
|
70309
|
-
case
|
|
70310
|
+
case je.EOF: {
|
|
70310
70311
|
aC(e, t);
|
|
70311
70312
|
break;
|
|
70312
70313
|
}
|
|
@@ -70803,11 +70804,11 @@ function VQ(e, t) {
|
|
|
70803
70804
|
function om(e, t) {
|
|
70804
70805
|
if (e.openElements.currentTagId !== void 0 && QR.has(e.openElements.currentTagId))
|
|
70805
70806
|
switch (e.pendingCharacterTokens.length = 0, e.hasNonWhitespacePendingCharacterToken = !1, e.originalInsertionMode = e.insertionMode, e.insertionMode = B.IN_TABLE_TEXT, t.type) {
|
|
70806
|
-
case
|
|
70807
|
+
case je.CHARACTER: {
|
|
70807
70808
|
oC(e, t);
|
|
70808
70809
|
break;
|
|
70809
70810
|
}
|
|
70810
|
-
case
|
|
70811
|
+
case je.WHITESPACE_CHARACTER: {
|
|
70811
70812
|
iC(e, t);
|
|
70812
70813
|
break;
|
|
70813
70814
|
}
|
|
@@ -71396,7 +71397,7 @@ function _J(e, t) {
|
|
|
71396
71397
|
function AJ(e, t) {
|
|
71397
71398
|
t.parser.tokenizer.state > 4 && (t.parser.tokenizer.state = 0);
|
|
71398
71399
|
const n = {
|
|
71399
|
-
type:
|
|
71400
|
+
type: je.CHARACTER,
|
|
71400
71401
|
chars: e.value,
|
|
71401
71402
|
location: fs(e)
|
|
71402
71403
|
};
|
|
@@ -71404,7 +71405,7 @@ function AJ(e, t) {
|
|
|
71404
71405
|
}
|
|
71405
71406
|
function wJ(e, t) {
|
|
71406
71407
|
const n = {
|
|
71407
|
-
type:
|
|
71408
|
+
type: je.DOCTYPE,
|
|
71408
71409
|
name: "html",
|
|
71409
71410
|
forceQuirks: !1,
|
|
71410
71411
|
publicId: "",
|
|
@@ -71427,7 +71428,7 @@ function xJ(e, t) {
|
|
|
71427
71428
|
}
|
|
71428
71429
|
function gC(e, t) {
|
|
71429
71430
|
const n = e.value, r = {
|
|
71430
|
-
type:
|
|
71431
|
+
type: je.COMMENT,
|
|
71431
71432
|
data: n,
|
|
71432
71433
|
location: fs(e)
|
|
71433
71434
|
};
|
|
@@ -71486,7 +71487,7 @@ function RJ(e, t) {
|
|
|
71486
71487
|
{ ...e, children: [] },
|
|
71487
71488
|
{ space: a === xr.svg ? "svg" : "html" }
|
|
71488
71489
|
), o = {
|
|
71489
|
-
type:
|
|
71490
|
+
type: je.START_TAG,
|
|
71490
71491
|
tagName: n,
|
|
71491
71492
|
tagID: Gi(n),
|
|
71492
71493
|
// We always send start and end tags.
|
|
@@ -71504,7 +71505,7 @@ function CJ(e, t) {
|
|
|
71504
71505
|
if (!t.parser.tokenizer.inForeignNode && VX.includes(n) || t.parser.tokenizer.state === Ut.PLAINTEXT) return;
|
|
71505
71506
|
Vi(t, Zl(e));
|
|
71506
71507
|
const r = {
|
|
71507
|
-
type:
|
|
71508
|
+
type: je.END_TAG,
|
|
71508
71509
|
tagName: n,
|
|
71509
71510
|
tagID: Gi(n),
|
|
71510
71511
|
selfClosing: !1,
|
|
@@ -73109,7 +73110,7 @@ function Ate(e, t, n) {
|
|
|
73109
73110
|
return b === 91 || b === 92 || b === 93 ? (e.consume(b), o++, c) : c(b);
|
|
73110
73111
|
}
|
|
73111
73112
|
function p(b) {
|
|
73112
|
-
return b === 58 ? (e.enter("definitionMarker"), e.consume(b), e.exit("definitionMarker"), a.includes(i) || a.push(i),
|
|
73113
|
+
return b === 58 ? (e.enter("definitionMarker"), e.consume(b), e.exit("definitionMarker"), a.includes(i) || a.push(i), Ye(e, f, "gfmFootnoteDefinitionWhitespace")) : n(b);
|
|
73113
73114
|
}
|
|
73114
73115
|
function f(b) {
|
|
73115
73116
|
return t(b);
|
|
@@ -73123,7 +73124,7 @@ function xte(e) {
|
|
|
73123
73124
|
}
|
|
73124
73125
|
function kte(e, t, n) {
|
|
73125
73126
|
const r = this;
|
|
73126
|
-
return
|
|
73127
|
+
return Ye(e, a, "gfmFootnoteDefinitionIndent", 5);
|
|
73127
73128
|
function a(i) {
|
|
73128
73129
|
const o = r.events[r.events.length - 1];
|
|
73129
73130
|
return o && o[1].type === "gfmFootnoteDefinitionIndent" && o[2].sliceSerialize(o[1], !0).length === 4 ? t(i) : n(i);
|
|
@@ -73311,7 +73312,7 @@ function Dte(e, t, n) {
|
|
|
73311
73312
|
return L === 124 || (o = !0, i += 1), c(L);
|
|
73312
73313
|
}
|
|
73313
73314
|
function c(L) {
|
|
73314
|
-
return L === null ? n(L) : Ae(L) ? i > 1 ? (i = 0, r.interrupt = !0, e.exit("tableRow"), e.enter("lineEnding"), e.consume(L), e.exit("lineEnding"), f) : n(L) : Xe(L) ?
|
|
73315
|
+
return L === null ? n(L) : Ae(L) ? i > 1 ? (i = 0, r.interrupt = !0, e.exit("tableRow"), e.enter("lineEnding"), e.consume(L), e.exit("lineEnding"), f) : n(L) : Xe(L) ? Ye(e, c, "whitespace")(L) : (i += 1, o && (o = !1, a += 1), L === 124 ? (e.enter("tableCellDivider"), e.consume(L), e.exit("tableCellDivider"), o = !0, c) : (e.enter("data"), d(L)));
|
|
73315
73316
|
}
|
|
73316
73317
|
function d(L) {
|
|
73317
73318
|
return L === null || L === 124 || dt(L) ? (e.exit("data"), c(L)) : (e.consume(L), L === 92 ? p : d);
|
|
@@ -73320,13 +73321,13 @@ function Dte(e, t, n) {
|
|
|
73320
73321
|
return L === 92 || L === 124 ? (e.consume(L), d) : d(L);
|
|
73321
73322
|
}
|
|
73322
73323
|
function f(L) {
|
|
73323
|
-
return r.interrupt = !1, r.parser.lazy[r.now().line] ? n(L) : (e.enter("tableDelimiterRow"), o = !1, Xe(L) ?
|
|
73324
|
+
return r.interrupt = !1, r.parser.lazy[r.now().line] ? n(L) : (e.enter("tableDelimiterRow"), o = !1, Xe(L) ? Ye(e, b, "linePrefix", r.parser.constructs.disable.null.includes("codeIndented") ? void 0 : 4)(L) : b(L));
|
|
73324
73325
|
}
|
|
73325
73326
|
function b(L) {
|
|
73326
73327
|
return L === 45 || L === 58 ? T(L) : L === 124 ? (o = !0, e.enter("tableCellDivider"), e.consume(L), e.exit("tableCellDivider"), g) : N(L);
|
|
73327
73328
|
}
|
|
73328
73329
|
function g(L) {
|
|
73329
|
-
return Xe(L) ?
|
|
73330
|
+
return Xe(L) ? Ye(e, T, "whitespace")(L) : T(L);
|
|
73330
73331
|
}
|
|
73331
73332
|
function T(L) {
|
|
73332
73333
|
return L === 58 ? (i += 1, o = !0, e.enter("tableDelimiterMarker"), e.consume(L), e.exit("tableDelimiterMarker"), v) : L === 45 ? (i += 1, v(L)) : L === null || Ae(L) ? k(L) : N(L);
|
|
@@ -73338,7 +73339,7 @@ function Dte(e, t, n) {
|
|
|
73338
73339
|
return L === 45 ? (e.consume(L), y) : L === 58 ? (o = !0, e.exit("tableDelimiterFiller"), e.enter("tableDelimiterMarker"), e.consume(L), e.exit("tableDelimiterMarker"), _) : (e.exit("tableDelimiterFiller"), _(L));
|
|
73339
73340
|
}
|
|
73340
73341
|
function _(L) {
|
|
73341
|
-
return Xe(L) ?
|
|
73342
|
+
return Xe(L) ? Ye(e, k, "whitespace")(L) : k(L);
|
|
73342
73343
|
}
|
|
73343
73344
|
function k(L) {
|
|
73344
73345
|
return L === 124 ? b(L) : L === null || Ae(L) ? !o || a !== i ? N(L) : (e.exit("tableDelimiterRow"), e.exit("tableHead"), t(L)) : N(L);
|
|
@@ -73350,7 +73351,7 @@ function Dte(e, t, n) {
|
|
|
73350
73351
|
return e.enter("tableRow"), C(L);
|
|
73351
73352
|
}
|
|
73352
73353
|
function C(L) {
|
|
73353
|
-
return L === 124 ? (e.enter("tableCellDivider"), e.consume(L), e.exit("tableCellDivider"), C) : L === null || Ae(L) ? (e.exit("tableRow"), t(L)) : Xe(L) ?
|
|
73354
|
+
return L === 124 ? (e.enter("tableCellDivider"), e.consume(L), e.exit("tableCellDivider"), C) : L === null || Ae(L) ? (e.exit("tableRow"), t(L)) : Xe(L) ? Ye(e, C, "whitespace")(L) : (e.enter("data"), M(L));
|
|
73354
73355
|
}
|
|
73355
73356
|
function M(L) {
|
|
73356
73357
|
return L === null || L === 124 || dt(L) ? (e.exit("data"), C(L)) : (e.consume(L), L === 92 ? O : M);
|
|
@@ -73451,7 +73452,7 @@ function Fte(e, t, n) {
|
|
|
73451
73452
|
}
|
|
73452
73453
|
}
|
|
73453
73454
|
function Bte(e, t, n) {
|
|
73454
|
-
return
|
|
73455
|
+
return Ye(e, r, "whitespace");
|
|
73455
73456
|
function r(a) {
|
|
73456
73457
|
return a === null ? n(a) : t(a);
|
|
73457
73458
|
}
|
|
@@ -73627,7 +73628,7 @@ function Vte(e, t, n) {
|
|
|
73627
73628
|
return e.enter("mathFlow"), e.enter("mathFlowFence"), e.enter("mathFlowFenceSequence"), l(y);
|
|
73628
73629
|
}
|
|
73629
73630
|
function l(y) {
|
|
73630
|
-
return y === 36 ? (e.consume(y), o++, l) : o < 2 ? n(y) : (e.exit("mathFlowFenceSequence"),
|
|
73631
|
+
return y === 36 ? (e.consume(y), o++, l) : o < 2 ? n(y) : (e.exit("mathFlowFenceSequence"), Ye(e, u, "whitespace")(y));
|
|
73631
73632
|
}
|
|
73632
73633
|
function u(y) {
|
|
73633
73634
|
return y === null || Ae(y) ? d(y) : (e.enter("mathFlowFenceMeta"), e.enter("chunkString", {
|
|
@@ -73647,7 +73648,7 @@ function Vte(e, t, n) {
|
|
|
73647
73648
|
}, T, f)(y);
|
|
73648
73649
|
}
|
|
73649
73650
|
function f(y) {
|
|
73650
|
-
return (i ?
|
|
73651
|
+
return (i ? Ye(e, b, "linePrefix", i + 1) : b)(y);
|
|
73651
73652
|
}
|
|
73652
73653
|
function b(y) {
|
|
73653
73654
|
return y === null ? T(y) : Ae(y) ? e.attempt(b4, p, T)(y) : (e.enter("mathFlowValue"), g(y));
|
|
@@ -73660,12 +73661,12 @@ function Vte(e, t, n) {
|
|
|
73660
73661
|
}
|
|
73661
73662
|
function v(y, _, k) {
|
|
73662
73663
|
let N = 0;
|
|
73663
|
-
return
|
|
73664
|
+
return Ye(y, S, "linePrefix", r.parser.constructs.disable.null.includes("codeIndented") ? void 0 : 4);
|
|
73664
73665
|
function S(O) {
|
|
73665
73666
|
return y.enter("mathFlowFence"), y.enter("mathFlowFenceSequence"), C(O);
|
|
73666
73667
|
}
|
|
73667
73668
|
function C(O) {
|
|
73668
|
-
return O === 36 ? (N++, y.consume(O), C) : N < o ? k(O) : (y.exit("mathFlowFenceSequence"),
|
|
73669
|
+
return O === 36 ? (N++, y.consume(O), C) : N < o ? k(O) : (y.exit("mathFlowFenceSequence"), Ye(y, M, "whitespace")(O));
|
|
73669
73670
|
}
|
|
73670
73671
|
function M(O) {
|
|
73671
73672
|
return O === null || Ae(O) ? (y.exit("mathFlowFence"), _(O)) : k(O);
|
|
@@ -74307,7 +74308,7 @@ const Jte = {
|
|
|
74307
74308
|
);
|
|
74308
74309
|
}, tne = ({ message: e }) => {
|
|
74309
74310
|
const { isCurrentUser: t, content: n, timestamp: r, avatar: a } = e, [i, o] = Je(!1), [s, l] = Je(a);
|
|
74310
|
-
|
|
74311
|
+
We(() => {
|
|
74311
74312
|
if (t)
|
|
74312
74313
|
try {
|
|
74313
74314
|
const f = localStorage.getItem("userInfo");
|
|
@@ -74428,7 +74429,7 @@ const rne = /* @__PURE__ */ Me.forwardRef(nne), ane = () => {
|
|
|
74428
74429
|
}
|
|
74429
74430
|
})
|
|
74430
74431
|
);
|
|
74431
|
-
|
|
74432
|
+
We(() => {
|
|
74432
74433
|
localStorage.setItem("chatInputHeight", o.toString()), r && r(o);
|
|
74433
74434
|
}, [o, r]);
|
|
74434
74435
|
const f = () => {
|
|
@@ -74694,9 +74695,9 @@ function lne() {
|
|
|
74694
74695
|
c(!1);
|
|
74695
74696
|
}, 2e3));
|
|
74696
74697
|
};
|
|
74697
|
-
|
|
74698
|
+
We(() => {
|
|
74698
74699
|
s && k();
|
|
74699
|
-
}, [v.length, s, k]),
|
|
74700
|
+
}, [v.length, s, k]), We(() => {
|
|
74700
74701
|
const O = o.current;
|
|
74701
74702
|
if (O)
|
|
74702
74703
|
return k(!0), O.addEventListener("scroll", N, { passive: !0 }), () => O.removeEventListener("scroll", N);
|
|
@@ -76616,7 +76617,7 @@ function iae() {
|
|
|
76616
76617
|
togglePinChat: a,
|
|
76617
76618
|
setTabIndex: i
|
|
76618
76619
|
} = Og();
|
|
76619
|
-
|
|
76620
|
+
We(() => {
|
|
76620
76621
|
n();
|
|
76621
76622
|
}, [n]);
|
|
76622
76623
|
const o = [...e].sort((u, c) => {
|
|
@@ -76683,23 +76684,34 @@ function oae() {
|
|
|
76683
76684
|
return /* @__PURE__ */ V.jsx("div", { className: "flex h-full items-center justify-center", children: /* @__PURE__ */ V.jsx("p", { className: "text-neutral-500", children: "节点视图正在建设中..." }) });
|
|
76684
76685
|
}
|
|
76685
76686
|
const sae = "http://localhost:8000", lae = () => {
|
|
76686
|
-
const [e, t] = Je("system"), n =
|
|
76687
|
-
|
|
76688
|
-
|
|
76689
|
-
document.head.removeChild(s);
|
|
76690
|
-
}, 50);
|
|
76687
|
+
const [e, t] = Je("system"), [n, r] = Je(!1);
|
|
76688
|
+
We(() => {
|
|
76689
|
+
r(!0);
|
|
76691
76690
|
}, []);
|
|
76692
|
-
|
|
76693
|
-
|
|
76694
|
-
|
|
76695
|
-
|
|
76696
|
-
|
|
76697
|
-
|
|
76691
|
+
const a = at(
|
|
76692
|
+
(o) => {
|
|
76693
|
+
if (!n) return;
|
|
76694
|
+
const s = window.document.documentElement, l = o === "dark" || o === "system" && window.matchMedia("(prefers-color-scheme: dark)").matches, u = document.createElement("style");
|
|
76695
|
+
u.innerHTML = "*, *::before, *::after { transition: none !important; }", document.head.appendChild(u), s.classList.toggle("dark", l), localStorage.setItem("theme", o), setTimeout(() => {
|
|
76696
|
+
document.head.contains(u) && document.head.removeChild(u);
|
|
76697
|
+
}, 50);
|
|
76698
|
+
},
|
|
76699
|
+
[n]
|
|
76700
|
+
);
|
|
76701
|
+
return We(() => {
|
|
76702
|
+
if (!n) return;
|
|
76703
|
+
const s = localStorage.getItem("theme") || "system";
|
|
76704
|
+
t(s), a(s);
|
|
76705
|
+
}, [n, a]), We(() => {
|
|
76706
|
+
if (!n) return;
|
|
76707
|
+
const o = window.matchMedia("(prefers-color-scheme: dark)"), s = () => {
|
|
76708
|
+
e === "system" && a("system");
|
|
76698
76709
|
};
|
|
76699
|
-
return
|
|
76700
|
-
}, [e,
|
|
76701
|
-
|
|
76702
|
-
|
|
76710
|
+
return o.addEventListener("change", s), () => o.removeEventListener("change", s);
|
|
76711
|
+
}, [n, e, a]), { theme: e, cycleTheme: () => {
|
|
76712
|
+
if (!n) return;
|
|
76713
|
+
const o = ["light", "dark", "system"], s = o.indexOf(e), l = o[(s + 1) % o.length];
|
|
76714
|
+
t(l), a(l);
|
|
76703
76715
|
} };
|
|
76704
76716
|
}, uae = 280, cae = 600, x4 = 380, dae = ({
|
|
76705
76717
|
isActive: e,
|
|
@@ -76735,7 +76747,7 @@ function yae({ backendUrl: e = sae }) {
|
|
|
76735
76747
|
{ id: "history", title: "历史", component: /* @__PURE__ */ V.jsx(iae, {}) },
|
|
76736
76748
|
{ id: "nodes", title: "节点", component: /* @__PURE__ */ V.jsx(oae, {}) }
|
|
76737
76749
|
];
|
|
76738
|
-
|
|
76750
|
+
We(() => {
|
|
76739
76751
|
f(!0), u(e);
|
|
76740
76752
|
}, [e, u]);
|
|
76741
76753
|
const y = q4(
|
|
@@ -76755,7 +76767,7 @@ function yae({ backendUrl: e = sae }) {
|
|
|
76755
76767
|
}, S = () => {
|
|
76756
76768
|
a(x4), T.current = x4;
|
|
76757
76769
|
};
|
|
76758
|
-
return
|
|
76770
|
+
return We(() => {
|
|
76759
76771
|
const C = (M) => {
|
|
76760
76772
|
(M.metaKey || M.ctrlKey) && M.shiftKey && M.key === "X" && (M.preventDefault(), i());
|
|
76761
76773
|
};
|