@feedmepos/mf-hrm-portal 2.3.2-dev.17 → 2.3.2-dev.18

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 (108) hide show
  1. package/dist/{ApprovalCodeList-Bo8IbNxV.js → ApprovalCodeList-Cv4-P7fX.js} +14 -15
  2. package/dist/{AuditLogList-C7CjPILA.js → AuditLogList-KH-H5uzM.js} +823 -833
  3. package/dist/ConditionBuilderForm.vue_vue_type_script_setup_true_lang-BQq5xW8d.js +459 -0
  4. package/dist/EmployeeList-BCjOwL1V.js +896 -0
  5. package/dist/FormSection.vue_vue_type_script_setup_true_lang-D4e5iSQq.js +90 -0
  6. package/dist/{GrantUserList-CXWGr3Wo.js → GrantUserList-CfvdU440.js} +15 -16
  7. package/dist/Main-CVF5eDBd.js +101 -0
  8. package/dist/{Main-bru10M5U.js → Main-DKKGpzdb.js} +2102 -2097
  9. package/dist/{Main-DeuWov9n.js → Main-YrCgPqZU.js} +5 -5
  10. package/dist/MyPosProfile-z84_PtAn.js +360 -0
  11. package/dist/PasscodePinField.vue_vue_type_script_setup_true_lang-TXPEqa46.js +126 -0
  12. package/dist/{PermissionSetList--xt0piQz.js → PermissionSetList-9xD_n1VF.js} +136 -137
  13. package/dist/PortalPermissionEditor.vue_vue_type_script_setup_true_lang-IX3av4mS.js +4212 -0
  14. package/dist/PortalUserSearcher.vue_vue_type_style_index_0_scoped_827dfd60_lang-sPatt5hV.js +1797 -0
  15. package/dist/RoleForm.vue_vue_type_script_setup_true_lang-CSsgsqvl.js +547 -0
  16. package/dist/RoleList-oSqkcGgN.js +274 -0
  17. package/dist/{ScheduleAddPositionModal.vue_vue_type_script_setup_true_lang-Cqo5kHcF.js → ScheduleAddPositionModal.vue_vue_type_script_setup_true_lang-qJhZA2DN.js} +1 -1
  18. package/dist/{ScheduleGeneralPage-DxhgBLix.js → ScheduleGeneralPage-BxXDcGD4.js} +2 -2
  19. package/dist/{ScheduleModal.vue_vue_type_script_setup_true_lang-DGPwmNQb.js → ScheduleModal.vue_vue_type_script_setup_true_lang-Dcr2USSq.js} +187 -186
  20. package/dist/{SchedulePage-oBdEvGWN.js → SchedulePage-C_M2ABMR.js} +20 -20
  21. package/dist/{SchedulePositionPage-BZps-kKs.js → SchedulePositionPage-XaIHUH4A.js} +3 -3
  22. package/dist/{SelectFilter-Bs_LCk3L.js → SelectFilter-BzqdpDfg.js} +1 -1
  23. package/dist/TeamMemberList--WEaatay.js +2082 -0
  24. package/dist/{TimesheetList-BW6iCigo.js → TimesheetList-D6FG69-S.js} +9 -9
  25. package/dist/{TimesheetList.vue_vue_type_style_index_0_scoped_63294af2_lang-Dv66Af5C.js → TimesheetList.vue_vue_type_style_index_0_scoped_63294af2_lang-GIIAlhti.js} +3 -3
  26. package/dist/{app-B8xnhtVI.js → app-DSUfooPD.js} +7973 -4103
  27. package/dist/app.js +3 -3
  28. package/dist/{approval-code-B0jU1bvk.js → approval-code-BZYlghBT.js} +1 -1
  29. package/dist/{dayjs.min-CdpSCqn1.js → dayjs.min-5UvwoDGv.js} +34 -34
  30. package/dist/{employee-DlFGiUgI.js → employee-CT3TDtIM.js} +48 -47
  31. package/dist/{grant-user-C3C6glCk.js → grant-user-CgvKn27g.js} +1 -1
  32. package/dist/{iteration-BM0iyDBd.js → iteration-BFI7vEBg.js} +1 -1
  33. package/dist/{lodash-KK9U7NAy.js → lodash-DJ0F99PK.js} +1 -1
  34. package/dist/member-grant-BmthjLCk.js +54 -0
  35. package/dist/restaurant-CeR-XM1L.js +49 -0
  36. package/dist/{role-DYCorsOh.js → role-C2QeFrHr.js} +19 -20
  37. package/dist/rule-CYsTf24V.js +839 -0
  38. package/dist/src/api/my-pos-profile/index.d.ts +3 -0
  39. package/dist/src/api/sso-provider/index.d.ts +5 -0
  40. package/dist/src/api/staff-invite/index.d.ts +16 -0
  41. package/dist/src/components/CollapsibleWrapper.vue.d.ts +11 -3
  42. package/dist/src/components/form/SegmentedTabs.vue.d.ts +23 -0
  43. package/dist/src/composables/useMenuAccess.d.ts +56 -0
  44. package/dist/src/composables/useSsoProviders.d.ts +19 -0
  45. package/dist/src/composables/useStaffInviteProviders.d.ts +8 -0
  46. package/dist/src/composables/useTenant.d.ts +11 -0
  47. package/dist/src/helpers/member-grant.d.ts +36 -0
  48. package/dist/src/helpers/my-pos-profile.d.ts +37 -0
  49. package/dist/src/helpers/permission-set.d.ts +1 -102
  50. package/dist/src/helpers/pos-assignment-rows.d.ts +28 -0
  51. package/dist/src/helpers/rule.d.ts +2 -2
  52. package/dist/src/helpers/staff-invite.d.ts +54 -0
  53. package/dist/src/helpers/string.d.ts +10 -1
  54. package/dist/src/router/courtGuard.d.ts +4 -0
  55. package/dist/src/router/menu-access-guard.d.ts +17 -0
  56. package/dist/src/router/shared.d.ts +3 -1
  57. package/dist/src/stores/restaurant.d.ts +7 -7
  58. package/dist/src/stores/team.d.ts +31 -1
  59. package/dist/src/types/my-pos-profile.d.ts +24 -0
  60. package/dist/src/types/sso-provider.d.ts +10 -0
  61. package/dist/src/types/staff-invite.d.ts +100 -0
  62. package/dist/src/types/team.d.ts +17 -1
  63. package/dist/src/views/audit-log/locales/index.d.ts +12 -0
  64. package/dist/src/views/audit-log/useTraceIdDeepLink.d.ts +1 -1
  65. package/dist/src/views/hr/locales/index.d.ts +20 -0
  66. package/dist/src/views/hr/role/RoleForm.vue.d.ts +29 -2
  67. package/dist/src/views/my-pos-profile/MyPosProfile.vue.d.ts +2 -0
  68. package/dist/src/views/my-pos-profile/components/PasscodeChangedDialog.vue.d.ts +4 -0
  69. package/dist/src/views/my-pos-profile/locales/index.d.ts +236 -0
  70. package/dist/src/views/scheduling/composables/useScheduleOnboardingAvailability.d.ts +1 -1
  71. package/dist/src/views/scheduling/composables/useScheduleOnboardingWizard.d.ts +1 -1
  72. package/dist/src/views/scheduling/composables/useScheduleShiftDraft.d.ts +1 -1
  73. package/dist/src/views/scheduling/composables/useScheduleShiftPopover.d.ts +1 -1
  74. package/dist/src/views/team/components/BasePermission.vue.d.ts +11 -0
  75. package/dist/src/views/team/components/ConditionPermission.vue.d.ts +11 -0
  76. package/dist/src/views/team/components/MemberGrantFields.vue.d.ts +51 -0
  77. package/dist/src/views/team/{member/MemberInfo.vue.d.ts → components/MemberStatusBadge.vue.d.ts} +2 -2
  78. package/dist/src/views/team/components/PortalPermissionEditor.vue.d.ts +21 -0
  79. package/dist/src/views/team/components/PosAssignmentRows.vue.d.ts +44 -0
  80. package/dist/src/views/team/components/PosRolePermission.vue.d.ts +11 -0
  81. package/dist/src/views/team/locales/index.d.ts +716 -0
  82. package/dist/src/views/team/member/AddMemberForm.vue.d.ts +48 -3
  83. package/dist/src/views/team/member/ExistingMemberNotice.vue.d.ts +11 -0
  84. package/dist/src/views/team/member/MemberDetailsCard.vue.d.ts +35 -0
  85. package/dist/src/views/team/member/MemberHeaderCard.vue.d.ts +19 -0
  86. package/dist/src/views/team/member/TeamMemberList.vue.d.ts +1 -0
  87. package/dist/string-DZQ1uNjn.js +22 -0
  88. package/dist/style.css +1 -1
  89. package/dist/tsconfig.app.tsbuildinfo +1 -1
  90. package/dist/{useAppStore-C1lk2Q2j.js → useAppStore-KvMQH09O.js} +1 -1
  91. package/dist/{useLoading-CXdGsnHm.js → useLoading-4s1zzjal.js} +1 -1
  92. package/dist/useReportPermissions-BVxVU0SS.js +80 -0
  93. package/dist/useSsoProviders-CKRDQYcP.js +41 -0
  94. package/package.json +2 -2
  95. package/dist/ConditionBuilderForm.vue_vue_type_script_setup_true_lang-C-4BaMN-.js +0 -438
  96. package/dist/EmployeeList-BOP-gaTp.js +0 -776
  97. package/dist/FormItem.vue_vue_type_script_setup_true_lang-BEOR-8QD.js +0 -45
  98. package/dist/FormSection.vue_vue_type_script_setup_true_lang-DknXTYiK.js +0 -49
  99. package/dist/Main-BrP1frfO.js +0 -96
  100. package/dist/PasscodePinField.vue_vue_type_script_setup_true_lang-CqG0v0Sz.js +0 -243
  101. package/dist/PortalPermissionEditor.vue_vue_type_script_setup_true_lang-D5nvRsW3.js +0 -4167
  102. package/dist/PortalUserSearcher.vue_vue_type_style_index_0_scoped_827dfd60_lang-DiNDrCy0.js +0 -35
  103. package/dist/RoleList-BEE-8EQK.js +0 -740
  104. package/dist/TeamMemberList-DCgNcs4P.js +0 -1154
  105. package/dist/restaurant-C7o2Yk6j.js +0 -2688
  106. package/dist/rule-BhGHZqKO.js +0 -783
  107. package/dist/string-VNuQNweN.js +0 -15
  108. package/dist/useReportPermissions-D_I4rFVo.js +0 -82
