hplx-feature-library 1.0.223 → 1.0.225

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (88) hide show
  1. package/dist/{APIAction-DLCcL2Li.js → APIAction-CTNOzVOC.js} +24 -23
  2. package/dist/APIAction-DB6Ulkss.cjs +1 -0
  3. package/dist/AllInvestigations/components/AllInvestigationsTable.d.ts +19 -0
  4. package/dist/AllInvestigations/index.d.ts +1 -0
  5. package/dist/AllInvestigations/index.js +4 -0
  6. package/dist/AllInvestigations/utils/test-tange-util.d.ts +8 -0
  7. package/dist/AllInvestigationsTable-BDLPOHjr.cjs +79 -0
  8. package/dist/AllInvestigationsTable-Dg-YXASz.js +17065 -0
  9. package/dist/Attachments/index.js +1 -1
  10. package/dist/{Attachments-3UkuRnaT.js → Attachments-4FIsCWlc.js} +6180 -6299
  11. package/dist/Attachments-Dr6yedl9.cjs +186 -0
  12. package/dist/NineDots/index.js +1 -1
  13. package/dist/{NineDots-q--wtv3_.cjs → NineDots-BEzE3Pj8.cjs} +1 -1
  14. package/dist/{NineDots-gflwjmeo.js → NineDots-CCtE2t9I.js} +1 -1
  15. package/dist/PatientAddEdit/index.js +1 -1
  16. package/dist/{PatientAddEdit-DRQcxWYN.js → PatientAddEdit-9W7ONHSd.js} +7 -6
  17. package/dist/PatientAddEdit-DmpV8z5a.cjs +7 -0
  18. package/dist/PatientPopup/index.js +1 -1
  19. package/dist/PatientPopupContainer-B9Ev8xjs.cjs +36 -0
  20. package/dist/{PatientPopupContainer-ci6LHf6q.js → PatientPopupContainer-DpCBNO2c.js} +9 -10
  21. package/dist/PediatricsCalculator/index.js +1 -1
  22. package/dist/PediatricsCalculatorTable-B4fTy1J5.cjs +9 -0
  23. package/dist/{PediatricsCalculatorTable-qu37FR7D.js → PediatricsCalculatorTable-G0ttbDpi.js} +228 -236
  24. package/dist/{PrintModal-Di2l9BWm.js → PrintModal-BF2-PDRX.js} +132 -145
  25. package/dist/{PrintModal-C7QPU-Sg.cjs → PrintModal-mNA_qJpW.cjs} +28 -28
  26. package/dist/{ReusableModal-2GKjVVbf.cjs → ReusableModal-CIgDYOWZ.cjs} +1 -1
  27. package/dist/{ReusableModal-BL_DwV8I.js → ReusableModal-CT4_gW1b.js} +1 -1
  28. package/dist/ReusableTable/ReusableTable.d.ts +3 -0
  29. package/dist/ReusableTable/ReusableTableConstants.d.ts +8 -0
  30. package/dist/ReusableTable/ReusableTableTypes.d.ts +96 -0
  31. package/dist/ReusableTable/components/EmptyTableContainer.d.ts +12 -0
  32. package/dist/ReusableTable/components/FilterCheckbox.d.ts +8 -0
  33. package/dist/ReusableTable/components/FilterDropdown.d.ts +17 -0
  34. package/dist/ReusableTable/components/Pagination.d.ts +2 -0
  35. package/dist/ReusableTable/components/TableBody.d.ts +2 -0
  36. package/dist/ReusableTable/components/TableCell.d.ts +3 -0
  37. package/dist/ReusableTable/components/TableFilterSelect.d.ts +12 -0
  38. package/dist/ReusableTable/components/TableHead.d.ts +2 -0
  39. package/dist/ReusableTable/components/TableMain.d.ts +2 -0
  40. package/dist/ReusableTable/components/TableRow.d.ts +3 -0
  41. package/dist/ReusableTable/context/TableContext.d.ts +21 -0
  42. package/dist/ReusableTable/context/TableContextBase.d.ts +26 -0
  43. package/dist/ReusableTable/context/useTableContext.d.ts +2 -0
  44. package/dist/SearchPatients/index.js +1 -1
  45. package/dist/{SearchPatients-DbYAGumB.cjs → SearchPatients-6D7IL_wj.cjs} +1 -1
  46. package/dist/{SearchPatients-BbtytMYS.js → SearchPatients-D7cCFV9o.js} +3 -3
  47. package/dist/TrendGraphs/AreaChartComponent.d.ts +9 -0
  48. package/dist/TrendGraphs/LineChartComponent/DataPointToolTip.d.ts +16 -0
  49. package/dist/TrendGraphs/LineChartComponent/LineChartBody.d.ts +2 -0
  50. package/dist/TrendGraphs/LineChartComponent/LineChartHeader.d.ts +2 -0
  51. package/dist/TrendGraphs/LineChartComponent/index.d.ts +2 -0
  52. package/dist/TrendGraphs/context/index.d.ts +2 -0
  53. package/dist/TrendGraphs/hooks/useTrendGraphContext.d.ts +2 -0
  54. package/dist/TrendGraphs/utils/index.d.ts +4 -0
  55. package/dist/UserProfile/index.js +1 -1
  56. package/dist/{UserProfile-D3Rhhuj9.cjs → UserProfile-4L3aOHNv.cjs} +4 -4
  57. package/dist/{UserProfile-jDWt9g20.js → UserProfile-D3cCwQxw.js} +9 -8
  58. package/dist/clsx-C11secjj.cjs +1 -0
  59. package/dist/clsx-OuTLNxxd.js +16 -0
  60. package/dist/common-utils-CprPMjtz.js +1952 -0
  61. package/dist/common-utils-DrDXKNhv.cjs +6 -0
  62. package/dist/components/Modal.d.ts +5 -0
  63. package/dist/constants/TrendGraphsConstants.d.ts +2 -0
  64. package/dist/dayjs.min-D52_GdfV.js +284 -0
  65. package/dist/dayjs.min-DXp74Ozx.cjs +1 -0
  66. package/dist/hplx-feature-library.css +1 -1
  67. package/dist/{index-UPYT3B9g.js → index-Bd0CDVpH.js} +3 -2
  68. package/dist/index-CJFGOBPb.js +122 -0
  69. package/dist/{index-CJ2AKRoq.cjs → index-DQlbIHh3.cjs} +26 -26
  70. package/dist/index-DfcUmlge.cjs +17 -0
  71. package/dist/{index-CRCsQdYf.cjs → index-DkA8S5IK.cjs} +1 -1
  72. package/dist/{index-BzwuwvT5.js → index-T1lUjzhG.js} +1 -1
  73. package/dist/index.d.ts +1 -0
  74. package/dist/index.js +15 -13
  75. package/dist/print-pdf/index.js +1 -1
  76. package/dist/types/AllInvestigationTypes/index.js +4 -0
  77. package/dist/types/AllInvestigationTypes.d.ts +45 -0
  78. package/dist/types/TrendGraphTypes.d.ts +19 -0
  79. package/dist/useClickOutside-BjJyGTec.js +14 -0
  80. package/dist/useClickOutside-DsVG12Cs.cjs +1 -0
  81. package/package.json +11 -1
  82. package/dist/APIAction-Bev2spv1.cjs +0 -1
  83. package/dist/Attachments-B9GrTokn.cjs +0 -202
  84. package/dist/PatientAddEdit-DtcwFtoA.cjs +0 -7
  85. package/dist/PatientPopupContainer-C7Y9w79Y.cjs +0 -36
  86. package/dist/PediatricsCalculatorTable-bTvt7SWQ.cjs +0 -9
  87. package/dist/common-utils-BNaPcohw.cjs +0 -6
  88. package/dist/common-utils-BidUvSFN.js +0 -2233
