UNPKG

desmy-react

Version:

Introducing an easy-to-use, lightning-fast React.js component that streamlines your development process. Our solution prioritizes simplicity, speed, and optimization, making it a breeze to build projects in React.

1,275 lines (1,273 loc) 601 kB
var Cu = Object.defineProperty; var Su = (e, r, t) => r in e ? Cu(e, r, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[r] = t; var x = (e, r, t) => Su(e, typeof r != "symbol" ? r + "" : r, t); import * as Ne from "react"; import N, { useRef as ue, useEffect as Be, cloneElement as wn, Component as ge, createRef as At, lazy as Nu, Suspense as Ou, useMemo as Bt, useState as Re, useCallback as Tu, useLayoutEffect as mr, createContext as Au, useContext as _u, useSyncExternalStore as Ru, isValidElement as or, forwardRef as yt, useImperativeHandle as Gt } from "react"; import sr from "react-dom"; function Vr(e) { return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e; } var _i = { exports: {} }, wr = {}; /** * @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 to; function ju() { if (to) return wr; to = 1; var e = N, r = Symbol.for("react.element"), t = Symbol.for("react.fragment"), n = Object.prototype.hasOwnProperty, i = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, s = { key: !0, ref: !0, __self: !0, __source: !0 }; function o(a, l, c) { var d, f = {}, h = null, m = null; c !== void 0 && (h = "" + c), l.key !== void 0 && (h = "" + l.key), l.ref !== void 0 && (m = l.ref); for (d in l) n.call(l, d) && !s.hasOwnProperty(d) && (f[d] = l[d]); if (a && a.defaultProps) for (d in l = a.defaultProps, l) f[d] === void 0 && (f[d] = l[d]); return { $$typeof: r, type: a, key: h, ref: m, props: f, _owner: i.current }; } return wr.Fragment = t, wr.jsx = o, wr.jsxs = o, wr; } var Er = {}; /** * @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 ro; function ku() { return ro || (ro = 1, process.env.NODE_ENV !== "production" && function() { var e = N, r = Symbol.for("react.element"), t = Symbol.for("react.portal"), n = Symbol.for("react.fragment"), i = Symbol.for("react.strict_mode"), s = Symbol.for("react.profiler"), o = Symbol.for("react.provider"), a = Symbol.for("react.context"), l = Symbol.for("react.forward_ref"), c = Symbol.for("react.suspense"), d = Symbol.for("react.suspense_list"), f = Symbol.for("react.memo"), h = Symbol.for("react.lazy"), m = Symbol.for("react.offscreen"), p = Symbol.iterator, v = "@@iterator"; function g(y) { if (y === null || typeof y != "object") return null; var k = p && y[p] || y[v]; return typeof k == "function" ? k : null; } var b = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; function w(y) { { for (var k = arguments.length, F = new Array(k > 1 ? k - 1 : 0), te = 1; te < k; te++) F[te - 1] = arguments[te]; E("error", y, F); } } function E(y, k, F) { { var te = b.ReactDebugCurrentFrame, he = te.getStackAddendum(); he !== "" && (k += "%s", F = F.concat([he])); var be = F.map(function(de) { return String(de); }); be.unshift("Warning: " + k), Function.prototype.apply.call(console[y], console, be); } } var R = !1, S = !1, H = !1, B = !1, T = !1, D; D = Symbol.for("react.module.reference"); function ae(y) { return !!(typeof y == "string" || typeof y == "function" || y === n || y === s || T || y === i || y === c || y === d || B || y === m || R || S || H || typeof y == "object" && y !== null && (y.$$typeof === h || y.$$typeof === f || y.$$typeof === o || y.$$typeof === a || y.$$typeof === l || // 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. y.$$typeof === D || y.getModuleId !== void 0)); } function le(y, k, F) { var te = y.displayName; if (te) return te; var he = k.displayName || k.name || ""; return he !== "" ? F + "(" + he + ")" : F; } function ie(y) { return y.displayName || "Context"; } function K(y) { if (y == null) return null; if (typeof y.tag == "number" && w("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof y == "function") return y.displayName || y.name || null; if (typeof y == "string") return y; switch (y) { case n: return "Fragment"; case t: return "Portal"; case s: return "Profiler"; case i: return "StrictMode"; case c: return "Suspense"; case d: return "SuspenseList"; } if (typeof y == "object") switch (y.$$typeof) { case a: var k = y; return ie(k) + ".Consumer"; case o: var F = y; return ie(F._context) + ".Provider"; case l: return le(y, y.render, "ForwardRef"); case f: var te = y.displayName || null; return te !== null ? te : K(y.type) || "Memo"; case h: { var he = y, be = he._payload, de = he._init; try { return K(de(be)); } catch { return null; } } } return null; } var q = Object.assign, V = 0, G, J, L, X, C, j, I; function $() { } $.__reactDisabledLog = !0; function U() { { if (V === 0) { G = console.log, J = console.info, L = console.warn, X = console.error, C = console.group, j = console.groupCollapsed, I = console.groupEnd; var y = { configurable: !0, enumerable: !0, value: $, writable: !0 }; Object.defineProperties(console, { info: y, log: y, warn: y, error: y, group: y, groupCollapsed: y, groupEnd: y }); } V++; } } function z() { { if (V--, V === 0) { var y = { configurable: !0, enumerable: !0, writable: !0 }; Object.defineProperties(console, { log: q({}, y, { value: G }), info: q({}, y, { value: J }), warn: q({}, y, { value: L }), error: q({}, y, { value: X }), group: q({}, y, { value: C }), groupCollapsed: q({}, y, { value: j }), groupEnd: q({}, y, { value: I }) }); } V < 0 && w("disabledDepth fell below zero. This is a bug in React. Please file an issue."); } } var W = b.ReactCurrentDispatcher, Y; function Z(y, k, F) { { if (Y === void 0) try { throw Error(); } catch (he) { var te = he.stack.trim().match(/\n( *(at )?)/); Y = te && te[1] || ""; } return ` ` + Y + y; } } var re = !1, Q; { var ye = typeof WeakMap == "function" ? WeakMap : Map; Q = new ye(); } function P(y, k) { if (!y || re) return ""; { var F = Q.get(y); if (F !== void 0) return F; } var te; re = !0; var he = Error.prepareStackTrace; Error.prepareStackTrace = void 0; var be; be = W.current, W.current = null, U(); try { if (k) { var de = function() { throw Error(); }; if (Object.defineProperty(de.prototype, "props", { set: function() { throw Error(); } }), typeof Reflect == "object" && Reflect.construct) { try { Reflect.construct(de, []); } catch ($e) { te = $e; } Reflect.construct(y, [], de); } else { try { de.call(); } catch ($e) { te = $e; } y.call(de.prototype); } } else { try { throw Error(); } catch ($e) { te = $e; } y(); } } catch ($e) { if ($e && te && typeof $e.stack == "string") { for (var ce = $e.stack.split(` `), Ie = te.stack.split(` `), Oe = ce.length - 1, Ae = Ie.length - 1; Oe >= 1 && Ae >= 0 && ce[Oe] !== Ie[Ae]; ) Ae--; for (; Oe >= 1 && Ae >= 0; Oe--, Ae--) if (ce[Oe] !== Ie[Ae]) { if (Oe !== 1 || Ae !== 1) do if (Oe--, Ae--, Ae < 0 || ce[Oe] !== Ie[Ae]) { var Xe = ` ` + ce[Oe].replace(" at new ", " at "); return y.displayName && Xe.includes("<anonymous>") && (Xe = Xe.replace("<anonymous>", y.displayName)), typeof y == "function" && Q.set(y, Xe), Xe; } while (Oe >= 1 && Ae >= 0); break; } } } finally { re = !1, W.current = be, z(), Error.prepareStackTrace = he; } var er = y ? y.displayName || y.name : "", Mt = er ? Z(er) : ""; return typeof y == "function" && Q.set(y, Mt), Mt; } function Pe(y, k, F) { return P(y, !1); } function ft(y) { var k = y.prototype; return !!(k && k.isReactComponent); } function Qe(y, k, F) { if (y == null) return ""; if (typeof y == "function") return P(y, ft(y)); if (typeof y == "string") return Z(y); switch (y) { case c: return Z("Suspense"); case d: return Z("SuspenseList"); } if (typeof y == "object") switch (y.$$typeof) { case l: return Pe(y.render); case f: return Qe(y.type, k, F); case h: { var te = y, he = te._payload, be = te._init; try { return Qe(be(he), k, F); } catch { } } } return ""; } var It = Object.prototype.hasOwnProperty, tn = {}, Hs = b.ReactDebugCurrentFrame; function rn(y) { if (y) { var k = y._owner, F = Qe(y.type, y._source, k ? k.type : null); Hs.setExtraStackFrame(F); } else Hs.setExtraStackFrame(null); } function tu(y, k, F, te, he) { { var be = Function.call.bind(It); for (var de in y) if (be(y, de)) { var ce = void 0; try { if (typeof y[de] != "function") { var Ie = Error((te || "React class") + ": " + F + " type `" + de + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof y[de] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`."); throw Ie.name = "Invariant Violation", Ie; } ce = y[de](k, de, te, F, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"); } catch (Oe) { ce = Oe; } ce && !(ce instanceof Error) && (rn(he), w("%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).", te || "React class", F, de, typeof ce), rn(null)), ce instanceof Error && !(ce.message in tn) && (tn[ce.message] = !0, rn(he), w("Failed %s type: %s", F, ce.message), rn(null)); } } } var ru = Array.isArray; function Vn(y) { return ru(y); } function nu(y) { { var k = typeof Symbol == "function" && Symbol.toStringTag, F = k && y[Symbol.toStringTag] || y.constructor.name || "Object"; return F; } } function iu(y) { try { return Ws(y), !1; } catch { return !0; } } function Ws(y) { return "" + y; } function Vs(y) { if (iu(y)) return w("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", nu(y)), Ws(y); } var xr = b.ReactCurrentOwner, su = { key: !0, ref: !0, __self: !0, __source: !0 }, qs, Ys, qn; qn = {}; function ou(y) { if (It.call(y, "ref")) { var k = Object.getOwnPropertyDescriptor(y, "ref").get; if (k && k.isReactWarning) return !1; } return y.ref !== void 0; } function au(y) { if (It.call(y, "key")) { var k = Object.getOwnPropertyDescriptor(y, "key").get; if (k && k.isReactWarning) return !1; } return y.key !== void 0; } function lu(y, k) { if (typeof y.ref == "string" && xr.current && k && xr.current.stateNode !== k) { var F = K(xr.current.type); qn[F] || (w('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', K(xr.current.type), y.ref), qn[F] = !0); } } function cu(y, k) { { var F = function() { qs || (qs = !0, w("%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)", k)); }; F.isReactWarning = !0, Object.defineProperty(y, "key", { get: F, configurable: !0 }); } } function uu(y, k) { { var F = function() { Ys || (Ys = !0, w("%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)", k)); }; F.isReactWarning = !0, Object.defineProperty(y, "ref", { get: F, configurable: !0 }); } } var du = function(y, k, F, te, he, be, de) { var ce = { // This tag allows us to uniquely identify this as a React Element $$typeof: r, // Built-in properties that belong on the element type: y, key: k, ref: F, props: de, // Record the component responsible for creating this element. _owner: be }; return ce._store = {}, Object.defineProperty(ce._store, "validated", { configurable: !1, enumerable: !1, writable: !0, value: !1 }), Object.defineProperty(ce, "_self", { configurable: !1, enumerable: !1, writable: !1, value: te }), Object.defineProperty(ce, "_source", { configurable: !1, enumerable: !1, writable: !1, value: he }), Object.freeze && (Object.freeze(ce.props), Object.freeze(ce)), ce; }; function fu(y, k, F, te, he) { { var be, de = {}, ce = null, Ie = null; F !== void 0 && (Vs(F), ce = "" + F), au(k) && (Vs(k.key), ce = "" + k.key), ou(k) && (Ie = k.ref, lu(k, he)); for (be in k) It.call(k, be) && !su.hasOwnProperty(be) && (de[be] = k[be]); if (y && y.defaultProps) { var Oe = y.defaultProps; for (be in Oe) de[be] === void 0 && (de[be] = Oe[be]); } if (ce || Ie) { var Ae = typeof y == "function" ? y.displayName || y.name || "Unknown" : y; ce && cu(de, Ae), Ie && uu(de, Ae); } return du(y, ce, Ie, he, te, xr.current, de); } } var Yn = b.ReactCurrentOwner, Gs = b.ReactDebugCurrentFrame; function Qt(y) { if (y) { var k = y._owner, F = Qe(y.type, y._source, k ? k.type : null); Gs.setExtraStackFrame(F); } else Gs.setExtraStackFrame(null); } var Gn; Gn = !1; function Xn(y) { return typeof y == "object" && y !== null && y.$$typeof === r; } function Xs() { { if (Yn.current) { var y = K(Yn.current.type); if (y) return ` Check the render method of \`` + y + "`."; } return ""; } } function hu(y) { return ""; } var Ks = {}; function pu(y) { { var k = Xs(); if (!k) { var F = typeof y == "string" ? y : y.displayName || y.name; F && (k = ` Check the top-level render call using <` + F + ">."); } return k; } } function Js(y, k) { { if (!y._store || y._store.validated || y.key != null) return; y._store.validated = !0; var F = pu(k); if (Ks[F]) return; Ks[F] = !0; var te = ""; y && y._owner && y._owner !== Yn.current && (te = " It was passed a child from " + K(y._owner.type) + "."), Qt(y), w('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', F, te), Qt(null); } } function Zs(y, k) { { if (typeof y != "object") return; if (Vn(y)) for (var F = 0; F < y.length; F++) { var te = y[F]; Xn(te) && Js(te, k); } else if (Xn(y)) y._store && (y._store.validated = !0); else if (y) { var he = g(y); if (typeof he == "function" && he !== y.entries) for (var be = he.call(y), de; !(de = be.next()).done; ) Xn(de.value) && Js(de.value, k); } } } function mu(y) { { var k = y.type; if (k == null || typeof k == "string") return; var F; if (typeof k == "function") F = k.propTypes; else if (typeof k == "object" && (k.$$typeof === l || // Note: Memo only checks outer props here. // Inner props are checked in the reconciler. k.$$typeof === f)) F = k.propTypes; else return; if (F) { var te = K(k); tu(F, y.props, "prop", te, y); } else if (k.PropTypes !== void 0 && !Gn) { Gn = !0; var he = K(k); w("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", he || "Unknown"); } typeof k.getDefaultProps == "function" && !k.getDefaultProps.isReactClassApproved && w("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead."); } } function vu(y) { { for (var k = Object.keys(y.props), F = 0; F < k.length; F++) { var te = k[F]; if (te !== "children" && te !== "key") { Qt(y), w("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", te), Qt(null); break; } } y.ref !== null && (Qt(y), w("Invalid attribute `ref` supplied to `React.Fragment`."), Qt(null)); } } var Qs = {}; function eo(y, k, F, te, he, be) { { var de = ae(y); if (!de) { var ce = ""; (y === void 0 || typeof y == "object" && y !== null && Object.keys(y).length === 0) && (ce += " 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 Ie = hu(); Ie ? ce += Ie : ce += Xs(); var Oe; y === null ? Oe = "null" : Vn(y) ? Oe = "array" : y !== void 0 && y.$$typeof === r ? (Oe = "<" + (K(y.type) || "Unknown") + " />", ce = " Did you accidentally export a JSX literal instead of a component?") : Oe = typeof y, w("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", Oe, ce); } var Ae = fu(y, k, F, he, be); if (Ae == null) return Ae; if (de) { var Xe = k.children; if (Xe !== void 0) if (te) if (Vn(Xe)) { for (var er = 0; er < Xe.length; er++) Zs(Xe[er], y); Object.freeze && Object.freeze(Xe); } else w("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 Zs(Xe, y); } if (It.call(k, "key")) { var Mt = K(y), $e = Object.keys(k).filter(function(Eu) { return Eu !== "key"; }), Kn = $e.length > 0 ? "{key: someKey, " + $e.join(": ..., ") + ": ...}" : "{key: someKey}"; if (!Qs[Mt + Kn]) { var wu = $e.length > 0 ? "{" + $e.join(": ..., ") + ": ...}" : "{}"; w(`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} />`, Kn, Mt, wu, Mt), Qs[Mt + Kn] = !0; } } return y === n ? vu(Ae) : mu(Ae), Ae; } } function gu(y, k, F) { return eo(y, k, F, !0); } function yu(y, k, F) { return eo(y, k, F, !1); } var bu = yu, xu = gu; Er.Fragment = n, Er.jsx = bu, Er.jsxs = xu; }()), Er; } process.env.NODE_ENV === "production" ? _i.exports = ju() : _i.exports = ku(); var u = _i.exports, M = /* @__PURE__ */ ((e) => (e.LOADING = "LOADING", e.ERROR = "ERROR", e.SUCCESS = "SUCCESS", e.APPROVED = "APPROVED", e.SUBMITTED = "SUBMITTED", e.CONFIRMED = "CONFIRMED", e.STARTED = "STARTED", e.ACTIVE = "ACTIVE", e.LOADED = "LOADED", e.RUNNING = "RUNNING", e.ADMITTED = "ADMITTED", e.ADMIT = "ADMIT", e.UPDATED = "UPDATED", e.NO = "NO", e.YES = "YES", e.COURSE_ALLOCATION = "COURSE_ALLOCATION", e.ELECTIVE = "ELECTIVE", e.CORE = "CORE", e.NOTIFICATION = "NOTIFICATION", e.NOTIFICATION_ALERT = "NOTIFICATION_ALERT", e.NOTIFICATION_ALERT_CLOSE = "NOTIFICATION_ALERT_CLOSE", e.HEALTHY = "HEALTHY", e.UNHEALTHY = "UNHEALTHY", e.TEACHING = "TEACHING", e.NONTEACHING = "NONTEACHING", e.STUDENTS = "STUDENTS", e.APPLICANTS = "APPLICANTS", e.PROGRAMMES = "PROGRAMMES", e.APPOINTMENT = "APPOINTMENT", e.UNITS = "UNITS", e.SUBGROUPS = "SUBGROUPS", e.CURRICULUM = "CURRICULUM", e.EXAMINATIONS = "EXAMINATIONS", e.LEAVE = "LEAVE", e.ORGANIZATIONAL_UNITS = "ORGANIZATIONAL_UNITS", e.PROGRESS = "PROGRESS", e.COMPLETED = "COMPLETED", e.QUALIFIED = "QUALIFIED", e.WAITING = "WAITING", e.PENDING = "PENDING", e.IN_PROGRESS = "IN_PROGRESS", e.CIRRICULUM = "CIRRICULUM", e.NOTICE = "NOTICE", e.OPEN = "OPEN", e.ACCESS_TOKEN = "access_token", e.APPLICATION_ACCESS_TOKEN = "a_token", e.APPLICATION = "APPLICATION", e.APPLY_AS_AWAITING = "APPLY_AS_AWAITING", e.UPLOAD_RESULTS = "UPLOAD_RESULTS", e.TEXT = "TEXT", e.TEXTAREA = "TEXTAREA", e.EMAIL = "EMAIL", e.PHONE = "PHONE", e.NUMBER = "NUMBER", e.PASSWORD = "PASSWORD", e.DOCUMENT = "DOCUMENT", e.EDIT = "EDIT", e.DELETE = "DELETE", e.ACADEMIC = "ACADEMIC", e.NONACADEMIC = "NONACADEMIC", e.INTERNATIONAL = "INTERNATIONAL", e.VOUCHER_PARAM = "VOUCHER_PARAM", e.VOUCHER = "VOUCHER", e.EMAIL_ADDRESS = "EMAIL_ADDRESS", e.MOBILE_MONEY = "MOBILE_MONEY", e.LOCAL = "LOCAL", e.FRONT = "FRONT", e.ADMISSION = "ADMISSION", e.MEDIA_CAPTURED = "MEDIA_CAPTURED", e.FEMALE = "FEMALE", e.MALE = "MALE", e.DATASETTABLE_REQUEST = "DATASETTABLE_REQUEST", e.SMALL = "SMALL", e.NORMAL = "NORMAL", e.LARGE = "LARGE", e.AGGREGATE = "AGGREGATE", e.AUTOMATIC = "AUTOMATIC", e.MANUAL = "MANUAL", e.INTERVIEW = "INTERVIEW", e.ENTRANCE_EXAMS = "ENTRANCE_EXAMS", e.REJECT = "REJECT", e.SYSTEM_GET_STARTED = "SYSTEM_GET_STARTED", e.COURSE_POLICY = "COURSE_POLICY", e.REJECTED = "REJECTED", e.COURSES = "COURSES", e.GRADE_CUT_OF_POINT_STATE = "GRADE_CUT_OF_POINT_STATE", e.AGGREGATE_CUT_OF_POINT_STATE = "AGGREGATE_CUT_OF_POINT_STATE", e.GENDER_CUT_OF_POINT_STATE = "GENDER_CUT_OF_POINT_STATE", e.MATURE_INVITATION = "MATURE_INVITATION", e.RESULTS = "RESULTS", e.FILE_UPLOAD = "FILE_UPLOAD", e.COURSE_REMOVED = "COURSE_REMOVED", e.COURSE_ADDED = "COURSE_ADDED", e.RECOMMENDATION_LETTER = "RECOMMENDATION_LETTER", e.ERROR_MESSAGE = "Sorry for the inconvenience caused by the error. Please contact us if the issue persists. ", e.POSITIONS = "POSITIONS", e.WASSCE_RESULTS = "WASSCE_RESULTS", e.NEW_SITTING = "NEW_SITTING", e.REFEREE = "REFEREE", e.CERTIFICATE = "CERTIFICATE", e.TRANSCRIPT = "TRANSCRIPT", e.CERTIFICATES_AND_TRANSCRIPTS = "CERTIFICATES_AND_TRANSCRIPTS", e.RECOMMENDATION_LETTERS = "RECOMMENDATION_LETTERS", e.SECONDARY_SCHOOL_DOCUMENTS = "SECONDARY_SCHOOL_DOCUMENTS", e.UPDATE_INFORMATION = "UPDATE_INFORMATION", e.SUB_CAMPUSES = "SUB_CAMPUSES", e.VOUCHER_FEES = "VOUCHER_FEES", e.REPORT = "REPORT", e.NEW_DOCUMENT = "NEW_DOCUMENT", e.OTHERS = "OTHERS", e.REGULAR = "REGULAR", e.INTERNAL = "INTERNAL", e.EXTERNAL = "EXTERNAL", e.COLOR = "COLOR", e.SEARCH = "SEARCH", e.IMMEDIATELY = "IMMEDIATELY", e.CUSTOM = "CUSTOM", e.ACTING = "ACTING", e.SUBSTANTIAL = "SUBSTANTIAL", e.UPLOAD_MANAGER_REQUEST = "UPLOAD_MANAGER_REQUEST", e))(M || {}); class Pu { constructor() { x(this, "generateKey", () => Math.floor(Math.random() * 100) + 1); } getFileSize(r) { let t = r.size; const n = ["Bytes", "KB", "MB", "GB"]; let i = 0; for (; t > 900; ) t /= 1024, i++; return `${Math.round(t * 100) / 100} ${n[i]}`; } getExtension(r) { return r.split(".").pop(); } getFileName(r) { return r.split("/").pop(); } isValidHttpUrl(r) { let t; try { t = new URL(r); } catch { return !1; } return /https?/.test(t.protocol); } makeUniqueid(r = 10) { let t = ""; const n = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789", i = n.length; for (let s = 0; s < r; s++) t += n.charAt(Math.floor(Math.random() * i)); return t; } nameToText(r) { return r.split("_").join(" "); } getRandomColor() { const r = "0123456789ABCDEF"; let t = "#"; for (let n = 0; n < 6; n++) t += r[Math.floor(Math.random() * 16)]; return t; } concat(r, t) { return `${r} ${t}`; } isObject(r) { return typeof r == "object" && r !== null && !Array.isArray(r) && !(r instanceof File); } isEmptyOrNull(r, t = !1) { if (r == null) return !0; if (Array.isArray(r)) return r.length === 0; if (typeof r == "object" && !Array.isArray(r) && !(r instanceof File)) { const n = Object.keys(r); return n.length === 0 ? !0 : t ? n.every((i) => { const s = r[i]; return typeof s == "string" ? s.trim() === "" : typeof s == "boolean" ? s === !1 : typeof s == "number" ? s === 0 : Array.isArray(s) ? s.length === 0 : s instanceof File ? s.size === 0 : typeof s == "object" && s !== null ? Object.keys(s).length === 0 : s == null; }) : !n.some((i) => { const s = r[i]; return typeof s == "string" ? s.trim() !== "" : typeof s == "boolean" ? s === !0 : typeof s == "number" ? s !== 0 : Array.isArray(s) ? s.length !== 0 : s instanceof File ? s.size !== 0 : typeof s == "object" && s !== null ? Object.keys(s).length !== 0 : s != null; }); } return r instanceof File ? r.size === 0 : r === ""; } toBoolean(r) { return String(r).toLowerCase() === "true"; } toStringDefault(r, t = "") { return this.isEmptyOrNull(r) ? `${t}` : `${r}`; } toString(r) { return `${r}`; } isEmpty(r) { return r === "" || r === void 0 || r === null; } validatePasswords(r, t) { return r !== "" && r === t; } validatePassword(r) { const t = /[A-Z]/.test(r), n = /[a-z]/.test(r), i = /\d/.test(r), s = /[~`!#@$%^&*+=\-[\]\\';,/{}|\\":<>?]/.test(r), o = r.length >= 8; return { hasUppercase: t, hasLowercase: n, hasNumber: i, hasSpecialCharacter: s, has8Characters: o, allValidationsPassed: t && n && i && s && o }; } isNotEmpty(r) { return r !== ""; } columnHead(r) { let t = r.split("_"); return t.length > 1 && t.slice(-1)[0].toLowerCase() ? t.slice(0, -1).join(" ").toUpperCase() : t.join(" ").toUpperCase(); } convertUnderscoreToSpaceString(r) { return r.replace(/_/g, " "); } isDarkTheme() { return localStorage.getItem("color-theme") === "dark" || !("color-theme" in localStorage) && window.matchMedia("(prefers-color-scheme: dark)").matches; } async sync_theme(r) { let t; const n = localStorage.getItem("color-theme"); n ? n === "light" ? (document.documentElement.classList.add("dark"), localStorage.setItem("color-theme", "dark"), t = !0) : (document.documentElement.classList.remove("dark"), localStorage.setItem("color-theme", "light"), t = !1) : document.documentElement.classList.contains("dark") ? (document.documentElement.classList.remove("dark"), localStorage.setItem("color-theme", "light"), t = !1) : (document.documentElement.classList.add("dark"), localStorage.setItem("color-theme", "dark"), t = !0), r && r(t); } async imageSize(r) { return new Promise((t, n) => { try { const i = new FileReader(); i.onload = () => { const s = new Image(); s.onload = () => { t({ width: s.width, height: s.height }); }, s.src = i.result; }, i.onerror = (s) => { n(s); }, i.readAsDataURL(r); } catch (i) { n(i); } }); } capitalizeEachWord(r) { return r.toLowerCase().split(" ").map((n) => n.charAt(0).toUpperCase() + n.slice(1)).join(" "); } formatDateString(r) { const t = r.match(/^(\d{2})\/(\d{2})\/(\d{4})$/); if (!t) throw new Error("Invalid date format. Please provide date in dd/mm/yyyy format."); const [, n, i, s] = t; return `${s}-${i}-${n}`; } formatDate(r) { const t = new Date(r), n = t.getFullYear(), i = String(t.getMonth() + 1).padStart(2, "0"), s = String(t.getDate()).padStart(2, "0"); return `${n}-${i}-${s}`; } validateEmail(r) { return /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(r); } convertNumber(r) { return Math.abs(r) >= 1e6 ? (r / 1e6).toString().substring(0, 4) + "M" : Math.abs(r) >= 1e3 ? (r / 1e3).toString().substring(0, 4) + "k" : r.toString(); } daysLeft(r) { const t = new Date(r), n = /* @__PURE__ */ new Date(), i = t.getTime() - n.getTime(); return Math.ceil(i / (1e3 * 3600 * 24)); } formatDateToCustomFormat(r) { const n = ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"][r.getDay()], i = r.getDate(), o = [ "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December" ][r.getMonth()], a = r.getFullYear(); function l(d) { if (d >= 11 && d <= 13) return "th"; switch (d % 10) { case 1: return "st"; case 2: return "nd"; case 3: return "rd"; default: return "th"; } } const c = l(i); return `${n}, ${i}${c} ${o}, ${a}`; } getTimeAgoAndCustomDate(r) { const t = /* @__PURE__ */ new Date(), n = new Date(r), i = t.getTime() - n.getTime(); if (t < n) return "Future date"; const s = Math.floor(i / 1e3); return s < 60 ? `${s} seconds ago` : s < 3600 ? `${Math.floor(s / 60)} minutes ago` : s < 86400 ? `${Math.floor(s / 3600)} hours ago` : s < 2592e3 ? `${Math.floor(s / 86400)} days ago` : n.toLocaleString("en-US", { day: "numeric", month: "long", year: "numeric", hour: "numeric", minute: "numeric", second: "numeric", timeZoneName: "short" }); } roundTo2dp(r) { const t = parseFloat(r); return isNaN(t) ? r : (Math.round(t * 100) / 100).toFixed(2); } } const _ = new Pu(); /**! * @fileOverview Kickass library to create and place poppers near their reference elements. * @version 1.16.1 * @license * Copyright (c) 2016 Federico Zivolo and contributors * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ var qr = typeof window < "u" && typeof document < "u" && typeof navigator < "u", Iu = function() { for (var e = ["Edge", "Trident", "Firefox"], r = 0; r < e.length; r += 1) if (qr && navigator.userAgent.indexOf(e[r]) >= 0) return 1; return 0; }(); function Mu(e) { var r = !1; return function() { r || (r = !0, window.Promise.resolve().then(function() { r = !1, e(); })); }; } function Lu(e) { var r = !1; return function() { r || (r = !0, setTimeout(function() { r = !1, e(); }, Iu)); }; } var Du = qr && window.Promise, $u = Du ? Mu : Lu; function Pa(e) { var r = {}; return e && r.toString.call(e) === "[object Function]"; } function Xt(e, r) { if (e.nodeType !== 1) return []; var t = e.ownerDocument.defaultView, n = t.getComputedStyle(e, null); return r ? n[r] : n; } function vs(e) { return e.nodeName === "HTML" ? e : e.parentNode || e.host; } function Yr(e) { if (!e) return document.body; switch (e.nodeName) { case "HTML": case "BODY": return e.ownerDocument.body; case "#document": return e.body; } var r = Xt(e), t = r.overflow, n = r.overflowX, i = r.overflowY; return /(auto|scroll|overlay)/.test(t + i + n) ? e : Yr(vs(e)); } function Ia(e) { return e && e.referenceNode ? e.referenceNode : e; } var no = qr && !!(window.MSInputMethodContext && document.documentMode), io = qr && /MSIE 10/.test(navigator.userAgent); function vr(e) { return e === 11 ? no : e === 10 ? io : no || io; } function ur(e) { if (!e) return document.documentElement; for (var r = vr(10) ? document.body : null, t = e.offsetParent || null; t === r && e.nextElementSibling; ) t = (e = e.nextElementSibling).offsetParent; var n = t && t.nodeName; return !n || n === "BODY" || n === "HTML" ? e ? e.ownerDocument.documentElement : document.documentElement : ["TH", "TD", "TABLE"].indexOf(t.nodeName) !== -1 && Xt(t, "position") === "static" ? ur(t) : t; } function Fu(e) { var r = e.nodeName; return r === "BODY" ? !1 : r === "HTML" || ur(e.firstElementChild) === e; } function Ri(e) { return e.parentNode !== null ? Ri(e.parentNode) : e; } function En(e, r) { if (!e || !e.nodeType || !r || !r.nodeType) return document.documentElement; var t = e.compareDocumentPosition(r) & Node.DOCUMENT_POSITION_FOLLOWING, n = t ? e : r, i = t ? r : e, s = document.createRange(); s.setStart(n, 0), s.setEnd(i, 0); var o = s.commonAncestorContainer; if (e !== o && r !== o || n.contains(i)) return Fu(o) ? o : ur(o); var a = Ri(e); return a.host ? En(a.host, r) : En(e, Ri(r).host); } function dr(e) { var r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "top", t = r === "top" ? "scrollTop" : "scrollLeft", n = e.nodeName; if (n === "BODY" || n === "HTML") { var i = e.ownerDocument.documentElement, s = e.ownerDocument.scrollingElement || i; return s[t]; } return e[t]; } function Uu(e, r) { var t = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !1, n = dr(r, "top"), i = dr(r, "left"), s = t ? -1 : 1; return e.top += n * s, e.bottom += n * s, e.left += i * s, e.right += i * s, e; } function so(e, r) { var t = r === "x" ? "Left" : "Top", n = t === "Left" ? "Right" : "Bottom"; return parseFloat(e["border" + t + "Width"]) + parseFloat(e["border" + n + "Width"]); } function oo(e, r, t, n) { return Math.max(r["offset" + e], r["scroll" + e], t["client" + e], t["offset" + e], t["scroll" + e], vr(10) ? parseInt(t["offset" + e]) + parseInt(n["margin" + (e === "Height" ? "Top" : "Left")]) + parseInt(n["margin" + (e === "Height" ? "Bottom" : "Right")]) : 0); } function Ma(e) { var r = e.body, t = e.documentElement, n = vr(10) && getComputedStyle(t); return { height: oo("Height", r, t, n), width: oo("Width", r, t, n) }; } var Bu = function(e, r) { if (!(e instanceof r)) throw new TypeError("Cannot call a class as a function"); }, zu = /* @__PURE__ */ function() { function e(r, t) { for (var n = 0; n < t.length; n++) { var i = t[n]; i.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), Object.defineProperty(r, i.key, i); } } return function(r, t, n) { return t && e(r.prototype, t), n && e(r, n), r; }; }(), fr = function(e, r, t) { return r in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }, Je = Object.assign || function(e) { for (var r = 1; r < arguments.length; r++) { var t = arguments[r]; for (var n in t) Object.prototype.hasOwnProperty.call(t, n) && (e[n] = t[n]); } return e; }; function _t(e) { return Je({}, e, { right: e.left + e.width, bottom: e.top + e.height }); } function ji(e) { var r = {}; try { if (vr(10)) { r = e.getBoundingClientRect(); var t = dr(e, "top"), n = dr(e, "left"); r.top += t, r.left += n, r.bottom += t, r.right += n; } else r = e.getBoundingClientRect(); } catch { } var i = { left: r.left, top: r.top, width: r.right - r.left, height: r.bottom - r.top }, s = e.nodeName === "HTML" ? Ma(e.ownerDocument) : {}, o = s.width || e.clientWidth || i.width, a = s.height || e.clientHeight || i.height, l = e.offsetWidth - o, c = e.offsetHeight - a; if (l || c) { var d = Xt(e); l -= so(d, "x"), c -= so(d, "y"), i.width -= l, i.height -= c; } return _t(i); } function gs(e, r) { var t = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !1, n = vr(10), i = r.nodeName === "HTML", s = ji(e), o = ji(r), a = Yr(e), l = Xt(r), c = parseFloat(l.borderTopWidth), d = parseFloat(l.borderLeftWidth); t && i && (o.top = Math.max(o.top, 0), o.left = Math.max(o.left, 0)); var f = _t({ top: s.top - o.top - c, left: s.left - o.left - d, width: s.width, height: s.height }); if (f.marginTop = 0, f.marginLeft = 0, !n && i) { var h = parseFloat(l.marginTop), m = parseFloat(l.marginLeft); f.top -= c - h, f.bottom -= c - h, f.left -= d - m, f.right -= d - m, f.marginTop = h, f.marginLeft = m; } return (n && !t ? r.contains(a) : r === a && a.nodeName !== "BODY") && (f = Uu(f, r)), f; } function Hu(e) { var r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1, t = e.ownerDocument.documentElement, n = gs(e, t), i = Math.max(t.clientWidth, window.innerWidth || 0), s = Math.max(t.clientHeight, window.innerHeight || 0), o = r ? 0 : dr(t), a = r ? 0 : dr(t, "left"), l = { top: o - n.top + n.marginTop, left: a - n.left + n.marginLeft, width: i, height: s }; return _t(l); } function La(e) { var r = e.nodeName; if (r === "BODY" || r === "HTML") return !1; if (Xt(e, "position") === "fixed") return !0; var t = vs(e); return t ? La(t) : !1; } function Da(e) { if (!e || !e.parentElement || vr()) return document.documentElement; for (var r = e.parentElement; r && Xt(r, "transform") === "none"; ) r = r.parentElement; return r || document.documentElement; } function ys(e, r, t, n) { var i = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : !1, s = { top: 0, left: 0 }, o = i ? Da(e) : En(e, Ia(r)); if (n === "viewport") s = Hu(o, i); else { var a = void 0; n === "scrollParent" ? (a = Yr(vs(r)), a.nodeName === "BODY" && (a = e.ownerDocument.documentElement)) : n === "window" ? a = e.ownerDocument.documentElement : a = n; var l = gs(a, o, i); if (a.nodeName === "HTML" && !La(o)) { var c = Ma(e.ownerDocument), d = c.height, f = c.width; s.top += l.top - l.marginTop, s.bottom = d + l.top, s.left += l.left - l.marginLeft, s.right = f + l.left; } else s = l; } t = t || 0; var h = typeof t == "number"; return s.left += h ? t : t.left || 0, s.top += h ? t : t.top || 0, s.right -= h ? t : t.right || 0, s.bottom -= h ? t : t.bottom || 0, s; } function Wu(e) { var r = e.width, t = e.height; return r * t; } function $a(e, r, t, n, i) { var s = arguments.length > 5 && arguments[5] !== void 0 ? arguments[5] : 0; if (e.indexOf("auto") === -1) return e; var o = ys(t, n, s, i), a = { top: { width: o.width, height: r.top - o.top }, right: { width: o.right - r.right, height: o.height }, bottom: { width: o.width, height: o.bottom - r.bottom }, left: { width: r.left - o.left, height: o.height } }, l = Object.keys(a).map(function(h) { return Je({ key: h }, a[h], { area: Wu(a[h]) }); }).sort(function(h, m) { return m.area - h.area; }), c = l.filter(function(h) { var m = h.width, p = h.height; return m >= t.clientWidth && p >= t.clientHeight; }), d = c.length > 0 ? c[0].key : l[0].key, f = e.split("-")[1]; return d + (f ? "-" + f : ""); } function Fa(e, r, t) { var n = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : null, i = n ? Da(r) : En(r, Ia(t)); return gs(t, i, n); } function Ua(e) { var r = e.ownerDocument.defaultView, t = r.getComputedStyle(e), n = parseFloat(t.marginTop || 0) + parseFloat(t.marginBottom || 0), i = parseFloat(t.marginLeft || 0) + parseFloat(t.marginRight || 0), s = { width: e.offsetWidth + i, height: e.offsetHeight + n }; return s; } function Cn(e) { var r = { left: "right", right: "left", bottom: "top", top: "bottom" }; return e.replace(/left|right|bottom|top/g, function(t) { return r[t]; }); } function Ba(e, r, t) { t = t.split("-")[0]; var n = Ua(e), i = { width: n.width, height: n.height }, s = ["right", "left"].indexOf(t) !== -1, o = s ? "top" : "left", a = s ? "left" : "top", l = s ? "height" : "width", c = s ? "width" : "height"; return i[o] = r[o] + r[l] / 2 - n[l] / 2, t === a ? i[a] = r[a] - n[c] : i[a] = r[Cn(a)], i; } function Gr(e, r) { return Array.prototype.find ? e.find(r) : e.filter(r)[0]; } function Vu(e, r, t) { if (Array.prototype.findIndex) return e.findIndex(function(i) { return i[r] === t; }); var n = Gr(e, function(i) { return i[r] === t; }); return e.indexOf(n); } function za(e, r, t) { var n = t === void 0 ? e : e.slice(0, Vu(e, "name", t)); return n.forEach(function(i) { i.function && console.warn("`modifier.function` is deprecated, use `modifier.fn`!"); var s = i.function || i.fn; i.enabled && Pa(s) && (r.offsets.popper = _t(r.offsets.popper), r.offsets.reference = _t(r.offsets.reference), r = s(r, i)); }), r; } function qu() { if (!this.state.isDestroyed) { var e = { instance: this, styles: {}, arrowStyles: {}, attributes: {}, flipped: !1, offsets: {} }; e.offsets.reference = Fa(this.state, this.popper, this.reference, this.options.positionFixed), e.placement = $a(this.options.placement, e.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding), e.originalPlacement = e.placement, e.positionFixed = this.options.positionFixed, e.offsets.popper = Ba(this.popper, e.offsets.reference, e.placement), e.offsets.popper.position = this.options.positionFixed ? "fixed" : "absolute", e = za(this.modifiers, e), this.state.isCreated ? this.options.onUpdate(e) : (this.state.isCreated = !0, this.options.onCreate(e)); } } function Ha(e, r) { return e.some(function(t) { var n = t.name, i = t.enabled; return i && n === r; }); } function bs(e) { for (var r = [!1, "ms", "Webkit", "Moz", "O"], t = e.charAt(0).toUpperCase() + e.slice(1), n = 0; n < r.length; n++) { var i = r[n], s = i ? "" + i + t : e; if (typeof document.body.style[s] < "u") return s; } return null; } function Yu() { return this.state.isDestroyed = !0, Ha(this.modifiers, "applyStyle") && (this.popper.removeAttribute("x-placement"), this.popper.style.position = "", this.popper.style.top = "", this.popper.style.left = "", this.popper.style.right = "", this.popper.style.bottom = "", this.popper.style.willChange = "", this.popper.style[bs("transform")] = ""), this.disableEventListeners(), this.options.removeOnDestroy && this.popper.parentNode.removeChild(this.popper), this; } function Wa(e) { var r = e.ownerDocument; return r ? r.defaultView : window; } function Va(e, r, t, n) { var i = e.nodeName === "BODY", s = i ? e.ownerDocument.defaultView : e; s.addEventListener(r, t, { passive: !0 }), i || Va(Yr(s.parentNode), r, t, n), n.push(s); } function Gu(e, r, t, n) { t.updateBound = n, Wa(e).addEventListener("resize", t.updateBound, { passive: !0 }); var i = Yr(e); return Va(i, "scroll", t.updateBound, t.scrollParents), t.scrollElement = i, t.eventsEnabled = !0, t; } function Xu() { this.state.eventsEnabled || (this.state = Gu(this.reference, this.options, this.state, this.scheduleUpdate)); } function Ku(e, r) { return Wa(e).removeEventListener("resize", r.updateBound), r.scrollParents.forEach(function(t) { t.removeEventListener("scroll", r.updateBound); }), r.updateBound = null, r.scrollParents = [], r.scrollElement = null, r.eventsEnabled = !1, r; } function Ju() { this.state.eventsEnabled && (cancelAnimationFrame(this.scheduleUpdate), this.state = Ku(this.reference, this.state)); } function xs(e) { return e !== "" && !isNaN(parseFloat(e)) && isFinite(e); } function ki(e, r) { Object.keys(r).forEach(function(t) { var n = ""; ["width", "height", "top", "right", "bottom", "left"].indexOf(t) !== -1 && xs(r[t]) && (n = "px"), e.style[t] = r[t] + n; }); } function Zu(e, r) { Object.keys(r).forEach(function(t) { var n = r[t]; n !== !1 ? e.setAttribute(t, r[t]) : e.removeAttribute(t); }); } function Qu(e) { return ki(e.instance.popper, e.styles), Zu(e.instance.popper, e.attributes), e.arrowElement && Object.keys(e.arrowStyles).length && ki(e.arrowElement, e.arrowStyles), e; } function ed(e, r, t, n, i) { var s = Fa(i, r, e, t.positionFixed), o = $a(t.placement, s, r, e, t.modifiers.flip.boundariesElement, t.modifiers.flip.padding); return r.setAttribute("x-placement", o), ki(r, { position: t.positionFixed ? "fixed" : "absolute" }), t; } function td(e, r) { var t = e.offsets, n = t.popper, i = t.reference, s = Math.round, o = Math.floor, a = function(b) { return b; }, l = s(i.width), c = s(n.width), d = ["left", "right"].indexOf(e.placement) !== -1, f = e.placement.indexOf("-") !== -1, h = l % 2 === c % 2, m = l % 2 === 1 && c % 2 === 1, p = r ? d || f || h ? s : o : a, v = r ? s : a; return { left: p(m && !f && r ? n.left - 1 : n.left), top: v(n.top), bottom: v(n.bottom), right: p(n.right) }; } var rd = qr && /Firefox/i.test(navigator.userAgent); function nd(e, r) { var t = r.x, n = r.y, i = e.offsets.popper, s = Gr(e.instance.modifiers, function(E) { return E.name === "applyStyle"; }).gpuAcceleration; s !== void 0 && console.warn("WARNING: `gpuAcceleration` option moved to `computeStyle` modifier and will not be supported in future versions of Popper.js!"); var o = s !== void 0 ? s : r.gpuAcceleration, a = ur(e.instance.popper), l = ji(a), c = { position: i.position }, d = td(e, window.devicePixelRatio < 2 || !rd), f = t === "bottom" ? "top" : "bottom", h = n === "right" ? "left" : "right", m = bs("transform"), p = void 0, v = void 0; if (f === "bottom" ? a.nodeName === "HTML" ? v = -a.clientHeight + d.bottom : v = -l.height + d.bottom : v = d.top, h === "right" ? a.nodeName === "HTML" ? p = -a.clientWidth + d.right : p = -l.width + d.right : p = d.left, o && m) c[m] = "translate3d(" + p + "px, " + v + "px, 0)", c[f] = 0, c[h] = 0, c.willChange = "transform"; else { var g = f === "bottom" ? -1 : 1, b = h === "right" ? -1 : 1; c[f] = v * g, c[h] = p * b, c.willChange = f + ", " + h; } var w = { "x-placement": e.placement }; re