19082 lines
580 KiB
JavaScript
19082 lines
580 KiB
JavaScript
function rw(e, t) {
|
|
for (var n = 0; n < t.length; n++) {
|
|
const r = t[n];
|
|
if (typeof r != "string" && !Array.isArray(r)) {
|
|
for (const o in r)
|
|
if (o !== "default" && !(o in e)) {
|
|
const i = Object.getOwnPropertyDescriptor(r, o);
|
|
i && Object.defineProperty(e, o, i.get ? i : {
|
|
enumerable: !0,
|
|
get: () => r[o]
|
|
});
|
|
}
|
|
}
|
|
}
|
|
return Object.freeze(Object.defineProperty(e, Symbol.toStringTag, { value: "Module" }));
|
|
}
|
|
var Ds = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
function bf(e) {
|
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
}
|
|
var Hy = { exports: {} }, Dl = {}, Ky = { exports: {} }, W = {};
|
|
/**
|
|
* @license React
|
|
* react.production.min.js
|
|
*
|
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
*
|
|
* This source code is licensed under the MIT license found in the
|
|
* LICENSE file in the root directory of this source tree.
|
|
*/
|
|
var fs = Symbol.for("react.element"), ow = Symbol.for("react.portal"), iw = Symbol.for("react.fragment"), sw = Symbol.for("react.strict_mode"), aw = Symbol.for("react.profiler"), lw = Symbol.for("react.provider"), uw = Symbol.for("react.context"), cw = Symbol.for("react.forward_ref"), dw = Symbol.for("react.suspense"), fw = Symbol.for("react.memo"), hw = Symbol.for("react.lazy"), Dp = Symbol.iterator;
|
|
function pw(e) {
|
|
return e === null || typeof e != "object" ? null : (e = Dp && e[Dp] || e["@@iterator"], typeof e == "function" ? e : null);
|
|
}
|
|
var Gy = { isMounted: function() {
|
|
return !1;
|
|
}, enqueueForceUpdate: function() {
|
|
}, enqueueReplaceState: function() {
|
|
}, enqueueSetState: function() {
|
|
} }, Xy = Object.assign, Yy = {};
|
|
function Vo(e, t, n) {
|
|
this.props = e, this.context = t, this.refs = Yy, this.updater = n || Gy;
|
|
}
|
|
Vo.prototype.isReactComponent = {};
|
|
Vo.prototype.setState = function(e, t) {
|
|
if (typeof e != "object" && typeof e != "function" && e != null) throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");
|
|
this.updater.enqueueSetState(this, e, t, "setState");
|
|
};
|
|
Vo.prototype.forceUpdate = function(e) {
|
|
this.updater.enqueueForceUpdate(this, e, "forceUpdate");
|
|
};
|
|
function Qy() {
|
|
}
|
|
Qy.prototype = Vo.prototype;
|
|
function xf(e, t, n) {
|
|
this.props = e, this.context = t, this.refs = Yy, this.updater = n || Gy;
|
|
}
|
|
var wf = xf.prototype = new Qy();
|
|
wf.constructor = xf;
|
|
Xy(wf, Vo.prototype);
|
|
wf.isPureReactComponent = !0;
|
|
var Ip = Array.isArray, qy = Object.prototype.hasOwnProperty, kf = { current: null }, Zy = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
function Jy(e, t, n) {
|
|
var r, o = {}, i = null, s = null;
|
|
if (t != null) for (r in t.ref !== void 0 && (s = t.ref), t.key !== void 0 && (i = "" + t.key), t) qy.call(t, r) && !Zy.hasOwnProperty(r) && (o[r] = t[r]);
|
|
var a = arguments.length - 2;
|
|
if (a === 1) o.children = n;
|
|
else if (1 < a) {
|
|
for (var l = Array(a), u = 0; u < a; u++) l[u] = arguments[u + 2];
|
|
o.children = l;
|
|
}
|
|
if (e && e.defaultProps) for (r in a = e.defaultProps, a) o[r] === void 0 && (o[r] = a[r]);
|
|
return { $$typeof: fs, type: e, key: i, ref: s, props: o, _owner: kf.current };
|
|
}
|
|
function mw(e, t) {
|
|
return { $$typeof: fs, type: e.type, key: t, ref: e.ref, props: e.props, _owner: e._owner };
|
|
}
|
|
function Cf(e) {
|
|
return typeof e == "object" && e !== null && e.$$typeof === fs;
|
|
}
|
|
function gw(e) {
|
|
var t = { "=": "=0", ":": "=2" };
|
|
return "$" + e.replace(/[=:]/g, function(n) {
|
|
return t[n];
|
|
});
|
|
}
|
|
var Lp = /\/+/g;
|
|
function Du(e, t) {
|
|
return typeof e == "object" && e !== null && e.key != null ? gw("" + e.key) : t.toString(36);
|
|
}
|
|
function fa(e, t, n, r, o) {
|
|
var i = typeof e;
|
|
(i === "undefined" || i === "boolean") && (e = null);
|
|
var s = !1;
|
|
if (e === null) s = !0;
|
|
else switch (i) {
|
|
case "string":
|
|
case "number":
|
|
s = !0;
|
|
break;
|
|
case "object":
|
|
switch (e.$$typeof) {
|
|
case fs:
|
|
case ow:
|
|
s = !0;
|
|
}
|
|
}
|
|
if (s) return s = e, o = o(s), e = r === "" ? "." + Du(s, 0) : r, Ip(o) ? (n = "", e != null && (n = e.replace(Lp, "$&/") + "/"), fa(o, t, n, "", function(u) {
|
|
return u;
|
|
})) : o != null && (Cf(o) && (o = mw(o, n + (!o.key || s && s.key === o.key ? "" : ("" + o.key).replace(Lp, "$&/") + "/") + e)), t.push(o)), 1;
|
|
if (s = 0, r = r === "" ? "." : r + ":", Ip(e)) for (var a = 0; a < e.length; a++) {
|
|
i = e[a];
|
|
var l = r + Du(i, a);
|
|
s += fa(i, t, n, l, o);
|
|
}
|
|
else if (l = pw(e), typeof l == "function") for (e = l.call(e), a = 0; !(i = e.next()).done; ) i = i.value, l = r + Du(i, a++), s += fa(i, t, n, l, o);
|
|
else if (i === "object") throw t = String(e), Error("Objects are not valid as a React child (found: " + (t === "[object Object]" ? "object with keys {" + Object.keys(e).join(", ") + "}" : t) + "). If you meant to render a collection of children, use an array instead.");
|
|
return s;
|
|
}
|
|
function Is(e, t, n) {
|
|
if (e == null) return e;
|
|
var r = [], o = 0;
|
|
return fa(e, r, "", "", function(i) {
|
|
return t.call(n, i, o++);
|
|
}), r;
|
|
}
|
|
function yw(e) {
|
|
if (e._status === -1) {
|
|
var t = e._result;
|
|
t = t(), t.then(function(n) {
|
|
(e._status === 0 || e._status === -1) && (e._status = 1, e._result = n);
|
|
}, function(n) {
|
|
(e._status === 0 || e._status === -1) && (e._status = 2, e._result = n);
|
|
}), e._status === -1 && (e._status = 0, e._result = t);
|
|
}
|
|
if (e._status === 1) return e._result.default;
|
|
throw e._result;
|
|
}
|
|
var et = { current: null }, ha = { transition: null }, vw = { ReactCurrentDispatcher: et, ReactCurrentBatchConfig: ha, ReactCurrentOwner: kf };
|
|
function e0() {
|
|
throw Error("act(...) is not supported in production builds of React.");
|
|
}
|
|
W.Children = { map: Is, forEach: function(e, t, n) {
|
|
Is(e, function() {
|
|
t.apply(this, arguments);
|
|
}, n);
|
|
}, count: function(e) {
|
|
var t = 0;
|
|
return Is(e, function() {
|
|
t++;
|
|
}), t;
|
|
}, toArray: function(e) {
|
|
return Is(e, function(t) {
|
|
return t;
|
|
}) || [];
|
|
}, only: function(e) {
|
|
if (!Cf(e)) throw Error("React.Children.only expected to receive a single React element child.");
|
|
return e;
|
|
} };
|
|
W.Component = Vo;
|
|
W.Fragment = iw;
|
|
W.Profiler = aw;
|
|
W.PureComponent = xf;
|
|
W.StrictMode = sw;
|
|
W.Suspense = dw;
|
|
W.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = vw;
|
|
W.act = e0;
|
|
W.cloneElement = function(e, t, n) {
|
|
if (e == null) throw Error("React.cloneElement(...): The argument must be a React element, but you passed " + e + ".");
|
|
var r = Xy({}, e.props), o = e.key, i = e.ref, s = e._owner;
|
|
if (t != null) {
|
|
if (t.ref !== void 0 && (i = t.ref, s = kf.current), t.key !== void 0 && (o = "" + t.key), e.type && e.type.defaultProps) var a = e.type.defaultProps;
|
|
for (l in t) qy.call(t, l) && !Zy.hasOwnProperty(l) && (r[l] = t[l] === void 0 && a !== void 0 ? a[l] : t[l]);
|
|
}
|
|
var l = arguments.length - 2;
|
|
if (l === 1) r.children = n;
|
|
else if (1 < l) {
|
|
a = Array(l);
|
|
for (var u = 0; u < l; u++) a[u] = arguments[u + 2];
|
|
r.children = a;
|
|
}
|
|
return { $$typeof: fs, type: e.type, key: o, ref: i, props: r, _owner: s };
|
|
};
|
|
W.createContext = function(e) {
|
|
return e = { $$typeof: uw, _currentValue: e, _currentValue2: e, _threadCount: 0, Provider: null, Consumer: null, _defaultValue: null, _globalName: null }, e.Provider = { $$typeof: lw, _context: e }, e.Consumer = e;
|
|
};
|
|
W.createElement = Jy;
|
|
W.createFactory = function(e) {
|
|
var t = Jy.bind(null, e);
|
|
return t.type = e, t;
|
|
};
|
|
W.createRef = function() {
|
|
return { current: null };
|
|
};
|
|
W.forwardRef = function(e) {
|
|
return { $$typeof: cw, render: e };
|
|
};
|
|
W.isValidElement = Cf;
|
|
W.lazy = function(e) {
|
|
return { $$typeof: hw, _payload: { _status: -1, _result: e }, _init: yw };
|
|
};
|
|
W.memo = function(e, t) {
|
|
return { $$typeof: fw, type: e, compare: t === void 0 ? null : t };
|
|
};
|
|
W.startTransition = function(e) {
|
|
var t = ha.transition;
|
|
ha.transition = {};
|
|
try {
|
|
e();
|
|
} finally {
|
|
ha.transition = t;
|
|
}
|
|
};
|
|
W.unstable_act = e0;
|
|
W.useCallback = function(e, t) {
|
|
return et.current.useCallback(e, t);
|
|
};
|
|
W.useContext = function(e) {
|
|
return et.current.useContext(e);
|
|
};
|
|
W.useDebugValue = function() {
|
|
};
|
|
W.useDeferredValue = function(e) {
|
|
return et.current.useDeferredValue(e);
|
|
};
|
|
W.useEffect = function(e, t) {
|
|
return et.current.useEffect(e, t);
|
|
};
|
|
W.useId = function() {
|
|
return et.current.useId();
|
|
};
|
|
W.useImperativeHandle = function(e, t, n) {
|
|
return et.current.useImperativeHandle(e, t, n);
|
|
};
|
|
W.useInsertionEffect = function(e, t) {
|
|
return et.current.useInsertionEffect(e, t);
|
|
};
|
|
W.useLayoutEffect = function(e, t) {
|
|
return et.current.useLayoutEffect(e, t);
|
|
};
|
|
W.useMemo = function(e, t) {
|
|
return et.current.useMemo(e, t);
|
|
};
|
|
W.useReducer = function(e, t, n) {
|
|
return et.current.useReducer(e, t, n);
|
|
};
|
|
W.useRef = function(e) {
|
|
return et.current.useRef(e);
|
|
};
|
|
W.useState = function(e) {
|
|
return et.current.useState(e);
|
|
};
|
|
W.useSyncExternalStore = function(e, t, n) {
|
|
return et.current.useSyncExternalStore(e, t, n);
|
|
};
|
|
W.useTransition = function() {
|
|
return et.current.useTransition();
|
|
};
|
|
W.version = "18.3.1";
|
|
Ky.exports = W;
|
|
var C = Ky.exports;
|
|
const Sw = /* @__PURE__ */ bf(C), Vp = /* @__PURE__ */ rw({
|
|
__proto__: null,
|
|
default: Sw
|
|
}, [C]);
|
|
/**
|
|
* @license React
|
|
* react-jsx-runtime.production.min.js
|
|
*
|
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
*
|
|
* This source code is licensed under the MIT license found in the
|
|
* LICENSE file in the root directory of this source tree.
|
|
*/
|
|
var bw = C, xw = Symbol.for("react.element"), ww = Symbol.for("react.fragment"), kw = Object.prototype.hasOwnProperty, Cw = bw.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, Tw = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
function t0(e, t, n) {
|
|
var r, o = {}, i = null, s = null;
|
|
n !== void 0 && (i = "" + n), t.key !== void 0 && (i = "" + t.key), t.ref !== void 0 && (s = t.ref);
|
|
for (r in t) kw.call(t, r) && !Tw.hasOwnProperty(r) && (o[r] = t[r]);
|
|
if (e && e.defaultProps) for (r in t = e.defaultProps, t) o[r] === void 0 && (o[r] = t[r]);
|
|
return { $$typeof: xw, type: e, key: i, ref: s, props: o, _owner: Cw.current };
|
|
}
|
|
Dl.Fragment = ww;
|
|
Dl.jsx = t0;
|
|
Dl.jsxs = t0;
|
|
Hy.exports = Dl;
|
|
var M = Hy.exports, n0 = { exports: {} }, St = {}, r0 = { exports: {} }, o0 = {};
|
|
/**
|
|
* @license React
|
|
* scheduler.production.min.js
|
|
*
|
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
*
|
|
* This source code is licensed under the MIT license found in the
|
|
* LICENSE file in the root directory of this source tree.
|
|
*/
|
|
(function(e) {
|
|
function t(z, B) {
|
|
var O = z.length;
|
|
z.push(B);
|
|
e: for (; 0 < O; ) {
|
|
var J = O - 1 >>> 1, Se = z[J];
|
|
if (0 < o(Se, B)) z[J] = B, z[O] = Se, O = J;
|
|
else break e;
|
|
}
|
|
}
|
|
function n(z) {
|
|
return z.length === 0 ? null : z[0];
|
|
}
|
|
function r(z) {
|
|
if (z.length === 0) return null;
|
|
var B = z[0], O = z.pop();
|
|
if (O !== B) {
|
|
z[0] = O;
|
|
e: for (var J = 0, Se = z.length, ee = Se >>> 1; J < ee; ) {
|
|
var Gt = 2 * (J + 1) - 1, Ho = z[Gt], dt = Gt + 1, sr = z[dt];
|
|
if (0 > o(Ho, O)) dt < Se && 0 > o(sr, Ho) ? (z[J] = sr, z[dt] = O, J = dt) : (z[J] = Ho, z[Gt] = O, J = Gt);
|
|
else if (dt < Se && 0 > o(sr, O)) z[J] = sr, z[dt] = O, J = dt;
|
|
else break e;
|
|
}
|
|
}
|
|
return B;
|
|
}
|
|
function o(z, B) {
|
|
var O = z.sortIndex - B.sortIndex;
|
|
return O !== 0 ? O : z.id - B.id;
|
|
}
|
|
if (typeof performance == "object" && typeof performance.now == "function") {
|
|
var i = performance;
|
|
e.unstable_now = function() {
|
|
return i.now();
|
|
};
|
|
} else {
|
|
var s = Date, a = s.now();
|
|
e.unstable_now = function() {
|
|
return s.now() - a;
|
|
};
|
|
}
|
|
var l = [], u = [], c = 1, d = null, f = 3, y = !1, v = !1, S = !1, k = typeof setTimeout == "function" ? setTimeout : null, p = typeof clearTimeout == "function" ? clearTimeout : null, h = typeof setImmediate < "u" ? setImmediate : null;
|
|
typeof navigator < "u" && navigator.scheduling !== void 0 && navigator.scheduling.isInputPending !== void 0 && navigator.scheduling.isInputPending.bind(navigator.scheduling);
|
|
function g(z) {
|
|
for (var B = n(u); B !== null; ) {
|
|
if (B.callback === null) r(u);
|
|
else if (B.startTime <= z) r(u), B.sortIndex = B.expirationTime, t(l, B);
|
|
else break;
|
|
B = n(u);
|
|
}
|
|
}
|
|
function w(z) {
|
|
if (S = !1, g(z), !v) if (n(l) !== null) v = !0, Oe(E);
|
|
else {
|
|
var B = n(u);
|
|
B !== null && Fr(w, B.startTime - z);
|
|
}
|
|
}
|
|
function E(z, B) {
|
|
v = !1, S && (S = !1, p($), $ = -1), y = !0;
|
|
var O = f;
|
|
try {
|
|
for (g(B), d = n(l); d !== null && (!(d.expirationTime > B) || z && !N()); ) {
|
|
var J = d.callback;
|
|
if (typeof J == "function") {
|
|
d.callback = null, f = d.priorityLevel;
|
|
var Se = J(d.expirationTime <= B);
|
|
B = e.unstable_now(), typeof Se == "function" ? d.callback = Se : d === n(l) && r(l), g(B);
|
|
} else r(l);
|
|
d = n(l);
|
|
}
|
|
if (d !== null) var ee = !0;
|
|
else {
|
|
var Gt = n(u);
|
|
Gt !== null && Fr(w, Gt.startTime - B), ee = !1;
|
|
}
|
|
return ee;
|
|
} finally {
|
|
d = null, f = O, y = !1;
|
|
}
|
|
}
|
|
var _ = !1, P = null, $ = -1, V = 5, A = -1;
|
|
function N() {
|
|
return !(e.unstable_now() - A < V);
|
|
}
|
|
function le() {
|
|
if (P !== null) {
|
|
var z = e.unstable_now();
|
|
A = z;
|
|
var B = !0;
|
|
try {
|
|
B = P(!0, z);
|
|
} finally {
|
|
B ? De() : (_ = !1, P = null);
|
|
}
|
|
} else _ = !1;
|
|
}
|
|
var De;
|
|
if (typeof h == "function") De = function() {
|
|
h(le);
|
|
};
|
|
else if (typeof MessageChannel < "u") {
|
|
var Ge = new MessageChannel(), ct = Ge.port2;
|
|
Ge.port1.onmessage = le, De = function() {
|
|
ct.postMessage(null);
|
|
};
|
|
} else De = function() {
|
|
k(le, 0);
|
|
};
|
|
function Oe(z) {
|
|
P = z, _ || (_ = !0, De());
|
|
}
|
|
function Fr(z, B) {
|
|
$ = k(function() {
|
|
z(e.unstable_now());
|
|
}, B);
|
|
}
|
|
e.unstable_IdlePriority = 5, e.unstable_ImmediatePriority = 1, e.unstable_LowPriority = 4, e.unstable_NormalPriority = 3, e.unstable_Profiling = null, e.unstable_UserBlockingPriority = 2, e.unstable_cancelCallback = function(z) {
|
|
z.callback = null;
|
|
}, e.unstable_continueExecution = function() {
|
|
v || y || (v = !0, Oe(E));
|
|
}, e.unstable_forceFrameRate = function(z) {
|
|
0 > z || 125 < z ? console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported") : V = 0 < z ? Math.floor(1e3 / z) : 5;
|
|
}, e.unstable_getCurrentPriorityLevel = function() {
|
|
return f;
|
|
}, e.unstable_getFirstCallbackNode = function() {
|
|
return n(l);
|
|
}, e.unstable_next = function(z) {
|
|
switch (f) {
|
|
case 1:
|
|
case 2:
|
|
case 3:
|
|
var B = 3;
|
|
break;
|
|
default:
|
|
B = f;
|
|
}
|
|
var O = f;
|
|
f = B;
|
|
try {
|
|
return z();
|
|
} finally {
|
|
f = O;
|
|
}
|
|
}, e.unstable_pauseExecution = function() {
|
|
}, e.unstable_requestPaint = function() {
|
|
}, e.unstable_runWithPriority = function(z, B) {
|
|
switch (z) {
|
|
case 1:
|
|
case 2:
|
|
case 3:
|
|
case 4:
|
|
case 5:
|
|
break;
|
|
default:
|
|
z = 3;
|
|
}
|
|
var O = f;
|
|
f = z;
|
|
try {
|
|
return B();
|
|
} finally {
|
|
f = O;
|
|
}
|
|
}, e.unstable_scheduleCallback = function(z, B, O) {
|
|
var J = e.unstable_now();
|
|
switch (typeof O == "object" && O !== null ? (O = O.delay, O = typeof O == "number" && 0 < O ? J + O : J) : O = J, z) {
|
|
case 1:
|
|
var Se = -1;
|
|
break;
|
|
case 2:
|
|
Se = 250;
|
|
break;
|
|
case 5:
|
|
Se = 1073741823;
|
|
break;
|
|
case 4:
|
|
Se = 1e4;
|
|
break;
|
|
default:
|
|
Se = 5e3;
|
|
}
|
|
return Se = O + Se, z = { id: c++, callback: B, priorityLevel: z, startTime: O, expirationTime: Se, sortIndex: -1 }, O > J ? (z.sortIndex = O, t(u, z), n(l) === null && z === n(u) && (S ? (p($), $ = -1) : S = !0, Fr(w, O - J))) : (z.sortIndex = Se, t(l, z), v || y || (v = !0, Oe(E))), z;
|
|
}, e.unstable_shouldYield = N, e.unstable_wrapCallback = function(z) {
|
|
var B = f;
|
|
return function() {
|
|
var O = f;
|
|
f = B;
|
|
try {
|
|
return z.apply(this, arguments);
|
|
} finally {
|
|
f = O;
|
|
}
|
|
};
|
|
};
|
|
})(o0);
|
|
r0.exports = o0;
|
|
var Pw = r0.exports;
|
|
/**
|
|
* @license React
|
|
* react-dom.production.min.js
|
|
*
|
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
*
|
|
* This source code is licensed under the MIT license found in the
|
|
* LICENSE file in the root directory of this source tree.
|
|
*/
|
|
var Ew = C, vt = Pw;
|
|
function R(e) {
|
|
for (var t = "https://reactjs.org/docs/error-decoder.html?invariant=" + e, n = 1; n < arguments.length; n++) t += "&args[]=" + encodeURIComponent(arguments[n]);
|
|
return "Minified React error #" + e + "; visit " + t + " for the full message or use the non-minified dev environment for full errors and additional helpful warnings.";
|
|
}
|
|
var i0 = /* @__PURE__ */ new Set(), Fi = {};
|
|
function Ir(e, t) {
|
|
Co(e, t), Co(e + "Capture", t);
|
|
}
|
|
function Co(e, t) {
|
|
for (Fi[e] = t, e = 0; e < t.length; e++) i0.add(t[e]);
|
|
}
|
|
var Pn = !(typeof window > "u" || typeof window.document > "u" || typeof window.document.createElement > "u"), Oc = Object.prototype.hasOwnProperty, _w = /^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/, Bp = {}, Fp = {};
|
|
function $w(e) {
|
|
return Oc.call(Fp, e) ? !0 : Oc.call(Bp, e) ? !1 : _w.test(e) ? Fp[e] = !0 : (Bp[e] = !0, !1);
|
|
}
|
|
function Aw(e, t, n, r) {
|
|
if (n !== null && n.type === 0) return !1;
|
|
switch (typeof t) {
|
|
case "function":
|
|
case "symbol":
|
|
return !0;
|
|
case "boolean":
|
|
return r ? !1 : n !== null ? !n.acceptsBooleans : (e = e.toLowerCase().slice(0, 5), e !== "data-" && e !== "aria-");
|
|
default:
|
|
return !1;
|
|
}
|
|
}
|
|
function Rw(e, t, n, r) {
|
|
if (t === null || typeof t > "u" || Aw(e, t, n, r)) return !0;
|
|
if (r) return !1;
|
|
if (n !== null) switch (n.type) {
|
|
case 3:
|
|
return !t;
|
|
case 4:
|
|
return t === !1;
|
|
case 5:
|
|
return isNaN(t);
|
|
case 6:
|
|
return isNaN(t) || 1 > t;
|
|
}
|
|
return !1;
|
|
}
|
|
function tt(e, t, n, r, o, i, s) {
|
|
this.acceptsBooleans = t === 2 || t === 3 || t === 4, this.attributeName = r, this.attributeNamespace = o, this.mustUseProperty = n, this.propertyName = e, this.type = t, this.sanitizeURL = i, this.removeEmptyString = s;
|
|
}
|
|
var je = {};
|
|
"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e) {
|
|
je[e] = new tt(e, 0, !1, e, null, !1, !1);
|
|
});
|
|
[["acceptCharset", "accept-charset"], ["className", "class"], ["htmlFor", "for"], ["httpEquiv", "http-equiv"]].forEach(function(e) {
|
|
var t = e[0];
|
|
je[t] = new tt(t, 1, !1, e[1], null, !1, !1);
|
|
});
|
|
["contentEditable", "draggable", "spellCheck", "value"].forEach(function(e) {
|
|
je[e] = new tt(e, 2, !1, e.toLowerCase(), null, !1, !1);
|
|
});
|
|
["autoReverse", "externalResourcesRequired", "focusable", "preserveAlpha"].forEach(function(e) {
|
|
je[e] = new tt(e, 2, !1, e, null, !1, !1);
|
|
});
|
|
"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e) {
|
|
je[e] = new tt(e, 3, !1, e.toLowerCase(), null, !1, !1);
|
|
});
|
|
["checked", "multiple", "muted", "selected"].forEach(function(e) {
|
|
je[e] = new tt(e, 3, !0, e, null, !1, !1);
|
|
});
|
|
["capture", "download"].forEach(function(e) {
|
|
je[e] = new tt(e, 4, !1, e, null, !1, !1);
|
|
});
|
|
["cols", "rows", "size", "span"].forEach(function(e) {
|
|
je[e] = new tt(e, 6, !1, e, null, !1, !1);
|
|
});
|
|
["rowSpan", "start"].forEach(function(e) {
|
|
je[e] = new tt(e, 5, !1, e.toLowerCase(), null, !1, !1);
|
|
});
|
|
var Tf = /[\-:]([a-z])/g;
|
|
function Pf(e) {
|
|
return e[1].toUpperCase();
|
|
}
|
|
"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e) {
|
|
var t = e.replace(
|
|
Tf,
|
|
Pf
|
|
);
|
|
je[t] = new tt(t, 1, !1, e, null, !1, !1);
|
|
});
|
|
"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e) {
|
|
var t = e.replace(Tf, Pf);
|
|
je[t] = new tt(t, 1, !1, e, "http://www.w3.org/1999/xlink", !1, !1);
|
|
});
|
|
["xml:base", "xml:lang", "xml:space"].forEach(function(e) {
|
|
var t = e.replace(Tf, Pf);
|
|
je[t] = new tt(t, 1, !1, e, "http://www.w3.org/XML/1998/namespace", !1, !1);
|
|
});
|
|
["tabIndex", "crossOrigin"].forEach(function(e) {
|
|
je[e] = new tt(e, 1, !1, e.toLowerCase(), null, !1, !1);
|
|
});
|
|
je.xlinkHref = new tt("xlinkHref", 1, !1, "xlink:href", "http://www.w3.org/1999/xlink", !0, !1);
|
|
["src", "href", "action", "formAction"].forEach(function(e) {
|
|
je[e] = new tt(e, 1, !1, e.toLowerCase(), null, !0, !0);
|
|
});
|
|
function Ef(e, t, n, r) {
|
|
var o = je.hasOwnProperty(t) ? je[t] : null;
|
|
(o !== null ? o.type !== 0 : r || !(2 < t.length) || t[0] !== "o" && t[0] !== "O" || t[1] !== "n" && t[1] !== "N") && (Rw(t, n, o, r) && (n = null), r || o === null ? $w(t) && (n === null ? e.removeAttribute(t) : e.setAttribute(t, "" + n)) : o.mustUseProperty ? e[o.propertyName] = n === null ? o.type === 3 ? !1 : "" : n : (t = o.attributeName, r = o.attributeNamespace, n === null ? e.removeAttribute(t) : (o = o.type, n = o === 3 || o === 4 && n === !0 ? "" : "" + n, r ? e.setAttributeNS(r, t, n) : e.setAttribute(t, n))));
|
|
}
|
|
var Rn = Ew.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED, Ls = Symbol.for("react.element"), Hr = Symbol.for("react.portal"), Kr = Symbol.for("react.fragment"), _f = Symbol.for("react.strict_mode"), Nc = Symbol.for("react.profiler"), s0 = Symbol.for("react.provider"), a0 = Symbol.for("react.context"), $f = Symbol.for("react.forward_ref"), Wc = Symbol.for("react.suspense"), Uc = Symbol.for("react.suspense_list"), Af = Symbol.for("react.memo"), Ln = Symbol.for("react.lazy"), l0 = Symbol.for("react.offscreen"), jp = Symbol.iterator;
|
|
function Qo(e) {
|
|
return e === null || typeof e != "object" ? null : (e = jp && e[jp] || e["@@iterator"], typeof e == "function" ? e : null);
|
|
}
|
|
var ve = Object.assign, Iu;
|
|
function ui(e) {
|
|
if (Iu === void 0) try {
|
|
throw Error();
|
|
} catch (n) {
|
|
var t = n.stack.trim().match(/\n( *(at )?)/);
|
|
Iu = t && t[1] || "";
|
|
}
|
|
return `
|
|
` + Iu + e;
|
|
}
|
|
var Lu = !1;
|
|
function Vu(e, t) {
|
|
if (!e || Lu) return "";
|
|
Lu = !0;
|
|
var n = Error.prepareStackTrace;
|
|
Error.prepareStackTrace = void 0;
|
|
try {
|
|
if (t) if (t = function() {
|
|
throw Error();
|
|
}, Object.defineProperty(t.prototype, "props", { set: function() {
|
|
throw Error();
|
|
} }), typeof Reflect == "object" && Reflect.construct) {
|
|
try {
|
|
Reflect.construct(t, []);
|
|
} catch (u) {
|
|
var r = u;
|
|
}
|
|
Reflect.construct(e, [], t);
|
|
} else {
|
|
try {
|
|
t.call();
|
|
} catch (u) {
|
|
r = u;
|
|
}
|
|
e.call(t.prototype);
|
|
}
|
|
else {
|
|
try {
|
|
throw Error();
|
|
} catch (u) {
|
|
r = u;
|
|
}
|
|
e();
|
|
}
|
|
} catch (u) {
|
|
if (u && r && typeof u.stack == "string") {
|
|
for (var o = u.stack.split(`
|
|
`), i = r.stack.split(`
|
|
`), s = o.length - 1, a = i.length - 1; 1 <= s && 0 <= a && o[s] !== i[a]; ) a--;
|
|
for (; 1 <= s && 0 <= a; s--, a--) if (o[s] !== i[a]) {
|
|
if (s !== 1 || a !== 1)
|
|
do
|
|
if (s--, a--, 0 > a || o[s] !== i[a]) {
|
|
var l = `
|
|
` + o[s].replace(" at new ", " at ");
|
|
return e.displayName && l.includes("<anonymous>") && (l = l.replace("<anonymous>", e.displayName)), l;
|
|
}
|
|
while (1 <= s && 0 <= a);
|
|
break;
|
|
}
|
|
}
|
|
} finally {
|
|
Lu = !1, Error.prepareStackTrace = n;
|
|
}
|
|
return (e = e ? e.displayName || e.name : "") ? ui(e) : "";
|
|
}
|
|
function zw(e) {
|
|
switch (e.tag) {
|
|
case 5:
|
|
return ui(e.type);
|
|
case 16:
|
|
return ui("Lazy");
|
|
case 13:
|
|
return ui("Suspense");
|
|
case 19:
|
|
return ui("SuspenseList");
|
|
case 0:
|
|
case 2:
|
|
case 15:
|
|
return e = Vu(e.type, !1), e;
|
|
case 11:
|
|
return e = Vu(e.type.render, !1), e;
|
|
case 1:
|
|
return e = Vu(e.type, !0), e;
|
|
default:
|
|
return "";
|
|
}
|
|
}
|
|
function Hc(e) {
|
|
if (e == null) return null;
|
|
if (typeof e == "function") return e.displayName || e.name || null;
|
|
if (typeof e == "string") return e;
|
|
switch (e) {
|
|
case Kr:
|
|
return "Fragment";
|
|
case Hr:
|
|
return "Portal";
|
|
case Nc:
|
|
return "Profiler";
|
|
case _f:
|
|
return "StrictMode";
|
|
case Wc:
|
|
return "Suspense";
|
|
case Uc:
|
|
return "SuspenseList";
|
|
}
|
|
if (typeof e == "object") switch (e.$$typeof) {
|
|
case a0:
|
|
return (e.displayName || "Context") + ".Consumer";
|
|
case s0:
|
|
return (e._context.displayName || "Context") + ".Provider";
|
|
case $f:
|
|
var t = e.render;
|
|
return e = e.displayName, e || (e = t.displayName || t.name || "", e = e !== "" ? "ForwardRef(" + e + ")" : "ForwardRef"), e;
|
|
case Af:
|
|
return t = e.displayName || null, t !== null ? t : Hc(e.type) || "Memo";
|
|
case Ln:
|
|
t = e._payload, e = e._init;
|
|
try {
|
|
return Hc(e(t));
|
|
} catch {
|
|
}
|
|
}
|
|
return null;
|
|
}
|
|
function Mw(e) {
|
|
var t = e.type;
|
|
switch (e.tag) {
|
|
case 24:
|
|
return "Cache";
|
|
case 9:
|
|
return (t.displayName || "Context") + ".Consumer";
|
|
case 10:
|
|
return (t._context.displayName || "Context") + ".Provider";
|
|
case 18:
|
|
return "DehydratedFragment";
|
|
case 11:
|
|
return e = t.render, e = e.displayName || e.name || "", t.displayName || (e !== "" ? "ForwardRef(" + e + ")" : "ForwardRef");
|
|
case 7:
|
|
return "Fragment";
|
|
case 5:
|
|
return t;
|
|
case 4:
|
|
return "Portal";
|
|
case 3:
|
|
return "Root";
|
|
case 6:
|
|
return "Text";
|
|
case 16:
|
|
return Hc(t);
|
|
case 8:
|
|
return t === _f ? "StrictMode" : "Mode";
|
|
case 22:
|
|
return "Offscreen";
|
|
case 12:
|
|
return "Profiler";
|
|
case 21:
|
|
return "Scope";
|
|
case 13:
|
|
return "Suspense";
|
|
case 19:
|
|
return "SuspenseList";
|
|
case 25:
|
|
return "TracingMarker";
|
|
case 1:
|
|
case 0:
|
|
case 17:
|
|
case 2:
|
|
case 14:
|
|
case 15:
|
|
if (typeof t == "function") return t.displayName || t.name || null;
|
|
if (typeof t == "string") return t;
|
|
}
|
|
return null;
|
|
}
|
|
function Zn(e) {
|
|
switch (typeof e) {
|
|
case "boolean":
|
|
case "number":
|
|
case "string":
|
|
case "undefined":
|
|
return e;
|
|
case "object":
|
|
return e;
|
|
default:
|
|
return "";
|
|
}
|
|
}
|
|
function u0(e) {
|
|
var t = e.type;
|
|
return (e = e.nodeName) && e.toLowerCase() === "input" && (t === "checkbox" || t === "radio");
|
|
}
|
|
function Dw(e) {
|
|
var t = u0(e) ? "checked" : "value", n = Object.getOwnPropertyDescriptor(e.constructor.prototype, t), r = "" + e[t];
|
|
if (!e.hasOwnProperty(t) && typeof n < "u" && typeof n.get == "function" && typeof n.set == "function") {
|
|
var o = n.get, i = n.set;
|
|
return Object.defineProperty(e, t, { configurable: !0, get: function() {
|
|
return o.call(this);
|
|
}, set: function(s) {
|
|
r = "" + s, i.call(this, s);
|
|
} }), Object.defineProperty(e, t, { enumerable: n.enumerable }), { getValue: function() {
|
|
return r;
|
|
}, setValue: function(s) {
|
|
r = "" + s;
|
|
}, stopTracking: function() {
|
|
e._valueTracker = null, delete e[t];
|
|
} };
|
|
}
|
|
}
|
|
function Vs(e) {
|
|
e._valueTracker || (e._valueTracker = Dw(e));
|
|
}
|
|
function c0(e) {
|
|
if (!e) return !1;
|
|
var t = e._valueTracker;
|
|
if (!t) return !0;
|
|
var n = t.getValue(), r = "";
|
|
return e && (r = u0(e) ? e.checked ? "true" : "false" : e.value), e = r, e !== n ? (t.setValue(e), !0) : !1;
|
|
}
|
|
function Ka(e) {
|
|
if (e = e || (typeof document < "u" ? document : void 0), typeof e > "u") return null;
|
|
try {
|
|
return e.activeElement || e.body;
|
|
} catch {
|
|
return e.body;
|
|
}
|
|
}
|
|
function Kc(e, t) {
|
|
var n = t.checked;
|
|
return ve({}, t, { defaultChecked: void 0, defaultValue: void 0, value: void 0, checked: n ?? e._wrapperState.initialChecked });
|
|
}
|
|
function Op(e, t) {
|
|
var n = t.defaultValue == null ? "" : t.defaultValue, r = t.checked != null ? t.checked : t.defaultChecked;
|
|
n = Zn(t.value != null ? t.value : n), e._wrapperState = { initialChecked: r, initialValue: n, controlled: t.type === "checkbox" || t.type === "radio" ? t.checked != null : t.value != null };
|
|
}
|
|
function d0(e, t) {
|
|
t = t.checked, t != null && Ef(e, "checked", t, !1);
|
|
}
|
|
function Gc(e, t) {
|
|
d0(e, t);
|
|
var n = Zn(t.value), r = t.type;
|
|
if (n != null) r === "number" ? (n === 0 && e.value === "" || e.value != n) && (e.value = "" + n) : e.value !== "" + n && (e.value = "" + n);
|
|
else if (r === "submit" || r === "reset") {
|
|
e.removeAttribute("value");
|
|
return;
|
|
}
|
|
t.hasOwnProperty("value") ? Xc(e, t.type, n) : t.hasOwnProperty("defaultValue") && Xc(e, t.type, Zn(t.defaultValue)), t.checked == null && t.defaultChecked != null && (e.defaultChecked = !!t.defaultChecked);
|
|
}
|
|
function Np(e, t, n) {
|
|
if (t.hasOwnProperty("value") || t.hasOwnProperty("defaultValue")) {
|
|
var r = t.type;
|
|
if (!(r !== "submit" && r !== "reset" || t.value !== void 0 && t.value !== null)) return;
|
|
t = "" + e._wrapperState.initialValue, n || t === e.value || (e.value = t), e.defaultValue = t;
|
|
}
|
|
n = e.name, n !== "" && (e.name = ""), e.defaultChecked = !!e._wrapperState.initialChecked, n !== "" && (e.name = n);
|
|
}
|
|
function Xc(e, t, n) {
|
|
(t !== "number" || Ka(e.ownerDocument) !== e) && (n == null ? e.defaultValue = "" + e._wrapperState.initialValue : e.defaultValue !== "" + n && (e.defaultValue = "" + n));
|
|
}
|
|
var ci = Array.isArray;
|
|
function ho(e, t, n, r) {
|
|
if (e = e.options, t) {
|
|
t = {};
|
|
for (var o = 0; o < n.length; o++) t["$" + n[o]] = !0;
|
|
for (n = 0; n < e.length; n++) o = t.hasOwnProperty("$" + e[n].value), e[n].selected !== o && (e[n].selected = o), o && r && (e[n].defaultSelected = !0);
|
|
} else {
|
|
for (n = "" + Zn(n), t = null, o = 0; o < e.length; o++) {
|
|
if (e[o].value === n) {
|
|
e[o].selected = !0, r && (e[o].defaultSelected = !0);
|
|
return;
|
|
}
|
|
t !== null || e[o].disabled || (t = e[o]);
|
|
}
|
|
t !== null && (t.selected = !0);
|
|
}
|
|
}
|
|
function Yc(e, t) {
|
|
if (t.dangerouslySetInnerHTML != null) throw Error(R(91));
|
|
return ve({}, t, { value: void 0, defaultValue: void 0, children: "" + e._wrapperState.initialValue });
|
|
}
|
|
function Wp(e, t) {
|
|
var n = t.value;
|
|
if (n == null) {
|
|
if (n = t.children, t = t.defaultValue, n != null) {
|
|
if (t != null) throw Error(R(92));
|
|
if (ci(n)) {
|
|
if (1 < n.length) throw Error(R(93));
|
|
n = n[0];
|
|
}
|
|
t = n;
|
|
}
|
|
t == null && (t = ""), n = t;
|
|
}
|
|
e._wrapperState = { initialValue: Zn(n) };
|
|
}
|
|
function f0(e, t) {
|
|
var n = Zn(t.value), r = Zn(t.defaultValue);
|
|
n != null && (n = "" + n, n !== e.value && (e.value = n), t.defaultValue == null && e.defaultValue !== n && (e.defaultValue = n)), r != null && (e.defaultValue = "" + r);
|
|
}
|
|
function Up(e) {
|
|
var t = e.textContent;
|
|
t === e._wrapperState.initialValue && t !== "" && t !== null && (e.value = t);
|
|
}
|
|
function h0(e) {
|
|
switch (e) {
|
|
case "svg":
|
|
return "http://www.w3.org/2000/svg";
|
|
case "math":
|
|
return "http://www.w3.org/1998/Math/MathML";
|
|
default:
|
|
return "http://www.w3.org/1999/xhtml";
|
|
}
|
|
}
|
|
function Qc(e, t) {
|
|
return e == null || e === "http://www.w3.org/1999/xhtml" ? h0(t) : e === "http://www.w3.org/2000/svg" && t === "foreignObject" ? "http://www.w3.org/1999/xhtml" : e;
|
|
}
|
|
var Bs, p0 = function(e) {
|
|
return typeof MSApp < "u" && MSApp.execUnsafeLocalFunction ? function(t, n, r, o) {
|
|
MSApp.execUnsafeLocalFunction(function() {
|
|
return e(t, n, r, o);
|
|
});
|
|
} : e;
|
|
}(function(e, t) {
|
|
if (e.namespaceURI !== "http://www.w3.org/2000/svg" || "innerHTML" in e) e.innerHTML = t;
|
|
else {
|
|
for (Bs = Bs || document.createElement("div"), Bs.innerHTML = "<svg>" + t.valueOf().toString() + "</svg>", t = Bs.firstChild; e.firstChild; ) e.removeChild(e.firstChild);
|
|
for (; t.firstChild; ) e.appendChild(t.firstChild);
|
|
}
|
|
});
|
|
function ji(e, t) {
|
|
if (t) {
|
|
var n = e.firstChild;
|
|
if (n && n === e.lastChild && n.nodeType === 3) {
|
|
n.nodeValue = t;
|
|
return;
|
|
}
|
|
}
|
|
e.textContent = t;
|
|
}
|
|
var Si = {
|
|
animationIterationCount: !0,
|
|
aspectRatio: !0,
|
|
borderImageOutset: !0,
|
|
borderImageSlice: !0,
|
|
borderImageWidth: !0,
|
|
boxFlex: !0,
|
|
boxFlexGroup: !0,
|
|
boxOrdinalGroup: !0,
|
|
columnCount: !0,
|
|
columns: !0,
|
|
flex: !0,
|
|
flexGrow: !0,
|
|
flexPositive: !0,
|
|
flexShrink: !0,
|
|
flexNegative: !0,
|
|
flexOrder: !0,
|
|
gridArea: !0,
|
|
gridRow: !0,
|
|
gridRowEnd: !0,
|
|
gridRowSpan: !0,
|
|
gridRowStart: !0,
|
|
gridColumn: !0,
|
|
gridColumnEnd: !0,
|
|
gridColumnSpan: !0,
|
|
gridColumnStart: !0,
|
|
fontWeight: !0,
|
|
lineClamp: !0,
|
|
lineHeight: !0,
|
|
opacity: !0,
|
|
order: !0,
|
|
orphans: !0,
|
|
tabSize: !0,
|
|
widows: !0,
|
|
zIndex: !0,
|
|
zoom: !0,
|
|
fillOpacity: !0,
|
|
floodOpacity: !0,
|
|
stopOpacity: !0,
|
|
strokeDasharray: !0,
|
|
strokeDashoffset: !0,
|
|
strokeMiterlimit: !0,
|
|
strokeOpacity: !0,
|
|
strokeWidth: !0
|
|
}, Iw = ["Webkit", "ms", "Moz", "O"];
|
|
Object.keys(Si).forEach(function(e) {
|
|
Iw.forEach(function(t) {
|
|
t = t + e.charAt(0).toUpperCase() + e.substring(1), Si[t] = Si[e];
|
|
});
|
|
});
|
|
function m0(e, t, n) {
|
|
return t == null || typeof t == "boolean" || t === "" ? "" : n || typeof t != "number" || t === 0 || Si.hasOwnProperty(e) && Si[e] ? ("" + t).trim() : t + "px";
|
|
}
|
|
function g0(e, t) {
|
|
e = e.style;
|
|
for (var n in t) if (t.hasOwnProperty(n)) {
|
|
var r = n.indexOf("--") === 0, o = m0(n, t[n], r);
|
|
n === "float" && (n = "cssFloat"), r ? e.setProperty(n, o) : e[n] = o;
|
|
}
|
|
}
|
|
var Lw = ve({ menuitem: !0 }, { area: !0, base: !0, br: !0, col: !0, embed: !0, hr: !0, img: !0, input: !0, keygen: !0, link: !0, meta: !0, param: !0, source: !0, track: !0, wbr: !0 });
|
|
function qc(e, t) {
|
|
if (t) {
|
|
if (Lw[e] && (t.children != null || t.dangerouslySetInnerHTML != null)) throw Error(R(137, e));
|
|
if (t.dangerouslySetInnerHTML != null) {
|
|
if (t.children != null) throw Error(R(60));
|
|
if (typeof t.dangerouslySetInnerHTML != "object" || !("__html" in t.dangerouslySetInnerHTML)) throw Error(R(61));
|
|
}
|
|
if (t.style != null && typeof t.style != "object") throw Error(R(62));
|
|
}
|
|
}
|
|
function Zc(e, t) {
|
|
if (e.indexOf("-") === -1) return typeof t.is == "string";
|
|
switch (e) {
|
|
case "annotation-xml":
|
|
case "color-profile":
|
|
case "font-face":
|
|
case "font-face-src":
|
|
case "font-face-uri":
|
|
case "font-face-format":
|
|
case "font-face-name":
|
|
case "missing-glyph":
|
|
return !1;
|
|
default:
|
|
return !0;
|
|
}
|
|
}
|
|
var Jc = null;
|
|
function Rf(e) {
|
|
return e = e.target || e.srcElement || window, e.correspondingUseElement && (e = e.correspondingUseElement), e.nodeType === 3 ? e.parentNode : e;
|
|
}
|
|
var ed = null, po = null, mo = null;
|
|
function Hp(e) {
|
|
if (e = ms(e)) {
|
|
if (typeof ed != "function") throw Error(R(280));
|
|
var t = e.stateNode;
|
|
t && (t = Fl(t), ed(e.stateNode, e.type, t));
|
|
}
|
|
}
|
|
function y0(e) {
|
|
po ? mo ? mo.push(e) : mo = [e] : po = e;
|
|
}
|
|
function v0() {
|
|
if (po) {
|
|
var e = po, t = mo;
|
|
if (mo = po = null, Hp(e), t) for (e = 0; e < t.length; e++) Hp(t[e]);
|
|
}
|
|
}
|
|
function S0(e, t) {
|
|
return e(t);
|
|
}
|
|
function b0() {
|
|
}
|
|
var Bu = !1;
|
|
function x0(e, t, n) {
|
|
if (Bu) return e(t, n);
|
|
Bu = !0;
|
|
try {
|
|
return S0(e, t, n);
|
|
} finally {
|
|
Bu = !1, (po !== null || mo !== null) && (b0(), v0());
|
|
}
|
|
}
|
|
function Oi(e, t) {
|
|
var n = e.stateNode;
|
|
if (n === null) return null;
|
|
var r = Fl(n);
|
|
if (r === null) return null;
|
|
n = r[t];
|
|
e: switch (t) {
|
|
case "onClick":
|
|
case "onClickCapture":
|
|
case "onDoubleClick":
|
|
case "onDoubleClickCapture":
|
|
case "onMouseDown":
|
|
case "onMouseDownCapture":
|
|
case "onMouseMove":
|
|
case "onMouseMoveCapture":
|
|
case "onMouseUp":
|
|
case "onMouseUpCapture":
|
|
case "onMouseEnter":
|
|
(r = !r.disabled) || (e = e.type, r = !(e === "button" || e === "input" || e === "select" || e === "textarea")), e = !r;
|
|
break e;
|
|
default:
|
|
e = !1;
|
|
}
|
|
if (e) return null;
|
|
if (n && typeof n != "function") throw Error(R(231, t, typeof n));
|
|
return n;
|
|
}
|
|
var td = !1;
|
|
if (Pn) try {
|
|
var qo = {};
|
|
Object.defineProperty(qo, "passive", { get: function() {
|
|
td = !0;
|
|
} }), window.addEventListener("test", qo, qo), window.removeEventListener("test", qo, qo);
|
|
} catch {
|
|
td = !1;
|
|
}
|
|
function Vw(e, t, n, r, o, i, s, a, l) {
|
|
var u = Array.prototype.slice.call(arguments, 3);
|
|
try {
|
|
t.apply(n, u);
|
|
} catch (c) {
|
|
this.onError(c);
|
|
}
|
|
}
|
|
var bi = !1, Ga = null, Xa = !1, nd = null, Bw = { onError: function(e) {
|
|
bi = !0, Ga = e;
|
|
} };
|
|
function Fw(e, t, n, r, o, i, s, a, l) {
|
|
bi = !1, Ga = null, Vw.apply(Bw, arguments);
|
|
}
|
|
function jw(e, t, n, r, o, i, s, a, l) {
|
|
if (Fw.apply(this, arguments), bi) {
|
|
if (bi) {
|
|
var u = Ga;
|
|
bi = !1, Ga = null;
|
|
} else throw Error(R(198));
|
|
Xa || (Xa = !0, nd = u);
|
|
}
|
|
}
|
|
function Lr(e) {
|
|
var t = e, n = e;
|
|
if (e.alternate) for (; t.return; ) t = t.return;
|
|
else {
|
|
e = t;
|
|
do
|
|
t = e, t.flags & 4098 && (n = t.return), e = t.return;
|
|
while (e);
|
|
}
|
|
return t.tag === 3 ? n : null;
|
|
}
|
|
function w0(e) {
|
|
if (e.tag === 13) {
|
|
var t = e.memoizedState;
|
|
if (t === null && (e = e.alternate, e !== null && (t = e.memoizedState)), t !== null) return t.dehydrated;
|
|
}
|
|
return null;
|
|
}
|
|
function Kp(e) {
|
|
if (Lr(e) !== e) throw Error(R(188));
|
|
}
|
|
function Ow(e) {
|
|
var t = e.alternate;
|
|
if (!t) {
|
|
if (t = Lr(e), t === null) throw Error(R(188));
|
|
return t !== e ? null : e;
|
|
}
|
|
for (var n = e, r = t; ; ) {
|
|
var o = n.return;
|
|
if (o === null) break;
|
|
var i = o.alternate;
|
|
if (i === null) {
|
|
if (r = o.return, r !== null) {
|
|
n = r;
|
|
continue;
|
|
}
|
|
break;
|
|
}
|
|
if (o.child === i.child) {
|
|
for (i = o.child; i; ) {
|
|
if (i === n) return Kp(o), e;
|
|
if (i === r) return Kp(o), t;
|
|
i = i.sibling;
|
|
}
|
|
throw Error(R(188));
|
|
}
|
|
if (n.return !== r.return) n = o, r = i;
|
|
else {
|
|
for (var s = !1, a = o.child; a; ) {
|
|
if (a === n) {
|
|
s = !0, n = o, r = i;
|
|
break;
|
|
}
|
|
if (a === r) {
|
|
s = !0, r = o, n = i;
|
|
break;
|
|
}
|
|
a = a.sibling;
|
|
}
|
|
if (!s) {
|
|
for (a = i.child; a; ) {
|
|
if (a === n) {
|
|
s = !0, n = i, r = o;
|
|
break;
|
|
}
|
|
if (a === r) {
|
|
s = !0, r = i, n = o;
|
|
break;
|
|
}
|
|
a = a.sibling;
|
|
}
|
|
if (!s) throw Error(R(189));
|
|
}
|
|
}
|
|
if (n.alternate !== r) throw Error(R(190));
|
|
}
|
|
if (n.tag !== 3) throw Error(R(188));
|
|
return n.stateNode.current === n ? e : t;
|
|
}
|
|
function k0(e) {
|
|
return e = Ow(e), e !== null ? C0(e) : null;
|
|
}
|
|
function C0(e) {
|
|
if (e.tag === 5 || e.tag === 6) return e;
|
|
for (e = e.child; e !== null; ) {
|
|
var t = C0(e);
|
|
if (t !== null) return t;
|
|
e = e.sibling;
|
|
}
|
|
return null;
|
|
}
|
|
var T0 = vt.unstable_scheduleCallback, Gp = vt.unstable_cancelCallback, Nw = vt.unstable_shouldYield, Ww = vt.unstable_requestPaint, xe = vt.unstable_now, Uw = vt.unstable_getCurrentPriorityLevel, zf = vt.unstable_ImmediatePriority, P0 = vt.unstable_UserBlockingPriority, Ya = vt.unstable_NormalPriority, Hw = vt.unstable_LowPriority, E0 = vt.unstable_IdlePriority, Il = null, an = null;
|
|
function Kw(e) {
|
|
if (an && typeof an.onCommitFiberRoot == "function") try {
|
|
an.onCommitFiberRoot(Il, e, void 0, (e.current.flags & 128) === 128);
|
|
} catch {
|
|
}
|
|
}
|
|
var Nt = Math.clz32 ? Math.clz32 : Yw, Gw = Math.log, Xw = Math.LN2;
|
|
function Yw(e) {
|
|
return e >>>= 0, e === 0 ? 32 : 31 - (Gw(e) / Xw | 0) | 0;
|
|
}
|
|
var Fs = 64, js = 4194304;
|
|
function di(e) {
|
|
switch (e & -e) {
|
|
case 1:
|
|
return 1;
|
|
case 2:
|
|
return 2;
|
|
case 4:
|
|
return 4;
|
|
case 8:
|
|
return 8;
|
|
case 16:
|
|
return 16;
|
|
case 32:
|
|
return 32;
|
|
case 64:
|
|
case 128:
|
|
case 256:
|
|
case 512:
|
|
case 1024:
|
|
case 2048:
|
|
case 4096:
|
|
case 8192:
|
|
case 16384:
|
|
case 32768:
|
|
case 65536:
|
|
case 131072:
|
|
case 262144:
|
|
case 524288:
|
|
case 1048576:
|
|
case 2097152:
|
|
return e & 4194240;
|
|
case 4194304:
|
|
case 8388608:
|
|
case 16777216:
|
|
case 33554432:
|
|
case 67108864:
|
|
return e & 130023424;
|
|
case 134217728:
|
|
return 134217728;
|
|
case 268435456:
|
|
return 268435456;
|
|
case 536870912:
|
|
return 536870912;
|
|
case 1073741824:
|
|
return 1073741824;
|
|
default:
|
|
return e;
|
|
}
|
|
}
|
|
function Qa(e, t) {
|
|
var n = e.pendingLanes;
|
|
if (n === 0) return 0;
|
|
var r = 0, o = e.suspendedLanes, i = e.pingedLanes, s = n & 268435455;
|
|
if (s !== 0) {
|
|
var a = s & ~o;
|
|
a !== 0 ? r = di(a) : (i &= s, i !== 0 && (r = di(i)));
|
|
} else s = n & ~o, s !== 0 ? r = di(s) : i !== 0 && (r = di(i));
|
|
if (r === 0) return 0;
|
|
if (t !== 0 && t !== r && !(t & o) && (o = r & -r, i = t & -t, o >= i || o === 16 && (i & 4194240) !== 0)) return t;
|
|
if (r & 4 && (r |= n & 16), t = e.entangledLanes, t !== 0) for (e = e.entanglements, t &= r; 0 < t; ) n = 31 - Nt(t), o = 1 << n, r |= e[n], t &= ~o;
|
|
return r;
|
|
}
|
|
function Qw(e, t) {
|
|
switch (e) {
|
|
case 1:
|
|
case 2:
|
|
case 4:
|
|
return t + 250;
|
|
case 8:
|
|
case 16:
|
|
case 32:
|
|
case 64:
|
|
case 128:
|
|
case 256:
|
|
case 512:
|
|
case 1024:
|
|
case 2048:
|
|
case 4096:
|
|
case 8192:
|
|
case 16384:
|
|
case 32768:
|
|
case 65536:
|
|
case 131072:
|
|
case 262144:
|
|
case 524288:
|
|
case 1048576:
|
|
case 2097152:
|
|
return t + 5e3;
|
|
case 4194304:
|
|
case 8388608:
|
|
case 16777216:
|
|
case 33554432:
|
|
case 67108864:
|
|
return -1;
|
|
case 134217728:
|
|
case 268435456:
|
|
case 536870912:
|
|
case 1073741824:
|
|
return -1;
|
|
default:
|
|
return -1;
|
|
}
|
|
}
|
|
function qw(e, t) {
|
|
for (var n = e.suspendedLanes, r = e.pingedLanes, o = e.expirationTimes, i = e.pendingLanes; 0 < i; ) {
|
|
var s = 31 - Nt(i), a = 1 << s, l = o[s];
|
|
l === -1 ? (!(a & n) || a & r) && (o[s] = Qw(a, t)) : l <= t && (e.expiredLanes |= a), i &= ~a;
|
|
}
|
|
}
|
|
function rd(e) {
|
|
return e = e.pendingLanes & -1073741825, e !== 0 ? e : e & 1073741824 ? 1073741824 : 0;
|
|
}
|
|
function _0() {
|
|
var e = Fs;
|
|
return Fs <<= 1, !(Fs & 4194240) && (Fs = 64), e;
|
|
}
|
|
function Fu(e) {
|
|
for (var t = [], n = 0; 31 > n; n++) t.push(e);
|
|
return t;
|
|
}
|
|
function hs(e, t, n) {
|
|
e.pendingLanes |= t, t !== 536870912 && (e.suspendedLanes = 0, e.pingedLanes = 0), e = e.eventTimes, t = 31 - Nt(t), e[t] = n;
|
|
}
|
|
function Zw(e, t) {
|
|
var n = e.pendingLanes & ~t;
|
|
e.pendingLanes = t, e.suspendedLanes = 0, e.pingedLanes = 0, e.expiredLanes &= t, e.mutableReadLanes &= t, e.entangledLanes &= t, t = e.entanglements;
|
|
var r = e.eventTimes;
|
|
for (e = e.expirationTimes; 0 < n; ) {
|
|
var o = 31 - Nt(n), i = 1 << o;
|
|
t[o] = 0, r[o] = -1, e[o] = -1, n &= ~i;
|
|
}
|
|
}
|
|
function Mf(e, t) {
|
|
var n = e.entangledLanes |= t;
|
|
for (e = e.entanglements; n; ) {
|
|
var r = 31 - Nt(n), o = 1 << r;
|
|
o & t | e[r] & t && (e[r] |= t), n &= ~o;
|
|
}
|
|
}
|
|
var te = 0;
|
|
function $0(e) {
|
|
return e &= -e, 1 < e ? 4 < e ? e & 268435455 ? 16 : 536870912 : 4 : 1;
|
|
}
|
|
var A0, Df, R0, z0, M0, od = !1, Os = [], Un = null, Hn = null, Kn = null, Ni = /* @__PURE__ */ new Map(), Wi = /* @__PURE__ */ new Map(), Bn = [], Jw = "mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");
|
|
function Xp(e, t) {
|
|
switch (e) {
|
|
case "focusin":
|
|
case "focusout":
|
|
Un = null;
|
|
break;
|
|
case "dragenter":
|
|
case "dragleave":
|
|
Hn = null;
|
|
break;
|
|
case "mouseover":
|
|
case "mouseout":
|
|
Kn = null;
|
|
break;
|
|
case "pointerover":
|
|
case "pointerout":
|
|
Ni.delete(t.pointerId);
|
|
break;
|
|
case "gotpointercapture":
|
|
case "lostpointercapture":
|
|
Wi.delete(t.pointerId);
|
|
}
|
|
}
|
|
function Zo(e, t, n, r, o, i) {
|
|
return e === null || e.nativeEvent !== i ? (e = { blockedOn: t, domEventName: n, eventSystemFlags: r, nativeEvent: i, targetContainers: [o] }, t !== null && (t = ms(t), t !== null && Df(t)), e) : (e.eventSystemFlags |= r, t = e.targetContainers, o !== null && t.indexOf(o) === -1 && t.push(o), e);
|
|
}
|
|
function ek(e, t, n, r, o) {
|
|
switch (t) {
|
|
case "focusin":
|
|
return Un = Zo(Un, e, t, n, r, o), !0;
|
|
case "dragenter":
|
|
return Hn = Zo(Hn, e, t, n, r, o), !0;
|
|
case "mouseover":
|
|
return Kn = Zo(Kn, e, t, n, r, o), !0;
|
|
case "pointerover":
|
|
var i = o.pointerId;
|
|
return Ni.set(i, Zo(Ni.get(i) || null, e, t, n, r, o)), !0;
|
|
case "gotpointercapture":
|
|
return i = o.pointerId, Wi.set(i, Zo(Wi.get(i) || null, e, t, n, r, o)), !0;
|
|
}
|
|
return !1;
|
|
}
|
|
function D0(e) {
|
|
var t = mr(e.target);
|
|
if (t !== null) {
|
|
var n = Lr(t);
|
|
if (n !== null) {
|
|
if (t = n.tag, t === 13) {
|
|
if (t = w0(n), t !== null) {
|
|
e.blockedOn = t, M0(e.priority, function() {
|
|
R0(n);
|
|
});
|
|
return;
|
|
}
|
|
} else if (t === 3 && n.stateNode.current.memoizedState.isDehydrated) {
|
|
e.blockedOn = n.tag === 3 ? n.stateNode.containerInfo : null;
|
|
return;
|
|
}
|
|
}
|
|
}
|
|
e.blockedOn = null;
|
|
}
|
|
function pa(e) {
|
|
if (e.blockedOn !== null) return !1;
|
|
for (var t = e.targetContainers; 0 < t.length; ) {
|
|
var n = id(e.domEventName, e.eventSystemFlags, t[0], e.nativeEvent);
|
|
if (n === null) {
|
|
n = e.nativeEvent;
|
|
var r = new n.constructor(n.type, n);
|
|
Jc = r, n.target.dispatchEvent(r), Jc = null;
|
|
} else return t = ms(n), t !== null && Df(t), e.blockedOn = n, !1;
|
|
t.shift();
|
|
}
|
|
return !0;
|
|
}
|
|
function Yp(e, t, n) {
|
|
pa(e) && n.delete(t);
|
|
}
|
|
function tk() {
|
|
od = !1, Un !== null && pa(Un) && (Un = null), Hn !== null && pa(Hn) && (Hn = null), Kn !== null && pa(Kn) && (Kn = null), Ni.forEach(Yp), Wi.forEach(Yp);
|
|
}
|
|
function Jo(e, t) {
|
|
e.blockedOn === t && (e.blockedOn = null, od || (od = !0, vt.unstable_scheduleCallback(vt.unstable_NormalPriority, tk)));
|
|
}
|
|
function Ui(e) {
|
|
function t(o) {
|
|
return Jo(o, e);
|
|
}
|
|
if (0 < Os.length) {
|
|
Jo(Os[0], e);
|
|
for (var n = 1; n < Os.length; n++) {
|
|
var r = Os[n];
|
|
r.blockedOn === e && (r.blockedOn = null);
|
|
}
|
|
}
|
|
for (Un !== null && Jo(Un, e), Hn !== null && Jo(Hn, e), Kn !== null && Jo(Kn, e), Ni.forEach(t), Wi.forEach(t), n = 0; n < Bn.length; n++) r = Bn[n], r.blockedOn === e && (r.blockedOn = null);
|
|
for (; 0 < Bn.length && (n = Bn[0], n.blockedOn === null); ) D0(n), n.blockedOn === null && Bn.shift();
|
|
}
|
|
var go = Rn.ReactCurrentBatchConfig, qa = !0;
|
|
function nk(e, t, n, r) {
|
|
var o = te, i = go.transition;
|
|
go.transition = null;
|
|
try {
|
|
te = 1, If(e, t, n, r);
|
|
} finally {
|
|
te = o, go.transition = i;
|
|
}
|
|
}
|
|
function rk(e, t, n, r) {
|
|
var o = te, i = go.transition;
|
|
go.transition = null;
|
|
try {
|
|
te = 4, If(e, t, n, r);
|
|
} finally {
|
|
te = o, go.transition = i;
|
|
}
|
|
}
|
|
function If(e, t, n, r) {
|
|
if (qa) {
|
|
var o = id(e, t, n, r);
|
|
if (o === null) Yu(e, t, r, Za, n), Xp(e, r);
|
|
else if (ek(o, e, t, n, r)) r.stopPropagation();
|
|
else if (Xp(e, r), t & 4 && -1 < Jw.indexOf(e)) {
|
|
for (; o !== null; ) {
|
|
var i = ms(o);
|
|
if (i !== null && A0(i), i = id(e, t, n, r), i === null && Yu(e, t, r, Za, n), i === o) break;
|
|
o = i;
|
|
}
|
|
o !== null && r.stopPropagation();
|
|
} else Yu(e, t, r, null, n);
|
|
}
|
|
}
|
|
var Za = null;
|
|
function id(e, t, n, r) {
|
|
if (Za = null, e = Rf(r), e = mr(e), e !== null) if (t = Lr(e), t === null) e = null;
|
|
else if (n = t.tag, n === 13) {
|
|
if (e = w0(t), e !== null) return e;
|
|
e = null;
|
|
} else if (n === 3) {
|
|
if (t.stateNode.current.memoizedState.isDehydrated) return t.tag === 3 ? t.stateNode.containerInfo : null;
|
|
e = null;
|
|
} else t !== e && (e = null);
|
|
return Za = e, null;
|
|
}
|
|
function I0(e) {
|
|
switch (e) {
|
|
case "cancel":
|
|
case "click":
|
|
case "close":
|
|
case "contextmenu":
|
|
case "copy":
|
|
case "cut":
|
|
case "auxclick":
|
|
case "dblclick":
|
|
case "dragend":
|
|
case "dragstart":
|
|
case "drop":
|
|
case "focusin":
|
|
case "focusout":
|
|
case "input":
|
|
case "invalid":
|
|
case "keydown":
|
|
case "keypress":
|
|
case "keyup":
|
|
case "mousedown":
|
|
case "mouseup":
|
|
case "paste":
|
|
case "pause":
|
|
case "play":
|
|
case "pointercancel":
|
|
case "pointerdown":
|
|
case "pointerup":
|
|
case "ratechange":
|
|
case "reset":
|
|
case "resize":
|
|
case "seeked":
|
|
case "submit":
|
|
case "touchcancel":
|
|
case "touchend":
|
|
case "touchstart":
|
|
case "volumechange":
|
|
case "change":
|
|
case "selectionchange":
|
|
case "textInput":
|
|
case "compositionstart":
|
|
case "compositionend":
|
|
case "compositionupdate":
|
|
case "beforeblur":
|
|
case "afterblur":
|
|
case "beforeinput":
|
|
case "blur":
|
|
case "fullscreenchange":
|
|
case "focus":
|
|
case "hashchange":
|
|
case "popstate":
|
|
case "select":
|
|
case "selectstart":
|
|
return 1;
|
|
case "drag":
|
|
case "dragenter":
|
|
case "dragexit":
|
|
case "dragleave":
|
|
case "dragover":
|
|
case "mousemove":
|
|
case "mouseout":
|
|
case "mouseover":
|
|
case "pointermove":
|
|
case "pointerout":
|
|
case "pointerover":
|
|
case "scroll":
|
|
case "toggle":
|
|
case "touchmove":
|
|
case "wheel":
|
|
case "mouseenter":
|
|
case "mouseleave":
|
|
case "pointerenter":
|
|
case "pointerleave":
|
|
return 4;
|
|
case "message":
|
|
switch (Uw()) {
|
|
case zf:
|
|
return 1;
|
|
case P0:
|
|
return 4;
|
|
case Ya:
|
|
case Hw:
|
|
return 16;
|
|
case E0:
|
|
return 536870912;
|
|
default:
|
|
return 16;
|
|
}
|
|
default:
|
|
return 16;
|
|
}
|
|
}
|
|
var On = null, Lf = null, ma = null;
|
|
function L0() {
|
|
if (ma) return ma;
|
|
var e, t = Lf, n = t.length, r, o = "value" in On ? On.value : On.textContent, i = o.length;
|
|
for (e = 0; e < n && t[e] === o[e]; e++) ;
|
|
var s = n - e;
|
|
for (r = 1; r <= s && t[n - r] === o[i - r]; r++) ;
|
|
return ma = o.slice(e, 1 < r ? 1 - r : void 0);
|
|
}
|
|
function ga(e) {
|
|
var t = e.keyCode;
|
|
return "charCode" in e ? (e = e.charCode, e === 0 && t === 13 && (e = 13)) : e = t, e === 10 && (e = 13), 32 <= e || e === 13 ? e : 0;
|
|
}
|
|
function Ns() {
|
|
return !0;
|
|
}
|
|
function Qp() {
|
|
return !1;
|
|
}
|
|
function bt(e) {
|
|
function t(n, r, o, i, s) {
|
|
this._reactName = n, this._targetInst = o, this.type = r, this.nativeEvent = i, this.target = s, this.currentTarget = null;
|
|
for (var a in e) e.hasOwnProperty(a) && (n = e[a], this[a] = n ? n(i) : i[a]);
|
|
return this.isDefaultPrevented = (i.defaultPrevented != null ? i.defaultPrevented : i.returnValue === !1) ? Ns : Qp, this.isPropagationStopped = Qp, this;
|
|
}
|
|
return ve(t.prototype, { preventDefault: function() {
|
|
this.defaultPrevented = !0;
|
|
var n = this.nativeEvent;
|
|
n && (n.preventDefault ? n.preventDefault() : typeof n.returnValue != "unknown" && (n.returnValue = !1), this.isDefaultPrevented = Ns);
|
|
}, stopPropagation: function() {
|
|
var n = this.nativeEvent;
|
|
n && (n.stopPropagation ? n.stopPropagation() : typeof n.cancelBubble != "unknown" && (n.cancelBubble = !0), this.isPropagationStopped = Ns);
|
|
}, persist: function() {
|
|
}, isPersistent: Ns }), t;
|
|
}
|
|
var Bo = { eventPhase: 0, bubbles: 0, cancelable: 0, timeStamp: function(e) {
|
|
return e.timeStamp || Date.now();
|
|
}, defaultPrevented: 0, isTrusted: 0 }, Vf = bt(Bo), ps = ve({}, Bo, { view: 0, detail: 0 }), ok = bt(ps), ju, Ou, ei, Ll = ve({}, ps, { screenX: 0, screenY: 0, clientX: 0, clientY: 0, pageX: 0, pageY: 0, ctrlKey: 0, shiftKey: 0, altKey: 0, metaKey: 0, getModifierState: Bf, button: 0, buttons: 0, relatedTarget: function(e) {
|
|
return e.relatedTarget === void 0 ? e.fromElement === e.srcElement ? e.toElement : e.fromElement : e.relatedTarget;
|
|
}, movementX: function(e) {
|
|
return "movementX" in e ? e.movementX : (e !== ei && (ei && e.type === "mousemove" ? (ju = e.screenX - ei.screenX, Ou = e.screenY - ei.screenY) : Ou = ju = 0, ei = e), ju);
|
|
}, movementY: function(e) {
|
|
return "movementY" in e ? e.movementY : Ou;
|
|
} }), qp = bt(Ll), ik = ve({}, Ll, { dataTransfer: 0 }), sk = bt(ik), ak = ve({}, ps, { relatedTarget: 0 }), Nu = bt(ak), lk = ve({}, Bo, { animationName: 0, elapsedTime: 0, pseudoElement: 0 }), uk = bt(lk), ck = ve({}, Bo, { clipboardData: function(e) {
|
|
return "clipboardData" in e ? e.clipboardData : window.clipboardData;
|
|
} }), dk = bt(ck), fk = ve({}, Bo, { data: 0 }), Zp = bt(fk), hk = {
|
|
Esc: "Escape",
|
|
Spacebar: " ",
|
|
Left: "ArrowLeft",
|
|
Up: "ArrowUp",
|
|
Right: "ArrowRight",
|
|
Down: "ArrowDown",
|
|
Del: "Delete",
|
|
Win: "OS",
|
|
Menu: "ContextMenu",
|
|
Apps: "ContextMenu",
|
|
Scroll: "ScrollLock",
|
|
MozPrintableKey: "Unidentified"
|
|
}, pk = {
|
|
8: "Backspace",
|
|
9: "Tab",
|
|
12: "Clear",
|
|
13: "Enter",
|
|
16: "Shift",
|
|
17: "Control",
|
|
18: "Alt",
|
|
19: "Pause",
|
|
20: "CapsLock",
|
|
27: "Escape",
|
|
32: " ",
|
|
33: "PageUp",
|
|
34: "PageDown",
|
|
35: "End",
|
|
36: "Home",
|
|
37: "ArrowLeft",
|
|
38: "ArrowUp",
|
|
39: "ArrowRight",
|
|
40: "ArrowDown",
|
|
45: "Insert",
|
|
46: "Delete",
|
|
112: "F1",
|
|
113: "F2",
|
|
114: "F3",
|
|
115: "F4",
|
|
116: "F5",
|
|
117: "F6",
|
|
118: "F7",
|
|
119: "F8",
|
|
120: "F9",
|
|
121: "F10",
|
|
122: "F11",
|
|
123: "F12",
|
|
144: "NumLock",
|
|
145: "ScrollLock",
|
|
224: "Meta"
|
|
}, mk = { Alt: "altKey", Control: "ctrlKey", Meta: "metaKey", Shift: "shiftKey" };
|
|
function gk(e) {
|
|
var t = this.nativeEvent;
|
|
return t.getModifierState ? t.getModifierState(e) : (e = mk[e]) ? !!t[e] : !1;
|
|
}
|
|
function Bf() {
|
|
return gk;
|
|
}
|
|
var yk = ve({}, ps, { key: function(e) {
|
|
if (e.key) {
|
|
var t = hk[e.key] || e.key;
|
|
if (t !== "Unidentified") return t;
|
|
}
|
|
return e.type === "keypress" ? (e = ga(e), e === 13 ? "Enter" : String.fromCharCode(e)) : e.type === "keydown" || e.type === "keyup" ? pk[e.keyCode] || "Unidentified" : "";
|
|
}, code: 0, location: 0, ctrlKey: 0, shiftKey: 0, altKey: 0, metaKey: 0, repeat: 0, locale: 0, getModifierState: Bf, charCode: function(e) {
|
|
return e.type === "keypress" ? ga(e) : 0;
|
|
}, keyCode: function(e) {
|
|
return e.type === "keydown" || e.type === "keyup" ? e.keyCode : 0;
|
|
}, which: function(e) {
|
|
return e.type === "keypress" ? ga(e) : e.type === "keydown" || e.type === "keyup" ? e.keyCode : 0;
|
|
} }), vk = bt(yk), Sk = ve({}, Ll, { pointerId: 0, width: 0, height: 0, pressure: 0, tangentialPressure: 0, tiltX: 0, tiltY: 0, twist: 0, pointerType: 0, isPrimary: 0 }), Jp = bt(Sk), bk = ve({}, ps, { touches: 0, targetTouches: 0, changedTouches: 0, altKey: 0, metaKey: 0, ctrlKey: 0, shiftKey: 0, getModifierState: Bf }), xk = bt(bk), wk = ve({}, Bo, { propertyName: 0, elapsedTime: 0, pseudoElement: 0 }), kk = bt(wk), Ck = ve({}, Ll, {
|
|
deltaX: function(e) {
|
|
return "deltaX" in e ? e.deltaX : "wheelDeltaX" in e ? -e.wheelDeltaX : 0;
|
|
},
|
|
deltaY: function(e) {
|
|
return "deltaY" in e ? e.deltaY : "wheelDeltaY" in e ? -e.wheelDeltaY : "wheelDelta" in e ? -e.wheelDelta : 0;
|
|
},
|
|
deltaZ: 0,
|
|
deltaMode: 0
|
|
}), Tk = bt(Ck), Pk = [9, 13, 27, 32], Ff = Pn && "CompositionEvent" in window, xi = null;
|
|
Pn && "documentMode" in document && (xi = document.documentMode);
|
|
var Ek = Pn && "TextEvent" in window && !xi, V0 = Pn && (!Ff || xi && 8 < xi && 11 >= xi), em = " ", tm = !1;
|
|
function B0(e, t) {
|
|
switch (e) {
|
|
case "keyup":
|
|
return Pk.indexOf(t.keyCode) !== -1;
|
|
case "keydown":
|
|
return t.keyCode !== 229;
|
|
case "keypress":
|
|
case "mousedown":
|
|
case "focusout":
|
|
return !0;
|
|
default:
|
|
return !1;
|
|
}
|
|
}
|
|
function F0(e) {
|
|
return e = e.detail, typeof e == "object" && "data" in e ? e.data : null;
|
|
}
|
|
var Gr = !1;
|
|
function _k(e, t) {
|
|
switch (e) {
|
|
case "compositionend":
|
|
return F0(t);
|
|
case "keypress":
|
|
return t.which !== 32 ? null : (tm = !0, em);
|
|
case "textInput":
|
|
return e = t.data, e === em && tm ? null : e;
|
|
default:
|
|
return null;
|
|
}
|
|
}
|
|
function $k(e, t) {
|
|
if (Gr) return e === "compositionend" || !Ff && B0(e, t) ? (e = L0(), ma = Lf = On = null, Gr = !1, e) : null;
|
|
switch (e) {
|
|
case "paste":
|
|
return null;
|
|
case "keypress":
|
|
if (!(t.ctrlKey || t.altKey || t.metaKey) || t.ctrlKey && t.altKey) {
|
|
if (t.char && 1 < t.char.length) return t.char;
|
|
if (t.which) return String.fromCharCode(t.which);
|
|
}
|
|
return null;
|
|
case "compositionend":
|
|
return V0 && t.locale !== "ko" ? null : t.data;
|
|
default:
|
|
return null;
|
|
}
|
|
}
|
|
var Ak = { color: !0, date: !0, datetime: !0, "datetime-local": !0, email: !0, month: !0, number: !0, password: !0, range: !0, search: !0, tel: !0, text: !0, time: !0, url: !0, week: !0 };
|
|
function nm(e) {
|
|
var t = e && e.nodeName && e.nodeName.toLowerCase();
|
|
return t === "input" ? !!Ak[e.type] : t === "textarea";
|
|
}
|
|
function j0(e, t, n, r) {
|
|
y0(r), t = Ja(t, "onChange"), 0 < t.length && (n = new Vf("onChange", "change", null, n, r), e.push({ event: n, listeners: t }));
|
|
}
|
|
var wi = null, Hi = null;
|
|
function Rk(e) {
|
|
q0(e, 0);
|
|
}
|
|
function Vl(e) {
|
|
var t = Qr(e);
|
|
if (c0(t)) return e;
|
|
}
|
|
function zk(e, t) {
|
|
if (e === "change") return t;
|
|
}
|
|
var O0 = !1;
|
|
if (Pn) {
|
|
var Wu;
|
|
if (Pn) {
|
|
var Uu = "oninput" in document;
|
|
if (!Uu) {
|
|
var rm = document.createElement("div");
|
|
rm.setAttribute("oninput", "return;"), Uu = typeof rm.oninput == "function";
|
|
}
|
|
Wu = Uu;
|
|
} else Wu = !1;
|
|
O0 = Wu && (!document.documentMode || 9 < document.documentMode);
|
|
}
|
|
function om() {
|
|
wi && (wi.detachEvent("onpropertychange", N0), Hi = wi = null);
|
|
}
|
|
function N0(e) {
|
|
if (e.propertyName === "value" && Vl(Hi)) {
|
|
var t = [];
|
|
j0(t, Hi, e, Rf(e)), x0(Rk, t);
|
|
}
|
|
}
|
|
function Mk(e, t, n) {
|
|
e === "focusin" ? (om(), wi = t, Hi = n, wi.attachEvent("onpropertychange", N0)) : e === "focusout" && om();
|
|
}
|
|
function Dk(e) {
|
|
if (e === "selectionchange" || e === "keyup" || e === "keydown") return Vl(Hi);
|
|
}
|
|
function Ik(e, t) {
|
|
if (e === "click") return Vl(t);
|
|
}
|
|
function Lk(e, t) {
|
|
if (e === "input" || e === "change") return Vl(t);
|
|
}
|
|
function Vk(e, t) {
|
|
return e === t && (e !== 0 || 1 / e === 1 / t) || e !== e && t !== t;
|
|
}
|
|
var Kt = typeof Object.is == "function" ? Object.is : Vk;
|
|
function Ki(e, t) {
|
|
if (Kt(e, t)) return !0;
|
|
if (typeof e != "object" || e === null || typeof t != "object" || t === null) return !1;
|
|
var n = Object.keys(e), r = Object.keys(t);
|
|
if (n.length !== r.length) return !1;
|
|
for (r = 0; r < n.length; r++) {
|
|
var o = n[r];
|
|
if (!Oc.call(t, o) || !Kt(e[o], t[o])) return !1;
|
|
}
|
|
return !0;
|
|
}
|
|
function im(e) {
|
|
for (; e && e.firstChild; ) e = e.firstChild;
|
|
return e;
|
|
}
|
|
function sm(e, t) {
|
|
var n = im(e);
|
|
e = 0;
|
|
for (var r; n; ) {
|
|
if (n.nodeType === 3) {
|
|
if (r = e + n.textContent.length, e <= t && r >= t) return { node: n, offset: t - e };
|
|
e = r;
|
|
}
|
|
e: {
|
|
for (; n; ) {
|
|
if (n.nextSibling) {
|
|
n = n.nextSibling;
|
|
break e;
|
|
}
|
|
n = n.parentNode;
|
|
}
|
|
n = void 0;
|
|
}
|
|
n = im(n);
|
|
}
|
|
}
|
|
function W0(e, t) {
|
|
return e && t ? e === t ? !0 : e && e.nodeType === 3 ? !1 : t && t.nodeType === 3 ? W0(e, t.parentNode) : "contains" in e ? e.contains(t) : e.compareDocumentPosition ? !!(e.compareDocumentPosition(t) & 16) : !1 : !1;
|
|
}
|
|
function U0() {
|
|
for (var e = window, t = Ka(); t instanceof e.HTMLIFrameElement; ) {
|
|
try {
|
|
var n = typeof t.contentWindow.location.href == "string";
|
|
} catch {
|
|
n = !1;
|
|
}
|
|
if (n) e = t.contentWindow;
|
|
else break;
|
|
t = Ka(e.document);
|
|
}
|
|
return t;
|
|
}
|
|
function jf(e) {
|
|
var t = e && e.nodeName && e.nodeName.toLowerCase();
|
|
return t && (t === "input" && (e.type === "text" || e.type === "search" || e.type === "tel" || e.type === "url" || e.type === "password") || t === "textarea" || e.contentEditable === "true");
|
|
}
|
|
function Bk(e) {
|
|
var t = U0(), n = e.focusedElem, r = e.selectionRange;
|
|
if (t !== n && n && n.ownerDocument && W0(n.ownerDocument.documentElement, n)) {
|
|
if (r !== null && jf(n)) {
|
|
if (t = r.start, e = r.end, e === void 0 && (e = t), "selectionStart" in n) n.selectionStart = t, n.selectionEnd = Math.min(e, n.value.length);
|
|
else if (e = (t = n.ownerDocument || document) && t.defaultView || window, e.getSelection) {
|
|
e = e.getSelection();
|
|
var o = n.textContent.length, i = Math.min(r.start, o);
|
|
r = r.end === void 0 ? i : Math.min(r.end, o), !e.extend && i > r && (o = r, r = i, i = o), o = sm(n, i);
|
|
var s = sm(
|
|
n,
|
|
r
|
|
);
|
|
o && s && (e.rangeCount !== 1 || e.anchorNode !== o.node || e.anchorOffset !== o.offset || e.focusNode !== s.node || e.focusOffset !== s.offset) && (t = t.createRange(), t.setStart(o.node, o.offset), e.removeAllRanges(), i > r ? (e.addRange(t), e.extend(s.node, s.offset)) : (t.setEnd(s.node, s.offset), e.addRange(t)));
|
|
}
|
|
}
|
|
for (t = [], e = n; e = e.parentNode; ) e.nodeType === 1 && t.push({ element: e, left: e.scrollLeft, top: e.scrollTop });
|
|
for (typeof n.focus == "function" && n.focus(), n = 0; n < t.length; n++) e = t[n], e.element.scrollLeft = e.left, e.element.scrollTop = e.top;
|
|
}
|
|
}
|
|
var Fk = Pn && "documentMode" in document && 11 >= document.documentMode, Xr = null, sd = null, ki = null, ad = !1;
|
|
function am(e, t, n) {
|
|
var r = n.window === n ? n.document : n.nodeType === 9 ? n : n.ownerDocument;
|
|
ad || Xr == null || Xr !== Ka(r) || (r = Xr, "selectionStart" in r && jf(r) ? r = { start: r.selectionStart, end: r.selectionEnd } : (r = (r.ownerDocument && r.ownerDocument.defaultView || window).getSelection(), r = { anchorNode: r.anchorNode, anchorOffset: r.anchorOffset, focusNode: r.focusNode, focusOffset: r.focusOffset }), ki && Ki(ki, r) || (ki = r, r = Ja(sd, "onSelect"), 0 < r.length && (t = new Vf("onSelect", "select", null, t, n), e.push({ event: t, listeners: r }), t.target = Xr)));
|
|
}
|
|
function Ws(e, t) {
|
|
var n = {};
|
|
return n[e.toLowerCase()] = t.toLowerCase(), n["Webkit" + e] = "webkit" + t, n["Moz" + e] = "moz" + t, n;
|
|
}
|
|
var Yr = { animationend: Ws("Animation", "AnimationEnd"), animationiteration: Ws("Animation", "AnimationIteration"), animationstart: Ws("Animation", "AnimationStart"), transitionend: Ws("Transition", "TransitionEnd") }, Hu = {}, H0 = {};
|
|
Pn && (H0 = document.createElement("div").style, "AnimationEvent" in window || (delete Yr.animationend.animation, delete Yr.animationiteration.animation, delete Yr.animationstart.animation), "TransitionEvent" in window || delete Yr.transitionend.transition);
|
|
function Bl(e) {
|
|
if (Hu[e]) return Hu[e];
|
|
if (!Yr[e]) return e;
|
|
var t = Yr[e], n;
|
|
for (n in t) if (t.hasOwnProperty(n) && n in H0) return Hu[e] = t[n];
|
|
return e;
|
|
}
|
|
var K0 = Bl("animationend"), G0 = Bl("animationiteration"), X0 = Bl("animationstart"), Y0 = Bl("transitionend"), Q0 = /* @__PURE__ */ new Map(), lm = "abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");
|
|
function nr(e, t) {
|
|
Q0.set(e, t), Ir(t, [e]);
|
|
}
|
|
for (var Ku = 0; Ku < lm.length; Ku++) {
|
|
var Gu = lm[Ku], jk = Gu.toLowerCase(), Ok = Gu[0].toUpperCase() + Gu.slice(1);
|
|
nr(jk, "on" + Ok);
|
|
}
|
|
nr(K0, "onAnimationEnd");
|
|
nr(G0, "onAnimationIteration");
|
|
nr(X0, "onAnimationStart");
|
|
nr("dblclick", "onDoubleClick");
|
|
nr("focusin", "onFocus");
|
|
nr("focusout", "onBlur");
|
|
nr(Y0, "onTransitionEnd");
|
|
Co("onMouseEnter", ["mouseout", "mouseover"]);
|
|
Co("onMouseLeave", ["mouseout", "mouseover"]);
|
|
Co("onPointerEnter", ["pointerout", "pointerover"]);
|
|
Co("onPointerLeave", ["pointerout", "pointerover"]);
|
|
Ir("onChange", "change click focusin focusout input keydown keyup selectionchange".split(" "));
|
|
Ir("onSelect", "focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));
|
|
Ir("onBeforeInput", ["compositionend", "keypress", "textInput", "paste"]);
|
|
Ir("onCompositionEnd", "compositionend focusout keydown keypress keyup mousedown".split(" "));
|
|
Ir("onCompositionStart", "compositionstart focusout keydown keypress keyup mousedown".split(" "));
|
|
Ir("onCompositionUpdate", "compositionupdate focusout keydown keypress keyup mousedown".split(" "));
|
|
var fi = "abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "), Nk = new Set("cancel close invalid load scroll toggle".split(" ").concat(fi));
|
|
function um(e, t, n) {
|
|
var r = e.type || "unknown-event";
|
|
e.currentTarget = n, jw(r, t, void 0, e), e.currentTarget = null;
|
|
}
|
|
function q0(e, t) {
|
|
t = (t & 4) !== 0;
|
|
for (var n = 0; n < e.length; n++) {
|
|
var r = e[n], o = r.event;
|
|
r = r.listeners;
|
|
e: {
|
|
var i = void 0;
|
|
if (t) for (var s = r.length - 1; 0 <= s; s--) {
|
|
var a = r[s], l = a.instance, u = a.currentTarget;
|
|
if (a = a.listener, l !== i && o.isPropagationStopped()) break e;
|
|
um(o, a, u), i = l;
|
|
}
|
|
else for (s = 0; s < r.length; s++) {
|
|
if (a = r[s], l = a.instance, u = a.currentTarget, a = a.listener, l !== i && o.isPropagationStopped()) break e;
|
|
um(o, a, u), i = l;
|
|
}
|
|
}
|
|
}
|
|
if (Xa) throw e = nd, Xa = !1, nd = null, e;
|
|
}
|
|
function ue(e, t) {
|
|
var n = t[fd];
|
|
n === void 0 && (n = t[fd] = /* @__PURE__ */ new Set());
|
|
var r = e + "__bubble";
|
|
n.has(r) || (Z0(t, e, 2, !1), n.add(r));
|
|
}
|
|
function Xu(e, t, n) {
|
|
var r = 0;
|
|
t && (r |= 4), Z0(n, e, r, t);
|
|
}
|
|
var Us = "_reactListening" + Math.random().toString(36).slice(2);
|
|
function Gi(e) {
|
|
if (!e[Us]) {
|
|
e[Us] = !0, i0.forEach(function(n) {
|
|
n !== "selectionchange" && (Nk.has(n) || Xu(n, !1, e), Xu(n, !0, e));
|
|
});
|
|
var t = e.nodeType === 9 ? e : e.ownerDocument;
|
|
t === null || t[Us] || (t[Us] = !0, Xu("selectionchange", !1, t));
|
|
}
|
|
}
|
|
function Z0(e, t, n, r) {
|
|
switch (I0(t)) {
|
|
case 1:
|
|
var o = nk;
|
|
break;
|
|
case 4:
|
|
o = rk;
|
|
break;
|
|
default:
|
|
o = If;
|
|
}
|
|
n = o.bind(null, t, n, e), o = void 0, !td || t !== "touchstart" && t !== "touchmove" && t !== "wheel" || (o = !0), r ? o !== void 0 ? e.addEventListener(t, n, { capture: !0, passive: o }) : e.addEventListener(t, n, !0) : o !== void 0 ? e.addEventListener(t, n, { passive: o }) : e.addEventListener(t, n, !1);
|
|
}
|
|
function Yu(e, t, n, r, o) {
|
|
var i = r;
|
|
if (!(t & 1) && !(t & 2) && r !== null) e: for (; ; ) {
|
|
if (r === null) return;
|
|
var s = r.tag;
|
|
if (s === 3 || s === 4) {
|
|
var a = r.stateNode.containerInfo;
|
|
if (a === o || a.nodeType === 8 && a.parentNode === o) break;
|
|
if (s === 4) for (s = r.return; s !== null; ) {
|
|
var l = s.tag;
|
|
if ((l === 3 || l === 4) && (l = s.stateNode.containerInfo, l === o || l.nodeType === 8 && l.parentNode === o)) return;
|
|
s = s.return;
|
|
}
|
|
for (; a !== null; ) {
|
|
if (s = mr(a), s === null) return;
|
|
if (l = s.tag, l === 5 || l === 6) {
|
|
r = i = s;
|
|
continue e;
|
|
}
|
|
a = a.parentNode;
|
|
}
|
|
}
|
|
r = r.return;
|
|
}
|
|
x0(function() {
|
|
var u = i, c = Rf(n), d = [];
|
|
e: {
|
|
var f = Q0.get(e);
|
|
if (f !== void 0) {
|
|
var y = Vf, v = e;
|
|
switch (e) {
|
|
case "keypress":
|
|
if (ga(n) === 0) break e;
|
|
case "keydown":
|
|
case "keyup":
|
|
y = vk;
|
|
break;
|
|
case "focusin":
|
|
v = "focus", y = Nu;
|
|
break;
|
|
case "focusout":
|
|
v = "blur", y = Nu;
|
|
break;
|
|
case "beforeblur":
|
|
case "afterblur":
|
|
y = Nu;
|
|
break;
|
|
case "click":
|
|
if (n.button === 2) break e;
|
|
case "auxclick":
|
|
case "dblclick":
|
|
case "mousedown":
|
|
case "mousemove":
|
|
case "mouseup":
|
|
case "mouseout":
|
|
case "mouseover":
|
|
case "contextmenu":
|
|
y = qp;
|
|
break;
|
|
case "drag":
|
|
case "dragend":
|
|
case "dragenter":
|
|
case "dragexit":
|
|
case "dragleave":
|
|
case "dragover":
|
|
case "dragstart":
|
|
case "drop":
|
|
y = sk;
|
|
break;
|
|
case "touchcancel":
|
|
case "touchend":
|
|
case "touchmove":
|
|
case "touchstart":
|
|
y = xk;
|
|
break;
|
|
case K0:
|
|
case G0:
|
|
case X0:
|
|
y = uk;
|
|
break;
|
|
case Y0:
|
|
y = kk;
|
|
break;
|
|
case "scroll":
|
|
y = ok;
|
|
break;
|
|
case "wheel":
|
|
y = Tk;
|
|
break;
|
|
case "copy":
|
|
case "cut":
|
|
case "paste":
|
|
y = dk;
|
|
break;
|
|
case "gotpointercapture":
|
|
case "lostpointercapture":
|
|
case "pointercancel":
|
|
case "pointerdown":
|
|
case "pointermove":
|
|
case "pointerout":
|
|
case "pointerover":
|
|
case "pointerup":
|
|
y = Jp;
|
|
}
|
|
var S = (t & 4) !== 0, k = !S && e === "scroll", p = S ? f !== null ? f + "Capture" : null : f;
|
|
S = [];
|
|
for (var h = u, g; h !== null; ) {
|
|
g = h;
|
|
var w = g.stateNode;
|
|
if (g.tag === 5 && w !== null && (g = w, p !== null && (w = Oi(h, p), w != null && S.push(Xi(h, w, g)))), k) break;
|
|
h = h.return;
|
|
}
|
|
0 < S.length && (f = new y(f, v, null, n, c), d.push({ event: f, listeners: S }));
|
|
}
|
|
}
|
|
if (!(t & 7)) {
|
|
e: {
|
|
if (f = e === "mouseover" || e === "pointerover", y = e === "mouseout" || e === "pointerout", f && n !== Jc && (v = n.relatedTarget || n.fromElement) && (mr(v) || v[En])) break e;
|
|
if ((y || f) && (f = c.window === c ? c : (f = c.ownerDocument) ? f.defaultView || f.parentWindow : window, y ? (v = n.relatedTarget || n.toElement, y = u, v = v ? mr(v) : null, v !== null && (k = Lr(v), v !== k || v.tag !== 5 && v.tag !== 6) && (v = null)) : (y = null, v = u), y !== v)) {
|
|
if (S = qp, w = "onMouseLeave", p = "onMouseEnter", h = "mouse", (e === "pointerout" || e === "pointerover") && (S = Jp, w = "onPointerLeave", p = "onPointerEnter", h = "pointer"), k = y == null ? f : Qr(y), g = v == null ? f : Qr(v), f = new S(w, h + "leave", y, n, c), f.target = k, f.relatedTarget = g, w = null, mr(c) === u && (S = new S(p, h + "enter", v, n, c), S.target = g, S.relatedTarget = k, w = S), k = w, y && v) t: {
|
|
for (S = y, p = v, h = 0, g = S; g; g = Nr(g)) h++;
|
|
for (g = 0, w = p; w; w = Nr(w)) g++;
|
|
for (; 0 < h - g; ) S = Nr(S), h--;
|
|
for (; 0 < g - h; ) p = Nr(p), g--;
|
|
for (; h--; ) {
|
|
if (S === p || p !== null && S === p.alternate) break t;
|
|
S = Nr(S), p = Nr(p);
|
|
}
|
|
S = null;
|
|
}
|
|
else S = null;
|
|
y !== null && cm(d, f, y, S, !1), v !== null && k !== null && cm(d, k, v, S, !0);
|
|
}
|
|
}
|
|
e: {
|
|
if (f = u ? Qr(u) : window, y = f.nodeName && f.nodeName.toLowerCase(), y === "select" || y === "input" && f.type === "file") var E = zk;
|
|
else if (nm(f)) if (O0) E = Lk;
|
|
else {
|
|
E = Dk;
|
|
var _ = Mk;
|
|
}
|
|
else (y = f.nodeName) && y.toLowerCase() === "input" && (f.type === "checkbox" || f.type === "radio") && (E = Ik);
|
|
if (E && (E = E(e, u))) {
|
|
j0(d, E, n, c);
|
|
break e;
|
|
}
|
|
_ && _(e, f, u), e === "focusout" && (_ = f._wrapperState) && _.controlled && f.type === "number" && Xc(f, "number", f.value);
|
|
}
|
|
switch (_ = u ? Qr(u) : window, e) {
|
|
case "focusin":
|
|
(nm(_) || _.contentEditable === "true") && (Xr = _, sd = u, ki = null);
|
|
break;
|
|
case "focusout":
|
|
ki = sd = Xr = null;
|
|
break;
|
|
case "mousedown":
|
|
ad = !0;
|
|
break;
|
|
case "contextmenu":
|
|
case "mouseup":
|
|
case "dragend":
|
|
ad = !1, am(d, n, c);
|
|
break;
|
|
case "selectionchange":
|
|
if (Fk) break;
|
|
case "keydown":
|
|
case "keyup":
|
|
am(d, n, c);
|
|
}
|
|
var P;
|
|
if (Ff) e: {
|
|
switch (e) {
|
|
case "compositionstart":
|
|
var $ = "onCompositionStart";
|
|
break e;
|
|
case "compositionend":
|
|
$ = "onCompositionEnd";
|
|
break e;
|
|
case "compositionupdate":
|
|
$ = "onCompositionUpdate";
|
|
break e;
|
|
}
|
|
$ = void 0;
|
|
}
|
|
else Gr ? B0(e, n) && ($ = "onCompositionEnd") : e === "keydown" && n.keyCode === 229 && ($ = "onCompositionStart");
|
|
$ && (V0 && n.locale !== "ko" && (Gr || $ !== "onCompositionStart" ? $ === "onCompositionEnd" && Gr && (P = L0()) : (On = c, Lf = "value" in On ? On.value : On.textContent, Gr = !0)), _ = Ja(u, $), 0 < _.length && ($ = new Zp($, e, null, n, c), d.push({ event: $, listeners: _ }), P ? $.data = P : (P = F0(n), P !== null && ($.data = P)))), (P = Ek ? _k(e, n) : $k(e, n)) && (u = Ja(u, "onBeforeInput"), 0 < u.length && (c = new Zp("onBeforeInput", "beforeinput", null, n, c), d.push({ event: c, listeners: u }), c.data = P));
|
|
}
|
|
q0(d, t);
|
|
});
|
|
}
|
|
function Xi(e, t, n) {
|
|
return { instance: e, listener: t, currentTarget: n };
|
|
}
|
|
function Ja(e, t) {
|
|
for (var n = t + "Capture", r = []; e !== null; ) {
|
|
var o = e, i = o.stateNode;
|
|
o.tag === 5 && i !== null && (o = i, i = Oi(e, n), i != null && r.unshift(Xi(e, i, o)), i = Oi(e, t), i != null && r.push(Xi(e, i, o))), e = e.return;
|
|
}
|
|
return r;
|
|
}
|
|
function Nr(e) {
|
|
if (e === null) return null;
|
|
do
|
|
e = e.return;
|
|
while (e && e.tag !== 5);
|
|
return e || null;
|
|
}
|
|
function cm(e, t, n, r, o) {
|
|
for (var i = t._reactName, s = []; n !== null && n !== r; ) {
|
|
var a = n, l = a.alternate, u = a.stateNode;
|
|
if (l !== null && l === r) break;
|
|
a.tag === 5 && u !== null && (a = u, o ? (l = Oi(n, i), l != null && s.unshift(Xi(n, l, a))) : o || (l = Oi(n, i), l != null && s.push(Xi(n, l, a)))), n = n.return;
|
|
}
|
|
s.length !== 0 && e.push({ event: t, listeners: s });
|
|
}
|
|
var Wk = /\r\n?/g, Uk = /\u0000|\uFFFD/g;
|
|
function dm(e) {
|
|
return (typeof e == "string" ? e : "" + e).replace(Wk, `
|
|
`).replace(Uk, "");
|
|
}
|
|
function Hs(e, t, n) {
|
|
if (t = dm(t), dm(e) !== t && n) throw Error(R(425));
|
|
}
|
|
function el() {
|
|
}
|
|
var ld = null, ud = null;
|
|
function cd(e, t) {
|
|
return e === "textarea" || e === "noscript" || typeof t.children == "string" || typeof t.children == "number" || typeof t.dangerouslySetInnerHTML == "object" && t.dangerouslySetInnerHTML !== null && t.dangerouslySetInnerHTML.__html != null;
|
|
}
|
|
var dd = typeof setTimeout == "function" ? setTimeout : void 0, Hk = typeof clearTimeout == "function" ? clearTimeout : void 0, fm = typeof Promise == "function" ? Promise : void 0, Kk = typeof queueMicrotask == "function" ? queueMicrotask : typeof fm < "u" ? function(e) {
|
|
return fm.resolve(null).then(e).catch(Gk);
|
|
} : dd;
|
|
function Gk(e) {
|
|
setTimeout(function() {
|
|
throw e;
|
|
});
|
|
}
|
|
function Qu(e, t) {
|
|
var n = t, r = 0;
|
|
do {
|
|
var o = n.nextSibling;
|
|
if (e.removeChild(n), o && o.nodeType === 8) if (n = o.data, n === "/$") {
|
|
if (r === 0) {
|
|
e.removeChild(o), Ui(t);
|
|
return;
|
|
}
|
|
r--;
|
|
} else n !== "$" && n !== "$?" && n !== "$!" || r++;
|
|
n = o;
|
|
} while (n);
|
|
Ui(t);
|
|
}
|
|
function Gn(e) {
|
|
for (; e != null; e = e.nextSibling) {
|
|
var t = e.nodeType;
|
|
if (t === 1 || t === 3) break;
|
|
if (t === 8) {
|
|
if (t = e.data, t === "$" || t === "$!" || t === "$?") break;
|
|
if (t === "/$") return null;
|
|
}
|
|
}
|
|
return e;
|
|
}
|
|
function hm(e) {
|
|
e = e.previousSibling;
|
|
for (var t = 0; e; ) {
|
|
if (e.nodeType === 8) {
|
|
var n = e.data;
|
|
if (n === "$" || n === "$!" || n === "$?") {
|
|
if (t === 0) return e;
|
|
t--;
|
|
} else n === "/$" && t++;
|
|
}
|
|
e = e.previousSibling;
|
|
}
|
|
return null;
|
|
}
|
|
var Fo = Math.random().toString(36).slice(2), rn = "__reactFiber$" + Fo, Yi = "__reactProps$" + Fo, En = "__reactContainer$" + Fo, fd = "__reactEvents$" + Fo, Xk = "__reactListeners$" + Fo, Yk = "__reactHandles$" + Fo;
|
|
function mr(e) {
|
|
var t = e[rn];
|
|
if (t) return t;
|
|
for (var n = e.parentNode; n; ) {
|
|
if (t = n[En] || n[rn]) {
|
|
if (n = t.alternate, t.child !== null || n !== null && n.child !== null) for (e = hm(e); e !== null; ) {
|
|
if (n = e[rn]) return n;
|
|
e = hm(e);
|
|
}
|
|
return t;
|
|
}
|
|
e = n, n = e.parentNode;
|
|
}
|
|
return null;
|
|
}
|
|
function ms(e) {
|
|
return e = e[rn] || e[En], !e || e.tag !== 5 && e.tag !== 6 && e.tag !== 13 && e.tag !== 3 ? null : e;
|
|
}
|
|
function Qr(e) {
|
|
if (e.tag === 5 || e.tag === 6) return e.stateNode;
|
|
throw Error(R(33));
|
|
}
|
|
function Fl(e) {
|
|
return e[Yi] || null;
|
|
}
|
|
var hd = [], qr = -1;
|
|
function rr(e) {
|
|
return { current: e };
|
|
}
|
|
function de(e) {
|
|
0 > qr || (e.current = hd[qr], hd[qr] = null, qr--);
|
|
}
|
|
function se(e, t) {
|
|
qr++, hd[qr] = e.current, e.current = t;
|
|
}
|
|
var Jn = {}, Ke = rr(Jn), it = rr(!1), _r = Jn;
|
|
function To(e, t) {
|
|
var n = e.type.contextTypes;
|
|
if (!n) return Jn;
|
|
var r = e.stateNode;
|
|
if (r && r.__reactInternalMemoizedUnmaskedChildContext === t) return r.__reactInternalMemoizedMaskedChildContext;
|
|
var o = {}, i;
|
|
for (i in n) o[i] = t[i];
|
|
return r && (e = e.stateNode, e.__reactInternalMemoizedUnmaskedChildContext = t, e.__reactInternalMemoizedMaskedChildContext = o), o;
|
|
}
|
|
function st(e) {
|
|
return e = e.childContextTypes, e != null;
|
|
}
|
|
function tl() {
|
|
de(it), de(Ke);
|
|
}
|
|
function pm(e, t, n) {
|
|
if (Ke.current !== Jn) throw Error(R(168));
|
|
se(Ke, t), se(it, n);
|
|
}
|
|
function J0(e, t, n) {
|
|
var r = e.stateNode;
|
|
if (t = t.childContextTypes, typeof r.getChildContext != "function") return n;
|
|
r = r.getChildContext();
|
|
for (var o in r) if (!(o in t)) throw Error(R(108, Mw(e) || "Unknown", o));
|
|
return ve({}, n, r);
|
|
}
|
|
function nl(e) {
|
|
return e = (e = e.stateNode) && e.__reactInternalMemoizedMergedChildContext || Jn, _r = Ke.current, se(Ke, e), se(it, it.current), !0;
|
|
}
|
|
function mm(e, t, n) {
|
|
var r = e.stateNode;
|
|
if (!r) throw Error(R(169));
|
|
n ? (e = J0(e, t, _r), r.__reactInternalMemoizedMergedChildContext = e, de(it), de(Ke), se(Ke, e)) : de(it), se(it, n);
|
|
}
|
|
var yn = null, jl = !1, qu = !1;
|
|
function ev(e) {
|
|
yn === null ? yn = [e] : yn.push(e);
|
|
}
|
|
function Qk(e) {
|
|
jl = !0, ev(e);
|
|
}
|
|
function or() {
|
|
if (!qu && yn !== null) {
|
|
qu = !0;
|
|
var e = 0, t = te;
|
|
try {
|
|
var n = yn;
|
|
for (te = 1; e < n.length; e++) {
|
|
var r = n[e];
|
|
do
|
|
r = r(!0);
|
|
while (r !== null);
|
|
}
|
|
yn = null, jl = !1;
|
|
} catch (o) {
|
|
throw yn !== null && (yn = yn.slice(e + 1)), T0(zf, or), o;
|
|
} finally {
|
|
te = t, qu = !1;
|
|
}
|
|
}
|
|
return null;
|
|
}
|
|
var Zr = [], Jr = 0, rl = null, ol = 0, Ct = [], Tt = 0, $r = null, xn = 1, wn = "";
|
|
function dr(e, t) {
|
|
Zr[Jr++] = ol, Zr[Jr++] = rl, rl = e, ol = t;
|
|
}
|
|
function tv(e, t, n) {
|
|
Ct[Tt++] = xn, Ct[Tt++] = wn, Ct[Tt++] = $r, $r = e;
|
|
var r = xn;
|
|
e = wn;
|
|
var o = 32 - Nt(r) - 1;
|
|
r &= ~(1 << o), n += 1;
|
|
var i = 32 - Nt(t) + o;
|
|
if (30 < i) {
|
|
var s = o - o % 5;
|
|
i = (r & (1 << s) - 1).toString(32), r >>= s, o -= s, xn = 1 << 32 - Nt(t) + o | n << o | r, wn = i + e;
|
|
} else xn = 1 << i | n << o | r, wn = e;
|
|
}
|
|
function Of(e) {
|
|
e.return !== null && (dr(e, 1), tv(e, 1, 0));
|
|
}
|
|
function Nf(e) {
|
|
for (; e === rl; ) rl = Zr[--Jr], Zr[Jr] = null, ol = Zr[--Jr], Zr[Jr] = null;
|
|
for (; e === $r; ) $r = Ct[--Tt], Ct[Tt] = null, wn = Ct[--Tt], Ct[Tt] = null, xn = Ct[--Tt], Ct[Tt] = null;
|
|
}
|
|
var mt = null, pt = null, pe = !1, jt = null;
|
|
function nv(e, t) {
|
|
var n = Pt(5, null, null, 0);
|
|
n.elementType = "DELETED", n.stateNode = t, n.return = e, t = e.deletions, t === null ? (e.deletions = [n], e.flags |= 16) : t.push(n);
|
|
}
|
|
function gm(e, t) {
|
|
switch (e.tag) {
|
|
case 5:
|
|
var n = e.type;
|
|
return t = t.nodeType !== 1 || n.toLowerCase() !== t.nodeName.toLowerCase() ? null : t, t !== null ? (e.stateNode = t, mt = e, pt = Gn(t.firstChild), !0) : !1;
|
|
case 6:
|
|
return t = e.pendingProps === "" || t.nodeType !== 3 ? null : t, t !== null ? (e.stateNode = t, mt = e, pt = null, !0) : !1;
|
|
case 13:
|
|
return t = t.nodeType !== 8 ? null : t, t !== null ? (n = $r !== null ? { id: xn, overflow: wn } : null, e.memoizedState = { dehydrated: t, treeContext: n, retryLane: 1073741824 }, n = Pt(18, null, null, 0), n.stateNode = t, n.return = e, e.child = n, mt = e, pt = null, !0) : !1;
|
|
default:
|
|
return !1;
|
|
}
|
|
}
|
|
function pd(e) {
|
|
return (e.mode & 1) !== 0 && (e.flags & 128) === 0;
|
|
}
|
|
function md(e) {
|
|
if (pe) {
|
|
var t = pt;
|
|
if (t) {
|
|
var n = t;
|
|
if (!gm(e, t)) {
|
|
if (pd(e)) throw Error(R(418));
|
|
t = Gn(n.nextSibling);
|
|
var r = mt;
|
|
t && gm(e, t) ? nv(r, n) : (e.flags = e.flags & -4097 | 2, pe = !1, mt = e);
|
|
}
|
|
} else {
|
|
if (pd(e)) throw Error(R(418));
|
|
e.flags = e.flags & -4097 | 2, pe = !1, mt = e;
|
|
}
|
|
}
|
|
}
|
|
function ym(e) {
|
|
for (e = e.return; e !== null && e.tag !== 5 && e.tag !== 3 && e.tag !== 13; ) e = e.return;
|
|
mt = e;
|
|
}
|
|
function Ks(e) {
|
|
if (e !== mt) return !1;
|
|
if (!pe) return ym(e), pe = !0, !1;
|
|
var t;
|
|
if ((t = e.tag !== 3) && !(t = e.tag !== 5) && (t = e.type, t = t !== "head" && t !== "body" && !cd(e.type, e.memoizedProps)), t && (t = pt)) {
|
|
if (pd(e)) throw rv(), Error(R(418));
|
|
for (; t; ) nv(e, t), t = Gn(t.nextSibling);
|
|
}
|
|
if (ym(e), e.tag === 13) {
|
|
if (e = e.memoizedState, e = e !== null ? e.dehydrated : null, !e) throw Error(R(317));
|
|
e: {
|
|
for (e = e.nextSibling, t = 0; e; ) {
|
|
if (e.nodeType === 8) {
|
|
var n = e.data;
|
|
if (n === "/$") {
|
|
if (t === 0) {
|
|
pt = Gn(e.nextSibling);
|
|
break e;
|
|
}
|
|
t--;
|
|
} else n !== "$" && n !== "$!" && n !== "$?" || t++;
|
|
}
|
|
e = e.nextSibling;
|
|
}
|
|
pt = null;
|
|
}
|
|
} else pt = mt ? Gn(e.stateNode.nextSibling) : null;
|
|
return !0;
|
|
}
|
|
function rv() {
|
|
for (var e = pt; e; ) e = Gn(e.nextSibling);
|
|
}
|
|
function Po() {
|
|
pt = mt = null, pe = !1;
|
|
}
|
|
function Wf(e) {
|
|
jt === null ? jt = [e] : jt.push(e);
|
|
}
|
|
var qk = Rn.ReactCurrentBatchConfig;
|
|
function ti(e, t, n) {
|
|
if (e = n.ref, e !== null && typeof e != "function" && typeof e != "object") {
|
|
if (n._owner) {
|
|
if (n = n._owner, n) {
|
|
if (n.tag !== 1) throw Error(R(309));
|
|
var r = n.stateNode;
|
|
}
|
|
if (!r) throw Error(R(147, e));
|
|
var o = r, i = "" + e;
|
|
return t !== null && t.ref !== null && typeof t.ref == "function" && t.ref._stringRef === i ? t.ref : (t = function(s) {
|
|
var a = o.refs;
|
|
s === null ? delete a[i] : a[i] = s;
|
|
}, t._stringRef = i, t);
|
|
}
|
|
if (typeof e != "string") throw Error(R(284));
|
|
if (!n._owner) throw Error(R(290, e));
|
|
}
|
|
return e;
|
|
}
|
|
function Gs(e, t) {
|
|
throw e = Object.prototype.toString.call(t), Error(R(31, e === "[object Object]" ? "object with keys {" + Object.keys(t).join(", ") + "}" : e));
|
|
}
|
|
function vm(e) {
|
|
var t = e._init;
|
|
return t(e._payload);
|
|
}
|
|
function ov(e) {
|
|
function t(p, h) {
|
|
if (e) {
|
|
var g = p.deletions;
|
|
g === null ? (p.deletions = [h], p.flags |= 16) : g.push(h);
|
|
}
|
|
}
|
|
function n(p, h) {
|
|
if (!e) return null;
|
|
for (; h !== null; ) t(p, h), h = h.sibling;
|
|
return null;
|
|
}
|
|
function r(p, h) {
|
|
for (p = /* @__PURE__ */ new Map(); h !== null; ) h.key !== null ? p.set(h.key, h) : p.set(h.index, h), h = h.sibling;
|
|
return p;
|
|
}
|
|
function o(p, h) {
|
|
return p = qn(p, h), p.index = 0, p.sibling = null, p;
|
|
}
|
|
function i(p, h, g) {
|
|
return p.index = g, e ? (g = p.alternate, g !== null ? (g = g.index, g < h ? (p.flags |= 2, h) : g) : (p.flags |= 2, h)) : (p.flags |= 1048576, h);
|
|
}
|
|
function s(p) {
|
|
return e && p.alternate === null && (p.flags |= 2), p;
|
|
}
|
|
function a(p, h, g, w) {
|
|
return h === null || h.tag !== 6 ? (h = oc(g, p.mode, w), h.return = p, h) : (h = o(h, g), h.return = p, h);
|
|
}
|
|
function l(p, h, g, w) {
|
|
var E = g.type;
|
|
return E === Kr ? c(p, h, g.props.children, w, g.key) : h !== null && (h.elementType === E || typeof E == "object" && E !== null && E.$$typeof === Ln && vm(E) === h.type) ? (w = o(h, g.props), w.ref = ti(p, h, g), w.return = p, w) : (w = ka(g.type, g.key, g.props, null, p.mode, w), w.ref = ti(p, h, g), w.return = p, w);
|
|
}
|
|
function u(p, h, g, w) {
|
|
return h === null || h.tag !== 4 || h.stateNode.containerInfo !== g.containerInfo || h.stateNode.implementation !== g.implementation ? (h = ic(g, p.mode, w), h.return = p, h) : (h = o(h, g.children || []), h.return = p, h);
|
|
}
|
|
function c(p, h, g, w, E) {
|
|
return h === null || h.tag !== 7 ? (h = wr(g, p.mode, w, E), h.return = p, h) : (h = o(h, g), h.return = p, h);
|
|
}
|
|
function d(p, h, g) {
|
|
if (typeof h == "string" && h !== "" || typeof h == "number") return h = oc("" + h, p.mode, g), h.return = p, h;
|
|
if (typeof h == "object" && h !== null) {
|
|
switch (h.$$typeof) {
|
|
case Ls:
|
|
return g = ka(h.type, h.key, h.props, null, p.mode, g), g.ref = ti(p, null, h), g.return = p, g;
|
|
case Hr:
|
|
return h = ic(h, p.mode, g), h.return = p, h;
|
|
case Ln:
|
|
var w = h._init;
|
|
return d(p, w(h._payload), g);
|
|
}
|
|
if (ci(h) || Qo(h)) return h = wr(h, p.mode, g, null), h.return = p, h;
|
|
Gs(p, h);
|
|
}
|
|
return null;
|
|
}
|
|
function f(p, h, g, w) {
|
|
var E = h !== null ? h.key : null;
|
|
if (typeof g == "string" && g !== "" || typeof g == "number") return E !== null ? null : a(p, h, "" + g, w);
|
|
if (typeof g == "object" && g !== null) {
|
|
switch (g.$$typeof) {
|
|
case Ls:
|
|
return g.key === E ? l(p, h, g, w) : null;
|
|
case Hr:
|
|
return g.key === E ? u(p, h, g, w) : null;
|
|
case Ln:
|
|
return E = g._init, f(
|
|
p,
|
|
h,
|
|
E(g._payload),
|
|
w
|
|
);
|
|
}
|
|
if (ci(g) || Qo(g)) return E !== null ? null : c(p, h, g, w, null);
|
|
Gs(p, g);
|
|
}
|
|
return null;
|
|
}
|
|
function y(p, h, g, w, E) {
|
|
if (typeof w == "string" && w !== "" || typeof w == "number") return p = p.get(g) || null, a(h, p, "" + w, E);
|
|
if (typeof w == "object" && w !== null) {
|
|
switch (w.$$typeof) {
|
|
case Ls:
|
|
return p = p.get(w.key === null ? g : w.key) || null, l(h, p, w, E);
|
|
case Hr:
|
|
return p = p.get(w.key === null ? g : w.key) || null, u(h, p, w, E);
|
|
case Ln:
|
|
var _ = w._init;
|
|
return y(p, h, g, _(w._payload), E);
|
|
}
|
|
if (ci(w) || Qo(w)) return p = p.get(g) || null, c(h, p, w, E, null);
|
|
Gs(h, w);
|
|
}
|
|
return null;
|
|
}
|
|
function v(p, h, g, w) {
|
|
for (var E = null, _ = null, P = h, $ = h = 0, V = null; P !== null && $ < g.length; $++) {
|
|
P.index > $ ? (V = P, P = null) : V = P.sibling;
|
|
var A = f(p, P, g[$], w);
|
|
if (A === null) {
|
|
P === null && (P = V);
|
|
break;
|
|
}
|
|
e && P && A.alternate === null && t(p, P), h = i(A, h, $), _ === null ? E = A : _.sibling = A, _ = A, P = V;
|
|
}
|
|
if ($ === g.length) return n(p, P), pe && dr(p, $), E;
|
|
if (P === null) {
|
|
for (; $ < g.length; $++) P = d(p, g[$], w), P !== null && (h = i(P, h, $), _ === null ? E = P : _.sibling = P, _ = P);
|
|
return pe && dr(p, $), E;
|
|
}
|
|
for (P = r(p, P); $ < g.length; $++) V = y(P, p, $, g[$], w), V !== null && (e && V.alternate !== null && P.delete(V.key === null ? $ : V.key), h = i(V, h, $), _ === null ? E = V : _.sibling = V, _ = V);
|
|
return e && P.forEach(function(N) {
|
|
return t(p, N);
|
|
}), pe && dr(p, $), E;
|
|
}
|
|
function S(p, h, g, w) {
|
|
var E = Qo(g);
|
|
if (typeof E != "function") throw Error(R(150));
|
|
if (g = E.call(g), g == null) throw Error(R(151));
|
|
for (var _ = E = null, P = h, $ = h = 0, V = null, A = g.next(); P !== null && !A.done; $++, A = g.next()) {
|
|
P.index > $ ? (V = P, P = null) : V = P.sibling;
|
|
var N = f(p, P, A.value, w);
|
|
if (N === null) {
|
|
P === null && (P = V);
|
|
break;
|
|
}
|
|
e && P && N.alternate === null && t(p, P), h = i(N, h, $), _ === null ? E = N : _.sibling = N, _ = N, P = V;
|
|
}
|
|
if (A.done) return n(
|
|
p,
|
|
P
|
|
), pe && dr(p, $), E;
|
|
if (P === null) {
|
|
for (; !A.done; $++, A = g.next()) A = d(p, A.value, w), A !== null && (h = i(A, h, $), _ === null ? E = A : _.sibling = A, _ = A);
|
|
return pe && dr(p, $), E;
|
|
}
|
|
for (P = r(p, P); !A.done; $++, A = g.next()) A = y(P, p, $, A.value, w), A !== null && (e && A.alternate !== null && P.delete(A.key === null ? $ : A.key), h = i(A, h, $), _ === null ? E = A : _.sibling = A, _ = A);
|
|
return e && P.forEach(function(le) {
|
|
return t(p, le);
|
|
}), pe && dr(p, $), E;
|
|
}
|
|
function k(p, h, g, w) {
|
|
if (typeof g == "object" && g !== null && g.type === Kr && g.key === null && (g = g.props.children), typeof g == "object" && g !== null) {
|
|
switch (g.$$typeof) {
|
|
case Ls:
|
|
e: {
|
|
for (var E = g.key, _ = h; _ !== null; ) {
|
|
if (_.key === E) {
|
|
if (E = g.type, E === Kr) {
|
|
if (_.tag === 7) {
|
|
n(p, _.sibling), h = o(_, g.props.children), h.return = p, p = h;
|
|
break e;
|
|
}
|
|
} else if (_.elementType === E || typeof E == "object" && E !== null && E.$$typeof === Ln && vm(E) === _.type) {
|
|
n(p, _.sibling), h = o(_, g.props), h.ref = ti(p, _, g), h.return = p, p = h;
|
|
break e;
|
|
}
|
|
n(p, _);
|
|
break;
|
|
} else t(p, _);
|
|
_ = _.sibling;
|
|
}
|
|
g.type === Kr ? (h = wr(g.props.children, p.mode, w, g.key), h.return = p, p = h) : (w = ka(g.type, g.key, g.props, null, p.mode, w), w.ref = ti(p, h, g), w.return = p, p = w);
|
|
}
|
|
return s(p);
|
|
case Hr:
|
|
e: {
|
|
for (_ = g.key; h !== null; ) {
|
|
if (h.key === _) if (h.tag === 4 && h.stateNode.containerInfo === g.containerInfo && h.stateNode.implementation === g.implementation) {
|
|
n(p, h.sibling), h = o(h, g.children || []), h.return = p, p = h;
|
|
break e;
|
|
} else {
|
|
n(p, h);
|
|
break;
|
|
}
|
|
else t(p, h);
|
|
h = h.sibling;
|
|
}
|
|
h = ic(g, p.mode, w), h.return = p, p = h;
|
|
}
|
|
return s(p);
|
|
case Ln:
|
|
return _ = g._init, k(p, h, _(g._payload), w);
|
|
}
|
|
if (ci(g)) return v(p, h, g, w);
|
|
if (Qo(g)) return S(p, h, g, w);
|
|
Gs(p, g);
|
|
}
|
|
return typeof g == "string" && g !== "" || typeof g == "number" ? (g = "" + g, h !== null && h.tag === 6 ? (n(p, h.sibling), h = o(h, g), h.return = p, p = h) : (n(p, h), h = oc(g, p.mode, w), h.return = p, p = h), s(p)) : n(p, h);
|
|
}
|
|
return k;
|
|
}
|
|
var Eo = ov(!0), iv = ov(!1), il = rr(null), sl = null, eo = null, Uf = null;
|
|
function Hf() {
|
|
Uf = eo = sl = null;
|
|
}
|
|
function Kf(e) {
|
|
var t = il.current;
|
|
de(il), e._currentValue = t;
|
|
}
|
|
function gd(e, t, n) {
|
|
for (; e !== null; ) {
|
|
var r = e.alternate;
|
|
if ((e.childLanes & t) !== t ? (e.childLanes |= t, r !== null && (r.childLanes |= t)) : r !== null && (r.childLanes & t) !== t && (r.childLanes |= t), e === n) break;
|
|
e = e.return;
|
|
}
|
|
}
|
|
function yo(e, t) {
|
|
sl = e, Uf = eo = null, e = e.dependencies, e !== null && e.firstContext !== null && (e.lanes & t && (ot = !0), e.firstContext = null);
|
|
}
|
|
function At(e) {
|
|
var t = e._currentValue;
|
|
if (Uf !== e) if (e = { context: e, memoizedValue: t, next: null }, eo === null) {
|
|
if (sl === null) throw Error(R(308));
|
|
eo = e, sl.dependencies = { lanes: 0, firstContext: e };
|
|
} else eo = eo.next = e;
|
|
return t;
|
|
}
|
|
var gr = null;
|
|
function Gf(e) {
|
|
gr === null ? gr = [e] : gr.push(e);
|
|
}
|
|
function sv(e, t, n, r) {
|
|
var o = t.interleaved;
|
|
return o === null ? (n.next = n, Gf(t)) : (n.next = o.next, o.next = n), t.interleaved = n, _n(e, r);
|
|
}
|
|
function _n(e, t) {
|
|
e.lanes |= t;
|
|
var n = e.alternate;
|
|
for (n !== null && (n.lanes |= t), n = e, e = e.return; e !== null; ) e.childLanes |= t, n = e.alternate, n !== null && (n.childLanes |= t), n = e, e = e.return;
|
|
return n.tag === 3 ? n.stateNode : null;
|
|
}
|
|
var Vn = !1;
|
|
function Xf(e) {
|
|
e.updateQueue = { baseState: e.memoizedState, firstBaseUpdate: null, lastBaseUpdate: null, shared: { pending: null, interleaved: null, lanes: 0 }, effects: null };
|
|
}
|
|
function av(e, t) {
|
|
e = e.updateQueue, t.updateQueue === e && (t.updateQueue = { baseState: e.baseState, firstBaseUpdate: e.firstBaseUpdate, lastBaseUpdate: e.lastBaseUpdate, shared: e.shared, effects: e.effects });
|
|
}
|
|
function Cn(e, t) {
|
|
return { eventTime: e, lane: t, tag: 0, payload: null, callback: null, next: null };
|
|
}
|
|
function Xn(e, t, n) {
|
|
var r = e.updateQueue;
|
|
if (r === null) return null;
|
|
if (r = r.shared, K & 2) {
|
|
var o = r.pending;
|
|
return o === null ? t.next = t : (t.next = o.next, o.next = t), r.pending = t, _n(e, n);
|
|
}
|
|
return o = r.interleaved, o === null ? (t.next = t, Gf(r)) : (t.next = o.next, o.next = t), r.interleaved = t, _n(e, n);
|
|
}
|
|
function ya(e, t, n) {
|
|
if (t = t.updateQueue, t !== null && (t = t.shared, (n & 4194240) !== 0)) {
|
|
var r = t.lanes;
|
|
r &= e.pendingLanes, n |= r, t.lanes = n, Mf(e, n);
|
|
}
|
|
}
|
|
function Sm(e, t) {
|
|
var n = e.updateQueue, r = e.alternate;
|
|
if (r !== null && (r = r.updateQueue, n === r)) {
|
|
var o = null, i = null;
|
|
if (n = n.firstBaseUpdate, n !== null) {
|
|
do {
|
|
var s = { eventTime: n.eventTime, lane: n.lane, tag: n.tag, payload: n.payload, callback: n.callback, next: null };
|
|
i === null ? o = i = s : i = i.next = s, n = n.next;
|
|
} while (n !== null);
|
|
i === null ? o = i = t : i = i.next = t;
|
|
} else o = i = t;
|
|
n = { baseState: r.baseState, firstBaseUpdate: o, lastBaseUpdate: i, shared: r.shared, effects: r.effects }, e.updateQueue = n;
|
|
return;
|
|
}
|
|
e = n.lastBaseUpdate, e === null ? n.firstBaseUpdate = t : e.next = t, n.lastBaseUpdate = t;
|
|
}
|
|
function al(e, t, n, r) {
|
|
var o = e.updateQueue;
|
|
Vn = !1;
|
|
var i = o.firstBaseUpdate, s = o.lastBaseUpdate, a = o.shared.pending;
|
|
if (a !== null) {
|
|
o.shared.pending = null;
|
|
var l = a, u = l.next;
|
|
l.next = null, s === null ? i = u : s.next = u, s = l;
|
|
var c = e.alternate;
|
|
c !== null && (c = c.updateQueue, a = c.lastBaseUpdate, a !== s && (a === null ? c.firstBaseUpdate = u : a.next = u, c.lastBaseUpdate = l));
|
|
}
|
|
if (i !== null) {
|
|
var d = o.baseState;
|
|
s = 0, c = u = l = null, a = i;
|
|
do {
|
|
var f = a.lane, y = a.eventTime;
|
|
if ((r & f) === f) {
|
|
c !== null && (c = c.next = {
|
|
eventTime: y,
|
|
lane: 0,
|
|
tag: a.tag,
|
|
payload: a.payload,
|
|
callback: a.callback,
|
|
next: null
|
|
});
|
|
e: {
|
|
var v = e, S = a;
|
|
switch (f = t, y = n, S.tag) {
|
|
case 1:
|
|
if (v = S.payload, typeof v == "function") {
|
|
d = v.call(y, d, f);
|
|
break e;
|
|
}
|
|
d = v;
|
|
break e;
|
|
case 3:
|
|
v.flags = v.flags & -65537 | 128;
|
|
case 0:
|
|
if (v = S.payload, f = typeof v == "function" ? v.call(y, d, f) : v, f == null) break e;
|
|
d = ve({}, d, f);
|
|
break e;
|
|
case 2:
|
|
Vn = !0;
|
|
}
|
|
}
|
|
a.callback !== null && a.lane !== 0 && (e.flags |= 64, f = o.effects, f === null ? o.effects = [a] : f.push(a));
|
|
} else y = { eventTime: y, lane: f, tag: a.tag, payload: a.payload, callback: a.callback, next: null }, c === null ? (u = c = y, l = d) : c = c.next = y, s |= f;
|
|
if (a = a.next, a === null) {
|
|
if (a = o.shared.pending, a === null) break;
|
|
f = a, a = f.next, f.next = null, o.lastBaseUpdate = f, o.shared.pending = null;
|
|
}
|
|
} while (!0);
|
|
if (c === null && (l = d), o.baseState = l, o.firstBaseUpdate = u, o.lastBaseUpdate = c, t = o.shared.interleaved, t !== null) {
|
|
o = t;
|
|
do
|
|
s |= o.lane, o = o.next;
|
|
while (o !== t);
|
|
} else i === null && (o.shared.lanes = 0);
|
|
Rr |= s, e.lanes = s, e.memoizedState = d;
|
|
}
|
|
}
|
|
function bm(e, t, n) {
|
|
if (e = t.effects, t.effects = null, e !== null) for (t = 0; t < e.length; t++) {
|
|
var r = e[t], o = r.callback;
|
|
if (o !== null) {
|
|
if (r.callback = null, r = n, typeof o != "function") throw Error(R(191, o));
|
|
o.call(r);
|
|
}
|
|
}
|
|
}
|
|
var gs = {}, ln = rr(gs), Qi = rr(gs), qi = rr(gs);
|
|
function yr(e) {
|
|
if (e === gs) throw Error(R(174));
|
|
return e;
|
|
}
|
|
function Yf(e, t) {
|
|
switch (se(qi, t), se(Qi, e), se(ln, gs), e = t.nodeType, e) {
|
|
case 9:
|
|
case 11:
|
|
t = (t = t.documentElement) ? t.namespaceURI : Qc(null, "");
|
|
break;
|
|
default:
|
|
e = e === 8 ? t.parentNode : t, t = e.namespaceURI || null, e = e.tagName, t = Qc(t, e);
|
|
}
|
|
de(ln), se(ln, t);
|
|
}
|
|
function _o() {
|
|
de(ln), de(Qi), de(qi);
|
|
}
|
|
function lv(e) {
|
|
yr(qi.current);
|
|
var t = yr(ln.current), n = Qc(t, e.type);
|
|
t !== n && (se(Qi, e), se(ln, n));
|
|
}
|
|
function Qf(e) {
|
|
Qi.current === e && (de(ln), de(Qi));
|
|
}
|
|
var ge = rr(0);
|
|
function ll(e) {
|
|
for (var t = e; t !== null; ) {
|
|
if (t.tag === 13) {
|
|
var n = t.memoizedState;
|
|
if (n !== null && (n = n.dehydrated, n === null || n.data === "$?" || n.data === "$!")) return t;
|
|
} else if (t.tag === 19 && t.memoizedProps.revealOrder !== void 0) {
|
|
if (t.flags & 128) return t;
|
|
} else if (t.child !== null) {
|
|
t.child.return = t, t = t.child;
|
|
continue;
|
|
}
|
|
if (t === e) break;
|
|
for (; t.sibling === null; ) {
|
|
if (t.return === null || t.return === e) return null;
|
|
t = t.return;
|
|
}
|
|
t.sibling.return = t.return, t = t.sibling;
|
|
}
|
|
return null;
|
|
}
|
|
var Zu = [];
|
|
function qf() {
|
|
for (var e = 0; e < Zu.length; e++) Zu[e]._workInProgressVersionPrimary = null;
|
|
Zu.length = 0;
|
|
}
|
|
var va = Rn.ReactCurrentDispatcher, Ju = Rn.ReactCurrentBatchConfig, Ar = 0, ye = null, _e = null, Re = null, ul = !1, Ci = !1, Zi = 0, Zk = 0;
|
|
function Ne() {
|
|
throw Error(R(321));
|
|
}
|
|
function Zf(e, t) {
|
|
if (t === null) return !1;
|
|
for (var n = 0; n < t.length && n < e.length; n++) if (!Kt(e[n], t[n])) return !1;
|
|
return !0;
|
|
}
|
|
function Jf(e, t, n, r, o, i) {
|
|
if (Ar = i, ye = t, t.memoizedState = null, t.updateQueue = null, t.lanes = 0, va.current = e === null || e.memoizedState === null ? nC : rC, e = n(r, o), Ci) {
|
|
i = 0;
|
|
do {
|
|
if (Ci = !1, Zi = 0, 25 <= i) throw Error(R(301));
|
|
i += 1, Re = _e = null, t.updateQueue = null, va.current = oC, e = n(r, o);
|
|
} while (Ci);
|
|
}
|
|
if (va.current = cl, t = _e !== null && _e.next !== null, Ar = 0, Re = _e = ye = null, ul = !1, t) throw Error(R(300));
|
|
return e;
|
|
}
|
|
function eh() {
|
|
var e = Zi !== 0;
|
|
return Zi = 0, e;
|
|
}
|
|
function qt() {
|
|
var e = { memoizedState: null, baseState: null, baseQueue: null, queue: null, next: null };
|
|
return Re === null ? ye.memoizedState = Re = e : Re = Re.next = e, Re;
|
|
}
|
|
function Rt() {
|
|
if (_e === null) {
|
|
var e = ye.alternate;
|
|
e = e !== null ? e.memoizedState : null;
|
|
} else e = _e.next;
|
|
var t = Re === null ? ye.memoizedState : Re.next;
|
|
if (t !== null) Re = t, _e = e;
|
|
else {
|
|
if (e === null) throw Error(R(310));
|
|
_e = e, e = { memoizedState: _e.memoizedState, baseState: _e.baseState, baseQueue: _e.baseQueue, queue: _e.queue, next: null }, Re === null ? ye.memoizedState = Re = e : Re = Re.next = e;
|
|
}
|
|
return Re;
|
|
}
|
|
function Ji(e, t) {
|
|
return typeof t == "function" ? t(e) : t;
|
|
}
|
|
function ec(e) {
|
|
var t = Rt(), n = t.queue;
|
|
if (n === null) throw Error(R(311));
|
|
n.lastRenderedReducer = e;
|
|
var r = _e, o = r.baseQueue, i = n.pending;
|
|
if (i !== null) {
|
|
if (o !== null) {
|
|
var s = o.next;
|
|
o.next = i.next, i.next = s;
|
|
}
|
|
r.baseQueue = o = i, n.pending = null;
|
|
}
|
|
if (o !== null) {
|
|
i = o.next, r = r.baseState;
|
|
var a = s = null, l = null, u = i;
|
|
do {
|
|
var c = u.lane;
|
|
if ((Ar & c) === c) l !== null && (l = l.next = { lane: 0, action: u.action, hasEagerState: u.hasEagerState, eagerState: u.eagerState, next: null }), r = u.hasEagerState ? u.eagerState : e(r, u.action);
|
|
else {
|
|
var d = {
|
|
lane: c,
|
|
action: u.action,
|
|
hasEagerState: u.hasEagerState,
|
|
eagerState: u.eagerState,
|
|
next: null
|
|
};
|
|
l === null ? (a = l = d, s = r) : l = l.next = d, ye.lanes |= c, Rr |= c;
|
|
}
|
|
u = u.next;
|
|
} while (u !== null && u !== i);
|
|
l === null ? s = r : l.next = a, Kt(r, t.memoizedState) || (ot = !0), t.memoizedState = r, t.baseState = s, t.baseQueue = l, n.lastRenderedState = r;
|
|
}
|
|
if (e = n.interleaved, e !== null) {
|
|
o = e;
|
|
do
|
|
i = o.lane, ye.lanes |= i, Rr |= i, o = o.next;
|
|
while (o !== e);
|
|
} else o === null && (n.lanes = 0);
|
|
return [t.memoizedState, n.dispatch];
|
|
}
|
|
function tc(e) {
|
|
var t = Rt(), n = t.queue;
|
|
if (n === null) throw Error(R(311));
|
|
n.lastRenderedReducer = e;
|
|
var r = n.dispatch, o = n.pending, i = t.memoizedState;
|
|
if (o !== null) {
|
|
n.pending = null;
|
|
var s = o = o.next;
|
|
do
|
|
i = e(i, s.action), s = s.next;
|
|
while (s !== o);
|
|
Kt(i, t.memoizedState) || (ot = !0), t.memoizedState = i, t.baseQueue === null && (t.baseState = i), n.lastRenderedState = i;
|
|
}
|
|
return [i, r];
|
|
}
|
|
function uv() {
|
|
}
|
|
function cv(e, t) {
|
|
var n = ye, r = Rt(), o = t(), i = !Kt(r.memoizedState, o);
|
|
if (i && (r.memoizedState = o, ot = !0), r = r.queue, th(hv.bind(null, n, r, e), [e]), r.getSnapshot !== t || i || Re !== null && Re.memoizedState.tag & 1) {
|
|
if (n.flags |= 2048, es(9, fv.bind(null, n, r, o, t), void 0, null), ze === null) throw Error(R(349));
|
|
Ar & 30 || dv(n, t, o);
|
|
}
|
|
return o;
|
|
}
|
|
function dv(e, t, n) {
|
|
e.flags |= 16384, e = { getSnapshot: t, value: n }, t = ye.updateQueue, t === null ? (t = { lastEffect: null, stores: null }, ye.updateQueue = t, t.stores = [e]) : (n = t.stores, n === null ? t.stores = [e] : n.push(e));
|
|
}
|
|
function fv(e, t, n, r) {
|
|
t.value = n, t.getSnapshot = r, pv(t) && mv(e);
|
|
}
|
|
function hv(e, t, n) {
|
|
return n(function() {
|
|
pv(t) && mv(e);
|
|
});
|
|
}
|
|
function pv(e) {
|
|
var t = e.getSnapshot;
|
|
e = e.value;
|
|
try {
|
|
var n = t();
|
|
return !Kt(e, n);
|
|
} catch {
|
|
return !0;
|
|
}
|
|
}
|
|
function mv(e) {
|
|
var t = _n(e, 1);
|
|
t !== null && Wt(t, e, 1, -1);
|
|
}
|
|
function xm(e) {
|
|
var t = qt();
|
|
return typeof e == "function" && (e = e()), t.memoizedState = t.baseState = e, e = { pending: null, interleaved: null, lanes: 0, dispatch: null, lastRenderedReducer: Ji, lastRenderedState: e }, t.queue = e, e = e.dispatch = tC.bind(null, ye, e), [t.memoizedState, e];
|
|
}
|
|
function es(e, t, n, r) {
|
|
return e = { tag: e, create: t, destroy: n, deps: r, next: null }, t = ye.updateQueue, t === null ? (t = { lastEffect: null, stores: null }, ye.updateQueue = t, t.lastEffect = e.next = e) : (n = t.lastEffect, n === null ? t.lastEffect = e.next = e : (r = n.next, n.next = e, e.next = r, t.lastEffect = e)), e;
|
|
}
|
|
function gv() {
|
|
return Rt().memoizedState;
|
|
}
|
|
function Sa(e, t, n, r) {
|
|
var o = qt();
|
|
ye.flags |= e, o.memoizedState = es(1 | t, n, void 0, r === void 0 ? null : r);
|
|
}
|
|
function Ol(e, t, n, r) {
|
|
var o = Rt();
|
|
r = r === void 0 ? null : r;
|
|
var i = void 0;
|
|
if (_e !== null) {
|
|
var s = _e.memoizedState;
|
|
if (i = s.destroy, r !== null && Zf(r, s.deps)) {
|
|
o.memoizedState = es(t, n, i, r);
|
|
return;
|
|
}
|
|
}
|
|
ye.flags |= e, o.memoizedState = es(1 | t, n, i, r);
|
|
}
|
|
function wm(e, t) {
|
|
return Sa(8390656, 8, e, t);
|
|
}
|
|
function th(e, t) {
|
|
return Ol(2048, 8, e, t);
|
|
}
|
|
function yv(e, t) {
|
|
return Ol(4, 2, e, t);
|
|
}
|
|
function vv(e, t) {
|
|
return Ol(4, 4, e, t);
|
|
}
|
|
function Sv(e, t) {
|
|
if (typeof t == "function") return e = e(), t(e), function() {
|
|
t(null);
|
|
};
|
|
if (t != null) return e = e(), t.current = e, function() {
|
|
t.current = null;
|
|
};
|
|
}
|
|
function bv(e, t, n) {
|
|
return n = n != null ? n.concat([e]) : null, Ol(4, 4, Sv.bind(null, t, e), n);
|
|
}
|
|
function nh() {
|
|
}
|
|
function xv(e, t) {
|
|
var n = Rt();
|
|
t = t === void 0 ? null : t;
|
|
var r = n.memoizedState;
|
|
return r !== null && t !== null && Zf(t, r[1]) ? r[0] : (n.memoizedState = [e, t], e);
|
|
}
|
|
function wv(e, t) {
|
|
var n = Rt();
|
|
t = t === void 0 ? null : t;
|
|
var r = n.memoizedState;
|
|
return r !== null && t !== null && Zf(t, r[1]) ? r[0] : (e = e(), n.memoizedState = [e, t], e);
|
|
}
|
|
function kv(e, t, n) {
|
|
return Ar & 21 ? (Kt(n, t) || (n = _0(), ye.lanes |= n, Rr |= n, e.baseState = !0), t) : (e.baseState && (e.baseState = !1, ot = !0), e.memoizedState = n);
|
|
}
|
|
function Jk(e, t) {
|
|
var n = te;
|
|
te = n !== 0 && 4 > n ? n : 4, e(!0);
|
|
var r = Ju.transition;
|
|
Ju.transition = {};
|
|
try {
|
|
e(!1), t();
|
|
} finally {
|
|
te = n, Ju.transition = r;
|
|
}
|
|
}
|
|
function Cv() {
|
|
return Rt().memoizedState;
|
|
}
|
|
function eC(e, t, n) {
|
|
var r = Qn(e);
|
|
if (n = { lane: r, action: n, hasEagerState: !1, eagerState: null, next: null }, Tv(e)) Pv(t, n);
|
|
else if (n = sv(e, t, n, r), n !== null) {
|
|
var o = Ze();
|
|
Wt(n, e, r, o), Ev(n, t, r);
|
|
}
|
|
}
|
|
function tC(e, t, n) {
|
|
var r = Qn(e), o = { lane: r, action: n, hasEagerState: !1, eagerState: null, next: null };
|
|
if (Tv(e)) Pv(t, o);
|
|
else {
|
|
var i = e.alternate;
|
|
if (e.lanes === 0 && (i === null || i.lanes === 0) && (i = t.lastRenderedReducer, i !== null)) try {
|
|
var s = t.lastRenderedState, a = i(s, n);
|
|
if (o.hasEagerState = !0, o.eagerState = a, Kt(a, s)) {
|
|
var l = t.interleaved;
|
|
l === null ? (o.next = o, Gf(t)) : (o.next = l.next, l.next = o), t.interleaved = o;
|
|
return;
|
|
}
|
|
} catch {
|
|
} finally {
|
|
}
|
|
n = sv(e, t, o, r), n !== null && (o = Ze(), Wt(n, e, r, o), Ev(n, t, r));
|
|
}
|
|
}
|
|
function Tv(e) {
|
|
var t = e.alternate;
|
|
return e === ye || t !== null && t === ye;
|
|
}
|
|
function Pv(e, t) {
|
|
Ci = ul = !0;
|
|
var n = e.pending;
|
|
n === null ? t.next = t : (t.next = n.next, n.next = t), e.pending = t;
|
|
}
|
|
function Ev(e, t, n) {
|
|
if (n & 4194240) {
|
|
var r = t.lanes;
|
|
r &= e.pendingLanes, n |= r, t.lanes = n, Mf(e, n);
|
|
}
|
|
}
|
|
var cl = { readContext: At, useCallback: Ne, useContext: Ne, useEffect: Ne, useImperativeHandle: Ne, useInsertionEffect: Ne, useLayoutEffect: Ne, useMemo: Ne, useReducer: Ne, useRef: Ne, useState: Ne, useDebugValue: Ne, useDeferredValue: Ne, useTransition: Ne, useMutableSource: Ne, useSyncExternalStore: Ne, useId: Ne, unstable_isNewReconciler: !1 }, nC = { readContext: At, useCallback: function(e, t) {
|
|
return qt().memoizedState = [e, t === void 0 ? null : t], e;
|
|
}, useContext: At, useEffect: wm, useImperativeHandle: function(e, t, n) {
|
|
return n = n != null ? n.concat([e]) : null, Sa(
|
|
4194308,
|
|
4,
|
|
Sv.bind(null, t, e),
|
|
n
|
|
);
|
|
}, useLayoutEffect: function(e, t) {
|
|
return Sa(4194308, 4, e, t);
|
|
}, useInsertionEffect: function(e, t) {
|
|
return Sa(4, 2, e, t);
|
|
}, useMemo: function(e, t) {
|
|
var n = qt();
|
|
return t = t === void 0 ? null : t, e = e(), n.memoizedState = [e, t], e;
|
|
}, useReducer: function(e, t, n) {
|
|
var r = qt();
|
|
return t = n !== void 0 ? n(t) : t, r.memoizedState = r.baseState = t, e = { pending: null, interleaved: null, lanes: 0, dispatch: null, lastRenderedReducer: e, lastRenderedState: t }, r.queue = e, e = e.dispatch = eC.bind(null, ye, e), [r.memoizedState, e];
|
|
}, useRef: function(e) {
|
|
var t = qt();
|
|
return e = { current: e }, t.memoizedState = e;
|
|
}, useState: xm, useDebugValue: nh, useDeferredValue: function(e) {
|
|
return qt().memoizedState = e;
|
|
}, useTransition: function() {
|
|
var e = xm(!1), t = e[0];
|
|
return e = Jk.bind(null, e[1]), qt().memoizedState = e, [t, e];
|
|
}, useMutableSource: function() {
|
|
}, useSyncExternalStore: function(e, t, n) {
|
|
var r = ye, o = qt();
|
|
if (pe) {
|
|
if (n === void 0) throw Error(R(407));
|
|
n = n();
|
|
} else {
|
|
if (n = t(), ze === null) throw Error(R(349));
|
|
Ar & 30 || dv(r, t, n);
|
|
}
|
|
o.memoizedState = n;
|
|
var i = { value: n, getSnapshot: t };
|
|
return o.queue = i, wm(hv.bind(
|
|
null,
|
|
r,
|
|
i,
|
|
e
|
|
), [e]), r.flags |= 2048, es(9, fv.bind(null, r, i, n, t), void 0, null), n;
|
|
}, useId: function() {
|
|
var e = qt(), t = ze.identifierPrefix;
|
|
if (pe) {
|
|
var n = wn, r = xn;
|
|
n = (r & ~(1 << 32 - Nt(r) - 1)).toString(32) + n, t = ":" + t + "R" + n, n = Zi++, 0 < n && (t += "H" + n.toString(32)), t += ":";
|
|
} else n = Zk++, t = ":" + t + "r" + n.toString(32) + ":";
|
|
return e.memoizedState = t;
|
|
}, unstable_isNewReconciler: !1 }, rC = {
|
|
readContext: At,
|
|
useCallback: xv,
|
|
useContext: At,
|
|
useEffect: th,
|
|
useImperativeHandle: bv,
|
|
useInsertionEffect: yv,
|
|
useLayoutEffect: vv,
|
|
useMemo: wv,
|
|
useReducer: ec,
|
|
useRef: gv,
|
|
useState: function() {
|
|
return ec(Ji);
|
|
},
|
|
useDebugValue: nh,
|
|
useDeferredValue: function(e) {
|
|
var t = Rt();
|
|
return kv(t, _e.memoizedState, e);
|
|
},
|
|
useTransition: function() {
|
|
var e = ec(Ji)[0], t = Rt().memoizedState;
|
|
return [e, t];
|
|
},
|
|
useMutableSource: uv,
|
|
useSyncExternalStore: cv,
|
|
useId: Cv,
|
|
unstable_isNewReconciler: !1
|
|
}, oC = { readContext: At, useCallback: xv, useContext: At, useEffect: th, useImperativeHandle: bv, useInsertionEffect: yv, useLayoutEffect: vv, useMemo: wv, useReducer: tc, useRef: gv, useState: function() {
|
|
return tc(Ji);
|
|
}, useDebugValue: nh, useDeferredValue: function(e) {
|
|
var t = Rt();
|
|
return _e === null ? t.memoizedState = e : kv(t, _e.memoizedState, e);
|
|
}, useTransition: function() {
|
|
var e = tc(Ji)[0], t = Rt().memoizedState;
|
|
return [e, t];
|
|
}, useMutableSource: uv, useSyncExternalStore: cv, useId: Cv, unstable_isNewReconciler: !1 };
|
|
function Bt(e, t) {
|
|
if (e && e.defaultProps) {
|
|
t = ve({}, t), e = e.defaultProps;
|
|
for (var n in e) t[n] === void 0 && (t[n] = e[n]);
|
|
return t;
|
|
}
|
|
return t;
|
|
}
|
|
function yd(e, t, n, r) {
|
|
t = e.memoizedState, n = n(r, t), n = n == null ? t : ve({}, t, n), e.memoizedState = n, e.lanes === 0 && (e.updateQueue.baseState = n);
|
|
}
|
|
var Nl = { isMounted: function(e) {
|
|
return (e = e._reactInternals) ? Lr(e) === e : !1;
|
|
}, enqueueSetState: function(e, t, n) {
|
|
e = e._reactInternals;
|
|
var r = Ze(), o = Qn(e), i = Cn(r, o);
|
|
i.payload = t, n != null && (i.callback = n), t = Xn(e, i, o), t !== null && (Wt(t, e, o, r), ya(t, e, o));
|
|
}, enqueueReplaceState: function(e, t, n) {
|
|
e = e._reactInternals;
|
|
var r = Ze(), o = Qn(e), i = Cn(r, o);
|
|
i.tag = 1, i.payload = t, n != null && (i.callback = n), t = Xn(e, i, o), t !== null && (Wt(t, e, o, r), ya(t, e, o));
|
|
}, enqueueForceUpdate: function(e, t) {
|
|
e = e._reactInternals;
|
|
var n = Ze(), r = Qn(e), o = Cn(n, r);
|
|
o.tag = 2, t != null && (o.callback = t), t = Xn(e, o, r), t !== null && (Wt(t, e, r, n), ya(t, e, r));
|
|
} };
|
|
function km(e, t, n, r, o, i, s) {
|
|
return e = e.stateNode, typeof e.shouldComponentUpdate == "function" ? e.shouldComponentUpdate(r, i, s) : t.prototype && t.prototype.isPureReactComponent ? !Ki(n, r) || !Ki(o, i) : !0;
|
|
}
|
|
function _v(e, t, n) {
|
|
var r = !1, o = Jn, i = t.contextType;
|
|
return typeof i == "object" && i !== null ? i = At(i) : (o = st(t) ? _r : Ke.current, r = t.contextTypes, i = (r = r != null) ? To(e, o) : Jn), t = new t(n, i), e.memoizedState = t.state !== null && t.state !== void 0 ? t.state : null, t.updater = Nl, e.stateNode = t, t._reactInternals = e, r && (e = e.stateNode, e.__reactInternalMemoizedUnmaskedChildContext = o, e.__reactInternalMemoizedMaskedChildContext = i), t;
|
|
}
|
|
function Cm(e, t, n, r) {
|
|
e = t.state, typeof t.componentWillReceiveProps == "function" && t.componentWillReceiveProps(n, r), typeof t.UNSAFE_componentWillReceiveProps == "function" && t.UNSAFE_componentWillReceiveProps(n, r), t.state !== e && Nl.enqueueReplaceState(t, t.state, null);
|
|
}
|
|
function vd(e, t, n, r) {
|
|
var o = e.stateNode;
|
|
o.props = n, o.state = e.memoizedState, o.refs = {}, Xf(e);
|
|
var i = t.contextType;
|
|
typeof i == "object" && i !== null ? o.context = At(i) : (i = st(t) ? _r : Ke.current, o.context = To(e, i)), o.state = e.memoizedState, i = t.getDerivedStateFromProps, typeof i == "function" && (yd(e, t, i, n), o.state = e.memoizedState), typeof t.getDerivedStateFromProps == "function" || typeof o.getSnapshotBeforeUpdate == "function" || typeof o.UNSAFE_componentWillMount != "function" && typeof o.componentWillMount != "function" || (t = o.state, typeof o.componentWillMount == "function" && o.componentWillMount(), typeof o.UNSAFE_componentWillMount == "function" && o.UNSAFE_componentWillMount(), t !== o.state && Nl.enqueueReplaceState(o, o.state, null), al(e, n, o, r), o.state = e.memoizedState), typeof o.componentDidMount == "function" && (e.flags |= 4194308);
|
|
}
|
|
function $o(e, t) {
|
|
try {
|
|
var n = "", r = t;
|
|
do
|
|
n += zw(r), r = r.return;
|
|
while (r);
|
|
var o = n;
|
|
} catch (i) {
|
|
o = `
|
|
Error generating stack: ` + i.message + `
|
|
` + i.stack;
|
|
}
|
|
return { value: e, source: t, stack: o, digest: null };
|
|
}
|
|
function nc(e, t, n) {
|
|
return { value: e, source: null, stack: n ?? null, digest: t ?? null };
|
|
}
|
|
function Sd(e, t) {
|
|
try {
|
|
console.error(t.value);
|
|
} catch (n) {
|
|
setTimeout(function() {
|
|
throw n;
|
|
});
|
|
}
|
|
}
|
|
var iC = typeof WeakMap == "function" ? WeakMap : Map;
|
|
function $v(e, t, n) {
|
|
n = Cn(-1, n), n.tag = 3, n.payload = { element: null };
|
|
var r = t.value;
|
|
return n.callback = function() {
|
|
fl || (fl = !0, $d = r), Sd(e, t);
|
|
}, n;
|
|
}
|
|
function Av(e, t, n) {
|
|
n = Cn(-1, n), n.tag = 3;
|
|
var r = e.type.getDerivedStateFromError;
|
|
if (typeof r == "function") {
|
|
var o = t.value;
|
|
n.payload = function() {
|
|
return r(o);
|
|
}, n.callback = function() {
|
|
Sd(e, t);
|
|
};
|
|
}
|
|
var i = e.stateNode;
|
|
return i !== null && typeof i.componentDidCatch == "function" && (n.callback = function() {
|
|
Sd(e, t), typeof r != "function" && (Yn === null ? Yn = /* @__PURE__ */ new Set([this]) : Yn.add(this));
|
|
var s = t.stack;
|
|
this.componentDidCatch(t.value, { componentStack: s !== null ? s : "" });
|
|
}), n;
|
|
}
|
|
function Tm(e, t, n) {
|
|
var r = e.pingCache;
|
|
if (r === null) {
|
|
r = e.pingCache = new iC();
|
|
var o = /* @__PURE__ */ new Set();
|
|
r.set(t, o);
|
|
} else o = r.get(t), o === void 0 && (o = /* @__PURE__ */ new Set(), r.set(t, o));
|
|
o.has(n) || (o.add(n), e = SC.bind(null, e, t, n), t.then(e, e));
|
|
}
|
|
function Pm(e) {
|
|
do {
|
|
var t;
|
|
if ((t = e.tag === 13) && (t = e.memoizedState, t = t !== null ? t.dehydrated !== null : !0), t) return e;
|
|
e = e.return;
|
|
} while (e !== null);
|
|
return null;
|
|
}
|
|
function Em(e, t, n, r, o) {
|
|
return e.mode & 1 ? (e.flags |= 65536, e.lanes = o, e) : (e === t ? e.flags |= 65536 : (e.flags |= 128, n.flags |= 131072, n.flags &= -52805, n.tag === 1 && (n.alternate === null ? n.tag = 17 : (t = Cn(-1, 1), t.tag = 2, Xn(n, t, 1))), n.lanes |= 1), e);
|
|
}
|
|
var sC = Rn.ReactCurrentOwner, ot = !1;
|
|
function Xe(e, t, n, r) {
|
|
t.child = e === null ? iv(t, null, n, r) : Eo(t, e.child, n, r);
|
|
}
|
|
function _m(e, t, n, r, o) {
|
|
n = n.render;
|
|
var i = t.ref;
|
|
return yo(t, o), r = Jf(e, t, n, r, i, o), n = eh(), e !== null && !ot ? (t.updateQueue = e.updateQueue, t.flags &= -2053, e.lanes &= ~o, $n(e, t, o)) : (pe && n && Of(t), t.flags |= 1, Xe(e, t, r, o), t.child);
|
|
}
|
|
function $m(e, t, n, r, o) {
|
|
if (e === null) {
|
|
var i = n.type;
|
|
return typeof i == "function" && !ch(i) && i.defaultProps === void 0 && n.compare === null && n.defaultProps === void 0 ? (t.tag = 15, t.type = i, Rv(e, t, i, r, o)) : (e = ka(n.type, null, r, t, t.mode, o), e.ref = t.ref, e.return = t, t.child = e);
|
|
}
|
|
if (i = e.child, !(e.lanes & o)) {
|
|
var s = i.memoizedProps;
|
|
if (n = n.compare, n = n !== null ? n : Ki, n(s, r) && e.ref === t.ref) return $n(e, t, o);
|
|
}
|
|
return t.flags |= 1, e = qn(i, r), e.ref = t.ref, e.return = t, t.child = e;
|
|
}
|
|
function Rv(e, t, n, r, o) {
|
|
if (e !== null) {
|
|
var i = e.memoizedProps;
|
|
if (Ki(i, r) && e.ref === t.ref) if (ot = !1, t.pendingProps = r = i, (e.lanes & o) !== 0) e.flags & 131072 && (ot = !0);
|
|
else return t.lanes = e.lanes, $n(e, t, o);
|
|
}
|
|
return bd(e, t, n, r, o);
|
|
}
|
|
function zv(e, t, n) {
|
|
var r = t.pendingProps, o = r.children, i = e !== null ? e.memoizedState : null;
|
|
if (r.mode === "hidden") if (!(t.mode & 1)) t.memoizedState = { baseLanes: 0, cachePool: null, transitions: null }, se(no, ht), ht |= n;
|
|
else {
|
|
if (!(n & 1073741824)) return e = i !== null ? i.baseLanes | n : n, t.lanes = t.childLanes = 1073741824, t.memoizedState = { baseLanes: e, cachePool: null, transitions: null }, t.updateQueue = null, se(no, ht), ht |= e, null;
|
|
t.memoizedState = { baseLanes: 0, cachePool: null, transitions: null }, r = i !== null ? i.baseLanes : n, se(no, ht), ht |= r;
|
|
}
|
|
else i !== null ? (r = i.baseLanes | n, t.memoizedState = null) : r = n, se(no, ht), ht |= r;
|
|
return Xe(e, t, o, n), t.child;
|
|
}
|
|
function Mv(e, t) {
|
|
var n = t.ref;
|
|
(e === null && n !== null || e !== null && e.ref !== n) && (t.flags |= 512, t.flags |= 2097152);
|
|
}
|
|
function bd(e, t, n, r, o) {
|
|
var i = st(n) ? _r : Ke.current;
|
|
return i = To(t, i), yo(t, o), n = Jf(e, t, n, r, i, o), r = eh(), e !== null && !ot ? (t.updateQueue = e.updateQueue, t.flags &= -2053, e.lanes &= ~o, $n(e, t, o)) : (pe && r && Of(t), t.flags |= 1, Xe(e, t, n, o), t.child);
|
|
}
|
|
function Am(e, t, n, r, o) {
|
|
if (st(n)) {
|
|
var i = !0;
|
|
nl(t);
|
|
} else i = !1;
|
|
if (yo(t, o), t.stateNode === null) ba(e, t), _v(t, n, r), vd(t, n, r, o), r = !0;
|
|
else if (e === null) {
|
|
var s = t.stateNode, a = t.memoizedProps;
|
|
s.props = a;
|
|
var l = s.context, u = n.contextType;
|
|
typeof u == "object" && u !== null ? u = At(u) : (u = st(n) ? _r : Ke.current, u = To(t, u));
|
|
var c = n.getDerivedStateFromProps, d = typeof c == "function" || typeof s.getSnapshotBeforeUpdate == "function";
|
|
d || typeof s.UNSAFE_componentWillReceiveProps != "function" && typeof s.componentWillReceiveProps != "function" || (a !== r || l !== u) && Cm(t, s, r, u), Vn = !1;
|
|
var f = t.memoizedState;
|
|
s.state = f, al(t, r, s, o), l = t.memoizedState, a !== r || f !== l || it.current || Vn ? (typeof c == "function" && (yd(t, n, c, r), l = t.memoizedState), (a = Vn || km(t, n, a, r, f, l, u)) ? (d || typeof s.UNSAFE_componentWillMount != "function" && typeof s.componentWillMount != "function" || (typeof s.componentWillMount == "function" && s.componentWillMount(), typeof s.UNSAFE_componentWillMount == "function" && s.UNSAFE_componentWillMount()), typeof s.componentDidMount == "function" && (t.flags |= 4194308)) : (typeof s.componentDidMount == "function" && (t.flags |= 4194308), t.memoizedProps = r, t.memoizedState = l), s.props = r, s.state = l, s.context = u, r = a) : (typeof s.componentDidMount == "function" && (t.flags |= 4194308), r = !1);
|
|
} else {
|
|
s = t.stateNode, av(e, t), a = t.memoizedProps, u = t.type === t.elementType ? a : Bt(t.type, a), s.props = u, d = t.pendingProps, f = s.context, l = n.contextType, typeof l == "object" && l !== null ? l = At(l) : (l = st(n) ? _r : Ke.current, l = To(t, l));
|
|
var y = n.getDerivedStateFromProps;
|
|
(c = typeof y == "function" || typeof s.getSnapshotBeforeUpdate == "function") || typeof s.UNSAFE_componentWillReceiveProps != "function" && typeof s.componentWillReceiveProps != "function" || (a !== d || f !== l) && Cm(t, s, r, l), Vn = !1, f = t.memoizedState, s.state = f, al(t, r, s, o);
|
|
var v = t.memoizedState;
|
|
a !== d || f !== v || it.current || Vn ? (typeof y == "function" && (yd(t, n, y, r), v = t.memoizedState), (u = Vn || km(t, n, u, r, f, v, l) || !1) ? (c || typeof s.UNSAFE_componentWillUpdate != "function" && typeof s.componentWillUpdate != "function" || (typeof s.componentWillUpdate == "function" && s.componentWillUpdate(r, v, l), typeof s.UNSAFE_componentWillUpdate == "function" && s.UNSAFE_componentWillUpdate(r, v, l)), typeof s.componentDidUpdate == "function" && (t.flags |= 4), typeof s.getSnapshotBeforeUpdate == "function" && (t.flags |= 1024)) : (typeof s.componentDidUpdate != "function" || a === e.memoizedProps && f === e.memoizedState || (t.flags |= 4), typeof s.getSnapshotBeforeUpdate != "function" || a === e.memoizedProps && f === e.memoizedState || (t.flags |= 1024), t.memoizedProps = r, t.memoizedState = v), s.props = r, s.state = v, s.context = l, r = u) : (typeof s.componentDidUpdate != "function" || a === e.memoizedProps && f === e.memoizedState || (t.flags |= 4), typeof s.getSnapshotBeforeUpdate != "function" || a === e.memoizedProps && f === e.memoizedState || (t.flags |= 1024), r = !1);
|
|
}
|
|
return xd(e, t, n, r, i, o);
|
|
}
|
|
function xd(e, t, n, r, o, i) {
|
|
Mv(e, t);
|
|
var s = (t.flags & 128) !== 0;
|
|
if (!r && !s) return o && mm(t, n, !1), $n(e, t, i);
|
|
r = t.stateNode, sC.current = t;
|
|
var a = s && typeof n.getDerivedStateFromError != "function" ? null : r.render();
|
|
return t.flags |= 1, e !== null && s ? (t.child = Eo(t, e.child, null, i), t.child = Eo(t, null, a, i)) : Xe(e, t, a, i), t.memoizedState = r.state, o && mm(t, n, !0), t.child;
|
|
}
|
|
function Dv(e) {
|
|
var t = e.stateNode;
|
|
t.pendingContext ? pm(e, t.pendingContext, t.pendingContext !== t.context) : t.context && pm(e, t.context, !1), Yf(e, t.containerInfo);
|
|
}
|
|
function Rm(e, t, n, r, o) {
|
|
return Po(), Wf(o), t.flags |= 256, Xe(e, t, n, r), t.child;
|
|
}
|
|
var wd = { dehydrated: null, treeContext: null, retryLane: 0 };
|
|
function kd(e) {
|
|
return { baseLanes: e, cachePool: null, transitions: null };
|
|
}
|
|
function Iv(e, t, n) {
|
|
var r = t.pendingProps, o = ge.current, i = !1, s = (t.flags & 128) !== 0, a;
|
|
if ((a = s) || (a = e !== null && e.memoizedState === null ? !1 : (o & 2) !== 0), a ? (i = !0, t.flags &= -129) : (e === null || e.memoizedState !== null) && (o |= 1), se(ge, o & 1), e === null)
|
|
return md(t), e = t.memoizedState, e !== null && (e = e.dehydrated, e !== null) ? (t.mode & 1 ? e.data === "$!" ? t.lanes = 8 : t.lanes = 1073741824 : t.lanes = 1, null) : (s = r.children, e = r.fallback, i ? (r = t.mode, i = t.child, s = { mode: "hidden", children: s }, !(r & 1) && i !== null ? (i.childLanes = 0, i.pendingProps = s) : i = Hl(s, r, 0, null), e = wr(e, r, n, null), i.return = t, e.return = t, i.sibling = e, t.child = i, t.child.memoizedState = kd(n), t.memoizedState = wd, e) : rh(t, s));
|
|
if (o = e.memoizedState, o !== null && (a = o.dehydrated, a !== null)) return aC(e, t, s, r, a, o, n);
|
|
if (i) {
|
|
i = r.fallback, s = t.mode, o = e.child, a = o.sibling;
|
|
var l = { mode: "hidden", children: r.children };
|
|
return !(s & 1) && t.child !== o ? (r = t.child, r.childLanes = 0, r.pendingProps = l, t.deletions = null) : (r = qn(o, l), r.subtreeFlags = o.subtreeFlags & 14680064), a !== null ? i = qn(a, i) : (i = wr(i, s, n, null), i.flags |= 2), i.return = t, r.return = t, r.sibling = i, t.child = r, r = i, i = t.child, s = e.child.memoizedState, s = s === null ? kd(n) : { baseLanes: s.baseLanes | n, cachePool: null, transitions: s.transitions }, i.memoizedState = s, i.childLanes = e.childLanes & ~n, t.memoizedState = wd, r;
|
|
}
|
|
return i = e.child, e = i.sibling, r = qn(i, { mode: "visible", children: r.children }), !(t.mode & 1) && (r.lanes = n), r.return = t, r.sibling = null, e !== null && (n = t.deletions, n === null ? (t.deletions = [e], t.flags |= 16) : n.push(e)), t.child = r, t.memoizedState = null, r;
|
|
}
|
|
function rh(e, t) {
|
|
return t = Hl({ mode: "visible", children: t }, e.mode, 0, null), t.return = e, e.child = t;
|
|
}
|
|
function Xs(e, t, n, r) {
|
|
return r !== null && Wf(r), Eo(t, e.child, null, n), e = rh(t, t.pendingProps.children), e.flags |= 2, t.memoizedState = null, e;
|
|
}
|
|
function aC(e, t, n, r, o, i, s) {
|
|
if (n)
|
|
return t.flags & 256 ? (t.flags &= -257, r = nc(Error(R(422))), Xs(e, t, s, r)) : t.memoizedState !== null ? (t.child = e.child, t.flags |= 128, null) : (i = r.fallback, o = t.mode, r = Hl({ mode: "visible", children: r.children }, o, 0, null), i = wr(i, o, s, null), i.flags |= 2, r.return = t, i.return = t, r.sibling = i, t.child = r, t.mode & 1 && Eo(t, e.child, null, s), t.child.memoizedState = kd(s), t.memoizedState = wd, i);
|
|
if (!(t.mode & 1)) return Xs(e, t, s, null);
|
|
if (o.data === "$!") {
|
|
if (r = o.nextSibling && o.nextSibling.dataset, r) var a = r.dgst;
|
|
return r = a, i = Error(R(419)), r = nc(i, r, void 0), Xs(e, t, s, r);
|
|
}
|
|
if (a = (s & e.childLanes) !== 0, ot || a) {
|
|
if (r = ze, r !== null) {
|
|
switch (s & -s) {
|
|
case 4:
|
|
o = 2;
|
|
break;
|
|
case 16:
|
|
o = 8;
|
|
break;
|
|
case 64:
|
|
case 128:
|
|
case 256:
|
|
case 512:
|
|
case 1024:
|
|
case 2048:
|
|
case 4096:
|
|
case 8192:
|
|
case 16384:
|
|
case 32768:
|
|
case 65536:
|
|
case 131072:
|
|
case 262144:
|
|
case 524288:
|
|
case 1048576:
|
|
case 2097152:
|
|
case 4194304:
|
|
case 8388608:
|
|
case 16777216:
|
|
case 33554432:
|
|
case 67108864:
|
|
o = 32;
|
|
break;
|
|
case 536870912:
|
|
o = 268435456;
|
|
break;
|
|
default:
|
|
o = 0;
|
|
}
|
|
o = o & (r.suspendedLanes | s) ? 0 : o, o !== 0 && o !== i.retryLane && (i.retryLane = o, _n(e, o), Wt(r, e, o, -1));
|
|
}
|
|
return uh(), r = nc(Error(R(421))), Xs(e, t, s, r);
|
|
}
|
|
return o.data === "$?" ? (t.flags |= 128, t.child = e.child, t = bC.bind(null, e), o._reactRetry = t, null) : (e = i.treeContext, pt = Gn(o.nextSibling), mt = t, pe = !0, jt = null, e !== null && (Ct[Tt++] = xn, Ct[Tt++] = wn, Ct[Tt++] = $r, xn = e.id, wn = e.overflow, $r = t), t = rh(t, r.children), t.flags |= 4096, t);
|
|
}
|
|
function zm(e, t, n) {
|
|
e.lanes |= t;
|
|
var r = e.alternate;
|
|
r !== null && (r.lanes |= t), gd(e.return, t, n);
|
|
}
|
|
function rc(e, t, n, r, o) {
|
|
var i = e.memoizedState;
|
|
i === null ? e.memoizedState = { isBackwards: t, rendering: null, renderingStartTime: 0, last: r, tail: n, tailMode: o } : (i.isBackwards = t, i.rendering = null, i.renderingStartTime = 0, i.last = r, i.tail = n, i.tailMode = o);
|
|
}
|
|
function Lv(e, t, n) {
|
|
var r = t.pendingProps, o = r.revealOrder, i = r.tail;
|
|
if (Xe(e, t, r.children, n), r = ge.current, r & 2) r = r & 1 | 2, t.flags |= 128;
|
|
else {
|
|
if (e !== null && e.flags & 128) e: for (e = t.child; e !== null; ) {
|
|
if (e.tag === 13) e.memoizedState !== null && zm(e, n, t);
|
|
else if (e.tag === 19) zm(e, n, t);
|
|
else if (e.child !== null) {
|
|
e.child.return = e, e = e.child;
|
|
continue;
|
|
}
|
|
if (e === t) break e;
|
|
for (; e.sibling === null; ) {
|
|
if (e.return === null || e.return === t) break e;
|
|
e = e.return;
|
|
}
|
|
e.sibling.return = e.return, e = e.sibling;
|
|
}
|
|
r &= 1;
|
|
}
|
|
if (se(ge, r), !(t.mode & 1)) t.memoizedState = null;
|
|
else switch (o) {
|
|
case "forwards":
|
|
for (n = t.child, o = null; n !== null; ) e = n.alternate, e !== null && ll(e) === null && (o = n), n = n.sibling;
|
|
n = o, n === null ? (o = t.child, t.child = null) : (o = n.sibling, n.sibling = null), rc(t, !1, o, n, i);
|
|
break;
|
|
case "backwards":
|
|
for (n = null, o = t.child, t.child = null; o !== null; ) {
|
|
if (e = o.alternate, e !== null && ll(e) === null) {
|
|
t.child = o;
|
|
break;
|
|
}
|
|
e = o.sibling, o.sibling = n, n = o, o = e;
|
|
}
|
|
rc(t, !0, n, null, i);
|
|
break;
|
|
case "together":
|
|
rc(t, !1, null, null, void 0);
|
|
break;
|
|
default:
|
|
t.memoizedState = null;
|
|
}
|
|
return t.child;
|
|
}
|
|
function ba(e, t) {
|
|
!(t.mode & 1) && e !== null && (e.alternate = null, t.alternate = null, t.flags |= 2);
|
|
}
|
|
function $n(e, t, n) {
|
|
if (e !== null && (t.dependencies = e.dependencies), Rr |= t.lanes, !(n & t.childLanes)) return null;
|
|
if (e !== null && t.child !== e.child) throw Error(R(153));
|
|
if (t.child !== null) {
|
|
for (e = t.child, n = qn(e, e.pendingProps), t.child = n, n.return = t; e.sibling !== null; ) e = e.sibling, n = n.sibling = qn(e, e.pendingProps), n.return = t;
|
|
n.sibling = null;
|
|
}
|
|
return t.child;
|
|
}
|
|
function lC(e, t, n) {
|
|
switch (t.tag) {
|
|
case 3:
|
|
Dv(t), Po();
|
|
break;
|
|
case 5:
|
|
lv(t);
|
|
break;
|
|
case 1:
|
|
st(t.type) && nl(t);
|
|
break;
|
|
case 4:
|
|
Yf(t, t.stateNode.containerInfo);
|
|
break;
|
|
case 10:
|
|
var r = t.type._context, o = t.memoizedProps.value;
|
|
se(il, r._currentValue), r._currentValue = o;
|
|
break;
|
|
case 13:
|
|
if (r = t.memoizedState, r !== null)
|
|
return r.dehydrated !== null ? (se(ge, ge.current & 1), t.flags |= 128, null) : n & t.child.childLanes ? Iv(e, t, n) : (se(ge, ge.current & 1), e = $n(e, t, n), e !== null ? e.sibling : null);
|
|
se(ge, ge.current & 1);
|
|
break;
|
|
case 19:
|
|
if (r = (n & t.childLanes) !== 0, e.flags & 128) {
|
|
if (r) return Lv(e, t, n);
|
|
t.flags |= 128;
|
|
}
|
|
if (o = t.memoizedState, o !== null && (o.rendering = null, o.tail = null, o.lastEffect = null), se(ge, ge.current), r) break;
|
|
return null;
|
|
case 22:
|
|
case 23:
|
|
return t.lanes = 0, zv(e, t, n);
|
|
}
|
|
return $n(e, t, n);
|
|
}
|
|
var Vv, Cd, Bv, Fv;
|
|
Vv = function(e, t) {
|
|
for (var n = t.child; n !== null; ) {
|
|
if (n.tag === 5 || n.tag === 6) e.appendChild(n.stateNode);
|
|
else if (n.tag !== 4 && n.child !== null) {
|
|
n.child.return = n, n = n.child;
|
|
continue;
|
|
}
|
|
if (n === t) break;
|
|
for (; n.sibling === null; ) {
|
|
if (n.return === null || n.return === t) return;
|
|
n = n.return;
|
|
}
|
|
n.sibling.return = n.return, n = n.sibling;
|
|
}
|
|
};
|
|
Cd = function() {
|
|
};
|
|
Bv = function(e, t, n, r) {
|
|
var o = e.memoizedProps;
|
|
if (o !== r) {
|
|
e = t.stateNode, yr(ln.current);
|
|
var i = null;
|
|
switch (n) {
|
|
case "input":
|
|
o = Kc(e, o), r = Kc(e, r), i = [];
|
|
break;
|
|
case "select":
|
|
o = ve({}, o, { value: void 0 }), r = ve({}, r, { value: void 0 }), i = [];
|
|
break;
|
|
case "textarea":
|
|
o = Yc(e, o), r = Yc(e, r), i = [];
|
|
break;
|
|
default:
|
|
typeof o.onClick != "function" && typeof r.onClick == "function" && (e.onclick = el);
|
|
}
|
|
qc(n, r);
|
|
var s;
|
|
n = null;
|
|
for (u in o) if (!r.hasOwnProperty(u) && o.hasOwnProperty(u) && o[u] != null) if (u === "style") {
|
|
var a = o[u];
|
|
for (s in a) a.hasOwnProperty(s) && (n || (n = {}), n[s] = "");
|
|
} else u !== "dangerouslySetInnerHTML" && u !== "children" && u !== "suppressContentEditableWarning" && u !== "suppressHydrationWarning" && u !== "autoFocus" && (Fi.hasOwnProperty(u) ? i || (i = []) : (i = i || []).push(u, null));
|
|
for (u in r) {
|
|
var l = r[u];
|
|
if (a = o?.[u], r.hasOwnProperty(u) && l !== a && (l != null || a != null)) if (u === "style") if (a) {
|
|
for (s in a) !a.hasOwnProperty(s) || l && l.hasOwnProperty(s) || (n || (n = {}), n[s] = "");
|
|
for (s in l) l.hasOwnProperty(s) && a[s] !== l[s] && (n || (n = {}), n[s] = l[s]);
|
|
} else n || (i || (i = []), i.push(
|
|
u,
|
|
n
|
|
)), n = l;
|
|
else u === "dangerouslySetInnerHTML" ? (l = l ? l.__html : void 0, a = a ? a.__html : void 0, l != null && a !== l && (i = i || []).push(u, l)) : u === "children" ? typeof l != "string" && typeof l != "number" || (i = i || []).push(u, "" + l) : u !== "suppressContentEditableWarning" && u !== "suppressHydrationWarning" && (Fi.hasOwnProperty(u) ? (l != null && u === "onScroll" && ue("scroll", e), i || a === l || (i = [])) : (i = i || []).push(u, l));
|
|
}
|
|
n && (i = i || []).push("style", n);
|
|
var u = i;
|
|
(t.updateQueue = u) && (t.flags |= 4);
|
|
}
|
|
};
|
|
Fv = function(e, t, n, r) {
|
|
n !== r && (t.flags |= 4);
|
|
};
|
|
function ni(e, t) {
|
|
if (!pe) switch (e.tailMode) {
|
|
case "hidden":
|
|
t = e.tail;
|
|
for (var n = null; t !== null; ) t.alternate !== null && (n = t), t = t.sibling;
|
|
n === null ? e.tail = null : n.sibling = null;
|
|
break;
|
|
case "collapsed":
|
|
n = e.tail;
|
|
for (var r = null; n !== null; ) n.alternate !== null && (r = n), n = n.sibling;
|
|
r === null ? t || e.tail === null ? e.tail = null : e.tail.sibling = null : r.sibling = null;
|
|
}
|
|
}
|
|
function We(e) {
|
|
var t = e.alternate !== null && e.alternate.child === e.child, n = 0, r = 0;
|
|
if (t) for (var o = e.child; o !== null; ) n |= o.lanes | o.childLanes, r |= o.subtreeFlags & 14680064, r |= o.flags & 14680064, o.return = e, o = o.sibling;
|
|
else for (o = e.child; o !== null; ) n |= o.lanes | o.childLanes, r |= o.subtreeFlags, r |= o.flags, o.return = e, o = o.sibling;
|
|
return e.subtreeFlags |= r, e.childLanes = n, t;
|
|
}
|
|
function uC(e, t, n) {
|
|
var r = t.pendingProps;
|
|
switch (Nf(t), t.tag) {
|
|
case 2:
|
|
case 16:
|
|
case 15:
|
|
case 0:
|
|
case 11:
|
|
case 7:
|
|
case 8:
|
|
case 12:
|
|
case 9:
|
|
case 14:
|
|
return We(t), null;
|
|
case 1:
|
|
return st(t.type) && tl(), We(t), null;
|
|
case 3:
|
|
return r = t.stateNode, _o(), de(it), de(Ke), qf(), r.pendingContext && (r.context = r.pendingContext, r.pendingContext = null), (e === null || e.child === null) && (Ks(t) ? t.flags |= 4 : e === null || e.memoizedState.isDehydrated && !(t.flags & 256) || (t.flags |= 1024, jt !== null && (zd(jt), jt = null))), Cd(e, t), We(t), null;
|
|
case 5:
|
|
Qf(t);
|
|
var o = yr(qi.current);
|
|
if (n = t.type, e !== null && t.stateNode != null) Bv(e, t, n, r, o), e.ref !== t.ref && (t.flags |= 512, t.flags |= 2097152);
|
|
else {
|
|
if (!r) {
|
|
if (t.stateNode === null) throw Error(R(166));
|
|
return We(t), null;
|
|
}
|
|
if (e = yr(ln.current), Ks(t)) {
|
|
r = t.stateNode, n = t.type;
|
|
var i = t.memoizedProps;
|
|
switch (r[rn] = t, r[Yi] = i, e = (t.mode & 1) !== 0, n) {
|
|
case "dialog":
|
|
ue("cancel", r), ue("close", r);
|
|
break;
|
|
case "iframe":
|
|
case "object":
|
|
case "embed":
|
|
ue("load", r);
|
|
break;
|
|
case "video":
|
|
case "audio":
|
|
for (o = 0; o < fi.length; o++) ue(fi[o], r);
|
|
break;
|
|
case "source":
|
|
ue("error", r);
|
|
break;
|
|
case "img":
|
|
case "image":
|
|
case "link":
|
|
ue(
|
|
"error",
|
|
r
|
|
), ue("load", r);
|
|
break;
|
|
case "details":
|
|
ue("toggle", r);
|
|
break;
|
|
case "input":
|
|
Op(r, i), ue("invalid", r);
|
|
break;
|
|
case "select":
|
|
r._wrapperState = { wasMultiple: !!i.multiple }, ue("invalid", r);
|
|
break;
|
|
case "textarea":
|
|
Wp(r, i), ue("invalid", r);
|
|
}
|
|
qc(n, i), o = null;
|
|
for (var s in i) if (i.hasOwnProperty(s)) {
|
|
var a = i[s];
|
|
s === "children" ? typeof a == "string" ? r.textContent !== a && (i.suppressHydrationWarning !== !0 && Hs(r.textContent, a, e), o = ["children", a]) : typeof a == "number" && r.textContent !== "" + a && (i.suppressHydrationWarning !== !0 && Hs(
|
|
r.textContent,
|
|
a,
|
|
e
|
|
), o = ["children", "" + a]) : Fi.hasOwnProperty(s) && a != null && s === "onScroll" && ue("scroll", r);
|
|
}
|
|
switch (n) {
|
|
case "input":
|
|
Vs(r), Np(r, i, !0);
|
|
break;
|
|
case "textarea":
|
|
Vs(r), Up(r);
|
|
break;
|
|
case "select":
|
|
case "option":
|
|
break;
|
|
default:
|
|
typeof i.onClick == "function" && (r.onclick = el);
|
|
}
|
|
r = o, t.updateQueue = r, r !== null && (t.flags |= 4);
|
|
} else {
|
|
s = o.nodeType === 9 ? o : o.ownerDocument, e === "http://www.w3.org/1999/xhtml" && (e = h0(n)), e === "http://www.w3.org/1999/xhtml" ? n === "script" ? (e = s.createElement("div"), e.innerHTML = "<script><\/script>", e = e.removeChild(e.firstChild)) : typeof r.is == "string" ? e = s.createElement(n, { is: r.is }) : (e = s.createElement(n), n === "select" && (s = e, r.multiple ? s.multiple = !0 : r.size && (s.size = r.size))) : e = s.createElementNS(e, n), e[rn] = t, e[Yi] = r, Vv(e, t, !1, !1), t.stateNode = e;
|
|
e: {
|
|
switch (s = Zc(n, r), n) {
|
|
case "dialog":
|
|
ue("cancel", e), ue("close", e), o = r;
|
|
break;
|
|
case "iframe":
|
|
case "object":
|
|
case "embed":
|
|
ue("load", e), o = r;
|
|
break;
|
|
case "video":
|
|
case "audio":
|
|
for (o = 0; o < fi.length; o++) ue(fi[o], e);
|
|
o = r;
|
|
break;
|
|
case "source":
|
|
ue("error", e), o = r;
|
|
break;
|
|
case "img":
|
|
case "image":
|
|
case "link":
|
|
ue(
|
|
"error",
|
|
e
|
|
), ue("load", e), o = r;
|
|
break;
|
|
case "details":
|
|
ue("toggle", e), o = r;
|
|
break;
|
|
case "input":
|
|
Op(e, r), o = Kc(e, r), ue("invalid", e);
|
|
break;
|
|
case "option":
|
|
o = r;
|
|
break;
|
|
case "select":
|
|
e._wrapperState = { wasMultiple: !!r.multiple }, o = ve({}, r, { value: void 0 }), ue("invalid", e);
|
|
break;
|
|
case "textarea":
|
|
Wp(e, r), o = Yc(e, r), ue("invalid", e);
|
|
break;
|
|
default:
|
|
o = r;
|
|
}
|
|
qc(n, o), a = o;
|
|
for (i in a) if (a.hasOwnProperty(i)) {
|
|
var l = a[i];
|
|
i === "style" ? g0(e, l) : i === "dangerouslySetInnerHTML" ? (l = l ? l.__html : void 0, l != null && p0(e, l)) : i === "children" ? typeof l == "string" ? (n !== "textarea" || l !== "") && ji(e, l) : typeof l == "number" && ji(e, "" + l) : i !== "suppressContentEditableWarning" && i !== "suppressHydrationWarning" && i !== "autoFocus" && (Fi.hasOwnProperty(i) ? l != null && i === "onScroll" && ue("scroll", e) : l != null && Ef(e, i, l, s));
|
|
}
|
|
switch (n) {
|
|
case "input":
|
|
Vs(e), Np(e, r, !1);
|
|
break;
|
|
case "textarea":
|
|
Vs(e), Up(e);
|
|
break;
|
|
case "option":
|
|
r.value != null && e.setAttribute("value", "" + Zn(r.value));
|
|
break;
|
|
case "select":
|
|
e.multiple = !!r.multiple, i = r.value, i != null ? ho(e, !!r.multiple, i, !1) : r.defaultValue != null && ho(
|
|
e,
|
|
!!r.multiple,
|
|
r.defaultValue,
|
|
!0
|
|
);
|
|
break;
|
|
default:
|
|
typeof o.onClick == "function" && (e.onclick = el);
|
|
}
|
|
switch (n) {
|
|
case "button":
|
|
case "input":
|
|
case "select":
|
|
case "textarea":
|
|
r = !!r.autoFocus;
|
|
break e;
|
|
case "img":
|
|
r = !0;
|
|
break e;
|
|
default:
|
|
r = !1;
|
|
}
|
|
}
|
|
r && (t.flags |= 4);
|
|
}
|
|
t.ref !== null && (t.flags |= 512, t.flags |= 2097152);
|
|
}
|
|
return We(t), null;
|
|
case 6:
|
|
if (e && t.stateNode != null) Fv(e, t, e.memoizedProps, r);
|
|
else {
|
|
if (typeof r != "string" && t.stateNode === null) throw Error(R(166));
|
|
if (n = yr(qi.current), yr(ln.current), Ks(t)) {
|
|
if (r = t.stateNode, n = t.memoizedProps, r[rn] = t, (i = r.nodeValue !== n) && (e = mt, e !== null)) switch (e.tag) {
|
|
case 3:
|
|
Hs(r.nodeValue, n, (e.mode & 1) !== 0);
|
|
break;
|
|
case 5:
|
|
e.memoizedProps.suppressHydrationWarning !== !0 && Hs(r.nodeValue, n, (e.mode & 1) !== 0);
|
|
}
|
|
i && (t.flags |= 4);
|
|
} else r = (n.nodeType === 9 ? n : n.ownerDocument).createTextNode(r), r[rn] = t, t.stateNode = r;
|
|
}
|
|
return We(t), null;
|
|
case 13:
|
|
if (de(ge), r = t.memoizedState, e === null || e.memoizedState !== null && e.memoizedState.dehydrated !== null) {
|
|
if (pe && pt !== null && t.mode & 1 && !(t.flags & 128)) rv(), Po(), t.flags |= 98560, i = !1;
|
|
else if (i = Ks(t), r !== null && r.dehydrated !== null) {
|
|
if (e === null) {
|
|
if (!i) throw Error(R(318));
|
|
if (i = t.memoizedState, i = i !== null ? i.dehydrated : null, !i) throw Error(R(317));
|
|
i[rn] = t;
|
|
} else Po(), !(t.flags & 128) && (t.memoizedState = null), t.flags |= 4;
|
|
We(t), i = !1;
|
|
} else jt !== null && (zd(jt), jt = null), i = !0;
|
|
if (!i) return t.flags & 65536 ? t : null;
|
|
}
|
|
return t.flags & 128 ? (t.lanes = n, t) : (r = r !== null, r !== (e !== null && e.memoizedState !== null) && r && (t.child.flags |= 8192, t.mode & 1 && (e === null || ge.current & 1 ? $e === 0 && ($e = 3) : uh())), t.updateQueue !== null && (t.flags |= 4), We(t), null);
|
|
case 4:
|
|
return _o(), Cd(e, t), e === null && Gi(t.stateNode.containerInfo), We(t), null;
|
|
case 10:
|
|
return Kf(t.type._context), We(t), null;
|
|
case 17:
|
|
return st(t.type) && tl(), We(t), null;
|
|
case 19:
|
|
if (de(ge), i = t.memoizedState, i === null) return We(t), null;
|
|
if (r = (t.flags & 128) !== 0, s = i.rendering, s === null) if (r) ni(i, !1);
|
|
else {
|
|
if ($e !== 0 || e !== null && e.flags & 128) for (e = t.child; e !== null; ) {
|
|
if (s = ll(e), s !== null) {
|
|
for (t.flags |= 128, ni(i, !1), r = s.updateQueue, r !== null && (t.updateQueue = r, t.flags |= 4), t.subtreeFlags = 0, r = n, n = t.child; n !== null; ) i = n, e = r, i.flags &= 14680066, s = i.alternate, s === null ? (i.childLanes = 0, i.lanes = e, i.child = null, i.subtreeFlags = 0, i.memoizedProps = null, i.memoizedState = null, i.updateQueue = null, i.dependencies = null, i.stateNode = null) : (i.childLanes = s.childLanes, i.lanes = s.lanes, i.child = s.child, i.subtreeFlags = 0, i.deletions = null, i.memoizedProps = s.memoizedProps, i.memoizedState = s.memoizedState, i.updateQueue = s.updateQueue, i.type = s.type, e = s.dependencies, i.dependencies = e === null ? null : { lanes: e.lanes, firstContext: e.firstContext }), n = n.sibling;
|
|
return se(ge, ge.current & 1 | 2), t.child;
|
|
}
|
|
e = e.sibling;
|
|
}
|
|
i.tail !== null && xe() > Ao && (t.flags |= 128, r = !0, ni(i, !1), t.lanes = 4194304);
|
|
}
|
|
else {
|
|
if (!r) if (e = ll(s), e !== null) {
|
|
if (t.flags |= 128, r = !0, n = e.updateQueue, n !== null && (t.updateQueue = n, t.flags |= 4), ni(i, !0), i.tail === null && i.tailMode === "hidden" && !s.alternate && !pe) return We(t), null;
|
|
} else 2 * xe() - i.renderingStartTime > Ao && n !== 1073741824 && (t.flags |= 128, r = !0, ni(i, !1), t.lanes = 4194304);
|
|
i.isBackwards ? (s.sibling = t.child, t.child = s) : (n = i.last, n !== null ? n.sibling = s : t.child = s, i.last = s);
|
|
}
|
|
return i.tail !== null ? (t = i.tail, i.rendering = t, i.tail = t.sibling, i.renderingStartTime = xe(), t.sibling = null, n = ge.current, se(ge, r ? n & 1 | 2 : n & 1), t) : (We(t), null);
|
|
case 22:
|
|
case 23:
|
|
return lh(), r = t.memoizedState !== null, e !== null && e.memoizedState !== null !== r && (t.flags |= 8192), r && t.mode & 1 ? ht & 1073741824 && (We(t), t.subtreeFlags & 6 && (t.flags |= 8192)) : We(t), null;
|
|
case 24:
|
|
return null;
|
|
case 25:
|
|
return null;
|
|
}
|
|
throw Error(R(156, t.tag));
|
|
}
|
|
function cC(e, t) {
|
|
switch (Nf(t), t.tag) {
|
|
case 1:
|
|
return st(t.type) && tl(), e = t.flags, e & 65536 ? (t.flags = e & -65537 | 128, t) : null;
|
|
case 3:
|
|
return _o(), de(it), de(Ke), qf(), e = t.flags, e & 65536 && !(e & 128) ? (t.flags = e & -65537 | 128, t) : null;
|
|
case 5:
|
|
return Qf(t), null;
|
|
case 13:
|
|
if (de(ge), e = t.memoizedState, e !== null && e.dehydrated !== null) {
|
|
if (t.alternate === null) throw Error(R(340));
|
|
Po();
|
|
}
|
|
return e = t.flags, e & 65536 ? (t.flags = e & -65537 | 128, t) : null;
|
|
case 19:
|
|
return de(ge), null;
|
|
case 4:
|
|
return _o(), null;
|
|
case 10:
|
|
return Kf(t.type._context), null;
|
|
case 22:
|
|
case 23:
|
|
return lh(), null;
|
|
case 24:
|
|
return null;
|
|
default:
|
|
return null;
|
|
}
|
|
}
|
|
var Ys = !1, He = !1, dC = typeof WeakSet == "function" ? WeakSet : Set, D = null;
|
|
function to(e, t) {
|
|
var n = e.ref;
|
|
if (n !== null) if (typeof n == "function") try {
|
|
n(null);
|
|
} catch (r) {
|
|
be(e, t, r);
|
|
}
|
|
else n.current = null;
|
|
}
|
|
function Td(e, t, n) {
|
|
try {
|
|
n();
|
|
} catch (r) {
|
|
be(e, t, r);
|
|
}
|
|
}
|
|
var Mm = !1;
|
|
function fC(e, t) {
|
|
if (ld = qa, e = U0(), jf(e)) {
|
|
if ("selectionStart" in e) var n = { start: e.selectionStart, end: e.selectionEnd };
|
|
else e: {
|
|
n = (n = e.ownerDocument) && n.defaultView || window;
|
|
var r = n.getSelection && n.getSelection();
|
|
if (r && r.rangeCount !== 0) {
|
|
n = r.anchorNode;
|
|
var o = r.anchorOffset, i = r.focusNode;
|
|
r = r.focusOffset;
|
|
try {
|
|
n.nodeType, i.nodeType;
|
|
} catch {
|
|
n = null;
|
|
break e;
|
|
}
|
|
var s = 0, a = -1, l = -1, u = 0, c = 0, d = e, f = null;
|
|
t: for (; ; ) {
|
|
for (var y; d !== n || o !== 0 && d.nodeType !== 3 || (a = s + o), d !== i || r !== 0 && d.nodeType !== 3 || (l = s + r), d.nodeType === 3 && (s += d.nodeValue.length), (y = d.firstChild) !== null; )
|
|
f = d, d = y;
|
|
for (; ; ) {
|
|
if (d === e) break t;
|
|
if (f === n && ++u === o && (a = s), f === i && ++c === r && (l = s), (y = d.nextSibling) !== null) break;
|
|
d = f, f = d.parentNode;
|
|
}
|
|
d = y;
|
|
}
|
|
n = a === -1 || l === -1 ? null : { start: a, end: l };
|
|
} else n = null;
|
|
}
|
|
n = n || { start: 0, end: 0 };
|
|
} else n = null;
|
|
for (ud = { focusedElem: e, selectionRange: n }, qa = !1, D = t; D !== null; ) if (t = D, e = t.child, (t.subtreeFlags & 1028) !== 0 && e !== null) e.return = t, D = e;
|
|
else for (; D !== null; ) {
|
|
t = D;
|
|
try {
|
|
var v = t.alternate;
|
|
if (t.flags & 1024) switch (t.tag) {
|
|
case 0:
|
|
case 11:
|
|
case 15:
|
|
break;
|
|
case 1:
|
|
if (v !== null) {
|
|
var S = v.memoizedProps, k = v.memoizedState, p = t.stateNode, h = p.getSnapshotBeforeUpdate(t.elementType === t.type ? S : Bt(t.type, S), k);
|
|
p.__reactInternalSnapshotBeforeUpdate = h;
|
|
}
|
|
break;
|
|
case 3:
|
|
var g = t.stateNode.containerInfo;
|
|
g.nodeType === 1 ? g.textContent = "" : g.nodeType === 9 && g.documentElement && g.removeChild(g.documentElement);
|
|
break;
|
|
case 5:
|
|
case 6:
|
|
case 4:
|
|
case 17:
|
|
break;
|
|
default:
|
|
throw Error(R(163));
|
|
}
|
|
} catch (w) {
|
|
be(t, t.return, w);
|
|
}
|
|
if (e = t.sibling, e !== null) {
|
|
e.return = t.return, D = e;
|
|
break;
|
|
}
|
|
D = t.return;
|
|
}
|
|
return v = Mm, Mm = !1, v;
|
|
}
|
|
function Ti(e, t, n) {
|
|
var r = t.updateQueue;
|
|
if (r = r !== null ? r.lastEffect : null, r !== null) {
|
|
var o = r = r.next;
|
|
do {
|
|
if ((o.tag & e) === e) {
|
|
var i = o.destroy;
|
|
o.destroy = void 0, i !== void 0 && Td(t, n, i);
|
|
}
|
|
o = o.next;
|
|
} while (o !== r);
|
|
}
|
|
}
|
|
function Wl(e, t) {
|
|
if (t = t.updateQueue, t = t !== null ? t.lastEffect : null, t !== null) {
|
|
var n = t = t.next;
|
|
do {
|
|
if ((n.tag & e) === e) {
|
|
var r = n.create;
|
|
n.destroy = r();
|
|
}
|
|
n = n.next;
|
|
} while (n !== t);
|
|
}
|
|
}
|
|
function Pd(e) {
|
|
var t = e.ref;
|
|
if (t !== null) {
|
|
var n = e.stateNode;
|
|
switch (e.tag) {
|
|
case 5:
|
|
e = n;
|
|
break;
|
|
default:
|
|
e = n;
|
|
}
|
|
typeof t == "function" ? t(e) : t.current = e;
|
|
}
|
|
}
|
|
function jv(e) {
|
|
var t = e.alternate;
|
|
t !== null && (e.alternate = null, jv(t)), e.child = null, e.deletions = null, e.sibling = null, e.tag === 5 && (t = e.stateNode, t !== null && (delete t[rn], delete t[Yi], delete t[fd], delete t[Xk], delete t[Yk])), e.stateNode = null, e.return = null, e.dependencies = null, e.memoizedProps = null, e.memoizedState = null, e.pendingProps = null, e.stateNode = null, e.updateQueue = null;
|
|
}
|
|
function Ov(e) {
|
|
return e.tag === 5 || e.tag === 3 || e.tag === 4;
|
|
}
|
|
function Dm(e) {
|
|
e: for (; ; ) {
|
|
for (; e.sibling === null; ) {
|
|
if (e.return === null || Ov(e.return)) return null;
|
|
e = e.return;
|
|
}
|
|
for (e.sibling.return = e.return, e = e.sibling; e.tag !== 5 && e.tag !== 6 && e.tag !== 18; ) {
|
|
if (e.flags & 2 || e.child === null || e.tag === 4) continue e;
|
|
e.child.return = e, e = e.child;
|
|
}
|
|
if (!(e.flags & 2)) return e.stateNode;
|
|
}
|
|
}
|
|
function Ed(e, t, n) {
|
|
var r = e.tag;
|
|
if (r === 5 || r === 6) e = e.stateNode, t ? n.nodeType === 8 ? n.parentNode.insertBefore(e, t) : n.insertBefore(e, t) : (n.nodeType === 8 ? (t = n.parentNode, t.insertBefore(e, n)) : (t = n, t.appendChild(e)), n = n._reactRootContainer, n != null || t.onclick !== null || (t.onclick = el));
|
|
else if (r !== 4 && (e = e.child, e !== null)) for (Ed(e, t, n), e = e.sibling; e !== null; ) Ed(e, t, n), e = e.sibling;
|
|
}
|
|
function _d(e, t, n) {
|
|
var r = e.tag;
|
|
if (r === 5 || r === 6) e = e.stateNode, t ? n.insertBefore(e, t) : n.appendChild(e);
|
|
else if (r !== 4 && (e = e.child, e !== null)) for (_d(e, t, n), e = e.sibling; e !== null; ) _d(e, t, n), e = e.sibling;
|
|
}
|
|
var Ie = null, Ft = !1;
|
|
function Mn(e, t, n) {
|
|
for (n = n.child; n !== null; ) Nv(e, t, n), n = n.sibling;
|
|
}
|
|
function Nv(e, t, n) {
|
|
if (an && typeof an.onCommitFiberUnmount == "function") try {
|
|
an.onCommitFiberUnmount(Il, n);
|
|
} catch {
|
|
}
|
|
switch (n.tag) {
|
|
case 5:
|
|
He || to(n, t);
|
|
case 6:
|
|
var r = Ie, o = Ft;
|
|
Ie = null, Mn(e, t, n), Ie = r, Ft = o, Ie !== null && (Ft ? (e = Ie, n = n.stateNode, e.nodeType === 8 ? e.parentNode.removeChild(n) : e.removeChild(n)) : Ie.removeChild(n.stateNode));
|
|
break;
|
|
case 18:
|
|
Ie !== null && (Ft ? (e = Ie, n = n.stateNode, e.nodeType === 8 ? Qu(e.parentNode, n) : e.nodeType === 1 && Qu(e, n), Ui(e)) : Qu(Ie, n.stateNode));
|
|
break;
|
|
case 4:
|
|
r = Ie, o = Ft, Ie = n.stateNode.containerInfo, Ft = !0, Mn(e, t, n), Ie = r, Ft = o;
|
|
break;
|
|
case 0:
|
|
case 11:
|
|
case 14:
|
|
case 15:
|
|
if (!He && (r = n.updateQueue, r !== null && (r = r.lastEffect, r !== null))) {
|
|
o = r = r.next;
|
|
do {
|
|
var i = o, s = i.destroy;
|
|
i = i.tag, s !== void 0 && (i & 2 || i & 4) && Td(n, t, s), o = o.next;
|
|
} while (o !== r);
|
|
}
|
|
Mn(e, t, n);
|
|
break;
|
|
case 1:
|
|
if (!He && (to(n, t), r = n.stateNode, typeof r.componentWillUnmount == "function")) try {
|
|
r.props = n.memoizedProps, r.state = n.memoizedState, r.componentWillUnmount();
|
|
} catch (a) {
|
|
be(n, t, a);
|
|
}
|
|
Mn(e, t, n);
|
|
break;
|
|
case 21:
|
|
Mn(e, t, n);
|
|
break;
|
|
case 22:
|
|
n.mode & 1 ? (He = (r = He) || n.memoizedState !== null, Mn(e, t, n), He = r) : Mn(e, t, n);
|
|
break;
|
|
default:
|
|
Mn(e, t, n);
|
|
}
|
|
}
|
|
function Im(e) {
|
|
var t = e.updateQueue;
|
|
if (t !== null) {
|
|
e.updateQueue = null;
|
|
var n = e.stateNode;
|
|
n === null && (n = e.stateNode = new dC()), t.forEach(function(r) {
|
|
var o = xC.bind(null, e, r);
|
|
n.has(r) || (n.add(r), r.then(o, o));
|
|
});
|
|
}
|
|
}
|
|
function Dt(e, t) {
|
|
var n = t.deletions;
|
|
if (n !== null) for (var r = 0; r < n.length; r++) {
|
|
var o = n[r];
|
|
try {
|
|
var i = e, s = t, a = s;
|
|
e: for (; a !== null; ) {
|
|
switch (a.tag) {
|
|
case 5:
|
|
Ie = a.stateNode, Ft = !1;
|
|
break e;
|
|
case 3:
|
|
Ie = a.stateNode.containerInfo, Ft = !0;
|
|
break e;
|
|
case 4:
|
|
Ie = a.stateNode.containerInfo, Ft = !0;
|
|
break e;
|
|
}
|
|
a = a.return;
|
|
}
|
|
if (Ie === null) throw Error(R(160));
|
|
Nv(i, s, o), Ie = null, Ft = !1;
|
|
var l = o.alternate;
|
|
l !== null && (l.return = null), o.return = null;
|
|
} catch (u) {
|
|
be(o, t, u);
|
|
}
|
|
}
|
|
if (t.subtreeFlags & 12854) for (t = t.child; t !== null; ) Wv(t, e), t = t.sibling;
|
|
}
|
|
function Wv(e, t) {
|
|
var n = e.alternate, r = e.flags;
|
|
switch (e.tag) {
|
|
case 0:
|
|
case 11:
|
|
case 14:
|
|
case 15:
|
|
if (Dt(t, e), Xt(e), r & 4) {
|
|
try {
|
|
Ti(3, e, e.return), Wl(3, e);
|
|
} catch (S) {
|
|
be(e, e.return, S);
|
|
}
|
|
try {
|
|
Ti(5, e, e.return);
|
|
} catch (S) {
|
|
be(e, e.return, S);
|
|
}
|
|
}
|
|
break;
|
|
case 1:
|
|
Dt(t, e), Xt(e), r & 512 && n !== null && to(n, n.return);
|
|
break;
|
|
case 5:
|
|
if (Dt(t, e), Xt(e), r & 512 && n !== null && to(n, n.return), e.flags & 32) {
|
|
var o = e.stateNode;
|
|
try {
|
|
ji(o, "");
|
|
} catch (S) {
|
|
be(e, e.return, S);
|
|
}
|
|
}
|
|
if (r & 4 && (o = e.stateNode, o != null)) {
|
|
var i = e.memoizedProps, s = n !== null ? n.memoizedProps : i, a = e.type, l = e.updateQueue;
|
|
if (e.updateQueue = null, l !== null) try {
|
|
a === "input" && i.type === "radio" && i.name != null && d0(o, i), Zc(a, s);
|
|
var u = Zc(a, i);
|
|
for (s = 0; s < l.length; s += 2) {
|
|
var c = l[s], d = l[s + 1];
|
|
c === "style" ? g0(o, d) : c === "dangerouslySetInnerHTML" ? p0(o, d) : c === "children" ? ji(o, d) : Ef(o, c, d, u);
|
|
}
|
|
switch (a) {
|
|
case "input":
|
|
Gc(o, i);
|
|
break;
|
|
case "textarea":
|
|
f0(o, i);
|
|
break;
|
|
case "select":
|
|
var f = o._wrapperState.wasMultiple;
|
|
o._wrapperState.wasMultiple = !!i.multiple;
|
|
var y = i.value;
|
|
y != null ? ho(o, !!i.multiple, y, !1) : f !== !!i.multiple && (i.defaultValue != null ? ho(
|
|
o,
|
|
!!i.multiple,
|
|
i.defaultValue,
|
|
!0
|
|
) : ho(o, !!i.multiple, i.multiple ? [] : "", !1));
|
|
}
|
|
o[Yi] = i;
|
|
} catch (S) {
|
|
be(e, e.return, S);
|
|
}
|
|
}
|
|
break;
|
|
case 6:
|
|
if (Dt(t, e), Xt(e), r & 4) {
|
|
if (e.stateNode === null) throw Error(R(162));
|
|
o = e.stateNode, i = e.memoizedProps;
|
|
try {
|
|
o.nodeValue = i;
|
|
} catch (S) {
|
|
be(e, e.return, S);
|
|
}
|
|
}
|
|
break;
|
|
case 3:
|
|
if (Dt(t, e), Xt(e), r & 4 && n !== null && n.memoizedState.isDehydrated) try {
|
|
Ui(t.containerInfo);
|
|
} catch (S) {
|
|
be(e, e.return, S);
|
|
}
|
|
break;
|
|
case 4:
|
|
Dt(t, e), Xt(e);
|
|
break;
|
|
case 13:
|
|
Dt(t, e), Xt(e), o = e.child, o.flags & 8192 && (i = o.memoizedState !== null, o.stateNode.isHidden = i, !i || o.alternate !== null && o.alternate.memoizedState !== null || (sh = xe())), r & 4 && Im(e);
|
|
break;
|
|
case 22:
|
|
if (c = n !== null && n.memoizedState !== null, e.mode & 1 ? (He = (u = He) || c, Dt(t, e), He = u) : Dt(t, e), Xt(e), r & 8192) {
|
|
if (u = e.memoizedState !== null, (e.stateNode.isHidden = u) && !c && e.mode & 1) for (D = e, c = e.child; c !== null; ) {
|
|
for (d = D = c; D !== null; ) {
|
|
switch (f = D, y = f.child, f.tag) {
|
|
case 0:
|
|
case 11:
|
|
case 14:
|
|
case 15:
|
|
Ti(4, f, f.return);
|
|
break;
|
|
case 1:
|
|
to(f, f.return);
|
|
var v = f.stateNode;
|
|
if (typeof v.componentWillUnmount == "function") {
|
|
r = f, n = f.return;
|
|
try {
|
|
t = r, v.props = t.memoizedProps, v.state = t.memoizedState, v.componentWillUnmount();
|
|
} catch (S) {
|
|
be(r, n, S);
|
|
}
|
|
}
|
|
break;
|
|
case 5:
|
|
to(f, f.return);
|
|
break;
|
|
case 22:
|
|
if (f.memoizedState !== null) {
|
|
Vm(d);
|
|
continue;
|
|
}
|
|
}
|
|
y !== null ? (y.return = f, D = y) : Vm(d);
|
|
}
|
|
c = c.sibling;
|
|
}
|
|
e: for (c = null, d = e; ; ) {
|
|
if (d.tag === 5) {
|
|
if (c === null) {
|
|
c = d;
|
|
try {
|
|
o = d.stateNode, u ? (i = o.style, typeof i.setProperty == "function" ? i.setProperty("display", "none", "important") : i.display = "none") : (a = d.stateNode, l = d.memoizedProps.style, s = l != null && l.hasOwnProperty("display") ? l.display : null, a.style.display = m0("display", s));
|
|
} catch (S) {
|
|
be(e, e.return, S);
|
|
}
|
|
}
|
|
} else if (d.tag === 6) {
|
|
if (c === null) try {
|
|
d.stateNode.nodeValue = u ? "" : d.memoizedProps;
|
|
} catch (S) {
|
|
be(e, e.return, S);
|
|
}
|
|
} else if ((d.tag !== 22 && d.tag !== 23 || d.memoizedState === null || d === e) && d.child !== null) {
|
|
d.child.return = d, d = d.child;
|
|
continue;
|
|
}
|
|
if (d === e) break e;
|
|
for (; d.sibling === null; ) {
|
|
if (d.return === null || d.return === e) break e;
|
|
c === d && (c = null), d = d.return;
|
|
}
|
|
c === d && (c = null), d.sibling.return = d.return, d = d.sibling;
|
|
}
|
|
}
|
|
break;
|
|
case 19:
|
|
Dt(t, e), Xt(e), r & 4 && Im(e);
|
|
break;
|
|
case 21:
|
|
break;
|
|
default:
|
|
Dt(
|
|
t,
|
|
e
|
|
), Xt(e);
|
|
}
|
|
}
|
|
function Xt(e) {
|
|
var t = e.flags;
|
|
if (t & 2) {
|
|
try {
|
|
e: {
|
|
for (var n = e.return; n !== null; ) {
|
|
if (Ov(n)) {
|
|
var r = n;
|
|
break e;
|
|
}
|
|
n = n.return;
|
|
}
|
|
throw Error(R(160));
|
|
}
|
|
switch (r.tag) {
|
|
case 5:
|
|
var o = r.stateNode;
|
|
r.flags & 32 && (ji(o, ""), r.flags &= -33);
|
|
var i = Dm(e);
|
|
_d(e, i, o);
|
|
break;
|
|
case 3:
|
|
case 4:
|
|
var s = r.stateNode.containerInfo, a = Dm(e);
|
|
Ed(e, a, s);
|
|
break;
|
|
default:
|
|
throw Error(R(161));
|
|
}
|
|
} catch (l) {
|
|
be(e, e.return, l);
|
|
}
|
|
e.flags &= -3;
|
|
}
|
|
t & 4096 && (e.flags &= -4097);
|
|
}
|
|
function hC(e, t, n) {
|
|
D = e, Uv(e);
|
|
}
|
|
function Uv(e, t, n) {
|
|
for (var r = (e.mode & 1) !== 0; D !== null; ) {
|
|
var o = D, i = o.child;
|
|
if (o.tag === 22 && r) {
|
|
var s = o.memoizedState !== null || Ys;
|
|
if (!s) {
|
|
var a = o.alternate, l = a !== null && a.memoizedState !== null || He;
|
|
a = Ys;
|
|
var u = He;
|
|
if (Ys = s, (He = l) && !u) for (D = o; D !== null; ) s = D, l = s.child, s.tag === 22 && s.memoizedState !== null ? Bm(o) : l !== null ? (l.return = s, D = l) : Bm(o);
|
|
for (; i !== null; ) D = i, Uv(i), i = i.sibling;
|
|
D = o, Ys = a, He = u;
|
|
}
|
|
Lm(e);
|
|
} else o.subtreeFlags & 8772 && i !== null ? (i.return = o, D = i) : Lm(e);
|
|
}
|
|
}
|
|
function Lm(e) {
|
|
for (; D !== null; ) {
|
|
var t = D;
|
|
if (t.flags & 8772) {
|
|
var n = t.alternate;
|
|
try {
|
|
if (t.flags & 8772) switch (t.tag) {
|
|
case 0:
|
|
case 11:
|
|
case 15:
|
|
He || Wl(5, t);
|
|
break;
|
|
case 1:
|
|
var r = t.stateNode;
|
|
if (t.flags & 4 && !He) if (n === null) r.componentDidMount();
|
|
else {
|
|
var o = t.elementType === t.type ? n.memoizedProps : Bt(t.type, n.memoizedProps);
|
|
r.componentDidUpdate(o, n.memoizedState, r.__reactInternalSnapshotBeforeUpdate);
|
|
}
|
|
var i = t.updateQueue;
|
|
i !== null && bm(t, i, r);
|
|
break;
|
|
case 3:
|
|
var s = t.updateQueue;
|
|
if (s !== null) {
|
|
if (n = null, t.child !== null) switch (t.child.tag) {
|
|
case 5:
|
|
n = t.child.stateNode;
|
|
break;
|
|
case 1:
|
|
n = t.child.stateNode;
|
|
}
|
|
bm(t, s, n);
|
|
}
|
|
break;
|
|
case 5:
|
|
var a = t.stateNode;
|
|
if (n === null && t.flags & 4) {
|
|
n = a;
|
|
var l = t.memoizedProps;
|
|
switch (t.type) {
|
|
case "button":
|
|
case "input":
|
|
case "select":
|
|
case "textarea":
|
|
l.autoFocus && n.focus();
|
|
break;
|
|
case "img":
|
|
l.src && (n.src = l.src);
|
|
}
|
|
}
|
|
break;
|
|
case 6:
|
|
break;
|
|
case 4:
|
|
break;
|
|
case 12:
|
|
break;
|
|
case 13:
|
|
if (t.memoizedState === null) {
|
|
var u = t.alternate;
|
|
if (u !== null) {
|
|
var c = u.memoizedState;
|
|
if (c !== null) {
|
|
var d = c.dehydrated;
|
|
d !== null && Ui(d);
|
|
}
|
|
}
|
|
}
|
|
break;
|
|
case 19:
|
|
case 17:
|
|
case 21:
|
|
case 22:
|
|
case 23:
|
|
case 25:
|
|
break;
|
|
default:
|
|
throw Error(R(163));
|
|
}
|
|
He || t.flags & 512 && Pd(t);
|
|
} catch (f) {
|
|
be(t, t.return, f);
|
|
}
|
|
}
|
|
if (t === e) {
|
|
D = null;
|
|
break;
|
|
}
|
|
if (n = t.sibling, n !== null) {
|
|
n.return = t.return, D = n;
|
|
break;
|
|
}
|
|
D = t.return;
|
|
}
|
|
}
|
|
function Vm(e) {
|
|
for (; D !== null; ) {
|
|
var t = D;
|
|
if (t === e) {
|
|
D = null;
|
|
break;
|
|
}
|
|
var n = t.sibling;
|
|
if (n !== null) {
|
|
n.return = t.return, D = n;
|
|
break;
|
|
}
|
|
D = t.return;
|
|
}
|
|
}
|
|
function Bm(e) {
|
|
for (; D !== null; ) {
|
|
var t = D;
|
|
try {
|
|
switch (t.tag) {
|
|
case 0:
|
|
case 11:
|
|
case 15:
|
|
var n = t.return;
|
|
try {
|
|
Wl(4, t);
|
|
} catch (l) {
|
|
be(t, n, l);
|
|
}
|
|
break;
|
|
case 1:
|
|
var r = t.stateNode;
|
|
if (typeof r.componentDidMount == "function") {
|
|
var o = t.return;
|
|
try {
|
|
r.componentDidMount();
|
|
} catch (l) {
|
|
be(t, o, l);
|
|
}
|
|
}
|
|
var i = t.return;
|
|
try {
|
|
Pd(t);
|
|
} catch (l) {
|
|
be(t, i, l);
|
|
}
|
|
break;
|
|
case 5:
|
|
var s = t.return;
|
|
try {
|
|
Pd(t);
|
|
} catch (l) {
|
|
be(t, s, l);
|
|
}
|
|
}
|
|
} catch (l) {
|
|
be(t, t.return, l);
|
|
}
|
|
if (t === e) {
|
|
D = null;
|
|
break;
|
|
}
|
|
var a = t.sibling;
|
|
if (a !== null) {
|
|
a.return = t.return, D = a;
|
|
break;
|
|
}
|
|
D = t.return;
|
|
}
|
|
}
|
|
var pC = Math.ceil, dl = Rn.ReactCurrentDispatcher, oh = Rn.ReactCurrentOwner, _t = Rn.ReactCurrentBatchConfig, K = 0, ze = null, Te = null, Fe = 0, ht = 0, no = rr(0), $e = 0, ts = null, Rr = 0, Ul = 0, ih = 0, Pi = null, nt = null, sh = 0, Ao = 1 / 0, gn = null, fl = !1, $d = null, Yn = null, Qs = !1, Nn = null, hl = 0, Ei = 0, Ad = null, xa = -1, wa = 0;
|
|
function Ze() {
|
|
return K & 6 ? xe() : xa !== -1 ? xa : xa = xe();
|
|
}
|
|
function Qn(e) {
|
|
return e.mode & 1 ? K & 2 && Fe !== 0 ? Fe & -Fe : qk.transition !== null ? (wa === 0 && (wa = _0()), wa) : (e = te, e !== 0 || (e = window.event, e = e === void 0 ? 16 : I0(e.type)), e) : 1;
|
|
}
|
|
function Wt(e, t, n, r) {
|
|
if (50 < Ei) throw Ei = 0, Ad = null, Error(R(185));
|
|
hs(e, n, r), (!(K & 2) || e !== ze) && (e === ze && (!(K & 2) && (Ul |= n), $e === 4 && Fn(e, Fe)), at(e, r), n === 1 && K === 0 && !(t.mode & 1) && (Ao = xe() + 500, jl && or()));
|
|
}
|
|
function at(e, t) {
|
|
var n = e.callbackNode;
|
|
qw(e, t);
|
|
var r = Qa(e, e === ze ? Fe : 0);
|
|
if (r === 0) n !== null && Gp(n), e.callbackNode = null, e.callbackPriority = 0;
|
|
else if (t = r & -r, e.callbackPriority !== t) {
|
|
if (n != null && Gp(n), t === 1) e.tag === 0 ? Qk(Fm.bind(null, e)) : ev(Fm.bind(null, e)), Kk(function() {
|
|
!(K & 6) && or();
|
|
}), n = null;
|
|
else {
|
|
switch ($0(r)) {
|
|
case 1:
|
|
n = zf;
|
|
break;
|
|
case 4:
|
|
n = P0;
|
|
break;
|
|
case 16:
|
|
n = Ya;
|
|
break;
|
|
case 536870912:
|
|
n = E0;
|
|
break;
|
|
default:
|
|
n = Ya;
|
|
}
|
|
n = Zv(n, Hv.bind(null, e));
|
|
}
|
|
e.callbackPriority = t, e.callbackNode = n;
|
|
}
|
|
}
|
|
function Hv(e, t) {
|
|
if (xa = -1, wa = 0, K & 6) throw Error(R(327));
|
|
var n = e.callbackNode;
|
|
if (vo() && e.callbackNode !== n) return null;
|
|
var r = Qa(e, e === ze ? Fe : 0);
|
|
if (r === 0) return null;
|
|
if (r & 30 || r & e.expiredLanes || t) t = pl(e, r);
|
|
else {
|
|
t = r;
|
|
var o = K;
|
|
K |= 2;
|
|
var i = Gv();
|
|
(ze !== e || Fe !== t) && (gn = null, Ao = xe() + 500, xr(e, t));
|
|
do
|
|
try {
|
|
yC();
|
|
break;
|
|
} catch (a) {
|
|
Kv(e, a);
|
|
}
|
|
while (!0);
|
|
Hf(), dl.current = i, K = o, Te !== null ? t = 0 : (ze = null, Fe = 0, t = $e);
|
|
}
|
|
if (t !== 0) {
|
|
if (t === 2 && (o = rd(e), o !== 0 && (r = o, t = Rd(e, o))), t === 1) throw n = ts, xr(e, 0), Fn(e, r), at(e, xe()), n;
|
|
if (t === 6) Fn(e, r);
|
|
else {
|
|
if (o = e.current.alternate, !(r & 30) && !mC(o) && (t = pl(e, r), t === 2 && (i = rd(e), i !== 0 && (r = i, t = Rd(e, i))), t === 1)) throw n = ts, xr(e, 0), Fn(e, r), at(e, xe()), n;
|
|
switch (e.finishedWork = o, e.finishedLanes = r, t) {
|
|
case 0:
|
|
case 1:
|
|
throw Error(R(345));
|
|
case 2:
|
|
fr(e, nt, gn);
|
|
break;
|
|
case 3:
|
|
if (Fn(e, r), (r & 130023424) === r && (t = sh + 500 - xe(), 10 < t)) {
|
|
if (Qa(e, 0) !== 0) break;
|
|
if (o = e.suspendedLanes, (o & r) !== r) {
|
|
Ze(), e.pingedLanes |= e.suspendedLanes & o;
|
|
break;
|
|
}
|
|
e.timeoutHandle = dd(fr.bind(null, e, nt, gn), t);
|
|
break;
|
|
}
|
|
fr(e, nt, gn);
|
|
break;
|
|
case 4:
|
|
if (Fn(e, r), (r & 4194240) === r) break;
|
|
for (t = e.eventTimes, o = -1; 0 < r; ) {
|
|
var s = 31 - Nt(r);
|
|
i = 1 << s, s = t[s], s > o && (o = s), r &= ~i;
|
|
}
|
|
if (r = o, r = xe() - r, r = (120 > r ? 120 : 480 > r ? 480 : 1080 > r ? 1080 : 1920 > r ? 1920 : 3e3 > r ? 3e3 : 4320 > r ? 4320 : 1960 * pC(r / 1960)) - r, 10 < r) {
|
|
e.timeoutHandle = dd(fr.bind(null, e, nt, gn), r);
|
|
break;
|
|
}
|
|
fr(e, nt, gn);
|
|
break;
|
|
case 5:
|
|
fr(e, nt, gn);
|
|
break;
|
|
default:
|
|
throw Error(R(329));
|
|
}
|
|
}
|
|
}
|
|
return at(e, xe()), e.callbackNode === n ? Hv.bind(null, e) : null;
|
|
}
|
|
function Rd(e, t) {
|
|
var n = Pi;
|
|
return e.current.memoizedState.isDehydrated && (xr(e, t).flags |= 256), e = pl(e, t), e !== 2 && (t = nt, nt = n, t !== null && zd(t)), e;
|
|
}
|
|
function zd(e) {
|
|
nt === null ? nt = e : nt.push.apply(nt, e);
|
|
}
|
|
function mC(e) {
|
|
for (var t = e; ; ) {
|
|
if (t.flags & 16384) {
|
|
var n = t.updateQueue;
|
|
if (n !== null && (n = n.stores, n !== null)) for (var r = 0; r < n.length; r++) {
|
|
var o = n[r], i = o.getSnapshot;
|
|
o = o.value;
|
|
try {
|
|
if (!Kt(i(), o)) return !1;
|
|
} catch {
|
|
return !1;
|
|
}
|
|
}
|
|
}
|
|
if (n = t.child, t.subtreeFlags & 16384 && n !== null) n.return = t, t = n;
|
|
else {
|
|
if (t === e) break;
|
|
for (; t.sibling === null; ) {
|
|
if (t.return === null || t.return === e) return !0;
|
|
t = t.return;
|
|
}
|
|
t.sibling.return = t.return, t = t.sibling;
|
|
}
|
|
}
|
|
return !0;
|
|
}
|
|
function Fn(e, t) {
|
|
for (t &= ~ih, t &= ~Ul, e.suspendedLanes |= t, e.pingedLanes &= ~t, e = e.expirationTimes; 0 < t; ) {
|
|
var n = 31 - Nt(t), r = 1 << n;
|
|
e[n] = -1, t &= ~r;
|
|
}
|
|
}
|
|
function Fm(e) {
|
|
if (K & 6) throw Error(R(327));
|
|
vo();
|
|
var t = Qa(e, 0);
|
|
if (!(t & 1)) return at(e, xe()), null;
|
|
var n = pl(e, t);
|
|
if (e.tag !== 0 && n === 2) {
|
|
var r = rd(e);
|
|
r !== 0 && (t = r, n = Rd(e, r));
|
|
}
|
|
if (n === 1) throw n = ts, xr(e, 0), Fn(e, t), at(e, xe()), n;
|
|
if (n === 6) throw Error(R(345));
|
|
return e.finishedWork = e.current.alternate, e.finishedLanes = t, fr(e, nt, gn), at(e, xe()), null;
|
|
}
|
|
function ah(e, t) {
|
|
var n = K;
|
|
K |= 1;
|
|
try {
|
|
return e(t);
|
|
} finally {
|
|
K = n, K === 0 && (Ao = xe() + 500, jl && or());
|
|
}
|
|
}
|
|
function zr(e) {
|
|
Nn !== null && Nn.tag === 0 && !(K & 6) && vo();
|
|
var t = K;
|
|
K |= 1;
|
|
var n = _t.transition, r = te;
|
|
try {
|
|
if (_t.transition = null, te = 1, e) return e();
|
|
} finally {
|
|
te = r, _t.transition = n, K = t, !(K & 6) && or();
|
|
}
|
|
}
|
|
function lh() {
|
|
ht = no.current, de(no);
|
|
}
|
|
function xr(e, t) {
|
|
e.finishedWork = null, e.finishedLanes = 0;
|
|
var n = e.timeoutHandle;
|
|
if (n !== -1 && (e.timeoutHandle = -1, Hk(n)), Te !== null) for (n = Te.return; n !== null; ) {
|
|
var r = n;
|
|
switch (Nf(r), r.tag) {
|
|
case 1:
|
|
r = r.type.childContextTypes, r != null && tl();
|
|
break;
|
|
case 3:
|
|
_o(), de(it), de(Ke), qf();
|
|
break;
|
|
case 5:
|
|
Qf(r);
|
|
break;
|
|
case 4:
|
|
_o();
|
|
break;
|
|
case 13:
|
|
de(ge);
|
|
break;
|
|
case 19:
|
|
de(ge);
|
|
break;
|
|
case 10:
|
|
Kf(r.type._context);
|
|
break;
|
|
case 22:
|
|
case 23:
|
|
lh();
|
|
}
|
|
n = n.return;
|
|
}
|
|
if (ze = e, Te = e = qn(e.current, null), Fe = ht = t, $e = 0, ts = null, ih = Ul = Rr = 0, nt = Pi = null, gr !== null) {
|
|
for (t = 0; t < gr.length; t++) if (n = gr[t], r = n.interleaved, r !== null) {
|
|
n.interleaved = null;
|
|
var o = r.next, i = n.pending;
|
|
if (i !== null) {
|
|
var s = i.next;
|
|
i.next = o, r.next = s;
|
|
}
|
|
n.pending = r;
|
|
}
|
|
gr = null;
|
|
}
|
|
return e;
|
|
}
|
|
function Kv(e, t) {
|
|
do {
|
|
var n = Te;
|
|
try {
|
|
if (Hf(), va.current = cl, ul) {
|
|
for (var r = ye.memoizedState; r !== null; ) {
|
|
var o = r.queue;
|
|
o !== null && (o.pending = null), r = r.next;
|
|
}
|
|
ul = !1;
|
|
}
|
|
if (Ar = 0, Re = _e = ye = null, Ci = !1, Zi = 0, oh.current = null, n === null || n.return === null) {
|
|
$e = 1, ts = t, Te = null;
|
|
break;
|
|
}
|
|
e: {
|
|
var i = e, s = n.return, a = n, l = t;
|
|
if (t = Fe, a.flags |= 32768, l !== null && typeof l == "object" && typeof l.then == "function") {
|
|
var u = l, c = a, d = c.tag;
|
|
if (!(c.mode & 1) && (d === 0 || d === 11 || d === 15)) {
|
|
var f = c.alternate;
|
|
f ? (c.updateQueue = f.updateQueue, c.memoizedState = f.memoizedState, c.lanes = f.lanes) : (c.updateQueue = null, c.memoizedState = null);
|
|
}
|
|
var y = Pm(s);
|
|
if (y !== null) {
|
|
y.flags &= -257, Em(y, s, a, i, t), y.mode & 1 && Tm(i, u, t), t = y, l = u;
|
|
var v = t.updateQueue;
|
|
if (v === null) {
|
|
var S = /* @__PURE__ */ new Set();
|
|
S.add(l), t.updateQueue = S;
|
|
} else v.add(l);
|
|
break e;
|
|
} else {
|
|
if (!(t & 1)) {
|
|
Tm(i, u, t), uh();
|
|
break e;
|
|
}
|
|
l = Error(R(426));
|
|
}
|
|
} else if (pe && a.mode & 1) {
|
|
var k = Pm(s);
|
|
if (k !== null) {
|
|
!(k.flags & 65536) && (k.flags |= 256), Em(k, s, a, i, t), Wf($o(l, a));
|
|
break e;
|
|
}
|
|
}
|
|
i = l = $o(l, a), $e !== 4 && ($e = 2), Pi === null ? Pi = [i] : Pi.push(i), i = s;
|
|
do {
|
|
switch (i.tag) {
|
|
case 3:
|
|
i.flags |= 65536, t &= -t, i.lanes |= t;
|
|
var p = $v(i, l, t);
|
|
Sm(i, p);
|
|
break e;
|
|
case 1:
|
|
a = l;
|
|
var h = i.type, g = i.stateNode;
|
|
if (!(i.flags & 128) && (typeof h.getDerivedStateFromError == "function" || g !== null && typeof g.componentDidCatch == "function" && (Yn === null || !Yn.has(g)))) {
|
|
i.flags |= 65536, t &= -t, i.lanes |= t;
|
|
var w = Av(i, a, t);
|
|
Sm(i, w);
|
|
break e;
|
|
}
|
|
}
|
|
i = i.return;
|
|
} while (i !== null);
|
|
}
|
|
Yv(n);
|
|
} catch (E) {
|
|
t = E, Te === n && n !== null && (Te = n = n.return);
|
|
continue;
|
|
}
|
|
break;
|
|
} while (!0);
|
|
}
|
|
function Gv() {
|
|
var e = dl.current;
|
|
return dl.current = cl, e === null ? cl : e;
|
|
}
|
|
function uh() {
|
|
($e === 0 || $e === 3 || $e === 2) && ($e = 4), ze === null || !(Rr & 268435455) && !(Ul & 268435455) || Fn(ze, Fe);
|
|
}
|
|
function pl(e, t) {
|
|
var n = K;
|
|
K |= 2;
|
|
var r = Gv();
|
|
(ze !== e || Fe !== t) && (gn = null, xr(e, t));
|
|
do
|
|
try {
|
|
gC();
|
|
break;
|
|
} catch (o) {
|
|
Kv(e, o);
|
|
}
|
|
while (!0);
|
|
if (Hf(), K = n, dl.current = r, Te !== null) throw Error(R(261));
|
|
return ze = null, Fe = 0, $e;
|
|
}
|
|
function gC() {
|
|
for (; Te !== null; ) Xv(Te);
|
|
}
|
|
function yC() {
|
|
for (; Te !== null && !Nw(); ) Xv(Te);
|
|
}
|
|
function Xv(e) {
|
|
var t = qv(e.alternate, e, ht);
|
|
e.memoizedProps = e.pendingProps, t === null ? Yv(e) : Te = t, oh.current = null;
|
|
}
|
|
function Yv(e) {
|
|
var t = e;
|
|
do {
|
|
var n = t.alternate;
|
|
if (e = t.return, t.flags & 32768) {
|
|
if (n = cC(n, t), n !== null) {
|
|
n.flags &= 32767, Te = n;
|
|
return;
|
|
}
|
|
if (e !== null) e.flags |= 32768, e.subtreeFlags = 0, e.deletions = null;
|
|
else {
|
|
$e = 6, Te = null;
|
|
return;
|
|
}
|
|
} else if (n = uC(n, t, ht), n !== null) {
|
|
Te = n;
|
|
return;
|
|
}
|
|
if (t = t.sibling, t !== null) {
|
|
Te = t;
|
|
return;
|
|
}
|
|
Te = t = e;
|
|
} while (t !== null);
|
|
$e === 0 && ($e = 5);
|
|
}
|
|
function fr(e, t, n) {
|
|
var r = te, o = _t.transition;
|
|
try {
|
|
_t.transition = null, te = 1, vC(e, t, n, r);
|
|
} finally {
|
|
_t.transition = o, te = r;
|
|
}
|
|
return null;
|
|
}
|
|
function vC(e, t, n, r) {
|
|
do
|
|
vo();
|
|
while (Nn !== null);
|
|
if (K & 6) throw Error(R(327));
|
|
n = e.finishedWork;
|
|
var o = e.finishedLanes;
|
|
if (n === null) return null;
|
|
if (e.finishedWork = null, e.finishedLanes = 0, n === e.current) throw Error(R(177));
|
|
e.callbackNode = null, e.callbackPriority = 0;
|
|
var i = n.lanes | n.childLanes;
|
|
if (Zw(e, i), e === ze && (Te = ze = null, Fe = 0), !(n.subtreeFlags & 2064) && !(n.flags & 2064) || Qs || (Qs = !0, Zv(Ya, function() {
|
|
return vo(), null;
|
|
})), i = (n.flags & 15990) !== 0, n.subtreeFlags & 15990 || i) {
|
|
i = _t.transition, _t.transition = null;
|
|
var s = te;
|
|
te = 1;
|
|
var a = K;
|
|
K |= 4, oh.current = null, fC(e, n), Wv(n, e), Bk(ud), qa = !!ld, ud = ld = null, e.current = n, hC(n), Ww(), K = a, te = s, _t.transition = i;
|
|
} else e.current = n;
|
|
if (Qs && (Qs = !1, Nn = e, hl = o), i = e.pendingLanes, i === 0 && (Yn = null), Kw(n.stateNode), at(e, xe()), t !== null) for (r = e.onRecoverableError, n = 0; n < t.length; n++) o = t[n], r(o.value, { componentStack: o.stack, digest: o.digest });
|
|
if (fl) throw fl = !1, e = $d, $d = null, e;
|
|
return hl & 1 && e.tag !== 0 && vo(), i = e.pendingLanes, i & 1 ? e === Ad ? Ei++ : (Ei = 0, Ad = e) : Ei = 0, or(), null;
|
|
}
|
|
function vo() {
|
|
if (Nn !== null) {
|
|
var e = $0(hl), t = _t.transition, n = te;
|
|
try {
|
|
if (_t.transition = null, te = 16 > e ? 16 : e, Nn === null) var r = !1;
|
|
else {
|
|
if (e = Nn, Nn = null, hl = 0, K & 6) throw Error(R(331));
|
|
var o = K;
|
|
for (K |= 4, D = e.current; D !== null; ) {
|
|
var i = D, s = i.child;
|
|
if (D.flags & 16) {
|
|
var a = i.deletions;
|
|
if (a !== null) {
|
|
for (var l = 0; l < a.length; l++) {
|
|
var u = a[l];
|
|
for (D = u; D !== null; ) {
|
|
var c = D;
|
|
switch (c.tag) {
|
|
case 0:
|
|
case 11:
|
|
case 15:
|
|
Ti(8, c, i);
|
|
}
|
|
var d = c.child;
|
|
if (d !== null) d.return = c, D = d;
|
|
else for (; D !== null; ) {
|
|
c = D;
|
|
var f = c.sibling, y = c.return;
|
|
if (jv(c), c === u) {
|
|
D = null;
|
|
break;
|
|
}
|
|
if (f !== null) {
|
|
f.return = y, D = f;
|
|
break;
|
|
}
|
|
D = y;
|
|
}
|
|
}
|
|
}
|
|
var v = i.alternate;
|
|
if (v !== null) {
|
|
var S = v.child;
|
|
if (S !== null) {
|
|
v.child = null;
|
|
do {
|
|
var k = S.sibling;
|
|
S.sibling = null, S = k;
|
|
} while (S !== null);
|
|
}
|
|
}
|
|
D = i;
|
|
}
|
|
}
|
|
if (i.subtreeFlags & 2064 && s !== null) s.return = i, D = s;
|
|
else e: for (; D !== null; ) {
|
|
if (i = D, i.flags & 2048) switch (i.tag) {
|
|
case 0:
|
|
case 11:
|
|
case 15:
|
|
Ti(9, i, i.return);
|
|
}
|
|
var p = i.sibling;
|
|
if (p !== null) {
|
|
p.return = i.return, D = p;
|
|
break e;
|
|
}
|
|
D = i.return;
|
|
}
|
|
}
|
|
var h = e.current;
|
|
for (D = h; D !== null; ) {
|
|
s = D;
|
|
var g = s.child;
|
|
if (s.subtreeFlags & 2064 && g !== null) g.return = s, D = g;
|
|
else e: for (s = h; D !== null; ) {
|
|
if (a = D, a.flags & 2048) try {
|
|
switch (a.tag) {
|
|
case 0:
|
|
case 11:
|
|
case 15:
|
|
Wl(9, a);
|
|
}
|
|
} catch (E) {
|
|
be(a, a.return, E);
|
|
}
|
|
if (a === s) {
|
|
D = null;
|
|
break e;
|
|
}
|
|
var w = a.sibling;
|
|
if (w !== null) {
|
|
w.return = a.return, D = w;
|
|
break e;
|
|
}
|
|
D = a.return;
|
|
}
|
|
}
|
|
if (K = o, or(), an && typeof an.onPostCommitFiberRoot == "function") try {
|
|
an.onPostCommitFiberRoot(Il, e);
|
|
} catch {
|
|
}
|
|
r = !0;
|
|
}
|
|
return r;
|
|
} finally {
|
|
te = n, _t.transition = t;
|
|
}
|
|
}
|
|
return !1;
|
|
}
|
|
function jm(e, t, n) {
|
|
t = $o(n, t), t = $v(e, t, 1), e = Xn(e, t, 1), t = Ze(), e !== null && (hs(e, 1, t), at(e, t));
|
|
}
|
|
function be(e, t, n) {
|
|
if (e.tag === 3) jm(e, e, n);
|
|
else for (; t !== null; ) {
|
|
if (t.tag === 3) {
|
|
jm(t, e, n);
|
|
break;
|
|
} else if (t.tag === 1) {
|
|
var r = t.stateNode;
|
|
if (typeof t.type.getDerivedStateFromError == "function" || typeof r.componentDidCatch == "function" && (Yn === null || !Yn.has(r))) {
|
|
e = $o(n, e), e = Av(t, e, 1), t = Xn(t, e, 1), e = Ze(), t !== null && (hs(t, 1, e), at(t, e));
|
|
break;
|
|
}
|
|
}
|
|
t = t.return;
|
|
}
|
|
}
|
|
function SC(e, t, n) {
|
|
var r = e.pingCache;
|
|
r !== null && r.delete(t), t = Ze(), e.pingedLanes |= e.suspendedLanes & n, ze === e && (Fe & n) === n && ($e === 4 || $e === 3 && (Fe & 130023424) === Fe && 500 > xe() - sh ? xr(e, 0) : ih |= n), at(e, t);
|
|
}
|
|
function Qv(e, t) {
|
|
t === 0 && (e.mode & 1 ? (t = js, js <<= 1, !(js & 130023424) && (js = 4194304)) : t = 1);
|
|
var n = Ze();
|
|
e = _n(e, t), e !== null && (hs(e, t, n), at(e, n));
|
|
}
|
|
function bC(e) {
|
|
var t = e.memoizedState, n = 0;
|
|
t !== null && (n = t.retryLane), Qv(e, n);
|
|
}
|
|
function xC(e, t) {
|
|
var n = 0;
|
|
switch (e.tag) {
|
|
case 13:
|
|
var r = e.stateNode, o = e.memoizedState;
|
|
o !== null && (n = o.retryLane);
|
|
break;
|
|
case 19:
|
|
r = e.stateNode;
|
|
break;
|
|
default:
|
|
throw Error(R(314));
|
|
}
|
|
r !== null && r.delete(t), Qv(e, n);
|
|
}
|
|
var qv;
|
|
qv = function(e, t, n) {
|
|
if (e !== null) if (e.memoizedProps !== t.pendingProps || it.current) ot = !0;
|
|
else {
|
|
if (!(e.lanes & n) && !(t.flags & 128)) return ot = !1, lC(e, t, n);
|
|
ot = !!(e.flags & 131072);
|
|
}
|
|
else ot = !1, pe && t.flags & 1048576 && tv(t, ol, t.index);
|
|
switch (t.lanes = 0, t.tag) {
|
|
case 2:
|
|
var r = t.type;
|
|
ba(e, t), e = t.pendingProps;
|
|
var o = To(t, Ke.current);
|
|
yo(t, n), o = Jf(null, t, r, e, o, n);
|
|
var i = eh();
|
|
return t.flags |= 1, typeof o == "object" && o !== null && typeof o.render == "function" && o.$$typeof === void 0 ? (t.tag = 1, t.memoizedState = null, t.updateQueue = null, st(r) ? (i = !0, nl(t)) : i = !1, t.memoizedState = o.state !== null && o.state !== void 0 ? o.state : null, Xf(t), o.updater = Nl, t.stateNode = o, o._reactInternals = t, vd(t, r, e, n), t = xd(null, t, r, !0, i, n)) : (t.tag = 0, pe && i && Of(t), Xe(null, t, o, n), t = t.child), t;
|
|
case 16:
|
|
r = t.elementType;
|
|
e: {
|
|
switch (ba(e, t), e = t.pendingProps, o = r._init, r = o(r._payload), t.type = r, o = t.tag = kC(r), e = Bt(r, e), o) {
|
|
case 0:
|
|
t = bd(null, t, r, e, n);
|
|
break e;
|
|
case 1:
|
|
t = Am(null, t, r, e, n);
|
|
break e;
|
|
case 11:
|
|
t = _m(null, t, r, e, n);
|
|
break e;
|
|
case 14:
|
|
t = $m(null, t, r, Bt(r.type, e), n);
|
|
break e;
|
|
}
|
|
throw Error(R(
|
|
306,
|
|
r,
|
|
""
|
|
));
|
|
}
|
|
return t;
|
|
case 0:
|
|
return r = t.type, o = t.pendingProps, o = t.elementType === r ? o : Bt(r, o), bd(e, t, r, o, n);
|
|
case 1:
|
|
return r = t.type, o = t.pendingProps, o = t.elementType === r ? o : Bt(r, o), Am(e, t, r, o, n);
|
|
case 3:
|
|
e: {
|
|
if (Dv(t), e === null) throw Error(R(387));
|
|
r = t.pendingProps, i = t.memoizedState, o = i.element, av(e, t), al(t, r, null, n);
|
|
var s = t.memoizedState;
|
|
if (r = s.element, i.isDehydrated) if (i = { element: r, isDehydrated: !1, cache: s.cache, pendingSuspenseBoundaries: s.pendingSuspenseBoundaries, transitions: s.transitions }, t.updateQueue.baseState = i, t.memoizedState = i, t.flags & 256) {
|
|
o = $o(Error(R(423)), t), t = Rm(e, t, r, n, o);
|
|
break e;
|
|
} else if (r !== o) {
|
|
o = $o(Error(R(424)), t), t = Rm(e, t, r, n, o);
|
|
break e;
|
|
} else for (pt = Gn(t.stateNode.containerInfo.firstChild), mt = t, pe = !0, jt = null, n = iv(t, null, r, n), t.child = n; n; ) n.flags = n.flags & -3 | 4096, n = n.sibling;
|
|
else {
|
|
if (Po(), r === o) {
|
|
t = $n(e, t, n);
|
|
break e;
|
|
}
|
|
Xe(e, t, r, n);
|
|
}
|
|
t = t.child;
|
|
}
|
|
return t;
|
|
case 5:
|
|
return lv(t), e === null && md(t), r = t.type, o = t.pendingProps, i = e !== null ? e.memoizedProps : null, s = o.children, cd(r, o) ? s = null : i !== null && cd(r, i) && (t.flags |= 32), Mv(e, t), Xe(e, t, s, n), t.child;
|
|
case 6:
|
|
return e === null && md(t), null;
|
|
case 13:
|
|
return Iv(e, t, n);
|
|
case 4:
|
|
return Yf(t, t.stateNode.containerInfo), r = t.pendingProps, e === null ? t.child = Eo(t, null, r, n) : Xe(e, t, r, n), t.child;
|
|
case 11:
|
|
return r = t.type, o = t.pendingProps, o = t.elementType === r ? o : Bt(r, o), _m(e, t, r, o, n);
|
|
case 7:
|
|
return Xe(e, t, t.pendingProps, n), t.child;
|
|
case 8:
|
|
return Xe(e, t, t.pendingProps.children, n), t.child;
|
|
case 12:
|
|
return Xe(e, t, t.pendingProps.children, n), t.child;
|
|
case 10:
|
|
e: {
|
|
if (r = t.type._context, o = t.pendingProps, i = t.memoizedProps, s = o.value, se(il, r._currentValue), r._currentValue = s, i !== null) if (Kt(i.value, s)) {
|
|
if (i.children === o.children && !it.current) {
|
|
t = $n(e, t, n);
|
|
break e;
|
|
}
|
|
} else for (i = t.child, i !== null && (i.return = t); i !== null; ) {
|
|
var a = i.dependencies;
|
|
if (a !== null) {
|
|
s = i.child;
|
|
for (var l = a.firstContext; l !== null; ) {
|
|
if (l.context === r) {
|
|
if (i.tag === 1) {
|
|
l = Cn(-1, n & -n), l.tag = 2;
|
|
var u = i.updateQueue;
|
|
if (u !== null) {
|
|
u = u.shared;
|
|
var c = u.pending;
|
|
c === null ? l.next = l : (l.next = c.next, c.next = l), u.pending = l;
|
|
}
|
|
}
|
|
i.lanes |= n, l = i.alternate, l !== null && (l.lanes |= n), gd(
|
|
i.return,
|
|
n,
|
|
t
|
|
), a.lanes |= n;
|
|
break;
|
|
}
|
|
l = l.next;
|
|
}
|
|
} else if (i.tag === 10) s = i.type === t.type ? null : i.child;
|
|
else if (i.tag === 18) {
|
|
if (s = i.return, s === null) throw Error(R(341));
|
|
s.lanes |= n, a = s.alternate, a !== null && (a.lanes |= n), gd(s, n, t), s = i.sibling;
|
|
} else s = i.child;
|
|
if (s !== null) s.return = i;
|
|
else for (s = i; s !== null; ) {
|
|
if (s === t) {
|
|
s = null;
|
|
break;
|
|
}
|
|
if (i = s.sibling, i !== null) {
|
|
i.return = s.return, s = i;
|
|
break;
|
|
}
|
|
s = s.return;
|
|
}
|
|
i = s;
|
|
}
|
|
Xe(e, t, o.children, n), t = t.child;
|
|
}
|
|
return t;
|
|
case 9:
|
|
return o = t.type, r = t.pendingProps.children, yo(t, n), o = At(o), r = r(o), t.flags |= 1, Xe(e, t, r, n), t.child;
|
|
case 14:
|
|
return r = t.type, o = Bt(r, t.pendingProps), o = Bt(r.type, o), $m(e, t, r, o, n);
|
|
case 15:
|
|
return Rv(e, t, t.type, t.pendingProps, n);
|
|
case 17:
|
|
return r = t.type, o = t.pendingProps, o = t.elementType === r ? o : Bt(r, o), ba(e, t), t.tag = 1, st(r) ? (e = !0, nl(t)) : e = !1, yo(t, n), _v(t, r, o), vd(t, r, o, n), xd(null, t, r, !0, e, n);
|
|
case 19:
|
|
return Lv(e, t, n);
|
|
case 22:
|
|
return zv(e, t, n);
|
|
}
|
|
throw Error(R(156, t.tag));
|
|
};
|
|
function Zv(e, t) {
|
|
return T0(e, t);
|
|
}
|
|
function wC(e, t, n, r) {
|
|
this.tag = e, this.key = n, this.sibling = this.child = this.return = this.stateNode = this.type = this.elementType = null, this.index = 0, this.ref = null, this.pendingProps = t, this.dependencies = this.memoizedState = this.updateQueue = this.memoizedProps = null, this.mode = r, this.subtreeFlags = this.flags = 0, this.deletions = null, this.childLanes = this.lanes = 0, this.alternate = null;
|
|
}
|
|
function Pt(e, t, n, r) {
|
|
return new wC(e, t, n, r);
|
|
}
|
|
function ch(e) {
|
|
return e = e.prototype, !(!e || !e.isReactComponent);
|
|
}
|
|
function kC(e) {
|
|
if (typeof e == "function") return ch(e) ? 1 : 0;
|
|
if (e != null) {
|
|
if (e = e.$$typeof, e === $f) return 11;
|
|
if (e === Af) return 14;
|
|
}
|
|
return 2;
|
|
}
|
|
function qn(e, t) {
|
|
var n = e.alternate;
|
|
return n === null ? (n = Pt(e.tag, t, e.key, e.mode), n.elementType = e.elementType, n.type = e.type, n.stateNode = e.stateNode, n.alternate = e, e.alternate = n) : (n.pendingProps = t, n.type = e.type, n.flags = 0, n.subtreeFlags = 0, n.deletions = null), n.flags = e.flags & 14680064, n.childLanes = e.childLanes, n.lanes = e.lanes, n.child = e.child, n.memoizedProps = e.memoizedProps, n.memoizedState = e.memoizedState, n.updateQueue = e.updateQueue, t = e.dependencies, n.dependencies = t === null ? null : { lanes: t.lanes, firstContext: t.firstContext }, n.sibling = e.sibling, n.index = e.index, n.ref = e.ref, n;
|
|
}
|
|
function ka(e, t, n, r, o, i) {
|
|
var s = 2;
|
|
if (r = e, typeof e == "function") ch(e) && (s = 1);
|
|
else if (typeof e == "string") s = 5;
|
|
else e: switch (e) {
|
|
case Kr:
|
|
return wr(n.children, o, i, t);
|
|
case _f:
|
|
s = 8, o |= 8;
|
|
break;
|
|
case Nc:
|
|
return e = Pt(12, n, t, o | 2), e.elementType = Nc, e.lanes = i, e;
|
|
case Wc:
|
|
return e = Pt(13, n, t, o), e.elementType = Wc, e.lanes = i, e;
|
|
case Uc:
|
|
return e = Pt(19, n, t, o), e.elementType = Uc, e.lanes = i, e;
|
|
case l0:
|
|
return Hl(n, o, i, t);
|
|
default:
|
|
if (typeof e == "object" && e !== null) switch (e.$$typeof) {
|
|
case s0:
|
|
s = 10;
|
|
break e;
|
|
case a0:
|
|
s = 9;
|
|
break e;
|
|
case $f:
|
|
s = 11;
|
|
break e;
|
|
case Af:
|
|
s = 14;
|
|
break e;
|
|
case Ln:
|
|
s = 16, r = null;
|
|
break e;
|
|
}
|
|
throw Error(R(130, e == null ? e : typeof e, ""));
|
|
}
|
|
return t = Pt(s, n, t, o), t.elementType = e, t.type = r, t.lanes = i, t;
|
|
}
|
|
function wr(e, t, n, r) {
|
|
return e = Pt(7, e, r, t), e.lanes = n, e;
|
|
}
|
|
function Hl(e, t, n, r) {
|
|
return e = Pt(22, e, r, t), e.elementType = l0, e.lanes = n, e.stateNode = { isHidden: !1 }, e;
|
|
}
|
|
function oc(e, t, n) {
|
|
return e = Pt(6, e, null, t), e.lanes = n, e;
|
|
}
|
|
function ic(e, t, n) {
|
|
return t = Pt(4, e.children !== null ? e.children : [], e.key, t), t.lanes = n, t.stateNode = { containerInfo: e.containerInfo, pendingChildren: null, implementation: e.implementation }, t;
|
|
}
|
|
function CC(e, t, n, r, o) {
|
|
this.tag = t, this.containerInfo = e, this.finishedWork = this.pingCache = this.current = this.pendingChildren = null, this.timeoutHandle = -1, this.callbackNode = this.pendingContext = this.context = null, this.callbackPriority = 0, this.eventTimes = Fu(0), this.expirationTimes = Fu(-1), this.entangledLanes = this.finishedLanes = this.mutableReadLanes = this.expiredLanes = this.pingedLanes = this.suspendedLanes = this.pendingLanes = 0, this.entanglements = Fu(0), this.identifierPrefix = r, this.onRecoverableError = o, this.mutableSourceEagerHydrationData = null;
|
|
}
|
|
function dh(e, t, n, r, o, i, s, a, l) {
|
|
return e = new CC(e, t, n, a, l), t === 1 ? (t = 1, i === !0 && (t |= 8)) : t = 0, i = Pt(3, null, null, t), e.current = i, i.stateNode = e, i.memoizedState = { element: r, isDehydrated: n, cache: null, transitions: null, pendingSuspenseBoundaries: null }, Xf(i), e;
|
|
}
|
|
function TC(e, t, n) {
|
|
var r = 3 < arguments.length && arguments[3] !== void 0 ? arguments[3] : null;
|
|
return { $$typeof: Hr, key: r == null ? null : "" + r, children: e, containerInfo: t, implementation: n };
|
|
}
|
|
function Jv(e) {
|
|
if (!e) return Jn;
|
|
e = e._reactInternals;
|
|
e: {
|
|
if (Lr(e) !== e || e.tag !== 1) throw Error(R(170));
|
|
var t = e;
|
|
do {
|
|
switch (t.tag) {
|
|
case 3:
|
|
t = t.stateNode.context;
|
|
break e;
|
|
case 1:
|
|
if (st(t.type)) {
|
|
t = t.stateNode.__reactInternalMemoizedMergedChildContext;
|
|
break e;
|
|
}
|
|
}
|
|
t = t.return;
|
|
} while (t !== null);
|
|
throw Error(R(171));
|
|
}
|
|
if (e.tag === 1) {
|
|
var n = e.type;
|
|
if (st(n)) return J0(e, n, t);
|
|
}
|
|
return t;
|
|
}
|
|
function e1(e, t, n, r, o, i, s, a, l) {
|
|
return e = dh(n, r, !0, e, o, i, s, a, l), e.context = Jv(null), n = e.current, r = Ze(), o = Qn(n), i = Cn(r, o), i.callback = t ?? null, Xn(n, i, o), e.current.lanes = o, hs(e, o, r), at(e, r), e;
|
|
}
|
|
function Kl(e, t, n, r) {
|
|
var o = t.current, i = Ze(), s = Qn(o);
|
|
return n = Jv(n), t.context === null ? t.context = n : t.pendingContext = n, t = Cn(i, s), t.payload = { element: e }, r = r === void 0 ? null : r, r !== null && (t.callback = r), e = Xn(o, t, s), e !== null && (Wt(e, o, s, i), ya(e, o, s)), s;
|
|
}
|
|
function ml(e) {
|
|
if (e = e.current, !e.child) return null;
|
|
switch (e.child.tag) {
|
|
case 5:
|
|
return e.child.stateNode;
|
|
default:
|
|
return e.child.stateNode;
|
|
}
|
|
}
|
|
function Om(e, t) {
|
|
if (e = e.memoizedState, e !== null && e.dehydrated !== null) {
|
|
var n = e.retryLane;
|
|
e.retryLane = n !== 0 && n < t ? n : t;
|
|
}
|
|
}
|
|
function fh(e, t) {
|
|
Om(e, t), (e = e.alternate) && Om(e, t);
|
|
}
|
|
function PC() {
|
|
return null;
|
|
}
|
|
var t1 = typeof reportError == "function" ? reportError : function(e) {
|
|
console.error(e);
|
|
};
|
|
function hh(e) {
|
|
this._internalRoot = e;
|
|
}
|
|
Gl.prototype.render = hh.prototype.render = function(e) {
|
|
var t = this._internalRoot;
|
|
if (t === null) throw Error(R(409));
|
|
Kl(e, t, null, null);
|
|
};
|
|
Gl.prototype.unmount = hh.prototype.unmount = function() {
|
|
var e = this._internalRoot;
|
|
if (e !== null) {
|
|
this._internalRoot = null;
|
|
var t = e.containerInfo;
|
|
zr(function() {
|
|
Kl(null, e, null, null);
|
|
}), t[En] = null;
|
|
}
|
|
};
|
|
function Gl(e) {
|
|
this._internalRoot = e;
|
|
}
|
|
Gl.prototype.unstable_scheduleHydration = function(e) {
|
|
if (e) {
|
|
var t = z0();
|
|
e = { blockedOn: null, target: e, priority: t };
|
|
for (var n = 0; n < Bn.length && t !== 0 && t < Bn[n].priority; n++) ;
|
|
Bn.splice(n, 0, e), n === 0 && D0(e);
|
|
}
|
|
};
|
|
function ph(e) {
|
|
return !(!e || e.nodeType !== 1 && e.nodeType !== 9 && e.nodeType !== 11);
|
|
}
|
|
function Xl(e) {
|
|
return !(!e || e.nodeType !== 1 && e.nodeType !== 9 && e.nodeType !== 11 && (e.nodeType !== 8 || e.nodeValue !== " react-mount-point-unstable "));
|
|
}
|
|
function Nm() {
|
|
}
|
|
function EC(e, t, n, r, o) {
|
|
if (o) {
|
|
if (typeof r == "function") {
|
|
var i = r;
|
|
r = function() {
|
|
var u = ml(s);
|
|
i.call(u);
|
|
};
|
|
}
|
|
var s = e1(t, r, e, 0, null, !1, !1, "", Nm);
|
|
return e._reactRootContainer = s, e[En] = s.current, Gi(e.nodeType === 8 ? e.parentNode : e), zr(), s;
|
|
}
|
|
for (; o = e.lastChild; ) e.removeChild(o);
|
|
if (typeof r == "function") {
|
|
var a = r;
|
|
r = function() {
|
|
var u = ml(l);
|
|
a.call(u);
|
|
};
|
|
}
|
|
var l = dh(e, 0, !1, null, null, !1, !1, "", Nm);
|
|
return e._reactRootContainer = l, e[En] = l.current, Gi(e.nodeType === 8 ? e.parentNode : e), zr(function() {
|
|
Kl(t, l, n, r);
|
|
}), l;
|
|
}
|
|
function Yl(e, t, n, r, o) {
|
|
var i = n._reactRootContainer;
|
|
if (i) {
|
|
var s = i;
|
|
if (typeof o == "function") {
|
|
var a = o;
|
|
o = function() {
|
|
var l = ml(s);
|
|
a.call(l);
|
|
};
|
|
}
|
|
Kl(t, s, e, o);
|
|
} else s = EC(n, t, e, o, r);
|
|
return ml(s);
|
|
}
|
|
A0 = function(e) {
|
|
switch (e.tag) {
|
|
case 3:
|
|
var t = e.stateNode;
|
|
if (t.current.memoizedState.isDehydrated) {
|
|
var n = di(t.pendingLanes);
|
|
n !== 0 && (Mf(t, n | 1), at(t, xe()), !(K & 6) && (Ao = xe() + 500, or()));
|
|
}
|
|
break;
|
|
case 13:
|
|
zr(function() {
|
|
var r = _n(e, 1);
|
|
if (r !== null) {
|
|
var o = Ze();
|
|
Wt(r, e, 1, o);
|
|
}
|
|
}), fh(e, 1);
|
|
}
|
|
};
|
|
Df = function(e) {
|
|
if (e.tag === 13) {
|
|
var t = _n(e, 134217728);
|
|
if (t !== null) {
|
|
var n = Ze();
|
|
Wt(t, e, 134217728, n);
|
|
}
|
|
fh(e, 134217728);
|
|
}
|
|
};
|
|
R0 = function(e) {
|
|
if (e.tag === 13) {
|
|
var t = Qn(e), n = _n(e, t);
|
|
if (n !== null) {
|
|
var r = Ze();
|
|
Wt(n, e, t, r);
|
|
}
|
|
fh(e, t);
|
|
}
|
|
};
|
|
z0 = function() {
|
|
return te;
|
|
};
|
|
M0 = function(e, t) {
|
|
var n = te;
|
|
try {
|
|
return te = e, t();
|
|
} finally {
|
|
te = n;
|
|
}
|
|
};
|
|
ed = function(e, t, n) {
|
|
switch (t) {
|
|
case "input":
|
|
if (Gc(e, n), t = n.name, n.type === "radio" && t != null) {
|
|
for (n = e; n.parentNode; ) n = n.parentNode;
|
|
for (n = n.querySelectorAll("input[name=" + JSON.stringify("" + t) + '][type="radio"]'), t = 0; t < n.length; t++) {
|
|
var r = n[t];
|
|
if (r !== e && r.form === e.form) {
|
|
var o = Fl(r);
|
|
if (!o) throw Error(R(90));
|
|
c0(r), Gc(r, o);
|
|
}
|
|
}
|
|
}
|
|
break;
|
|
case "textarea":
|
|
f0(e, n);
|
|
break;
|
|
case "select":
|
|
t = n.value, t != null && ho(e, !!n.multiple, t, !1);
|
|
}
|
|
};
|
|
S0 = ah;
|
|
b0 = zr;
|
|
var _C = { usingClientEntryPoint: !1, Events: [ms, Qr, Fl, y0, v0, ah] }, ri = { findFiberByHostInstance: mr, bundleType: 0, version: "18.3.1", rendererPackageName: "react-dom" }, $C = { bundleType: ri.bundleType, version: ri.version, rendererPackageName: ri.rendererPackageName, rendererConfig: ri.rendererConfig, overrideHookState: null, overrideHookStateDeletePath: null, overrideHookStateRenamePath: null, overrideProps: null, overridePropsDeletePath: null, overridePropsRenamePath: null, setErrorHandler: null, setSuspenseHandler: null, scheduleUpdate: null, currentDispatcherRef: Rn.ReactCurrentDispatcher, findHostInstanceByFiber: function(e) {
|
|
return e = k0(e), e === null ? null : e.stateNode;
|
|
}, findFiberByHostInstance: ri.findFiberByHostInstance || PC, findHostInstancesForRefresh: null, scheduleRefresh: null, scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null, reconcilerVersion: "18.3.1-next-f1338f8080-20240426" };
|
|
if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u") {
|
|
var qs = __REACT_DEVTOOLS_GLOBAL_HOOK__;
|
|
if (!qs.isDisabled && qs.supportsFiber) try {
|
|
Il = qs.inject($C), an = qs;
|
|
} catch {
|
|
}
|
|
}
|
|
St.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = _C;
|
|
St.createPortal = function(e, t) {
|
|
var n = 2 < arguments.length && arguments[2] !== void 0 ? arguments[2] : null;
|
|
if (!ph(t)) throw Error(R(200));
|
|
return TC(e, t, null, n);
|
|
};
|
|
St.createRoot = function(e, t) {
|
|
if (!ph(e)) throw Error(R(299));
|
|
var n = !1, r = "", o = t1;
|
|
return t != null && (t.unstable_strictMode === !0 && (n = !0), t.identifierPrefix !== void 0 && (r = t.identifierPrefix), t.onRecoverableError !== void 0 && (o = t.onRecoverableError)), t = dh(e, 1, !1, null, null, n, !1, r, o), e[En] = t.current, Gi(e.nodeType === 8 ? e.parentNode : e), new hh(t);
|
|
};
|
|
St.findDOMNode = function(e) {
|
|
if (e == null) return null;
|
|
if (e.nodeType === 1) return e;
|
|
var t = e._reactInternals;
|
|
if (t === void 0)
|
|
throw typeof e.render == "function" ? Error(R(188)) : (e = Object.keys(e).join(","), Error(R(268, e)));
|
|
return e = k0(t), e = e === null ? null : e.stateNode, e;
|
|
};
|
|
St.flushSync = function(e) {
|
|
return zr(e);
|
|
};
|
|
St.hydrate = function(e, t, n) {
|
|
if (!Xl(t)) throw Error(R(200));
|
|
return Yl(null, e, t, !0, n);
|
|
};
|
|
St.hydrateRoot = function(e, t, n) {
|
|
if (!ph(e)) throw Error(R(405));
|
|
var r = n != null && n.hydratedSources || null, o = !1, i = "", s = t1;
|
|
if (n != null && (n.unstable_strictMode === !0 && (o = !0), n.identifierPrefix !== void 0 && (i = n.identifierPrefix), n.onRecoverableError !== void 0 && (s = n.onRecoverableError)), t = e1(t, null, e, 1, n ?? null, o, !1, i, s), e[En] = t.current, Gi(e), r) for (e = 0; e < r.length; e++) n = r[e], o = n._getVersion, o = o(n._source), t.mutableSourceEagerHydrationData == null ? t.mutableSourceEagerHydrationData = [n, o] : t.mutableSourceEagerHydrationData.push(
|
|
n,
|
|
o
|
|
);
|
|
return new Gl(t);
|
|
};
|
|
St.render = function(e, t, n) {
|
|
if (!Xl(t)) throw Error(R(200));
|
|
return Yl(null, e, t, !1, n);
|
|
};
|
|
St.unmountComponentAtNode = function(e) {
|
|
if (!Xl(e)) throw Error(R(40));
|
|
return e._reactRootContainer ? (zr(function() {
|
|
Yl(null, null, e, !1, function() {
|
|
e._reactRootContainer = null, e[En] = null;
|
|
});
|
|
}), !0) : !1;
|
|
};
|
|
St.unstable_batchedUpdates = ah;
|
|
St.unstable_renderSubtreeIntoContainer = function(e, t, n, r) {
|
|
if (!Xl(n)) throw Error(R(200));
|
|
if (e == null || e._reactInternals === void 0) throw Error(R(38));
|
|
return Yl(e, t, n, !1, r);
|
|
};
|
|
St.version = "18.3.1-next-f1338f8080-20240426";
|
|
function n1() {
|
|
if (!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ > "u" || typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE != "function"))
|
|
try {
|
|
__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n1);
|
|
} catch (e) {
|
|
console.error(e);
|
|
}
|
|
}
|
|
n1(), n0.exports = St;
|
|
var mh = n0.exports, r1, Wm = mh;
|
|
r1 = Wm.createRoot, Wm.hydrateRoot;
|
|
function AC() {
|
|
return !!globalThis?.document;
|
|
}
|
|
function RC(e, ...t) {
|
|
if (e == null)
|
|
throw new TypeError("Cannot convert undefined or null to object");
|
|
const n = { ...e };
|
|
for (const r of t)
|
|
if (r != null)
|
|
for (const o in r)
|
|
Object.prototype.hasOwnProperty.call(r, o) && (o in n && delete n[o], n[o] = r[o]);
|
|
return n;
|
|
}
|
|
function zC(e) {
|
|
return Array.isArray(e);
|
|
}
|
|
function Ut(e) {
|
|
const t = typeof e;
|
|
return e != null && (t === "object" || t === "function") && !zC(e);
|
|
}
|
|
function MC(e) {
|
|
const t = e == null ? 0 : e.length;
|
|
return t ? e[t - 1] : void 0;
|
|
}
|
|
function DC(e) {
|
|
const t = parseFloat(e.toString()), n = e.toString().replace(String(t), "");
|
|
return { unitless: !n, value: t, unit: n };
|
|
}
|
|
function Md(e) {
|
|
if (e == null)
|
|
return e;
|
|
const { unitless: t } = DC(e);
|
|
return t || typeof e == "number" ? `${e}px` : e;
|
|
}
|
|
const o1 = (e, t) => parseInt(e[1], 10) > parseInt(t[1], 10) ? 1 : -1, gh = (e) => Object.fromEntries(Object.entries(e).sort(o1));
|
|
function Um(e) {
|
|
const t = gh(e);
|
|
return Object.assign(Object.values(t), t);
|
|
}
|
|
function IC(e) {
|
|
const t = Object.keys(gh(e));
|
|
return new Set(t);
|
|
}
|
|
function Hm(e) {
|
|
if (!e)
|
|
return e;
|
|
e = Md(e) ?? e;
|
|
const t = -0.02;
|
|
return typeof e == "number" ? `${e + t}` : e.replace(/(\d+\.?\d*)/u, (n) => `${parseFloat(n) + t}`);
|
|
}
|
|
function hi(e, t) {
|
|
const n = ["@media screen"];
|
|
return e && n.push("and", `(min-width: ${Md(e)})`), t && n.push("and", `(max-width: ${Md(t)})`), n.join(" ");
|
|
}
|
|
function LC(e) {
|
|
if (!e)
|
|
return null;
|
|
e.base = e.base ?? "0px";
|
|
const t = Um(e), n = Object.entries(e).sort(o1).map(([i, s], a, l) => {
|
|
let [, u] = l[a + 1] ?? [];
|
|
return u = parseFloat(u) > 0 ? Hm(u) : void 0, {
|
|
_minW: Hm(s),
|
|
breakpoint: i,
|
|
minW: s,
|
|
maxW: u,
|
|
maxWQuery: hi(null, u),
|
|
minWQuery: hi(s),
|
|
minMaxQuery: hi(s, u)
|
|
};
|
|
}), r = IC(e), o = Array.from(r.values());
|
|
return {
|
|
keys: r,
|
|
normalized: t,
|
|
isResponsive(i) {
|
|
const s = Object.keys(i);
|
|
return s.length > 0 && s.every((a) => r.has(a));
|
|
},
|
|
asObject: gh(e),
|
|
asArray: Um(e),
|
|
details: n,
|
|
get(i) {
|
|
return n.find((s) => s.breakpoint === i);
|
|
},
|
|
media: [
|
|
null,
|
|
...t.map((i) => hi(i)).slice(1)
|
|
],
|
|
/**
|
|
* Converts the object responsive syntax to array syntax
|
|
*
|
|
* @example
|
|
* toArrayValue({ base: 1, sm: 2, md: 3 }) // => [1, 2, 3]
|
|
*/
|
|
toArrayValue(i) {
|
|
if (!Ut(i))
|
|
throw new Error("toArrayValue: value must be an object");
|
|
const s = o.map((a) => i[a] ?? null);
|
|
for (; MC(s) === null; )
|
|
s.pop();
|
|
return s;
|
|
},
|
|
/**
|
|
* Converts the array responsive syntax to object syntax
|
|
*
|
|
* @example
|
|
* toObjectValue([1, 2, 3]) // => { base: 1, sm: 2, md: 3 }
|
|
*/
|
|
toObjectValue(i) {
|
|
if (!Array.isArray(i))
|
|
throw new Error("toObjectValue: value must be an array");
|
|
return i.reduce(
|
|
(s, a, l) => {
|
|
const u = o[l];
|
|
return u != null && a != null && (s[u] = a), s;
|
|
},
|
|
{}
|
|
);
|
|
}
|
|
};
|
|
}
|
|
function VC(e) {
|
|
const t = Object.assign({}, e);
|
|
for (let n in t)
|
|
t[n] === void 0 && delete t[n];
|
|
return t;
|
|
}
|
|
function BC(e, t) {
|
|
return `${e} returned \`undefined\`. Seems you forgot to wrap component within ${t}`;
|
|
}
|
|
function jo(e = {}) {
|
|
const {
|
|
name: t,
|
|
strict: n = !0,
|
|
hookName: r = "useContext",
|
|
providerName: o = "Provider",
|
|
errorMessage: i,
|
|
defaultValue: s
|
|
} = e, a = C.createContext(s);
|
|
a.displayName = t;
|
|
function l() {
|
|
const u = C.useContext(a);
|
|
if (!u && n) {
|
|
const c = new Error(
|
|
i ?? BC(r, o)
|
|
);
|
|
throw c.name = "ContextError", Error.captureStackTrace?.(c, l), c;
|
|
}
|
|
return u;
|
|
}
|
|
return [a.Provider, l, a];
|
|
}
|
|
const Vr = (...e) => e.filter(Boolean).join(" ");
|
|
function FC(e, t, n, r) {
|
|
const o = typeof t == "string" ? t.split(".") : [t];
|
|
for (r = 0; r < o.length && e; r += 1)
|
|
e = e[o[r]];
|
|
return e === void 0 ? n : e;
|
|
}
|
|
const jC = (e) => {
|
|
const t = /* @__PURE__ */ new WeakMap();
|
|
return (r, o, i, s) => {
|
|
if (typeof r > "u")
|
|
return e(r, o, i);
|
|
t.has(r) || t.set(r, /* @__PURE__ */ new Map());
|
|
const a = t.get(r);
|
|
if (a.has(o))
|
|
return a.get(o);
|
|
const l = e(r, o, i, s);
|
|
return a.set(o, l), l;
|
|
};
|
|
}, i1 = jC(FC), OC = (e) => e.default || e;
|
|
function NC(e, t = []) {
|
|
const n = Object.assign({}, e);
|
|
for (const r of t)
|
|
r in n && delete n[r];
|
|
return n;
|
|
}
|
|
function WC(e, t) {
|
|
const n = {};
|
|
for (const r of t)
|
|
r in e && (n[r] = e[r]);
|
|
return n;
|
|
}
|
|
const UC = (e) => typeof e == "function";
|
|
function on(e, ...t) {
|
|
return UC(e) ? e(...t) : e;
|
|
}
|
|
function HC(e, ...t) {
|
|
const n = Object.getOwnPropertyDescriptors(e), r = Object.keys(n), o = (s) => {
|
|
const a = {};
|
|
for (let l = 0; l < s.length; l++) {
|
|
const u = s[l];
|
|
n[u] && (Object.defineProperty(a, u, n[u]), delete n[u]);
|
|
}
|
|
return a;
|
|
}, i = (s) => o(Array.isArray(s) ? s : r.filter(s));
|
|
return t.map(i).concat(o(r));
|
|
}
|
|
function Km(e, t, n = {}) {
|
|
const { stop: r, getKey: o } = n;
|
|
function i(s, a = []) {
|
|
if (Ut(s) || Array.isArray(s)) {
|
|
const l = {};
|
|
for (const [u, c] of Object.entries(s)) {
|
|
const d = o?.(u) ?? u, f = [...a, d];
|
|
if (r?.(s, f))
|
|
return t(s, a);
|
|
l[d] = i(c, f);
|
|
}
|
|
return l;
|
|
}
|
|
return t(s, a);
|
|
}
|
|
return i(e);
|
|
}
|
|
var gl = { exports: {} };
|
|
gl.exports;
|
|
(function(e, t) {
|
|
var n = 200, r = "__lodash_hash_undefined__", o = 800, i = 16, s = 9007199254740991, a = "[object Arguments]", l = "[object Array]", u = "[object AsyncFunction]", c = "[object Boolean]", d = "[object Date]", f = "[object Error]", y = "[object Function]", v = "[object GeneratorFunction]", S = "[object Map]", k = "[object Number]", p = "[object Null]", h = "[object Object]", g = "[object Proxy]", w = "[object RegExp]", E = "[object Set]", _ = "[object String]", P = "[object Undefined]", $ = "[object WeakMap]", V = "[object ArrayBuffer]", A = "[object DataView]", N = "[object Float32Array]", le = "[object Float64Array]", De = "[object Int8Array]", Ge = "[object Int16Array]", ct = "[object Int32Array]", Oe = "[object Uint8Array]", Fr = "[object Uint8ClampedArray]", z = "[object Uint16Array]", B = "[object Uint32Array]", O = /[\\^$.*+?()[\]{}|]/g, J = /^\[object .+?Constructor\]$/, Se = /^(?:0|[1-9]\d*)$/, ee = {};
|
|
ee[N] = ee[le] = ee[De] = ee[Ge] = ee[ct] = ee[Oe] = ee[Fr] = ee[z] = ee[B] = !0, ee[a] = ee[l] = ee[V] = ee[c] = ee[A] = ee[d] = ee[f] = ee[y] = ee[S] = ee[k] = ee[h] = ee[w] = ee[E] = ee[_] = ee[$] = !1;
|
|
var Gt = typeof Ds == "object" && Ds && Ds.Object === Object && Ds, Ho = typeof self == "object" && self && self.Object === Object && self, dt = Gt || Ho || Function("return this")(), sr = t && !t.nodeType && t, Ko = sr && !0 && e && !e.nodeType && e, hp = Ko && Ko.exports === sr, wu = hp && Gt.process, pp = function() {
|
|
try {
|
|
var m = Ko && Ko.require && Ko.require("util").types;
|
|
return m || wu && wu.binding && wu.binding("util");
|
|
} catch {
|
|
}
|
|
}(), mp = pp && pp.isTypedArray;
|
|
function Ub(m, x, T) {
|
|
switch (T.length) {
|
|
case 0:
|
|
return m.call(x);
|
|
case 1:
|
|
return m.call(x, T[0]);
|
|
case 2:
|
|
return m.call(x, T[0], T[1]);
|
|
case 3:
|
|
return m.call(x, T[0], T[1], T[2]);
|
|
}
|
|
return m.apply(x, T);
|
|
}
|
|
function Hb(m, x) {
|
|
for (var T = -1, L = Array(m); ++T < m; )
|
|
L[T] = x(T);
|
|
return L;
|
|
}
|
|
function Kb(m) {
|
|
return function(x) {
|
|
return m(x);
|
|
};
|
|
}
|
|
function Gb(m, x) {
|
|
return m?.[x];
|
|
}
|
|
function Xb(m, x) {
|
|
return function(T) {
|
|
return m(x(T));
|
|
};
|
|
}
|
|
var Yb = Array.prototype, Qb = Function.prototype, Ps = Object.prototype, ku = dt["__core-js_shared__"], Es = Qb.toString, zn = Ps.hasOwnProperty, gp = function() {
|
|
var m = /[^.]+$/.exec(ku && ku.keys && ku.keys.IE_PROTO || "");
|
|
return m ? "Symbol(src)_1." + m : "";
|
|
}(), yp = Ps.toString, qb = Es.call(Object), Zb = RegExp(
|
|
"^" + Es.call(zn).replace(O, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
|
|
), _s = hp ? dt.Buffer : void 0, vp = dt.Symbol, Sp = dt.Uint8Array;
|
|
_s && _s.allocUnsafe;
|
|
var bp = Xb(Object.getPrototypeOf, Object), xp = Object.create, Jb = Ps.propertyIsEnumerable, ex = Yb.splice, ar = vp ? vp.toStringTag : void 0, $s = function() {
|
|
try {
|
|
var m = Pu(Object, "defineProperty");
|
|
return m({}, "", {}), m;
|
|
} catch {
|
|
}
|
|
}(), tx = _s ? _s.isBuffer : void 0, wp = Math.max, nx = Date.now, kp = Pu(dt, "Map"), Go = Pu(Object, "create"), rx = /* @__PURE__ */ function() {
|
|
function m() {
|
|
}
|
|
return function(x) {
|
|
if (!ur(x))
|
|
return {};
|
|
if (xp)
|
|
return xp(x);
|
|
m.prototype = x;
|
|
var T = new m();
|
|
return m.prototype = void 0, T;
|
|
};
|
|
}();
|
|
function lr(m) {
|
|
var x = -1, T = m == null ? 0 : m.length;
|
|
for (this.clear(); ++x < T; ) {
|
|
var L = m[x];
|
|
this.set(L[0], L[1]);
|
|
}
|
|
}
|
|
function ox() {
|
|
this.__data__ = Go ? Go(null) : {}, this.size = 0;
|
|
}
|
|
function ix(m) {
|
|
var x = this.has(m) && delete this.__data__[m];
|
|
return this.size -= x ? 1 : 0, x;
|
|
}
|
|
function sx(m) {
|
|
var x = this.__data__;
|
|
if (Go) {
|
|
var T = x[m];
|
|
return T === r ? void 0 : T;
|
|
}
|
|
return zn.call(x, m) ? x[m] : void 0;
|
|
}
|
|
function ax(m) {
|
|
var x = this.__data__;
|
|
return Go ? x[m] !== void 0 : zn.call(x, m);
|
|
}
|
|
function lx(m, x) {
|
|
var T = this.__data__;
|
|
return this.size += this.has(m) ? 0 : 1, T[m] = Go && x === void 0 ? r : x, this;
|
|
}
|
|
lr.prototype.clear = ox, lr.prototype.delete = ix, lr.prototype.get = sx, lr.prototype.has = ax, lr.prototype.set = lx;
|
|
function hn(m) {
|
|
var x = -1, T = m == null ? 0 : m.length;
|
|
for (this.clear(); ++x < T; ) {
|
|
var L = m[x];
|
|
this.set(L[0], L[1]);
|
|
}
|
|
}
|
|
function ux() {
|
|
this.__data__ = [], this.size = 0;
|
|
}
|
|
function cx(m) {
|
|
var x = this.__data__, T = As(x, m);
|
|
if (T < 0)
|
|
return !1;
|
|
var L = x.length - 1;
|
|
return T == L ? x.pop() : ex.call(x, T, 1), --this.size, !0;
|
|
}
|
|
function dx(m) {
|
|
var x = this.__data__, T = As(x, m);
|
|
return T < 0 ? void 0 : x[T][1];
|
|
}
|
|
function fx(m) {
|
|
return As(this.__data__, m) > -1;
|
|
}
|
|
function hx(m, x) {
|
|
var T = this.__data__, L = As(T, m);
|
|
return L < 0 ? (++this.size, T.push([m, x])) : T[L][1] = x, this;
|
|
}
|
|
hn.prototype.clear = ux, hn.prototype.delete = cx, hn.prototype.get = dx, hn.prototype.has = fx, hn.prototype.set = hx;
|
|
function jr(m) {
|
|
var x = -1, T = m == null ? 0 : m.length;
|
|
for (this.clear(); ++x < T; ) {
|
|
var L = m[x];
|
|
this.set(L[0], L[1]);
|
|
}
|
|
}
|
|
function px() {
|
|
this.size = 0, this.__data__ = {
|
|
hash: new lr(),
|
|
map: new (kp || hn)(),
|
|
string: new lr()
|
|
};
|
|
}
|
|
function mx(m) {
|
|
var x = zs(this, m).delete(m);
|
|
return this.size -= x ? 1 : 0, x;
|
|
}
|
|
function gx(m) {
|
|
return zs(this, m).get(m);
|
|
}
|
|
function yx(m) {
|
|
return zs(this, m).has(m);
|
|
}
|
|
function vx(m, x) {
|
|
var T = zs(this, m), L = T.size;
|
|
return T.set(m, x), this.size += T.size == L ? 0 : 1, this;
|
|
}
|
|
jr.prototype.clear = px, jr.prototype.delete = mx, jr.prototype.get = gx, jr.prototype.has = yx, jr.prototype.set = vx;
|
|
function Or(m) {
|
|
var x = this.__data__ = new hn(m);
|
|
this.size = x.size;
|
|
}
|
|
function Sx() {
|
|
this.__data__ = new hn(), this.size = 0;
|
|
}
|
|
function bx(m) {
|
|
var x = this.__data__, T = x.delete(m);
|
|
return this.size = x.size, T;
|
|
}
|
|
function xx(m) {
|
|
return this.__data__.get(m);
|
|
}
|
|
function wx(m) {
|
|
return this.__data__.has(m);
|
|
}
|
|
function kx(m, x) {
|
|
var T = this.__data__;
|
|
if (T instanceof hn) {
|
|
var L = T.__data__;
|
|
if (!kp || L.length < n - 1)
|
|
return L.push([m, x]), this.size = ++T.size, this;
|
|
T = this.__data__ = new jr(L);
|
|
}
|
|
return T.set(m, x), this.size = T.size, this;
|
|
}
|
|
Or.prototype.clear = Sx, Or.prototype.delete = bx, Or.prototype.get = xx, Or.prototype.has = wx, Or.prototype.set = kx;
|
|
function Cx(m, x) {
|
|
var T = $u(m), L = !T && _u(m), H = !T && !L && _p(m), re = !T && !L && !H && Ap(m), fe = T || L || H || re, G = fe ? Hb(m.length, String) : [], he = G.length;
|
|
for (var Mt in m)
|
|
fe && // Safari 9 has enumerable `arguments.length` in strict mode.
|
|
(Mt == "length" || // Node.js 0.10 has enumerable non-index properties on buffers.
|
|
H && (Mt == "offset" || Mt == "parent") || // PhantomJS 2 has enumerable non-index properties on typed arrays.
|
|
re && (Mt == "buffer" || Mt == "byteLength" || Mt == "byteOffset") || // Skip index properties.
|
|
Pp(Mt, he)) || G.push(Mt);
|
|
return G;
|
|
}
|
|
function Cu(m, x, T) {
|
|
(T !== void 0 && !Ms(m[x], T) || T === void 0 && !(x in m)) && Tu(m, x, T);
|
|
}
|
|
function Tx(m, x, T) {
|
|
var L = m[x];
|
|
(!(zn.call(m, x) && Ms(L, T)) || T === void 0 && !(x in m)) && Tu(m, x, T);
|
|
}
|
|
function As(m, x) {
|
|
for (var T = m.length; T--; )
|
|
if (Ms(m[T][0], x))
|
|
return T;
|
|
return -1;
|
|
}
|
|
function Tu(m, x, T) {
|
|
x == "__proto__" && $s ? $s(m, x, {
|
|
configurable: !0,
|
|
enumerable: !0,
|
|
value: T,
|
|
writable: !0
|
|
}) : m[x] = T;
|
|
}
|
|
var Px = Fx();
|
|
function Rs(m) {
|
|
return m == null ? m === void 0 ? P : p : ar && ar in Object(m) ? jx(m) : Kx(m);
|
|
}
|
|
function Cp(m) {
|
|
return Xo(m) && Rs(m) == a;
|
|
}
|
|
function Ex(m) {
|
|
if (!ur(m) || Ux(m))
|
|
return !1;
|
|
var x = Ru(m) ? Zb : J;
|
|
return x.test(Qx(m));
|
|
}
|
|
function _x(m) {
|
|
return Xo(m) && $p(m.length) && !!ee[Rs(m)];
|
|
}
|
|
function $x(m) {
|
|
if (!ur(m))
|
|
return Hx(m);
|
|
var x = Ep(m), T = [];
|
|
for (var L in m)
|
|
L == "constructor" && (x || !zn.call(m, L)) || T.push(L);
|
|
return T;
|
|
}
|
|
function Tp(m, x, T, L, H) {
|
|
m !== x && Px(x, function(re, fe) {
|
|
if (H || (H = new Or()), ur(re))
|
|
Ax(m, x, fe, T, Tp, L, H);
|
|
else {
|
|
var G = L ? L(Eu(m, fe), re, fe + "", m, x, H) : void 0;
|
|
G === void 0 && (G = re), Cu(m, fe, G);
|
|
}
|
|
}, Rp);
|
|
}
|
|
function Ax(m, x, T, L, H, re, fe) {
|
|
var G = Eu(m, T), he = Eu(x, T), Mt = fe.get(he);
|
|
if (Mt) {
|
|
Cu(m, T, Mt);
|
|
return;
|
|
}
|
|
var ft = re ? re(G, he, T + "", m, x, fe) : void 0, Yo = ft === void 0;
|
|
if (Yo) {
|
|
var zu = $u(he), Mu = !zu && _p(he), Mp = !zu && !Mu && Ap(he);
|
|
ft = he, zu || Mu || Mp ? $u(G) ? ft = G : qx(G) ? ft = Lx(G) : Mu ? (Yo = !1, ft = Mx(he)) : Mp ? (Yo = !1, ft = Ix(he)) : ft = [] : Zx(he) || _u(he) ? (ft = G, _u(G) ? ft = Jx(G) : (!ur(G) || Ru(G)) && (ft = Ox(he))) : Yo = !1;
|
|
}
|
|
Yo && (fe.set(he, ft), H(ft, he, L, re, fe), fe.delete(he)), Cu(m, T, ft);
|
|
}
|
|
function Rx(m, x) {
|
|
return Xx(Gx(m, x, zp), m + "");
|
|
}
|
|
var zx = $s ? function(m, x) {
|
|
return $s(m, "toString", {
|
|
configurable: !0,
|
|
enumerable: !1,
|
|
value: tw(x),
|
|
writable: !0
|
|
});
|
|
} : zp;
|
|
function Mx(m, x) {
|
|
return m.slice();
|
|
}
|
|
function Dx(m) {
|
|
var x = new m.constructor(m.byteLength);
|
|
return new Sp(x).set(new Sp(m)), x;
|
|
}
|
|
function Ix(m, x) {
|
|
var T = Dx(m.buffer);
|
|
return new m.constructor(T, m.byteOffset, m.length);
|
|
}
|
|
function Lx(m, x) {
|
|
var T = -1, L = m.length;
|
|
for (x || (x = Array(L)); ++T < L; )
|
|
x[T] = m[T];
|
|
return x;
|
|
}
|
|
function Vx(m, x, T, L) {
|
|
var H = !T;
|
|
T || (T = {});
|
|
for (var re = -1, fe = x.length; ++re < fe; ) {
|
|
var G = x[re], he = void 0;
|
|
he === void 0 && (he = m[G]), H ? Tu(T, G, he) : Tx(T, G, he);
|
|
}
|
|
return T;
|
|
}
|
|
function Bx(m) {
|
|
return Rx(function(x, T) {
|
|
var L = -1, H = T.length, re = H > 1 ? T[H - 1] : void 0, fe = H > 2 ? T[2] : void 0;
|
|
for (re = m.length > 3 && typeof re == "function" ? (H--, re) : void 0, fe && Nx(T[0], T[1], fe) && (re = H < 3 ? void 0 : re, H = 1), x = Object(x); ++L < H; ) {
|
|
var G = T[L];
|
|
G && m(x, G, L, re);
|
|
}
|
|
return x;
|
|
});
|
|
}
|
|
function Fx(m) {
|
|
return function(x, T, L) {
|
|
for (var H = -1, re = Object(x), fe = L(x), G = fe.length; G--; ) {
|
|
var he = fe[++H];
|
|
if (T(re[he], he, re) === !1)
|
|
break;
|
|
}
|
|
return x;
|
|
};
|
|
}
|
|
function zs(m, x) {
|
|
var T = m.__data__;
|
|
return Wx(x) ? T[typeof x == "string" ? "string" : "hash"] : T.map;
|
|
}
|
|
function Pu(m, x) {
|
|
var T = Gb(m, x);
|
|
return Ex(T) ? T : void 0;
|
|
}
|
|
function jx(m) {
|
|
var x = zn.call(m, ar), T = m[ar];
|
|
try {
|
|
m[ar] = void 0;
|
|
var L = !0;
|
|
} catch {
|
|
}
|
|
var H = yp.call(m);
|
|
return L && (x ? m[ar] = T : delete m[ar]), H;
|
|
}
|
|
function Ox(m) {
|
|
return typeof m.constructor == "function" && !Ep(m) ? rx(bp(m)) : {};
|
|
}
|
|
function Pp(m, x) {
|
|
var T = typeof m;
|
|
return x = x ?? s, !!x && (T == "number" || T != "symbol" && Se.test(m)) && m > -1 && m % 1 == 0 && m < x;
|
|
}
|
|
function Nx(m, x, T) {
|
|
if (!ur(T))
|
|
return !1;
|
|
var L = typeof x;
|
|
return (L == "number" ? Au(T) && Pp(x, T.length) : L == "string" && x in T) ? Ms(T[x], m) : !1;
|
|
}
|
|
function Wx(m) {
|
|
var x = typeof m;
|
|
return x == "string" || x == "number" || x == "symbol" || x == "boolean" ? m !== "__proto__" : m === null;
|
|
}
|
|
function Ux(m) {
|
|
return !!gp && gp in m;
|
|
}
|
|
function Ep(m) {
|
|
var x = m && m.constructor, T = typeof x == "function" && x.prototype || Ps;
|
|
return m === T;
|
|
}
|
|
function Hx(m) {
|
|
var x = [];
|
|
if (m != null)
|
|
for (var T in Object(m))
|
|
x.push(T);
|
|
return x;
|
|
}
|
|
function Kx(m) {
|
|
return yp.call(m);
|
|
}
|
|
function Gx(m, x, T) {
|
|
return x = wp(x === void 0 ? m.length - 1 : x, 0), function() {
|
|
for (var L = arguments, H = -1, re = wp(L.length - x, 0), fe = Array(re); ++H < re; )
|
|
fe[H] = L[x + H];
|
|
H = -1;
|
|
for (var G = Array(x + 1); ++H < x; )
|
|
G[H] = L[H];
|
|
return G[x] = T(fe), Ub(m, this, G);
|
|
};
|
|
}
|
|
function Eu(m, x) {
|
|
if (!(x === "constructor" && typeof m[x] == "function") && x != "__proto__")
|
|
return m[x];
|
|
}
|
|
var Xx = Yx(zx);
|
|
function Yx(m) {
|
|
var x = 0, T = 0;
|
|
return function() {
|
|
var L = nx(), H = i - (L - T);
|
|
if (T = L, H > 0) {
|
|
if (++x >= o)
|
|
return arguments[0];
|
|
} else
|
|
x = 0;
|
|
return m.apply(void 0, arguments);
|
|
};
|
|
}
|
|
function Qx(m) {
|
|
if (m != null) {
|
|
try {
|
|
return Es.call(m);
|
|
} catch {
|
|
}
|
|
try {
|
|
return m + "";
|
|
} catch {
|
|
}
|
|
}
|
|
return "";
|
|
}
|
|
function Ms(m, x) {
|
|
return m === x || m !== m && x !== x;
|
|
}
|
|
var _u = Cp(/* @__PURE__ */ function() {
|
|
return arguments;
|
|
}()) ? Cp : function(m) {
|
|
return Xo(m) && zn.call(m, "callee") && !Jb.call(m, "callee");
|
|
}, $u = Array.isArray;
|
|
function Au(m) {
|
|
return m != null && $p(m.length) && !Ru(m);
|
|
}
|
|
function qx(m) {
|
|
return Xo(m) && Au(m);
|
|
}
|
|
var _p = tx || nw;
|
|
function Ru(m) {
|
|
if (!ur(m))
|
|
return !1;
|
|
var x = Rs(m);
|
|
return x == y || x == v || x == u || x == g;
|
|
}
|
|
function $p(m) {
|
|
return typeof m == "number" && m > -1 && m % 1 == 0 && m <= s;
|
|
}
|
|
function ur(m) {
|
|
var x = typeof m;
|
|
return m != null && (x == "object" || x == "function");
|
|
}
|
|
function Xo(m) {
|
|
return m != null && typeof m == "object";
|
|
}
|
|
function Zx(m) {
|
|
if (!Xo(m) || Rs(m) != h)
|
|
return !1;
|
|
var x = bp(m);
|
|
if (x === null)
|
|
return !0;
|
|
var T = zn.call(x, "constructor") && x.constructor;
|
|
return typeof T == "function" && T instanceof T && Es.call(T) == qb;
|
|
}
|
|
var Ap = mp ? Kb(mp) : _x;
|
|
function Jx(m) {
|
|
return Vx(m, Rp(m));
|
|
}
|
|
function Rp(m) {
|
|
return Au(m) ? Cx(m) : $x(m);
|
|
}
|
|
var ew = Bx(function(m, x, T, L) {
|
|
Tp(m, x, T, L);
|
|
});
|
|
function tw(m) {
|
|
return function() {
|
|
return m;
|
|
};
|
|
}
|
|
function zp(m) {
|
|
return m;
|
|
}
|
|
function nw() {
|
|
return !1;
|
|
}
|
|
e.exports = ew;
|
|
})(gl, gl.exports);
|
|
var KC = gl.exports;
|
|
const sn = /* @__PURE__ */ bf(KC);
|
|
function GC(e, t = []) {
|
|
const n = C.useRef(e);
|
|
return C.useEffect(() => {
|
|
n.current = e;
|
|
}), C.useCallback((...r) => n.current?.(...r), t);
|
|
}
|
|
const Dd = globalThis?.document ? C.useLayoutEffect : C.useEffect, Gm = (e, t) => {
|
|
const n = C.useRef(!1), r = C.useRef(!1);
|
|
C.useEffect(() => {
|
|
if (n.current && r.current)
|
|
return e();
|
|
r.current = !0;
|
|
}, t), C.useEffect(() => (n.current = !0, () => {
|
|
n.current = !1;
|
|
}), []);
|
|
};
|
|
function XC(e, t) {
|
|
const n = GC(e);
|
|
C.useEffect(() => {
|
|
if (t == null)
|
|
return;
|
|
let r = null;
|
|
return r = window.setTimeout(() => {
|
|
n();
|
|
}, t), () => {
|
|
r && window.clearTimeout(r);
|
|
};
|
|
}, [t, n]);
|
|
}
|
|
const Pe = {
|
|
open: (e, t) => `${e}[data-open], ${e}[open], ${e}[data-state=open] ${t}`,
|
|
closed: (e, t) => `${e}[data-closed], ${e}[data-state=closed] ${t}`,
|
|
hover: (e, t) => `${e}:hover ${t}, ${e}[data-hover] ${t}`,
|
|
focus: (e, t) => `${e}:focus ${t}, ${e}[data-focus] ${t}`,
|
|
focusVisible: (e, t) => `${e}:focus-visible ${t}`,
|
|
focusWithin: (e, t) => `${e}:focus-within ${t}`,
|
|
active: (e, t) => `${e}:active ${t}, ${e}[data-active] ${t}`,
|
|
disabled: (e, t) => `${e}:disabled ${t}, ${e}[data-disabled] ${t}`,
|
|
invalid: (e, t) => `${e}:invalid ${t}, ${e}[data-invalid] ${t}`,
|
|
checked: (e, t) => `${e}:checked ${t}, ${e}[data-checked] ${t}`,
|
|
placeholderShown: (e, t) => `${e}:placeholder-shown ${t}`
|
|
}, Yt = (e) => s1((t) => e(t, "&"), "[role=group]", "[data-group]", ".group"), pn = (e) => s1((t) => e(t, "~ &"), "[data-peer]", ".peer"), s1 = (e, ...t) => t.map(e).join(", "), Ql = {
|
|
/**
|
|
* Styles for CSS selector `&:hover`
|
|
*/
|
|
_hover: "&:hover, &[data-hover]",
|
|
/**
|
|
* Styles for CSS Selector `&:active`
|
|
*/
|
|
_active: "&:active, &[data-active]",
|
|
/**
|
|
* Styles for CSS selector `&:focus`
|
|
*
|
|
*/
|
|
_focus: "&:focus, &[data-focus]",
|
|
/**
|
|
* Styles for the highlighted state.
|
|
*/
|
|
_highlighted: "&[data-highlighted]",
|
|
/**
|
|
* Styles to apply when a child of this element has received focus
|
|
* - CSS Selector `&:focus-within`
|
|
*/
|
|
_focusWithin: "&:focus-within, &[data-focus-within]",
|
|
/**
|
|
* Styles to apply when this element has received focus via tabbing
|
|
* - CSS Selector `&:focus-visible`
|
|
*/
|
|
_focusVisible: "&:focus-visible, &[data-focus-visible]",
|
|
/**
|
|
* Styles to apply when this element is disabled. The passed styles are applied to these CSS selectors:
|
|
* - `&[aria-disabled=true]`
|
|
* - `&:disabled`
|
|
* - `&[data-disabled]`
|
|
* - `&[disabled]`
|
|
*/
|
|
_disabled: "&:disabled, &[disabled], &[aria-disabled=true], &[data-disabled]",
|
|
/**
|
|
* Styles for CSS Selector `&:readonly`
|
|
*/
|
|
_readOnly: "&[aria-readonly=true], &[readonly], &[data-readonly]",
|
|
/**
|
|
* Styles for CSS selector `&::before`
|
|
*
|
|
* NOTE:When using this, ensure the `content` is wrapped in a backtick.
|
|
* @example
|
|
* ```jsx
|
|
* <Box _before={{content:`""` }}/>
|
|
* ```
|
|
*/
|
|
_before: "&::before",
|
|
/**
|
|
* Styles for CSS selector `&::after`
|
|
*
|
|
* NOTE:When using this, ensure the `content` is wrapped in a backtick.
|
|
* @example
|
|
* ```jsx
|
|
* <Box _after={{content:`""` }}/>
|
|
* ```
|
|
*/
|
|
_after: "&::after",
|
|
/**
|
|
* Styles for CSS selector `&:empty`
|
|
*/
|
|
_empty: "&:empty, &[data-empty]",
|
|
/**
|
|
* Styles to apply when the ARIA attribute `aria-expanded` is `true`
|
|
* - CSS selector `&[aria-expanded=true]`
|
|
*/
|
|
_expanded: "&[aria-expanded=true], &[data-expanded], &[data-state=expanded]",
|
|
/**
|
|
* Styles to apply when the ARIA attribute `aria-checked` is `true`
|
|
* - CSS selector `&[aria-checked=true]`
|
|
*/
|
|
_checked: "&[aria-checked=true], &[data-checked], &[data-state=checked]",
|
|
/**
|
|
* Styles to apply when the ARIA attribute `aria-grabbed` is `true`
|
|
* - CSS selector `&[aria-grabbed=true]`
|
|
*/
|
|
_grabbed: "&[aria-grabbed=true], &[data-grabbed]",
|
|
/**
|
|
* Styles for CSS Selector `&[aria-pressed=true]`
|
|
* Typically used to style the current "pressed" state of toggle buttons
|
|
*/
|
|
_pressed: "&[aria-pressed=true], &[data-pressed]",
|
|
/**
|
|
* Styles to apply when the ARIA attribute `aria-invalid` is `true`
|
|
* - CSS selector `&[aria-invalid=true]`
|
|
*/
|
|
_invalid: "&[aria-invalid=true], &[data-invalid]",
|
|
/**
|
|
* Styles for the valid state
|
|
* - CSS selector `&[data-valid], &[data-state=valid]`
|
|
*/
|
|
_valid: "&[data-valid], &[data-state=valid]",
|
|
/**
|
|
* Styles for CSS Selector `&[aria-busy=true]` or `&[data-loading=true]`.
|
|
* Useful for styling loading states
|
|
*/
|
|
_loading: "&[data-loading], &[aria-busy=true]",
|
|
/**
|
|
* Styles to apply when the ARIA attribute `aria-selected` is `true`
|
|
*
|
|
* - CSS selector `&[aria-selected=true]`
|
|
*/
|
|
_selected: "&[aria-selected=true], &[data-selected]",
|
|
/**
|
|
* Styles for CSS Selector `[hidden=true]`
|
|
*/
|
|
_hidden: "&[hidden], &[data-hidden]",
|
|
/**
|
|
* Styles for CSS Selector `&:-webkit-autofill`
|
|
*/
|
|
_autofill: "&:-webkit-autofill",
|
|
/**
|
|
* Styles for CSS Selector `&:nth-child(even)`
|
|
*/
|
|
_even: "&:nth-of-type(even)",
|
|
/**
|
|
* Styles for CSS Selector `&:nth-child(odd)`
|
|
*/
|
|
_odd: "&:nth-of-type(odd)",
|
|
/**
|
|
* Styles for CSS Selector `&:first-of-type`
|
|
*/
|
|
_first: "&:first-of-type",
|
|
/**
|
|
* Styles for CSS selector `&::first-letter`
|
|
*
|
|
* NOTE: This selector is only applied for block-level elements and not preceded by an image or table.
|
|
* @example
|
|
* ```jsx
|
|
* <Text _firstLetter={{ textDecoration: 'underline' }}>Once upon a time</Text>
|
|
* ```
|
|
*/
|
|
_firstLetter: "&::first-letter",
|
|
/**
|
|
* Styles for CSS Selector `&:last-of-type`
|
|
*/
|
|
_last: "&:last-of-type",
|
|
/**
|
|
* Styles for CSS Selector `&:not(:first-of-type)`
|
|
*/
|
|
_notFirst: "&:not(:first-of-type)",
|
|
/**
|
|
* Styles for CSS Selector `&:not(:last-of-type)`
|
|
*/
|
|
_notLast: "&:not(:last-of-type)",
|
|
/**
|
|
* Styles for CSS Selector `&:visited`
|
|
*/
|
|
_visited: "&:visited",
|
|
/**
|
|
* Used to style the active link in a navigation
|
|
* Styles for CSS Selector `&[aria-current=page]`
|
|
*/
|
|
_activeLink: "&[aria-current=page]",
|
|
/**
|
|
* Used to style the current step within a process
|
|
* Styles for CSS Selector `&[aria-current=step]`
|
|
*/
|
|
_activeStep: "&[aria-current=step]",
|
|
/**
|
|
* Styles to apply when the ARIA attribute `aria-checked` is `mixed`
|
|
* - CSS selector `&[aria-checked=mixed]`
|
|
*/
|
|
_indeterminate: "&:indeterminate, &[aria-checked=mixed], &[data-indeterminate], &[data-state=indeterminate]",
|
|
/**
|
|
* Styles to apply when a parent element with `.group`, `data-group` or `role=group` is open
|
|
*/
|
|
_groupOpen: Yt(Pe.open),
|
|
/**
|
|
* Styles to apply when a parent element with `.group`, `data-group` or `role=group` is closed
|
|
*/
|
|
_groupClosed: Yt(Pe.closed),
|
|
/**
|
|
* Styles to apply when a parent element with `.group`, `data-group` or `role=group` is hovered
|
|
*/
|
|
_groupHover: Yt(Pe.hover),
|
|
/**
|
|
* Styles to apply when a sibling element with `.peer` or `data-peer` is hovered
|
|
*/
|
|
_peerHover: pn(Pe.hover),
|
|
/**
|
|
* Styles to apply when a parent element with `.group`, `data-group` or `role=group` is focused
|
|
*/
|
|
_groupFocus: Yt(Pe.focus),
|
|
/**
|
|
* Styles to apply when a sibling element with `.peer` or `data-peer` is focused
|
|
*/
|
|
_peerFocus: pn(Pe.focus),
|
|
/**
|
|
* Styles to apply when a parent element with `.group`, `data-group` or `role=group` has visible focus
|
|
*/
|
|
_groupFocusVisible: Yt(Pe.focusVisible),
|
|
/**
|
|
* Styles to apply when a sibling element with `.peer`or `data-peer` has visible focus
|
|
*/
|
|
_peerFocusVisible: pn(Pe.focusVisible),
|
|
/**
|
|
* Styles to apply when a parent element with `.group`, `data-group` or `role=group` is active
|
|
*/
|
|
_groupActive: Yt(Pe.active),
|
|
/**
|
|
* Styles to apply when a sibling element with `.peer` or `data-peer` is active
|
|
*/
|
|
_peerActive: pn(Pe.active),
|
|
/**
|
|
* Styles to apply when a parent element with `.group`, `data-group` or `role=group` is disabled
|
|
*/
|
|
_groupDisabled: Yt(Pe.disabled),
|
|
/**
|
|
* Styles to apply when a sibling element with `.peer` or `data-peer` is disabled
|
|
*/
|
|
_peerDisabled: pn(Pe.disabled),
|
|
/**
|
|
* Styles to apply when a parent element with `.group`, `data-group` or `role=group` is invalid
|
|
*/
|
|
_groupInvalid: Yt(Pe.invalid),
|
|
/**
|
|
* Styles to apply when a sibling element with `.peer` or `data-peer` is invalid
|
|
*/
|
|
_peerInvalid: pn(Pe.invalid),
|
|
/**
|
|
* Styles to apply when a parent element with `.group`, `data-group` or `role=group` is checked
|
|
*/
|
|
_groupChecked: Yt(Pe.checked),
|
|
/**
|
|
* Styles to apply when a sibling element with `.peer` or `data-peer` is checked
|
|
*/
|
|
_peerChecked: pn(Pe.checked),
|
|
/**
|
|
* Styles to apply when a parent element with `.group`, `data-group` or `role=group` has focus within
|
|
*/
|
|
_groupFocusWithin: Yt(Pe.focusWithin),
|
|
/**
|
|
* Styles to apply when a sibling element with `.peer` or `data-peer` has focus within
|
|
*/
|
|
_peerFocusWithin: pn(Pe.focusWithin),
|
|
/**
|
|
* Styles to apply when a sibling element with `.peer` or `data-peer` has placeholder shown
|
|
*/
|
|
_peerPlaceholderShown: pn(Pe.placeholderShown),
|
|
/**
|
|
* Styles for CSS Selector `&::placeholder`.
|
|
*/
|
|
_placeholder: "&::placeholder, &[data-placeholder]",
|
|
/**
|
|
* Styles for CSS Selector `&:placeholder-shown`.
|
|
*/
|
|
_placeholderShown: "&:placeholder-shown, &[data-placeholder-shown]",
|
|
/**
|
|
* Styles for CSS Selector `&:fullscreen`.
|
|
*/
|
|
_fullScreen: "&:fullscreen, &[data-fullscreen]",
|
|
/**
|
|
* Styles for CSS Selector `&::selection`
|
|
*/
|
|
_selection: "&::selection",
|
|
/**
|
|
* Styles for CSS Selector `[dir=rtl] &`
|
|
* It is applied when a parent element or this element has `dir="rtl"`
|
|
*/
|
|
_rtl: "[dir=rtl] &, &[dir=rtl]",
|
|
/**
|
|
* Styles for CSS Selector `[dir=ltr] &`
|
|
* It is applied when a parent element or this element has `dir="ltr"`
|
|
*/
|
|
_ltr: "[dir=ltr] &, &[dir=ltr]",
|
|
/**
|
|
* Styles for CSS Selector `@media (prefers-color-scheme: dark)`
|
|
* It is used when the user has requested the system use a light or dark color theme.
|
|
*/
|
|
_mediaDark: "@media (prefers-color-scheme: dark)",
|
|
/**
|
|
* Styles for CSS Selector `@media (prefers-reduced-motion: reduce)`
|
|
* It is used when the user has requested the system to reduce the amount of animations.
|
|
*/
|
|
_mediaReduceMotion: "@media (prefers-reduced-motion: reduce)",
|
|
/**
|
|
* Styles for when `data-theme` is applied to any parent of
|
|
* this component or element.
|
|
*/
|
|
_dark: ".chakra-ui-dark &:not([data-theme]),[data-theme=dark] &:not([data-theme]),&[data-theme=dark]",
|
|
/**
|
|
* Styles for when `data-theme` is applied to any parent of
|
|
* this component or element.
|
|
*/
|
|
_light: ".chakra-ui-light &:not([data-theme]),[data-theme=light] &:not([data-theme]),&[data-theme=light]",
|
|
/**
|
|
* Styles for the CSS Selector `&[data-orientation=horizontal]`
|
|
*/
|
|
_horizontal: "&[data-orientation=horizontal]",
|
|
/**
|
|
* Styles for the CSS Selector `&[data-orientation=vertical]`
|
|
*/
|
|
_vertical: "&[data-orientation=vertical]",
|
|
/**
|
|
* Styles for the CSS Selector `&[data-open], &[open], &[data-state=open]`
|
|
*/
|
|
_open: "&[data-open], &[open], &[data-state=open]",
|
|
/**
|
|
* Styles for the CSS Selector `&[data-closed], &[data-state=closed]`
|
|
*/
|
|
_closed: "&[data-closed], &[data-state=closed]",
|
|
/**
|
|
* Styles for the CSS Selector `&[data-complete]`
|
|
*/
|
|
_complete: "&[data-complete]",
|
|
/**
|
|
* Styles for the CSS Selector `&[data-incomplete]`
|
|
*/
|
|
_incomplete: "&[data-incomplete]",
|
|
/**
|
|
* Styles for the CSS Selector `&[data-current]`
|
|
*/
|
|
_current: "&[data-current]"
|
|
}, a1 = Object.keys(
|
|
Ql
|
|
), YC = (e) => /!(important)?$/.test(e), Xm = (e) => typeof e == "string" ? e.replace(/!(important)?$/, "").trim() : e, QC = (e, t) => (n) => {
|
|
const r = String(t), o = YC(r), i = Xm(r), s = e ? `${e}.${i}` : i;
|
|
let a = Ut(n.__cssMap) && s in n.__cssMap ? n.__cssMap[s].varRef : t;
|
|
return a = Xm(a), o ? `${a} !important` : a;
|
|
};
|
|
function yh(e) {
|
|
const { scale: t, transform: n, compose: r } = e;
|
|
return (i, s) => {
|
|
const a = QC(t, i)(s);
|
|
let l = n?.(a, s) ?? a;
|
|
return r && (l = r(l, s)), l;
|
|
};
|
|
}
|
|
const Zs = (...e) => (t) => e.reduce((n, r) => r(n), t);
|
|
function wt(e, t) {
|
|
return (n) => {
|
|
const r = { property: n, scale: e };
|
|
return r.transform = yh({
|
|
scale: e,
|
|
transform: t
|
|
}), r;
|
|
};
|
|
}
|
|
const qC = ({ rtl: e, ltr: t }) => (n) => n.direction === "rtl" ? e : t;
|
|
function ZC(e) {
|
|
const { property: t, scale: n, transform: r } = e;
|
|
return {
|
|
scale: n,
|
|
property: qC(t),
|
|
transform: n ? yh({
|
|
scale: n,
|
|
compose: r
|
|
}) : r
|
|
};
|
|
}
|
|
const l1 = [
|
|
"rotate(var(--chakra-rotate, 0))",
|
|
"scaleX(var(--chakra-scale-x, 1))",
|
|
"scaleY(var(--chakra-scale-y, 1))",
|
|
"skewX(var(--chakra-skew-x, 0))",
|
|
"skewY(var(--chakra-skew-y, 0))"
|
|
];
|
|
function JC() {
|
|
return [
|
|
"translateX(var(--chakra-translate-x, 0))",
|
|
"translateY(var(--chakra-translate-y, 0))",
|
|
...l1
|
|
].join(" ");
|
|
}
|
|
function eT() {
|
|
return [
|
|
"translate3d(var(--chakra-translate-x, 0), var(--chakra-translate-y, 0), 0)",
|
|
...l1
|
|
].join(" ");
|
|
}
|
|
const tT = {
|
|
"--chakra-blur": "var(--chakra-empty,/*!*/ /*!*/)",
|
|
"--chakra-brightness": "var(--chakra-empty,/*!*/ /*!*/)",
|
|
"--chakra-contrast": "var(--chakra-empty,/*!*/ /*!*/)",
|
|
"--chakra-grayscale": "var(--chakra-empty,/*!*/ /*!*/)",
|
|
"--chakra-hue-rotate": "var(--chakra-empty,/*!*/ /*!*/)",
|
|
"--chakra-invert": "var(--chakra-empty,/*!*/ /*!*/)",
|
|
"--chakra-saturate": "var(--chakra-empty,/*!*/ /*!*/)",
|
|
"--chakra-sepia": "var(--chakra-empty,/*!*/ /*!*/)",
|
|
"--chakra-drop-shadow": "var(--chakra-empty,/*!*/ /*!*/)",
|
|
filter: [
|
|
"var(--chakra-blur)",
|
|
"var(--chakra-brightness)",
|
|
"var(--chakra-contrast)",
|
|
"var(--chakra-grayscale)",
|
|
"var(--chakra-hue-rotate)",
|
|
"var(--chakra-invert)",
|
|
"var(--chakra-saturate)",
|
|
"var(--chakra-sepia)",
|
|
"var(--chakra-drop-shadow)"
|
|
].join(" ")
|
|
}, nT = {
|
|
backdropFilter: [
|
|
"var(--chakra-backdrop-blur)",
|
|
"var(--chakra-backdrop-brightness)",
|
|
"var(--chakra-backdrop-contrast)",
|
|
"var(--chakra-backdrop-grayscale)",
|
|
"var(--chakra-backdrop-hue-rotate)",
|
|
"var(--chakra-backdrop-invert)",
|
|
"var(--chakra-backdrop-opacity)",
|
|
"var(--chakra-backdrop-saturate)",
|
|
"var(--chakra-backdrop-sepia)"
|
|
].join(" "),
|
|
"--chakra-backdrop-blur": "var(--chakra-empty,/*!*/ /*!*/)",
|
|
"--chakra-backdrop-brightness": "var(--chakra-empty,/*!*/ /*!*/)",
|
|
"--chakra-backdrop-contrast": "var(--chakra-empty,/*!*/ /*!*/)",
|
|
"--chakra-backdrop-grayscale": "var(--chakra-empty,/*!*/ /*!*/)",
|
|
"--chakra-backdrop-hue-rotate": "var(--chakra-empty,/*!*/ /*!*/)",
|
|
"--chakra-backdrop-invert": "var(--chakra-empty,/*!*/ /*!*/)",
|
|
"--chakra-backdrop-opacity": "var(--chakra-empty,/*!*/ /*!*/)",
|
|
"--chakra-backdrop-saturate": "var(--chakra-empty,/*!*/ /*!*/)",
|
|
"--chakra-backdrop-sepia": "var(--chakra-empty,/*!*/ /*!*/)"
|
|
};
|
|
function rT(e) {
|
|
return {
|
|
"--chakra-ring-offset-shadow": "var(--chakra-ring-inset) 0 0 0 var(--chakra-ring-offset-width) var(--chakra-ring-offset-color)",
|
|
"--chakra-ring-shadow": "var(--chakra-ring-inset) 0 0 0 calc(var(--chakra-ring-width) + var(--chakra-ring-offset-width)) var(--chakra-ring-color)",
|
|
"--chakra-ring-width": e,
|
|
boxShadow: [
|
|
"var(--chakra-ring-offset-shadow)",
|
|
"var(--chakra-ring-shadow)",
|
|
"var(--chakra-shadow, 0 0 #0000)"
|
|
].join(", ")
|
|
};
|
|
}
|
|
const oT = {
|
|
"row-reverse": {
|
|
space: "--chakra-space-x-reverse",
|
|
divide: "--chakra-divide-x-reverse"
|
|
},
|
|
"column-reverse": {
|
|
space: "--chakra-space-y-reverse",
|
|
divide: "--chakra-divide-y-reverse"
|
|
}
|
|
}, Id = {
|
|
"to-t": "to top",
|
|
"to-tr": "to top right",
|
|
"to-r": "to right",
|
|
"to-br": "to bottom right",
|
|
"to-b": "to bottom",
|
|
"to-bl": "to bottom left",
|
|
"to-l": "to left",
|
|
"to-tl": "to top left"
|
|
}, iT = new Set(Object.values(Id)), Ld = /* @__PURE__ */ new Set([
|
|
"none",
|
|
"-moz-initial",
|
|
"inherit",
|
|
"initial",
|
|
"revert",
|
|
"unset"
|
|
]), sT = (e) => e.trim();
|
|
function aT(e, t) {
|
|
if (e == null || Ld.has(e))
|
|
return e;
|
|
if (!(Vd(e) || Ld.has(e)))
|
|
return `url('${e}')`;
|
|
const o = /(^[a-z-A-Z]+)\((.*)\)/g.exec(e), i = o?.[1], s = o?.[2];
|
|
if (!i || !s)
|
|
return e;
|
|
const a = i.includes("-gradient") ? i : `${i}-gradient`, [l, ...u] = s.split(",").map(sT).filter(Boolean);
|
|
if (u?.length === 0)
|
|
return e;
|
|
const c = l in Id ? Id[l] : l;
|
|
u.unshift(c);
|
|
const d = u.map((f) => {
|
|
if (iT.has(f))
|
|
return f;
|
|
const y = f.indexOf(" "), [v, S] = y !== -1 ? [f.substr(0, y), f.substr(y + 1)] : [f], k = Vd(S) ? S : S && S.split(" "), p = `colors.${v}`, h = p in t.__cssMap ? t.__cssMap[p].varRef : v;
|
|
return k ? [
|
|
h,
|
|
...Array.isArray(k) ? k : [k]
|
|
].join(" ") : h;
|
|
});
|
|
return `${a}(${d.join(", ")})`;
|
|
}
|
|
const Vd = (e) => typeof e == "string" && e.includes("(") && e.includes(")"), lT = (e, t) => aT(e, t ?? {});
|
|
function uT(e) {
|
|
return /^var\(--.+\)$/.test(e);
|
|
}
|
|
const cT = (e) => {
|
|
const t = parseFloat(e.toString()), n = e.toString().replace(String(t), "");
|
|
return { unitless: !n, value: t, unit: n };
|
|
}, Qt = (e) => (t) => `${e}(${t})`, U = {
|
|
filter(e) {
|
|
return e !== "auto" ? e : tT;
|
|
},
|
|
backdropFilter(e) {
|
|
return e !== "auto" ? e : nT;
|
|
},
|
|
ring(e) {
|
|
return rT(U.px(e));
|
|
},
|
|
bgClip(e) {
|
|
return e === "text" ? { color: "transparent", backgroundClip: "text" } : { backgroundClip: e };
|
|
},
|
|
transform(e) {
|
|
return e === "auto" ? JC() : e === "auto-gpu" ? eT() : e;
|
|
},
|
|
vh(e) {
|
|
return e === "$100vh" ? "var(--chakra-vh)" : e;
|
|
},
|
|
px(e) {
|
|
if (e == null)
|
|
return e;
|
|
const { unitless: t } = cT(e);
|
|
return t || typeof e == "number" ? `${e}px` : e;
|
|
},
|
|
fraction(e) {
|
|
return typeof e != "number" || e > 1 ? e : `${e * 100}%`;
|
|
},
|
|
float(e, t) {
|
|
const n = { left: "right", right: "left" };
|
|
return t.direction === "rtl" ? n[e] : e;
|
|
},
|
|
degree(e) {
|
|
if (uT(e) || e == null)
|
|
return e;
|
|
const t = typeof e == "string" && !e.endsWith("deg");
|
|
return typeof e == "number" || t ? `${e}deg` : e;
|
|
},
|
|
gradient: lT,
|
|
blur: Qt("blur"),
|
|
opacity: Qt("opacity"),
|
|
brightness: Qt("brightness"),
|
|
contrast: Qt("contrast"),
|
|
dropShadow: Qt("drop-shadow"),
|
|
grayscale: Qt("grayscale"),
|
|
hueRotate: (e) => Qt("hue-rotate")(U.degree(e)),
|
|
invert: Qt("invert"),
|
|
saturate: Qt("saturate"),
|
|
sepia: Qt("sepia"),
|
|
bgImage(e) {
|
|
return e == null || Vd(e) || Ld.has(e) ? e : `url(${e})`;
|
|
},
|
|
outline(e) {
|
|
const t = String(e) === "0" || String(e) === "none";
|
|
return e !== null && t ? { outline: "2px solid transparent", outlineOffset: "2px" } : { outline: e };
|
|
},
|
|
flexDirection(e) {
|
|
const { space: t, divide: n } = oT[e] ?? {}, r = { flexDirection: e };
|
|
return t && (r[t] = 1), n && (r[n] = 1), r;
|
|
}
|
|
}, b = {
|
|
borderWidths: wt("borderWidths"),
|
|
borderStyles: wt("borderStyles"),
|
|
colors: wt("colors"),
|
|
borders: wt("borders"),
|
|
gradients: wt("gradients", U.gradient),
|
|
radii: wt("radii", U.px),
|
|
space: wt("space", Zs(U.vh, U.px)),
|
|
spaceT: wt("space", Zs(U.vh, U.px)),
|
|
degreeT(e) {
|
|
return { property: e, transform: U.degree };
|
|
},
|
|
prop(e, t, n) {
|
|
return {
|
|
property: e,
|
|
scale: t,
|
|
...t && {
|
|
transform: yh({ scale: t, transform: n })
|
|
}
|
|
};
|
|
},
|
|
propT(e, t) {
|
|
return { property: e, transform: t };
|
|
},
|
|
sizes: wt("sizes", Zs(U.vh, U.px)),
|
|
sizesT: wt("sizes", Zs(U.vh, U.fraction)),
|
|
shadows: wt("shadows"),
|
|
logical: ZC,
|
|
blur: wt("blur", U.blur)
|
|
}, Ca = {
|
|
background: b.colors("background"),
|
|
backgroundColor: b.colors("backgroundColor"),
|
|
backgroundImage: b.gradients("backgroundImage"),
|
|
backgroundSize: !0,
|
|
backgroundPosition: !0,
|
|
backgroundRepeat: !0,
|
|
backgroundAttachment: !0,
|
|
backgroundClip: { transform: U.bgClip },
|
|
bgSize: b.prop("backgroundSize"),
|
|
bgPosition: b.prop("backgroundPosition"),
|
|
bg: b.colors("background"),
|
|
bgColor: b.colors("backgroundColor"),
|
|
bgPos: b.prop("backgroundPosition"),
|
|
bgRepeat: b.prop("backgroundRepeat"),
|
|
bgAttachment: b.prop("backgroundAttachment"),
|
|
bgGradient: b.gradients("backgroundImage"),
|
|
bgClip: { transform: U.bgClip }
|
|
};
|
|
Object.assign(Ca, {
|
|
bgImage: Ca.backgroundImage,
|
|
bgImg: Ca.backgroundImage
|
|
});
|
|
const X = {
|
|
border: b.borders("border"),
|
|
borderWidth: b.borderWidths("borderWidth"),
|
|
borderStyle: b.borderStyles("borderStyle"),
|
|
borderColor: b.colors("borderColor"),
|
|
borderRadius: b.radii("borderRadius"),
|
|
borderTop: b.borders("borderTop"),
|
|
borderBlockStart: b.borders("borderBlockStart"),
|
|
borderTopLeftRadius: b.radii("borderTopLeftRadius"),
|
|
borderStartStartRadius: b.logical({
|
|
scale: "radii",
|
|
property: {
|
|
ltr: "borderTopLeftRadius",
|
|
rtl: "borderTopRightRadius"
|
|
}
|
|
}),
|
|
borderEndStartRadius: b.logical({
|
|
scale: "radii",
|
|
property: {
|
|
ltr: "borderBottomLeftRadius",
|
|
rtl: "borderBottomRightRadius"
|
|
}
|
|
}),
|
|
borderTopRightRadius: b.radii("borderTopRightRadius"),
|
|
borderStartEndRadius: b.logical({
|
|
scale: "radii",
|
|
property: {
|
|
ltr: "borderTopRightRadius",
|
|
rtl: "borderTopLeftRadius"
|
|
}
|
|
}),
|
|
borderEndEndRadius: b.logical({
|
|
scale: "radii",
|
|
property: {
|
|
ltr: "borderBottomRightRadius",
|
|
rtl: "borderBottomLeftRadius"
|
|
}
|
|
}),
|
|
borderRight: b.borders("borderRight"),
|
|
borderInlineEnd: b.borders("borderInlineEnd"),
|
|
borderBottom: b.borders("borderBottom"),
|
|
borderBlockEnd: b.borders("borderBlockEnd"),
|
|
borderBottomLeftRadius: b.radii("borderBottomLeftRadius"),
|
|
borderBottomRightRadius: b.radii("borderBottomRightRadius"),
|
|
borderLeft: b.borders("borderLeft"),
|
|
borderInlineStart: {
|
|
property: "borderInlineStart",
|
|
scale: "borders"
|
|
},
|
|
borderInlineStartRadius: b.logical({
|
|
scale: "radii",
|
|
property: {
|
|
ltr: ["borderTopLeftRadius", "borderBottomLeftRadius"],
|
|
rtl: ["borderTopRightRadius", "borderBottomRightRadius"]
|
|
}
|
|
}),
|
|
borderInlineEndRadius: b.logical({
|
|
scale: "radii",
|
|
property: {
|
|
ltr: ["borderTopRightRadius", "borderBottomRightRadius"],
|
|
rtl: ["borderTopLeftRadius", "borderBottomLeftRadius"]
|
|
}
|
|
}),
|
|
borderX: b.borders(["borderLeft", "borderRight"]),
|
|
borderInline: b.borders("borderInline"),
|
|
borderY: b.borders(["borderTop", "borderBottom"]),
|
|
borderBlock: b.borders("borderBlock"),
|
|
borderTopWidth: b.borderWidths("borderTopWidth"),
|
|
borderBlockStartWidth: b.borderWidths("borderBlockStartWidth"),
|
|
borderTopColor: b.colors("borderTopColor"),
|
|
borderBlockStartColor: b.colors("borderBlockStartColor"),
|
|
borderTopStyle: b.borderStyles("borderTopStyle"),
|
|
borderBlockStartStyle: b.borderStyles("borderBlockStartStyle"),
|
|
borderBottomWidth: b.borderWidths("borderBottomWidth"),
|
|
borderBlockEndWidth: b.borderWidths("borderBlockEndWidth"),
|
|
borderBottomColor: b.colors("borderBottomColor"),
|
|
borderBlockEndColor: b.colors("borderBlockEndColor"),
|
|
borderBottomStyle: b.borderStyles("borderBottomStyle"),
|
|
borderBlockEndStyle: b.borderStyles("borderBlockEndStyle"),
|
|
borderLeftWidth: b.borderWidths("borderLeftWidth"),
|
|
borderInlineStartWidth: b.borderWidths("borderInlineStartWidth"),
|
|
borderLeftColor: b.colors("borderLeftColor"),
|
|
borderInlineStartColor: b.colors("borderInlineStartColor"),
|
|
borderLeftStyle: b.borderStyles("borderLeftStyle"),
|
|
borderInlineStartStyle: b.borderStyles("borderInlineStartStyle"),
|
|
borderRightWidth: b.borderWidths("borderRightWidth"),
|
|
borderInlineEndWidth: b.borderWidths("borderInlineEndWidth"),
|
|
borderRightColor: b.colors("borderRightColor"),
|
|
borderInlineEndColor: b.colors("borderInlineEndColor"),
|
|
borderRightStyle: b.borderStyles("borderRightStyle"),
|
|
borderInlineEndStyle: b.borderStyles("borderInlineEndStyle"),
|
|
borderTopRadius: b.radii(["borderTopLeftRadius", "borderTopRightRadius"]),
|
|
borderBottomRadius: b.radii([
|
|
"borderBottomLeftRadius",
|
|
"borderBottomRightRadius"
|
|
]),
|
|
borderLeftRadius: b.radii(["borderTopLeftRadius", "borderBottomLeftRadius"]),
|
|
borderRightRadius: b.radii([
|
|
"borderTopRightRadius",
|
|
"borderBottomRightRadius"
|
|
])
|
|
};
|
|
Object.assign(X, {
|
|
rounded: X.borderRadius,
|
|
roundedTop: X.borderTopRadius,
|
|
roundedTopLeft: X.borderTopLeftRadius,
|
|
roundedTopRight: X.borderTopRightRadius,
|
|
roundedTopStart: X.borderStartStartRadius,
|
|
roundedTopEnd: X.borderStartEndRadius,
|
|
roundedBottom: X.borderBottomRadius,
|
|
roundedBottomLeft: X.borderBottomLeftRadius,
|
|
roundedBottomRight: X.borderBottomRightRadius,
|
|
roundedBottomStart: X.borderEndStartRadius,
|
|
roundedBottomEnd: X.borderEndEndRadius,
|
|
roundedLeft: X.borderLeftRadius,
|
|
roundedRight: X.borderRightRadius,
|
|
roundedStart: X.borderInlineStartRadius,
|
|
roundedEnd: X.borderInlineEndRadius,
|
|
borderStart: X.borderInlineStart,
|
|
borderEnd: X.borderInlineEnd,
|
|
borderTopStartRadius: X.borderStartStartRadius,
|
|
borderTopEndRadius: X.borderStartEndRadius,
|
|
borderBottomStartRadius: X.borderEndStartRadius,
|
|
borderBottomEndRadius: X.borderEndEndRadius,
|
|
borderStartRadius: X.borderInlineStartRadius,
|
|
borderEndRadius: X.borderInlineEndRadius,
|
|
borderStartWidth: X.borderInlineStartWidth,
|
|
borderEndWidth: X.borderInlineEndWidth,
|
|
borderStartColor: X.borderInlineStartColor,
|
|
borderEndColor: X.borderInlineEndColor,
|
|
borderStartStyle: X.borderInlineStartStyle,
|
|
borderEndStyle: X.borderInlineEndStyle
|
|
});
|
|
const dT = {
|
|
color: b.colors("color"),
|
|
textColor: b.colors("color"),
|
|
fill: b.colors("fill"),
|
|
stroke: b.colors("stroke"),
|
|
accentColor: b.colors("accentColor"),
|
|
textFillColor: b.colors("textFillColor")
|
|
}, yl = {
|
|
alignItems: !0,
|
|
alignContent: !0,
|
|
justifyItems: !0,
|
|
justifyContent: !0,
|
|
flexWrap: !0,
|
|
flexDirection: { transform: U.flexDirection },
|
|
flex: !0,
|
|
flexFlow: !0,
|
|
flexGrow: !0,
|
|
flexShrink: !0,
|
|
flexBasis: b.sizes("flexBasis"),
|
|
justifySelf: !0,
|
|
alignSelf: !0,
|
|
order: !0,
|
|
placeItems: !0,
|
|
placeContent: !0,
|
|
placeSelf: !0,
|
|
gap: b.space("gap"),
|
|
rowGap: b.space("rowGap"),
|
|
columnGap: b.space("columnGap")
|
|
};
|
|
Object.assign(yl, {
|
|
flexDir: yl.flexDirection
|
|
});
|
|
const kt = {
|
|
width: b.sizesT("width"),
|
|
inlineSize: b.sizesT("inlineSize"),
|
|
height: b.sizes("height"),
|
|
blockSize: b.sizes("blockSize"),
|
|
boxSize: b.sizes(["width", "height"]),
|
|
minWidth: b.sizes("minWidth"),
|
|
minInlineSize: b.sizes("minInlineSize"),
|
|
minHeight: b.sizes("minHeight"),
|
|
minBlockSize: b.sizes("minBlockSize"),
|
|
maxWidth: b.sizes("maxWidth"),
|
|
maxInlineSize: b.sizes("maxInlineSize"),
|
|
maxHeight: b.sizes("maxHeight"),
|
|
maxBlockSize: b.sizes("maxBlockSize"),
|
|
overflow: !0,
|
|
overflowX: !0,
|
|
overflowY: !0,
|
|
overscrollBehavior: !0,
|
|
overscrollBehaviorX: !0,
|
|
overscrollBehaviorY: !0,
|
|
display: !0,
|
|
aspectRatio: !0,
|
|
hideFrom: {
|
|
scale: "breakpoints",
|
|
transform: (e, t) => ({ [`@media screen and (min-width: ${t.__breakpoints?.get(e)?.minW ?? e})`]: { display: "none" } })
|
|
},
|
|
hideBelow: {
|
|
scale: "breakpoints",
|
|
transform: (e, t) => ({ [`@media screen and (max-width: ${t.__breakpoints?.get(e)?._minW ?? e})`]: { display: "none" } })
|
|
},
|
|
verticalAlign: !0,
|
|
boxSizing: !0,
|
|
boxDecorationBreak: !0,
|
|
float: b.propT("float", U.float),
|
|
objectFit: !0,
|
|
objectPosition: !0,
|
|
visibility: !0,
|
|
isolation: !0
|
|
};
|
|
Object.assign(kt, {
|
|
w: kt.width,
|
|
h: kt.height,
|
|
minW: kt.minWidth,
|
|
maxW: kt.maxWidth,
|
|
minH: kt.minHeight,
|
|
maxH: kt.maxHeight,
|
|
overscroll: kt.overscrollBehavior,
|
|
overscrollX: kt.overscrollBehaviorX,
|
|
overscrollY: kt.overscrollBehaviorY
|
|
});
|
|
const fT = {
|
|
filter: { transform: U.filter },
|
|
blur: b.blur("--chakra-blur"),
|
|
brightness: b.propT("--chakra-brightness", U.brightness),
|
|
contrast: b.propT("--chakra-contrast", U.contrast),
|
|
hueRotate: b.propT("--chakra-hue-rotate", U.hueRotate),
|
|
invert: b.propT("--chakra-invert", U.invert),
|
|
saturate: b.propT("--chakra-saturate", U.saturate),
|
|
dropShadow: b.propT("--chakra-drop-shadow", U.dropShadow),
|
|
backdropFilter: { transform: U.backdropFilter },
|
|
backdropBlur: b.blur("--chakra-backdrop-blur"),
|
|
backdropBrightness: b.propT(
|
|
"--chakra-backdrop-brightness",
|
|
U.brightness
|
|
),
|
|
backdropContrast: b.propT("--chakra-backdrop-contrast", U.contrast),
|
|
backdropHueRotate: b.propT(
|
|
"--chakra-backdrop-hue-rotate",
|
|
U.hueRotate
|
|
),
|
|
backdropInvert: b.propT("--chakra-backdrop-invert", U.invert),
|
|
backdropSaturate: b.propT("--chakra-backdrop-saturate", U.saturate)
|
|
}, hT = {
|
|
ring: { transform: U.ring },
|
|
ringColor: b.colors("--chakra-ring-color"),
|
|
ringOffset: b.prop("--chakra-ring-offset-width"),
|
|
ringOffsetColor: b.colors("--chakra-ring-offset-color"),
|
|
ringInset: b.prop("--chakra-ring-inset")
|
|
}, pT = {
|
|
appearance: !0,
|
|
cursor: !0,
|
|
resize: !0,
|
|
userSelect: !0,
|
|
pointerEvents: !0,
|
|
outline: { transform: U.outline },
|
|
outlineOffset: !0,
|
|
outlineColor: b.colors("outlineColor")
|
|
}, u1 = {
|
|
gridGap: b.space("gridGap"),
|
|
gridColumnGap: b.space("gridColumnGap"),
|
|
gridRowGap: b.space("gridRowGap"),
|
|
gridColumn: !0,
|
|
gridRow: !0,
|
|
gridAutoFlow: !0,
|
|
gridAutoColumns: !0,
|
|
gridColumnStart: !0,
|
|
gridColumnEnd: !0,
|
|
gridRowStart: !0,
|
|
gridRowEnd: !0,
|
|
gridAutoRows: !0,
|
|
gridTemplate: !0,
|
|
gridTemplateColumns: !0,
|
|
gridTemplateRows: !0,
|
|
gridTemplateAreas: !0,
|
|
gridArea: !0
|
|
};
|
|
function mT(e, t, n, r) {
|
|
const o = typeof t == "string" ? t.split(".") : [t];
|
|
for (r = 0; r < o.length && e; r += 1)
|
|
e = e[o[r]];
|
|
return e === void 0 ? n : e;
|
|
}
|
|
const gT = (e) => {
|
|
const t = /* @__PURE__ */ new WeakMap();
|
|
return (r, o, i, s) => {
|
|
if (typeof r > "u")
|
|
return e(r, o, i);
|
|
t.has(r) || t.set(r, /* @__PURE__ */ new Map());
|
|
const a = t.get(r);
|
|
if (a.has(o))
|
|
return a.get(o);
|
|
const l = e(r, o, i, s);
|
|
return a.set(o, l), l;
|
|
};
|
|
}, yT = gT(mT), vT = {
|
|
border: "0px",
|
|
clip: "rect(0, 0, 0, 0)",
|
|
width: "1px",
|
|
height: "1px",
|
|
margin: "-1px",
|
|
padding: "0px",
|
|
overflow: "hidden",
|
|
whiteSpace: "nowrap",
|
|
position: "absolute"
|
|
}, ST = {
|
|
position: "static",
|
|
width: "auto",
|
|
height: "auto",
|
|
clip: "auto",
|
|
padding: "0",
|
|
margin: "0",
|
|
overflow: "visible",
|
|
whiteSpace: "normal"
|
|
}, sc = (e, t, n) => {
|
|
const r = {}, o = yT(e, t, {});
|
|
for (const i in o)
|
|
i in n && n[i] != null || (r[i] = o[i]);
|
|
return r;
|
|
}, bT = {
|
|
srOnly: {
|
|
transform(e) {
|
|
return e === !0 ? vT : e === "focusable" ? ST : {};
|
|
}
|
|
},
|
|
layerStyle: {
|
|
processResult: !0,
|
|
transform: (e, t, n) => sc(t, `layerStyles.${e}`, n)
|
|
},
|
|
textStyle: {
|
|
processResult: !0,
|
|
transform: (e, t, n) => sc(t, `textStyles.${e}`, n)
|
|
},
|
|
apply: {
|
|
processResult: !0,
|
|
transform: (e, t, n) => sc(t, e, n)
|
|
}
|
|
}, _i = {
|
|
position: !0,
|
|
pos: b.prop("position"),
|
|
zIndex: b.prop("zIndex", "zIndices"),
|
|
inset: b.spaceT("inset"),
|
|
insetX: b.spaceT(["left", "right"]),
|
|
insetInline: b.spaceT("insetInline"),
|
|
insetY: b.spaceT(["top", "bottom"]),
|
|
insetBlock: b.spaceT("insetBlock"),
|
|
top: b.spaceT("top"),
|
|
insetBlockStart: b.spaceT("insetBlockStart"),
|
|
bottom: b.spaceT("bottom"),
|
|
insetBlockEnd: b.spaceT("insetBlockEnd"),
|
|
left: b.spaceT("left"),
|
|
insetInlineStart: b.logical({
|
|
scale: "space",
|
|
property: { ltr: "left", rtl: "right" }
|
|
}),
|
|
right: b.spaceT("right"),
|
|
insetInlineEnd: b.logical({
|
|
scale: "space",
|
|
property: { ltr: "right", rtl: "left" }
|
|
})
|
|
};
|
|
Object.assign(_i, {
|
|
insetStart: _i.insetInlineStart,
|
|
insetEnd: _i.insetInlineEnd
|
|
});
|
|
const Bd = {
|
|
boxShadow: b.shadows("boxShadow"),
|
|
mixBlendMode: !0,
|
|
blendMode: b.prop("mixBlendMode"),
|
|
backgroundBlendMode: !0,
|
|
bgBlendMode: b.prop("backgroundBlendMode"),
|
|
opacity: !0
|
|
};
|
|
Object.assign(Bd, {
|
|
shadow: Bd.boxShadow
|
|
});
|
|
const ce = {
|
|
margin: b.spaceT("margin"),
|
|
marginTop: b.spaceT("marginTop"),
|
|
marginBlockStart: b.spaceT("marginBlockStart"),
|
|
marginRight: b.spaceT("marginRight"),
|
|
marginInlineEnd: b.spaceT("marginInlineEnd"),
|
|
marginBottom: b.spaceT("marginBottom"),
|
|
marginBlockEnd: b.spaceT("marginBlockEnd"),
|
|
marginLeft: b.spaceT("marginLeft"),
|
|
marginInlineStart: b.spaceT("marginInlineStart"),
|
|
marginX: b.spaceT(["marginInlineStart", "marginInlineEnd"]),
|
|
marginInline: b.spaceT("marginInline"),
|
|
marginY: b.spaceT(["marginTop", "marginBottom"]),
|
|
marginBlock: b.spaceT("marginBlock"),
|
|
padding: b.space("padding"),
|
|
paddingTop: b.space("paddingTop"),
|
|
paddingBlockStart: b.space("paddingBlockStart"),
|
|
paddingRight: b.space("paddingRight"),
|
|
paddingBottom: b.space("paddingBottom"),
|
|
paddingBlockEnd: b.space("paddingBlockEnd"),
|
|
paddingLeft: b.space("paddingLeft"),
|
|
paddingInlineStart: b.space("paddingInlineStart"),
|
|
paddingInlineEnd: b.space("paddingInlineEnd"),
|
|
paddingX: b.space(["paddingInlineStart", "paddingInlineEnd"]),
|
|
paddingInline: b.space("paddingInline"),
|
|
paddingY: b.space(["paddingTop", "paddingBottom"]),
|
|
paddingBlock: b.space("paddingBlock")
|
|
};
|
|
Object.assign(ce, {
|
|
m: ce.margin,
|
|
mt: ce.marginTop,
|
|
mr: ce.marginRight,
|
|
me: ce.marginInlineEnd,
|
|
marginEnd: ce.marginInlineEnd,
|
|
mb: ce.marginBottom,
|
|
ml: ce.marginLeft,
|
|
ms: ce.marginInlineStart,
|
|
marginStart: ce.marginInlineStart,
|
|
mx: ce.marginX,
|
|
my: ce.marginY,
|
|
p: ce.padding,
|
|
pt: ce.paddingTop,
|
|
py: ce.paddingY,
|
|
px: ce.paddingX,
|
|
pb: ce.paddingBottom,
|
|
pl: ce.paddingLeft,
|
|
ps: ce.paddingInlineStart,
|
|
paddingStart: ce.paddingInlineStart,
|
|
pr: ce.paddingRight,
|
|
pe: ce.paddingInlineEnd,
|
|
paddingEnd: ce.paddingInlineEnd
|
|
});
|
|
const xT = {
|
|
scrollBehavior: !0,
|
|
scrollSnapAlign: !0,
|
|
scrollSnapStop: !0,
|
|
scrollSnapType: !0,
|
|
// scroll margin
|
|
scrollMargin: b.spaceT("scrollMargin"),
|
|
scrollMarginTop: b.spaceT("scrollMarginTop"),
|
|
scrollMarginBottom: b.spaceT("scrollMarginBottom"),
|
|
scrollMarginLeft: b.spaceT("scrollMarginLeft"),
|
|
scrollMarginRight: b.spaceT("scrollMarginRight"),
|
|
scrollMarginX: b.spaceT(["scrollMarginLeft", "scrollMarginRight"]),
|
|
scrollMarginY: b.spaceT(["scrollMarginTop", "scrollMarginBottom"]),
|
|
// scroll padding
|
|
scrollPadding: b.spaceT("scrollPadding"),
|
|
scrollPaddingTop: b.spaceT("scrollPaddingTop"),
|
|
scrollPaddingBottom: b.spaceT("scrollPaddingBottom"),
|
|
scrollPaddingLeft: b.spaceT("scrollPaddingLeft"),
|
|
scrollPaddingRight: b.spaceT("scrollPaddingRight"),
|
|
scrollPaddingX: b.spaceT(["scrollPaddingLeft", "scrollPaddingRight"]),
|
|
scrollPaddingY: b.spaceT(["scrollPaddingTop", "scrollPaddingBottom"])
|
|
}, wT = {
|
|
fontFamily: b.prop("fontFamily", "fonts"),
|
|
fontSize: b.prop("fontSize", "fontSizes", U.px),
|
|
fontWeight: b.prop("fontWeight", "fontWeights"),
|
|
lineHeight: b.prop("lineHeight", "lineHeights"),
|
|
letterSpacing: b.prop("letterSpacing", "letterSpacings"),
|
|
textAlign: !0,
|
|
fontStyle: !0,
|
|
textIndent: !0,
|
|
wordBreak: !0,
|
|
overflowWrap: !0,
|
|
textOverflow: !0,
|
|
textTransform: !0,
|
|
whiteSpace: !0,
|
|
isTruncated: {
|
|
transform(e) {
|
|
if (e === !0)
|
|
return {
|
|
overflow: "hidden",
|
|
textOverflow: "ellipsis",
|
|
whiteSpace: "nowrap"
|
|
};
|
|
}
|
|
},
|
|
noOfLines: {
|
|
static: {
|
|
overflow: "hidden",
|
|
textOverflow: "ellipsis",
|
|
display: "-webkit-box",
|
|
WebkitBoxOrient: "vertical",
|
|
//@ts-ignore
|
|
WebkitLineClamp: "var(--chakra-line-clamp)"
|
|
},
|
|
property: "--chakra-line-clamp"
|
|
}
|
|
}, kT = {
|
|
textDecorationColor: b.colors("textDecorationColor"),
|
|
textDecoration: !0,
|
|
textDecor: { property: "textDecoration" },
|
|
textDecorationLine: !0,
|
|
textDecorationStyle: !0,
|
|
textDecorationThickness: !0,
|
|
textUnderlineOffset: !0,
|
|
textShadow: b.shadows("textShadow")
|
|
}, CT = {
|
|
clipPath: !0,
|
|
transform: b.propT("transform", U.transform),
|
|
transformOrigin: !0,
|
|
translateX: b.spaceT("--chakra-translate-x"),
|
|
translateY: b.spaceT("--chakra-translate-y"),
|
|
skewX: b.degreeT("--chakra-skew-x"),
|
|
skewY: b.degreeT("--chakra-skew-y"),
|
|
scaleX: b.prop("--chakra-scale-x"),
|
|
scaleY: b.prop("--chakra-scale-y"),
|
|
scale: b.prop(["--chakra-scale-x", "--chakra-scale-y"]),
|
|
rotate: b.degreeT("--chakra-rotate")
|
|
}, TT = {
|
|
listStyleType: !0,
|
|
listStylePosition: !0,
|
|
listStylePos: b.prop("listStylePosition"),
|
|
listStyleImage: !0,
|
|
listStyleImg: b.prop("listStyleImage")
|
|
}, PT = {
|
|
transition: !0,
|
|
transitionDelay: !0,
|
|
animation: !0,
|
|
willChange: !0,
|
|
transitionDuration: b.prop("transitionDuration", "transition.duration"),
|
|
transitionProperty: b.prop("transitionProperty", "transition.property"),
|
|
transitionTimingFunction: b.prop(
|
|
"transitionTimingFunction",
|
|
"transition.easing"
|
|
)
|
|
}, vh = sn(
|
|
{},
|
|
Ca,
|
|
X,
|
|
dT,
|
|
yl,
|
|
kt,
|
|
fT,
|
|
hT,
|
|
pT,
|
|
u1,
|
|
bT,
|
|
_i,
|
|
Bd,
|
|
ce,
|
|
xT,
|
|
wT,
|
|
kT,
|
|
CT,
|
|
TT,
|
|
PT
|
|
);
|
|
Object.assign({}, ce, kt, yl, u1, _i);
|
|
const ET = [...Object.keys(vh), ...a1], _T = { ...vh, ...Ql }, $T = (e) => e in _T, AT = (e) => (t) => {
|
|
if (!t.__breakpoints)
|
|
return e;
|
|
const { isResponsive: n, toArrayValue: r, media: o } = t.__breakpoints, i = {};
|
|
for (const s in e) {
|
|
let a = on(e[s], t);
|
|
if (a == null)
|
|
continue;
|
|
if (a = Ut(a) && n(a) ? r(a) : a, !Array.isArray(a)) {
|
|
i[s] = a;
|
|
continue;
|
|
}
|
|
const l = a.slice(0, o.length).length;
|
|
for (let u = 0; u < l; u += 1) {
|
|
const c = o?.[u];
|
|
if (!c) {
|
|
i[s] = a[u];
|
|
continue;
|
|
}
|
|
i[c] = i[c] || {}, a[u] != null && (i[c][s] = a[u]);
|
|
}
|
|
}
|
|
return i;
|
|
};
|
|
function RT(e) {
|
|
const t = [];
|
|
let n = "", r = !1;
|
|
for (let o = 0; o < e.length; o++) {
|
|
const i = e[o];
|
|
i === "(" ? (r = !0, n += i) : i === ")" ? (r = !1, n += i) : i === "," && !r ? (t.push(n), n = "") : n += i;
|
|
}
|
|
return n = n.trim(), n && t.push(n), t;
|
|
}
|
|
function zT(e) {
|
|
return /^var\(--.+\)$/.test(e);
|
|
}
|
|
const MT = (e, t) => e.startsWith("--") && typeof t == "string" && !zT(t), DT = (e, t) => {
|
|
if (t == null)
|
|
return t;
|
|
const n = (s) => e.__cssMap?.[s]?.varRef, r = (s) => n(s) ?? s, [o, i] = RT(t);
|
|
return t = n(o) ?? r(i) ?? r(t), t;
|
|
};
|
|
function IT(e) {
|
|
const { configs: t = {}, pseudos: n = {}, theme: r } = e, o = (i, s = !1) => {
|
|
const a = on(i, r), l = AT(a)(r);
|
|
let u = {};
|
|
for (let c in l) {
|
|
const d = l[c];
|
|
let f = on(d, r);
|
|
c in n && (c = n[c]), MT(c, f) && (f = DT(r, f));
|
|
let y = t[c];
|
|
if (y === !0 && (y = { property: c }), Ut(f)) {
|
|
u[c] = u[c] ?? {}, u[c] = sn(
|
|
{},
|
|
u[c],
|
|
o(f, !0)
|
|
);
|
|
continue;
|
|
}
|
|
let v = y?.transform?.(f, r, a) ?? f;
|
|
v = y?.processResult ? o(v, !0) : v;
|
|
const S = on(y?.property, r);
|
|
if (!s && y?.static) {
|
|
const k = on(y.static, r);
|
|
u = sn({}, u, k);
|
|
}
|
|
if (S && Array.isArray(S)) {
|
|
for (const k of S)
|
|
u[k] = v;
|
|
continue;
|
|
}
|
|
if (S) {
|
|
S === "&" && Ut(v) ? u = sn({}, u, v) : u[S] = v;
|
|
continue;
|
|
}
|
|
if (Ut(v)) {
|
|
u = sn({}, u, v);
|
|
continue;
|
|
}
|
|
u[c] = v;
|
|
}
|
|
return u;
|
|
};
|
|
return o;
|
|
}
|
|
const c1 = (e) => (t) => IT({
|
|
theme: t,
|
|
pseudos: Ql,
|
|
configs: vh
|
|
})(e);
|
|
function ae(e) {
|
|
return {
|
|
definePartsStyle(t) {
|
|
return t;
|
|
},
|
|
defineMultiStyleConfig(t) {
|
|
return { parts: e, ...t };
|
|
}
|
|
};
|
|
}
|
|
function LT(e, t) {
|
|
if (Array.isArray(e))
|
|
return e;
|
|
if (Ut(e))
|
|
return t(e);
|
|
if (e != null)
|
|
return [e];
|
|
}
|
|
function VT(e, t) {
|
|
for (let n = t + 1; n < e.length; n++)
|
|
if (e[n] != null)
|
|
return n;
|
|
return -1;
|
|
}
|
|
function BT(e) {
|
|
const t = e.__breakpoints;
|
|
return function(r, o, i, s) {
|
|
if (!t)
|
|
return;
|
|
const a = {}, l = LT(i, t.toArrayValue);
|
|
if (!l)
|
|
return a;
|
|
const u = l.length, c = u === 1, d = !!r.parts;
|
|
for (let f = 0; f < u; f++) {
|
|
const y = t.details[f], v = t.details[VT(l, f)], S = hi(y.minW, v?._minW), k = on(r[o]?.[l[f]], s);
|
|
if (k) {
|
|
if (d) {
|
|
r.parts?.forEach((p) => {
|
|
sn(a, {
|
|
[p]: c ? k[p] : { [S]: k[p] }
|
|
});
|
|
});
|
|
continue;
|
|
}
|
|
if (!d) {
|
|
c ? sn(a, k) : a[S] = k;
|
|
continue;
|
|
}
|
|
a[S] = k;
|
|
}
|
|
}
|
|
return a;
|
|
};
|
|
}
|
|
function FT(e) {
|
|
return (t) => {
|
|
const { variant: n, size: r, theme: o } = t, i = BT(o);
|
|
return sn(
|
|
{},
|
|
on(e.baseStyle ?? {}, t),
|
|
i(e, "sizes", r, t),
|
|
i(e, "variants", n, t)
|
|
);
|
|
};
|
|
}
|
|
function ql(e) {
|
|
return NC(e, ["styleConfig", "size", "variant", "colorScheme"]);
|
|
}
|
|
function d1(e) {
|
|
return Ut(e) && e.reference ? e.reference : String(e);
|
|
}
|
|
const Zl = (e, ...t) => t.map(d1).join(` ${e} `).replace(/calc/g, ""), Ym = (...e) => `calc(${Zl("+", ...e)})`, Qm = (...e) => `calc(${Zl("-", ...e)})`, Fd = (...e) => `calc(${Zl("*", ...e)})`, qm = (...e) => `calc(${Zl("/", ...e)})`, Zm = (e) => {
|
|
const t = d1(e);
|
|
return t != null && !Number.isNaN(parseFloat(t)) ? String(t).startsWith("-") ? String(t).slice(1) : `-${t}` : Fd(t, -1);
|
|
}, vn = Object.assign(
|
|
(e) => ({
|
|
add: (...t) => vn(Ym(e, ...t)),
|
|
subtract: (...t) => vn(Qm(e, ...t)),
|
|
multiply: (...t) => vn(Fd(e, ...t)),
|
|
divide: (...t) => vn(qm(e, ...t)),
|
|
negate: () => vn(Zm(e)),
|
|
toString: () => e.toString()
|
|
}),
|
|
{
|
|
add: Ym,
|
|
subtract: Qm,
|
|
multiply: Fd,
|
|
divide: qm,
|
|
negate: Zm
|
|
}
|
|
);
|
|
function jT(e, t = "-") {
|
|
return e.replace(/\s+/g, t);
|
|
}
|
|
function OT(e) {
|
|
const t = jT(e.toString());
|
|
return WT(NT(t));
|
|
}
|
|
function NT(e) {
|
|
return e.includes("\\.") ? e : !Number.isInteger(parseFloat(e.toString())) ? e.replace(".", "\\.") : e;
|
|
}
|
|
function WT(e) {
|
|
return e.replace(/[!-,/:-@[-^`{-~]/g, "\\$&");
|
|
}
|
|
function UT(e, t = "") {
|
|
return [t, e].filter(Boolean).join("-");
|
|
}
|
|
function HT(e, t) {
|
|
return `var(${e}${t ? `, ${t}` : ""})`;
|
|
}
|
|
function KT(e, t = "") {
|
|
return OT(`--${UT(e, t)}`);
|
|
}
|
|
function j(e, t, n) {
|
|
const r = KT(e, n);
|
|
return {
|
|
variable: r,
|
|
reference: HT(r, t)
|
|
};
|
|
}
|
|
function GT(e, t) {
|
|
const n = {};
|
|
for (const r of t) {
|
|
if (Array.isArray(r)) {
|
|
const [o, i] = r;
|
|
n[o] = j(`${e}-${o}`, i);
|
|
continue;
|
|
}
|
|
n[r] = j(`${e}-${r}`);
|
|
}
|
|
return n;
|
|
}
|
|
const XT = [
|
|
"colors",
|
|
"borders",
|
|
"borderWidths",
|
|
"borderStyles",
|
|
"fonts",
|
|
"fontSizes",
|
|
"fontWeights",
|
|
"gradients",
|
|
"letterSpacings",
|
|
"lineHeights",
|
|
"radii",
|
|
"space",
|
|
"shadows",
|
|
"sizes",
|
|
"zIndices",
|
|
"transition",
|
|
"blur",
|
|
"breakpoints"
|
|
];
|
|
function YT(e) {
|
|
return WC(e, XT);
|
|
}
|
|
function QT(e) {
|
|
return e.semanticTokens;
|
|
}
|
|
function qT(e) {
|
|
const { __cssMap: t, __cssVars: n, __breakpoints: r, ...o } = e;
|
|
return o;
|
|
}
|
|
function ZT(e) {
|
|
const t = YT(e), n = QT(e), r = (i) => (
|
|
// @ts-ignore
|
|
a1.includes(i) || i === "default"
|
|
), o = {};
|
|
return Km(t, (i, s) => {
|
|
i != null && (o[s.join(".")] = { isSemantic: !1, value: i });
|
|
}), Km(
|
|
n,
|
|
(i, s) => {
|
|
i != null && (o[s.join(".")] = { isSemantic: !0, value: i });
|
|
},
|
|
{
|
|
stop: (i) => Object.keys(i).every(r)
|
|
}
|
|
), o;
|
|
}
|
|
function Jm(e, t) {
|
|
return j(String(e).replace(/\./g, "-"), void 0, t);
|
|
}
|
|
function JT(e) {
|
|
const t = ZT(e), n = e.config?.cssVarPrefix;
|
|
let r = {};
|
|
const o = {};
|
|
function i(s, a) {
|
|
const u = [String(s).split(".")[0], a].join(".");
|
|
if (!t[u])
|
|
return a;
|
|
const { reference: d } = Jm(u, n);
|
|
return d;
|
|
}
|
|
for (const [s, a] of Object.entries(t)) {
|
|
const { isSemantic: l, value: u } = a, { variable: c, reference: d } = Jm(s, n);
|
|
if (!l) {
|
|
if (s.startsWith("space")) {
|
|
const y = s.split("."), [v, ...S] = y, k = `${v}.-${S.join(".")}`, p = vn.negate(u), h = vn.negate(d);
|
|
o[k] = {
|
|
value: p,
|
|
var: c,
|
|
varRef: h
|
|
};
|
|
}
|
|
r[c] = u, o[s] = {
|
|
value: u,
|
|
var: c,
|
|
varRef: d
|
|
};
|
|
continue;
|
|
}
|
|
const f = Ut(u) ? u : { default: u };
|
|
r = sn(
|
|
r,
|
|
Object.entries(f).reduce(
|
|
(y, [v, S]) => {
|
|
if (!S)
|
|
return y;
|
|
const k = i(s, `${S}`);
|
|
if (v === "default")
|
|
return y[c] = k, y;
|
|
const p = Ql?.[v] ?? v;
|
|
return y[p] = { [c]: k }, y;
|
|
},
|
|
{}
|
|
)
|
|
), o[s] = {
|
|
value: d,
|
|
var: c,
|
|
varRef: d
|
|
};
|
|
}
|
|
return {
|
|
cssVars: r,
|
|
cssMap: o
|
|
};
|
|
}
|
|
function e2(e) {
|
|
const t = qT(e), {
|
|
/**
|
|
* This is more like a dictionary of tokens users will type `green.500`,
|
|
* and their equivalent css variable.
|
|
*/
|
|
cssMap: n,
|
|
/**
|
|
* The extracted css variables will be stored here, and used in
|
|
* the emotion's <Global/> component to attach variables to `:root`
|
|
*/
|
|
cssVars: r
|
|
} = JT(t);
|
|
return Object.assign(t, {
|
|
__cssVars: { ...{
|
|
"--chakra-ring-inset": "var(--chakra-empty,/*!*/ /*!*/)",
|
|
"--chakra-ring-offset-width": "0px",
|
|
"--chakra-ring-offset-color": "#fff",
|
|
"--chakra-ring-color": "rgba(66, 153, 225, 0.6)",
|
|
"--chakra-ring-offset-shadow": "0 0 #0000",
|
|
"--chakra-ring-shadow": "0 0 #0000",
|
|
"--chakra-space-x-reverse": "0",
|
|
"--chakra-space-y-reverse": "0"
|
|
}, ...r },
|
|
__cssMap: n,
|
|
__breakpoints: LC(t.breakpoints)
|
|
}), t;
|
|
}
|
|
function Z(e, t = {}) {
|
|
let n = !1;
|
|
function r() {
|
|
if (!n) {
|
|
n = !0;
|
|
return;
|
|
}
|
|
throw new Error(
|
|
"[anatomy] .part(...) should only be called once. Did you mean to use .extend(...) ?"
|
|
);
|
|
}
|
|
function o(...c) {
|
|
r();
|
|
for (const d of c)
|
|
t[d] = l(d);
|
|
return Z(e, t);
|
|
}
|
|
function i(...c) {
|
|
for (const d of c)
|
|
d in t || (t[d] = l(d));
|
|
return Z(e, t);
|
|
}
|
|
function s() {
|
|
return Object.fromEntries(
|
|
Object.entries(t).map(([d, f]) => [d, f.selector])
|
|
);
|
|
}
|
|
function a() {
|
|
return Object.fromEntries(
|
|
Object.entries(t).map(([d, f]) => [d, f.className])
|
|
);
|
|
}
|
|
function l(c) {
|
|
const y = `chakra-${(["container", "root"].includes(c ?? "") ? [e] : [e, c]).filter(Boolean).join("__")}`;
|
|
return {
|
|
className: y,
|
|
selector: `.${y}`,
|
|
toString: () => c
|
|
};
|
|
}
|
|
return {
|
|
parts: o,
|
|
toPart: l,
|
|
extend: i,
|
|
selectors: s,
|
|
classnames: a,
|
|
get keys() {
|
|
return Object.keys(t);
|
|
},
|
|
__type: {}
|
|
};
|
|
}
|
|
const t2 = Z("accordion").parts(
|
|
"root",
|
|
"container",
|
|
"button",
|
|
"panel",
|
|
"icon"
|
|
), n2 = Z("alert").parts(
|
|
"title",
|
|
"description",
|
|
"container",
|
|
"icon",
|
|
"spinner"
|
|
), r2 = Z("avatar").parts(
|
|
"label",
|
|
"badge",
|
|
"container",
|
|
"excessLabel",
|
|
"group"
|
|
), o2 = Z("breadcrumb").parts(
|
|
"link",
|
|
"item",
|
|
"container",
|
|
"separator"
|
|
);
|
|
Z("button").parts();
|
|
const i2 = Z("checkbox").parts(
|
|
"control",
|
|
"icon",
|
|
"container",
|
|
"label"
|
|
);
|
|
Z("progress").parts(
|
|
"track",
|
|
"filledTrack",
|
|
"label"
|
|
);
|
|
const s2 = Z("drawer").parts(
|
|
"overlay",
|
|
"dialogContainer",
|
|
"dialog",
|
|
"header",
|
|
"closeButton",
|
|
"body",
|
|
"footer"
|
|
), a2 = Z("editable").parts(
|
|
"preview",
|
|
"input",
|
|
"textarea"
|
|
), l2 = Z("form").parts(
|
|
"container",
|
|
"requiredIndicator",
|
|
"helperText"
|
|
), u2 = Z("formError").parts("text", "icon"), c2 = Z("input").parts(
|
|
"addon",
|
|
"field",
|
|
"element",
|
|
"group"
|
|
), d2 = Z("list").parts("container", "item", "icon"), f2 = Z("menu").parts(
|
|
"button",
|
|
"list",
|
|
"item",
|
|
"groupTitle",
|
|
"icon",
|
|
"command",
|
|
"divider"
|
|
), h2 = Z("modal").parts(
|
|
"overlay",
|
|
"dialogContainer",
|
|
"dialog",
|
|
"header",
|
|
"closeButton",
|
|
"body",
|
|
"footer"
|
|
), p2 = Z("numberinput").parts(
|
|
"root",
|
|
"field",
|
|
"stepperGroup",
|
|
"stepper"
|
|
);
|
|
Z("pininput").parts("field");
|
|
const m2 = Z("popover").parts(
|
|
"content",
|
|
"header",
|
|
"body",
|
|
"footer",
|
|
"popper",
|
|
"arrow",
|
|
"closeButton"
|
|
), g2 = Z("progress").parts(
|
|
"label",
|
|
"filledTrack",
|
|
"track"
|
|
), y2 = Z("radio").parts(
|
|
"container",
|
|
"control",
|
|
"label"
|
|
), v2 = Z("select").parts("field", "icon"), S2 = Z("slider").parts(
|
|
"container",
|
|
"track",
|
|
"thumb",
|
|
"filledTrack",
|
|
"mark"
|
|
), b2 = Z("stat").parts(
|
|
"container",
|
|
"label",
|
|
"helpText",
|
|
"number",
|
|
"icon"
|
|
), x2 = Z("switch").parts(
|
|
"container",
|
|
"track",
|
|
"thumb",
|
|
"label"
|
|
), w2 = Z("table").parts(
|
|
"table",
|
|
"thead",
|
|
"tbody",
|
|
"tr",
|
|
"th",
|
|
"td",
|
|
"tfoot",
|
|
"caption"
|
|
), k2 = Z("tabs").parts(
|
|
"root",
|
|
"tab",
|
|
"tablist",
|
|
"tabpanel",
|
|
"tabpanels",
|
|
"indicator"
|
|
), C2 = Z("tag").parts(
|
|
"container",
|
|
"label",
|
|
"closeButton"
|
|
), T2 = Z("card").parts(
|
|
"container",
|
|
"header",
|
|
"body",
|
|
"footer"
|
|
);
|
|
Z("stepper").parts(
|
|
"stepper",
|
|
"step",
|
|
"title",
|
|
"description",
|
|
"indicator",
|
|
"separator",
|
|
"icon",
|
|
"number"
|
|
);
|
|
const { definePartsStyle: P2, defineMultiStyleConfig: E2 } = ae(t2.keys), _2 = {
|
|
borderTopWidth: "1px",
|
|
borderColor: "inherit",
|
|
_last: {
|
|
borderBottomWidth: "1px"
|
|
}
|
|
}, $2 = {
|
|
transitionProperty: "common",
|
|
transitionDuration: "normal",
|
|
fontSize: "md",
|
|
_focusVisible: {
|
|
boxShadow: "outline"
|
|
},
|
|
_hover: {
|
|
bg: "blackAlpha.50"
|
|
},
|
|
_disabled: {
|
|
opacity: 0.4,
|
|
cursor: "not-allowed"
|
|
},
|
|
px: "4",
|
|
py: "2"
|
|
}, A2 = {
|
|
pt: "2",
|
|
px: "4",
|
|
pb: "5"
|
|
}, R2 = {
|
|
fontSize: "1.25em"
|
|
}, z2 = P2({
|
|
container: _2,
|
|
button: $2,
|
|
panel: A2,
|
|
icon: R2
|
|
}), M2 = E2({ baseStyle: z2 });
|
|
function vr(e, t, n) {
|
|
return Math.min(Math.max(e, n), t);
|
|
}
|
|
class D2 extends Error {
|
|
constructor(t) {
|
|
super(`Failed to parse color: "${t}"`);
|
|
}
|
|
}
|
|
var pi = D2;
|
|
function Sh(e) {
|
|
if (typeof e != "string") throw new pi(e);
|
|
if (e.trim().toLowerCase() === "transparent") return [0, 0, 0, 0];
|
|
let t = e.trim();
|
|
t = N2.test(e) ? V2(e) : e;
|
|
const n = B2.exec(t);
|
|
if (n) {
|
|
const s = Array.from(n).slice(1);
|
|
return [...s.slice(0, 3).map((a) => parseInt(ns(a, 2), 16)), parseInt(ns(s[3] || "f", 2), 16) / 255];
|
|
}
|
|
const r = F2.exec(t);
|
|
if (r) {
|
|
const s = Array.from(r).slice(1);
|
|
return [...s.slice(0, 3).map((a) => parseInt(a, 16)), parseInt(s[3] || "ff", 16) / 255];
|
|
}
|
|
const o = j2.exec(t);
|
|
if (o) {
|
|
const s = Array.from(o).slice(1);
|
|
return [...s.slice(0, 3).map((a) => parseInt(a, 10)), parseFloat(s[3] || "1")];
|
|
}
|
|
const i = O2.exec(t);
|
|
if (i) {
|
|
const [s, a, l, u] = Array.from(i).slice(1).map(parseFloat);
|
|
if (vr(0, 100, a) !== a) throw new pi(e);
|
|
if (vr(0, 100, l) !== l) throw new pi(e);
|
|
return [...W2(s, a, l), Number.isNaN(u) ? 1 : u];
|
|
}
|
|
throw new pi(e);
|
|
}
|
|
function I2(e) {
|
|
let t = 5381, n = e.length;
|
|
for (; n; )
|
|
t = t * 33 ^ e.charCodeAt(--n);
|
|
return (t >>> 0) % 2341;
|
|
}
|
|
const eg = (e) => parseInt(e.replace(/_/g, ""), 36), L2 = "1q29ehhb 1n09sgk7 1kl1ekf_ _yl4zsno 16z9eiv3 1p29lhp8 _bd9zg04 17u0____ _iw9zhe5 _to73___ _r45e31e _7l6g016 _jh8ouiv _zn3qba8 1jy4zshs 11u87k0u 1ro9yvyo 1aj3xael 1gz9zjz0 _3w8l4xo 1bf1ekf_ _ke3v___ _4rrkb__ 13j776yz _646mbhl _nrjr4__ _le6mbhl 1n37ehkb _m75f91n _qj3bzfz 1939yygw 11i5z6x8 _1k5f8xs 1509441m 15t5lwgf _ae2th1n _tg1ugcv 1lp1ugcv 16e14up_ _h55rw7n _ny9yavn _7a11xb_ 1ih442g9 _pv442g9 1mv16xof 14e6y7tu 1oo9zkds 17d1cisi _4v9y70f _y98m8kc 1019pq0v 12o9zda8 _348j4f4 1et50i2o _8epa8__ _ts6senj 1o350i2o 1mi9eiuo 1259yrp0 1ln80gnw _632xcoy 1cn9zldc _f29edu4 1n490c8q _9f9ziet 1b94vk74 _m49zkct 1kz6s73a 1eu9dtog _q58s1rz 1dy9sjiq __u89jo3 _aj5nkwg _ld89jo3 13h9z6wx _qa9z2ii _l119xgq _bs5arju 1hj4nwk9 1qt4nwk9 1ge6wau6 14j9zlcw 11p1edc_ _ms1zcxe _439shk6 _jt9y70f _754zsow 1la40eju _oq5p___ _x279qkz 1fa5r3rv _yd2d9ip _424tcku _8y1di2_ _zi2uabw _yy7rn9h 12yz980_ __39ljp6 1b59zg0x _n39zfzp 1fy9zest _b33k___ _hp9wq92 1il50hz4 _io472ub _lj9z3eo 19z9ykg0 _8t8iu3a 12b9bl4a 1ak5yw0o _896v4ku _tb8k8lv _s59zi6t _c09ze0p 1lg80oqn 1id9z8wb _238nba5 1kq6wgdi _154zssg _tn3zk49 _da9y6tc 1sg7cv4f _r12jvtt 1gq5fmkz 1cs9rvci _lp9jn1c _xw1tdnb 13f9zje6 16f6973h _vo7ir40 _bt5arjf _rc45e4t _hr4e100 10v4e100 _hc9zke2 _w91egv_ _sj2r1kk 13c87yx8 _vqpds__ _ni8ggk8 _tj9yqfb 1ia2j4r4 _7x9b10u 1fc9ld4j 1eq9zldr _5j9lhpx _ez9zl6o _md61fzm".split(" ").reduce((e, t) => {
|
|
const n = eg(t.substring(0, 3)), r = eg(t.substring(3)).toString(16);
|
|
let o = "";
|
|
for (let i = 0; i < 6 - r.length; i++)
|
|
o += "0";
|
|
return e[n] = `${o}${r}`, e;
|
|
}, {});
|
|
function V2(e) {
|
|
const t = e.toLowerCase().trim(), n = L2[I2(t)];
|
|
if (!n) throw new pi(e);
|
|
return `#${n}`;
|
|
}
|
|
const ns = (e, t) => Array.from(Array(t)).map(() => e).join(""), B2 = new RegExp(`^#${ns("([a-f0-9])", 3)}([a-f0-9])?$`, "i"), F2 = new RegExp(`^#${ns("([a-f0-9]{2})", 3)}([a-f0-9]{2})?$`, "i"), j2 = new RegExp(`^rgba?\\(\\s*(\\d+)\\s*${ns(",\\s*(\\d+)\\s*", 2)}(?:,\\s*([\\d.]+))?\\s*\\)$`, "i"), O2 = /^hsla?\(\s*([\d.]+)\s*,\s*([\d.]+)%\s*,\s*([\d.]+)%(?:\s*,\s*([\d.]+))?\s*\)$/i, N2 = /^[a-z]+$/i, tg = (e) => Math.round(e * 255), W2 = (e, t, n) => {
|
|
let r = n / 100;
|
|
if (t === 0)
|
|
return [r, r, r].map(tg);
|
|
const o = (e % 360 + 360) % 360 / 60, i = (1 - Math.abs(2 * r - 1)) * (t / 100), s = i * (1 - Math.abs(o % 2 - 1));
|
|
let a = 0, l = 0, u = 0;
|
|
o >= 0 && o < 1 ? (a = i, l = s) : o >= 1 && o < 2 ? (a = s, l = i) : o >= 2 && o < 3 ? (l = i, u = s) : o >= 3 && o < 4 ? (l = s, u = i) : o >= 4 && o < 5 ? (a = s, u = i) : o >= 5 && o < 6 && (a = i, u = s);
|
|
const c = r - i / 2, d = a + c, f = l + c, y = u + c;
|
|
return [d, f, y].map(tg);
|
|
};
|
|
function U2(e, t, n, r) {
|
|
return `rgba(${vr(0, 255, e).toFixed()}, ${vr(0, 255, t).toFixed()}, ${vr(0, 255, n).toFixed()}, ${parseFloat(vr(0, 1, r).toFixed(3))})`;
|
|
}
|
|
function H2(e, t) {
|
|
const [n, r, o, i] = Sh(e);
|
|
return U2(n, r, o, i - t);
|
|
}
|
|
function K2(e) {
|
|
const [t, n, r, o] = Sh(e);
|
|
let i = (s) => {
|
|
const a = vr(0, 255, s).toString(16);
|
|
return a.length === 1 ? `0${a}` : a;
|
|
};
|
|
return `#${i(t)}${i(n)}${i(r)}${o < 1 ? i(Math.round(o * 255)) : ""}`;
|
|
}
|
|
const G2 = (e) => Object.keys(e).length === 0;
|
|
function X2(e, t, n, r, o) {
|
|
for (t = t.split ? t.split(".") : t, r = 0; r < t.length; r++)
|
|
e = e ? e[t[r]] : o;
|
|
return e === o ? n : e;
|
|
}
|
|
const Ye = (e, t, n) => {
|
|
const r = X2(e, `colors.${t}`, t);
|
|
try {
|
|
return K2(r), r;
|
|
} catch {
|
|
return "#000000";
|
|
}
|
|
}, Y2 = (e) => {
|
|
const [t, n, r] = Sh(e);
|
|
return (t * 299 + n * 587 + r * 114) / 1e3;
|
|
}, Q2 = (e) => (t) => {
|
|
const n = Ye(t, e);
|
|
return Y2(n) < 128 ? "dark" : "light";
|
|
}, q2 = (e) => (t) => Q2(e)(t) === "dark", Ro = (e, t) => (n) => {
|
|
const r = Ye(n, e);
|
|
return H2(r, 1 - t);
|
|
};
|
|
function ng(e = "1rem", t = "rgba(255, 255, 255, 0.15)") {
|
|
return {
|
|
backgroundImage: `linear-gradient(
|
|
45deg,
|
|
${t} 25%,
|
|
transparent 25%,
|
|
transparent 50%,
|
|
${t} 50%,
|
|
${t} 75%,
|
|
transparent 75%,
|
|
transparent
|
|
)`,
|
|
backgroundSize: `${e} ${e}`
|
|
};
|
|
}
|
|
const Z2 = () => `#${Math.floor(Math.random() * 16777215).toString(16).padEnd(6, "0")}`;
|
|
function J2(e) {
|
|
const t = Z2();
|
|
return !e || G2(e) ? t : e.string && e.colors ? tP(e.string, e.colors) : e.string && !e.colors ? eP(e.string) : e.colors && !e.string ? nP(e.colors) : t;
|
|
}
|
|
function eP(e) {
|
|
let t = 0;
|
|
if (e.length === 0)
|
|
return t.toString();
|
|
for (let r = 0; r < e.length; r += 1)
|
|
t = e.charCodeAt(r) + ((t << 5) - t), t = t & t;
|
|
let n = "#";
|
|
for (let r = 0; r < 3; r += 1) {
|
|
const o = t >> r * 8 & 255;
|
|
n += `00${o.toString(16)}`.substr(-2);
|
|
}
|
|
return n;
|
|
}
|
|
function tP(e, t) {
|
|
let n = 0;
|
|
if (e.length === 0)
|
|
return t[0];
|
|
for (let r = 0; r < e.length; r += 1)
|
|
n = e.charCodeAt(r) + ((n << 5) - n), n = n & n;
|
|
return n = (n % t.length + t.length) % t.length, t[n];
|
|
}
|
|
function nP(e) {
|
|
return e[Math.floor(Math.random() * e.length)];
|
|
}
|
|
function F(e, t) {
|
|
return (n) => n.colorMode === "dark" ? t : e;
|
|
}
|
|
function bh(e) {
|
|
const { orientation: t, vertical: n, horizontal: r } = e;
|
|
return t ? t === "vertical" ? n : r : {};
|
|
}
|
|
function f1(e) {
|
|
return Ut(e) && e.reference ? e.reference : String(e);
|
|
}
|
|
const Jl = (e, ...t) => t.map(f1).join(` ${e} `).replace(/calc/g, ""), rg = (...e) => `calc(${Jl("+", ...e)})`, og = (...e) => `calc(${Jl("-", ...e)})`, jd = (...e) => `calc(${Jl("*", ...e)})`, ig = (...e) => `calc(${Jl("/", ...e)})`, sg = (e) => {
|
|
const t = f1(e);
|
|
return t != null && !Number.isNaN(parseFloat(t)) ? String(t).startsWith("-") ? String(t).slice(1) : `-${t}` : jd(t, -1);
|
|
}, Sn = Object.assign(
|
|
(e) => ({
|
|
add: (...t) => Sn(rg(e, ...t)),
|
|
subtract: (...t) => Sn(og(e, ...t)),
|
|
multiply: (...t) => Sn(jd(e, ...t)),
|
|
divide: (...t) => Sn(ig(e, ...t)),
|
|
negate: () => Sn(sg(e)),
|
|
toString: () => e.toString()
|
|
}),
|
|
{
|
|
add: rg,
|
|
subtract: og,
|
|
multiply: jd,
|
|
divide: ig,
|
|
negate: sg
|
|
}
|
|
);
|
|
function rP(e) {
|
|
return !Number.isInteger(parseFloat(e.toString()));
|
|
}
|
|
function oP(e, t = "-") {
|
|
return e.replace(/\s+/g, t);
|
|
}
|
|
function h1(e) {
|
|
const t = oP(e.toString());
|
|
return t.includes("\\.") ? e : rP(e) ? t.replace(".", "\\.") : e;
|
|
}
|
|
function iP(e, t = "") {
|
|
return [t, h1(e)].filter(Boolean).join("-");
|
|
}
|
|
function sP(e, t) {
|
|
return `var(${h1(e)}${t ? `, ${t}` : ""})`;
|
|
}
|
|
function aP(e, t = "") {
|
|
return `--${iP(e, t)}`;
|
|
}
|
|
function Ae(e, t) {
|
|
const n = aP(e, t?.prefix);
|
|
return {
|
|
variable: n,
|
|
reference: sP(n, lP(t?.fallback))
|
|
};
|
|
}
|
|
function lP(e) {
|
|
return e?.reference;
|
|
}
|
|
const { definePartsStyle: ys, defineMultiStyleConfig: uP } = ae(n2.keys), gt = j("alert-fg"), An = j("alert-bg"), cP = ys({
|
|
container: {
|
|
bg: An.reference,
|
|
px: "4",
|
|
py: "3"
|
|
},
|
|
title: {
|
|
fontWeight: "bold",
|
|
lineHeight: "6",
|
|
marginEnd: "2"
|
|
},
|
|
description: {
|
|
lineHeight: "6"
|
|
},
|
|
icon: {
|
|
color: gt.reference,
|
|
flexShrink: 0,
|
|
marginEnd: "3",
|
|
w: "5",
|
|
h: "6"
|
|
},
|
|
spinner: {
|
|
color: gt.reference,
|
|
flexShrink: 0,
|
|
marginEnd: "3",
|
|
w: "5",
|
|
h: "5"
|
|
}
|
|
});
|
|
function xh(e) {
|
|
const { theme: t, colorScheme: n } = e, r = Ro(`${n}.200`, 0.16)(t);
|
|
return {
|
|
light: `colors.${n}.100`,
|
|
dark: r
|
|
};
|
|
}
|
|
const dP = ys((e) => {
|
|
const { colorScheme: t } = e, n = xh(e);
|
|
return {
|
|
container: {
|
|
[gt.variable]: `colors.${t}.600`,
|
|
[An.variable]: n.light,
|
|
_dark: {
|
|
[gt.variable]: `colors.${t}.200`,
|
|
[An.variable]: n.dark
|
|
}
|
|
}
|
|
};
|
|
}), fP = ys((e) => {
|
|
const { colorScheme: t } = e, n = xh(e);
|
|
return {
|
|
container: {
|
|
[gt.variable]: `colors.${t}.600`,
|
|
[An.variable]: n.light,
|
|
_dark: {
|
|
[gt.variable]: `colors.${t}.200`,
|
|
[An.variable]: n.dark
|
|
},
|
|
paddingStart: "3",
|
|
borderStartWidth: "4px",
|
|
borderStartColor: gt.reference
|
|
}
|
|
};
|
|
}), hP = ys((e) => {
|
|
const { colorScheme: t } = e, n = xh(e);
|
|
return {
|
|
container: {
|
|
[gt.variable]: `colors.${t}.600`,
|
|
[An.variable]: n.light,
|
|
_dark: {
|
|
[gt.variable]: `colors.${t}.200`,
|
|
[An.variable]: n.dark
|
|
},
|
|
pt: "2",
|
|
borderTopWidth: "4px",
|
|
borderTopColor: gt.reference
|
|
}
|
|
};
|
|
}), pP = ys((e) => {
|
|
const { colorScheme: t } = e;
|
|
return {
|
|
container: {
|
|
[gt.variable]: "colors.white",
|
|
[An.variable]: `colors.${t}.600`,
|
|
_dark: {
|
|
[gt.variable]: "colors.gray.900",
|
|
[An.variable]: `colors.${t}.200`
|
|
},
|
|
color: gt.reference
|
|
}
|
|
};
|
|
}), mP = {
|
|
subtle: dP,
|
|
"left-accent": fP,
|
|
"top-accent": hP,
|
|
solid: pP
|
|
}, gP = uP({
|
|
baseStyle: cP,
|
|
variants: mP,
|
|
defaultProps: {
|
|
variant: "subtle",
|
|
colorScheme: "blue"
|
|
}
|
|
}), p1 = {
|
|
px: "1px",
|
|
0.5: "0.125rem",
|
|
1: "0.25rem",
|
|
1.5: "0.375rem",
|
|
2: "0.5rem",
|
|
2.5: "0.625rem",
|
|
3: "0.75rem",
|
|
3.5: "0.875rem",
|
|
4: "1rem",
|
|
5: "1.25rem",
|
|
6: "1.5rem",
|
|
7: "1.75rem",
|
|
8: "2rem",
|
|
9: "2.25rem",
|
|
10: "2.5rem",
|
|
12: "3rem",
|
|
14: "3.5rem",
|
|
16: "4rem",
|
|
20: "5rem",
|
|
24: "6rem",
|
|
28: "7rem",
|
|
32: "8rem",
|
|
36: "9rem",
|
|
40: "10rem",
|
|
44: "11rem",
|
|
48: "12rem",
|
|
52: "13rem",
|
|
56: "14rem",
|
|
60: "15rem",
|
|
64: "16rem",
|
|
72: "18rem",
|
|
80: "20rem",
|
|
96: "24rem"
|
|
}, yP = {
|
|
max: "max-content",
|
|
min: "min-content",
|
|
full: "100%",
|
|
"3xs": "14rem",
|
|
"2xs": "16rem",
|
|
xs: "20rem",
|
|
sm: "24rem",
|
|
md: "28rem",
|
|
lg: "32rem",
|
|
xl: "36rem",
|
|
"2xl": "42rem",
|
|
"3xl": "48rem",
|
|
"4xl": "56rem",
|
|
"5xl": "64rem",
|
|
"6xl": "72rem",
|
|
"7xl": "80rem",
|
|
"8xl": "90rem",
|
|
prose: "60ch"
|
|
}, vP = {
|
|
sm: "640px",
|
|
md: "768px",
|
|
lg: "1024px",
|
|
xl: "1280px"
|
|
}, m1 = {
|
|
...p1,
|
|
...yP,
|
|
container: vP
|
|
}, SP = (e) => typeof e == "function";
|
|
function Je(e, ...t) {
|
|
return SP(e) ? e(...t) : e;
|
|
}
|
|
const { definePartsStyle: g1, defineMultiStyleConfig: bP } = ae(r2.keys), So = j("avatar-border-color"), $i = j("avatar-bg"), rs = j("avatar-font-size"), zo = j("avatar-size"), xP = {
|
|
borderRadius: "full",
|
|
border: "0.2em solid",
|
|
borderColor: So.reference,
|
|
[So.variable]: "white",
|
|
_dark: {
|
|
[So.variable]: "colors.gray.800"
|
|
}
|
|
}, wP = {
|
|
bg: $i.reference,
|
|
fontSize: rs.reference,
|
|
width: zo.reference,
|
|
height: zo.reference,
|
|
lineHeight: "1",
|
|
[$i.variable]: "colors.gray.200",
|
|
_dark: {
|
|
[$i.variable]: "colors.whiteAlpha.400"
|
|
}
|
|
}, kP = (e) => {
|
|
const { name: t, theme: n } = e, r = t ? J2({ string: t }) : "colors.gray.400", o = q2(r)(n);
|
|
let i = "white";
|
|
return o || (i = "gray.800"), {
|
|
bg: $i.reference,
|
|
fontSize: rs.reference,
|
|
color: i,
|
|
borderColor: So.reference,
|
|
verticalAlign: "top",
|
|
width: zo.reference,
|
|
height: zo.reference,
|
|
"&:not([data-loaded])": {
|
|
[$i.variable]: r
|
|
},
|
|
[So.variable]: "colors.white",
|
|
_dark: {
|
|
[So.variable]: "colors.gray.800"
|
|
}
|
|
};
|
|
}, CP = {
|
|
fontSize: rs.reference,
|
|
lineHeight: "1"
|
|
}, TP = g1((e) => ({
|
|
badge: Je(xP, e),
|
|
excessLabel: Je(wP, e),
|
|
container: Je(kP, e),
|
|
label: CP
|
|
}));
|
|
function Dn(e) {
|
|
const t = e !== "100%" ? m1[e] : void 0;
|
|
return g1({
|
|
container: {
|
|
[zo.variable]: t ?? e,
|
|
[rs.variable]: `calc(${t ?? e} / 2.5)`
|
|
},
|
|
excessLabel: {
|
|
[zo.variable]: t ?? e,
|
|
[rs.variable]: `calc(${t ?? e} / 2.5)`
|
|
}
|
|
});
|
|
}
|
|
const PP = {
|
|
"2xs": Dn(4),
|
|
xs: Dn(6),
|
|
sm: Dn(8),
|
|
md: Dn(12),
|
|
lg: Dn(16),
|
|
xl: Dn(24),
|
|
"2xl": Dn(32),
|
|
full: Dn("100%")
|
|
}, EP = bP({
|
|
baseStyle: TP,
|
|
sizes: PP,
|
|
defaultProps: {
|
|
size: "md"
|
|
}
|
|
}), we = GT("badge", ["bg", "color", "shadow"]), _P = {
|
|
px: 1,
|
|
textTransform: "uppercase",
|
|
fontSize: "xs",
|
|
borderRadius: "sm",
|
|
fontWeight: "bold",
|
|
bg: we.bg.reference,
|
|
color: we.color.reference,
|
|
boxShadow: we.shadow.reference
|
|
}, $P = (e) => {
|
|
const { colorScheme: t, theme: n } = e, r = Ro(`${t}.500`, 0.6)(n);
|
|
return {
|
|
[we.bg.variable]: `colors.${t}.500`,
|
|
[we.color.variable]: "colors.white",
|
|
_dark: {
|
|
[we.bg.variable]: r,
|
|
[we.color.variable]: "colors.whiteAlpha.800"
|
|
}
|
|
};
|
|
}, AP = (e) => {
|
|
const { colorScheme: t, theme: n } = e, r = Ro(`${t}.200`, 0.16)(n);
|
|
return {
|
|
[we.bg.variable]: `colors.${t}.100`,
|
|
[we.color.variable]: `colors.${t}.800`,
|
|
_dark: {
|
|
[we.bg.variable]: r,
|
|
[we.color.variable]: `colors.${t}.200`
|
|
}
|
|
};
|
|
}, RP = (e) => {
|
|
const { colorScheme: t, theme: n } = e, r = Ro(`${t}.200`, 0.8)(n);
|
|
return {
|
|
[we.color.variable]: `colors.${t}.500`,
|
|
_dark: {
|
|
[we.color.variable]: r
|
|
},
|
|
[we.shadow.variable]: `inset 0 0 0px 1px ${we.color.reference}`
|
|
};
|
|
}, zP = {
|
|
solid: $P,
|
|
subtle: AP,
|
|
outline: RP
|
|
}, Ai = {
|
|
baseStyle: _P,
|
|
variants: zP,
|
|
defaultProps: {
|
|
variant: "subtle",
|
|
colorScheme: "gray"
|
|
}
|
|
}, { defineMultiStyleConfig: MP, definePartsStyle: DP } = ae(o2.keys), ac = j("breadcrumb-link-decor"), IP = {
|
|
transitionProperty: "common",
|
|
transitionDuration: "fast",
|
|
transitionTimingFunction: "ease-out",
|
|
outline: "none",
|
|
color: "inherit",
|
|
textDecoration: ac.reference,
|
|
[ac.variable]: "none",
|
|
"&:not([aria-current=page])": {
|
|
cursor: "pointer",
|
|
_hover: {
|
|
[ac.variable]: "underline"
|
|
},
|
|
_focusVisible: {
|
|
boxShadow: "outline"
|
|
}
|
|
}
|
|
}, LP = DP({
|
|
link: IP
|
|
}), VP = MP({
|
|
baseStyle: LP
|
|
}), BP = {
|
|
lineHeight: "1.2",
|
|
borderRadius: "md",
|
|
fontWeight: "semibold",
|
|
transitionProperty: "common",
|
|
transitionDuration: "normal",
|
|
_focusVisible: {
|
|
boxShadow: "outline"
|
|
},
|
|
_disabled: {
|
|
opacity: 0.4,
|
|
cursor: "not-allowed",
|
|
boxShadow: "none"
|
|
},
|
|
_hover: {
|
|
_disabled: {
|
|
bg: "initial"
|
|
}
|
|
}
|
|
}, y1 = (e) => {
|
|
const { colorScheme: t, theme: n } = e;
|
|
if (t === "gray")
|
|
return {
|
|
color: F("gray.800", "whiteAlpha.900")(e),
|
|
_hover: {
|
|
bg: F("gray.100", "whiteAlpha.200")(e)
|
|
},
|
|
_active: { bg: F("gray.200", "whiteAlpha.300")(e) }
|
|
};
|
|
const r = Ro(`${t}.200`, 0.12)(n), o = Ro(`${t}.200`, 0.24)(n);
|
|
return {
|
|
color: F(`${t}.600`, `${t}.200`)(e),
|
|
bg: "transparent",
|
|
_hover: {
|
|
bg: F(`${t}.50`, r)(e)
|
|
},
|
|
_active: {
|
|
bg: F(`${t}.100`, o)(e)
|
|
}
|
|
};
|
|
}, FP = (e) => {
|
|
const { colorScheme: t } = e, n = F("gray.200", "whiteAlpha.300")(e);
|
|
return {
|
|
border: "1px solid",
|
|
borderColor: t === "gray" ? n : "currentColor",
|
|
".chakra-button__group[data-attached][data-orientation=horizontal] > &:not(:last-of-type)": { marginEnd: "-1px" },
|
|
".chakra-button__group[data-attached][data-orientation=vertical] > &:not(:last-of-type)": { marginBottom: "-1px" },
|
|
...Je(y1, e)
|
|
};
|
|
}, jP = {
|
|
yellow: {
|
|
bg: "yellow.400",
|
|
color: "black",
|
|
hoverBg: "yellow.500",
|
|
activeBg: "yellow.600"
|
|
},
|
|
cyan: {
|
|
bg: "cyan.400",
|
|
color: "black",
|
|
hoverBg: "cyan.500",
|
|
activeBg: "cyan.600"
|
|
}
|
|
}, OP = (e) => {
|
|
const { colorScheme: t } = e;
|
|
if (t === "gray") {
|
|
const a = F("gray.100", "whiteAlpha.200")(e);
|
|
return {
|
|
bg: a,
|
|
color: F("gray.800", "whiteAlpha.900")(e),
|
|
_hover: {
|
|
bg: F("gray.200", "whiteAlpha.300")(e),
|
|
_disabled: {
|
|
bg: a
|
|
}
|
|
},
|
|
_active: { bg: F("gray.300", "whiteAlpha.400")(e) }
|
|
};
|
|
}
|
|
const {
|
|
bg: n = `${t}.500`,
|
|
color: r = "white",
|
|
hoverBg: o = `${t}.600`,
|
|
activeBg: i = `${t}.700`
|
|
} = jP[t] ?? {}, s = F(n, `${t}.200`)(e);
|
|
return {
|
|
bg: s,
|
|
color: F(r, "gray.800")(e),
|
|
_hover: {
|
|
bg: F(o, `${t}.300`)(e),
|
|
_disabled: {
|
|
bg: s
|
|
}
|
|
},
|
|
_active: { bg: F(i, `${t}.400`)(e) }
|
|
};
|
|
}, NP = (e) => {
|
|
const { colorScheme: t } = e;
|
|
return {
|
|
padding: 0,
|
|
height: "auto",
|
|
lineHeight: "normal",
|
|
verticalAlign: "baseline",
|
|
color: F(`${t}.500`, `${t}.200`)(e),
|
|
_hover: {
|
|
textDecoration: "underline",
|
|
_disabled: {
|
|
textDecoration: "none"
|
|
}
|
|
},
|
|
_active: {
|
|
color: F(`${t}.700`, `${t}.500`)(e)
|
|
}
|
|
};
|
|
}, WP = {
|
|
bg: "none",
|
|
color: "inherit",
|
|
display: "inline",
|
|
lineHeight: "inherit",
|
|
m: "0",
|
|
p: "0"
|
|
}, UP = {
|
|
ghost: y1,
|
|
outline: FP,
|
|
solid: OP,
|
|
link: NP,
|
|
unstyled: WP
|
|
}, HP = {
|
|
lg: {
|
|
h: "12",
|
|
minW: "12",
|
|
fontSize: "lg",
|
|
px: "6"
|
|
},
|
|
md: {
|
|
h: "10",
|
|
minW: "10",
|
|
fontSize: "md",
|
|
px: "4"
|
|
},
|
|
sm: {
|
|
h: "8",
|
|
minW: "8",
|
|
fontSize: "sm",
|
|
px: "3"
|
|
},
|
|
xs: {
|
|
h: "6",
|
|
minW: "6",
|
|
fontSize: "xs",
|
|
px: "2"
|
|
}
|
|
}, KP = {
|
|
baseStyle: BP,
|
|
variants: UP,
|
|
sizes: HP,
|
|
defaultProps: {
|
|
variant: "solid",
|
|
size: "md",
|
|
colorScheme: "gray"
|
|
}
|
|
}, { definePartsStyle: kr, defineMultiStyleConfig: GP } = ae(T2.keys), vl = j("card-bg"), Tn = j("card-padding"), v1 = j("card-shadow"), Ta = j("card-radius"), S1 = j("card-border-width", "0"), b1 = j("card-border-color"), XP = kr({
|
|
container: {
|
|
[vl.variable]: "colors.chakra-body-bg",
|
|
backgroundColor: vl.reference,
|
|
boxShadow: v1.reference,
|
|
borderRadius: Ta.reference,
|
|
color: "chakra-body-text",
|
|
borderWidth: S1.reference,
|
|
borderColor: b1.reference
|
|
},
|
|
body: {
|
|
padding: Tn.reference,
|
|
flex: "1 1 0%"
|
|
},
|
|
header: {
|
|
padding: Tn.reference
|
|
},
|
|
footer: {
|
|
padding: Tn.reference
|
|
}
|
|
}), YP = {
|
|
sm: kr({
|
|
container: {
|
|
[Ta.variable]: "radii.base",
|
|
[Tn.variable]: "space.3"
|
|
}
|
|
}),
|
|
md: kr({
|
|
container: {
|
|
[Ta.variable]: "radii.md",
|
|
[Tn.variable]: "space.5"
|
|
}
|
|
}),
|
|
lg: kr({
|
|
container: {
|
|
[Ta.variable]: "radii.xl",
|
|
[Tn.variable]: "space.7"
|
|
}
|
|
})
|
|
}, QP = {
|
|
elevated: kr({
|
|
container: {
|
|
[v1.variable]: "shadows.base",
|
|
_dark: {
|
|
[vl.variable]: "colors.gray.700"
|
|
}
|
|
}
|
|
}),
|
|
outline: kr({
|
|
container: {
|
|
[S1.variable]: "1px",
|
|
[b1.variable]: "colors.chakra-border-color"
|
|
}
|
|
}),
|
|
filled: kr({
|
|
container: {
|
|
[vl.variable]: "colors.chakra-subtle-bg"
|
|
}
|
|
}),
|
|
unstyled: {
|
|
body: {
|
|
[Tn.variable]: 0
|
|
},
|
|
header: {
|
|
[Tn.variable]: 0
|
|
},
|
|
footer: {
|
|
[Tn.variable]: 0
|
|
}
|
|
}
|
|
}, qP = GP({
|
|
baseStyle: XP,
|
|
variants: QP,
|
|
sizes: YP,
|
|
defaultProps: {
|
|
variant: "elevated",
|
|
size: "md"
|
|
}
|
|
}), { definePartsStyle: Pa, defineMultiStyleConfig: ZP } = ae(i2.keys), Ri = j("checkbox-size"), JP = (e) => {
|
|
const { colorScheme: t } = e;
|
|
return {
|
|
w: Ri.reference,
|
|
h: Ri.reference,
|
|
transitionProperty: "box-shadow",
|
|
transitionDuration: "normal",
|
|
border: "2px solid",
|
|
borderRadius: "sm",
|
|
borderColor: "inherit",
|
|
color: "white",
|
|
_checked: {
|
|
bg: F(`${t}.500`, `${t}.200`)(e),
|
|
borderColor: F(`${t}.500`, `${t}.200`)(e),
|
|
color: F("white", "gray.900")(e),
|
|
_hover: {
|
|
bg: F(`${t}.600`, `${t}.300`)(e),
|
|
borderColor: F(`${t}.600`, `${t}.300`)(e)
|
|
},
|
|
_disabled: {
|
|
borderColor: F("gray.200", "transparent")(e),
|
|
bg: F("gray.200", "whiteAlpha.300")(e),
|
|
color: F("gray.500", "whiteAlpha.500")(e)
|
|
}
|
|
},
|
|
_indeterminate: {
|
|
bg: F(`${t}.500`, `${t}.200`)(e),
|
|
borderColor: F(`${t}.500`, `${t}.200`)(e),
|
|
color: F("white", "gray.900")(e)
|
|
},
|
|
_disabled: {
|
|
bg: F("gray.100", "whiteAlpha.100")(e),
|
|
borderColor: F("gray.100", "transparent")(e)
|
|
},
|
|
_focusVisible: {
|
|
boxShadow: "outline"
|
|
},
|
|
_invalid: {
|
|
borderColor: F("red.500", "red.300")(e)
|
|
}
|
|
};
|
|
}, eE = {
|
|
_disabled: { cursor: "not-allowed" }
|
|
}, tE = {
|
|
userSelect: "none",
|
|
_disabled: { opacity: 0.4 }
|
|
}, nE = {
|
|
transitionProperty: "transform",
|
|
transitionDuration: "normal"
|
|
}, rE = Pa((e) => ({
|
|
icon: nE,
|
|
container: eE,
|
|
control: Je(JP, e),
|
|
label: tE
|
|
})), oE = {
|
|
sm: Pa({
|
|
control: { [Ri.variable]: "sizes.3" },
|
|
label: { fontSize: "sm" },
|
|
icon: { fontSize: "3xs" }
|
|
}),
|
|
md: Pa({
|
|
control: { [Ri.variable]: "sizes.4" },
|
|
label: { fontSize: "md" },
|
|
icon: { fontSize: "2xs" }
|
|
}),
|
|
lg: Pa({
|
|
control: { [Ri.variable]: "sizes.5" },
|
|
label: { fontSize: "lg" },
|
|
icon: { fontSize: "2xs" }
|
|
})
|
|
}, Sl = ZP({
|
|
baseStyle: rE,
|
|
sizes: oE,
|
|
defaultProps: {
|
|
size: "md",
|
|
colorScheme: "blue"
|
|
}
|
|
}), zi = Ae("close-button-size"), oi = Ae("close-button-bg"), iE = {
|
|
w: [zi.reference],
|
|
h: [zi.reference],
|
|
borderRadius: "md",
|
|
transitionProperty: "common",
|
|
transitionDuration: "normal",
|
|
_disabled: {
|
|
opacity: 0.4,
|
|
cursor: "not-allowed",
|
|
boxShadow: "none"
|
|
},
|
|
_hover: {
|
|
[oi.variable]: "colors.blackAlpha.100",
|
|
_dark: {
|
|
[oi.variable]: "colors.whiteAlpha.100"
|
|
}
|
|
},
|
|
_active: {
|
|
[oi.variable]: "colors.blackAlpha.200",
|
|
_dark: {
|
|
[oi.variable]: "colors.whiteAlpha.200"
|
|
}
|
|
},
|
|
_focusVisible: {
|
|
boxShadow: "outline"
|
|
},
|
|
bg: oi.reference
|
|
}, sE = {
|
|
lg: {
|
|
[zi.variable]: "sizes.10",
|
|
fontSize: "md"
|
|
},
|
|
md: {
|
|
[zi.variable]: "sizes.8",
|
|
fontSize: "xs"
|
|
},
|
|
sm: {
|
|
[zi.variable]: "sizes.6",
|
|
fontSize: "2xs"
|
|
}
|
|
}, aE = {
|
|
baseStyle: iE,
|
|
sizes: sE,
|
|
defaultProps: {
|
|
size: "md"
|
|
}
|
|
}, { variants: lE, defaultProps: uE } = Ai, cE = {
|
|
fontFamily: "mono",
|
|
fontSize: "sm",
|
|
px: "0.2em",
|
|
borderRadius: "sm",
|
|
bg: we.bg.reference,
|
|
color: we.color.reference,
|
|
boxShadow: we.shadow.reference
|
|
}, dE = {
|
|
baseStyle: cE,
|
|
variants: lE,
|
|
defaultProps: uE
|
|
}, fE = {
|
|
w: "100%",
|
|
mx: "auto",
|
|
maxW: "prose",
|
|
px: "4"
|
|
}, hE = {
|
|
baseStyle: fE
|
|
}, pE = {
|
|
opacity: 0.6,
|
|
borderColor: "inherit"
|
|
}, mE = {
|
|
borderStyle: "solid"
|
|
}, gE = {
|
|
borderStyle: "dashed"
|
|
}, yE = {
|
|
solid: mE,
|
|
dashed: gE
|
|
}, vE = {
|
|
baseStyle: pE,
|
|
variants: yE,
|
|
defaultProps: {
|
|
variant: "solid"
|
|
}
|
|
}, { definePartsStyle: Od, defineMultiStyleConfig: SE } = ae(s2.keys), lc = j("drawer-bg"), uc = j("drawer-box-shadow");
|
|
function Wr(e) {
|
|
return Od(e === "full" ? {
|
|
dialog: { maxW: "100vw", h: "100vh" }
|
|
} : {
|
|
dialog: { maxW: e }
|
|
});
|
|
}
|
|
const bE = {
|
|
bg: "blackAlpha.600",
|
|
zIndex: "modal"
|
|
}, xE = {
|
|
display: "flex",
|
|
zIndex: "modal",
|
|
justifyContent: "center"
|
|
}, wE = (e) => {
|
|
const { isFullHeight: t } = e;
|
|
return {
|
|
...t && { height: "100vh" },
|
|
zIndex: "modal",
|
|
maxH: "100vh",
|
|
color: "inherit",
|
|
[lc.variable]: "colors.white",
|
|
[uc.variable]: "shadows.lg",
|
|
_dark: {
|
|
[lc.variable]: "colors.gray.700",
|
|
[uc.variable]: "shadows.dark-lg"
|
|
},
|
|
bg: lc.reference,
|
|
boxShadow: uc.reference
|
|
};
|
|
}, kE = {
|
|
px: "6",
|
|
py: "4",
|
|
fontSize: "xl",
|
|
fontWeight: "semibold"
|
|
}, CE = {
|
|
position: "absolute",
|
|
top: "2",
|
|
insetEnd: "3"
|
|
}, TE = {
|
|
px: "6",
|
|
py: "2",
|
|
flex: "1",
|
|
overflow: "auto"
|
|
}, PE = {
|
|
px: "6",
|
|
py: "4"
|
|
}, EE = Od((e) => ({
|
|
overlay: bE,
|
|
dialogContainer: xE,
|
|
dialog: Je(wE, e),
|
|
header: kE,
|
|
closeButton: CE,
|
|
body: TE,
|
|
footer: PE
|
|
})), _E = {
|
|
xs: Wr("xs"),
|
|
sm: Wr("md"),
|
|
md: Wr("lg"),
|
|
lg: Wr("2xl"),
|
|
xl: Wr("4xl"),
|
|
full: Wr("full")
|
|
}, $E = SE({
|
|
baseStyle: EE,
|
|
sizes: _E,
|
|
defaultProps: {
|
|
size: "xs"
|
|
}
|
|
}), { definePartsStyle: AE, defineMultiStyleConfig: RE } = ae(a2.keys), zE = {
|
|
borderRadius: "md",
|
|
py: "1",
|
|
transitionProperty: "common",
|
|
transitionDuration: "normal"
|
|
}, ME = {
|
|
borderRadius: "md",
|
|
py: "1",
|
|
transitionProperty: "common",
|
|
transitionDuration: "normal",
|
|
width: "full",
|
|
_focusVisible: { boxShadow: "outline" },
|
|
_placeholder: { opacity: 0.6 }
|
|
}, DE = {
|
|
borderRadius: "md",
|
|
py: "1",
|
|
transitionProperty: "common",
|
|
transitionDuration: "normal",
|
|
width: "full",
|
|
_focusVisible: { boxShadow: "outline" },
|
|
_placeholder: { opacity: 0.6 }
|
|
}, IE = AE({
|
|
preview: zE,
|
|
input: ME,
|
|
textarea: DE
|
|
}), LE = RE({
|
|
baseStyle: IE
|
|
}), { definePartsStyle: VE, defineMultiStyleConfig: BE } = ae(l2.keys), bo = j("form-control-color"), FE = {
|
|
marginStart: "1",
|
|
[bo.variable]: "colors.red.500",
|
|
_dark: {
|
|
[bo.variable]: "colors.red.300"
|
|
},
|
|
color: bo.reference
|
|
}, jE = {
|
|
mt: "2",
|
|
[bo.variable]: "colors.gray.600",
|
|
_dark: {
|
|
[bo.variable]: "colors.whiteAlpha.600"
|
|
},
|
|
color: bo.reference,
|
|
lineHeight: "normal",
|
|
fontSize: "sm"
|
|
}, OE = VE({
|
|
container: {
|
|
width: "100%",
|
|
position: "relative"
|
|
},
|
|
requiredIndicator: FE,
|
|
helperText: jE
|
|
}), NE = BE({
|
|
baseStyle: OE
|
|
}), { definePartsStyle: WE, defineMultiStyleConfig: UE } = ae(u2.keys), xo = j("form-error-color"), HE = {
|
|
[xo.variable]: "colors.red.500",
|
|
_dark: {
|
|
[xo.variable]: "colors.red.300"
|
|
},
|
|
color: xo.reference,
|
|
mt: "2",
|
|
fontSize: "sm",
|
|
lineHeight: "normal"
|
|
}, KE = {
|
|
marginEnd: "0.5em",
|
|
[xo.variable]: "colors.red.500",
|
|
_dark: {
|
|
[xo.variable]: "colors.red.300"
|
|
},
|
|
color: xo.reference
|
|
}, GE = WE({
|
|
text: HE,
|
|
icon: KE
|
|
}), XE = UE({
|
|
baseStyle: GE
|
|
}), YE = {
|
|
fontSize: "md",
|
|
marginEnd: "3",
|
|
mb: "2",
|
|
fontWeight: "medium",
|
|
transitionProperty: "common",
|
|
transitionDuration: "normal",
|
|
opacity: 1,
|
|
_disabled: {
|
|
opacity: 0.4
|
|
}
|
|
}, QE = {
|
|
baseStyle: YE
|
|
}, qE = {
|
|
fontFamily: "heading",
|
|
fontWeight: "bold"
|
|
}, ZE = {
|
|
"4xl": {
|
|
fontSize: ["6xl", null, "7xl"],
|
|
lineHeight: 1
|
|
},
|
|
"3xl": {
|
|
fontSize: ["5xl", null, "6xl"],
|
|
lineHeight: 1
|
|
},
|
|
"2xl": {
|
|
fontSize: ["4xl", null, "5xl"],
|
|
lineHeight: [1.2, null, 1]
|
|
},
|
|
xl: {
|
|
fontSize: ["3xl", null, "4xl"],
|
|
lineHeight: [1.33, null, 1.2]
|
|
},
|
|
lg: {
|
|
fontSize: ["2xl", null, "3xl"],
|
|
lineHeight: [1.33, null, 1.2]
|
|
},
|
|
md: {
|
|
fontSize: "xl",
|
|
lineHeight: 1.2
|
|
},
|
|
sm: {
|
|
fontSize: "md",
|
|
lineHeight: 1.2
|
|
},
|
|
xs: {
|
|
fontSize: "sm",
|
|
lineHeight: 1.2
|
|
}
|
|
}, JE = {
|
|
baseStyle: qE,
|
|
sizes: ZE,
|
|
defaultProps: {
|
|
size: "xl"
|
|
}
|
|
}, { definePartsStyle: kn, defineMultiStyleConfig: e_ } = ae(c2.keys), ro = j("input-height"), oo = j("input-font-size"), io = j("input-padding"), so = j("input-border-radius"), t_ = kn({
|
|
addon: {
|
|
height: ro.reference,
|
|
fontSize: oo.reference,
|
|
px: io.reference,
|
|
borderRadius: so.reference
|
|
},
|
|
field: {
|
|
width: "100%",
|
|
height: ro.reference,
|
|
fontSize: oo.reference,
|
|
px: io.reference,
|
|
borderRadius: so.reference,
|
|
minWidth: 0,
|
|
outline: 0,
|
|
position: "relative",
|
|
appearance: "none",
|
|
transitionProperty: "common",
|
|
transitionDuration: "normal",
|
|
_disabled: {
|
|
opacity: 0.4,
|
|
cursor: "not-allowed"
|
|
}
|
|
}
|
|
}), In = {
|
|
lg: {
|
|
[oo.variable]: "fontSizes.lg",
|
|
[io.variable]: "space.4",
|
|
[so.variable]: "radii.md",
|
|
[ro.variable]: "sizes.12"
|
|
},
|
|
md: {
|
|
[oo.variable]: "fontSizes.md",
|
|
[io.variable]: "space.4",
|
|
[so.variable]: "radii.md",
|
|
[ro.variable]: "sizes.10"
|
|
},
|
|
sm: {
|
|
[oo.variable]: "fontSizes.sm",
|
|
[io.variable]: "space.3",
|
|
[so.variable]: "radii.sm",
|
|
[ro.variable]: "sizes.8"
|
|
},
|
|
xs: {
|
|
[oo.variable]: "fontSizes.xs",
|
|
[io.variable]: "space.2",
|
|
[so.variable]: "radii.sm",
|
|
[ro.variable]: "sizes.6"
|
|
}
|
|
}, n_ = {
|
|
lg: kn({
|
|
field: In.lg,
|
|
group: In.lg
|
|
}),
|
|
md: kn({
|
|
field: In.md,
|
|
group: In.md
|
|
}),
|
|
sm: kn({
|
|
field: In.sm,
|
|
group: In.sm
|
|
}),
|
|
xs: kn({
|
|
field: In.xs,
|
|
group: In.xs
|
|
})
|
|
};
|
|
function wh(e) {
|
|
const { focusBorderColor: t, errorBorderColor: n } = e;
|
|
return {
|
|
focusBorderColor: t || F("blue.500", "blue.300")(e),
|
|
errorBorderColor: n || F("red.500", "red.300")(e)
|
|
};
|
|
}
|
|
const r_ = kn((e) => {
|
|
const { theme: t } = e, { focusBorderColor: n, errorBorderColor: r } = wh(e);
|
|
return {
|
|
field: {
|
|
border: "1px solid",
|
|
borderColor: "inherit",
|
|
bg: "inherit",
|
|
_hover: {
|
|
borderColor: F("gray.300", "whiteAlpha.400")(e)
|
|
},
|
|
_readOnly: {
|
|
boxShadow: "none !important",
|
|
userSelect: "all"
|
|
},
|
|
_invalid: {
|
|
borderColor: Ye(t, r),
|
|
boxShadow: `0 0 0 1px ${Ye(t, r)}`
|
|
},
|
|
_focusVisible: {
|
|
zIndex: 1,
|
|
borderColor: Ye(t, n),
|
|
boxShadow: `0 0 0 1px ${Ye(t, n)}`
|
|
}
|
|
},
|
|
addon: {
|
|
border: "1px solid",
|
|
borderColor: F("inherit", "whiteAlpha.50")(e),
|
|
bg: F("gray.100", "whiteAlpha.300")(e)
|
|
}
|
|
};
|
|
}), o_ = kn((e) => {
|
|
const { theme: t } = e, { focusBorderColor: n, errorBorderColor: r } = wh(e);
|
|
return {
|
|
field: {
|
|
border: "2px solid",
|
|
borderColor: "transparent",
|
|
bg: F("gray.100", "whiteAlpha.50")(e),
|
|
_hover: {
|
|
bg: F("gray.200", "whiteAlpha.100")(e)
|
|
},
|
|
_readOnly: {
|
|
boxShadow: "none !important",
|
|
userSelect: "all"
|
|
},
|
|
_invalid: {
|
|
borderColor: Ye(t, r)
|
|
},
|
|
_focusVisible: {
|
|
bg: "transparent",
|
|
borderColor: Ye(t, n)
|
|
}
|
|
},
|
|
addon: {
|
|
border: "2px solid",
|
|
borderColor: "transparent",
|
|
bg: F("gray.100", "whiteAlpha.50")(e)
|
|
}
|
|
};
|
|
}), i_ = kn((e) => {
|
|
const { theme: t } = e, { focusBorderColor: n, errorBorderColor: r } = wh(e);
|
|
return {
|
|
field: {
|
|
borderBottom: "1px solid",
|
|
borderColor: "inherit",
|
|
borderRadius: "0",
|
|
px: "0",
|
|
bg: "transparent",
|
|
_readOnly: {
|
|
boxShadow: "none !important",
|
|
userSelect: "all"
|
|
},
|
|
_invalid: {
|
|
borderColor: Ye(t, r),
|
|
boxShadow: `0px 1px 0px 0px ${Ye(t, r)}`
|
|
},
|
|
_focusVisible: {
|
|
borderColor: Ye(t, n),
|
|
boxShadow: `0px 1px 0px 0px ${Ye(t, n)}`
|
|
}
|
|
},
|
|
addon: {
|
|
borderBottom: "2px solid",
|
|
borderColor: "inherit",
|
|
borderRadius: "0",
|
|
px: "0",
|
|
bg: "transparent"
|
|
}
|
|
};
|
|
}), s_ = kn({
|
|
field: {
|
|
bg: "transparent",
|
|
px: "0",
|
|
height: "auto"
|
|
},
|
|
addon: {
|
|
bg: "transparent",
|
|
px: "0",
|
|
height: "auto"
|
|
}
|
|
}), a_ = {
|
|
outline: r_,
|
|
filled: o_,
|
|
flushed: i_,
|
|
unstyled: s_
|
|
}, q = e_({
|
|
baseStyle: t_,
|
|
sizes: n_,
|
|
variants: a_,
|
|
defaultProps: {
|
|
size: "md",
|
|
variant: "outline"
|
|
}
|
|
}), cc = j("kbd-bg"), l_ = {
|
|
[cc.variable]: "colors.gray.100",
|
|
_dark: {
|
|
[cc.variable]: "colors.whiteAlpha.100"
|
|
},
|
|
bg: cc.reference,
|
|
borderRadius: "md",
|
|
borderWidth: "1px",
|
|
borderBottomWidth: "3px",
|
|
fontSize: "0.8em",
|
|
fontWeight: "bold",
|
|
lineHeight: "normal",
|
|
px: "0.4em",
|
|
whiteSpace: "nowrap"
|
|
}, u_ = {
|
|
baseStyle: l_
|
|
}, c_ = {
|
|
transitionProperty: "common",
|
|
transitionDuration: "fast",
|
|
transitionTimingFunction: "ease-out",
|
|
cursor: "pointer",
|
|
textDecoration: "none",
|
|
outline: "none",
|
|
color: "inherit",
|
|
_hover: {
|
|
textDecoration: "underline"
|
|
},
|
|
_focusVisible: {
|
|
boxShadow: "outline"
|
|
}
|
|
}, d_ = {
|
|
baseStyle: c_
|
|
}, { defineMultiStyleConfig: f_, definePartsStyle: h_ } = ae(d2.keys), p_ = {
|
|
marginEnd: "2",
|
|
display: "inline",
|
|
verticalAlign: "text-bottom"
|
|
}, m_ = h_({
|
|
icon: p_
|
|
}), g_ = f_({
|
|
baseStyle: m_
|
|
}), { defineMultiStyleConfig: y_, definePartsStyle: v_ } = ae(f2.keys), Jt = j("menu-bg"), dc = j("menu-shadow"), S_ = {
|
|
[Jt.variable]: "#fff",
|
|
[dc.variable]: "shadows.sm",
|
|
_dark: {
|
|
[Jt.variable]: "colors.gray.700",
|
|
[dc.variable]: "shadows.dark-lg"
|
|
},
|
|
color: "inherit",
|
|
minW: "3xs",
|
|
py: "2",
|
|
zIndex: "dropdown",
|
|
borderRadius: "md",
|
|
borderWidth: "1px",
|
|
bg: Jt.reference,
|
|
boxShadow: dc.reference
|
|
}, b_ = {
|
|
py: "1.5",
|
|
px: "3",
|
|
transitionProperty: "background",
|
|
transitionDuration: "ultra-fast",
|
|
transitionTimingFunction: "ease-in",
|
|
_focus: {
|
|
[Jt.variable]: "colors.gray.100",
|
|
_dark: {
|
|
[Jt.variable]: "colors.whiteAlpha.100"
|
|
}
|
|
},
|
|
_active: {
|
|
[Jt.variable]: "colors.gray.200",
|
|
_dark: {
|
|
[Jt.variable]: "colors.whiteAlpha.200"
|
|
}
|
|
},
|
|
_expanded: {
|
|
[Jt.variable]: "colors.gray.100",
|
|
_dark: {
|
|
[Jt.variable]: "colors.whiteAlpha.100"
|
|
}
|
|
},
|
|
_disabled: {
|
|
opacity: 0.4,
|
|
cursor: "not-allowed"
|
|
},
|
|
bg: Jt.reference
|
|
}, x_ = {
|
|
mx: 4,
|
|
my: 2,
|
|
fontWeight: "semibold",
|
|
fontSize: "sm"
|
|
}, w_ = {
|
|
display: "inline-flex",
|
|
alignItems: "center",
|
|
justifyContent: "center",
|
|
flexShrink: 0
|
|
}, k_ = {
|
|
opacity: 0.6
|
|
}, C_ = {
|
|
border: 0,
|
|
borderBottom: "1px solid",
|
|
borderColor: "inherit",
|
|
my: "2",
|
|
opacity: 0.6
|
|
}, T_ = {
|
|
transitionProperty: "common",
|
|
transitionDuration: "normal"
|
|
}, P_ = v_({
|
|
button: T_,
|
|
list: S_,
|
|
item: b_,
|
|
groupTitle: x_,
|
|
icon: w_,
|
|
command: k_,
|
|
divider: C_
|
|
}), E_ = y_({
|
|
baseStyle: P_
|
|
}), { defineMultiStyleConfig: __, definePartsStyle: Nd } = ae(h2.keys), fc = j("modal-bg"), hc = j("modal-shadow"), $_ = {
|
|
bg: "blackAlpha.600",
|
|
zIndex: "modal"
|
|
}, A_ = (e) => {
|
|
const { isCentered: t, scrollBehavior: n } = e;
|
|
return {
|
|
display: "flex",
|
|
zIndex: "modal",
|
|
justifyContent: "center",
|
|
alignItems: t ? "center" : "flex-start",
|
|
overflow: n === "inside" ? "hidden" : "auto",
|
|
overscrollBehaviorY: "none"
|
|
};
|
|
}, R_ = (e) => {
|
|
const { isCentered: t, scrollBehavior: n } = e;
|
|
return {
|
|
borderRadius: "md",
|
|
color: "inherit",
|
|
my: t ? "auto" : "16",
|
|
mx: t ? "auto" : void 0,
|
|
zIndex: "modal",
|
|
maxH: n === "inside" ? "calc(100% - 7.5rem)" : void 0,
|
|
[fc.variable]: "colors.white",
|
|
[hc.variable]: "shadows.lg",
|
|
_dark: {
|
|
[fc.variable]: "colors.gray.700",
|
|
[hc.variable]: "shadows.dark-lg"
|
|
},
|
|
bg: fc.reference,
|
|
boxShadow: hc.reference
|
|
};
|
|
}, z_ = {
|
|
px: "6",
|
|
py: "4",
|
|
fontSize: "xl",
|
|
fontWeight: "semibold"
|
|
}, M_ = {
|
|
position: "absolute",
|
|
top: "2",
|
|
insetEnd: "3"
|
|
}, D_ = (e) => {
|
|
const { scrollBehavior: t } = e;
|
|
return {
|
|
px: "6",
|
|
py: "2",
|
|
flex: "1",
|
|
overflow: t === "inside" ? "auto" : void 0
|
|
};
|
|
}, I_ = {
|
|
px: "6",
|
|
py: "4"
|
|
}, L_ = Nd((e) => ({
|
|
overlay: $_,
|
|
dialogContainer: Je(A_, e),
|
|
dialog: Je(R_, e),
|
|
header: z_,
|
|
closeButton: M_,
|
|
body: Je(D_, e),
|
|
footer: I_
|
|
}));
|
|
function It(e) {
|
|
return Nd(e === "full" ? {
|
|
dialog: {
|
|
maxW: "100vw",
|
|
minH: "$100vh",
|
|
my: "0",
|
|
borderRadius: "0"
|
|
}
|
|
} : {
|
|
dialog: { maxW: e }
|
|
});
|
|
}
|
|
const V_ = {
|
|
xs: It("xs"),
|
|
sm: It("sm"),
|
|
md: It("md"),
|
|
lg: It("lg"),
|
|
xl: It("xl"),
|
|
"2xl": It("2xl"),
|
|
"3xl": It("3xl"),
|
|
"4xl": It("4xl"),
|
|
"5xl": It("5xl"),
|
|
"6xl": It("6xl"),
|
|
full: It("full")
|
|
}, B_ = __({
|
|
baseStyle: L_,
|
|
sizes: V_,
|
|
defaultProps: { size: "md" }
|
|
}), x1 = {
|
|
letterSpacings: {
|
|
tighter: "-0.05em",
|
|
tight: "-0.025em",
|
|
normal: "0",
|
|
wide: "0.025em",
|
|
wider: "0.05em",
|
|
widest: "0.1em"
|
|
},
|
|
lineHeights: {
|
|
normal: "normal",
|
|
none: 1,
|
|
shorter: 1.25,
|
|
short: 1.375,
|
|
base: 1.5,
|
|
tall: 1.625,
|
|
taller: "2",
|
|
3: ".75rem",
|
|
4: "1rem",
|
|
5: "1.25rem",
|
|
6: "1.5rem",
|
|
7: "1.75rem",
|
|
8: "2rem",
|
|
9: "2.25rem",
|
|
10: "2.5rem"
|
|
},
|
|
fontWeights: {
|
|
hairline: 100,
|
|
thin: 200,
|
|
light: 300,
|
|
normal: 400,
|
|
medium: 500,
|
|
semibold: 600,
|
|
bold: 700,
|
|
extrabold: 800,
|
|
black: 900
|
|
},
|
|
fonts: {
|
|
heading: '-apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',
|
|
body: '-apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',
|
|
mono: 'SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace'
|
|
},
|
|
fontSizes: {
|
|
"3xs": "0.45rem",
|
|
"2xs": "0.625rem",
|
|
xs: "0.75rem",
|
|
sm: "0.875rem",
|
|
md: "1rem",
|
|
lg: "1.125rem",
|
|
xl: "1.25rem",
|
|
"2xl": "1.5rem",
|
|
"3xl": "1.875rem",
|
|
"4xl": "2.25rem",
|
|
"5xl": "3rem",
|
|
"6xl": "3.75rem",
|
|
"7xl": "4.5rem",
|
|
"8xl": "6rem",
|
|
"9xl": "8rem"
|
|
}
|
|
}, { defineMultiStyleConfig: F_, definePartsStyle: w1 } = ae(p2.keys), kh = Ae("number-input-stepper-width"), k1 = Ae("number-input-input-padding"), j_ = Sn(kh).add("0.5rem").toString(), pc = Ae("number-input-bg"), mc = Ae("number-input-color"), gc = Ae("number-input-border-color"), O_ = {
|
|
[kh.variable]: "sizes.6",
|
|
[k1.variable]: j_
|
|
}, N_ = (e) => Je(q.baseStyle, e)?.field ?? {}, W_ = {
|
|
width: kh.reference
|
|
}, U_ = {
|
|
borderStart: "1px solid",
|
|
borderStartColor: gc.reference,
|
|
color: mc.reference,
|
|
bg: pc.reference,
|
|
[mc.variable]: "colors.chakra-body-text",
|
|
[gc.variable]: "colors.chakra-border-color",
|
|
_dark: {
|
|
[mc.variable]: "colors.whiteAlpha.800",
|
|
[gc.variable]: "colors.whiteAlpha.300"
|
|
},
|
|
_active: {
|
|
[pc.variable]: "colors.gray.200",
|
|
_dark: {
|
|
[pc.variable]: "colors.whiteAlpha.300"
|
|
}
|
|
},
|
|
_disabled: {
|
|
opacity: 0.4,
|
|
cursor: "not-allowed"
|
|
}
|
|
}, H_ = w1((e) => ({
|
|
root: O_,
|
|
field: Je(N_, e) ?? {},
|
|
stepperGroup: W_,
|
|
stepper: U_
|
|
}));
|
|
function Js(e) {
|
|
const t = q.sizes?.[e], n = {
|
|
lg: "md",
|
|
md: "md",
|
|
sm: "sm",
|
|
xs: "sm"
|
|
}, r = t.field?.fontSize ?? "md", o = x1.fontSizes[r];
|
|
return w1({
|
|
field: {
|
|
...t.field,
|
|
paddingInlineEnd: k1.reference,
|
|
verticalAlign: "top"
|
|
},
|
|
stepper: {
|
|
fontSize: Sn(o).multiply(0.75).toString(),
|
|
_first: {
|
|
borderTopEndRadius: n[e]
|
|
},
|
|
_last: {
|
|
borderBottomEndRadius: n[e],
|
|
mt: "-1px",
|
|
borderTopWidth: 1
|
|
}
|
|
}
|
|
});
|
|
}
|
|
const K_ = {
|
|
xs: Js("xs"),
|
|
sm: Js("sm"),
|
|
md: Js("md"),
|
|
lg: Js("lg")
|
|
}, G_ = F_({
|
|
baseStyle: H_,
|
|
sizes: K_,
|
|
variants: q.variants,
|
|
defaultProps: q.defaultProps
|
|
}), X_ = {
|
|
...q.baseStyle?.field,
|
|
textAlign: "center"
|
|
}, Y_ = {
|
|
lg: {
|
|
fontSize: "lg",
|
|
w: 12,
|
|
h: 12,
|
|
borderRadius: "md"
|
|
},
|
|
md: {
|
|
fontSize: "md",
|
|
w: 10,
|
|
h: 10,
|
|
borderRadius: "md"
|
|
},
|
|
sm: {
|
|
fontSize: "sm",
|
|
w: 8,
|
|
h: 8,
|
|
borderRadius: "sm"
|
|
},
|
|
xs: {
|
|
fontSize: "xs",
|
|
w: 6,
|
|
h: 6,
|
|
borderRadius: "sm"
|
|
}
|
|
}, Q_ = {
|
|
outline: (e) => Je(q.variants?.outline, e)?.field ?? {},
|
|
flushed: (e) => Je(q.variants?.flushed, e)?.field ?? {},
|
|
filled: (e) => Je(q.variants?.filled, e)?.field ?? {},
|
|
unstyled: q.variants?.unstyled.field ?? {}
|
|
}, q_ = {
|
|
baseStyle: X_,
|
|
sizes: Y_,
|
|
variants: Q_,
|
|
defaultProps: q.defaultProps
|
|
}, { defineMultiStyleConfig: Z_, definePartsStyle: J_ } = ae(m2.keys), ea = Ae("popper-bg"), e$ = Ae("popper-arrow-bg"), ag = Ae("popper-arrow-shadow-color"), t$ = {
|
|
zIndex: "popover"
|
|
}, n$ = {
|
|
[ea.variable]: "colors.white",
|
|
bg: ea.reference,
|
|
[e$.variable]: ea.reference,
|
|
[ag.variable]: "colors.gray.200",
|
|
_dark: {
|
|
[ea.variable]: "colors.gray.700",
|
|
[ag.variable]: "colors.whiteAlpha.300"
|
|
},
|
|
width: "xs",
|
|
border: "1px solid",
|
|
borderColor: "inherit",
|
|
borderRadius: "md",
|
|
boxShadow: "sm",
|
|
zIndex: "inherit",
|
|
_focusVisible: {
|
|
outline: 0,
|
|
boxShadow: "outline"
|
|
}
|
|
}, r$ = {
|
|
px: 3,
|
|
py: 2,
|
|
borderBottomWidth: "1px"
|
|
}, o$ = {
|
|
px: 3,
|
|
py: 2
|
|
}, i$ = {
|
|
px: 3,
|
|
py: 2,
|
|
borderTopWidth: "1px"
|
|
}, s$ = {
|
|
position: "absolute",
|
|
borderRadius: "md",
|
|
top: 1,
|
|
insetEnd: 2,
|
|
padding: 2
|
|
}, a$ = J_({
|
|
popper: t$,
|
|
content: n$,
|
|
header: r$,
|
|
body: o$,
|
|
footer: i$,
|
|
closeButton: s$
|
|
}), l$ = Z_({
|
|
baseStyle: a$
|
|
}), { defineMultiStyleConfig: u$, definePartsStyle: mi } = ae(g2.keys), c$ = (e) => {
|
|
const { colorScheme: t, theme: n, isIndeterminate: r, hasStripe: o } = e, i = F(
|
|
ng(),
|
|
ng("1rem", "rgba(0,0,0,0.1)")
|
|
)(e), s = F(`${t}.500`, `${t}.200`)(e), a = `linear-gradient(
|
|
to right,
|
|
transparent 0%,
|
|
${Ye(n, s)} 50%,
|
|
transparent 100%
|
|
)`;
|
|
return {
|
|
...!r && o && i,
|
|
...r ? { bgImage: a } : { bgColor: s }
|
|
};
|
|
}, d$ = {
|
|
lineHeight: "1",
|
|
fontSize: "0.25em",
|
|
fontWeight: "bold",
|
|
color: "white"
|
|
}, f$ = (e) => ({
|
|
bg: F("gray.100", "whiteAlpha.300")(e)
|
|
}), h$ = (e) => ({
|
|
transitionProperty: "common",
|
|
transitionDuration: "slow",
|
|
...c$(e)
|
|
}), p$ = mi((e) => ({
|
|
label: d$,
|
|
filledTrack: h$(e),
|
|
track: f$(e)
|
|
})), m$ = {
|
|
xs: mi({
|
|
track: { h: "1" }
|
|
}),
|
|
sm: mi({
|
|
track: { h: "2" }
|
|
}),
|
|
md: mi({
|
|
track: { h: "3" }
|
|
}),
|
|
lg: mi({
|
|
track: { h: "4" }
|
|
})
|
|
}, g$ = u$({
|
|
sizes: m$,
|
|
baseStyle: p$,
|
|
defaultProps: {
|
|
size: "md",
|
|
colorScheme: "blue"
|
|
}
|
|
}), { defineMultiStyleConfig: y$, definePartsStyle: Ea } = ae(y2.keys), v$ = (e) => {
|
|
const t = Je(Sl.baseStyle, e)?.control;
|
|
return {
|
|
...t,
|
|
borderRadius: "full",
|
|
_checked: {
|
|
...t?._checked,
|
|
_before: {
|
|
content: '""',
|
|
display: "inline-block",
|
|
pos: "relative",
|
|
w: "50%",
|
|
h: "50%",
|
|
borderRadius: "50%",
|
|
bg: "currentColor"
|
|
}
|
|
}
|
|
};
|
|
}, S$ = Ea((e) => ({
|
|
label: Sl.baseStyle?.(e).label,
|
|
container: Sl.baseStyle?.(e).container,
|
|
control: v$(e)
|
|
})), b$ = {
|
|
md: Ea({
|
|
control: { w: "4", h: "4" },
|
|
label: { fontSize: "md" }
|
|
}),
|
|
lg: Ea({
|
|
control: { w: "5", h: "5" },
|
|
label: { fontSize: "lg" }
|
|
}),
|
|
sm: Ea({
|
|
control: { width: "3", height: "3" },
|
|
label: { fontSize: "sm" }
|
|
})
|
|
}, x$ = y$({
|
|
baseStyle: S$,
|
|
sizes: b$,
|
|
defaultProps: {
|
|
size: "md",
|
|
colorScheme: "blue"
|
|
}
|
|
}), { defineMultiStyleConfig: w$, definePartsStyle: k$ } = ae(v2.keys), ta = j("select-bg"), C$ = {
|
|
...q.baseStyle?.field,
|
|
appearance: "none",
|
|
paddingBottom: "1px",
|
|
lineHeight: "normal",
|
|
bg: ta.reference,
|
|
[ta.variable]: "colors.white",
|
|
_dark: {
|
|
[ta.variable]: "colors.gray.700"
|
|
},
|
|
"> option, > optgroup": {
|
|
bg: ta.reference
|
|
}
|
|
}, T$ = {
|
|
width: "6",
|
|
height: "100%",
|
|
insetEnd: "2",
|
|
position: "relative",
|
|
color: "currentColor",
|
|
fontSize: "xl",
|
|
_disabled: {
|
|
opacity: 0.5
|
|
}
|
|
}, P$ = k$({
|
|
field: C$,
|
|
icon: T$
|
|
}), na = {
|
|
paddingInlineEnd: "8"
|
|
}, E$ = {
|
|
lg: {
|
|
...q.sizes?.lg,
|
|
field: {
|
|
...q.sizes?.lg.field,
|
|
...na
|
|
}
|
|
},
|
|
md: {
|
|
...q.sizes?.md,
|
|
field: {
|
|
...q.sizes?.md.field,
|
|
...na
|
|
}
|
|
},
|
|
sm: {
|
|
...q.sizes?.sm,
|
|
field: {
|
|
...q.sizes?.sm.field,
|
|
...na
|
|
}
|
|
},
|
|
xs: {
|
|
...q.sizes?.xs,
|
|
field: {
|
|
...q.sizes?.xs.field,
|
|
...na
|
|
},
|
|
icon: {
|
|
insetEnd: "1"
|
|
}
|
|
}
|
|
}, _$ = w$({
|
|
baseStyle: P$,
|
|
sizes: E$,
|
|
variants: q.variants,
|
|
defaultProps: q.defaultProps
|
|
}), yc = j("skeleton-start-color"), vc = j("skeleton-end-color"), $$ = {
|
|
[yc.variable]: "colors.gray.100",
|
|
[vc.variable]: "colors.gray.400",
|
|
_dark: {
|
|
[yc.variable]: "colors.gray.800",
|
|
[vc.variable]: "colors.gray.600"
|
|
},
|
|
background: yc.reference,
|
|
borderColor: vc.reference,
|
|
opacity: 0.7,
|
|
borderRadius: "sm"
|
|
}, A$ = {
|
|
baseStyle: $$
|
|
}, Sc = j("skip-link-bg"), R$ = {
|
|
borderRadius: "md",
|
|
fontWeight: "semibold",
|
|
_focusVisible: {
|
|
boxShadow: "outline",
|
|
padding: "4",
|
|
position: "fixed",
|
|
top: "6",
|
|
insetStart: "6",
|
|
[Sc.variable]: "colors.white",
|
|
_dark: {
|
|
[Sc.variable]: "colors.gray.700"
|
|
},
|
|
bg: Sc.reference
|
|
}
|
|
}, z$ = {
|
|
baseStyle: R$
|
|
}, { defineMultiStyleConfig: M$, definePartsStyle: eu } = ae(S2.keys), Mr = j("slider-thumb-size"), os = j("slider-track-size"), jn = j("slider-bg"), D$ = (e) => {
|
|
const { orientation: t } = e;
|
|
return {
|
|
display: "inline-block",
|
|
position: "relative",
|
|
cursor: "pointer",
|
|
_disabled: {
|
|
opacity: 0.6,
|
|
cursor: "default",
|
|
pointerEvents: "none"
|
|
},
|
|
...bh({
|
|
orientation: t,
|
|
vertical: {
|
|
h: "100%",
|
|
px: vn(Mr.reference).divide(2).toString()
|
|
},
|
|
horizontal: {
|
|
w: "100%",
|
|
py: vn(Mr.reference).divide(2).toString()
|
|
}
|
|
})
|
|
};
|
|
}, I$ = (e) => ({
|
|
...bh({
|
|
orientation: e.orientation,
|
|
horizontal: { h: os.reference },
|
|
vertical: { w: os.reference }
|
|
}),
|
|
overflow: "hidden",
|
|
borderRadius: "sm",
|
|
[jn.variable]: "colors.gray.200",
|
|
_dark: {
|
|
[jn.variable]: "colors.whiteAlpha.200"
|
|
},
|
|
_disabled: {
|
|
[jn.variable]: "colors.gray.300",
|
|
_dark: {
|
|
[jn.variable]: "colors.whiteAlpha.300"
|
|
}
|
|
},
|
|
bg: jn.reference
|
|
}), L$ = (e) => {
|
|
const { orientation: t } = e;
|
|
return {
|
|
...bh({
|
|
orientation: t,
|
|
vertical: { left: "50%" },
|
|
horizontal: { top: "50%" }
|
|
}),
|
|
w: Mr.reference,
|
|
h: Mr.reference,
|
|
display: "flex",
|
|
alignItems: "center",
|
|
justifyContent: "center",
|
|
position: "absolute",
|
|
outline: 0,
|
|
zIndex: 1,
|
|
borderRadius: "full",
|
|
bg: "white",
|
|
boxShadow: "base",
|
|
border: "1px solid",
|
|
borderColor: "transparent",
|
|
transitionProperty: "transform",
|
|
transitionDuration: "normal",
|
|
_focusVisible: {
|
|
boxShadow: "outline"
|
|
},
|
|
_active: {
|
|
"--slider-thumb-scale": "1.15"
|
|
},
|
|
_disabled: {
|
|
bg: "gray.300"
|
|
}
|
|
};
|
|
}, V$ = (e) => {
|
|
const { colorScheme: t } = e;
|
|
return {
|
|
width: "inherit",
|
|
height: "inherit",
|
|
[jn.variable]: `colors.${t}.500`,
|
|
_dark: {
|
|
[jn.variable]: `colors.${t}.200`
|
|
},
|
|
bg: jn.reference
|
|
};
|
|
}, B$ = eu((e) => ({
|
|
container: D$(e),
|
|
track: I$(e),
|
|
thumb: L$(e),
|
|
filledTrack: V$(e)
|
|
})), F$ = eu({
|
|
container: {
|
|
[Mr.variable]: "sizes.4",
|
|
[os.variable]: "sizes.1"
|
|
}
|
|
}), j$ = eu({
|
|
container: {
|
|
[Mr.variable]: "sizes.3.5",
|
|
[os.variable]: "sizes.1"
|
|
}
|
|
}), O$ = eu({
|
|
container: {
|
|
[Mr.variable]: "sizes.2.5",
|
|
[os.variable]: "sizes.0.5"
|
|
}
|
|
}), N$ = {
|
|
lg: F$,
|
|
md: j$,
|
|
sm: O$
|
|
}, W$ = M$({
|
|
baseStyle: B$,
|
|
sizes: N$,
|
|
defaultProps: {
|
|
size: "md",
|
|
colorScheme: "blue"
|
|
}
|
|
}), pr = Ae("spinner-size"), U$ = {
|
|
width: [pr.reference],
|
|
height: [pr.reference]
|
|
}, H$ = {
|
|
xs: {
|
|
[pr.variable]: "sizes.3"
|
|
},
|
|
sm: {
|
|
[pr.variable]: "sizes.4"
|
|
},
|
|
md: {
|
|
[pr.variable]: "sizes.6"
|
|
},
|
|
lg: {
|
|
[pr.variable]: "sizes.8"
|
|
},
|
|
xl: {
|
|
[pr.variable]: "sizes.12"
|
|
}
|
|
}, K$ = {
|
|
baseStyle: U$,
|
|
sizes: H$,
|
|
defaultProps: {
|
|
size: "md"
|
|
}
|
|
}, { defineMultiStyleConfig: G$, definePartsStyle: C1 } = ae(b2.keys), X$ = {
|
|
fontWeight: "medium"
|
|
}, Y$ = {
|
|
opacity: 0.8,
|
|
marginBottom: "2"
|
|
}, Q$ = {
|
|
verticalAlign: "baseline",
|
|
fontWeight: "semibold"
|
|
}, q$ = {
|
|
marginEnd: 1,
|
|
w: "3.5",
|
|
h: "3.5",
|
|
verticalAlign: "middle"
|
|
}, Z$ = C1({
|
|
container: {},
|
|
label: X$,
|
|
helpText: Y$,
|
|
number: Q$,
|
|
icon: q$
|
|
}), J$ = {
|
|
md: C1({
|
|
label: { fontSize: "sm" },
|
|
helpText: { fontSize: "sm" },
|
|
number: { fontSize: "2xl" }
|
|
})
|
|
}, e5 = G$({
|
|
baseStyle: Z$,
|
|
sizes: J$,
|
|
defaultProps: {
|
|
size: "md"
|
|
}
|
|
}), { defineMultiStyleConfig: t5, definePartsStyle: gi } = ae([
|
|
"stepper",
|
|
"step",
|
|
"title",
|
|
"description",
|
|
"indicator",
|
|
"separator",
|
|
"icon",
|
|
"number"
|
|
]), bn = j("stepper-indicator-size"), ao = j("stepper-icon-size"), lo = j("stepper-title-font-size"), yi = j("stepper-description-font-size"), ii = j("stepper-accent-color"), n5 = gi(({ colorScheme: e }) => ({
|
|
stepper: {
|
|
display: "flex",
|
|
justifyContent: "space-between",
|
|
gap: "4",
|
|
"&[data-orientation=vertical]": {
|
|
flexDirection: "column",
|
|
alignItems: "flex-start"
|
|
},
|
|
"&[data-orientation=horizontal]": {
|
|
flexDirection: "row",
|
|
alignItems: "center"
|
|
},
|
|
[ii.variable]: `colors.${e}.500`,
|
|
_dark: {
|
|
[ii.variable]: `colors.${e}.200`
|
|
}
|
|
},
|
|
title: {
|
|
fontSize: lo.reference,
|
|
fontWeight: "medium"
|
|
},
|
|
description: {
|
|
fontSize: yi.reference,
|
|
color: "chakra-subtle-text"
|
|
},
|
|
number: {
|
|
fontSize: lo.reference
|
|
},
|
|
step: {
|
|
flexShrink: 0,
|
|
position: "relative",
|
|
display: "flex",
|
|
gap: "2",
|
|
"&[data-orientation=horizontal]": {
|
|
alignItems: "center"
|
|
},
|
|
flex: "1",
|
|
"&:last-of-type:not([data-stretch])": {
|
|
flex: "initial"
|
|
}
|
|
},
|
|
icon: {
|
|
flexShrink: 0,
|
|
width: ao.reference,
|
|
height: ao.reference
|
|
},
|
|
indicator: {
|
|
flexShrink: 0,
|
|
borderRadius: "full",
|
|
width: bn.reference,
|
|
height: bn.reference,
|
|
display: "flex",
|
|
justifyContent: "center",
|
|
alignItems: "center",
|
|
"&[data-status=active]": {
|
|
borderWidth: "2px",
|
|
borderColor: ii.reference
|
|
},
|
|
"&[data-status=complete]": {
|
|
bg: ii.reference,
|
|
color: "chakra-inverse-text"
|
|
},
|
|
"&[data-status=incomplete]": {
|
|
borderWidth: "2px"
|
|
}
|
|
},
|
|
separator: {
|
|
bg: "chakra-border-color",
|
|
flex: "1",
|
|
"&[data-status=complete]": {
|
|
bg: ii.reference
|
|
},
|
|
"&[data-orientation=horizontal]": {
|
|
width: "100%",
|
|
height: "2px",
|
|
marginStart: "2"
|
|
},
|
|
"&[data-orientation=vertical]": {
|
|
width: "2px",
|
|
position: "absolute",
|
|
height: "100%",
|
|
maxHeight: `calc(100% - ${bn.reference} - 8px)`,
|
|
top: `calc(${bn.reference} + 4px)`,
|
|
insetStart: `calc(${bn.reference} / 2 - 1px)`
|
|
}
|
|
}
|
|
})), r5 = t5({
|
|
baseStyle: n5,
|
|
sizes: {
|
|
xs: gi({
|
|
stepper: {
|
|
[bn.variable]: "sizes.4",
|
|
[ao.variable]: "sizes.3",
|
|
[lo.variable]: "fontSizes.xs",
|
|
[yi.variable]: "fontSizes.xs"
|
|
}
|
|
}),
|
|
sm: gi({
|
|
stepper: {
|
|
[bn.variable]: "sizes.6",
|
|
[ao.variable]: "sizes.4",
|
|
[lo.variable]: "fontSizes.sm",
|
|
[yi.variable]: "fontSizes.xs"
|
|
}
|
|
}),
|
|
md: gi({
|
|
stepper: {
|
|
[bn.variable]: "sizes.8",
|
|
[ao.variable]: "sizes.5",
|
|
[lo.variable]: "fontSizes.md",
|
|
[yi.variable]: "fontSizes.sm"
|
|
}
|
|
}),
|
|
lg: gi({
|
|
stepper: {
|
|
[bn.variable]: "sizes.10",
|
|
[ao.variable]: "sizes.6",
|
|
[lo.variable]: "fontSizes.lg",
|
|
[yi.variable]: "fontSizes.md"
|
|
}
|
|
})
|
|
},
|
|
defaultProps: {
|
|
size: "md",
|
|
colorScheme: "blue"
|
|
}
|
|
}), { defineMultiStyleConfig: o5, definePartsStyle: _a } = ae(x2.keys), Mi = Ae("switch-track-width"), Cr = Ae("switch-track-height"), bc = Ae("switch-track-diff"), i5 = Sn.subtract(Mi, Cr), Wd = Ae("switch-thumb-x"), si = Ae("switch-bg"), s5 = (e) => {
|
|
const { colorScheme: t } = e;
|
|
return {
|
|
borderRadius: "full",
|
|
p: "0.5",
|
|
width: [Mi.reference],
|
|
height: [Cr.reference],
|
|
transitionProperty: "common",
|
|
transitionDuration: "fast",
|
|
[si.variable]: "colors.gray.300",
|
|
_dark: {
|
|
[si.variable]: "colors.whiteAlpha.400"
|
|
},
|
|
_focusVisible: {
|
|
boxShadow: "outline"
|
|
},
|
|
_disabled: {
|
|
opacity: 0.4,
|
|
cursor: "not-allowed"
|
|
},
|
|
_checked: {
|
|
[si.variable]: `colors.${t}.500`,
|
|
_dark: {
|
|
[si.variable]: `colors.${t}.200`
|
|
}
|
|
},
|
|
bg: si.reference
|
|
};
|
|
}, a5 = {
|
|
bg: "white",
|
|
transitionProperty: "transform",
|
|
transitionDuration: "normal",
|
|
borderRadius: "inherit",
|
|
width: [Cr.reference],
|
|
height: [Cr.reference],
|
|
_checked: {
|
|
transform: `translateX(${Wd.reference})`
|
|
}
|
|
}, l5 = _a((e) => ({
|
|
container: {
|
|
[bc.variable]: i5,
|
|
[Wd.variable]: bc.reference,
|
|
_rtl: {
|
|
[Wd.variable]: Sn(bc).negate().toString()
|
|
}
|
|
},
|
|
track: s5(e),
|
|
thumb: a5
|
|
})), u5 = {
|
|
sm: _a({
|
|
container: {
|
|
[Mi.variable]: "1.375rem",
|
|
[Cr.variable]: "sizes.3"
|
|
}
|
|
}),
|
|
md: _a({
|
|
container: {
|
|
[Mi.variable]: "1.875rem",
|
|
[Cr.variable]: "sizes.4"
|
|
}
|
|
}),
|
|
lg: _a({
|
|
container: {
|
|
[Mi.variable]: "2.875rem",
|
|
[Cr.variable]: "sizes.6"
|
|
}
|
|
})
|
|
}, c5 = o5({
|
|
baseStyle: l5,
|
|
sizes: u5,
|
|
defaultProps: {
|
|
size: "md",
|
|
colorScheme: "blue"
|
|
}
|
|
}), { defineMultiStyleConfig: d5, definePartsStyle: wo } = ae(w2.keys), f5 = wo({
|
|
table: {
|
|
fontVariantNumeric: "lining-nums tabular-nums",
|
|
borderCollapse: "collapse",
|
|
width: "full"
|
|
},
|
|
th: {
|
|
fontFamily: "heading",
|
|
fontWeight: "bold",
|
|
textTransform: "uppercase",
|
|
letterSpacing: "wider",
|
|
textAlign: "start"
|
|
},
|
|
td: {
|
|
textAlign: "start"
|
|
},
|
|
caption: {
|
|
mt: 4,
|
|
fontFamily: "heading",
|
|
textAlign: "center",
|
|
fontWeight: "medium"
|
|
}
|
|
}), bl = {
|
|
"&[data-is-numeric=true]": {
|
|
textAlign: "end"
|
|
}
|
|
}, h5 = wo((e) => {
|
|
const { colorScheme: t } = e;
|
|
return {
|
|
th: {
|
|
color: F("gray.600", "gray.400")(e),
|
|
borderBottom: "1px",
|
|
borderColor: F(`${t}.100`, `${t}.700`)(e),
|
|
...bl
|
|
},
|
|
td: {
|
|
borderBottom: "1px",
|
|
borderColor: F(`${t}.100`, `${t}.700`)(e),
|
|
...bl
|
|
},
|
|
caption: {
|
|
color: F("gray.600", "gray.100")(e)
|
|
},
|
|
tfoot: {
|
|
tr: {
|
|
"&:last-of-type": {
|
|
th: { borderBottomWidth: 0 }
|
|
}
|
|
}
|
|
}
|
|
};
|
|
}), p5 = wo((e) => {
|
|
const { colorScheme: t } = e;
|
|
return {
|
|
th: {
|
|
color: F("gray.600", "gray.400")(e),
|
|
borderBottom: "1px",
|
|
borderColor: F(`${t}.100`, `${t}.700`)(e),
|
|
...bl
|
|
},
|
|
td: {
|
|
borderBottom: "1px",
|
|
borderColor: F(`${t}.100`, `${t}.700`)(e),
|
|
...bl
|
|
},
|
|
caption: {
|
|
color: F("gray.600", "gray.100")(e)
|
|
},
|
|
tbody: {
|
|
tr: {
|
|
"&:nth-of-type(odd)": {
|
|
"th, td": {
|
|
borderBottomWidth: "1px",
|
|
borderColor: F(`${t}.100`, `${t}.700`)(e)
|
|
},
|
|
td: {
|
|
background: F(`${t}.100`, `${t}.700`)(e)
|
|
}
|
|
}
|
|
}
|
|
},
|
|
tfoot: {
|
|
tr: {
|
|
"&:last-of-type": {
|
|
th: { borderBottomWidth: 0 }
|
|
}
|
|
}
|
|
}
|
|
};
|
|
}), m5 = {
|
|
simple: h5,
|
|
striped: p5,
|
|
unstyled: {}
|
|
}, g5 = {
|
|
sm: wo({
|
|
th: {
|
|
px: "4",
|
|
py: "1",
|
|
lineHeight: "4",
|
|
fontSize: "xs"
|
|
},
|
|
td: {
|
|
px: "4",
|
|
py: "2",
|
|
fontSize: "sm",
|
|
lineHeight: "4"
|
|
},
|
|
caption: {
|
|
px: "4",
|
|
py: "2",
|
|
fontSize: "xs"
|
|
}
|
|
}),
|
|
md: wo({
|
|
th: {
|
|
px: "6",
|
|
py: "3",
|
|
lineHeight: "4",
|
|
fontSize: "xs"
|
|
},
|
|
td: {
|
|
px: "6",
|
|
py: "4",
|
|
lineHeight: "5"
|
|
},
|
|
caption: {
|
|
px: "6",
|
|
py: "2",
|
|
fontSize: "sm"
|
|
}
|
|
}),
|
|
lg: wo({
|
|
th: {
|
|
px: "8",
|
|
py: "4",
|
|
lineHeight: "5",
|
|
fontSize: "sm"
|
|
},
|
|
td: {
|
|
px: "8",
|
|
py: "5",
|
|
lineHeight: "6"
|
|
},
|
|
caption: {
|
|
px: "6",
|
|
py: "2",
|
|
fontSize: "md"
|
|
}
|
|
})
|
|
}, y5 = d5({
|
|
baseStyle: f5,
|
|
variants: m5,
|
|
sizes: g5,
|
|
defaultProps: {
|
|
variant: "simple",
|
|
size: "md",
|
|
colorScheme: "gray"
|
|
}
|
|
}), rt = j("tabs-color"), Ot = j("tabs-bg"), ra = j("tabs-border-color"), { defineMultiStyleConfig: v5, definePartsStyle: un } = ae(k2.keys), S5 = (e) => {
|
|
const { orientation: t } = e;
|
|
return {
|
|
display: t === "vertical" ? "flex" : "block"
|
|
};
|
|
}, b5 = (e) => {
|
|
const { isFitted: t } = e;
|
|
return {
|
|
flex: t ? 1 : void 0,
|
|
transitionProperty: "common",
|
|
transitionDuration: "normal",
|
|
_focusVisible: {
|
|
zIndex: 1,
|
|
boxShadow: "outline"
|
|
},
|
|
_disabled: {
|
|
cursor: "not-allowed",
|
|
opacity: 0.4
|
|
}
|
|
};
|
|
}, x5 = (e) => {
|
|
const { align: t = "start", orientation: n } = e;
|
|
return {
|
|
justifyContent: {
|
|
end: "flex-end",
|
|
center: "center",
|
|
start: "flex-start"
|
|
}[t],
|
|
flexDirection: n === "vertical" ? "column" : "row"
|
|
};
|
|
}, w5 = {
|
|
p: 4
|
|
}, k5 = un((e) => ({
|
|
root: S5(e),
|
|
tab: b5(e),
|
|
tablist: x5(e),
|
|
tabpanel: w5
|
|
})), C5 = {
|
|
sm: un({
|
|
tab: {
|
|
py: 1,
|
|
px: 4,
|
|
fontSize: "sm"
|
|
}
|
|
}),
|
|
md: un({
|
|
tab: {
|
|
fontSize: "md",
|
|
py: 2,
|
|
px: 4
|
|
}
|
|
}),
|
|
lg: un({
|
|
tab: {
|
|
fontSize: "lg",
|
|
py: 3,
|
|
px: 4
|
|
}
|
|
})
|
|
}, T5 = un((e) => {
|
|
const { colorScheme: t, orientation: n } = e, r = n === "vertical", o = r ? "borderStart" : "borderBottom", i = r ? "marginStart" : "marginBottom";
|
|
return {
|
|
tablist: {
|
|
[o]: "2px solid",
|
|
borderColor: "inherit"
|
|
},
|
|
tab: {
|
|
[o]: "2px solid",
|
|
borderColor: "transparent",
|
|
[i]: "-2px",
|
|
_selected: {
|
|
[rt.variable]: `colors.${t}.600`,
|
|
_dark: {
|
|
[rt.variable]: `colors.${t}.300`
|
|
},
|
|
borderColor: "currentColor"
|
|
},
|
|
_active: {
|
|
[Ot.variable]: "colors.gray.200",
|
|
_dark: {
|
|
[Ot.variable]: "colors.whiteAlpha.300"
|
|
}
|
|
},
|
|
_disabled: {
|
|
_active: { bg: "none" }
|
|
},
|
|
color: rt.reference,
|
|
bg: Ot.reference
|
|
}
|
|
};
|
|
}), P5 = un((e) => {
|
|
const { colorScheme: t } = e;
|
|
return {
|
|
tab: {
|
|
borderTopRadius: "md",
|
|
border: "1px solid",
|
|
borderColor: "transparent",
|
|
mb: "-1px",
|
|
[ra.variable]: "transparent",
|
|
_selected: {
|
|
[rt.variable]: `colors.${t}.600`,
|
|
[ra.variable]: "colors.white",
|
|
_dark: {
|
|
[rt.variable]: `colors.${t}.300`,
|
|
[ra.variable]: "colors.gray.800"
|
|
},
|
|
borderColor: "inherit",
|
|
borderBottomColor: ra.reference
|
|
},
|
|
color: rt.reference
|
|
},
|
|
tablist: {
|
|
mb: "-1px",
|
|
borderBottom: "1px solid",
|
|
borderColor: "inherit"
|
|
}
|
|
};
|
|
}), E5 = un((e) => {
|
|
const { colorScheme: t } = e;
|
|
return {
|
|
tab: {
|
|
border: "1px solid",
|
|
borderColor: "inherit",
|
|
[Ot.variable]: "colors.gray.50",
|
|
_dark: {
|
|
[Ot.variable]: "colors.whiteAlpha.50"
|
|
},
|
|
mb: "-1px",
|
|
_notLast: {
|
|
marginEnd: "-1px"
|
|
},
|
|
_selected: {
|
|
[Ot.variable]: "colors.white",
|
|
[rt.variable]: `colors.${t}.600`,
|
|
_dark: {
|
|
[Ot.variable]: "colors.gray.800",
|
|
[rt.variable]: `colors.${t}.300`
|
|
},
|
|
borderColor: "inherit",
|
|
borderTopColor: "currentColor",
|
|
borderBottomColor: "transparent"
|
|
},
|
|
color: rt.reference,
|
|
bg: Ot.reference
|
|
},
|
|
tablist: {
|
|
mb: "-1px",
|
|
borderBottom: "1px solid",
|
|
borderColor: "inherit"
|
|
}
|
|
};
|
|
}), _5 = un((e) => {
|
|
const { colorScheme: t, theme: n } = e;
|
|
return {
|
|
tab: {
|
|
borderRadius: "full",
|
|
fontWeight: "semibold",
|
|
color: "gray.600",
|
|
_selected: {
|
|
color: Ye(n, `${t}.700`),
|
|
bg: Ye(n, `${t}.100`)
|
|
}
|
|
}
|
|
};
|
|
}), $5 = un((e) => {
|
|
const { colorScheme: t } = e;
|
|
return {
|
|
tab: {
|
|
borderRadius: "full",
|
|
fontWeight: "semibold",
|
|
[rt.variable]: "colors.gray.600",
|
|
_dark: {
|
|
[rt.variable]: "inherit"
|
|
},
|
|
_selected: {
|
|
[rt.variable]: "colors.white",
|
|
[Ot.variable]: `colors.${t}.600`,
|
|
_dark: {
|
|
[rt.variable]: "colors.gray.800",
|
|
[Ot.variable]: `colors.${t}.300`
|
|
}
|
|
},
|
|
color: rt.reference,
|
|
bg: Ot.reference
|
|
}
|
|
};
|
|
}), A5 = un({}), R5 = {
|
|
line: T5,
|
|
enclosed: P5,
|
|
"enclosed-colored": E5,
|
|
"soft-rounded": _5,
|
|
"solid-rounded": $5,
|
|
unstyled: A5
|
|
}, z5 = v5({
|
|
baseStyle: k5,
|
|
sizes: C5,
|
|
variants: R5,
|
|
defaultProps: {
|
|
size: "md",
|
|
variant: "line",
|
|
colorScheme: "blue"
|
|
}
|
|
}), { defineMultiStyleConfig: M5, definePartsStyle: Tr } = ae(C2.keys), lg = j("tag-bg"), ug = j("tag-color"), xc = j("tag-shadow"), $a = j("tag-min-height"), Aa = j("tag-min-width"), Ra = j("tag-font-size"), za = j("tag-padding-inline"), D5 = {
|
|
fontWeight: "medium",
|
|
lineHeight: 1.2,
|
|
outline: 0,
|
|
[ug.variable]: we.color.reference,
|
|
[lg.variable]: we.bg.reference,
|
|
[xc.variable]: we.shadow.reference,
|
|
color: ug.reference,
|
|
bg: lg.reference,
|
|
boxShadow: xc.reference,
|
|
borderRadius: "md",
|
|
minH: $a.reference,
|
|
minW: Aa.reference,
|
|
fontSize: Ra.reference,
|
|
px: za.reference,
|
|
_focusVisible: {
|
|
[xc.variable]: "shadows.outline"
|
|
}
|
|
}, I5 = {
|
|
lineHeight: 1.2,
|
|
overflow: "visible"
|
|
}, L5 = {
|
|
fontSize: "lg",
|
|
w: "5",
|
|
h: "5",
|
|
transitionProperty: "common",
|
|
transitionDuration: "normal",
|
|
borderRadius: "full",
|
|
marginStart: "1.5",
|
|
marginEnd: "-1",
|
|
opacity: 0.5,
|
|
_disabled: {
|
|
opacity: 0.4
|
|
},
|
|
_focusVisible: {
|
|
boxShadow: "outline",
|
|
bg: "rgba(0, 0, 0, 0.14)"
|
|
},
|
|
_hover: {
|
|
opacity: 0.8
|
|
},
|
|
_active: {
|
|
opacity: 1
|
|
}
|
|
}, V5 = Tr({
|
|
container: D5,
|
|
label: I5,
|
|
closeButton: L5
|
|
}), B5 = {
|
|
sm: Tr({
|
|
container: {
|
|
[$a.variable]: "sizes.5",
|
|
[Aa.variable]: "sizes.5",
|
|
[Ra.variable]: "fontSizes.xs",
|
|
[za.variable]: "space.2"
|
|
},
|
|
closeButton: {
|
|
marginEnd: "-2px",
|
|
marginStart: "0.35rem"
|
|
}
|
|
}),
|
|
md: Tr({
|
|
container: {
|
|
[$a.variable]: "sizes.6",
|
|
[Aa.variable]: "sizes.6",
|
|
[Ra.variable]: "fontSizes.sm",
|
|
[za.variable]: "space.2"
|
|
}
|
|
}),
|
|
lg: Tr({
|
|
container: {
|
|
[$a.variable]: "sizes.8",
|
|
[Aa.variable]: "sizes.8",
|
|
[Ra.variable]: "fontSizes.md",
|
|
[za.variable]: "space.3"
|
|
}
|
|
})
|
|
}, F5 = {
|
|
subtle: Tr((e) => ({
|
|
container: Ai.variants?.subtle(e)
|
|
})),
|
|
solid: Tr((e) => ({
|
|
container: Ai.variants?.solid(e)
|
|
})),
|
|
outline: Tr((e) => ({
|
|
container: Ai.variants?.outline(e)
|
|
}))
|
|
}, j5 = M5({
|
|
variants: F5,
|
|
baseStyle: V5,
|
|
sizes: B5,
|
|
defaultProps: {
|
|
size: "md",
|
|
variant: "subtle",
|
|
colorScheme: "gray"
|
|
}
|
|
}), O5 = {
|
|
...q.baseStyle?.field,
|
|
paddingY: "2",
|
|
minHeight: "20",
|
|
lineHeight: "short",
|
|
verticalAlign: "top"
|
|
}, N5 = {
|
|
outline: (e) => q.variants?.outline(e).field ?? {},
|
|
flushed: (e) => q.variants?.flushed(e).field ?? {},
|
|
filled: (e) => q.variants?.filled(e).field ?? {},
|
|
unstyled: q.variants?.unstyled.field ?? {}
|
|
}, W5 = {
|
|
xs: q.sizes?.xs.field ?? {},
|
|
sm: q.sizes?.sm.field ?? {},
|
|
md: q.sizes?.md.field ?? {},
|
|
lg: q.sizes?.lg.field ?? {}
|
|
}, U5 = {
|
|
baseStyle: O5,
|
|
sizes: W5,
|
|
variants: N5,
|
|
defaultProps: {
|
|
size: "md",
|
|
variant: "outline"
|
|
}
|
|
}, oa = Ae("tooltip-bg"), wc = Ae("tooltip-fg"), H5 = Ae("popper-arrow-bg"), K5 = {
|
|
bg: oa.reference,
|
|
color: wc.reference,
|
|
[oa.variable]: "colors.gray.700",
|
|
[wc.variable]: "colors.whiteAlpha.900",
|
|
_dark: {
|
|
[oa.variable]: "colors.gray.300",
|
|
[wc.variable]: "colors.gray.900"
|
|
},
|
|
[H5.variable]: oa.reference,
|
|
px: "2",
|
|
py: "0.5",
|
|
borderRadius: "sm",
|
|
fontWeight: "medium",
|
|
fontSize: "sm",
|
|
boxShadow: "md",
|
|
maxW: "xs",
|
|
zIndex: "tooltip"
|
|
}, G5 = {
|
|
baseStyle: K5
|
|
}, X5 = {
|
|
Accordion: M2,
|
|
Alert: gP,
|
|
Avatar: EP,
|
|
Badge: Ai,
|
|
Breadcrumb: VP,
|
|
Button: KP,
|
|
Checkbox: Sl,
|
|
CloseButton: aE,
|
|
Code: dE,
|
|
Container: hE,
|
|
Divider: vE,
|
|
Drawer: $E,
|
|
Editable: LE,
|
|
Form: NE,
|
|
FormError: XE,
|
|
FormLabel: QE,
|
|
Heading: JE,
|
|
Input: q,
|
|
Kbd: u_,
|
|
Link: d_,
|
|
List: g_,
|
|
Menu: E_,
|
|
Modal: B_,
|
|
NumberInput: G_,
|
|
PinInput: q_,
|
|
Popover: l$,
|
|
Progress: g$,
|
|
Radio: x$,
|
|
Select: _$,
|
|
Skeleton: A$,
|
|
SkipLink: z$,
|
|
Slider: W$,
|
|
Spinner: K$,
|
|
Stat: e5,
|
|
Switch: c5,
|
|
Table: y5,
|
|
Tabs: z5,
|
|
Tag: j5,
|
|
Textarea: U5,
|
|
Tooltip: G5,
|
|
Card: qP,
|
|
Stepper: r5
|
|
}, Y5 = {
|
|
none: 0,
|
|
"1px": "1px solid",
|
|
"2px": "2px solid",
|
|
"4px": "4px solid",
|
|
"8px": "8px solid"
|
|
}, Q5 = {
|
|
base: "0em",
|
|
sm: "30em",
|
|
md: "48em",
|
|
lg: "62em",
|
|
xl: "80em",
|
|
"2xl": "96em"
|
|
}, q5 = {
|
|
transparent: "transparent",
|
|
current: "currentColor",
|
|
black: "#000000",
|
|
white: "#FFFFFF",
|
|
whiteAlpha: {
|
|
50: "rgba(255, 255, 255, 0.04)",
|
|
100: "rgba(255, 255, 255, 0.06)",
|
|
200: "rgba(255, 255, 255, 0.08)",
|
|
300: "rgba(255, 255, 255, 0.16)",
|
|
400: "rgba(255, 255, 255, 0.24)",
|
|
500: "rgba(255, 255, 255, 0.36)",
|
|
600: "rgba(255, 255, 255, 0.48)",
|
|
700: "rgba(255, 255, 255, 0.64)",
|
|
800: "rgba(255, 255, 255, 0.80)",
|
|
900: "rgba(255, 255, 255, 0.92)"
|
|
},
|
|
blackAlpha: {
|
|
50: "rgba(0, 0, 0, 0.04)",
|
|
100: "rgba(0, 0, 0, 0.06)",
|
|
200: "rgba(0, 0, 0, 0.08)",
|
|
300: "rgba(0, 0, 0, 0.16)",
|
|
400: "rgba(0, 0, 0, 0.24)",
|
|
500: "rgba(0, 0, 0, 0.36)",
|
|
600: "rgba(0, 0, 0, 0.48)",
|
|
700: "rgba(0, 0, 0, 0.64)",
|
|
800: "rgba(0, 0, 0, 0.80)",
|
|
900: "rgba(0, 0, 0, 0.92)"
|
|
},
|
|
gray: {
|
|
50: "#F7FAFC",
|
|
100: "#EDF2F7",
|
|
200: "#E2E8F0",
|
|
300: "#CBD5E0",
|
|
400: "#A0AEC0",
|
|
500: "#718096",
|
|
600: "#4A5568",
|
|
700: "#2D3748",
|
|
800: "#1A202C",
|
|
900: "#171923"
|
|
},
|
|
red: {
|
|
50: "#FFF5F5",
|
|
100: "#FED7D7",
|
|
200: "#FEB2B2",
|
|
300: "#FC8181",
|
|
400: "#F56565",
|
|
500: "#E53E3E",
|
|
600: "#C53030",
|
|
700: "#9B2C2C",
|
|
800: "#822727",
|
|
900: "#63171B"
|
|
},
|
|
orange: {
|
|
50: "#FFFAF0",
|
|
100: "#FEEBC8",
|
|
200: "#FBD38D",
|
|
300: "#F6AD55",
|
|
400: "#ED8936",
|
|
500: "#DD6B20",
|
|
600: "#C05621",
|
|
700: "#9C4221",
|
|
800: "#7B341E",
|
|
900: "#652B19"
|
|
},
|
|
yellow: {
|
|
50: "#FFFFF0",
|
|
100: "#FEFCBF",
|
|
200: "#FAF089",
|
|
300: "#F6E05E",
|
|
400: "#ECC94B",
|
|
500: "#D69E2E",
|
|
600: "#B7791F",
|
|
700: "#975A16",
|
|
800: "#744210",
|
|
900: "#5F370E"
|
|
},
|
|
green: {
|
|
50: "#F0FFF4",
|
|
100: "#C6F6D5",
|
|
200: "#9AE6B4",
|
|
300: "#68D391",
|
|
400: "#48BB78",
|
|
500: "#38A169",
|
|
600: "#2F855A",
|
|
700: "#276749",
|
|
800: "#22543D",
|
|
900: "#1C4532"
|
|
},
|
|
teal: {
|
|
50: "#E6FFFA",
|
|
100: "#B2F5EA",
|
|
200: "#81E6D9",
|
|
300: "#4FD1C5",
|
|
400: "#38B2AC",
|
|
500: "#319795",
|
|
600: "#2C7A7B",
|
|
700: "#285E61",
|
|
800: "#234E52",
|
|
900: "#1D4044"
|
|
},
|
|
blue: {
|
|
50: "#ebf8ff",
|
|
100: "#bee3f8",
|
|
200: "#90cdf4",
|
|
300: "#63b3ed",
|
|
400: "#4299e1",
|
|
500: "#3182ce",
|
|
600: "#2b6cb0",
|
|
700: "#2c5282",
|
|
800: "#2a4365",
|
|
900: "#1A365D"
|
|
},
|
|
cyan: {
|
|
50: "#EDFDFD",
|
|
100: "#C4F1F9",
|
|
200: "#9DECF9",
|
|
300: "#76E4F7",
|
|
400: "#0BC5EA",
|
|
500: "#00B5D8",
|
|
600: "#00A3C4",
|
|
700: "#0987A0",
|
|
800: "#086F83",
|
|
900: "#065666"
|
|
},
|
|
purple: {
|
|
50: "#FAF5FF",
|
|
100: "#E9D8FD",
|
|
200: "#D6BCFA",
|
|
300: "#B794F4",
|
|
400: "#9F7AEA",
|
|
500: "#805AD5",
|
|
600: "#6B46C1",
|
|
700: "#553C9A",
|
|
800: "#44337A",
|
|
900: "#322659"
|
|
},
|
|
pink: {
|
|
50: "#FFF5F7",
|
|
100: "#FED7E2",
|
|
200: "#FBB6CE",
|
|
300: "#F687B3",
|
|
400: "#ED64A6",
|
|
500: "#D53F8C",
|
|
600: "#B83280",
|
|
700: "#97266D",
|
|
800: "#702459",
|
|
900: "#521B41"
|
|
}
|
|
}, Z5 = {
|
|
none: "0",
|
|
sm: "0.125rem",
|
|
base: "0.25rem",
|
|
md: "0.375rem",
|
|
lg: "0.5rem",
|
|
xl: "0.75rem",
|
|
"2xl": "1rem",
|
|
"3xl": "1.5rem",
|
|
full: "9999px"
|
|
}, J5 = {
|
|
xs: "0 0 0 1px rgba(0, 0, 0, 0.05)",
|
|
sm: "0 1px 2px 0 rgba(0, 0, 0, 0.05)",
|
|
base: "0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06)",
|
|
md: "0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)",
|
|
lg: "0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)",
|
|
xl: "0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04)",
|
|
"2xl": "0 25px 50px -12px rgba(0, 0, 0, 0.25)",
|
|
outline: "0 0 0 3px rgba(66, 153, 225, 0.6)",
|
|
inner: "inset 0 2px 4px 0 rgba(0,0,0,0.06)",
|
|
none: "none",
|
|
"dark-lg": "rgba(0, 0, 0, 0.1) 0px 0px 0px 1px, rgba(0, 0, 0, 0.2) 0px 5px 10px, rgba(0, 0, 0, 0.4) 0px 15px 40px"
|
|
}, eA = {
|
|
common: "background-color, border-color, color, fill, stroke, opacity, box-shadow, transform",
|
|
colors: "background-color, border-color, color, fill, stroke",
|
|
dimensions: "width, height",
|
|
position: "left, right, top, bottom",
|
|
background: "background-color, background-image, background-position"
|
|
}, tA = {
|
|
"ease-in": "cubic-bezier(0.4, 0, 1, 1)",
|
|
"ease-out": "cubic-bezier(0, 0, 0.2, 1)",
|
|
"ease-in-out": "cubic-bezier(0.4, 0, 0.2, 1)"
|
|
}, nA = {
|
|
"ultra-fast": "50ms",
|
|
faster: "100ms",
|
|
fast: "150ms",
|
|
normal: "200ms",
|
|
slow: "300ms",
|
|
slower: "400ms",
|
|
"ultra-slow": "500ms"
|
|
}, rA = {
|
|
property: eA,
|
|
easing: tA,
|
|
duration: nA
|
|
}, oA = {
|
|
hide: -1,
|
|
auto: "auto",
|
|
base: 0,
|
|
docked: 10,
|
|
dropdown: 1e3,
|
|
sticky: 1100,
|
|
banner: 1200,
|
|
overlay: 1300,
|
|
modal: 1400,
|
|
popover: 1500,
|
|
skipLink: 1600,
|
|
toast: 1700,
|
|
tooltip: 1800
|
|
}, iA = {
|
|
none: 0,
|
|
sm: "4px",
|
|
base: "8px",
|
|
md: "12px",
|
|
lg: "16px",
|
|
xl: "24px",
|
|
"2xl": "40px",
|
|
"3xl": "64px"
|
|
}, sA = {
|
|
breakpoints: Q5,
|
|
zIndices: oA,
|
|
radii: Z5,
|
|
blur: iA,
|
|
colors: q5,
|
|
...x1,
|
|
sizes: m1,
|
|
shadows: J5,
|
|
space: p1,
|
|
borders: Y5,
|
|
transition: rA
|
|
}, aA = {
|
|
colors: {
|
|
"chakra-body-text": { _light: "gray.800", _dark: "whiteAlpha.900" },
|
|
"chakra-body-bg": { _light: "white", _dark: "gray.800" },
|
|
"chakra-border-color": { _light: "gray.200", _dark: "whiteAlpha.300" },
|
|
"chakra-inverse-text": { _light: "white", _dark: "gray.800" },
|
|
"chakra-subtle-bg": { _light: "gray.100", _dark: "gray.700" },
|
|
"chakra-subtle-text": { _light: "gray.600", _dark: "gray.400" },
|
|
"chakra-placeholder-color": { _light: "gray.500", _dark: "whiteAlpha.400" }
|
|
}
|
|
}, lA = {
|
|
global: {
|
|
body: {
|
|
fontFamily: "body",
|
|
color: "chakra-body-text",
|
|
bg: "chakra-body-bg",
|
|
transitionProperty: "background-color",
|
|
transitionDuration: "normal",
|
|
lineHeight: "base"
|
|
},
|
|
"*::placeholder": {
|
|
color: "chakra-placeholder-color"
|
|
},
|
|
"*, *::before, *::after": {
|
|
borderColor: "chakra-border-color"
|
|
}
|
|
}
|
|
}, uA = "ltr", cA = {
|
|
useSystemColorMode: !1,
|
|
initialColorMode: "light",
|
|
cssVarPrefix: "chakra"
|
|
}, dA = {
|
|
semanticTokens: aA,
|
|
direction: uA,
|
|
...sA,
|
|
components: X5,
|
|
styles: lA,
|
|
config: cA
|
|
};
|
|
function fA(e) {
|
|
if (e.sheet)
|
|
return e.sheet;
|
|
for (var t = 0; t < document.styleSheets.length; t++)
|
|
if (document.styleSheets[t].ownerNode === e)
|
|
return document.styleSheets[t];
|
|
}
|
|
function hA(e) {
|
|
var t = document.createElement("style");
|
|
return t.setAttribute("data-emotion", e.key), e.nonce !== void 0 && t.setAttribute("nonce", e.nonce), t.appendChild(document.createTextNode("")), t.setAttribute("data-s", ""), t;
|
|
}
|
|
var pA = /* @__PURE__ */ function() {
|
|
function e(n) {
|
|
var r = this;
|
|
this._insertTag = function(o) {
|
|
var i;
|
|
r.tags.length === 0 ? r.insertionPoint ? i = r.insertionPoint.nextSibling : r.prepend ? i = r.container.firstChild : i = r.before : i = r.tags[r.tags.length - 1].nextSibling, r.container.insertBefore(o, i), r.tags.push(o);
|
|
}, this.isSpeedy = n.speedy === void 0 ? !0 : n.speedy, this.tags = [], this.ctr = 0, this.nonce = n.nonce, this.key = n.key, this.container = n.container, this.prepend = n.prepend, this.insertionPoint = n.insertionPoint, this.before = null;
|
|
}
|
|
var t = e.prototype;
|
|
return t.hydrate = function(r) {
|
|
r.forEach(this._insertTag);
|
|
}, t.insert = function(r) {
|
|
this.ctr % (this.isSpeedy ? 65e3 : 1) === 0 && this._insertTag(hA(this));
|
|
var o = this.tags[this.tags.length - 1];
|
|
if (this.isSpeedy) {
|
|
var i = fA(o);
|
|
try {
|
|
i.insertRule(r, i.cssRules.length);
|
|
} catch {
|
|
}
|
|
} else
|
|
o.appendChild(document.createTextNode(r));
|
|
this.ctr++;
|
|
}, t.flush = function() {
|
|
this.tags.forEach(function(r) {
|
|
var o;
|
|
return (o = r.parentNode) == null ? void 0 : o.removeChild(r);
|
|
}), this.tags = [], this.ctr = 0;
|
|
}, e;
|
|
}(), Ue = "-ms-", xl = "-moz-", Y = "-webkit-", T1 = "comm", Ch = "rule", Th = "decl", mA = "@import", P1 = "@keyframes", gA = "@layer", yA = Math.abs, tu = String.fromCharCode, vA = Object.assign;
|
|
function SA(e, t) {
|
|
return Ve(e, 0) ^ 45 ? (((t << 2 ^ Ve(e, 0)) << 2 ^ Ve(e, 1)) << 2 ^ Ve(e, 2)) << 2 ^ Ve(e, 3) : 0;
|
|
}
|
|
function E1(e) {
|
|
return e.trim();
|
|
}
|
|
function bA(e, t) {
|
|
return (e = t.exec(e)) ? e[0] : e;
|
|
}
|
|
function Q(e, t, n) {
|
|
return e.replace(t, n);
|
|
}
|
|
function Ud(e, t) {
|
|
return e.indexOf(t);
|
|
}
|
|
function Ve(e, t) {
|
|
return e.charCodeAt(t) | 0;
|
|
}
|
|
function is(e, t, n) {
|
|
return e.slice(t, n);
|
|
}
|
|
function en(e) {
|
|
return e.length;
|
|
}
|
|
function Ph(e) {
|
|
return e.length;
|
|
}
|
|
function ia(e, t) {
|
|
return t.push(e), e;
|
|
}
|
|
function xA(e, t) {
|
|
return e.map(t).join("");
|
|
}
|
|
var nu = 1, Mo = 1, _1 = 0, ut = 0, Ce = 0, Oo = "";
|
|
function ru(e, t, n, r, o, i, s) {
|
|
return { value: e, root: t, parent: n, type: r, props: o, children: i, line: nu, column: Mo, length: s, return: "" };
|
|
}
|
|
function ai(e, t) {
|
|
return vA(ru("", null, null, "", null, null, 0), e, { length: -e.length }, t);
|
|
}
|
|
function wA() {
|
|
return Ce;
|
|
}
|
|
function kA() {
|
|
return Ce = ut > 0 ? Ve(Oo, --ut) : 0, Mo--, Ce === 10 && (Mo = 1, nu--), Ce;
|
|
}
|
|
function yt() {
|
|
return Ce = ut < _1 ? Ve(Oo, ut++) : 0, Mo++, Ce === 10 && (Mo = 1, nu++), Ce;
|
|
}
|
|
function cn() {
|
|
return Ve(Oo, ut);
|
|
}
|
|
function Ma() {
|
|
return ut;
|
|
}
|
|
function vs(e, t) {
|
|
return is(Oo, e, t);
|
|
}
|
|
function ss(e) {
|
|
switch (e) {
|
|
case 0:
|
|
case 9:
|
|
case 10:
|
|
case 13:
|
|
case 32:
|
|
return 5;
|
|
case 33:
|
|
case 43:
|
|
case 44:
|
|
case 47:
|
|
case 62:
|
|
case 64:
|
|
case 126:
|
|
case 59:
|
|
case 123:
|
|
case 125:
|
|
return 4;
|
|
case 58:
|
|
return 3;
|
|
case 34:
|
|
case 39:
|
|
case 40:
|
|
case 91:
|
|
return 2;
|
|
case 41:
|
|
case 93:
|
|
return 1;
|
|
}
|
|
return 0;
|
|
}
|
|
function $1(e) {
|
|
return nu = Mo = 1, _1 = en(Oo = e), ut = 0, [];
|
|
}
|
|
function A1(e) {
|
|
return Oo = "", e;
|
|
}
|
|
function Da(e) {
|
|
return E1(vs(ut - 1, Hd(e === 91 ? e + 2 : e === 40 ? e + 1 : e)));
|
|
}
|
|
function CA(e) {
|
|
for (; (Ce = cn()) && Ce < 33; )
|
|
yt();
|
|
return ss(e) > 2 || ss(Ce) > 3 ? "" : " ";
|
|
}
|
|
function TA(e, t) {
|
|
for (; --t && yt() && !(Ce < 48 || Ce > 102 || Ce > 57 && Ce < 65 || Ce > 70 && Ce < 97); )
|
|
;
|
|
return vs(e, Ma() + (t < 6 && cn() == 32 && yt() == 32));
|
|
}
|
|
function Hd(e) {
|
|
for (; yt(); )
|
|
switch (Ce) {
|
|
case e:
|
|
return ut;
|
|
case 34:
|
|
case 39:
|
|
e !== 34 && e !== 39 && Hd(Ce);
|
|
break;
|
|
case 40:
|
|
e === 41 && Hd(e);
|
|
break;
|
|
case 92:
|
|
yt();
|
|
break;
|
|
}
|
|
return ut;
|
|
}
|
|
function PA(e, t) {
|
|
for (; yt() && e + Ce !== 57; )
|
|
if (e + Ce === 84 && cn() === 47)
|
|
break;
|
|
return "/*" + vs(t, ut - 1) + "*" + tu(e === 47 ? e : yt());
|
|
}
|
|
function EA(e) {
|
|
for (; !ss(cn()); )
|
|
yt();
|
|
return vs(e, ut);
|
|
}
|
|
function _A(e) {
|
|
return A1(Ia("", null, null, null, [""], e = $1(e), 0, [0], e));
|
|
}
|
|
function Ia(e, t, n, r, o, i, s, a, l) {
|
|
for (var u = 0, c = 0, d = s, f = 0, y = 0, v = 0, S = 1, k = 1, p = 1, h = 0, g = "", w = o, E = i, _ = r, P = g; k; )
|
|
switch (v = h, h = yt()) {
|
|
case 40:
|
|
if (v != 108 && Ve(P, d - 1) == 58) {
|
|
Ud(P += Q(Da(h), "&", "&\f"), "&\f") != -1 && (p = -1);
|
|
break;
|
|
}
|
|
case 34:
|
|
case 39:
|
|
case 91:
|
|
P += Da(h);
|
|
break;
|
|
case 9:
|
|
case 10:
|
|
case 13:
|
|
case 32:
|
|
P += CA(v);
|
|
break;
|
|
case 92:
|
|
P += TA(Ma() - 1, 7);
|
|
continue;
|
|
case 47:
|
|
switch (cn()) {
|
|
case 42:
|
|
case 47:
|
|
ia($A(PA(yt(), Ma()), t, n), l);
|
|
break;
|
|
default:
|
|
P += "/";
|
|
}
|
|
break;
|
|
case 123 * S:
|
|
a[u++] = en(P) * p;
|
|
case 125 * S:
|
|
case 59:
|
|
case 0:
|
|
switch (h) {
|
|
case 0:
|
|
case 125:
|
|
k = 0;
|
|
case 59 + c:
|
|
p == -1 && (P = Q(P, /\f/g, "")), y > 0 && en(P) - d && ia(y > 32 ? dg(P + ";", r, n, d - 1) : dg(Q(P, " ", "") + ";", r, n, d - 2), l);
|
|
break;
|
|
case 59:
|
|
P += ";";
|
|
default:
|
|
if (ia(_ = cg(P, t, n, u, c, o, a, g, w = [], E = [], d), i), h === 123)
|
|
if (c === 0)
|
|
Ia(P, t, _, _, w, i, d, a, E);
|
|
else
|
|
switch (f === 99 && Ve(P, 3) === 110 ? 100 : f) {
|
|
case 100:
|
|
case 108:
|
|
case 109:
|
|
case 115:
|
|
Ia(e, _, _, r && ia(cg(e, _, _, 0, 0, o, a, g, o, w = [], d), E), o, E, d, a, r ? w : E);
|
|
break;
|
|
default:
|
|
Ia(P, _, _, _, [""], E, 0, a, E);
|
|
}
|
|
}
|
|
u = c = y = 0, S = p = 1, g = P = "", d = s;
|
|
break;
|
|
case 58:
|
|
d = 1 + en(P), y = v;
|
|
default:
|
|
if (S < 1) {
|
|
if (h == 123)
|
|
--S;
|
|
else if (h == 125 && S++ == 0 && kA() == 125)
|
|
continue;
|
|
}
|
|
switch (P += tu(h), h * S) {
|
|
case 38:
|
|
p = c > 0 ? 1 : (P += "\f", -1);
|
|
break;
|
|
case 44:
|
|
a[u++] = (en(P) - 1) * p, p = 1;
|
|
break;
|
|
case 64:
|
|
cn() === 45 && (P += Da(yt())), f = cn(), c = d = en(g = P += EA(Ma())), h++;
|
|
break;
|
|
case 45:
|
|
v === 45 && en(P) == 2 && (S = 0);
|
|
}
|
|
}
|
|
return i;
|
|
}
|
|
function cg(e, t, n, r, o, i, s, a, l, u, c) {
|
|
for (var d = o - 1, f = o === 0 ? i : [""], y = Ph(f), v = 0, S = 0, k = 0; v < r; ++v)
|
|
for (var p = 0, h = is(e, d + 1, d = yA(S = s[v])), g = e; p < y; ++p)
|
|
(g = E1(S > 0 ? f[p] + " " + h : Q(h, /&\f/g, f[p]))) && (l[k++] = g);
|
|
return ru(e, t, n, o === 0 ? Ch : a, l, u, c);
|
|
}
|
|
function $A(e, t, n) {
|
|
return ru(e, t, n, T1, tu(wA()), is(e, 2, -2), 0);
|
|
}
|
|
function dg(e, t, n, r) {
|
|
return ru(e, t, n, Th, is(e, 0, r), is(e, r + 1, -1), r);
|
|
}
|
|
function ko(e, t) {
|
|
for (var n = "", r = Ph(e), o = 0; o < r; o++)
|
|
n += t(e[o], o, e, t) || "";
|
|
return n;
|
|
}
|
|
function AA(e, t, n, r) {
|
|
switch (e.type) {
|
|
case gA:
|
|
if (e.children.length) break;
|
|
case mA:
|
|
case Th:
|
|
return e.return = e.return || e.value;
|
|
case T1:
|
|
return "";
|
|
case P1:
|
|
return e.return = e.value + "{" + ko(e.children, r) + "}";
|
|
case Ch:
|
|
e.value = e.props.join(",");
|
|
}
|
|
return en(n = ko(e.children, r)) ? e.return = e.value + "{" + n + "}" : "";
|
|
}
|
|
function RA(e) {
|
|
var t = Ph(e);
|
|
return function(n, r, o, i) {
|
|
for (var s = "", a = 0; a < t; a++)
|
|
s += e[a](n, r, o, i) || "";
|
|
return s;
|
|
};
|
|
}
|
|
function zA(e) {
|
|
return function(t) {
|
|
t.root || (t = t.return) && e(t);
|
|
};
|
|
}
|
|
var fg = function(t) {
|
|
var n = /* @__PURE__ */ new WeakMap();
|
|
return function(r) {
|
|
if (n.has(r))
|
|
return n.get(r);
|
|
var o = t(r);
|
|
return n.set(r, o), o;
|
|
};
|
|
};
|
|
function R1(e) {
|
|
var t = /* @__PURE__ */ Object.create(null);
|
|
return function(n) {
|
|
return t[n] === void 0 && (t[n] = e(n)), t[n];
|
|
};
|
|
}
|
|
var MA = function(t, n, r) {
|
|
for (var o = 0, i = 0; o = i, i = cn(), o === 38 && i === 12 && (n[r] = 1), !ss(i); )
|
|
yt();
|
|
return vs(t, ut);
|
|
}, DA = function(t, n) {
|
|
var r = -1, o = 44;
|
|
do
|
|
switch (ss(o)) {
|
|
case 0:
|
|
o === 38 && cn() === 12 && (n[r] = 1), t[r] += MA(ut - 1, n, r);
|
|
break;
|
|
case 2:
|
|
t[r] += Da(o);
|
|
break;
|
|
case 4:
|
|
if (o === 44) {
|
|
t[++r] = cn() === 58 ? "&\f" : "", n[r] = t[r].length;
|
|
break;
|
|
}
|
|
default:
|
|
t[r] += tu(o);
|
|
}
|
|
while (o = yt());
|
|
return t;
|
|
}, IA = function(t, n) {
|
|
return A1(DA($1(t), n));
|
|
}, hg = /* @__PURE__ */ new WeakMap(), LA = function(t) {
|
|
if (!(t.type !== "rule" || !t.parent || // positive .length indicates that this rule contains pseudo
|
|
// negative .length indicates that this rule has been already prefixed
|
|
t.length < 1)) {
|
|
for (var n = t.value, r = t.parent, o = t.column === r.column && t.line === r.line; r.type !== "rule"; )
|
|
if (r = r.parent, !r) return;
|
|
if (!(t.props.length === 1 && n.charCodeAt(0) !== 58 && !hg.get(r)) && !o) {
|
|
hg.set(t, !0);
|
|
for (var i = [], s = IA(n, i), a = r.props, l = 0, u = 0; l < s.length; l++)
|
|
for (var c = 0; c < a.length; c++, u++)
|
|
t.props[u] = i[l] ? s[l].replace(/&\f/g, a[c]) : a[c] + " " + s[l];
|
|
}
|
|
}
|
|
}, VA = function(t) {
|
|
if (t.type === "decl") {
|
|
var n = t.value;
|
|
// charcode for l
|
|
n.charCodeAt(0) === 108 && // charcode for b
|
|
n.charCodeAt(2) === 98 && (t.return = "", t.value = "");
|
|
}
|
|
};
|
|
function z1(e, t) {
|
|
switch (SA(e, t)) {
|
|
case 5103:
|
|
return Y + "print-" + e + e;
|
|
case 5737:
|
|
case 4201:
|
|
case 3177:
|
|
case 3433:
|
|
case 1641:
|
|
case 4457:
|
|
case 2921:
|
|
case 5572:
|
|
case 6356:
|
|
case 5844:
|
|
case 3191:
|
|
case 6645:
|
|
case 3005:
|
|
case 6391:
|
|
case 5879:
|
|
case 5623:
|
|
case 6135:
|
|
case 4599:
|
|
case 4855:
|
|
case 4215:
|
|
case 6389:
|
|
case 5109:
|
|
case 5365:
|
|
case 5621:
|
|
case 3829:
|
|
return Y + e + e;
|
|
case 5349:
|
|
case 4246:
|
|
case 4810:
|
|
case 6968:
|
|
case 2756:
|
|
return Y + e + xl + e + Ue + e + e;
|
|
case 6828:
|
|
case 4268:
|
|
return Y + e + Ue + e + e;
|
|
case 6165:
|
|
return Y + e + Ue + "flex-" + e + e;
|
|
case 5187:
|
|
return Y + e + Q(e, /(\w+).+(:[^]+)/, Y + "box-$1$2" + Ue + "flex-$1$2") + e;
|
|
case 5443:
|
|
return Y + e + Ue + "flex-item-" + Q(e, /flex-|-self/, "") + e;
|
|
case 4675:
|
|
return Y + e + Ue + "flex-line-pack" + Q(e, /align-content|flex-|-self/, "") + e;
|
|
case 5548:
|
|
return Y + e + Ue + Q(e, "shrink", "negative") + e;
|
|
case 5292:
|
|
return Y + e + Ue + Q(e, "basis", "preferred-size") + e;
|
|
case 6060:
|
|
return Y + "box-" + Q(e, "-grow", "") + Y + e + Ue + Q(e, "grow", "positive") + e;
|
|
case 4554:
|
|
return Y + Q(e, /([^-])(transform)/g, "$1" + Y + "$2") + e;
|
|
case 6187:
|
|
return Q(Q(Q(e, /(zoom-|grab)/, Y + "$1"), /(image-set)/, Y + "$1"), e, "") + e;
|
|
case 5495:
|
|
case 3959:
|
|
return Q(e, /(image-set\([^]*)/, Y + "$1$`$1");
|
|
case 4968:
|
|
return Q(Q(e, /(.+:)(flex-)?(.*)/, Y + "box-pack:$3" + Ue + "flex-pack:$3"), /s.+-b[^;]+/, "justify") + Y + e + e;
|
|
case 4095:
|
|
case 3583:
|
|
case 4068:
|
|
case 2532:
|
|
return Q(e, /(.+)-inline(.+)/, Y + "$1$2") + e;
|
|
case 8116:
|
|
case 7059:
|
|
case 5753:
|
|
case 5535:
|
|
case 5445:
|
|
case 5701:
|
|
case 4933:
|
|
case 4677:
|
|
case 5533:
|
|
case 5789:
|
|
case 5021:
|
|
case 4765:
|
|
if (en(e) - 1 - t > 6) switch (Ve(e, t + 1)) {
|
|
case 109:
|
|
if (Ve(e, t + 4) !== 45) break;
|
|
case 102:
|
|
return Q(e, /(.+:)(.+)-([^]+)/, "$1" + Y + "$2-$3$1" + xl + (Ve(e, t + 3) == 108 ? "$3" : "$2-$3")) + e;
|
|
case 115:
|
|
return ~Ud(e, "stretch") ? z1(Q(e, "stretch", "fill-available"), t) + e : e;
|
|
}
|
|
break;
|
|
case 4949:
|
|
if (Ve(e, t + 1) !== 115) break;
|
|
case 6444:
|
|
switch (Ve(e, en(e) - 3 - (~Ud(e, "!important") && 10))) {
|
|
case 107:
|
|
return Q(e, ":", ":" + Y) + e;
|
|
case 101:
|
|
return Q(e, /(.+:)([^;!]+)(;|!.+)?/, "$1" + Y + (Ve(e, 14) === 45 ? "inline-" : "") + "box$3$1" + Y + "$2$3$1" + Ue + "$2box$3") + e;
|
|
}
|
|
break;
|
|
case 5936:
|
|
switch (Ve(e, t + 11)) {
|
|
case 114:
|
|
return Y + e + Ue + Q(e, /[svh]\w+-[tblr]{2}/, "tb") + e;
|
|
case 108:
|
|
return Y + e + Ue + Q(e, /[svh]\w+-[tblr]{2}/, "tb-rl") + e;
|
|
case 45:
|
|
return Y + e + Ue + Q(e, /[svh]\w+-[tblr]{2}/, "lr") + e;
|
|
}
|
|
return Y + e + Ue + e + e;
|
|
}
|
|
return e;
|
|
}
|
|
var BA = function(t, n, r, o) {
|
|
if (t.length > -1 && !t.return) switch (t.type) {
|
|
case Th:
|
|
t.return = z1(t.value, t.length);
|
|
break;
|
|
case P1:
|
|
return ko([ai(t, {
|
|
value: Q(t.value, "@", "@" + Y)
|
|
})], o);
|
|
case Ch:
|
|
if (t.length) return xA(t.props, function(i) {
|
|
switch (bA(i, /(::plac\w+|:read-\w+)/)) {
|
|
case ":read-only":
|
|
case ":read-write":
|
|
return ko([ai(t, {
|
|
props: [Q(i, /:(read-\w+)/, ":" + xl + "$1")]
|
|
})], o);
|
|
case "::placeholder":
|
|
return ko([ai(t, {
|
|
props: [Q(i, /:(plac\w+)/, ":" + Y + "input-$1")]
|
|
}), ai(t, {
|
|
props: [Q(i, /:(plac\w+)/, ":" + xl + "$1")]
|
|
}), ai(t, {
|
|
props: [Q(i, /:(plac\w+)/, Ue + "input-$1")]
|
|
})], o);
|
|
}
|
|
return "";
|
|
});
|
|
}
|
|
}, FA = [BA], jA = function(t) {
|
|
var n = t.key;
|
|
if (n === "css") {
|
|
var r = document.querySelectorAll("style[data-emotion]:not([data-s])");
|
|
Array.prototype.forEach.call(r, function(S) {
|
|
var k = S.getAttribute("data-emotion");
|
|
k.indexOf(" ") !== -1 && (document.head.appendChild(S), S.setAttribute("data-s", ""));
|
|
});
|
|
}
|
|
var o = t.stylisPlugins || FA, i = {}, s, a = [];
|
|
s = t.container || document.head, Array.prototype.forEach.call(
|
|
// this means we will ignore elements which don't have a space in them which
|
|
// means that the style elements we're looking at are only Emotion 11 server-rendered style elements
|
|
document.querySelectorAll('style[data-emotion^="' + n + ' "]'),
|
|
function(S) {
|
|
for (var k = S.getAttribute("data-emotion").split(" "), p = 1; p < k.length; p++)
|
|
i[k[p]] = !0;
|
|
a.push(S);
|
|
}
|
|
);
|
|
var l, u = [LA, VA];
|
|
{
|
|
var c, d = [AA, zA(function(S) {
|
|
c.insert(S);
|
|
})], f = RA(u.concat(o, d)), y = function(k) {
|
|
return ko(_A(k), f);
|
|
};
|
|
l = function(k, p, h, g) {
|
|
c = h, y(k ? k + "{" + p.styles + "}" : p.styles), g && (v.inserted[p.name] = !0);
|
|
};
|
|
}
|
|
var v = {
|
|
key: n,
|
|
sheet: new pA({
|
|
key: n,
|
|
container: s,
|
|
nonce: t.nonce,
|
|
speedy: t.speedy,
|
|
prepend: t.prepend,
|
|
insertionPoint: t.insertionPoint
|
|
}),
|
|
nonce: t.nonce,
|
|
inserted: i,
|
|
registered: {},
|
|
insert: l
|
|
};
|
|
return v.sheet.hydrate(a), v;
|
|
};
|
|
function wl() {
|
|
return wl = Object.assign ? Object.assign.bind() : function(e) {
|
|
for (var t = 1; t < arguments.length; t++) {
|
|
var n = arguments[t];
|
|
for (var r in n) ({}).hasOwnProperty.call(n, r) && (e[r] = n[r]);
|
|
}
|
|
return e;
|
|
}, wl.apply(null, arguments);
|
|
}
|
|
var M1 = { exports: {} }, ne = {};
|
|
/** @license React v16.13.1
|
|
* react-is.production.min.js
|
|
*
|
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
*
|
|
* This source code is licensed under the MIT license found in the
|
|
* LICENSE file in the root directory of this source tree.
|
|
*/
|
|
var Me = typeof Symbol == "function" && Symbol.for, Eh = Me ? Symbol.for("react.element") : 60103, _h = Me ? Symbol.for("react.portal") : 60106, ou = Me ? Symbol.for("react.fragment") : 60107, iu = Me ? Symbol.for("react.strict_mode") : 60108, su = Me ? Symbol.for("react.profiler") : 60114, au = Me ? Symbol.for("react.provider") : 60109, lu = Me ? Symbol.for("react.context") : 60110, $h = Me ? Symbol.for("react.async_mode") : 60111, uu = Me ? Symbol.for("react.concurrent_mode") : 60111, cu = Me ? Symbol.for("react.forward_ref") : 60112, du = Me ? Symbol.for("react.suspense") : 60113, OA = Me ? Symbol.for("react.suspense_list") : 60120, fu = Me ? Symbol.for("react.memo") : 60115, hu = Me ? Symbol.for("react.lazy") : 60116, NA = Me ? Symbol.for("react.block") : 60121, WA = Me ? Symbol.for("react.fundamental") : 60117, UA = Me ? Symbol.for("react.responder") : 60118, HA = Me ? Symbol.for("react.scope") : 60119;
|
|
function xt(e) {
|
|
if (typeof e == "object" && e !== null) {
|
|
var t = e.$$typeof;
|
|
switch (t) {
|
|
case Eh:
|
|
switch (e = e.type, e) {
|
|
case $h:
|
|
case uu:
|
|
case ou:
|
|
case su:
|
|
case iu:
|
|
case du:
|
|
return e;
|
|
default:
|
|
switch (e = e && e.$$typeof, e) {
|
|
case lu:
|
|
case cu:
|
|
case hu:
|
|
case fu:
|
|
case au:
|
|
return e;
|
|
default:
|
|
return t;
|
|
}
|
|
}
|
|
case _h:
|
|
return t;
|
|
}
|
|
}
|
|
}
|
|
function D1(e) {
|
|
return xt(e) === uu;
|
|
}
|
|
ne.AsyncMode = $h;
|
|
ne.ConcurrentMode = uu;
|
|
ne.ContextConsumer = lu;
|
|
ne.ContextProvider = au;
|
|
ne.Element = Eh;
|
|
ne.ForwardRef = cu;
|
|
ne.Fragment = ou;
|
|
ne.Lazy = hu;
|
|
ne.Memo = fu;
|
|
ne.Portal = _h;
|
|
ne.Profiler = su;
|
|
ne.StrictMode = iu;
|
|
ne.Suspense = du;
|
|
ne.isAsyncMode = function(e) {
|
|
return D1(e) || xt(e) === $h;
|
|
};
|
|
ne.isConcurrentMode = D1;
|
|
ne.isContextConsumer = function(e) {
|
|
return xt(e) === lu;
|
|
};
|
|
ne.isContextProvider = function(e) {
|
|
return xt(e) === au;
|
|
};
|
|
ne.isElement = function(e) {
|
|
return typeof e == "object" && e !== null && e.$$typeof === Eh;
|
|
};
|
|
ne.isForwardRef = function(e) {
|
|
return xt(e) === cu;
|
|
};
|
|
ne.isFragment = function(e) {
|
|
return xt(e) === ou;
|
|
};
|
|
ne.isLazy = function(e) {
|
|
return xt(e) === hu;
|
|
};
|
|
ne.isMemo = function(e) {
|
|
return xt(e) === fu;
|
|
};
|
|
ne.isPortal = function(e) {
|
|
return xt(e) === _h;
|
|
};
|
|
ne.isProfiler = function(e) {
|
|
return xt(e) === su;
|
|
};
|
|
ne.isStrictMode = function(e) {
|
|
return xt(e) === iu;
|
|
};
|
|
ne.isSuspense = function(e) {
|
|
return xt(e) === du;
|
|
};
|
|
ne.isValidElementType = function(e) {
|
|
return typeof e == "string" || typeof e == "function" || e === ou || e === uu || e === su || e === iu || e === du || e === OA || typeof e == "object" && e !== null && (e.$$typeof === hu || e.$$typeof === fu || e.$$typeof === au || e.$$typeof === lu || e.$$typeof === cu || e.$$typeof === WA || e.$$typeof === UA || e.$$typeof === HA || e.$$typeof === NA);
|
|
};
|
|
ne.typeOf = xt;
|
|
M1.exports = ne;
|
|
var KA = M1.exports, I1 = KA, GA = {
|
|
$$typeof: !0,
|
|
render: !0,
|
|
defaultProps: !0,
|
|
displayName: !0,
|
|
propTypes: !0
|
|
}, XA = {
|
|
$$typeof: !0,
|
|
compare: !0,
|
|
defaultProps: !0,
|
|
displayName: !0,
|
|
propTypes: !0,
|
|
type: !0
|
|
}, L1 = {};
|
|
L1[I1.ForwardRef] = GA;
|
|
L1[I1.Memo] = XA;
|
|
var YA = !0;
|
|
function V1(e, t, n) {
|
|
var r = "";
|
|
return n.split(" ").forEach(function(o) {
|
|
e[o] !== void 0 ? t.push(e[o] + ";") : o && (r += o + " ");
|
|
}), r;
|
|
}
|
|
var Ah = function(t, n, r) {
|
|
var o = t.key + "-" + n.name;
|
|
// we only need to add the styles to the registered cache if the
|
|
// class name could be used further down
|
|
// the tree but if it's a string tag, we know it won't
|
|
// so we don't have to add it to registered cache.
|
|
// this improves memory usage since we can avoid storing the whole style string
|
|
(r === !1 || // we need to always store it if we're in compat mode and
|
|
// in node since emotion-server relies on whether a style is in
|
|
// the registered cache to know whether a style is global or not
|
|
// also, note that this check will be dead code eliminated in the browser
|
|
YA === !1) && t.registered[o] === void 0 && (t.registered[o] = n.styles);
|
|
}, Rh = function(t, n, r) {
|
|
Ah(t, n, r);
|
|
var o = t.key + "-" + n.name;
|
|
if (t.inserted[n.name] === void 0) {
|
|
var i = n;
|
|
do
|
|
t.insert(n === i ? "." + o : "", i, t.sheet, !0), i = i.next;
|
|
while (i !== void 0);
|
|
}
|
|
};
|
|
function QA(e) {
|
|
for (var t = 0, n, r = 0, o = e.length; o >= 4; ++r, o -= 4)
|
|
n = e.charCodeAt(r) & 255 | (e.charCodeAt(++r) & 255) << 8 | (e.charCodeAt(++r) & 255) << 16 | (e.charCodeAt(++r) & 255) << 24, n = /* Math.imul(k, m): */
|
|
(n & 65535) * 1540483477 + ((n >>> 16) * 59797 << 16), n ^= /* k >>> r: */
|
|
n >>> 24, t = /* Math.imul(k, m): */
|
|
(n & 65535) * 1540483477 + ((n >>> 16) * 59797 << 16) ^ /* Math.imul(h, m): */
|
|
(t & 65535) * 1540483477 + ((t >>> 16) * 59797 << 16);
|
|
switch (o) {
|
|
case 3:
|
|
t ^= (e.charCodeAt(r + 2) & 255) << 16;
|
|
case 2:
|
|
t ^= (e.charCodeAt(r + 1) & 255) << 8;
|
|
case 1:
|
|
t ^= e.charCodeAt(r) & 255, t = /* Math.imul(h, m): */
|
|
(t & 65535) * 1540483477 + ((t >>> 16) * 59797 << 16);
|
|
}
|
|
return t ^= t >>> 13, t = /* Math.imul(h, m): */
|
|
(t & 65535) * 1540483477 + ((t >>> 16) * 59797 << 16), ((t ^ t >>> 15) >>> 0).toString(36);
|
|
}
|
|
var qA = {
|
|
animationIterationCount: 1,
|
|
aspectRatio: 1,
|
|
borderImageOutset: 1,
|
|
borderImageSlice: 1,
|
|
borderImageWidth: 1,
|
|
boxFlex: 1,
|
|
boxFlexGroup: 1,
|
|
boxOrdinalGroup: 1,
|
|
columnCount: 1,
|
|
columns: 1,
|
|
flex: 1,
|
|
flexGrow: 1,
|
|
flexPositive: 1,
|
|
flexShrink: 1,
|
|
flexNegative: 1,
|
|
flexOrder: 1,
|
|
gridRow: 1,
|
|
gridRowEnd: 1,
|
|
gridRowSpan: 1,
|
|
gridRowStart: 1,
|
|
gridColumn: 1,
|
|
gridColumnEnd: 1,
|
|
gridColumnSpan: 1,
|
|
gridColumnStart: 1,
|
|
msGridRow: 1,
|
|
msGridRowSpan: 1,
|
|
msGridColumn: 1,
|
|
msGridColumnSpan: 1,
|
|
fontWeight: 1,
|
|
lineHeight: 1,
|
|
opacity: 1,
|
|
order: 1,
|
|
orphans: 1,
|
|
scale: 1,
|
|
tabSize: 1,
|
|
widows: 1,
|
|
zIndex: 1,
|
|
zoom: 1,
|
|
WebkitLineClamp: 1,
|
|
// SVG-related properties
|
|
fillOpacity: 1,
|
|
floodOpacity: 1,
|
|
stopOpacity: 1,
|
|
strokeDasharray: 1,
|
|
strokeDashoffset: 1,
|
|
strokeMiterlimit: 1,
|
|
strokeOpacity: 1,
|
|
strokeWidth: 1
|
|
}, ZA = /[A-Z]|^ms/g, JA = /_EMO_([^_]+?)_([^]*?)_EMO_/g, B1 = function(t) {
|
|
return t.charCodeAt(1) === 45;
|
|
}, pg = function(t) {
|
|
return t != null && typeof t != "boolean";
|
|
}, kc = /* @__PURE__ */ R1(function(e) {
|
|
return B1(e) ? e : e.replace(ZA, "-$&").toLowerCase();
|
|
}), mg = function(t, n) {
|
|
switch (t) {
|
|
case "animation":
|
|
case "animationName":
|
|
if (typeof n == "string")
|
|
return n.replace(JA, function(r, o, i) {
|
|
return tn = {
|
|
name: o,
|
|
styles: i,
|
|
next: tn
|
|
}, o;
|
|
});
|
|
}
|
|
return qA[t] !== 1 && !B1(t) && typeof n == "number" && n !== 0 ? n + "px" : n;
|
|
};
|
|
function as(e, t, n) {
|
|
if (n == null)
|
|
return "";
|
|
var r = n;
|
|
if (r.__emotion_styles !== void 0)
|
|
return r;
|
|
switch (typeof n) {
|
|
case "boolean":
|
|
return "";
|
|
case "object": {
|
|
var o = n;
|
|
if (o.anim === 1)
|
|
return tn = {
|
|
name: o.name,
|
|
styles: o.styles,
|
|
next: tn
|
|
}, o.name;
|
|
var i = n;
|
|
if (i.styles !== void 0) {
|
|
var s = i.next;
|
|
if (s !== void 0)
|
|
for (; s !== void 0; )
|
|
tn = {
|
|
name: s.name,
|
|
styles: s.styles,
|
|
next: tn
|
|
}, s = s.next;
|
|
var a = i.styles + ";";
|
|
return a;
|
|
}
|
|
return eR(e, t, n);
|
|
}
|
|
case "function": {
|
|
if (e !== void 0) {
|
|
var l = tn, u = n(e);
|
|
return tn = l, as(e, t, u);
|
|
}
|
|
break;
|
|
}
|
|
}
|
|
var c = n;
|
|
if (t == null)
|
|
return c;
|
|
var d = t[c];
|
|
return d !== void 0 ? d : c;
|
|
}
|
|
function eR(e, t, n) {
|
|
var r = "";
|
|
if (Array.isArray(n))
|
|
for (var o = 0; o < n.length; o++)
|
|
r += as(e, t, n[o]) + ";";
|
|
else
|
|
for (var i in n) {
|
|
var s = n[i];
|
|
if (typeof s != "object") {
|
|
var a = s;
|
|
t != null && t[a] !== void 0 ? r += i + "{" + t[a] + "}" : pg(a) && (r += kc(i) + ":" + mg(i, a) + ";");
|
|
} else if (Array.isArray(s) && typeof s[0] == "string" && (t == null || t[s[0]] === void 0))
|
|
for (var l = 0; l < s.length; l++)
|
|
pg(s[l]) && (r += kc(i) + ":" + mg(i, s[l]) + ";");
|
|
else {
|
|
var u = as(e, t, s);
|
|
switch (i) {
|
|
case "animation":
|
|
case "animationName": {
|
|
r += kc(i) + ":" + u + ";";
|
|
break;
|
|
}
|
|
default:
|
|
r += i + "{" + u + "}";
|
|
}
|
|
}
|
|
}
|
|
return r;
|
|
}
|
|
var gg = /label:\s*([^\s;{]+)\s*(;|$)/g, tn;
|
|
function pu(e, t, n) {
|
|
if (e.length === 1 && typeof e[0] == "object" && e[0] !== null && e[0].styles !== void 0)
|
|
return e[0];
|
|
var r = !0, o = "";
|
|
tn = void 0;
|
|
var i = e[0];
|
|
if (i == null || i.raw === void 0)
|
|
r = !1, o += as(n, t, i);
|
|
else {
|
|
var s = i;
|
|
o += s[0];
|
|
}
|
|
for (var a = 1; a < e.length; a++)
|
|
if (o += as(n, t, e[a]), r) {
|
|
var l = i;
|
|
o += l[a];
|
|
}
|
|
gg.lastIndex = 0;
|
|
for (var u = "", c; (c = gg.exec(o)) !== null; )
|
|
u += "-" + c[1];
|
|
var d = QA(o) + u;
|
|
return {
|
|
name: d,
|
|
styles: o,
|
|
next: tn
|
|
};
|
|
}
|
|
var tR = function(t) {
|
|
return t();
|
|
}, F1 = Vp.useInsertionEffect ? Vp.useInsertionEffect : !1, j1 = F1 || tR, yg = F1 || C.useLayoutEffect, zh = /* @__PURE__ */ C.createContext(
|
|
// we're doing this to avoid preconstruct's dead code elimination in this one case
|
|
// because this module is primarily intended for the browser and node
|
|
// but it's also required in react native and similar environments sometimes
|
|
// and we could have a special build just for that
|
|
// but this is much easier and the native packages
|
|
// might use a different theme context in the future anyway
|
|
typeof HTMLElement < "u" ? /* @__PURE__ */ jA({
|
|
key: "css"
|
|
}) : null
|
|
);
|
|
zh.Provider;
|
|
var nR = function() {
|
|
return C.useContext(zh);
|
|
}, Mh = function(t) {
|
|
return /* @__PURE__ */ C.forwardRef(function(n, r) {
|
|
var o = C.useContext(zh);
|
|
return t(n, o, r);
|
|
});
|
|
}, Do = /* @__PURE__ */ C.createContext({}), rR = function(t, n) {
|
|
if (typeof n == "function") {
|
|
var r = n(t);
|
|
return r;
|
|
}
|
|
return wl({}, t, n);
|
|
}, oR = /* @__PURE__ */ fg(function(e) {
|
|
return fg(function(t) {
|
|
return rR(e, t);
|
|
});
|
|
}), iR = function(t) {
|
|
var n = C.useContext(Do);
|
|
return t.theme !== n && (n = oR(n)(t.theme)), /* @__PURE__ */ C.createElement(Do.Provider, {
|
|
value: n
|
|
}, t.children);
|
|
}, Dh = {}.hasOwnProperty, Kd = "__EMOTION_TYPE_PLEASE_DO_NOT_USE__", sR = function(t, n) {
|
|
var r = {};
|
|
for (var o in n)
|
|
Dh.call(n, o) && (r[o] = n[o]);
|
|
return r[Kd] = t, r;
|
|
}, aR = function(t) {
|
|
var n = t.cache, r = t.serialized, o = t.isStringTag;
|
|
return Ah(n, r, o), j1(function() {
|
|
return Rh(n, r, o);
|
|
}), null;
|
|
}, lR = /* @__PURE__ */ Mh(function(e, t, n) {
|
|
var r = e.css;
|
|
typeof r == "string" && t.registered[r] !== void 0 && (r = t.registered[r]);
|
|
var o = e[Kd], i = [r], s = "";
|
|
typeof e.className == "string" ? s = V1(t.registered, i, e.className) : e.className != null && (s = e.className + " ");
|
|
var a = pu(i, void 0, C.useContext(Do));
|
|
s += t.key + "-" + a.name;
|
|
var l = {};
|
|
for (var u in e)
|
|
Dh.call(e, u) && u !== "css" && u !== Kd && (l[u] = e[u]);
|
|
return l.className = s, n && (l.ref = n), /* @__PURE__ */ C.createElement(C.Fragment, null, /* @__PURE__ */ C.createElement(aR, {
|
|
cache: t,
|
|
serialized: a,
|
|
isStringTag: typeof o == "string"
|
|
}), /* @__PURE__ */ C.createElement(o, l));
|
|
}), uR = lR, vg = function(t, n) {
|
|
var r = arguments;
|
|
if (n == null || !Dh.call(n, "css"))
|
|
return C.createElement.apply(void 0, r);
|
|
var o = r.length, i = new Array(o);
|
|
i[0] = uR, i[1] = sR(t, n);
|
|
for (var s = 2; s < o; s++)
|
|
i[s] = r[s];
|
|
return C.createElement.apply(null, i);
|
|
};
|
|
(function(e) {
|
|
var t;
|
|
t || (t = e.JSX || (e.JSX = {}));
|
|
})(vg || (vg = {}));
|
|
var mu = /* @__PURE__ */ Mh(function(e, t) {
|
|
var n = e.styles, r = pu([n], void 0, C.useContext(Do)), o = C.useRef();
|
|
return yg(function() {
|
|
var i = t.key + "-global", s = new t.sheet.constructor({
|
|
key: i,
|
|
nonce: t.sheet.nonce,
|
|
container: t.sheet.container,
|
|
speedy: t.sheet.isSpeedy
|
|
}), a = !1, l = document.querySelector('style[data-emotion="' + i + " " + r.name + '"]');
|
|
return t.sheet.tags.length && (s.before = t.sheet.tags[0]), l !== null && (a = !0, l.setAttribute("data-emotion", i), s.hydrate([l])), o.current = [s, a], function() {
|
|
s.flush();
|
|
};
|
|
}, [t]), yg(function() {
|
|
var i = o.current, s = i[0], a = i[1];
|
|
if (a) {
|
|
i[1] = !1;
|
|
return;
|
|
}
|
|
if (r.next !== void 0 && Rh(t, r.next, !0), s.tags.length) {
|
|
var l = s.tags[s.tags.length - 1].nextElementSibling;
|
|
s.before = l, s.flush();
|
|
}
|
|
t.insert("", r, s, !1);
|
|
}, [t, r.name]), null;
|
|
});
|
|
function cR() {
|
|
for (var e = arguments.length, t = new Array(e), n = 0; n < e; n++)
|
|
t[n] = arguments[n];
|
|
return pu(t);
|
|
}
|
|
function dR() {
|
|
var e = cR.apply(void 0, arguments), t = "animation-" + e.name;
|
|
return {
|
|
name: t,
|
|
styles: "@keyframes " + t + "{" + e.styles + "}",
|
|
anim: 1,
|
|
toString: function() {
|
|
return "_EMO_" + this.name + "_" + this.styles + "_EMO_";
|
|
}
|
|
};
|
|
}
|
|
const Ih = C.createContext({});
|
|
Ih.displayName = "ColorModeContext";
|
|
function Lh() {
|
|
const e = C.useContext(Ih);
|
|
if (e === void 0)
|
|
throw new Error("useColorMode must be used within a ColorModeProvider");
|
|
return e;
|
|
}
|
|
const sa = {
|
|
light: "chakra-ui-light",
|
|
dark: "chakra-ui-dark"
|
|
};
|
|
function fR(e = {}) {
|
|
const { preventTransition: t = !0, nonce: n } = e, r = {
|
|
setDataset: (o) => {
|
|
const i = t ? r.preventTransition() : void 0;
|
|
document.documentElement.dataset.theme = o, document.documentElement.style.colorScheme = o, i?.();
|
|
},
|
|
setClassName(o) {
|
|
document.body.classList.add(o ? sa.dark : sa.light), document.body.classList.remove(o ? sa.light : sa.dark);
|
|
},
|
|
query() {
|
|
return window.matchMedia("(prefers-color-scheme: dark)");
|
|
},
|
|
getSystemTheme(o) {
|
|
return r.query().matches ?? o === "dark" ? "dark" : "light";
|
|
},
|
|
addListener(o) {
|
|
const i = r.query(), s = (a) => {
|
|
o(a.matches ? "dark" : "light");
|
|
};
|
|
return typeof i.addListener == "function" ? i.addListener(s) : i.addEventListener("change", s), () => {
|
|
typeof i.removeListener == "function" ? i.removeListener(s) : i.removeEventListener("change", s);
|
|
};
|
|
},
|
|
preventTransition() {
|
|
const o = document.createElement("style");
|
|
return o.appendChild(
|
|
document.createTextNode(
|
|
"*{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}"
|
|
)
|
|
), n !== void 0 && (o.nonce = n), document.head.appendChild(o), () => {
|
|
window.getComputedStyle(document.body), requestAnimationFrame(() => {
|
|
requestAnimationFrame(() => {
|
|
document.head.removeChild(o);
|
|
});
|
|
});
|
|
};
|
|
}
|
|
};
|
|
return r;
|
|
}
|
|
const hR = "chakra-ui-color-mode";
|
|
function pR(e) {
|
|
return {
|
|
ssr: !1,
|
|
type: "localStorage",
|
|
get(t) {
|
|
if (!globalThis?.document)
|
|
return t;
|
|
let n;
|
|
try {
|
|
n = localStorage.getItem(e) || t;
|
|
} catch {
|
|
}
|
|
return n || t;
|
|
},
|
|
set(t) {
|
|
try {
|
|
localStorage.setItem(e, t);
|
|
} catch {
|
|
}
|
|
}
|
|
};
|
|
}
|
|
const mR = pR(hR), Sg = () => {
|
|
}, gR = AC() ? C.useLayoutEffect : C.useEffect;
|
|
function bg(e, t) {
|
|
return e.type === "cookie" && e.ssr ? e.get(t) : t;
|
|
}
|
|
const O1 = function(t) {
|
|
const {
|
|
value: n,
|
|
children: r,
|
|
options: {
|
|
useSystemColorMode: o,
|
|
initialColorMode: i,
|
|
disableTransitionOnChange: s
|
|
} = {},
|
|
colorModeManager: a = mR
|
|
} = t, l = nR(), u = i === "dark" ? "dark" : "light", [c, d] = C.useState(
|
|
() => bg(a, u)
|
|
), [f, y] = C.useState(
|
|
() => bg(a)
|
|
), { getSystemTheme: v, setClassName: S, setDataset: k, addListener: p } = C.useMemo(
|
|
() => fR({
|
|
preventTransition: s,
|
|
nonce: l?.nonce
|
|
}),
|
|
[s, l?.nonce]
|
|
), h = i === "system" && !c ? f : c, g = C.useCallback(
|
|
(_) => {
|
|
const P = _ === "system" ? v() : _;
|
|
d(P), S(P === "dark"), k(P), a.set(P);
|
|
},
|
|
[a, v, S, k]
|
|
);
|
|
gR(() => {
|
|
i === "system" && y(v());
|
|
}, []), C.useEffect(() => {
|
|
const _ = a.get();
|
|
if (_) {
|
|
g(_);
|
|
return;
|
|
}
|
|
if (i === "system") {
|
|
g("system");
|
|
return;
|
|
}
|
|
g(u);
|
|
}, [a, u, i, g]);
|
|
const w = C.useCallback(() => {
|
|
g(h === "dark" ? "light" : "dark");
|
|
}, [h, g]);
|
|
C.useEffect(() => {
|
|
if (o)
|
|
return p(g);
|
|
}, [o, p, g]);
|
|
const E = C.useMemo(
|
|
() => ({
|
|
colorMode: n ?? h,
|
|
toggleColorMode: n ? Sg : w,
|
|
setColorMode: n ? Sg : g,
|
|
forced: n !== void 0
|
|
}),
|
|
[h, w, g, n]
|
|
);
|
|
return /* @__PURE__ */ M.jsx(Ih.Provider, { value: E, children: r });
|
|
};
|
|
O1.displayName = "ColorModeProvider";
|
|
const N1 = String.raw, W1 = N1`
|
|
:root,
|
|
:host {
|
|
--chakra-vh: 100vh;
|
|
}
|
|
|
|
@supports (height: -webkit-fill-available) {
|
|
:root,
|
|
:host {
|
|
--chakra-vh: -webkit-fill-available;
|
|
}
|
|
}
|
|
|
|
@supports (height: -moz-fill-available) {
|
|
:root,
|
|
:host {
|
|
--chakra-vh: -moz-fill-available;
|
|
}
|
|
}
|
|
|
|
@supports (height: 100dvh) {
|
|
:root,
|
|
:host {
|
|
--chakra-vh: 100dvh;
|
|
}
|
|
}
|
|
`, yR = () => /* @__PURE__ */ M.jsx(mu, { styles: W1 }), vR = ({ scope: e = "" }) => /* @__PURE__ */ M.jsx(
|
|
mu,
|
|
{
|
|
styles: N1`
|
|
html {
|
|
line-height: 1.5;
|
|
-webkit-text-size-adjust: 100%;
|
|
font-family: system-ui, sans-serif;
|
|
-webkit-font-smoothing: antialiased;
|
|
text-rendering: optimizeLegibility;
|
|
-moz-osx-font-smoothing: grayscale;
|
|
touch-action: manipulation;
|
|
}
|
|
|
|
body {
|
|
position: relative;
|
|
min-height: 100%;
|
|
margin: 0;
|
|
font-feature-settings: "kern";
|
|
}
|
|
|
|
${e} :where(*, *::before, *::after) {
|
|
border-width: 0;
|
|
border-style: solid;
|
|
box-sizing: border-box;
|
|
word-wrap: break-word;
|
|
}
|
|
|
|
main {
|
|
display: block;
|
|
}
|
|
|
|
${e} hr {
|
|
border-top-width: 1px;
|
|
box-sizing: content-box;
|
|
height: 0;
|
|
overflow: visible;
|
|
}
|
|
|
|
${e} :where(pre, code, kbd,samp) {
|
|
font-family: SFMono-Regular, Menlo, Monaco, Consolas, monospace;
|
|
font-size: 1em;
|
|
}
|
|
|
|
${e} a {
|
|
background-color: transparent;
|
|
color: inherit;
|
|
text-decoration: inherit;
|
|
}
|
|
|
|
${e} abbr[title] {
|
|
border-bottom: none;
|
|
text-decoration: underline;
|
|
-webkit-text-decoration: underline dotted;
|
|
text-decoration: underline dotted;
|
|
}
|
|
|
|
${e} :where(b, strong) {
|
|
font-weight: bold;
|
|
}
|
|
|
|
${e} small {
|
|
font-size: 80%;
|
|
}
|
|
|
|
${e} :where(sub,sup) {
|
|
font-size: 75%;
|
|
line-height: 0;
|
|
position: relative;
|
|
vertical-align: baseline;
|
|
}
|
|
|
|
${e} sub {
|
|
bottom: -0.25em;
|
|
}
|
|
|
|
${e} sup {
|
|
top: -0.5em;
|
|
}
|
|
|
|
${e} img {
|
|
border-style: none;
|
|
}
|
|
|
|
${e} :where(button, input, optgroup, select, textarea) {
|
|
font-family: inherit;
|
|
font-size: 100%;
|
|
line-height: 1.15;
|
|
margin: 0;
|
|
}
|
|
|
|
${e} :where(button, input) {
|
|
overflow: visible;
|
|
}
|
|
|
|
${e} :where(button, select) {
|
|
text-transform: none;
|
|
}
|
|
|
|
${e} :where(
|
|
button::-moz-focus-inner,
|
|
[type="button"]::-moz-focus-inner,
|
|
[type="reset"]::-moz-focus-inner,
|
|
[type="submit"]::-moz-focus-inner
|
|
) {
|
|
border-style: none;
|
|
padding: 0;
|
|
}
|
|
|
|
${e} fieldset {
|
|
padding: 0.35em 0.75em 0.625em;
|
|
}
|
|
|
|
${e} legend {
|
|
box-sizing: border-box;
|
|
color: inherit;
|
|
display: table;
|
|
max-width: 100%;
|
|
padding: 0;
|
|
white-space: normal;
|
|
}
|
|
|
|
${e} progress {
|
|
vertical-align: baseline;
|
|
}
|
|
|
|
${e} textarea {
|
|
overflow: auto;
|
|
}
|
|
|
|
${e} :where([type="checkbox"], [type="radio"]) {
|
|
box-sizing: border-box;
|
|
padding: 0;
|
|
}
|
|
|
|
${e} input[type="number"]::-webkit-inner-spin-button,
|
|
${e} input[type="number"]::-webkit-outer-spin-button {
|
|
-webkit-appearance: none !important;
|
|
}
|
|
|
|
${e} input[type="number"] {
|
|
-moz-appearance: textfield;
|
|
}
|
|
|
|
${e} input[type="search"] {
|
|
-webkit-appearance: textfield;
|
|
outline-offset: -2px;
|
|
}
|
|
|
|
${e} input[type="search"]::-webkit-search-decoration {
|
|
-webkit-appearance: none !important;
|
|
}
|
|
|
|
${e} ::-webkit-file-upload-button {
|
|
-webkit-appearance: button;
|
|
font: inherit;
|
|
}
|
|
|
|
${e} details {
|
|
display: block;
|
|
}
|
|
|
|
${e} summary {
|
|
display: list-item;
|
|
}
|
|
|
|
template {
|
|
display: none;
|
|
}
|
|
|
|
[hidden] {
|
|
display: none !important;
|
|
}
|
|
|
|
${e} :where(
|
|
blockquote,
|
|
dl,
|
|
dd,
|
|
h1,
|
|
h2,
|
|
h3,
|
|
h4,
|
|
h5,
|
|
h6,
|
|
hr,
|
|
figure,
|
|
p,
|
|
pre
|
|
) {
|
|
margin: 0;
|
|
}
|
|
|
|
${e} button {
|
|
background: transparent;
|
|
padding: 0;
|
|
}
|
|
|
|
${e} fieldset {
|
|
margin: 0;
|
|
padding: 0;
|
|
}
|
|
|
|
${e} :where(ol, ul) {
|
|
margin: 0;
|
|
padding: 0;
|
|
}
|
|
|
|
${e} textarea {
|
|
resize: vertical;
|
|
}
|
|
|
|
${e} :where(button, [role="button"]) {
|
|
cursor: pointer;
|
|
}
|
|
|
|
${e} button::-moz-focus-inner {
|
|
border: 0 !important;
|
|
}
|
|
|
|
${e} table {
|
|
border-collapse: collapse;
|
|
}
|
|
|
|
${e} :where(h1, h2, h3, h4, h5, h6) {
|
|
font-size: inherit;
|
|
font-weight: inherit;
|
|
}
|
|
|
|
${e} :where(button, input, optgroup, select, textarea) {
|
|
padding: 0;
|
|
line-height: inherit;
|
|
color: inherit;
|
|
}
|
|
|
|
${e} :where(img, svg, video, canvas, audio, iframe, embed, object) {
|
|
display: block;
|
|
}
|
|
|
|
${e} :where(img, video) {
|
|
max-width: 100%;
|
|
height: auto;
|
|
}
|
|
|
|
[data-js-focus-visible]
|
|
:focus:not([data-focus-visible-added]):not(
|
|
[data-focus-visible-disabled]
|
|
) {
|
|
outline: none;
|
|
box-shadow: none;
|
|
}
|
|
|
|
${e} select::-ms-expand {
|
|
display: none;
|
|
}
|
|
|
|
${W1}
|
|
`
|
|
}
|
|
);
|
|
function SR(e) {
|
|
const { cssVarsRoot: t, theme: n, children: r } = e, o = C.useMemo(() => e2(n), [n]);
|
|
return /* @__PURE__ */ M.jsxs(iR, { theme: o, children: [
|
|
/* @__PURE__ */ M.jsx(bR, { root: t }),
|
|
r
|
|
] });
|
|
}
|
|
function bR({ root: e = ":host, :root" }) {
|
|
const t = [e, "[data-theme]"].join(",");
|
|
return /* @__PURE__ */ M.jsx(mu, { styles: (n) => ({ [t]: n.__cssVars }) });
|
|
}
|
|
jo({
|
|
name: "StylesContext",
|
|
errorMessage: "useStyles: `styles` is undefined. Seems you forgot to wrap the components in `<StylesProvider />` "
|
|
});
|
|
function xR() {
|
|
const { colorMode: e } = Lh();
|
|
return /* @__PURE__ */ M.jsx(
|
|
mu,
|
|
{
|
|
styles: (t) => {
|
|
const n = i1(t, "styles.global"), r = on(n, { theme: t, colorMode: e });
|
|
return r ? c1(r)(t) : void 0;
|
|
}
|
|
}
|
|
);
|
|
}
|
|
const [wR, kR] = jo({
|
|
strict: !1,
|
|
name: "PortalManagerContext"
|
|
});
|
|
function U1(e) {
|
|
const { children: t, zIndex: n } = e;
|
|
return /* @__PURE__ */ M.jsx(wR, { value: { zIndex: n }, children: t });
|
|
}
|
|
U1.displayName = "PortalManager";
|
|
const H1 = C.createContext({
|
|
getDocument() {
|
|
return document;
|
|
},
|
|
getWindow() {
|
|
return window;
|
|
}
|
|
});
|
|
H1.displayName = "EnvironmentContext";
|
|
function K1(e) {
|
|
const { children: t, environment: n, disabled: r } = e, o = C.useRef(null), i = C.useMemo(() => n || {
|
|
getDocument: () => o.current?.ownerDocument ?? document,
|
|
getWindow: () => o.current?.ownerDocument.defaultView ?? window
|
|
}, [n]), s = !r || !n;
|
|
return /* @__PURE__ */ M.jsxs(H1.Provider, { value: i, children: [
|
|
t,
|
|
s && /* @__PURE__ */ M.jsx("span", { id: "__chakra_env", hidden: !0, ref: o })
|
|
] });
|
|
}
|
|
K1.displayName = "EnvironmentProvider";
|
|
const CR = (e) => {
|
|
const {
|
|
children: t,
|
|
colorModeManager: n,
|
|
portalZIndex: r,
|
|
resetScope: o,
|
|
resetCSS: i = !0,
|
|
theme: s = {},
|
|
environment: a,
|
|
cssVarsRoot: l,
|
|
disableEnvironment: u,
|
|
disableGlobalStyle: c
|
|
} = e, d = /* @__PURE__ */ M.jsx(
|
|
K1,
|
|
{
|
|
environment: a,
|
|
disabled: u,
|
|
children: t
|
|
}
|
|
);
|
|
return /* @__PURE__ */ M.jsx(SR, { theme: s, cssVarsRoot: l, children: /* @__PURE__ */ M.jsxs(
|
|
O1,
|
|
{
|
|
colorModeManager: n,
|
|
options: s.config,
|
|
children: [
|
|
i ? /* @__PURE__ */ M.jsx(vR, { scope: o }) : /* @__PURE__ */ M.jsx(yR, {}),
|
|
!c && /* @__PURE__ */ M.jsx(xR, {}),
|
|
r ? /* @__PURE__ */ M.jsx(U1, { zIndex: r, children: d }) : d
|
|
]
|
|
}
|
|
) });
|
|
}, Vh = C.createContext({});
|
|
function Bh(e) {
|
|
const t = C.useRef(null);
|
|
return t.current === null && (t.current = e()), t.current;
|
|
}
|
|
const TR = typeof window < "u", G1 = TR ? C.useLayoutEffect : C.useEffect, Ss = /* @__PURE__ */ C.createContext(null);
|
|
function Fh(e, t) {
|
|
e.indexOf(t) === -1 && e.push(t);
|
|
}
|
|
function kl(e, t) {
|
|
const n = e.indexOf(t);
|
|
n > -1 && e.splice(n, 1);
|
|
}
|
|
const fn = (e, t, n) => n > t ? t : n < e ? e : n;
|
|
function xg(e, t) {
|
|
return t ? `${e}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${t}` : e;
|
|
}
|
|
let bs = () => {
|
|
}, Dr = () => {
|
|
};
|
|
typeof process < "u" && process.env?.NODE_ENV !== "production" && (bs = (e, t, n) => {
|
|
!e && typeof console < "u" && console.warn(xg(t, n));
|
|
}, Dr = (e, t, n) => {
|
|
if (!e)
|
|
throw new Error(xg(t, n));
|
|
});
|
|
const er = {}, X1 = (e) => /^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e), Y1 = (e) => typeof e == "object" && e !== null, Q1 = (e) => /^0[^.\s]+$/u.test(e);
|
|
// @__NO_SIDE_EFFECTS__
|
|
function q1(e) {
|
|
let t;
|
|
return () => (t === void 0 && (t = e()), t);
|
|
}
|
|
const $t = /* @__NO_SIDE_EFFECTS__ */ (e) => e, xs = (...e) => e.reduce((t, n) => (r) => n(t(r))), ls = /* @__NO_SIDE_EFFECTS__ */ (e, t, n) => {
|
|
const r = t - e;
|
|
return r ? (n - e) / r : 1;
|
|
};
|
|
class jh {
|
|
constructor() {
|
|
this.subscriptions = [];
|
|
}
|
|
add(t) {
|
|
return Fh(this.subscriptions, t), () => kl(this.subscriptions, t);
|
|
}
|
|
notify(t, n, r) {
|
|
const o = this.subscriptions.length;
|
|
if (o)
|
|
if (o === 1)
|
|
this.subscriptions[0](t, n, r);
|
|
else
|
|
for (let i = 0; i < o; i++) {
|
|
const s = this.subscriptions[i];
|
|
s && s(t, n, r);
|
|
}
|
|
}
|
|
getSize() {
|
|
return this.subscriptions.length;
|
|
}
|
|
clear() {
|
|
this.subscriptions.length = 0;
|
|
}
|
|
}
|
|
const lt = /* @__NO_SIDE_EFFECTS__ */ (e) => e * 1e3, Et = /* @__NO_SIDE_EFFECTS__ */ (e) => e / 1e3, Z1 = /* @__NO_SIDE_EFFECTS__ */ (e, t) => t ? e * (1e3 / t) : 0, J1 = (e, t, n) => (((1 - 3 * n + 3 * t) * e + (3 * n - 6 * t)) * e + 3 * t) * e, PR = 1e-7, ER = 12;
|
|
function _R(e, t, n, r, o) {
|
|
let i, s, a = 0;
|
|
do
|
|
s = t + (n - t) / 2, i = J1(s, r, o) - e, i > 0 ? n = s : t = s;
|
|
while (Math.abs(i) > PR && ++a < ER);
|
|
return s;
|
|
}
|
|
// @__NO_SIDE_EFFECTS__
|
|
function ws(e, t, n, r) {
|
|
if (e === t && n === r)
|
|
return $t;
|
|
const o = (i) => _R(i, 0, 1, e, n);
|
|
return (i) => i === 0 || i === 1 ? i : J1(o(i), t, r);
|
|
}
|
|
const eS = /* @__NO_SIDE_EFFECTS__ */ (e) => (t) => t <= 0.5 ? e(2 * t) / 2 : (2 - e(2 * (1 - t))) / 2, tS = /* @__NO_SIDE_EFFECTS__ */ (e) => (t) => 1 - e(1 - t), nS = /* @__PURE__ */ ws(0.33, 1.53, 0.69, 0.99), Oh = /* @__PURE__ */ tS(nS), rS = /* @__PURE__ */ eS(Oh), oS = (e) => e >= 1 ? 1 : (e *= 2) < 1 ? 0.5 * Oh(e) : 0.5 * (2 - Math.pow(2, -10 * (e - 1))), Nh = (e) => 1 - Math.sin(Math.acos(e)), iS = /* @__PURE__ */ tS(Nh), sS = /* @__PURE__ */ eS(Nh), $R = /* @__PURE__ */ ws(0.42, 0, 1, 1), AR = /* @__PURE__ */ ws(0, 0, 0.58, 1), aS = /* @__PURE__ */ ws(0.42, 0, 0.58, 1), RR = /* @__NO_SIDE_EFFECTS__ */ (e) => Array.isArray(e) && typeof e[0] != "number", lS = /* @__NO_SIDE_EFFECTS__ */ (e) => Array.isArray(e) && typeof e[0] == "number", wg = {
|
|
linear: $t,
|
|
easeIn: $R,
|
|
easeInOut: aS,
|
|
easeOut: AR,
|
|
circIn: Nh,
|
|
circInOut: sS,
|
|
circOut: iS,
|
|
backIn: Oh,
|
|
backInOut: rS,
|
|
backOut: nS,
|
|
anticipate: oS
|
|
}, zR = (e) => typeof e == "string", kg = (e) => {
|
|
if (/* @__PURE__ */ lS(e)) {
|
|
Dr(e.length === 4, "Cubic bezier arrays must contain four numerical values.", "cubic-bezier-length");
|
|
const [t, n, r, o] = e;
|
|
return /* @__PURE__ */ ws(t, n, r, o);
|
|
} else if (zR(e))
|
|
return Dr(wg[e] !== void 0, `Invalid easing type '${e}'`, "invalid-easing-type"), wg[e];
|
|
return e;
|
|
}, aa = [
|
|
"setup",
|
|
// Compute
|
|
"read",
|
|
// Read
|
|
"resolveKeyframes",
|
|
// Write/Read/Write/Read
|
|
"preUpdate",
|
|
// Compute
|
|
"update",
|
|
// Compute
|
|
"preRender",
|
|
// Compute
|
|
"render",
|
|
// Write
|
|
"postRender"
|
|
// Compute
|
|
];
|
|
function MR(e, t) {
|
|
let n = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Set(), o = !1, i = !1;
|
|
const s = /* @__PURE__ */ new WeakSet();
|
|
let a = {
|
|
delta: 0,
|
|
timestamp: 0,
|
|
isProcessing: !1
|
|
};
|
|
function l(c) {
|
|
s.has(c) && (u.schedule(c), e()), c(a);
|
|
}
|
|
const u = {
|
|
/**
|
|
* Schedule a process to run on the next frame.
|
|
*/
|
|
schedule: (c, d = !1, f = !1) => {
|
|
const v = f && o ? n : r;
|
|
return d && s.add(c), v.add(c), c;
|
|
},
|
|
/**
|
|
* Cancel the provided callback from running on the next frame.
|
|
*/
|
|
cancel: (c) => {
|
|
r.delete(c), s.delete(c);
|
|
},
|
|
/**
|
|
* Execute all schedule callbacks.
|
|
*/
|
|
process: (c) => {
|
|
if (a = c, o) {
|
|
i = !0;
|
|
return;
|
|
}
|
|
o = !0;
|
|
const d = n;
|
|
n = r, r = d, n.forEach(l), n.clear(), o = !1, i && (i = !1, u.process(c));
|
|
}
|
|
};
|
|
return u;
|
|
}
|
|
const DR = 40;
|
|
function uS(e, t) {
|
|
let n = !1, r = !0;
|
|
const o = {
|
|
delta: 0,
|
|
timestamp: 0,
|
|
isProcessing: !1
|
|
}, i = () => n = !0, s = aa.reduce((g, w) => (g[w] = MR(i), g), {}), { setup: a, read: l, resolveKeyframes: u, preUpdate: c, update: d, preRender: f, render: y, postRender: v } = s, S = () => {
|
|
const g = er.useManualTiming, w = g ? o.timestamp : performance.now();
|
|
n = !1, g || (o.delta = r ? 1e3 / 60 : Math.max(Math.min(w - o.timestamp, DR), 1)), o.timestamp = w, o.isProcessing = !0, a.process(o), l.process(o), u.process(o), c.process(o), d.process(o), f.process(o), y.process(o), v.process(o), o.isProcessing = !1, n && t && (r = !1, e(S));
|
|
}, k = () => {
|
|
n = !0, r = !0, o.isProcessing || e(S);
|
|
};
|
|
return { schedule: aa.reduce((g, w) => {
|
|
const E = s[w];
|
|
return g[w] = (_, P = !1, $ = !1) => (n || k(), E.schedule(_, P, $)), g;
|
|
}, {}), cancel: (g) => {
|
|
for (let w = 0; w < aa.length; w++)
|
|
s[aa[w]].cancel(g);
|
|
}, state: o, steps: s };
|
|
}
|
|
const { schedule: ie, cancel: tr, state: Le, steps: Cc } = /* @__PURE__ */ uS(typeof requestAnimationFrame < "u" ? requestAnimationFrame : $t, !0);
|
|
let La;
|
|
function IR() {
|
|
La = void 0;
|
|
}
|
|
const Qe = {
|
|
now: () => (La === void 0 && Qe.set(Le.isProcessing || er.useManualTiming ? Le.timestamp : performance.now()), La),
|
|
set: (e) => {
|
|
La = e, queueMicrotask(IR);
|
|
}
|
|
}, cS = (e) => (t) => typeof t == "string" && t.startsWith(e), dS = /* @__PURE__ */ cS("--"), LR = /* @__PURE__ */ cS("var(--"), Wh = (e) => LR(e) ? VR.test(e.split("/*")[0].trim()) : !1, VR = /var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;
|
|
function Cg(e) {
|
|
return typeof e != "string" ? !1 : e.split("/*")[0].includes("var(--");
|
|
}
|
|
const No = {
|
|
test: (e) => typeof e == "number",
|
|
parse: parseFloat,
|
|
transform: (e) => e
|
|
}, us = {
|
|
...No,
|
|
transform: (e) => fn(0, 1, e)
|
|
}, la = {
|
|
...No,
|
|
default: 1
|
|
}, Di = (e) => Math.round(e * 1e5) / 1e5, Uh = /-?(?:\d+(?:\.\d+)?|\.\d+)/gu;
|
|
function BR(e) {
|
|
return e == null;
|
|
}
|
|
const FR = /^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu, Hh = (e, t) => (n) => !!(typeof n == "string" && FR.test(n) && n.startsWith(e) || t && !BR(n) && Object.prototype.hasOwnProperty.call(n, t)), fS = (e, t, n) => (r) => {
|
|
if (typeof r != "string")
|
|
return r;
|
|
const [o, i, s, a] = r.match(Uh);
|
|
return {
|
|
[e]: parseFloat(o),
|
|
[t]: parseFloat(i),
|
|
[n]: parseFloat(s),
|
|
alpha: a !== void 0 ? parseFloat(a) : 1
|
|
};
|
|
}, jR = (e) => fn(0, 255, e), Tc = {
|
|
...No,
|
|
transform: (e) => Math.round(jR(e))
|
|
}, Sr = {
|
|
test: /* @__PURE__ */ Hh("rgb", "red"),
|
|
parse: /* @__PURE__ */ fS("red", "green", "blue"),
|
|
transform: ({ red: e, green: t, blue: n, alpha: r = 1 }) => "rgba(" + Tc.transform(e) + ", " + Tc.transform(t) + ", " + Tc.transform(n) + ", " + Di(us.transform(r)) + ")"
|
|
};
|
|
function OR(e) {
|
|
let t = "", n = "", r = "", o = "";
|
|
return e.length > 5 ? (t = e.substring(1, 3), n = e.substring(3, 5), r = e.substring(5, 7), o = e.substring(7, 9)) : (t = e.substring(1, 2), n = e.substring(2, 3), r = e.substring(3, 4), o = e.substring(4, 5), t += t, n += n, r += r, o += o), {
|
|
red: parseInt(t, 16),
|
|
green: parseInt(n, 16),
|
|
blue: parseInt(r, 16),
|
|
alpha: o ? parseInt(o, 16) / 255 : 1
|
|
};
|
|
}
|
|
const Gd = {
|
|
test: /* @__PURE__ */ Hh("#"),
|
|
parse: OR,
|
|
transform: Sr.transform
|
|
}, ks = /* @__NO_SIDE_EFFECTS__ */ (e) => ({
|
|
test: (t) => typeof t == "string" && t.endsWith(e) && t.split(" ").length === 1,
|
|
parse: parseFloat,
|
|
transform: (t) => `${t}${e}`
|
|
}), mn = /* @__PURE__ */ ks("deg"), dn = /* @__PURE__ */ ks("%"), I = /* @__PURE__ */ ks("px"), NR = /* @__PURE__ */ ks("vh"), WR = /* @__PURE__ */ ks("vw"), Tg = {
|
|
...dn,
|
|
parse: (e) => dn.parse(e) / 100,
|
|
transform: (e) => dn.transform(e * 100)
|
|
}, uo = {
|
|
test: /* @__PURE__ */ Hh("hsl", "hue"),
|
|
parse: /* @__PURE__ */ fS("hue", "saturation", "lightness"),
|
|
transform: ({ hue: e, saturation: t, lightness: n, alpha: r = 1 }) => "hsla(" + Math.round(e) + ", " + dn.transform(Di(t)) + ", " + dn.transform(Di(n)) + ", " + Di(us.transform(r)) + ")"
|
|
}, ke = {
|
|
test: (e) => Sr.test(e) || Gd.test(e) || uo.test(e),
|
|
parse: (e) => Sr.test(e) ? Sr.parse(e) : uo.test(e) ? uo.parse(e) : Gd.parse(e),
|
|
transform: (e) => typeof e == "string" ? e : e.hasOwnProperty("red") ? Sr.transform(e) : uo.transform(e),
|
|
getAnimatableNone: (e) => {
|
|
const t = ke.parse(e);
|
|
return t.alpha = 0, ke.transform(t);
|
|
}
|
|
}, UR = /(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;
|
|
function HR(e) {
|
|
return isNaN(e) && typeof e == "string" && (e.match(Uh)?.length || 0) + (e.match(UR)?.length || 0) > 0;
|
|
}
|
|
const hS = "number", pS = "color", KR = "var", GR = "var(", Pg = "${}", XR = /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;
|
|
function Io(e) {
|
|
const t = e.toString(), n = [], r = {
|
|
color: [],
|
|
number: [],
|
|
var: []
|
|
}, o = [];
|
|
let i = 0;
|
|
const a = t.replace(XR, (l) => (ke.test(l) ? (r.color.push(i), o.push(pS), n.push(ke.parse(l))) : l.startsWith(GR) ? (r.var.push(i), o.push(KR), n.push(l)) : (r.number.push(i), o.push(hS), n.push(parseFloat(l))), ++i, Pg)).split(Pg);
|
|
return { values: n, split: a, indexes: r, types: o };
|
|
}
|
|
function YR(e) {
|
|
return Io(e).values;
|
|
}
|
|
function mS({ split: e, types: t }) {
|
|
const n = e.length;
|
|
return (r) => {
|
|
let o = "";
|
|
for (let i = 0; i < n; i++)
|
|
if (o += e[i], r[i] !== void 0) {
|
|
const s = t[i];
|
|
s === hS ? o += Di(r[i]) : s === pS ? o += ke.transform(r[i]) : o += r[i];
|
|
}
|
|
return o;
|
|
};
|
|
}
|
|
function QR(e) {
|
|
return mS(Io(e));
|
|
}
|
|
const qR = (e) => typeof e == "number" ? 0 : ke.test(e) ? ke.getAnimatableNone(e) : e, ZR = (e, t) => typeof e == "number" ? t?.trim().endsWith("/") ? e : 0 : qR(e);
|
|
function JR(e) {
|
|
const t = Io(e);
|
|
return mS(t)(t.values.map((r, o) => ZR(r, t.split[o])));
|
|
}
|
|
const Ht = {
|
|
test: HR,
|
|
parse: YR,
|
|
createTransformer: QR,
|
|
getAnimatableNone: JR
|
|
};
|
|
function Pc(e, t, n) {
|
|
return n < 0 && (n += 1), n > 1 && (n -= 1), n < 1 / 6 ? e + (t - e) * 6 * n : n < 1 / 2 ? t : n < 2 / 3 ? e + (t - e) * (2 / 3 - n) * 6 : e;
|
|
}
|
|
function ez({ hue: e, saturation: t, lightness: n, alpha: r }) {
|
|
e /= 360, t /= 100, n /= 100;
|
|
let o = 0, i = 0, s = 0;
|
|
if (!t)
|
|
o = i = s = n;
|
|
else {
|
|
const a = n < 0.5 ? n * (1 + t) : n + t - n * t, l = 2 * n - a;
|
|
o = Pc(l, a, e + 1 / 3), i = Pc(l, a, e), s = Pc(l, a, e - 1 / 3);
|
|
}
|
|
return {
|
|
red: Math.round(o * 255),
|
|
green: Math.round(i * 255),
|
|
blue: Math.round(s * 255),
|
|
alpha: r
|
|
};
|
|
}
|
|
function Cl(e, t) {
|
|
return (n) => n > 0 ? t : e;
|
|
}
|
|
const oe = (e, t, n) => e + (t - e) * n, Ec = (e, t, n) => {
|
|
const r = e * e, o = n * (t * t - r) + r;
|
|
return o < 0 ? 0 : Math.sqrt(o);
|
|
}, tz = [Gd, Sr, uo], nz = (e) => tz.find((t) => t.test(e));
|
|
function Eg(e) {
|
|
const t = nz(e);
|
|
if (bs(!!t, `'${e}' is not an animatable color. Use the equivalent color code instead.`, "color-not-animatable"), !t)
|
|
return !1;
|
|
let n = t.parse(e);
|
|
return t === uo && (n = ez(n)), n;
|
|
}
|
|
const _g = (e, t) => {
|
|
const n = Eg(e), r = Eg(t);
|
|
if (!n || !r)
|
|
return Cl(e, t);
|
|
const o = { ...n };
|
|
return (i) => (o.red = Ec(n.red, r.red, i), o.green = Ec(n.green, r.green, i), o.blue = Ec(n.blue, r.blue, i), o.alpha = oe(n.alpha, r.alpha, i), Sr.transform(o));
|
|
}, Xd = /* @__PURE__ */ new Set(["none", "hidden"]);
|
|
function rz(e, t) {
|
|
return Xd.has(e) ? (n) => n <= 0 ? e : t : (n) => n >= 1 ? t : e;
|
|
}
|
|
function oz(e, t) {
|
|
return (n) => oe(e, t, n);
|
|
}
|
|
function Kh(e) {
|
|
return typeof e == "number" ? oz : typeof e == "string" ? Wh(e) ? Cl : ke.test(e) ? _g : az : Array.isArray(e) ? gS : typeof e == "object" ? ke.test(e) ? _g : iz : Cl;
|
|
}
|
|
function gS(e, t) {
|
|
const n = [...e], r = n.length, o = e.map((i, s) => Kh(i)(i, t[s]));
|
|
return (i) => {
|
|
for (let s = 0; s < r; s++)
|
|
n[s] = o[s](i);
|
|
return n;
|
|
};
|
|
}
|
|
function iz(e, t) {
|
|
const n = { ...e, ...t }, r = {};
|
|
for (const o in n)
|
|
e[o] !== void 0 && t[o] !== void 0 && (r[o] = Kh(e[o])(e[o], t[o]));
|
|
return (o) => {
|
|
for (const i in r)
|
|
n[i] = r[i](o);
|
|
return n;
|
|
};
|
|
}
|
|
function sz(e, t) {
|
|
const n = [], r = { color: 0, var: 0, number: 0 };
|
|
for (let o = 0; o < t.values.length; o++) {
|
|
const i = t.types[o], s = e.indexes[i][r[i]], a = e.values[s] ?? 0;
|
|
n[o] = a, r[i]++;
|
|
}
|
|
return n;
|
|
}
|
|
const az = (e, t) => {
|
|
const n = Ht.createTransformer(t), r = Io(e), o = Io(t);
|
|
return r.indexes.var.length === o.indexes.var.length && r.indexes.color.length === o.indexes.color.length && r.indexes.number.length >= o.indexes.number.length ? Xd.has(e) && !o.values.length || Xd.has(t) && !r.values.length ? rz(e, t) : xs(gS(sz(r, o), o.values), n) : (bs(!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.`, "complex-values-different"), Cl(e, t));
|
|
};
|
|
function yS(e, t, n) {
|
|
return typeof e == "number" && typeof t == "number" && typeof n == "number" ? oe(e, t, n) : Kh(e)(e, t);
|
|
}
|
|
const lz = (e) => {
|
|
const t = ({ timestamp: n }) => e(n);
|
|
return {
|
|
start: (n = !0) => ie.update(t, n),
|
|
stop: () => tr(t),
|
|
/**
|
|
* If we're processing this frame we can use the
|
|
* framelocked timestamp to keep things in sync.
|
|
*/
|
|
now: () => Le.isProcessing ? Le.timestamp : Qe.now()
|
|
};
|
|
}, vS = (e, t, n = 10) => {
|
|
let r = "";
|
|
const o = Math.max(Math.round(t / n), 2);
|
|
for (let i = 0; i < o; i++)
|
|
r += Math.round(e(i / (o - 1)) * 1e4) / 1e4 + ", ";
|
|
return `linear(${r.substring(0, r.length - 2)})`;
|
|
}, Tl = 2e4;
|
|
function Gh(e) {
|
|
let t = 0;
|
|
const n = 50;
|
|
let r = e.next(t);
|
|
for (; !r.done && t < Tl; )
|
|
t += n, r = e.next(t);
|
|
return t >= Tl ? 1 / 0 : t;
|
|
}
|
|
function uz(e, t = 100, n) {
|
|
const r = n({ ...e, keyframes: [0, t] }), o = Math.min(Gh(r), Tl);
|
|
return {
|
|
type: "keyframes",
|
|
ease: (i) => r.next(o * i).value / t,
|
|
duration: /* @__PURE__ */ Et(o)
|
|
};
|
|
}
|
|
const me = {
|
|
// Default spring physics
|
|
stiffness: 100,
|
|
damping: 10,
|
|
mass: 1,
|
|
velocity: 0,
|
|
// Default duration/bounce-based options
|
|
duration: 800,
|
|
// in ms
|
|
bounce: 0.3,
|
|
visualDuration: 0.3,
|
|
// in seconds
|
|
// Rest thresholds
|
|
restSpeed: {
|
|
granular: 0.01,
|
|
default: 2
|
|
},
|
|
restDelta: {
|
|
granular: 5e-3,
|
|
default: 0.5
|
|
},
|
|
// Limits
|
|
minDuration: 0.01,
|
|
// in seconds
|
|
maxDuration: 10,
|
|
// in seconds
|
|
minDamping: 0.05,
|
|
maxDamping: 1
|
|
};
|
|
function Yd(e, t) {
|
|
return e * Math.sqrt(1 - t * t);
|
|
}
|
|
const cz = 12;
|
|
function dz(e, t, n) {
|
|
let r = n;
|
|
for (let o = 1; o < cz; o++)
|
|
r = r - e(r) / t(r);
|
|
return r;
|
|
}
|
|
const _c = 1e-3;
|
|
function fz({ duration: e = me.duration, bounce: t = me.bounce, velocity: n = me.velocity, mass: r = me.mass }) {
|
|
let o, i;
|
|
bs(e <= /* @__PURE__ */ lt(me.maxDuration), "Spring duration must be 10 seconds or less", "spring-duration-limit");
|
|
let s = 1 - t;
|
|
s = fn(me.minDamping, me.maxDamping, s), e = fn(me.minDuration, me.maxDuration, /* @__PURE__ */ Et(e)), s < 1 ? (o = (u) => {
|
|
const c = u * s, d = c * e, f = c - n, y = Yd(u, s), v = Math.exp(-d);
|
|
return _c - f / y * v;
|
|
}, i = (u) => {
|
|
const d = u * s * e, f = d * n + n, y = Math.pow(s, 2) * Math.pow(u, 2) * e, v = Math.exp(-d), S = Yd(Math.pow(u, 2), s);
|
|
return (-o(u) + _c > 0 ? -1 : 1) * ((f - y) * v) / S;
|
|
}) : (o = (u) => {
|
|
const c = Math.exp(-u * e), d = (u - n) * e + 1;
|
|
return -_c + c * d;
|
|
}, i = (u) => {
|
|
const c = Math.exp(-u * e), d = (n - u) * (e * e);
|
|
return c * d;
|
|
});
|
|
const a = 5 / e, l = dz(o, i, a);
|
|
if (e = /* @__PURE__ */ lt(e), isNaN(l))
|
|
return {
|
|
stiffness: me.stiffness,
|
|
damping: me.damping,
|
|
duration: e
|
|
};
|
|
{
|
|
const u = Math.pow(l, 2) * r;
|
|
return {
|
|
stiffness: u,
|
|
damping: s * 2 * Math.sqrt(r * u),
|
|
duration: e
|
|
};
|
|
}
|
|
}
|
|
const hz = ["duration", "bounce"], pz = ["stiffness", "damping", "mass"];
|
|
function $g(e, t) {
|
|
return t.some((n) => e[n] !== void 0);
|
|
}
|
|
function mz(e) {
|
|
let t = {
|
|
velocity: me.velocity,
|
|
stiffness: me.stiffness,
|
|
damping: me.damping,
|
|
mass: me.mass,
|
|
isResolvedFromDuration: !1,
|
|
...e
|
|
};
|
|
if (!$g(e, pz) && $g(e, hz))
|
|
if (t.velocity = 0, e.visualDuration) {
|
|
const n = e.visualDuration, r = 2 * Math.PI / (n * 1.2), o = r * r, i = 2 * fn(0.05, 1, 1 - (e.bounce || 0)) * Math.sqrt(o);
|
|
t = {
|
|
...t,
|
|
mass: me.mass,
|
|
stiffness: o,
|
|
damping: i
|
|
};
|
|
} else {
|
|
const n = fz({ ...e, velocity: 0 });
|
|
t = {
|
|
...t,
|
|
...n,
|
|
mass: me.mass
|
|
}, t.isResolvedFromDuration = !0;
|
|
}
|
|
return t;
|
|
}
|
|
function Pl(e = me.visualDuration, t = me.bounce) {
|
|
const n = typeof e != "object" ? {
|
|
visualDuration: e,
|
|
keyframes: [0, 1],
|
|
bounce: t
|
|
} : e;
|
|
let { restSpeed: r, restDelta: o } = n;
|
|
const i = n.keyframes[0], s = n.keyframes[n.keyframes.length - 1], a = { done: !1, value: i }, { stiffness: l, damping: u, mass: c, duration: d, velocity: f, isResolvedFromDuration: y } = mz({
|
|
...n,
|
|
velocity: -/* @__PURE__ */ Et(n.velocity || 0)
|
|
}), v = f || 0, S = u / (2 * Math.sqrt(l * c)), k = s - i, p = /* @__PURE__ */ Et(Math.sqrt(l / c)), h = Math.abs(k) < 5;
|
|
r || (r = h ? me.restSpeed.granular : me.restSpeed.default), o || (o = h ? me.restDelta.granular : me.restDelta.default);
|
|
let g, w, E, _, P, $;
|
|
if (S < 1)
|
|
E = Yd(p, S), _ = (v + S * p * k) / E, g = (A) => {
|
|
const N = Math.exp(-S * p * A);
|
|
return s - N * (_ * Math.sin(E * A) + k * Math.cos(E * A));
|
|
}, P = S * p * _ + k * E, $ = S * p * k - _ * E, w = (A) => Math.exp(-S * p * A) * (P * Math.sin(E * A) + $ * Math.cos(E * A));
|
|
else if (S === 1) {
|
|
g = (N) => s - Math.exp(-p * N) * (k + (v + p * k) * N);
|
|
const A = v + p * k;
|
|
w = (N) => Math.exp(-p * N) * (p * A * N - v);
|
|
} else {
|
|
const A = p * Math.sqrt(S * S - 1);
|
|
g = (Ge) => {
|
|
const ct = Math.exp(-S * p * Ge), Oe = Math.min(A * Ge, 300);
|
|
return s - ct * ((v + S * p * k) * Math.sinh(Oe) + A * k * Math.cosh(Oe)) / A;
|
|
};
|
|
const N = (v + S * p * k) / A, le = S * p * N - k * A, De = S * p * k - N * A;
|
|
w = (Ge) => {
|
|
const ct = Math.exp(-S * p * Ge), Oe = Math.min(A * Ge, 300);
|
|
return ct * (le * Math.sinh(Oe) + De * Math.cosh(Oe));
|
|
};
|
|
}
|
|
const V = {
|
|
calculatedDuration: y && d || null,
|
|
velocity: (A) => /* @__PURE__ */ lt(w(A)),
|
|
next: (A) => {
|
|
if (!y && S < 1) {
|
|
const le = Math.exp(-S * p * A), De = Math.sin(E * A), Ge = Math.cos(E * A), ct = s - le * (_ * De + k * Ge), Oe = /* @__PURE__ */ lt(le * (P * De + $ * Ge));
|
|
return a.done = Math.abs(Oe) <= r && Math.abs(s - ct) <= o, a.value = a.done ? s : ct, a;
|
|
}
|
|
const N = g(A);
|
|
if (y)
|
|
a.done = A >= d;
|
|
else {
|
|
const le = /* @__PURE__ */ lt(w(A));
|
|
a.done = Math.abs(le) <= r && Math.abs(s - N) <= o;
|
|
}
|
|
return a.value = a.done ? s : N, a;
|
|
},
|
|
toString: () => {
|
|
const A = Math.min(Gh(V), Tl), N = vS((le) => V.next(A * le).value, A, 30);
|
|
return A + "ms " + N;
|
|
},
|
|
toTransition: () => {
|
|
}
|
|
};
|
|
return V;
|
|
}
|
|
Pl.applyToOptions = (e) => {
|
|
const t = uz(e, 100, Pl);
|
|
return e.ease = t.ease, e.duration = /* @__PURE__ */ lt(t.duration), e.type = "keyframes", e;
|
|
};
|
|
const gz = 5;
|
|
function SS(e, t, n) {
|
|
const r = Math.max(t - gz, 0);
|
|
return /* @__PURE__ */ Z1(n - e(r), t - r);
|
|
}
|
|
function Qd({ keyframes: e, velocity: t = 0, power: n = 0.8, timeConstant: r = 325, bounceDamping: o = 10, bounceStiffness: i = 500, modifyTarget: s, min: a, max: l, restDelta: u = 0.5, restSpeed: c }) {
|
|
const d = e[0], f = {
|
|
done: !1,
|
|
value: d
|
|
}, y = ($) => a !== void 0 && $ < a || l !== void 0 && $ > l, v = ($) => a === void 0 ? l : l === void 0 || Math.abs(a - $) < Math.abs(l - $) ? a : l;
|
|
let S = n * t;
|
|
const k = d + S, p = s === void 0 ? k : s(k);
|
|
p !== k && (S = p - d);
|
|
const h = ($) => -S * Math.exp(-$ / r), g = ($) => p + h($), w = ($) => {
|
|
const V = h($), A = g($);
|
|
f.done = Math.abs(V) <= u, f.value = f.done ? p : A;
|
|
};
|
|
let E, _;
|
|
const P = ($) => {
|
|
y(f.value) && (E = $, _ = Pl({
|
|
keyframes: [f.value, v(f.value)],
|
|
velocity: SS(g, $, f.value),
|
|
// TODO: This should be passing * 1000
|
|
damping: o,
|
|
stiffness: i,
|
|
restDelta: u,
|
|
restSpeed: c
|
|
}));
|
|
};
|
|
return P(0), {
|
|
calculatedDuration: null,
|
|
next: ($) => {
|
|
let V = !1;
|
|
return !_ && E === void 0 && (V = !0, w($), P($)), E !== void 0 && $ >= E ? _.next($ - E) : (!V && w($), f);
|
|
}
|
|
};
|
|
}
|
|
function yz(e, t, n) {
|
|
const r = [], o = n || er.mix || yS, i = e.length - 1;
|
|
for (let s = 0; s < i; s++) {
|
|
let a = o(e[s], e[s + 1]);
|
|
if (t) {
|
|
const l = Array.isArray(t) ? t[s] || $t : t;
|
|
a = xs(l, a);
|
|
}
|
|
r.push(a);
|
|
}
|
|
return r;
|
|
}
|
|
function vz(e, t, { clamp: n = !0, ease: r, mixer: o } = {}) {
|
|
const i = e.length;
|
|
if (Dr(i === t.length, "Both input and output ranges must be the same length", "range-length"), i === 1)
|
|
return () => t[0];
|
|
if (i === 2 && t[0] === t[1])
|
|
return () => t[1];
|
|
const s = e[0] === e[1];
|
|
e[0] > e[i - 1] && (e = [...e].reverse(), t = [...t].reverse());
|
|
const a = yz(t, r, o), l = a.length, u = (c) => {
|
|
if (s && c < e[0])
|
|
return t[0];
|
|
let d = 0;
|
|
if (l > 1)
|
|
for (; d < e.length - 2 && !(c < e[d + 1]); d++)
|
|
;
|
|
const f = /* @__PURE__ */ ls(e[d], e[d + 1], c);
|
|
return a[d](f);
|
|
};
|
|
return n ? (c) => u(fn(e[0], e[i - 1], c)) : u;
|
|
}
|
|
function Sz(e, t) {
|
|
const n = e[e.length - 1];
|
|
for (let r = 1; r <= t; r++) {
|
|
const o = /* @__PURE__ */ ls(0, t, r);
|
|
e.push(oe(n, 1, o));
|
|
}
|
|
}
|
|
function bz(e) {
|
|
const t = [0];
|
|
return Sz(t, e.length - 1), t;
|
|
}
|
|
function xz(e, t) {
|
|
return e.map((n) => n * t);
|
|
}
|
|
function wz(e, t) {
|
|
return e.map(() => t || aS).splice(0, e.length - 1);
|
|
}
|
|
function Ii({ duration: e = 300, keyframes: t, times: n, ease: r = "easeInOut" }) {
|
|
const o = /* @__PURE__ */ RR(r) ? r.map(kg) : kg(r), i = {
|
|
done: !1,
|
|
value: t[0]
|
|
}, s = xz(
|
|
// Only use the provided offsets if they're the correct length
|
|
// TODO Maybe we should warn here if there's a length mismatch
|
|
n && n.length === t.length ? n : bz(t),
|
|
e
|
|
), a = vz(s, t, {
|
|
ease: Array.isArray(o) ? o : wz(t, o)
|
|
});
|
|
return {
|
|
calculatedDuration: e,
|
|
next: (l) => (i.value = a(l), i.done = l >= e, i)
|
|
};
|
|
}
|
|
const kz = (e) => e !== null;
|
|
function gu(e, { repeat: t, repeatType: n = "loop" }, r, o = 1) {
|
|
const i = e.filter(kz), a = o < 0 || t && n !== "loop" && t % 2 === 1 ? 0 : i.length - 1;
|
|
return !a || r === void 0 ? i[a] : r;
|
|
}
|
|
const Cz = {
|
|
decay: Qd,
|
|
inertia: Qd,
|
|
tween: Ii,
|
|
keyframes: Ii,
|
|
spring: Pl
|
|
};
|
|
function bS(e) {
|
|
typeof e.type == "string" && (e.type = Cz[e.type]);
|
|
}
|
|
class Xh {
|
|
constructor() {
|
|
this.updateFinished();
|
|
}
|
|
get finished() {
|
|
return this._finished;
|
|
}
|
|
updateFinished() {
|
|
this._finished = new Promise((t) => {
|
|
this.resolve = t;
|
|
});
|
|
}
|
|
notifyFinished() {
|
|
this.resolve();
|
|
}
|
|
/**
|
|
* Allows the animation to be awaited.
|
|
*
|
|
* @deprecated Use `finished` instead.
|
|
*/
|
|
then(t, n) {
|
|
return this.finished.then(t, n);
|
|
}
|
|
}
|
|
const Tz = (e) => e / 100;
|
|
class El extends Xh {
|
|
constructor(t) {
|
|
super(), this.state = "idle", this.startTime = null, this.isStopped = !1, this.currentTime = 0, this.holdTime = null, this.playbackSpeed = 1, this.delayState = {
|
|
done: !1,
|
|
value: void 0
|
|
}, this.stop = () => {
|
|
const { motionValue: n } = this.options;
|
|
n && n.updatedAt !== Qe.now() && this.tick(Qe.now()), this.isStopped = !0, this.state !== "idle" && (this.teardown(), this.options.onStop?.());
|
|
}, this.options = t, this.initAnimation(), this.play(), t.autoplay === !1 && this.pause();
|
|
}
|
|
initAnimation() {
|
|
const { options: t } = this;
|
|
bS(t);
|
|
const { type: n = Ii, repeat: r = 0, repeatDelay: o = 0, repeatType: i, velocity: s = 0 } = t;
|
|
let { keyframes: a } = t;
|
|
const l = n || Ii;
|
|
l !== Ii && typeof a[0] != "number" && (this.mixKeyframes = xs(Tz, yS(a[0], a[1])), a = [0, 100]);
|
|
const u = l({ ...t, keyframes: a });
|
|
i === "mirror" && (this.mirroredGenerator = l({
|
|
...t,
|
|
keyframes: [...a].reverse(),
|
|
velocity: -s
|
|
})), u.calculatedDuration === null && (u.calculatedDuration = Gh(u));
|
|
const { calculatedDuration: c } = u;
|
|
this.calculatedDuration = c, this.resolvedDuration = c + o, this.totalDuration = this.resolvedDuration * (r + 1) - o, this.generator = u;
|
|
}
|
|
updateTime(t) {
|
|
const n = Math.round(t - this.startTime) * this.playbackSpeed;
|
|
this.holdTime !== null ? this.currentTime = this.holdTime : this.currentTime = n;
|
|
}
|
|
tick(t, n = !1) {
|
|
const { generator: r, totalDuration: o, mixKeyframes: i, mirroredGenerator: s, resolvedDuration: a, calculatedDuration: l } = this;
|
|
if (this.startTime === null)
|
|
return r.next(0);
|
|
const { delay: u = 0, keyframes: c, repeat: d, repeatType: f, repeatDelay: y, type: v, onUpdate: S, finalKeyframe: k } = this.options;
|
|
this.speed > 0 ? this.startTime = Math.min(this.startTime, t) : this.speed < 0 && (this.startTime = Math.min(t - o / this.speed, this.startTime)), n ? this.currentTime = t : this.updateTime(t);
|
|
const p = this.currentTime - u * (this.playbackSpeed >= 0 ? 1 : -1), h = this.playbackSpeed >= 0 ? p < 0 : p > o;
|
|
this.currentTime = Math.max(p, 0), this.state === "finished" && this.holdTime === null && (this.currentTime = o);
|
|
let g = this.currentTime, w = r;
|
|
if (d) {
|
|
const $ = Math.min(this.currentTime, o) / a;
|
|
let V = Math.floor($), A = $ % 1;
|
|
!A && $ >= 1 && (A = 1), A === 1 && V--, V = Math.min(V, d + 1), !!(V % 2) && (f === "reverse" ? (A = 1 - A, y && (A -= y / a)) : f === "mirror" && (w = s)), g = fn(0, 1, A) * a;
|
|
}
|
|
let E;
|
|
h ? (this.delayState.value = c[0], E = this.delayState) : E = w.next(g), i && !h && (E.value = i(E.value));
|
|
let { done: _ } = E;
|
|
!h && l !== null && (_ = this.playbackSpeed >= 0 ? this.currentTime >= o : this.currentTime <= 0);
|
|
const P = this.holdTime === null && (this.state === "finished" || this.state === "running" && _);
|
|
return P && v !== Qd && (E.value = gu(c, this.options, k, this.speed)), S && S(E.value), P && this.finish(), E;
|
|
}
|
|
/**
|
|
* Allows the returned animation to be awaited or promise-chained. Currently
|
|
* resolves when the animation finishes at all but in a future update could/should
|
|
* reject if its cancels.
|
|
*/
|
|
then(t, n) {
|
|
return this.finished.then(t, n);
|
|
}
|
|
get duration() {
|
|
return /* @__PURE__ */ Et(this.calculatedDuration);
|
|
}
|
|
get iterationDuration() {
|
|
const { delay: t = 0 } = this.options || {};
|
|
return this.duration + /* @__PURE__ */ Et(t);
|
|
}
|
|
get time() {
|
|
return /* @__PURE__ */ Et(this.currentTime);
|
|
}
|
|
set time(t) {
|
|
t = /* @__PURE__ */ lt(t), this.currentTime = t, this.startTime === null || this.holdTime !== null || this.playbackSpeed === 0 ? this.holdTime = t : this.driver && (this.startTime = this.driver.now() - t / this.playbackSpeed), this.driver ? this.driver.start(!1) : (this.startTime = 0, this.state = "paused", this.holdTime = t, this.tick(t));
|
|
}
|
|
/**
|
|
* Returns the generator's velocity at the current time in units/second.
|
|
* Uses the analytical derivative when available (springs), avoiding
|
|
* the MotionValue's frame-dependent velocity estimation.
|
|
*/
|
|
getGeneratorVelocity() {
|
|
const t = this.currentTime;
|
|
if (t <= 0)
|
|
return this.options.velocity || 0;
|
|
if (this.generator.velocity)
|
|
return this.generator.velocity(t);
|
|
const n = this.generator.next(t).value;
|
|
return SS((r) => this.generator.next(r).value, t, n);
|
|
}
|
|
get speed() {
|
|
return this.playbackSpeed;
|
|
}
|
|
set speed(t) {
|
|
const n = this.playbackSpeed !== t;
|
|
n && this.driver && this.updateTime(Qe.now()), this.playbackSpeed = t, n && this.driver && (this.time = /* @__PURE__ */ Et(this.currentTime));
|
|
}
|
|
play() {
|
|
if (this.isStopped)
|
|
return;
|
|
const { driver: t = lz, startTime: n } = this.options;
|
|
this.driver || (this.driver = t((o) => this.tick(o))), this.options.onPlay?.();
|
|
const r = this.driver.now();
|
|
this.state === "finished" ? (this.updateFinished(), this.startTime = r) : this.holdTime !== null ? this.startTime = r - this.holdTime : this.startTime || (this.startTime = n ?? r), this.state === "finished" && this.speed < 0 && (this.startTime += this.calculatedDuration), this.holdTime = null, this.state = "running", this.driver.start();
|
|
}
|
|
pause() {
|
|
this.state = "paused", this.updateTime(Qe.now()), this.holdTime = this.currentTime;
|
|
}
|
|
complete() {
|
|
this.state !== "running" && this.play(), this.state = "finished", this.holdTime = null;
|
|
}
|
|
finish() {
|
|
this.notifyFinished(), this.teardown(), this.state = "finished", this.options.onComplete?.();
|
|
}
|
|
cancel() {
|
|
this.holdTime = null, this.startTime = 0, this.tick(0), this.teardown(), this.options.onCancel?.();
|
|
}
|
|
teardown() {
|
|
this.state = "idle", this.stopDriver(), this.startTime = this.holdTime = null;
|
|
}
|
|
stopDriver() {
|
|
this.driver && (this.driver.stop(), this.driver = void 0);
|
|
}
|
|
sample(t) {
|
|
return this.startTime = 0, this.tick(t, !0);
|
|
}
|
|
attachTimeline(t) {
|
|
return this.options.allowFlatten && (this.options.type = "keyframes", this.options.ease = "linear", this.initAnimation()), this.driver?.stop(), t.observe(this);
|
|
}
|
|
}
|
|
function Pz(e) {
|
|
for (let t = 1; t < e.length; t++)
|
|
e[t] ?? (e[t] = e[t - 1]);
|
|
}
|
|
const br = (e) => e * 180 / Math.PI, qd = (e) => {
|
|
const t = br(Math.atan2(e[1], e[0]));
|
|
return Zd(t);
|
|
}, Ez = {
|
|
x: 4,
|
|
y: 5,
|
|
translateX: 4,
|
|
translateY: 5,
|
|
scaleX: 0,
|
|
scaleY: 3,
|
|
scale: (e) => (Math.abs(e[0]) + Math.abs(e[3])) / 2,
|
|
rotate: qd,
|
|
rotateZ: qd,
|
|
skewX: (e) => br(Math.atan(e[1])),
|
|
skewY: (e) => br(Math.atan(e[2])),
|
|
skew: (e) => (Math.abs(e[1]) + Math.abs(e[2])) / 2
|
|
}, Zd = (e) => (e = e % 360, e < 0 && (e += 360), e), Ag = qd, Rg = (e) => Math.sqrt(e[0] * e[0] + e[1] * e[1]), zg = (e) => Math.sqrt(e[4] * e[4] + e[5] * e[5]), _z = {
|
|
x: 12,
|
|
y: 13,
|
|
z: 14,
|
|
translateX: 12,
|
|
translateY: 13,
|
|
translateZ: 14,
|
|
scaleX: Rg,
|
|
scaleY: zg,
|
|
scale: (e) => (Rg(e) + zg(e)) / 2,
|
|
rotateX: (e) => Zd(br(Math.atan2(e[6], e[5]))),
|
|
rotateY: (e) => Zd(br(Math.atan2(-e[2], e[0]))),
|
|
rotateZ: Ag,
|
|
rotate: Ag,
|
|
skewX: (e) => br(Math.atan(e[4])),
|
|
skewY: (e) => br(Math.atan(e[1])),
|
|
skew: (e) => (Math.abs(e[1]) + Math.abs(e[4])) / 2
|
|
};
|
|
function Jd(e) {
|
|
return e.includes("scale") ? 1 : 0;
|
|
}
|
|
function ef(e, t) {
|
|
if (!e || e === "none")
|
|
return Jd(t);
|
|
const n = e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);
|
|
let r, o;
|
|
if (n)
|
|
r = _z, o = n;
|
|
else {
|
|
const a = e.match(/^matrix\(([-\d.e\s,]+)\)$/u);
|
|
r = Ez, o = a;
|
|
}
|
|
if (!o)
|
|
return Jd(t);
|
|
const i = r[t], s = o[1].split(",").map(Az);
|
|
return typeof i == "function" ? i(s) : s[i];
|
|
}
|
|
const $z = (e, t) => {
|
|
const { transform: n = "none" } = getComputedStyle(e);
|
|
return ef(n, t);
|
|
};
|
|
function Az(e) {
|
|
return parseFloat(e.trim());
|
|
}
|
|
const Wo = [
|
|
"transformPerspective",
|
|
"x",
|
|
"y",
|
|
"z",
|
|
"translateX",
|
|
"translateY",
|
|
"translateZ",
|
|
"scale",
|
|
"scaleX",
|
|
"scaleY",
|
|
"rotate",
|
|
"rotateX",
|
|
"rotateY",
|
|
"rotateZ",
|
|
"skew",
|
|
"skewX",
|
|
"skewY"
|
|
], Uo = /* @__PURE__ */ new Set([...Wo, "pathRotation"]), Mg = (e) => e === No || e === I, Rz = /* @__PURE__ */ new Set(["x", "y", "z"]), zz = Wo.filter((e) => !Rz.has(e));
|
|
function Mz(e) {
|
|
const t = [];
|
|
return zz.forEach((n) => {
|
|
const r = e.getValue(n);
|
|
r !== void 0 && (t.push([n, r.get()]), r.set(n.startsWith("scale") ? 1 : 0));
|
|
}), t;
|
|
}
|
|
const Wn = {
|
|
// Dimensions
|
|
width: ({ x: e }, { paddingLeft: t = "0", paddingRight: n = "0", boxSizing: r }) => {
|
|
const o = e.max - e.min;
|
|
return r === "border-box" ? o : o - parseFloat(t) - parseFloat(n);
|
|
},
|
|
height: ({ y: e }, { paddingTop: t = "0", paddingBottom: n = "0", boxSizing: r }) => {
|
|
const o = e.max - e.min;
|
|
return r === "border-box" ? o : o - parseFloat(t) - parseFloat(n);
|
|
},
|
|
top: (e, { top: t }) => parseFloat(t),
|
|
left: (e, { left: t }) => parseFloat(t),
|
|
bottom: ({ y: e }, { top: t }) => parseFloat(t) + (e.max - e.min),
|
|
right: ({ x: e }, { left: t }) => parseFloat(t) + (e.max - e.min),
|
|
// Transform
|
|
x: (e, { transform: t }) => ef(t, "x"),
|
|
y: (e, { transform: t }) => ef(t, "y")
|
|
};
|
|
Wn.translateX = Wn.x;
|
|
Wn.translateY = Wn.y;
|
|
const Pr = /* @__PURE__ */ new Set();
|
|
let tf = !1, nf = !1, rf = !1;
|
|
function xS() {
|
|
if (nf) {
|
|
const e = Array.from(Pr).filter((r) => r.needsMeasurement), t = new Set(e.map((r) => r.element)), n = /* @__PURE__ */ new Map();
|
|
t.forEach((r) => {
|
|
const o = Mz(r);
|
|
o.length && (n.set(r, o), r.render());
|
|
}), e.forEach((r) => r.measureInitialState()), t.forEach((r) => {
|
|
r.render();
|
|
const o = n.get(r);
|
|
o && o.forEach(([i, s]) => {
|
|
r.getValue(i)?.set(s);
|
|
});
|
|
}), e.forEach((r) => r.measureEndState()), e.forEach((r) => {
|
|
r.suspendedScrollY !== void 0 && window.scrollTo(0, r.suspendedScrollY);
|
|
});
|
|
}
|
|
nf = !1, tf = !1, Pr.forEach((e) => e.complete(rf)), Pr.clear();
|
|
}
|
|
function wS() {
|
|
Pr.forEach((e) => {
|
|
e.readKeyframes(), e.needsMeasurement && (nf = !0);
|
|
});
|
|
}
|
|
function Dz() {
|
|
rf = !0, wS(), xS(), rf = !1;
|
|
}
|
|
class Yh {
|
|
constructor(t, n, r, o, i, s = !1) {
|
|
this.state = "pending", this.isAsync = !1, this.needsMeasurement = !1, this.unresolvedKeyframes = [...t], this.onComplete = n, this.name = r, this.motionValue = o, this.element = i, this.isAsync = s;
|
|
}
|
|
scheduleResolve() {
|
|
this.state = "scheduled", this.isAsync ? (Pr.add(this), tf || (tf = !0, ie.read(wS), ie.resolveKeyframes(xS))) : (this.readKeyframes(), this.complete());
|
|
}
|
|
readKeyframes() {
|
|
const { unresolvedKeyframes: t, name: n, element: r, motionValue: o } = this;
|
|
if (t[0] === null) {
|
|
const i = o?.get(), s = t[t.length - 1];
|
|
if (i !== void 0)
|
|
t[0] = i;
|
|
else if (r && n) {
|
|
const a = r.readValue(n, s);
|
|
a != null && (t[0] = a);
|
|
}
|
|
t[0] === void 0 && (t[0] = s), o && i === void 0 && o.set(t[0]);
|
|
}
|
|
Pz(t);
|
|
}
|
|
setFinalKeyframe() {
|
|
}
|
|
measureInitialState() {
|
|
}
|
|
renderEndStyles() {
|
|
}
|
|
measureEndState() {
|
|
}
|
|
complete(t = !1) {
|
|
this.state = "complete", this.onComplete(this.unresolvedKeyframes, this.finalKeyframe, t), Pr.delete(this);
|
|
}
|
|
cancel() {
|
|
this.state === "scheduled" && (Pr.delete(this), this.state = "pending");
|
|
}
|
|
resume() {
|
|
this.state === "pending" && this.scheduleResolve();
|
|
}
|
|
}
|
|
const Iz = (e) => e.startsWith("--");
|
|
function kS(e, t, n) {
|
|
Iz(t) ? e.style.setProperty(t, n) : e.style[t] = n;
|
|
}
|
|
const Lz = {};
|
|
function CS(e, t) {
|
|
const n = /* @__PURE__ */ q1(e);
|
|
return () => Lz[t] ?? n();
|
|
}
|
|
const Vz = /* @__PURE__ */ CS(() => window.ScrollTimeline !== void 0, "scrollTimeline"), TS = /* @__PURE__ */ CS(() => {
|
|
try {
|
|
document.createElement("div").animate({ opacity: 0 }, { easing: "linear(0, 1)" });
|
|
} catch {
|
|
return !1;
|
|
}
|
|
return !0;
|
|
}, "linearEasing"), vi = ([e, t, n, r]) => `cubic-bezier(${e}, ${t}, ${n}, ${r})`, Dg = {
|
|
linear: "linear",
|
|
ease: "ease",
|
|
easeIn: "ease-in",
|
|
easeOut: "ease-out",
|
|
easeInOut: "ease-in-out",
|
|
circIn: /* @__PURE__ */ vi([0, 0.65, 0.55, 1]),
|
|
circOut: /* @__PURE__ */ vi([0.55, 0, 1, 0.45]),
|
|
backIn: /* @__PURE__ */ vi([0.31, 0.01, 0.66, -0.59]),
|
|
backOut: /* @__PURE__ */ vi([0.33, 1.53, 0.69, 0.99])
|
|
};
|
|
function PS(e, t) {
|
|
if (e)
|
|
return typeof e == "function" ? TS() ? vS(e, t) : "ease-out" : /* @__PURE__ */ lS(e) ? vi(e) : Array.isArray(e) ? e.map((n) => PS(n, t) || Dg.easeOut) : Dg[e];
|
|
}
|
|
function Bz(e, t, n, { delay: r = 0, duration: o = 300, repeat: i = 0, repeatType: s = "loop", ease: a = "easeOut", times: l } = {}, u = void 0) {
|
|
const c = {
|
|
[t]: n
|
|
};
|
|
l && (c.offset = l);
|
|
const d = PS(a, o);
|
|
Array.isArray(d) && (c.easing = d);
|
|
const f = {
|
|
delay: r,
|
|
duration: o,
|
|
easing: Array.isArray(d) ? "linear" : d,
|
|
fill: "both",
|
|
iterations: i + 1,
|
|
direction: s === "reverse" ? "alternate" : "normal"
|
|
};
|
|
return u && (f.pseudoElement = u), e.animate(c, f);
|
|
}
|
|
function ES(e) {
|
|
return typeof e == "function" && "applyToOptions" in e;
|
|
}
|
|
function Fz({ type: e, ...t }) {
|
|
return ES(e) && TS() ? e.applyToOptions(t) : (t.duration ?? (t.duration = 300), t.ease ?? (t.ease = "easeOut"), t);
|
|
}
|
|
class _S extends Xh {
|
|
constructor(t) {
|
|
if (super(), this.finishedTime = null, this.isStopped = !1, this.manualStartTime = null, !t)
|
|
return;
|
|
const { element: n, name: r, keyframes: o, pseudoElement: i, allowFlatten: s = !1, finalKeyframe: a, onComplete: l } = t;
|
|
this.isPseudoElement = !!i, this.allowFlatten = s, this.options = t, Dr(typeof t.type != "string", `Mini animate() doesn't support "type" as a string.`, "mini-spring");
|
|
const u = Fz(t);
|
|
this.animation = Bz(n, r, o, u, i), u.autoplay === !1 && this.animation.pause(), this.animation.onfinish = () => {
|
|
if (this.finishedTime = this.time, !i) {
|
|
const c = gu(o, this.options, a, this.speed);
|
|
this.updateMotionValue && this.updateMotionValue(c), kS(n, r, c), this.animation.cancel();
|
|
}
|
|
l?.(), this.notifyFinished();
|
|
};
|
|
}
|
|
play() {
|
|
this.isStopped || (this.manualStartTime = null, this.animation.play(), this.state === "finished" && this.updateFinished());
|
|
}
|
|
pause() {
|
|
this.animation.pause();
|
|
}
|
|
complete() {
|
|
this.animation.finish?.();
|
|
}
|
|
cancel() {
|
|
try {
|
|
this.animation.cancel();
|
|
} catch {
|
|
}
|
|
}
|
|
stop() {
|
|
if (this.isStopped)
|
|
return;
|
|
this.isStopped = !0;
|
|
const { state: t } = this;
|
|
t === "idle" || t === "finished" || (this.updateMotionValue ? this.updateMotionValue() : this.commitStyles(), this.isPseudoElement || this.cancel());
|
|
}
|
|
/**
|
|
* WAAPI doesn't natively have any interruption capabilities.
|
|
*
|
|
* In this method, we commit styles back to the DOM before cancelling
|
|
* the animation.
|
|
*
|
|
* This is designed to be overridden by NativeAnimationExtended, which
|
|
* will create a renderless JS animation and sample it twice to calculate
|
|
* its current value, "previous" value, and therefore allow
|
|
* Motion to also correctly calculate velocity for any subsequent animation
|
|
* while deferring the commit until the next animation frame.
|
|
*/
|
|
commitStyles() {
|
|
const t = this.options?.element;
|
|
!this.isPseudoElement && t?.isConnected && this.animation.commitStyles?.();
|
|
}
|
|
get duration() {
|
|
const t = this.animation.effect?.getComputedTiming?.().duration || 0;
|
|
return /* @__PURE__ */ Et(Number(t));
|
|
}
|
|
get iterationDuration() {
|
|
const { delay: t = 0 } = this.options || {};
|
|
return this.duration + /* @__PURE__ */ Et(t);
|
|
}
|
|
get time() {
|
|
return /* @__PURE__ */ Et(Number(this.animation.currentTime) || 0);
|
|
}
|
|
set time(t) {
|
|
const n = this.finishedTime !== null;
|
|
this.manualStartTime = null, this.finishedTime = null, this.animation.currentTime = /* @__PURE__ */ lt(t), n && this.animation.pause();
|
|
}
|
|
/**
|
|
* The playback speed of the animation.
|
|
* 1 = normal speed, 2 = double speed, 0.5 = half speed.
|
|
*/
|
|
get speed() {
|
|
return this.animation.playbackRate;
|
|
}
|
|
set speed(t) {
|
|
t < 0 && (this.finishedTime = null), this.animation.playbackRate = t;
|
|
}
|
|
get state() {
|
|
return this.finishedTime !== null ? "finished" : this.animation.playState;
|
|
}
|
|
get startTime() {
|
|
return this.manualStartTime ?? Number(this.animation.startTime);
|
|
}
|
|
set startTime(t) {
|
|
this.manualStartTime = this.animation.startTime = t;
|
|
}
|
|
/**
|
|
* Attaches a timeline to the animation, for instance the `ScrollTimeline`.
|
|
*/
|
|
attachTimeline({ timeline: t, rangeStart: n, rangeEnd: r, observe: o }) {
|
|
return this.allowFlatten && this.animation.effect?.updateTiming({ easing: "linear" }), this.animation.onfinish = null, t && Vz() ? (this.animation.timeline = t, n && (this.animation.rangeStart = n), r && (this.animation.rangeEnd = r), $t) : o(this);
|
|
}
|
|
}
|
|
const $S = {
|
|
anticipate: oS,
|
|
backInOut: rS,
|
|
circInOut: sS
|
|
};
|
|
function jz(e) {
|
|
return e in $S;
|
|
}
|
|
function Oz(e) {
|
|
typeof e.ease == "string" && jz(e.ease) && (e.ease = $S[e.ease]);
|
|
}
|
|
const $c = 10;
|
|
class Nz extends _S {
|
|
constructor(t) {
|
|
Oz(t), bS(t), super(t), t.startTime !== void 0 && t.autoplay !== !1 && (this.startTime = t.startTime), this.options = t;
|
|
}
|
|
/**
|
|
* WAAPI doesn't natively have any interruption capabilities.
|
|
*
|
|
* Rather than read committed styles back out of the DOM, we can
|
|
* create a renderless JS animation and sample it twice to calculate
|
|
* its current value, "previous" value, and therefore allow
|
|
* Motion to calculate velocity for any subsequent animation.
|
|
*/
|
|
updateMotionValue(t) {
|
|
const { motionValue: n, onUpdate: r, onComplete: o, element: i, ...s } = this.options;
|
|
if (!n)
|
|
return;
|
|
if (t !== void 0) {
|
|
n.set(t);
|
|
return;
|
|
}
|
|
const a = new El({
|
|
...s,
|
|
autoplay: !1
|
|
}), l = Math.max($c, Qe.now() - this.startTime), u = fn(0, $c, l - $c), c = a.sample(l).value, { name: d } = this.options;
|
|
i && d && kS(i, d, c), n.setWithVelocity(a.sample(Math.max(0, l - u)).value, c, u), a.stop();
|
|
}
|
|
}
|
|
const Ig = (e, t) => t === "zIndex" ? !1 : !!(typeof e == "number" || Array.isArray(e) || typeof e == "string" && // It's animatable if we have a string
|
|
(Ht.test(e) || e === "0") && // And it contains numbers and/or colors
|
|
!e.startsWith("url("));
|
|
function Wz(e) {
|
|
const t = e[0];
|
|
if (e.length === 1)
|
|
return !0;
|
|
for (let n = 0; n < e.length; n++)
|
|
if (e[n] !== t)
|
|
return !0;
|
|
}
|
|
function Uz(e, t, n, r) {
|
|
const o = e[0];
|
|
if (o === null)
|
|
return !1;
|
|
if (t === "display" || t === "visibility")
|
|
return !0;
|
|
const i = e[e.length - 1], s = Ig(o, t), a = Ig(i, t);
|
|
return bs(s === a, `You are trying to animate ${t} from "${o}" to "${i}". "${s ? i : o}" is not an animatable value.`, "value-not-animatable"), !s || !a ? !1 : Wz(e) || (n === "spring" || ES(n)) && r;
|
|
}
|
|
function of(e) {
|
|
e.duration = 0, e.type = "keyframes";
|
|
}
|
|
const AS = /* @__PURE__ */ new Set([
|
|
"opacity",
|
|
"clipPath",
|
|
"filter",
|
|
"transform"
|
|
// TODO: Can be accelerated but currently disabled until https://issues.chromium.org/issues/41491098 is resolved
|
|
// or until we implement support for linear() easing.
|
|
// "background-color"
|
|
]), Hz = /^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;
|
|
function Kz(e) {
|
|
for (let t = 0; t < e.length; t++)
|
|
if (typeof e[t] == "string" && Hz.test(e[t]))
|
|
return !0;
|
|
return !1;
|
|
}
|
|
const Gz = /* @__PURE__ */ new Set([
|
|
"color",
|
|
"backgroundColor",
|
|
"outlineColor",
|
|
"fill",
|
|
"stroke",
|
|
"borderColor",
|
|
"borderTopColor",
|
|
"borderRightColor",
|
|
"borderBottomColor",
|
|
"borderLeftColor"
|
|
]), Xz = /* @__PURE__ */ q1(() => Object.hasOwnProperty.call(Element.prototype, "animate"));
|
|
function Yz(e) {
|
|
const { motionValue: t, name: n, repeatDelay: r, repeatType: o, damping: i, type: s, keyframes: a } = e;
|
|
if (!(t?.owner?.current instanceof HTMLElement))
|
|
return !1;
|
|
const { onUpdate: u, transformTemplate: c } = t.owner.getProps();
|
|
return Xz() && n && /**
|
|
* Force WAAPI for color properties with browser-only color formats
|
|
* (oklch, oklab, lab, lch, etc.) that the JS animation path can't parse.
|
|
*/
|
|
(AS.has(n) || Gz.has(n) && Kz(a)) && (n !== "transform" || !c) && /**
|
|
* If we're outputting values to onUpdate then we can't use WAAPI as there's
|
|
* no way to read the value from WAAPI every frame.
|
|
*/
|
|
!u && !r && o !== "mirror" && i !== 0 && s !== "inertia";
|
|
}
|
|
const Qz = 40;
|
|
class qz extends Xh {
|
|
constructor({ autoplay: t = !0, delay: n = 0, type: r = "keyframes", repeat: o = 0, repeatDelay: i = 0, repeatType: s = "loop", keyframes: a, name: l, motionValue: u, element: c, ...d }) {
|
|
super(), this.stop = () => {
|
|
this._animation && (this._animation.stop(), this.stopTimeline?.()), this.keyframeResolver?.cancel();
|
|
}, this.createdAt = Qe.now();
|
|
const f = {
|
|
autoplay: t,
|
|
delay: n,
|
|
type: r,
|
|
repeat: o,
|
|
repeatDelay: i,
|
|
repeatType: s,
|
|
name: l,
|
|
motionValue: u,
|
|
element: c,
|
|
...d
|
|
}, y = c?.KeyframeResolver || Yh;
|
|
this.keyframeResolver = new y(a, (v, S, k) => this.onKeyframesResolved(v, S, f, !k), l, u, c), this.keyframeResolver?.scheduleResolve();
|
|
}
|
|
onKeyframesResolved(t, n, r, o) {
|
|
this.keyframeResolver = void 0;
|
|
const { name: i, type: s, velocity: a, delay: l, isHandoff: u, onUpdate: c } = r;
|
|
this.resolvedAt = Qe.now();
|
|
let d = !0;
|
|
Uz(t, i, s, a) || (d = !1, (er.instantAnimations || !l) && c?.(gu(t, r, n)), t[0] = t[t.length - 1], of(r), r.repeat = 0);
|
|
const y = {
|
|
startTime: o ? this.resolvedAt ? this.resolvedAt - this.createdAt > Qz ? this.resolvedAt : this.createdAt : this.createdAt : void 0,
|
|
finalKeyframe: n,
|
|
...r,
|
|
keyframes: t
|
|
}, v = d && !u && Yz(y), S = y.motionValue?.owner?.current;
|
|
let k;
|
|
if (v)
|
|
try {
|
|
k = new Nz({
|
|
...y,
|
|
element: S
|
|
});
|
|
} catch {
|
|
k = new El(y);
|
|
}
|
|
else
|
|
k = new El(y);
|
|
k.finished.then(() => {
|
|
this.notifyFinished();
|
|
}).catch($t), this.pendingTimeline && (this.stopTimeline = k.attachTimeline(this.pendingTimeline), this.pendingTimeline = void 0), this._animation = k;
|
|
}
|
|
get finished() {
|
|
return this._animation ? this.animation.finished : this._finished;
|
|
}
|
|
then(t, n) {
|
|
return this.finished.finally(t).then(() => {
|
|
});
|
|
}
|
|
get animation() {
|
|
return this._animation || (this.keyframeResolver?.resume(), Dz()), this._animation;
|
|
}
|
|
get duration() {
|
|
return this.animation.duration;
|
|
}
|
|
get iterationDuration() {
|
|
return this.animation.iterationDuration;
|
|
}
|
|
get time() {
|
|
return this.animation.time;
|
|
}
|
|
set time(t) {
|
|
this.animation.time = t;
|
|
}
|
|
get speed() {
|
|
return this.animation.speed;
|
|
}
|
|
get state() {
|
|
return this.animation.state;
|
|
}
|
|
set speed(t) {
|
|
this.animation.speed = t;
|
|
}
|
|
get startTime() {
|
|
return this.animation.startTime;
|
|
}
|
|
attachTimeline(t) {
|
|
return this._animation ? this.stopTimeline = this.animation.attachTimeline(t) : this.pendingTimeline = t, () => this.stop();
|
|
}
|
|
play() {
|
|
this.animation.play();
|
|
}
|
|
pause() {
|
|
this.animation.pause();
|
|
}
|
|
complete() {
|
|
this.animation.complete();
|
|
}
|
|
cancel() {
|
|
this._animation && this.animation.cancel(), this.keyframeResolver?.cancel();
|
|
}
|
|
}
|
|
function RS(e, t, n, r = 0, o = 1) {
|
|
const i = Array.from(e).sort((u, c) => u.sortNodePosition(c)).indexOf(t), s = e.size, a = (s - 1) * r;
|
|
return typeof n == "function" ? n(i, s) : o === 1 ? i * r : a - i * r;
|
|
}
|
|
const Lg = 30, Zz = (e) => !isNaN(parseFloat(e));
|
|
class Jz {
|
|
/**
|
|
* @param init - The initiating value
|
|
* @param config - Optional configuration options
|
|
*
|
|
* - `transformer`: A function to transform incoming values with.
|
|
*/
|
|
constructor(t, n = {}) {
|
|
this.canTrackVelocity = null, this.events = {}, this.updateAndNotify = (r) => {
|
|
const o = Qe.now();
|
|
if (this.updatedAt !== o && this.setPrevFrameValue(), this.prev = this.current, this.setCurrent(r), this.current !== this.prev && (this.events.change?.notify(this.current), this.dependents))
|
|
for (const i of this.dependents)
|
|
i.dirty();
|
|
}, this.hasAnimated = !1, this.setCurrent(t), this.owner = n.owner;
|
|
}
|
|
setCurrent(t) {
|
|
this.current = t, this.updatedAt = Qe.now(), this.canTrackVelocity === null && t !== void 0 && (this.canTrackVelocity = Zz(this.current));
|
|
}
|
|
setPrevFrameValue(t = this.current) {
|
|
this.prevFrameValue = t, this.prevUpdatedAt = this.updatedAt;
|
|
}
|
|
/**
|
|
* Adds a function that will be notified when the `MotionValue` is updated.
|
|
*
|
|
* It returns a function that, when called, will cancel the subscription.
|
|
*
|
|
* When calling `onChange` inside a React component, it should be wrapped with the
|
|
* `useEffect` hook. As it returns an unsubscribe function, this should be returned
|
|
* from the `useEffect` function to ensure you don't add duplicate subscribers..
|
|
*
|
|
* ```jsx
|
|
* export const MyComponent = () => {
|
|
* const x = useMotionValue(0)
|
|
* const y = useMotionValue(0)
|
|
* const opacity = useMotionValue(1)
|
|
*
|
|
* useEffect(() => {
|
|
* function updateOpacity() {
|
|
* const maxXY = Math.max(x.get(), y.get())
|
|
* const newOpacity = transform(maxXY, [0, 100], [1, 0])
|
|
* opacity.set(newOpacity)
|
|
* }
|
|
*
|
|
* const unsubscribeX = x.on("change", updateOpacity)
|
|
* const unsubscribeY = y.on("change", updateOpacity)
|
|
*
|
|
* return () => {
|
|
* unsubscribeX()
|
|
* unsubscribeY()
|
|
* }
|
|
* }, [])
|
|
*
|
|
* return <motion.div style={{ x }} />
|
|
* }
|
|
* ```
|
|
*
|
|
* @param subscriber - A function that receives the latest value.
|
|
* @returns A function that, when called, will cancel this subscription.
|
|
*
|
|
* @deprecated
|
|
*/
|
|
onChange(t) {
|
|
return this.on("change", t);
|
|
}
|
|
on(t, n) {
|
|
this.events[t] || (this.events[t] = new jh());
|
|
const r = this.events[t].add(n);
|
|
return t === "change" ? () => {
|
|
r(), ie.read(() => {
|
|
this.events.change.getSize() || this.stop();
|
|
});
|
|
} : r;
|
|
}
|
|
clearListeners() {
|
|
for (const t in this.events)
|
|
this.events[t].clear();
|
|
}
|
|
/**
|
|
* Attaches a passive effect to the `MotionValue`.
|
|
*/
|
|
attach(t, n) {
|
|
this.passiveEffect = t, this.stopPassiveEffect = n;
|
|
}
|
|
/**
|
|
* Sets the state of the `MotionValue`.
|
|
*
|
|
* @remarks
|
|
*
|
|
* ```jsx
|
|
* const x = useMotionValue(0)
|
|
* x.set(10)
|
|
* ```
|
|
*
|
|
* @param latest - Latest value to set.
|
|
* @param render - Whether to notify render subscribers. Defaults to `true`
|
|
*
|
|
* @public
|
|
*/
|
|
set(t) {
|
|
this.passiveEffect ? this.passiveEffect(t, this.updateAndNotify) : this.updateAndNotify(t);
|
|
}
|
|
setWithVelocity(t, n, r) {
|
|
this.set(n), this.prev = void 0, this.prevFrameValue = t, this.prevUpdatedAt = this.updatedAt - r;
|
|
}
|
|
/**
|
|
* Set the state of the `MotionValue`, stopping any active animations,
|
|
* effects, and resets velocity to `0`.
|
|
*/
|
|
jump(t, n = !0) {
|
|
this.updateAndNotify(t), this.prev = t, this.prevUpdatedAt = this.prevFrameValue = void 0, n && this.stop(), this.stopPassiveEffect && this.stopPassiveEffect();
|
|
}
|
|
dirty() {
|
|
this.events.change?.notify(this.current);
|
|
}
|
|
addDependent(t) {
|
|
this.dependents || (this.dependents = /* @__PURE__ */ new Set()), this.dependents.add(t);
|
|
}
|
|
removeDependent(t) {
|
|
this.dependents && this.dependents.delete(t);
|
|
}
|
|
/**
|
|
* Returns the latest state of `MotionValue`
|
|
*
|
|
* @returns - The latest state of `MotionValue`
|
|
*
|
|
* @public
|
|
*/
|
|
get() {
|
|
return this.current;
|
|
}
|
|
/**
|
|
* @public
|
|
*/
|
|
getPrevious() {
|
|
return this.prev;
|
|
}
|
|
/**
|
|
* Returns the latest velocity of `MotionValue`
|
|
*
|
|
* @returns - The latest velocity of `MotionValue`. Returns `0` if the state is non-numerical.
|
|
*
|
|
* @public
|
|
*/
|
|
getVelocity() {
|
|
const t = Qe.now();
|
|
if (!this.canTrackVelocity || this.prevFrameValue === void 0 || t - this.updatedAt > Lg)
|
|
return 0;
|
|
const n = Math.min(this.updatedAt - this.prevUpdatedAt, Lg);
|
|
return /* @__PURE__ */ Z1(parseFloat(this.current) - parseFloat(this.prevFrameValue), n);
|
|
}
|
|
/**
|
|
* Registers a new animation to control this `MotionValue`. Only one
|
|
* animation can drive a `MotionValue` at one time.
|
|
*
|
|
* ```jsx
|
|
* value.start()
|
|
* ```
|
|
*
|
|
* @param animation - A function that starts the provided animation
|
|
*/
|
|
start(t) {
|
|
return this.stop(), new Promise((n) => {
|
|
this.hasAnimated = !0, this.animation = t(n), this.events.animationStart && this.events.animationStart.notify();
|
|
}).then(() => {
|
|
this.events.animationComplete && this.events.animationComplete.notify(), this.clearAnimation();
|
|
});
|
|
}
|
|
/**
|
|
* Stop the currently active animation.
|
|
*
|
|
* @public
|
|
*/
|
|
stop() {
|
|
this.animation && (this.animation.stop(), this.events.animationCancel && this.events.animationCancel.notify()), this.clearAnimation();
|
|
}
|
|
/**
|
|
* Returns `true` if this value is currently animating.
|
|
*
|
|
* @public
|
|
*/
|
|
isAnimating() {
|
|
return !!this.animation;
|
|
}
|
|
clearAnimation() {
|
|
delete this.animation;
|
|
}
|
|
/**
|
|
* Destroy and clean up subscribers to this `MotionValue`.
|
|
*
|
|
* The `MotionValue` hooks like `useMotionValue` and `useTransform` automatically
|
|
* handle the lifecycle of the returned `MotionValue`, so this method is only necessary if you've manually
|
|
* created a `MotionValue` via the `motionValue` function.
|
|
*
|
|
* @public
|
|
*/
|
|
destroy() {
|
|
this.dependents?.clear(), this.events.destroy?.notify(), this.clearListeners(), this.stop(), this.stopPassiveEffect && this.stopPassiveEffect();
|
|
}
|
|
}
|
|
function Lo(e, t) {
|
|
return new Jz(e, t);
|
|
}
|
|
function zS(e, t) {
|
|
if (e?.inherit && t) {
|
|
const { inherit: n, ...r } = e;
|
|
return { ...t, ...r };
|
|
}
|
|
return e;
|
|
}
|
|
function Qh(e, t) {
|
|
const n = e?.[t] ?? e?.default ?? e;
|
|
return n !== e ? zS(n, e) : n;
|
|
}
|
|
const eM = {
|
|
type: "spring",
|
|
stiffness: 500,
|
|
damping: 25,
|
|
restSpeed: 10
|
|
}, tM = (e) => ({
|
|
type: "spring",
|
|
stiffness: 550,
|
|
damping: e === 0 ? 2 * Math.sqrt(550) : 30,
|
|
restSpeed: 10
|
|
}), nM = {
|
|
type: "keyframes",
|
|
duration: 0.8
|
|
}, rM = {
|
|
type: "keyframes",
|
|
ease: [0.25, 0.1, 0.35, 1],
|
|
duration: 0.3
|
|
}, oM = (e, { keyframes: t }) => t.length > 2 ? nM : Uo.has(e) ? e.startsWith("scale") ? tM(t[1]) : eM : rM, iM = /* @__PURE__ */ new Set([
|
|
"when",
|
|
"delay",
|
|
"delayChildren",
|
|
"staggerChildren",
|
|
"staggerDirection",
|
|
"repeat",
|
|
"repeatType",
|
|
"repeatDelay",
|
|
"from",
|
|
"elapsed"
|
|
]);
|
|
function sM(e) {
|
|
for (const t in e)
|
|
if (!iM.has(t))
|
|
return !0;
|
|
return !1;
|
|
}
|
|
const qh = (e, t, n, r = {}, o, i) => (s) => {
|
|
const a = Qh(r, e) || {}, l = a.delay || r.delay || 0;
|
|
let { elapsed: u = 0 } = r;
|
|
u = u - /* @__PURE__ */ lt(l);
|
|
const c = {
|
|
keyframes: Array.isArray(n) ? n : [null, n],
|
|
ease: "easeOut",
|
|
velocity: t.getVelocity(),
|
|
...a,
|
|
delay: -u,
|
|
onUpdate: (f) => {
|
|
t.set(f), a.onUpdate && a.onUpdate(f);
|
|
},
|
|
onComplete: () => {
|
|
s(), a.onComplete && a.onComplete();
|
|
},
|
|
name: e,
|
|
motionValue: t,
|
|
element: i ? void 0 : o
|
|
};
|
|
sM(a) || Object.assign(c, oM(e, c)), c.duration && (c.duration = /* @__PURE__ */ lt(c.duration)), c.repeatDelay && (c.repeatDelay = /* @__PURE__ */ lt(c.repeatDelay)), c.from !== void 0 && (c.keyframes[0] = c.from);
|
|
let d = !1;
|
|
if ((c.type === !1 || c.duration === 0 && !c.repeatDelay) && (of(c), c.delay === 0 && (d = !0)), (er.instantAnimations || er.skipAnimations || o?.shouldSkipAnimations || a.skipAnimations) && (d = !0, of(c), c.delay = 0), c.allowFlatten = !a.type && !a.ease, d && !i && t.get() !== void 0) {
|
|
const f = gu(c.keyframes, a);
|
|
if (f !== void 0) {
|
|
ie.update(() => {
|
|
c.onUpdate(f), c.onComplete();
|
|
});
|
|
return;
|
|
}
|
|
}
|
|
return a.isSync ? new El(c) : new qz(c);
|
|
}, aM = (
|
|
// eslint-disable-next-line redos-detector/no-unsafe-regex -- false positive, as it can match a lot of words
|
|
/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u
|
|
);
|
|
function lM(e) {
|
|
const t = aM.exec(e);
|
|
if (!t)
|
|
return [,];
|
|
const [, n, r, o] = t;
|
|
return [`--${n ?? r}`, o];
|
|
}
|
|
const uM = 4;
|
|
function MS(e, t, n = 1) {
|
|
Dr(n <= uM, `Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`, "max-css-var-depth");
|
|
const [r, o] = lM(e);
|
|
if (!r)
|
|
return;
|
|
const i = window.getComputedStyle(t).getPropertyValue(r);
|
|
if (i) {
|
|
const s = i.trim();
|
|
return X1(s) ? parseFloat(s) : s;
|
|
}
|
|
return Wh(o) ? MS(o, t, n + 1) : o;
|
|
}
|
|
function Vg(e) {
|
|
const t = [{}, {}];
|
|
return e?.values.forEach((n, r) => {
|
|
t[0][r] = n.get(), t[1][r] = n.getVelocity();
|
|
}), t;
|
|
}
|
|
function Zh(e, t, n, r) {
|
|
if (typeof t == "function") {
|
|
const [o, i] = Vg(r);
|
|
t = t(n !== void 0 ? n : e.custom, o, i);
|
|
}
|
|
if (typeof t == "string" && (t = e.variants && e.variants[t]), typeof t == "function") {
|
|
const [o, i] = Vg(r);
|
|
t = t(n !== void 0 ? n : e.custom, o, i);
|
|
}
|
|
return t;
|
|
}
|
|
function Er(e, t, n) {
|
|
const r = e.getProps();
|
|
return Zh(r, t, n !== void 0 ? n : r.custom, e);
|
|
}
|
|
const DS = /* @__PURE__ */ new Set([
|
|
"width",
|
|
"height",
|
|
"top",
|
|
"left",
|
|
"right",
|
|
"bottom",
|
|
...Wo
|
|
]), sf = (e) => Array.isArray(e);
|
|
function cM(e, t, n) {
|
|
e.hasValue(t) ? e.getValue(t).set(n) : e.addValue(t, Lo(n));
|
|
}
|
|
function dM(e) {
|
|
return sf(e) ? e[e.length - 1] || 0 : e;
|
|
}
|
|
function fM(e, t) {
|
|
const n = Er(e, t);
|
|
let { transitionEnd: r = {}, transition: o = {}, ...i } = n || {};
|
|
i = { ...i, ...r };
|
|
for (const s in i) {
|
|
const a = dM(i[s]);
|
|
cM(e, s, a);
|
|
}
|
|
}
|
|
const Be = (e) => !!(e && e.getVelocity);
|
|
function hM(e) {
|
|
return !!(Be(e) && e.add);
|
|
}
|
|
function af(e, t) {
|
|
const n = e.getValue("willChange");
|
|
if (hM(n))
|
|
return n.add(t);
|
|
if (!n && er.WillChange) {
|
|
const r = new er.WillChange("auto");
|
|
e.addValue("willChange", r), r.add(t);
|
|
}
|
|
}
|
|
function Jh(e) {
|
|
return e.replace(/([A-Z])/g, (t) => `-${t.toLowerCase()}`);
|
|
}
|
|
const pM = "framerAppearId", IS = "data-" + Jh(pM);
|
|
function LS(e) {
|
|
return e.props[IS];
|
|
}
|
|
function mM({ protectedKeys: e, needsAnimating: t }, n) {
|
|
const r = e.hasOwnProperty(n) && t[n] !== !0;
|
|
return t[n] = !1, r;
|
|
}
|
|
function VS(e, t, { delay: n = 0, transitionOverride: r, type: o } = {}) {
|
|
let { transition: i, transitionEnd: s, ...a } = t;
|
|
const l = e.getDefaultTransition();
|
|
i = i ? zS(i, l) : l;
|
|
const u = i?.reduceMotion, c = i?.skipAnimations;
|
|
r && (i = r);
|
|
const d = [], f = o && e.animationState && e.animationState.getState()[o], y = i?.path;
|
|
y && y.animateVisualElement(e, a, i, n, d);
|
|
for (const v in a) {
|
|
const S = e.getValue(v, e.latestValues[v] ?? null), k = a[v];
|
|
if (k === void 0 || f && mM(f, v))
|
|
continue;
|
|
const p = {
|
|
delay: n,
|
|
...Qh(i || {}, v)
|
|
};
|
|
c && (p.skipAnimations = !0);
|
|
const h = S.get();
|
|
if (h !== void 0 && !S.isAnimating() && !Array.isArray(k) && k === h && !p.velocity) {
|
|
ie.update(() => S.set(k));
|
|
continue;
|
|
}
|
|
let g = !1;
|
|
if (window.MotionHandoffAnimation) {
|
|
const _ = LS(e);
|
|
if (_) {
|
|
const P = window.MotionHandoffAnimation(_, v, ie);
|
|
P !== null && (p.startTime = P, g = !0);
|
|
}
|
|
}
|
|
af(e, v);
|
|
const w = u ?? e.shouldReduceMotion;
|
|
S.start(qh(v, S, k, w && DS.has(v) ? { type: !1 } : p, e, g));
|
|
const E = S.animation;
|
|
E && d.push(E);
|
|
}
|
|
if (s) {
|
|
const v = () => ie.update(() => {
|
|
s && fM(e, s);
|
|
});
|
|
d.length ? Promise.all(d).then(v) : v();
|
|
}
|
|
return d;
|
|
}
|
|
function lf(e, t, n = {}) {
|
|
const r = Er(e, t, n.type === "exit" ? e.presenceContext?.custom : void 0);
|
|
let { transition: o = e.getDefaultTransition() || {} } = r || {};
|
|
n.transitionOverride && (o = n.transitionOverride);
|
|
const i = r ? () => Promise.all(VS(e, r, n)) : () => Promise.resolve(), s = e.variantChildren && e.variantChildren.size ? (l = 0) => {
|
|
const { delayChildren: u = 0, staggerChildren: c, staggerDirection: d } = o;
|
|
return gM(e, t, l, u, c, d, n);
|
|
} : () => Promise.resolve(), { when: a } = o;
|
|
if (a) {
|
|
const [l, u] = a === "beforeChildren" ? [i, s] : [s, i];
|
|
return l().then(() => u());
|
|
} else
|
|
return Promise.all([i(), s(n.delay)]);
|
|
}
|
|
function gM(e, t, n = 0, r = 0, o = 0, i = 1, s) {
|
|
const a = [];
|
|
for (const l of e.variantChildren)
|
|
l.notify("AnimationStart", t), a.push(lf(l, t, {
|
|
...s,
|
|
delay: n + (typeof r == "function" ? 0 : r) + RS(e.variantChildren, l, r, o, i)
|
|
}).then(() => l.notify("AnimationComplete", t)));
|
|
return Promise.all(a);
|
|
}
|
|
function yM(e, t, n = {}) {
|
|
e.notify("AnimationStart", t);
|
|
let r;
|
|
if (Array.isArray(t)) {
|
|
const o = t.map((i) => lf(e, i, n));
|
|
r = Promise.all(o);
|
|
} else if (typeof t == "string")
|
|
r = lf(e, t, n);
|
|
else {
|
|
const o = typeof t == "function" ? Er(e, t, n.custom) : t;
|
|
r = Promise.all(VS(e, o, n));
|
|
}
|
|
return r.then(() => {
|
|
e.notify("AnimationComplete", t);
|
|
});
|
|
}
|
|
const vM = {
|
|
test: (e) => e === "auto",
|
|
parse: (e) => e
|
|
}, BS = (e) => (t) => t.test(e), FS = [No, I, dn, mn, WR, NR, vM], Bg = (e) => FS.find(BS(e));
|
|
function SM(e) {
|
|
return typeof e == "number" ? e === 0 : e !== null ? e === "none" || e === "0" || Q1(e) : !0;
|
|
}
|
|
const bM = /* @__PURE__ */ new Set(["brightness", "contrast", "saturate", "opacity"]);
|
|
function xM(e) {
|
|
const [t, n] = e.slice(0, -1).split("(");
|
|
if (t === "drop-shadow")
|
|
return e;
|
|
const [r] = n.match(Uh) || [];
|
|
if (!r)
|
|
return e;
|
|
const o = n.replace(r, "");
|
|
let i = bM.has(t) ? 1 : 0;
|
|
return r !== n && (i *= 100), t + "(" + i + o + ")";
|
|
}
|
|
const wM = /\b([a-z-]*)\(.*?\)/gu, uf = {
|
|
...Ht,
|
|
getAnimatableNone: (e) => {
|
|
const t = e.match(wM);
|
|
return t ? t.map(xM).join(" ") : e;
|
|
}
|
|
}, cf = {
|
|
...Ht,
|
|
getAnimatableNone: (e) => {
|
|
const t = Ht.parse(e);
|
|
return Ht.createTransformer(e)(t.map((r) => typeof r == "number" ? 0 : typeof r == "object" ? { ...r, alpha: 1 } : r));
|
|
}
|
|
}, Fg = {
|
|
...No,
|
|
transform: Math.round
|
|
}, kM = {
|
|
rotate: mn,
|
|
/**
|
|
* Internal channel for `transition.path` orientToPath. Composed onto
|
|
* `rotate` at the transform-build sites so the user's `rotate` is
|
|
* never read or overwritten. Not part of `transformPropOrder`.
|
|
*/
|
|
pathRotation: mn,
|
|
rotateX: mn,
|
|
rotateY: mn,
|
|
rotateZ: mn,
|
|
scale: la,
|
|
scaleX: la,
|
|
scaleY: la,
|
|
scaleZ: la,
|
|
skew: mn,
|
|
skewX: mn,
|
|
skewY: mn,
|
|
distance: I,
|
|
translateX: I,
|
|
translateY: I,
|
|
translateZ: I,
|
|
x: I,
|
|
y: I,
|
|
z: I,
|
|
perspective: I,
|
|
transformPerspective: I,
|
|
opacity: us,
|
|
originX: Tg,
|
|
originY: Tg,
|
|
originZ: I
|
|
}, _l = {
|
|
// Border props
|
|
borderWidth: I,
|
|
borderTopWidth: I,
|
|
borderRightWidth: I,
|
|
borderBottomWidth: I,
|
|
borderLeftWidth: I,
|
|
borderRadius: I,
|
|
borderTopLeftRadius: I,
|
|
borderTopRightRadius: I,
|
|
borderBottomRightRadius: I,
|
|
borderBottomLeftRadius: I,
|
|
// Positioning props
|
|
width: I,
|
|
maxWidth: I,
|
|
height: I,
|
|
maxHeight: I,
|
|
top: I,
|
|
right: I,
|
|
bottom: I,
|
|
left: I,
|
|
inset: I,
|
|
insetBlock: I,
|
|
insetBlockStart: I,
|
|
insetBlockEnd: I,
|
|
insetInline: I,
|
|
insetInlineStart: I,
|
|
insetInlineEnd: I,
|
|
// Spacing props
|
|
padding: I,
|
|
paddingTop: I,
|
|
paddingRight: I,
|
|
paddingBottom: I,
|
|
paddingLeft: I,
|
|
paddingBlock: I,
|
|
paddingBlockStart: I,
|
|
paddingBlockEnd: I,
|
|
paddingInline: I,
|
|
paddingInlineStart: I,
|
|
paddingInlineEnd: I,
|
|
margin: I,
|
|
marginTop: I,
|
|
marginRight: I,
|
|
marginBottom: I,
|
|
marginLeft: I,
|
|
marginBlock: I,
|
|
marginBlockStart: I,
|
|
marginBlockEnd: I,
|
|
marginInline: I,
|
|
marginInlineStart: I,
|
|
marginInlineEnd: I,
|
|
// Typography
|
|
fontSize: I,
|
|
// Misc
|
|
backgroundPositionX: I,
|
|
backgroundPositionY: I,
|
|
...kM,
|
|
zIndex: Fg,
|
|
// SVG
|
|
fillOpacity: us,
|
|
strokeOpacity: us,
|
|
numOctaves: Fg
|
|
}, CM = {
|
|
..._l,
|
|
// Color props
|
|
color: ke,
|
|
backgroundColor: ke,
|
|
outlineColor: ke,
|
|
fill: ke,
|
|
stroke: ke,
|
|
// Border props
|
|
borderColor: ke,
|
|
borderTopColor: ke,
|
|
borderRightColor: ke,
|
|
borderBottomColor: ke,
|
|
borderLeftColor: ke,
|
|
filter: uf,
|
|
WebkitFilter: uf,
|
|
mask: cf,
|
|
WebkitMask: cf
|
|
}, jS = (e) => CM[e], TM = /* @__PURE__ */ new Set([uf, cf]);
|
|
function OS(e, t) {
|
|
let n = jS(e);
|
|
return TM.has(n) || (n = Ht), n.getAnimatableNone ? n.getAnimatableNone(t) : void 0;
|
|
}
|
|
const PM = /* @__PURE__ */ new Set(["auto", "none", "0"]);
|
|
function EM(e, t, n) {
|
|
let r = 0, o;
|
|
for (; r < e.length && !o; ) {
|
|
const i = e[r];
|
|
typeof i == "string" && !PM.has(i) && Io(i).values.length && (o = e[r]), r++;
|
|
}
|
|
if (o && n)
|
|
for (const i of t)
|
|
e[i] = OS(n, o);
|
|
}
|
|
class _M extends Yh {
|
|
constructor(t, n, r, o, i) {
|
|
super(t, n, r, o, i, !0);
|
|
}
|
|
readKeyframes() {
|
|
const { unresolvedKeyframes: t, element: n, name: r } = this;
|
|
if (!n || !n.current)
|
|
return;
|
|
super.readKeyframes();
|
|
for (let c = 0; c < t.length; c++) {
|
|
let d = t[c];
|
|
if (typeof d == "string" && (d = d.trim(), Wh(d))) {
|
|
const f = MS(d, n.current);
|
|
f !== void 0 && (t[c] = f), c === t.length - 1 && (this.finalKeyframe = d);
|
|
}
|
|
}
|
|
if (this.resolveNoneKeyframes(), !DS.has(r) || t.length !== 2)
|
|
return;
|
|
const [o, i] = t, s = Bg(o), a = Bg(i), l = Cg(o), u = Cg(i);
|
|
if (l !== u && Wn[r]) {
|
|
this.needsMeasurement = !0;
|
|
return;
|
|
}
|
|
if (s !== a)
|
|
if (Mg(s) && Mg(a))
|
|
for (let c = 0; c < t.length; c++) {
|
|
const d = t[c];
|
|
typeof d == "string" && (t[c] = parseFloat(d));
|
|
}
|
|
else Wn[r] && (this.needsMeasurement = !0);
|
|
}
|
|
resolveNoneKeyframes() {
|
|
const { unresolvedKeyframes: t, name: n } = this, r = [];
|
|
for (let o = 0; o < t.length; o++)
|
|
(t[o] === null || SM(t[o])) && r.push(o);
|
|
r.length && EM(t, r, n);
|
|
}
|
|
measureInitialState() {
|
|
const { element: t, unresolvedKeyframes: n, name: r } = this;
|
|
if (!t || !t.current)
|
|
return;
|
|
r === "height" && (this.suspendedScrollY = window.pageYOffset), this.measuredOrigin = Wn[r](t.measureViewportBox(), window.getComputedStyle(t.current)), n[0] = this.measuredOrigin;
|
|
const o = n[n.length - 1];
|
|
o !== void 0 && t.getValue(r, o).jump(o, !1);
|
|
}
|
|
measureEndState() {
|
|
const { element: t, name: n, unresolvedKeyframes: r } = this;
|
|
if (!t || !t.current)
|
|
return;
|
|
const o = t.getValue(n);
|
|
o && o.jump(this.measuredOrigin, !1);
|
|
const i = r.length - 1, s = r[i];
|
|
r[i] = Wn[n](t.measureViewportBox(), window.getComputedStyle(t.current)), s !== null && this.finalKeyframe === void 0 && (this.finalKeyframe = s), this.removedTransforms?.length && this.removedTransforms.forEach(([a, l]) => {
|
|
t.getValue(a).set(l);
|
|
}), this.resolveNoneKeyframes();
|
|
}
|
|
}
|
|
function NS(e, t, n) {
|
|
if (e == null)
|
|
return [];
|
|
if (e instanceof EventTarget)
|
|
return [e];
|
|
if (typeof e == "string") {
|
|
let r = document;
|
|
const o = n?.[e] ?? r.querySelectorAll(e);
|
|
return o ? Array.from(o) : [];
|
|
}
|
|
return Array.from(e).filter((r) => r != null);
|
|
}
|
|
const df = (e, t) => t && typeof e == "number" ? t.transform(e) : e;
|
|
function Va(e) {
|
|
return Y1(e) && "offsetHeight" in e && !("ownerSVGElement" in e);
|
|
}
|
|
const { schedule: ep } = /* @__PURE__ */ uS(queueMicrotask, !1), Vt = {
|
|
x: !1,
|
|
y: !1
|
|
};
|
|
function WS() {
|
|
return Vt.x || Vt.y;
|
|
}
|
|
function $M(e) {
|
|
return e === "x" || e === "y" ? Vt[e] ? null : (Vt[e] = !0, () => {
|
|
Vt[e] = !1;
|
|
}) : Vt.x || Vt.y ? null : (Vt.x = Vt.y = !0, () => {
|
|
Vt.x = Vt.y = !1;
|
|
});
|
|
}
|
|
function US(e, t) {
|
|
const n = NS(e), r = new AbortController(), o = {
|
|
passive: !0,
|
|
...t,
|
|
signal: r.signal
|
|
};
|
|
return [n, o, () => r.abort()];
|
|
}
|
|
function AM(e) {
|
|
return !(e.pointerType === "touch" || WS());
|
|
}
|
|
function RM(e, t, n = {}) {
|
|
const [r, o, i] = US(e, n);
|
|
return r.forEach((s) => {
|
|
let a = !1, l = !1, u;
|
|
const c = () => {
|
|
s.removeEventListener("pointerleave", v);
|
|
}, d = (k) => {
|
|
u && (u(k), u = void 0), c();
|
|
}, f = (k) => {
|
|
a = !1, window.removeEventListener("pointerup", f), window.removeEventListener("pointercancel", f), l && (l = !1, d(k));
|
|
}, y = () => {
|
|
a = !0, window.addEventListener("pointerup", f, o), window.addEventListener("pointercancel", f, o);
|
|
}, v = (k) => {
|
|
if (k.pointerType !== "touch") {
|
|
if (a) {
|
|
l = !0;
|
|
return;
|
|
}
|
|
d(k);
|
|
}
|
|
}, S = (k) => {
|
|
if (!AM(k))
|
|
return;
|
|
l = !1;
|
|
const p = t(s, k);
|
|
typeof p == "function" && (u = p, s.addEventListener("pointerleave", v, o));
|
|
};
|
|
s.addEventListener("pointerenter", S, o), s.addEventListener("pointerdown", y, o);
|
|
}), i;
|
|
}
|
|
const HS = (e, t) => t ? e === t ? !0 : HS(e, t.parentElement) : !1, tp = (e) => e.pointerType === "mouse" ? typeof e.button != "number" || e.button <= 0 : e.isPrimary !== !1, zM = /* @__PURE__ */ new Set([
|
|
"BUTTON",
|
|
"INPUT",
|
|
"SELECT",
|
|
"TEXTAREA",
|
|
"A"
|
|
]);
|
|
function MM(e) {
|
|
return zM.has(e.tagName) || e.isContentEditable === !0;
|
|
}
|
|
const DM = /* @__PURE__ */ new Set(["INPUT", "SELECT", "TEXTAREA"]);
|
|
function IM(e) {
|
|
return DM.has(e.tagName) || e.isContentEditable === !0;
|
|
}
|
|
const Ba = /* @__PURE__ */ new WeakSet();
|
|
function jg(e) {
|
|
return (t) => {
|
|
t.key === "Enter" && e(t);
|
|
};
|
|
}
|
|
function Ac(e, t) {
|
|
e.dispatchEvent(new PointerEvent("pointer" + t, { isPrimary: !0, bubbles: !0 }));
|
|
}
|
|
const LM = (e, t) => {
|
|
const n = e.currentTarget;
|
|
if (!n)
|
|
return;
|
|
const r = jg(() => {
|
|
if (Ba.has(n))
|
|
return;
|
|
Ac(n, "down");
|
|
const o = jg(() => {
|
|
Ac(n, "up");
|
|
}), i = () => Ac(n, "cancel");
|
|
n.addEventListener("keyup", o, t), n.addEventListener("blur", i, t);
|
|
});
|
|
n.addEventListener("keydown", r, t), n.addEventListener("blur", () => n.removeEventListener("keydown", r), t);
|
|
};
|
|
function Og(e) {
|
|
return tp(e) && !WS();
|
|
}
|
|
const Ng = /* @__PURE__ */ new WeakSet();
|
|
function VM(e, t, n = {}) {
|
|
const [r, o, i] = US(e, n), s = (a) => {
|
|
const l = a.currentTarget;
|
|
if (!Og(a) || Ng.has(a))
|
|
return;
|
|
Ba.add(l), n.stopPropagation && Ng.add(a);
|
|
const u = t(l, a), c = (y, v) => {
|
|
window.removeEventListener("pointerup", d), window.removeEventListener("pointercancel", f), Ba.has(l) && Ba.delete(l), Og(y) && typeof u == "function" && u(y, { success: v });
|
|
}, d = (y) => {
|
|
c(y, l === window || l === document || n.useGlobalTarget || HS(l, y.target));
|
|
}, f = (y) => {
|
|
c(y, !1);
|
|
};
|
|
window.addEventListener("pointerup", d, o), window.addEventListener("pointercancel", f, o);
|
|
};
|
|
return r.forEach((a) => {
|
|
(n.useGlobalTarget ? window : a).addEventListener("pointerdown", s, o), Va(a) && (a.addEventListener("focus", (u) => LM(u, o)), !MM(a) && !a.hasAttribute("tabindex") && (a.tabIndex = 0));
|
|
}), i;
|
|
}
|
|
function np(e) {
|
|
return Y1(e) && "ownerSVGElement" in e;
|
|
}
|
|
const Fa = /* @__PURE__ */ new WeakMap();
|
|
let ja;
|
|
const KS = (e, t, n) => (r, o) => o && o[0] ? o[0][e + "Size"] : np(r) && "getBBox" in r ? r.getBBox()[t] : r[n], BM = /* @__PURE__ */ KS("inline", "width", "offsetWidth"), FM = /* @__PURE__ */ KS("block", "height", "offsetHeight");
|
|
function jM({ target: e, borderBoxSize: t }) {
|
|
Fa.get(e)?.forEach((n) => {
|
|
n(e, {
|
|
get width() {
|
|
return BM(e, t);
|
|
},
|
|
get height() {
|
|
return FM(e, t);
|
|
}
|
|
});
|
|
});
|
|
}
|
|
function OM(e) {
|
|
e.forEach(jM);
|
|
}
|
|
function NM() {
|
|
typeof ResizeObserver > "u" || (ja = new ResizeObserver(OM));
|
|
}
|
|
function WM(e, t) {
|
|
ja || NM();
|
|
const n = NS(e);
|
|
return n.forEach((r) => {
|
|
let o = Fa.get(r);
|
|
o || (o = /* @__PURE__ */ new Set(), Fa.set(r, o)), o.add(t), ja?.observe(r);
|
|
}), () => {
|
|
n.forEach((r) => {
|
|
const o = Fa.get(r);
|
|
o?.delete(t), o?.size || ja?.unobserve(r);
|
|
});
|
|
};
|
|
}
|
|
const Oa = /* @__PURE__ */ new Set();
|
|
let co;
|
|
function UM() {
|
|
co = () => {
|
|
const e = {
|
|
get width() {
|
|
return window.innerWidth;
|
|
},
|
|
get height() {
|
|
return window.innerHeight;
|
|
}
|
|
};
|
|
Oa.forEach((t) => t(e));
|
|
}, window.addEventListener("resize", co);
|
|
}
|
|
function HM(e) {
|
|
return Oa.add(e), co || UM(), () => {
|
|
Oa.delete(e), !Oa.size && typeof co == "function" && (window.removeEventListener("resize", co), co = void 0);
|
|
};
|
|
}
|
|
function Wg(e, t) {
|
|
return typeof e == "function" ? HM(e) : WM(e, t);
|
|
}
|
|
function KM(e) {
|
|
return np(e) && e.tagName === "svg";
|
|
}
|
|
const GM = [...FS, ke, Ht], XM = (e) => GM.find(BS(e)), Ug = () => ({
|
|
translate: 0,
|
|
scale: 1,
|
|
origin: 0,
|
|
originPoint: 0
|
|
}), fo = () => ({
|
|
x: Ug(),
|
|
y: Ug()
|
|
}), Hg = () => ({ min: 0, max: 0 }), Ee = () => ({
|
|
x: Hg(),
|
|
y: Hg()
|
|
}), YM = /* @__PURE__ */ new WeakMap();
|
|
function yu(e) {
|
|
return e !== null && typeof e == "object" && typeof e.start == "function";
|
|
}
|
|
function cs(e) {
|
|
return typeof e == "string" || Array.isArray(e);
|
|
}
|
|
const rp = [
|
|
"animate",
|
|
"whileInView",
|
|
"whileFocus",
|
|
"whileHover",
|
|
"whileTap",
|
|
"whileDrag",
|
|
"exit"
|
|
], op = ["initial", ...rp];
|
|
function vu(e) {
|
|
return yu(e.animate) || op.some((t) => cs(e[t]));
|
|
}
|
|
function GS(e) {
|
|
return !!(vu(e) || e.variants);
|
|
}
|
|
function QM(e, t, n) {
|
|
for (const r in t) {
|
|
const o = t[r], i = n[r];
|
|
if (Be(o))
|
|
e.addValue(r, o);
|
|
else if (Be(i))
|
|
e.addValue(r, Lo(o, { owner: e }));
|
|
else if (i !== o)
|
|
if (e.hasValue(r)) {
|
|
const s = e.getValue(r);
|
|
s.liveStyle === !0 ? s.jump(o) : s.hasAnimated || s.set(o);
|
|
} else {
|
|
const s = e.getStaticValue(r);
|
|
e.addValue(r, Lo(s !== void 0 ? s : o, { owner: e }));
|
|
}
|
|
}
|
|
for (const r in n)
|
|
t[r] === void 0 && e.removeValue(r);
|
|
return t;
|
|
}
|
|
const ff = { current: null }, XS = { current: !1 }, qM = typeof window < "u";
|
|
function ZM() {
|
|
if (XS.current = !0, !!qM)
|
|
if (window.matchMedia) {
|
|
const e = window.matchMedia("(prefers-reduced-motion)"), t = () => ff.current = e.matches;
|
|
e.addEventListener("change", t), t();
|
|
} else
|
|
ff.current = !1;
|
|
}
|
|
const Kg = [
|
|
"AnimationStart",
|
|
"AnimationComplete",
|
|
"Update",
|
|
"BeforeLayoutMeasure",
|
|
"LayoutMeasure",
|
|
"LayoutAnimationStart",
|
|
"LayoutAnimationComplete"
|
|
];
|
|
let $l = {};
|
|
function YS(e) {
|
|
$l = e;
|
|
}
|
|
function JM() {
|
|
return $l;
|
|
}
|
|
class e3 {
|
|
/**
|
|
* This method takes React props and returns found MotionValues. For example, HTML
|
|
* MotionValues will be found within the style prop, whereas for Three.js within attribute arrays.
|
|
*
|
|
* This isn't an abstract method as it needs calling in the constructor, but it is
|
|
* intended to be one.
|
|
*/
|
|
scrapeMotionValuesFromProps(t, n, r) {
|
|
return {};
|
|
}
|
|
constructor({ parent: t, props: n, presenceContext: r, reducedMotionConfig: o, skipAnimations: i, blockInitialAnimation: s, visualState: a }, l = {}) {
|
|
this.current = null, this.children = /* @__PURE__ */ new Set(), this.isVariantNode = !1, this.isControllingVariants = !1, this.shouldReduceMotion = null, this.shouldSkipAnimations = !1, this.values = /* @__PURE__ */ new Map(), this.KeyframeResolver = Yh, this.features = {}, this.valueSubscriptions = /* @__PURE__ */ new Map(), this.prevMotionValues = {}, this.hasBeenMounted = !1, this.events = {}, this.propEventSubscriptions = {}, this.notifyUpdate = () => this.notify("Update", this.latestValues), this.render = () => {
|
|
this.current && (this.triggerBuild(), this.renderInstance(this.current, this.renderState, this.props.style, this.projection));
|
|
}, this.renderScheduledAt = 0, this.scheduleRender = () => {
|
|
const y = Qe.now();
|
|
this.renderScheduledAt < y && (this.renderScheduledAt = y, ie.render(this.render, !1, !0));
|
|
};
|
|
const { latestValues: u, renderState: c } = a;
|
|
this.latestValues = u, this.baseTarget = { ...u }, this.initialValues = n.initial ? { ...u } : {}, this.renderState = c, this.parent = t, this.props = n, this.presenceContext = r, this.depth = t ? t.depth + 1 : 0, this.reducedMotionConfig = o, this.skipAnimationsConfig = i, this.options = l, this.blockInitialAnimation = !!s, this.isControllingVariants = vu(n), this.isVariantNode = GS(n), this.isVariantNode && (this.variantChildren = /* @__PURE__ */ new Set()), this.manuallyAnimateOnMount = !!(t && t.current);
|
|
const { willChange: d, ...f } = this.scrapeMotionValuesFromProps(n, {}, this);
|
|
for (const y in f) {
|
|
const v = f[y];
|
|
u[y] !== void 0 && Be(v) && v.set(u[y]);
|
|
}
|
|
}
|
|
mount(t) {
|
|
if (this.hasBeenMounted)
|
|
for (const n in this.initialValues)
|
|
this.values.get(n)?.jump(this.initialValues[n]), this.latestValues[n] = this.initialValues[n];
|
|
this.current = t, YM.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)), this.reducedMotionConfig === "never" ? this.shouldReduceMotion = !1 : this.reducedMotionConfig === "always" ? this.shouldReduceMotion = !0 : (XS.current || ZM(), this.shouldReduceMotion = ff.current), this.shouldSkipAnimations = this.skipAnimationsConfig ?? !1, this.parent?.addChild(this), this.update(this.props, this.presenceContext), this.hasBeenMounted = !0;
|
|
}
|
|
unmount() {
|
|
this.projection && this.projection.unmount(), tr(this.notifyUpdate), tr(this.render), this.valueSubscriptions.forEach((t) => t()), this.valueSubscriptions.clear(), this.removeFromVariantTree && this.removeFromVariantTree(), this.parent?.removeChild(this);
|
|
for (const t in this.events)
|
|
this.events[t].clear();
|
|
for (const t in this.features) {
|
|
const n = this.features[t];
|
|
n && (n.unmount(), n.isMounted = !1);
|
|
}
|
|
this.current = null;
|
|
}
|
|
addChild(t) {
|
|
this.children.add(t), this.enteringChildren ?? (this.enteringChildren = /* @__PURE__ */ new Set()), this.enteringChildren.add(t);
|
|
}
|
|
removeChild(t) {
|
|
this.children.delete(t), this.enteringChildren && this.enteringChildren.delete(t);
|
|
}
|
|
bindToMotionValue(t, n) {
|
|
if (this.valueSubscriptions.has(t) && this.valueSubscriptions.get(t)(), n.accelerate && AS.has(t) && this.current instanceof HTMLElement) {
|
|
const { factory: s, keyframes: a, times: l, ease: u, duration: c } = n.accelerate, d = new _S({
|
|
element: this.current,
|
|
name: t,
|
|
keyframes: a,
|
|
times: l,
|
|
ease: u,
|
|
duration: /* @__PURE__ */ lt(c)
|
|
}), f = s(d);
|
|
this.valueSubscriptions.set(t, () => {
|
|
f(), d.cancel();
|
|
});
|
|
return;
|
|
}
|
|
const r = Uo.has(t);
|
|
r && this.onBindTransform && this.onBindTransform();
|
|
const o = n.on("change", (s) => {
|
|
this.latestValues[t] = s, this.props.onUpdate && ie.preRender(this.notifyUpdate), r && this.projection && (this.projection.isTransformDirty = !0), this.scheduleRender();
|
|
});
|
|
let i;
|
|
typeof window < "u" && window.MotionCheckAppearSync && (i = window.MotionCheckAppearSync(this, t, n)), this.valueSubscriptions.set(t, () => {
|
|
o(), i && i();
|
|
});
|
|
}
|
|
sortNodePosition(t) {
|
|
return !this.current || !this.sortInstanceNodePosition || this.type !== t.type ? 0 : this.sortInstanceNodePosition(this.current, t.current);
|
|
}
|
|
updateFeatures() {
|
|
let t = "animation";
|
|
for (t in $l) {
|
|
const n = $l[t];
|
|
if (!n)
|
|
continue;
|
|
const { isEnabled: r, Feature: o } = n;
|
|
if (!this.features[t] && o && r(this.props) && (this.features[t] = new o(this)), this.features[t]) {
|
|
const i = this.features[t];
|
|
i.isMounted ? i.update() : (i.mount(), i.isMounted = !0);
|
|
}
|
|
}
|
|
}
|
|
triggerBuild() {
|
|
this.build(this.renderState, this.latestValues, this.props);
|
|
}
|
|
/**
|
|
* Measure the current viewport box with or without transforms.
|
|
* Only measures axis-aligned boxes, rotate and skew must be manually
|
|
* removed with a re-render to work.
|
|
*/
|
|
measureViewportBox() {
|
|
return this.current ? this.measureInstanceViewportBox(this.current, this.props) : Ee();
|
|
}
|
|
getStaticValue(t) {
|
|
return this.latestValues[t];
|
|
}
|
|
setStaticValue(t, n) {
|
|
this.latestValues[t] = n;
|
|
}
|
|
/**
|
|
* Update the provided props. Ensure any newly-added motion values are
|
|
* added to our map, old ones removed, and listeners updated.
|
|
*/
|
|
update(t, n) {
|
|
(t.transformTemplate || this.props.transformTemplate) && this.scheduleRender(), this.prevProps = this.props, this.props = t, this.prevPresenceContext = this.presenceContext, this.presenceContext = n;
|
|
for (let r = 0; r < Kg.length; r++) {
|
|
const o = Kg[r];
|
|
this.propEventSubscriptions[o] && (this.propEventSubscriptions[o](), delete this.propEventSubscriptions[o]);
|
|
const i = "on" + o, s = t[i];
|
|
s && (this.propEventSubscriptions[o] = this.on(o, s));
|
|
}
|
|
this.prevMotionValues = QM(this, this.scrapeMotionValuesFromProps(t, this.prevProps || {}, this), this.prevMotionValues), this.handleChildMotionValue && this.handleChildMotionValue();
|
|
}
|
|
getProps() {
|
|
return this.props;
|
|
}
|
|
/**
|
|
* Returns the variant definition with a given name.
|
|
*/
|
|
getVariant(t) {
|
|
return this.props.variants ? this.props.variants[t] : void 0;
|
|
}
|
|
/**
|
|
* Returns the defined default transition on this component.
|
|
*/
|
|
getDefaultTransition() {
|
|
return this.props.transition;
|
|
}
|
|
getTransformPagePoint() {
|
|
return this.props.transformPagePoint;
|
|
}
|
|
getClosestVariantNode() {
|
|
return this.isVariantNode ? this : this.parent ? this.parent.getClosestVariantNode() : void 0;
|
|
}
|
|
/**
|
|
* Add a child visual element to our set of children.
|
|
*/
|
|
addVariantChild(t) {
|
|
const n = this.getClosestVariantNode();
|
|
if (n)
|
|
return n.variantChildren && n.variantChildren.add(t), () => n.variantChildren.delete(t);
|
|
}
|
|
/**
|
|
* Add a motion value and bind it to this visual element.
|
|
*/
|
|
addValue(t, n) {
|
|
const r = this.values.get(t);
|
|
n !== r && (r && this.removeValue(t), this.bindToMotionValue(t, n), this.values.set(t, n), this.latestValues[t] = n.get());
|
|
}
|
|
/**
|
|
* Remove a motion value and unbind any active subscriptions.
|
|
*/
|
|
removeValue(t) {
|
|
this.values.delete(t);
|
|
const n = this.valueSubscriptions.get(t);
|
|
n && (n(), this.valueSubscriptions.delete(t)), delete this.latestValues[t], this.removeValueFromRenderState(t, this.renderState);
|
|
}
|
|
/**
|
|
* Check whether we have a motion value for this key
|
|
*/
|
|
hasValue(t) {
|
|
return this.values.has(t);
|
|
}
|
|
getValue(t, n) {
|
|
if (this.props.values && this.props.values[t])
|
|
return this.props.values[t];
|
|
let r = this.values.get(t);
|
|
return r === void 0 && n !== void 0 && (r = Lo(n === null ? void 0 : n, { owner: this }), this.addValue(t, r)), r;
|
|
}
|
|
/**
|
|
* If we're trying to animate to a previously unencountered value,
|
|
* we need to check for it in our state and as a last resort read it
|
|
* directly from the instance (which might have performance implications).
|
|
*/
|
|
readValue(t, n) {
|
|
let r = this.latestValues[t] !== void 0 || !this.current ? this.latestValues[t] : this.getBaseTargetFromProps(this.props, t) ?? this.readValueFromInstance(this.current, t, this.options);
|
|
return r != null && (typeof r == "string" && (X1(r) || Q1(r)) ? r = parseFloat(r) : !XM(r) && Ht.test(n) && (r = OS(t, n)), this.setBaseTarget(t, Be(r) ? r.get() : r)), Be(r) ? r.get() : r;
|
|
}
|
|
/**
|
|
* Set the base target to later animate back to. This is currently
|
|
* only hydrated on creation and when we first read a value.
|
|
*/
|
|
setBaseTarget(t, n) {
|
|
this.baseTarget[t] = n;
|
|
}
|
|
/**
|
|
* Find the base target for a value thats been removed from all animation
|
|
* props.
|
|
*/
|
|
getBaseTarget(t) {
|
|
const { initial: n } = this.props;
|
|
let r;
|
|
if (typeof n == "string" || typeof n == "object") {
|
|
const i = Zh(this.props, n, this.presenceContext?.custom);
|
|
i && (r = i[t]);
|
|
}
|
|
if (n && r !== void 0)
|
|
return r;
|
|
const o = this.getBaseTargetFromProps(this.props, t);
|
|
return o !== void 0 && !Be(o) ? o : this.initialValues[t] !== void 0 && r === void 0 ? void 0 : this.baseTarget[t];
|
|
}
|
|
on(t, n) {
|
|
return this.events[t] || (this.events[t] = new jh()), this.events[t].add(n);
|
|
}
|
|
notify(t, ...n) {
|
|
this.events[t] && this.events[t].notify(...n);
|
|
}
|
|
scheduleRenderMicrotask() {
|
|
ep.render(this.render);
|
|
}
|
|
}
|
|
class QS extends e3 {
|
|
constructor() {
|
|
super(...arguments), this.KeyframeResolver = _M;
|
|
}
|
|
sortInstanceNodePosition(t, n) {
|
|
return t.compareDocumentPosition(n) & 2 ? 1 : -1;
|
|
}
|
|
getBaseTargetFromProps(t, n) {
|
|
const r = t.style;
|
|
return r ? r[n] : void 0;
|
|
}
|
|
removeValueFromRenderState(t, { vars: n, style: r }) {
|
|
delete n[t], delete r[t];
|
|
}
|
|
handleChildMotionValue() {
|
|
this.childSubscription && (this.childSubscription(), delete this.childSubscription);
|
|
const { children: t } = this.props;
|
|
Be(t) && (this.childSubscription = t.on("change", (n) => {
|
|
this.current && (this.current.textContent = `${n}`);
|
|
}));
|
|
}
|
|
}
|
|
class ir {
|
|
constructor(t) {
|
|
this.isMounted = !1, this.node = t;
|
|
}
|
|
update() {
|
|
}
|
|
}
|
|
function qS({ top: e, left: t, right: n, bottom: r }) {
|
|
return {
|
|
x: { min: t, max: n },
|
|
y: { min: e, max: r }
|
|
};
|
|
}
|
|
function t3({ x: e, y: t }) {
|
|
return { top: t.min, right: e.max, bottom: t.max, left: e.min };
|
|
}
|
|
function n3(e, t) {
|
|
if (!t)
|
|
return e;
|
|
const n = t({ x: e.left, y: e.top }), r = t({ x: e.right, y: e.bottom });
|
|
return {
|
|
top: n.y,
|
|
left: n.x,
|
|
bottom: r.y,
|
|
right: r.x
|
|
};
|
|
}
|
|
function Rc(e) {
|
|
return e === void 0 || e === 1;
|
|
}
|
|
function hf({ scale: e, scaleX: t, scaleY: n }) {
|
|
return !Rc(e) || !Rc(t) || !Rc(n);
|
|
}
|
|
function hr(e) {
|
|
return hf(e) || ZS(e) || e.z || e.rotate || e.rotateX || e.rotateY || e.skewX || e.skewY;
|
|
}
|
|
function ZS(e) {
|
|
return Gg(e.x) || Gg(e.y);
|
|
}
|
|
function Gg(e) {
|
|
return e && e !== "0%";
|
|
}
|
|
function Al(e, t, n) {
|
|
const r = e - n, o = t * r;
|
|
return n + o;
|
|
}
|
|
function Xg(e, t, n, r, o) {
|
|
return o !== void 0 && (e = Al(e, o, r)), Al(e, n, r) + t;
|
|
}
|
|
function pf(e, t = 0, n = 1, r, o) {
|
|
e.min = Xg(e.min, t, n, r, o), e.max = Xg(e.max, t, n, r, o);
|
|
}
|
|
function JS(e, { x: t, y: n }) {
|
|
pf(e.x, t.translate, t.scale, t.originPoint), pf(e.y, n.translate, n.scale, n.originPoint);
|
|
}
|
|
const Yg = 0.999999999999, Qg = 1.0000000000001;
|
|
function r3(e, t, n, r = !1) {
|
|
const o = n.length;
|
|
if (!o)
|
|
return;
|
|
t.x = t.y = 1;
|
|
let i, s;
|
|
for (let a = 0; a < o; a++) {
|
|
i = n[a], s = i.projectionDelta;
|
|
const { visualElement: l } = i.options;
|
|
l && l.props.style && l.props.style.display === "contents" || (r && i.options.layoutScroll && i.scroll && i !== i.root && (nn(e.x, -i.scroll.offset.x), nn(e.y, -i.scroll.offset.y)), s && (t.x *= s.x.scale, t.y *= s.y.scale, JS(e, s)), r && hr(i.latestValues) && Na(e, i.latestValues, i.layout?.layoutBox));
|
|
}
|
|
t.x < Qg && t.x > Yg && (t.x = 1), t.y < Qg && t.y > Yg && (t.y = 1);
|
|
}
|
|
function nn(e, t) {
|
|
e.min += t, e.max += t;
|
|
}
|
|
function qg(e, t, n, r, o = 0.5) {
|
|
const i = oe(e.min, e.max, o);
|
|
pf(e, t, n, i, r);
|
|
}
|
|
function Zg(e, t) {
|
|
return typeof e == "string" ? parseFloat(e) / 100 * (t.max - t.min) : e;
|
|
}
|
|
function Na(e, t, n) {
|
|
const r = n ?? e;
|
|
qg(e.x, Zg(t.x, r.x), t.scaleX, t.scale, t.originX), qg(e.y, Zg(t.y, r.y), t.scaleY, t.scale, t.originY);
|
|
}
|
|
function eb(e, t) {
|
|
return qS(n3(e.getBoundingClientRect(), t));
|
|
}
|
|
function o3(e, t, n) {
|
|
const r = eb(e, n), { scroll: o } = t;
|
|
return o && (nn(r.x, o.offset.x), nn(r.y, o.offset.y)), r;
|
|
}
|
|
const i3 = {
|
|
x: "translateX",
|
|
y: "translateY",
|
|
z: "translateZ",
|
|
transformPerspective: "perspective"
|
|
}, s3 = Wo.length;
|
|
function a3(e, t, n) {
|
|
let r = "", o = !0;
|
|
for (let s = 0; s < s3; s++) {
|
|
const a = Wo[s], l = e[a];
|
|
if (l === void 0)
|
|
continue;
|
|
let u = !0;
|
|
if (typeof l == "number")
|
|
u = l === (a.startsWith("scale") ? 1 : 0);
|
|
else {
|
|
const c = parseFloat(l);
|
|
u = a.startsWith("scale") ? c === 1 : c === 0;
|
|
}
|
|
if (!u || n) {
|
|
const c = df(l, _l[a]);
|
|
if (!u) {
|
|
o = !1;
|
|
const d = i3[a] || a;
|
|
r += `${d}(${c}) `;
|
|
}
|
|
n && (t[a] = c);
|
|
}
|
|
}
|
|
const i = e.pathRotation;
|
|
return i && (o = !1, r += `rotate(${df(i, _l.pathRotation)}) `), r = r.trim(), n ? r = n(t, o ? "" : r) : o && (r = "none"), r;
|
|
}
|
|
function ip(e, t, n) {
|
|
const { style: r, vars: o, transformOrigin: i } = e;
|
|
let s = !1, a = !1;
|
|
for (const l in t) {
|
|
const u = t[l];
|
|
if (Uo.has(l)) {
|
|
s = !0;
|
|
continue;
|
|
} else if (dS(l)) {
|
|
o[l] = u;
|
|
continue;
|
|
} else {
|
|
const c = df(u, _l[l]);
|
|
l.startsWith("origin") ? (a = !0, i[l] = c) : r[l] = c;
|
|
}
|
|
}
|
|
if (t.transform || (s || n ? r.transform = a3(t, e.transform, n) : r.transform && (r.transform = "none")), a) {
|
|
const { originX: l = "50%", originY: u = "50%", originZ: c = 0 } = i;
|
|
r.transformOrigin = `${l} ${u} ${c}`;
|
|
}
|
|
}
|
|
function tb(e, { style: t, vars: n }, r, o) {
|
|
const i = e.style;
|
|
let s;
|
|
for (s in t)
|
|
i[s] = t[s];
|
|
o?.applyProjectionStyles(i, r);
|
|
for (s in n)
|
|
i.setProperty(s, n[s]);
|
|
}
|
|
function Jg(e, t) {
|
|
return t.max === t.min ? 0 : e / (t.max - t.min) * 100;
|
|
}
|
|
const li = {
|
|
correct: (e, t) => {
|
|
if (!t.target)
|
|
return e;
|
|
if (typeof e == "string")
|
|
if (I.test(e))
|
|
e = parseFloat(e);
|
|
else
|
|
return e;
|
|
const n = Jg(e, t.target.x), r = Jg(e, t.target.y);
|
|
return `${n}% ${r}%`;
|
|
}
|
|
}, l3 = {
|
|
correct: (e, { treeScale: t, projectionDelta: n }) => {
|
|
const r = e, o = Ht.parse(e);
|
|
if (o.length > 5)
|
|
return r;
|
|
const i = Ht.createTransformer(e), s = typeof o[0] != "number" ? 1 : 0, a = n.x.scale * t.x, l = n.y.scale * t.y;
|
|
o[0 + s] /= a, o[1 + s] /= l;
|
|
const u = oe(a, l, 0.5);
|
|
return typeof o[2 + s] == "number" && (o[2 + s] /= u), typeof o[3 + s] == "number" && (o[3 + s] /= u), i(o);
|
|
}
|
|
}, mf = {
|
|
borderRadius: {
|
|
...li,
|
|
applyTo: [
|
|
"borderTopLeftRadius",
|
|
"borderTopRightRadius",
|
|
"borderBottomLeftRadius",
|
|
"borderBottomRightRadius"
|
|
]
|
|
},
|
|
borderTopLeftRadius: li,
|
|
borderTopRightRadius: li,
|
|
borderBottomLeftRadius: li,
|
|
borderBottomRightRadius: li,
|
|
boxShadow: l3
|
|
};
|
|
function nb(e, { layout: t, layoutId: n }) {
|
|
return Uo.has(e) || e.startsWith("origin") || (t || n !== void 0) && (!!mf[e] || e === "opacity");
|
|
}
|
|
function sp(e, t, n) {
|
|
const r = e.style, o = t?.style, i = {};
|
|
if (!r)
|
|
return i;
|
|
for (const s in r)
|
|
(Be(r[s]) || o && Be(o[s]) || nb(s, e) || n?.getValue(s)?.liveStyle !== void 0) && (i[s] = r[s]);
|
|
return i;
|
|
}
|
|
function u3(e) {
|
|
return window.getComputedStyle(e);
|
|
}
|
|
class c3 extends QS {
|
|
constructor() {
|
|
super(...arguments), this.type = "html", this.renderInstance = tb;
|
|
}
|
|
readValueFromInstance(t, n) {
|
|
if (Uo.has(n))
|
|
return this.projection?.isProjecting ? Jd(n) : $z(t, n);
|
|
{
|
|
const r = u3(t), o = (dS(n) ? r.getPropertyValue(n) : r[n]) || 0;
|
|
return typeof o == "string" ? o.trim() : o;
|
|
}
|
|
}
|
|
measureInstanceViewportBox(t, { transformPagePoint: n }) {
|
|
return eb(t, n);
|
|
}
|
|
build(t, n, r) {
|
|
ip(t, n, r.transformTemplate);
|
|
}
|
|
scrapeMotionValuesFromProps(t, n, r) {
|
|
return sp(t, n, r);
|
|
}
|
|
}
|
|
const d3 = {
|
|
offset: "stroke-dashoffset",
|
|
array: "stroke-dasharray"
|
|
}, f3 = {
|
|
offset: "strokeDashoffset",
|
|
array: "strokeDasharray"
|
|
};
|
|
function h3(e, t, n = 1, r = 0, o = !0) {
|
|
e.pathLength = 1;
|
|
const i = o ? d3 : f3;
|
|
e[i.offset] = `${-r}`, e[i.array] = `${t} ${n}`;
|
|
}
|
|
const p3 = [
|
|
"offsetDistance",
|
|
"offsetPath",
|
|
"offsetRotate",
|
|
"offsetAnchor"
|
|
];
|
|
function rb(e, {
|
|
attrX: t,
|
|
attrY: n,
|
|
attrScale: r,
|
|
pathLength: o,
|
|
pathSpacing: i = 1,
|
|
pathOffset: s = 0,
|
|
// This is object creation, which we try to avoid per-frame.
|
|
...a
|
|
}, l, u, c) {
|
|
if (ip(e, a, u), l) {
|
|
e.style.viewBox && (e.attrs.viewBox = e.style.viewBox);
|
|
return;
|
|
}
|
|
e.attrs = e.style, e.style = {};
|
|
const { attrs: d, style: f } = e;
|
|
d.transform && (f.transform = d.transform, delete d.transform), (f.transform || d.transformOrigin) && (f.transformOrigin = d.transformOrigin ?? "50% 50%", delete d.transformOrigin), f.transform && (f.transformBox = c?.transformBox ?? "fill-box", delete d.transformBox);
|
|
for (const y of p3)
|
|
d[y] !== void 0 && (f[y] = d[y], delete d[y]);
|
|
t !== void 0 && (d.x = t), n !== void 0 && (d.y = n), r !== void 0 && (d.scale = r), o !== void 0 && h3(d, o, i, s, !1);
|
|
}
|
|
const ob = /* @__PURE__ */ new Set([
|
|
"baseFrequency",
|
|
"diffuseConstant",
|
|
"kernelMatrix",
|
|
"kernelUnitLength",
|
|
"keySplines",
|
|
"keyTimes",
|
|
"limitingConeAngle",
|
|
"markerHeight",
|
|
"markerWidth",
|
|
"numOctaves",
|
|
"targetX",
|
|
"targetY",
|
|
"surfaceScale",
|
|
"specularConstant",
|
|
"specularExponent",
|
|
"stdDeviation",
|
|
"tableValues",
|
|
"viewBox",
|
|
"gradientTransform",
|
|
"pathLength",
|
|
"startOffset",
|
|
"textLength",
|
|
"lengthAdjust"
|
|
]), ib = (e) => typeof e == "string" && e.toLowerCase() === "svg";
|
|
function m3(e, t, n, r) {
|
|
tb(e, t, void 0, r);
|
|
for (const o in t.attrs)
|
|
e.setAttribute(ob.has(o) ? o : Jh(o), t.attrs[o]);
|
|
}
|
|
function sb(e, t, n) {
|
|
const r = sp(e, t, n);
|
|
for (const o in e)
|
|
if (Be(e[o]) || Be(t[o])) {
|
|
const i = Wo.indexOf(o) !== -1 ? "attr" + o.charAt(0).toUpperCase() + o.substring(1) : o;
|
|
r[i] = e[o];
|
|
}
|
|
return r;
|
|
}
|
|
class g3 extends QS {
|
|
constructor() {
|
|
super(...arguments), this.type = "svg", this.isSVGTag = !1, this.measureInstanceViewportBox = Ee;
|
|
}
|
|
getBaseTargetFromProps(t, n) {
|
|
return t[n];
|
|
}
|
|
readValueFromInstance(t, n) {
|
|
if (Uo.has(n)) {
|
|
const r = jS(n);
|
|
return r && r.default || 0;
|
|
}
|
|
return n = ob.has(n) ? n : Jh(n), t.getAttribute(n);
|
|
}
|
|
scrapeMotionValuesFromProps(t, n, r) {
|
|
return sb(t, n, r);
|
|
}
|
|
build(t, n, r) {
|
|
rb(t, n, this.isSVGTag, r.transformTemplate, r.style);
|
|
}
|
|
renderInstance(t, n, r, o) {
|
|
m3(t, n, r, o);
|
|
}
|
|
mount(t) {
|
|
this.isSVGTag = ib(t.tagName), super.mount(t);
|
|
}
|
|
}
|
|
const y3 = op.length;
|
|
function ab(e) {
|
|
if (!e)
|
|
return;
|
|
if (!e.isControllingVariants) {
|
|
const n = e.parent ? ab(e.parent) || {} : {};
|
|
return e.props.initial !== void 0 && (n.initial = e.props.initial), n;
|
|
}
|
|
const t = {};
|
|
for (let n = 0; n < y3; n++) {
|
|
const r = op[n], o = e.props[r];
|
|
(cs(o) || o === !1) && (t[r] = o);
|
|
}
|
|
return t;
|
|
}
|
|
function lb(e, t) {
|
|
if (!Array.isArray(t))
|
|
return !1;
|
|
const n = t.length;
|
|
if (n !== e.length)
|
|
return !1;
|
|
for (let r = 0; r < n; r++)
|
|
if (t[r] !== e[r])
|
|
return !1;
|
|
return !0;
|
|
}
|
|
const v3 = [...rp].reverse(), S3 = rp.length;
|
|
function b3(e) {
|
|
return (t) => Promise.all(t.map(({ animation: n, options: r }) => yM(e, n, r)));
|
|
}
|
|
function x3(e) {
|
|
let t = b3(e), n = ey(), r = !0, o = !1;
|
|
const i = (u) => (c, d) => {
|
|
const f = Er(e, d, u === "exit" ? e.presenceContext?.custom : void 0);
|
|
if (f) {
|
|
const { transition: y, transitionEnd: v, ...S } = f;
|
|
c = { ...c, ...S, ...v };
|
|
}
|
|
return c;
|
|
};
|
|
function s(u) {
|
|
t = u(e);
|
|
}
|
|
function a(u) {
|
|
const { props: c } = e, d = ab(e.parent) || {}, f = [], y = /* @__PURE__ */ new Set();
|
|
let v = {}, S = 1 / 0;
|
|
for (let p = 0; p < S3; p++) {
|
|
const h = v3[p], g = n[h], w = c[h] !== void 0 ? c[h] : d[h], E = cs(w), _ = h === u ? g.isActive : null;
|
|
_ === !1 && (S = p);
|
|
let P = w === d[h] && w !== c[h] && E;
|
|
if (P && (r || o) && e.manuallyAnimateOnMount && (P = !1), g.protectedKeys = { ...v }, // If it isn't active and hasn't *just* been set as inactive
|
|
!g.isActive && _ === null || // If we didn't and don't have any defined prop for this animation type
|
|
!w && !g.prevProp || // Or if the prop doesn't define an animation
|
|
yu(w) || typeof w == "boolean")
|
|
continue;
|
|
if (h === "exit" && g.isActive && _ !== !0) {
|
|
g.prevResolvedValues && (v = {
|
|
...v,
|
|
...g.prevResolvedValues
|
|
});
|
|
continue;
|
|
}
|
|
const $ = w3(g.prevProp, w);
|
|
let V = $ || // If we're making this variant active, we want to always make it active
|
|
h === u && g.isActive && !P && E || // If we removed a higher-priority variant (i is in reverse order)
|
|
p > S && E, A = !1;
|
|
const N = Array.isArray(w) ? w : [w];
|
|
let le = N.reduce(i(h), {});
|
|
_ === !1 && (le = {});
|
|
const { prevResolvedValues: De = {} } = g, Ge = {
|
|
...De,
|
|
...le
|
|
}, ct = (z) => {
|
|
V = !0, y.has(z) && (A = !0, y.delete(z)), g.needsAnimating[z] = !0;
|
|
const B = e.getValue(z);
|
|
B && (B.liveStyle = !1);
|
|
};
|
|
for (const z in Ge) {
|
|
const B = le[z], O = De[z];
|
|
if (v.hasOwnProperty(z))
|
|
continue;
|
|
let J = !1;
|
|
sf(B) && sf(O) ? J = !lb(B, O) || $ : J = B !== O, J ? B != null ? ct(z) : y.add(z) : B !== void 0 && y.has(z) ? ct(z) : g.protectedKeys[z] = !0;
|
|
}
|
|
g.prevProp = w, g.prevResolvedValues = le, g.isActive && (v = { ...v, ...le }), (r || o) && e.blockInitialAnimation && (V = !1);
|
|
const Oe = P && $;
|
|
V && (!Oe || A) && f.push(...N.map((z) => {
|
|
const B = { type: h };
|
|
if (typeof z == "string" && (r || o) && !Oe && e.manuallyAnimateOnMount && e.parent) {
|
|
const { parent: O } = e, J = Er(O, z);
|
|
if (O.enteringChildren && J) {
|
|
const { delayChildren: Se } = J.transition || {};
|
|
B.delay = RS(O.enteringChildren, e, Se);
|
|
}
|
|
}
|
|
return {
|
|
animation: z,
|
|
options: B
|
|
};
|
|
}));
|
|
}
|
|
if (y.size) {
|
|
const p = {};
|
|
if (typeof c.initial != "boolean") {
|
|
const h = Er(e, Array.isArray(c.initial) ? c.initial[0] : c.initial);
|
|
h && h.transition && (p.transition = h.transition);
|
|
}
|
|
y.forEach((h) => {
|
|
const g = e.getBaseTarget(h), w = e.getValue(h);
|
|
w && (w.liveStyle = !0), p[h] = g ?? null;
|
|
}), f.push({ animation: p });
|
|
}
|
|
let k = !!f.length;
|
|
return r && (c.initial === !1 || c.initial === c.animate) && !e.manuallyAnimateOnMount && (k = !1), r = !1, o = !1, k ? t(f) : Promise.resolve();
|
|
}
|
|
function l(u, c) {
|
|
if (n[u].isActive === c)
|
|
return Promise.resolve();
|
|
e.variantChildren?.forEach((f) => f.animationState?.setActive(u, c)), n[u].isActive = c;
|
|
const d = a(u);
|
|
for (const f in n)
|
|
n[f].protectedKeys = {};
|
|
return d;
|
|
}
|
|
return {
|
|
animateChanges: a,
|
|
setActive: l,
|
|
setAnimateFunction: s,
|
|
getState: () => n,
|
|
reset: () => {
|
|
n = ey(), o = !0;
|
|
}
|
|
};
|
|
}
|
|
function w3(e, t) {
|
|
return typeof t == "string" ? t !== e : Array.isArray(t) ? !lb(t, e) : !1;
|
|
}
|
|
function cr(e = !1) {
|
|
return {
|
|
isActive: e,
|
|
protectedKeys: {},
|
|
needsAnimating: {},
|
|
prevResolvedValues: {}
|
|
};
|
|
}
|
|
function ey() {
|
|
return {
|
|
animate: cr(!0),
|
|
whileInView: cr(),
|
|
whileHover: cr(),
|
|
whileTap: cr(),
|
|
whileDrag: cr(),
|
|
whileFocus: cr(),
|
|
exit: cr()
|
|
};
|
|
}
|
|
function gf(e, t) {
|
|
e.min = t.min, e.max = t.max;
|
|
}
|
|
function Lt(e, t) {
|
|
gf(e.x, t.x), gf(e.y, t.y);
|
|
}
|
|
function ty(e, t) {
|
|
e.translate = t.translate, e.scale = t.scale, e.originPoint = t.originPoint, e.origin = t.origin;
|
|
}
|
|
const ub = 1e-4, k3 = 1 - ub, C3 = 1 + ub, cb = 0.01, T3 = 0 - cb, P3 = 0 + cb;
|
|
function qe(e) {
|
|
return e.max - e.min;
|
|
}
|
|
function E3(e, t, n) {
|
|
return Math.abs(e - t) <= n;
|
|
}
|
|
function ny(e, t, n, r = 0.5) {
|
|
e.origin = r, e.originPoint = oe(t.min, t.max, e.origin), e.scale = qe(n) / qe(t), e.translate = oe(n.min, n.max, e.origin) - e.originPoint, (e.scale >= k3 && e.scale <= C3 || isNaN(e.scale)) && (e.scale = 1), (e.translate >= T3 && e.translate <= P3 || isNaN(e.translate)) && (e.translate = 0);
|
|
}
|
|
function Li(e, t, n, r) {
|
|
ny(e.x, t.x, n.x, r ? r.originX : void 0), ny(e.y, t.y, n.y, r ? r.originY : void 0);
|
|
}
|
|
function ry(e, t, n, r = 0) {
|
|
const o = r ? oe(n.min, n.max, r) : n.min;
|
|
e.min = o + t.min, e.max = e.min + qe(t);
|
|
}
|
|
function _3(e, t, n, r) {
|
|
ry(e.x, t.x, n.x, r?.x), ry(e.y, t.y, n.y, r?.y);
|
|
}
|
|
function oy(e, t, n, r = 0) {
|
|
const o = r ? oe(n.min, n.max, r) : n.min;
|
|
e.min = t.min - o, e.max = e.min + qe(t);
|
|
}
|
|
function Rl(e, t, n, r) {
|
|
oy(e.x, t.x, n.x, r?.x), oy(e.y, t.y, n.y, r?.y);
|
|
}
|
|
function iy(e, t, n, r, o) {
|
|
return e -= t, e = Al(e, 1 / n, r), o !== void 0 && (e = Al(e, 1 / o, r)), e;
|
|
}
|
|
function $3(e, t = 0, n = 1, r = 0.5, o, i = e, s = e) {
|
|
if (dn.test(t) && (t = parseFloat(t), t = oe(s.min, s.max, t / 100) - s.min), typeof t != "number")
|
|
return;
|
|
let a = oe(i.min, i.max, r);
|
|
e === i && (a -= t), e.min = iy(e.min, t, n, a, o), e.max = iy(e.max, t, n, a, o);
|
|
}
|
|
function sy(e, t, [n, r, o], i, s) {
|
|
$3(e, t[n], t[r], t[o], t.scale, i, s);
|
|
}
|
|
const A3 = ["x", "scaleX", "originX"], R3 = ["y", "scaleY", "originY"];
|
|
function ay(e, t, n, r) {
|
|
sy(e.x, t, A3, n ? n.x : void 0, r ? r.x : void 0), sy(e.y, t, R3, n ? n.y : void 0, r ? r.y : void 0);
|
|
}
|
|
function ly(e) {
|
|
return e.translate === 0 && e.scale === 1;
|
|
}
|
|
function db(e) {
|
|
return ly(e.x) && ly(e.y);
|
|
}
|
|
function uy(e, t) {
|
|
return e.min === t.min && e.max === t.max;
|
|
}
|
|
function z3(e, t) {
|
|
return uy(e.x, t.x) && uy(e.y, t.y);
|
|
}
|
|
function cy(e, t) {
|
|
return Math.round(e.min) === Math.round(t.min) && Math.round(e.max) === Math.round(t.max);
|
|
}
|
|
function fb(e, t) {
|
|
return cy(e.x, t.x) && cy(e.y, t.y);
|
|
}
|
|
function dy(e) {
|
|
return qe(e.x) / qe(e.y);
|
|
}
|
|
function fy(e, t) {
|
|
return e.translate === t.translate && e.scale === t.scale && e.originPoint === t.originPoint;
|
|
}
|
|
function Zt(e) {
|
|
return [e("x"), e("y")];
|
|
}
|
|
function M3(e, t, n) {
|
|
let r = "";
|
|
const o = e.x.translate / t.x, i = e.y.translate / t.y, s = n?.z || 0;
|
|
if ((o || i || s) && (r = `translate3d(${o}px, ${i}px, ${s}px) `), (t.x !== 1 || t.y !== 1) && (r += `scale(${1 / t.x}, ${1 / t.y}) `), n) {
|
|
const { transformPerspective: u, rotate: c, pathRotation: d, rotateX: f, rotateY: y, skewX: v, skewY: S } = n;
|
|
u && (r = `perspective(${u}px) ${r}`), c && (r += `rotate(${c}deg) `), d && (r += `rotate(${d}deg) `), f && (r += `rotateX(${f}deg) `), y && (r += `rotateY(${y}deg) `), v && (r += `skewX(${v}deg) `), S && (r += `skewY(${S}deg) `);
|
|
}
|
|
const a = e.x.scale * t.x, l = e.y.scale * t.y;
|
|
return (a !== 1 || l !== 1) && (r += `scale(${a}, ${l})`), r || "none";
|
|
}
|
|
const hb = [
|
|
"borderTopLeftRadius",
|
|
"borderTopRightRadius",
|
|
"borderBottomLeftRadius",
|
|
"borderBottomRightRadius"
|
|
], D3 = hb.length, hy = (e) => typeof e == "string" ? parseFloat(e) : e, py = (e) => typeof e == "number" || I.test(e);
|
|
function I3(e, t, n, r, o, i) {
|
|
o ? (e.opacity = oe(0, n.opacity ?? 1, L3(r)), e.opacityExit = oe(t.opacity ?? 1, 0, V3(r))) : i && (e.opacity = oe(t.opacity ?? 1, n.opacity ?? 1, r));
|
|
for (let s = 0; s < D3; s++) {
|
|
const a = hb[s];
|
|
let l = my(t, a), u = my(n, a);
|
|
if (l === void 0 && u === void 0)
|
|
continue;
|
|
l || (l = 0), u || (u = 0), l === 0 || u === 0 || py(l) === py(u) ? (e[a] = Math.max(oe(hy(l), hy(u), r), 0), (dn.test(u) || dn.test(l)) && (e[a] += "%")) : e[a] = u;
|
|
}
|
|
(t.rotate || n.rotate) && (e.rotate = oe(t.rotate || 0, n.rotate || 0, r));
|
|
}
|
|
function my(e, t) {
|
|
return e[t] !== void 0 ? e[t] : e.borderRadius;
|
|
}
|
|
const L3 = /* @__PURE__ */ pb(0, 0.5, iS), V3 = /* @__PURE__ */ pb(0.5, 0.95, $t);
|
|
function pb(e, t, n) {
|
|
return (r) => r < e ? 0 : r > t ? 1 : n(/* @__PURE__ */ ls(e, t, r));
|
|
}
|
|
function B3(e, t, n) {
|
|
const r = Be(e) ? e : Lo(e);
|
|
return r.start(qh("", r, t, n)), r.animation;
|
|
}
|
|
function ds(e, t, n, r = { passive: !0 }) {
|
|
return e.addEventListener(t, n, r), () => e.removeEventListener(t, n);
|
|
}
|
|
const F3 = (e, t) => e.depth - t.depth;
|
|
class j3 {
|
|
constructor() {
|
|
this.children = [], this.isDirty = !1;
|
|
}
|
|
add(t) {
|
|
Fh(this.children, t), this.isDirty = !0;
|
|
}
|
|
remove(t) {
|
|
kl(this.children, t), this.isDirty = !0;
|
|
}
|
|
forEach(t) {
|
|
this.isDirty && this.children.sort(F3), this.isDirty = !1, this.children.forEach(t);
|
|
}
|
|
}
|
|
function O3(e, t) {
|
|
const n = Qe.now(), r = ({ timestamp: o }) => {
|
|
const i = o - n;
|
|
i >= t && (tr(r), e(i - t));
|
|
};
|
|
return ie.setup(r, !0), () => tr(r);
|
|
}
|
|
function Wa(e) {
|
|
return Be(e) ? e.get() : e;
|
|
}
|
|
class N3 {
|
|
constructor() {
|
|
this.members = [];
|
|
}
|
|
add(t) {
|
|
Fh(this.members, t);
|
|
for (let n = this.members.length - 1; n >= 0; n--) {
|
|
const r = this.members[n];
|
|
if (r === t || r === this.lead || r === this.prevLead)
|
|
continue;
|
|
const o = r.instance;
|
|
(!o || o.isConnected === !1) && !r.snapshot && (kl(this.members, r), r.unmount());
|
|
}
|
|
t.scheduleRender();
|
|
}
|
|
remove(t) {
|
|
if (kl(this.members, t), t === this.prevLead && (this.prevLead = void 0), t === this.lead) {
|
|
const n = this.members[this.members.length - 1];
|
|
n && this.promote(n);
|
|
}
|
|
}
|
|
relegate(t) {
|
|
for (let n = this.members.indexOf(t) - 1; n >= 0; n--) {
|
|
const r = this.members[n];
|
|
if (r.isPresent !== !1 && r.instance?.isConnected !== !1)
|
|
return this.promote(r), !0;
|
|
}
|
|
return !1;
|
|
}
|
|
promote(t, n) {
|
|
const r = this.lead;
|
|
if (t !== r && (this.prevLead = r, this.lead = t, t.show(), r)) {
|
|
r.updateSnapshot(), t.scheduleRender();
|
|
const { layoutDependency: o } = r.options, { layoutDependency: i } = t.options;
|
|
(o === void 0 || o !== i) && (t.resumeFrom = r, n && (r.preserveOpacity = !0), r.snapshot && (t.snapshot = r.snapshot, t.snapshot.latestValues = r.animationValues || r.latestValues), t.root?.isUpdating && (t.isLayoutDirty = !0)), t.options.crossfade === !1 && r.hide();
|
|
}
|
|
}
|
|
exitAnimationComplete() {
|
|
this.members.forEach((t) => {
|
|
t.options.onExitComplete?.(), t.resumingFrom?.options.onExitComplete?.();
|
|
});
|
|
}
|
|
scheduleRender() {
|
|
this.members.forEach((t) => t.instance && t.scheduleRender(!1));
|
|
}
|
|
removeLeadSnapshot() {
|
|
this.lead?.snapshot && (this.lead.snapshot = void 0);
|
|
}
|
|
}
|
|
const Ua = {
|
|
/**
|
|
* Global flag as to whether the tree has animated since the last time
|
|
* we resized the window
|
|
*/
|
|
hasAnimatedSinceResize: !0,
|
|
/**
|
|
* We set this to true once, on the first update. Any nodes added to the tree beyond that
|
|
* update will be given a `data-projection-id` attribute.
|
|
*/
|
|
hasEverUpdated: !1
|
|
}, zc = ["", "X", "Y", "Z"], W3 = 1e3;
|
|
let U3 = 0;
|
|
function Mc(e, t, n, r) {
|
|
const { latestValues: o } = t;
|
|
o[e] && (n[e] = o[e], t.setStaticValue(e, 0), r && (r[e] = 0));
|
|
}
|
|
function mb(e) {
|
|
if (e.hasCheckedOptimisedAppear = !0, e.root === e)
|
|
return;
|
|
const { visualElement: t } = e.options;
|
|
if (!t)
|
|
return;
|
|
const n = LS(t);
|
|
if (window.MotionHasOptimisedAnimation(n, "transform")) {
|
|
const { layout: o, layoutId: i } = e.options;
|
|
window.MotionCancelOptimisedAnimation(n, "transform", ie, !(o || i));
|
|
}
|
|
const { parent: r } = e;
|
|
r && !r.hasCheckedOptimisedAppear && mb(r);
|
|
}
|
|
function gb({ attachResizeListener: e, defaultParent: t, measureScroll: n, checkIsScrollRoot: r, resetTransform: o }) {
|
|
return class {
|
|
constructor(s = {}, a = t?.()) {
|
|
this.id = U3++, this.animationId = 0, this.animationCommitId = 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.layoutVersion = 0, this.updateScheduled = !1, this.scheduleUpdate = () => this.update(), this.projectionUpdateScheduled = !1, this.checkUpdateFailed = () => {
|
|
this.isUpdating && (this.isUpdating = !1, this.clearAllSnapshots());
|
|
}, this.updateProjection = () => {
|
|
this.projectionUpdateScheduled = !1, this.nodes.forEach(G3), this.nodes.forEach(J3), this.nodes.forEach(e4), this.nodes.forEach(X3);
|
|
}, this.resolvedRelativeTargetAt = 0, this.linkedParentVersion = 0, this.hasProjected = !1, this.isVisible = !0, this.animationProgress = 0, this.sharedNodes = /* @__PURE__ */ new Map(), this.latestValues = s, this.root = a ? a.root || a : this, this.path = a ? [...a.path, a] : [], this.parent = a, this.depth = a ? a.depth + 1 : 0;
|
|
for (let l = 0; l < this.path.length; l++)
|
|
this.path[l].shouldResetTransform = !0;
|
|
this.root === this && (this.nodes = new j3());
|
|
}
|
|
addEventListener(s, a) {
|
|
return this.eventHandlers.has(s) || this.eventHandlers.set(s, new jh()), this.eventHandlers.get(s).add(a);
|
|
}
|
|
notifyListeners(s, ...a) {
|
|
const l = this.eventHandlers.get(s);
|
|
l && l.notify(...a);
|
|
}
|
|
hasListeners(s) {
|
|
return this.eventHandlers.has(s);
|
|
}
|
|
/**
|
|
* Lifecycles
|
|
*/
|
|
mount(s) {
|
|
if (this.instance)
|
|
return;
|
|
this.isSVG = np(s) && !KM(s), this.instance = s;
|
|
const { layoutId: a, layout: l, visualElement: u } = this.options;
|
|
if (u && !u.current && u.mount(s), this.root.nodes.add(this), this.parent && this.parent.children.add(this), this.root.hasTreeAnimated && (l || a) && (this.isLayoutDirty = !0), e) {
|
|
let c, d = 0;
|
|
const f = () => this.root.updateBlockedByResize = !1;
|
|
ie.read(() => {
|
|
d = window.innerWidth;
|
|
}), e(s, () => {
|
|
const y = window.innerWidth;
|
|
y !== d && (d = y, this.root.updateBlockedByResize = !0, c && c(), c = O3(f, 250), Ua.hasAnimatedSinceResize && (Ua.hasAnimatedSinceResize = !1, this.nodes.forEach(vy)));
|
|
});
|
|
}
|
|
a && this.root.registerSharedNode(a, this), this.options.animate !== !1 && u && (a || l) && this.addEventListener("didUpdate", ({ delta: c, hasLayoutChanged: d, hasRelativeLayoutChanged: f, layout: y }) => {
|
|
if (this.isTreeAnimationBlocked()) {
|
|
this.target = void 0, this.relativeTarget = void 0;
|
|
return;
|
|
}
|
|
const v = this.options.transition || u.getDefaultTransition() || i4, { onLayoutAnimationStart: S, onLayoutAnimationComplete: k } = u.getProps(), p = !this.targetLayout || !fb(this.targetLayout, y), h = !d && f;
|
|
if (this.options.layoutRoot || this.resumeFrom || h || d && (p || !this.currentAnimation)) {
|
|
this.resumeFrom && (this.resumingFrom = this.resumeFrom, this.resumingFrom.resumingFrom = void 0);
|
|
const g = {
|
|
...Qh(v, "layout"),
|
|
onPlay: S,
|
|
onComplete: k
|
|
};
|
|
(u.shouldReduceMotion || this.options.layoutRoot) && (g.delay = 0, g.type = !1), this.startAnimation(g), this.setAnimationOrigin(c, h, g.path);
|
|
} else
|
|
d || vy(this), this.isLead() && this.options.onExitComplete && this.options.onExitComplete();
|
|
this.targetLayout = y;
|
|
});
|
|
}
|
|
unmount() {
|
|
this.options.layoutId && this.willUpdate(), this.root.nodes.remove(this);
|
|
const s = this.getStack();
|
|
s && s.remove(this), this.parent && this.parent.children.delete(this), this.instance = void 0, this.eventHandlers.clear(), tr(this.updateProjection);
|
|
}
|
|
// only on the root
|
|
blockUpdate() {
|
|
this.updateManuallyBlocked = !0;
|
|
}
|
|
unblockUpdate() {
|
|
this.updateManuallyBlocked = !1;
|
|
}
|
|
isUpdateBlocked() {
|
|
return this.updateManuallyBlocked || this.updateBlockedByResize;
|
|
}
|
|
isTreeAnimationBlocked() {
|
|
return this.isAnimationBlocked || this.parent && this.parent.isTreeAnimationBlocked() || !1;
|
|
}
|
|
// Note: currently only running on root node
|
|
startUpdate() {
|
|
this.isUpdateBlocked() || (this.isUpdating = !0, this.nodes && this.nodes.forEach(t4), this.animationId++);
|
|
}
|
|
getTransformTemplate() {
|
|
const { visualElement: s } = this.options;
|
|
return s && s.getProps().transformTemplate;
|
|
}
|
|
willUpdate(s = !0) {
|
|
if (this.root.hasTreeAnimated = !0, this.root.isUpdateBlocked()) {
|
|
this.options.onExitComplete && this.options.onExitComplete();
|
|
return;
|
|
}
|
|
if (window.MotionCancelOptimisedAnimation && !this.hasCheckedOptimisedAppear && mb(this), !this.root.isUpdating && this.root.startUpdate(), this.isLayoutDirty)
|
|
return;
|
|
this.isLayoutDirty = !0;
|
|
for (let c = 0; c < this.path.length; c++) {
|
|
const d = this.path[c];
|
|
d.shouldResetTransform = !0, (typeof d.latestValues.x == "string" || typeof d.latestValues.y == "string") && (d.isLayoutDirty = !0), d.updateScroll("snapshot"), d.options.layoutRoot && d.willUpdate(!1);
|
|
}
|
|
const { layoutId: a, layout: l } = this.options;
|
|
if (a === void 0 && !l)
|
|
return;
|
|
const u = this.getTransformTemplate();
|
|
this.prevTransformTemplateValue = u ? u(this.latestValues, "") : void 0, this.updateSnapshot(), s && this.notifyListeners("willUpdate");
|
|
}
|
|
update() {
|
|
if (this.updateScheduled = !1, this.isUpdateBlocked()) {
|
|
const l = this.updateBlockedByResize;
|
|
this.unblockUpdate(), this.updateBlockedByResize = !1, this.clearAllSnapshots(), l && this.nodes.forEach(Q3), this.nodes.forEach(gy);
|
|
return;
|
|
}
|
|
if (this.animationId <= this.animationCommitId) {
|
|
this.nodes.forEach(yy);
|
|
return;
|
|
}
|
|
this.animationCommitId = this.animationId, this.isUpdating ? (this.isUpdating = !1, this.nodes.forEach(q3), this.nodes.forEach(Z3), this.nodes.forEach(H3), this.nodes.forEach(K3)) : this.nodes.forEach(yy), this.clearAllSnapshots();
|
|
const a = Qe.now();
|
|
Le.delta = fn(0, 1e3 / 60, a - Le.timestamp), Le.timestamp = a, Le.isProcessing = !0, Cc.update.process(Le), Cc.preRender.process(Le), Cc.render.process(Le), Le.isProcessing = !1;
|
|
}
|
|
didUpdate() {
|
|
this.updateScheduled || (this.updateScheduled = !0, ep.read(this.scheduleUpdate));
|
|
}
|
|
clearAllSnapshots() {
|
|
this.nodes.forEach(Y3), this.sharedNodes.forEach(n4);
|
|
}
|
|
scheduleUpdateProjection() {
|
|
this.projectionUpdateScheduled || (this.projectionUpdateScheduled = !0, ie.preRender(this.updateProjection, !1, !0));
|
|
}
|
|
scheduleCheckAfterUnmount() {
|
|
ie.postRender(() => {
|
|
this.isLayoutDirty ? this.root.didUpdate() : this.root.checkUpdateFailed();
|
|
});
|
|
}
|
|
/**
|
|
* Update measurements
|
|
*/
|
|
updateSnapshot() {
|
|
this.snapshot || !this.instance || (this.snapshot = this.measure(), this.snapshot && !qe(this.snapshot.measuredBox.x) && !qe(this.snapshot.measuredBox.y) && (this.snapshot = void 0));
|
|
}
|
|
updateLayout() {
|
|
if (!this.instance || (this.updateScroll(), !(this.options.alwaysMeasureLayout && this.isLead()) && !this.isLayoutDirty))
|
|
return;
|
|
if (this.resumeFrom && !this.resumeFrom.instance)
|
|
for (let l = 0; l < this.path.length; l++)
|
|
this.path[l].updateScroll();
|
|
const s = this.layout;
|
|
this.layout = this.measure(!1), this.layoutVersion++, this.layoutCorrected || (this.layoutCorrected = Ee()), this.isLayoutDirty = !1, this.projectionDelta = void 0, this.notifyListeners("measure", this.layout.layoutBox);
|
|
const { visualElement: a } = this.options;
|
|
a && a.notify("LayoutMeasure", this.layout.layoutBox, s ? s.layoutBox : void 0);
|
|
}
|
|
updateScroll(s = "measure") {
|
|
let a = !!(this.options.layoutScroll && this.instance);
|
|
if (this.scroll && this.scroll.animationId === this.root.animationId && this.scroll.phase === s && (a = !1), a && this.instance) {
|
|
const l = r(this.instance);
|
|
this.scroll = {
|
|
animationId: this.root.animationId,
|
|
phase: s,
|
|
isRoot: l,
|
|
offset: n(this.instance),
|
|
wasRoot: this.scroll ? this.scroll.isRoot : l
|
|
};
|
|
}
|
|
}
|
|
resetTransform() {
|
|
if (!o)
|
|
return;
|
|
const s = this.isLayoutDirty || this.shouldResetTransform || this.options.alwaysMeasureLayout, a = this.projectionDelta && !db(this.projectionDelta), l = this.getTransformTemplate(), u = l ? l(this.latestValues, "") : void 0, c = u !== this.prevTransformTemplateValue;
|
|
s && this.instance && (a || hr(this.latestValues) || c) && (o(this.instance, u), this.shouldResetTransform = !1, this.scheduleRender());
|
|
}
|
|
measure(s = !0) {
|
|
const a = this.measurePageBox();
|
|
let l = this.removeElementScroll(a);
|
|
return s && (l = this.removeTransform(l)), s4(l), {
|
|
animationId: this.root.animationId,
|
|
measuredBox: a,
|
|
layoutBox: l,
|
|
latestValues: {},
|
|
source: this.id
|
|
};
|
|
}
|
|
measurePageBox() {
|
|
const { visualElement: s } = this.options;
|
|
if (!s)
|
|
return Ee();
|
|
const a = s.measureViewportBox();
|
|
if (!(this.scroll?.wasRoot || this.path.some(a4))) {
|
|
const { scroll: u } = this.root;
|
|
u && (nn(a.x, u.offset.x), nn(a.y, u.offset.y));
|
|
}
|
|
return a;
|
|
}
|
|
removeElementScroll(s) {
|
|
const a = Ee();
|
|
if (Lt(a, s), this.scroll?.wasRoot)
|
|
return a;
|
|
for (let l = 0; l < this.path.length; l++) {
|
|
const u = this.path[l], { scroll: c, options: d } = u;
|
|
u !== this.root && c && d.layoutScroll && (c.wasRoot && Lt(a, s), nn(a.x, c.offset.x), nn(a.y, c.offset.y));
|
|
}
|
|
return a;
|
|
}
|
|
applyTransform(s, a = !1, l) {
|
|
const u = l || Ee();
|
|
Lt(u, s);
|
|
for (let c = 0; c < this.path.length; c++) {
|
|
const d = this.path[c];
|
|
!a && d.options.layoutScroll && d.scroll && d !== d.root && (nn(u.x, -d.scroll.offset.x), nn(u.y, -d.scroll.offset.y)), hr(d.latestValues) && Na(u, d.latestValues, d.layout?.layoutBox);
|
|
}
|
|
return hr(this.latestValues) && Na(u, this.latestValues, this.layout?.layoutBox), u;
|
|
}
|
|
removeTransform(s) {
|
|
const a = Ee();
|
|
Lt(a, s);
|
|
for (let l = 0; l < this.path.length; l++) {
|
|
const u = this.path[l];
|
|
if (!hr(u.latestValues))
|
|
continue;
|
|
let c;
|
|
u.instance && (hf(u.latestValues) && u.updateSnapshot(), c = Ee(), Lt(c, u.measurePageBox())), ay(a, u.latestValues, u.snapshot?.layoutBox, c);
|
|
}
|
|
return hr(this.latestValues) && ay(a, this.latestValues), a;
|
|
}
|
|
setTargetDelta(s) {
|
|
this.targetDelta = s, this.root.scheduleUpdateProjection(), this.isProjectionDirty = !0;
|
|
}
|
|
setOptions(s) {
|
|
this.options = {
|
|
...this.options,
|
|
...s,
|
|
crossfade: s.crossfade !== void 0 ? s.crossfade : !0
|
|
};
|
|
}
|
|
clearMeasurements() {
|
|
this.scroll = void 0, this.layout = void 0, this.snapshot = void 0, this.prevTransformTemplateValue = void 0, this.targetDelta = void 0, this.target = void 0, this.isLayoutDirty = !1;
|
|
}
|
|
forceRelativeParentToResolveTarget() {
|
|
this.relativeParent && this.relativeParent.resolvedRelativeTargetAt !== Le.timestamp && this.relativeParent.resolveTargetDelta(!0);
|
|
}
|
|
resolveTargetDelta(s = !1) {
|
|
const a = this.getLead();
|
|
this.isProjectionDirty || (this.isProjectionDirty = a.isProjectionDirty), this.isTransformDirty || (this.isTransformDirty = a.isTransformDirty), this.isSharedProjectionDirty || (this.isSharedProjectionDirty = a.isSharedProjectionDirty);
|
|
const l = !!this.resumingFrom || this !== a;
|
|
if (!(s || l && this.isSharedProjectionDirty || this.isProjectionDirty || this.parent?.isProjectionDirty || this.attemptToResolveRelativeTarget || this.root.updateBlockedByResize))
|
|
return;
|
|
const { layout: c, layoutId: d } = this.options;
|
|
if (!this.layout || !(c || d))
|
|
return;
|
|
this.resolvedRelativeTargetAt = Le.timestamp;
|
|
const f = this.getClosestProjectingParent();
|
|
f && this.linkedParentVersion !== f.layoutVersion && !f.options.layoutRoot && this.removeRelativeTarget(), !this.targetDelta && !this.relativeTarget && (this.options.layoutAnchor !== !1 && f && f.layout ? this.createRelativeTarget(f, this.layout.layoutBox, f.layout.layoutBox) : this.removeRelativeTarget()), !(!this.relativeTarget && !this.targetDelta) && (this.target || (this.target = Ee(), this.targetWithTransforms = Ee()), this.relativeTarget && this.relativeTargetOrigin && this.relativeParent && this.relativeParent.target ? (this.forceRelativeParentToResolveTarget(), _3(this.target, this.relativeTarget, this.relativeParent.target, this.options.layoutAnchor || void 0)) : this.targetDelta ? (this.resumingFrom ? this.applyTransform(this.layout.layoutBox, !1, this.target) : Lt(this.target, this.layout.layoutBox), JS(this.target, this.targetDelta)) : Lt(this.target, this.layout.layoutBox), this.attemptToResolveRelativeTarget && (this.attemptToResolveRelativeTarget = !1, this.options.layoutAnchor !== !1 && f && !!f.resumingFrom == !!this.resumingFrom && !f.options.layoutScroll && f.target && this.animationProgress !== 1 ? this.createRelativeTarget(f, this.target, f.target) : this.relativeParent = this.relativeTarget = void 0));
|
|
}
|
|
getClosestProjectingParent() {
|
|
if (!(!this.parent || hf(this.parent.latestValues) || ZS(this.parent.latestValues)))
|
|
return this.parent.isProjecting() ? this.parent : this.parent.getClosestProjectingParent();
|
|
}
|
|
isProjecting() {
|
|
return !!((this.relativeTarget || this.targetDelta || this.options.layoutRoot) && this.layout);
|
|
}
|
|
createRelativeTarget(s, a, l) {
|
|
this.relativeParent = s, this.linkedParentVersion = s.layoutVersion, this.forceRelativeParentToResolveTarget(), this.relativeTarget = Ee(), this.relativeTargetOrigin = Ee(), Rl(this.relativeTargetOrigin, a, l, this.options.layoutAnchor || void 0), Lt(this.relativeTarget, this.relativeTargetOrigin);
|
|
}
|
|
removeRelativeTarget() {
|
|
this.relativeParent = this.relativeTarget = void 0;
|
|
}
|
|
calcProjection() {
|
|
const s = this.getLead(), a = !!this.resumingFrom || this !== s;
|
|
let l = !0;
|
|
if ((this.isProjectionDirty || this.parent?.isProjectionDirty) && (l = !1), a && (this.isSharedProjectionDirty || this.isTransformDirty) && (l = !1), this.resolvedRelativeTargetAt === Le.timestamp && (l = !1), l)
|
|
return;
|
|
const { layout: u, layoutId: c } = this.options;
|
|
if (this.isTreeAnimating = !!(this.parent && this.parent.isTreeAnimating || this.currentAnimation || this.pendingAnimation), this.isTreeAnimating || (this.targetDelta = this.relativeTarget = void 0), !this.layout || !(u || c))
|
|
return;
|
|
Lt(this.layoutCorrected, this.layout.layoutBox);
|
|
const d = this.treeScale.x, f = this.treeScale.y;
|
|
r3(this.layoutCorrected, this.treeScale, this.path, a), s.layout && !s.target && (this.treeScale.x !== 1 || this.treeScale.y !== 1) && (s.target = s.layout.layoutBox, s.targetWithTransforms = Ee());
|
|
const { target: y } = s;
|
|
if (!y) {
|
|
this.prevProjectionDelta && (this.createProjectionDeltas(), this.scheduleRender());
|
|
return;
|
|
}
|
|
!this.projectionDelta || !this.prevProjectionDelta ? this.createProjectionDeltas() : (ty(this.prevProjectionDelta.x, this.projectionDelta.x), ty(this.prevProjectionDelta.y, this.projectionDelta.y)), Li(this.projectionDelta, this.layoutCorrected, y, this.latestValues), (this.treeScale.x !== d || this.treeScale.y !== f || !fy(this.projectionDelta.x, this.prevProjectionDelta.x) || !fy(this.projectionDelta.y, this.prevProjectionDelta.y)) && (this.hasProjected = !0, this.scheduleRender(), this.notifyListeners("projectionUpdate", y));
|
|
}
|
|
hide() {
|
|
this.isVisible = !1;
|
|
}
|
|
show() {
|
|
this.isVisible = !0;
|
|
}
|
|
scheduleRender(s = !0) {
|
|
if (this.options.visualElement?.scheduleRender(), s) {
|
|
const a = this.getStack();
|
|
a && a.scheduleRender();
|
|
}
|
|
this.resumingFrom && !this.resumingFrom.instance && (this.resumingFrom = void 0);
|
|
}
|
|
createProjectionDeltas() {
|
|
this.prevProjectionDelta = fo(), this.projectionDelta = fo(), this.projectionDeltaWithTransform = fo();
|
|
}
|
|
setAnimationOrigin(s, a = !1, l) {
|
|
const u = this.snapshot, c = u ? u.latestValues : {}, d = { ...this.latestValues }, f = fo();
|
|
(!this.relativeParent || !this.relativeParent.options.layoutRoot) && (this.relativeTarget = this.relativeTargetOrigin = void 0), this.attemptToResolveRelativeTarget = !a;
|
|
const y = Ee(), v = u ? u.source : void 0, S = this.layout ? this.layout.source : void 0, k = v !== S, p = this.getStack(), h = !p || p.members.length <= 1, g = !!(k && !h && this.options.crossfade === !0 && !this.path.some(o4));
|
|
this.animationProgress = 0;
|
|
let w;
|
|
const E = l?.interpolateProjection(s);
|
|
this.mixTargetDelta = (_) => {
|
|
const P = _ / 1e3, $ = E?.(P);
|
|
$ ? (f.x.translate = $.x, f.x.scale = oe(s.x.scale, 1, P), f.x.origin = s.x.origin, f.x.originPoint = s.x.originPoint, f.y.translate = $.y, f.y.scale = oe(s.y.scale, 1, P), f.y.origin = s.y.origin, f.y.originPoint = s.y.originPoint) : (Sy(f.x, s.x, P), Sy(f.y, s.y, P)), this.setTargetDelta(f), this.relativeTarget && this.relativeTargetOrigin && this.layout && this.relativeParent && this.relativeParent.layout && (Rl(y, this.layout.layoutBox, this.relativeParent.layout.layoutBox, this.options.layoutAnchor || void 0), r4(this.relativeTarget, this.relativeTargetOrigin, y, P), w && z3(this.relativeTarget, w) && (this.isProjectionDirty = !1), w || (w = Ee()), Lt(w, this.relativeTarget)), k && (this.animationValues = d, I3(d, c, this.latestValues, P, g, h)), $ && $.rotate !== void 0 && (this.animationValues || (this.animationValues = d), this.animationValues.pathRotation = $.rotate), this.root.scheduleUpdateProjection(), this.scheduleRender(), this.animationProgress = P;
|
|
}, this.mixTargetDelta(this.options.layoutRoot ? 1e3 : 0);
|
|
}
|
|
startAnimation(s) {
|
|
this.notifyListeners("animationStart"), this.currentAnimation?.stop(), this.resumingFrom?.currentAnimation?.stop(), this.pendingAnimation && (tr(this.pendingAnimation), this.pendingAnimation = void 0), this.pendingAnimation = ie.update(() => {
|
|
Ua.hasAnimatedSinceResize = !0, this.motionValue || (this.motionValue = Lo(0)), this.motionValue.jump(0, !1), this.currentAnimation = B3(this.motionValue, [0, 1e3], {
|
|
...s,
|
|
velocity: 0,
|
|
isSync: !0,
|
|
onUpdate: (a) => {
|
|
this.mixTargetDelta(a), s.onUpdate && s.onUpdate(a);
|
|
},
|
|
onStop: () => {
|
|
},
|
|
onComplete: () => {
|
|
s.onComplete && s.onComplete(), this.completeAnimation();
|
|
}
|
|
}), this.resumingFrom && (this.resumingFrom.currentAnimation = this.currentAnimation), this.pendingAnimation = void 0;
|
|
});
|
|
}
|
|
completeAnimation() {
|
|
this.resumingFrom && (this.resumingFrom.currentAnimation = void 0, this.resumingFrom.preserveOpacity = void 0);
|
|
const s = this.getStack();
|
|
s && s.exitAnimationComplete(), this.resumingFrom = this.currentAnimation = this.animationValues = void 0, this.notifyListeners("animationComplete");
|
|
}
|
|
finishAnimation() {
|
|
this.currentAnimation && (this.mixTargetDelta && this.mixTargetDelta(W3), this.currentAnimation.stop()), this.completeAnimation();
|
|
}
|
|
applyTransformsToTarget() {
|
|
const s = this.getLead();
|
|
let { targetWithTransforms: a, target: l, layout: u, latestValues: c } = s;
|
|
if (!(!a || !l || !u)) {
|
|
if (this !== s && this.layout && u && yb(this.options.animationType, this.layout.layoutBox, u.layoutBox)) {
|
|
l = this.target || Ee();
|
|
const d = qe(this.layout.layoutBox.x);
|
|
l.x.min = s.target.x.min, l.x.max = l.x.min + d;
|
|
const f = qe(this.layout.layoutBox.y);
|
|
l.y.min = s.target.y.min, l.y.max = l.y.min + f;
|
|
}
|
|
Lt(a, l), Na(a, c), Li(this.projectionDeltaWithTransform, this.layoutCorrected, a, c);
|
|
}
|
|
}
|
|
registerSharedNode(s, a) {
|
|
this.sharedNodes.has(s) || this.sharedNodes.set(s, new N3()), this.sharedNodes.get(s).add(a);
|
|
const u = a.options.initialPromotionConfig;
|
|
a.promote({
|
|
transition: u ? u.transition : void 0,
|
|
preserveFollowOpacity: u && u.shouldPreserveFollowOpacity ? u.shouldPreserveFollowOpacity(a) : void 0
|
|
});
|
|
}
|
|
isLead() {
|
|
const s = this.getStack();
|
|
return s ? s.lead === this : !0;
|
|
}
|
|
getLead() {
|
|
const { layoutId: s } = this.options;
|
|
return s ? this.getStack()?.lead || this : this;
|
|
}
|
|
getPrevLead() {
|
|
const { layoutId: s } = this.options;
|
|
return s ? this.getStack()?.prevLead : void 0;
|
|
}
|
|
getStack() {
|
|
const { layoutId: s } = this.options;
|
|
if (s)
|
|
return this.root.sharedNodes.get(s);
|
|
}
|
|
promote({ needsReset: s, transition: a, preserveFollowOpacity: l } = {}) {
|
|
const u = this.getStack();
|
|
u && u.promote(this, l), s && (this.projectionDelta = void 0, this.needsReset = !0), a && this.setOptions({ transition: a });
|
|
}
|
|
relegate() {
|
|
const s = this.getStack();
|
|
return s ? s.relegate(this) : !1;
|
|
}
|
|
resetSkewAndRotation() {
|
|
const { visualElement: s } = this.options;
|
|
if (!s)
|
|
return;
|
|
let a = !1;
|
|
const { latestValues: l } = s;
|
|
if ((l.z || l.rotate || l.rotateX || l.rotateY || l.rotateZ || l.skewX || l.skewY) && (a = !0), !a)
|
|
return;
|
|
const u = {};
|
|
l.z && Mc("z", s, u, this.animationValues);
|
|
for (let c = 0; c < zc.length; c++)
|
|
Mc(`rotate${zc[c]}`, s, u, this.animationValues), Mc(`skew${zc[c]}`, s, u, this.animationValues);
|
|
s.render();
|
|
for (const c in u)
|
|
s.setStaticValue(c, u[c]), this.animationValues && (this.animationValues[c] = u[c]);
|
|
s.scheduleRender();
|
|
}
|
|
applyProjectionStyles(s, a) {
|
|
if (!this.instance || this.isSVG)
|
|
return;
|
|
if (!this.isVisible) {
|
|
s.visibility = "hidden";
|
|
return;
|
|
}
|
|
const l = this.getTransformTemplate();
|
|
if (this.needsReset) {
|
|
this.needsReset = !1, s.visibility = "", s.opacity = "", s.pointerEvents = Wa(a?.pointerEvents) || "", s.transform = l ? l(this.latestValues, "") : "none";
|
|
return;
|
|
}
|
|
const u = this.getLead();
|
|
if (!this.projectionDelta || !this.layout || !u.target) {
|
|
this.options.layoutId && (s.opacity = this.latestValues.opacity !== void 0 ? this.latestValues.opacity : 1, s.pointerEvents = Wa(a?.pointerEvents) || ""), this.hasProjected && !hr(this.latestValues) && (s.transform = l ? l({}, "") : "none", this.hasProjected = !1);
|
|
return;
|
|
}
|
|
s.visibility = "";
|
|
const c = u.animationValues || u.latestValues;
|
|
this.applyTransformsToTarget();
|
|
let d = M3(this.projectionDeltaWithTransform, this.treeScale, c);
|
|
l && (d = l(c, d)), s.transform = d;
|
|
const { x: f, y } = this.projectionDelta;
|
|
s.transformOrigin = `${f.origin * 100}% ${y.origin * 100}% 0`, u.animationValues ? s.opacity = u === this ? c.opacity ?? this.latestValues.opacity ?? 1 : this.preserveOpacity ? this.latestValues.opacity : c.opacityExit : s.opacity = u === this ? c.opacity !== void 0 ? c.opacity : "" : c.opacityExit !== void 0 ? c.opacityExit : 0;
|
|
for (const v in mf) {
|
|
if (c[v] === void 0)
|
|
continue;
|
|
const { correct: S, applyTo: k, isCSSVariable: p } = mf[v], h = d === "none" ? c[v] : S(c[v], u);
|
|
if (k) {
|
|
const g = k.length;
|
|
for (let w = 0; w < g; w++)
|
|
s[k[w]] = h;
|
|
} else
|
|
p ? this.options.visualElement.renderState.vars[v] = h : s[v] = h;
|
|
}
|
|
this.options.layoutId && (s.pointerEvents = u === this ? Wa(a?.pointerEvents) || "" : "none");
|
|
}
|
|
clearSnapshot() {
|
|
this.resumeFrom = this.snapshot = void 0;
|
|
}
|
|
// Only run on root
|
|
resetTree() {
|
|
this.root.nodes.forEach((s) => s.currentAnimation?.stop()), this.root.nodes.forEach(gy), this.root.sharedNodes.clear();
|
|
}
|
|
};
|
|
}
|
|
function H3(e) {
|
|
e.updateLayout();
|
|
}
|
|
function K3(e) {
|
|
const t = e.resumeFrom?.snapshot || e.snapshot;
|
|
if (e.isLead() && e.layout && t && e.hasListeners("didUpdate")) {
|
|
const { layoutBox: n, measuredBox: r } = e.layout, { animationType: o } = e.options, i = t.source !== e.layout.source;
|
|
if (o === "size")
|
|
Zt((c) => {
|
|
const d = i ? t.measuredBox[c] : t.layoutBox[c], f = qe(d);
|
|
d.min = n[c].min, d.max = d.min + f;
|
|
});
|
|
else if (o === "x" || o === "y") {
|
|
const c = o === "x" ? "y" : "x";
|
|
gf(i ? t.measuredBox[c] : t.layoutBox[c], n[c]);
|
|
} else yb(o, t.layoutBox, n) && Zt((c) => {
|
|
const d = i ? t.measuredBox[c] : t.layoutBox[c], f = qe(n[c]);
|
|
d.max = d.min + f, e.relativeTarget && !e.currentAnimation && (e.isProjectionDirty = !0, e.relativeTarget[c].max = e.relativeTarget[c].min + f);
|
|
});
|
|
const s = fo();
|
|
Li(s, n, t.layoutBox);
|
|
const a = fo();
|
|
i ? Li(a, e.applyTransform(r, !0), t.measuredBox) : Li(a, n, t.layoutBox);
|
|
const l = !db(s);
|
|
let u = !1;
|
|
if (!e.resumeFrom) {
|
|
const c = e.getClosestProjectingParent();
|
|
if (c && !c.resumeFrom) {
|
|
const { snapshot: d, layout: f } = c;
|
|
if (d && f) {
|
|
const y = e.options.layoutAnchor || void 0, v = Ee();
|
|
Rl(v, t.layoutBox, d.layoutBox, y);
|
|
const S = Ee();
|
|
Rl(S, n, f.layoutBox, y), fb(v, S) || (u = !0), c.options.layoutRoot && (e.relativeTarget = S, e.relativeTargetOrigin = v, e.relativeParent = c);
|
|
}
|
|
}
|
|
}
|
|
e.notifyListeners("didUpdate", {
|
|
layout: n,
|
|
snapshot: t,
|
|
delta: a,
|
|
layoutDelta: s,
|
|
hasLayoutChanged: l,
|
|
hasRelativeLayoutChanged: u
|
|
});
|
|
} else if (e.isLead()) {
|
|
const { onExitComplete: n } = e.options;
|
|
n && n();
|
|
}
|
|
e.options.transition = void 0;
|
|
}
|
|
function G3(e) {
|
|
e.parent && (e.isProjecting() || (e.isProjectionDirty = e.parent.isProjectionDirty), e.isSharedProjectionDirty || (e.isSharedProjectionDirty = !!(e.isProjectionDirty || e.parent.isProjectionDirty || e.parent.isSharedProjectionDirty)), e.isTransformDirty || (e.isTransformDirty = e.parent.isTransformDirty));
|
|
}
|
|
function X3(e) {
|
|
e.isProjectionDirty = e.isSharedProjectionDirty = e.isTransformDirty = !1;
|
|
}
|
|
function Y3(e) {
|
|
e.clearSnapshot();
|
|
}
|
|
function gy(e) {
|
|
e.clearMeasurements();
|
|
}
|
|
function Q3(e) {
|
|
e.isLayoutDirty = !0, e.updateLayout();
|
|
}
|
|
function yy(e) {
|
|
e.isLayoutDirty = !1;
|
|
}
|
|
function q3(e) {
|
|
e.isAnimationBlocked && e.layout && !e.isLayoutDirty && (e.snapshot = e.layout, e.isLayoutDirty = !0);
|
|
}
|
|
function Z3(e) {
|
|
const { visualElement: t } = e.options;
|
|
t && t.getProps().onBeforeLayoutMeasure && t.notify("BeforeLayoutMeasure"), e.resetTransform();
|
|
}
|
|
function vy(e) {
|
|
e.finishAnimation(), e.targetDelta = e.relativeTarget = e.target = void 0, e.isProjectionDirty = !0;
|
|
}
|
|
function J3(e) {
|
|
e.resolveTargetDelta();
|
|
}
|
|
function e4(e) {
|
|
e.calcProjection();
|
|
}
|
|
function t4(e) {
|
|
e.resetSkewAndRotation();
|
|
}
|
|
function n4(e) {
|
|
e.removeLeadSnapshot();
|
|
}
|
|
function Sy(e, t, n) {
|
|
e.translate = oe(t.translate, 0, n), e.scale = oe(t.scale, 1, n), e.origin = t.origin, e.originPoint = t.originPoint;
|
|
}
|
|
function by(e, t, n, r) {
|
|
e.min = oe(t.min, n.min, r), e.max = oe(t.max, n.max, r);
|
|
}
|
|
function r4(e, t, n, r) {
|
|
by(e.x, t.x, n.x, r), by(e.y, t.y, n.y, r);
|
|
}
|
|
function o4(e) {
|
|
return e.animationValues && e.animationValues.opacityExit !== void 0;
|
|
}
|
|
const i4 = {
|
|
duration: 0.45,
|
|
ease: [0.4, 0, 0.1, 1]
|
|
}, xy = (e) => typeof navigator < "u" && navigator.userAgent && navigator.userAgent.toLowerCase().includes(e), wy = xy("applewebkit/") && !xy("chrome/") ? Math.round : $t;
|
|
function ky(e) {
|
|
e.min = wy(e.min), e.max = wy(e.max);
|
|
}
|
|
function s4(e) {
|
|
ky(e.x), ky(e.y);
|
|
}
|
|
function yb(e, t, n) {
|
|
return e === "position" || e === "preserve-aspect" && !E3(dy(t), dy(n), 0.2);
|
|
}
|
|
function a4(e) {
|
|
return e !== e.root && e.scroll?.wasRoot;
|
|
}
|
|
const l4 = gb({
|
|
attachResizeListener: (e, t) => ds(e, "resize", t),
|
|
measureScroll: () => ({
|
|
x: document.documentElement.scrollLeft || document.body?.scrollLeft || 0,
|
|
y: document.documentElement.scrollTop || document.body?.scrollTop || 0
|
|
}),
|
|
checkIsScrollRoot: () => !0
|
|
}), Dc = {
|
|
current: void 0
|
|
}, vb = gb({
|
|
measureScroll: (e) => ({
|
|
x: e.scrollLeft,
|
|
y: e.scrollTop
|
|
}),
|
|
defaultParent: () => {
|
|
if (!Dc.current) {
|
|
const e = new l4({});
|
|
e.mount(window), e.setOptions({ layoutScroll: !0 }), Dc.current = e;
|
|
}
|
|
return Dc.current;
|
|
},
|
|
resetTransform: (e, t) => {
|
|
e.style.transform = t !== void 0 ? t : "none";
|
|
},
|
|
checkIsScrollRoot: (e) => window.getComputedStyle(e).position === "fixed"
|
|
}), ap = C.createContext({
|
|
transformPagePoint: (e) => e,
|
|
isStatic: !1,
|
|
reducedMotion: "never"
|
|
});
|
|
function Cy(e, t) {
|
|
if (typeof e == "function")
|
|
return e(t);
|
|
e != null && (e.current = t);
|
|
}
|
|
function u4(...e) {
|
|
return (t) => {
|
|
let n = !1;
|
|
const r = e.map((o) => {
|
|
const i = Cy(o, t);
|
|
return !n && typeof i == "function" && (n = !0), i;
|
|
});
|
|
if (n)
|
|
return () => {
|
|
for (let o = 0; o < r.length; o++) {
|
|
const i = r[o];
|
|
typeof i == "function" ? i() : Cy(e[o], null);
|
|
}
|
|
};
|
|
};
|
|
}
|
|
function c4(...e) {
|
|
return C.useCallback(u4(...e), e);
|
|
}
|
|
class d4 extends C.Component {
|
|
getSnapshotBeforeUpdate(t) {
|
|
const n = this.props.childRef.current;
|
|
if (Va(n) && t.isPresent && !this.props.isPresent && this.props.pop !== !1) {
|
|
const r = n.offsetParent, o = Va(r) && r.offsetWidth || 0, i = Va(r) && r.offsetHeight || 0, s = getComputedStyle(n), a = this.props.sizeRef.current;
|
|
a.height = parseFloat(s.height), a.width = parseFloat(s.width), a.top = n.offsetTop, a.left = n.offsetLeft, a.right = o - a.width - a.left, a.bottom = i - a.height - a.top, a.direction = s.direction;
|
|
}
|
|
return null;
|
|
}
|
|
/**
|
|
* Required with getSnapshotBeforeUpdate to stop React complaining.
|
|
*/
|
|
componentDidUpdate() {
|
|
}
|
|
render() {
|
|
return this.props.children;
|
|
}
|
|
}
|
|
function f4({ children: e, isPresent: t, anchorX: n, anchorY: r, root: o, pop: i }) {
|
|
const s = C.useId(), a = C.useRef(null), l = C.useRef({
|
|
width: 0,
|
|
height: 0,
|
|
top: 0,
|
|
left: 0,
|
|
right: 0,
|
|
bottom: 0,
|
|
direction: "ltr"
|
|
}), { nonce: u } = C.useContext(ap), c = e.props?.ref ?? e?.ref, d = c4(a, c);
|
|
return C.useInsertionEffect(() => {
|
|
const { width: f, height: y, top: v, left: S, right: k, bottom: p, direction: h } = l.current;
|
|
if (t || i === !1 || !a.current || !f || !y)
|
|
return;
|
|
const g = h === "rtl", w = n === "left" ? g ? `right: ${k}` : `left: ${S}` : g ? `left: ${S}` : `right: ${k}`, E = r === "bottom" ? `bottom: ${p}` : `top: ${v}`;
|
|
a.current.dataset.motionPopId = s;
|
|
const _ = document.createElement("style");
|
|
u && (_.nonce = u);
|
|
const P = o ?? document.head;
|
|
return P.appendChild(_), _.sheet && _.sheet.insertRule(`
|
|
[data-motion-pop-id="${s}"] {
|
|
position: absolute !important;
|
|
width: ${f}px !important;
|
|
height: ${y}px !important;
|
|
${w}px !important;
|
|
${E}px !important;
|
|
}
|
|
`), () => {
|
|
a.current?.removeAttribute("data-motion-pop-id"), P.contains(_) && P.removeChild(_);
|
|
};
|
|
}, [t]), M.jsx(d4, { isPresent: t, childRef: a, sizeRef: l, pop: i, children: i === !1 ? e : C.cloneElement(e, { ref: d }) });
|
|
}
|
|
const h4 = ({ children: e, initial: t, isPresent: n, onExitComplete: r, custom: o, presenceAffectsLayout: i, mode: s, anchorX: a, anchorY: l, root: u }) => {
|
|
const c = Bh(p4), d = C.useId();
|
|
let f = !0, y = C.useMemo(() => (f = !1, {
|
|
id: d,
|
|
initial: t,
|
|
isPresent: n,
|
|
custom: o,
|
|
onExitComplete: (v) => {
|
|
c.set(v, !0);
|
|
for (const S of c.values())
|
|
if (!S)
|
|
return;
|
|
r && r();
|
|
},
|
|
register: (v) => (c.set(v, !1), () => c.delete(v))
|
|
}), [n, c, r]);
|
|
return i && f && (y = { ...y }), C.useMemo(() => {
|
|
c.forEach((v, S) => c.set(S, !1));
|
|
}, [n]), C.useEffect(() => {
|
|
!n && !c.size && r && r();
|
|
}, [n]), e = M.jsx(f4, { pop: s === "popLayout", isPresent: n, anchorX: a, anchorY: l, root: u, children: e }), M.jsx(Ss.Provider, { value: y, children: e });
|
|
};
|
|
function p4() {
|
|
return /* @__PURE__ */ new Map();
|
|
}
|
|
function Sb(e = !0) {
|
|
const t = C.useContext(Ss);
|
|
if (t === null)
|
|
return [!0, null];
|
|
const { isPresent: n, onExitComplete: r, register: o } = t, i = C.useId();
|
|
C.useEffect(() => {
|
|
if (e)
|
|
return o(i);
|
|
}, [e]);
|
|
const s = C.useCallback(() => e && r && r(i), [i, r, e]);
|
|
return !n && r ? [!1, s] : [!0];
|
|
}
|
|
function m4() {
|
|
return g4(C.useContext(Ss));
|
|
}
|
|
function g4(e) {
|
|
return e === null ? !0 : e.isPresent;
|
|
}
|
|
const ua = (e) => e.key || "";
|
|
function Ty(e) {
|
|
const t = [];
|
|
return C.Children.forEach(e, (n) => {
|
|
C.isValidElement(n) && t.push(n);
|
|
}), t;
|
|
}
|
|
const y4 = ({ children: e, custom: t, initial: n = !0, onExitComplete: r, presenceAffectsLayout: o = !0, mode: i = "sync", propagate: s = !1, anchorX: a = "left", anchorY: l = "top", root: u }) => {
|
|
const [c, d] = Sb(s), f = C.useMemo(() => Ty(e), [e]), y = s && !c ? [] : f.map(ua), v = C.useRef(!0), S = C.useRef(f), k = Bh(() => /* @__PURE__ */ new Map()), p = C.useRef(/* @__PURE__ */ new Set()), [h, g] = C.useState(f), [w, E] = C.useState(f);
|
|
G1(() => {
|
|
v.current = !1, S.current = f;
|
|
for (let $ = 0; $ < w.length; $++) {
|
|
const V = ua(w[$]);
|
|
y.includes(V) ? (k.delete(V), p.current.delete(V)) : k.get(V) !== !0 && k.set(V, !1);
|
|
}
|
|
}, [w, y.length, y.join("-")]);
|
|
const _ = [];
|
|
if (f !== h) {
|
|
let $ = [...f];
|
|
for (let V = 0; V < w.length; V++) {
|
|
const A = w[V], N = ua(A);
|
|
y.includes(N) || ($.splice(V, 0, A), _.push(A));
|
|
}
|
|
return i === "wait" && _.length && ($ = _), E(Ty($)), g(f), null;
|
|
}
|
|
const { forceRender: P } = C.useContext(Vh);
|
|
return M.jsx(M.Fragment, { children: w.map(($) => {
|
|
const V = ua($), A = s && !c ? !1 : f === w || y.includes(V), N = () => {
|
|
if (p.current.has(V))
|
|
return;
|
|
if (k.has(V))
|
|
p.current.add(V), k.set(V, !0);
|
|
else
|
|
return;
|
|
let le = !0;
|
|
k.forEach((De) => {
|
|
De || (le = !1);
|
|
}), le && (P?.(), E(S.current), s && d?.(), r && r());
|
|
};
|
|
return M.jsx(h4, { isPresent: A, initial: !v.current || n ? void 0 : !1, custom: t, presenceAffectsLayout: o, mode: i, root: u, onExitComplete: A ? void 0 : N, anchorX: a, anchorY: l, children: $ }, V);
|
|
}) });
|
|
}, bb = C.createContext({ strict: !1 }), Py = {
|
|
animation: [
|
|
"animate",
|
|
"variants",
|
|
"whileHover",
|
|
"whileTap",
|
|
"exit",
|
|
"whileInView",
|
|
"whileFocus",
|
|
"whileDrag"
|
|
],
|
|
exit: ["exit"],
|
|
drag: ["drag", "dragControls"],
|
|
focus: ["whileFocus"],
|
|
hover: ["whileHover", "onHoverStart", "onHoverEnd"],
|
|
tap: ["whileTap", "onTap", "onTapStart", "onTapCancel"],
|
|
pan: ["onPan", "onPanStart", "onPanSessionStart", "onPanEnd"],
|
|
inView: ["whileInView", "onViewportEnter", "onViewportLeave"],
|
|
layout: ["layout", "layoutId"]
|
|
};
|
|
let Ey = !1;
|
|
function v4() {
|
|
if (Ey)
|
|
return;
|
|
const e = {};
|
|
for (const t in Py)
|
|
e[t] = {
|
|
isEnabled: (n) => Py[t].some((r) => !!n[r])
|
|
};
|
|
YS(e), Ey = !0;
|
|
}
|
|
function xb() {
|
|
return v4(), JM();
|
|
}
|
|
function S4(e) {
|
|
const t = xb();
|
|
for (const n in e)
|
|
t[n] = {
|
|
...t[n],
|
|
...e[n]
|
|
};
|
|
YS(t);
|
|
}
|
|
const b4 = /* @__PURE__ */ new Set([
|
|
"animate",
|
|
"exit",
|
|
"variants",
|
|
"initial",
|
|
"style",
|
|
"values",
|
|
"variants",
|
|
"transition",
|
|
"transformTemplate",
|
|
"custom",
|
|
"inherit",
|
|
"onBeforeLayoutMeasure",
|
|
"onAnimationStart",
|
|
"onAnimationComplete",
|
|
"onUpdate",
|
|
"onDragStart",
|
|
"onDrag",
|
|
"onDragEnd",
|
|
"onMeasureDragConstraints",
|
|
"onDirectionLock",
|
|
"onDragTransitionEnd",
|
|
"_dragX",
|
|
"_dragY",
|
|
"onHoverStart",
|
|
"onHoverEnd",
|
|
"onViewportEnter",
|
|
"onViewportLeave",
|
|
"globalTapTarget",
|
|
"propagate",
|
|
"ignoreStrict",
|
|
"viewport"
|
|
]);
|
|
function zl(e) {
|
|
return e.startsWith("while") || e.startsWith("drag") && e !== "draggable" || e.startsWith("layout") || e.startsWith("onTap") || e.startsWith("onPan") || e.startsWith("onLayout") || b4.has(e);
|
|
}
|
|
let wb = (e) => !zl(e);
|
|
function x4(e) {
|
|
typeof e == "function" && (wb = (t) => t.startsWith("on") ? !zl(t) : e(t));
|
|
}
|
|
try {
|
|
x4(require("@emotion/is-prop-valid").default);
|
|
} catch {
|
|
}
|
|
function w4(e, t, n) {
|
|
const r = {};
|
|
for (const o in e)
|
|
o === "values" && typeof e.values == "object" || Be(e[o]) || (wb(o) || n === !0 && zl(o) || !t && !zl(o) || // If trying to use native HTML drag events, forward drag listeners
|
|
e.draggable && o.startsWith("onDrag")) && (r[o] = e[o]);
|
|
return r;
|
|
}
|
|
const Su = /* @__PURE__ */ C.createContext({});
|
|
function k4(e, t) {
|
|
if (vu(e)) {
|
|
const { initial: n, animate: r } = e;
|
|
return {
|
|
initial: n === !1 || cs(n) ? n : void 0,
|
|
animate: cs(r) ? r : void 0
|
|
};
|
|
}
|
|
return e.inherit !== !1 ? t : {};
|
|
}
|
|
function C4(e) {
|
|
const { initial: t, animate: n } = k4(e, C.useContext(Su));
|
|
return C.useMemo(() => ({ initial: t, animate: n }), [_y(t), _y(n)]);
|
|
}
|
|
function _y(e) {
|
|
return Array.isArray(e) ? e.join(" ") : e;
|
|
}
|
|
const lp = () => ({
|
|
style: {},
|
|
transform: {},
|
|
transformOrigin: {},
|
|
vars: {}
|
|
});
|
|
function kb(e, t, n) {
|
|
for (const r in t)
|
|
!Be(t[r]) && !nb(r, n) && (e[r] = t[r]);
|
|
}
|
|
function T4({ transformTemplate: e }, t) {
|
|
return C.useMemo(() => {
|
|
const n = lp();
|
|
return ip(n, t, e), Object.assign({}, n.vars, n.style);
|
|
}, [t]);
|
|
}
|
|
function P4(e, t) {
|
|
const n = e.style || {}, r = {};
|
|
return kb(r, n, e), Object.assign(r, T4(e, t)), r;
|
|
}
|
|
function E4(e, t) {
|
|
const n = {}, r = P4(e, t);
|
|
return e.drag && e.dragListener !== !1 && (n.draggable = !1, r.userSelect = r.WebkitUserSelect = r.WebkitTouchCallout = "none", r.touchAction = e.drag === !0 ? "none" : `pan-${e.drag === "x" ? "y" : "x"}`), e.tabIndex === void 0 && (e.onTap || e.onTapStart || e.whileTap) && (n.tabIndex = 0), n.style = r, n;
|
|
}
|
|
const Cb = () => ({
|
|
...lp(),
|
|
attrs: {}
|
|
});
|
|
function _4(e, t, n, r) {
|
|
const o = C.useMemo(() => {
|
|
const i = Cb();
|
|
return rb(i, t, ib(r), e.transformTemplate, e.style), {
|
|
...i.attrs,
|
|
style: { ...i.style }
|
|
};
|
|
}, [t]);
|
|
if (e.style) {
|
|
const i = {};
|
|
kb(i, e.style, e), o.style = { ...i, ...o.style };
|
|
}
|
|
return o;
|
|
}
|
|
const $4 = [
|
|
"animate",
|
|
"circle",
|
|
"defs",
|
|
"desc",
|
|
"ellipse",
|
|
"g",
|
|
"image",
|
|
"line",
|
|
"filter",
|
|
"marker",
|
|
"mask",
|
|
"metadata",
|
|
"path",
|
|
"pattern",
|
|
"polygon",
|
|
"polyline",
|
|
"rect",
|
|
"stop",
|
|
"switch",
|
|
"symbol",
|
|
"svg",
|
|
"text",
|
|
"tspan",
|
|
"use",
|
|
"view"
|
|
];
|
|
function up(e) {
|
|
return (
|
|
/**
|
|
* If it's not a string, it's a custom React component. Currently we only support
|
|
* HTML custom React components.
|
|
*/
|
|
typeof e != "string" || /**
|
|
* If it contains a dash, the element is a custom HTML webcomponent.
|
|
*/
|
|
e.includes("-") ? !1 : (
|
|
/**
|
|
* If it's in our list of lowercase SVG tags, it's an SVG component
|
|
*/
|
|
!!($4.indexOf(e) > -1 || /**
|
|
* If it contains a capital letter, it's an SVG component
|
|
*/
|
|
/[A-Z]/u.test(e))
|
|
)
|
|
);
|
|
}
|
|
function A4(e, t, n, { latestValues: r }, o, i = !1, s) {
|
|
const l = (s ?? up(e) ? _4 : E4)(t, r, o, e), u = w4(t, typeof e == "string", i), c = e !== C.Fragment ? { ...u, ...l, ref: n } : {}, { children: d } = t, f = C.useMemo(() => Be(d) ? d.get() : d, [d]);
|
|
return C.createElement(e, {
|
|
...c,
|
|
children: f
|
|
});
|
|
}
|
|
function R4({ scrapeMotionValuesFromProps: e, createRenderState: t }, n, r, o) {
|
|
return {
|
|
latestValues: z4(n, r, o, e),
|
|
renderState: t()
|
|
};
|
|
}
|
|
function z4(e, t, n, r) {
|
|
const o = {}, i = r(e, {});
|
|
for (const f in i)
|
|
o[f] = Wa(i[f]);
|
|
let { initial: s, animate: a } = e;
|
|
const l = vu(e), u = GS(e);
|
|
t && u && !l && e.inherit !== !1 && (s === void 0 && (s = t.initial), a === void 0 && (a = t.animate));
|
|
let c = n ? n.initial === !1 : !1;
|
|
c = c || s === !1;
|
|
const d = c ? a : s;
|
|
if (d && typeof d != "boolean" && !yu(d)) {
|
|
const f = Array.isArray(d) ? d : [d];
|
|
for (let y = 0; y < f.length; y++) {
|
|
const v = Zh(e, f[y]);
|
|
if (v) {
|
|
const { transitionEnd: S, transition: k, ...p } = v;
|
|
for (const h in p) {
|
|
let g = p[h];
|
|
if (Array.isArray(g)) {
|
|
const w = c ? g.length - 1 : 0;
|
|
g = g[w];
|
|
}
|
|
g !== null && (o[h] = g);
|
|
}
|
|
for (const h in S)
|
|
o[h] = S[h];
|
|
}
|
|
}
|
|
}
|
|
return o;
|
|
}
|
|
const Tb = (e) => (t, n) => {
|
|
const r = C.useContext(Su), o = C.useContext(Ss), i = () => R4(e, t, r, o);
|
|
return n ? i() : Bh(i);
|
|
}, M4 = /* @__PURE__ */ Tb({
|
|
scrapeMotionValuesFromProps: sp,
|
|
createRenderState: lp
|
|
}), D4 = /* @__PURE__ */ Tb({
|
|
scrapeMotionValuesFromProps: sb,
|
|
createRenderState: Cb
|
|
}), I4 = Symbol.for("motionComponentSymbol");
|
|
function L4(e, t, n) {
|
|
const r = C.useRef(n);
|
|
C.useInsertionEffect(() => {
|
|
r.current = n;
|
|
});
|
|
const o = C.useRef(null);
|
|
return C.useCallback((i) => {
|
|
i && e.onMount?.(i), t && (i ? t.mount(i) : t.unmount());
|
|
const s = r.current;
|
|
if (typeof s == "function")
|
|
if (i) {
|
|
const a = s(i);
|
|
typeof a == "function" && (o.current = a);
|
|
} else o.current ? (o.current(), o.current = null) : s(i);
|
|
else s && (s.current = i);
|
|
}, [t]);
|
|
}
|
|
const Pb = C.createContext({});
|
|
function Ur(e) {
|
|
return e && typeof e == "object" && Object.prototype.hasOwnProperty.call(e, "current");
|
|
}
|
|
function V4(e, t, n, r, o, i) {
|
|
const { visualElement: s } = C.useContext(Su), a = C.useContext(bb), l = C.useContext(Ss), u = C.useContext(ap), c = u.reducedMotion, d = u.skipAnimations, f = C.useRef(null), y = C.useRef(!1);
|
|
r = r || a.renderer, !f.current && r && (f.current = r(e, {
|
|
visualState: t,
|
|
parent: s,
|
|
props: n,
|
|
presenceContext: l,
|
|
blockInitialAnimation: l ? l.initial === !1 : !1,
|
|
reducedMotionConfig: c,
|
|
skipAnimations: d,
|
|
isSVG: i
|
|
}), y.current && f.current && (f.current.manuallyAnimateOnMount = !0));
|
|
const v = f.current, S = C.useContext(Pb);
|
|
v && !v.projection && o && (v.type === "html" || v.type === "svg") && B4(f.current, n, o, S);
|
|
const k = C.useRef(!1);
|
|
C.useInsertionEffect(() => {
|
|
v && k.current && v.update(n, l);
|
|
});
|
|
const p = n[IS], h = C.useRef(!!p && typeof window < "u" && !window.MotionHandoffIsComplete?.(p) && window.MotionHasOptimisedAnimation?.(p));
|
|
return G1(() => {
|
|
y.current = !0, v && (k.current = !0, window.MotionIsMounted = !0, v.updateFeatures(), v.scheduleRenderMicrotask(), h.current && v.animationState && v.animationState.animateChanges());
|
|
}), C.useEffect(() => {
|
|
v && (!h.current && v.animationState && v.animationState.animateChanges(), h.current && (queueMicrotask(() => {
|
|
window.MotionHandoffMarkAsComplete?.(p);
|
|
}), h.current = !1), v.enteringChildren = void 0);
|
|
}), v;
|
|
}
|
|
function B4(e, t, n, r) {
|
|
const { layoutId: o, layout: i, drag: s, dragConstraints: a, layoutScroll: l, layoutRoot: u, layoutAnchor: c, layoutCrossfade: d } = t;
|
|
e.projection = new n(e.latestValues, t["data-framer-portal-id"] ? void 0 : Eb(e.parent)), e.projection.setOptions({
|
|
layoutId: o,
|
|
layout: i,
|
|
alwaysMeasureLayout: !!s || a && Ur(a),
|
|
visualElement: e,
|
|
/**
|
|
* TODO: Update options in an effect. This could be tricky as it'll be too late
|
|
* to update by the time layout animations run.
|
|
* We also need to fix this safeToRemove by linking it up to the one returned by usePresence,
|
|
* ensuring it gets called if there's no potential layout animations.
|
|
*
|
|
*/
|
|
animationType: typeof i == "string" ? i : "both",
|
|
initialPromotionConfig: r,
|
|
crossfade: d,
|
|
layoutScroll: l,
|
|
layoutRoot: u,
|
|
layoutAnchor: c
|
|
});
|
|
}
|
|
function Eb(e) {
|
|
if (e)
|
|
return e.options.allowProjection !== !1 ? e.projection : Eb(e.parent);
|
|
}
|
|
function Ic(e, { forwardMotionProps: t = !1, type: n } = {}, r, o) {
|
|
r && S4(r);
|
|
const i = n ? n === "svg" : up(e), s = i ? D4 : M4;
|
|
function a(u, c) {
|
|
let d;
|
|
const f = {
|
|
...C.useContext(ap),
|
|
...u,
|
|
layoutId: F4(u)
|
|
}, { isStatic: y } = f, v = C4(u), S = s(u, y);
|
|
if (!y && typeof window < "u") {
|
|
j4();
|
|
const k = O4(f);
|
|
d = k.MeasureLayout, v.visualElement = V4(e, S, f, o, k.ProjectionNode, i);
|
|
}
|
|
return M.jsxs(Su.Provider, { value: v, children: [d && v.visualElement ? M.jsx(d, { visualElement: v.visualElement, ...f }) : null, A4(e, u, L4(S, v.visualElement, c), S, y, t, i)] });
|
|
}
|
|
a.displayName = `motion.${typeof e == "string" ? e : `create(${e.displayName ?? e.name ?? ""})`}`;
|
|
const l = C.forwardRef(a);
|
|
return l[I4] = e, l;
|
|
}
|
|
function F4({ layoutId: e }) {
|
|
const t = C.useContext(Vh).id;
|
|
return t && e !== void 0 ? t + "-" + e : e;
|
|
}
|
|
function j4(e, t) {
|
|
C.useContext(bb).strict;
|
|
}
|
|
function O4(e) {
|
|
const t = xb(), { drag: n, layout: r } = t;
|
|
if (!n && !r)
|
|
return {};
|
|
const o = { ...n, ...r };
|
|
return {
|
|
MeasureLayout: n?.isEnabled(e) || r?.isEnabled(e) ? o.MeasureLayout : void 0,
|
|
ProjectionNode: o.ProjectionNode
|
|
};
|
|
}
|
|
function N4(e, t) {
|
|
if (typeof Proxy > "u")
|
|
return Ic;
|
|
const n = /* @__PURE__ */ new Map(), r = (i, s) => Ic(i, s, e, t), o = (i, s) => r(i, s);
|
|
return new Proxy(o, {
|
|
/**
|
|
* Called when `motion` is referenced with a prop: `motion.div`, `motion.input` etc.
|
|
* The prop name is passed through as `key` and we can use that to generate a `motion`
|
|
* DOM component with that name.
|
|
*/
|
|
get: (i, s) => s === "create" ? r : (n.has(s) || n.set(s, Ic(s, void 0, e, t)), n.get(s))
|
|
});
|
|
}
|
|
const W4 = (e, t) => t.isSVG ?? up(e) ? new g3(t) : new c3(t, {
|
|
allowProjection: e !== C.Fragment
|
|
});
|
|
class U4 extends ir {
|
|
/**
|
|
* We dynamically generate the AnimationState manager as it contains a reference
|
|
* to the underlying animation library. We only want to load that if we load this,
|
|
* so people can optionally code split it out using the `m` component.
|
|
*/
|
|
constructor(t) {
|
|
super(t), t.animationState || (t.animationState = x3(t));
|
|
}
|
|
updateAnimationControlsSubscription() {
|
|
const { animate: t } = this.node.getProps();
|
|
yu(t) && (this.unmountControls = t.subscribe(this.node));
|
|
}
|
|
/**
|
|
* Subscribe any provided AnimationControls to the component's VisualElement
|
|
*/
|
|
mount() {
|
|
this.updateAnimationControlsSubscription();
|
|
}
|
|
update() {
|
|
const { animate: t } = this.node.getProps(), { animate: n } = this.node.prevProps || {};
|
|
t !== n && this.updateAnimationControlsSubscription();
|
|
}
|
|
unmount() {
|
|
this.node.animationState.reset(), this.unmountControls?.();
|
|
}
|
|
}
|
|
let H4 = 0;
|
|
class K4 extends ir {
|
|
constructor() {
|
|
super(...arguments), this.id = H4++, this.isExitComplete = !1;
|
|
}
|
|
update() {
|
|
if (!this.node.presenceContext)
|
|
return;
|
|
const { isPresent: t, onExitComplete: n } = this.node.presenceContext, { isPresent: r } = this.node.prevPresenceContext || {};
|
|
if (!this.node.animationState || t === r)
|
|
return;
|
|
if (t && r === !1) {
|
|
if (this.isExitComplete) {
|
|
const { initial: i, custom: s } = this.node.getProps();
|
|
if (typeof i == "string" || typeof i == "object" && i !== null && !Array.isArray(i)) {
|
|
const a = Er(this.node, i, s);
|
|
if (a) {
|
|
const { transition: l, transitionEnd: u, ...c } = a;
|
|
for (const d in c)
|
|
this.node.getValue(d)?.jump(c[d]);
|
|
}
|
|
}
|
|
this.node.animationState.reset(), this.node.animationState.animateChanges();
|
|
} else
|
|
this.node.animationState.setActive("exit", !1);
|
|
this.isExitComplete = !1;
|
|
return;
|
|
}
|
|
const o = this.node.animationState.setActive("exit", !t);
|
|
n && !t && o.then(() => {
|
|
this.isExitComplete = !0, n(this.id);
|
|
});
|
|
}
|
|
mount() {
|
|
const { register: t, onExitComplete: n } = this.node.presenceContext || {};
|
|
n && n(this.id), t && (this.unmount = t(this.id));
|
|
}
|
|
unmount() {
|
|
}
|
|
}
|
|
const G4 = {
|
|
animation: {
|
|
Feature: U4
|
|
},
|
|
exit: {
|
|
Feature: K4
|
|
}
|
|
};
|
|
function Cs(e) {
|
|
return {
|
|
point: {
|
|
x: e.pageX,
|
|
y: e.pageY
|
|
}
|
|
};
|
|
}
|
|
const X4 = (e) => (t) => tp(t) && e(t, Cs(t));
|
|
function Vi(e, t, n, r) {
|
|
return ds(e, t, X4(n), r);
|
|
}
|
|
const _b = ({ current: e }) => e ? e.ownerDocument.defaultView : null, $y = (e, t) => Math.abs(e - t);
|
|
function Y4(e, t) {
|
|
const n = $y(e.x, t.x), r = $y(e.y, t.y);
|
|
return Math.sqrt(n ** 2 + r ** 2);
|
|
}
|
|
const Ay = /* @__PURE__ */ new Set(["auto", "scroll"]);
|
|
class $b {
|
|
constructor(t, n, { transformPagePoint: r, contextWindow: o = window, dragSnapToOrigin: i = !1, distanceThreshold: s = 3, element: a } = {}) {
|
|
if (this.startEvent = null, this.lastMoveEvent = null, this.lastMoveEventInfo = null, this.lastRawMoveEventInfo = null, this.handlers = {}, this.contextWindow = window, this.scrollPositions = /* @__PURE__ */ new Map(), this.removeScrollListeners = null, this.onElementScroll = (y) => {
|
|
this.handleScroll(y.target);
|
|
}, this.onWindowScroll = () => {
|
|
this.handleScroll(window);
|
|
}, this.updatePoint = () => {
|
|
if (!(this.lastMoveEvent && this.lastMoveEventInfo))
|
|
return;
|
|
this.lastRawMoveEventInfo && (this.lastMoveEventInfo = ca(this.lastRawMoveEventInfo, this.transformPagePoint));
|
|
const y = Lc(this.lastMoveEventInfo, this.history), v = this.startEvent !== null, S = Y4(y.offset, { x: 0, y: 0 }) >= this.distanceThreshold;
|
|
if (!v && !S)
|
|
return;
|
|
const { point: k } = y, { timestamp: p } = Le;
|
|
this.history.push({ ...k, timestamp: p });
|
|
const { onStart: h, onMove: g } = this.handlers;
|
|
v || (h && h(this.lastMoveEvent, y), this.startEvent = this.lastMoveEvent), g && g(this.lastMoveEvent, y);
|
|
}, this.handlePointerMove = (y, v) => {
|
|
this.lastMoveEvent = y, this.lastRawMoveEventInfo = v, this.lastMoveEventInfo = ca(v, this.transformPagePoint), ie.update(this.updatePoint, !0);
|
|
}, this.handlePointerUp = (y, v) => {
|
|
this.end();
|
|
const { onEnd: S, onSessionEnd: k, resumeAnimation: p } = this.handlers;
|
|
if ((this.dragSnapToOrigin || !this.startEvent) && p && p(), !(this.lastMoveEvent && this.lastMoveEventInfo))
|
|
return;
|
|
const h = Lc(y.type === "pointercancel" ? this.lastMoveEventInfo : ca(v, this.transformPagePoint), this.history);
|
|
this.startEvent && S && S(y, h), k && k(y, h);
|
|
}, !tp(t))
|
|
return;
|
|
this.dragSnapToOrigin = i, this.handlers = n, this.transformPagePoint = r, this.distanceThreshold = s, this.contextWindow = o || window;
|
|
const l = Cs(t), u = ca(l, this.transformPagePoint), { point: c } = u, { timestamp: d } = Le;
|
|
this.history = [{ ...c, timestamp: d }];
|
|
const { onSessionStart: f } = n;
|
|
f && f(t, Lc(u, this.history)), this.removeListeners = xs(Vi(this.contextWindow, "pointermove", this.handlePointerMove), Vi(this.contextWindow, "pointerup", this.handlePointerUp), Vi(this.contextWindow, "pointercancel", this.handlePointerUp)), a && this.startScrollTracking(a);
|
|
}
|
|
/**
|
|
* Start tracking scroll on ancestors and window.
|
|
*/
|
|
startScrollTracking(t) {
|
|
let n = t.parentElement;
|
|
for (; n; ) {
|
|
const r = getComputedStyle(n);
|
|
(Ay.has(r.overflowX) || Ay.has(r.overflowY)) && this.scrollPositions.set(n, {
|
|
x: n.scrollLeft,
|
|
y: n.scrollTop
|
|
}), n = n.parentElement;
|
|
}
|
|
this.scrollPositions.set(window, {
|
|
x: window.scrollX,
|
|
y: window.scrollY
|
|
}), window.addEventListener("scroll", this.onElementScroll, {
|
|
capture: !0
|
|
}), window.addEventListener("scroll", this.onWindowScroll), this.removeScrollListeners = () => {
|
|
window.removeEventListener("scroll", this.onElementScroll, {
|
|
capture: !0
|
|
}), window.removeEventListener("scroll", this.onWindowScroll);
|
|
};
|
|
}
|
|
/**
|
|
* Handle scroll compensation during drag.
|
|
*
|
|
* For element scroll: adjusts history origin since pageX/pageY doesn't change.
|
|
* For window scroll: adjusts lastMoveEventInfo since pageX/pageY would change.
|
|
*/
|
|
handleScroll(t) {
|
|
const n = this.scrollPositions.get(t);
|
|
if (!n)
|
|
return;
|
|
const r = t === window, o = r ? { x: window.scrollX, y: window.scrollY } : {
|
|
x: t.scrollLeft,
|
|
y: t.scrollTop
|
|
}, i = { x: o.x - n.x, y: o.y - n.y };
|
|
i.x === 0 && i.y === 0 || (r ? this.lastMoveEventInfo && (this.lastMoveEventInfo.point.x += i.x, this.lastMoveEventInfo.point.y += i.y) : this.history.length > 0 && (this.history[0].x -= i.x, this.history[0].y -= i.y), this.scrollPositions.set(t, o), ie.update(this.updatePoint, !0));
|
|
}
|
|
updateHandlers(t) {
|
|
this.handlers = t;
|
|
}
|
|
end() {
|
|
this.removeListeners && this.removeListeners(), this.removeScrollListeners && this.removeScrollListeners(), this.scrollPositions.clear(), tr(this.updatePoint);
|
|
}
|
|
}
|
|
function ca(e, t) {
|
|
return t ? { point: t(e.point) } : e;
|
|
}
|
|
function Ry(e, t) {
|
|
return { x: e.x - t.x, y: e.y - t.y };
|
|
}
|
|
function Lc({ point: e }, t) {
|
|
return {
|
|
point: e,
|
|
delta: Ry(e, Ab(t)),
|
|
offset: Ry(e, Q4(t)),
|
|
velocity: q4(t, 0.1)
|
|
};
|
|
}
|
|
function Q4(e) {
|
|
return e[0];
|
|
}
|
|
function Ab(e) {
|
|
return e[e.length - 1];
|
|
}
|
|
function q4(e, t) {
|
|
if (e.length < 2)
|
|
return { x: 0, y: 0 };
|
|
let n = e.length - 1, r = null;
|
|
const o = Ab(e);
|
|
for (; n >= 0 && (r = e[n], !(o.timestamp - r.timestamp > /* @__PURE__ */ lt(t))); )
|
|
n--;
|
|
if (!r)
|
|
return { x: 0, y: 0 };
|
|
r === e[0] && e.length > 2 && o.timestamp - r.timestamp > /* @__PURE__ */ lt(t) * 2 && (r = e[1]);
|
|
const i = /* @__PURE__ */ Et(o.timestamp - r.timestamp);
|
|
if (i === 0)
|
|
return { x: 0, y: 0 };
|
|
const s = {
|
|
x: (o.x - r.x) / i,
|
|
y: (o.y - r.y) / i
|
|
};
|
|
return s.x === 1 / 0 && (s.x = 0), s.y === 1 / 0 && (s.y = 0), s;
|
|
}
|
|
function Z4(e, { min: t, max: n }, r) {
|
|
return t !== void 0 && e < t ? e = r ? oe(t, e, r.min) : Math.max(e, t) : n !== void 0 && e > n && (e = r ? oe(n, e, r.max) : Math.min(e, n)), e;
|
|
}
|
|
function zy(e, t, n) {
|
|
return {
|
|
min: t !== void 0 ? e.min + t : void 0,
|
|
max: n !== void 0 ? e.max + n - (e.max - e.min) : void 0
|
|
};
|
|
}
|
|
function J4(e, { top: t, left: n, bottom: r, right: o }) {
|
|
return {
|
|
x: zy(e.x, n, o),
|
|
y: zy(e.y, t, r)
|
|
};
|
|
}
|
|
function My(e, t) {
|
|
let n = t.min - e.min, r = t.max - e.max;
|
|
return t.max - t.min < e.max - e.min && ([n, r] = [r, n]), { min: n, max: r };
|
|
}
|
|
function eD(e, t) {
|
|
return {
|
|
x: My(e.x, t.x),
|
|
y: My(e.y, t.y)
|
|
};
|
|
}
|
|
function tD(e, t) {
|
|
let n = 0.5;
|
|
const r = qe(e), o = qe(t);
|
|
return o > r ? n = /* @__PURE__ */ ls(t.min, t.max - r, e.min) : r > o && (n = /* @__PURE__ */ ls(e.min, e.max - o, t.min)), fn(0, 1, n);
|
|
}
|
|
function nD(e, t) {
|
|
const n = {};
|
|
return t.min !== void 0 && (n.min = t.min - e.min), t.max !== void 0 && (n.max = t.max - e.min), n;
|
|
}
|
|
const yf = 0.35;
|
|
function rD(e = yf) {
|
|
return e === !1 ? e = 0 : e === !0 && (e = yf), {
|
|
x: Dy(e, "left", "right"),
|
|
y: Dy(e, "top", "bottom")
|
|
};
|
|
}
|
|
function Dy(e, t, n) {
|
|
return {
|
|
min: Iy(e, t),
|
|
max: Iy(e, n)
|
|
};
|
|
}
|
|
function Iy(e, t) {
|
|
return typeof e == "number" ? e : e[t] || 0;
|
|
}
|
|
const oD = /* @__PURE__ */ new WeakMap();
|
|
class iD {
|
|
constructor(t) {
|
|
this.openDragLock = null, this.isDragging = !1, this.currentDirection = null, this.originPoint = { x: 0, y: 0 }, this.constraints = !1, this.hasMutatedConstraints = !1, this.elastic = Ee(), this.latestPointerEvent = null, this.latestPanInfo = null, this.visualElement = t;
|
|
}
|
|
start(t, { snapToCursor: n = !1, distanceThreshold: r } = {}) {
|
|
const { presenceContext: o } = this.visualElement;
|
|
if (o && o.isPresent === !1)
|
|
return;
|
|
const i = (d) => {
|
|
n && this.snapToCursor(Cs(d).point), this.stopAnimation();
|
|
}, s = (d, f) => {
|
|
const { drag: y, dragPropagation: v, onDragStart: S } = this.getProps();
|
|
if (y && !v && (this.openDragLock && this.openDragLock(), this.openDragLock = $M(y), !this.openDragLock))
|
|
return;
|
|
this.latestPointerEvent = d, this.latestPanInfo = f, this.isDragging = !0, this.currentDirection = null, this.resolveConstraints(), this.visualElement.projection && (this.visualElement.projection.isAnimationBlocked = !0, this.visualElement.projection.target = void 0), Zt((p) => {
|
|
let h = this.getAxisMotionValue(p).get() || 0;
|
|
if (dn.test(h)) {
|
|
const { projection: g } = this.visualElement;
|
|
if (g && g.layout) {
|
|
const w = g.layout.layoutBox[p];
|
|
w && (h = qe(w) * (parseFloat(h) / 100));
|
|
}
|
|
}
|
|
this.originPoint[p] = h;
|
|
}), S && ie.update(() => S(d, f), !1, !0), af(this.visualElement, "transform");
|
|
const { animationState: k } = this.visualElement;
|
|
k && k.setActive("whileDrag", !0);
|
|
}, a = (d, f) => {
|
|
this.latestPointerEvent = d, this.latestPanInfo = f;
|
|
const { dragPropagation: y, dragDirectionLock: v, onDirectionLock: S, onDrag: k } = this.getProps();
|
|
if (!y && !this.openDragLock)
|
|
return;
|
|
const { offset: p } = f;
|
|
if (v && this.currentDirection === null) {
|
|
this.currentDirection = aD(p), this.currentDirection !== null && S && S(this.currentDirection);
|
|
return;
|
|
}
|
|
this.updateAxis("x", f.point, p), this.updateAxis("y", f.point, p), this.visualElement.render(), k && ie.update(() => k(d, f), !1, !0);
|
|
}, l = (d, f) => {
|
|
this.latestPointerEvent = d, this.latestPanInfo = f, this.stop(d, f), this.latestPointerEvent = null, this.latestPanInfo = null;
|
|
}, u = () => {
|
|
const { dragSnapToOrigin: d } = this.getProps();
|
|
(d || this.constraints) && this.startAnimation({ x: 0, y: 0 });
|
|
}, { dragSnapToOrigin: c } = this.getProps();
|
|
this.panSession = new $b(t, {
|
|
onSessionStart: i,
|
|
onStart: s,
|
|
onMove: a,
|
|
onSessionEnd: l,
|
|
resumeAnimation: u
|
|
}, {
|
|
transformPagePoint: this.visualElement.getTransformPagePoint(),
|
|
dragSnapToOrigin: c,
|
|
distanceThreshold: r,
|
|
contextWindow: _b(this.visualElement),
|
|
element: this.visualElement.current
|
|
});
|
|
}
|
|
/**
|
|
* @internal
|
|
*/
|
|
stop(t, n) {
|
|
const r = t || this.latestPointerEvent, o = n || this.latestPanInfo, i = this.isDragging;
|
|
if (this.cancel(), !i || !o || !r)
|
|
return;
|
|
const { velocity: s } = o;
|
|
this.startAnimation(s);
|
|
const { onDragEnd: a } = this.getProps();
|
|
a && ie.postRender(() => a(r, o));
|
|
}
|
|
/**
|
|
* @internal
|
|
*/
|
|
cancel() {
|
|
this.isDragging = !1;
|
|
const { projection: t, animationState: n } = this.visualElement;
|
|
t && (t.isAnimationBlocked = !1), this.endPanSession();
|
|
const { dragPropagation: r } = this.getProps();
|
|
!r && this.openDragLock && (this.openDragLock(), this.openDragLock = null), n && n.setActive("whileDrag", !1);
|
|
}
|
|
/**
|
|
* Clean up the pan session without modifying other drag state.
|
|
* This is used during unmount to ensure event listeners are removed
|
|
* without affecting projection animations or drag locks.
|
|
* @internal
|
|
*/
|
|
endPanSession() {
|
|
this.panSession && this.panSession.end(), this.panSession = void 0;
|
|
}
|
|
updateAxis(t, n, r) {
|
|
const { drag: o } = this.getProps();
|
|
if (!r || !da(t, o, this.currentDirection))
|
|
return;
|
|
const i = this.getAxisMotionValue(t);
|
|
let s = this.originPoint[t] + r[t];
|
|
this.constraints && this.constraints[t] && (s = Z4(s, this.constraints[t], this.elastic[t])), i.set(s);
|
|
}
|
|
resolveConstraints() {
|
|
const { dragConstraints: t, dragElastic: n } = this.getProps(), r = this.visualElement.projection && !this.visualElement.projection.layout ? this.visualElement.projection.measure(!1) : this.visualElement.projection?.layout, o = this.constraints;
|
|
t && Ur(t) ? this.constraints || (this.constraints = this.resolveRefConstraints()) : t && r ? this.constraints = J4(r.layoutBox, t) : this.constraints = !1, this.elastic = rD(n), o !== this.constraints && !Ur(t) && r && this.constraints && !this.hasMutatedConstraints && Zt((i) => {
|
|
this.constraints !== !1 && this.getAxisMotionValue(i) && (this.constraints[i] = nD(r.layoutBox[i], this.constraints[i]));
|
|
});
|
|
}
|
|
resolveRefConstraints() {
|
|
const { dragConstraints: t, onMeasureDragConstraints: n } = this.getProps();
|
|
if (!t || !Ur(t))
|
|
return !1;
|
|
const r = t.current;
|
|
Dr(r !== null, "If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.", "drag-constraints-ref");
|
|
const { projection: o } = this.visualElement;
|
|
if (!o || !o.layout)
|
|
return !1;
|
|
o.root && (o.root.scroll = void 0, o.root.updateScroll());
|
|
const i = o3(r, o.root, this.visualElement.getTransformPagePoint());
|
|
let s = eD(o.layout.layoutBox, i);
|
|
if (n) {
|
|
const a = n(t3(s));
|
|
this.hasMutatedConstraints = !!a, a && (s = qS(a));
|
|
}
|
|
return s;
|
|
}
|
|
startAnimation(t) {
|
|
const { drag: n, dragMomentum: r, dragElastic: o, dragTransition: i, dragSnapToOrigin: s, onDragTransitionEnd: a } = this.getProps(), l = this.constraints || {}, u = Zt((c) => {
|
|
if (!da(c, n, this.currentDirection))
|
|
return;
|
|
let d = l && l[c] || {};
|
|
(s === !0 || s === c) && (d = { min: 0, max: 0 });
|
|
const f = o ? 200 : 1e6, y = o ? 40 : 1e7, v = {
|
|
type: "inertia",
|
|
velocity: r ? t[c] : 0,
|
|
bounceStiffness: f,
|
|
bounceDamping: y,
|
|
timeConstant: 750,
|
|
restDelta: 1,
|
|
restSpeed: 10,
|
|
...i,
|
|
...d
|
|
};
|
|
return this.startAxisValueAnimation(c, v);
|
|
});
|
|
return Promise.all(u).then(a);
|
|
}
|
|
startAxisValueAnimation(t, n) {
|
|
const r = this.getAxisMotionValue(t);
|
|
return af(this.visualElement, t), r.start(qh(t, r, 0, n, this.visualElement, !1));
|
|
}
|
|
stopAnimation() {
|
|
Zt((t) => this.getAxisMotionValue(t).stop());
|
|
}
|
|
/**
|
|
* Drag works differently depending on which props are provided.
|
|
*
|
|
* - If _dragX and _dragY are provided, we output the gesture delta directly to those motion values.
|
|
* - Otherwise, we apply the delta to the x/y motion values.
|
|
*/
|
|
getAxisMotionValue(t) {
|
|
const n = `_drag${t.toUpperCase()}`, o = this.visualElement.getProps()[n];
|
|
return o || this.visualElement.getValue(t, this.visualElement.latestValues[t] ?? 0);
|
|
}
|
|
snapToCursor(t) {
|
|
Zt((n) => {
|
|
const { drag: r } = this.getProps();
|
|
if (!da(n, r, this.currentDirection))
|
|
return;
|
|
const { projection: o } = this.visualElement, i = this.getAxisMotionValue(n);
|
|
if (o && o.layout) {
|
|
const { min: s, max: a } = o.layout.layoutBox[n], l = i.get() || 0;
|
|
i.set(t[n] - oe(s, a, 0.5) + l);
|
|
}
|
|
});
|
|
}
|
|
/**
|
|
* When the viewport resizes we want to check if the measured constraints
|
|
* have changed and, if so, reposition the element within those new constraints
|
|
* relative to where it was before the resize.
|
|
*/
|
|
scalePositionWithinConstraints() {
|
|
if (!this.visualElement.current)
|
|
return;
|
|
const { drag: t, dragConstraints: n } = this.getProps(), { projection: r } = this.visualElement;
|
|
if (!Ur(n) || !r || !this.constraints)
|
|
return;
|
|
this.stopAnimation();
|
|
const o = { x: 0, y: 0 };
|
|
Zt((s) => {
|
|
const a = this.getAxisMotionValue(s);
|
|
if (a && this.constraints !== !1) {
|
|
const l = a.get();
|
|
o[s] = tD({ min: l, max: l }, this.constraints[s]);
|
|
}
|
|
});
|
|
const { transformTemplate: i } = this.visualElement.getProps();
|
|
this.visualElement.current.style.transform = i ? i({}, "") : "none", r.root && r.root.updateScroll(), r.updateLayout(), this.constraints = !1, this.resolveConstraints(), Zt((s) => {
|
|
if (!da(s, t, null))
|
|
return;
|
|
const a = this.getAxisMotionValue(s), { min: l, max: u } = this.constraints[s];
|
|
a.set(oe(l, u, o[s]));
|
|
}), this.visualElement.render();
|
|
}
|
|
addListeners() {
|
|
if (!this.visualElement.current)
|
|
return;
|
|
oD.set(this.visualElement, this);
|
|
const t = this.visualElement.current, n = Vi(t, "pointerdown", (u) => {
|
|
const { drag: c, dragListener: d = !0 } = this.getProps(), f = u.target, y = f !== t && IM(f);
|
|
c && d && !y && this.start(u);
|
|
});
|
|
let r;
|
|
const o = () => {
|
|
const { dragConstraints: u } = this.getProps();
|
|
Ur(u) && u.current && (this.constraints = this.resolveRefConstraints(), r || (r = sD(t, u.current, () => this.scalePositionWithinConstraints())));
|
|
}, { projection: i } = this.visualElement, s = i.addEventListener("measure", o);
|
|
i && !i.layout && (i.root && i.root.updateScroll(), i.updateLayout()), ie.read(o);
|
|
const a = ds(window, "resize", () => this.scalePositionWithinConstraints()), l = i.addEventListener("didUpdate", ({ delta: u, hasLayoutChanged: c }) => {
|
|
this.isDragging && c && (Zt((d) => {
|
|
const f = this.getAxisMotionValue(d);
|
|
f && (this.originPoint[d] += u[d].translate, f.set(f.get() + u[d].translate));
|
|
}), this.visualElement.render());
|
|
});
|
|
return () => {
|
|
a(), n(), s(), l && l(), r && r();
|
|
};
|
|
}
|
|
getProps() {
|
|
const t = this.visualElement.getProps(), { drag: n = !1, dragDirectionLock: r = !1, dragPropagation: o = !1, dragConstraints: i = !1, dragElastic: s = yf, dragMomentum: a = !0 } = t;
|
|
return {
|
|
...t,
|
|
drag: n,
|
|
dragDirectionLock: r,
|
|
dragPropagation: o,
|
|
dragConstraints: i,
|
|
dragElastic: s,
|
|
dragMomentum: a
|
|
};
|
|
}
|
|
}
|
|
function Ly(e) {
|
|
let t = !0;
|
|
return () => {
|
|
if (t) {
|
|
t = !1;
|
|
return;
|
|
}
|
|
e();
|
|
};
|
|
}
|
|
function sD(e, t, n) {
|
|
const r = Wg(e, Ly(n)), o = Wg(t, Ly(n));
|
|
return () => {
|
|
r(), o();
|
|
};
|
|
}
|
|
function da(e, t, n) {
|
|
return (t === !0 || t === e) && (n === null || n === e);
|
|
}
|
|
function aD(e, t = 10) {
|
|
let n = null;
|
|
return Math.abs(e.y) > t ? n = "y" : Math.abs(e.x) > t && (n = "x"), n;
|
|
}
|
|
class lD extends ir {
|
|
constructor(t) {
|
|
super(t), this.removeGroupControls = $t, this.removeListeners = $t, this.controls = new iD(t);
|
|
}
|
|
mount() {
|
|
const { dragControls: t } = this.node.getProps();
|
|
t && (this.removeGroupControls = t.subscribe(this.controls)), this.removeListeners = this.controls.addListeners() || $t;
|
|
}
|
|
update() {
|
|
const { dragControls: t } = this.node.getProps(), { dragControls: n } = this.node.prevProps || {};
|
|
t !== n && (this.removeGroupControls(), t && (this.removeGroupControls = t.subscribe(this.controls)));
|
|
}
|
|
unmount() {
|
|
this.removeGroupControls(), this.removeListeners(), this.controls.isDragging || this.controls.endPanSession();
|
|
}
|
|
}
|
|
const Vc = (e) => (t, n) => {
|
|
e && ie.update(() => e(t, n), !1, !0);
|
|
};
|
|
class uD extends ir {
|
|
constructor() {
|
|
super(...arguments), this.removePointerDownListener = $t;
|
|
}
|
|
onPointerDown(t) {
|
|
this.session = new $b(t, this.createPanHandlers(), {
|
|
transformPagePoint: this.node.getTransformPagePoint(),
|
|
contextWindow: _b(this.node)
|
|
});
|
|
}
|
|
createPanHandlers() {
|
|
const { onPanSessionStart: t, onPanStart: n, onPan: r, onPanEnd: o } = this.node.getProps();
|
|
return {
|
|
onSessionStart: Vc(t),
|
|
onStart: Vc(n),
|
|
onMove: Vc(r),
|
|
onEnd: (i, s) => {
|
|
delete this.session, o && ie.postRender(() => o(i, s));
|
|
}
|
|
};
|
|
}
|
|
mount() {
|
|
this.removePointerDownListener = Vi(this.node.current, "pointerdown", (t) => this.onPointerDown(t));
|
|
}
|
|
update() {
|
|
this.session && this.session.updateHandlers(this.createPanHandlers());
|
|
}
|
|
unmount() {
|
|
this.removePointerDownListener(), this.session && this.session.end();
|
|
}
|
|
}
|
|
let Bc = !1;
|
|
class cD extends C.Component {
|
|
/**
|
|
* This only mounts projection nodes for components that
|
|
* need measuring, we might want to do it for all components
|
|
* in order to incorporate transforms
|
|
*/
|
|
componentDidMount() {
|
|
const { visualElement: t, layoutGroup: n, switchLayoutGroup: r, layoutId: o } = this.props, { projection: i } = t;
|
|
i && (n.group && n.group.add(i), r && r.register && o && r.register(i), Bc && i.root.didUpdate(), i.addEventListener("animationComplete", () => {
|
|
this.safeToRemove();
|
|
}), i.setOptions({
|
|
...i.options,
|
|
layoutDependency: this.props.layoutDependency,
|
|
onExitComplete: () => this.safeToRemove()
|
|
})), Ua.hasEverUpdated = !0;
|
|
}
|
|
getSnapshotBeforeUpdate(t) {
|
|
const { layoutDependency: n, visualElement: r, drag: o, isPresent: i } = this.props, { projection: s } = r;
|
|
return s && (s.isPresent = i, t.layoutDependency !== n && s.setOptions({
|
|
...s.options,
|
|
layoutDependency: n
|
|
}), Bc = !0, o || t.layoutDependency !== n || n === void 0 || t.isPresent !== i ? s.willUpdate() : this.safeToRemove(), t.isPresent !== i && (i ? s.promote() : s.relegate() || ie.postRender(() => {
|
|
const a = s.getStack();
|
|
(!a || !a.members.length) && this.safeToRemove();
|
|
}))), null;
|
|
}
|
|
componentDidUpdate() {
|
|
const { visualElement: t, layoutAnchor: n } = this.props, { projection: r } = t;
|
|
r && (r.options.layoutAnchor = n, r.root.didUpdate(), ep.postRender(() => {
|
|
!r.currentAnimation && r.isLead() && this.safeToRemove();
|
|
}));
|
|
}
|
|
componentWillUnmount() {
|
|
const { visualElement: t, layoutGroup: n, switchLayoutGroup: r } = this.props, { projection: o } = t;
|
|
Bc = !0, o && (o.scheduleCheckAfterUnmount(), n && n.group && n.group.remove(o), r && r.deregister && r.deregister(o));
|
|
}
|
|
safeToRemove() {
|
|
const { safeToRemove: t } = this.props;
|
|
t && t();
|
|
}
|
|
render() {
|
|
return null;
|
|
}
|
|
}
|
|
function Rb(e) {
|
|
const [t, n] = Sb(), r = C.useContext(Vh);
|
|
return M.jsx(cD, { ...e, layoutGroup: r, switchLayoutGroup: C.useContext(Pb), isPresent: t, safeToRemove: n });
|
|
}
|
|
const dD = {
|
|
pan: {
|
|
Feature: uD
|
|
},
|
|
drag: {
|
|
Feature: lD,
|
|
ProjectionNode: vb,
|
|
MeasureLayout: Rb
|
|
}
|
|
};
|
|
function Vy(e, t, n) {
|
|
const { props: r } = e;
|
|
e.animationState && r.whileHover && e.animationState.setActive("whileHover", n === "Start");
|
|
const o = "onHover" + n, i = r[o];
|
|
i && ie.postRender(() => i(t, Cs(t)));
|
|
}
|
|
class fD extends ir {
|
|
mount() {
|
|
const { current: t } = this.node;
|
|
t && (this.unmount = RM(t, (n, r) => (Vy(this.node, r, "Start"), (o) => Vy(this.node, o, "End"))));
|
|
}
|
|
unmount() {
|
|
}
|
|
}
|
|
class hD extends ir {
|
|
constructor() {
|
|
super(...arguments), this.isActive = !1;
|
|
}
|
|
onFocus() {
|
|
let t = !1;
|
|
try {
|
|
t = this.node.current.matches(":focus-visible");
|
|
} catch {
|
|
t = !0;
|
|
}
|
|
!t || !this.node.animationState || (this.node.animationState.setActive("whileFocus", !0), this.isActive = !0);
|
|
}
|
|
onBlur() {
|
|
!this.isActive || !this.node.animationState || (this.node.animationState.setActive("whileFocus", !1), this.isActive = !1);
|
|
}
|
|
mount() {
|
|
this.unmount = xs(ds(this.node.current, "focus", () => this.onFocus()), ds(this.node.current, "blur", () => this.onBlur()));
|
|
}
|
|
unmount() {
|
|
}
|
|
}
|
|
function By(e, t, n) {
|
|
const { props: r } = e;
|
|
if (e.current instanceof HTMLButtonElement && e.current.disabled)
|
|
return;
|
|
e.animationState && r.whileTap && e.animationState.setActive("whileTap", n === "Start");
|
|
const o = "onTap" + (n === "End" ? "" : n), i = r[o];
|
|
i && ie.postRender(() => i(t, Cs(t)));
|
|
}
|
|
class pD extends ir {
|
|
mount() {
|
|
const { current: t } = this.node;
|
|
if (!t)
|
|
return;
|
|
const { globalTapTarget: n, propagate: r } = this.node.props;
|
|
this.unmount = VM(t, (o, i) => (By(this.node, i, "Start"), (s, { success: a }) => By(this.node, s, a ? "End" : "Cancel")), {
|
|
useGlobalTarget: n,
|
|
stopPropagation: r?.tap === !1
|
|
});
|
|
}
|
|
unmount() {
|
|
}
|
|
}
|
|
const vf = /* @__PURE__ */ new WeakMap(), Fc = /* @__PURE__ */ new WeakMap(), mD = (e) => {
|
|
const t = vf.get(e.target);
|
|
t && t(e);
|
|
}, gD = (e) => {
|
|
e.forEach(mD);
|
|
};
|
|
function yD({ root: e, ...t }) {
|
|
const n = e || document;
|
|
Fc.has(n) || Fc.set(n, {});
|
|
const r = Fc.get(n), o = JSON.stringify(t);
|
|
return r[o] || (r[o] = new IntersectionObserver(gD, { root: e, ...t })), r[o];
|
|
}
|
|
function vD(e, t, n) {
|
|
const r = yD(t);
|
|
return vf.set(e, n), r.observe(e), () => {
|
|
vf.delete(e), r.unobserve(e);
|
|
};
|
|
}
|
|
const SD = {
|
|
some: 0,
|
|
all: 1
|
|
};
|
|
class bD extends ir {
|
|
constructor() {
|
|
super(...arguments), this.hasEnteredView = !1, this.isInView = !1;
|
|
}
|
|
startObserver() {
|
|
this.stopObserver?.();
|
|
const { viewport: t = {} } = this.node.getProps(), { root: n, margin: r, amount: o = "some", once: i } = t, s = {
|
|
root: n ? n.current : void 0,
|
|
rootMargin: r,
|
|
threshold: typeof o == "number" ? o : SD[o]
|
|
}, a = (l) => {
|
|
const { isIntersecting: u } = l;
|
|
if (this.isInView === u || (this.isInView = u, i && !u && this.hasEnteredView))
|
|
return;
|
|
u && (this.hasEnteredView = !0), this.node.animationState && this.node.animationState.setActive("whileInView", u);
|
|
const { onViewportEnter: c, onViewportLeave: d } = this.node.getProps(), f = u ? c : d;
|
|
f && f(l);
|
|
};
|
|
this.stopObserver = vD(this.node.current, s, a);
|
|
}
|
|
mount() {
|
|
this.startObserver();
|
|
}
|
|
update() {
|
|
if (typeof IntersectionObserver > "u")
|
|
return;
|
|
const { props: t, prevProps: n } = this.node;
|
|
["amount", "margin", "root"].some(xD(t, n)) && this.startObserver();
|
|
}
|
|
unmount() {
|
|
this.stopObserver?.(), this.hasEnteredView = !1, this.isInView = !1;
|
|
}
|
|
}
|
|
function xD({ viewport: e = {} }, { viewport: t = {} } = {}) {
|
|
return (n) => e[n] !== t[n];
|
|
}
|
|
const wD = {
|
|
inView: {
|
|
Feature: bD
|
|
},
|
|
tap: {
|
|
Feature: pD
|
|
},
|
|
focus: {
|
|
Feature: hD
|
|
},
|
|
hover: {
|
|
Feature: fD
|
|
}
|
|
}, kD = {
|
|
layout: {
|
|
ProjectionNode: vb,
|
|
MeasureLayout: Rb
|
|
}
|
|
}, CD = {
|
|
...G4,
|
|
...wD,
|
|
...dD,
|
|
...kD
|
|
}, TD = /* @__PURE__ */ N4(CD, W4), PD = (e, t) => e.find((n) => n.id === t);
|
|
function Fy(e, t) {
|
|
const n = zb(e, t), r = n ? e[n].findIndex((o) => o.id === t) : -1;
|
|
return {
|
|
position: n,
|
|
index: r
|
|
};
|
|
}
|
|
function zb(e, t) {
|
|
for (const [n, r] of Object.entries(e))
|
|
if (PD(r, t))
|
|
return n;
|
|
}
|
|
function ED(e) {
|
|
const t = e.includes("right"), n = e.includes("left");
|
|
let r = "center";
|
|
return t && (r = "flex-end"), n && (r = "flex-start"), {
|
|
display: "flex",
|
|
flexDirection: "column",
|
|
alignItems: r
|
|
};
|
|
}
|
|
function _D(e) {
|
|
const n = e === "top" || e === "bottom" ? "0 auto" : void 0, r = e.includes("top") ? "env(safe-area-inset-top, 0px)" : void 0, o = e.includes("bottom") ? "env(safe-area-inset-bottom, 0px)" : void 0, i = e.includes("left") ? void 0 : "env(safe-area-inset-right, 0px)", s = e.includes("right") ? void 0 : "env(safe-area-inset-left, 0px)";
|
|
return {
|
|
position: "fixed",
|
|
zIndex: "var(--toast-z-index, 5500)",
|
|
pointerEvents: "none",
|
|
display: "flex",
|
|
flexDirection: "column",
|
|
margin: n,
|
|
top: r,
|
|
bottom: o,
|
|
right: i,
|
|
left: s
|
|
};
|
|
}
|
|
var $D = /^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|popover|popoverTarget|popoverTargetAction|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/, AD = /* @__PURE__ */ R1(
|
|
function(e) {
|
|
return $D.test(e) || e.charCodeAt(0) === 111 && e.charCodeAt(1) === 110 && e.charCodeAt(2) < 91;
|
|
}
|
|
/* Z+1 */
|
|
), RD = AD, zD = function(t) {
|
|
return t !== "theme";
|
|
}, jy = function(t) {
|
|
return typeof t == "string" && // 96 is one less than the char code
|
|
// for "a" so this is checking that
|
|
// it's a lowercase character
|
|
t.charCodeAt(0) > 96 ? RD : zD;
|
|
}, Oy = function(t, n, r) {
|
|
var o;
|
|
if (n) {
|
|
var i = n.shouldForwardProp;
|
|
o = t.__emotion_forwardProp && i ? function(s) {
|
|
return t.__emotion_forwardProp(s) && i(s);
|
|
} : i;
|
|
}
|
|
return typeof o != "function" && r && (o = t.__emotion_forwardProp), o;
|
|
}, MD = function(t) {
|
|
var n = t.cache, r = t.serialized, o = t.isStringTag;
|
|
return Ah(n, r, o), j1(function() {
|
|
return Rh(n, r, o);
|
|
}), null;
|
|
}, DD = function e(t, n) {
|
|
var r = t.__emotion_real === t, o = r && t.__emotion_base || t, i, s;
|
|
n !== void 0 && (i = n.label, s = n.target);
|
|
var a = Oy(t, n, r), l = a || jy(o), u = !l("as");
|
|
return function() {
|
|
var c = arguments, d = r && t.__emotion_styles !== void 0 ? t.__emotion_styles.slice(0) : [];
|
|
if (i !== void 0 && d.push("label:" + i + ";"), c[0] == null || c[0].raw === void 0)
|
|
d.push.apply(d, c);
|
|
else {
|
|
var f = c[0];
|
|
d.push(f[0]);
|
|
for (var y = c.length, v = 1; v < y; v++)
|
|
d.push(c[v], f[v]);
|
|
}
|
|
var S = Mh(function(k, p, h) {
|
|
var g = u && k.as || o, w = "", E = [], _ = k;
|
|
if (k.theme == null) {
|
|
_ = {};
|
|
for (var P in k)
|
|
_[P] = k[P];
|
|
_.theme = C.useContext(Do);
|
|
}
|
|
typeof k.className == "string" ? w = V1(p.registered, E, k.className) : k.className != null && (w = k.className + " ");
|
|
var $ = pu(d.concat(E), p.registered, _);
|
|
w += p.key + "-" + $.name, s !== void 0 && (w += " " + s);
|
|
var V = u && a === void 0 ? jy(g) : l, A = {};
|
|
for (var N in k)
|
|
u && N === "as" || V(N) && (A[N] = k[N]);
|
|
return A.className = w, h && (A.ref = h), /* @__PURE__ */ C.createElement(C.Fragment, null, /* @__PURE__ */ C.createElement(MD, {
|
|
cache: p,
|
|
serialized: $,
|
|
isStringTag: typeof g == "string"
|
|
}), /* @__PURE__ */ C.createElement(g, A));
|
|
});
|
|
return S.displayName = i !== void 0 ? i : "Styled(" + (typeof o == "string" ? o : o.displayName || o.name || "Component") + ")", S.defaultProps = t.defaultProps, S.__emotion_real = S, S.__emotion_base = o, S.__emotion_styles = d, S.__emotion_forwardProp = a, Object.defineProperty(S, "toString", {
|
|
value: function() {
|
|
return "." + s;
|
|
}
|
|
}), S.withComponent = function(k, p) {
|
|
var h = e(k, wl({}, n, p, {
|
|
shouldForwardProp: Oy(S, p, !0)
|
|
}));
|
|
return h.apply(void 0, d);
|
|
}, S;
|
|
};
|
|
}, ID = [
|
|
"a",
|
|
"abbr",
|
|
"address",
|
|
"area",
|
|
"article",
|
|
"aside",
|
|
"audio",
|
|
"b",
|
|
"base",
|
|
"bdi",
|
|
"bdo",
|
|
"big",
|
|
"blockquote",
|
|
"body",
|
|
"br",
|
|
"button",
|
|
"canvas",
|
|
"caption",
|
|
"cite",
|
|
"code",
|
|
"col",
|
|
"colgroup",
|
|
"data",
|
|
"datalist",
|
|
"dd",
|
|
"del",
|
|
"details",
|
|
"dfn",
|
|
"dialog",
|
|
"div",
|
|
"dl",
|
|
"dt",
|
|
"em",
|
|
"embed",
|
|
"fieldset",
|
|
"figcaption",
|
|
"figure",
|
|
"footer",
|
|
"form",
|
|
"h1",
|
|
"h2",
|
|
"h3",
|
|
"h4",
|
|
"h5",
|
|
"h6",
|
|
"head",
|
|
"header",
|
|
"hgroup",
|
|
"hr",
|
|
"html",
|
|
"i",
|
|
"iframe",
|
|
"img",
|
|
"input",
|
|
"ins",
|
|
"kbd",
|
|
"keygen",
|
|
"label",
|
|
"legend",
|
|
"li",
|
|
"link",
|
|
"main",
|
|
"map",
|
|
"mark",
|
|
"marquee",
|
|
"menu",
|
|
"menuitem",
|
|
"meta",
|
|
"meter",
|
|
"nav",
|
|
"noscript",
|
|
"object",
|
|
"ol",
|
|
"optgroup",
|
|
"option",
|
|
"output",
|
|
"p",
|
|
"param",
|
|
"picture",
|
|
"pre",
|
|
"progress",
|
|
"q",
|
|
"rp",
|
|
"rt",
|
|
"ruby",
|
|
"s",
|
|
"samp",
|
|
"script",
|
|
"section",
|
|
"select",
|
|
"small",
|
|
"source",
|
|
"span",
|
|
"strong",
|
|
"style",
|
|
"sub",
|
|
"summary",
|
|
"sup",
|
|
"table",
|
|
"tbody",
|
|
"td",
|
|
"textarea",
|
|
"tfoot",
|
|
"th",
|
|
"thead",
|
|
"time",
|
|
"title",
|
|
"tr",
|
|
"track",
|
|
"u",
|
|
"ul",
|
|
"var",
|
|
"video",
|
|
"wbr",
|
|
// SVG
|
|
"circle",
|
|
"clipPath",
|
|
"defs",
|
|
"ellipse",
|
|
"foreignObject",
|
|
"g",
|
|
"image",
|
|
"line",
|
|
"linearGradient",
|
|
"mask",
|
|
"path",
|
|
"pattern",
|
|
"polygon",
|
|
"polyline",
|
|
"radialGradient",
|
|
"rect",
|
|
"stop",
|
|
"svg",
|
|
"text",
|
|
"tspan"
|
|
], Sf = DD.bind(null);
|
|
ID.forEach(function(e) {
|
|
Sf[e] = Sf(e);
|
|
});
|
|
const LD = /* @__PURE__ */ new Set([
|
|
...ET,
|
|
"textStyle",
|
|
"layerStyle",
|
|
"apply",
|
|
"noOfLines",
|
|
"focusBorderColor",
|
|
"errorBorderColor",
|
|
"as",
|
|
"__css",
|
|
"css",
|
|
"sx"
|
|
]), VD = /* @__PURE__ */ new Set([
|
|
"htmlWidth",
|
|
"htmlHeight",
|
|
"htmlSize",
|
|
"htmlTranslate"
|
|
]);
|
|
function BD(e) {
|
|
return (VD.has(e) || !LD.has(e)) && e[0] !== "_";
|
|
}
|
|
const FD = OC(Sf), jD = ({ baseStyle: e }) => (t) => {
|
|
const { theme: n, css: r, __css: o, sx: i, ...s } = t, [a] = HC(s, $T), l = on(e, t), u = RC(
|
|
{},
|
|
o,
|
|
l,
|
|
VC(a),
|
|
i
|
|
), c = c1(u)(t.theme);
|
|
return r ? [c, r] : c;
|
|
};
|
|
function jc(e, t) {
|
|
const { baseStyle: n, ...r } = t ?? {};
|
|
r.shouldForwardProp || (r.shouldForwardProp = BD);
|
|
const o = jD({ baseStyle: n }), i = FD(
|
|
e,
|
|
r
|
|
)(o);
|
|
return C.forwardRef(
|
|
function(l, u) {
|
|
const { children: c, ...d } = l, { colorMode: f, forced: y } = Lh(), v = y ? f : void 0;
|
|
return C.createElement(
|
|
i,
|
|
{ ref: u, "data-theme": v, ...d },
|
|
c
|
|
);
|
|
}
|
|
);
|
|
}
|
|
function OD() {
|
|
const e = /* @__PURE__ */ new Map();
|
|
return new Proxy(jc, {
|
|
/**
|
|
* @example
|
|
* const Div = chakra("div")
|
|
* const WithChakra = chakra(AnotherComponent)
|
|
*/
|
|
apply(t, n, r) {
|
|
return jc(...r);
|
|
},
|
|
/**
|
|
* @example
|
|
* <chakra.div />
|
|
*/
|
|
get(t, n) {
|
|
return e.has(n) || e.set(n, jc(n)), e.get(n);
|
|
}
|
|
});
|
|
}
|
|
const zt = OD(), ND = {
|
|
initial: (e) => {
|
|
const { position: t } = e, n = ["top", "bottom"].includes(t) ? "y" : "x";
|
|
let r = ["top-right", "bottom-right"].includes(t) ? 1 : -1;
|
|
return t === "bottom" && (r = 1), {
|
|
opacity: 0,
|
|
[n]: r * 24
|
|
};
|
|
},
|
|
animate: {
|
|
opacity: 1,
|
|
y: 0,
|
|
x: 0,
|
|
scale: 1,
|
|
transition: {
|
|
duration: 0.4,
|
|
ease: [0.4, 0, 0.2, 1]
|
|
}
|
|
},
|
|
exit: {
|
|
opacity: 0,
|
|
scale: 0.85,
|
|
transition: {
|
|
duration: 0.2,
|
|
ease: [0.4, 0, 1, 1]
|
|
}
|
|
}
|
|
}, Mb = C.memo((e) => {
|
|
const {
|
|
id: t,
|
|
message: n,
|
|
onCloseComplete: r,
|
|
onRequestRemove: o,
|
|
requestClose: i = !1,
|
|
position: s = "bottom",
|
|
duration: a = 5e3,
|
|
containerStyle: l,
|
|
motionVariants: u = ND,
|
|
toastSpacing: c = "0.5rem"
|
|
} = e, [d, f] = C.useState(a), y = m4();
|
|
Gm(() => {
|
|
y || r?.();
|
|
}, [y]), Gm(() => {
|
|
f(a);
|
|
}, [a]);
|
|
const v = () => f(null), S = () => f(a), k = () => {
|
|
y && o();
|
|
};
|
|
C.useEffect(() => {
|
|
y && i && o();
|
|
}, [y, i, o]), XC(k, d);
|
|
const p = C.useMemo(
|
|
() => ({
|
|
pointerEvents: "auto",
|
|
maxWidth: 560,
|
|
minWidth: 300,
|
|
margin: c,
|
|
...l
|
|
}),
|
|
[l, c]
|
|
), h = C.useMemo(() => ED(s), [s]);
|
|
return /* @__PURE__ */ M.jsx(
|
|
TD.div,
|
|
{
|
|
layout: !0,
|
|
className: "chakra-toast",
|
|
variants: u,
|
|
initial: "initial",
|
|
animate: "animate",
|
|
exit: "exit",
|
|
onHoverStart: v,
|
|
onHoverEnd: S,
|
|
custom: { position: s },
|
|
style: h,
|
|
children: /* @__PURE__ */ M.jsx(
|
|
zt.div,
|
|
{
|
|
role: "status",
|
|
"aria-atomic": "true",
|
|
className: "chakra-toast__inner",
|
|
__css: p,
|
|
children: on(n, { id: t, onClose: k })
|
|
}
|
|
)
|
|
}
|
|
);
|
|
});
|
|
Mb.displayName = "ToastComponent";
|
|
function Br(e) {
|
|
return C.forwardRef(e);
|
|
}
|
|
var WD = typeof Element < "u", UD = typeof Map == "function", HD = typeof Set == "function", KD = typeof ArrayBuffer == "function" && !!ArrayBuffer.isView;
|
|
function Ha(e, t) {
|
|
if (e === t) return !0;
|
|
if (e && t && typeof e == "object" && typeof t == "object") {
|
|
if (e.constructor !== t.constructor) return !1;
|
|
var n, r, o;
|
|
if (Array.isArray(e)) {
|
|
if (n = e.length, n != t.length) return !1;
|
|
for (r = n; r-- !== 0; )
|
|
if (!Ha(e[r], t[r])) return !1;
|
|
return !0;
|
|
}
|
|
var i;
|
|
if (UD && e instanceof Map && t instanceof Map) {
|
|
if (e.size !== t.size) return !1;
|
|
for (i = e.entries(); !(r = i.next()).done; )
|
|
if (!t.has(r.value[0])) return !1;
|
|
for (i = e.entries(); !(r = i.next()).done; )
|
|
if (!Ha(r.value[1], t.get(r.value[0]))) return !1;
|
|
return !0;
|
|
}
|
|
if (HD && e instanceof Set && t instanceof Set) {
|
|
if (e.size !== t.size) return !1;
|
|
for (i = e.entries(); !(r = i.next()).done; )
|
|
if (!t.has(r.value[0])) return !1;
|
|
return !0;
|
|
}
|
|
if (KD && ArrayBuffer.isView(e) && ArrayBuffer.isView(t)) {
|
|
if (n = e.length, n != t.length) return !1;
|
|
for (r = n; r-- !== 0; )
|
|
if (e[r] !== t[r]) return !1;
|
|
return !0;
|
|
}
|
|
if (e.constructor === RegExp) return e.source === t.source && e.flags === t.flags;
|
|
if (e.valueOf !== Object.prototype.valueOf && typeof e.valueOf == "function" && typeof t.valueOf == "function") return e.valueOf() === t.valueOf();
|
|
if (e.toString !== Object.prototype.toString && typeof e.toString == "function" && typeof t.toString == "function") return e.toString() === t.toString();
|
|
if (o = Object.keys(e), n = o.length, n !== Object.keys(t).length) return !1;
|
|
for (r = n; r-- !== 0; )
|
|
if (!Object.prototype.hasOwnProperty.call(t, o[r])) return !1;
|
|
if (WD && e instanceof Element) return !1;
|
|
for (r = n; r-- !== 0; )
|
|
if (!((o[r] === "_owner" || o[r] === "__v" || o[r] === "__o") && e.$$typeof) && !Ha(e[o[r]], t[o[r]]))
|
|
return !1;
|
|
return !0;
|
|
}
|
|
return e !== e && t !== t;
|
|
}
|
|
var GD = function(t, n) {
|
|
try {
|
|
return Ha(t, n);
|
|
} catch (r) {
|
|
if ((r.message || "").match(/stack|recursion/i))
|
|
return console.warn("react-fast-compare cannot handle circular refs"), !1;
|
|
throw r;
|
|
}
|
|
};
|
|
const XD = /* @__PURE__ */ bf(GD);
|
|
function YD() {
|
|
const e = C.useContext(
|
|
Do
|
|
);
|
|
if (!e)
|
|
throw Error(
|
|
"useTheme: `theme` is undefined. Seems you forgot to wrap your app in `<ChakraProvider />` or `<ThemeProvider />`"
|
|
);
|
|
return e;
|
|
}
|
|
function QD() {
|
|
const e = Lh(), t = YD();
|
|
return { ...e, theme: t };
|
|
}
|
|
function qD(e) {
|
|
return Object.fromEntries(
|
|
Object.entries(e).filter(([t, n]) => n !== void 0 && t !== "children" && !C.isValidElement(n))
|
|
);
|
|
}
|
|
function Db(e, t = {}) {
|
|
const { styleConfig: n, ...r } = t, { theme: o, colorMode: i } = QD(), s = e ? i1(o, `components.${e}`) : void 0, a = n || s, l = sn(
|
|
{ theme: o, colorMode: i },
|
|
a?.defaultProps ?? {},
|
|
qD(r),
|
|
(c, d) => c ? void 0 : d
|
|
), u = C.useRef({});
|
|
if (a) {
|
|
const d = FT(a)(l);
|
|
XD(u.current, d) || (u.current = d);
|
|
}
|
|
return u.current;
|
|
}
|
|
function bu(e, t = {}) {
|
|
return Db(e, t);
|
|
}
|
|
function ZD(e, t = {}) {
|
|
return Db(e, t);
|
|
}
|
|
const Ny = {
|
|
path: /* @__PURE__ */ M.jsxs("g", { stroke: "currentColor", strokeWidth: "1.5", children: [
|
|
/* @__PURE__ */ M.jsx(
|
|
"path",
|
|
{
|
|
strokeLinecap: "round",
|
|
fill: "none",
|
|
d: "M9,9a3,3,0,1,1,4,2.829,1.5,1.5,0,0,0-1,1.415V14.25"
|
|
}
|
|
),
|
|
/* @__PURE__ */ M.jsx(
|
|
"path",
|
|
{
|
|
fill: "currentColor",
|
|
strokeLinecap: "round",
|
|
d: "M12,17.25a.375.375,0,1,0,.375.375A.375.375,0,0,0,12,17.25h0"
|
|
}
|
|
),
|
|
/* @__PURE__ */ M.jsx("circle", { fill: "none", strokeMiterlimit: "10", cx: "12", cy: "12", r: "11.25" })
|
|
] }),
|
|
viewBox: "0 0 24 24"
|
|
}, Ts = Br((e, t) => {
|
|
const {
|
|
as: n,
|
|
viewBox: r,
|
|
color: o = "currentColor",
|
|
focusable: i = !1,
|
|
children: s,
|
|
className: a,
|
|
__css: l,
|
|
...u
|
|
} = e, c = Vr("chakra-icon", a), d = bu("Icon", e), f = {
|
|
w: "1em",
|
|
h: "1em",
|
|
display: "inline-block",
|
|
lineHeight: "1em",
|
|
flexShrink: 0,
|
|
color: o,
|
|
...l,
|
|
...d
|
|
}, y = {
|
|
ref: t,
|
|
focusable: i,
|
|
className: c,
|
|
__css: f
|
|
}, v = r ?? Ny.viewBox;
|
|
if (n && typeof n != "string")
|
|
return /* @__PURE__ */ M.jsx(zt.svg, { as: n, ...y, ...u });
|
|
const S = s ?? Ny.path;
|
|
return /* @__PURE__ */ M.jsx(zt.svg, { verticalAlign: "middle", viewBox: v, ...y, ...u, children: S });
|
|
});
|
|
Ts.displayName = "Icon";
|
|
function JD(e) {
|
|
return /* @__PURE__ */ M.jsx(Ts, { viewBox: "0 0 24 24", ...e, children: /* @__PURE__ */ M.jsx(
|
|
"path",
|
|
{
|
|
fill: "currentColor",
|
|
d: "M12,0A12,12,0,1,0,24,12,12.014,12.014,0,0,0,12,0Zm6.927,8.2-6.845,9.289a1.011,1.011,0,0,1-1.43.188L5.764,13.769a1,1,0,1,1,1.25-1.562l4.076,3.261,6.227-8.451A1,1,0,1,1,18.927,8.2Z"
|
|
}
|
|
) });
|
|
}
|
|
function eI(e) {
|
|
return /* @__PURE__ */ M.jsx(Ts, { viewBox: "0 0 24 24", ...e, children: /* @__PURE__ */ M.jsx(
|
|
"path",
|
|
{
|
|
fill: "currentColor",
|
|
d: "M12,0A12,12,0,1,0,24,12,12.013,12.013,0,0,0,12,0Zm.25,5a1.5,1.5,0,1,1-1.5,1.5A1.5,1.5,0,0,1,12.25,5ZM14.5,18.5h-4a1,1,0,0,1,0-2h.75a.25.25,0,0,0,.25-.25v-4.5a.25.25,0,0,0-.25-.25H10.5a1,1,0,0,1,0-2h1a2,2,0,0,1,2,2v4.75a.25.25,0,0,0,.25.25h.75a1,1,0,1,1,0,2Z"
|
|
}
|
|
) });
|
|
}
|
|
function Wy(e) {
|
|
return /* @__PURE__ */ M.jsx(Ts, { viewBox: "0 0 24 24", ...e, children: /* @__PURE__ */ M.jsx(
|
|
"path",
|
|
{
|
|
fill: "currentColor",
|
|
d: "M11.983,0a12.206,12.206,0,0,0-8.51,3.653A11.8,11.8,0,0,0,0,12.207,11.779,11.779,0,0,0,11.8,24h.214A12.111,12.111,0,0,0,24,11.791h0A11.766,11.766,0,0,0,11.983,0ZM10.5,16.542a1.476,1.476,0,0,1,1.449-1.53h.027a1.527,1.527,0,0,1,1.523,1.47,1.475,1.475,0,0,1-1.449,1.53h-.027A1.529,1.529,0,0,1,10.5,16.542ZM11,12.5v-6a1,1,0,0,1,2,0v6a1,1,0,1,1-2,0Z"
|
|
}
|
|
) });
|
|
}
|
|
const tI = dR({
|
|
"0%": {
|
|
transform: "rotate(0deg)"
|
|
},
|
|
"100%": {
|
|
transform: "rotate(360deg)"
|
|
}
|
|
}), Ib = Br((e, t) => {
|
|
const n = bu("Spinner", e), {
|
|
label: r = "Loading...",
|
|
thickness: o = "2px",
|
|
speed: i = "0.45s",
|
|
emptyColor: s = "transparent",
|
|
className: a,
|
|
...l
|
|
} = ql(e), u = Vr("chakra-spinner", a), c = {
|
|
display: "inline-block",
|
|
borderColor: "currentColor",
|
|
borderStyle: "solid",
|
|
borderRadius: "99999px",
|
|
borderWidth: o,
|
|
borderBottomColor: s,
|
|
borderLeftColor: s,
|
|
animation: `${tI} ${i} linear infinite`,
|
|
...n
|
|
};
|
|
return /* @__PURE__ */ M.jsx(
|
|
zt.div,
|
|
{
|
|
ref: t,
|
|
__css: c,
|
|
className: u,
|
|
...l,
|
|
children: r && /* @__PURE__ */ M.jsx(zt.span, { srOnly: !0, children: r })
|
|
}
|
|
);
|
|
});
|
|
Ib.displayName = "Spinner";
|
|
const [nI, cp] = jo({
|
|
name: "AlertContext",
|
|
hookName: "useAlertContext",
|
|
providerName: "<Alert />"
|
|
}), [rI, dp] = jo({
|
|
name: "AlertStylesContext",
|
|
hookName: "useAlertStyles",
|
|
providerName: "<Alert />"
|
|
}), Lb = {
|
|
info: { icon: eI, colorScheme: "blue" },
|
|
warning: { icon: Wy, colorScheme: "orange" },
|
|
success: { icon: JD, colorScheme: "green" },
|
|
error: { icon: Wy, colorScheme: "red" },
|
|
loading: { icon: Ib, colorScheme: "blue" }
|
|
};
|
|
function oI(e) {
|
|
return Lb[e].colorScheme;
|
|
}
|
|
function iI(e) {
|
|
return Lb[e].icon;
|
|
}
|
|
const Vb = Br(function(t, n) {
|
|
const { status: r = "info", addRole: o = !0, ...i } = ql(t), s = t.colorScheme ?? oI(r), a = ZD("Alert", { ...t, colorScheme: s }), l = {
|
|
width: "100%",
|
|
display: "flex",
|
|
alignItems: "center",
|
|
position: "relative",
|
|
overflow: "hidden",
|
|
...a.container
|
|
};
|
|
return /* @__PURE__ */ M.jsx(nI, { value: { status: r }, children: /* @__PURE__ */ M.jsx(rI, { value: a, children: /* @__PURE__ */ M.jsx(
|
|
zt.div,
|
|
{
|
|
"data-status": r,
|
|
role: o ? "alert" : void 0,
|
|
ref: n,
|
|
...i,
|
|
className: Vr("chakra-alert", t.className),
|
|
__css: l
|
|
}
|
|
) }) });
|
|
});
|
|
Vb.displayName = "Alert";
|
|
function Bb(e) {
|
|
const { status: t } = cp(), n = iI(t), r = dp(), o = t === "loading" ? r.spinner : r.icon;
|
|
return /* @__PURE__ */ M.jsx(
|
|
zt.span,
|
|
{
|
|
display: "inherit",
|
|
"data-status": t,
|
|
...e,
|
|
className: Vr("chakra-alert__icon", e.className),
|
|
__css: o,
|
|
children: e.children || /* @__PURE__ */ M.jsx(n, { h: "100%", w: "100%" })
|
|
}
|
|
);
|
|
}
|
|
Bb.displayName = "AlertIcon";
|
|
const Fb = Br(
|
|
function(t, n) {
|
|
const r = dp(), { status: o } = cp();
|
|
return /* @__PURE__ */ M.jsx(
|
|
zt.div,
|
|
{
|
|
ref: n,
|
|
"data-status": o,
|
|
...t,
|
|
className: Vr("chakra-alert__title", t.className),
|
|
__css: r.title
|
|
}
|
|
);
|
|
}
|
|
);
|
|
Fb.displayName = "AlertTitle";
|
|
const jb = Br(
|
|
function(t, n) {
|
|
const { status: r } = cp(), o = dp(), i = {
|
|
display: "inline",
|
|
...o.description
|
|
};
|
|
return /* @__PURE__ */ M.jsx(
|
|
zt.div,
|
|
{
|
|
ref: n,
|
|
"data-status": r,
|
|
...t,
|
|
className: Vr("chakra-alert__desc", t.className),
|
|
__css: i
|
|
}
|
|
);
|
|
}
|
|
);
|
|
jb.displayName = "AlertDescription";
|
|
function sI(e) {
|
|
return /* @__PURE__ */ M.jsx(Ts, { focusable: "false", "aria-hidden": !0, ...e, children: /* @__PURE__ */ M.jsx(
|
|
"path",
|
|
{
|
|
fill: "currentColor",
|
|
d: "M.439,21.44a1.5,1.5,0,0,0,2.122,2.121L11.823,14.3a.25.25,0,0,1,.354,0l9.262,9.263a1.5,1.5,0,1,0,2.122-2.121L14.3,12.177a.25.25,0,0,1,0-.354l9.263-9.262A1.5,1.5,0,0,0,21.439.44L12.177,9.7a.25.25,0,0,1-.354,0L2.561.44A1.5,1.5,0,0,0,.439,2.561L9.7,11.823a.25.25,0,0,1,0,.354Z"
|
|
}
|
|
) });
|
|
}
|
|
const Ob = Br(
|
|
function(t, n) {
|
|
const r = bu("CloseButton", t), { children: o, isDisabled: i, __css: s, ...a } = ql(t), l = {
|
|
outline: 0,
|
|
display: "flex",
|
|
alignItems: "center",
|
|
justifyContent: "center",
|
|
flexShrink: 0
|
|
};
|
|
return /* @__PURE__ */ M.jsx(
|
|
zt.button,
|
|
{
|
|
type: "button",
|
|
"aria-label": "Close",
|
|
ref: n,
|
|
disabled: i,
|
|
__css: {
|
|
...l,
|
|
...r,
|
|
...s
|
|
},
|
|
...a,
|
|
children: o || /* @__PURE__ */ M.jsx(sI, { width: "1em", height: "1em" })
|
|
}
|
|
);
|
|
}
|
|
);
|
|
Ob.displayName = "CloseButton";
|
|
const aI = (e) => {
|
|
const {
|
|
status: t,
|
|
variant: n = "solid",
|
|
id: r,
|
|
title: o,
|
|
isClosable: i,
|
|
onClose: s,
|
|
description: a,
|
|
colorScheme: l,
|
|
icon: u
|
|
} = e, c = r ? {
|
|
root: `toast-${r}`,
|
|
title: `toast-${r}-title`,
|
|
description: `toast-${r}-description`
|
|
} : void 0;
|
|
return /* @__PURE__ */ M.jsxs(
|
|
Vb,
|
|
{
|
|
addRole: !1,
|
|
status: t,
|
|
variant: n,
|
|
id: c?.root,
|
|
alignItems: "start",
|
|
borderRadius: "md",
|
|
boxShadow: "lg",
|
|
paddingEnd: 8,
|
|
textAlign: "start",
|
|
width: "auto",
|
|
colorScheme: l,
|
|
children: [
|
|
/* @__PURE__ */ M.jsx(Bb, { children: u }),
|
|
/* @__PURE__ */ M.jsxs(zt.div, { flex: "1", maxWidth: "100%", children: [
|
|
o && /* @__PURE__ */ M.jsx(Fb, { id: c?.title, children: o }),
|
|
a && /* @__PURE__ */ M.jsx(jb, { id: c?.description, display: "block", children: a })
|
|
] }),
|
|
i && /* @__PURE__ */ M.jsx(
|
|
Ob,
|
|
{
|
|
size: "sm",
|
|
onClick: s,
|
|
position: "absolute",
|
|
insetEnd: 1,
|
|
top: 1
|
|
}
|
|
)
|
|
]
|
|
}
|
|
);
|
|
};
|
|
function lI(e = {}) {
|
|
const { render: t, toastComponent: n = aI } = e;
|
|
return (o) => typeof t == "function" ? t({ ...o, ...e }) : /* @__PURE__ */ M.jsx(n, { ...o, ...e });
|
|
}
|
|
const uI = {
|
|
top: [],
|
|
"top-left": [],
|
|
"top-right": [],
|
|
"bottom-left": [],
|
|
bottom: [],
|
|
"bottom-right": []
|
|
}, Bi = cI(uI);
|
|
function cI(e) {
|
|
let t = e;
|
|
const n = /* @__PURE__ */ new Set(), r = (o) => {
|
|
t = o(t), n.forEach((i) => i());
|
|
};
|
|
return {
|
|
getState: () => t,
|
|
subscribe: (o) => (n.add(o), () => {
|
|
r(() => e), n.delete(o);
|
|
}),
|
|
/**
|
|
* Delete a toast record at its position
|
|
*/
|
|
removeToast: (o, i) => {
|
|
r((s) => ({
|
|
...s,
|
|
// id may be string or number
|
|
// eslint-disable-next-line eqeqeq
|
|
[i]: s[i].filter((a) => a.id != o)
|
|
}));
|
|
},
|
|
notify: (o, i) => {
|
|
const s = dI(o, i), { position: a, id: l } = s;
|
|
return r((u) => {
|
|
const d = a.includes("top") ? [s, ...u[a] ?? []] : [...u[a] ?? [], s];
|
|
return {
|
|
...u,
|
|
[a]: d
|
|
};
|
|
}), l;
|
|
},
|
|
update: (o, i) => {
|
|
o && r((s) => {
|
|
const a = { ...s }, { position: l, index: u } = Fy(a, o);
|
|
return l && u !== -1 && (a[l][u] = {
|
|
...a[l][u],
|
|
...i,
|
|
message: lI(i)
|
|
}), a;
|
|
});
|
|
},
|
|
closeAll: ({ positions: o } = {}) => {
|
|
r((i) => (o ?? [
|
|
"bottom",
|
|
"bottom-right",
|
|
"bottom-left",
|
|
"top",
|
|
"top-left",
|
|
"top-right"
|
|
]).reduce(
|
|
(l, u) => (l[u] = i[u].map((c) => ({
|
|
...c,
|
|
requestClose: !0
|
|
})), l),
|
|
{ ...i }
|
|
));
|
|
},
|
|
close: (o) => {
|
|
r((i) => {
|
|
const s = zb(i, o);
|
|
return s ? {
|
|
...i,
|
|
[s]: i[s].map((a) => a.id == o ? {
|
|
...a,
|
|
requestClose: !0
|
|
} : a)
|
|
} : i;
|
|
});
|
|
},
|
|
isActive: (o) => !!Fy(Bi.getState(), o).position
|
|
};
|
|
}
|
|
let Uy = 0;
|
|
function dI(e, t = {}) {
|
|
Uy += 1;
|
|
const n = t.id ?? Uy, r = t.position ?? "bottom";
|
|
return {
|
|
id: n,
|
|
message: e,
|
|
position: r,
|
|
duration: t.duration,
|
|
onCloseComplete: t.onCloseComplete,
|
|
onRequestRemove: () => Bi.removeToast(String(n), r),
|
|
status: t.status,
|
|
requestClose: !1,
|
|
containerStyle: t.containerStyle
|
|
};
|
|
}
|
|
const [Nb, fI] = jo({
|
|
strict: !1,
|
|
name: "PortalContext"
|
|
}), fp = "chakra-portal", hI = ".chakra-portal", pI = (e) => /* @__PURE__ */ M.jsx(
|
|
"div",
|
|
{
|
|
className: "chakra-portal-zIndex",
|
|
style: {
|
|
position: "absolute",
|
|
zIndex: e.zIndex,
|
|
top: 0,
|
|
left: 0,
|
|
right: 0
|
|
// NB: Don't add `bottom: 0`, it makes the entire app unusable
|
|
// @see https://github.com/chakra-ui/chakra-ui/issues/3201
|
|
},
|
|
children: e.children
|
|
}
|
|
), mI = (e) => {
|
|
const { appendToParentPortal: t, children: n } = e, [r, o] = C.useState(null), i = C.useRef(null), [, s] = C.useState({});
|
|
C.useEffect(() => s({}), []);
|
|
const a = fI(), l = kR();
|
|
Dd(() => {
|
|
if (!r)
|
|
return;
|
|
const c = r.ownerDocument, d = t ? a ?? c.body : c.body;
|
|
if (!d)
|
|
return;
|
|
i.current = c.createElement("div"), i.current.className = fp, d.appendChild(i.current), s({});
|
|
const f = i.current;
|
|
return () => {
|
|
d.contains(f) && d.removeChild(f);
|
|
};
|
|
}, [r]);
|
|
const u = l?.zIndex ? /* @__PURE__ */ M.jsx(pI, { zIndex: l?.zIndex, children: n }) : n;
|
|
return i.current ? mh.createPortal(
|
|
/* @__PURE__ */ M.jsx(Nb, { value: i.current, children: u }),
|
|
i.current
|
|
) : /* @__PURE__ */ M.jsx(
|
|
"span",
|
|
{
|
|
ref: (c) => {
|
|
c && o(c);
|
|
}
|
|
}
|
|
);
|
|
}, gI = (e) => {
|
|
const { children: t, containerRef: n, appendToParentPortal: r } = e, o = n.current, i = o ?? (typeof window < "u" ? document.body : void 0), s = C.useMemo(() => {
|
|
const l = o?.ownerDocument.createElement("div");
|
|
return l && (l.className = fp), l;
|
|
}, [o]), [, a] = C.useState({});
|
|
return Dd(() => a({}), []), Dd(() => {
|
|
if (!(!s || !i))
|
|
return i.appendChild(s), () => {
|
|
i.removeChild(s);
|
|
};
|
|
}, [s, i]), i && s ? mh.createPortal(
|
|
/* @__PURE__ */ M.jsx(Nb, { value: r ? s : null, children: t }),
|
|
s
|
|
) : null;
|
|
};
|
|
function xu(e) {
|
|
const t = {
|
|
appendToParentPortal: !0,
|
|
...e
|
|
}, { containerRef: n, ...r } = t;
|
|
return n ? /* @__PURE__ */ M.jsx(gI, { containerRef: n, ...r }) : /* @__PURE__ */ M.jsx(mI, { ...r });
|
|
}
|
|
xu.className = fp;
|
|
xu.selector = hI;
|
|
xu.displayName = "Portal";
|
|
const [yI] = jo({
|
|
name: "ToastOptionsContext",
|
|
strict: !1
|
|
}), vI = (e) => {
|
|
const t = C.useSyncExternalStore(
|
|
Bi.subscribe,
|
|
Bi.getState,
|
|
Bi.getState
|
|
), {
|
|
motionVariants: n,
|
|
component: r = Mb,
|
|
portalProps: o,
|
|
animatePresenceProps: i
|
|
} = e, a = Object.keys(t).map((l) => {
|
|
const u = t[l];
|
|
return /* @__PURE__ */ M.jsx(
|
|
"div",
|
|
{
|
|
role: "region",
|
|
"aria-live": "polite",
|
|
"aria-label": `Notifications-${l}`,
|
|
"aria-hidden": !u.length,
|
|
id: `chakra-toast-manager-${l}`,
|
|
style: _D(l),
|
|
children: /* @__PURE__ */ M.jsx(y4, { ...i, initial: !1, children: u.map((c) => /* @__PURE__ */ M.jsx(
|
|
r,
|
|
{
|
|
motionVariants: n,
|
|
...c
|
|
},
|
|
c.id
|
|
)) })
|
|
},
|
|
l
|
|
);
|
|
});
|
|
return /* @__PURE__ */ M.jsx(xu, { ...o, children: a });
|
|
}, SI = (e) => function({
|
|
children: n,
|
|
theme: r = e,
|
|
toastOptions: o,
|
|
...i
|
|
}) {
|
|
return /* @__PURE__ */ M.jsxs(CR, { theme: r, ...i, children: [
|
|
/* @__PURE__ */ M.jsx(yI, { value: o?.defaultOptions, children: n }),
|
|
/* @__PURE__ */ M.jsx(vI, { ...o })
|
|
] });
|
|
}, bI = SI(dA), Wb = Br(function(t, n) {
|
|
const r = bu("Badge", t), { className: o, ...i } = ql(t);
|
|
return /* @__PURE__ */ M.jsx(
|
|
zt.span,
|
|
{
|
|
ref: n,
|
|
className: Vr("chakra-badge", t.className),
|
|
...i,
|
|
__css: {
|
|
display: "inline-block",
|
|
whiteSpace: "nowrap",
|
|
verticalAlign: "middle",
|
|
...r
|
|
}
|
|
}
|
|
);
|
|
});
|
|
Wb.displayName = "Badge";
|
|
const Ml = /* @__PURE__ */ new WeakMap(), xI = ({ children: e, ...t }) => /* @__PURE__ */ M.jsx(
|
|
Wb,
|
|
{
|
|
fontSize: "sm",
|
|
colorScheme: "teal",
|
|
variant: "subtle",
|
|
px: 3,
|
|
py: 2,
|
|
borderRadius: "lg",
|
|
whiteSpace: "nowrap",
|
|
textOverflow: "ellipsis",
|
|
textTransform: "none",
|
|
...t,
|
|
children: e
|
|
}
|
|
);
|
|
function kI(e, t) {
|
|
let n = Ml.get(e);
|
|
n || (n = r1(e), Ml.set(e, n)), n.render(
|
|
/* @__PURE__ */ M.jsx(bI, { children: /* @__PURE__ */ M.jsx(xI, { ...t }) })
|
|
);
|
|
}
|
|
function CI(e) {
|
|
const t = Ml.get(e);
|
|
t && (t.unmount(), Ml.delete(e));
|
|
}
|
|
export {
|
|
kI as mount,
|
|
CI as unmount
|
|
};
|