@@ -1,2233 +0,0 @@
1
- import { B as tt, g as $t, U as xt } from "./CommonConstant-Bj7SvPfU.js";
2
- import { g as Ct } from "./index-UPYT3B9g.js";
3
- var Nt = /* @__PURE__ */ ((e) => (e.visitpad = "/md/viewPatientDashboard.php", e.consultations = "/md/viewPatientList.php", e.appointments = "/md/viewPatientAppointments.php", e.settings = "/md/viewPreferenceSettings.php", e.privateDb = "/md/viewPrivateDB.php", e.dashboardBase = "/", e.referEarn = "/md/inviteReferrals.php", e.teleConsults = "/md/viewRemoteAppointments.php", e.pricing = "/subscription/pricing", e.billSummary = "/subscription/bill-summary", e.pediatricsCalculator = "/md/viewPediatricCalculator.php", e))(Nt || {}), _t = /* @__PURE__ */ ((e) => (e.PRODUCTION = "PRODUCTION", e.STAGING = "STAGING", e.DEVELOPMENT = "DEVELOPMENT", e))(_t || {});
4
- function nt(e, t) {
5
- return function() {
6
- return e.apply(t, arguments);
7
- };
8
- }
9
- const { toString: Ft } = Object.prototype, { getPrototypeOf: Le } = Object, { iterator: Oe, toStringTag: rt } = Symbol, Re = /* @__PURE__ */ ((e) => (t) => {
10
- const n = Ft.call(t);
11
- return e[n] || (e[n] = n.slice(8, -1).toLowerCase());
12
- })(/* @__PURE__ */ Object.create(null)), J = (e) => (e = e.toLowerCase(), (t) => Re(t) === e), Te = (e) => (t) => typeof t === e, { isArray: oe } = Array, se = Te("undefined");
13
- function fe(e) {
14
- return e !== null && !se(e) && e.constructor !== null && !se(e.constructor) && H(e.constructor.isBuffer) && e.constructor.isBuffer(e);
15
- }
16
- const st = J("ArrayBuffer");
17
- function Mt(e) {
18
- let t;
19
- return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && st(e.buffer), t;
20
- }
21
- const Lt = Te("string"), H = Te("function"), ot = Te("number"), de = (e) => e !== null && typeof e == "object", Pt = (e) => e === !0 || e === !1, we = (e) => {
22
- if (Re(e) !== "object")
23
- return !1;
24
- const t = Le(e);
25
- return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(rt in e) && !(Oe in e);
26
- }, kt = (e) => {
27
- if (!de(e) || fe(e))
28
- return !1;
29
- try {
30
- return Object.keys(e).length === 0 && Object.getPrototypeOf(e) === Object.prototype;
31
- } catch {
32
- return !1;
33
- }
34
- }, Ut = J("Date"), Bt = J("File"), jt = J("Blob"), vt = J("FileList"), It = (e) => de(e) && H(e.pipe), qt = (e) => {
35
- let t;
36
- return e && (typeof FormData == "function" && e instanceof FormData || H(e.append) && ((t = Re(e)) === "formdata" || // detect form-data instance
37
- t === "object" && H(e.toString) && e.toString() === "[object FormData]"));
38
- }, Ht = J("URLSearchParams"), [zt, Jt, Wt, Yt] = ["ReadableStream", "Request", "Response", "Headers"].map(J), Vt = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
39
- function he(e, t, { allOwnKeys: n = !1 } = {}) {
40
- if (e === null || typeof e > "u")
41
- return;
42
- let r, s;
43
- if (typeof e != "object" && (e = [e]), oe(e))
44
- for (r = 0, s = e.length; r < s; r++)
45
- t.call(null, e[r], r, e);
46
- else {
47
- if (fe(e))
48
- return;
49
- const i = n ? Object.getOwnPropertyNames(e) : Object.keys(e), o = i.length;
50
- let c;
51
- for (r = 0; r < o; r++)
52
- c = i[r], t.call(null, e[c], c, e);
53
- }
54
- }
55
- function it(e, t) {
56
- if (fe(e))
57
- return null;
58
- t = t.toLowerCase();
59
- const n = Object.keys(e);
60
- let r = n.length, s;
61
- for (; r-- > 0; )
62
- if (s = n[r], t === s.toLowerCase())
63
- return s;
64
- return null;
65
- }
66
- const ee = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, at = (e) => !se(e) && e !== ee;
67
- function Ne() {
68
- const { caseless: e, skipUndefined: t } = at(this) && this || {}, n = {}, r = (s, i) => {
69
- const o = e && it(n, i) || i;
70
- we(n[o]) && we(s) ? n[o] = Ne(n[o], s) : we(s) ? n[o] = Ne({}, s) : oe(s) ? n[o] = s.slice() : (!t || !se(s)) && (n[o] = s);
71
- };
72
- for (let s = 0, i = arguments.length; s < i; s++)
73
- arguments[s] && he(arguments[s], r);
74
- return n;
75
- }
76
- const Kt = (e, t, n, { allOwnKeys: r } = {}) => (he(t, (s, i) => {
77
- n && H(s) ? e[i] = nt(s, n) : e[i] = s;
78
- }, { allOwnKeys: r }), e), Gt = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), Xt = (e, t, n, r) => {
79
- e.prototype = Object.create(t.prototype, r), e.prototype.constructor = e, Object.defineProperty(e, "super", {
80
- value: t.prototype
81
- }), n && Object.assign(e.prototype, n);
82
- }, Zt = (e, t, n, r) => {
83
- let s, i, o;
84
- const c = {};
85
- if (t = t || {}, e == null) return t;
86
- do {
87
- for (s = Object.getOwnPropertyNames(e), i = s.length; i-- > 0; )
88
- o = s[i], (!r || r(o, e, t)) && !c[o] && (t[o] = e[o], c[o] = !0);
89
- e = n !== !1 && Le(e);
90
- } while (e && (!n || n(e, t)) && e !== Object.prototype);
91
- return t;
92
- }, Qt = (e, t, n) => {
93
- e = String(e), (n === void 0 || n > e.length) && (n = e.length), n -= t.length;
94
- const r = e.indexOf(t, n);
95
- return r !== -1 && r === n;
96
- }, en = (e) => {
97
- if (!e) return null;
98
- if (oe(e)) return e;
99
- let t = e.length;
100
- if (!ot(t)) return null;
101
- const n = new Array(t);
102
- for (; t-- > 0; )
103
- n[t] = e[t];
104
- return n;
105
- }, tn = /* @__PURE__ */ ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && Le(Uint8Array)), nn = (e, t) => {
106
- const r = (e && e[Oe]).call(e);
107
- let s;
108
- for (; (s = r.next()) && !s.done; ) {
109
- const i = s.value;
110
- t.call(e, i[0], i[1]);
111
- }
112
- }, rn = (e, t) => {
113
- let n;
114
- const r = [];
115
- for (; (n = e.exec(t)) !== null; )
116
- r.push(n);
117
- return r;
118
- }, sn = J("HTMLFormElement"), on = (e) => e.toLowerCase().replace(
119
- /[-_\s]([a-z\d])(\w*)/g,
120
- function(n, r, s) {
121
- return r.toUpperCase() + s;
122
- }
123
- ), Be = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype), an = J("RegExp"), ct = (e, t) => {
124
- const n = Object.getOwnPropertyDescriptors(e), r = {};
125
- he(n, (s, i) => {
126
- let o;
127
- (o = t(s, i, e)) !== !1 && (r[i] = o || s);
128
- }), Object.defineProperties(e, r);
129
- }, cn = (e) => {
130
- ct(e, (t, n) => {
131
- if (H(e) && ["arguments", "caller", "callee"].indexOf(n) !== -1)
132
- return !1;
133
- const r = e[n];
134
- if (H(r)) {
135
- if (t.enumerable = !1, "writable" in t) {
136
- t.writable = !1;
137
- return;
138
- }
139
- t.set || (t.set = () => {
140
- throw Error("Can not rewrite read-only method '" + n + "'");
141
- });
142
- }
143
- });
144
- }, un = (e, t) => {
145
- const n = {}, r = (s) => {
146
- s.forEach((i) => {
147
- n[i] = !0;
148
- });
149
- };
150
- return oe(e) ? r(e) : r(String(e).split(t)), n;
151
- }, ln = () => {
152
- }, fn = (e, t) => e != null && Number.isFinite(e = +e) ? e : t;
153
- function dn(e) {
154
- return !!(e && H(e.append) && e[rt] === "FormData" && e[Oe]);
155
- }
156
- const hn = (e) => {
157
- const t = new Array(10), n = (r, s) => {
158
- if (de(r)) {
159
- if (t.indexOf(r) >= 0)
160
- return;
161
- if (fe(r))
162
- return r;
163
- if (!("toJSON" in r)) {
164
- t[s] = r;
165
- const i = oe(r) ? [] : {};
166
- return he(r, (o, c) => {
167
- const p = n(o, s + 1);
168
- !se(p) && (i[c] = p);
169
- }), t[s] = void 0, i;
170
- }
171
- }
172
- return r;
173
- };
174
- return n(e, 0);
175
- }, pn = J("AsyncFunction"), mn = (e) => e && (de(e) || H(e)) && H(e.then) && H(e.catch), ut = ((e, t) => e ? setImmediate : t ? ((n, r) => (ee.addEventListener("message", ({ source: s, data: i }) => {
176
- s === ee && i === n && r.length && r.shift()();
177
- }, !1), (s) => {
178
- r.push(s), ee.postMessage(n, "*");
179
- }))(`axios@${Math.random()}`, []) : (n) => setTimeout(n))(
180
- typeof setImmediate == "function",
181
- H(ee.postMessage)
182
- ), yn = typeof queueMicrotask < "u" ? queueMicrotask.bind(ee) : typeof process < "u" && process.nextTick || ut, wn = (e) => e != null && H(e[Oe]), a = {
183
- isArray: oe,
184
- isArrayBuffer: st,
185
- isBuffer: fe,
186
- isFormData: qt,
187
- isArrayBufferView: Mt,
188
- isString: Lt,
189
- isNumber: ot,
190
- isBoolean: Pt,
191
- isObject: de,
192
- isPlainObject: we,
193
- isEmptyObject: kt,
194
- isReadableStream: zt,
195
- isRequest: Jt,
196
- isResponse: Wt,
197
- isHeaders: Yt,
198
- isUndefined: se,
199
- isDate: Ut,
200
- isFile: Bt,
201
- isBlob: jt,
202
- isRegExp: an,
203
- isFunction: H,
204
- isStream: It,
205
- isURLSearchParams: Ht,
206
- isTypedArray: tn,
207
- isFileList: vt,
208
- forEach: he,
209
- merge: Ne,
210
- extend: Kt,
211
- trim: Vt,
212
- stripBOM: Gt,
213
- inherits: Xt,
214
- toFlatObject: Zt,
215
- kindOf: Re,
216
- kindOfTest: J,
217
- endsWith: Qt,
218
- toArray: en,
219
- forEachEntry: nn,
220
- matchAll: rn,
221
- isHTMLForm: sn,
222
- hasOwnProperty: Be,
223
- hasOwnProp: Be,
224
- // an alias to avoid ESLint no-prototype-builtins detection
225
- reduceDescriptors: ct,
226
- freezeMethods: cn,
227
- toObjectSet: un,
228
- toCamelCase: on,
229
- noop: ln,
230
- toFiniteNumber: fn,
231
- findKey: it,
232
- global: ee,
233
- isContextDefined: at,
234
- isSpecCompliantForm: dn,
235
- toJSONObject: hn,
236
- isAsyncFn: pn,
237
- isThenable: mn,
238
- setImmediate: ut,
239
- asap: yn,
240
- isIterable: wn
241
- };
242
- function R(e, t, n, r, s) {
243
- Error.call(this), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = new Error().stack, this.message = e, this.name = "AxiosError", t && (this.code = t), n && (this.config = n), r && (this.request = r), s && (this.response = s, this.status = s.status ? s.status : null);
244
- }
245
- a.inherits(R, Error, {
246
- toJSON: function() {
247
- return {
248
- // Standard
249
- message: this.message,
250
- name: this.name,
251
- // Microsoft
252
- description: this.description,
253
- number: this.number,
254
- // Mozilla
255
- fileName: this.fileName,
256
- lineNumber: this.lineNumber,
257
- columnNumber: this.columnNumber,
258
- stack: this.stack,
259
- // Axios
260
- config: a.toJSONObject(this.config),
261
- code: this.code,
262
- status: this.status
263
- };
264
- }
265
- });
266
- const lt = R.prototype, ft = {};
267
- [
268
- "ERR_BAD_OPTION_VALUE",
269
- "ERR_BAD_OPTION",
270
- "ECONNABORTED",
271
- "ETIMEDOUT",
272
- "ERR_NETWORK",
273
- "ERR_FR_TOO_MANY_REDIRECTS",
274
- "ERR_DEPRECATED",
275
- "ERR_BAD_RESPONSE",
276
- "ERR_BAD_REQUEST",
277
- "ERR_CANCELED",
278
- "ERR_NOT_SUPPORT",
279
- "ERR_INVALID_URL"
280
- // eslint-disable-next-line func-names
281
- ].forEach((e) => {
282
- ft[e] = { value: e };
283
- });
284
- Object.defineProperties(R, ft);
285
- Object.defineProperty(lt, "isAxiosError", { value: !0 });
286
- R.from = (e, t, n, r, s, i) => {
287
- const o = Object.create(lt);
288
- a.toFlatObject(e, o, function(u) {
289
- return u !== Error.prototype;
290
- }, (l) => l !== "isAxiosError");
291
- const c = e && e.message ? e.message : "Error", p = t == null && e ? e.code : t;
292
- return R.call(o, c, p, n, r, s), e && o.cause == null && Object.defineProperty(o, "cause", { value: e, configurable: !0 }), o.name = e && e.name || "Error", i && Object.assign(o, i), o;
293
- };
294
- const bn = null;
295
- function _e(e) {
296
- return a.isPlainObject(e) || a.isArray(e);
297
- }
298
- function dt(e) {
299
- return a.endsWith(e, "[]") ? e.slice(0, -2) : e;
300
- }
301
- function je(e, t, n) {
302
- return e ? e.concat(t).map(function(s, i) {
303
- return s = dt(s), !n && i ? "[" + s + "]" : s;
304
- }).join(n ? "." : "") : t;
305
- }
306
- function gn(e) {
307
- return a.isArray(e) && !e.some(_e);
308
- }
309
- const Sn = a.toFlatObject(a, {}, null, function(t) {
310
- return /^is[A-Z]/.test(t);
311
- });
312
- function Ae(e, t, n) {
313
- if (!a.isObject(e))
314
- throw new TypeError("target must be an object");
315
- t = t || new FormData(), n = a.toFlatObject(n, {
316
- metaTokens: !0,
317
- dots: !1,
318
- indexes: !1
319
- }, !1, function(S, w) {
320
- return !a.isUndefined(w[S]);
321
- });
322
- const r = n.metaTokens, s = n.visitor || u, i = n.dots, o = n.indexes, p = (n.Blob || typeof Blob < "u" && Blob) && a.isSpecCompliantForm(t);
323
- if (!a.isFunction(s))
324
- throw new TypeError("visitor must be a function");
325
- function l(f) {
326
- if (f === null) return "";
327
- if (a.isDate(f))
328
- return f.toISOString();
329
- if (a.isBoolean(f))
330
- return f.toString();
331
- if (!p && a.isBlob(f))
332
- throw new R("Blob is not supported. Use a Buffer instead.");
333
- return a.isArrayBuffer(f) || a.isTypedArray(f) ? p && typeof Blob == "function" ? new Blob([f]) : Buffer.from(f) : f;
334
- }
335
- function u(f, S, w) {
336
- let F = f;
337
- if (f && !w && typeof f == "object") {
338
- if (a.endsWith(S, "{}"))
339
- S = r ? S : S.slice(0, -2), f = JSON.stringify(f);
340
- else if (a.isArray(f) && gn(f) || (a.isFileList(f) || a.endsWith(S, "[]")) && (F = a.toArray(f)))
341
- return S = dt(S), F.forEach(function(C, k) {
342
- !(a.isUndefined(C) || C === null) && t.append(
343
- // eslint-disable-next-line no-nested-ternary
344
- o === !0 ? je([S], k, i) : o === null ? S : S + "[]",
345
- l(C)
346
- );
347
- }), !1;
348
- }
349
- return _e(f) ? !0 : (t.append(je(w, S, i), l(f)), !1);
350
- }
351
- const y = [], D = Object.assign(Sn, {
352
- defaultVisitor: u,
353
- convertValue: l,
354
- isVisitable: _e
355
- });
356
- function x(f, S) {
357
- if (!a.isUndefined(f)) {
358
- if (y.indexOf(f) !== -1)
359
- throw Error("Circular reference detected in " + S.join("."));
360
- y.push(f), a.forEach(f, function(F, I) {
361
- (!(a.isUndefined(F) || F === null) && s.call(
362
- t,
363
- F,
364
- a.isString(I) ? I.trim() : I,
365
- S,
366
- D
367
- )) === !0 && x(F, S ? S.concat(I) : [I]);
368
- }), y.pop();
369
- }
370
- }
371
- if (!a.isObject(e))
372
- throw new TypeError("data must be an object");
373
- return x(e), t;
374
- }
375
- function ve(e) {
376
- const t = {
377
- "!": "%21",
378
- "'": "%27",
379
- "(": "%28",
380
- ")": "%29",
381
- "~": "%7E",
382
- "%20": "+",
383
- "%00": "\0"
384
- };
385
- return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g, function(r) {
386
- return t[r];
387
- });
388
- }
389
- function Pe(e, t) {
390
- this._pairs = [], e && Ae(e, this, t);
391
- }
392
- const ht = Pe.prototype;
393
- ht.append = function(t, n) {
394
- this._pairs.push([t, n]);
395
- };
396
- ht.toString = function(t) {
397
- const n = t ? function(r) {
398
- return t.call(this, r, ve);
399
- } : ve;
400
- return this._pairs.map(function(s) {
401
- return n(s[0]) + "=" + n(s[1]);
402
- }, "").join("&");
403
- };
404
- function En(e) {
405
- return encodeURIComponent(e).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+");
406
- }
407
- function pt(e, t, n) {
408
- if (!t)
409
- return e;
410
- const r = n && n.encode || En;
411
- a.isFunction(n) && (n = {
412
- serialize: n
413
- });
414
- const s = n && n.serialize;
415
- let i;
416
- if (s ? i = s(t, n) : i = a.isURLSearchParams(t) ? t.toString() : new Pe(t, n).toString(r), i) {
417
- const o = e.indexOf("#");
418
- o !== -1 && (e = e.slice(0, o)), e += (e.indexOf("?") === -1 ? "?" : "&") + i;
419
- }
420
- return e;
421
- }
422
- class Ie {
423
- constructor() {
424
- this.handlers = [];
425
- }
426
- /**
427
- * Add a new interceptor to the stack
428
- *
429
- * @param {Function} fulfilled The function to handle `then` for a `Promise`
430
- * @param {Function} rejected The function to handle `reject` for a `Promise`
431
- *
432
- * @return {Number} An ID used to remove interceptor later
433
- */
434
- use(t, n, r) {
435
- return this.handlers.push({
436
- fulfilled: t,
437
- rejected: n,
438
- synchronous: r ? r.synchronous : !1,
439
- runWhen: r ? r.runWhen : null
440
- }), this.handlers.length - 1;
441
- }
442
- /**
443
- * Remove an interceptor from the stack
444
- *
445
- * @param {Number} id The ID that was returned by `use`
446
- *
447
- * @returns {void}
448
- */
449
- eject(t) {
450
- this.handlers[t] && (this.handlers[t] = null);
451
- }
452
- /**
453
- * Clear all interceptors from the stack
454
- *
455
- * @returns {void}
456
- */
457
- clear() {
458
- this.handlers && (this.handlers = []);
459
- }
460
- /**
461
- * Iterate over all the registered interceptors
462
- *
463
- * This method is particularly useful for skipping over any
464
- * interceptors that may have become `null` calling `eject`.
465
- *
466
- * @param {Function} fn The function to call for each interceptor
467
- *
468
- * @returns {void}
469
- */
470
- forEach(t) {
471
- a.forEach(this.handlers, function(r) {
472
- r !== null && t(r);
473
- });
474
- }
475
- }
476
- const mt = {
477
- silentJSONParsing: !0,
478
- forcedJSONParsing: !0,
479
- clarifyTimeoutError: !1
480
- }, On = typeof URLSearchParams < "u" ? URLSearchParams : Pe, Rn = typeof FormData < "u" ? FormData : null, Tn = typeof Blob < "u" ? Blob : null, An = {
481
- isBrowser: !0,
482
- classes: {
483
- URLSearchParams: On,
484
- FormData: Rn,
485
- Blob: Tn
486
- },
487
- protocols: ["http", "https", "file", "blob", "url", "data"]
488
- }, ke = typeof window < "u" && typeof document < "u", Fe = typeof navigator == "object" && navigator || void 0, Dn = ke && (!Fe || ["ReactNative", "NativeScript", "NS"].indexOf(Fe.product) < 0), $n = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
489
- self instanceof WorkerGlobalScope && typeof self.importScripts == "function", xn = ke && window.location.href || "http://localhost", Cn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
490
- __proto__: null,
491
- hasBrowserEnv: ke,
492
- hasStandardBrowserEnv: Dn,
493
- hasStandardBrowserWebWorkerEnv: $n,
494
- navigator: Fe,
495
- origin: xn
496
- }, Symbol.toStringTag, { value: "Module" })), U = {
497
- ...Cn,
498
- ...An
499
- };
500
- function Nn(e, t) {
501
- return Ae(e, new U.classes.URLSearchParams(), {
502
- visitor: function(n, r, s, i) {
503
- return U.isNode && a.isBuffer(n) ? (this.append(r, n.toString("base64")), !1) : i.defaultVisitor.apply(this, arguments);
504
- },
505
- ...t
506
- });
507
- }
508
- function _n(e) {
509
- return a.matchAll(/\w+|\[(\w*)]/g, e).map((t) => t[0] === "[]" ? "" : t[1] || t[0]);
510
- }
511
- function Fn(e) {
512
- const t = {}, n = Object.keys(e);
513
- let r;
514
- const s = n.length;
515
- let i;
516
- for (r = 0; r < s; r++)
517
- i = n[r], t[i] = e[i];
518
- return t;
519
- }
520
- function yt(e) {
521
- function t(n, r, s, i) {
522
- let o = n[i++];
523
- if (o === "__proto__") return !0;
524
- const c = Number.isFinite(+o), p = i >= n.length;
525
- return o = !o && a.isArray(s) ? s.length : o, p ? (a.hasOwnProp(s, o) ? s[o] = [s[o], r] : s[o] = r, !c) : ((!s[o] || !a.isObject(s[o])) && (s[o] = []), t(n, r, s[o], i) && a.isArray(s[o]) && (s[o] = Fn(s[o])), !c);
526
- }
527
- if (a.isFormData(e) && a.isFunction(e.entries)) {
528
- const n = {};
529
- return a.forEachEntry(e, (r, s) => {
530
- t(_n(r), s, n, 0);
531
- }), n;
532
- }
533
- return null;
534
- }
535
- function Mn(e, t, n) {
536
- if (a.isString(e))
537
- try {
538
- return (t || JSON.parse)(e), a.trim(e);
539
- } catch (r) {
540
- if (r.name !== "SyntaxError")
541
- throw r;
542
- }
543
- return (n || JSON.stringify)(e);
544
- }
545
- const pe = {
546
- transitional: mt,
547
- adapter: ["xhr", "http", "fetch"],
548
- transformRequest: [function(t, n) {
549
- const r = n.getContentType() || "", s = r.indexOf("application/json") > -1, i = a.isObject(t);
550
- if (i && a.isHTMLForm(t) && (t = new FormData(t)), a.isFormData(t))
551
- return s ? JSON.stringify(yt(t)) : t;
552
- if (a.isArrayBuffer(t) || a.isBuffer(t) || a.isStream(t) || a.isFile(t) || a.isBlob(t) || a.isReadableStream(t))
553
- return t;
554
- if (a.isArrayBufferView(t))
555
- return t.buffer;
556
- if (a.isURLSearchParams(t))
557
- return n.setContentType("application/x-www-form-urlencoded;charset=utf-8", !1), t.toString();
558
- let c;
559
- if (i) {
560
- if (r.indexOf("application/x-www-form-urlencoded") > -1)
561
- return Nn(t, this.formSerializer).toString();
562
- if ((c = a.isFileList(t)) || r.indexOf("multipart/form-data") > -1) {
563
- const p = this.env && this.env.FormData;
564
- return Ae(
565
- c ? { "files[]": t } : t,
566
- p && new p(),
567
- this.formSerializer
568
- );
569
- }
570
- }
571
- return i || s ? (n.setContentType("application/json", !1), Mn(t)) : t;
572
- }],
573
- transformResponse: [function(t) {
574
- const n = this.transitional || pe.transitional, r = n && n.forcedJSONParsing, s = this.responseType === "json";
575
- if (a.isResponse(t) || a.isReadableStream(t))
576
- return t;
577
- if (t && a.isString(t) && (r && !this.responseType || s)) {
578
- const o = !(n && n.silentJSONParsing) && s;
579
- try {
580
- return JSON.parse(t, this.parseReviver);
581
- } catch (c) {
582
- if (o)
583
- throw c.name === "SyntaxError" ? R.from(c, R.ERR_BAD_RESPONSE, this, null, this.response) : c;
584
- }
585
- }
586
- return t;
587
- }],
588
- /**
589
- * A timeout in milliseconds to abort a request. If set to 0 (default) a
590
- * timeout is not created.
591
- */
592
- timeout: 0,
593
- xsrfCookieName: "XSRF-TOKEN",
594
- xsrfHeaderName: "X-XSRF-TOKEN",
595
- maxContentLength: -1,
596
- maxBodyLength: -1,
597
- env: {
598
- FormData: U.classes.FormData,
599
- Blob: U.classes.Blob
600
- },
601
- validateStatus: function(t) {
602
- return t >= 200 && t < 300;
603
- },
604
- headers: {
605
- common: {
606
- Accept: "application/json, text/plain, */*",
607
- "Content-Type": void 0
608
- }
609
- }
610
- };
611
- a.forEach(["delete", "get", "head", "post", "put", "patch"], (e) => {
612
- pe.headers[e] = {};
613
- });
614
- const Ln = a.toObjectSet([
615
- "age",
616
- "authorization",
617
- "content-length",
618
- "content-type",
619
- "etag",
620
- "expires",
621
- "from",
622
- "host",
623
- "if-modified-since",
624
- "if-unmodified-since",
625
- "last-modified",
626
- "location",
627
- "max-forwards",
628
- "proxy-authorization",
629
- "referer",
630
- "retry-after",
631
- "user-agent"
632
- ]), Pn = (e) => {
633
- const t = {};
634
- let n, r, s;
635
- return e && e.split(`
636
- `).forEach(function(o) {
637
- s = o.indexOf(":"), n = o.substring(0, s).trim().toLowerCase(), r = o.substring(s + 1).trim(), !(!n || t[n] && Ln[n]) && (n === "set-cookie" ? t[n] ? t[n].push(r) : t[n] = [r] : t[n] = t[n] ? t[n] + ", " + r : r);
638
- }), t;
639
- }, qe = Symbol("internals");
640
- function ue(e) {
641
- return e && String(e).trim().toLowerCase();
642
- }
643
- function be(e) {
644
- return e === !1 || e == null ? e : a.isArray(e) ? e.map(be) : String(e);
645
- }
646
- function kn(e) {
647
- const t = /* @__PURE__ */ Object.create(null), n = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
648
- let r;
649
- for (; r = n.exec(e); )
650
- t[r[1]] = r[2];
651
- return t;
652
- }
653
- const Un = (e) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());
654
- function $e(e, t, n, r, s) {
655
- if (a.isFunction(r))
656
- return r.call(this, t, n);
657
- if (s && (t = n), !!a.isString(t)) {
658
- if (a.isString(r))
659
- return t.indexOf(r) !== -1;
660
- if (a.isRegExp(r))
661
- return r.test(t);
662
- }
663
- }
664
- function Bn(e) {
665
- return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (t, n, r) => n.toUpperCase() + r);
666
- }
667
- function jn(e, t) {
668
- const n = a.toCamelCase(" " + t);
669
- ["get", "set", "has"].forEach((r) => {
670
- Object.defineProperty(e, r + n, {
671
- value: function(s, i, o) {
672
- return this[r].call(this, t, s, i, o);
673
- },
674
- configurable: !0
675
- });
676
- });
677
- }
678
- let z = class {
679
- constructor(t) {
680
- t && this.set(t);
681
- }
682
- set(t, n, r) {
683
- const s = this;
684
- function i(c, p, l) {
685
- const u = ue(p);
686
- if (!u)
687
- throw new Error("header name must be a non-empty string");
688
- const y = a.findKey(s, u);
689
- (!y || s[y] === void 0 || l === !0 || l === void 0 && s[y] !== !1) && (s[y || p] = be(c));
690
- }
691
- const o = (c, p) => a.forEach(c, (l, u) => i(l, u, p));
692
- if (a.isPlainObject(t) || t instanceof this.constructor)
693
- o(t, n);
694
- else if (a.isString(t) && (t = t.trim()) && !Un(t))
695
- o(Pn(t), n);
696
- else if (a.isObject(t) && a.isIterable(t)) {
697
- let c = {}, p, l;
698
- for (const u of t) {
699
- if (!a.isArray(u))
700
- throw TypeError("Object iterator must return a key-value pair");
701
- c[l = u[0]] = (p = c[l]) ? a.isArray(p) ? [...p, u[1]] : [p, u[1]] : u[1];
702
- }
703
- o(c, n);
704
- } else
705
- t != null && i(n, t, r);
706
- return this;
707
- }
708
- get(t, n) {
709
- if (t = ue(t), t) {
710
- const r = a.findKey(this, t);
711
- if (r) {
712
- const s = this[r];
713
- if (!n)
714
- return s;
715
- if (n === !0)
716
- return kn(s);
717
- if (a.isFunction(n))
718
- return n.call(this, s, r);
719
- if (a.isRegExp(n))
720
- return n.exec(s);
721
- throw new TypeError("parser must be boolean|regexp|function");
722
- }
723
- }
724
- }
725
- has(t, n) {
726
- if (t = ue(t), t) {
727
- const r = a.findKey(this, t);
728
- return !!(r && this[r] !== void 0 && (!n || $e(this, this[r], r, n)));
729
- }
730
- return !1;
731
- }
732
- delete(t, n) {
733
- const r = this;
734
- let s = !1;
735
- function i(o) {
736
- if (o = ue(o), o) {
737
- const c = a.findKey(r, o);
738
- c && (!n || $e(r, r[c], c, n)) && (delete r[c], s = !0);
739
- }
740
- }
741
- return a.isArray(t) ? t.forEach(i) : i(t), s;
742
- }
743
- clear(t) {
744
- const n = Object.keys(this);
745
- let r = n.length, s = !1;
746
- for (; r--; ) {
747
- const i = n[r];
748
- (!t || $e(this, this[i], i, t, !0)) && (delete this[i], s = !0);
749
- }
750
- return s;
751
- }
752
- normalize(t) {
753
- const n = this, r = {};
754
- return a.forEach(this, (s, i) => {
755
- const o = a.findKey(r, i);
756
- if (o) {
757
- n[o] = be(s), delete n[i];
758
- return;
759
- }
760
- const c = t ? Bn(i) : String(i).trim();
761
- c !== i && delete n[i], n[c] = be(s), r[c] = !0;
762
- }), this;
763
- }
764
- concat(...t) {
765
- return this.constructor.concat(this, ...t);
766
- }
767
- toJSON(t) {
768
- const n = /* @__PURE__ */ Object.create(null);
769
- return a.forEach(this, (r, s) => {
770
- r != null && r !== !1 && (n[s] = t && a.isArray(r) ? r.join(", ") : r);
771
- }), n;
772
- }
773
- [Symbol.iterator]() {
774
- return Object.entries(this.toJSON())[Symbol.iterator]();
775
- }
776
- toString() {
777
- return Object.entries(this.toJSON()).map(([t, n]) => t + ": " + n).join(`
778
- `);
779
- }
780
- getSetCookie() {
781
- return this.get("set-cookie") || [];
782
- }
783
- get [Symbol.toStringTag]() {
784
- return "AxiosHeaders";
785
- }
786
- static from(t) {
787
- return t instanceof this ? t : new this(t);
788
- }
789
- static concat(t, ...n) {
790
- const r = new this(t);
791
- return n.forEach((s) => r.set(s)), r;
792
- }
793
- static accessor(t) {
794
- const r = (this[qe] = this[qe] = {
795
- accessors: {}
796
- }).accessors, s = this.prototype;
797
- function i(o) {
798
- const c = ue(o);
799
- r[c] || (jn(s, o), r[c] = !0);
800
- }
801
- return a.isArray(t) ? t.forEach(i) : i(t), this;
802
- }
803
- };
804
- z.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
805
- a.reduceDescriptors(z.prototype, ({ value: e }, t) => {
806
- let n = t[0].toUpperCase() + t.slice(1);
807
- return {
808
- get: () => e,
809
- set(r) {
810
- this[n] = r;
811
- }
812
- };
813
- });
814
- a.freezeMethods(z);
815
- function xe(e, t) {
816
- const n = this || pe, r = t || n, s = z.from(r.headers);
817
- let i = r.data;
818
- return a.forEach(e, function(c) {
819
- i = c.call(n, i, s.normalize(), t ? t.status : void 0);
820
- }), s.normalize(), i;
821
- }
822
- function wt(e) {
823
- return !!(e && e.__CANCEL__);
824
- }
825
- function ie(e, t, n) {
826
- R.call(this, e ?? "canceled", R.ERR_CANCELED, t, n), this.name = "CanceledError";
827
- }
828
- a.inherits(ie, R, {
829
- __CANCEL__: !0
830
- });
831
- function bt(e, t, n) {
832
- const r = n.config.validateStatus;
833
- !n.status || !r || r(n.status) ? e(n) : t(new R(
834
- "Request failed with status code " + n.status,
835
- [R.ERR_BAD_REQUEST, R.ERR_BAD_RESPONSE][Math.floor(n.status / 100) - 4],
836
- n.config,
837
- n.request,
838
- n
839
- ));
840
- }
841
- function vn(e) {
842
- const t = /^([-+\w]{1,25})(:?\/\/|:)/.exec(e);
843
- return t && t[1] || "";
844
- }
845
- function In(e, t) {
846
- e = e || 10;
847
- const n = new Array(e), r = new Array(e);
848
- let s = 0, i = 0, o;
849
- return t = t !== void 0 ? t : 1e3, function(p) {
850
- const l = Date.now(), u = r[i];
851
- o || (o = l), n[s] = p, r[s] = l;
852
- let y = i, D = 0;
853
- for (; y !== s; )
854
- D += n[y++], y = y % e;
855
- if (s = (s + 1) % e, s === i && (i = (i + 1) % e), l - o < t)
856
- return;
857
- const x = u && l - u;
858
- return x ? Math.round(D * 1e3 / x) : void 0;
859
- };
860
- }
861
- function qn(e, t) {
862
- let n = 0, r = 1e3 / t, s, i;
863
- const o = (l, u = Date.now()) => {
864
- n = u, s = null, i && (clearTimeout(i), i = null), e(...l);
865
- };
866
- return [(...l) => {
867
- const u = Date.now(), y = u - n;
868
- y >= r ? o(l, u) : (s = l, i || (i = setTimeout(() => {
869
- i = null, o(s);
870
- }, r - y)));
871
- }, () => s && o(s)];
872
- }
873
- const Ee = (e, t, n = 3) => {
874
- let r = 0;
875
- const s = In(50, 250);
876
- return qn((i) => {
877
- const o = i.loaded, c = i.lengthComputable ? i.total : void 0, p = o - r, l = s(p), u = o <= c;
878
- r = o;
879
- const y = {
880
- loaded: o,
881
- total: c,
882
- progress: c ? o / c : void 0,
883
- bytes: p,
884
- rate: l || void 0,
885
- estimated: l && c && u ? (c - o) / l : void 0,
886
- event: i,
887
- lengthComputable: c != null,
888
- [t ? "download" : "upload"]: !0
889
- };
890
- e(y);
891
- }, n);
892
- }, He = (e, t) => {
893
- const n = e != null;
894
- return [(r) => t[0]({
895
- lengthComputable: n,
896
- total: e,
897
- loaded: r
898
- }), t[1]];
899
- }, ze = (e) => (...t) => a.asap(() => e(...t)), Hn = U.hasStandardBrowserEnv ? /* @__PURE__ */ ((e, t) => (n) => (n = new URL(n, U.origin), e.protocol === n.protocol && e.host === n.host && (t || e.port === n.port)))(
900
- new URL(U.origin),
901
- U.navigator && /(msie|trident)/i.test(U.navigator.userAgent)
902
- ) : () => !0, zn = U.hasStandardBrowserEnv ? (
903
- // Standard browser envs support document.cookie
904
- {
905
- write(e, t, n, r, s, i, o) {
906
- if (typeof document > "u") return;
907
- const c = [`${e}=${encodeURIComponent(t)}`];
908
- a.isNumber(n) && c.push(`expires=${new Date(n).toUTCString()}`), a.isString(r) && c.push(`path=${r}`), a.isString(s) && c.push(`domain=${s}`), i === !0 && c.push("secure"), a.isString(o) && c.push(`SameSite=${o}`), document.cookie = c.join("; ");
909
- },
910
- read(e) {
911
- if (typeof document > "u") return null;
912
- const t = document.cookie.match(new RegExp("(?:^|; )" + e + "=([^;]*)"));
913
- return t ? decodeURIComponent(t[1]) : null;
914
- },
915
- remove(e) {
916
- this.write(e, "", Date.now() - 864e5, "/");
917
- }
918
- }
919
- ) : (
920
- // Non-standard browser env (web workers, react-native) lack needed support.
921
- {
922
- write() {
923
- },
924
- read() {
925
- return null;
926
- },
927
- remove() {
928
- }
929
- }
930
- );
931
- function Jn(e) {
932
- return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(e);
933
- }
934
- function Wn(e, t) {
935
- return t ? e.replace(/\/?\/$/, "") + "/" + t.replace(/^\/+/, "") : e;
936
- }
937
- function gt(e, t, n) {
938
- let r = !Jn(t);
939
- return e && (r || n == !1) ? Wn(e, t) : t;
940
- }
941
- const Je = (e) => e instanceof z ? { ...e } : e;
942
- function ne(e, t) {
943
- t = t || {};
944
- const n = {};
945
- function r(l, u, y, D) {
946
- return a.isPlainObject(l) && a.isPlainObject(u) ? a.merge.call({ caseless: D }, l, u) : a.isPlainObject(u) ? a.merge({}, u) : a.isArray(u) ? u.slice() : u;
947
- }
948
- function s(l, u, y, D) {
949
- if (a.isUndefined(u)) {
950
- if (!a.isUndefined(l))
951
- return r(void 0, l, y, D);
952
- } else return r(l, u, y, D);
953
- }
954
- function i(l, u) {
955
- if (!a.isUndefined(u))
956
- return r(void 0, u);
957
- }
958
- function o(l, u) {
959
- if (a.isUndefined(u)) {
960
- if (!a.isUndefined(l))
961
- return r(void 0, l);
962
- } else return r(void 0, u);
963
- }
964
- function c(l, u, y) {
965
- if (y in t)
966
- return r(l, u);
967
- if (y in e)
968
- return r(void 0, l);
969
- }
970
- const p = {
971
- url: i,
972
- method: i,
973
- data: i,
974
- baseURL: o,
975
- transformRequest: o,
976
- transformResponse: o,
977
- paramsSerializer: o,
978
- timeout: o,
979
- timeoutMessage: o,
980
- withCredentials: o,
981
- withXSRFToken: o,
982
- adapter: o,
983
- responseType: o,
984
- xsrfCookieName: o,
985
- xsrfHeaderName: o,
986
- onUploadProgress: o,
987
- onDownloadProgress: o,
988
- decompress: o,
989
- maxContentLength: o,
990
- maxBodyLength: o,
991
- beforeRedirect: o,
992
- transport: o,
993
- httpAgent: o,
994
- httpsAgent: o,
995
- cancelToken: o,
996
- socketPath: o,
997
- responseEncoding: o,
998
- validateStatus: c,
999
- headers: (l, u, y) => s(Je(l), Je(u), y, !0)
1000
- };
1001
- return a.forEach(Object.keys({ ...e, ...t }), function(u) {
1002
- const y = p[u] || s, D = y(e[u], t[u], u);
1003
- a.isUndefined(D) && y !== c || (n[u] = D);
1004
- }), n;
1005
- }
1006
- const St = (e) => {
1007
- const t = ne({}, e);
1008
- let { data: n, withXSRFToken: r, xsrfHeaderName: s, xsrfCookieName: i, headers: o, auth: c } = t;
1009
- if (t.headers = o = z.from(o), t.url = pt(gt(t.baseURL, t.url, t.allowAbsoluteUrls), e.params, e.paramsSerializer), c && o.set(
1010
- "Authorization",
1011
- "Basic " + btoa((c.username || "") + ":" + (c.password ? unescape(encodeURIComponent(c.password)) : ""))
1012
- ), a.isFormData(n)) {
1013
- if (U.hasStandardBrowserEnv || U.hasStandardBrowserWebWorkerEnv)
1014
- o.setContentType(void 0);
1015
- else if (a.isFunction(n.getHeaders)) {
1016
- const p = n.getHeaders(), l = ["content-type", "content-length"];
1017
- Object.entries(p).forEach(([u, y]) => {
1018
- l.includes(u.toLowerCase()) && o.set(u, y);
1019
- });
1020
- }
1021
- }
1022
- if (U.hasStandardBrowserEnv && (r && a.isFunction(r) && (r = r(t)), r || r !== !1 && Hn(t.url))) {
1023
- const p = s && i && zn.read(i);
1024
- p && o.set(s, p);
1025
- }
1026
- return t;
1027
- }, Yn = typeof XMLHttpRequest < "u", Vn = Yn && function(e) {
1028
- return new Promise(function(n, r) {
1029
- const s = St(e);
1030
- let i = s.data;
1031
- const o = z.from(s.headers).normalize();
1032
- let { responseType: c, onUploadProgress: p, onDownloadProgress: l } = s, u, y, D, x, f;
1033
- function S() {
1034
- x && x(), f && f(), s.cancelToken && s.cancelToken.unsubscribe(u), s.signal && s.signal.removeEventListener("abort", u);
1035
- }
1036
- let w = new XMLHttpRequest();
1037
- w.open(s.method.toUpperCase(), s.url, !0), w.timeout = s.timeout;
1038
- function F() {
1039
- if (!w)
1040
- return;
1041
- const C = z.from(
1042
- "getAllResponseHeaders" in w && w.getAllResponseHeaders()
1043
- ), P = {
1044
- data: !c || c === "text" || c === "json" ? w.responseText : w.response,
1045
- status: w.status,
1046
- statusText: w.statusText,
1047
- headers: C,
1048
- config: e,
1049
- request: w
1050
- };
1051
- bt(function(j) {
1052
- n(j), S();
1053
- }, function(j) {
1054
- r(j), S();
1055
- }, P), w = null;
1056
- }
1057
- "onloadend" in w ? w.onloadend = F : w.onreadystatechange = function() {
1058
- !w || w.readyState !== 4 || w.status === 0 && !(w.responseURL && w.responseURL.indexOf("file:") === 0) || setTimeout(F);
1059
- }, w.onabort = function() {
1060
- w && (r(new R("Request aborted", R.ECONNABORTED, e, w)), w = null);
1061
- }, w.onerror = function(k) {
1062
- const P = k && k.message ? k.message : "Network Error", B = new R(P, R.ERR_NETWORK, e, w);
1063
- B.event = k || null, r(B), w = null;
1064
- }, w.ontimeout = function() {
1065
- let k = s.timeout ? "timeout of " + s.timeout + "ms exceeded" : "timeout exceeded";
1066
- const P = s.transitional || mt;
1067
- s.timeoutErrorMessage && (k = s.timeoutErrorMessage), r(new R(
1068
- k,
1069
- P.clarifyTimeoutError ? R.ETIMEDOUT : R.ECONNABORTED,
1070
- e,
1071
- w
1072
- )), w = null;
1073
- }, i === void 0 && o.setContentType(null), "setRequestHeader" in w && a.forEach(o.toJSON(), function(k, P) {
1074
- w.setRequestHeader(P, k);
1075
- }), a.isUndefined(s.withCredentials) || (w.withCredentials = !!s.withCredentials), c && c !== "json" && (w.responseType = s.responseType), l && ([D, f] = Ee(l, !0), w.addEventListener("progress", D)), p && w.upload && ([y, x] = Ee(p), w.upload.addEventListener("progress", y), w.upload.addEventListener("loadend", x)), (s.cancelToken || s.signal) && (u = (C) => {
1076
- w && (r(!C || C.type ? new ie(null, e, w) : C), w.abort(), w = null);
1077
- }, s.cancelToken && s.cancelToken.subscribe(u), s.signal && (s.signal.aborted ? u() : s.signal.addEventListener("abort", u)));
1078
- const I = vn(s.url);
1079
- if (I && U.protocols.indexOf(I) === -1) {
1080
- r(new R("Unsupported protocol " + I + ":", R.ERR_BAD_REQUEST, e));
1081
- return;
1082
- }
1083
- w.send(i || null);
1084
- });
1085
- }, Kn = (e, t) => {
1086
- const { length: n } = e = e ? e.filter(Boolean) : [];
1087
- if (t || n) {
1088
- let r = new AbortController(), s;
1089
- const i = function(l) {
1090
- if (!s) {
1091
- s = !0, c();
1092
- const u = l instanceof Error ? l : this.reason;
1093
- r.abort(u instanceof R ? u : new ie(u instanceof Error ? u.message : u));
1094
- }
1095
- };
1096
- let o = t && setTimeout(() => {
1097
- o = null, i(new R(`timeout ${t} of ms exceeded`, R.ETIMEDOUT));
1098
- }, t);
1099
- const c = () => {
1100
- e && (o && clearTimeout(o), o = null, e.forEach((l) => {
1101
- l.unsubscribe ? l.unsubscribe(i) : l.removeEventListener("abort", i);
1102
- }), e = null);
1103
- };
1104
- e.forEach((l) => l.addEventListener("abort", i));
1105
- const { signal: p } = r;
1106
- return p.unsubscribe = () => a.asap(c), p;
1107
- }
1108
- }, Gn = function* (e, t) {
1109
- let n = e.byteLength;
1110
- if (n < t) {
1111
- yield e;
1112
- return;
1113
- }
1114
- let r = 0, s;
1115
- for (; r < n; )
1116
- s = r + t, yield e.slice(r, s), r = s;
1117
- }, Xn = async function* (e, t) {
1118
- for await (const n of Zn(e))
1119
- yield* Gn(n, t);
1120
- }, Zn = async function* (e) {
1121
- if (e[Symbol.asyncIterator]) {
1122
- yield* e;
1123
- return;
1124
- }
1125
- const t = e.getReader();
1126
- try {
1127
- for (; ; ) {
1128
- const { done: n, value: r } = await t.read();
1129
- if (n)
1130
- break;
1131
- yield r;
1132
- }
1133
- } finally {
1134
- await t.cancel();
1135
- }
1136
- }, We = (e, t, n, r) => {
1137
- const s = Xn(e, t);
1138
- let i = 0, o, c = (p) => {
1139
- o || (o = !0, r && r(p));
1140
- };
1141
- return new ReadableStream({
1142
- async pull(p) {
1143
- try {
1144
- const { done: l, value: u } = await s.next();
1145
- if (l) {
1146
- c(), p.close();
1147
- return;
1148
- }
1149
- let y = u.byteLength;
1150
- if (n) {
1151
- let D = i += y;
1152
- n(D);
1153
- }
1154
- p.enqueue(new Uint8Array(u));
1155
- } catch (l) {
1156
- throw c(l), l;
1157
- }
1158
- },
1159
- cancel(p) {
1160
- return c(p), s.return();
1161
- }
1162
- }, {
1163
- highWaterMark: 2
1164
- });
1165
- }, Ye = 64 * 1024, { isFunction: ye } = a, Qn = (({ Request: e, Response: t }) => ({
1166
- Request: e,
1167
- Response: t
1168
- }))(a.global), {
1169
- ReadableStream: Ve,
1170
- TextEncoder: Ke
1171
- } = a.global, Ge = (e, ...t) => {
1172
- try {
1173
- return !!e(...t);
1174
- } catch {
1175
- return !1;
1176
- }
1177
- }, er = (e) => {
1178
- e = a.merge.call({
1179
- skipUndefined: !0
1180
- }, Qn, e);
1181
- const { fetch: t, Request: n, Response: r } = e, s = t ? ye(t) : typeof fetch == "function", i = ye(n), o = ye(r);
1182
- if (!s)
1183
- return !1;
1184
- const c = s && ye(Ve), p = s && (typeof Ke == "function" ? /* @__PURE__ */ ((f) => (S) => f.encode(S))(new Ke()) : async (f) => new Uint8Array(await new n(f).arrayBuffer())), l = i && c && Ge(() => {
1185
- let f = !1;
1186
- const S = new n(U.origin, {
1187
- body: new Ve(),
1188
- method: "POST",
1189
- get duplex() {
1190
- return f = !0, "half";
1191
- }
1192
- }).headers.has("Content-Type");
1193
- return f && !S;
1194
- }), u = o && c && Ge(() => a.isReadableStream(new r("").body)), y = {
1195
- stream: u && ((f) => f.body)
1196
- };
1197
- s && ["text", "arrayBuffer", "blob", "formData", "stream"].forEach((f) => {
1198
- !y[f] && (y[f] = (S, w) => {
1199
- let F = S && S[f];
1200
- if (F)
1201
- return F.call(S);
1202
- throw new R(`Response type '${f}' is not supported`, R.ERR_NOT_SUPPORT, w);
1203
- });
1204
- });
1205
- const D = async (f) => {
1206
- if (f == null)
1207
- return 0;
1208
- if (a.isBlob(f))
1209
- return f.size;
1210
- if (a.isSpecCompliantForm(f))
1211
- return (await new n(U.origin, {
1212
- method: "POST",
1213
- body: f
1214
- }).arrayBuffer()).byteLength;
1215
- if (a.isArrayBufferView(f) || a.isArrayBuffer(f))
1216
- return f.byteLength;
1217
- if (a.isURLSearchParams(f) && (f = f + ""), a.isString(f))
1218
- return (await p(f)).byteLength;
1219
- }, x = async (f, S) => {
1220
- const w = a.toFiniteNumber(f.getContentLength());
1221
- return w ?? D(S);
1222
- };
1223
- return async (f) => {
1224
- let {
1225
- url: S,
1226
- method: w,
1227
- data: F,
1228
- signal: I,
1229
- cancelToken: C,
1230
- timeout: k,
1231
- onDownloadProgress: P,
1232
- onUploadProgress: B,
1233
- responseType: j,
1234
- headers: X,
1235
- withCredentials: Y = "same-origin",
1236
- fetchOptions: M
1237
- } = St(f), A = t || fetch;
1238
- j = j ? (j + "").toLowerCase() : "text";
1239
- let V = Kn([I, C && C.toAbortSignal()], k), K = null;
1240
- const g = V && V.unsubscribe && (() => {
1241
- V.unsubscribe();
1242
- });
1243
- let m;
1244
- try {
1245
- if (B && l && w !== "get" && w !== "head" && (m = await x(X, F)) !== 0) {
1246
- let T = new n(S, {
1247
- method: "POST",
1248
- body: F,
1249
- duplex: "half"
1250
- }), $;
1251
- if (a.isFormData(F) && ($ = T.headers.get("content-type")) && X.setContentType($), T.body) {
1252
- const [N, L] = He(
1253
- m,
1254
- Ee(ze(B))
1255
- );
1256
- F = We(T.body, Ye, N, L);
1257
- }
1258
- }
1259
- a.isString(Y) || (Y = Y ? "include" : "omit");
1260
- const d = i && "credentials" in n.prototype, b = {
1261
- ...M,
1262
- signal: V,
1263
- method: w.toUpperCase(),
1264
- headers: X.normalize().toJSON(),
1265
- body: F,
1266
- duplex: "half",
1267
- credentials: d ? Y : void 0
1268
- };
1269
- K = i && new n(S, b);
1270
- let h = await (i ? A(K, M) : A(S, b));
1271
- const E = u && (j === "stream" || j === "response");
1272
- if (u && (P || E && g)) {
1273
- const T = {};
1274
- ["status", "statusText", "headers"].forEach((v) => {
1275
- T[v] = h[v];
1276
- });
1277
- const $ = a.toFiniteNumber(h.headers.get("content-length")), [N, L] = P && He(
1278
- $,
1279
- Ee(ze(P), !0)
1280
- ) || [];
1281
- h = new r(
1282
- We(h.body, Ye, N, () => {
1283
- L && L(), g && g();
1284
- }),
1285
- T
1286
- );
1287
- }
1288
- j = j || "text";
1289
- let O = await y[a.findKey(y, j) || "text"](h, f);
1290
- return !E && g && g(), await new Promise((T, $) => {
1291
- bt(T, $, {
1292
- data: O,
1293
- headers: z.from(h.headers),
1294
- status: h.status,
1295
- statusText: h.statusText,
1296
- config: f,
1297
- request: K
1298
- });
1299
- });
1300
- } catch (d) {
1301
- throw g && g(), d && d.name === "TypeError" && /Load failed|fetch/i.test(d.message) ? Object.assign(
1302
- new R("Network Error", R.ERR_NETWORK, f, K),
1303
- {
1304
- cause: d.cause || d
1305
- }
1306
- ) : R.from(d, d && d.code, f, K);
1307
- }
1308
- };
1309
- }, tr = /* @__PURE__ */ new Map(), Et = (e) => {
1310
- let t = e && e.env || {};
1311
- const { fetch: n, Request: r, Response: s } = t, i = [
1312
- r,
1313
- s,
1314
- n
1315
- ];
1316
- let o = i.length, c = o, p, l, u = tr;
1317
- for (; c--; )
1318
- p = i[c], l = u.get(p), l === void 0 && u.set(p, l = c ? /* @__PURE__ */ new Map() : er(t)), u = l;
1319
- return l;
1320
- };
1321
- Et();
1322
- const Ue = {
1323
- http: bn,
1324
- xhr: Vn,
1325
- fetch: {
1326
- get: Et
1327
- }
1328
- };
1329
- a.forEach(Ue, (e, t) => {
1330
- if (e) {
1331
- try {
1332
- Object.defineProperty(e, "name", { value: t });
1333
- } catch {
1334
- }
1335
- Object.defineProperty(e, "adapterName", { value: t });
1336
- }
1337
- });
1338
- const Xe = (e) => `- ${e}`, nr = (e) => a.isFunction(e) || e === null || e === !1;
1339
- function rr(e, t) {
1340
- e = a.isArray(e) ? e : [e];
1341
- const { length: n } = e;
1342
- let r, s;
1343
- const i = {};
1344
- for (let o = 0; o < n; o++) {
1345
- r = e[o];
1346
- let c;
1347
- if (s = r, !nr(r) && (s = Ue[(c = String(r)).toLowerCase()], s === void 0))
1348
- throw new R(`Unknown adapter '${c}'`);
1349
- if (s && (a.isFunction(s) || (s = s.get(t))))
1350
- break;
1351
- i[c || "#" + o] = s;
1352
- }
1353
- if (!s) {
1354
- const o = Object.entries(i).map(
1355
- ([p, l]) => `adapter ${p} ` + (l === !1 ? "is not supported by the environment" : "is not available in the build")
1356
- );
1357
- let c = n ? o.length > 1 ? `since :
1358
- ` + o.map(Xe).join(`
1359
- `) : " " + Xe(o[0]) : "as no adapter specified";
1360
- throw new R(
1361
- "There is no suitable adapter to dispatch the request " + c,
1362
- "ERR_NOT_SUPPORT"
1363
- );
1364
- }
1365
- return s;
1366
- }
1367
- const Ot = {
1368
- /**
1369
- * Resolve an adapter from a list of adapter names or functions.
1370
- * @type {Function}
1371
- */
1372
- getAdapter: rr,
1373
- /**
1374
- * Exposes all known adapters
1375
- * @type {Object<string, Function|Object>}
1376
- */
1377
- adapters: Ue
1378
- };
1379
- function Ce(e) {
1380
- if (e.cancelToken && e.cancelToken.throwIfRequested(), e.signal && e.signal.aborted)
1381
- throw new ie(null, e);
1382
- }
1383
- function Ze(e) {
1384
- return Ce(e), e.headers = z.from(e.headers), e.data = xe.call(
1385
- e,
1386
- e.transformRequest
1387
- ), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), Ot.getAdapter(e.adapter || pe.adapter, e)(e).then(function(r) {
1388
- return Ce(e), r.data = xe.call(
1389
- e,
1390
- e.transformResponse,
1391
- r
1392
- ), r.headers = z.from(r.headers), r;
1393
- }, function(r) {
1394
- return wt(r) || (Ce(e), r && r.response && (r.response.data = xe.call(
1395
- e,
1396
- e.transformResponse,
1397
- r.response
1398
- ), r.response.headers = z.from(r.response.headers))), Promise.reject(r);
1399
- });
1400
- }
1401
- const Rt = "1.13.1", De = {};
1402
- ["object", "boolean", "number", "function", "string", "symbol"].forEach((e, t) => {
1403
- De[e] = function(r) {
1404
- return typeof r === e || "a" + (t < 1 ? "n " : " ") + e;
1405
- };
1406
- });
1407
- const Qe = {};
1408
- De.transitional = function(t, n, r) {
1409
- function s(i, o) {
1410
- return "[Axios v" + Rt + "] Transitional option '" + i + "'" + o + (r ? ". " + r : "");
1411
- }
1412
- return (i, o, c) => {
1413
- if (t === !1)
1414
- throw new R(
1415
- s(o, " has been removed" + (n ? " in " + n : "")),
1416
- R.ERR_DEPRECATED
1417
- );
1418
- return n && !Qe[o] && (Qe[o] = !0, console.warn(
1419
- s(
1420
- o,
1421
- " has been deprecated since v" + n + " and will be removed in the near future"
1422
- )
1423
- )), t ? t(i, o, c) : !0;
1424
- };
1425
- };
1426
- De.spelling = function(t) {
1427
- return (n, r) => (console.warn(`${r} is likely a misspelling of ${t}`), !0);
1428
- };
1429
- function sr(e, t, n) {
1430
- if (typeof e != "object")
1431
- throw new R("options must be an object", R.ERR_BAD_OPTION_VALUE);
1432
- const r = Object.keys(e);
1433
- let s = r.length;
1434
- for (; s-- > 0; ) {
1435
- const i = r[s], o = t[i];
1436
- if (o) {
1437
- const c = e[i], p = c === void 0 || o(c, i, e);
1438
- if (p !== !0)
1439
- throw new R("option " + i + " must be " + p, R.ERR_BAD_OPTION_VALUE);
1440
- continue;
1441
- }
1442
- if (n !== !0)
1443
- throw new R("Unknown option " + i, R.ERR_BAD_OPTION);
1444
- }
1445
- }
1446
- const ge = {
1447
- assertOptions: sr,
1448
- validators: De
1449
- }, W = ge.validators;
1450
- let te = class {
1451
- constructor(t) {
1452
- this.defaults = t || {}, this.interceptors = {
1453
- request: new Ie(),
1454
- response: new Ie()
1455
- };
1456
- }
1457
- /**
1458
- * Dispatch a request
1459
- *
1460
- * @param {String|Object} configOrUrl The config specific for this request (merged with this.defaults)
1461
- * @param {?Object} config
1462
- *
1463
- * @returns {Promise} The Promise to be fulfilled
1464
- */
1465
- async request(t, n) {
1466
- try {
1467
- return await this._request(t, n);
1468
- } catch (r) {
1469
- if (r instanceof Error) {
1470
- let s = {};
1471
- Error.captureStackTrace ? Error.captureStackTrace(s) : s = new Error();
1472
- const i = s.stack ? s.stack.replace(/^.+\n/, "") : "";
1473
- try {
1474
- r.stack ? i && !String(r.stack).endsWith(i.replace(/^.+\n.+\n/, "")) && (r.stack += `
1475
- ` + i) : r.stack = i;
1476
- } catch {
1477
- }
1478
- }
1479
- throw r;
1480
- }
1481
- }
1482
- _request(t, n) {
1483
- typeof t == "string" ? (n = n || {}, n.url = t) : n = t || {}, n = ne(this.defaults, n);
1484
- const { transitional: r, paramsSerializer: s, headers: i } = n;
1485
- r !== void 0 && ge.assertOptions(r, {
1486
- silentJSONParsing: W.transitional(W.boolean),
1487
- forcedJSONParsing: W.transitional(W.boolean),
1488
- clarifyTimeoutError: W.transitional(W.boolean)
1489
- }, !1), s != null && (a.isFunction(s) ? n.paramsSerializer = {
1490
- serialize: s
1491
- } : ge.assertOptions(s, {
1492
- encode: W.function,
1493
- serialize: W.function
1494
- }, !0)), n.allowAbsoluteUrls !== void 0 || (this.defaults.allowAbsoluteUrls !== void 0 ? n.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls : n.allowAbsoluteUrls = !0), ge.assertOptions(n, {
1495
- baseUrl: W.spelling("baseURL"),
1496
- withXsrfToken: W.spelling("withXSRFToken")
1497
- }, !0), n.method = (n.method || this.defaults.method || "get").toLowerCase();
1498
- let o = i && a.merge(
1499
- i.common,
1500
- i[n.method]
1501
- );
1502
- i && a.forEach(
1503
- ["delete", "get", "head", "post", "put", "patch", "common"],
1504
- (f) => {
1505
- delete i[f];
1506
- }
1507
- ), n.headers = z.concat(o, i);
1508
- const c = [];
1509
- let p = !0;
1510
- this.interceptors.request.forEach(function(S) {
1511
- typeof S.runWhen == "function" && S.runWhen(n) === !1 || (p = p && S.synchronous, c.unshift(S.fulfilled, S.rejected));
1512
- });
1513
- const l = [];
1514
- this.interceptors.response.forEach(function(S) {
1515
- l.push(S.fulfilled, S.rejected);
1516
- });
1517
- let u, y = 0, D;
1518
- if (!p) {
1519
- const f = [Ze.bind(this), void 0];
1520
- for (f.unshift(...c), f.push(...l), D = f.length, u = Promise.resolve(n); y < D; )
1521
- u = u.then(f[y++], f[y++]);
1522
- return u;
1523
- }
1524
- D = c.length;
1525
- let x = n;
1526
- for (; y < D; ) {
1527
- const f = c[y++], S = c[y++];
1528
- try {
1529
- x = f(x);
1530
- } catch (w) {
1531
- S.call(this, w);
1532
- break;
1533
- }
1534
- }
1535
- try {
1536
- u = Ze.call(this, x);
1537
- } catch (f) {
1538
- return Promise.reject(f);
1539
- }
1540
- for (y = 0, D = l.length; y < D; )
1541
- u = u.then(l[y++], l[y++]);
1542
- return u;
1543
- }
1544
- getUri(t) {
1545
- t = ne(this.defaults, t);
1546
- const n = gt(t.baseURL, t.url, t.allowAbsoluteUrls);
1547
- return pt(n, t.params, t.paramsSerializer);
1548
- }
1549
- };
1550
- a.forEach(["delete", "get", "head", "options"], function(t) {
1551
- te.prototype[t] = function(n, r) {
1552
- return this.request(ne(r || {}, {
1553
- method: t,
1554
- url: n,
1555
- data: (r || {}).data
1556
- }));
1557
- };
1558
- });
1559
- a.forEach(["post", "put", "patch"], function(t) {
1560
- function n(r) {
1561
- return function(i, o, c) {
1562
- return this.request(ne(c || {}, {
1563
- method: t,
1564
- headers: r ? {
1565
- "Content-Type": "multipart/form-data"
1566
- } : {},
1567
- url: i,
1568
- data: o
1569
- }));
1570
- };
1571
- }
1572
- te.prototype[t] = n(), te.prototype[t + "Form"] = n(!0);
1573
- });
1574
- let or = class Tt {
1575
- constructor(t) {
1576
- if (typeof t != "function")
1577
- throw new TypeError("executor must be a function.");
1578
- let n;
1579
- this.promise = new Promise(function(i) {
1580
- n = i;
1581
- });
1582
- const r = this;
1583
- this.promise.then((s) => {
1584
- if (!r._listeners) return;
1585
- let i = r._listeners.length;
1586
- for (; i-- > 0; )
1587
- r._listeners[i](s);
1588
- r._listeners = null;
1589
- }), this.promise.then = (s) => {
1590
- let i;
1591
- const o = new Promise((c) => {
1592
- r.subscribe(c), i = c;
1593
- }).then(s);
1594
- return o.cancel = function() {
1595
- r.unsubscribe(i);
1596
- }, o;
1597
- }, t(function(i, o, c) {
1598
- r.reason || (r.reason = new ie(i, o, c), n(r.reason));
1599
- });
1600
- }
1601
- /**
1602
- * Throws a `CanceledError` if cancellation has been requested.
1603
- */
1604
- throwIfRequested() {
1605
- if (this.reason)
1606
- throw this.reason;
1607
- }
1608
- /**
1609
- * Subscribe to the cancel signal
1610
- */
1611
- subscribe(t) {
1612
- if (this.reason) {
1613
- t(this.reason);
1614
- return;
1615
- }
1616
- this._listeners ? this._listeners.push(t) : this._listeners = [t];
1617
- }
1618
- /**
1619
- * Unsubscribe from the cancel signal
1620
- */
1621
- unsubscribe(t) {
1622
- if (!this._listeners)
1623
- return;
1624
- const n = this._listeners.indexOf(t);
1625
- n !== -1 && this._listeners.splice(n, 1);
1626
- }
1627
- toAbortSignal() {
1628
- const t = new AbortController(), n = (r) => {
1629
- t.abort(r);
1630
- };
1631
- return this.subscribe(n), t.signal.unsubscribe = () => this.unsubscribe(n), t.signal;
1632
- }
1633
- /**
1634
- * Returns an object that contains a new `CancelToken` and a function that, when called,
1635
- * cancels the `CancelToken`.
1636
- */
1637
- static source() {
1638
- let t;
1639
- return {
1640
- token: new Tt(function(s) {
1641
- t = s;
1642
- }),
1643
- cancel: t
1644
- };
1645
- }
1646
- };
1647
- function ir(e) {
1648
- return function(n) {
1649
- return e.apply(null, n);
1650
- };
1651
- }
1652
- function ar(e) {
1653
- return a.isObject(e) && e.isAxiosError === !0;
1654
- }
1655
- const Me = {
1656
- Continue: 100,
1657
- SwitchingProtocols: 101,
1658
- Processing: 102,
1659
- EarlyHints: 103,
1660
- Ok: 200,
1661
- Created: 201,
1662
- Accepted: 202,
1663
- NonAuthoritativeInformation: 203,
1664
- NoContent: 204,
1665
- ResetContent: 205,
1666
- PartialContent: 206,
1667
- MultiStatus: 207,
1668
- AlreadyReported: 208,
1669
- ImUsed: 226,
1670
- MultipleChoices: 300,
1671
- MovedPermanently: 301,
1672
- Found: 302,
1673
- SeeOther: 303,
1674
- NotModified: 304,
1675
- UseProxy: 305,
1676
- Unused: 306,
1677
- TemporaryRedirect: 307,
1678
- PermanentRedirect: 308,
1679
- BadRequest: 400,
1680
- Unauthorized: 401,
1681
- PaymentRequired: 402,
1682
- Forbidden: 403,
1683
- NotFound: 404,
1684
- MethodNotAllowed: 405,
1685
- NotAcceptable: 406,
1686
- ProxyAuthenticationRequired: 407,
1687
- RequestTimeout: 408,
1688
- Conflict: 409,
1689
- Gone: 410,
1690
- LengthRequired: 411,
1691
- PreconditionFailed: 412,
1692
- PayloadTooLarge: 413,
1693
- UriTooLong: 414,
1694
- UnsupportedMediaType: 415,
1695
- RangeNotSatisfiable: 416,
1696
- ExpectationFailed: 417,
1697
- ImATeapot: 418,
1698
- MisdirectedRequest: 421,
1699
- UnprocessableEntity: 422,
1700
- Locked: 423,
1701
- FailedDependency: 424,
1702
- TooEarly: 425,
1703
- UpgradeRequired: 426,
1704
- PreconditionRequired: 428,
1705
- TooManyRequests: 429,
1706
- RequestHeaderFieldsTooLarge: 431,
1707
- UnavailableForLegalReasons: 451,
1708
- InternalServerError: 500,
1709
- NotImplemented: 501,
1710
- BadGateway: 502,
1711
- ServiceUnavailable: 503,
1712
- GatewayTimeout: 504,
1713
- HttpVersionNotSupported: 505,
1714
- VariantAlsoNegotiates: 506,
1715
- InsufficientStorage: 507,
1716
- LoopDetected: 508,
1717
- NotExtended: 510,
1718
- NetworkAuthenticationRequired: 511,
1719
- WebServerIsDown: 521,
1720
- ConnectionTimedOut: 522,
1721
- OriginIsUnreachable: 523,
1722
- TimeoutOccurred: 524,
1723
- SslHandshakeFailed: 525,
1724
- InvalidSslCertificate: 526
1725
- };
1726
- Object.entries(Me).forEach(([e, t]) => {
1727
- Me[t] = e;
1728
- });
1729
- function At(e) {
1730
- const t = new te(e), n = nt(te.prototype.request, t);
1731
- return a.extend(n, te.prototype, t, { allOwnKeys: !0 }), a.extend(n, t, null, { allOwnKeys: !0 }), n.create = function(s) {
1732
- return At(ne(e, s));
1733
- }, n;
1734
- }
1735
- const _ = At(pe);
1736
- _.Axios = te;
1737
- _.CanceledError = ie;
1738
- _.CancelToken = or;
1739
- _.isCancel = wt;
1740
- _.VERSION = Rt;
1741
- _.toFormData = Ae;
1742
- _.AxiosError = R;
1743
- _.Cancel = _.CanceledError;
1744
- _.all = function(t) {
1745
- return Promise.all(t);
1746
- };
1747
- _.spread = ir;
1748
- _.isAxiosError = ar;
1749
- _.mergeConfig = ne;
1750
- _.AxiosHeaders = z;
1751
- _.formToJSON = (e) => yt(a.isHTMLForm(e) ? new FormData(e) : e);
1752
- _.getAdapter = Ot.getAdapter;
1753
- _.HttpStatusCode = Me;
1754
- _.default = _;
1755
- const {
1756
- Axios: mr,
1757
- AxiosError: yr,
1758
- CanceledError: wr,
1759
- isCancel: br,
1760
- CancelToken: gr,
1761
- VERSION: Sr,
1762
- all: Er,
1763
- Cancel: Or,
1764
- isAxiosError: Rr,
1765
- spread: Tr,
1766
- toFormData: Ar,
1767
- AxiosHeaders: Dr,
1768
- HttpStatusCode: $r,
1769
- formToJSON: xr,
1770
- getAdapter: Cr,
1771
- mergeConfig: Nr
1772
- } = _, Dt = {
1773
- timeout: 60 * 1e3,
1774
- headers: {
1775
- Accept: "application/json",
1776
- "Content-Type": "application/json"
1777
- }
1778
- }, _r = (e = "", t) => {
1779
- const n = _.create({
1780
- ...Dt,
1781
- baseURL: tt[t].rearch_url
1782
- });
1783
- return n.interceptors.request.use(
1784
- (r) => (e && r.headers && (r.headers.Authorization = `Bearer ${e}`), r),
1785
- (r) => Promise.reject(r)
1786
- ), n.interceptors.response.use(
1787
- (r) => r,
1788
- (r) => {
1789
- const { response: s, request: i } = r || {};
1790
- return Promise.reject(s || i);
1791
- }
1792
- ), n;
1793
- }, Fr = (e = "", t) => {
1794
- const n = _.create({
1795
- ...Dt,
1796
- baseURL: tt[t].rearch_url
1797
- });
1798
- return n.interceptors.request.use(
1799
- (r) => (e && r.headers && (r.headers.Authorization = `Bearer ${e}`), r),
1800
- (r) => Promise.reject(r)
1801
- ), n.interceptors.response.use(
1802
- (r) => r,
1803
- (r) => {
1804
- const { response: s, request: i } = r || {};
1805
- return Promise.reject(s || i);
1806
- }
1807
- ), n;
1808
- };
1809
- var Se = { exports: {} }, cr = Se.exports, et;
1810
- function ur() {
1811
- return et || (et = 1, function(e, t) {
1812
- (function(n, r) {
1813
- e.exports = r();
1814
- })(cr, function() {
1815
- var n = 1e3, r = 6e4, s = 36e5, i = "millisecond", o = "second", c = "minute", p = "hour", l = "day", u = "week", y = "month", D = "quarter", x = "year", f = "date", S = "Invalid Date", w = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, F = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, I = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function(g) {
1816
- var m = ["th", "st", "nd", "rd"], d = g % 100;
1817
- return "[" + g + (m[(d - 20) % 10] || m[d] || m[0]) + "]";
1818
- } }, C = function(g, m, d) {
1819
- var b = String(g);
1820
- return !b || b.length >= m ? g : "" + Array(m + 1 - b.length).join(d) + g;
1821
- }, k = { s: C, z: function(g) {
1822
- var m = -g.utcOffset(), d = Math.abs(m), b = Math.floor(d / 60), h = d % 60;
1823
- return (m <= 0 ? "+" : "-") + C(b, 2, "0") + ":" + C(h, 2, "0");
1824
- }, m: function g(m, d) {
1825
- if (m.date() < d.date()) return -g(d, m);
1826
- var b = 12 * (d.year() - m.year()) + (d.month() - m.month()), h = m.clone().add(b, y), E = d - h < 0, O = m.clone().add(b + (E ? -1 : 1), y);
1827
- return +(-(b + (d - h) / (E ? h - O : O - h)) || 0);
1828
- }, a: function(g) {
1829
- return g < 0 ? Math.ceil(g) || 0 : Math.floor(g);
1830
- }, p: function(g) {
1831
- return { M: y, y: x, w: u, d: l, D: f, h: p, m: c, s: o, ms: i, Q: D }[g] || String(g || "").toLowerCase().replace(/s$/, "");
1832
- }, u: function(g) {
1833
- return g === void 0;
1834
- } }, P = "en", B = {};
1835
- B[P] = I;
1836
- var j = "$isDayjsObject", X = function(g) {
1837
- return g instanceof V || !(!g || !g[j]);
1838
- }, Y = function g(m, d, b) {
1839
- var h;
1840
- if (!m) return P;
1841
- if (typeof m == "string") {
1842
- var E = m.toLowerCase();
1843
- B[E] && (h = E), d && (B[E] = d, h = E);
1844
- var O = m.split("-");
1845
- if (!h && O.length > 1) return g(O[0]);
1846
- } else {
1847
- var T = m.name;
1848
- B[T] = m, h = T;
1849
- }
1850
- return !b && h && (P = h), h || !b && P;
1851
- }, M = function(g, m) {
1852
- if (X(g)) return g.clone();
1853
- var d = typeof m == "object" ? m : {};
1854
- return d.date = g, d.args = arguments, new V(d);
1855
- }, A = k;
1856
- A.l = Y, A.i = X, A.w = function(g, m) {
1857
- return M(g, { locale: m.$L, utc: m.$u, x: m.$x, $offset: m.$offset });
1858
- };
1859
- var V = function() {
1860
- function g(d) {
1861
- this.$L = Y(d.locale, null, !0), this.parse(d), this.$x = this.$x || d.x || {}, this[j] = !0;
1862
- }
1863
- var m = g.prototype;
1864
- return m.parse = function(d) {
1865
- this.$d = function(b) {
1866
- var h = b.date, E = b.utc;
1867
- if (h === null) return /* @__PURE__ */ new Date(NaN);
1868
- if (A.u(h)) return /* @__PURE__ */ new Date();
1869
- if (h instanceof Date) return new Date(h);
1870
- if (typeof h == "string" && !/Z$/i.test(h)) {
1871
- var O = h.match(w);
1872
- if (O) {
1873
- var T = O[2] - 1 || 0, $ = (O[7] || "0").substring(0, 3);
1874
- return E ? new Date(Date.UTC(O[1], T, O[3] || 1, O[4] || 0, O[5] || 0, O[6] || 0, $)) : new Date(O[1], T, O[3] || 1, O[4] || 0, O[5] || 0, O[6] || 0, $);
1875
- }
1876
- }
1877
- return new Date(h);
1878
- }(d), this.init();
1879
- }, m.init = function() {
1880
- var d = this.$d;
1881
- this.$y = d.getFullYear(), this.$M = d.getMonth(), this.$D = d.getDate(), this.$W = d.getDay(), this.$H = d.getHours(), this.$m = d.getMinutes(), this.$s = d.getSeconds(), this.$ms = d.getMilliseconds();
1882
- }, m.$utils = function() {
1883
- return A;
1884
- }, m.isValid = function() {
1885
- return this.$d.toString() !== S;
1886
- }, m.isSame = function(d, b) {
1887
- var h = M(d);
1888
- return this.startOf(b) <= h && h <= this.endOf(b);
1889
- }, m.isAfter = function(d, b) {
1890
- return M(d) < this.startOf(b);
1891
- }, m.isBefore = function(d, b) {
1892
- return this.endOf(b) < M(d);
1893
- }, m.$g = function(d, b, h) {
1894
- return A.u(d) ? this[b] : this.set(h, d);
1895
- }, m.unix = function() {
1896
- return Math.floor(this.valueOf() / 1e3);
1897
- }, m.valueOf = function() {
1898
- return this.$d.getTime();
1899
- }, m.startOf = function(d, b) {
1900
- var h = this, E = !!A.u(b) || b, O = A.p(d), T = function(Q, q) {
1901
- var G = A.w(h.$u ? Date.UTC(h.$y, q, Q) : new Date(h.$y, q, Q), h);
1902
- return E ? G : G.endOf(l);
1903
- }, $ = function(Q, q) {
1904
- return A.w(h.toDate()[Q].apply(h.toDate("s"), (E ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(q)), h);
1905
- }, N = this.$W, L = this.$M, v = this.$D, re = "set" + (this.$u ? "UTC" : "");
1906
- switch (O) {
1907
- case x:
1908
- return E ? T(1, 0) : T(31, 11);
1909
- case y:
1910
- return E ? T(1, L) : T(0, L + 1);
1911
- case u:
1912
- var Z = this.$locale().weekStart || 0, ae = (N < Z ? N + 7 : N) - Z;
1913
- return T(E ? v - ae : v + (6 - ae), L);
1914
- case l:
1915
- case f:
1916
- return $(re + "Hours", 0);
1917
- case p:
1918
- return $(re + "Minutes", 1);
1919
- case c:
1920
- return $(re + "Seconds", 2);
1921
- case o:
1922
- return $(re + "Milliseconds", 3);
1923
- default:
1924
- return this.clone();
1925
- }
1926
- }, m.endOf = function(d) {
1927
- return this.startOf(d, !1);
1928
- }, m.$set = function(d, b) {
1929
- var h, E = A.p(d), O = "set" + (this.$u ? "UTC" : ""), T = (h = {}, h[l] = O + "Date", h[f] = O + "Date", h[y] = O + "Month", h[x] = O + "FullYear", h[p] = O + "Hours", h[c] = O + "Minutes", h[o] = O + "Seconds", h[i] = O + "Milliseconds", h)[E], $ = E === l ? this.$D + (b - this.$W) : b;
1930
- if (E === y || E === x) {
1931
- var N = this.clone().set(f, 1);
1932
- N.$d[T]($), N.init(), this.$d = N.set(f, Math.min(this.$D, N.daysInMonth())).$d;
1933
- } else T && this.$d[T]($);
1934
- return this.init(), this;
1935
- }, m.set = function(d, b) {
1936
- return this.clone().$set(d, b);
1937
- }, m.get = function(d) {
1938
- return this[A.p(d)]();
1939
- }, m.add = function(d, b) {
1940
- var h, E = this;
1941
- d = Number(d);
1942
- var O = A.p(b), T = function(L) {
1943
- var v = M(E);
1944
- return A.w(v.date(v.date() + Math.round(L * d)), E);
1945
- };
1946
- if (O === y) return this.set(y, this.$M + d);
1947
- if (O === x) return this.set(x, this.$y + d);
1948
- if (O === l) return T(1);
1949
- if (O === u) return T(7);
1950
- var $ = (h = {}, h[c] = r, h[p] = s, h[o] = n, h)[O] || 1, N = this.$d.getTime() + d * $;
1951
- return A.w(N, this);
1952
- }, m.subtract = function(d, b) {
1953
- return this.add(-1 * d, b);
1954
- }, m.format = function(d) {
1955
- var b = this, h = this.$locale();
1956
- if (!this.isValid()) return h.invalidDate || S;
1957
- var E = d || "YYYY-MM-DDTHH:mm:ssZ", O = A.z(this), T = this.$H, $ = this.$m, N = this.$M, L = h.weekdays, v = h.months, re = h.meridiem, Z = function(q, G, ce, me) {
1958
- return q && (q[G] || q(b, E)) || ce[G].slice(0, me);
1959
- }, ae = function(q) {
1960
- return A.s(T % 12 || 12, q, "0");
1961
- }, Q = re || function(q, G, ce) {
1962
- var me = q < 12 ? "AM" : "PM";
1963
- return ce ? me.toLowerCase() : me;
1964
- };
1965
- return E.replace(F, function(q, G) {
1966
- return G || function(ce) {
1967
- switch (ce) {
1968
- case "YY":
1969
- return String(b.$y).slice(-2);
1970
- case "YYYY":
1971
- return A.s(b.$y, 4, "0");
1972
- case "M":
1973
- return N + 1;
1974
- case "MM":
1975
- return A.s(N + 1, 2, "0");
1976
- case "MMM":
1977
- return Z(h.monthsShort, N, v, 3);
1978
- case "MMMM":
1979
- return Z(v, N);
1980
- case "D":
1981
- return b.$D;
1982
- case "DD":
1983
- return A.s(b.$D, 2, "0");
1984
- case "d":
1985
- return String(b.$W);
1986
- case "dd":
1987
- return Z(h.weekdaysMin, b.$W, L, 2);
1988
- case "ddd":
1989
- return Z(h.weekdaysShort, b.$W, L, 3);
1990
- case "dddd":
1991
- return L[b.$W];
1992
- case "H":
1993
- return String(T);
1994
- case "HH":
1995
- return A.s(T, 2, "0");
1996
- case "h":
1997
- return ae(1);
1998
- case "hh":
1999
- return ae(2);
2000
- case "a":
2001
- return Q(T, $, !0);
2002
- case "A":
2003
- return Q(T, $, !1);
2004
- case "m":
2005
- return String($);
2006
- case "mm":
2007
- return A.s($, 2, "0");
2008
- case "s":
2009
- return String(b.$s);
2010
- case "ss":
2011
- return A.s(b.$s, 2, "0");
2012
- case "SSS":
2013
- return A.s(b.$ms, 3, "0");
2014
- case "Z":
2015
- return O;
2016
- }
2017
- return null;
2018
- }(q) || O.replace(":", "");
2019
- });
2020
- }, m.utcOffset = function() {
2021
- return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
2022
- }, m.diff = function(d, b, h) {
2023
- var E, O = this, T = A.p(b), $ = M(d), N = ($.utcOffset() - this.utcOffset()) * r, L = this - $, v = function() {
2024
- return A.m(O, $);
2025
- };
2026
- switch (T) {
2027
- case x:
2028
- E = v() / 12;
2029
- break;
2030
- case y:
2031
- E = v();
2032
- break;
2033
- case D:
2034
- E = v() / 3;
2035
- break;
2036
- case u:
2037
- E = (L - N) / 6048e5;
2038
- break;
2039
- case l:
2040
- E = (L - N) / 864e5;
2041
- break;
2042
- case p:
2043
- E = L / s;
2044
- break;
2045
- case c:
2046
- E = L / r;
2047
- break;
2048
- case o:
2049
- E = L / n;
2050
- break;
2051
- default:
2052
- E = L;
2053
- }
2054
- return h ? E : A.a(E);
2055
- }, m.daysInMonth = function() {
2056
- return this.endOf(y).$D;
2057
- }, m.$locale = function() {
2058
- return B[this.$L];
2059
- }, m.locale = function(d, b) {
2060
- if (!d) return this.$L;
2061
- var h = this.clone(), E = Y(d, b, !0);
2062
- return E && (h.$L = E), h;
2063
- }, m.clone = function() {
2064
- return A.w(this.$d, this);
2065
- }, m.toDate = function() {
2066
- return new Date(this.valueOf());
2067
- }, m.toJSON = function() {
2068
- return this.isValid() ? this.toISOString() : null;
2069
- }, m.toISOString = function() {
2070
- return this.$d.toISOString();
2071
- }, m.toString = function() {
2072
- return this.$d.toUTCString();
2073
- }, g;
2074
- }(), K = V.prototype;
2075
- return M.prototype = K, [["$ms", i], ["$s", o], ["$m", c], ["$H", p], ["$W", l], ["$M", y], ["$y", x], ["$D", f]].forEach(function(g) {
2076
- K[g[1]] = function(m) {
2077
- return this.$g(m, g[0], g[1]);
2078
- };
2079
- }), M.extend = function(g, m) {
2080
- return g.$i || (g(m, V, M), g.$i = !0), M;
2081
- }, M.locale = Y, M.isDayjs = X, M.unix = function(g) {
2082
- return M(1e3 * g);
2083
- }, M.en = B[P], M.Ls = B, M.p = {}, M;
2084
- });
2085
- }(Se)), Se.exports;
2086
- }
2087
- var lr = ur();
2088
- const le = /* @__PURE__ */ Ct(lr), Mr = (e) => {
2089
- window.location.href = e;
2090
- }, Lr = (e) => {
2091
- const t = [];
2092
- if (e.length)
2093
- for (const n of e)
2094
- t.push({ title: n, value: n });
2095
- return t;
2096
- }, Pr = (e) => {
2097
- const t = [];
2098
- if (e.length)
2099
- for (const n of e)
2100
- t.push({
2101
- doctor_id: n.doctor_id ? n.doctor_id : "",
2102
- doctor_name: n.doctor_name ? n.doctor_name : "",
2103
- label: n.doctor_name ? n.doctor_name : "",
2104
- specialist: n.specialist || ""
2105
- });
2106
- return t;
2107
- }, kr = (e) => {
2108
- try {
2109
- JSON.parse(e);
2110
- } catch (t) {
2111
- return console.log("Error parsing JSON:", t), !1;
2112
- }
2113
- return !0;
2114
- }, Ur = (e, t) => {
2115
- if (t?.length) {
2116
- const n = t.toLowerCase();
2117
- if (e && (n === "day" || n === "days" || n === "weeks" || n === "months" || n === "years")) {
2118
- e = e ? e.toString() : "";
2119
- const r = le().subtract(Number(e.replace(/[^0-9]/g, "")), n);
2120
- return le(r).format("YYYY-MM-DD");
2121
- }
2122
- return null;
2123
- }
2124
- return null;
2125
- }, Br = (e) => {
2126
- switch (e) {
2127
- case "0":
2128
- return "M";
2129
- case "1":
2130
- return "F";
2131
- case "2":
2132
- return "O";
2133
- default:
2134
- return "O";
2135
- }
2136
- }, jr = (e) => {
2137
- const t = $t.find((n) => n.value === e);
2138
- return t && t.text ? t.text.slice(0, 1) : "";
2139
- }, vr = (e) => {
2140
- let t = "";
2141
- return new RegExp("^[0-9]{10}$").test(e) ? { isError: !1, msg: t } : (e.length < 10 ? t = "Please enter 10 digit number" : e.length > 10 ? t = "Invalid phone number. Should have at most 10 digits." : /^\d+$/.test(e) ? t = "Please enter 10 digit number" : t = "Invalid phone number. Should contain only digits.", {
2142
- isError: !0,
2143
- msg: t
2144
- });
2145
- }, Ir = (e) => e ? new Date(e).toString() !== "Invalid Date" : !1;
2146
- function qr(e) {
2147
- const t = le(e).format("YYYY-MM-DD"), n = new Date(t), s = Math.abs((/* @__PURE__ */ new Date()).getTime() - n.getTime()), i = Math.ceil(s / (1e3 * 60 * 60 * 24));
2148
- if (i <= 7)
2149
- return `${i} days`;
2150
- if (i <= 30)
2151
- return `${Math.floor(i / 7)} weeks`;
2152
- if (i <= 365)
2153
- return `${Math.floor(i / 30)} months`;
2154
- {
2155
- const o = Math.floor(i / 365);
2156
- return isNaN(o) ? "" : `${o} years`;
2157
- }
2158
- }
2159
- const Hr = (e, t = 300) => {
2160
- let n = null;
2161
- return function(...r) {
2162
- n && clearTimeout(n), n = setTimeout(() => {
2163
- n = null, e.apply(this, r);
2164
- }, t);
2165
- };
2166
- }, zr = (e, t) => {
2167
- if (t?.length) {
2168
- const n = t.toLowerCase();
2169
- if (e && (n === "day" || n === "days" || n === "weeks" || n === "months" || n === "years")) {
2170
- e = e ? e.toString() : "";
2171
- const r = le().subtract(Number(e.replace(/[^0-9]/g, "")), n);
2172
- return le(r).format("YYYY-MM-DD");
2173
- }
2174
- return null;
2175
- }
2176
- return null;
2177
- }, Jr = () => {
2178
- const { title: e, subTitle: t, type: n, time: r } = xt;
2179
- typeof window.showToast == "function" && window.showToast(e, t, n, r);
2180
- };
2181
- function Wr(e = "") {
2182
- return e ? e.charAt(0).toUpperCase() + e.slice(1) : "";
2183
- }
2184
- const Yr = (e = "", t = "") => {
2185
- const n = e.split(" ")[0].toLowerCase();
2186
- window.location.href = `${window.location.origin}/subscription/${n}/${t}`;
2187
- }, Vr = (e, t = "") => {
2188
- const n = t?.length && t?.trim() ? t?.trim() : "";
2189
- try {
2190
- if (typeof e == "string" && e?.length && e?.trim()) {
2191
- const r = e.replace(/\s+/g, " ").trim().split(" ");
2192
- return r?.length ? {
2193
- duration: r[0] || "",
2194
- durationType: r[1]?.length ? r[1] : n || ""
2195
- } : {
2196
- duration: "",
2197
- durationType: ""
2198
- };
2199
- }
2200
- return {
2201
- duration: e ? `${e}` : "",
2202
- durationType: n
2203
- };
2204
- } catch (r) {
2205
- return console.log(r, "getDurationFormat"), {
2206
- duration: "",
2207
- durationType: ""
2208
- };
2209
- }
2210
- };
2211
- export {
2212
- Nt as E,
2213
- Fr as R,
2214
- Mr as a,
2215
- Jr as b,
2216
- le as c,
2217
- Hr as d,
2218
- zr as e,
2219
- Lr as f,
2220
- jr as g,
2221
- _r as h,
2222
- kr as i,
2223
- qr as j,
2224
- Ir as k,
2225
- Br as l,
2226
- Ur as m,
2227
- Wr as n,
2228
- _t as o,
2229
- Pr as p,
2230
- Vr as q,
2231
- Yr as r,
2232
- vr as v
2233
- };