UNPKG

react-fluent-grid

Version:

A powerful, customizable data grid component built with React, TypeScript, and TanStack Table v8

1,351 lines (1,349 loc) 875 kB
import * as Ge from "react"; import Ir, { useRef as $r, useMemo as hn, useEffect as tt, useState as Ve, useCallback as rs, useLayoutEffect as gl } from "react"; import { useReactTable as _l, getCoreRowModel as wl, getFilteredRowModel as kl, getPaginationRowModel as yl, getSortedRowModel as El, flexRender as v0 } from "@tanstack/react-table"; import { Check as qt, ChevronRight as yi, Circle as Tl, Sun as Sl, Moon as Fl, Palette as bl, Upload as Al, FileText as Mc, Table as Cl, X as Qr, Settings as Nl, GripVertical as Bc, Eye as jc, EyeOff as Uc, ChevronDown as Ei, ChevronUp as Dl, ChevronLeft as Wc, Filter as Hc, Search as Vc, MoreHorizontal as Rl, Trash2 as Ol, Download as Il, Copy as Pl, ChevronsLeft as ri, ChevronsRight as ti, Minimize2 as zc, Maximize2 as Gc, Save as Ll, Edit as Ma, Pin as en, ArrowUp as g0, ArrowDown as _0, ArrowUpDown as Ml, MoreVerticalIcon as w0, ArrowLeft as Bl, ArrowRight as jl, MoveLeft as Ul, MoveRight as Wl, PinOff as Hl, Text as Vl, Hash as zl, List as Gl, Calendar as $l, BadgeCheck as Xl, Image as Kl, BarChart2 as Yl, Clock as ql } from "lucide-react"; import { Slot as Jl } from "@radix-ui/react-slot"; import { cva as $c } from "class-variance-authority"; import { clsx as Zl } from "clsx"; import { twMerge as Ql } from "tailwind-merge"; import * as ai from "@radix-ui/react-checkbox"; import * as wr from "@radix-ui/react-dropdown-menu"; import * as dn from "@radix-ui/react-popover"; import * as fa from "@radix-ui/react-scroll-area"; import * as gr from "@radix-ui/react-select"; import { DayPicker as eu } from "react-day-picker"; import * as bt from "@radix-ui/react-dialog"; var ru = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}; function tu(e) { return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e; } var ni = { exports: {} }, Ka = {}; /** * @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 k0; function au() { if (k0) return Ka; k0 = 1; var e = Ir, t = Symbol.for("react.element"), r = Symbol.for("react.fragment"), a = Object.prototype.hasOwnProperty, n = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, s = { key: !0, ref: !0, __self: !0, __source: !0 }; function i(c, o, f) { var l, u = {}, d = null, p = null; f !== void 0 && (d = "" + f), o.key !== void 0 && (d = "" + o.key), o.ref !== void 0 && (p = o.ref); for (l in o) a.call(o, l) && !s.hasOwnProperty(l) && (u[l] = o[l]); if (c && c.defaultProps) for (l in o = c.defaultProps, o) u[l] === void 0 && (u[l] = o[l]); return { $$typeof: t, type: c, key: d, ref: p, props: u, _owner: n.current }; } return Ka.Fragment = r, Ka.jsx = i, Ka.jsxs = i, Ka; } var Ya = {}; /** * @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 y0; function nu() { return y0 || (y0 = 1, process.env.NODE_ENV !== "production" && function() { var e = Ir, t = Symbol.for("react.element"), r = Symbol.for("react.portal"), a = Symbol.for("react.fragment"), n = Symbol.for("react.strict_mode"), s = Symbol.for("react.profiler"), i = Symbol.for("react.provider"), c = Symbol.for("react.context"), o = Symbol.for("react.forward_ref"), f = Symbol.for("react.suspense"), l = Symbol.for("react.suspense_list"), u = Symbol.for("react.memo"), d = Symbol.for("react.lazy"), p = Symbol.for("react.offscreen"), v = Symbol.iterator, h = "@@iterator"; function g(x) { if (x === null || typeof x != "object") return null; var _ = v && x[v] || x[h]; return typeof _ == "function" ? _ : null; } var S = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; function A(x) { { for (var _ = arguments.length, F = new Array(_ > 1 ? _ - 1 : 0), b = 1; b < _; b++) F[b - 1] = arguments[b]; w("error", x, F); } } function w(x, _, F) { { var b = S.ReactDebugCurrentFrame, G = b.getStackAddendum(); G !== "" && (_ += "%s", F = F.concat([G])); var Y = F.map(function(V) { return String(V); }); Y.unshift("Warning: " + _), Function.prototype.apply.call(console[x], console, Y); } } var R = !1, H = !1, B = !1, T = !1, E = !1, k; k = Symbol.for("react.module.reference"); function O(x) { return !!(typeof x == "string" || typeof x == "function" || x === a || x === s || E || x === n || x === f || x === l || T || x === p || R || H || B || typeof x == "object" && x !== null && (x.$$typeof === d || x.$$typeof === u || x.$$typeof === i || x.$$typeof === c || x.$$typeof === o || // 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. x.$$typeof === k || x.getModuleId !== void 0)); } function L(x, _, F) { var b = x.displayName; if (b) return b; var G = _.displayName || _.name || ""; return G !== "" ? F + "(" + G + ")" : F; } function I(x) { return x.displayName || "Context"; } function U(x) { if (x == null) return null; if (typeof x.tag == "number" && A("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof x == "function") return x.displayName || x.name || null; if (typeof x == "string") return x; switch (x) { case a: return "Fragment"; case r: return "Portal"; case s: return "Profiler"; case n: return "StrictMode"; case f: return "Suspense"; case l: return "SuspenseList"; } if (typeof x == "object") switch (x.$$typeof) { case c: var _ = x; return I(_) + ".Consumer"; case i: var F = x; return I(F._context) + ".Provider"; case o: return L(x, x.render, "ForwardRef"); case u: var b = x.displayName || null; return b !== null ? b : U(x.type) || "Memo"; case d: { var G = x, Y = G._payload, V = G._init; try { return U(V(Y)); } catch { return null; } } } return null; } var ne = Object.assign, se = 0, he, J, ye, W, we, fe, C; function P() { } P.__reactDisabledLog = !0; function j() { { if (se === 0) { he = console.log, J = console.info, ye = console.warn, W = console.error, we = console.group, fe = console.groupCollapsed, C = console.groupEnd; var x = { configurable: !0, enumerable: !0, value: P, writable: !0 }; Object.defineProperties(console, { info: x, log: x, warn: x, error: x, group: x, groupCollapsed: x, groupEnd: x }); } se++; } } function M() { { if (se--, se === 0) { var x = { configurable: !0, enumerable: !0, writable: !0 }; Object.defineProperties(console, { log: ne({}, x, { value: he }), info: ne({}, x, { value: J }), warn: ne({}, x, { value: ye }), error: ne({}, x, { value: W }), group: ne({}, x, { value: we }), groupCollapsed: ne({}, x, { value: fe }), groupEnd: ne({}, x, { value: C }) }); } se < 0 && A("disabledDepth fell below zero. This is a bug in React. Please file an issue."); } } var q = S.ReactCurrentDispatcher, ce; function Z(x, _, F) { { if (ce === void 0) try { throw Error(); } catch (G) { var b = G.stack.trim().match(/\n( *(at )?)/); ce = b && b[1] || ""; } return ` ` + ce + x; } } var Q = !1, re; { var de = typeof WeakMap == "function" ? WeakMap : Map; re = new de(); } function N(x, _) { if (!x || Q) return ""; { var F = re.get(x); if (F !== void 0) return F; } var b; Q = !0; var G = Error.prepareStackTrace; Error.prepareStackTrace = void 0; var Y; Y = q.current, q.current = null, j(); try { if (_) { var V = function() { throw Error(); }; if (Object.defineProperty(V.prototype, "props", { set: function() { throw Error(); } }), typeof Reflect == "object" && Reflect.construct) { try { Reflect.construct(V, []); } catch (Fe) { b = Fe; } Reflect.construct(x, [], V); } else { try { V.call(); } catch (Fe) { b = Fe; } x.call(V.prototype); } } else { try { throw Error(); } catch (Fe) { b = Fe; } x(); } } catch (Fe) { if (Fe && b && typeof Fe.stack == "string") { for (var z = Fe.stack.split(` `), K = b.stack.split(` `), ae = z.length - 1, le = K.length - 1; ae >= 1 && le >= 0 && z[ae] !== K[le]; ) le--; for (; ae >= 1 && le >= 0; ae--, le--) if (z[ae] !== K[le]) { if (ae !== 1 || le !== 1) do if (ae--, le--, le < 0 || z[ae] !== K[le]) { var ge = ` ` + z[ae].replace(" at new ", " at "); return x.displayName && ge.includes("<anonymous>") && (ge = ge.replace("<anonymous>", x.displayName)), typeof x == "function" && re.set(x, ge), ge; } while (ae >= 1 && le >= 0); break; } } } finally { Q = !1, q.current = Y, M(), Error.prepareStackTrace = G; } var ue = x ? x.displayName || x.name : "", _e = ue ? Z(ue) : ""; return typeof x == "function" && re.set(x, _e), _e; } function Ae(x, _, F) { return N(x, !1); } function Se(x) { var _ = x.prototype; return !!(_ && _.isReactComponent); } function Ee(x, _, F) { if (x == null) return ""; if (typeof x == "function") return N(x, Se(x)); if (typeof x == "string") return Z(x); switch (x) { case f: return Z("Suspense"); case l: return Z("SuspenseList"); } if (typeof x == "object") switch (x.$$typeof) { case o: return Ae(x.render); case u: return Ee(x.type, _, F); case d: { var b = x, G = b._payload, Y = b._init; try { return Ee(Y(G), _, F); } catch { } } } return ""; } var ve = Object.prototype.hasOwnProperty, xe = {}, Te = S.ReactDebugCurrentFrame; function Ie(x) { if (x) { var _ = x._owner, F = Ee(x.type, x._source, _ ? _.type : null); Te.setExtraStackFrame(F); } else Te.setExtraStackFrame(null); } function Je(x, _, F, b, G) { { var Y = Function.call.bind(ve); for (var V in x) if (Y(x, V)) { var z = void 0; try { if (typeof x[V] != "function") { var K = Error((b || "React class") + ": " + F + " type `" + V + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof x[V] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`."); throw K.name = "Invariant Violation", K; } z = x[V](_, V, b, F, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"); } catch (ae) { z = ae; } z && !(z instanceof Error) && (Ie(G), A("%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).", b || "React class", F, V, typeof z), Ie(null)), z instanceof Error && !(z.message in xe) && (xe[z.message] = !0, Ie(G), A("Failed %s type: %s", F, z.message), Ie(null)); } } } var yr = Array.isArray; function ur(x) { return yr(x); } function br(x) { { var _ = typeof Symbol == "function" && Symbol.toStringTag, F = _ && x[Symbol.toStringTag] || x.constructor.name || "Object"; return F; } } function ze(x) { try { return ir(x), !1; } catch { return !0; } } function ir(x) { return "" + x; } function $e(x) { if (ze(x)) return A("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", br(x)), ir(x); } var tr = S.ReactCurrentOwner, Ze = { key: !0, ref: !0, __self: !0, __source: !0 }, Er, te, X; X = {}; function oe(x) { if (ve.call(x, "ref")) { var _ = Object.getOwnPropertyDescriptor(x, "ref").get; if (_ && _.isReactWarning) return !1; } return x.ref !== void 0; } function ke(x) { if (ve.call(x, "key")) { var _ = Object.getOwnPropertyDescriptor(x, "key").get; if (_ && _.isReactWarning) return !1; } return x.key !== void 0; } function Be(x, _) { if (typeof x.ref == "string" && tr.current && _ && tr.current.stateNode !== _) { var F = U(tr.current.type); X[F] || (A('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', U(tr.current.type), x.ref), X[F] = !0); } } function nr(x, _) { { var F = function() { Er || (Er = !0, A("%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)", _)); }; F.isReactWarning = !0, Object.defineProperty(x, "key", { get: F, configurable: !0 }); } } function Pe(x, _) { { var F = function() { te || (te = !0, A("%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)", _)); }; F.isReactWarning = !0, Object.defineProperty(x, "ref", { get: F, configurable: !0 }); } } var Re = function(x, _, F, b, G, Y, V) { var z = { // This tag allows us to uniquely identify this as a React Element $$typeof: t, // Built-in properties that belong on the element type: x, key: _, ref: F, props: V, // Record the component responsible for creating this element. _owner: Y }; return z._store = {}, Object.defineProperty(z._store, "validated", { configurable: !1, enumerable: !1, writable: !0, value: !1 }), Object.defineProperty(z, "_self", { configurable: !1, enumerable: !1, writable: !1, value: b }), Object.defineProperty(z, "_source", { configurable: !1, enumerable: !1, writable: !1, value: G }), Object.freeze && (Object.freeze(z.props), Object.freeze(z)), z; }; function Nr(x, _, F, b, G) { { var Y, V = {}, z = null, K = null; F !== void 0 && ($e(F), z = "" + F), ke(_) && ($e(_.key), z = "" + _.key), oe(_) && (K = _.ref, Be(_, G)); for (Y in _) ve.call(_, Y) && !Ze.hasOwnProperty(Y) && (V[Y] = _[Y]); if (x && x.defaultProps) { var ae = x.defaultProps; for (Y in ae) V[Y] === void 0 && (V[Y] = ae[Y]); } if (z || K) { var le = typeof x == "function" ? x.displayName || x.name || "Unknown" : x; z && nr(V, le), K && Pe(V, le); } return Re(x, z, K, G, b, tr.current, V); } } var Lr = S.ReactCurrentOwner, ut = S.ReactDebugCurrentFrame; function We(x) { if (x) { var _ = x._owner, F = Ee(x.type, x._source, _ ? _.type : null); ut.setExtraStackFrame(F); } else ut.setExtraStackFrame(null); } var qe; qe = !1; function Wr(x) { return typeof x == "object" && x !== null && x.$$typeof === t; } function Ln() { { if (Lr.current) { var x = U(Lr.current.type); if (x) return ` Check the render method of \`` + x + "`."; } return ""; } } function Rs(x) { return ""; } var Mn = {}; function Os(x) { { var _ = Ln(); if (!_) { var F = typeof x == "string" ? x : x.displayName || x.name; F && (_ = ` Check the top-level render call using <` + F + ">."); } return _; } } function Bn(x, _) { { if (!x._store || x._store.validated || x.key != null) return; x._store.validated = !0; var F = Os(_); if (Mn[F]) return; Mn[F] = !0; var b = ""; x && x._owner && x._owner !== Lr.current && (b = " It was passed a child from " + U(x._owner.type) + "."), We(x), A('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', F, b), We(null); } } function jn(x, _) { { if (typeof x != "object") return; if (ur(x)) for (var F = 0; F < x.length; F++) { var b = x[F]; Wr(b) && Bn(b, _); } else if (Wr(x)) x._store && (x._store.validated = !0); else if (x) { var G = g(x); if (typeof G == "function" && G !== x.entries) for (var Y = G.call(x), V; !(V = Y.next()).done; ) Wr(V.value) && Bn(V.value, _); } } } function Is(x) { { var _ = x.type; if (_ == null || typeof _ == "string") return; var F; if (typeof _ == "function") F = _.propTypes; else if (typeof _ == "object" && (_.$$typeof === o || // Note: Memo only checks outer props here. // Inner props are checked in the reconciler. _.$$typeof === u)) F = _.propTypes; else return; if (F) { var b = U(_); Je(F, x.props, "prop", b, x); } else if (_.PropTypes !== void 0 && !qe) { qe = !0; var G = U(_); A("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", G || "Unknown"); } typeof _.getDefaultProps == "function" && !_.getDefaultProps.isReactClassApproved && A("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead."); } } function Ps(x) { { for (var _ = Object.keys(x.props), F = 0; F < _.length; F++) { var b = _[F]; if (b !== "children" && b !== "key") { We(x), A("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", b), We(null); break; } } x.ref !== null && (We(x), A("Invalid attribute `ref` supplied to `React.Fragment`."), We(null)); } } var ba = {}; function Un(x, _, F, b, G, Y) { { var V = O(x); if (!V) { var z = ""; (x === void 0 || typeof x == "object" && x !== null && Object.keys(x).length === 0) && (z += " 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 K = Rs(); K ? z += K : z += Ln(); var ae; x === null ? ae = "null" : ur(x) ? ae = "array" : x !== void 0 && x.$$typeof === t ? (ae = "<" + (U(x.type) || "Unknown") + " />", z = " Did you accidentally export a JSX literal instead of a component?") : ae = typeof x, A("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", ae, z); } var le = Nr(x, _, F, G, Y); if (le == null) return le; if (V) { var ge = _.children; if (ge !== void 0) if (b) if (ur(ge)) { for (var ue = 0; ue < ge.length; ue++) jn(ge[ue], x); Object.freeze && Object.freeze(ge); } else A("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 jn(ge, x); } if (ve.call(_, "key")) { var _e = U(x), Fe = Object.keys(_).filter(function(Dr) { return Dr !== "key"; }), sr = Fe.length > 0 ? "{key: someKey, " + Fe.join(": ..., ") + ": ...}" : "{key: someKey}"; if (!ba[_e + sr]) { var cr = Fe.length > 0 ? "{" + Fe.join(": ..., ") + ": ...}" : "{}"; A(`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} />`, sr, _e, cr, _e), ba[_e + sr] = !0; } } return x === a ? Ps(le) : Is(le), le; } } function Ls(x, _, F) { return Un(x, _, F, !0); } function Ms(x, _, F) { return Un(x, _, F, !1); } var y = Ms, D = Ls; Ya.Fragment = a, Ya.jsx = y, Ya.jsxs = D; }()), Ya; } process.env.NODE_ENV === "production" ? ni.exports = au() : ni.exports = nu(); var m = ni.exports; function je(...e) { return Ql(Zl(e)); } const si = $c( "inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0", { variants: { variant: { default: "bg-primary text-primary-foreground hover:bg-primary/90", destructive: "bg-destructive text-destructive-foreground hover:bg-destructive/90", outline: "border border-input bg-background hover:bg-accent hover:text-accent-foreground", secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80", ghost: "hover:bg-accent hover:text-accent-foreground", link: "text-primary underline-offset-4 hover:underline" }, size: { default: "h-10 px-4 py-2", sm: "h-9 rounded-md px-3", lg: "h-11 rounded-md px-8", icon: "h-10 w-10" } }, defaultVariants: { variant: "default", size: "default" } } ), Ne = Ge.forwardRef( ({ className: e, variant: t, size: r, asChild: a = !1, ...n }, s) => { const i = a ? Jl : "button"; return /* @__PURE__ */ m.jsx( i, { className: je(si({ variant: t, size: r, className: e })), ref: s, ...n } ); } ); Ne.displayName = "Button"; const xa = Ge.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ m.jsx( ai.Root, { ref: r, className: je( "peer h-4 w-4 shrink-0 rounded-sm border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground", e ), ...t, children: /* @__PURE__ */ m.jsx( ai.Indicator, { className: je("flex items-center justify-center text-current"), children: /* @__PURE__ */ m.jsx(qt, { className: "h-4 w-4" }) } ) } )); xa.displayName = ai.Root.displayName; const Ti = wr.Root, Si = wr.Trigger, su = Ge.forwardRef(({ className: e, inset: t, children: r, ...a }, n) => /* @__PURE__ */ m.jsxs( wr.SubTrigger, { ref: n, className: je( "flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent", t && "pl-8", e ), ...a, children: [ r, /* @__PURE__ */ m.jsx(yi, { className: "ml-auto h-4 w-4" }) ] } )); su.displayName = wr.SubTrigger.displayName; const iu = Ge.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ m.jsx( wr.SubContent, { ref: r, className: je( "z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2", e ), ...t } )); iu.displayName = wr.SubContent.displayName; const ws = Ge.forwardRef(({ className: e, sideOffset: t = 4, ...r }, a) => /* @__PURE__ */ m.jsx(wr.Portal, { children: /* @__PURE__ */ m.jsx( wr.Content, { ref: a, sideOffset: t, className: je( "z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2", e ), ...r } ) })); ws.displayName = wr.Content.displayName; const st = Ge.forwardRef(({ className: e, inset: t, ...r }, a) => /* @__PURE__ */ m.jsx( wr.Item, { ref: a, className: je( "relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50", t && "pl-8", e ), ...r } )); st.displayName = wr.Item.displayName; const cu = Ge.forwardRef(({ className: e, children: t, checked: r, ...a }, n) => /* @__PURE__ */ m.jsxs( wr.CheckboxItem, { ref: n, className: je( "relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50", e ), checked: r, ...a, children: [ /* @__PURE__ */ m.jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ m.jsx(wr.ItemIndicator, { children: /* @__PURE__ */ m.jsx(qt, { className: "h-4 w-4" }) }) }), t ] } )); cu.displayName = wr.CheckboxItem.displayName; const ou = Ge.forwardRef(({ className: e, children: t, ...r }, a) => /* @__PURE__ */ m.jsxs( wr.RadioItem, { ref: a, className: je( "relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50", e ), ...r, children: [ /* @__PURE__ */ m.jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ m.jsx(wr.ItemIndicator, { children: /* @__PURE__ */ m.jsx(Tl, { className: "h-2 w-2 fill-current" }) }) }), t ] } )); ou.displayName = wr.RadioItem.displayName; const fu = Ge.forwardRef(({ className: e, inset: t, ...r }, a) => /* @__PURE__ */ m.jsx( wr.Label, { ref: a, className: je( "px-2 py-1.5 text-sm font-semibold", t && "pl-8", e ), ...r } )); fu.displayName = wr.Label.displayName; const lu = Ge.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ m.jsx( wr.Separator, { ref: r, className: je("-mx-1 my-1 h-px bg-muted", e), ...t } )); lu.displayName = wr.Separator.displayName; const uu = 1, hu = 1e6; let js = 0; function du() { return js = (js + 1) % Number.MAX_SAFE_INTEGER, js.toString(); } const Us = /* @__PURE__ */ new Map(), E0 = (e) => { if (Us.has(e)) return; const t = setTimeout(() => { Us.delete(e), rn({ type: "REMOVE_TOAST", toastId: e }); }, hu); Us.set(e, t); }, xu = (e, t) => { switch (t.type) { case "ADD_TOAST": return { ...e, toasts: [t.toast, ...e.toasts].slice(0, uu) }; case "UPDATE_TOAST": return { ...e, toasts: e.toasts.map( (r) => r.id === t.toast.id ? { ...r, ...t.toast } : r ) }; case "DISMISS_TOAST": { const { toastId: r } = t; return r ? E0(r) : e.toasts.forEach((a) => { E0(a.id); }), { ...e, toasts: e.toasts.map( (a) => a.id === r || r === void 0 ? { ...a, open: !1 } : a ) }; } case "REMOVE_TOAST": return t.toastId === void 0 ? { ...e, toasts: [] } : { ...e, toasts: e.toasts.filter((r) => r.id !== t.toastId) }; } }, ts = []; let as = { toasts: [] }; function rn(e) { as = xu(as, e), ts.forEach((t) => { t(as); }); } function pu({ ...e }) { const t = du(), r = (n) => rn({ type: "UPDATE_TOAST", toast: { ...n, id: t } }), a = () => rn({ type: "DISMISS_TOAST", toastId: t }); return rn({ type: "ADD_TOAST", toast: { ...e, id: t, open: !0, onOpenChange: (n) => { n || a(); } } }), { id: t, dismiss: a, update: r }; } function Xc() { const [e, t] = Ge.useState(as); return Ge.useEffect(() => (ts.push(t), () => { const r = ts.indexOf(t); r > -1 && ts.splice(r, 1); }), [e]), { ...e, toast: pu, dismiss: (r) => rn({ type: "DISMISS_TOAST", toastId: r }) }; } function ks() { return (ks = Object.assign || function(e) { for (var t = 1; t < arguments.length; t++) { var r = arguments[t]; for (var a in r) Object.prototype.hasOwnProperty.call(r, a) && (e[a] = r[a]); } return e; }).apply(this, arguments); } function Kc(e, t) { if (e == null) return {}; var r, a, n = {}, s = Object.keys(e); for (a = 0; a < s.length; a++) t.indexOf(r = s[a]) >= 0 || (n[r] = e[r]); return n; } function ii(e) { var t = $r(e), r = $r(function(a) { t.current && t.current(a); }); return t.current = e, r.current; } var xn = function(e, t, r) { return t === void 0 && (t = 0), r === void 0 && (r = 1), e > r ? r : e < t ? t : e; }, tn = function(e) { return "touches" in e; }, ci = function(e) { return e && e.ownerDocument.defaultView || self; }, T0 = function(e, t, r) { var a = e.getBoundingClientRect(), n = tn(t) ? function(s, i) { for (var c = 0; c < s.length; c++) if (s[c].identifier === i) return s[c]; return s[0]; }(t.touches, r) : t; return { left: xn((n.pageX - (a.left + ci(e).pageXOffset)) / a.width), top: xn((n.pageY - (a.top + ci(e).pageYOffset)) / a.height) }; }, S0 = function(e) { !tn(e) && e.preventDefault(); }, Yc = Ir.memo(function(e) { var t = e.onMove, r = e.onKey, a = Kc(e, ["onMove", "onKey"]), n = $r(null), s = ii(t), i = ii(r), c = $r(null), o = $r(!1), f = hn(function() { var p = function(g) { S0(g), (tn(g) ? g.touches.length > 0 : g.buttons > 0) && n.current ? s(T0(n.current, g, c.current)) : h(!1); }, v = function() { return h(!1); }; function h(g) { var S = o.current, A = ci(n.current), w = g ? A.addEventListener : A.removeEventListener; w(S ? "touchmove" : "mousemove", p), w(S ? "touchend" : "mouseup", v); } return [function(g) { var S = g.nativeEvent, A = n.current; if (A && (S0(S), !function(R, H) { return H && !tn(R); }(S, o.current) && A)) { if (tn(S)) { o.current = !0; var w = S.changedTouches || []; w.length && (c.current = w[0].identifier); } A.focus(), s(T0(A, S, c.current)), h(!0); } }, function(g) { var S = g.which || g.keyCode; S < 37 || S > 40 || (g.preventDefault(), i({ left: S === 39 ? 0.05 : S === 37 ? -0.05 : 0, top: S === 40 ? 0.05 : S === 38 ? -0.05 : 0 })); }, h]; }, [i, s]), l = f[0], u = f[1], d = f[2]; return tt(function() { return d; }, [d]), Ir.createElement("div", ks({}, a, { onTouchStart: l, onMouseDown: l, className: "react-colorful__interactive", ref: n, onKeyDown: u, tabIndex: 0, role: "slider" })); }), Fi = function(e) { return e.filter(Boolean).join(" "); }, qc = function(e) { var t = e.color, r = e.left, a = e.top, n = a === void 0 ? 0.5 : a, s = Fi(["react-colorful__pointer", e.className]); return Ir.createElement("div", { className: s, style: { top: 100 * n + "%", left: 100 * r + "%" } }, Ir.createElement("div", { className: "react-colorful__pointer-fill", style: { backgroundColor: t } })); }, Ur = function(e, t, r) { return t === void 0 && (t = 0), r === void 0 && (r = Math.pow(10, t)), Math.round(r * e) / r; }, mu = function(e) { return ku(oi(e)); }, oi = function(e) { return e[0] === "#" && (e = e.substring(1)), e.length < 6 ? { r: parseInt(e[0] + e[0], 16), g: parseInt(e[1] + e[1], 16), b: parseInt(e[2] + e[2], 16), a: e.length === 4 ? Ur(parseInt(e[3] + e[3], 16) / 255, 2) : 1 } : { r: parseInt(e.substring(0, 2), 16), g: parseInt(e.substring(2, 4), 16), b: parseInt(e.substring(4, 6), 16), a: e.length === 8 ? Ur(parseInt(e.substring(6, 8), 16) / 255, 2) : 1 }; }, vu = function(e) { return wu(_u(e)); }, gu = function(e) { var t = e.s, r = e.v, a = e.a, n = (200 - t) * r / 100; return { h: Ur(e.h), s: Ur(n > 0 && n < 200 ? t * r / 100 / (n <= 100 ? n : 200 - n) * 100 : 0), l: Ur(n / 2), a: Ur(a, 2) }; }, fi = function(e) { var t = gu(e); return "hsl(" + t.h + ", " + t.s + "%, " + t.l + "%)"; }, _u = function(e) { var t = e.h, r = e.s, a = e.v, n = e.a; t = t / 360 * 6, r /= 100, a /= 100; var s = Math.floor(t), i = a * (1 - r), c = a * (1 - (t - s) * r), o = a * (1 - (1 - t + s) * r), f = s % 6; return { r: Ur(255 * [a, c, i, i, o, a][f]), g: Ur(255 * [o, a, a, c, i, i][f]), b: Ur(255 * [i, i, o, a, a, c][f]), a: Ur(n, 2) }; }, Wn = function(e) { var t = e.toString(16); return t.length < 2 ? "0" + t : t; }, wu = function(e) { var t = e.r, r = e.g, a = e.b, n = e.a, s = n < 1 ? Wn(Ur(255 * n)) : ""; return "#" + Wn(t) + Wn(r) + Wn(a) + s; }, ku = function(e) { var t = e.r, r = e.g, a = e.b, n = e.a, s = Math.max(t, r, a), i = s - Math.min(t, r, a), c = i ? s === t ? (r - a) / i : s === r ? 2 + (a - t) / i : 4 + (t - r) / i : 0; return { h: Ur(60 * (c < 0 ? c + 6 : c)), s: Ur(s ? i / s * 100 : 0), v: Ur(s / 255 * 100), a: n }; }, yu = Ir.memo(function(e) { var t = e.hue, r = e.onChange, a = Fi(["react-colorful__hue", e.className]); return Ir.createElement("div", { className: a }, Ir.createElement(Yc, { onMove: function(n) { r({ h: 360 * n.left }); }, onKey: function(n) { r({ h: xn(t + 360 * n.left, 0, 360) }); }, "aria-label": "Hue", "aria-valuenow": Ur(t), "aria-valuemax": "360", "aria-valuemin": "0" }, Ir.createElement(qc, { className: "react-colorful__hue-pointer", left: t / 360, color: fi({ h: t, s: 100, v: 100, a: 1 }) }))); }), Eu = Ir.memo(function(e) { var t = e.hsva, r = e.onChange, a = { backgroundColor: fi({ h: t.h, s: 100, v: 100, a: 1 }) }; return Ir.createElement("div", { className: "react-colorful__saturation", style: a }, Ir.createElement(Yc, { onMove: function(n) { r({ s: 100 * n.left, v: 100 - 100 * n.top }); }, onKey: function(n) { r({ s: xn(t.s + 100 * n.left, 0, 100), v: xn(t.v - 100 * n.top, 0, 100) }); }, "aria-label": "Color", "aria-valuetext": "Saturation " + Ur(t.s) + "%, Brightness " + Ur(t.v) + "%" }, Ir.createElement(qc, { className: "react-colorful__saturation-pointer", top: 1 - t.v / 100, left: t.s / 100, color: fi(t) }))); }), Jc = function(e, t) { if (e === t) return !0; for (var r in e) if (e[r] !== t[r]) return !1; return !0; }, Tu = function(e, t) { return e.toLowerCase() === t.toLowerCase() || Jc(oi(e), oi(t)); }; function Su(e, t, r) { var a = ii(r), n = Ve(function() { return e.toHsva(t); }), s = n[0], i = n[1], c = $r({ color: t, hsva: s }); tt(function() { if (!e.equal(t, c.current.color)) { var f = e.toHsva(t); c.current = { hsva: f, color: t }, i(f); } }, [t, e]), tt(function() { var f; Jc(s, c.current.hsva) || e.equal(f = e.fromHsva(s), c.current.color) || (c.current = { hsva: s, color: f }, a(f)); }, [s, e, a]); var o = rs(function(f) { i(function(l) { return Object.assign({}, l, f); }); }, []); return [s, o]; } var Fu = typeof window < "u" ? gl : tt, bu = function() { return typeof __webpack_nonce__ < "u" ? __webpack_nonce__ : void 0; }, F0 = /* @__PURE__ */ new Map(), Au = function(e) { Fu(function() { var t = e.current ? e.current.ownerDocument : document; if (t !== void 0 && !F0.has(t)) { var r = t.createElement("style"); r.innerHTML = `.react-colorful{position:relative;display:flex;flex-direction:column;width:200px;height:200px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.react-colorful__saturation{position:relative;flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(0deg,#000,transparent),linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.react-colorful__alpha-gradient,.react-colorful__pointer-fill{content:"";position:absolute;left:0;top:0;right:0;bottom:0;pointer-events:none;border-radius:inherit}.react-colorful__alpha-gradient,.react-colorful__saturation{box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}.react-colorful__alpha,.react-colorful__hue{position:relative;height:24px}.react-colorful__hue{background:linear-gradient(90deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}.react-colorful__last-control{border-radius:0 0 8px 8px}.react-colorful__interactive{position:absolute;left:0;top:0;right:0;bottom:0;border-radius:inherit;outline:none;touch-action:none}.react-colorful__pointer{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}.react-colorful__interactive:focus .react-colorful__pointer{transform:translate(-50%,-50%) scale(1.1)}.react-colorful__alpha,.react-colorful__alpha-pointer{background-color:#fff;background-image:url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill-opacity=".05"><path d="M8 0h8v8H8zM0 8h8v8H0z"/></svg>')}.react-colorful__saturation-pointer{z-index:3}.react-colorful__hue-pointer{z-index:2}`, F0.set(t, r); var a = bu(); a && r.setAttribute("nonce", a), t.head.appendChild(r); } }, []); }, Cu = function(e) { var t = e.className, r = e.colorModel, a = e.color, n = a === void 0 ? r.defaultColor : a, s = e.onChange, i = Kc(e, ["className", "colorModel", "color", "onChange"]), c = $r(null); Au(c); var o = Su(r, n, s), f = o[0], l = o[1], u = Fi(["react-colorful", t]); return Ir.createElement("div", ks({}, i, { ref: c, className: u }), Ir.createElement(Eu, { hsva: f, onChange: l }), Ir.createElement(yu, { hue: f.h, onChange: l, className: "react-colorful__last-control" })); }, Nu = { defaultColor: "000", toHsva: mu, fromHsva: function(e) { return vu({ h: e.h, s: e.s, v: e.v, a: 1 }); }, equal: Tu }, Du = function(e) { return Ir.createElement(Cu, ks({}, e, { colorModel: Nu })); }; const bi = dn.Root, Ai = dn.Trigger, ys = Ge.forwardRef(({ className: e, align: t = "center", sideOffset: r = 4, ...a }, n) => /* @__PURE__ */ m.jsx(dn.Portal, { children: /* @__PURE__ */ m.jsx( dn.Content, { ref: n, align: t, sideOffset: r, className: je( "z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2", e ), ...a } ) })); ys.displayName = dn.Content.displayName; const Zc = Ge.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ m.jsx( "div", { ref: r, className: je( "rounded-lg border bg-card text-card-foreground shadow-sm", e ), ...t } )); Zc.displayName = "Card"; const Ru = Ge.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ m.jsx( "div", { ref: r, className: je("flex flex-col space-y-1.5 p-6", e), ...t } )); Ru.displayName = "CardHeader"; const Ou = Ge.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ m.jsx( "h3", { ref: r, className: je( "text-2xl font-semibold leading-none tracking-tight", e ), ...t } )); Ou.displayName = "CardTitle"; const Iu = Ge.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ m.jsx( "p", { ref: r, className: je("text-sm text-muted-foreground", e), ...t } )); Iu.displayName = "CardDescription"; const Pu = Ge.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ m.jsx("div", { ref: r, className: je("p-6 pt-0", e), ...t })); Pu.displayName = "CardContent"; const Lu = Ge.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ m.jsx( "div", { ref: r, className: je("flex items-center p-6 pt-0", e), ...t } )); Lu.displayName = "CardFooter"; const Mu = [ "#3B82F6", // Blue "#8B5CF6", // Purple "#10B981", // Green "#F59E0B", // Amber "#EF4444", // Red "#EC4899", // Pink "#6366F1", // Indigo "#14B8A6" // Teal ]; function Bu({ theme: e, onThemeChange: t }) { const [r, a] = Ve(!1), [n, s] = Ve(e.primaryColor || "#3B82F6"), i = (f) => { s(f); }, c = (f) => { const l = ju(f); document.documentElement.style.setProperty("--primary", l), document.documentElement.style.setProperty("--primary-hover", `${l.split(" ")[0]} ${l.split(" ")[1]} ${Math.max(parseInt(l.split(" ")[2]) - 5, 5)}%`), document.documentElement.style.setProperty("--primary-light", `${l.split(" ")[0]} ${l.split(" ")[1]} 85%`), t({ ...e, primaryColor: f }), a(!1); }, o = () => { const f = e.mode === "light" ? "dark" : "light"; document.documentElement.classList.toggle("dark", f === "dark"), t({ ...e, mode: f }); }; return /* @__PURE__ */ m.jsxs("div", { className: "flex items-center gap-2", children: [ /* @__PURE__ */ m.jsxs( Ne, { variant: "outline", size: "sm", onClick: o, className: "flex items-center gap-2", children: [ e.mode === "light" ? /* @__PURE__ */ m.jsx(Sl, { className: "w-4 h-4" }) : /* @__PURE__ */ m.jsx(Fl, { className: "w-4 h-4" }), e.mode === "light" ? "Light" : "Dark" ] } ), /* @__PURE__ */ m.jsxs(bi, { open: r, onOpenChange: a, children: [ /* @__PURE__ */ m.jsx(Ai, { asChild: !0, children: /* @__PURE__ */ m.jsxs(Ne, { variant: "outline", size: "sm", className: "flex items-center gap-2", children: [ /* @__PURE__ */ m.jsx(bl, { className: "w-4 h-4" }), "Theme" ] }) }), /* @__PURE__ */ m.jsx(ys, { className: "w-80 p-4", align: "end", children: /* @__PURE__ */ m.jsx(Zc, { className: "p-4", children: /* @__PURE__ */ m.jsxs("div", { className: "space-y-4", children: [ /* @__PURE__ */ m.jsxs("div", { children: [ /* @__PURE__ */ m.jsx("h4", { className: "text-sm font-medium mb-3", children: "Choose Primary Color" }), /* @__PURE__ */ m.jsx("div", { className: "grid grid-cols-4 gap-2 mb-4", children: Mu.map((f) => /* @__PURE__ */ m.jsx( "button", { className: "w-8 h-8 rounded border-2 border-border hover:scale-110 transition-transform", style: { backgroundColor: f }, onClick: () => c(f) }, f )) }) ] }), /* @__PURE__ */ m.jsxs("div", { children: [ /* @__PURE__ */ m.jsx("h4", { className: "text-sm font-medium mb-3", children: "Custom Color" }), /* @__PURE__ */ m.jsxs("div", { className: "space-y-3", children: [ /* @__PURE__ */ m.jsx( Du, { color: n, onChange: i, style: { width: "100%", height: "150px" } } ), /* @__PURE__ */ m.jsxs("div", { className: "flex items-center gap-2", children: [ /* @__PURE__ */ m.jsx( "input", { type: "text", value: n, onChange: (f) => s(f.target.value), className: "flex-1 px-2 py-1 text-sm border rounded bg-background", placeholder: "#3B82F6" } ), /* @__PURE__ */ m.jsx(Ne, { size: "sm", onClick: () => c(n), children: "Apply" }) ] }) ] }) ] }) ] }) }) }) ] }) ] }); } function ju(e) { const t = parseInt(e.slice(1, 3), 16) / 255, r = parseInt(e.slice(3, 5), 16) / 255, a = parseInt(e.slice(5, 7), 16) / 255, n = Math.max(t, r, a), s = Math.min(t, r, a); let i, c, o = (n + s) / 2; if (n === s) i = c = 0; else { const f = n - s; switch (c = o > 0.5 ? f / (2 - n - s) : f / (n + s), n) { case t: i = (r - a) / f + (r < a ? 6 : 0); break; case r: i = (a - t) / f + 2; break; case a: i = (t - r) / f + 4; break; default: i = 0; } i /= 6; } return `${Math.round(i * 360)} ${Math.round(c * 100)}% ${Math.round(o * 100)}%`; } /*! xlsx.js (C) 2013-present SheetJS -- http://sheetjs.com */ var ss = {}; ss.version = "0.18.5"; var Qc = 1252, Uu = [874, 932, 936, 949, 950, 1250, 1251, 1252, 1253, 1254, 1255, 1256, 1257, 1258, 1e4], Ci = { /*::[*/ 0: 1252, /* ANSI */ /*::[*/ 1: 65001, /* DEFAULT */ /*::[*/ 2: 65001, /* SYMBOL */ /*::[*/ 77: 1e4, /* MAC */ /*::[*/ 128: 932, /* SHIFTJIS */ /*::[*/ 129: 949, /* HANGUL */ /*::[*/ 130: 1361, /* JOHAB */ /*::[*/ 134: 936, /* GB2312 */ /*::[*/ 136: 950, /* CHINESEBIG5 */ /*::[*/ 161: 1253, /* GREEK */ /*::[*/ 162: 1254, /* TURKISH */ /*::[*/ 163: 1258, /* VIETNAMESE */ /*::[*/ 177: 1255, /* HEBREW */ /*::[*/ 178: 1256, /* ARABIC */ /*::[*/ 186: 1257, /* BALTIC */ /*::[*/ 204: 1251, /* RUSSIAN */ /*::[*/ 222: 874, /* THAI */ /*::[*/ 238: 1250, /* EASTEUROPE */ /*::[*/ 255: 1252, /* OEM */ /*::[*/ 69: 6969 /* MISC */ }, Ni = function(e) { Uu.indexOf(e) != -1 && (Qc = Ci[0] = e); }; function Wu() { Ni(1252); } var Et = function(e) { Ni(e); }; function Di() { Et(1200), Wu(); } function b0(e) { for (var t = [], r = 0, a = e.length; r < a; ++r) t[r] = e.charCodeAt(r); return t; } function Hu(e) { for (var t = [], r = 0; r < e.length >> 1; ++r) t[r] = String.fromCharCode(e.charCodeAt(2 * r) + (e.charCodeAt(2 * r + 1) << 8)); return t.join(""); } function eo(e) { for (var t = [], r = 0; r < e.length >> 1; ++r) t[r] = String.fromCharCode(e.charCodeAt(2 * r + 1) + (e.charCodeAt(2 * r) << 8)); return t.join(""); } var Ja = function(e) { var t = e.charCodeAt(0), r = e.charCodeAt(1); return t == 255 && r == 254 ? Hu(e.slice(2)) : t == 254 && r == 255 ? eo(e.slice(2)) : t == 65279 ? e.slice(1) : e; }, Hn = function(t) { return String.fromCharCode(t); }, A0 = function(t) { return String.fromCharCode(t); }, zt, Kt = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="; function pn(e) { for (var t = "", r =