react-big-nepali-calendar
Version:
The Nepali Calendar Package is a lightweight and easy-to-use library that allows users to view the Nepali (Bikram Sambat) calendar and explore events on specific dates. Designed for developers and applications that require localized date management.
1,496 lines (1,488 loc) • 275 kB
JavaScript
import * as l from "react";
import ke, { useState as yt, forwardRef as Oo, createElement as Mt, useLayoutEffect as Do, useEffect as Mo } from "react";
import * as fn from "react-dom";
import Ms from "react-dom";
function js(e) {
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
}
var Wt = { exports: {} }, Pt = {};
/**
* @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 Vr;
function ks() {
if (Vr) return Pt;
Vr = 1;
var e = ke, t = Symbol.for("react.element"), n = Symbol.for("react.fragment"), r = Object.prototype.hasOwnProperty, o = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, a = { key: !0, ref: !0, __self: !0, __source: !0 };
function s(i, c, u) {
var f, m = {}, v = null, y = null;
u !== void 0 && (v = "" + u), c.key !== void 0 && (v = "" + c.key), c.ref !== void 0 && (y = c.ref);
for (f in c) r.call(c, f) && !a.hasOwnProperty(f) && (m[f] = c[f]);
if (i && i.defaultProps) for (f in c = i.defaultProps, c) m[f] === void 0 && (m[f] = c[f]);
return { $$typeof: t, type: i, key: v, ref: y, props: m, _owner: o.current };
}
return Pt.Fragment = n, Pt.jsx = s, Pt.jsxs = s, Pt;
}
var Tt = {};
/**
* @license React
* react-jsx-runtime.development.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 zr;
function _s() {
return zr || (zr = 1, process.env.NODE_ENV !== "production" && function() {
var e = ke, t = Symbol.for("react.element"), n = Symbol.for("react.portal"), r = Symbol.for("react.fragment"), o = Symbol.for("react.strict_mode"), a = Symbol.for("react.profiler"), s = Symbol.for("react.provider"), i = Symbol.for("react.context"), c = Symbol.for("react.forward_ref"), u = Symbol.for("react.suspense"), f = Symbol.for("react.suspense_list"), m = Symbol.for("react.memo"), v = Symbol.for("react.lazy"), y = Symbol.for("react.offscreen"), w = Symbol.iterator, d = "@@iterator";
function g(h) {
if (h === null || typeof h != "object")
return null;
var N = w && h[w] || h[d];
return typeof N == "function" ? N : null;
}
var x = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
function b(h) {
{
for (var N = arguments.length, j = new Array(N > 1 ? N - 1 : 0), Y = 1; Y < N; Y++)
j[Y - 1] = arguments[Y];
S("error", h, j);
}
}
function S(h, N, j) {
{
var Y = x.ReactDebugCurrentFrame, Q = Y.getStackAddendum();
Q !== "" && (N += "%s", j = j.concat([Q]));
var ae = j.map(function(Z) {
return String(Z);
});
ae.unshift("Warning: " + N), Function.prototype.apply.call(console[h], console, ae);
}
}
var R = !1, P = !1, k = !1, A = !1, F = !1, V;
V = Symbol.for("react.module.reference");
function $(h) {
return !!(typeof h == "string" || typeof h == "function" || h === r || h === a || F || h === o || h === u || h === f || A || h === y || R || P || k || typeof h == "object" && h !== null && (h.$$typeof === v || h.$$typeof === m || h.$$typeof === s || h.$$typeof === i || h.$$typeof === c || // This needs to include all possible module reference object
// types supported by any Flight configuration anywhere since
// we don't know which Flight build this will end up being used
// with.
h.$$typeof === V || h.getModuleId !== void 0));
}
function I(h, N, j) {
var Y = h.displayName;
if (Y)
return Y;
var Q = N.displayName || N.name || "";
return Q !== "" ? j + "(" + Q + ")" : j;
}
function L(h) {
return h.displayName || "Context";
}
function H(h) {
if (h == null)
return null;
if (typeof h.tag == "number" && b("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof h == "function")
return h.displayName || h.name || null;
if (typeof h == "string")
return h;
switch (h) {
case r:
return "Fragment";
case n:
return "Portal";
case a:
return "Profiler";
case o:
return "StrictMode";
case u:
return "Suspense";
case f:
return "SuspenseList";
}
if (typeof h == "object")
switch (h.$$typeof) {
case i:
var N = h;
return L(N) + ".Consumer";
case s:
var j = h;
return L(j._context) + ".Provider";
case c:
return I(h, h.render, "ForwardRef");
case m:
var Y = h.displayName || null;
return Y !== null ? Y : H(h.type) || "Memo";
case v: {
var Q = h, ae = Q._payload, Z = Q._init;
try {
return H(Z(ae));
} catch {
return null;
}
}
}
return null;
}
var O = Object.assign, T = 0, E, D, C, M, _, B, J;
function re() {
}
re.__reactDisabledLog = !0;
function oe() {
{
if (T === 0) {
E = console.log, D = console.info, C = console.warn, M = console.error, _ = console.group, B = console.groupCollapsed, J = console.groupEnd;
var h = {
configurable: !0,
enumerable: !0,
value: re,
writable: !0
};
Object.defineProperties(console, {
info: h,
log: h,
warn: h,
error: h,
group: h,
groupCollapsed: h,
groupEnd: h
});
}
T++;
}
}
function le() {
{
if (T--, T === 0) {
var h = {
configurable: !0,
enumerable: !0,
writable: !0
};
Object.defineProperties(console, {
log: O({}, h, {
value: E
}),
info: O({}, h, {
value: D
}),
warn: O({}, h, {
value: C
}),
error: O({}, h, {
value: M
}),
group: O({}, h, {
value: _
}),
groupCollapsed: O({}, h, {
value: B
}),
groupEnd: O({}, h, {
value: J
})
});
}
T < 0 && b("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
}
}
var pe = x.ReactCurrentDispatcher, W;
function X(h, N, j) {
{
if (W === void 0)
try {
throw Error();
} catch (Q) {
var Y = Q.stack.trim().match(/\n( *(at )?)/);
W = Y && Y[1] || "";
}
return `
` + W + h;
}
}
var ee = !1, z;
{
var G = typeof WeakMap == "function" ? WeakMap : Map;
z = new G();
}
function K(h, N) {
if (!h || ee)
return "";
{
var j = z.get(h);
if (j !== void 0)
return j;
}
var Y;
ee = !0;
var Q = Error.prepareStackTrace;
Error.prepareStackTrace = void 0;
var ae;
ae = pe.current, pe.current = null, oe();
try {
if (N) {
var Z = function() {
throw Error();
};
if (Object.defineProperty(Z.prototype, "props", {
set: function() {
throw Error();
}
}), typeof Reflect == "object" && Reflect.construct) {
try {
Reflect.construct(Z, []);
} catch (ve) {
Y = ve;
}
Reflect.construct(h, [], Z);
} else {
try {
Z.call();
} catch (ve) {
Y = ve;
}
h.call(Z.prototype);
}
} else {
try {
throw Error();
} catch (ve) {
Y = ve;
}
h();
}
} catch (ve) {
if (ve && Y && typeof ve.stack == "string") {
for (var q = ve.stack.split(`
`), me = Y.stack.split(`
`), ue = q.length - 1, fe = me.length - 1; ue >= 1 && fe >= 0 && q[ue] !== me[fe]; )
fe--;
for (; ue >= 1 && fe >= 0; ue--, fe--)
if (q[ue] !== me[fe]) {
if (ue !== 1 || fe !== 1)
do
if (ue--, fe--, fe < 0 || q[ue] !== me[fe]) {
var we = `
` + q[ue].replace(" at new ", " at ");
return h.displayName && we.includes("<anonymous>") && (we = we.replace("<anonymous>", h.displayName)), typeof h == "function" && z.set(h, we), we;
}
while (ue >= 1 && fe >= 0);
break;
}
}
} finally {
ee = !1, pe.current = ae, le(), Error.prepareStackTrace = Q;
}
var at = h ? h.displayName || h.name : "", Xe = at ? X(at) : "";
return typeof h == "function" && z.set(h, Xe), Xe;
}
function de(h, N, j) {
return K(h, !1);
}
function xe(h) {
var N = h.prototype;
return !!(N && N.isReactComponent);
}
function Ne(h, N, j) {
if (h == null)
return "";
if (typeof h == "function")
return K(h, xe(h));
if (typeof h == "string")
return X(h);
switch (h) {
case u:
return X("Suspense");
case f:
return X("SuspenseList");
}
if (typeof h == "object")
switch (h.$$typeof) {
case c:
return de(h.render);
case m:
return Ne(h.type, N, j);
case v: {
var Y = h, Q = Y._payload, ae = Y._init;
try {
return Ne(ae(Q), N, j);
} catch {
}
}
}
return "";
}
var Se = Object.prototype.hasOwnProperty, Fe = {}, Ft = x.ReactDebugCurrentFrame;
function Me(h) {
if (h) {
var N = h._owner, j = Ne(h.type, h._source, N ? N.type : null);
Ft.setExtraStackFrame(j);
} else
Ft.setExtraStackFrame(null);
}
function us(h, N, j, Y, Q) {
{
var ae = Function.call.bind(Se);
for (var Z in h)
if (ae(h, Z)) {
var q = void 0;
try {
if (typeof h[Z] != "function") {
var me = Error((Y || "React class") + ": " + j + " type `" + Z + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof h[Z] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
throw me.name = "Invariant Violation", me;
}
q = h[Z](N, Z, Y, j, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
} catch (ue) {
q = ue;
}
q && !(q instanceof Error) && (Me(Q), b("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", Y || "React class", j, Z, typeof q), Me(null)), q instanceof Error && !(q.message in Fe) && (Fe[q.message] = !0, Me(Q), b("Failed %s type: %s", j, q.message), Me(null));
}
}
}
var ds = Array.isArray;
function En(h) {
return ds(h);
}
function fs(h) {
{
var N = typeof Symbol == "function" && Symbol.toStringTag, j = N && h[Symbol.toStringTag] || h.constructor.name || "Object";
return j;
}
}
function ps(h) {
try {
return Dr(h), !1;
} catch {
return !0;
}
}
function Dr(h) {
return "" + h;
}
function Mr(h) {
if (ps(h))
return b("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", fs(h)), Dr(h);
}
var Rt = x.ReactCurrentOwner, hs = {
key: !0,
ref: !0,
__self: !0,
__source: !0
}, jr, kr, Rn;
Rn = {};
function ms(h) {
if (Se.call(h, "ref")) {
var N = Object.getOwnPropertyDescriptor(h, "ref").get;
if (N && N.isReactWarning)
return !1;
}
return h.ref !== void 0;
}
function gs(h) {
if (Se.call(h, "key")) {
var N = Object.getOwnPropertyDescriptor(h, "key").get;
if (N && N.isReactWarning)
return !1;
}
return h.key !== void 0;
}
function vs(h, N) {
if (typeof h.ref == "string" && Rt.current && N && Rt.current.stateNode !== N) {
var j = H(Rt.current.type);
Rn[j] || (b('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', H(Rt.current.type), h.ref), Rn[j] = !0);
}
}
function ys(h, N) {
{
var j = function() {
jr || (jr = !0, b("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", N));
};
j.isReactWarning = !0, Object.defineProperty(h, "key", {
get: j,
configurable: !0
});
}
}
function bs(h, N) {
{
var j = function() {
kr || (kr = !0, b("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", N));
};
j.isReactWarning = !0, Object.defineProperty(h, "ref", {
get: j,
configurable: !0
});
}
}
var xs = function(h, N, j, Y, Q, ae, Z) {
var q = {
// This tag allows us to uniquely identify this as a React Element
$$typeof: t,
// Built-in properties that belong on the element
type: h,
key: N,
ref: j,
props: Z,
// Record the component responsible for creating this element.
_owner: ae
};
return q._store = {}, Object.defineProperty(q._store, "validated", {
configurable: !1,
enumerable: !1,
writable: !0,
value: !1
}), Object.defineProperty(q, "_self", {
configurable: !1,
enumerable: !1,
writable: !1,
value: Y
}), Object.defineProperty(q, "_source", {
configurable: !1,
enumerable: !1,
writable: !1,
value: Q
}), Object.freeze && (Object.freeze(q.props), Object.freeze(q)), q;
};
function ws(h, N, j, Y, Q) {
{
var ae, Z = {}, q = null, me = null;
j !== void 0 && (Mr(j), q = "" + j), gs(N) && (Mr(N.key), q = "" + N.key), ms(N) && (me = N.ref, vs(N, Q));
for (ae in N)
Se.call(N, ae) && !hs.hasOwnProperty(ae) && (Z[ae] = N[ae]);
if (h && h.defaultProps) {
var ue = h.defaultProps;
for (ae in ue)
Z[ae] === void 0 && (Z[ae] = ue[ae]);
}
if (q || me) {
var fe = typeof h == "function" ? h.displayName || h.name || "Unknown" : h;
q && ys(Z, fe), me && bs(Z, fe);
}
return xs(h, q, me, Q, Y, Rt.current, Z);
}
}
var Pn = x.ReactCurrentOwner, _r = x.ReactDebugCurrentFrame;
function ot(h) {
if (h) {
var N = h._owner, j = Ne(h.type, h._source, N ? N.type : null);
_r.setExtraStackFrame(j);
} else
_r.setExtraStackFrame(null);
}
var Tn;
Tn = !1;
function Nn(h) {
return typeof h == "object" && h !== null && h.$$typeof === t;
}
function Ir() {
{
if (Pn.current) {
var h = H(Pn.current.type);
if (h)
return `
Check the render method of \`` + h + "`.";
}
return "";
}
}
function Ss(h) {
return "";
}
var $r = {};
function Cs(h) {
{
var N = Ir();
if (!N) {
var j = typeof h == "string" ? h : h.displayName || h.name;
j && (N = `
Check the top-level render call using <` + j + ">.");
}
return N;
}
}
function Lr(h, N) {
{
if (!h._store || h._store.validated || h.key != null)
return;
h._store.validated = !0;
var j = Cs(N);
if ($r[j])
return;
$r[j] = !0;
var Y = "";
h && h._owner && h._owner !== Pn.current && (Y = " It was passed a child from " + H(h._owner.type) + "."), ot(h), b('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', j, Y), ot(null);
}
}
function Fr(h, N) {
{
if (typeof h != "object")
return;
if (En(h))
for (var j = 0; j < h.length; j++) {
var Y = h[j];
Nn(Y) && Lr(Y, N);
}
else if (Nn(h))
h._store && (h._store.validated = !0);
else if (h) {
var Q = g(h);
if (typeof Q == "function" && Q !== h.entries)
for (var ae = Q.call(h), Z; !(Z = ae.next()).done; )
Nn(Z.value) && Lr(Z.value, N);
}
}
}
function Es(h) {
{
var N = h.type;
if (N == null || typeof N == "string")
return;
var j;
if (typeof N == "function")
j = N.propTypes;
else if (typeof N == "object" && (N.$$typeof === c || // Note: Memo only checks outer props here.
// Inner props are checked in the reconciler.
N.$$typeof === m))
j = N.propTypes;
else
return;
if (j) {
var Y = H(N);
us(j, h.props, "prop", Y, h);
} else if (N.PropTypes !== void 0 && !Tn) {
Tn = !0;
var Q = H(N);
b("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", Q || "Unknown");
}
typeof N.getDefaultProps == "function" && !N.getDefaultProps.isReactClassApproved && b("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
}
}
function Rs(h) {
{
for (var N = Object.keys(h.props), j = 0; j < N.length; j++) {
var Y = N[j];
if (Y !== "children" && Y !== "key") {
ot(h), b("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", Y), ot(null);
break;
}
}
h.ref !== null && (ot(h), b("Invalid attribute `ref` supplied to `React.Fragment`."), ot(null));
}
}
var Wr = {};
function Br(h, N, j, Y, Q, ae) {
{
var Z = $(h);
if (!Z) {
var q = "";
(h === void 0 || typeof h == "object" && h !== null && Object.keys(h).length === 0) && (q += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
var me = Ss();
me ? q += me : q += Ir();
var ue;
h === null ? ue = "null" : En(h) ? ue = "array" : h !== void 0 && h.$$typeof === t ? (ue = "<" + (H(h.type) || "Unknown") + " />", q = " Did you accidentally export a JSX literal instead of a component?") : ue = typeof h, b("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", ue, q);
}
var fe = ws(h, N, j, Q, ae);
if (fe == null)
return fe;
if (Z) {
var we = N.children;
if (we !== void 0)
if (Y)
if (En(we)) {
for (var at = 0; at < we.length; at++)
Fr(we[at], h);
Object.freeze && Object.freeze(we);
} else
b("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
else
Fr(we, h);
}
if (Se.call(N, "key")) {
var Xe = H(h), ve = Object.keys(N).filter(function(Ds) {
return Ds !== "key";
}), An = ve.length > 0 ? "{key: someKey, " + ve.join(": ..., ") + ": ...}" : "{key: someKey}";
if (!Wr[Xe + An]) {
var Os = ve.length > 0 ? "{" + ve.join(": ..., ") + ": ...}" : "{}";
b(`A props object containing a "key" prop is being spread into JSX:
let props = %s;
<%s {...props} />
React keys must be passed directly to JSX without using spread:
let props = %s;
<%s key={someKey} {...props} />`, An, Xe, Os, Xe), Wr[Xe + An] = !0;
}
}
return h === r ? Rs(fe) : Es(fe), fe;
}
}
function Ps(h, N, j) {
return Br(h, N, j, !0);
}
function Ts(h, N, j) {
return Br(h, N, j, !1);
}
var Ns = Ts, As = Ps;
Tt.Fragment = r, Tt.jsx = Ns, Tt.jsxs = As;
}()), Tt;
}
var Yr;
function Is() {
return Yr || (Yr = 1, process.env.NODE_ENV === "production" ? Wt.exports = ks() : Wt.exports = _s()), Wt.exports;
}
var p = Is();
function te(e, t, { checkForDefaultPrevented: n = !0 } = {}) {
return function(o) {
if (e == null || e(o), n === !1 || !o.defaultPrevented)
return t == null ? void 0 : t(o);
};
}
function Hr(e, t) {
if (typeof e == "function")
return e(t);
e != null && (e.current = t);
}
function jo(...e) {
return (t) => {
let n = !1;
const r = e.map((o) => {
const a = Hr(o, t);
return !n && typeof a == "function" && (n = !0), a;
});
if (n)
return () => {
for (let o = 0; o < r.length; o++) {
const a = r[o];
typeof a == "function" ? a() : Hr(e[o], null);
}
};
};
}
function ce(...e) {
return l.useCallback(jo(...e), e);
}
function $s(e, t) {
const n = l.createContext(t), r = (a) => {
const { children: s, ...i } = a, c = l.useMemo(() => i, Object.values(i));
return /* @__PURE__ */ p.jsx(n.Provider, { value: c, children: s });
};
r.displayName = e + "Provider";
function o(a) {
const s = l.useContext(n);
if (s) return s;
if (t !== void 0) return t;
throw new Error(`\`${a}\` must be used within \`${e}\``);
}
return [r, o];
}
function pn(e, t = []) {
let n = [];
function r(a, s) {
const i = l.createContext(s), c = n.length;
n = [...n, s];
const u = (m) => {
var x;
const { scope: v, children: y, ...w } = m, d = ((x = v == null ? void 0 : v[e]) == null ? void 0 : x[c]) || i, g = l.useMemo(() => w, Object.values(w));
return /* @__PURE__ */ p.jsx(d.Provider, { value: g, children: y });
};
u.displayName = a + "Provider";
function f(m, v) {
var d;
const y = ((d = v == null ? void 0 : v[e]) == null ? void 0 : d[c]) || i, w = l.useContext(y);
if (w) return w;
if (s !== void 0) return s;
throw new Error(`\`${m}\` must be used within \`${a}\``);
}
return [u, f];
}
const o = () => {
const a = n.map((s) => l.createContext(s));
return function(i) {
const c = (i == null ? void 0 : i[e]) || a;
return l.useMemo(
() => ({ [`__scope${e}`]: { ...i, [e]: c } }),
[i, c]
);
};
};
return o.scopeName = e, [r, Ls(o, ...t)];
}
function Ls(...e) {
const t = e[0];
if (e.length === 1) return t;
const n = () => {
const r = e.map((o) => ({
useScope: o(),
scopeName: o.scopeName
}));
return function(a) {
const s = r.reduce((i, { useScope: c, scopeName: u }) => {
const m = c(a)[`__scope${u}`];
return { ...i, ...m };
}, {});
return l.useMemo(() => ({ [`__scope${t.scopeName}`]: s }), [s]);
};
};
return n.scopeName = t.scopeName, n;
}
var ge = globalThis != null && globalThis.document ? l.useLayoutEffect : () => {
}, Fs = l.useId || (() => {
}), Ws = 0;
function ft(e) {
const [t, n] = l.useState(Fs());
return ge(() => {
n((r) => r ?? String(Ws++));
}, [e]), t ? `radix-${t}` : "";
}
function Ee(e) {
const t = l.useRef(e);
return l.useEffect(() => {
t.current = e;
}), l.useMemo(() => (...n) => {
var r;
return (r = t.current) == null ? void 0 : r.call(t, ...n);
}, []);
}
function Un({
prop: e,
defaultProp: t,
onChange: n = () => {
}
}) {
const [r, o] = Bs({ defaultProp: t, onChange: n }), a = e !== void 0, s = a ? e : r, i = Ee(n), c = l.useCallback(
(u) => {
if (a) {
const m = typeof u == "function" ? u(e) : u;
m !== e && i(m);
} else
o(u);
},
[a, e, o, i]
);
return [s, c];
}
function Bs({
defaultProp: e,
onChange: t
}) {
const n = l.useState(e), [r] = n, o = l.useRef(r), a = Ee(t);
return l.useEffect(() => {
o.current !== r && (a(r), o.current = r);
}, [r, o, a]), n;
}
var et = l.forwardRef((e, t) => {
const { children: n, ...r } = e, o = l.Children.toArray(n), a = o.find(zs);
if (a) {
const s = a.props.children, i = o.map((c) => c === a ? l.Children.count(s) > 1 ? l.Children.only(null) : l.isValidElement(s) ? s.props.children : null : c);
return /* @__PURE__ */ p.jsx(Gn, { ...r, ref: t, children: l.isValidElement(s) ? l.cloneElement(s, void 0, i) : null });
}
return /* @__PURE__ */ p.jsx(Gn, { ...r, ref: t, children: n });
});
et.displayName = "Slot";
var Gn = l.forwardRef((e, t) => {
const { children: n, ...r } = e;
if (l.isValidElement(n)) {
const o = Hs(n);
return l.cloneElement(n, {
...Ys(r, n.props),
// @ts-ignore
ref: t ? jo(t, o) : o
});
}
return l.Children.count(n) > 1 ? l.Children.only(null) : null;
});
Gn.displayName = "SlotClone";
var Vs = ({ children: e }) => /* @__PURE__ */ p.jsx(p.Fragment, { children: e });
function zs(e) {
return l.isValidElement(e) && e.type === Vs;
}
function Ys(e, t) {
const n = { ...t };
for (const r in t) {
const o = e[r], a = t[r];
/^on[A-Z]/.test(r) ? o && a ? n[r] = (...i) => {
a(...i), o(...i);
} : o && (n[r] = o) : r === "style" ? n[r] = { ...o, ...a } : r === "className" && (n[r] = [o, a].filter(Boolean).join(" "));
}
return { ...e, ...n };
}
function Hs(e) {
var r, o;
let t = (r = Object.getOwnPropertyDescriptor(e.props, "ref")) == null ? void 0 : r.get, n = t && "isReactWarning" in t && t.isReactWarning;
return n ? e.ref : (t = (o = Object.getOwnPropertyDescriptor(e, "ref")) == null ? void 0 : o.get, n = t && "isReactWarning" in t && t.isReactWarning, n ? e.props.ref : e.props.ref || e.ref);
}
var Us = [
"a",
"button",
"div",
"form",
"h2",
"h3",
"img",
"input",
"label",
"li",
"nav",
"ol",
"p",
"span",
"svg",
"ul"
], ne = Us.reduce((e, t) => {
const n = l.forwardRef((r, o) => {
const { asChild: a, ...s } = r, i = a ? et : t;
return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ p.jsx(i, { ...s, ref: o });
});
return n.displayName = `Primitive.${t}`, { ...e, [t]: n };
}, {});
function ko(e, t) {
e && fn.flushSync(() => e.dispatchEvent(t));
}
function _o(e, t = globalThis == null ? void 0 : globalThis.document) {
const n = Ee(e);
l.useEffect(() => {
const r = (o) => {
o.key === "Escape" && n(o);
};
return t.addEventListener("keydown", r, { capture: !0 }), () => t.removeEventListener("keydown", r, { capture: !0 });
}, [n, t]);
}
var Gs = "DismissableLayer", Kn = "dismissableLayer.update", Ks = "dismissableLayer.pointerDownOutside", Xs = "dismissableLayer.focusOutside", Ur, Io = l.createContext({
layers: /* @__PURE__ */ new Set(),
layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),
branches: /* @__PURE__ */ new Set()
}), $o = l.forwardRef(
(e, t) => {
const {
disableOutsidePointerEvents: n = !1,
onEscapeKeyDown: r,
onPointerDownOutside: o,
onFocusOutside: a,
onInteractOutside: s,
onDismiss: i,
...c
} = e, u = l.useContext(Io), [f, m] = l.useState(null), v = (f == null ? void 0 : f.ownerDocument) ?? (globalThis == null ? void 0 : globalThis.document), [, y] = l.useState({}), w = ce(t, (A) => m(A)), d = Array.from(u.layers), [g] = [...u.layersWithOutsidePointerEventsDisabled].slice(-1), x = d.indexOf(g), b = f ? d.indexOf(f) : -1, S = u.layersWithOutsidePointerEventsDisabled.size > 0, R = b >= x, P = Js((A) => {
const F = A.target, V = [...u.branches].some(($) => $.contains(F));
!R || V || (o == null || o(A), s == null || s(A), A.defaultPrevented || i == null || i());
}, v), k = Qs((A) => {
const F = A.target;
[...u.branches].some(($) => $.contains(F)) || (a == null || a(A), s == null || s(A), A.defaultPrevented || i == null || i());
}, v);
return _o((A) => {
b === u.layers.size - 1 && (r == null || r(A), !A.defaultPrevented && i && (A.preventDefault(), i()));
}, v), l.useEffect(() => {
if (f)
return n && (u.layersWithOutsidePointerEventsDisabled.size === 0 && (Ur = v.body.style.pointerEvents, v.body.style.pointerEvents = "none"), u.layersWithOutsidePointerEventsDisabled.add(f)), u.layers.add(f), Gr(), () => {
n && u.layersWithOutsidePointerEventsDisabled.size === 1 && (v.body.style.pointerEvents = Ur);
};
}, [f, v, n, u]), l.useEffect(() => () => {
f && (u.layers.delete(f), u.layersWithOutsidePointerEventsDisabled.delete(f), Gr());
}, [f, u]), l.useEffect(() => {
const A = () => y({});
return document.addEventListener(Kn, A), () => document.removeEventListener(Kn, A);
}, []), /* @__PURE__ */ p.jsx(
ne.div,
{
...c,
ref: w,
style: {
pointerEvents: S ? R ? "auto" : "none" : void 0,
...e.style
},
onFocusCapture: te(e.onFocusCapture, k.onFocusCapture),
onBlurCapture: te(e.onBlurCapture, k.onBlurCapture),
onPointerDownCapture: te(
e.onPointerDownCapture,
P.onPointerDownCapture
)
}
);
}
);
$o.displayName = Gs;
var qs = "DismissableLayerBranch", Zs = l.forwardRef((e, t) => {
const n = l.useContext(Io), r = l.useRef(null), o = ce(t, r);
return l.useEffect(() => {
const a = r.current;
if (a)
return n.branches.add(a), () => {
n.branches.delete(a);
};
}, [n.branches]), /* @__PURE__ */ p.jsx(ne.div, { ...e, ref: o });
});
Zs.displayName = qs;
function Js(e, t = globalThis == null ? void 0 : globalThis.document) {
const n = Ee(e), r = l.useRef(!1), o = l.useRef(() => {
});
return l.useEffect(() => {
const a = (i) => {
if (i.target && !r.current) {
let c = function() {
Lo(
Ks,
n,
u,
{ discrete: !0 }
);
};
const u = { originalEvent: i };
i.pointerType === "touch" ? (t.removeEventListener("click", o.current), o.current = c, t.addEventListener("click", o.current, { once: !0 })) : c();
} else
t.removeEventListener("click", o.current);
r.current = !1;
}, s = window.setTimeout(() => {
t.addEventListener("pointerdown", a);
}, 0);
return () => {
window.clearTimeout(s), t.removeEventListener("pointerdown", a), t.removeEventListener("click", o.current);
};
}, [t, n]), {
// ensures we check React component tree (not just DOM tree)
onPointerDownCapture: () => r.current = !0
};
}
function Qs(e, t = globalThis == null ? void 0 : globalThis.document) {
const n = Ee(e), r = l.useRef(!1);
return l.useEffect(() => {
const o = (a) => {
a.target && !r.current && Lo(Xs, n, { originalEvent: a }, {
discrete: !1
});
};
return t.addEventListener("focusin", o), () => t.removeEventListener("focusin", o);
}, [t, n]), {
onFocusCapture: () => r.current = !0,
onBlurCapture: () => r.current = !1
};
}
function Gr() {
const e = new CustomEvent(Kn);
document.dispatchEvent(e);
}
function Lo(e, t, n, { discrete: r }) {
const o = n.originalEvent.target, a = new CustomEvent(e, { bubbles: !1, cancelable: !0, detail: n });
t && o.addEventListener(e, t, { once: !0 }), r ? ko(o, a) : o.dispatchEvent(a);
}
var On = "focusScope.autoFocusOnMount", Dn = "focusScope.autoFocusOnUnmount", Kr = { bubbles: !1, cancelable: !0 }, ec = "FocusScope", dr = l.forwardRef((e, t) => {
const {
loop: n = !1,
trapped: r = !1,
onMountAutoFocus: o,
onUnmountAutoFocus: a,
...s
} = e, [i, c] = l.useState(null), u = Ee(o), f = Ee(a), m = l.useRef(null), v = ce(t, (d) => c(d)), y = l.useRef({
paused: !1,
pause() {
this.paused = !0;
},
resume() {
this.paused = !1;
}
}).current;
l.useEffect(() => {
if (r) {
let d = function(S) {
if (y.paused || !i) return;
const R = S.target;
i.contains(R) ? m.current = R : ze(m.current, { select: !0 });
}, g = function(S) {
if (y.paused || !i) return;
const R = S.relatedTarget;
R !== null && (i.contains(R) || ze(m.current, { select: !0 }));
}, x = function(S) {
if (document.activeElement === document.body)
for (const P of S)
P.removedNodes.length > 0 && ze(i);
};
document.addEventListener("focusin", d), document.addEventListener("focusout", g);
const b = new MutationObserver(x);
return i && b.observe(i, { childList: !0, subtree: !0 }), () => {
document.removeEventListener("focusin", d), document.removeEventListener("focusout", g), b.disconnect();
};
}
}, [r, i, y.paused]), l.useEffect(() => {
if (i) {
qr.add(y);
const d = document.activeElement;
if (!i.contains(d)) {
const x = new CustomEvent(On, Kr);
i.addEventListener(On, u), i.dispatchEvent(x), x.defaultPrevented || (tc(ic(Fo(i)), { select: !0 }), document.activeElement === d && ze(i));
}
return () => {
i.removeEventListener(On, u), setTimeout(() => {
const x = new CustomEvent(Dn, Kr);
i.addEventListener(Dn, f), i.dispatchEvent(x), x.defaultPrevented || ze(d ?? document.body, { select: !0 }), i.removeEventListener(Dn, f), qr.remove(y);
}, 0);
};
}
}, [i, u, f, y]);
const w = l.useCallback(
(d) => {
if (!n && !r || y.paused) return;
const g = d.key === "Tab" && !d.altKey && !d.ctrlKey && !d.metaKey, x = document.activeElement;
if (g && x) {
const b = d.currentTarget, [S, R] = nc(b);
S && R ? !d.shiftKey && x === R ? (d.preventDefault(), n && ze(S, { select: !0 })) : d.shiftKey && x === S && (d.preventDefault(), n && ze(R, { select: !0 })) : x === b && d.preventDefault();
}
},
[n, r, y.paused]
);
return /* @__PURE__ */ p.jsx(ne.div, { tabIndex: -1, ...s, ref: v, onKeyDown: w });
});
dr.displayName = ec;
function tc(e, { select: t = !1 } = {}) {
const n = document.activeElement;
for (const r of e)
if (ze(r, { select: t }), document.activeElement !== n) return;
}
function nc(e) {
const t = Fo(e), n = Xr(t, e), r = Xr(t.reverse(), e);
return [n, r];
}
function Fo(e) {
const t = [], n = document.createTreeWalker(e, NodeFilter.SHOW_ELEMENT, {
acceptNode: (r) => {
const o = r.tagName === "INPUT" && r.type === "hidden";
return r.disabled || r.hidden || o ? NodeFilter.FILTER_SKIP : r.tabIndex >= 0 ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
}
});
for (; n.nextNode(); ) t.push(n.currentNode);
return t;
}
function Xr(e, t) {
for (const n of e)
if (!rc(n, { upTo: t })) return n;
}
function rc(e, { upTo: t }) {
if (getComputedStyle(e).visibility === "hidden") return !0;
for (; e; ) {
if (t !== void 0 && e === t) return !1;
if (getComputedStyle(e).display === "none") return !0;
e = e.parentElement;
}
return !1;
}
function oc(e) {
return e instanceof HTMLInputElement && "select" in e;
}
function ze(e, { select: t = !1 } = {}) {
if (e && e.focus) {
const n = document.activeElement;
e.focus({ preventScroll: !0 }), e !== n && oc(e) && t && e.select();
}
}
var qr = ac();
function ac() {
let e = [];
return {
add(t) {
const n = e[0];
t !== n && (n == null || n.pause()), e = Zr(e, t), e.unshift(t);
},
remove(t) {
var n;
e = Zr(e, t), (n = e[0]) == null || n.resume();
}
};
}
function Zr(e, t) {
const n = [...e], r = n.indexOf(t);
return r !== -1 && n.splice(r, 1), n;
}
function ic(e) {
return e.filter((t) => t.tagName !== "A");
}
var sc = "Portal", fr = l.forwardRef((e, t) => {
var i;
const { container: n, ...r } = e, [o, a] = l.useState(!1);
ge(() => a(!0), []);
const s = n || o && ((i = globalThis == null ? void 0 : globalThis.document) == null ? void 0 : i.body);
return s ? Ms.createPortal(/* @__PURE__ */ p.jsx(ne.div, { ...r, ref: t }), s) : null;
});
fr.displayName = sc;
function cc(e, t) {
return l.useReducer((n, r) => t[n][r] ?? n, e);
}
var hn = (e) => {
const { present: t, children: n } = e, r = lc(t), o = typeof n == "function" ? n({ present: r.isPresent }) : l.Children.only(n), a = ce(r.ref, uc(o));
return typeof n == "function" || r.isPresent ? l.cloneElement(o, { ref: a }) : null;
};
hn.displayName = "Presence";
function lc(e) {
const [t, n] = l.useState(), r = l.useRef({}), o = l.useRef(e), a = l.useRef("none"), s = e ? "mounted" : "unmounted", [i, c] = cc(s, {
mounted: {
UNMOUNT: "unmounted",
ANIMATION_OUT: "unmountSuspended"
},
unmountSuspended: {
MOUNT: "mounted",
ANIMATION_END: "unmounted"
},
unmounted: {
MOUNT: "mounted"
}
});
return l.useEffect(() => {
const u = Bt(r.current);
a.current = i === "mounted" ? u : "none";
}, [i]), ge(() => {
const u = r.current, f = o.current;
if (f !== e) {
const v = a.current, y = Bt(u);
e ? c("MOUNT") : y === "none" || (u == null ? void 0 : u.display) === "none" ? c("UNMOUNT") : c(f && v !== y ? "ANIMATION_OUT" : "UNMOUNT"), o.current = e;
}
}, [e, c]), ge(() => {
if (t) {
let u;
const f = t.ownerDocument.defaultView ?? window, m = (y) => {
const d = Bt(r.current).includes(y.animationName);
if (y.target === t && d && (c("ANIMATION_END"), !o.current)) {
const g = t.style.animationFillMode;
t.style.animationFillMode = "forwards", u = f.setTimeout(() => {
t.style.animationFillMode === "forwards" && (t.style.animationFillMode = g);
});
}
}, v = (y) => {
y.target === t && (a.current = Bt(r.current));
};
return t.addEventListener("animationstart", v), t.addEventListener("animationcancel", m), t.addEventListener("animationend", m), () => {
f.clearTimeout(u), t.removeEventListener("animationstart", v), t.removeEventListener("animationcancel", m), t.removeEventListener("animationend", m);
};
} else
c("ANIMATION_END");
}, [t, c]), {
isPresent: ["mounted", "unmountSuspended"].includes(i),
ref: l.useCallback((u) => {
u && (r.current = getComputedStyle(u)), n(u);
}, [])
};
}
function Bt(e) {
return (e == null ? void 0 : e.animationName) || "none";
}
function uc(e) {
var r, o;
let t = (r = Object.getOwnPropertyDescriptor(e.props, "ref")) == null ? void 0 : r.get, n = t && "isReactWarning" in t && t.isReactWarning;
return n ? e.ref : (t = (o = Object.getOwnPropertyDescriptor(e, "ref")) == null ? void 0 : o.get, n = t && "isReactWarning" in t && t.isReactWarning, n ? e.props.ref : e.props.ref || e.ref);
}
var Mn = 0;
function Wo() {
l.useEffect(() => {
const e = document.querySelectorAll("[data-radix-focus-guard]");
return document.body.insertAdjacentElement("afterbegin", e[0] ?? Jr()), document.body.insertAdjacentElement("beforeend", e[1] ?? Jr()), Mn++, () => {
Mn === 1 && document.querySelectorAll("[data-radix-focus-guard]").forEach((t) => t.remove()), Mn--;
};
}, []);
}
function Jr() {
const e = document.createElement("span");
return e.setAttribute("data-radix-focus-guard", ""), e.tabIndex = 0, e.style.outline = "none", e.style.opacity = "0", e.style.position = "fixed", e.style.pointerEvents = "none", e;
}
var he = function() {
return he = Object.assign || function(t) {
for (var n, r = 1, o = arguments.length; r < o; r++) {
n = arguments[r];
for (var a in n) Object.prototype.hasOwnProperty.call(n, a) && (t[a] = n[a]);
}
return t;
}, he.apply(this, arguments);
};
function mn(e, t) {
var n = {};
for (var r in e) Object.prototype.hasOwnProperty.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
if (e != null && typeof Object.getOwnPropertySymbols == "function")
for (var o = 0, r = Object.getOwnPropertySymbols(e); o < r.length; o++)
t.indexOf(r[o]) < 0 && Object.prototype.propertyIsEnumerable.call(e, r[o]) && (n[r[o]] = e[r[o]]);
return n;
}
function Bo(e, t, n) {
if (n || arguments.length === 2) for (var r = 0, o = t.length, a; r < o; r++)
(a || !(r in t)) && (a || (a = Array.prototype.slice.call(t, 0, r)), a[r] = t[r]);
return e.concat(a || Array.prototype.slice.call(t));
}
var Zt = "right-scroll-bar-position", Jt = "width-before-scroll-bar", dc = "with-scroll-bars-hidden", fc = "--removed-body-scroll-bar-size";
function jn(e, t) {
return typeof e == "function" ? e(t) : e && (e.current = t), e;
}
function pc(e, t) {
var n = yt(function() {
return {
// value
value: e,
// last callback
callback: t,
// "memoized" public interface
facade: {
get current() {
return n.value;
},
set current(r) {
var o = n.value;
o !== r && (n.value = r, n.callback(r, o));
}
}
};
})[0];
return n.callback = t, n.facade;
}
var hc = typeof window < "u" ? l.useLayoutEffect : l.useEffect, Qr = /* @__PURE__ */ new WeakMap();
function mc(e, t) {
var n = pc(null, function(r) {
return e.forEach(function(o) {
return jn(o, r);
});
});
return hc(function() {
var r = Qr.get(n);
if (r) {
var o = new Set(r), a = new Set(e), s = n.current;
o.forEach(function(i) {
a.has(i) || jn(i, null);
}), a.forEach(function(i) {
o.has(i) || jn(i, s);
});
}
Qr.set(n, e);
}, [e]), n;
}
function gc(e) {
return e;
}
function vc(e, t) {
t === void 0 && (t = gc);
var n = [], r = !1, o = {
read: function() {
if (r)
throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");
return n.length ? n[n.length - 1] : e;
},
useMedium: function(a) {
var s = t(a, r);
return n.push(s), function() {
n = n.filter(function(i) {
return i !== s;
});
};
},
assignSyncMedium: function(a) {
for (r = !0; n.length; ) {
var s = n;
n = [], s.forEach(a);
}
n = {
push: function(i) {
return a(i);
},
filter: function() {
return n;
}
};
},
assignMedium: function(a) {
r = !0;
var s = [];
if (n.length) {
var i = n;
n = [], i.forEach(a), s = n;
}
var c = function() {
var f = s;
s = [], f.forEach(a);
}, u = function() {
return Promise.resolve().then(c);
};
u(), n = {
push: function(f) {
s.push(f), u();
},
filter: function(f) {
return s = s.filter(f), n;
}
};
}
};
return o;
}
function yc(e) {
e === void 0 && (e = {});
var t = vc(null);
return t.options = he({ async: !0, ssr: !1 }, e), t;
}
var Vo = function(e) {
var t = e.sideCar, n = mn(e, ["sideCar"]);
if (!t)
throw new Error("Sidecar: please provide `sideCar` property to import the right car");
var r = t.read();
if (!r)
throw new Error("Sidecar medium not found");
return l.createElement(r, he({}, n));
};
Vo.isSideCarExport = !0;
function bc(e, t) {
return e.useMedium(t), Vo;
}
var zo = yc(), kn = function() {
}, gn = l.forwardRef(function(e, t) {
var n = l.useRef(null), r = l.useState({
onScrollCapture: kn,
onWheelCapture: kn,
onTouchMoveCapture: kn
}), o = r[0], a = r[1], s = e.forwardProps, i = e.children, c = e.className, u = e.removeScrollBar, f = e.enabled, m = e.shards, v = e.sideCar, y = e.noIsolation, w = e.inert, d = e.allowPinchZoom, g = e.as, x = g === void 0 ? "div" : g, b = e.gapMode, S = mn(e, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noIsolation", "inert", "allowPinchZoom", "as", "gapMode"]), R = v, P = mc([n, t]), k = he(he({}, S), o);
return l.createElement(
l.Fragment,
null,
f && l.createElement(R, { sideCar: zo, removeScrollBar: u, shards: m, noIsolation: y, inert: w, setCallbacks: a, allowPinchZoom: !!d, lockRef: n, gapMode: b }),
s ? l.cloneElement(l.Children.only(i), he(he({}, k), { ref: P })) : l.createElement(x, he({}, k, { className: c, ref: P }), i)
);
});
gn.defaultProps = {
enabled: !0,
removeScrollBar: !0,
inert: !1
};
gn.classNames = {
fullWidth: Jt,
zeroRight: Zt
};
var Yo = function() {
if (typeof __webpack_nonce__ < "u")
return __webpack_nonce__;
};
function xc() {
if (!document)
return null;
var e = document.createElement("style");
e.type = "text/css";
var t = Yo();
return t && e.setAttribute("nonce", t), e;
}
function wc(e, t) {
e.styleSheet ? e.styleSheet.cssText = t : e.appendChild(document.createTextNode(t));
}
function Sc(e) {
var t = document.head || document.getElementsByTagName("head")[0];
t.appendChild(e);
}
var Cc = function() {
var e = 0, t = null;
return {
add: function(n) {
e == 0 && (t = xc()) && (wc(t, n), Sc(t)), e++;
},
remove: function() {
e--, !e && t && (t.parentNode && t.parentNode.removeChild(t), t = null);
}
};
}, Ec = function() {
var e = Cc();
return function(t, n) {
l.useEffect(function() {
return e.add(t), function() {
e.remove();
};
}, [t && n]);
};
}, Ho = function() {
var e = Ec(), t = function(n) {
var r = n.styles, o = n.dynamic;
return e(r, o), null;
};
return t;
}, Rc = {
left: 0,
top: 0,
right: 0,
gap: 0
}, _n = function(e) {
return parseInt(e || "", 10) || 0;
}, Pc = function(e) {
var t = window.getComputedStyle(document.body), n = t[e === "padding" ? "paddingLeft" : "marginLeft"], r = t[e === "padding" ? "paddingTop" : "marginTop"], o = t[e === "padding" ? "paddingRight" : "marginRight"];
return [_n(n), _n(r), _n(o)];
}, Tc = function(e) {
if (e === void 0 && (e = "margin"), typeof window > "u")
return Rc;
var t = Pc(e), n = document.documentElement.clientWidth, r = window.innerWidth;
return {
left: t[0],
top: t[1],
right: t[2],
gap: Math.max(0, r - n + t[2] - t[0])
};
}, Nc = Ho(), pt = "data-scroll-locked", Ac = function(e, t, n, r) {
var o = e.left, a = e.top, s = e.right, i = e.gap;
return n === void 0 && (n = "margin"), `
.`.concat(dc, ` {
overflow: hidden `).concat(r, `;
padding-right: `).concat(i, "px ").concat(r, `;
}
body[`).concat(pt, `] {
overflow: hidden `).concat(r, `;
overscroll-behavior: contain;
`).concat([
t && "position: relative ".concat(r, ";"),
n === "margin" && `
padding-left: `.concat(o, `px;
padding-top: `).concat(a, `px;
padding-right: `).concat(s, `px;
margin-left:0;
margin-top:0;
margin-right: `).concat(i, "px ").concat(r, `;
`),
n === "padding" && "padding-right: ".concat(i, "px ").concat(r, ";")
].filter(Boolean).join(""), `
}
.`).concat(Zt, ` {
right: `).concat(i, "px ").concat(r, `;
}
.`).concat(Jt, ` {
margin-right: `).concat(i, "px ").concat(r, `;
}
.`).concat(Zt, " .").concat(Zt, ` {
right: 0 `).concat(r, `;
}
.`).concat(Jt, " .").concat(Jt, ` {
margin-right: 0 `).concat(r, `;
}
body[`).concat(pt, `] {
`).concat(fc, ": ").concat(i, `px;
}
`);
}, eo = function() {
var e = parseInt(document.body.getAttribute(pt) || "0", 10);
return isFinite(e) ? e : 0;
}, Oc = function() {
l.useEffect(function() {
return document.body.setAttribute(pt, (eo() + 1).toString()), function() {
var e = eo() - 1;
e <= 0 ? document.body.removeAttribute(pt) : document.body.setAttribute(pt, e.toString());
};
}, []);
}, Dc = function(e) {
var t = e.noRelative, n = e.noImportant, r = e.gapMode, o = r === void 0 ? "margin" : r;
Oc();
var a = l.useMemo(function() {
return Tc(o);
}, [o]);
return l.createElement(Nc, { styles: Ac(a, !t, o, n ? "" : "!important") });
}, Xn = !1;
if (typeof window < "u")
try {
var Vt = Object.defineProperty({}, "passive", {
get: function() {
return Xn = !0, !0;
}
});
window.addEventListener("test", Vt, Vt), window.removeEventListener("test", Vt, Vt);
} catch {
Xn = !1;
}
var it = Xn ? { passive: !1 } : !1, Mc = function(e) {
return e.tagName === "TEXTAREA";
}, Uo = function(e, t) {
if (!(e instanceof Element))
return !1;