UNPKG

react-excel-exporter

Version:

Library for exporting data to Excel made with React and ViteJS.

1,388 lines (1,385 loc) 1.4 MB
import Ae from "react"; var Kt = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}; function wr(At) { return At && At.__esModule && Object.prototype.hasOwnProperty.call(At, "default") ? At.default : At; } var Qe = { exports: {} }, Ne = {}; /** * @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 ir; function _r() { if (ir) return Ne; ir = 1; var At = Ae, pe = Symbol.for("react.element"), o = Symbol.for("react.fragment"), E = Object.prototype.hasOwnProperty, k = At.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, m = { key: !0, ref: !0, __self: !0, __source: !0 }; function s(a, n, t) { var e, l = {}, r = null, i = null; t !== void 0 && (r = "" + t), n.key !== void 0 && (r = "" + n.key), n.ref !== void 0 && (i = n.ref); for (e in n) E.call(n, e) && !m.hasOwnProperty(e) && (l[e] = n[e]); if (a && a.defaultProps) for (e in n = a.defaultProps, n) l[e] === void 0 && (l[e] = n[e]); return { $$typeof: pe, type: a, key: r, ref: i, props: l, _owner: k.current }; } return Ne.Fragment = o, Ne.jsx = s, Ne.jsxs = s, Ne; } var De = {}; /** * @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 sr; function xr() { return sr || (sr = 1, process.env.NODE_ENV !== "production" && function() { var At = Ae, pe = Symbol.for("react.element"), o = Symbol.for("react.portal"), E = Symbol.for("react.fragment"), k = Symbol.for("react.strict_mode"), m = Symbol.for("react.profiler"), s = Symbol.for("react.provider"), a = Symbol.for("react.context"), n = Symbol.for("react.forward_ref"), t = Symbol.for("react.suspense"), e = Symbol.for("react.suspense_list"), l = Symbol.for("react.memo"), r = Symbol.for("react.lazy"), i = Symbol.for("react.offscreen"), f = Symbol.iterator, c = "@@iterator"; function u(Z) { if (Z === null || typeof Z != "object") return null; var ut = f && Z[f] || Z[c]; return typeof ut == "function" ? ut : null; } var d = At.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; function h(Z) { { for (var ut = arguments.length, lt = new Array(ut > 1 ? ut - 1 : 0), bt = 1; bt < ut; bt++) lt[bt - 1] = arguments[bt]; v("error", Z, lt); } } function v(Z, ut, lt) { { var bt = d.ReactDebugCurrentFrame, xt = bt.getStackAddendum(); xt !== "" && (ut += "%s", lt = lt.concat([xt])); var wt = lt.map(function(Et) { return String(Et); }); wt.unshift("Warning: " + ut), Function.prototype.apply.call(console[Z], console, wt); } } var x = !1, C = !1, P = !1, L = !1, I = !1, N; N = Symbol.for("react.module.reference"); function F(Z) { return !!(typeof Z == "string" || typeof Z == "function" || Z === E || Z === m || I || Z === k || Z === t || Z === e || L || Z === i || x || C || P || typeof Z == "object" && Z !== null && (Z.$$typeof === r || Z.$$typeof === l || Z.$$typeof === s || Z.$$typeof === a || Z.$$typeof === n || // 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. Z.$$typeof === N || Z.getModuleId !== void 0)); } function $(Z, ut, lt) { var bt = Z.displayName; if (bt) return bt; var xt = ut.displayName || ut.name || ""; return xt !== "" ? lt + "(" + xt + ")" : lt; } function B(Z) { return Z.displayName || "Context"; } function S(Z) { if (Z == null) return null; if (typeof Z.tag == "number" && h("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof Z == "function") return Z.displayName || Z.name || null; if (typeof Z == "string") return Z; switch (Z) { case E: return "Fragment"; case o: return "Portal"; case m: return "Profiler"; case k: return "StrictMode"; case t: return "Suspense"; case e: return "SuspenseList"; } if (typeof Z == "object") switch (Z.$$typeof) { case a: var ut = Z; return B(ut) + ".Consumer"; case s: var lt = Z; return B(lt._context) + ".Provider"; case n: return $(Z, Z.render, "ForwardRef"); case l: var bt = Z.displayName || null; return bt !== null ? bt : S(Z.type) || "Memo"; case r: { var xt = Z, wt = xt._payload, Et = xt._init; try { return S(Et(wt)); } catch { return null; } } } return null; } var M = Object.assign, w = 0, p, b, g, y, _, R, O; function z() { } z.__reactDisabledLog = !0; function U() { { if (w === 0) { p = console.log, b = console.info, g = console.warn, y = console.error, _ = console.group, R = console.groupCollapsed, O = console.groupEnd; var Z = { configurable: !0, enumerable: !0, value: z, writable: !0 }; Object.defineProperties(console, { info: Z, log: Z, warn: Z, error: Z, group: Z, groupCollapsed: Z, groupEnd: Z }); } w++; } } function q() { { if (w--, w === 0) { var Z = { configurable: !0, enumerable: !0, writable: !0 }; Object.defineProperties(console, { log: M({}, Z, { value: p }), info: M({}, Z, { value: b }), warn: M({}, Z, { value: g }), error: M({}, Z, { value: y }), group: M({}, Z, { value: _ }), groupCollapsed: M({}, Z, { value: R }), groupEnd: M({}, Z, { value: O }) }); } w < 0 && h("disabledDepth fell below zero. This is a bug in React. Please file an issue."); } } var j = d.ReactCurrentDispatcher, H; function A(Z, ut, lt) { { if (H === void 0) try { throw Error(); } catch (xt) { var bt = xt.stack.trim().match(/\n( *(at )?)/); H = bt && bt[1] || ""; } return ` ` + H + Z; } } var T = !1, D; { var V = typeof WeakMap == "function" ? WeakMap : Map; D = new V(); } function X(Z, ut) { if (!Z || T) return ""; { var lt = D.get(Z); if (lt !== void 0) return lt; } var bt; T = !0; var xt = Error.prepareStackTrace; Error.prepareStackTrace = void 0; var wt; wt = j.current, j.current = null, U(); try { if (ut) { var Et = function() { throw Error(); }; if (Object.defineProperty(Et.prototype, "props", { set: function() { throw Error(); } }), typeof Reflect == "object" && Reflect.construct) { try { Reflect.construct(Et, []); } catch (G) { bt = G; } Reflect.construct(Z, [], Et); } else { try { Et.call(); } catch (G) { bt = G; } Z.call(Et.prototype); } } else { try { throw Error(); } catch (G) { bt = G; } Z(); } } catch (G) { if (G && bt && typeof G.stack == "string") { for (var _t = G.stack.split(` `), Ft = bt.stack.split(` `), qt = _t.length - 1, Ht = Ft.length - 1; qt >= 1 && Ht >= 0 && _t[qt] !== Ft[Ht]; ) Ht--; for (; qt >= 1 && Ht >= 0; qt--, Ht--) if (_t[qt] !== Ft[Ht]) { if (qt !== 1 || Ht !== 1) do if (qt--, Ht--, Ht < 0 || _t[qt] !== Ft[Ht]) { var ae = ` ` + _t[qt].replace(" at new ", " at "); return Z.displayName && ae.includes("<anonymous>") && (ae = ae.replace("<anonymous>", Z.displayName)), typeof Z == "function" && D.set(Z, ae), ae; } while (qt >= 1 && Ht >= 0); break; } } } finally { T = !1, j.current = wt, q(), Error.prepareStackTrace = xt; } var me = Z ? Z.displayName || Z.name : "", ye = me ? A(me) : ""; return typeof Z == "function" && D.set(Z, ye), ye; } function W(Z, ut, lt) { return X(Z, !1); } function K(Z) { var ut = Z.prototype; return !!(ut && ut.isReactComponent); } function et(Z, ut, lt) { if (Z == null) return ""; if (typeof Z == "function") return X(Z, K(Z)); if (typeof Z == "string") return A(Z); switch (Z) { case t: return A("Suspense"); case e: return A("SuspenseList"); } if (typeof Z == "object") switch (Z.$$typeof) { case n: return W(Z.render); case l: return et(Z.type, ut, lt); case r: { var bt = Z, xt = bt._payload, wt = bt._init; try { return et(wt(xt), ut, lt); } catch { } } } return ""; } var rt = Object.prototype.hasOwnProperty, Y = {}, Q = d.ReactDebugCurrentFrame; function J(Z) { if (Z) { var ut = Z._owner, lt = et(Z.type, Z._source, ut ? ut.type : null); Q.setExtraStackFrame(lt); } else Q.setExtraStackFrame(null); } function it(Z, ut, lt, bt, xt) { { var wt = Function.call.bind(rt); for (var Et in Z) if (wt(Z, Et)) { var _t = void 0; try { if (typeof Z[Et] != "function") { var Ft = Error((bt || "React class") + ": " + lt + " type `" + Et + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof Z[Et] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`."); throw Ft.name = "Invariant Violation", Ft; } _t = Z[Et](ut, Et, bt, lt, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"); } catch (qt) { _t = qt; } _t && !(_t instanceof Error) && (J(xt), h("%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).", bt || "React class", lt, Et, typeof _t), J(null)), _t instanceof Error && !(_t.message in Y) && (Y[_t.message] = !0, J(xt), h("Failed %s type: %s", lt, _t.message), J(null)); } } } var nt = Array.isArray; function st(Z) { return nt(Z); } function ft(Z) { { var ut = typeof Symbol == "function" && Symbol.toStringTag, lt = ut && Z[Symbol.toStringTag] || Z.constructor.name || "Object"; return lt; } } function ct(Z) { try { return pt(Z), !1; } catch { return !0; } } function pt(Z) { return "" + Z; } function Tt(Z) { if (ct(Z)) return h("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", ft(Z)), pt(Z); } var kt = d.ReactCurrentOwner, vt = { key: !0, ref: !0, __self: !0, __source: !0 }, Nt, It; function Dt(Z) { if (rt.call(Z, "ref")) { var ut = Object.getOwnPropertyDescriptor(Z, "ref").get; if (ut && ut.isReactWarning) return !1; } return Z.ref !== void 0; } function Bt(Z) { if (rt.call(Z, "key")) { var ut = Object.getOwnPropertyDescriptor(Z, "key").get; if (ut && ut.isReactWarning) return !1; } return Z.key !== void 0; } function Ct(Z, ut) { typeof Z.ref == "string" && kt.current; } function gt(Z, ut) { { var lt = function() { Nt || (Nt = !0, h("%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)", ut)); }; lt.isReactWarning = !0, Object.defineProperty(Z, "key", { get: lt, configurable: !0 }); } } function Mt(Z, ut) { { var lt = function() { It || (It = !0, h("%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)", ut)); }; lt.isReactWarning = !0, Object.defineProperty(Z, "ref", { get: lt, configurable: !0 }); } } var Ot = function(Z, ut, lt, bt, xt, wt, Et) { var _t = { // This tag allows us to uniquely identify this as a React Element $$typeof: pe, // Built-in properties that belong on the element type: Z, key: ut, ref: lt, props: Et, // Record the component responsible for creating this element. _owner: wt }; return _t._store = {}, Object.defineProperty(_t._store, "validated", { configurable: !1, enumerable: !1, writable: !0, value: !1 }), Object.defineProperty(_t, "_self", { configurable: !1, enumerable: !1, writable: !1, value: bt }), Object.defineProperty(_t, "_source", { configurable: !1, enumerable: !1, writable: !1, value: xt }), Object.freeze && (Object.freeze(_t.props), Object.freeze(_t)), _t; }; function Rt(Z, ut, lt, bt, xt) { { var wt, Et = {}, _t = null, Ft = null; lt !== void 0 && (Tt(lt), _t = "" + lt), Bt(ut) && (Tt(ut.key), _t = "" + ut.key), Dt(ut) && (Ft = ut.ref, Ct(ut, xt)); for (wt in ut) rt.call(ut, wt) && !vt.hasOwnProperty(wt) && (Et[wt] = ut[wt]); if (Z && Z.defaultProps) { var qt = Z.defaultProps; for (wt in qt) Et[wt] === void 0 && (Et[wt] = qt[wt]); } if (_t || Ft) { var Ht = typeof Z == "function" ? Z.displayName || Z.name || "Unknown" : Z; _t && gt(Et, Ht), Ft && Mt(Et, Ht); } return Ot(Z, _t, Ft, xt, bt, kt.current, Et); } } var Yt = d.ReactCurrentOwner, ee = d.ReactDebugCurrentFrame; function jt(Z) { if (Z) { var ut = Z._owner, lt = et(Z.type, Z._source, ut ? ut.type : null); ee.setExtraStackFrame(lt); } else ee.setExtraStackFrame(null); } var Jt; Jt = !1; function Wt(Z) { return typeof Z == "object" && Z !== null && Z.$$typeof === pe; } function $t() { { if (Yt.current) { var Z = S(Yt.current.type); if (Z) return ` Check the render method of \`` + Z + "`."; } return ""; } } function oe(Z) { return ""; } var Qt = {}; function Lt(Z) { { var ut = $t(); if (!ut) { var lt = typeof Z == "string" ? Z : Z.displayName || Z.name; lt && (ut = ` Check the top-level render call using <` + lt + ">."); } return ut; } } function Gt(Z, ut) { { if (!Z._store || Z._store.validated || Z.key != null) return; Z._store.validated = !0; var lt = Lt(ut); if (Qt[lt]) return; Qt[lt] = !0; var bt = ""; Z && Z._owner && Z._owner !== Yt.current && (bt = " It was passed a child from " + S(Z._owner.type) + "."), jt(Z), h('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', lt, bt), jt(null); } } function ie(Z, ut) { { if (typeof Z != "object") return; if (st(Z)) for (var lt = 0; lt < Z.length; lt++) { var bt = Z[lt]; Wt(bt) && Gt(bt, ut); } else if (Wt(Z)) Z._store && (Z._store.validated = !0); else if (Z) { var xt = u(Z); if (typeof xt == "function" && xt !== Z.entries) for (var wt = xt.call(Z), Et; !(Et = wt.next()).done; ) Wt(Et.value) && Gt(Et.value, ut); } } } function Ut(Z) { { var ut = Z.type; if (ut == null || typeof ut == "string") return; var lt; if (typeof ut == "function") lt = ut.propTypes; else if (typeof ut == "object" && (ut.$$typeof === n || // Note: Memo only checks outer props here. // Inner props are checked in the reconciler. ut.$$typeof === l)) lt = ut.propTypes; else return; if (lt) { var bt = S(ut); it(lt, Z.props, "prop", bt, Z); } else if (ut.PropTypes !== void 0 && !Jt) { Jt = !0; var xt = S(ut); h("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", xt || "Unknown"); } typeof ut.getDefaultProps == "function" && !ut.getDefaultProps.isReactClassApproved && h("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead."); } } function re(Z) { { for (var ut = Object.keys(Z.props), lt = 0; lt < ut.length; lt++) { var bt = ut[lt]; if (bt !== "children" && bt !== "key") { jt(Z), h("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", bt), jt(null); break; } } Z.ref !== null && (jt(Z), h("Invalid attribute `ref` supplied to `React.Fragment`."), jt(null)); } } function se(Z, ut, lt, bt, xt, wt) { { var Et = F(Z); if (!Et) { var _t = ""; (Z === void 0 || typeof Z == "object" && Z !== null && Object.keys(Z).length === 0) && (_t += " 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 Ft = oe(); Ft ? _t += Ft : _t += $t(); var qt; Z === null ? qt = "null" : st(Z) ? qt = "array" : Z !== void 0 && Z.$$typeof === pe ? (qt = "<" + (S(Z.type) || "Unknown") + " />", _t = " Did you accidentally export a JSX literal instead of a component?") : qt = typeof Z, h("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", qt, _t); } var Ht = Rt(Z, ut, lt, xt, wt); if (Ht == null) return Ht; if (Et) { var ae = ut.children; if (ae !== void 0) if (bt) if (st(ae)) { for (var me = 0; me < ae.length; me++) ie(ae[me], Z); Object.freeze && Object.freeze(ae); } else h("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 ie(ae, Z); } return Z === E ? re(Ht) : Ut(Ht), Ht; } } function Vt(Z, ut, lt) { return se(Z, ut, lt, !0); } function tt(Z, ut, lt) { return se(Z, ut, lt, !1); } var at = tt, ht = Vt; De.Fragment = E, De.jsx = at, De.jsxs = ht; }()), De; } process.env.NODE_ENV === "production" ? Qe.exports = _r() : Qe.exports = xr(); var Sr = Qe.exports, tr = { exports: {} }, Ve = { exports: {} }, ce = {}; /** @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 ar; function kr() { if (ar) return ce; ar = 1; var At = typeof Symbol == "function" && Symbol.for, pe = At ? Symbol.for("react.element") : 60103, o = At ? Symbol.for("react.portal") : 60106, E = At ? Symbol.for("react.fragment") : 60107, k = At ? Symbol.for("react.strict_mode") : 60108, m = At ? Symbol.for("react.profiler") : 60114, s = At ? Symbol.for("react.provider") : 60109, a = At ? Symbol.for("react.context") : 60110, n = At ? Symbol.for("react.async_mode") : 60111, t = At ? Symbol.for("react.concurrent_mode") : 60111, e = At ? Symbol.for("react.forward_ref") : 60112, l = At ? Symbol.for("react.suspense") : 60113, r = At ? Symbol.for("react.suspense_list") : 60120, i = At ? Symbol.for("react.memo") : 60115, f = At ? Symbol.for("react.lazy") : 60116, c = At ? Symbol.for("react.block") : 60121, u = At ? Symbol.for("react.fundamental") : 60117, d = At ? Symbol.for("react.responder") : 60118, h = At ? Symbol.for("react.scope") : 60119; function v(C) { if (typeof C == "object" && C !== null) { var P = C.$$typeof; switch (P) { case pe: switch (C = C.type, C) { case n: case t: case E: case m: case k: case l: return C; default: switch (C = C && C.$$typeof, C) { case a: case e: case f: case i: case s: return C; default: return P; } } case o: return P; } } } function x(C) { return v(C) === t; } return ce.AsyncMode = n, ce.ConcurrentMode = t, ce.ContextConsumer = a, ce.ContextProvider = s, ce.Element = pe, ce.ForwardRef = e, ce.Fragment = E, ce.Lazy = f, ce.Memo = i, ce.Portal = o, ce.Profiler = m, ce.StrictMode = k, ce.Suspense = l, ce.isAsyncMode = function(C) { return x(C) || v(C) === n; }, ce.isConcurrentMode = x, ce.isContextConsumer = function(C) { return v(C) === a; }, ce.isContextProvider = function(C) { return v(C) === s; }, ce.isElement = function(C) { return typeof C == "object" && C !== null && C.$$typeof === pe; }, ce.isForwardRef = function(C) { return v(C) === e; }, ce.isFragment = function(C) { return v(C) === E; }, ce.isLazy = function(C) { return v(C) === f; }, ce.isMemo = function(C) { return v(C) === i; }, ce.isPortal = function(C) { return v(C) === o; }, ce.isProfiler = function(C) { return v(C) === m; }, ce.isStrictMode = function(C) { return v(C) === k; }, ce.isSuspense = function(C) { return v(C) === l; }, ce.isValidElementType = function(C) { return typeof C == "string" || typeof C == "function" || C === E || C === t || C === m || C === k || C === l || C === r || typeof C == "object" && C !== null && (C.$$typeof === f || C.$$typeof === i || C.$$typeof === s || C.$$typeof === a || C.$$typeof === e || C.$$typeof === u || C.$$typeof === d || C.$$typeof === h || C.$$typeof === c); }, ce.typeOf = v, ce; } var he = {}; /** @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 or; function Tr() { return or || (or = 1, process.env.NODE_ENV !== "production" && function() { var At = typeof Symbol == "function" && Symbol.for, pe = At ? Symbol.for("react.element") : 60103, o = At ? Symbol.for("react.portal") : 60106, E = At ? Symbol.for("react.fragment") : 60107, k = At ? Symbol.for("react.strict_mode") : 60108, m = At ? Symbol.for("react.profiler") : 60114, s = At ? Symbol.for("react.provider") : 60109, a = At ? Symbol.for("react.context") : 60110, n = At ? Symbol.for("react.async_mode") : 60111, t = At ? Symbol.for("react.concurrent_mode") : 60111, e = At ? Symbol.for("react.forward_ref") : 60112, l = At ? Symbol.for("react.suspense") : 60113, r = At ? Symbol.for("react.suspense_list") : 60120, i = At ? Symbol.for("react.memo") : 60115, f = At ? Symbol.for("react.lazy") : 60116, c = At ? Symbol.for("react.block") : 60121, u = At ? Symbol.for("react.fundamental") : 60117, d = At ? Symbol.for("react.responder") : 60118, h = At ? Symbol.for("react.scope") : 60119; function v(X) { return typeof X == "string" || typeof X == "function" || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill. X === E || X === t || X === m || X === k || X === l || X === r || typeof X == "object" && X !== null && (X.$$typeof === f || X.$$typeof === i || X.$$typeof === s || X.$$typeof === a || X.$$typeof === e || X.$$typeof === u || X.$$typeof === d || X.$$typeof === h || X.$$typeof === c); } function x(X) { if (typeof X == "object" && X !== null) { var W = X.$$typeof; switch (W) { case pe: var K = X.type; switch (K) { case n: case t: case E: case m: case k: case l: return K; default: var et = K && K.$$typeof; switch (et) { case a: case e: case f: case i: case s: return et; default: return W; } } case o: return W; } } } var C = n, P = t, L = a, I = s, N = pe, F = e, $ = E, B = f, S = i, M = o, w = m, p = k, b = l, g = !1; function y(X) { return g || (g = !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.")), _(X) || x(X) === n; } function _(X) { return x(X) === t; } function R(X) { return x(X) === a; } function O(X) { return x(X) === s; } function z(X) { return typeof X == "object" && X !== null && X.$$typeof === pe; } function U(X) { return x(X) === e; } function q(X) { return x(X) === E; } function j(X) { return x(X) === f; } function H(X) { return x(X) === i; } function A(X) { return x(X) === o; } function T(X) { return x(X) === m; } function D(X) { return x(X) === k; } function V(X) { return x(X) === l; } he.AsyncMode = C, he.ConcurrentMode = P, he.ContextConsumer = L, he.ContextProvider = I, he.Element = N, he.ForwardRef = F, he.Fragment = $, he.Lazy = B, he.Memo = S, he.Portal = M, he.Profiler = w, he.StrictMode = p, he.Suspense = b, he.isAsyncMode = y, he.isConcurrentMode = _, he.isContextConsumer = R, he.isContextProvider = O, he.isElement = z, he.isForwardRef = U, he.isFragment = q, he.isLazy = j, he.isMemo = H, he.isPortal = A, he.isProfiler = T, he.isStrictMode = D, he.isSuspense = V, he.isValidElementType = v, he.typeOf = x; }()), he; } var lr; function mr() { return lr || (lr = 1, process.env.NODE_ENV === "production" ? Ve.exports = kr() : Ve.exports = Tr()), Ve.exports; } /* object-assign (c) Sindre Sorhus @license MIT */ var Xe, ur; function Er() { if (ur) return Xe; ur = 1; var At = Object.getOwnPropertySymbols, pe = Object.prototype.hasOwnProperty, o = Object.prototype.propertyIsEnumerable; function E(m) { if (m == null) throw new TypeError("Object.assign cannot be called with null or undefined"); return Object(m); } function k() { try { if (!Object.assign) return !1; var m = new String("abc"); if (m[5] = "de", Object.getOwnPropertyNames(m)[0] === "5") return !1; for (var s = {}, a = 0; a < 10; a++) s["_" + String.fromCharCode(a)] = a; var n = Object.getOwnPropertyNames(s).map(function(e) { return s[e]; }); if (n.join("") !== "0123456789") return !1; var t = {}; return "abcdefghijklmnopqrst".split("").forEach(function(e) { t[e] = e; }), Object.keys(Object.assign({}, t)).join("") === "abcdefghijklmnopqrst"; } catch { return !1; } } return Xe = k() ? Object.assign : function(m, s) { for (var a, n = E(m), t, e = 1; e < arguments.length; e++) { a = Object(arguments[e]); for (var l in a) pe.call(a, l) && (n[l] = a[l]); if (At) { t = At(a); for (var r = 0; r < t.length; r++) o.call(a, t[r]) && (n[t[r]] = a[t[r]]); } } return n; }, Xe; } var Ye, fr; function er() { if (fr) return Ye; fr = 1; var At = "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"; return Ye = At, Ye; } var Ke, cr; function br() { return cr || (cr = 1, Ke = Function.call.bind(Object.prototype.hasOwnProperty)), Ke; } var Ze, hr; function Cr() { if (hr) return Ze; hr = 1; var At = function() { }; if (process.env.NODE_ENV !== "production") { var pe = er(), o = {}, E = br(); At = function(m) { var s = "Warning: " + m; typeof console < "u" && console.error(s); try { throw new Error(s); } catch { } }; } function k(m, s, a, n, t) { if (process.env.NODE_ENV !== "production") { for (var e in m) if (E(m, e)) { var l; try { if (typeof m[e] != "function") { var r = Error( (n || "React class") + ": " + a + " type `" + e + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof m[e] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`." ); throw r.name = "Invariant Violation", r; } l = m[e](s, e, n, a, null, pe); } catch (f) { l = f; } if (l && !(l instanceof Error) && At( (n || "React class") + ": type specification of " + a + " `" + e + "` is invalid; the type checker function must return `null` or an `Error` but returned a " + typeof l + ". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)." ), l instanceof Error && !(l.message in o)) { o[l.message] = !0; var i = t ? t() : ""; At( "Failed " + a + " type: " + l.message + (i ?? "") ); } } } } return k.resetWarningCache = function() { process.env.NODE_ENV !== "production" && (o = {}); }, Ze = k, Ze; } var Ge, dr; function Mr() { if (dr) return Ge; dr = 1; var At = mr(), pe = Er(), o = er(), E = br(), k = Cr(), m = function() { }; process.env.NODE_ENV !== "production" && (m = function(a) { var n = "Warning: " + a; typeof console < "u" && console.error(n); try { throw new Error(n); } catch { } }); function s() { return null; } return Ge = function(a, n) { var t = typeof Symbol == "function" && Symbol.iterator, e = "@@iterator"; function l(_) { var R = _ && (t && _[t] || _[e]); if (typeof R == "function") return R; } var r = "<<anonymous>>", i = { array: d("array"), bigint: d("bigint"), bool: d("boolean"), func: d("function"), number: d("number"), object: d("object"), string: d("string"), symbol: d("symbol"), any: h(), arrayOf: v, element: x(), elementType: C(), instanceOf: P, node: F(), objectOf: I, oneOf: L, oneOfType: N, shape: B, exact: S }; function f(_, R) { return _ === R ? _ !== 0 || 1 / _ === 1 / R : _ !== _ && R !== R; } function c(_, R) { this.message = _, this.data = R && typeof R == "object" ? R : {}, this.stack = ""; } c.prototype = Error.prototype; function u(_) { if (process.env.NODE_ENV !== "production") var R = {}, O = 0; function z(q, j, H, A, T, D, V) { if (A = A || r, D = D || H, V !== o) { if (n) { var X = 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 X.name = "Invariant Violation", X; } else if (process.env.NODE_ENV !== "production" && typeof console < "u") { var W = A + ":" + H; !R[W] && // Avoid spamming the console because they are often not actionable except for lib authors O < 3 && (m( "You are manually calling a React.PropTypes validation function for the `" + D + "` prop on `" + A + "`. 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." ), R[W] = !0, O++); } } return j[H] == null ? q ? j[H] === null ? new c("The " + T + " `" + D + "` is marked as required " + ("in `" + A + "`, but its value is `null`.")) : new c("The " + T + " `" + D + "` is marked as required in " + ("`" + A + "`, but its value is `undefined`.")) : null : _(j, H, A, T, D); } var U = z.bind(null, !1); return U.isRequired = z.bind(null, !0), U; } function d(_) { function R(O, z, U, q, j, H) { var A = O[z], T = p(A); if (T !== _) { var D = b(A); return new c( "Invalid " + q + " `" + j + "` of type " + ("`" + D + "` supplied to `" + U + "`, expected ") + ("`" + _ + "`."), { expectedType: _ } ); } return null; } return u(R); } function h() { return u(s); } function v(_) { function R(O, z, U, q, j) { if (typeof _ != "function") return new c("Property `" + j + "` of component `" + U + "` has invalid PropType notation inside arrayOf."); var H = O[z]; if (!Array.isArray(H)) { var A = p(H); return new c("Invalid " + q + " `" + j + "` of type " + ("`" + A + "` supplied to `" + U + "`, expected an array.")); } for (var T = 0; T < H.length; T++) { var D = _(H, T, U, q, j + "[" + T + "]", o); if (D instanceof Error) return D; } return null; } return u(R); } function x() { function _(R, O, z, U, q) { var j = R[O]; if (!a(j)) { var H = p(j); return new c("Invalid " + U + " `" + q + "` of type " + ("`" + H + "` supplied to `" + z + "`, expected a single ReactElement.")); } return null; } return u(_); } function C() { function _(R, O, z, U, q) { var j = R[O]; if (!At.isValidElementType(j)) { var H = p(j); return new c("Invalid " + U + " `" + q + "` of type " + ("`" + H + "` supplied to `" + z + "`, expected a single ReactElement type.")); } return null; } return u(_); } function P(_) { function R(O, z, U, q, j) { if (!(O[z] instanceof _)) { var H = _.name || r, A = y(O[z]); return new c("Invalid " + q + " `" + j + "` of type " + ("`" + A + "` supplied to `" + U + "`, expected ") + ("instance of `" + H + "`.")); } return null; } return u(R); } function L(_) { if (!Array.isArray(_)) return process.env.NODE_ENV !== "production" && (arguments.length > 1 ? m( "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])." ) : m("Invalid argument supplied to oneOf, expected an array.")), s; function R(O, z, U, q, j) { for (var H = O[z], A = 0; A < _.length; A++) if (f(H, _[A])) return null; var T = JSON.stringify(_, function(V, X) { var W = b(X); return W === "symbol" ? String(X) : X; }); return new c("Invalid " + q + " `" + j + "` of value `" + String(H) + "` " + ("supplied to `" + U + "`, expected one of " + T + ".")); } return u(R); } function I(_) { function R(O, z, U, q, j) { if (typeof _ != "function") return new c("Property `" + j + "` of component `" + U + "` has invalid PropType notation inside objectOf."); var H = O[z], A = p(H); if (A !== "object") return new c("Invalid " + q + " `" + j + "` of type " + ("`" + A + "` supplied to `" + U + "`, expected an object.")); for (var T in H) if (E(H, T)) { var D = _(H, T, U, q, j + "." + T, o); if (D instanceof Error) return D; } return null; } return u(R); } function N(_) { if (!Array.isArray(_)) return process.env.NODE_ENV !== "production" && m("Invalid argument supplied to oneOfType, expected an instance of array."), s; for (var R = 0; R < _.length; R++) { var O = _[R]; if (typeof O != "function") return m( "Invalid argument supplied to oneOfType. Expected an array of check functions, but received " + g(O) + " at index " + R + "." ), s; } function z(U, q, j, H, A) { for (var T = [], D = 0; D < _.length; D++) { var V = _[D], X = V(U, q, j, H, A, o); if (X == null) return null; X.data && E(X.data, "expectedType") && T.push(X.data.expectedType); } var W = T.length > 0 ? ", expected one of type [" + T.join(", ") + "]" : ""; return new c("Invalid " + H + " `" + A + "` supplied to " + ("`" + j + "`" + W + ".")); } return u(z); } function F() { function _(R, O, z, U, q) { return M(R[O]) ? null : new c("Invalid " + U + " `" + q + "` supplied to " + ("`" + z + "`, expected a ReactNode.")); } return u(_); } function $(_, R, O, z, U) { return new c( (_ || "React class") + ": " + R + " type `" + O + "." + z + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + U + "`." ); } function B(_) { function R(O, z, U, q, j) { var H = O[z], A = p(H); if (A !== "object") return new c("Invalid " + q + " `" + j + "` of type `" + A + "` " + ("supplied to `" + U + "`, expected `object`.")); for (var T in _) { var D = _[T]; if (typeof D != "function") return $(U, q, j, T, b(D)); var V = D(H, T, U, q, j + "." + T, o); if (V) return V; } return null; } return u(R); } function S(_) { function R(O, z, U, q, j) { var H = O[z], A = p(H); if (A !== "object") return new c("Invalid " + q + " `" + j + "` of type `" + A + "` " + ("supplied to `" + U + "`, expected `object`.")); var T = pe({}, O[z], _); for (var D in T) { var V = _[D]; if (E(_, D) && typeof V != "function") return $(U, q, j, D, b(V)); if (!V) return new c( "Invalid " + q + " `" + j + "` key `" + D + "` supplied to `" + U + "`.\nBad object: " + JSON.stringify(O[z], null, " ") + ` Valid keys: ` + JSON.stringify(Object.keys(_), null, " ") ); var X = V(H, D, U, q, j + "." + D, o); if (X) return X; } return null; } return u(R); } function M(_) { switch (typeof _) { case "number": case "string": case "undefined": return !0; case "boolean": return !_; case "object": if (Array.isArray(_)) return _.every(M); if (_ === null || a(_)) return !0; var R = l(_); if (R) { var O = R.call(_), z; if (R !== _.entries) { for (; !(z = O.next()).done; ) if (!M(z.value)) return !1; } else for (; !(z = O.next()).done; ) { var U = z.value; if (U && !M(U[1])) return !1; } } else return !1; return !0; default: return !1; } } function w(_, R) { return _ === "symbol" ? !0 : R ? R["@@toStringTag"] === "Symbol" || typeof Symbol == "function" && R instanceof Symbol : !1; } function p(_) { var R = typeof _; return Array.isArray(_) ? "array" : _ instanceof RegExp ? "object" : w(R, _) ? "symbol" : R; } function b(_) { if (typeof _ > "u" || _ === null) return "" + _; var R = p(_); if (R === "object") { if (_ instanceof Date) return "date"; if (_ instanceof RegExp) return "regexp"; } return R; } function g(_) { var R = b(_); switch (R) { case "array": case "object": return "an " + R; case "boolean": case "date": case "regexp": return "a " + R; default: return R; } } function y(_) { return !_.constructor || !_.constructor.name ? r : _.constructor.name; } return i.checkPropTypes = k, i.resetWarningCache = k.resetWarningCache, i.PropTypes = i, i; }, Ge; } var Je, pr; function Ar() { if (pr) return Je; pr = 1; var At = er(); function pe() { } function o() { } return o.resetWarningCache = pe, Je = function() { function E(s, a, n, t, e, l) { if (l !== At) { var r = 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 r.name = "Invariant Violation", r; } } E.isRequired = E; function k() { return E; } var m = { array: E, bigint: E, bool: E, func: E, number: E, object: E, string: E, symbol: E, any: E, arrayOf: k, element: E, elementType: E, instanceOf: k, node: E, objectOf: k, oneOf: k, oneOfType: k, shape: k, exact: k, checkPropTypes: o, resetWarningCache: pe }; return m.PropTypes = m, m; }, Je; } if (process.env.NODE_ENV !== "production") { var Rr = mr(), Or = !0; tr.exports = Mr()(Rr.isElement, Or); } else tr.exports = Ar()(); var jr = tr.exports; const _e = /* @__PURE__ */ wr(jr); var gr = { exports: {} }; (function(At, pe) { (function(o, E) { E(); })(Kt, function() { function o(t, e) { return typeof e > "u" ? e = { autoBom: !1 } : typeof e != "object" && (console.warn("Deprecated: Expected third argument to be a object"), e = { autoBom: !e }), e.autoBom && /^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(t.type) ? new Blob(["\uFEFF", t], { type: t.type }) : t; } function E(t, e, l) { var r = new XMLHttpRequest(); r.open("GET", t), r.responseType = "blob", r.onload = function() { n(r.response, e, l); }, r.onerror = function() { console.error("could not download file"); }, r.send(); } function k(t) { var e = new XMLHttpRequest(); e.open("HEAD", t, !1); try { e.send(); } catch { } return 200 <= e.status && 299 >= e.status; } function m(t) { try { t.dispatchEvent(new MouseEvent("click")); } catch { var e = document.createEvent("MouseEvents"); e.initMouseEvent("click", !0, !0, window, 0, 0, 0, 80, 20, !1, !1, !1, !1, 0, null), t.dispatchEvent(e); } } var s = typeof window == "object" && window.window === window ? window : typeof self == "object" && self.self === self ? self : typeof Kt == "object" && Kt.global === Kt ? Kt : void 0, a = s.navigator && /Macintosh/.test(navigator.userAgent) && /AppleWebKit/.test(navigator.userAgent) && !/Safari/.test(navigator.userAgent), n = s.saveAs || (typeof window != "object" || window !== s ? function() { } : "download" in HTMLAnchorElement.prototype && !a ? function(t, e, l) { var r = s.URL || s.webkitURL, i = document.createElement("a"); e = e || t.name || "download", i.download = e, i.rel = "noopener", typeof t == "string" ? (i.href = t, i.origin === location.origin ? m(i) : k(i.href) ? E(t, e, l) : m(i, i.target = "_blank")) : (i.href = r.createObjectURL(t), setTimeout(function() { r.revokeObjectURL(i.href); }, 4e4), setTimeout(function() { m(i); }, 0)); } : "msSaveOrOpenBlob" in navigator ? function(t, e, l) { if (e = e || t.name || "download", typeof t != "string") navigator.msSaveOrOpenBlob(o(t, l), e); else if (k(t)) E(t, e, l); else { var r = document.createElement("a"); r.href = t, r.target = "_blank", setTimeout(function() { m(r); }); } } : function(t, e, l, r) { if (r = r || open("", "_blank"), r && (r.document.title = r.document.body.innerText = "downloading..."), typeof t == "string") return E(t, e, l); var i = t.type === "application/octet-stream", f = /constructor/i.test(s.HTMLElement) || s.safari, c = /CriOS\/[\d]+/.test(navigator.userAgent); if ((c || i && f || a) && typeof FileReader < "u") { var u = new FileReader(); u.onloadend = function() { var v = u.result; v = c ? v : v.replace(/^data:[^;]*;/, "data:attachment/file;"), r ? r.location.href = v : location = v, r = null; }, u.readAsDataURL(t); } else { var d = s.URL || s.webkitURL, h = d.createObjectURL(t); r ? r.location = h : location.href = h, r = null, setTimeout(function() { d.revokeObjectURL(h); }, 4e4); } }); s.saveAs = n.saveAs = n, At.exports = n; }); })(gr); var Ir = gr.exports; function qe(At) { throw new Error('Could not dynamically require "' + At + '". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.'); } var yr = { exports: {} }; /*! ExcelJS 19-10-2023 */ (function(At, pe) { (function(o) { At.exports = o(); })(function() { return function o(E, k, m) { function s(t, e) { if (!k[t]) { if (!E[t]) { var l = typeof qe == "function" && qe; if (!e && l) return l(t, !0); if (a) return a(t, !0); var r = new Error("Cannot find module '" + t + "'"); throw r.code = "MODULE_NOT_FOUND", r; } var i = k[t] = { exports: {} }; E[t][0].call(i.exports, function(f) { return s(E[t][1][f] || f); }, i, i.exports, o, E, k, m); } return k[t].exports; } for (var a = typeof qe == "function" && qe, n = 0; n < m.length; n++) s(m[n]); return s; }({ 1: [function(o, E, k) { const m = o("fs"), s = o("fast-csv"), a = o("dayjs/plugin/customParseFormat"), n = o("dayjs/plugin/utc"), t = o("dayjs").extend(a).extend(n), e = o("../utils/stream-buf"), { fs: { exists: l } } = o("../utils/utils"), r = { true: !0, false: !1, "#N/A": { error: "#N/A" }, "#REF!": { error: "#REF!" }, "#NAME?": { error: "#NAME?" }, "#DIV/0!": { error: "#DIV/0!" }, "#NULL!": { error: "#NULL!" }, "#VALUE!": { error: "#VALUE!" }, "#NUM!": { error: "#NUM!" } }; E.exports = class { constructor(i) { this.workbook = i, this.worksheet = null; } async readFile(i, f) { if (f = f || {}, !await l(i)) throw new Error("File not found: " + i); const c = m.createReadStream(i), u = await this.read(c, f); return c.close(), u; } read(i, f) { return f = f || {}, new Promise((c, u) => { const d = this.workbook.addWorksheet(f.sheetName), h = f.dateFormats || ["YYYY-MM-DD[T]HH:mm:ssZ", "YYYY-MM-DD[T]HH:mm:ss", "MM-DD-YYYY", "YYYY-MM-DD"], v = f.map || function(C) { if (C === "") return null; const P = Number(C);