@rainte/ant 0.0.8 → 0.0.10

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.
@@ -1,5 +1,5 @@
1
- import { g as z } from "./index-CsEeaIkk.js";
2
- function G(w, d) {
1
+ import { c as R, g as z } from "./index-CPz4e4Y1.js";
2
+ function $(w, d) {
3
3
  for (var b = 0; b < d.length; b++) {
4
4
  const y = d[b];
5
5
  if (typeof y != "string" && !Array.isArray(y)) {
@@ -15,10 +15,10 @@ function G(w, d) {
15
15
  }
16
16
  return Object.freeze(Object.defineProperty(w, Symbol.toStringTag, { value: "Module" }));
17
17
  }
18
- var A = { exports: {} }, R;
19
- function $() {
20
- return R || (R = 1, function(w, d) {
21
- var b = typeof globalThis < "u" && globalThis || typeof self < "u" && self || typeof window < "u" && window, y = function() {
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
22
  function p() {
23
23
  this.fetch = !1, this.DOMException = b.DOMException;
24
24
  }
@@ -39,11 +39,11 @@ function $() {
39
39
  formData: "FormData" in a,
40
40
  arrayBuffer: "ArrayBuffer" in a
41
41
  };
42
- function j(e) {
42
+ function S(e) {
43
43
  return e && DataView.prototype.isPrototypeOf(e);
44
44
  }
45
45
  if (f.arrayBuffer)
46
- var S = [
46
+ var F = [
47
47
  "[object Int8Array]",
48
48
  "[object Uint8Array]",
49
49
  "[object Uint8ClampedArray]",
@@ -53,8 +53,8 @@ function $() {
53
53
  "[object Uint32Array]",
54
54
  "[object Float32Array]",
55
55
  "[object Float64Array]"
56
- ], F = ArrayBuffer.isView || function(e) {
57
- return e && S.indexOf(Object.prototype.toString.call(e)) > -1;
56
+ ], I = ArrayBuffer.isView || function(e) {
57
+ return e && F.indexOf(Object.prototype.toString.call(e)) > -1;
58
58
  };
59
59
  function v(e) {
60
60
  if (typeof e != "string" && (e = String(e)), /[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(e) || e === "")
@@ -129,15 +129,15 @@ function $() {
129
129
  };
130
130
  });
131
131
  }
132
- function I(e) {
132
+ function M(e) {
133
133
  var t = new FileReader(), r = P(t);
134
134
  return t.readAsArrayBuffer(e), r;
135
135
  }
136
- function M(e) {
136
+ function q(e) {
137
137
  var t = new FileReader(), r = P(t);
138
138
  return t.readAsText(e), r;
139
139
  }
140
- function q(e) {
140
+ function H(e) {
141
141
  for (var t = new Uint8Array(e), r = new Array(t.length), n = 0; n < t.length; n++)
142
142
  r[n] = String.fromCharCode(t[n]);
143
143
  return r.join("");
@@ -150,7 +150,7 @@ function $() {
150
150
  }
151
151
  function x() {
152
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 && j(e) ? (this._bodyArrayBuffer = D(e.buffer), this._bodyInit = new Blob([this._bodyArrayBuffer])) : f.arrayBuffer && (ArrayBuffer.prototype.isPrototypeOf(e) || F(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"));
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
154
  }, f.blob && (this.blob = function() {
155
155
  var e = B(this);
156
156
  if (e)
@@ -172,28 +172,28 @@ function $() {
172
172
  )
173
173
  ) : Promise.resolve(this._bodyArrayBuffer));
174
174
  } else
175
- return this.blob().then(I);
175
+ return this.blob().then(M);
176
176
  }), this.text = function() {
177
177
  var e = B(this);
178
178
  if (e)
179
179
  return e;
180
180
  if (this._bodyBlob)
181
- return M(this._bodyBlob);
181
+ return q(this._bodyBlob);
182
182
  if (this._bodyArrayBuffer)
183
- return Promise.resolve(q(this._bodyArrayBuffer));
183
+ return Promise.resolve(H(this._bodyArrayBuffer));
184
184
  if (this._bodyFormData)
185
185
  throw new Error("could not read FormData body as text");
186
186
  return Promise.resolve(this._bodyText);
187
187
  }, f.formData && (this.formData = function() {
188
- return this.text().then(C);
188
+ return this.text().then(k);
189
189
  }), this.json = function() {
190
190
  return this.text().then(JSON.parse);
191
191
  }, this;
192
192
  }
193
- var H = ["DELETE", "GET", "HEAD", "OPTIONS", "POST", "PUT"];
194
- function L(e) {
193
+ var L = ["DELETE", "GET", "HEAD", "OPTIONS", "POST", "PUT"];
194
+ function C(e) {
195
195
  var t = e.toUpperCase();
196
- return H.indexOf(t) > -1 ? t : e;
196
+ return L.indexOf(t) > -1 ? t : e;
197
197
  }
198
198
  function m(e, t) {
199
199
  if (!(this instanceof m))
@@ -206,7 +206,7 @@ function $() {
206
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
207
  } else
208
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 = L(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)
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
210
  throw new TypeError("Body not allowed for GET or HEAD requests");
211
211
  if (this._initBody(r), (this.method === "GET" || this.method === "HEAD") && (t.cache === "no-store" || t.cache === "no-cache")) {
212
212
  var n = /([?&])_=[^&]*/;
@@ -221,7 +221,7 @@ function $() {
221
221
  m.prototype.clone = function() {
222
222
  return new m(this, { body: this._bodyInit });
223
223
  };
224
- function C(e) {
224
+ function k(e) {
225
225
  var t = new FormData();
226
226
  return e.trim().split("&").forEach(function(r) {
227
227
  if (r) {
@@ -230,7 +230,7 @@ function $() {
230
230
  }
231
231
  }), t;
232
232
  }
233
- function k(e) {
233
+ function N(e) {
234
234
  var t = new s(), r = e.replace(/\r?\n[\t ]+/g, " ");
235
235
  return r.split("\r").map(function(n) {
236
236
  return n.indexOf(`
@@ -260,9 +260,9 @@ function $() {
260
260
  var e = new c(null, { status: 0, statusText: "" });
261
261
  return e.type = "error", e;
262
262
  };
263
- var N = [301, 302, 303, 307, 308];
263
+ var G = [301, 302, 303, 307, 308];
264
264
  c.redirect = function(e, t) {
265
- if (N.indexOf(t) === -1)
265
+ if (G.indexOf(t) === -1)
266
266
  throw new RangeError("Invalid status code");
267
267
  return new c(null, { status: t, headers: { location: e } });
268
268
  }, u.DOMException = a.DOMException;
@@ -288,7 +288,7 @@ function $() {
288
288
  var l = {
289
289
  status: o.status,
290
290
  statusText: o.statusText,
291
- headers: k(o.getAllResponseHeaders() || "")
291
+ headers: N(o.getAllResponseHeaders() || "")
292
292
  };
293
293
  l.url = "responseURL" in o ? o.responseURL : l.headers.get("X-Request-URL");
294
294
  var g = "response" in o ? o.response : o.responseText;
@@ -331,11 +331,11 @@ function $() {
331
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
332
  }(A, A.exports)), A.exports;
333
333
  }
334
- var U = $();
335
- const X = /* @__PURE__ */ z(U), K = /* @__PURE__ */ G({
334
+ var j = X();
335
+ const J = /* @__PURE__ */ z(j), Q = /* @__PURE__ */ $({
336
336
  __proto__: null,
337
- default: X
338
- }, [U]);
337
+ default: J
338
+ }, [j]);
339
339
  export {
340
- K as b
340
+ Q as b
341
341
  };