draftify-react 0.3.1 → 0.3.3

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.
@@ -1,5 +1,5 @@
1
1
  import * as fr from "react";
2
- import Di, { createContext as Ke, useRef as Gt, useLayoutEffect as Ou, useEffect as kt, useId as dr, useContext as At, useInsertionEffect as Fo, useMemo as Ee, useCallback as Do, Children as _u, isValidElement as Vu, useState as nt, Fragment as jo, createElement as Nu, forwardRef as Uu, Component as Bu } from "react";
2
+ import Di, { createContext as Ke, useRef as Gt, useLayoutEffect as Ou, useEffect as It, useId as dr, useContext as St, useInsertionEffect as Fo, useMemo as Ee, useCallback as Do, Children as _u, isValidElement as Vu, useState as et, Fragment as jo, createElement as Nu, forwardRef as Uu, Component as Bu } from "react";
3
3
  import { normalizeBlock as Mn, normalizeDocument as Ia, handleCopy as zu, imageToBase64 as $u, modifyCustomBlock as Wu, modifyCodeBlock as Hu, modifyLinkBlock as Yu, modifyVideoBlock as Gu, modifyImageBlock as Ku, modifyTableBlock as Xu, modifyListBlock as qu, modifyQuoteBlock as Qu, modifyParagraphBlock as Zu, modifySubheadingBlock as Ju, modifyHeadingBlock as tf, createCustomBlock as Pr, createCodeBlock as ef, createLinkBlock as nf, createVideoBlock as rf, createImageBlock as af, createTableBlock as sf, createListBlock as of, createQuoteBlock as lf, createParagraphBlock as cf, createSubheadingBlock as uf, createHeadingBlock as ff, handleDownloadJSON as df, exportBlocksToDocx as hf } from "draftify";
4
4
  const mf = "_container_1mz3p_3", pf = "_mediaWrapper_1mz3p_19", gf = "_mediaItem_1mz3p_37", yf = "_footerOverlay_1mz3p_49", vf = "_refreshButton_1mz3p_69", bf = "_dropzone_1mz3p_95", xf = "_uploadLabel_1mz3p_111", wf = "_uploadIconCircle_1mz3p_135", Af = "_donutContainer_1mz3p_159", Sf = "_donutOuter_1mz3p_175", Tf = "_donutInner_1mz3p_191", jt = {
5
5
  container: mf,
@@ -284,7 +284,7 @@ function Li(t) {
284
284
  const e = Gt(null);
285
285
  return e.current === null && (e.current = t()), e.current;
286
286
  }
287
- const Oi = typeof window < "u", Lo = Oi ? Ou : kt, hr = /* @__PURE__ */ Ke(null);
287
+ const Oi = typeof window < "u", Lo = Oi ? Ou : It, hr = /* @__PURE__ */ Ke(null);
288
288
  function _i(t, e) {
289
289
  t.indexOf(e) === -1 && t.push(e);
290
290
  }
@@ -463,13 +463,13 @@ function qo(t, e) {
463
463
  s[Dn[E]].cancel(S);
464
464
  }, state: i, steps: s };
465
465
  }
466
- const { schedule: lt, cancel: ce, state: vt, steps: Cr } = /* @__PURE__ */ qo(typeof requestAnimationFrame < "u" ? requestAnimationFrame : Ot, !0);
466
+ const { schedule: lt, cancel: ce, state: bt, steps: Cr } = /* @__PURE__ */ qo(typeof requestAnimationFrame < "u" ? requestAnimationFrame : Ot, !0);
467
467
  let Nn;
468
468
  function zf() {
469
469
  Nn = void 0;
470
470
  }
