UNPKG

dgz-ui-shared

Version:

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

1,016 lines (1,015 loc) 32.8 kB
import { b as Ir, a as qr, u as $r } from "../chunks/useSortable-B1BtakAy.es.js"; import { jsx as X, Fragment as Ee } from "react/jsx-runtime"; import { useCallback as Te, useRef as $e, useEffect as U, useContext as Ue, useState as ee, createContext as Fe } from "react"; import { y as Q, C as Ne, P as ze } from "../chunks/PasswordConfirm-BXVsaJFY.es.js"; import { u as Dr } from "../chunks/useFilter-DpCwY1KO.es.js"; import { g as je } from "../chunks/_commonjsHelpers-DaMA6jEr.es.js"; import { u as kr } from "../chunks/useTheme-iKF3BEvj.es.js"; const Sr = () => { const e = Te(({ onConfirm: a }) => { const o = crypto.randomUUID(); Q.warning(/* @__PURE__ */ X(Ee, {}), { toastId: o, autoClose: !1 }), Q.update(o, { position: "bottom-left", render: /* @__PURE__ */ X( Ne, { defaultOpen: !0, onConfirm: () => { a(), Q.dismiss(o); } } ) }); }, []), n = Te( ({ onSubmit: a, title: o, description: f }) => { const s = crypto.randomUUID(); Q.warning(/* @__PURE__ */ X(Ee, {}), { position: "bottom-left", toastId: s, autoClose: !1 }), Q.update(s, { render: /* @__PURE__ */ X( ze, { defaultOpen: !0, title: o, description: f, onSubmit: (l) => { a(l), Q.dismiss(s); } } ) }); }, [] ); return { confirm: e, confirmPassword: n }; }, Cr = (e, n = !1) => { const a = $e(document.title); U(() => (n && a.current === document.title && (a.current = document.title), document.title = e, () => { n && (document.title = a.current); }), [e, n]); }; var G = {}, ge; function He() { if (ge) return G; ge = 1, G.match = s, G.parse = l; var e = /(?:(only|not)?\s*([^\s\(\)]+)(?:\s*and)?\s*)?(.+)?/i, n = /\(\s*([^\s\:\)]+)\s*(?:\:\s*([^\s\)]+))?\s*\)/, a = /^(?:(min|max)-)?(.+)/, o = /(em|rem|px|cm|mm|in|pt|pc)?$/, f = /(dpi|dpcm|dppx)?$/; function s(d, u) { return l(d).some(function(v) { var g = v.inverse, $ = v.type === "all" || u.type === v.type; if ($ && g || !($ || g)) return !1; var A = v.expressions.every(function(q) { var j = q.feature, k = q.modifier, x = q.value, w = u[j]; if (!w) return !1; switch (j) { case "orientation": case "scan": return w.toLowerCase() === x.toLowerCase(); case "width": case "height": case "device-width": case "device-height": x = C(x), w = C(w); break; case "resolution": x = m(x), w = m(w); break; case "aspect-ratio": case "device-aspect-ratio": case /* Deprecated */ "device-pixel-ratio": x = p(x), w = p(w); break; case "grid": case "color": case "color-index": case "monochrome": x = parseInt(x, 10) || 1, w = parseInt(w, 10) || 0; break; } switch (k) { case "min": return w >= x; case "max": return w <= x; default: return w === x; } }); return A && !g || !A && g; }); } function l(d) { return d.split(",").map(function(u) { u = u.trim(); var v = u.match(e), g = v[1], $ = v[2], A = v[3] || "", q = {}; return q.inverse = !!g && g.toLowerCase() === "not", q.type = $ ? $.toLowerCase() : "all", A = A.match(/\([^\)]+\)/g) || [], q.expressions = A.map(function(j) { var k = j.match(n), x = k[1].toLowerCase().match(a); return { modifier: x[1], feature: x[2], value: k[2] }; }), q; }); } 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(o)[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, n = typeof window < "u" ? window.matchMedia : null; function a(f, s, l) { var p = this, m; n && !l && (m = n.call(window, f)), m ? (this.matches = m.matches, this.media = m.media, m.addListener(u)) : (this.matches = e(f, s), this.media = f), this.addListener = C, this.removeListener = d, this.dispose = v; function C(g) { m && m.addListener(g); } function d(g) { m && m.removeListener(g); } function u(g) { p.matches = g.matches, p.media = g.media; } function v() { m && m.removeListener(u); } } function o(f, s, l) { return new a(f, s, l); } return ue = o, ue; } var Ve = Qe(); const Ke = /* @__PURE__ */ je(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 n = e.replace(Je, Ge); return fe[e] = Xe.test(n) ? "-" + n : n; } function Ze(e, n) { if (e === n) return !0; if (!e || !n) return !1; const a = Object.keys(e), o = Object.keys(n), f = a.length; if (o.length !== f) return !1; for (let s = 0; s < f; s++) { const l = a[s]; if (e[l] !== n[l] || !Object.prototype.hasOwnProperty.call(n, 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 we; function Be() { if (we) return _; we = 1; var e = typeof Symbol == "function" && Symbol.for, n = e ? Symbol.for("react.element") : 60103, a = e ? Symbol.for("react.portal") : 60106, o = e ? Symbol.for("react.fragment") : 60107, f = e ? Symbol.for("react.strict_mode") : 60108, s = 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, g = e ? Symbol.for("react.memo") : 60115, $ = e ? Symbol.for("react.lazy") : 60116, A = e ? Symbol.for("react.block") : 60121, q = e ? Symbol.for("react.fundamental") : 60117, j = e ? Symbol.for("react.responder") : 60118, k = e ? Symbol.for("react.scope") : 60119; function x(i) { if (typeof i == "object" && i !== null) { var F = i.$$typeof; switch (F) { case n: switch (i = i.type, i) { case m: case C: case o: case s: case f: case u: return i; default: switch (i = i && i.$$typeof, i) { case p: case d: case $: case g: case l: return i; default: return F; } } case a: return F; } } } function w(i) { return x(i) === C; } return _.AsyncMode = m, _.ConcurrentMode = C, _.ContextConsumer = p, _.ContextProvider = l, _.Element = n, _.ForwardRef = d, _.Fragment = o, _.Lazy = $, _.Memo = g, _.Portal = a, _.Profiler = s, _.StrictMode = f, _.Suspense = u, _.isAsyncMode = function(i) { return w(i) || x(i) === m; }, _.isConcurrentMode = w, _.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 === n; }, _.isForwardRef = function(i) { return x(i) === d; }, _.isFragment = function(i) { return x(i) === o; }, _.isLazy = function(i) { return x(i) === $; }, _.isMemo = function(i) { return x(i) === g; }, _.isPortal = function(i) { return x(i) === a; }, _.isProfiler = function(i) { return x(i) === s; }, _.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 === o || i === C || i === s || i === f || i === u || i === v || typeof i == "object" && i !== null && (i.$$typeof === $ || i.$$typeof === g || i.$$typeof === l || i.$$typeof === p || i.$$typeof === d || i.$$typeof === q || i.$$typeof === j || 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 Re; function er() { return Re || (Re = 1, process.env.NODE_ENV !== "production" && (function() { var e = typeof Symbol == "function" && Symbol.for, n = e ? Symbol.for("react.element") : 60103, a = e ? Symbol.for("react.portal") : 60106, o = e ? Symbol.for("react.fragment") : 60107, f = e ? Symbol.for("react.strict_mode") : 60108, s = 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, g = e ? Symbol.for("react.memo") : 60115, $ = e ? Symbol.for("react.lazy") : 60116, A = e ? Symbol.for("react.block") : 60121, q = e ? Symbol.for("react.fundamental") : 60117, j = 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 === o || t === C || t === s || t === f || t === u || t === v || typeof t == "object" && t !== null && (t.$$typeof === $ || t.$$typeof === g || t.$$typeof === l || t.$$typeof === p || t.$$typeof === d || t.$$typeof === q || t.$$typeof === j || t.$$typeof === k || t.$$typeof === A); } function w(t) { if (typeof t == "object" && t !== null) { var W = t.$$typeof; switch (W) { case n: var J = t.type; switch (J) { case m: case C: case o: case s: case f: case u: return J; default: var be = J && J.$$typeof; switch (be) { case p: case d: case $: case g: case l: return be; default: return W; } } case a: return W; } } } var i = m, F = C, re = p, te = l, ne = n, oe = d, V = o, ie = $, ae = g, H = a, se = s, Y = f, N = u, K = !1; function ce(t) { return K || (K = !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) || w(t) === m; } function r(t) { return w(t) === C; } function c(t) { return w(t) === p; } function T(t) { return w(t) === l; } function b(t) { return typeof t == "object" && t !== null && t.$$typeof === n; } function y(t) { return w(t) === d; } function R(t) { return w(t) === o; } function h(t) { return w(t) === $; } function E(t) { return w(t) === g; } function O(t) { return w(t) === a; } function I(t) { return w(t) === s; } function S(t) { return w(t) === f; } function L(t) { return w(t) === u; } M.AsyncMode = i, M.ConcurrentMode = F, M.ContextConsumer = re, M.ContextProvider = te, M.Element = ne, M.ForwardRef = oe, M.Fragment = V, 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 = c, M.isContextProvider = T, M.isElement = b, M.isForwardRef = y, M.isFragment = R, M.isLazy = h, M.isMemo = E, M.isPortal = O, M.isProfiler = I, M.isStrictMode = S, M.isSuspense = L, M.isValidElementType = x, M.typeOf = w; })()), 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, n = Object.prototype.hasOwnProperty, a = Object.prototype.propertyIsEnumerable; function o(s) { if (s == null) throw new TypeError("Object.assign cannot be called with null or undefined"); return Object(s); } function f() { try { if (!Object.assign) return !1; var s = new String("abc"); if (s[5] = "de", Object.getOwnPropertyNames(s)[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(s, l) { for (var p, m = o(s), C, d = 1; d < arguments.length; d++) { p = Object(arguments[d]); for (var u in p) n.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 n = /* @__PURE__ */ he(), a = {}, o = /* @__PURE__ */ ke(); e = function(s) { var l = "Warning: " + s; typeof console < "u" && console.error(l); try { throw new Error(l); } catch { } }; } function f(s, l, p, m, C) { if (process.env.NODE_ENV !== "production") { for (var d in s) if (o(s, d)) { var u; try { if (typeof s[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 s[d] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`." ); throw v.name = "Invariant Violation", v; } u = s[d](l, d, m, p, null, n); } catch ($) { u = $; } 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 g = C ? C() : ""; e( "Failed " + p + " type: " + u.message + (g ?? "") ); } } } } 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(), n = rr(), a = /* @__PURE__ */ he(), o = /* @__PURE__ */ ke(), f = /* @__PURE__ */ tr(), s = function() { }; process.env.NODE_ENV !== "production" && (s = 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 c = r && (C && r[C] || r[d]); if (typeof c == "function") return c; } var v = "<<anonymous>>", g = { array: j("array"), bigint: j("bigint"), bool: j("boolean"), func: j("function"), number: j("number"), object: j("object"), string: j("string"), symbol: j("symbol"), any: k(), arrayOf: x, element: w(), elementType: i(), instanceOf: F, node: oe(), objectOf: te, oneOf: re, oneOfType: ne, shape: ie, exact: ae }; function $(r, c) { return r === c ? r !== 0 || 1 / r === 1 / c : r !== r && c !== c; } function A(r, c) { this.message = r, this.data = c && typeof c == "object" ? c : {}, this.stack = ""; } A.prototype = Error.prototype; function q(r) { if (process.env.NODE_ENV !== "production") var c = {}, T = 0; function b(R, 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; !c[W] && // Avoid spamming the console because they are often not actionable except for lib authors T < 3 && (s( "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." ), c[W] = !0, T++); } } return h[E] == null ? R ? 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 j(r) { function c(T, b, y, R, h, E) { var O = T[b], I = Y(O); if (I !== r) { var S = N(O); return new A( "Invalid " + R + " `" + h + "` of type " + ("`" + S + "` supplied to `" + y + "`, expected ") + ("`" + r + "`."), { expectedType: r } ); } return null; } return q(c); } function k() { return q(l); } function x(r) { function c(T, b, y, R, h) { if (typeof r != "function") return new A("Property `" + h + "` of component `" + y + "` has invalid PropType notation inside arrayOf."); var E = T[b]; if (!Array.isArray(E)) { var O = Y(E); return new A("Invalid " + R + " `" + h + "` of type " + ("`" + O + "` supplied to `" + y + "`, expected an array.")); } for (var I = 0; I < E.length; I++) { var S = r(E, I, y, R, h + "[" + I + "]", a); if (S instanceof Error) return S; } return null; } return q(c); } function w() { function r(c, T, b, y, R) { var h = c[T]; if (!p(h)) { var E = Y(h); return new A("Invalid " + y + " `" + R + "` of type " + ("`" + E + "` supplied to `" + b + "`, expected a single ReactElement.")); } return null; } return q(r); } function i() { function r(c, T, b, y, R) { var h = c[T]; if (!e.isValidElementType(h)) { var E = Y(h); return new A("Invalid " + y + " `" + R + "` of type " + ("`" + E + "` supplied to `" + b + "`, expected a single ReactElement type.")); } return null; } return q(r); } function F(r) { function c(T, b, y, R, h) { if (!(T[b] instanceof r)) { var E = r.name || v, O = ce(T[b]); return new A("Invalid " + R + " `" + h + "` of type " + ("`" + O + "` supplied to `" + y + "`, expected ") + ("instance of `" + E + "`.")); } return null; } return q(c); } function re(r) { if (!Array.isArray(r)) return process.env.NODE_ENV !== "production" && (arguments.length > 1 ? s( "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])." ) : s("Invalid argument supplied to oneOf, expected an array.")), l; function c(T, b, y, R, h) { for (var E = T[b], O = 0; O < r.length; O++) if ($(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 " + R + " `" + h + "` of value `" + String(E) + "` " + ("supplied to `" + y + "`, expected one of " + I + ".")); } return q(c); } function te(r) { function c(T, b, y, R, h) { if (typeof r != "function") return new A("Property `" + h + "` of component `" + y + "` has invalid PropType notation inside objectOf."); var E = T[b], O = Y(E); if (O !== "object") return new A("Invalid " + R + " `" + h + "` of type " + ("`" + O + "` supplied to `" + y + "`, expected an object.")); for (var I in E) if (o(E, I)) { var S = r(E, I, y, R, h + "." + I, a); if (S instanceof Error) return S; } return null; } return q(c); } function ne(r) { if (!Array.isArray(r)) return process.env.NODE_ENV !== "production" && s("Invalid argument supplied to oneOfType, expected an instance of array."), l; for (var c = 0; c < r.length; c++) { var T = r[c]; if (typeof T != "function") return s( "Invalid argument supplied to oneOfType. Expected an array of check functions, but received " + K(T) + " at index " + c + "." ), l; } function b(y, R, h, E, O) { for (var I = [], S = 0; S < r.length; S++) { var L = r[S], t = L(y, R, h, E, O, a); if (t == null) return null; t.data && o(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 q(b); } function oe() { function r(c, T, b, y, R) { return H(c[T]) ? null : new A("Invalid " + y + " `" + R + "` supplied to " + ("`" + b + "`, expected a ReactNode.")); } return q(r); } function V(r, c, T, b, y) { return new A( (r || "React class") + ": " + c + " type `" + T + "." + b + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + y + "`." ); } function ie(r) { function c(T, b, y, R, h) { var E = T[b], O = Y(E); if (O !== "object") return new A("Invalid " + R + " `" + h + "` of type `" + O + "` " + ("supplied to `" + y + "`, expected `object`.")); for (var I in r) { var S = r[I]; if (typeof S != "function") return V(y, R, h, I, N(S)); var L = S(E, I, y, R, h + "." + I, a); if (L) return L; } return null; } return q(c); } function ae(r) { function c(T, b, y, R, h) { var E = T[b], O = Y(E); if (O !== "object") return new A("Invalid " + R + " `" + h + "` of type `" + O + "` " + ("supplied to `" + y + "`, expected `object`.")); var I = n({}, T[b], r); for (var S in I) { var L = r[S]; if (o(r, S) && typeof L != "function") return V(y, R, h, S, N(L)); if (!L) return new A( "Invalid " + R + " `" + h + "` key `" + S + "` supplied to `" + y + "`.\nBad object: " + JSON.stringify(T[b], null, " ") + ` Valid keys: ` + JSON.stringify(Object.keys(r), null, " ") ); var t = L(E, S, y, R, h + "." + S, a); if (t) return t; } return null; } return q(c); } 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 c = u(r); if (c) { var T = c.call(r), b; if (c !== r.entries) { for (; !(b = T.next()).done; ) if (!H(b.value)) return !1; } else for (; !(b = T.next()).done; ) { var y = b.value; if (y && !H(y[1])) return !1; } } else return !1; return !0; default: return !1; } } function se(r, c) { return r === "symbol" ? !0 : c ? c["@@toStringTag"] === "Symbol" || typeof Symbol == "function" && c instanceof Symbol : !1; } function Y(r) { var c = typeof r; return Array.isArray(r) ? "array" : r instanceof RegExp ? "object" : se(c, r) ? "symbol" : c; } function N(r) { if (typeof r > "u" || r === null) return "" + r; var c = Y(r); if (c === "object") { if (r instanceof Date) return "date"; if (r instanceof RegExp) return "regexp"; } return c; } function K(r) { var c = N(r); switch (c) { case "array": case "object": return "an " + c; case "boolean": case "date": case "regexp": return "a " + c; default: return c; } } function ce(r) { return !r.constructor || !r.constructor.name ? v : r.constructor.name; } return g.checkPropTypes = f, g.resetWarningCache = f.resetWarningCache, g.PropTypes = g, g; }, me; } var ve, Ae; function or() { if (Ae) return ve; Ae = 1; var e = /* @__PURE__ */ he(); function n() { } function a() { } return a.resetWarningCache = n, ve = function() { function o(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; } } o.isRequired = o; function f() { return o; } var s = { array: o, bigint: o, bool: o, func: o, number: o, object: o, string: o, symbol: o, any: o, arrayOf: f, element: o, elementType: o, instanceOf: f, node: o, objectOf: f, oneOf: f, oneOfType: f, shape: f, exact: f, checkPropTypes: a, resetWarningCache: n }; return s.PropTypes = s, s; }, ve; } var Ie; function ir() { if (Ie) return Z.exports; if (Ie = 1, process.env.NODE_ENV !== "production") { var e = Le(), n = !0; Z.exports = /* @__PURE__ */ nr()(e.isElement, n); } else Z.exports = /* @__PURE__ */ or()(); return Z.exports; } var ar = /* @__PURE__ */ ir(); const P = /* @__PURE__ */ je(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: Pr, ...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, n) => { const a = De(e); return typeof n == "number" && (n = `${n}px`), n === !0 ? a : n === !1 ? dr(a) : `(${a}: ${n})`; }, yr = (e) => e.join(" and "), mr = (e) => { const n = []; return Object.keys(lr.all).forEach((a) => { const o = e[a]; o != null && n.push(pr(a, o)); }), yr(n); }, vr = Fe(void 0), hr = (e) => e.query || mr(e), qe = (e) => e ? Object.keys(e).reduce((a, o) => (a[De(o)] = e[o], a), {}) : void 0, We = () => { const e = $e(!1); return U(() => { e.current = !0; }, []), e.current; }, br = (e) => { const n = Ue(vr), a = () => qe(e) || qe(n), [o, f] = ee(a); return U(() => { const s = a(); Ze(o, s) || f(s); }, [e, n]), o; }, Er = (e) => { const n = () => hr(e), [a, o] = ee(n); return U(() => { const f = n(); a !== f && o(f); }, [e]), a; }, Tr = (e, n) => { const a = () => Ke(e, n || {}, !!n), [o, f] = ee(a), s = We(); return U(() => { if (s) { const l = a(); return f(l), () => { l && l.dispose(); }; } }, [e, n]), o; }, gr = (e) => { const [n, a] = ee(e.matches); return U(() => { const o = (f) => { a(f.matches); }; return e.addListener(o), a(e.matches), () => { e.removeListener(o); }; }, [e]), n; }, z = (e, n, a) => { const o = br(n), f = Er(e); if (!f) throw new Error("Invalid or missing MediaQuery!"); const s = Tr(f, o), l = gr(s); return We(), U(() => { }, [l]), U(() => () => { s && s.dispose(); }, []), l; }, _r = () => { const e = z({ query: "(min-width: 116rem)" }), n = z({ query: "(min-width: 96rem)" }), a = z({ query: "(min-width: 80rem)" }), o = z({ query: "(min-width: 64rem)" }), f = z({ query: "(min-width: 48rem)" }), s = z({ query: "(min-width: 40rem)" }), l = z({ query: "(max-width: 40rem)" }); return { xxxl: e, xxl: n, xl: a, lg: o, md: f, sm: s, xs: l }; }; export { Ir as useColumns, Sr as useConfirm, qr as useDataTable, Cr as useDocumentTitle, Dr as useFilter, _r as useMediaQuerySizes, $r as useSortable, kr as useTheme }; //# sourceMappingURL=index.es.js.map