UNPKG

dgz-ui-shared

Version:

Custom ui library using React.js, Shadcn/ui, TailwindCSS, Typescript, dgz-ui library

1,010 lines (1,009 loc) 32.7 kB
import { b as jr, a as qr, u as $r } from "../useSortable-DRvyr1Gy.js"; import { j as Q } from "../jsx-runtime-C5mzlN2N.js"; import { useCallback as Ee, useRef as qe, useEffect as F, useContext as Fe, createContext as Ue, useState as ee } from "react"; import { y as V, C as Ne, P as ze } from "../unstyled-4uhv16dY.js"; import { l as ge } from "../lodash-CYNxjS-I.js"; import { u as Lr } from "../useFilter-DMpxv27U.js"; import { g as $e } from "../_commonjsHelpers-DaMA6jEr.js"; import { u as Yr } from "../useTheme-B5ZHXyfv.js"; const Cr = () => { const e = Ee(({ onConfirm: a }) => { const n = ge.uniqueId(); V.warning(/* @__PURE__ */ Q.jsx(Q.Fragment, {}), { toastId: n, autoClose: !1 }), V.update(n, { position: "bottom-left", render: /* @__PURE__ */ Q.jsx( Ne, { defaultOpen: !0, onConfirm: () => { a(), V.dismiss(n); } } ) }); }, []), o = Ee( ({ onSubmit: a }) => { const n = ge.uniqueId(); V.warning(/* @__PURE__ */ Q.jsx(Q.Fragment, {}), { position: "bottom-left", toastId: n, autoClose: !1 }), V.update(n, { render: /* @__PURE__ */ Q.jsx( ze, { defaultOpen: !0, onSubmit: (f) => { a(f), V.dismiss(n); } } ) }); }, [] ); return { confirm: e, confirmPassword: o }; }, Pr = (e, o = !1) => { const a = qe(document.title); F(() => (o && a.current === document.title && (a.current = document.title), document.title = e, () => { o && (document.title = a.current); }), [e, o]); }; var G = {}, Te; function He() { if (Te) return G; Te = 1, G.match = c, G.parse = l; var e = /(?:(only|not)?\s*([^\s\(\)]+)(?:\s*and)?\s*)?(.+)?/i, o = /\(\s*([^\s\:\)]+)\s*(?:\:\s*([^\s\)]+))?\s*\)/, a = /^(?:(min|max)-)?(.+)/, n = /(em|rem|px|cm|mm|in|pt|pc)?$/, f = /(dpi|dpcm|dppx)?$/; function c(d, u) { return l(d).some(function(v) { var T = v.inverse, q = v.type === "all" || u.type === v.type; if (q && T || !(q || T)) return !1; var A = v.expressions.every(function(j) { var $ = j.feature, k = j.modifier, x = j.value, R = u[$]; if (!R) return !1; switch ($) { case "orientation": case "scan": return R.toLowerCase() === x.toLowerCase(); case "width": case "height": case "device-width": case "device-height": x = C(x), R = C(R); break; case "resolution": x = m(x), R = m(R); break; case "aspect-ratio": case "device-aspect-ratio": case /* Deprecated */ "device-pixel-ratio": x = p(x), R = p(R); break; case "grid": case "color": case "color-index": case "monochrome": x = parseInt(x, 10) || 1, R = parseInt(R, 10) || 0; break; } switch (k) { case "min": return R >= x; case "max": return R <= x; default: return R === x; } }); return A && !T || !A && T; }); } function l(d) { return d.split(",").map(function(u) { u = u.trim(); var v = u.match(e), T = v[1], q = v[2], A = v[3] || "", j = {}; return j.inverse = !!T && T.toLowerCase() === "not", j.type = q ? q.toLowerCase() : "all", A = A.match(/\([^\)]+\)/g) || [], j.expressions = A.map(function($) { var k = $.match(o), x = k[1].toLowerCase().match(a); return { modifier: x[1], feature: x[2], value: k[2] }; }), j; }); } function p(d) { var u = Number(d), v; return u || (v = d.match(/^(\d+)\s*\/\s*(\d+)$/), u = v[1] / v[2]), u; } function m(d) { var u = parseFloat(d), v = String(d).match(f)[1]; switch (v) { case "dpcm": return u / 2.54; case "dppx": return u * 96; default: return u; } } function C(d) { var u = parseFloat(d), v = String(d).match(n)[1]; switch (v) { case "em": return u * 16; case "rem": return u * 16; case "cm": return u * 96 / 2.54; case "mm": return u * 96 / 2.54 / 10; case "in": return u * 96; case "pt": return u * 72; case "pc": return u * 72 / 12; default: return u; } } return G; } var ue, xe; function Qe() { if (xe) return ue; xe = 1; var e = He().match, o = typeof window < "u" ? window.matchMedia : null; function a(f, c, l) { var p = this, m; o && !l && (m = o.call(window, f)), m ? (this.matches = m.matches, this.media = m.media, m.addListener(u)) : (this.matches = e(f, c), this.media = f), this.addListener = C, this.removeListener = d, this.dispose = v; function C(T) { m && m.addListener(T); } function d(T) { m && m.removeListener(T); } function u(T) { p.matches = T.matches, p.media = T.media; } function v() { m && m.removeListener(u); } } function n(f, c, l) { return new a(f, c, l); } return ue = n, ue; } var Ve = Qe(); const Ke = /* @__PURE__ */ $e(Ve); var Je = /[A-Z]/g, Xe = /^ms-/, fe = {}; function Ge(e) { return "-" + e.toLowerCase(); } function De(e) { if (fe.hasOwnProperty(e)) return fe[e]; var o = e.replace(Je, Ge); return fe[e] = Xe.test(o) ? "-" + o : o; } function Ze(e, o) { if (e === o) return !0; if (!e || !o) return !1; const a = Object.keys(e), n = Object.keys(o), f = a.length; if (n.length !== f) return !1; for (let c = 0; c < f; c++) { const l = a[c]; if (e[l] !== o[l] || !Object.prototype.hasOwnProperty.call(o, l)) return !1; } return !0; } var Z = { exports: {} }, B = { exports: {} }, _ = {}; /** @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 Re; function Be() { if (Re) return _; Re = 1; var e = typeof Symbol == "function" && Symbol.for, o = e ? Symbol.for("react.element") : 60103, a = e ? Symbol.for("react.portal") : 60106, n = e ? Symbol.for("react.fragment") : 60107, f = e ? Symbol.for("react.strict_mode") : 60108, c = e ? Symbol.for("react.profiler") : 60114, l = e ? Symbol.for("react.provider") : 60109, p = e ? Symbol.for("react.context") : 60110, m = e ? Symbol.for("react.async_mode") : 60111, C = e ? Symbol.for("react.concurrent_mode") : 60111, d = e ? Symbol.for("react.forward_ref") : 60112, u = e ? Symbol.for("react.suspense") : 60113, v = e ? Symbol.for("react.suspense_list") : 60120, T = e ? Symbol.for("react.memo") : 60115, q = e ? Symbol.for("react.lazy") : 60116, A = e ? Symbol.for("react.block") : 60121, j = e ? Symbol.for("react.fundamental") : 60117, $ = e ? Symbol.for("react.responder") : 60118, k = e ? Symbol.for("react.scope") : 60119; function x(i) { if (typeof i == "object" && i !== null) { var U = i.$$typeof; switch (U) { case o: switch (i = i.type, i) { case m: case C: case n: case c: case f: case u: return i; default: switch (i = i && i.$$typeof, i) { case p: case d: case q: case T: case l: return i; default: return U; } } case a: return U; } } } function R(i) { return x(i) === C; } return _.AsyncMode = m, _.ConcurrentMode = C, _.ContextConsumer = p, _.ContextProvider = l, _.Element = o, _.ForwardRef = d, _.Fragment = n, _.Lazy = q, _.Memo = T, _.Portal = a, _.Profiler = c, _.StrictMode = f, _.Suspense = u, _.isAsyncMode = function(i) { return R(i) || x(i) === m; }, _.isConcurrentMode = R, _.isContextConsumer = function(i) { return x(i) === p; }, _.isContextProvider = function(i) { return x(i) === l; }, _.isElement = function(i) { return typeof i == "object" && i !== null && i.$$typeof === o; }, _.isForwardRef = function(i) { return x(i) === d; }, _.isFragment = function(i) { return x(i) === n; }, _.isLazy = function(i) { return x(i) === q; }, _.isMemo = function(i) { return x(i) === T; }, _.isPortal = function(i) { return x(i) === a; }, _.isProfiler = function(i) { return x(i) === c; }, _.isStrictMode = function(i) { return x(i) === f; }, _.isSuspense = function(i) { return x(i) === u; }, _.isValidElementType = function(i) { return typeof i == "string" || typeof i == "function" || i === n || i === C || i === c || i === f || i === u || i === v || typeof i == "object" && i !== null && (i.$$typeof === q || i.$$typeof === T || i.$$typeof === l || i.$$typeof === p || i.$$typeof === d || i.$$typeof === j || i.$$typeof === $ || i.$$typeof === k || i.$$typeof === A); }, _.typeOf = x, _; } var M = {}; /** @license React v16.13.1 * react-is.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 we; function er() { return we || (we = 1, process.env.NODE_ENV !== "production" && function() { var e = typeof Symbol == "function" && Symbol.for, o = e ? Symbol.for("react.element") : 60103, a = e ? Symbol.for("react.portal") : 60106, n = e ? Symbol.for("react.fragment") : 60107, f = e ? Symbol.for("react.strict_mode") : 60108, c = e ? Symbol.for("react.profiler") : 60114, l = e ? Symbol.for("react.provider") : 60109, p = e ? Symbol.for("react.context") : 60110, m = e ? Symbol.for("react.async_mode") : 60111, C = e ? Symbol.for("react.concurrent_mode") : 60111, d = e ? Symbol.for("react.forward_ref") : 60112, u = e ? Symbol.for("react.suspense") : 60113, v = e ? Symbol.for("react.suspense_list") : 60120, T = e ? Symbol.for("react.memo") : 60115, q = e ? Symbol.for("react.lazy") : 60116, A = e ? Symbol.for("react.block") : 60121, j = e ? Symbol.for("react.fundamental") : 60117, $ = e ? Symbol.for("react.responder") : 60118, k = e ? Symbol.for("react.scope") : 60119; function x(t) { return typeof t == "string" || typeof t == "function" || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill. t === n || t === C || t === c || t === f || t === u || t === v || typeof t == "object" && t !== null && (t.$$typeof === q || t.$$typeof === T || t.$$typeof === l || t.$$typeof === p || t.$$typeof === d || t.$$typeof === j || t.$$typeof === $ || t.$$typeof === k || t.$$typeof === A); } function R(t) { if (typeof t == "object" && t !== null) { var W = t.$$typeof; switch (W) { case o: var X = t.type; switch (X) { case m: case C: case n: case c: case f: case u: return X; default: var be = X && X.$$typeof; switch (be) { case p: case d: case q: case T: case l: return be; default: return W; } } case a: return W; } } } var i = m, U = C, re = p, te = l, ne = o, oe = d, K = n, ie = q, ae = T, H = a, se = c, Y = f, N = u, J = !1; function ce(t) { return J || (J = !0, console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")), r(t) || R(t) === m; } function r(t) { return R(t) === C; } function s(t) { return R(t) === p; } function g(t) { return R(t) === l; } function b(t) { return typeof t == "object" && t !== null && t.$$typeof === o; } function y(t) { return R(t) === d; } function w(t) { return R(t) === n; } function h(t) { return R(t) === q; } function E(t) { return R(t) === T; } function O(t) { return R(t) === a; } function I(t) { return R(t) === c; } function S(t) { return R(t) === f; } function L(t) { return R(t) === u; } M.AsyncMode = i, M.ConcurrentMode = U, M.ContextConsumer = re, M.ContextProvider = te, M.Element = ne, M.ForwardRef = oe, M.Fragment = K, M.Lazy = ie, M.Memo = ae, M.Portal = H, M.Profiler = se, M.StrictMode = Y, M.Suspense = N, M.isAsyncMode = ce, M.isConcurrentMode = r, M.isContextConsumer = s, M.isContextProvider = g, M.isElement = b, M.isForwardRef = y, M.isFragment = w, M.isLazy = h, M.isMemo = E, M.isPortal = O, M.isProfiler = I, M.isStrictMode = S, M.isSuspense = L, M.isValidElementType = x, M.typeOf = R; }()), M; } var Oe; function Le() { return Oe || (Oe = 1, process.env.NODE_ENV === "production" ? B.exports = Be() : B.exports = er()), B.exports; } /* object-assign (c) Sindre Sorhus @license MIT */ var le, Se; function rr() { if (Se) return le; Se = 1; var e = Object.getOwnPropertySymbols, o = Object.prototype.hasOwnProperty, a = Object.prototype.propertyIsEnumerable; function n(c) { if (c == null) throw new TypeError("Object.assign cannot be called with null or undefined"); return Object(c); } function f() { try { if (!Object.assign) return !1; var c = new String("abc"); if (c[5] = "de", Object.getOwnPropertyNames(c)[0] === "5") return !1; for (var l = {}, p = 0; p < 10; p++) l["_" + String.fromCharCode(p)] = p; var m = Object.getOwnPropertyNames(l).map(function(d) { return l[d]; }); if (m.join("") !== "0123456789") return !1; var C = {}; return "abcdefghijklmnopqrst".split("").forEach(function(d) { C[d] = d; }), Object.keys(Object.assign({}, C)).join("") === "abcdefghijklmnopqrst"; } catch { return !1; } } return le = f() ? Object.assign : function(c, l) { for (var p, m = n(c), C, d = 1; d < arguments.length; d++) { p = Object(arguments[d]); for (var u in p) o.call(p, u) && (m[u] = p[u]); if (e) { C = e(p); for (var v = 0; v < C.length; v++) a.call(p, C[v]) && (m[C[v]] = p[C[v]]); } } return m; }, le; } var de, Ce; function he() { if (Ce) return de; Ce = 1; var e = "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"; return de = e, de; } var pe, Pe; function ke() { return Pe || (Pe = 1, pe = Function.call.bind(Object.prototype.hasOwnProperty)), pe; } var ye, _e; function tr() { if (_e) return ye; _e = 1; var e = function() { }; if (process.env.NODE_ENV !== "production") { var o = /* @__PURE__ */ he(), a = {}, n = /* @__PURE__ */ ke(); e = function(c) { var l = "Warning: " + c; typeof console < "u" && console.error(l); try { throw new Error(l); } catch { } }; } function f(c, l, p, m, C) { if (process.env.NODE_ENV !== "production") { for (var d in c) if (n(c, d)) { var u; try { if (typeof c[d] != "function") { var v = Error( (m || "React class") + ": " + p + " type `" + d + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof c[d] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`." ); throw v.name = "Invariant Violation", v; } u = c[d](l, d, m, p, null, o); } catch (q) { u = q; } if (u && !(u instanceof Error) && e( (m || "React class") + ": type specification of " + p + " `" + d + "` is invalid; the type checker function must return `null` or an `Error` but returned a " + typeof u + ". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)." ), u instanceof Error && !(u.message in a)) { a[u.message] = !0; var T = C ? C() : ""; e( "Failed " + p + " type: " + u.message + (T ?? "") ); } } } } return f.resetWarningCache = function() { process.env.NODE_ENV !== "production" && (a = {}); }, ye = f, ye; } var me, Me; function nr() { if (Me) return me; Me = 1; var e = Le(), o = rr(), a = /* @__PURE__ */ he(), n = /* @__PURE__ */ ke(), f = /* @__PURE__ */ tr(), c = function() { }; process.env.NODE_ENV !== "production" && (c = function(p) { var m = "Warning: " + p; typeof console < "u" && console.error(m); try { throw new Error(m); } catch { } }); function l() { return null; } return me = function(p, m) { var C = typeof Symbol == "function" && Symbol.iterator, d = "@@iterator"; function u(r) { var s = r && (C && r[C] || r[d]); if (typeof s == "function") return s; } var v = "<<anonymous>>", T = { array: $("array"), bigint: $("bigint"), bool: $("boolean"), func: $("function"), number: $("number"), object: $("object"), string: $("string"), symbol: $("symbol"), any: k(), arrayOf: x, element: R(), elementType: i(), instanceOf: U, node: oe(), objectOf: te, oneOf: re, oneOfType: ne, shape: ie, exact: ae }; function q(r, s) { return r === s ? r !== 0 || 1 / r === 1 / s : r !== r && s !== s; } function A(r, s) { this.message = r, this.data = s && typeof s == "object" ? s : {}, this.stack = ""; } A.prototype = Error.prototype; function j(r) { if (process.env.NODE_ENV !== "production") var s = {}, g = 0; function b(w, h, E, O, I, S, L) { if (O = O || v, S = S || E, L !== a) { if (m) { var t = new Error( "Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types" ); throw t.name = "Invariant Violation", t; } else if (process.env.NODE_ENV !== "production" && typeof console < "u") { var W = O + ":" + E; !s[W] && // Avoid spamming the console because they are often not actionable except for lib authors g < 3 && (c( "You are manually calling a React.PropTypes validation function for the `" + S + "` prop on `" + O + "`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details." ), s[W] = !0, g++); } } return h[E] == null ? w ? h[E] === null ? new A("The " + I + " `" + S + "` is marked as required " + ("in `" + O + "`, but its value is `null`.")) : new A("The " + I + " `" + S + "` is marked as required in " + ("`" + O + "`, but its value is `undefined`.")) : null : r(h, E, O, I, S); } var y = b.bind(null, !1); return y.isRequired = b.bind(null, !0), y; } function $(r) { function s(g, b, y, w, h, E) { var O = g[b], I = Y(O); if (I !== r) { var S = N(O); return new A( "Invalid " + w + " `" + h + "` of type " + ("`" + S + "` supplied to `" + y + "`, expected ") + ("`" + r + "`."), { expectedType: r } ); } return null; } return j(s); } function k() { return j(l); } function x(r) { function s(g, b, y, w, h) { if (typeof r != "function") return new A("Property `" + h + "` of component `" + y + "` has invalid PropType notation inside arrayOf."); var E = g[b]; if (!Array.isArray(E)) { var O = Y(E); return new A("Invalid " + w + " `" + h + "` of type " + ("`" + O + "` supplied to `" + y + "`, expected an array.")); } for (var I = 0; I < E.length; I++) { var S = r(E, I, y, w, h + "[" + I + "]", a); if (S instanceof Error) return S; } return null; } return j(s); } function R() { function r(s, g, b, y, w) { var h = s[g]; if (!p(h)) { var E = Y(h); return new A("Invalid " + y + " `" + w + "` of type " + ("`" + E + "` supplied to `" + b + "`, expected a single ReactElement.")); } return null; } return j(r); } function i() { function r(s, g, b, y, w) { var h = s[g]; if (!e.isValidElementType(h)) { var E = Y(h); return new A("Invalid " + y + " `" + w + "` of type " + ("`" + E + "` supplied to `" + b + "`, expected a single ReactElement type.")); } return null; } return j(r); } function U(r) { function s(g, b, y, w, h) { if (!(g[b] instanceof r)) { var E = r.name || v, O = ce(g[b]); return new A("Invalid " + w + " `" + h + "` of type " + ("`" + O + "` supplied to `" + y + "`, expected ") + ("instance of `" + E + "`.")); } return null; } return j(s); } function re(r) { if (!Array.isArray(r)) return process.env.NODE_ENV !== "production" && (arguments.length > 1 ? c( "Invalid arguments supplied to oneOf, expected an array, got " + arguments.length + " arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])." ) : c("Invalid argument supplied to oneOf, expected an array.")), l; function s(g, b, y, w, h) { for (var E = g[b], O = 0; O < r.length; O++) if (q(E, r[O])) return null; var I = JSON.stringify(r, function(L, t) { var W = N(t); return W === "symbol" ? String(t) : t; }); return new A("Invalid " + w + " `" + h + "` of value `" + String(E) + "` " + ("supplied to `" + y + "`, expected one of " + I + ".")); } return j(s); } function te(r) { function s(g, b, y, w, h) { if (typeof r != "function") return new A("Property `" + h + "` of component `" + y + "` has invalid PropType notation inside objectOf."); var E = g[b], O = Y(E); if (O !== "object") return new A("Invalid " + w + " `" + h + "` of type " + ("`" + O + "` supplied to `" + y + "`, expected an object.")); for (var I in E) if (n(E, I)) { var S = r(E, I, y, w, h + "." + I, a); if (S instanceof Error) return S; } return null; } return j(s); } function ne(r) { if (!Array.isArray(r)) return process.env.NODE_ENV !== "production" && c("Invalid argument supplied to oneOfType, expected an instance of array."), l; for (var s = 0; s < r.length; s++) { var g = r[s]; if (typeof g != "function") return c( "Invalid argument supplied to oneOfType. Expected an array of check functions, but received " + J(g) + " at index " + s + "." ), l; } function b(y, w, h, E, O) { for (var I = [], S = 0; S < r.length; S++) { var L = r[S], t = L(y, w, h, E, O, a); if (t == null) return null; t.data && n(t.data, "expectedType") && I.push(t.data.expectedType); } var W = I.length > 0 ? ", expected one of type [" + I.join(", ") + "]" : ""; return new A("Invalid " + E + " `" + O + "` supplied to " + ("`" + h + "`" + W + ".")); } return j(b); } function oe() { function r(s, g, b, y, w) { return H(s[g]) ? null : new A("Invalid " + y + " `" + w + "` supplied to " + ("`" + b + "`, expected a ReactNode.")); } return j(r); } function K(r, s, g, b, y) { return new A( (r || "React class") + ": " + s + " type `" + g + "." + b + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + y + "`." ); } function ie(r) { function s(g, b, y, w, h) { var E = g[b], O = Y(E); if (O !== "object") return new A("Invalid " + w + " `" + h + "` of type `" + O + "` " + ("supplied to `" + y + "`, expected `object`.")); for (var I in r) { var S = r[I]; if (typeof S != "function") return K(y, w, h, I, N(S)); var L = S(E, I, y, w, h + "." + I, a); if (L) return L; } return null; } return j(s); } function ae(r) { function s(g, b, y, w, h) { var E = g[b], O = Y(E); if (O !== "object") return new A("Invalid " + w + " `" + h + "` of type `" + O + "` " + ("supplied to `" + y + "`, expected `object`.")); var I = o({}, g[b], r); for (var S in I) { var L = r[S]; if (n(r, S) && typeof L != "function") return K(y, w, h, S, N(L)); if (!L) return new A( "Invalid " + w + " `" + h + "` key `" + S + "` supplied to `" + y + "`.\nBad object: " + JSON.stringify(g[b], null, " ") + ` Valid keys: ` + JSON.stringify(Object.keys(r), null, " ") ); var t = L(E, S, y, w, h + "." + S, a); if (t) return t; } return null; } return j(s); } function H(r) { switch (typeof r) { case "number": case "string": case "undefined": return !0; case "boolean": return !r; case "object": if (Array.isArray(r)) return r.every(H); if (r === null || p(r)) return !0; var s = u(r); if (s) { var g = s.call(r), b; if (s !== r.entries) { for (; !(b = g.next()).done; ) if (!H(b.value)) return !1; } else for (; !(b = g.next()).done; ) { var y = b.value; if (y && !H(y[1])) return !1; } } else return !1; return !0; default: return !1; } } function se(r, s) { return r === "symbol" ? !0 : s ? s["@@toStringTag"] === "Symbol" || typeof Symbol == "function" && s instanceof Symbol : !1; } function Y(r) { var s = typeof r; return Array.isArray(r) ? "array" : r instanceof RegExp ? "object" : se(s, r) ? "symbol" : s; } function N(r) { if (typeof r > "u" || r === null) return "" + r; var s = Y(r); if (s === "object") { if (r instanceof Date) return "date"; if (r instanceof RegExp) return "regexp"; } return s; } function J(r) { var s = N(r); switch (s) { case "array": case "object": return "an " + s; case "boolean": case "date": case "regexp": return "a " + s; default: return s; } } function ce(r) { return !r.constructor || !r.constructor.name ? v : r.constructor.name; } return T.checkPropTypes = f, T.resetWarningCache = f.resetWarningCache, T.PropTypes = T, T; }, me; } var ve, Ae; function or() { if (Ae) return ve; Ae = 1; var e = /* @__PURE__ */ he(); function o() { } function a() { } return a.resetWarningCache = o, ve = function() { function n(l, p, m, C, d, u) { if (u !== e) { var v = new Error( "Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types" ); throw v.name = "Invariant Violation", v; } } n.isRequired = n; function f() { return n; } var c = { array: n, bigint: n, bool: n, func: n, number: n, object: n, string: n, symbol: n, any: n, arrayOf: f, element: n, elementType: n, instanceOf: f, node: n, objectOf: f, oneOf: f, oneOfType: f, shape: f, exact: f, checkPropTypes: a, resetWarningCache: o }; return c.PropTypes = c, c; }, ve; } var Ie; function ir() { if (Ie) return Z.exports; if (Ie = 1, process.env.NODE_ENV !== "production") { var e = Le(), o = !0; Z.exports = /* @__PURE__ */ nr()(e.isElement, o); } else Z.exports = /* @__PURE__ */ or()(); return Z.exports; } var ar = /* @__PURE__ */ ir(); const P = /* @__PURE__ */ $e(ar), D = P.oneOfType([P.string, P.number]), Ye = { all: P.bool, grid: P.bool, aural: P.bool, braille: P.bool, handheld: P.bool, print: P.bool, projection: P.bool, screen: P.bool, tty: P.bool, tv: P.bool, embossed: P.bool }, sr = { orientation: P.oneOf(["portrait", "landscape"]), scan: P.oneOf(["progressive", "interlace"]), aspectRatio: P.string, deviceAspectRatio: P.string, height: D, deviceHeight: D, width: D, deviceWidth: D, color: P.bool, colorIndex: P.bool, monochrome: P.bool, resolution: D, type: Object.keys(Ye) }, { type: _r, ...cr } = sr, ur = { minAspectRatio: P.string, maxAspectRatio: P.string, minDeviceAspectRatio: P.string, maxDeviceAspectRatio: P.string, minHeight: D, maxHeight: D, minDeviceHeight: D, maxDeviceHeight: D, minWidth: D, maxWidth: D, minDeviceWidth: D, maxDeviceWidth: D, minColor: P.number, maxColor: P.number, minColorIndex: P.number, maxColorIndex: P.number, minMonochrome: P.number, maxMonochrome: P.number, minResolution: D, maxResolution: D, ...cr }, fr = { ...Ye, ...ur }; var lr = { all: fr }; const dr = (e) => `not ${e}`, pr = (e, o) => { const a = De(e); return typeof o == "number" && (o = `${o}px`), o === !0 ? a : o === !1 ? dr(a) : `(${a}: ${o})`; }, yr = (e) => e.join(" and "), mr = (e) => { const o = []; return Object.keys(lr.all).forEach((a) => { const n = e[a]; n != null && o.push(pr(a, n)); }), yr(o); }, vr = Ue(void 0), hr = (e) => e.query || mr(e), je = (e) => e ? Object.keys(e).reduce((a, n) => (a[De(n)] = e[n], a), {}) : void 0, We = () => { const e = qe(!1); return F(() => { e.current = !0; }, []), e.current; }, br = (e) => { const o = Fe(vr), a = () => je(e) || je(o), [n, f] = ee(a); return F(() => { const c = a(); Ze(n, c) || f(c); }, [e, o]), n; }, Er = (e) => { const o = () => hr(e), [a, n] = ee(o); return F(() => { const f = o(); a !== f && n(f); }, [e]), a; }, gr = (e, o) => { const a = () => Ke(e, o || {}, !!o), [n, f] = ee(a), c = We(); return F(() => { if (c) { const l = a(); return f(l), () => { l && l.dispose(); }; } }, [e, o]), n; }, Tr = (e) => { const [o, a] = ee(e.matches); return F(() => { const n = (f) => { a(f.matches); }; return e.addListener(n), a(e.matches), () => { e.removeListener(n); }; }, [e]), o; }, z = (e, o, a) => { const n = br(o), f = Er(e); if (!f) throw new Error("Invalid or missing MediaQuery!"); const c = gr(f, n), l = Tr(c); return We(), F(() => { }, [l]), F(() => () => { c && c.dispose(); }, []), l; }, Mr = () => { const e = z({ query: "(min-width: 116rem)" }), o = z({ query: "(min-width: 96rem)" }), a = z({ query: "(min-width: 80rem)" }), n = z({ query: "(min-width: 64rem)" }), f = z({ query: "(min-width: 48rem)" }), c = z({ query: "(min-width: 40rem)" }), l = z({ query: "(max-width: 40rem)" }); return { xxxl: e, xxl: o, xl: a, lg: n, md: f, sm: c, xs: l }; }; export { jr as useColumns, Cr as useConfirm, qr as useDataTable, Pr as useDocumentTitle, Lr as useFilter, Mr as useMediaQuerySizes, $r as useSortable, Yr as useTheme };