@rainte/ant 0.0.55 → 0.0.56
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.
- package/dist/browser-ponyfill-B_NmYAlA.js +366 -0
- package/dist/{index-Od5Wmvam.js → index-Bpi8Scy9.js} +2445 -2310
- package/dist/index.css +1 -1
- package/dist/index.js +1 -1
- package/dist/index.umd.cjs +47 -46
- package/dist/types/src/components/Form/index.d.ts +2 -1
- package/dist/types/src/utils/dialog.d.ts +2 -2
- package/package.json +73 -73
- package/dist/browser-ponyfill-BYpaSRmp.js +0 -341
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ComponentProps } from 'react';
|
|
2
2
|
import { BetaSchemaForm, FormInstance } from '@ant-design/pro-components';
|
|
3
|
-
|
|
3
|
+
import { ValueTypeProps } from '@/components/Provider';
|
|
4
|
+
export type FormProps<T = any, ValueType = ValueTypeProps> = ComponentProps<typeof BetaSchemaForm<T, ValueType>> & {
|
|
4
5
|
form?: FormInstance;
|
|
5
6
|
};
|
|
6
7
|
export declare const useForm: () => FormInstance;
|
|
@@ -10,13 +10,13 @@ export default useDialog;
|
|
|
10
10
|
declare const popup: {
|
|
11
11
|
confirm: (props: ModalFuncProps) => {
|
|
12
12
|
destroy: () => void;
|
|
13
|
-
update: (configUpdate:
|
|
13
|
+
update: (configUpdate: import("antd/es/modal/confirm").ConfigUpdate) => void;
|
|
14
14
|
};
|
|
15
15
|
success: (content?: JointContent, duration?: number | VoidFunction) => import("antd/es/message/interface").MessageType;
|
|
16
16
|
error: (content?: string, duration?: number | VoidFunction) => never;
|
|
17
17
|
ask: (onOk: (...args: any[]) => any, props?: ModalFuncProps) => {
|
|
18
18
|
destroy: () => void;
|
|
19
|
-
update: (configUpdate:
|
|
19
|
+
update: (configUpdate: import("antd/es/modal/confirm").ConfigUpdate) => void;
|
|
20
20
|
};
|
|
21
21
|
};
|
|
22
22
|
export { message, notification, modal, popup, useDialog };
|
package/package.json
CHANGED
|
@@ -1,73 +1,73 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@rainte/ant",
|
|
3
|
-
"version": "0.0.
|
|
4
|
-
"type": "module",
|
|
5
|
-
"publishConfig": {
|
|
6
|
-
"access": "public"
|
|
7
|
-
},
|
|
8
|
-
"files": [
|
|
9
|
-
"dist"
|
|
10
|
-
],
|
|
11
|
-
"main": "./dist/index.umd.cjs",
|
|
12
|
-
"module": "./dist/index.js",
|
|
13
|
-
"types": "./dist/types/lib/index.d.ts",
|
|
14
|
-
"exports": {
|
|
15
|
-
".": {
|
|
16
|
-
"types": "./dist/types/lib/index.d.ts",
|
|
17
|
-
"import": "./dist/index.js",
|
|
18
|
-
"require": "./dist/index.umd.cjs"
|
|
19
|
-
}
|
|
20
|
-
},
|
|
21
|
-
"scripts": {
|
|
22
|
-
"dev": "vite",
|
|
23
|
-
"build": "vite build && tsc",
|
|
24
|
-
"preview": "vite preview",
|
|
25
|
-
"overhaul": "pnpm up -L --registry=https://registry.npmjs.org",
|
|
26
|
-
"commit": "git add -A && git commit -m commit && git push || git push",
|
|
27
|
-
"release": "npm publish --registry=https://registry.npmjs.org",
|
|
28
|
-
"prepublishOnly": "npm run build && npm run commit && npm version patch",
|
|
29
|
-
"postpublish": "git push"
|
|
30
|
-
},
|
|
31
|
-
"dependencies": {
|
|
32
|
-
"@ant-design/pro-components": "^2.8.6",
|
|
33
|
-
"@rainte/js": "^0.0.49",
|
|
34
|
-
"antd": "^5.24.5",
|
|
35
|
-
"i18next": "^24.2.3",
|
|
36
|
-
"i18next-browser-languagedetector": "^8.0.4",
|
|
37
|
-
"i18next-http-backend": "^3.0.2",
|
|
38
|
-
"quill": "^2.0.3",
|
|
39
|
-
"react": "19.1.0",
|
|
40
|
-
"react-dom": "19.1.0",
|
|
41
|
-
"react-i18next": "^15.4.1",
|
|
42
|
-
"react-icons": "^5.5.0",
|
|
43
|
-
"react-router-dom": "^7.4.1"
|
|
44
|
-
},
|
|
45
|
-
"devDependencies": {
|
|
46
|
-
"@types/node": "^22.13.14",
|
|
47
|
-
"@types/react": "^19.0.12",
|
|
48
|
-
"@types/react-dom": "^19.0.4",
|
|
49
|
-
"@typescript-eslint/eslint-plugin": "^8.28.0",
|
|
50
|
-
"@typescript-eslint/parser": "^8.28.0",
|
|
51
|
-
"@vitejs/plugin-react-swc": "^3.8.1",
|
|
52
|
-
"eslint": "^9.23.0",
|
|
53
|
-
"eslint-plugin-react-hooks": "^5.2.0",
|
|
54
|
-
"eslint-plugin-react-refresh": "^0.4.19",
|
|
55
|
-
"typescript": "^5.8.2",
|
|
56
|
-
"vite": "^6.2.3"
|
|
57
|
-
},
|
|
58
|
-
"peerDependencies": {
|
|
59
|
-
"@ant-design/pro-components": "*",
|
|
60
|
-
"@rainte/js": "*",
|
|
61
|
-
"antd": "*",
|
|
62
|
-
"react": "*",
|
|
63
|
-
"react-dom": "*",
|
|
64
|
-
"react-icons": "*",
|
|
65
|
-
"react-router-dom": "*"
|
|
66
|
-
},
|
|
67
|
-
"pnpm": {
|
|
68
|
-
"overrides": {
|
|
69
|
-
"react": "18.3.1",
|
|
70
|
-
"react-dom": "18.3.1"
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@rainte/ant",
|
|
3
|
+
"version": "0.0.56",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"publishConfig": {
|
|
6
|
+
"access": "public"
|
|
7
|
+
},
|
|
8
|
+
"files": [
|
|
9
|
+
"dist"
|
|
10
|
+
],
|
|
11
|
+
"main": "./dist/index.umd.cjs",
|
|
12
|
+
"module": "./dist/index.js",
|
|
13
|
+
"types": "./dist/types/lib/index.d.ts",
|
|
14
|
+
"exports": {
|
|
15
|
+
".": {
|
|
16
|
+
"types": "./dist/types/lib/index.d.ts",
|
|
17
|
+
"import": "./dist/index.js",
|
|
18
|
+
"require": "./dist/index.umd.cjs"
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
"scripts": {
|
|
22
|
+
"dev": "vite",
|
|
23
|
+
"build": "vite build && tsc",
|
|
24
|
+
"preview": "vite preview",
|
|
25
|
+
"overhaul": "pnpm up -L --registry=https://registry.npmjs.org",
|
|
26
|
+
"commit": "git add -A && git commit -m commit && git push || git push",
|
|
27
|
+
"release": "npm publish --registry=https://registry.npmjs.org",
|
|
28
|
+
"prepublishOnly": "npm run build && npm run commit && npm version patch",
|
|
29
|
+
"postpublish": "git push"
|
|
30
|
+
},
|
|
31
|
+
"dependencies": {
|
|
32
|
+
"@ant-design/pro-components": "^2.8.6",
|
|
33
|
+
"@rainte/js": "^0.0.49",
|
|
34
|
+
"antd": "^5.24.5",
|
|
35
|
+
"i18next": "^24.2.3",
|
|
36
|
+
"i18next-browser-languagedetector": "^8.0.4",
|
|
37
|
+
"i18next-http-backend": "^3.0.2",
|
|
38
|
+
"quill": "^2.0.3",
|
|
39
|
+
"react": "19.1.0",
|
|
40
|
+
"react-dom": "19.1.0",
|
|
41
|
+
"react-i18next": "^15.4.1",
|
|
42
|
+
"react-icons": "^5.5.0",
|
|
43
|
+
"react-router-dom": "^7.4.1"
|
|
44
|
+
},
|
|
45
|
+
"devDependencies": {
|
|
46
|
+
"@types/node": "^22.13.14",
|
|
47
|
+
"@types/react": "^19.0.12",
|
|
48
|
+
"@types/react-dom": "^19.0.4",
|
|
49
|
+
"@typescript-eslint/eslint-plugin": "^8.28.0",
|
|
50
|
+
"@typescript-eslint/parser": "^8.28.0",
|
|
51
|
+
"@vitejs/plugin-react-swc": "^3.8.1",
|
|
52
|
+
"eslint": "^9.23.0",
|
|
53
|
+
"eslint-plugin-react-hooks": "^5.2.0",
|
|
54
|
+
"eslint-plugin-react-refresh": "^0.4.19",
|
|
55
|
+
"typescript": "^5.8.2",
|
|
56
|
+
"vite": "^6.2.3"
|
|
57
|
+
},
|
|
58
|
+
"peerDependencies": {
|
|
59
|
+
"@ant-design/pro-components": "*",
|
|
60
|
+
"@rainte/js": "*",
|
|
61
|
+
"antd": "*",
|
|
62
|
+
"react": "*",
|
|
63
|
+
"react-dom": "*",
|
|
64
|
+
"react-icons": "*",
|
|
65
|
+
"react-router-dom": "*"
|
|
66
|
+
},
|
|
67
|
+
"pnpm": {
|
|
68
|
+
"overrides": {
|
|
69
|
+
"react": "18.3.1",
|
|
70
|
+
"react-dom": "18.3.1"
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
}
|
|
@@ -1,341 +0,0 @@
|
|
|
1
|
-
import { c as R, g as z } from "./index-Od5Wmvam.js";
|
|
2
|
-
function $(w, d) {
|
|
3
|
-
for (var b = 0; b < d.length; b++) {
|
|
4
|
-
const y = d[b];
|
|
5
|
-
if (typeof y != "string" && !Array.isArray(y)) {
|
|
6
|
-
for (const h in y)
|
|
7
|
-
if (h !== "default" && !(h in w)) {
|
|
8
|
-
const p = Object.getOwnPropertyDescriptor(y, h);
|
|
9
|
-
p && Object.defineProperty(w, h, p.get ? p : {
|
|
10
|
-
enumerable: !0,
|
|
11
|
-
get: () => y[h]
|
|
12
|
-
});
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
return Object.freeze(Object.defineProperty(w, Symbol.toStringTag, { value: "Module" }));
|
|
17
|
-
}
|
|
18
|
-
var A = { exports: {} }, U;
|
|
19
|
-
function X() {
|
|
20
|
-
return U || (U = 1, function(w, d) {
|
|
21
|
-
var b = typeof globalThis < "u" && globalThis || typeof self < "u" && self || typeof R < "u" && R, y = function() {
|
|
22
|
-
function p() {
|
|
23
|
-
this.fetch = !1, this.DOMException = b.DOMException;
|
|
24
|
-
}
|
|
25
|
-
return p.prototype = b, new p();
|
|
26
|
-
}();
|
|
27
|
-
(function(p) {
|
|
28
|
-
(function(u) {
|
|
29
|
-
var a = typeof p < "u" && p || typeof self < "u" && self || typeof a < "u" && a, f = {
|
|
30
|
-
searchParams: "URLSearchParams" in a,
|
|
31
|
-
iterable: "Symbol" in a && "iterator" in Symbol,
|
|
32
|
-
blob: "FileReader" in a && "Blob" in a && function() {
|
|
33
|
-
try {
|
|
34
|
-
return new Blob(), !0;
|
|
35
|
-
} catch {
|
|
36
|
-
return !1;
|
|
37
|
-
}
|
|
38
|
-
}(),
|
|
39
|
-
formData: "FormData" in a,
|
|
40
|
-
arrayBuffer: "ArrayBuffer" in a
|
|
41
|
-
};
|
|
42
|
-
function S(e) {
|
|
43
|
-
return e && DataView.prototype.isPrototypeOf(e);
|
|
44
|
-
}
|
|
45
|
-
if (f.arrayBuffer)
|
|
46
|
-
var F = [
|
|
47
|
-
"[object Int8Array]",
|
|
48
|
-
"[object Uint8Array]",
|
|
49
|
-
"[object Uint8ClampedArray]",
|
|
50
|
-
"[object Int16Array]",
|
|
51
|
-
"[object Uint16Array]",
|
|
52
|
-
"[object Int32Array]",
|
|
53
|
-
"[object Uint32Array]",
|
|
54
|
-
"[object Float32Array]",
|
|
55
|
-
"[object Float64Array]"
|
|
56
|
-
], I = ArrayBuffer.isView || function(e) {
|
|
57
|
-
return e && F.indexOf(Object.prototype.toString.call(e)) > -1;
|
|
58
|
-
};
|
|
59
|
-
function v(e) {
|
|
60
|
-
if (typeof e != "string" && (e = String(e)), /[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(e) || e === "")
|
|
61
|
-
throw new TypeError('Invalid character in header field name: "' + e + '"');
|
|
62
|
-
return e.toLowerCase();
|
|
63
|
-
}
|
|
64
|
-
function E(e) {
|
|
65
|
-
return typeof e != "string" && (e = String(e)), e;
|
|
66
|
-
}
|
|
67
|
-
function T(e) {
|
|
68
|
-
var t = {
|
|
69
|
-
next: function() {
|
|
70
|
-
var r = e.shift();
|
|
71
|
-
return { done: r === void 0, value: r };
|
|
72
|
-
}
|
|
73
|
-
};
|
|
74
|
-
return f.iterable && (t[Symbol.iterator] = function() {
|
|
75
|
-
return t;
|
|
76
|
-
}), t;
|
|
77
|
-
}
|
|
78
|
-
function s(e) {
|
|
79
|
-
this.map = {}, e instanceof s ? e.forEach(function(t, r) {
|
|
80
|
-
this.append(r, t);
|
|
81
|
-
}, this) : Array.isArray(e) ? e.forEach(function(t) {
|
|
82
|
-
this.append(t[0], t[1]);
|
|
83
|
-
}, this) : e && Object.getOwnPropertyNames(e).forEach(function(t) {
|
|
84
|
-
this.append(t, e[t]);
|
|
85
|
-
}, this);
|
|
86
|
-
}
|
|
87
|
-
s.prototype.append = function(e, t) {
|
|
88
|
-
e = v(e), t = E(t);
|
|
89
|
-
var r = this.map[e];
|
|
90
|
-
this.map[e] = r ? r + ", " + t : t;
|
|
91
|
-
}, s.prototype.delete = function(e) {
|
|
92
|
-
delete this.map[v(e)];
|
|
93
|
-
}, s.prototype.get = function(e) {
|
|
94
|
-
return e = v(e), this.has(e) ? this.map[e] : null;
|
|
95
|
-
}, s.prototype.has = function(e) {
|
|
96
|
-
return this.map.hasOwnProperty(v(e));
|
|
97
|
-
}, s.prototype.set = function(e, t) {
|
|
98
|
-
this.map[v(e)] = E(t);
|
|
99
|
-
}, s.prototype.forEach = function(e, t) {
|
|
100
|
-
for (var r in this.map)
|
|
101
|
-
this.map.hasOwnProperty(r) && e.call(t, this.map[r], r, this);
|
|
102
|
-
}, s.prototype.keys = function() {
|
|
103
|
-
var e = [];
|
|
104
|
-
return this.forEach(function(t, r) {
|
|
105
|
-
e.push(r);
|
|
106
|
-
}), T(e);
|
|
107
|
-
}, s.prototype.values = function() {
|
|
108
|
-
var e = [];
|
|
109
|
-
return this.forEach(function(t) {
|
|
110
|
-
e.push(t);
|
|
111
|
-
}), T(e);
|
|
112
|
-
}, s.prototype.entries = function() {
|
|
113
|
-
var e = [];
|
|
114
|
-
return this.forEach(function(t, r) {
|
|
115
|
-
e.push([r, t]);
|
|
116
|
-
}), T(e);
|
|
117
|
-
}, f.iterable && (s.prototype[Symbol.iterator] = s.prototype.entries);
|
|
118
|
-
function B(e) {
|
|
119
|
-
if (e.bodyUsed)
|
|
120
|
-
return Promise.reject(new TypeError("Already read"));
|
|
121
|
-
e.bodyUsed = !0;
|
|
122
|
-
}
|
|
123
|
-
function P(e) {
|
|
124
|
-
return new Promise(function(t, r) {
|
|
125
|
-
e.onload = function() {
|
|
126
|
-
t(e.result);
|
|
127
|
-
}, e.onerror = function() {
|
|
128
|
-
r(e.error);
|
|
129
|
-
};
|
|
130
|
-
});
|
|
131
|
-
}
|
|
132
|
-
function M(e) {
|
|
133
|
-
var t = new FileReader(), r = P(t);
|
|
134
|
-
return t.readAsArrayBuffer(e), r;
|
|
135
|
-
}
|
|
136
|
-
function q(e) {
|
|
137
|
-
var t = new FileReader(), r = P(t);
|
|
138
|
-
return t.readAsText(e), r;
|
|
139
|
-
}
|
|
140
|
-
function H(e) {
|
|
141
|
-
for (var t = new Uint8Array(e), r = new Array(t.length), n = 0; n < t.length; n++)
|
|
142
|
-
r[n] = String.fromCharCode(t[n]);
|
|
143
|
-
return r.join("");
|
|
144
|
-
}
|
|
145
|
-
function D(e) {
|
|
146
|
-
if (e.slice)
|
|
147
|
-
return e.slice(0);
|
|
148
|
-
var t = new Uint8Array(e.byteLength);
|
|
149
|
-
return t.set(new Uint8Array(e)), t.buffer;
|
|
150
|
-
}
|
|
151
|
-
function x() {
|
|
152
|
-
return this.bodyUsed = !1, this._initBody = function(e) {
|
|
153
|
-
this.bodyUsed = this.bodyUsed, this._bodyInit = e, e ? typeof e == "string" ? this._bodyText = e : f.blob && Blob.prototype.isPrototypeOf(e) ? this._bodyBlob = e : f.formData && FormData.prototype.isPrototypeOf(e) ? this._bodyFormData = e : f.searchParams && URLSearchParams.prototype.isPrototypeOf(e) ? this._bodyText = e.toString() : f.arrayBuffer && f.blob && S(e) ? (this._bodyArrayBuffer = D(e.buffer), this._bodyInit = new Blob([this._bodyArrayBuffer])) : f.arrayBuffer && (ArrayBuffer.prototype.isPrototypeOf(e) || I(e)) ? this._bodyArrayBuffer = D(e) : this._bodyText = e = Object.prototype.toString.call(e) : this._bodyText = "", this.headers.get("content-type") || (typeof e == "string" ? this.headers.set("content-type", "text/plain;charset=UTF-8") : this._bodyBlob && this._bodyBlob.type ? this.headers.set("content-type", this._bodyBlob.type) : f.searchParams && URLSearchParams.prototype.isPrototypeOf(e) && this.headers.set("content-type", "application/x-www-form-urlencoded;charset=UTF-8"));
|
|
154
|
-
}, f.blob && (this.blob = function() {
|
|
155
|
-
var e = B(this);
|
|
156
|
-
if (e)
|
|
157
|
-
return e;
|
|
158
|
-
if (this._bodyBlob)
|
|
159
|
-
return Promise.resolve(this._bodyBlob);
|
|
160
|
-
if (this._bodyArrayBuffer)
|
|
161
|
-
return Promise.resolve(new Blob([this._bodyArrayBuffer]));
|
|
162
|
-
if (this._bodyFormData)
|
|
163
|
-
throw new Error("could not read FormData body as blob");
|
|
164
|
-
return Promise.resolve(new Blob([this._bodyText]));
|
|
165
|
-
}, this.arrayBuffer = function() {
|
|
166
|
-
if (this._bodyArrayBuffer) {
|
|
167
|
-
var e = B(this);
|
|
168
|
-
return e || (ArrayBuffer.isView(this._bodyArrayBuffer) ? Promise.resolve(
|
|
169
|
-
this._bodyArrayBuffer.buffer.slice(
|
|
170
|
-
this._bodyArrayBuffer.byteOffset,
|
|
171
|
-
this._bodyArrayBuffer.byteOffset + this._bodyArrayBuffer.byteLength
|
|
172
|
-
)
|
|
173
|
-
) : Promise.resolve(this._bodyArrayBuffer));
|
|
174
|
-
} else
|
|
175
|
-
return this.blob().then(M);
|
|
176
|
-
}), this.text = function() {
|
|
177
|
-
var e = B(this);
|
|
178
|
-
if (e)
|
|
179
|
-
return e;
|
|
180
|
-
if (this._bodyBlob)
|
|
181
|
-
return q(this._bodyBlob);
|
|
182
|
-
if (this._bodyArrayBuffer)
|
|
183
|
-
return Promise.resolve(H(this._bodyArrayBuffer));
|
|
184
|
-
if (this._bodyFormData)
|
|
185
|
-
throw new Error("could not read FormData body as text");
|
|
186
|
-
return Promise.resolve(this._bodyText);
|
|
187
|
-
}, f.formData && (this.formData = function() {
|
|
188
|
-
return this.text().then(k);
|
|
189
|
-
}), this.json = function() {
|
|
190
|
-
return this.text().then(JSON.parse);
|
|
191
|
-
}, this;
|
|
192
|
-
}
|
|
193
|
-
var L = ["DELETE", "GET", "HEAD", "OPTIONS", "POST", "PUT"];
|
|
194
|
-
function C(e) {
|
|
195
|
-
var t = e.toUpperCase();
|
|
196
|
-
return L.indexOf(t) > -1 ? t : e;
|
|
197
|
-
}
|
|
198
|
-
function m(e, t) {
|
|
199
|
-
if (!(this instanceof m))
|
|
200
|
-
throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');
|
|
201
|
-
t = t || {};
|
|
202
|
-
var r = t.body;
|
|
203
|
-
if (e instanceof m) {
|
|
204
|
-
if (e.bodyUsed)
|
|
205
|
-
throw new TypeError("Already read");
|
|
206
|
-
this.url = e.url, this.credentials = e.credentials, t.headers || (this.headers = new s(e.headers)), this.method = e.method, this.mode = e.mode, this.signal = e.signal, !r && e._bodyInit != null && (r = e._bodyInit, e.bodyUsed = !0);
|
|
207
|
-
} else
|
|
208
|
-
this.url = String(e);
|
|
209
|
-
if (this.credentials = t.credentials || this.credentials || "same-origin", (t.headers || !this.headers) && (this.headers = new s(t.headers)), this.method = C(t.method || this.method || "GET"), this.mode = t.mode || this.mode || null, this.signal = t.signal || this.signal, this.referrer = null, (this.method === "GET" || this.method === "HEAD") && r)
|
|
210
|
-
throw new TypeError("Body not allowed for GET or HEAD requests");
|
|
211
|
-
if (this._initBody(r), (this.method === "GET" || this.method === "HEAD") && (t.cache === "no-store" || t.cache === "no-cache")) {
|
|
212
|
-
var n = /([?&])_=[^&]*/;
|
|
213
|
-
if (n.test(this.url))
|
|
214
|
-
this.url = this.url.replace(n, "$1_=" + (/* @__PURE__ */ new Date()).getTime());
|
|
215
|
-
else {
|
|
216
|
-
var i = /\?/;
|
|
217
|
-
this.url += (i.test(this.url) ? "&" : "?") + "_=" + (/* @__PURE__ */ new Date()).getTime();
|
|
218
|
-
}
|
|
219
|
-
}
|
|
220
|
-
}
|
|
221
|
-
m.prototype.clone = function() {
|
|
222
|
-
return new m(this, { body: this._bodyInit });
|
|
223
|
-
};
|
|
224
|
-
function k(e) {
|
|
225
|
-
var t = new FormData();
|
|
226
|
-
return e.trim().split("&").forEach(function(r) {
|
|
227
|
-
if (r) {
|
|
228
|
-
var n = r.split("="), i = n.shift().replace(/\+/g, " "), o = n.join("=").replace(/\+/g, " ");
|
|
229
|
-
t.append(decodeURIComponent(i), decodeURIComponent(o));
|
|
230
|
-
}
|
|
231
|
-
}), t;
|
|
232
|
-
}
|
|
233
|
-
function N(e) {
|
|
234
|
-
var t = new s(), r = e.replace(/\r?\n[\t ]+/g, " ");
|
|
235
|
-
return r.split("\r").map(function(n) {
|
|
236
|
-
return n.indexOf(`
|
|
237
|
-
`) === 0 ? n.substr(1, n.length) : n;
|
|
238
|
-
}).forEach(function(n) {
|
|
239
|
-
var i = n.split(":"), o = i.shift().trim();
|
|
240
|
-
if (o) {
|
|
241
|
-
var _ = i.join(":").trim();
|
|
242
|
-
t.append(o, _);
|
|
243
|
-
}
|
|
244
|
-
}), t;
|
|
245
|
-
}
|
|
246
|
-
x.call(m.prototype);
|
|
247
|
-
function c(e, t) {
|
|
248
|
-
if (!(this instanceof c))
|
|
249
|
-
throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');
|
|
250
|
-
t || (t = {}), this.type = "default", this.status = t.status === void 0 ? 200 : t.status, this.ok = this.status >= 200 && this.status < 300, this.statusText = t.statusText === void 0 ? "" : "" + t.statusText, this.headers = new s(t.headers), this.url = t.url || "", this._initBody(e);
|
|
251
|
-
}
|
|
252
|
-
x.call(c.prototype), c.prototype.clone = function() {
|
|
253
|
-
return new c(this._bodyInit, {
|
|
254
|
-
status: this.status,
|
|
255
|
-
statusText: this.statusText,
|
|
256
|
-
headers: new s(this.headers),
|
|
257
|
-
url: this.url
|
|
258
|
-
});
|
|
259
|
-
}, c.error = function() {
|
|
260
|
-
var e = new c(null, { status: 0, statusText: "" });
|
|
261
|
-
return e.type = "error", e;
|
|
262
|
-
};
|
|
263
|
-
var G = [301, 302, 303, 307, 308];
|
|
264
|
-
c.redirect = function(e, t) {
|
|
265
|
-
if (G.indexOf(t) === -1)
|
|
266
|
-
throw new RangeError("Invalid status code");
|
|
267
|
-
return new c(null, { status: t, headers: { location: e } });
|
|
268
|
-
}, u.DOMException = a.DOMException;
|
|
269
|
-
try {
|
|
270
|
-
new u.DOMException();
|
|
271
|
-
} catch {
|
|
272
|
-
u.DOMException = function(t, r) {
|
|
273
|
-
this.message = t, this.name = r;
|
|
274
|
-
var n = Error(t);
|
|
275
|
-
this.stack = n.stack;
|
|
276
|
-
}, u.DOMException.prototype = Object.create(Error.prototype), u.DOMException.prototype.constructor = u.DOMException;
|
|
277
|
-
}
|
|
278
|
-
function O(e, t) {
|
|
279
|
-
return new Promise(function(r, n) {
|
|
280
|
-
var i = new m(e, t);
|
|
281
|
-
if (i.signal && i.signal.aborted)
|
|
282
|
-
return n(new u.DOMException("Aborted", "AbortError"));
|
|
283
|
-
var o = new XMLHttpRequest();
|
|
284
|
-
function _() {
|
|
285
|
-
o.abort();
|
|
286
|
-
}
|
|
287
|
-
o.onload = function() {
|
|
288
|
-
var l = {
|
|
289
|
-
status: o.status,
|
|
290
|
-
statusText: o.statusText,
|
|
291
|
-
headers: N(o.getAllResponseHeaders() || "")
|
|
292
|
-
};
|
|
293
|
-
l.url = "responseURL" in o ? o.responseURL : l.headers.get("X-Request-URL");
|
|
294
|
-
var g = "response" in o ? o.response : o.responseText;
|
|
295
|
-
setTimeout(function() {
|
|
296
|
-
r(new c(g, l));
|
|
297
|
-
}, 0);
|
|
298
|
-
}, o.onerror = function() {
|
|
299
|
-
setTimeout(function() {
|
|
300
|
-
n(new TypeError("Network request failed"));
|
|
301
|
-
}, 0);
|
|
302
|
-
}, o.ontimeout = function() {
|
|
303
|
-
setTimeout(function() {
|
|
304
|
-
n(new TypeError("Network request failed"));
|
|
305
|
-
}, 0);
|
|
306
|
-
}, o.onabort = function() {
|
|
307
|
-
setTimeout(function() {
|
|
308
|
-
n(new u.DOMException("Aborted", "AbortError"));
|
|
309
|
-
}, 0);
|
|
310
|
-
};
|
|
311
|
-
function V(l) {
|
|
312
|
-
try {
|
|
313
|
-
return l === "" && a.location.href ? a.location.href : l;
|
|
314
|
-
} catch {
|
|
315
|
-
return l;
|
|
316
|
-
}
|
|
317
|
-
}
|
|
318
|
-
o.open(i.method, V(i.url), !0), i.credentials === "include" ? o.withCredentials = !0 : i.credentials === "omit" && (o.withCredentials = !1), "responseType" in o && (f.blob ? o.responseType = "blob" : f.arrayBuffer && i.headers.get("Content-Type") && i.headers.get("Content-Type").indexOf("application/octet-stream") !== -1 && (o.responseType = "arraybuffer")), t && typeof t.headers == "object" && !(t.headers instanceof s) ? Object.getOwnPropertyNames(t.headers).forEach(function(l) {
|
|
319
|
-
o.setRequestHeader(l, E(t.headers[l]));
|
|
320
|
-
}) : i.headers.forEach(function(l, g) {
|
|
321
|
-
o.setRequestHeader(g, l);
|
|
322
|
-
}), i.signal && (i.signal.addEventListener("abort", _), o.onreadystatechange = function() {
|
|
323
|
-
o.readyState === 4 && i.signal.removeEventListener("abort", _);
|
|
324
|
-
}), o.send(typeof i._bodyInit > "u" ? null : i._bodyInit);
|
|
325
|
-
});
|
|
326
|
-
}
|
|
327
|
-
return O.polyfill = !0, a.fetch || (a.fetch = O, a.Headers = s, a.Request = m, a.Response = c), u.Headers = s, u.Request = m, u.Response = c, u.fetch = O, u;
|
|
328
|
-
})({});
|
|
329
|
-
})(y), y.fetch.ponyfill = !0, delete y.fetch.polyfill;
|
|
330
|
-
var h = b.fetch ? b : y;
|
|
331
|
-
d = h.fetch, d.default = h.fetch, d.fetch = h.fetch, d.Headers = h.Headers, d.Request = h.Request, d.Response = h.Response, w.exports = d;
|
|
332
|
-
}(A, A.exports)), A.exports;
|
|
333
|
-
}
|
|
334
|
-
var j = X();
|
|
335
|
-
const J = /* @__PURE__ */ z(j), Q = /* @__PURE__ */ $({
|
|
336
|
-
__proto__: null,
|
|
337
|
-
default: J
|
|
338
|
-
}, [j]);
|
|
339
|
-
export {
|
|
340
|
-
Q as b
|
|
341
|
-
};
|