@pretextbook/web-editor 0.0.13 → 0.0.15
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/README.md +128 -128
- package/dist/App.d.ts +5 -5
- package/dist/components/CodeEditorMenu.d.ts +2 -2
- package/dist/components/Editors.d.ts +1 -1
- package/dist/components/FullPreview.d.ts +1 -1
- package/dist/components/MenuBar.d.ts +1 -1
- package/dist/index.es.js +508 -487
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +21 -21
- package/dist/index.js.map +1 -1
- package/dist/main.d.ts +1 -1
- package/dist/web-editor.css +1 -1
- package/package.json +88 -89
- package/dist/ptxSourceSlice.d.ts +0 -6
package/dist/index.es.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as $ from "react";
|
|
2
|
-
import We, { useContext as
|
|
2
|
+
import We, { useContext as Vo, useState as vt, useRef as De, useEffect as qe, memo as qo, useCallback as vo, createRef as t4, createElement as r4, createContext as ih, version as Yu, useDebugValue as sh, forwardRef as n4, useLayoutEffect as i4 } from "react";
|
|
3
3
|
import s4, { flushSync as o4, createPortal as oh } from "react-dom";
|
|
4
4
|
var As = { exports: {} }, Ni = {};
|
|
5
5
|
var Xu;
|
|
@@ -374,7 +374,7 @@ function N0(r, e, t) {
|
|
|
374
374
|
writable: !1
|
|
375
375
|
}), r;
|
|
376
376
|
}
|
|
377
|
-
function
|
|
377
|
+
function Wo(r, e, t) {
|
|
378
378
|
return (e = lh(e)) in r ? Object.defineProperty(r, e, {
|
|
379
379
|
value: t,
|
|
380
380
|
enumerable: !0,
|
|
@@ -382,7 +382,7 @@ function qo(r, e, t) {
|
|
|
382
382
|
writable: !0
|
|
383
383
|
}) : r[e] = t, r;
|
|
384
384
|
}
|
|
385
|
-
function
|
|
385
|
+
function Ia(r, e) {
|
|
386
386
|
var t = typeof Symbol < "u" && r[Symbol.iterator] || r["@@iterator"];
|
|
387
387
|
if (!t) {
|
|
388
388
|
if (Array.isArray(r) || (t = y4(r)) || e) {
|
|
@@ -809,12 +809,12 @@ var fe = /* @__PURE__ */ (function() {
|
|
|
809
809
|
return A && (o.test(A.getPropertyValue("overflow")) || o.test(A.getPropertyValue("overflow-x")) || o.test(A.getPropertyValue("overflow-y")));
|
|
810
810
|
}, l = function(P) {
|
|
811
811
|
i.push(P.nodeName === "BODY" || P.nodeName === "HTML" || n.isDocument(P) ? window : P);
|
|
812
|
-
}, u =
|
|
812
|
+
}, u = Ia(s), c;
|
|
813
813
|
try {
|
|
814
814
|
for (u.s(); !(c = u.n()).done; ) {
|
|
815
815
|
var d, h = c.value, f = h.nodeType === 1 && ((d = h.dataset) === null || d === void 0 ? void 0 : d.scrollselectors);
|
|
816
816
|
if (f) {
|
|
817
|
-
var m = f.split(","), v =
|
|
817
|
+
var m = f.split(","), v = Ia(m), y;
|
|
818
818
|
try {
|
|
819
819
|
for (v.s(); !(y = v.n()).done; ) {
|
|
820
820
|
var w = y.value, k = this.findSingle(h, w);
|
|
@@ -1031,7 +1031,7 @@ var fe = /* @__PURE__ */ (function() {
|
|
|
1031
1031
|
select:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])`).concat(n, `,
|
|
1032
1032
|
textarea:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])`).concat(n, `,
|
|
1033
1033
|
[tabIndex]:not([tabIndex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])`).concat(n, `,
|
|
1034
|
-
[contenteditable]:not([tabIndex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])`).concat(n)), s = [], o =
|
|
1034
|
+
[contenteditable]:not([tabIndex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])`).concat(n)), s = [], o = Ia(i), a;
|
|
1035
1035
|
try {
|
|
1036
1036
|
for (o.s(); !(a = o.n()).done; ) {
|
|
1037
1037
|
var l = a.value;
|
|
@@ -1261,8 +1261,8 @@ var fe = /* @__PURE__ */ (function() {
|
|
|
1261
1261
|
}
|
|
1262
1262
|
}]);
|
|
1263
1263
|
})();
|
|
1264
|
-
|
|
1265
|
-
|
|
1264
|
+
Wo(fe, "DATA_PROPS", ["data-"]);
|
|
1265
|
+
Wo(fe, "ARIA_PROPS", ["aria", "focus-target"]);
|
|
1266
1266
|
function Rl() {
|
|
1267
1267
|
return Rl = Object.assign ? Object.assign.bind() : function(r) {
|
|
1268
1268
|
for (var e = 1; e < arguments.length; e++) {
|
|
@@ -1846,7 +1846,7 @@ function w4(r) {
|
|
|
1846
1846
|
for (var e = 1; e < arguments.length; e++) {
|
|
1847
1847
|
var t = arguments[e] != null ? arguments[e] : {};
|
|
1848
1848
|
e % 2 ? ic(Object(t), !0).forEach(function(n) {
|
|
1849
|
-
|
|
1849
|
+
Wo(r, n, t[n]);
|
|
1850
1850
|
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(r, Object.getOwnPropertyDescriptors(t)) : ic(Object(t)).forEach(function(n) {
|
|
1851
1851
|
Object.defineProperty(r, n, Object.getOwnPropertyDescriptor(t, n));
|
|
1852
1852
|
});
|
|
@@ -1892,14 +1892,14 @@ function oc(r) {
|
|
|
1892
1892
|
for (var e = 1; e < arguments.length; e++) {
|
|
1893
1893
|
var t = arguments[e] != null ? arguments[e] : {};
|
|
1894
1894
|
e % 2 ? sc(Object(t), !0).forEach(function(n) {
|
|
1895
|
-
|
|
1895
|
+
Wo(r, n, t[n]);
|
|
1896
1896
|
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(r, Object.getOwnPropertyDescriptors(t)) : sc(Object(t)).forEach(function(n) {
|
|
1897
1897
|
Object.defineProperty(r, n, Object.getOwnPropertyDescriptor(t, n));
|
|
1898
1898
|
});
|
|
1899
1899
|
}
|
|
1900
1900
|
return r;
|
|
1901
1901
|
}
|
|
1902
|
-
function
|
|
1902
|
+
function yo(r) {
|
|
1903
1903
|
var e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
1904
1904
|
if (r) {
|
|
1905
1905
|
var t = function(o) {
|
|
@@ -2155,7 +2155,7 @@ var C4 = {
|
|
|
2155
2155
|
}
|
|
2156
2156
|
}
|
|
2157
2157
|
};
|
|
2158
|
-
function
|
|
2158
|
+
function za(r, e) {
|
|
2159
2159
|
if (r.includes("__proto__") || r.includes("prototype"))
|
|
2160
2160
|
throw new Error("Unsafe ariaKey detected");
|
|
2161
2161
|
var t = ft.locale;
|
|
@@ -2249,20 +2249,20 @@ var lc = function(e) {
|
|
|
2249
2249
|
v();
|
|
2250
2250
|
}), [f, m];
|
|
2251
2251
|
}, P0 = function() {
|
|
2252
|
-
var e =
|
|
2252
|
+
var e = Vo(ps);
|
|
2253
2253
|
return function() {
|
|
2254
2254
|
for (var t = arguments.length, n = new Array(t), i = 0; i < t; i++)
|
|
2255
2255
|
n[i] = arguments[i];
|
|
2256
|
-
return
|
|
2256
|
+
return yo(n, e?.ptOptions);
|
|
2257
2257
|
};
|
|
2258
|
-
},
|
|
2258
|
+
}, Uo = function(e) {
|
|
2259
2259
|
var t = $.useRef(!1);
|
|
2260
2260
|
return $.useEffect(function() {
|
|
2261
2261
|
if (!t.current)
|
|
2262
2262
|
return t.current = !0, e && e();
|
|
2263
2263
|
}, []);
|
|
2264
2264
|
}, R4 = 0, Li = function(e) {
|
|
2265
|
-
var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, n = vt(!1), i = D4(n, 2), s = i[0], o = i[1], a = De(null), l =
|
|
2265
|
+
var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, n = vt(!1), i = D4(n, 2), s = i[0], o = i[1], a = De(null), l = Vo(ps), u = fe.isClient() ? window.document : void 0, c = t.document, d = c === void 0 ? u : c, h = t.manual, f = h === void 0 ? !1 : h, m = t.name, v = m === void 0 ? "style_".concat(++R4) : m, y = t.id, w = y === void 0 ? void 0 : y, k = t.media, E = k === void 0 ? void 0 : k, P = function(z) {
|
|
2266
2266
|
var B = z.querySelector('style[data-primereact-style-id="'.concat(v, '"]'));
|
|
2267
2267
|
if (B)
|
|
2268
2268
|
return B;
|
|
@@ -2820,8 +2820,8 @@ svg.p-icon g,
|
|
|
2820
2820
|
} : ie != null && ie.hasOwnProperty("className") && Array.isArray(ie.className) ? {
|
|
2821
2821
|
className: It.apply(void 0, cc(ie.className))
|
|
2822
2822
|
} : ie;
|
|
2823
|
-
}, oe = m ? y ? uh(ge, v, f) : ch(ge, v, f) : void 0, K = y ? void 0 : Ko(
|
|
2824
|
-
return B || !B && K ? se ?
|
|
2823
|
+
}, oe = m ? y ? uh(ge, v, f) : ch(ge, v, f) : void 0, K = y ? void 0 : Go(Ko(d, E), ge, v, f), Q = !P && tt(tt({}, w === "root" && Il({}, "".concat(A, "name"), f.props && f.props.__parentMetadata ? xe.toFlatCase(f.props.__TYPE) : E)), {}, Il({}, "".concat(A, "section"), w));
|
|
2824
|
+
return B || !B && K ? se ? yo([oe, K, Object.keys(Q).length ? Q : {}], {
|
|
2825
2825
|
classNameMergeFunction: (c = $e.context.ptOptions) === null || c === void 0 ? void 0 : c.classNameMergeFunction
|
|
2826
2826
|
}) : tt(tt(tt({}, oe), K), Object.keys(Q).length ? Q : {}) : tt(tt({}, K), Object.keys(Q).length ? Q : {});
|
|
2827
2827
|
}, l = function() {
|
|
@@ -2849,7 +2849,7 @@ svg.p-icon g,
|
|
|
2849
2849
|
props: d,
|
|
2850
2850
|
state: h
|
|
2851
2851
|
}, P));
|
|
2852
|
-
return
|
|
2852
|
+
return yo([L, R], {
|
|
2853
2853
|
classNameMergeFunction: (N = $e.context.ptOptions) === null || N === void 0 ? void 0 : N.classNameMergeFunction
|
|
2854
2854
|
});
|
|
2855
2855
|
}
|
|
@@ -2875,7 +2875,7 @@ svg.p-icon g,
|
|
|
2875
2875
|
return xe.toFlatCase(a) === s;
|
|
2876
2876
|
}) : "";
|
|
2877
2877
|
return s ? xe.isObject(e) ? Er(xe.getItemValue(e[o], n), i.join("."), n) : void 0 : xe.getItemValue(e, n);
|
|
2878
|
-
},
|
|
2878
|
+
}, Ko = function(e) {
|
|
2879
2879
|
var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "", n = arguments.length > 2 ? arguments[2] : void 0, i = e?._usept, s = function(a) {
|
|
2880
2880
|
var l, u = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1, c = n ? n(a) : a, d = xe.toFlatCase(t);
|
|
2881
2881
|
return (l = u ? d !== $e.cName ? c?.[d] : void 0 : c?.[d]) !== null && l !== void 0 ? l : c;
|
|
@@ -2885,29 +2885,29 @@ svg.p-icon g,
|
|
|
2885
2885
|
originalValue: s(e.originalValue),
|
|
2886
2886
|
value: s(e.value)
|
|
2887
2887
|
} : s(e, !0);
|
|
2888
|
-
},
|
|
2888
|
+
}, Go = function(e, t, n, i) {
|
|
2889
2889
|
var s = function(v) {
|
|
2890
2890
|
return t(v, n, i);
|
|
2891
2891
|
};
|
|
2892
2892
|
if (e != null && e.hasOwnProperty("_usept")) {
|
|
2893
2893
|
var o = e._usept || $e.context.ptOptions || {}, a = o.mergeSections, l = a === void 0 ? !0 : a, u = o.mergeProps, c = u === void 0 ? !1 : u, d = o.classNameMergeFunction, h = s(e.originalValue), f = s(e.value);
|
|
2894
|
-
return h === void 0 && f === void 0 ? void 0 : xe.isString(f) ? f : xe.isString(h) ? h : l || !l && f ? c ?
|
|
2894
|
+
return h === void 0 && f === void 0 ? void 0 : xe.isString(f) ? f : xe.isString(h) ? h : l || !l && f ? c ? yo([h, f], {
|
|
2895
2895
|
classNameMergeFunction: d
|
|
2896
2896
|
}) : tt(tt({}, h), f) : f;
|
|
2897
2897
|
}
|
|
2898
2898
|
return s(e);
|
|
2899
2899
|
}, q4 = function() {
|
|
2900
|
-
return
|
|
2900
|
+
return Ko($e.context.pt || ms.pt, void 0, function(e) {
|
|
2901
2901
|
return xe.getItemValue(e, $e.cParams);
|
|
2902
2902
|
});
|
|
2903
2903
|
}, W4 = function() {
|
|
2904
|
-
return
|
|
2904
|
+
return Ko($e.context.pt || ms.pt, void 0, function(e) {
|
|
2905
2905
|
return Er(e, $e.cName, $e.cParams) || xe.getItemValue(e, $e.cParams);
|
|
2906
2906
|
});
|
|
2907
2907
|
}, uh = function(e, t, n) {
|
|
2908
|
-
return
|
|
2908
|
+
return Go(q4(), e, t, n);
|
|
2909
2909
|
}, ch = function(e, t, n) {
|
|
2910
|
-
return
|
|
2910
|
+
return Go(W4(), e, t, n);
|
|
2911
2911
|
}, dh = function(e) {
|
|
2912
2912
|
var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : function() {
|
|
2913
2913
|
}, n = arguments.length > 2 ? arguments[2] : void 0, i = n.name, s = n.styled, o = s === void 0 ? !1 : s, a = n.hostName, l = a === void 0 ? "" : a, u = uh(Er, "global.css", $e.cParams), c = xe.toFlatCase(i), d = Li($4, {
|
|
@@ -2924,11 +2924,11 @@ svg.p-icon g,
|
|
|
2924
2924
|
manual: !0
|
|
2925
2925
|
}), k = w.load, E = function(A) {
|
|
2926
2926
|
if (!l) {
|
|
2927
|
-
var N = Ko(
|
|
2927
|
+
var N = Go(Ko(($e.cProps || {}).pt, c), Er, "hooks.".concat(A)), R = ch(Er, "hooks.".concat(A));
|
|
2928
2928
|
N?.(), R?.();
|
|
2929
2929
|
}
|
|
2930
2930
|
};
|
|
2931
|
-
E("useMountEffect"),
|
|
2931
|
+
E("useMountEffect"), Uo(function() {
|
|
2932
2932
|
h(), y(), t() || (m(), o || k());
|
|
2933
2933
|
}), Ji(function() {
|
|
2934
2934
|
E("useUpdateEffect");
|
|
@@ -3147,7 +3147,7 @@ function hc(r, e) {
|
|
|
3147
3147
|
}
|
|
3148
3148
|
return t;
|
|
3149
3149
|
}
|
|
3150
|
-
function
|
|
3150
|
+
function La(r) {
|
|
3151
3151
|
for (var e = 1; e < arguments.length; e++) {
|
|
3152
3152
|
var t = arguments[e] != null ? arguments[e] : {};
|
|
3153
3153
|
e % 2 ? hc(Object(t), !0).forEach(function(n) {
|
|
@@ -3168,7 +3168,7 @@ var Bl = function() {
|
|
|
3168
3168
|
panelSizes: R,
|
|
3169
3169
|
nested: fe.getAttribute(o.current && o.current.parentElement, "data-p-splitter-panel-nested") === !0
|
|
3170
3170
|
}
|
|
3171
|
-
}, ie = Ns.setMetaData(
|
|
3171
|
+
}, ie = Ns.setMetaData(La({}, Se)), ke = ie.ptm, C = ie.cx, x = ie.isUnstyled;
|
|
3172
3172
|
dh(Ns.css.styles, x, {
|
|
3173
3173
|
name: "splitter"
|
|
3174
3174
|
});
|
|
@@ -3228,7 +3228,7 @@ var Bl = function() {
|
|
|
3228
3228
|
}), !x() && fe.removeClass(o.current, "p-splitter-resizing"), o.current.setAttribute("data-p-splitter-resizing", !1), qn();
|
|
3229
3229
|
}, Mi = function() {
|
|
3230
3230
|
Sn(), wn();
|
|
3231
|
-
},
|
|
3231
|
+
}, ka = function(J, re) {
|
|
3232
3232
|
var Ae = i.children[re].props && i.children[re].props.minSize || 0;
|
|
3233
3233
|
switch (J.code) {
|
|
3234
3234
|
case "ArrowLeft": {
|
|
@@ -3273,7 +3273,7 @@ var Bl = function() {
|
|
|
3273
3273
|
P.current && (clearInterval(P.current), P.current = null);
|
|
3274
3274
|
}, Es = function(J, re) {
|
|
3275
3275
|
rr(J, re, !1), yn();
|
|
3276
|
-
},
|
|
3276
|
+
}, Ta = function(J, re) {
|
|
3277
3277
|
rr(J, re, !1), window.addEventListener("touchmove", Kn, {
|
|
3278
3278
|
passive: !1,
|
|
3279
3279
|
cancelable: !1
|
|
@@ -3290,7 +3290,7 @@ var Bl = function() {
|
|
|
3290
3290
|
return o.current;
|
|
3291
3291
|
}
|
|
3292
3292
|
};
|
|
3293
|
-
}),
|
|
3293
|
+
}), Uo(function() {
|
|
3294
3294
|
o.current && (s.current = D0());
|
|
3295
3295
|
}), $.useEffect(function() {
|
|
3296
3296
|
var Me = fc(o.current.children).filter(function(re) {
|
|
@@ -3302,7 +3302,7 @@ var Bl = function() {
|
|
|
3302
3302
|
}, []), $.useEffect(function() {
|
|
3303
3303
|
ge && wr();
|
|
3304
3304
|
}, [wr, ge]);
|
|
3305
|
-
var
|
|
3305
|
+
var Ca = function(J, re) {
|
|
3306
3306
|
var Ae = Tt(J, "id") || "".concat(s.current, "_").concat(re), nr = It(Tt(J, "className"), C("panel.root")), ir = t({
|
|
3307
3307
|
ref: function(de) {
|
|
3308
3308
|
return l.current[re] = de;
|
|
@@ -3317,11 +3317,11 @@ var Bl = function() {
|
|
|
3317
3317
|
return Es(de, re);
|
|
3318
3318
|
},
|
|
3319
3319
|
onKeyDown: function(de) {
|
|
3320
|
-
return
|
|
3320
|
+
return ka(de, re);
|
|
3321
3321
|
},
|
|
3322
3322
|
onKeyUp: Mi,
|
|
3323
3323
|
onTouchStart: function(de) {
|
|
3324
|
-
return
|
|
3324
|
+
return Ta(de, re);
|
|
3325
3325
|
},
|
|
3326
3326
|
onTouchMove: function(de) {
|
|
3327
3327
|
return Kn(de);
|
|
@@ -3342,29 +3342,29 @@ var Bl = function() {
|
|
|
3342
3342
|
"aria-valuetext": parseFloat(v.current).toFixed(0) + "%",
|
|
3343
3343
|
"aria-valuemin": Tt(J, "minSize") || "0",
|
|
3344
3344
|
"aria-valuemax": "100"
|
|
3345
|
-
}, ke("gutterHandler")), Ai = re !== i.children.length - 1 && /* @__PURE__ */ $.createElement("div", ir, /* @__PURE__ */ $.createElement("div", Vr)), Oi = "calc(" + K(R, re) + "% - " + (oe - 1) * i.gutterSize + "px)",
|
|
3345
|
+
}, ke("gutterHandler")), Ai = re !== i.children.length - 1 && /* @__PURE__ */ $.createElement("div", ir, /* @__PURE__ */ $.createElement("div", Vr)), Oi = "calc(" + K(R, re) + "% - " + (oe - 1) * i.gutterSize + "px)", Oa = t({
|
|
3346
3346
|
key: re,
|
|
3347
3347
|
id: Ae,
|
|
3348
3348
|
className: nr,
|
|
3349
|
-
style:
|
|
3349
|
+
style: La(La({}, Tt(J, "style")), {}, {
|
|
3350
3350
|
flexBasis: Oi
|
|
3351
3351
|
}),
|
|
3352
3352
|
role: "presentation",
|
|
3353
3353
|
"data-p-splitter-panel-nested": !1,
|
|
3354
3354
|
onClick: Tt(J, "onClick")
|
|
3355
3355
|
}, D("splitterpanel.root"));
|
|
3356
|
-
return /* @__PURE__ */ $.createElement($.Fragment, null, /* @__PURE__ */ $.createElement("div",
|
|
3357
|
-
},
|
|
3358
|
-
return $.Children.map(i.children,
|
|
3359
|
-
},
|
|
3356
|
+
return /* @__PURE__ */ $.createElement($.Fragment, null, /* @__PURE__ */ $.createElement("div", Oa, Tt(J, "children")), Ai);
|
|
3357
|
+
}, Ma = function() {
|
|
3358
|
+
return $.Children.map(i.children, Ca);
|
|
3359
|
+
}, Ea = t({
|
|
3360
3360
|
id: i.id,
|
|
3361
3361
|
style: i.style,
|
|
3362
3362
|
className: It(i.className, C("root")),
|
|
3363
3363
|
"data-p-splitter-resizing": !1
|
|
3364
|
-
}, Ns.getOtherProps(i), ke("root")),
|
|
3364
|
+
}, Ns.getOtherProps(i), ke("root")), Aa = Ma();
|
|
3365
3365
|
return /* @__PURE__ */ $.createElement("div", zl({
|
|
3366
3366
|
ref: o
|
|
3367
|
-
},
|
|
3367
|
+
}, Ea), Aa);
|
|
3368
3368
|
}));
|
|
3369
3369
|
Bl.displayName = "SplitterPanel";
|
|
3370
3370
|
hh.displayName = "Splitter";
|
|
@@ -3651,7 +3651,7 @@ var lo = /* @__PURE__ */ $.memo(/* @__PURE__ */ $.forwardRef(function(r, e) {
|
|
|
3651
3651
|
return a.current;
|
|
3652
3652
|
}
|
|
3653
3653
|
};
|
|
3654
|
-
}),
|
|
3654
|
+
}), Uo(function() {
|
|
3655
3655
|
s(!0);
|
|
3656
3656
|
}), Ji(function() {
|
|
3657
3657
|
i && o.current && (a.current = y(), N(), w());
|
|
@@ -4012,7 +4012,7 @@ var Vl = function() {
|
|
|
4012
4012
|
var U = Mi(F.target.parentElement);
|
|
4013
4013
|
U ? Wn(U) : _r(F), F.preventDefault();
|
|
4014
4014
|
}, br = function(F) {
|
|
4015
|
-
var U =
|
|
4015
|
+
var U = ka();
|
|
4016
4016
|
Wn(U), F.preventDefault();
|
|
4017
4017
|
}, _r = function(F) {
|
|
4018
4018
|
var U = xn();
|
|
@@ -4033,7 +4033,7 @@ var Vl = function() {
|
|
|
4033
4033
|
}, Mi = function(F) {
|
|
4034
4034
|
var U = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1, ne = U ? F : F.previousElementSibling;
|
|
4035
4035
|
return ne ? fe.getAttribute(ne, "data-p-disabled") || fe.getAttribute(ne, "data-pc-section") === "inkbar" ? Mi(ne) : fe.findSingle(ne, '[data-pc-section="headeraction"]') : null;
|
|
4036
|
-
},
|
|
4036
|
+
}, ka = function() {
|
|
4037
4037
|
return wn(te.current.firstElementChild, !0);
|
|
4038
4038
|
}, xn = function() {
|
|
4039
4039
|
return Mi(te.current.lastElementChild, !0);
|
|
@@ -4052,7 +4052,7 @@ var Vl = function() {
|
|
|
4052
4052
|
}, Es = function() {
|
|
4053
4053
|
var F = B.current, U = F.scrollLeft, ne = F.scrollWidth, ye = fe.getWidth(B.current);
|
|
4054
4054
|
h(U === 0), y(parseInt(U) === ne - ye);
|
|
4055
|
-
},
|
|
4055
|
+
}, Ta = function(F) {
|
|
4056
4056
|
i.scrollable && Es(), F.preventDefault();
|
|
4057
4057
|
}, Kn = function() {
|
|
4058
4058
|
return [ge.current, oe.current].reduce(function(F, U) {
|
|
@@ -4061,17 +4061,17 @@ var Vl = function() {
|
|
|
4061
4061
|
}, Ei = function() {
|
|
4062
4062
|
var F = fe.getWidth(B.current) - Kn(), U = B.current.scrollLeft - F;
|
|
4063
4063
|
B.current.scrollLeft = U <= 0 ? 0 : U;
|
|
4064
|
-
},
|
|
4064
|
+
}, Ca = function() {
|
|
4065
4065
|
var F = fe.getWidth(B.current) - Kn(), U = B.current.scrollLeft + F, ne = B.current.scrollWidth - F;
|
|
4066
4066
|
B.current.scrollLeft = U >= ne ? ne : U;
|
|
4067
|
-
},
|
|
4067
|
+
}, Ma = function() {
|
|
4068
4068
|
h(!0), y(!1), P([]), i.onTabChange ? i.onTabChange({
|
|
4069
4069
|
index: Q
|
|
4070
4070
|
}) : L(i.activeIndex);
|
|
4071
4071
|
};
|
|
4072
4072
|
$.useEffect(function() {
|
|
4073
4073
|
Un(), Es();
|
|
4074
|
-
}),
|
|
4074
|
+
}), Uo(function() {
|
|
4075
4075
|
a || l(D0());
|
|
4076
4076
|
}), Ji(function() {
|
|
4077
4077
|
if (xe.isNotEmpty(E)) {
|
|
@@ -4085,13 +4085,13 @@ var Vl = function() {
|
|
|
4085
4085
|
}, [i.activeIndex]), $.useImperativeHandle(e, function() {
|
|
4086
4086
|
return {
|
|
4087
4087
|
props: i,
|
|
4088
|
-
reset:
|
|
4088
|
+
reset: Ma,
|
|
4089
4089
|
getElement: function() {
|
|
4090
4090
|
return z.current;
|
|
4091
4091
|
}
|
|
4092
4092
|
};
|
|
4093
4093
|
});
|
|
4094
|
-
var
|
|
4094
|
+
var Ea = function(F, U) {
|
|
4095
4095
|
switch (F.preventDefault(), F.stopPropagation(), F.code) {
|
|
4096
4096
|
case "Space":
|
|
4097
4097
|
case "NumpadEnter":
|
|
@@ -4099,8 +4099,8 @@ var Vl = function() {
|
|
|
4099
4099
|
Jt(F, U);
|
|
4100
4100
|
break;
|
|
4101
4101
|
}
|
|
4102
|
-
},
|
|
4103
|
-
var ne = Ne(U), ye = si.getCProps(F), Ht = ye.headerStyle, Tn = ye.headerClassName,
|
|
4102
|
+
}, Aa = function(F, U) {
|
|
4103
|
+
var ne = Ne(U), ye = si.getCProps(F), Ht = ye.headerStyle, Tn = ye.headerClassName, Na = ye.style, Da = ye.className, Ra = ye.disabled, _u = ye.leftIcon, Vu = ye.rightIcon, qg = ye.header, qu = ye.headerTemplate, Wg = ye.closable, Ug = ye.closeIcon, Kg = a + "_header_" + U, Wu = a + U + "_content", Gg = Ra || !ne ? -1 : 0, Uu = _u && Ri.getJSXIcon(_u, void 0, {
|
|
4104
4104
|
props: i
|
|
4105
4105
|
}), Jg = t({
|
|
4106
4106
|
className: D("tab.headertitle")
|
|
@@ -4112,10 +4112,10 @@ var Vl = function() {
|
|
|
4112
4112
|
return Jt(Nt, U);
|
|
4113
4113
|
},
|
|
4114
4114
|
onKeyDown: function(Nt) {
|
|
4115
|
-
return
|
|
4115
|
+
return Ea(Nt, U);
|
|
4116
4116
|
},
|
|
4117
4117
|
tabIndex: 0,
|
|
4118
|
-
"aria-label":
|
|
4118
|
+
"aria-label": za("close") || "Close"
|
|
4119
4119
|
}, ue(F, "closeIcon", U)), Yg = Ug || /* @__PURE__ */ $.createElement(gh, Ju), Xg = Wg ? Ri.getJSXIcon(Yg, Ps({}, Ju), {
|
|
4120
4120
|
props: i
|
|
4121
4121
|
}) : null, Zg = t({
|
|
@@ -4125,14 +4125,14 @@ var Vl = function() {
|
|
|
4125
4125
|
tabIndex: Gg,
|
|
4126
4126
|
"aria-controls": Wu,
|
|
4127
4127
|
"aria-selected": ne,
|
|
4128
|
-
"aria-disabled":
|
|
4128
|
+
"aria-disabled": Ra,
|
|
4129
4129
|
onClick: function(Nt) {
|
|
4130
4130
|
return yn(Nt, F, U);
|
|
4131
4131
|
},
|
|
4132
4132
|
onKeyDown: function(Nt) {
|
|
4133
4133
|
return Tt(Nt, F, U);
|
|
4134
4134
|
}
|
|
4135
|
-
}, ue(F, "headeraction", U)),
|
|
4135
|
+
}, ue(F, "headeraction", U)), Pa = (
|
|
4136
4136
|
// eslint-disable /
|
|
4137
4137
|
/* @__PURE__ */ $.createElement("a", Zg, Uu, Ku, Gu, Xg, /* @__PURE__ */ $.createElement(lo, null))
|
|
4138
4138
|
);
|
|
@@ -4149,13 +4149,13 @@ var Vl = function() {
|
|
|
4149
4149
|
leftIconElement: Uu,
|
|
4150
4150
|
titleElement: Ku,
|
|
4151
4151
|
rightIconElement: Gu,
|
|
4152
|
-
element:
|
|
4152
|
+
element: Pa,
|
|
4153
4153
|
props: i,
|
|
4154
4154
|
index: U,
|
|
4155
4155
|
selected: ne,
|
|
4156
4156
|
ariaControls: Wu
|
|
4157
4157
|
};
|
|
4158
|
-
|
|
4158
|
+
Pa = xe.getJSXElement(qu, Qg);
|
|
4159
4159
|
}
|
|
4160
4160
|
var e4 = t({
|
|
4161
4161
|
ref: function(Nt) {
|
|
@@ -4163,21 +4163,21 @@ var Vl = function() {
|
|
|
4163
4163
|
},
|
|
4164
4164
|
className: D("tab.header", {
|
|
4165
4165
|
selected: ne,
|
|
4166
|
-
disabled:
|
|
4166
|
+
disabled: Ra,
|
|
4167
4167
|
headerClassName: Tn,
|
|
4168
|
-
_className:
|
|
4168
|
+
_className: Da
|
|
4169
4169
|
}),
|
|
4170
4170
|
style: _("tab.header", {
|
|
4171
4171
|
headerStyle: Ht,
|
|
4172
|
-
_style:
|
|
4172
|
+
_style: Na
|
|
4173
4173
|
}),
|
|
4174
4174
|
role: "presentation"
|
|
4175
4175
|
}, ue(F, "root", U), ue(F, "header", U));
|
|
4176
|
-
return /* @__PURE__ */ $.createElement("li", e4,
|
|
4176
|
+
return /* @__PURE__ */ $.createElement("li", e4, Pa);
|
|
4177
4177
|
}, Me = function() {
|
|
4178
4178
|
return $.Children.map(i.children, function(F, U) {
|
|
4179
4179
|
if (Le(F))
|
|
4180
|
-
return
|
|
4180
|
+
return Aa(F, U);
|
|
4181
4181
|
});
|
|
4182
4182
|
}, J = function() {
|
|
4183
4183
|
var F = Me(), U = t({
|
|
@@ -4185,7 +4185,7 @@ var Vl = function() {
|
|
|
4185
4185
|
ref: B,
|
|
4186
4186
|
className: D("navcontent"),
|
|
4187
4187
|
style: i.style,
|
|
4188
|
-
onScroll:
|
|
4188
|
+
onScroll: Ta
|
|
4189
4189
|
}, C("navcontent")), ne = t({
|
|
4190
4190
|
ref: te,
|
|
4191
4191
|
className: D("nav"),
|
|
@@ -4203,7 +4203,7 @@ var Vl = function() {
|
|
|
4203
4203
|
style: i.panelContainerStyle
|
|
4204
4204
|
}, C("panelcontainer")), U = $.Children.map(i.children, function(ne, ye) {
|
|
4205
4205
|
if (Le(ne) && (!i.renderActiveOnly || Ne(ye))) {
|
|
4206
|
-
var Ht = Ne(ye), Tn = a + ye + "_content",
|
|
4206
|
+
var Ht = Ne(ye), Tn = a + ye + "_content", Na = a + "_header_" + ye, Da = t({
|
|
4207
4207
|
id: Tn,
|
|
4208
4208
|
className: D("tab.content", {
|
|
4209
4209
|
props: i,
|
|
@@ -4223,9 +4223,9 @@ var Vl = function() {
|
|
|
4223
4223
|
index: ye
|
|
4224
4224
|
}),
|
|
4225
4225
|
role: "tabpanel",
|
|
4226
|
-
"aria-labelledby":
|
|
4226
|
+
"aria-labelledby": Na
|
|
4227
4227
|
}, si.getCOtherProps(ne), ue(ne, "root", ye), ue(ne, "content", ye));
|
|
4228
|
-
return /* @__PURE__ */ $.createElement("div",
|
|
4228
|
+
return /* @__PURE__ */ $.createElement("div", Da, i.renderActiveOnly ? Ht && ce(ne, "children") : ce(ne, "children"));
|
|
4229
4229
|
}
|
|
4230
4230
|
});
|
|
4231
4231
|
return /* @__PURE__ */ $.createElement("div", F, U);
|
|
@@ -4238,7 +4238,7 @@ var Vl = function() {
|
|
|
4238
4238
|
ref: ge,
|
|
4239
4239
|
type: "button",
|
|
4240
4240
|
className: D("prevbutton"),
|
|
4241
|
-
"aria-label":
|
|
4241
|
+
"aria-label": za("prevPageLabel"),
|
|
4242
4242
|
onClick: function(Tn) {
|
|
4243
4243
|
return Ei();
|
|
4244
4244
|
}
|
|
@@ -4253,9 +4253,9 @@ var Vl = function() {
|
|
|
4253
4253
|
ref: oe,
|
|
4254
4254
|
type: "button",
|
|
4255
4255
|
className: D("nextbutton"),
|
|
4256
|
-
"aria-label":
|
|
4256
|
+
"aria-label": za("nextPageLabel"),
|
|
4257
4257
|
onClick: function(Tn) {
|
|
4258
|
-
return
|
|
4258
|
+
return Ca();
|
|
4259
4259
|
}
|
|
4260
4260
|
}, C("nextbutton"));
|
|
4261
4261
|
if (i.scrollable && !v)
|
|
@@ -4267,8 +4267,8 @@ var Vl = function() {
|
|
|
4267
4267
|
className: It(i.className, D("root"))
|
|
4268
4268
|
}, Rs.getOtherProps(i), C("root")), Vr = t({
|
|
4269
4269
|
className: D("navcontainer")
|
|
4270
|
-
}, C("navcontainer")), Ai = J(), Oi = re(),
|
|
4271
|
-
return /* @__PURE__ */ $.createElement("div", ir, /* @__PURE__ */ $.createElement("div", Vr,
|
|
4270
|
+
}, C("navcontainer")), Ai = J(), Oi = re(), Oa = Ae(), kn = nr();
|
|
4271
|
+
return /* @__PURE__ */ $.createElement("div", ir, /* @__PURE__ */ $.createElement("div", Vr, Oa, Ai, kn), Oi);
|
|
4272
4272
|
});
|
|
4273
4273
|
Vl.displayName = "TabPanel";
|
|
4274
4274
|
bh.displayName = "TabView";
|
|
@@ -4422,7 +4422,7 @@ function Bi(r) {
|
|
|
4422
4422
|
};
|
|
4423
4423
|
};
|
|
4424
4424
|
}
|
|
4425
|
-
function
|
|
4425
|
+
function bo(r) {
|
|
4426
4426
|
return {}.toString.call(r).includes("Object");
|
|
4427
4427
|
}
|
|
4428
4428
|
function B2(r) {
|
|
@@ -4435,7 +4435,7 @@ function F2(r, e) {
|
|
|
4435
4435
|
return Object.prototype.hasOwnProperty.call(r, e);
|
|
4436
4436
|
}
|
|
4437
4437
|
function $2(r, e) {
|
|
4438
|
-
return
|
|
4438
|
+
return bo(e) || en("changeType"), Object.keys(e).some(function(t) {
|
|
4439
4439
|
return !F2(r, t);
|
|
4440
4440
|
}) && en("changeField"), e;
|
|
4441
4441
|
}
|
|
@@ -4443,12 +4443,12 @@ function H2(r) {
|
|
|
4443
4443
|
es(r) || en("selectorType");
|
|
4444
4444
|
}
|
|
4445
4445
|
function j2(r) {
|
|
4446
|
-
es(r) ||
|
|
4446
|
+
es(r) || bo(r) || en("handlerType"), bo(r) && Object.values(r).some(function(e) {
|
|
4447
4447
|
return !es(e);
|
|
4448
4448
|
}) && en("handlersType");
|
|
4449
4449
|
}
|
|
4450
4450
|
function _2(r) {
|
|
4451
|
-
r || en("initialIsRequired"),
|
|
4451
|
+
r || en("initialIsRequired"), bo(r) || en("initialType"), B2(r) && en("initialContent");
|
|
4452
4452
|
}
|
|
4453
4453
|
function V2(r, e) {
|
|
4454
4454
|
throw new Error(r[e] || r.default);
|
|
@@ -4566,7 +4566,7 @@ var iv = {
|
|
|
4566
4566
|
type: "cancelation",
|
|
4567
4567
|
msg: "operation is manually canceled"
|
|
4568
4568
|
};
|
|
4569
|
-
function
|
|
4569
|
+
function Ba(r) {
|
|
4570
4570
|
var e = !1, t = new Promise(function(n, i) {
|
|
4571
4571
|
r.then(function(s) {
|
|
4572
4572
|
return e ? i(iv) : n(s);
|
|
@@ -4582,10 +4582,10 @@ var sv = ["monaco"], ov = J2.create({
|
|
|
4582
4582
|
resolve: null,
|
|
4583
4583
|
reject: null,
|
|
4584
4584
|
monaco: null
|
|
4585
|
-
}), Sh = D2(ov, 2), gs = Sh[0],
|
|
4585
|
+
}), Sh = D2(ov, 2), gs = Sh[0], Jo = Sh[1];
|
|
4586
4586
|
function av(r) {
|
|
4587
4587
|
var e = rv.config(r), t = e.monaco, n = O2(e, sv);
|
|
4588
|
-
|
|
4588
|
+
Jo(function(i) {
|
|
4589
4589
|
return {
|
|
4590
4590
|
config: xh(i.config, n),
|
|
4591
4591
|
monaco: t
|
|
@@ -4602,15 +4602,15 @@ function lv() {
|
|
|
4602
4602
|
};
|
|
4603
4603
|
});
|
|
4604
4604
|
if (!r.isInitialized) {
|
|
4605
|
-
if (
|
|
4605
|
+
if (Jo({
|
|
4606
4606
|
isInitialized: !0
|
|
4607
4607
|
}), r.monaco)
|
|
4608
|
-
return r.resolve(r.monaco),
|
|
4608
|
+
return r.resolve(r.monaco), Ba(Fa);
|
|
4609
4609
|
if (window.monaco && window.monaco.editor)
|
|
4610
|
-
return kh(window.monaco), r.resolve(window.monaco),
|
|
4610
|
+
return kh(window.monaco), r.resolve(window.monaco), Ba(Fa);
|
|
4611
4611
|
nv(uv, dv)(fv);
|
|
4612
4612
|
}
|
|
4613
|
-
return
|
|
4613
|
+
return Ba(Fa);
|
|
4614
4614
|
}
|
|
4615
4615
|
function uv(r) {
|
|
4616
4616
|
return document.body.appendChild(r);
|
|
@@ -4648,7 +4648,7 @@ function fv() {
|
|
|
4648
4648
|
});
|
|
4649
4649
|
}
|
|
4650
4650
|
function kh(r) {
|
|
4651
|
-
gs().monaco ||
|
|
4651
|
+
gs().monaco || Jo({
|
|
4652
4652
|
monaco: r
|
|
4653
4653
|
});
|
|
4654
4654
|
}
|
|
@@ -4658,8 +4658,8 @@ function hv() {
|
|
|
4658
4658
|
return e;
|
|
4659
4659
|
});
|
|
4660
4660
|
}
|
|
4661
|
-
var
|
|
4662
|
-
return
|
|
4661
|
+
var Fa = new Promise(function(r, e) {
|
|
4662
|
+
return Jo({
|
|
4663
4663
|
resolve: r,
|
|
4664
4664
|
reject: e
|
|
4665
4665
|
});
|
|
@@ -4667,15 +4667,15 @@ var Ba = new Promise(function(r, e) {
|
|
|
4667
4667
|
config: av,
|
|
4668
4668
|
init: lv,
|
|
4669
4669
|
__getMonacoInstance: hv
|
|
4670
|
-
}, pv = { wrapper: { display: "flex", position: "relative", textAlign: "initial" }, fullWidth: { width: "100%" }, hide: { display: "none" } },
|
|
4670
|
+
}, pv = { wrapper: { display: "flex", position: "relative", textAlign: "initial" }, fullWidth: { width: "100%" }, hide: { display: "none" } }, $a = pv, mv = { container: { display: "flex", height: "100%", width: "100%", justifyContent: "center", alignItems: "center" } }, gv = mv;
|
|
4671
4671
|
function vv({ children: r }) {
|
|
4672
4672
|
return We.createElement("div", { style: gv.container }, r);
|
|
4673
4673
|
}
|
|
4674
4674
|
var yv = vv, bv = yv;
|
|
4675
4675
|
function wv({ width: r, height: e, isEditorReady: t, loading: n, _ref: i, className: s, wrapperProps: o }) {
|
|
4676
|
-
return We.createElement("section", { style: {
|
|
4676
|
+
return We.createElement("section", { style: { ...$a.wrapper, width: r, height: e }, ...o }, !t && We.createElement(bv, null, n), We.createElement("div", { ref: i, style: { ...$a.fullWidth, ...!t && $a.hide }, className: s }));
|
|
4677
4677
|
}
|
|
4678
|
-
var xv = wv, Ch =
|
|
4678
|
+
var xv = wv, Ch = qo(xv);
|
|
4679
4679
|
function Sv(r) {
|
|
4680
4680
|
qe(r, []);
|
|
4681
4681
|
}
|
|
@@ -4729,12 +4729,12 @@ function Mv({ original: r, modified: e, language: t, originalLanguage: n, modifi
|
|
|
4729
4729
|
}, [u], k), Dt(() => {
|
|
4730
4730
|
N.current?.updateOptions(d);
|
|
4731
4731
|
}, [d], k);
|
|
4732
|
-
let se =
|
|
4732
|
+
let se = vo(() => {
|
|
4733
4733
|
if (!R.current) return;
|
|
4734
4734
|
B.current(R.current);
|
|
4735
4735
|
let K = ri(R.current, r || "", n || t || "text", s || ""), Q = ri(R.current, e || "", i || t || "text", o || "");
|
|
4736
4736
|
N.current?.setModel({ original: K, modified: Q });
|
|
4737
|
-
}, [t, e, i, r, n, s, o]), ge =
|
|
4737
|
+
}, [t, e, i, r, n, s, o]), ge = vo(() => {
|
|
4738
4738
|
!te.current && L.current && (N.current = R.current.editor.createDiffEditor(L.current, { automaticLayout: !0, ...d }), se(), R.current?.editor.setTheme(u), E(!0), te.current = !0);
|
|
4739
4739
|
}, [d, u, se]);
|
|
4740
4740
|
qe(() => {
|
|
@@ -4749,7 +4749,7 @@ function Mv({ original: r, modified: e, language: t, originalLanguage: n, modifi
|
|
|
4749
4749
|
return We.createElement(Ch, { width: f, height: h, isEditorReady: k, loading: c, _ref: L, className: m, wrapperProps: v });
|
|
4750
4750
|
}
|
|
4751
4751
|
var Ev = Mv;
|
|
4752
|
-
|
|
4752
|
+
qo(Ev);
|
|
4753
4753
|
function Av(r) {
|
|
4754
4754
|
let e = De();
|
|
4755
4755
|
return qe(() => {
|
|
@@ -4777,7 +4777,7 @@ function Nv({ defaultValue: r, defaultLanguage: e, defaultPath: t, value: n, lan
|
|
|
4777
4777
|
}, [a], A), Dt(() => {
|
|
4778
4778
|
z.current?.editor.setTheme(o);
|
|
4779
4779
|
}, [o], A);
|
|
4780
|
-
let ke =
|
|
4780
|
+
let ke = vo(() => {
|
|
4781
4781
|
if (!(!te.current || !z.current) && !Se.current) {
|
|
4782
4782
|
ge.current(z.current);
|
|
4783
4783
|
let x = s || t, D = ri(z.current, n || r || "", e || i || "", x || "");
|
|
@@ -4813,7 +4813,7 @@ function Nv({ defaultValue: r, defaultLanguage: e, defaultPath: t, value: n, lan
|
|
|
4813
4813
|
}
|
|
4814
4814
|
return We.createElement(Ch, { width: f, height: m, isEditorReady: A, loading: l, _ref: te, className: v, wrapperProps: y });
|
|
4815
4815
|
}
|
|
4816
|
-
var Dv = Nv, Rv =
|
|
4816
|
+
var Dv = Nv, Rv = qo(Dv);
|
|
4817
4817
|
const Pv = {
|
|
4818
4818
|
automaticLayout: !0,
|
|
4819
4819
|
minimap: { enabled: !1 },
|
|
@@ -5261,11 +5261,11 @@ class H {
|
|
|
5261
5261
|
}
|
|
5262
5262
|
}
|
|
5263
5263
|
H.empty = new H([], 0);
|
|
5264
|
-
const
|
|
5264
|
+
const Ha = { index: 0, offset: 0 };
|
|
5265
5265
|
function Ls(r, e) {
|
|
5266
|
-
return
|
|
5266
|
+
return Ha.index = r, Ha.offset = e, Ha;
|
|
5267
5267
|
}
|
|
5268
|
-
function
|
|
5268
|
+
function wo(r, e) {
|
|
5269
5269
|
if (r === e)
|
|
5270
5270
|
return !0;
|
|
5271
5271
|
if (!(r && typeof r == "object") || !(e && typeof e == "object"))
|
|
@@ -5277,11 +5277,11 @@ function bo(r, e) {
|
|
|
5277
5277
|
if (r.length != e.length)
|
|
5278
5278
|
return !1;
|
|
5279
5279
|
for (let n = 0; n < r.length; n++)
|
|
5280
|
-
if (!
|
|
5280
|
+
if (!wo(r[n], e[n]))
|
|
5281
5281
|
return !1;
|
|
5282
5282
|
} else {
|
|
5283
5283
|
for (let n in r)
|
|
5284
|
-
if (!(n in e) || !
|
|
5284
|
+
if (!(n in e) || !wo(r[n], e[n]))
|
|
5285
5285
|
return !1;
|
|
5286
5286
|
for (let n in e)
|
|
5287
5287
|
if (!(n in r))
|
|
@@ -5343,7 +5343,7 @@ let Ie = class ql {
|
|
|
5343
5343
|
another mark.
|
|
5344
5344
|
*/
|
|
5345
5345
|
eq(e) {
|
|
5346
|
-
return this == e || this.type == e.type &&
|
|
5346
|
+
return this == e || this.type == e.type && wo(this.attrs, e.attrs);
|
|
5347
5347
|
}
|
|
5348
5348
|
/**
|
|
5349
5349
|
Convert this mark to a JSON-serializeable representation.
|
|
@@ -5395,7 +5395,7 @@ let Ie = class ql {
|
|
|
5395
5395
|
}
|
|
5396
5396
|
};
|
|
5397
5397
|
Ie.none = [];
|
|
5398
|
-
class
|
|
5398
|
+
class xo extends Error {
|
|
5399
5399
|
}
|
|
5400
5400
|
class X {
|
|
5401
5401
|
/**
|
|
@@ -5498,9 +5498,9 @@ function Dh(r, e, t, n) {
|
|
|
5498
5498
|
}
|
|
5499
5499
|
function zv(r, e, t) {
|
|
5500
5500
|
if (t.openStart > r.depth)
|
|
5501
|
-
throw new
|
|
5501
|
+
throw new xo("Inserted content deeper than insertion position");
|
|
5502
5502
|
if (r.depth - t.openStart != e.depth - t.openEnd)
|
|
5503
|
-
throw new
|
|
5503
|
+
throw new xo("Inconsistent open depths");
|
|
5504
5504
|
return Rh(r, e, t, 0);
|
|
5505
5505
|
}
|
|
5506
5506
|
function Rh(r, e, t, n) {
|
|
@@ -5516,11 +5516,11 @@ function Rh(r, e, t, n) {
|
|
|
5516
5516
|
let { start: o, end: a } = Lv(t, r);
|
|
5517
5517
|
return Dn(s, Ih(r, o, a, e, n));
|
|
5518
5518
|
}
|
|
5519
|
-
else return Dn(s,
|
|
5519
|
+
else return Dn(s, So(r, e, n));
|
|
5520
5520
|
}
|
|
5521
5521
|
function Ph(r, e) {
|
|
5522
5522
|
if (!e.type.compatibleContent(r.type))
|
|
5523
|
-
throw new
|
|
5523
|
+
throw new xo("Cannot join " + e.type.name + " onto " + r.type.name);
|
|
5524
5524
|
}
|
|
5525
5525
|
function Wl(r, e, t) {
|
|
5526
5526
|
let n = r.node(t);
|
|
@@ -5542,13 +5542,13 @@ function Dn(r, e) {
|
|
|
5542
5542
|
}
|
|
5543
5543
|
function Ih(r, e, t, n, i) {
|
|
5544
5544
|
let s = r.depth > i && Wl(r, e, i + 1), o = n.depth > i && Wl(t, n, i + 1), a = [];
|
|
5545
|
-
return Vi(null, r, i, a), s && o && e.index(i) == t.index(i) ? (Ph(s, o), Nn(Dn(s, Ih(r, e, t, n, i + 1)), a)) : (s && Nn(Dn(s,
|
|
5545
|
+
return Vi(null, r, i, a), s && o && e.index(i) == t.index(i) ? (Ph(s, o), Nn(Dn(s, Ih(r, e, t, n, i + 1)), a)) : (s && Nn(Dn(s, So(r, e, i + 1)), a), Vi(e, t, i, a), o && Nn(Dn(o, So(t, n, i + 1)), a)), Vi(n, null, i, a), new H(a);
|
|
5546
5546
|
}
|
|
5547
|
-
function
|
|
5547
|
+
function So(r, e, t) {
|
|
5548
5548
|
let n = [];
|
|
5549
5549
|
if (Vi(null, r, t, n), r.depth > t) {
|
|
5550
5550
|
let i = Wl(r, e, t + 1);
|
|
5551
|
-
Nn(Dn(i,
|
|
5551
|
+
Nn(Dn(i, So(r, e, t + 1)), n);
|
|
5552
5552
|
}
|
|
5553
5553
|
return Vi(e, null, t, n), new H(n);
|
|
5554
5554
|
}
|
|
@@ -5746,7 +5746,7 @@ class ts {
|
|
|
5746
5746
|
return e.blockRange(this);
|
|
5747
5747
|
for (let n = this.depth - (this.parent.inlineContent || this.pos == e.pos ? 1 : 0); n >= 0; n--)
|
|
5748
5748
|
if (e.pos <= this.end(n) && (!t || t(this.node(n))))
|
|
5749
|
-
return new
|
|
5749
|
+
return new ko(this, e, n);
|
|
5750
5750
|
return null;
|
|
5751
5751
|
}
|
|
5752
5752
|
/**
|
|
@@ -5814,7 +5814,7 @@ class Bv {
|
|
|
5814
5814
|
}
|
|
5815
5815
|
}
|
|
5816
5816
|
const Fv = 12, Tc = /* @__PURE__ */ new WeakMap();
|
|
5817
|
-
class
|
|
5817
|
+
class ko {
|
|
5818
5818
|
/**
|
|
5819
5819
|
Construct a node range. `$from` and `$to` should point into the
|
|
5820
5820
|
same node until at least the given `depth`, since a node range
|
|
@@ -5973,7 +5973,7 @@ let tn = class Ul {
|
|
|
5973
5973
|
attributes, and marks.
|
|
5974
5974
|
*/
|
|
5975
5975
|
hasMarkup(e, t, n) {
|
|
5976
|
-
return this.type == e &&
|
|
5976
|
+
return this.type == e && wo(this.attrs, t || e.defaultAttrs || $v) && Ie.sameSet(this.marks, n || Ie.none);
|
|
5977
5977
|
}
|
|
5978
5978
|
/**
|
|
5979
5979
|
Create a new node with the same markup as this node, containing
|
|
@@ -6847,7 +6847,7 @@ class Xv {
|
|
|
6847
6847
|
return !this.hasDefault;
|
|
6848
6848
|
}
|
|
6849
6849
|
}
|
|
6850
|
-
class
|
|
6850
|
+
class Yo {
|
|
6851
6851
|
/**
|
|
6852
6852
|
@internal
|
|
6853
6853
|
*/
|
|
@@ -6869,7 +6869,7 @@ class Jo {
|
|
|
6869
6869
|
*/
|
|
6870
6870
|
static compile(e, t) {
|
|
6871
6871
|
let n = /* @__PURE__ */ Object.create(null), i = 0;
|
|
6872
|
-
return e.forEach((s, o) => n[s] = new
|
|
6872
|
+
return e.forEach((s, o) => n[s] = new Yo(s, i++, t, o)), n;
|
|
6873
6873
|
}
|
|
6874
6874
|
/**
|
|
6875
6875
|
When there is a mark of this type in the given set, a new set
|
|
@@ -6911,7 +6911,7 @@ class Vh {
|
|
|
6911
6911
|
let t = this.spec = {};
|
|
6912
6912
|
for (let i in e)
|
|
6913
6913
|
t[i] = e[i];
|
|
6914
|
-
t.nodes = ot.from(e.nodes), t.marks = ot.from(e.marks || {}), this.nodes = Ec.compile(this.spec.nodes, this), this.marks =
|
|
6914
|
+
t.nodes = ot.from(e.nodes), t.marks = ot.from(e.marks || {}), this.nodes = Ec.compile(this.spec.nodes, this), this.marks = Yo.compile(this.spec.marks, this);
|
|
6915
6915
|
let n = /* @__PURE__ */ Object.create(null);
|
|
6916
6916
|
for (let i in this.nodes) {
|
|
6917
6917
|
if (i in this.marks)
|
|
@@ -7520,7 +7520,7 @@ class Hn {
|
|
|
7520
7520
|
nodes.
|
|
7521
7521
|
*/
|
|
7522
7522
|
serializeFragment(e, t = {}, n) {
|
|
7523
|
-
n || (n =
|
|
7523
|
+
n || (n = ja(t).createDocumentFragment());
|
|
7524
7524
|
let i = n, s = [];
|
|
7525
7525
|
return e.forEach((o) => {
|
|
7526
7526
|
if (s.length || o.marks.length) {
|
|
@@ -7549,7 +7549,7 @@ class Hn {
|
|
|
7549
7549
|
@internal
|
|
7550
7550
|
*/
|
|
7551
7551
|
serializeNodeInner(e, t) {
|
|
7552
|
-
let { dom: n, contentDOM: i } = uo(
|
|
7552
|
+
let { dom: n, contentDOM: i } = uo(ja(t), this.nodes[e.type.name](e), null, e.attrs);
|
|
7553
7553
|
if (i) {
|
|
7554
7554
|
if (e.isLeaf)
|
|
7555
7555
|
throw new RangeError("Content hole not allowed in a leaf node spec");
|
|
@@ -7577,7 +7577,7 @@ class Hn {
|
|
|
7577
7577
|
*/
|
|
7578
7578
|
serializeMark(e, t, n = {}) {
|
|
7579
7579
|
let i = this.marks[e.type.name];
|
|
7580
|
-
return i && uo(
|
|
7580
|
+
return i && uo(ja(n), i(e, t), null, e.attrs);
|
|
7581
7581
|
}
|
|
7582
7582
|
static renderSpec(e, t, n = null, i) {
|
|
7583
7583
|
return uo(e, t, n, i);
|
|
@@ -7612,7 +7612,7 @@ function Pc(r) {
|
|
|
7612
7612
|
}
|
|
7613
7613
|
return e;
|
|
7614
7614
|
}
|
|
7615
|
-
function
|
|
7615
|
+
function ja(r) {
|
|
7616
7616
|
return r.document || window.document;
|
|
7617
7617
|
}
|
|
7618
7618
|
const Ic = /* @__PURE__ */ new WeakMap();
|
|
@@ -7927,7 +7927,7 @@ class ns {
|
|
|
7927
7927
|
return n ? e : new Jl(e, i, null);
|
|
7928
7928
|
}
|
|
7929
7929
|
}
|
|
7930
|
-
const
|
|
7930
|
+
const _a = /* @__PURE__ */ Object.create(null);
|
|
7931
7931
|
class ht {
|
|
7932
7932
|
/**
|
|
7933
7933
|
Get the step map that represents the changes made by this step,
|
|
@@ -7952,7 +7952,7 @@ class ht {
|
|
|
7952
7952
|
static fromJSON(e, t) {
|
|
7953
7953
|
if (!t || !t.stepType)
|
|
7954
7954
|
throw new RangeError("Invalid input for Step.fromJSON");
|
|
7955
|
-
let n =
|
|
7955
|
+
let n = _a[t.stepType];
|
|
7956
7956
|
if (!n)
|
|
7957
7957
|
throw new RangeError(`No step type ${t.stepType} defined`);
|
|
7958
7958
|
return n.fromJSON(e, t);
|
|
@@ -7964,9 +7964,9 @@ class ht {
|
|
|
7964
7964
|
that's unlikely to clash with steps from other modules.
|
|
7965
7965
|
*/
|
|
7966
7966
|
static jsonID(e, t) {
|
|
7967
|
-
if (e in
|
|
7967
|
+
if (e in _a)
|
|
7968
7968
|
throw new RangeError("Duplicate use of step JSON ID " + e);
|
|
7969
|
-
return
|
|
7969
|
+
return _a[e] = t, t.prototype.jsonID = e, t;
|
|
7970
7970
|
}
|
|
7971
7971
|
}
|
|
7972
7972
|
class Xe {
|
|
@@ -7997,7 +7997,7 @@ class Xe {
|
|
|
7997
7997
|
try {
|
|
7998
7998
|
return Xe.ok(e.replace(t, n, i));
|
|
7999
7999
|
} catch (s) {
|
|
8000
|
-
if (s instanceof
|
|
8000
|
+
if (s instanceof xo)
|
|
8001
8001
|
return Xe.fail(s.message);
|
|
8002
8002
|
throw s;
|
|
8003
8003
|
}
|
|
@@ -8313,7 +8313,7 @@ function ly(r, e, t, n) {
|
|
|
8313
8313
|
return;
|
|
8314
8314
|
s++;
|
|
8315
8315
|
let l = null;
|
|
8316
|
-
if (n instanceof
|
|
8316
|
+
if (n instanceof Yo) {
|
|
8317
8317
|
let u = o.marks, c;
|
|
8318
8318
|
for (; c = n.isInSet(u); )
|
|
8319
8319
|
(l || (l = [])).push(c), u = c.removeFromSet(u);
|
|
@@ -8513,7 +8513,7 @@ function yy(r, e) {
|
|
|
8513
8513
|
function Qh(r, e) {
|
|
8514
8514
|
return !!(r && e && !r.isLeaf && yy(r, e));
|
|
8515
8515
|
}
|
|
8516
|
-
function
|
|
8516
|
+
function Xo(r, e, t = -1) {
|
|
8517
8517
|
let n = r.resolve(e);
|
|
8518
8518
|
for (let i = n.depth; ; i--) {
|
|
8519
8519
|
let s, o, a = n.index(i);
|
|
@@ -8586,7 +8586,7 @@ function ep(r, e, t) {
|
|
|
8586
8586
|
}
|
|
8587
8587
|
return null;
|
|
8588
8588
|
}
|
|
8589
|
-
function
|
|
8589
|
+
function Zo(r, e, t = e, n = X.empty) {
|
|
8590
8590
|
if (e == t && !n.size)
|
|
8591
8591
|
return null;
|
|
8592
8592
|
let i = r.resolve(e), s = r.resolve(t);
|
|
@@ -8641,7 +8641,7 @@ class xy {
|
|
|
8641
8641
|
for (let t = 1; t <= 2; t++)
|
|
8642
8642
|
for (let n = t == 1 ? e : this.unplaced.openStart; n >= 0; n--) {
|
|
8643
8643
|
let i, s = null;
|
|
8644
|
-
n ? (s =
|
|
8644
|
+
n ? (s = Va(this.unplaced.content, n - 1).firstChild, i = s.content) : i = this.unplaced.content;
|
|
8645
8645
|
let o = i.firstChild;
|
|
8646
8646
|
for (let a = this.depth; a >= 0; a--) {
|
|
8647
8647
|
let { type: l, match: u } = this.frontier[a], c, d = null;
|
|
@@ -8655,11 +8655,11 @@ class xy {
|
|
|
8655
8655
|
}
|
|
8656
8656
|
}
|
|
8657
8657
|
openMore() {
|
|
8658
|
-
let { content: e, openStart: t, openEnd: n } = this.unplaced, i =
|
|
8658
|
+
let { content: e, openStart: t, openEnd: n } = this.unplaced, i = Va(e, t);
|
|
8659
8659
|
return !i.childCount || i.firstChild.isLeaf ? !1 : (this.unplaced = new X(e, t + 1, Math.max(n, i.size + t >= e.size - n ? t + 1 : 0)), !0);
|
|
8660
8660
|
}
|
|
8661
8661
|
dropNode() {
|
|
8662
|
-
let { content: e, openStart: t, openEnd: n } = this.unplaced, i =
|
|
8662
|
+
let { content: e, openStart: t, openEnd: n } = this.unplaced, i = Va(e, t);
|
|
8663
8663
|
if (i.childCount <= 1 && t > 0) {
|
|
8664
8664
|
let s = e.size - t <= t + i.size;
|
|
8665
8665
|
this.unplaced = new X(Fi(e, t - 1, 1), t - 1, s ? t - 1 : n);
|
|
@@ -8700,7 +8700,7 @@ class xy {
|
|
|
8700
8700
|
if (!this.$to.parent.isTextblock)
|
|
8701
8701
|
return -1;
|
|
8702
8702
|
let e = this.frontier[this.depth], t;
|
|
8703
|
-
if (!e.type.isTextblock || !
|
|
8703
|
+
if (!e.type.isTextblock || !qa(this.$to, this.$to.depth, e.type, e.match, !1) || this.$to.depth == this.depth && (t = this.findCloseLevel(this.$to)) && t.depth == this.depth)
|
|
8704
8704
|
return -1;
|
|
8705
8705
|
let { depth: n } = this.$to, i = this.$to.after(n);
|
|
8706
8706
|
for (; n > 1 && i == this.$to.end(--n); )
|
|
@@ -8709,10 +8709,10 @@ class xy {
|
|
|
8709
8709
|
}
|
|
8710
8710
|
findCloseLevel(e) {
|
|
8711
8711
|
e: for (let t = Math.min(this.depth, e.depth); t >= 0; t--) {
|
|
8712
|
-
let { match: n, type: i } = this.frontier[t], s = t < e.depth && e.end(t + 1) == e.pos + (e.depth - (t + 1)), o =
|
|
8712
|
+
let { match: n, type: i } = this.frontier[t], s = t < e.depth && e.end(t + 1) == e.pos + (e.depth - (t + 1)), o = qa(e, t, i, n, s);
|
|
8713
8713
|
if (o) {
|
|
8714
8714
|
for (let a = t - 1; a >= 0; a--) {
|
|
8715
|
-
let { match: l, type: u } = this.frontier[a], c =
|
|
8715
|
+
let { match: l, type: u } = this.frontier[a], c = qa(e, a, u, l, !0);
|
|
8716
8716
|
if (!c || c.childCount)
|
|
8717
8717
|
continue e;
|
|
8718
8718
|
}
|
|
@@ -8748,7 +8748,7 @@ function Fi(r, e, t) {
|
|
|
8748
8748
|
function $i(r, e, t) {
|
|
8749
8749
|
return e == 0 ? r.append(t) : r.replaceChild(r.childCount - 1, r.lastChild.copy($i(r.lastChild.content, e - 1, t)));
|
|
8750
8750
|
}
|
|
8751
|
-
function
|
|
8751
|
+
function Va(r, e) {
|
|
8752
8752
|
for (let t = 0; t < e; t++)
|
|
8753
8753
|
r = r.firstChild.content;
|
|
8754
8754
|
return r;
|
|
@@ -8759,7 +8759,7 @@ function rp(r, e, t) {
|
|
|
8759
8759
|
let n = r.content;
|
|
8760
8760
|
return e > 1 && (n = n.replaceChild(0, rp(n.firstChild, e - 1, n.childCount == 1 ? t - 1 : 0))), e > 0 && (n = r.type.contentMatch.fillBefore(n).append(n), t <= 0 && (n = n.append(r.type.contentMatch.matchFragment(n).fillBefore(H.empty, !0)))), r.copy(n);
|
|
8761
8761
|
}
|
|
8762
|
-
function
|
|
8762
|
+
function qa(r, e, t, n, i) {
|
|
8763
8763
|
let s = r.node(e), o = i ? r.indexAfter(e) : r.index(e);
|
|
8764
8764
|
if (o == s.childCount && !t.compatibleContent(s.type))
|
|
8765
8765
|
return null;
|
|
@@ -8994,7 +8994,7 @@ class sp {
|
|
|
8994
8994
|
given `slice`.
|
|
8995
8995
|
*/
|
|
8996
8996
|
replace(e, t = e, n = X.empty) {
|
|
8997
|
-
let i =
|
|
8997
|
+
let i = Zo(this.doc, e, t, n);
|
|
8998
8998
|
return i && this.step(i), this;
|
|
8999
8999
|
}
|
|
9000
9000
|
/**
|
|
@@ -9170,7 +9170,7 @@ class sp {
|
|
|
9170
9170
|
return z0(this, e, t, n), this;
|
|
9171
9171
|
}
|
|
9172
9172
|
}
|
|
9173
|
-
const
|
|
9173
|
+
const Wa = /* @__PURE__ */ Object.create(null);
|
|
9174
9174
|
class me {
|
|
9175
9175
|
/**
|
|
9176
9176
|
Initialize a selection with the head and anchor and ranges. If no
|
|
@@ -9306,7 +9306,7 @@ class me {
|
|
|
9306
9306
|
static fromJSON(e, t) {
|
|
9307
9307
|
if (!t || !t.type)
|
|
9308
9308
|
throw new RangeError("Invalid input for Selection.fromJSON");
|
|
9309
|
-
let n =
|
|
9309
|
+
let n = Wa[t.type];
|
|
9310
9310
|
if (!n)
|
|
9311
9311
|
throw new RangeError(`No selection type ${t.type} defined`);
|
|
9312
9312
|
return n.fromJSON(e, t);
|
|
@@ -9318,9 +9318,9 @@ class me {
|
|
|
9318
9318
|
clash with classes from other modules.
|
|
9319
9319
|
*/
|
|
9320
9320
|
static jsonID(e, t) {
|
|
9321
|
-
if (e in
|
|
9321
|
+
if (e in Wa)
|
|
9322
9322
|
throw new RangeError("Duplicate use of selection JSON ID " + e);
|
|
9323
|
-
return
|
|
9323
|
+
return Wa[e] = t, t.prototype.jsonID = e, t;
|
|
9324
9324
|
}
|
|
9325
9325
|
/**
|
|
9326
9326
|
Get a [bookmark](https://prosemirror.net/docs/ref/#state.SelectionBookmark) for this selection,
|
|
@@ -9379,7 +9379,7 @@ class be extends me {
|
|
|
9379
9379
|
return e instanceof be && e.anchor == this.anchor && e.head == this.head;
|
|
9380
9380
|
}
|
|
9381
9381
|
getBookmark() {
|
|
9382
|
-
return new
|
|
9382
|
+
return new Qo(this.anchor, this.head);
|
|
9383
9383
|
}
|
|
9384
9384
|
toJSON() {
|
|
9385
9385
|
return { type: "text", anchor: this.anchor, head: this.head };
|
|
@@ -9420,12 +9420,12 @@ class be extends me {
|
|
|
9420
9420
|
}
|
|
9421
9421
|
}
|
|
9422
9422
|
me.jsonID("text", be);
|
|
9423
|
-
class
|
|
9423
|
+
class Qo {
|
|
9424
9424
|
constructor(e, t) {
|
|
9425
9425
|
this.anchor = e, this.head = t;
|
|
9426
9426
|
}
|
|
9427
9427
|
map(e) {
|
|
9428
|
-
return new
|
|
9428
|
+
return new Qo(e.map(this.anchor), e.map(this.head));
|
|
9429
9429
|
}
|
|
9430
9430
|
resolve(e) {
|
|
9431
9431
|
return be.between(e.resolve(this.anchor), e.resolve(this.head));
|
|
@@ -9486,7 +9486,7 @@ class B0 {
|
|
|
9486
9486
|
}
|
|
9487
9487
|
map(e) {
|
|
9488
9488
|
let { deleted: t, pos: n } = e.mapResult(this.anchor);
|
|
9489
|
-
return t ? new
|
|
9489
|
+
return t ? new Qo(n, n) : new B0(n);
|
|
9490
9490
|
}
|
|
9491
9491
|
resolve(e) {
|
|
9492
9492
|
let t = e.resolve(this.anchor), n = t.nodeAfter;
|
|
@@ -9759,7 +9759,7 @@ const Oy = [
|
|
|
9759
9759
|
}
|
|
9760
9760
|
})
|
|
9761
9761
|
];
|
|
9762
|
-
class
|
|
9762
|
+
class Ua {
|
|
9763
9763
|
constructor(e, t) {
|
|
9764
9764
|
this.schema = e, this.plugins = [], this.pluginsByKey = /* @__PURE__ */ Object.create(null), this.fields = Oy.slice(), t && t.forEach((n) => {
|
|
9765
9765
|
if (this.pluginsByKey[n.key])
|
|
@@ -9860,7 +9860,7 @@ class ni {
|
|
|
9860
9860
|
Create a new state.
|
|
9861
9861
|
*/
|
|
9862
9862
|
static create(e) {
|
|
9863
|
-
let t = new
|
|
9863
|
+
let t = new Ua(e.doc ? e.doc.type.schema : e.schema, e.plugins), n = new ni(t);
|
|
9864
9864
|
for (let i = 0; i < t.fields.length; i++)
|
|
9865
9865
|
n[t.fields[i].name] = t.fields[i].init(e, n);
|
|
9866
9866
|
return n;
|
|
@@ -9874,7 +9874,7 @@ class ni {
|
|
|
9874
9874
|
configuration object..
|
|
9875
9875
|
*/
|
|
9876
9876
|
reconfigure(e) {
|
|
9877
|
-
let t = new
|
|
9877
|
+
let t = new Ua(this.schema, e.plugins), n = t.fields, i = new ni(t);
|
|
9878
9878
|
for (let s = 0; s < n.length; s++) {
|
|
9879
9879
|
let o = n[s].name;
|
|
9880
9880
|
i[o] = this.hasOwnProperty(o) ? this[o] : n[s].init(e, i);
|
|
@@ -9911,7 +9911,7 @@ class ni {
|
|
|
9911
9911
|
throw new RangeError("Invalid input for EditorState.fromJSON");
|
|
9912
9912
|
if (!e.schema)
|
|
9913
9913
|
throw new RangeError("Required config field 'schema' missing");
|
|
9914
|
-
let i = new
|
|
9914
|
+
let i = new Ua(e.schema, e.plugins), s = new ni(i);
|
|
9915
9915
|
return i.fields.forEach((o) => {
|
|
9916
9916
|
if (o.name == "doc")
|
|
9917
9917
|
s.doc = tn.fromJSON(e.schema, t.doc);
|
|
@@ -9954,9 +9954,9 @@ class Ge {
|
|
|
9954
9954
|
return e[this.key];
|
|
9955
9955
|
}
|
|
9956
9956
|
}
|
|
9957
|
-
const
|
|
9957
|
+
const Ka = /* @__PURE__ */ Object.create(null);
|
|
9958
9958
|
function lp(r) {
|
|
9959
|
-
return r in
|
|
9959
|
+
return r in Ka ? r + "$" + ++Ka[r] : (Ka[r] = 0, r + "$");
|
|
9960
9960
|
}
|
|
9961
9961
|
class Ye {
|
|
9962
9962
|
/**
|
|
@@ -9998,7 +9998,7 @@ const cp = (r, e, t) => {
|
|
|
9998
9998
|
return !0;
|
|
9999
9999
|
if (n.parent.content.size == 0 && (di(s, "end") || le.isSelectable(s)))
|
|
10000
10000
|
for (let o = n.depth; ; o--) {
|
|
10001
|
-
let a =
|
|
10001
|
+
let a = Zo(r.doc, n.before(o), n.after(o), X.empty);
|
|
10002
10002
|
if (a && a.slice.size < a.to - a.from) {
|
|
10003
10003
|
if (e) {
|
|
10004
10004
|
let l = r.tr.step(a);
|
|
@@ -10042,7 +10042,7 @@ function dp(r, e, t) {
|
|
|
10042
10042
|
return !1;
|
|
10043
10043
|
a = c;
|
|
10044
10044
|
}
|
|
10045
|
-
let u =
|
|
10045
|
+
let u = Zo(r.doc, s, l, X.empty);
|
|
10046
10046
|
if (!u || u.from != s || u instanceof rt && u.slice.size >= l - s)
|
|
10047
10047
|
return !1;
|
|
10048
10048
|
if (t) {
|
|
@@ -10097,7 +10097,7 @@ const pp = (r, e, t) => {
|
|
|
10097
10097
|
if (bp(r, i, e, 1))
|
|
10098
10098
|
return !0;
|
|
10099
10099
|
if (n.parent.content.size == 0 && (di(s, "start") || le.isSelectable(s))) {
|
|
10100
|
-
let o =
|
|
10100
|
+
let o = Zo(r.doc, n.before(), n.after(), X.empty);
|
|
10101
10101
|
if (o && o.slice.size < o.to - o.from) {
|
|
10102
10102
|
if (e) {
|
|
10103
10103
|
let a = r.tr.step(o);
|
|
@@ -10136,7 +10136,7 @@ const Ry = (r, e) => {
|
|
|
10136
10136
|
if (t.node.isTextblock || !pn(r.doc, t.from))
|
|
10137
10137
|
return !1;
|
|
10138
10138
|
i = t.from;
|
|
10139
|
-
} else if (i =
|
|
10139
|
+
} else if (i = Xo(r.doc, t.from, -1), i == null)
|
|
10140
10140
|
return !1;
|
|
10141
10141
|
if (e) {
|
|
10142
10142
|
let s = r.tr.join(i);
|
|
@@ -10149,7 +10149,7 @@ const Ry = (r, e) => {
|
|
|
10149
10149
|
if (t.node.isTextblock || !pn(r.doc, t.to))
|
|
10150
10150
|
return !1;
|
|
10151
10151
|
n = t.to;
|
|
10152
|
-
} else if (n =
|
|
10152
|
+
} else if (n = Xo(r.doc, t.to, 1), n == null)
|
|
10153
10153
|
return !1;
|
|
10154
10154
|
return e && e(r.tr.join(n).scrollIntoView()), !0;
|
|
10155
10155
|
}, Iy = (r, e) => {
|
|
@@ -10355,7 +10355,7 @@ function qy(r, e, t, n = null) {
|
|
|
10355
10355
|
if (e.$from.index(e.depth - 1) == 0)
|
|
10356
10356
|
return !1;
|
|
10357
10357
|
let l = o.resolve(e.start - 2);
|
|
10358
|
-
s = new
|
|
10358
|
+
s = new ko(l, l, e.depth), e.endIndex < e.parent.childCount && (e = new ko(e.$from, o.resolve(e.$to.end(e.depth)), e.depth)), i = !0;
|
|
10359
10359
|
}
|
|
10360
10360
|
let a = L0(s, t, n, e);
|
|
10361
10361
|
return a ? (r && Wy(r, e, a, i, t), !0) : !1;
|
|
@@ -10381,7 +10381,7 @@ function Uy(r) {
|
|
|
10381
10381
|
}
|
|
10382
10382
|
function Ky(r, e, t, n) {
|
|
10383
10383
|
let i = r.tr, s = n.end, o = n.$to.end(n.depth);
|
|
10384
|
-
s < o && (i.step(new it(s - 1, o, s, o, new X(H.from(t.create(null, n.parent.copy())), 1, 0), 1, !0)), n = new
|
|
10384
|
+
s < o && (i.step(new it(s - 1, o, s, o, new X(H.from(t.create(null, n.parent.copy())), 1, 0), 1, !0)), n = new ko(i.doc.resolve(n.$from.pos), i.doc.resolve(o), n.depth));
|
|
10385
10385
|
const a = wi(n);
|
|
10386
10386
|
if (a == null)
|
|
10387
10387
|
return !1;
|
|
@@ -10506,7 +10506,7 @@ function vs(r) {
|
|
|
10506
10506
|
;
|
|
10507
10507
|
return e && e.node && e.node.isBlock && (e.dom == r || e.contentDOM == r);
|
|
10508
10508
|
}
|
|
10509
|
-
const
|
|
10509
|
+
const ea = function(r) {
|
|
10510
10510
|
return r.focusNode && Bn(r.focusNode, r.focusOffset, r.anchorNode, r.anchorOffset);
|
|
10511
10511
|
};
|
|
10512
10512
|
function En(r, e) {
|
|
@@ -10773,14 +10773,14 @@ function Ap(r, e, t) {
|
|
|
10773
10773
|
if (s == null && i && (t < 0 || i == _t(n))) {
|
|
10774
10774
|
let l = n.childNodes[i - 1];
|
|
10775
10775
|
if (l.nodeType == 1)
|
|
10776
|
-
return
|
|
10776
|
+
return Ga(l.getBoundingClientRect(), !1);
|
|
10777
10777
|
}
|
|
10778
10778
|
if (s == null && i < _t(n)) {
|
|
10779
10779
|
let l = n.childNodes[i];
|
|
10780
10780
|
if (l.nodeType == 1)
|
|
10781
|
-
return
|
|
10781
|
+
return Ga(l.getBoundingClientRect(), !0);
|
|
10782
10782
|
}
|
|
10783
|
-
return
|
|
10783
|
+
return Ga(n.getBoundingClientRect(), t >= 0);
|
|
10784
10784
|
}
|
|
10785
10785
|
if (s == null && i && (t < 0 || i == _t(n))) {
|
|
10786
10786
|
let l = n.childNodes[i - 1], u = l.nodeType == 3 ? Tr(l, _t(l) - (o ? 0 : 1)) : l.nodeType == 1 && (l.nodeName != "BR" || !l.nextSibling) ? l : null;
|
|
@@ -10803,7 +10803,7 @@ function Ii(r, e) {
|
|
|
10803
10803
|
let t = e ? r.left : r.right;
|
|
10804
10804
|
return { top: r.top, bottom: r.bottom, left: t, right: t };
|
|
10805
10805
|
}
|
|
10806
|
-
function
|
|
10806
|
+
function Ga(r, e) {
|
|
10807
10807
|
if (r.height == 0)
|
|
10808
10808
|
return r;
|
|
10809
10809
|
let t = e ? r.top : r.bottom;
|
|
@@ -11340,7 +11340,7 @@ class sn extends bs {
|
|
|
11340
11340
|
} else c || ({ dom: c, contentDOM: d } = Hn.renderSpec(document, t.type.spec.toDOM(t), null, t.attrs));
|
|
11341
11341
|
!d && !t.isText && c.nodeName != "BR" && (c.hasAttribute("contenteditable") || (c.contentEditable = "false"), t.type.spec.draggable && (c.draggable = !0));
|
|
11342
11342
|
let h = c;
|
|
11343
|
-
return c = Ip(c, n, t), u ? l = new w5(e, t, n, i, c, d || null, h, u, s, o + 1) : t.isText ? new
|
|
11343
|
+
return c = Ip(c, n, t), u ? l = new w5(e, t, n, i, c, d || null, h, u, s, o + 1) : t.isText ? new ta(e, t, n, i, c, h, s) : new sn(e, t, n, i, c, d || null, h, s, o + 1);
|
|
11344
11344
|
}
|
|
11345
11345
|
parseRule() {
|
|
11346
11346
|
if (this.node.type.spec.reparseInView)
|
|
@@ -11363,7 +11363,7 @@ class sn extends bs {
|
|
|
11363
11363
|
return e;
|
|
11364
11364
|
}
|
|
11365
11365
|
matchesNode(e, t, n) {
|
|
11366
|
-
return this.dirty == Wt && e.eq(this.node) &&
|
|
11366
|
+
return this.dirty == Wt && e.eq(this.node) && To(t, this.outerDeco) && n.eq(this.innerDeco);
|
|
11367
11367
|
}
|
|
11368
11368
|
get size() {
|
|
11369
11369
|
return this.node.nodeSize;
|
|
@@ -11421,7 +11421,7 @@ class sn extends bs {
|
|
|
11421
11421
|
this.updateOuterDeco(t), this.node = e, this.innerDeco = n, this.contentDOM && this.updateChildren(i, this.posAtStart), this.dirty = Wt;
|
|
11422
11422
|
}
|
|
11423
11423
|
updateOuterDeco(e) {
|
|
11424
|
-
if (
|
|
11424
|
+
if (To(e, this.outerDeco))
|
|
11425
11425
|
return;
|
|
11426
11426
|
let t = this.nodeDOM.nodeType != 1, n = this.dom;
|
|
11427
11427
|
this.dom = Pp(this.dom, this.nodeDOM, t0(this.outerDeco, this.node, t), t0(e, this.node, t)), this.dom != n && (n.pmViewDesc = void 0, this.dom.pmViewDesc = this), this.outerDeco = e;
|
|
@@ -11443,7 +11443,7 @@ function Zc(r, e, t, n, i) {
|
|
|
11443
11443
|
let s = new sn(void 0, r, e, t, n, n, n, i, 0);
|
|
11444
11444
|
return s.contentDOM && s.updateChildren(i, 0), s;
|
|
11445
11445
|
}
|
|
11446
|
-
class
|
|
11446
|
+
class ta extends sn {
|
|
11447
11447
|
constructor(e, t, n, i, s, o, a) {
|
|
11448
11448
|
super(e, t, n, i, s, null, o, a, 0);
|
|
11449
11449
|
}
|
|
@@ -11474,7 +11474,7 @@ class ea extends sn {
|
|
|
11474
11474
|
}
|
|
11475
11475
|
slice(e, t, n) {
|
|
11476
11476
|
let i = this.node.cut(e, t), s = document.createTextNode(i.text);
|
|
11477
|
-
return new
|
|
11477
|
+
return new ta(this.parent, i, this.outerDeco, this.innerDeco, s, s, n);
|
|
11478
11478
|
}
|
|
11479
11479
|
markDirty(e, t) {
|
|
11480
11480
|
super.markDirty(e, t), this.dom != this.nodeDOM && (e == 0 || t == this.nodeDOM.nodeValue.length) && (this.dirty = hr);
|
|
@@ -11613,7 +11613,7 @@ function x5(r, e, t) {
|
|
|
11613
11613
|
function Ip(r, e, t) {
|
|
11614
11614
|
return Pp(r, r, On, t0(e, t, r.nodeType != 1));
|
|
11615
11615
|
}
|
|
11616
|
-
function
|
|
11616
|
+
function To(r, e) {
|
|
11617
11617
|
if (r.length != e.length)
|
|
11618
11618
|
return !1;
|
|
11619
11619
|
for (let t = 0; t < r.length; t++)
|
|
@@ -11715,7 +11715,7 @@ class S5 {
|
|
|
11715
11715
|
let u = this.preMatch.matched.get(l);
|
|
11716
11716
|
if (u != null && u != s)
|
|
11717
11717
|
return !1;
|
|
11718
|
-
let c = l.dom, d, h = this.isLocked(c) && !(e.isText && l.node && l.node.isText && l.nodeDOM.nodeValue == e.text && l.dirty != hr &&
|
|
11718
|
+
let c = l.dom, d, h = this.isLocked(c) && !(e.isText && l.node && l.node.isText && l.nodeDOM.nodeValue == e.text && l.dirty != hr && To(t, l.outerDeco));
|
|
11719
11719
|
if (!h && l.update(e, t, n, i))
|
|
11720
11720
|
return this.destroyBetween(this.index, a), l.dom != c && (this.changed = !0), this.index++, !0;
|
|
11721
11721
|
if (!h && (d = this.recreateWrapper(l, e, t, n, i, o)))
|
|
@@ -11728,7 +11728,7 @@ class S5 {
|
|
|
11728
11728
|
// When a node with content is replaced by a different node with
|
|
11729
11729
|
// identical content, move over its children.
|
|
11730
11730
|
recreateWrapper(e, t, n, i, s, o) {
|
|
11731
|
-
if (e.dirty || t.isAtom || !e.children.length || !e.node.content.eq(t.content) || !
|
|
11731
|
+
if (e.dirty || t.isAtom || !e.children.length || !e.node.content.eq(t.content) || !To(n, e.outerDeco) || !i.eq(e.innerDeco))
|
|
11732
11732
|
return null;
|
|
11733
11733
|
let a = sn.create(this.top, t, n, i, s, o);
|
|
11734
11734
|
if (a.contentDOM) {
|
|
@@ -11759,7 +11759,7 @@ class S5 {
|
|
|
11759
11759
|
for (; e instanceof Fn; )
|
|
11760
11760
|
t = e, e = t.children[t.children.length - 1];
|
|
11761
11761
|
(!e || // Empty textblock
|
|
11762
|
-
!(e instanceof
|
|
11762
|
+
!(e instanceof ta) || /\n$/.test(e.node.text) || this.view.requiresGeckoHackNode && /\s$/.test(e.node.text)) && ((dt || nt) && e && e.dom.contentEditable == "false" && this.addHackNode("IMG", t), this.addHackNode("BR", this.top));
|
|
11763
11763
|
}
|
|
11764
11764
|
addHackNode(e, t) {
|
|
11765
11765
|
if (t == this.top && this.index < t.children.length && t.children[this.index].matchesHack(e))
|
|
@@ -11899,7 +11899,7 @@ function q0(r, e = null) {
|
|
|
11899
11899
|
if (o < 0)
|
|
11900
11900
|
return null;
|
|
11901
11901
|
let a = n.resolve(o), l, u;
|
|
11902
|
-
if (
|
|
11902
|
+
if (ea(t)) {
|
|
11903
11903
|
for (l = o; i && !i.node; )
|
|
11904
11904
|
i = i.parent;
|
|
11905
11905
|
let d = i.node;
|
|
@@ -11955,15 +11955,15 @@ const ed = dt || nt && Sp < 63;
|
|
|
11955
11955
|
function td(r, e) {
|
|
11956
11956
|
let { node: t, offset: n } = r.docView.domFromPos(e, 0), i = n < t.childNodes.length ? t.childNodes[n] : null, s = n ? t.childNodes[n - 1] : null;
|
|
11957
11957
|
if (dt && i && i.contentEditable == "false")
|
|
11958
|
-
return
|
|
11958
|
+
return Ja(i);
|
|
11959
11959
|
if ((!i || i.contentEditable == "false") && (!s || s.contentEditable == "false")) {
|
|
11960
11960
|
if (i)
|
|
11961
|
-
return
|
|
11961
|
+
return Ja(i);
|
|
11962
11962
|
if (s)
|
|
11963
|
-
return
|
|
11963
|
+
return Ja(s);
|
|
11964
11964
|
}
|
|
11965
11965
|
}
|
|
11966
|
-
function
|
|
11966
|
+
function Ja(r) {
|
|
11967
11967
|
return r.contentEditable = "true", dt && r.draggable && (r.draggable = !1, r.wasDraggable = !0), r;
|
|
11968
11968
|
}
|
|
11969
11969
|
function rd(r) {
|
|
@@ -12053,7 +12053,7 @@ function sd(r, e, t) {
|
|
|
12053
12053
|
}
|
|
12054
12054
|
}
|
|
12055
12055
|
}
|
|
12056
|
-
function
|
|
12056
|
+
function Co(r) {
|
|
12057
12057
|
return r.nodeType == 3 ? r.nodeValue.length : r.childNodes.length;
|
|
12058
12058
|
}
|
|
12059
12059
|
function Ui(r, e) {
|
|
@@ -12068,7 +12068,7 @@ function D5(r) {
|
|
|
12068
12068
|
if (!t)
|
|
12069
12069
|
return;
|
|
12070
12070
|
let i, s, o = !1;
|
|
12071
|
-
for (qt && t.nodeType == 1 && n <
|
|
12071
|
+
for (qt && t.nodeType == 1 && n < Co(t) && Ui(t.childNodes[n], -1) && (o = !0); ; )
|
|
12072
12072
|
if (n > 0) {
|
|
12073
12073
|
if (t.nodeType != 1)
|
|
12074
12074
|
break;
|
|
@@ -12089,7 +12089,7 @@ function D5(r) {
|
|
|
12089
12089
|
for (; a && Ui(a, -1); )
|
|
12090
12090
|
i = t.parentNode, s = at(a), a = a.previousSibling;
|
|
12091
12091
|
if (a)
|
|
12092
|
-
t = a, n =
|
|
12092
|
+
t = a, n = Co(t);
|
|
12093
12093
|
else {
|
|
12094
12094
|
if (t = t.parentNode, t == r.dom)
|
|
12095
12095
|
break;
|
|
@@ -12103,7 +12103,7 @@ function R5(r) {
|
|
|
12103
12103
|
let e = r.domSelectionRange(), t = e.focusNode, n = e.focusOffset;
|
|
12104
12104
|
if (!t)
|
|
12105
12105
|
return;
|
|
12106
|
-
let i =
|
|
12106
|
+
let i = Co(t), s, o;
|
|
12107
12107
|
for (; ; )
|
|
12108
12108
|
if (n < i) {
|
|
12109
12109
|
if (t.nodeType != 1)
|
|
@@ -12121,7 +12121,7 @@ function R5(r) {
|
|
|
12121
12121
|
for (; a && Ui(a, 1); )
|
|
12122
12122
|
s = a.parentNode, o = at(a) + 1, a = a.nextSibling;
|
|
12123
12123
|
if (a)
|
|
12124
|
-
t = a, n = 0, i =
|
|
12124
|
+
t = a, n = 0, i = Co(t);
|
|
12125
12125
|
else {
|
|
12126
12126
|
if (t = t.parentNode, t == r.dom)
|
|
12127
12127
|
break;
|
|
@@ -12167,7 +12167,7 @@ function i0(r, e, t) {
|
|
|
12167
12167
|
let n = r.domSelection();
|
|
12168
12168
|
if (!n)
|
|
12169
12169
|
return;
|
|
12170
|
-
if (
|
|
12170
|
+
if (ea(n)) {
|
|
12171
12171
|
let s = document.createRange();
|
|
12172
12172
|
s.setEnd(e, t), s.setStart(e, t), n.removeAllRanges(), n.addRange(s);
|
|
12173
12173
|
} else n.extend && n.extend(e, t);
|
|
@@ -12419,10 +12419,10 @@ let dd = null;
|
|
|
12419
12419
|
function qp() {
|
|
12420
12420
|
return dd || (dd = document.implementation.createHTMLDocument("title"));
|
|
12421
12421
|
}
|
|
12422
|
-
let
|
|
12422
|
+
let Ya = null;
|
|
12423
12423
|
function H5(r) {
|
|
12424
12424
|
let e = window.trustedTypes;
|
|
12425
|
-
return e ? (
|
|
12425
|
+
return e ? (Ya || (Ya = e.defaultPolicy || e.createPolicy("ProseMirrorClipboard", { createHTML: (t) => t })), Ya.createHTML(r)) : r;
|
|
12426
12426
|
}
|
|
12427
12427
|
function j5(r) {
|
|
12428
12428
|
let e = /^(\s*<meta [^>]*>)*/.exec(r);
|
|
@@ -12534,7 +12534,7 @@ St.keypress = (r, e) => {
|
|
|
12534
12534
|
!/[\r\n]/.test(i) && !r.someProp("handleTextInput", (o) => o(r, n.$from.pos, n.$to.pos, i, s)) && r.dispatch(s()), t.preventDefault();
|
|
12535
12535
|
}
|
|
12536
12536
|
};
|
|
12537
|
-
function
|
|
12537
|
+
function ra(r) {
|
|
12538
12538
|
return { left: r.clientX, top: r.clientY };
|
|
12539
12539
|
}
|
|
12540
12540
|
function Y5(r, e) {
|
|
@@ -12605,7 +12605,7 @@ function r3(r, e, t) {
|
|
|
12605
12605
|
}
|
|
12606
12606
|
}
|
|
12607
12607
|
function J0(r) {
|
|
12608
|
-
return
|
|
12608
|
+
return Mo(r);
|
|
12609
12609
|
}
|
|
12610
12610
|
const Wp = jt ? "metaKey" : "ctrlKey";
|
|
12611
12611
|
xt.mousedown = (r, e) => {
|
|
@@ -12613,7 +12613,7 @@ xt.mousedown = (r, e) => {
|
|
|
12613
12613
|
r.input.shiftKey = t.shiftKey;
|
|
12614
12614
|
let n = J0(r), i = Date.now(), s = "singleClick";
|
|
12615
12615
|
i - r.input.lastClick.time < 500 && Y5(t, r.input.lastClick) && !t[Wp] && r.input.lastClick.button == t.button && (r.input.lastClick.type == "singleClick" ? s = "doubleClick" : r.input.lastClick.type == "doubleClick" && (s = "tripleClick")), r.input.lastClick = { time: i, x: t.clientX, y: t.clientY, type: s, button: t.button };
|
|
12616
|
-
let o = r.posAtCoords(
|
|
12616
|
+
let o = r.posAtCoords(ra(t));
|
|
12617
12617
|
o && (s == "singleClick" ? (r.input.mouseDown && r.input.mouseDown.done(), r.input.mouseDown = new n3(r, o, t, !!n)) : (s == "doubleClick" ? e3 : t3)(r, o.pos, o.inside, t) ? t.preventDefault() : Zr(r, "pointer"));
|
|
12618
12618
|
};
|
|
12619
12619
|
class n3 {
|
|
@@ -12645,7 +12645,7 @@ class n3 {
|
|
|
12645
12645
|
if (this.done(), !this.view.dom.contains(e.target))
|
|
12646
12646
|
return;
|
|
12647
12647
|
let t = this.pos;
|
|
12648
|
-
this.view.state.doc != this.startDoc && (t = this.view.posAtCoords(
|
|
12648
|
+
this.view.state.doc != this.startDoc && (t = this.view.posAtCoords(ra(e))), this.updateAllowDefault(e), this.allowDefault || !t ? Zr(this.view, "pointer") : Q5(this.view, t.pos, t.inside, e, this.selectNode) ? e.preventDefault() : e.button == 0 && (this.flushed || // Safari ignores clicks on draggable elements
|
|
12649
12649
|
dt && this.mightDrag && !this.mightDrag.node.isAtom || // Chrome will sometimes treat a node selection as a
|
|
12650
12650
|
// cursor, but still report that the node is selected
|
|
12651
12651
|
// when asked through getSelection. You'll then get a
|
|
@@ -12678,8 +12678,8 @@ St.compositionstart = St.compositionupdate = (r) => {
|
|
|
12678
12678
|
r.domObserver.flush();
|
|
12679
12679
|
let { state: e } = r, t = e.selection.$to;
|
|
12680
12680
|
if (e.selection instanceof be && (e.storedMarks || !t.textOffset && t.parentOffset && t.nodeBefore.marks.some((n) => n.type.spec.inclusive === !1) || nt && kp && s3(r)))
|
|
12681
|
-
r.markCursor = r.state.storedMarks || t.marks(),
|
|
12682
|
-
else if (
|
|
12681
|
+
r.markCursor = r.state.storedMarks || t.marks(), Mo(r, !0), r.markCursor = null;
|
|
12682
|
+
else if (Mo(r, !e.selection.empty), qt && e.selection.empty && t.parentOffset && !t.textOffset && t.nodeBefore.marks.length) {
|
|
12683
12683
|
let n = r.domSelectionRange();
|
|
12684
12684
|
for (let i = n.focusNode, s = n.focusOffset; i && i.nodeType == 1 && s != 0; ) {
|
|
12685
12685
|
let o = s < 0 ? i.lastChild : i.childNodes[s - 1];
|
|
@@ -12708,7 +12708,7 @@ St.compositionend = (r, e) => {
|
|
|
12708
12708
|
r.composing && (r.input.composing = !1, r.input.compositionEndedAt = e.timeStamp, r.input.compositionPendingChanges = r.domObserver.pendingRecords().length ? r.input.compositionID : 0, r.input.compositionNode = null, r.input.compositionPendingChanges && Promise.resolve().then(() => r.domObserver.flush()), r.input.compositionID++, Kp(r, 20));
|
|
12709
12709
|
};
|
|
12710
12710
|
function Kp(r, e) {
|
|
12711
|
-
clearTimeout(r.input.composingTimeout), e > -1 && (r.input.composingTimeout = setTimeout(() =>
|
|
12711
|
+
clearTimeout(r.input.composingTimeout), e > -1 && (r.input.composingTimeout = setTimeout(() => Mo(r), e));
|
|
12712
12712
|
}
|
|
12713
12713
|
function Gp(r) {
|
|
12714
12714
|
for (r.composing && (r.input.composing = !1, r.input.compositionEndedAt = a3()); r.input.compositionNodes.length > 0; )
|
|
@@ -12737,7 +12737,7 @@ function a3() {
|
|
|
12737
12737
|
let r = document.createEvent("Event");
|
|
12738
12738
|
return r.initEvent("event", !0, !0), r.timeStamp;
|
|
12739
12739
|
}
|
|
12740
|
-
function
|
|
12740
|
+
function Mo(r, e = !1) {
|
|
12741
12741
|
if (!(Ar && r.domObserver.flushingSoon >= 0)) {
|
|
12742
12742
|
if (r.domObserver.forceFlush(), Gp(r), e || r.docView && r.docView.dirty) {
|
|
12743
12743
|
let t = q0(r), n = r.state.selection;
|
|
@@ -12814,7 +12814,7 @@ xt.dragstart = (r, e) => {
|
|
|
12814
12814
|
let t = e, n = r.input.mouseDown;
|
|
12815
12815
|
if (n && n.done(), !t.dataTransfer)
|
|
12816
12816
|
return;
|
|
12817
|
-
let i = r.state.selection, s = i.empty ? null : r.posAtCoords(
|
|
12817
|
+
let i = r.state.selection, s = i.empty ? null : r.posAtCoords(ra(t)), o;
|
|
12818
12818
|
if (!(s && s.pos >= i.from && s.pos <= (i instanceof le ? i.to - 1 : i.to))) {
|
|
12819
12819
|
if (n && n.mightDrag)
|
|
12820
12820
|
o = le.create(r.state.doc, n.mightDrag.pos);
|
|
@@ -12843,7 +12843,7 @@ St.drop = (r, e) => {
|
|
|
12843
12843
|
function f3(r, e, t) {
|
|
12844
12844
|
if (!e.dataTransfer)
|
|
12845
12845
|
return;
|
|
12846
|
-
let n = r.posAtCoords(
|
|
12846
|
+
let n = r.posAtCoords(ra(e));
|
|
12847
12847
|
if (!n)
|
|
12848
12848
|
return;
|
|
12849
12849
|
let i = r.state.doc.resolve(n.pos), s = t && t.slice;
|
|
@@ -12911,7 +12911,7 @@ function ls(r, e) {
|
|
|
12911
12911
|
return !1;
|
|
12912
12912
|
return !0;
|
|
12913
12913
|
}
|
|
12914
|
-
class
|
|
12914
|
+
class Eo {
|
|
12915
12915
|
constructor(e, t) {
|
|
12916
12916
|
this.toDOM = e, this.spec = t || Rn, this.side = this.spec.side || 0;
|
|
12917
12917
|
}
|
|
@@ -12923,7 +12923,7 @@ class Mo {
|
|
|
12923
12923
|
return !0;
|
|
12924
12924
|
}
|
|
12925
12925
|
eq(e) {
|
|
12926
|
-
return this == e || e instanceof
|
|
12926
|
+
return this == e || e instanceof Eo && (this.spec.key && this.spec.key == e.spec.key || this.toDOM == e.toDOM && ls(this.spec, e.spec));
|
|
12927
12927
|
}
|
|
12928
12928
|
destroy(e) {
|
|
12929
12929
|
this.spec.destroy && this.spec.destroy(e);
|
|
@@ -13004,7 +13004,7 @@ class yt {
|
|
|
13004
13004
|
widget's current document position.
|
|
13005
13005
|
*/
|
|
13006
13006
|
static widget(e, t, n) {
|
|
13007
|
-
return new yt(e, e, new
|
|
13007
|
+
return new yt(e, e, new Eo(t, n));
|
|
13008
13008
|
}
|
|
13009
13009
|
/**
|
|
13010
13010
|
Creates an inline decoration, which adds the given attributes to
|
|
@@ -13038,7 +13038,7 @@ class yt {
|
|
|
13038
13038
|
@internal
|
|
13039
13039
|
*/
|
|
13040
13040
|
get widget() {
|
|
13041
|
-
return this.type instanceof
|
|
13041
|
+
return this.type instanceof Eo;
|
|
13042
13042
|
}
|
|
13043
13043
|
}
|
|
13044
13044
|
const Qn = [], Rn = {};
|
|
@@ -13055,7 +13055,7 @@ class _e {
|
|
|
13055
13055
|
you must make a copy if you want need to preserve that.
|
|
13056
13056
|
*/
|
|
13057
13057
|
static create(e, t) {
|
|
13058
|
-
return t.length ?
|
|
13058
|
+
return t.length ? Ao(t, e, 0, Rn) : ct;
|
|
13059
13059
|
}
|
|
13060
13060
|
/**
|
|
13061
13061
|
Find all decorations in this set which touch the given range
|
|
@@ -13114,7 +13114,7 @@ class _e {
|
|
|
13114
13114
|
if (c = Qp(t, a, u)) {
|
|
13115
13115
|
for (i || (i = this.children.slice()); s < i.length && i[s] < l; )
|
|
13116
13116
|
s += 3;
|
|
13117
|
-
i[s] == l ? i[s + 2] = i[s + 2].addInner(a, c, u + 1) : i.splice(s, 0, l, l + a.nodeSize,
|
|
13117
|
+
i[s] == l ? i[s + 2] = i[s + 2].addInner(a, c, u + 1) : i.splice(s, 0, l, l + a.nodeSize, Ao(c, a, u + 1, Rn)), s += 3;
|
|
13118
13118
|
}
|
|
13119
13119
|
});
|
|
13120
13120
|
let o = Zp(s ? em(t) : t, -n);
|
|
@@ -13310,7 +13310,7 @@ function h3(r, e, t, n, i, s, o) {
|
|
|
13310
13310
|
l = !0;
|
|
13311
13311
|
}
|
|
13312
13312
|
if (l) {
|
|
13313
|
-
let u = p3(a, r, e, t, i, s, o), c =
|
|
13313
|
+
let u = p3(a, r, e, t, i, s, o), c = Ao(u, n, 0, o);
|
|
13314
13314
|
e = c.local;
|
|
13315
13315
|
for (let d = 0; d < a.length; d += 3)
|
|
13316
13316
|
a[d + 1] < 0 && (a.splice(d, 3), d -= 3);
|
|
@@ -13360,13 +13360,13 @@ function em(r) {
|
|
|
13360
13360
|
r[t] != null && e.push(r[t]);
|
|
13361
13361
|
return e;
|
|
13362
13362
|
}
|
|
13363
|
-
function
|
|
13363
|
+
function Ao(r, e, t, n) {
|
|
13364
13364
|
let i = [], s = !1;
|
|
13365
13365
|
e.forEach((a, l) => {
|
|
13366
13366
|
let u = Qp(r, a, l + t);
|
|
13367
13367
|
if (u) {
|
|
13368
13368
|
s = !0;
|
|
13369
|
-
let c =
|
|
13369
|
+
let c = Ao(u, a, t + l + 1, n);
|
|
13370
13370
|
c != ct && i.push(l, l + a.nodeSize, c);
|
|
13371
13371
|
}
|
|
13372
13372
|
});
|
|
@@ -13401,7 +13401,7 @@ function fd(r, e, t) {
|
|
|
13401
13401
|
e++;
|
|
13402
13402
|
r.splice(e, 0, t);
|
|
13403
13403
|
}
|
|
13404
|
-
function
|
|
13404
|
+
function Xa(r) {
|
|
13405
13405
|
let e = [];
|
|
13406
13406
|
return r.someProp("decorations", (t) => {
|
|
13407
13407
|
let n = t(r.state);
|
|
@@ -13543,7 +13543,7 @@ class y3 {
|
|
|
13543
13543
|
}
|
|
13544
13544
|
}
|
|
13545
13545
|
let u = null;
|
|
13546
|
-
s < 0 && i && e.input.lastFocus > Date.now() - 200 && Math.max(e.input.lastTouch, e.input.lastClick.time) < Date.now() - 300 &&
|
|
13546
|
+
s < 0 && i && e.input.lastFocus > Date.now() - 200 && Math.max(e.input.lastTouch, e.input.lastClick.time) < Date.now() - 300 && ea(n) && (u = q0(e)) && u.eq(me.near(e.state.doc.resolve(0), 1)) ? (e.input.lastFocus = 0, Dr(e), this.currentSelection.set(n), e.scrollToSelection()) : (s > -1 || i) && (s > -1 && (e.docView.markDirty(s, o), b3(e)), this.handleDOMChange(s, o, a, l), e.docView && e.docView.dirty ? e.updateState(e.state) : this.currentSelection.eq(n) || Dr(e), this.currentSelection.set(n));
|
|
13547
13547
|
}
|
|
13548
13548
|
registerMutation(e, t) {
|
|
13549
13549
|
if (t.indexOf(e.target) > -1)
|
|
@@ -13612,7 +13612,7 @@ function x3(r, e) {
|
|
|
13612
13612
|
}
|
|
13613
13613
|
function S3(r, e, t) {
|
|
13614
13614
|
let { node: n, fromOffset: i, toOffset: s, from: o, to: a } = r.docView.parseRange(e, t), l = r.domSelectionRange(), u, c = l.anchorNode;
|
|
13615
|
-
if (c && r.dom.contains(c.nodeType == 1 ? c : c.parentNode) && (u = [{ node: c, offset: l.anchorOffset }],
|
|
13615
|
+
if (c && r.dom.contains(c.nodeType == 1 ? c : c.parentNode) && (u = [{ node: c, offset: l.anchorOffset }], ea(l) || u.push({ node: l.focusNode, offset: l.focusOffset })), nt && r.input.lastKeyCode === 8)
|
|
13616
13616
|
for (let y = s; y > i; y--) {
|
|
13617
13617
|
let w = n.childNodes[y - 1], k = w.pmViewDesc;
|
|
13618
13618
|
if (w.nodeName == "BR" && !k) {
|
|
@@ -13755,7 +13755,7 @@ function E3(r, e, t, n, i) {
|
|
|
13755
13755
|
if (
|
|
13756
13756
|
// The content must have shrunk
|
|
13757
13757
|
t - e <= i.pos - n.pos || // newEnd must point directly at or after the end of the block that newStart points into
|
|
13758
|
-
|
|
13758
|
+
Za(n, !0, !1) < i.pos
|
|
13759
13759
|
)
|
|
13760
13760
|
return !1;
|
|
13761
13761
|
let s = r.resolve(e);
|
|
@@ -13765,10 +13765,10 @@ function E3(r, e, t, n, i) {
|
|
|
13765
13765
|
}
|
|
13766
13766
|
if (s.parentOffset < s.parent.content.size || !s.parent.isTextblock)
|
|
13767
13767
|
return !1;
|
|
13768
|
-
let o = r.resolve(
|
|
13769
|
-
return !o.parent.isTextblock || o.pos > t ||
|
|
13768
|
+
let o = r.resolve(Za(s, !0, !0));
|
|
13769
|
+
return !o.parent.isTextblock || o.pos > t || Za(o, !0, !1) < t ? !1 : n.parent.content.cut(n.parentOffset).eq(o.parent.content);
|
|
13770
13770
|
}
|
|
13771
|
-
function
|
|
13771
|
+
function Za(r, e, t) {
|
|
13772
13772
|
let n = r.depth, i = e ? r.end() : r.pos;
|
|
13773
13773
|
for (; n > 0 && (e || r.indexAfter(n) == r.node(n).childCount); )
|
|
13774
13774
|
n--, i++, e = !1;
|
|
@@ -13812,7 +13812,7 @@ class tm {
|
|
|
13812
13812
|
added to the document.
|
|
13813
13813
|
*/
|
|
13814
13814
|
constructor(e, t) {
|
|
13815
|
-
this._root = null, this.focused = !1, this.trackWrites = null, this.mounted = !1, this.markCursor = null, this.cursorWrapper = null, this.lastSelectedViewDesc = void 0, this.input = new W5(), this.prevDirectPlugins = [], this.pluginViews = [], this.requiresGeckoHackNode = !1, this.dragging = null, this._props = t, this.state = t.state, this.directPlugins = t.plugins || [], this.directPlugins.forEach(Sd), this.dispatch = this.dispatch.bind(this), this.dom = e && e.mount || document.createElement("div"), e && (e.appendChild ? e.appendChild(this.dom) : typeof e == "function" ? e(this.dom) : e.mount && (this.mounted = !0)), this.editable = wd(this), bd(this), this.nodeViews = xd(this), this.docView = Zc(this.state.doc, yd(this),
|
|
13815
|
+
this._root = null, this.focused = !1, this.trackWrites = null, this.mounted = !1, this.markCursor = null, this.cursorWrapper = null, this.lastSelectedViewDesc = void 0, this.input = new W5(), this.prevDirectPlugins = [], this.pluginViews = [], this.requiresGeckoHackNode = !1, this.dragging = null, this._props = t, this.state = t.state, this.directPlugins = t.plugins || [], this.directPlugins.forEach(Sd), this.dispatch = this.dispatch.bind(this), this.dom = e && e.mount || document.createElement("div"), e && (e.appendChild ? e.appendChild(this.dom) : typeof e == "function" ? e(this.dom) : e.mount && (this.mounted = !0)), this.editable = wd(this), bd(this), this.nodeViews = xd(this), this.docView = Zc(this.state.doc, yd(this), Xa(this), this.dom, this), this.domObserver = new y3(this, (n, i, s, o) => C3(this, n, i, s, o)), this.domObserver.start(), U5(this), this.updatePluginViews();
|
|
13816
13816
|
}
|
|
13817
13817
|
/**
|
|
13818
13818
|
Holds `true` when a
|
|
@@ -13875,7 +13875,7 @@ class tm {
|
|
|
13875
13875
|
N3(f, this.nodeViews) && (this.nodeViews = f, s = !0);
|
|
13876
13876
|
}
|
|
13877
13877
|
(a || t.handleDOMEvents != this._props.handleDOMEvents) && o0(this), this.editable = wd(this), bd(this);
|
|
13878
|
-
let l =
|
|
13878
|
+
let l = Xa(this), u = yd(this), c = i.plugins != e.plugins && !i.doc.eq(e.doc) ? "reset" : e.scrollToSelection > i.scrollToSelection ? "to selection" : "preserve", d = s || !this.docView.matchesNode(e.doc, u, l);
|
|
13879
13879
|
(d || !e.selection.eq(i.selection)) && (o = !0);
|
|
13880
13880
|
let h = c == "preserve" && o && this.dom.style.overflowAnchor == null && o5(this);
|
|
13881
13881
|
if (o) {
|
|
@@ -14105,7 +14105,7 @@ class tm {
|
|
|
14105
14105
|
views](https://prosemirror.net/docs/ref/#view.NodeView).
|
|
14106
14106
|
*/
|
|
14107
14107
|
destroy() {
|
|
14108
|
-
this.docView && (K5(this), this.destroyPluginViews(), this.mounted ? (this.docView.update(this.state.doc, [],
|
|
14108
|
+
this.docView && (K5(this), this.destroyPluginViews(), this.mounted ? (this.docView.update(this.state.doc, [], Xa(this), this), this.dom.textContent = "") : this.dom.parentNode && this.dom.parentNode.removeChild(this.dom), this.docView.destroy(), this.docView = null, Yy());
|
|
14109
14109
|
}
|
|
14110
14110
|
/**
|
|
14111
14111
|
This is true when the view has been
|
|
@@ -14237,7 +14237,7 @@ var an = {
|
|
|
14237
14237
|
220: "\\",
|
|
14238
14238
|
221: "]",
|
|
14239
14239
|
222: "'"
|
|
14240
|
-
},
|
|
14240
|
+
}, Oo = {
|
|
14241
14241
|
48: ")",
|
|
14242
14242
|
49: "!",
|
|
14243
14243
|
50: "@",
|
|
@@ -14266,10 +14266,10 @@ var an = {
|
|
|
14266
14266
|
for (var lt = 0; lt < 10; lt++) an[48 + lt] = an[96 + lt] = String(lt);
|
|
14267
14267
|
for (var lt = 1; lt <= 24; lt++) an[lt + 111] = "F" + lt;
|
|
14268
14268
|
for (var lt = 65; lt <= 90; lt++)
|
|
14269
|
-
an[lt] = String.fromCharCode(lt + 32),
|
|
14270
|
-
for (var
|
|
14269
|
+
an[lt] = String.fromCharCode(lt + 32), Oo[lt] = String.fromCharCode(lt);
|
|
14270
|
+
for (var Qa in an) Oo.hasOwnProperty(Qa) || (Oo[Qa] = an[Qa]);
|
|
14271
14271
|
function P3(r) {
|
|
14272
|
-
var e = D3 && r.metaKey && r.shiftKey && !r.ctrlKey && !r.altKey || R3 && r.shiftKey && r.key && r.key.length == 1 || r.key == "Unidentified", t = !e && r.key || (r.shiftKey ?
|
|
14272
|
+
var e = D3 && r.metaKey && r.shiftKey && !r.ctrlKey && !r.altKey || R3 && r.shiftKey && r.key && r.key.length == 1 || r.key == "Unidentified", t = !e && r.key || (r.shiftKey ? Oo : an)[r.keyCode] || r.key || "Unidentified";
|
|
14273
14273
|
return t == "Esc" && (t = "Escape"), t == "Del" && (t = "Delete"), t == "Left" && (t = "ArrowLeft"), t == "Up" && (t = "ArrowUp"), t == "Right" && (t = "ArrowRight"), t == "Down" && (t = "ArrowDown"), t;
|
|
14274
14274
|
}
|
|
14275
14275
|
const I3 = typeof navigator < "u" && /Mac|iP(hone|[oa]d)/.test(navigator.platform), z3 = typeof navigator < "u" && /Win/.test(navigator.platform);
|
|
@@ -14300,7 +14300,7 @@ function B3(r) {
|
|
|
14300
14300
|
e[L3(t)] = r[t];
|
|
14301
14301
|
return e;
|
|
14302
14302
|
}
|
|
14303
|
-
function
|
|
14303
|
+
function el(r, e, t = !0) {
|
|
14304
14304
|
return e.altKey && (r = "Alt-" + r), e.ctrlKey && (r = "Ctrl-" + r), e.metaKey && (r = "Meta-" + r), t && e.shiftKey && (r = "Shift-" + r), r;
|
|
14305
14305
|
}
|
|
14306
14306
|
function F3(r) {
|
|
@@ -14309,18 +14309,18 @@ function F3(r) {
|
|
|
14309
14309
|
function Z0(r) {
|
|
14310
14310
|
let e = B3(r);
|
|
14311
14311
|
return function(t, n) {
|
|
14312
|
-
let i = P3(n), s, o = e[
|
|
14312
|
+
let i = P3(n), s, o = e[el(i, n)];
|
|
14313
14313
|
if (o && o(t.state, t.dispatch, t))
|
|
14314
14314
|
return !0;
|
|
14315
14315
|
if (i.length == 1 && i != " ") {
|
|
14316
14316
|
if (n.shiftKey) {
|
|
14317
|
-
let a = e[
|
|
14317
|
+
let a = e[el(i, n, !1)];
|
|
14318
14318
|
if (a && a(t.state, t.dispatch, t))
|
|
14319
14319
|
return !0;
|
|
14320
14320
|
}
|
|
14321
14321
|
if ((n.altKey || n.metaKey || n.ctrlKey) && // Ctrl-Alt may be used for AltGr on Windows
|
|
14322
14322
|
!(z3 && n.ctrlKey && n.altKey) && (s = an[n.keyCode]) && s != i) {
|
|
14323
|
-
let a = e[
|
|
14323
|
+
let a = e[el(s, n)];
|
|
14324
14324
|
if (a && a(t.state, t.dispatch, t))
|
|
14325
14325
|
return !0;
|
|
14326
14326
|
}
|
|
@@ -14332,7 +14332,7 @@ var $3 = Object.defineProperty, Q0 = (r, e) => {
|
|
|
14332
14332
|
for (var t in e)
|
|
14333
14333
|
$3(r, t, { get: e[t], enumerable: !0 });
|
|
14334
14334
|
};
|
|
14335
|
-
function
|
|
14335
|
+
function na(r) {
|
|
14336
14336
|
const { state: e, transaction: t } = r;
|
|
14337
14337
|
let { selection: n } = t, { doc: i } = t, { storedMarks: s } = t;
|
|
14338
14338
|
return {
|
|
@@ -14357,7 +14357,7 @@ function ra(r) {
|
|
|
14357
14357
|
}
|
|
14358
14358
|
};
|
|
14359
14359
|
}
|
|
14360
|
-
var
|
|
14360
|
+
var ia = class {
|
|
14361
14361
|
constructor(r) {
|
|
14362
14362
|
this.editor = r.editor, this.rawCommands = this.editor.extensionManager.commands, this.customState = r.state;
|
|
14363
14363
|
}
|
|
@@ -14408,7 +14408,7 @@ var na = class {
|
|
|
14408
14408
|
tr: r,
|
|
14409
14409
|
editor: n,
|
|
14410
14410
|
view: s,
|
|
14411
|
-
state:
|
|
14411
|
+
state: na({
|
|
14412
14412
|
state: i,
|
|
14413
14413
|
transaction: r
|
|
14414
14414
|
}),
|
|
@@ -14553,12 +14553,12 @@ var K3 = (r) => ({ tr: e, state: t, dispatch: n }) => {
|
|
|
14553
14553
|
function eu(r) {
|
|
14554
14554
|
return Object.prototype.toString.call(r) === "[object RegExp]";
|
|
14555
14555
|
}
|
|
14556
|
-
function
|
|
14556
|
+
function No(r, e, t = { strict: !0 }) {
|
|
14557
14557
|
const n = Object.keys(e);
|
|
14558
14558
|
return n.length ? n.every((i) => t.strict ? e[i] === r[i] : eu(e[i]) ? e[i].test(r[i]) : e[i] === r[i]) : !0;
|
|
14559
14559
|
}
|
|
14560
14560
|
function nm(r, e, t = {}) {
|
|
14561
|
-
return r.find((n) => n.type === e &&
|
|
14561
|
+
return r.find((n) => n.type === e && No(
|
|
14562
14562
|
// Only check equality for the attributes that are provided
|
|
14563
14563
|
Object.fromEntries(Object.keys(t).map((i) => [i, n.attrs[i]])),
|
|
14564
14564
|
t
|
|
@@ -14629,7 +14629,7 @@ function im(r, e = null) {
|
|
|
14629
14629
|
function sm() {
|
|
14630
14630
|
return navigator.platform === "Android" || /android/i.test(navigator.userAgent);
|
|
14631
14631
|
}
|
|
14632
|
-
function
|
|
14632
|
+
function sa() {
|
|
14633
14633
|
return ["iPad Simulator", "iPhone Simulator", "iPod Simulator", "iPad", "iPhone", "iPod"].includes(navigator.platform) || // iPad on iOS 13 detection
|
|
14634
14634
|
navigator.userAgent.includes("Mac") && "ontouchend" in document;
|
|
14635
14635
|
}
|
|
@@ -14639,7 +14639,7 @@ var e6 = (r = null, e = {}) => ({ editor: t, view: n, tr: i, dispatch: s }) => {
|
|
|
14639
14639
|
...e
|
|
14640
14640
|
};
|
|
14641
14641
|
const o = () => {
|
|
14642
|
-
(
|
|
14642
|
+
(sa() || sm()) && n.dom.focus(), requestAnimationFrame(() => {
|
|
14643
14643
|
t.isDestroyed || (n.focus(), e?.scrollIntoView && t.commands.scrollIntoView());
|
|
14644
14644
|
});
|
|
14645
14645
|
};
|
|
@@ -14795,14 +14795,14 @@ var i6 = (r) => !("type" in r), s6 = (r, e, t) => ({ tr: n, dispatch: i, editor:
|
|
|
14795
14795
|
return !0;
|
|
14796
14796
|
}, o6 = () => ({ state: r, dispatch: e }) => Ry(r, e), a6 = () => ({ state: r, dispatch: e }) => Py(r, e), l6 = () => ({ state: r, dispatch: e }) => cp(r, e), u6 = () => ({ state: r, dispatch: e }) => pp(r, e), c6 = () => ({ state: r, dispatch: e, tr: t }) => {
|
|
14797
14797
|
try {
|
|
14798
|
-
const n =
|
|
14798
|
+
const n = Xo(r.doc, r.selection.$from.pos, -1);
|
|
14799
14799
|
return n == null ? !1 : (t.join(n, 2), e && e(t), !0);
|
|
14800
14800
|
} catch {
|
|
14801
14801
|
return !1;
|
|
14802
14802
|
}
|
|
14803
14803
|
}, d6 = () => ({ state: r, dispatch: e, tr: t }) => {
|
|
14804
14804
|
try {
|
|
14805
|
-
const n =
|
|
14805
|
+
const n = Xo(r.doc, r.selection.$from.pos, 1);
|
|
14806
14806
|
return n == null ? !1 : (t.join(n, 2), e && e(t), !0);
|
|
14807
14807
|
} catch {
|
|
14808
14808
|
return !1;
|
|
@@ -14827,7 +14827,7 @@ function p6(r) {
|
|
|
14827
14827
|
else if (/^s(hift)?$/i.test(l))
|
|
14828
14828
|
s = !0;
|
|
14829
14829
|
else if (/^mod$/i.test(l))
|
|
14830
|
-
|
|
14830
|
+
sa() || am() ? o = !0 : i = !0;
|
|
14831
14831
|
else
|
|
14832
14832
|
throw new Error(`Unrecognized modifier name: ${l}`);
|
|
14833
14833
|
}
|
|
@@ -14862,7 +14862,7 @@ function ln(r, e, t = {}) {
|
|
|
14862
14862
|
to: m
|
|
14863
14863
|
});
|
|
14864
14864
|
});
|
|
14865
|
-
const l = i - n, u = a.filter((d) => o ? o.name === d.node.type.name : !0).filter((d) =>
|
|
14865
|
+
const l = i - n, u = a.filter((d) => o ? o.name === d.node.type.name : !0).filter((d) => No(d.node.attrs, t, { strict: !1 }));
|
|
14866
14866
|
return s ? !!u.length : u.reduce((d, h) => d + h.to - h.from, 0) >= l;
|
|
14867
14867
|
}
|
|
14868
14868
|
var g6 = (r, e = {}) => ({ state: t, dispatch: n }) => {
|
|
@@ -14872,7 +14872,7 @@ var g6 = (r, e = {}) => ({ state: t, dispatch: n }) => {
|
|
|
14872
14872
|
const n = Ze(r, e.schema);
|
|
14873
14873
|
return Uy(n)(e, t);
|
|
14874
14874
|
}, b6 = () => ({ state: r, dispatch: e }) => gp(r, e);
|
|
14875
|
-
function
|
|
14875
|
+
function oa(r, e) {
|
|
14876
14876
|
return e.nodes[r] ? "node" : e.marks[r] ? "mark" : null;
|
|
14877
14877
|
}
|
|
14878
14878
|
function Td(r, e) {
|
|
@@ -14881,7 +14881,7 @@ function Td(r, e) {
|
|
|
14881
14881
|
}
|
|
14882
14882
|
var w6 = (r, e) => ({ tr: t, state: n, dispatch: i }) => {
|
|
14883
14883
|
let s = null, o = null;
|
|
14884
|
-
const a =
|
|
14884
|
+
const a = oa(
|
|
14885
14885
|
typeof r == "string" ? r : r.name,
|
|
14886
14886
|
n.schema
|
|
14887
14887
|
);
|
|
@@ -14959,7 +14959,7 @@ function D6(r, e) {
|
|
|
14959
14959
|
};
|
|
14960
14960
|
}
|
|
14961
14961
|
}
|
|
14962
|
-
function
|
|
14962
|
+
function aa(r) {
|
|
14963
14963
|
return (e) => D6(e.$from, r);
|
|
14964
14964
|
}
|
|
14965
14965
|
function ae(r, e, t) {
|
|
@@ -15263,7 +15263,7 @@ function L6(r, e) {
|
|
|
15263
15263
|
return o ? { ...o.attrs } : {};
|
|
15264
15264
|
}
|
|
15265
15265
|
function B6(r, e) {
|
|
15266
|
-
const t =
|
|
15266
|
+
const t = oa(
|
|
15267
15267
|
typeof e == "string" ? e : e.name,
|
|
15268
15268
|
r.schema
|
|
15269
15269
|
);
|
|
@@ -15336,7 +15336,7 @@ var j6 = (r, e, t, n = 20) => {
|
|
|
15336
15336
|
}
|
|
15337
15337
|
return [o, s];
|
|
15338
15338
|
};
|
|
15339
|
-
function
|
|
15339
|
+
function tl(r, e) {
|
|
15340
15340
|
return e.nodes[r] || e.marks[r] || null;
|
|
15341
15341
|
}
|
|
15342
15342
|
function fo(r, e, t) {
|
|
@@ -15364,7 +15364,7 @@ var _6 = (r, e = 500) => {
|
|
|
15364
15364
|
function l0(r, e, t = {}) {
|
|
15365
15365
|
const { empty: n, ranges: i } = r.selection, s = e ? Fr(e, r.schema) : null;
|
|
15366
15366
|
if (n)
|
|
15367
|
-
return !!(r.storedMarks || r.selection.$from.marks()).filter((d) => s ? s.name === d.type.name : !0).find((d) =>
|
|
15367
|
+
return !!(r.storedMarks || r.selection.$from.marks()).filter((d) => s ? s.name === d.type.name : !0).find((d) => No(d.attrs, t, { strict: !1 }));
|
|
15368
15368
|
let o = 0;
|
|
15369
15369
|
const a = [];
|
|
15370
15370
|
if (i.forEach(({ $from: d, $to: h }) => {
|
|
@@ -15383,19 +15383,19 @@ function l0(r, e, t = {}) {
|
|
|
15383
15383
|
});
|
|
15384
15384
|
}), o === 0)
|
|
15385
15385
|
return !1;
|
|
15386
|
-
const l = a.filter((d) => s ? s.name === d.mark.type.name : !0).filter((d) =>
|
|
15386
|
+
const l = a.filter((d) => s ? s.name === d.mark.type.name : !0).filter((d) => No(d.mark.attrs, t, { strict: !1 })).reduce((d, h) => d + h.to - h.from, 0), u = a.filter((d) => s ? d.mark.type !== s && d.mark.type.excludes(s) : !0).reduce((d, h) => d + h.to - h.from, 0);
|
|
15387
15387
|
return (l > 0 ? l + u : l) >= o;
|
|
15388
15388
|
}
|
|
15389
15389
|
function V6(r, e, t = {}) {
|
|
15390
15390
|
if (!e)
|
|
15391
15391
|
return ln(r, null, t) || l0(r, null, t);
|
|
15392
|
-
const n =
|
|
15392
|
+
const n = oa(e, r.schema);
|
|
15393
15393
|
return n === "node" ? ln(r, e, t) : n === "mark" ? l0(r, e, t) : !1;
|
|
15394
15394
|
}
|
|
15395
15395
|
var q6 = (r, e) => {
|
|
15396
15396
|
const { $from: t, $to: n, $anchor: i } = r.selection;
|
|
15397
15397
|
if (e) {
|
|
15398
|
-
const s =
|
|
15398
|
+
const s = aa((a) => a.type.name === e)(r.selection);
|
|
15399
15399
|
if (!s)
|
|
15400
15400
|
return !1;
|
|
15401
15401
|
const o = r.doc.resolve(s.pos + 1);
|
|
@@ -15420,7 +15420,7 @@ function Od(r, e) {
|
|
|
15420
15420
|
}, s = Pe(ae(n, "group", i));
|
|
15421
15421
|
return typeof s != "string" ? !1 : s.split(" ").includes("list");
|
|
15422
15422
|
}
|
|
15423
|
-
function
|
|
15423
|
+
function la(r, {
|
|
15424
15424
|
checkChildren: e = !0,
|
|
15425
15425
|
ignoreWhitespace: t = !1
|
|
15426
15426
|
} = {}) {
|
|
@@ -15440,7 +15440,7 @@ function aa(r, {
|
|
|
15440
15440
|
if (e) {
|
|
15441
15441
|
let i = !0;
|
|
15442
15442
|
return r.content.forEach((s) => {
|
|
15443
|
-
i !== !1 && (
|
|
15443
|
+
i !== !1 && (la(s, { ignoreWhitespace: t, checkChildren: e }) || (i = !1));
|
|
15444
15444
|
}), i;
|
|
15445
15445
|
}
|
|
15446
15446
|
return !1;
|
|
@@ -15664,8 +15664,8 @@ var nb = ({ keepMarks: r = !0 } = {}) => ({ tr: e, state: t, dispatch: n, editor
|
|
|
15664
15664
|
t.ensureMarks(A);
|
|
15665
15665
|
}
|
|
15666
15666
|
return !0;
|
|
15667
|
-
},
|
|
15668
|
-
const t =
|
|
15667
|
+
}, rl = (r, e) => {
|
|
15668
|
+
const t = aa((o) => o.type === e)(r.selection);
|
|
15669
15669
|
if (!t)
|
|
15670
15670
|
return !0;
|
|
15671
15671
|
const n = r.doc.resolve(Math.max(0, t.pos - 1)).before(t.depth);
|
|
@@ -15673,8 +15673,8 @@ var nb = ({ keepMarks: r = !0 } = {}) => ({ tr: e, state: t, dispatch: n, editor
|
|
|
15673
15673
|
return !0;
|
|
15674
15674
|
const i = r.doc.nodeAt(n);
|
|
15675
15675
|
return t.node.type === i?.type && pn(r.doc, t.pos) && r.join(t.pos), !0;
|
|
15676
|
-
},
|
|
15677
|
-
const t =
|
|
15676
|
+
}, nl = (r, e) => {
|
|
15677
|
+
const t = aa((o) => o.type === e)(r.selection);
|
|
15678
15678
|
if (!t)
|
|
15679
15679
|
return !0;
|
|
15680
15680
|
const n = r.doc.resolve(t.start).after(t.depth);
|
|
@@ -15686,17 +15686,17 @@ var nb = ({ keepMarks: r = !0 } = {}) => ({ tr: e, state: t, dispatch: n, editor
|
|
|
15686
15686
|
const { extensions: d, splittableMarks: h } = i.extensionManager, f = Ze(r, o.schema), m = Ze(e, o.schema), { selection: v, storedMarks: y } = o, { $from: w, $to: k } = v, E = w.blockRange(k), P = y || v.$to.parentOffset && v.$from.marks();
|
|
15687
15687
|
if (!E)
|
|
15688
15688
|
return !1;
|
|
15689
|
-
const A =
|
|
15689
|
+
const A = aa((N) => Od(N.type.name, d))(v);
|
|
15690
15690
|
if (E.depth >= 1 && A && E.depth - A.depth <= 1) {
|
|
15691
15691
|
if (A.node.type === f)
|
|
15692
15692
|
return u.liftListItem(m);
|
|
15693
15693
|
if (Od(A.node.type.name, d) && f.validContent(A.node.content) && a)
|
|
15694
|
-
return l().command(() => (s.setNodeMarkup(A.pos, f), !0)).command(() =>
|
|
15694
|
+
return l().command(() => (s.setNodeMarkup(A.pos, f), !0)).command(() => rl(s, f)).command(() => nl(s, f)).run();
|
|
15695
15695
|
}
|
|
15696
|
-
return !t || !P || !a ? l().command(() => c().wrapInList(f, n) ? !0 : u.clearNodes()).wrapInList(f, n).command(() =>
|
|
15696
|
+
return !t || !P || !a ? l().command(() => c().wrapInList(f, n) ? !0 : u.clearNodes()).wrapInList(f, n).command(() => rl(s, f)).command(() => nl(s, f)).run() : l().command(() => {
|
|
15697
15697
|
const N = c().wrapInList(f, n), R = P.filter((L) => h.includes(L.type.name));
|
|
15698
15698
|
return s.ensureMarks(R), N ? !0 : u.clearNodes();
|
|
15699
|
-
}).wrapInList(f, n).command(() =>
|
|
15699
|
+
}).wrapInList(f, n).command(() => rl(s, f)).command(() => nl(s, f)).run();
|
|
15700
15700
|
}, ob = (r, e = {}, t = {}) => ({ state: n, commands: i }) => {
|
|
15701
15701
|
const { extendEmptyMarkRange: s = !1 } = t, o = Fr(r, n.schema);
|
|
15702
15702
|
return l0(n, o, e) ? i.unsetMark(o, { extendEmptyMarkRange: s }) : i.setMark(o, e);
|
|
@@ -15757,7 +15757,7 @@ var nb = ({ keepMarks: r = !0 } = {}) => ({ tr: e, state: t, dispatch: n, editor
|
|
|
15757
15757
|
}), !0;
|
|
15758
15758
|
}, hb = (r, e = {}) => ({ tr: t, state: n, dispatch: i }) => {
|
|
15759
15759
|
let s = null, o = null;
|
|
15760
|
-
const a =
|
|
15760
|
+
const a = oa(
|
|
15761
15761
|
typeof r == "string" ? r : r.name,
|
|
15762
15762
|
n.schema
|
|
15763
15763
|
);
|
|
@@ -15864,13 +15864,13 @@ function Hs(r) {
|
|
|
15864
15864
|
const f = vb(d, h.find);
|
|
15865
15865
|
if (!f)
|
|
15866
15866
|
return;
|
|
15867
|
-
const m = l.state.tr, v =
|
|
15867
|
+
const m = l.state.tr, v = na({
|
|
15868
15868
|
state: l.state,
|
|
15869
15869
|
transaction: m
|
|
15870
15870
|
}), y = {
|
|
15871
15871
|
from: n - (f[0].length - s.length),
|
|
15872
15872
|
to: i
|
|
15873
|
-
}, { commands: w, chain: k, can: E } = new
|
|
15873
|
+
}, { commands: w, chain: k, can: E } = new ia({
|
|
15874
15874
|
editor: t,
|
|
15875
15875
|
state: v
|
|
15876
15876
|
});
|
|
@@ -16060,7 +16060,7 @@ var xb = class {
|
|
|
16060
16060
|
}) : [];
|
|
16061
16061
|
};
|
|
16062
16062
|
function kb(r) {
|
|
16063
|
-
const { editor: e, state: t, from: n, to: i, rule: s, pasteEvent: o, dropEvent: a } = r, { commands: l, chain: u, can: c } = new
|
|
16063
|
+
const { editor: e, state: t, from: n, to: i, rule: s, pasteEvent: o, dropEvent: a } = r, { commands: l, chain: u, can: c } = new ia({
|
|
16064
16064
|
editor: e,
|
|
16065
16065
|
state: t
|
|
16066
16066
|
}), d = [];
|
|
@@ -16114,7 +16114,7 @@ function Cb(r) {
|
|
|
16114
16114
|
rule: f,
|
|
16115
16115
|
pasteEvt: m
|
|
16116
16116
|
}) => {
|
|
16117
|
-
const v = c.tr, y =
|
|
16117
|
+
const v = c.tr, y = na({
|
|
16118
16118
|
state: c,
|
|
16119
16119
|
transaction: v
|
|
16120
16120
|
});
|
|
@@ -16197,7 +16197,7 @@ function Cb(r) {
|
|
|
16197
16197
|
}
|
|
16198
16198
|
}));
|
|
16199
16199
|
}
|
|
16200
|
-
var
|
|
16200
|
+
var ua = class {
|
|
16201
16201
|
constructor(r, e) {
|
|
16202
16202
|
this.splittableMarks = [], this.editor = e, this.baseExtensions = r, this.extensions = dm(r), this.schema = I6(this.extensions, e), this.setupExtensions();
|
|
16203
16203
|
}
|
|
@@ -16212,7 +16212,7 @@ var la = class {
|
|
|
16212
16212
|
options: e.options,
|
|
16213
16213
|
storage: this.editor.extensionStorage[e.name],
|
|
16214
16214
|
editor: this.editor,
|
|
16215
|
-
type:
|
|
16215
|
+
type: tl(e.name, this.schema)
|
|
16216
16216
|
}, n = ae(e, "addCommands", t);
|
|
16217
16217
|
return n ? {
|
|
16218
16218
|
...r,
|
|
@@ -16232,7 +16232,7 @@ var la = class {
|
|
|
16232
16232
|
options: n.options,
|
|
16233
16233
|
storage: this.editor.extensionStorage[n.name],
|
|
16234
16234
|
editor: r,
|
|
16235
|
-
type:
|
|
16235
|
+
type: tl(n.name, this.schema)
|
|
16236
16236
|
}, s = [], o = ae(
|
|
16237
16237
|
n,
|
|
16238
16238
|
"addKeyboardShortcuts",
|
|
@@ -16372,7 +16372,7 @@ var la = class {
|
|
|
16372
16372
|
options: e.options,
|
|
16373
16373
|
storage: this.editor.extensionStorage[e.name],
|
|
16374
16374
|
editor: this.editor,
|
|
16375
|
-
type:
|
|
16375
|
+
type: tl(e.name, this.schema)
|
|
16376
16376
|
};
|
|
16377
16377
|
e.type === "mark" && ((t = Pe(ae(e, "keepOnSplit", n))) == null || t) && this.splittableMarks.push(e.name);
|
|
16378
16378
|
const i = ae(e, "onBeforeCreate", n), s = ae(e, "onCreate", n), o = ae(e, "onUpdate", n), a = ae(
|
|
@@ -16384,9 +16384,9 @@ var la = class {
|
|
|
16384
16384
|
});
|
|
16385
16385
|
}
|
|
16386
16386
|
};
|
|
16387
|
-
|
|
16388
|
-
|
|
16389
|
-
|
|
16387
|
+
ua.resolve = dm;
|
|
16388
|
+
ua.sort = su;
|
|
16389
|
+
ua.flatten = nu;
|
|
16390
16390
|
var Mb = {};
|
|
16391
16391
|
Q0(Mb, {
|
|
16392
16392
|
ClipboardTextSerializer: () => xm,
|
|
@@ -16606,7 +16606,7 @@ var Re = class wm extends lu {
|
|
|
16606
16606
|
"Ctrl-a": () => this.editor.commands.selectTextblockStart(),
|
|
16607
16607
|
"Ctrl-e": () => this.editor.commands.selectTextblockEnd()
|
|
16608
16608
|
};
|
|
16609
|
-
return
|
|
16609
|
+
return sa() || am() ? s : i;
|
|
16610
16610
|
},
|
|
16611
16611
|
addProseMirrorPlugins() {
|
|
16612
16612
|
return [
|
|
@@ -16624,12 +16624,12 @@ var Re = class wm extends lu {
|
|
|
16624
16624
|
if (!n || i)
|
|
16625
16625
|
return;
|
|
16626
16626
|
const { empty: s, from: o, to: a } = e.selection, l = me.atStart(e.doc).from, u = me.atEnd(e.doc).to;
|
|
16627
|
-
if (s || !(o === l && a === u) || !
|
|
16627
|
+
if (s || !(o === l && a === u) || !la(t.doc))
|
|
16628
16628
|
return;
|
|
16629
|
-
const h = t.tr, f =
|
|
16629
|
+
const h = t.tr, f = na({
|
|
16630
16630
|
state: t,
|
|
16631
16631
|
transaction: h
|
|
16632
|
-
}), { commands: m } = new
|
|
16632
|
+
}), { commands: m } = new ia({
|
|
16633
16633
|
editor: this.editor,
|
|
16634
16634
|
state: f
|
|
16635
16635
|
});
|
|
@@ -17136,13 +17136,13 @@ var Nb = class extends gb {
|
|
|
17136
17136
|
direction: this.options.textDirection
|
|
17137
17137
|
})
|
|
17138
17138
|
].filter((i) => typeof this.options.enableCoreExtensions == "object" ? this.options.enableCoreExtensions[i.name] !== !1 : !0) : [], ...this.options.extensions].filter((i) => ["extension", "node", "mark"].includes(i?.type));
|
|
17139
|
-
this.extensionManager = new
|
|
17139
|
+
this.extensionManager = new ua(n, this);
|
|
17140
17140
|
}
|
|
17141
17141
|
/**
|
|
17142
17142
|
* Creates an command manager.
|
|
17143
17143
|
*/
|
|
17144
17144
|
createCommandManager() {
|
|
17145
|
-
this.commandManager = new
|
|
17145
|
+
this.commandManager = new ia({
|
|
17146
17146
|
editor: this
|
|
17147
17147
|
});
|
|
17148
17148
|
}
|
|
@@ -17312,7 +17312,7 @@ var Nb = class extends gb {
|
|
|
17312
17312
|
* Check if there is no content.
|
|
17313
17313
|
*/
|
|
17314
17314
|
get isEmpty() {
|
|
17315
|
-
return
|
|
17315
|
+
return la(this.state.doc);
|
|
17316
17316
|
}
|
|
17317
17317
|
/**
|
|
17318
17318
|
* Destroy the editor.
|
|
@@ -17873,7 +17873,7 @@ var Oe = class Rm extends lu {
|
|
|
17873
17873
|
* @return `true` if it can safely be ignored.
|
|
17874
17874
|
*/
|
|
17875
17875
|
ignoreMutation(r) {
|
|
17876
|
-
return !this.dom || !this.contentDOM ? !0 : typeof this.options.ignoreMutation == "function" ? this.options.ignoreMutation({ mutation: r }) : this.node.isLeaf || this.node.isAtom ? !0 : r.type === "selection" || this.dom.contains(r.target) && r.type === "childList" && (
|
|
17876
|
+
return !this.dom || !this.contentDOM ? !0 : typeof this.options.ignoreMutation == "function" ? this.options.ignoreMutation({ mutation: r }) : this.node.isLeaf || this.node.isAtom ? !0 : r.type === "selection" || this.dom.contains(r.target) && r.type === "childList" && (sa() || sm()) && this.editor.isFocused && [...Array.from(r.addedNodes), ...Array.from(r.removedNodes)].every((t) => t.isContentEditable) ? !1 : this.contentDOM === r.target && r.type === "attributes" ? !0 : !this.contentDOM.contains(r.target);
|
|
17877
17877
|
}
|
|
17878
17878
|
/**
|
|
17879
17879
|
* Update the attributes of the prosemirror node.
|
|
@@ -17898,7 +17898,7 @@ var Oe = class Rm extends lu {
|
|
|
17898
17898
|
this.editor.commands.deleteRange({ from: r, to: e });
|
|
17899
17899
|
}
|
|
17900
17900
|
};
|
|
17901
|
-
function
|
|
17901
|
+
function ca(r) {
|
|
17902
17902
|
return new xb({
|
|
17903
17903
|
find: r.find,
|
|
17904
17904
|
handler: ({ state: e, range: t, match: n, pasteEvent: i }) => {
|
|
@@ -18193,10 +18193,10 @@ function Kb(r) {
|
|
|
18193
18193
|
let e = document.createElement("div");
|
|
18194
18194
|
return e.className = "ProseMirror-gapcursor", _e.create(r.doc, [yt.widget(r.selection.head, e, { key: "gapcursor" })]);
|
|
18195
18195
|
}
|
|
18196
|
-
var
|
|
18196
|
+
var Do = 200, st = function() {
|
|
18197
18197
|
};
|
|
18198
18198
|
st.prototype.append = function(e) {
|
|
18199
|
-
return e.length ? (e = st.from(e), !this.length && e || e.length <
|
|
18199
|
+
return e.length ? (e = st.from(e), !this.length && e || e.length < Do && this.leafAppend(e) || this.length < Do && e.leafPrepend(this) || this.appendInner(e)) : this;
|
|
18200
18200
|
};
|
|
18201
18201
|
st.prototype.prepend = function(e) {
|
|
18202
18202
|
return e.length ? st.from(e).append(this) : this;
|
|
@@ -18245,10 +18245,10 @@ var Im = /* @__PURE__ */ (function(r) {
|
|
|
18245
18245
|
if (i(this.values[l], a + l) === !1)
|
|
18246
18246
|
return !1;
|
|
18247
18247
|
}, e.prototype.leafAppend = function(i) {
|
|
18248
|
-
if (this.length + i.length <=
|
|
18248
|
+
if (this.length + i.length <= Do)
|
|
18249
18249
|
return new e(this.values.concat(i.flatten()));
|
|
18250
18250
|
}, e.prototype.leafPrepend = function(i) {
|
|
18251
|
-
if (this.length + i.length <=
|
|
18251
|
+
if (this.length + i.length <= Do)
|
|
18252
18252
|
return new e(i.flatten().concat(this.values));
|
|
18253
18253
|
}, t.length.get = function() {
|
|
18254
18254
|
return this.values.length;
|
|
@@ -18440,9 +18440,9 @@ function Zb(r, e, t, n) {
|
|
|
18440
18440
|
if (o && o.getMeta(In))
|
|
18441
18441
|
return o.getMeta(In).redo ? new Gr(r.done.addTransform(t, void 0, n, ho(e)), r.undone, Dd(t.mapping.maps), r.prevTime, r.prevComposition) : new Gr(r.done, r.undone.addTransform(t, void 0, n, ho(e)), null, r.prevTime, r.prevComposition);
|
|
18442
18442
|
if (t.getMeta("addToHistory") !== !1 && !(o && o.getMeta("addToHistory") === !1)) {
|
|
18443
|
-
let a = t.getMeta("composition"), l = r.prevTime == 0 || !o && r.prevComposition != a && (r.prevTime < (t.time || 0) - n.newGroupDelay || !Qb(t, r.prevRanges)), u = o ?
|
|
18443
|
+
let a = t.getMeta("composition"), l = r.prevTime == 0 || !o && r.prevComposition != a && (r.prevTime < (t.time || 0) - n.newGroupDelay || !Qb(t, r.prevRanges)), u = o ? il(r.prevRanges, t.mapping) : Dd(t.mapping.maps);
|
|
18444
18444
|
return new Gr(r.done.addTransform(t, l ? e.selection.getBookmark() : void 0, n, ho(e)), Xt.empty, u, t.time, a ?? r.prevComposition);
|
|
18445
|
-
} else return (s = t.getMeta("rebased")) ? new Gr(r.done.rebased(t, s), r.undone.rebased(t, s),
|
|
18445
|
+
} else return (s = t.getMeta("rebased")) ? new Gr(r.done.rebased(t, s), r.undone.rebased(t, s), il(r.prevRanges, t.mapping), r.prevTime, r.prevComposition) : new Gr(r.done.addMaps(t.mapping.maps), r.undone.addMaps(t.mapping.maps), il(r.prevRanges, t.mapping), r.prevTime, r.prevComposition);
|
|
18446
18446
|
}
|
|
18447
18447
|
function Qb(r, e) {
|
|
18448
18448
|
if (!e)
|
|
@@ -18461,7 +18461,7 @@ function Dd(r) {
|
|
|
18461
18461
|
r[t].forEach((n, i, s, o) => e.push(s, o));
|
|
18462
18462
|
return e;
|
|
18463
18463
|
}
|
|
18464
|
-
function
|
|
18464
|
+
function il(r, e) {
|
|
18465
18465
|
if (!r)
|
|
18466
18466
|
return null;
|
|
18467
18467
|
let t = [];
|
|
@@ -18478,18 +18478,18 @@ function e7(r, e, t) {
|
|
|
18478
18478
|
let o = s.selection.resolve(s.transform.doc), a = (t ? r.done : r.undone).addTransform(s.transform, e.selection.getBookmark(), i, n), l = new Gr(t ? a : s.remaining, t ? s.remaining : a, null, 0, -1);
|
|
18479
18479
|
return s.transform.setSelection(o).setMeta(In, { redo: t, historyState: l });
|
|
18480
18480
|
}
|
|
18481
|
-
let
|
|
18481
|
+
let sl = !1, Rd = null;
|
|
18482
18482
|
function ho(r) {
|
|
18483
18483
|
let e = r.plugins;
|
|
18484
18484
|
if (Rd != e) {
|
|
18485
|
-
|
|
18485
|
+
sl = !1, Rd = e;
|
|
18486
18486
|
for (let t = 0; t < e.length; t++)
|
|
18487
18487
|
if (e[t].spec.historyPreserveItems) {
|
|
18488
|
-
|
|
18488
|
+
sl = !0;
|
|
18489
18489
|
break;
|
|
18490
18490
|
}
|
|
18491
18491
|
}
|
|
18492
|
-
return
|
|
18492
|
+
return sl;
|
|
18493
18493
|
}
|
|
18494
18494
|
const In = new Ye("history"), t7 = new Ye("closeHistory");
|
|
18495
18495
|
function r7(r = {}) {
|
|
@@ -18694,7 +18694,7 @@ Re.create({
|
|
|
18694
18694
|
return null;
|
|
18695
18695
|
const s = this.editor.isEmpty;
|
|
18696
18696
|
return r.descendants((o, a) => {
|
|
18697
|
-
const l = n >= a && n <= a + o.nodeSize, u = !o.isLeaf &&
|
|
18697
|
+
const l = n >= a && n <= a + o.nodeSize, u = !o.isLeaf && la(o);
|
|
18698
18698
|
if ((l || !this.options.showOnlyCurrent) && u) {
|
|
18699
18699
|
const c = [this.options.emptyNodeClass];
|
|
18700
18700
|
s && c.push(this.options.emptyEditorClass);
|
|
@@ -18807,10 +18807,10 @@ var s7 = Re.create({
|
|
|
18807
18807
|
"Shift-Mod-я": () => this.editor.commands.redo()
|
|
18808
18808
|
};
|
|
18809
18809
|
}
|
|
18810
|
-
}), qs = { exports: {} },
|
|
18810
|
+
}), qs = { exports: {} }, ol = {};
|
|
18811
18811
|
var Id;
|
|
18812
18812
|
function o7() {
|
|
18813
|
-
if (Id) return
|
|
18813
|
+
if (Id) return ol;
|
|
18814
18814
|
Id = 1;
|
|
18815
18815
|
var r = We;
|
|
18816
18816
|
function e(d, h) {
|
|
@@ -18847,9 +18847,9 @@ function o7() {
|
|
|
18847
18847
|
return h();
|
|
18848
18848
|
}
|
|
18849
18849
|
var c = typeof window > "u" || typeof window.document > "u" || typeof window.document.createElement > "u" ? u : a;
|
|
18850
|
-
return
|
|
18850
|
+
return ol.useSyncExternalStore = r.useSyncExternalStore !== void 0 ? r.useSyncExternalStore : c, ol;
|
|
18851
18851
|
}
|
|
18852
|
-
var
|
|
18852
|
+
var al = {};
|
|
18853
18853
|
var zd;
|
|
18854
18854
|
function a7() {
|
|
18855
18855
|
return zd || (zd = 1, process.env.NODE_ENV !== "production" && (function() {
|
|
@@ -18900,8 +18900,8 @@ function a7() {
|
|
|
18900
18900
|
}
|
|
18901
18901
|
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
|
|
18902
18902
|
var i = We, s = typeof Object.is == "function" ? Object.is : r, o = i.useState, a = i.useEffect, l = i.useLayoutEffect, u = i.useDebugValue, c = !1, d = !1, h = typeof window > "u" || typeof window.document > "u" || typeof window.document.createElement > "u" ? n : e;
|
|
18903
|
-
|
|
18904
|
-
})()),
|
|
18903
|
+
al.useSyncExternalStore = i.useSyncExternalStore !== void 0 ? i.useSyncExternalStore : h, typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
|
|
18904
|
+
})()), al;
|
|
18905
18905
|
}
|
|
18906
18906
|
var Ld;
|
|
18907
18907
|
function hu() {
|
|
@@ -18909,7 +18909,7 @@ function hu() {
|
|
|
18909
18909
|
}
|
|
18910
18910
|
var Fm = hu();
|
|
18911
18911
|
const { getOwnPropertyNames: l7, getOwnPropertySymbols: u7 } = Object, { hasOwnProperty: c7 } = Object.prototype;
|
|
18912
|
-
function
|
|
18912
|
+
function ll(r, e) {
|
|
18913
18913
|
return function(n, i, s) {
|
|
18914
18914
|
return r(n, i, s) && e(n, i, s);
|
|
18915
18915
|
};
|
|
@@ -18941,7 +18941,7 @@ function jn(r, e) {
|
|
|
18941
18941
|
}
|
|
18942
18942
|
const h7 = "__v", p7 = "__o", m7 = "_owner", { getOwnPropertyDescriptor: Fd, keys: $d } = Object;
|
|
18943
18943
|
function g7(r, e) {
|
|
18944
|
-
return r.byteLength === e.byteLength &&
|
|
18944
|
+
return r.byteLength === e.byteLength && Ro(new Uint8Array(r), new Uint8Array(e));
|
|
18945
18945
|
}
|
|
18946
18946
|
function v7(r, e, t) {
|
|
18947
18947
|
let n = r.length;
|
|
@@ -18953,7 +18953,7 @@ function v7(r, e, t) {
|
|
|
18953
18953
|
return !0;
|
|
18954
18954
|
}
|
|
18955
18955
|
function y7(r, e) {
|
|
18956
|
-
return r.byteLength === e.byteLength &&
|
|
18956
|
+
return r.byteLength === e.byteLength && Ro(new Uint8Array(r.buffer, r.byteOffset, r.byteLength), new Uint8Array(e.buffer, e.byteOffset, e.byteLength));
|
|
18957
18957
|
}
|
|
18958
18958
|
function b7(r, e) {
|
|
18959
18959
|
return jn(r.getTime(), e.getTime());
|
|
@@ -19044,7 +19044,7 @@ function jd(r, e, t) {
|
|
|
19044
19044
|
}
|
|
19045
19045
|
return !0;
|
|
19046
19046
|
}
|
|
19047
|
-
function
|
|
19047
|
+
function Ro(r, e) {
|
|
19048
19048
|
let t = r.byteLength;
|
|
19049
19049
|
if (e.byteLength !== t || r.byteOffset !== e.byteOffset)
|
|
19050
19050
|
return !1;
|
|
@@ -19144,13 +19144,13 @@ function V7({ circular: r, createCustomConfig: e, strict: t }) {
|
|
|
19144
19144
|
areDatesEqual: b7,
|
|
19145
19145
|
areErrorsEqual: w7,
|
|
19146
19146
|
areFunctionsEqual: x7,
|
|
19147
|
-
areMapsEqual: t ?
|
|
19147
|
+
areMapsEqual: t ? ll(Hd, zi) : Hd,
|
|
19148
19148
|
areNumbersEqual: S7,
|
|
19149
19149
|
areObjectsEqual: t ? zi : k7,
|
|
19150
19150
|
arePrimitiveWrappersEqual: T7,
|
|
19151
19151
|
areRegExpsEqual: C7,
|
|
19152
|
-
areSetsEqual: t ?
|
|
19153
|
-
areTypedArraysEqual: t ?
|
|
19152
|
+
areSetsEqual: t ? ll(jd, zi) : jd,
|
|
19153
|
+
areTypedArraysEqual: t ? ll(Ro, zi) : Ro,
|
|
19154
19154
|
areUrlsEqual: M7,
|
|
19155
19155
|
unknownTagComparators: void 0
|
|
19156
19156
|
};
|
|
@@ -19227,17 +19227,17 @@ function gn(r = {}) {
|
|
|
19227
19227
|
const { circular: e = !1, createInternalComparator: t, createState: n, strict: i = !1 } = r, s = V7(r), o = _7(s), a = t ? t(o) : q7(o);
|
|
19228
19228
|
return W7({ circular: e, comparator: o, createState: n, equals: a, strict: i });
|
|
19229
19229
|
}
|
|
19230
|
-
var Us = { exports: {} },
|
|
19230
|
+
var Us = { exports: {} }, ul = {};
|
|
19231
19231
|
var _d;
|
|
19232
19232
|
function K7() {
|
|
19233
|
-
if (_d) return
|
|
19233
|
+
if (_d) return ul;
|
|
19234
19234
|
_d = 1;
|
|
19235
19235
|
var r = We, e = hu();
|
|
19236
19236
|
function t(u, c) {
|
|
19237
19237
|
return u === c && (u !== 0 || 1 / u === 1 / c) || u !== u && c !== c;
|
|
19238
19238
|
}
|
|
19239
19239
|
var n = typeof Object.is == "function" ? Object.is : t, i = e.useSyncExternalStore, s = r.useRef, o = r.useEffect, a = r.useMemo, l = r.useDebugValue;
|
|
19240
|
-
return
|
|
19240
|
+
return ul.useSyncExternalStoreWithSelector = function(u, c, d, h, f) {
|
|
19241
19241
|
var m = s(null);
|
|
19242
19242
|
if (m.current === null) {
|
|
19243
19243
|
var v = { hasValue: !1, value: null };
|
|
@@ -19277,9 +19277,9 @@ function K7() {
|
|
|
19277
19277
|
},
|
|
19278
19278
|
[y]
|
|
19279
19279
|
), l(y), y;
|
|
19280
|
-
},
|
|
19280
|
+
}, ul;
|
|
19281
19281
|
}
|
|
19282
|
-
var
|
|
19282
|
+
var cl = {};
|
|
19283
19283
|
var Vd;
|
|
19284
19284
|
function G7() {
|
|
19285
19285
|
return Vd || (Vd = 1, process.env.NODE_ENV !== "production" && (function() {
|
|
@@ -19288,7 +19288,7 @@ function G7() {
|
|
|
19288
19288
|
}
|
|
19289
19289
|
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
|
|
19290
19290
|
var e = We, t = hu(), n = typeof Object.is == "function" ? Object.is : r, i = t.useSyncExternalStore, s = e.useRef, o = e.useEffect, a = e.useMemo, l = e.useDebugValue;
|
|
19291
|
-
|
|
19291
|
+
cl.useSyncExternalStoreWithSelector = function(u, c, d, h, f) {
|
|
19292
19292
|
var m = s(null);
|
|
19293
19293
|
if (m.current === null) {
|
|
19294
19294
|
var v = { hasValue: !1, value: null };
|
|
@@ -19330,7 +19330,7 @@ function G7() {
|
|
|
19330
19330
|
[y]
|
|
19331
19331
|
), l(y), y;
|
|
19332
19332
|
}, typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
|
|
19333
|
-
})()),
|
|
19333
|
+
})()), cl;
|
|
19334
19334
|
}
|
|
19335
19335
|
var qd;
|
|
19336
19336
|
function J7() {
|
|
@@ -19676,13 +19676,13 @@ var _m = ih({
|
|
|
19676
19676
|
editor: null
|
|
19677
19677
|
});
|
|
19678
19678
|
_m.Consumer;
|
|
19679
|
-
var Vm = () =>
|
|
19679
|
+
var Vm = () => Vo(_m), qm = ih({
|
|
19680
19680
|
onDragStart: () => {
|
|
19681
19681
|
},
|
|
19682
19682
|
nodeViewContentChildren: void 0,
|
|
19683
19683
|
nodeViewContentRef: () => {
|
|
19684
19684
|
}
|
|
19685
|
-
}), Wm = () =>
|
|
19685
|
+
}), Wm = () => Vo(qm);
|
|
19686
19686
|
function Um({
|
|
19687
19687
|
as: r = "div",
|
|
19688
19688
|
...e
|
|
@@ -19841,7 +19841,7 @@ var f8 = class extends Fb {
|
|
|
19841
19841
|
}
|
|
19842
19842
|
const n = { onDragStart: this.onDragStart.bind(this), nodeViewContentRef: (l) => {
|
|
19843
19843
|
l && this.contentDOMElement && l.firstChild !== this.contentDOMElement && (l.hasAttribute("data-node-view-wrapper") && l.removeAttribute("data-node-view-wrapper"), l.appendChild(this.contentDOMElement));
|
|
19844
|
-
} }, i = this.component, s =
|
|
19844
|
+
} }, i = this.component, s = qo((l) => /* @__PURE__ */ Y.jsx(qm.Provider, { value: n, children: r4(i, l) }));
|
|
19845
19845
|
s.displayName = "ReactNodeView";
|
|
19846
19846
|
let o = this.node.isInline ? "span" : "div";
|
|
19847
19847
|
this.options.as && (o = this.options.as);
|
|
@@ -20956,7 +20956,7 @@ class qr {
|
|
|
20956
20956
|
return this.size >= 2;
|
|
20957
20957
|
}
|
|
20958
20958
|
}
|
|
20959
|
-
var gu = 0,
|
|
20959
|
+
var gu = 0, Po = 1, li = 2, Rr = 3, ds = 4, Vt = 5, mi = 6, bt = 7, or = [new qr(gu, 0, !1), new qr(Po, 0, !0), new qr(li, 1, !1), new qr(Rr, 1, !0), new qr(ds, 2, !1), new qr(Vt, 2, !0), new qr(mi, 3, !1), new qr(bt, 3, !0)], L8 = [ds, Vt, ds, Vt, mi, bt, mi, bt], B8 = [Vt, Vt, Vt, Vt, bt, bt, bt, bt], F8 = [li, Rr, ds, Vt, mi, bt, mi, bt], $8 = [Rr, Rr, Vt, Vt, bt, bt, bt, bt], H8 = [Po, Po, Rr, Rr, Vt, Vt, bt, bt], j8 = [gu, Po, li, Rr, li, Rr, li, Rr], pe = {
|
|
20960
20960
|
DISPLAY: or[gu],
|
|
20961
20961
|
TEXT: or[li],
|
|
20962
20962
|
SCRIPT: or[ds],
|
|
@@ -23731,17 +23731,17 @@ function vu(r, e, t) {
|
|
|
23731
23731
|
width: i[4]
|
|
23732
23732
|
};
|
|
23733
23733
|
}
|
|
23734
|
-
var
|
|
23734
|
+
var dl = {};
|
|
23735
23735
|
function e9(r) {
|
|
23736
23736
|
var e;
|
|
23737
|
-
if (r >= 5 ? e = 0 : r >= 3 ? e = 1 : e = 2, !
|
|
23738
|
-
var t =
|
|
23737
|
+
if (r >= 5 ? e = 0 : r >= 3 ? e = 1 : e = 2, !dl[e]) {
|
|
23738
|
+
var t = dl[e] = {
|
|
23739
23739
|
cssEmPerMu: Ks.quad[e] / 18
|
|
23740
23740
|
};
|
|
23741
23741
|
for (var n in Ks)
|
|
23742
23742
|
Ks.hasOwnProperty(n) && (t[n] = Ks[n][e]);
|
|
23743
23743
|
}
|
|
23744
|
-
return
|
|
23744
|
+
return dl[e];
|
|
23745
23745
|
}
|
|
23746
23746
|
var t9 = [
|
|
23747
23747
|
// Each element contains [textsize, scriptsize, scriptscriptsize].
|
|
@@ -24237,7 +24237,7 @@ function p(r, e, t, n, i, s) {
|
|
|
24237
24237
|
replace: n
|
|
24238
24238
|
}, s && n && (Fe[r][n] = Fe[r][i]);
|
|
24239
24239
|
}
|
|
24240
|
-
var g = "math", j = "text", b = "main", T = "ams", He = "accent-token", ee = "bin", kt = "close", xi = "inner", he = "mathord", Qe = "op-token", $t = "open",
|
|
24240
|
+
var g = "math", j = "text", b = "main", T = "ams", He = "accent-token", ee = "bin", kt = "close", xi = "inner", he = "mathord", Qe = "op-token", $t = "open", da = "punct", M = "rel", $r = "spacing", O = "textord";
|
|
24241
24241
|
p(g, b, M, "≡", "\\equiv", !0);
|
|
24242
24242
|
p(g, b, M, "≺", "\\prec", !0);
|
|
24243
24243
|
p(g, b, M, "≻", "\\succ", !0);
|
|
@@ -24262,8 +24262,8 @@ p(g, b, M, "∝", "\\propto", !0);
|
|
|
24262
24262
|
p(g, b, M, "⊢", "\\vdash", !0);
|
|
24263
24263
|
p(g, b, M, "⊣", "\\dashv", !0);
|
|
24264
24264
|
p(g, b, M, "∋", "\\owns");
|
|
24265
|
-
p(g, b,
|
|
24266
|
-
p(g, b,
|
|
24265
|
+
p(g, b, da, ".", "\\ldotp");
|
|
24266
|
+
p(g, b, da, "⋅", "\\cdotp");
|
|
24267
24267
|
p(g, b, O, "#", "\\#");
|
|
24268
24268
|
p(j, b, O, "#", "\\#");
|
|
24269
24269
|
p(g, b, O, "&", "\\&");
|
|
@@ -24690,8 +24690,8 @@ p(j, b, $r, " ", "\\space");
|
|
|
24690
24690
|
p(j, b, $r, " ", "\\nobreakspace");
|
|
24691
24691
|
p(g, b, $r, null, "\\nobreak");
|
|
24692
24692
|
p(g, b, $r, null, "\\allowbreak");
|
|
24693
|
-
p(g, b,
|
|
24694
|
-
p(g, b,
|
|
24693
|
+
p(g, b, da, ",", ",");
|
|
24694
|
+
p(g, b, da, ";", ";");
|
|
24695
24695
|
p(g, T, ee, "⊼", "\\barwedge", !0);
|
|
24696
24696
|
p(g, T, ee, "⊻", "\\veebar", !0);
|
|
24697
24697
|
p(g, b, ee, "⊙", "\\odot", !0);
|
|
@@ -24837,18 +24837,18 @@ p(j, b, O, "£", "\\textsterling", !0);
|
|
|
24837
24837
|
p(g, T, O, "✠", "\\maltese");
|
|
24838
24838
|
p(j, T, O, "✠", "\\maltese");
|
|
24839
24839
|
var sf = '0123456789/@."';
|
|
24840
|
-
for (var
|
|
24841
|
-
var of = sf.charAt(
|
|
24840
|
+
for (var fl = 0; fl < sf.length; fl++) {
|
|
24841
|
+
var of = sf.charAt(fl);
|
|
24842
24842
|
p(g, b, O, of, of);
|
|
24843
24843
|
}
|
|
24844
24844
|
var af = '0123456789!@*()-=+";:?/.,';
|
|
24845
|
-
for (var
|
|
24846
|
-
var lf = af.charAt(
|
|
24845
|
+
for (var hl = 0; hl < af.length; hl++) {
|
|
24846
|
+
var lf = af.charAt(hl);
|
|
24847
24847
|
p(j, b, O, lf, lf);
|
|
24848
24848
|
}
|
|
24849
|
-
var
|
|
24850
|
-
for (var
|
|
24851
|
-
var Gs =
|
|
24849
|
+
var Io = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
|
|
24850
|
+
for (var pl = 0; pl < Io.length; pl++) {
|
|
24851
|
+
var Gs = Io.charAt(pl);
|
|
24852
24852
|
p(g, b, he, Gs, Gs), p(j, b, O, Gs, Gs);
|
|
24853
24853
|
}
|
|
24854
24854
|
p(g, T, O, "C", "ℂ");
|
|
@@ -24868,8 +24868,8 @@ p(j, T, O, "Z", "ℤ");
|
|
|
24868
24868
|
p(g, b, he, "h", "ℎ");
|
|
24869
24869
|
p(j, b, he, "h", "ℎ");
|
|
24870
24870
|
var ve = "";
|
|
24871
|
-
for (var mt = 0; mt <
|
|
24872
|
-
var Ue =
|
|
24871
|
+
for (var mt = 0; mt < Io.length; mt++) {
|
|
24872
|
+
var Ue = Io.charAt(mt);
|
|
24873
24873
|
ve = String.fromCharCode(55349, 56320 + mt), p(g, b, he, Ue, ve), p(j, b, O, Ue, ve), ve = String.fromCharCode(55349, 56372 + mt), p(g, b, he, Ue, ve), p(j, b, O, Ue, ve), ve = String.fromCharCode(55349, 56424 + mt), p(g, b, he, Ue, ve), p(j, b, O, Ue, ve), ve = String.fromCharCode(55349, 56580 + mt), p(g, b, he, Ue, ve), p(j, b, O, Ue, ve), ve = String.fromCharCode(55349, 56684 + mt), p(g, b, he, Ue, ve), p(j, b, O, Ue, ve), ve = String.fromCharCode(55349, 56736 + mt), p(g, b, he, Ue, ve), p(j, b, O, Ue, ve), ve = String.fromCharCode(55349, 56788 + mt), p(g, b, he, Ue, ve), p(j, b, O, Ue, ve), ve = String.fromCharCode(55349, 56840 + mt), p(g, b, he, Ue, ve), p(j, b, O, Ue, ve), ve = String.fromCharCode(55349, 56944 + mt), p(g, b, he, Ue, ve), p(j, b, O, Ue, ve), mt < 26 && (ve = String.fromCharCode(55349, 56632 + mt), p(g, b, he, Ue, ve), p(j, b, O, Ue, ve), ve = String.fromCharCode(55349, 56476 + mt), p(g, b, he, Ue, ve), p(j, b, O, Ue, ve));
|
|
24874
24874
|
}
|
|
24875
24875
|
ve = "𝕜";
|
|
@@ -24880,8 +24880,8 @@ for (var Cn = 0; Cn < 10; Cn++) {
|
|
|
24880
24880
|
ve = String.fromCharCode(55349, 57294 + Cn), p(g, b, he, Wr, ve), p(j, b, O, Wr, ve), ve = String.fromCharCode(55349, 57314 + Cn), p(g, b, he, Wr, ve), p(j, b, O, Wr, ve), ve = String.fromCharCode(55349, 57324 + Cn), p(g, b, he, Wr, ve), p(j, b, O, Wr, ve), ve = String.fromCharCode(55349, 57334 + Cn), p(g, b, he, Wr, ve), p(j, b, O, Wr, ve);
|
|
24881
24881
|
}
|
|
24882
24882
|
var v0 = "ÐÞþ";
|
|
24883
|
-
for (var
|
|
24884
|
-
var Js = v0.charAt(
|
|
24883
|
+
for (var ml = 0; ml < v0.length; ml++) {
|
|
24884
|
+
var Js = v0.charAt(ml);
|
|
24885
24885
|
p(g, b, he, Js, Js), p(j, b, O, Js, Js);
|
|
24886
24886
|
}
|
|
24887
24887
|
var Ys = [
|
|
@@ -24966,13 +24966,13 @@ var Ys = [
|
|
|
24966
24966
|
return ["", ""];
|
|
24967
24967
|
throw new q("Unsupported character: " + e);
|
|
24968
24968
|
}
|
|
24969
|
-
},
|
|
24969
|
+
}, fa = function(e, t, n) {
|
|
24970
24970
|
return Fe[n][e] && Fe[n][e].replace && (e = Fe[n][e].replace), {
|
|
24971
24971
|
value: e,
|
|
24972
24972
|
metrics: vu(e, t, n)
|
|
24973
24973
|
};
|
|
24974
24974
|
}, Yt = function(e, t, n, i, s) {
|
|
24975
|
-
var o =
|
|
24975
|
+
var o = fa(e, t, n), a = o.metrics;
|
|
24976
24976
|
e = o.value;
|
|
24977
24977
|
var l;
|
|
24978
24978
|
if (a) {
|
|
@@ -24987,9 +24987,9 @@ var Ys = [
|
|
|
24987
24987
|
}
|
|
24988
24988
|
return l;
|
|
24989
24989
|
}, c9 = function(e, t, n, i) {
|
|
24990
|
-
return i === void 0 && (i = []), n.font === "boldsymbol" &&
|
|
24990
|
+
return i === void 0 && (i = []), n.font === "boldsymbol" && fa(e, "Main-Bold", t).metrics ? Yt(e, "Main-Bold", t, n, i.concat(["mathbf"])) : e === "\\" || Fe[t][e].font === "main" ? Yt(e, "Main-Regular", t, n, i) : Yt(e, "AMS-Regular", t, n, i.concat(["amsrm"]));
|
|
24991
24991
|
}, d9 = function(e, t, n, i, s) {
|
|
24992
|
-
return s !== "textord" &&
|
|
24992
|
+
return s !== "textord" && fa(e, "Math-BoldItalic", t).metrics ? {
|
|
24993
24993
|
fontName: "Math-BoldItalic",
|
|
24994
24994
|
fontClass: "boldsymbol"
|
|
24995
24995
|
} : {
|
|
@@ -25006,7 +25006,7 @@ var Ys = [
|
|
|
25006
25006
|
var f = d9(s, i, t, o, n);
|
|
25007
25007
|
d = f.fontName, h = [f.fontClass];
|
|
25008
25008
|
} else a ? (d = f1[l].fontName, h = [l]) : (d = Xs(l, t.fontWeight, t.fontShape), h = [l, t.fontWeight, t.fontShape]);
|
|
25009
|
-
if (
|
|
25009
|
+
if (fa(s, d, i).metrics)
|
|
25010
25010
|
return Yt(s, d, i, t, o.concat(h));
|
|
25011
25011
|
if (u1.hasOwnProperty(s) && d.slice(0, 10) === "Typewriter") {
|
|
25012
25012
|
for (var m = [], v = 0; v < s.length; v++)
|
|
@@ -25334,7 +25334,7 @@ var Ys = [
|
|
|
25334
25334
|
minner: {
|
|
25335
25335
|
mop: je
|
|
25336
25336
|
}
|
|
25337
|
-
}, p1 = {},
|
|
25337
|
+
}, p1 = {}, zo = {}, Lo = {};
|
|
25338
25338
|
function Z(r) {
|
|
25339
25339
|
for (var {
|
|
25340
25340
|
type: e,
|
|
@@ -25356,7 +25356,7 @@ function Z(r) {
|
|
|
25356
25356
|
handler: i
|
|
25357
25357
|
}, l = 0; l < t.length; ++l)
|
|
25358
25358
|
p1[t[l]] = a;
|
|
25359
|
-
e && (s && (
|
|
25359
|
+
e && (s && (zo[e] = s), o && (Lo[e] = o));
|
|
25360
25360
|
}
|
|
25361
25361
|
function _n(r) {
|
|
25362
25362
|
var {
|
|
@@ -25377,7 +25377,7 @@ function _n(r) {
|
|
|
25377
25377
|
mathmlBuilder: n
|
|
25378
25378
|
});
|
|
25379
25379
|
}
|
|
25380
|
-
var
|
|
25380
|
+
var Bo = function(e) {
|
|
25381
25381
|
return e.type === "ordgroup" && e.body.length === 1 ? e.body[0] : e;
|
|
25382
25382
|
}, Je = function(e) {
|
|
25383
25383
|
return e.type === "ordgroup" ? e.body : [e];
|
|
@@ -25465,8 +25465,8 @@ var Lo = function(e) {
|
|
|
25465
25465
|
}, Ce = function(e, t, n) {
|
|
25466
25466
|
if (!e)
|
|
25467
25467
|
return zr();
|
|
25468
|
-
if (
|
|
25469
|
-
var i =
|
|
25468
|
+
if (zo[e.type]) {
|
|
25469
|
+
var i = zo[e.type](e, t);
|
|
25470
25470
|
if (n && t.size !== n.size) {
|
|
25471
25471
|
i = zr(t.sizingClasses(n), [i], t);
|
|
25472
25472
|
var s = t.sizeMultiplier / n.sizeMultiplier;
|
|
@@ -25660,7 +25660,7 @@ var V = {
|
|
|
25660
25660
|
var o = I.fontMap[n].fontName;
|
|
25661
25661
|
return vu(s, o, i) ? I.fontMap[n].variant : null;
|
|
25662
25662
|
};
|
|
25663
|
-
function
|
|
25663
|
+
function gl(r) {
|
|
25664
25664
|
if (!r)
|
|
25665
25665
|
return !1;
|
|
25666
25666
|
if (r.type === "mi" && r.children.length === 1) {
|
|
@@ -25686,12 +25686,12 @@ var At = function(e, t, n) {
|
|
|
25686
25686
|
} else if (l.type === "mn" && o.type === "mn") {
|
|
25687
25687
|
o.children.push(...l.children);
|
|
25688
25688
|
continue;
|
|
25689
|
-
} else if (
|
|
25689
|
+
} else if (gl(l) && o.type === "mn") {
|
|
25690
25690
|
o.children.push(...l.children);
|
|
25691
25691
|
continue;
|
|
25692
|
-
} else if (l.type === "mn" &&
|
|
25692
|
+
} else if (l.type === "mn" && gl(o))
|
|
25693
25693
|
l.children = [...o.children, ...l.children], s.pop();
|
|
25694
|
-
else if ((l.type === "msup" || l.type === "msub") && l.children.length >= 1 && (o.type === "mn" ||
|
|
25694
|
+
else if ((l.type === "msup" || l.type === "msub") && l.children.length >= 1 && (o.type === "mn" || gl(o))) {
|
|
25695
25695
|
var u = l.children[0];
|
|
25696
25696
|
u instanceof Pt && u.type === "mn" && (u.children = [...o.children, ...u.children], s.pop());
|
|
25697
25697
|
} else if (o.type === "mi" && o.children.length === 1) {
|
|
@@ -25710,8 +25710,8 @@ var At = function(e, t, n) {
|
|
|
25710
25710
|
}, ze = function(e, t) {
|
|
25711
25711
|
if (!e)
|
|
25712
25712
|
return new V.MathNode("mrow");
|
|
25713
|
-
if (
|
|
25714
|
-
var n =
|
|
25713
|
+
if (Lo[e.type]) {
|
|
25714
|
+
var n = Lo[e.type](e, t);
|
|
25715
25715
|
return n;
|
|
25716
25716
|
} else
|
|
25717
25717
|
throw new q("Got group of unknown type: '" + e.type + "'");
|
|
@@ -25952,12 +25952,12 @@ function we(r, e) {
|
|
|
25952
25952
|
return r;
|
|
25953
25953
|
}
|
|
25954
25954
|
function Su(r) {
|
|
25955
|
-
var e =
|
|
25955
|
+
var e = ha(r);
|
|
25956
25956
|
if (!e)
|
|
25957
25957
|
throw new Error("Expected node of symbol group type, but got " + (r ? "node of type " + r.type : String(r)));
|
|
25958
25958
|
return e;
|
|
25959
25959
|
}
|
|
25960
|
-
function
|
|
25960
|
+
function ha(r) {
|
|
25961
25961
|
return r && (r.type === "atom" || l9.hasOwnProperty(r.type)) ? r : null;
|
|
25962
25962
|
}
|
|
25963
25963
|
var ku = (r, e) => {
|
|
@@ -26021,7 +26021,7 @@ Z({
|
|
|
26021
26021
|
numArgs: 1
|
|
26022
26022
|
},
|
|
26023
26023
|
handler: (r, e) => {
|
|
26024
|
-
var t =
|
|
26024
|
+
var t = Bo(e[0]), n = !F9.test(r.funcName), i = !n || r.funcName === "\\widehat" || r.funcName === "\\widetilde" || r.funcName === "\\widecheck";
|
|
26025
26025
|
return {
|
|
26026
26026
|
type: "accent",
|
|
26027
26027
|
mode: r.parser.mode,
|
|
@@ -26247,7 +26247,7 @@ Z({
|
|
|
26247
26247
|
htmlBuilder: w1,
|
|
26248
26248
|
mathmlBuilder: x1
|
|
26249
26249
|
});
|
|
26250
|
-
var
|
|
26250
|
+
var pa = (r) => {
|
|
26251
26251
|
var e = r.type === "ordgroup" && r.body.length ? r.body[0] : r;
|
|
26252
26252
|
return e.type === "atom" && (e.family === "bin" || e.family === "rel") ? "m" + e.family : "mord";
|
|
26253
26253
|
};
|
|
@@ -26264,7 +26264,7 @@ Z({
|
|
|
26264
26264
|
return {
|
|
26265
26265
|
type: "mclass",
|
|
26266
26266
|
mode: t.mode,
|
|
26267
|
-
mclass:
|
|
26267
|
+
mclass: pa(e[0]),
|
|
26268
26268
|
body: Je(e[1]),
|
|
26269
26269
|
isCharacterBox: Ee.isCharacterBox(e[1])
|
|
26270
26270
|
};
|
|
@@ -26281,7 +26281,7 @@ Z({
|
|
|
26281
26281
|
parser: t,
|
|
26282
26282
|
funcName: n
|
|
26283
26283
|
} = r, i = e[1], s = e[0], o;
|
|
26284
|
-
n !== "\\stackrel" ? o =
|
|
26284
|
+
n !== "\\stackrel" ? o = pa(i) : o = "mrel";
|
|
26285
26285
|
var a = {
|
|
26286
26286
|
type: "op",
|
|
26287
26287
|
mode: i.mode,
|
|
@@ -26323,7 +26323,7 @@ Z({
|
|
|
26323
26323
|
return {
|
|
26324
26324
|
type: "pmb",
|
|
26325
26325
|
mode: t.mode,
|
|
26326
|
-
mclass:
|
|
26326
|
+
mclass: pa(e[0]),
|
|
26327
26327
|
body: Je(e[0])
|
|
26328
26328
|
};
|
|
26329
26329
|
},
|
|
@@ -26787,7 +26787,7 @@ var ji = function(e, t, n) {
|
|
|
26787
26787
|
}, E1 = function(e, t, n, i, s, o) {
|
|
26788
26788
|
var a = U9(e, t, s, i), l = Tu(I.makeSpan(["delimsizing", "size" + t], [a], i), pe.TEXT, i, o);
|
|
26789
26789
|
return n && M1(l, i, pe.TEXT), l;
|
|
26790
|
-
},
|
|
26790
|
+
}, vl = function(e, t, n) {
|
|
26791
26791
|
var i;
|
|
26792
26792
|
t === "Size1-Regular" ? i = "delim-size1" : i = "delim-size4";
|
|
26793
26793
|
var s = I.makeSpan(["delimsizinginner", i], [I.makeSpan([], [I.makeSymbol(e, t, n)])]);
|
|
@@ -26795,7 +26795,7 @@ var ji = function(e, t, n) {
|
|
|
26795
26795
|
type: "elem",
|
|
26796
26796
|
elem: s
|
|
26797
26797
|
};
|
|
26798
|
-
},
|
|
26798
|
+
}, yl = function(e, t, n) {
|
|
26799
26799
|
var i = ar["Size4-Regular"][e.charCodeAt(0)] ? ar["Size4-Regular"][e.charCodeAt(0)][4] : ar["Size1-Regular"][e.charCodeAt(0)][4], s = new dn("inner", X8(e, Math.round(1e3 * t))), o = new Ir([s], {
|
|
26800
26800
|
width: W(i),
|
|
26801
26801
|
height: W(t),
|
|
@@ -26835,14 +26835,14 @@ var ji = function(e, t, n) {
|
|
|
26835
26835
|
elem: C
|
|
26836
26836
|
});
|
|
26837
26837
|
} else {
|
|
26838
|
-
if (se.push(
|
|
26838
|
+
if (se.push(vl(c, f, s)), se.push(eo), l === null) {
|
|
26839
26839
|
var x = z - v - E + 2 * x0;
|
|
26840
|
-
se.push(
|
|
26840
|
+
se.push(yl(u, x, i));
|
|
26841
26841
|
} else {
|
|
26842
26842
|
var D = (z - v - E - P) / 2 + 2 * x0;
|
|
26843
|
-
se.push(
|
|
26843
|
+
se.push(yl(u, D, i)), se.push(eo), se.push(vl(l, f, s)), se.push(eo), se.push(yl(u, D, i));
|
|
26844
26844
|
}
|
|
26845
|
-
se.push(eo), se.push(
|
|
26845
|
+
se.push(eo), se.push(vl(a, f, s));
|
|
26846
26846
|
}
|
|
26847
26847
|
var _ = i.havingBaseStyle(pe.TEXT), G = I.makeVList({
|
|
26848
26848
|
positionType: "bottom",
|
|
@@ -26850,7 +26850,7 @@ var ji = function(e, t, n) {
|
|
|
26850
26850
|
children: se
|
|
26851
26851
|
}, _);
|
|
26852
26852
|
return Tu(I.makeSpan(["delimsizing", "mult"], [G], _), pe.TEXT, i, o);
|
|
26853
|
-
},
|
|
26853
|
+
}, bl = 80, wl = 0.08, xl = function(e, t, n, i, s) {
|
|
26854
26854
|
var o = Y8(e, i, n), a = new dn(e, o), l = new Ir([a], {
|
|
26855
26855
|
// Note: 1000:1 ratio of viewBox to document em width.
|
|
26856
26856
|
width: "400em",
|
|
@@ -26861,7 +26861,7 @@ var ji = function(e, t, n) {
|
|
|
26861
26861
|
return I.makeSvgSpan(["hide-tail"], [l], s);
|
|
26862
26862
|
}, J9 = function(e, t) {
|
|
26863
26863
|
var n = t.havingBaseSizing(), i = R1("\\surd", e * n.sizeMultiplier, D1, n), s = n.sizeMultiplier, o = Math.max(0, t.minRuleThickness - t.fontMetrics().sqrtRuleThickness), a, l = 0, u = 0, c = 0, d;
|
|
26864
|
-
return i.type === "small" ? (c = 1e3 + 1e3 * o +
|
|
26864
|
+
return i.type === "small" ? (c = 1e3 + 1e3 * o + bl, e < 1 ? s = 1 : e < 1.4 && (s = 0.7), l = (1 + o + wl) / s, u = (1 + o) / s, a = xl("sqrtMain", l, c, o, t), a.style.minWidth = "0.853em", d = 0.833 / s) : i.type === "large" ? (c = (1e3 + bl) * Ki[i.size], u = (Ki[i.size] + o) / s, l = (Ki[i.size] + o + wl) / s, a = xl("sqrtSize" + i.size, l, c, o, t), a.style.minWidth = "1.02em", d = 1 / s) : (l = e + o + wl, u = e + o, c = Math.floor(1e3 * e + o) + bl, a = xl("sqrtTall", l, c, o, t), a.style.minWidth = "0.742em", d = 1.056), a.height = u, a.style.height = W(l), {
|
|
26865
26865
|
span: a,
|
|
26866
26866
|
advanceWidth: d,
|
|
26867
26867
|
// Calculate the actual line width.
|
|
@@ -27043,8 +27043,8 @@ var ji = function(e, t, n) {
|
|
|
27043
27043
|
size: 4
|
|
27044
27044
|
}
|
|
27045
27045
|
}, rw = ["(", "\\lparen", ")", "\\rparen", "[", "\\lbrack", "]", "\\rbrack", "\\{", "\\lbrace", "\\}", "\\rbrace", "\\lfloor", "\\rfloor", "⌊", "⌋", "\\lceil", "\\rceil", "⌈", "⌉", "<", ">", "\\langle", "⟨", "\\rangle", "⟩", "\\lt", "\\gt", "\\lvert", "\\rvert", "\\lVert", "\\rVert", "\\lgroup", "\\rgroup", "⟮", "⟯", "\\lmoustache", "\\rmoustache", "⎰", "⎱", "/", "\\backslash", "|", "\\vert", "\\|", "\\Vert", "\\uparrow", "\\Uparrow", "\\downarrow", "\\Downarrow", "\\updownarrow", "\\Updownarrow", "."];
|
|
27046
|
-
function
|
|
27047
|
-
var t =
|
|
27046
|
+
function ma(r, e) {
|
|
27047
|
+
var t = ha(r);
|
|
27048
27048
|
if (t && rw.includes(t.text))
|
|
27049
27049
|
return t;
|
|
27050
27050
|
throw t ? new q("Invalid delimiter '" + t.text + "' after '" + e.funcName + "'", r) : new q("Invalid delimiter type '" + r.type + "'", r);
|
|
@@ -27057,7 +27057,7 @@ Z({
|
|
|
27057
27057
|
argTypes: ["primitive"]
|
|
27058
27058
|
},
|
|
27059
27059
|
handler: (r, e) => {
|
|
27060
|
-
var t =
|
|
27060
|
+
var t = ma(e[0], r);
|
|
27061
27061
|
return {
|
|
27062
27062
|
type: "delimsizing",
|
|
27063
27063
|
mode: r.parser.mode,
|
|
@@ -27094,7 +27094,7 @@ Z({
|
|
|
27094
27094
|
return {
|
|
27095
27095
|
type: "leftright-right",
|
|
27096
27096
|
mode: r.parser.mode,
|
|
27097
|
-
delim:
|
|
27097
|
+
delim: ma(e[0], r).text,
|
|
27098
27098
|
color: t
|
|
27099
27099
|
// undefined if not set via \color
|
|
27100
27100
|
};
|
|
@@ -27108,7 +27108,7 @@ Z({
|
|
|
27108
27108
|
primitive: !0
|
|
27109
27109
|
},
|
|
27110
27110
|
handler: (r, e) => {
|
|
27111
|
-
var t =
|
|
27111
|
+
var t = ma(e[0], r), n = r.parser;
|
|
27112
27112
|
++n.leftrightDepth;
|
|
27113
27113
|
var i = n.parseExpression(!1);
|
|
27114
27114
|
--n.leftrightDepth, n.expect("\\right", !1);
|
|
@@ -27164,7 +27164,7 @@ Z({
|
|
|
27164
27164
|
primitive: !0
|
|
27165
27165
|
},
|
|
27166
27166
|
handler: (r, e) => {
|
|
27167
|
-
var t =
|
|
27167
|
+
var t = ma(e[0], r);
|
|
27168
27168
|
if (!r.parser.leftrightDepth)
|
|
27169
27169
|
throw new q("\\middle without preceding \\left", t);
|
|
27170
27170
|
return {
|
|
@@ -27429,7 +27429,7 @@ function gr(r) {
|
|
|
27429
27429
|
handler: i
|
|
27430
27430
|
}, l = 0; l < t.length; ++l)
|
|
27431
27431
|
I1[t[l]] = a;
|
|
27432
|
-
s && (
|
|
27432
|
+
s && (zo[e] = s), o && (Lo[e] = o);
|
|
27433
27433
|
}
|
|
27434
27434
|
var z1 = {};
|
|
27435
27435
|
function S(r, e) {
|
|
@@ -27443,7 +27443,7 @@ function gf(r) {
|
|
|
27443
27443
|
r.consume(), e.push(t === "\\hdashline"), r.consumeSpaces(), t = r.fetch().text;
|
|
27444
27444
|
return e;
|
|
27445
27445
|
}
|
|
27446
|
-
var
|
|
27446
|
+
var ga = (r) => {
|
|
27447
27447
|
var e = r.parser.settings;
|
|
27448
27448
|
if (!e.displayMode)
|
|
27449
27449
|
throw new q("{" + r.envName + "} can be used only in display mode.");
|
|
@@ -27669,7 +27669,7 @@ var vr = function(e, t) {
|
|
|
27669
27669
|
R += L[z].length === 0 ? "none " : L[z][0] ? "dashed " : "solid ";
|
|
27670
27670
|
return /[sd]/.test(R) && c.setAttribute("rowlines", R.trim()), h !== "" && (c = new V.MathNode("menclose", [c]), c.setAttribute("notation", h.trim())), e.arraystretch && e.arraystretch < 1 && (c = new V.MathNode("mstyle", [c]), c.setAttribute("scriptlevel", "1")), c;
|
|
27671
27671
|
}, L1 = function(e, t) {
|
|
27672
|
-
e.envName.indexOf("ed") === -1 &&
|
|
27672
|
+
e.envName.indexOf("ed") === -1 && ga(e);
|
|
27673
27673
|
var n = [], i = e.envName.indexOf("at") > -1 ? "alignat" : "align", s = e.envName === "split", o = vn(e.parser, {
|
|
27674
27674
|
cols: n,
|
|
27675
27675
|
addJot: !0,
|
|
@@ -27722,7 +27722,7 @@ gr({
|
|
|
27722
27722
|
numArgs: 1
|
|
27723
27723
|
},
|
|
27724
27724
|
handler(r, e) {
|
|
27725
|
-
var t =
|
|
27725
|
+
var t = ha(e[0]), n = t ? [e[0]] : we(e[0], "ordgroup").body, i = n.map(function(o) {
|
|
27726
27726
|
var a = Su(o), l = a.text;
|
|
27727
27727
|
if ("lcr".indexOf(l) !== -1)
|
|
27728
27728
|
return {
|
|
@@ -27822,7 +27822,7 @@ gr({
|
|
|
27822
27822
|
numArgs: 1
|
|
27823
27823
|
},
|
|
27824
27824
|
handler(r, e) {
|
|
27825
|
-
var t =
|
|
27825
|
+
var t = ha(e[0]), n = t ? [e[0]] : we(e[0], "ordgroup").body, i = n.map(function(o) {
|
|
27826
27826
|
var a = Su(o), l = a.text;
|
|
27827
27827
|
if ("lc".indexOf(l) !== -1)
|
|
27828
27828
|
return {
|
|
@@ -27900,7 +27900,7 @@ gr({
|
|
|
27900
27900
|
numArgs: 0
|
|
27901
27901
|
},
|
|
27902
27902
|
handler(r) {
|
|
27903
|
-
["gather", "gather*"].includes(r.envName) &&
|
|
27903
|
+
["gather", "gather*"].includes(r.envName) && ga(r);
|
|
27904
27904
|
var e = {
|
|
27905
27905
|
cols: [{
|
|
27906
27906
|
type: "align",
|
|
@@ -27934,7 +27934,7 @@ gr({
|
|
|
27934
27934
|
numArgs: 0
|
|
27935
27935
|
},
|
|
27936
27936
|
handler(r) {
|
|
27937
|
-
|
|
27937
|
+
ga(r);
|
|
27938
27938
|
var e = {
|
|
27939
27939
|
autoTag: Eu(r.envName),
|
|
27940
27940
|
emptySingleRow: !0,
|
|
@@ -27954,7 +27954,7 @@ gr({
|
|
|
27954
27954
|
numArgs: 0
|
|
27955
27955
|
},
|
|
27956
27956
|
handler(r) {
|
|
27957
|
-
return
|
|
27957
|
+
return ga(r), V9(r.parser);
|
|
27958
27958
|
},
|
|
27959
27959
|
htmlBuilder: vr,
|
|
27960
27960
|
mathmlBuilder: yr
|
|
@@ -28057,7 +28057,7 @@ Z({
|
|
|
28057
28057
|
var {
|
|
28058
28058
|
parser: t,
|
|
28059
28059
|
funcName: n
|
|
28060
|
-
} = r, i =
|
|
28060
|
+
} = r, i = Bo(e[0]), s = n;
|
|
28061
28061
|
return s in yf && (s = yf[s]), {
|
|
28062
28062
|
type: "font",
|
|
28063
28063
|
mode: t.mode,
|
|
@@ -28081,7 +28081,7 @@ Z({
|
|
|
28081
28081
|
return {
|
|
28082
28082
|
type: "mclass",
|
|
28083
28083
|
mode: t.mode,
|
|
28084
|
-
mclass:
|
|
28084
|
+
mclass: pa(n),
|
|
28085
28085
|
body: [{
|
|
28086
28086
|
type: "font",
|
|
28087
28087
|
mode: t.mode,
|
|
@@ -28359,7 +28359,7 @@ Z({
|
|
|
28359
28359
|
handler(r, e) {
|
|
28360
28360
|
var {
|
|
28361
28361
|
parser: t
|
|
28362
|
-
} = r, n = e[4], i = e[5], s =
|
|
28362
|
+
} = r, n = e[4], i = e[5], s = Bo(e[0]), o = s.type === "atom" && s.family === "open" ? wf(s.text) : null, a = Bo(e[1]), l = a.type === "atom" && a.family === "close" ? wf(a.text) : null, u = we(e[2], "size"), c, d = null;
|
|
28363
28363
|
u.isBlank ? c = !0 : (d = u.value, c = d.number > 0);
|
|
28364
28364
|
var h = "auto", f = e[3];
|
|
28365
28365
|
if (f.type === "ordgroup") {
|
|
@@ -28711,7 +28711,7 @@ Z({
|
|
|
28711
28711
|
},
|
|
28712
28712
|
mathmlBuilder: (r, e) => fn(r.mathml, e)
|
|
28713
28713
|
});
|
|
28714
|
-
var
|
|
28714
|
+
var Sl = function(e) {
|
|
28715
28715
|
if (/^[-+]? *(\d+(\.\d*)?|\.\d+)$/.test(e))
|
|
28716
28716
|
return {
|
|
28717
28717
|
number: +e,
|
|
@@ -28761,13 +28761,13 @@ Z({
|
|
|
28761
28761
|
a = h;
|
|
28762
28762
|
break;
|
|
28763
28763
|
case "width":
|
|
28764
|
-
i =
|
|
28764
|
+
i = Sl(h);
|
|
28765
28765
|
break;
|
|
28766
28766
|
case "height":
|
|
28767
|
-
s =
|
|
28767
|
+
s = Sl(h);
|
|
28768
28768
|
break;
|
|
28769
28769
|
case "totalheight":
|
|
28770
|
-
o =
|
|
28770
|
+
o = Sl(h);
|
|
28771
28771
|
break;
|
|
28772
28772
|
default:
|
|
28773
28773
|
throw new q("Invalid key: '" + d[0] + "' in \\includegraphics.");
|
|
@@ -29905,10 +29905,10 @@ _n({
|
|
|
29905
29905
|
return r.mode === "text" ? i = new V.MathNode("mtext", [t]) : /[0-9]/.test(r.text) ? i = new V.MathNode("mn", [t]) : r.text === "\\prime" ? i = new V.MathNode("mo", [t]) : i = new V.MathNode("mi", [t]), n !== W1[i.type] && i.setAttribute("mathvariant", n), i;
|
|
29906
29906
|
}
|
|
29907
29907
|
});
|
|
29908
|
-
var
|
|
29908
|
+
var kl = {
|
|
29909
29909
|
"\\nobreak": "nobreak",
|
|
29910
29910
|
"\\allowbreak": "allowbreak"
|
|
29911
|
-
},
|
|
29911
|
+
}, Tl = {
|
|
29912
29912
|
" ": {},
|
|
29913
29913
|
"\\ ": {},
|
|
29914
29914
|
"~": {
|
|
@@ -29922,25 +29922,25 @@ var Sl = {
|
|
|
29922
29922
|
_n({
|
|
29923
29923
|
type: "spacing",
|
|
29924
29924
|
htmlBuilder(r, e) {
|
|
29925
|
-
if (
|
|
29926
|
-
var t =
|
|
29925
|
+
if (Tl.hasOwnProperty(r.text)) {
|
|
29926
|
+
var t = Tl[r.text].className || "";
|
|
29927
29927
|
if (r.mode === "text") {
|
|
29928
29928
|
var n = I.makeOrd(r, e, "textord");
|
|
29929
29929
|
return n.classes.push(t), n;
|
|
29930
29930
|
} else
|
|
29931
29931
|
return I.makeSpan(["mspace", t], [I.mathsym(r.text, r.mode, e)], e);
|
|
29932
29932
|
} else {
|
|
29933
|
-
if (
|
|
29934
|
-
return I.makeSpan(["mspace",
|
|
29933
|
+
if (kl.hasOwnProperty(r.text))
|
|
29934
|
+
return I.makeSpan(["mspace", kl[r.text]], [], e);
|
|
29935
29935
|
throw new q('Unknown type of space "' + r.text + '"');
|
|
29936
29936
|
}
|
|
29937
29937
|
},
|
|
29938
29938
|
mathmlBuilder(r, e) {
|
|
29939
29939
|
var t;
|
|
29940
|
-
if (
|
|
29940
|
+
if (Tl.hasOwnProperty(r.text))
|
|
29941
29941
|
t = new V.MathNode("mtext", [new V.TextNode(" ")]);
|
|
29942
29942
|
else {
|
|
29943
|
-
if (
|
|
29943
|
+
if (kl.hasOwnProperty(r.text))
|
|
29944
29944
|
return new V.MathNode("mspace");
|
|
29945
29945
|
throw new q('Unknown type of space "' + r.text + '"');
|
|
29946
29946
|
}
|
|
@@ -31230,7 +31230,7 @@ var Rf = /^[₊₋₌₍₎₀₁₂₃₄₅₆₇₈₉ₐₑₕᵢⱼₖₗ
|
|
|
31230
31230
|
"ᵠ": "ϕ",
|
|
31231
31231
|
"ᵡ": "χ",
|
|
31232
31232
|
"ᶿ": "θ"
|
|
31233
|
-
}),
|
|
31233
|
+
}), Cl = {
|
|
31234
31234
|
"́": {
|
|
31235
31235
|
text: "\\'",
|
|
31236
31236
|
math: "\\acute"
|
|
@@ -31623,7 +31623,7 @@ var Rf = /^[₊₋₌₍₎₀₁₂₃₄₅₆₇₈₉ₐₑₕᵢⱼₖₗ
|
|
|
31623
31623
|
Ώ: "Ώ",
|
|
31624
31624
|
Ὼ: "Ὼ"
|
|
31625
31625
|
};
|
|
31626
|
-
class
|
|
31626
|
+
class va {
|
|
31627
31627
|
constructor(e, t) {
|
|
31628
31628
|
this.mode = void 0, this.gullet = void 0, this.settings = void 0, this.leftrightDepth = void 0, this.nextToken = void 0, this.mode = "math", this.gullet = new bw(e, t, this.mode), this.settings = t, this.leftrightDepth = 0;
|
|
31629
31629
|
}
|
|
@@ -31693,7 +31693,7 @@ class ga {
|
|
|
31693
31693
|
for (var n = []; ; ) {
|
|
31694
31694
|
this.mode === "math" && this.consumeSpaces();
|
|
31695
31695
|
var i = this.fetch();
|
|
31696
|
-
if (
|
|
31696
|
+
if (va.endOfExpression.indexOf(i.text) !== -1 || t && i.text === t || e && Qr[i.text] && Qr[i.text].infix)
|
|
31697
31697
|
break;
|
|
31698
31698
|
var s = this.parseAtom(t);
|
|
31699
31699
|
if (s) {
|
|
@@ -32174,9 +32174,9 @@ class ga {
|
|
|
32174
32174
|
if (this.consume(), s)
|
|
32175
32175
|
for (var d = 0; d < s[0].length; d++) {
|
|
32176
32176
|
var h = s[0][d];
|
|
32177
|
-
if (!
|
|
32177
|
+
if (!Cl[h])
|
|
32178
32178
|
throw new q("Unknown accent ' " + h + "'", e);
|
|
32179
|
-
var f =
|
|
32179
|
+
var f = Cl[h][this.mode] || Cl[h].text;
|
|
32180
32180
|
if (!f)
|
|
32181
32181
|
throw new q("Accent " + h + " unsupported in " + this.mode + " mode", e);
|
|
32182
32182
|
o = {
|
|
@@ -32193,11 +32193,11 @@ class ga {
|
|
|
32193
32193
|
return o;
|
|
32194
32194
|
}
|
|
32195
32195
|
}
|
|
32196
|
-
|
|
32196
|
+
va.endOfExpression = ["}", "\\endgroup", "\\end", "\\right", "&"];
|
|
32197
32197
|
var Pu = function(e, t) {
|
|
32198
32198
|
if (!(typeof e == "string" || e instanceof String))
|
|
32199
32199
|
throw new TypeError("KaTeX can only parse string typed expression");
|
|
32200
|
-
var n = new
|
|
32200
|
+
var n = new va(e, t);
|
|
32201
32201
|
delete n.gullet.macros.current["\\df@tag"];
|
|
32202
32202
|
var i = n.parse();
|
|
32203
32203
|
if (delete n.gullet.macros.current["\\current@color"], delete n.gullet.macros.current["\\color"], n.gullet.macros.get("\\df@tag")) {
|
|
@@ -32336,7 +32336,6 @@ const Cw = Oe.create({
|
|
|
32336
32336
|
content: "text*",
|
|
32337
32337
|
group: "inline math",
|
|
32338
32338
|
inline: !0,
|
|
32339
|
-
atom: !1,
|
|
32340
32339
|
parseHTML() {
|
|
32341
32340
|
return [{ tag: "m" }];
|
|
32342
32341
|
},
|
|
@@ -32346,15 +32345,20 @@ const Cw = Oe.create({
|
|
|
32346
32345
|
addNodeView() {
|
|
32347
32346
|
return ({ node: r, HTMLAttributes: e }) => {
|
|
32348
32347
|
const t = document.createElement("span");
|
|
32349
|
-
t.classList.add("node-view"), Object.entries(e).forEach(([a, l]) => {
|
|
32348
|
+
t.classList.add("node-view", "math"), Object.entries(e).forEach(([a, l]) => {
|
|
32350
32349
|
t.setAttribute(a, l);
|
|
32351
32350
|
});
|
|
32352
32351
|
const n = document.createElement("span"), i = document.createElement("span"), s = r.textContent.trim();
|
|
32353
|
-
return n.innerHTML = gi.renderToString(s, { throwOnError: !1 }), n.contentEditable = "
|
|
32354
|
-
|
|
32352
|
+
return n.classList.add("katex-rendered"), n.innerHTML = gi.renderToString(s, { throwOnError: !1 }), n.contentEditable = "false", n.style.pointerEvents = "none", i.classList.add("edit-math"), i.classList.add("is-editable"), i.innerHTML = "<m>" + r.textContent + "</m>", i.contentEditable = "true", i.draggable = !1, new MutationObserver(() => {
|
|
32353
|
+
const a = i.textContent || "";
|
|
32354
|
+
n.innerHTML = gi.renderToString(a, {
|
|
32355
32355
|
throwOnError: !1
|
|
32356
32356
|
});
|
|
32357
|
-
}).observe(i, { characterData: !0, subtree: !0 }),
|
|
32357
|
+
}).observe(i, { characterData: !0, subtree: !0 }), i.addEventListener("focus", () => {
|
|
32358
|
+
t.classList.add("has-focus");
|
|
32359
|
+
}), i.addEventListener("blur", () => {
|
|
32360
|
+
t.classList.remove("has-focus");
|
|
32361
|
+
}), t.appendChild(i), t.appendChild(n), {
|
|
32358
32362
|
dom: t,
|
|
32359
32363
|
contentDOM: i
|
|
32360
32364
|
};
|
|
@@ -32374,15 +32378,20 @@ const Cw = Oe.create({
|
|
|
32374
32378
|
addNodeView() {
|
|
32375
32379
|
return ({ node: r, HTMLAttributes: e }) => {
|
|
32376
32380
|
const t = document.createElement("div");
|
|
32377
|
-
t.classList.add("node-view"), t.classList.add("display"), Object.entries(e).forEach(([a, l]) => {
|
|
32381
|
+
t.classList.add("node-view", "math"), t.classList.add("display"), Object.entries(e).forEach(([a, l]) => {
|
|
32378
32382
|
t.setAttribute(a, l);
|
|
32379
32383
|
});
|
|
32380
32384
|
const n = document.createElement("span"), i = document.createElement("span"), s = r.textContent.trim();
|
|
32381
|
-
return n.innerHTML = gi.renderToString(s, { throwOnError: !1 }), n.contentEditable = "false", i.classList.add("edit-math"), i.classList.add("is-editable"), i.innerHTML = "<md>" + r.textContent + "</md>", new MutationObserver(() => {
|
|
32382
|
-
|
|
32385
|
+
return n.classList.add("katex-rendered"), n.innerHTML = gi.renderToString(s, { throwOnError: !1 }), n.contentEditable = "false", n.style.pointerEvents = "none", i.classList.add("edit-math"), i.classList.add("is-editable"), i.contentEditable = "true", i.innerHTML = "<md>" + r.textContent + "</md>", i.draggable = !1, new MutationObserver(() => {
|
|
32386
|
+
const a = i.textContent || "";
|
|
32387
|
+
n.innerHTML = gi.renderToString(a, {
|
|
32383
32388
|
throwOnError: !1
|
|
32384
32389
|
});
|
|
32385
|
-
}).observe(i, { characterData: !0, subtree: !0 }),
|
|
32390
|
+
}).observe(i, { characterData: !0, subtree: !0 }), i.addEventListener("focus", () => {
|
|
32391
|
+
t.classList.add("has-focus");
|
|
32392
|
+
}), i.addEventListener("blur", () => {
|
|
32393
|
+
t.classList.remove("has-focus");
|
|
32394
|
+
}), t.appendChild(i), t.appendChild(n), {
|
|
32386
32395
|
dom: t,
|
|
32387
32396
|
contentDOM: i
|
|
32388
32397
|
};
|
|
@@ -32402,15 +32411,20 @@ const Cw = Oe.create({
|
|
|
32402
32411
|
addNodeView() {
|
|
32403
32412
|
return ({ node: r, HTMLAttributes: e }) => {
|
|
32404
32413
|
const t = document.createElement("div");
|
|
32405
|
-
t.classList.add("node-view"), t.classList.add("display"), Object.entries(e).forEach(([a, l]) => {
|
|
32414
|
+
t.classList.add("node-view", "math"), t.classList.add("display"), Object.entries(e).forEach(([a, l]) => {
|
|
32406
32415
|
t.setAttribute(a, l);
|
|
32407
32416
|
});
|
|
32408
32417
|
const n = document.createElement("span"), i = document.createElement("span"), s = r.textContent.trim();
|
|
32409
|
-
return n.innerHTML = gi.renderToString(s, { throwOnError: !1 }), n.contentEditable = "false", i.classList.add("edit-math"), i.classList.add("is-editable"), i.innerHTML = "<md>" + r.textContent + "</md>", new MutationObserver(() => {
|
|
32410
|
-
|
|
32418
|
+
return n.classList.add("katex-rendered"), n.innerHTML = gi.renderToString(s, { throwOnError: !1 }), n.contentEditable = "false", n.style.pointerEvents = "none", i.classList.add("edit-math"), i.classList.add("is-editable"), i.innerHTML = "<md>" + r.textContent + "</md>", i.contentEditable = "true", i.draggable = !1, new MutationObserver(() => {
|
|
32419
|
+
const a = i.textContent || "";
|
|
32420
|
+
n.innerHTML = gi.renderToString(a, {
|
|
32411
32421
|
throwOnError: !1
|
|
32412
32422
|
});
|
|
32413
|
-
}).observe(i, { characterData: !0, subtree: !0 }),
|
|
32423
|
+
}).observe(i, { characterData: !0, subtree: !0 }), i.addEventListener("focus", () => {
|
|
32424
|
+
t.classList.add("has-focus");
|
|
32425
|
+
}), i.addEventListener("blur", () => {
|
|
32426
|
+
t.classList.remove("has-focus");
|
|
32427
|
+
}), t.appendChild(i), t.appendChild(n), {
|
|
32414
32428
|
dom: t,
|
|
32415
32429
|
contentDOM: i
|
|
32416
32430
|
};
|
|
@@ -32734,7 +32748,7 @@ const Fw = Lw.extend({}), $w = Bw.extend({}), Hw = ws.create({
|
|
|
32734
32748
|
},
|
|
32735
32749
|
addPasteRules() {
|
|
32736
32750
|
return [
|
|
32737
|
-
|
|
32751
|
+
ca({
|
|
32738
32752
|
find: /(?:^|\s)(<term>(.*?)<\/term>)/g,
|
|
32739
32753
|
type: this.type
|
|
32740
32754
|
})
|
|
@@ -32763,7 +32777,7 @@ const Fw = Lw.extend({}), $w = Bw.extend({}), Hw = ws.create({
|
|
|
32763
32777
|
},
|
|
32764
32778
|
addPasteRules() {
|
|
32765
32779
|
return [
|
|
32766
|
-
|
|
32780
|
+
ca({
|
|
32767
32781
|
find: /(?:^|\s)(<em>(.*?)<\/em>)/g,
|
|
32768
32782
|
type: this.type
|
|
32769
32783
|
})
|
|
@@ -32792,7 +32806,7 @@ const Fw = Lw.extend({}), $w = Bw.extend({}), Hw = ws.create({
|
|
|
32792
32806
|
},
|
|
32793
32807
|
addPasteRules() {
|
|
32794
32808
|
return [
|
|
32795
|
-
|
|
32809
|
+
ca({
|
|
32796
32810
|
find: /(?:^|\s)(<alert>(.*?)<\/alert>)/g,
|
|
32797
32811
|
type: this.type
|
|
32798
32812
|
})
|
|
@@ -32821,7 +32835,7 @@ const Fw = Lw.extend({}), $w = Bw.extend({}), Hw = ws.create({
|
|
|
32821
32835
|
},
|
|
32822
32836
|
addPasteRules() {
|
|
32823
32837
|
return [
|
|
32824
|
-
|
|
32838
|
+
ca({
|
|
32825
32839
|
find: /(?:^|\s)(<c>(.*?)<\/c>)/g,
|
|
32826
32840
|
type: this.type
|
|
32827
32841
|
})
|
|
@@ -32834,20 +32848,27 @@ const Fw = Lw.extend({}), $w = Bw.extend({}), Hw = ws.create({
|
|
|
32834
32848
|
}
|
|
32835
32849
|
}), Cs = (r) => {
|
|
32836
32850
|
const e = r.node.type.name.charAt(0).toUpperCase() + r.node.type.name.slice(1);
|
|
32837
|
-
return /* @__PURE__ */ Y.jsxs(
|
|
32838
|
-
|
|
32839
|
-
|
|
32840
|
-
"
|
|
32841
|
-
|
|
32842
|
-
|
|
32843
|
-
|
|
32851
|
+
return /* @__PURE__ */ Y.jsxs(
|
|
32852
|
+
Km,
|
|
32853
|
+
{
|
|
32854
|
+
className: "block-component",
|
|
32855
|
+
ptxtag: r.node.type.name,
|
|
32856
|
+
children: [
|
|
32857
|
+
/* @__PURE__ */ Y.jsxs("div", { className: "block-title", children: [
|
|
32858
|
+
e,
|
|
32859
|
+
"."
|
|
32860
|
+
] }),
|
|
32861
|
+
/* @__PURE__ */ Y.jsx(Um, { className: "thm-component-content" })
|
|
32862
|
+
]
|
|
32863
|
+
}
|
|
32864
|
+
);
|
|
32844
32865
|
}, Z1 = () => /* @__PURE__ */ Y.jsxs(Km, { className: "proof", ptxtag: "proof", children: [
|
|
32845
32866
|
/* @__PURE__ */ Y.jsx("div", { className: "block-title", children: "Proof." }),
|
|
32846
32867
|
/* @__PURE__ */ Y.jsx(Um, { className: "thm-component-content" })
|
|
32847
32868
|
] });
|
|
32848
|
-
var
|
|
32869
|
+
var Ml, If;
|
|
32849
32870
|
function Ww() {
|
|
32850
|
-
if (If) return
|
|
32871
|
+
if (If) return Ml;
|
|
32851
32872
|
If = 1;
|
|
32852
32873
|
var r = Object.defineProperty, e = Object.getOwnPropertyDescriptor, t = Object.getOwnPropertyNames, n = Object.prototype.hasOwnProperty, i = (C, x) => {
|
|
32853
32874
|
for (var D in x)
|
|
@@ -32870,7 +32891,7 @@ function Ww() {
|
|
|
32870
32891
|
XmlProcessingInstruction: () => K,
|
|
32871
32892
|
XmlText: () => R,
|
|
32872
32893
|
parseXml: () => ke
|
|
32873
|
-
}),
|
|
32894
|
+
}), Ml = o(a);
|
|
32874
32895
|
var l = "", u = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g, c = class {
|
|
32875
32896
|
constructor(C) {
|
|
32876
32897
|
if (this.k = this.u(C, !0), this.d = 0, this.length = C.length, this.l = this.k !== this.length, this.h = C, this.l) {
|
|
@@ -33702,7 +33723,7 @@ function Ww() {
|
|
|
33702
33723
|
function ke(C, x) {
|
|
33703
33724
|
return new Se(C, x).document;
|
|
33704
33725
|
}
|
|
33705
|
-
return
|
|
33726
|
+
return Ml;
|
|
33706
33727
|
}
|
|
33707
33728
|
var Uw = Ww();
|
|
33708
33729
|
function Kw(r) {
|
|
@@ -34022,7 +34043,7 @@ function yx(r) {
|
|
|
34022
34043
|
}
|
|
34023
34044
|
const bx = [" ", `
|
|
34024
34045
|
`, " ", '"', "&", "'", "/", "<", "=", ">"];
|
|
34025
|
-
function
|
|
34046
|
+
function Fo(r) {
|
|
34026
34047
|
return ki(r, bx);
|
|
34027
34048
|
}
|
|
34028
34049
|
function $f(r, e) {
|
|
@@ -34044,24 +34065,24 @@ function T0(r, e) {
|
|
|
34044
34065
|
return n + ki(t, ["<", "&", n]) + n;
|
|
34045
34066
|
}
|
|
34046
34067
|
function wx(r, e) {
|
|
34047
|
-
const t =
|
|
34068
|
+
const t = Fo(r.name), n = r.public, i = r.system;
|
|
34048
34069
|
let s = "<!DOCTYPE";
|
|
34049
34070
|
return t !== "" && (s += " " + t), n ? s += " PUBLIC " + T0(n, e) : i && (s += " SYSTEM"), i && (s += " " + T0(i, e)), s + ">";
|
|
34050
34071
|
}
|
|
34051
34072
|
const xx = {}.hasOwnProperty;
|
|
34052
34073
|
function Sx(r, e) {
|
|
34053
|
-
const t =
|
|
34074
|
+
const t = Fo(r.name), n = sg(r, e), i = r.attributes || {}, s = n ? !1 : e.options.closeEmptyElements, o = [];
|
|
34054
34075
|
let a;
|
|
34055
34076
|
for (a in i)
|
|
34056
34077
|
if (xx.call(i, a)) {
|
|
34057
34078
|
const l = i[a];
|
|
34058
|
-
l != null && o.push(
|
|
34079
|
+
l != null && o.push(Fo(a) + "=" + T0(l, e));
|
|
34059
34080
|
}
|
|
34060
34081
|
return "<" + t + (o.length === 0 ? "" : " " + o.join(" ")) + (s ? (e.options.tightClose ? "" : " ") + "/" : "") + ">" + n + (s ? "" : "</" + t + ">");
|
|
34061
34082
|
}
|
|
34062
34083
|
const kx = /\?>/g, Tx = [">"];
|
|
34063
34084
|
function Cx(r) {
|
|
34064
|
-
const e =
|
|
34085
|
+
const e = Fo(r.name) || "x", t = ki(r.value, Tx, kx);
|
|
34065
34086
|
return "<?" + e + (t ? " " + t : "") + "?>";
|
|
34066
34087
|
}
|
|
34067
34088
|
const Mx = ["&", "<"];
|
|
@@ -34126,7 +34147,7 @@ const og = (
|
|
|
34126
34147
|
if (r == null)
|
|
34127
34148
|
return Rx;
|
|
34128
34149
|
if (typeof r == "function")
|
|
34129
|
-
return
|
|
34150
|
+
return ya(r);
|
|
34130
34151
|
if (typeof r == "object")
|
|
34131
34152
|
return Array.isArray(r) ? Ox(r) : (
|
|
34132
34153
|
// Cast because `ReadonlyArray` goes into the above but `isArray`
|
|
@@ -34146,7 +34167,7 @@ function Ox(r) {
|
|
|
34146
34167
|
let t = -1;
|
|
34147
34168
|
for (; ++t < r.length; )
|
|
34148
34169
|
e[t] = og(r[t]);
|
|
34149
|
-
return
|
|
34170
|
+
return ya(n);
|
|
34150
34171
|
function n(...i) {
|
|
34151
34172
|
let s = -1;
|
|
34152
34173
|
for (; ++s < e.length; )
|
|
@@ -34159,7 +34180,7 @@ function Nx(r) {
|
|
|
34159
34180
|
/** @type {Record<string, unknown>} */
|
|
34160
34181
|
r
|
|
34161
34182
|
);
|
|
34162
|
-
return
|
|
34183
|
+
return ya(t);
|
|
34163
34184
|
function t(n) {
|
|
34164
34185
|
const i = (
|
|
34165
34186
|
/** @type {Record<string, unknown>} */
|
|
@@ -34173,12 +34194,12 @@ function Nx(r) {
|
|
|
34173
34194
|
}
|
|
34174
34195
|
}
|
|
34175
34196
|
function Dx(r) {
|
|
34176
|
-
return
|
|
34197
|
+
return ya(e);
|
|
34177
34198
|
function e(t) {
|
|
34178
34199
|
return t && t.type === r;
|
|
34179
34200
|
}
|
|
34180
34201
|
}
|
|
34181
|
-
function
|
|
34202
|
+
function ya(r) {
|
|
34182
34203
|
return e;
|
|
34183
34204
|
function e(t, n, i) {
|
|
34184
34205
|
return !!(Px(t) && r.call(
|
|
@@ -34670,7 +34691,7 @@ const Kx = [
|
|
|
34670
34691
|
return [rS, Gx, Qx, Yx, tS, Xx];
|
|
34671
34692
|
}
|
|
34672
34693
|
});
|
|
34673
|
-
var
|
|
34694
|
+
var El = 4, iS = /^```([a-z]+)?[\s\n]$/, sS = /^~~~([a-z]+)?[\s\n]$/, oS = Oe.create({
|
|
34674
34695
|
name: "codeBlock",
|
|
34675
34696
|
addOptions() {
|
|
34676
34697
|
return {
|
|
@@ -34679,7 +34700,7 @@ var Ml = 4, iS = /^```([a-z]+)?[\s\n]$/, sS = /^~~~([a-z]+)?[\s\n]$/, oS = Oe.cr
|
|
|
34679
34700
|
exitOnArrowDown: !0,
|
|
34680
34701
|
defaultLanguage: null,
|
|
34681
34702
|
enableTabIndentation: !1,
|
|
34682
|
-
tabSize:
|
|
34703
|
+
tabSize: El,
|
|
34683
34704
|
HTMLAttributes: {}
|
|
34684
34705
|
};
|
|
34685
34706
|
},
|
|
@@ -34762,7 +34783,7 @@ var Ml = 4, iS = /^```([a-z]+)?[\s\n]$/, sS = /^~~~([a-z]+)?[\s\n]$/, oS = Oe.cr
|
|
|
34762
34783
|
var e;
|
|
34763
34784
|
if (!this.options.enableTabIndentation)
|
|
34764
34785
|
return !1;
|
|
34765
|
-
const t = (e = this.options.tabSize) != null ? e :
|
|
34786
|
+
const t = (e = this.options.tabSize) != null ? e : El, { state: n } = r, { selection: i } = n, { $from: s, empty: o } = i;
|
|
34766
34787
|
if (s.parent.type !== this.type)
|
|
34767
34788
|
return !1;
|
|
34768
34789
|
const a = " ".repeat(t);
|
|
@@ -34780,7 +34801,7 @@ var Ml = 4, iS = /^```([a-z]+)?[\s\n]$/, sS = /^~~~([a-z]+)?[\s\n]$/, oS = Oe.cr
|
|
|
34780
34801
|
var e;
|
|
34781
34802
|
if (!this.options.enableTabIndentation)
|
|
34782
34803
|
return !1;
|
|
34783
|
-
const t = (e = this.options.tabSize) != null ? e :
|
|
34804
|
+
const t = (e = this.options.tabSize) != null ? e : El, { state: n } = r, { selection: i } = n, { $from: s, empty: o } = i;
|
|
34784
34805
|
return s.parent.type !== this.type ? !1 : o ? r.commands.command(({ tr: a }) => {
|
|
34785
34806
|
var l;
|
|
34786
34807
|
const { pos: u } = s, c = s.start(), d = s.end(), f = n.doc.textBetween(c, d, `
|
|
@@ -35046,7 +35067,7 @@ function ug(r) {
|
|
|
35046
35067
|
` : e = e + "<!-- Something is missing; got " + JSON.stringify(r) + " -->";
|
|
35047
35068
|
return e;
|
|
35048
35069
|
}
|
|
35049
|
-
const cg = ["top", "right", "bottom", "left"], qf = ["start", "end"], Wf = /* @__PURE__ */ cg.reduce((r, e) => r.concat(e, e + "-" + qf[0], e + "-" + qf[1]), []), pr = Math.min, gt = Math.max,
|
|
35070
|
+
const cg = ["top", "right", "bottom", "left"], qf = ["start", "end"], Wf = /* @__PURE__ */ cg.reduce((r, e) => r.concat(e, e + "-" + qf[0], e + "-" + qf[1]), []), pr = Math.min, gt = Math.max, $o = Math.round, cr = (r) => ({
|
|
35050
35071
|
x: r,
|
|
35051
35072
|
y: r
|
|
35052
35073
|
}), hS = {
|
|
@@ -35087,13 +35108,13 @@ function fg(r, e, t) {
|
|
|
35087
35108
|
t === void 0 && (t = !1);
|
|
35088
35109
|
const n = Qt(r), i = Lu(r), s = zu(i);
|
|
35089
35110
|
let o = i === "x" ? n === (t ? "end" : "start") ? "right" : "left" : n === "start" ? "bottom" : "top";
|
|
35090
|
-
return e.reference[s] > e.floating[s] && (o =
|
|
35111
|
+
return e.reference[s] > e.floating[s] && (o = jo(o)), [o, jo(o)];
|
|
35091
35112
|
}
|
|
35092
35113
|
function gS(r) {
|
|
35093
|
-
const e =
|
|
35094
|
-
return [
|
|
35114
|
+
const e = jo(r);
|
|
35115
|
+
return [Ho(r), e, Ho(e)];
|
|
35095
35116
|
}
|
|
35096
|
-
function
|
|
35117
|
+
function Ho(r) {
|
|
35097
35118
|
return r.replace(/start|end/g, (e) => pS[e]);
|
|
35098
35119
|
}
|
|
35099
35120
|
const Uf = ["left", "right"], Kf = ["right", "left"], vS = ["top", "bottom"], yS = ["bottom", "top"];
|
|
@@ -35112,9 +35133,9 @@ function bS(r, e, t) {
|
|
|
35112
35133
|
function wS(r, e, t, n) {
|
|
35113
35134
|
const i = Qt(r);
|
|
35114
35135
|
let s = bS(Gt(r), t === "start", n);
|
|
35115
|
-
return i && (s = s.map((o) => o + "-" + i), e && (s = s.concat(s.map(
|
|
35136
|
+
return i && (s = s.map((o) => o + "-" + i), e && (s = s.concat(s.map(Ho)))), s;
|
|
35116
35137
|
}
|
|
35117
|
-
function
|
|
35138
|
+
function jo(r) {
|
|
35118
35139
|
return r.replace(/left|right|bottom|top/g, (e) => hS[e]);
|
|
35119
35140
|
}
|
|
35120
35141
|
function xS(r) {
|
|
@@ -35345,7 +35366,7 @@ const kS = (r) => ({
|
|
|
35345
35366
|
}
|
|
35346
35367
|
});
|
|
35347
35368
|
function TS(r, e, t) {
|
|
35348
|
-
return (r ? [...t.filter((i) => Qt(i) === r), ...t.filter((i) => Qt(i) !== r)] : t.filter((i) => Gt(i) === i)).filter((i) => r ? Qt(i) === r || (e ?
|
|
35369
|
+
return (r ? [...t.filter((i) => Qt(i) === r), ...t.filter((i) => Qt(i) !== r)] : t.filter((i) => Gt(i) === i)).filter((i) => r ? Qt(i) === r || (e ? Ho(i) !== i : !1) : !0);
|
|
35349
35370
|
}
|
|
35350
35371
|
const CS = function(r) {
|
|
35351
35372
|
return r === void 0 && (r = {}), {
|
|
@@ -35439,7 +35460,7 @@ const CS = function(r) {
|
|
|
35439
35460
|
} = Hr(r, e);
|
|
35440
35461
|
if ((t = s.arrow) != null && t.alignmentOffset)
|
|
35441
35462
|
return {};
|
|
35442
|
-
const w = Gt(i), k = ur(a), E = Gt(a) === a, P = await (l.isRTL == null ? void 0 : l.isRTL(u.floating)), A = h || (E || !v ? [
|
|
35463
|
+
const w = Gt(i), k = ur(a), E = Gt(a) === a, P = await (l.isRTL == null ? void 0 : l.isRTL(u.floating)), A = h || (E || !v ? [jo(a)] : gS(a)), N = m !== "none";
|
|
35443
35464
|
!h && N && A.push(...wS(a, v, m, P));
|
|
35444
35465
|
const R = [a, ...A], L = await yi(e, y), z = [];
|
|
35445
35466
|
let B = ((n = s.flip) == null ? void 0 : n.overflows) || [];
|
|
@@ -35776,7 +35797,7 @@ const RS = function(r) {
|
|
|
35776
35797
|
}
|
|
35777
35798
|
};
|
|
35778
35799
|
};
|
|
35779
|
-
function
|
|
35800
|
+
function ba() {
|
|
35780
35801
|
return typeof window < "u";
|
|
35781
35802
|
}
|
|
35782
35803
|
function Ti(r) {
|
|
@@ -35791,16 +35812,16 @@ function jr(r) {
|
|
|
35791
35812
|
return (e = (pg(r) ? r.ownerDocument : r.document) || window.document) == null ? void 0 : e.documentElement;
|
|
35792
35813
|
}
|
|
35793
35814
|
function pg(r) {
|
|
35794
|
-
return
|
|
35815
|
+
return ba() ? r instanceof Node || r instanceof Bt(r).Node : !1;
|
|
35795
35816
|
}
|
|
35796
35817
|
function er(r) {
|
|
35797
|
-
return
|
|
35818
|
+
return ba() ? r instanceof Element || r instanceof Bt(r).Element : !1;
|
|
35798
35819
|
}
|
|
35799
35820
|
function mr(r) {
|
|
35800
|
-
return
|
|
35821
|
+
return ba() ? r instanceof HTMLElement || r instanceof Bt(r).HTMLElement : !1;
|
|
35801
35822
|
}
|
|
35802
35823
|
function Xf(r) {
|
|
35803
|
-
return !
|
|
35824
|
+
return !ba() || typeof ShadowRoot > "u" ? !1 : r instanceof ShadowRoot || r instanceof Bt(r).ShadowRoot;
|
|
35804
35825
|
}
|
|
35805
35826
|
const zS = /* @__PURE__ */ new Set(["inline", "contents"]);
|
|
35806
35827
|
function Ms(r) {
|
|
@@ -35817,7 +35838,7 @@ function BS(r) {
|
|
|
35817
35838
|
return LS.has(Ti(r));
|
|
35818
35839
|
}
|
|
35819
35840
|
const FS = [":popover-open", ":modal"];
|
|
35820
|
-
function
|
|
35841
|
+
function wa(r) {
|
|
35821
35842
|
return FS.some((e) => {
|
|
35822
35843
|
try {
|
|
35823
35844
|
return r.matches(e);
|
|
@@ -35836,7 +35857,7 @@ function _S(r) {
|
|
|
35836
35857
|
for (; mr(e) && !bi(e); ) {
|
|
35837
35858
|
if (Fu(e))
|
|
35838
35859
|
return e;
|
|
35839
|
-
if (
|
|
35860
|
+
if (wa(e))
|
|
35840
35861
|
return null;
|
|
35841
35862
|
e = hn(e);
|
|
35842
35863
|
}
|
|
@@ -35852,7 +35873,7 @@ function bi(r) {
|
|
|
35852
35873
|
function tr(r) {
|
|
35853
35874
|
return Bt(r).getComputedStyle(r);
|
|
35854
35875
|
}
|
|
35855
|
-
function
|
|
35876
|
+
function xa(r) {
|
|
35856
35877
|
return er(r) ? {
|
|
35857
35878
|
scrollLeft: r.scrollLeft,
|
|
35858
35879
|
scrollTop: r.scrollTop
|
|
@@ -35889,7 +35910,7 @@ function M0(r) {
|
|
|
35889
35910
|
function vg(r) {
|
|
35890
35911
|
const e = tr(r);
|
|
35891
35912
|
let t = parseFloat(e.width) || 0, n = parseFloat(e.height) || 0;
|
|
35892
|
-
const i = mr(r), s = i ? r.offsetWidth : t, o = i ? r.offsetHeight : n, a =
|
|
35913
|
+
const i = mr(r), s = i ? r.offsetWidth : t, o = i ? r.offsetHeight : n, a = $o(t) !== s || $o(n) !== o;
|
|
35893
35914
|
return a && (t = s, n = o), {
|
|
35894
35915
|
width: t,
|
|
35895
35916
|
height: n,
|
|
@@ -35908,7 +35929,7 @@ function ui(r) {
|
|
|
35908
35929
|
height: i,
|
|
35909
35930
|
$: s
|
|
35910
35931
|
} = vg(e);
|
|
35911
|
-
let o = (s ?
|
|
35932
|
+
let o = (s ? $o(t.width) : t.width) / n, a = (s ? $o(t.height) : t.height) / i;
|
|
35912
35933
|
return (!o || !Number.isFinite(o)) && (o = 1), (!a || !Number.isFinite(a)) && (a = 1), {
|
|
35913
35934
|
x: o,
|
|
35914
35935
|
y: a
|
|
@@ -35947,12 +35968,12 @@ function hs(r, e, t, n) {
|
|
|
35947
35968
|
y: u
|
|
35948
35969
|
});
|
|
35949
35970
|
}
|
|
35950
|
-
function
|
|
35951
|
-
const t =
|
|
35971
|
+
function Sa(r, e) {
|
|
35972
|
+
const t = xa(r).scrollLeft;
|
|
35952
35973
|
return e ? e.left + t : hs(jr(r)).left + t;
|
|
35953
35974
|
}
|
|
35954
35975
|
function wg(r, e) {
|
|
35955
|
-
const t = r.getBoundingClientRect(), n = t.left + e.scrollLeft -
|
|
35976
|
+
const t = r.getBoundingClientRect(), n = t.left + e.scrollLeft - Sa(r, t), i = t.top + e.scrollTop;
|
|
35956
35977
|
return {
|
|
35957
35978
|
x: n,
|
|
35958
35979
|
y: i
|
|
@@ -35965,7 +35986,7 @@ function US(r) {
|
|
|
35965
35986
|
offsetParent: n,
|
|
35966
35987
|
strategy: i
|
|
35967
35988
|
} = r;
|
|
35968
|
-
const s = i === "fixed", o = jr(n), a = e ?
|
|
35989
|
+
const s = i === "fixed", o = jr(n), a = e ? wa(e.floating) : !1;
|
|
35969
35990
|
if (n === o || a && s)
|
|
35970
35991
|
return t;
|
|
35971
35992
|
let l = {
|
|
@@ -35973,7 +35994,7 @@ function US(r) {
|
|
|
35973
35994
|
scrollTop: 0
|
|
35974
35995
|
}, u = cr(1);
|
|
35975
35996
|
const c = cr(0), d = mr(n);
|
|
35976
|
-
if ((d || !d && !s) && ((Ti(n) !== "body" || Ms(o)) && (l =
|
|
35997
|
+
if ((d || !d && !s) && ((Ti(n) !== "body" || Ms(o)) && (l = xa(n)), mr(n))) {
|
|
35977
35998
|
const f = hs(n);
|
|
35978
35999
|
u = ui(n), c.x = f.x + n.clientLeft, c.y = f.y + n.clientTop;
|
|
35979
36000
|
}
|
|
@@ -35989,8 +36010,8 @@ function KS(r) {
|
|
|
35989
36010
|
return Array.from(r.getClientRects());
|
|
35990
36011
|
}
|
|
35991
36012
|
function GS(r) {
|
|
35992
|
-
const e = jr(r), t =
|
|
35993
|
-
let o = -t.scrollLeft +
|
|
36013
|
+
const e = jr(r), t = xa(r), n = r.ownerDocument.body, i = gt(e.scrollWidth, e.clientWidth, n.scrollWidth, n.clientWidth), s = gt(e.scrollHeight, e.clientHeight, n.scrollHeight, n.clientHeight);
|
|
36014
|
+
let o = -t.scrollLeft + Sa(r);
|
|
35994
36015
|
const a = -t.scrollTop;
|
|
35995
36016
|
return tr(n).direction === "rtl" && (o += gt(e.clientWidth, n.clientWidth) - i), {
|
|
35996
36017
|
width: i,
|
|
@@ -36008,7 +36029,7 @@ function JS(r, e) {
|
|
|
36008
36029
|
const c = $u();
|
|
36009
36030
|
(!c || c && e === "fixed") && (a = i.offsetLeft, l = i.offsetTop);
|
|
36010
36031
|
}
|
|
36011
|
-
const u =
|
|
36032
|
+
const u = Sa(n);
|
|
36012
36033
|
if (u <= 0) {
|
|
36013
36034
|
const c = n.ownerDocument, d = c.body, h = getComputedStyle(d), f = c.compatMode === "CSS1Compat" && parseFloat(h.marginLeft) + parseFloat(h.marginRight) || 0, m = Math.abs(n.clientWidth - d.clientWidth - f);
|
|
36014
36035
|
m <= Zf && (s -= m);
|
|
@@ -36073,7 +36094,7 @@ function QS(r) {
|
|
|
36073
36094
|
rootBoundary: n,
|
|
36074
36095
|
strategy: i
|
|
36075
36096
|
} = r;
|
|
36076
|
-
const o = [...t === "clippingAncestors" ?
|
|
36097
|
+
const o = [...t === "clippingAncestors" ? wa(e) ? [] : ZS(e, this._c) : [].concat(t), n], a = o[0], l = o.reduce((u, c) => {
|
|
36077
36098
|
const d = Qf(e, c, i);
|
|
36078
36099
|
return u.top = gt(d.top, u.top), u.right = pr(d.right, u.right), u.bottom = pr(d.bottom, u.bottom), u.left = gt(d.left, u.left), u;
|
|
36079
36100
|
}, Qf(e, a, i));
|
|
@@ -36102,10 +36123,10 @@ function tk(r, e, t) {
|
|
|
36102
36123
|
};
|
|
36103
36124
|
const l = cr(0);
|
|
36104
36125
|
function u() {
|
|
36105
|
-
l.x =
|
|
36126
|
+
l.x = Sa(i);
|
|
36106
36127
|
}
|
|
36107
36128
|
if (n || !n && !s)
|
|
36108
|
-
if ((Ti(e) !== "body" || Ms(i)) && (a =
|
|
36129
|
+
if ((Ti(e) !== "body" || Ms(i)) && (a = xa(e)), n) {
|
|
36109
36130
|
const f = hs(e, !0, s, e);
|
|
36110
36131
|
l.x = f.x + e.clientLeft, l.y = f.y + e.clientTop;
|
|
36111
36132
|
} else i && u();
|
|
@@ -36118,7 +36139,7 @@ function tk(r, e, t) {
|
|
|
36118
36139
|
height: o.height
|
|
36119
36140
|
};
|
|
36120
36141
|
}
|
|
36121
|
-
function
|
|
36142
|
+
function Al(r) {
|
|
36122
36143
|
return tr(r).position === "static";
|
|
36123
36144
|
}
|
|
36124
36145
|
function eh(r, e) {
|
|
@@ -36131,21 +36152,21 @@ function eh(r, e) {
|
|
|
36131
36152
|
}
|
|
36132
36153
|
function Sg(r, e) {
|
|
36133
36154
|
const t = Bt(r);
|
|
36134
|
-
if (
|
|
36155
|
+
if (wa(r))
|
|
36135
36156
|
return t;
|
|
36136
36157
|
if (!mr(r)) {
|
|
36137
36158
|
let i = hn(r);
|
|
36138
36159
|
for (; i && !bi(i); ) {
|
|
36139
|
-
if (er(i) && !
|
|
36160
|
+
if (er(i) && !Al(i))
|
|
36140
36161
|
return i;
|
|
36141
36162
|
i = hn(i);
|
|
36142
36163
|
}
|
|
36143
36164
|
return t;
|
|
36144
36165
|
}
|
|
36145
36166
|
let n = eh(r, e);
|
|
36146
|
-
for (; n && BS(n) &&
|
|
36167
|
+
for (; n && BS(n) && Al(n); )
|
|
36147
36168
|
n = eh(n, e);
|
|
36148
|
-
return n && bi(n) &&
|
|
36169
|
+
return n && bi(n) && Al(n) && !Fu(n) ? t : n || _S(r) || t;
|
|
36149
36170
|
}
|
|
36150
36171
|
const rk = async function(r) {
|
|
36151
36172
|
const e = this.getOffsetParent || Sg, t = this.getDimensions, n = await t(r.floating);
|
|
@@ -37297,7 +37318,7 @@ const yk = ({ editor: r }) => {
|
|
|
37297
37318
|
"sidebyside",
|
|
37298
37319
|
"notation",
|
|
37299
37320
|
"row"
|
|
37300
|
-
],
|
|
37321
|
+
], _o = [
|
|
37301
37322
|
"latex-image-preamble",
|
|
37302
37323
|
"latex-image",
|
|
37303
37324
|
"latex-preamble",
|
|
@@ -37323,7 +37344,7 @@ const yk = ({ editor: r }) => {
|
|
|
37323
37344
|
..._g,
|
|
37324
37345
|
...Vg,
|
|
37325
37346
|
"xi:include"
|
|
37326
|
-
],
|
|
37347
|
+
], Ol = [
|
|
37327
37348
|
...Hg,
|
|
37328
37349
|
...jg,
|
|
37329
37350
|
..._g,
|
|
@@ -37335,9 +37356,9 @@ function Sk(r) {
|
|
|
37335
37356
|
t.length > 1 && n.push(t[1].trim());
|
|
37336
37357
|
for (let i = 2; i < t.length; i++) {
|
|
37337
37358
|
let s = /^<(\w\S*?)(\s.*?|>)$/.exec(t[i].trim()), o = /^<\/(\w\S*?)(\s.*?|>)(.?)$/.exec(t[i].trim());
|
|
37338
|
-
if (s &&
|
|
37359
|
+
if (s && _o.includes(s[1]))
|
|
37339
37360
|
n.push(t[i]), e = !0;
|
|
37340
|
-
else if (o &&
|
|
37361
|
+
else if (o && _o.includes(o[1]))
|
|
37341
37362
|
n.push(t[i]), e = !1;
|
|
37342
37363
|
else if (e)
|
|
37343
37364
|
n.push(t[i]);
|
|
@@ -37354,7 +37375,7 @@ function kk(r, e) {
|
|
|
37354
37375
|
const n = "some";
|
|
37355
37376
|
let i = Sk(r);
|
|
37356
37377
|
console.log("Getting ready to start formatting.");
|
|
37357
|
-
for (let c of
|
|
37378
|
+
for (let c of Ol)
|
|
37358
37379
|
if (i.includes("<" + c)) {
|
|
37359
37380
|
let d = new RegExp(
|
|
37360
37381
|
"<" + c + "(>|(\\s[^\\/]*?)>|(.*xmlns.*?)>)",
|
|
@@ -37379,7 +37400,7 @@ $&`), i = i.replace(h, `$&
|
|
|
37379
37400
|
for (let c of l) {
|
|
37380
37401
|
let d = c.trim(), h = /^<(\w\S*?)(\s.*?|>)$/.exec(d), f = /^<\/(\w\S*?)(\s.*?|>)(.?)$/.exec(d);
|
|
37381
37402
|
d.length !== 0 && (d.startsWith("<?") ? u.push(d + `
|
|
37382
|
-
`) : d.startsWith("<!--") ? u.push(s.repeat(o) + d) : f ?
|
|
37403
|
+
`) : d.startsWith("<!--") ? u.push(s.repeat(o) + d) : f ? Ol.includes(f[1]) ? (o = Math.max(0, o - 1), u.push(s.repeat(o) + d)) : (_o.includes(f[1]) && (a = !1), u.push(s.repeat(o) + d)) : h ? (u.push(s.repeat(o) + d), Ol.includes(h[1]) ? o += 1 : _o.includes(h[1]) && (a = !0)) : a ? u.push(c) : u.push(s.repeat(o) + d));
|
|
37383
37404
|
}
|
|
37384
37405
|
switch (n) {
|
|
37385
37406
|
case "few":
|
|
@@ -37522,11 +37543,7 @@ const Tk = Oe.create({
|
|
|
37522
37543
|
}
|
|
37523
37544
|
document.body.appendChild(n), n.submit(), n.remove();
|
|
37524
37545
|
}, Ak = ({ content: r, title: e, onRebuild: t }) => {
|
|
37525
|
-
const [n, i] = vt(!1), s = De(null)
|
|
37526
|
-
qe(() => {
|
|
37527
|
-
o();
|
|
37528
|
-
}, []);
|
|
37529
|
-
const o = () => {
|
|
37546
|
+
const [n, i] = vt(!1), s = De(null), o = vo(() => {
|
|
37530
37547
|
const l = r, u = e || "Document Title";
|
|
37531
37548
|
if (i(!0), t) {
|
|
37532
37549
|
t(l, u, (d, h) => {
|
|
@@ -37534,7 +37551,11 @@ const Tk = Oe.create({
|
|
|
37534
37551
|
});
|
|
37535
37552
|
return;
|
|
37536
37553
|
}
|
|
37537
|
-
},
|
|
37554
|
+
}, [r, e, t]);
|
|
37555
|
+
qe(() => {
|
|
37556
|
+
o();
|
|
37557
|
+
}, []);
|
|
37558
|
+
const a = () => {
|
|
37538
37559
|
i(!1);
|
|
37539
37560
|
};
|
|
37540
37561
|
return /* @__PURE__ */ Y.jsxs("div", { className: "pretext-plus-editor__full-preview", children: [
|
|
@@ -37718,7 +37739,7 @@ const Tk = Oe.create({
|
|
|
37718
37739
|
<p> And that's the end of the demo. Thanks for coming!</p>
|
|
37719
37740
|
</section>
|
|
37720
37741
|
`, Dk = Nk, Ik = (r) => {
|
|
37721
|
-
const [e, t] = vt(r.content || Dk), [n, i] = vt(r.title || "Document Title"), [s, o] = vt(!
|
|
37742
|
+
const [e, t] = vt(r.content || Dk), [n, i] = vt(r.title || "Document Title"), [s, o] = vt(!0), [a, l] = vt(window.innerWidth < 800);
|
|
37722
37743
|
qe(() => {
|
|
37723
37744
|
const h = () => {
|
|
37724
37745
|
l(window.innerWidth < 800);
|