react-pro-messenger 1.0.27 → 1.0.28
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/index.es.js +977 -973
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +4 -4
- package/dist/index.umd.js.map +1 -1
- package/dist/src/components/Input/Input.d.ts +1 -1
- package/dist/src/components/Media/Media.d.ts +2 -2
- package/dist/src/domain/MessageEntity.d.ts +5 -3
- package/dist/src/features/Chat/logic.d.ts +1 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -1,33 +1,33 @@
|
|
|
1
1
|
var Da = Object.defineProperty;
|
|
2
2
|
var Oa = (e, t, n) => t in e ? Da(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
3
|
-
var
|
|
3
|
+
var Ee = (e, t, n) => (Oa(e, typeof t != "symbol" ? t + "" : t, n), n);
|
|
4
4
|
import * as Qn from "react";
|
|
5
|
-
import Te, { useCallback as Qt, createContext as ct, useRef as he, useId as er, useContext as pe, useInsertionEffect as
|
|
5
|
+
import Te, { useCallback as Qt, createContext as ct, useRef as he, useId as er, useContext as pe, useInsertionEffect as Vi, useMemo as He, useEffect as ut, Children as La, isValidElement as ka, useLayoutEffect as _a, useState as xe, forwardRef as Ot, Fragment as Di, createElement as Ia, Component as Fa } from "react";
|
|
6
6
|
import Na from "react-dom";
|
|
7
7
|
var m = { exports: {} }, mt = {};
|
|
8
|
-
var
|
|
8
|
+
var ns;
|
|
9
9
|
function Ba() {
|
|
10
|
-
if (
|
|
10
|
+
if (ns)
|
|
11
11
|
return mt;
|
|
12
|
-
|
|
13
|
-
var e = Te, t = Symbol.for("react.element"), n = Symbol.for("react.fragment"), r = Object.prototype.hasOwnProperty,
|
|
12
|
+
ns = 1;
|
|
13
|
+
var e = Te, t = Symbol.for("react.element"), n = Symbol.for("react.fragment"), r = Object.prototype.hasOwnProperty, s = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, i = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
14
14
|
function o(l, a, u) {
|
|
15
15
|
var c, f = {}, h = null, g = null;
|
|
16
16
|
u !== void 0 && (h = "" + u), a.key !== void 0 && (h = "" + a.key), a.ref !== void 0 && (g = a.ref);
|
|
17
17
|
for (c in a)
|
|
18
|
-
r.call(a, c) && !
|
|
18
|
+
r.call(a, c) && !i.hasOwnProperty(c) && (f[c] = a[c]);
|
|
19
19
|
if (l && l.defaultProps)
|
|
20
20
|
for (c in a = l.defaultProps, a)
|
|
21
21
|
f[c] === void 0 && (f[c] = a[c]);
|
|
22
|
-
return { $$typeof: t, type: l, key: h, ref: g, props: f, _owner:
|
|
22
|
+
return { $$typeof: t, type: l, key: h, ref: g, props: f, _owner: s.current };
|
|
23
23
|
}
|
|
24
24
|
return mt.Fragment = n, mt.jsx = o, mt.jsxs = o, mt;
|
|
25
25
|
}
|
|
26
26
|
var gt = {};
|
|
27
|
-
var
|
|
27
|
+
var rs;
|
|
28
28
|
function $a() {
|
|
29
|
-
return
|
|
30
|
-
var e = Te, t = Symbol.for("react.element"), n = Symbol.for("react.portal"), r = Symbol.for("react.fragment"),
|
|
29
|
+
return rs || (rs = 1, process.env.NODE_ENV !== "production" && function() {
|
|
30
|
+
var e = Te, t = Symbol.for("react.element"), n = Symbol.for("react.portal"), r = Symbol.for("react.fragment"), s = Symbol.for("react.strict_mode"), i = Symbol.for("react.profiler"), o = Symbol.for("react.provider"), l = Symbol.for("react.context"), a = Symbol.for("react.forward_ref"), u = Symbol.for("react.suspense"), c = Symbol.for("react.suspense_list"), f = Symbol.for("react.memo"), h = Symbol.for("react.lazy"), g = Symbol.for("react.offscreen"), x = Symbol.iterator, y = "@@iterator";
|
|
31
31
|
function P(d) {
|
|
32
32
|
if (d === null || typeof d != "object")
|
|
33
33
|
return null;
|
|
@@ -55,7 +55,7 @@ function $a() {
|
|
|
55
55
|
var V = !1, p = !1, A = !1, B = !1, M = !1, H;
|
|
56
56
|
H = Symbol.for("react.module.reference");
|
|
57
57
|
function F(d) {
|
|
58
|
-
return !!(typeof d == "string" || typeof d == "function" || d === r || d ===
|
|
58
|
+
return !!(typeof d == "string" || typeof d == "function" || d === r || d === i || M || d === s || d === u || d === c || B || d === g || V || p || A || typeof d == "object" && d !== null && (d.$$typeof === h || d.$$typeof === f || d.$$typeof === o || d.$$typeof === l || d.$$typeof === a || d.$$typeof === H || d.getModuleId !== void 0));
|
|
59
59
|
}
|
|
60
60
|
function ne(d, T, E) {
|
|
61
61
|
var I = d.displayName;
|
|
@@ -79,9 +79,9 @@ function $a() {
|
|
|
79
79
|
return "Fragment";
|
|
80
80
|
case n:
|
|
81
81
|
return "Portal";
|
|
82
|
-
case s:
|
|
83
|
-
return "Profiler";
|
|
84
82
|
case i:
|
|
83
|
+
return "Profiler";
|
|
84
|
+
case s:
|
|
85
85
|
return "StrictMode";
|
|
86
86
|
case u:
|
|
87
87
|
return "Suspense";
|
|
@@ -243,26 +243,26 @@ function $a() {
|
|
|
243
243
|
if (Oe && I && typeof Oe.stack == "string") {
|
|
244
244
|
for (var W = Oe.stack.split(`
|
|
245
245
|
`), ve = I.stack.split(`
|
|
246
|
-
`), re = W.length - 1,
|
|
247
|
-
|
|
248
|
-
for (; re >= 1 &&
|
|
249
|
-
if (W[re] !== ve[
|
|
250
|
-
if (re !== 1 ||
|
|
246
|
+
`), re = W.length - 1, ie = ve.length - 1; re >= 1 && ie >= 0 && W[re] !== ve[ie]; )
|
|
247
|
+
ie--;
|
|
248
|
+
for (; re >= 1 && ie >= 0; re--, ie--)
|
|
249
|
+
if (W[re] !== ve[ie]) {
|
|
250
|
+
if (re !== 1 || ie !== 1)
|
|
251
251
|
do
|
|
252
|
-
if (re--,
|
|
252
|
+
if (re--, ie--, ie < 0 || W[re] !== ve[ie]) {
|
|
253
253
|
var Ce = `
|
|
254
254
|
` + W[re].replace(" at new ", " at ");
|
|
255
255
|
return d.displayName && Ce.includes("<anonymous>") && (Ce = Ce.replace("<anonymous>", d.displayName)), typeof d == "function" && U.set(d, Ce), Ce;
|
|
256
256
|
}
|
|
257
|
-
while (re >= 1 &&
|
|
257
|
+
while (re >= 1 && ie >= 0);
|
|
258
258
|
break;
|
|
259
259
|
}
|
|
260
260
|
}
|
|
261
261
|
} finally {
|
|
262
262
|
Y = !1, _.current = Z, O(), Error.prepareStackTrace = K;
|
|
263
263
|
}
|
|
264
|
-
var Qe = d ? d.displayName || d.name : "",
|
|
265
|
-
return typeof d == "function" && U.set(d,
|
|
264
|
+
var Qe = d ? d.displayName || d.name : "", ts = Qe ? $(Qe) : "";
|
|
265
|
+
return typeof d == "function" && U.set(d, ts), ts;
|
|
266
266
|
}
|
|
267
267
|
function Se(d, T, E) {
|
|
268
268
|
return R(d, !1);
|
|
@@ -440,8 +440,8 @@ function $a() {
|
|
|
440
440
|
z[Z] === void 0 && (z[Z] = re[Z]);
|
|
441
441
|
}
|
|
442
442
|
if (W || ve) {
|
|
443
|
-
var
|
|
444
|
-
W && ba(z,
|
|
443
|
+
var ie = typeof d == "function" ? d.displayName || d.name || "Unknown" : d;
|
|
444
|
+
W && ba(z, ie), ve && Ta(z, ie);
|
|
445
445
|
}
|
|
446
446
|
return wa(d, W, ve, K, I, pt.current, z);
|
|
447
447
|
}
|
|
@@ -562,7 +562,7 @@ Check the top-level render call using <` + E + ">.");
|
|
|
562
562
|
d.ref !== null && (Je(d), S("Invalid attribute `ref` supplied to `React.Fragment`."), Je(null));
|
|
563
563
|
}
|
|
564
564
|
}
|
|
565
|
-
function
|
|
565
|
+
function es(d, T, E, I, K, Z) {
|
|
566
566
|
{
|
|
567
567
|
var z = F(d);
|
|
568
568
|
if (!z) {
|
|
@@ -573,9 +573,9 @@ Check the top-level render call using <` + E + ">.");
|
|
|
573
573
|
var re;
|
|
574
574
|
d === null ? re = "null" : an(d) ? re = "array" : d !== void 0 && d.$$typeof === t ? (re = "<" + (oe(d.type) || "Unknown") + " />", W = " Did you accidentally export a JSX literal instead of a component?") : re = typeof d, S("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", re, W);
|
|
575
575
|
}
|
|
576
|
-
var
|
|
577
|
-
if (
|
|
578
|
-
return
|
|
576
|
+
var ie = Pa(d, T, E, K, Z);
|
|
577
|
+
if (ie == null)
|
|
578
|
+
return ie;
|
|
579
579
|
if (z) {
|
|
580
580
|
var Ce = T.children;
|
|
581
581
|
if (Ce !== void 0)
|
|
@@ -589,14 +589,14 @@ Check the top-level render call using <` + E + ">.");
|
|
|
589
589
|
else
|
|
590
590
|
Qr(Ce, d);
|
|
591
591
|
}
|
|
592
|
-
return d === r ? Ra(
|
|
592
|
+
return d === r ? Ra(ie) : Ea(ie), ie;
|
|
593
593
|
}
|
|
594
594
|
}
|
|
595
595
|
function Aa(d, T, E) {
|
|
596
|
-
return
|
|
596
|
+
return es(d, T, E, !0);
|
|
597
597
|
}
|
|
598
598
|
function ja(d, T, E) {
|
|
599
|
-
return
|
|
599
|
+
return es(d, T, E, !1);
|
|
600
600
|
}
|
|
601
601
|
var Ma = ja, Va = Aa;
|
|
602
602
|
gt.Fragment = r, gt.jsx = Ma, gt.jsxs = Va;
|
|
@@ -623,25 +623,27 @@ class dn {
|
|
|
623
623
|
id: t,
|
|
624
624
|
text: n,
|
|
625
625
|
createdDate: r,
|
|
626
|
-
|
|
627
|
-
attachmentType:
|
|
626
|
+
attachmentUrl: s,
|
|
627
|
+
attachmentType: i,
|
|
628
628
|
attachmentFormat: o,
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
629
|
+
attachmentBlob: l,
|
|
630
|
+
user: a,
|
|
631
|
+
isRightSided: u,
|
|
632
|
+
symbols: c,
|
|
633
|
+
isSending: f
|
|
633
634
|
}) {
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
this
|
|
635
|
+
Ee(this, "id", "0");
|
|
636
|
+
Ee(this, "text", "");
|
|
637
|
+
Ee(this, "createdDate", "");
|
|
638
|
+
Ee(this, "attachmentUrl", "");
|
|
639
|
+
Ee(this, "attachmentBlob");
|
|
640
|
+
Ee(this, "attachmentType");
|
|
641
|
+
Ee(this, "attachmentFormat", "");
|
|
642
|
+
Ee(this, "user", { id: "" });
|
|
643
|
+
Ee(this, "isRightSided", !1);
|
|
644
|
+
Ee(this, "symbols");
|
|
645
|
+
Ee(this, "isSending");
|
|
646
|
+
this.id = t, this.text = n, this.createdDate = r, this.attachmentUrl = s, this.attachmentType = i, this.attachmentFormat = o, this.attachmentBlob = l, this.user = a, this.isRightSided = u, this.symbols = c, this.isSending = f;
|
|
645
647
|
}
|
|
646
648
|
}
|
|
647
649
|
const tr = ct({});
|
|
@@ -658,8 +660,8 @@ class Ua extends Qn.Component {
|
|
|
658
660
|
getSnapshotBeforeUpdate(t) {
|
|
659
661
|
const n = this.props.childRef.current;
|
|
660
662
|
if (n && t.isPresent && !this.props.isPresent) {
|
|
661
|
-
const r = n.offsetParent,
|
|
662
|
-
|
|
663
|
+
const r = n.offsetParent, s = r instanceof HTMLElement && r.offsetWidth || 0, i = this.props.sizeRef.current;
|
|
664
|
+
i.height = n.offsetHeight || 0, i.width = n.offsetWidth || 0, i.top = n.offsetTop, i.left = n.offsetLeft, i.right = s - i.width - i.left;
|
|
663
665
|
}
|
|
664
666
|
return null;
|
|
665
667
|
}
|
|
@@ -670,19 +672,19 @@ class Ua extends Qn.Component {
|
|
|
670
672
|
}
|
|
671
673
|
}
|
|
672
674
|
function Wa({ children: e, isPresent: t, anchorX: n }) {
|
|
673
|
-
const r = er(),
|
|
675
|
+
const r = er(), s = he(null), i = he({
|
|
674
676
|
width: 0,
|
|
675
677
|
height: 0,
|
|
676
678
|
top: 0,
|
|
677
679
|
left: 0,
|
|
678
680
|
right: 0
|
|
679
681
|
}), { nonce: o } = pe(rr);
|
|
680
|
-
return
|
|
681
|
-
const { width: l, height: a, top: u, left: c, right: f } =
|
|
682
|
-
if (t || !
|
|
682
|
+
return Vi(() => {
|
|
683
|
+
const { width: l, height: a, top: u, left: c, right: f } = i.current;
|
|
684
|
+
if (t || !s.current || !l || !a)
|
|
683
685
|
return;
|
|
684
686
|
const h = n === "left" ? `left: ${c}` : `right: ${f}`;
|
|
685
|
-
|
|
687
|
+
s.current.dataset.motionPopId = r;
|
|
686
688
|
const g = document.createElement("style");
|
|
687
689
|
return o && (g.nonce = o), document.head.appendChild(g), g.sheet && g.sheet.insertRule(`
|
|
688
690
|
[data-motion-pop-id="${r}"] {
|
|
@@ -695,9 +697,9 @@ function Wa({ children: e, isPresent: t, anchorX: n }) {
|
|
|
695
697
|
`), () => {
|
|
696
698
|
document.head.removeChild(g);
|
|
697
699
|
};
|
|
698
|
-
}, [t]), m.exports.jsx(Ua, { isPresent: t, childRef:
|
|
700
|
+
}, [t]), m.exports.jsx(Ua, { isPresent: t, childRef: s, sizeRef: i, children: Qn.cloneElement(e, { ref: s }) });
|
|
699
701
|
}
|
|
700
|
-
const za = ({ children: e, initial: t, isPresent: n, onExitComplete: r, custom:
|
|
702
|
+
const za = ({ children: e, initial: t, isPresent: n, onExitComplete: r, custom: s, presenceAffectsLayout: i, mode: o, anchorX: l }) => {
|
|
701
703
|
const a = nr(Ya), u = er(), c = Qt((h) => {
|
|
702
704
|
a.set(h, !0);
|
|
703
705
|
for (const g of a.values())
|
|
@@ -709,11 +711,11 @@ const za = ({ children: e, initial: t, isPresent: n, onExitComplete: r, custom:
|
|
|
709
711
|
id: u,
|
|
710
712
|
initial: t,
|
|
711
713
|
isPresent: n,
|
|
712
|
-
custom:
|
|
714
|
+
custom: s,
|
|
713
715
|
onExitComplete: c,
|
|
714
716
|
register: (h) => (a.set(h, !1), () => a.delete(h))
|
|
715
717
|
}),
|
|
716
|
-
|
|
718
|
+
i ? [Math.random(), c] : [n, c]
|
|
717
719
|
);
|
|
718
720
|
return He(() => {
|
|
719
721
|
a.forEach((h, g) => a.set(g, !1));
|
|
@@ -724,28 +726,28 @@ const za = ({ children: e, initial: t, isPresent: n, onExitComplete: r, custom:
|
|
|
724
726
|
function Ya() {
|
|
725
727
|
return /* @__PURE__ */ new Map();
|
|
726
728
|
}
|
|
727
|
-
function
|
|
729
|
+
function Oi(e = !0) {
|
|
728
730
|
const t = pe(en);
|
|
729
731
|
if (t === null)
|
|
730
732
|
return [!0, null];
|
|
731
|
-
const { isPresent: n, onExitComplete: r, register:
|
|
733
|
+
const { isPresent: n, onExitComplete: r, register: s } = t, i = er();
|
|
732
734
|
ut(() => {
|
|
733
735
|
if (e)
|
|
734
|
-
return i
|
|
736
|
+
return s(i);
|
|
735
737
|
}, [e]);
|
|
736
|
-
const o = Qt(() => e && r && r(
|
|
738
|
+
const o = Qt(() => e && r && r(i), [i, r, e]);
|
|
737
739
|
return !n && r ? [!1, o] : [!0];
|
|
738
740
|
}
|
|
739
741
|
const Bt = (e) => e.key || "";
|
|
740
|
-
function
|
|
742
|
+
function ss(e) {
|
|
741
743
|
const t = [];
|
|
742
744
|
return La.forEach(e, (n) => {
|
|
743
745
|
ka(n) && t.push(n);
|
|
744
746
|
}), t;
|
|
745
747
|
}
|
|
746
|
-
const
|
|
747
|
-
const [a, u] =
|
|
748
|
-
|
|
748
|
+
const sr = typeof window < "u", Li = sr ? _a : ut, ki = ({ children: e, custom: t, initial: n = !0, onExitComplete: r, presenceAffectsLayout: s = !0, mode: i = "sync", propagate: o = !1, anchorX: l = "left" }) => {
|
|
749
|
+
const [a, u] = Oi(o), c = He(() => ss(e), [e]), f = o && !a ? [] : c.map(Bt), h = he(!0), g = he(c), x = nr(() => /* @__PURE__ */ new Map()), [y, P] = xe(c), [b, S] = xe(c);
|
|
750
|
+
Li(() => {
|
|
749
751
|
h.current = !1, g.current = c;
|
|
750
752
|
for (let p = 0; p < b.length; p++) {
|
|
751
753
|
const A = Bt(b[p]);
|
|
@@ -759,9 +761,9 @@ const ir = typeof window < "u", Ls = ir ? _a : ut, ks = ({ children: e, custom:
|
|
|
759
761
|
const B = b[A], M = Bt(B);
|
|
760
762
|
f.includes(M) || (p.splice(A, 0, B), C.push(B));
|
|
761
763
|
}
|
|
762
|
-
return
|
|
764
|
+
return i === "wait" && C.length && (p = C), S(ss(p)), P(c), null;
|
|
763
765
|
}
|
|
764
|
-
process.env.NODE_ENV !== "production" &&
|
|
766
|
+
process.env.NODE_ENV !== "production" && i === "wait" && b.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.`);
|
|
765
767
|
const { forceRender: V } = pe(tr);
|
|
766
768
|
return m.exports.jsx(m.exports.Fragment, { children: b.map((p) => {
|
|
767
769
|
const A = Bt(p), B = o && !a ? !1 : c === b || f.includes(A), M = () => {
|
|
@@ -774,7 +776,7 @@ const ir = typeof window < "u", Ls = ir ? _a : ut, ks = ({ children: e, custom:
|
|
|
774
776
|
F || (H = !1);
|
|
775
777
|
}), H && (V == null || V(), S(g.current), o && (u == null || u()), r && r());
|
|
776
778
|
};
|
|
777
|
-
return m.exports.jsx(za, { isPresent: B, initial: !h.current || n ? void 0 : !1, custom: t, presenceAffectsLayout:
|
|
779
|
+
return m.exports.jsx(za, { isPresent: B, initial: !h.current || n ? void 0 : !1, custom: t, presenceAffectsLayout: s, mode: i, onExitComplete: B ? void 0 : M, anchorX: l, children: p }, A);
|
|
778
780
|
}) });
|
|
779
781
|
}, we = (e) => e;
|
|
780
782
|
let ft = we, Ne = we;
|
|
@@ -784,14 +786,14 @@ process.env.NODE_ENV !== "production" && (ft = (e, t) => {
|
|
|
784
786
|
if (!e)
|
|
785
787
|
throw new Error(t);
|
|
786
788
|
});
|
|
787
|
-
function
|
|
789
|
+
function ir(e) {
|
|
788
790
|
let t;
|
|
789
791
|
return () => (t === void 0 && (t = e()), t);
|
|
790
792
|
}
|
|
791
793
|
const ot = (e, t, n) => {
|
|
792
794
|
const r = t - e;
|
|
793
795
|
return r === 0 ? 1 : (n - e) / r;
|
|
794
|
-
}, Me = (e) => e * 1e3, ke = (e) => e / 1e3,
|
|
796
|
+
}, Me = (e) => e * 1e3, ke = (e) => e / 1e3, _i = {
|
|
795
797
|
skipAnimations: !1,
|
|
796
798
|
useManualTiming: !1
|
|
797
799
|
}, $t = [
|
|
@@ -806,7 +808,7 @@ const ot = (e, t, n) => {
|
|
|
806
808
|
addProjectionMetrics: null
|
|
807
809
|
};
|
|
808
810
|
function Ka(e, t) {
|
|
809
|
-
let n = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Set(),
|
|
811
|
+
let n = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Set(), s = !1, i = !1;
|
|
810
812
|
const o = /* @__PURE__ */ new WeakSet();
|
|
811
813
|
let l = {
|
|
812
814
|
delta: 0,
|
|
@@ -818,34 +820,34 @@ function Ka(e, t) {
|
|
|
818
820
|
}
|
|
819
821
|
const c = {
|
|
820
822
|
schedule: (f, h = !1, g = !1) => {
|
|
821
|
-
const y = g &&
|
|
823
|
+
const y = g && s ? n : r;
|
|
822
824
|
return h && o.add(f), y.has(f) || y.add(f), f;
|
|
823
825
|
},
|
|
824
826
|
cancel: (f) => {
|
|
825
827
|
r.delete(f), o.delete(f);
|
|
826
828
|
},
|
|
827
829
|
process: (f) => {
|
|
828
|
-
if (l = f,
|
|
829
|
-
|
|
830
|
+
if (l = f, s) {
|
|
831
|
+
i = !0;
|
|
830
832
|
return;
|
|
831
833
|
}
|
|
832
|
-
|
|
834
|
+
s = !0, [n, r] = [r, n], n.forEach(u), t && Fe.value && Fe.value.frameloop[t].push(a), a = 0, n.clear(), s = !1, i && (i = !1, c.process(f));
|
|
833
835
|
}
|
|
834
836
|
};
|
|
835
837
|
return c;
|
|
836
838
|
}
|
|
837
839
|
const Ga = 40;
|
|
838
|
-
function
|
|
840
|
+
function Ii(e, t) {
|
|
839
841
|
let n = !1, r = !0;
|
|
840
|
-
const
|
|
842
|
+
const s = {
|
|
841
843
|
delta: 0,
|
|
842
844
|
timestamp: 0,
|
|
843
845
|
isProcessing: !1
|
|
844
|
-
},
|
|
846
|
+
}, i = () => n = !0, o = $t.reduce((b, S) => (b[S] = Ka(i, t ? S : void 0), b), {}), { read: l, resolveKeyframes: a, update: u, preRender: c, render: f, postRender: h } = o, g = () => {
|
|
845
847
|
const b = performance.now();
|
|
846
|
-
n = !1,
|
|
848
|
+
n = !1, s.delta = r ? 1e3 / 60 : Math.max(Math.min(b - s.timestamp, Ga), 1), s.timestamp = b, s.isProcessing = !0, l.process(s), a.process(s), u.process(s), c.process(s), f.process(s), h.process(s), s.isProcessing = !1, n && t && (r = !1, e(g));
|
|
847
849
|
}, x = () => {
|
|
848
|
-
n = !0, r = !0,
|
|
850
|
+
n = !0, r = !0, s.isProcessing || e(g);
|
|
849
851
|
};
|
|
850
852
|
return { schedule: $t.reduce((b, S) => {
|
|
851
853
|
const C = o[S];
|
|
@@ -853,9 +855,9 @@ function Is(e, t) {
|
|
|
853
855
|
}, {}), cancel: (b) => {
|
|
854
856
|
for (let S = 0; S < $t.length; S++)
|
|
855
857
|
o[$t[S]].cancel(b);
|
|
856
|
-
}, state:
|
|
858
|
+
}, state: s, steps: o };
|
|
857
859
|
}
|
|
858
|
-
const { schedule: J, cancel: Be, state: ue, steps: hn } =
|
|
860
|
+
const { schedule: J, cancel: Be, state: ue, steps: hn } = Ii(typeof requestAnimationFrame < "u" ? requestAnimationFrame : we, !0), Fi = ct({ strict: !1 }), is = {
|
|
859
861
|
animation: [
|
|
860
862
|
"animate",
|
|
861
863
|
"variants",
|
|
@@ -875,9 +877,9 @@ const { schedule: J, cancel: Be, state: ue, steps: hn } = Is(typeof requestAnima
|
|
|
875
877
|
inView: ["whileInView", "onViewportEnter", "onViewportLeave"],
|
|
876
878
|
layout: ["layout", "layoutId"]
|
|
877
879
|
}, at = {};
|
|
878
|
-
for (const e in
|
|
880
|
+
for (const e in is)
|
|
879
881
|
at[e] = {
|
|
880
|
-
isEnabled: (t) =>
|
|
882
|
+
isEnabled: (t) => is[e].some((n) => !!t[n])
|
|
881
883
|
};
|
|
882
884
|
function qa(e) {
|
|
883
885
|
for (const t in e)
|
|
@@ -921,9 +923,9 @@ const Ha = /* @__PURE__ */ new Set([
|
|
|
921
923
|
function Gt(e) {
|
|
922
924
|
return e.startsWith("while") || e.startsWith("drag") && e !== "draggable" || e.startsWith("layout") || e.startsWith("onTap") || e.startsWith("onPan") || e.startsWith("onLayout") || Ha.has(e);
|
|
923
925
|
}
|
|
924
|
-
let
|
|
926
|
+
let Ni = (e) => !Gt(e);
|
|
925
927
|
function Xa(e) {
|
|
926
|
-
e && (
|
|
928
|
+
e && (Ni = (t) => t.startsWith("on") ? !Gt(t) : e(t));
|
|
927
929
|
}
|
|
928
930
|
try {
|
|
929
931
|
Xa(require("@emotion/is-prop-valid").default);
|
|
@@ -931,20 +933,20 @@ try {
|
|
|
931
933
|
}
|
|
932
934
|
function Za(e, t, n) {
|
|
933
935
|
const r = {};
|
|
934
|
-
for (const
|
|
935
|
-
|
|
936
|
+
for (const s in e)
|
|
937
|
+
s === "values" && typeof e.values == "object" || (Ni(s) || n === !0 && Gt(s) || !t && !Gt(s) || e.draggable && s.startsWith("onDrag")) && (r[s] = e[s]);
|
|
936
938
|
return r;
|
|
937
939
|
}
|
|
938
|
-
const
|
|
940
|
+
const os = /* @__PURE__ */ new Set();
|
|
939
941
|
function tn(e, t, n) {
|
|
940
|
-
e ||
|
|
942
|
+
e || os.has(t) || (console.warn(t), n && console.warn(n), os.add(t));
|
|
941
943
|
}
|
|
942
944
|
function Ja(e) {
|
|
943
945
|
if (typeof Proxy > "u")
|
|
944
946
|
return e;
|
|
945
947
|
const t = /* @__PURE__ */ new Map(), n = (...r) => (process.env.NODE_ENV !== "production" && tn(!1, "motion() is deprecated. Use motion.create() instead."), e(...r));
|
|
946
948
|
return new Proxy(n, {
|
|
947
|
-
get: (r,
|
|
949
|
+
get: (r, s) => s === "create" ? e : (t.has(s) || t.set(s, e(s)), t.get(s))
|
|
948
950
|
});
|
|
949
951
|
}
|
|
950
952
|
const nn = /* @__PURE__ */ ct({});
|
|
@@ -966,7 +968,7 @@ const or = [
|
|
|
966
968
|
function sn(e) {
|
|
967
969
|
return rn(e.animate) || ar.some((t) => Et(e[t]));
|
|
968
970
|
}
|
|
969
|
-
function
|
|
971
|
+
function Bi(e) {
|
|
970
972
|
return Boolean(sn(e) || e.variants);
|
|
971
973
|
}
|
|
972
974
|
function Qa(e, t) {
|
|
@@ -981,9 +983,9 @@ function Qa(e, t) {
|
|
|
981
983
|
}
|
|
982
984
|
function el(e) {
|
|
983
985
|
const { initial: t, animate: n } = Qa(e, pe(nn));
|
|
984
|
-
return He(() => ({ initial: t, animate: n }), [
|
|
986
|
+
return He(() => ({ initial: t, animate: n }), [as(t), as(n)]);
|
|
985
987
|
}
|
|
986
|
-
function
|
|
988
|
+
function as(e) {
|
|
987
989
|
return Array.isArray(e) ? e.join(" ") : e;
|
|
988
990
|
}
|
|
989
991
|
const tl = Symbol.for("motionComponentSymbol");
|
|
@@ -998,10 +1000,10 @@ function nl(e, t, n) {
|
|
|
998
1000
|
[t]
|
|
999
1001
|
);
|
|
1000
1002
|
}
|
|
1001
|
-
const lr = (e) => e.replace(/([a-z])([A-Z])/gu, "$1-$2").toLowerCase(), rl = "framerAppearId", $
|
|
1002
|
-
function
|
|
1003
|
-
var
|
|
1004
|
-
const { visualElement: l } = pe(nn), a = pe(
|
|
1003
|
+
const lr = (e) => e.replace(/([a-z])([A-Z])/gu, "$1-$2").toLowerCase(), rl = "framerAppearId", $i = "data-" + lr(rl), { schedule: cr, cancel: eh } = Ii(queueMicrotask, !1), Ui = ct({});
|
|
1004
|
+
function sl(e, t, n, r, s) {
|
|
1005
|
+
var i, o;
|
|
1006
|
+
const { visualElement: l } = pe(nn), a = pe(Fi), u = pe(en), c = pe(rr).reducedMotion, f = he(null);
|
|
1005
1007
|
r = r || a.renderer, !f.current && r && (f.current = r(e, {
|
|
1006
1008
|
visualState: t,
|
|
1007
1009
|
parent: l,
|
|
@@ -1010,14 +1012,14 @@ function il(e, t, n, r, i) {
|
|
|
1010
1012
|
blockInitialAnimation: u ? u.initial === !1 : !1,
|
|
1011
1013
|
reducedMotionConfig: c
|
|
1012
1014
|
}));
|
|
1013
|
-
const h = f.current, g = pe(
|
|
1014
|
-
h && !h.projection &&
|
|
1015
|
+
const h = f.current, g = pe(Ui);
|
|
1016
|
+
h && !h.projection && s && (h.type === "html" || h.type === "svg") && il(f.current, n, s, g);
|
|
1015
1017
|
const x = he(!1);
|
|
1016
|
-
|
|
1018
|
+
Vi(() => {
|
|
1017
1019
|
h && x.current && h.update(n, u);
|
|
1018
1020
|
});
|
|
1019
|
-
const y = n[$
|
|
1020
|
-
return
|
|
1021
|
+
const y = n[$i], P = he(Boolean(y) && !(!((i = window.MotionHandoffIsComplete) === null || i === void 0) && i.call(window, y)) && ((o = window.MotionHasOptimisedAnimation) === null || o === void 0 ? void 0 : o.call(window, y)));
|
|
1022
|
+
return Li(() => {
|
|
1021
1023
|
h && (x.current = !0, window.MotionIsMounted = !0, h.updateFeatures(), cr.render(h.render), P.current && h.animationState && h.animationState.animateChanges());
|
|
1022
1024
|
}), ut(() => {
|
|
1023
1025
|
h && (!P.current && h.animationState && h.animationState.animateChanges(), P.current && (queueMicrotask(() => {
|
|
@@ -1026,25 +1028,25 @@ function il(e, t, n, r, i) {
|
|
|
1026
1028
|
}), P.current = !1));
|
|
1027
1029
|
}), h;
|
|
1028
1030
|
}
|
|
1029
|
-
function
|
|
1030
|
-
const { layoutId:
|
|
1031
|
-
e.projection = new n(e.latestValues, t["data-framer-portal-id"] ? void 0 :
|
|
1032
|
-
layoutId:
|
|
1033
|
-
layout:
|
|
1031
|
+
function il(e, t, n, r) {
|
|
1032
|
+
const { layoutId: s, layout: i, drag: o, dragConstraints: l, layoutScroll: a, layoutRoot: u } = t;
|
|
1033
|
+
e.projection = new n(e.latestValues, t["data-framer-portal-id"] ? void 0 : Wi(e.parent)), e.projection.setOptions({
|
|
1034
|
+
layoutId: s,
|
|
1035
|
+
layout: i,
|
|
1034
1036
|
alwaysMeasureLayout: Boolean(o) || l && et(l),
|
|
1035
1037
|
visualElement: e,
|
|
1036
|
-
animationType: typeof
|
|
1038
|
+
animationType: typeof i == "string" ? i : "both",
|
|
1037
1039
|
initialPromotionConfig: r,
|
|
1038
1040
|
layoutScroll: a,
|
|
1039
1041
|
layoutRoot: u
|
|
1040
1042
|
});
|
|
1041
1043
|
}
|
|
1042
|
-
function
|
|
1044
|
+
function Wi(e) {
|
|
1043
1045
|
if (e)
|
|
1044
|
-
return e.options.allowProjection !== !1 ? e.projection :
|
|
1046
|
+
return e.options.allowProjection !== !1 ? e.projection : Wi(e.parent);
|
|
1045
1047
|
}
|
|
1046
|
-
function ol({ preloadedFeatures: e, createVisualElement: t, useRender: n, useVisualState: r, Component:
|
|
1047
|
-
var
|
|
1048
|
+
function ol({ preloadedFeatures: e, createVisualElement: t, useRender: n, useVisualState: r, Component: s }) {
|
|
1049
|
+
var i, o;
|
|
1048
1050
|
e && qa(e);
|
|
1049
1051
|
function l(u, c) {
|
|
1050
1052
|
let f;
|
|
@@ -1053,23 +1055,23 @@ function ol({ preloadedFeatures: e, createVisualElement: t, useRender: n, useVis
|
|
|
1053
1055
|
...u,
|
|
1054
1056
|
layoutId: al(u)
|
|
1055
1057
|
}, { isStatic: g } = h, x = el(u), y = r(u, g);
|
|
1056
|
-
if (!g &&
|
|
1058
|
+
if (!g && sr) {
|
|
1057
1059
|
ll(h, e);
|
|
1058
1060
|
const P = cl(h);
|
|
1059
|
-
f = P.MeasureLayout, x.visualElement =
|
|
1061
|
+
f = P.MeasureLayout, x.visualElement = sl(s, y, h, t, P.ProjectionNode);
|
|
1060
1062
|
}
|
|
1061
|
-
return m.exports.jsxs(nn.Provider, { value: x, children: [f && x.visualElement ? m.exports.jsx(f, { visualElement: x.visualElement, ...h }) : null, n(
|
|
1063
|
+
return m.exports.jsxs(nn.Provider, { value: x, children: [f && x.visualElement ? m.exports.jsx(f, { visualElement: x.visualElement, ...h }) : null, n(s, u, nl(y, x.visualElement, c), y, g, x.visualElement)] });
|
|
1062
1064
|
}
|
|
1063
|
-
l.displayName = `motion.${typeof
|
|
1065
|
+
l.displayName = `motion.${typeof s == "string" ? s : `create(${(o = (i = s.displayName) !== null && i !== void 0 ? i : s.name) !== null && o !== void 0 ? o : ""})`}`;
|
|
1064
1066
|
const a = Ot(l);
|
|
1065
|
-
return a[tl] =
|
|
1067
|
+
return a[tl] = s, a;
|
|
1066
1068
|
}
|
|
1067
1069
|
function al({ layoutId: e }) {
|
|
1068
1070
|
const t = pe(tr).id;
|
|
1069
1071
|
return t && e !== void 0 ? t + "-" + e : e;
|
|
1070
1072
|
}
|
|
1071
1073
|
function ll(e, t) {
|
|
1072
|
-
const n = pe(
|
|
1074
|
+
const n = pe(Fi).strict;
|
|
1073
1075
|
if (process.env.NODE_ENV !== "production" && t && n) {
|
|
1074
1076
|
const r = "You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";
|
|
1075
1077
|
e.ignoreStrict ? ft(!1, r) : Ne(!1, r);
|
|
@@ -1085,7 +1087,7 @@ function cl(e) {
|
|
|
1085
1087
|
ProjectionNode: r.ProjectionNode
|
|
1086
1088
|
};
|
|
1087
1089
|
}
|
|
1088
|
-
const
|
|
1090
|
+
const zi = (e) => (t) => typeof t == "string" && t.startsWith(e), ur = /* @__PURE__ */ zi("--"), ul = /* @__PURE__ */ zi("var(--"), fr = (e) => ul(e) ? fl.test(e.split("/*")[0].trim()) : !1, fl = /var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu, Rt = {};
|
|
1089
1091
|
function dl(e) {
|
|
1090
1092
|
for (const t in e)
|
|
1091
1093
|
Rt[t] = e[t], ur(t) && (Rt[t].isCSSVariable = !0);
|
|
@@ -1109,10 +1111,10 @@ const dt = [
|
|
|
1109
1111
|
"skewX",
|
|
1110
1112
|
"skewY"
|
|
1111
1113
|
], Xe = new Set(dt);
|
|
1112
|
-
function
|
|
1114
|
+
function Yi(e, { layout: t, layoutId: n }) {
|
|
1113
1115
|
return Xe.has(e) || e.startsWith("origin") || (t || n !== void 0) && (!!Rt[e] || e === "opacity");
|
|
1114
1116
|
}
|
|
1115
|
-
const me = (e) => Boolean(e && e.getVelocity),
|
|
1117
|
+
const me = (e) => Boolean(e && e.getVelocity), Ki = (e, t) => t && typeof e == "number" ? t.transform(e) : e, _e = (e, t, n) => n > t ? t : n < e ? e : n, ht = {
|
|
1116
1118
|
test: (e) => typeof e == "number",
|
|
1117
1119
|
parse: parseFloat,
|
|
1118
1120
|
transform: (e) => e
|
|
@@ -1126,7 +1128,7 @@ const me = (e) => Boolean(e && e.getVelocity), Ks = (e, t) => t && typeof e == "
|
|
|
1126
1128
|
test: (t) => typeof t == "string" && t.endsWith(e) && t.split(" ").length === 1,
|
|
1127
1129
|
parse: parseFloat,
|
|
1128
1130
|
transform: (t) => `${t}${e}`
|
|
1129
|
-
}), Ie = /* @__PURE__ */ Lt("deg"), Ve = /* @__PURE__ */ Lt("%"), L = /* @__PURE__ */ Lt("px"), hl = /* @__PURE__ */ Lt("vh"), pl = /* @__PURE__ */ Lt("vw"),
|
|
1131
|
+
}), Ie = /* @__PURE__ */ Lt("deg"), Ve = /* @__PURE__ */ Lt("%"), L = /* @__PURE__ */ Lt("px"), hl = /* @__PURE__ */ Lt("vh"), pl = /* @__PURE__ */ Lt("vw"), ls = {
|
|
1130
1132
|
...Ve,
|
|
1131
1133
|
parse: (e) => Ve.parse(e) / 100,
|
|
1132
1134
|
transform: (e) => Ve.transform(e * 100)
|
|
@@ -1184,20 +1186,20 @@ const me = (e) => Boolean(e && e.getVelocity), Ks = (e, t) => t && typeof e == "
|
|
|
1184
1186
|
perspective: L,
|
|
1185
1187
|
transformPerspective: L,
|
|
1186
1188
|
opacity: At,
|
|
1187
|
-
originX:
|
|
1188
|
-
originY:
|
|
1189
|
+
originX: ls,
|
|
1190
|
+
originY: ls,
|
|
1189
1191
|
originZ: L
|
|
1190
|
-
},
|
|
1192
|
+
}, cs = {
|
|
1191
1193
|
...ht,
|
|
1192
1194
|
transform: Math.round
|
|
1193
1195
|
}, dr = {
|
|
1194
1196
|
...ml,
|
|
1195
1197
|
...gl,
|
|
1196
|
-
zIndex:
|
|
1198
|
+
zIndex: cs,
|
|
1197
1199
|
size: L,
|
|
1198
1200
|
fillOpacity: At,
|
|
1199
1201
|
strokeOpacity: At,
|
|
1200
|
-
numOctaves:
|
|
1202
|
+
numOctaves: cs
|
|
1201
1203
|
}, yl = {
|
|
1202
1204
|
x: "translateX",
|
|
1203
1205
|
y: "translateY",
|
|
@@ -1205,26 +1207,26 @@ const me = (e) => Boolean(e && e.getVelocity), Ks = (e, t) => t && typeof e == "
|
|
|
1205
1207
|
transformPerspective: "perspective"
|
|
1206
1208
|
}, vl = dt.length;
|
|
1207
1209
|
function xl(e, t, n) {
|
|
1208
|
-
let r = "",
|
|
1209
|
-
for (let
|
|
1210
|
-
const o = dt[
|
|
1210
|
+
let r = "", s = !0;
|
|
1211
|
+
for (let i = 0; i < vl; i++) {
|
|
1212
|
+
const o = dt[i], l = e[o];
|
|
1211
1213
|
if (l === void 0)
|
|
1212
1214
|
continue;
|
|
1213
1215
|
let a = !0;
|
|
1214
1216
|
if (typeof l == "number" ? a = l === (o.startsWith("scale") ? 1 : 0) : a = parseFloat(l) === 0, !a || n) {
|
|
1215
|
-
const u =
|
|
1217
|
+
const u = Ki(l, dr[o]);
|
|
1216
1218
|
if (!a) {
|
|
1217
|
-
|
|
1219
|
+
s = !1;
|
|
1218
1220
|
const c = yl[o] || o;
|
|
1219
1221
|
r += `${c}(${u}) `;
|
|
1220
1222
|
}
|
|
1221
1223
|
n && (t[o] = u);
|
|
1222
1224
|
}
|
|
1223
1225
|
}
|
|
1224
|
-
return r = r.trim(), n ? r = n(t,
|
|
1226
|
+
return r = r.trim(), n ? r = n(t, s ? "" : r) : s && (r = "none"), r;
|
|
1225
1227
|
}
|
|
1226
1228
|
function hr(e, t, n) {
|
|
1227
|
-
const { style: r, vars:
|
|
1229
|
+
const { style: r, vars: s, transformOrigin: i } = e;
|
|
1228
1230
|
let o = !1, l = !1;
|
|
1229
1231
|
for (const a in t) {
|
|
1230
1232
|
const u = t[a];
|
|
@@ -1232,15 +1234,15 @@ function hr(e, t, n) {
|
|
|
1232
1234
|
o = !0;
|
|
1233
1235
|
continue;
|
|
1234
1236
|
} else if (ur(a)) {
|
|
1235
|
-
|
|
1237
|
+
s[a] = u;
|
|
1236
1238
|
continue;
|
|
1237
1239
|
} else {
|
|
1238
|
-
const c =
|
|
1239
|
-
a.startsWith("origin") ? (l = !0,
|
|
1240
|
+
const c = Ki(u, dr[a]);
|
|
1241
|
+
a.startsWith("origin") ? (l = !0, i[a] = c) : r[a] = c;
|
|
1240
1242
|
}
|
|
1241
1243
|
}
|
|
1242
1244
|
if (t.transform || (o || n ? r.transform = xl(t, e.transform, n) : r.transform && (r.transform = "none")), l) {
|
|
1243
|
-
const { originX: a = "50%", originY: u = "50%", originZ: c = 0 } =
|
|
1245
|
+
const { originX: a = "50%", originY: u = "50%", originZ: c = 0 } = i;
|
|
1244
1246
|
r.transformOrigin = `${a} ${u} ${c}`;
|
|
1245
1247
|
}
|
|
1246
1248
|
}
|
|
@@ -1250,9 +1252,9 @@ const pr = () => ({
|
|
|
1250
1252
|
transformOrigin: {},
|
|
1251
1253
|
vars: {}
|
|
1252
1254
|
});
|
|
1253
|
-
function
|
|
1255
|
+
function Gi(e, t, n) {
|
|
1254
1256
|
for (const r in t)
|
|
1255
|
-
!me(t[r]) && !
|
|
1257
|
+
!me(t[r]) && !Yi(r, n) && (e[r] = t[r]);
|
|
1256
1258
|
}
|
|
1257
1259
|
function bl({ transformTemplate: e }, t) {
|
|
1258
1260
|
return He(() => {
|
|
@@ -1262,7 +1264,7 @@ function bl({ transformTemplate: e }, t) {
|
|
|
1262
1264
|
}
|
|
1263
1265
|
function Tl(e, t) {
|
|
1264
1266
|
const n = e.style || {}, r = {};
|
|
1265
|
-
return
|
|
1267
|
+
return Gi(r, n, e), Object.assign(r, bl(e, t)), r;
|
|
1266
1268
|
}
|
|
1267
1269
|
function wl(e, t) {
|
|
1268
1270
|
const n = {}, r = Tl(e, t);
|
|
@@ -1305,26 +1307,26 @@ const Sl = {
|
|
|
1305
1307
|
offset: "strokeDashoffset",
|
|
1306
1308
|
array: "strokeDasharray"
|
|
1307
1309
|
};
|
|
1308
|
-
function El(e, t, n = 1, r = 0,
|
|
1310
|
+
function El(e, t, n = 1, r = 0, s = !0) {
|
|
1309
1311
|
e.pathLength = 1;
|
|
1310
|
-
const
|
|
1311
|
-
e[
|
|
1312
|
+
const i = s ? Sl : Cl;
|
|
1313
|
+
e[i.offset] = L.transform(-r);
|
|
1312
1314
|
const o = L.transform(t), l = L.transform(n);
|
|
1313
|
-
e[
|
|
1315
|
+
e[i.array] = `${o} ${l}`;
|
|
1314
1316
|
}
|
|
1315
|
-
function
|
|
1317
|
+
function us(e, t, n) {
|
|
1316
1318
|
return typeof e == "string" ? e : L.transform(t + n * e);
|
|
1317
1319
|
}
|
|
1318
1320
|
function Rl(e, t, n) {
|
|
1319
|
-
const r =
|
|
1320
|
-
return `${r} ${
|
|
1321
|
+
const r = us(t, e.x, e.width), s = us(n, e.y, e.height);
|
|
1322
|
+
return `${r} ${s}`;
|
|
1321
1323
|
}
|
|
1322
1324
|
function gr(e, {
|
|
1323
1325
|
attrX: t,
|
|
1324
1326
|
attrY: n,
|
|
1325
1327
|
attrScale: r,
|
|
1326
|
-
originX:
|
|
1327
|
-
originY:
|
|
1328
|
+
originX: s,
|
|
1329
|
+
originY: i,
|
|
1328
1330
|
pathLength: o,
|
|
1329
1331
|
pathSpacing: l = 1,
|
|
1330
1332
|
pathOffset: a = 0,
|
|
@@ -1336,36 +1338,36 @@ function gr(e, {
|
|
|
1336
1338
|
}
|
|
1337
1339
|
e.attrs = e.style, e.style = {};
|
|
1338
1340
|
const { attrs: h, style: g, dimensions: x } = e;
|
|
1339
|
-
h.transform && (x && (g.transform = h.transform), delete h.transform), x && (
|
|
1341
|
+
h.transform && (x && (g.transform = h.transform), delete h.transform), x && (s !== void 0 || i !== void 0 || g.transform) && (g.transformOrigin = Rl(x, s !== void 0 ? s : 0.5, i !== void 0 ? i : 0.5)), t !== void 0 && (h.x = t), n !== void 0 && (h.y = n), r !== void 0 && (h.scale = r), o !== void 0 && El(h, o, l, a, !1);
|
|
1340
1342
|
}
|
|
1341
|
-
const
|
|
1343
|
+
const qi = () => ({
|
|
1342
1344
|
...pr(),
|
|
1343
1345
|
attrs: {}
|
|
1344
1346
|
}), yr = (e) => typeof e == "string" && e.toLowerCase() === "svg";
|
|
1345
1347
|
function Al(e, t, n, r) {
|
|
1346
|
-
const
|
|
1347
|
-
const
|
|
1348
|
-
return gr(
|
|
1349
|
-
...
|
|
1350
|
-
style: { ...
|
|
1348
|
+
const s = He(() => {
|
|
1349
|
+
const i = qi();
|
|
1350
|
+
return gr(i, t, yr(r), e.transformTemplate), {
|
|
1351
|
+
...i.attrs,
|
|
1352
|
+
style: { ...i.style }
|
|
1351
1353
|
};
|
|
1352
1354
|
}, [t]);
|
|
1353
1355
|
if (e.style) {
|
|
1354
|
-
const
|
|
1355
|
-
|
|
1356
|
+
const i = {};
|
|
1357
|
+
Gi(i, e.style, e), s.style = { ...i, ...s.style };
|
|
1356
1358
|
}
|
|
1357
|
-
return
|
|
1359
|
+
return s;
|
|
1358
1360
|
}
|
|
1359
1361
|
function jl(e = !1) {
|
|
1360
|
-
return (n, r,
|
|
1361
|
-
const a = (mr(n) ? Al : wl)(r,
|
|
1362
|
+
return (n, r, s, { latestValues: i }, o) => {
|
|
1363
|
+
const a = (mr(n) ? Al : wl)(r, i, o, n), u = Za(r, typeof n == "string", e), c = n !== Di ? { ...u, ...a, ref: s } : {}, { children: f } = r, h = He(() => me(f) ? f.get() : f, [f]);
|
|
1362
1364
|
return Ia(n, {
|
|
1363
1365
|
...c,
|
|
1364
1366
|
children: h
|
|
1365
1367
|
});
|
|
1366
1368
|
};
|
|
1367
1369
|
}
|
|
1368
|
-
function
|
|
1370
|
+
function fs(e) {
|
|
1369
1371
|
const t = [{}, {}];
|
|
1370
1372
|
return e == null || e.values.forEach((n, r) => {
|
|
1371
1373
|
t[0][r] = n.get(), t[1][r] = n.getVelocity();
|
|
@@ -1373,12 +1375,12 @@ function fi(e) {
|
|
|
1373
1375
|
}
|
|
1374
1376
|
function vr(e, t, n, r) {
|
|
1375
1377
|
if (typeof t == "function") {
|
|
1376
|
-
const [
|
|
1377
|
-
t = t(n !== void 0 ? n : e.custom,
|
|
1378
|
+
const [s, i] = fs(r);
|
|
1379
|
+
t = t(n !== void 0 ? n : e.custom, s, i);
|
|
1378
1380
|
}
|
|
1379
1381
|
if (typeof t == "string" && (t = e.variants && e.variants[t]), typeof t == "function") {
|
|
1380
|
-
const [
|
|
1381
|
-
t = t(n !== void 0 ? n : e.custom,
|
|
1382
|
+
const [s, i] = fs(r);
|
|
1383
|
+
t = t(n !== void 0 ? n : e.custom, s, i);
|
|
1382
1384
|
}
|
|
1383
1385
|
return t;
|
|
1384
1386
|
}
|
|
@@ -1387,23 +1389,23 @@ function zt(e) {
|
|
|
1387
1389
|
const t = me(e) ? e.get() : e;
|
|
1388
1390
|
return Ml(t) ? t.toValue() : t;
|
|
1389
1391
|
}
|
|
1390
|
-
function Dl({ scrapeMotionValuesFromProps: e, createRenderState: t, onUpdate: n }, r,
|
|
1392
|
+
function Dl({ scrapeMotionValuesFromProps: e, createRenderState: t, onUpdate: n }, r, s, i) {
|
|
1391
1393
|
const o = {
|
|
1392
|
-
latestValues: Ol(r,
|
|
1394
|
+
latestValues: Ol(r, s, i, e),
|
|
1393
1395
|
renderState: t()
|
|
1394
1396
|
};
|
|
1395
1397
|
return n && (o.onMount = (l) => n({ props: r, current: l, ...o }), o.onUpdate = (l) => n(l)), o;
|
|
1396
1398
|
}
|
|
1397
|
-
const
|
|
1398
|
-
const r = pe(nn),
|
|
1399
|
-
return n ?
|
|
1399
|
+
const Hi = (e) => (t, n) => {
|
|
1400
|
+
const r = pe(nn), s = pe(en), i = () => Dl(e, t, r, s);
|
|
1401
|
+
return n ? i() : nr(i);
|
|
1400
1402
|
};
|
|
1401
1403
|
function Ol(e, t, n, r) {
|
|
1402
|
-
const
|
|
1403
|
-
for (const h in
|
|
1404
|
-
|
|
1404
|
+
const s = {}, i = r(e, {});
|
|
1405
|
+
for (const h in i)
|
|
1406
|
+
s[h] = zt(i[h]);
|
|
1405
1407
|
let { initial: o, animate: l } = e;
|
|
1406
|
-
const a = sn(e), u =
|
|
1408
|
+
const a = sn(e), u = Bi(e);
|
|
1407
1409
|
t && u && !a && e.inherit !== !1 && (o === void 0 && (o = t.initial), l === void 0 && (l = t.animate));
|
|
1408
1410
|
let c = n ? n.initial === !1 : !1;
|
|
1409
1411
|
c = c || o === !1;
|
|
@@ -1420,29 +1422,29 @@ function Ol(e, t, n, r) {
|
|
|
1420
1422
|
const V = c ? C.length - 1 : 0;
|
|
1421
1423
|
C = C[V];
|
|
1422
1424
|
}
|
|
1423
|
-
C !== null && (
|
|
1425
|
+
C !== null && (s[S] = C);
|
|
1424
1426
|
}
|
|
1425
1427
|
for (const S in y)
|
|
1426
|
-
|
|
1428
|
+
s[S] = y[S];
|
|
1427
1429
|
}
|
|
1428
1430
|
}
|
|
1429
1431
|
}
|
|
1430
|
-
return
|
|
1432
|
+
return s;
|
|
1431
1433
|
}
|
|
1432
1434
|
function xr(e, t, n) {
|
|
1433
1435
|
var r;
|
|
1434
|
-
const { style:
|
|
1435
|
-
for (const o in
|
|
1436
|
-
(me(
|
|
1437
|
-
return
|
|
1436
|
+
const { style: s } = e, i = {};
|
|
1437
|
+
for (const o in s)
|
|
1438
|
+
(me(s[o]) || t.style && me(t.style[o]) || Yi(o, e) || ((r = n == null ? void 0 : n.getValue(o)) === null || r === void 0 ? void 0 : r.liveStyle) !== void 0) && (i[o] = s[o]);
|
|
1439
|
+
return i;
|
|
1438
1440
|
}
|
|
1439
1441
|
const Ll = {
|
|
1440
|
-
useVisualState:
|
|
1442
|
+
useVisualState: Hi({
|
|
1441
1443
|
scrapeMotionValuesFromProps: xr,
|
|
1442
1444
|
createRenderState: pr
|
|
1443
1445
|
})
|
|
1444
1446
|
};
|
|
1445
|
-
function
|
|
1447
|
+
function Xi(e, t) {
|
|
1446
1448
|
try {
|
|
1447
1449
|
t.dimensions = typeof e.getBBox == "function" ? e.getBBox() : e.getBoundingClientRect();
|
|
1448
1450
|
} catch {
|
|
@@ -1454,12 +1456,12 @@ function Xs(e, t) {
|
|
|
1454
1456
|
};
|
|
1455
1457
|
}
|
|
1456
1458
|
}
|
|
1457
|
-
function
|
|
1458
|
-
Object.assign(e.style, t,
|
|
1459
|
-
for (const
|
|
1460
|
-
e.style.setProperty(
|
|
1459
|
+
function Zi(e, { style: t, vars: n }, r, s) {
|
|
1460
|
+
Object.assign(e.style, t, s && s.getProjectionStyles(r));
|
|
1461
|
+
for (const i in n)
|
|
1462
|
+
e.style.setProperty(i, n[i]);
|
|
1461
1463
|
}
|
|
1462
|
-
const
|
|
1464
|
+
const Ji = /* @__PURE__ */ new Set([
|
|
1463
1465
|
"baseFrequency",
|
|
1464
1466
|
"diffuseConstant",
|
|
1465
1467
|
"kernelMatrix",
|
|
@@ -1484,57 +1486,57 @@ const Js = /* @__PURE__ */ new Set([
|
|
|
1484
1486
|
"textLength",
|
|
1485
1487
|
"lengthAdjust"
|
|
1486
1488
|
]);
|
|
1487
|
-
function
|
|
1488
|
-
|
|
1489
|
-
for (const
|
|
1490
|
-
e.setAttribute(
|
|
1489
|
+
function Qi(e, t, n, r) {
|
|
1490
|
+
Zi(e, t, void 0, r);
|
|
1491
|
+
for (const s in t.attrs)
|
|
1492
|
+
e.setAttribute(Ji.has(s) ? s : lr(s), t.attrs[s]);
|
|
1491
1493
|
}
|
|
1492
1494
|
function eo(e, t, n) {
|
|
1493
1495
|
const r = xr(e, t, n);
|
|
1494
|
-
for (const
|
|
1495
|
-
if (me(e[
|
|
1496
|
-
const
|
|
1497
|
-
r[
|
|
1496
|
+
for (const s in e)
|
|
1497
|
+
if (me(e[s]) || me(t[s])) {
|
|
1498
|
+
const i = dt.indexOf(s) !== -1 ? "attr" + s.charAt(0).toUpperCase() + s.substring(1) : s;
|
|
1499
|
+
r[i] = e[s];
|
|
1498
1500
|
}
|
|
1499
1501
|
return r;
|
|
1500
1502
|
}
|
|
1501
|
-
const
|
|
1502
|
-
useVisualState:
|
|
1503
|
+
const ds = ["x", "y", "width", "height", "cx", "cy", "r"], kl = {
|
|
1504
|
+
useVisualState: Hi({
|
|
1503
1505
|
scrapeMotionValuesFromProps: eo,
|
|
1504
|
-
createRenderState:
|
|
1505
|
-
onUpdate: ({ props: e, prevProps: t, current: n, renderState: r, latestValues:
|
|
1506
|
+
createRenderState: qi,
|
|
1507
|
+
onUpdate: ({ props: e, prevProps: t, current: n, renderState: r, latestValues: s }) => {
|
|
1506
1508
|
if (!n)
|
|
1507
1509
|
return;
|
|
1508
|
-
let
|
|
1509
|
-
if (!
|
|
1510
|
-
for (const l in
|
|
1510
|
+
let i = !!e.drag;
|
|
1511
|
+
if (!i) {
|
|
1512
|
+
for (const l in s)
|
|
1511
1513
|
if (Xe.has(l)) {
|
|
1512
|
-
|
|
1514
|
+
i = !0;
|
|
1513
1515
|
break;
|
|
1514
1516
|
}
|
|
1515
1517
|
}
|
|
1516
|
-
if (!
|
|
1518
|
+
if (!i)
|
|
1517
1519
|
return;
|
|
1518
1520
|
let o = !t;
|
|
1519
1521
|
if (t)
|
|
1520
|
-
for (let l = 0; l <
|
|
1521
|
-
const a =
|
|
1522
|
+
for (let l = 0; l < ds.length; l++) {
|
|
1523
|
+
const a = ds[l];
|
|
1522
1524
|
e[a] !== t[a] && (o = !0);
|
|
1523
1525
|
}
|
|
1524
1526
|
o && J.read(() => {
|
|
1525
|
-
|
|
1526
|
-
gr(r,
|
|
1527
|
+
Xi(n, r), J.render(() => {
|
|
1528
|
+
gr(r, s, yr(n.tagName), e.transformTemplate), Qi(n, r);
|
|
1527
1529
|
});
|
|
1528
1530
|
});
|
|
1529
1531
|
}
|
|
1530
1532
|
})
|
|
1531
1533
|
};
|
|
1532
1534
|
function _l(e, t) {
|
|
1533
|
-
return function(r, { forwardMotionProps:
|
|
1535
|
+
return function(r, { forwardMotionProps: s } = { forwardMotionProps: !1 }) {
|
|
1534
1536
|
const o = {
|
|
1535
1537
|
...mr(r) ? kl : Ll,
|
|
1536
1538
|
preloadedFeatures: e,
|
|
1537
|
-
useRender: jl(
|
|
1539
|
+
useRender: jl(s),
|
|
1538
1540
|
createVisualElement: t,
|
|
1539
1541
|
Component: r
|
|
1540
1542
|
};
|
|
@@ -1545,7 +1547,7 @@ function jt(e, t, n) {
|
|
|
1545
1547
|
const r = e.getProps();
|
|
1546
1548
|
return vr(r, t, n !== void 0 ? n : r.custom, e);
|
|
1547
1549
|
}
|
|
1548
|
-
const Il =
|
|
1550
|
+
const Il = ir(() => window.ScrollTimeline !== void 0);
|
|
1549
1551
|
class Fl {
|
|
1550
1552
|
constructor(t) {
|
|
1551
1553
|
this.stop = () => this.runAll("stop"), this.animations = t.filter(Boolean);
|
|
@@ -1561,15 +1563,15 @@ class Fl {
|
|
|
1561
1563
|
this.animations[r][t] = n;
|
|
1562
1564
|
}
|
|
1563
1565
|
attachTimeline(t, n) {
|
|
1564
|
-
const r = this.animations.map((
|
|
1565
|
-
if (Il() &&
|
|
1566
|
-
return
|
|
1566
|
+
const r = this.animations.map((s) => {
|
|
1567
|
+
if (Il() && s.attachTimeline)
|
|
1568
|
+
return s.attachTimeline(t);
|
|
1567
1569
|
if (typeof n == "function")
|
|
1568
|
-
return n(
|
|
1570
|
+
return n(s);
|
|
1569
1571
|
});
|
|
1570
1572
|
return () => {
|
|
1571
|
-
r.forEach((
|
|
1572
|
-
|
|
1573
|
+
r.forEach((s, i) => {
|
|
1574
|
+
s && s(), this.animations[i].stop();
|
|
1573
1575
|
});
|
|
1574
1576
|
};
|
|
1575
1577
|
}
|
|
@@ -1633,14 +1635,14 @@ function to(e) {
|
|
|
1633
1635
|
function Tr(e) {
|
|
1634
1636
|
return typeof e == "function";
|
|
1635
1637
|
}
|
|
1636
|
-
function
|
|
1638
|
+
function hs(e, t) {
|
|
1637
1639
|
e.timeline = t, e.onfinish = null;
|
|
1638
1640
|
}
|
|
1639
1641
|
const wr = (e) => Array.isArray(e) && typeof e[0] == "number", Bl = {
|
|
1640
1642
|
linearEasing: void 0
|
|
1641
1643
|
};
|
|
1642
1644
|
function $l(e, t) {
|
|
1643
|
-
const n =
|
|
1645
|
+
const n = ir(e);
|
|
1644
1646
|
return () => {
|
|
1645
1647
|
var r;
|
|
1646
1648
|
return (r = Bl[t]) !== null && r !== void 0 ? r : n();
|
|
@@ -1655,9 +1657,9 @@ const qt = /* @__PURE__ */ $l(() => {
|
|
|
1655
1657
|
return !0;
|
|
1656
1658
|
}, "linearEasing"), no = (e, t, n = 10) => {
|
|
1657
1659
|
let r = "";
|
|
1658
|
-
const
|
|
1659
|
-
for (let
|
|
1660
|
-
r += e(ot(0,
|
|
1660
|
+
const s = Math.max(Math.round(t / n), 2);
|
|
1661
|
+
for (let i = 0; i < s; i++)
|
|
1662
|
+
r += e(ot(0, s - 1, i)) + ", ";
|
|
1661
1663
|
return `linear(${r.substring(0, r.length - 2)})`;
|
|
1662
1664
|
};
|
|
1663
1665
|
function ro(e) {
|
|
@@ -1674,15 +1676,15 @@ const xt = ([e, t, n, r]) => `cubic-bezier(${e}, ${t}, ${n}, ${r})`, kn = {
|
|
|
1674
1676
|
backIn: /* @__PURE__ */ xt([0.31, 0.01, 0.66, -0.59]),
|
|
1675
1677
|
backOut: /* @__PURE__ */ xt([0.33, 1.53, 0.69, 0.99])
|
|
1676
1678
|
};
|
|
1677
|
-
function
|
|
1679
|
+
function so(e, t) {
|
|
1678
1680
|
if (e)
|
|
1679
|
-
return typeof e == "function" && qt() ? no(e, t) : wr(e) ? xt(e) : Array.isArray(e) ? e.map((n) =>
|
|
1681
|
+
return typeof e == "function" && qt() ? no(e, t) : wr(e) ? xt(e) : Array.isArray(e) ? e.map((n) => so(n, t) || kn.easeOut) : kn[e];
|
|
1680
1682
|
}
|
|
1681
1683
|
const je = {
|
|
1682
1684
|
x: !1,
|
|
1683
1685
|
y: !1
|
|
1684
1686
|
};
|
|
1685
|
-
function
|
|
1687
|
+
function io() {
|
|
1686
1688
|
return je.x || je.y;
|
|
1687
1689
|
}
|
|
1688
1690
|
function Ul(e, t, n) {
|
|
@@ -1690,39 +1692,39 @@ function Ul(e, t, n) {
|
|
|
1690
1692
|
if (e instanceof EventTarget)
|
|
1691
1693
|
return [e];
|
|
1692
1694
|
if (typeof e == "string") {
|
|
1693
|
-
let
|
|
1694
|
-
t && (
|
|
1695
|
-
const
|
|
1696
|
-
return
|
|
1695
|
+
let s = document;
|
|
1696
|
+
t && (s = t.current);
|
|
1697
|
+
const i = (r = n == null ? void 0 : n[e]) !== null && r !== void 0 ? r : s.querySelectorAll(e);
|
|
1698
|
+
return i ? Array.from(i) : [];
|
|
1697
1699
|
}
|
|
1698
1700
|
return Array.from(e);
|
|
1699
1701
|
}
|
|
1700
1702
|
function oo(e, t) {
|
|
1701
|
-
const n = Ul(e), r = new AbortController(),
|
|
1703
|
+
const n = Ul(e), r = new AbortController(), s = {
|
|
1702
1704
|
passive: !0,
|
|
1703
1705
|
...t,
|
|
1704
1706
|
signal: r.signal
|
|
1705
1707
|
};
|
|
1706
|
-
return [n,
|
|
1708
|
+
return [n, s, () => r.abort()];
|
|
1707
1709
|
}
|
|
1708
|
-
function
|
|
1709
|
-
return !(e.pointerType === "touch" ||
|
|
1710
|
+
function ps(e) {
|
|
1711
|
+
return !(e.pointerType === "touch" || io());
|
|
1710
1712
|
}
|
|
1711
1713
|
function Wl(e, t, n = {}) {
|
|
1712
|
-
const [r,
|
|
1713
|
-
if (!
|
|
1714
|
+
const [r, s, i] = oo(e, n), o = (l) => {
|
|
1715
|
+
if (!ps(l))
|
|
1714
1716
|
return;
|
|
1715
1717
|
const { target: a } = l, u = t(a, l);
|
|
1716
1718
|
if (typeof u != "function" || !a)
|
|
1717
1719
|
return;
|
|
1718
1720
|
const c = (f) => {
|
|
1719
|
-
|
|
1721
|
+
ps(f) && (u(f), a.removeEventListener("pointerleave", c));
|
|
1720
1722
|
};
|
|
1721
|
-
a.addEventListener("pointerleave", c,
|
|
1723
|
+
a.addEventListener("pointerleave", c, s);
|
|
1722
1724
|
};
|
|
1723
1725
|
return r.forEach((l) => {
|
|
1724
|
-
l.addEventListener("pointerenter", o,
|
|
1725
|
-
}),
|
|
1726
|
+
l.addEventListener("pointerenter", o, s);
|
|
1727
|
+
}), i;
|
|
1726
1728
|
}
|
|
1727
1729
|
function Ht(e, t) {
|
|
1728
1730
|
const n = `${t}PointerCapture`;
|
|
@@ -1743,7 +1745,7 @@ function Yl(e) {
|
|
|
1743
1745
|
return zl.has(e.tagName) || e.tabIndex !== -1;
|
|
1744
1746
|
}
|
|
1745
1747
|
const bt = /* @__PURE__ */ new WeakSet();
|
|
1746
|
-
function
|
|
1748
|
+
function ms(e) {
|
|
1747
1749
|
return (t) => {
|
|
1748
1750
|
t.key === "Enter" && e(t);
|
|
1749
1751
|
};
|
|
@@ -1755,28 +1757,28 @@ const Kl = (e, t) => {
|
|
|
1755
1757
|
const n = e.currentTarget;
|
|
1756
1758
|
if (!n)
|
|
1757
1759
|
return;
|
|
1758
|
-
const r =
|
|
1760
|
+
const r = ms(() => {
|
|
1759
1761
|
if (bt.has(n))
|
|
1760
1762
|
return;
|
|
1761
1763
|
pn(n, "down");
|
|
1762
|
-
const
|
|
1764
|
+
const s = ms(() => {
|
|
1763
1765
|
pn(n, "up");
|
|
1764
|
-
}),
|
|
1765
|
-
n.addEventListener("keyup",
|
|
1766
|
+
}), i = () => pn(n, "cancel");
|
|
1767
|
+
n.addEventListener("keyup", s, t), n.addEventListener("blur", i, t);
|
|
1766
1768
|
});
|
|
1767
1769
|
n.addEventListener("keydown", r, t), n.addEventListener("blur", () => n.removeEventListener("keydown", r), t);
|
|
1768
1770
|
};
|
|
1769
|
-
function
|
|
1770
|
-
return Pr(e) && !
|
|
1771
|
+
function gs(e) {
|
|
1772
|
+
return Pr(e) && !io();
|
|
1771
1773
|
}
|
|
1772
1774
|
function Gl(e, t, n = {}) {
|
|
1773
|
-
const [r,
|
|
1775
|
+
const [r, s, i] = oo(e, n), o = (l) => {
|
|
1774
1776
|
const a = l.currentTarget;
|
|
1775
|
-
if (!a || !
|
|
1777
|
+
if (!a || !gs(l) || bt.has(a))
|
|
1776
1778
|
return;
|
|
1777
1779
|
bt.add(a), Ht(l, "set");
|
|
1778
1780
|
const u = t(a, l), c = (g, x) => {
|
|
1779
|
-
a.removeEventListener("pointerup", f), a.removeEventListener("pointercancel", h), Ht(g, "release"), !(!
|
|
1781
|
+
a.removeEventListener("pointerup", f), a.removeEventListener("pointercancel", h), Ht(g, "release"), !(!gs(g) || !bt.has(a)) && (bt.delete(a), typeof u == "function" && u(g, { success: x }));
|
|
1780
1782
|
}, f = (g) => {
|
|
1781
1783
|
(g.isTrusted ? ql(g, a instanceof Element ? a.getBoundingClientRect() : {
|
|
1782
1784
|
left: 0,
|
|
@@ -1787,13 +1789,13 @@ function Gl(e, t, n = {}) {
|
|
|
1787
1789
|
}, h = (g) => {
|
|
1788
1790
|
c(g, !1);
|
|
1789
1791
|
};
|
|
1790
|
-
a.addEventListener("pointerup", f,
|
|
1792
|
+
a.addEventListener("pointerup", f, s), a.addEventListener("pointercancel", h, s), a.addEventListener("lostpointercapture", h, s);
|
|
1791
1793
|
};
|
|
1792
1794
|
return r.forEach((l) => {
|
|
1793
1795
|
l = n.useGlobalTarget ? window : l;
|
|
1794
1796
|
let a = !1;
|
|
1795
|
-
l instanceof HTMLElement && (a = !0, !Yl(l) && l.getAttribute("tabindex") === null && (l.tabIndex = 0)), l.addEventListener("pointerdown", o,
|
|
1796
|
-
}),
|
|
1797
|
+
l instanceof HTMLElement && (a = !0, !Yl(l) && l.getAttribute("tabindex") === null && (l.tabIndex = 0)), l.addEventListener("pointerdown", o, s), a && l.addEventListener("focus", (u) => Kl(u, s), s);
|
|
1798
|
+
}), i;
|
|
1797
1799
|
}
|
|
1798
1800
|
function ql(e, t) {
|
|
1799
1801
|
return e.clientX < t.left || e.clientX > t.right || e.clientY < t.top || e.clientY > t.bottom;
|
|
@@ -1819,7 +1821,7 @@ function Xl() {
|
|
|
1819
1821
|
Yt = void 0;
|
|
1820
1822
|
}
|
|
1821
1823
|
const De = {
|
|
1822
|
-
now: () => (Yt === void 0 && De.set(ue.isProcessing ||
|
|
1824
|
+
now: () => (Yt === void 0 && De.set(ue.isProcessing || _i.useManualTiming ? ue.timestamp : performance.now()), Yt),
|
|
1823
1825
|
set: (e) => {
|
|
1824
1826
|
Yt = e, queueMicrotask(Xl);
|
|
1825
1827
|
}
|
|
@@ -1839,13 +1841,13 @@ class Er {
|
|
|
1839
1841
|
return Sr(this.subscriptions, t), () => Cr(this.subscriptions, t);
|
|
1840
1842
|
}
|
|
1841
1843
|
notify(t, n, r) {
|
|
1842
|
-
const
|
|
1843
|
-
if (
|
|
1844
|
-
if (
|
|
1844
|
+
const s = this.subscriptions.length;
|
|
1845
|
+
if (s)
|
|
1846
|
+
if (s === 1)
|
|
1845
1847
|
this.subscriptions[0](t, n, r);
|
|
1846
1848
|
else
|
|
1847
|
-
for (let
|
|
1848
|
-
const o = this.subscriptions[
|
|
1849
|
+
for (let i = 0; i < s; i++) {
|
|
1850
|
+
const o = this.subscriptions[i];
|
|
1849
1851
|
o && o(t, n, r);
|
|
1850
1852
|
}
|
|
1851
1853
|
}
|
|
@@ -1859,12 +1861,12 @@ class Er {
|
|
|
1859
1861
|
function co(e, t) {
|
|
1860
1862
|
return t ? e * (1e3 / t) : 0;
|
|
1861
1863
|
}
|
|
1862
|
-
const
|
|
1864
|
+
const ys = 30, Zl = (e) => !isNaN(parseFloat(e));
|
|
1863
1865
|
class Jl {
|
|
1864
1866
|
constructor(t, n = {}) {
|
|
1865
|
-
this.version = "12.4.7", this.canTrackVelocity = null, this.events = {}, this.updateAndNotify = (r,
|
|
1866
|
-
const
|
|
1867
|
-
this.updatedAt !==
|
|
1867
|
+
this.version = "12.4.7", this.canTrackVelocity = null, this.events = {}, this.updateAndNotify = (r, s = !0) => {
|
|
1868
|
+
const i = De.now();
|
|
1869
|
+
this.updatedAt !== i && this.setPrevFrameValue(), this.prev = this.current, this.setCurrent(r), this.current !== this.prev && this.events.change && this.events.change.notify(this.current), s && this.events.renderRequest && this.events.renderRequest.notify(this.current);
|
|
1868
1870
|
}, this.hasAnimated = !1, this.setCurrent(t), this.owner = n.owner;
|
|
1869
1871
|
}
|
|
1870
1872
|
setCurrent(t) {
|
|
@@ -1909,9 +1911,9 @@ class Jl {
|
|
|
1909
1911
|
}
|
|
1910
1912
|
getVelocity() {
|
|
1911
1913
|
const t = De.now();
|
|
1912
|
-
if (!this.canTrackVelocity || this.prevFrameValue === void 0 || t - this.updatedAt >
|
|
1914
|
+
if (!this.canTrackVelocity || this.prevFrameValue === void 0 || t - this.updatedAt > ys)
|
|
1913
1915
|
return 0;
|
|
1914
|
-
const n = Math.min(this.updatedAt - this.prevUpdatedAt,
|
|
1916
|
+
const n = Math.min(this.updatedAt - this.prevUpdatedAt, ys);
|
|
1915
1917
|
return co(parseFloat(this.current) - parseFloat(this.prevFrameValue), n);
|
|
1916
1918
|
}
|
|
1917
1919
|
start(t) {
|
|
@@ -1942,10 +1944,10 @@ function Ql(e, t, n) {
|
|
|
1942
1944
|
}
|
|
1943
1945
|
function ec(e, t) {
|
|
1944
1946
|
const n = jt(e, t);
|
|
1945
|
-
let { transitionEnd: r = {}, transition:
|
|
1946
|
-
|
|
1947
|
-
for (const o in
|
|
1948
|
-
const l = Vl(
|
|
1947
|
+
let { transitionEnd: r = {}, transition: s = {}, ...i } = n || {};
|
|
1948
|
+
i = { ...i, ...r };
|
|
1949
|
+
for (const o in i) {
|
|
1950
|
+
const l = Vl(i[o]);
|
|
1949
1951
|
Ql(e, o, l);
|
|
1950
1952
|
}
|
|
1951
1953
|
}
|
|
@@ -1958,23 +1960,23 @@ function _n(e, t) {
|
|
|
1958
1960
|
return n.add(t);
|
|
1959
1961
|
}
|
|
1960
1962
|
function uo(e) {
|
|
1961
|
-
return e.props[$
|
|
1963
|
+
return e.props[$i];
|
|
1962
1964
|
}
|
|
1963
1965
|
const nc = {
|
|
1964
1966
|
current: !1
|
|
1965
|
-
}, fo = (e, t, n) => (((1 - 3 * n + 3 * t) * e + (3 * n - 6 * t)) * e + 3 * t) * e, rc = 1e-7,
|
|
1966
|
-
function
|
|
1967
|
-
let
|
|
1967
|
+
}, fo = (e, t, n) => (((1 - 3 * n + 3 * t) * e + (3 * n - 6 * t)) * e + 3 * t) * e, rc = 1e-7, sc = 12;
|
|
1968
|
+
function ic(e, t, n, r, s) {
|
|
1969
|
+
let i, o, l = 0;
|
|
1968
1970
|
do
|
|
1969
|
-
o = t + (n - t) / 2,
|
|
1970
|
-
while (Math.abs(
|
|
1971
|
+
o = t + (n - t) / 2, i = fo(o, r, s) - e, i > 0 ? n = o : t = o;
|
|
1972
|
+
while (Math.abs(i) > rc && ++l < sc);
|
|
1971
1973
|
return o;
|
|
1972
1974
|
}
|
|
1973
1975
|
function kt(e, t, n, r) {
|
|
1974
1976
|
if (e === t && n === r)
|
|
1975
1977
|
return we;
|
|
1976
|
-
const
|
|
1977
|
-
return (
|
|
1978
|
+
const s = (i) => ic(i, 0, 1, e, n);
|
|
1979
|
+
return (i) => i === 0 || i === 1 ? i : fo(s(i), t, r);
|
|
1978
1980
|
}
|
|
1979
1981
|
const ho = (e) => (t) => t <= 0.5 ? e(2 * t) / 2 : (2 - e(2 * (1 - t))) / 2, po = (e) => (t) => 1 - e(1 - t), mo = /* @__PURE__ */ kt(0.33, 1.53, 0.69, 0.99), Rr = /* @__PURE__ */ po(mo), go = /* @__PURE__ */ ho(Rr), yo = (e) => (e *= 2) < 1 ? 0.5 * Rr(e) : 0.5 * (2 - Math.pow(2, -10 * (e - 1))), Ar = (e) => 1 - Math.sin(Math.acos(e)), vo = po(Ar), xo = ho(Ar), bo = (e) => /^0[^.\s]+$/u.test(e);
|
|
1980
1982
|
function oc(e) {
|
|
@@ -1987,10 +1989,10 @@ function ac(e) {
|
|
|
1987
1989
|
const lc = /^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu, Mr = (e, t) => (n) => Boolean(typeof n == "string" && lc.test(n) && n.startsWith(e) || t && !ac(n) && Object.prototype.hasOwnProperty.call(n, t)), To = (e, t, n) => (r) => {
|
|
1988
1990
|
if (typeof r != "string")
|
|
1989
1991
|
return r;
|
|
1990
|
-
const [
|
|
1992
|
+
const [s, i, o, l] = r.match(jr);
|
|
1991
1993
|
return {
|
|
1992
|
-
[e]: parseFloat(
|
|
1993
|
-
[t]: parseFloat(
|
|
1994
|
+
[e]: parseFloat(s),
|
|
1995
|
+
[t]: parseFloat(i),
|
|
1994
1996
|
[n]: parseFloat(o),
|
|
1995
1997
|
alpha: l !== void 0 ? parseFloat(l) : 1
|
|
1996
1998
|
};
|
|
@@ -2003,12 +2005,12 @@ const lc = /^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s
|
|
|
2003
2005
|
transform: ({ red: e, green: t, blue: n, alpha: r = 1 }) => "rgba(" + mn.transform(e) + ", " + mn.transform(t) + ", " + mn.transform(n) + ", " + Tt(At.transform(r)) + ")"
|
|
2004
2006
|
};
|
|
2005
2007
|
function uc(e) {
|
|
2006
|
-
let t = "", n = "", r = "",
|
|
2007
|
-
return e.length > 5 ? (t = e.substring(1, 3), n = e.substring(3, 5), r = e.substring(5, 7),
|
|
2008
|
+
let t = "", n = "", r = "", s = "";
|
|
2009
|
+
return e.length > 5 ? (t = e.substring(1, 3), n = e.substring(3, 5), r = e.substring(5, 7), s = e.substring(7, 9)) : (t = e.substring(1, 2), n = e.substring(2, 3), r = e.substring(3, 4), s = e.substring(4, 5), t += t, n += n, r += r, s += s), {
|
|
2008
2010
|
red: parseInt(t, 16),
|
|
2009
2011
|
green: parseInt(n, 16),
|
|
2010
2012
|
blue: parseInt(r, 16),
|
|
2011
|
-
alpha:
|
|
2013
|
+
alpha: s ? parseInt(s, 16) / 255 : 1
|
|
2012
2014
|
};
|
|
2013
2015
|
}
|
|
2014
2016
|
const In = {
|
|
@@ -2028,30 +2030,30 @@ function dc(e) {
|
|
|
2028
2030
|
var t, n;
|
|
2029
2031
|
return isNaN(e) && typeof e == "string" && (((t = e.match(jr)) === null || t === void 0 ? void 0 : t.length) || 0) + (((n = e.match(fc)) === null || n === void 0 ? void 0 : n.length) || 0) > 0;
|
|
2030
2032
|
}
|
|
2031
|
-
const wo = "number", Po = "color", hc = "var", pc = "var(",
|
|
2033
|
+
const wo = "number", Po = "color", hc = "var", pc = "var(", vs = "${}", mc = /var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;
|
|
2032
2034
|
function Vt(e) {
|
|
2033
2035
|
const t = e.toString(), n = [], r = {
|
|
2034
2036
|
color: [],
|
|
2035
2037
|
number: [],
|
|
2036
2038
|
var: []
|
|
2037
|
-
},
|
|
2038
|
-
let
|
|
2039
|
-
const l = t.replace(mc, (a) => (de.test(a) ? (r.color.push(
|
|
2040
|
-
return { values: n, split: l, indexes: r, types:
|
|
2039
|
+
}, s = [];
|
|
2040
|
+
let i = 0;
|
|
2041
|
+
const l = t.replace(mc, (a) => (de.test(a) ? (r.color.push(i), s.push(Po), n.push(de.parse(a))) : a.startsWith(pc) ? (r.var.push(i), s.push(hc), n.push(a)) : (r.number.push(i), s.push(wo), n.push(parseFloat(a))), ++i, vs)).split(vs);
|
|
2042
|
+
return { values: n, split: l, indexes: r, types: s };
|
|
2041
2043
|
}
|
|
2042
2044
|
function So(e) {
|
|
2043
2045
|
return Vt(e).values;
|
|
2044
2046
|
}
|
|
2045
2047
|
function Co(e) {
|
|
2046
2048
|
const { split: t, types: n } = Vt(e), r = t.length;
|
|
2047
|
-
return (
|
|
2048
|
-
let
|
|
2049
|
+
return (s) => {
|
|
2050
|
+
let i = "";
|
|
2049
2051
|
for (let o = 0; o < r; o++)
|
|
2050
|
-
if (
|
|
2052
|
+
if (i += t[o], s[o] !== void 0) {
|
|
2051
2053
|
const l = n[o];
|
|
2052
|
-
l === wo ?
|
|
2054
|
+
l === wo ? i += Tt(s[o]) : l === Po ? i += de.transform(s[o]) : i += s[o];
|
|
2053
2055
|
}
|
|
2054
|
-
return
|
|
2056
|
+
return i;
|
|
2055
2057
|
};
|
|
2056
2058
|
}
|
|
2057
2059
|
const gc = (e) => typeof e == "number" ? 0 : e;
|
|
@@ -2072,9 +2074,9 @@ function xc(e) {
|
|
|
2072
2074
|
const [r] = n.match(jr) || [];
|
|
2073
2075
|
if (!r)
|
|
2074
2076
|
return e;
|
|
2075
|
-
const
|
|
2076
|
-
let
|
|
2077
|
-
return r !== n && (
|
|
2077
|
+
const s = n.replace(r, "");
|
|
2078
|
+
let i = vc.has(t) ? 1 : 0;
|
|
2079
|
+
return r !== n && (i *= 100), t + "(" + i + s + ")";
|
|
2078
2080
|
}
|
|
2079
2081
|
const bc = /\b([a-z-]*)\(.*?\)/gu, Fn = {
|
|
2080
2082
|
...$e,
|
|
@@ -2103,24 +2105,24 @@ function Eo(e, t) {
|
|
|
2103
2105
|
}
|
|
2104
2106
|
const wc = /* @__PURE__ */ new Set(["auto", "none", "0"]);
|
|
2105
2107
|
function Pc(e, t, n) {
|
|
2106
|
-
let r = 0,
|
|
2107
|
-
for (; r < e.length && !
|
|
2108
|
-
const
|
|
2109
|
-
typeof
|
|
2108
|
+
let r = 0, s;
|
|
2109
|
+
for (; r < e.length && !s; ) {
|
|
2110
|
+
const i = e[r];
|
|
2111
|
+
typeof i == "string" && !wc.has(i) && Vt(i).values.length && (s = e[r]), r++;
|
|
2110
2112
|
}
|
|
2111
|
-
if (
|
|
2112
|
-
for (const
|
|
2113
|
-
e[
|
|
2113
|
+
if (s && n)
|
|
2114
|
+
for (const i of t)
|
|
2115
|
+
e[i] = Eo(n, s);
|
|
2114
2116
|
}
|
|
2115
|
-
const
|
|
2117
|
+
const xs = (e) => e === ht || e === L, bs = (e, t) => parseFloat(e.split(", ")[t]), Ts = (e, t) => (n, { transform: r }) => {
|
|
2116
2118
|
if (r === "none" || !r)
|
|
2117
2119
|
return 0;
|
|
2118
|
-
const
|
|
2119
|
-
if (
|
|
2120
|
-
return
|
|
2120
|
+
const s = r.match(/^matrix3d\((.+)\)$/u);
|
|
2121
|
+
if (s)
|
|
2122
|
+
return bs(s[1], t);
|
|
2121
2123
|
{
|
|
2122
|
-
const
|
|
2123
|
-
return
|
|
2124
|
+
const i = r.match(/^matrix\((.+)\)$/u);
|
|
2125
|
+
return i ? bs(i[1], e) : 0;
|
|
2124
2126
|
}
|
|
2125
2127
|
}, Sc = /* @__PURE__ */ new Set(["x", "y", "z"]), Cc = dt.filter((e) => !Sc.has(e));
|
|
2126
2128
|
function Ec(e) {
|
|
@@ -2137,8 +2139,8 @@ const lt = {
|
|
|
2137
2139
|
left: (e, { left: t }) => parseFloat(t),
|
|
2138
2140
|
bottom: ({ y: e }, { top: t }) => parseFloat(t) + (e.max - e.min),
|
|
2139
2141
|
right: ({ x: e }, { left: t }) => parseFloat(t) + (e.max - e.min),
|
|
2140
|
-
x:
|
|
2141
|
-
y:
|
|
2142
|
+
x: Ts(4, 13),
|
|
2143
|
+
y: Ts(5, 14)
|
|
2142
2144
|
};
|
|
2143
2145
|
lt.translateX = lt.x;
|
|
2144
2146
|
lt.translateY = lt.y;
|
|
@@ -2148,14 +2150,14 @@ function Ro() {
|
|
|
2148
2150
|
if (Bn) {
|
|
2149
2151
|
const e = Array.from(qe).filter((r) => r.needsMeasurement), t = new Set(e.map((r) => r.element)), n = /* @__PURE__ */ new Map();
|
|
2150
2152
|
t.forEach((r) => {
|
|
2151
|
-
const
|
|
2152
|
-
|
|
2153
|
+
const s = Ec(r);
|
|
2154
|
+
s.length && (n.set(r, s), r.render());
|
|
2153
2155
|
}), e.forEach((r) => r.measureInitialState()), t.forEach((r) => {
|
|
2154
2156
|
r.render();
|
|
2155
|
-
const
|
|
2156
|
-
|
|
2157
|
+
const s = n.get(r);
|
|
2158
|
+
s && s.forEach(([i, o]) => {
|
|
2157
2159
|
var l;
|
|
2158
|
-
(l = r.getValue(
|
|
2160
|
+
(l = r.getValue(i)) === null || l === void 0 || l.set(o);
|
|
2159
2161
|
});
|
|
2160
2162
|
}), e.forEach((r) => r.measureEndState()), e.forEach((r) => {
|
|
2161
2163
|
r.suspendedScrollY !== void 0 && window.scrollTo(0, r.suspendedScrollY);
|
|
@@ -2172,27 +2174,27 @@ function Rc() {
|
|
|
2172
2174
|
Ao(), Ro();
|
|
2173
2175
|
}
|
|
2174
2176
|
class Dr {
|
|
2175
|
-
constructor(t, n, r,
|
|
2176
|
-
this.isComplete = !1, this.isAsync = !1, this.needsMeasurement = !1, this.isScheduled = !1, this.unresolvedKeyframes = [...t], this.onComplete = n, this.name = r, this.motionValue =
|
|
2177
|
+
constructor(t, n, r, s, i, o = !1) {
|
|
2178
|
+
this.isComplete = !1, this.isAsync = !1, this.needsMeasurement = !1, this.isScheduled = !1, this.unresolvedKeyframes = [...t], this.onComplete = n, this.name = r, this.motionValue = s, this.element = i, this.isAsync = o;
|
|
2177
2179
|
}
|
|
2178
2180
|
scheduleResolve() {
|
|
2179
2181
|
this.isScheduled = !0, this.isAsync ? (qe.add(this), Nn || (Nn = !0, J.read(Ao), J.resolveKeyframes(Ro))) : (this.readKeyframes(), this.complete());
|
|
2180
2182
|
}
|
|
2181
2183
|
readKeyframes() {
|
|
2182
|
-
const { unresolvedKeyframes: t, name: n, element: r, motionValue:
|
|
2183
|
-
for (let
|
|
2184
|
-
if (t[
|
|
2185
|
-
if (
|
|
2186
|
-
const o =
|
|
2184
|
+
const { unresolvedKeyframes: t, name: n, element: r, motionValue: s } = this;
|
|
2185
|
+
for (let i = 0; i < t.length; i++)
|
|
2186
|
+
if (t[i] === null)
|
|
2187
|
+
if (i === 0) {
|
|
2188
|
+
const o = s == null ? void 0 : s.get(), l = t[t.length - 1];
|
|
2187
2189
|
if (o !== void 0)
|
|
2188
2190
|
t[0] = o;
|
|
2189
2191
|
else if (r && n) {
|
|
2190
2192
|
const a = r.readValue(n, l);
|
|
2191
2193
|
a != null && (t[0] = a);
|
|
2192
2194
|
}
|
|
2193
|
-
t[0] === void 0 && (t[0] = l),
|
|
2195
|
+
t[0] === void 0 && (t[0] = l), s && o === void 0 && s.set(t[0]);
|
|
2194
2196
|
} else
|
|
2195
|
-
t[
|
|
2197
|
+
t[i] = t[i - 1];
|
|
2196
2198
|
}
|
|
2197
2199
|
setFinalKeyframe() {
|
|
2198
2200
|
}
|
|
@@ -2217,29 +2219,29 @@ function jc(e) {
|
|
|
2217
2219
|
const t = Ac.exec(e);
|
|
2218
2220
|
if (!t)
|
|
2219
2221
|
return [,];
|
|
2220
|
-
const [, n, r,
|
|
2221
|
-
return [`--${n ?? r}`,
|
|
2222
|
+
const [, n, r, s] = t;
|
|
2223
|
+
return [`--${n ?? r}`, s];
|
|
2222
2224
|
}
|
|
2223
2225
|
const Mc = 4;
|
|
2224
2226
|
function Mo(e, t, n = 1) {
|
|
2225
2227
|
Ne(n <= Mc, `Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`);
|
|
2226
|
-
const [r,
|
|
2228
|
+
const [r, s] = jc(e);
|
|
2227
2229
|
if (!r)
|
|
2228
2230
|
return;
|
|
2229
|
-
const
|
|
2230
|
-
if (
|
|
2231
|
-
const o =
|
|
2231
|
+
const i = window.getComputedStyle(t).getPropertyValue(r);
|
|
2232
|
+
if (i) {
|
|
2233
|
+
const o = i.trim();
|
|
2232
2234
|
return jo(o) ? parseFloat(o) : o;
|
|
2233
2235
|
}
|
|
2234
|
-
return fr(
|
|
2236
|
+
return fr(s) ? Mo(s, t, n + 1) : s;
|
|
2235
2237
|
}
|
|
2236
2238
|
const Vo = (e) => (t) => t.test(e), Vc = {
|
|
2237
2239
|
test: (e) => e === "auto",
|
|
2238
2240
|
parse: (e) => e
|
|
2239
|
-
}, Do = [ht, L, Ve, Ie, pl, hl, Vc],
|
|
2241
|
+
}, Do = [ht, L, Ve, Ie, pl, hl, Vc], ws = (e) => Do.find(Vo(e));
|
|
2240
2242
|
class Oo extends Dr {
|
|
2241
|
-
constructor(t, n, r,
|
|
2242
|
-
super(t, n, r,
|
|
2243
|
+
constructor(t, n, r, s, i) {
|
|
2244
|
+
super(t, n, r, s, i, !0);
|
|
2243
2245
|
}
|
|
2244
2246
|
readKeyframes() {
|
|
2245
2247
|
const { unresolvedKeyframes: t, element: n, name: r } = this;
|
|
@@ -2255,9 +2257,9 @@ class Oo extends Dr {
|
|
|
2255
2257
|
}
|
|
2256
2258
|
if (this.resolveNoneKeyframes(), !lo.has(r) || t.length !== 2)
|
|
2257
2259
|
return;
|
|
2258
|
-
const [
|
|
2260
|
+
const [s, i] = t, o = ws(s), l = ws(i);
|
|
2259
2261
|
if (o !== l)
|
|
2260
|
-
if (
|
|
2262
|
+
if (xs(o) && xs(l))
|
|
2261
2263
|
for (let a = 0; a < t.length; a++) {
|
|
2262
2264
|
const u = t[a];
|
|
2263
2265
|
typeof u == "string" && (t[a] = parseFloat(u));
|
|
@@ -2267,8 +2269,8 @@ class Oo extends Dr {
|
|
|
2267
2269
|
}
|
|
2268
2270
|
resolveNoneKeyframes() {
|
|
2269
2271
|
const { unresolvedKeyframes: t, name: n } = this, r = [];
|
|
2270
|
-
for (let
|
|
2271
|
-
oc(t[
|
|
2272
|
+
for (let s = 0; s < t.length; s++)
|
|
2273
|
+
oc(t[s]) && r.push(s);
|
|
2272
2274
|
r.length && Pc(t, r, n);
|
|
2273
2275
|
}
|
|
2274
2276
|
measureInitialState() {
|
|
@@ -2276,23 +2278,23 @@ class Oo extends Dr {
|
|
|
2276
2278
|
if (!t || !t.current)
|
|
2277
2279
|
return;
|
|
2278
2280
|
r === "height" && (this.suspendedScrollY = window.pageYOffset), this.measuredOrigin = lt[r](t.measureViewportBox(), window.getComputedStyle(t.current)), n[0] = this.measuredOrigin;
|
|
2279
|
-
const
|
|
2280
|
-
|
|
2281
|
+
const s = n[n.length - 1];
|
|
2282
|
+
s !== void 0 && t.getValue(r, s).jump(s, !1);
|
|
2281
2283
|
}
|
|
2282
2284
|
measureEndState() {
|
|
2283
2285
|
var t;
|
|
2284
|
-
const { element: n, name: r, unresolvedKeyframes:
|
|
2286
|
+
const { element: n, name: r, unresolvedKeyframes: s } = this;
|
|
2285
2287
|
if (!n || !n.current)
|
|
2286
2288
|
return;
|
|
2287
|
-
const
|
|
2288
|
-
|
|
2289
|
-
const o =
|
|
2290
|
-
|
|
2289
|
+
const i = n.getValue(r);
|
|
2290
|
+
i && i.jump(this.measuredOrigin, !1);
|
|
2291
|
+
const o = s.length - 1, l = s[o];
|
|
2292
|
+
s[o] = lt[r](n.measureViewportBox(), window.getComputedStyle(n.current)), l !== null && this.finalKeyframe === void 0 && (this.finalKeyframe = l), !((t = this.removedTransforms) === null || t === void 0) && t.length && this.removedTransforms.forEach(([a, u]) => {
|
|
2291
2293
|
n.getValue(a).set(u);
|
|
2292
2294
|
}), this.resolveNoneKeyframes();
|
|
2293
2295
|
}
|
|
2294
2296
|
}
|
|
2295
|
-
const
|
|
2297
|
+
const Ps = (e, t) => t === "zIndex" ? !1 : !!(typeof e == "number" || Array.isArray(e) || typeof e == "string" && ($e.test(e) || e === "0") && !e.startsWith("url("));
|
|
2296
2298
|
function Dc(e) {
|
|
2297
2299
|
const t = e[0];
|
|
2298
2300
|
if (e.length === 1)
|
|
@@ -2302,28 +2304,28 @@ function Dc(e) {
|
|
|
2302
2304
|
return !0;
|
|
2303
2305
|
}
|
|
2304
2306
|
function Oc(e, t, n, r) {
|
|
2305
|
-
const
|
|
2306
|
-
if (
|
|
2307
|
+
const s = e[0];
|
|
2308
|
+
if (s === null)
|
|
2307
2309
|
return !1;
|
|
2308
2310
|
if (t === "display" || t === "visibility")
|
|
2309
2311
|
return !0;
|
|
2310
|
-
const
|
|
2311
|
-
return ft(o === l, `You are trying to animate ${t} from "${
|
|
2312
|
+
const i = e[e.length - 1], o = Ps(s, t), l = Ps(i, t);
|
|
2313
|
+
return ft(o === l, `You are trying to animate ${t} from "${s}" to "${i}". ${s} is not an animatable value - to enable this animation set ${s} to a value animatable to ${i} via the \`style\` property.`), !o || !l ? !1 : Dc(e) || (n === "spring" || Tr(n)) && r;
|
|
2312
2314
|
}
|
|
2313
2315
|
const Lc = (e) => e !== null;
|
|
2314
2316
|
function on(e, { repeat: t, repeatType: n = "loop" }, r) {
|
|
2315
|
-
const
|
|
2316
|
-
return !
|
|
2317
|
+
const s = e.filter(Lc), i = t && n !== "loop" && t % 2 === 1 ? 0 : s.length - 1;
|
|
2318
|
+
return !i || r === void 0 ? s[i] : r;
|
|
2317
2319
|
}
|
|
2318
2320
|
const kc = 40;
|
|
2319
2321
|
class Lo {
|
|
2320
|
-
constructor({ autoplay: t = !0, delay: n = 0, type: r = "keyframes", repeat:
|
|
2322
|
+
constructor({ autoplay: t = !0, delay: n = 0, type: r = "keyframes", repeat: s = 0, repeatDelay: i = 0, repeatType: o = "loop", ...l }) {
|
|
2321
2323
|
this.isStopped = !1, this.hasAttemptedResolve = !1, this.createdAt = De.now(), this.options = {
|
|
2322
2324
|
autoplay: t,
|
|
2323
2325
|
delay: n,
|
|
2324
2326
|
type: r,
|
|
2325
|
-
repeat:
|
|
2326
|
-
repeatDelay:
|
|
2327
|
+
repeat: s,
|
|
2328
|
+
repeatDelay: i,
|
|
2327
2329
|
repeatType: o,
|
|
2328
2330
|
...l
|
|
2329
2331
|
}, this.updateFinishedPromise();
|
|
@@ -2336,8 +2338,8 @@ class Lo {
|
|
|
2336
2338
|
}
|
|
2337
2339
|
onKeyframesResolved(t, n) {
|
|
2338
2340
|
this.resolvedAt = De.now(), this.hasAttemptedResolve = !0;
|
|
2339
|
-
const { name: r, type:
|
|
2340
|
-
if (!u && !Oc(t, r,
|
|
2341
|
+
const { name: r, type: s, velocity: i, delay: o, onComplete: l, onUpdate: a, isGenerator: u } = this.options;
|
|
2342
|
+
if (!u && !Oc(t, r, s, i))
|
|
2341
2343
|
if (o)
|
|
2342
2344
|
this.options.duration = 0;
|
|
2343
2345
|
else {
|
|
@@ -2375,16 +2377,16 @@ function gn(e, t, n) {
|
|
|
2375
2377
|
}
|
|
2376
2378
|
function _c({ hue: e, saturation: t, lightness: n, alpha: r }) {
|
|
2377
2379
|
e /= 360, t /= 100, n /= 100;
|
|
2378
|
-
let
|
|
2380
|
+
let s = 0, i = 0, o = 0;
|
|
2379
2381
|
if (!t)
|
|
2380
|
-
|
|
2382
|
+
s = i = o = n;
|
|
2381
2383
|
else {
|
|
2382
2384
|
const l = n < 0.5 ? n * (1 + t) : n + t - n * t, a = 2 * n - l;
|
|
2383
|
-
|
|
2385
|
+
s = gn(a, l, e + 1 / 3), i = gn(a, l, e), o = gn(a, l, e - 1 / 3);
|
|
2384
2386
|
}
|
|
2385
2387
|
return {
|
|
2386
|
-
red: Math.round(
|
|
2387
|
-
green: Math.round(
|
|
2388
|
+
red: Math.round(s * 255),
|
|
2389
|
+
green: Math.round(i * 255),
|
|
2388
2390
|
blue: Math.round(o * 255),
|
|
2389
2391
|
alpha: r
|
|
2390
2392
|
};
|
|
@@ -2393,22 +2395,22 @@ function Xt(e, t) {
|
|
|
2393
2395
|
return (n) => n > 0 ? t : e;
|
|
2394
2396
|
}
|
|
2395
2397
|
const yn = (e, t, n) => {
|
|
2396
|
-
const r = e * e,
|
|
2397
|
-
return
|
|
2398
|
+
const r = e * e, s = n * (t * t - r) + r;
|
|
2399
|
+
return s < 0 ? 0 : Math.sqrt(s);
|
|
2398
2400
|
}, Ic = [In, Ge, tt], Fc = (e) => Ic.find((t) => t.test(e));
|
|
2399
|
-
function
|
|
2401
|
+
function Ss(e) {
|
|
2400
2402
|
const t = Fc(e);
|
|
2401
2403
|
if (ft(Boolean(t), `'${e}' is not an animatable color. Use the equivalent color code instead.`), !Boolean(t))
|
|
2402
2404
|
return !1;
|
|
2403
2405
|
let n = t.parse(e);
|
|
2404
2406
|
return t === tt && (n = _c(n)), n;
|
|
2405
2407
|
}
|
|
2406
|
-
const
|
|
2407
|
-
const n =
|
|
2408
|
+
const Cs = (e, t) => {
|
|
2409
|
+
const n = Ss(e), r = Ss(t);
|
|
2408
2410
|
if (!n || !r)
|
|
2409
2411
|
return Xt(e, t);
|
|
2410
|
-
const
|
|
2411
|
-
return (
|
|
2412
|
+
const s = { ...n };
|
|
2413
|
+
return (i) => (s.red = yn(n.red, r.red, i), s.green = yn(n.green, r.green, i), s.blue = yn(n.blue, r.blue, i), s.alpha = ee(n.alpha, r.alpha, i), Ge.transform(s));
|
|
2412
2414
|
}, Nc = (e, t) => (n) => t(e(n)), _t = (...e) => e.reduce(Nc), $n = /* @__PURE__ */ new Set(["none", "hidden"]);
|
|
2413
2415
|
function Bc(e, t) {
|
|
2414
2416
|
return $n.has(e) ? (n) => n <= 0 ? e : t : (n) => n >= 1 ? t : e;
|
|
@@ -2417,38 +2419,38 @@ function $c(e, t) {
|
|
|
2417
2419
|
return (n) => ee(e, t, n);
|
|
2418
2420
|
}
|
|
2419
2421
|
function Or(e) {
|
|
2420
|
-
return typeof e == "number" ? $c : typeof e == "string" ? fr(e) ? Xt : de.test(e) ?
|
|
2422
|
+
return typeof e == "number" ? $c : typeof e == "string" ? fr(e) ? Xt : de.test(e) ? Cs : zc : Array.isArray(e) ? ko : typeof e == "object" ? de.test(e) ? Cs : Uc : Xt;
|
|
2421
2423
|
}
|
|
2422
2424
|
function ko(e, t) {
|
|
2423
|
-
const n = [...e], r = n.length,
|
|
2424
|
-
return (
|
|
2425
|
+
const n = [...e], r = n.length, s = e.map((i, o) => Or(i)(i, t[o]));
|
|
2426
|
+
return (i) => {
|
|
2425
2427
|
for (let o = 0; o < r; o++)
|
|
2426
|
-
n[o] =
|
|
2428
|
+
n[o] = s[o](i);
|
|
2427
2429
|
return n;
|
|
2428
2430
|
};
|
|
2429
2431
|
}
|
|
2430
2432
|
function Uc(e, t) {
|
|
2431
2433
|
const n = { ...e, ...t }, r = {};
|
|
2432
|
-
for (const
|
|
2433
|
-
e[
|
|
2434
|
-
return (
|
|
2435
|
-
for (const
|
|
2436
|
-
n[
|
|
2434
|
+
for (const s in n)
|
|
2435
|
+
e[s] !== void 0 && t[s] !== void 0 && (r[s] = Or(e[s])(e[s], t[s]));
|
|
2436
|
+
return (s) => {
|
|
2437
|
+
for (const i in r)
|
|
2438
|
+
n[i] = r[i](s);
|
|
2437
2439
|
return n;
|
|
2438
2440
|
};
|
|
2439
2441
|
}
|
|
2440
2442
|
function Wc(e, t) {
|
|
2441
2443
|
var n;
|
|
2442
|
-
const r = [],
|
|
2443
|
-
for (let
|
|
2444
|
-
const o = t.types[
|
|
2445
|
-
r[
|
|
2444
|
+
const r = [], s = { color: 0, var: 0, number: 0 };
|
|
2445
|
+
for (let i = 0; i < t.values.length; i++) {
|
|
2446
|
+
const o = t.types[i], l = e.indexes[o][s[o]], a = (n = e.values[l]) !== null && n !== void 0 ? n : 0;
|
|
2447
|
+
r[i] = a, s[o]++;
|
|
2446
2448
|
}
|
|
2447
2449
|
return r;
|
|
2448
2450
|
}
|
|
2449
2451
|
const zc = (e, t) => {
|
|
2450
|
-
const n = $e.createTransformer(t), r = Vt(e),
|
|
2451
|
-
return r.indexes.var.length ===
|
|
2452
|
+
const n = $e.createTransformer(t), r = Vt(e), s = Vt(t);
|
|
2453
|
+
return r.indexes.var.length === s.indexes.var.length && r.indexes.color.length === s.indexes.color.length && r.indexes.number.length >= s.indexes.number.length ? $n.has(e) && !s.values.length || $n.has(t) && !r.values.length ? Bc(e, t) : _t(ko(Wc(r, s), s.values), n) : (ft(!0, `Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`), Xt(e, t));
|
|
2452
2454
|
};
|
|
2453
2455
|
function _o(e, t, n) {
|
|
2454
2456
|
return typeof e == "number" && typeof t == "number" && typeof n == "number" ? ee(e, t, n) : Or(e)(e, t);
|
|
@@ -2480,23 +2482,23 @@ const Q = {
|
|
|
2480
2482
|
maxDamping: 1
|
|
2481
2483
|
}, vn = 1e-3;
|
|
2482
2484
|
function Kc({ duration: e = Q.duration, bounce: t = Q.bounce, velocity: n = Q.velocity, mass: r = Q.mass }) {
|
|
2483
|
-
let
|
|
2485
|
+
let s, i;
|
|
2484
2486
|
ft(e <= Me(Q.maxDuration), "Spring duration must be 10 seconds or less");
|
|
2485
2487
|
let o = 1 - t;
|
|
2486
|
-
o = _e(Q.minDamping, Q.maxDamping, o), e = _e(Q.minDuration, Q.maxDuration, ke(e)), o < 1 ? (
|
|
2488
|
+
o = _e(Q.minDamping, Q.maxDamping, o), e = _e(Q.minDuration, Q.maxDuration, ke(e)), o < 1 ? (s = (u) => {
|
|
2487
2489
|
const c = u * o, f = c * e, h = c - n, g = Un(u, o), x = Math.exp(-f);
|
|
2488
2490
|
return vn - h / g * x;
|
|
2489
|
-
},
|
|
2491
|
+
}, i = (u) => {
|
|
2490
2492
|
const f = u * o * e, h = f * n + n, g = Math.pow(o, 2) * Math.pow(u, 2) * e, x = Math.exp(-f), y = Un(Math.pow(u, 2), o);
|
|
2491
|
-
return (-
|
|
2492
|
-
}) : (
|
|
2493
|
+
return (-s(u) + vn > 0 ? -1 : 1) * ((h - g) * x) / y;
|
|
2494
|
+
}) : (s = (u) => {
|
|
2493
2495
|
const c = Math.exp(-u * e), f = (u - n) * e + 1;
|
|
2494
2496
|
return -vn + c * f;
|
|
2495
|
-
},
|
|
2497
|
+
}, i = (u) => {
|
|
2496
2498
|
const c = Math.exp(-u * e), f = (n - u) * (e * e);
|
|
2497
2499
|
return c * f;
|
|
2498
2500
|
});
|
|
2499
|
-
const l = 5 / e, a = qc(
|
|
2501
|
+
const l = 5 / e, a = qc(s, i, l);
|
|
2500
2502
|
if (e = Me(e), isNaN(a))
|
|
2501
2503
|
return {
|
|
2502
2504
|
stiffness: Q.stiffness,
|
|
@@ -2515,7 +2517,7 @@ function Kc({ duration: e = Q.duration, bounce: t = Q.bounce, velocity: n = Q.ve
|
|
|
2515
2517
|
const Gc = 12;
|
|
2516
2518
|
function qc(e, t, n) {
|
|
2517
2519
|
let r = n;
|
|
2518
|
-
for (let
|
|
2520
|
+
for (let s = 1; s < Gc; s++)
|
|
2519
2521
|
r = r - e(r) / t(r);
|
|
2520
2522
|
return r;
|
|
2521
2523
|
}
|
|
@@ -2523,7 +2525,7 @@ function Un(e, t) {
|
|
|
2523
2525
|
return e * Math.sqrt(1 - t * t);
|
|
2524
2526
|
}
|
|
2525
2527
|
const Hc = ["duration", "bounce"], Xc = ["stiffness", "damping", "mass"];
|
|
2526
|
-
function
|
|
2528
|
+
function Es(e, t) {
|
|
2527
2529
|
return t.some((n) => e[n] !== void 0);
|
|
2528
2530
|
}
|
|
2529
2531
|
function Zc(e) {
|
|
@@ -2535,14 +2537,14 @@ function Zc(e) {
|
|
|
2535
2537
|
isResolvedFromDuration: !1,
|
|
2536
2538
|
...e
|
|
2537
2539
|
};
|
|
2538
|
-
if (!
|
|
2540
|
+
if (!Es(e, Xc) && Es(e, Hc))
|
|
2539
2541
|
if (e.visualDuration) {
|
|
2540
|
-
const n = e.visualDuration, r = 2 * Math.PI / (n * 1.2),
|
|
2542
|
+
const n = e.visualDuration, r = 2 * Math.PI / (n * 1.2), s = r * r, i = 2 * _e(0.05, 1, 1 - (e.bounce || 0)) * Math.sqrt(s);
|
|
2541
2543
|
t = {
|
|
2542
2544
|
...t,
|
|
2543
2545
|
mass: Q.mass,
|
|
2544
|
-
stiffness:
|
|
2545
|
-
damping:
|
|
2546
|
+
stiffness: s,
|
|
2547
|
+
damping: i
|
|
2546
2548
|
};
|
|
2547
2549
|
} else {
|
|
2548
2550
|
const n = Kc(e);
|
|
@@ -2560,12 +2562,12 @@ function Fo(e = Q.visualDuration, t = Q.bounce) {
|
|
|
2560
2562
|
keyframes: [0, 1],
|
|
2561
2563
|
bounce: t
|
|
2562
2564
|
} : e;
|
|
2563
|
-
let { restSpeed: r, restDelta:
|
|
2564
|
-
const
|
|
2565
|
+
let { restSpeed: r, restDelta: s } = n;
|
|
2566
|
+
const i = n.keyframes[0], o = n.keyframes[n.keyframes.length - 1], l = { done: !1, value: i }, { stiffness: a, damping: u, mass: c, duration: f, velocity: h, isResolvedFromDuration: g } = Zc({
|
|
2565
2567
|
...n,
|
|
2566
2568
|
velocity: -ke(n.velocity || 0)
|
|
2567
|
-
}), x = h || 0, y = u / (2 * Math.sqrt(a * c)), P = o -
|
|
2568
|
-
r || (r = S ? Q.restSpeed.granular : Q.restSpeed.default),
|
|
2569
|
+
}), x = h || 0, y = u / (2 * Math.sqrt(a * c)), P = o - i, b = ke(Math.sqrt(a / c)), S = Math.abs(P) < 5;
|
|
2570
|
+
r || (r = S ? Q.restSpeed.granular : Q.restSpeed.default), s || (s = S ? Q.restDelta.granular : Q.restDelta.default);
|
|
2569
2571
|
let C;
|
|
2570
2572
|
if (y < 1) {
|
|
2571
2573
|
const p = Un(b, y);
|
|
@@ -2591,7 +2593,7 @@ function Fo(e = Q.visualDuration, t = Q.bounce) {
|
|
|
2591
2593
|
else {
|
|
2592
2594
|
let B = 0;
|
|
2593
2595
|
y < 1 && (B = p === 0 ? Me(x) : Io(C, p, A));
|
|
2594
|
-
const M = Math.abs(B) <= r, H = Math.abs(o - A) <=
|
|
2596
|
+
const M = Math.abs(B) <= r, H = Math.abs(o - A) <= s;
|
|
2595
2597
|
l.done = M && H;
|
|
2596
2598
|
}
|
|
2597
2599
|
return l.value = l.done ? o : A, l;
|
|
@@ -2603,7 +2605,7 @@ function Fo(e = Q.visualDuration, t = Q.bounce) {
|
|
|
2603
2605
|
};
|
|
2604
2606
|
return V;
|
|
2605
2607
|
}
|
|
2606
|
-
function
|
|
2608
|
+
function Rs({ keyframes: e, velocity: t = 0, power: n = 0.8, timeConstant: r = 325, bounceDamping: s = 10, bounceStiffness: i = 500, modifyTarget: o, min: l, max: a, restDelta: u = 0.5, restSpeed: c }) {
|
|
2607
2609
|
const f = e[0], h = {
|
|
2608
2610
|
done: !1,
|
|
2609
2611
|
value: f
|
|
@@ -2620,8 +2622,8 @@ function Ri({ keyframes: e, velocity: t = 0, power: n = 0.8, timeConstant: r = 3
|
|
|
2620
2622
|
g(h.value) && (p = M, A = Fo({
|
|
2621
2623
|
keyframes: [h.value, x(h.value)],
|
|
2622
2624
|
velocity: Io(C, M, h.value),
|
|
2623
|
-
damping:
|
|
2624
|
-
stiffness:
|
|
2625
|
+
damping: s,
|
|
2626
|
+
stiffness: i,
|
|
2625
2627
|
restDelta: u,
|
|
2626
2628
|
restSpeed: c
|
|
2627
2629
|
}));
|
|
@@ -2634,7 +2636,7 @@ function Ri({ keyframes: e, velocity: t = 0, power: n = 0.8, timeConstant: r = 3
|
|
|
2634
2636
|
}
|
|
2635
2637
|
};
|
|
2636
2638
|
}
|
|
2637
|
-
const Jc = /* @__PURE__ */ kt(0.42, 0, 1, 1), Qc = /* @__PURE__ */ kt(0, 0, 0.58, 1), No = /* @__PURE__ */ kt(0.42, 0, 0.58, 1), eu = (e) => Array.isArray(e) && typeof e[0] != "number",
|
|
2639
|
+
const Jc = /* @__PURE__ */ kt(0.42, 0, 1, 1), Qc = /* @__PURE__ */ kt(0, 0, 0.58, 1), No = /* @__PURE__ */ kt(0.42, 0, 0.58, 1), eu = (e) => Array.isArray(e) && typeof e[0] != "number", As = {
|
|
2638
2640
|
linear: we,
|
|
2639
2641
|
easeIn: Jc,
|
|
2640
2642
|
easeInOut: No,
|
|
@@ -2646,19 +2648,19 @@ const Jc = /* @__PURE__ */ kt(0.42, 0, 1, 1), Qc = /* @__PURE__ */ kt(0, 0, 0.58
|
|
|
2646
2648
|
backInOut: go,
|
|
2647
2649
|
backOut: mo,
|
|
2648
2650
|
anticipate: yo
|
|
2649
|
-
},
|
|
2651
|
+
}, js = (e) => {
|
|
2650
2652
|
if (wr(e)) {
|
|
2651
2653
|
Ne(e.length === 4, "Cubic bezier arrays must contain four numerical values.");
|
|
2652
|
-
const [t, n, r,
|
|
2653
|
-
return kt(t, n, r,
|
|
2654
|
+
const [t, n, r, s] = e;
|
|
2655
|
+
return kt(t, n, r, s);
|
|
2654
2656
|
} else if (typeof e == "string")
|
|
2655
|
-
return Ne(
|
|
2657
|
+
return Ne(As[e] !== void 0, `Invalid easing type '${e}'`), As[e];
|
|
2656
2658
|
return e;
|
|
2657
2659
|
};
|
|
2658
2660
|
function tu(e, t, n) {
|
|
2659
|
-
const r = [],
|
|
2660
|
-
for (let o = 0; o <
|
|
2661
|
-
let l =
|
|
2661
|
+
const r = [], s = n || _o, i = e.length - 1;
|
|
2662
|
+
for (let o = 0; o < i; o++) {
|
|
2663
|
+
let l = s(e[o], e[o + 1]);
|
|
2662
2664
|
if (t) {
|
|
2663
2665
|
const a = Array.isArray(t) ? t[o] || we : t;
|
|
2664
2666
|
l = _t(a, l);
|
|
@@ -2667,15 +2669,15 @@ function tu(e, t, n) {
|
|
|
2667
2669
|
}
|
|
2668
2670
|
return r;
|
|
2669
2671
|
}
|
|
2670
|
-
function nu(e, t, { clamp: n = !0, ease: r, mixer:
|
|
2671
|
-
const
|
|
2672
|
-
if (Ne(
|
|
2672
|
+
function nu(e, t, { clamp: n = !0, ease: r, mixer: s } = {}) {
|
|
2673
|
+
const i = e.length;
|
|
2674
|
+
if (Ne(i === t.length, "Both input and output ranges must be the same length"), i === 1)
|
|
2673
2675
|
return () => t[0];
|
|
2674
|
-
if (
|
|
2676
|
+
if (i === 2 && t[0] === t[1])
|
|
2675
2677
|
return () => t[1];
|
|
2676
2678
|
const o = e[0] === e[1];
|
|
2677
|
-
e[0] > e[
|
|
2678
|
-
const l = tu(t, r,
|
|
2679
|
+
e[0] > e[i - 1] && (e = [...e].reverse(), t = [...t].reverse());
|
|
2680
|
+
const l = tu(t, r, s), a = l.length, u = (c) => {
|
|
2679
2681
|
if (o && c < e[0])
|
|
2680
2682
|
return t[0];
|
|
2681
2683
|
let f = 0;
|
|
@@ -2685,38 +2687,38 @@ function nu(e, t, { clamp: n = !0, ease: r, mixer: i } = {}) {
|
|
|
2685
2687
|
const h = ot(e[f], e[f + 1], c);
|
|
2686
2688
|
return l[f](h);
|
|
2687
2689
|
};
|
|
2688
|
-
return n ? (c) => u(_e(e[0], e[
|
|
2690
|
+
return n ? (c) => u(_e(e[0], e[i - 1], c)) : u;
|
|
2689
2691
|
}
|
|
2690
2692
|
function ru(e, t) {
|
|
2691
2693
|
const n = e[e.length - 1];
|
|
2692
2694
|
for (let r = 1; r <= t; r++) {
|
|
2693
|
-
const
|
|
2694
|
-
e.push(ee(n, 1,
|
|
2695
|
+
const s = ot(0, t, r);
|
|
2696
|
+
e.push(ee(n, 1, s));
|
|
2695
2697
|
}
|
|
2696
2698
|
}
|
|
2697
|
-
function
|
|
2699
|
+
function su(e) {
|
|
2698
2700
|
const t = [0];
|
|
2699
2701
|
return ru(t, e.length - 1), t;
|
|
2700
2702
|
}
|
|
2701
|
-
function
|
|
2703
|
+
function iu(e, t) {
|
|
2702
2704
|
return e.map((n) => n * t);
|
|
2703
2705
|
}
|
|
2704
2706
|
function ou(e, t) {
|
|
2705
2707
|
return e.map(() => t || No).splice(0, e.length - 1);
|
|
2706
2708
|
}
|
|
2707
2709
|
function Pt({ duration: e = 300, keyframes: t, times: n, ease: r = "easeInOut" }) {
|
|
2708
|
-
const
|
|
2710
|
+
const s = eu(r) ? r.map(js) : js(r), i = {
|
|
2709
2711
|
done: !1,
|
|
2710
2712
|
value: t[0]
|
|
2711
|
-
}, o =
|
|
2712
|
-
n && n.length === t.length ? n :
|
|
2713
|
+
}, o = iu(
|
|
2714
|
+
n && n.length === t.length ? n : su(t),
|
|
2713
2715
|
e
|
|
2714
2716
|
), l = nu(o, t, {
|
|
2715
|
-
ease: Array.isArray(
|
|
2717
|
+
ease: Array.isArray(s) ? s : ou(t, s)
|
|
2716
2718
|
});
|
|
2717
2719
|
return {
|
|
2718
2720
|
calculatedDuration: e,
|
|
2719
|
-
next: (a) => (
|
|
2721
|
+
next: (a) => (i.value = l(a), i.done = a >= e, i)
|
|
2720
2722
|
};
|
|
2721
2723
|
}
|
|
2722
2724
|
const au = (e) => {
|
|
@@ -2727,8 +2729,8 @@ const au = (e) => {
|
|
|
2727
2729
|
now: () => ue.isProcessing ? ue.timestamp : De.now()
|
|
2728
2730
|
};
|
|
2729
2731
|
}, lu = {
|
|
2730
|
-
decay:
|
|
2731
|
-
inertia:
|
|
2732
|
+
decay: Rs,
|
|
2733
|
+
inertia: Rs,
|
|
2732
2734
|
tween: Pt,
|
|
2733
2735
|
keyframes: Pt,
|
|
2734
2736
|
spring: Fo
|
|
@@ -2742,23 +2744,23 @@ class Lr extends Lo {
|
|
|
2742
2744
|
const { onStop: a } = this.options;
|
|
2743
2745
|
a && a();
|
|
2744
2746
|
};
|
|
2745
|
-
const { name: n, motionValue: r, element:
|
|
2746
|
-
this.resolver = new o(
|
|
2747
|
+
const { name: n, motionValue: r, element: s, keyframes: i } = this.options, o = (s == null ? void 0 : s.KeyframeResolver) || Dr, l = (a, u) => this.onKeyframesResolved(a, u);
|
|
2748
|
+
this.resolver = new o(i, l, n, r, s), this.resolver.scheduleResolve();
|
|
2747
2749
|
}
|
|
2748
2750
|
flatten() {
|
|
2749
2751
|
super.flatten(), this._resolved && Object.assign(this._resolved, this.initPlayback(this._resolved.keyframes));
|
|
2750
2752
|
}
|
|
2751
2753
|
initPlayback(t) {
|
|
2752
|
-
const { type: n = "keyframes", repeat: r = 0, repeatDelay:
|
|
2754
|
+
const { type: n = "keyframes", repeat: r = 0, repeatDelay: s = 0, repeatType: i, velocity: o = 0 } = this.options, l = Tr(n) ? n : lu[n] || Pt;
|
|
2753
2755
|
let a, u;
|
|
2754
2756
|
process.env.NODE_ENV !== "production" && l !== Pt && Ne(t.length <= 2, `Only two keyframes currently supported with spring and inertia animations. Trying to animate ${t}`), l !== Pt && typeof t[0] != "number" && (a = _t(cu, _o(t[0], t[1])), t = [0, 100]);
|
|
2755
2757
|
const c = l({ ...this.options, keyframes: t });
|
|
2756
|
-
|
|
2758
|
+
i === "mirror" && (u = l({
|
|
2757
2759
|
...this.options,
|
|
2758
2760
|
keyframes: [...t].reverse(),
|
|
2759
2761
|
velocity: -o
|
|
2760
2762
|
})), c.calculatedDuration === null && (c.calculatedDuration = to(c));
|
|
2761
|
-
const { calculatedDuration: f } = c, h = f +
|
|
2763
|
+
const { calculatedDuration: f } = c, h = f + s, g = h * (r + 1) - s;
|
|
2762
2764
|
return {
|
|
2763
2765
|
generator: c,
|
|
2764
2766
|
mirroredGenerator: u,
|
|
@@ -2778,14 +2780,14 @@ class Lr extends Lo {
|
|
|
2778
2780
|
const { keyframes: M } = this.options;
|
|
2779
2781
|
return { done: !0, value: M[M.length - 1] };
|
|
2780
2782
|
}
|
|
2781
|
-
const { finalKeyframe:
|
|
2783
|
+
const { finalKeyframe: s, generator: i, mirroredGenerator: o, mapPercentToKeyframes: l, keyframes: a, calculatedDuration: u, totalDuration: c, resolvedDuration: f } = r;
|
|
2782
2784
|
if (this.startTime === null)
|
|
2783
|
-
return
|
|
2785
|
+
return i.next(0);
|
|
2784
2786
|
const { delay: h, repeat: g, repeatType: x, repeatDelay: y, onUpdate: P } = this.options;
|
|
2785
2787
|
this.speed > 0 ? this.startTime = Math.min(this.startTime, t) : this.speed < 0 && (this.startTime = Math.min(t - c / this.speed, this.startTime)), n ? this.currentTime = t : this.holdTime !== null ? this.currentTime = this.holdTime : this.currentTime = Math.round(t - this.startTime) * this.speed;
|
|
2786
2788
|
const b = this.currentTime - h * (this.speed >= 0 ? 1 : -1), S = this.speed >= 0 ? b < 0 : b > c;
|
|
2787
2789
|
this.currentTime = Math.max(b, 0), this.state === "finished" && this.holdTime === null && (this.currentTime = c);
|
|
2788
|
-
let C = this.currentTime, V =
|
|
2790
|
+
let C = this.currentTime, V = i;
|
|
2789
2791
|
if (g) {
|
|
2790
2792
|
const M = Math.min(this.currentTime, c) / f;
|
|
2791
2793
|
let H = Math.floor(M), F = M % 1;
|
|
@@ -2796,7 +2798,7 @@ class Lr extends Lo {
|
|
|
2796
2798
|
let { done: A } = p;
|
|
2797
2799
|
!S && u !== null && (A = this.speed >= 0 ? this.currentTime >= c : this.currentTime <= 0);
|
|
2798
2800
|
const B = this.holdTime === null && (this.state === "finished" || this.state === "running" && A);
|
|
2799
|
-
return B &&
|
|
2801
|
+
return B && s !== void 0 && (p.value = on(a, this.options, s)), P && P(p.value), B && this.finish(), p;
|
|
2800
2802
|
}
|
|
2801
2803
|
get duration() {
|
|
2802
2804
|
const { resolved: t } = this;
|
|
@@ -2823,9 +2825,9 @@ class Lr extends Lo {
|
|
|
2823
2825
|
if (this.isStopped)
|
|
2824
2826
|
return;
|
|
2825
2827
|
const { driver: t = au, onPlay: n, startTime: r } = this.options;
|
|
2826
|
-
this.driver || (this.driver = t((
|
|
2827
|
-
const
|
|
2828
|
-
this.holdTime !== null ? this.startTime =
|
|
2828
|
+
this.driver || (this.driver = t((i) => this.tick(i))), n && n();
|
|
2829
|
+
const s = this.driver.now();
|
|
2830
|
+
this.holdTime !== null ? this.startTime = s - this.holdTime : this.startTime ? this.state === "finished" && (this.startTime = s) : this.startTime = r ?? this.calcStartTime(), this.state === "finished" && this.updateFinishedPromise(), this.cancelTime = this.startTime, this.holdTime = null, this.state = "running", this.driver.start();
|
|
2829
2831
|
}
|
|
2830
2832
|
pause() {
|
|
2831
2833
|
var t;
|
|
@@ -2862,20 +2864,20 @@ const uu = /* @__PURE__ */ new Set([
|
|
|
2862
2864
|
"filter",
|
|
2863
2865
|
"transform"
|
|
2864
2866
|
]);
|
|
2865
|
-
function fu(e, t, n, { delay: r = 0, duration:
|
|
2867
|
+
function fu(e, t, n, { delay: r = 0, duration: s = 300, repeat: i = 0, repeatType: o = "loop", ease: l = "easeInOut", times: a } = {}) {
|
|
2866
2868
|
const u = { [t]: n };
|
|
2867
2869
|
a && (u.offset = a);
|
|
2868
|
-
const c =
|
|
2870
|
+
const c = so(l, s);
|
|
2869
2871
|
return Array.isArray(c) && (u.easing = c), e.animate(u, {
|
|
2870
2872
|
delay: r,
|
|
2871
|
-
duration:
|
|
2873
|
+
duration: s,
|
|
2872
2874
|
easing: Array.isArray(c) ? "linear" : c,
|
|
2873
2875
|
fill: "both",
|
|
2874
|
-
iterations:
|
|
2876
|
+
iterations: i + 1,
|
|
2875
2877
|
direction: o === "reverse" ? "alternate" : "normal"
|
|
2876
2878
|
});
|
|
2877
2879
|
}
|
|
2878
|
-
const du = /* @__PURE__ */
|
|
2880
|
+
const du = /* @__PURE__ */ ir(() => Object.hasOwnProperty.call(Element.prototype, "animate")), Zt = 10, hu = 2e4;
|
|
2879
2881
|
function pu(e) {
|
|
2880
2882
|
return Tr(e.type) || e.type === "spring" || !ro(e.ease);
|
|
2881
2883
|
}
|
|
@@ -2888,14 +2890,14 @@ function mu(e, t) {
|
|
|
2888
2890
|
isGenerator: !0
|
|
2889
2891
|
});
|
|
2890
2892
|
let r = { done: !1, value: e[0] };
|
|
2891
|
-
const
|
|
2892
|
-
let
|
|
2893
|
-
for (; !r.done &&
|
|
2894
|
-
r = n.sample(
|
|
2893
|
+
const s = [];
|
|
2894
|
+
let i = 0;
|
|
2895
|
+
for (; !r.done && i < hu; )
|
|
2896
|
+
r = n.sample(i), s.push(r.value), i += Zt;
|
|
2895
2897
|
return {
|
|
2896
2898
|
times: void 0,
|
|
2897
|
-
keyframes:
|
|
2898
|
-
duration:
|
|
2899
|
+
keyframes: s,
|
|
2900
|
+
duration: i - Zt,
|
|
2899
2901
|
ease: "linear"
|
|
2900
2902
|
};
|
|
2901
2903
|
}
|
|
@@ -2907,30 +2909,30 @@ const Bo = {
|
|
|
2907
2909
|
function gu(e) {
|
|
2908
2910
|
return e in Bo;
|
|
2909
2911
|
}
|
|
2910
|
-
class
|
|
2912
|
+
class Ms extends Lo {
|
|
2911
2913
|
constructor(t) {
|
|
2912
2914
|
super(t);
|
|
2913
|
-
const { name: n, motionValue: r, element:
|
|
2914
|
-
this.resolver = new Oo(
|
|
2915
|
+
const { name: n, motionValue: r, element: s, keyframes: i } = this.options;
|
|
2916
|
+
this.resolver = new Oo(i, (o, l) => this.onKeyframesResolved(o, l), n, r, s), this.resolver.scheduleResolve();
|
|
2915
2917
|
}
|
|
2916
2918
|
initPlayback(t, n) {
|
|
2917
|
-
let { duration: r = 300, times:
|
|
2919
|
+
let { duration: r = 300, times: s, ease: i, type: o, motionValue: l, name: a, startTime: u } = this.options;
|
|
2918
2920
|
if (!l.owner || !l.owner.current)
|
|
2919
2921
|
return !1;
|
|
2920
|
-
if (typeof
|
|
2922
|
+
if (typeof i == "string" && qt() && gu(i) && (i = Bo[i]), pu(this.options)) {
|
|
2921
2923
|
const { onComplete: f, onUpdate: h, motionValue: g, element: x, ...y } = this.options, P = mu(t, y);
|
|
2922
|
-
t = P.keyframes, t.length === 1 && (t[1] = t[0]), r = P.duration,
|
|
2924
|
+
t = P.keyframes, t.length === 1 && (t[1] = t[0]), r = P.duration, s = P.times, i = P.ease, o = "keyframes";
|
|
2923
2925
|
}
|
|
2924
|
-
const c = fu(l.owner.current, a, t, { ...this.options, duration: r, times:
|
|
2925
|
-
return c.startTime = u ?? this.calcStartTime(), this.pendingTimeline ? (
|
|
2926
|
+
const c = fu(l.owner.current, a, t, { ...this.options, duration: r, times: s, ease: i });
|
|
2927
|
+
return c.startTime = u ?? this.calcStartTime(), this.pendingTimeline ? (hs(c, this.pendingTimeline), this.pendingTimeline = void 0) : c.onfinish = () => {
|
|
2926
2928
|
const { onComplete: f } = this.options;
|
|
2927
2929
|
l.set(on(t, this.options, n)), f && f(), this.cancel(), this.resolveFinishedPromise();
|
|
2928
2930
|
}, {
|
|
2929
2931
|
animation: c,
|
|
2930
2932
|
duration: r,
|
|
2931
|
-
times:
|
|
2933
|
+
times: s,
|
|
2932
2934
|
type: o,
|
|
2933
|
-
ease:
|
|
2935
|
+
ease: i,
|
|
2934
2936
|
keyframes: t
|
|
2935
2937
|
};
|
|
2936
2938
|
}
|
|
@@ -2991,7 +2993,7 @@ class Mi extends Lo {
|
|
|
2991
2993
|
if (!n)
|
|
2992
2994
|
return we;
|
|
2993
2995
|
const { animation: r } = n;
|
|
2994
|
-
|
|
2996
|
+
hs(r, t);
|
|
2995
2997
|
}
|
|
2996
2998
|
return we;
|
|
2997
2999
|
}
|
|
@@ -3018,15 +3020,15 @@ class Mi extends Lo {
|
|
|
3018
3020
|
const { resolved: t } = this;
|
|
3019
3021
|
if (!t)
|
|
3020
3022
|
return;
|
|
3021
|
-
const { animation: n, keyframes: r, duration:
|
|
3023
|
+
const { animation: n, keyframes: r, duration: s, type: i, ease: o, times: l } = t;
|
|
3022
3024
|
if (n.playState === "idle" || n.playState === "finished")
|
|
3023
3025
|
return;
|
|
3024
3026
|
if (this.time) {
|
|
3025
3027
|
const { motionValue: u, onUpdate: c, onComplete: f, element: h, ...g } = this.options, x = new Lr({
|
|
3026
3028
|
...g,
|
|
3027
3029
|
keyframes: r,
|
|
3028
|
-
duration:
|
|
3029
|
-
type:
|
|
3030
|
+
duration: s,
|
|
3031
|
+
type: i,
|
|
3030
3032
|
ease: o,
|
|
3031
3033
|
times: l,
|
|
3032
3034
|
isGenerator: !0
|
|
@@ -3045,11 +3047,11 @@ class Mi extends Lo {
|
|
|
3045
3047
|
t && t.animation.cancel();
|
|
3046
3048
|
}
|
|
3047
3049
|
static supports(t) {
|
|
3048
|
-
const { motionValue: n, name: r, repeatDelay:
|
|
3050
|
+
const { motionValue: n, name: r, repeatDelay: s, repeatType: i, damping: o, type: l } = t;
|
|
3049
3051
|
if (!n || !n.owner || !(n.owner.current instanceof HTMLElement))
|
|
3050
3052
|
return !1;
|
|
3051
3053
|
const { onUpdate: a, transformTemplate: u } = n.owner.getProps();
|
|
3052
|
-
return du() && r && uu.has(r) && !a && !u && !
|
|
3054
|
+
return du() && r && uu.has(r) && !a && !u && !s && i !== "mirror" && o !== 0 && l !== "inertia";
|
|
3053
3055
|
}
|
|
3054
3056
|
}
|
|
3055
3057
|
const yu = {
|
|
@@ -3070,10 +3072,10 @@ const yu = {
|
|
|
3070
3072
|
ease: [0.25, 0.1, 0.35, 1],
|
|
3071
3073
|
duration: 0.3
|
|
3072
3074
|
}, Tu = (e, { keyframes: t }) => t.length > 2 ? xu : Xe.has(e) ? e.startsWith("scale") ? vu(t[1]) : yu : bu;
|
|
3073
|
-
function wu({ when: e, delay: t, delayChildren: n, staggerChildren: r, staggerDirection:
|
|
3075
|
+
function wu({ when: e, delay: t, delayChildren: n, staggerChildren: r, staggerDirection: s, repeat: i, repeatType: o, repeatDelay: l, from: a, elapsed: u, ...c }) {
|
|
3074
3076
|
return !!Object.keys(c).length;
|
|
3075
3077
|
}
|
|
3076
|
-
const kr = (e, t, n, r = {},
|
|
3078
|
+
const kr = (e, t, n, r = {}, s, i) => (o) => {
|
|
3077
3079
|
const l = br(r, e) || {}, a = l.delay || r.delay || 0;
|
|
3078
3080
|
let { elapsed: u = 0 } = r;
|
|
3079
3081
|
u = u - Me(a);
|
|
@@ -3091,33 +3093,33 @@ const kr = (e, t, n, r = {}, i, s) => (o) => {
|
|
|
3091
3093
|
},
|
|
3092
3094
|
name: e,
|
|
3093
3095
|
motionValue: t,
|
|
3094
|
-
element:
|
|
3096
|
+
element: i ? void 0 : s
|
|
3095
3097
|
};
|
|
3096
3098
|
wu(l) || (c = {
|
|
3097
3099
|
...c,
|
|
3098
3100
|
...Tu(e, c)
|
|
3099
3101
|
}), c.duration && (c.duration = Me(c.duration)), c.repeatDelay && (c.repeatDelay = Me(c.repeatDelay)), c.from !== void 0 && (c.keyframes[0] = c.from);
|
|
3100
3102
|
let f = !1;
|
|
3101
|
-
if ((c.type === !1 || c.duration === 0 && !c.repeatDelay) && (c.duration = 0, c.delay === 0 && (f = !0)), (nc.current ||
|
|
3103
|
+
if ((c.type === !1 || c.duration === 0 && !c.repeatDelay) && (c.duration = 0, c.delay === 0 && (f = !0)), (nc.current || _i.skipAnimations) && (f = !0, c.duration = 0, c.delay = 0), f && !i && t.get() !== void 0) {
|
|
3102
3104
|
const h = on(c.keyframes, l);
|
|
3103
3105
|
if (h !== void 0)
|
|
3104
3106
|
return J.update(() => {
|
|
3105
3107
|
c.onUpdate(h), c.onComplete();
|
|
3106
3108
|
}), new Nl([]);
|
|
3107
3109
|
}
|
|
3108
|
-
return !
|
|
3110
|
+
return !i && Ms.supports(c) ? new Ms(c) : new Lr(c);
|
|
3109
3111
|
};
|
|
3110
3112
|
function Pu({ protectedKeys: e, needsAnimating: t }, n) {
|
|
3111
3113
|
const r = e.hasOwnProperty(n) && t[n] !== !0;
|
|
3112
3114
|
return t[n] = !1, r;
|
|
3113
3115
|
}
|
|
3114
|
-
function $o(e, t, { delay: n = 0, transitionOverride: r, type:
|
|
3115
|
-
var
|
|
3116
|
+
function $o(e, t, { delay: n = 0, transitionOverride: r, type: s } = {}) {
|
|
3117
|
+
var i;
|
|
3116
3118
|
let { transition: o = e.getDefaultTransition(), transitionEnd: l, ...a } = t;
|
|
3117
3119
|
r && (o = r);
|
|
3118
|
-
const u = [], c =
|
|
3120
|
+
const u = [], c = s && e.animationState && e.animationState.getState()[s];
|
|
3119
3121
|
for (const f in a) {
|
|
3120
|
-
const h = e.getValue(f, (
|
|
3122
|
+
const h = e.getValue(f, (i = e.latestValues[f]) !== null && i !== void 0 ? i : null), g = a[f];
|
|
3121
3123
|
if (g === void 0 || c && Pu(c, f))
|
|
3122
3124
|
continue;
|
|
3123
3125
|
const x = {
|
|
@@ -3144,24 +3146,24 @@ function $o(e, t, { delay: n = 0, transitionOverride: r, type: i } = {}) {
|
|
|
3144
3146
|
}
|
|
3145
3147
|
function Wn(e, t, n = {}) {
|
|
3146
3148
|
var r;
|
|
3147
|
-
const
|
|
3148
|
-
let { transition:
|
|
3149
|
-
n.transitionOverride && (
|
|
3150
|
-
const o =
|
|
3151
|
-
const { delayChildren: c = 0, staggerChildren: f, staggerDirection: h } =
|
|
3149
|
+
const s = jt(e, t, n.type === "exit" ? (r = e.presenceContext) === null || r === void 0 ? void 0 : r.custom : void 0);
|
|
3150
|
+
let { transition: i = e.getDefaultTransition() || {} } = s || {};
|
|
3151
|
+
n.transitionOverride && (i = n.transitionOverride);
|
|
3152
|
+
const o = s ? () => Promise.all($o(e, s, n)) : () => Promise.resolve(), l = e.variantChildren && e.variantChildren.size ? (u = 0) => {
|
|
3153
|
+
const { delayChildren: c = 0, staggerChildren: f, staggerDirection: h } = i;
|
|
3152
3154
|
return Su(e, t, c + u, f, h, n);
|
|
3153
|
-
} : () => Promise.resolve(), { when: a } =
|
|
3155
|
+
} : () => Promise.resolve(), { when: a } = i;
|
|
3154
3156
|
if (a) {
|
|
3155
3157
|
const [u, c] = a === "beforeChildren" ? [o, l] : [l, o];
|
|
3156
3158
|
return u().then(() => c());
|
|
3157
3159
|
} else
|
|
3158
3160
|
return Promise.all([o(), l(n.delay)]);
|
|
3159
3161
|
}
|
|
3160
|
-
function Su(e, t, n = 0, r = 0,
|
|
3161
|
-
const o = [], l = (e.variantChildren.size - 1) * r, a =
|
|
3162
|
+
function Su(e, t, n = 0, r = 0, s = 1, i) {
|
|
3163
|
+
const o = [], l = (e.variantChildren.size - 1) * r, a = s === 1 ? (u = 0) => u * r : (u = 0) => l - u * r;
|
|
3162
3164
|
return Array.from(e.variantChildren).sort(Cu).forEach((u, c) => {
|
|
3163
3165
|
u.notify("AnimationStart", t), o.push(Wn(u, t, {
|
|
3164
|
-
...
|
|
3166
|
+
...i,
|
|
3165
3167
|
delay: n + a(c)
|
|
3166
3168
|
}).then(() => u.notify("AnimationComplete", t)));
|
|
3167
3169
|
}), Promise.all(o);
|
|
@@ -3173,13 +3175,13 @@ function Eu(e, t, n = {}) {
|
|
|
3173
3175
|
e.notify("AnimationStart", t);
|
|
3174
3176
|
let r;
|
|
3175
3177
|
if (Array.isArray(t)) {
|
|
3176
|
-
const
|
|
3177
|
-
r = Promise.all(
|
|
3178
|
+
const s = t.map((i) => Wn(e, i, n));
|
|
3179
|
+
r = Promise.all(s);
|
|
3178
3180
|
} else if (typeof t == "string")
|
|
3179
3181
|
r = Wn(e, t, n);
|
|
3180
3182
|
else {
|
|
3181
|
-
const
|
|
3182
|
-
r = Promise.all($o(e,
|
|
3183
|
+
const s = typeof t == "function" ? jt(e, t, n.custom) : t;
|
|
3184
|
+
r = Promise.all($o(e, s, n));
|
|
3183
3185
|
}
|
|
3184
3186
|
return r.then(() => {
|
|
3185
3187
|
e.notify("AnimationComplete", t);
|
|
@@ -3206,8 +3208,8 @@ function Wo(e) {
|
|
|
3206
3208
|
}
|
|
3207
3209
|
const t = {};
|
|
3208
3210
|
for (let n = 0; n < Ru; n++) {
|
|
3209
|
-
const r = ar[n],
|
|
3210
|
-
(Et(
|
|
3211
|
+
const r = ar[n], s = e.props[r];
|
|
3212
|
+
(Et(s) || s === !1) && (t[r] = s);
|
|
3211
3213
|
}
|
|
3212
3214
|
return t;
|
|
3213
3215
|
}
|
|
@@ -3216,8 +3218,8 @@ function Mu(e) {
|
|
|
3216
3218
|
return (t) => Promise.all(t.map(({ animation: n, options: r }) => Eu(e, n, r)));
|
|
3217
3219
|
}
|
|
3218
3220
|
function Vu(e) {
|
|
3219
|
-
let t = Mu(e), n =
|
|
3220
|
-
const
|
|
3221
|
+
let t = Mu(e), n = Vs(), r = !0;
|
|
3222
|
+
const s = (a) => (u, c) => {
|
|
3221
3223
|
var f;
|
|
3222
3224
|
const h = jt(e, c, a === "exit" ? (f = e.presenceContext) === null || f === void 0 ? void 0 : f.custom : void 0);
|
|
3223
3225
|
if (h) {
|
|
@@ -3226,7 +3228,7 @@ function Vu(e) {
|
|
|
3226
3228
|
}
|
|
3227
3229
|
return u;
|
|
3228
3230
|
};
|
|
3229
|
-
function
|
|
3231
|
+
function i(a) {
|
|
3230
3232
|
t = a(e);
|
|
3231
3233
|
}
|
|
3232
3234
|
function o(a) {
|
|
@@ -3241,7 +3243,7 @@ function Vu(e) {
|
|
|
3241
3243
|
const B = Du(S.prevProp, C);
|
|
3242
3244
|
let M = B || b === a && S.isActive && !A && V || P > x && V, H = !1;
|
|
3243
3245
|
const F = Array.isArray(C) ? C : [C];
|
|
3244
|
-
let ne = F.reduce(
|
|
3246
|
+
let ne = F.reduce(s(b), {});
|
|
3245
3247
|
p === !1 && (ne = {});
|
|
3246
3248
|
const { prevResolvedValues: ge = {} } = S, oe = {
|
|
3247
3249
|
...ge,
|
|
@@ -3293,10 +3295,10 @@ function Vu(e) {
|
|
|
3293
3295
|
return {
|
|
3294
3296
|
animateChanges: o,
|
|
3295
3297
|
setActive: l,
|
|
3296
|
-
setAnimateFunction:
|
|
3298
|
+
setAnimateFunction: i,
|
|
3297
3299
|
getState: () => n,
|
|
3298
3300
|
reset: () => {
|
|
3299
|
-
n =
|
|
3301
|
+
n = Vs(), r = !0;
|
|
3300
3302
|
}
|
|
3301
3303
|
};
|
|
3302
3304
|
}
|
|
@@ -3311,7 +3313,7 @@ function ze(e = !1) {
|
|
|
3311
3313
|
prevResolvedValues: {}
|
|
3312
3314
|
};
|
|
3313
3315
|
}
|
|
3314
|
-
function
|
|
3316
|
+
function Vs() {
|
|
3315
3317
|
return {
|
|
3316
3318
|
animate: ze(!0),
|
|
3317
3319
|
whileInView: ze(),
|
|
@@ -3360,8 +3362,8 @@ class ku extends Ue {
|
|
|
3360
3362
|
const { isPresent: t, onExitComplete: n } = this.node.presenceContext, { isPresent: r } = this.node.prevPresenceContext || {};
|
|
3361
3363
|
if (!this.node.animationState || t === r)
|
|
3362
3364
|
return;
|
|
3363
|
-
const
|
|
3364
|
-
n && !t &&
|
|
3365
|
+
const s = this.node.animationState.setActive("exit", !t);
|
|
3366
|
+
n && !t && s.then(() => {
|
|
3365
3367
|
n(this.id);
|
|
3366
3368
|
});
|
|
3367
3369
|
}
|
|
@@ -3422,37 +3424,37 @@ function be(e) {
|
|
|
3422
3424
|
function zu(e, t, n) {
|
|
3423
3425
|
return Math.abs(e - t) <= n;
|
|
3424
3426
|
}
|
|
3425
|
-
function
|
|
3427
|
+
function Ds(e, t, n, r = 0.5) {
|
|
3426
3428
|
e.origin = r, e.originPoint = ee(t.min, t.max, e.origin), e.scale = be(n) / be(t), e.translate = ee(n.min, n.max, e.origin) - e.originPoint, (e.scale >= Bu && e.scale <= $u || isNaN(e.scale)) && (e.scale = 1), (e.translate >= Uu && e.translate <= Wu || isNaN(e.translate)) && (e.translate = 0);
|
|
3427
3429
|
}
|
|
3428
3430
|
function St(e, t, n, r) {
|
|
3429
|
-
|
|
3431
|
+
Ds(e.x, t.x, n.x, r ? r.originX : void 0), Ds(e.y, t.y, n.y, r ? r.originY : void 0);
|
|
3430
3432
|
}
|
|
3431
|
-
function
|
|
3433
|
+
function Os(e, t, n) {
|
|
3432
3434
|
e.min = n.min + t.min, e.max = e.min + be(t);
|
|
3433
3435
|
}
|
|
3434
3436
|
function Yu(e, t, n) {
|
|
3435
|
-
|
|
3437
|
+
Os(e.x, t.x, n.x), Os(e.y, t.y, n.y);
|
|
3436
3438
|
}
|
|
3437
|
-
function
|
|
3439
|
+
function Ls(e, t, n) {
|
|
3438
3440
|
e.min = t.min - n.min, e.max = e.min + be(t);
|
|
3439
3441
|
}
|
|
3440
3442
|
function Ct(e, t, n) {
|
|
3441
|
-
|
|
3443
|
+
Ls(e.x, t.x, n.x), Ls(e.y, t.y, n.y);
|
|
3442
3444
|
}
|
|
3443
|
-
const
|
|
3445
|
+
const ks = () => ({
|
|
3444
3446
|
translate: 0,
|
|
3445
3447
|
scale: 1,
|
|
3446
3448
|
origin: 0,
|
|
3447
3449
|
originPoint: 0
|
|
3448
3450
|
}), rt = () => ({
|
|
3449
|
-
x:
|
|
3450
|
-
y:
|
|
3451
|
-
}),
|
|
3452
|
-
x:
|
|
3453
|
-
y:
|
|
3451
|
+
x: ks(),
|
|
3452
|
+
y: ks()
|
|
3453
|
+
}), _s = () => ({ min: 0, max: 0 }), se = () => ({
|
|
3454
|
+
x: _s(),
|
|
3455
|
+
y: _s()
|
|
3454
3456
|
});
|
|
3455
|
-
function
|
|
3457
|
+
function Ae(e) {
|
|
3456
3458
|
return [e("x"), e("y")];
|
|
3457
3459
|
}
|
|
3458
3460
|
function xn(e) {
|
|
@@ -3465,65 +3467,65 @@ function Ye(e) {
|
|
|
3465
3467
|
return zn(e) || Go(e) || e.z || e.rotate || e.rotateX || e.rotateY || e.skewX || e.skewY;
|
|
3466
3468
|
}
|
|
3467
3469
|
function Go(e) {
|
|
3468
|
-
return
|
|
3470
|
+
return Is(e.x) || Is(e.y);
|
|
3469
3471
|
}
|
|
3470
|
-
function
|
|
3472
|
+
function Is(e) {
|
|
3471
3473
|
return e && e !== "0%";
|
|
3472
3474
|
}
|
|
3473
3475
|
function Jt(e, t, n) {
|
|
3474
|
-
const r = e - n,
|
|
3475
|
-
return n +
|
|
3476
|
+
const r = e - n, s = t * r;
|
|
3477
|
+
return n + s;
|
|
3476
3478
|
}
|
|
3477
|
-
function
|
|
3478
|
-
return
|
|
3479
|
+
function Fs(e, t, n, r, s) {
|
|
3480
|
+
return s !== void 0 && (e = Jt(e, s, r)), Jt(e, n, r) + t;
|
|
3479
3481
|
}
|
|
3480
|
-
function Yn(e, t = 0, n = 1, r,
|
|
3481
|
-
e.min =
|
|
3482
|
+
function Yn(e, t = 0, n = 1, r, s) {
|
|
3483
|
+
e.min = Fs(e.min, t, n, r, s), e.max = Fs(e.max, t, n, r, s);
|
|
3482
3484
|
}
|
|
3483
3485
|
function qo(e, { x: t, y: n }) {
|
|
3484
3486
|
Yn(e.x, t.translate, t.scale, t.originPoint), Yn(e.y, n.translate, n.scale, n.originPoint);
|
|
3485
3487
|
}
|
|
3486
|
-
const
|
|
3488
|
+
const Ns = 0.999999999999, Bs = 1.0000000000001;
|
|
3487
3489
|
function Ku(e, t, n, r = !1) {
|
|
3488
|
-
const
|
|
3489
|
-
if (!
|
|
3490
|
+
const s = n.length;
|
|
3491
|
+
if (!s)
|
|
3490
3492
|
return;
|
|
3491
3493
|
t.x = t.y = 1;
|
|
3492
|
-
let
|
|
3493
|
-
for (let l = 0; l <
|
|
3494
|
-
|
|
3495
|
-
const { visualElement: a } =
|
|
3496
|
-
a && a.props.style && a.props.style.display === "contents" || (r &&
|
|
3497
|
-
x: -
|
|
3498
|
-
y: -
|
|
3499
|
-
}), o && (t.x *= o.x.scale, t.y *= o.y.scale, qo(e, o)), r && Ye(
|
|
3494
|
+
let i, o;
|
|
3495
|
+
for (let l = 0; l < s; l++) {
|
|
3496
|
+
i = n[l], o = i.projectionDelta;
|
|
3497
|
+
const { visualElement: a } = i.options;
|
|
3498
|
+
a && a.props.style && a.props.style.display === "contents" || (r && i.options.layoutScroll && i.scroll && i !== i.root && it(e, {
|
|
3499
|
+
x: -i.scroll.offset.x,
|
|
3500
|
+
y: -i.scroll.offset.y
|
|
3501
|
+
}), o && (t.x *= o.x.scale, t.y *= o.y.scale, qo(e, o)), r && Ye(i.latestValues) && it(e, i.latestValues));
|
|
3500
3502
|
}
|
|
3501
|
-
t.x <
|
|
3503
|
+
t.x < Bs && t.x > Ns && (t.x = 1), t.y < Bs && t.y > Ns && (t.y = 1);
|
|
3502
3504
|
}
|
|
3503
|
-
function
|
|
3505
|
+
function st(e, t) {
|
|
3504
3506
|
e.min = e.min + t, e.max = e.max + t;
|
|
3505
3507
|
}
|
|
3506
|
-
function $
|
|
3507
|
-
const
|
|
3508
|
-
Yn(e, t, n,
|
|
3508
|
+
function $s(e, t, n, r, s = 0.5) {
|
|
3509
|
+
const i = ee(e.min, e.max, s);
|
|
3510
|
+
Yn(e, t, n, i, r);
|
|
3509
3511
|
}
|
|
3510
|
-
function
|
|
3511
|
-
$
|
|
3512
|
+
function it(e, t) {
|
|
3513
|
+
$s(e.x, t.x, t.scaleX, t.scale, t.originX), $s(e.y, t.y, t.scaleY, t.scale, t.originY);
|
|
3512
3514
|
}
|
|
3513
3515
|
function Ho(e, t) {
|
|
3514
3516
|
return zo(Nu(e.getBoundingClientRect(), t));
|
|
3515
3517
|
}
|
|
3516
3518
|
function Gu(e, t, n) {
|
|
3517
|
-
const r = Ho(e, n), { scroll:
|
|
3518
|
-
return
|
|
3519
|
+
const r = Ho(e, n), { scroll: s } = t;
|
|
3520
|
+
return s && (st(r.x, s.offset.x), st(r.y, s.offset.y)), r;
|
|
3519
3521
|
}
|
|
3520
|
-
const
|
|
3522
|
+
const Us = (e, t) => Math.abs(e - t);
|
|
3521
3523
|
function qu(e, t) {
|
|
3522
|
-
const n =
|
|
3524
|
+
const n = Us(e.x, t.x), r = Us(e.y, t.y);
|
|
3523
3525
|
return Math.sqrt(n ** 2 + r ** 2);
|
|
3524
3526
|
}
|
|
3525
3527
|
class Xo {
|
|
3526
|
-
constructor(t, n, { transformPagePoint: r, dragSnapToOrigin:
|
|
3528
|
+
constructor(t, n, { transformPagePoint: r, dragSnapToOrigin: s = !1 } = {}) {
|
|
3527
3529
|
if (this.startEvent = null, this.lastMoveEvent = null, this.lastMoveEventInfo = null, this.handlers = {}, this.updatePoint = () => {
|
|
3528
3530
|
if (!(this.lastMoveEvent && this.lastMoveEventInfo))
|
|
3529
3531
|
return;
|
|
@@ -3551,8 +3553,8 @@ class Xo {
|
|
|
3551
3553
|
this.startEvent && h && h(c, y), g && g(c, y);
|
|
3552
3554
|
}, !Pr(t))
|
|
3553
3555
|
return;
|
|
3554
|
-
this.dragSnapToOrigin =
|
|
3555
|
-
const
|
|
3556
|
+
this.dragSnapToOrigin = s, this.handlers = n, this.transformPagePoint = r;
|
|
3557
|
+
const i = It(t), o = bn(i, this.transformPagePoint), { point: l } = o, { timestamp: a } = ue;
|
|
3556
3558
|
this.history = [{ ...l, timestamp: a }];
|
|
3557
3559
|
const { onSessionStart: u } = n;
|
|
3558
3560
|
u && u(t, Tn(o, this.history)), Ht(t, "set"), this.removeListeners = _t(nt(t.currentTarget, "pointermove", this.handlePointerMove), nt(t.currentTarget, "pointerup", this.handlePointerUp), nt(t.currentTarget, "pointercancel", this.handlePointerUp), nt(t.currentTarget, "lostpointercapture", this.handlePointerUp));
|
|
@@ -3567,14 +3569,14 @@ class Xo {
|
|
|
3567
3569
|
function bn(e, t) {
|
|
3568
3570
|
return t ? { point: t(e.point) } : e;
|
|
3569
3571
|
}
|
|
3570
|
-
function
|
|
3572
|
+
function Ws(e, t) {
|
|
3571
3573
|
return { x: e.x - t.x, y: e.y - t.y };
|
|
3572
3574
|
}
|
|
3573
3575
|
function Tn({ point: e }, t) {
|
|
3574
3576
|
return {
|
|
3575
3577
|
point: e,
|
|
3576
|
-
delta:
|
|
3577
|
-
offset:
|
|
3578
|
+
delta: Ws(e, Zo(t)),
|
|
3579
|
+
offset: Ws(e, Hu(t)),
|
|
3578
3580
|
velocity: Xu(t, 0.1)
|
|
3579
3581
|
};
|
|
3580
3582
|
}
|
|
@@ -3588,49 +3590,49 @@ function Xu(e, t) {
|
|
|
3588
3590
|
if (e.length < 2)
|
|
3589
3591
|
return { x: 0, y: 0 };
|
|
3590
3592
|
let n = e.length - 1, r = null;
|
|
3591
|
-
const
|
|
3592
|
-
for (; n >= 0 && (r = e[n], !(
|
|
3593
|
+
const s = Zo(e);
|
|
3594
|
+
for (; n >= 0 && (r = e[n], !(s.timestamp - r.timestamp > Me(t))); )
|
|
3593
3595
|
n--;
|
|
3594
3596
|
if (!r)
|
|
3595
3597
|
return { x: 0, y: 0 };
|
|
3596
|
-
const
|
|
3597
|
-
if (
|
|
3598
|
+
const i = ke(s.timestamp - r.timestamp);
|
|
3599
|
+
if (i === 0)
|
|
3598
3600
|
return { x: 0, y: 0 };
|
|
3599
3601
|
const o = {
|
|
3600
|
-
x: (
|
|
3601
|
-
y: (
|
|
3602
|
+
x: (s.x - r.x) / i,
|
|
3603
|
+
y: (s.y - r.y) / i
|
|
3602
3604
|
};
|
|
3603
3605
|
return o.x === 1 / 0 && (o.x = 0), o.y === 1 / 0 && (o.y = 0), o;
|
|
3604
3606
|
}
|
|
3605
3607
|
function Zu(e, { min: t, max: n }, r) {
|
|
3606
3608
|
return t !== void 0 && e < t ? e = r ? ee(t, e, r.min) : Math.max(e, t) : n !== void 0 && e > n && (e = r ? ee(n, e, r.max) : Math.min(e, n)), e;
|
|
3607
3609
|
}
|
|
3608
|
-
function
|
|
3610
|
+
function zs(e, t, n) {
|
|
3609
3611
|
return {
|
|
3610
3612
|
min: t !== void 0 ? e.min + t : void 0,
|
|
3611
3613
|
max: n !== void 0 ? e.max + n - (e.max - e.min) : void 0
|
|
3612
3614
|
};
|
|
3613
3615
|
}
|
|
3614
|
-
function Ju(e, { top: t, left: n, bottom: r, right:
|
|
3616
|
+
function Ju(e, { top: t, left: n, bottom: r, right: s }) {
|
|
3615
3617
|
return {
|
|
3616
|
-
x:
|
|
3617
|
-
y:
|
|
3618
|
+
x: zs(e.x, n, s),
|
|
3619
|
+
y: zs(e.y, t, r)
|
|
3618
3620
|
};
|
|
3619
3621
|
}
|
|
3620
|
-
function
|
|
3622
|
+
function Ys(e, t) {
|
|
3621
3623
|
let n = t.min - e.min, r = t.max - e.max;
|
|
3622
3624
|
return t.max - t.min < e.max - e.min && ([n, r] = [r, n]), { min: n, max: r };
|
|
3623
3625
|
}
|
|
3624
3626
|
function Qu(e, t) {
|
|
3625
3627
|
return {
|
|
3626
|
-
x:
|
|
3627
|
-
y:
|
|
3628
|
+
x: Ys(e.x, t.x),
|
|
3629
|
+
y: Ys(e.y, t.y)
|
|
3628
3630
|
};
|
|
3629
3631
|
}
|
|
3630
3632
|
function ef(e, t) {
|
|
3631
3633
|
let n = 0.5;
|
|
3632
|
-
const r = be(e),
|
|
3633
|
-
return
|
|
3634
|
+
const r = be(e), s = be(t);
|
|
3635
|
+
return s > r ? n = ot(t.min, t.max - r, e.min) : r > s && (n = ot(e.min, e.max - s, t.min)), _e(0, 1, n);
|
|
3634
3636
|
}
|
|
3635
3637
|
function tf(e, t) {
|
|
3636
3638
|
const n = {};
|
|
@@ -3639,36 +3641,36 @@ function tf(e, t) {
|
|
|
3639
3641
|
const Kn = 0.35;
|
|
3640
3642
|
function nf(e = Kn) {
|
|
3641
3643
|
return e === !1 ? e = 0 : e === !0 && (e = Kn), {
|
|
3642
|
-
x:
|
|
3643
|
-
y:
|
|
3644
|
+
x: Ks(e, "left", "right"),
|
|
3645
|
+
y: Ks(e, "top", "bottom")
|
|
3644
3646
|
};
|
|
3645
3647
|
}
|
|
3646
|
-
function
|
|
3648
|
+
function Ks(e, t, n) {
|
|
3647
3649
|
return {
|
|
3648
|
-
min:
|
|
3649
|
-
max:
|
|
3650
|
+
min: Gs(e, t),
|
|
3651
|
+
max: Gs(e, n)
|
|
3650
3652
|
};
|
|
3651
3653
|
}
|
|
3652
|
-
function
|
|
3654
|
+
function Gs(e, t) {
|
|
3653
3655
|
return typeof e == "number" ? e : e[t] || 0;
|
|
3654
3656
|
}
|
|
3655
3657
|
const rf = /* @__PURE__ */ new WeakMap();
|
|
3656
3658
|
class sf {
|
|
3657
3659
|
constructor(t) {
|
|
3658
|
-
this.openDragLock = null, this.isDragging = !1, this.currentDirection = null, this.originPoint = { x: 0, y: 0 }, this.constraints = !1, this.hasMutatedConstraints = !1, this.elastic =
|
|
3660
|
+
this.openDragLock = null, this.isDragging = !1, this.currentDirection = null, this.originPoint = { x: 0, y: 0 }, this.constraints = !1, this.hasMutatedConstraints = !1, this.elastic = se(), this.visualElement = t;
|
|
3659
3661
|
}
|
|
3660
3662
|
start(t, { snapToCursor: n = !1 } = {}) {
|
|
3661
3663
|
const { presenceContext: r } = this.visualElement;
|
|
3662
3664
|
if (r && r.isPresent === !1)
|
|
3663
3665
|
return;
|
|
3664
|
-
const
|
|
3666
|
+
const s = (c) => {
|
|
3665
3667
|
const { dragSnapToOrigin: f } = this.getProps();
|
|
3666
3668
|
f ? this.pauseAnimation() : this.stopAnimation(), n && this.snapToCursor(It(c).point);
|
|
3667
|
-
},
|
|
3669
|
+
}, i = (c, f) => {
|
|
3668
3670
|
const { drag: h, dragPropagation: g, onDragStart: x } = this.getProps();
|
|
3669
3671
|
if (h && !g && (this.openDragLock && this.openDragLock(), this.openDragLock = Hl(h), !this.openDragLock))
|
|
3670
3672
|
return;
|
|
3671
|
-
this.isDragging = !0, this.currentDirection = null, this.resolveConstraints(), this.visualElement.projection && (this.visualElement.projection.isAnimationBlocked = !0, this.visualElement.projection.target = void 0),
|
|
3673
|
+
this.isDragging = !0, this.currentDirection = null, this.resolveConstraints(), this.visualElement.projection && (this.visualElement.projection.isAnimationBlocked = !0, this.visualElement.projection.target = void 0), Ae((P) => {
|
|
3672
3674
|
let b = this.getAxisMotionValue(P).get() || 0;
|
|
3673
3675
|
if (Ve.test(b)) {
|
|
3674
3676
|
const { projection: S } = this.visualElement;
|
|
@@ -3691,13 +3693,13 @@ class sf {
|
|
|
3691
3693
|
return;
|
|
3692
3694
|
}
|
|
3693
3695
|
this.updateAxis("x", f.point, P), this.updateAxis("y", f.point, P), this.visualElement.render(), y && y(c, f);
|
|
3694
|
-
}, l = (c, f) => this.stop(c, f), a = () =>
|
|
3696
|
+
}, l = (c, f) => this.stop(c, f), a = () => Ae((c) => {
|
|
3695
3697
|
var f;
|
|
3696
3698
|
return this.getAnimationState(c) === "paused" && ((f = this.getAxisMotionValue(c).animation) === null || f === void 0 ? void 0 : f.play());
|
|
3697
3699
|
}), { dragSnapToOrigin: u } = this.getProps();
|
|
3698
3700
|
this.panSession = new Xo(t, {
|
|
3699
|
-
onSessionStart:
|
|
3700
|
-
onStart:
|
|
3701
|
+
onSessionStart: s,
|
|
3702
|
+
onStart: i,
|
|
3701
3703
|
onMove: o,
|
|
3702
3704
|
onSessionEnd: l,
|
|
3703
3705
|
resumeAnimation: a
|
|
@@ -3710,10 +3712,10 @@ class sf {
|
|
|
3710
3712
|
const r = this.isDragging;
|
|
3711
3713
|
if (this.cancel(), !r)
|
|
3712
3714
|
return;
|
|
3713
|
-
const { velocity:
|
|
3714
|
-
this.startAnimation(
|
|
3715
|
-
const { onDragEnd:
|
|
3716
|
-
|
|
3715
|
+
const { velocity: s } = n;
|
|
3716
|
+
this.startAnimation(s);
|
|
3717
|
+
const { onDragEnd: i } = this.getProps();
|
|
3718
|
+
i && J.postRender(() => i(t, n));
|
|
3717
3719
|
}
|
|
3718
3720
|
cancel() {
|
|
3719
3721
|
this.isDragging = !1;
|
|
@@ -3723,18 +3725,18 @@ class sf {
|
|
|
3723
3725
|
!r && this.openDragLock && (this.openDragLock(), this.openDragLock = null), n && n.setActive("whileDrag", !1);
|
|
3724
3726
|
}
|
|
3725
3727
|
updateAxis(t, n, r) {
|
|
3726
|
-
const { drag:
|
|
3727
|
-
if (!r || !Wt(t,
|
|
3728
|
+
const { drag: s } = this.getProps();
|
|
3729
|
+
if (!r || !Wt(t, s, this.currentDirection))
|
|
3728
3730
|
return;
|
|
3729
|
-
const
|
|
3731
|
+
const i = this.getAxisMotionValue(t);
|
|
3730
3732
|
let o = this.originPoint[t] + r[t];
|
|
3731
|
-
this.constraints && this.constraints[t] && (o = Zu(o, this.constraints[t], this.elastic[t])),
|
|
3733
|
+
this.constraints && this.constraints[t] && (o = Zu(o, this.constraints[t], this.elastic[t])), i.set(o);
|
|
3732
3734
|
}
|
|
3733
3735
|
resolveConstraints() {
|
|
3734
3736
|
var t;
|
|
3735
|
-
const { dragConstraints: n, dragElastic: r } = this.getProps(),
|
|
3736
|
-
n && et(n) ? this.constraints || (this.constraints = this.resolveRefConstraints()) : n &&
|
|
3737
|
-
this.constraints !== !1 && this.getAxisMotionValue(o) && (this.constraints[o] = tf(
|
|
3737
|
+
const { dragConstraints: n, dragElastic: r } = this.getProps(), s = this.visualElement.projection && !this.visualElement.projection.layout ? this.visualElement.projection.measure(!1) : (t = this.visualElement.projection) === null || t === void 0 ? void 0 : t.layout, i = this.constraints;
|
|
3738
|
+
n && et(n) ? this.constraints || (this.constraints = this.resolveRefConstraints()) : n && s ? this.constraints = Ju(s.layoutBox, n) : this.constraints = !1, this.elastic = nf(r), i !== this.constraints && s && this.constraints && !this.hasMutatedConstraints && Ae((o) => {
|
|
3739
|
+
this.constraints !== !1 && this.getAxisMotionValue(o) && (this.constraints[o] = tf(s.layoutBox[o], this.constraints[o]));
|
|
3738
3740
|
});
|
|
3739
3741
|
}
|
|
3740
3742
|
resolveRefConstraints() {
|
|
@@ -3743,11 +3745,11 @@ class sf {
|
|
|
3743
3745
|
return !1;
|
|
3744
3746
|
const r = t.current;
|
|
3745
3747
|
Ne(r !== null, "If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.");
|
|
3746
|
-
const { projection:
|
|
3747
|
-
if (!
|
|
3748
|
+
const { projection: s } = this.visualElement;
|
|
3749
|
+
if (!s || !s.layout)
|
|
3748
3750
|
return !1;
|
|
3749
|
-
const
|
|
3750
|
-
let o = Qu(
|
|
3751
|
+
const i = Gu(r, s.root, this.visualElement.getTransformPagePoint());
|
|
3752
|
+
let o = Qu(s.layout.layoutBox, i);
|
|
3751
3753
|
if (n) {
|
|
3752
3754
|
const l = n(Fu(o));
|
|
3753
3755
|
this.hasMutatedConstraints = !!l, l && (o = zo(l));
|
|
@@ -3755,12 +3757,12 @@ class sf {
|
|
|
3755
3757
|
return o;
|
|
3756
3758
|
}
|
|
3757
3759
|
startAnimation(t) {
|
|
3758
|
-
const { drag: n, dragMomentum: r, dragElastic:
|
|
3760
|
+
const { drag: n, dragMomentum: r, dragElastic: s, dragTransition: i, dragSnapToOrigin: o, onDragTransitionEnd: l } = this.getProps(), a = this.constraints || {}, u = Ae((c) => {
|
|
3759
3761
|
if (!Wt(c, n, this.currentDirection))
|
|
3760
3762
|
return;
|
|
3761
3763
|
let f = a && a[c] || {};
|
|
3762
3764
|
o && (f = { min: 0, max: 0 });
|
|
3763
|
-
const h =
|
|
3765
|
+
const h = s ? 200 : 1e6, g = s ? 40 : 1e7, x = {
|
|
3764
3766
|
type: "inertia",
|
|
3765
3767
|
velocity: r ? t[c] : 0,
|
|
3766
3768
|
bounceStiffness: h,
|
|
@@ -3768,7 +3770,7 @@ class sf {
|
|
|
3768
3770
|
timeConstant: 750,
|
|
3769
3771
|
restDelta: 1,
|
|
3770
3772
|
restSpeed: 10,
|
|
3771
|
-
...
|
|
3773
|
+
...i,
|
|
3772
3774
|
...f
|
|
3773
3775
|
};
|
|
3774
3776
|
return this.startAxisValueAnimation(c, x);
|
|
@@ -3780,10 +3782,10 @@ class sf {
|
|
|
3780
3782
|
return _n(this.visualElement, t), r.start(kr(t, r, 0, n, this.visualElement, !1));
|
|
3781
3783
|
}
|
|
3782
3784
|
stopAnimation() {
|
|
3783
|
-
|
|
3785
|
+
Ae((t) => this.getAxisMotionValue(t).stop());
|
|
3784
3786
|
}
|
|
3785
3787
|
pauseAnimation() {
|
|
3786
|
-
|
|
3788
|
+
Ae((t) => {
|
|
3787
3789
|
var n;
|
|
3788
3790
|
return (n = this.getAxisMotionValue(t).animation) === null || n === void 0 ? void 0 : n.pause();
|
|
3789
3791
|
});
|
|
@@ -3793,18 +3795,18 @@ class sf {
|
|
|
3793
3795
|
return (n = this.getAxisMotionValue(t).animation) === null || n === void 0 ? void 0 : n.state;
|
|
3794
3796
|
}
|
|
3795
3797
|
getAxisMotionValue(t) {
|
|
3796
|
-
const n = `_drag${t.toUpperCase()}`, r = this.visualElement.getProps(),
|
|
3797
|
-
return
|
|
3798
|
+
const n = `_drag${t.toUpperCase()}`, r = this.visualElement.getProps(), s = r[n];
|
|
3799
|
+
return s || this.visualElement.getValue(t, (r.initial ? r.initial[t] : void 0) || 0);
|
|
3798
3800
|
}
|
|
3799
3801
|
snapToCursor(t) {
|
|
3800
|
-
|
|
3802
|
+
Ae((n) => {
|
|
3801
3803
|
const { drag: r } = this.getProps();
|
|
3802
3804
|
if (!Wt(n, r, this.currentDirection))
|
|
3803
3805
|
return;
|
|
3804
|
-
const { projection:
|
|
3805
|
-
if (
|
|
3806
|
-
const { min: o, max: l } =
|
|
3807
|
-
|
|
3806
|
+
const { projection: s } = this.visualElement, i = this.getAxisMotionValue(n);
|
|
3807
|
+
if (s && s.layout) {
|
|
3808
|
+
const { min: o, max: l } = s.layout.layoutBox[n];
|
|
3809
|
+
i.set(t[n] - ee(o, l, 0.5));
|
|
3808
3810
|
}
|
|
3809
3811
|
});
|
|
3810
3812
|
}
|
|
@@ -3815,20 +3817,20 @@ class sf {
|
|
|
3815
3817
|
if (!et(n) || !r || !this.constraints)
|
|
3816
3818
|
return;
|
|
3817
3819
|
this.stopAnimation();
|
|
3818
|
-
const
|
|
3819
|
-
|
|
3820
|
+
const s = { x: 0, y: 0 };
|
|
3821
|
+
Ae((o) => {
|
|
3820
3822
|
const l = this.getAxisMotionValue(o);
|
|
3821
3823
|
if (l && this.constraints !== !1) {
|
|
3822
3824
|
const a = l.get();
|
|
3823
|
-
|
|
3825
|
+
s[o] = ef({ min: a, max: a }, this.constraints[o]);
|
|
3824
3826
|
}
|
|
3825
3827
|
});
|
|
3826
|
-
const { transformTemplate:
|
|
3827
|
-
this.visualElement.current.style.transform =
|
|
3828
|
+
const { transformTemplate: i } = this.visualElement.getProps();
|
|
3829
|
+
this.visualElement.current.style.transform = i ? i({}, "") : "none", r.root && r.root.updateScroll(), r.updateLayout(), this.resolveConstraints(), Ae((o) => {
|
|
3828
3830
|
if (!Wt(o, t, null))
|
|
3829
3831
|
return;
|
|
3830
3832
|
const l = this.getAxisMotionValue(o), { min: a, max: u } = this.constraints[o];
|
|
3831
|
-
l.set(ee(a, u,
|
|
3833
|
+
l.set(ee(a, u, s[o]));
|
|
3832
3834
|
});
|
|
3833
3835
|
}
|
|
3834
3836
|
addListeners() {
|
|
@@ -3841,26 +3843,26 @@ class sf {
|
|
|
3841
3843
|
}), r = () => {
|
|
3842
3844
|
const { dragConstraints: a } = this.getProps();
|
|
3843
3845
|
et(a) && a.current && (this.constraints = this.resolveRefConstraints());
|
|
3844
|
-
}, { projection:
|
|
3845
|
-
|
|
3846
|
-
const o = Dt(window, "resize", () => this.scalePositionWithinConstraints()), l =
|
|
3847
|
-
this.isDragging && u && (
|
|
3846
|
+
}, { projection: s } = this.visualElement, i = s.addEventListener("measure", r);
|
|
3847
|
+
s && !s.layout && (s.root && s.root.updateScroll(), s.updateLayout()), J.read(r);
|
|
3848
|
+
const o = Dt(window, "resize", () => this.scalePositionWithinConstraints()), l = s.addEventListener("didUpdate", ({ delta: a, hasLayoutChanged: u }) => {
|
|
3849
|
+
this.isDragging && u && (Ae((c) => {
|
|
3848
3850
|
const f = this.getAxisMotionValue(c);
|
|
3849
3851
|
f && (this.originPoint[c] += a[c].translate, f.set(f.get() + a[c].translate));
|
|
3850
3852
|
}), this.visualElement.render());
|
|
3851
3853
|
});
|
|
3852
3854
|
return () => {
|
|
3853
|
-
o(), n(),
|
|
3855
|
+
o(), n(), i(), l && l();
|
|
3854
3856
|
};
|
|
3855
3857
|
}
|
|
3856
3858
|
getProps() {
|
|
3857
|
-
const t = this.visualElement.getProps(), { drag: n = !1, dragDirectionLock: r = !1, dragPropagation:
|
|
3859
|
+
const t = this.visualElement.getProps(), { drag: n = !1, dragDirectionLock: r = !1, dragPropagation: s = !1, dragConstraints: i = !1, dragElastic: o = Kn, dragMomentum: l = !0 } = t;
|
|
3858
3860
|
return {
|
|
3859
3861
|
...t,
|
|
3860
3862
|
drag: n,
|
|
3861
3863
|
dragDirectionLock: r,
|
|
3862
|
-
dragPropagation:
|
|
3863
|
-
dragConstraints:
|
|
3864
|
+
dragPropagation: s,
|
|
3865
|
+
dragConstraints: i,
|
|
3864
3866
|
dragElastic: o,
|
|
3865
3867
|
dragMomentum: l
|
|
3866
3868
|
};
|
|
@@ -3885,7 +3887,7 @@ class af extends Ue {
|
|
|
3885
3887
|
this.removeGroupControls(), this.removeListeners();
|
|
3886
3888
|
}
|
|
3887
3889
|
}
|
|
3888
|
-
const
|
|
3890
|
+
const qs = (e) => (t, n) => {
|
|
3889
3891
|
e && J.postRender(() => e(t, n));
|
|
3890
3892
|
};
|
|
3891
3893
|
class lf extends Ue {
|
|
@@ -3898,13 +3900,13 @@ class lf extends Ue {
|
|
|
3898
3900
|
});
|
|
3899
3901
|
}
|
|
3900
3902
|
createPanHandlers() {
|
|
3901
|
-
const { onPanSessionStart: t, onPanStart: n, onPan: r, onPanEnd:
|
|
3903
|
+
const { onPanSessionStart: t, onPanStart: n, onPan: r, onPanEnd: s } = this.node.getProps();
|
|
3902
3904
|
return {
|
|
3903
|
-
onSessionStart:
|
|
3904
|
-
onStart:
|
|
3905
|
+
onSessionStart: qs(t),
|
|
3906
|
+
onStart: qs(n),
|
|
3905
3907
|
onMove: r,
|
|
3906
|
-
onEnd: (
|
|
3907
|
-
delete this.session,
|
|
3908
|
+
onEnd: (i, o) => {
|
|
3909
|
+
delete this.session, s && J.postRender(() => s(i, o));
|
|
3908
3910
|
}
|
|
3909
3911
|
};
|
|
3910
3912
|
}
|
|
@@ -3922,7 +3924,7 @@ const Kt = {
|
|
|
3922
3924
|
hasAnimatedSinceResize: !0,
|
|
3923
3925
|
hasEverUpdated: !1
|
|
3924
3926
|
};
|
|
3925
|
-
function
|
|
3927
|
+
function Hs(e, t) {
|
|
3926
3928
|
return t.max === t.min ? 0 : e / (t.max - t.min) * 100;
|
|
3927
3929
|
}
|
|
3928
3930
|
const yt = {
|
|
@@ -3934,33 +3936,33 @@ const yt = {
|
|
|
3934
3936
|
e = parseFloat(e);
|
|
3935
3937
|
else
|
|
3936
3938
|
return e;
|
|
3937
|
-
const n =
|
|
3939
|
+
const n = Hs(e, t.target.x), r = Hs(e, t.target.y);
|
|
3938
3940
|
return `${n}% ${r}%`;
|
|
3939
3941
|
}
|
|
3940
3942
|
}, cf = {
|
|
3941
3943
|
correct: (e, { treeScale: t, projectionDelta: n }) => {
|
|
3942
|
-
const r = e,
|
|
3943
|
-
if (
|
|
3944
|
+
const r = e, s = $e.parse(e);
|
|
3945
|
+
if (s.length > 5)
|
|
3944
3946
|
return r;
|
|
3945
|
-
const
|
|
3946
|
-
|
|
3947
|
+
const i = $e.createTransformer(e), o = typeof s[0] != "number" ? 1 : 0, l = n.x.scale * t.x, a = n.y.scale * t.y;
|
|
3948
|
+
s[0 + o] /= l, s[1 + o] /= a;
|
|
3947
3949
|
const u = ee(l, a, 0.5);
|
|
3948
|
-
return typeof
|
|
3950
|
+
return typeof s[2 + o] == "number" && (s[2 + o] /= u), typeof s[3 + o] == "number" && (s[3 + o] /= u), i(s);
|
|
3949
3951
|
}
|
|
3950
3952
|
};
|
|
3951
3953
|
class uf extends Fa {
|
|
3952
3954
|
componentDidMount() {
|
|
3953
|
-
const { visualElement: t, layoutGroup: n, switchLayoutGroup: r, layoutId:
|
|
3954
|
-
dl(ff),
|
|
3955
|
+
const { visualElement: t, layoutGroup: n, switchLayoutGroup: r, layoutId: s } = this.props, { projection: i } = t;
|
|
3956
|
+
dl(ff), i && (n.group && n.group.add(i), r && r.register && s && r.register(i), i.root.didUpdate(), i.addEventListener("animationComplete", () => {
|
|
3955
3957
|
this.safeToRemove();
|
|
3956
|
-
}),
|
|
3957
|
-
...
|
|
3958
|
+
}), i.setOptions({
|
|
3959
|
+
...i.options,
|
|
3958
3960
|
onExitComplete: () => this.safeToRemove()
|
|
3959
3961
|
})), Kt.hasEverUpdated = !0;
|
|
3960
3962
|
}
|
|
3961
3963
|
getSnapshotBeforeUpdate(t) {
|
|
3962
|
-
const { layoutDependency: n, visualElement: r, drag:
|
|
3963
|
-
return o && (o.isPresent =
|
|
3964
|
+
const { layoutDependency: n, visualElement: r, drag: s, isPresent: i } = this.props, o = r.projection;
|
|
3965
|
+
return o && (o.isPresent = i, s || t.layoutDependency !== n || n === void 0 ? o.willUpdate() : this.safeToRemove(), t.isPresent !== i && (i ? o.promote() : o.relegate() || J.postRender(() => {
|
|
3964
3966
|
const l = o.getStack();
|
|
3965
3967
|
(!l || !l.members.length) && this.safeToRemove();
|
|
3966
3968
|
}))), null;
|
|
@@ -3972,8 +3974,8 @@ class uf extends Fa {
|
|
|
3972
3974
|
}));
|
|
3973
3975
|
}
|
|
3974
3976
|
componentWillUnmount() {
|
|
3975
|
-
const { visualElement: t, layoutGroup: n, switchLayoutGroup: r } = this.props, { projection:
|
|
3976
|
-
|
|
3977
|
+
const { visualElement: t, layoutGroup: n, switchLayoutGroup: r } = this.props, { projection: s } = t;
|
|
3978
|
+
s && (s.scheduleCheckAfterUnmount(), n && n.group && n.group.remove(s), r && r.deregister && r.deregister(s));
|
|
3977
3979
|
}
|
|
3978
3980
|
safeToRemove() {
|
|
3979
3981
|
const { safeToRemove: t } = this.props;
|
|
@@ -3984,8 +3986,8 @@ class uf extends Fa {
|
|
|
3984
3986
|
}
|
|
3985
3987
|
}
|
|
3986
3988
|
function Jo(e) {
|
|
3987
|
-
const [t, n] =
|
|
3988
|
-
return m.exports.jsx(uf, { ...e, layoutGroup: r, switchLayoutGroup: pe(
|
|
3989
|
+
const [t, n] = Oi(), r = pe(tr);
|
|
3990
|
+
return m.exports.jsx(uf, { ...e, layoutGroup: r, switchLayoutGroup: pe(Ui), isPresent: t, safeToRemove: n });
|
|
3989
3991
|
}
|
|
3990
3992
|
const ff = {
|
|
3991
3993
|
borderRadius: {
|
|
@@ -4026,82 +4028,82 @@ class mf {
|
|
|
4026
4028
|
}
|
|
4027
4029
|
}
|
|
4028
4030
|
function gf(e, t) {
|
|
4029
|
-
const n = De.now(), r = ({ timestamp:
|
|
4030
|
-
const
|
|
4031
|
-
|
|
4031
|
+
const n = De.now(), r = ({ timestamp: s }) => {
|
|
4032
|
+
const i = s - n;
|
|
4033
|
+
i >= t && (Be(r), e(i - t));
|
|
4032
4034
|
};
|
|
4033
4035
|
return J.read(r, !0), () => Be(r);
|
|
4034
4036
|
}
|
|
4035
|
-
const Qo = ["TopLeft", "TopRight", "BottomLeft", "BottomRight"], yf = Qo.length,
|
|
4036
|
-
function vf(e, t, n, r,
|
|
4037
|
-
|
|
4037
|
+
const Qo = ["TopLeft", "TopRight", "BottomLeft", "BottomRight"], yf = Qo.length, Xs = (e) => typeof e == "string" ? parseFloat(e) : e, Zs = (e) => typeof e == "number" || L.test(e);
|
|
4038
|
+
function vf(e, t, n, r, s, i) {
|
|
4039
|
+
s ? (e.opacity = ee(
|
|
4038
4040
|
0,
|
|
4039
4041
|
n.opacity !== void 0 ? n.opacity : 1,
|
|
4040
4042
|
xf(r)
|
|
4041
|
-
), e.opacityExit = ee(t.opacity !== void 0 ? t.opacity : 1, 0, bf(r))) :
|
|
4043
|
+
), e.opacityExit = ee(t.opacity !== void 0 ? t.opacity : 1, 0, bf(r))) : i && (e.opacity = ee(t.opacity !== void 0 ? t.opacity : 1, n.opacity !== void 0 ? n.opacity : 1, r));
|
|
4042
4044
|
for (let o = 0; o < yf; o++) {
|
|
4043
4045
|
const l = `border${Qo[o]}Radius`;
|
|
4044
|
-
let a =
|
|
4046
|
+
let a = Js(t, l), u = Js(n, l);
|
|
4045
4047
|
if (a === void 0 && u === void 0)
|
|
4046
4048
|
continue;
|
|
4047
|
-
a || (a = 0), u || (u = 0), a === 0 || u === 0 ||
|
|
4049
|
+
a || (a = 0), u || (u = 0), a === 0 || u === 0 || Zs(a) === Zs(u) ? (e[l] = Math.max(ee(Xs(a), Xs(u), r), 0), (Ve.test(u) || Ve.test(a)) && (e[l] += "%")) : e[l] = u;
|
|
4048
4050
|
}
|
|
4049
4051
|
(t.rotate || n.rotate) && (e.rotate = ee(t.rotate || 0, n.rotate || 0, r));
|
|
4050
4052
|
}
|
|
4051
|
-
function
|
|
4053
|
+
function Js(e, t) {
|
|
4052
4054
|
return e[t] !== void 0 ? e[t] : e.borderRadius;
|
|
4053
4055
|
}
|
|
4054
4056
|
const xf = /* @__PURE__ */ ea(0, 0.5, vo), bf = /* @__PURE__ */ ea(0.5, 0.95, we);
|
|
4055
4057
|
function ea(e, t, n) {
|
|
4056
4058
|
return (r) => r < e ? 0 : r > t ? 1 : n(ot(e, t, r));
|
|
4057
4059
|
}
|
|
4058
|
-
function
|
|
4060
|
+
function Qs(e, t) {
|
|
4059
4061
|
e.min = t.min, e.max = t.max;
|
|
4060
4062
|
}
|
|
4061
|
-
function
|
|
4062
|
-
|
|
4063
|
+
function Re(e, t) {
|
|
4064
|
+
Qs(e.x, t.x), Qs(e.y, t.y);
|
|
4063
4065
|
}
|
|
4064
|
-
function
|
|
4066
|
+
function ei(e, t) {
|
|
4065
4067
|
e.translate = t.translate, e.scale = t.scale, e.originPoint = t.originPoint, e.origin = t.origin;
|
|
4066
4068
|
}
|
|
4067
|
-
function
|
|
4068
|
-
return e -= t, e = Jt(e, 1 / n, r),
|
|
4069
|
+
function ti(e, t, n, r, s) {
|
|
4070
|
+
return e -= t, e = Jt(e, 1 / n, r), s !== void 0 && (e = Jt(e, 1 / s, r)), e;
|
|
4069
4071
|
}
|
|
4070
|
-
function Tf(e, t = 0, n = 1, r = 0.5,
|
|
4072
|
+
function Tf(e, t = 0, n = 1, r = 0.5, s, i = e, o = e) {
|
|
4071
4073
|
if (Ve.test(t) && (t = parseFloat(t), t = ee(o.min, o.max, t / 100) - o.min), typeof t != "number")
|
|
4072
4074
|
return;
|
|
4073
|
-
let l = ee(
|
|
4074
|
-
e ===
|
|
4075
|
+
let l = ee(i.min, i.max, r);
|
|
4076
|
+
e === i && (l -= t), e.min = ti(e.min, t, n, l, s), e.max = ti(e.max, t, n, l, s);
|
|
4075
4077
|
}
|
|
4076
|
-
function
|
|
4077
|
-
Tf(e, t[n], t[r], t[
|
|
4078
|
+
function ni(e, t, [n, r, s], i, o) {
|
|
4079
|
+
Tf(e, t[n], t[r], t[s], t.scale, i, o);
|
|
4078
4080
|
}
|
|
4079
4081
|
const wf = ["x", "scaleX", "originX"], Pf = ["y", "scaleY", "originY"];
|
|
4080
|
-
function
|
|
4081
|
-
|
|
4082
|
+
function ri(e, t, n, r) {
|
|
4083
|
+
ni(e.x, t, wf, n ? n.x : void 0, r ? r.x : void 0), ni(e.y, t, Pf, n ? n.y : void 0, r ? r.y : void 0);
|
|
4082
4084
|
}
|
|
4083
|
-
function
|
|
4085
|
+
function si(e) {
|
|
4084
4086
|
return e.translate === 0 && e.scale === 1;
|
|
4085
4087
|
}
|
|
4086
4088
|
function ta(e) {
|
|
4087
|
-
return
|
|
4089
|
+
return si(e.x) && si(e.y);
|
|
4088
4090
|
}
|
|
4089
|
-
function
|
|
4091
|
+
function ii(e, t) {
|
|
4090
4092
|
return e.min === t.min && e.max === t.max;
|
|
4091
4093
|
}
|
|
4092
4094
|
function Sf(e, t) {
|
|
4093
|
-
return
|
|
4095
|
+
return ii(e.x, t.x) && ii(e.y, t.y);
|
|
4094
4096
|
}
|
|
4095
|
-
function
|
|
4097
|
+
function oi(e, t) {
|
|
4096
4098
|
return Math.round(e.min) === Math.round(t.min) && Math.round(e.max) === Math.round(t.max);
|
|
4097
4099
|
}
|
|
4098
4100
|
function na(e, t) {
|
|
4099
|
-
return
|
|
4101
|
+
return oi(e.x, t.x) && oi(e.y, t.y);
|
|
4100
4102
|
}
|
|
4101
|
-
function
|
|
4103
|
+
function ai(e) {
|
|
4102
4104
|
return be(e.x) / be(e.y);
|
|
4103
4105
|
}
|
|
4104
|
-
function
|
|
4106
|
+
function li(e, t) {
|
|
4105
4107
|
return e.translate === t.translate && e.scale === t.scale && e.originPoint === t.originPoint;
|
|
4106
4108
|
}
|
|
4107
4109
|
class Cf {
|
|
@@ -4118,14 +4120,14 @@ class Cf {
|
|
|
4118
4120
|
}
|
|
4119
4121
|
}
|
|
4120
4122
|
relegate(t) {
|
|
4121
|
-
const n = this.members.findIndex((
|
|
4123
|
+
const n = this.members.findIndex((s) => t === s);
|
|
4122
4124
|
if (n === 0)
|
|
4123
4125
|
return !1;
|
|
4124
4126
|
let r;
|
|
4125
|
-
for (let
|
|
4126
|
-
const
|
|
4127
|
-
if (
|
|
4128
|
-
r =
|
|
4127
|
+
for (let s = n; s >= 0; s--) {
|
|
4128
|
+
const i = this.members[s];
|
|
4129
|
+
if (i.isPresent !== !1) {
|
|
4130
|
+
r = i;
|
|
4129
4131
|
break;
|
|
4130
4132
|
}
|
|
4131
4133
|
}
|
|
@@ -4135,8 +4137,8 @@ class Cf {
|
|
|
4135
4137
|
const r = this.lead;
|
|
4136
4138
|
if (t !== r && (this.prevLead = r, this.lead = t, t.show(), r)) {
|
|
4137
4139
|
r.instance && r.scheduleRender(), t.scheduleRender(), t.resumeFrom = r, n && (t.resumeFrom.preserveOpacity = !0), r.snapshot && (t.snapshot = r.snapshot, t.snapshot.latestValues = r.animationValues || r.latestValues), t.root && t.root.isUpdating && (t.isLayoutDirty = !0);
|
|
4138
|
-
const { crossfade:
|
|
4139
|
-
|
|
4140
|
+
const { crossfade: s } = t.options;
|
|
4141
|
+
s === !1 && r.hide();
|
|
4140
4142
|
}
|
|
4141
4143
|
}
|
|
4142
4144
|
exitAnimationComplete() {
|
|
@@ -4156,8 +4158,8 @@ class Cf {
|
|
|
4156
4158
|
}
|
|
4157
4159
|
function Ef(e, t, n) {
|
|
4158
4160
|
let r = "";
|
|
4159
|
-
const
|
|
4160
|
-
if ((
|
|
4161
|
+
const s = e.x.translate / t.x, i = e.y.translate / t.y, o = (n == null ? void 0 : n.z) || 0;
|
|
4162
|
+
if ((s || i || o) && (r = `translate3d(${s}px, ${i}px, ${o}px) `), (t.x !== 1 || t.y !== 1) && (r += `scale(${1 / t.x}, ${1 / t.y}) `), n) {
|
|
4161
4163
|
const { transformPerspective: u, rotate: c, rotateX: f, rotateY: h, skewX: g, skewY: x } = n;
|
|
4162
4164
|
u && (r = `perspective(${u}px) ${r}`), c && (r += `rotate(${c}deg) `), f && (r += `rotateX(${f}deg) `), h && (r += `rotateY(${h}deg) `), g && (r += `skewX(${g}deg) `), x && (r += `skewY(${x}deg) `);
|
|
4163
4165
|
}
|
|
@@ -4168,11 +4170,11 @@ const Ke = {
|
|
|
4168
4170
|
nodes: 0,
|
|
4169
4171
|
calculatedTargetDeltas: 0,
|
|
4170
4172
|
calculatedProjections: 0
|
|
4171
|
-
}, wn = ["", "X", "Y", "Z"], Rf = { visibility: "hidden" },
|
|
4173
|
+
}, wn = ["", "X", "Y", "Z"], Rf = { visibility: "hidden" }, ci = 1e3;
|
|
4172
4174
|
let Af = 0;
|
|
4173
4175
|
function Pn(e, t, n, r) {
|
|
4174
|
-
const { latestValues:
|
|
4175
|
-
|
|
4176
|
+
const { latestValues: s } = t;
|
|
4177
|
+
s[e] && (n[e] = s[e], t.setStaticValue(e, 0), r && (r[e] = 0));
|
|
4176
4178
|
}
|
|
4177
4179
|
function ra(e) {
|
|
4178
4180
|
if (e.hasCheckedOptimisedAppear = !0, e.root === e)
|
|
@@ -4182,13 +4184,13 @@ function ra(e) {
|
|
|
4182
4184
|
return;
|
|
4183
4185
|
const n = uo(t);
|
|
4184
4186
|
if (window.MotionHasOptimisedAnimation(n, "transform")) {
|
|
4185
|
-
const { layout:
|
|
4186
|
-
window.MotionCancelOptimisedAnimation(n, "transform", J, !(
|
|
4187
|
+
const { layout: s, layoutId: i } = e.options;
|
|
4188
|
+
window.MotionCancelOptimisedAnimation(n, "transform", J, !(s || i));
|
|
4187
4189
|
}
|
|
4188
4190
|
const { parent: r } = e;
|
|
4189
4191
|
r && !r.hasCheckedOptimisedAppear && ra(r);
|
|
4190
4192
|
}
|
|
4191
|
-
function
|
|
4193
|
+
function sa({ attachResizeListener: e, defaultParent: t, measureScroll: n, checkIsScrollRoot: r, resetTransform: s }) {
|
|
4192
4194
|
return class {
|
|
4193
4195
|
constructor(o = {}, l = t == null ? void 0 : t()) {
|
|
4194
4196
|
this.id = Af++, this.animationId = 0, this.children = /* @__PURE__ */ new Set(), this.options = {}, this.isTreeAnimating = !1, this.isAnimationBlocked = !1, this.isLayoutDirty = !1, this.isProjectionDirty = !1, this.isSharedProjectionDirty = !1, this.isTransformDirty = !1, this.updateManuallyBlocked = !1, this.updateBlockedByResize = !1, this.isUpdating = !1, this.isSVG = !1, this.needsReset = !1, this.shouldResetTransform = !1, this.hasCheckedOptimisedAppear = !1, this.treeScale = { x: 1, y: 1 }, this.eventHandlers = /* @__PURE__ */ new Map(), this.hasTreeAnimated = !1, this.updateScheduled = !1, this.scheduleUpdate = () => this.update(), this.projectionUpdateScheduled = !1, this.checkUpdateFailed = () => {
|
|
@@ -4219,7 +4221,7 @@ function ia({ attachResizeListener: e, defaultParent: t, measureScroll: n, check
|
|
|
4219
4221
|
let f;
|
|
4220
4222
|
const h = () => this.root.updateBlockedByResize = !1;
|
|
4221
4223
|
e(o, () => {
|
|
4222
|
-
this.root.updateBlockedByResize = !0, f && f(), f = gf(h, 250), Kt.hasAnimatedSinceResize && (Kt.hasAnimatedSinceResize = !1, this.nodes.forEach(
|
|
4224
|
+
this.root.updateBlockedByResize = !0, f && f(), f = gf(h, 250), Kt.hasAnimatedSinceResize && (Kt.hasAnimatedSinceResize = !1, this.nodes.forEach(fi));
|
|
4223
4225
|
});
|
|
4224
4226
|
}
|
|
4225
4227
|
a && this.root.registerSharedNode(a, this), this.options.animate !== !1 && c && (a || u) && this.addEventListener("didUpdate", ({ delta: f, hasLayoutChanged: h, hasRelativeLayoutChanged: g, layout: x }) => {
|
|
@@ -4237,7 +4239,7 @@ function ia({ attachResizeListener: e, defaultParent: t, measureScroll: n, check
|
|
|
4237
4239
|
};
|
|
4238
4240
|
(c.shouldReduceMotion || this.options.layoutRoot) && (V.delay = 0, V.type = !1), this.startAnimation(V);
|
|
4239
4241
|
} else
|
|
4240
|
-
h ||
|
|
4242
|
+
h || fi(this), this.isLead() && this.options.onExitComplete && this.options.onExitComplete();
|
|
4241
4243
|
this.targetLayout = x;
|
|
4242
4244
|
});
|
|
4243
4245
|
}
|
|
@@ -4285,7 +4287,7 @@ function ia({ attachResizeListener: e, defaultParent: t, measureScroll: n, check
|
|
|
4285
4287
|
}
|
|
4286
4288
|
update() {
|
|
4287
4289
|
if (this.updateScheduled = !1, this.isUpdateBlocked()) {
|
|
4288
|
-
this.unblockUpdate(), this.clearAllSnapshots(), this.nodes.forEach(
|
|
4290
|
+
this.unblockUpdate(), this.clearAllSnapshots(), this.nodes.forEach(ui);
|
|
4289
4291
|
return;
|
|
4290
4292
|
}
|
|
4291
4293
|
this.isUpdating || this.nodes.forEach(Lf), this.isUpdating = !1, this.nodes.forEach(kf), this.nodes.forEach(jf), this.nodes.forEach(Mf), this.clearAllSnapshots();
|
|
@@ -4316,7 +4318,7 @@ function ia({ attachResizeListener: e, defaultParent: t, measureScroll: n, check
|
|
|
4316
4318
|
for (let a = 0; a < this.path.length; a++)
|
|
4317
4319
|
this.path[a].updateScroll();
|
|
4318
4320
|
const o = this.layout;
|
|
4319
|
-
this.layout = this.measure(!1), this.layoutCorrected =
|
|
4321
|
+
this.layout = this.measure(!1), this.layoutCorrected = se(), this.isLayoutDirty = !1, this.projectionDelta = void 0, this.notifyListeners("measure", this.layout.layoutBox);
|
|
4320
4322
|
const { visualElement: l } = this.options;
|
|
4321
4323
|
l && l.notify("LayoutMeasure", this.layout.layoutBox, o ? o.layoutBox : void 0);
|
|
4322
4324
|
}
|
|
@@ -4334,10 +4336,10 @@ function ia({ attachResizeListener: e, defaultParent: t, measureScroll: n, check
|
|
|
4334
4336
|
}
|
|
4335
4337
|
}
|
|
4336
4338
|
resetTransform() {
|
|
4337
|
-
if (!
|
|
4339
|
+
if (!s)
|
|
4338
4340
|
return;
|
|
4339
4341
|
const o = this.isLayoutDirty || this.shouldResetTransform || this.options.alwaysMeasureLayout, l = this.projectionDelta && !ta(this.projectionDelta), a = this.getTransformTemplate(), u = a ? a(this.latestValues, "") : void 0, c = u !== this.prevTransformTemplateValue;
|
|
4340
|
-
o && (l || Ye(this.latestValues) || c) && (
|
|
4342
|
+
o && (l || Ye(this.latestValues) || c) && (s(this.instance, u), this.shouldResetTransform = !1, this.scheduleRender());
|
|
4341
4343
|
}
|
|
4342
4344
|
measure(o = !0) {
|
|
4343
4345
|
const l = this.measurePageBox();
|
|
@@ -4354,49 +4356,49 @@ function ia({ attachResizeListener: e, defaultParent: t, measureScroll: n, check
|
|
|
4354
4356
|
var o;
|
|
4355
4357
|
const { visualElement: l } = this.options;
|
|
4356
4358
|
if (!l)
|
|
4357
|
-
return
|
|
4359
|
+
return se();
|
|
4358
4360
|
const a = l.measureViewportBox();
|
|
4359
4361
|
if (!(((o = this.scroll) === null || o === void 0 ? void 0 : o.wasRoot) || this.path.some(zf))) {
|
|
4360
4362
|
const { scroll: c } = this.root;
|
|
4361
|
-
c && (
|
|
4363
|
+
c && (st(a.x, c.offset.x), st(a.y, c.offset.y));
|
|
4362
4364
|
}
|
|
4363
4365
|
return a;
|
|
4364
4366
|
}
|
|
4365
4367
|
removeElementScroll(o) {
|
|
4366
4368
|
var l;
|
|
4367
|
-
const a =
|
|
4368
|
-
if (
|
|
4369
|
+
const a = se();
|
|
4370
|
+
if (Re(a, o), !((l = this.scroll) === null || l === void 0) && l.wasRoot)
|
|
4369
4371
|
return a;
|
|
4370
4372
|
for (let u = 0; u < this.path.length; u++) {
|
|
4371
4373
|
const c = this.path[u], { scroll: f, options: h } = c;
|
|
4372
|
-
c !== this.root && f && h.layoutScroll && (f.wasRoot &&
|
|
4374
|
+
c !== this.root && f && h.layoutScroll && (f.wasRoot && Re(a, o), st(a.x, f.offset.x), st(a.y, f.offset.y));
|
|
4373
4375
|
}
|
|
4374
4376
|
return a;
|
|
4375
4377
|
}
|
|
4376
4378
|
applyTransform(o, l = !1) {
|
|
4377
|
-
const a =
|
|
4378
|
-
|
|
4379
|
+
const a = se();
|
|
4380
|
+
Re(a, o);
|
|
4379
4381
|
for (let u = 0; u < this.path.length; u++) {
|
|
4380
4382
|
const c = this.path[u];
|
|
4381
|
-
!l && c.options.layoutScroll && c.scroll && c !== c.root &&
|
|
4383
|
+
!l && c.options.layoutScroll && c.scroll && c !== c.root && it(a, {
|
|
4382
4384
|
x: -c.scroll.offset.x,
|
|
4383
4385
|
y: -c.scroll.offset.y
|
|
4384
|
-
}), Ye(c.latestValues) &&
|
|
4386
|
+
}), Ye(c.latestValues) && it(a, c.latestValues);
|
|
4385
4387
|
}
|
|
4386
|
-
return Ye(this.latestValues) &&
|
|
4388
|
+
return Ye(this.latestValues) && it(a, this.latestValues), a;
|
|
4387
4389
|
}
|
|
4388
4390
|
removeTransform(o) {
|
|
4389
|
-
const l =
|
|
4390
|
-
|
|
4391
|
+
const l = se();
|
|
4392
|
+
Re(l, o);
|
|
4391
4393
|
for (let a = 0; a < this.path.length; a++) {
|
|
4392
4394
|
const u = this.path[a];
|
|
4393
4395
|
if (!u.instance || !Ye(u.latestValues))
|
|
4394
4396
|
continue;
|
|
4395
4397
|
zn(u.latestValues) && u.updateSnapshot();
|
|
4396
|
-
const c =
|
|
4397
|
-
|
|
4398
|
+
const c = se(), f = u.measurePageBox();
|
|
4399
|
+
Re(c, f), ri(l, u.latestValues, u.snapshot ? u.snapshot.layoutBox : void 0, c);
|
|
4398
4400
|
}
|
|
4399
|
-
return Ye(this.latestValues) &&
|
|
4401
|
+
return Ye(this.latestValues) && ri(l, this.latestValues), l;
|
|
4400
4402
|
}
|
|
4401
4403
|
setTargetDelta(o) {
|
|
4402
4404
|
this.targetDelta = o, this.root.scheduleUpdateProjection(), this.isProjectionDirty = !0;
|
|
@@ -4425,13 +4427,13 @@ function ia({ attachResizeListener: e, defaultParent: t, measureScroll: n, check
|
|
|
4425
4427
|
if (!(!this.layout || !(f || h))) {
|
|
4426
4428
|
if (this.resolvedRelativeTargetAt = ue.timestamp, !this.targetDelta && !this.relativeTarget) {
|
|
4427
4429
|
const g = this.getClosestProjectingParent();
|
|
4428
|
-
g && g.layout && this.animationProgress !== 1 ? (this.relativeParent = g, this.forceRelativeParentToResolveTarget(), this.relativeTarget =
|
|
4430
|
+
g && g.layout && this.animationProgress !== 1 ? (this.relativeParent = g, this.forceRelativeParentToResolveTarget(), this.relativeTarget = se(), this.relativeTargetOrigin = se(), Ct(this.relativeTargetOrigin, this.layout.layoutBox, g.layout.layoutBox), Re(this.relativeTarget, this.relativeTargetOrigin)) : this.relativeParent = this.relativeTarget = void 0;
|
|
4429
4431
|
}
|
|
4430
4432
|
if (!(!this.relativeTarget && !this.targetDelta)) {
|
|
4431
|
-
if (this.target || (this.target =
|
|
4433
|
+
if (this.target || (this.target = se(), this.targetWithTransforms = se()), this.relativeTarget && this.relativeTargetOrigin && this.relativeParent && this.relativeParent.target ? (this.forceRelativeParentToResolveTarget(), Yu(this.target, this.relativeTarget, this.relativeParent.target)) : this.targetDelta ? (Boolean(this.resumingFrom) ? this.target = this.applyTransform(this.layout.layoutBox) : Re(this.target, this.layout.layoutBox), qo(this.target, this.targetDelta)) : Re(this.target, this.layout.layoutBox), this.attemptToResolveRelativeTarget) {
|
|
4432
4434
|
this.attemptToResolveRelativeTarget = !1;
|
|
4433
4435
|
const g = this.getClosestProjectingParent();
|
|
4434
|
-
g && Boolean(g.resumingFrom) === Boolean(this.resumingFrom) && !g.options.layoutScroll && g.target && this.animationProgress !== 1 ? (this.relativeParent = g, this.forceRelativeParentToResolveTarget(), this.relativeTarget =
|
|
4436
|
+
g && Boolean(g.resumingFrom) === Boolean(this.resumingFrom) && !g.options.layoutScroll && g.target && this.animationProgress !== 1 ? (this.relativeParent = g, this.forceRelativeParentToResolveTarget(), this.relativeTarget = se(), this.relativeTargetOrigin = se(), Ct(this.relativeTargetOrigin, this.target, g.target), Re(this.relativeTarget, this.relativeTargetOrigin)) : this.relativeParent = this.relativeTarget = void 0;
|
|
4435
4437
|
}
|
|
4436
4438
|
Fe.value && Ke.calculatedTargetDeltas++;
|
|
4437
4439
|
}
|
|
@@ -4453,15 +4455,15 @@ function ia({ attachResizeListener: e, defaultParent: t, measureScroll: n, check
|
|
|
4453
4455
|
const { layout: c, layoutId: f } = this.options;
|
|
4454
4456
|
if (this.isTreeAnimating = Boolean(this.parent && this.parent.isTreeAnimating || this.currentAnimation || this.pendingAnimation), this.isTreeAnimating || (this.targetDelta = this.relativeTarget = void 0), !this.layout || !(c || f))
|
|
4455
4457
|
return;
|
|
4456
|
-
|
|
4458
|
+
Re(this.layoutCorrected, this.layout.layoutBox);
|
|
4457
4459
|
const h = this.treeScale.x, g = this.treeScale.y;
|
|
4458
|
-
Ku(this.layoutCorrected, this.treeScale, this.path, a), l.layout && !l.target && (this.treeScale.x !== 1 || this.treeScale.y !== 1) && (l.target = l.layout.layoutBox, l.targetWithTransforms =
|
|
4460
|
+
Ku(this.layoutCorrected, this.treeScale, this.path, a), l.layout && !l.target && (this.treeScale.x !== 1 || this.treeScale.y !== 1) && (l.target = l.layout.layoutBox, l.targetWithTransforms = se());
|
|
4459
4461
|
const { target: x } = l;
|
|
4460
4462
|
if (!x) {
|
|
4461
4463
|
this.prevProjectionDelta && (this.createProjectionDeltas(), this.scheduleRender());
|
|
4462
4464
|
return;
|
|
4463
4465
|
}
|
|
4464
|
-
!this.projectionDelta || !this.prevProjectionDelta ? this.createProjectionDeltas() : (
|
|
4466
|
+
!this.projectionDelta || !this.prevProjectionDelta ? this.createProjectionDeltas() : (ei(this.prevProjectionDelta.x, this.projectionDelta.x), ei(this.prevProjectionDelta.y, this.projectionDelta.y)), St(this.projectionDelta, this.layoutCorrected, x, this.latestValues), (this.treeScale.x !== h || this.treeScale.y !== g || !li(this.projectionDelta.x, this.prevProjectionDelta.x) || !li(this.projectionDelta.y, this.prevProjectionDelta.y)) && (this.hasProjected = !0, this.scheduleRender(), this.notifyListeners("projectionUpdate", x)), Fe.value && Ke.calculatedProjections++;
|
|
4465
4467
|
}
|
|
4466
4468
|
hide() {
|
|
4467
4469
|
this.isVisible = !1;
|
|
@@ -4483,17 +4485,17 @@ function ia({ attachResizeListener: e, defaultParent: t, measureScroll: n, check
|
|
|
4483
4485
|
setAnimationOrigin(o, l = !1) {
|
|
4484
4486
|
const a = this.snapshot, u = a ? a.latestValues : {}, c = { ...this.latestValues }, f = rt();
|
|
4485
4487
|
(!this.relativeParent || !this.relativeParent.options.layoutRoot) && (this.relativeTarget = this.relativeTargetOrigin = void 0), this.attemptToResolveRelativeTarget = !l;
|
|
4486
|
-
const h =
|
|
4488
|
+
const h = se(), g = a ? a.source : void 0, x = this.layout ? this.layout.source : void 0, y = g !== x, P = this.getStack(), b = !P || P.members.length <= 1, S = Boolean(y && !b && this.options.crossfade === !0 && !this.path.some($f));
|
|
4487
4489
|
this.animationProgress = 0;
|
|
4488
4490
|
let C;
|
|
4489
4491
|
this.mixTargetDelta = (V) => {
|
|
4490
4492
|
const p = V / 1e3;
|
|
4491
|
-
|
|
4493
|
+
di(f.x, o.x, p), di(f.y, o.y, p), this.setTargetDelta(f), this.relativeTarget && this.relativeTargetOrigin && this.layout && this.relativeParent && this.relativeParent.layout && (Ct(h, this.layout.layoutBox, this.relativeParent.layout.layoutBox), Bf(this.relativeTarget, this.relativeTargetOrigin, h, p), C && Sf(this.relativeTarget, C) && (this.isProjectionDirty = !1), C || (C = se()), Re(C, this.relativeTarget)), y && (this.animationValues = c, vf(c, u, this.latestValues, p, S, b)), this.root.scheduleUpdateProjection(), this.scheduleRender(), this.animationProgress = p;
|
|
4492
4494
|
}, this.mixTargetDelta(this.options.layoutRoot ? 1e3 : 0);
|
|
4493
4495
|
}
|
|
4494
4496
|
startAnimation(o) {
|
|
4495
4497
|
this.notifyListeners("animationStart"), this.currentAnimation && this.currentAnimation.stop(), this.resumingFrom && this.resumingFrom.currentAnimation && this.resumingFrom.currentAnimation.stop(), this.pendingAnimation && (Be(this.pendingAnimation), this.pendingAnimation = void 0), this.pendingAnimation = J.update(() => {
|
|
4496
|
-
Kt.hasAnimatedSinceResize = !0, wt.layout++, this.currentAnimation = df(0,
|
|
4498
|
+
Kt.hasAnimatedSinceResize = !0, wt.layout++, this.currentAnimation = df(0, ci, {
|
|
4497
4499
|
...o,
|
|
4498
4500
|
onUpdate: (l) => {
|
|
4499
4501
|
this.mixTargetDelta(l), o.onUpdate && o.onUpdate(l);
|
|
@@ -4513,20 +4515,20 @@ function ia({ attachResizeListener: e, defaultParent: t, measureScroll: n, check
|
|
|
4513
4515
|
o && o.exitAnimationComplete(), this.resumingFrom = this.currentAnimation = this.animationValues = void 0, this.notifyListeners("animationComplete");
|
|
4514
4516
|
}
|
|
4515
4517
|
finishAnimation() {
|
|
4516
|
-
this.currentAnimation && (this.mixTargetDelta && this.mixTargetDelta(
|
|
4518
|
+
this.currentAnimation && (this.mixTargetDelta && this.mixTargetDelta(ci), this.currentAnimation.stop()), this.completeAnimation();
|
|
4517
4519
|
}
|
|
4518
4520
|
applyTransformsToTarget() {
|
|
4519
4521
|
const o = this.getLead();
|
|
4520
4522
|
let { targetWithTransforms: l, target: a, layout: u, latestValues: c } = o;
|
|
4521
4523
|
if (!(!l || !a || !u)) {
|
|
4522
|
-
if (this !== o && this.layout && u &&
|
|
4523
|
-
a = this.target ||
|
|
4524
|
+
if (this !== o && this.layout && u && ia(this.options.animationType, this.layout.layoutBox, u.layoutBox)) {
|
|
4525
|
+
a = this.target || se();
|
|
4524
4526
|
const f = be(this.layout.layoutBox.x);
|
|
4525
4527
|
a.x.min = o.target.x.min, a.x.max = a.x.min + f;
|
|
4526
4528
|
const h = be(this.layout.layoutBox.y);
|
|
4527
4529
|
a.y.min = o.target.y.min, a.y.max = a.y.min + h;
|
|
4528
4530
|
}
|
|
4529
|
-
|
|
4531
|
+
Re(l, a), it(l, c), St(this.projectionDeltaWithTransform, this.layoutCorrected, l, c);
|
|
4530
4532
|
}
|
|
4531
4533
|
}
|
|
4532
4534
|
registerSharedNode(o, l) {
|
|
@@ -4621,7 +4623,7 @@ function ia({ attachResizeListener: e, defaultParent: t, measureScroll: n, check
|
|
|
4621
4623
|
this.root.nodes.forEach((o) => {
|
|
4622
4624
|
var l;
|
|
4623
4625
|
return (l = o.currentAnimation) === null || l === void 0 ? void 0 : l.stop();
|
|
4624
|
-
}), this.root.nodes.forEach(
|
|
4626
|
+
}), this.root.nodes.forEach(ui), this.root.sharedNodes.clear();
|
|
4625
4627
|
}
|
|
4626
4628
|
};
|
|
4627
4629
|
}
|
|
@@ -4632,18 +4634,18 @@ function Mf(e) {
|
|
|
4632
4634
|
var t;
|
|
4633
4635
|
const n = ((t = e.resumeFrom) === null || t === void 0 ? void 0 : t.snapshot) || e.snapshot;
|
|
4634
4636
|
if (e.isLead() && e.layout && n && e.hasListeners("didUpdate")) {
|
|
4635
|
-
const { layoutBox: r, measuredBox:
|
|
4636
|
-
|
|
4637
|
+
const { layoutBox: r, measuredBox: s } = e.layout, { animationType: i } = e.options, o = n.source !== e.layout.source;
|
|
4638
|
+
i === "size" ? Ae((f) => {
|
|
4637
4639
|
const h = o ? n.measuredBox[f] : n.layoutBox[f], g = be(h);
|
|
4638
4640
|
h.min = r[f].min, h.max = h.min + g;
|
|
4639
|
-
}) :
|
|
4641
|
+
}) : ia(i, n.layoutBox, r) && Ae((f) => {
|
|
4640
4642
|
const h = o ? n.measuredBox[f] : n.layoutBox[f], g = be(r[f]);
|
|
4641
4643
|
h.max = h.min + g, e.relativeTarget && !e.currentAnimation && (e.isProjectionDirty = !0, e.relativeTarget[f].max = e.relativeTarget[f].min + g);
|
|
4642
4644
|
});
|
|
4643
4645
|
const l = rt();
|
|
4644
4646
|
St(l, r, n.layoutBox);
|
|
4645
4647
|
const a = rt();
|
|
4646
|
-
o ? St(a, e.applyTransform(
|
|
4648
|
+
o ? St(a, e.applyTransform(s, !0), n.measuredBox) : St(a, r, n.layoutBox);
|
|
4647
4649
|
const u = !ta(l);
|
|
4648
4650
|
let c = !1;
|
|
4649
4651
|
if (!e.resumeFrom) {
|
|
@@ -4651,9 +4653,9 @@ function Mf(e) {
|
|
|
4651
4653
|
if (f && !f.resumeFrom) {
|
|
4652
4654
|
const { snapshot: h, layout: g } = f;
|
|
4653
4655
|
if (h && g) {
|
|
4654
|
-
const x =
|
|
4656
|
+
const x = se();
|
|
4655
4657
|
Ct(x, n.layoutBox, h.layoutBox);
|
|
4656
|
-
const y =
|
|
4658
|
+
const y = se();
|
|
4657
4659
|
Ct(y, r, g.layoutBox), na(x, y) || (c = !0), f.options.layoutRoot && (e.relativeTarget = y, e.relativeTargetOrigin = x, e.relativeParent = f);
|
|
4658
4660
|
}
|
|
4659
4661
|
}
|
|
@@ -4681,7 +4683,7 @@ function Df(e) {
|
|
|
4681
4683
|
function Of(e) {
|
|
4682
4684
|
e.clearSnapshot();
|
|
4683
4685
|
}
|
|
4684
|
-
function
|
|
4686
|
+
function ui(e) {
|
|
4685
4687
|
e.clearMeasurements();
|
|
4686
4688
|
}
|
|
4687
4689
|
function Lf(e) {
|
|
@@ -4691,7 +4693,7 @@ function kf(e) {
|
|
|
4691
4693
|
const { visualElement: t } = e.options;
|
|
4692
4694
|
t && t.getProps().onBeforeLayoutMeasure && t.notify("BeforeLayoutMeasure"), e.resetTransform();
|
|
4693
4695
|
}
|
|
4694
|
-
function
|
|
4696
|
+
function fi(e) {
|
|
4695
4697
|
e.finishAnimation(), e.targetDelta = e.relativeTarget = e.target = void 0, e.isProjectionDirty = !0;
|
|
4696
4698
|
}
|
|
4697
4699
|
function _f(e) {
|
|
@@ -4706,14 +4708,14 @@ function Ff(e) {
|
|
|
4706
4708
|
function Nf(e) {
|
|
4707
4709
|
e.removeLeadSnapshot();
|
|
4708
4710
|
}
|
|
4709
|
-
function
|
|
4711
|
+
function di(e, t, n) {
|
|
4710
4712
|
e.translate = ee(t.translate, 0, n), e.scale = ee(t.scale, 1, n), e.origin = t.origin, e.originPoint = t.originPoint;
|
|
4711
4713
|
}
|
|
4712
|
-
function
|
|
4714
|
+
function hi(e, t, n, r) {
|
|
4713
4715
|
e.min = ee(t.min, n.min, r), e.max = ee(t.max, n.max, r);
|
|
4714
4716
|
}
|
|
4715
4717
|
function Bf(e, t, n, r) {
|
|
4716
|
-
|
|
4718
|
+
hi(e.x, t.x, n.x, r), hi(e.y, t.y, n.y, r);
|
|
4717
4719
|
}
|
|
4718
4720
|
function $f(e) {
|
|
4719
4721
|
return e.animationValues && e.animationValues.opacityExit !== void 0;
|
|
@@ -4721,21 +4723,21 @@ function $f(e) {
|
|
|
4721
4723
|
const Uf = {
|
|
4722
4724
|
duration: 0.45,
|
|
4723
4725
|
ease: [0.4, 0, 0.1, 1]
|
|
4724
|
-
},
|
|
4725
|
-
function
|
|
4726
|
-
e.min =
|
|
4726
|
+
}, pi = (e) => typeof navigator < "u" && navigator.userAgent && navigator.userAgent.toLowerCase().includes(e), mi = pi("applewebkit/") && !pi("chrome/") ? Math.round : we;
|
|
4727
|
+
function gi(e) {
|
|
4728
|
+
e.min = mi(e.min), e.max = mi(e.max);
|
|
4727
4729
|
}
|
|
4728
4730
|
function Wf(e) {
|
|
4729
|
-
|
|
4731
|
+
gi(e.x), gi(e.y);
|
|
4730
4732
|
}
|
|
4731
|
-
function
|
|
4732
|
-
return e === "position" || e === "preserve-aspect" && !zu(
|
|
4733
|
+
function ia(e, t, n) {
|
|
4734
|
+
return e === "position" || e === "preserve-aspect" && !zu(ai(t), ai(n), 0.2);
|
|
4733
4735
|
}
|
|
4734
4736
|
function zf(e) {
|
|
4735
4737
|
var t;
|
|
4736
4738
|
return e !== e.root && ((t = e.scroll) === null || t === void 0 ? void 0 : t.wasRoot);
|
|
4737
4739
|
}
|
|
4738
|
-
const Yf =
|
|
4740
|
+
const Yf = sa({
|
|
4739
4741
|
attachResizeListener: (e, t) => Dt(e, "resize", t),
|
|
4740
4742
|
measureScroll: () => ({
|
|
4741
4743
|
x: document.documentElement.scrollLeft || document.body.scrollLeft,
|
|
@@ -4744,7 +4746,7 @@ const Yf = ia({
|
|
|
4744
4746
|
checkIsScrollRoot: () => !0
|
|
4745
4747
|
}), Sn = {
|
|
4746
4748
|
current: void 0
|
|
4747
|
-
}, oa =
|
|
4749
|
+
}, oa = sa({
|
|
4748
4750
|
measureScroll: (e) => ({
|
|
4749
4751
|
x: e.scrollLeft,
|
|
4750
4752
|
y: e.scrollTop
|
|
@@ -4770,16 +4772,16 @@ const Yf = ia({
|
|
|
4770
4772
|
MeasureLayout: Jo
|
|
4771
4773
|
}
|
|
4772
4774
|
};
|
|
4773
|
-
function
|
|
4775
|
+
function yi(e, t, n) {
|
|
4774
4776
|
const { props: r } = e;
|
|
4775
4777
|
e.animationState && r.whileHover && e.animationState.setActive("whileHover", n === "Start");
|
|
4776
|
-
const
|
|
4777
|
-
|
|
4778
|
+
const s = "onHover" + n, i = r[s];
|
|
4779
|
+
i && J.postRender(() => i(t, It(t)));
|
|
4778
4780
|
}
|
|
4779
4781
|
class Gf extends Ue {
|
|
4780
4782
|
mount() {
|
|
4781
4783
|
const { current: t } = this.node;
|
|
4782
|
-
t && (this.unmount = Wl(t, (n, r) => (
|
|
4784
|
+
t && (this.unmount = Wl(t, (n, r) => (yi(this.node, r, "Start"), (s) => yi(this.node, s, "End"))));
|
|
4783
4785
|
}
|
|
4784
4786
|
unmount() {
|
|
4785
4787
|
}
|
|
@@ -4806,18 +4808,18 @@ class qf extends Ue {
|
|
|
4806
4808
|
unmount() {
|
|
4807
4809
|
}
|
|
4808
4810
|
}
|
|
4809
|
-
function
|
|
4811
|
+
function vi(e, t, n) {
|
|
4810
4812
|
const { props: r } = e;
|
|
4811
4813
|
if (e.current instanceof HTMLButtonElement && e.current.disabled)
|
|
4812
4814
|
return;
|
|
4813
4815
|
e.animationState && r.whileTap && e.animationState.setActive("whileTap", n === "Start");
|
|
4814
|
-
const
|
|
4815
|
-
|
|
4816
|
+
const s = "onTap" + (n === "End" ? "" : n), i = r[s];
|
|
4817
|
+
i && J.postRender(() => i(t, It(t)));
|
|
4816
4818
|
}
|
|
4817
4819
|
class Hf extends Ue {
|
|
4818
4820
|
mount() {
|
|
4819
4821
|
const { current: t } = this.node;
|
|
4820
|
-
t && (this.unmount = Gl(t, (n, r) => (
|
|
4822
|
+
t && (this.unmount = Gl(t, (n, r) => (vi(this.node, r, "Start"), (s, { success: i }) => vi(this.node, s, i ? "End" : "Cancel")), { useGlobalTarget: this.node.props.globalTapTarget }));
|
|
4821
4823
|
}
|
|
4822
4824
|
unmount() {
|
|
4823
4825
|
}
|
|
@@ -4831,8 +4833,8 @@ const Gn = /* @__PURE__ */ new WeakMap(), Cn = /* @__PURE__ */ new WeakMap(), Xf
|
|
|
4831
4833
|
function Jf({ root: e, ...t }) {
|
|
4832
4834
|
const n = e || document;
|
|
4833
4835
|
Cn.has(n) || Cn.set(n, {});
|
|
4834
|
-
const r = Cn.get(n),
|
|
4835
|
-
return r[
|
|
4836
|
+
const r = Cn.get(n), s = JSON.stringify(t);
|
|
4837
|
+
return r[s] || (r[s] = new IntersectionObserver(Zf, { root: e, ...t })), r[s];
|
|
4836
4838
|
}
|
|
4837
4839
|
function Qf(e, t, n) {
|
|
4838
4840
|
const r = Jf(t);
|
|
@@ -4850,13 +4852,13 @@ class td extends Ue {
|
|
|
4850
4852
|
}
|
|
4851
4853
|
startObserver() {
|
|
4852
4854
|
this.unmount();
|
|
4853
|
-
const { viewport: t = {} } = this.node.getProps(), { root: n, margin: r, amount:
|
|
4855
|
+
const { viewport: t = {} } = this.node.getProps(), { root: n, margin: r, amount: s = "some", once: i } = t, o = {
|
|
4854
4856
|
root: n ? n.current : void 0,
|
|
4855
4857
|
rootMargin: r,
|
|
4856
|
-
threshold: typeof
|
|
4858
|
+
threshold: typeof s == "number" ? s : ed[s]
|
|
4857
4859
|
}, l = (a) => {
|
|
4858
4860
|
const { isIntersecting: u } = a;
|
|
4859
|
-
if (this.isInView === u || (this.isInView = u,
|
|
4861
|
+
if (this.isInView === u || (this.isInView = u, i && !u && this.hasEnteredView))
|
|
4860
4862
|
return;
|
|
4861
4863
|
u && (this.hasEnteredView = !0), this.node.animationState && this.node.animationState.setActive("whileInView", u);
|
|
4862
4864
|
const { onViewportEnter: c, onViewportLeave: f } = this.node.getProps(), h = u ? c : f;
|
|
@@ -4892,14 +4894,14 @@ const rd = {
|
|
|
4892
4894
|
hover: {
|
|
4893
4895
|
Feature: Gf
|
|
4894
4896
|
}
|
|
4895
|
-
},
|
|
4897
|
+
}, sd = {
|
|
4896
4898
|
layout: {
|
|
4897
4899
|
ProjectionNode: oa,
|
|
4898
4900
|
MeasureLayout: Jo
|
|
4899
4901
|
}
|
|
4900
4902
|
}, qn = { current: null }, aa = { current: !1 };
|
|
4901
|
-
function
|
|
4902
|
-
if (aa.current = !0, !!
|
|
4903
|
+
function id() {
|
|
4904
|
+
if (aa.current = !0, !!sr)
|
|
4903
4905
|
if (window.matchMedia) {
|
|
4904
4906
|
const e = window.matchMedia("(prefers-reduced-motion)"), t = () => qn.current = e.matches;
|
|
4905
4907
|
e.addListener(t), t();
|
|
@@ -4909,25 +4911,25 @@ function sd() {
|
|
|
4909
4911
|
const od = [...Do, de, $e], ad = (e) => od.find(Vo(e)), ld = /* @__PURE__ */ new WeakMap();
|
|
4910
4912
|
function cd(e, t, n) {
|
|
4911
4913
|
for (const r in t) {
|
|
4912
|
-
const
|
|
4913
|
-
if (me(
|
|
4914
|
-
e.addValue(r,
|
|
4915
|
-
else if (me(
|
|
4916
|
-
e.addValue(r, Mt(
|
|
4917
|
-
else if (
|
|
4914
|
+
const s = t[r], i = n[r];
|
|
4915
|
+
if (me(s))
|
|
4916
|
+
e.addValue(r, s), process.env.NODE_ENV === "development" && tn(s.version === "12.4.7", `Attempting to mix Motion versions ${s.version} with 12.4.7 may not work as expected.`);
|
|
4917
|
+
else if (me(i))
|
|
4918
|
+
e.addValue(r, Mt(s, { owner: e }));
|
|
4919
|
+
else if (i !== s)
|
|
4918
4920
|
if (e.hasValue(r)) {
|
|
4919
4921
|
const o = e.getValue(r);
|
|
4920
|
-
o.liveStyle === !0 ? o.jump(
|
|
4922
|
+
o.liveStyle === !0 ? o.jump(s) : o.hasAnimated || o.set(s);
|
|
4921
4923
|
} else {
|
|
4922
4924
|
const o = e.getStaticValue(r);
|
|
4923
|
-
e.addValue(r, Mt(o !== void 0 ? o :
|
|
4925
|
+
e.addValue(r, Mt(o !== void 0 ? o : s, { owner: e }));
|
|
4924
4926
|
}
|
|
4925
4927
|
}
|
|
4926
4928
|
for (const r in n)
|
|
4927
4929
|
t[r] === void 0 && e.removeValue(r);
|
|
4928
4930
|
return t;
|
|
4929
4931
|
}
|
|
4930
|
-
const
|
|
4932
|
+
const xi = [
|
|
4931
4933
|
"AnimationStart",
|
|
4932
4934
|
"AnimationComplete",
|
|
4933
4935
|
"Update",
|
|
@@ -4940,7 +4942,7 @@ class ud {
|
|
|
4940
4942
|
scrapeMotionValuesFromProps(t, n, r) {
|
|
4941
4943
|
return {};
|
|
4942
4944
|
}
|
|
4943
|
-
constructor({ parent: t, props: n, presenceContext: r, reducedMotionConfig:
|
|
4945
|
+
constructor({ parent: t, props: n, presenceContext: r, reducedMotionConfig: s, blockInitialAnimation: i, visualState: o }, l = {}) {
|
|
4944
4946
|
this.current = null, this.children = /* @__PURE__ */ new Set(), this.isVariantNode = !1, this.isControllingVariants = !1, this.shouldReduceMotion = null, this.values = /* @__PURE__ */ new Map(), this.KeyframeResolver = Dr, this.features = {}, this.valueSubscriptions = /* @__PURE__ */ new Map(), this.prevMotionValues = {}, this.events = {}, this.propEventSubscriptions = {}, this.notifyUpdate = () => this.notify("Update", this.latestValues), this.render = () => {
|
|
4945
4947
|
this.current && (this.triggerBuild(), this.renderInstance(this.current, this.renderState, this.props.style, this.projection));
|
|
4946
4948
|
}, this.renderScheduledAt = 0, this.scheduleRender = () => {
|
|
@@ -4948,7 +4950,7 @@ class ud {
|
|
|
4948
4950
|
this.renderScheduledAt < g && (this.renderScheduledAt = g, J.render(this.render, !1, !0));
|
|
4949
4951
|
};
|
|
4950
4952
|
const { latestValues: a, renderState: u, onUpdate: c } = o;
|
|
4951
|
-
this.onUpdate = c, this.latestValues = a, this.baseTarget = { ...a }, this.initialValues = n.initial ? { ...a } : {}, this.renderState = u, this.parent = t, this.props = n, this.presenceContext = r, this.depth = t ? t.depth + 1 : 0, this.reducedMotionConfig =
|
|
4953
|
+
this.onUpdate = c, this.latestValues = a, this.baseTarget = { ...a }, this.initialValues = n.initial ? { ...a } : {}, this.renderState = u, this.parent = t, this.props = n, this.presenceContext = r, this.depth = t ? t.depth + 1 : 0, this.reducedMotionConfig = s, this.options = l, this.blockInitialAnimation = Boolean(i), this.isControllingVariants = sn(n), this.isVariantNode = Bi(n), this.isVariantNode && (this.variantChildren = /* @__PURE__ */ new Set()), this.manuallyAnimateOnMount = Boolean(t && t.current);
|
|
4952
4954
|
const { willChange: f, ...h } = this.scrapeMotionValuesFromProps(n, {}, this);
|
|
4953
4955
|
for (const g in h) {
|
|
4954
4956
|
const x = h[g];
|
|
@@ -4956,7 +4958,7 @@ class ud {
|
|
|
4956
4958
|
}
|
|
4957
4959
|
}
|
|
4958
4960
|
mount(t) {
|
|
4959
|
-
this.current = t, ld.set(t, this), this.projection && !this.projection.instance && this.projection.mount(t), this.parent && this.isVariantNode && !this.isControllingVariants && (this.removeFromVariantTree = this.parent.addVariantChild(this)), this.values.forEach((n, r) => this.bindToMotionValue(r, n)), aa.current ||
|
|
4961
|
+
this.current = t, ld.set(t, this), this.projection && !this.projection.instance && this.projection.mount(t), this.parent && this.isVariantNode && !this.isControllingVariants && (this.removeFromVariantTree = this.parent.addVariantChild(this)), this.values.forEach((n, r) => this.bindToMotionValue(r, n)), aa.current || id(), this.shouldReduceMotion = this.reducedMotionConfig === "never" ? !1 : this.reducedMotionConfig === "always" ? !0 : qn.current, process.env.NODE_ENV !== "production" && tn(this.shouldReduceMotion !== !0, "You have Reduced Motion enabled on your device. Animations may not appear as expected."), this.parent && this.parent.children.add(this), this.update(this.props, this.presenceContext);
|
|
4960
4962
|
}
|
|
4961
4963
|
unmount() {
|
|
4962
4964
|
this.projection && this.projection.unmount(), Be(this.notifyUpdate), Be(this.render), this.valueSubscriptions.forEach((t) => t()), this.valueSubscriptions.clear(), this.removeFromVariantTree && this.removeFromVariantTree(), this.parent && this.parent.children.delete(this);
|
|
@@ -4972,12 +4974,12 @@ class ud {
|
|
|
4972
4974
|
this.valueSubscriptions.has(t) && this.valueSubscriptions.get(t)();
|
|
4973
4975
|
const r = Xe.has(t);
|
|
4974
4976
|
r && this.onBindTransform && this.onBindTransform();
|
|
4975
|
-
const
|
|
4977
|
+
const s = n.on("change", (l) => {
|
|
4976
4978
|
this.latestValues[t] = l, this.props.onUpdate && J.preRender(this.notifyUpdate), r && this.projection && (this.projection.isTransformDirty = !0);
|
|
4977
|
-
}),
|
|
4979
|
+
}), i = n.on("renderRequest", this.scheduleRender);
|
|
4978
4980
|
let o;
|
|
4979
4981
|
window.MotionCheckAppearSync && (o = window.MotionCheckAppearSync(this, t, n)), this.valueSubscriptions.set(t, () => {
|
|
4980
|
-
|
|
4982
|
+
s(), i(), o && o(), n.owner && n.stop();
|
|
4981
4983
|
});
|
|
4982
4984
|
}
|
|
4983
4985
|
sortNodePosition(t) {
|
|
@@ -4989,10 +4991,10 @@ class ud {
|
|
|
4989
4991
|
const n = at[t];
|
|
4990
4992
|
if (!n)
|
|
4991
4993
|
continue;
|
|
4992
|
-
const { isEnabled: r, Feature:
|
|
4993
|
-
if (!this.features[t] &&
|
|
4994
|
-
const
|
|
4995
|
-
|
|
4994
|
+
const { isEnabled: r, Feature: s } = n;
|
|
4995
|
+
if (!this.features[t] && s && r(this.props) && (this.features[t] = new s(this)), this.features[t]) {
|
|
4996
|
+
const i = this.features[t];
|
|
4997
|
+
i.isMounted ? i.update() : (i.mount(), i.isMounted = !0);
|
|
4996
4998
|
}
|
|
4997
4999
|
}
|
|
4998
5000
|
}
|
|
@@ -5000,7 +5002,7 @@ class ud {
|
|
|
5000
5002
|
this.build(this.renderState, this.latestValues, this.props);
|
|
5001
5003
|
}
|
|
5002
5004
|
measureViewportBox() {
|
|
5003
|
-
return this.current ? this.measureInstanceViewportBox(this.current, this.props) :
|
|
5005
|
+
return this.current ? this.measureInstanceViewportBox(this.current, this.props) : se();
|
|
5004
5006
|
}
|
|
5005
5007
|
getStaticValue(t) {
|
|
5006
5008
|
return this.latestValues[t];
|
|
@@ -5010,11 +5012,11 @@ class ud {
|
|
|
5010
5012
|
}
|
|
5011
5013
|
update(t, n) {
|
|
5012
5014
|
(t.transformTemplate || this.props.transformTemplate) && this.scheduleRender(), this.prevProps = this.props, this.props = t, this.prevPresenceContext = this.presenceContext, this.presenceContext = n;
|
|
5013
|
-
for (let r = 0; r <
|
|
5014
|
-
const
|
|
5015
|
-
this.propEventSubscriptions[
|
|
5016
|
-
const
|
|
5017
|
-
o && (this.propEventSubscriptions[
|
|
5015
|
+
for (let r = 0; r < xi.length; r++) {
|
|
5016
|
+
const s = xi[r];
|
|
5017
|
+
this.propEventSubscriptions[s] && (this.propEventSubscriptions[s](), delete this.propEventSubscriptions[s]);
|
|
5018
|
+
const i = "on" + s, o = t[i];
|
|
5019
|
+
o && (this.propEventSubscriptions[s] = this.on(s, o));
|
|
5018
5020
|
}
|
|
5019
5021
|
this.prevMotionValues = cd(this, this.scrapeMotionValuesFromProps(t, this.prevProps, this), this.prevMotionValues), this.handleChildMotionValue && this.handleChildMotionValue(), this.onUpdate && this.onUpdate(this);
|
|
5020
5022
|
}
|
|
@@ -5058,8 +5060,8 @@ class ud {
|
|
|
5058
5060
|
}
|
|
5059
5061
|
readValue(t, n) {
|
|
5060
5062
|
var r;
|
|
5061
|
-
let
|
|
5062
|
-
return
|
|
5063
|
+
let s = this.latestValues[t] !== void 0 || !this.current ? this.latestValues[t] : (r = this.getBaseTargetFromProps(this.props, t)) !== null && r !== void 0 ? r : this.readValueFromInstance(this.current, t, this.options);
|
|
5064
|
+
return s != null && (typeof s == "string" && (jo(s) || bo(s)) ? s = parseFloat(s) : !ad(s) && $e.test(n) && (s = Eo(t, n)), this.setBaseTarget(t, me(s) ? s.get() : s)), me(s) ? s.get() : s;
|
|
5063
5065
|
}
|
|
5064
5066
|
setBaseTarget(t, n) {
|
|
5065
5067
|
this.baseTarget[t] = n;
|
|
@@ -5067,15 +5069,15 @@ class ud {
|
|
|
5067
5069
|
getBaseTarget(t) {
|
|
5068
5070
|
var n;
|
|
5069
5071
|
const { initial: r } = this.props;
|
|
5070
|
-
let
|
|
5072
|
+
let s;
|
|
5071
5073
|
if (typeof r == "string" || typeof r == "object") {
|
|
5072
5074
|
const o = vr(this.props, r, (n = this.presenceContext) === null || n === void 0 ? void 0 : n.custom);
|
|
5073
|
-
o && (
|
|
5075
|
+
o && (s = o[t]);
|
|
5074
5076
|
}
|
|
5075
|
-
if (r &&
|
|
5076
|
-
return
|
|
5077
|
-
const
|
|
5078
|
-
return
|
|
5077
|
+
if (r && s !== void 0)
|
|
5078
|
+
return s;
|
|
5079
|
+
const i = this.getBaseTargetFromProps(this.props, t);
|
|
5080
|
+
return i !== void 0 && !me(i) ? i : this.initialValues[t] !== void 0 && s === void 0 ? void 0 : this.baseTarget[t];
|
|
5079
5081
|
}
|
|
5080
5082
|
on(t, n) {
|
|
5081
5083
|
return this.events[t] || (this.events[t] = new Er()), this.events[t].add(n);
|
|
@@ -5110,15 +5112,15 @@ function fd(e) {
|
|
|
5110
5112
|
}
|
|
5111
5113
|
class dd extends la {
|
|
5112
5114
|
constructor() {
|
|
5113
|
-
super(...arguments), this.type = "html", this.renderInstance =
|
|
5115
|
+
super(...arguments), this.type = "html", this.renderInstance = Zi;
|
|
5114
5116
|
}
|
|
5115
5117
|
readValueFromInstance(t, n) {
|
|
5116
5118
|
if (Xe.has(n)) {
|
|
5117
5119
|
const r = Vr(n);
|
|
5118
5120
|
return r && r.default || 0;
|
|
5119
5121
|
} else {
|
|
5120
|
-
const r = fd(t),
|
|
5121
|
-
return typeof
|
|
5122
|
+
const r = fd(t), s = (ur(n) ? r.getPropertyValue(n) : r[n]) || 0;
|
|
5123
|
+
return typeof s == "string" ? s.trim() : s;
|
|
5122
5124
|
}
|
|
5123
5125
|
}
|
|
5124
5126
|
measureInstanceViewportBox(t, { transformPagePoint: n }) {
|
|
@@ -5133,8 +5135,8 @@ class dd extends la {
|
|
|
5133
5135
|
}
|
|
5134
5136
|
class hd extends la {
|
|
5135
5137
|
constructor() {
|
|
5136
|
-
super(...arguments), this.type = "svg", this.isSVGTag = !1, this.measureInstanceViewportBox =
|
|
5137
|
-
this.current && !this.renderState.dimensions &&
|
|
5138
|
+
super(...arguments), this.type = "svg", this.isSVGTag = !1, this.measureInstanceViewportBox = se, this.updateDimensions = () => {
|
|
5139
|
+
this.current && !this.renderState.dimensions && Xi(this.current, this.renderState);
|
|
5138
5140
|
};
|
|
5139
5141
|
}
|
|
5140
5142
|
getBaseTargetFromProps(t, n) {
|
|
@@ -5145,7 +5147,7 @@ class hd extends la {
|
|
|
5145
5147
|
const r = Vr(n);
|
|
5146
5148
|
return r && r.default || 0;
|
|
5147
5149
|
}
|
|
5148
|
-
return n =
|
|
5150
|
+
return n = Ji.has(n) ? n : lr(n), t.getAttribute(n);
|
|
5149
5151
|
}
|
|
5150
5152
|
scrapeMotionValuesFromProps(t, n, r) {
|
|
5151
5153
|
return eo(t, n, r);
|
|
@@ -5156,26 +5158,26 @@ class hd extends la {
|
|
|
5156
5158
|
build(t, n, r) {
|
|
5157
5159
|
gr(t, n, this.isSVGTag, r.transformTemplate);
|
|
5158
5160
|
}
|
|
5159
|
-
renderInstance(t, n, r,
|
|
5160
|
-
|
|
5161
|
+
renderInstance(t, n, r, s) {
|
|
5162
|
+
Qi(t, n, r, s);
|
|
5161
5163
|
}
|
|
5162
5164
|
mount(t) {
|
|
5163
5165
|
this.isSVGTag = yr(t.tagName), super.mount(t);
|
|
5164
5166
|
}
|
|
5165
5167
|
}
|
|
5166
5168
|
const pd = (e, t) => mr(e) ? new hd(t) : new dd(t, {
|
|
5167
|
-
allowProjection: e !==
|
|
5169
|
+
allowProjection: e !== Di
|
|
5168
5170
|
}), md = /* @__PURE__ */ _l({
|
|
5169
5171
|
..._u,
|
|
5170
5172
|
...rd,
|
|
5171
5173
|
...Kf,
|
|
5172
|
-
...
|
|
5174
|
+
...sd
|
|
5173
5175
|
}, pd), _r = /* @__PURE__ */ Ja(md), gd = ({
|
|
5174
5176
|
isOpen: e,
|
|
5175
5177
|
onClose: t,
|
|
5176
5178
|
onConfirm: n,
|
|
5177
5179
|
header: r,
|
|
5178
|
-
question:
|
|
5180
|
+
question: s
|
|
5179
5181
|
}) => e ? /* @__PURE__ */ m.exports.jsx(
|
|
5180
5182
|
"div",
|
|
5181
5183
|
{
|
|
@@ -5222,7 +5224,7 @@ const pd = (e, t) => mr(e) ? new hd(t) : new dd(t, {
|
|
|
5222
5224
|
)
|
|
5223
5225
|
] }),
|
|
5224
5226
|
/* @__PURE__ */ m.exports.jsx("div", { className: "p-4 md:p-5 space-y-4", children: /* @__PURE__ */ m.exports.jsxs("p", { className: "text-base leading-relaxed text-gray-500 dark:text-gray-400", children: [
|
|
5225
|
-
|
|
5227
|
+
s,
|
|
5226
5228
|
" "
|
|
5227
5229
|
] }) }),
|
|
5228
5230
|
/* @__PURE__ */ m.exports.jsxs("div", { className: "flex items-center p-4 md:p-5 border-t border-gray-200 rounded-b dark:border-gray-600", children: [
|
|
@@ -5254,13 +5256,13 @@ const pd = (e, t) => mr(e) ? new hd(t) : new dd(t, {
|
|
|
5254
5256
|
isVisible: t,
|
|
5255
5257
|
position: n,
|
|
5256
5258
|
messageId: r,
|
|
5257
|
-
isCurrentUserMessage:
|
|
5259
|
+
isCurrentUserMessage: s
|
|
5258
5260
|
}) => {
|
|
5259
|
-
const
|
|
5260
|
-
return ut(() => (
|
|
5261
|
-
|
|
5262
|
-
}), [t]), !
|
|
5263
|
-
/* @__PURE__ */ m.exports.jsx(
|
|
5261
|
+
const i = he(null), [o, l] = xe(!1);
|
|
5262
|
+
return ut(() => (i.current || (i.current = document.createElement("div"), i.current.style.zIndex = "1500", i.current.style.position = "fixed", i.current.style.top = "0", i.current.style.left = "0", i.current.style.width = "100%", i.current.style.height = "100%", i.current.style.pointerEvents = "none", document.body.appendChild(i.current)), l(!0), () => {
|
|
5263
|
+
i.current && !t && (document.body.removeChild(i.current), i.current = null);
|
|
5264
|
+
}), [t]), !i.current || !o ? null : Na.createPortal(
|
|
5265
|
+
/* @__PURE__ */ m.exports.jsx(ki, { children: t && /* @__PURE__ */ m.exports.jsx(
|
|
5264
5266
|
_r.div,
|
|
5265
5267
|
{
|
|
5266
5268
|
initial: { opacity: 0, scale: 0.8, y: -10 },
|
|
@@ -5272,7 +5274,7 @@ const pd = (e, t) => mr(e) ? new hd(t) : new dd(t, {
|
|
|
5272
5274
|
top: n.y,
|
|
5273
5275
|
left: n.x
|
|
5274
5276
|
},
|
|
5275
|
-
children: e.map((a, u) => a != null && a.onlyCurrentUserMessage && !
|
|
5277
|
+
children: e.map((a, u) => a != null && a.onlyCurrentUserMessage && !s ? null : /* @__PURE__ */ m.exports.jsxs(
|
|
5276
5278
|
"button",
|
|
5277
5279
|
{
|
|
5278
5280
|
disabled: a == null ? void 0 : a.disabled,
|
|
@@ -5290,7 +5292,7 @@ const pd = (e, t) => mr(e) ? new hd(t) : new dd(t, {
|
|
|
5290
5292
|
))
|
|
5291
5293
|
}
|
|
5292
5294
|
) }),
|
|
5293
|
-
|
|
5295
|
+
i.current
|
|
5294
5296
|
);
|
|
5295
5297
|
}, vd = (e) => {
|
|
5296
5298
|
const t = Math.floor(e / 60), n = e % 60;
|
|
@@ -5327,7 +5329,7 @@ const pd = (e, t) => mr(e) ? new hd(t) : new dd(t, {
|
|
|
5327
5329
|
}
|
|
5328
5330
|
)
|
|
5329
5331
|
}
|
|
5330
|
-
),
|
|
5332
|
+
), bi = () => /* @__PURE__ */ m.exports.jsx(
|
|
5331
5333
|
"svg",
|
|
5332
5334
|
{
|
|
5333
5335
|
width: "17",
|
|
@@ -5378,8 +5380,8 @@ const pd = (e, t) => mr(e) ? new hd(t) : new dd(t, {
|
|
|
5378
5380
|
onSendVoice: t,
|
|
5379
5381
|
onImageSend: n,
|
|
5380
5382
|
onVideoSend: r,
|
|
5381
|
-
onFileSend:
|
|
5382
|
-
dynamicSymbolAssignments:
|
|
5383
|
+
onFileSend: s,
|
|
5384
|
+
dynamicSymbolAssignments: i
|
|
5383
5385
|
}) => {
|
|
5384
5386
|
const [o, l] = xe(""), [a, u] = xe(!1), [c, f] = xe(0), [h, g] = xe(null), [x, y] = xe(null), [P, b] = xe(0), S = he(null), C = he([]), V = he(null), p = he(null), A = he(null), [B, M] = xe(!1), H = (v) => {
|
|
5385
5387
|
const w = v.target.value;
|
|
@@ -5393,7 +5395,7 @@ const pd = (e, t) => mr(e) ? new hd(t) : new dd(t, {
|
|
|
5393
5395
|
const j = v[0].split(h)[1];
|
|
5394
5396
|
y(j);
|
|
5395
5397
|
}
|
|
5396
|
-
|
|
5398
|
+
i != null && i.some((j) => j.symbol === w) && g(w);
|
|
5397
5399
|
} else
|
|
5398
5400
|
g(null);
|
|
5399
5401
|
}, ne = (v, w) => {
|
|
@@ -5409,8 +5411,8 @@ const pd = (e, t) => mr(e) ? new hd(t) : new dd(t, {
|
|
|
5409
5411
|
j.data.size > 0 && C.current.push(j.data);
|
|
5410
5412
|
}, w.onstop = () => {
|
|
5411
5413
|
clearInterval(V.current);
|
|
5412
|
-
const j = new Blob(C.current, { type: "audio/mp3" })
|
|
5413
|
-
t(
|
|
5414
|
+
const j = new Blob(C.current, { type: "audio/mp3" });
|
|
5415
|
+
t(j), u(!1);
|
|
5414
5416
|
}, w.start();
|
|
5415
5417
|
}, te = () => {
|
|
5416
5418
|
var v;
|
|
@@ -5419,7 +5421,7 @@ const pd = (e, t) => mr(e) ? new hd(t) : new dd(t, {
|
|
|
5419
5421
|
const { scrollTop: w, scrollHeight: j, clientHeight: k } = v.currentTarget;
|
|
5420
5422
|
if (w > P) {
|
|
5421
5423
|
if (w + k >= j - 1) {
|
|
5422
|
-
const O =
|
|
5424
|
+
const O = i == null ? void 0 : i.find(
|
|
5423
5425
|
(_) => _.symbol === h
|
|
5424
5426
|
);
|
|
5425
5427
|
O && (O != null && O.updatePageNumber) && (M(!0), O == null || O.updatePageNumber(O.pagNumber + 1), b(w), setTimeout(() => {
|
|
@@ -5460,7 +5462,7 @@ const pd = (e, t) => mr(e) ? new hd(t) : new dd(t, {
|
|
|
5460
5462
|
const O = w.type.split("/");
|
|
5461
5463
|
O.length === 2 && (j = O[1]);
|
|
5462
5464
|
}
|
|
5463
|
-
j || (j = ((D = w.name.split(".").pop()) == null ? void 0 : D.toLowerCase()) || ""), ae.has(j) ? n(w) : X.has(j) ? r(w) :
|
|
5465
|
+
j || (j = ((D = w.name.split(".").pop()) == null ? void 0 : D.toLowerCase()) || ""), ae.has(j) ? n(w) : X.has(j) ? r(w) : s(w);
|
|
5464
5466
|
};
|
|
5465
5467
|
return /* @__PURE__ */ m.exports.jsxs("div", { className: "absolute bottom-0 w-full flex items-center p-2 pr-4 z-10", children: [
|
|
5466
5468
|
a ? /* @__PURE__ */ m.exports.jsxs("div", { className: "w-full flex justify-between items-center bg-white p-2 pl-4 h-11 rounded-3xl ", children: [
|
|
@@ -5470,7 +5472,7 @@ const pd = (e, t) => mr(e) ? new hd(t) : new dd(t, {
|
|
|
5470
5472
|
{
|
|
5471
5473
|
className: "cursor-pointer p-2 flex justify-center items-center bg-green-500 text-white rounded-full",
|
|
5472
5474
|
onClick: te,
|
|
5473
|
-
children: /* @__PURE__ */ m.exports.jsx(
|
|
5475
|
+
children: /* @__PURE__ */ m.exports.jsx(bi, {})
|
|
5474
5476
|
}
|
|
5475
5477
|
)
|
|
5476
5478
|
] }) : /* @__PURE__ */ m.exports.jsxs(m.exports.Fragment, { children: [
|
|
@@ -5513,7 +5515,7 @@ const pd = (e, t) => mr(e) ? new hd(t) : new dd(t, {
|
|
|
5513
5515
|
{
|
|
5514
5516
|
className: "flex items-center justify-center cursor-pointer w-9 h-9 ml-2 p-2 bg-blue-500 text-white rounded-full hover:bg-blue-600 transition",
|
|
5515
5517
|
onClick: o ? ge : oe,
|
|
5516
|
-
children: o ? /* @__PURE__ */ m.exports.jsx(
|
|
5518
|
+
children: o ? /* @__PURE__ */ m.exports.jsx(bi, {}) : /* @__PURE__ */ m.exports.jsx(bd, {})
|
|
5517
5519
|
}
|
|
5518
5520
|
)
|
|
5519
5521
|
] }),
|
|
@@ -5539,7 +5541,7 @@ const pd = (e, t) => mr(e) ? new hd(t) : new dd(t, {
|
|
|
5539
5541
|
)
|
|
5540
5542
|
] }),
|
|
5541
5543
|
/* @__PURE__ */ m.exports.jsxs("div", { className: "space-y-2", children: [
|
|
5542
|
-
|
|
5544
|
+
i ? i.filter((v) => v.symbol === h).map((v) => {
|
|
5543
5545
|
var k;
|
|
5544
5546
|
const { component: w, lists: j } = v;
|
|
5545
5547
|
return w ? x ? (k = j == null ? void 0 : j.filter((D) => D == null ? void 0 : D.name.includes(x))) == null ? void 0 : k.map((D, O) => /* @__PURE__ */ m.exports.jsx(
|
|
@@ -5578,13 +5580,13 @@ const pd = (e, t) => mr(e) ? new hd(t) : new dd(t, {
|
|
|
5578
5580
|
] });
|
|
5579
5581
|
};
|
|
5580
5582
|
var Le = /* @__PURE__ */ ((e) => (e[e.File = 0] = "File", e[e.Voice = 1] = "Voice", e[e.Video = 2] = "Video", e[e.Image = 3] = "Image", e))(Le || {});
|
|
5581
|
-
const
|
|
5583
|
+
const Ti = ({
|
|
5582
5584
|
fileName: e,
|
|
5583
5585
|
fileSize: t,
|
|
5584
5586
|
format: n,
|
|
5585
5587
|
src: r
|
|
5586
5588
|
}) => {
|
|
5587
|
-
const
|
|
5589
|
+
const s = () => {
|
|
5588
5590
|
const o = {
|
|
5589
5591
|
rar: /* @__PURE__ */ m.exports.jsx("p", { className: "p-2 text-green-500 font-bold", children: n }),
|
|
5590
5592
|
zip: /* @__PURE__ */ m.exports.jsx("p", { className: "p-2 text-blue-500 font-bold", children: n }),
|
|
@@ -5610,9 +5612,9 @@ const Ts = ({
|
|
|
5610
5612
|
sql: /* @__PURE__ */ m.exports.jsx("p", { className: "p-2 text-gray-400 font-bold", children: n })
|
|
5611
5613
|
};
|
|
5612
5614
|
return n && o[n] ? o[n] : /* @__PURE__ */ m.exports.jsx("p", { className: "p-2 text-black ", children: n ?? "UN" });
|
|
5613
|
-
},
|
|
5615
|
+
}, i = (o) => o > 1048576 ? (o / 1048576).toFixed(1) + " MB" : (o / 1024).toFixed(1) + " KB";
|
|
5614
5616
|
return /* @__PURE__ */ m.exports.jsxs("div", { className: "flex items-center rounded-lg", children: [
|
|
5615
|
-
/* @__PURE__ */ m.exports.jsx("div", { className: "w-14 h-14 mr-3 flex items-center justify-center relative border border-green-900 rounded-md p-3", children:
|
|
5617
|
+
/* @__PURE__ */ m.exports.jsx("div", { className: "w-14 h-14 mr-3 flex items-center justify-center relative border border-green-900 rounded-md p-3", children: s() }),
|
|
5616
5618
|
/* @__PURE__ */ m.exports.jsxs("div", { className: "flex flex-col flex-grow", children: [
|
|
5617
5619
|
/* @__PURE__ */ m.exports.jsx(
|
|
5618
5620
|
"a",
|
|
@@ -5623,7 +5625,7 @@ const Ts = ({
|
|
|
5623
5625
|
children: e
|
|
5624
5626
|
}
|
|
5625
5627
|
),
|
|
5626
|
-
/* @__PURE__ */ m.exports.jsx("span", { className: "text-gray-600 text-sm", children:
|
|
5628
|
+
/* @__PURE__ */ m.exports.jsx("span", { className: "text-gray-600 text-sm", children: i(t) })
|
|
5627
5629
|
] }),
|
|
5628
5630
|
/* @__PURE__ */ m.exports.jsx(
|
|
5629
5631
|
"a",
|
|
@@ -5673,15 +5675,15 @@ const Ts = ({
|
|
|
5673
5675
|
);
|
|
5674
5676
|
let vt = null;
|
|
5675
5677
|
const Sd = ({ src: e, className: t }) => {
|
|
5676
|
-
const [n, r] = xe(!1), [
|
|
5678
|
+
const [n, r] = xe(!1), [s, i] = xe(0), o = he(null);
|
|
5677
5679
|
ut(() => {
|
|
5678
5680
|
const a = o.current;
|
|
5679
5681
|
if (!a)
|
|
5680
5682
|
return;
|
|
5681
5683
|
const u = () => {
|
|
5682
|
-
|
|
5684
|
+
i(a.currentTime / a.duration * 100);
|
|
5683
5685
|
}, c = () => r(!0), f = () => r(!1), h = () => {
|
|
5684
|
-
r(!1),
|
|
5686
|
+
r(!1), i(0);
|
|
5685
5687
|
};
|
|
5686
5688
|
return a.addEventListener("timeupdate", u), a.addEventListener("play", c), a.addEventListener("pause", f), a.addEventListener("ended", h), () => {
|
|
5687
5689
|
a.removeEventListener("timeupdate", u), a.removeEventListener("play", c), a.removeEventListener("pause", f), a.removeEventListener("ended", h);
|
|
@@ -5708,7 +5710,7 @@ const Sd = ({ src: e, className: t }) => {
|
|
|
5708
5710
|
"div",
|
|
5709
5711
|
{
|
|
5710
5712
|
className: "h-full bg-blue-500 transition-all",
|
|
5711
|
-
style: { width: `${
|
|
5713
|
+
style: { width: `${s}%` }
|
|
5712
5714
|
}
|
|
5713
5715
|
) }),
|
|
5714
5716
|
/* @__PURE__ */ m.exports.jsx("audio", { ref: o, src: e })
|
|
@@ -5716,11 +5718,11 @@ const Sd = ({ src: e, className: t }) => {
|
|
|
5716
5718
|
}
|
|
5717
5719
|
);
|
|
5718
5720
|
}, Cd = ({
|
|
5719
|
-
|
|
5721
|
+
attachmentUrl: e,
|
|
5720
5722
|
attachmentType: t,
|
|
5721
5723
|
attachmentFormat: n
|
|
5722
5724
|
}) => e ? t === Le.Voice ? /* @__PURE__ */ m.exports.jsx("div", { className: "w-full", children: /* @__PURE__ */ m.exports.jsx(Sd, { src: e }) }) : t === Le.Image ? /* @__PURE__ */ m.exports.jsx("div", { className: "w-full", children: /* @__PURE__ */ m.exports.jsx("img", { src: e }) }) : t === Le.File ? /* @__PURE__ */ m.exports.jsx("div", { className: "w-full mt-1", children: /* @__PURE__ */ m.exports.jsx(
|
|
5723
|
-
|
|
5725
|
+
Ti,
|
|
5724
5726
|
{
|
|
5725
5727
|
fileName: "productivity",
|
|
5726
5728
|
fileSize: 23e3,
|
|
@@ -5728,7 +5730,7 @@ const Sd = ({ src: e, className: t }) => {
|
|
|
5728
5730
|
src: e
|
|
5729
5731
|
}
|
|
5730
5732
|
) }) : t === Le.Video ? /* @__PURE__ */ m.exports.jsx("div", { className: "w-full mt-1", children: /* @__PURE__ */ m.exports.jsx(
|
|
5731
|
-
|
|
5733
|
+
Ti,
|
|
5732
5734
|
{
|
|
5733
5735
|
fileName: "productivity",
|
|
5734
5736
|
fileSize: 23e3,
|
|
@@ -5741,7 +5743,7 @@ const Sd = ({ src: e, className: t }) => {
|
|
|
5741
5743
|
handleContextMenu: n,
|
|
5742
5744
|
media: r
|
|
5743
5745
|
}) => {
|
|
5744
|
-
var
|
|
5746
|
+
var s, i, o, l, a;
|
|
5745
5747
|
return /* @__PURE__ */ m.exports.jsxs(m.exports.Fragment, { children: [
|
|
5746
5748
|
t ? /* @__PURE__ */ m.exports.jsx(
|
|
5747
5749
|
"img",
|
|
@@ -5760,7 +5762,7 @@ const Sd = ({ src: e, className: t }) => {
|
|
|
5760
5762
|
onContextMenu: (u) => n(u, e),
|
|
5761
5763
|
className: `relative ${r ? "w-3/4" : "w-fit max-w-3/4"}flex flex-col gap-1 md:max-w-[400px] p-2 pt-5 rounded-lg bg-green-200`,
|
|
5762
5764
|
children: [
|
|
5763
|
-
/* @__PURE__ */ m.exports.jsx("span", { className: "absolute top-1 text-xs text-orange-700", children: (
|
|
5765
|
+
/* @__PURE__ */ m.exports.jsx("span", { className: "absolute top-1 text-xs text-orange-700", children: (s = e.user) != null && s.fullName && ((o = (i = e.user) == null ? void 0 : i.fullName) == null ? void 0 : o.length) > 16 ? (l = e.user) == null ? void 0 : l.firstName : (a = e.user) == null ? void 0 : a.fullName }),
|
|
5764
5766
|
r || null,
|
|
5765
5767
|
/* @__PURE__ */ m.exports.jsx("span", { children: e.text }),
|
|
5766
5768
|
/* @__PURE__ */ m.exports.jsx("div", { className: "w-full flex gap- items-center justify-end", children: /* @__PURE__ */ m.exports.jsx("span", { className: "text-[10px]", children: new Date(e.createdDate).toLocaleTimeString().split(":")[0] + ":" + new Date(e.createdDate).toLocaleTimeString().split(":")[1] }) }),
|
|
@@ -5886,12 +5888,12 @@ const Sd = ({ src: e, className: t }) => {
|
|
|
5886
5888
|
}
|
|
5887
5889
|
);
|
|
5888
5890
|
var ce = { exports: {} }, En = { exports: {} }, G = {};
|
|
5889
|
-
var
|
|
5891
|
+
var wi;
|
|
5890
5892
|
function jd() {
|
|
5891
|
-
if (
|
|
5893
|
+
if (wi)
|
|
5892
5894
|
return G;
|
|
5893
|
-
|
|
5894
|
-
var e = typeof Symbol == "function" && Symbol.for, t = e ? Symbol.for("react.element") : 60103, n = e ? Symbol.for("react.portal") : 60106, r = e ? Symbol.for("react.fragment") : 60107,
|
|
5895
|
+
wi = 1;
|
|
5896
|
+
var e = typeof Symbol == "function" && Symbol.for, t = e ? Symbol.for("react.element") : 60103, n = e ? Symbol.for("react.portal") : 60106, r = e ? Symbol.for("react.fragment") : 60107, s = e ? Symbol.for("react.strict_mode") : 60108, i = e ? Symbol.for("react.profiler") : 60114, o = e ? Symbol.for("react.provider") : 60109, l = e ? Symbol.for("react.context") : 60110, a = e ? Symbol.for("react.async_mode") : 60111, u = e ? Symbol.for("react.concurrent_mode") : 60111, c = e ? Symbol.for("react.forward_ref") : 60112, f = e ? Symbol.for("react.suspense") : 60113, h = e ? Symbol.for("react.suspense_list") : 60120, g = e ? Symbol.for("react.memo") : 60115, x = e ? Symbol.for("react.lazy") : 60116, y = e ? Symbol.for("react.block") : 60121, P = e ? Symbol.for("react.fundamental") : 60117, b = e ? Symbol.for("react.responder") : 60118, S = e ? Symbol.for("react.scope") : 60119;
|
|
5895
5897
|
function C(p) {
|
|
5896
5898
|
if (typeof p == "object" && p !== null) {
|
|
5897
5899
|
var A = p.$$typeof;
|
|
@@ -5901,8 +5903,8 @@ function jd() {
|
|
|
5901
5903
|
case a:
|
|
5902
5904
|
case u:
|
|
5903
5905
|
case r:
|
|
5904
|
-
case s:
|
|
5905
5906
|
case i:
|
|
5907
|
+
case s:
|
|
5906
5908
|
case f:
|
|
5907
5909
|
return p;
|
|
5908
5910
|
default:
|
|
@@ -5925,7 +5927,7 @@ function jd() {
|
|
|
5925
5927
|
function V(p) {
|
|
5926
5928
|
return C(p) === u;
|
|
5927
5929
|
}
|
|
5928
|
-
return G.AsyncMode = a, G.ConcurrentMode = u, G.ContextConsumer = l, G.ContextProvider = o, G.Element = t, G.ForwardRef = c, G.Fragment = r, G.Lazy = x, G.Memo = g, G.Portal = n, G.Profiler =
|
|
5930
|
+
return G.AsyncMode = a, G.ConcurrentMode = u, G.ContextConsumer = l, G.ContextProvider = o, G.Element = t, G.ForwardRef = c, G.Fragment = r, G.Lazy = x, G.Memo = g, G.Portal = n, G.Profiler = i, G.StrictMode = s, G.Suspense = f, G.isAsyncMode = function(p) {
|
|
5929
5931
|
return V(p) || C(p) === a;
|
|
5930
5932
|
}, G.isConcurrentMode = V, G.isContextConsumer = function(p) {
|
|
5931
5933
|
return C(p) === l;
|
|
@@ -5944,22 +5946,22 @@ function jd() {
|
|
|
5944
5946
|
}, G.isPortal = function(p) {
|
|
5945
5947
|
return C(p) === n;
|
|
5946
5948
|
}, G.isProfiler = function(p) {
|
|
5947
|
-
return C(p) === s;
|
|
5948
|
-
}, G.isStrictMode = function(p) {
|
|
5949
5949
|
return C(p) === i;
|
|
5950
|
+
}, G.isStrictMode = function(p) {
|
|
5951
|
+
return C(p) === s;
|
|
5950
5952
|
}, G.isSuspense = function(p) {
|
|
5951
5953
|
return C(p) === f;
|
|
5952
5954
|
}, G.isValidElementType = function(p) {
|
|
5953
|
-
return typeof p == "string" || typeof p == "function" || p === r || p === u || p ===
|
|
5955
|
+
return typeof p == "string" || typeof p == "function" || p === r || p === u || p === i || p === s || p === f || p === h || typeof p == "object" && p !== null && (p.$$typeof === x || p.$$typeof === g || p.$$typeof === o || p.$$typeof === l || p.$$typeof === c || p.$$typeof === P || p.$$typeof === b || p.$$typeof === S || p.$$typeof === y);
|
|
5954
5956
|
}, G.typeOf = C, G;
|
|
5955
5957
|
}
|
|
5956
5958
|
var q = {};
|
|
5957
|
-
var
|
|
5959
|
+
var Pi;
|
|
5958
5960
|
function Md() {
|
|
5959
|
-
return
|
|
5960
|
-
var e = typeof Symbol == "function" && Symbol.for, t = e ? Symbol.for("react.element") : 60103, n = e ? Symbol.for("react.portal") : 60106, r = e ? Symbol.for("react.fragment") : 60107,
|
|
5961
|
+
return Pi || (Pi = 1, process.env.NODE_ENV !== "production" && function() {
|
|
5962
|
+
var e = typeof Symbol == "function" && Symbol.for, t = e ? Symbol.for("react.element") : 60103, n = e ? Symbol.for("react.portal") : 60106, r = e ? Symbol.for("react.fragment") : 60107, s = e ? Symbol.for("react.strict_mode") : 60108, i = e ? Symbol.for("react.profiler") : 60114, o = e ? Symbol.for("react.provider") : 60109, l = e ? Symbol.for("react.context") : 60110, a = e ? Symbol.for("react.async_mode") : 60111, u = e ? Symbol.for("react.concurrent_mode") : 60111, c = e ? Symbol.for("react.forward_ref") : 60112, f = e ? Symbol.for("react.suspense") : 60113, h = e ? Symbol.for("react.suspense_list") : 60120, g = e ? Symbol.for("react.memo") : 60115, x = e ? Symbol.for("react.lazy") : 60116, y = e ? Symbol.for("react.block") : 60121, P = e ? Symbol.for("react.fundamental") : 60117, b = e ? Symbol.for("react.responder") : 60118, S = e ? Symbol.for("react.scope") : 60119;
|
|
5961
5963
|
function C(R) {
|
|
5962
|
-
return typeof R == "string" || typeof R == "function" || R === r || R === u || R ===
|
|
5964
|
+
return typeof R == "string" || typeof R == "function" || R === r || R === u || R === i || R === s || R === f || R === h || typeof R == "object" && R !== null && (R.$$typeof === x || R.$$typeof === g || R.$$typeof === o || R.$$typeof === l || R.$$typeof === c || R.$$typeof === P || R.$$typeof === b || R.$$typeof === S || R.$$typeof === y);
|
|
5963
5965
|
}
|
|
5964
5966
|
function V(R) {
|
|
5965
5967
|
if (typeof R == "object" && R !== null) {
|
|
@@ -5971,8 +5973,8 @@ function Md() {
|
|
|
5971
5973
|
case a:
|
|
5972
5974
|
case u:
|
|
5973
5975
|
case r:
|
|
5974
|
-
case s:
|
|
5975
5976
|
case i:
|
|
5977
|
+
case s:
|
|
5976
5978
|
case f:
|
|
5977
5979
|
return Ze;
|
|
5978
5980
|
default:
|
|
@@ -5993,7 +5995,7 @@ function Md() {
|
|
|
5993
5995
|
}
|
|
5994
5996
|
}
|
|
5995
5997
|
}
|
|
5996
|
-
var p = a, A = u, B = l, M = o, H = t, F = c, ne = r, ge = x, oe = g, te = n, ye =
|
|
5998
|
+
var p = a, A = u, B = l, M = o, H = t, F = c, ne = r, ge = x, oe = g, te = n, ye = i, ae = s, X = f, le = !1;
|
|
5997
5999
|
function Pe(R) {
|
|
5998
6000
|
return le || (le = !0, console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")), v(R) || V(R) === a;
|
|
5999
6001
|
}
|
|
@@ -6025,10 +6027,10 @@ function Md() {
|
|
|
6025
6027
|
return V(R) === n;
|
|
6026
6028
|
}
|
|
6027
6029
|
function Y(R) {
|
|
6028
|
-
return V(R) ===
|
|
6030
|
+
return V(R) === i;
|
|
6029
6031
|
}
|
|
6030
6032
|
function U(R) {
|
|
6031
|
-
return V(R) ===
|
|
6033
|
+
return V(R) === s;
|
|
6032
6034
|
}
|
|
6033
6035
|
function fe(R) {
|
|
6034
6036
|
return V(R) === f;
|
|
@@ -6036,29 +6038,29 @@ function Md() {
|
|
|
6036
6038
|
q.AsyncMode = p, q.ConcurrentMode = A, q.ContextConsumer = B, q.ContextProvider = M, q.Element = H, q.ForwardRef = F, q.Fragment = ne, q.Lazy = ge, q.Memo = oe, q.Portal = te, q.Profiler = ye, q.StrictMode = ae, q.Suspense = X, q.isAsyncMode = Pe, q.isConcurrentMode = v, q.isContextConsumer = w, q.isContextProvider = j, q.isElement = k, q.isForwardRef = D, q.isFragment = O, q.isLazy = _, q.isMemo = N, q.isPortal = $, q.isProfiler = Y, q.isStrictMode = U, q.isSuspense = fe, q.isValidElementType = C, q.typeOf = V;
|
|
6037
6039
|
}()), q;
|
|
6038
6040
|
}
|
|
6039
|
-
var
|
|
6041
|
+
var Si;
|
|
6040
6042
|
function ua() {
|
|
6041
|
-
return
|
|
6043
|
+
return Si || (Si = 1, function(e) {
|
|
6042
6044
|
process.env.NODE_ENV === "production" ? e.exports = jd() : e.exports = Md();
|
|
6043
6045
|
}(En)), En.exports;
|
|
6044
6046
|
}
|
|
6045
|
-
var Rn,
|
|
6047
|
+
var Rn, Ci;
|
|
6046
6048
|
function Vd() {
|
|
6047
|
-
if (
|
|
6049
|
+
if (Ci)
|
|
6048
6050
|
return Rn;
|
|
6049
|
-
|
|
6051
|
+
Ci = 1;
|
|
6050
6052
|
var e = Object.getOwnPropertySymbols, t = Object.prototype.hasOwnProperty, n = Object.prototype.propertyIsEnumerable;
|
|
6051
|
-
function r(
|
|
6052
|
-
if (
|
|
6053
|
+
function r(i) {
|
|
6054
|
+
if (i == null)
|
|
6053
6055
|
throw new TypeError("Object.assign cannot be called with null or undefined");
|
|
6054
|
-
return Object(
|
|
6056
|
+
return Object(i);
|
|
6055
6057
|
}
|
|
6056
|
-
function
|
|
6058
|
+
function s() {
|
|
6057
6059
|
try {
|
|
6058
6060
|
if (!Object.assign)
|
|
6059
6061
|
return !1;
|
|
6060
|
-
var
|
|
6061
|
-
if (
|
|
6062
|
+
var i = new String("abc");
|
|
6063
|
+
if (i[5] = "de", Object.getOwnPropertyNames(i)[0] === "5")
|
|
6062
6064
|
return !1;
|
|
6063
6065
|
for (var o = {}, l = 0; l < 10; l++)
|
|
6064
6066
|
o["_" + String.fromCharCode(l)] = l;
|
|
@@ -6075,8 +6077,8 @@ function Vd() {
|
|
|
6075
6077
|
return !1;
|
|
6076
6078
|
}
|
|
6077
6079
|
}
|
|
6078
|
-
return Rn =
|
|
6079
|
-
for (var l, a = r(
|
|
6080
|
+
return Rn = s() ? Object.assign : function(i, o) {
|
|
6081
|
+
for (var l, a = r(i), u, c = 1; c < arguments.length; c++) {
|
|
6080
6082
|
l = Object(arguments[c]);
|
|
6081
6083
|
for (var f in l)
|
|
6082
6084
|
t.call(l, f) && (a[f] = l[f]);
|
|
@@ -6089,29 +6091,29 @@ function Vd() {
|
|
|
6089
6091
|
return a;
|
|
6090
6092
|
}, Rn;
|
|
6091
6093
|
}
|
|
6092
|
-
var An,
|
|
6094
|
+
var An, Ei;
|
|
6093
6095
|
function Fr() {
|
|
6094
|
-
if (
|
|
6096
|
+
if (Ei)
|
|
6095
6097
|
return An;
|
|
6096
|
-
|
|
6098
|
+
Ei = 1;
|
|
6097
6099
|
var e = "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";
|
|
6098
6100
|
return An = e, An;
|
|
6099
6101
|
}
|
|
6100
|
-
var jn,
|
|
6102
|
+
var jn, Ri;
|
|
6101
6103
|
function fa() {
|
|
6102
|
-
return
|
|
6104
|
+
return Ri || (Ri = 1, jn = Function.call.bind(Object.prototype.hasOwnProperty)), jn;
|
|
6103
6105
|
}
|
|
6104
|
-
var Mn,
|
|
6106
|
+
var Mn, Ai;
|
|
6105
6107
|
function Dd() {
|
|
6106
|
-
if (
|
|
6108
|
+
if (Ai)
|
|
6107
6109
|
return Mn;
|
|
6108
|
-
|
|
6110
|
+
Ai = 1;
|
|
6109
6111
|
var e = function() {
|
|
6110
6112
|
};
|
|
6111
6113
|
if (process.env.NODE_ENV !== "production") {
|
|
6112
6114
|
var t = Fr(), n = {}, r = fa();
|
|
6113
|
-
e = function(
|
|
6114
|
-
var o = "Warning: " +
|
|
6115
|
+
e = function(i) {
|
|
6116
|
+
var o = "Warning: " + i;
|
|
6115
6117
|
typeof console < "u" && console.error(o);
|
|
6116
6118
|
try {
|
|
6117
6119
|
throw new Error(o);
|
|
@@ -6119,19 +6121,19 @@ function Dd() {
|
|
|
6119
6121
|
}
|
|
6120
6122
|
};
|
|
6121
6123
|
}
|
|
6122
|
-
function i
|
|
6124
|
+
function s(i, o, l, a, u) {
|
|
6123
6125
|
if (process.env.NODE_ENV !== "production") {
|
|
6124
|
-
for (var c in
|
|
6125
|
-
if (r(
|
|
6126
|
+
for (var c in i)
|
|
6127
|
+
if (r(i, c)) {
|
|
6126
6128
|
var f;
|
|
6127
6129
|
try {
|
|
6128
|
-
if (typeof
|
|
6130
|
+
if (typeof i[c] != "function") {
|
|
6129
6131
|
var h = Error(
|
|
6130
|
-
(a || "React class") + ": " + l + " type `" + c + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof
|
|
6132
|
+
(a || "React class") + ": " + l + " type `" + c + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof i[c] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`."
|
|
6131
6133
|
);
|
|
6132
6134
|
throw h.name = "Invariant Violation", h;
|
|
6133
6135
|
}
|
|
6134
|
-
f =
|
|
6136
|
+
f = i[c](o, c, a, l, null, t);
|
|
6135
6137
|
} catch (x) {
|
|
6136
6138
|
f = x;
|
|
6137
6139
|
}
|
|
@@ -6147,18 +6149,18 @@ function Dd() {
|
|
|
6147
6149
|
}
|
|
6148
6150
|
}
|
|
6149
6151
|
}
|
|
6150
|
-
return
|
|
6152
|
+
return s.resetWarningCache = function() {
|
|
6151
6153
|
process.env.NODE_ENV !== "production" && (n = {});
|
|
6152
|
-
}, Mn =
|
|
6154
|
+
}, Mn = s, Mn;
|
|
6153
6155
|
}
|
|
6154
|
-
var Vn,
|
|
6156
|
+
var Vn, ji;
|
|
6155
6157
|
function Od() {
|
|
6156
|
-
if (
|
|
6158
|
+
if (ji)
|
|
6157
6159
|
return Vn;
|
|
6158
|
-
|
|
6159
|
-
var e = ua(), t = Vd(), n = Fr(), r = fa(),
|
|
6160
|
+
ji = 1;
|
|
6161
|
+
var e = ua(), t = Vd(), n = Fr(), r = fa(), s = Dd(), i = function() {
|
|
6160
6162
|
};
|
|
6161
|
-
process.env.NODE_ENV !== "production" && (
|
|
6163
|
+
process.env.NODE_ENV !== "production" && (i = function(l) {
|
|
6162
6164
|
var a = "Warning: " + l;
|
|
6163
6165
|
typeof console < "u" && console.error(a);
|
|
6164
6166
|
try {
|
|
@@ -6216,7 +6218,7 @@ function Od() {
|
|
|
6216
6218
|
throw R.name = "Invariant Violation", R;
|
|
6217
6219
|
} else if (process.env.NODE_ENV !== "production" && typeof console < "u") {
|
|
6218
6220
|
var Se = $ + ":" + N;
|
|
6219
|
-
!w[Se] && j < 3 && (
|
|
6221
|
+
!w[Se] && j < 3 && (i(
|
|
6220
6222
|
"You are manually calling a React.PropTypes validation function for the `" + U + "` prop on `" + $ + "`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."
|
|
6221
6223
|
), w[Se] = !0, j++);
|
|
6222
6224
|
}
|
|
@@ -6295,9 +6297,9 @@ function Od() {
|
|
|
6295
6297
|
}
|
|
6296
6298
|
function B(v) {
|
|
6297
6299
|
if (!Array.isArray(v))
|
|
6298
|
-
return process.env.NODE_ENV !== "production" && (arguments.length > 1 ?
|
|
6300
|
+
return process.env.NODE_ENV !== "production" && (arguments.length > 1 ? i(
|
|
6299
6301
|
"Invalid arguments supplied to oneOf, expected an array, got " + arguments.length + " arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."
|
|
6300
|
-
) :
|
|
6302
|
+
) : i("Invalid argument supplied to oneOf, expected an array.")), o;
|
|
6301
6303
|
function w(j, k, D, O, _) {
|
|
6302
6304
|
for (var N = j[k], $ = 0; $ < v.length; $++)
|
|
6303
6305
|
if (x(N, v[$]))
|
|
@@ -6329,11 +6331,11 @@ function Od() {
|
|
|
6329
6331
|
}
|
|
6330
6332
|
function H(v) {
|
|
6331
6333
|
if (!Array.isArray(v))
|
|
6332
|
-
return process.env.NODE_ENV !== "production" &&
|
|
6334
|
+
return process.env.NODE_ENV !== "production" && i("Invalid argument supplied to oneOfType, expected an instance of array."), o;
|
|
6333
6335
|
for (var w = 0; w < v.length; w++) {
|
|
6334
6336
|
var j = v[w];
|
|
6335
6337
|
if (typeof j != "function")
|
|
6336
|
-
return
|
|
6338
|
+
return i(
|
|
6337
6339
|
"Invalid argument supplied to oneOfType. Expected an array of check functions, but received " + le(j) + " at index " + w + "."
|
|
6338
6340
|
), o;
|
|
6339
6341
|
}
|
|
@@ -6469,14 +6471,14 @@ Valid keys: ` + JSON.stringify(Object.keys(v), null, " ")
|
|
|
6469
6471
|
function Pe(v) {
|
|
6470
6472
|
return !v.constructor || !v.constructor.name ? h : v.constructor.name;
|
|
6471
6473
|
}
|
|
6472
|
-
return g.checkPropTypes =
|
|
6474
|
+
return g.checkPropTypes = s, g.resetWarningCache = s.resetWarningCache, g.PropTypes = g, g;
|
|
6473
6475
|
}, Vn;
|
|
6474
6476
|
}
|
|
6475
|
-
var Dn,
|
|
6477
|
+
var Dn, Mi;
|
|
6476
6478
|
function Ld() {
|
|
6477
|
-
if (
|
|
6479
|
+
if (Mi)
|
|
6478
6480
|
return Dn;
|
|
6479
|
-
|
|
6481
|
+
Mi = 1;
|
|
6480
6482
|
var e = Fr();
|
|
6481
6483
|
function t() {
|
|
6482
6484
|
}
|
|
@@ -6492,10 +6494,10 @@ function Ld() {
|
|
|
6492
6494
|
}
|
|
6493
6495
|
}
|
|
6494
6496
|
r.isRequired = r;
|
|
6495
|
-
function
|
|
6497
|
+
function s() {
|
|
6496
6498
|
return r;
|
|
6497
6499
|
}
|
|
6498
|
-
var
|
|
6500
|
+
var i = {
|
|
6499
6501
|
array: r,
|
|
6500
6502
|
bigint: r,
|
|
6501
6503
|
bool: r,
|
|
@@ -6505,20 +6507,20 @@ function Ld() {
|
|
|
6505
6507
|
string: r,
|
|
6506
6508
|
symbol: r,
|
|
6507
6509
|
any: r,
|
|
6508
|
-
arrayOf:
|
|
6510
|
+
arrayOf: s,
|
|
6509
6511
|
element: r,
|
|
6510
6512
|
elementType: r,
|
|
6511
|
-
instanceOf:
|
|
6513
|
+
instanceOf: s,
|
|
6512
6514
|
node: r,
|
|
6513
|
-
objectOf:
|
|
6514
|
-
oneOf:
|
|
6515
|
-
oneOfType:
|
|
6516
|
-
shape:
|
|
6517
|
-
exact:
|
|
6515
|
+
objectOf: s,
|
|
6516
|
+
oneOf: s,
|
|
6517
|
+
oneOfType: s,
|
|
6518
|
+
shape: s,
|
|
6519
|
+
exact: s,
|
|
6518
6520
|
checkPropTypes: n,
|
|
6519
6521
|
resetWarningCache: t
|
|
6520
6522
|
};
|
|
6521
|
-
return
|
|
6523
|
+
return i.PropTypes = i, i;
|
|
6522
6524
|
}, Dn;
|
|
6523
6525
|
}
|
|
6524
6526
|
if (process.env.NODE_ENV !== "production") {
|
|
@@ -6539,29 +6541,29 @@ function Hn() {
|
|
|
6539
6541
|
function Id(e, t) {
|
|
6540
6542
|
if (e == null)
|
|
6541
6543
|
return {};
|
|
6542
|
-
var n = Fd(e, t), r,
|
|
6544
|
+
var n = Fd(e, t), r, s;
|
|
6543
6545
|
if (Object.getOwnPropertySymbols) {
|
|
6544
|
-
var
|
|
6545
|
-
for (
|
|
6546
|
-
r = s
|
|
6546
|
+
var i = Object.getOwnPropertySymbols(e);
|
|
6547
|
+
for (s = 0; s < i.length; s++)
|
|
6548
|
+
r = i[s], !(t.indexOf(r) >= 0) && Object.prototype.propertyIsEnumerable.call(e, r) && (n[r] = e[r]);
|
|
6547
6549
|
}
|
|
6548
6550
|
return n;
|
|
6549
6551
|
}
|
|
6550
6552
|
function Fd(e, t) {
|
|
6551
6553
|
if (e == null)
|
|
6552
6554
|
return {};
|
|
6553
|
-
var n = {}, r = Object.keys(e),
|
|
6554
|
-
for (
|
|
6555
|
-
|
|
6555
|
+
var n = {}, r = Object.keys(e), s, i;
|
|
6556
|
+
for (i = 0; i < r.length; i++)
|
|
6557
|
+
s = r[i], !(t.indexOf(s) >= 0) && (n[s] = e[s]);
|
|
6556
6558
|
return n;
|
|
6557
6559
|
}
|
|
6558
6560
|
var Nr = Ot(function(e, t) {
|
|
6559
|
-
var n = e.color, r = n === void 0 ? "currentColor" : n,
|
|
6561
|
+
var n = e.color, r = n === void 0 ? "currentColor" : n, s = e.size, i = s === void 0 ? 24 : s, o = Id(e, ["color", "size"]);
|
|
6560
6562
|
return /* @__PURE__ */ Te.createElement("svg", Hn({
|
|
6561
6563
|
ref: t,
|
|
6562
6564
|
xmlns: "http://www.w3.org/2000/svg",
|
|
6563
|
-
width:
|
|
6564
|
-
height:
|
|
6565
|
+
width: i,
|
|
6566
|
+
height: i,
|
|
6565
6567
|
viewBox: "0 0 24 24",
|
|
6566
6568
|
fill: "none",
|
|
6567
6569
|
stroke: r,
|
|
@@ -6591,29 +6593,29 @@ function Xn() {
|
|
|
6591
6593
|
function Bd(e, t) {
|
|
6592
6594
|
if (e == null)
|
|
6593
6595
|
return {};
|
|
6594
|
-
var n = $d(e, t), r,
|
|
6596
|
+
var n = $d(e, t), r, s;
|
|
6595
6597
|
if (Object.getOwnPropertySymbols) {
|
|
6596
|
-
var
|
|
6597
|
-
for (
|
|
6598
|
-
r = s
|
|
6598
|
+
var i = Object.getOwnPropertySymbols(e);
|
|
6599
|
+
for (s = 0; s < i.length; s++)
|
|
6600
|
+
r = i[s], !(t.indexOf(r) >= 0) && Object.prototype.propertyIsEnumerable.call(e, r) && (n[r] = e[r]);
|
|
6599
6601
|
}
|
|
6600
6602
|
return n;
|
|
6601
6603
|
}
|
|
6602
6604
|
function $d(e, t) {
|
|
6603
6605
|
if (e == null)
|
|
6604
6606
|
return {};
|
|
6605
|
-
var n = {}, r = Object.keys(e),
|
|
6606
|
-
for (
|
|
6607
|
-
|
|
6607
|
+
var n = {}, r = Object.keys(e), s, i;
|
|
6608
|
+
for (i = 0; i < r.length; i++)
|
|
6609
|
+
s = r[i], !(t.indexOf(s) >= 0) && (n[s] = e[s]);
|
|
6608
6610
|
return n;
|
|
6609
6611
|
}
|
|
6610
6612
|
var Br = Ot(function(e, t) {
|
|
6611
|
-
var n = e.color, r = n === void 0 ? "currentColor" : n,
|
|
6613
|
+
var n = e.color, r = n === void 0 ? "currentColor" : n, s = e.size, i = s === void 0 ? 24 : s, o = Bd(e, ["color", "size"]);
|
|
6612
6614
|
return /* @__PURE__ */ Te.createElement("svg", Xn({
|
|
6613
6615
|
ref: t,
|
|
6614
6616
|
xmlns: "http://www.w3.org/2000/svg",
|
|
6615
|
-
width:
|
|
6616
|
-
height:
|
|
6617
|
+
width: i,
|
|
6618
|
+
height: i,
|
|
6617
6619
|
viewBox: "0 0 24 24",
|
|
6618
6620
|
fill: "none",
|
|
6619
6621
|
stroke: r,
|
|
@@ -6650,29 +6652,29 @@ function Zn() {
|
|
|
6650
6652
|
function Wd(e, t) {
|
|
6651
6653
|
if (e == null)
|
|
6652
6654
|
return {};
|
|
6653
|
-
var n = zd(e, t), r,
|
|
6655
|
+
var n = zd(e, t), r, s;
|
|
6654
6656
|
if (Object.getOwnPropertySymbols) {
|
|
6655
|
-
var
|
|
6656
|
-
for (
|
|
6657
|
-
r = s
|
|
6657
|
+
var i = Object.getOwnPropertySymbols(e);
|
|
6658
|
+
for (s = 0; s < i.length; s++)
|
|
6659
|
+
r = i[s], !(t.indexOf(r) >= 0) && Object.prototype.propertyIsEnumerable.call(e, r) && (n[r] = e[r]);
|
|
6658
6660
|
}
|
|
6659
6661
|
return n;
|
|
6660
6662
|
}
|
|
6661
6663
|
function zd(e, t) {
|
|
6662
6664
|
if (e == null)
|
|
6663
6665
|
return {};
|
|
6664
|
-
var n = {}, r = Object.keys(e),
|
|
6665
|
-
for (
|
|
6666
|
-
|
|
6666
|
+
var n = {}, r = Object.keys(e), s, i;
|
|
6667
|
+
for (i = 0; i < r.length; i++)
|
|
6668
|
+
s = r[i], !(t.indexOf(s) >= 0) && (n[s] = e[s]);
|
|
6667
6669
|
return n;
|
|
6668
6670
|
}
|
|
6669
6671
|
var $r = Ot(function(e, t) {
|
|
6670
|
-
var n = e.color, r = n === void 0 ? "currentColor" : n,
|
|
6672
|
+
var n = e.color, r = n === void 0 ? "currentColor" : n, s = e.size, i = s === void 0 ? 24 : s, o = Wd(e, ["color", "size"]);
|
|
6671
6673
|
return /* @__PURE__ */ Te.createElement("svg", Zn({
|
|
6672
6674
|
ref: t,
|
|
6673
6675
|
xmlns: "http://www.w3.org/2000/svg",
|
|
6674
|
-
width:
|
|
6675
|
-
height:
|
|
6676
|
+
width: i,
|
|
6677
|
+
height: i,
|
|
6676
6678
|
viewBox: "0 0 24 24",
|
|
6677
6679
|
fill: "none",
|
|
6678
6680
|
stroke: r,
|
|
@@ -6704,29 +6706,29 @@ function Jn() {
|
|
|
6704
6706
|
function Kd(e, t) {
|
|
6705
6707
|
if (e == null)
|
|
6706
6708
|
return {};
|
|
6707
|
-
var n = Gd(e, t), r,
|
|
6709
|
+
var n = Gd(e, t), r, s;
|
|
6708
6710
|
if (Object.getOwnPropertySymbols) {
|
|
6709
|
-
var
|
|
6710
|
-
for (
|
|
6711
|
-
r = s
|
|
6711
|
+
var i = Object.getOwnPropertySymbols(e);
|
|
6712
|
+
for (s = 0; s < i.length; s++)
|
|
6713
|
+
r = i[s], !(t.indexOf(r) >= 0) && Object.prototype.propertyIsEnumerable.call(e, r) && (n[r] = e[r]);
|
|
6712
6714
|
}
|
|
6713
6715
|
return n;
|
|
6714
6716
|
}
|
|
6715
6717
|
function Gd(e, t) {
|
|
6716
6718
|
if (e == null)
|
|
6717
6719
|
return {};
|
|
6718
|
-
var n = {}, r = Object.keys(e),
|
|
6719
|
-
for (
|
|
6720
|
-
|
|
6720
|
+
var n = {}, r = Object.keys(e), s, i;
|
|
6721
|
+
for (i = 0; i < r.length; i++)
|
|
6722
|
+
s = r[i], !(t.indexOf(s) >= 0) && (n[s] = e[s]);
|
|
6721
6723
|
return n;
|
|
6722
6724
|
}
|
|
6723
6725
|
var Ur = Ot(function(e, t) {
|
|
6724
|
-
var n = e.color, r = n === void 0 ? "currentColor" : n,
|
|
6726
|
+
var n = e.color, r = n === void 0 ? "currentColor" : n, s = e.size, i = s === void 0 ? 24 : s, o = Kd(e, ["color", "size"]);
|
|
6725
6727
|
return /* @__PURE__ */ Te.createElement("svg", Jn({
|
|
6726
6728
|
ref: t,
|
|
6727
6729
|
xmlns: "http://www.w3.org/2000/svg",
|
|
6728
|
-
width:
|
|
6729
|
-
height:
|
|
6730
|
+
width: i,
|
|
6731
|
+
height: i,
|
|
6730
6732
|
viewBox: "0 0 24 24",
|
|
6731
6733
|
fill: "none",
|
|
6732
6734
|
stroke: r,
|
|
@@ -6749,8 +6751,8 @@ const qd = Ur, Hd = ({
|
|
|
6749
6751
|
messages: t,
|
|
6750
6752
|
updateMessages: n,
|
|
6751
6753
|
onMessageSent: r,
|
|
6752
|
-
onEditMessage:
|
|
6753
|
-
onDeleteMessage:
|
|
6754
|
+
onEditMessage: s,
|
|
6755
|
+
onDeleteMessage: i
|
|
6754
6756
|
}) => {
|
|
6755
6757
|
const o = he(null), [l, a] = xe(!1), [u, c] = xe(null), [f, h] = xe(null), g = () => {
|
|
6756
6758
|
setTimeout(() => {
|
|
@@ -6785,21 +6787,23 @@ const qd = Ur, Hd = ({
|
|
|
6785
6787
|
});
|
|
6786
6788
|
n([...t, A]), r(A), g();
|
|
6787
6789
|
}, b = (p) => {
|
|
6788
|
-
const A = new dn({
|
|
6790
|
+
const A = URL.createObjectURL(p), B = new dn({
|
|
6789
6791
|
id: new Date().toString(),
|
|
6790
6792
|
text: "",
|
|
6791
|
-
|
|
6793
|
+
attachmentUrl: A,
|
|
6792
6794
|
attachmentType: Le.Voice,
|
|
6795
|
+
attachmentBlob: p,
|
|
6793
6796
|
user: e,
|
|
6794
6797
|
isRightSided: !0,
|
|
6795
6798
|
createdDate: new Date().toString()
|
|
6796
6799
|
});
|
|
6797
|
-
n([...t,
|
|
6800
|
+
n([...t, B]), r(B), g();
|
|
6798
6801
|
}, S = (p, A) => {
|
|
6799
6802
|
const B = URL.createObjectURL(p), M = new dn({
|
|
6800
6803
|
id: new Date().toString(),
|
|
6801
6804
|
text: "",
|
|
6802
|
-
|
|
6805
|
+
attachmentUrl: B,
|
|
6806
|
+
attachmentBlob: p,
|
|
6803
6807
|
attachmentType: A,
|
|
6804
6808
|
user: e,
|
|
6805
6809
|
isRightSided: !0,
|
|
@@ -6809,7 +6813,7 @@ const qd = Ur, Hd = ({
|
|
|
6809
6813
|
};
|
|
6810
6814
|
return {
|
|
6811
6815
|
handleDeleteConfirmation: () => {
|
|
6812
|
-
u && (
|
|
6816
|
+
u && (i(u), c(null)), a(!1);
|
|
6813
6817
|
},
|
|
6814
6818
|
handleCloseContextMenu: y,
|
|
6815
6819
|
contextMenuItems: [
|
|
@@ -6818,7 +6822,7 @@ const qd = Ur, Hd = ({
|
|
|
6818
6822
|
icon: /* @__PURE__ */ m.exports.jsx(Yd, { className: "text-gray-600" }),
|
|
6819
6823
|
onlyCurrentUserMessage: !0,
|
|
6820
6824
|
onClick: (p) => {
|
|
6821
|
-
console.log("Edit clicked"), y(),
|
|
6825
|
+
console.log("Edit clicked"), y(), s(p);
|
|
6822
6826
|
}
|
|
6823
6827
|
},
|
|
6824
6828
|
{
|
|
@@ -6860,8 +6864,8 @@ const qd = Ur, Hd = ({
|
|
|
6860
6864
|
height: t = "600px",
|
|
6861
6865
|
isLoadingChat: n,
|
|
6862
6866
|
className: r,
|
|
6863
|
-
style:
|
|
6864
|
-
messages:
|
|
6867
|
+
style: s,
|
|
6868
|
+
messages: i,
|
|
6865
6869
|
user: o,
|
|
6866
6870
|
updateMessages: l,
|
|
6867
6871
|
onMessageSent: a,
|
|
@@ -6885,7 +6889,7 @@ const qd = Ur, Hd = ({
|
|
|
6885
6889
|
setIsModalOpen: B
|
|
6886
6890
|
} = Hd({
|
|
6887
6891
|
user: o,
|
|
6888
|
-
messages:
|
|
6892
|
+
messages: i,
|
|
6889
6893
|
updateMessages: l,
|
|
6890
6894
|
onMessageSent: a,
|
|
6891
6895
|
onEditMessage: c,
|
|
@@ -6899,7 +6903,7 @@ const qd = Ur, Hd = ({
|
|
|
6899
6903
|
width: e,
|
|
6900
6904
|
height: t,
|
|
6901
6905
|
background: "url(" + h + ")",
|
|
6902
|
-
...
|
|
6906
|
+
...s
|
|
6903
6907
|
},
|
|
6904
6908
|
onClick: x,
|
|
6905
6909
|
children: [
|
|
@@ -6908,12 +6912,12 @@ const qd = Ur, Hd = ({
|
|
|
6908
6912
|
{
|
|
6909
6913
|
ref: A,
|
|
6910
6914
|
className: `flex flex-col gap-2 flex-1 p-3 pb-16 ${p ? "overflow-hidden pr-[22px]" : "overflow-y-scroll"}`,
|
|
6911
|
-
children: n ? /* @__PURE__ */ m.exports.jsx(ca, { className: "mt-3", size: 27, color: "text-gray-800" }) : /* @__PURE__ */ m.exports.jsx(
|
|
6915
|
+
children: n ? /* @__PURE__ */ m.exports.jsx(ca, { className: "mt-3", size: 27, color: "text-gray-800" }) : /* @__PURE__ */ m.exports.jsx(ki, { children: i.length > 0 ? i.map((F, ne) => {
|
|
6912
6916
|
var te, ye, ae;
|
|
6913
|
-
const ge = F != null && F.
|
|
6917
|
+
const ge = F != null && F.attachmentUrl ? /* @__PURE__ */ m.exports.jsx(
|
|
6914
6918
|
Cd,
|
|
6915
6919
|
{
|
|
6916
|
-
|
|
6920
|
+
attachmentUrl: F.attachmentUrl,
|
|
6917
6921
|
attachmentType: F == null ? void 0 : F.attachmentType,
|
|
6918
6922
|
attachmentFormat: F == null ? void 0 : F.attachmentFormat
|
|
6919
6923
|
},
|
|
@@ -6929,7 +6933,7 @@ const qd = Ur, Hd = ({
|
|
|
6929
6933
|
},
|
|
6930
6934
|
ne
|
|
6931
6935
|
);
|
|
6932
|
-
const oe = ((ye = (te =
|
|
6936
|
+
const oe = ((ye = (te = i[ne - 1]) == null ? void 0 : te.user) == null ? void 0 : ye.id) !== ((ae = F == null ? void 0 : F.user) == null ? void 0 : ae.id);
|
|
6933
6937
|
return /* @__PURE__ */ m.exports.jsx(
|
|
6934
6938
|
Ed,
|
|
6935
6939
|
{
|