@@ -1,2688 +0,0 @@
1
- import { defineStore as un, storeToRefs as fn } from "pinia";
2
- import { ref as Be } from "vue";
3
- import { useCoreStore as xe, baseClientInstance as Pt, FeedMeAuth as dn } from "@feedmepos/mf-common";
4
- function Tt(e, t) {
5
- return function() {
6
- return e.apply(t, arguments);
7
- };
8
- }
9
- var st = {};
10
- const { toString: pn } = Object.prototype, { getPrototypeOf: J } = Object, { iterator: he, toStringTag: xt } = Symbol, de = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype), Ct = (e) => typeof e == "string" && (e === "__proto__" || e === "constructor" || e === "prototype"), Nt = (e, t, n) => e === Object.prototype || !n && t === null, hn = (e) => {
11
- if (!Object.isExtensible(e))
12
- return !1;
13
- const t = Object.getOwnPropertyNames(e);
14
- return Object.getOwnPropertySymbols && t.push(...Object.getOwnPropertySymbols(e)), t.every((n) => {
15
- if (Ct(n))
16
- return !1;
17
- const r = Object.getOwnPropertyDescriptor(e, n);
18
- return !!r && r.configurable && r.writable === !0;
19
- });
20
- }, pe = (e, t) => {
21
- let n = e;
22
- const r = [];
23
- for (; n != null; ) {
24
- if (r.indexOf(n) !== -1)
25
- return !1;
26
- r.push(n);
27
- const s = J(n);
28
- if (Nt(n, s, n === e))
29
- return !1;
30
- if (de(n, t))
31
- return !0;
32
- n = s;
33
- }
34
- return !1;
35
- }, mn = (e, t) => e != null && pe(e, t) ? e[t] : void 0, yn = (e) => {
36
- if (e == null || typeof e != "object" && typeof e != "function")
37
- return e;
38
- const t = J(e);
39
- if (t === null && hn(e))
40
- return e;
41
- const n = /* @__PURE__ */ Object.create(null), r = /* @__PURE__ */ Object.create(null), s = [];
42
- let o = e;
43
- for (; o != null && s.indexOf(o) === -1; ) {
44
- s.push(o);
45
- const i = o === e ? t : J(o);
46
- if (Nt(o, i, o === e))
47
- break;
48
- const c = Object.getOwnPropertyNames(o);
49
- Object.getOwnPropertySymbols && c.push(...Object.getOwnPropertySymbols(o));
50
- for (const l of c)
51
- Ct(l) || de(r, l) || (n[l] = e[l], r[l] = !0);
52
- o = i;
53
- }
54
- return n;
55
- }, Ve = /* @__PURE__ */ ((e) => (t) => {
56
- const n = pn.call(t);
57
- return e[n] || (e[n] = n.slice(8, -1).toLowerCase());
58
- })(/* @__PURE__ */ Object.create(null)), j = (e) => (e = e.toLowerCase(), (t) => Ve(t) === e), Ce = (e) => (t) => typeof t === e, { isArray: Y } = Array, ee = Ce("undefined");
59
- function se(e) {
60
- return e !== null && !ee(e) && e.constructor !== null && !ee(e.constructor) && F(e.constructor.isBuffer) && e.constructor.isBuffer(e);
61
- }
62
- const Dt = j("ArrayBuffer");
63
- function bn(e) {
64
- let t;
65
- return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && Dt(e.buffer), t;
66
- }
67
- const wn = Ce("string"), F = Ce("function"), Ut = Ce("number"), oe = (e) => e !== null && typeof e == "object", gn = (e) => e === !0 || e === !1, Oe = (e) => {
68
- if (!oe(e))
69
- return !1;
70
- const t = J(e);
71
- return (t === null || t === Object.prototype || J(t) === null) && // Treat safe own/inherited Symbol.toStringTag or Symbol.iterator members as
72
- // evidence the value is tagged/iterable, while ignoring members reachable
73
- // only through shared or terminal prototype boundaries.
74
- !pe(e, xt) && !pe(e, he);
75
- }, En = (e) => {
76
- if (!oe(e) || se(e))
77
- return !1;
78
- try {
79
- return Object.keys(e).length === 0 && Object.getPrototypeOf(e) === Object.prototype;
80
- } catch {
81
- return !1;
82
- }
83
- }, Rn = j("Date"), On = j("File"), Sn = (e) => !!(e && typeof e.uri < "u"), An = (e) => e && typeof e.getParts < "u", _n = j("Blob"), Pn = j("FileList"), Tn = j("Set"), xn = (e) => oe(e) && F(e.pipe);
84
- function Cn() {
85
- return typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : typeof global < "u" ? global : {};
86
- }
87
- const ot = Cn(), it = typeof ot.FormData < "u" ? ot.FormData : void 0, Nn = (e) => {
88
- if (!e) return !1;
89
- if (it && e instanceof it) return !0;
90
- const t = J(e);
91
- if (!t || t === Object.prototype || !F(e.append)) return !1;
92
- const n = Ve(e);
93
- return n === "formdata" || // detect form-data instance
94
- n === "object" && F(e.toString) && e.toString() === "[object FormData]";
95
- }, Dn = j("URLSearchParams"), [Un, Ln, Fn, Bn] = [
96
- "ReadableStream",
97
- "Request",
98
- "Response",
99
- "Headers"
100
- ].map(j), jn = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
101
- function me(e, t, { allOwnKeys: n = !1 } = {}) {
102
- if (e === null || typeof e > "u")
103
- return;
104
- let r, s;
105
- if (typeof e != "object" && (e = [e]), Y(e))
106
- for (r = 0, s = e.length; r < s; r++)
107
- t.call(null, e[r], r, e);
108
- else {
109
- if (se(e))
110
- return;
111
- const o = n ? Object.getOwnPropertyNames(e) : Object.keys(e), i = o.length;
112
- let c;
113
- for (r = 0; r < i; r++)
114
- c = o[r], t.call(null, e[c], c, e);
115
- }
116
- }
117
- function Lt(e, t) {
118
- if (se(e))
119
- return null;
120
- t = t.toLowerCase();
121
- const n = Object.keys(e);
122
- let r = n.length, s;
123
- for (; r-- > 0; )
124
- if (s = n[r], t === s.toLowerCase())
125
- return s;
126
- return null;
127
- }
128
- const Q = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, Ft = (e) => !ee(e) && e !== Q;
129
- function ve(...e) {
130
- const { caseless: t, skipUndefined: n } = Ft(this) && this || {}, r = {}, s = (o, i) => {
131
- if (i === "__proto__" || i === "constructor" || i === "prototype")
132
- return;
133
- const c = t && typeof i == "string" && Lt(r, i) || i, l = de(r, c) ? r[c] : void 0;
134
- Oe(l) && Oe(o) ? r[c] = ve(l, o) : Oe(o) ? r[c] = ve({}, o) : Y(o) ? r[c] = o.slice() : (!n || !ee(o)) && (r[c] = o);
135
- };
136
- for (let o = 0, i = e.length; o < i; o++) {
137
- const c = e[o];
138
- if (!c || se(c) || (me(c, s), typeof c != "object" || Y(c)))
139
- continue;
140
- const l = Object.getOwnPropertySymbols(c);
141
- for (let d = 0; d < l.length; d++) {
142
- const u = l[d];
143
- Kn.call(c, u) && s(c[u], u);
144
- }
145
- }
146
- return r;
147
- }
148
- const In = (e, t, n, { allOwnKeys: r } = {}) => (me(
149
- t,
150
- (s, o) => {
151
- n && F(s) ? Object.defineProperty(e, o, {
152
- // Null-proto descriptor so a polluted Object.prototype.get cannot
153
- // hijack defineProperty's accessor-vs-data resolution.
154
- __proto__: null,
155
- value: Tt(s, n),
156
- writable: !0,
157
- enumerable: !0,
158
- configurable: !0
159
- }) : Object.defineProperty(e, o, {
160
- __proto__: null,
161
- value: s,
162
- writable: !0,
163
- enumerable: !0,
164
- configurable: !0
165
- });
166
- },
167
- { allOwnKeys: r }
168
- ), e), kn = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), qn = (e, t, n, r) => {
169
- e.prototype = Object.create(t.prototype, r), Object.defineProperty(e.prototype, "constructor", {
170
- __proto__: null,
171
- value: e,
172
- writable: !0,
173
- enumerable: !1,
174
- configurable: !0
175
- }), Object.defineProperty(e, "super", {
176
- __proto__: null,
177
- value: t.prototype
178
- }), n && Object.assign(e.prototype, n);
179
- }, Hn = (e, t, n, r) => {
180
- let s, o, i;
181
- const c = {};
182
- if (t = t || {}, e == null) return t;
183
- do {
184
- for (s = Object.getOwnPropertyNames(e), o = s.length; o-- > 0; )
185
- i = s[o], (!r || r(i, e, t)) && !c[i] && (t[i] = e[i], c[i] = !0);
186
- e = n !== !1 && J(e);
187
- } while (e && (!n || n(e, t)) && e !== Object.prototype);
188
- return t;
189
- }, $n = (e, t, n) => {
190
- e = String(e), (n === void 0 || n > e.length) && (n = e.length), n -= t.length;
191
- const r = e.indexOf(t, n);
192
- return r !== -1 && r === n;
193
- }, Mn = (e) => {
194
- if (!e) return null;
195
- if (Y(e)) return e;
196
- let t = e.length;
197
- if (!Ut(t)) return null;
198
- const n = new Array(t);
199
- for (; t-- > 0; )
200
- n[t] = e[t];
201
- return n;
202
- }, vn = /* @__PURE__ */ ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && J(Uint8Array)), zn = (e, t) => {
203
- const r = (e && e[he]).call(e);
204
- let s;
205
- for (; (s = r.next()) && !s.done; ) {
206
- const o = s.value;
207
- t.call(e, o[0], o[1]);
208
- }
209
- }, Wn = (e, t) => {
210
- let n;
211
- const r = [];
212
- for (; (n = e.exec(t)) !== null; )
213
- r.push(n);
214
- return r;
215
- }, Vn = j("HTMLFormElement"), Jn = (e) => e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g, function(n, r, s) {
216
- return r.toUpperCase() + s;
217
- }), { propertyIsEnumerable: Kn } = Object.prototype, Xn = j("RegExp"), Bt = (e, t) => {
218
- const n = Object.getOwnPropertyDescriptors(e), r = {};
219
- me(n, (s, o) => {
220
- let i;
221
- (i = t(s, o, e)) !== !1 && (r[o] = i || s);
222
- }), Object.defineProperties(e, r);
223
- }, Gn = (e) => {
224
- Bt(e, (t, n) => {
225
- if (F(e) && ["arguments", "caller", "callee"].includes(n))
226
- return !1;
227
- const r = e[n];
228
- if (F(r)) {
229
- if (t.enumerable = !1, "writable" in t) {
230
- t.writable = !1;
231
- return;
232
- }
233
- t.set || (t.set = () => {
234
- throw Error("Can not rewrite read-only method '" + n + "'");
235
- });
236
- }
237
- });
238
- }, Qn = (e, t) => {
239
- const n = {}, r = (s) => {
240
- s.forEach((o) => {
241
- n[o] = !0;
242
- });
243
- };
244
- return Y(e) ? r(e) : r(String(e).split(t)), n;
245
- }, Zn = () => {
246
- }, Yn = (e, t) => e != null && Number.isFinite(e = +e) ? e : t;
247
- function er(e) {
248
- return !!(e && F(e.append) && e[xt] === "FormData" && e[he]);
249
- }
250
- const tr = (e) => {
251
- const t = /* @__PURE__ */ new WeakSet(), n = (r) => {
252
- if (oe(r)) {
253
- if (t.has(r))
254
- return;
255
- if (se(r))
256
- return r;
257
- if (!("toJSON" in r)) {
258
- t.add(r);
259
- let s;
260
- if (Tn(r)) {
261
- s = [];
262
- for (const o of r) {
263
- const i = n(o);
264
- !ee(i) && s.push(i);
265
- }
266
- } else
267
- s = Y(r) ? [] : {}, me(r, (o, i) => {
268
- const c = n(o);
269
- !ee(c) && (s[i] = c);
270
- });
271
- return t.delete(r), s;
272
- }
273
- }
274
- return r;
275
- };
276
- return n(e);
277
- }, nr = j("AsyncFunction"), rr = (e) => e && (oe(e) || F(e)) && F(e.then) && F(e.catch), jt = ((e, t) => e ? setImmediate : t ? ((n, r) => (Q.addEventListener(
278
- "message",
279
- ({ source: s, data: o }) => {
280
- s === Q && o === n && r.length && r.shift()();
281
- },
282
- !1
283
- ), (s) => {
284
- r.push(s), Q.postMessage(n, "*");
285
- }))(`axios@${Math.random()}`, []) : (n) => setTimeout(n))(typeof setImmediate == "function", F(Q.postMessage)), sr = typeof queueMicrotask < "u" ? queueMicrotask.bind(Q) : typeof st < "u" && st.nextTick || jt, It = (e) => e != null && F(e[he]), or = (e) => e != null && pe(e, he) && It(e), a = {
286
- isArray: Y,
287
- isArrayBuffer: Dt,
288
- isBuffer: se,
289
- isFormData: Nn,
290
- isArrayBufferView: bn,
291
- isString: wn,
292
- isNumber: Ut,
293
- isBoolean: gn,
294
- isObject: oe,
295
- isPlainObject: Oe,
296
- isEmptyObject: En,
297
- isReadableStream: Un,
298
- isRequest: Ln,
299
- isResponse: Fn,
300
- isHeaders: Bn,
301
- isUndefined: ee,
302
- isDate: Rn,
303
- isFile: On,
304
- isReactNativeBlob: Sn,
305
- isReactNative: An,
306
- isBlob: _n,
307
- isRegExp: Xn,
308
- isFunction: F,
309
- isStream: xn,
310
- isURLSearchParams: Dn,
311
- isTypedArray: vn,
312
- isFileList: Pn,
313
- forEach: me,
314
- merge: ve,
315
- extend: In,
316
- trim: jn,
317
- stripBOM: kn,
318
- inherits: qn,
319
- toFlatObject: Hn,
320
- kindOf: Ve,
321
- kindOfTest: j,
322
- endsWith: $n,
323
- toArray: Mn,
324
- forEachEntry: zn,
325
- matchAll: Wn,
326
- isHTMLForm: Vn,
327
- hasOwnProperty: de,
328
- hasOwnProp: de,
329
- // an alias to avoid ESLint no-prototype-builtins detection
330
- hasOwnInPrototypeChain: pe,
331
- getSafeProp: mn,
332
- toSafeFlatObject: yn,
333
- reduceDescriptors: Bt,
334
- freezeMethods: Gn,
335
- toObjectSet: Qn,
336
- toCamelCase: Jn,
337
- noop: Zn,
338
- toFiniteNumber: Yn,
339
- findKey: Lt,
340
- global: Q,
341
- isContextDefined: Ft,
342
- isSpecCompliantForm: er,
343
- toJSONObject: tr,
344
- isAsyncFn: nr,
345
- isThenable: rr,
346
- setImmediate: jt,
347
- asap: sr,
348
- isIterable: It,
349
- isSafeIterable: or
350
- }, ir = a.toObjectSet([
351
- "age",
352
- "authorization",
353
- "content-length",
354
- "content-type",
355
- "etag",
356
- "expires",
357
- "from",
358
- "host",
359
- "if-modified-since",
360
- "if-unmodified-since",
361
- "last-modified",
362
- "location",
363
- "max-forwards",
364
- "proxy-authorization",
365
- "referer",
366
- "retry-after",
367
- "user-agent"
368
- ]), ar = (e) => {
369
- const t = {};
370
- let n, r, s;
371
- return e && e.split(`
372
- `).forEach(function(i) {
373
- s = i.indexOf(":"), n = i.substring(0, s).trim().toLowerCase(), r = i.substring(s + 1).trim();
374
- const c = a.hasOwnProp(t, n);
375
- !n || c && a.hasOwnProp(ir, n) || (n === "set-cookie" ? c ? t[n].push(r) : t[n] = [r] : t[n] = c ? t[n] + ", " + r : r);
376
- }), t;
377
- };
378
- function cr(e) {
379
- let t = 0, n = e.length;
380
- for (; t < n; ) {
381
- const r = e.charCodeAt(t);
382
- if (r !== 9 && r !== 32)
383
- break;
384
- t += 1;
385
- }
386
- for (; n > t; ) {
387
- const r = e.charCodeAt(n - 1);
388
- if (r !== 9 && r !== 32)
389
- break;
390
- n -= 1;
391
- }
392
- return t === 0 && n === e.length ? e : e.slice(t, n);
393
- }
394
- const lr = new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+", "g"), ur = new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+", "g");
395
- function Je(e, t) {
396
- return a.isArray(e) ? e.map((n) => Je(n, t)) : cr(String(e).replace(t, ""));
397
- }
398
- const fr = (e) => Je(e, lr), dr = (e) => Je(e, ur);
399
- function kt(e) {
400
- const t = /* @__PURE__ */ Object.create(null);
401
- return a.forEach(e.toJSON(), (n, r) => {
402
- t[r] = dr(n);
403
- }), t;
404
- }
405
- const at = Symbol("internals");
406
- function le(e) {
407
- return e && String(e).trim().toLowerCase();
408
- }
409
- function Se(e) {
410
- return e === !1 || e == null ? e : a.isArray(e) ? e.map(Se) : fr(String(e));
411
- }
412
- function pr(e) {
413
- const t = /* @__PURE__ */ Object.create(null), n = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
414
- let r;
415
- for (; r = n.exec(e); )
416
- t[r[1]] = r[2];
417
- return t;
418
- }
419
- const hr = /^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/;
420
- function je(e) {
421
- let t = 0, n = e.length;
422
- for (; t < n; ) {
423
- const r = e.charCodeAt(t);
424
- if (r !== 9 && r !== 32)
425
- break;
426
- t += 1;
427
- }
428
- for (; n > t; ) {
429
- const r = e.charCodeAt(n - 1);
430
- if (r !== 9 && r !== 32)
431
- break;
432
- n -= 1;
433
- }
434
- return t === 0 && n === e.length ? e : e.slice(t, n);
435
- }
436
- function mr(e) {
437
- const t = e.length - 1;
438
- if (t < 1 || e.charCodeAt(0) !== 34 || e.charCodeAt(t) !== 34)
439
- return e;
440
- let n = "";
441
- for (let r = 1; r < t; r++) {
442
- const s = e.charCodeAt(r);
443
- if (s === 34 || s === 92 && (r += 1, r >= t))
444
- return e;
445
- n += e[r];
446
- }
447
- return n;
448
- }
449
- function yr(e) {
450
- const t = /* @__PURE__ */ Object.create(null), n = String(e);
451
- let r = 0, s = !1, o = !1;
452
- function i(c) {
453
- const l = je(n.slice(r, c)), d = l.indexOf("=");
454
- if (d < 1)
455
- return;
456
- const u = je(l.slice(0, d));
457
- if (!hr.test(u))
458
- return;
459
- const p = u.toLowerCase();
460
- if (p === "__proto__" || p === "constructor" || p === "prototype")
461
- return;
462
- const y = je(l.slice(d + 1));
463
- t[p] = mr(y);
464
- }
465
- for (let c = 0; c < n.length; c++) {
466
- const l = n.charCodeAt(c);
467
- s ? o ? o = !1 : l === 92 ? o = !0 : l === 34 && (s = !1) : l === 34 ? s = !0 : (l === 44 || l === 59) && (i(c), r = c + 1);
468
- }
469
- return i(n.length), t;
470
- }
471
- const br = (e) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());
472
- function Ie(e, t, n, r, s) {
473
- if (a.isFunction(r))
474
- return r.call(this, t, n);
475
- if (s && (t = n), !!a.isString(t)) {
476
- if (a.isString(r))
477
- return t.indexOf(r) !== -1;
478
- if (a.isRegExp(r))
479
- return r.test(t);
480
- }
481
- }
482
- function wr(e) {
483
- return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (t, n, r) => n.toUpperCase() + r);
484
- }
485
- function gr(e, t) {
486
- const n = a.toCamelCase(" " + t);
487
- ["get", "set", "has"].forEach((r) => {
488
- Object.defineProperty(e, r + n, {
489
- // Null-proto descriptor so a polluted Object.prototype.get cannot turn
490
- // this data descriptor into an accessor descriptor on the way in.
491
- __proto__: null,
492
- value: function(s, o, i) {
493
- return this[r].call(this, t, s, o, i);
494
- },
495
- configurable: !0
496
- });
497
- });
498
- }
499
- let L = class {
500
- constructor(t) {
501
- t && this.set(t);
502
- }
503
- set(t, n, r) {
504
- const s = this;
505
- function o(c, l, d) {
506
- const u = le(l);
507
- if (!u)
508
- return;
509
- const p = a.findKey(s, u);
510
- (!p || s[p] === void 0 || d === !0 || d === void 0 && s[p] !== !1) && (s[p || l] = Se(c));
511
- }
512
- const i = (c, l) => a.forEach(c, (d, u) => o(d, u, l));
513
- if (a.isPlainObject(t) || t instanceof this.constructor)
514
- i(t, n);
515
- else if (a.isString(t) && (t = t.trim()) && !br(t))
516
- i(ar(t), n);
517
- else if (a.isObject(t) && a.isSafeIterable(t)) {
518
- let c = /* @__PURE__ */ Object.create(null), l, d;
519
- for (const u of t) {
520
- if (!a.isArray(u))
521
- throw new TypeError("Object iterator must return a key-value pair");
522
- d = u[0], a.hasOwnProp(c, d) ? (l = c[d], c[d] = a.isArray(l) ? [...l, u[1]] : [l, u[1]]) : c[d] = u[1];
523
- }
524
- i(c, n);
525
- } else
526
- t != null && o(n, t, r);
527
- return this;
528
- }
529
- get(t, n) {
530
- if (t = le(t), t) {
531
- const r = a.findKey(this, t);
532
- if (r) {
533
- const s = this[r];
534
- if (!n)
535
- return s;
536
- if (n === !0)
537
- return pr(s);
538
- if (a.isFunction(n))
539
- return n.call(this, s, r);
540
- if (a.isRegExp(n))
541
- return n.exec(s);
542
- throw new TypeError("parser must be boolean|regexp|function");
543
- }
544
- }
545
- }
546
- has(t, n) {
547
- if (t = le(t), t) {
548
- const r = a.findKey(this, t);
549
- return !!(r && this[r] !== void 0 && (!n || Ie(this, this[r], r, n)));
550
- }
551
- return !1;
552
- }
553
- delete(t, n) {
554
- const r = this;
555
- let s = !1;
556
- function o(i) {
557
- if (i = le(i), i) {
558
- const c = a.findKey(r, i);
559
- c && (!n || Ie(r, r[c], c, n)) && (delete r[c], s = !0);
560
- }
561
- }
562
- return a.isArray(t) ? t.forEach(o) : o(t), s;
563
- }
564
- clear(t) {
565
- const n = Object.keys(this);
566
- let r = n.length, s = !1;
567
- for (; r--; ) {
568
- const o = n[r];
569
- (!t || Ie(this, this[o], o, t, !0)) && (delete this[o], s = !0);
570
- }
571
- return s;
572
- }
573
- normalize(t) {
574
- const n = this, r = {};
575
- return a.forEach(this, (s, o) => {
576
- const i = a.findKey(r, o);
577
- if (i) {
578
- n[i] = Se(s), delete n[o];
579
- return;
580
- }
581
- const c = t ? wr(o) : String(o).trim();
582
- c !== o && delete n[o], n[c] = Se(s), r[c] = !0;
583
- }), this;
584
- }
585
- concat(...t) {
586
- return this.constructor.concat(this, ...t);
587
- }
588
- toJSON(t) {
589
- const n = /* @__PURE__ */ Object.create(null);
590
- return a.forEach(this, (r, s) => {
591
- r != null && r !== !1 && (n[s] = t && a.isArray(r) ? r.join(", ") : r);
592
- }), n;
593
- }
594
- [Symbol.iterator]() {
595
- return Object.entries(this.toJSON())[Symbol.iterator]();
596
- }
597
- toString() {
598
- return Object.entries(this.toJSON()).map(([t, n]) => t + ": " + n).join(`
599
- `);
600
- }
601
- getSetCookie() {
602
- const t = this.get("set-cookie");
603
- return a.isArray(t) ? t : t == null || t === !1 ? [] : [t];
604
- }
605
- get [Symbol.toStringTag]() {
606
- return "AxiosHeaders";
607
- }
608
- static from(t) {
609
- return t instanceof this ? t : new this(t);
610
- }
611
- static parseParameters(t) {
612
- return yr(t);
613
- }
614
- static concat(t, ...n) {
615
- const r = new this(t);
616
- return n.forEach((s) => r.set(s)), r;
617
- }
618
- static accessor(t) {
619
- const r = (this[at] = this[at] = {
620
- accessors: {}
621
- }).accessors, s = this.prototype;
622
- function o(i) {
623
- const c = le(i);
624
- r[c] || (gr(s, i), r[c] = !0);
625
- }
626
- return a.isArray(t) ? t.forEach(o) : o(t), this;
627
- }
628
- };
629
- L.accessor([
630
- "Content-Type",
631
- "Content-Length",
632
- "Accept",
633
- "Accept-Encoding",
634
- "User-Agent",
635
- "Authorization"
636
- ]);
637
- a.reduceDescriptors(L.prototype, ({ value: e }, t) => {
638
- let n = t[0].toUpperCase() + t.slice(1);
639
- return {
640
- get: () => e,
641
- set(r) {
642
- this[n] = r;
643
- }
644
- };
645
- });
646
- a.freezeMethods(L);
647
- const Pe = "[REDACTED ****]";
648
- function Er(e) {
649
- if (a.hasOwnProp(e, "toJSON"))
650
- return !0;
651
- let t = Object.getPrototypeOf(e);
652
- for (; t && t !== Object.prototype; ) {
653
- if (a.hasOwnProp(t, "toJSON"))
654
- return !0;
655
- t = Object.getPrototypeOf(t);
656
- }
657
- return !1;
658
- }
659
- function Rr(e, t) {
660
- const n = new Set(t.map((o) => String(o).toLowerCase())), r = [], s = (o) => {
661
- if (o === null || typeof o != "object" || a.isBuffer(o)) return o;
662
- if (r.indexOf(o) !== -1) return;
663
- o instanceof L && (o = o.toJSON()), r.push(o);
664
- let i;
665
- if (a.isArray(o))
666
- i = [], o.forEach((c, l) => {
667
- const d = s(c);
668
- a.isUndefined(d) || (i[l] = d);
669
- });
670
- else {
671
- if (!a.isPlainObject(o) && Er(o))
672
- return r.pop(), o;
673
- i = /* @__PURE__ */ Object.create(null);
674
- for (const [c, l] of Object.entries(o)) {
675
- const d = n.has(c.toLowerCase()) ? Pe : s(l);
676
- a.isUndefined(d) || (i[c] = d);
677
- }
678
- }
679
- return r.pop(), i;
680
- };
681
- return s(e);
682
- }
683
- function ct(e) {
684
- try {
685
- return String(e);
686
- } catch {
687
- return "";
688
- }
689
- }
690
- function Or(e) {
691
- return e.errors.map((n) => {
692
- try {
693
- return n && n.message ? ct(n.message) : ct(n);
694
- } catch {
695
- return "";
696
- }
697
- }).filter(Boolean).join("; ") || e.name || "AggregateError";
698
- }
699
- let h = class qt extends Error {
700
- static from(t, n, r, s, o, i) {
701
- let c = t.message;
702
- !c && a.isArray(t.errors) && t.errors.length && (c = Or(t));
703
- const l = new qt(c, n || t.code, r, s, o);
704
- return Object.defineProperty(l, "cause", {
705
- __proto__: null,
706
- value: t,
707
- writable: !0,
708
- enumerable: !1,
709
- configurable: !0
710
- }), l.name = t.name, t.status != null && l.status == null && (l.status = t.status), i && Object.assign(l, i), l;
711
- }
712
- /**
713
- * Create an Error with the specified message, config, error code, request and response.
714
- *
715
- * @param {string} message The error message.
716
- * @param {string} [code] The error code (for example, 'ECONNABORTED').
717
- * @param {Object} [config] The config.
718
- * @param {Object} [request] The request.
719
- * @param {Object} [response] The response.
720
- *
721
- * @returns {Error} The created error.
722
- */
723
- constructor(t, n, r, s, o) {
724
- super(t), Object.defineProperty(this, "message", {
725
- // Null-proto descriptor so a polluted Object.prototype.get cannot turn
726
- // this data descriptor into an accessor descriptor on the way in.
727
- __proto__: null,
728
- value: t,
729
- enumerable: !0,
730
- writable: !0,
731
- configurable: !0
732
- }), this.name = "AxiosError", this.isAxiosError = !0, n && (this.code = n), r && (this.config = r), s && (this.request = s), o && (this.response = o, this.status = o.status);
733
- }
734
- toJSON() {
735
- const t = this.config, n = t && a.hasOwnProp(t, "redact") ? t.redact : void 0, r = a.isArray(n) && n.length > 0 ? Rr(t, n) : a.toJSONObject(t);
736
- return {
737
- // Standard
738
- message: this.message,
739
- name: this.name,
740
- // Microsoft
741
- description: this.description,
742
- number: this.number,
743
- // Mozilla
744
- fileName: this.fileName,
745
- lineNumber: this.lineNumber,
746
- columnNumber: this.columnNumber,
747
- stack: this.stack,
748
- // Axios
749
- config: r,
750
- code: this.code,
751
- status: this.status
752
- };
753
- }
754
- };
755
- h.ERR_BAD_OPTION_VALUE = "ERR_BAD_OPTION_VALUE";
756
- h.ERR_BAD_OPTION = "ERR_BAD_OPTION";
757
- h.ECONNABORTED = "ECONNABORTED";
758
- h.ETIMEDOUT = "ETIMEDOUT";
759
- h.ECONNREFUSED = "ECONNREFUSED";
760
- h.ERR_NETWORK = "ERR_NETWORK";
761
- h.ERR_FR_TOO_MANY_REDIRECTS = "ERR_FR_TOO_MANY_REDIRECTS";
762
- h.ERR_DEPRECATED = "ERR_DEPRECATED";
763
- h.ERR_BAD_RESPONSE = "ERR_BAD_RESPONSE";
764
- h.ERR_BAD_REQUEST = "ERR_BAD_REQUEST";
765
- h.ERR_CANCELED = "ERR_CANCELED";
766
- h.ERR_NOT_SUPPORT = "ERR_NOT_SUPPORT";
767
- h.ERR_INVALID_URL = "ERR_INVALID_URL";
768
- h.ERR_FORM_DATA_DEPTH_EXCEEDED = "ERR_FORM_DATA_DEPTH_EXCEEDED";
769
- const Sr = null, Ht = 100;
770
- function ze(e) {
771
- return a.isPlainObject(e) || a.isArray(e);
772
- }
773
- function $t(e) {
774
- return a.endsWith(e, "[]") ? e.slice(0, -2) : e;
775
- }
776
- function ke(e, t, n) {
777
- return e ? e.concat(t).map(function(s, o) {
778
- return s = $t(s), !n && o ? "[" + s + "]" : s;
779
- }).join(n ? "." : "") : t;
780
- }
781
- function Ar(e) {
782
- return a.isArray(e) && !e.some(ze);
783
- }
784
- const _r = a.toFlatObject(a, {}, null, function(t) {
785
- return /^is[A-Z]/.test(t);
786
- });
787
- function Ne(e, t, n) {
788
- if (!a.isObject(e))
789
- throw new TypeError("target must be an object");
790
- t = t || new FormData();
791
- const r = (m, g) => {
792
- const b = a.getSafeProp(n, m);
793
- return a.isUndefined(b) ? g : b;
794
- }, s = r("metaTokens", !0), o = r("visitor") || S, i = r("dots", !1), c = r("indexes", !1), l = r("Blob") || typeof Blob < "u" && Blob, d = r("maxDepth", Ht), u = l && a.isSpecCompliantForm(t), p = [];
795
- if (!a.isFunction(o))
796
- throw new TypeError("visitor must be a function");
797
- function y(m) {
798
- if (m === null) return "";
799
- if (a.isDate(m))
800
- return m.toISOString();
801
- if (a.isBoolean(m))
802
- return m.toString();
803
- if (!u && a.isBlob(m))
804
- throw new h("Blob is not supported. Use a Buffer instead.");
805
- if (a.isArrayBuffer(m) || a.isTypedArray(m)) {
806
- if (u && typeof l == "function")
807
- return new l([m]);
808
- throw new h(
809
- "Blob is not supported. Use a Buffer instead.",
810
- h.ERR_NOT_SUPPORT
811
- );
812
- }
813
- return m;
814
- }
815
- function E(m) {
816
- if (m > d)
817
- throw new h(
818
- "Object is too deeply nested (" + m + " levels). Max depth: " + d,
819
- h.ERR_FORM_DATA_DEPTH_EXCEEDED
820
- );
821
- }
822
- function R(m, g) {
823
- if (d === 1 / 0)
824
- return JSON.stringify(m);
825
- const b = [];
826
- return JSON.stringify(m, function(N, A) {
827
- if (!a.isObject(A))
828
- return A;
829
- for (; b.length && b[b.length - 1] !== this; )
830
- b.pop();
831
- return b.push(A), E(g + b.length - 1), A;
832
- });
833
- }
834
- function S(m, g, b) {
835
- let T = m;
836
- if (a.isReactNative(t) && a.isReactNativeBlob(m))
837
- return t.append(ke(b, g, i), y(m)), !1;
838
- if (m && !b && typeof m == "object") {
839
- if (a.endsWith(g, "{}"))
840
- g = s ? g : g.slice(0, -2), m = R(m, 1);
841
- else if (a.isArray(m) && Ar(m) || (a.isFileList(m) || a.endsWith(g, "[]")) && (T = a.toArray(m)))
842
- return g = $t(g), T.forEach(function(A, k) {
843
- !(a.isUndefined(A) || A === null) && t.append(
844
- // eslint-disable-next-line no-nested-ternary
845
- c === !0 ? ke([g], k, i) : c === null ? g : g + "[]",
846
- y(A)
847
- );
848
- }), !1;
849
- }
850
- return ze(m) ? !0 : (t.append(ke(b, g, i), y(m)), !1);
851
- }
852
- const P = Object.assign(_r, {
853
- defaultVisitor: S,
854
- convertValue: y,
855
- isVisitable: ze
856
- });
857
- function f(m, g, b = 0) {
858
- if (!a.isUndefined(m)) {
859
- if (E(b), p.indexOf(m) !== -1)
860
- throw new Error("Circular reference detected in " + g.join("."));
861
- p.push(m), a.forEach(m, function(N, A) {
862
- (!(a.isUndefined(N) || N === null) && o.call(t, N, a.isString(A) ? A.trim() : A, g, P)) === !0 && f(N, g ? g.concat(A) : [A], b + 1);
863
- }), p.pop();
864
- }
865
- }
866
- if (!a.isObject(e))
867
- throw new TypeError("data must be an object");
868
- return f(e), t;
869
- }
870
- function lt(e) {
871
- const t = {
872
- "!": "%21",
873
- "'": "%27",
874
- "(": "%28",
875
- ")": "%29",
876
- "~": "%7E",
877
- "%20": "+"
878
- };
879
- return encodeURIComponent(e).replace(/[!'()~]|%20/g, function(r) {
880
- return t[r];
881
- });
882
- }
883
- function Ke(e, t) {
884
- this._pairs = [], e && Ne(e, this, t);
885
- }
886
- const Mt = Ke.prototype;
887
- Mt.append = function(t, n) {
888
- this._pairs.push([t, n]);
889
- };
890
- Mt.toString = function(t) {
891
- const n = t ? (r) => t.call(this, r, lt) : lt;
892
- return this._pairs.map(function(s) {
893
- return n(s[0]) + "=" + n(s[1]);
894
- }, "").join("&");
895
- };
896
- function Pr(e) {
897
- return encodeURIComponent(e).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+");
898
- }
899
- function vt(e, t, n) {
900
- if (!t)
901
- return e;
902
- e = e || "";
903
- const r = a.isFunction(n) ? {
904
- serialize: n
905
- } : n, s = a.getSafeProp(r, "encode") || Pr, o = a.getSafeProp(r, "serialize");
906
- let i;
907
- if (o ? i = o(t, r) : i = a.isURLSearchParams(t) ? t.toString() : new Ke(t, r).toString(s), i) {
908
- const c = e.indexOf("#");
909
- c !== -1 && (e = e.slice(0, c)), e += (e.indexOf("?") === -1 ? "?" : "&") + i;
910
- }
911
- return e;
912
- }
913
- const ue = Symbol("internals");
914
- function zt(e) {
915
- return e ? e.length : 0;
916
- }
917
- function ut(e) {
918
- if (e)
919
- for (; e.length && e[e.length - 1] === null; )
920
- e.pop();
921
- }
922
- function fe(e, t) {
923
- const n = e.handlers, r = zt(n);
924
- n !== t.handlersRef ? (t.handlersRef = n, t.handlerEntries.clear()) : r !== t.handlersLength && (r ? t.handlerEntries.forEach(function(o, i) {
925
- n[o.index] !== o.handler && t.handlerEntries.delete(i);
926
- }) : t.handlerEntries.clear()), t.handlersLength = r;
927
- }
928
- class ft {
929
- constructor() {
930
- this.handlers = [], this[ue] = {
931
- handlersRef: this.handlers,
932
- handlersLength: this.handlers.length,
933
- handlerEntries: /* @__PURE__ */ new Map(),
934
- iterationDepth: 0,
935
- nextId: 0
936
- };
937
- }
938
- /**
939
- * Add a new interceptor to the stack
940
- *
941
- * @param {Function} fulfilled The function to handle `then` for a `Promise`
942
- * @param {Function} rejected The function to handle `reject` for a `Promise`
943
- * @param {Object} options The options for the interceptor, synchronous and runWhen
944
- *
945
- * @return {Number} An ID used to remove interceptor later
946
- */
947
- use(t, n, r) {
948
- const s = {
949
- fulfilled: t,
950
- rejected: n,
951
- synchronous: r ? r.synchronous : !1,
952
- runWhen: r ? r.runWhen : null
953
- }, o = this[ue];
954
- this.handlers == null && (this.handlers = []), fe(this, o);
955
- const i = o.nextId++;
956
- return this.handlers.push(s), o.handlerEntries.set(i, {
957
- handler: s,
958
- index: this.handlers.length - 1
959
- }), o.handlersLength = this.handlers.length, i;
960
- }
961
- /**
962
- * Remove an interceptor from the stack
963
- *
964
- * @param {Number} id The ID that was returned by `use`
965
- *
966
- * @returns {void}
967
- */
968
- eject(t) {
969
- const n = this[ue];
970
- fe(this, n);
971
- const r = n.handlerEntries.get(t);
972
- if (r) {
973
- if (n.handlerEntries.delete(t), this.handlers[r.index] !== r.handler)
974
- return;
975
- this.handlers[r.index] = null, n.iterationDepth || (ut(this.handlers), n.handlersLength = this.handlers.length);
976
- }
977
- }
978
- /**
979
- * Clear all interceptors from the stack
980
- *
981
- * @returns {void}
982
- */
983
- clear() {
984
- this.handlers && (this.handlers = [], fe(this, this[ue]));
985
- }
986
- /**
987
- * Iterate over all the registered interceptors
988
- *
989
- * This method is particularly useful for skipping over any
990
- * interceptors that may have become `null` calling `eject`.
991
- *
992
- * @param {Function} fn The function to call for each interceptor
993
- *
994
- * @returns {void}
995
- */
996
- forEach(t) {
997
- const n = this[ue];
998
- fe(this, n), n.iterationDepth++;
999
- try {
1000
- a.forEach(this.handlers, function(s) {
1001
- s !== null && t(s);
1002
- });
1003
- } finally {
1004
- --n.iterationDepth || (fe(this, n), ut(this.handlers), n.handlersLength = zt(this.handlers));
1005
- }
1006
- }
1007
- }
1008
- const Xe = {
1009
- silentJSONParsing: !0,
1010
- forcedJSONParsing: !0,
1011
- clarifyTimeoutError: !1,
1012
- legacyInterceptorReqResOrdering: !0,
1013
- advertiseZstdAcceptEncoding: !1,
1014
- validateStatusUndefinedResolves: !0
1015
- }, Tr = typeof URLSearchParams < "u" ? URLSearchParams : Ke, xr = typeof FormData < "u" ? FormData : null, Cr = typeof Blob < "u" ? Blob : null, Nr = {
1016
- isBrowser: !0,
1017
- classes: {
1018
- URLSearchParams: Tr,
1019
- FormData: xr,
1020
- Blob: Cr
1021
- },
1022
- protocols: ["http", "https", "file", "blob", "url", "data"]
1023
- }, Ge = typeof window < "u" && typeof document < "u", We = typeof navigator == "object" && navigator || void 0, Dr = Ge && (!We || ["ReactNative", "NativeScript", "NS"].indexOf(We.product) < 0), Ur = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
1024
- self instanceof WorkerGlobalScope && typeof self.importScripts == "function", Lr = Ge && window.location.href || "http://localhost", Fr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1025
- __proto__: null,
1026
- hasBrowserEnv: Ge,
1027
- hasStandardBrowserEnv: Dr,
1028
- hasStandardBrowserWebWorkerEnv: Ur,
1029
- navigator: We,
1030
- origin: Lr
1031
- }, Symbol.toStringTag, { value: "Module" })), x = {
1032
- ...Fr,
1033
- ...Nr
1034
- };
1035
- function Br(e, t) {
1036
- return Ne(e, new x.classes.URLSearchParams(), {
1037
- visitor: function(n, r, s, o) {
1038
- return x.isNode && a.isBuffer(n) ? (this.append(r, n.toString("base64")), !1) : o.defaultVisitor.apply(this, arguments);
1039
- },
1040
- ...t
1041
- });
1042
- }
1043
- const dt = Ht;
1044
- function Wt(e) {
1045
- if (e > dt)
1046
- throw new h(
1047
- "FormData field is too deeply nested (" + e + " levels). Max depth: " + dt,
1048
- h.ERR_FORM_DATA_DEPTH_EXCEEDED
1049
- );
1050
- }
1051
- function jr(e) {
1052
- const t = [], n = /[^.[\]]+|\[([^.[\]]*)]/g;
1053
- let r;
1054
- for (; (r = n.exec(e)) !== null; )
1055
- Wt(t.length), t.push(r[0] === "[]" ? "" : r[1] || r[0]);
1056
- return t;
1057
- }
1058
- function Ir(e) {
1059
- const t = {}, n = Object.keys(e);
1060
- let r;
1061
- const s = n.length;
1062
- let o;
1063
- for (r = 0; r < s; r++)
1064
- o = n[r], t[o] = e[o];
1065
- return t;
1066
- }
1067
- function Vt(e) {
1068
- function t(n, r, s, o) {
1069
- Wt(o);
1070
- let i = n[o++];
1071
- if (i === "__proto__") return !0;
1072
- const c = Number.isFinite(+i), l = o >= n.length;
1073
- return i = !i && a.isArray(s) ? s.length : i, l ? (a.hasOwnProp(s, i) ? s[i] = a.isArray(s[i]) ? s[i].concat(r) : [s[i], r] : s[i] = r, !c) : ((!a.hasOwnProp(s, i) || !a.isObject(s[i])) && (s[i] = []), t(n, r, s[i], o) && a.isArray(s[i]) && (s[i] = Ir(s[i])), !c);
1074
- }
1075
- if (a.isFormData(e) && a.isFunction(e.entries)) {
1076
- const n = {};
1077
- return a.forEachEntry(e, (r, s) => {
1078
- t(jr(r), s, n, 0);
1079
- }), n;
1080
- }
1081
- return null;
1082
- }
1083
- const Jt = Object.freeze([
1084
- "get",
1085
- "delete",
1086
- "head",
1087
- "options",
1088
- "post",
1089
- "put",
1090
- "patch",
1091
- "purge",
1092
- "link",
1093
- "unlink",
1094
- "query"
1095
- ]), re = (e, t) => e != null && a.hasOwnProp(e, t) ? e[t] : void 0;
1096
- function kr(e, t, n) {
1097
- if (a.isString(e))
1098
- try {
1099
- return (t || JSON.parse)(e), a.trim(e);
1100
- } catch (r) {
1101
- if (r.name !== "SyntaxError")
1102
- throw r;
1103
- }
1104
- return (n || JSON.stringify)(e);
1105
- }
1106
- const ye = {
1107
- transitional: Xe,
1108
- adapter: ["xhr", "http", "fetch"],
1109
- transformRequest: [
1110
- function(t, n) {
1111
- const r = n.getContentType() || "", s = r.indexOf("application/json") > -1, o = a.isObject(t);
1112
- if (o && a.isHTMLForm(t) && (t = new FormData(t)), a.isFormData(t))
1113
- return s ? JSON.stringify(Vt(t)) : t;
1114
- if (a.isArrayBuffer(t) || a.isBuffer(t) || a.isStream(t) || a.isFile(t) || a.isBlob(t) || a.isReadableStream(t))
1115
- return t;
1116
- if (a.isArrayBufferView(t))
1117
- return t.buffer;
1118
- if (a.isURLSearchParams(t))
1119
- return n.setContentType("application/x-www-form-urlencoded;charset=utf-8", !1), t.toString();
1120
- let c;
1121
- if (o) {
1122
- const l = re(this, "formSerializer");
1123
- if (r.indexOf("application/x-www-form-urlencoded") > -1)
1124
- return Br(t, l).toString();
1125
- if ((c = a.isFileList(t)) || r.indexOf("multipart/form-data") > -1) {
1126
- const d = re(this, "env"), u = d && d.FormData;
1127
- return Ne(
1128
- c ? { "files[]": t } : t,
1129
- u && new u(),
1130
- l
1131
- );
1132
- }
1133
- }
1134
- return o || s ? (n.setContentType("application/json", !1), kr(t)) : t;
1135
- }
1136
- ],
1137
- transformResponse: [
1138
- function(t) {
1139
- const n = re(this, "transitional") || ye.transitional, r = n && n.forcedJSONParsing, s = re(this, "responseType"), o = s === "json";
1140
- if (a.isResponse(t) || a.isReadableStream(t))
1141
- return t;
1142
- if (t && a.isString(t) && (r && !s || o)) {
1143
- const c = !(n && n.silentJSONParsing) && o;
1144
- try {
1145
- return JSON.parse(t, re(this, "parseReviver"));
1146
- } catch (l) {
1147
- if (c)
1148
- throw l.name === "SyntaxError" ? h.from(l, h.ERR_BAD_RESPONSE, this, null, re(this, "response")) : l;
1149
- }
1150
- }
1151
- return t;
1152
- }
1153
- ],
1154
- /**
1155
- * A timeout in milliseconds to abort a request. If set to 0 (default) a
1156
- * timeout is not created.
1157
- */
1158
- timeout: 0,
1159
- xsrfCookieName: "XSRF-TOKEN",
1160
- xsrfHeaderName: "X-XSRF-TOKEN",
1161
- maxContentLength: -1,
1162
- maxBodyLength: -1,
1163
- env: {
1164
- FormData: x.classes.FormData,
1165
- Blob: x.classes.Blob
1166
- },
1167
- validateStatus: function(t) {
1168
- return t >= 200 && t < 300;
1169
- },
1170
- headers: {
1171
- common: {
1172
- Accept: "application/json, text/plain, */*",
1173
- "Content-Type": void 0
1174
- }
1175
- }
1176
- };
1177
- a.forEach(Jt, (e) => {
1178
- ye.headers[e] = {};
1179
- });
1180
- function qe(e, t) {
1181
- const n = this || ye, r = t || n, s = L.from(r.headers);
1182
- let o = r.data;
1183
- return a.forEach(e, function(c) {
1184
- o = c.call(n, o, s.normalize(), t ? t.status : void 0);
1185
- }), s.normalize(), o;
1186
- }
1187
- function Kt(e) {
1188
- return !!(e && e.__CANCEL__);
1189
- }
1190
- let be = class extends h {
1191
- /**
1192
- * A `CanceledError` is an object that is thrown when an operation is canceled.
1193
- *
1194
- * @param {string=} message The message.
1195
- * @param {Object=} config The config.
1196
- * @param {Object=} request The request.
1197
- *
1198
- * @returns {CanceledError} The created error.
1199
- */
1200
- constructor(t, n, r) {
1201
- super(t ?? "canceled", h.ERR_CANCELED, n, r), this.name = "CanceledError", this.__CANCEL__ = !0;
1202
- }
1203
- };
1204
- function Xt(e, t, n) {
1205
- const r = n.config.validateStatus;
1206
- !n.status || !r || r(n.status) ? e(n) : t(new h(
1207
- "Request failed with status code " + n.status,
1208
- n.status >= 400 && n.status < 500 ? h.ERR_BAD_REQUEST : h.ERR_BAD_RESPONSE,
1209
- n.config,
1210
- n.request,
1211
- n
1212
- ));
1213
- }
1214
- const qr = /[\t\n\r]/g;
1215
- function Gt(e) {
1216
- if (typeof e != "string")
1217
- return e;
1218
- let t = 0;
1219
- for (; t < e.length && e.charCodeAt(t) <= 32; )
1220
- t++;
1221
- return e.slice(t).replace(qr, "");
1222
- }
1223
- function He(e) {
1224
- const t = /^([-+\w]{1,25}):(?:\/\/)?/.exec(e);
1225
- return t && t[1] || "";
1226
- }
1227
- function Hr(e, t) {
1228
- e = e || 10;
1229
- const n = new Array(e), r = new Array(e);
1230
- let s = 0, o = 0, i;
1231
- return t = t !== void 0 ? t : 1e3, function(l) {
1232
- const d = Date.now(), u = r[o];
1233
- i || (i = d), n[s] = l, r[s] = d;
1234
- let p = o, y = 0;
1235
- for (; p !== s; )
1236
- y += n[p++], p = p % e;
1237
- if (s = (s + 1) % e, s === o && (o = (o + 1) % e), d - i < t)
1238
- return;
1239
- const E = u && d - u;
1240
- return E ? Math.round(y * 1e3 / E) : void 0;
1241
- };
1242
- }
1243
- function $r(e, t) {
1244
- let n = 0, r = 1e3 / t, s, o;
1245
- const i = (u, p = Date.now()) => {
1246
- n = p, s = null, o && (clearTimeout(o), o = null), e(...u);
1247
- };
1248
- return [(...u) => {
1249
- const p = Date.now(), y = p - n;
1250
- y >= r ? i(u, p) : (s = u, o || (o = setTimeout(() => {
1251
- o = null, i(s);
1252
- }, r - y)));
1253
- }, () => s && i(s), (...u) => i(u)];
1254
- }
1255
- const Te = (e, t, n = 3) => {
1256
- let r = 0;
1257
- const s = Hr(50, 250);
1258
- return $r((o) => {
1259
- if (!o || !a.isNumber(o.loaded))
1260
- return;
1261
- const i = o.loaded, c = o.lengthComputable ? o.total : void 0, l = Math.max(0, c != null ? Math.min(i, c) : i), d = Math.max(0, l - r), u = s(d);
1262
- r = Math.max(r, l);
1263
- const p = {
1264
- loaded: l,
1265
- total: c,
1266
- progress: c ? l / c : void 0,
1267
- bytes: d,
1268
- rate: u || void 0,
1269
- estimated: u && c ? (c - l) / u : void 0,
1270
- event: o,
1271
- lengthComputable: c != null,
1272
- [t ? "download" : "upload"]: !0
1273
- };
1274
- e(p);
1275
- }, n);
1276
- }, pt = (e, t) => {
1277
- const n = e != null;
1278
- return [
1279
- (r) => t[0]({
1280
- lengthComputable: n,
1281
- total: e,
1282
- loaded: r
1283
- }),
1284
- t[1]
1285
- ];
1286
- }, ht = (e, t = a.asap) => (...n) => t(() => e(...n)), Mr = x.hasStandardBrowserEnv ? /* @__PURE__ */ ((e, t) => (n) => (n = new URL(n, x.origin), e.protocol === n.protocol && e.host === n.host && (t || e.port === n.port)))(
1287
- new URL(x.origin),
1288
- x.navigator && /(msie|trident)/i.test(x.navigator.userAgent)
1289
- ) : () => !0, vr = x.hasStandardBrowserEnv ? (
1290
- // Standard browser envs support document.cookie
1291
- {
1292
- write(e, t, n, r, s, o, i) {
1293
- if (typeof document > "u") return;
1294
- const c = [`${e}=${encodeURIComponent(t)}`];
1295
- a.isNumber(n) && c.push(`expires=${new Date(n).toUTCString()}`), a.isString(r) && c.push(`path=${r}`), a.isString(s) && c.push(`domain=${s}`), o === !0 && c.push("secure"), a.isString(i) && c.push(`SameSite=${i}`), document.cookie = c.join("; ");
1296
- },
1297
- read(e) {
1298
- if (typeof document > "u") return null;
1299
- const t = document.cookie.split(";");
1300
- for (let n = 0; n < t.length; n++) {
1301
- const r = t[n].replace(/^\s+/, ""), s = r.indexOf("=");
1302
- if (s !== -1 && r.slice(0, s) === e)
1303
- try {
1304
- return decodeURIComponent(r.slice(s + 1));
1305
- } catch {
1306
- return r.slice(s + 1);
1307
- }
1308
- }
1309
- return null;
1310
- },
1311
- remove(e) {
1312
- this.write(e, "", Date.now() - 864e5, "/");
1313
- }
1314
- }
1315
- ) : (
1316
- // Non-standard browser env (web workers, react-native) lack needed support.
1317
- {
1318
- write() {
1319
- },
1320
- read() {
1321
- return null;
1322
- },
1323
- remove() {
1324
- }
1325
- }
1326
- );
1327
- function zr(e) {
1328
- return typeof e != "string" ? !1 : /^([a-z][a-z\d+\-.]*:)?\/\//i.test(e);
1329
- }
1330
- function Wr(e, t) {
1331
- if (!t)
1332
- return e;
1333
- let n = e.length;
1334
- for (; n > 0 && e.charCodeAt(n - 1) === 47; )
1335
- n--;
1336
- return e.slice(0, n) + "/" + t.replace(/^\/+/, "");
1337
- }
1338
- const Vr = /^https?:(?!\/\/)/i;
1339
- function Jr(e) {
1340
- return e && e.replace(/(^|&)([^=&]*=)?[^&]+/g, (t, n, r = "") => `${n}${r}${Pe}`);
1341
- }
1342
- function Kr(e) {
1343
- const t = e.replace(/^(https?:\/{0,2})[^/?#]*@/i, `$1${Pe}@`), n = t.indexOf("#"), s = (n === -1 ? t : t.slice(0, n)).replace(
1344
- /([?&][^=&#]*=)[^&#]*/g,
1345
- `$1${Pe}`
1346
- );
1347
- return n === -1 ? s : `${s}#${Jr(t.slice(n + 1))}`;
1348
- }
1349
- function mt(e, t) {
1350
- if (typeof e == "string") {
1351
- const n = Gt(e);
1352
- if (Vr.test(n))
1353
- throw new h(
1354
- `Invalid URL ${JSON.stringify(Kr(n))}: missing "//" after protocol`,
1355
- h.ERR_INVALID_URL,
1356
- t
1357
- );
1358
- }
1359
- }
1360
- function Qt(e, t, n, r) {
1361
- mt(t, r);
1362
- let s = !zr(t);
1363
- return e && (s || n === !1) ? (mt(e, r), Wr(e, t)) : t;
1364
- }
1365
- const yt = (e) => e instanceof L ? { ...e } : e, Xr = (e) => Object.getOwnPropertySymbols && Object.getOwnPropertyDescriptor ? Object.keys(e).concat(
1366
- Object.getOwnPropertySymbols(e).filter(
1367
- (t) => Object.getOwnPropertyDescriptor(e, t).enumerable
1368
- )
1369
- ) : Object.keys(e);
1370
- function te(e, t) {
1371
- e = e || {}, t = t || {};
1372
- const n = /* @__PURE__ */ Object.create(null);
1373
- Object.defineProperty(n, "hasOwnProperty", {
1374
- // Null-proto descriptor so a polluted Object.prototype.get cannot turn
1375
- // this data descriptor into an accessor descriptor on the way in.
1376
- __proto__: null,
1377
- value: Object.prototype.hasOwnProperty,
1378
- enumerable: !1,
1379
- writable: !0,
1380
- configurable: !0
1381
- });
1382
- function r(u, p, y, E) {
1383
- return a.isPlainObject(u) && a.isPlainObject(p) ? a.merge.call({ caseless: E }, u, p) : a.isPlainObject(p) ? a.merge({}, p) : a.isArray(p) ? p.slice() : p;
1384
- }
1385
- function s(u, p, y, E) {
1386
- if (a.isUndefined(p)) {
1387
- if (!a.isUndefined(u))
1388
- return r(void 0, u, y, E);
1389
- } else return r(u, p, y, E);
1390
- }
1391
- function o(u, p) {
1392
- if (!a.isUndefined(p))
1393
- return r(void 0, p);
1394
- }
1395
- function i(u, p) {
1396
- if (a.isUndefined(p)) {
1397
- if (!a.isUndefined(u))
1398
- return r(void 0, u);
1399
- } else return r(void 0, p);
1400
- }
1401
- function c(u) {
1402
- const p = a.hasOwnProp(t, "transitional") ? t.transitional : void 0;
1403
- if (!a.isUndefined(p))
1404
- if (a.isPlainObject(p)) {
1405
- if (a.hasOwnProp(p, u))
1406
- return p[u];
1407
- } else
1408
- return;
1409
- const y = a.hasOwnProp(e, "transitional") ? e.transitional : void 0;
1410
- if (a.isPlainObject(y) && a.hasOwnProp(y, u))
1411
- return y[u];
1412
- }
1413
- function l(u, p, y) {
1414
- if (a.hasOwnProp(t, y))
1415
- return r(u, p);
1416
- if (a.hasOwnProp(e, y))
1417
- return r(void 0, u);
1418
- }
1419
- const d = {
1420
- url: o,
1421
- method: o,
1422
- data: o,
1423
- baseURL: i,
1424
- transformRequest: i,
1425
- transformResponse: i,
1426
- paramsSerializer: i,
1427
- timeout: i,
1428
- timeoutErrorMessage: i,
1429
- withCredentials: i,
1430
- withXSRFToken: i,
1431
- adapter: i,
1432
- responseType: i,
1433
- xsrfCookieName: i,
1434
- xsrfHeaderName: i,
1435
- onUploadProgress: i,
1436
- onDownloadProgress: i,
1437
- decompress: i,
1438
- maxContentLength: i,
1439
- maxBodyLength: i,
1440
- beforeRedirect: i,
1441
- transport: i,
1442
- httpAgent: i,
1443
- httpsAgent: i,
1444
- cancelToken: i,
1445
- socketPath: i,
1446
- allowedSocketPaths: i,
1447
- responseEncoding: i,
1448
- validateStatus: l,
1449
- headers: (u, p, y) => s(yt(u), yt(p), y, !0)
1450
- };
1451
- return a.forEach(Xr({ ...e, ...t }), function(p) {
1452
- if (p === "__proto__" || p === "constructor" || p === "prototype") return;
1453
- const y = a.hasOwnProp(d, p) ? d[p] : s, E = a.hasOwnProp(e, p) ? e[p] : void 0, R = a.hasOwnProp(t, p) ? t[p] : void 0, S = y(E, R, p);
1454
- a.isUndefined(S) && y !== l || (n[p] = S);
1455
- }), a.hasOwnProp(t, "validateStatus") && a.isUndefined(t.validateStatus) && c("validateStatusUndefinedResolves") === !1 && (a.hasOwnProp(e, "validateStatus") ? n.validateStatus = r(void 0, e.validateStatus) : delete n.validateStatus), n;
1456
- }
1457
- const Gr = ["content-type", "content-length"];
1458
- function Qr(e, t, n) {
1459
- if (n !== "content-only") {
1460
- e.set(t);
1461
- return;
1462
- }
1463
- Object.entries(t || {}).forEach(([r, s]) => {
1464
- Gr.includes(r.toLowerCase()) && e.set(r, s);
1465
- });
1466
- }
1467
- const Zr = (e) => encodeURIComponent(e).replace(
1468
- /%([0-9A-F]{2})/gi,
1469
- (t, n) => String.fromCharCode(parseInt(n, 16))
1470
- );
1471
- function Zt(e) {
1472
- const t = te({}, e), n = (y) => a.hasOwnProp(t, y) ? t[y] : void 0, r = n("data");
1473
- let s = n("withXSRFToken");
1474
- const o = n("xsrfHeaderName"), i = n("xsrfCookieName");
1475
- let c = n("headers");
1476
- const l = n("auth"), d = n("baseURL"), u = n("allowAbsoluteUrls"), p = n("url");
1477
- if (t.headers = c = L.from(c), t.url = vt(
1478
- Qt(d, p, u, t),
1479
- n("params"),
1480
- n("paramsSerializer")
1481
- ), l) {
1482
- const y = a.getSafeProp(l, "username") || "", E = a.getSafeProp(l, "password") || "";
1483
- try {
1484
- c.set(
1485
- "Authorization",
1486
- "Basic " + btoa(y + ":" + (E ? Zr(E) : ""))
1487
- );
1488
- } catch (R) {
1489
- throw h.from(R, h.ERR_BAD_OPTION_VALUE, e);
1490
- }
1491
- }
1492
- if (a.isFormData(r)) {
1493
- const y = a.getSafeProp(r, "getHeaders");
1494
- x.hasStandardBrowserEnv || x.hasStandardBrowserWebWorkerEnv || a.isReactNative(r) ? c.setContentType(void 0) : a.isFunction(y) && Qr(c, y.call(r), n("formDataHeaderPolicy"));
1495
- }
1496
- if (x.hasStandardBrowserEnv && (a.isFunction(s) && (s = s(t)), s === !0 || s == null && Mr(t.url))) {
1497
- const E = o && i && vr.read(i);
1498
- E && c.set(o, E);
1499
- }
1500
- return t;
1501
- }
1502
- const Yr = typeof XMLHttpRequest < "u", es = Yr && function(e) {
1503
- return new Promise(function(n, r) {
1504
- const s = Zt(e);
1505
- let o = s.data;
1506
- const i = L.from(s.headers).normalize();
1507
- let { responseType: c, onUploadProgress: l, onDownloadProgress: d } = s, u, p, y, E, R, S;
1508
- function P() {
1509
- E && E(), R && R(), s.cancelToken && s.cancelToken.unsubscribe(u), s.signal && s.signal.removeEventListener("abort", u);
1510
- }
1511
- let f = new XMLHttpRequest();
1512
- f.open(s.method.toUpperCase(), s.url, !0), f.timeout = s.timeout;
1513
- function m(b) {
1514
- if (!f)
1515
- return;
1516
- if (f.status === 0 && (He(Gt(s.url)) || He(x.origin)) !== "file" && !(f.responseURL && f.responseURL.startsWith("file:"))) {
1517
- r(new h("Request aborted", h.ECONNABORTED, e, f)), P(), f = null;
1518
- return;
1519
- }
1520
- try {
1521
- b ? S && S(b) : R && R();
1522
- } catch (k) {
1523
- setTimeout(() => {
1524
- throw k;
1525
- });
1526
- }
1527
- if (!f)
1528
- return;
1529
- const T = L.from(
1530
- "getAllResponseHeaders" in f && f.getAllResponseHeaders()
1531
- ), A = {
1532
- data: !c || c === "text" || c === "json" ? f.responseText : f.response,
1533
- status: f.status,
1534
- statusText: f.statusText,
1535
- headers: T,
1536
- config: e,
1537
- request: f
1538
- };
1539
- Xt(
1540
- function(K) {
1541
- n(K), P();
1542
- },
1543
- function(K) {
1544
- r(K), P();
1545
- },
1546
- A
1547
- ), f = null;
1548
- }
1549
- "onloadend" in f ? f.onloadend = m : f.onreadystatechange = function() {
1550
- !f || f.readyState !== 4 || f.status === 0 && !(f.responseURL && f.responseURL.startsWith("file:")) || setTimeout(m);
1551
- }, f.onabort = function() {
1552
- f && (r(new h("Request aborted", h.ECONNABORTED, e, f)), P(), f = null);
1553
- }, f.onerror = function(T) {
1554
- const N = T && T.message ? T.message : "Network Error", A = new h(N, h.ERR_NETWORK, e, f);
1555
- A.event = T || null, r(A), P(), f = null;
1556
- }, f.ontimeout = function() {
1557
- let T = s.timeout ? "timeout of " + s.timeout + "ms exceeded" : "timeout exceeded";
1558
- const N = s.transitional || Xe;
1559
- s.timeoutErrorMessage && (T = s.timeoutErrorMessage), r(
1560
- new h(
1561
- T,
1562
- N.clarifyTimeoutError ? h.ETIMEDOUT : h.ECONNABORTED,
1563
- e,
1564
- f
1565
- )
1566
- ), P(), f = null;
1567
- }, o === void 0 && i.setContentType(null), "setRequestHeader" in f && a.forEach(kt(i), function(T, N) {
1568
- f.setRequestHeader(N, T);
1569
- }), a.isUndefined(s.withCredentials) || (f.withCredentials = !!s.withCredentials), c && c !== "json" && (f.responseType = s.responseType), d && ([y, R, S] = Te(
1570
- d,
1571
- !0
1572
- ), f.addEventListener("progress", y)), l && f.upload && ([p, E] = Te(l), f.upload.addEventListener("progress", p), f.upload.addEventListener("loadend", E)), (s.cancelToken || s.signal) && (u = (b) => {
1573
- f && (r(!b || b.type ? new be(null, e, f) : b), f.abort(), P(), f = null);
1574
- }, s.cancelToken && s.cancelToken.subscribe(u), s.signal && (s.signal.aborted ? u() : s.signal.addEventListener("abort", u)));
1575
- const g = He(s.url);
1576
- if (g && !x.protocols.includes(g)) {
1577
- r(
1578
- new h(
1579
- "Unsupported protocol " + g + ":",
1580
- h.ERR_BAD_REQUEST,
1581
- e
1582
- )
1583
- ), P();
1584
- return;
1585
- }
1586
- f.send(o || null);
1587
- });
1588
- }, ts = (e, t) => {
1589
- if (e = e ? e.filter(Boolean) : [], !t && !e.length)
1590
- return;
1591
- const n = new AbortController();
1592
- let r = !1;
1593
- const s = function(l) {
1594
- if (!r) {
1595
- r = !0, i();
1596
- const d = l instanceof Error ? l : this.reason;
1597
- n.abort(
1598
- d instanceof h ? d : new be(d instanceof Error ? d.message : d)
1599
- );
1600
- }
1601
- };
1602
- let o = t && setTimeout(() => {
1603
- o = null, s(new h(`timeout of ${t}ms exceeded`, h.ETIMEDOUT));
1604
- }, t);
1605
- const i = () => {
1606
- e && (o && clearTimeout(o), o = null, e.forEach((l) => {
1607
- l.unsubscribe ? l.unsubscribe(s) : l.removeEventListener("abort", s);
1608
- }), e = null);
1609
- };
1610
- e.forEach((l) => {
1611
- if (!r) {
1612
- if (l.aborted) {
1613
- s.call(l);
1614
- return;
1615
- }
1616
- l.addEventListener("abort", s, { once: !0 });
1617
- }
1618
- });
1619
- const { signal: c } = n;
1620
- return c.unsubscribe = () => a.asap(i), c;
1621
- }, ns = function* (e, t) {
1622
- let n = e.byteLength;
1623
- if (n < t) {
1624
- yield e;
1625
- return;
1626
- }
1627
- let r = 0, s;
1628
- for (; r < n; )
1629
- s = r + t, yield e.slice(r, s), r = s;
1630
- }, rs = async function* (e, t) {
1631
- for await (const n of ss(e))
1632
- yield* ns(n, t);
1633
- }, ss = async function* (e) {
1634
- if (e[Symbol.asyncIterator]) {
1635
- yield* e;
1636
- return;
1637
- }
1638
- const t = e.getReader();
1639
- try {
1640
- for (; ; ) {
1641
- const { done: n, value: r } = await t.read();
1642
- if (n)
1643
- break;
1644
- yield r;
1645
- }
1646
- } finally {
1647
- await t.cancel();
1648
- }
1649
- }, bt = (e, t, n, r) => {
1650
- const s = rs(e, t);
1651
- let o = 0, i, c = (l) => {
1652
- i || (i = !0, r && r(l));
1653
- };
1654
- return new ReadableStream(
1655
- {
1656
- async pull(l) {
1657
- try {
1658
- const { done: d, value: u } = await s.next();
1659
- if (d) {
1660
- c(), l.close();
1661
- return;
1662
- }
1663
- let p = u.byteLength;
1664
- if (n) {
1665
- let y = o += p;
1666
- n(y);
1667
- }
1668
- l.enqueue(new Uint8Array(u));
1669
- } catch (d) {
1670
- throw c(d), d;
1671
- }
1672
- },
1673
- cancel(l) {
1674
- return c(l), s.return();
1675
- }
1676
- },
1677
- {
1678
- highWaterMark: 2
1679
- }
1680
- );
1681
- }, wt = (e) => e >= 48 && e <= 57 || e >= 65 && e <= 70 || e >= 97 && e <= 102, Yt = (e, t, n) => t + 2 < n && wt(e.charCodeAt(t + 1)) && wt(e.charCodeAt(t + 2)), gt = (e) => e <= 57 ? e - 48 : (e & 223) - 55, os = (e) => e >= 65 && e <= 90 || // A-Z
1682
- e >= 97 && e <= 122 || // a-z
1683
- e >= 48 && e <= 57 || // 0-9
1684
- e === 43 || // +
1685
- e === 47 || // /
1686
- e === 45 || // - (base64url)
1687
- e === 95, is = (e) => e === 9 || e === 10 || e === 12 || e === 13 || e === 32, as = (e) => {
1688
- const t = Math.floor(e / 4), n = e % 4;
1689
- return t * 3 + (n === 2 ? 1 : n === 3 ? 2 : 0);
1690
- }, cs = (e) => {
1691
- const t = e.length;
1692
- let n = 0;
1693
- return t > 0 && e.charCodeAt(t - 1) === 61 && (n++, t > 1 && e.charCodeAt(t - 2) === 61 && n++), Math.floor((t - n) * 3 / 4);
1694
- }, ls = (e) => {
1695
- const t = e.length;
1696
- let n = 0, r = 0, s = !1;
1697
- for (let o = 0; o < t; o++) {
1698
- let i = e.charCodeAt(o);
1699
- if (i === 37 && Yt(e, o, t) && (i = gt(e.charCodeAt(o + 1)) * 16 + gt(e.charCodeAt(o + 2)), o += 2), !is(i)) {
1700
- if (i === 61) {
1701
- r++;
1702
- continue;
1703
- }
1704
- if (!os(i) || r > 0) {
1705
- s = !0;
1706
- continue;
1707
- }
1708
- n++;
1709
- }
1710
- }
1711
- return s || r > 2 || r > 0 && (n + r) % 4 !== 0 || n % 4 === 1 ? cs(e) : as(n);
1712
- }, us = (e, t) => {
1713
- if (!e || typeof e != "string" || !e.startsWith("data:")) return 0;
1714
- const n = e.indexOf(",");
1715
- if (n < 0) return 0;
1716
- const r = e.slice(5, n), s = e.slice(n + 1);
1717
- if (/;base64/i.test(r))
1718
- return t(s);
1719
- let i = 0;
1720
- for (let c = 0, l = s.length; c < l; c++) {
1721
- const d = s.charCodeAt(c);
1722
- if (d === 37 && Yt(s, c, l))
1723
- i += 1, c += 2;
1724
- else if (d < 128)
1725
- i += 1;
1726
- else if (d < 2048)
1727
- i += 2;
1728
- else if (d >= 55296 && d <= 56319 && c + 1 < l) {
1729
- const u = s.charCodeAt(c + 1);
1730
- u >= 56320 && u <= 57343 ? (i += 4, c++) : i += 3;
1731
- } else
1732
- i += 3;
1733
- }
1734
- return i;
1735
- };
1736
- function fs(e) {
1737
- const t = typeof e == "string" ? e.indexOf("#") : -1;
1738
- return us(
1739
- t === -1 ? e : e.slice(0, t),
1740
- ls
1741
- );
1742
- }
1743
- const Qe = "1.20.0", Et = 64 * 1024, ds = {
1744
- cache: "default",
1745
- redirect: "follow",
1746
- referrer: "about:client",
1747
- referrerPolicy: "",
1748
- mode: "cors",
1749
- integrity: "",
1750
- keepalive: !1,
1751
- priority: "auto",
1752
- window: null
1753
- }, { isFunction: Re } = a, ps = (e) => encodeURIComponent(e).replace(
1754
- /%([0-9A-F]{2})/gi,
1755
- (t, n) => String.fromCharCode(parseInt(n, 16))
1756
- ), Rt = (e) => {
1757
- if (!a.isString(e))
1758
- return e;
1759
- try {
1760
- return decodeURIComponent(e);
1761
- } catch {
1762
- return e;
1763
- }
1764
- }, Ot = (e, ...t) => {
1765
- try {
1766
- return !!e(...t);
1767
- } catch {
1768
- return !1;
1769
- }
1770
- }, hs = (e) => {
1771
- const t = e.indexOf("://");
1772
- let n = e;
1773
- return t !== -1 && (n = n.slice(t + 3)), n.includes("@") || n.includes(":");
1774
- }, ms = (e) => {
1775
- const t = a.global !== void 0 && a.global !== null ? a.global : globalThis, { ReadableStream: n, TextEncoder: r } = t;
1776
- e = a.merge.call(
1777
- {
1778
- skipUndefined: !0
1779
- },
1780
- {
1781
- Request: t.Request,
1782
- Response: t.Response
1783
- },
1784
- e
1785
- );
1786
- const { fetch: s, Request: o, Response: i } = e, c = s ? Re(s) : typeof fetch == "function", l = Re(o), d = Re(i);
1787
- if (!c)
1788
- return !1;
1789
- const u = c && Re(n), p = c && (typeof r == "function" ? /* @__PURE__ */ ((f) => (m) => f.encode(m))(new r()) : async (f) => new Uint8Array(await new o(f).arrayBuffer())), y = l && u && Ot(() => {
1790
- let f = !1;
1791
- const m = new o(x.origin, {
1792
- body: new n(),
1793
- method: "POST",
1794
- get duplex() {
1795
- return f = !0, "half";
1796
- }
1797
- }), g = m.headers.has("Content-Type");
1798
- return m.body != null && m.body.cancel(), f && !g;
1799
- }), E = d && u && Ot(() => a.isReadableStream(new i("").body)), R = {
1800
- stream: E && ((f) => f.body)
1801
- };
1802
- c && ["text", "arrayBuffer", "blob", "formData", "stream"].forEach((f) => {
1803
- !R[f] && (R[f] = (m, g) => {
1804
- let b = m && m[f];
1805
- if (b)
1806
- return b.call(m);
1807
- throw new h(
1808
- `Response type '${f}' is not supported`,
1809
- h.ERR_NOT_SUPPORT,
1810
- g
1811
- );
1812
- });
1813
- });
1814
- const S = async (f) => {
1815
- if (f == null)
1816
- return 0;
1817
- if (a.isBlob(f))
1818
- return f.size;
1819
- if (a.isSpecCompliantForm(f))
1820
- return (await new o(x.origin, {
1821
- method: "POST",
1822
- body: f
1823
- }).arrayBuffer()).byteLength;
1824
- if (a.isArrayBufferView(f) || a.isArrayBuffer(f))
1825
- return f.byteLength;
1826
- if (a.isURLSearchParams(f) && (f = f + ""), a.isString(f))
1827
- return (await p(f)).byteLength;
1828
- }, P = async (f, m) => {
1829
- const g = a.toFiniteNumber(f.getContentLength());
1830
- return g ?? S(m);
1831
- };
1832
- return async (f) => {
1833
- let {
1834
- url: m,
1835
- method: g,
1836
- data: b,
1837
- signal: T,
1838
- cancelToken: N,
1839
- timeout: A,
1840
- onDownloadProgress: k,
1841
- onUploadProgress: K,
1842
- responseType: v,
1843
- headers: z,
1844
- withCredentials: we = "same-origin",
1845
- fetchOptions: Ue,
1846
- maxContentLength: q,
1847
- maxBodyLength: ge,
1848
- maxRedirects: on
1849
- } = Zt(f);
1850
- const ie = a.isNumber(q) && q > -1, Le = a.isNumber(ge) && ge > -1, an = (O) => a.hasOwnProp(f, O) ? f[O] : void 0;
1851
- let Ye = s || fetch;
1852
- v = v ? (v + "").toLowerCase() : "text";
1853
- let W = ts(
1854
- [T, N && N.toAbortSignal()],
1855
- A
1856
- ), C = null;
1857
- const X = W && W.unsubscribe && (() => {
1858
- W.unsubscribe();
1859
- });
1860
- let ne, ae = null;
1861
- const et = () => new h(
1862
- "Request body larger than maxBodyLength limit",
1863
- h.ERR_BAD_REQUEST,
1864
- f,
1865
- C
1866
- );
1867
- try {
1868
- let O;
1869
- const B = an("auth");
1870
- if (B) {
1871
- const w = a.getSafeProp(B, "username") || "", D = a.getSafeProp(B, "password") || "";
1872
- O = {
1873
- username: w,
1874
- password: D
1875
- };
1876
- }
1877
- if (hs(m)) {
1878
- const w = new URL(m, x.origin);
1879
- if (!O && (w.username || w.password)) {
1880
- const D = Rt(w.username), V = Rt(w.password);
1881
- O = {
1882
- username: D,
1883
- password: V
1884
- };
1885
- }
1886
- (w.username || w.password) && (w.username = "", w.password = "", m = w.href);
1887
- }
1888
- if (O && (z.delete("authorization"), z.set(
1889
- "Authorization",
1890
- "Basic " + btoa(ps((O.username || "") + ":" + (O.password || "")))
1891
- )), ie && typeof m == "string" && m.startsWith("data:") && fs(m) > q)
1892
- throw new h(
1893
- "maxContentLength size of " + q + " exceeded",
1894
- h.ERR_BAD_RESPONSE,
1895
- f,
1896
- C
1897
- );
1898
- if (Le && g !== "get" && g !== "head") {
1899
- const w = await S(b);
1900
- if (typeof w == "number" && isFinite(w) && (ne = w, w > ge))
1901
- throw et();
1902
- }
1903
- const Ee = Le && (a.isReadableStream(b) || a.isStream(b)), tt = (w, D, V) => bt(
1904
- w,
1905
- Et,
1906
- (G) => {
1907
- if (Le && G > ge)
1908
- throw ae = et();
1909
- D && D(G);
1910
- },
1911
- V
1912
- );
1913
- if (y && g !== "get" && g !== "head" && (K || Ee)) {
1914
- if (ne = ne ?? await P(z, b), ne !== 0 || Ee) {
1915
- let w = new o(m, {
1916
- method: "POST",
1917
- body: b,
1918
- duplex: "half"
1919
- }), D;
1920
- if (a.isFormData(b) && (D = w.headers.get("content-type")) && z.setContentType(D), w.body) {
1921
- const [V, G] = K && pt(
1922
- ne,
1923
- Te(ht(K))
1924
- ) || [];
1925
- b = tt(w.body, V, G);
1926
- }
1927
- }
1928
- } else if (Ee && !l && u && g !== "get" && g !== "head")
1929
- b = tt(b);
1930
- else if (Ee && l && !y && g !== "get" && g !== "head")
1931
- throw new h(
1932
- "Stream request bodies are not supported by the current fetch implementation",
1933
- h.ERR_NOT_SUPPORT,
1934
- f,
1935
- C
1936
- );
1937
- a.isString(we) || (we = we ? "include" : "omit");
1938
- const cn = l && "credentials" in o.prototype;
1939
- if (a.isFormData(b)) {
1940
- const w = z.getContentType();
1941
- w && /^multipart\/form-data/i.test(w) && !/boundary=/i.test(w) && z.delete("content-type");
1942
- }
1943
- z.set("User-Agent", "axios/" + Qe, !1);
1944
- const I = Ue == null ? Ue : Object.assign(/* @__PURE__ */ Object.create(null), Ue);
1945
- I && (delete I.body, delete I.headers, delete I.method, delete I.signal, delete I.duplex, delete I.credentials);
1946
- const H = Object.assign(/* @__PURE__ */ Object.create(null), I, {
1947
- signal: W,
1948
- method: g.toUpperCase(),
1949
- headers: kt(z.normalize()),
1950
- body: b,
1951
- duplex: "half",
1952
- credentials: cn ? we : void 0
1953
- });
1954
- l && (a.forEach(ds, (w, D) => {
1955
- H[D] === void 0 && (H[D] = w);
1956
- }), H.signal === void 0 && (H.signal = null), H.body === void 0 && (H.body = null)), on === 0 && (H.redirect = "manual", I && (I.redirect = "manual")), C = l && new o(m, H);
1957
- let $ = await (l ? Ye(C, I) : Ye(m, H));
1958
- const nt = L.from($.headers);
1959
- if (ie) {
1960
- const w = a.toFiniteNumber(nt.getContentLength());
1961
- if (w != null && w > q)
1962
- throw new h(
1963
- "maxContentLength size of " + q + " exceeded",
1964
- h.ERR_BAD_RESPONSE,
1965
- f,
1966
- C
1967
- );
1968
- }
1969
- const Fe = E && (v === "stream" || v === "response");
1970
- if (E && $.body && (k || ie || Fe && X)) {
1971
- const w = {};
1972
- ["status", "statusText", "headers"].forEach((ce) => {
1973
- w[ce] = $[ce];
1974
- });
1975
- const D = a.toFiniteNumber(nt.getContentLength()), [V, G] = k && pt(
1976
- D,
1977
- Te(ht(k), !0)
1978
- ) || [];
1979
- let rt = 0;
1980
- const ln = (ce) => {
1981
- if (ie && (rt = ce, rt > q))
1982
- throw new h(
1983
- "maxContentLength size of " + q + " exceeded",
1984
- h.ERR_BAD_RESPONSE,
1985
- f,
1986
- C
1987
- );
1988
- V && V(ce);
1989
- };
1990
- $ = new i(
1991
- bt($.body, Et, ln, () => {
1992
- G && G(), X && X();
1993
- }),
1994
- w
1995
- );
1996
- }
1997
- v = v || "text";
1998
- let M = await R[a.findKey(R, v) || "text"](
1999
- $,
2000
- f
2001
- );
2002
- if (ie && !E && !Fe) {
2003
- let w;
2004
- if (M != null && (typeof M.byteLength == "number" ? w = M.byteLength : typeof M.size == "number" ? w = M.size : typeof M == "string" && (w = typeof r == "function" ? new r().encode(M).byteLength : M.length)), typeof w == "number" && w > q)
2005
- throw new h(
2006
- "maxContentLength size of " + q + " exceeded",
2007
- h.ERR_BAD_RESPONSE,
2008
- f,
2009
- C
2010
- );
2011
- }
2012
- return !Fe && X && X(), await new Promise((w, D) => {
2013
- Xt(w, D, {
2014
- data: M,
2015
- headers: L.from($.headers),
2016
- status: $.status,
2017
- statusText: $.statusText,
2018
- config: f,
2019
- request: C
2020
- });
2021
- });
2022
- } catch (O) {
2023
- if (X && X(), W && W.aborted && W.reason instanceof h) {
2024
- const B = W.reason;
2025
- throw B.config = f, C && (B.request = C), O !== B && Object.defineProperty(B, "cause", {
2026
- __proto__: null,
2027
- value: O,
2028
- writable: !0,
2029
- enumerable: !1,
2030
- configurable: !0
2031
- }), B;
2032
- }
2033
- if (ae)
2034
- throw C && !ae.request && (ae.request = C), ae;
2035
- if (O instanceof h)
2036
- throw C && !O.request && (O.request = C), O;
2037
- if (O && O.name === "TypeError" && /Load failed|fetch/i.test(O.message)) {
2038
- const B = new h(
2039
- "Network Error",
2040
- h.ERR_NETWORK,
2041
- f,
2042
- C,
2043
- O && O.response
2044
- );
2045
- throw Object.defineProperty(B, "cause", {
2046
- __proto__: null,
2047
- value: O.cause || O,
2048
- writable: !0,
2049
- enumerable: !1,
2050
- configurable: !0
2051
- }), B;
2052
- }
2053
- throw h.from(O, O && O.code, f, C, O && O.response);
2054
- }
2055
- };
2056
- }, ys = /* @__PURE__ */ new Map(), en = (e) => {
2057
- let t = e && e.env || {};
2058
- const { fetch: n, Request: r, Response: s } = t, o = [r, s, n];
2059
- let i = o.length, c = i, l, d, u = ys;
2060
- for (; c--; )
2061
- l = o[c], d = u.get(l), d === void 0 && u.set(l, d = c ? /* @__PURE__ */ new Map() : ms(t)), u = d;
2062
- return d;
2063
- };
2064
- en();
2065
- const Ze = {
2066
- http: Sr,
2067
- xhr: es,
2068
- fetch: {
2069
- get: en
2070
- }
2071
- };
2072
- a.forEach(Ze, (e, t) => {
2073
- if (e) {
2074
- try {
2075
- Object.defineProperty(e, "name", { __proto__: null, value: t });
2076
- } catch {
2077
- }
2078
- Object.defineProperty(e, "adapterName", { __proto__: null, value: t });
2079
- }
2080
- });
2081
- const St = (e) => `- ${e}`, bs = (e) => a.isFunction(e) || e === null || e === !1;
2082
- function ws(e, t) {
2083
- e = a.isArray(e) ? e : [e];
2084
- const { length: n } = e;
2085
- let r, s;
2086
- const o = {};
2087
- for (let i = 0; i < n; i++) {
2088
- r = e[i];
2089
- let c;
2090
- if (s = r, !bs(r) && (s = Ze[(c = String(r)).toLowerCase()], s === void 0))
2091
- throw new h(`Unknown adapter '${c}'`);
2092
- if (s && (a.isFunction(s) || (s = s.get(t))))
2093
- break;
2094
- o[c || "#" + i] = s;
2095
- }
2096
- if (!s) {
2097
- const i = Object.entries(o).map(
2098
- ([l, d]) => `adapter ${l} ` + (d === !1 ? "is not supported by the environment" : "is not available in the build")
2099
- );
2100
- let c = n ? i.length > 1 ? `since :
2101
- ` + i.map(St).join(`
2102
- `) : " " + St(i[0]) : "as no adapter specified";
2103
- throw new h(
2104
- "There is no suitable adapter to dispatch the request " + c,
2105
- h.ERR_NOT_SUPPORT
2106
- );
2107
- }
2108
- return s;
2109
- }
2110
- const tn = {
2111
- /**
2112
- * Resolve an adapter from a list of adapter names or functions.
2113
- * @type {Function}
2114
- */
2115
- getAdapter: ws,
2116
- /**
2117
- * Exposes all known adapters
2118
- * @type {Object<string, Function|Object>}
2119
- */
2120
- adapters: Ze
2121
- };
2122
- function $e(e) {
2123
- if (e.cancelToken && e.cancelToken.throwIfRequested(), e.signal && e.signal.aborted)
2124
- throw new be(null, e);
2125
- }
2126
- function Me(e) {
2127
- const t = a.toSafeFlatObject(e);
2128
- return $e(t), t.headers = L.from(a.getSafeProp(t, "headers")), t.data = qe.call(t, t.transformRequest), ["post", "put", "patch"].indexOf(t.method) !== -1 && t.headers.setContentType("application/x-www-form-urlencoded", !1), tn.getAdapter(t.adapter || ye.adapter, t)(t).then(
2129
- function(s) {
2130
- $e(t), t.response = s;
2131
- try {
2132
- s.data = qe.call(t, t.transformResponse, s);
2133
- } finally {
2134
- delete t.response;
2135
- }
2136
- return s.headers = L.from(s.headers), s;
2137
- },
2138
- function(s) {
2139
- if (!Kt(s) && ($e(t), s && s.response)) {
2140
- t.response = s.response;
2141
- try {
2142
- s.response.data = qe.call(
2143
- t,
2144
- t.transformResponse,
2145
- s.response
2146
- );
2147
- } finally {
2148
- delete t.response;
2149
- }
2150
- s.response.headers = L.from(s.response.headers);
2151
- }
2152
- return Promise.reject(s);
2153
- }
2154
- );
2155
- }
2156
- const De = {};
2157
- ["object", "boolean", "number", "function", "string", "symbol"].forEach((e, t) => {
2158
- De[e] = function(r) {
2159
- return typeof r === e || "a" + (t < 1 ? "n " : " ") + e;
2160
- };
2161
- });
2162
- const At = {};
2163
- De.transitional = function(t, n, r) {
2164
- function s(o, i) {
2165
- return "[Axios v" + Qe + "] Transitional option '" + o + "'" + i + (r ? ". " + r : "");
2166
- }
2167
- return (o, i, c) => {
2168
- if (t === !1)
2169
- throw new h(
2170
- s(i, " has been removed" + (n ? " in " + n : "")),
2171
- h.ERR_DEPRECATED
2172
- );
2173
- return n && !At[i] && (At[i] = !0, console.warn(
2174
- s(
2175
- i,
2176
- " has been deprecated since v" + n + " and will be removed in the near future"
2177
- )
2178
- )), t ? t(o, i, c) : !0;
2179
- };
2180
- };
2181
- De.spelling = function(t) {
2182
- return (n, r) => (console.warn(`${r} is likely a misspelling of ${t}`), !0);
2183
- };
2184
- function gs(e, t, n) {
2185
- if (typeof e != "object" || e === null)
2186
- throw new h("options must be an object", h.ERR_BAD_OPTION_VALUE);
2187
- const r = Object.keys(e);
2188
- let s = r.length;
2189
- for (; s-- > 0; ) {
2190
- const o = r[s], i = Object.prototype.hasOwnProperty.call(t, o) ? t[o] : void 0;
2191
- if (i) {
2192
- const c = e[o], l = c === void 0 || i(c, o, e);
2193
- if (l !== !0)
2194
- throw new h(
2195
- "option " + o + " must be " + l,
2196
- h.ERR_BAD_OPTION_VALUE
2197
- );
2198
- continue;
2199
- }
2200
- if (n !== !0)
2201
- throw new h("Unknown option " + o, h.ERR_BAD_OPTION);
2202
- }
2203
- }
2204
- const Ae = {
2205
- assertOptions: gs,
2206
- validators: De
2207
- }, U = Ae.validators;
2208
- let Z = class {
2209
- constructor(t) {
2210
- this.defaults = t || {}, this.interceptors = {
2211
- request: new ft(),
2212
- response: new ft()
2213
- };
2214
- }
2215
- /**
2216
- * Dispatch a request
2217
- *
2218
- * @param {String|Object} configOrUrl The config specific for this request (merged with this.defaults)
2219
- * @param {?Object} config
2220
- *
2221
- * @returns {Promise} The Promise to be fulfilled
2222
- */
2223
- async request(t, n) {
2224
- try {
2225
- return await this._request(t, n);
2226
- } catch (r) {
2227
- if (r instanceof Error)
2228
- try {
2229
- let s = {};
2230
- Error.captureStackTrace ? Error.captureStackTrace(s) : s = new Error();
2231
- const o = s.stack;
2232
- let i = "";
2233
- if (typeof o == "string") {
2234
- const c = o.indexOf(`
2235
- `);
2236
- i = c === -1 ? "" : o.slice(c + 1);
2237
- }
2238
- if (!r.stack)
2239
- r.stack = i;
2240
- else if (i) {
2241
- const c = i.indexOf(`
2242
- `), l = c === -1 ? -1 : i.indexOf(`
2243
- `, c + 1), d = l === -1 ? "" : i.slice(l + 1);
2244
- String(r.stack).endsWith(d) || (r.stack += `
2245
- ` + i);
2246
- }
2247
- } catch {
2248
- }
2249
- throw r;
2250
- }
2251
- }
2252
- _request(t, n) {
2253
- typeof t == "string" ? (n = n || {}, n.url = t) : n = t || {}, n = te(this.defaults, n);
2254
- const { transitional: r, paramsSerializer: s, headers: o } = n;
2255
- r !== void 0 && Ae.assertOptions(
2256
- r,
2257
- {
2258
- silentJSONParsing: U.transitional(U.boolean),
2259
- forcedJSONParsing: U.transitional(U.boolean),
2260
- clarifyTimeoutError: U.transitional(U.boolean),
2261
- legacyInterceptorReqResOrdering: U.transitional(U.boolean),
2262
- advertiseZstdAcceptEncoding: U.transitional(U.boolean),
2263
- validateStatusUndefinedResolves: U.transitional(U.boolean)
2264
- },
2265
- !1
2266
- ), s != null && (a.isFunction(s) ? n.paramsSerializer = {
2267
- serialize: s
2268
- } : Ae.assertOptions(
2269
- s,
2270
- {
2271
- encode: U.function,
2272
- serialize: U.function
2273
- },
2274
- !0
2275
- )), n.allowAbsoluteUrls !== void 0 || (this.defaults.allowAbsoluteUrls !== void 0 ? n.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls : n.allowAbsoluteUrls = !0), Ae.assertOptions(
2276
- n,
2277
- {
2278
- baseUrl: U.spelling("baseURL"),
2279
- withXsrfToken: U.spelling("withXSRFToken")
2280
- },
2281
- !0
2282
- ), n.method = (a.getSafeProp(n, "method") || a.getSafeProp(this.defaults, "method") || "get").toLowerCase();
2283
- let i = o && a.merge(o.common, o[n.method]);
2284
- o && a.forEach(Jt.concat("common"), (R) => {
2285
- delete o[R];
2286
- }), n.headers = L.concat(i, o);
2287
- const c = [];
2288
- let l = !0;
2289
- this.interceptors.request.forEach(function(S) {
2290
- if (typeof S.runWhen == "function" && S.runWhen(n) === !1)
2291
- return;
2292
- l = l && S.synchronous;
2293
- const P = n.transitional || Xe;
2294
- P && P.legacyInterceptorReqResOrdering ? c.unshift(S.fulfilled, S.rejected) : c.push(S.fulfilled, S.rejected);
2295
- });
2296
- const d = [];
2297
- this.interceptors.response.forEach(function(S) {
2298
- d.push(S.fulfilled, S.rejected);
2299
- });
2300
- let u, p = 0, y;
2301
- if (!l) {
2302
- const R = [Me.bind(this), void 0];
2303
- for (R.unshift(...c), R.push(...d), y = R.length, u = Promise.resolve(n); p < y; )
2304
- u = u.then(R[p++], R[p++]);
2305
- return u;
2306
- }
2307
- y = c.length;
2308
- let E = n;
2309
- for (; p < y; ) {
2310
- const R = c[p++], S = c[p++];
2311
- try {
2312
- E = R ? R(E) : E;
2313
- } catch (P) {
2314
- if (!S) {
2315
- u = Promise.reject(P);
2316
- break;
2317
- }
2318
- try {
2319
- const f = S.call(this, P);
2320
- a.isThenable(f) && (u = Promise.resolve(f).then(
2321
- () => Me.call(this, E)
2322
- ));
2323
- } catch (f) {
2324
- u = Promise.reject(f);
2325
- }
2326
- break;
2327
- }
2328
- }
2329
- if (!u)
2330
- try {
2331
- u = Me.call(this, E);
2332
- } catch (R) {
2333
- u = Promise.reject(R);
2334
- }
2335
- for (p = 0, y = d.length; p < y; )
2336
- u = u.then(d[p++], d[p++]);
2337
- return u;
2338
- }
2339
- getUri(t) {
2340
- t = te(this.defaults, t);
2341
- const n = Qt(t.baseURL, t.url, t.allowAbsoluteUrls, t);
2342
- return vt(n, t.params, t.paramsSerializer);
2343
- }
2344
- };
2345
- a.forEach(["delete", "get", "head", "options"], function(t) {
2346
- Z.prototype[t] = function(n, r) {
2347
- return this.request(
2348
- te(r || {}, {
2349
- method: t,
2350
- url: n,
2351
- data: r && a.hasOwnProp(r, "data") ? r.data : void 0
2352
- })
2353
- );
2354
- };
2355
- });
2356
- a.forEach(["post", "put", "patch", "query"], function(t) {
2357
- function n(r) {
2358
- return function(o, i, c) {
2359
- return this.request(
2360
- te(c || {}, {
2361
- method: t,
2362
- headers: r ? {
2363
- "Content-Type": "multipart/form-data"
2364
- } : {},
2365
- url: o,
2366
- data: i
2367
- })
2368
- );
2369
- };
2370
- }
2371
- Z.prototype[t] = n(), t !== "query" && (Z.prototype[t + "Form"] = n(!0));
2372
- });
2373
- let Es = class nn {
2374
- constructor(t) {
2375
- if (typeof t != "function")
2376
- throw new TypeError("executor must be a function.");
2377
- let n;
2378
- this.promise = new Promise(function(o) {
2379
- n = o;
2380
- });
2381
- const r = this;
2382
- this.promise.then((s) => {
2383
- if (!r._listeners) return;
2384
- let o = r._listeners.length;
2385
- for (; o-- > 0; )
2386
- r._listeners[o](s);
2387
- r._listeners = null;
2388
- }), this.promise.then = (s) => {
2389
- let o;
2390
- const i = new Promise((c) => {
2391
- r.subscribe(c), o = c;
2392
- }).then(s);
2393
- return i.cancel = function() {
2394
- r.unsubscribe(o);
2395
- }, i;
2396
- }, t(function(o, i, c) {
2397
- r.reason || (r.reason = new be(o, i, c), n(r.reason));
2398
- });
2399
- }
2400
- /**
2401
- * Throws a `CanceledError` if cancellation has been requested.
2402
- */
2403
- throwIfRequested() {
2404
- if (this.reason)
2405
- throw this.reason;
2406
- }
2407
- /**
2408
- * Subscribe to the cancel signal
2409
- */
2410
- subscribe(t) {
2411
- if (this.reason) {
2412
- t(this.reason);
2413
- return;
2414
- }
2415
- this._listeners ? this._listeners.push(t) : this._listeners = [t];
2416
- }
2417
- /**
2418
- * Unsubscribe from the cancel signal
2419
- */
2420
- unsubscribe(t) {
2421
- if (!this._listeners)
2422
- return;
2423
- const n = this._listeners.indexOf(t);
2424
- n !== -1 && this._listeners.splice(n, 1);
2425
- }
2426
- toAbortSignal() {
2427
- const t = new AbortController(), n = (r) => {
2428
- t.abort(r);
2429
- };
2430
- return this.subscribe(n), t.signal.unsubscribe = () => this.unsubscribe(n), t.signal;
2431
- }
2432
- /**
2433
- * Returns an object that contains a new `CancelToken` and a function that, when called,
2434
- * cancels the `CancelToken`.
2435
- */
2436
- static source() {
2437
- let t;
2438
- return {
2439
- token: new nn(function(s) {
2440
- t = s;
2441
- }),
2442
- cancel: t
2443
- };
2444
- }
2445
- };
2446
- function Rs(e) {
2447
- return function(n) {
2448
- return e.apply(null, n);
2449
- };
2450
- }
2451
- function Os(e) {
2452
- return a.isObject(e) && e.isAxiosError === !0;
2453
- }
2454
- const _e = {
2455
- Continue: 100,
2456
- SwitchingProtocols: 101,
2457
- Processing: 102,
2458
- EarlyHints: 103,
2459
- Ok: 200,
2460
- Created: 201,
2461
- Accepted: 202,
2462
- NonAuthoritativeInformation: 203,
2463
- NoContent: 204,
2464
- ResetContent: 205,
2465
- PartialContent: 206,
2466
- MultiStatus: 207,
2467
- AlreadyReported: 208,
2468
- ImUsed: 226,
2469
- MultipleChoices: 300,
2470
- MovedPermanently: 301,
2471
- Found: 302,
2472
- SeeOther: 303,
2473
- NotModified: 304,
2474
- UseProxy: 305,
2475
- Unused: 306,
2476
- TemporaryRedirect: 307,
2477
- PermanentRedirect: 308,
2478
- BadRequest: 400,
2479
- Unauthorized: 401,
2480
- PaymentRequired: 402,
2481
- Forbidden: 403,
2482
- NotFound: 404,
2483
- MethodNotAllowed: 405,
2484
- NotAcceptable: 406,
2485
- ProxyAuthenticationRequired: 407,
2486
- RequestTimeout: 408,
2487
- Conflict: 409,
2488
- Gone: 410,
2489
- LengthRequired: 411,
2490
- PreconditionFailed: 412,
2491
- /**
2492
- * @deprecated Use `ContentTooLarge` instead.
2493
- */
2494
- PayloadTooLarge: 413,
2495
- ContentTooLarge: 413,
2496
- UriTooLong: 414,
2497
- UnsupportedMediaType: 415,
2498
- RangeNotSatisfiable: 416,
2499
- ExpectationFailed: 417,
2500
- ImATeapot: 418,
2501
- MisdirectedRequest: 421,
2502
- /**
2503
- * @deprecated Use `UnprocessableContent` instead.
2504
- */
2505
- UnprocessableEntity: 422,
2506
- UnprocessableContent: 422,
2507
- Locked: 423,
2508
- FailedDependency: 424,
2509
- TooEarly: 425,
2510
- UpgradeRequired: 426,
2511
- PreconditionRequired: 428,
2512
- TooManyRequests: 429,
2513
- RequestHeaderFieldsTooLarge: 431,
2514
- UnavailableForLegalReasons: 451,
2515
- InternalServerError: 500,
2516
- NotImplemented: 501,
2517
- BadGateway: 502,
2518
- ServiceUnavailable: 503,
2519
- GatewayTimeout: 504,
2520
- HttpVersionNotSupported: 505,
2521
- VariantAlsoNegotiates: 506,
2522
- InsufficientStorage: 507,
2523
- LoopDetected: 508,
2524
- NotExtended: 510,
2525
- NetworkAuthenticationRequired: 511,
2526
- WebServerReturnsAnUnknownError: 520,
2527
- WebServerIsDown: 521,
2528
- ConnectionTimedOut: 522,
2529
- OriginIsUnreachable: 523,
2530
- TimeoutOccurred: 524,
2531
- SslHandshakeFailed: 525,
2532
- InvalidSslCertificate: 526
2533
- };
2534
- Object.entries(_e).forEach(([e, t]) => {
2535
- _e[t] === void 0 && (_e[t] = e);
2536
- });
2537
- function rn(e) {
2538
- const t = new Z(e), n = Tt(Z.prototype.request, t);
2539
- return a.extend(n, Z.prototype, t, { allOwnKeys: !0 }), a.extend(n, t, null, { allOwnKeys: !0 }), n.create = function(s) {
2540
- return rn(te(e, s));
2541
- }, n;
2542
- }
2543
- const _ = rn(ye);
2544
- _.Axios = Z;
2545
- _.CanceledError = be;
2546
- _.CancelToken = Es;
2547
- _.isCancel = Kt;
2548
- _.VERSION = Qe;
2549
- _.toFormData = Ne;
2550
- _.AxiosError = h;
2551
- _.Cancel = _.CanceledError;
2552
- _.all = function(t) {
2553
- return Promise.all(t);
2554
- };
2555
- _.spread = Rs;
2556
- _.isAxiosError = Os;
2557
- _.mergeConfig = te;
2558
- _.AxiosHeaders = L;
2559
- _.formToJSON = (e) => Vt(a.isHTMLForm(e) ? new FormData(e) : e);
2560
- _.getAdapter = tn.getAdapter;
2561
- _.HttpStatusCode = _e;
2562
- _.default = _;
2563
- const {
2564
- Axios: Fs,
2565
- AxiosError: Ss,
2566
- CanceledError: Bs,
2567
- isCancel: js,
2568
- CancelToken: Is,
2569
- VERSION: ks,
2570
- all: qs,
2571
- Cancel: Hs,
2572
- isAxiosError: $s,
2573
- spread: Ms,
2574
- toFormData: vs,
2575
- AxiosHeaders: zs,
2576
- HttpStatusCode: Ws,
2577
- formToJSON: Vs,
2578
- getAdapter: Js,
2579
- mergeConfig: Ks,
2580
- create: Xs
2581
- } = _;
2582
- class As extends Error {
2583
- constructor(t, n) {
2584
- super(t), this.status = n, this.name = "ApiError";
2585
- }
2586
- }
2587
- const sn = (e) => (t) => {
2588
- var s;
2589
- const n = ((s = xe().sessionUser.value) == null ? void 0 : s.token) ?? dn.token;
2590
- if (!n) throw new Error("Invalid token");
2591
- const r = _.create({
2592
- baseURL: `${e}/${t}`,
2593
- headers: {
2594
- Authorization: `Bearer ${n}`
2595
- },
2596
- // NestJS @Query() reads repeated keys (key=a&key=b), not Axios default bracket notation (key[]=a).
2597
- paramsSerializer: (o) => {
2598
- const i = [];
2599
- for (const [c, l] of Object.entries(o))
2600
- if (l != null)
2601
- if (Array.isArray(l))
2602
- for (const d of l)
2603
- i.push(`${encodeURIComponent(c)}=${encodeURIComponent(d)}`);
2604
- else
2605
- i.push(`${encodeURIComponent(c)}=${encodeURIComponent(String(l))}`);
2606
- return i.join("&");
2607
- }
2608
- });
2609
- return r.interceptors.response.use(
2610
- (o) => o,
2611
- async (o) => {
2612
- var i, c;
2613
- if (o instanceof Ss) {
2614
- const l = (i = o.response) == null ? void 0 : i.data, d = (l == null ? void 0 : l.message) || (l == null ? void 0 : l.error) || `${o.message}` || `${o}`, u = ((c = o.response) == null ? void 0 : c.status) ?? 0;
2615
- return Promise.reject(new As(d, u));
2616
- }
2617
- return Promise.reject(o);
2618
- }
2619
- ), r;
2620
- }, _t = (e) => {
2621
- var n;
2622
- const t = xe();
2623
- if (t.currentBusiness.value) {
2624
- const r = `businesses/${(n = t.currentBusiness.value) == null ? void 0 : n.id}${e ? `/${e}` : ""}`;
2625
- return Pt(r);
2626
- } else
2627
- throw new Error("Invalid business");
2628
- }, Gs = () => {
2629
- var o;
2630
- const t = (o = xe().currentCountry.value) == null ? void 0 : o.toLowerCase(), r = "feedmeapidev.com", s = !t || t === "my" ? `https://query-engine.${r}` : `https://query-engine.${t}.${r}`;
2631
- return sn(s)("");
2632
- }, Qs = () => sn("https://account.feedmedev.cc/api")(""), Zs = () => Pt("user/bypass/validate/");
2633
- function _s(e) {
2634
- return e.data;
2635
- }
2636
- const Ps = {
2637
- async readRestaurants() {
2638
- return _s(await _t().get("/hr-restaurants"));
2639
- },
2640
- async saveOperationalHours(e, t) {
2641
- await _t(`restaurants/${e}/schedules`).patch(
2642
- "operational-hours",
2643
- { operatingHours: t }
2644
- );
2645
- }
2646
- }, Ts = un("hrm-restaurant", () => {
2647
- const { currentBusiness: e } = xe(), t = Be([]), n = Be(!1), r = Be(null);
2648
- let s = null, o = null;
2649
- async function i(c = !1) {
2650
- var u, p;
2651
- const l = ((u = e.value) == null ? void 0 : u._id) ?? ((p = e.value) == null ? void 0 : p.id) ?? null;
2652
- if (!l) {
2653
- t.value = [], r.value = null, s = null, o = null;
2654
- return;
2655
- }
2656
- if (r.value && r.value !== l && (t.value = [], r.value = null), o && o !== l && (s = null, o = null), !c && r.value === l) return;
2657
- if (!c && s && o === l)
2658
- return await s;
2659
- let d = null;
2660
- try {
2661
- n.value = !0, d = (async () => {
2662
- t.value = await Ps.readRestaurants(), r.value = l;
2663
- })(), s = d, o = l, await d;
2664
- } finally {
2665
- s === d && (s = null, o = null), n.value = !1;
2666
- }
2667
- }
2668
- return {
2669
- restaurants: t,
2670
- isLoading: n,
2671
- readRestaurants: i
2672
- };
2673
- }), Ys = () => {
2674
- const e = Ts();
2675
- return {
2676
- ...e,
2677
- ...fn(e)
2678
- };
2679
- };
2680
- export {
2681
- As as A,
2682
- Zs as a,
2683
- _t as b,
2684
- Qs as c,
2685
- _s as g,
2686
- Gs as q,
2687
- Ys as u
2688
- };