@yext/pages-components 1.0.5 → 1.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{debugger-DRWb3azj.cjs → debugger-D3dRC_Z4.cjs} +1 -1
- package/dist/{debugger-DH7UN_-M.js → debugger-rZtaKqX7.js} +1 -1
- package/dist/{index-BqDn49hh.js → index-1vQ0rgr7.js} +116 -110
- package/dist/{index-B_KO1dw5.cjs → index-Bunl_w4Q.cjs} +2 -2
- package/dist/{index-Dpvz9qZ8.cjs → index-DWB4A6xg.cjs} +1 -1
- package/dist/{index-s_etEaZu.js → index-VbkIXtJn.js} +1 -1
- package/dist/pages-components.cjs +1 -1
- package/dist/pages-components.js +1 -1
- package/package.json +1 -1
|
@@ -2,7 +2,7 @@ var G_ = Object.defineProperty;
|
|
|
2
2
|
var Y_ = (e, t, n) => t in e ? G_(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
3
3
|
var Ie = (e, t, n) => Y_(e, typeof t != "symbol" ? t + "" : t, n);
|
|
4
4
|
import * as j_ from "react";
|
|
5
|
-
import xn, { createElement as V_, createContext as Nc, useRef as sd, useState as Cr, useEffect as
|
|
5
|
+
import xn, { createElement as V_, createContext as Nc, useRef as sd, useState as Cr, useEffect as nr, Suspense as q_, lazy as Z_, useContext as us, forwardRef as J_, Fragment as X_, useMemo as tp } from "react";
|
|
6
6
|
import np, { createPortal as Q_ } from "react-dom";
|
|
7
7
|
var sf = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
8
8
|
function rp(e) {
|
|
@@ -283,7 +283,7 @@ function ty() {
|
|
|
283
283
|
} finally {
|
|
284
284
|
A = !1, fe.current = zt, X(), Error.prepareStackTrace = kt;
|
|
285
285
|
}
|
|
286
|
-
var
|
|
286
|
+
var rr = pe ? pe.displayName || pe.name : "", Ln = rr ? B(rr) : "";
|
|
287
287
|
return typeof pe == "function" && F.set(pe, Ln), Ln;
|
|
288
288
|
}
|
|
289
289
|
function De(pe, Ze, nt) {
|
|
@@ -601,8 +601,8 @@ Check the top-level render call using <` + nt + ">.");
|
|
|
601
601
|
if (bn !== void 0)
|
|
602
602
|
if (vt)
|
|
603
603
|
if (qe(bn)) {
|
|
604
|
-
for (var
|
|
605
|
-
Bt(bn[
|
|
604
|
+
for (var rr = 0; rr < bn.length; rr++)
|
|
605
|
+
Bt(bn[rr], pe);
|
|
606
606
|
Object.freeze && Object.freeze(bn);
|
|
607
607
|
} else
|
|
608
608
|
I("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
|
|
@@ -610,8 +610,8 @@ Check the top-level render call using <` + nt + ">.");
|
|
|
610
610
|
Bt(bn, pe);
|
|
611
611
|
}
|
|
612
612
|
if (ue.call(Ze, "key")) {
|
|
613
|
-
var Ln = Se(pe), dn = Object.keys(Ze).filter(function(
|
|
614
|
-
return
|
|
613
|
+
var Ln = Se(pe), dn = Object.keys(Ze).filter(function(ir) {
|
|
614
|
+
return ir !== "key";
|
|
615
615
|
}), Jn = dn.length > 0 ? "{key: someKey, " + dn.join(": ..., ") + ": ...}" : "{key: someKey}";
|
|
616
616
|
if (!Gt[Ln + Jn]) {
|
|
617
617
|
var bi = dn.length > 0 ? "{" + dn.join(": ..., ") + ": ...}" : "{}";
|
|
@@ -1616,7 +1616,7 @@ const tN = (e) => {
|
|
|
1616
1616
|
default:
|
|
1617
1617
|
return "";
|
|
1618
1618
|
}
|
|
1619
|
-
}, lp = Nc(null), nN = Z_(() => import("./debugger-
|
|
1619
|
+
}, lp = Nc(null), nN = Z_(() => import("./debugger-rZtaKqX7.js"));
|
|
1620
1620
|
function ZS(e) {
|
|
1621
1621
|
const {
|
|
1622
1622
|
children: t,
|
|
@@ -1627,7 +1627,7 @@ function ZS(e) {
|
|
|
1627
1627
|
disableSessionTracking: f,
|
|
1628
1628
|
enableDebugging: p
|
|
1629
1629
|
} = e, _ = sd(null), [T, E] = Cr(!1);
|
|
1630
|
-
|
|
1630
|
+
nr(() => {
|
|
1631
1631
|
E(!0);
|
|
1632
1632
|
}, []), _.current === null && (_.current = new rN(
|
|
1633
1633
|
n,
|
|
@@ -1638,7 +1638,11 @@ function ZS(e) {
|
|
|
1638
1638
|
p ?? Uu()
|
|
1639
1639
|
));
|
|
1640
1640
|
const S = _.current;
|
|
1641
|
-
return
|
|
1641
|
+
return nr(() => (window.enableYextAnalytics = () => {
|
|
1642
|
+
S.optIn();
|
|
1643
|
+
}, () => {
|
|
1644
|
+
delete window.enableYextAnalytics;
|
|
1645
|
+
}), [S]), /* @__PURE__ */ ft.jsxs(ft.Fragment, { children: [
|
|
1642
1646
|
/* @__PURE__ */ ft.jsx(lp.Provider, { value: S, children: t }),
|
|
1643
1647
|
T && (p || Uu()) && oa().name === "browser" ? /* @__PURE__ */ ft.jsx(q_, { fallback: /* @__PURE__ */ ft.jsx(ft.Fragment, {}), children: /* @__PURE__ */ ft.jsx(nN, {}) }) : null
|
|
1644
1648
|
] });
|
|
@@ -1686,7 +1690,9 @@ class rN {
|
|
|
1686
1690
|
siteUid: this.templateData.document.siteId,
|
|
1687
1691
|
template: this.templateData.document.__.name
|
|
1688
1692
|
},
|
|
1689
|
-
entity: this.templateData.document.uid || void 0
|
|
1693
|
+
entity: this.templateData.document.uid || void 0,
|
|
1694
|
+
pageUrl: document.URL,
|
|
1695
|
+
referrerUrl: document.referrer !== "" ? document.referrer : void 0
|
|
1690
1696
|
};
|
|
1691
1697
|
this._analyticsEventService = eN(n).with(r);
|
|
1692
1698
|
}
|
|
@@ -1754,7 +1760,7 @@ function JS(e) {
|
|
|
1754
1760
|
const t = ap(), [n] = Cr({
|
|
1755
1761
|
name: sp(t, e.name)
|
|
1756
1762
|
}), r = (f = ca()) == null ? void 0 : f.getDebugEnabled(), [l, d] = Cr(!1);
|
|
1757
|
-
return
|
|
1763
|
+
return nr(() => {
|
|
1758
1764
|
d(!0);
|
|
1759
1765
|
}, []), r && l ? /* @__PURE__ */ ft.jsx("section", { "data-ya-scope": n.name, children: /* @__PURE__ */ ft.jsx(Gu.Provider, { value: n, children: e.children }) }) : /* @__PURE__ */ ft.jsx(Gu.Provider, { value: n, children: e.children });
|
|
1760
1766
|
}
|
|
@@ -2010,7 +2016,7 @@ const XS = () => {
|
|
|
2010
2016
|
loading: T = "lazy"
|
|
2011
2017
|
}) => {
|
|
2012
2018
|
const E = sd(null), [S, w] = Cr(!1), M = "image" in e ? e.image : e;
|
|
2013
|
-
|
|
2019
|
+
nr(() => {
|
|
2014
2020
|
var ce;
|
|
2015
2021
|
(ce = E.current) != null && ce.complete && w(!0);
|
|
2016
2022
|
}, []), aN(
|
|
@@ -3644,19 +3650,19 @@ const ON = ({
|
|
|
3644
3650
|
const v = sd(null), [k, G] = Cr(new un(f)), [I, P] = Cr(!1), [H, j] = Cr(), [re, te] = Cr(p), ce = (V, z) => {
|
|
3645
3651
|
E(V, z), z && G(z.getCenter());
|
|
3646
3652
|
};
|
|
3647
|
-
return
|
|
3653
|
+
return nr(() => {
|
|
3648
3654
|
!I || !H || te(H.getZoom());
|
|
3649
|
-
}, [k]),
|
|
3655
|
+
}, [k]), nr(() => {
|
|
3650
3656
|
if (!t || !I || !H)
|
|
3651
3657
|
return;
|
|
3652
3658
|
const V = t.map((z) => new un(z));
|
|
3653
3659
|
H.fitCoordinates(V);
|
|
3654
|
-
}, [JSON.stringify(t), H]),
|
|
3660
|
+
}, [JSON.stringify(t), H]), nr(() => {
|
|
3655
3661
|
if (!I || H)
|
|
3656
3662
|
return;
|
|
3657
3663
|
const V = new pp().withControlEnabled(d).withDefaultCenter(k).withDefaultZoom(re).withPadding(T).withPanHandler(ce).withPanStartHandler(S).withProvider(w).withProviderOptions(M).withSinglePinZoom(m).withWrapper(v.current).build();
|
|
3658
3664
|
j(V), _ && (_.current = V);
|
|
3659
|
-
}, [I]),
|
|
3665
|
+
}, [I]), nr(() => {
|
|
3660
3666
|
I || H || !v.current || w.load(e, {
|
|
3661
3667
|
...M,
|
|
3662
3668
|
...l && { client: l }
|
|
@@ -3724,9 +3730,9 @@ const sw = ({
|
|
|
3724
3730
|
ClusterTemplate: n = DN
|
|
3725
3731
|
}) => {
|
|
3726
3732
|
const { map: r } = us(Cc), [l, d] = Cr([]), [f, p] = Cr(), [_, T] = Cr([]), [E, S] = Cr([]);
|
|
3727
|
-
return
|
|
3733
|
+
return nr(() => {
|
|
3728
3734
|
p(AN(l, r.getZoom(), e));
|
|
3729
|
-
}, [l, r.getZoom()]),
|
|
3735
|
+
}, [l, r.getZoom()]), nr(() => {
|
|
3730
3736
|
S(() => []), T(() => []), (f == null ? void 0 : f.length) !== 0 && (f == null || f.forEach((w) => {
|
|
3731
3737
|
if (w.length === 1) {
|
|
3732
3738
|
w[0].pin.setMap(r);
|
|
@@ -3830,12 +3836,12 @@ const sw = ({
|
|
|
3830
3836
|
hasPinUrl: T = !1
|
|
3831
3837
|
}) => {
|
|
3832
3838
|
const { map: E, provider: S } = us(Cc), w = us(ud), M = tp(() => new cd().withCoordinate(t).withHideOffscreen(n).withProvider(S).withHasPinUrl(T).build(), []);
|
|
3833
|
-
|
|
3839
|
+
nr(() => {
|
|
3834
3840
|
if (_ !== 0 && !_)
|
|
3835
3841
|
return;
|
|
3836
3842
|
const v = M.getProviderPin().getWrapperElement();
|
|
3837
3843
|
v && (v.style.zIndex = _.toString());
|
|
3838
|
-
}, [_]),
|
|
3844
|
+
}, [_]), nr(() => {
|
|
3839
3845
|
M.setMap(E), M.setClickHandler(() => d(r)), M.setFocusHandler((k) => f(k, r)), M.setHoverHandler((k) => p(k, r));
|
|
3840
3846
|
const v = w == null ? void 0 : w.clusterIds.includes(r);
|
|
3841
3847
|
return w && !v && w.setPinStore((k) => [
|
|
@@ -4017,7 +4023,7 @@ function LN() {
|
|
|
4017
4023
|
}
|
|
4018
4024
|
return o.nodeType === Fe && c.isAttached();
|
|
4019
4025
|
}
|
|
4020
|
-
function
|
|
4026
|
+
function rr(u, o, c) {
|
|
4021
4027
|
vt = !0;
|
|
4022
4028
|
const h = performance.now() - kt > nt;
|
|
4023
4029
|
try {
|
|
@@ -4042,8 +4048,8 @@ function LN() {
|
|
|
4042
4048
|
const Ht = bt[Vt], Dt = ms(Ht), on = Ht.parentNode;
|
|
4043
4049
|
if (on != null && Ht !== ae && Dt === null && (Ht.nodeName !== "BR" || !yn(Ht, on, u))) {
|
|
4044
4050
|
if (De) {
|
|
4045
|
-
const
|
|
4046
|
-
|
|
4051
|
+
const ar = Ht.innerText || Ht.nodeValue;
|
|
4052
|
+
ar && (me += ar);
|
|
4047
4053
|
}
|
|
4048
4054
|
on.removeChild(Ht);
|
|
4049
4055
|
}
|
|
@@ -4091,12 +4097,12 @@ function LN() {
|
|
|
4091
4097
|
const o = u._observer;
|
|
4092
4098
|
if (o !== null) {
|
|
4093
4099
|
const c = o.takeRecords();
|
|
4094
|
-
|
|
4100
|
+
rr(u, c, o);
|
|
4095
4101
|
}
|
|
4096
4102
|
}
|
|
4097
4103
|
function dn(u) {
|
|
4098
4104
|
Ct(u), u._observer = new MutationObserver((o, c) => {
|
|
4099
|
-
|
|
4105
|
+
rr(u, o, c);
|
|
4100
4106
|
});
|
|
4101
4107
|
}
|
|
4102
4108
|
function Jn(u, o) {
|
|
@@ -4107,7 +4113,7 @@ function LN() {
|
|
|
4107
4113
|
const c = u.mergeWithSibling(o), h = Tn()._normalizedNodes;
|
|
4108
4114
|
return h.add(u.__key), h.add(o.__key), c;
|
|
4109
4115
|
}
|
|
4110
|
-
function
|
|
4116
|
+
function ir(u) {
|
|
4111
4117
|
let o = u;
|
|
4112
4118
|
if (o.__text === "" && o.isSimpleText() && !o.isUnmergeable()) {
|
|
4113
4119
|
o.remove();
|
|
@@ -4326,7 +4332,7 @@ function LN() {
|
|
|
4326
4332
|
return u._pendingDecorators = c, c;
|
|
4327
4333
|
}
|
|
4328
4334
|
function _s(u) {
|
|
4329
|
-
return u.read(() =>
|
|
4335
|
+
return u.read(() => or().getTextContent());
|
|
4330
4336
|
}
|
|
4331
4337
|
function Ii(u, o) {
|
|
4332
4338
|
Ur(u, () => {
|
|
@@ -4334,7 +4340,7 @@ function LN() {
|
|
|
4334
4340
|
if (c.isEmpty())
|
|
4335
4341
|
return;
|
|
4336
4342
|
if (o === "root") {
|
|
4337
|
-
|
|
4343
|
+
or().markDirty();
|
|
4338
4344
|
return;
|
|
4339
4345
|
}
|
|
4340
4346
|
const h = c._nodeMap;
|
|
@@ -4344,7 +4350,7 @@ function LN() {
|
|
|
4344
4350
|
tag: "history-merge"
|
|
4345
4351
|
} : void 0);
|
|
4346
4352
|
}
|
|
4347
|
-
function
|
|
4353
|
+
function or() {
|
|
4348
4354
|
return gl(Si());
|
|
4349
4355
|
}
|
|
4350
4356
|
function gl(u) {
|
|
@@ -4581,7 +4587,7 @@ function LN() {
|
|
|
4581
4587
|
return u === 65 && Zr(o, c);
|
|
4582
4588
|
}
|
|
4583
4589
|
function xl() {
|
|
4584
|
-
const u =
|
|
4590
|
+
const u = or(), o = u.select(0, u.getChildrenSize());
|
|
4585
4591
|
Er(Ao(o));
|
|
4586
4592
|
}
|
|
4587
4593
|
function Bi(u, o) {
|
|
@@ -4822,7 +4828,7 @@ function LN() {
|
|
|
4822
4828
|
}
|
|
4823
4829
|
function Ss(u, o) {
|
|
4824
4830
|
let c = u;
|
|
4825
|
-
for (; c !==
|
|
4831
|
+
for (; c !== or() && c != null; ) {
|
|
4826
4832
|
if (o(c))
|
|
4827
4833
|
return c;
|
|
4828
4834
|
c = c.getParent();
|
|
@@ -5149,7 +5155,7 @@ function LN() {
|
|
|
5149
5155
|
throw Error(`Reconciliation: could not find DOM element for node key ${u}`);
|
|
5150
5156
|
return o;
|
|
5151
5157
|
}
|
|
5152
|
-
const dr = Object.freeze({}),
|
|
5158
|
+
const dr = Object.freeze({}), sr = 30, Ll = [["keydown", ge], ["pointerdown", $l], ["compositionstart", x], ["compositionend", Q], ["input", C], ["click", Ba], ["cut", dr], ["copy", dr], ["dragstart", dr], ["dragover", dr], ["dragend", dr], ["paste", dr], ["focus", dr], ["blur", dr], ["drop", dr]];
|
|
5153
5159
|
ee && Ll.push(["beforeinput", (u, o) => g(u, o)]);
|
|
5154
5160
|
let ji = 0, Il = 0, jo = 0, Wr = null, Vo = 0, Kr = !1, Ms = !1, qo = !1, Zo = !1, Rs = [0, "", 0, "root", 0];
|
|
5155
5161
|
function Vi(u, o, c, h, y) {
|
|
@@ -5193,7 +5199,7 @@ function LN() {
|
|
|
5193
5199
|
const ae = $.anchor, he = ae.getNode();
|
|
5194
5200
|
if ($.isCollapsed()) {
|
|
5195
5201
|
u.type === "Range" && u.anchorNode === u.focusNode && ($.dirty = !0);
|
|
5196
|
-
const me = Ts(o).event, xe = me ? me.timeStamp : performance.now(), [we, Ce, Ve, ze, $e] = Rs, bt =
|
|
5202
|
+
const me = Ts(o).event, xe = me ? me.timeStamp : performance.now(), [we, Ce, Ve, ze, $e] = Rs, bt = or(), Qe = o.isComposing() === !1 && bt.getTextContent() === "";
|
|
5197
5203
|
if (xe < $e + 200 && ae.offset === Ve && ae.key === ze)
|
|
5198
5204
|
$.format = we, $.style = Ce;
|
|
5199
5205
|
else if (ae.type === "text") {
|
|
@@ -5221,7 +5227,7 @@ function LN() {
|
|
|
5221
5227
|
if (h) {
|
|
5222
5228
|
if (xt(c)) {
|
|
5223
5229
|
const N = c.anchor, b = N.getNode();
|
|
5224
|
-
if (N.type === "element" && N.offset === 0 && c.isCollapsed() && !Gr(b) &&
|
|
5230
|
+
if (N.type === "element" && N.offset === 0 && c.isCollapsed() && !Gr(b) && or().getChildrenSize() === 1 && b.getTopLevelElementOrThrow().isEmpty() && y !== null && c.is(y))
|
|
5225
5231
|
h.removeAllRanges(), c.dirty = !0;
|
|
5226
5232
|
else if (u.detail === 3 && !c.isCollapsed()) {
|
|
5227
5233
|
const ae = c.focus.getNode();
|
|
@@ -5257,7 +5263,7 @@ function LN() {
|
|
|
5257
5263
|
return u !== o || et(u) || et(o) || !u.isToken() || !o.isToken();
|
|
5258
5264
|
}
|
|
5259
5265
|
function a(u) {
|
|
5260
|
-
return Il === 229 && u < ji +
|
|
5266
|
+
return Il === 229 && u < ji + sr;
|
|
5261
5267
|
}
|
|
5262
5268
|
function g(u, o) {
|
|
5263
5269
|
const c = u.inputType, h = s(u);
|
|
@@ -5281,7 +5287,7 @@ function LN() {
|
|
|
5281
5287
|
Ur(o, () => {
|
|
5282
5288
|
vn(null);
|
|
5283
5289
|
});
|
|
5284
|
-
},
|
|
5290
|
+
}, sr), xt(y)) {
|
|
5285
5291
|
const xe = y.anchor.getNode();
|
|
5286
5292
|
if (xe.markDirty(), y.format = xe.getFormat(), !mt(xe))
|
|
5287
5293
|
throw Error("Anchor node must be a TextNode");
|
|
@@ -5419,7 +5425,7 @@ function LN() {
|
|
|
5419
5425
|
vn(h.key), // If it has been 30ms since the last keydown, then we should
|
|
5420
5426
|
// apply the empty space heuristic. We can't do this for Safari,
|
|
5421
5427
|
// as the keydown fires after composition start.
|
|
5422
|
-
(u.timeStamp < ji +
|
|
5428
|
+
(u.timeStamp < ji + sr || // FF has issues around composing multibyte characters, so we also
|
|
5423
5429
|
// need to invoke the empty space heuristic below.
|
|
5424
5430
|
h.type === "element" || !c.isCollapsed() || y.getFormat() !== c.format || mt(y) && y.getStyle() !== c.style) && ct(o, p, Bt);
|
|
5425
5431
|
}
|
|
@@ -6816,7 +6822,7 @@ function LN() {
|
|
|
6816
6822
|
const Qe = pn(), dt = [Ce];
|
|
6817
6823
|
let Vt = xe.length;
|
|
6818
6824
|
for (let on = 1; on < me; on++) {
|
|
6819
|
-
const
|
|
6825
|
+
const ar = $[on], No = ar.length, pr = Dn(ar).getWritable();
|
|
6820
6826
|
pr.__format = Ve, pr.__style = ze, pr.__detail = $e;
|
|
6821
6827
|
const tn = pr.__key, Pn = Vt + No;
|
|
6822
6828
|
if (xt(Qe)) {
|
|
@@ -7208,7 +7214,7 @@ function LN() {
|
|
|
7208
7214
|
}
|
|
7209
7215
|
}
|
|
7210
7216
|
function xt(u) {
|
|
7211
|
-
return u instanceof
|
|
7217
|
+
return u instanceof lr;
|
|
7212
7218
|
}
|
|
7213
7219
|
function fr(u) {
|
|
7214
7220
|
return u instanceof Lr;
|
|
@@ -7239,7 +7245,7 @@ function LN() {
|
|
|
7239
7245
|
}
|
|
7240
7246
|
return null;
|
|
7241
7247
|
}
|
|
7242
|
-
class
|
|
7248
|
+
class lr extends Lr {
|
|
7243
7249
|
constructor(o, c, h, y) {
|
|
7244
7250
|
super(o, c), this.format = h, this.style = y;
|
|
7245
7251
|
}
|
|
@@ -7339,7 +7345,7 @@ function LN() {
|
|
|
7339
7345
|
*/
|
|
7340
7346
|
clone() {
|
|
7341
7347
|
const o = this.anchor, c = this.focus;
|
|
7342
|
-
return new
|
|
7348
|
+
return new lr(br(o.key, o.offset, o.type), br(c.key, c.offset, c.type), this.format, this.style);
|
|
7343
7349
|
}
|
|
7344
7350
|
/**
|
|
7345
7351
|
* Toggles the provided format on all the TextNodes in the Selection.
|
|
@@ -7469,12 +7475,12 @@ function LN() {
|
|
|
7469
7475
|
}
|
|
7470
7476
|
else
|
|
7471
7477
|
dt.add(Qe.__key);
|
|
7472
|
-
const on = Ht.getChildren(),
|
|
7478
|
+
const on = Ht.getChildren(), ar = new Set($), No = Vt.is(Ht), pr = Vt.isInline() && Ce.getNextSibling() === null ? Vt : Ce;
|
|
7473
7479
|
for (let tn = on.length - 1; tn >= 0; tn--) {
|
|
7474
7480
|
const Pn = on[tn];
|
|
7475
7481
|
if (Pn.is(Ce) || et(Pn) && Pn.isParentOf(Ce))
|
|
7476
7482
|
break;
|
|
7477
|
-
Pn.isAttached() && (!
|
|
7483
|
+
Pn.isAttached() && (!ar.has(Pn) || Pn.is(Dt) ? No || pr.insertAfter(Pn, !1) : Pn.remove());
|
|
7478
7484
|
}
|
|
7479
7485
|
if (!No) {
|
|
7480
7486
|
let tn = Ht, Pn = null;
|
|
@@ -7609,7 +7615,7 @@ function LN() {
|
|
|
7609
7615
|
insertParagraph() {
|
|
7610
7616
|
if (this.anchor.key === "root") {
|
|
7611
7617
|
const b = Ji();
|
|
7612
|
-
return
|
|
7618
|
+
return or().splice(this.anchor.offset, 0, [b]), b.select(), b;
|
|
7613
7619
|
}
|
|
7614
7620
|
const o = Bc(this), c = ws(this.anchor.getNode(), Ki);
|
|
7615
7621
|
if (!et(c))
|
|
@@ -7917,12 +7923,12 @@ function LN() {
|
|
|
7917
7923
|
return et(u) && !u.isInline();
|
|
7918
7924
|
}
|
|
7919
7925
|
function Hd(u, o, c, h, y, N) {
|
|
7920
|
-
const b = Si(), $ = new
|
|
7926
|
+
const b = Si(), $ = new lr(br(u, o, y), br(c, h, N), 0, "");
|
|
7921
7927
|
return $.dirty = !0, b._selection = $, $;
|
|
7922
7928
|
}
|
|
7923
7929
|
function g_() {
|
|
7924
7930
|
const u = br("root", 0, "element"), o = br("root", 0, "element");
|
|
7925
|
-
return new
|
|
7931
|
+
return new lr(u, o, 0, "");
|
|
7926
7932
|
}
|
|
7927
7933
|
function $c() {
|
|
7928
7934
|
return new vi(/* @__PURE__ */ new Set());
|
|
@@ -7948,7 +7954,7 @@ function LN() {
|
|
|
7948
7954
|
if (Ce === null)
|
|
7949
7955
|
return null;
|
|
7950
7956
|
const [Ve, ze] = Ce;
|
|
7951
|
-
return new
|
|
7957
|
+
return new lr(Ve, ze, xt(u) ? u.format : 0, xt(u) ? u.style : "");
|
|
7952
7958
|
}
|
|
7953
7959
|
function pn() {
|
|
7954
7960
|
return Si()._selection;
|
|
@@ -8034,22 +8040,22 @@ function LN() {
|
|
|
8034
8040
|
return;
|
|
8035
8041
|
}
|
|
8036
8042
|
const we = o.anchor, Ce = o.focus, Ve = we.key, ze = Ce.key, $e = Ho(c, Ve), bt = Ho(c, ze), Qe = we.offset, dt = Ce.offset, Vt = o.format, Ht = o.style, Dt = o.isCollapsed();
|
|
8037
|
-
let on = $e,
|
|
8043
|
+
let on = $e, ar = bt, No = !1;
|
|
8038
8044
|
if (we.type === "text") {
|
|
8039
8045
|
on = $r($e);
|
|
8040
8046
|
const pr = we.getNode();
|
|
8041
8047
|
No = pr.getFormat() !== Vt || pr.getStyle() !== Ht;
|
|
8042
8048
|
} else xt(u) && u.anchor.type === "text" && (No = !0);
|
|
8043
|
-
if (Ce.type === "text" && (
|
|
8049
|
+
if (Ce.type === "text" && (ar = $r(bt)), !(on === null || ar === null) && (Dt && (u === null || No || xt(u) && (u.format !== Vt || u.style !== Ht)) && jn(Vt, Ht, Qe, Ve, performance.now()), !(he === Qe && me === dt && $ === on && ae === ar && // Badly interpreted range selection when collapsed - #1482
|
|
8044
8050
|
!(h.type === "Range" && Dt) && ((xe === null || !N.contains(xe)) && N.focus({
|
|
8045
8051
|
preventScroll: !0
|
|
8046
8052
|
}), we.type !== "element")))) {
|
|
8047
8053
|
try {
|
|
8048
|
-
h.setBaseAndExtent(on, Qe,
|
|
8054
|
+
h.setBaseAndExtent(on, Qe, ar, dt);
|
|
8049
8055
|
} catch {
|
|
8050
8056
|
}
|
|
8051
8057
|
if (!y.has("skip-scroll-into-view") && o.isCollapsed() && N !== null && N === document.activeElement) {
|
|
8052
|
-
const pr = o instanceof
|
|
8058
|
+
const pr = o instanceof lr && o.anchor.type === "element" ? on.childNodes[Qe] || null : h.rangeCount > 0 ? h.getRangeAt(0) : null;
|
|
8053
8059
|
if (pr !== null) {
|
|
8054
8060
|
let tn;
|
|
8055
8061
|
if (pr instanceof Text) {
|
|
@@ -8065,7 +8071,7 @@ function LN() {
|
|
|
8065
8071
|
}
|
|
8066
8072
|
function y_(u) {
|
|
8067
8073
|
let o = pn() || Hs();
|
|
8068
|
-
o === null && (o =
|
|
8074
|
+
o === null && (o = or().selectEnd()), o.insertNodes(u);
|
|
8069
8075
|
}
|
|
8070
8076
|
function N_() {
|
|
8071
8077
|
const u = pn();
|
|
@@ -8146,7 +8152,7 @@ function LN() {
|
|
|
8146
8152
|
const c = u.getParent();
|
|
8147
8153
|
if (!c) {
|
|
8148
8154
|
const y = Ji();
|
|
8149
|
-
return
|
|
8155
|
+
return or().append(y), y.select(), [or(), 0];
|
|
8150
8156
|
}
|
|
8151
8157
|
if (mt(u)) {
|
|
8152
8158
|
const y = u.splitText(o);
|
|
@@ -8159,7 +8165,7 @@ function LN() {
|
|
|
8159
8165
|
return [c, u.getIndexWithinParent()];
|
|
8160
8166
|
const h = u.getChildAtIndex(o);
|
|
8161
8167
|
if (h) {
|
|
8162
|
-
const y = new
|
|
8168
|
+
const y = new lr(br(u.__key, o, "element"), br(u.__key, o, "element"), 0, ""), N = u.insertNewAfter(y);
|
|
8163
8169
|
N && N.append(h, ...h.getNextSiblings());
|
|
8164
8170
|
}
|
|
8165
8171
|
return [c, u.getIndexWithinParent() + 1];
|
|
@@ -8224,7 +8230,7 @@ function LN() {
|
|
|
8224
8230
|
const c = o._dirtyLeaves, h = u._nodeMap;
|
|
8225
8231
|
for (const y of c) {
|
|
8226
8232
|
const N = h.get(y);
|
|
8227
|
-
mt(N) && N.isAttached() && N.isSimpleText() && !N.isUnmergeable() &&
|
|
8233
|
+
mt(N) && N.isAttached() && N.isSimpleText() && !N.isUnmergeable() && ir(N);
|
|
8228
8234
|
}
|
|
8229
8235
|
}
|
|
8230
8236
|
function S_(u, o) {
|
|
@@ -8235,7 +8241,7 @@ function LN() {
|
|
|
8235
8241
|
o._dirtyLeaves = /* @__PURE__ */ new Set();
|
|
8236
8242
|
for (const xe of $) {
|
|
8237
8243
|
const we = y.get(xe);
|
|
8238
|
-
mt(we) && we.isAttached() && we.isSimpleText() && !we.isUnmergeable() &&
|
|
8244
|
+
mt(we) && we.isAttached() && we.isSimpleText() && !we.isUnmergeable() && ir(we), we !== void 0 && jd(we, N) && Yd(o, we, b), c.add(xe);
|
|
8239
8245
|
}
|
|
8240
8246
|
if ($ = o._dirtyLeaves, ae = $.size, ae > 0) {
|
|
8241
8247
|
Va++;
|
|
@@ -8313,8 +8319,8 @@ function LN() {
|
|
|
8313
8319
|
if (u._pendingEditorState = null, u._editorState = c, !y && ae && Ce !== null) {
|
|
8314
8320
|
tr = u, er = c, kr = !1, u._updating = !0;
|
|
8315
8321
|
try {
|
|
8316
|
-
const Dt = u._dirtyType, on = u._dirtyElements,
|
|
8317
|
-
Ce.disconnect(), Ve = Yi(N, c, u, Dt, on,
|
|
8322
|
+
const Dt = u._dirtyType, on = u._dirtyElements, ar = u._dirtyLeaves;
|
|
8323
|
+
Ce.disconnect(), Ve = Yi(N, c, u, Dt, on, ar);
|
|
8318
8324
|
} catch (Dt) {
|
|
8319
8325
|
if (Dt instanceof Error && u._onError(Dt), !Hc)
|
|
8320
8326
|
tf(u, null, h, c), dn(u), u._dirtyType = at, Hc = !0, Qo(u, N), Hc = !1;
|
|
@@ -8892,7 +8898,7 @@ function LN() {
|
|
|
8892
8898
|
return super.append(...o);
|
|
8893
8899
|
}
|
|
8894
8900
|
static importJSON(o) {
|
|
8895
|
-
const c =
|
|
8901
|
+
const c = or();
|
|
8896
8902
|
return c.setFormat(o.format), c.setIndent(o.indent), c.setDirection(o.direction), c;
|
|
8897
8903
|
}
|
|
8898
8904
|
exportJSON() {
|
|
@@ -8962,7 +8968,7 @@ function LN() {
|
|
|
8962
8968
|
}
|
|
8963
8969
|
toJSON() {
|
|
8964
8970
|
return Vd(this, () => ({
|
|
8965
|
-
root: ef(
|
|
8971
|
+
root: ef(or())
|
|
8966
8972
|
}));
|
|
8967
8973
|
}
|
|
8968
8974
|
}
|
|
@@ -9093,8 +9099,8 @@ function LN() {
|
|
|
9093
9099
|
const Dt = $e.name;
|
|
9094
9100
|
if (Dt !== "RootNode") {
|
|
9095
9101
|
const on = $e.prototype;
|
|
9096
|
-
["getType", "clone"].forEach((
|
|
9097
|
-
$e.hasOwnProperty(
|
|
9102
|
+
["getType", "clone"].forEach((ar) => {
|
|
9103
|
+
$e.hasOwnProperty(ar) || console.warn(`${Dt} must implement static "${ar}" method`);
|
|
9098
9104
|
}), // eslint-disable-next-line no-prototype-builtins
|
|
9099
9105
|
!$e.hasOwnProperty("importDOM") && // eslint-disable-next-line no-prototype-builtins
|
|
9100
9106
|
$e.hasOwnProperty("exportDOM") && console.warn(`${Dt} should implement "importDOM" if using a custom "exportDOM" method to ensure HTML serialization (important for copy & paste) works as expected`), on instanceof Kc && (on.hasOwnProperty("decorate") || console.warn(`${on.constructor.name} must implement "decorate" method`)), $e.hasOwnProperty("importJSON") || console.warn(`${Dt} should implement "importJSON" method to ensure JSON and default HTML serialization works as expected`), on.hasOwnProperty("exportJSON") || console.warn(`${Dt} should implement "exportJSON" method to ensure JSON and default HTML serialization works as expected`);
|
|
@@ -9443,7 +9449,7 @@ function LN() {
|
|
|
9443
9449
|
focus(o, c = {}) {
|
|
9444
9450
|
const h = this._rootElement;
|
|
9445
9451
|
h !== null && (h.setAttribute("autocapitalize", "off"), Ur(this, () => {
|
|
9446
|
-
const y = pn(), N =
|
|
9452
|
+
const y = pn(), N = or();
|
|
9447
9453
|
y !== null ? y.dirty = !0 : N.getChildrenSize() !== 0 && (c.defaultSelection === "rootStart" ? N.selectStart() : N.selectEnd());
|
|
9448
9454
|
}, {
|
|
9449
9455
|
onUpdate: () => {
|
|
@@ -9529,7 +9535,7 @@ function LN() {
|
|
|
9529
9535
|
function Gc(u) {
|
|
9530
9536
|
return u instanceof of;
|
|
9531
9537
|
}
|
|
9532
|
-
return He.$INTERNAL_isPointSelection = fr, He.$addUpdateTag = Nt, He.$applyNodeReplacement = Ar, He.$copyNode = wl, He.$createLineBreakNode = yo, He.$createNodeSelection = $c, He.$createParagraphNode = Ji, He.$createPoint = br, He.$createRangeSelection = g_, He.$createTabNode = Ps, He.$createTextNode = Dn, He.$getAdjacentNode = vl, He.$getNearestNodeFromDOMNode = oi, He.$getNearestRootOrShadowRoot = xs, He.$getNodeByKey = Nn, He.$getPreviousSelection = Hs, He.$getRoot =
|
|
9538
|
+
return He.$INTERNAL_isPointSelection = fr, He.$addUpdateTag = Nt, He.$applyNodeReplacement = Ar, He.$copyNode = wl, He.$createLineBreakNode = yo, He.$createNodeSelection = $c, He.$createParagraphNode = Ji, He.$createPoint = br, He.$createRangeSelection = g_, He.$createTabNode = Ps, He.$createTextNode = Dn, He.$getAdjacentNode = vl, He.$getNearestNodeFromDOMNode = oi, He.$getNearestRootOrShadowRoot = xs, He.$getNodeByKey = Nn, He.$getPreviousSelection = Hs, He.$getRoot = or, He.$getSelection = pn, He.$getTextContent = N_, He.$hasAncestor = Wi, He.$hasUpdateTag = Gn, He.$insertNodes = y_, He.$isBlockElementNode = h_, He.$isDecoratorNode = An, He.$isElementNode = et, He.$isInlineElementOrDecoratorNode = Br, He.$isLeafNode = Ro, He.$isLineBreakNode = ci, He.$isNodeSelection = zr, He.$isParagraphNode = P_, He.$isRangeSelection = xt, He.$isRootNode = Gr, He.$isRootOrShadowRoot = si, He.$isTabNode = $s, He.$isTextNode = mt, He.$nodesOfType = Hi, He.$normalizeSelection__EXPERIMENTAL = Ao, He.$parseSerializedNode = w_, He.$selectAll = xl, He.$setCompositionKey = vn, He.$setSelection = Er, He.$splitNode = La, He.BLUR_COMMAND = B, He.CAN_REDO_COMMAND = X, He.CAN_UNDO_COMMAND = fe, He.CLEAR_EDITOR_COMMAND = R, He.CLEAR_HISTORY_COMMAND = U, He.CLICK_COMMAND = r, He.COMMAND_PRIORITY_CRITICAL = W_, He.COMMAND_PRIORITY_EDITOR = $_, He.COMMAND_PRIORITY_HIGH = H_, He.COMMAND_PRIORITY_LOW = F_, He.COMMAND_PRIORITY_NORMAL = B_, He.CONTROLLED_TEXT_INSERTION_COMMAND = p, He.COPY_COMMAND = Y, He.CUT_COMMAND = W, He.DELETE_CHARACTER_COMMAND = l, He.DELETE_LINE_COMMAND = S, He.DELETE_WORD_COMMAND = E, He.DEPRECATED_$computeGridMap = C_, He.DEPRECATED_$getGridCellNodeRect = Ir, He.DEPRECATED_$getNodeTriplet = zd, He.DEPRECATED_$isGridCellNode = Us, He.DEPRECATED_$isGridNode = rf, He.DEPRECATED_$isGridRowNode = Gc, He.DEPRECATED_GridCellNode = Uc, He.DEPRECATED_GridNode = nf, He.DEPRECATED_GridRowNode = of, He.DRAGEND_COMMAND = se, He.DRAGOVER_COMMAND = Z, He.DRAGSTART_COMMAND = O, He.DROP_COMMAND = de, He.DecoratorNode = Kc, He.ElementNode = es, He.FOCUS_COMMAND = _e, He.FORMAT_ELEMENT_COMMAND = K, He.FORMAT_TEXT_COMMAND = w, He.INDENT_CONTENT_COMMAND = Se, He.INSERT_LINE_BREAK_COMMAND = d, He.INSERT_PARAGRAPH_COMMAND = f, He.INSERT_TAB_COMMAND = Te, He.INTERNAL_PointSelection = Lr, He.KEY_ARROW_DOWN_COMMAND = j, He.KEY_ARROW_LEFT_COMMAND = I, He.KEY_ARROW_RIGHT_COMMAND = k, He.KEY_ARROW_UP_COMMAND = H, He.KEY_BACKSPACE_COMMAND = ce, He.KEY_DELETE_COMMAND = z, He.KEY_DOWN_COMMAND = v, He.KEY_ENTER_COMMAND = re, He.KEY_ESCAPE_COMMAND = V, He.KEY_MODIFIER_COMMAND = A, He.KEY_SPACE_COMMAND = te, He.KEY_TAB_COMMAND = q, He.LineBreakNode = qi, He.MOVE_TO_END = G, He.MOVE_TO_START = P, He.OUTDENT_CONTENT_COMMAND = Ee, He.PASTE_COMMAND = _, He.ParagraphNode = zs, He.REDO_COMMAND = m, He.REMOVE_TEXT_COMMAND = T, He.RootNode = Ks, He.SELECTION_CHANGE_COMMAND = t, He.SELECTION_INSERT_CLIPBOARD_NODES_COMMAND = n, He.SELECT_ALL_COMMAND = J, He.TabNode = vr, He.TextNode = Xr, He.UNDO_COMMAND = M, He.createCommand = e, He.createEditor = z_, He.getNearestEditorFromDOMNode = ul, He.isCurrentlyReadOnlyMode = Ws, He.isHTMLAnchorElement = Ia, He.isHTMLElement = zo, He.isSelectionCapturedInDecoratorInput = Mo, He.isSelectionWithinEditor = lo, He;
|
|
9533
9539
|
}
|
|
9534
9540
|
var We = {}, wf;
|
|
9535
9541
|
function IN() {
|
|
@@ -9871,7 +9877,7 @@ function IN() {
|
|
|
9871
9877
|
return s = (s = Ln(s).event) && s.inputType, s === "insertFromPaste" || s === "insertFromPasteAsQuotation";
|
|
9872
9878
|
}
|
|
9873
9879
|
function nn(s) {
|
|
9874
|
-
return !
|
|
9880
|
+
return !sr(s) && !s.isLastChild() && !s.isInline();
|
|
9875
9881
|
}
|
|
9876
9882
|
function an(s, i) {
|
|
9877
9883
|
return s = s._keyToDOMMap.get(i), s === void 0 && Y(75, i), s;
|
|
@@ -9879,7 +9885,7 @@ function IN() {
|
|
|
9879
9885
|
function bn(s) {
|
|
9880
9886
|
return s = s.assignedSlot || s.parentElement, s !== null && s.nodeType === 11 ? s.host : s;
|
|
9881
9887
|
}
|
|
9882
|
-
function
|
|
9888
|
+
function rr(s, i) {
|
|
9883
9889
|
for (s = s.getParent(); s !== null; ) {
|
|
9884
9890
|
if (s.is(i)) return !0;
|
|
9885
9891
|
s = s.getParent();
|
|
@@ -9894,18 +9900,18 @@ function IN() {
|
|
|
9894
9900
|
return s;
|
|
9895
9901
|
}
|
|
9896
9902
|
function Jn(s) {
|
|
9897
|
-
return
|
|
9903
|
+
return sr(s) || Je(s) && s.isShadowRoot();
|
|
9898
9904
|
}
|
|
9899
9905
|
function bi(s) {
|
|
9900
9906
|
return s = s.constructor.clone(s), _t(s, null), s;
|
|
9901
9907
|
}
|
|
9902
|
-
function
|
|
9908
|
+
function ir(s) {
|
|
9903
9909
|
var i = cn();
|
|
9904
9910
|
let a = s.constructor.getType();
|
|
9905
9911
|
return i = i._nodes.get(a), i === void 0 && Y(97), i = i.replace, i !== null ? (i = i(s), i instanceof s.constructor || Y(98), i) : s;
|
|
9906
9912
|
}
|
|
9907
9913
|
function Ao(s, i) {
|
|
9908
|
-
s = s.getParent(), !
|
|
9914
|
+
s = s.getParent(), !sr(s) || Je(i) || Cn(i) || Y(99);
|
|
9909
9915
|
}
|
|
9910
9916
|
function gs(s) {
|
|
9911
9917
|
return (Cn(s) || Je(s) && !s.canBeEmpty()) && !s.isInline();
|
|
@@ -9970,7 +9976,7 @@ function IN() {
|
|
|
9970
9976
|
function Ii(s, i) {
|
|
9971
9977
|
s.setProperty("text-align", i);
|
|
9972
9978
|
}
|
|
9973
|
-
function
|
|
9979
|
+
function or(s, i) {
|
|
9974
9980
|
var a = $r.theme.indent;
|
|
9975
9981
|
if (typeof a == "string") {
|
|
9976
9982
|
let g = s.classList.contains(a);
|
|
@@ -9987,7 +9993,7 @@ function IN() {
|
|
|
9987
9993
|
let C = g.createDOM($r, Hn);
|
|
9988
9994
|
var x = Hn._keyToDOMMap;
|
|
9989
9995
|
if (C["__lexicalKey_" + Hn._key] = s, x.set(s, C), Nt(g) ? C.setAttribute("data-lexical-text", "true") : Cn(g) && C.setAttribute("data-lexical-decorator", "true"), Je(g)) {
|
|
9990
|
-
if (s = g.__indent, x = g.__size, s !== 0 &&
|
|
9996
|
+
if (s = g.__indent, x = g.__size, s !== 0 && or(C, s), x !== 0) {
|
|
9991
9997
|
--x, s = Lo(g, Nn);
|
|
9992
9998
|
var D = Un;
|
|
9993
9999
|
Un = "", pl(s, g, 0, x, C, null), ya(g, C), Un = D;
|
|
@@ -10044,7 +10050,7 @@ function IN() {
|
|
|
10044
10050
|
if (a === g && !C) return Je(a) ? (g = x.__lexicalTextContent, g !== void 0 && (In += g, ii += g), g = x.__lexicalDirTextContent, g !== void 0 && (Un += g)) : (g = a.getTextContent(), Nt(a) && !a.isDirectionless() && (Un += g), ii += g, In += g), x;
|
|
10045
10051
|
if (a !== g && C && zt(oi, Ro, qr, g, "updated"), g.updateDOM(a, x, $r)) return g = Er(s, null, null), i === null && Y(62), i.replaceChild(g, x), bo(s, null), g;
|
|
10046
10052
|
if (Je(a) && Je(g)) {
|
|
10047
|
-
if (s = g.__indent, s !== a.__indent &&
|
|
10053
|
+
if (s = g.__indent, s !== a.__indent && or(x, s), s = g.__format, s !== a.__format && gl(x, s), C) {
|
|
10048
10054
|
s = Un, Un = "", C = In;
|
|
10049
10055
|
var D = a.__size, Q = g.__size;
|
|
10050
10056
|
if (In = "", D === 1 && Q === 1) {
|
|
@@ -10078,7 +10084,7 @@ function IN() {
|
|
|
10078
10084
|
}
|
|
10079
10085
|
nn(g) && (In += `
|
|
10080
10086
|
|
|
10081
|
-
`), x.__lexicalTextContent = In, In = C + In, ya(g, x), Un = s,
|
|
10087
|
+
`), x.__lexicalTextContent = In, In = C + In, ya(g, x), Un = s, sr(g) || g.isInline() || ml(a, g, x);
|
|
10082
10088
|
}
|
|
10083
10089
|
nn(g) && (In += `
|
|
10084
10090
|
|
|
@@ -10086,7 +10092,7 @@ function IN() {
|
|
|
10086
10092
|
|
|
10087
10093
|
`);
|
|
10088
10094
|
} else a = g.getTextContent(), Cn(g) ? (C = g.decorate(Hn, $r), C !== null && _l(s, C)) : Nt(g) && !g.isDirectionless() && (Un += a), In += a, ii += a;
|
|
10089
|
-
return !fl &&
|
|
10095
|
+
return !fl && sr(g) && g.__cachedText !== ii && (g.getWritable().__cachedText = ii), x;
|
|
10090
10096
|
}
|
|
10091
10097
|
function _l(s, i) {
|
|
10092
10098
|
let a = Hn._pendingDecorators, g = Hn._decorators;
|
|
@@ -10157,7 +10163,7 @@ function IN() {
|
|
|
10157
10163
|
if (g) if (Mt(a)) {
|
|
10158
10164
|
let D = a.anchor;
|
|
10159
10165
|
var x = D.getNode();
|
|
10160
|
-
D.type === "element" && D.offset === 0 && a.isCollapsed() && !
|
|
10166
|
+
D.type === "element" && D.offset === 0 && a.isCollapsed() && !sr(x) && Rt().getChildrenSize() === 1 && x.getTopLevelElementOrThrow().isEmpty() && C !== null && a.is(C) ? (g.removeAllRanges(), a.dirty = !0) : s.detail !== 3 || a.isCollapsed() || (g = a.focus.getNode(), x !== g && (Je(x) ? x.select(0) : x.getParentOrThrow().select(0)));
|
|
10161
10167
|
} else s.pointerType === "touch" && (x = g.anchorNode, x !== null && (x = x.nodeType, x === 1 || x === 3)) && (g = Yn(C, g, i, s), Xt(g));
|
|
10162
10168
|
lt(i, t, s);
|
|
10163
10169
|
});
|
|
@@ -10200,7 +10206,7 @@ function IN() {
|
|
|
10200
10206
|
}
|
|
10201
10207
|
}
|
|
10202
10208
|
if (Mt(C)) {
|
|
10203
|
-
x = s.data, ao !== null && Ze(!1, i, ao), C.dirty && ao === null || !C.isCollapsed() ||
|
|
10209
|
+
x = s.data, ao !== null && Ze(!1, i, ao), C.dirty && ao === null || !C.isCollapsed() || sr(C.anchor.getNode()) || g === null || C.applyDOMRange(g), ao = null;
|
|
10204
10210
|
var D = C.focus, Q = C.anchor.getNode();
|
|
10205
10211
|
if (D = D.getNode(), a === "insertText" || a === "insertTranspose") x === `
|
|
10206
10212
|
` ? (s.preventDefault(), lt(i, r, !1)) : x === `
|
|
@@ -10410,14 +10416,14 @@ function IN() {
|
|
|
10410
10416
|
var x = Yt();
|
|
10411
10417
|
if (Mt(x) && Je(s)) {
|
|
10412
10418
|
var { anchor: D, focus: Q } = x, ge = D.getNode(), Ae = Q.getNode();
|
|
10413
|
-
|
|
10419
|
+
rr(ge, s) && D.set(s.__key, 0, "element"), rr(Ae, s) && Q.set(s.__key, 0, "element");
|
|
10414
10420
|
}
|
|
10415
10421
|
if (ge = x, Ae = !1, Mt(ge) && i) {
|
|
10416
10422
|
x = ge.anchor;
|
|
10417
10423
|
let Ye = ge.focus;
|
|
10418
10424
|
x.key === g && (go(x, s, C, s.getPreviousSibling(), s.getNextSibling()), Ae = !0), Ye.key === g && (go(Ye, s, C, s.getPreviousSibling(), s.getNextSibling()), Ae = !0);
|
|
10419
10425
|
} else ur(ge) && i && s.isSelected() && s.selectPrevious();
|
|
10420
|
-
Mt(ge) && i && !Ae ? (g = s.getIndexWithinParent(), yt(s), Wn(ge, C, g, -1)) : yt(s), a || Jn(C) || C.canBeEmpty() || !C.isEmpty() || Tl(C, i), i &&
|
|
10426
|
+
Mt(ge) && i && !Ae ? (g = s.getIndexWithinParent(), yt(s), Wn(ge, C, g, -1)) : yt(s), a || Jn(C) || C.canBeEmpty() || !C.isEmpty() || Tl(C, i), i && sr(C) && C.isEmpty() && C.selectEnd();
|
|
10421
10427
|
}
|
|
10422
10428
|
}
|
|
10423
10429
|
class Bo {
|
|
@@ -10737,7 +10743,7 @@ function IN() {
|
|
|
10737
10743
|
return { node: Jr() };
|
|
10738
10744
|
}
|
|
10739
10745
|
function Jr() {
|
|
10740
|
-
return
|
|
10746
|
+
return ir(new Zr());
|
|
10741
10747
|
}
|
|
10742
10748
|
function $i(s) {
|
|
10743
10749
|
return s instanceof Zr;
|
|
@@ -11024,7 +11030,7 @@ function IN() {
|
|
|
11024
11030
|
return i === void 0 ? { node: null } : { forChild: (a) => (Nt(a) && !a.hasFormat(i) && a.toggleFormat(i), a), node: null };
|
|
11025
11031
|
}
|
|
11026
11032
|
function Gn(s = "") {
|
|
11027
|
-
return
|
|
11033
|
+
return ir(new Hi(s));
|
|
11028
11034
|
}
|
|
11029
11035
|
function Nt(s) {
|
|
11030
11036
|
return s instanceof Hi;
|
|
@@ -11067,7 +11073,7 @@ function IN() {
|
|
|
11067
11073
|
}
|
|
11068
11074
|
}
|
|
11069
11075
|
function Wi() {
|
|
11070
|
-
return
|
|
11076
|
+
return ir(new fo());
|
|
11071
11077
|
}
|
|
11072
11078
|
function ba(s) {
|
|
11073
11079
|
return s instanceof fo;
|
|
@@ -11115,7 +11121,7 @@ function IN() {
|
|
|
11115
11121
|
} else xs(s, i);
|
|
11116
11122
|
}
|
|
11117
11123
|
function wl(s, i, a, g) {
|
|
11118
|
-
let C = s.getNode(), x = C.getChildAtIndex(s.offset), D = Gn(), Q =
|
|
11124
|
+
let C = s.getNode(), x = C.getChildAtIndex(s.offset), D = Gn(), Q = sr(C) ? Kr().append(D) : D;
|
|
11119
11125
|
D.setFormat(a), D.setStyle(g), x === null ? C.append(Q) : x.insertBefore(Q), s.is(i) && i.set(D.__key, 0, "text"), s.set(D.__key, 0, "text");
|
|
11120
11126
|
}
|
|
11121
11127
|
function Ar(s, i, a, g) {
|
|
@@ -11336,7 +11342,7 @@ function IN() {
|
|
|
11336
11342
|
var gt = Gn(Ke.getTextContent());
|
|
11337
11343
|
Ke.replace(gt), Ke = gt;
|
|
11338
11344
|
}
|
|
11339
|
-
|
|
11345
|
+
sr(Ae.getNode()) || Ae.type !== "text" || (Ke = Ke.spliceText(0, Ye, "")), x.add(Ke.__key);
|
|
11340
11346
|
} else Ae = Ke.getParentOrThrow(), Ae.canBeEmpty() || Ae.getChildrenSize() !== 1 ? Ke.remove() : Ae.remove();
|
|
11341
11347
|
else x.add(Ke.__key);
|
|
11342
11348
|
for (Ae = D.getChildren(), Ye = new Set(Q), Ke = Pe.is(D), Pe = Pe.isInline() && a.getNextSibling() === null ? Pe : a, gt = Ae.length - 1; 0 <= gt; gt--) {
|
|
@@ -11439,8 +11445,8 @@ function IN() {
|
|
|
11439
11445
|
if (Cn(Q) && !Q.isIsolated()) D && Q.isKeyboardSelectable() ? (a = Dl(), a.add(Q.__key), Xt(a)) : (i = a ? Q.getPreviousSibling() : Q.getNextSibling(), Nt(i) ? (Q = i.__key, a = a ? i.getTextContent().length : 0, C.set(Q, a, "text"), D && x.set(Q, a, "text")) : (g = Q.getParentOrThrow(), Je(i) ? (g = i.__key, Q = a ? i.getChildrenSize() : 0) : (Q = Q.getIndexWithinParent(), g = g.__key, a || Q++), C.set(g, Q, "element"), D && x.set(g, Q, "element")));
|
|
11440
11446
|
else if (x = cn(), C = Vr(x._window)) {
|
|
11441
11447
|
var ge = x._blockCursorElement, Ae = x._rootElement;
|
|
11442
|
-
if (Ae === null || ge === null || !Je(Q) || Q.isInline() || Q.canBeEmpty() || cl(ge, x, Ae), C.modify(i, a ? "backward" : "forward", g), 0 < C.rangeCount && (Q = C.getRangeAt(0), x = this.anchor.getNode(), x =
|
|
11443
|
-
for (D = this.getNodes(), i = [], g = !1, ge = 0; ge < D.length; ge++) Ae = D[ge],
|
|
11448
|
+
if (Ae === null || ge === null || !Je(Q) || Q.isInline() || Q.canBeEmpty() || cl(ge, x, Ae), C.modify(i, a ? "backward" : "forward", g), 0 < C.rangeCount && (Q = C.getRangeAt(0), x = this.anchor.getNode(), x = sr(x) ? x : dn(x), this.applyDOMRange(Q), this.dirty = !0, !D)) {
|
|
11449
|
+
for (D = this.getNodes(), i = [], g = !1, ge = 0; ge < D.length; ge++) Ae = D[ge], rr(Ae, x) ? i.push(Ae) : g = !0;
|
|
11444
11450
|
g && 0 < i.length && (a ? (a = i[0], Je(a) ? a.selectStart() : a.getParentOrThrow().selectStart()) : (a = i[i.length - 1], Je(a) ? a.selectEnd() : a.getParentOrThrow().selectEnd())), (C.anchorNode !== Q.startContainer || C.anchorOffset !== Q.startOffset) && (a = this.focus, D = this.anchor, C = D.key, Q = D.offset, x = D.type, Ar(D, a.key, a.offset, a.type), Ar(a, C, Q, x), this._cachedNodes = null);
|
|
11445
11451
|
}
|
|
11446
11452
|
}
|
|
@@ -11480,7 +11486,7 @@ function IN() {
|
|
|
11480
11486
|
}
|
|
11481
11487
|
}
|
|
11482
11488
|
}
|
|
11483
|
-
this.removeText(), i && !a && this.isCollapsed() && this.anchor.type === "element" && this.anchor.offset === 0 && (i = this.anchor.getNode(), i.isEmpty() &&
|
|
11489
|
+
this.removeText(), i && !a && this.isCollapsed() && this.anchor.type === "element" && this.anchor.offset === 0 && (i = this.anchor.getNode(), i.isEmpty() && sr(i.getParent()) && i.getIndexWithinParent() === 0 && i.collapseAtStart(this));
|
|
11484
11490
|
}
|
|
11485
11491
|
deleteLine(i) {
|
|
11486
11492
|
this.isCollapsed() && (this.anchor.type === "text" && this.modify("extend", i, "lineboundary"), (i ? this.focus : this.anchor).offset === 0 && this.modify(
|
|
@@ -11769,9 +11775,9 @@ function IN() {
|
|
|
11769
11775
|
let hr = document.createRange();
|
|
11770
11776
|
hr.selectNode(fr), Ir = hr.getBoundingClientRect();
|
|
11771
11777
|
} else Ir = fr.getBoundingClientRect();
|
|
11772
|
-
let
|
|
11778
|
+
let lr = g.ownerDocument, zr = lr.defaultView;
|
|
11773
11779
|
if (zr !== null) for (var { top: Kl, bottom: Qr } = Ir, Dn, mt, vr = g; vr !== null; ) {
|
|
11774
|
-
let hr = vr ===
|
|
11780
|
+
let hr = vr === lr.body;
|
|
11775
11781
|
if (hr) Dn = 0, mt = Ln(s).innerHeight;
|
|
11776
11782
|
else {
|
|
11777
11783
|
let Bs = vr.getBoundingClientRect();
|
|
@@ -11805,20 +11811,20 @@ function IN() {
|
|
|
11805
11811
|
} else {
|
|
11806
11812
|
let Ir = En.getChildAtIndex(Lr);
|
|
11807
11813
|
if (gs(Ir)) {
|
|
11808
|
-
let
|
|
11809
|
-
(
|
|
11814
|
+
let lr = Ir.getPreviousSibling();
|
|
11815
|
+
(lr === null || gs(lr)) && (xt = !0, fr = s.getElementByKey(Ir.__key));
|
|
11810
11816
|
}
|
|
11811
11817
|
}
|
|
11812
11818
|
if (xt) {
|
|
11813
11819
|
let Ir = s.getElementByKey(En.__key);
|
|
11814
11820
|
if (gn === null) {
|
|
11815
|
-
let
|
|
11821
|
+
let lr = s._config.theme, zr = document.createElement("div");
|
|
11816
11822
|
zr.contentEditable = "false", zr.setAttribute("data-lexical-cursor", "true");
|
|
11817
|
-
let hr =
|
|
11823
|
+
let hr = lr.blockCursor;
|
|
11818
11824
|
if (hr !== void 0) {
|
|
11819
11825
|
if (typeof hr == "string") {
|
|
11820
11826
|
let ui = hr.split(" ");
|
|
11821
|
-
hr =
|
|
11827
|
+
hr = lr.blockCursor = ui;
|
|
11822
11828
|
}
|
|
11823
11829
|
hr !== void 0 && zr.classList.add(...hr);
|
|
11824
11830
|
}
|
|
@@ -12274,7 +12280,7 @@ function IN() {
|
|
|
12274
12280
|
return !0;
|
|
12275
12281
|
}
|
|
12276
12282
|
}
|
|
12277
|
-
function
|
|
12283
|
+
function sr(s) {
|
|
12278
12284
|
return s instanceof dr;
|
|
12279
12285
|
}
|
|
12280
12286
|
function Ll(s, i) {
|
|
@@ -12366,7 +12372,7 @@ function IN() {
|
|
|
12366
12372
|
return s.style && (i.setFormat(s.style.textAlign), s = parseInt(s.style.textIndent, 10) / 20, 0 < s && i.setIndent(s)), { node: i };
|
|
12367
12373
|
}
|
|
12368
12374
|
function Kr() {
|
|
12369
|
-
return
|
|
12375
|
+
return ir(new Wr());
|
|
12370
12376
|
}
|
|
12371
12377
|
function Ms(s, i, a, g) {
|
|
12372
12378
|
let C = s._keyToDOMMap;
|
|
@@ -12579,13 +12585,13 @@ function IN() {
|
|
|
12579
12585
|
}
|
|
12580
12586
|
return We.$INTERNAL_isPointSelection = Ko, We.$addUpdateTag = function(s) {
|
|
12581
12587
|
Xn(), cn()._updateTags.add(s);
|
|
12582
|
-
}, We.$applyNodeReplacement =
|
|
12588
|
+
}, We.$applyNodeReplacement = ir, We.$copyNode = bi, We.$createLineBreakNode = Jr, We.$createNodeSelection = Dl, We.$createParagraphNode = Kr, We.$createPoint = Br, We.$createRangeSelection = function() {
|
|
12583
12589
|
let s = Br("root", 0, "element"), i = Br("root", 0, "element");
|
|
12584
12590
|
return new Ei(s, i, 0, "");
|
|
12585
12591
|
}, We.$createTabNode = Wi, We.$createTextNode = Gn, We.$getAdjacentNode = Ct, We.$getNearestNodeFromDOMNode = Bt, We.$getNearestRootOrShadowRoot = dn, We.$getNodeByKey = pt, We.$getPreviousSelection = Tr, We.$getRoot = Rt, We.$getSelection = Yt, We.$getTextContent = function() {
|
|
12586
12592
|
let s = Yt();
|
|
12587
12593
|
return s === null ? "" : s.getTextContent();
|
|
12588
|
-
}, We.$hasAncestor =
|
|
12594
|
+
}, We.$hasAncestor = rr, We.$hasUpdateTag = function(s) {
|
|
12589
12595
|
return cn()._updateTags.has(s);
|
|
12590
12596
|
}, We.$insertNodes = function(s) {
|
|
12591
12597
|
let i = Yt() || Tr();
|
|
@@ -12598,7 +12604,7 @@ function IN() {
|
|
|
12598
12604
|
return Nt(s) || $i(s) || Cn(s);
|
|
12599
12605
|
}, We.$isLineBreakNode = $i, We.$isNodeSelection = ur, We.$isParagraphNode = function(s) {
|
|
12600
12606
|
return s instanceof Wr;
|
|
12601
|
-
}, We.$isRangeSelection = Mt, We.$isRootNode =
|
|
12607
|
+
}, We.$isRangeSelection = Mt, We.$isRootNode = sr, We.$isRootOrShadowRoot = Jn, We.$isTabNode = ba, We.$isTextNode = Nt, We.$nodesOfType = function(s) {
|
|
12602
12608
|
var i = Hr();
|
|
12603
12609
|
let a = i._readOnly, g = s.getType();
|
|
12604
12610
|
i = i._nodeMap;
|
|
@@ -18387,19 +18393,19 @@ function wC() {
|
|
|
18387
18393
|
if (!e.DEPRECATED_$isGridRowNode(nn))
|
|
18388
18394
|
return !1;
|
|
18389
18395
|
const an = yn.getChildren(), bn = nn.getChildren();
|
|
18390
|
-
let
|
|
18396
|
+
let rr = 0;
|
|
18391
18397
|
for (let Ln = Ni; Ln <= Ze; Ln++) {
|
|
18392
18398
|
const dn = an[Ln];
|
|
18393
18399
|
if (!e.DEPRECATED_$isGridCellNode(dn))
|
|
18394
18400
|
return !1;
|
|
18395
|
-
const Jn = bn[
|
|
18401
|
+
const Jn = bn[rr];
|
|
18396
18402
|
if (!e.DEPRECATED_$isGridCellNode(Jn))
|
|
18397
18403
|
return !1;
|
|
18398
18404
|
Ct === pe && Ln === Ni ? zt = dn.getKey() : Ct === nt && Ln === Ze && (Pt = dn.getKey());
|
|
18399
18405
|
const bi = dn.getChildren();
|
|
18400
|
-
Jn.getChildren().forEach((
|
|
18401
|
-
e.$isTextNode(
|
|
18402
|
-
}), bi.forEach((
|
|
18406
|
+
Jn.getChildren().forEach((ir) => {
|
|
18407
|
+
e.$isTextNode(ir) && e.$createParagraphNode().append(ir), dn.append(ir);
|
|
18408
|
+
}), bi.forEach((ir) => ir.remove()), rr++;
|
|
18403
18409
|
}
|
|
18404
18410
|
kt++;
|
|
18405
18411
|
}
|
|
@@ -23910,7 +23916,7 @@ const IC = process.env.NODE_ENV === "development" ? bC() : LC();
|
|
|
23910
23916
|
var ju = IC, pd = Zn();
|
|
23911
23917
|
function kC() {
|
|
23912
23918
|
const [e] = pd.useLexicalComposerContext();
|
|
23913
|
-
return
|
|
23919
|
+
return nr(() => ju.registerCodeHighlighting(e), [e]), null;
|
|
23914
23920
|
}
|
|
23915
23921
|
var Xh = hn(), Bn = Ut();
|
|
23916
23922
|
function PC({
|
|
@@ -24019,7 +24025,7 @@ const FC = typeof window < "u" && typeof window.document < "u" && typeof window.
|
|
|
24019
24025
|
);
|
|
24020
24026
|
function HC() {
|
|
24021
24027
|
const [e] = pd.useLexicalComposerContext();
|
|
24022
|
-
return
|
|
24028
|
+
return nr(() => {
|
|
24023
24029
|
if (!e.hasNodes([il]))
|
|
24024
24030
|
throw new Error("ImagePlugin: ImageNode not registered on editor");
|
|
24025
24031
|
return Xh.mergeRegister(
|
|
@@ -24151,7 +24157,7 @@ function VC(e) {
|
|
|
24151
24157
|
}
|
|
24152
24158
|
function qC({ maxDepth: e }) {
|
|
24153
24159
|
const [t] = pd.useLexicalComposerContext();
|
|
24154
|
-
return
|
|
24160
|
+
return nr(() => t.registerCommand(
|
|
24155
24161
|
Bn.INDENT_CONTENT_COMMAND,
|
|
24156
24162
|
() => !VC(e || 7),
|
|
24157
24163
|
jC
|
|
@@ -26105,11 +26111,11 @@ const FT = (e, t) => e(t, "i", oo(e, t)), BT = (e, t) => e(t, "b", oo(e, t)), HT
|
|
|
26105
26111
|
}, yw = (e) => {
|
|
26106
26112
|
const [t, n] = Cr();
|
|
26107
26113
|
let r;
|
|
26108
|
-
return
|
|
26114
|
+
return nr(() => {
|
|
26109
26115
|
(async () => {
|
|
26110
26116
|
if (!r)
|
|
26111
26117
|
try {
|
|
26112
|
-
r = (await import("./index-
|
|
26118
|
+
r = (await import("./index-VbkIXtJn.js")).default;
|
|
26113
26119
|
} catch {
|
|
26114
26120
|
throw new Error(
|
|
26115
26121
|
"Failed to import React Markdown, cannot properly render LegacyRichText."
|
|
@@ -31808,7 +31814,7 @@ function Qv(e, t) {
|
|
|
31808
31814
|
}
|
|
31809
31815
|
const Nw = (e) => {
|
|
31810
31816
|
const [t, n] = Cr(!1), [r, l] = Cr(!1);
|
|
31811
|
-
|
|
31817
|
+
nr(() => {
|
|
31812
31818
|
l(!0);
|
|
31813
31819
|
}, []);
|
|
31814
31820
|
const d = e.statusTemplate || Qv, f = new t_(e.hours, e.timezone), p = f.isOpenNow(), _ = f.getCurrentInterval(), T = f.getNextInterval(), E = (_ == null ? void 0 : _.end) || (T == null ? void 0 : T.start);
|
|
@@ -31866,7 +31872,7 @@ function nS(e, t, n) {
|
|
|
31866
31872
|
}
|
|
31867
31873
|
const Cw = (e) => {
|
|
31868
31874
|
const [t, n] = Cr(!1);
|
|
31869
|
-
|
|
31875
|
+
nr(() => {
|
|
31870
31876
|
n(!0);
|
|
31871
31877
|
}, []);
|
|
31872
31878
|
const r = new t_(
|