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