@apolitical/component-library 4.1.0-beta.0 → 4.1.0-beta.2

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.
Files changed (4) hide show
  1. package/index.js +19 -19
  2. package/index.mjs +686 -678
  3. package/package.json +1 -1
  4. package/style.css +1 -1
package/index.mjs CHANGED
@@ -156,10 +156,10 @@ function zf() {
156
156
  Me.unshift("Warning: " + re), Function.prototype.apply.call(console[T], console, Me);
157
157
  }
158
158
  }
159
- var B = !1, C = !1, _ = !1, O = !1, z = !1, M;
159
+ var B = !1, w = !1, _ = !1, O = !1, L = !1, M;
160
160
  M = Symbol.for("react.module.reference");
161
161
  function P(T) {
162
- return !!(typeof T == "string" || typeof T == "function" || T === r || T === i || z || T === a || T === u || T === c || O || T === h || B || C || _ || typeof T == "object" && T !== null && (T.$$typeof === p || T.$$typeof === f || T.$$typeof === s || T.$$typeof === o || T.$$typeof === l || // This needs to include all possible module reference object
162
+ return !!(typeof T == "string" || typeof T == "function" || T === r || T === i || L || T === a || T === u || T === c || O || T === h || B || w || _ || typeof T == "object" && T !== null && (T.$$typeof === p || T.$$typeof === f || T.$$typeof === s || T.$$typeof === o || T.$$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.
@@ -172,7 +172,7 @@ function zf() {
172
172
  var Te = re.displayName || re.name || "";
173
173
  return Te !== "" ? oe + "(" + Te + ")" : oe;
174
174
  }
175
- function w(T) {
175
+ function C(T) {
176
176
  return T.displayName || "Context";
177
177
  }
178
178
  function F(T) {
@@ -200,10 +200,10 @@ function zf() {
200
200
  switch (T.$$typeof) {
201
201
  case o:
202
202
  var re = T;
203
- return w(re) + ".Consumer";
203
+ return C(re) + ".Consumer";
204
204
  case s:
205
205
  var oe = T;
206
- return w(oe._context) + ".Provider";
206
+ return C(oe._context) + ".Provider";
207
207
  case l:
208
208
  return j(T, T.render, "ForwardRef");
209
209
  case f:
@@ -282,18 +282,18 @@ function zf() {
282
282
  R < 0 && x("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
283
283
  }
284
284
  }
285
- var $ = v.ReactCurrentDispatcher, L;
285
+ var $ = v.ReactCurrentDispatcher, z;
286
286
  function ne(T, re, oe) {
287
287
  {
288
- if (L === void 0)
288
+ if (z === void 0)
289
289
  try {
290
290
  throw Error();
291
291
  } catch (Te) {
292
292
  var ye = Te.stack.trim().match(/\n( *(at )?)/);
293
- L = ye && ye[1] || "";
293
+ z = ye && ye[1] || "";
294
294
  }
295
295
  return `
296
- ` + L + T;
296
+ ` + z + T;
297
297
  }
298
298
  }
299
299
  var ee = !1, K;
@@ -746,9 +746,9 @@ function Wf(e, t, n) {
746
746
  }, []);
747
747
  var A = It(function() {
748
748
  var B = function(P) {
749
- var j = o.current, w = l.current;
750
- return o.current = l.current = null, i.current = P, u.current = c.current.apply(w, j);
751
- }, C = function(P, j) {
749
+ var j = o.current, C = l.current;
750
+ return o.current = l.current = null, i.current = P, u.current = c.current.apply(C, j);
751
+ }, w = function(P, j) {
752
752
  h && cancelAnimationFrame(s.current), s.current = h ? requestAnimationFrame(P) : setTimeout(P, j);
753
753
  }, _ = function(P) {
754
754
  if (!f.current)
@@ -757,24 +757,24 @@ function Wf(e, t, n) {
757
757
  return !a.current || j >= t || j < 0 || b && P - i.current >= x;
758
758
  }, O = function(P) {
759
759
  return s.current = null, m && o.current ? B(P) : (o.current = l.current = null, u.current);
760
- }, z = function P() {
760
+ }, L = function P() {
761
761
  var j = Date.now();
762
762
  if (_(j))
763
763
  return O(j);
764
764
  if (f.current) {
765
- var w = t - (j - a.current), F = b ? Math.min(w, x - (j - i.current)) : w;
766
- C(P, F);
765
+ var C = t - (j - a.current), F = b ? Math.min(C, x - (j - i.current)) : C;
766
+ w(P, F);
767
767
  }
768
768
  }, M = function() {
769
769
  if (p || v) {
770
770
  var P = Date.now(), j = _(P);
771
771
  if (o.current = [].slice.call(arguments), l.current = r, a.current = P, j) {
772
772
  if (!s.current && f.current)
773
- return i.current = a.current, C(z, t), g ? B(a.current) : u.current;
773
+ return i.current = a.current, w(L, t), g ? B(a.current) : u.current;
774
774
  if (b)
775
- return C(z, t), B(a.current);
775
+ return w(L, t), B(a.current);
776
776
  }
777
- return s.current || C(z, t), u.current;
777
+ return s.current || w(L, t), u.current;
778
778
  }
779
779
  };
780
780
  return M.cancel = function() {
@@ -2757,7 +2757,7 @@ const jn = {
2757
2757
  }), { formatMessage: b } = de();
2758
2758
  r || (r = b({ id: "inputAutocomplete_placeholder" })), he(() => {
2759
2759
  const B = setTimeout(() => {
2760
- g || f((C) => ({ ...C, debouncedInput: l }));
2760
+ g || f((w) => ({ ...w, debouncedInput: l }));
2761
2761
  }, kh);
2762
2762
  return () => {
2763
2763
  clearTimeout(B);
@@ -2765,13 +2765,13 @@ const jn = {
2765
2765
  }, [l, g]), he(() => {
2766
2766
  c && !g ? (async () => {
2767
2767
  try {
2768
- const C = await o(c) || [];
2768
+ const w = await o(c) || [];
2769
2769
  m((_) => ({
2770
2770
  ..._,
2771
- predictions: C
2771
+ predictions: w
2772
2772
  }));
2773
- } catch (C) {
2774
- console.error("Error fetching predictions:", C), m((_) => ({ ..._, predictions: [] }));
2773
+ } catch (w) {
2774
+ console.error("Error fetching predictions:", w), m((_) => ({ ..._, predictions: [] }));
2775
2775
  }
2776
2776
  })() : m((B) => ({ ...B, predictions: [] }));
2777
2777
  }, [c, g]), he(() => {
@@ -2781,37 +2781,37 @@ const jn = {
2781
2781
  }));
2782
2782
  }, [h, p]);
2783
2783
  const v = (B) => {
2784
- [jn.DOWN, jn.UP, jn.ENTER].includes(B.key) && (B.preventDefault(), B.key === jn.DOWN && h < p.length - 1 ? m((C) => ({
2785
- ...C,
2784
+ [jn.DOWN, jn.UP, jn.ENTER].includes(B.key) && (B.preventDefault(), B.key === jn.DOWN && h < p.length - 1 ? m((w) => ({
2785
+ ...w,
2786
2786
  activePredictionIndex: h + 1
2787
- })) : B.key === jn.UP && h > 0 ? m((C) => ({
2788
- ...C,
2787
+ })) : B.key === jn.UP && h > 0 ? m((w) => ({
2788
+ ...w,
2789
2789
  activePredictionIndex: h - 1
2790
- })) : B.key === jn.ENTER && h > -1 && (s(p[h].description), f((C) => ({
2791
- ...C,
2790
+ })) : B.key === jn.ENTER && h > -1 && (s(p[h].description), f((w) => ({
2791
+ ...w,
2792
2792
  input: p[h].description
2793
- })), m((C) => ({
2794
- ...C,
2793
+ })), m((w) => ({
2794
+ ...w,
2795
2795
  predictions: [],
2796
2796
  isPredictionSelected: !0
2797
2797
  }))));
2798
2798
  }, x = (B) => {
2799
- s(B.target.value), f((C) => ({
2800
- ...C,
2799
+ s(B.target.value), f((w) => ({
2800
+ ...w,
2801
2801
  input: B.target.value,
2802
2802
  displayInput: B.target.value
2803
- })), m((C) => ({
2804
- ...C,
2803
+ })), m((w) => ({
2804
+ ...w,
2805
2805
  activePredictionIndex: -1,
2806
2806
  isPredictionSelected: !1
2807
2807
  }));
2808
2808
  }, A = (B) => {
2809
- s(B.description), f((C) => ({
2810
- ...C,
2809
+ s(B.description), f((w) => ({
2810
+ ...w,
2811
2811
  input: B.description,
2812
2812
  displayInput: B.description
2813
- })), m((C) => ({
2814
- ...C,
2813
+ })), m((w) => ({
2814
+ ...w,
2815
2815
  isPredictionSelected: !0,
2816
2816
  predictions: []
2817
2817
  }));
@@ -2830,20 +2830,20 @@ const jn = {
2830
2830
  ...i
2831
2831
  }
2832
2832
  ),
2833
- /* @__PURE__ */ d.jsx("ul", { className: "predictions-list", children: p.map((B, C) => /* @__PURE__ */ d.jsx(
2833
+ /* @__PURE__ */ d.jsx("ul", { className: "predictions-list", children: p.map((B, w) => /* @__PURE__ */ d.jsx(
2834
2834
  "li",
2835
2835
  {
2836
2836
  onClick: () => A(B),
2837
2837
  onMouseEnter: () => m((_) => ({
2838
2838
  ..._,
2839
- activePredictionIndex: C
2839
+ activePredictionIndex: w
2840
2840
  })),
2841
2841
  className: Z("predictions-list-item", {
2842
- active: C === h
2842
+ active: w === h
2843
2843
  }),
2844
2844
  children: B.description
2845
2845
  },
2846
- C
2846
+ w
2847
2847
  )) })
2848
2848
  ] });
2849
2849
  };
@@ -2929,16 +2929,16 @@ const Sh = ({
2929
2929
  Array.isArray(m) && m.length === 1 && typeof m[0] == "string" ? v = t && m ? t.find((O) => O.id === m[0]) : t ? t[0] : { id: "", label: "" } : Array.isArray(m) && m.length === 1 && typeof m[0] != "string" ? v = m[0] : v = { id: "", label: "" }, he(() => {
2930
2930
  b(g);
2931
2931
  }, [r, n]);
2932
- const { onChange: x, onMultiSelectSubmit: A, ...B } = a, C = (O) => {
2932
+ const { onChange: x, onMultiSelectSubmit: A, ...B } = a, w = (O) => {
2933
2933
  if (o) {
2934
- let z = [];
2935
- m != null && m.includes(O.id) ? z = m.filter((M) => M !== O.id) : z = [...m, O.id], b([...z]), x && x([...z]);
2934
+ let L = [];
2935
+ m != null && m.includes(O.id) ? L = m.filter((M) => M !== O.id) : L = [...m, O.id], b([...L]), x && x([...L]);
2936
2936
  } else
2937
2937
  b([O]), x && x(O.id), p(!1);
2938
2938
  }, _ = (O) => {
2939
2939
  if (O === "all") {
2940
- const z = (t == null ? void 0 : t.map((M) => M.id)) || [];
2941
- b(z), x && x(z);
2940
+ const L = (t == null ? void 0 : t.map((M) => M.id)) || [];
2941
+ b(L), x && x(L);
2942
2942
  } else
2943
2943
  b([]), x && x([]);
2944
2944
  };
@@ -2967,8 +2967,8 @@ const Sh = ({
2967
2967
  defaultValue: v.id,
2968
2968
  onChange: (O) => {
2969
2969
  O.preventDefault(), O.stopPropagation();
2970
- const z = t && t.find((M) => M.id === O.target.value);
2971
- C(z);
2970
+ const L = t && t.find((M) => M.id === O.target.value);
2971
+ w(L);
2972
2972
  },
2973
2973
  hidden: !f,
2974
2974
  ...B,
@@ -3009,22 +3009,22 @@ const Sh = ({
3009
3009
  ] })
3010
3010
  ] }),
3011
3011
  /* @__PURE__ */ d.jsx("ul", { children: t == null ? void 0 : t.map((O) => {
3012
- const z = O.id === v.id || (m == null ? void 0 : m.includes(O)) || (m == null ? void 0 : m.includes(O.id));
3012
+ const L = O.id === v.id || (m == null ? void 0 : m.includes(O)) || (m == null ? void 0 : m.includes(O.id));
3013
3013
  return /* @__PURE__ */ d.jsx("li", { "data-testid": "dropdown-options", children: /* @__PURE__ */ d.jsxs(
3014
3014
  "button",
3015
3015
  {
3016
3016
  className: Z("gtm-trackable", {
3017
- selected: z,
3018
- "selected-single": z && !o
3017
+ selected: L,
3018
+ "selected-single": L && !o
3019
3019
  }),
3020
3020
  "data-gtm-event-type": `${O}-click`,
3021
3021
  "data-gtm-event-context": i,
3022
3022
  onClick: (M) => {
3023
- M.preventDefault(), M.stopPropagation(), C(O);
3023
+ M.preventDefault(), M.stopPropagation(), w(O);
3024
3024
  },
3025
3025
  role: "menuitem",
3026
- "aria-current": z,
3027
- "data-testid": z ? "current-selection" : "",
3026
+ "aria-current": L,
3027
+ "data-testid": L ? "current-selection" : "",
3028
3028
  children: [
3029
3029
  o && /* @__PURE__ */ d.jsx("span", { className: "pretty-checkbox", "data-testid": "pretty-checkbox" }),
3030
3030
  /* @__PURE__ */ d.jsx("span", { className: Z({ "menu-option-label": o }), children: O.label })
@@ -3087,13 +3087,13 @@ const jh = ({
3087
3087
  const A = `${r}_${m}`, B = () => {
3088
3088
  if (x)
3089
3089
  return;
3090
- let C;
3090
+ let w;
3091
3091
  if (i) {
3092
3092
  const _ = h == null ? void 0 : h.indexOf(v);
3093
- Array.isArray(h) && _ >= 0 ? (C = h, C.splice(_, 1)) : (!h || h.length === 0 ? C = [] : C = h, C.push(v));
3093
+ Array.isArray(h) && _ >= 0 ? (w = h, w.splice(_, 1)) : (!h || h.length === 0 ? w = [] : w = h, w.push(v));
3094
3094
  } else
3095
- C = g === v ? void 0 : v;
3096
- t.onChange(C);
3095
+ w = g === v ? void 0 : v;
3096
+ t.onChange(w);
3097
3097
  };
3098
3098
  return /* @__PURE__ */ d.jsx(
3099
3099
  pc,
@@ -3177,7 +3177,7 @@ const On = {
3177
3177
  submitOnEnter: c,
3178
3178
  ...f
3179
3179
  }) => {
3180
- const p = de(), h = l && l.some(({ condition: C }) => C === "required"), g = (u == null ? void 0 : u.toString().length) || 0, m = o && On[o] && On[o].component ? On[o].component : Mn, b = {};
3180
+ const p = de(), h = l && l.some(({ condition: w }) => w === "required"), g = (u == null ? void 0 : u.toString().length) || 0, m = o && On[o] && On[o].component ? On[o].component : Mn, b = {};
3181
3181
  o && ["checkboxes"].includes(o) ? b.element = "span" : b.htmlFor = e;
3182
3182
  let v = {
3183
3183
  ...f,
@@ -3190,17 +3190,17 @@ const On = {
3190
3190
  functions: vn(a),
3191
3191
  value: u
3192
3192
  };
3193
- i > 0 && (v["data-character-limit"] = i, v.functions && (v.functions.onChange = (C) => {
3194
- ((C == null ? void 0 : C.toString().length) || 0) > i && (C = C == null ? void 0 : C.toString().slice(0, i)), a.onChange(C);
3193
+ i > 0 && (v["data-character-limit"] = i, v.functions && (v.functions.onChange = (w) => {
3194
+ ((w == null ? void 0 : w.toString().length) || 0) > i && (w = w == null ? void 0 : w.toString().slice(0, i)), a.onChange(w);
3195
3195
  })), o && On[o] && On[o].props && (v = { ...v, ...On[o].props }), o && ["checkboxes"].includes(o) && (v.intlPath = `${t}_${e}`), r && (v["aria-invalid"] = !0, v["aria-describedby"] = `error-${e}`);
3196
- const x = f.label || p.formatMessage({ id: t ? `${t}_${e}` : e }), A = ({ ...C }) => r ? te.createElement(
3197
- C.as || "dd",
3196
+ const x = f.label || p.formatMessage({ id: t ? `${t}_${e}` : e }), A = ({ ...w }) => r ? te.createElement(
3197
+ w.as || "dd",
3198
3198
  {
3199
3199
  id: `error-${e}`,
3200
3200
  className: "error text-small",
3201
3201
  role: "alert",
3202
3202
  "aria-live": "assertive",
3203
- ...C
3203
+ ...w
3204
3204
  },
3205
3205
  r
3206
3206
  ) : null;
@@ -3216,8 +3216,8 @@ const On = {
3216
3216
  ),
3217
3217
  /* @__PURE__ */ d.jsx(A, { as: "p" })
3218
3218
  ] });
3219
- const B = (C) => te.createElement(C.element || "label", {
3220
- ...C,
3219
+ const B = (w) => te.createElement(w.element || "label", {
3220
+ ...w,
3221
3221
  className: "checkboxes-label text-small",
3222
3222
  "data-testid": `label-${e}`
3223
3223
  });
@@ -3394,26 +3394,26 @@ const Nr = ({
3394
3394
  shouldShowCancelButton: x = !1,
3395
3395
  shouldReset: A = !0,
3396
3396
  showRequiredLabels: B = !0,
3397
- showSuccessMessage: C = !1
3397
+ showSuccessMessage: w = !1
3398
3398
  } = o || {}, _ = de(), O = {};
3399
3399
  e.length && e.forEach((G) => {
3400
3400
  const D = G.id || G.name;
3401
3401
  D && (O[D] = G.value || "");
3402
3402
  });
3403
- const [z, M] = $a(Nh, {
3403
+ const [L, M] = $a(Nh, {
3404
3404
  isSubmitting: !1,
3405
3405
  formSubmitted: !1,
3406
3406
  errors: {},
3407
3407
  values: O
3408
- }), { errors: P, isSubmitting: j, formSubmitted: w, values: F } = z;
3408
+ }), { errors: P, isSubmitting: j, formSubmitted: C, values: F } = L;
3409
3409
  he(() => {
3410
- A && w && (ri = setTimeout(() => {
3410
+ A && C && (ri = setTimeout(() => {
3411
3411
  M({
3412
3412
  type: "updateValue",
3413
3413
  payload: { key: "formSubmitted", value: !1 }
3414
3414
  });
3415
3415
  }, 3e3));
3416
- }, [w]), he(() => () => {
3416
+ }, [C]), he(() => () => {
3417
3417
  ri && clearTimeout(ri);
3418
3418
  }, []), he(() => {
3419
3419
  const G = (D) => {
@@ -3477,7 +3477,7 @@ const Nr = ({
3477
3477
  }, ie = [
3478
3478
  {
3479
3479
  ...b,
3480
- icon: w ? { icon: "tick", position: "left" } : !1,
3480
+ icon: C ? { icon: "tick", position: "left" } : !1,
3481
3481
  className: "gtm-trackable",
3482
3482
  onClick: (G) => {
3483
3483
  var J;
@@ -3491,10 +3491,10 @@ const Nr = ({
3491
3491
  const H = document.getElementById("header");
3492
3492
  H && (D = D - H.offsetHeight - v), D < 0 && (D = 0), window.scrollTo({ top: D, behavior: "smooth" }), V();
3493
3493
  },
3494
- disabled: j || w || i.disabled,
3494
+ disabled: j || C || i.disabled,
3495
3495
  "data-gtm-event-context": l.context,
3496
3496
  "data-gtm-event-type": l.event,
3497
- children: j || w ? _.formatMessage({
3497
+ children: j || C ? _.formatMessage({
3498
3498
  id: `form_${j ? "submitting" : "submitted"}`
3499
3499
  }) : i.text
3500
3500
  }
@@ -3504,7 +3504,7 @@ const Nr = ({
3504
3504
  className: "gtm-trackable",
3505
3505
  "data-gtm-event-context": l.context,
3506
3506
  "data-gtm-event-type": l.event,
3507
- disabled: j || w,
3507
+ disabled: j || C,
3508
3508
  onClick: c,
3509
3509
  children: s.text || _.formatMessage({ id: "form_cancel" })
3510
3510
  }), /* @__PURE__ */ d.jsxs(d.Fragment, { children: [
@@ -3523,7 +3523,7 @@ const Nr = ({
3523
3523
  text: _.formatMessage({ id: "form_error_generalError" })
3524
3524
  }
3525
3525
  ) : null,
3526
- (!A || !j && !w || g) && e.map((G, D) => {
3526
+ (!A || !j && !C || g) && e.map((G, D) => {
3527
3527
  const {
3528
3528
  id: H = G.name || D,
3529
3529
  component: J,
@@ -3535,12 +3535,12 @@ const Nr = ({
3535
3535
  return /* @__PURE__ */ d.jsx(J, { ...G.props || {} }, `component-${H}-${D}`);
3536
3536
  const I = F ? F[H] : "", $ = {
3537
3537
  ...E,
3538
- onChange: (L) => {
3539
- M({ type: "updateValue", payload: { key: H, value: L } }), E.onChange(L && L.toString(), M);
3538
+ onChange: (z) => {
3539
+ M({ type: "updateValue", payload: { key: H, value: z } }), E.onChange(z && z.toString(), M);
3540
3540
  }
3541
3541
  };
3542
- return k && ($.onKeyDown = (L) => {
3543
- L.key === "Enter" && (L.stopPropagation(), L.preventDefault(), V()), E.onKeyDown && E.onKeyDown(L);
3542
+ return k && ($.onKeyDown = (z) => {
3543
+ z.key === "Enter" && (z.stopPropagation(), z.preventDefault(), V()), E.onKeyDown && E.onKeyDown(z);
3544
3544
  }), /* @__PURE__ */ d.jsx(
3545
3545
  Ph,
3546
3546
  {
@@ -3554,12 +3554,12 @@ const Nr = ({
3554
3554
  H
3555
3555
  );
3556
3556
  }),
3557
- m ? null : (j || w) && g ? g : /* @__PURE__ */ d.jsx(
3557
+ m ? null : (j || C) && g ? g : /* @__PURE__ */ d.jsx(
3558
3558
  Jn,
3559
3559
  {
3560
3560
  className: Z("cta", {
3561
- center: j || w,
3562
- submitted: w
3561
+ center: j || C,
3562
+ submitted: C
3563
3563
  }),
3564
3564
  buttons: ie
3565
3565
  }
@@ -3567,7 +3567,7 @@ const Nr = ({
3567
3567
  ]
3568
3568
  }
3569
3569
  ),
3570
- C && w && /* @__PURE__ */ d.jsx(ga, { className: "success", children: typeof C == "string" ? C : _.formatMessage({ id: "form_success" }) })
3570
+ w && C && /* @__PURE__ */ d.jsx(ga, { className: "success", children: typeof w == "string" ? w : _.formatMessage({ id: "form_success" }) })
3571
3571
  ] });
3572
3572
  };
3573
3573
  const qr = "passwordRules_", gc = "isMoreThanEightCharacters", vc = "includesNumberAndSymbol", bc = "includesLowerAndUppercase", Rh = {
@@ -4673,8 +4673,8 @@ function Sc(e, t) {
4673
4673
  heading: _t({}, $n.heading, a.heading)
4674
4674
  }), p = [f.ul_list, f.ol_list], h = u;
4675
4675
  if (Pn(e) || (h = e.children.map(function(x) {
4676
- var A = Pn(x) ? !1 : p.includes(x.type || ""), B = p.includes(e.type || ""), C = !1;
4677
- return !Pn(e) && Array.isArray(e.children) && (C = e.children.some(function(_) {
4676
+ var A = Pn(x) ? !1 : p.includes(x.type || ""), B = p.includes(e.type || ""), w = !1;
4677
+ return !Pn(e) && Array.isArray(e.children) && (w = e.children.some(function(_) {
4678
4678
  return !Pn(_) && _.type === f.link;
4679
4679
  })), Sc(_t({}, x, {
4680
4680
  parentType: c
@@ -4687,7 +4687,7 @@ function Sc(e, t) {
4687
4687
  // If we're the descendant of a list, we know we don't want a bunch
4688
4688
  // of whitespace. If we're parallel to a link we also don't want
4689
4689
  // to respect neighboring paragraphs
4690
- ignoreParagraphNewline: (s || A || B || C) && // if we have c.break, never ignore empty paragraph new line
4690
+ ignoreParagraphNewline: (s || A || B || w) && // if we have c.break, never ignore empty paragraph new line
4691
4691
  !x.break,
4692
4692
  // track depth of nested lists so we can add proper spacing
4693
4693
  listDepth: p.includes(x.type || "") ? l + 1 : l
@@ -5536,16 +5536,16 @@ var Rm = (e, t, n) => {
5536
5536
  case "merge_node": {
5537
5537
  var {
5538
5538
  path: v
5539
- } = n, x = se.get(e, v), A = S.previous(v), B = se.get(e, A), C = se.parent(e, v), _ = v[v.length - 1];
5539
+ } = n, x = se.get(e, v), A = S.previous(v), B = se.get(e, A), w = se.parent(e, v), _ = v[v.length - 1];
5540
5540
  if (fe.isText(x) && fe.isText(B))
5541
5541
  B.text += x.text;
5542
5542
  else if (!fe.isText(x) && !fe.isText(B))
5543
5543
  B.children.push(...x.children);
5544
5544
  else
5545
5545
  throw new Error('Cannot apply a "merge_node" operation at path ['.concat(v, "] to nodes of different interfaces: ").concat(Xe.stringify(x), " ").concat(Xe.stringify(B)));
5546
- if (C.children.splice(_, 1), t)
5547
- for (var [O, z] of q.points(t))
5548
- t[z] = Ee.transform(O, n);
5546
+ if (w.children.splice(_, 1), t)
5547
+ for (var [O, L] of q.points(t))
5548
+ t[L] = Ee.transform(O, n);
5549
5549
  break;
5550
5550
  }
5551
5551
  case "move_node": {
@@ -5555,8 +5555,8 @@ var Rm = (e, t, n) => {
5555
5555
  } = n;
5556
5556
  if (S.isAncestor(M, P))
5557
5557
  throw new Error("Cannot move a path [".concat(M, "] to new path [").concat(P, "] because the destination is inside itself."));
5558
- var j = se.get(e, M), w = se.parent(e, M), F = M[M.length - 1];
5559
- w.children.splice(F, 1);
5558
+ var j = se.get(e, M), C = se.parent(e, M), F = M[M.length - 1];
5559
+ C.children.splice(F, 1);
5560
5560
  var N = S.transform(M, n), R = se.get(e, S.parent(N)), V = N[N.length - 1];
5561
5561
  if (R.children.splice(V, 0, j), t)
5562
5562
  for (var [U, ie] of q.points(t))
@@ -5574,11 +5574,11 @@ var Rm = (e, t, n) => {
5574
5574
  t[E] = k;
5575
5575
  else {
5576
5576
  var I = void 0, $ = void 0;
5577
- for (var [L, ne] of se.texts(e))
5577
+ for (var [z, ne] of se.texts(e))
5578
5578
  if (S.compare(ne, G) === -1)
5579
- I = [L, ne];
5579
+ I = [z, ne];
5580
5580
  else {
5581
- $ = [L, ne];
5581
+ $ = [z, ne];
5582
5582
  break;
5583
5583
  }
5584
5584
  var ee = !1;
@@ -6886,15 +6886,15 @@ var xp = (e, t) => {
6886
6886
  }
6887
6887
  case "remove_node": {
6888
6888
  var {
6889
- path: C
6890
- } = t, _ = S.ancestors(C);
6889
+ path: w
6890
+ } = t, _ = S.ancestors(w);
6891
6891
  return [..._];
6892
6892
  }
6893
6893
  case "split_node": {
6894
6894
  var {
6895
6895
  path: O
6896
- } = t, z = S.levels(O), M = S.next(O);
6897
- return [...z, M];
6896
+ } = t, L = S.levels(O), M = S.next(O);
6897
+ return [...L, M];
6898
6898
  }
6899
6899
  default:
6900
6900
  return [];
@@ -7428,8 +7428,8 @@ function ug(e) {
7428
7428
  from: u,
7429
7429
  to: c,
7430
7430
  pass: (B) => {
7431
- var [C] = B;
7432
- return le.isElement(C) ? !!(!s && (y.isVoid(e, C) || y.isElementReadOnly(e, C)) || o && !y.isSelectable(e, C)) : !1;
7431
+ var [w] = B;
7432
+ return le.isElement(w) ? !!(!s && (y.isVoid(e, w) || y.isElementReadOnly(e, w)) || o && !y.isSelectable(e, w)) : !1;
7433
7433
  }
7434
7434
  }), g = [], m;
7435
7435
  for (var [b, v] of h)
@@ -7620,7 +7620,7 @@ function vg(e) {
7620
7620
  if (h === 0) {
7621
7621
  if (p === "")
7622
7622
  break;
7623
- h = C(p, r, a), p = qs(p, h, a)[1];
7623
+ h = w(p, r, a), p = qs(p, h, a)[1];
7624
7624
  }
7625
7625
  if (m = a ? m - h : m + h, g = g - h, g < 0) {
7626
7626
  h = -g;
@@ -7633,8 +7633,8 @@ function vg(e) {
7633
7633
  }
7634
7634
  }
7635
7635
  }
7636
- function C(_, O, z) {
7637
- return O === "character" ? zs(_, z) : O === "word" ? Jm(_, z) : O === "line" || O === "block" ? _.length : 1;
7636
+ function w(_, O, L) {
7637
+ return O === "character" ? zs(_, L) : O === "word" ? Jm(_, L) : O === "line" || O === "block" ? _.length : 1;
7638
7638
  }
7639
7639
  }();
7640
7640
  }
@@ -7859,11 +7859,11 @@ var wg = (e, t) => {
7859
7859
  match: (ve) => le.isElement(ve) && y.isBlock(t, ve),
7860
7860
  at: x,
7861
7861
  voids: l
7862
- }), C = y.above(t, {
7862
+ }), w = y.above(t, {
7863
7863
  match: (ve) => le.isElement(ve) && y.isBlock(t, ve),
7864
7864
  at: A,
7865
7865
  voids: l
7866
- }), _ = B && C && !S.equals(B[1], C[1]), O = S.equals(x.path, A.path), z = l ? null : (r = y.void(t, {
7866
+ }), _ = B && w && !S.equals(B[1], w[1]), O = S.equals(x.path, A.path), L = l ? null : (r = y.void(t, {
7867
7867
  at: x,
7868
7868
  mode: "highest"
7869
7869
  })) !== null && r !== void 0 ? r : y.elementReadOnly(t, {
@@ -7876,27 +7876,27 @@ var wg = (e, t) => {
7876
7876
  at: A,
7877
7877
  mode: "highest"
7878
7878
  });
7879
- if (z) {
7879
+ if (L) {
7880
7880
  var P = y.before(t, x);
7881
7881
  P && B && S.isAncestor(B[1], P.path) && (x = P);
7882
7882
  }
7883
7883
  if (M) {
7884
7884
  var j = y.after(t, A);
7885
- j && C && S.isAncestor(C[1], j.path) && (A = j);
7885
+ j && w && S.isAncestor(w[1], j.path) && (A = j);
7886
7886
  }
7887
- var w = [], F;
7887
+ var C = [], F;
7888
7888
  for (var N of y.nodes(t, {
7889
7889
  at: u,
7890
7890
  voids: l
7891
7891
  })) {
7892
7892
  var [R, V] = N;
7893
- F && S.compare(V, F) === 0 || (!l && le.isElement(R) && (y.isVoid(t, R) || y.isElementReadOnly(t, R)) || !S.isCommon(V, x.path) && !S.isCommon(V, A.path)) && (w.push(N), F = V);
7893
+ F && S.compare(V, F) === 0 || (!l && le.isElement(R) && (y.isVoid(t, R) || y.isElementReadOnly(t, R)) || !S.isCommon(V, x.path) && !S.isCommon(V, A.path)) && (C.push(N), F = V);
7894
7894
  }
7895
- var U = Array.from(w, (ve) => {
7895
+ var U = Array.from(C, (ve) => {
7896
7896
  var [, ke] = ve;
7897
7897
  return y.pathRef(t, ke);
7898
7898
  }), ie = y.pointRef(t, x), G = y.pointRef(t, A), D = "";
7899
- if (!O && !z) {
7899
+ if (!O && !L) {
7900
7900
  var H = ie.current, [J] = y.leaf(t, H), {
7901
7901
  path: E
7902
7902
  } = H, {
@@ -7913,9 +7913,9 @@ var wg = (e, t) => {
7913
7913
  at: ve,
7914
7914
  voids: l
7915
7915
  })), !M) {
7916
- var $ = G.current, [L] = y.leaf(t, $), {
7916
+ var $ = G.current, [z] = y.leaf(t, $), {
7917
7917
  path: ne
7918
- } = $, ee = O ? x.offset : 0, K = L.text.slice(ee, A.offset);
7918
+ } = $, ee = O ? x.offset : 0, K = z.text.slice(ee, A.offset);
7919
7919
  K.length > 0 && (t.apply({
7920
7920
  type: "remove_text",
7921
7921
  path: ne,
@@ -7985,34 +7985,34 @@ var wg = (e, t) => {
7985
7985
  match: (I) => le.isElement(I) && y.isBlock(t, I),
7986
7986
  at: s,
7987
7987
  voids: i
7988
- }), [, m] = g, b = y.isStart(t, s, m), v = y.isEnd(t, s, m), x = b && v, A = !b || b && v, B = !v, [, C] = se.first({
7988
+ }), [, m] = g, b = y.isStart(t, s, m), v = y.isEnd(t, s, m), x = b && v, A = !b || b && v, B = !v, [, w] = se.first({
7989
7989
  children: n
7990
7990
  }, []), [, _] = se.last({
7991
7991
  children: n
7992
- }, []), O = [], z = (I) => {
7993
- var [$, L] = I, ne = L.length === 0;
7994
- return ne ? !1 : x ? !0 : !(A && S.isAncestor(L, C) && le.isElement($) && !t.isVoid($) && !t.isInline($) || B && S.isAncestor(L, _) && le.isElement($) && !t.isVoid($) && !t.isInline($));
7992
+ }, []), O = [], L = (I) => {
7993
+ var [$, z] = I, ne = z.length === 0;
7994
+ return ne ? !1 : x ? !0 : !(A && S.isAncestor(z, w) && le.isElement($) && !t.isVoid($) && !t.isInline($) || B && S.isAncestor(z, _) && le.isElement($) && !t.isVoid($) && !t.isInline($));
7995
7995
  };
7996
7996
  for (var M of se.nodes({
7997
7997
  children: n
7998
7998
  }, {
7999
- pass: z
7999
+ pass: L
8000
8000
  }))
8001
- z(M) && O.push(M);
8002
- var P = [], j = [], w = [], F = !0, N = !1;
8001
+ L(M) && O.push(M);
8002
+ var P = [], j = [], C = [], F = !0, N = !1;
8003
8003
  for (var [R] of O)
8004
- le.isElement(R) && !t.isInline(R) ? (F = !1, N = !0, j.push(R)) : F ? P.push(R) : w.push(R);
8004
+ le.isElement(R) && !t.isInline(R) ? (F = !1, N = !0, j.push(R)) : F ? P.push(R) : C.push(R);
8005
8005
  var [V] = y.nodes(t, {
8006
8006
  at: s,
8007
8007
  match: (I) => fe.isText(I) || y.isInline(t, I),
8008
8008
  mode: "highest",
8009
8009
  voids: i
8010
- }), [, U] = V, ie = y.isStart(t, s, U), G = y.isEnd(t, s, U), D = y.pathRef(t, v && !w.length ? S.next(m) : m), H = y.pathRef(t, G ? S.next(U) : U);
8010
+ }), [, U] = V, ie = y.isStart(t, s, U), G = y.isEnd(t, s, U), D = y.pathRef(t, v && !C.length ? S.next(m) : m), H = y.pathRef(t, G ? S.next(U) : U);
8011
8011
  X.splitNodes(t, {
8012
8012
  at: s,
8013
8013
  match: (I) => N ? le.isElement(I) && y.isBlock(t, I) : fe.isText(I) || y.isInline(t, I),
8014
8014
  mode: N ? "lowest" : "highest",
8015
- always: N && (!b || P.length > 0) && (!v || w.length > 0),
8015
+ always: N && (!b || P.length > 0) && (!v || C.length > 0),
8016
8016
  voids: i
8017
8017
  });
8018
8018
  var J = y.pathRef(t, !ie || ie && G ? S.next(U) : U);
@@ -8022,7 +8022,7 @@ var wg = (e, t) => {
8022
8022
  mode: "highest",
8023
8023
  voids: i,
8024
8024
  batchDirty: o
8025
- }), x && !P.length && j.length && !w.length && X.delete(t, {
8025
+ }), x && !P.length && j.length && !C.length && X.delete(t, {
8026
8026
  at: m,
8027
8027
  voids: i
8028
8028
  }), X.insertNodes(t, j, {
@@ -8031,7 +8031,7 @@ var wg = (e, t) => {
8031
8031
  mode: "lowest",
8032
8032
  voids: i,
8033
8033
  batchDirty: o
8034
- }), X.insertNodes(t, w, {
8034
+ }), X.insertNodes(t, C, {
8035
8035
  at: H.current,
8036
8036
  match: (I) => fe.isText(I) || y.isInline(t, I),
8037
8037
  mode: "highest",
@@ -8039,7 +8039,7 @@ var wg = (e, t) => {
8039
8039
  batchDirty: o
8040
8040
  }), !r.at) {
8041
8041
  var E;
8042
- if (w.length > 0 && H.current ? E = S.previous(H.current) : j.length > 0 && D.current ? E = S.previous(D.current) : J.current && (E = S.previous(J.current)), E) {
8042
+ if (C.length > 0 && H.current ? E = S.previous(H.current) : j.length > 0 && D.current ? E = S.previous(D.current) : J.current && (E = S.previous(J.current)), E) {
8043
8043
  var k = y.end(t, E);
8044
8044
  X.select(t, k);
8045
8045
  }
@@ -8225,7 +8225,7 @@ var Ng = function(t, n) {
8225
8225
  at: A
8226
8226
  }))) {
8227
8227
  if (o) {
8228
- var C = [], _ = S.levels(A);
8228
+ var w = [], _ = S.levels(A);
8229
8229
  Dp(t, () => {
8230
8230
  var P = function() {
8231
8231
  var F = A.concat(B);
@@ -8235,7 +8235,7 @@ var Ng = function(t, n) {
8235
8235
  path: F,
8236
8236
  node: j
8237
8237
  };
8238
- t.apply(N), l = S.next(l), C.push(N), fe.isText ? _.push(...Array.from(se.nodes(j), (R) => {
8238
+ t.apply(N), l = S.next(l), w.push(N), fe.isText ? _.push(...Array.from(se.nodes(j), (R) => {
8239
8239
  var [, V] = R;
8240
8240
  return F.concat(V);
8241
8241
  })) : _.push(F);
@@ -8245,18 +8245,18 @@ var Ng = function(t, n) {
8245
8245
  }, () => {
8246
8246
  Lc(t, _, (P) => {
8247
8247
  var j = P;
8248
- for (var w of C)
8249
- if (S.operationCanTransformPath(w) && (j = S.transform(j, w), !j))
8248
+ for (var C of w)
8249
+ if (S.operationCanTransformPath(C) && (j = S.transform(j, C), !j))
8250
8250
  return null;
8251
8251
  return j;
8252
8252
  });
8253
8253
  });
8254
8254
  } else
8255
8255
  for (var O of n) {
8256
- var z = A.concat(B);
8256
+ var L = A.concat(B);
8257
8257
  B++, t.apply({
8258
8258
  type: "insert_node",
8259
- path: z,
8259
+ path: L,
8260
8260
  node: O
8261
8261
  }), l = S.next(l);
8262
8262
  }
@@ -8284,8 +8284,8 @@ var Ng = function(t, n) {
8284
8284
  mode: a,
8285
8285
  voids: i
8286
8286
  }), l = Array.from(o, (B) => {
8287
- var [, C] = B;
8288
- return y.pathRef(t, C);
8287
+ var [, w] = B;
8288
+ return y.pathRef(t, w);
8289
8289
  });
8290
8290
  for (var u of l) {
8291
8291
  var c = u.unref();
@@ -8385,17 +8385,17 @@ var Ng = function(t, n) {
8385
8385
  }), (P) => {
8386
8386
  var [j] = P;
8387
8387
  return j;
8388
- }).slice(x.length).slice(0, -1), C = y.above(t, {
8388
+ }).slice(x.length).slice(0, -1), w = y.above(t, {
8389
8389
  at: g,
8390
8390
  mode: "highest",
8391
8391
  match: (P) => B.includes(P) && zc(t, P)
8392
- }), _ = C && y.pathRef(t, C[1]), O, z;
8392
+ }), _ = w && y.pathRef(t, w[1]), O, L;
8393
8393
  if (fe.isText(h) && fe.isText(m)) {
8394
8394
  var M = Yt(h, Ig);
8395
- z = m.text.length, O = M;
8395
+ L = m.text.length, O = M;
8396
8396
  } else if (le.isElement(h) && le.isElement(m)) {
8397
8397
  var M = Yt(h, Lg);
8398
- z = m.children.length, O = M;
8398
+ L = m.children.length, O = M;
8399
8399
  } else
8400
8400
  throw new Error("Cannot merge the node at path [".concat(g, "] with the previous sibling because it is not the same kind: ").concat(Xe.stringify(h), " ").concat(Xe.stringify(m)));
8401
8401
  A || X.moveNodes(t, {
@@ -8411,7 +8411,7 @@ var Ng = function(t, n) {
8411
8411
  }) : t.apply({
8412
8412
  type: "merge_node",
8413
8413
  path: v,
8414
- position: z,
8414
+ position: L,
8415
8415
  properties: O
8416
8416
  }), _ && _.unref();
8417
8417
  }
@@ -8502,7 +8502,7 @@ var Ng = function(t, n) {
8502
8502
  voids: f = !1
8503
8503
  } = r;
8504
8504
  if (i) {
8505
- if (a == null && (a = S.isPath(i) ? er(t, i) : (z) => le.isElement(z) && y.isBlock(t, z)), !l && q.isRange(i) && (i = y.unhangRange(t, i, {
8505
+ if (a == null && (a = S.isPath(i) ? er(t, i) : (L) => le.isElement(L) && y.isBlock(t, L)), !l && q.isRange(i) && (i = y.unhangRange(t, i, {
8506
8506
  voids: f
8507
8507
  })), c && q.isRange(i)) {
8508
8508
  if (q.isCollapsed(i) && y.leaf(t, i.anchor)[0].text.length > 0)
@@ -8526,23 +8526,23 @@ var Ng = function(t, n) {
8526
8526
  always: !v
8527
8527
  }), i = p.unref(), r.at == null && X.select(t, i);
8528
8528
  }
8529
- s || (s = (z, M) => z !== M);
8529
+ s || (s = (L, M) => L !== M);
8530
8530
  for (var [x, A] of y.nodes(t, {
8531
8531
  at: i,
8532
8532
  match: a,
8533
8533
  mode: u,
8534
8534
  voids: f
8535
8535
  })) {
8536
- var B = {}, C = {};
8536
+ var B = {}, w = {};
8537
8537
  if (A.length !== 0) {
8538
8538
  var _ = !1;
8539
8539
  for (var O in n)
8540
- O === "children" || O === "text" || s(n[O], x[O]) && (_ = !0, x.hasOwnProperty(O) && (B[O] = x[O]), o ? n[O] != null && (C[O] = o(x[O], n[O])) : n[O] != null && (C[O] = n[O]));
8540
+ O === "children" || O === "text" || s(n[O], x[O]) && (_ = !0, x.hasOwnProperty(O) && (B[O] = x[O]), o ? n[O] != null && (w[O] = o(x[O], n[O])) : n[O] != null && (w[O] = n[O]));
8541
8541
  _ && t.apply({
8542
8542
  type: "set_node",
8543
8543
  path: A,
8544
8544
  properties: B,
8545
- newProperties: C
8545
+ newProperties: w
8546
8546
  });
8547
8547
  }
8548
8548
  }
@@ -8595,11 +8595,11 @@ var Ng = function(t, n) {
8595
8595
  if (!A) {
8596
8596
  var B = {
8597
8597
  text: ""
8598
- }, C = S.next(x);
8598
+ }, w = S.next(x);
8599
8599
  X.insertNodes(t, B, {
8600
- at: C,
8600
+ at: w,
8601
8601
  voids: a
8602
- }), A = y.point(t, C);
8602
+ }), A = y.point(t, w);
8603
8603
  }
8604
8604
  s = A, l = !0;
8605
8605
  }
@@ -8607,27 +8607,27 @@ var Ng = function(t, n) {
8607
8607
  o = _ + 1, l = !0;
8608
8608
  }
8609
8609
  h = y.pointRef(t, s);
8610
- var O = s.path.length - o, [, z] = g, M = s.path.slice(0, O), P = o === 0 ? s.offset : s.path[O] + b;
8611
- for (var [j, w] of y.levels(t, {
8610
+ var O = s.path.length - o, [, L] = g, M = s.path.slice(0, O), P = o === 0 ? s.offset : s.path[O] + b;
8611
+ for (var [j, C] of y.levels(t, {
8612
8612
  at: M,
8613
8613
  reverse: !0,
8614
8614
  voids: a
8615
8615
  })) {
8616
8616
  var F = !1;
8617
- if (w.length < z.length || w.length === 0 || !a && le.isElement(j) && y.isVoid(t, j))
8617
+ if (C.length < L.length || C.length === 0 || !a && le.isElement(j) && y.isVoid(t, j))
8618
8618
  break;
8619
- var N = p.current, R = y.isEnd(t, N, w);
8620
- if (l || !p || !y.isEdge(t, N, w)) {
8619
+ var N = p.current, R = y.isEnd(t, N, C);
8620
+ if (l || !p || !y.isEdge(t, N, C)) {
8621
8621
  F = !0;
8622
8622
  var V = se.extractProps(j);
8623
8623
  t.apply({
8624
8624
  type: "split_node",
8625
- path: w,
8625
+ path: C,
8626
8626
  position: P,
8627
8627
  properties: V
8628
8628
  });
8629
8629
  }
8630
- P = w[w.length - 1] + (F || R ? 1 : 0);
8630
+ P = C[C.length - 1] + (F || R ? 1 : 0);
8631
8631
  }
8632
8632
  if (n.at == null) {
8633
8633
  var U = h.current || y.end(t, []);
@@ -8750,19 +8750,19 @@ var Yg = function(t, n) {
8750
8750
  voids: s
8751
8751
  }));
8752
8752
  if (x.length > 0) {
8753
- var [A] = x, B = x[x.length - 1], [, C] = A, [, _] = B;
8754
- if (C.length === 0 && _.length === 0)
8753
+ var [A] = x, B = x[x.length - 1], [, w] = A, [, _] = B;
8754
+ if (w.length === 0 && _.length === 0)
8755
8755
  return 0;
8756
- var O = S.equals(C, _) ? S.parent(C) : S.common(C, _), z = y.range(t, C, _), M = y.node(t, O), [P] = M, j = O.length + 1, w = S.next(_.slice(0, j)), F = bu(bu({}, n), {}, {
8756
+ var O = S.equals(w, _) ? S.parent(w) : S.common(w, _), L = y.range(t, w, _), M = y.node(t, O), [P] = M, j = O.length + 1, C = S.next(_.slice(0, j)), F = bu(bu({}, n), {}, {
8757
8757
  children: []
8758
8758
  });
8759
8759
  X.insertNodes(t, F, {
8760
- at: w,
8760
+ at: C,
8761
8761
  voids: s
8762
8762
  }), X.moveNodes(t, {
8763
- at: z,
8763
+ at: L,
8764
8764
  match: (N) => le.isAncestor(P) && P.children.includes(N),
8765
- to: w.concat(0),
8765
+ to: C.concat(0),
8766
8766
  voids: s
8767
8767
  });
8768
8768
  }
@@ -9358,19 +9358,19 @@ function n0(e, t, n) {
9358
9358
  throw new TypeError(Xv);
9359
9359
  t = Eu(t) || 0, Jv(n) && (c = !!n.leading, f = "maxWait" in n, i = f ? e0(Eu(n.maxWait) || 0, t) : i, p = "trailing" in n ? !!n.trailing : p);
9360
9360
  function h(_) {
9361
- var O = r, z = a;
9362
- return r = a = void 0, u = _, s = e.apply(z, O), s;
9361
+ var O = r, L = a;
9362
+ return r = a = void 0, u = _, s = e.apply(L, O), s;
9363
9363
  }
9364
9364
  function g(_) {
9365
9365
  return u = _, o = setTimeout(v, t), c ? h(_) : s;
9366
9366
  }
9367
9367
  function m(_) {
9368
- var O = _ - l, z = _ - u, M = t - O;
9369
- return f ? t0(M, i - z) : M;
9368
+ var O = _ - l, L = _ - u, M = t - O;
9369
+ return f ? t0(M, i - L) : M;
9370
9370
  }
9371
9371
  function b(_) {
9372
- var O = _ - l, z = _ - u;
9373
- return l === void 0 || O >= t || O < 0 || f && z >= i;
9372
+ var O = _ - l, L = _ - u;
9373
+ return l === void 0 || O >= t || O < 0 || f && L >= i;
9374
9374
  }
9375
9375
  function v() {
9376
9376
  var _ = mi();
@@ -9387,7 +9387,7 @@ function n0(e, t, n) {
9387
9387
  function B() {
9388
9388
  return o === void 0 ? s : x(mi());
9389
9389
  }
9390
- function C() {
9390
+ function w() {
9391
9391
  var _ = mi(), O = b(_);
9392
9392
  if (r = arguments, a = this, l = _, O) {
9393
9393
  if (o === void 0)
@@ -9397,7 +9397,7 @@ function n0(e, t, n) {
9397
9397
  }
9398
9398
  return o === void 0 && (o = setTimeout(v, t)), s;
9399
9399
  }
9400
- return C.cancel = A, C.flush = B, C;
9400
+ return w.cancel = A, w.flush = B, w;
9401
9401
  }
9402
9402
  var Zc = n0;
9403
9403
  const r0 = /* @__PURE__ */ cn(Zc);
@@ -9449,23 +9449,23 @@ const l0 = /* @__PURE__ */ cn(u0), _u = (e) => typeof e == "object" && e != null
9449
9449
  }
9450
9450
  g != null && g === document.body && pi(g) && !pi(document.documentElement) || g != null && pi(g, c) && h.push(g);
9451
9451
  }
9452
- const m = (r = (n = window.visualViewport) == null ? void 0 : n.width) != null ? r : innerWidth, b = (i = (a = window.visualViewport) == null ? void 0 : a.height) != null ? i : innerHeight, { scrollX: v, scrollY: x } = window, { height: A, width: B, top: C, right: _, bottom: O, left: z } = e.getBoundingClientRect(), { top: M, right: P, bottom: j, left: w } = ((V) => {
9452
+ const m = (r = (n = window.visualViewport) == null ? void 0 : n.width) != null ? r : innerWidth, b = (i = (a = window.visualViewport) == null ? void 0 : a.height) != null ? i : innerHeight, { scrollX: v, scrollY: x } = window, { height: A, width: B, top: w, right: _, bottom: O, left: L } = e.getBoundingClientRect(), { top: M, right: P, bottom: j, left: C } = ((V) => {
9453
9453
  const U = window.getComputedStyle(V);
9454
9454
  return { top: parseFloat(U.scrollMarginTop) || 0, right: parseFloat(U.scrollMarginRight) || 0, bottom: parseFloat(U.scrollMarginBottom) || 0, left: parseFloat(U.scrollMarginLeft) || 0 };
9455
9455
  })(e);
9456
- let F = o === "start" || o === "nearest" ? C - M : o === "end" ? O + j : C + A / 2 - M + j, N = l === "center" ? z + B / 2 - w + P : l === "end" ? _ + P : z - w;
9456
+ let F = o === "start" || o === "nearest" ? w - M : o === "end" ? O + j : w + A / 2 - M + j, N = l === "center" ? L + B / 2 - C + P : l === "end" ? _ + P : L - C;
9457
9457
  const R = [];
9458
9458
  for (let V = 0; V < h.length; V++) {
9459
9459
  const U = h[V], { height: ie, width: G, top: D, right: H, bottom: J, left: E } = U.getBoundingClientRect();
9460
- if (s === "if-needed" && C >= 0 && z >= 0 && O <= b && _ <= m && C >= D && O <= J && z >= E && _ <= H)
9460
+ if (s === "if-needed" && w >= 0 && L >= 0 && O <= b && _ <= m && w >= D && O <= J && L >= E && _ <= H)
9461
9461
  return R;
9462
- const k = getComputedStyle(U), I = parseInt(k.borderLeftWidth, 10), $ = parseInt(k.borderTopWidth, 10), L = parseInt(k.borderRightWidth, 10), ne = parseInt(k.borderBottomWidth, 10);
9462
+ const k = getComputedStyle(U), I = parseInt(k.borderLeftWidth, 10), $ = parseInt(k.borderTopWidth, 10), z = parseInt(k.borderRightWidth, 10), ne = parseInt(k.borderBottomWidth, 10);
9463
9463
  let ee = 0, K = 0;
9464
- const ue = "offsetWidth" in U ? U.offsetWidth - U.clientWidth - I - L : 0, Q = "offsetHeight" in U ? U.offsetHeight - U.clientHeight - $ - ne : 0, De = "offsetWidth" in U ? U.offsetWidth === 0 ? 0 : G / U.offsetWidth : 0, ve = "offsetHeight" in U ? U.offsetHeight === 0 ? 0 : ie / U.offsetHeight : 0;
9464
+ const ue = "offsetWidth" in U ? U.offsetWidth - U.clientWidth - I - z : 0, Q = "offsetHeight" in U ? U.offsetHeight - U.clientHeight - $ - ne : 0, De = "offsetWidth" in U ? U.offsetWidth === 0 ? 0 : G / U.offsetWidth : 0, ve = "offsetHeight" in U ? U.offsetHeight === 0 ? 0 : ie / U.offsetHeight : 0;
9465
9465
  if (p === U)
9466
- ee = o === "start" ? F : o === "end" ? F - b : o === "nearest" ? Vr(x, x + b, b, $, ne, x + F, x + F + A, A) : F - b / 2, K = l === "start" ? N : l === "center" ? N - m / 2 : l === "end" ? N - m : Vr(v, v + m, m, I, L, v + N, v + N + B, B), ee = Math.max(0, ee + x), K = Math.max(0, K + v);
9466
+ ee = o === "start" ? F : o === "end" ? F - b : o === "nearest" ? Vr(x, x + b, b, $, ne, x + F, x + F + A, A) : F - b / 2, K = l === "start" ? N : l === "center" ? N - m / 2 : l === "end" ? N - m : Vr(v, v + m, m, I, z, v + N, v + N + B, B), ee = Math.max(0, ee + x), K = Math.max(0, K + v);
9467
9467
  else {
9468
- ee = o === "start" ? F - D - $ : o === "end" ? F - J + ne + Q : o === "nearest" ? Vr(D, J, ie, $, ne + Q, F, F + A, A) : F - (D + ie / 2) + Q / 2, K = l === "start" ? N - E - I : l === "center" ? N - (E + G / 2) + ue / 2 : l === "end" ? N - H + L + ue : Vr(E, H, G, I, L + ue, N, N + B, B);
9468
+ ee = o === "start" ? F - D - $ : o === "end" ? F - J + ne + Q : o === "nearest" ? Vr(D, J, ie, $, ne + Q, F, F + A, A) : F - (D + ie / 2) + Q / 2, K = l === "start" ? N - E - I : l === "center" ? N - (E + G / 2) + ue / 2 : l === "end" ? N - H + z + ue : Vr(E, H, G, I, z + ue, N, N + B, B);
9469
9469
  const { scrollLeft: ke, scrollTop: Ne } = U;
9470
9470
  ee = ve === 0 ? 0 : Math.max(0, Math.min(Ne + ee / ve, U.scrollHeight - ie / ve + Q)), K = De === 0 ? 0 : Math.max(0, Math.min(ke + K / De, U.scrollWidth - G / De + ue)), F += Ne - ee, N += ke - K;
9471
9471
  }
@@ -9574,13 +9574,13 @@ var yn = function(e) {
9574
9574
  return Kr.get(e);
9575
9575
  if (Gc(e))
9576
9576
  return Kr.set(e, Su), Su;
9577
- var n = getComputedStyle(e), r = Hs(e) && e.ownerSVGElement && e.getBBox(), a = !y0 && n.boxSizing === "border-box", i = b0.test(n.writingMode || ""), s = !r && Tu.test(n.overflowY || ""), o = !r && Tu.test(n.overflowX || ""), l = r ? 0 : Pt(n.paddingTop), u = r ? 0 : Pt(n.paddingRight), c = r ? 0 : Pt(n.paddingBottom), f = r ? 0 : Pt(n.paddingLeft), p = r ? 0 : Pt(n.borderTopWidth), h = r ? 0 : Pt(n.borderRightWidth), g = r ? 0 : Pt(n.borderBottomWidth), m = r ? 0 : Pt(n.borderLeftWidth), b = f + u, v = l + c, x = m + h, A = p + g, B = o ? e.offsetHeight - A - e.clientHeight : 0, C = s ? e.offsetWidth - x - e.clientWidth : 0, _ = a ? b + x : 0, O = a ? v + A : 0, z = r ? r.width : Pt(n.width) - _ - C, M = r ? r.height : Pt(n.height) - O - B, P = z + b + C + x, j = M + v + B + A, w = yn({
9578
- devicePixelContentBoxSize: Wn(Math.round(z * devicePixelRatio), Math.round(M * devicePixelRatio), i),
9577
+ var n = getComputedStyle(e), r = Hs(e) && e.ownerSVGElement && e.getBBox(), a = !y0 && n.boxSizing === "border-box", i = b0.test(n.writingMode || ""), s = !r && Tu.test(n.overflowY || ""), o = !r && Tu.test(n.overflowX || ""), l = r ? 0 : Pt(n.paddingTop), u = r ? 0 : Pt(n.paddingRight), c = r ? 0 : Pt(n.paddingBottom), f = r ? 0 : Pt(n.paddingLeft), p = r ? 0 : Pt(n.borderTopWidth), h = r ? 0 : Pt(n.borderRightWidth), g = r ? 0 : Pt(n.borderBottomWidth), m = r ? 0 : Pt(n.borderLeftWidth), b = f + u, v = l + c, x = m + h, A = p + g, B = o ? e.offsetHeight - A - e.clientHeight : 0, w = s ? e.offsetWidth - x - e.clientWidth : 0, _ = a ? b + x : 0, O = a ? v + A : 0, L = r ? r.width : Pt(n.width) - _ - w, M = r ? r.height : Pt(n.height) - O - B, P = L + b + w + x, j = M + v + B + A, C = yn({
9578
+ devicePixelContentBoxSize: Wn(Math.round(L * devicePixelRatio), Math.round(M * devicePixelRatio), i),
9579
9579
  borderBoxSize: Wn(P, j, i),
9580
- contentBoxSize: Wn(z, M, i),
9581
- contentRect: new Yc(f, l, z, M)
9580
+ contentBoxSize: Wn(L, M, i),
9581
+ contentRect: new Yc(f, l, L, M)
9582
9582
  });
9583
- return Kr.set(e, w), w;
9583
+ return Kr.set(e, C), C;
9584
9584
  }, Jc = function(e, t, n) {
9585
9585
  var r = Qc(e, n), a = r.borderBoxSize, i = r.contentBoxSize, s = r.devicePixelContentBoxSize;
9586
9586
  switch (t) {
@@ -10156,8 +10156,8 @@ var Y = {
10156
10156
  }), u = A.textContent.length, b = l;
10157
10157
  }
10158
10158
  } else if (g) {
10159
- for (var C = g.querySelectorAll("[data-slate-leaf]"), _ = 0; _ < C.length; _++) {
10160
- var O = C[_];
10159
+ for (var w = g.querySelectorAll("[data-slate-leaf]"), _ = 0; _ < w.length; _++) {
10160
+ var O = w[_];
10161
10161
  if (Y.hasDOMNode(e, O)) {
10162
10162
  m = O;
10163
10163
  break;
@@ -10182,15 +10182,15 @@ var Y = {
10182
10182
  `)) && u--;
10183
10183
  }
10184
10184
  if (lt && !l && !r) {
10185
- var z = o.hasAttribute("data-slate-node") ? o : o.closest("[data-slate-node]");
10186
- if (z && Y.hasDOMNode(e, z, {
10185
+ var L = o.hasAttribute("data-slate-node") ? o : o.closest("[data-slate-node]");
10186
+ if (L && Y.hasDOMNode(e, L, {
10187
10187
  editable: !0
10188
10188
  })) {
10189
- var M = Y.toSlateNode(e, z), {
10189
+ var M = Y.toSlateNode(e, L), {
10190
10190
  path: P,
10191
10191
  offset: j
10192
10192
  } = y.start(e, Y.findPath(e, M));
10193
- return z.querySelector("[data-slate-leaf]") || (j = s), {
10193
+ return L.querySelector("[data-slate-leaf]") || (j = s), {
10194
10194
  path: P,
10195
10195
  offset: j
10196
10196
  };
@@ -10201,7 +10201,7 @@ var Y = {
10201
10201
  return null;
10202
10202
  throw new Error("Cannot resolve a Slate point from DOM point: ".concat(t));
10203
10203
  }
10204
- var w = Y.toSlateNode(e, l), F = Y.findPath(e, w);
10204
+ var C = Y.toSlateNode(e, l), F = Y.findPath(e, C);
10205
10205
  return {
10206
10206
  path: F,
10207
10207
  offset: u
@@ -10250,16 +10250,16 @@ var Y = {
10250
10250
  });
10251
10251
  if (!B)
10252
10252
  return null;
10253
- var C = {
10253
+ var w = {
10254
10254
  anchor: A,
10255
10255
  focus: B
10256
10256
  };
10257
- return q.isExpanded(C) && q.isForward(C) && At(u) && y.void(e, {
10258
- at: C.focus,
10257
+ return q.isExpanded(w) && q.isForward(w) && At(u) && y.void(e, {
10258
+ at: w.focus,
10259
10259
  mode: "highest"
10260
- }) && (C = y.unhangRange(e, C, {
10260
+ }) && (w = y.unhangRange(e, w, {
10261
10261
  voids: !0
10262
- })), C;
10262
+ })), w;
10263
10263
  }
10264
10264
  };
10265
10265
  function eb(e, t) {
@@ -10550,24 +10550,24 @@ function cb(e) {
10550
10550
  scheduleOnDOMSelectionChange: n,
10551
10551
  onDOMSelectionChange: r
10552
10552
  } = e, a = !1, i = null, s = null, o = null, l = 0, u = !1, c = () => {
10553
- var w = tn.get(t);
10554
- if (tn.delete(t), w) {
10553
+ var C = tn.get(t);
10554
+ if (tn.delete(t), C) {
10555
10555
  var {
10556
10556
  selection: F
10557
- } = t, N = $u(t, w);
10557
+ } = t, N = $u(t, C);
10558
10558
  N && (!F || !q.equals(N, F)) && X.select(t, N);
10559
10559
  }
10560
10560
  }, f = () => {
10561
- var w = en.get(t);
10562
- if (en.delete(t), !!w) {
10563
- if (w.at) {
10564
- var F = Ee.isPoint(w.at) ? ms(t, w.at) : $u(t, w.at);
10561
+ var C = en.get(t);
10562
+ if (en.delete(t), !!C) {
10563
+ if (C.at) {
10564
+ var F = Ee.isPoint(C.at) ? ms(t, C.at) : $u(t, C.at);
10565
10565
  if (!F)
10566
10566
  return;
10567
10567
  var N = y.range(t, F);
10568
10568
  (!t.selection || !q.equals(t.selection, N)) && X.select(t, F);
10569
10569
  }
10570
- w.run();
10570
+ C.run();
10571
10571
  }
10572
10572
  }, p = () => {
10573
10573
  if (s && (clearTimeout(s), s = null), o && (clearTimeout(o), o = null), !B() && !A()) {
@@ -10575,7 +10575,7 @@ function cb(e) {
10575
10575
  return;
10576
10576
  }
10577
10577
  a || (a = !0, setTimeout(() => a = !1)), A() && (a = "action");
10578
- var w = t.selection && y.rangeRef(t, t.selection, {
10578
+ var C = t.selection && y.rangeRef(t, t.selection, {
10579
10579
  affinity: "forward"
10580
10580
  });
10581
10581
  Kt.set(t, t.marks), ub("flush", en.get(t), ht.get(t));
@@ -10588,9 +10588,9 @@ function cb(e) {
10588
10588
  id: J
10589
10589
  } = H;
10590
10590
  return J !== N.id;
10591
- })), eb(t, N) || (F = !1, en.delete(t), Kt.delete(t), a = "action", tn.delete(t), n.cancel(), r.cancel(), w == null || w.unref());
10591
+ })), eb(t, N) || (F = !1, en.delete(t), Kt.delete(t), a = "action", tn.delete(t), n.cancel(), r.cancel(), C == null || C.unref());
10592
10592
  }
10593
- var G = w == null ? void 0 : w.unref();
10593
+ var G = C == null ? void 0 : C.unref();
10594
10594
  if (G && !tn.get(t) && (!t.selection || !q.equals(G, t.selection)) && X.select(t, G), A()) {
10595
10595
  f();
10596
10596
  return;
@@ -10598,11 +10598,11 @@ function cb(e) {
10598
10598
  F && n(), n.flush(), r.flush(), c();
10599
10599
  var D = Kt.get(t);
10600
10600
  Kt.delete(t), D !== void 0 && (t.marks = D, t.onChange());
10601
- }, h = (w) => {
10601
+ }, h = (C) => {
10602
10602
  i && clearTimeout(i), i = setTimeout(() => {
10603
10603
  gn.set(t, !1), p();
10604
10604
  }, sb);
10605
- }, g = (w) => {
10605
+ }, g = (C) => {
10606
10606
  gn.set(t, !0), i && (clearTimeout(i), i = null);
10607
10607
  }, m = function() {
10608
10608
  var F = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !1, N = cs.get(t);
@@ -10613,14 +10613,14 @@ function cb(e) {
10613
10613
  }
10614
10614
  N.style.removeProperty("display");
10615
10615
  }
10616
- }, b = (w, F) => {
10616
+ }, b = (C, F) => {
10617
10617
  var N, R = (N = ht.get(t)) !== null && N !== void 0 ? N : [];
10618
10618
  ht.set(t, R);
10619
- var V = se.leaf(t, w), U = R.findIndex((D) => S.equals(D.path, w));
10619
+ var V = se.leaf(t, C), U = R.findIndex((D) => S.equals(D.path, C));
10620
10620
  if (U < 0) {
10621
10621
  var ie = cd(V.text, F);
10622
10622
  ie && R.push({
10623
- path: w,
10623
+ path: C,
10624
10624
  diff: F,
10625
10625
  id: l++
10626
10626
  }), m();
@@ -10642,14 +10642,14 @@ function cb(e) {
10642
10642
  at: N,
10643
10643
  run: F
10644
10644
  }), o = setTimeout(p);
10645
- }, x = (w) => {
10645
+ }, x = (C) => {
10646
10646
  var F;
10647
10647
  s && (clearTimeout(s), s = null);
10648
10648
  var {
10649
10649
  inputType: N
10650
- } = w, R = null, V = w.dataTransfer || w.data || void 0;
10650
+ } = C, R = null, V = C.dataTransfer || C.data || void 0;
10651
10651
  u !== !1 && N !== "insertText" && N !== "insertCompositionText" && (u = !1);
10652
- var [U] = w.getTargetRanges();
10652
+ var [U] = C.getTargetRanges();
10653
10653
  U && (R = Y.toSlateRange(t, U, {
10654
10654
  exactMatch: !1,
10655
10655
  suppressThrow: !0
@@ -10674,10 +10674,10 @@ function cb(e) {
10674
10674
  });
10675
10675
  }
10676
10676
  }
10677
- var I = N.endsWith("Backward") ? "backward" : "forward", [$, L] = q.edges(R), [ne, ee] = y.leaf(t, $.path), K = {
10677
+ var I = N.endsWith("Backward") ? "backward" : "forward", [$, z] = q.edges(R), [ne, ee] = y.leaf(t, $.path), K = {
10678
10678
  text: "",
10679
10679
  start: $.offset,
10680
- end: L.offset
10680
+ end: z.offset
10681
10681
  }, ue = ht.get(t), Q = ue == null ? void 0 : ue.find((ge) => S.equals(ge.path, ee)), De = Q ? [Q.diff, K] : [K], ve = ld(ne.text, ...De);
10682
10682
  if (ve.length === 0 && (D = !1), q.isExpanded(R)) {
10683
10683
  if (D && S.equals(R.anchor.path, R.focus.path)) {
@@ -10687,7 +10687,7 @@ function cb(e) {
10687
10687
  }, Ne = y.range(t, ke, ke);
10688
10688
  return O(Ne), b(R.anchor.path, {
10689
10689
  text: "",
10690
- end: L.offset,
10690
+ end: z.offset,
10691
10691
  start: $.offset
10692
10692
  });
10693
10693
  }
@@ -10838,25 +10838,25 @@ function cb(e) {
10838
10838
  }
10839
10839
  }
10840
10840
  }, A = () => !!en.get(t), B = () => {
10841
- var w;
10842
- return !!((w = ht.get(t)) !== null && w !== void 0 && w.length);
10843
- }, C = () => A() || B(), _ = () => a, O = (w) => {
10844
- tn.set(t, w), s && (clearTimeout(s), s = null);
10841
+ var C;
10842
+ return !!((C = ht.get(t)) !== null && C !== void 0 && C.length);
10843
+ }, w = () => A() || B(), _ = () => a, O = (C) => {
10844
+ tn.set(t, C), s && (clearTimeout(s), s = null);
10845
10845
  var {
10846
10846
  selection: F
10847
10847
  } = t;
10848
- if (w) {
10849
- var N = !F || !S.equals(F.anchor.path, w.anchor.path), R = !F || !S.equals(F.anchor.path.slice(0, -1), w.anchor.path.slice(0, -1));
10848
+ if (C) {
10849
+ var N = !F || !S.equals(F.anchor.path, C.anchor.path), R = !F || !S.equals(F.anchor.path.slice(0, -1), C.anchor.path.slice(0, -1));
10850
10850
  (N && u || R) && (u = !1), (N || B()) && (s = setTimeout(p, ob));
10851
10851
  }
10852
- }, z = () => {
10852
+ }, L = () => {
10853
10853
  (A() || !B()) && p();
10854
- }, M = (w) => {
10854
+ }, M = (C) => {
10855
10855
  B() || (m(!0), setTimeout(m));
10856
10856
  }, P = () => {
10857
10857
  A() || (o = setTimeout(p));
10858
- }, j = (w) => {
10859
- if (!(B() || A()) && w.some((N) => Gs(t, N, w))) {
10858
+ }, j = (C) => {
10859
+ if (!(B() || A()) && C.some((N) => Gs(t, N, C))) {
10860
10860
  var F;
10861
10861
  (F = ad.get(t)) === null || F === void 0 || F();
10862
10862
  }
@@ -10866,7 +10866,7 @@ function cb(e) {
10866
10866
  scheduleFlush: P,
10867
10867
  hasPendingDiffs: B,
10868
10868
  hasPendingAction: A,
10869
- hasPendingChanges: C,
10869
+ hasPendingChanges: w,
10870
10870
  isFlushing: _,
10871
10871
  handleUserSelect: O,
10872
10872
  handleCompositionEnd: h,
@@ -10874,7 +10874,7 @@ function cb(e) {
10874
10874
  handleDOMBeforeInput: x,
10875
10875
  handleKeyDown: M,
10876
10876
  handleDomMutations: j,
10877
- handleInput: z
10877
+ handleInput: L
10878
10878
  };
10879
10879
  }
10880
10880
  function db() {
@@ -11064,8 +11064,8 @@ var Ab = (e) => {
11064
11064
  if (cs.set(o, x), !l.current) {
11065
11065
  var B = window.ResizeObserver || O0;
11066
11066
  l.current = new B(() => {
11067
- var C;
11068
- (C = t.onPlaceholderResize) === null || C === void 0 || C.call(t, x);
11067
+ var w;
11068
+ (w = t.onPlaceholderResize) === null || w === void 0 || w.call(t, x);
11069
11069
  });
11070
11070
  }
11071
11071
  l.current.observe(x), u.current = x;
@@ -11459,11 +11459,11 @@ var Kb = (e) => /* @__PURE__ */ te.createElement(te.Fragment, null, pd(e)), Zb =
11459
11459
  style: f = {},
11460
11460
  as: p = "div",
11461
11461
  disableDefaultStyles: h = !1
11462
- } = e, g = Kn(e, Ub), m = tr(), [b, v] = ce(!1), x = Ce(null), A = Ce([]), [B, C] = ce(), {
11462
+ } = e, g = Kn(e, Ub), m = tr(), [b, v] = ce(!1), x = Ce(null), A = Ce([]), [B, w] = ce(), {
11463
11463
  onUserInput: _,
11464
11464
  receivedUserInput: O
11465
- } = Mb(), [, z] = $a((k) => k + 1, 0);
11466
- ad.set(m, z), ds.set(m, s);
11465
+ } = Mb(), [, L] = $a((k) => k + 1, 0);
11466
+ ad.set(m, L), ds.set(m, s);
11467
11467
  var M = It(() => ({
11468
11468
  isDraggingInternally: !1,
11469
11469
  isUpdatingSelection: !1,
@@ -11478,8 +11478,8 @@ var Kb = (e) => /* @__PURE__ */ te.createElement(te.Fragment, null, pd(e)), Zb =
11478
11478
  if ((lt || !Y.isComposing(m)) && (!M.isUpdatingSelection || k != null && k.isFlushing()) && !M.isDraggingInternally) {
11479
11479
  var I = Y.findDocumentOrShadowRoot(m), {
11480
11480
  activeElement: $
11481
- } = I, L = Y.toDOMNode(m, m), ne = I.getSelection();
11482
- if ($ === L ? (M.latestElement = $, an.set(m, !0)) : an.delete(m), !ne)
11481
+ } = I, z = Y.toDOMNode(m, m), ne = I.getSelection();
11482
+ if ($ === z ? (M.latestElement = $, an.set(m, !0)) : an.delete(m), !ne)
11483
11483
  return X.deselect(m);
11484
11484
  var {
11485
11485
  anchorNode: ee,
@@ -11494,21 +11494,21 @@ var Kb = (e) => /* @__PURE__ */ te.createElement(te.Fragment, null, pd(e)), Zb =
11494
11494
  }
11495
11495
  s && (!ue || !Q) && X.deselect(m);
11496
11496
  }
11497
- }, 100), [m, s, M]), w = It(() => r0(j, 0), [j]);
11497
+ }, 100), [m, s, M]), C = It(() => r0(j, 0), [j]);
11498
11498
  P.current = gb({
11499
11499
  node: x,
11500
11500
  onDOMSelectionChange: j,
11501
- scheduleOnDOMSelectionChange: w
11501
+ scheduleOnDOMSelectionChange: C
11502
11502
  }), jr(() => {
11503
11503
  var k, I, $;
11504
11504
  x.current && ($ = Ys(x.current)) ? (rd.set(m, $), da.set(m, x.current), Dn.set(m, x.current), Sr.set(x.current, m)) : Dn.delete(m);
11505
11505
  var {
11506
- selection: L
11506
+ selection: z
11507
11507
  } = m, ne = Y.findDocumentOrShadowRoot(m), ee = ne.getSelection();
11508
11508
  if (!(!ee || !Y.isFocused(m) || (k = P.current) !== null && k !== void 0 && k.hasPendingAction())) {
11509
11509
  var K = (ve) => {
11510
11510
  var ke = ee.type !== "None";
11511
- if (!(!L && !ke)) {
11511
+ if (!(!z && !ke)) {
11512
11512
  var Ne = ee.focusNode, $e;
11513
11513
  if (zn && ee.rangeCount > 1) {
11514
11514
  var et = ee.getRangeAt(0), Qe = ee.getRangeAt(ee.rangeCount - 1);
@@ -11516,20 +11516,20 @@ var Kb = (e) => /* @__PURE__ */ te.createElement(te.Fragment, null, pd(e)), Zb =
11516
11516
  } else
11517
11517
  $e = ee.anchorNode;
11518
11518
  var Je = da.get(m), st = !1;
11519
- if (Je.contains($e) && Je.contains(Ne) && (st = !0), ke && st && L && !ve) {
11519
+ if (Je.contains($e) && Je.contains(Ne) && (st = !0), ke && st && z && !ve) {
11520
11520
  var je = Y.toSlateRange(m, ee, {
11521
11521
  exactMatch: !0,
11522
11522
  // domSelection is not necessarily a valid Slate range
11523
11523
  // (e.g. when clicking on contentEditable:false element)
11524
11524
  suppressThrow: !0
11525
11525
  });
11526
- if (je && q.equals(je, L)) {
11526
+ if (je && q.equals(je, z)) {
11527
11527
  var Ke;
11528
11528
  if (!M.hasMarkPlaceholder || (Ke = $e) !== null && Ke !== void 0 && (Ke = Ke.parentElement) !== null && Ke !== void 0 && Ke.hasAttribute("data-slate-mark-placeholder"))
11529
11529
  return;
11530
11530
  }
11531
11531
  }
11532
- if (L && !Y.hasRange(m, L)) {
11532
+ if (z && !Y.hasRange(m, z)) {
11533
11533
  m.selection = Y.toSlateRange(m, ee, {
11534
11534
  exactMatch: !1,
11535
11535
  suppressThrow: !0
@@ -11537,8 +11537,8 @@ var Kb = (e) => /* @__PURE__ */ te.createElement(te.Fragment, null, pd(e)), Zb =
11537
11537
  return;
11538
11538
  }
11539
11539
  M.isUpdatingSelection = !0;
11540
- var He = L && Y.toDOMRange(m, L);
11541
- return He ? (Y.isComposing(m) && !lt ? ee.collapseToEnd() : q.isBackward(L) ? ee.setBaseAndExtent(He.endContainer, He.endOffset, He.startContainer, He.startOffset) : ee.setBaseAndExtent(He.startContainer, He.startOffset, He.endContainer, He.endOffset), c(m, He)) : ee.removeAllRanges(), He;
11540
+ var He = z && Y.toDOMRange(m, z);
11541
+ return He ? (Y.isComposing(m) && !lt ? ee.collapseToEnd() : q.isBackward(z) ? ee.setBaseAndExtent(He.endContainer, He.endOffset, He.startContainer, He.startOffset) : ee.setBaseAndExtent(He.startContainer, He.startOffset, He.endContainer, He.endOffset), c(m, He)) : ee.removeAllRanges(), He;
11542
11542
  }
11543
11543
  };
11544
11544
  ee.rangeCount <= 1 && K();
@@ -11573,16 +11573,16 @@ var Kb = (e) => /* @__PURE__ */ te.createElement(te.Fragment, null, pd(e)), Zb =
11573
11573
  var I;
11574
11574
  if (P.current)
11575
11575
  return P.current.handleDOMBeforeInput(k);
11576
- w.flush(), j.flush();
11576
+ C.flush(), j.flush();
11577
11577
  var {
11578
11578
  selection: $
11579
11579
  } = m, {
11580
- inputType: L
11581
- } = k, ne = k.dataTransfer || k.data || void 0, ee = L === "insertCompositionText" || L === "deleteCompositionText";
11580
+ inputType: z
11581
+ } = k, ne = k.dataTransfer || k.data || void 0, ee = z === "insertCompositionText" || z === "deleteCompositionText";
11582
11582
  if (ee && Y.isComposing(m))
11583
11583
  return;
11584
11584
  var K = !1;
11585
- if (L === "insertText" && $ && q.isCollapsed($) && // Only use native character insertion for single characters a-z or space for now.
11585
+ if (z === "insertText" && $ && q.isCollapsed($) && // Only use native character insertion for single characters a-z or space for now.
11586
11586
  // Long-press events (hold a + press 4 = ä) to choose a special character otherwise
11587
11587
  // causes duplicate inserts.
11588
11588
  k.data && k.data.length === 1 && /[a-z ]/i.test(k.data) && // Chrome has issues correctly editing the start of nodes: https://bugs.chromium.org/p/chromium/issues/detail?id=1249405
@@ -11606,7 +11606,7 @@ var Kb = (e) => /* @__PURE__ */ te.createElement(te.Fragment, null, pd(e)), Zb =
11606
11606
  Je && se.string(Je[0]).includes(" ") && (K = !1);
11607
11607
  }
11608
11608
  }
11609
- if (!L.startsWith("delete") || L.startsWith("deleteBy")) {
11609
+ if (!z.startsWith("delete") || z.startsWith("deleteBy")) {
11610
11610
  var [st] = k.getTargetRanges();
11611
11611
  if (st) {
11612
11612
  var je = Y.toSlateRange(m, st, {
@@ -11622,14 +11622,14 @@ var Kb = (e) => /* @__PURE__ */ te.createElement(te.Fragment, null, pd(e)), Zb =
11622
11622
  }
11623
11623
  if (ee)
11624
11624
  return;
11625
- if (K || k.preventDefault(), $ && q.isExpanded($) && L.startsWith("delete")) {
11626
- var He = L.endsWith("Backward") ? "backward" : "forward";
11625
+ if (K || k.preventDefault(), $ && q.isExpanded($) && z.startsWith("delete")) {
11626
+ var He = z.endsWith("Backward") ? "backward" : "forward";
11627
11627
  y.deleteFragment(m, {
11628
11628
  direction: He
11629
11629
  });
11630
11630
  return;
11631
11631
  }
11632
- switch (L) {
11632
+ switch (z) {
11633
11633
  case "deleteByComposition":
11634
11634
  case "deleteByCut":
11635
11635
  case "deleteByDrag": {
@@ -11702,28 +11702,28 @@ var Kb = (e) => /* @__PURE__ */ te.createElement(te.Fragment, null, pd(e)), Zb =
11702
11702
  case "insertFromYank":
11703
11703
  case "insertReplacementText":
11704
11704
  case "insertText": {
11705
- L === "insertFromComposition" && Y.isComposing(m) && (v(!1), gn.set(m, !1)), (ne == null ? void 0 : ne.constructor.name) === "DataTransfer" ? Y.insertData(m, ne) : typeof ne == "string" && (K ? A.current.push(() => y.insertText(m, ne)) : y.insertText(m, ne));
11705
+ z === "insertFromComposition" && Y.isComposing(m) && (v(!1), gn.set(m, !1)), (ne == null ? void 0 : ne.constructor.name) === "DataTransfer" ? Y.insertData(m, ne) : typeof ne == "string" && (K ? A.current.push(() => y.insertText(m, ne)) : y.insertText(m, ne));
11706
11706
  break;
11707
11707
  }
11708
11708
  }
11709
11709
  var W = (I = vr.get(m)) === null || I === void 0 ? void 0 : I.unref();
11710
11710
  vr.delete(m), W && (!m.selection || !q.equals(m.selection, W)) && X.select(m, W);
11711
11711
  }
11712
- }, [m, j, _, a, s, w]), N = Fe((k) => {
11713
- k == null ? (j.cancel(), w.cancel(), da.delete(m), Dn.delete(m), x.current && Jt && x.current.removeEventListener("beforeinput", F)) : Jt && k.addEventListener("beforeinput", F), x.current = k;
11714
- }, [j, w, m, F]);
11712
+ }, [m, j, _, a, s, C]), N = Fe((k) => {
11713
+ k == null ? (j.cancel(), C.cancel(), da.delete(m), Dn.delete(m), x.current && Jt && x.current.removeEventListener("beforeinput", F)) : Jt && k.addEventListener("beforeinput", F), x.current = k;
11714
+ }, [j, C, m, F]);
11715
11715
  jr(() => {
11716
11716
  var k = Y.getWindow(m);
11717
- return k.document.addEventListener("selectionchange", w), () => {
11718
- k.document.removeEventListener("selectionchange", w);
11717
+ return k.document.addEventListener("selectionchange", C), () => {
11718
+ k.document.removeEventListener("selectionchange", C);
11719
11719
  };
11720
- }, [w]);
11720
+ }, [C]);
11721
11721
  var R = r([m, []]), V = i && m.children.length === 1 && Array.from(se.texts(m)).length === 1 && se.string(m) === "" && !b, U = Fe((k) => {
11722
11722
  if (k && V) {
11723
11723
  var I;
11724
- C((I = k.getBoundingClientRect()) === null || I === void 0 ? void 0 : I.height);
11724
+ w((I = k.getBoundingClientRect()) === null || I === void 0 ? void 0 : I.height);
11725
11725
  } else
11726
- C(void 0);
11726
+ w(void 0);
11727
11727
  }, [V]);
11728
11728
  if (V) {
11729
11729
  var ie = y.start(m, []);
@@ -11835,8 +11835,8 @@ var Kb = (e) => /* @__PURE__ */ te.createElement(te.Fragment, null, pd(e)), Zb =
11835
11835
  if (M.latestElement !== I.activeElement) {
11836
11836
  var {
11837
11837
  relatedTarget: $
11838
- } = k, L = Y.toDOMNode(m, m);
11839
- if ($ !== L && !(At($) && $.hasAttribute("data-slate-spacer"))) {
11838
+ } = k, z = Y.toDOMNode(m, m);
11839
+ if ($ !== z && !(At($) && $.hasAttribute("data-slate-spacer"))) {
11840
11840
  if ($ != null && un($) && Y.hasDOMNode(m, $)) {
11841
11841
  var ne = Y.toSlateNode(m, $);
11842
11842
  if (le.isElement(ne) && !m.isVoid(ne))
@@ -11857,15 +11857,15 @@ var Kb = (e) => /* @__PURE__ */ te.createElement(te.Fragment, null, pd(e)), Zb =
11857
11857
  if (!y.hasPath(m, $) || se.get(m, $) !== I)
11858
11858
  return;
11859
11859
  if (k.detail === $b && $.length >= 1) {
11860
- var L = $;
11860
+ var z = $;
11861
11861
  if (!(le.isElement(I) && y.isBlock(m, I))) {
11862
11862
  var ne, ee = y.above(m, {
11863
11863
  match: (Ne) => le.isElement(Ne) && y.isBlock(m, Ne),
11864
11864
  at: $
11865
11865
  });
11866
- L = (ne = ee == null ? void 0 : ee[1]) !== null && ne !== void 0 ? ne : $.slice(0, 1);
11866
+ z = (ne = ee == null ? void 0 : ee[1]) !== null && ne !== void 0 ? ne : $.slice(0, 1);
11867
11867
  }
11868
- var K = y.range(m, L);
11868
+ var K = y.range(m, z);
11869
11869
  X.select(m, K);
11870
11870
  return;
11871
11871
  }
@@ -11892,8 +11892,8 @@ var Kb = (e) => /* @__PURE__ */ te.createElement(te.Fragment, null, pd(e)), Zb =
11892
11892
  if (!fr && !z0 && !M0 && !W0 && !q0 && k.data) {
11893
11893
  var $ = Tt.get(m);
11894
11894
  Tt.delete(m), $ !== void 0 && (Kt.set(m, m.marks), m.marks = $), y.insertText(m, k.data);
11895
- var L = Kt.get(m);
11896
- Kt.delete(m), L !== void 0 && (m.marks = L);
11895
+ var z = Kt.get(m);
11896
+ Kt.delete(m), z !== void 0 && (m.marks = z);
11897
11897
  }
11898
11898
  }
11899
11899
  }, [g.onCompositionEnd, m]),
@@ -11941,11 +11941,11 @@ var Kb = (e) => /* @__PURE__ */ te.createElement(te.Fragment, null, pd(e)), Zb =
11941
11941
  }, [g.onDragOver, m]),
11942
11942
  onDragStart: Fe((k) => {
11943
11943
  if (!s && Y.hasTarget(m, k.target) && !ut(k, g.onDragStart)) {
11944
- var I = Y.toSlateNode(m, k.target), $ = Y.findPath(m, I), L = le.isElement(I) && y.isVoid(m, I) || y.void(m, {
11944
+ var I = Y.toSlateNode(m, k.target), $ = Y.findPath(m, I), z = le.isElement(I) && y.isVoid(m, I) || y.void(m, {
11945
11945
  at: $,
11946
11946
  voids: !0
11947
11947
  });
11948
- if (L) {
11948
+ if (z) {
11949
11949
  var ne = y.range(m, $);
11950
11950
  X.select(m, ne);
11951
11951
  }
@@ -11955,13 +11955,13 @@ var Kb = (e) => /* @__PURE__ */ te.createElement(te.Fragment, null, pd(e)), Zb =
11955
11955
  onDrop: Fe((k) => {
11956
11956
  if (!s && Y.hasTarget(m, k.target) && !ut(k, g.onDrop)) {
11957
11957
  k.preventDefault();
11958
- var I = m.selection, $ = Y.findEventRange(m, k), L = k.dataTransfer;
11958
+ var I = m.selection, $ = Y.findEventRange(m, k), z = k.dataTransfer;
11959
11959
  X.select(m, $), M.isDraggingInternally && I && !q.equals(I, $) && !y.void(m, {
11960
11960
  at: $,
11961
11961
  voids: !0
11962
11962
  }) && X.delete(m, {
11963
11963
  at: I
11964
- }), Y.insertData(m, L), Y.isFocused(m) || Y.focus(m);
11964
+ }), Y.insertData(m, z), Y.isFocused(m) || Y.focus(m);
11965
11965
  }
11966
11966
  M.isDraggingInternally = !1;
11967
11967
  }, [s, m, g.onDrop, M]),
@@ -11988,8 +11988,8 @@ var Kb = (e) => /* @__PURE__ */ te.createElement(te.Fragment, null, pd(e)), Zb =
11988
11988
  if (Y.isComposing(m) && $.isComposing === !1 && (gn.set(m, !1), v(!1)), ut(k, g.onKeyDown) || Y.isComposing(m))
11989
11989
  return;
11990
11990
  var {
11991
- selection: L
11992
- } = m, ne = m.children[L !== null ? L.focus.path[0] : 0], ee = Hc(se.string(ne)) === "rtl";
11991
+ selection: z
11992
+ } = m, ne = m.children[z !== null ? z.focus.path[0] : 0], ee = Hc(se.string(ne)) === "rtl";
11993
11993
  if (qe.isRedo($)) {
11994
11994
  k.preventDefault();
11995
11995
  var K = m;
@@ -12031,7 +12031,7 @@ var Kb = (e) => /* @__PURE__ */ te.createElement(te.Fragment, null, pd(e)), Zb =
12031
12031
  return;
12032
12032
  }
12033
12033
  if (qe.isMoveBackward($)) {
12034
- k.preventDefault(), L && q.isCollapsed(L) ? X.move(m, {
12034
+ k.preventDefault(), z && q.isCollapsed(z) ? X.move(m, {
12035
12035
  reverse: !ee
12036
12036
  }) : X.collapse(m, {
12037
12037
  edge: ee ? "end" : "start"
@@ -12039,7 +12039,7 @@ var Kb = (e) => /* @__PURE__ */ te.createElement(te.Fragment, null, pd(e)), Zb =
12039
12039
  return;
12040
12040
  }
12041
12041
  if (qe.isMoveForward($)) {
12042
- k.preventDefault(), L && q.isCollapsed(L) ? X.move(m, {
12042
+ k.preventDefault(), z && q.isCollapsed(z) ? X.move(m, {
12043
12043
  reverse: ee
12044
12044
  }) : X.collapse(m, {
12045
12045
  edge: ee ? "start" : "end"
@@ -12047,7 +12047,7 @@ var Kb = (e) => /* @__PURE__ */ te.createElement(te.Fragment, null, pd(e)), Zb =
12047
12047
  return;
12048
12048
  }
12049
12049
  if (qe.isMoveWordBackward($)) {
12050
- k.preventDefault(), L && q.isExpanded(L) && X.collapse(m, {
12050
+ k.preventDefault(), z && q.isExpanded(z) && X.collapse(m, {
12051
12051
  edge: "focus"
12052
12052
  }), X.move(m, {
12053
12053
  unit: "word",
@@ -12056,7 +12056,7 @@ var Kb = (e) => /* @__PURE__ */ te.createElement(te.Fragment, null, pd(e)), Zb =
12056
12056
  return;
12057
12057
  }
12058
12058
  if (qe.isMoveWordForward($)) {
12059
- k.preventDefault(), L && q.isExpanded(L) && X.collapse(m, {
12059
+ k.preventDefault(), z && q.isExpanded(z) && X.collapse(m, {
12060
12060
  edge: "focus"
12061
12061
  }), X.move(m, {
12062
12062
  unit: "word",
@@ -12065,8 +12065,8 @@ var Kb = (e) => /* @__PURE__ */ te.createElement(te.Fragment, null, pd(e)), Zb =
12065
12065
  return;
12066
12066
  }
12067
12067
  if (Jt) {
12068
- if ((nd || fr) && L && (qe.isDeleteBackward($) || qe.isDeleteForward($)) && q.isCollapsed(L)) {
12069
- var Q = se.parent(m, L.anchor.path);
12068
+ if ((nd || fr) && z && (qe.isDeleteBackward($) || qe.isDeleteForward($)) && q.isCollapsed(z)) {
12069
+ var Q = se.parent(m, z.anchor.path);
12070
12070
  if (le.isElement(Q) && y.isVoid(m, Q) && (y.isInline(m, Q) || y.isBlock(m, Q))) {
12071
12071
  k.preventDefault(), y.deleteBackward(m, {
12072
12072
  unit: "block"
@@ -12088,19 +12088,19 @@ var Kb = (e) => /* @__PURE__ */ te.createElement(te.Fragment, null, pd(e)), Zb =
12088
12088
  return;
12089
12089
  }
12090
12090
  if (qe.isDeleteBackward($)) {
12091
- k.preventDefault(), L && q.isExpanded(L) ? y.deleteFragment(m, {
12091
+ k.preventDefault(), z && q.isExpanded(z) ? y.deleteFragment(m, {
12092
12092
  direction: "backward"
12093
12093
  }) : y.deleteBackward(m);
12094
12094
  return;
12095
12095
  }
12096
12096
  if (qe.isDeleteForward($)) {
12097
- k.preventDefault(), L && q.isExpanded(L) ? y.deleteFragment(m, {
12097
+ k.preventDefault(), z && q.isExpanded(z) ? y.deleteFragment(m, {
12098
12098
  direction: "forward"
12099
12099
  }) : y.deleteForward(m);
12100
12100
  return;
12101
12101
  }
12102
12102
  if (qe.isDeleteLineBackward($)) {
12103
- k.preventDefault(), L && q.isExpanded(L) ? y.deleteFragment(m, {
12103
+ k.preventDefault(), z && q.isExpanded(z) ? y.deleteFragment(m, {
12104
12104
  direction: "backward"
12105
12105
  }) : y.deleteBackward(m, {
12106
12106
  unit: "line"
@@ -12108,7 +12108,7 @@ var Kb = (e) => /* @__PURE__ */ te.createElement(te.Fragment, null, pd(e)), Zb =
12108
12108
  return;
12109
12109
  }
12110
12110
  if (qe.isDeleteLineForward($)) {
12111
- k.preventDefault(), L && q.isExpanded(L) ? y.deleteFragment(m, {
12111
+ k.preventDefault(), z && q.isExpanded(z) ? y.deleteFragment(m, {
12112
12112
  direction: "forward"
12113
12113
  }) : y.deleteForward(m, {
12114
12114
  unit: "line"
@@ -12116,7 +12116,7 @@ var Kb = (e) => /* @__PURE__ */ te.createElement(te.Fragment, null, pd(e)), Zb =
12116
12116
  return;
12117
12117
  }
12118
12118
  if (qe.isDeleteWordBackward($)) {
12119
- k.preventDefault(), L && q.isExpanded(L) ? y.deleteFragment(m, {
12119
+ k.preventDefault(), z && q.isExpanded(z) ? y.deleteFragment(m, {
12120
12120
  direction: "backward"
12121
12121
  }) : y.deleteBackward(m, {
12122
12122
  unit: "word"
@@ -12124,7 +12124,7 @@ var Kb = (e) => /* @__PURE__ */ te.createElement(te.Fragment, null, pd(e)), Zb =
12124
12124
  return;
12125
12125
  }
12126
12126
  if (qe.isDeleteWordForward($)) {
12127
- k.preventDefault(), L && q.isExpanded(L) ? y.deleteFragment(m, {
12127
+ k.preventDefault(), z && q.isExpanded(z) ? y.deleteFragment(m, {
12128
12128
  direction: "forward"
12129
12129
  }) : y.deleteForward(m, {
12130
12130
  unit: "word"
@@ -12357,20 +12357,20 @@ var iy = function(t) {
12357
12357
  c.push(...Rn(r, A));
12358
12358
  var B;
12359
12359
  S.isBefore(u.path, u.newPath) ? (c.push(...Rn(r, S.parent(u.path))), B = u.newPath) : (c.push(...Rn(r, S.parent(u.newPath))), B = u.path);
12360
- var C = se.get(t, S.parent(B)), _ = Y.findKey(r, C), O = y.pathRef(r, S.parent(B));
12360
+ var w = se.get(t, S.parent(B)), _ = Y.findKey(r, w), O = y.pathRef(r, S.parent(B));
12361
12361
  f.push([O, _]);
12362
12362
  break;
12363
12363
  }
12364
12364
  }
12365
12365
  a(u);
12366
- for (var [z, M] of c) {
12367
- var [P] = y.node(r, z);
12366
+ for (var [L, M] of c) {
12367
+ var [P] = y.node(r, L);
12368
12368
  Ea.set(P, M);
12369
12369
  }
12370
- for (var [j, w] of f)
12370
+ for (var [j, C] of f)
12371
12371
  if (j.current) {
12372
12372
  var [F] = y.node(r, j.current);
12373
- Ea.set(F, w);
12373
+ Ea.set(F, C);
12374
12374
  }
12375
12375
  }, r.setFragmentData = (u) => {
12376
12376
  var {
@@ -12395,11 +12395,11 @@ var iy = function(t) {
12395
12395
  P.textContent = j ? `
12396
12396
  ` : "";
12397
12397
  }), sd(v)) {
12398
- var C = v.ownerDocument.createElement("span");
12399
- C.style.whiteSpace = "pre", C.appendChild(v), b.appendChild(C), v = C;
12398
+ var w = v.ownerDocument.createElement("span");
12399
+ w.style.whiteSpace = "pre", w.appendChild(v), b.appendChild(w), v = w;
12400
12400
  }
12401
- var _ = r.getFragment(), O = JSON.stringify(_), z = window.btoa(encodeURIComponent(O));
12402
- v.setAttribute("data-slate-fragment", z), u.setData("application/".concat(n), z);
12401
+ var _ = r.getFragment(), O = JSON.stringify(_), L = window.btoa(encodeURIComponent(O));
12402
+ v.setAttribute("data-slate-fragment", L), u.setData("application/".concat(n), L);
12403
12403
  var M = b.ownerDocument.createElement("div");
12404
12404
  return M.appendChild(b), M.setAttribute("hidden", "true"), b.ownerDocument.body.appendChild(M), u.setData("text/html", M.innerHTML), u.setData("text/plain", ud(M)), b.ownerDocument.body.removeChild(M), u;
12405
12405
  }
@@ -12523,28 +12523,36 @@ const sy = {
12523
12523
  ...s,
12524
12524
  ...m,
12525
12525
  className: Z(e, a, { active: t }),
12526
- onMouseDown: (b) => {
12526
+ onClick: (b) => {
12527
12527
  b.stopPropagation(), b.preventDefault(), r();
12528
12528
  },
12529
12529
  onKeyDown: (b) => {
12530
12530
  var v, x, A, B;
12531
- if (b.key === "Enter")
12532
- b.stopPropagation(), b.preventDefault(), r();
12533
- else if (["ArrowLeft", "ArrowRight"].includes(b.key)) {
12534
- b.stopPropagation(), b.preventDefault();
12535
- const C = b.currentTarget.closest("li");
12536
- let _ = C == null ? void 0 : C.nextElementSibling;
12537
- if (b.key === "ArrowLeft") {
12538
- const z = C == null ? void 0 : C.previousElementSibling;
12539
- z ? _ = z : _ = (v = C == null ? void 0 : C.parentElement) == null ? void 0 : v.lastElementChild;
12540
- } else
12541
- _ || (_ = (x = C == null ? void 0 : C.parentElement) == null ? void 0 : x.firstElementChild);
12542
- const O = _ == null ? void 0 : _.className.split(" ")[0];
12543
- O && (f(O), (A = _ == null ? void 0 : _.querySelector("button")) == null || A.focus());
12544
- } else {
12545
- const C = b.currentTarget.closest("fieldset");
12546
- C && ((B = C == null ? void 0 : C.previousElementSibling) == null || B.focus());
12547
- }
12531
+ if (b.key !== "Tab")
12532
+ switch (b.key) {
12533
+ case "Enter":
12534
+ b.stopPropagation(), b.preventDefault(), r();
12535
+ break;
12536
+ case "ArrowLeft":
12537
+ case "ArrowRight":
12538
+ b.stopPropagation(), b.preventDefault();
12539
+ const w = b.currentTarget.closest("li");
12540
+ let _ = w == null ? void 0 : w.nextElementSibling;
12541
+ if (b.key === "ArrowLeft") {
12542
+ const M = w == null ? void 0 : w.previousElementSibling;
12543
+ M ? _ = M : _ = (v = w == null ? void 0 : w.parentElement) == null ? void 0 : v.lastElementChild;
12544
+ } else
12545
+ _ || (_ = (x = w == null ? void 0 : w.parentElement) == null ? void 0 : x.firstElementChild);
12546
+ const O = _ == null ? void 0 : _.className.split(" ")[0];
12547
+ O && (f(O), (A = _ == null ? void 0 : _.querySelector("button")) == null || A.focus());
12548
+ break;
12549
+ default:
12550
+ const L = b.currentTarget.closest("fieldset");
12551
+ if (L) {
12552
+ (B = L == null ? void 0 : L.previousElementSibling) == null || B.focus();
12553
+ break;
12554
+ }
12555
+ }
12548
12556
  },
12549
12557
  children: [
12550
12558
  /* @__PURE__ */ d.jsx(Ve, { showOnFocus: !1, children: o.formatMessage({ id: `richTextEditor_${e}` }) }),
@@ -12732,7 +12740,7 @@ const py = () => {
12732
12740
  });
12733
12741
  }
12734
12742
  },
12735
- children: u ? /* @__PURE__ */ d.jsx(Jn, { wrappers: g, buttons: m }) : /* @__PURE__ */ d.jsx(
12743
+ children: r ? u ? /* @__PURE__ */ d.jsx(Jn, { wrappers: g, buttons: m }) : /* @__PURE__ */ d.jsx(
12736
12744
  Nr,
12737
12745
  {
12738
12746
  id: `${n}-link-editor`,
@@ -12768,7 +12776,7 @@ const py = () => {
12768
12776
  size: "small"
12769
12777
  }
12770
12778
  }
12771
- )
12779
+ ) : null
12772
12780
  }
12773
12781
  );
12774
12782
  }, gy = () => {
@@ -14331,10 +14339,10 @@ function u1(e) {
14331
14339
  if (r++, t.containerState._closeFlow) {
14332
14340
  t.containerState._closeFlow = void 0, a && x();
14333
14341
  const B = t.events.length;
14334
- let C = B, _;
14335
- for (; C--; )
14336
- if (t.events[C][0] === "exit" && t.events[C][1].type === "chunkFlow") {
14337
- _ = t.events[C][1].end;
14342
+ let w = B, _;
14343
+ for (; w--; )
14344
+ if (t.events[w][0] === "exit" && t.events[w][1].type === "chunkFlow") {
14345
+ _ = t.events[w][1].end;
14338
14346
  break;
14339
14347
  }
14340
14348
  v(r);
@@ -14343,7 +14351,7 @@ function u1(e) {
14343
14351
  t.events[O][1].end = Object.assign({}, _), O++;
14344
14352
  return Lt(
14345
14353
  t.events,
14346
- C + 1,
14354
+ w + 1,
14347
14355
  0,
14348
14356
  t.events.slice(B)
14349
14357
  ), t.events.length = O, u(A);
@@ -14399,8 +14407,8 @@ function u1(e) {
14399
14407
  return be(A) ? (e.consume(A), b(e.exit("chunkFlow")), r = 0, t.interrupt = void 0, o) : (e.consume(A), m);
14400
14408
  }
14401
14409
  function b(A, B) {
14402
- const C = t.sliceStream(A);
14403
- if (B && C.push(null), A.previous = i, i && (i.next = A), i = A, a.defineSkip(A.start), a.write(C), t.parser.lazy[A.start.line]) {
14410
+ const w = t.sliceStream(A);
14411
+ if (B && w.push(null), A.previous = i, i && (i.next = A), i = A, a.defineSkip(A.start), a.write(w), t.parser.lazy[A.start.line]) {
14404
14412
  let _ = a.events.length;
14405
14413
  for (; _--; )
14406
14414
  if (
@@ -14411,11 +14419,11 @@ function u1(e) {
14411
14419
  )
14412
14420
  return;
14413
14421
  const O = t.events.length;
14414
- let z = O, M, P;
14415
- for (; z--; )
14416
- if (t.events[z][0] === "exit" && t.events[z][1].type === "chunkFlow") {
14422
+ let L = O, M, P;
14423
+ for (; L--; )
14424
+ if (t.events[L][0] === "exit" && t.events[L][1].type === "chunkFlow") {
14417
14425
  if (M) {
14418
- P = t.events[z][1].end;
14426
+ P = t.events[L][1].end;
14419
14427
  break;
14420
14428
  }
14421
14429
  M = !0;
@@ -14424,7 +14432,7 @@ function u1(e) {
14424
14432
  t.events[_][1].end = Object.assign({}, P), _++;
14425
14433
  Lt(
14426
14434
  t.events,
14427
- z + 1,
14435
+ L + 1,
14428
14436
  0,
14429
14437
  t.events.slice(O)
14430
14438
  ), t.events.length = _;
@@ -14433,8 +14441,8 @@ function u1(e) {
14433
14441
  function v(A) {
14434
14442
  let B = n.length;
14435
14443
  for (; B-- > A; ) {
14436
- const C = n[B];
14437
- t.containerState = C[1], C[0].exit.call(t, e);
14444
+ const w = n[B];
14445
+ t.containerState = w[1], w[0].exit.call(t, e);
14438
14446
  }
14439
14447
  n.length = A;
14440
14448
  }
@@ -14687,7 +14695,7 @@ const bl = {
14687
14695
  };
14688
14696
  function D1(e, t, n) {
14689
14697
  const r = this, a = {
14690
- tokenize: C,
14698
+ tokenize: w,
14691
14699
  partial: !0
14692
14700
  };
14693
14701
  let i = 0, s = 0, o;
@@ -14741,7 +14749,7 @@ function D1(e, t, n) {
14741
14749
  function B(_) {
14742
14750
  return e.exit("codeFenced"), t(_);
14743
14751
  }
14744
- function C(_, O, z) {
14752
+ function w(_, O, L) {
14745
14753
  let M = 0;
14746
14754
  return P;
14747
14755
  function P(R) {
@@ -14750,19 +14758,19 @@ function D1(e, t, n) {
14750
14758
  function j(R) {
14751
14759
  return _.enter("codeFencedFence"), Se(R) ? Ie(
14752
14760
  _,
14753
- w,
14761
+ C,
14754
14762
  "linePrefix",
14755
14763
  r.parser.constructs.disable.null.includes("codeIndented") ? void 0 : 4
14756
- )(R) : w(R);
14764
+ )(R) : C(R);
14757
14765
  }
14758
- function w(R) {
14759
- return R === o ? (_.enter("codeFencedFenceSequence"), F(R)) : z(R);
14766
+ function C(R) {
14767
+ return R === o ? (_.enter("codeFencedFenceSequence"), F(R)) : L(R);
14760
14768
  }
14761
14769
  function F(R) {
14762
- return R === o ? (M++, _.consume(R), F) : M >= s ? (_.exit("codeFencedFenceSequence"), Se(R) ? Ie(_, N, "whitespace")(R) : N(R)) : z(R);
14770
+ return R === o ? (M++, _.consume(R), F) : M >= s ? (_.exit("codeFencedFenceSequence"), Se(R) ? Ie(_, N, "whitespace")(R) : N(R)) : L(R);
14763
14771
  }
14764
14772
  function N(R) {
14765
- return R === null || be(R) ? (_.exit("codeFencedFence"), O(R)) : z(R);
14773
+ return R === null || be(R) ? (_.exit("codeFencedFence"), O(R)) : L(R);
14766
14774
  }
14767
14775
  }
14768
14776
  }
@@ -15266,7 +15274,7 @@ function Y1(e, t, n) {
15266
15274
  }
15267
15275
  function g(E) {
15268
15276
  const k = "CDATA[";
15269
- return E === k.charCodeAt(o++) ? (e.consume(E), o === k.length ? r.interrupt ? t : w : g) : n(E);
15277
+ return E === k.charCodeAt(o++) ? (e.consume(E), o === k.length ? r.interrupt ? t : C : g) : n(E);
15270
15278
  }
15271
15279
  function m(E) {
15272
15280
  return $t(E) ? (e.consume(E), s = String.fromCharCode(E), b) : n(E);
@@ -15274,12 +15282,12 @@ function Y1(e, t, n) {
15274
15282
  function b(E) {
15275
15283
  if (E === null || E === 47 || E === 62 || pt(E)) {
15276
15284
  const k = E === 47, I = s.toLowerCase();
15277
- return !k && !i && Dl.includes(I) ? (a = 1, r.interrupt ? t(E) : w(E)) : H1.includes(s.toLowerCase()) ? (a = 6, k ? (e.consume(E), v) : r.interrupt ? t(E) : w(E)) : (a = 7, r.interrupt && !r.parser.lazy[r.now().line] ? n(E) : i ? x(E) : A(E));
15285
+ return !k && !i && Dl.includes(I) ? (a = 1, r.interrupt ? t(E) : C(E)) : H1.includes(s.toLowerCase()) ? (a = 6, k ? (e.consume(E), v) : r.interrupt ? t(E) : C(E)) : (a = 7, r.interrupt && !r.parser.lazy[r.now().line] ? n(E) : i ? x(E) : A(E));
15278
15286
  }
15279
15287
  return E === 45 || St(E) ? (e.consume(E), s += String.fromCharCode(E), b) : n(E);
15280
15288
  }
15281
15289
  function v(E) {
15282
- return E === 62 ? (e.consume(E), r.interrupt ? t : w) : n(E);
15290
+ return E === 62 ? (e.consume(E), r.interrupt ? t : C) : n(E);
15283
15291
  }
15284
15292
  function x(E) {
15285
15293
  return Se(E) ? (e.consume(E), x) : P(E);
@@ -15288,19 +15296,19 @@ function Y1(e, t, n) {
15288
15296
  return E === 47 ? (e.consume(E), P) : E === 58 || E === 95 || $t(E) ? (e.consume(E), B) : Se(E) ? (e.consume(E), A) : P(E);
15289
15297
  }
15290
15298
  function B(E) {
15291
- return E === 45 || E === 46 || E === 58 || E === 95 || St(E) ? (e.consume(E), B) : C(E);
15299
+ return E === 45 || E === 46 || E === 58 || E === 95 || St(E) ? (e.consume(E), B) : w(E);
15292
15300
  }
15293
- function C(E) {
15294
- return E === 61 ? (e.consume(E), _) : Se(E) ? (e.consume(E), C) : A(E);
15301
+ function w(E) {
15302
+ return E === 61 ? (e.consume(E), _) : Se(E) ? (e.consume(E), w) : A(E);
15295
15303
  }
15296
15304
  function _(E) {
15297
- return E === null || E === 60 || E === 61 || E === 62 || E === 96 ? n(E) : E === 34 || E === 39 ? (e.consume(E), l = E, O) : Se(E) ? (e.consume(E), _) : z(E);
15305
+ return E === null || E === 60 || E === 61 || E === 62 || E === 96 ? n(E) : E === 34 || E === 39 ? (e.consume(E), l = E, O) : Se(E) ? (e.consume(E), _) : L(E);
15298
15306
  }
15299
15307
  function O(E) {
15300
15308
  return E === l ? (e.consume(E), l = null, M) : E === null || be(E) ? n(E) : (e.consume(E), O);
15301
15309
  }
15302
- function z(E) {
15303
- return E === null || E === 34 || E === 39 || E === 47 || E === 60 || E === 61 || E === 62 || E === 96 || pt(E) ? C(E) : (e.consume(E), z);
15310
+ function L(E) {
15311
+ return E === null || E === 34 || E === 39 || E === 47 || E === 60 || E === 61 || E === 62 || E === 96 || pt(E) ? w(E) : (e.consume(E), L);
15304
15312
  }
15305
15313
  function M(E) {
15306
15314
  return E === 47 || E === 62 || Se(E) ? A(E) : n(E);
@@ -15309,14 +15317,14 @@ function Y1(e, t, n) {
15309
15317
  return E === 62 ? (e.consume(E), j) : n(E);
15310
15318
  }
15311
15319
  function j(E) {
15312
- return E === null || be(E) ? w(E) : Se(E) ? (e.consume(E), j) : n(E);
15320
+ return E === null || be(E) ? C(E) : Se(E) ? (e.consume(E), j) : n(E);
15313
15321
  }
15314
- function w(E) {
15322
+ function C(E) {
15315
15323
  return E === 45 && a === 2 ? (e.consume(E), V) : E === 60 && a === 1 ? (e.consume(E), U) : E === 62 && a === 4 ? (e.consume(E), H) : E === 63 && a === 3 ? (e.consume(E), D) : E === 93 && a === 5 ? (e.consume(E), G) : be(E) && (a === 6 || a === 7) ? (e.exit("htmlFlowData"), e.check(
15316
15324
  V1,
15317
15325
  J,
15318
15326
  F
15319
- )(E)) : E === null || be(E) ? (e.exit("htmlFlowData"), F(E)) : (e.consume(E), w);
15327
+ )(E)) : E === null || be(E) ? (e.exit("htmlFlowData"), F(E)) : (e.consume(E), C);
15320
15328
  }
15321
15329
  function F(E) {
15322
15330
  return e.check(
@@ -15329,26 +15337,26 @@ function Y1(e, t, n) {
15329
15337
  return e.enter("lineEnding"), e.consume(E), e.exit("lineEnding"), R;
15330
15338
  }
15331
15339
  function R(E) {
15332
- return E === null || be(E) ? F(E) : (e.enter("htmlFlowData"), w(E));
15340
+ return E === null || be(E) ? F(E) : (e.enter("htmlFlowData"), C(E));
15333
15341
  }
15334
15342
  function V(E) {
15335
- return E === 45 ? (e.consume(E), D) : w(E);
15343
+ return E === 45 ? (e.consume(E), D) : C(E);
15336
15344
  }
15337
15345
  function U(E) {
15338
- return E === 47 ? (e.consume(E), s = "", ie) : w(E);
15346
+ return E === 47 ? (e.consume(E), s = "", ie) : C(E);
15339
15347
  }
15340
15348
  function ie(E) {
15341
15349
  if (E === 62) {
15342
15350
  const k = s.toLowerCase();
15343
- return Dl.includes(k) ? (e.consume(E), H) : w(E);
15351
+ return Dl.includes(k) ? (e.consume(E), H) : C(E);
15344
15352
  }
15345
- return $t(E) && s.length < 8 ? (e.consume(E), s += String.fromCharCode(E), ie) : w(E);
15353
+ return $t(E) && s.length < 8 ? (e.consume(E), s += String.fromCharCode(E), ie) : C(E);
15346
15354
  }
15347
15355
  function G(E) {
15348
- return E === 93 ? (e.consume(E), D) : w(E);
15356
+ return E === 93 ? (e.consume(E), D) : C(E);
15349
15357
  }
15350
15358
  function D(E) {
15351
- return E === 62 ? (e.consume(E), H) : E === 45 && a === 2 ? (e.consume(E), D) : w(E);
15359
+ return E === 62 ? (e.consume(E), H) : E === 45 && a === 2 ? (e.consume(E), D) : C(E);
15352
15360
  }
15353
15361
  function H(E) {
15354
15362
  return E === null || be(E) ? (e.exit("htmlFlowData"), J(E)) : (e.consume(E), H);
@@ -15385,7 +15393,7 @@ function X1(e, t, n) {
15385
15393
  return e.enter("htmlText"), e.enter("htmlTextData"), e.consume(D), l;
15386
15394
  }
15387
15395
  function l(D) {
15388
- return D === 33 ? (e.consume(D), u) : D === 47 ? (e.consume(D), C) : D === 63 ? (e.consume(D), A) : $t(D) ? (e.consume(D), z) : n(D);
15396
+ return D === 33 ? (e.consume(D), u) : D === 47 ? (e.consume(D), w) : D === 63 ? (e.consume(D), A) : $t(D) ? (e.consume(D), L) : n(D);
15389
15397
  }
15390
15398
  function u(D) {
15391
15399
  return D === 45 ? (e.consume(D), c) : D === 91 ? (e.consume(D), i = 0, g) : $t(D) ? (e.consume(D), x) : n(D);
@@ -15424,7 +15432,7 @@ function X1(e, t, n) {
15424
15432
  function B(D) {
15425
15433
  return D === 62 ? V(D) : A(D);
15426
15434
  }
15427
- function C(D) {
15435
+ function w(D) {
15428
15436
  return $t(D) ? (e.consume(D), _) : n(D);
15429
15437
  }
15430
15438
  function _(D) {
@@ -15433,8 +15441,8 @@ function X1(e, t, n) {
15433
15441
  function O(D) {
15434
15442
  return be(D) ? (s = O, U(D)) : Se(D) ? (e.consume(D), O) : V(D);
15435
15443
  }
15436
- function z(D) {
15437
- return D === 45 || St(D) ? (e.consume(D), z) : D === 47 || D === 62 || pt(D) ? M(D) : n(D);
15444
+ function L(D) {
15445
+ return D === 45 || St(D) ? (e.consume(D), L) : D === 47 || D === 62 || pt(D) ? M(D) : n(D);
15438
15446
  }
15439
15447
  function M(D) {
15440
15448
  return D === 47 ? (e.consume(D), V) : D === 58 || D === 95 || $t(D) ? (e.consume(D), P) : be(D) ? (s = M, U(D)) : Se(D) ? (e.consume(D), M) : V(D);
@@ -15443,10 +15451,10 @@ function X1(e, t, n) {
15443
15451
  return D === 45 || D === 46 || D === 58 || D === 95 || St(D) ? (e.consume(D), P) : j(D);
15444
15452
  }
15445
15453
  function j(D) {
15446
- return D === 61 ? (e.consume(D), w) : be(D) ? (s = j, U(D)) : Se(D) ? (e.consume(D), j) : M(D);
15454
+ return D === 61 ? (e.consume(D), C) : be(D) ? (s = j, U(D)) : Se(D) ? (e.consume(D), j) : M(D);
15447
15455
  }
15448
- function w(D) {
15449
- return D === null || D === 60 || D === 61 || D === 62 || D === 96 ? n(D) : D === 34 || D === 39 ? (e.consume(D), a = D, F) : be(D) ? (s = w, U(D)) : Se(D) ? (e.consume(D), w) : (e.consume(D), N);
15456
+ function C(D) {
15457
+ return D === null || D === 60 || D === 61 || D === 62 || D === 96 ? n(D) : D === 34 || D === 39 ? (e.consume(D), a = D, F) : be(D) ? (s = C, U(D)) : Se(D) ? (e.consume(D), C) : (e.consume(D), N);
15450
15458
  }
15451
15459
  function F(D) {
15452
15460
  return D === a ? (e.consume(D), a = void 0, R) : D === null ? n(D) : be(D) ? (s = F, U(D)) : (e.consume(D), F);
@@ -16028,7 +16036,7 @@ function TD(e, t, n) {
16028
16036
  consume: x,
16029
16037
  enter: A,
16030
16038
  exit: B,
16031
- attempt: O(C),
16039
+ attempt: O(w),
16032
16040
  check: O(_),
16033
16041
  interrupt: O(_, {
16034
16042
  interrupt: !0
@@ -16048,19 +16056,19 @@ function TD(e, t, n) {
16048
16056
  let c = t.tokenize.call(u, l);
16049
16057
  return t.resolveAll && i.push(t), u;
16050
16058
  function f(j) {
16051
- return s = Bt(s, j), b(), s[s.length - 1] !== null ? [] : (z(t, 0), u.events = eo(i, u.events, u), u.events);
16059
+ return s = Bt(s, j), b(), s[s.length - 1] !== null ? [] : (L(t, 0), u.events = eo(i, u.events, u), u.events);
16052
16060
  }
16053
- function p(j, w) {
16054
- return jD(h(j), w);
16061
+ function p(j, C) {
16062
+ return jD(h(j), C);
16055
16063
  }
16056
16064
  function h(j) {
16057
16065
  return SD(s, j);
16058
16066
  }
16059
16067
  function g() {
16060
- const { line: j, column: w, offset: F, _index: N, _bufferIndex: R } = r;
16068
+ const { line: j, column: C, offset: F, _index: N, _bufferIndex: R } = r;
16061
16069
  return {
16062
16070
  line: j,
16063
- column: w,
16071
+ column: C,
16064
16072
  offset: F,
16065
16073
  _index: N,
16066
16074
  _bufferIndex: R
@@ -16072,12 +16080,12 @@ function TD(e, t, n) {
16072
16080
  function b() {
16073
16081
  let j;
16074
16082
  for (; r._index < s.length; ) {
16075
- const w = s[r._index];
16076
- if (typeof w == "string")
16077
- for (j = r._index, r._bufferIndex < 0 && (r._bufferIndex = 0); r._index === j && r._bufferIndex < w.length; )
16078
- v(w.charCodeAt(r._bufferIndex));
16083
+ const C = s[r._index];
16084
+ if (typeof C == "string")
16085
+ for (j = r._index, r._bufferIndex < 0 && (r._bufferIndex = 0); r._index === j && r._bufferIndex < C.length; )
16086
+ v(C.charCodeAt(r._bufferIndex));
16079
16087
  else
16080
- v(w);
16088
+ v(C);
16081
16089
  }
16082
16090
  }
16083
16091
  function v(j) {
@@ -16086,21 +16094,21 @@ function TD(e, t, n) {
16086
16094
  function x(j) {
16087
16095
  be(j) ? (r.line++, r.column = 1, r.offset += j === -3 ? 2 : 1, P()) : j !== -1 && (r.column++, r.offset++), r._bufferIndex < 0 ? r._index++ : (r._bufferIndex++, r._bufferIndex === s[r._index].length && (r._bufferIndex = -1, r._index++)), u.previous = j;
16088
16096
  }
16089
- function A(j, w) {
16090
- const F = w || {};
16097
+ function A(j, C) {
16098
+ const F = C || {};
16091
16099
  return F.type = j, F.start = g(), u.events.push(["enter", F, u]), o.push(F), F;
16092
16100
  }
16093
16101
  function B(j) {
16094
- const w = o.pop();
16095
- return w.end = g(), u.events.push(["exit", w, u]), w;
16102
+ const C = o.pop();
16103
+ return C.end = g(), u.events.push(["exit", C, u]), C;
16096
16104
  }
16097
- function C(j, w) {
16098
- z(j, w.from);
16105
+ function w(j, C) {
16106
+ L(j, C.from);
16099
16107
  }
16100
- function _(j, w) {
16101
- w.restore();
16108
+ function _(j, C) {
16109
+ C.restore();
16102
16110
  }
16103
- function O(j, w) {
16111
+ function O(j, C) {
16104
16112
  return F;
16105
16113
  function F(N, R, V) {
16106
16114
  let U, ie, G, D;
@@ -16109,8 +16117,8 @@ function TD(e, t, n) {
16109
16117
  J([N])
16110
16118
  ) : H(N);
16111
16119
  function H($) {
16112
- return L;
16113
- function L(ne) {
16120
+ return z;
16121
+ function z(ne) {
16114
16122
  const ee = ne !== null && $[ne], K = ne !== null && $.null, ue = [
16115
16123
  // To do: add more extension tests.
16116
16124
  /* c8 ignore next 2 */
@@ -16124,13 +16132,13 @@ function TD(e, t, n) {
16124
16132
  return U = $, ie = 0, $.length === 0 ? V : E($[ie]);
16125
16133
  }
16126
16134
  function E($) {
16127
- return L;
16128
- function L(ne) {
16135
+ return z;
16136
+ function z(ne) {
16129
16137
  return D = M(), G = $, $.partial || (u.currentConstruct = $), $.name && u.parser.constructs.disable.null.includes($.name) ? I() : $.tokenize.call(
16130
16138
  // If we do have fields, create an object w/ `context` as its
16131
16139
  // prototype.
16132
16140
  // This allows a “live binding”, which is needed for `interrupt`.
16133
- w ? Object.assign(Object.create(u), w) : u,
16141
+ C ? Object.assign(Object.create(u), C) : u,
16134
16142
  l,
16135
16143
  k,
16136
16144
  I
@@ -16145,22 +16153,22 @@ function TD(e, t, n) {
16145
16153
  }
16146
16154
  }
16147
16155
  }
16148
- function z(j, w) {
16156
+ function L(j, C) {
16149
16157
  j.resolveAll && !i.includes(j) && i.push(j), j.resolve && Lt(
16150
16158
  u.events,
16151
- w,
16152
- u.events.length - w,
16153
- j.resolve(u.events.slice(w), u)
16159
+ C,
16160
+ u.events.length - C,
16161
+ j.resolve(u.events.slice(C), u)
16154
16162
  ), j.resolveTo && (u.events = j.resolveTo(u.events, u));
16155
16163
  }
16156
16164
  function M() {
16157
- const j = g(), w = u.previous, F = u.currentConstruct, N = u.events.length, R = Array.from(o);
16165
+ const j = g(), C = u.previous, F = u.currentConstruct, N = u.events.length, R = Array.from(o);
16158
16166
  return {
16159
16167
  restore: V,
16160
16168
  from: N
16161
16169
  };
16162
16170
  function V() {
16163
- r = j, u.previous = w, u.currentConstruct = F, u.events.length = N, o = R, P();
16171
+ r = j, u.previous = C, u.currentConstruct = F, u.events.length = N, o = R, P();
16164
16172
  }
16165
16173
  }
16166
16174
  function P() {
@@ -16421,10 +16429,10 @@ function GD(e) {
16421
16429
  },
16422
16430
  exit: {
16423
16431
  atxHeading: l(),
16424
- atxHeadingSequence: C,
16432
+ atxHeadingSequence: w,
16425
16433
  autolink: l(),
16426
16434
  autolinkEmail: ne,
16427
- autolinkProtocol: L,
16435
+ autolinkProtocol: z,
16428
16436
  blockQuote: l(),
16429
16437
  characterEscapeValue: P,
16430
16438
  characterReferenceMarkerHexadecimal: I,
@@ -16444,8 +16452,8 @@ function GD(e) {
16444
16452
  definitionLabelString: x,
16445
16453
  definitionTitleString: A,
16446
16454
  emphasis: l(),
16447
- hardBreakEscape: l(w),
16448
- hardBreakTrailing: l(w),
16455
+ hardBreakEscape: l(C),
16456
+ hardBreakTrailing: l(C),
16449
16457
  htmlFlow: l(F),
16450
16458
  htmlFlowData: P,
16451
16459
  htmlText: l(N),
@@ -16463,7 +16471,7 @@ function GD(e) {
16463
16471
  resourceDestinationString: D,
16464
16472
  resourceTitleString: H,
16465
16473
  resource: J,
16466
- setextHeading: l(z),
16474
+ setextHeading: l(L),
16467
16475
  setextHeadingLineSequence: O,
16468
16476
  setextHeadingText: _,
16469
16477
  strong: l(),
@@ -16670,7 +16678,7 @@ function GD(e) {
16670
16678
  const W = this.resume(), ae = this.stack[this.stack.length - 1];
16671
16679
  ae.url = W;
16672
16680
  }
16673
- function C(W) {
16681
+ function w(W) {
16674
16682
  const ae = this.stack[this.stack.length - 1];
16675
16683
  if (!ae.depth) {
16676
16684
  const me = this.sliceSerialize(W).length;
@@ -16684,7 +16692,7 @@ function GD(e) {
16684
16692
  const ae = this.stack[this.stack.length - 1];
16685
16693
  ae.depth = this.sliceSerialize(W).codePointAt(0) === 61 ? 1 : 2;
16686
16694
  }
16687
- function z() {
16695
+ function L() {
16688
16696
  this.data.setextHeadingSlurpLineEnding = void 0;
16689
16697
  }
16690
16698
  function M(W) {
@@ -16709,7 +16717,7 @@ function GD(e) {
16709
16717
  }
16710
16718
  !this.data.setextHeadingSlurpLineEnding && t.canContainEols.includes(ae.type) && (M.call(this, W), P.call(this, W));
16711
16719
  }
16712
- function w() {
16720
+ function C() {
16713
16721
  this.data.atHardBreak = !0;
16714
16722
  }
16715
16723
  function F() {
@@ -16787,7 +16795,7 @@ function GD(e) {
16787
16795
  const we = this.stack.pop();
16788
16796
  we.value += ge, we.position.end = Xt(W.end);
16789
16797
  }
16790
- function L(W) {
16798
+ function z(W) {
16791
16799
  P.call(this, W);
16792
16800
  const ae = this.stack[this.stack.length - 1];
16793
16801
  ae.url = this.sliceSerialize(W);
@@ -17017,21 +17025,21 @@ const ex = As(
17017
17025
  children: [{ text: "" }]
17018
17026
  }
17019
17027
  ]
17020
- ), [p, h] = ce(_a[0]), [g, m] = ce(null), [b, v] = ce(!1), [x, A] = ce(null), B = (z) => {
17021
- h(z || _a[0]);
17028
+ ), [p, h] = ce(_a[0]), [g, m] = ce(null), [b, v] = ce(!1), [x, A] = ce(null), B = (L) => {
17029
+ h(L || _a[0]);
17022
17030
  };
17023
17031
  he(() => {
17024
17032
  if (t) {
17025
- let z = vn(t);
17026
- z.includes("<") && (z = new ba().turndown(z)), XD(z, (M) => {
17033
+ let L = vn(t);
17034
+ L.includes("<") && (L = new ba().turndown(L)), XD(L, (M) => {
17027
17035
  f(M);
17028
17036
  });
17029
17037
  }
17030
17038
  }, []);
17031
- const C = Fe(
17032
- (z) => /* @__PURE__ */ d.jsx(oy, { ...z }),
17039
+ const w = Fe(
17040
+ (L) => /* @__PURE__ */ d.jsx(oy, { ...L }),
17033
17041
  []
17034
- ), _ = Fe((z) => /* @__PURE__ */ d.jsx(uy, { ...z }), []), O = It(
17042
+ ), _ = Fe((L) => /* @__PURE__ */ d.jsx(uy, { ...L }), []), O = It(
17035
17043
  () => By(Jg(iy(Gg()))),
17036
17044
  []
17037
17045
  );
@@ -17054,11 +17062,11 @@ const ex = As(
17054
17062
  {
17055
17063
  editor: O,
17056
17064
  initialValue: c,
17057
- onChange: (z) => {
17065
+ onChange: (L) => {
17058
17066
  if (O.operations.some(
17059
17067
  (P) => P.type !== "set_selection"
17060
17068
  )) {
17061
- const P = z.map((j) => Sc(j)).join("");
17069
+ const P = L.map((j) => Sc(j)).join("");
17062
17070
  r(P), u.current = P;
17063
17071
  }
17064
17072
  },
@@ -17068,15 +17076,15 @@ const ex = As(
17068
17076
  Zb,
17069
17077
  {
17070
17078
  className: "input",
17071
- renderElement: C,
17079
+ renderElement: w,
17072
17080
  renderLeaf: _,
17073
17081
  placeholder: n || o.formatMessage({ id: "richTextEditor_placeholder" }),
17074
17082
  autoFocus: a,
17075
- tabIndex: 1,
17076
- onKeyDown: (z) => {
17083
+ tabIndex: 0,
17084
+ onKeyDown: (L) => {
17077
17085
  for (const M in El)
17078
- if (qh(M, z)) {
17079
- z.stopPropagation(), z.preventDefault();
17086
+ if (qh(M, L)) {
17087
+ L.stopPropagation(), L.preventDefault();
17080
17088
  const P = El[M];
17081
17089
  Ed(O, P);
17082
17090
  }
@@ -17278,11 +17286,11 @@ const nx = ({
17278
17286
  "SUCCESS"
17279
17287
  /* SUCCESS */
17280
17288
  );
17281
- } catch (C) {
17289
+ } catch (w) {
17282
17290
  m(
17283
17291
  "ERROR"
17284
17292
  /* ERROR */
17285
- ), o(C);
17293
+ ), o(w);
17286
17294
  }
17287
17295
  }, x = (B) => {
17288
17296
  B.preventDefault(), m(
@@ -17326,7 +17334,7 @@ const nx = ({
17326
17334
  f(B), h(!B.length);
17327
17335
  },
17328
17336
  autoFocus: !1,
17329
- getLabel: (B, C, _) => /* @__PURE__ */ d.jsxs("div", { className: "email text-medium", children: [
17337
+ getLabel: (B, w, _) => /* @__PURE__ */ d.jsxs("div", { className: "email text-medium", children: [
17330
17338
  /* @__PURE__ */ d.jsx("div", { "data-tag-item": !0, children: B }),
17331
17339
  /* @__PURE__ */ d.jsx(
17332
17340
  Be,
@@ -17335,13 +17343,13 @@ const nx = ({
17335
17343
  size: "small",
17336
17344
  icon: { icon: "close" },
17337
17345
  onClick: () => {
17338
- _(C), h(!c.length);
17346
+ _(w), h(!c.length);
17339
17347
  },
17340
17348
  className: "remove-email-button",
17341
17349
  screenreaderText: b({ id: "overlay_close" })
17342
17350
  }
17343
17351
  )
17344
- ] }, C)
17352
+ ] }, w)
17345
17353
  }
17346
17354
  )
17347
17355
  ] }),
@@ -17782,9 +17790,9 @@ const ux = {
17782
17790
  emailDetails: x,
17783
17791
  shouldManuallyApprove: A,
17784
17792
  shouldDisableButton: B,
17785
- showSuccessMessage: C,
17793
+ showSuccessMessage: w,
17786
17794
  showError: _
17787
- } = m, [O, z] = Xl([
17795
+ } = m, [O, L] = Xl([
17788
17796
  "signup-this-session",
17789
17797
  "functional-cookie-consent"
17790
17798
  ]), M = {
@@ -17801,11 +17809,11 @@ const ux = {
17801
17809
  }, [A]), he(() => {
17802
17810
  O["signup-this-session"] && b([{ type: "showSuccessMessage", value: !0 }]);
17803
17811
  }, [O]), he(() => {
17804
- C && O["functional-cookie-consent"] && z("signup-this-session", "true", {
17812
+ w && O["functional-cookie-consent"] && L("signup-this-session", "true", {
17805
17813
  path: "/",
17806
17814
  maxAge: 3600
17807
17815
  });
17808
- }, [C]);
17816
+ }, [w]);
17809
17817
  const P = It(() => sx({
17810
17818
  placeholders: n,
17811
17819
  labels: t,
@@ -17816,8 +17824,8 @@ const ux = {
17816
17824
  dispatch: b,
17817
17825
  dataToSubmit: s,
17818
17826
  intl: l
17819
- }), [s, r, l, M, g, m]), j = B ? !0 : A ? !Object.values(v).every((w) => w === !0) : !v.name || !v.email || ["exists", "pending", "verify"].includes(x.boxType);
17820
- return g.successMessage && C ? /* @__PURE__ */ d.jsx(ox, { className: e }) : /* @__PURE__ */ d.jsxs(
17827
+ }), [s, r, l, M, g, m]), j = B ? !0 : A ? !Object.values(v).every((C) => C === !0) : !v.name || !v.email || ["exists", "pending", "verify"].includes(x.boxType);
17828
+ return g.successMessage && w ? /* @__PURE__ */ d.jsx(ox, { className: e }) : /* @__PURE__ */ d.jsxs(
17821
17829
  "fieldset",
17822
17830
  {
17823
17831
  className: Z("signup-form-fieldset", e),
@@ -17877,8 +17885,8 @@ const ux = {
17877
17885
  state: m
17878
17886
  });
17879
17887
  },
17880
- onCatch: (w) => {
17881
- r.handleError(w), b([
17888
+ onCatch: (C) => {
17889
+ r.handleError(C), b([
17882
17890
  { type: "showSuccessMessage", value: !1 },
17883
17891
  { type: "showError", value: !0 }
17884
17892
  ]);
@@ -17906,27 +17914,27 @@ function lx() {
17906
17914
  return Oe;
17907
17915
  Bl = 1;
17908
17916
  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, a = e ? Symbol.for("react.strict_mode") : 60108, i = 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, c = e ? Symbol.for("react.forward_ref") : 60112, f = e ? Symbol.for("react.suspense") : 60113, p = e ? Symbol.for("react.suspense_list") : 60120, h = e ? Symbol.for("react.memo") : 60115, g = e ? Symbol.for("react.lazy") : 60116, m = e ? Symbol.for("react.block") : 60121, b = e ? Symbol.for("react.fundamental") : 60117, v = e ? Symbol.for("react.responder") : 60118, x = e ? Symbol.for("react.scope") : 60119;
17909
- function A(C) {
17910
- if (typeof C == "object" && C !== null) {
17911
- var _ = C.$$typeof;
17917
+ function A(w) {
17918
+ if (typeof w == "object" && w !== null) {
17919
+ var _ = w.$$typeof;
17912
17920
  switch (_) {
17913
17921
  case t:
17914
- switch (C = C.type, C) {
17922
+ switch (w = w.type, w) {
17915
17923
  case l:
17916
17924
  case u:
17917
17925
  case r:
17918
17926
  case i:
17919
17927
  case a:
17920
17928
  case f:
17921
- return C;
17929
+ return w;
17922
17930
  default:
17923
- switch (C = C && C.$$typeof, C) {
17931
+ switch (w = w && w.$$typeof, w) {
17924
17932
  case o:
17925
17933
  case c:
17926
17934
  case g:
17927
17935
  case h:
17928
17936
  case s:
17929
- return C;
17937
+ return w;
17930
17938
  default:
17931
17939
  return _;
17932
17940
  }
@@ -17936,35 +17944,35 @@ function lx() {
17936
17944
  }
17937
17945
  }
17938
17946
  }
17939
- function B(C) {
17940
- return A(C) === u;
17941
- }
17942
- return Oe.AsyncMode = l, Oe.ConcurrentMode = u, Oe.ContextConsumer = o, Oe.ContextProvider = s, Oe.Element = t, Oe.ForwardRef = c, Oe.Fragment = r, Oe.Lazy = g, Oe.Memo = h, Oe.Portal = n, Oe.Profiler = i, Oe.StrictMode = a, Oe.Suspense = f, Oe.isAsyncMode = function(C) {
17943
- return B(C) || A(C) === l;
17944
- }, Oe.isConcurrentMode = B, Oe.isContextConsumer = function(C) {
17945
- return A(C) === o;
17946
- }, Oe.isContextProvider = function(C) {
17947
- return A(C) === s;
17948
- }, Oe.isElement = function(C) {
17949
- return typeof C == "object" && C !== null && C.$$typeof === t;
17950
- }, Oe.isForwardRef = function(C) {
17951
- return A(C) === c;
17952
- }, Oe.isFragment = function(C) {
17953
- return A(C) === r;
17954
- }, Oe.isLazy = function(C) {
17955
- return A(C) === g;
17956
- }, Oe.isMemo = function(C) {
17957
- return A(C) === h;
17958
- }, Oe.isPortal = function(C) {
17959
- return A(C) === n;
17960
- }, Oe.isProfiler = function(C) {
17961
- return A(C) === i;
17962
- }, Oe.isStrictMode = function(C) {
17963
- return A(C) === a;
17964
- }, Oe.isSuspense = function(C) {
17965
- return A(C) === f;
17966
- }, Oe.isValidElementType = function(C) {
17967
- return typeof C == "string" || typeof C == "function" || C === r || C === u || C === i || C === a || C === f || C === p || typeof C == "object" && C !== null && (C.$$typeof === g || C.$$typeof === h || C.$$typeof === s || C.$$typeof === o || C.$$typeof === c || C.$$typeof === b || C.$$typeof === v || C.$$typeof === x || C.$$typeof === m);
17947
+ function B(w) {
17948
+ return A(w) === u;
17949
+ }
17950
+ return Oe.AsyncMode = l, Oe.ConcurrentMode = u, Oe.ContextConsumer = o, Oe.ContextProvider = s, Oe.Element = t, Oe.ForwardRef = c, Oe.Fragment = r, Oe.Lazy = g, Oe.Memo = h, Oe.Portal = n, Oe.Profiler = i, Oe.StrictMode = a, Oe.Suspense = f, Oe.isAsyncMode = function(w) {
17951
+ return B(w) || A(w) === l;
17952
+ }, Oe.isConcurrentMode = B, Oe.isContextConsumer = function(w) {
17953
+ return A(w) === o;
17954
+ }, Oe.isContextProvider = function(w) {
17955
+ return A(w) === s;
17956
+ }, Oe.isElement = function(w) {
17957
+ return typeof w == "object" && w !== null && w.$$typeof === t;
17958
+ }, Oe.isForwardRef = function(w) {
17959
+ return A(w) === c;
17960
+ }, Oe.isFragment = function(w) {
17961
+ return A(w) === r;
17962
+ }, Oe.isLazy = function(w) {
17963
+ return A(w) === g;
17964
+ }, Oe.isMemo = function(w) {
17965
+ return A(w) === h;
17966
+ }, Oe.isPortal = function(w) {
17967
+ return A(w) === n;
17968
+ }, Oe.isProfiler = function(w) {
17969
+ return A(w) === i;
17970
+ }, Oe.isStrictMode = function(w) {
17971
+ return A(w) === a;
17972
+ }, Oe.isSuspense = function(w) {
17973
+ return A(w) === f;
17974
+ }, Oe.isValidElementType = function(w) {
17975
+ return typeof w == "string" || typeof w == "function" || w === r || w === u || w === i || w === a || w === f || w === p || typeof w == "object" && w !== null && (w.$$typeof === g || w.$$typeof === h || w.$$typeof === s || w.$$typeof === o || w.$$typeof === c || w.$$typeof === b || w.$$typeof === v || w.$$typeof === x || w.$$typeof === m);
17968
17976
  }, Oe.typeOf = A, Oe;
17969
17977
  }
17970
17978
  var Pe = {};
@@ -18016,7 +18024,7 @@ function cx() {
18016
18024
  }
18017
18025
  }
18018
18026
  }
18019
- var C = l, _ = u, O = o, z = s, M = t, P = c, j = r, w = g, F = h, N = n, R = i, V = a, U = f, ie = !1;
18027
+ var w = l, _ = u, O = o, L = s, M = t, P = c, j = r, C = g, F = h, N = n, R = i, V = a, U = f, ie = !1;
18020
18028
  function G(Q) {
18021
18029
  return ie || (ie = !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;
18022
18030
  }
@@ -18041,7 +18049,7 @@ function cx() {
18041
18049
  function $(Q) {
18042
18050
  return B(Q) === g;
18043
18051
  }
18044
- function L(Q) {
18052
+ function z(Q) {
18045
18053
  return B(Q) === h;
18046
18054
  }
18047
18055
  function ne(Q) {
@@ -18056,7 +18064,7 @@ function cx() {
18056
18064
  function ue(Q) {
18057
18065
  return B(Q) === f;
18058
18066
  }
18059
- Pe.AsyncMode = C, Pe.ConcurrentMode = _, Pe.ContextConsumer = O, Pe.ContextProvider = z, Pe.Element = M, Pe.ForwardRef = P, Pe.Fragment = j, Pe.Lazy = w, Pe.Memo = F, Pe.Portal = N, Pe.Profiler = R, Pe.StrictMode = V, Pe.Suspense = U, Pe.isAsyncMode = G, Pe.isConcurrentMode = D, Pe.isContextConsumer = H, Pe.isContextProvider = J, Pe.isElement = E, Pe.isForwardRef = k, Pe.isFragment = I, Pe.isLazy = $, Pe.isMemo = L, Pe.isPortal = ne, Pe.isProfiler = ee, Pe.isStrictMode = K, Pe.isSuspense = ue, Pe.isValidElementType = A, Pe.typeOf = B;
18067
+ Pe.AsyncMode = w, Pe.ConcurrentMode = _, Pe.ContextConsumer = O, Pe.ContextProvider = L, Pe.Element = M, Pe.ForwardRef = P, Pe.Fragment = j, Pe.Lazy = C, Pe.Memo = F, Pe.Portal = N, Pe.Profiler = R, Pe.StrictMode = V, Pe.Suspense = U, Pe.isAsyncMode = G, Pe.isConcurrentMode = D, Pe.isContextConsumer = H, Pe.isContextProvider = J, Pe.isElement = E, Pe.isForwardRef = k, Pe.isFragment = I, Pe.isLazy = $, Pe.isMemo = z, Pe.isPortal = ne, Pe.isProfiler = ee, Pe.isStrictMode = K, Pe.isSuspense = ue, Pe.isValidElementType = A, Pe.typeOf = B;
18060
18068
  }()), Pe;
18061
18069
  }
18062
18070
  var kl;
@@ -18214,13 +18222,13 @@ function hx() {
18214
18222
  any: x(),
18215
18223
  arrayOf: A,
18216
18224
  element: B(),
18217
- elementType: C(),
18225
+ elementType: w(),
18218
18226
  instanceOf: _,
18219
18227
  node: P(),
18220
- objectOf: z,
18228
+ objectOf: L,
18221
18229
  oneOf: O,
18222
18230
  oneOfType: M,
18223
- shape: w,
18231
+ shape: C,
18224
18232
  exact: F
18225
18233
  };
18226
18234
  function g(D, H) {
@@ -18233,28 +18241,28 @@ function hx() {
18233
18241
  function b(D) {
18234
18242
  if (process.env.NODE_ENV !== "production")
18235
18243
  var H = {}, J = 0;
18236
- function E(I, $, L, ne, ee, K, ue) {
18237
- if (ne = ne || p, K = K || L, ue !== n) {
18244
+ function E(I, $, z, ne, ee, K, ue) {
18245
+ if (ne = ne || p, K = K || z, ue !== n) {
18238
18246
  if (l) {
18239
18247
  var Q = new Error(
18240
18248
  "Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types"
18241
18249
  );
18242
18250
  throw Q.name = "Invariant Violation", Q;
18243
18251
  } else if (process.env.NODE_ENV !== "production" && typeof console < "u") {
18244
- var De = ne + ":" + L;
18252
+ var De = ne + ":" + z;
18245
18253
  !H[De] && // Avoid spamming the console because they are often not actionable except for lib authors
18246
18254
  J < 3 && (i(
18247
18255
  "You are manually calling a React.PropTypes validation function for the `" + K + "` prop on `" + ne + "`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."
18248
18256
  ), H[De] = !0, J++);
18249
18257
  }
18250
18258
  }
18251
- return $[L] == null ? I ? $[L] === null ? new m("The " + ee + " `" + K + "` is marked as required " + ("in `" + ne + "`, but its value is `null`.")) : new m("The " + ee + " `" + K + "` is marked as required in " + ("`" + ne + "`, but its value is `undefined`.")) : null : D($, L, ne, ee, K);
18259
+ return $[z] == null ? I ? $[z] === null ? new m("The " + ee + " `" + K + "` is marked as required " + ("in `" + ne + "`, but its value is `null`.")) : new m("The " + ee + " `" + K + "` is marked as required in " + ("`" + ne + "`, but its value is `undefined`.")) : null : D($, z, ne, ee, K);
18252
18260
  }
18253
18261
  var k = E.bind(null, !1);
18254
18262
  return k.isRequired = E.bind(null, !0), k;
18255
18263
  }
18256
18264
  function v(D) {
18257
- function H(J, E, k, I, $, L) {
18265
+ function H(J, E, k, I, $, z) {
18258
18266
  var ne = J[E], ee = V(ne);
18259
18267
  if (ee !== D) {
18260
18268
  var K = U(ne);
@@ -18274,13 +18282,13 @@ function hx() {
18274
18282
  function H(J, E, k, I, $) {
18275
18283
  if (typeof D != "function")
18276
18284
  return new m("Property `" + $ + "` of component `" + k + "` has invalid PropType notation inside arrayOf.");
18277
- var L = J[E];
18278
- if (!Array.isArray(L)) {
18279
- var ne = V(L);
18285
+ var z = J[E];
18286
+ if (!Array.isArray(z)) {
18287
+ var ne = V(z);
18280
18288
  return new m("Invalid " + I + " `" + $ + "` of type " + ("`" + ne + "` supplied to `" + k + "`, expected an array."));
18281
18289
  }
18282
- for (var ee = 0; ee < L.length; ee++) {
18283
- var K = D(L, ee, k, I, $ + "[" + ee + "]", n);
18290
+ for (var ee = 0; ee < z.length; ee++) {
18291
+ var K = D(z, ee, k, I, $ + "[" + ee + "]", n);
18284
18292
  if (K instanceof Error)
18285
18293
  return K;
18286
18294
  }
@@ -18292,19 +18300,19 @@ function hx() {
18292
18300
  function D(H, J, E, k, I) {
18293
18301
  var $ = H[J];
18294
18302
  if (!o($)) {
18295
- var L = V($);
18296
- return new m("Invalid " + k + " `" + I + "` of type " + ("`" + L + "` supplied to `" + E + "`, expected a single ReactElement."));
18303
+ var z = V($);
18304
+ return new m("Invalid " + k + " `" + I + "` of type " + ("`" + z + "` supplied to `" + E + "`, expected a single ReactElement."));
18297
18305
  }
18298
18306
  return null;
18299
18307
  }
18300
18308
  return b(D);
18301
18309
  }
18302
- function C() {
18310
+ function w() {
18303
18311
  function D(H, J, E, k, I) {
18304
18312
  var $ = H[J];
18305
18313
  if (!e.isValidElementType($)) {
18306
- var L = V($);
18307
- return new m("Invalid " + k + " `" + I + "` of type " + ("`" + L + "` supplied to `" + E + "`, expected a single ReactElement type."));
18314
+ var z = V($);
18315
+ return new m("Invalid " + k + " `" + I + "` of type " + ("`" + z + "` supplied to `" + E + "`, expected a single ReactElement type."));
18308
18316
  }
18309
18317
  return null;
18310
18318
  }
@@ -18313,8 +18321,8 @@ function hx() {
18313
18321
  function _(D) {
18314
18322
  function H(J, E, k, I, $) {
18315
18323
  if (!(J[E] instanceof D)) {
18316
- var L = D.name || p, ne = G(J[E]);
18317
- return new m("Invalid " + I + " `" + $ + "` of type " + ("`" + ne + "` supplied to `" + k + "`, expected ") + ("instance of `" + L + "`."));
18324
+ var z = D.name || p, ne = G(J[E]);
18325
+ return new m("Invalid " + I + " `" + $ + "` of type " + ("`" + ne + "` supplied to `" + k + "`, expected ") + ("instance of `" + z + "`."));
18318
18326
  }
18319
18327
  return null;
18320
18328
  }
@@ -18326,27 +18334,27 @@ function hx() {
18326
18334
  "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])."
18327
18335
  ) : i("Invalid argument supplied to oneOf, expected an array.")), s;
18328
18336
  function H(J, E, k, I, $) {
18329
- for (var L = J[E], ne = 0; ne < D.length; ne++)
18330
- if (g(L, D[ne]))
18337
+ for (var z = J[E], ne = 0; ne < D.length; ne++)
18338
+ if (g(z, D[ne]))
18331
18339
  return null;
18332
18340
  var ee = JSON.stringify(D, function(ue, Q) {
18333
18341
  var De = U(Q);
18334
18342
  return De === "symbol" ? String(Q) : Q;
18335
18343
  });
18336
- return new m("Invalid " + I + " `" + $ + "` of value `" + String(L) + "` " + ("supplied to `" + k + "`, expected one of " + ee + "."));
18344
+ return new m("Invalid " + I + " `" + $ + "` of value `" + String(z) + "` " + ("supplied to `" + k + "`, expected one of " + ee + "."));
18337
18345
  }
18338
18346
  return b(H);
18339
18347
  }
18340
- function z(D) {
18348
+ function L(D) {
18341
18349
  function H(J, E, k, I, $) {
18342
18350
  if (typeof D != "function")
18343
18351
  return new m("Property `" + $ + "` of component `" + k + "` has invalid PropType notation inside objectOf.");
18344
- var L = J[E], ne = V(L);
18352
+ var z = J[E], ne = V(z);
18345
18353
  if (ne !== "object")
18346
18354
  return new m("Invalid " + I + " `" + $ + "` of type " + ("`" + ne + "` supplied to `" + k + "`, expected an object."));
18347
- for (var ee in L)
18348
- if (r(L, ee)) {
18349
- var K = D(L, ee, k, I, $ + "." + ee, n);
18355
+ for (var ee in z)
18356
+ if (r(z, ee)) {
18357
+ var K = D(z, ee, k, I, $ + "." + ee, n);
18350
18358
  if (K instanceof Error)
18351
18359
  return K;
18352
18360
  }
@@ -18364,15 +18372,15 @@ function hx() {
18364
18372
  "Invalid argument supplied to oneOfType. Expected an array of check functions, but received " + ie(J) + " at index " + H + "."
18365
18373
  ), s;
18366
18374
  }
18367
- function E(k, I, $, L, ne) {
18375
+ function E(k, I, $, z, ne) {
18368
18376
  for (var ee = [], K = 0; K < D.length; K++) {
18369
- var ue = D[K], Q = ue(k, I, $, L, ne, n);
18377
+ var ue = D[K], Q = ue(k, I, $, z, ne, n);
18370
18378
  if (Q == null)
18371
18379
  return null;
18372
18380
  Q.data && r(Q.data, "expectedType") && ee.push(Q.data.expectedType);
18373
18381
  }
18374
18382
  var De = ee.length > 0 ? ", expected one of type [" + ee.join(", ") + "]" : "";
18375
- return new m("Invalid " + L + " `" + ne + "` supplied to " + ("`" + $ + "`" + De + "."));
18383
+ return new m("Invalid " + z + " `" + ne + "` supplied to " + ("`" + $ + "`" + De + "."));
18376
18384
  }
18377
18385
  return b(E);
18378
18386
  }
@@ -18387,16 +18395,16 @@ function hx() {
18387
18395
  (D || "React class") + ": " + H + " type `" + J + "." + E + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + k + "`."
18388
18396
  );
18389
18397
  }
18390
- function w(D) {
18398
+ function C(D) {
18391
18399
  function H(J, E, k, I, $) {
18392
- var L = J[E], ne = V(L);
18400
+ var z = J[E], ne = V(z);
18393
18401
  if (ne !== "object")
18394
18402
  return new m("Invalid " + I + " `" + $ + "` of type `" + ne + "` " + ("supplied to `" + k + "`, expected `object`."));
18395
18403
  for (var ee in D) {
18396
18404
  var K = D[ee];
18397
18405
  if (typeof K != "function")
18398
18406
  return j(k, I, $, ee, U(K));
18399
- var ue = K(L, ee, k, I, $ + "." + ee, n);
18407
+ var ue = K(z, ee, k, I, $ + "." + ee, n);
18400
18408
  if (ue)
18401
18409
  return ue;
18402
18410
  }
@@ -18406,7 +18414,7 @@ function hx() {
18406
18414
  }
18407
18415
  function F(D) {
18408
18416
  function H(J, E, k, I, $) {
18409
- var L = J[E], ne = V(L);
18417
+ var z = J[E], ne = V(z);
18410
18418
  if (ne !== "object")
18411
18419
  return new m("Invalid " + I + " `" + $ + "` of type `" + ne + "` " + ("supplied to `" + k + "`, expected `object`."));
18412
18420
  var ee = t({}, J[E], D);
@@ -18419,7 +18427,7 @@ function hx() {
18419
18427
  "Invalid " + I + " `" + $ + "` key `" + K + "` supplied to `" + k + "`.\nBad object: " + JSON.stringify(J[E], null, " ") + `
18420
18428
  Valid keys: ` + JSON.stringify(Object.keys(D), null, " ")
18421
18429
  );
18422
- var Q = ue(L, K, k, I, $ + "." + K, n);
18430
+ var Q = ue(z, K, k, I, $ + "." + K, n);
18423
18431
  if (Q)
18424
18432
  return Q;
18425
18433
  }
@@ -18885,22 +18893,22 @@ var $l = {
18885
18893
  delayInitialFocusTimer: void 0,
18886
18894
  // the most recent KeyboardEvent for the configured nav key (typically [SHIFT+]TAB), if any
18887
18895
  recentNavEvent: void 0
18888
- }, o, l = function(w, F, N) {
18889
- return w && w[F] !== void 0 ? w[F] : i[N || F];
18890
- }, u = function(w, F) {
18896
+ }, o, l = function(C, F, N) {
18897
+ return C && C[F] !== void 0 ? C[F] : i[N || F];
18898
+ }, u = function(C, F) {
18891
18899
  var N = typeof (F == null ? void 0 : F.composedPath) == "function" ? F.composedPath() : void 0;
18892
18900
  return s.containerGroups.findIndex(function(R) {
18893
18901
  var V = R.container, U = R.tabbableNodes;
18894
- return V.contains(w) || // fall back to explicit tabbable search which will take into consideration any
18902
+ return V.contains(C) || // fall back to explicit tabbable search which will take into consideration any
18895
18903
  // web components if the `tabbableOptions.getShadowRoot` option was used for
18896
18904
  // the trap, enabling shadow DOM support in tabbable (`Node.contains()` doesn't
18897
18905
  // look inside web components even if open)
18898
18906
  (N == null ? void 0 : N.includes(V)) || U.find(function(ie) {
18899
- return ie === w;
18907
+ return ie === C;
18900
18908
  });
18901
18909
  });
18902
- }, c = function(w) {
18903
- var F = i[w];
18910
+ }, c = function(C) {
18911
+ var F = i[C];
18904
18912
  if (typeof F == "function") {
18905
18913
  for (var N = arguments.length, R = new Array(N > 1 ? N - 1 : 0), V = 1; V < N; V++)
18906
18914
  R[V - 1] = arguments[V];
@@ -18909,29 +18917,29 @@ var $l = {
18909
18917
  if (F === !0 && (F = void 0), !F) {
18910
18918
  if (F === void 0 || F === !1)
18911
18919
  return F;
18912
- throw new Error("`".concat(w, "` was specified but was not a node, or did not return a node"));
18920
+ throw new Error("`".concat(C, "` was specified but was not a node, or did not return a node"));
18913
18921
  }
18914
18922
  var U = F;
18915
18923
  if (typeof F == "string" && (U = r.querySelector(F), !U))
18916
- throw new Error("`".concat(w, "` as selector refers to no known node"));
18924
+ throw new Error("`".concat(C, "` as selector refers to no known node"));
18917
18925
  return U;
18918
18926
  }, f = function() {
18919
- var w = c("initialFocus");
18920
- if (w === !1)
18927
+ var C = c("initialFocus");
18928
+ if (C === !1)
18921
18929
  return !1;
18922
- if (w === void 0 || !ma(w, i.tabbableOptions))
18930
+ if (C === void 0 || !ma(C, i.tabbableOptions))
18923
18931
  if (u(r.activeElement) >= 0)
18924
- w = r.activeElement;
18932
+ C = r.activeElement;
18925
18933
  else {
18926
18934
  var F = s.tabbableGroups[0], N = F && F.firstTabbableNode;
18927
- w = N || c("fallbackFocus");
18935
+ C = N || c("fallbackFocus");
18928
18936
  }
18929
- if (!w)
18937
+ if (!C)
18930
18938
  throw new Error("Your focus-trap needs to have at least one focusable element");
18931
- return w;
18939
+ return C;
18932
18940
  }, p = function() {
18933
- if (s.containerGroups = s.containers.map(function(w) {
18934
- var F = Kd(w, i.tabbableOptions), N = Zd(w, i.tabbableOptions), R = F.length > 0 ? F[0] : void 0, V = F.length > 0 ? F[F.length - 1] : void 0, U = N.find(function(D) {
18941
+ if (s.containerGroups = s.containers.map(function(C) {
18942
+ var F = Kd(C, i.tabbableOptions), N = Zd(C, i.tabbableOptions), R = F.length > 0 ? F[0] : void 0, V = F.length > 0 ? F[F.length - 1] : void 0, U = N.find(function(D) {
18935
18943
  return mn(D);
18936
18944
  }), ie = N.slice().reverse().find(function(D) {
18937
18945
  return mn(D);
@@ -18939,7 +18947,7 @@ var $l = {
18939
18947
  return nn(D) > 0;
18940
18948
  });
18941
18949
  return {
18942
- container: w,
18950
+ container: C,
18943
18951
  tabbableNodes: F,
18944
18952
  focusableNodes: N,
18945
18953
  /** True if at least one node with positive `tabindex` was found in this container. */
@@ -18976,33 +18984,33 @@ var $l = {
18976
18984
  }) : F[E + (J ? 1 : -1)];
18977
18985
  }
18978
18986
  };
18979
- }), s.tabbableGroups = s.containerGroups.filter(function(w) {
18980
- return w.tabbableNodes.length > 0;
18987
+ }), s.tabbableGroups = s.containerGroups.filter(function(C) {
18988
+ return C.tabbableNodes.length > 0;
18981
18989
  }), s.tabbableGroups.length <= 0 && !c("fallbackFocus"))
18982
18990
  throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times");
18983
- if (s.containerGroups.find(function(w) {
18984
- return w.posTabIndexesFound;
18991
+ if (s.containerGroups.find(function(C) {
18992
+ return C.posTabIndexesFound;
18985
18993
  }) && s.containerGroups.length > 1)
18986
18994
  throw new Error("At least one node with a positive tabindex was found in one of your focus-trap's multiple containers. Positive tabindexes are only supported in single-container focus-traps.");
18987
- }, h = function j(w) {
18988
- var F = w.activeElement;
18995
+ }, h = function j(C) {
18996
+ var F = C.activeElement;
18989
18997
  if (F)
18990
18998
  return F.shadowRoot && F.shadowRoot.activeElement !== null ? j(F.shadowRoot) : F;
18991
- }, g = function j(w) {
18992
- if (w !== !1 && w !== h(document)) {
18993
- if (!w || !w.focus) {
18999
+ }, g = function j(C) {
19000
+ if (C !== !1 && C !== h(document)) {
19001
+ if (!C || !C.focus) {
18994
19002
  j(f());
18995
19003
  return;
18996
19004
  }
18997
- w.focus({
19005
+ C.focus({
18998
19006
  preventScroll: !!i.preventScroll
18999
- }), s.mostRecentlyFocusedNode = w, Mx(w) && w.select();
19007
+ }), s.mostRecentlyFocusedNode = C, Mx(C) && C.select();
19000
19008
  }
19001
- }, m = function(w) {
19002
- var F = c("setReturnFocus", w);
19003
- return F || (F === !1 ? !1 : w);
19004
- }, b = function(w) {
19005
- var F = w.target, N = w.event, R = w.isBackward, V = R === void 0 ? !1 : R;
19009
+ }, m = function(C) {
19010
+ var F = c("setReturnFocus", C);
19011
+ return F || (F === !1 ? !1 : C);
19012
+ }, b = function(C) {
19013
+ var F = C.target, N = C.event, R = C.isBackward, V = R === void 0 ? !1 : R;
19006
19014
  F = F || Xr(N), p();
19007
19015
  var U = null;
19008
19016
  if (s.tabbableGroups.length > 0) {
@@ -19011,8 +19019,8 @@ var $l = {
19011
19019
  V ? U = s.tabbableGroups[s.tabbableGroups.length - 1].lastTabbableNode : U = s.tabbableGroups[0].firstTabbableNode;
19012
19020
  else if (V) {
19013
19021
  var D = Ll(s.tabbableGroups, function($) {
19014
- var L = $.firstTabbableNode;
19015
- return F === L;
19022
+ var z = $.firstTabbableNode;
19023
+ return F === z;
19016
19024
  });
19017
19025
  if (D < 0 && (G.container === F || ma(F, i.tabbableOptions) && !mn(F, i.tabbableOptions) && !G.nextTabbableNode(F, !1)) && (D = ie), D >= 0) {
19018
19026
  var H = D === 0 ? s.tabbableGroups.length - 1 : D - 1, J = s.tabbableGroups[H];
@@ -19021,8 +19029,8 @@ var $l = {
19021
19029
  xr(N) || (U = G.nextTabbableNode(F, !1));
19022
19030
  } else {
19023
19031
  var E = Ll(s.tabbableGroups, function($) {
19024
- var L = $.lastTabbableNode;
19025
- return F === L;
19032
+ var z = $.lastTabbableNode;
19033
+ return F === z;
19026
19034
  });
19027
19035
  if (E < 0 && (G.container === F || ma(F, i.tabbableOptions) && !mn(F, i.tabbableOptions) && !G.nextTabbableNode(F)) && (E = ie), E >= 0) {
19028
19036
  var k = E === s.tabbableGroups.length - 1 ? 0 : E + 1, I = s.tabbableGroups[k];
@@ -19033,10 +19041,10 @@ var $l = {
19033
19041
  } else
19034
19042
  U = c("fallbackFocus");
19035
19043
  return U;
19036
- }, v = function(w) {
19037
- var F = Xr(w);
19038
- if (!(u(F, w) >= 0)) {
19039
- if (or(i.clickOutsideDeactivates, w)) {
19044
+ }, v = function(C) {
19045
+ var F = Xr(C);
19046
+ if (!(u(F, C) >= 0)) {
19047
+ if (or(i.clickOutsideDeactivates, C)) {
19040
19048
  o.deactivate({
19041
19049
  // NOTE: by setting `returnFocus: false`, deactivate() will do nothing,
19042
19050
  // which will result in the outside click setting focus to the node
@@ -19048,14 +19056,14 @@ var $l = {
19048
19056
  });
19049
19057
  return;
19050
19058
  }
19051
- or(i.allowOutsideClick, w) || w.preventDefault();
19059
+ or(i.allowOutsideClick, C) || C.preventDefault();
19052
19060
  }
19053
- }, x = function(w) {
19054
- var F = Xr(w), N = u(F, w) >= 0;
19061
+ }, x = function(C) {
19062
+ var F = Xr(C), N = u(F, C) >= 0;
19055
19063
  if (N || F instanceof Document)
19056
19064
  N && (s.mostRecentlyFocusedNode = F);
19057
19065
  else {
19058
- w.stopImmediatePropagation();
19066
+ C.stopImmediatePropagation();
19059
19067
  var R, V = !0;
19060
19068
  if (s.mostRecentlyFocusedNode)
19061
19069
  if (nn(s.mostRecentlyFocusedNode) > 0) {
@@ -19082,23 +19090,23 @@ var $l = {
19082
19090
  })), g(R || s.mostRecentlyFocusedNode || f());
19083
19091
  }
19084
19092
  s.recentNavEvent = void 0;
19085
- }, A = function(w) {
19093
+ }, A = function(C) {
19086
19094
  var F = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1;
19087
- s.recentNavEvent = w;
19095
+ s.recentNavEvent = C;
19088
19096
  var N = b({
19089
- event: w,
19097
+ event: C,
19090
19098
  isBackward: F
19091
19099
  });
19092
- N && (xr(w) && w.preventDefault(), g(N));
19093
- }, B = function(w) {
19094
- if ($x(w) && or(i.escapeDeactivates, w) !== !1) {
19095
- w.preventDefault(), o.deactivate();
19100
+ N && (xr(C) && C.preventDefault(), g(N));
19101
+ }, B = function(C) {
19102
+ if ($x(C) && or(i.escapeDeactivates, C) !== !1) {
19103
+ C.preventDefault(), o.deactivate();
19096
19104
  return;
19097
19105
  }
19098
- (i.isKeyForward(w) || i.isKeyBackward(w)) && A(w, i.isKeyBackward(w));
19099
- }, C = function(w) {
19100
- var F = Xr(w);
19101
- u(F, w) >= 0 || or(i.clickOutsideDeactivates, w) || or(i.allowOutsideClick, w) || (w.preventDefault(), w.stopImmediatePropagation());
19106
+ (i.isKeyForward(C) || i.isKeyBackward(C)) && A(C, i.isKeyBackward(C));
19107
+ }, w = function(C) {
19108
+ var F = Xr(C);
19109
+ u(F, C) >= 0 || or(i.clickOutsideDeactivates, C) || or(i.allowOutsideClick, C) || (C.preventDefault(), C.stopImmediatePropagation());
19102
19110
  }, _ = function() {
19103
19111
  if (s.active)
19104
19112
  return $l.activateTrap(a, o), s.delayInitialFocusTimer = i.delayInitialFocus ? Il(function() {
@@ -19109,7 +19117,7 @@ var $l = {
19109
19117
  }), r.addEventListener("touchstart", v, {
19110
19118
  capture: !0,
19111
19119
  passive: !1
19112
- }), r.addEventListener("click", C, {
19120
+ }), r.addEventListener("click", w, {
19113
19121
  capture: !0,
19114
19122
  passive: !1
19115
19123
  }), r.addEventListener("keydown", B, {
@@ -19118,18 +19126,18 @@ var $l = {
19118
19126
  }), o;
19119
19127
  }, O = function() {
19120
19128
  if (s.active)
19121
- return r.removeEventListener("focusin", x, !0), r.removeEventListener("mousedown", v, !0), r.removeEventListener("touchstart", v, !0), r.removeEventListener("click", C, !0), r.removeEventListener("keydown", B, !0), o;
19122
- }, z = function(w) {
19123
- var F = w.some(function(N) {
19129
+ return r.removeEventListener("focusin", x, !0), r.removeEventListener("mousedown", v, !0), r.removeEventListener("touchstart", v, !0), r.removeEventListener("click", w, !0), r.removeEventListener("keydown", B, !0), o;
19130
+ }, L = function(C) {
19131
+ var F = C.some(function(N) {
19124
19132
  var R = Array.from(N.removedNodes);
19125
19133
  return R.some(function(V) {
19126
19134
  return V === s.mostRecentlyFocusedNode;
19127
19135
  });
19128
19136
  });
19129
19137
  F && g(f());
19130
- }, M = typeof window < "u" && "MutationObserver" in window ? new MutationObserver(z) : void 0, P = function() {
19131
- M && (M.disconnect(), s.active && !s.paused && s.containers.map(function(w) {
19132
- M.observe(w, {
19138
+ }, M = typeof window < "u" && "MutationObserver" in window ? new MutationObserver(L) : void 0, P = function() {
19139
+ M && (M.disconnect(), s.active && !s.paused && s.containers.map(function(C) {
19140
+ M.observe(C, {
19133
19141
  subtree: !0,
19134
19142
  childList: !0
19135
19143
  });
@@ -19142,24 +19150,24 @@ var $l = {
19142
19150
  get paused() {
19143
19151
  return s.paused;
19144
19152
  },
19145
- activate: function(w) {
19153
+ activate: function(C) {
19146
19154
  if (s.active)
19147
19155
  return this;
19148
- var F = l(w, "onActivate"), N = l(w, "onPostActivate"), R = l(w, "checkCanFocusTrap");
19156
+ var F = l(C, "onActivate"), N = l(C, "onPostActivate"), R = l(C, "checkCanFocusTrap");
19149
19157
  R || p(), s.active = !0, s.paused = !1, s.nodeFocusedBeforeActivation = r.activeElement, F == null || F();
19150
19158
  var V = function() {
19151
19159
  R && p(), _(), P(), N == null || N();
19152
19160
  };
19153
19161
  return R ? (R(s.containers.concat()).then(V, V), this) : (V(), this);
19154
19162
  },
19155
- deactivate: function(w) {
19163
+ deactivate: function(C) {
19156
19164
  if (!s.active)
19157
19165
  return this;
19158
19166
  var F = Ml({
19159
19167
  onDeactivate: i.onDeactivate,
19160
19168
  onPostDeactivate: i.onPostDeactivate,
19161
19169
  checkCanReturnFocus: i.checkCanReturnFocus
19162
- }, w);
19170
+ }, C);
19163
19171
  clearTimeout(s.delayInitialFocusTimer), s.delayInitialFocusTimer = void 0, O(), s.active = !1, s.paused = !1, P(), $l.deactivateTrap(a, o);
19164
19172
  var N = l(F, "onDeactivate"), R = l(F, "onPostDeactivate"), V = l(F, "checkCanReturnFocus"), U = l(F, "returnFocus", "returnFocusOnDeactivate");
19165
19173
  N == null || N();
@@ -19170,20 +19178,20 @@ var $l = {
19170
19178
  };
19171
19179
  return U && V ? (V(m(s.nodeFocusedBeforeActivation)).then(ie, ie), this) : (ie(), this);
19172
19180
  },
19173
- pause: function(w) {
19181
+ pause: function(C) {
19174
19182
  if (s.paused || !s.active)
19175
19183
  return this;
19176
- var F = l(w, "onPause"), N = l(w, "onPostPause");
19184
+ var F = l(C, "onPause"), N = l(C, "onPostPause");
19177
19185
  return s.paused = !0, F == null || F(), O(), P(), N == null || N(), this;
19178
19186
  },
19179
- unpause: function(w) {
19187
+ unpause: function(C) {
19180
19188
  if (!s.paused || !s.active)
19181
19189
  return this;
19182
- var F = l(w, "onUnpause"), N = l(w, "onPostUnpause");
19190
+ var F = l(C, "onUnpause"), N = l(C, "onPostUnpause");
19183
19191
  return s.paused = !1, F == null || F(), p(), _(), P(), N == null || N(), this;
19184
19192
  },
19185
- updateContainerElements: function(w) {
19186
- var F = [].concat(w).filter(Boolean);
19193
+ updateContainerElements: function(C) {
19194
+ var F = [].concat(C).filter(Boolean);
19187
19195
  return s.containers = F.map(function(N) {
19188
19196
  return typeof N == "string" ? r.querySelector(N) : N;
19189
19197
  }), s.active && p(), P(), this;
@@ -19610,7 +19618,7 @@ const dC = ({ children: e, user: t }) => /* @__PURE__ */ d.jsx(Qt.Provider, { va
19610
19618
  e().then((c) => {
19611
19619
  i({ ...c, isLoading: !1 }), ih(5e3);
19612
19620
  }).catch((c) => {
19613
- c.message === Yf && (window.location.href = "/user-onboarding/logout"), i({ isLoading: !1 });
19621
+ c.message === Yf && window.location.pathname !== "/user-onboarding/logout" && (window.location.href = "/user-onboarding/logout"), i({ isLoading: !1 });
19614
19622
  });
19615
19623
  }, []), /* @__PURE__ */ d.jsx(Gd.Provider, { value: { language: o, updateLanguage: u }, children: /* @__PURE__ */ d.jsx(
19616
19624
  cC,
@@ -19903,8 +19911,8 @@ const so = As(
19903
19911
  h(_);
19904
19912
  }, 300);
19905
19913
  }, [t]);
19906
- const C = { ...o };
19907
- return i && i.onBlur && (C.onBlur = i.onBlur), /* @__PURE__ */ d.jsx(
19914
+ const w = { ...o };
19915
+ return i && i.onBlur && (w.onBlur = i.onBlur), /* @__PURE__ */ d.jsx(
19908
19916
  "aside",
19909
19917
  {
19910
19918
  ref: f,
@@ -19916,7 +19924,7 @@ const so = As(
19916
19924
  "has-form": b
19917
19925
  }),
19918
19926
  hidden: p === "hidden",
19919
- ...C,
19927
+ ...w,
19920
19928
  children: n ? /* @__PURE__ */ d.jsx("p", { children: u.formatMessage({ id: "tooltip_loading" }) }) : typeof r == "string" ? /* @__PURE__ */ d.jsx("p", { children: r }) : r
19921
19929
  }
19922
19930
  );
@@ -20441,9 +20449,9 @@ const DE = ({
20441
20449
  s((B) => ({ ...B, loading: !0 }));
20442
20450
  try {
20443
20451
  const B = await t.onClick(e);
20444
- s(B === "success" ? () => ({ registered: !0, loading: !1 }) : (C) => ({ ...C, loading: !1 }));
20452
+ s(B === "success" ? () => ({ registered: !0, loading: !1 }) : (w) => ({ ...w, loading: !1 }));
20445
20453
  } catch {
20446
- s((C) => ({ ...C, loading: !1 }));
20454
+ s((w) => ({ ...w, loading: !1 }));
20447
20455
  }
20448
20456
  }
20449
20457
  };
@@ -20488,7 +20496,7 @@ const CC = {
20488
20496
  className: i = "",
20489
20497
  handleCardClick: s
20490
20498
  }) => {
20491
- var O, z, M;
20499
+ var O, L, M;
20492
20500
  const o = de(), l = We(Qt), u = l && typeof l.id == "string", [c, f] = ce({
20493
20501
  data: null,
20494
20502
  isLoading: !0
@@ -20523,7 +20531,7 @@ const CC = {
20523
20531
  } = Sa[m];
20524
20532
  let B = p.slug ? `${b}${p.slug}` : !1;
20525
20533
  p.slug && (p.slug.slice(0, 4) === "http" || p.slug.slice(0, 2) === "//" || p.slug.slice(0, 6) === "mailto" || p.slug.slice(0, 3) === "tel") && (B = p.slug);
20526
- const C = { ...CC, ...x };
20534
+ const w = { ...CC, ...x };
20527
20535
  let _ = { className: "card" };
20528
20536
  return B && (_ = {
20529
20537
  href: B,
@@ -20589,14 +20597,14 @@ const CC = {
20589
20597
  p.partner && /* @__PURE__ */ d.jsx("p", { className: "partners", "data-testid": "partners", children: p.partner.length > 1 ? o.formatMessage(
20590
20598
  { id: "card_partner" },
20591
20599
  { partner: p.partner[0], number: p.partner.length - 1 }
20592
- ) : Un(p.partner[0], C.partner) }),
20600
+ ) : Un(p.partner[0], w.partner) }),
20593
20601
  /* Text */
20594
20602
  ["title", "text", "secondaryText"].map((P) => {
20595
20603
  const j = p[P];
20596
20604
  if (!j)
20597
20605
  return null;
20598
- const w = Vf(P);
20599
- return /* @__PURE__ */ d.jsx("p", { className: w, "data-testid": w, children: Un(j, C[P]) }, P);
20606
+ const C = Vf(P);
20607
+ return /* @__PURE__ */ d.jsx("p", { className: C, "data-testid": C, children: Un(j, w[P]) }, P);
20600
20608
  }),
20601
20609
  (l == null ? void 0 : l.id) && (p == null ? void 0 : p.members) && /* @__PURE__ */ d.jsxs("span", { className: "member-information", children: [
20602
20610
  ((O = p == null ? void 0 : p.members) == null ? void 0 : O.isMember) && /* @__PURE__ */ d.jsx(
@@ -20604,7 +20612,7 @@ const CC = {
20604
20612
  {
20605
20613
  size: "small",
20606
20614
  variant: "registered",
20607
- icon: ((z = p == null ? void 0 : p.members) == null ? void 0 : z.memberType) === "owner" ? "user" : "tick",
20615
+ icon: ((L = p == null ? void 0 : p.members) == null ? void 0 : L.memberType) === "owner" ? "user" : "tick",
20608
20616
  children: o.formatMessage({
20609
20617
  id: `card_member_type_${(M = p == null ? void 0 : p.members) == null ? void 0 : M.memberType}`
20610
20618
  })
@@ -20692,7 +20700,7 @@ const BC = ({
20692
20700
  isLoading: !1
20693
20701
  }));
20694
20702
  }, [B, v]);
20695
- const C = (P = "next") => {
20703
+ const w = (P = "next") => {
20696
20704
  let j = m;
20697
20705
  if (typeof P == "string")
20698
20706
  if (P === "next")
@@ -20706,8 +20714,8 @@ const BC = ({
20706
20714
  return;
20707
20715
  else
20708
20716
  j = P;
20709
- g((w) => ({
20710
- ...w,
20717
+ g((C) => ({
20718
+ ...C,
20711
20719
  currentPage: j,
20712
20720
  loadedPages: [.../* @__PURE__ */ new Set([...b, j])]
20713
20721
  }));
@@ -20716,9 +20724,9 @@ const BC = ({
20716
20724
  }, O = (P) => {
20717
20725
  if (ta === null)
20718
20726
  return;
20719
- const j = P.touches[0].clientX, w = ta - j;
20720
- w > 5 ? C("next") : w < -5 && C("previous"), ta = null;
20721
- }, z = {
20727
+ const j = P.touches[0].clientX, C = ta - j;
20728
+ C > 5 ? w("next") : C < -5 && w("previous"), ta = null;
20729
+ }, L = {
20722
20730
  "--width": `${B || 0}px`,
20723
20731
  "--total-cards": v,
20724
20732
  "--cards-per-page": f,
@@ -20728,8 +20736,8 @@ const BC = ({
20728
20736
  return /* @__PURE__ */ d.jsx(dc, { layout: `carousel${a ? "-with-title" : ""}` });
20729
20737
  const M = (P, j) => {
20730
20738
  var F;
20731
- let w = null;
20732
- return (F = P == null ? void 0 : P.sys) != null && F.id ? w = `card-${P.sys.id}` : P != null && P.slug ? w = `card-${P.slug}` : [n[j], P.contentType].includes("customCard") && (w = `card-${window.btoa(`${P.title} ${P.createdAt}`)}-${j}`), w;
20739
+ let C = null;
20740
+ return (F = P == null ? void 0 : P.sys) != null && F.id ? C = `card-${P.sys.id}` : P != null && P.slug ? C = `card-${P.slug}` : [n[j], P.contentType].includes("customCard") && (C = `card-${window.btoa(`${P.title} ${P.createdAt}`)}-${j}`), C;
20733
20741
  };
20734
20742
  return /* @__PURE__ */ d.jsxs(
20735
20743
  "section",
@@ -20745,28 +20753,28 @@ const BC = ({
20745
20753
  className: "carousel",
20746
20754
  onTouchStart: _,
20747
20755
  onTouchMove: O,
20748
- style: z,
20756
+ style: L,
20749
20757
  "data-testid": "carousel-list",
20750
20758
  children: t.map((P, j) => {
20751
- let w = M(P, j);
20752
- return w && EC(j, f, m, b) ? /* @__PURE__ */ d.jsx(
20759
+ let C = M(P, j);
20760
+ return C && EC(j, f, m, b) ? /* @__PURE__ */ d.jsx(
20753
20761
  ef,
20754
20762
  {
20755
- id: w,
20763
+ id: C,
20756
20764
  card: { ...P, contentType: n[j] },
20757
20765
  buildCardData: r,
20758
20766
  gtmContext: s,
20759
20767
  ...o
20760
20768
  },
20761
- w
20762
- ) : (w = w || `${e}-card-${j}`, /* @__PURE__ */ d.jsx(
20769
+ C
20770
+ ) : (C = C || `${e}-card-${j}`, /* @__PURE__ */ d.jsx(
20763
20771
  jt,
20764
20772
  {
20765
20773
  element: "li",
20766
20774
  className: "card-wrapper",
20767
20775
  "data-testid": "card-placeholder"
20768
20776
  },
20769
- w
20777
+ C
20770
20778
  ));
20771
20779
  })
20772
20780
  }
@@ -20779,7 +20787,7 @@ const BC = ({
20779
20787
  size: "large",
20780
20788
  icon: { icon: "chevron_left" },
20781
20789
  onClick: (P) => {
20782
- P.preventDefault(), P.stopPropagation(), C("previous");
20790
+ P.preventDefault(), P.stopPropagation(), w("previous");
20783
20791
  },
20784
20792
  screenreaderText: l.formatMessage({
20785
20793
  id: "carousel_pagination_previous"
@@ -20793,8 +20801,8 @@ const BC = ({
20793
20801
  className: Z("page-indicator", {
20794
20802
  selected: j === m
20795
20803
  }),
20796
- onClick: (w) => {
20797
- w.preventDefault(), w.stopPropagation(), C(j);
20804
+ onClick: (C) => {
20805
+ C.preventDefault(), C.stopPropagation(), w(j);
20798
20806
  },
20799
20807
  children: /* @__PURE__ */ d.jsx(Ve, { showOnFocus: !1, children: l.formatMessage(
20800
20808
  { id: "carousel_pagination_page" },
@@ -20809,7 +20817,7 @@ const BC = ({
20809
20817
  size: "large",
20810
20818
  icon: { icon: "chevron_right" },
20811
20819
  onClick: (P) => {
20812
- P.preventDefault(), P.stopPropagation(), C("next");
20820
+ P.preventDefault(), P.stopPropagation(), w("next");
20813
20821
  },
20814
20822
  screenreaderText: l.formatMessage({ id: "carousel_pagination_next" }),
20815
20823
  disabled: m >= x - 1
@@ -21044,8 +21052,8 @@ const na = "languageSwitcher_", _E = ({
21044
21052
  x = {
21045
21053
  ...x,
21046
21054
  href: typeof B == "string" ? B : B.url,
21047
- onClick: (C) => {
21048
- p(b), c(b), typeof a < "u" && (C.preventDefault(), C.stopPropagation(), a(
21055
+ onClick: (w) => {
21056
+ p(b), c(b), typeof a < "u" && (w.preventDefault(), w.stopPropagation(), a(
21049
21057
  b,
21050
21058
  typeof B == "string" ? B : B.urlForRouter
21051
21059
  ));
@@ -22497,10 +22505,10 @@ const OE = ({
22497
22505
  image: x,
22498
22506
  isIntroduction: A,
22499
22507
  optional: B,
22500
- slug: C,
22508
+ slug: w,
22501
22509
  subsectionId: _,
22502
22510
  title: O,
22503
- type: z
22511
+ type: L
22504
22512
  }) => {
22505
22513
  const M = a && t || A, P = {};
22506
22514
  return x && (P.style = { "--image": `url(${x})` }), /* @__PURE__ */ d.jsx(
@@ -22517,7 +22525,7 @@ const OE = ({
22517
22525
  children: /* @__PURE__ */ d.jsx(
22518
22526
  Xn,
22519
22527
  {
22520
- href: M ? `/microcourses/en/${o}/${C}` : void 0,
22528
+ href: M ? `/microcourses/en/${o}/${w}` : void 0,
22521
22529
  fallbackElement: "span",
22522
22530
  className: "inner",
22523
22531
  gtmContext: `MicrocourseOutline${Kf(O)}`,
@@ -22539,15 +22547,15 @@ const OE = ({
22539
22547
  completionTime: m,
22540
22548
  icon: v,
22541
22549
  optional: B,
22542
- type: z,
22543
- children: c && c[C] && /* @__PURE__ */ d.jsx("span", { className: "quiz-score", children: `${c[C]}%` })
22550
+ type: L,
22551
+ children: c && c[w] && /* @__PURE__ */ d.jsx("span", { className: "quiz-score", children: `${c[w]}%` })
22544
22552
  }
22545
22553
  )
22546
22554
  ] })
22547
22555
  }
22548
22556
  )
22549
22557
  },
22550
- C
22558
+ w
22551
22559
  );
22552
22560
  }
22553
22561
  ) })
@@ -22625,15 +22633,15 @@ const dt = "discussion_form_", oo = ({
22625
22633
  "data-testid": "loading-placeholder"
22626
22634
  }
22627
22635
  );
22628
- const x = (w) => {
22629
- p(w);
22636
+ const x = (C) => {
22637
+ p(C);
22630
22638
  let F;
22631
22639
  !c || !c.id ? F = Nt(
22632
22640
  u.formatMessage,
22633
22641
  `${dt}error_loggedOut`,
22634
22642
  e.type,
22635
22643
  "action"
22636
- ) : t ? w.length >= i && (F = `${dt}error_tooLong`) : F = Nt(
22644
+ ) : t ? C.length >= i && (F = `${dt}error_tooLong`) : F = Nt(
22637
22645
  u.formatMessage,
22638
22646
  `${dt}error_noPermission`,
22639
22647
  e.type,
@@ -22642,12 +22650,12 @@ const dt = "discussion_form_", oo = ({
22642
22650
  };
22643
22651
  let A = `${e.type}-form`;
22644
22652
  if (e.type === "response" || e.type === "reply") {
22645
- const w = ((M = e.slugs) == null ? void 0 : M.reply) || ((P = e.slugs) == null ? void 0 : P.answer) || ((j = e.slugs) == null ? void 0 : j.question) || "";
22646
- w && (A = `${A}-${w.slice(-15)}`);
22653
+ const C = ((M = e.slugs) == null ? void 0 : M.reply) || ((P = e.slugs) == null ? void 0 : P.answer) || ((j = e.slugs) == null ? void 0 : j.question) || "";
22654
+ C && (A = `${A}-${C.slice(-15)}`);
22647
22655
  }
22648
- const B = async (w) => {
22656
+ const B = async (C) => {
22649
22657
  var N;
22650
- if (w.preventDefault(), w.stopPropagation(), !c || !c.id || !t || _)
22658
+ if (C.preventDefault(), C.stopPropagation(), !c || !c.id || !t || _)
22651
22659
  return;
22652
22660
  aa && clearTimeout(aa), b("submitting");
22653
22661
  const F = window.location.pathname;
@@ -22682,7 +22690,7 @@ const dt = "discussion_form_", oo = ({
22682
22690
  await Xf(1e3), o.callback && await o.callback(R), aa = setTimeout(() => {
22683
22691
  p(""), b("submitted");
22684
22692
  const V = new Event("discussionFormSubmitted");
22685
- document.dispatchEvent(V), C();
22693
+ document.dispatchEvent(V), w();
22686
22694
  }, 500);
22687
22695
  } catch (R) {
22688
22696
  const V = R;
@@ -22697,14 +22705,14 @@ const dt = "discussion_form_", oo = ({
22697
22705
  `${dt}error_tooMany`,
22698
22706
  e.type,
22699
22707
  "action"
22700
- ) : V != null && V.message.includes("400") && (U = `${dt}error`), g(U), C();
22708
+ ) : V != null && V.message.includes("400") && (U = `${dt}error`), g(U), w();
22701
22709
  }
22702
- }, C = () => {
22710
+ }, w = () => {
22703
22711
  aa = setTimeout(() => {
22704
22712
  g(!1), b(!1);
22705
22713
  }, 5e3);
22706
- }, _ = !f || !sh(f), O = m === "submitting", z = [];
22707
- return (n.isEditing && !O || s.cancel) && z.push({
22714
+ }, _ = !f || !sh(f), O = m === "submitting", L = [];
22715
+ return (n.isEditing && !O || s.cancel) && L.push({
22708
22716
  variant: "secondary",
22709
22717
  size: { mobile: "small", 600: "medium" },
22710
22718
  onClick: o.handleCancel,
@@ -22713,17 +22721,17 @@ const dt = "discussion_form_", oo = ({
22713
22721
  "data-gtm-event-type": `cancel-${e.type}-click`,
22714
22722
  disabled: !s.cancel && (!c || !c.id || !f),
22715
22723
  children: u.formatMessage({ id: `${dt}cancel` })
22716
- }), z.push({
22724
+ }), L.push({
22717
22725
  variant: "primary",
22718
22726
  size: { mobile: "small", 600: "medium" },
22719
- onClick: (w) => {
22727
+ onClick: (C) => {
22720
22728
  if (n.isEditing) {
22721
22729
  b("submitting");
22722
22730
  const F = r != null && r.current && (r != null && r.current) ? r == null ? void 0 : r.current : "";
22723
22731
  o.handleSaveEdit && o.handleSaveEdit(F);
22724
22732
  return;
22725
22733
  }
22726
- B(w);
22734
+ B(C);
22727
22735
  },
22728
22736
  className: "gtm-trackable",
22729
22737
  "data-gtm-event-context": l,
@@ -22771,7 +22779,7 @@ const dt = "discussion_form_", oo = ({
22771
22779
  }
22772
22780
  ),
22773
22781
  /* @__PURE__ */ d.jsx("small", { children: Nt(u.formatMessage, `${dt}explainer`, e.type, "action", {
22774
- a: (w) => /* @__PURE__ */ d.jsx(
22782
+ a: (C) => /* @__PURE__ */ d.jsx(
22775
22783
  "a",
22776
22784
  {
22777
22785
  href: "https://about.apolitical.co/q-and-a-community-guidelines",
@@ -22780,11 +22788,11 @@ const dt = "discussion_form_", oo = ({
22780
22788
  "data-gtm-event-context": l,
22781
22789
  "data-gtm-event-type": "community-guidelines-link",
22782
22790
  rel: "noreferrer",
22783
- children: w
22791
+ children: C
22784
22792
  }
22785
22793
  )
22786
22794
  }) }),
22787
- /* @__PURE__ */ d.jsx(Jn, { buttons: z }),
22795
+ /* @__PURE__ */ d.jsx(Jn, { buttons: L }),
22788
22796
  m === "submitted" && n.showSuccessMessage && /* @__PURE__ */ d.jsx(ga, { className: "success", "data-testid": "success", children: Nt(u.formatMessage, `${dt}success`, e.type, "action") }),
22789
22797
  h && /* @__PURE__ */ d.jsx(ga, { id: "error-message", className: "error", "data-testid": "error", children: s.error ? s.error : typeof h == "string" ? h.includes(" ") ? h : u.formatMessage(
22790
22798
  { id: h },
@@ -22866,8 +22874,8 @@ const Ki = () => {
22866
22874
  const [c, f] = ce(t), [p, h] = ce(a), [g, m] = ce(!1), [b, v] = ce(!1), x = It(
22867
22875
  () => VC(n, Zi),
22868
22876
  [n]
22869
- ), A = (C) => {
22870
- if (C.preventDefault(), C.stopPropagation(), v(!1), Cr)
22877
+ ), A = (w) => {
22878
+ if (w.preventDefault(), w.stopPropagation(), v(!1), Cr)
22871
22879
  return Ki(), !1;
22872
22880
  if (Ki(), g || !s)
22873
22881
  return !1;
@@ -22875,8 +22883,8 @@ const Ki = () => {
22875
22883
  }, B = async () => {
22876
22884
  if (Ki(), g || !s)
22877
22885
  return !1;
22878
- let C = p ? c - 1 : c + 1;
22879
- C < 0 && (C = 0), m(!0), f(C), h(!p);
22886
+ let w = p ? c - 1 : c + 1;
22887
+ w < 0 && (w = 0), m(!0), f(w), h(!p);
22880
22888
  try {
22881
22889
  if (i && i.slugs) {
22882
22890
  const _ = UC(i.slugs);
@@ -22943,16 +22951,16 @@ const Ki = () => {
22943
22951
  }
22944
22952
  ),
22945
22953
  n && /* @__PURE__ */ d.jsx(so, { isOpen: b, isLoading: n.length === 0, children: n.length && /* @__PURE__ */ d.jsxs("ul", { children: [
22946
- x.map((C) => typeof C == "string" || !C.name ? null : /* @__PURE__ */ d.jsx("li", { children: /* @__PURE__ */ d.jsx(
22954
+ x.map((w) => typeof w == "string" || !w.name ? null : /* @__PURE__ */ d.jsx("li", { children: /* @__PURE__ */ d.jsx(
22947
22955
  Xn,
22948
22956
  {
22949
- href: C.id ? `/profiles/${C.id}` : void 0,
22957
+ href: w.id ? `/profiles/${w.id}` : void 0,
22950
22958
  gtmContext: "Likes",
22951
22959
  gtmType: "liked-name-click",
22952
22960
  onClick: (_) => _ == null ? void 0 : _.stopPropagation(),
22953
- children: C.name
22961
+ children: w.name
22954
22962
  }
22955
- ) }, C.id || window.btoa(C.name))),
22963
+ ) }, w.id || window.btoa(w.name))),
22956
22964
  t > Zi && /* @__PURE__ */ d.jsx("li", { children: u.formatMessage(
22957
22965
  { id: "discussion_likes_more" },
22958
22966
  { number: t - Zi }
@@ -22997,7 +23005,7 @@ const Ut = "discussion_", ZC = 280, Ga = ({
22997
23005
  children: m,
22998
23006
  isTruncated: b = !1
22999
23007
  }) => {
23000
- const v = de(), x = We(Qt), A = We(uo), { author: B, canLike: C, createdAt: _, id: O, likes: z = 0, userLiked: M, comments: P = 0 } = t, j = x && x.id && typeof B != "string" && B.id && B.id === x.id || !1, w = typeof C == "boolean" ? C : n ? !j : !1, F = j && (!t.createdAt || Jf(t.createdAt, 10, "seconds")), N = Ce(null), [R, V] = ce({
23008
+ const v = de(), x = We(Qt), A = We(uo), { author: B, canLike: w, createdAt: _, id: O, likes: L = 0, userLiked: M, comments: P = 0 } = t, j = x && x.id && typeof B != "string" && B.id && B.id === x.id || !1, C = typeof w == "boolean" ? w : n ? !j : !1, F = j && (!t.createdAt || Jf(t.createdAt, 10, "seconds")), N = Ce(null), [R, V] = ce({
23001
23009
  body: t && t.body || "",
23002
23010
  isEditing: !1,
23003
23011
  didEdit: t && t.isEdited || !1
@@ -23041,7 +23049,7 @@ const Ut = "discussion_", ZC = 280, Ga = ({
23041
23049
  } catch {
23042
23050
  J(`${Ut}form_error`);
23043
23051
  }
23044
- }, L = () => {
23052
+ }, z = () => {
23045
23053
  A && A.updateConversation && A.updateConversation({ showForm: !0 }), setTimeout(() => {
23046
23054
  var ve, ke, Ne;
23047
23055
  const ue = `reply-form-${(t.type === "answer" ? t.slug : ((ve = t.slugs) == null ? void 0 : ve.reply) || ((ke = t.slugs) == null ? void 0 : ke.answer) || ((Ne = t.slugs) == null ? void 0 : Ne.question) || "").toLowerCase().slice(-15)}`, Q = document.getElementById(ue), De = document.getElementById(`${ue}-input`);
@@ -23187,11 +23195,11 @@ const Ut = "discussion_", ZC = 280, Ga = ({
23187
23195
  KC,
23188
23196
  {
23189
23197
  element: "li",
23190
- likes: z,
23198
+ likes: L,
23191
23199
  isShort: !1,
23192
23200
  userLiked: M,
23193
23201
  content: { type: t.type, slugs: t.slugs },
23194
- canLike: w,
23202
+ canLike: C,
23195
23203
  peopleWhoLiked: t.peopleWhoLiked,
23196
23204
  functions: {
23197
23205
  createLike: u,
@@ -23218,7 +23226,7 @@ const Ut = "discussion_", ZC = 280, Ga = ({
23218
23226
  )
23219
23227
  }
23220
23228
  ),
23221
- (t.type === "answer" || t.type === "reply") && /* @__PURE__ */ d.jsx("li", { children: /* @__PURE__ */ d.jsx(Bs, { styling: { muted: !0 }, onClick: L, children: v.formatMessage({ id: `${Ut}reply` }) }) }),
23229
+ (t.type === "answer" || t.type === "reply") && /* @__PURE__ */ d.jsx("li", { children: /* @__PURE__ */ d.jsx(Bs, { styling: { muted: !0 }, onClick: z, children: v.formatMessage({ id: `${Ut}reply` }) }) }),
23222
23230
  /* @__PURE__ */ d.jsx(
23223
23231
  kC,
23224
23232
  {
@@ -23887,16 +23895,16 @@ const NE = ({
23887
23895
  var N, R, V, U, ie, G, D, H;
23888
23896
  const {
23889
23897
  id: B,
23890
- own_reactions: C,
23898
+ own_reactions: w,
23891
23899
  latest_reactions: _,
23892
23900
  reaction_counts: O
23893
- } = x, z = (((N = _ == null ? void 0 : _.like) == null ? void 0 : N.length) || 0) > 0, M = (((R = C == null ? void 0 : C.like) == null ? void 0 : R.length) || 0) > 0, P = M ? C == null ? void 0 : C.like[0].id : "", j = z ? (V = _ == null ? void 0 : _.like) == null ? void 0 : V.map((J) => {
23901
+ } = x, L = (((N = _ == null ? void 0 : _.like) == null ? void 0 : N.length) || 0) > 0, M = (((R = w == null ? void 0 : w.like) == null ? void 0 : R.length) || 0) > 0, P = M ? w == null ? void 0 : w.like[0].id : "", j = L ? (V = _ == null ? void 0 : _.like) == null ? void 0 : V.map((J) => {
23894
23902
  var E, k, I;
23895
23903
  return {
23896
23904
  id: (E = J == null ? void 0 : J.user) == null ? void 0 : E.id,
23897
23905
  name: (I = (k = J == null ? void 0 : J.user) == null ? void 0 : k.data) == null ? void 0 : I.name
23898
23906
  };
23899
- }) : !1, w = x == null ? void 0 : x.actor, F = (w == null ? void 0 : w.id) === (v == null ? void 0 : v.id);
23907
+ }) : !1, C = x == null ? void 0 : x.actor, F = (C == null ? void 0 : C.id) === (v == null ? void 0 : v.id);
23900
23908
  return /* @__PURE__ */ d.jsx(wr, { children: /* @__PURE__ */ d.jsx(
23901
23909
  Ga,
23902
23910
  {
@@ -23912,13 +23920,13 @@ const NE = ({
23912
23920
  },
23913
23921
  slug: B,
23914
23922
  author: {
23915
- id: w == null ? void 0 : w.id,
23916
- name: (U = w == null ? void 0 : w.data) == null ? void 0 : U.name,
23917
- organization: (ie = w == null ? void 0 : w.data) == null ? void 0 : ie.organization,
23918
- jobTitle: (G = w == null ? void 0 : w.data) == null ? void 0 : G.jobTitle,
23919
- location: (D = w == null ? void 0 : w.data) == null ? void 0 : D.location,
23923
+ id: C == null ? void 0 : C.id,
23924
+ name: (U = C == null ? void 0 : C.data) == null ? void 0 : U.name,
23925
+ organization: (ie = C == null ? void 0 : C.data) == null ? void 0 : ie.organization,
23926
+ jobTitle: (G = C == null ? void 0 : C.data) == null ? void 0 : G.jobTitle,
23927
+ location: (D = C == null ? void 0 : C.data) == null ? void 0 : D.location,
23920
23928
  image: {
23921
- thumbnail: ((H = w == null ? void 0 : w.data) == null ? void 0 : H.thumbnail) || void 0
23929
+ thumbnail: ((H = C == null ? void 0 : C.data) == null ? void 0 : H.thumbnail) || void 0
23922
23930
  }
23923
23931
  },
23924
23932
  userLiked: M,
@@ -24760,16 +24768,16 @@ const Aw = ({
24760
24768
  own_children: x,
24761
24769
  latest_children: A,
24762
24770
  children_counts: B
24763
- } = b, _ = (((R = x == null ? void 0 : x.like) == null ? void 0 : R.length) || 0) > 0 ? (V = x == null ? void 0 : x.like) == null ? void 0 : V.find((L) => {
24771
+ } = b, _ = (((R = x == null ? void 0 : x.like) == null ? void 0 : R.length) || 0) > 0 ? (V = x == null ? void 0 : x.like) == null ? void 0 : V.find((z) => {
24764
24772
  var ne;
24765
- return ((ne = L == null ? void 0 : L.user) == null ? void 0 : ne.id) === (m == null ? void 0 : m.id);
24766
- }) : !1, O = _ ? _ == null ? void 0 : _.id : "", z = !!_, P = (((U = A == null ? void 0 : A.like) == null ? void 0 : U.length) || 0) > 0 ? (ie = A == null ? void 0 : A.like) == null ? void 0 : ie.map((L) => {
24773
+ return ((ne = z == null ? void 0 : z.user) == null ? void 0 : ne.id) === (m == null ? void 0 : m.id);
24774
+ }) : !1, O = _ ? _ == null ? void 0 : _.id : "", L = !!_, P = (((U = A == null ? void 0 : A.like) == null ? void 0 : U.length) || 0) > 0 ? (ie = A == null ? void 0 : A.like) == null ? void 0 : ie.map((z) => {
24767
24775
  var ne, ee, K;
24768
24776
  return {
24769
- id: (ne = L == null ? void 0 : L.user) == null ? void 0 : ne.id,
24770
- name: (K = (ee = L == null ? void 0 : L.user) == null ? void 0 : ee.data) == null ? void 0 : K.name
24777
+ id: (ne = z == null ? void 0 : z.user) == null ? void 0 : ne.id,
24778
+ name: (K = (ee = z == null ? void 0 : z.user) == null ? void 0 : ee.data) == null ? void 0 : K.name
24771
24779
  };
24772
- }) : !1, j = b == null ? void 0 : b.user, w = (j == null ? void 0 : j.id) === (m == null ? void 0 : m.id), F = Ya(a, w), N = typeof b.data.content == "string" ? (G = b == null ? void 0 : b.data) == null ? void 0 : G.content : (
24780
+ }) : !1, j = b == null ? void 0 : b.user, C = (j == null ? void 0 : j.id) === (m == null ? void 0 : m.id), F = Ya(a, C), N = typeof b.data.content == "string" ? (G = b == null ? void 0 : b.data) == null ? void 0 : G.content : (
24773
24781
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
24774
24782
  ((H = (D = b == null ? void 0 : b.data) == null ? void 0 : D.content) == null ? void 0 : H.text) || ""
24775
24783
  );
@@ -24800,7 +24808,7 @@ const Aw = ({
24800
24808
  thumbnail: (($ = j.data) == null ? void 0 : $.thumbnail) || void 0
24801
24809
  }
24802
24810
  },
24803
- userLiked: z,
24811
+ userLiked: L,
24804
24812
  likes: (B == null ? void 0 : B.like) || 0,
24805
24813
  peopleWhoLiked: P
24806
24814
  },
@@ -24809,7 +24817,7 @@ const Aw = ({
24809
24817
  createContent: () => null,
24810
24818
  deleteContent: () => h({ replyId: v }),
24811
24819
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
24812
- updateContent: (L, { body: ne }) => f({ replyId: v, content: ne })
24820
+ updateContent: (z, { body: ne }) => f({ replyId: v, content: ne })
24813
24821
  },
24814
24822
  likes: {
24815
24823
  createLike: () => p({ replyId: v }),
@@ -24867,8 +24875,8 @@ const kw = ({
24867
24875
  }
24868
24876
  ),
24869
24877
  l == null ? void 0 : l.map((A) => {
24870
- var ie, G, D, H, J, E, k, I, $, L, ne, ee;
24871
- const { id: B, own_children: C, latest_children: _, children_counts: O } = A, M = (((ie = C == null ? void 0 : C.like) == null ? void 0 : ie.length) || 0) > 0 ? (G = C == null ? void 0 : C.like) == null ? void 0 : G.find((K) => {
24878
+ var ie, G, D, H, J, E, k, I, $, z, ne, ee;
24879
+ const { id: B, own_children: w, latest_children: _, children_counts: O } = A, M = (((ie = w == null ? void 0 : w.like) == null ? void 0 : ie.length) || 0) > 0 ? (G = w == null ? void 0 : w.like) == null ? void 0 : G.find((K) => {
24872
24880
  var ue;
24873
24881
  return ((ue = K == null ? void 0 : K.user) == null ? void 0 : ue.id) === (x == null ? void 0 : x.id);
24874
24882
  }) : !1, P = M ? M == null ? void 0 : M.id : "", j = !!M, F = (((D = _ == null ? void 0 : _.like) == null ? void 0 : D.length) || 0) > 0 ? (H = _ == null ? void 0 : _.like) == null ? void 0 : H.map((K) => {
@@ -24900,7 +24908,7 @@ const kw = ({
24900
24908
  id: N == null ? void 0 : N.id,
24901
24909
  name: (I = N.data) == null ? void 0 : I.name,
24902
24910
  organization: ($ = N.data) == null ? void 0 : $.organization,
24903
- jobTitle: (L = N.data) == null ? void 0 : L.jobTitle,
24911
+ jobTitle: (z = N.data) == null ? void 0 : z.jobTitle,
24904
24912
  location: (ne = N.data) == null ? void 0 : ne.location,
24905
24913
  image: {
24906
24914
  thumbnail: ((ee = N.data) == null ? void 0 : ee.thumbnail) || void 0
@@ -25059,7 +25067,7 @@ const ME = ({
25059
25067
  leave: l
25060
25068
  }
25061
25069
  }) => {
25062
- var M, P, j, w, F, N, R, V, U, ie;
25070
+ var M, P, j, C, F, N, R, V, U, ie;
25063
25071
  const u = de(), c = We(Qt), {
25064
25072
  activity: f,
25065
25073
  error: p,
@@ -25079,13 +25087,13 @@ const ME = ({
25079
25087
  text: u.formatMessage({ id: "activitySection_notFoundError" })
25080
25088
  }
25081
25089
  );
25082
- const { own_reactions: v, latest_reactions: x } = f, A = (((M = x == null ? void 0 : x.like) == null ? void 0 : M.length) || 0) > 0, B = (((P = v == null ? void 0 : v.like) == null ? void 0 : P.length) || 0) > 0, C = B ? v == null ? void 0 : v.like[0].id : "", _ = A ? (j = x == null ? void 0 : x.like) == null ? void 0 : j.map((G) => {
25090
+ const { own_reactions: v, latest_reactions: x } = f, A = (((M = x == null ? void 0 : x.like) == null ? void 0 : M.length) || 0) > 0, B = (((P = v == null ? void 0 : v.like) == null ? void 0 : P.length) || 0) > 0, w = B ? v == null ? void 0 : v.like[0].id : "", _ = A ? (j = x == null ? void 0 : x.like) == null ? void 0 : j.map((G) => {
25083
25091
  var D, H, J;
25084
25092
  return {
25085
25093
  id: (D = G == null ? void 0 : G.user) == null ? void 0 : D.id,
25086
25094
  name: (J = (H = G == null ? void 0 : G.user) == null ? void 0 : H.data) == null ? void 0 : J.name
25087
25095
  };
25088
- }) : !1, O = f == null ? void 0 : f.actor, z = (O == null ? void 0 : O.id) === (c == null ? void 0 : c.id);
25096
+ }) : !1, O = f == null ? void 0 : f.actor, L = (O == null ? void 0 : O.id) === (c == null ? void 0 : c.id);
25089
25097
  return /* @__PURE__ */ d.jsxs("section", { className: "activity-section", children: [
25090
25098
  /* @__PURE__ */ d.jsx(
25091
25099
  Ga,
@@ -25095,7 +25103,7 @@ const ME = ({
25095
25103
  id: n,
25096
25104
  type: "post",
25097
25105
  body: f == null ? void 0 : f.content,
25098
- canLike: Ya(r, z),
25106
+ canLike: Ya(r, L),
25099
25107
  createdAt: (f == null ? void 0 : f.time) || "",
25100
25108
  slugs: {
25101
25109
  question: `${e}/${t}`,
@@ -25104,7 +25112,7 @@ const ME = ({
25104
25112
  slug: n,
25105
25113
  author: {
25106
25114
  id: O.id,
25107
- name: (w = O.data) == null ? void 0 : w.name,
25115
+ name: (C = O.data) == null ? void 0 : C.name,
25108
25116
  organization: (F = O.data) == null ? void 0 : F.organization,
25109
25117
  jobTitle: (N = O.data) == null ? void 0 : N.jobTitle,
25110
25118
  location: (R = O.data) == null ? void 0 : R.location,
@@ -25128,7 +25136,7 @@ const ME = ({
25128
25136
  },
25129
25137
  likes: {
25130
25138
  createLike: () => m({ activityId: n }),
25131
- deleteLike: () => b({ activityId: n, reactionId: C })
25139
+ deleteLike: () => b({ activityId: n, reactionId: w })
25132
25140
  },
25133
25141
  comments: {
25134
25142
  openComments: () => {