@das-fed/upf-utils 6.4.0-dev.124

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 (203) hide show
  1. package/__VLS_types.d.ts +124 -0
  2. package/api-services/i18n/index.d.ts +53 -0
  3. package/api-services/i18n/index.js +27 -0
  4. package/api-services/i18n/index.js.gz +0 -0
  5. package/api-services/index.d.ts +2 -0
  6. package/api-services/index.js +3141 -0
  7. package/api-services/index.js.gz +0 -0
  8. package/api-services/modules/app-manage/index.d.ts +2 -0
  9. package/api-services/modules/app-manage/index.js +2827 -0
  10. package/api-services/modules/app-manage/index.js.gz +0 -0
  11. package/api-services/modules/authentication/index.d.ts +2 -0
  12. package/api-services/modules/authentication/index.js +2827 -0
  13. package/api-services/modules/authentication/index.js.gz +0 -0
  14. package/api-services/modules/bems/index.d.ts +6 -0
  15. package/api-services/modules/bems/index.js +2831 -0
  16. package/api-services/modules/bems/index.js.gz +0 -0
  17. package/api-services/modules/contract/index.d.ts +2 -0
  18. package/api-services/modules/contract/index.js +2827 -0
  19. package/api-services/modules/contract/index.js.gz +0 -0
  20. package/api-services/modules/duty-manage/index.d.ts +7 -0
  21. package/api-services/modules/duty-manage/index.js +2836 -0
  22. package/api-services/modules/duty-manage/index.js.gz +0 -0
  23. package/api-services/modules/enterpriseright/index.d.ts +2 -0
  24. package/api-services/modules/enterpriseright/index.js +2827 -0
  25. package/api-services/modules/enterpriseright/index.js.gz +0 -0
  26. package/api-services/modules/file/index.d.ts +37 -0
  27. package/api-services/modules/file/index.js +3059 -0
  28. package/api-services/modules/file/index.js.gz +0 -0
  29. package/api-services/modules/gateway-edge/index.d.ts +2 -0
  30. package/api-services/modules/gateway-edge/index.js +2827 -0
  31. package/api-services/modules/gateway-edge/index.js.gz +0 -0
  32. package/api-services/modules/index.d.ts +21 -0
  33. package/api-services/modules/index.js +3115 -0
  34. package/api-services/modules/index.js.gz +0 -0
  35. package/api-services/modules/iot/index.d.ts +16 -0
  36. package/api-services/modules/iot/index.js +2841 -0
  37. package/api-services/modules/iot/index.js.gz +0 -0
  38. package/api-services/modules/justauth/index.d.ts +3 -0
  39. package/api-services/modules/justauth/index.js +2828 -0
  40. package/api-services/modules/justauth/index.js.gz +0 -0
  41. package/api-services/modules/knowledge/index.d.ts +2 -0
  42. package/api-services/modules/knowledge/index.js +2827 -0
  43. package/api-services/modules/knowledge/index.js.gz +0 -0
  44. package/api-services/modules/link/index.d.ts +2 -0
  45. package/api-services/modules/link/index.js +2827 -0
  46. package/api-services/modules/link/index.js.gz +0 -0
  47. package/api-services/modules/permission/index.d.ts +2 -0
  48. package/api-services/modules/permission/index.js +2827 -0
  49. package/api-services/modules/permission/index.js.gz +0 -0
  50. package/api-services/modules/platformManage/index.d.ts +14 -0
  51. package/api-services/modules/platformManage/index.js +2835 -0
  52. package/api-services/modules/platformManage/index.js.gz +0 -0
  53. package/api-services/modules/portal/index.d.ts +2 -0
  54. package/api-services/modules/portal/index.js +2827 -0
  55. package/api-services/modules/portal/index.js.gz +0 -0
  56. package/api-services/modules/space-manage/index.d.ts +2 -0
  57. package/api-services/modules/space-manage/index.js +2827 -0
  58. package/api-services/modules/space-manage/index.js.gz +0 -0
  59. package/api-services/modules/super-admin/index.d.ts +8 -0
  60. package/api-services/modules/super-admin/index.js +2830 -0
  61. package/api-services/modules/super-admin/index.js.gz +0 -0
  62. package/api-services/modules/supplier/index.d.ts +6 -0
  63. package/api-services/modules/supplier/index.js +2829 -0
  64. package/api-services/modules/supplier/index.js.gz +0 -0
  65. package/api-services/modules/supplychain-manage/index.d.ts +2 -0
  66. package/api-services/modules/supplychain-manage/index.js +2827 -0
  67. package/api-services/modules/supplychain-manage/index.js.gz +0 -0
  68. package/api-services/modules/systemConfiguration/index.d.ts +2 -0
  69. package/api-services/modules/systemConfiguration/index.js +2827 -0
  70. package/api-services/modules/systemConfiguration/index.js.gz +0 -0
  71. package/api-services/modules/tool/index.d.ts +2 -0
  72. package/api-services/modules/tool/index.js +2827 -0
  73. package/api-services/modules/tool/index.js.gz +0 -0
  74. package/api-services/src/create-service/index.d.ts +1 -0
  75. package/api-services/src/create-service/index.js +2827 -0
  76. package/api-services/src/create-service/index.js.gz +0 -0
  77. package/atob/index.d.ts +2 -0
  78. package/atob/index.js +11 -0
  79. package/common-info/getIframeUrl/index.d.ts +9 -0
  80. package/common-info/getIframeUrl/index.js +10 -0
  81. package/common-info/getInfoFromUrl/index.d.ts +8 -0
  82. package/common-info/getInfoFromUrl/index.js +84 -0
  83. package/common-info/getInfoFromUrl/index.js.gz +0 -0
  84. package/common-info/index.d.ts +61 -0
  85. package/common-info/index.js +171 -0
  86. package/common-info/index.js.gz +0 -0
  87. package/common-info/set-personal-info/index.d.ts +5 -0
  88. package/common-info/set-personal-info/index.js +1474 -0
  89. package/common-info/set-personal-info/index.js.gz +0 -0
  90. package/common-info/type.d.ts +214 -0
  91. package/common-tools/arr-tools/index.d.ts +15 -0
  92. package/common-tools/arr-tools/index.js +8 -0
  93. package/common-tools/calc-text-width/index.d.ts +1 -0
  94. package/common-tools/calc-text-width/index.js +10 -0
  95. package/common-tools/date-format/index.d.ts +7 -0
  96. package/common-tools/date-format/index.js +19 -0
  97. package/common-tools/extract-file-name/index.d.ts +1 -0
  98. package/common-tools/extract-file-name/index.js +1466 -0
  99. package/common-tools/extract-file-name/index.js.gz +0 -0
  100. package/common-tools/get-file-extension/index.d.ts +6 -0
  101. package/common-tools/get-file-extension/index.js +7 -0
  102. package/common-tools/get-url-params/index.d.ts +46 -0
  103. package/common-tools/get-url-params/index.js +63 -0
  104. package/common-tools/get-url-params/index.js.gz +0 -0
  105. package/common-tools/handle-data/index.d.ts +6 -0
  106. package/common-tools/handle-data/index.js +4 -0
  107. package/common-tools/index.d.ts +14 -0
  108. package/common-tools/index.js +14 -0
  109. package/common-tools/nest-tree-format/index.d.ts +30 -0
  110. package/common-tools/nest-tree-format/index.js +24 -0
  111. package/common-tools/obj-tools/index.d.ts +7 -0
  112. package/common-tools/obj-tools/index.js +14 -0
  113. package/common-tools/platform-tools/index.d.ts +19 -0
  114. package/common-tools/platform-tools/index.js +19 -0
  115. package/common-tools/queue-promise/index.d.ts +6 -0
  116. package/common-tools/queue-promise/index.js +9 -0
  117. package/common-tools/setHtmlMinWH/index.d.ts +5 -0
  118. package/common-tools/setHtmlMinWH/index.js +7 -0
  119. package/common-tools/update-browser-title/index.d.ts +1 -0
  120. package/common-tools/update-browser-title/index.js +12 -0
  121. package/common-tools/update-fav-icon/index.d.ts +11 -0
  122. package/common-tools/update-fav-icon/index.js +22 -0
  123. package/config/index.d.ts +2 -0
  124. package/config/index.js +9 -0
  125. package/create-api-service/i18n/index.d.ts +33 -0
  126. package/create-api-service/i18n/index.js +15 -0
  127. package/create-api-service/index.d.ts +3 -0
  128. package/create-api-service/index.js +2827 -0
  129. package/create-api-service/index.js.gz +0 -0
  130. package/create-api-service/proxy-sso/index.d.ts +3 -0
  131. package/create-api-service/proxy-sso/index.js +21 -0
  132. package/create-api-service/sso/index.d.ts +21 -0
  133. package/create-api-service/sso/index.js +1845 -0
  134. package/create-api-service/sso/index.js.gz +0 -0
  135. package/curring-http/index.d.ts +12 -0
  136. package/curring-http/index.js +2002 -0
  137. package/curring-http/index.js.gz +0 -0
  138. package/curring-http/type.d.ts +89 -0
  139. package/dimple-canvas/index.d.ts +3 -0
  140. package/dimple-canvas/index.js +5 -0
  141. package/directive/auth/index.d.ts +8 -0
  142. package/directive/auth/index.js +62 -0
  143. package/directive/auth/index.js.gz +0 -0
  144. package/directive/clickOutside/index.d.ts +6 -0
  145. package/directive/clickOutside/index.js +27 -0
  146. package/directive/hoverInside/index.d.ts +6 -0
  147. package/directive/hoverInside/index.js +21 -0
  148. package/directive/index.d.ts +3 -0
  149. package/directive/index.js +8 -0
  150. package/directive/utils/index.d.ts +7 -0
  151. package/directive/utils/index.js +7 -0
  152. package/dom-check-in/index.d.ts +6 -0
  153. package/dom-check-in/index.js +8 -0
  154. package/dom-watcher/index.d.ts +25 -0
  155. package/dom-watcher/index.js +9 -0
  156. package/esm-map.json +146 -0
  157. package/hooks/popup-manager/use-zindex/index.d.ts +3 -0
  158. package/hooks/popup-manager/use-zindex/index.js +9 -0
  159. package/hooks/use-get-auth/apis.d.ts +4 -0
  160. package/hooks/use-get-auth/index.d.ts +9 -0
  161. package/hooks/use-get-auth/index.js +53 -0
  162. package/hooks/use-get-auth/index.js.gz +0 -0
  163. package/index.d.ts +2 -0
  164. package/index.js +2 -0
  165. package/load-js/index.d.ts +3 -0
  166. package/load-js/index.js +12 -0
  167. package/nextTiken/index.d.ts +12 -0
  168. package/nextTiken/index.js +45 -0
  169. package/nextTiken/index.js.gz +0 -0
  170. package/oss/index.d.ts +2 -0
  171. package/oss/index.js +11 -0
  172. package/package.json +49 -0
  173. package/pinyin-first-character/index.d.ts +2 -0
  174. package/pinyin-first-character/index.js +25022 -0
  175. package/pinyin-first-character/index.js.gz +0 -0
  176. package/process-engine-info/index.d.ts +13 -0
  177. package/process-engine-info/index.js +15 -0
  178. package/pure-image-src/index.d.ts +2 -0
  179. package/pure-image-src/index.js +4 -0
  180. package/size-watcher/index.d.ts +6 -0
  181. package/size-watcher/index.js +20 -0
  182. package/style/index.d.ts +2 -0
  183. package/style/index.js +70 -0
  184. package/style/index.js.gz +0 -0
  185. package/style/math.d.ts +9 -0
  186. package/style/style.d.ts +31 -0
  187. package/token-tools/index.d.ts +21 -0
  188. package/token-tools/index.js +11 -0
  189. package/use-low-code/index.d.ts +1 -0
  190. package/use-low-code/index.js +69 -0
  191. package/use-low-code/index.js.gz +0 -0
  192. package/use-low-code/low-code-iframe.vue.d.ts +2 -0
  193. package/use-low-code/style.css +1 -0
  194. package/vue/hooks/use-model-value/index.d.ts +9 -0
  195. package/vue/hooks/use-model-value/index.js +10 -0
  196. package/vue/index.d.ts +1 -0
  197. package/vue/index.js +4 -0
  198. package/webSocket-service/index.d.ts +41 -0
  199. package/webSocket-service/index.js +83 -0
  200. package/webSocket-service/index.js.gz +0 -0
  201. package/webSocket-service/type.d.ts +28 -0
  202. package/with-install/index.d.ts +11 -0
  203. package/with-install/index.js +6 -0
