draftify-react 0.3.1 → 0.3.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.
- package/dist/draftify-react.es.js +271 -269
- package/dist/draftify-react.umd.js +8 -8
- package/package.json +1 -1
|
@@ -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
|
|
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 :
|
|
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:
|
|
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
|
|
472
|
-
now: () => (Nn === void 0 &&
|
|
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
|
-
},
|
|
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 =
|
|
539
|
-
return e.alpha = 0,
|
|
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) => (
|
|
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 +=
|
|
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 :
|
|
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 :
|
|
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: () =>
|
|
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 !==
|
|
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(
|
|
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(
|
|
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 =
|
|
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 =
|
|
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:
|
|
1727
|
-
backgroundColor:
|
|
1728
|
-
outlineColor:
|
|
1729
|
-
fill:
|
|
1730
|
-
stroke:
|
|
1726
|
+
color: mt,
|
|
1727
|
+
backgroundColor: mt,
|
|
1728
|
+
outlineColor: mt,
|
|
1729
|
+
fill: mt,
|
|
1730
|
+
stroke: mt,
|
|
1731
1731
|
// Border props
|
|
1732
|
-
borderColor:
|
|
1733
|
-
borderTopColor:
|
|
1734
|
-
borderRightColor:
|
|
1735
|
-
borderBottomColor:
|
|
1736
|
-
borderLeftColor:
|
|
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 =
|
|
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 =
|
|
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 =
|
|
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
|
|
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 } =
|
|
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 =
|
|
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
|
-
|
|
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] =
|
|
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 } =
|
|
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,
|
|
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
|
-
!
|
|
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(() =>
|
|
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
|
|
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 =
|
|
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
|
-
(
|
|
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 (
|
|
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 } =
|
|
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 =
|
|
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
|
-
}),
|
|
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
|
-
...
|
|
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 =
|
|
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 =
|
|
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 }),
|
|
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 (
|
|
2931
|
+
if (Tt(i))
|
|
2932
2932
|
t.addValue(r, i);
|
|
2933
|
-
else if (
|
|
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 =
|
|
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 &&
|
|
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) :
|
|
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,
|
|
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 && !
|
|
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
|
-
|
|
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 =
|
|
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 !!(
|
|
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
|
|
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 =
|
|
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 +
|
|
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 +
|
|
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 } =
|
|
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 } =
|
|
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 =
|
|
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 =
|
|
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 =
|
|
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 =
|
|
4169
|
-
return R.jsx(vp, { ...t, layoutGroup: r, switchLayoutGroup:
|
|
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 =
|
|
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 =
|
|
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
|
|
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 =
|
|
4463
|
-
|
|
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 && !
|
|
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 =
|
|
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
|
|
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 =
|
|
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 =
|
|
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 =
|
|
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 =
|
|
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 !==
|
|
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 =
|
|
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 =
|
|
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 =
|
|
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 ===
|
|
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 =
|
|
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 =
|
|
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 =
|
|
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 ||
|
|
4690
|
-
const u =
|
|
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 =
|
|
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 =
|
|
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 =
|
|
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 =
|
|
4819
|
+
const h = gt();
|
|
4820
4820
|
Zn(h, e.layoutBox, u.layoutBox);
|
|
4821
|
-
const m =
|
|
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"],
|
|
5358
|
-
Br = {}, Q(Q(Q(Q(Q(Q(Q(Q(Q(Q(Br,
|
|
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[
|
|
5927
|
+
return r in n ? n[r] : n[xt];
|
|
5928
5928
|
}
|
|
5929
5929
|
});
|
|
5930
5930
|
}
|
|
5931
5931
|
var Hc = z({}, bc);
|
|
5932
|
-
Hc[
|
|
5932
|
+
Hc[xt] = z(z(z(z({}, {
|
|
5933
5933
|
"fa-duotone": "duotone"
|
|
5934
|
-
}), bc[
|
|
5934
|
+
}), bc[xt]), to.kit), to["kit-duotone"]);
|
|
5935
5935
|
var J1 = En(Hc), Ai = z({}, Y0);
|
|
5936
|
-
Ai[
|
|
5936
|
+
Ai[xt] = z(z(z(z({}, {
|
|
5937
5937
|
duotone: "fad"
|
|
5938
|
-
}), Ai[
|
|
5938
|
+
}), Ai[xt]), eo.kit), eo["kit-duotone"]);
|
|
5939
5939
|
var ro = En(Ai), Si = z({}, bi);
|
|
5940
|
-
Si[
|
|
5940
|
+
Si[xt] = z(z({}, Si[xt]), t1.kit);
|
|
5941
5941
|
var ya = En(Si), Ti = z({}, z1);
|
|
5942
|
-
Ti[
|
|
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:
|
|
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 =
|
|
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 ?
|
|
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 !==
|
|
6877
|
+
return t !== xt || t !== Cn;
|
|
6878
6878
|
}), Eg = Object.keys(bi).filter(function(t) {
|
|
6879
|
-
return t !==
|
|
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[
|
|
6908
|
+
var c = ya[xt][o];
|
|
6909
6909
|
c && Pi(c, s[o]), au();
|
|
6910
6910
|
});
|
|
6911
6911
|
}
|
|
@@ -8763,7 +8763,7 @@ function tv({ tableBlock: t, fontFamily: e }) {
|
|
|
8763
8763
|
);
|
|
8764
8764
|
}
|
|
8765
8765
|
function ev({ handleClick: t }) {
|
|
8766
|
-
const [e, n] =
|
|
8766
|
+
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
8767
|
position: "absolute",
|
|
8768
8768
|
transform: "translateX(-40px) translateY(10px)",
|
|
8769
8769
|
backgroundColor: "white",
|
|
@@ -8793,7 +8793,7 @@ function ev({ handleClick: t }) {
|
|
|
8793
8793
|
color: "#3b82f6",
|
|
8794
8794
|
cursor: "pointer"
|
|
8795
8795
|
};
|
|
8796
|
-
|
|
8796
|
+
It(() => {
|
|
8797
8797
|
r < 0 && i(0), a < 0 && s(0), c({ rows: r, cols: a });
|
|
8798
8798
|
}, [r, a]);
|
|
8799
8799
|
const b = () => {
|
|
@@ -9870,117 +9870,117 @@ const Nt = (function() {
|
|
|
9870
9870
|
const F = M[0], C = M[1], O = M[2], x = M[3], g = M[4], _ = M[5];
|
|
9871
9871
|
let j = 6, U = 8, D = 255;
|
|
9872
9872
|
for (var N = 0; N < p.length; N++) {
|
|
9873
|
-
const
|
|
9874
|
-
for (var $ =
|
|
9873
|
+
const vt = new Uint8Array(p[N]);
|
|
9874
|
+
for (var $ = vt.length, B = 0; B < $; B += 4) D &= vt[B + 3];
|
|
9875
9875
|
}
|
|
9876
|
-
const V = D != 255, K = (function(
|
|
9877
|
-
const
|
|
9878
|
-
for (var at = 0; at <
|
|
9879
|
-
const
|
|
9876
|
+
const V = D != 255, K = (function(rt, nt, pt, dt, ct, it) {
|
|
9877
|
+
const ht = [];
|
|
9878
|
+
for (var at = 0; at < rt.length; at++) {
|
|
9879
|
+
const Pt = new Uint8Array(rt[at]), _t = new Uint32Array(Pt.buffer);
|
|
9880
9880
|
var Mt;
|
|
9881
|
-
let Ft = 0, qt = 0, Wt =
|
|
9881
|
+
let Ft = 0, qt = 0, Wt = nt, ge = pt, Sr = dt ? 1 : 0;
|
|
9882
9882
|
if (at != 0) {
|
|
9883
|
-
const ju =
|
|
9883
|
+
const ju = it || dt || at == 1 || ht[at - 2].dispose != 0 ? 1 : 2;
|
|
9884
9884
|
let Tr = 0, Ea = 1e9;
|
|
9885
9885
|
for (let tn = 0; tn < ju; tn++) {
|
|
9886
|
-
var ae = new Uint8Array(
|
|
9887
|
-
const Lu = new Uint32Array(
|
|
9888
|
-
let se =
|
|
9889
|
-
for (let ye = 0; ye <
|
|
9890
|
-
_t[
|
|
9891
|
-
Me == -1 && (se = oe = Me = en = 0),
|
|
9886
|
+
var ae = new Uint8Array(rt[at - 1 - tn]);
|
|
9887
|
+
const Lu = new Uint32Array(rt[at - 1 - tn]);
|
|
9888
|
+
let se = nt, oe = pt, Me = -1, en = -1;
|
|
9889
|
+
for (let ye = 0; ye < pt; ye++) for (let ve = 0; ve < nt; ve++)
|
|
9890
|
+
_t[wt = ye * nt + ve] != Lu[wt] && (ve < se && (se = ve), ve > Me && (Me = ve), ye < oe && (oe = ye), ye > en && (en = ye));
|
|
9891
|
+
Me == -1 && (se = oe = Me = en = 0), ct && ((1 & se) == 1 && se--, (1 & oe) == 1 && oe--);
|
|
9892
9892
|
const ka = (Me - se + 1) * (en - oe + 1);
|
|
9893
9893
|
ka < Ea && (Ea = ka, Tr = tn, Ft = se, qt = oe, Wt = Me - se + 1, ge = en - oe + 1);
|
|
9894
9894
|
}
|
|
9895
|
-
ae = new Uint8Array(
|
|
9896
|
-
} else Mt =
|
|
9897
|
-
|
|
9895
|
+
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);
|
|
9896
|
+
} else Mt = Pt.slice(0);
|
|
9897
|
+
ht.push({ rect: { x: Ft, y: qt, width: Wt, height: ge }, img: Mt, blend: Sr, dispose: 0 });
|
|
9898
9898
|
}
|
|
9899
|
-
if (
|
|
9900
|
-
if ((pe =
|
|
9901
|
-
const
|
|
9902
|
-
|
|
9899
|
+
if (dt) for (at = 0; at < ht.length; at++) {
|
|
9900
|
+
if ((pe = ht[at]).blend == 1) continue;
|
|
9901
|
+
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 };
|
|
9902
|
+
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
9903
|
}
|
|
9904
9904
|
let In = 0;
|
|
9905
|
-
if (
|
|
9905
|
+
if (rt.length != 1) for (var wt = 0; wt < ht.length; wt++) {
|
|
9906
9906
|
var pe;
|
|
9907
|
-
In += (pe =
|
|
9907
|
+
In += (pe = ht[wt]).rect.width * pe.rect.height;
|
|
9908
9908
|
}
|
|
9909
|
-
return
|
|
9909
|
+
return ht;
|
|
9910
9910
|
})(p, y, T, F, C, O), q = {}, J = [], tt = [];
|
|
9911
9911
|
if (I != 0) {
|
|
9912
|
-
const
|
|
9913
|
-
for (B = 0; B < K.length; B++)
|
|
9914
|
-
const
|
|
9915
|
-
let
|
|
9916
|
-
for (var
|
|
9917
|
-
const at = new Uint8Array(
|
|
9912
|
+
const vt = [];
|
|
9913
|
+
for (B = 0; B < K.length; B++) vt.push(K[B].img.buffer);
|
|
9914
|
+
const rt = (function(ct) {
|
|
9915
|
+
let it = 0;
|
|
9916
|
+
for (var ht = 0; ht < ct.length; ht++) it += ct[ht].byteLength;
|
|
9917
|
+
const at = new Uint8Array(it);
|
|
9918
9918
|
let Mt = 0;
|
|
9919
|
-
for (
|
|
9920
|
-
const ae = new Uint8Array(
|
|
9921
|
-
for (let
|
|
9922
|
-
let pe = ae[
|
|
9923
|
-
const Ft = ae[
|
|
9924
|
-
Ft == 0 && (pe =
|
|
9919
|
+
for (ht = 0; ht < ct.length; ht++) {
|
|
9920
|
+
const ae = new Uint8Array(ct[ht]), In = ae.length;
|
|
9921
|
+
for (let wt = 0; wt < In; wt += 4) {
|
|
9922
|
+
let pe = ae[wt], Pt = ae[wt + 1], _t = ae[wt + 2];
|
|
9923
|
+
const Ft = ae[wt + 3];
|
|
9924
|
+
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
9925
|
}
|
|
9926
9926
|
Mt += In;
|
|
9927
9927
|
}
|
|
9928
9928
|
return at.buffer;
|
|
9929
|
-
})(
|
|
9930
|
-
for (B = 0; B <
|
|
9931
|
-
let
|
|
9929
|
+
})(vt), nt = b(rt, I);
|
|
9930
|
+
for (B = 0; B < nt.plte.length; B++) J.push(nt.plte[B].est.rgba);
|
|
9931
|
+
let pt = 0;
|
|
9932
9932
|
for (B = 0; B < K.length; B++) {
|
|
9933
|
-
const
|
|
9934
|
-
var W = new Uint8Array(
|
|
9933
|
+
const dt = (Y = K[B]).img.length;
|
|
9934
|
+
var W = new Uint8Array(nt.inds.buffer, pt >> 2, dt >> 2);
|
|
9935
9935
|
tt.push(W);
|
|
9936
|
-
const
|
|
9937
|
-
_ && o(Y.img, Y.rect.width, Y.rect.height, J,
|
|
9936
|
+
const ct = new Uint8Array(nt.abuf, pt, dt);
|
|
9937
|
+
_ && o(Y.img, Y.rect.width, Y.rect.height, J, ct, W), Y.img.set(ct), pt += dt;
|
|
9938
9938
|
}
|
|
9939
9939
|
} else for (N = 0; N < K.length; N++) {
|
|
9940
9940
|
var Y = K[N];
|
|
9941
|
-
const
|
|
9941
|
+
const vt = new Uint32Array(Y.img.buffer);
|
|
9942
9942
|
var H = Y.rect.width;
|
|
9943
|
-
for ($ =
|
|
9944
|
-
const
|
|
9945
|
-
if (B != 0 &&
|
|
9946
|
-
else if (B > H &&
|
|
9943
|
+
for ($ = vt.length, W = new Uint8Array($), tt.push(W), B = 0; B < $; B++) {
|
|
9944
|
+
const rt = vt[B];
|
|
9945
|
+
if (B != 0 && rt == vt[B - 1]) W[B] = W[B - 1];
|
|
9946
|
+
else if (B > H && rt == vt[B - H]) W[B] = W[B - H];
|
|
9947
9947
|
else {
|
|
9948
|
-
let
|
|
9949
|
-
if (
|
|
9950
|
-
W[B] =
|
|
9948
|
+
let nt = q[rt];
|
|
9949
|
+
if (nt == null && (q[rt] = nt = J.length, J.push(rt), J.length >= 300)) break;
|
|
9950
|
+
W[B] = nt;
|
|
9951
9951
|
}
|
|
9952
9952
|
}
|
|
9953
9953
|
}
|
|
9954
9954
|
const Z = J.length;
|
|
9955
9955
|
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
9956
|
(Y = K[N]).rect.x, Y.rect.y, H = Y.rect.width;
|
|
9957
|
-
const
|
|
9958
|
-
let
|
|
9959
|
-
new Uint32Array(
|
|
9960
|
-
let
|
|
9957
|
+
const vt = Y.rect.height;
|
|
9958
|
+
let rt = Y.img;
|
|
9959
|
+
new Uint32Array(rt.buffer);
|
|
9960
|
+
let nt = 4 * H, pt = 4;
|
|
9961
9961
|
if (Z <= 256 && g == 0) {
|
|
9962
|
-
|
|
9963
|
-
var
|
|
9964
|
-
const
|
|
9965
|
-
for (let
|
|
9966
|
-
B =
|
|
9967
|
-
const
|
|
9968
|
-
if (U == 8) for (var ot = 0; ot < H; ot++)
|
|
9969
|
-
else if (U == 4) for (ot = 0; ot < H; ot++)
|
|
9970
|
-
else if (U == 2) for (ot = 0; ot < H; ot++)
|
|
9971
|
-
else if (U == 1) for (ot = 0; ot < H; ot++)
|
|
9962
|
+
nt = Math.ceil(U * H / 8);
|
|
9963
|
+
var yt = new Uint8Array(nt * vt);
|
|
9964
|
+
const dt = tt[N];
|
|
9965
|
+
for (let ct = 0; ct < vt; ct++) {
|
|
9966
|
+
B = ct * nt;
|
|
9967
|
+
const it = ct * H;
|
|
9968
|
+
if (U == 8) for (var ot = 0; ot < H; ot++) yt[B + ot] = dt[it + ot];
|
|
9969
|
+
else if (U == 4) for (ot = 0; ot < H; ot++) yt[B + (ot >> 1)] |= dt[it + ot] << 4 - 4 * (1 & ot);
|
|
9970
|
+
else if (U == 2) for (ot = 0; ot < H; ot++) yt[B + (ot >> 2)] |= dt[it + ot] << 6 - 2 * (3 & ot);
|
|
9971
|
+
else if (U == 1) for (ot = 0; ot < H; ot++) yt[B + (ot >> 3)] |= dt[it + ot] << 7 - 1 * (7 & ot);
|
|
9972
9972
|
}
|
|
9973
|
-
|
|
9973
|
+
rt = yt, j = 3, pt = 1;
|
|
9974
9974
|
} else if (V == 0 && K.length == 1) {
|
|
9975
|
-
|
|
9976
|
-
const
|
|
9977
|
-
for (B = 0; B <
|
|
9978
|
-
const
|
|
9979
|
-
|
|
9975
|
+
yt = new Uint8Array(H * vt * 3);
|
|
9976
|
+
const dt = H * vt;
|
|
9977
|
+
for (B = 0; B < dt; B++) {
|
|
9978
|
+
const ct = 3 * B, it = 4 * B;
|
|
9979
|
+
yt[ct] = rt[it], yt[ct + 1] = rt[it + 1], yt[ct + 2] = rt[it + 2];
|
|
9980
9980
|
}
|
|
9981
|
-
|
|
9981
|
+
rt = yt, j = 2, pt = 3, nt = 3 * H;
|
|
9982
9982
|
}
|
|
9983
|
-
Y.img =
|
|
9983
|
+
Y.img = rt, Y.bpl = nt, Y.bpp = pt;
|
|
9984
9984
|
}
|
|
9985
9985
|
return { ctype: j, depth: U, plte: J, frames: K };
|
|
9986
9986
|
}
|
|
@@ -10153,7 +10153,7 @@ const xu = { toArrayBuffer(t, e) {
|
|
|
10153
10153
|
e(new Blob([n], { type: "image/bmp" }));
|
|
10154
10154
|
}));
|
|
10155
10155
|
}, _dly: 9 };
|
|
10156
|
-
var
|
|
10156
|
+
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
10157
|
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
10158
|
function Ca(t, e, n = Date.now()) {
|
|
10159
10159
|
return new Promise(((r) => {
|
|
@@ -10179,9 +10179,9 @@ function Tu(t) {
|
|
|
10179
10179
|
}
|
|
10180
10180
|
function Te() {
|
|
10181
10181
|
if (Te.cachedResult !== void 0) return Te.cachedResult;
|
|
10182
|
-
let t =
|
|
10182
|
+
let t = Et.ETC;
|
|
10183
10183
|
const { userAgent: e } = navigator;
|
|
10184
|
-
return /Chrom(e|ium)/i.test(e) ? t =
|
|
10184
|
+
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
10185
|
}
|
|
10186
10186
|
function Pu(t, e) {
|
|
10187
10187
|
const n = Te(), r = sv[n];
|
|
@@ -10256,7 +10256,7 @@ function cr(t, e = {}) {
|
|
|
10256
10256
|
}
|
|
10257
10257
|
};
|
|
10258
10258
|
try {
|
|
10259
|
-
if (Yn() || [
|
|
10259
|
+
if (Yn() || [Et.DESKTOP_SAFARI, Et.MOBILE_SAFARI].includes(Te())) throw new Error("Skip createImageBitmap on IOS and Safari");
|
|
10260
10260
|
return createImageBitmap(t).then((function(c) {
|
|
10261
10261
|
try {
|
|
10262
10262
|
return i = c, s();
|
|
@@ -10527,7 +10527,7 @@ function cv(t, e) {
|
|
|
10527
10527
|
})), i.postMessage({ file: t, imageCompressionLibUrl: e.libURL, options: { ...e, onProgress: void 0, signal: void 0 } });
|
|
10528
10528
|
}));
|
|
10529
10529
|
}
|
|
10530
|
-
function
|
|
10530
|
+
function At(t, e) {
|
|
10531
10531
|
return new Promise((function(n, r) {
|
|
10532
10532
|
let i, a, s, o, c, d;
|
|
10533
10533
|
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 +10584,7 @@ function wt(t, e) {
|
|
|
10584
10584
|
}
|
|
10585
10585
|
}));
|
|
10586
10586
|
}
|
|
10587
|
-
|
|
10587
|
+
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
10588
|
const Mu = (t) => {
|
|
10589
10589
|
if (!t || typeof t != "string") return "unknown";
|
|
10590
10590
|
const e = [
|
|
@@ -10620,7 +10620,7 @@ async function Ru(t, e, n) {
|
|
|
10620
10620
|
};
|
|
10621
10621
|
try {
|
|
10622
10622
|
e(!0);
|
|
10623
|
-
const i = await
|
|
10623
|
+
const i = await At(t, r);
|
|
10624
10624
|
return i instanceof File ? i : new File([i], t.name, { type: t.type });
|
|
10625
10625
|
} catch (i) {
|
|
10626
10626
|
return console.error("Compression failed; using original file:", i), t;
|
|
@@ -10681,12 +10681,12 @@ function mv({ progress: t = null }) {
|
|
|
10681
10681
|
) });
|
|
10682
10682
|
}
|
|
10683
10683
|
function Mo({ mediaBlock: t, modifyMedia: e }) {
|
|
10684
|
-
const [n, r] =
|
|
10685
|
-
|
|
10684
|
+
const [n, r] = et(""), [i, a] = et(""), [s, o] = et(""), [c, d] = et(""), [l, u] = et(!1), [f, h] = et(null), m = Gt(null);
|
|
10685
|
+
It(() => {
|
|
10686
10686
|
window.addEventListener("dragover", (w) => w.preventDefault()), window.addEventListener("drop", (w) => w.preventDefault());
|
|
10687
|
-
}, []),
|
|
10687
|
+
}, []), It(() => {
|
|
10688
10688
|
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]),
|
|
10689
|
+
}, [t.data.src, t.type]), It(() => {
|
|
10690
10690
|
if (i && i instanceof File) {
|
|
10691
10691
|
const w = URL.createObjectURL(i);
|
|
10692
10692
|
t.type === "image" ? e({
|
|
@@ -10809,8 +10809,8 @@ const ze = {
|
|
|
10809
10809
|
background: "transparent"
|
|
10810
10810
|
};
|
|
10811
10811
|
function yv({ linkBlock: t, modifyLink: e, fontFamily: n }) {
|
|
10812
|
-
const [r, i] =
|
|
10813
|
-
return
|
|
10812
|
+
const [r, i] = et(t.data.linkText), [a, s] = et(t.data.url);
|
|
10813
|
+
return It(() => {
|
|
10814
10814
|
e({ linkBlockId: t.id, linkText: r, url: a });
|
|
10815
10815
|
}, [r, a, t.id]), /* @__PURE__ */ R.jsxs("div", { style: { display: "flex" }, children: [
|
|
10816
10816
|
/* @__PURE__ */ R.jsx(
|
|
@@ -10991,7 +10991,7 @@ function wv({
|
|
|
10991
10991
|
}
|
|
10992
10992
|
}
|
|
10993
10993
|
function ln({ text: t, children: e }) {
|
|
10994
|
-
const [n, r] =
|
|
10994
|
+
const [n, r] = et(!1), i = {
|
|
10995
10995
|
position: "relative",
|
|
10996
10996
|
display: "inline-block"
|
|
10997
10997
|
}, a = {
|
|
@@ -11044,7 +11044,7 @@ const Ro = [
|
|
|
11044
11044
|
{ id: 13, type: "custom-3", iconText: "C3" }
|
|
11045
11045
|
];
|
|
11046
11046
|
function Av({ handleClick: t, options: e, fontFamily: n }) {
|
|
11047
|
-
const [r, i] =
|
|
11047
|
+
const [r, i] = et(null), a = (c, d) => {
|
|
11048
11048
|
i(c), t(d);
|
|
11049
11049
|
}, s = e.map((c) => {
|
|
11050
11050
|
if (c.includes("-")) {
|
|
@@ -11188,10 +11188,10 @@ function Tv({
|
|
|
11188
11188
|
setPromptAction: i,
|
|
11189
11189
|
handleCopy: a
|
|
11190
11190
|
}) {
|
|
11191
|
-
const [s, o] =
|
|
11192
|
-
|
|
11191
|
+
const [s, o] = et(!1), [c, d] = et(null), l = Gt(null);
|
|
11192
|
+
It(() => {
|
|
11193
11193
|
l.current && (l.current.style.transform = t === "editor" ? "translateX(14px)" : "translateX(1px)");
|
|
11194
|
-
}, [t]),
|
|
11194
|
+
}, [t]), It(() => {
|
|
11195
11195
|
if (s) {
|
|
11196
11196
|
const m = setTimeout(() => o(!1), 3e3);
|
|
11197
11197
|
return () => clearTimeout(m);
|
|
@@ -11320,7 +11320,7 @@ function Tv({
|
|
|
11320
11320
|
);
|
|
11321
11321
|
}
|
|
11322
11322
|
function Pv() {
|
|
11323
|
-
const [t, e] =
|
|
11323
|
+
const [t, e] = et(!1), n = {
|
|
11324
11324
|
display: "flex",
|
|
11325
11325
|
flexDirection: "column",
|
|
11326
11326
|
justifyContent: "center",
|
|
@@ -11390,7 +11390,7 @@ function Ev({
|
|
|
11390
11390
|
handlePromptAction: o,
|
|
11391
11391
|
setPromptVisiblility: c
|
|
11392
11392
|
}) {
|
|
11393
|
-
const [d, l] =
|
|
11393
|
+
const [d, l] = et(null), u = {
|
|
11394
11394
|
width: "100%",
|
|
11395
11395
|
boxSizing: "border-box",
|
|
11396
11396
|
border: "1px solid #d1d5db",
|
|
@@ -11494,10 +11494,10 @@ function kv({
|
|
|
11494
11494
|
defaultCustomData3: i,
|
|
11495
11495
|
localStorageEnable: a
|
|
11496
11496
|
}) {
|
|
11497
|
-
const [s, o] =
|
|
11497
|
+
const [s, o] = et(
|
|
11498
11498
|
Mn(t).blocks
|
|
11499
|
-
), [c, d] =
|
|
11500
|
-
|
|
11499
|
+
), [c, d] = et(""), [l, u] = et(""), [f, h] = et(""), [m, b] = et([]), [w, v] = et("editor"), [k, S] = et(!1), [E, P] = et("");
|
|
11500
|
+
It(() => {
|
|
11501
11501
|
if (!Array.isArray(s))
|
|
11502
11502
|
throw new Error(
|
|
11503
11503
|
"DraftifyReact: blocksData must be an array of DraftifyBlock[]"
|
|
@@ -11512,13 +11512,13 @@ function kv({
|
|
|
11512
11512
|
o(Mn(s));
|
|
11513
11513
|
else
|
|
11514
11514
|
o(Mn(s));
|
|
11515
|
-
}, []),
|
|
11515
|
+
}, []), It(() => {
|
|
11516
11516
|
a && (async (Y) => {
|
|
11517
11517
|
const H = await Promise.all(
|
|
11518
11518
|
Y.map(async (Z) => {
|
|
11519
11519
|
if (Z.type === "image" && Z.file) {
|
|
11520
|
-
const
|
|
11521
|
-
return { ...Z, content:
|
|
11520
|
+
const yt = await $u(Z);
|
|
11521
|
+
return { ...Z, content: yt, file: void 0 };
|
|
11522
11522
|
}
|
|
11523
11523
|
return Z;
|
|
11524
11524
|
})
|
|
@@ -11531,7 +11531,7 @@ function kv({
|
|
|
11531
11531
|
})
|
|
11532
11532
|
);
|
|
11533
11533
|
})(s);
|
|
11534
|
-
}, [s, t]),
|
|
11534
|
+
}, [s, t]), It(() => {
|
|
11535
11535
|
e(
|
|
11536
11536
|
(W) => Ia({
|
|
11537
11537
|
...W,
|
|
@@ -11622,7 +11622,7 @@ function kv({
|
|
|
11622
11622
|
o((H) => Xu(H, W, Y));
|
|
11623
11623
|
}, C = ({ imageBlockId: W, src: Y, alt: H, caption: Z }) => {
|
|
11624
11624
|
o(
|
|
11625
|
-
(
|
|
11625
|
+
(yt) => Ku(yt, W, Y, H, Z)
|
|
11626
11626
|
);
|
|
11627
11627
|
}, O = ({ videoBlockId: W, src: Y, provider: H }) => {
|
|
11628
11628
|
o((Z) => Gu(Z, W, Y, H));
|
|
@@ -11637,8 +11637,8 @@ function kv({
|
|
|
11637
11637
|
(Y.type === "image" || Y.type === "video") && Y.data.src !== "" || o((H) => H.filter((Z) => Z.id !== W));
|
|
11638
11638
|
}, U = (W, Y) => {
|
|
11639
11639
|
o((H) => {
|
|
11640
|
-
const Z = [...H], [
|
|
11641
|
-
return Z.splice(Y, 0,
|
|
11640
|
+
const Z = [...H], [yt] = Z.splice(W, 1);
|
|
11641
|
+
return Z.splice(Y, 0, yt), Z;
|
|
11642
11642
|
});
|
|
11643
11643
|
};
|
|
11644
11644
|
return {
|
|
@@ -11723,7 +11723,7 @@ function kv({
|
|
|
11723
11723
|
};
|
|
11724
11724
|
}
|
|
11725
11725
|
function Iv(t) {
|
|
11726
|
-
|
|
11726
|
+
It(() => {
|
|
11727
11727
|
function e() {
|
|
11728
11728
|
const r = Math.ceil(window.innerWidth / 20), i = Math.ceil(document.documentElement.scrollHeight / 20), a = [];
|
|
11729
11729
|
for (let s = 0; s < i; s++)
|
|
@@ -11874,32 +11874,34 @@ function Qv({
|
|
|
11874
11874
|
setPromptAction: C,
|
|
11875
11875
|
promptVisibility: O,
|
|
11876
11876
|
setPromptVisiblility: x,
|
|
11877
|
+
// blocks data
|
|
11878
|
+
blocksData: g,
|
|
11877
11879
|
// block creator
|
|
11878
|
-
handleClick:
|
|
11880
|
+
handleClick: _,
|
|
11879
11881
|
// block modifiers
|
|
11880
|
-
modifyHeading:
|
|
11881
|
-
modifySubheading:
|
|
11882
|
-
modifyParagraph:
|
|
11883
|
-
modifyQuote:
|
|
11884
|
-
modifyList:
|
|
11885
|
-
modifyTable:
|
|
11886
|
-
modifyImage:
|
|
11887
|
-
modifyVideo:
|
|
11888
|
-
modifyLink:
|
|
11889
|
-
modifyCode:
|
|
11890
|
-
modifyCustom:
|
|
11882
|
+
modifyHeading: j,
|
|
11883
|
+
modifySubheading: U,
|
|
11884
|
+
modifyParagraph: D,
|
|
11885
|
+
modifyQuote: N,
|
|
11886
|
+
modifyList: $,
|
|
11887
|
+
modifyTable: B,
|
|
11888
|
+
modifyImage: V,
|
|
11889
|
+
modifyVideo: K,
|
|
11890
|
+
modifyLink: q,
|
|
11891
|
+
modifyCode: J,
|
|
11892
|
+
modifyCustom: tt,
|
|
11891
11893
|
// drag and drop handlers
|
|
11892
|
-
onDropHandler:
|
|
11893
|
-
onDragStart:
|
|
11894
|
-
onDragEnd:
|
|
11895
|
-
onDragEnter:
|
|
11896
|
-
onDragLeave:
|
|
11897
|
-
containerVariants:
|
|
11898
|
-
itemVariants:
|
|
11899
|
-
transitions:
|
|
11900
|
-
whileHover:
|
|
11894
|
+
onDropHandler: W,
|
|
11895
|
+
onDragStart: Y,
|
|
11896
|
+
onDragEnd: H,
|
|
11897
|
+
onDragEnter: Z,
|
|
11898
|
+
onDragLeave: yt,
|
|
11899
|
+
containerVariants: ot,
|
|
11900
|
+
itemVariants: vt,
|
|
11901
|
+
transitions: rt,
|
|
11902
|
+
whileHover: nt,
|
|
11901
11903
|
// block delete
|
|
11902
|
-
handleDelete:
|
|
11904
|
+
handleDelete: pt
|
|
11903
11905
|
} = kv({
|
|
11904
11906
|
draftifyDoc: t,
|
|
11905
11907
|
setDoc: e,
|
|
@@ -11946,28 +11948,28 @@ function Qv({
|
|
|
11946
11948
|
),
|
|
11947
11949
|
v === "editor" && // Input View
|
|
11948
11950
|
/* @__PURE__ */ R.jsxs(R.Fragment, { children: [
|
|
11949
|
-
/* @__PURE__ */ R.jsx(Av, { handleClick:
|
|
11950
|
-
/* @__PURE__ */ R.jsx("div", { className: "editor-area", onSubmit: (
|
|
11951
|
+
/* @__PURE__ */ R.jsx(Av, { handleClick: _, options: n }),
|
|
11952
|
+
/* @__PURE__ */ R.jsx("div", { className: "editor-area", onSubmit: (dt) => dt.preventDefault(), children: /* @__PURE__ */ R.jsx(
|
|
11951
11953
|
Ks.div,
|
|
11952
11954
|
{
|
|
11953
11955
|
style: { display: "grid", gap: "10px" },
|
|
11954
|
-
variants:
|
|
11956
|
+
variants: ot,
|
|
11955
11957
|
animate: "show",
|
|
11956
11958
|
exit: "hidden",
|
|
11957
|
-
children: /* @__PURE__ */ R.jsx(jh, { children:
|
|
11959
|
+
children: /* @__PURE__ */ R.jsx(jh, { children: g.map((dt, ct) => /* @__PURE__ */ R.jsxs(
|
|
11958
11960
|
Ks.div,
|
|
11959
11961
|
{
|
|
11960
11962
|
layout: !0,
|
|
11961
|
-
variants:
|
|
11962
|
-
transition:
|
|
11963
|
-
whileHover:
|
|
11963
|
+
variants: vt,
|
|
11964
|
+
transition: rt,
|
|
11965
|
+
whileHover: nt,
|
|
11964
11966
|
draggable: !0,
|
|
11965
|
-
onDragStart: (
|
|
11966
|
-
onDragEnd: (
|
|
11967
|
-
onDragOver: (
|
|
11968
|
-
onDragEnter: (
|
|
11969
|
-
onDragLeave: (
|
|
11970
|
-
onDrop: (
|
|
11967
|
+
onDragStart: (it) => Y(it, ct),
|
|
11968
|
+
onDragEnd: (it) => H(it),
|
|
11969
|
+
onDragOver: (it) => it.preventDefault(),
|
|
11970
|
+
onDragEnter: (it) => Z(it),
|
|
11971
|
+
onDragLeave: (it) => yt(it),
|
|
11972
|
+
onDrop: (it) => W(it, ct),
|
|
11971
11973
|
className: "block-container",
|
|
11972
11974
|
children: [
|
|
11973
11975
|
/* @__PURE__ */ R.jsx(Pv, {}),
|
|
@@ -11975,18 +11977,18 @@ function Qv({
|
|
|
11975
11977
|
wv,
|
|
11976
11978
|
{
|
|
11977
11979
|
fontFamily: b,
|
|
11978
|
-
block:
|
|
11979
|
-
modifyHeading:
|
|
11980
|
-
modifySubheading:
|
|
11981
|
-
modifyParagraph:
|
|
11982
|
-
modifyQuote:
|
|
11983
|
-
modifyList:
|
|
11984
|
-
modifyTable:
|
|
11985
|
-
modifyImage:
|
|
11986
|
-
modifyVideo:
|
|
11987
|
-
modifyLink:
|
|
11988
|
-
modifyCode:
|
|
11989
|
-
modifyCustom:
|
|
11980
|
+
block: dt,
|
|
11981
|
+
modifyHeading: j,
|
|
11982
|
+
modifySubheading: U,
|
|
11983
|
+
modifyParagraph: D,
|
|
11984
|
+
modifyQuote: N,
|
|
11985
|
+
modifyList: $,
|
|
11986
|
+
modifyTable: B,
|
|
11987
|
+
modifyImage: V,
|
|
11988
|
+
modifyVideo: K,
|
|
11989
|
+
modifyLink: q,
|
|
11990
|
+
modifyCode: J,
|
|
11991
|
+
modifyCustom: tt,
|
|
11990
11992
|
CustomEditor1: r,
|
|
11991
11993
|
CustomEditor2: i,
|
|
11992
11994
|
CustomEditor3: a
|
|
@@ -11997,12 +11999,12 @@ function Qv({
|
|
|
11997
11999
|
{
|
|
11998
12000
|
icon: ["fas", "trash"],
|
|
11999
12001
|
className: "delete-icon",
|
|
12000
|
-
onClick: () =>
|
|
12002
|
+
onClick: () => pt(dt.id)
|
|
12001
12003
|
}
|
|
12002
12004
|
)
|
|
12003
12005
|
]
|
|
12004
12006
|
},
|
|
12005
|
-
|
|
12007
|
+
dt.id
|
|
12006
12008
|
)) })
|
|
12007
12009
|
}
|
|
12008
12010
|
) })
|