@noxickon/onyx 1.0.3 → 1.0.4

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,4 +1,4 @@
1
- import * as I from "react";
1
+ import * as T from "react";
2
2
  import { useState as Ce, useRef as de, useEffect as ht, useCallback as $, useMemo as Hn } from "react";
3
3
  function as(e) {
4
4
  return e[0];
@@ -2041,8 +2041,8 @@ const qa = /* @__PURE__ */ p("$ZodObject", (e, t) => {
2041
2041
  `);
2042
2042
  }
2043
2043
  _.write("payload.value = newResult;"), _.write("return payload;");
2044
- const T = _.compile();
2045
- return (E, w) => T(g, E, w);
2044
+ const I = _.compile();
2045
+ return (E, w) => I(g, E, w);
2046
2046
  };
2047
2047
  let o;
2048
2048
  const s = bt, c = !Ri.jitless, u = c && ec.value, l = t.catchall;
@@ -3354,11 +3354,11 @@ const yr = {
3354
3354
  ), f = $(() => {
3355
3355
  let m = !0;
3356
3356
  return t && vs(t, (b, O) => {
3357
- const T = St(n, O), w = _f(b).safeParse(T);
3357
+ const I = St(n, O), w = _f(b).safeParse(I);
3358
3358
  if (w.success)
3359
3359
  h(O);
3360
3360
  else {
3361
- const x = w.error.issues.map((U) => U.message);
3361
+ const x = w.error.issues.map((j) => j.message);
3362
3362
  u(O, x), m = w.success;
3363
3363
  }
3364
3364
  }), m;
@@ -3460,17 +3460,17 @@ function mo(e, t = []) {
3460
3460
  }
3461
3461
  const Or = Symbol.for("__APOLLO_CONTEXT__");
3462
3462
  function yo() {
3463
- ee("createContext" in I, 37);
3464
- let e = I.createContext[Or];
3465
- return e || (Object.defineProperty(I.createContext, Or, {
3466
- value: e = I.createContext({}),
3463
+ ee("createContext" in T, 37);
3464
+ let e = T.createContext[Or];
3465
+ return e || (Object.defineProperty(T.createContext, Or, {
3466
+ value: e = T.createContext({}),
3467
3467
  enumerable: !1,
3468
3468
  writable: !1,
3469
3469
  configurable: !0
3470
3470
  }), e.displayName = "ApolloContext"), e;
3471
3471
  }
3472
3472
  function Rt(e) {
3473
- const t = I.useContext(yo()), n = e || t.client;
3473
+ const t = T.useContext(yo()), n = e || t.client;
3474
3474
  return ee(!!n, 28), n;
3475
3475
  }
3476
3476
  const { toString: Sr, hasOwnProperty: Of } = Object.prototype, xr = Function.prototype.toString, sn = /* @__PURE__ */ new Map();
@@ -6253,21 +6253,21 @@ var Te = {
6253
6253
  })(Ze || (Ze = {}));
6254
6254
  Ze.default = Ze;
6255
6255
  function Do(e, t) {
6256
- const n = I.useRef(void 0);
6256
+ const n = T.useRef(void 0);
6257
6257
  return (!n.current || !W(n.current.deps, t)) && (n.current = { value: e(), deps: t }), n.current.value;
6258
6258
  }
6259
6259
  let Ht;
6260
6260
  function jd() {
6261
6261
  }
6262
6262
  function Ud() {
6263
- return Ht || (Ht = I.createContext(null)), I.useCallback(
6263
+ return Ht || (Ht = T.createContext(null)), T.useCallback(
6264
6264
  /**
6265
6265
  * @returns true if the hook was called during render
6266
6266
  */
6267
6267
  () => {
6268
6268
  const e = console.error;
6269
6269
  try {
6270
- return console.error = jd, I.useContext(Ht), !0;
6270
+ return console.error = jd, T.useContext(Ht), !0;
6271
6271
  } catch {
6272
6272
  return !1;
6273
6273
  } finally {
@@ -6285,7 +6285,7 @@ function Zd(e, t, n) {
6285
6285
  // a React render and can use context
6286
6286
  e.startsWith("use") ? (
6287
6287
  // eslint-disable-next-line react-hooks/rules-of-hooks
6288
- I.useContext(yo())
6288
+ T.useContext(yo())
6289
6289
  ) : void 0
6290
6290
  ];
6291
6291
  let i = t;
@@ -6295,7 +6295,7 @@ function Zd(e, t, n) {
6295
6295
  }
6296
6296
  return i;
6297
6297
  }
6298
- const Po = ko ? I.useLayoutEffect : I.useEffect, Bd = "useSyncExternalStore", Vd = I[Bd], qd = Y(() => navigator.product) == "ReactNative", Wd = (
6298
+ const Po = ko ? T.useLayoutEffect : T.useEffect, Bd = "useSyncExternalStore", Vd = T[Bd], qd = Y(() => navigator.product) == "ReactNative", Wd = (
6299
6299
  // Following advice found in this comment from @domenic (maintainer of jsdom):
6300
6300
  // https://github.com/jsdom/jsdom/issues/1537#issuecomment-229405327
6301
6301
  //
@@ -6306,12 +6306,12 @@ const Po = ko ? I.useLayoutEffect : I.useEffect, Bd = "useSyncExternalStore", Vd
6306
6306
  // with older version of jsdom, but we don't have that problem.
6307
6307
  Y(() => navigator.userAgent.indexOf("jsdom") >= 0) || !1
6308
6308
  ), Hd = (ko || qd) && !Wd, zo = Vd || ((e, t, n) => {
6309
- const r = t(), [{ inst: i }, o] = I.useState({
6309
+ const r = t(), [{ inst: i }, o] = T.useState({
6310
6310
  inst: { value: r, getSnapshot: t }
6311
6311
  });
6312
- return Hd ? I.useLayoutEffect(() => {
6312
+ return Hd ? T.useLayoutEffect(() => {
6313
6313
  Object.assign(i, { value: r, getSnapshot: t }), Jt(i) && o({ inst: i });
6314
- }, [e, r, t]) : Object.assign(i, { value: r, getSnapshot: t }), I.useEffect(() => (Jt(i) && o({ inst: i }), e(function() {
6314
+ }, [e, r, t]) : Object.assign(i, { value: r, getSnapshot: t }), T.useEffect(() => (Jt(i) && o({ inst: i }), e(function() {
6315
6315
  Jt(i) && o({ inst: i });
6316
6316
  })), [e]), r;
6317
6317
  });
@@ -6331,7 +6331,7 @@ const Jd = [
6331
6331
  "subscribeToMore"
6332
6332
  ];
6333
6333
  function Gd(e, t) {
6334
- const n = Rt(t?.client), r = I.useRef(void 0), i = I.useRef(void 0), o = Do(() => t, [t]), s = Ud();
6334
+ const n = Rt(t?.client), r = T.useRef(void 0), i = T.useRef(void 0), o = Do(() => t, [t]), s = Ud();
6335
6335
  function c() {
6336
6336
  return n.watchQuery({
6337
6337
  ...t,
@@ -6340,19 +6340,19 @@ function Gd(e, t) {
6340
6340
  fetchPolicy: "standby"
6341
6341
  });
6342
6342
  }
6343
- const [a, u] = I.useState(n), [l, h] = I.useState(c);
6343
+ const [a, u] = T.useState(n), [l, h] = T.useState(c);
6344
6344
  a !== n && (u(n), h(c()));
6345
- const g = I.useCallback((E, w) => {
6345
+ const g = T.useCallback((E, w) => {
6346
6346
  const x = i.current?.data;
6347
6347
  x && !W(x, E.data) && (r.current = x), i.current = E, w();
6348
- }, []), _ = zo(I.useCallback((E) => {
6348
+ }, []), _ = zo(T.useCallback((E) => {
6349
6349
  const w = l.subscribe((x) => {
6350
6350
  W(i.current, x) || g(x, E);
6351
6351
  });
6352
6352
  return () => {
6353
6353
  w.unsubscribe();
6354
6354
  };
6355
- }, [l, g]), () => i.current || Ur, () => Ur), f = I.useMemo(() => {
6355
+ }, [l, g]), () => i.current || Ur, () => Ur), f = T.useMemo(() => {
6356
6356
  const E = {};
6357
6357
  for (const w of Jd)
6358
6358
  E[w] = function(...x) {
@@ -6360,7 +6360,7 @@ function Gd(e, t) {
6360
6360
  };
6361
6361
  return E;
6362
6362
  }, [l]);
6363
- I.useEffect(() => {
6363
+ T.useEffect(() => {
6364
6364
  const E = {
6365
6365
  query: e,
6366
6366
  errorPolicy: o?.errorPolicy,
@@ -6381,7 +6381,7 @@ function Gd(e, t) {
6381
6381
  t?.nextFetchPolicy,
6382
6382
  t?.skipPollAttempt
6383
6383
  ]);
6384
- const m = I.useCallback((...E) => {
6384
+ const m = T.useCallback((...E) => {
6385
6385
  ee(!s(), 30);
6386
6386
  const [w] = E;
6387
6387
  let x = l.options.fetchPolicy;
@@ -6392,11 +6392,11 @@ function Gd(e, t) {
6392
6392
  variables: w?.variables,
6393
6393
  context: w?.context ?? {}
6394
6394
  });
6395
- }, [l, s]), b = I.useRef(m);
6395
+ }, [l, s]), b = T.useRef(m);
6396
6396
  Po(() => {
6397
6397
  b.current = m;
6398
6398
  });
6399
- const O = I.useCallback((...E) => b.current(...E), []), T = I.useMemo(() => {
6399
+ const O = T.useCallback((...E) => b.current(...E), []), I = T.useMemo(() => {
6400
6400
  const { partial: E, ...w } = _;
6401
6401
  return {
6402
6402
  ...f,
@@ -6408,7 +6408,7 @@ function Gd(e, t) {
6408
6408
  called: !!i.current
6409
6409
  };
6410
6410
  }, [n, _, f, l]);
6411
- return [O, T];
6411
+ return [O, I];
6412
6412
  }
6413
6413
  const Ur = {
6414
6414
  data: void 0,
@@ -6418,7 +6418,7 @@ const Ur = {
6418
6418
  partial: !0
6419
6419
  };
6420
6420
  function Yd(e, t) {
6421
- const n = Rt(t?.client), [r, i] = I.useState(() => Mr(n)), o = I.useRef({
6421
+ const n = Rt(t?.client), [r, i] = T.useState(() => Mr(n)), o = T.useRef({
6422
6422
  result: r,
6423
6423
  mutationId: 0,
6424
6424
  isMounted: !0,
@@ -6429,7 +6429,7 @@ function Yd(e, t) {
6429
6429
  Po(() => {
6430
6430
  Object.assign(o.current, { client: n, options: t, mutation: e });
6431
6431
  });
6432
- const s = I.useCallback((a = {}) => {
6432
+ const s = T.useCallback((a = {}) => {
6433
6433
  const { options: u, mutation: l } = o.current, h = { ...u, mutation: l }, g = a.client || o.current.client;
6434
6434
  !o.current.result.loading && o.current.isMounted && i(o.current.result = {
6435
6435
  loading: !0,
@@ -6440,8 +6440,8 @@ function Yd(e, t) {
6440
6440
  });
6441
6441
  const _ = ++o.current.mutationId, f = hn(h, a);
6442
6442
  return Nd(g.mutate(f).then((m) => {
6443
- const { data: b, error: O } = m, T = a.onError || o.current.options?.onError;
6444
- if (O && T && T(O, f), _ === o.current.mutationId) {
6443
+ const { data: b, error: O } = m, I = a.onError || o.current.options?.onError;
6444
+ if (O && I && I(O, f), _ === o.current.mutationId) {
6445
6445
  const w = {
6446
6446
  called: !0,
6447
6447
  loading: !1,
@@ -6467,13 +6467,13 @@ function Yd(e, t) {
6467
6467
  const b = a.onError || o.current.options?.onError;
6468
6468
  throw b && b(m, f), m;
6469
6469
  }));
6470
- }, []), c = I.useCallback(() => {
6470
+ }, []), c = T.useCallback(() => {
6471
6471
  if (o.current.isMounted) {
6472
6472
  const a = Mr(o.current.client);
6473
6473
  Object.assign(o.current, { mutationId: 0, result: a }), i(a);
6474
6474
  }
6475
6475
  }, []);
6476
- return I.useEffect(() => {
6476
+ return T.useEffect(() => {
6477
6477
  const a = o.current;
6478
6478
  return a.isMounted = !0, () => {
6479
6479
  a.isMounted = !1;
@@ -6516,7 +6516,7 @@ function Kd(e, t = {}) {
6516
6516
  }
6517
6517
  };
6518
6518
  }
6519
- let [s, c] = I.useState(o);
6519
+ let [s, c] = T.useState(o);
6520
6520
  (n !== s.client || e !== s.query) && c(s = o(s));
6521
6521
  const { observable: a, resultData: u } = s;
6522
6522
  eh(i, a), nh(
@@ -6526,7 +6526,7 @@ function Kd(e, t = {}) {
6526
6526
  // might get mutated during render
6527
6527
  i
6528
6528
  );
6529
- const l = th(a, u, r), h = I.useMemo(() => ({
6529
+ const l = th(a, u, r), h = T.useMemo(() => ({
6530
6530
  refetch: a.refetch.bind(a),
6531
6531
  fetchMore: a.fetchMore.bind(a),
6532
6532
  updateQuery: a.updateQuery.bind(a),
@@ -6534,7 +6534,7 @@ function Kd(e, t = {}) {
6534
6534
  stopPolling: a.stopPolling.bind(a),
6535
6535
  subscribeToMore: a.subscribeToMore.bind(a)
6536
6536
  }), [a]), g = u.previousData;
6537
- return I.useMemo(() => {
6537
+ return T.useMemo(() => {
6538
6538
  const { partial: _, ...f } = l;
6539
6539
  return {
6540
6540
  ...f,
@@ -6566,7 +6566,7 @@ function eh(e, t) {
6566
6566
  }
6567
6567
  function th(e, t, n) {
6568
6568
  "use no memo";
6569
- return zo(I.useCallback((r) => {
6569
+ return zo(T.useCallback((r) => {
6570
6570
  const i = e.pipe(kd(Td)).subscribe((o) => {
6571
6571
  const s = t.current;
6572
6572
  // Avoid rerendering if the result is the same
@@ -6629,10 +6629,10 @@ const Wp = ({
6629
6629
  g?.(), c({
6630
6630
  variables: { input: O },
6631
6631
  ...!Tn(e) && { context: { headers: e } }
6632
- }).then((T) => {
6633
- T.error ? _?.(T.error) : m?.(T);
6634
- }).catch((T) => {
6635
- _?.(T);
6632
+ }).then((I) => {
6633
+ I.error ? _?.(I.error?.errors) : m?.(I);
6634
+ }).catch((I) => {
6635
+ _?.(I);
6636
6636
  }).finally(() => {
6637
6637
  f?.();
6638
6638
  });
@@ -7005,14 +7005,14 @@ function Lt(e, t, n) {
7005
7005
  if (!d.isUndefined(f)) {
7006
7006
  if (h.indexOf(f) !== -1)
7007
7007
  throw Error("Circular reference detected in " + m.join("."));
7008
- h.push(f), d.forEach(f, function(O, T) {
7008
+ h.push(f), d.forEach(f, function(O, I) {
7009
7009
  (!(d.isUndefined(O) || O === null) && i.call(
7010
7010
  t,
7011
7011
  O,
7012
- d.isString(T) ? T.trim() : T,
7012
+ d.isString(I) ? I.trim() : I,
7013
7013
  m,
7014
7014
  g
7015
- )) === !0 && _(O, m ? m.concat(T) : [T]);
7015
+ )) === !0 && _(O, m ? m.concat(I) : [I]);
7016
7016
  }), h.pop();
7017
7017
  }
7018
7018
  }
@@ -7141,14 +7141,14 @@ self instanceof WorkerGlobalScope && typeof self.importScripts == "function", Qh
7141
7141
  hasStandardBrowserWebWorkerEnv: Kh,
7142
7142
  navigator: gn,
7143
7143
  origin: Qh
7144
- }, Symbol.toStringTag, { value: "Module" })), j = {
7144
+ }, Symbol.toStringTag, { value: "Module" })), U = {
7145
7145
  ...ep,
7146
7146
  ...Yh
7147
7147
  };
7148
7148
  function tp(e, t) {
7149
- return Lt(e, new j.classes.URLSearchParams(), {
7149
+ return Lt(e, new U.classes.URLSearchParams(), {
7150
7150
  visitor: function(n, r, i, o) {
7151
- return j.isNode && d.isBuffer(n) ? (this.append(r, n.toString("base64")), !1) : o.defaultVisitor.apply(this, arguments);
7151
+ return U.isNode && d.isBuffer(n) ? (this.append(r, n.toString("base64")), !1) : o.defaultVisitor.apply(this, arguments);
7152
7152
  },
7153
7153
  ...t
7154
7154
  });
@@ -7243,8 +7243,8 @@ const Je = {
7243
7243
  maxContentLength: -1,
7244
7244
  maxBodyLength: -1,
7245
7245
  env: {
7246
- FormData: j.classes.FormData,
7247
- Blob: j.classes.Blob
7246
+ FormData: U.classes.FormData,
7247
+ Blob: U.classes.Blob
7248
7248
  },
7249
7249
  validateStatus: function(t) {
7250
7250
  return t >= 200 && t < 300;
@@ -7544,10 +7544,10 @@ const Ot = (e, t, n = 3) => {
7544
7544
  total: e,
7545
7545
  loaded: r
7546
7546
  }), t[1]];
7547
- }, Jr = (e) => (...t) => d.asap(() => e(...t)), pp = j.hasStandardBrowserEnv ? /* @__PURE__ */ ((e, t) => (n) => (n = new URL(n, j.origin), e.protocol === n.protocol && e.host === n.host && (t || e.port === n.port)))(
7548
- new URL(j.origin),
7549
- j.navigator && /(msie|trident)/i.test(j.navigator.userAgent)
7550
- ) : () => !0, mp = j.hasStandardBrowserEnv ? (
7547
+ }, Jr = (e) => (...t) => d.asap(() => e(...t)), pp = U.hasStandardBrowserEnv ? /* @__PURE__ */ ((e, t) => (n) => (n = new URL(n, U.origin), e.protocol === n.protocol && e.host === n.host && (t || e.port === n.port)))(
7548
+ new URL(U.origin),
7549
+ U.navigator && /(msie|trident)/i.test(U.navigator.userAgent)
7550
+ ) : () => !0, mp = U.hasStandardBrowserEnv ? (
7551
7551
  // Standard browser envs support document.cookie
7552
7552
  {
7553
7553
  write(e, t, n, r, i, o) {
@@ -7656,7 +7656,7 @@ const ts = (e) => {
7656
7656
  "Authorization",
7657
7657
  "Basic " + btoa((c.username || "") + ":" + (c.password ? unescape(encodeURIComponent(c.password)) : ""))
7658
7658
  ), d.isFormData(n)) {
7659
- if (j.hasStandardBrowserEnv || j.hasStandardBrowserWebWorkerEnv)
7659
+ if (U.hasStandardBrowserEnv || U.hasStandardBrowserWebWorkerEnv)
7660
7660
  s.setContentType(void 0);
7661
7661
  else if (d.isFunction(n.getHeaders)) {
7662
7662
  const a = n.getHeaders(), u = ["content-type", "content-length"];
@@ -7665,7 +7665,7 @@ const ts = (e) => {
7665
7665
  });
7666
7666
  }
7667
7667
  }
7668
- if (j.hasStandardBrowserEnv && (r && d.isFunction(r) && (r = r(t)), r || r !== !1 && pp(t.url))) {
7668
+ if (U.hasStandardBrowserEnv && (r && d.isFunction(r) && (r = r(t)), r || r !== !1 && pp(t.url))) {
7669
7669
  const a = i && o && mp.read(o);
7670
7670
  a && s.set(i, a);
7671
7671
  }
@@ -7705,8 +7705,8 @@ const ts = (e) => {
7705
7705
  }, b.onabort = function() {
7706
7706
  b && (r(new S("Request aborted", S.ECONNABORTED, e, b)), b = null);
7707
7707
  }, b.onerror = function(w) {
7708
- const x = w && w.message ? w.message : "Network Error", U = new S(x, S.ERR_NETWORK, e, b);
7709
- U.event = w || null, r(U), b = null;
7708
+ const x = w && w.message ? w.message : "Network Error", j = new S(x, S.ERR_NETWORK, e, b);
7709
+ j.event = w || null, r(j), b = null;
7710
7710
  }, b.ontimeout = function() {
7711
7711
  let w = i.timeout ? "timeout of " + i.timeout + "ms exceeded" : "timeout exceeded";
7712
7712
  const x = i.transitional || Yo;
@@ -7721,9 +7721,9 @@ const ts = (e) => {
7721
7721
  }), d.isUndefined(i.withCredentials) || (b.withCredentials = !!i.withCredentials), c && c !== "json" && (b.responseType = i.responseType), u && ([g, f] = Ot(u, !0), b.addEventListener("progress", g)), a && b.upload && ([h, _] = Ot(a), b.upload.addEventListener("progress", h), b.upload.addEventListener("loadend", _)), (i.cancelToken || i.signal) && (l = (E) => {
7722
7722
  b && (r(!E || E.type ? new xe(null, e, b) : E), b.abort(), b = null);
7723
7723
  }, i.cancelToken && i.cancelToken.subscribe(l), i.signal && (i.signal.aborted ? l() : i.signal.addEventListener("abort", l)));
7724
- const T = fp(i.url);
7725
- if (T && j.protocols.indexOf(T) === -1) {
7726
- r(new S("Unsupported protocol " + T + ":", S.ERR_BAD_REQUEST, e));
7724
+ const I = fp(i.url);
7725
+ if (I && U.protocols.indexOf(I) === -1) {
7726
+ r(new S("Unsupported protocol " + I + ":", S.ERR_BAD_REQUEST, e));
7727
7727
  return;
7728
7728
  }
7729
7729
  b.send(o || null);
@@ -7829,7 +7829,7 @@ const ts = (e) => {
7829
7829
  return !1;
7830
7830
  const c = i && ot(Kr), a = i && (typeof Qr == "function" ? /* @__PURE__ */ ((f) => (m) => f.encode(m))(new Qr()) : async (f) => new Uint8Array(await new n(f).arrayBuffer())), u = o && c && ei(() => {
7831
7831
  let f = !1;
7832
- const m = new n(j.origin, {
7832
+ const m = new n(U.origin, {
7833
7833
  body: new Kr(),
7834
7834
  method: "POST",
7835
7835
  get duplex() {
@@ -7854,7 +7854,7 @@ const ts = (e) => {
7854
7854
  if (d.isBlob(f))
7855
7855
  return f.size;
7856
7856
  if (d.isSpecCompliantForm(f))
7857
- return (await new n(j.origin, {
7857
+ return (await new n(U.origin, {
7858
7858
  method: "POST",
7859
7859
  body: f
7860
7860
  }).arrayBuffer()).byteLength;
@@ -7871,24 +7871,24 @@ const ts = (e) => {
7871
7871
  url: m,
7872
7872
  method: b,
7873
7873
  data: O,
7874
- signal: T,
7874
+ signal: I,
7875
7875
  cancelToken: E,
7876
7876
  timeout: w,
7877
7877
  onDownloadProgress: x,
7878
- onUploadProgress: U,
7878
+ onUploadProgress: j,
7879
7879
  responseType: B,
7880
7880
  headers: Ut,
7881
7881
  withCredentials: Ge = "same-origin",
7882
7882
  fetchOptions: Mn
7883
7883
  } = ts(f), Zn = t || fetch;
7884
7884
  B = B ? (B + "").toLowerCase() : "text";
7885
- let Ye = Ep([T, E && E.toAbortSignal()], w), Ie = null;
7885
+ let Ye = Ep([I, E && E.toAbortSignal()], w), Ie = null;
7886
7886
  const re = Ye && Ye.unsubscribe && (() => {
7887
7887
  Ye.unsubscribe();
7888
7888
  });
7889
7889
  let Bn;
7890
7890
  try {
7891
- if (U && u && b !== "get" && b !== "head" && (Bn = await _(Ut, O)) !== 0) {
7891
+ if (j && u && b !== "get" && b !== "head" && (Bn = await _(Ut, O)) !== 0) {
7892
7892
  let K = new n(m, {
7893
7893
  method: "POST",
7894
7894
  body: O,
@@ -7897,7 +7897,7 @@ const ts = (e) => {
7897
7897
  if (d.isFormData(O) && (_e = K.headers.get("content-type")) && Ut.setContentType(_e), K.body) {
7898
7898
  const [Mt, Xe] = Hr(
7899
7899
  Bn,
7900
- Ot(Jr(U))
7900
+ Ot(Jr(j))
7901
7901
  );
7902
7902
  O = Yr(K.body, Xr, Mt, Xe);
7903
7903
  }
@@ -8424,12 +8424,12 @@ const {
8424
8424
  } = l;
8425
8425
  if (!O && !i.validate())
8426
8426
  return;
8427
- const T = new FormData();
8427
+ const I = new FormData();
8428
8428
  Object.entries(i.data).forEach(([E, w]) => {
8429
8429
  Array.isArray(w) ? w.forEach((x) => {
8430
- x instanceof File ? T.append(E, x) : T.append(E, String(x));
8431
- }) : w instanceof File ? T.append(E, w) : T.append(E, String(w));
8432
- }), h?.(), s(!0), c.current = new AbortController(), z.post(e, T, {
8430
+ x instanceof File ? I.append(E, x) : I.append(E, String(x));
8431
+ }) : w instanceof File ? I.append(E, w) : I.append(E, String(w));
8432
+ }), h?.(), s(!0), c.current = new AbortController(), z.post(e, I, {
8433
8433
  headers: {
8434
8434
  "Content-Type": "multipart/form-data",
8435
8435
  ...t
@@ -8479,7 +8479,7 @@ const {
8479
8479
  const {
8480
8480
  onBefore: O = () => {
8481
8481
  },
8482
- onError: T = () => {
8482
+ onError: I = () => {
8483
8483
  },
8484
8484
  onFinish: E = () => {
8485
8485
  },
@@ -8490,10 +8490,10 @@ const {
8490
8490
  !x && !c() || (O?.(), u({
8491
8491
  variables: { filters: o },
8492
8492
  ...!Tn(e) && { context: { headers: e } }
8493
- }).then((U) => {
8494
- w?.(U);
8495
- }).catch((U) => {
8496
- T?.(U);
8493
+ }).then((j) => {
8494
+ j.error ? I?.(j.error?.errors) : w?.(j);
8495
+ }).catch((j) => {
8496
+ I?.(j);
8497
8497
  }).finally(() => {
8498
8498
  E?.();
8499
8499
  }));