471
- const Et = {
472
- now: () => (Nn === void 0 && Et.set(vt.isProcessing || ee.useManualTiming ? vt.timestamp : performance.now()), Nn),
471
+ const kt = {
472
+ now: () => (Nn === void 0 && kt.set(bt.isProcessing || ee.useManualTiming ? bt.timestamp : performance.now()), Nn),
473
473
  set: (t) => {
474
474
  Nn = t, queueMicrotask(zf);
475
475
  }
@@ -530,13 +530,13 @@ const qr = {
530
530
  test: /* @__PURE__ */ Yi("hsl", "hue"),
531
531
  parse: /* @__PURE__ */ Jo("hue", "saturation", "lightness"),
532
532
  transform: ({ hue: t, saturation: e, lightness: n, alpha: r = 1 }) => "hsla(" + Math.round(t) + ", " + Kt.transform(cn(e)) + ", " + Kt.transform(cn(n)) + ", " + cn(gn.transform(r)) + ")"
533
- }, ht = {
533
+ }, mt = {
534
534
  test: (t) => we.test(t) || qr.test(t) || De.test(t),
535
535
  parse: (t) => we.test(t) ? we.parse(t) : De.test(t) ? De.parse(t) : qr.parse(t),
536
536
  transform: (t) => typeof t == "string" ? t : t.hasOwnProperty("red") ? we.transform(t) : De.transform(t),
537
537
  getAnimatableNone: (t) => {
538
- const e = ht.parse(t);
539
- return e.alpha = 0, ht.transform(e);
538
+ const e = mt.parse(t);
539
+ return e.alpha = 0, mt.transform(e);
540
540
  }
541
541
  }, Qf = /(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;
542
542
  function Zf(t) {
@@ -550,7 +550,7 @@ function yn(t) {
550
550
  var: []
551
551
  }, i = [];
552
552
  let a = 0;
553
- const o = e.replace(ed, (c) => (ht.test(c) ? (r.color.push(a), i.push(el), n.push(ht.parse(c))) : c.startsWith(td) ? (r.var.push(a), i.push(Jf), n.push(c)) : (r.number.push(a), i.push(tl), n.push(parseFloat(c))), ++a, _a)).split(_a);
553
+ const o = e.replace(ed, (c) => (mt.test(c) ? (r.color.push(a), i.push(el), n.push(mt.parse(c))) : c.startsWith(td) ? (r.var.push(a), i.push(Jf), n.push(c)) : (r.number.push(a), i.push(tl), n.push(parseFloat(c))), ++a, _a)).split(_a);
554
554
  return { values: n, split: o, indexes: r, types: i };
555
555
  }
556
556
  function nl(t) {
@@ -563,12 +563,12 @@ function rl(t) {
563
563
  for (let s = 0; s < r; s++)
564
564
  if (a += e[s], i[s] !== void 0) {
565
565
  const o = n[s];
566
- o === tl ? a += cn(i[s]) : o === el ? a += ht.transform(i[s]) : a += i[s];
566
+ o === tl ? a += cn(i[s]) : o === el ? a += mt.transform(i[s]) : a += i[s];
567
567
  }
568
568
  return a;
569
569
  };
570
570
  }
571
- const nd = (t) => typeof t == "number" ? 0 : ht.test(t) ? ht.getAnimatableNone(t) : t;
571
+ const nd = (t) => typeof t == "number" ? 0 : mt.test(t) ? mt.getAnimatableNone(t) : t;
572
572
  function rd(t) {
573
573
  const e = nl(t);
574
574
  return rl(t)(e.map(nd));
@@ -626,7 +626,7 @@ function ld(t, e) {
626
626
  return (n) => ft(t, e, n);
627
627
  }
628
628
  function Gi(t) {
629
- return typeof t == "number" ? ld : typeof t == "string" ? Wi(t) ? Gn : ht.test(t) ? Na : fd : Array.isArray(t) ? il : typeof t == "object" ? ht.test(t) ? Na : cd : Gn;
629
+ return typeof t == "number" ? ld : typeof t == "string" ? Wi(t) ? Gn : mt.test(t) ? Na : fd : Array.isArray(t) ? il : typeof t == "object" ? mt.test(t) ? Na : cd : Gn;
630
630
  }
631
631
  function il(t, e) {
632
632
  const n = [...t], r = n.length, i = t.map((a, s) => Gi(a)(a, e[s]));
@@ -670,7 +670,7 @@ const dd = (t) => {
670
670
  * If we're processing this frame we can use the
671
671
  * framelocked timestamp to keep things in sync.
672
672
  */
673
- now: () => vt.isProcessing ? vt.timestamp : Et.now()
673
+ now: () => bt.isProcessing ? bt.timestamp : kt.now()
674
674
  };
675
675
  }, sl = (t, e, n = 10) => {
676
676
  let r = "";
@@ -1001,7 +1001,7 @@ class Qi extends qi {
1001
1001
  constructor(e) {
1002
1002
  super(), this.state = "idle", this.startTime = null, this.isStopped = !1, this.currentTime = 0, this.holdTime = null, this.playbackSpeed = 1, this.stop = () => {
1003
1003
  const { motionValue: n } = this.options;
1004
- n && n.updatedAt !== Et.now() && this.tick(Et.now()), this.isStopped = !0, this.state !== "idle" && (this.teardown(), this.options.onStop?.());
1004
+ n && n.updatedAt !== kt.now() && this.tick(kt.now()), this.isStopped = !0, this.state !== "idle" && (this.teardown(), this.options.onStop?.());
1005
1005
  }, this.options = e, this.initAnimation(), this.play(), e.autoplay === !1 && this.pause();
1006
1006
  }
1007
1007
  initAnimation() {
@@ -1070,7 +1070,7 @@ class Qi extends qi {
1070
1070
  return this.playbackSpeed;
1071
1071
  }
1072
1072
  set speed(e) {
1073
- this.updateTime(Et.now());
1073
+ this.updateTime(kt.now());
1074
1074
  const n = this.playbackSpeed !== e;
1075
1075
  this.playbackSpeed = e, n && (this.time = /* @__PURE__ */ Lt(this.currentTime));
1076
1076
  }
@@ -1083,7 +1083,7 @@ class Qi extends qi {
1083
1083
  this.state === "finished" ? (this.updateFinished(), this.startTime = r) : this.holdTime !== null ? this.startTime = r - this.holdTime : this.startTime || (this.startTime = n ?? r), this.state === "finished" && this.speed < 0 && (this.startTime += this.calculatedDuration), this.holdTime = null, this.state = "running", this.driver.start();
1084
1084
  }
1085
1085
  pause() {
1086
- this.state = "paused", this.updateTime(Et.now()), this.holdTime = this.currentTime;
1086
+ this.state = "paused", this.updateTime(kt.now()), this.holdTime = this.currentTime;
1087
1087
  }
1088
1088
  complete() {
1089
1089
  this.state !== "running" && this.play(), this.state = "finished", this.holdTime = null;
@@ -1510,7 +1510,7 @@ class nh extends qi {
1510
1510
  constructor({ autoplay: e = !0, delay: n = 0, type: r = "keyframes", repeat: i = 0, repeatDelay: a = 0, repeatType: s = "loop", keyframes: o, name: c, motionValue: d, element: l, ...u }) {
1511
1511
  super(), this.stop = () => {
1512
1512
  this._animation && (this._animation.stop(), this.stopTimeline?.()), this.keyframeResolver?.cancel();
1513
- }, this.createdAt = Et.now();
1513
+ }, this.createdAt = kt.now();
1514
1514
  const f = {
1515
1515
  autoplay: e,
1516
1516
  delay: n,
@@ -1528,7 +1528,7 @@ class nh extends qi {
1528
1528
  onKeyframesResolved(e, n, r, i) {
1529
1529
  this.keyframeResolver = void 0;
1530
1530
  const { name: a, type: s, velocity: o, delay: c, isHandoff: d, onUpdate: l } = r;
1531
- this.resolvedAt = Et.now(), Qd(e, a, s, o) || ((ee.instantAnimations || !c) && l?.(Xi(e, r, n)), e[0] = e[e.length - 1], oi(r), r.repeat = 0);
1531
+ this.resolvedAt = kt.now(), Qd(e, a, s, o) || ((ee.instantAnimations || !c) && l?.(Xi(e, r, n)), e[0] = e[e.length - 1], oi(r), r.repeat = 0);
1532
1532
  const f = {
1533
1533
  startTime: i ? this.resolvedAt ? this.resolvedAt - this.createdAt > eh ? this.resolvedAt : this.createdAt : this.createdAt : void 0,
1534
1534
  finalKeyframe: n,
@@ -1723,17 +1723,17 @@ const uh = /\b([a-z-]*)\(.*?\)/gu, li = {
1723
1723
  }, dh = {
1724
1724
  ...ta,
1725
1725
  // Color props
1726
- color: ht,
1727
- backgroundColor: ht,
1728
- outlineColor: ht,
1729
- fill: ht,
1730
- stroke: ht,
1726
+ color: mt,
1727
+ backgroundColor: mt,
1728
+ outlineColor: mt,
1729
+ fill: mt,
1730
+ stroke: mt,
1731
1731
  // Border props
1732
- borderColor: ht,
1733
- borderTopColor: ht,
1734
- borderRightColor: ht,
1735
- borderBottomColor: ht,
1736
- borderLeftColor: ht,
1732
+ borderColor: mt,
1733
+ borderTopColor: mt,
1734
+ borderRightColor: mt,
1735
+ borderBottomColor: mt,
1736
+ borderLeftColor: mt,
1737
1737
  filter: li,
1738
1738
  WebkitFilter: li
1739
1739
  }, bl = (t) => dh[t];
@@ -1829,14 +1829,14 @@ class vh {
1829
1829
  */
1830
1830
  constructor(e, n = {}) {
1831
1831
  this.canTrackVelocity = null, this.events = {}, this.updateAndNotify = (r) => {
1832
- const i = Et.now();
1832
+ const i = kt.now();
1833
1833
  if (this.updatedAt !== i && this.setPrevFrameValue(), this.prev = this.current, this.setCurrent(r), this.current !== this.prev && (this.events.change?.notify(this.current), this.dependents))
1834
1834
  for (const a of this.dependents)
1835
1835
  a.dirty();
1836
1836
  }, this.hasAnimated = !1, this.setCurrent(e), this.owner = n.owner;
1837
1837
  }
1838
1838
  setCurrent(e) {
1839
- this.current = e, this.updatedAt = Et.now(), this.canTrackVelocity === null && e !== void 0 && (this.canTrackVelocity = yh(this.current));
1839
+ this.current = e, this.updatedAt = kt.now(), this.canTrackVelocity === null && e !== void 0 && (this.canTrackVelocity = yh(this.current));
1840
1840
  }
1841
1841
  setPrevFrameValue(e = this.current) {
1842
1842
  this.prevFrameValue = e, this.prevUpdatedAt = this.updatedAt;
@@ -1964,7 +1964,7 @@ class vh {
1964
1964
  * @public
1965
1965
  */
1966
1966
  getVelocity() {
1967
- const e = Et.now();
1967
+ const e = kt.now();
1968
1968
  if (!this.canTrackVelocity || this.prevFrameValue === void 0 || e - this.updatedAt > qa)
1969
1969
  return 0;
1970
1970
  const n = Math.min(this.updatedAt - this.prevUpdatedAt, qa);
@@ -2125,7 +2125,7 @@ function Cl(t) {
2125
2125
  function Ph(t) {
2126
2126
  return Cl(t) && t.tagName === "svg";
2127
2127
  }
2128
- const St = (t) => !!(t && t.getVelocity), Ch = [...vl, ht, ue], Eh = (t) => Ch.find(yl(t)), ra = Ke({
2128
+ const Tt = (t) => !!(t && t.getVelocity), Ch = [...vl, mt, ue], Eh = (t) => Ch.find(yl(t)), ra = Ke({
2129
2129
  transformPagePoint: (t) => t,
2130
2130
  isStatic: !1,
2131
2131
  reducedMotion: "never"
@@ -2179,7 +2179,7 @@ function Rh({ children: t, isPresent: e, anchorX: n, root: r }) {
2179
2179
  top: 0,
2180
2180
  left: 0,
2181
2181
  right: 0
2182
- }), { nonce: o } = At(ra), c = Ih(a, t?.ref);
2182
+ }), { nonce: o } = St(ra), c = Ih(a, t?.ref);
2183
2183
  return Fo(() => {
2184
2184
  const { width: d, height: l, top: u, left: f, right: h } = s.current;
2185
2185
  if (e || !a.current || !d || !l)
@@ -2228,11 +2228,11 @@ function Dh() {
2228
2228
  return /* @__PURE__ */ new Map();
2229
2229
  }
2230
2230
  function El(t = !0) {
2231
- const e = At(hr);
2231
+ const e = St(hr);
2232
2232
  if (e === null)
2233
2233
  return [!0, null];
2234
2234
  const { isPresent: n, onExitComplete: r, register: i } = e, a = dr();
2235
- kt(() => {
2235
+ It(() => {
2236
2236
  if (t)
2237
2237
  return i(a);
2238
2238
  }, [t]);
@@ -2247,7 +2247,7 @@ function es(t) {
2247
2247
  }), e;
2248
2248
  }
2249
2249
  const jh = ({ children: t, custom: e, initial: n = !0, onExitComplete: r, presenceAffectsLayout: i = !0, mode: a = "sync", propagate: s = !1, anchorX: o = "left", root: c }) => {
2250
- const [d, l] = El(s), u = Ee(() => es(t), [t]), f = s && !d ? [] : u.map(Ln), h = Gt(!0), m = Gt(u), b = Li(() => /* @__PURE__ */ new Map()), [w, v] = nt(u), [k, S] = nt(u);
2250
+ const [d, l] = El(s), u = Ee(() => es(t), [t]), f = s && !d ? [] : u.map(Ln), h = Gt(!0), m = Gt(u), b = Li(() => /* @__PURE__ */ new Map()), [w, v] = et(u), [k, S] = et(u);
2251
2251
  Lo(() => {
2252
2252
  h.current = !1, m.current = u;
2253
2253
  for (let A = 0; A < k.length; A++) {
@@ -2265,7 +2265,7 @@ const jh = ({ children: t, custom: e, initial: n = !0, onExitComplete: r, presen
2265
2265
  return a === "wait" && E.length && (A = E), S(es(A)), v(u), null;
2266
2266
  }
2267
2267
  process.env.NODE_ENV !== "production" && a === "wait" && k.length > 1 && console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`);
2268
- const { forceRender: P } = At(ji);
2268
+ const { forceRender: P } = St(ji);
2269
2269
  return R.jsx(R.Fragment, { children: k.map((A) => {
2270
2270
  const L = Ln(A), p = s && !d ? !1 : u === k || f.includes(L), y = () => {
2271
2271
  if (b.has(L))
@@ -2393,7 +2393,7 @@ function Nh(t, e) {
2393
2393
  return t.inherit !== !1 ? e : {};
2394
2394
  }
2395
2395
  function Uh(t) {
2396
- const { initial: e, animate: n } = Nh(t, At(mr));
2396
+ const { initial: e, animate: n } = Nh(t, St(mr));
2397
2397
  return Ee(() => ({ initial: e, animate: n }), [rs(e), rs(n)]);
2398
2398
  }
2399
2399
  function rs(t) {
@@ -2497,7 +2497,7 @@ const oa = () => ({
2497
2497
  });
2498
2498
  function Fl(t, e, n) {
2499
2499
  for (const r in e)
2500
- !St(e[r]) && !Rl(r, n) && (t[r] = e[r]);
2500
+ !Tt(e[r]) && !Rl(r, n) && (t[r] = e[r]);
2501
2501
  }
2502
2502
  function Hh({ transformTemplate: t }, e) {
2503
2503
  return Ee(() => {
@@ -2611,7 +2611,7 @@ function la(t) {
2611
2611
  );
2612
2612
  }
2613
2613
  function Jh(t, e, n, { latestValues: r }, i, a = !1) {
2614
- const o = (la(t) ? Qh : Gh)(e, r, i, t), c = Vh(e, typeof t == "string", a), d = t !== jo ? { ...c, ...o, ref: n } : {}, { children: l } = e, u = Ee(() => St(l) ? l.get() : l, [l]);
2614
+ const o = (la(t) ? Qh : Gh)(e, r, i, t), c = Vh(e, typeof t == "string", a), d = t !== jo ? { ...c, ...o, ref: n } : {}, { children: l } = e, u = Ee(() => Tt(l) ? l.get() : l, [l]);
2615
2615
  return Nu(t, {
2616
2616
  ...d,
2617
2617
  children: u
@@ -2635,7 +2635,7 @@ function ca(t, e, n, r) {
2635
2635
  return e;
2636
2636
  }
2637
2637
  function Bn(t) {
2638
- return St(t) ? t.get() : t;
2638
+ return Tt(t) ? t.get() : t;
2639
2639
  }
2640
2640
  function tm({ scrapeMotionValuesFromProps: t, createRenderState: e }, n, r, i) {
2641
2641
  return {
@@ -2675,13 +2675,13 @@ function em(t, e, n, r) {
2675
2675
  return i;
2676
2676
  }
2677
2677
  const Ol = (t) => (e, n) => {
2678
- const r = At(mr), i = At(hr), a = () => tm(t, e, r, i);
2678
+ const r = St(mr), i = St(hr), a = () => tm(t, e, r, i);
2679
2679
  return n ? a() : Li(a);
2680
2680
  };
2681
2681
  function ua(t, e, n) {
2682
2682
  const { style: r } = t, i = {};
2683
2683
  for (const a in r)
2684
- (St(r[a]) || e.style && St(e.style[a]) || Rl(a, t) || n?.getValue(a)?.liveStyle !== void 0) && (i[a] = r[a]);
2684
+ (Tt(r[a]) || e.style && Tt(e.style[a]) || Rl(a, t) || n?.getValue(a)?.liveStyle !== void 0) && (i[a] = r[a]);
2685
2685
  return i;
2686
2686
  }
2687
2687
  const nm = /* @__PURE__ */ Ol({
@@ -2691,7 +2691,7 @@ const nm = /* @__PURE__ */ Ol({
2691
2691
  function _l(t, e, n) {
2692
2692
  const r = ua(t, e, n);
2693
2693
  for (const i in t)
2694
- if (St(t[i]) || St(e[i])) {
2694
+ if (Tt(t[i]) || Tt(e[i])) {
2695
2695
  const a = Qe.indexOf(i) !== -1 ? "attr" + i.charAt(0).toUpperCase() + i.substring(1) : i;
2696
2696
  r[a] = t[i];
2697
2697
  }
@@ -2718,7 +2718,7 @@ function am(t, e, n) {
2718
2718
  }
2719
2719
  const fa = (t) => t.replace(/([a-z])([A-Z])/gu, "$1-$2").toLowerCase(), sm = "framerAppearId", Vl = "data-" + fa(sm), Nl = Ke({});
2720
2720
  function om(t, e, n, r, i) {
2721
- const { visualElement: a } = At(mr), s = At(kl), o = At(hr), c = At(ra).reducedMotion, d = Gt(null);
2721
+ const { visualElement: a } = St(mr), s = St(kl), o = St(hr), c = St(ra).reducedMotion, d = Gt(null);
2722
2722
  r = r || s.renderer, !d.current && r && (d.current = r(t, {
2723
2723
  visualState: e,
2724
2724
  parent: a,
@@ -2727,7 +2727,7 @@ function om(t, e, n, r, i) {
2727
2727
  blockInitialAnimation: o ? o.initial === !1 : !1,
2728
2728
  reducedMotionConfig: c
2729
2729
  }));
2730
- const l = d.current, u = At(Nl);
2730
+ const l = d.current, u = St(Nl);
2731
2731
  l && !l.projection && i && (l.type === "html" || l.type === "svg") && lm(d.current, n, i, u);
2732
2732
  const f = Gt(!1);
2733
2733
  Fo(() => {
@@ -2736,7 +2736,7 @@ function om(t, e, n, r, i) {
2736
2736
  const h = n[Vl], m = Gt(!!h && !window.MotionHandoffIsComplete?.(h) && window.MotionHasOptimisedAnimation?.(h));
2737
2737
  return Lo(() => {
2738
2738
  l && (f.current = !0, window.MotionIsMounted = !0, l.updateFeatures(), l.scheduleRenderMicrotask(), m.current && l.animationState && l.animationState.animateChanges());
2739
- }), kt(() => {
2739
+ }), It(() => {
2740
2740
  l && (!m.current && l.animationState && l.animationState.animateChanges(), m.current && (queueMicrotask(() => {
2741
2741
  window.MotionHandoffMarkAsComplete?.(h);
2742
2742
  }), m.current = !1), l.enteringChildren = void 0);
@@ -2773,7 +2773,7 @@ function Fr(t, { forwardMotionProps: e = !1 } = {}, n, r) {
2773
2773
  function a(o, c) {
2774
2774
  let d;
2775
2775
  const l = {
2776
- ...At(ra),
2776
+ ...St(ra),
2777
2777
  ...o,
2778
2778
  layoutId: cm(o)
2779
2779
  }, { isStatic: u } = l, f = Uh(o), h = i(o, u);
@@ -2789,11 +2789,11 @@ function Fr(t, { forwardMotionProps: e = !1 } = {}, n, r) {
2789
2789
  return s[im] = t, s;
2790
2790
  }
2791
2791
  function cm({ layoutId: t }) {
2792
- const e = At(ji).id;
2792
+ const e = St(ji).id;
2793
2793
  return e && t !== void 0 ? e + "-" + t : t;
2794
2794
  }
2795
2795
  function um(t, e) {
2796
- const n = At(kl).strict;
2796
+ const n = St(kl).strict;
2797
2797
  if (process.env.NODE_ENV !== "production" && e && n) {
2798
2798
  const r = "You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";
2799
2799
  t.ignoreStrict ? Xe(!1, r, "lazy-strict-mode") : te(!1, r, "lazy-strict-mode");
@@ -2912,7 +2912,7 @@ const fs = () => ({
2912
2912
  }), Ve = () => ({
2913
2913
  x: fs(),
2914
2914
  y: fs()
2915
- }), ds = () => ({ min: 0, max: 0 }), mt = () => ({
2915
+ }), ds = () => ({ min: 0, max: 0 }), gt = () => ({
2916
2916
  x: ds(),
2917
2917
  y: ds()
2918
2918
  }), di = { current: null }, Hl = { current: !1 };
@@ -2928,9 +2928,9 @@ const vm = /* @__PURE__ */ new WeakMap();
2928
2928
  function bm(t, e, n) {
2929
2929
  for (const r in e) {
2930
2930
  const i = e[r], a = n[r];
2931
- if (St(i))
2931
+ if (Tt(i))
2932
2932
  t.addValue(r, i);
2933
- else if (St(a))
2933
+ else if (Tt(a))
2934
2934
  t.addValue(r, He(i, { owner: t }));
2935
2935
  else if (a !== i)
2936
2936
  if (t.hasValue(r)) {
@@ -2969,7 +2969,7 @@ class xm {
2969
2969
  this.current = null, this.children = /* @__PURE__ */ new Set(), this.isVariantNode = !1, this.isControllingVariants = !1, this.shouldReduceMotion = null, this.values = /* @__PURE__ */ new Map(), this.KeyframeResolver = Zi, this.features = {}, this.valueSubscriptions = /* @__PURE__ */ new Map(), this.prevMotionValues = {}, this.events = {}, this.propEventSubscriptions = {}, this.notifyUpdate = () => this.notify("Update", this.latestValues), this.render = () => {
2970
2970
  this.current && (this.triggerBuild(), this.renderInstance(this.current, this.renderState, this.props.style, this.projection));
2971
2971
  }, this.renderScheduledAt = 0, this.scheduleRender = () => {
2972
- const f = Et.now();
2972
+ const f = kt.now();
2973
2973
  this.renderScheduledAt < f && (this.renderScheduledAt = f, lt.render(this.render, !1, !0));
2974
2974
  };
2975
2975
  const { latestValues: c, renderState: d } = s;
@@ -2977,7 +2977,7 @@ class xm {
2977
2977
  const { willChange: l, ...u } = this.scrapeMotionValuesFromProps(n, {}, this);
2978
2978
  for (const f in u) {
2979
2979
  const h = u[f];
2980
- c[f] !== void 0 && St(h) && h.set(c[f]);
2980
+ c[f] !== void 0 && Tt(h) && h.set(c[f]);
2981
2981
  }
2982
2982
  }
2983
2983
  mount(e) {
@@ -3036,7 +3036,7 @@ class xm {
3036
3036
  * removed with a re-render to work.
3037
3037
  */
3038
3038
  measureViewportBox() {
3039
- return this.current ? this.measureInstanceViewportBox(this.current, this.props) : mt();
3039
+ return this.current ? this.measureInstanceViewportBox(this.current, this.props) : gt();
3040
3040
  }
3041
3041
  getStaticValue(e) {
3042
3042
  return this.latestValues[e];
@@ -3121,7 +3121,7 @@ class xm {
3121
3121
  */
3122
3122
  readValue(e, n) {
3123
3123
  let r = this.latestValues[e] !== void 0 || !this.current ? this.latestValues[e] : this.getBaseTargetFromProps(this.props, e) ?? this.readValueFromInstance(this.current, e, this.options);
3124
- return r != null && (typeof r == "string" && (Oo(r) || Vo(r)) ? r = parseFloat(r) : !Eh(r) && ue.test(n) && (r = xl(e, n)), this.setBaseTarget(e, St(r) ? r.get() : r)), St(r) ? r.get() : r;
3124
+ return r != null && (typeof r == "string" && (Oo(r) || Vo(r)) ? r = parseFloat(r) : !Eh(r) && ue.test(n) && (r = xl(e, n)), this.setBaseTarget(e, Tt(r) ? r.get() : r)), Tt(r) ? r.get() : r;
3125
3125
  }
3126
3126
  /**
3127
3127
  * Set the base target to later animate back to. This is currently
@@ -3144,7 +3144,7 @@ class xm {
3144
3144
  if (n && r !== void 0)
3145
3145
  return r;
3146
3146
  const i = this.getBaseTargetFromProps(this.props, e);
3147
- return i !== void 0 && !St(i) ? i : this.initialValues[e] !== void 0 && r === void 0 ? void 0 : this.baseTarget[e];
3147
+ return i !== void 0 && !Tt(i) ? i : this.initialValues[e] !== void 0 && r === void 0 ? void 0 : this.baseTarget[e];
3148
3148
  }
3149
3149
  on(e, n) {
3150
3150
  return this.events[e] || (this.events[e] = new Ui()), this.events[e].add(n);
@@ -3172,7 +3172,7 @@ class Yl extends xm {
3172
3172
  handleChildMotionValue() {
3173
3173
  this.childSubscription && (this.childSubscription(), delete this.childSubscription);
3174
3174
  const { children: e } = this.props;
3175
- St(e) && (this.childSubscription = e.on("change", (n) => {
3175
+ Tt(e) && (this.childSubscription = e.on("change", (n) => {
3176
3176
  this.current && (this.current.textContent = `${n}`);
3177
3177
  }));
3178
3178
  }
@@ -3243,7 +3243,7 @@ function Sm(t, e, n, r) {
3243
3243
  }
3244
3244
  class Tm extends Yl {
3245
3245
  constructor() {
3246
- super(...arguments), this.type = "svg", this.isSVGTag = !1, this.measureInstanceViewportBox = mt;
3246
+ super(...arguments), this.type = "svg", this.isSVGTag = !1, this.measureInstanceViewportBox = gt;
3247
3247
  }
3248
3248
  getBaseTargetFromProps(e, n) {
3249
3249
  return e[n];
@@ -3292,7 +3292,7 @@ function km(t, e) {
3292
3292
  }
3293
3293
  }
3294
3294
  function Im(t) {
3295
- return !!(St(t) && t.add);
3295
+ return !!(Tt(t) && t.add);
3296
3296
  }
3297
3297
  function mi(t, e) {
3298
3298
  const n = t.getValue("willChange");
@@ -3674,26 +3674,26 @@ function un(t, e, n, r) {
3674
3674
  return bn(t, e, Qm(n), r);
3675
3675
  }
3676
3676
  const tc = 1e-4, Zm = 1 - tc, Jm = 1 + tc, ec = 0.01, tp = 0 - ec, ep = 0 + ec;
3677
- function Pt(t) {
3677
+ function Ct(t) {
3678
3678
  return t.max - t.min;
3679
3679
  }
3680
3680
  function np(t, e, n) {
3681
3681
  return Math.abs(t - e) <= n;
3682
3682
  }
3683
3683
  function ps(t, e, n, r = 0.5) {
3684
- t.origin = r, t.originPoint = ft(e.min, e.max, t.origin), t.scale = Pt(n) / Pt(e), t.translate = ft(n.min, n.max, t.origin) - t.originPoint, (t.scale >= Zm && t.scale <= Jm || isNaN(t.scale)) && (t.scale = 1), (t.translate >= tp && t.translate <= ep || isNaN(t.translate)) && (t.translate = 0);
3684
+ t.origin = r, t.originPoint = ft(e.min, e.max, t.origin), t.scale = Ct(n) / Ct(e), t.translate = ft(n.min, n.max, t.origin) - t.originPoint, (t.scale >= Zm && t.scale <= Jm || isNaN(t.scale)) && (t.scale = 1), (t.translate >= tp && t.translate <= ep || isNaN(t.translate)) && (t.translate = 0);
3685
3685
  }
3686
3686
  function fn(t, e, n, r) {
3687
3687
  ps(t.x, e.x, n.x, r ? r.originX : void 0), ps(t.y, e.y, n.y, r ? r.originY : void 0);
3688
3688
  }
3689
3689
  function gs(t, e, n) {
3690
- t.min = n.min + e.min, t.max = t.min + Pt(e);
3690
+ t.min = n.min + e.min, t.max = t.min + Ct(e);
3691
3691
  }
3692
3692
  function rp(t, e, n) {
3693
3693
  gs(t.x, e.x, n.x), gs(t.y, e.y, n.y);
3694
3694
  }
3695
3695
  function ys(t, e, n) {
3696
- t.min = e.min - n.min, t.max = t.min + Pt(e);
3696
+ t.min = e.min - n.min, t.max = t.min + Ct(e);
3697
3697
  }
3698
3698
  function Zn(t, e, n) {
3699
3699
  ys(t.x, e.x, n.x), ys(t.y, e.y, n.y);
@@ -3714,7 +3714,7 @@ class rc {
3714
3714
  const f = Lr(this.lastMoveEventInfo, this.history), h = this.startEvent !== null, m = ip(f.offset, { x: 0, y: 0 }) >= this.distanceThreshold;
3715
3715
  if (!h && !m)
3716
3716
  return;
3717
- const { point: b } = f, { timestamp: w } = vt;
3717
+ const { point: b } = f, { timestamp: w } = bt;
3718
3718
  this.history.push({ ...b, timestamp: w });
3719
3719
  const { onStart: v, onMove: k } = this.handlers;
3720
3720
  h || (v && v(this.lastMoveEvent, f), this.startEvent = this.lastMoveEvent), k && k(this.lastMoveEvent, f);
@@ -3730,7 +3730,7 @@ class rc {
3730
3730
  }, !na(e))
3731
3731
  return;
3732
3732
  this.dragSnapToOrigin = a, this.handlers = n, this.transformPagePoint = r, this.distanceThreshold = s, this.contextWindow = i || window;
3733
- const o = Pn(e), c = jr(o, this.transformPagePoint), { point: d } = c, { timestamp: l } = vt;
3733
+ const o = Pn(e), c = jr(o, this.transformPagePoint), { point: d } = c, { timestamp: l } = bt;
3734
3734
  this.history = [{ ...d, timestamp: l }];
3735
3735
  const { onSessionStart: u } = n;
3736
3736
  u && u(e, Lr(c, this.history)), this.removeListeners = An(un(this.contextWindow, "pointermove", this.handlePointerMove), un(this.contextWindow, "pointerup", this.handlePointerUp), un(this.contextWindow, "pointercancel", this.handlePointerUp));
@@ -3807,7 +3807,7 @@ function cp(t, e) {
3807
3807
  }
3808
3808
  function up(t, e) {
3809
3809
  let n = 0.5;
3810
- const r = Pt(t), i = Pt(e);
3810
+ const r = Ct(t), i = Ct(e);
3811
3811
  return i > r ? n = /* @__PURE__ */ pn(e.min, e.max - r, t.min) : r > i && (n = /* @__PURE__ */ pn(t.min, t.max - i, e.min)), Jt(0, 1, n);
3812
3812
  }
3813
3813
  function fp(t, e) {
@@ -3833,7 +3833,7 @@ function Ss(t, e) {
3833
3833
  const hp = /* @__PURE__ */ new WeakMap();
3834
3834
  class mp {
3835
3835
  constructor(e) {
3836
- this.openDragLock = null, this.isDragging = !1, this.currentDirection = null, this.originPoint = { x: 0, y: 0 }, this.constraints = !1, this.hasMutatedConstraints = !1, this.elastic = mt(), this.latestPointerEvent = null, this.latestPanInfo = null, this.visualElement = e;
3836
+ this.openDragLock = null, this.isDragging = !1, this.currentDirection = null, this.originPoint = { x: 0, y: 0 }, this.constraints = !1, this.hasMutatedConstraints = !1, this.elastic = gt(), this.latestPointerEvent = null, this.latestPanInfo = null, this.visualElement = e;
3837
3837
  }
3838
3838
  start(e, { snapToCursor: n = !1, distanceThreshold: r } = {}) {
3839
3839
  const { presenceContext: i } = this.visualElement;
@@ -3852,7 +3852,7 @@ class mp {
3852
3852
  const { projection: S } = this.visualElement;
3853
3853
  if (S && S.layout) {
3854
3854
  const E = S.layout.layoutBox[v];
3855
- E && (k = Pt(E) * (parseFloat(k) / 100));
3855
+ E && (k = Ct(E) * (parseFloat(k) / 100));
3856
3856
  }
3857
3857
  }
3858
3858
  this.originPoint[v] = k;
@@ -4165,11 +4165,11 @@ class vp extends Bu {
4165
4165
  }
4166
4166
  }
4167
4167
  function ac(t) {
4168
- const [e, n] = El(), r = At(ji);
4169
- return R.jsx(vp, { ...t, layoutGroup: r, switchLayoutGroup: At(Nl), isPresent: e, safeToRemove: n });
4168
+ const [e, n] = El(), r = St(ji);
4169
+ return R.jsx(vp, { ...t, layoutGroup: r, switchLayoutGroup: St(Nl), isPresent: e, safeToRemove: n });
4170
4170
  }
4171
4171
  function bp(t, e, n) {
4172
- const r = St(t) ? t : He(t);
4172
+ const r = Tt(t) ? t : He(t);
4173
4173
  return r.start(da("", r, e, n)), r.animation;
4174
4174
  }
4175
4175
  const xp = (t, e) => t.depth - e.depth;
@@ -4188,7 +4188,7 @@ class wp {
4188
4188
  }
4189
4189
  }
4190
4190
  function Ap(t, e) {
4191
- const n = Et.now(), r = ({ timestamp: i }) => {
4191
+ const n = kt.now(), r = ({ timestamp: i }) => {
4192
4192
  const a = i - n;
4193
4193
  a >= e && (ce(r), t(a - e));
4194
4194
  };
@@ -4257,7 +4257,7 @@ function cc(t, e) {
4257
4257
  return Ls(t.x, e.x) && Ls(t.y, e.y);
4258
4258
  }
4259
4259
  function Os(t) {
4260
- return Pt(t.x) / Pt(t.y);
4260
+ return Ct(t.x) / Ct(t.y);
4261
4261
  }
4262
4262
  function _s(t, e) {
4263
4263
  return t.translate === e.translate && t.scale === e.scale && t.originPoint === e.originPoint;
@@ -4459,8 +4459,8 @@ function fc({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
4459
4459
  return;
4460
4460
  }
4461
4461
  this.animationCommitId = this.animationId, this.isUpdating ? (this.isUpdating = !1, this.nodes.forEach(Up), this.nodes.forEach(Lp), this.nodes.forEach(Op)) : this.nodes.forEach(Ns), this.clearAllSnapshots();
4462
- const o = Et.now();
4463
- vt.delta = Jt(0, 1e3 / 60, o - vt.timestamp), vt.timestamp = o, vt.isProcessing = !0, Cr.update.process(vt), Cr.preRender.process(vt), Cr.render.process(vt), vt.isProcessing = !1;
4462
+ const o = kt.now();
4463
+ bt.delta = Jt(0, 1e3 / 60, o - bt.timestamp), bt.timestamp = o, bt.isProcessing = !0, Cr.update.process(bt), Cr.preRender.process(bt), Cr.render.process(bt), bt.isProcessing = !1;
4464
4464
  }
4465
4465
  didUpdate() {
4466
4466
  this.updateScheduled || (this.updateScheduled = !0, ea.read(this.scheduleUpdate));
@@ -4480,7 +4480,7 @@ function fc({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
4480
4480
  * Update measurements
4481
4481
  */
4482
4482
  updateSnapshot() {
4483
- this.snapshot || !this.instance || (this.snapshot = this.measure(), this.snapshot && !Pt(this.snapshot.measuredBox.x) && !Pt(this.snapshot.measuredBox.y) && (this.snapshot = void 0));
4483
+ this.snapshot || !this.instance || (this.snapshot = this.measure(), this.snapshot && !Ct(this.snapshot.measuredBox.x) && !Ct(this.snapshot.measuredBox.y) && (this.snapshot = void 0));
4484
4484
  }
4485
4485
  updateLayout() {
4486
4486
  if (!this.instance || (this.updateScroll(), !(this.options.alwaysMeasureLayout && this.isLead()) && !this.isLayoutDirty))
@@ -4489,7 +4489,7 @@ function fc({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
4489
4489
  for (let c = 0; c < this.path.length; c++)
4490
4490
  this.path[c].updateScroll();
4491
4491
  const s = this.layout;
4492
- this.layout = this.measure(!1), this.layoutVersion++, this.layoutCorrected = mt(), this.isLayoutDirty = !1, this.projectionDelta = void 0, this.notifyListeners("measure", this.layout.layoutBox);
4492
+ this.layout = this.measure(!1), this.layoutVersion++, this.layoutCorrected = gt(), this.isLayoutDirty = !1, this.projectionDelta = void 0, this.notifyListeners("measure", this.layout.layoutBox);
4493
4493
  const { visualElement: o } = this.options;
4494
4494
  o && o.notify("LayoutMeasure", this.layout.layoutBox, s ? s.layoutBox : void 0);
4495
4495
  }
@@ -4526,7 +4526,7 @@ function fc({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
4526
4526
  measurePageBox() {
4527
4527
  const { visualElement: s } = this.options;
4528
4528
  if (!s)
4529
- return mt();
4529
+ return gt();
4530
4530
  const o = s.measureViewportBox();
4531
4531
  if (!(this.scroll?.wasRoot || this.path.some(Xp))) {
4532
4532
  const { scroll: d } = this.root;
@@ -4535,7 +4535,7 @@ function fc({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
4535
4535
  return o;
4536
4536
  }
4537
4537
  removeElementScroll(s) {
4538
- const o = mt();
4538
+ const o = gt();
4539
4539
  if (Vt(o, s), this.scroll?.wasRoot)
4540
4540
  return o;
4541
4541
  for (let c = 0; c < this.path.length; c++) {
@@ -4545,7 +4545,7 @@ function fc({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
4545
4545
  return o;
4546
4546
  }
4547
4547
  applyTransform(s, o = !1) {
4548
- const c = mt();
4548
+ const c = gt();
4549
4549
  Vt(c, s);
4550
4550
  for (let d = 0; d < this.path.length; d++) {
4551
4551
  const l = this.path[d];
@@ -4557,14 +4557,14 @@ function fc({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
4557
4557
  return xe(this.latestValues) && _e(c, this.latestValues), c;
4558
4558
  }
4559
4559
  removeTransform(s) {
4560
- const o = mt();
4560
+ const o = gt();
4561
4561
  Vt(o, s);
4562
4562
  for (let c = 0; c < this.path.length; c++) {
4563
4563
  const d = this.path[c];
4564
4564
  if (!d.instance || !xe(d.latestValues))
4565
4565
  continue;
4566
4566
  ui(d.latestValues) && d.updateSnapshot();
4567
- const l = mt(), u = d.measurePageBox();
4567
+ const l = gt(), u = d.measurePageBox();
4568
4568
  Vt(l, u), Fs(o, d.latestValues, d.snapshot ? d.snapshot.layoutBox : void 0, l);
4569
4569
  }
4570
4570
  return xe(this.latestValues) && Fs(o, this.latestValues), o;
@@ -4583,7 +4583,7 @@ function fc({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
4583
4583
  this.scroll = void 0, this.layout = void 0, this.snapshot = void 0, this.prevTransformTemplateValue = void 0, this.targetDelta = void 0, this.target = void 0, this.isLayoutDirty = !1;
4584
4584
  }
4585
4585
  forceRelativeParentToResolveTarget() {
4586
- this.relativeParent && this.relativeParent.resolvedRelativeTargetAt !== vt.timestamp && this.relativeParent.resolveTargetDelta(!0);
4586
+ this.relativeParent && this.relativeParent.resolvedRelativeTargetAt !== bt.timestamp && this.relativeParent.resolveTargetDelta(!0);
4587
4587
  }
4588
4588
  resolveTargetDelta(s = !1) {
4589
4589
  const o = this.getLead();
@@ -4594,9 +4594,9 @@ function fc({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
4594
4594
  const { layout: l, layoutId: u } = this.options;
4595
4595
  if (!this.layout || !(l || u))
4596
4596
  return;
4597
- this.resolvedRelativeTargetAt = vt.timestamp;
4597
+ this.resolvedRelativeTargetAt = bt.timestamp;
4598
4598
  const f = this.getClosestProjectingParent();
4599
- f && this.linkedParentVersion !== f.layoutVersion && !f.options.layoutRoot && this.removeRelativeTarget(), !this.targetDelta && !this.relativeTarget && (f && f.layout ? this.createRelativeTarget(f, this.layout.layoutBox, f.layout.layoutBox) : this.removeRelativeTarget()), !(!this.relativeTarget && !this.targetDelta) && (this.target || (this.target = mt(), this.targetWithTransforms = mt()), this.relativeTarget && this.relativeTargetOrigin && this.relativeParent && this.relativeParent.target ? (this.forceRelativeParentToResolveTarget(), rp(this.target, this.relativeTarget, this.relativeParent.target)) : this.targetDelta ? (this.resumingFrom ? this.target = this.applyTransform(this.layout.layoutBox) : Vt(this.target, this.layout.layoutBox), $l(this.target, this.targetDelta)) : Vt(this.target, this.layout.layoutBox), this.attemptToResolveRelativeTarget && (this.attemptToResolveRelativeTarget = !1, f && !!f.resumingFrom == !!this.resumingFrom && !f.options.layoutScroll && f.target && this.animationProgress !== 1 ? this.createRelativeTarget(f, this.target, f.target) : this.relativeParent = this.relativeTarget = void 0));
4599
+ f && this.linkedParentVersion !== f.layoutVersion && !f.options.layoutRoot && this.removeRelativeTarget(), !this.targetDelta && !this.relativeTarget && (f && f.layout ? this.createRelativeTarget(f, this.layout.layoutBox, f.layout.layoutBox) : this.removeRelativeTarget()), !(!this.relativeTarget && !this.targetDelta) && (this.target || (this.target = gt(), this.targetWithTransforms = gt()), this.relativeTarget && this.relativeTargetOrigin && this.relativeParent && this.relativeParent.target ? (this.forceRelativeParentToResolveTarget(), rp(this.target, this.relativeTarget, this.relativeParent.target)) : this.targetDelta ? (this.resumingFrom ? this.target = this.applyTransform(this.layout.layoutBox) : Vt(this.target, this.layout.layoutBox), $l(this.target, this.targetDelta)) : Vt(this.target, this.layout.layoutBox), this.attemptToResolveRelativeTarget && (this.attemptToResolveRelativeTarget = !1, f && !!f.resumingFrom == !!this.resumingFrom && !f.options.layoutScroll && f.target && this.animationProgress !== 1 ? this.createRelativeTarget(f, this.target, f.target) : this.relativeParent = this.relativeTarget = void 0));
4600
4600
  }
4601
4601
  getClosestProjectingParent() {
4602
4602
  if (!(!this.parent || ui(this.parent.latestValues) || zl(this.parent.latestValues)))
@@ -4606,7 +4606,7 @@ function fc({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
4606
4606
  return !!((this.relativeTarget || this.targetDelta || this.options.layoutRoot) && this.layout);
4607
4607
  }
4608
4608
  createRelativeTarget(s, o, c) {
4609
- this.relativeParent = s, this.linkedParentVersion = s.layoutVersion, this.forceRelativeParentToResolveTarget(), this.relativeTarget = mt(), this.relativeTargetOrigin = mt(), Zn(this.relativeTargetOrigin, o, c), Vt(this.relativeTarget, this.relativeTargetOrigin);
4609
+ this.relativeParent = s, this.linkedParentVersion = s.layoutVersion, this.forceRelativeParentToResolveTarget(), this.relativeTarget = gt(), this.relativeTargetOrigin = gt(), Zn(this.relativeTargetOrigin, o, c), Vt(this.relativeTarget, this.relativeTargetOrigin);
4610
4610
  }
4611
4611
  removeRelativeTarget() {
4612
4612
  this.relativeParent = this.relativeTarget = void 0;
@@ -4614,14 +4614,14 @@ function fc({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
4614
4614
  calcProjection() {
4615
4615
  const s = this.getLead(), o = !!this.resumingFrom || this !== s;
4616
4616
  let c = !0;
4617
- if ((this.isProjectionDirty || this.parent?.isProjectionDirty) && (c = !1), o && (this.isSharedProjectionDirty || this.isTransformDirty) && (c = !1), this.resolvedRelativeTargetAt === vt.timestamp && (c = !1), c)
4617
+ if ((this.isProjectionDirty || this.parent?.isProjectionDirty) && (c = !1), o && (this.isSharedProjectionDirty || this.isTransformDirty) && (c = !1), this.resolvedRelativeTargetAt === bt.timestamp && (c = !1), c)
4618
4618
  return;
4619
4619
  const { layout: d, layoutId: l } = this.options;
4620
4620
  if (this.isTreeAnimating = !!(this.parent && this.parent.isTreeAnimating || this.currentAnimation || this.pendingAnimation), this.isTreeAnimating || (this.targetDelta = this.relativeTarget = void 0), !this.layout || !(d || l))
4621
4621
  return;
4622
4622
  Vt(this.layoutCorrected, this.layout.layoutBox);
4623
4623
  const u = this.treeScale.x, f = this.treeScale.y;
4624
- pm(this.layoutCorrected, this.treeScale, this.path, o), s.layout && !s.target && (this.treeScale.x !== 1 || this.treeScale.y !== 1) && (s.target = s.layout.layoutBox, s.targetWithTransforms = mt());
4624
+ pm(this.layoutCorrected, this.treeScale, this.path, o), s.layout && !s.target && (this.treeScale.x !== 1 || this.treeScale.y !== 1) && (s.target = s.layout.layoutBox, s.targetWithTransforms = gt());
4625
4625
  const { target: h } = s;
4626
4626
  if (!h) {
4627
4627
  this.prevProjectionDelta && (this.createProjectionDeltas(), this.scheduleRender());
@@ -4648,12 +4648,12 @@ function fc({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
4648
4648
  setAnimationOrigin(s, o = !1) {
4649
4649
  const c = this.snapshot, d = c ? c.latestValues : {}, l = { ...this.latestValues }, u = Ve();
4650
4650
  (!this.relativeParent || !this.relativeParent.options.layoutRoot) && (this.relativeTarget = this.relativeTargetOrigin = void 0), this.attemptToResolveRelativeTarget = !o;
4651
- const f = mt(), h = c ? c.source : void 0, m = this.layout ? this.layout.source : void 0, b = h !== m, w = this.getStack(), v = !w || w.members.length <= 1, k = !!(b && !v && this.options.crossfade === !0 && !this.path.some(Yp));
4651
+ const f = gt(), h = c ? c.source : void 0, m = this.layout ? this.layout.source : void 0, b = h !== m, w = this.getStack(), v = !w || w.members.length <= 1, k = !!(b && !v && this.options.crossfade === !0 && !this.path.some(Yp));
4652
4652
  this.animationProgress = 0;
4653
4653
  let S;
4654
4654
  this.mixTargetDelta = (E) => {
4655
4655
  const P = E / 1e3;
4656
- Bs(u.x, s.x, P), Bs(u.y, s.y, P), this.setTargetDelta(u), this.relativeTarget && this.relativeTargetOrigin && this.layout && this.relativeParent && this.relativeParent.layout && (Zn(f, this.layout.layoutBox, this.relativeParent.layout.layoutBox), Hp(this.relativeTarget, this.relativeTargetOrigin, f, P), S && Mp(this.relativeTarget, S) && (this.isProjectionDirty = !1), S || (S = mt()), Vt(S, this.relativeTarget)), b && (this.animationValues = l, Tp(l, d, this.latestValues, P, k, v)), this.root.scheduleUpdateProjection(), this.scheduleRender(), this.animationProgress = P;
4656
+ Bs(u.x, s.x, P), Bs(u.y, s.y, P), this.setTargetDelta(u), this.relativeTarget && this.relativeTargetOrigin && this.layout && this.relativeParent && this.relativeParent.layout && (Zn(f, this.layout.layoutBox, this.relativeParent.layout.layoutBox), Hp(this.relativeTarget, this.relativeTargetOrigin, f, P), S && Mp(this.relativeTarget, S) && (this.isProjectionDirty = !1), S || (S = gt()), Vt(S, this.relativeTarget)), b && (this.animationValues = l, Tp(l, d, this.latestValues, P, k, v)), this.root.scheduleUpdateProjection(), this.scheduleRender(), this.animationProgress = P;
4657
4657
  }, this.mixTargetDelta(this.options.layoutRoot ? 1e3 : 0);
4658
4658
  }
4659
4659
  startAnimation(s) {
@@ -4686,10 +4686,10 @@ function fc({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
4686
4686
  let { targetWithTransforms: o, target: c, layout: d, latestValues: l } = s;
4687
4687
  if (!(!o || !c || !d)) {
4688
4688
  if (this !== s && this.layout && d && dc(this.options.animationType, this.layout.layoutBox, d.layoutBox)) {
4689
- c = this.target || mt();
4690
- const u = Pt(this.layout.layoutBox.x);
4689
+ c = this.target || gt();
4690
+ const u = Ct(this.layout.layoutBox.x);
4691
4691
  c.x.min = s.target.x.min, c.x.max = c.x.min + u;
4692
- const f = Pt(this.layout.layoutBox.y);
4692
+ const f = Ct(this.layout.layoutBox.y);
4693
4693
  c.y.min = s.target.y.min, c.y.max = c.y.min + f;
4694
4694
  }
4695
4695
  Vt(o, c), _e(o, l), fn(this.projectionDeltaWithTransform, this.layoutCorrected, o, l);
@@ -4799,10 +4799,10 @@ function Op(t) {
4799
4799
  if (t.isLead() && t.layout && e && t.hasListeners("didUpdate")) {
4800
4800
  const { layoutBox: n, measuredBox: r } = t.layout, { animationType: i } = t.options, a = e.source !== t.layout.source;
4801
4801
  i === "size" ? Dt((l) => {
4802
- const u = a ? e.measuredBox[l] : e.layoutBox[l], f = Pt(u);
4802
+ const u = a ? e.measuredBox[l] : e.layoutBox[l], f = Ct(u);
4803
4803
  u.min = n[l].min, u.max = u.min + f;
4804
4804
  }) : dc(i, e.layoutBox, n) && Dt((l) => {
4805
- const u = a ? e.measuredBox[l] : e.layoutBox[l], f = Pt(n[l]);
4805
+ const u = a ? e.measuredBox[l] : e.layoutBox[l], f = Ct(n[l]);
4806
4806
  u.max = u.min + f, t.relativeTarget && !t.currentAnimation && (t.isProjectionDirty = !0, t.relativeTarget[l].max = t.relativeTarget[l].min + f);
4807
4807
  });
4808
4808
  const s = Ve();
@@ -4816,9 +4816,9 @@ function Op(t) {
4816
4816
  if (l && !l.resumeFrom) {
4817
4817
  const { snapshot: u, layout: f } = l;
4818
4818
  if (u && f) {
4819
- const h = mt();
4819
+ const h = gt();
4820
4820
  Zn(h, e.layoutBox, u.layoutBox);
4821
- const m = mt();
4821
+ const m = gt();
4822
4822
  Zn(m, n, f.layoutBox), cc(h, m) || (d = !0), l.options.layoutRoot && (t.relativeTarget = m, t.relativeTargetOrigin = h, t.relativeParent = l);
4823
4823
  }
4824
4824
  }
@@ -5354,8 +5354,8 @@ var ie = !!st.documentElement && !!st.head && typeof st.addEventListener == "fun
5354
5354
  GROUP: "duotone-group",
5355
5355
  PRIMARY: "primary",
5356
5356
  SECONDARY: "secondary"
5357
- }, xc = ["fa-classic", "fa-duotone", "fa-sharp", "fa-sharp-duotone", "fa-thumbprint", "fa-whiteboard", "fa-notdog", "fa-notdog-duo", "fa-chisel", "fa-etch", "fa-jelly", "fa-jelly-fill", "fa-jelly-duo", "fa-slab", "fa-slab-press", "fa-utility", "fa-utility-duo", "fa-utility-fill"], bt = "classic", Cn = "duotone", wc = "sharp", Ac = "sharp-duotone", Sc = "chisel", Tc = "etch", Pc = "jelly", Cc = "jelly-duo", Ec = "jelly-fill", kc = "notdog", Ic = "notdog-duo", Mc = "slab", Rc = "slab-press", Fc = "thumbprint", Dc = "utility", jc = "utility-duo", Lc = "utility-fill", Oc = "whiteboard", P0 = "Classic", C0 = "Duotone", E0 = "Sharp", k0 = "Sharp Duotone", I0 = "Chisel", M0 = "Etch", R0 = "Jelly", F0 = "Jelly Duo", D0 = "Jelly Fill", j0 = "Notdog", L0 = "Notdog Duo", O0 = "Slab", _0 = "Slab Press", V0 = "Thumbprint", N0 = "Utility", U0 = "Utility Duo", B0 = "Utility Fill", z0 = "Whiteboard", _c = [bt, Cn, wc, Ac, Sc, Tc, Pc, Cc, Ec, kc, Ic, Mc, Rc, Fc, Dc, jc, Lc, Oc];
5358
- Br = {}, Q(Q(Q(Q(Q(Q(Q(Q(Q(Q(Br, bt, P0), Cn, C0), wc, E0), Ac, k0), Sc, I0), Tc, M0), Pc, R0), Cc, F0), Ec, D0), kc, j0), Q(Q(Q(Q(Q(Q(Q(Q(Br, Ic, L0), Mc, O0), Rc, _0), Fc, V0), Dc, N0), jc, U0), Lc, B0), Oc, z0);
5357
+ }, xc = ["fa-classic", "fa-duotone", "fa-sharp", "fa-sharp-duotone", "fa-thumbprint", "fa-whiteboard", "fa-notdog", "fa-notdog-duo", "fa-chisel", "fa-etch", "fa-jelly", "fa-jelly-fill", "fa-jelly-duo", "fa-slab", "fa-slab-press", "fa-utility", "fa-utility-duo", "fa-utility-fill"], xt = "classic", Cn = "duotone", wc = "sharp", Ac = "sharp-duotone", Sc = "chisel", Tc = "etch", Pc = "jelly", Cc = "jelly-duo", Ec = "jelly-fill", kc = "notdog", Ic = "notdog-duo", Mc = "slab", Rc = "slab-press", Fc = "thumbprint", Dc = "utility", jc = "utility-duo", Lc = "utility-fill", Oc = "whiteboard", P0 = "Classic", C0 = "Duotone", E0 = "Sharp", k0 = "Sharp Duotone", I0 = "Chisel", M0 = "Etch", R0 = "Jelly", F0 = "Jelly Duo", D0 = "Jelly Fill", j0 = "Notdog", L0 = "Notdog Duo", O0 = "Slab", _0 = "Slab Press", V0 = "Thumbprint", N0 = "Utility", U0 = "Utility Duo", B0 = "Utility Fill", z0 = "Whiteboard", _c = [xt, Cn, wc, Ac, Sc, Tc, Pc, Cc, Ec, kc, Ic, Mc, Rc, Fc, Dc, jc, Lc, Oc];
5358
+ Br = {}, Q(Q(Q(Q(Q(Q(Q(Q(Q(Q(Br, xt, P0), Cn, C0), wc, E0), Ac, k0), Sc, I0), Tc, M0), Pc, R0), Cc, F0), Ec, D0), kc, j0), Q(Q(Q(Q(Q(Q(Q(Q(Br, Ic, L0), Mc, O0), Rc, _0), Fc, V0), Dc, N0), jc, U0), Lc, B0), Oc, z0);
5359
5359
  var $0 = {
5360
5360
  classic: {
5361
5361
  900: "fas",
@@ -5924,22 +5924,22 @@ var z1 = {
5924
5924
  function En(t) {
5925
5925
  return new Proxy(t, {
5926
5926
  get: function(n, r) {
5927
- return r in n ? n[r] : n[bt];
5927
+ return r in n ? n[r] : n[xt];
5928
5928
  }
5929
5929
  });
5930
5930
  }
5931
5931
  var Hc = z({}, bc);
5932
- Hc[bt] = z(z(z(z({}, {
5932
+ Hc[xt] = z(z(z(z({}, {
5933
5933
  "fa-duotone": "duotone"
5934
- }), bc[bt]), to.kit), to["kit-duotone"]);
5934
+ }), bc[xt]), to.kit), to["kit-duotone"]);
5935
5935
  var J1 = En(Hc), Ai = z({}, Y0);
5936
- Ai[bt] = z(z(z(z({}, {
5936
+ Ai[xt] = z(z(z(z({}, {
5937
5937
  duotone: "fad"
5938
- }), Ai[bt]), eo.kit), eo["kit-duotone"]);
5938
+ }), Ai[xt]), eo.kit), eo["kit-duotone"]);
5939
5939
  var ro = En(Ai), Si = z({}, bi);
5940
- Si[bt] = z(z({}, Si[bt]), t1.kit);
5940
+ Si[xt] = z(z({}, Si[xt]), t1.kit);
5941
5941
  var ya = En(Si), Ti = z({}, z1);
5942
- Ti[bt] = z(z({}, Ti[bt]), Z0.kit);
5942
+ Ti[xt] = z(z({}, Ti[xt]), Z0.kit);
5943
5943
  En(Ti);
5944
5944
  var tg = A0, Yc = "fa-layers-text", eg = S0, ng = z({}, $0);
5945
5945
  En(ng);
@@ -5961,7 +5961,7 @@ if (st && typeof st.querySelector == "function") {
5961
5961
  }
5962
5962
  var Gc = {
5963
5963
  styleDefault: "solid",
5964
- familyDefault: bt,
5964
+ familyDefault: xt,
5965
5965
  cssPrefix: Bc,
5966
5966
  replacementClass: zc,
5967
5967
  autoReplaceSvg: !0,
@@ -6807,7 +6807,7 @@ var ou = function() {
6807
6807
  };
6808
6808
  };
6809
6809
  function Sg(t) {
6810
- var e = bt, n = Jc.reduce(function(r, i) {
6810
+ var e = xt, n = Jc.reduce(function(r, i) {
6811
6811
  return r[i] = "".concat(G.cssPrefix, "-").concat(i), r;
6812
6812
  }, {});
6813
6813
  return _c.forEach(function(r) {
@@ -6817,7 +6817,7 @@ function Sg(t) {
6817
6817
  }), e;
6818
6818
  }
6819
6819
  function br(t) {
6820
- var e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, n = e.family, r = n === void 0 ? bt : n, i = J1[r][t];
6820
+ var e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, n = e.family, r = n === void 0 ? xt : n, i = J1[r][t];
6821
6821
  if (r === Cn && !t)
6822
6822
  return "fad";
6823
6823
  var a = ro[r][t] || ro[r][i], s = t in Bt.styles ? t : null, o = a || s || null;
@@ -6874,9 +6874,9 @@ function Pg(t, e, n) {
6874
6874
  };
6875
6875
  }
6876
6876
  var Cg = _c.filter(function(t) {
6877
- return t !== bt || t !== Cn;
6877
+ return t !== xt || t !== Cn;
6878
6878
  }), Eg = Object.keys(bi).filter(function(t) {
6879
- return t !== bt;
6879
+ return t !== xt;
6880
6880
  }).map(function(t) {
6881
6881
  return Object.keys(bi[t]);
6882
6882
  }).flat();
@@ -6905,7 +6905,7 @@ var Ig = /* @__PURE__ */ (function() {
6905
6905
  var s = i.reduce(this._pullDefinitions, {});
6906
6906
  Object.keys(s).forEach(function(o) {
6907
6907
  n.definitions[o] = z(z({}, n.definitions[o] || {}), s[o]), Pi(o, s[o]);
6908
- var c = ya[bt][o];
6908
+ var c = ya[xt][o];
6909
6909
  c && Pi(c, s[o]), au();
6910
6910
  });
6911
6911
  }
@@ -8403,14 +8403,13 @@ function $y({
8403
8403
  fontFamily: n
8404
8404
  }) {
8405
8405
  return /* @__PURE__ */ R.jsx(
8406
- "input",
8406
+ "textarea",
8407
8407
  {
8408
8408
  style: {
8409
8409
  ...nr,
8410
8410
  fontFamily: n || nr.fontFamily,
8411
8411
  borderBottom: "1px solid #232323"
8412
8412
  },
8413
- type: "text",
8414
8413
  placeholder: "Heading...",
8415
8414
  autoFocus: !0,
8416
8415
  value: t.data.text,
@@ -8450,14 +8449,13 @@ function Hy({
8450
8449
  modifySubheading: n
8451
8450
  }) {
8452
8451
  return /* @__PURE__ */ R.jsx(
8453
- "input",
8452
+ "textarea",
8454
8453
  {
8455
8454
  style: {
8456
8455
  ...rr,
8457
8456
  borderBottom: "1px solid #232323",
8458
8457
  fontFamily: t || rr.fontFamily
8459
8458
  },
8460
- type: "text",
8461
8459
  placeholder: "sub heading ...",
8462
8460
  autoFocus: !0,
8463
8461
  value: e.data.text,
@@ -8536,14 +8534,13 @@ const ar = {
8536
8534
  };
8537
8535
  function Xy({ listBlock: t, modifyList: e, fontFamily: n }) {
8538
8536
  return /* @__PURE__ */ R.jsx(
8539
- "input",
8537
+ "textarea",
8540
8538
  {
8541
8539
  style: {
8542
8540
  ...ar,
8543
8541
  borderBottom: "1px solid #232323",
8544
8542
  fontFamily: n || ar.fontFamily
8545
8543
  },
8546
- type: "text",
8547
8544
  placeholder: "separate items using comma",
8548
8545
  autoFocus: !0,
8549
8546
  value: t.data.items.join(","),
@@ -8579,14 +8576,13 @@ const sr = {
8579
8576
  };
8580
8577
  function Qy({ quoteBlock: t, modifyQuote: e, fontFamily: n }) {
8581
8578
  return /* @__PURE__ */ R.jsx(
8582
- "input",
8579
+ "textarea",
8583
8580
  {
8584
8581
  style: {
8585
8582
  ...sr,
8586
8583
  borderBottom: "1px solid #232323",
8587
8584
  fontFamily: n || sr.fontFamily
8588
8585
  },
8589
- type: "text",
8590
8586
  placeholder: "Quote...",
8591
8587
  autoFocus: !0,
8592
8588
  value: t.data.text,
@@ -8641,9 +8637,8 @@ function Jy({ tableBlock: t, modifyTable: e, fontFamily: n }) {
8641
8637
  padding: "8px"
8642
8638
  },
8643
8639
  children: /* @__PURE__ */ R.jsx(
8644
- "input",
8640
+ "textarea",
8645
8641
  {
8646
- type: "text",
8647
8642
  placeholder: `Col ${s + 1}`,
8648
8643
  style: {
8649
8644
  border: "none",
@@ -8679,9 +8674,8 @@ function Jy({ tableBlock: t, modifyTable: e, fontFamily: n }) {
8679
8674
  padding: "8px"
8680
8675
  },
8681
8676
  children: /* @__PURE__ */ R.jsx(
8682
- "input",
8677
+ "textarea",
8683
8678
  {
8684
- type: "text",
8685
8679
  style: {
8686
8680
  border: "none",
8687
8681
  borderBottom: "1px solid #3b82f6",
@@ -8763,7 +8757,7 @@ function tv({ tableBlock: t, fontFamily: e }) {
8763
8757
  );
8764
8758
  }
8765
8759
  function ev({ handleClick: t }) {
8766
- const [e, n] = nt(!1), [r, i] = nt(0), [a, s] = nt(0), [o, c] = nt({ rows: 2, cols: 2 }), [d, l] = nt(!1), u = 10, f = {
8760
+ const [e, n] = et(!1), [r, i] = et(0), [a, s] = et(0), [o, c] = et({ rows: 2, cols: 2 }), [d, l] = et(!1), u = 10, f = {
8767
8761
  position: "absolute",
8768
8762
  transform: "translateX(-40px) translateY(10px)",
8769
8763
  backgroundColor: "white",
@@ -8793,7 +8787,7 @@ function ev({ handleClick: t }) {
8793
8787
  color: "#3b82f6",
8794
8788
  cursor: "pointer"
8795
8789
  };
8796
- kt(() => {
8790
+ It(() => {
8797
8791
  r < 0 && i(0), a < 0 && s(0), c({ rows: r, cols: a });
8798
8792
  }, [r, a]);
8799
8793
  const b = () => {
@@ -9870,117 +9864,117 @@ const Nt = (function() {
9870
9864
  const F = M[0], C = M[1], O = M[2], x = M[3], g = M[4], _ = M[5];
9871
9865
  let j = 6, U = 8, D = 255;
9872
9866
  for (var N = 0; N < p.length; N++) {
9873
- const gt = new Uint8Array(p[N]);
9874
- for (var $ = gt.length, B = 0; B < $; B += 4) D &= gt[B + 3];
9867
+ const vt = new Uint8Array(p[N]);
9868
+ for (var $ = vt.length, B = 0; B < $; B += 4) D &= vt[B + 3];
9875
9869
  }
9876
- const V = D != 255, K = (function(it, rt, ct, yt, et, It) {
9877
- const dt = [];
9878
- for (var at = 0; at < it.length; at++) {
9879
- const Tt = new Uint8Array(it[at]), _t = new Uint32Array(Tt.buffer);
9870
+ const V = D != 255, K = (function(rt, nt, pt, dt, ct, it) {
9871
+ const ht = [];
9872
+ for (var at = 0; at < rt.length; at++) {
9873
+ const Pt = new Uint8Array(rt[at]), _t = new Uint32Array(Pt.buffer);
9880
9874
  var Mt;
9881
- let Ft = 0, qt = 0, Wt = rt, ge = ct, Sr = yt ? 1 : 0;
9875
+ let Ft = 0, qt = 0, Wt = nt, ge = pt, Sr = dt ? 1 : 0;
9882
9876
  if (at != 0) {
9883
- const ju = It || yt || at == 1 || dt[at - 2].dispose != 0 ? 1 : 2;
9877
+ const ju = it || dt || at == 1 || ht[at - 2].dispose != 0 ? 1 : 2;
9884
9878
  let Tr = 0, Ea = 1e9;
9885
9879
  for (let tn = 0; tn < ju; tn++) {
9886
- var ae = new Uint8Array(it[at - 1 - tn]);
9887
- const Lu = new Uint32Array(it[at - 1 - tn]);
9888
- let se = rt, oe = ct, Me = -1, en = -1;
9889
- for (let ye = 0; ye < ct; ye++) for (let ve = 0; ve < rt; ve++)
9890
- _t[xt = ye * rt + ve] != Lu[xt] && (ve < se && (se = ve), ve > Me && (Me = ve), ye < oe && (oe = ye), ye > en && (en = ye));
9891
- Me == -1 && (se = oe = Me = en = 0), et && ((1 & se) == 1 && se--, (1 & oe) == 1 && oe--);
9880
+ var ae = new Uint8Array(rt[at - 1 - tn]);
9881
+ const Lu = new Uint32Array(rt[at - 1 - tn]);
9882
+ let se = nt, oe = pt, Me = -1, en = -1;
9883
+ for (let ye = 0; ye < pt; ye++) for (let ve = 0; ve < nt; ve++)
9884
+ _t[wt = ye * nt + ve] != Lu[wt] && (ve < se && (se = ve), ve > Me && (Me = ve), ye < oe && (oe = ye), ye > en && (en = ye));
9885
+ Me == -1 && (se = oe = Me = en = 0), ct && ((1 & se) == 1 && se--, (1 & oe) == 1 && oe--);
9892
9886
  const ka = (Me - se + 1) * (en - oe + 1);
9893
9887
  ka < Ea && (Ea = ka, Tr = tn, Ft = se, qt = oe, Wt = Me - se + 1, ge = en - oe + 1);
9894
9888
  }
9895
- ae = new Uint8Array(it[at - 1 - Tr]), Tr == 1 && (dt[at - 1].dispose = 2), Mt = new Uint8Array(Wt * ge * 4), t(ae, rt, ct, Mt, Wt, ge, -Ft, -qt, 0), Sr = t(Tt, rt, ct, Mt, Wt, ge, -Ft, -qt, 3) ? 1 : 0, Sr == 1 ? f(Tt, rt, ct, Mt, { x: Ft, y: qt, width: Wt, height: ge }) : t(Tt, rt, ct, Mt, Wt, ge, -Ft, -qt, 0);
9896
- } else Mt = Tt.slice(0);
9897
- dt.push({ rect: { x: Ft, y: qt, width: Wt, height: ge }, img: Mt, blend: Sr, dispose: 0 });
9889
+ ae = new Uint8Array(rt[at - 1 - Tr]), Tr == 1 && (ht[at - 1].dispose = 2), Mt = new Uint8Array(Wt * ge * 4), t(ae, nt, pt, Mt, Wt, ge, -Ft, -qt, 0), Sr = t(Pt, nt, pt, Mt, Wt, ge, -Ft, -qt, 3) ? 1 : 0, Sr == 1 ? f(Pt, nt, pt, Mt, { x: Ft, y: qt, width: Wt, height: ge }) : t(Pt, nt, pt, Mt, Wt, ge, -Ft, -qt, 0);
9890
+ } else Mt = Pt.slice(0);
9891
+ ht.push({ rect: { x: Ft, y: qt, width: Wt, height: ge }, img: Mt, blend: Sr, dispose: 0 });
9898
9892
  }
9899
- if (yt) for (at = 0; at < dt.length; at++) {
9900
- if ((pe = dt[at]).blend == 1) continue;
9901
- const Tt = pe.rect, _t = dt[at - 1].rect, Ft = Math.min(Tt.x, _t.x), qt = Math.min(Tt.y, _t.y), Wt = { x: Ft, y: qt, width: Math.max(Tt.x + Tt.width, _t.x + _t.width) - Ft, height: Math.max(Tt.y + Tt.height, _t.y + _t.height) - qt };
9902
- dt[at - 1].dispose = 1, at - 1 != 0 && u(it, rt, ct, dt, at - 1, Wt, et), u(it, rt, ct, dt, at, Wt, et);
9893
+ if (dt) for (at = 0; at < ht.length; at++) {
9894
+ if ((pe = ht[at]).blend == 1) continue;
9895
+ const Pt = pe.rect, _t = ht[at - 1].rect, Ft = Math.min(Pt.x, _t.x), qt = Math.min(Pt.y, _t.y), Wt = { x: Ft, y: qt, width: Math.max(Pt.x + Pt.width, _t.x + _t.width) - Ft, height: Math.max(Pt.y + Pt.height, _t.y + _t.height) - qt };
9896
+ ht[at - 1].dispose = 1, at - 1 != 0 && u(rt, nt, pt, ht, at - 1, Wt, ct), u(rt, nt, pt, ht, at, Wt, ct);
9903
9897
  }
9904
9898
  let In = 0;
9905
- if (it.length != 1) for (var xt = 0; xt < dt.length; xt++) {
9899
+ if (rt.length != 1) for (var wt = 0; wt < ht.length; wt++) {
9906
9900
  var pe;
9907
- In += (pe = dt[xt]).rect.width * pe.rect.height;
9901
+ In += (pe = ht[wt]).rect.width * pe.rect.height;
9908
9902
  }
9909
- return dt;
9903
+ return ht;
9910
9904
  })(p, y, T, F, C, O), q = {}, J = [], tt = [];
9911
9905
  if (I != 0) {
9912
- const gt = [];
9913
- for (B = 0; B < K.length; B++) gt.push(K[B].img.buffer);
9914
- const it = (function(et) {
9915
- let It = 0;
9916
- for (var dt = 0; dt < et.length; dt++) It += et[dt].byteLength;
9917
- const at = new Uint8Array(It);
9906
+ const vt = [];
9907
+ for (B = 0; B < K.length; B++) vt.push(K[B].img.buffer);
9908
+ const rt = (function(ct) {
9909
+ let it = 0;
9910
+ for (var ht = 0; ht < ct.length; ht++) it += ct[ht].byteLength;
9911
+ const at = new Uint8Array(it);
9918
9912
  let Mt = 0;
9919
- for (dt = 0; dt < et.length; dt++) {
9920
- const ae = new Uint8Array(et[dt]), In = ae.length;
9921
- for (let xt = 0; xt < In; xt += 4) {
9922
- let pe = ae[xt], Tt = ae[xt + 1], _t = ae[xt + 2];
9923
- const Ft = ae[xt + 3];
9924
- Ft == 0 && (pe = Tt = _t = 0), at[Mt + xt] = pe, at[Mt + xt + 1] = Tt, at[Mt + xt + 2] = _t, at[Mt + xt + 3] = Ft;
9913
+ for (ht = 0; ht < ct.length; ht++) {
9914
+ const ae = new Uint8Array(ct[ht]), In = ae.length;
9915
+ for (let wt = 0; wt < In; wt += 4) {
9916
+ let pe = ae[wt], Pt = ae[wt + 1], _t = ae[wt + 2];
9917
+ const Ft = ae[wt + 3];
9918
+ Ft == 0 && (pe = Pt = _t = 0), at[Mt + wt] = pe, at[Mt + wt + 1] = Pt, at[Mt + wt + 2] = _t, at[Mt + wt + 3] = Ft;
9925
9919
  }
9926
9920
  Mt += In;
9927
9921
  }
9928
9922
  return at.buffer;
9929
- })(gt), rt = b(it, I);
9930
- for (B = 0; B < rt.plte.length; B++) J.push(rt.plte[B].est.rgba);
9931
- let ct = 0;
9923
+ })(vt), nt = b(rt, I);
9924
+ for (B = 0; B < nt.plte.length; B++) J.push(nt.plte[B].est.rgba);
9925
+ let pt = 0;
9932
9926
  for (B = 0; B < K.length; B++) {
9933
- const yt = (Y = K[B]).img.length;
9934
- var W = new Uint8Array(rt.inds.buffer, ct >> 2, yt >> 2);
9927
+ const dt = (Y = K[B]).img.length;
9928
+ var W = new Uint8Array(nt.inds.buffer, pt >> 2, dt >> 2);
9935
9929
  tt.push(W);
9936
- const et = new Uint8Array(rt.abuf, ct, yt);
9937
- _ && o(Y.img, Y.rect.width, Y.rect.height, J, et, W), Y.img.set(et), ct += yt;
9930
+ const ct = new Uint8Array(nt.abuf, pt, dt);
9931
+ _ && o(Y.img, Y.rect.width, Y.rect.height, J, ct, W), Y.img.set(ct), pt += dt;
9938
9932
  }
9939
9933
  } else for (N = 0; N < K.length; N++) {
9940
9934
  var Y = K[N];
9941
- const gt = new Uint32Array(Y.img.buffer);
9935
+ const vt = new Uint32Array(Y.img.buffer);
9942
9936
  var H = Y.rect.width;
9943
- for ($ = gt.length, W = new Uint8Array($), tt.push(W), B = 0; B < $; B++) {
9944
- const it = gt[B];
9945
- if (B != 0 && it == gt[B - 1]) W[B] = W[B - 1];
9946
- else if (B > H && it == gt[B - H]) W[B] = W[B - H];
9937
+ for ($ = vt.length, W = new Uint8Array($), tt.push(W), B = 0; B < $; B++) {
9938
+ const rt = vt[B];
9939
+ if (B != 0 && rt == vt[B - 1]) W[B] = W[B - 1];
9940
+ else if (B > H && rt == vt[B - H]) W[B] = W[B - H];
9947
9941
  else {
9948
- let rt = q[it];
9949
- if (rt == null && (q[it] = rt = J.length, J.push(it), J.length >= 300)) break;
9950
- W[B] = rt;
9942
+ let nt = q[rt];
9943
+ if (nt == null && (q[rt] = nt = J.length, J.push(rt), J.length >= 300)) break;
9944
+ W[B] = nt;
9951
9945
  }
9952
9946
  }
9953
9947
  }
9954
9948
  const Z = J.length;
9955
9949
  for (Z <= 256 && g == 0 && (U = Z <= 2 ? 1 : Z <= 4 ? 2 : Z <= 16 ? 4 : 8, U = Math.max(U, x)), N = 0; N < K.length; N++) {
9956
9950
  (Y = K[N]).rect.x, Y.rect.y, H = Y.rect.width;
9957
- const gt = Y.rect.height;
9958
- let it = Y.img;
9959
- new Uint32Array(it.buffer);
9960
- let rt = 4 * H, ct = 4;
9951
+ const vt = Y.rect.height;
9952
+ let rt = Y.img;
9953
+ new Uint32Array(rt.buffer);
9954
+ let nt = 4 * H, pt = 4;
9961
9955
  if (Z <= 256 && g == 0) {
9962
- rt = Math.ceil(U * H / 8);
9963
- var pt = new Uint8Array(rt * gt);
9964
- const yt = tt[N];
9965
- for (let et = 0; et < gt; et++) {
9966
- B = et * rt;
9967
- const It = et * H;
9968
- if (U == 8) for (var ot = 0; ot < H; ot++) pt[B + ot] = yt[It + ot];
9969
- else if (U == 4) for (ot = 0; ot < H; ot++) pt[B + (ot >> 1)] |= yt[It + ot] << 4 - 4 * (1 & ot);
9970
- else if (U == 2) for (ot = 0; ot < H; ot++) pt[B + (ot >> 2)] |= yt[It + ot] << 6 - 2 * (3 & ot);
9971
- else if (U == 1) for (ot = 0; ot < H; ot++) pt[B + (ot >> 3)] |= yt[It + ot] << 7 - 1 * (7 & ot);
9956
+ nt = Math.ceil(U * H / 8);
9957
+ var yt = new Uint8Array(nt * vt);
9958
+ const dt = tt[N];
9959
+ for (let ct = 0; ct < vt; ct++) {
9960
+ B = ct * nt;
9961
+ const it = ct * H;
9962
+ if (U == 8) for (var ot = 0; ot < H; ot++) yt[B + ot] = dt[it + ot];
9963
+ else if (U == 4) for (ot = 0; ot < H; ot++) yt[B + (ot >> 1)] |= dt[it + ot] << 4 - 4 * (1 & ot);
9964
+ else if (U == 2) for (ot = 0; ot < H; ot++) yt[B + (ot >> 2)] |= dt[it + ot] << 6 - 2 * (3 & ot);
9965
+ else if (U == 1) for (ot = 0; ot < H; ot++) yt[B + (ot >> 3)] |= dt[it + ot] << 7 - 1 * (7 & ot);
9972
9966
  }
9973
- it = pt, j = 3, ct = 1;
9967
+ rt = yt, j = 3, pt = 1;
9974
9968
  } else if (V == 0 && K.length == 1) {
9975
- pt = new Uint8Array(H * gt * 3);
9976
- const yt = H * gt;
9977
- for (B = 0; B < yt; B++) {
9978
- const et = 3 * B, It = 4 * B;
9979
- pt[et] = it[It], pt[et + 1] = it[It + 1], pt[et + 2] = it[It + 2];
9969
+ yt = new Uint8Array(H * vt * 3);
9970
+ const dt = H * vt;
9971
+ for (B = 0; B < dt; B++) {
9972
+ const ct = 3 * B, it = 4 * B;
9973
+ yt[ct] = rt[it], yt[ct + 1] = rt[it + 1], yt[ct + 2] = rt[it + 2];
9980
9974
  }
9981
- it = pt, j = 2, ct = 3, rt = 3 * H;
9975
+ rt = yt, j = 2, pt = 3, nt = 3 * H;
9982
9976
  }
9983
- Y.img = it, Y.bpl = rt, Y.bpp = ct;
9977
+ Y.img = rt, Y.bpl = nt, Y.bpp = pt;
9984
9978
  }
9985
9979
  return { ctype: j, depth: U, plte: J, frames: K };
9986
9980
  }
@@ -10153,7 +10147,7 @@ const xu = { toArrayBuffer(t, e) {
10153
10147
  e(new Blob([n], { type: "image/bmp" }));
10154
10148
  }));
10155
10149
  }, _dly: 9 };
10156
- var Ct = { CHROME: "CHROME", FIREFOX: "FIREFOX", DESKTOP_SAFARI: "DESKTOP_SAFARI", IE: "IE", IOS: "IOS", ETC: "ETC" }, sv = { [Ct.CHROME]: 16384, [Ct.FIREFOX]: 11180, [Ct.DESKTOP_SAFARI]: 16384, [Ct.IE]: 8192, [Ct.IOS]: 4096, [Ct.ETC]: 8192 };
10150
+ var Et = { CHROME: "CHROME", FIREFOX: "FIREFOX", DESKTOP_SAFARI: "DESKTOP_SAFARI", IE: "IE", IOS: "IOS", ETC: "ETC" }, sv = { [Et.CHROME]: 16384, [Et.FIREFOX]: 11180, [Et.DESKTOP_SAFARI]: 16384, [Et.IE]: 8192, [Et.IOS]: 4096, [Et.ETC]: 8192 };
10157
10151
  const Pa = typeof window < "u", wu = typeof WorkerGlobalScope < "u" && self instanceof WorkerGlobalScope, lr = Pa && window.cordova && window.cordova.require && window.cordova.require("cordova/modulemapper"), ov = (Pa || wu) && (lr && lr.getOriginalSymbol(window, "File") || typeof File < "u" && File), Au = (Pa || wu) && (lr && lr.getOriginalSymbol(window, "FileReader") || typeof FileReader < "u" && FileReader);
10158
10152
  function Ca(t, e, n = Date.now()) {
10159
10153
  return new Promise(((r) => {
@@ -10179,9 +10173,9 @@ function Tu(t) {
10179
10173
  }
10180
10174
  function Te() {
10181
10175
  if (Te.cachedResult !== void 0) return Te.cachedResult;
10182
- let t = Ct.ETC;
10176
+ let t = Et.ETC;
10183
10177
  const { userAgent: e } = navigator;
10184
- return /Chrom(e|ium)/i.test(e) ? t = Ct.CHROME : /iP(ad|od|hone)/i.test(e) && /WebKit/i.test(e) ? t = Ct.IOS : /Safari/i.test(e) ? t = Ct.DESKTOP_SAFARI : /Firefox/i.test(e) ? t = Ct.FIREFOX : (/MSIE/i.test(e) || document.documentMode) && (t = Ct.IE), Te.cachedResult = t, Te.cachedResult;
10178
+ return /Chrom(e|ium)/i.test(e) ? t = Et.CHROME : /iP(ad|od|hone)/i.test(e) && /WebKit/i.test(e) ? t = Et.IOS : /Safari/i.test(e) ? t = Et.DESKTOP_SAFARI : /Firefox/i.test(e) ? t = Et.FIREFOX : (/MSIE/i.test(e) || document.documentMode) && (t = Et.IE), Te.cachedResult = t, Te.cachedResult;
10185
10179
  }
10186
10180
  function Pu(t, e) {
10187
10181
  const n = Te(), r = sv[n];
@@ -10256,7 +10250,7 @@ function cr(t, e = {}) {
10256
10250
  }
10257
10251
  };
10258
10252
  try {
10259
- if (Yn() || [Ct.DESKTOP_SAFARI, Ct.MOBILE_SAFARI].includes(Te())) throw new Error("Skip createImageBitmap on IOS and Safari");
10253
+ if (Yn() || [Et.DESKTOP_SAFARI, Et.MOBILE_SAFARI].includes(Te())) throw new Error("Skip createImageBitmap on IOS and Safari");
10260
10254
  return createImageBitmap(t).then((function(c) {
10261
10255
  try {
10262
10256
  return i = c, s();
@@ -10527,7 +10521,7 @@ function cv(t, e) {
10527
10521
  })), i.postMessage({ file: t, imageCompressionLibUrl: e.libURL, options: { ...e, onProgress: void 0, signal: void 0 } });
10528
10522
  }));
10529
10523
  }
10530
- function wt(t, e) {
10524
+ function At(t, e) {
10531
10525
  return new Promise((function(n, r) {
10532
10526
  let i, a, s, o, c, d;
10533
10527
  if (i = { ...e }, s = 0, { onProgress: o } = i, i.maxSizeMB = i.maxSizeMB || Number.POSITIVE_INFINITY, c = typeof i.useWebWorker != "boolean" || i.useWebWorker, delete i.useWebWorker, i.onProgress = (h) => {
@@ -10584,7 +10578,7 @@ function wt(t, e) {
10584
10578
  }
10585
10579
  }));
10586
10580
  }
10587
- wt.getDataUrlFromFile = Su, wt.getFilefromDataUrl = Ca, wt.loadImage = Tu, wt.drawImageInCanvas = Cu, wt.drawFileInCanvas = cr, wt.canvasToFile = ur, wt.getExifOrientation = Eu, wt.handleMaxWidthOrHeight = ku, wt.followExifOrientation = Iu, wt.cleanupCanvasMemory = Ht, wt.isAutoOrientationInBrowser = Be, wt.approximateBelowMaximumCanvasSizeOfBrowser = Pu, wt.copyExifWithoutOrientation = bu, wt.getBrowserName = Te, wt.version = "2.0.2";
10581
+ At.getDataUrlFromFile = Su, At.getFilefromDataUrl = Ca, At.loadImage = Tu, At.drawImageInCanvas = Cu, At.drawFileInCanvas = cr, At.canvasToFile = ur, At.getExifOrientation = Eu, At.handleMaxWidthOrHeight = ku, At.followExifOrientation = Iu, At.cleanupCanvasMemory = Ht, At.isAutoOrientationInBrowser = Be, At.approximateBelowMaximumCanvasSizeOfBrowser = Pu, At.copyExifWithoutOrientation = bu, At.getBrowserName = Te, At.version = "2.0.2";
10588
10582
  const Mu = (t) => {
10589
10583
  if (!t || typeof t != "string") return "unknown";
10590
10584
  const e = [
@@ -10620,7 +10614,7 @@ async function Ru(t, e, n) {
10620
10614
  };
10621
10615
  try {
10622
10616
  e(!0);
10623
- const i = await wt(t, r);
10617
+ const i = await At(t, r);
10624
10618
  return i instanceof File ? i : new File([i], t.name, { type: t.type });
10625
10619
  } catch (i) {
10626
10620
  return console.error("Compression failed; using original file:", i), t;
@@ -10681,12 +10675,12 @@ function mv({ progress: t = null }) {
10681
10675
  ) });
10682
10676
  }
10683
10677
  function Mo({ mediaBlock: t, modifyMedia: e }) {
10684
- const [n, r] = nt(""), [i, a] = nt(""), [s, o] = nt(""), [c, d] = nt(""), [l, u] = nt(!1), [f, h] = nt(null), m = Gt(null);
10685
- kt(() => {
10678
+ const [n, r] = et(""), [i, a] = et(""), [s, o] = et(""), [c, d] = et(""), [l, u] = et(!1), [f, h] = et(null), m = Gt(null);
10679
+ It(() => {
10686
10680
  window.addEventListener("dragover", (w) => w.preventDefault()), window.addEventListener("drop", (w) => w.preventDefault());
10687
- }, []), kt(() => {
10681
+ }, []), It(() => {
10688
10682
  r("To remove image or video component, refresh first."), t.data.src !== "" && (a(t.data.src), o(t.type));
10689
- }, [t.data.src, t.type]), kt(() => {
10683
+ }, [t.data.src, t.type]), It(() => {
10690
10684
  if (i && i instanceof File) {
10691
10685
  const w = URL.createObjectURL(i);
10692
10686
  t.type === "image" ? e({
@@ -10809,8 +10803,8 @@ const ze = {
10809
10803
  background: "transparent"
10810
10804
  };
10811
10805
  function yv({ linkBlock: t, modifyLink: e, fontFamily: n }) {
10812
- const [r, i] = nt(t.data.linkText), [a, s] = nt(t.data.url);
10813
- return kt(() => {
10806
+ const [r, i] = et(t.data.linkText), [a, s] = et(t.data.url);
10807
+ return It(() => {
10814
10808
  e({ linkBlockId: t.id, linkText: r, url: a });
10815
10809
  }, [r, a, t.id]), /* @__PURE__ */ R.jsxs("div", { style: { display: "flex" }, children: [
10816
10810
  /* @__PURE__ */ R.jsx(
@@ -10991,7 +10985,7 @@ function wv({
10991
10985
  }
10992
10986
  }
10993
10987
  function ln({ text: t, children: e }) {
10994
- const [n, r] = nt(!1), i = {
10988
+ const [n, r] = et(!1), i = {
10995
10989
  position: "relative",
10996
10990
  display: "inline-block"
10997
10991
  }, a = {
@@ -11044,7 +11038,7 @@ const Ro = [
11044
11038
  { id: 13, type: "custom-3", iconText: "C3" }
11045
11039
  ];
11046
11040
  function Av({ handleClick: t, options: e, fontFamily: n }) {
11047
- const [r, i] = nt(null), a = (c, d) => {
11041
+ const [r, i] = et(null), a = (c, d) => {
11048
11042
  i(c), t(d);
11049
11043
  }, s = e.map((c) => {
11050
11044
  if (c.includes("-")) {
@@ -11188,10 +11182,10 @@ function Tv({
11188
11182
  setPromptAction: i,
11189
11183
  handleCopy: a
11190
11184
  }) {
11191
- const [s, o] = nt(!1), [c, d] = nt(null), l = Gt(null);
11192
- kt(() => {
11185
+ const [s, o] = et(!1), [c, d] = et(null), l = Gt(null);
11186
+ It(() => {
11193
11187
  l.current && (l.current.style.transform = t === "editor" ? "translateX(14px)" : "translateX(1px)");
11194
- }, [t]), kt(() => {
11188
+ }, [t]), It(() => {
11195
11189
  if (s) {
11196
11190
  const m = setTimeout(() => o(!1), 3e3);
11197
11191
  return () => clearTimeout(m);
@@ -11320,7 +11314,7 @@ function Tv({
11320
11314
  );
11321
11315
  }
11322
11316
  function Pv() {
11323
- const [t, e] = nt(!1), n = {
11317
+ const [t, e] = et(!1), n = {
11324
11318
  display: "flex",
11325
11319
  flexDirection: "column",
11326
11320
  justifyContent: "center",
@@ -11390,7 +11384,7 @@ function Ev({
11390
11384
  handlePromptAction: o,
11391
11385
  setPromptVisiblility: c
11392
11386
  }) {
11393
- const [d, l] = nt(null), u = {
11387
+ const [d, l] = et(null), u = {
11394
11388
  width: "100%",
11395
11389
  boxSizing: "border-box",
11396
11390
  border: "1px solid #d1d5db",
@@ -11494,10 +11488,10 @@ function kv({
11494
11488
  defaultCustomData3: i,
11495
11489
  localStorageEnable: a
11496
11490
  }) {
11497
- const [s, o] = nt(
11491
+ const [s, o] = et(
11498
11492
  Mn(t).blocks
11499
- ), [c, d] = nt(""), [l, u] = nt(""), [f, h] = nt(""), [m, b] = nt([]), [w, v] = nt("editor"), [k, S] = nt(!1), [E, P] = nt("");
11500
- kt(() => {
11493
+ ), [c, d] = et(""), [l, u] = et(""), [f, h] = et(""), [m, b] = et([]), [w, v] = et("editor"), [k, S] = et(!1), [E, P] = et("");
11494
+ It(() => {
11501
11495
  if (!Array.isArray(s))
11502
11496
  throw new Error(
11503
11497
  "DraftifyReact: blocksData must be an array of DraftifyBlock[]"
@@ -11512,13 +11506,13 @@ function kv({
11512
11506
  o(Mn(s));
11513
11507
  else
11514
11508
  o(Mn(s));
11515
- }, []), kt(() => {
11509
+ }, []), It(() => {
11516
11510
  a && (async (Y) => {
11517
11511
  const H = await Promise.all(
11518
11512
  Y.map(async (Z) => {
11519
11513
  if (Z.type === "image" && Z.file) {
11520
- const pt = await $u(Z);
11521
- return { ...Z, content: pt, file: void 0 };
11514
+ const yt = await $u(Z);
11515
+ return { ...Z, content: yt, file: void 0 };
11522
11516
  }
11523
11517
  return Z;
11524
11518
  })
@@ -11531,7 +11525,7 @@ function kv({
11531
11525
  })
11532
11526
  );
11533
11527
  })(s);
11534
- }, [s, t]), kt(() => {
11528
+ }, [s, t]), It(() => {
11535
11529
  e(
11536
11530
  (W) => Ia({
11537
11531
  ...W,
@@ -11622,7 +11616,7 @@ function kv({
11622
11616
  o((H) => Xu(H, W, Y));
11623
11617
  }, C = ({ imageBlockId: W, src: Y, alt: H, caption: Z }) => {
11624
11618
  o(
11625
- (pt) => Ku(pt, W, Y, H, Z)
11619
+ (yt) => Ku(yt, W, Y, H, Z)
11626
11620
  );
11627
11621
  }, O = ({ videoBlockId: W, src: Y, provider: H }) => {
11628
11622
  o((Z) => Gu(Z, W, Y, H));
@@ -11637,8 +11631,8 @@ function kv({
11637
11631
  (Y.type === "image" || Y.type === "video") && Y.data.src !== "" || o((H) => H.filter((Z) => Z.id !== W));
11638
11632
  }, U = (W, Y) => {
11639
11633
  o((H) => {
11640
- const Z = [...H], [pt] = Z.splice(W, 1);
11641
- return Z.splice(Y, 0, pt), Z;
11634
+ const Z = [...H], [yt] = Z.splice(W, 1);
11635
+ return Z.splice(Y, 0, yt), Z;
11642
11636
  });
11643
11637
  };
11644
11638
  return {
@@ -11723,7 +11717,7 @@ function kv({
11723
11717
  };
11724
11718
  }
11725
11719
  function Iv(t) {
11726
- kt(() => {
11720
+ It(() => {
11727
11721
  function e() {
11728
11722
  const r = Math.ceil(window.innerWidth / 20), i = Math.ceil(document.documentElement.scrollHeight / 20), a = [];
11729
11723
  for (let s = 0; s < i; s++)
@@ -11874,32 +11868,34 @@ function Qv({
11874
11868
  setPromptAction: C,
11875
11869
  promptVisibility: O,
11876
11870
  setPromptVisiblility: x,
11871
+ // blocks data
11872
+ blocksData: g,
11877
11873
  // block creator
11878
- handleClick: g,
11874
+ handleClick: _,
11879
11875
  // block modifiers
11880
- modifyHeading: _,
11881
- modifySubheading: j,
11882
- modifyParagraph: U,
11883
- modifyQuote: D,
11884
- modifyList: N,
11885
- modifyTable: $,
11886
- modifyImage: B,
11887
- modifyVideo: V,
11888
- modifyLink: K,
11889
- modifyCode: q,
11890
- modifyCustom: J,
11876
+ modifyHeading: j,
11877
+ modifySubheading: U,
11878
+ modifyParagraph: D,
11879
+ modifyQuote: N,
11880
+ modifyList: $,
11881
+ modifyTable: B,
11882
+ modifyImage: V,
11883
+ modifyVideo: K,
11884
+ modifyLink: q,
11885
+ modifyCode: J,
11886
+ modifyCustom: tt,
11891
11887
  // drag and drop handlers
11892
- onDropHandler: tt,
11893
- onDragStart: W,
11894
- onDragEnd: Y,
11895
- onDragEnter: H,
11896
- onDragLeave: Z,
11897
- containerVariants: pt,
11898
- itemVariants: ot,
11899
- transitions: gt,
11900
- whileHover: it,
11888
+ onDropHandler: W,
11889
+ onDragStart: Y,
11890
+ onDragEnd: H,
11891
+ onDragEnter: Z,
11892
+ onDragLeave: yt,
11893
+ containerVariants: ot,
11894
+ itemVariants: vt,
11895
+ transitions: rt,
11896
+ whileHover: nt,
11901
11897
  // block delete
11902
- handleDelete: rt
11898
+ handleDelete: pt
11903
11899
  } = kv({
11904
11900
  draftifyDoc: t,
11905
11901
  setDoc: e,
@@ -11946,28 +11942,28 @@ function Qv({
11946
11942
  ),
11947
11943
  v === "editor" && // Input View
11948
11944
  /* @__PURE__ */ R.jsxs(R.Fragment, { children: [
11949
- /* @__PURE__ */ R.jsx(Av, { handleClick: g, options: n }),
11950
- /* @__PURE__ */ R.jsx("div", { className: "editor-area", onSubmit: (ct) => ct.preventDefault(), children: /* @__PURE__ */ R.jsx(
11945
+ /* @__PURE__ */ R.jsx(Av, { handleClick: _, options: n }),
11946
+ /* @__PURE__ */ R.jsx("div", { className: "editor-area", onSubmit: (dt) => dt.preventDefault(), children: /* @__PURE__ */ R.jsx(
11951
11947
  Ks.div,
11952
11948
  {
11953
11949
  style: { display: "grid", gap: "10px" },
11954
- variants: pt,
11950
+ variants: ot,
11955
11951
  animate: "show",
11956
11952
  exit: "hidden",
11957
- children: /* @__PURE__ */ R.jsx(jh, { children: t.blocks.map((ct, yt) => /* @__PURE__ */ R.jsxs(
11953
+ children: /* @__PURE__ */ R.jsx(jh, { children: g.map((dt, ct) => /* @__PURE__ */ R.jsxs(
11958
11954
  Ks.div,
11959
11955
  {
11960
11956
  layout: !0,
11961
- variants: ot,
11962
- transition: gt,
11963
- whileHover: it,
11957
+ variants: vt,
11958
+ transition: rt,
11959
+ whileHover: nt,
11964
11960
  draggable: !0,
11965
- onDragStart: (et) => W(et, yt),
11966
- onDragEnd: (et) => Y(et),
11967
- onDragOver: (et) => et.preventDefault(),
11968
- onDragEnter: (et) => H(et),
11969
- onDragLeave: (et) => Z(et),
11970
- onDrop: (et) => tt(et, yt),
11961
+ onDragStart: (it) => Y(it, ct),
11962
+ onDragEnd: (it) => H(it),
11963
+ onDragOver: (it) => it.preventDefault(),
11964
+ onDragEnter: (it) => Z(it),
11965
+ onDragLeave: (it) => yt(it),
11966
+ onDrop: (it) => W(it, ct),
11971
11967
  className: "block-container",
11972
11968
  children: [
11973
11969
  /* @__PURE__ */ R.jsx(Pv, {}),
@@ -11975,18 +11971,18 @@ function Qv({
11975
11971
  wv,
11976
11972
  {
11977
11973
  fontFamily: b,
11978
- block: ct,
11979
- modifyHeading: _,
11980
- modifySubheading: j,
11981
- modifyParagraph: U,
11982
- modifyQuote: D,
11983
- modifyList: N,
11984
- modifyTable: $,
11985
- modifyImage: B,
11986
- modifyVideo: V,
11987
- modifyLink: K,
11988
- modifyCode: q,
11989
- modifyCustom: J,
11974
+ block: dt,
11975
+ modifyHeading: j,
11976
+ modifySubheading: U,
11977
+ modifyParagraph: D,
11978
+ modifyQuote: N,
11979
+ modifyList: $,
11980
+ modifyTable: B,
11981
+ modifyImage: V,
11982
+ modifyVideo: K,
11983
+ modifyLink: q,
11984
+ modifyCode: J,
11985
+ modifyCustom: tt,
11990
11986
  CustomEditor1: r,
11991
11987
  CustomEditor2: i,
11992
11988
  CustomEditor3: a
@@ -11997,12 +11993,12 @@ function Qv({
11997
11993
  {
11998
11994
  icon: ["fas", "trash"],
11999
11995
  className: "delete-icon",
12000
- onClick: () => rt(ct.id)
11996
+ onClick: () => pt(dt.id)
12001
11997
  }
12002
11998
  )
12003
11999
  ]
12004
12000
  },
12005
- ct.id
12001
+ dt.id
12006
12002
  )) })
12007
12003
  }
12008
12004
  ) })