@@ -0,0 +1,1845 @@
1
+ import { unref as ht, getCurrentScope as mt, onScopeDispose as yt, ref as V, watch as le } from "vue";
2
+ import { encryption as wt } from "@das-fed/upf-utils/atob";
3
+ import { getConfig as fe } from "@das-fed/upf-utils/config";
4
+ import { getUrlParams as ve, funcUrlDel as Et } from "@das-fed/upf-utils/common-tools";
5
+ import { getAccessToken as L, removeAccessToken as gt, setAccessToken as bt, getAccessTokenInfo as X } from "@das-fed/upf-utils/token-tools";
6
+ import { removeProcessEngineToken as St, setProcessEngineToken as Ot } from "@das-fed/upf-utils/process-engine-info";
7
+ import { setPersonalInfo as Ie } from "@das-fed/upf-utils/common-info/set-personal-info";
8
+ function Be(e, t) {
9
+ return function() {
10
+ return e.apply(t, arguments);
11
+ };
12
+ }
13
+ const { toString: Tt } = Object.prototype, { getPrototypeOf: de } = Object, W = /* @__PURE__ */ ((e) => (t) => {
14
+ const n = Tt.call(t);
15
+ return e[n] || (e[n] = n.slice(8, -1).toLowerCase());
16
+ })(/* @__PURE__ */ Object.create(null)), R = (e) => (e = e.toLowerCase(), (t) => W(t) === e), K = (e) => (t) => typeof t === e, { isArray: U } = Array, v = K("undefined");
17
+ function Rt(e) {
18
+ return e !== null && !v(e) && e.constructor !== null && !v(e.constructor) && S(e.constructor.isBuffer) && e.constructor.isBuffer(e);
19
+ }
20
+ const je = R("ArrayBuffer");
21
+ function At(e) {
22
+ let t;
23
+ return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && je(e.buffer), t;
24
+ }
25
+ const _t = K("string"), S = K("function"), He = K("number"), Q = (e) => e !== null && typeof e == "object", xt = (e) => e === !0 || e === !1, z = (e) => {
26
+ if (W(e) !== "object")
27
+ return !1;
28
+ const t = de(e);
29
+ return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(Symbol.toStringTag in e) && !(Symbol.iterator in e);
30
+ }, kt = R("Date"), Ct = R("File"), Pt = R("Blob"), Nt = R("FileList"), Ut = (e) => Q(e) && S(e.pipe), Dt = (e) => {
31
+ let t;
32
+ return e && (typeof FormData == "function" && e instanceof FormData || S(e.append) && ((t = W(e)) === "formdata" || // detect form-data instance
33
+ t === "object" && S(e.toString) && e.toString() === "[object FormData]"));
34
+ }, Ft = R("URLSearchParams"), Lt = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
35
+ function H(e, t, { allOwnKeys: n = !1 } = {}) {
36
+ if (e === null || typeof e > "u")
37
+ return;
38
+ let r, o;
39
+ if (typeof e != "object" && (e = [e]), U(e))
40
+ for (r = 0, o = e.length; r < o; r++)
41
+ t.call(null, e[r], r, e);
42
+ else {
43
+ const s = n ? Object.getOwnPropertyNames(e) : Object.keys(e), i = s.length;
44
+ let c;
45
+ for (r = 0; r < i; r++)
46
+ c = s[r], t.call(null, e[c], c, e);
47
+ }
48
+ }
49
+ function Me(e, t) {
50
+ t = t.toLowerCase();
51
+ const n = Object.keys(e);
52
+ let r = n.length, o;
53
+ for (; r-- > 0; )
54
+ if (o = n[r], t === o.toLowerCase())
55
+ return o;
56
+ return null;
57
+ }
58
+ const $e = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, qe = (e) => !v(e) && e !== $e;
59
+ function ne() {
60
+ const { caseless: e } = qe(this) && this || {}, t = {}, n = (r, o) => {
61
+ const s = e && Me(t, o) || o;
62
+ z(t[s]) && z(r) ? t[s] = ne(t[s], r) : z(r) ? t[s] = ne({}, r) : U(r) ? t[s] = r.slice() : t[s] = r;
63
+ };
64
+ for (let r = 0, o = arguments.length; r < o; r++)
65
+ arguments[r] && H(arguments[r], n);
66
+ return t;
67
+ }
68
+ const vt = (e, t, n, { allOwnKeys: r } = {}) => (H(t, (o, s) => {
69
+ n && S(o) ? e[s] = Be(o, n) : e[s] = o;
70
+ }, { allOwnKeys: r }), e), It = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), Bt = (e, t, n, r) => {
71
+ e.prototype = Object.create(t.prototype, r), e.prototype.constructor = e, Object.defineProperty(e, "super", {
72
+ value: t.prototype
73
+ }), n && Object.assign(e.prototype, n);
74
+ }, jt = (e, t, n, r) => {
75
+ let o, s, i;
76
+ const c = {};
77
+ if (t = t || {}, e == null) return t;
78
+ do {
79
+ for (o = Object.getOwnPropertyNames(e), s = o.length; s-- > 0; )
80
+ i = o[s], (!r || r(i, e, t)) && !c[i] && (t[i] = e[i], c[i] = !0);
81
+ e = n !== !1 && de(e);
82
+ } while (e && (!n || n(e, t)) && e !== Object.prototype);
83
+ return t;
84
+ }, Ht = (e, t, n) => {
85
+ e = String(e), (n === void 0 || n > e.length) && (n = e.length), n -= t.length;
86
+ const r = e.indexOf(t, n);
87
+ return r !== -1 && r === n;
88
+ }, Mt = (e) => {
89
+ if (!e) return null;
90
+ if (U(e)) return e;
91
+ let t = e.length;
92
+ if (!He(t)) return null;
93
+ const n = new Array(t);
94
+ for (; t-- > 0; )
95
+ n[t] = e[t];
96
+ return n;
97
+ }, $t = /* @__PURE__ */ ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && de(Uint8Array)), qt = (e, t) => {
98
+ const r = (e && e[Symbol.iterator]).call(e);
99
+ let o;
100
+ for (; (o = r.next()) && !o.done; ) {
101
+ const s = o.value;
102
+ t.call(e, s[0], s[1]);
103
+ }
104
+ }, zt = (e, t) => {
105
+ let n;
106
+ const r = [];
107
+ for (; (n = e.exec(t)) !== null; )
108
+ r.push(n);
109
+ return r;
110
+ }, Jt = R("HTMLFormElement"), Vt = (e) => e.toLowerCase().replace(
111
+ /[-_\s]([a-z\d])(\w*)/g,
112
+ function(n, r, o) {
113
+ return r.toUpperCase() + o;
114
+ }
115
+ ), ye = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype), Wt = R("RegExp"), ze = (e, t) => {
116
+ const n = Object.getOwnPropertyDescriptors(e), r = {};
117
+ H(n, (o, s) => {
118
+ let i;
119
+ (i = t(o, s, e)) !== !1 && (r[s] = i || o);
120
+ }), Object.defineProperties(e, r);
121
+ }, Kt = (e) => {
122
+ ze(e, (t, n) => {
123
+ if (S(e) && ["arguments", "caller", "callee"].indexOf(n) !== -1)
124
+ return !1;
125
+ const r = e[n];
126
+ if (S(r)) {
127
+ if (t.enumerable = !1, "writable" in t) {
128
+ t.writable = !1;
129
+ return;
130
+ }
131
+ t.set || (t.set = () => {
132
+ throw Error("Can not rewrite read-only method '" + n + "'");
133
+ });
134
+ }
135
+ });
136
+ }, Qt = (e, t) => {
137
+ const n = {}, r = (o) => {
138
+ o.forEach((s) => {
139
+ n[s] = !0;
140
+ });
141
+ };
142
+ return U(e) ? r(e) : r(String(e).split(t)), n;
143
+ }, Gt = () => {
144
+ }, Xt = (e, t) => (e = +e, Number.isFinite(e) ? e : t), Z = "abcdefghijklmnopqrstuvwxyz", we = "0123456789", Je = {
145
+ DIGIT: we,
146
+ ALPHA: Z,
147
+ ALPHA_DIGIT: Z + Z.toUpperCase() + we
148
+ }, Zt = (e = 16, t = Je.ALPHA_DIGIT) => {
149
+ let n = "";
150
+ const { length: r } = t;
151
+ for (; e--; )
152
+ n += t[Math.random() * r | 0];
153
+ return n;
154
+ };
155
+ function Yt(e) {
156
+ return !!(e && S(e.append) && e[Symbol.toStringTag] === "FormData" && e[Symbol.iterator]);
157
+ }
158
+ const en = (e) => {
159
+ const t = new Array(10), n = (r, o) => {
160
+ if (Q(r)) {
161
+ if (t.indexOf(r) >= 0)
162
+ return;
163
+ if (!("toJSON" in r)) {
164
+ t[o] = r;
165
+ const s = U(r) ? [] : {};
166
+ return H(r, (i, c) => {
167
+ const f = n(i, o + 1);
168
+ !v(f) && (s[c] = f);
169
+ }), t[o] = void 0, s;
170
+ }
171
+ }
172
+ return r;
173
+ };
174
+ return n(e, 0);
175
+ }, tn = R("AsyncFunction"), nn = (e) => e && (Q(e) || S(e)) && S(e.then) && S(e.catch), a = {
176
+ isArray: U,
177
+ isArrayBuffer: je,
178
+ isBuffer: Rt,
179
+ isFormData: Dt,
180
+ isArrayBufferView: At,
181
+ isString: _t,
182
+ isNumber: He,
183
+ isBoolean: xt,
184
+ isObject: Q,
185
+ isPlainObject: z,
186
+ isUndefined: v,
187
+ isDate: kt,
188
+ isFile: Ct,
189
+ isBlob: Pt,
190
+ isRegExp: Wt,
191
+ isFunction: S,
192
+ isStream: Ut,
193
+ isURLSearchParams: Ft,
194
+ isTypedArray: $t,
195
+ isFileList: Nt,
196
+ forEach: H,
197
+ merge: ne,
198
+ extend: vt,
199
+ trim: Lt,
200
+ stripBOM: It,
201
+ inherits: Bt,
202
+ toFlatObject: jt,
203
+ kindOf: W,
204
+ kindOfTest: R,
205
+ endsWith: Ht,
206
+ toArray: Mt,
207
+ forEachEntry: qt,
208
+ matchAll: zt,
209
+ isHTMLForm: Jt,
210
+ hasOwnProperty: ye,
211
+ hasOwnProp: ye,
212
+ // an alias to avoid ESLint no-prototype-builtins detection
213
+ reduceDescriptors: ze,
214
+ freezeMethods: Kt,
215
+ toObjectSet: Qt,
216
+ toCamelCase: Vt,
217
+ noop: Gt,
218
+ toFiniteNumber: Xt,
219
+ findKey: Me,
220
+ global: $e,
221
+ isContextDefined: qe,
222
+ ALPHABET: Je,
223
+ generateString: Zt,
224
+ isSpecCompliantForm: Yt,
225
+ toJSONObject: en,
226
+ isAsyncFn: tn,
227
+ isThenable: nn
228
+ };
229
+ function m(e, t, n, r, o) {
230
+ Error.call(this), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = new Error().stack, this.message = e, this.name = "AxiosError", t && (this.code = t), n && (this.config = n), r && (this.request = r), o && (this.response = o);
231
+ }
232
+ a.inherits(m, Error, {
233
+ toJSON: function() {
234
+ return {
235
+ // Standard
236
+ message: this.message,
237
+ name: this.name,
238
+ // Microsoft
239
+ description: this.description,
240
+ number: this.number,
241
+ // Mozilla
242
+ fileName: this.fileName,
243
+ lineNumber: this.lineNumber,
244
+ columnNumber: this.columnNumber,
245
+ stack: this.stack,
246
+ // Axios
247
+ config: a.toJSONObject(this.config),
248
+ code: this.code,
249
+ status: this.response && this.response.status ? this.response.status : null
250
+ };
251
+ }
252
+ });
253
+ const Ve = m.prototype, We = {};
254
+ [
255
+ "ERR_BAD_OPTION_VALUE",
256
+ "ERR_BAD_OPTION",
257
+ "ECONNABORTED",
258
+ "ETIMEDOUT",
259
+ "ERR_NETWORK",
260
+ "ERR_FR_TOO_MANY_REDIRECTS",
261
+ "ERR_DEPRECATED",
262
+ "ERR_BAD_RESPONSE",
263
+ "ERR_BAD_REQUEST",
264
+ "ERR_CANCELED",
265
+ "ERR_NOT_SUPPORT",
266
+ "ERR_INVALID_URL"
267
+ // eslint-disable-next-line func-names
268
+ ].forEach((e) => {
269
+ We[e] = { value: e };
270
+ });
271
+ Object.defineProperties(m, We);
272
+ Object.defineProperty(Ve, "isAxiosError", { value: !0 });
273
+ m.from = (e, t, n, r, o, s) => {
274
+ const i = Object.create(Ve);
275
+ return a.toFlatObject(e, i, function(f) {
276
+ return f !== Error.prototype;
277
+ }, (c) => c !== "isAxiosError"), m.call(i, e.message, t, n, r, o), i.cause = e, i.name = e.name, s && Object.assign(i, s), i;
278
+ };
279
+ const rn = null;
280
+ function re(e) {
281
+ return a.isPlainObject(e) || a.isArray(e);
282
+ }
283
+ function Ke(e) {
284
+ return a.endsWith(e, "[]") ? e.slice(0, -2) : e;
285
+ }
286
+ function Ee(e, t, n) {
287
+ return e ? e.concat(t).map(function(o, s) {
288
+ return o = Ke(o), !n && s ? "[" + o + "]" : o;
289
+ }).join(n ? "." : "") : t;
290
+ }
291
+ function on(e) {
292
+ return a.isArray(e) && !e.some(re);
293
+ }
294
+ const sn = a.toFlatObject(a, {}, null, function(t) {
295
+ return /^is[A-Z]/.test(t);
296
+ });
297
+ function G(e, t, n) {
298
+ if (!a.isObject(e))
299
+ throw new TypeError("target must be an object");
300
+ t = t || new FormData(), n = a.toFlatObject(n, {
301
+ metaTokens: !0,
302
+ dots: !1,
303
+ indexes: !1
304
+ }, !1, function(h, g) {
305
+ return !a.isUndefined(g[h]);
306
+ });
307
+ const r = n.metaTokens, o = n.visitor || l, s = n.dots, i = n.indexes, f = (n.Blob || typeof Blob < "u" && Blob) && a.isSpecCompliantForm(t);
308
+ if (!a.isFunction(o))
309
+ throw new TypeError("visitor must be a function");
310
+ function d(p) {
311
+ if (p === null) return "";
312
+ if (a.isDate(p))
313
+ return p.toISOString();
314
+ if (!f && a.isBlob(p))
315
+ throw new m("Blob is not supported. Use a Buffer instead.");
316
+ return a.isArrayBuffer(p) || a.isTypedArray(p) ? f && typeof Blob == "function" ? new Blob([p]) : Buffer.from(p) : p;
317
+ }
318
+ function l(p, h, g) {
319
+ let b = p;
320
+ if (p && !g && typeof p == "object") {
321
+ if (a.endsWith(h, "{}"))
322
+ h = r ? h : h.slice(0, -2), p = JSON.stringify(p);
323
+ else if (a.isArray(p) && on(p) || (a.isFileList(p) || a.endsWith(h, "[]")) && (b = a.toArray(p)))
324
+ return h = Ke(h), b.forEach(function(_, pt) {
325
+ !(a.isUndefined(_) || _ === null) && t.append(
326
+ // eslint-disable-next-line no-nested-ternary
327
+ i === !0 ? Ee([h], pt, s) : i === null ? h : h + "[]",
328
+ d(_)
329
+ );
330
+ }), !1;
331
+ }
332
+ return re(p) ? !0 : (t.append(Ee(g, h, s), d(p)), !1);
333
+ }
334
+ const u = [], y = Object.assign(sn, {
335
+ defaultVisitor: l,
336
+ convertValue: d,
337
+ isVisitable: re
338
+ });
339
+ function E(p, h) {
340
+ if (!a.isUndefined(p)) {
341
+ if (u.indexOf(p) !== -1)
342
+ throw Error("Circular reference detected in " + h.join("."));
343
+ u.push(p), a.forEach(p, function(b, A) {
344
+ (!(a.isUndefined(b) || b === null) && o.call(
345
+ t,
346
+ b,
347
+ a.isString(A) ? A.trim() : A,
348
+ h,
349
+ y
350
+ )) === !0 && E(b, h ? h.concat(A) : [A]);
351
+ }), u.pop();
352
+ }
353
+ }
354
+ if (!a.isObject(e))
355
+ throw new TypeError("data must be an object");
356
+ return E(e), t;
357
+ }
358
+ function ge(e) {
359
+ const t = {
360
+ "!": "%21",
361
+ "'": "%27",
362
+ "(": "%28",
363
+ ")": "%29",
364
+ "~": "%7E",
365
+ "%20": "+",
366
+ "%00": "\0"
367
+ };
368
+ return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g, function(r) {
369
+ return t[r];
370
+ });
371
+ }
372
+ function pe(e, t) {
373
+ this._pairs = [], e && G(e, this, t);
374
+ }
375
+ const Qe = pe.prototype;
376
+ Qe.append = function(t, n) {
377
+ this._pairs.push([t, n]);
378
+ };
379
+ Qe.toString = function(t) {
380
+ const n = t ? function(r) {
381
+ return t.call(this, r, ge);
382
+ } : ge;
383
+ return this._pairs.map(function(o) {
384
+ return n(o[0]) + "=" + n(o[1]);
385
+ }, "").join("&");
386
+ };
387
+ function an(e) {
388
+ return encodeURIComponent(e).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]");
389
+ }
390
+ function Ge(e, t, n) {
391
+ if (!t)
392
+ return e;
393
+ const r = n && n.encode || an, o = n && n.serialize;
394
+ let s;
395
+ if (o ? s = o(t, n) : s = a.isURLSearchParams(t) ? t.toString() : new pe(t, n).toString(r), s) {
396
+ const i = e.indexOf("#");
397
+ i !== -1 && (e = e.slice(0, i)), e += (e.indexOf("?") === -1 ? "?" : "&") + s;
398
+ }
399
+ return e;
400
+ }
401
+ class be {
402
+ constructor() {
403
+ this.handlers = [];
404
+ }
405
+ /**
406
+ * Add a new interceptor to the stack
407
+ *
408
+ * @param {Function} fulfilled The function to handle `then` for a `Promise`
409
+ * @param {Function} rejected The function to handle `reject` for a `Promise`
410
+ *
411
+ * @return {Number} An ID used to remove interceptor later
412
+ */
413
+ use(t, n, r) {
414
+ return this.handlers.push({
415
+ fulfilled: t,
416
+ rejected: n,
417
+ synchronous: r ? r.synchronous : !1,
418
+ runWhen: r ? r.runWhen : null
419
+ }), this.handlers.length - 1;
420
+ }
421
+ /**
422
+ * Remove an interceptor from the stack
423
+ *
424
+ * @param {Number} id The ID that was returned by `use`
425
+ *
426
+ * @returns {Boolean} `true` if the interceptor was removed, `false` otherwise
427
+ */
428
+ eject(t) {
429
+ this.handlers[t] && (this.handlers[t] = null);
430
+ }
431
+ /**
432
+ * Clear all interceptors from the stack
433
+ *
434
+ * @returns {void}
435
+ */
436
+ clear() {
437
+ this.handlers && (this.handlers = []);
438
+ }
439
+ /**
440
+ * Iterate over all the registered interceptors
441
+ *
442
+ * This method is particularly useful for skipping over any
443
+ * interceptors that may have become `null` calling `eject`.
444
+ *
445
+ * @param {Function} fn The function to call for each interceptor
446
+ *
447
+ * @returns {void}
448
+ */
449
+ forEach(t) {
450
+ a.forEach(this.handlers, function(r) {
451
+ r !== null && t(r);
452
+ });
453
+ }
454
+ }
455
+ const Xe = {
456
+ silentJSONParsing: !0,
457
+ forcedJSONParsing: !0,
458
+ clarifyTimeoutError: !1
459
+ }, cn = typeof URLSearchParams < "u" ? URLSearchParams : pe, un = typeof FormData < "u" ? FormData : null, ln = typeof Blob < "u" ? Blob : null, fn = {
460
+ isBrowser: !0,
461
+ classes: {
462
+ URLSearchParams: cn,
463
+ FormData: un,
464
+ Blob: ln
465
+ },
466
+ protocols: ["http", "https", "file", "blob", "url", "data"]
467
+ }, Ze = typeof window < "u" && typeof document < "u", dn = ((e) => Ze && ["ReactNative", "NativeScript", "NS"].indexOf(e) < 0)(typeof navigator < "u" && navigator.product), pn = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
468
+ self instanceof WorkerGlobalScope && typeof self.importScripts == "function", hn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
469
+ __proto__: null,
470
+ hasBrowserEnv: Ze,
471
+ hasStandardBrowserEnv: dn,
472
+ hasStandardBrowserWebWorkerEnv: pn
473
+ }, Symbol.toStringTag, { value: "Module" })), T = {
474
+ ...hn,
475
+ ...fn
476
+ };
477
+ function mn(e, t) {
478
+ return G(e, new T.classes.URLSearchParams(), Object.assign({
479
+ visitor: function(n, r, o, s) {
480
+ return T.isNode && a.isBuffer(n) ? (this.append(r, n.toString("base64")), !1) : s.defaultVisitor.apply(this, arguments);
481
+ }
482
+ }, t));
483
+ }
484
+ function yn(e) {
485
+ return a.matchAll(/\w+|\[(\w*)]/g, e).map((t) => t[0] === "[]" ? "" : t[1] || t[0]);
486
+ }
487
+ function wn(e) {
488
+ const t = {}, n = Object.keys(e);
489
+ let r;
490
+ const o = n.length;
491
+ let s;
492
+ for (r = 0; r < o; r++)
493
+ s = n[r], t[s] = e[s];
494
+ return t;
495
+ }
496
+ function Ye(e) {
497
+ function t(n, r, o, s) {
498
+ let i = n[s++];
499
+ if (i === "__proto__") return !0;
500
+ const c = Number.isFinite(+i), f = s >= n.length;
501
+ return i = !i && a.isArray(o) ? o.length : i, f ? (a.hasOwnProp(o, i) ? o[i] = [o[i], r] : o[i] = r, !c) : ((!o[i] || !a.isObject(o[i])) && (o[i] = []), t(n, r, o[i], s) && a.isArray(o[i]) && (o[i] = wn(o[i])), !c);
502
+ }
503
+ if (a.isFormData(e) && a.isFunction(e.entries)) {
504
+ const n = {};
505
+ return a.forEachEntry(e, (r, o) => {
506
+ t(yn(r), o, n, 0);
507
+ }), n;
508
+ }
509
+ return null;
510
+ }
511
+ function En(e, t, n) {
512
+ if (a.isString(e))
513
+ try {
514
+ return (t || JSON.parse)(e), a.trim(e);
515
+ } catch (r) {
516
+ if (r.name !== "SyntaxError")
517
+ throw r;
518
+ }
519
+ return (n || JSON.stringify)(e);
520
+ }
521
+ const M = {
522
+ transitional: Xe,
523
+ adapter: ["xhr", "http"],
524
+ transformRequest: [function(t, n) {
525
+ const r = n.getContentType() || "", o = r.indexOf("application/json") > -1, s = a.isObject(t);
526
+ if (s && a.isHTMLForm(t) && (t = new FormData(t)), a.isFormData(t))
527
+ return o ? JSON.stringify(Ye(t)) : t;
528
+ if (a.isArrayBuffer(t) || a.isBuffer(t) || a.isStream(t) || a.isFile(t) || a.isBlob(t))
529
+ return t;
530
+ if (a.isArrayBufferView(t))
531
+ return t.buffer;
532
+ if (a.isURLSearchParams(t))
533
+ return n.setContentType("application/x-www-form-urlencoded;charset=utf-8", !1), t.toString();
534
+ let c;
535
+ if (s) {
536
+ if (r.indexOf("application/x-www-form-urlencoded") > -1)
537
+ return mn(t, this.formSerializer).toString();
538
+ if ((c = a.isFileList(t)) || r.indexOf("multipart/form-data") > -1) {
539
+ const f = this.env && this.env.FormData;
540
+ return G(
541
+ c ? { "files[]": t } : t,
542
+ f && new f(),
543
+ this.formSerializer
544
+ );
545
+ }
546
+ }
547
+ return s || o ? (n.setContentType("application/json", !1), En(t)) : t;
548
+ }],
549
+ transformResponse: [function(t) {
550
+ const n = this.transitional || M.transitional, r = n && n.forcedJSONParsing, o = this.responseType === "json";
551
+ if (t && a.isString(t) && (r && !this.responseType || o)) {
552
+ const i = !(n && n.silentJSONParsing) && o;
553
+ try {
554
+ return JSON.parse(t);
555
+ } catch (c) {
556
+ if (i)
557
+ throw c.name === "SyntaxError" ? m.from(c, m.ERR_BAD_RESPONSE, this, null, this.response) : c;
558
+ }
559
+ }
560
+ return t;
561
+ }],
562
+ /**
563
+ * A timeout in milliseconds to abort a request. If set to 0 (default) a
564
+ * timeout is not created.
565
+ */
566
+ timeout: 0,
567
+ xsrfCookieName: "XSRF-TOKEN",
568
+ xsrfHeaderName: "X-XSRF-TOKEN",
569
+ maxContentLength: -1,
570
+ maxBodyLength: -1,
571
+ env: {
572
+ FormData: T.classes.FormData,
573
+ Blob: T.classes.Blob
574
+ },
575
+ validateStatus: function(t) {
576
+ return t >= 200 && t < 300;
577
+ },
578
+ headers: {
579
+ common: {
580
+ Accept: "application/json, text/plain, */*",
581
+ "Content-Type": void 0
582
+ }
583
+ }
584
+ };
585
+ a.forEach(["delete", "get", "head", "post", "put", "patch"], (e) => {
586
+ M.headers[e] = {};
587
+ });
588
+ const gn = a.toObjectSet([
589
+ "age",
590
+ "authorization",
591
+ "content-length",
592
+ "content-type",
593
+ "etag",
594
+ "expires",
595
+ "from",
596
+ "host",
597
+ "if-modified-since",
598
+ "if-unmodified-since",
599
+ "last-modified",
600
+ "location",
601
+ "max-forwards",
602
+ "proxy-authorization",
603
+ "referer",
604
+ "retry-after",
605
+ "user-agent"
606
+ ]), bn = (e) => {
607
+ const t = {};
608
+ let n, r, o;
609
+ return e && e.split(`
610
+ `).forEach(function(i) {
611
+ o = i.indexOf(":"), n = i.substring(0, o).trim().toLowerCase(), r = i.substring(o + 1).trim(), !(!n || t[n] && gn[n]) && (n === "set-cookie" ? t[n] ? t[n].push(r) : t[n] = [r] : t[n] = t[n] ? t[n] + ", " + r : r);
612
+ }), t;
613
+ }, Se = Symbol("internals");
614
+ function D(e) {
615
+ return e && String(e).trim().toLowerCase();
616
+ }
617
+ function J(e) {
618
+ return e === !1 || e == null ? e : a.isArray(e) ? e.map(J) : String(e);
619
+ }
620
+ function Sn(e) {
621
+ const t = /* @__PURE__ */ Object.create(null), n = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
622
+ let r;
623
+ for (; r = n.exec(e); )
624
+ t[r[1]] = r[2];
625
+ return t;
626
+ }
627
+ const On = (e) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());
628
+ function Y(e, t, n, r, o) {
629
+ if (a.isFunction(r))
630
+ return r.call(this, t, n);
631
+ if (o && (t = n), !!a.isString(t)) {
632
+ if (a.isString(r))
633
+ return t.indexOf(r) !== -1;
634
+ if (a.isRegExp(r))
635
+ return r.test(t);
636
+ }
637
+ }
638
+ function Tn(e) {
639
+ return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (t, n, r) => n.toUpperCase() + r);
640
+ }
641
+ function Rn(e, t) {
642
+ const n = a.toCamelCase(" " + t);
643
+ ["get", "set", "has"].forEach((r) => {
644
+ Object.defineProperty(e, r + n, {
645
+ value: function(o, s, i) {
646
+ return this[r].call(this, t, o, s, i);
647
+ },
648
+ configurable: !0
649
+ });
650
+ });
651
+ }
652
+ let O = class {
653
+ constructor(t) {
654
+ t && this.set(t);
655
+ }
656
+ set(t, n, r) {
657
+ const o = this;
658
+ function s(c, f, d) {
659
+ const l = D(f);
660
+ if (!l)
661
+ throw new Error("header name must be a non-empty string");
662
+ const u = a.findKey(o, l);
663
+ (!u || o[u] === void 0 || d === !0 || d === void 0 && o[u] !== !1) && (o[u || f] = J(c));
664
+ }
665
+ const i = (c, f) => a.forEach(c, (d, l) => s(d, l, f));
666
+ return a.isPlainObject(t) || t instanceof this.constructor ? i(t, n) : a.isString(t) && (t = t.trim()) && !On(t) ? i(bn(t), n) : t != null && s(n, t, r), this;
667
+ }
668
+ get(t, n) {
669
+ if (t = D(t), t) {
670
+ const r = a.findKey(this, t);
671
+ if (r) {
672
+ const o = this[r];
673
+ if (!n)
674
+ return o;
675
+ if (n === !0)
676
+ return Sn(o);
677
+ if (a.isFunction(n))
678
+ return n.call(this, o, r);
679
+ if (a.isRegExp(n))
680
+ return n.exec(o);
681
+ throw new TypeError("parser must be boolean|regexp|function");
682
+ }
683
+ }
684
+ }
685
+ has(t, n) {
686
+ if (t = D(t), t) {
687
+ const r = a.findKey(this, t);
688
+ return !!(r && this[r] !== void 0 && (!n || Y(this, this[r], r, n)));
689
+ }
690
+ return !1;
691
+ }
692
+ delete(t, n) {
693
+ const r = this;
694
+ let o = !1;
695
+ function s(i) {
696
+ if (i = D(i), i) {
697
+ const c = a.findKey(r, i);
698
+ c && (!n || Y(r, r[c], c, n)) && (delete r[c], o = !0);
699
+ }
700
+ }
701
+ return a.isArray(t) ? t.forEach(s) : s(t), o;
702
+ }
703
+ clear(t) {
704
+ const n = Object.keys(this);
705
+ let r = n.length, o = !1;
706
+ for (; r--; ) {
707
+ const s = n[r];
708
+ (!t || Y(this, this[s], s, t, !0)) && (delete this[s], o = !0);
709
+ }
710
+ return o;
711
+ }
712
+ normalize(t) {
713
+ const n = this, r = {};
714
+ return a.forEach(this, (o, s) => {
715
+ const i = a.findKey(r, s);
716
+ if (i) {
717
+ n[i] = J(o), delete n[s];
718
+ return;
719
+ }
720
+ const c = t ? Tn(s) : String(s).trim();
721
+ c !== s && delete n[s], n[c] = J(o), r[c] = !0;
722
+ }), this;
723
+ }
724
+ concat(...t) {
725
+ return this.constructor.concat(this, ...t);
726
+ }
727
+ toJSON(t) {
728
+ const n = /* @__PURE__ */ Object.create(null);
729
+ return a.forEach(this, (r, o) => {
730
+ r != null && r !== !1 && (n[o] = t && a.isArray(r) ? r.join(", ") : r);
731
+ }), n;
732
+ }
733
+ [Symbol.iterator]() {
734
+ return Object.entries(this.toJSON())[Symbol.iterator]();
735
+ }
736
+ toString() {
737
+ return Object.entries(this.toJSON()).map(([t, n]) => t + ": " + n).join(`
738
+ `);
739
+ }
740
+ get [Symbol.toStringTag]() {
741
+ return "AxiosHeaders";
742
+ }
743
+ static from(t) {
744
+ return t instanceof this ? t : new this(t);
745
+ }
746
+ static concat(t, ...n) {
747
+ const r = new this(t);
748
+ return n.forEach((o) => r.set(o)), r;
749
+ }
750
+ static accessor(t) {
751
+ const r = (this[Se] = this[Se] = {
752
+ accessors: {}
753
+ }).accessors, o = this.prototype;
754
+ function s(i) {
755
+ const c = D(i);
756
+ r[c] || (Rn(o, i), r[c] = !0);
757
+ }
758
+ return a.isArray(t) ? t.forEach(s) : s(t), this;
759
+ }
760
+ };
761
+ O.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
762
+ a.reduceDescriptors(O.prototype, ({ value: e }, t) => {
763
+ let n = t[0].toUpperCase() + t.slice(1);
764
+ return {
765
+ get: () => e,
766
+ set(r) {
767
+ this[n] = r;
768
+ }
769
+ };
770
+ });
771
+ a.freezeMethods(O);
772
+ function ee(e, t) {
773
+ const n = this || M, r = t || n, o = O.from(r.headers);
774
+ let s = r.data;
775
+ return a.forEach(e, function(c) {
776
+ s = c.call(n, s, o.normalize(), t ? t.status : void 0);
777
+ }), o.normalize(), s;
778
+ }
779
+ function et(e) {
780
+ return !!(e && e.__CANCEL__);
781
+ }
782
+ function $(e, t, n) {
783
+ m.call(this, e ?? "canceled", m.ERR_CANCELED, t, n), this.name = "CanceledError";
784
+ }
785
+ a.inherits($, m, {
786
+ __CANCEL__: !0
787
+ });
788
+ function An(e, t, n) {
789
+ const r = n.config.validateStatus;
790
+ !n.status || !r || r(n.status) ? e(n) : t(new m(
791
+ "Request failed with status code " + n.status,
792
+ [m.ERR_BAD_REQUEST, m.ERR_BAD_RESPONSE][Math.floor(n.status / 100) - 4],
793
+ n.config,
794
+ n.request,
795
+ n
796
+ ));
797
+ }
798
+ const _n = T.hasStandardBrowserEnv ? (
799
+ // Standard browser envs support document.cookie
800
+ {
801
+ write(e, t, n, r, o, s) {
802
+ const i = [e + "=" + encodeURIComponent(t)];
803
+ a.isNumber(n) && i.push("expires=" + new Date(n).toGMTString()), a.isString(r) && i.push("path=" + r), a.isString(o) && i.push("domain=" + o), s === !0 && i.push("secure"), document.cookie = i.join("; ");
804
+ },
805
+ read(e) {
806
+ const t = document.cookie.match(new RegExp("(^|;\\s*)(" + e + ")=([^;]*)"));
807
+ return t ? decodeURIComponent(t[3]) : null;
808
+ },
809
+ remove(e) {
810
+ this.write(e, "", Date.now() - 864e5);
811
+ }
812
+ }
813
+ ) : (
814
+ // Non-standard browser env (web workers, react-native) lack needed support.
815
+ {
816
+ write() {
817
+ },
818
+ read() {
819
+ return null;
820
+ },
821
+ remove() {
822
+ }
823
+ }
824
+ );
825
+ function xn(e) {
826
+ return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(e);
827
+ }
828
+ function kn(e, t) {
829
+ return t ? e.replace(/\/?\/$/, "") + "/" + t.replace(/^\/+/, "") : e;
830
+ }
831
+ function tt(e, t) {
832
+ return e && !xn(t) ? kn(e, t) : t;
833
+ }
834
+ const Cn = T.hasStandardBrowserEnv ? (
835
+ // Standard browser envs have full support of the APIs needed to test
836
+ // whether the request URL is of the same origin as current location.
837
+ function() {
838
+ const t = /(msie|trident)/i.test(navigator.userAgent), n = document.createElement("a");
839
+ let r;
840
+ function o(s) {
841
+ let i = s;
842
+ return t && (n.setAttribute("href", i), i = n.href), n.setAttribute("href", i), {
843
+ href: n.href,
844
+ protocol: n.protocol ? n.protocol.replace(/:$/, "") : "",
845
+ host: n.host,
846
+ search: n.search ? n.search.replace(/^\?/, "") : "",
847
+ hash: n.hash ? n.hash.replace(/^#/, "") : "",
848
+ hostname: n.hostname,
849
+ port: n.port,
850
+ pathname: n.pathname.charAt(0) === "/" ? n.pathname : "/" + n.pathname
851
+ };
852
+ }
853
+ return r = o(window.location.href), function(i) {
854
+ const c = a.isString(i) ? o(i) : i;
855
+ return c.protocol === r.protocol && c.host === r.host;
856
+ };
857
+ }()
858
+ ) : (
859
+ // Non standard browser envs (web workers, react-native) lack needed support.
860
+ /* @__PURE__ */ function() {
861
+ return function() {
862
+ return !0;
863
+ };
864
+ }()
865
+ );
866
+ function Pn(e) {
867
+ const t = /^([-+\w]{1,25})(:?\/\/|:)/.exec(e);
868
+ return t && t[1] || "";
869
+ }
870
+ function Nn(e, t) {
871
+ e = e || 10;
872
+ const n = new Array(e), r = new Array(e);
873
+ let o = 0, s = 0, i;
874
+ return t = t !== void 0 ? t : 1e3, function(f) {
875
+ const d = Date.now(), l = r[s];
876
+ i || (i = d), n[o] = f, r[o] = d;
877
+ let u = s, y = 0;
878
+ for (; u !== o; )
879
+ y += n[u++], u = u % e;
880
+ if (o = (o + 1) % e, o === s && (s = (s + 1) % e), d - i < t)
881
+ return;
882
+ const E = l && d - l;
883
+ return E ? Math.round(y * 1e3 / E) : void 0;
884
+ };
885
+ }
886
+ function Oe(e, t) {
887
+ let n = 0;
888
+ const r = Nn(50, 250);
889
+ return (o) => {
890
+ const s = o.loaded, i = o.lengthComputable ? o.total : void 0, c = s - n, f = r(c), d = s <= i;
891
+ n = s;
892
+ const l = {
893
+ loaded: s,
894
+ total: i,
895
+ progress: i ? s / i : void 0,
896
+ bytes: c,
897
+ rate: f || void 0,
898
+ estimated: f && i && d ? (i - s) / f : void 0,
899
+ event: o
900
+ };
901
+ l[t ? "download" : "upload"] = !0, e(l);
902
+ };
903
+ }
904
+ const Un = typeof XMLHttpRequest < "u", Dn = Un && function(e) {
905
+ return new Promise(function(n, r) {
906
+ let o = e.data;
907
+ const s = O.from(e.headers).normalize();
908
+ let { responseType: i, withXSRFToken: c } = e, f;
909
+ function d() {
910
+ e.cancelToken && e.cancelToken.unsubscribe(f), e.signal && e.signal.removeEventListener("abort", f);
911
+ }
912
+ let l;
913
+ if (a.isFormData(o)) {
914
+ if (T.hasStandardBrowserEnv || T.hasStandardBrowserWebWorkerEnv)
915
+ s.setContentType(!1);
916
+ else if ((l = s.getContentType()) !== !1) {
917
+ const [h, ...g] = l ? l.split(";").map((b) => b.trim()).filter(Boolean) : [];
918
+ s.setContentType([h || "multipart/form-data", ...g].join("; "));
919
+ }
920
+ }
921
+ let u = new XMLHttpRequest();
922
+ if (e.auth) {
923
+ const h = e.auth.username || "", g = e.auth.password ? unescape(encodeURIComponent(e.auth.password)) : "";
924
+ s.set("Authorization", "Basic " + btoa(h + ":" + g));
925
+ }
926
+ const y = tt(e.baseURL, e.url);
927
+ u.open(e.method.toUpperCase(), Ge(y, e.params, e.paramsSerializer), !0), u.timeout = e.timeout;
928
+ function E() {
929
+ if (!u)
930
+ return;
931
+ const h = O.from(
932
+ "getAllResponseHeaders" in u && u.getAllResponseHeaders()
933
+ ), b = {
934
+ data: !i || i === "text" || i === "json" ? u.responseText : u.response,
935
+ status: u.status,
936
+ statusText: u.statusText,
937
+ headers: h,
938
+ config: e,
939
+ request: u
940
+ };
941
+ An(function(_) {
942
+ n(_), d();
943
+ }, function(_) {
944
+ r(_), d();
945
+ }, b), u = null;
946
+ }
947
+ if ("onloadend" in u ? u.onloadend = E : u.onreadystatechange = function() {
948
+ !u || u.readyState !== 4 || u.status === 0 && !(u.responseURL && u.responseURL.indexOf("file:") === 0) || setTimeout(E);
949
+ }, u.onabort = function() {
950
+ u && (r(new m("Request aborted", m.ECONNABORTED, e, u)), u = null);
951
+ }, u.onerror = function() {
952
+ r(new m("Network Error", m.ERR_NETWORK, e, u)), u = null;
953
+ }, u.ontimeout = function() {
954
+ let g = e.timeout ? "timeout of " + e.timeout + "ms exceeded" : "timeout exceeded";
955
+ const b = e.transitional || Xe;
956
+ e.timeoutErrorMessage && (g = e.timeoutErrorMessage), r(new m(
957
+ g,
958
+ b.clarifyTimeoutError ? m.ETIMEDOUT : m.ECONNABORTED,
959
+ e,
960
+ u
961
+ )), u = null;
962
+ }, T.hasStandardBrowserEnv && (c && a.isFunction(c) && (c = c(e)), c || c !== !1 && Cn(y))) {
963
+ const h = e.xsrfHeaderName && e.xsrfCookieName && _n.read(e.xsrfCookieName);
964
+ h && s.set(e.xsrfHeaderName, h);
965
+ }
966
+ o === void 0 && s.setContentType(null), "setRequestHeader" in u && a.forEach(s.toJSON(), function(g, b) {
967
+ u.setRequestHeader(b, g);
968
+ }), a.isUndefined(e.withCredentials) || (u.withCredentials = !!e.withCredentials), i && i !== "json" && (u.responseType = e.responseType), typeof e.onDownloadProgress == "function" && u.addEventListener("progress", Oe(e.onDownloadProgress, !0)), typeof e.onUploadProgress == "function" && u.upload && u.upload.addEventListener("progress", Oe(e.onUploadProgress)), (e.cancelToken || e.signal) && (f = (h) => {
969
+ u && (r(!h || h.type ? new $(null, e, u) : h), u.abort(), u = null);
970
+ }, e.cancelToken && e.cancelToken.subscribe(f), e.signal && (e.signal.aborted ? f() : e.signal.addEventListener("abort", f)));
971
+ const p = Pn(y);
972
+ if (p && T.protocols.indexOf(p) === -1) {
973
+ r(new m("Unsupported protocol " + p + ":", m.ERR_BAD_REQUEST, e));
974
+ return;
975
+ }
976
+ u.send(o || null);
977
+ });
978
+ }, oe = {
979
+ http: rn,
980
+ xhr: Dn
981
+ };
982
+ a.forEach(oe, (e, t) => {
983
+ if (e) {
984
+ try {
985
+ Object.defineProperty(e, "name", { value: t });
986
+ } catch {
987
+ }
988
+ Object.defineProperty(e, "adapterName", { value: t });
989
+ }
990
+ });
991
+ const Te = (e) => `- ${e}`, Fn = (e) => a.isFunction(e) || e === null || e === !1, nt = {
992
+ getAdapter: (e) => {
993
+ e = a.isArray(e) ? e : [e];
994
+ const { length: t } = e;
995
+ let n, r;
996
+ const o = {};
997
+ for (let s = 0; s < t; s++) {
998
+ n = e[s];
999
+ let i;
1000
+ if (r = n, !Fn(n) && (r = oe[(i = String(n)).toLowerCase()], r === void 0))
1001
+ throw new m(`Unknown adapter '${i}'`);
1002
+ if (r)
1003
+ break;
1004
+ o[i || "#" + s] = r;
1005
+ }
1006
+ if (!r) {
1007
+ const s = Object.entries(o).map(
1008
+ ([c, f]) => `adapter ${c} ` + (f === !1 ? "is not supported by the environment" : "is not available in the build")
1009
+ );
1010
+ let i = t ? s.length > 1 ? `since :
1011
+ ` + s.map(Te).join(`
1012
+ `) : " " + Te(s[0]) : "as no adapter specified";
1013
+ throw new m(
1014
+ "There is no suitable adapter to dispatch the request " + i,
1015
+ "ERR_NOT_SUPPORT"
1016
+ );
1017
+ }
1018
+ return r;
1019
+ },
1020
+ adapters: oe
1021
+ };
1022
+ function te(e) {
1023
+ if (e.cancelToken && e.cancelToken.throwIfRequested(), e.signal && e.signal.aborted)
1024
+ throw new $(null, e);
1025
+ }
1026
+ function Re(e) {
1027
+ return te(e), e.headers = O.from(e.headers), e.data = ee.call(
1028
+ e,
1029
+ e.transformRequest
1030
+ ), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), nt.getAdapter(e.adapter || M.adapter)(e).then(function(r) {
1031
+ return te(e), r.data = ee.call(
1032
+ e,
1033
+ e.transformResponse,
1034
+ r
1035
+ ), r.headers = O.from(r.headers), r;
1036
+ }, function(r) {
1037
+ return et(r) || (te(e), r && r.response && (r.response.data = ee.call(
1038
+ e,
1039
+ e.transformResponse,
1040
+ r.response
1041
+ ), r.response.headers = O.from(r.response.headers))), Promise.reject(r);
1042
+ });
1043
+ }
1044
+ const Ae = (e) => e instanceof O ? e.toJSON() : e;
1045
+ function P(e, t) {
1046
+ t = t || {};
1047
+ const n = {};
1048
+ function r(d, l, u) {
1049
+ return a.isPlainObject(d) && a.isPlainObject(l) ? a.merge.call({ caseless: u }, d, l) : a.isPlainObject(l) ? a.merge({}, l) : a.isArray(l) ? l.slice() : l;
1050
+ }
1051
+ function o(d, l, u) {
1052
+ if (a.isUndefined(l)) {
1053
+ if (!a.isUndefined(d))
1054
+ return r(void 0, d, u);
1055
+ } else return r(d, l, u);
1056
+ }
1057
+ function s(d, l) {
1058
+ if (!a.isUndefined(l))
1059
+ return r(void 0, l);
1060
+ }
1061
+ function i(d, l) {
1062
+ if (a.isUndefined(l)) {
1063
+ if (!a.isUndefined(d))
1064
+ return r(void 0, d);
1065
+ } else return r(void 0, l);
1066
+ }
1067
+ function c(d, l, u) {
1068
+ if (u in t)
1069
+ return r(d, l);
1070
+ if (u in e)
1071
+ return r(void 0, d);
1072
+ }
1073
+ const f = {
1074
+ url: s,
1075
+ method: s,
1076
+ data: s,
1077
+ baseURL: i,
1078
+ transformRequest: i,
1079
+ transformResponse: i,
1080
+ paramsSerializer: i,
1081
+ timeout: i,
1082
+ timeoutMessage: i,
1083
+ withCredentials: i,
1084
+ withXSRFToken: i,
1085
+ adapter: i,
1086
+ responseType: i,
1087
+ xsrfCookieName: i,
1088
+ xsrfHeaderName: i,
1089
+ onUploadProgress: i,
1090
+ onDownloadProgress: i,
1091
+ decompress: i,
1092
+ maxContentLength: i,
1093
+ maxBodyLength: i,
1094
+ beforeRedirect: i,
1095
+ transport: i,
1096
+ httpAgent: i,
1097
+ httpsAgent: i,
1098
+ cancelToken: i,
1099
+ socketPath: i,
1100
+ responseEncoding: i,
1101
+ validateStatus: c,
1102
+ headers: (d, l) => o(Ae(d), Ae(l), !0)
1103
+ };
1104
+ return a.forEach(Object.keys(Object.assign({}, e, t)), function(l) {
1105
+ const u = f[l] || o, y = u(e[l], t[l], l);
1106
+ a.isUndefined(y) && u !== c || (n[l] = y);
1107
+ }), n;
1108
+ }
1109
+ const rt = "1.6.7", he = {};
1110
+ ["object", "boolean", "number", "function", "string", "symbol"].forEach((e, t) => {
1111
+ he[e] = function(r) {
1112
+ return typeof r === e || "a" + (t < 1 ? "n " : " ") + e;
1113
+ };
1114
+ });
1115
+ const _e = {};
1116
+ he.transitional = function(t, n, r) {
1117
+ function o(s, i) {
1118
+ return "[Axios v" + rt + "] Transitional option '" + s + "'" + i + (r ? ". " + r : "");
1119
+ }
1120
+ return (s, i, c) => {
1121
+ if (t === !1)
1122
+ throw new m(
1123
+ o(i, " has been removed" + (n ? " in " + n : "")),
1124
+ m.ERR_DEPRECATED
1125
+ );
1126
+ return n && !_e[i] && (_e[i] = !0), t ? t(s, i, c) : !0;
1127
+ };
1128
+ };
1129
+ function Ln(e, t, n) {
1130
+ if (typeof e != "object")
1131
+ throw new m("options must be an object", m.ERR_BAD_OPTION_VALUE);
1132
+ const r = Object.keys(e);
1133
+ let o = r.length;
1134
+ for (; o-- > 0; ) {
1135
+ const s = r[o], i = t[s];
1136
+ if (i) {
1137
+ const c = e[s], f = c === void 0 || i(c, s, e);
1138
+ if (f !== !0)
1139
+ throw new m("option " + s + " must be " + f, m.ERR_BAD_OPTION_VALUE);
1140
+ continue;
1141
+ }
1142
+ if (n !== !0)
1143
+ throw new m("Unknown option " + s, m.ERR_BAD_OPTION);
1144
+ }
1145
+ }
1146
+ const se = {
1147
+ assertOptions: Ln,
1148
+ validators: he
1149
+ }, x = se.validators;
1150
+ let k = class {
1151
+ constructor(t) {
1152
+ this.defaults = t, this.interceptors = {
1153
+ request: new be(),
1154
+ response: new be()
1155
+ };
1156
+ }
1157
+ /**
1158
+ * Dispatch a request
1159
+ *
1160
+ * @param {String|Object} configOrUrl The config specific for this request (merged with this.defaults)
1161
+ * @param {?Object} config
1162
+ *
1163
+ * @returns {Promise} The Promise to be fulfilled
1164
+ */
1165
+ async request(t, n) {
1166
+ try {
1167
+ return await this._request(t, n);
1168
+ } catch (r) {
1169
+ if (r instanceof Error) {
1170
+ let o;
1171
+ Error.captureStackTrace ? Error.captureStackTrace(o = {}) : o = new Error();
1172
+ const s = o.stack ? o.stack.replace(/^.+\n/, "") : "";
1173
+ r.stack ? s && !String(r.stack).endsWith(s.replace(/^.+\n.+\n/, "")) && (r.stack += `
1174
+ ` + s) : r.stack = s;
1175
+ }
1176
+ throw r;
1177
+ }
1178
+ }
1179
+ _request(t, n) {
1180
+ typeof t == "string" ? (n = n || {}, n.url = t) : n = t || {}, n = P(this.defaults, n);
1181
+ const { transitional: r, paramsSerializer: o, headers: s } = n;
1182
+ r !== void 0 && se.assertOptions(r, {
1183
+ silentJSONParsing: x.transitional(x.boolean),
1184
+ forcedJSONParsing: x.transitional(x.boolean),
1185
+ clarifyTimeoutError: x.transitional(x.boolean)
1186
+ }, !1), o != null && (a.isFunction(o) ? n.paramsSerializer = {
1187
+ serialize: o
1188
+ } : se.assertOptions(o, {
1189
+ encode: x.function,
1190
+ serialize: x.function
1191
+ }, !0)), n.method = (n.method || this.defaults.method || "get").toLowerCase();
1192
+ let i = s && a.merge(
1193
+ s.common,
1194
+ s[n.method]
1195
+ );
1196
+ s && a.forEach(
1197
+ ["delete", "get", "head", "post", "put", "patch", "common"],
1198
+ (p) => {
1199
+ delete s[p];
1200
+ }
1201
+ ), n.headers = O.concat(i, s);
1202
+ const c = [];
1203
+ let f = !0;
1204
+ this.interceptors.request.forEach(function(h) {
1205
+ typeof h.runWhen == "function" && h.runWhen(n) === !1 || (f = f && h.synchronous, c.unshift(h.fulfilled, h.rejected));
1206
+ });
1207
+ const d = [];
1208
+ this.interceptors.response.forEach(function(h) {
1209
+ d.push(h.fulfilled, h.rejected);
1210
+ });
1211
+ let l, u = 0, y;
1212
+ if (!f) {
1213
+ const p = [Re.bind(this), void 0];
1214
+ for (p.unshift.apply(p, c), p.push.apply(p, d), y = p.length, l = Promise.resolve(n); u < y; )
1215
+ l = l.then(p[u++], p[u++]);
1216
+ return l;
1217
+ }
1218
+ y = c.length;
1219
+ let E = n;
1220
+ for (u = 0; u < y; ) {
1221
+ const p = c[u++], h = c[u++];
1222
+ try {
1223
+ E = p(E);
1224
+ } catch (g) {
1225
+ h.call(this, g);
1226
+ break;
1227
+ }
1228
+ }
1229
+ try {
1230
+ l = Re.call(this, E);
1231
+ } catch (p) {
1232
+ return Promise.reject(p);
1233
+ }
1234
+ for (u = 0, y = d.length; u < y; )
1235
+ l = l.then(d[u++], d[u++]);
1236
+ return l;
1237
+ }
1238
+ getUri(t) {
1239
+ t = P(this.defaults, t);
1240
+ const n = tt(t.baseURL, t.url);
1241
+ return Ge(n, t.params, t.paramsSerializer);
1242
+ }
1243
+ };
1244
+ a.forEach(["delete", "get", "head", "options"], function(t) {
1245
+ k.prototype[t] = function(n, r) {
1246
+ return this.request(P(r || {}, {
1247
+ method: t,
1248
+ url: n,
1249
+ data: (r || {}).data
1250
+ }));
1251
+ };
1252
+ });
1253
+ a.forEach(["post", "put", "patch"], function(t) {
1254
+ function n(r) {
1255
+ return function(s, i, c) {
1256
+ return this.request(P(c || {}, {
1257
+ method: t,
1258
+ headers: r ? {
1259
+ "Content-Type": "multipart/form-data"
1260
+ } : {},
1261
+ url: s,
1262
+ data: i
1263
+ }));
1264
+ };
1265
+ }
1266
+ k.prototype[t] = n(), k.prototype[t + "Form"] = n(!0);
1267
+ });
1268
+ let vn = class ot {
1269
+ constructor(t) {
1270
+ if (typeof t != "function")
1271
+ throw new TypeError("executor must be a function.");
1272
+ let n;
1273
+ this.promise = new Promise(function(s) {
1274
+ n = s;
1275
+ });
1276
+ const r = this;
1277
+ this.promise.then((o) => {
1278
+ if (!r._listeners) return;
1279
+ let s = r._listeners.length;
1280
+ for (; s-- > 0; )
1281
+ r._listeners[s](o);
1282
+ r._listeners = null;
1283
+ }), this.promise.then = (o) => {
1284
+ let s;
1285
+ const i = new Promise((c) => {
1286
+ r.subscribe(c), s = c;
1287
+ }).then(o);
1288
+ return i.cancel = function() {
1289
+ r.unsubscribe(s);
1290
+ }, i;
1291
+ }, t(function(s, i, c) {
1292
+ r.reason || (r.reason = new $(s, i, c), n(r.reason));
1293
+ });
1294
+ }
1295
+ /**
1296
+ * Throws a `CanceledError` if cancellation has been requested.
1297
+ */
1298
+ throwIfRequested() {
1299
+ if (this.reason)
1300
+ throw this.reason;
1301
+ }
1302
+ /**
1303
+ * Subscribe to the cancel signal
1304
+ */
1305
+ subscribe(t) {
1306
+ if (this.reason) {
1307
+ t(this.reason);
1308
+ return;
1309
+ }
1310
+ this._listeners ? this._listeners.push(t) : this._listeners = [t];
1311
+ }
1312
+ /**
1313
+ * Unsubscribe from the cancel signal
1314
+ */
1315
+ unsubscribe(t) {
1316
+ if (!this._listeners)
1317
+ return;
1318
+ const n = this._listeners.indexOf(t);
1319
+ n !== -1 && this._listeners.splice(n, 1);
1320
+ }
1321
+ /**
1322
+ * Returns an object that contains a new `CancelToken` and a function that, when called,
1323
+ * cancels the `CancelToken`.
1324
+ */
1325
+ static source() {
1326
+ let t;
1327
+ return {
1328
+ token: new ot(function(o) {
1329
+ t = o;
1330
+ }),
1331
+ cancel: t
1332
+ };
1333
+ }
1334
+ };
1335
+ function In(e) {
1336
+ return function(n) {
1337
+ return e.apply(null, n);
1338
+ };
1339
+ }
1340
+ function Bn(e) {
1341
+ return a.isObject(e) && e.isAxiosError === !0;
1342
+ }
1343
+ const ie = {
1344
+ Continue: 100,
1345
+ SwitchingProtocols: 101,
1346
+ Processing: 102,
1347
+ EarlyHints: 103,
1348
+ Ok: 200,
1349
+ Created: 201,
1350
+ Accepted: 202,
1351
+ NonAuthoritativeInformation: 203,
1352
+ NoContent: 204,
1353
+ ResetContent: 205,
1354
+ PartialContent: 206,
1355
+ MultiStatus: 207,
1356
+ AlreadyReported: 208,
1357
+ ImUsed: 226,
1358
+ MultipleChoices: 300,
1359
+ MovedPermanently: 301,
1360
+ Found: 302,
1361
+ SeeOther: 303,
1362
+ NotModified: 304,
1363
+ UseProxy: 305,
1364
+ Unused: 306,
1365
+ TemporaryRedirect: 307,
1366
+ PermanentRedirect: 308,
1367
+ BadRequest: 400,
1368
+ Unauthorized: 401,
1369
+ PaymentRequired: 402,
1370
+ Forbidden: 403,
1371
+ NotFound: 404,
1372
+ MethodNotAllowed: 405,
1373
+ NotAcceptable: 406,
1374
+ ProxyAuthenticationRequired: 407,
1375
+ RequestTimeout: 408,
1376
+ Conflict: 409,
1377
+ Gone: 410,
1378
+ LengthRequired: 411,
1379
+ PreconditionFailed: 412,
1380
+ PayloadTooLarge: 413,
1381
+ UriTooLong: 414,
1382
+ UnsupportedMediaType: 415,
1383
+ RangeNotSatisfiable: 416,
1384
+ ExpectationFailed: 417,
1385
+ ImATeapot: 418,
1386
+ MisdirectedRequest: 421,
1387
+ UnprocessableEntity: 422,
1388
+ Locked: 423,
1389
+ FailedDependency: 424,
1390
+ TooEarly: 425,
1391
+ UpgradeRequired: 426,
1392
+ PreconditionRequired: 428,
1393
+ TooManyRequests: 429,
1394
+ RequestHeaderFieldsTooLarge: 431,
1395
+ UnavailableForLegalReasons: 451,
1396
+ InternalServerError: 500,
1397
+ NotImplemented: 501,
1398
+ BadGateway: 502,
1399
+ ServiceUnavailable: 503,
1400
+ GatewayTimeout: 504,
1401
+ HttpVersionNotSupported: 505,
1402
+ VariantAlsoNegotiates: 506,
1403
+ InsufficientStorage: 507,
1404
+ LoopDetected: 508,
1405
+ NotExtended: 510,
1406
+ NetworkAuthenticationRequired: 511
1407
+ };
1408
+ Object.entries(ie).forEach(([e, t]) => {
1409
+ ie[t] = e;
1410
+ });
1411
+ function st(e) {
1412
+ const t = new k(e), n = Be(k.prototype.request, t);
1413
+ return a.extend(n, k.prototype, t, { allOwnKeys: !0 }), a.extend(n, t, null, { allOwnKeys: !0 }), n.create = function(o) {
1414
+ return st(P(e, o));
1415
+ }, n;
1416
+ }
1417
+ const w = st(M);
1418
+ w.Axios = k;
1419
+ w.CanceledError = $;
1420
+ w.CancelToken = vn;
1421
+ w.isCancel = et;
1422
+ w.VERSION = rt;
1423
+ w.toFormData = G;
1424
+ w.AxiosError = m;
1425
+ w.Cancel = w.CanceledError;
1426
+ w.all = function(t) {
1427
+ return Promise.all(t);
1428
+ };
1429
+ w.spread = In;
1430
+ w.isAxiosError = Bn;
1431
+ w.mergeConfig = P;
1432
+ w.AxiosHeaders = O;
1433
+ w.formToJSON = (e) => Ye(a.isHTMLForm(e) ? new FormData(e) : e);
1434
+ w.getAdapter = nt.getAdapter;
1435
+ w.HttpStatusCode = ie;
1436
+ w.default = w;
1437
+ const {
1438
+ Axios: yr,
1439
+ AxiosError: wr,
1440
+ CanceledError: Er,
1441
+ isCancel: gr,
1442
+ CancelToken: br,
1443
+ VERSION: Sr,
1444
+ all: Or,
1445
+ Cancel: Tr,
1446
+ isAxiosError: Rr,
1447
+ spread: Ar,
1448
+ toFormData: _r,
1449
+ AxiosHeaders: xr,
1450
+ HttpStatusCode: kr,
1451
+ formToJSON: Cr,
1452
+ getAdapter: Pr,
1453
+ mergeConfig: Nr
1454
+ } = w;
1455
+ /*! js-cookie v3.0.5 | MIT */
1456
+ function q(e) {
1457
+ for (var t = 1; t < arguments.length; t++) {
1458
+ var n = arguments[t];
1459
+ for (var r in n)
1460
+ e[r] = n[r];
1461
+ }
1462
+ return e;
1463
+ }
1464
+ var jn = {
1465
+ read: function(e) {
1466
+ return e[0] === '"' && (e = e.slice(1, -1)), e.replace(/(%[\dA-F]{2})+/gi, decodeURIComponent);
1467
+ },
1468
+ write: function(e) {
1469
+ return encodeURIComponent(e).replace(
1470
+ /%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,
1471
+ decodeURIComponent
1472
+ );
1473
+ }
1474
+ };
1475
+ function ae(e, t) {
1476
+ function n(o, s, i) {
1477
+ if (!(typeof document > "u")) {
1478
+ i = q({}, t, i), typeof i.expires == "number" && (i.expires = new Date(Date.now() + i.expires * 864e5)), i.expires && (i.expires = i.expires.toUTCString()), o = encodeURIComponent(o).replace(/%(2[346B]|5E|60|7C)/g, decodeURIComponent).replace(/[()]/g, escape);
1479
+ var c = "";
1480
+ for (var f in i)
1481
+ i[f] && (c += "; " + f, i[f] !== !0 && (c += "=" + i[f].split(";")[0]));
1482
+ return document.cookie = o + "=" + e.write(s, o) + c;
1483
+ }
1484
+ }
1485
+ function r(o) {
1486
+ if (!(typeof document > "u" || arguments.length && !o)) {
1487
+ for (var s = document.cookie ? document.cookie.split("; ") : [], i = {}, c = 0; c < s.length; c++) {
1488
+ var f = s[c].split("="), d = f.slice(1).join("=");
1489
+ try {
1490
+ var l = decodeURIComponent(f[0]);
1491
+ if (i[l] = e.read(d, l), o === l)
1492
+ break;
1493
+ } catch {
1494
+ }
1495
+ }
1496
+ return o ? i[o] : i;
1497
+ }
1498
+ }
1499
+ return Object.create(
1500
+ {
1501
+ set: n,
1502
+ get: r,
1503
+ remove: function(o, s) {
1504
+ n(
1505
+ o,
1506
+ "",
1507
+ q({}, s, {
1508
+ expires: -1
1509
+ })
1510
+ );
1511
+ },
1512
+ withAttributes: function(o) {
1513
+ return ae(this.converter, q({}, this.attributes, o));
1514
+ },
1515
+ withConverter: function(o) {
1516
+ return ae(q({}, this.converter, o), this.attributes);
1517
+ }
1518
+ },
1519
+ {
1520
+ attributes: { value: Object.freeze(t) },
1521
+ converter: { value: Object.freeze(e) }
1522
+ }
1523
+ );
1524
+ }
1525
+ var Hn = ae(jn, { path: "/" }), xe;
1526
+ const it = typeof window < "u", Mn = (e) => typeof e == "string", ke = () => +Date.now(), ce = () => {
1527
+ };
1528
+ it && ((xe = window == null ? void 0 : window.navigator) != null && xe.userAgent) && /iP(ad|hone|od)/.test(window.navigator.userAgent);
1529
+ function me(e) {
1530
+ return typeof e == "function" ? e() : ht(e);
1531
+ }
1532
+ function $n(e, t) {
1533
+ function n(...r) {
1534
+ return new Promise((o, s) => {
1535
+ Promise.resolve(e(() => t.apply(this, r), { fn: t, thisArg: this, args: r })).then(o).catch(s);
1536
+ });
1537
+ }
1538
+ return n;
1539
+ }
1540
+ function qn(e, t = !0, n = !0, r = !1) {
1541
+ let o = 0, s, i = !0, c = ce, f;
1542
+ const d = () => {
1543
+ s && (clearTimeout(s), s = void 0, c(), c = ce);
1544
+ };
1545
+ return (u) => {
1546
+ const y = me(e), E = Date.now() - o, p = () => f = u();
1547
+ return d(), y <= 0 ? (o = Date.now(), p()) : (E > y && (n || !i) ? (o = Date.now(), p()) : t && (f = new Promise((h, g) => {
1548
+ c = r ? g : h, s = setTimeout(() => {
1549
+ o = Date.now(), i = !0, h(p()), d();
1550
+ }, Math.max(0, y - E));
1551
+ })), !n && !s && (s = setTimeout(() => i = !0, y)), i = !1, f);
1552
+ };
1553
+ }
1554
+ function zn(e) {
1555
+ return e;
1556
+ }
1557
+ function Jn(e) {
1558
+ return mt() ? (yt(e), !0) : !1;
1559
+ }
1560
+ function Vn(e) {
1561
+ var t;
1562
+ const n = me(e);
1563
+ return (t = n == null ? void 0 : n.$el) != null ? t : n;
1564
+ }
1565
+ const at = it ? window : void 0;
1566
+ function Ce(...e) {
1567
+ let t, n, r, o;
1568
+ if (Mn(e[0]) || Array.isArray(e[0]) ? ([n, r, o] = e, t = at) : [t, n, r, o] = e, !t)
1569
+ return ce;
1570
+ Array.isArray(n) || (n = [n]), Array.isArray(r) || (r = [r]);
1571
+ const s = [], i = () => {
1572
+ s.forEach((l) => l()), s.length = 0;
1573
+ }, c = (l, u, y, E) => (l.addEventListener(u, y, E), () => l.removeEventListener(u, y, E)), f = le(() => [Vn(t), me(o)], ([l, u]) => {
1574
+ i(), l && s.push(...n.flatMap((y) => r.map((E) => c(l, y, E, u))));
1575
+ }, { immediate: !0, flush: "post" }), d = () => {
1576
+ f(), i();
1577
+ };
1578
+ return Jn(d), d;
1579
+ }
1580
+ const Pe = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, Ne = "__vueuse_ssr_handlers__";
1581
+ Pe[Ne] = Pe[Ne] || {};
1582
+ const Wn = ["mousemove", "mousedown", "resize", "keydown", "touchstart", "wheel"], Kn = 6e4;
1583
+ function Qn(e = Kn, t = {}) {
1584
+ const {
1585
+ initialState: n = !1,
1586
+ listenForVisibilityChange: r = !0,
1587
+ events: o = Wn,
1588
+ window: s = at,
1589
+ eventFilter: i = qn(50)
1590
+ } = t, c = V(n), f = V(ke());
1591
+ let d;
1592
+ const l = $n(i, () => {
1593
+ c.value = !1, f.value = ke(), clearTimeout(d), d = setTimeout(() => c.value = !0, e);
1594
+ });
1595
+ if (s) {
1596
+ const u = s.document;
1597
+ for (const y of o)
1598
+ Ce(s, y, l, { passive: !0 });
1599
+ r && Ce(u, "visibilitychange", () => {
1600
+ u.hidden || l();
1601
+ });
1602
+ }
1603
+ return d = setTimeout(() => c.value = !0, e), { idle: c, lastActive: f };
1604
+ }
1605
+ var Ue;
1606
+ (function(e) {
1607
+ e.UP = "UP", e.RIGHT = "RIGHT", e.DOWN = "DOWN", e.LEFT = "LEFT", e.NONE = "NONE";
1608
+ })(Ue || (Ue = {}));
1609
+ var Gn = Object.defineProperty, De = Object.getOwnPropertySymbols, Xn = Object.prototype.hasOwnProperty, Zn = Object.prototype.propertyIsEnumerable, Fe = (e, t, n) => t in e ? Gn(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, Yn = (e, t) => {
1610
+ for (var n in t || (t = {}))
1611
+ Xn.call(t, n) && Fe(e, n, t[n]);
1612
+ if (De)
1613
+ for (var n of De(t))
1614
+ Zn.call(t, n) && Fe(e, n, t[n]);
1615
+ return e;
1616
+ };
1617
+ const er = {
1618
+ easeInSine: [0.12, 0, 0.39, 0],
1619
+ easeOutSine: [0.61, 1, 0.88, 1],
1620
+ easeInOutSine: [0.37, 0, 0.63, 1],
1621
+ easeInQuad: [0.11, 0, 0.5, 0],
1622
+ easeOutQuad: [0.5, 1, 0.89, 1],
1623
+ easeInOutQuad: [0.45, 0, 0.55, 1],
1624
+ easeInCubic: [0.32, 0, 0.67, 0],
1625
+ easeOutCubic: [0.33, 1, 0.68, 1],
1626
+ easeInOutCubic: [0.65, 0, 0.35, 1],
1627
+ easeInQuart: [0.5, 0, 0.75, 0],
1628
+ easeOutQuart: [0.25, 1, 0.5, 1],
1629
+ easeInOutQuart: [0.76, 0, 0.24, 1],
1630
+ easeInQuint: [0.64, 0, 0.78, 0],
1631
+ easeOutQuint: [0.22, 1, 0.36, 1],
1632
+ easeInOutQuint: [0.83, 0, 0.17, 1],
1633
+ easeInExpo: [0.7, 0, 0.84, 0],
1634
+ easeOutExpo: [0.16, 1, 0.3, 1],
1635
+ easeInOutExpo: [0.87, 0, 0.13, 1],
1636
+ easeInCirc: [0.55, 0, 1, 0.45],
1637
+ easeOutCirc: [0, 0.55, 0.45, 1],
1638
+ easeInOutCirc: [0.85, 0, 0.15, 1],
1639
+ easeInBack: [0.36, 0, 0.66, -0.56],
1640
+ easeOutBack: [0.34, 1.56, 0.64, 1],
1641
+ easeInOutBack: [0.68, -0.6, 0.32, 1.6]
1642
+ };
1643
+ Yn({
1644
+ linear: zn
1645
+ }, er);
1646
+ let ue;
1647
+ const ct = { triggerProxySso: "triggerProxySso" }, tr = () => {
1648
+ ue = (e) => {
1649
+ var n;
1650
+ const { origin: t } = new URL(location.href);
1651
+ (n = window.top) == null || n.postMessage(
1652
+ { type: ct.triggerProxySso, data: { ...e || {}, redirect_uri: `${t}/` } },
1653
+ t
1654
+ );
1655
+ };
1656
+ }, nr = (e) => {
1657
+ window.top === window.self && window.addEventListener("message", (t) => {
1658
+ const { type: n, data: r } = t.data;
1659
+ n === ct.triggerProxySso && (e == null || e(r));
1660
+ });
1661
+ };
1662
+ window.top !== window.self && tr();
1663
+ let ut = (e = 21) => {
1664
+ let t = "", n = crypto.getRandomValues(new Uint8Array(e));
1665
+ for (; e--; ) {
1666
+ let r = n[e] & 63;
1667
+ r < 36 ? t += r.toString(36) : r < 62 ? t += (r - 26).toString(36).toUpperCase() : r < 63 ? t += "_" : t += "-";
1668
+ }
1669
+ return t;
1670
+ };
1671
+ const lt = (e) => new URL(location.href).searchParams.get(e), N = {
1672
+ oauth: "/api/justauth/oauth-server/v1/visitor/oauth/authorize",
1673
+ // 重定向到登录页
1674
+ logoutCurpage: "/api/justauth/oauth-server/v1/visitor/logout-curpage",
1675
+ // 清除登录信息
1676
+ token: "/api/justauth/oauth-server/v1/visitor/oauth/token"
1677
+ // 通过code获取token
1678
+ }, { baseURL: Le, noRedireLogin: rr = !1 } = fe(), I = location.origin + "/home", C = {
1679
+ response_type: "code",
1680
+ scope: "sever",
1681
+ client_id: "sys",
1682
+ client_secret: wt("das123"),
1683
+ state: +/* @__PURE__ */ new Date()
1684
+ }, or = () => {
1685
+ const e = ve(location.href, "redirect_url") || "";
1686
+ if (e)
1687
+ window.__isAutoCloseApp = !1, window.location.replace(decodeURIComponent(e));
1688
+ else {
1689
+ const t = ["code", "state", "kingdee_token", "redirect_url"];
1690
+ window.history.replaceState({}, "", Et(t));
1691
+ }
1692
+ }, ft = V(!1), dt = (e) => {
1693
+ if (e <= 0) return;
1694
+ const { idle: t } = Qn(e);
1695
+ le(
1696
+ () => t.value,
1697
+ (n) => {
1698
+ n === !0 && (ft.value = !0);
1699
+ }
1700
+ );
1701
+ };
1702
+ localStorage.getItem("idelTime") && dt(Number(localStorage.getItem("idelTime")));
1703
+ const sr = async () => {
1704
+ const e = lt("code") || "";
1705
+ if (!e) return L();
1706
+ const t = ve(location.href, "kingdee_token") || "";
1707
+ let n = {};
1708
+ const r = {
1709
+ grant_type: "authorization_code",
1710
+ code: e,
1711
+ client_id: C.client_id,
1712
+ client_secret: C.client_secret,
1713
+ redirect_uri: I,
1714
+ timestamp: (/* @__PURE__ */ new Date()).getTime(),
1715
+ nonce: ut()
1716
+ };
1717
+ t && (sessionStorage.setItem("kingdee_token", t), r.redirect_uri = `${r.redirect_uri}?kingdee_token=${t}`);
1718
+ try {
1719
+ await w.create().get(N.token, { baseURL: Le });
1720
+ } catch {
1721
+ }
1722
+ try {
1723
+ n = await w.create().post(
1724
+ N.token,
1725
+ {},
1726
+ {
1727
+ baseURL: Le,
1728
+ params: r,
1729
+ headers: {
1730
+ "Content-Type": "application/x-www-form-urlencoded",
1731
+ "csrf-token": Hn.get("csrf-token")
1732
+ }
1733
+ }
1734
+ );
1735
+ const { access_token: o = "", expires_in: s = 0, refresh_token: i = "", refresh_exp: c = 0 } = n.data, f = {
1736
+ accessToken: o,
1737
+ accessTokenExpiredAt: +/* @__PURE__ */ new Date() + Number(s) * 1e3,
1738
+ refreshToken: i,
1739
+ info: n.data
1740
+ };
1741
+ j().save(f), await Ie(o);
1742
+ const d = Number(c) - (/* @__PURE__ */ new Date()).getTime();
1743
+ return d && d > 0 && (dt(d), d && localStorage.setItem("idelTime", d.toString())), or(), o;
1744
+ } catch {
1745
+ return B({ ...C, redirect_uri: I });
1746
+ }
1747
+ }, F = V(!1), Ur = async (e) => {
1748
+ if (e.public) return "";
1749
+ if (ft.value) return B({ ...C, redirect_uri: I });
1750
+ if (F.value)
1751
+ return await new Promise(async (o) => {
1752
+ le(
1753
+ () => F.value,
1754
+ (s) => {
1755
+ if (!s) {
1756
+ const i = L();
1757
+ o(i);
1758
+ }
1759
+ }
1760
+ );
1761
+ });
1762
+ const { accessTokenExpiredAt: t } = j().getData(), n = lt("code") || "";
1763
+ if ((!L() || t === 0) && !n)
1764
+ return B({ ...C, redirect_uri: I });
1765
+ let r = L();
1766
+ F.value = !0;
1767
+ try {
1768
+ typeof t == "number" && t > 0 && +/* @__PURE__ */ new Date() + 6e4 > t && (r = await ir(C)), r = await sr(), F.value = !1;
1769
+ } catch {
1770
+ F.value = !1;
1771
+ }
1772
+ return r;
1773
+ }, B = (e) => {
1774
+ if (rr) return;
1775
+ const { baseURL: t, ssoLocale: n } = fe();
1776
+ if (ue) return ue(e);
1777
+ e.logout = "true", n && (e.locale = "locale");
1778
+ const r = Object.keys(e).filter((s) => s !== "client_secret").map((s) => `${s}=${e[s]}`).join("&"), o = `${t}${N.oauth}?${r}`;
1779
+ localStorage.removeItem("idelTime"), sessionStorage.clear(), j().remove();
1780
+ try {
1781
+ w.create().get(N.logoutCurpage, { baseURL: t });
1782
+ } catch {
1783
+ }
1784
+ window.__isAutoCloseApp = !1, location.replace(o);
1785
+ };
1786
+ nr(B);
1787
+ const ir = async (e) => {
1788
+ const { baseURL: t } = fe(), { refreshToken: n } = j().getData();
1789
+ try {
1790
+ await w.create().get(N.token, { baseURL: t });
1791
+ } catch {
1792
+ }
1793
+ try {
1794
+ const r = await w.create().post(
1795
+ N.token,
1796
+ {},
1797
+ {
1798
+ baseURL: t,
1799
+ params: {
1800
+ refresh_token: n,
1801
+ grant_type: "refresh_token",
1802
+ client_id: e.client_id,
1803
+ client_secret: e.client_secret,
1804
+ timestamp: (/* @__PURE__ */ new Date()).getTime(),
1805
+ nonce: ut()
1806
+ }
1807
+ }
1808
+ ), { access_token: o = "", expires_in: s = 0, refresh_token: i = "" } = r.data, c = {
1809
+ accessToken: o,
1810
+ accessTokenExpiredAt: +/* @__PURE__ */ new Date() + Number(s) * 1e3,
1811
+ refreshToken: i,
1812
+ info: r.data
1813
+ };
1814
+ return j().save(c), await Ie(o), o;
1815
+ } catch {
1816
+ return B({ ...e, redirect_uri: I });
1817
+ }
1818
+ }, j = () => ({
1819
+ getData: () => ({
1820
+ accessToken: L(),
1821
+ accessTokenExpiredAt: X("accessTokenExpiredAt") ? Number(X("accessTokenExpiredAt")) : "",
1822
+ refreshToken: X("refreshToken")
1823
+ }),
1824
+ save: (e) => {
1825
+ bt(
1826
+ e.accessToken || "",
1827
+ {
1828
+ accessTokenExpiredAt: e.accessTokenExpiredAt,
1829
+ refreshToken: e.refreshToken
1830
+ }
1831
+ ), Ot(e);
1832
+ },
1833
+ remove: () => {
1834
+ gt(), St();
1835
+ }
1836
+ });
1837
+ export {
1838
+ lt as getQuery,
1839
+ Ur as getToken,
1840
+ sr as getTokenFromCode,
1841
+ C as getTokenParams,
1842
+ B as login,
1843
+ I as real_uri,
1844
+ j as tokenStorage
1845
+ };