@apolitical/component-library 5.5.0 → 5.5.1-SW.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/form/types/password-form/index.d.ts +1 -1
- package/form/types/password-form/password-form.d.ts +5 -2
- package/form/types/profile-form/profile-form.d.ts +4 -2
- package/general/progress-tracker/index.d.ts +1 -1
- package/general/progress-tracker/progress-tracker.d.ts +2 -2
- package/index.js +23 -23
- package/index.mjs +892 -880
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -156,14 +156,14 @@ function Mh() {
|
|
|
156
156
|
Ke.unshift("Warning: " + se), Function.prototype.apply.call(console[M], console, Ke);
|
|
157
157
|
}
|
|
158
158
|
}
|
|
159
|
-
var B = !1, x = !1,
|
|
160
|
-
|
|
159
|
+
var B = !1, x = !1, w = !1, T = !1, I = !1, P;
|
|
160
|
+
P = Symbol.for("react.module.reference");
|
|
161
161
|
function z(M) {
|
|
162
|
-
return !!(typeof M == "string" || typeof M == "function" || M === r || M === a || I || M === i || M === u || M === d || T || M === p || B || x ||
|
|
162
|
+
return !!(typeof M == "string" || typeof M == "function" || M === r || M === a || I || M === i || M === u || M === d || T || M === p || B || x || w || typeof M == "object" && M !== null && (M.$$typeof === m || M.$$typeof === h || M.$$typeof === s || M.$$typeof === o || M.$$typeof === l || // This needs to include all possible module reference object
|
|
163
163
|
// types supported by any Flight configuration anywhere since
|
|
164
164
|
// we don't know which Flight build this will end up being used
|
|
165
165
|
// with.
|
|
166
|
-
M.$$typeof ===
|
|
166
|
+
M.$$typeof === P || M.getModuleId !== void 0));
|
|
167
167
|
}
|
|
168
168
|
function $(M, se, fe) {
|
|
169
169
|
var Ce = M.displayName;
|
|
@@ -220,14 +220,14 @@ function Mh() {
|
|
|
220
220
|
}
|
|
221
221
|
return null;
|
|
222
222
|
}
|
|
223
|
-
var O = Object.assign, S = 0, U, H, ae, re,
|
|
223
|
+
var O = Object.assign, S = 0, U, H, ae, re, D, X, V;
|
|
224
224
|
function F() {
|
|
225
225
|
}
|
|
226
226
|
F.__reactDisabledLog = !0;
|
|
227
227
|
function A() {
|
|
228
228
|
{
|
|
229
229
|
if (S === 0) {
|
|
230
|
-
U = console.log, H = console.info, ae = console.warn, re = console.error,
|
|
230
|
+
U = console.log, H = console.info, ae = console.warn, re = console.error, D = console.group, X = console.groupCollapsed, V = console.groupEnd;
|
|
231
231
|
var M = {
|
|
232
232
|
configurable: !0,
|
|
233
233
|
enumerable: !0,
|
|
@@ -269,7 +269,7 @@ function Mh() {
|
|
|
269
269
|
value: re
|
|
270
270
|
}),
|
|
271
271
|
group: O({}, M, {
|
|
272
|
-
value:
|
|
272
|
+
value: D
|
|
273
273
|
}),
|
|
274
274
|
groupCollapsed: O({}, M, {
|
|
275
275
|
value: X
|
|
@@ -282,7 +282,7 @@ function Mh() {
|
|
|
282
282
|
S < 0 && C("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
|
283
283
|
}
|
|
284
284
|
}
|
|
285
|
-
var
|
|
285
|
+
var N = b.ReactCurrentDispatcher, L;
|
|
286
286
|
function Z(M, se, fe) {
|
|
287
287
|
{
|
|
288
288
|
if (L === void 0)
|
|
@@ -314,7 +314,7 @@ function Mh() {
|
|
|
314
314
|
var $e = Error.prepareStackTrace;
|
|
315
315
|
Error.prepareStackTrace = void 0;
|
|
316
316
|
var Ke;
|
|
317
|
-
Ke =
|
|
317
|
+
Ke = N.current, N.current = null, A();
|
|
318
318
|
try {
|
|
319
319
|
if (se) {
|
|
320
320
|
var Ne = function() {
|
|
@@ -367,7 +367,7 @@ function Mh() {
|
|
|
367
367
|
}
|
|
368
368
|
}
|
|
369
369
|
} finally {
|
|
370
|
-
q = !1,
|
|
370
|
+
q = !1, N.current = Ke, j(), Error.prepareStackTrace = $e;
|
|
371
371
|
}
|
|
372
372
|
var Kn = M ? M.displayName || M.name : "", Go = Kn ? Z(Kn) : "";
|
|
373
373
|
return typeof M == "function" && ne.set(M, Go), Go;
|
|
@@ -750,7 +750,7 @@ function qc(e, t, n) {
|
|
|
750
750
|
return o.current = l.current = null, a.current = z, u.current = d.current.apply(k, $);
|
|
751
751
|
}, x = function(z, $) {
|
|
752
752
|
p && cancelAnimationFrame(s.current), s.current = p ? requestAnimationFrame(z) : setTimeout(z, $);
|
|
753
|
-
},
|
|
753
|
+
}, w = function(z) {
|
|
754
754
|
if (!h.current)
|
|
755
755
|
return !1;
|
|
756
756
|
var $ = z - i.current;
|
|
@@ -759,15 +759,15 @@ function qc(e, t, n) {
|
|
|
759
759
|
return s.current = null, f && o.current ? B(z) : (o.current = l.current = null, u.current);
|
|
760
760
|
}, I = function z() {
|
|
761
761
|
var $ = Date.now();
|
|
762
|
-
if (
|
|
762
|
+
if (w($))
|
|
763
763
|
return T($);
|
|
764
764
|
if (h.current) {
|
|
765
765
|
var k = t - ($ - i.current), E = v ? Math.min(k, C - ($ - a.current)) : k;
|
|
766
766
|
x(z, E);
|
|
767
767
|
}
|
|
768
|
-
},
|
|
768
|
+
}, P = function() {
|
|
769
769
|
if (m || b) {
|
|
770
|
-
var z = Date.now(), $ =
|
|
770
|
+
var z = Date.now(), $ = w(z);
|
|
771
771
|
if (o.current = [].slice.call(arguments), l.current = r, i.current = z, $) {
|
|
772
772
|
if (!s.current && h.current)
|
|
773
773
|
return a.current = i.current, x(I, t), g ? B(i.current) : u.current;
|
|
@@ -777,13 +777,13 @@ function qc(e, t, n) {
|
|
|
777
777
|
return s.current || x(I, t), u.current;
|
|
778
778
|
}
|
|
779
779
|
};
|
|
780
|
-
return
|
|
780
|
+
return P.cancel = function() {
|
|
781
781
|
s.current && (p ? cancelAnimationFrame(s.current) : clearTimeout(s.current)), a.current = 0, o.current = i.current = l.current = s.current = null;
|
|
782
|
-
},
|
|
782
|
+
}, P.isPending = function() {
|
|
783
783
|
return !!s.current;
|
|
784
|
-
},
|
|
784
|
+
}, P.flush = function() {
|
|
785
785
|
return s.current ? T(Date.now()) : u.current;
|
|
786
|
-
},
|
|
786
|
+
}, P;
|
|
787
787
|
}, [g, v, t, C, f, p, m, b]);
|
|
788
788
|
return _;
|
|
789
789
|
}
|
|
@@ -897,12 +897,12 @@ const Xo = {}, vr = Js(
|
|
|
897
897
|
}, d) => {
|
|
898
898
|
const h = ce(), [m] = le(e || Date.now().toString()), p = ke(null), g = d || p, [f, v] = le(n ? "open" : "hidden"), { extraPadding: b = !0, hasPointer: C = !1, hasForm: _ = !1 } = t, { onOpen: B = () => {
|
|
899
899
|
}, onClose: x = () => {
|
|
900
|
-
} } = o, { readToScreenreadersWhenClosed:
|
|
900
|
+
} } = o, { readToScreenreadersWhenClosed: w = !1, ...T } = l, I = Xo[m];
|
|
901
901
|
de(() => {
|
|
902
902
|
const k = g == null ? void 0 : g.current;
|
|
903
903
|
if (k)
|
|
904
|
-
return k.addEventListener("transitionend",
|
|
905
|
-
k.removeEventListener("transitionend",
|
|
904
|
+
return k.addEventListener("transitionend", P), () => {
|
|
905
|
+
k.removeEventListener("transitionend", P);
|
|
906
906
|
};
|
|
907
907
|
}, []), de(() => {
|
|
908
908
|
if (f !== "open")
|
|
@@ -914,7 +914,7 @@ const Xo = {}, vr = Js(
|
|
|
914
914
|
document.removeEventListener("keyup", k);
|
|
915
915
|
};
|
|
916
916
|
}, [f]);
|
|
917
|
-
const
|
|
917
|
+
const P = ({ propertyName: k }) => {
|
|
918
918
|
k === "opacity" && (I !== !1 && clearTimeout(I), v((E) => (E === "open" ? B() : E === "closed" && x(), E === "opening" ? "open" : E === "closing" ? "closed" : E === "closed" ? "hidden" : E)));
|
|
919
919
|
};
|
|
920
920
|
qr(() => {
|
|
@@ -932,7 +932,7 @@ const Xo = {}, vr = Js(
|
|
|
932
932
|
const $ = {
|
|
933
933
|
className: "content"
|
|
934
934
|
};
|
|
935
|
-
return
|
|
935
|
+
return w ? $.className = K("content", { hidden: f === "hidden" }) : ($.hidden = f === "hidden", $["aria-live"] = "polite"), /* @__PURE__ */ c.jsx(
|
|
936
936
|
"aside",
|
|
937
937
|
{
|
|
938
938
|
ref: g,
|
|
@@ -1991,7 +1991,10 @@ const am = Js(
|
|
|
1991
1991
|
__proto__: null,
|
|
1992
1992
|
default: Xr
|
|
1993
1993
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
1994
|
-
const q_ = ({
|
|
1994
|
+
const q_ = ({
|
|
1995
|
+
currentStep: e = 1,
|
|
1996
|
+
steps: t = 1
|
|
1997
|
+
}) => /* @__PURE__ */ c.jsxs(c.Fragment, { children: [
|
|
1995
1998
|
/* @__PURE__ */ c.jsx(qe, { children: /* @__PURE__ */ c.jsx(
|
|
1996
1999
|
mt,
|
|
1997
2000
|
{
|
|
@@ -2926,14 +2929,14 @@ const wn = ({
|
|
|
2926
2929
|
variant: f = "inline",
|
|
2927
2930
|
isCondensed: v = !0,
|
|
2928
2931
|
additionalContentNewLine: b = !1
|
|
2929
|
-
} = i, C = Re(pt), _ = m && C && typeof C.id == "string", [B, x] = le(!1),
|
|
2930
|
-
|
|
2932
|
+
} = i, C = Re(pt), _ = m && C && typeof C.id == "string", [B, x] = le(!1), w = oo(t);
|
|
2933
|
+
w.name || (w.name = h.formatMessage({
|
|
2931
2934
|
id: `member_${typeof t == "string" ? t : "community"}`
|
|
2932
2935
|
}));
|
|
2933
|
-
const { name: T, image: I } =
|
|
2934
|
-
let { url:
|
|
2935
|
-
typeof t == "object" && t.link !== void 0 && (t.link === !1 ?
|
|
2936
|
-
const z = $m(
|
|
2936
|
+
const { name: T, image: I } = w;
|
|
2937
|
+
let { url: P } = w;
|
|
2938
|
+
typeof t == "object" && t.link !== void 0 && (t.link === !1 ? P = void 0 : P = t.link);
|
|
2939
|
+
const z = $m(w), $ = r && r.createdAt ? Cs(r.createdAt) : !1, k = r && r.createdAt ? Zc(r.createdAt) : "";
|
|
2937
2940
|
return te.createElement(e, {
|
|
2938
2941
|
...d,
|
|
2939
2942
|
className: K("member text-medium", g, f, l, {
|
|
@@ -2944,17 +2947,17 @@ const wn = ({
|
|
|
2944
2947
|
/* @__PURE__ */ c.jsxs(
|
|
2945
2948
|
Ln,
|
|
2946
2949
|
{
|
|
2947
|
-
href:
|
|
2950
|
+
href: P,
|
|
2948
2951
|
gtmType: o,
|
|
2949
2952
|
gtmContext: s,
|
|
2950
2953
|
onClick: (E) => {
|
|
2951
|
-
if (E == null || E.preventDefault(), E == null || E.stopPropagation(), !
|
|
2954
|
+
if (E == null || E.preventDefault(), E == null || E.stopPropagation(), !P)
|
|
2952
2955
|
return;
|
|
2953
2956
|
si && clearTimeout(si), si = setTimeout(() => {
|
|
2954
|
-
window.location.href =
|
|
2957
|
+
window.location.href = P;
|
|
2955
2958
|
}, 150);
|
|
2956
2959
|
const O = new CustomEvent(ut.MEMBER_CLICKED, {
|
|
2957
|
-
detail: { link:
|
|
2960
|
+
detail: { link: P, timeout: si }
|
|
2958
2961
|
});
|
|
2959
2962
|
document.dispatchEvent(O);
|
|
2960
2963
|
},
|
|
@@ -2968,7 +2971,7 @@ const wn = ({
|
|
|
2968
2971
|
"data-testid": "member-name",
|
|
2969
2972
|
children: [
|
|
2970
2973
|
/* @__PURE__ */ c.jsx("span", { children: T }),
|
|
2971
|
-
(u == null ? void 0 : u.showBadges) && (
|
|
2974
|
+
(u == null ? void 0 : u.showBadges) && (w == null ? void 0 : w.badges) && /* @__PURE__ */ c.jsx(Pm, { userBadges: w.badges, badgeOptions: u }),
|
|
2972
2975
|
r && /* @__PURE__ */ c.jsxs(
|
|
2973
2976
|
"span",
|
|
2974
2977
|
{
|
|
@@ -3003,9 +3006,9 @@ const wn = ({
|
|
|
3003
3006
|
className: K({ "text-medium": g === "large" }),
|
|
3004
3007
|
"data-testid": "member-details",
|
|
3005
3008
|
children: v ? z : /* @__PURE__ */ c.jsxs(c.Fragment, { children: [
|
|
3006
|
-
|
|
3007
|
-
|
|
3008
|
-
/* @__PURE__ */ c.jsx("span", { className: "location", children:
|
|
3009
|
+
w.role,
|
|
3010
|
+
w.organisation ? ` — ${w.organisation}` : /* @__PURE__ */ c.jsx(c.Fragment, {}),
|
|
3011
|
+
/* @__PURE__ */ c.jsx("span", { className: "location", children: w.country })
|
|
3009
3012
|
] })
|
|
3010
3013
|
}
|
|
3011
3014
|
)
|
|
@@ -3127,8 +3130,8 @@ function qm() {
|
|
|
3127
3130
|
var e = typeof Symbol == "function" && Symbol.for, t = e ? Symbol.for("react.element") : 60103, n = e ? Symbol.for("react.portal") : 60106, r = e ? Symbol.for("react.fragment") : 60107, i = e ? Symbol.for("react.strict_mode") : 60108, a = e ? Symbol.for("react.profiler") : 60114, s = e ? Symbol.for("react.provider") : 60109, o = e ? Symbol.for("react.context") : 60110, l = e ? Symbol.for("react.async_mode") : 60111, u = e ? Symbol.for("react.concurrent_mode") : 60111, d = e ? Symbol.for("react.forward_ref") : 60112, h = e ? Symbol.for("react.suspense") : 60113, m = e ? Symbol.for("react.suspense_list") : 60120, p = e ? Symbol.for("react.memo") : 60115, g = e ? Symbol.for("react.lazy") : 60116, f = e ? Symbol.for("react.block") : 60121, v = e ? Symbol.for("react.fundamental") : 60117, b = e ? Symbol.for("react.responder") : 60118, C = e ? Symbol.for("react.scope") : 60119;
|
|
3128
3131
|
function _(x) {
|
|
3129
3132
|
if (typeof x == "object" && x !== null) {
|
|
3130
|
-
var
|
|
3131
|
-
switch (
|
|
3133
|
+
var w = x.$$typeof;
|
|
3134
|
+
switch (w) {
|
|
3132
3135
|
case t:
|
|
3133
3136
|
switch (x = x.type, x) {
|
|
3134
3137
|
case l:
|
|
@@ -3147,11 +3150,11 @@ function qm() {
|
|
|
3147
3150
|
case s:
|
|
3148
3151
|
return x;
|
|
3149
3152
|
default:
|
|
3150
|
-
return
|
|
3153
|
+
return w;
|
|
3151
3154
|
}
|
|
3152
3155
|
}
|
|
3153
3156
|
case n:
|
|
3154
|
-
return
|
|
3157
|
+
return w;
|
|
3155
3158
|
}
|
|
3156
3159
|
}
|
|
3157
3160
|
}
|
|
@@ -3235,11 +3238,11 @@ function Um() {
|
|
|
3235
3238
|
}
|
|
3236
3239
|
}
|
|
3237
3240
|
}
|
|
3238
|
-
var x = l,
|
|
3241
|
+
var x = l, w = u, T = o, I = s, P = t, z = d, $ = r, k = g, E = p, O = n, S = a, U = i, H = h, ae = !1;
|
|
3239
3242
|
function re(Q) {
|
|
3240
|
-
return ae || (ae = !0, console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),
|
|
3243
|
+
return ae || (ae = !0, console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")), D(Q) || B(Q) === l;
|
|
3241
3244
|
}
|
|
3242
|
-
function
|
|
3245
|
+
function D(Q) {
|
|
3243
3246
|
return B(Q) === u;
|
|
3244
3247
|
}
|
|
3245
3248
|
function X(Q) {
|
|
@@ -3257,7 +3260,7 @@ function Um() {
|
|
|
3257
3260
|
function j(Q) {
|
|
3258
3261
|
return B(Q) === r;
|
|
3259
3262
|
}
|
|
3260
|
-
function
|
|
3263
|
+
function N(Q) {
|
|
3261
3264
|
return B(Q) === g;
|
|
3262
3265
|
}
|
|
3263
3266
|
function L(Q) {
|
|
@@ -3275,7 +3278,7 @@ function Um() {
|
|
|
3275
3278
|
function ue(Q) {
|
|
3276
3279
|
return B(Q) === h;
|
|
3277
3280
|
}
|
|
3278
|
-
ze.AsyncMode = x, ze.ConcurrentMode =
|
|
3281
|
+
ze.AsyncMode = x, ze.ConcurrentMode = w, ze.ContextConsumer = T, ze.ContextProvider = I, ze.Element = P, ze.ForwardRef = z, ze.Fragment = $, ze.Lazy = k, ze.Memo = E, ze.Portal = O, ze.Profiler = S, ze.StrictMode = U, ze.Suspense = H, ze.isAsyncMode = re, ze.isConcurrentMode = D, ze.isContextConsumer = X, ze.isContextProvider = V, ze.isElement = F, ze.isForwardRef = A, ze.isFragment = j, ze.isLazy = N, ze.isMemo = L, ze.isPortal = Z, ze.isProfiler = q, ze.isStrictMode = ne, ze.isSuspense = ue, ze.isValidElementType = _, ze.typeOf = B;
|
|
3279
3282
|
}()), ze;
|
|
3280
3283
|
}
|
|
3281
3284
|
var hu;
|
|
@@ -3416,8 +3419,8 @@ function Vm() {
|
|
|
3416
3419
|
}
|
|
3417
3420
|
return Ba = function(o, l) {
|
|
3418
3421
|
var u = typeof Symbol == "function" && Symbol.iterator, d = "@@iterator";
|
|
3419
|
-
function h(
|
|
3420
|
-
var X =
|
|
3422
|
+
function h(D) {
|
|
3423
|
+
var X = D && (u && D[u] || D[d]);
|
|
3421
3424
|
if (typeof X == "function")
|
|
3422
3425
|
return X;
|
|
3423
3426
|
}
|
|
@@ -3434,25 +3437,25 @@ function Vm() {
|
|
|
3434
3437
|
arrayOf: _,
|
|
3435
3438
|
element: B(),
|
|
3436
3439
|
elementType: x(),
|
|
3437
|
-
instanceOf:
|
|
3440
|
+
instanceOf: w,
|
|
3438
3441
|
node: z(),
|
|
3439
3442
|
objectOf: I,
|
|
3440
3443
|
oneOf: T,
|
|
3441
|
-
oneOfType:
|
|
3444
|
+
oneOfType: P,
|
|
3442
3445
|
shape: k,
|
|
3443
3446
|
exact: E
|
|
3444
3447
|
};
|
|
3445
|
-
function g(
|
|
3446
|
-
return
|
|
3448
|
+
function g(D, X) {
|
|
3449
|
+
return D === X ? D !== 0 || 1 / D === 1 / X : D !== D && X !== X;
|
|
3447
3450
|
}
|
|
3448
|
-
function f(
|
|
3449
|
-
this.message =
|
|
3451
|
+
function f(D, X) {
|
|
3452
|
+
this.message = D, this.data = X && typeof X == "object" ? X : {}, this.stack = "";
|
|
3450
3453
|
}
|
|
3451
3454
|
f.prototype = Error.prototype;
|
|
3452
|
-
function v(
|
|
3455
|
+
function v(D) {
|
|
3453
3456
|
if (process.env.NODE_ENV !== "production")
|
|
3454
3457
|
var X = {}, V = 0;
|
|
3455
|
-
function F(j,
|
|
3458
|
+
function F(j, N, L, Z, q, ne, ue) {
|
|
3456
3459
|
if (Z = Z || m, ne = ne || L, ue !== n) {
|
|
3457
3460
|
if (l) {
|
|
3458
3461
|
var Q = new Error(
|
|
@@ -3467,19 +3470,19 @@ function Vm() {
|
|
|
3467
3470
|
), X[ve] = !0, V++);
|
|
3468
3471
|
}
|
|
3469
3472
|
}
|
|
3470
|
-
return
|
|
3473
|
+
return N[L] == null ? j ? N[L] === null ? new f("The " + q + " `" + ne + "` is marked as required " + ("in `" + Z + "`, but its value is `null`.")) : new f("The " + q + " `" + ne + "` is marked as required in " + ("`" + Z + "`, but its value is `undefined`.")) : null : D(N, L, Z, q, ne);
|
|
3471
3474
|
}
|
|
3472
3475
|
var A = F.bind(null, !1);
|
|
3473
3476
|
return A.isRequired = F.bind(null, !0), A;
|
|
3474
3477
|
}
|
|
3475
|
-
function b(
|
|
3476
|
-
function X(V, F, A, j,
|
|
3478
|
+
function b(D) {
|
|
3479
|
+
function X(V, F, A, j, N, L) {
|
|
3477
3480
|
var Z = V[F], q = U(Z);
|
|
3478
|
-
if (q !==
|
|
3481
|
+
if (q !== D) {
|
|
3479
3482
|
var ne = H(Z);
|
|
3480
3483
|
return new f(
|
|
3481
|
-
"Invalid " + j + " `" +
|
|
3482
|
-
{ expectedType:
|
|
3484
|
+
"Invalid " + j + " `" + N + "` of type " + ("`" + ne + "` supplied to `" + A + "`, expected ") + ("`" + D + "`."),
|
|
3485
|
+
{ expectedType: D }
|
|
3483
3486
|
);
|
|
3484
3487
|
}
|
|
3485
3488
|
return null;
|
|
@@ -3489,17 +3492,17 @@ function Vm() {
|
|
|
3489
3492
|
function C() {
|
|
3490
3493
|
return v(s);
|
|
3491
3494
|
}
|
|
3492
|
-
function _(
|
|
3493
|
-
function X(V, F, A, j,
|
|
3494
|
-
if (typeof
|
|
3495
|
-
return new f("Property `" +
|
|
3495
|
+
function _(D) {
|
|
3496
|
+
function X(V, F, A, j, N) {
|
|
3497
|
+
if (typeof D != "function")
|
|
3498
|
+
return new f("Property `" + N + "` of component `" + A + "` has invalid PropType notation inside arrayOf.");
|
|
3496
3499
|
var L = V[F];
|
|
3497
3500
|
if (!Array.isArray(L)) {
|
|
3498
3501
|
var Z = U(L);
|
|
3499
|
-
return new f("Invalid " + j + " `" +
|
|
3502
|
+
return new f("Invalid " + j + " `" + N + "` of type " + ("`" + Z + "` supplied to `" + A + "`, expected an array."));
|
|
3500
3503
|
}
|
|
3501
3504
|
for (var q = 0; q < L.length; q++) {
|
|
3502
|
-
var ne =
|
|
3505
|
+
var ne = D(L, q, A, j, N + "[" + q + "]", n);
|
|
3503
3506
|
if (ne instanceof Error)
|
|
3504
3507
|
return ne;
|
|
3505
3508
|
}
|
|
@@ -3508,64 +3511,64 @@ function Vm() {
|
|
|
3508
3511
|
return v(X);
|
|
3509
3512
|
}
|
|
3510
3513
|
function B() {
|
|
3511
|
-
function
|
|
3512
|
-
var
|
|
3513
|
-
if (!o(
|
|
3514
|
-
var L = U(
|
|
3514
|
+
function D(X, V, F, A, j) {
|
|
3515
|
+
var N = X[V];
|
|
3516
|
+
if (!o(N)) {
|
|
3517
|
+
var L = U(N);
|
|
3515
3518
|
return new f("Invalid " + A + " `" + j + "` of type " + ("`" + L + "` supplied to `" + F + "`, expected a single ReactElement."));
|
|
3516
3519
|
}
|
|
3517
3520
|
return null;
|
|
3518
3521
|
}
|
|
3519
|
-
return v(
|
|
3522
|
+
return v(D);
|
|
3520
3523
|
}
|
|
3521
3524
|
function x() {
|
|
3522
|
-
function
|
|
3523
|
-
var
|
|
3524
|
-
if (!e.isValidElementType(
|
|
3525
|
-
var L = U(
|
|
3525
|
+
function D(X, V, F, A, j) {
|
|
3526
|
+
var N = X[V];
|
|
3527
|
+
if (!e.isValidElementType(N)) {
|
|
3528
|
+
var L = U(N);
|
|
3526
3529
|
return new f("Invalid " + A + " `" + j + "` of type " + ("`" + L + "` supplied to `" + F + "`, expected a single ReactElement type."));
|
|
3527
3530
|
}
|
|
3528
3531
|
return null;
|
|
3529
3532
|
}
|
|
3530
|
-
return v(
|
|
3533
|
+
return v(D);
|
|
3531
3534
|
}
|
|
3532
|
-
function D
|
|
3533
|
-
function X(V, F, A, j,
|
|
3534
|
-
if (!(V[F] instanceof
|
|
3535
|
-
var L =
|
|
3536
|
-
return new f("Invalid " + j + " `" +
|
|
3535
|
+
function w(D) {
|
|
3536
|
+
function X(V, F, A, j, N) {
|
|
3537
|
+
if (!(V[F] instanceof D)) {
|
|
3538
|
+
var L = D.name || m, Z = re(V[F]);
|
|
3539
|
+
return new f("Invalid " + j + " `" + N + "` of type " + ("`" + Z + "` supplied to `" + A + "`, expected ") + ("instance of `" + L + "`."));
|
|
3537
3540
|
}
|
|
3538
3541
|
return null;
|
|
3539
3542
|
}
|
|
3540
3543
|
return v(X);
|
|
3541
3544
|
}
|
|
3542
|
-
function T(
|
|
3543
|
-
if (!Array.isArray(
|
|
3545
|
+
function T(D) {
|
|
3546
|
+
if (!Array.isArray(D))
|
|
3544
3547
|
return process.env.NODE_ENV !== "production" && (arguments.length > 1 ? a(
|
|
3545
3548
|
"Invalid arguments supplied to oneOf, expected an array, got " + arguments.length + " arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."
|
|
3546
3549
|
) : a("Invalid argument supplied to oneOf, expected an array.")), s;
|
|
3547
|
-
function X(V, F, A, j,
|
|
3548
|
-
for (var L = V[F], Z = 0; Z <
|
|
3549
|
-
if (g(L,
|
|
3550
|
+
function X(V, F, A, j, N) {
|
|
3551
|
+
for (var L = V[F], Z = 0; Z < D.length; Z++)
|
|
3552
|
+
if (g(L, D[Z]))
|
|
3550
3553
|
return null;
|
|
3551
|
-
var q = JSON.stringify(
|
|
3554
|
+
var q = JSON.stringify(D, function(ue, Q) {
|
|
3552
3555
|
var ve = H(Q);
|
|
3553
3556
|
return ve === "symbol" ? String(Q) : Q;
|
|
3554
3557
|
});
|
|
3555
|
-
return new f("Invalid " + j + " `" +
|
|
3558
|
+
return new f("Invalid " + j + " `" + N + "` of value `" + String(L) + "` " + ("supplied to `" + A + "`, expected one of " + q + "."));
|
|
3556
3559
|
}
|
|
3557
3560
|
return v(X);
|
|
3558
3561
|
}
|
|
3559
|
-
function I(
|
|
3560
|
-
function X(V, F, A, j,
|
|
3561
|
-
if (typeof
|
|
3562
|
-
return new f("Property `" +
|
|
3562
|
+
function I(D) {
|
|
3563
|
+
function X(V, F, A, j, N) {
|
|
3564
|
+
if (typeof D != "function")
|
|
3565
|
+
return new f("Property `" + N + "` of component `" + A + "` has invalid PropType notation inside objectOf.");
|
|
3563
3566
|
var L = V[F], Z = U(L);
|
|
3564
3567
|
if (Z !== "object")
|
|
3565
|
-
return new f("Invalid " + j + " `" +
|
|
3568
|
+
return new f("Invalid " + j + " `" + N + "` of type " + ("`" + Z + "` supplied to `" + A + "`, expected an object."));
|
|
3566
3569
|
for (var q in L)
|
|
3567
3570
|
if (r(L, q)) {
|
|
3568
|
-
var ne =
|
|
3571
|
+
var ne = D(L, q, A, j, N + "." + q, n);
|
|
3569
3572
|
if (ne instanceof Error)
|
|
3570
3573
|
return ne;
|
|
3571
3574
|
}
|
|
@@ -3573,49 +3576,49 @@ function Vm() {
|
|
|
3573
3576
|
}
|
|
3574
3577
|
return v(X);
|
|
3575
3578
|
}
|
|
3576
|
-
function
|
|
3577
|
-
if (!Array.isArray(
|
|
3579
|
+
function P(D) {
|
|
3580
|
+
if (!Array.isArray(D))
|
|
3578
3581
|
return process.env.NODE_ENV !== "production" && a("Invalid argument supplied to oneOfType, expected an instance of array."), s;
|
|
3579
|
-
for (var X = 0; X <
|
|
3580
|
-
var V =
|
|
3582
|
+
for (var X = 0; X < D.length; X++) {
|
|
3583
|
+
var V = D[X];
|
|
3581
3584
|
if (typeof V != "function")
|
|
3582
3585
|
return a(
|
|
3583
3586
|
"Invalid argument supplied to oneOfType. Expected an array of check functions, but received " + ae(V) + " at index " + X + "."
|
|
3584
3587
|
), s;
|
|
3585
3588
|
}
|
|
3586
|
-
function F(A, j,
|
|
3587
|
-
for (var q = [], ne = 0; ne <
|
|
3588
|
-
var ue =
|
|
3589
|
+
function F(A, j, N, L, Z) {
|
|
3590
|
+
for (var q = [], ne = 0; ne < D.length; ne++) {
|
|
3591
|
+
var ue = D[ne], Q = ue(A, j, N, L, Z, n);
|
|
3589
3592
|
if (Q == null)
|
|
3590
3593
|
return null;
|
|
3591
3594
|
Q.data && r(Q.data, "expectedType") && q.push(Q.data.expectedType);
|
|
3592
3595
|
}
|
|
3593
3596
|
var ve = q.length > 0 ? ", expected one of type [" + q.join(", ") + "]" : "";
|
|
3594
|
-
return new f("Invalid " + L + " `" + Z + "` supplied to " + ("`" +
|
|
3597
|
+
return new f("Invalid " + L + " `" + Z + "` supplied to " + ("`" + N + "`" + ve + "."));
|
|
3595
3598
|
}
|
|
3596
3599
|
return v(F);
|
|
3597
3600
|
}
|
|
3598
3601
|
function z() {
|
|
3599
|
-
function
|
|
3602
|
+
function D(X, V, F, A, j) {
|
|
3600
3603
|
return O(X[V]) ? null : new f("Invalid " + A + " `" + j + "` supplied to " + ("`" + F + "`, expected a ReactNode."));
|
|
3601
3604
|
}
|
|
3602
|
-
return v(
|
|
3605
|
+
return v(D);
|
|
3603
3606
|
}
|
|
3604
|
-
function $(
|
|
3607
|
+
function $(D, X, V, F, A) {
|
|
3605
3608
|
return new f(
|
|
3606
|
-
(
|
|
3609
|
+
(D || "React class") + ": " + X + " type `" + V + "." + F + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + A + "`."
|
|
3607
3610
|
);
|
|
3608
3611
|
}
|
|
3609
|
-
function k(
|
|
3610
|
-
function X(V, F, A, j,
|
|
3612
|
+
function k(D) {
|
|
3613
|
+
function X(V, F, A, j, N) {
|
|
3611
3614
|
var L = V[F], Z = U(L);
|
|
3612
3615
|
if (Z !== "object")
|
|
3613
|
-
return new f("Invalid " + j + " `" +
|
|
3614
|
-
for (var q in
|
|
3615
|
-
var ne =
|
|
3616
|
+
return new f("Invalid " + j + " `" + N + "` of type `" + Z + "` " + ("supplied to `" + A + "`, expected `object`."));
|
|
3617
|
+
for (var q in D) {
|
|
3618
|
+
var ne = D[q];
|
|
3616
3619
|
if (typeof ne != "function")
|
|
3617
|
-
return $(A, j,
|
|
3618
|
-
var ue = ne(L, q, A, j,
|
|
3620
|
+
return $(A, j, N, q, H(ne));
|
|
3621
|
+
var ue = ne(L, q, A, j, N + "." + q, n);
|
|
3619
3622
|
if (ue)
|
|
3620
3623
|
return ue;
|
|
3621
3624
|
}
|
|
@@ -3623,22 +3626,22 @@ function Vm() {
|
|
|
3623
3626
|
}
|
|
3624
3627
|
return v(X);
|
|
3625
3628
|
}
|
|
3626
|
-
function E(
|
|
3627
|
-
function X(V, F, A, j,
|
|
3629
|
+
function E(D) {
|
|
3630
|
+
function X(V, F, A, j, N) {
|
|
3628
3631
|
var L = V[F], Z = U(L);
|
|
3629
3632
|
if (Z !== "object")
|
|
3630
|
-
return new f("Invalid " + j + " `" +
|
|
3631
|
-
var q = t({}, V[F],
|
|
3633
|
+
return new f("Invalid " + j + " `" + N + "` of type `" + Z + "` " + ("supplied to `" + A + "`, expected `object`."));
|
|
3634
|
+
var q = t({}, V[F], D);
|
|
3632
3635
|
for (var ne in q) {
|
|
3633
|
-
var ue =
|
|
3634
|
-
if (r(
|
|
3635
|
-
return $(A, j,
|
|
3636
|
+
var ue = D[ne];
|
|
3637
|
+
if (r(D, ne) && typeof ue != "function")
|
|
3638
|
+
return $(A, j, N, ne, H(ue));
|
|
3636
3639
|
if (!ue)
|
|
3637
3640
|
return new f(
|
|
3638
|
-
"Invalid " + j + " `" +
|
|
3639
|
-
Valid keys: ` + JSON.stringify(Object.keys(
|
|
3641
|
+
"Invalid " + j + " `" + N + "` key `" + ne + "` supplied to `" + A + "`.\nBad object: " + JSON.stringify(V[F], null, " ") + `
|
|
3642
|
+
Valid keys: ` + JSON.stringify(Object.keys(D), null, " ")
|
|
3640
3643
|
);
|
|
3641
|
-
var Q = ue(L, ne, A, j,
|
|
3644
|
+
var Q = ue(L, ne, A, j, N + "." + ne, n);
|
|
3642
3645
|
if (Q)
|
|
3643
3646
|
return Q;
|
|
3644
3647
|
}
|
|
@@ -3646,23 +3649,23 @@ Valid keys: ` + JSON.stringify(Object.keys(w), null, " ")
|
|
|
3646
3649
|
}
|
|
3647
3650
|
return v(X);
|
|
3648
3651
|
}
|
|
3649
|
-
function O(
|
|
3650
|
-
switch (typeof
|
|
3652
|
+
function O(D) {
|
|
3653
|
+
switch (typeof D) {
|
|
3651
3654
|
case "number":
|
|
3652
3655
|
case "string":
|
|
3653
3656
|
case "undefined":
|
|
3654
3657
|
return !0;
|
|
3655
3658
|
case "boolean":
|
|
3656
|
-
return !
|
|
3659
|
+
return !D;
|
|
3657
3660
|
case "object":
|
|
3658
|
-
if (Array.isArray(
|
|
3659
|
-
return
|
|
3660
|
-
if (
|
|
3661
|
+
if (Array.isArray(D))
|
|
3662
|
+
return D.every(O);
|
|
3663
|
+
if (D === null || o(D))
|
|
3661
3664
|
return !0;
|
|
3662
|
-
var X = h(
|
|
3665
|
+
var X = h(D);
|
|
3663
3666
|
if (X) {
|
|
3664
|
-
var V = X.call(
|
|
3665
|
-
if (X !==
|
|
3667
|
+
var V = X.call(D), F;
|
|
3668
|
+
if (X !== D.entries) {
|
|
3666
3669
|
for (; !(F = V.next()).done; )
|
|
3667
3670
|
if (!O(F.value))
|
|
3668
3671
|
return !1;
|
|
@@ -3679,27 +3682,27 @@ Valid keys: ` + JSON.stringify(Object.keys(w), null, " ")
|
|
|
3679
3682
|
return !1;
|
|
3680
3683
|
}
|
|
3681
3684
|
}
|
|
3682
|
-
function S(
|
|
3683
|
-
return
|
|
3685
|
+
function S(D, X) {
|
|
3686
|
+
return D === "symbol" ? !0 : X ? X["@@toStringTag"] === "Symbol" || typeof Symbol == "function" && X instanceof Symbol : !1;
|
|
3684
3687
|
}
|
|
3685
|
-
function U(
|
|
3686
|
-
var X = typeof
|
|
3687
|
-
return Array.isArray(
|
|
3688
|
+
function U(D) {
|
|
3689
|
+
var X = typeof D;
|
|
3690
|
+
return Array.isArray(D) ? "array" : D instanceof RegExp ? "object" : S(X, D) ? "symbol" : X;
|
|
3688
3691
|
}
|
|
3689
|
-
function H(
|
|
3690
|
-
if (typeof
|
|
3691
|
-
return "" +
|
|
3692
|
-
var X = U(
|
|
3692
|
+
function H(D) {
|
|
3693
|
+
if (typeof D > "u" || D === null)
|
|
3694
|
+
return "" + D;
|
|
3695
|
+
var X = U(D);
|
|
3693
3696
|
if (X === "object") {
|
|
3694
|
-
if (
|
|
3697
|
+
if (D instanceof Date)
|
|
3695
3698
|
return "date";
|
|
3696
|
-
if (
|
|
3699
|
+
if (D instanceof RegExp)
|
|
3697
3700
|
return "regexp";
|
|
3698
3701
|
}
|
|
3699
3702
|
return X;
|
|
3700
3703
|
}
|
|
3701
|
-
function ae(
|
|
3702
|
-
var X = H(
|
|
3704
|
+
function ae(D) {
|
|
3705
|
+
var X = H(D);
|
|
3703
3706
|
switch (X) {
|
|
3704
3707
|
case "array":
|
|
3705
3708
|
case "object":
|
|
@@ -3712,8 +3715,8 @@ Valid keys: ` + JSON.stringify(Object.keys(w), null, " ")
|
|
|
3712
3715
|
return X;
|
|
3713
3716
|
}
|
|
3714
3717
|
}
|
|
3715
|
-
function re(
|
|
3716
|
-
return !
|
|
3718
|
+
function re(D) {
|
|
3719
|
+
return !D.constructor || !D.constructor.name ? m : D.constructor.name;
|
|
3717
3720
|
}
|
|
3718
3721
|
return p.checkPropTypes = i, p.resetWarningCache = i.resetWarningCache, p.PropTypes = p, p;
|
|
3719
3722
|
}, Ba;
|
|
@@ -4150,12 +4153,12 @@ var Cu = {
|
|
|
4150
4153
|
return k;
|
|
4151
4154
|
}, m = function() {
|
|
4152
4155
|
if (s.containerGroups = s.containers.map(function(k) {
|
|
4153
|
-
var E = md(k, a.tabbableOptions), O = pd(k, a.tabbableOptions), S = E.length > 0 ? E[0] : void 0, U = E.length > 0 ? E[E.length - 1] : void 0, H = O.find(function(
|
|
4154
|
-
return Fn(
|
|
4155
|
-
}), ae = O.slice().reverse().find(function(
|
|
4156
|
-
return Fn(
|
|
4157
|
-
}), re = !!E.find(function(
|
|
4158
|
-
return yn(
|
|
4156
|
+
var E = md(k, a.tabbableOptions), O = pd(k, a.tabbableOptions), S = E.length > 0 ? E[0] : void 0, U = E.length > 0 ? E[E.length - 1] : void 0, H = O.find(function(D) {
|
|
4157
|
+
return Fn(D);
|
|
4158
|
+
}), ae = O.slice().reverse().find(function(D) {
|
|
4159
|
+
return Fn(D);
|
|
4160
|
+
}), re = !!E.find(function(D) {
|
|
4161
|
+
return yn(D) > 0;
|
|
4159
4162
|
});
|
|
4160
4163
|
return {
|
|
4161
4164
|
container: k,
|
|
@@ -4229,18 +4232,18 @@ var Cu = {
|
|
|
4229
4232
|
if (ae < 0)
|
|
4230
4233
|
U ? H = s.tabbableGroups[s.tabbableGroups.length - 1].lastTabbableNode : H = s.tabbableGroups[0].firstTabbableNode;
|
|
4231
4234
|
else if (U) {
|
|
4232
|
-
var
|
|
4233
|
-
var L =
|
|
4235
|
+
var D = _u(s.tabbableGroups, function(N) {
|
|
4236
|
+
var L = N.firstTabbableNode;
|
|
4234
4237
|
return E === L;
|
|
4235
4238
|
});
|
|
4236
|
-
if (
|
|
4237
|
-
var X =
|
|
4239
|
+
if (D < 0 && (re.container === E || Bi(E, a.tabbableOptions) && !Fn(E, a.tabbableOptions) && !re.nextTabbableNode(E, !1)) && (D = ae), D >= 0) {
|
|
4240
|
+
var X = D === 0 ? s.tabbableGroups.length - 1 : D - 1, V = s.tabbableGroups[X];
|
|
4238
4241
|
H = yn(E) >= 0 ? V.lastTabbableNode : V.lastDomTabbableNode;
|
|
4239
4242
|
} else
|
|
4240
4243
|
Or(O) || (H = re.nextTabbableNode(E, !1));
|
|
4241
4244
|
} else {
|
|
4242
|
-
var F = _u(s.tabbableGroups, function(
|
|
4243
|
-
var L =
|
|
4245
|
+
var F = _u(s.tabbableGroups, function(N) {
|
|
4246
|
+
var L = N.lastTabbableNode;
|
|
4244
4247
|
return E === L;
|
|
4245
4248
|
});
|
|
4246
4249
|
if (F < 0 && (re.container === E || Bi(E, a.tabbableOptions) && !Fn(E, a.tabbableOptions) && !re.nextTabbableNode(E)) && (F = ae), F >= 0) {
|
|
@@ -4280,14 +4283,14 @@ var Cu = {
|
|
|
4280
4283
|
if (yn(s.mostRecentlyFocusedNode) > 0) {
|
|
4281
4284
|
var H = u(s.mostRecentlyFocusedNode), ae = s.containerGroups[H].tabbableNodes;
|
|
4282
4285
|
if (ae.length > 0) {
|
|
4283
|
-
var re = ae.findIndex(function(
|
|
4284
|
-
return
|
|
4286
|
+
var re = ae.findIndex(function(D) {
|
|
4287
|
+
return D === s.mostRecentlyFocusedNode;
|
|
4285
4288
|
});
|
|
4286
4289
|
re >= 0 && (a.isKeyForward(s.recentNavEvent) ? re + 1 < ae.length && (S = ae[re + 1], U = !1) : re - 1 >= 0 && (S = ae[re - 1], U = !1));
|
|
4287
4290
|
}
|
|
4288
4291
|
} else
|
|
4289
|
-
s.containerGroups.some(function(
|
|
4290
|
-
return
|
|
4292
|
+
s.containerGroups.some(function(D) {
|
|
4293
|
+
return D.tabbableNodes.some(function(X) {
|
|
4291
4294
|
return yn(X) > 0;
|
|
4292
4295
|
});
|
|
4293
4296
|
}) || (U = !1);
|
|
@@ -4318,7 +4321,7 @@ var Cu = {
|
|
|
4318
4321
|
}, x = function(k) {
|
|
4319
4322
|
var E = ui(k);
|
|
4320
4323
|
u(E, k) >= 0 || Cr(a.clickOutsideDeactivates, k) || Cr(a.allowOutsideClick, k) || (k.preventDefault(), k.stopImmediatePropagation());
|
|
4321
|
-
},
|
|
4324
|
+
}, w = function() {
|
|
4322
4325
|
if (s.active)
|
|
4323
4326
|
return Cu.activateTrap(i, o), s.delayInitialFocusTimer = a.delayInitialFocus ? Eu(function() {
|
|
4324
4327
|
g(h());
|
|
@@ -4346,9 +4349,9 @@ var Cu = {
|
|
|
4346
4349
|
});
|
|
4347
4350
|
});
|
|
4348
4351
|
E && g(h());
|
|
4349
|
-
},
|
|
4350
|
-
|
|
4351
|
-
|
|
4352
|
+
}, P = typeof window < "u" && "MutationObserver" in window ? new MutationObserver(I) : void 0, z = function() {
|
|
4353
|
+
P && (P.disconnect(), s.active && !s.paused && s.containers.map(function(k) {
|
|
4354
|
+
P.observe(k, {
|
|
4352
4355
|
subtree: !0,
|
|
4353
4356
|
childList: !0
|
|
4354
4357
|
});
|
|
@@ -4367,7 +4370,7 @@ var Cu = {
|
|
|
4367
4370
|
var E = l(k, "onActivate"), O = l(k, "onPostActivate"), S = l(k, "checkCanFocusTrap");
|
|
4368
4371
|
S || m(), s.active = !0, s.paused = !1, s.nodeFocusedBeforeActivation = r.activeElement, E == null || E();
|
|
4369
4372
|
var U = function() {
|
|
4370
|
-
S && m(),
|
|
4373
|
+
S && m(), w(), z(), O == null || O();
|
|
4371
4374
|
};
|
|
4372
4375
|
return S ? (S(s.containers.concat()).then(U, U), this) : (U(), this);
|
|
4373
4376
|
},
|
|
@@ -4399,7 +4402,7 @@ var Cu = {
|
|
|
4399
4402
|
if (!s.paused || !s.active)
|
|
4400
4403
|
return this;
|
|
4401
4404
|
var E = l(k, "onUnpause"), O = l(k, "onPostUnpause");
|
|
4402
|
-
return s.paused = !1, E == null || E(), m(),
|
|
4405
|
+
return s.paused = !1, E == null || E(), m(), w(), z(), O == null || O(), this;
|
|
4403
4406
|
},
|
|
4404
4407
|
updateContainerElements: function(k) {
|
|
4405
4408
|
var E = [].concat(k).filter(Boolean);
|
|
@@ -4763,12 +4766,12 @@ const En = ({
|
|
|
4763
4766
|
className: d = "",
|
|
4764
4767
|
gtmContext: h = "Modal"
|
|
4765
4768
|
}) => {
|
|
4766
|
-
const m = ce(), { registerOverlay: p, unregisterOverlay: g } = Tm(), [f, v] = le(t), [b, C] = le(null), _ = ke(null), B = (
|
|
4767
|
-
f &&
|
|
4768
|
-
}, x = (
|
|
4769
|
-
C(
|
|
4770
|
-
},
|
|
4771
|
-
b === _.current &&
|
|
4769
|
+
const m = ce(), { registerOverlay: p, unregisterOverlay: g } = Tm(), [f, v] = le(t), [b, C] = le(null), _ = ke(null), B = (P) => {
|
|
4770
|
+
f && P.key === "Escape" && T(!1);
|
|
4771
|
+
}, x = (P) => {
|
|
4772
|
+
C(P.target);
|
|
4773
|
+
}, w = (P) => {
|
|
4774
|
+
b === _.current && P.target === _.current && T(!1), C(null);
|
|
4772
4775
|
};
|
|
4773
4776
|
de(() => {
|
|
4774
4777
|
if (f)
|
|
@@ -4776,16 +4779,16 @@ const En = ({
|
|
|
4776
4779
|
window.removeEventListener("keyup", B);
|
|
4777
4780
|
};
|
|
4778
4781
|
}, [f]), de(() => {
|
|
4779
|
-
const
|
|
4780
|
-
return
|
|
4781
|
-
|
|
4782
|
+
const P = _.current;
|
|
4783
|
+
return P && (P.addEventListener("mousedown", x), P.addEventListener("mouseup", w)), () => {
|
|
4784
|
+
P && (P.removeEventListener("mousedown", x), P.removeEventListener("mouseup", w));
|
|
4782
4785
|
};
|
|
4783
4786
|
}, [b]);
|
|
4784
|
-
const T = (
|
|
4785
|
-
if (v(
|
|
4787
|
+
const T = (P) => {
|
|
4788
|
+
if (v(P), P)
|
|
4786
4789
|
i(), p(e);
|
|
4787
4790
|
else {
|
|
4788
|
-
if (f ===
|
|
4791
|
+
if (f === P)
|
|
4789
4792
|
return;
|
|
4790
4793
|
a(), g(e);
|
|
4791
4794
|
}
|
|
@@ -5449,7 +5452,7 @@ const J_ = ({ tabs: e, className: t = "", preventLocationChange: n }) => {
|
|
|
5449
5452
|
if (B && !h(B))
|
|
5450
5453
|
return;
|
|
5451
5454
|
f = r(f, v, x);
|
|
5452
|
-
const
|
|
5455
|
+
const w = s === f, T = {};
|
|
5453
5456
|
C || (T["aria-controls"] = f, T.onClick = (I) => {
|
|
5454
5457
|
I.preventDefault(), I.stopPropagation(), o(f), !n && (window.location.hash = `#${f}`);
|
|
5455
5458
|
}, p.push(
|
|
@@ -5457,10 +5460,10 @@ const J_ = ({ tabs: e, className: t = "", preventLocationChange: n }) => {
|
|
|
5457
5460
|
"section",
|
|
5458
5461
|
{
|
|
5459
5462
|
id: f,
|
|
5460
|
-
hidden: !
|
|
5463
|
+
hidden: !w,
|
|
5461
5464
|
role: "tabpanel",
|
|
5462
5465
|
"aria-labelledby": `tab-${f}`,
|
|
5463
|
-
"aria-live":
|
|
5466
|
+
"aria-live": w ? "assertive" : "off",
|
|
5464
5467
|
children: typeof b == "string" ? /* @__PURE__ */ c.jsx("p", { children: b }) : b
|
|
5465
5468
|
},
|
|
5466
5469
|
`section-${f}`
|
|
@@ -5472,10 +5475,10 @@ const J_ = ({ tabs: e, className: t = "", preventLocationChange: n }) => {
|
|
|
5472
5475
|
href: C || `#${f}`,
|
|
5473
5476
|
id: `tab-${f}`,
|
|
5474
5477
|
"aria-controls": f,
|
|
5475
|
-
className: K({ selected:
|
|
5478
|
+
className: K({ selected: w }),
|
|
5476
5479
|
role: "tab",
|
|
5477
|
-
tabIndex:
|
|
5478
|
-
"aria-selected":
|
|
5480
|
+
tabIndex: w ? 0 : -1,
|
|
5481
|
+
"aria-selected": w,
|
|
5479
5482
|
onKeyDown: (I) => d(I, x),
|
|
5480
5483
|
...T,
|
|
5481
5484
|
children: v
|
|
@@ -5777,12 +5780,12 @@ const Zn = {
|
|
|
5777
5780
|
d && !g ? (async () => {
|
|
5778
5781
|
try {
|
|
5779
5782
|
const x = await o(d) || [];
|
|
5780
|
-
f((
|
|
5781
|
-
...
|
|
5783
|
+
f((w) => ({
|
|
5784
|
+
...w,
|
|
5782
5785
|
predictions: x
|
|
5783
5786
|
}));
|
|
5784
5787
|
} catch (x) {
|
|
5785
|
-
console.error("Error fetching predictions:", x), f((
|
|
5788
|
+
console.error("Error fetching predictions:", x), f((w) => ({ ...w, predictions: [] }));
|
|
5786
5789
|
}
|
|
5787
5790
|
})() : f((B) => ({ ...B, predictions: [] }));
|
|
5788
5791
|
}, [d, g]), de(() => {
|
|
@@ -5845,8 +5848,8 @@ const Zn = {
|
|
|
5845
5848
|
"li",
|
|
5846
5849
|
{
|
|
5847
5850
|
onClick: () => _(B),
|
|
5848
|
-
onMouseEnter: () => f((
|
|
5849
|
-
...
|
|
5851
|
+
onMouseEnter: () => f((w) => ({
|
|
5852
|
+
...w,
|
|
5850
5853
|
activePredictionIndex: x
|
|
5851
5854
|
})),
|
|
5852
5855
|
className: K("predictions-list-item", {
|
|
@@ -5924,13 +5927,13 @@ const Dd = ({
|
|
|
5924
5927
|
case "ArrowLeft":
|
|
5925
5928
|
case "ArrowRight":
|
|
5926
5929
|
C.stopPropagation(), C.preventDefault();
|
|
5927
|
-
const
|
|
5928
|
-
let T =
|
|
5930
|
+
const w = C.currentTarget;
|
|
5931
|
+
let T = w == null ? void 0 : w.nextElementSibling;
|
|
5929
5932
|
if (C.key === "ArrowLeft") {
|
|
5930
|
-
const I =
|
|
5931
|
-
I ? T = I : T = (_ =
|
|
5933
|
+
const I = w == null ? void 0 : w.previousElementSibling;
|
|
5934
|
+
I ? T = I : T = (_ = w == null ? void 0 : w.parentElement) == null ? void 0 : _.lastElementChild;
|
|
5932
5935
|
} else
|
|
5933
|
-
T || (T = (B =
|
|
5936
|
+
T || (T = (B = w == null ? void 0 : w.parentElement) == null ? void 0 : B.firstElementChild);
|
|
5934
5937
|
T && ((x = T == null ? void 0 : T.querySelector("label")) == null || x.focus());
|
|
5935
5938
|
break;
|
|
5936
5939
|
}
|
|
@@ -5976,12 +5979,12 @@ const ng = ({
|
|
|
5976
5979
|
const { onChange: C, onMultiSelectSubmit: _, ...B } = i, x = (T) => {
|
|
5977
5980
|
if (o) {
|
|
5978
5981
|
let I = [];
|
|
5979
|
-
f != null && f.includes(T.id) ? I = f.filter((
|
|
5982
|
+
f != null && f.includes(T.id) ? I = f.filter((P) => P !== T.id) : I = [...f, T.id], v([...I]), C && C([...I]);
|
|
5980
5983
|
} else
|
|
5981
5984
|
v([T]), C && C(T.id), m(!1);
|
|
5982
|
-
},
|
|
5985
|
+
}, w = (T) => {
|
|
5983
5986
|
if (T === "all") {
|
|
5984
|
-
const I = (t == null ? void 0 : t.map((
|
|
5987
|
+
const I = (t == null ? void 0 : t.map((P) => P.id)) || [];
|
|
5985
5988
|
v(I), C && C(I);
|
|
5986
5989
|
} else
|
|
5987
5990
|
v([]), C && C([]);
|
|
@@ -6011,7 +6014,7 @@ const ng = ({
|
|
|
6011
6014
|
defaultValue: b.id,
|
|
6012
6015
|
onChange: (T) => {
|
|
6013
6016
|
T.preventDefault(), T.stopPropagation();
|
|
6014
|
-
const I = t && t.find((
|
|
6017
|
+
const I = t && t.find((P) => P.id === T.target.value);
|
|
6015
6018
|
x(I);
|
|
6016
6019
|
},
|
|
6017
6020
|
hidden: !h,
|
|
@@ -6045,7 +6048,7 @@ const ng = ({
|
|
|
6045
6048
|
{
|
|
6046
6049
|
variant: "tertiary",
|
|
6047
6050
|
size: "small",
|
|
6048
|
-
onClick: () =>
|
|
6051
|
+
onClick: () => w("all"),
|
|
6049
6052
|
className: "gtm-trackable",
|
|
6050
6053
|
"data-gtm-event-type": "all-click",
|
|
6051
6054
|
"data-gtm-event-context": a,
|
|
@@ -6057,7 +6060,7 @@ const ng = ({
|
|
|
6057
6060
|
{
|
|
6058
6061
|
variant: "tertiary",
|
|
6059
6062
|
size: "small",
|
|
6060
|
-
onClick: () =>
|
|
6063
|
+
onClick: () => w("none"),
|
|
6061
6064
|
className: "gtm-trackable",
|
|
6062
6065
|
"data-gtm-event-type": "none-click",
|
|
6063
6066
|
"data-gtm-event-context": a,
|
|
@@ -6077,8 +6080,8 @@ const ng = ({
|
|
|
6077
6080
|
}),
|
|
6078
6081
|
"data-gtm-event-type": `${T.id}-click`,
|
|
6079
6082
|
"data-gtm-event-context": a,
|
|
6080
|
-
onClick: (
|
|
6081
|
-
|
|
6083
|
+
onClick: (P) => {
|
|
6084
|
+
P.preventDefault(), P.stopPropagation(), x(T);
|
|
6082
6085
|
},
|
|
6083
6086
|
role: "menuitem",
|
|
6084
6087
|
"aria-current": I,
|
|
@@ -6146,13 +6149,13 @@ const Fu = ({
|
|
|
6146
6149
|
const B = `${r}_${v}`, x = () => {
|
|
6147
6150
|
if (_)
|
|
6148
6151
|
return;
|
|
6149
|
-
let
|
|
6152
|
+
let w;
|
|
6150
6153
|
if (a) {
|
|
6151
6154
|
const T = g == null ? void 0 : g.indexOf(C);
|
|
6152
|
-
Array.isArray(g) && T >= 0 ? (
|
|
6155
|
+
Array.isArray(g) && T >= 0 ? (w = g, w.splice(T, 1)) : (!g || g.length === 0 ? w = [] : w = g, w.push(C));
|
|
6153
6156
|
} else
|
|
6154
|
-
|
|
6155
|
-
t.onChange(
|
|
6157
|
+
w = f === C ? void 0 : C;
|
|
6158
|
+
t.onChange(w);
|
|
6156
6159
|
};
|
|
6157
6160
|
return /* @__PURE__ */ c.jsx(
|
|
6158
6161
|
Dd,
|
|
@@ -6260,12 +6263,12 @@ const Yn = {
|
|
|
6260
6263
|
functions: Sn(i),
|
|
6261
6264
|
value: u
|
|
6262
6265
|
};
|
|
6263
|
-
const
|
|
6266
|
+
const w = ($) => {
|
|
6264
6267
|
x["aria-describedby"] ? x["aria-describedby"] += ` ${$}` : x["aria-describedby"] = $;
|
|
6265
6268
|
};
|
|
6266
6269
|
if (a > 0) {
|
|
6267
6270
|
const $ = Qp(a, i.onChange);
|
|
6268
|
-
|
|
6271
|
+
w(`${_}-info`), x = {
|
|
6269
6272
|
...x,
|
|
6270
6273
|
...$
|
|
6271
6274
|
}, $.functions && typeof $.functions == "object" && (x.functions = {
|
|
@@ -6273,7 +6276,7 @@ const Yn = {
|
|
|
6273
6276
|
...$.functions
|
|
6274
6277
|
});
|
|
6275
6278
|
}
|
|
6276
|
-
o && Yn[o] && Yn[o].props && (x = { ...x, ...Yn[o].props }), v && (x.intlPath = `${t}_${e}`), r && (x["aria-invalid"] = !0, x["aria-errormessage"] = C,
|
|
6279
|
+
o && Yn[o] && Yn[o].props && (x = { ...x, ...Yn[o].props }), v && (x.intlPath = `${t}_${e}`), r && (x["aria-invalid"] = !0, x["aria-errormessage"] = C, w(C));
|
|
6277
6280
|
const T = h.label || m.formatMessage({ id: t ? `${t}_${e}` : e }), I = ({ ...$ }) => r ? te.createElement(
|
|
6278
6281
|
$.as || "p",
|
|
6279
6282
|
{
|
|
@@ -6295,8 +6298,8 @@ const Yn = {
|
|
|
6295
6298
|
),
|
|
6296
6299
|
/* @__PURE__ */ c.jsx(I, { as: "p" })
|
|
6297
6300
|
] });
|
|
6298
|
-
const
|
|
6299
|
-
v || (
|
|
6301
|
+
const P = {};
|
|
6302
|
+
v || (P.className = "field-label");
|
|
6300
6303
|
const z = ($) => te.createElement($.element || "label", {
|
|
6301
6304
|
...$,
|
|
6302
6305
|
className: "checkboxes-label text-small",
|
|
@@ -6308,7 +6311,7 @@ const Yn = {
|
|
|
6308
6311
|
/* @__PURE__ */ c.jsxs(c.Fragment, { children: [
|
|
6309
6312
|
te.createElement(
|
|
6310
6313
|
v ? te.Fragment : "p",
|
|
6311
|
-
|
|
6314
|
+
P,
|
|
6312
6315
|
/* @__PURE__ */ c.jsxs(z, { ...B, children: [
|
|
6313
6316
|
T,
|
|
6314
6317
|
p && s && /* @__PURE__ */ c.jsxs(c.Fragment, { children: [
|
|
@@ -6461,13 +6464,13 @@ const dn = ({
|
|
|
6461
6464
|
showRequiredLabels: B = !0,
|
|
6462
6465
|
showSuccessMessage: x = !1
|
|
6463
6466
|
} = l || {}, {
|
|
6464
|
-
onSuccess:
|
|
6467
|
+
onSuccess: w = async () => {
|
|
6465
6468
|
},
|
|
6466
6469
|
onCancel: T = () => {
|
|
6467
6470
|
},
|
|
6468
6471
|
onCatch: I = () => {
|
|
6469
6472
|
},
|
|
6470
|
-
onFailure:
|
|
6473
|
+
onFailure: P = () => {
|
|
6471
6474
|
}
|
|
6472
6475
|
} = h || {}, z = ce(), $ = {};
|
|
6473
6476
|
t.length && t.forEach((A) => {
|
|
@@ -6509,9 +6512,9 @@ const dn = ({
|
|
|
6509
6512
|
const ae = ke(null), re = i || ae;
|
|
6510
6513
|
if (!t.length)
|
|
6511
6514
|
return null;
|
|
6512
|
-
const
|
|
6513
|
-
s.children && (
|
|
6514
|
-
f.text && typeof f.text != "string" && A in f.text ?
|
|
6515
|
+
const D = {};
|
|
6516
|
+
s.children && (D.default = s.children), f.text && typeof f.text == "string" && (D.default = f.text), ["default", "submitting", "submitted"].forEach((A) => {
|
|
6517
|
+
f.text && typeof f.text != "string" && A in f.text ? D[A] = f.text[A] : D[A] || (D[A] = z.formatMessage({
|
|
6515
6518
|
id: `form_${A === "default" ? "submit" : A}`
|
|
6516
6519
|
}));
|
|
6517
6520
|
}), delete f.text;
|
|
@@ -6538,7 +6541,7 @@ const dn = ({
|
|
|
6538
6541
|
dispatch: E,
|
|
6539
6542
|
onSuccess: async (A) => {
|
|
6540
6543
|
try {
|
|
6541
|
-
await
|
|
6544
|
+
await w(A), E({ type: C ? "formSubmittedAndReset" : "formSubmitted" });
|
|
6542
6545
|
} catch (j) {
|
|
6543
6546
|
I(j), E({
|
|
6544
6547
|
type: "updateValue",
|
|
@@ -6547,7 +6550,7 @@ const dn = ({
|
|
|
6547
6550
|
}
|
|
6548
6551
|
},
|
|
6549
6552
|
onFailure: (A, j) => {
|
|
6550
|
-
|
|
6553
|
+
P(A, j), E({
|
|
6551
6554
|
type: "updateValue",
|
|
6552
6555
|
payload: { key: "isSubmitting", value: !1 }
|
|
6553
6556
|
});
|
|
@@ -6565,8 +6568,8 @@ const dn = ({
|
|
|
6565
6568
|
const Z = document.getElementById(re.current.id);
|
|
6566
6569
|
Z && (j = Z.getBoundingClientRect().top + window.scrollY);
|
|
6567
6570
|
}
|
|
6568
|
-
const
|
|
6569
|
-
|
|
6571
|
+
const N = document.getElementById("header");
|
|
6572
|
+
N && (j = j - N.offsetHeight - v), j < 0 && (j = 0), window.scrollTo({ top: j, behavior: "smooth" }), X();
|
|
6570
6573
|
}, F = [
|
|
6571
6574
|
{
|
|
6572
6575
|
...f,
|
|
@@ -6576,7 +6579,7 @@ const dn = ({
|
|
|
6576
6579
|
disabled: S || U || s.disabled,
|
|
6577
6580
|
"data-gtm-event-context": d.context,
|
|
6578
6581
|
"data-gtm-event-type": d.event,
|
|
6579
|
-
children:
|
|
6582
|
+
children: D[S ? "submitting" : U ? "submitted" : "default"]
|
|
6580
6583
|
}
|
|
6581
6584
|
];
|
|
6582
6585
|
return b && F.unshift({
|
|
@@ -6607,18 +6610,18 @@ const dn = ({
|
|
|
6607
6610
|
u,
|
|
6608
6611
|
(!_ || !S && !U || p) && t.map((A, j) => {
|
|
6609
6612
|
const {
|
|
6610
|
-
id:
|
|
6613
|
+
id: N = A.name || j,
|
|
6611
6614
|
component: L,
|
|
6612
6615
|
functions: Z = { onChange: () => {
|
|
6613
6616
|
} },
|
|
6614
6617
|
submitOnEnter: q = !1
|
|
6615
6618
|
} = A;
|
|
6616
6619
|
if (L)
|
|
6617
|
-
return /* @__PURE__ */ c.jsx(L, { ...A.props || {} }, `component-${
|
|
6618
|
-
const ne = (H == null ? void 0 : H[
|
|
6620
|
+
return /* @__PURE__ */ c.jsx(L, { ...A.props || {} }, `component-${N}-${j}`);
|
|
6621
|
+
const ne = (H == null ? void 0 : H[N]) || "", ue = {
|
|
6619
6622
|
...Z,
|
|
6620
6623
|
onChange: (Q) => {
|
|
6621
|
-
E({ type: "updateValue", payload: { key:
|
|
6624
|
+
E({ type: "updateValue", payload: { key: N, value: Q } }), Z.onChange(Q && Q.toString(), E);
|
|
6622
6625
|
}
|
|
6623
6626
|
};
|
|
6624
6627
|
return q && (ue.onKeyDown = (Q) => {
|
|
@@ -6630,10 +6633,10 @@ const dn = ({
|
|
|
6630
6633
|
...A,
|
|
6631
6634
|
showRequiredLabels: B,
|
|
6632
6635
|
value: ne,
|
|
6633
|
-
error: O == null ? void 0 : O[
|
|
6636
|
+
error: O == null ? void 0 : O[N],
|
|
6634
6637
|
functions: ue
|
|
6635
6638
|
},
|
|
6636
|
-
|
|
6639
|
+
N
|
|
6637
6640
|
);
|
|
6638
6641
|
}),
|
|
6639
6642
|
g ? null : (S || U) && p ? p : /* @__PURE__ */ c.jsx(
|
|
@@ -6908,29 +6911,29 @@ function hv(e, t, n) {
|
|
|
6908
6911
|
if (typeof e != "function")
|
|
6909
6912
|
throw new TypeError(cv);
|
|
6910
6913
|
t = Ou(t) || 0, lv(n) && (d = !!n.leading, h = "maxWait" in n, a = h ? dv(Ou(n.maxWait) || 0, t) : a, m = "trailing" in n ? !!n.trailing : m);
|
|
6911
|
-
function p(
|
|
6914
|
+
function p(w) {
|
|
6912
6915
|
var T = r, I = i;
|
|
6913
|
-
return r = i = void 0, u =
|
|
6916
|
+
return r = i = void 0, u = w, s = e.apply(I, T), s;
|
|
6914
6917
|
}
|
|
6915
|
-
function g(
|
|
6916
|
-
return u =
|
|
6918
|
+
function g(w) {
|
|
6919
|
+
return u = w, o = setTimeout(b, t), d ? p(w) : s;
|
|
6917
6920
|
}
|
|
6918
|
-
function f(
|
|
6919
|
-
var T =
|
|
6920
|
-
return h ? fv(
|
|
6921
|
+
function f(w) {
|
|
6922
|
+
var T = w - l, I = w - u, P = t - T;
|
|
6923
|
+
return h ? fv(P, a - I) : P;
|
|
6921
6924
|
}
|
|
6922
|
-
function v(
|
|
6923
|
-
var T =
|
|
6925
|
+
function v(w) {
|
|
6926
|
+
var T = w - l, I = w - u;
|
|
6924
6927
|
return l === void 0 || T >= t || T < 0 || h && I >= a;
|
|
6925
6928
|
}
|
|
6926
6929
|
function b() {
|
|
6927
|
-
var
|
|
6928
|
-
if (v(
|
|
6929
|
-
return C(
|
|
6930
|
-
o = setTimeout(b, f(
|
|
6930
|
+
var w = Pa();
|
|
6931
|
+
if (v(w))
|
|
6932
|
+
return C(w);
|
|
6933
|
+
o = setTimeout(b, f(w));
|
|
6931
6934
|
}
|
|
6932
|
-
function C(
|
|
6933
|
-
return o = void 0, m && r ? p(
|
|
6935
|
+
function C(w) {
|
|
6936
|
+
return o = void 0, m && r ? p(w) : (r = i = void 0, s);
|
|
6934
6937
|
}
|
|
6935
6938
|
function _() {
|
|
6936
6939
|
o !== void 0 && clearTimeout(o), u = 0, r = l = i = o = void 0;
|
|
@@ -6939,8 +6942,8 @@ function hv(e, t, n) {
|
|
|
6939
6942
|
return o === void 0 ? s : C(Pa());
|
|
6940
6943
|
}
|
|
6941
6944
|
function x() {
|
|
6942
|
-
var
|
|
6943
|
-
if (r = arguments, i = this, l =
|
|
6945
|
+
var w = Pa(), T = v(w);
|
|
6946
|
+
if (r = arguments, i = this, l = w, T) {
|
|
6944
6947
|
if (o === void 0)
|
|
6945
6948
|
return g(l);
|
|
6946
6949
|
if (h)
|
|
@@ -7000,23 +7003,23 @@ const xv = /* @__PURE__ */ In(yv), Pu = (e) => typeof e == "object" && e != null
|
|
|
7000
7003
|
}
|
|
7001
7004
|
g != null && g === document.body && Na(g) && !Na(document.documentElement) || g != null && Na(g, d) && p.push(g);
|
|
7002
7005
|
}
|
|
7003
|
-
const f = (r = (n = window.visualViewport) == null ? void 0 : n.width) != null ? r : innerWidth, v = (a = (i = window.visualViewport) == null ? void 0 : i.height) != null ? a : innerHeight, { scrollX: b, scrollY: C } = window, { height: _, width: B, top: x, right:
|
|
7006
|
+
const f = (r = (n = window.visualViewport) == null ? void 0 : n.width) != null ? r : innerWidth, v = (a = (i = window.visualViewport) == null ? void 0 : i.height) != null ? a : innerHeight, { scrollX: b, scrollY: C } = window, { height: _, width: B, top: x, right: w, bottom: T, left: I } = e.getBoundingClientRect(), { top: P, right: z, bottom: $, left: k } = ((U) => {
|
|
7004
7007
|
const H = window.getComputedStyle(U);
|
|
7005
7008
|
return { top: parseFloat(H.scrollMarginTop) || 0, right: parseFloat(H.scrollMarginRight) || 0, bottom: parseFloat(H.scrollMarginBottom) || 0, left: parseFloat(H.scrollMarginLeft) || 0 };
|
|
7006
7009
|
})(e);
|
|
7007
|
-
let E = o === "start" || o === "nearest" ? x -
|
|
7010
|
+
let E = o === "start" || o === "nearest" ? x - P : o === "end" ? T + $ : x + _ / 2 - P + $, O = l === "center" ? I + B / 2 - k + z : l === "end" ? w + z : I - k;
|
|
7008
7011
|
const S = [];
|
|
7009
7012
|
for (let U = 0; U < p.length; U++) {
|
|
7010
|
-
const H = p[U], { height: ae, width: re, top:
|
|
7011
|
-
if (s === "if-needed" && x >= 0 && I >= 0 && T <= v &&
|
|
7013
|
+
const H = p[U], { height: ae, width: re, top: D, right: X, bottom: V, left: F } = H.getBoundingClientRect();
|
|
7014
|
+
if (s === "if-needed" && x >= 0 && I >= 0 && T <= v && w <= f && x >= D && T <= V && I >= F && w <= X)
|
|
7012
7015
|
return S;
|
|
7013
|
-
const A = getComputedStyle(H), j = parseInt(A.borderLeftWidth, 10),
|
|
7016
|
+
const A = getComputedStyle(H), j = parseInt(A.borderLeftWidth, 10), N = parseInt(A.borderTopWidth, 10), L = parseInt(A.borderRightWidth, 10), Z = parseInt(A.borderBottomWidth, 10);
|
|
7014
7017
|
let q = 0, ne = 0;
|
|
7015
|
-
const ue = "offsetWidth" in H ? H.offsetWidth - H.clientWidth - j - L : 0, Q = "offsetHeight" in H ? H.offsetHeight - H.clientHeight -
|
|
7018
|
+
const ue = "offsetWidth" in H ? H.offsetWidth - H.clientWidth - j - L : 0, Q = "offsetHeight" in H ? H.offsetHeight - H.clientHeight - N - Z : 0, ve = "offsetWidth" in H ? H.offsetWidth === 0 ? 0 : re / H.offsetWidth : 0, ge = "offsetHeight" in H ? H.offsetHeight === 0 ? 0 : ae / H.offsetHeight : 0;
|
|
7016
7019
|
if (m === H)
|
|
7017
|
-
q = o === "start" ? E : o === "end" ? E - v : o === "nearest" ? mi(C, C + v, v,
|
|
7020
|
+
q = o === "start" ? E : o === "end" ? E - v : o === "nearest" ? mi(C, C + v, v, N, Z, C + E, C + E + _, _) : E - v / 2, ne = l === "start" ? O : l === "center" ? O - f / 2 : l === "end" ? O - f : mi(b, b + f, f, j, L, b + O, b + O + B, B), q = Math.max(0, q + C), ne = Math.max(0, ne + b);
|
|
7018
7021
|
else {
|
|
7019
|
-
q = o === "start" ? E -
|
|
7022
|
+
q = o === "start" ? E - D - N : o === "end" ? E - V + Z + Q : o === "nearest" ? mi(D, V, ae, N, Z + Q, E, E + _, _) : E - (D + ae / 2) + Q / 2, ne = l === "start" ? O - F - j : l === "center" ? O - (F + re / 2) + ue / 2 : l === "end" ? O - X + L + ue : mi(F, X, re, j, L + ue, O, O + B, B);
|
|
7020
7023
|
const { scrollLeft: Te, scrollTop: je } = H;
|
|
7021
7024
|
q = ge === 0 ? 0 : Math.max(0, Math.min(je + q / ge, H.scrollHeight - ae / ge + Q)), ne = ve === 0 ? 0 : Math.max(0, Math.min(Te + ne / ve, H.scrollWidth - re / ve + ue)), E += je - q, O += Te - ne;
|
|
7022
7025
|
}
|
|
@@ -7826,28 +7829,28 @@ var Lv = (e, t, n) => {
|
|
|
7826
7829
|
case "merge_node": {
|
|
7827
7830
|
var {
|
|
7828
7831
|
path: b
|
|
7829
|
-
} = n, C = oe.get(e, b), _ = R.previous(b), B = oe.get(e, _), x = oe.parent(e, b),
|
|
7832
|
+
} = n, C = oe.get(e, b), _ = R.previous(b), B = oe.get(e, _), x = oe.parent(e, b), w = b[b.length - 1];
|
|
7830
7833
|
if (me.isText(C) && me.isText(B))
|
|
7831
7834
|
B.text += C.text;
|
|
7832
7835
|
else if (!me.isText(C) && !me.isText(B))
|
|
7833
7836
|
B.children.push(...C.children);
|
|
7834
7837
|
else
|
|
7835
7838
|
throw new Error('Cannot apply a "merge_node" operation at path ['.concat(b, "] to nodes of different interfaces: ").concat(ot.stringify(C), " ").concat(ot.stringify(B)));
|
|
7836
|
-
if (x.children.splice(
|
|
7839
|
+
if (x.children.splice(w, 1), t)
|
|
7837
7840
|
for (var [T, I] of G.points(t))
|
|
7838
7841
|
t[I] = Ae.transform(T, n);
|
|
7839
7842
|
break;
|
|
7840
7843
|
}
|
|
7841
7844
|
case "move_node": {
|
|
7842
7845
|
var {
|
|
7843
|
-
path:
|
|
7846
|
+
path: P,
|
|
7844
7847
|
newPath: z
|
|
7845
7848
|
} = n;
|
|
7846
|
-
if (R.isAncestor(
|
|
7847
|
-
throw new Error("Cannot move a path [".concat(
|
|
7848
|
-
var $ = oe.get(e,
|
|
7849
|
+
if (R.isAncestor(P, z))
|
|
7850
|
+
throw new Error("Cannot move a path [".concat(P, "] to new path [").concat(z, "] because the destination is inside itself."));
|
|
7851
|
+
var $ = oe.get(e, P), k = oe.parent(e, P), E = P[P.length - 1];
|
|
7849
7852
|
k.children.splice(E, 1);
|
|
7850
|
-
var O = R.transform(
|
|
7853
|
+
var O = R.transform(P, n), S = oe.get(e, R.parent(O)), U = O[O.length - 1];
|
|
7851
7854
|
if (S.children.splice(U, 0, $), t)
|
|
7852
7855
|
for (var [H, ae] of G.points(t))
|
|
7853
7856
|
t[ae] = Ae.transform(H, n);
|
|
@@ -7856,23 +7859,23 @@ var Lv = (e, t, n) => {
|
|
|
7856
7859
|
case "remove_node": {
|
|
7857
7860
|
var {
|
|
7858
7861
|
path: re
|
|
7859
|
-
} = n,
|
|
7860
|
-
if (X.children.splice(
|
|
7862
|
+
} = n, D = re[re.length - 1], X = oe.parent(e, re);
|
|
7863
|
+
if (X.children.splice(D, 1), t)
|
|
7861
7864
|
for (var [V, F] of G.points(t)) {
|
|
7862
7865
|
var A = Ae.transform(V, n);
|
|
7863
7866
|
if (t != null && A != null)
|
|
7864
7867
|
t[F] = A;
|
|
7865
7868
|
else {
|
|
7866
|
-
var j = void 0,
|
|
7869
|
+
var j = void 0, N = void 0;
|
|
7867
7870
|
for (var [L, Z] of oe.texts(e))
|
|
7868
7871
|
if (R.compare(Z, re) === -1)
|
|
7869
7872
|
j = [L, Z];
|
|
7870
7873
|
else {
|
|
7871
|
-
|
|
7874
|
+
N = [L, Z];
|
|
7872
7875
|
break;
|
|
7873
7876
|
}
|
|
7874
7877
|
var q = !1;
|
|
7875
|
-
j &&
|
|
7878
|
+
j && N && (R.equals(N[1], re) ? q = !R.hasPrevious(N[1]) : q = R.common(j[1], re).length < R.common(N[1], re).length), j && !q ? (V.path = j[1], V.offset = j[0].text.length) : N ? (V.path = N[1], V.offset = 0) : t = null;
|
|
7876
7879
|
}
|
|
7877
7880
|
}
|
|
7878
7881
|
break;
|
|
@@ -9177,14 +9180,14 @@ var _0 = (e, t) => {
|
|
|
9177
9180
|
case "remove_node": {
|
|
9178
9181
|
var {
|
|
9179
9182
|
path: x
|
|
9180
|
-
} = t,
|
|
9181
|
-
return [...
|
|
9183
|
+
} = t, w = R.ancestors(x);
|
|
9184
|
+
return [...w];
|
|
9182
9185
|
}
|
|
9183
9186
|
case "split_node": {
|
|
9184
9187
|
var {
|
|
9185
9188
|
path: T
|
|
9186
|
-
} = t, I = R.levels(T),
|
|
9187
|
-
return [...I,
|
|
9189
|
+
} = t, I = R.levels(T), P = R.next(T);
|
|
9190
|
+
return [...I, P];
|
|
9188
9191
|
}
|
|
9189
9192
|
default:
|
|
9190
9193
|
return [];
|
|
@@ -9923,8 +9926,8 @@ function Db(e) {
|
|
|
9923
9926
|
}
|
|
9924
9927
|
}
|
|
9925
9928
|
}
|
|
9926
|
-
function x(
|
|
9927
|
-
return T === "character" ? vo(
|
|
9929
|
+
function x(w, T, I) {
|
|
9930
|
+
return T === "character" ? vo(w, I) : T === "word" ? n0(w, I) : T === "line" || T === "block" ? w.length : 1;
|
|
9928
9931
|
}
|
|
9929
9932
|
}();
|
|
9930
9933
|
}
|
|
@@ -10153,13 +10156,13 @@ var Fb = (e, t) => {
|
|
|
10153
10156
|
match: (ge) => he.isElement(ge) && y.isBlock(t, ge),
|
|
10154
10157
|
at: _,
|
|
10155
10158
|
voids: l
|
|
10156
|
-
}),
|
|
10159
|
+
}), w = B && x && !R.equals(B[1], x[1]), T = R.equals(C.path, _.path), I = l ? null : (r = y.void(t, {
|
|
10157
10160
|
at: C,
|
|
10158
10161
|
mode: "highest"
|
|
10159
10162
|
})) !== null && r !== void 0 ? r : y.elementReadOnly(t, {
|
|
10160
10163
|
at: C,
|
|
10161
10164
|
mode: "highest"
|
|
10162
|
-
}),
|
|
10165
|
+
}), P = l ? null : (i = y.void(t, {
|
|
10163
10166
|
at: _,
|
|
10164
10167
|
mode: "highest"
|
|
10165
10168
|
})) !== null && i !== void 0 ? i : y.elementReadOnly(t, {
|
|
@@ -10170,7 +10173,7 @@ var Fb = (e, t) => {
|
|
|
10170
10173
|
var z = y.before(t, C);
|
|
10171
10174
|
z && B && R.isAncestor(B[1], z.path) && (C = z);
|
|
10172
10175
|
}
|
|
10173
|
-
if (
|
|
10176
|
+
if (P) {
|
|
10174
10177
|
var $ = y.after(t, _);
|
|
10175
10178
|
$ && x && R.isAncestor(x[1], $.path) && (_ = $);
|
|
10176
10179
|
}
|
|
@@ -10185,7 +10188,7 @@ var Fb = (e, t) => {
|
|
|
10185
10188
|
var H = Array.from(k, (ge) => {
|
|
10186
10189
|
var [, Te] = ge;
|
|
10187
10190
|
return y.pathRef(t, Te);
|
|
10188
|
-
}), ae = y.pointRef(t, C), re = y.pointRef(t, _),
|
|
10191
|
+
}), ae = y.pointRef(t, C), re = y.pointRef(t, _), D = "";
|
|
10189
10192
|
if (!T && !I) {
|
|
10190
10193
|
var X = ae.current, [V] = y.leaf(t, X), {
|
|
10191
10194
|
path: F
|
|
@@ -10197,27 +10200,27 @@ var Fb = (e, t) => {
|
|
|
10197
10200
|
path: F,
|
|
10198
10201
|
offset: A,
|
|
10199
10202
|
text: j
|
|
10200
|
-
}),
|
|
10203
|
+
}), D = j);
|
|
10201
10204
|
}
|
|
10202
10205
|
if (H.reverse().map((ge) => ge.unref()).filter((ge) => ge !== null).forEach((ge) => J.removeNodes(t, {
|
|
10203
10206
|
at: ge,
|
|
10204
10207
|
voids: l
|
|
10205
|
-
})), !
|
|
10206
|
-
var
|
|
10208
|
+
})), !P) {
|
|
10209
|
+
var N = re.current, [L] = y.leaf(t, N), {
|
|
10207
10210
|
path: Z
|
|
10208
|
-
} =
|
|
10211
|
+
} = N, q = T ? C.offset : 0, ne = L.text.slice(q, _.offset);
|
|
10209
10212
|
ne.length > 0 && (t.apply({
|
|
10210
10213
|
type: "remove_text",
|
|
10211
10214
|
path: Z,
|
|
10212
10215
|
offset: q,
|
|
10213
10216
|
text: ne
|
|
10214
|
-
}),
|
|
10217
|
+
}), D = ne);
|
|
10215
10218
|
}
|
|
10216
|
-
!T &&
|
|
10219
|
+
!T && w && re.current && ae.current && J.mergeNodes(t, {
|
|
10217
10220
|
at: re.current,
|
|
10218
10221
|
hanging: !0,
|
|
10219
10222
|
voids: l
|
|
10220
|
-
}), h && a && s === "character" &&
|
|
10223
|
+
}), h && a && s === "character" && D.length > 1 && D.match(/[\u0E00-\u0E7F]+/) && J.insertText(t, D.slice(0, D.length - o));
|
|
10221
10224
|
var ue = ae.unref(), Q = re.unref(), ve = a ? ue || Q : Q || ue;
|
|
10222
10225
|
n.at == null && ve && J.select(t, ve);
|
|
10223
10226
|
}
|
|
@@ -10277,18 +10280,18 @@ var Fb = (e, t) => {
|
|
|
10277
10280
|
voids: a
|
|
10278
10281
|
}), [, f] = g, v = y.isStart(t, s, f), b = y.isEnd(t, s, f), C = v && b, _ = !v || v && b, B = !b, [, x] = oe.first({
|
|
10279
10282
|
children: n
|
|
10280
|
-
}, []), [,
|
|
10283
|
+
}, []), [, w] = oe.last({
|
|
10281
10284
|
children: n
|
|
10282
10285
|
}, []), T = [], I = (j) => {
|
|
10283
|
-
var [
|
|
10284
|
-
return Z ? !1 : C ? !0 : !(_ && R.isAncestor(L, x) && he.isElement(
|
|
10286
|
+
var [N, L] = j, Z = L.length === 0;
|
|
10287
|
+
return Z ? !1 : C ? !0 : !(_ && R.isAncestor(L, x) && he.isElement(N) && !t.isVoid(N) && !t.isInline(N) || B && R.isAncestor(L, w) && he.isElement(N) && !t.isVoid(N) && !t.isInline(N));
|
|
10285
10288
|
};
|
|
10286
|
-
for (var
|
|
10289
|
+
for (var P of oe.nodes({
|
|
10287
10290
|
children: n
|
|
10288
10291
|
}, {
|
|
10289
10292
|
pass: I
|
|
10290
10293
|
}))
|
|
10291
|
-
I(
|
|
10294
|
+
I(P) && T.push(P);
|
|
10292
10295
|
var z = [], $ = [], k = [], E = !0, O = !1;
|
|
10293
10296
|
for (var [S] of T)
|
|
10294
10297
|
he.isElement(S) && !t.isInline(S) ? (E = !1, O = !0, $.push(S)) : E ? z.push(S) : k.push(S);
|
|
@@ -10297,7 +10300,7 @@ var Fb = (e, t) => {
|
|
|
10297
10300
|
match: (j) => me.isText(j) || y.isInline(t, j),
|
|
10298
10301
|
mode: "highest",
|
|
10299
10302
|
voids: a
|
|
10300
|
-
}), [, H] = U, ae = y.isStart(t, s, H), re = y.isEnd(t, s, H),
|
|
10303
|
+
}), [, H] = U, ae = y.isStart(t, s, H), re = y.isEnd(t, s, H), D = y.pathRef(t, b && !k.length ? R.next(f) : f), X = y.pathRef(t, re ? R.next(H) : H);
|
|
10301
10304
|
J.splitNodes(t, {
|
|
10302
10305
|
at: s,
|
|
10303
10306
|
match: (j) => O ? he.isElement(j) && y.isBlock(t, j) : me.isText(j) || y.isInline(t, j),
|
|
@@ -10316,7 +10319,7 @@ var Fb = (e, t) => {
|
|
|
10316
10319
|
at: f,
|
|
10317
10320
|
voids: a
|
|
10318
10321
|
}), J.insertNodes(t, $, {
|
|
10319
|
-
at:
|
|
10322
|
+
at: D.current,
|
|
10320
10323
|
match: (j) => he.isElement(j) && y.isBlock(t, j),
|
|
10321
10324
|
mode: "lowest",
|
|
10322
10325
|
voids: a,
|
|
@@ -10329,12 +10332,12 @@ var Fb = (e, t) => {
|
|
|
10329
10332
|
batchDirty: o
|
|
10330
10333
|
}), !r.at) {
|
|
10331
10334
|
var F;
|
|
10332
|
-
if (k.length > 0 && X.current ? F = R.previous(X.current) : $.length > 0 &&
|
|
10335
|
+
if (k.length > 0 && X.current ? F = R.previous(X.current) : $.length > 0 && D.current ? F = R.previous(D.current) : V.current && (F = R.previous(V.current)), F) {
|
|
10333
10336
|
var A = y.end(t, F);
|
|
10334
10337
|
J.select(t, A);
|
|
10335
10338
|
}
|
|
10336
10339
|
}
|
|
10337
|
-
V.unref(),
|
|
10340
|
+
V.unref(), D.unref(), X.unref();
|
|
10338
10341
|
}
|
|
10339
10342
|
}
|
|
10340
10343
|
});
|
|
@@ -10515,7 +10518,7 @@ var Ib = function(t, n) {
|
|
|
10515
10518
|
at: _
|
|
10516
10519
|
}))) {
|
|
10517
10520
|
if (o) {
|
|
10518
|
-
var x = [],
|
|
10521
|
+
var x = [], w = R.levels(_);
|
|
10519
10522
|
E0(t, () => {
|
|
10520
10523
|
var z = function() {
|
|
10521
10524
|
var E = _.concat(B);
|
|
@@ -10525,15 +10528,15 @@ var Ib = function(t, n) {
|
|
|
10525
10528
|
path: E,
|
|
10526
10529
|
node: $
|
|
10527
10530
|
};
|
|
10528
|
-
t.apply(O), l = R.next(l), x.push(O), me.isText ?
|
|
10531
|
+
t.apply(O), l = R.next(l), x.push(O), me.isText ? w.push(...Array.from(oe.nodes($), (S) => {
|
|
10529
10532
|
var [, U] = S;
|
|
10530
10533
|
return E.concat(U);
|
|
10531
|
-
})) :
|
|
10534
|
+
})) : w.push(E);
|
|
10532
10535
|
};
|
|
10533
10536
|
for (var $ of n)
|
|
10534
10537
|
z();
|
|
10535
10538
|
}, () => {
|
|
10536
|
-
Ld(t,
|
|
10539
|
+
Ld(t, w, (z) => {
|
|
10537
10540
|
var $ = z;
|
|
10538
10541
|
for (var k of x)
|
|
10539
10542
|
if (R.operationCanTransformPath(k) && ($ = R.transform($, k), !$))
|
|
@@ -10551,8 +10554,8 @@ var Ib = function(t, n) {
|
|
|
10551
10554
|
}), l = R.next(l);
|
|
10552
10555
|
}
|
|
10553
10556
|
if (l = R.previous(l), d) {
|
|
10554
|
-
var
|
|
10555
|
-
|
|
10557
|
+
var P = y.end(t, l);
|
|
10558
|
+
P && J.select(t, P);
|
|
10556
10559
|
}
|
|
10557
10560
|
}
|
|
10558
10561
|
}
|
|
@@ -10679,21 +10682,21 @@ var Ib = function(t, n) {
|
|
|
10679
10682
|
at: g,
|
|
10680
10683
|
mode: "highest",
|
|
10681
10684
|
match: (z) => B.includes(z) && zd(t, z)
|
|
10682
|
-
}),
|
|
10685
|
+
}), w = x && y.pathRef(t, x[1]), T, I;
|
|
10683
10686
|
if (me.isText(p) && me.isText(f)) {
|
|
10684
|
-
var
|
|
10685
|
-
I = f.text.length, T =
|
|
10687
|
+
var P = ln(p, Ub);
|
|
10688
|
+
I = f.text.length, T = P;
|
|
10686
10689
|
} else if (he.isElement(p) && he.isElement(f)) {
|
|
10687
|
-
var
|
|
10688
|
-
I = f.children.length, T =
|
|
10690
|
+
var P = ln(p, Wb);
|
|
10691
|
+
I = f.children.length, T = P;
|
|
10689
10692
|
} else
|
|
10690
10693
|
throw new Error("Cannot merge the node at path [".concat(g, "] with the previous sibling because it is not the same kind: ").concat(ot.stringify(p), " ").concat(ot.stringify(f)));
|
|
10691
10694
|
_ || J.moveNodes(t, {
|
|
10692
10695
|
at: g,
|
|
10693
10696
|
to: b,
|
|
10694
10697
|
voids: s
|
|
10695
|
-
}),
|
|
10696
|
-
at:
|
|
10698
|
+
}), w && J.removeNodes(t, {
|
|
10699
|
+
at: w.current,
|
|
10697
10700
|
voids: s
|
|
10698
10701
|
}), he.isElement(f) && y.isEmpty(t, f) || me.isText(f) && f.text === "" && v[v.length - 1] !== 0 ? J.removeNodes(t, {
|
|
10699
10702
|
at: v,
|
|
@@ -10703,7 +10706,7 @@ var Ib = function(t, n) {
|
|
|
10703
10706
|
path: b,
|
|
10704
10707
|
position: I,
|
|
10705
10708
|
properties: T
|
|
10706
|
-
}),
|
|
10709
|
+
}), w && w.unref();
|
|
10707
10710
|
}
|
|
10708
10711
|
}
|
|
10709
10712
|
}
|
|
@@ -10816,7 +10819,7 @@ var Ib = function(t, n) {
|
|
|
10816
10819
|
always: !b
|
|
10817
10820
|
}), a = m.unref(), r.at == null && J.select(t, a);
|
|
10818
10821
|
}
|
|
10819
|
-
s || (s = (I,
|
|
10822
|
+
s || (s = (I, P) => I !== P);
|
|
10820
10823
|
for (var [C, _] of y.nodes(t, {
|
|
10821
10824
|
at: a,
|
|
10822
10825
|
match: i,
|
|
@@ -10825,10 +10828,10 @@ var Ib = function(t, n) {
|
|
|
10825
10828
|
})) {
|
|
10826
10829
|
var B = {}, x = {};
|
|
10827
10830
|
if (_.length !== 0) {
|
|
10828
|
-
var
|
|
10831
|
+
var w = !1;
|
|
10829
10832
|
for (var T in n)
|
|
10830
|
-
T === "children" || T === "text" || s(n[T], C[T]) && (
|
|
10831
|
-
|
|
10833
|
+
T === "children" || T === "text" || s(n[T], C[T]) && (w = !0, C.hasOwnProperty(T) && (B[T] = C[T]), o ? n[T] != null && (x[T] = o(C[T], n[T])) : n[T] != null && (x[T] = n[T]));
|
|
10834
|
+
w && t.apply({
|
|
10832
10835
|
type: "set_node",
|
|
10833
10836
|
path: _,
|
|
10834
10837
|
properties: B,
|
|
@@ -10893,13 +10896,13 @@ var Ib = function(t, n) {
|
|
|
10893
10896
|
}
|
|
10894
10897
|
s = _, l = !0;
|
|
10895
10898
|
}
|
|
10896
|
-
var
|
|
10897
|
-
o =
|
|
10899
|
+
var w = s.path.length - C.length;
|
|
10900
|
+
o = w + 1, l = !0;
|
|
10898
10901
|
}
|
|
10899
10902
|
p = y.pointRef(t, s);
|
|
10900
|
-
var T = s.path.length - o, [, I] = g,
|
|
10903
|
+
var T = s.path.length - o, [, I] = g, P = s.path.slice(0, T), z = o === 0 ? s.offset : s.path[T] + v;
|
|
10901
10904
|
for (var [$, k] of y.levels(t, {
|
|
10902
|
-
at:
|
|
10905
|
+
at: P,
|
|
10903
10906
|
reverse: !0,
|
|
10904
10907
|
voids: i
|
|
10905
10908
|
})) {
|
|
@@ -11040,10 +11043,10 @@ var Xb = function(t, n) {
|
|
|
11040
11043
|
voids: s
|
|
11041
11044
|
}));
|
|
11042
11045
|
if (C.length > 0) {
|
|
11043
|
-
var [_] = C, B = C[C.length - 1], [, x] = _, [,
|
|
11044
|
-
if (x.length === 0 &&
|
|
11046
|
+
var [_] = C, B = C[C.length - 1], [, x] = _, [, w] = B;
|
|
11047
|
+
if (x.length === 0 && w.length === 0)
|
|
11045
11048
|
return 0;
|
|
11046
|
-
var T = R.equals(x,
|
|
11049
|
+
var T = R.equals(x, w) ? R.parent(x) : R.common(x, w), I = y.range(t, x, w), P = y.node(t, T), [z] = P, $ = T.length + 1, k = R.next(w.slice(0, $)), E = Dl(Dl({}, n), {}, {
|
|
11047
11050
|
children: []
|
|
11048
11051
|
});
|
|
11049
11052
|
J.insertNodes(t, E, {
|
|
@@ -11537,11 +11540,11 @@ var On = function(e) {
|
|
|
11537
11540
|
return gi.get(e);
|
|
11538
11541
|
if (Ud(e))
|
|
11539
11542
|
return gi.set(e, _l), _l;
|
|
11540
|
-
var n = getComputedStyle(e), r = yo(e) && e.ownerSVGElement && e.getBBox(), i = !oy && n.boxSizing === "border-box", a = sy.test(n.writingMode || ""), s = !r && El.test(n.overflowY || ""), o = !r && El.test(n.overflowX || ""), l = r ? 0 : Ht(n.paddingTop), u = r ? 0 : Ht(n.paddingRight), d = r ? 0 : Ht(n.paddingBottom), h = r ? 0 : Ht(n.paddingLeft), m = r ? 0 : Ht(n.borderTopWidth), p = r ? 0 : Ht(n.borderRightWidth), g = r ? 0 : Ht(n.borderBottomWidth), f = r ? 0 : Ht(n.borderLeftWidth), v = h + u, b = l + d, C = f + p, _ = m + g, B = o ? e.offsetHeight - _ - e.clientHeight : 0, x = s ? e.offsetWidth - C - e.clientWidth : 0,
|
|
11541
|
-
devicePixelContentBoxSize: ar(Math.round(I * devicePixelRatio), Math.round(
|
|
11543
|
+
var n = getComputedStyle(e), r = yo(e) && e.ownerSVGElement && e.getBBox(), i = !oy && n.boxSizing === "border-box", a = sy.test(n.writingMode || ""), s = !r && El.test(n.overflowY || ""), o = !r && El.test(n.overflowX || ""), l = r ? 0 : Ht(n.paddingTop), u = r ? 0 : Ht(n.paddingRight), d = r ? 0 : Ht(n.paddingBottom), h = r ? 0 : Ht(n.paddingLeft), m = r ? 0 : Ht(n.borderTopWidth), p = r ? 0 : Ht(n.borderRightWidth), g = r ? 0 : Ht(n.borderBottomWidth), f = r ? 0 : Ht(n.borderLeftWidth), v = h + u, b = l + d, C = f + p, _ = m + g, B = o ? e.offsetHeight - _ - e.clientHeight : 0, x = s ? e.offsetWidth - C - e.clientWidth : 0, w = i ? v + C : 0, T = i ? b + _ : 0, I = r ? r.width : Ht(n.width) - w - x, P = r ? r.height : Ht(n.height) - T - B, z = I + v + x + C, $ = P + b + B + _, k = On({
|
|
11544
|
+
devicePixelContentBoxSize: ar(Math.round(I * devicePixelRatio), Math.round(P * devicePixelRatio), a),
|
|
11542
11545
|
borderBoxSize: ar(z, $, a),
|
|
11543
|
-
contentBoxSize: ar(I,
|
|
11544
|
-
contentRect: new qd(h, l, I,
|
|
11546
|
+
contentBoxSize: ar(I, P, a),
|
|
11547
|
+
contentRect: new qd(h, l, I, P)
|
|
11545
11548
|
});
|
|
11546
11549
|
return gi.set(e, k), k;
|
|
11547
11550
|
}, Hd = function(e, t, n) {
|
|
@@ -12255,8 +12258,8 @@ var ee = {
|
|
|
12255
12258
|
}), u = _.textContent.length, v = l;
|
|
12256
12259
|
}
|
|
12257
12260
|
} else if (g) {
|
|
12258
|
-
for (var x = g.querySelectorAll("[data-slate-leaf]"),
|
|
12259
|
-
var T = x[
|
|
12261
|
+
for (var x = g.querySelectorAll("[data-slate-leaf]"), w = 0; w < x.length; w++) {
|
|
12262
|
+
var T = x[w];
|
|
12260
12263
|
if (ee.hasDOMNode(e, T)) {
|
|
12261
12264
|
f = T;
|
|
12262
12265
|
break;
|
|
@@ -12285,10 +12288,10 @@ var ee = {
|
|
|
12285
12288
|
if (I && ee.hasDOMNode(e, I, {
|
|
12286
12289
|
editable: !0
|
|
12287
12290
|
})) {
|
|
12288
|
-
var
|
|
12291
|
+
var P = ee.toSlateNode(e, I), {
|
|
12289
12292
|
path: z,
|
|
12290
12293
|
offset: $
|
|
12291
|
-
} = y.start(e, ee.findPath(e,
|
|
12294
|
+
} = y.start(e, ee.findPath(e, P));
|
|
12292
12295
|
return I.querySelector("[data-slate-leaf]") || ($ = s), {
|
|
12293
12296
|
path: z,
|
|
12294
12297
|
offset: $
|
|
@@ -12317,10 +12320,10 @@ var ee = {
|
|
|
12317
12320
|
u = t.focusNode;
|
|
12318
12321
|
var m = t.getRangeAt(0), p = t.getRangeAt(t.rangeCount - 1);
|
|
12319
12322
|
if (u instanceof HTMLTableRowElement && m.startContainer instanceof HTMLTableRowElement && p.startContainer instanceof HTMLTableRowElement) {
|
|
12320
|
-
let
|
|
12321
|
-
return T.childElementCount > 0 ?
|
|
12323
|
+
let w = function(T) {
|
|
12324
|
+
return T.childElementCount > 0 ? w(T.children[0]) : T;
|
|
12322
12325
|
};
|
|
12323
|
-
var g = m.startContainer, f = p.startContainer, v =
|
|
12326
|
+
var g = m.startContainer, f = p.startContainer, v = w(g.children[m.startOffset]), b = w(f.children[p.startOffset]);
|
|
12324
12327
|
d = 0, b.childNodes.length > 0 ? o = b.childNodes[0] : o = b, v.childNodes.length > 0 ? u = v.childNodes[0] : u = v, b instanceof HTMLElement ? l = b.innerHTML.length : l = 0;
|
|
12325
12328
|
} else
|
|
12326
12329
|
m.startContainer === u ? (o = p.endContainer, l = p.endOffset, d = m.startOffset) : (o = m.startContainer, l = m.endOffset, d = p.startOffset);
|
|
@@ -12695,8 +12698,8 @@ function n1(e) {
|
|
|
12695
12698
|
return;
|
|
12696
12699
|
}
|
|
12697
12700
|
E && n(), n.flush(), r.flush(), d();
|
|
12698
|
-
var
|
|
12699
|
-
an.delete(t),
|
|
12701
|
+
var D = an.get(t);
|
|
12702
|
+
an.delete(t), D !== void 0 && (t.marks = D, t.onChange());
|
|
12700
12703
|
}, p = (k) => {
|
|
12701
12704
|
a && clearTimeout(a), a = setTimeout(() => {
|
|
12702
12705
|
Tn.set(t, !1), m();
|
|
@@ -12715,7 +12718,7 @@ function n1(e) {
|
|
|
12715
12718
|
}, v = (k, E) => {
|
|
12716
12719
|
var O, S = (O = _t.get(t)) !== null && O !== void 0 ? O : [];
|
|
12717
12720
|
_t.set(t, S);
|
|
12718
|
-
var U = oe.leaf(t, k), H = S.findIndex((
|
|
12721
|
+
var U = oe.leaf(t, k), H = S.findIndex((D) => R.equals(D.path, k));
|
|
12719
12722
|
if (H < 0) {
|
|
12720
12723
|
var ae = uf(U.text, E);
|
|
12721
12724
|
ae && S.push({
|
|
@@ -12758,7 +12761,7 @@ function n1(e) {
|
|
|
12758
12761
|
exactMatch: !1,
|
|
12759
12762
|
suppressThrow: !0
|
|
12760
12763
|
})), S = (E = S) !== null && E !== void 0 ? E : t.selection, !!S) {
|
|
12761
|
-
var
|
|
12764
|
+
var D = !0;
|
|
12762
12765
|
if (O.startsWith("delete")) {
|
|
12763
12766
|
if (G.isExpanded(S)) {
|
|
12764
12767
|
var [X, V] = G.edges(S), F = oe.leaf(t, X.path);
|
|
@@ -12773,21 +12776,21 @@ function n1(e) {
|
|
|
12773
12776
|
});
|
|
12774
12777
|
}
|
|
12775
12778
|
}
|
|
12776
|
-
var j = O.endsWith("Backward") ? "backward" : "forward", [
|
|
12779
|
+
var j = O.endsWith("Backward") ? "backward" : "forward", [N, L] = G.edges(S), [Z, q] = y.leaf(t, N.path), ne = {
|
|
12777
12780
|
text: "",
|
|
12778
|
-
start:
|
|
12781
|
+
start: N.offset,
|
|
12779
12782
|
end: L.offset
|
|
12780
12783
|
}, ue = _t.get(t), Q = ue == null ? void 0 : ue.find((be) => R.equals(be.path, q)), ve = Q ? [Q.diff, ne] : [ne], ge = of(Z.text, ...ve);
|
|
12781
|
-
if (ge.length === 0 && (
|
|
12782
|
-
if (
|
|
12784
|
+
if (ge.length === 0 && (D = !1), G.isExpanded(S)) {
|
|
12785
|
+
if (D && R.equals(S.anchor.path, S.focus.path)) {
|
|
12783
12786
|
var Te = {
|
|
12784
12787
|
path: S.anchor.path,
|
|
12785
|
-
offset:
|
|
12788
|
+
offset: N.offset
|
|
12786
12789
|
}, je = y.range(t, Te, Te);
|
|
12787
12790
|
return T(je), v(S.anchor.path, {
|
|
12788
12791
|
text: "",
|
|
12789
12792
|
end: L.offset,
|
|
12790
|
-
start:
|
|
12793
|
+
start: N.offset
|
|
12791
12794
|
});
|
|
12792
12795
|
}
|
|
12793
12796
|
return b(() => y.deleteFragment(t, {
|
|
@@ -12809,7 +12812,7 @@ function n1(e) {
|
|
|
12809
12812
|
var {
|
|
12810
12813
|
anchor: Oe
|
|
12811
12814
|
} = S;
|
|
12812
|
-
if (
|
|
12815
|
+
if (D && G.isCollapsed(S)) {
|
|
12813
12816
|
var We = oe.leaf(t, Oe.path);
|
|
12814
12817
|
if (Oe.offset < We.text.length)
|
|
12815
12818
|
return v(Oe.path, {
|
|
@@ -12826,7 +12829,7 @@ function n1(e) {
|
|
|
12826
12829
|
var He, {
|
|
12827
12830
|
anchor: Ze
|
|
12828
12831
|
} = S, it = Is(H) ? H.isCollapsed : !!((He = H) !== null && He !== void 0 && He.collapsed);
|
|
12829
|
-
return
|
|
12832
|
+
return D && it && G.isCollapsed(S) && Ze.offset > 0 ? v(Ze.path, {
|
|
12830
12833
|
text: "",
|
|
12831
12834
|
start: Ze.offset - 1,
|
|
12832
12835
|
end: Ze.offset
|
|
@@ -12925,7 +12928,7 @@ function n1(e) {
|
|
|
12925
12928
|
O === "insertText" ? u === null ? u = W : u && G.isCollapsed(S) && u.end + u.text.length === Ye.offset ? u = xi(xi({}, u), {}, {
|
|
12926
12929
|
text: u.text + Se
|
|
12927
12930
|
}) : u = !1 : u = !1;
|
|
12928
|
-
if (
|
|
12931
|
+
if (D) {
|
|
12929
12932
|
v(Ye.path, W);
|
|
12930
12933
|
return;
|
|
12931
12934
|
}
|
|
@@ -12939,7 +12942,7 @@ function n1(e) {
|
|
|
12939
12942
|
}, _ = () => !!vn.get(t), B = () => {
|
|
12940
12943
|
var k;
|
|
12941
12944
|
return !!((k = _t.get(t)) !== null && k !== void 0 && k.length);
|
|
12942
|
-
}, x = () => _() || B(),
|
|
12945
|
+
}, x = () => _() || B(), w = () => i, T = (k) => {
|
|
12943
12946
|
bn.set(t, k), s && (clearTimeout(s), s = null);
|
|
12944
12947
|
var {
|
|
12945
12948
|
selection: E
|
|
@@ -12950,7 +12953,7 @@ function n1(e) {
|
|
|
12950
12953
|
}
|
|
12951
12954
|
}, I = () => {
|
|
12952
12955
|
(_() || !B()) && m();
|
|
12953
|
-
},
|
|
12956
|
+
}, P = (k) => {
|
|
12954
12957
|
B() || (f(!0), setTimeout(f));
|
|
12955
12958
|
}, z = () => {
|
|
12956
12959
|
_() || (o = setTimeout(m));
|
|
@@ -12966,12 +12969,12 @@ function n1(e) {
|
|
|
12966
12969
|
hasPendingDiffs: B,
|
|
12967
12970
|
hasPendingAction: _,
|
|
12968
12971
|
hasPendingChanges: x,
|
|
12969
|
-
isFlushing:
|
|
12972
|
+
isFlushing: w,
|
|
12970
12973
|
handleUserSelect: T,
|
|
12971
12974
|
handleCompositionEnd: p,
|
|
12972
12975
|
handleCompositionStart: g,
|
|
12973
12976
|
handleDOMBeforeInput: C,
|
|
12974
|
-
handleKeyDown:
|
|
12977
|
+
handleKeyDown: P,
|
|
12975
12978
|
handleDomMutations: $,
|
|
12976
12979
|
handleInput: I
|
|
12977
12980
|
};
|
|
@@ -13559,11 +13562,11 @@ var I1 = (e) => /* @__PURE__ */ te.createElement(te.Fragment, null, hf(e)), L1 =
|
|
|
13559
13562
|
as: m = "div",
|
|
13560
13563
|
disableDefaultStyles: p = !1
|
|
13561
13564
|
} = e, g = dr(e, R1), f = Un(), [v, b] = le(!1), C = ke(null), _ = ke([]), [B, x] = le(), {
|
|
13562
|
-
onUserInput:
|
|
13565
|
+
onUserInput: w,
|
|
13563
13566
|
receivedUserInput: T
|
|
13564
13567
|
} = B1(), [, I] = pr((A) => A + 1, 0);
|
|
13565
13568
|
tf.set(f, I), Rs.set(f, s);
|
|
13566
|
-
var
|
|
13569
|
+
var P = Gt(() => ({
|
|
13567
13570
|
isDraggingInternally: !1,
|
|
13568
13571
|
isUpdatingSelection: !1,
|
|
13569
13572
|
latestElement: null,
|
|
@@ -13574,11 +13577,11 @@ var I1 = (e) => /* @__PURE__ */ te.createElement(te.Fragment, null, hf(e)), L1 =
|
|
|
13574
13577
|
}, [n]);
|
|
13575
13578
|
var z = ke(), $ = Gt(() => xv(() => {
|
|
13576
13579
|
var A = z.current;
|
|
13577
|
-
if ((Dt || !ee.isComposing(f)) && (!
|
|
13580
|
+
if ((Dt || !ee.isComposing(f)) && (!P.isUpdatingSelection || A != null && A.isFlushing()) && !P.isDraggingInternally) {
|
|
13578
13581
|
var j = ee.findDocumentOrShadowRoot(f), {
|
|
13579
|
-
activeElement:
|
|
13582
|
+
activeElement: N
|
|
13580
13583
|
} = j, L = ee.toDOMNode(f, f), Z = j.getSelection();
|
|
13581
|
-
if (
|
|
13584
|
+
if (N === L ? (P.latestElement = N, Dn.set(f, !0)) : Dn.delete(f), !Z)
|
|
13582
13585
|
return J.deselect(f);
|
|
13583
13586
|
var {
|
|
13584
13587
|
anchorNode: q,
|
|
@@ -13593,14 +13596,14 @@ var I1 = (e) => /* @__PURE__ */ te.createElement(te.Fragment, null, hf(e)), L1 =
|
|
|
13593
13596
|
}
|
|
13594
13597
|
s && (!ue || !Q) && J.deselect(f);
|
|
13595
13598
|
}
|
|
13596
|
-
}, 100), [f, s,
|
|
13599
|
+
}, 100), [f, s, P]), k = Gt(() => mv($, 0), [$]);
|
|
13597
13600
|
z.current = u1({
|
|
13598
13601
|
node: C,
|
|
13599
13602
|
onDOMSelectionChange: $,
|
|
13600
13603
|
scheduleOnDOMSelectionChange: k
|
|
13601
13604
|
}), Gr(() => {
|
|
13602
|
-
var A, j,
|
|
13603
|
-
C.current && (
|
|
13605
|
+
var A, j, N;
|
|
13606
|
+
C.current && (N = ko(C.current)) ? (ef.set(f, N), Oi.set(f, C.current), Pn.set(f, C.current), Yr.set(C.current, f)) : Pn.delete(f);
|
|
13604
13607
|
var {
|
|
13605
13608
|
selection: L
|
|
13606
13609
|
} = f, Z = ee.findDocumentOrShadowRoot(f), q = Z.getSelection();
|
|
@@ -13624,7 +13627,7 @@ var I1 = (e) => /* @__PURE__ */ te.createElement(te.Fragment, null, hf(e)), L1 =
|
|
|
13624
13627
|
});
|
|
13625
13628
|
if (Se && G.equals(Se, L)) {
|
|
13626
13629
|
var Ye;
|
|
13627
|
-
if (!
|
|
13630
|
+
if (!P.hasMarkPlaceholder || (Ye = Oe) !== null && Ye !== void 0 && (Ye = Ye.parentElement) !== null && Ye !== void 0 && Ye.hasAttribute("data-slate-mark-placeholder"))
|
|
13628
13631
|
return;
|
|
13629
13632
|
}
|
|
13630
13633
|
}
|
|
@@ -13635,7 +13638,7 @@ var I1 = (e) => /* @__PURE__ */ te.createElement(te.Fragment, null, hf(e)), L1 =
|
|
|
13635
13638
|
});
|
|
13636
13639
|
return;
|
|
13637
13640
|
}
|
|
13638
|
-
|
|
13641
|
+
P.isUpdatingSelection = !0;
|
|
13639
13642
|
var xe = L && ee.toDOMRange(f, L);
|
|
13640
13643
|
return xe ? (ee.isComposing(f) && !Dt ? q.collapseToEnd() : G.isBackward(L) ? q.setBaseAndExtent(xe.endContainer, xe.endOffset, xe.startContainer, xe.startOffset) : q.setBaseAndExtent(xe.startContainer, xe.startOffset, xe.endContainer, xe.endOffset), d(f, xe)) : q.removeAllRanges(), xe;
|
|
13641
13644
|
}
|
|
@@ -13644,7 +13647,7 @@ var I1 = (e) => /* @__PURE__ */ te.createElement(te.Fragment, null, hf(e)), L1 =
|
|
|
13644
13647
|
var ue = ((j = z.current) === null || j === void 0 ? void 0 : j.isFlushing()) === "action";
|
|
13645
13648
|
if (!Dt || !ue) {
|
|
13646
13649
|
setTimeout(() => {
|
|
13647
|
-
|
|
13650
|
+
P.isUpdatingSelection = !1;
|
|
13648
13651
|
});
|
|
13649
13652
|
return;
|
|
13650
13653
|
}
|
|
@@ -13658,7 +13661,7 @@ var I1 = (e) => /* @__PURE__ */ te.createElement(te.Fragment, null, hf(e)), L1 =
|
|
|
13658
13661
|
}
|
|
13659
13662
|
};
|
|
13660
13663
|
ge(), Q = setTimeout(() => {
|
|
13661
|
-
ge(!0),
|
|
13664
|
+
ge(!0), P.isUpdatingSelection = !1;
|
|
13662
13665
|
});
|
|
13663
13666
|
}
|
|
13664
13667
|
});
|
|
@@ -13668,31 +13671,31 @@ var I1 = (e) => /* @__PURE__ */ te.createElement(te.Fragment, null, hf(e)), L1 =
|
|
|
13668
13671
|
}
|
|
13669
13672
|
});
|
|
13670
13673
|
var E = Me((A) => {
|
|
13671
|
-
if (
|
|
13674
|
+
if (w(), !s && ee.hasEditableTarget(f, A.target) && !W1(A, i)) {
|
|
13672
13675
|
var j;
|
|
13673
13676
|
if (z.current)
|
|
13674
13677
|
return z.current.handleDOMBeforeInput(A);
|
|
13675
13678
|
k.flush(), $.flush();
|
|
13676
13679
|
var {
|
|
13677
|
-
selection:
|
|
13680
|
+
selection: N
|
|
13678
13681
|
} = f, {
|
|
13679
13682
|
inputType: L
|
|
13680
13683
|
} = A, Z = A.dataTransfer || A.data || void 0, q = L === "insertCompositionText" || L === "deleteCompositionText";
|
|
13681
13684
|
if (q && ee.isComposing(f))
|
|
13682
13685
|
return;
|
|
13683
13686
|
var ne = !1;
|
|
13684
|
-
if (L === "insertText" &&
|
|
13687
|
+
if (L === "insertText" && N && G.isCollapsed(N) && // Only use native character insertion for single characters a-z or space for now.
|
|
13685
13688
|
// Long-press events (hold a + press 4 = ä) to choose a special character otherwise
|
|
13686
13689
|
// causes duplicate inserts.
|
|
13687
13690
|
A.data && A.data.length === 1 && /[a-z ]/i.test(A.data) && // Chrome has issues correctly editing the start of nodes: https://bugs.chromium.org/p/chromium/issues/detail?id=1249405
|
|
13688
13691
|
// When there is an inline element, e.g. a link, and you select
|
|
13689
13692
|
// right after it (the start of the next node).
|
|
13690
|
-
|
|
13693
|
+
N.anchor.offset !== 0) {
|
|
13691
13694
|
var ue, Q;
|
|
13692
13695
|
ne = !0, f.marks && (ne = !1);
|
|
13693
13696
|
var {
|
|
13694
13697
|
anchor: ve
|
|
13695
|
-
} =
|
|
13698
|
+
} = N, [ge, Te] = ee.toDOMPoint(f, ve), je = (ue = ge.parentElement) === null || ue === void 0 ? void 0 : ue.closest("a"), Oe = ee.getWindow(f);
|
|
13696
13699
|
if (ne && je && ee.hasDOMNode(f, je)) {
|
|
13697
13700
|
var We, He = Oe == null ? void 0 : Oe.document.createTreeWalker(je, NodeFilter.SHOW_TEXT).lastChild();
|
|
13698
13701
|
He === ge && ((We = He.textContent) === null || We === void 0 ? void 0 : We.length) === Te && (ne = !1);
|
|
@@ -13712,7 +13715,7 @@ var I1 = (e) => /* @__PURE__ */ te.createElement(te.Fragment, null, hf(e)), L1 =
|
|
|
13712
13715
|
exactMatch: !1,
|
|
13713
13716
|
suppressThrow: !1
|
|
13714
13717
|
});
|
|
13715
|
-
if (!
|
|
13718
|
+
if (!N || !G.equals(N, Se)) {
|
|
13716
13719
|
ne = !1;
|
|
13717
13720
|
var Ye = !q && f.selection && y.rangeRef(f, f.selection);
|
|
13718
13721
|
J.select(f, Se), Ye && Mr.set(f, Ye);
|
|
@@ -13721,7 +13724,7 @@ var I1 = (e) => /* @__PURE__ */ te.createElement(te.Fragment, null, hf(e)), L1 =
|
|
|
13721
13724
|
}
|
|
13722
13725
|
if (q)
|
|
13723
13726
|
return;
|
|
13724
|
-
if (ne || A.preventDefault(),
|
|
13727
|
+
if (ne || A.preventDefault(), N && G.isExpanded(N) && L.startsWith("delete")) {
|
|
13725
13728
|
var xe = L.endsWith("Backward") ? "backward" : "forward";
|
|
13726
13729
|
y.deleteFragment(f, {
|
|
13727
13730
|
direction: xe
|
|
@@ -13808,7 +13811,7 @@ var I1 = (e) => /* @__PURE__ */ te.createElement(te.Fragment, null, hf(e)), L1 =
|
|
|
13808
13811
|
var W = (j = Mr.get(f)) === null || j === void 0 ? void 0 : j.unref();
|
|
13809
13812
|
Mr.delete(f), W && (!f.selection || !G.equals(f.selection, W)) && J.select(f, W);
|
|
13810
13813
|
}
|
|
13811
|
-
}, [f, $,
|
|
13814
|
+
}, [f, $, w, i, s, k]), O = Me((A) => {
|
|
13812
13815
|
A == null ? ($.cancel(), k.cancel(), Oi.delete(f), Pn.delete(f), C.current && pn && C.current.removeEventListener("beforeinput", E)) : pn && A.addEventListener("beforeinput", E), C.current = A;
|
|
13813
13816
|
}, [$, k, f, E]);
|
|
13814
13817
|
Gr(() => {
|
|
@@ -13837,20 +13840,20 @@ var I1 = (e) => /* @__PURE__ */ te.createElement(te.Fragment, null, hf(e)), L1 =
|
|
|
13837
13840
|
var {
|
|
13838
13841
|
marks: re
|
|
13839
13842
|
} = f;
|
|
13840
|
-
if (
|
|
13843
|
+
if (P.hasMarkPlaceholder = !1, f.selection && G.isCollapsed(f.selection) && re) {
|
|
13841
13844
|
var {
|
|
13842
|
-
anchor:
|
|
13843
|
-
} = f.selection, X = oe.leaf(f,
|
|
13845
|
+
anchor: D
|
|
13846
|
+
} = f.selection, X = oe.leaf(f, D.path), V = dr(X, $1);
|
|
13844
13847
|
if (!me.equals(X, re, {
|
|
13845
13848
|
loose: !0
|
|
13846
13849
|
})) {
|
|
13847
|
-
|
|
13850
|
+
P.hasMarkPlaceholder = !0;
|
|
13848
13851
|
var F = Object.fromEntries(Object.keys(V).map((A) => [A, null]));
|
|
13849
13852
|
S.push(Kt(Kt(Kt({
|
|
13850
13853
|
[nf]: !0
|
|
13851
13854
|
}, F), re), {}, {
|
|
13852
|
-
anchor:
|
|
13853
|
-
focus:
|
|
13855
|
+
anchor: D,
|
|
13856
|
+
focus: D
|
|
13854
13857
|
}));
|
|
13855
13858
|
}
|
|
13856
13859
|
}
|
|
@@ -13862,8 +13865,8 @@ var I1 = (e) => /* @__PURE__ */ te.createElement(te.Fragment, null, hf(e)), L1 =
|
|
|
13862
13865
|
if (A) {
|
|
13863
13866
|
var {
|
|
13864
13867
|
anchor: j
|
|
13865
|
-
} = A,
|
|
13866
|
-
if (re && !me.equals(
|
|
13868
|
+
} = A, N = oe.leaf(f, j.path);
|
|
13869
|
+
if (re && !me.equals(N, re, {
|
|
13867
13870
|
loose: !0
|
|
13868
13871
|
})) {
|
|
13869
13872
|
Lt.set(f, re);
|
|
@@ -13929,15 +13932,15 @@ var I1 = (e) => /* @__PURE__ */ te.createElement(te.Fragment, null, hf(e)), L1 =
|
|
|
13929
13932
|
}
|
|
13930
13933
|
}, [g.onInput]),
|
|
13931
13934
|
onBlur: Me((A) => {
|
|
13932
|
-
if (!(s ||
|
|
13935
|
+
if (!(s || P.isUpdatingSelection || !ee.hasSelectableTarget(f, A.target) || bt(A, g.onBlur))) {
|
|
13933
13936
|
var j = ee.findDocumentOrShadowRoot(f);
|
|
13934
|
-
if (
|
|
13937
|
+
if (P.latestElement !== j.activeElement) {
|
|
13935
13938
|
var {
|
|
13936
|
-
relatedTarget:
|
|
13939
|
+
relatedTarget: N
|
|
13937
13940
|
} = A, L = ee.toDOMNode(f, f);
|
|
13938
|
-
if (
|
|
13939
|
-
if (
|
|
13940
|
-
var Z = ee.toSlateNode(f,
|
|
13941
|
+
if (N !== L && !(Mt(N) && N.hasAttribute("data-slate-spacer"))) {
|
|
13942
|
+
if (N != null && Cn(N) && ee.hasDOMNode(f, N)) {
|
|
13943
|
+
var Z = ee.toSlateNode(f, N);
|
|
13941
13944
|
if (he.isElement(Z) && !f.isVoid(Z))
|
|
13942
13945
|
return;
|
|
13943
13946
|
}
|
|
@@ -13949,20 +13952,20 @@ var I1 = (e) => /* @__PURE__ */ te.createElement(te.Fragment, null, hf(e)), L1 =
|
|
|
13949
13952
|
}
|
|
13950
13953
|
}
|
|
13951
13954
|
}
|
|
13952
|
-
}, [s,
|
|
13955
|
+
}, [s, P.isUpdatingSelection, P.latestElement, f, g.onBlur]),
|
|
13953
13956
|
onClick: Me((A) => {
|
|
13954
13957
|
if (ee.hasTarget(f, A.target) && !bt(A, g.onClick) && Cn(A.target)) {
|
|
13955
|
-
var j = ee.toSlateNode(f, A.target),
|
|
13956
|
-
if (!y.hasPath(f,
|
|
13958
|
+
var j = ee.toSlateNode(f, A.target), N = ee.findPath(f, j);
|
|
13959
|
+
if (!y.hasPath(f, N) || oe.get(f, N) !== j)
|
|
13957
13960
|
return;
|
|
13958
|
-
if (A.detail === T1 &&
|
|
13959
|
-
var L =
|
|
13961
|
+
if (A.detail === T1 && N.length >= 1) {
|
|
13962
|
+
var L = N;
|
|
13960
13963
|
if (!(he.isElement(j) && y.isBlock(f, j))) {
|
|
13961
13964
|
var Z, q = y.above(f, {
|
|
13962
13965
|
match: (je) => he.isElement(je) && y.isBlock(f, je),
|
|
13963
|
-
at:
|
|
13966
|
+
at: N
|
|
13964
13967
|
});
|
|
13965
|
-
L = (Z = q == null ? void 0 : q[1]) !== null && Z !== void 0 ? Z :
|
|
13968
|
+
L = (Z = q == null ? void 0 : q[1]) !== null && Z !== void 0 ? Z : N.slice(0, 1);
|
|
13966
13969
|
}
|
|
13967
13970
|
var ne = y.range(f, L);
|
|
13968
13971
|
J.select(f, ne);
|
|
@@ -13970,7 +13973,7 @@ var I1 = (e) => /* @__PURE__ */ te.createElement(te.Fragment, null, hf(e)), L1 =
|
|
|
13970
13973
|
}
|
|
13971
13974
|
if (s)
|
|
13972
13975
|
return;
|
|
13973
|
-
var ue = y.start(f,
|
|
13976
|
+
var ue = y.start(f, N), Q = y.end(f, N), ve = y.void(f, {
|
|
13974
13977
|
at: ue
|
|
13975
13978
|
}), ge = y.void(f, {
|
|
13976
13979
|
at: Q
|
|
@@ -13989,8 +13992,8 @@ var I1 = (e) => /* @__PURE__ */ te.createElement(te.Fragment, null, hf(e)), L1 =
|
|
|
13989
13992
|
}), (j = z.current) === null || j === void 0 || j.handleCompositionEnd(A), bt(A, g.onCompositionEnd) || Dt)
|
|
13990
13993
|
return;
|
|
13991
13994
|
if (!jr && !Oy && !By && !Ny && !Py && A.data) {
|
|
13992
|
-
var
|
|
13993
|
-
Lt.delete(f),
|
|
13995
|
+
var N = Lt.get(f);
|
|
13996
|
+
Lt.delete(f), N !== void 0 && (an.set(f, f.marks), f.marks = N), y.insertText(f, A.data);
|
|
13994
13997
|
var L = an.get(f);
|
|
13995
13998
|
an.delete(f), L !== void 0 && (f.marks = L);
|
|
13996
13999
|
}
|
|
@@ -14006,9 +14009,9 @@ var I1 = (e) => /* @__PURE__ */ te.createElement(te.Fragment, null, hf(e)), L1 =
|
|
|
14006
14009
|
return;
|
|
14007
14010
|
b(!0);
|
|
14008
14011
|
var {
|
|
14009
|
-
selection:
|
|
14012
|
+
selection: N
|
|
14010
14013
|
} = f;
|
|
14011
|
-
if (
|
|
14014
|
+
if (N && G.isExpanded(N)) {
|
|
14012
14015
|
y.deleteFragment(f);
|
|
14013
14016
|
return;
|
|
14014
14017
|
}
|
|
@@ -14027,8 +14030,8 @@ var I1 = (e) => /* @__PURE__ */ te.createElement(te.Fragment, null, hf(e)), L1 =
|
|
|
14027
14030
|
if (G.isExpanded(j))
|
|
14028
14031
|
y.deleteFragment(f);
|
|
14029
14032
|
else {
|
|
14030
|
-
var
|
|
14031
|
-
y.isVoid(f,
|
|
14033
|
+
var N = oe.parent(f, j.anchor.path);
|
|
14034
|
+
y.isVoid(f, N) && J.delete(f);
|
|
14032
14035
|
}
|
|
14033
14036
|
}
|
|
14034
14037
|
}, [s, f, g.onCut]),
|
|
@@ -14040,81 +14043,81 @@ var I1 = (e) => /* @__PURE__ */ te.createElement(te.Fragment, null, hf(e)), L1 =
|
|
|
14040
14043
|
}, [g.onDragOver, f]),
|
|
14041
14044
|
onDragStart: Me((A) => {
|
|
14042
14045
|
if (!s && ee.hasTarget(f, A.target) && !bt(A, g.onDragStart)) {
|
|
14043
|
-
var j = ee.toSlateNode(f, A.target),
|
|
14044
|
-
at:
|
|
14046
|
+
var j = ee.toSlateNode(f, A.target), N = ee.findPath(f, j), L = he.isElement(j) && y.isVoid(f, j) || y.void(f, {
|
|
14047
|
+
at: N,
|
|
14045
14048
|
voids: !0
|
|
14046
14049
|
});
|
|
14047
14050
|
if (L) {
|
|
14048
|
-
var Z = y.range(f,
|
|
14051
|
+
var Z = y.range(f, N);
|
|
14049
14052
|
J.select(f, Z);
|
|
14050
14053
|
}
|
|
14051
|
-
|
|
14054
|
+
P.isDraggingInternally = !0, ee.setFragmentData(f, A.dataTransfer, "drag");
|
|
14052
14055
|
}
|
|
14053
|
-
}, [s, f, g.onDragStart,
|
|
14056
|
+
}, [s, f, g.onDragStart, P]),
|
|
14054
14057
|
onDrop: Me((A) => {
|
|
14055
14058
|
if (!s && ee.hasTarget(f, A.target) && !bt(A, g.onDrop)) {
|
|
14056
14059
|
A.preventDefault();
|
|
14057
|
-
var j = f.selection,
|
|
14058
|
-
J.select(f,
|
|
14059
|
-
at:
|
|
14060
|
+
var j = f.selection, N = ee.findEventRange(f, A), L = A.dataTransfer;
|
|
14061
|
+
J.select(f, N), P.isDraggingInternally && j && !G.equals(j, N) && !y.void(f, {
|
|
14062
|
+
at: N,
|
|
14060
14063
|
voids: !0
|
|
14061
14064
|
}) && J.delete(f, {
|
|
14062
14065
|
at: j
|
|
14063
14066
|
}), ee.insertData(f, L), ee.isFocused(f) || ee.focus(f);
|
|
14064
14067
|
}
|
|
14065
|
-
|
|
14066
|
-
}, [s, f, g.onDrop,
|
|
14068
|
+
P.isDraggingInternally = !1;
|
|
14069
|
+
}, [s, f, g.onDrop, P]),
|
|
14067
14070
|
onDragEnd: Me((A) => {
|
|
14068
|
-
!s &&
|
|
14069
|
-
}, [s,
|
|
14071
|
+
!s && P.isDraggingInternally && g.onDragEnd && ee.hasTarget(f, A.target) && g.onDragEnd(A), P.isDraggingInternally = !1;
|
|
14072
|
+
}, [s, P, g, f]),
|
|
14070
14073
|
onFocus: Me((A) => {
|
|
14071
|
-
if (!s && !
|
|
14072
|
-
var j = ee.toDOMNode(f, f),
|
|
14073
|
-
if (
|
|
14074
|
+
if (!s && !P.isUpdatingSelection && ee.hasEditableTarget(f, A.target) && !bt(A, g.onFocus)) {
|
|
14075
|
+
var j = ee.toDOMNode(f, f), N = ee.findDocumentOrShadowRoot(f);
|
|
14076
|
+
if (P.latestElement = N.activeElement, tr && A.target !== j) {
|
|
14074
14077
|
j.focus();
|
|
14075
14078
|
return;
|
|
14076
14079
|
}
|
|
14077
14080
|
Dn.set(f, !0);
|
|
14078
14081
|
}
|
|
14079
|
-
}, [s,
|
|
14082
|
+
}, [s, P, f, g.onFocus]),
|
|
14080
14083
|
onKeyDown: Me((A) => {
|
|
14081
14084
|
if (!s && ee.hasEditableTarget(f, A.target)) {
|
|
14082
14085
|
var j;
|
|
14083
14086
|
(j = z.current) === null || j === void 0 || j.handleKeyDown(A);
|
|
14084
14087
|
var {
|
|
14085
|
-
nativeEvent:
|
|
14088
|
+
nativeEvent: N
|
|
14086
14089
|
} = A;
|
|
14087
|
-
if (ee.isComposing(f) &&
|
|
14090
|
+
if (ee.isComposing(f) && N.isComposing === !1 && (Tn.set(f, !1), b(!1)), bt(A, g.onKeyDown) || ee.isComposing(f))
|
|
14088
14091
|
return;
|
|
14089
14092
|
var {
|
|
14090
14093
|
selection: L
|
|
14091
14094
|
} = f, Z = f.children[L !== null ? L.focus.path[0] : 0], q = Fd(oe.string(Z)) === "rtl";
|
|
14092
|
-
if (Xe.isRedo(
|
|
14095
|
+
if (Xe.isRedo(N)) {
|
|
14093
14096
|
A.preventDefault();
|
|
14094
14097
|
var ne = f;
|
|
14095
14098
|
typeof ne.redo == "function" && ne.redo();
|
|
14096
14099
|
return;
|
|
14097
14100
|
}
|
|
14098
|
-
if (Xe.isUndo(
|
|
14101
|
+
if (Xe.isUndo(N)) {
|
|
14099
14102
|
A.preventDefault();
|
|
14100
14103
|
var ue = f;
|
|
14101
14104
|
typeof ue.undo == "function" && ue.undo();
|
|
14102
14105
|
return;
|
|
14103
14106
|
}
|
|
14104
|
-
if (Xe.isMoveLineBackward(
|
|
14107
|
+
if (Xe.isMoveLineBackward(N)) {
|
|
14105
14108
|
A.preventDefault(), J.move(f, {
|
|
14106
14109
|
unit: "line",
|
|
14107
14110
|
reverse: !0
|
|
14108
14111
|
});
|
|
14109
14112
|
return;
|
|
14110
14113
|
}
|
|
14111
|
-
if (Xe.isMoveLineForward(
|
|
14114
|
+
if (Xe.isMoveLineForward(N)) {
|
|
14112
14115
|
A.preventDefault(), J.move(f, {
|
|
14113
14116
|
unit: "line"
|
|
14114
14117
|
});
|
|
14115
14118
|
return;
|
|
14116
14119
|
}
|
|
14117
|
-
if (Xe.isExtendLineBackward(
|
|
14120
|
+
if (Xe.isExtendLineBackward(N)) {
|
|
14118
14121
|
A.preventDefault(), J.move(f, {
|
|
14119
14122
|
unit: "line",
|
|
14120
14123
|
edge: "focus",
|
|
@@ -14122,14 +14125,14 @@ var I1 = (e) => /* @__PURE__ */ te.createElement(te.Fragment, null, hf(e)), L1 =
|
|
|
14122
14125
|
});
|
|
14123
14126
|
return;
|
|
14124
14127
|
}
|
|
14125
|
-
if (Xe.isExtendLineForward(
|
|
14128
|
+
if (Xe.isExtendLineForward(N)) {
|
|
14126
14129
|
A.preventDefault(), J.move(f, {
|
|
14127
14130
|
unit: "line",
|
|
14128
14131
|
edge: "focus"
|
|
14129
14132
|
});
|
|
14130
14133
|
return;
|
|
14131
14134
|
}
|
|
14132
|
-
if (Xe.isMoveBackward(
|
|
14135
|
+
if (Xe.isMoveBackward(N)) {
|
|
14133
14136
|
A.preventDefault(), L && G.isCollapsed(L) ? J.move(f, {
|
|
14134
14137
|
reverse: !q
|
|
14135
14138
|
}) : J.collapse(f, {
|
|
@@ -14137,7 +14140,7 @@ var I1 = (e) => /* @__PURE__ */ te.createElement(te.Fragment, null, hf(e)), L1 =
|
|
|
14137
14140
|
});
|
|
14138
14141
|
return;
|
|
14139
14142
|
}
|
|
14140
|
-
if (Xe.isMoveForward(
|
|
14143
|
+
if (Xe.isMoveForward(N)) {
|
|
14141
14144
|
A.preventDefault(), L && G.isCollapsed(L) ? J.move(f, {
|
|
14142
14145
|
reverse: q
|
|
14143
14146
|
}) : J.collapse(f, {
|
|
@@ -14145,7 +14148,7 @@ var I1 = (e) => /* @__PURE__ */ te.createElement(te.Fragment, null, hf(e)), L1 =
|
|
|
14145
14148
|
});
|
|
14146
14149
|
return;
|
|
14147
14150
|
}
|
|
14148
|
-
if (Xe.isMoveWordBackward(
|
|
14151
|
+
if (Xe.isMoveWordBackward(N)) {
|
|
14149
14152
|
A.preventDefault(), L && G.isExpanded(L) && J.collapse(f, {
|
|
14150
14153
|
edge: "focus"
|
|
14151
14154
|
}), J.move(f, {
|
|
@@ -14154,7 +14157,7 @@ var I1 = (e) => /* @__PURE__ */ te.createElement(te.Fragment, null, hf(e)), L1 =
|
|
|
14154
14157
|
});
|
|
14155
14158
|
return;
|
|
14156
14159
|
}
|
|
14157
|
-
if (Xe.isMoveWordForward(
|
|
14160
|
+
if (Xe.isMoveWordForward(N)) {
|
|
14158
14161
|
A.preventDefault(), L && G.isExpanded(L) && J.collapse(f, {
|
|
14159
14162
|
edge: "focus"
|
|
14160
14163
|
}), J.move(f, {
|
|
@@ -14164,7 +14167,7 @@ var I1 = (e) => /* @__PURE__ */ te.createElement(te.Fragment, null, hf(e)), L1 =
|
|
|
14164
14167
|
return;
|
|
14165
14168
|
}
|
|
14166
14169
|
if (pn) {
|
|
14167
|
-
if ((Xd || jr) && L && (Xe.isDeleteBackward(
|
|
14170
|
+
if ((Xd || jr) && L && (Xe.isDeleteBackward(N) || Xe.isDeleteForward(N)) && G.isCollapsed(L)) {
|
|
14168
14171
|
var Q = oe.parent(f, L.anchor.path);
|
|
14169
14172
|
if (he.isElement(Q) && y.isVoid(f, Q) && (y.isInline(f, Q) || y.isBlock(f, Q))) {
|
|
14170
14173
|
A.preventDefault(), y.deleteBackward(f, {
|
|
@@ -14174,31 +14177,31 @@ var I1 = (e) => /* @__PURE__ */ te.createElement(te.Fragment, null, hf(e)), L1 =
|
|
|
14174
14177
|
}
|
|
14175
14178
|
}
|
|
14176
14179
|
} else {
|
|
14177
|
-
if (Xe.isBold(
|
|
14180
|
+
if (Xe.isBold(N) || Xe.isItalic(N) || Xe.isTransposeCharacter(N)) {
|
|
14178
14181
|
A.preventDefault();
|
|
14179
14182
|
return;
|
|
14180
14183
|
}
|
|
14181
|
-
if (Xe.isSoftBreak(
|
|
14184
|
+
if (Xe.isSoftBreak(N)) {
|
|
14182
14185
|
A.preventDefault(), y.insertSoftBreak(f);
|
|
14183
14186
|
return;
|
|
14184
14187
|
}
|
|
14185
|
-
if (Xe.isSplitBlock(
|
|
14188
|
+
if (Xe.isSplitBlock(N)) {
|
|
14186
14189
|
A.preventDefault(), y.insertBreak(f);
|
|
14187
14190
|
return;
|
|
14188
14191
|
}
|
|
14189
|
-
if (Xe.isDeleteBackward(
|
|
14192
|
+
if (Xe.isDeleteBackward(N)) {
|
|
14190
14193
|
A.preventDefault(), L && G.isExpanded(L) ? y.deleteFragment(f, {
|
|
14191
14194
|
direction: "backward"
|
|
14192
14195
|
}) : y.deleteBackward(f);
|
|
14193
14196
|
return;
|
|
14194
14197
|
}
|
|
14195
|
-
if (Xe.isDeleteForward(
|
|
14198
|
+
if (Xe.isDeleteForward(N)) {
|
|
14196
14199
|
A.preventDefault(), L && G.isExpanded(L) ? y.deleteFragment(f, {
|
|
14197
14200
|
direction: "forward"
|
|
14198
14201
|
}) : y.deleteForward(f);
|
|
14199
14202
|
return;
|
|
14200
14203
|
}
|
|
14201
|
-
if (Xe.isDeleteLineBackward(
|
|
14204
|
+
if (Xe.isDeleteLineBackward(N)) {
|
|
14202
14205
|
A.preventDefault(), L && G.isExpanded(L) ? y.deleteFragment(f, {
|
|
14203
14206
|
direction: "backward"
|
|
14204
14207
|
}) : y.deleteBackward(f, {
|
|
@@ -14206,7 +14209,7 @@ var I1 = (e) => /* @__PURE__ */ te.createElement(te.Fragment, null, hf(e)), L1 =
|
|
|
14206
14209
|
});
|
|
14207
14210
|
return;
|
|
14208
14211
|
}
|
|
14209
|
-
if (Xe.isDeleteLineForward(
|
|
14212
|
+
if (Xe.isDeleteLineForward(N)) {
|
|
14210
14213
|
A.preventDefault(), L && G.isExpanded(L) ? y.deleteFragment(f, {
|
|
14211
14214
|
direction: "forward"
|
|
14212
14215
|
}) : y.deleteForward(f, {
|
|
@@ -14214,7 +14217,7 @@ var I1 = (e) => /* @__PURE__ */ te.createElement(te.Fragment, null, hf(e)), L1 =
|
|
|
14214
14217
|
});
|
|
14215
14218
|
return;
|
|
14216
14219
|
}
|
|
14217
|
-
if (Xe.isDeleteWordBackward(
|
|
14220
|
+
if (Xe.isDeleteWordBackward(N)) {
|
|
14218
14221
|
A.preventDefault(), L && G.isExpanded(L) ? y.deleteFragment(f, {
|
|
14219
14222
|
direction: "backward"
|
|
14220
14223
|
}) : y.deleteBackward(f, {
|
|
@@ -14222,7 +14225,7 @@ var I1 = (e) => /* @__PURE__ */ te.createElement(te.Fragment, null, hf(e)), L1 =
|
|
|
14222
14225
|
});
|
|
14223
14226
|
return;
|
|
14224
14227
|
}
|
|
14225
|
-
if (Xe.isDeleteWordForward(
|
|
14228
|
+
if (Xe.isDeleteWordForward(N)) {
|
|
14226
14229
|
A.preventDefault(), L && G.isExpanded(L) ? y.deleteFragment(f, {
|
|
14227
14230
|
direction: "forward"
|
|
14228
14231
|
}) : y.deleteForward(f, {
|
|
@@ -14456,15 +14459,15 @@ var Q1 = function(t) {
|
|
|
14456
14459
|
d.push(...Gn(r, _));
|
|
14457
14460
|
var B;
|
|
14458
14461
|
R.isBefore(u.path, u.newPath) ? (d.push(...Gn(r, R.parent(u.path))), B = u.newPath) : (d.push(...Gn(r, R.parent(u.newPath))), B = u.path);
|
|
14459
|
-
var x = oe.get(t, R.parent(B)),
|
|
14460
|
-
h.push([T,
|
|
14462
|
+
var x = oe.get(t, R.parent(B)), w = ee.findKey(r, x), T = y.pathRef(r, R.parent(B));
|
|
14463
|
+
h.push([T, w]);
|
|
14461
14464
|
break;
|
|
14462
14465
|
}
|
|
14463
14466
|
}
|
|
14464
14467
|
i(u);
|
|
14465
|
-
for (var [I,
|
|
14468
|
+
for (var [I, P] of d) {
|
|
14466
14469
|
var [z] = y.node(r, I);
|
|
14467
|
-
Qi.set(z,
|
|
14470
|
+
Qi.set(z, P);
|
|
14468
14471
|
}
|
|
14469
14472
|
for (var [$, k] of h)
|
|
14470
14473
|
if ($.current) {
|
|
@@ -14497,10 +14500,10 @@ var Q1 = function(t) {
|
|
|
14497
14500
|
var x = b.ownerDocument.createElement("span");
|
|
14498
14501
|
x.style.whiteSpace = "pre", x.appendChild(b), v.appendChild(x), b = x;
|
|
14499
14502
|
}
|
|
14500
|
-
var
|
|
14503
|
+
var w = r.getFragment(), T = JSON.stringify(w), I = window.btoa(encodeURIComponent(T));
|
|
14501
14504
|
b.setAttribute("data-slate-fragment", I), u.setData("application/".concat(n), I);
|
|
14502
|
-
var
|
|
14503
|
-
return
|
|
14505
|
+
var P = v.ownerDocument.createElement("div");
|
|
14506
|
+
return P.appendChild(v), P.setAttribute("hidden", "true"), v.ownerDocument.body.appendChild(P), u.setData("text/html", P.innerHTML), u.setData("text/plain", sf(P)), v.ownerDocument.body.removeChild(P), u;
|
|
14504
14507
|
}
|
|
14505
14508
|
}
|
|
14506
14509
|
}, r.insertData = (u) => {
|
|
@@ -16121,16 +16124,16 @@ function Px(e) {
|
|
|
16121
16124
|
if (r++, t.containerState._closeFlow) {
|
|
16122
16125
|
t.containerState._closeFlow = void 0, i && C();
|
|
16123
16126
|
const B = t.events.length;
|
|
16124
|
-
let x = B,
|
|
16127
|
+
let x = B, w;
|
|
16125
16128
|
for (; x--; )
|
|
16126
16129
|
if (t.events[x][0] === "exit" && t.events[x][1].type === "chunkFlow") {
|
|
16127
|
-
|
|
16130
|
+
w = t.events[x][1].end;
|
|
16128
16131
|
break;
|
|
16129
16132
|
}
|
|
16130
16133
|
b(r);
|
|
16131
16134
|
let T = B;
|
|
16132
16135
|
for (; T < t.events.length; )
|
|
16133
|
-
t.events[T][1].end = Object.assign({},
|
|
16136
|
+
t.events[T][1].end = Object.assign({}, w), T++;
|
|
16134
16137
|
return cn(
|
|
16135
16138
|
t.events,
|
|
16136
16139
|
x + 1,
|
|
@@ -16191,33 +16194,33 @@ function Px(e) {
|
|
|
16191
16194
|
function v(_, B) {
|
|
16192
16195
|
const x = t.sliceStream(_);
|
|
16193
16196
|
if (B && x.push(null), _.previous = a, a && (a.next = _), a = _, i.defineSkip(_.start), i.write(x), t.parser.lazy[_.start.line]) {
|
|
16194
|
-
let
|
|
16195
|
-
for (;
|
|
16197
|
+
let w = i.events.length;
|
|
16198
|
+
for (; w--; )
|
|
16196
16199
|
if (
|
|
16197
16200
|
// The token starts before the line ending…
|
|
16198
|
-
i.events[
|
|
16199
|
-
(!i.events[
|
|
16200
|
-
i.events[
|
|
16201
|
+
i.events[w][1].start.offset < s && // …and either is not ended yet…
|
|
16202
|
+
(!i.events[w][1].end || // …or ends after it.
|
|
16203
|
+
i.events[w][1].end.offset > s)
|
|
16201
16204
|
)
|
|
16202
16205
|
return;
|
|
16203
16206
|
const T = t.events.length;
|
|
16204
|
-
let I = T,
|
|
16207
|
+
let I = T, P, z;
|
|
16205
16208
|
for (; I--; )
|
|
16206
16209
|
if (t.events[I][0] === "exit" && t.events[I][1].type === "chunkFlow") {
|
|
16207
|
-
if (
|
|
16210
|
+
if (P) {
|
|
16208
16211
|
z = t.events[I][1].end;
|
|
16209
16212
|
break;
|
|
16210
16213
|
}
|
|
16211
|
-
|
|
16214
|
+
P = !0;
|
|
16212
16215
|
}
|
|
16213
|
-
for (b(r),
|
|
16214
|
-
t.events[
|
|
16216
|
+
for (b(r), w = T; w < t.events.length; )
|
|
16217
|
+
t.events[w][1].end = Object.assign({}, z), w++;
|
|
16215
16218
|
cn(
|
|
16216
16219
|
t.events,
|
|
16217
16220
|
I + 1,
|
|
16218
16221
|
0,
|
|
16219
16222
|
t.events.slice(T)
|
|
16220
|
-
), t.events.length =
|
|
16223
|
+
), t.events.length = w;
|
|
16221
16224
|
}
|
|
16222
16225
|
}
|
|
16223
16226
|
function b(_) {
|
|
@@ -16454,67 +16457,67 @@ function Vx(e, t, n) {
|
|
|
16454
16457
|
};
|
|
16455
16458
|
let a = 0, s = 0, o;
|
|
16456
16459
|
return l;
|
|
16457
|
-
function l(
|
|
16458
|
-
return u(
|
|
16460
|
+
function l(w) {
|
|
16461
|
+
return u(w);
|
|
16459
16462
|
}
|
|
16460
|
-
function u(
|
|
16463
|
+
function u(w) {
|
|
16461
16464
|
const T = r.events[r.events.length - 1];
|
|
16462
|
-
return a = T && T[1].type === "linePrefix" ? T[2].sliceSerialize(T[1], !0).length : 0, o =
|
|
16465
|
+
return a = T && T[1].type === "linePrefix" ? T[2].sliceSerialize(T[1], !0).length : 0, o = w, e.enter("codeFenced"), e.enter("codeFencedFence"), e.enter("codeFencedFenceSequence"), d(w);
|
|
16463
16466
|
}
|
|
16464
|
-
function d(
|
|
16465
|
-
return
|
|
16467
|
+
function d(w) {
|
|
16468
|
+
return w === o ? (s++, e.consume(w), d) : s < 3 ? n(w) : (e.exit("codeFencedFenceSequence"), Ie(w) ? Ge(e, h, "whitespace")(w) : h(w));
|
|
16466
16469
|
}
|
|
16467
|
-
function h(
|
|
16468
|
-
return
|
|
16470
|
+
function h(w) {
|
|
16471
|
+
return w === null || we(w) ? (e.exit("codeFencedFence"), r.interrupt ? t(w) : e.check(fc, f, B)(w)) : (e.enter("codeFencedFenceInfo"), e.enter("chunkString", {
|
|
16469
16472
|
contentType: "string"
|
|
16470
|
-
}), m(
|
|
16473
|
+
}), m(w));
|
|
16471
16474
|
}
|
|
16472
|
-
function m(
|
|
16473
|
-
return
|
|
16475
|
+
function m(w) {
|
|
16476
|
+
return w === null || we(w) ? (e.exit("chunkString"), e.exit("codeFencedFenceInfo"), h(w)) : Ie(w) ? (e.exit("chunkString"), e.exit("codeFencedFenceInfo"), Ge(e, p, "whitespace")(w)) : w === 96 && w === o ? n(w) : (e.consume(w), m);
|
|
16474
16477
|
}
|
|
16475
|
-
function p(
|
|
16476
|
-
return
|
|
16478
|
+
function p(w) {
|
|
16479
|
+
return w === null || we(w) ? h(w) : (e.enter("codeFencedFenceMeta"), e.enter("chunkString", {
|
|
16477
16480
|
contentType: "string"
|
|
16478
|
-
}), g(
|
|
16481
|
+
}), g(w));
|
|
16479
16482
|
}
|
|
16480
|
-
function g(
|
|
16481
|
-
return
|
|
16483
|
+
function g(w) {
|
|
16484
|
+
return w === null || we(w) ? (e.exit("chunkString"), e.exit("codeFencedFenceMeta"), h(w)) : w === 96 && w === o ? n(w) : (e.consume(w), g);
|
|
16482
16485
|
}
|
|
16483
|
-
function f(
|
|
16484
|
-
return e.attempt(i, B, v)(
|
|
16486
|
+
function f(w) {
|
|
16487
|
+
return e.attempt(i, B, v)(w);
|
|
16485
16488
|
}
|
|
16486
|
-
function v(
|
|
16487
|
-
return e.enter("lineEnding"), e.consume(
|
|
16489
|
+
function v(w) {
|
|
16490
|
+
return e.enter("lineEnding"), e.consume(w), e.exit("lineEnding"), b;
|
|
16488
16491
|
}
|
|
16489
|
-
function b(
|
|
16490
|
-
return a > 0 && Ie(
|
|
16492
|
+
function b(w) {
|
|
16493
|
+
return a > 0 && Ie(w) ? Ge(e, C, "linePrefix", a + 1)(w) : C(w);
|
|
16491
16494
|
}
|
|
16492
|
-
function C(
|
|
16493
|
-
return
|
|
16495
|
+
function C(w) {
|
|
16496
|
+
return w === null || we(w) ? e.check(fc, f, B)(w) : (e.enter("codeFlowValue"), _(w));
|
|
16494
16497
|
}
|
|
16495
|
-
function _(
|
|
16496
|
-
return
|
|
16498
|
+
function _(w) {
|
|
16499
|
+
return w === null || we(w) ? (e.exit("codeFlowValue"), C(w)) : (e.consume(w), _);
|
|
16497
16500
|
}
|
|
16498
|
-
function B(
|
|
16499
|
-
return e.exit("codeFenced"), t(
|
|
16501
|
+
function B(w) {
|
|
16502
|
+
return e.exit("codeFenced"), t(w);
|
|
16500
16503
|
}
|
|
16501
|
-
function x(
|
|
16502
|
-
let
|
|
16504
|
+
function x(w, T, I) {
|
|
16505
|
+
let P = 0;
|
|
16503
16506
|
return z;
|
|
16504
16507
|
function z(S) {
|
|
16505
|
-
return
|
|
16508
|
+
return w.enter("lineEnding"), w.consume(S), w.exit("lineEnding"), $;
|
|
16506
16509
|
}
|
|
16507
16510
|
function $(S) {
|
|
16508
|
-
return
|
|
16511
|
+
return w.enter("codeFencedFence"), Ie(S) ? Ge(w, k, "linePrefix", r.parser.constructs.disable.null.includes("codeIndented") ? void 0 : 4)(S) : k(S);
|
|
16509
16512
|
}
|
|
16510
16513
|
function k(S) {
|
|
16511
|
-
return S === o ? (
|
|
16514
|
+
return S === o ? (w.enter("codeFencedFenceSequence"), E(S)) : I(S);
|
|
16512
16515
|
}
|
|
16513
16516
|
function E(S) {
|
|
16514
|
-
return S === o ? (
|
|
16517
|
+
return S === o ? (P++, w.consume(S), E) : P >= s ? (w.exit("codeFencedFenceSequence"), Ie(S) ? Ge(w, O, "whitespace")(S) : O(S)) : I(S);
|
|
16515
16518
|
}
|
|
16516
16519
|
function O(S) {
|
|
16517
|
-
return S === null || we(S) ? (
|
|
16520
|
+
return S === null || we(S) ? (w.exit("codeFencedFence"), T(S)) : I(S);
|
|
16518
16521
|
}
|
|
16519
16522
|
}
|
|
16520
16523
|
}
|
|
@@ -17163,13 +17166,13 @@ function wD(e, t, n) {
|
|
|
17163
17166
|
return e.enter("htmlFlow"), e.enter("htmlFlowData"), e.consume(F), h;
|
|
17164
17167
|
}
|
|
17165
17168
|
function h(F) {
|
|
17166
|
-
return F === 33 ? (e.consume(F), m) : F === 47 ? (e.consume(F), a = !0, f) : F === 63 ? (e.consume(F), i = 3, r.interrupt ? t :
|
|
17169
|
+
return F === 33 ? (e.consume(F), m) : F === 47 ? (e.consume(F), a = !0, f) : F === 63 ? (e.consume(F), i = 3, r.interrupt ? t : D) : Yt(F) ? (e.consume(F), s = String.fromCharCode(F), v) : n(F);
|
|
17167
17170
|
}
|
|
17168
17171
|
function m(F) {
|
|
17169
|
-
return F === 45 ? (e.consume(F), i = 2, p) : F === 91 ? (e.consume(F), i = 5, o = 0, g) : Yt(F) ? (e.consume(F), i = 4, r.interrupt ? t :
|
|
17172
|
+
return F === 45 ? (e.consume(F), i = 2, p) : F === 91 ? (e.consume(F), i = 5, o = 0, g) : Yt(F) ? (e.consume(F), i = 4, r.interrupt ? t : D) : n(F);
|
|
17170
17173
|
}
|
|
17171
17174
|
function p(F) {
|
|
17172
|
-
return F === 45 ? (e.consume(F), r.interrupt ? t :
|
|
17175
|
+
return F === 45 ? (e.consume(F), r.interrupt ? t : D) : n(F);
|
|
17173
17176
|
}
|
|
17174
17177
|
function g(F) {
|
|
17175
17178
|
const A = "CDATA[";
|
|
@@ -17198,18 +17201,18 @@ function wD(e, t, n) {
|
|
|
17198
17201
|
return F === 45 || F === 46 || F === 58 || F === 95 || zt(F) ? (e.consume(F), B) : x(F);
|
|
17199
17202
|
}
|
|
17200
17203
|
function x(F) {
|
|
17201
|
-
return F === 61 ? (e.consume(F),
|
|
17204
|
+
return F === 61 ? (e.consume(F), w) : Ie(F) ? (e.consume(F), x) : _(F);
|
|
17202
17205
|
}
|
|
17203
|
-
function
|
|
17204
|
-
return F === null || F === 60 || F === 61 || F === 62 || F === 96 ? n(F) : F === 34 || F === 39 ? (e.consume(F), l = F, T) : Ie(F) ? (e.consume(F),
|
|
17206
|
+
function w(F) {
|
|
17207
|
+
return F === null || F === 60 || F === 61 || F === 62 || F === 96 ? n(F) : F === 34 || F === 39 ? (e.consume(F), l = F, T) : Ie(F) ? (e.consume(F), w) : I(F);
|
|
17205
17208
|
}
|
|
17206
17209
|
function T(F) {
|
|
17207
|
-
return F === l ? (e.consume(F), l = null,
|
|
17210
|
+
return F === l ? (e.consume(F), l = null, P) : F === null || we(F) ? n(F) : (e.consume(F), T);
|
|
17208
17211
|
}
|
|
17209
17212
|
function I(F) {
|
|
17210
17213
|
return F === null || F === 34 || F === 39 || F === 47 || F === 60 || F === 61 || F === 62 || F === 96 || Ft(F) ? x(F) : (e.consume(F), I);
|
|
17211
17214
|
}
|
|
17212
|
-
function
|
|
17215
|
+
function P(F) {
|
|
17213
17216
|
return F === 47 || F === 62 || Ie(F) ? _(F) : n(F);
|
|
17214
17217
|
}
|
|
17215
17218
|
function z(F) {
|
|
@@ -17219,7 +17222,7 @@ function wD(e, t, n) {
|
|
|
17219
17222
|
return F === null || we(F) ? k(F) : Ie(F) ? (e.consume(F), $) : n(F);
|
|
17220
17223
|
}
|
|
17221
17224
|
function k(F) {
|
|
17222
|
-
return F === 45 && i === 2 ? (e.consume(F), U) : F === 60 && i === 1 ? (e.consume(F), H) : F === 62 && i === 4 ? (e.consume(F), X) : F === 63 && i === 3 ? (e.consume(F),
|
|
17225
|
+
return F === 45 && i === 2 ? (e.consume(F), U) : F === 60 && i === 1 ? (e.consume(F), H) : F === 62 && i === 4 ? (e.consume(F), X) : F === 63 && i === 3 ? (e.consume(F), D) : F === 93 && i === 5 ? (e.consume(F), re) : we(F) && (i === 6 || i === 7) ? (e.exit("htmlFlowData"), e.check(yD, V, E)(F)) : F === null || we(F) ? (e.exit("htmlFlowData"), E(F)) : (e.consume(F), k);
|
|
17223
17226
|
}
|
|
17224
17227
|
function E(F) {
|
|
17225
17228
|
return e.check(xD, O, V)(F);
|
|
@@ -17231,7 +17234,7 @@ function wD(e, t, n) {
|
|
|
17231
17234
|
return F === null || we(F) ? E(F) : (e.enter("htmlFlowData"), k(F));
|
|
17232
17235
|
}
|
|
17233
17236
|
function U(F) {
|
|
17234
|
-
return F === 45 ? (e.consume(F),
|
|
17237
|
+
return F === 45 ? (e.consume(F), D) : k(F);
|
|
17235
17238
|
}
|
|
17236
17239
|
function H(F) {
|
|
17237
17240
|
return F === 47 ? (e.consume(F), s = "", ae) : k(F);
|
|
@@ -17244,10 +17247,10 @@ function wD(e, t, n) {
|
|
|
17244
17247
|
return Yt(F) && s.length < 8 ? (e.consume(F), s += String.fromCharCode(F), ae) : k(F);
|
|
17245
17248
|
}
|
|
17246
17249
|
function re(F) {
|
|
17247
|
-
return F === 93 ? (e.consume(F),
|
|
17250
|
+
return F === 93 ? (e.consume(F), D) : k(F);
|
|
17248
17251
|
}
|
|
17249
|
-
function
|
|
17250
|
-
return F === 62 ? (e.consume(F), X) : F === 45 && i === 2 ? (e.consume(F),
|
|
17252
|
+
function D(F) {
|
|
17253
|
+
return F === 62 ? (e.consume(F), X) : F === 45 && i === 2 ? (e.consume(F), D) : k(F);
|
|
17251
17254
|
}
|
|
17252
17255
|
function X(F) {
|
|
17253
17256
|
return F === null || we(F) ? (e.exit("htmlFlowData"), V(F)) : (e.consume(F), X);
|
|
@@ -17280,93 +17283,93 @@ function kD(e, t, n) {
|
|
|
17280
17283
|
const r = this;
|
|
17281
17284
|
let i, a, s;
|
|
17282
17285
|
return o;
|
|
17283
|
-
function o(
|
|
17284
|
-
return e.enter("htmlText"), e.enter("htmlTextData"), e.consume(
|
|
17286
|
+
function o(D) {
|
|
17287
|
+
return e.enter("htmlText"), e.enter("htmlTextData"), e.consume(D), l;
|
|
17285
17288
|
}
|
|
17286
|
-
function l(
|
|
17287
|
-
return
|
|
17289
|
+
function l(D) {
|
|
17290
|
+
return D === 33 ? (e.consume(D), u) : D === 47 ? (e.consume(D), x) : D === 63 ? (e.consume(D), _) : Yt(D) ? (e.consume(D), I) : n(D);
|
|
17288
17291
|
}
|
|
17289
|
-
function u(
|
|
17290
|
-
return
|
|
17292
|
+
function u(D) {
|
|
17293
|
+
return D === 45 ? (e.consume(D), d) : D === 91 ? (e.consume(D), a = 0, g) : Yt(D) ? (e.consume(D), C) : n(D);
|
|
17291
17294
|
}
|
|
17292
|
-
function d(
|
|
17293
|
-
return
|
|
17295
|
+
function d(D) {
|
|
17296
|
+
return D === 45 ? (e.consume(D), p) : n(D);
|
|
17294
17297
|
}
|
|
17295
|
-
function h(
|
|
17296
|
-
return
|
|
17298
|
+
function h(D) {
|
|
17299
|
+
return D === null ? n(D) : D === 45 ? (e.consume(D), m) : we(D) ? (s = h, H(D)) : (e.consume(D), h);
|
|
17297
17300
|
}
|
|
17298
|
-
function m(
|
|
17299
|
-
return
|
|
17301
|
+
function m(D) {
|
|
17302
|
+
return D === 45 ? (e.consume(D), p) : h(D);
|
|
17300
17303
|
}
|
|
17301
|
-
function p(
|
|
17302
|
-
return
|
|
17304
|
+
function p(D) {
|
|
17305
|
+
return D === 62 ? U(D) : D === 45 ? m(D) : h(D);
|
|
17303
17306
|
}
|
|
17304
|
-
function g(
|
|
17307
|
+
function g(D) {
|
|
17305
17308
|
const X = "CDATA[";
|
|
17306
|
-
return
|
|
17309
|
+
return D === X.charCodeAt(a++) ? (e.consume(D), a === X.length ? f : g) : n(D);
|
|
17307
17310
|
}
|
|
17308
|
-
function f(
|
|
17309
|
-
return
|
|
17311
|
+
function f(D) {
|
|
17312
|
+
return D === null ? n(D) : D === 93 ? (e.consume(D), v) : we(D) ? (s = f, H(D)) : (e.consume(D), f);
|
|
17310
17313
|
}
|
|
17311
|
-
function v(
|
|
17312
|
-
return
|
|
17314
|
+
function v(D) {
|
|
17315
|
+
return D === 93 ? (e.consume(D), b) : f(D);
|
|
17313
17316
|
}
|
|
17314
|
-
function b(
|
|
17315
|
-
return
|
|
17317
|
+
function b(D) {
|
|
17318
|
+
return D === 62 ? U(D) : D === 93 ? (e.consume(D), b) : f(D);
|
|
17316
17319
|
}
|
|
17317
|
-
function C(
|
|
17318
|
-
return
|
|
17320
|
+
function C(D) {
|
|
17321
|
+
return D === null || D === 62 ? U(D) : we(D) ? (s = C, H(D)) : (e.consume(D), C);
|
|
17319
17322
|
}
|
|
17320
|
-
function _(
|
|
17321
|
-
return
|
|
17323
|
+
function _(D) {
|
|
17324
|
+
return D === null ? n(D) : D === 63 ? (e.consume(D), B) : we(D) ? (s = _, H(D)) : (e.consume(D), _);
|
|
17322
17325
|
}
|
|
17323
|
-
function B(
|
|
17324
|
-
return
|
|
17326
|
+
function B(D) {
|
|
17327
|
+
return D === 62 ? U(D) : _(D);
|
|
17325
17328
|
}
|
|
17326
|
-
function x(
|
|
17327
|
-
return Yt(
|
|
17329
|
+
function x(D) {
|
|
17330
|
+
return Yt(D) ? (e.consume(D), w) : n(D);
|
|
17328
17331
|
}
|
|
17329
|
-
function D
|
|
17330
|
-
return
|
|
17332
|
+
function w(D) {
|
|
17333
|
+
return D === 45 || zt(D) ? (e.consume(D), w) : T(D);
|
|
17331
17334
|
}
|
|
17332
|
-
function T(
|
|
17333
|
-
return we(
|
|
17335
|
+
function T(D) {
|
|
17336
|
+
return we(D) ? (s = T, H(D)) : Ie(D) ? (e.consume(D), T) : U(D);
|
|
17334
17337
|
}
|
|
17335
|
-
function I(
|
|
17336
|
-
return
|
|
17338
|
+
function I(D) {
|
|
17339
|
+
return D === 45 || zt(D) ? (e.consume(D), I) : D === 47 || D === 62 || Ft(D) ? P(D) : n(D);
|
|
17337
17340
|
}
|
|
17338
|
-
function
|
|
17339
|
-
return
|
|
17341
|
+
function P(D) {
|
|
17342
|
+
return D === 47 ? (e.consume(D), U) : D === 58 || D === 95 || Yt(D) ? (e.consume(D), z) : we(D) ? (s = P, H(D)) : Ie(D) ? (e.consume(D), P) : U(D);
|
|
17340
17343
|
}
|
|
17341
|
-
function z(
|
|
17342
|
-
return
|
|
17344
|
+
function z(D) {
|
|
17345
|
+
return D === 45 || D === 46 || D === 58 || D === 95 || zt(D) ? (e.consume(D), z) : $(D);
|
|
17343
17346
|
}
|
|
17344
|
-
function $(
|
|
17345
|
-
return
|
|
17347
|
+
function $(D) {
|
|
17348
|
+
return D === 61 ? (e.consume(D), k) : we(D) ? (s = $, H(D)) : Ie(D) ? (e.consume(D), $) : P(D);
|
|
17346
17349
|
}
|
|
17347
|
-
function k(
|
|
17348
|
-
return
|
|
17350
|
+
function k(D) {
|
|
17351
|
+
return D === null || D === 60 || D === 61 || D === 62 || D === 96 ? n(D) : D === 34 || D === 39 ? (e.consume(D), i = D, E) : we(D) ? (s = k, H(D)) : Ie(D) ? (e.consume(D), k) : (e.consume(D), O);
|
|
17349
17352
|
}
|
|
17350
|
-
function E(
|
|
17351
|
-
return
|
|
17353
|
+
function E(D) {
|
|
17354
|
+
return D === i ? (e.consume(D), i = void 0, S) : D === null ? n(D) : we(D) ? (s = E, H(D)) : (e.consume(D), E);
|
|
17352
17355
|
}
|
|
17353
|
-
function O(
|
|
17354
|
-
return
|
|
17356
|
+
function O(D) {
|
|
17357
|
+
return D === null || D === 34 || D === 39 || D === 60 || D === 61 || D === 96 ? n(D) : D === 47 || D === 62 || Ft(D) ? P(D) : (e.consume(D), O);
|
|
17355
17358
|
}
|
|
17356
|
-
function S(
|
|
17357
|
-
return
|
|
17359
|
+
function S(D) {
|
|
17360
|
+
return D === 47 || D === 62 || Ft(D) ? P(D) : n(D);
|
|
17358
17361
|
}
|
|
17359
|
-
function U(
|
|
17360
|
-
return
|
|
17362
|
+
function U(D) {
|
|
17363
|
+
return D === 62 ? (e.consume(D), e.exit("htmlTextData"), e.exit("htmlText"), t) : n(D);
|
|
17361
17364
|
}
|
|
17362
|
-
function H(
|
|
17363
|
-
return e.exit("htmlTextData"), e.enter("lineEnding"), e.consume(
|
|
17365
|
+
function H(D) {
|
|
17366
|
+
return e.exit("htmlTextData"), e.enter("lineEnding"), e.consume(D), e.exit("lineEnding"), ae;
|
|
17364
17367
|
}
|
|
17365
|
-
function ae(
|
|
17366
|
-
return Ie(
|
|
17368
|
+
function ae(D) {
|
|
17369
|
+
return Ie(D) ? Ge(e, re, "linePrefix", r.parser.constructs.disable.null.includes("codeIndented") ? void 0 : 4)(D) : re(D);
|
|
17367
17370
|
}
|
|
17368
|
-
function re(
|
|
17369
|
-
return e.enter("htmlTextData"), s(
|
|
17371
|
+
function re(D) {
|
|
17372
|
+
return e.enter("htmlTextData"), s(D);
|
|
17370
17373
|
}
|
|
17371
17374
|
}
|
|
17372
17375
|
const So = {
|
|
@@ -17839,8 +17842,8 @@ function rw(e, t, n) {
|
|
|
17839
17842
|
enter: _,
|
|
17840
17843
|
exit: B,
|
|
17841
17844
|
attempt: T(x),
|
|
17842
|
-
check: T(
|
|
17843
|
-
interrupt: T(
|
|
17845
|
+
check: T(w),
|
|
17846
|
+
interrupt: T(w, {
|
|
17844
17847
|
interrupt: !0
|
|
17845
17848
|
})
|
|
17846
17849
|
}, u = {
|
|
@@ -17907,21 +17910,21 @@ function rw(e, t, n) {
|
|
|
17907
17910
|
function x($, k) {
|
|
17908
17911
|
I($, k.from);
|
|
17909
17912
|
}
|
|
17910
|
-
function
|
|
17913
|
+
function w($, k) {
|
|
17911
17914
|
k.restore();
|
|
17912
17915
|
}
|
|
17913
17916
|
function T($, k) {
|
|
17914
17917
|
return E;
|
|
17915
17918
|
function E(O, S, U) {
|
|
17916
|
-
let H, ae, re,
|
|
17919
|
+
let H, ae, re, D;
|
|
17917
17920
|
return Array.isArray(O) ? V(O) : "tokenize" in O ? (
|
|
17918
17921
|
// @ts-expect-error Looks like a construct.
|
|
17919
17922
|
V([O])
|
|
17920
17923
|
) : X(O);
|
|
17921
|
-
function X(
|
|
17924
|
+
function X(N) {
|
|
17922
17925
|
return L;
|
|
17923
17926
|
function L(Z) {
|
|
17924
|
-
const q = Z !== null &&
|
|
17927
|
+
const q = Z !== null && N[Z], ne = Z !== null && N.null, ue = [
|
|
17925
17928
|
// To do: add more extension tests.
|
|
17926
17929
|
/* c8 ignore next 2 */
|
|
17927
17930
|
...Array.isArray(q) ? q : q ? [q] : [],
|
|
@@ -17930,13 +17933,13 @@ function rw(e, t, n) {
|
|
|
17930
17933
|
return V(ue)(Z);
|
|
17931
17934
|
}
|
|
17932
17935
|
}
|
|
17933
|
-
function V(
|
|
17934
|
-
return H =
|
|
17936
|
+
function V(N) {
|
|
17937
|
+
return H = N, ae = 0, N.length === 0 ? U : F(N[ae]);
|
|
17935
17938
|
}
|
|
17936
|
-
function F(
|
|
17939
|
+
function F(N) {
|
|
17937
17940
|
return L;
|
|
17938
17941
|
function L(Z) {
|
|
17939
|
-
return
|
|
17942
|
+
return D = P(), re = N, N.partial || (u.currentConstruct = N), N.name && u.parser.constructs.disable.null.includes(N.name) ? j() : N.tokenize.call(
|
|
17940
17943
|
// If we do have fields, create an object w/ `context` as its
|
|
17941
17944
|
// prototype.
|
|
17942
17945
|
// This allows a “live binding”, which is needed for `interrupt`.
|
|
@@ -17947,11 +17950,11 @@ function rw(e, t, n) {
|
|
|
17947
17950
|
)(Z);
|
|
17948
17951
|
}
|
|
17949
17952
|
}
|
|
17950
|
-
function A(
|
|
17951
|
-
return $(re,
|
|
17953
|
+
function A(N) {
|
|
17954
|
+
return $(re, D), S;
|
|
17952
17955
|
}
|
|
17953
|
-
function j(
|
|
17954
|
-
return
|
|
17956
|
+
function j(N) {
|
|
17957
|
+
return D.restore(), ++ae < H.length ? F(H[ae]) : U;
|
|
17955
17958
|
}
|
|
17956
17959
|
}
|
|
17957
17960
|
}
|
|
@@ -17963,7 +17966,7 @@ function rw(e, t, n) {
|
|
|
17963
17966
|
$.resolve(u.events.slice(k), u)
|
|
17964
17967
|
), $.resolveTo && (u.events = $.resolveTo(u.events, u));
|
|
17965
17968
|
}
|
|
17966
|
-
function
|
|
17969
|
+
function P() {
|
|
17967
17970
|
const $ = g(), k = u.previous, E = u.currentConstruct, O = u.events.length, S = Array.from(o);
|
|
17968
17971
|
return {
|
|
17969
17972
|
restore: U,
|
|
@@ -18188,20 +18191,20 @@ function Cw(e) {
|
|
|
18188
18191
|
canContainEols: ["emphasis", "fragment", "heading", "paragraph", "strong"],
|
|
18189
18192
|
enter: {
|
|
18190
18193
|
autolink: a(We),
|
|
18191
|
-
autolinkProtocol:
|
|
18192
|
-
autolinkEmail:
|
|
18194
|
+
autolinkProtocol: P,
|
|
18195
|
+
autolinkEmail: P,
|
|
18193
18196
|
atxHeading: a(ge),
|
|
18194
18197
|
blockQuote: a(q),
|
|
18195
|
-
characterEscape:
|
|
18196
|
-
characterReference:
|
|
18198
|
+
characterEscape: P,
|
|
18199
|
+
characterReference: P,
|
|
18197
18200
|
codeFenced: a(ne),
|
|
18198
18201
|
codeFencedFenceInfo: s,
|
|
18199
18202
|
codeFencedFenceMeta: s,
|
|
18200
18203
|
codeIndented: a(ne, s),
|
|
18201
18204
|
codeText: a(ue, s),
|
|
18202
|
-
codeTextData:
|
|
18203
|
-
data:
|
|
18204
|
-
codeFlowValue:
|
|
18205
|
+
codeTextData: P,
|
|
18206
|
+
data: P,
|
|
18207
|
+
codeFlowValue: P,
|
|
18205
18208
|
definition: a(Q),
|
|
18206
18209
|
definitionDestinationString: s,
|
|
18207
18210
|
definitionLabelString: s,
|
|
@@ -18210,9 +18213,9 @@ function Cw(e) {
|
|
|
18210
18213
|
hardBreakEscape: a(Te),
|
|
18211
18214
|
hardBreakTrailing: a(Te),
|
|
18212
18215
|
htmlFlow: a(je, s),
|
|
18213
|
-
htmlFlowData:
|
|
18216
|
+
htmlFlowData: P,
|
|
18214
18217
|
htmlText: a(je, s),
|
|
18215
|
-
htmlTextData:
|
|
18218
|
+
htmlTextData: P,
|
|
18216
18219
|
image: a(Oe),
|
|
18217
18220
|
label: s,
|
|
18218
18221
|
link: a(We),
|
|
@@ -18239,7 +18242,7 @@ function Cw(e) {
|
|
|
18239
18242
|
characterEscapeValue: z,
|
|
18240
18243
|
characterReferenceMarkerHexadecimal: j,
|
|
18241
18244
|
characterReferenceMarkerNumeric: j,
|
|
18242
|
-
characterReferenceValue:
|
|
18245
|
+
characterReferenceValue: N,
|
|
18243
18246
|
codeFenced: l(v),
|
|
18244
18247
|
codeFencedFence: f,
|
|
18245
18248
|
codeFencedFenceInfo: p,
|
|
@@ -18270,12 +18273,12 @@ function Cw(e) {
|
|
|
18270
18273
|
listUnordered: l(),
|
|
18271
18274
|
paragraph: l(),
|
|
18272
18275
|
referenceString: A,
|
|
18273
|
-
resourceDestinationString:
|
|
18276
|
+
resourceDestinationString: D,
|
|
18274
18277
|
resourceTitleString: X,
|
|
18275
18278
|
resource: V,
|
|
18276
18279
|
setextHeading: l(I),
|
|
18277
18280
|
setextHeadingLineSequence: T,
|
|
18278
|
-
setextHeadingText:
|
|
18281
|
+
setextHeadingText: w,
|
|
18279
18282
|
strong: l(),
|
|
18280
18283
|
thematicBreak: l()
|
|
18281
18284
|
}
|
|
@@ -18487,7 +18490,7 @@ function Cw(e) {
|
|
|
18487
18490
|
ie.depth = pe;
|
|
18488
18491
|
}
|
|
18489
18492
|
}
|
|
18490
|
-
function
|
|
18493
|
+
function w() {
|
|
18491
18494
|
this.data.setextHeadingSlurpLineEnding = !0;
|
|
18492
18495
|
}
|
|
18493
18496
|
function T(W) {
|
|
@@ -18497,7 +18500,7 @@ function Cw(e) {
|
|
|
18497
18500
|
function I() {
|
|
18498
18501
|
this.data.setextHeadingSlurpLineEnding = void 0;
|
|
18499
18502
|
}
|
|
18500
|
-
function
|
|
18503
|
+
function P(W) {
|
|
18501
18504
|
const pe = this.stack[this.stack.length - 1].children;
|
|
18502
18505
|
let be = pe[pe.length - 1];
|
|
18503
18506
|
(!be || be.type !== "text") && (be = Ye(), be.position = {
|
|
@@ -18517,7 +18520,7 @@ function Cw(e) {
|
|
|
18517
18520
|
pe.position.end = gn(W.end), this.data.atHardBreak = void 0;
|
|
18518
18521
|
return;
|
|
18519
18522
|
}
|
|
18520
|
-
!this.data.setextHeadingSlurpLineEnding && t.canContainEols.includes(ie.type) && (
|
|
18523
|
+
!this.data.setextHeadingSlurpLineEnding && t.canContainEols.includes(ie.type) && (P.call(this, W), z.call(this, W));
|
|
18521
18524
|
}
|
|
18522
18525
|
function k() {
|
|
18523
18526
|
this.data.atHardBreak = !0;
|
|
@@ -18564,7 +18567,7 @@ function Cw(e) {
|
|
|
18564
18567
|
} else
|
|
18565
18568
|
pe.alt = ie;
|
|
18566
18569
|
}
|
|
18567
|
-
function
|
|
18570
|
+
function D() {
|
|
18568
18571
|
const W = this.resume(), ie = this.stack[this.stack.length - 1];
|
|
18569
18572
|
ie.url = W;
|
|
18570
18573
|
}
|
|
@@ -18587,7 +18590,7 @@ function Cw(e) {
|
|
|
18587
18590
|
function j(W) {
|
|
18588
18591
|
this.data.characterReferenceType = W.type;
|
|
18589
18592
|
}
|
|
18590
|
-
function
|
|
18593
|
+
function N(W) {
|
|
18591
18594
|
const ie = this.sliceSerialize(W), pe = this.data.characterReferenceType;
|
|
18592
18595
|
let be;
|
|
18593
18596
|
pe ? (be = Df(
|
|
@@ -19322,14 +19325,14 @@ const Rf = ({ formID: e, label: t, showLabel: n }) => {
|
|
|
19322
19325
|
case "ArrowRight":
|
|
19323
19326
|
v.stopPropagation(), v.preventDefault();
|
|
19324
19327
|
const x = v.currentTarget.closest("li");
|
|
19325
|
-
let
|
|
19328
|
+
let w = x == null ? void 0 : x.nextElementSibling;
|
|
19326
19329
|
if (v.key === "ArrowLeft") {
|
|
19327
|
-
const
|
|
19328
|
-
|
|
19330
|
+
const P = x == null ? void 0 : x.previousElementSibling;
|
|
19331
|
+
P ? w = P : w = (b = x == null ? void 0 : x.parentElement) == null ? void 0 : b.lastElementChild;
|
|
19329
19332
|
} else
|
|
19330
|
-
|
|
19331
|
-
const T =
|
|
19332
|
-
T && (m(T), (_ =
|
|
19333
|
+
w || (w = (C = x == null ? void 0 : x.parentElement) == null ? void 0 : C.firstElementChild);
|
|
19334
|
+
const T = w == null ? void 0 : w.className.split(" ")[0];
|
|
19335
|
+
T && (m(T), (_ = w == null ? void 0 : w.querySelector("button")) == null || _.focus());
|
|
19333
19336
|
break;
|
|
19334
19337
|
default:
|
|
19335
19338
|
const I = v.currentTarget.closest("fieldset");
|
|
@@ -19503,7 +19506,7 @@ const Lw = () => {
|
|
|
19503
19506
|
}, 500);
|
|
19504
19507
|
}, [u.selection]);
|
|
19505
19508
|
const b = [], C = ["open", "edit", "remove"].map((x) => {
|
|
19506
|
-
const
|
|
19509
|
+
const w = {
|
|
19507
19510
|
variant: "tertiary",
|
|
19508
19511
|
size: "small",
|
|
19509
19512
|
children: e.formatMessage(
|
|
@@ -19513,20 +19516,20 @@ const Lw = () => {
|
|
|
19513
19516
|
};
|
|
19514
19517
|
switch (b.push({ className: x }), x) {
|
|
19515
19518
|
case "open":
|
|
19516
|
-
|
|
19519
|
+
w.href = (d == null ? void 0 : d.full) || "", w.onClick = (T) => {
|
|
19517
19520
|
T.preventDefault(), T.stopPropagation(), window.open((d == null ? void 0 : d.full) || "", "_blank"), s([{ type: "showLinkEditor", value: !1 }]);
|
|
19518
|
-
},
|
|
19519
|
-
|
|
19521
|
+
}, w.children = /* @__PURE__ */ c.jsxs(c.Fragment, { children: [
|
|
19522
|
+
w.children,
|
|
19520
19523
|
/* @__PURE__ */ c.jsx(qe, { children: e.formatMessage({ id: `${t}${x}_text` }) })
|
|
19521
19524
|
] });
|
|
19522
19525
|
break;
|
|
19523
19526
|
case "edit":
|
|
19524
|
-
|
|
19527
|
+
w.onClick = () => {
|
|
19525
19528
|
g(!1);
|
|
19526
19529
|
};
|
|
19527
19530
|
break;
|
|
19528
19531
|
case "remove":
|
|
19529
|
-
|
|
19532
|
+
w.onClick = () => {
|
|
19530
19533
|
const T = [
|
|
19531
19534
|
{ type: "showLinkEditor", value: !1 }
|
|
19532
19535
|
];
|
|
@@ -19534,7 +19537,7 @@ const Lw = () => {
|
|
|
19534
19537
|
};
|
|
19535
19538
|
break;
|
|
19536
19539
|
}
|
|
19537
|
-
return
|
|
19540
|
+
return w;
|
|
19538
19541
|
}), _ = [
|
|
19539
19542
|
{
|
|
19540
19543
|
id: "url",
|
|
@@ -19560,8 +19563,8 @@ const Lw = () => {
|
|
|
19560
19563
|
if (!u)
|
|
19561
19564
|
return;
|
|
19562
19565
|
x.preventDefault(), x.stopPropagation();
|
|
19563
|
-
const
|
|
19564
|
-
J.select(u,
|
|
19566
|
+
const w = y.end(u, []);
|
|
19567
|
+
J.select(u, w), ee.focus(u);
|
|
19565
19568
|
}
|
|
19566
19569
|
}
|
|
19567
19570
|
}
|
|
@@ -19606,15 +19609,15 @@ const Lw = () => {
|
|
|
19606
19609
|
functions: {
|
|
19607
19610
|
onSuccess: async (x) => {
|
|
19608
19611
|
setTimeout(async () => {
|
|
19609
|
-
const
|
|
19612
|
+
const w = [
|
|
19610
19613
|
{ type: "showLinkEditor", value: !1 }
|
|
19611
19614
|
];
|
|
19612
19615
|
let T = x.url;
|
|
19613
19616
|
if (x.url) {
|
|
19614
19617
|
const { full: I } = ro(x.url);
|
|
19615
|
-
T = I, d != null && d.full ? Iw(u, T, n, l) : $w(u, T, n, l),
|
|
19618
|
+
T = I, d != null && d.full ? Iw(u, T, n, l) : $w(u, T, n, l), w.push({ type: "lastAnchor", value: null });
|
|
19616
19619
|
}
|
|
19617
|
-
if (s(
|
|
19620
|
+
if (s(w), x.url && o && (!m || a && (d == null ? void 0 : d.full) === a.url)) {
|
|
19618
19621
|
const I = await o(T);
|
|
19619
19622
|
I.url && s([{ type: "enrichedUrl", value: I }]);
|
|
19620
19623
|
}
|
|
@@ -20591,10 +20594,10 @@ const Gf = ({
|
|
|
20591
20594
|
hasInteracted: !1,
|
|
20592
20595
|
hasLoaded: !1,
|
|
20593
20596
|
enrichedUrl: !1
|
|
20594
|
-
}, [x,
|
|
20597
|
+
}, [x, w] = pr(ua, B), {
|
|
20595
20598
|
editorKey: T,
|
|
20596
20599
|
originalValue: I,
|
|
20597
|
-
initialValue:
|
|
20600
|
+
initialValue: P,
|
|
20598
20601
|
stringValue: z,
|
|
20599
20602
|
lastAnchor: $,
|
|
20600
20603
|
lastKey: k,
|
|
@@ -20603,11 +20606,11 @@ const Gf = ({
|
|
|
20603
20606
|
enrichedUrl: S,
|
|
20604
20607
|
mentionPopover: U
|
|
20605
20608
|
} = x, H = (j) => {
|
|
20606
|
-
j &&
|
|
20609
|
+
j && w([{ type: "tabbableOption", value: j || Ji[0] }]);
|
|
20607
20610
|
}, ae = async (j) => {
|
|
20608
|
-
const
|
|
20609
|
-
|
|
20610
|
-
}, re = `rte-${e}`,
|
|
20611
|
+
const N = await v(j);
|
|
20612
|
+
N.url && w([{ type: "enrichedUrl", value: N }]);
|
|
20613
|
+
}, re = `rte-${e}`, D = Me(
|
|
20611
20614
|
(j) => /* @__PURE__ */ c.jsx(cg, { ...j }),
|
|
20612
20615
|
[]
|
|
20613
20616
|
), X = Me((j) => /* @__PURE__ */ c.jsx(dg, { ...j }), []), V = Gt(
|
|
@@ -20626,13 +20629,13 @@ const Gf = ({
|
|
|
20626
20629
|
), F = (j) => {
|
|
20627
20630
|
if (!V || j !== re)
|
|
20628
20631
|
return;
|
|
20629
|
-
const
|
|
20630
|
-
J.select(V,
|
|
20632
|
+
const N = y.end(V, []);
|
|
20633
|
+
J.select(V, N), ee.focus(V);
|
|
20631
20634
|
};
|
|
20632
20635
|
de(() => {
|
|
20633
|
-
const j = (
|
|
20636
|
+
const j = (N) => {
|
|
20634
20637
|
var q;
|
|
20635
|
-
const L =
|
|
20638
|
+
const L = N, Z = ((q = L == null ? void 0 : L.detail) == null ? void 0 : q.id) || null;
|
|
20636
20639
|
Z && F(Z);
|
|
20637
20640
|
};
|
|
20638
20641
|
return window.addEventListener("focusEditor", j), () => {
|
|
@@ -20640,14 +20643,14 @@ const Gf = ({
|
|
|
20640
20643
|
};
|
|
20641
20644
|
}, []), de(() => {
|
|
20642
20645
|
if (V.children.length > 0 && !O) {
|
|
20643
|
-
if (
|
|
20646
|
+
if (w([{ type: "hasLoaded", value: !0 }]), !s)
|
|
20644
20647
|
return;
|
|
20645
20648
|
F(re);
|
|
20646
20649
|
}
|
|
20647
|
-
}, [V.children.length,
|
|
20650
|
+
}, [V.children.length, P]), de(() => {
|
|
20648
20651
|
I && (async () => {
|
|
20649
|
-
let
|
|
20650
|
-
if (
|
|
20652
|
+
let N = Sn(I);
|
|
20653
|
+
if (N.includes("<")) {
|
|
20651
20654
|
Qr.prototype.escape = (Z) => Z;
|
|
20652
20655
|
const L = new Qr();
|
|
20653
20656
|
L.addRule("br", {
|
|
@@ -20655,32 +20658,32 @@ const Gf = ({
|
|
|
20655
20658
|
replacement: (Z) => Z + `
|
|
20656
20659
|
|
|
20657
20660
|
`
|
|
20658
|
-
}),
|
|
20661
|
+
}), N = L.turndown(N);
|
|
20659
20662
|
}
|
|
20660
|
-
o && o.mentions && (
|
|
20661
|
-
text:
|
|
20663
|
+
o && o.mentions && (N = await Yc({
|
|
20664
|
+
text: N,
|
|
20662
20665
|
template: `[${Us}{{name}}]({{id}})`,
|
|
20663
20666
|
mentions: o.mentions,
|
|
20664
20667
|
listMembers: m || (() => Promise.resolve([]))
|
|
20665
|
-
})), Fw(
|
|
20668
|
+
})), Fw(N, (L) => {
|
|
20666
20669
|
const Z = [
|
|
20667
20670
|
{ type: "initialValue", value: L },
|
|
20668
20671
|
{ type: "editorKey", value: I.toString() }
|
|
20669
20672
|
];
|
|
20670
|
-
o != null && o.link && (Z.push({ type: "enrichedUrl", value: o.link }), o.link.url && ae(o.link.url)),
|
|
20671
|
-
|
|
20673
|
+
o != null && o.link && (Z.push({ type: "enrichedUrl", value: o.link }), o.link.url && ae(o.link.url)), w(Z), setTimeout(() => {
|
|
20674
|
+
w([{ type: "stringValue", value: bc(V) }]);
|
|
20672
20675
|
}, 150);
|
|
20673
20676
|
});
|
|
20674
20677
|
})();
|
|
20675
20678
|
}, [I]), de(() => {
|
|
20676
20679
|
if (S === void 0 && V) {
|
|
20677
|
-
const
|
|
20678
|
-
|
|
20680
|
+
const N = Tw(V);
|
|
20681
|
+
N && ae(N);
|
|
20679
20682
|
}
|
|
20680
|
-
const j = (
|
|
20683
|
+
const j = (N) => {
|
|
20681
20684
|
var q;
|
|
20682
|
-
const L =
|
|
20683
|
-
Z && S && S.url === Z &&
|
|
20685
|
+
const L = N, Z = ((q = L == null ? void 0 : L.detail) == null ? void 0 : q.url) || null;
|
|
20686
|
+
Z && S && S.url === Z && w([{ type: "enrichedUrl", value: void 0 }]);
|
|
20684
20687
|
};
|
|
20685
20688
|
return window.addEventListener("linkRemoved", j), () => {
|
|
20686
20689
|
window.removeEventListener("linkRemoved", j);
|
|
@@ -20689,7 +20692,7 @@ const Gf = ({
|
|
|
20689
20692
|
if (t) {
|
|
20690
20693
|
$i.lastIndex = 0;
|
|
20691
20694
|
const j = t.match($i);
|
|
20692
|
-
j && j.length === 1 && j[0].length === t.length && !E &&
|
|
20695
|
+
j && j.length === 1 && j[0].length === t.length && !E && w([{ type: "originalValue", value: t }]);
|
|
20693
20696
|
}
|
|
20694
20697
|
t !== "" || !V || Mi(I, t) && !E || (y.withoutNormalizing(V, () => {
|
|
20695
20698
|
J.delete(V, {
|
|
@@ -20698,7 +20701,7 @@ const Gf = ({
|
|
|
20698
20701
|
focus: y.end(V, [])
|
|
20699
20702
|
}
|
|
20700
20703
|
}), J.deselect(V), V.children.length !== 0 && J.unwrapNodes(V, { at: [0] }), J.insertNodes(V, _, { at: [0] });
|
|
20701
|
-
}),
|
|
20704
|
+
}), w([
|
|
20702
20705
|
{ type: "initialValue", value: _ },
|
|
20703
20706
|
{ type: "lastAnchor", value: null },
|
|
20704
20707
|
{ type: "enrichedUrl", value: !1 }
|
|
@@ -20706,7 +20709,7 @@ const Gf = ({
|
|
|
20706
20709
|
}, [t]), de(() => {
|
|
20707
20710
|
f({ link: S });
|
|
20708
20711
|
}, [S]), de(() => {
|
|
20709
|
-
z === "" && S &&
|
|
20712
|
+
z === "" && S && w([{ type: "enrichedUrl", value: void 0 }]);
|
|
20710
20713
|
}, [z]);
|
|
20711
20714
|
const A = qc(() => {
|
|
20712
20715
|
jw({
|
|
@@ -20714,10 +20717,10 @@ const Gf = ({
|
|
|
20714
20717
|
isShowing: U.show,
|
|
20715
20718
|
numberOfUsers: U.numberOfUsers,
|
|
20716
20719
|
listMembers: m,
|
|
20717
|
-
dispatch:
|
|
20720
|
+
dispatch: w
|
|
20718
20721
|
});
|
|
20719
20722
|
}, 100);
|
|
20720
|
-
return
|
|
20723
|
+
return P ? /* @__PURE__ */ c.jsx("div", { id: re, className: "rich-text-editor", children: /* @__PURE__ */ c.jsxs(
|
|
20721
20724
|
fn.Provider,
|
|
20722
20725
|
{
|
|
20723
20726
|
value: {
|
|
@@ -20725,7 +20728,7 @@ const Gf = ({
|
|
|
20725
20728
|
id: re,
|
|
20726
20729
|
isInOverlay: h,
|
|
20727
20730
|
setFocus: H,
|
|
20728
|
-
dispatch:
|
|
20731
|
+
dispatch: w,
|
|
20729
20732
|
getLinkPreview: v,
|
|
20730
20733
|
onMention: b,
|
|
20731
20734
|
reportError: C
|
|
@@ -20735,11 +20738,11 @@ const Gf = ({
|
|
|
20735
20738
|
Y1,
|
|
20736
20739
|
{
|
|
20737
20740
|
editor: V,
|
|
20738
|
-
initialValue:
|
|
20741
|
+
initialValue: P,
|
|
20739
20742
|
onChange: (j) => {
|
|
20740
20743
|
if (V.operations.some((L) => L.type !== "set_selection")) {
|
|
20741
20744
|
let L = Pw(j);
|
|
20742
|
-
L === "<br>" && (L = ""), g(L, S),
|
|
20745
|
+
L === "<br>" && (L = ""), g(L, S), w([{ type: "stringValue", value: bc(V) }]), E || w([{ type: "hasInteracted", value: !0 }]), A(), d && console.log({ serialized: L, json: j });
|
|
20743
20746
|
}
|
|
20744
20747
|
},
|
|
20745
20748
|
...l,
|
|
@@ -20748,13 +20751,13 @@ const Gf = ({
|
|
|
20748
20751
|
L1,
|
|
20749
20752
|
{
|
|
20750
20753
|
className: "input",
|
|
20751
|
-
renderElement:
|
|
20754
|
+
renderElement: D,
|
|
20752
20755
|
renderLeaf: X,
|
|
20753
20756
|
placeholder: n || u.formatMessage({ id: "richTextEditor_placeholder" }),
|
|
20754
20757
|
autoFocus: s,
|
|
20755
20758
|
tabIndex: 0,
|
|
20756
20759
|
onPaste: async (j) => {
|
|
20757
|
-
const
|
|
20760
|
+
const N = S !== !1, L = j.clipboardData.getData("text");
|
|
20758
20761
|
if (((q) => {
|
|
20759
20762
|
try {
|
|
20760
20763
|
return new URL(q), !0;
|
|
@@ -20767,18 +20770,18 @@ const Gf = ({
|
|
|
20767
20770
|
const { full: ne } = ro(L);
|
|
20768
20771
|
q = ne;
|
|
20769
20772
|
}
|
|
20770
|
-
if (L && v && !
|
|
20773
|
+
if (L && v && !N) {
|
|
20771
20774
|
const ne = await v(q);
|
|
20772
|
-
ne.url &&
|
|
20775
|
+
ne.url && w([{ type: "enrichedUrl", value: ne }]);
|
|
20773
20776
|
}
|
|
20774
20777
|
}
|
|
20775
20778
|
},
|
|
20776
20779
|
onKeyDown: (j) => {
|
|
20777
20780
|
if (j.key === "Enter") {
|
|
20778
|
-
U.show && (j.preventDefault(), j.stopPropagation(), Pf(V, U,
|
|
20779
|
-
const { selection:
|
|
20780
|
-
if (
|
|
20781
|
-
const L = G.isCollapsed(
|
|
20781
|
+
U.show && (j.preventDefault(), j.stopPropagation(), Pf(V, U, w, re));
|
|
20782
|
+
const { selection: N } = V;
|
|
20783
|
+
if (N) {
|
|
20784
|
+
const L = G.isCollapsed(N), [Z, q] = y.node(V, N, { depth: 1 });
|
|
20782
20785
|
let ne = Z, ue = ne.type;
|
|
20783
20786
|
const Q = ne.children[0];
|
|
20784
20787
|
if (Q && [Y.ol, Y.ul].includes(Q.type) && (ne = Q, ue = Q.type), ne && he.isElement(ne) && ue !== Y.paragraph) {
|
|
@@ -20787,7 +20790,7 @@ const Gf = ({
|
|
|
20787
20790
|
return;
|
|
20788
20791
|
}
|
|
20789
20792
|
if (L) {
|
|
20790
|
-
const [ve, ge] = y.parent(V,
|
|
20793
|
+
const [ve, ge] = y.parent(V, N, {
|
|
20791
20794
|
edge: "end"
|
|
20792
20795
|
}), je = ve.type;
|
|
20793
20796
|
if ([Y.ul, Y.ol].includes(ue))
|
|
@@ -20816,34 +20819,34 @@ const Gf = ({
|
|
|
20816
20819
|
}
|
|
20817
20820
|
} else if (j.key === "Escape") {
|
|
20818
20821
|
if (U.show) {
|
|
20819
|
-
j.preventDefault(), j.stopPropagation(),
|
|
20822
|
+
j.preventDefault(), j.stopPropagation(), w([
|
|
20820
20823
|
{ type: "mentionPopover", value: { ...U, show: !1 } }
|
|
20821
20824
|
]);
|
|
20822
20825
|
return;
|
|
20823
20826
|
}
|
|
20824
20827
|
} else if (["ArrowUp", "ArrowDown"].includes(j.key) && U.show) {
|
|
20825
20828
|
j.preventDefault(), j.stopPropagation();
|
|
20826
|
-
const { selectedUser:
|
|
20827
|
-
let Z = j.key === "ArrowUp" ?
|
|
20828
|
-
Z < 0 && (Z = L.length - 1), Z >= L.length + 1 && (Z = 0),
|
|
20829
|
+
const { selectedUser: N, possibleUsers: L } = U;
|
|
20830
|
+
let Z = j.key === "ArrowUp" ? N - 1 : N + 1;
|
|
20831
|
+
Z < 0 && (Z = L.length - 1), Z >= L.length + 1 && (Z = 0), w([
|
|
20829
20832
|
{
|
|
20830
20833
|
type: "mentionPopover",
|
|
20831
20834
|
value: { ...U, selectedUser: Z }
|
|
20832
20835
|
}
|
|
20833
20836
|
]);
|
|
20834
20837
|
}
|
|
20835
|
-
|
|
20838
|
+
w([{ type: "lastKey", value: j.key }]), Sw(j, V, w, C);
|
|
20836
20839
|
},
|
|
20837
20840
|
onBlur: () => {
|
|
20838
|
-
V.selection &&
|
|
20841
|
+
V.selection && w([{ type: "lastAnchor", value: V.selection.anchor }]);
|
|
20839
20842
|
},
|
|
20840
20843
|
onFocus: () => {
|
|
20841
20844
|
if ($) {
|
|
20842
20845
|
if (!R.isPath($.path) || !oe.has(V, $.path))
|
|
20843
20846
|
return;
|
|
20844
20847
|
const j = oe.get(V, $.path);
|
|
20845
|
-
let
|
|
20846
|
-
if (me.isText(j) ?
|
|
20848
|
+
let N = 0;
|
|
20849
|
+
if (me.isText(j) ? N = j.text.length : j.children && (N = j.children.length), $.offset > N)
|
|
20847
20850
|
return;
|
|
20848
20851
|
try {
|
|
20849
20852
|
J.select(V, {
|
|
@@ -20864,7 +20867,7 @@ const Gf = ({
|
|
|
20864
20867
|
data: S,
|
|
20865
20868
|
variant: "condensed",
|
|
20866
20869
|
onClick: () => {
|
|
20867
|
-
|
|
20870
|
+
w([{ type: "enrichedUrl", value: !1 }]);
|
|
20868
20871
|
const j = new CustomEvent("ariaLive", {
|
|
20869
20872
|
detail: {
|
|
20870
20873
|
message: u.formatMessage({
|
|
@@ -20976,9 +20979,9 @@ function SC({
|
|
|
20976
20979
|
const x = B.target.files && B.target.files[0];
|
|
20977
20980
|
if (!x || !t)
|
|
20978
20981
|
throw m(!1), new Error("Image file or userID is missing");
|
|
20979
|
-
const
|
|
20980
|
-
thumbnail:
|
|
20981
|
-
full:
|
|
20982
|
+
const w = await i({ fileObject: x, userId: t }), T = {
|
|
20983
|
+
thumbnail: w.thumbnailURL,
|
|
20984
|
+
full: w.originalURL
|
|
20982
20985
|
};
|
|
20983
20986
|
d(T), s(T);
|
|
20984
20987
|
} catch {
|
|
@@ -21132,11 +21135,11 @@ const OC = ({ emails: e, setEmails: t, setIsDisabled: n }) => {
|
|
|
21132
21135
|
"SUCCESS"
|
|
21133
21136
|
/* SUCCESS */
|
|
21134
21137
|
);
|
|
21135
|
-
} catch (
|
|
21138
|
+
} catch (w) {
|
|
21136
21139
|
v(
|
|
21137
21140
|
"ERROR"
|
|
21138
21141
|
/* ERROR */
|
|
21139
|
-
), l(
|
|
21142
|
+
), l(w);
|
|
21140
21143
|
}
|
|
21141
21144
|
}, _ = (x) => {
|
|
21142
21145
|
x.preventDefault(), v(
|
|
@@ -21266,129 +21269,138 @@ const OC = ({ emails: e, setEmails: t, setIsDisabled: n }) => {
|
|
|
21266
21269
|
r && /* @__PURE__ */ c.jsx(zn, { variant: "error", text: r })
|
|
21267
21270
|
] });
|
|
21268
21271
|
};
|
|
21269
|
-
const NC = ({
|
|
21270
|
-
|
|
21271
|
-
|
|
21272
|
-
|
|
21273
|
-
|
|
21272
|
+
const NC = ({
|
|
21273
|
+
isCreateProfile: e = !1,
|
|
21274
|
+
hooks: t,
|
|
21275
|
+
functions: n,
|
|
21276
|
+
meta: r = {},
|
|
21277
|
+
gtm: i
|
|
21278
|
+
}) => {
|
|
21279
|
+
var T, I;
|
|
21280
|
+
const a = ce(), s = "profileForm_", o = Re(pt), [l, u] = le(o.image), [d, h] = le(!1), {
|
|
21281
|
+
uploadImage: m = () => {
|
|
21274
21282
|
},
|
|
21275
|
-
|
|
21283
|
+
onSuccess: p = async (P) => {
|
|
21276
21284
|
},
|
|
21277
|
-
|
|
21285
|
+
onCancel: g = () => {
|
|
21286
|
+
},
|
|
21287
|
+
onFailure: f = () => {
|
|
21278
21288
|
}
|
|
21279
|
-
} =
|
|
21280
|
-
return /* @__PURE__ */ c.jsx(
|
|
21281
|
-
dn,
|
|
21289
|
+
} = n, { buildLocation: v, isValidPlace: b, predictPlaces: C } = t.useMaps(), { context: _ = "ProfileForm", event: B = "profile-form-submit-click" } = i || {}, x = [
|
|
21282
21290
|
{
|
|
21283
|
-
id: "
|
|
21284
|
-
|
|
21285
|
-
|
|
21286
|
-
|
|
21287
|
-
|
|
21288
|
-
|
|
21289
|
-
|
|
21290
|
-
|
|
21291
|
-
|
|
21292
|
-
|
|
21293
|
-
|
|
21294
|
-
|
|
21295
|
-
|
|
21296
|
-
|
|
21297
|
-
|
|
21298
|
-
|
|
21299
|
-
|
|
21300
|
-
|
|
21301
|
-
|
|
21302
|
-
|
|
21303
|
-
|
|
21304
|
-
|
|
21305
|
-
|
|
21306
|
-
|
|
21307
|
-
|
|
21308
|
-
},
|
|
21309
|
-
{
|
|
21310
|
-
id: "jobTitle",
|
|
21311
|
-
type: "text",
|
|
21312
|
-
label: i.formatMessage({ id: `${a}jobTitle` }),
|
|
21313
|
-
placeholder: i.formatMessage({ id: `${a}jobTitle_placeholder` }),
|
|
21314
|
-
value: s.jobTitle,
|
|
21315
|
-
validation: [{ condition: "required" }]
|
|
21316
|
-
},
|
|
21291
|
+
id: "jobTitle",
|
|
21292
|
+
type: "text",
|
|
21293
|
+
label: a.formatMessage({ id: `${s}jobTitle` }),
|
|
21294
|
+
placeholder: a.formatMessage({ id: `${s}jobTitle_placeholder` }),
|
|
21295
|
+
value: o.jobTitle,
|
|
21296
|
+
validation: [{ condition: "required" }]
|
|
21297
|
+
},
|
|
21298
|
+
{
|
|
21299
|
+
id: "organization",
|
|
21300
|
+
type: "text",
|
|
21301
|
+
label: a.formatMessage({ id: `${s}organization` }),
|
|
21302
|
+
placeholder: a.formatMessage({
|
|
21303
|
+
id: `${s}organization_placeholder`
|
|
21304
|
+
}),
|
|
21305
|
+
value: o.organization,
|
|
21306
|
+
validation: [{ condition: "required" }]
|
|
21307
|
+
},
|
|
21308
|
+
{
|
|
21309
|
+
id: "location",
|
|
21310
|
+
type: "autocomplete",
|
|
21311
|
+
label: a.formatMessage({ id: `${s}location` }),
|
|
21312
|
+
placeholder: a.formatMessage({ id: `${s}location_placeholder` }),
|
|
21313
|
+
value: ((T = o.location) == null ? void 0 : T.en) || ((I = o.location) == null ? void 0 : I.country),
|
|
21314
|
+
validation: [
|
|
21315
|
+
{ condition: "required" },
|
|
21317
21316
|
{
|
|
21318
|
-
|
|
21319
|
-
|
|
21320
|
-
|
|
21321
|
-
|
|
21322
|
-
|
|
21323
|
-
|
|
21324
|
-
|
|
21325
|
-
validation: [{ condition: "required" }]
|
|
21317
|
+
condition: ({ location: P }) => P && !d ? !1 : !b(P),
|
|
21318
|
+
error: a.formatMessage({ id: `${s}location_error` })
|
|
21319
|
+
}
|
|
21320
|
+
],
|
|
21321
|
+
functions: {
|
|
21322
|
+
onChange: () => {
|
|
21323
|
+
d || h(!0);
|
|
21326
21324
|
},
|
|
21327
|
-
|
|
21328
|
-
|
|
21329
|
-
|
|
21330
|
-
|
|
21331
|
-
|
|
21332
|
-
|
|
21333
|
-
|
|
21334
|
-
|
|
21335
|
-
|
|
21336
|
-
|
|
21337
|
-
|
|
21338
|
-
|
|
21339
|
-
|
|
21340
|
-
|
|
21341
|
-
|
|
21342
|
-
|
|
21343
|
-
}
|
|
21344
|
-
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
21345
|
-
// @ts-ignore
|
|
21346
|
-
onKeyInput: b
|
|
21325
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
21326
|
+
// @ts-ignore
|
|
21327
|
+
onKeyInput: C
|
|
21328
|
+
}
|
|
21329
|
+
}
|
|
21330
|
+
], w = [
|
|
21331
|
+
{
|
|
21332
|
+
component: SC,
|
|
21333
|
+
props: {
|
|
21334
|
+
userName: o.name,
|
|
21335
|
+
userId: o.id,
|
|
21336
|
+
src: l,
|
|
21337
|
+
uploadImage: m,
|
|
21338
|
+
callback: u,
|
|
21339
|
+
button: {
|
|
21340
|
+
text: {
|
|
21341
|
+
upload: a.formatMessage({ id: `${s}image` })
|
|
21347
21342
|
}
|
|
21348
|
-
},
|
|
21349
|
-
{
|
|
21350
|
-
id: "biography",
|
|
21351
|
-
type: "textarea",
|
|
21352
|
-
label: i.formatMessage({ id: `${a}bio` }),
|
|
21353
|
-
placeholder: i.formatMessage({ id: `${a}bio_placeholder` }),
|
|
21354
|
-
limit: 1e3,
|
|
21355
|
-
value: s.biography
|
|
21356
|
-
},
|
|
21357
|
-
{
|
|
21358
|
-
component: un
|
|
21359
21343
|
}
|
|
21360
|
-
|
|
21344
|
+
}
|
|
21345
|
+
},
|
|
21346
|
+
{
|
|
21347
|
+
id: "name",
|
|
21348
|
+
type: "text",
|
|
21349
|
+
label: a.formatMessage({ id: `${s}name` }),
|
|
21350
|
+
placeholder: a.formatMessage({ id: `${s}name_placeholder` }),
|
|
21351
|
+
value: o.name,
|
|
21352
|
+
autoComplete: "name",
|
|
21353
|
+
validation: [{ condition: "required" }]
|
|
21354
|
+
},
|
|
21355
|
+
...x,
|
|
21356
|
+
{
|
|
21357
|
+
id: "biography",
|
|
21358
|
+
type: "textarea",
|
|
21359
|
+
label: a.formatMessage({ id: `${s}bio` }),
|
|
21360
|
+
placeholder: a.formatMessage({ id: `${s}bio_placeholder` }),
|
|
21361
|
+
limit: 1e3,
|
|
21362
|
+
value: o.biography
|
|
21363
|
+
},
|
|
21364
|
+
{
|
|
21365
|
+
component: un
|
|
21366
|
+
}
|
|
21367
|
+
];
|
|
21368
|
+
return /* @__PURE__ */ c.jsx(
|
|
21369
|
+
dn,
|
|
21370
|
+
{
|
|
21371
|
+
id: "profile-details-form",
|
|
21372
|
+
fields: e ? x : w,
|
|
21361
21373
|
meta: {
|
|
21362
|
-
shouldShowCancelButton: !
|
|
21374
|
+
shouldShowCancelButton: !e,
|
|
21363
21375
|
shouldReset: !1,
|
|
21364
21376
|
shouldHide: !1,
|
|
21365
|
-
showRequiredLabels:
|
|
21366
|
-
...
|
|
21377
|
+
showRequiredLabels: e,
|
|
21378
|
+
...r
|
|
21367
21379
|
},
|
|
21368
|
-
intlPath:
|
|
21369
|
-
gtm: { context:
|
|
21380
|
+
intlPath: s,
|
|
21381
|
+
gtm: { context: _, event: B },
|
|
21370
21382
|
functions: {
|
|
21371
|
-
onSuccess: async (
|
|
21383
|
+
onSuccess: async (P) => {
|
|
21372
21384
|
try {
|
|
21373
|
-
const
|
|
21374
|
-
...
|
|
21375
|
-
image:
|
|
21376
|
-
location:
|
|
21385
|
+
const z = {
|
|
21386
|
+
...P,
|
|
21387
|
+
image: l || null,
|
|
21388
|
+
location: d ? await v(P == null ? void 0 : P.location) : o.location
|
|
21377
21389
|
};
|
|
21378
|
-
|
|
21390
|
+
o.updateDetails && o.updateDetails(($) => ({ ...$, ...z })), await p(z);
|
|
21379
21391
|
} catch {
|
|
21380
|
-
|
|
21392
|
+
f();
|
|
21381
21393
|
}
|
|
21382
21394
|
},
|
|
21383
|
-
onCancel:
|
|
21384
|
-
onFailure:
|
|
21395
|
+
onCancel: g,
|
|
21396
|
+
onFailure: f
|
|
21385
21397
|
},
|
|
21386
21398
|
button: {
|
|
21387
21399
|
size: "large",
|
|
21388
21400
|
text: {
|
|
21389
|
-
default:
|
|
21390
|
-
submitting:
|
|
21391
|
-
submitted:
|
|
21401
|
+
default: a.formatMessage({ id: `${s}cta` }),
|
|
21402
|
+
submitting: a.formatMessage({ id: `${s}cta_submitting` }),
|
|
21403
|
+
submitted: a.formatMessage({ id: `${s}cta_submitted` })
|
|
21392
21404
|
}
|
|
21393
21405
|
}
|
|
21394
21406
|
}
|
|
@@ -21410,9 +21422,9 @@ const yt = "publishArticleForm_", _c = {}, kc = 10, nk = ({
|
|
|
21410
21422
|
}, [t.body]);
|
|
21411
21423
|
const b = () => {
|
|
21412
21424
|
!s || !s.id ? g(a.formatMessage({ id: `${yt}error_loggedOut` })) : p && g(!1);
|
|
21413
|
-
}, C = (
|
|
21425
|
+
}, C = (w) => ({
|
|
21414
21426
|
condition: (T) => {
|
|
21415
|
-
const I = T[
|
|
21427
|
+
const I = T[w];
|
|
21416
21428
|
return !I || typeof I != "string" ? !0 : I.length < kc;
|
|
21417
21429
|
},
|
|
21418
21430
|
error: a.formatMessage(
|
|
@@ -21474,8 +21486,8 @@ const yt = "publishArticleForm_", _c = {}, kc = 10, nk = ({
|
|
|
21474
21486
|
meta: { isInOverlay: d },
|
|
21475
21487
|
autoFocus: !1,
|
|
21476
21488
|
functions: {
|
|
21477
|
-
onChange: (
|
|
21478
|
-
m(
|
|
21489
|
+
onChange: (w) => {
|
|
21490
|
+
m(w), b();
|
|
21479
21491
|
}
|
|
21480
21492
|
},
|
|
21481
21493
|
"aria-invalid": !!p,
|
|
@@ -21495,11 +21507,11 @@ const yt = "publishArticleForm_", _c = {}, kc = 10, nk = ({
|
|
|
21495
21507
|
showRequiredLabels: !1
|
|
21496
21508
|
},
|
|
21497
21509
|
functions: {
|
|
21498
|
-
onSuccess: async (
|
|
21510
|
+
onSuccess: async (w) => {
|
|
21499
21511
|
if (!s || !s.id || _)
|
|
21500
21512
|
return;
|
|
21501
21513
|
os && clearTimeout(os);
|
|
21502
|
-
const T = { ...
|
|
21514
|
+
const T = { ...w, body: h };
|
|
21503
21515
|
try {
|
|
21504
21516
|
o && await o(T), os = setTimeout(() => {
|
|
21505
21517
|
m(""), v(a.formatMessage({ id: `${yt}aria_success` })), l(T);
|
|
@@ -21900,11 +21912,11 @@ const zC = {
|
|
|
21900
21912
|
shouldManuallyApprove: _,
|
|
21901
21913
|
shouldDisableButton: B,
|
|
21902
21914
|
showSuccessMessage: x,
|
|
21903
|
-
showError:
|
|
21915
|
+
showError: w
|
|
21904
21916
|
} = f, [T, I] = $c([
|
|
21905
21917
|
"signup-this-session",
|
|
21906
21918
|
"functional-cookie-consent"
|
|
21907
|
-
]),
|
|
21919
|
+
]), P = {
|
|
21908
21920
|
form: te.createRef(),
|
|
21909
21921
|
name: te.createRef(),
|
|
21910
21922
|
email: te.createRef(),
|
|
@@ -21914,7 +21926,7 @@ const zC = {
|
|
|
21914
21926
|
hiddenValidation: te.createRef()
|
|
21915
21927
|
};
|
|
21916
21928
|
de(() => {
|
|
21917
|
-
_ === !0 &&
|
|
21929
|
+
_ === !0 && P.jobTitle.current && P.jobTitle.current.focus();
|
|
21918
21930
|
}, [_]), de(() => {
|
|
21919
21931
|
T["signup-this-session"] && v([{ type: "showSuccessMessage", value: !0 }]);
|
|
21920
21932
|
}, [T]), de(() => {
|
|
@@ -21928,12 +21940,12 @@ const zC = {
|
|
|
21928
21940
|
labels: t,
|
|
21929
21941
|
shouldShow: g,
|
|
21930
21942
|
functions: r,
|
|
21931
|
-
refs:
|
|
21943
|
+
refs: P,
|
|
21932
21944
|
state: f,
|
|
21933
21945
|
dispatch: v,
|
|
21934
21946
|
dataToSubmit: s,
|
|
21935
21947
|
intl: l
|
|
21936
|
-
}), [s, r, l,
|
|
21948
|
+
}), [s, r, l, P, g, f]), $ = B ? !0 : _ ? !Object.values(b).every((k) => k === !0) : !b.name || !b.email || ["exists", "pending", "verify"].includes(C.boxType);
|
|
21937
21949
|
return g.successMessage && x ? /* @__PURE__ */ c.jsx(LC, { className: e }) : /* @__PURE__ */ c.jsxs(
|
|
21938
21950
|
"fieldset",
|
|
21939
21951
|
{
|
|
@@ -21941,7 +21953,7 @@ const zC = {
|
|
|
21941
21953
|
"data-testid": "signup-form",
|
|
21942
21954
|
children: [
|
|
21943
21955
|
g.title && /* @__PURE__ */ c.jsx("p", { className: "signup-title", children: /* @__PURE__ */ c.jsx(mt, { id: "signup_title" }) }),
|
|
21944
|
-
|
|
21956
|
+
w && /* @__PURE__ */ c.jsx(
|
|
21945
21957
|
zn,
|
|
21946
21958
|
{
|
|
21947
21959
|
variant: "error",
|
|
@@ -21952,7 +21964,7 @@ const zC = {
|
|
|
21952
21964
|
dn,
|
|
21953
21965
|
{
|
|
21954
21966
|
className: "signup-form",
|
|
21955
|
-
formRef:
|
|
21967
|
+
formRef: P.form,
|
|
21956
21968
|
id: "sign-up-form",
|
|
21957
21969
|
fields: z,
|
|
21958
21970
|
intlPath: "signup",
|
|
@@ -21986,7 +21998,7 @@ const zC = {
|
|
|
21986
21998
|
functions: {
|
|
21987
21999
|
onSuccess: async () => {
|
|
21988
22000
|
await $C({
|
|
21989
|
-
refs:
|
|
22001
|
+
refs: P,
|
|
21990
22002
|
dataToSubmit: s,
|
|
21991
22003
|
createAccount: r.createAccount,
|
|
21992
22004
|
onSuccess: r.onSuccess,
|
|
@@ -22003,7 +22015,7 @@ const zC = {
|
|
|
22003
22015
|
}
|
|
22004
22016
|
}
|
|
22005
22017
|
),
|
|
22006
|
-
/* @__PURE__ */ c.jsx("button", { className: "validation-button", ref:
|
|
22018
|
+
/* @__PURE__ */ c.jsx("button", { className: "validation-button", ref: P.hiddenValidation })
|
|
22007
22019
|
]
|
|
22008
22020
|
}
|
|
22009
22021
|
);
|
|
@@ -23155,10 +23167,10 @@ const HC = () => {
|
|
|
23155
23167
|
variant: h = "default",
|
|
23156
23168
|
circle: m = "default",
|
|
23157
23169
|
modal: p = "default"
|
|
23158
|
-
} = a, g = Rh(), [f, v] = le(""), b = (
|
|
23170
|
+
} = a, g = Rh(), [f, v] = le(""), b = (w) => {
|
|
23159
23171
|
const {
|
|
23160
23172
|
detail: { message: T }
|
|
23161
|
-
} =
|
|
23173
|
+
} = w;
|
|
23162
23174
|
v(T);
|
|
23163
23175
|
};
|
|
23164
23176
|
de(() => (window.scrollTo(0, 0), document.addEventListener("ariaLive", b), () => {
|
|
@@ -23480,10 +23492,10 @@ const rt = "discussion_form_", va = ({
|
|
|
23480
23492
|
isInOverlay: _ = !1,
|
|
23481
23493
|
isAutoFocused: B = !1,
|
|
23482
23494
|
isEditing: x = !1,
|
|
23483
|
-
hasTitleField:
|
|
23495
|
+
hasTitleField: w = !1,
|
|
23484
23496
|
isPrepopulated: T = !1,
|
|
23485
23497
|
showTitle: I = !1,
|
|
23486
|
-
showGuidelines:
|
|
23498
|
+
showGuidelines: P = !0,
|
|
23487
23499
|
showDivider: z = !1,
|
|
23488
23500
|
showSuccessMessage: $ = !0,
|
|
23489
23501
|
showPostType: k = !1,
|
|
@@ -23501,7 +23513,7 @@ const rt = "discussion_form_", va = ({
|
|
|
23501
23513
|
},
|
|
23502
23514
|
onMention: re = () => {
|
|
23503
23515
|
},
|
|
23504
|
-
listMembers:
|
|
23516
|
+
listMembers: D = () => Promise.resolve([]),
|
|
23505
23517
|
clickMentionFallback: X = () => {
|
|
23506
23518
|
},
|
|
23507
23519
|
getLinkPreview: V = () => Promise.resolve({}),
|
|
@@ -23509,11 +23521,11 @@ const rt = "discussion_form_", va = ({
|
|
|
23509
23521
|
create: { projectNames: ["questions-answers"] }
|
|
23510
23522
|
}
|
|
23511
23523
|
} = d, [A, j] = le({
|
|
23512
|
-
title:
|
|
23524
|
+
title: w && w.text || "",
|
|
23513
23525
|
body: x && x.text || T && T.text || "",
|
|
23514
23526
|
categories: x && x.categories ? x.categories : "",
|
|
23515
23527
|
data: h != null && h.link ? { link: h == null ? void 0 : h.link } : {}
|
|
23516
|
-
}), [
|
|
23528
|
+
}), [N, L] = le(l.error || !1), [Z, q] = le(!1);
|
|
23517
23529
|
if (de(() => {
|
|
23518
23530
|
u && !x && T && T !== A.body && j((xe) => ({ ...xe, body: T.text || "" }));
|
|
23519
23531
|
}, [T]), b)
|
|
@@ -23537,7 +23549,7 @@ const rt = "discussion_form_", va = ({
|
|
|
23537
23549
|
`${rt}error_noPermission`,
|
|
23538
23550
|
n.type,
|
|
23539
23551
|
"action"
|
|
23540
|
-
), ie ? L(ie) :
|
|
23552
|
+
), ie ? L(ie) : N && L(!1);
|
|
23541
23553
|
};
|
|
23542
23554
|
let ue = `${n.type}-form`;
|
|
23543
23555
|
if (n.type === "response" || n.type === "reply") {
|
|
@@ -23624,14 +23636,14 @@ const rt = "discussion_form_", va = ({
|
|
|
23624
23636
|
j((W) => ({ ...W, data: xe }));
|
|
23625
23637
|
}, Te = !A.title || !Li(A.title), je = !A.body || !Li(A.body);
|
|
23626
23638
|
let Oe = je;
|
|
23627
|
-
|
|
23639
|
+
w && (Oe = Te && je);
|
|
23628
23640
|
const We = Z === "submitting", He = [
|
|
23629
23641
|
{
|
|
23630
23642
|
component: XC,
|
|
23631
23643
|
props: {
|
|
23632
23644
|
formID: ue,
|
|
23633
23645
|
intlPath: rt,
|
|
23634
|
-
showLabel:
|
|
23646
|
+
showLabel: w !== !1,
|
|
23635
23647
|
type: n.type
|
|
23636
23648
|
}
|
|
23637
23649
|
},
|
|
@@ -23639,7 +23651,7 @@ const rt = "discussion_form_", va = ({
|
|
|
23639
23651
|
component: Gf,
|
|
23640
23652
|
props: {
|
|
23641
23653
|
id: `${ue}-input`,
|
|
23642
|
-
value: Z === "submitting" && !
|
|
23654
|
+
value: Z === "submitting" && !N ? "" : A.body,
|
|
23643
23655
|
placeholder: a || It(
|
|
23644
23656
|
p.formatMessage,
|
|
23645
23657
|
`${rt}placeholder`,
|
|
@@ -23652,25 +23664,25 @@ const rt = "discussion_form_", va = ({
|
|
|
23652
23664
|
onChange: ne,
|
|
23653
23665
|
onChangeData: ge,
|
|
23654
23666
|
onMention: re,
|
|
23655
|
-
listMembers:
|
|
23667
|
+
listMembers: D,
|
|
23656
23668
|
clickMentionFallback: X,
|
|
23657
23669
|
getLinkPreview: V
|
|
23658
23670
|
},
|
|
23659
23671
|
data: h,
|
|
23660
|
-
autoFocus: x !== !1 || B && !
|
|
23661
|
-
"aria-invalid": !!
|
|
23672
|
+
autoFocus: x !== !1 || B && !w,
|
|
23673
|
+
"aria-invalid": !!N,
|
|
23662
23674
|
"aria-errormessage": "error-message"
|
|
23663
23675
|
}
|
|
23664
23676
|
},
|
|
23665
23677
|
{
|
|
23666
23678
|
component: JC,
|
|
23667
|
-
props: { intlPath: rt, showGuidelines:
|
|
23679
|
+
props: { intlPath: rt, showGuidelines: P, type: n.type, gtmContext: m }
|
|
23668
23680
|
}
|
|
23669
23681
|
];
|
|
23670
|
-
z && He.push({ component: un }),
|
|
23682
|
+
z && He.push({ component: un }), w && He.unshift({
|
|
23671
23683
|
id: "title",
|
|
23672
23684
|
type: "text",
|
|
23673
|
-
value:
|
|
23685
|
+
value: w.text,
|
|
23674
23686
|
limit: 250,
|
|
23675
23687
|
label: p.formatMessage({ id: `${rt}titleField_label` }),
|
|
23676
23688
|
placeholder: p.formatMessage({ id: `${rt}titleField_placeholder` }),
|
|
@@ -23712,7 +23724,7 @@ const rt = "discussion_form_", va = ({
|
|
|
23712
23724
|
}
|
|
23713
23725
|
});
|
|
23714
23726
|
let Ze = !g || !g.id || !r || Oe || We;
|
|
23715
|
-
return x && (
|
|
23727
|
+
return x && (w ? Ze = Ze || A.body === x.text && A.title === w.text : Ze = Ze || A.body === x.text), /* @__PURE__ */ c.jsxs(c.Fragment, { children: [
|
|
23716
23728
|
/* @__PURE__ */ c.jsxs(
|
|
23717
23729
|
dn,
|
|
23718
23730
|
{
|
|
@@ -23791,15 +23803,15 @@ const rt = "discussion_form_", va = ({
|
|
|
23791
23803
|
}
|
|
23792
23804
|
),
|
|
23793
23805
|
Z === "submitted" && $ && /* @__PURE__ */ c.jsx(Ur, { className: "success", "data-testid": "success", children: It(p.formatMessage, `${rt}success`, n.type, "action") }),
|
|
23794
|
-
|
|
23795
|
-
{ id:
|
|
23806
|
+
N && /* @__PURE__ */ c.jsx(Ur, { id: "error-message", className: "error", "data-testid": "error", children: l.error ? l.error : typeof N == "string" ? N.includes(" ") ? N : p.formatMessage(
|
|
23807
|
+
{ id: N },
|
|
23796
23808
|
{
|
|
23797
23809
|
action: p.formatMessage({
|
|
23798
23810
|
id: `discussion_action_${n.type}`
|
|
23799
23811
|
}),
|
|
23800
23812
|
maxLength: s
|
|
23801
23813
|
}
|
|
23802
|
-
) :
|
|
23814
|
+
) : N }),
|
|
23803
23815
|
f && /* @__PURE__ */ c.jsx(qe, { "aria-live": "polite", showOnFocus: !1, children: f })
|
|
23804
23816
|
] });
|
|
23805
23817
|
}, eE = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
@@ -23874,7 +23886,7 @@ const sE = ({
|
|
|
23874
23886
|
ignoreInteractions: _,
|
|
23875
23887
|
showLikers: B,
|
|
23876
23888
|
tabbableLink: x,
|
|
23877
|
-
showLikesModal:
|
|
23889
|
+
showLikesModal: w
|
|
23878
23890
|
} = f, T = rE(v);
|
|
23879
23891
|
de(() => {
|
|
23880
23892
|
v([{ type: "userLikedContent", value: i }]);
|
|
@@ -23882,7 +23894,7 @@ const sE = ({
|
|
|
23882
23894
|
const I = Gt(
|
|
23883
23895
|
() => nE(n, aE),
|
|
23884
23896
|
[n]
|
|
23885
|
-
),
|
|
23897
|
+
), P = (E) => {
|
|
23886
23898
|
if (E.preventDefault(), E.stopPropagation(), v([{ type: "showLikers", value: !1 }]), Lr)
|
|
23887
23899
|
return ms(), !1;
|
|
23888
23900
|
if (ms(), _ || !s)
|
|
@@ -23951,7 +23963,7 @@ const sE = ({
|
|
|
23951
23963
|
"data-testid": "like-button",
|
|
23952
23964
|
"data-gtm-event-context": "Likes",
|
|
23953
23965
|
"data-gtm-event-type": `like-${a.type}-click`,
|
|
23954
|
-
onClick:
|
|
23966
|
+
onClick: P,
|
|
23955
23967
|
screenreaderText: s ? p.formatMessage(
|
|
23956
23968
|
{
|
|
23957
23969
|
id: `discussion_likes_${C ? "unlike" : "like"}`
|
|
@@ -24042,14 +24054,14 @@ const sE = ({
|
|
|
24042
24054
|
] })
|
|
24043
24055
|
}
|
|
24044
24056
|
),
|
|
24045
|
-
|
|
24057
|
+
w && /* @__PURE__ */ c.jsx(Xr, { children: /* @__PURE__ */ c.jsx(Mc, { children: /* @__PURE__ */ c.jsx(
|
|
24046
24058
|
iE,
|
|
24047
24059
|
{
|
|
24048
24060
|
activityId: o,
|
|
24049
24061
|
basePath: l,
|
|
24050
24062
|
parentId: u,
|
|
24051
24063
|
likeCount: t,
|
|
24052
|
-
showModal:
|
|
24064
|
+
showModal: w,
|
|
24053
24065
|
functions: {
|
|
24054
24066
|
onClose: () => v([{ type: "showLikesModal", value: !1 }]),
|
|
24055
24067
|
likes: {
|
|
@@ -24554,7 +24566,7 @@ function wE({
|
|
|
24554
24566
|
},
|
|
24555
24567
|
user: h,
|
|
24556
24568
|
...m
|
|
24557
|
-
}, g = xE({ ...p, mutationFn: e }), f = DE({ ...p, mutationFn: t }), v = CE({ ...p, mutationFn: n }), b = kE({ ...p, mutationFn: i }), C = FE({ ...p, mutationFn: a }), _ = _E({ ...p, mutationFn: s }), B = AE({ ...p, mutationFn: o }), { activities: x, ...
|
|
24569
|
+
}, g = xE({ ...p, mutationFn: e }), f = DE({ ...p, mutationFn: t }), v = CE({ ...p, mutationFn: n }), b = kE({ ...p, mutationFn: i }), C = FE({ ...p, mutationFn: a }), _ = _E({ ...p, mutationFn: s }), B = AE({ ...p, mutationFn: o }), { activities: x, ...w } = EE({
|
|
24558
24570
|
queryKey: l,
|
|
24559
24571
|
queryFn: r,
|
|
24560
24572
|
filterOption: u
|
|
@@ -24571,7 +24583,7 @@ function wE({
|
|
|
24571
24583
|
unpin: B
|
|
24572
24584
|
},
|
|
24573
24585
|
user: h,
|
|
24574
|
-
...
|
|
24586
|
+
...w
|
|
24575
24587
|
};
|
|
24576
24588
|
}
|
|
24577
24589
|
function CE({
|
|
@@ -24709,7 +24721,7 @@ const ck = ({
|
|
|
24709
24721
|
fetchNextPage: C,
|
|
24710
24722
|
hasNextPage: _,
|
|
24711
24723
|
isLoading: B,
|
|
24712
|
-
mutations: { create: x, edit:
|
|
24724
|
+
mutations: { create: x, edit: w, remove: T, like: I, unlike: P, pin: z, unpin: $ }
|
|
24713
24725
|
} = wE({
|
|
24714
24726
|
queryKey: [e, t, "activities", m],
|
|
24715
24727
|
queryFns: a,
|
|
@@ -24811,11 +24823,11 @@ const ck = ({
|
|
|
24811
24823
|
id: H,
|
|
24812
24824
|
own_reactions: ae,
|
|
24813
24825
|
latest_reactions: re,
|
|
24814
|
-
reaction_counts:
|
|
24826
|
+
reaction_counts: D,
|
|
24815
24827
|
mentioned_users: X,
|
|
24816
24828
|
total_replies: V,
|
|
24817
24829
|
additional_data: F
|
|
24818
|
-
} = S, A = (((Z = re == null ? void 0 : re.like) == null ? void 0 : Z.length) || 0) > 0, j = (((q = ae == null ? void 0 : ae.like) == null ? void 0 : q.length) || 0) > 0,
|
|
24830
|
+
} = S, A = (((Z = re == null ? void 0 : re.like) == null ? void 0 : Z.length) || 0) > 0, j = (((q = ae == null ? void 0 : ae.like) == null ? void 0 : q.length) || 0) > 0, N = j ? ae == null ? void 0 : ae.like[0].id : "", L = A ? (ne = re == null ? void 0 : re.like) == null ? void 0 : ne.map((ue) => {
|
|
24819
24831
|
var Q, ve, ge;
|
|
24820
24832
|
return {
|
|
24821
24833
|
id: (Q = ue == null ? void 0 : ue.user) == null ? void 0 : Q.id,
|
|
@@ -24838,14 +24850,14 @@ const ck = ({
|
|
|
24838
24850
|
slug: H,
|
|
24839
24851
|
author: ti(S == null ? void 0 : S.actor),
|
|
24840
24852
|
userLiked: j,
|
|
24841
|
-
likes: (
|
|
24853
|
+
likes: (D == null ? void 0 : D.like) || 0,
|
|
24842
24854
|
comments: V || 0,
|
|
24843
24855
|
peopleWhoLiked: L,
|
|
24844
24856
|
data: {
|
|
24845
24857
|
mentions: X,
|
|
24846
24858
|
...F || {}
|
|
24847
24859
|
},
|
|
24848
|
-
pinned: (
|
|
24860
|
+
pinned: (D == null ? void 0 : D.pin) && (D == null ? void 0 : D.pin) > 0 || !1,
|
|
24849
24861
|
categories: (S == null ? void 0 : S.categories) || []
|
|
24850
24862
|
},
|
|
24851
24863
|
links: {
|
|
@@ -24858,11 +24870,11 @@ const ck = ({
|
|
|
24858
24870
|
createContent: () => null,
|
|
24859
24871
|
deleteContent: () => T({ activityId: H }),
|
|
24860
24872
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
24861
|
-
updateContent: (ue, { body: Q }) =>
|
|
24873
|
+
updateContent: (ue, { body: Q }) => w({ activityId: H, content: Q })
|
|
24862
24874
|
},
|
|
24863
24875
|
likes: {
|
|
24864
24876
|
createLike: () => I({ activityId: H }),
|
|
24865
|
-
deleteLike: () =>
|
|
24877
|
+
deleteLike: () => P({ activityId: H, reactionId: N }),
|
|
24866
24878
|
listLikes: (ue) => u.list({ activityId: H, ...ue })
|
|
24867
24879
|
},
|
|
24868
24880
|
comments: {
|
|
@@ -25622,7 +25634,7 @@ const NE = ({
|
|
|
25622
25634
|
queryFns: {
|
|
25623
25635
|
...a,
|
|
25624
25636
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
25625
|
-
list: (
|
|
25637
|
+
list: (w) => a.list({ ...w, reactionId: r })
|
|
25626
25638
|
}
|
|
25627
25639
|
});
|
|
25628
25640
|
Wc([p]);
|
|
@@ -25663,7 +25675,7 @@ const NE = ({
|
|
|
25663
25675
|
},
|
|
25664
25676
|
functions: {
|
|
25665
25677
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
25666
|
-
create: (
|
|
25678
|
+
create: (w, { body: T }) => g({ activityId: n, replyId: r, content: T }),
|
|
25667
25679
|
...s
|
|
25668
25680
|
},
|
|
25669
25681
|
meta: {
|
|
@@ -25673,26 +25685,26 @@ const NE = ({
|
|
|
25673
25685
|
showSuccessMessage: !1
|
|
25674
25686
|
}
|
|
25675
25687
|
},
|
|
25676
|
-
children: d && d.length > 0 ? d == null ? void 0 : d.map((
|
|
25677
|
-
var
|
|
25688
|
+
children: d && d.length > 0 ? d == null ? void 0 : d.map((w) => {
|
|
25689
|
+
var D, X, V, F, A, j, N;
|
|
25678
25690
|
const {
|
|
25679
25691
|
id: T,
|
|
25680
25692
|
own_children: I,
|
|
25681
|
-
latest_children:
|
|
25693
|
+
latest_children: P,
|
|
25682
25694
|
children_counts: z,
|
|
25683
25695
|
data: { mentioned_users: $, additional_data: k }
|
|
25684
|
-
} =
|
|
25696
|
+
} = w, O = (((D = I == null ? void 0 : I.like) == null ? void 0 : D.length) || 0) > 0 ? (X = I == null ? void 0 : I.like) == null ? void 0 : X.find((L) => {
|
|
25685
25697
|
var Z;
|
|
25686
25698
|
return ((Z = L == null ? void 0 : L.user) == null ? void 0 : Z.id) === (_ == null ? void 0 : _.id);
|
|
25687
|
-
}) : !1, S = O ? O == null ? void 0 : O.id : "", U = !!O, ae = (((V =
|
|
25699
|
+
}) : !1, S = O ? O == null ? void 0 : O.id : "", U = !!O, ae = (((V = P == null ? void 0 : P.like) == null ? void 0 : V.length) || 0) > 0 ? (F = P == null ? void 0 : P.like) == null ? void 0 : F.map((L) => {
|
|
25688
25700
|
var Z, q, ne;
|
|
25689
25701
|
return {
|
|
25690
25702
|
id: (Z = L == null ? void 0 : L.user) == null ? void 0 : Z.id,
|
|
25691
25703
|
name: (ne = (q = L == null ? void 0 : L.user) == null ? void 0 : q.data) == null ? void 0 : ne.name
|
|
25692
25704
|
};
|
|
25693
|
-
}) : !1, re = typeof
|
|
25705
|
+
}) : !1, re = typeof w.data.content == "string" ? (A = w == null ? void 0 : w.data) == null ? void 0 : A.content : (
|
|
25694
25706
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
25695
|
-
((
|
|
25707
|
+
((N = (j = w == null ? void 0 : w.data) == null ? void 0 : j.content) == null ? void 0 : N.text) || ""
|
|
25696
25708
|
);
|
|
25697
25709
|
return /* @__PURE__ */ c.jsx(
|
|
25698
25710
|
ba,
|
|
@@ -25703,16 +25715,16 @@ const NE = ({
|
|
|
25703
25715
|
type: "reply",
|
|
25704
25716
|
body: re,
|
|
25705
25717
|
canLike: i,
|
|
25706
|
-
createdAt:
|
|
25718
|
+
createdAt: w == null ? void 0 : w.created_at,
|
|
25707
25719
|
slugs: {
|
|
25708
25720
|
question: `${e}/${t}`,
|
|
25709
25721
|
answer: n,
|
|
25710
25722
|
// Stop-gap solution to avoid having to change the DiscussionPost component
|
|
25711
25723
|
// The `reply` is currently used to define the form ID which handles the focus
|
|
25712
|
-
reply:
|
|
25724
|
+
reply: w == null ? void 0 : w.parent
|
|
25713
25725
|
},
|
|
25714
25726
|
slug: "",
|
|
25715
|
-
author: ti(
|
|
25727
|
+
author: ti(w == null ? void 0 : w.user),
|
|
25716
25728
|
userLiked: U,
|
|
25717
25729
|
likes: (z == null ? void 0 : z.like) || 0,
|
|
25718
25730
|
peopleWhoLiked: ae,
|
|
@@ -25779,7 +25791,7 @@ const ME = ({
|
|
|
25779
25791
|
} = oh({
|
|
25780
25792
|
queryKey: [e, t, n, "replies"],
|
|
25781
25793
|
queryFns: u
|
|
25782
|
-
}),
|
|
25794
|
+
}), w = () => {
|
|
25783
25795
|
I(m.length), p();
|
|
25784
25796
|
}, [T, I] = le(null);
|
|
25785
25797
|
return Wc([f]), sh(), /* @__PURE__ */ c.jsxs("section", { className: "replies-feed", children: [
|
|
@@ -25798,7 +25810,7 @@ const ME = ({
|
|
|
25798
25810
|
content: { type: "reply", slugs: {} },
|
|
25799
25811
|
functions: {
|
|
25800
25812
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
25801
|
-
create: (
|
|
25813
|
+
create: (P, { body: z }) => v({ activityId: n, content: z }),
|
|
25802
25814
|
...a
|
|
25803
25815
|
},
|
|
25804
25816
|
meta: {
|
|
@@ -25819,26 +25831,26 @@ const ME = ({
|
|
|
25819
25831
|
}
|
|
25820
25832
|
}
|
|
25821
25833
|
),
|
|
25822
|
-
m == null ? void 0 : m.map((
|
|
25823
|
-
var A, j,
|
|
25834
|
+
m == null ? void 0 : m.map((P, z) => {
|
|
25835
|
+
var A, j, N, L, Z, q, ne;
|
|
25824
25836
|
const {
|
|
25825
25837
|
id: $,
|
|
25826
25838
|
own_children: k,
|
|
25827
25839
|
latest_children: E,
|
|
25828
25840
|
children_counts: O,
|
|
25829
25841
|
data: { mentioned_users: S, additional_data: U }
|
|
25830
|
-
} =
|
|
25842
|
+
} = P, ae = (((A = k == null ? void 0 : k.like) == null ? void 0 : A.length) || 0) > 0 ? (j = k == null ? void 0 : k.like) == null ? void 0 : j.find((ue) => {
|
|
25831
25843
|
var Q;
|
|
25832
25844
|
return ((Q = ue == null ? void 0 : ue.user) == null ? void 0 : Q.id) === (x == null ? void 0 : x.id);
|
|
25833
|
-
}) : !1, re = ae ? ae == null ? void 0 : ae.id : "",
|
|
25845
|
+
}) : !1, re = ae ? ae == null ? void 0 : ae.id : "", D = !!ae, V = (((N = E == null ? void 0 : E.like) == null ? void 0 : N.length) || 0) > 0 ? (L = E == null ? void 0 : E.like) == null ? void 0 : L.map((ue) => {
|
|
25834
25846
|
var Q, ve, ge;
|
|
25835
25847
|
return {
|
|
25836
25848
|
id: (Q = ue == null ? void 0 : ue.user) == null ? void 0 : Q.id,
|
|
25837
25849
|
name: (ge = (ve = ue == null ? void 0 : ue.user) == null ? void 0 : ve.data) == null ? void 0 : ge.name
|
|
25838
25850
|
};
|
|
25839
|
-
}) : !1, F = typeof
|
|
25851
|
+
}) : !1, F = typeof P.data.content == "string" ? (Z = P == null ? void 0 : P.data) == null ? void 0 : Z.content : (
|
|
25840
25852
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
25841
|
-
((ne = (q =
|
|
25853
|
+
((ne = (q = P == null ? void 0 : P.data) == null ? void 0 : q.content) == null ? void 0 : ne.text) || ""
|
|
25842
25854
|
);
|
|
25843
25855
|
return /* @__PURE__ */ c.jsx(QC, { children: /* @__PURE__ */ c.jsx(
|
|
25844
25856
|
ba,
|
|
@@ -25849,15 +25861,15 @@ const ME = ({
|
|
|
25849
25861
|
type: "reply",
|
|
25850
25862
|
body: F,
|
|
25851
25863
|
canLike: i,
|
|
25852
|
-
createdAt:
|
|
25864
|
+
createdAt: P == null ? void 0 : P.created_at,
|
|
25853
25865
|
slugs: {
|
|
25854
25866
|
question: `${e}/${t}`,
|
|
25855
25867
|
answer: n,
|
|
25856
25868
|
reply: $
|
|
25857
25869
|
},
|
|
25858
25870
|
slug: $,
|
|
25859
|
-
author: ti(
|
|
25860
|
-
userLiked:
|
|
25871
|
+
author: ti(P == null ? void 0 : P.user),
|
|
25872
|
+
userLiked: D,
|
|
25861
25873
|
likes: (O == null ? void 0 : O.like) || 0,
|
|
25862
25874
|
peopleWhoLiked: V,
|
|
25863
25875
|
data: {
|
|
@@ -25920,7 +25932,7 @@ const ME = ({
|
|
|
25920
25932
|
la,
|
|
25921
25933
|
{
|
|
25922
25934
|
hasNextPage: g,
|
|
25923
|
-
loadNextPage:
|
|
25935
|
+
loadNextPage: w,
|
|
25924
25936
|
icon: { icon: "arrow-down", position: "right" },
|
|
25925
25937
|
messages: {
|
|
25926
25938
|
button: h.formatMessage({ id: "loadMore_button" }),
|
|
@@ -26128,10 +26140,10 @@ const ba = ({
|
|
|
26128
26140
|
parentId: B
|
|
26129
26141
|
}) => {
|
|
26130
26142
|
var Ye, xe, W, ie, pe, be, _e, et, tt, dt;
|
|
26131
|
-
const x = ce(),
|
|
26143
|
+
const x = ce(), w = Re(pt), T = Re($o), {
|
|
26132
26144
|
createContent: I = async () => {
|
|
26133
26145
|
},
|
|
26134
|
-
deleteContent:
|
|
26146
|
+
deleteContent: P = async () => {
|
|
26135
26147
|
},
|
|
26136
26148
|
updateContent: z = async () => {
|
|
26137
26149
|
}
|
|
@@ -26147,12 +26159,12 @@ const ba = ({
|
|
|
26147
26159
|
author: H,
|
|
26148
26160
|
canLike: ae,
|
|
26149
26161
|
createdAt: re,
|
|
26150
|
-
id:
|
|
26162
|
+
id: D,
|
|
26151
26163
|
likes: X = 0,
|
|
26152
26164
|
userLiked: V,
|
|
26153
26165
|
comments: F = 0,
|
|
26154
26166
|
data: A
|
|
26155
|
-
} = t, j =
|
|
26167
|
+
} = t, j = w && w.id && typeof H != "string" && H.id && H.id === w.id || !1, N = typeof ae == "boolean" ? ae : !0, L = j && (!t.createdAt || Hh(t.createdAt, 10, "seconds")), Z = ke(null), [q, ne] = le({
|
|
26156
26168
|
title: t && t.body !== t.title && t.title || "",
|
|
26157
26169
|
body: t && t.body || "",
|
|
26158
26170
|
isEditing: !1,
|
|
@@ -26242,7 +26254,7 @@ const ba = ({
|
|
|
26242
26254
|
}, it = async () => {
|
|
26243
26255
|
Q(!1);
|
|
26244
26256
|
try {
|
|
26245
|
-
await
|
|
26257
|
+
await P(Tc(t.slugs));
|
|
26246
26258
|
} catch {
|
|
26247
26259
|
je("delete-error");
|
|
26248
26260
|
}
|
|
@@ -26321,7 +26333,7 @@ const ba = ({
|
|
|
26321
26333
|
/* @__PURE__ */ c.jsxs(
|
|
26322
26334
|
"div",
|
|
26323
26335
|
{
|
|
26324
|
-
id:
|
|
26336
|
+
id: D || t.slug,
|
|
26325
26337
|
className: K("discussion-card", t.type, {
|
|
26326
26338
|
editing: q.isEditing,
|
|
26327
26339
|
"has-link": l.post && !q.isEditing
|
|
@@ -26445,7 +26457,7 @@ const ba = ({
|
|
|
26445
26457
|
slugs: t.slugs,
|
|
26446
26458
|
slug: t.slug
|
|
26447
26459
|
},
|
|
26448
|
-
canLike:
|
|
26460
|
+
canLike: N,
|
|
26449
26461
|
peopleWhoLiked: t.peopleWhoLiked,
|
|
26450
26462
|
activityId: t.id || t.slug,
|
|
26451
26463
|
functions: {
|
|
@@ -26987,12 +26999,12 @@ const fk = ({
|
|
|
26987
26999
|
profile: m,
|
|
26988
27000
|
categories: p
|
|
26989
27001
|
}) => {
|
|
26990
|
-
var U, H, ae, re,
|
|
27002
|
+
var U, H, ae, re, D, X;
|
|
26991
27003
|
const g = ce(), {
|
|
26992
27004
|
activity: f,
|
|
26993
27005
|
error: v,
|
|
26994
27006
|
isLoading: b,
|
|
26995
|
-
mutations: { edit: C, like: _, unlike: B, pin: x, unpin:
|
|
27007
|
+
mutations: { edit: C, like: _, unlike: B, pin: x, unpin: w }
|
|
26996
27008
|
} = e_({
|
|
26997
27009
|
queryFns: s,
|
|
26998
27010
|
queryKey: [e, t, n]
|
|
@@ -27007,7 +27019,7 @@ const fk = ({
|
|
|
27007
27019
|
text: g.formatMessage({ id: "activitySection_notFoundError" })
|
|
27008
27020
|
}
|
|
27009
27021
|
);
|
|
27010
|
-
const { own_reactions: T, latest_reactions: I, mentioned_users:
|
|
27022
|
+
const { own_reactions: T, latest_reactions: I, mentioned_users: P, additional_data: z } = f, $ = (((U = I == null ? void 0 : I.like) == null ? void 0 : U.length) || 0) > 0, k = (((H = T == null ? void 0 : T.like) == null ? void 0 : H.length) || 0) > 0, E = k ? T == null ? void 0 : T.like[0].id : "", O = $ ? (ae = I == null ? void 0 : I.like) == null ? void 0 : ae.map((V) => {
|
|
27011
27023
|
var F, A, j;
|
|
27012
27024
|
return {
|
|
27013
27025
|
id: (F = V == null ? void 0 : V.user) == null ? void 0 : F.id,
|
|
@@ -27039,10 +27051,10 @@ const fk = ({
|
|
|
27039
27051
|
comments: (f == null ? void 0 : f.total_replies) || 0,
|
|
27040
27052
|
peopleWhoLiked: O,
|
|
27041
27053
|
data: {
|
|
27042
|
-
mentions:
|
|
27054
|
+
mentions: P,
|
|
27043
27055
|
...z || {}
|
|
27044
27056
|
},
|
|
27045
|
-
pinned: ((
|
|
27057
|
+
pinned: ((D = f == null ? void 0 : f.reaction_counts) == null ? void 0 : D.pin) && ((X = f == null ? void 0 : f.reaction_counts) == null ? void 0 : X.pin) > 0 || !1
|
|
27046
27058
|
},
|
|
27047
27059
|
originalAuthorId: S == null ? void 0 : S.id,
|
|
27048
27060
|
forceHide: { comments: !0 },
|
|
@@ -27067,7 +27079,7 @@ const fk = ({
|
|
|
27067
27079
|
// there will only ever be one pin so we can just grab the first one
|
|
27068
27080
|
deletePin: () => {
|
|
27069
27081
|
var V;
|
|
27070
|
-
return
|
|
27082
|
+
return w({ activityId: n, reactionId: (V = I == null ? void 0 : I.pin) == null ? void 0 : V[0].id });
|
|
27071
27083
|
}
|
|
27072
27084
|
},
|
|
27073
27085
|
form: u
|
|
@@ -27915,36 +27927,36 @@ const dh = ({
|
|
|
27915
27927
|
length: B,
|
|
27916
27928
|
gtmEvent: x
|
|
27917
27929
|
} = oa[b];
|
|
27918
|
-
let
|
|
27919
|
-
f.slug && (f.slug.slice(0, 4) === "http" || f.slug.slice(0, 2) === "//" || f.slug.slice(0, 6) === "mailto" || f.slug.slice(0, 3) === "tel") && (
|
|
27930
|
+
let w = f.slug ? `${C}${f.slug}` : !1;
|
|
27931
|
+
f.slug && (f.slug.slice(0, 4) === "http" || f.slug.slice(0, 2) === "//" || f.slug.slice(0, 6) === "mailto" || f.slug.slice(0, 3) === "tel") && (w = f.slug);
|
|
27920
27932
|
const T = (E) => {
|
|
27921
|
-
|
|
27933
|
+
w && (E.preventDefault(), E.stopPropagation(), window.location.href = w);
|
|
27922
27934
|
}, I = { ...h_, ...B };
|
|
27923
|
-
let
|
|
27924
|
-
return
|
|
27925
|
-
href:
|
|
27935
|
+
let P = { className: "card" }, z = {};
|
|
27936
|
+
return w && (z = {
|
|
27937
|
+
href: w,
|
|
27926
27938
|
className: "gtm-trackable",
|
|
27927
27939
|
"data-gtm-event-context": `${s}-CarouselCard`,
|
|
27928
27940
|
"data-gtm-event-type": `${x}-click`,
|
|
27929
27941
|
"data-testid": "link"
|
|
27930
|
-
}, f.openInNewTab && (z.target = "_blank"),
|
|
27942
|
+
}, f.openInNewTab && (z.target = "_blank"), P = {
|
|
27931
27943
|
onClick: T,
|
|
27932
27944
|
className: "card gtm-trackable",
|
|
27933
27945
|
"data-gtm-event-context": `${s}-CarouselCard`,
|
|
27934
27946
|
"data-gtm-event-type": `${x}-click`
|
|
27935
|
-
}), l && (
|
|
27936
|
-
...
|
|
27947
|
+
}), l && (P = {
|
|
27948
|
+
...P,
|
|
27937
27949
|
tabIndex: "0"
|
|
27938
27950
|
}, ($ = m == null ? void 0 : m.current) == null || $.focus(), (k = m == null ? void 0 : m.current) == null || k.scrollIntoView({ behavior: "smooth" })), /* @__PURE__ */ c.jsx(
|
|
27939
27951
|
"li",
|
|
27940
27952
|
{
|
|
27941
27953
|
className: K("card-wrapper text-medium", _, t, {
|
|
27942
|
-
"has-link":
|
|
27943
|
-
"no-link": !
|
|
27954
|
+
"has-link": w,
|
|
27955
|
+
"no-link": !w,
|
|
27944
27956
|
"has-image": f.banner
|
|
27945
27957
|
}),
|
|
27946
27958
|
"data-testid": `${b}-card`,
|
|
27947
|
-
children: /* @__PURE__ */ c.jsxs("div", { ...
|
|
27959
|
+
children: /* @__PURE__ */ c.jsxs("div", { ...P, ref: m, children: [
|
|
27948
27960
|
/* @__PURE__ */ c.jsx(
|
|
27949
27961
|
lm,
|
|
27950
27962
|
{
|
|
@@ -28009,7 +28021,7 @@ const dh = ({
|
|
|
28009
28021
|
O,
|
|
28010
28022
|
I[E]
|
|
28011
28023
|
);
|
|
28012
|
-
return ["title", "text"].includes(E) &&
|
|
28024
|
+
return ["title", "text"].includes(E) && w ? (H.wrapper = "a", /* @__PURE__ */ c.jsx("p", { ...U, children: /* @__PURE__ */ c.jsx(Qt, { options: H, ...z, children: ae }) })) : /* @__PURE__ */ c.jsx(Qt, { options: H, ...U, children: ae });
|
|
28013
28025
|
}),
|
|
28014
28026
|
i.contentType === "communityPage" && (i.slug || f.slug) && r && /* @__PURE__ */ c.jsx(
|
|
28015
28027
|
p_,
|
|
@@ -28019,7 +28031,7 @@ const dh = ({
|
|
|
28019
28031
|
}
|
|
28020
28032
|
),
|
|
28021
28033
|
/* @__PURE__ */ c.jsx(f_, { type: _ || "", data: f }),
|
|
28022
|
-
/* @__PURE__ */ c.jsx(m_, { data: f, cta: a, link:
|
|
28034
|
+
/* @__PURE__ */ c.jsx(m_, { data: f, cta: a, link: w || "", gtmContext: s })
|
|
28023
28035
|
] })
|
|
28024
28036
|
}
|
|
28025
28037
|
);
|
|
@@ -28085,7 +28097,7 @@ const y_ = ({
|
|
|
28085
28097
|
}), { cardsPerPage: m, isLoading: p } = d, [g, f] = le({
|
|
28086
28098
|
currentPage: 0,
|
|
28087
28099
|
loadedPages: [0]
|
|
28088
|
-
}), { currentPage: v, loadedPages: b } = g, [C, _] = le(""), B = t.length, x = Math.ceil(B / m),
|
|
28100
|
+
}), { currentPage: v, loadedPages: b } = g, [C, _] = le(""), B = t.length, x = Math.ceil(B / m), w = ke(null), T = gr(!0, !0, w == null ? void 0 : w.current);
|
|
28089
28101
|
de(() => {
|
|
28090
28102
|
let E = 1;
|
|
28091
28103
|
T && (T >= ys.fourCards ? E = 4 : T >= ys.threeCards ? E = 3 : T >= ys.twoCards && (E = 2), E > B && (E = B)), h((O) => ({
|
|
@@ -28134,7 +28146,7 @@ const y_ = ({
|
|
|
28134
28146
|
)
|
|
28135
28147
|
);
|
|
28136
28148
|
}, 500);
|
|
28137
|
-
},
|
|
28149
|
+
}, P = (E) => {
|
|
28138
28150
|
_i = E.touches[0].clientX;
|
|
28139
28151
|
}, z = (E) => {
|
|
28140
28152
|
if (_i === null)
|
|
@@ -28157,7 +28169,7 @@ const y_ = ({
|
|
|
28157
28169
|
return /* @__PURE__ */ c.jsxs(
|
|
28158
28170
|
"section",
|
|
28159
28171
|
{
|
|
28160
|
-
ref:
|
|
28172
|
+
ref: w,
|
|
28161
28173
|
className: K("carousel-wrapper", a),
|
|
28162
28174
|
"data-testid": "carousel",
|
|
28163
28175
|
children: [
|
|
@@ -28166,7 +28178,7 @@ const y_ = ({
|
|
|
28166
28178
|
"ul",
|
|
28167
28179
|
{
|
|
28168
28180
|
className: "carousel",
|
|
28169
|
-
onTouchStart:
|
|
28181
|
+
onTouchStart: P,
|
|
28170
28182
|
onTouchMove: z,
|
|
28171
28183
|
style: $,
|
|
28172
28184
|
"data-testid": "carousel-list",
|
|
@@ -28459,11 +28471,11 @@ const _k = ({
|
|
|
28459
28471
|
isIntroduction: _,
|
|
28460
28472
|
optional: B,
|
|
28461
28473
|
slug: x,
|
|
28462
|
-
subsectionId:
|
|
28474
|
+
subsectionId: w,
|
|
28463
28475
|
title: T,
|
|
28464
28476
|
type: I
|
|
28465
28477
|
}) => {
|
|
28466
|
-
const
|
|
28478
|
+
const P = i && t || _, z = {};
|
|
28467
28479
|
return C && (z.style = { "--image": `url(${C})` }), /* @__PURE__ */ c.jsx(
|
|
28468
28480
|
"li",
|
|
28469
28481
|
{
|
|
@@ -28472,13 +28484,13 @@ const _k = ({
|
|
|
28472
28484
|
discussion: v === ii.DISCUSSION,
|
|
28473
28485
|
quiz: v === ii.QUIZ,
|
|
28474
28486
|
completed: g && v === ii.ARTICLE,
|
|
28475
|
-
locked: !
|
|
28487
|
+
locked: !P
|
|
28476
28488
|
}),
|
|
28477
28489
|
...z,
|
|
28478
28490
|
children: /* @__PURE__ */ c.jsx(
|
|
28479
28491
|
Ln,
|
|
28480
28492
|
{
|
|
28481
|
-
href:
|
|
28493
|
+
href: P ? `/microcourses/en/${o}/${x}` : void 0,
|
|
28482
28494
|
fallbackElement: "span",
|
|
28483
28495
|
className: "inner",
|
|
28484
28496
|
gtmContext: `MicrocourseOutline${Lh(T)}`,
|
|
@@ -28488,7 +28500,7 @@ const _k = ({
|
|
|
28488
28500
|
x_,
|
|
28489
28501
|
{
|
|
28490
28502
|
sectionId: a,
|
|
28491
|
-
subsectionId:
|
|
28503
|
+
subsectionId: w,
|
|
28492
28504
|
title: T,
|
|
28493
28505
|
className: "course-title"
|
|
28494
28506
|
}
|