@webority/ui-elements 0.25.0 → 0.26.0

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.
@@ -9621,7 +9621,14 @@ async function Rf(e, t = {}) {
9621
9621
  let e = Pf();
9622
9622
  e && (i[e.header] = e.token);
9623
9623
  }
9624
- let a = (e, t = null, n = "") => {
9624
+ let a = (e) => {
9625
+ if (e == null) return null;
9626
+ try {
9627
+ return decodeURIComponent(e);
9628
+ } catch {
9629
+ return e;
9630
+ }
9631
+ }, o = (e, t = null, n = "") => {
9625
9632
  let r = (e) => t?.headers.get(e) ?? null;
9626
9633
  return {
9627
9634
  kind: e,
@@ -9629,15 +9636,15 @@ async function Rf(e, t = {}) {
9629
9636
  status: t?.status ?? 0,
9630
9637
  html: n,
9631
9638
  response: t,
9632
- message: r(Mf.message),
9639
+ message: a(r(Mf.message)),
9633
9640
  redirect: r(Mf.redirect),
9634
9641
  result: r(Mf.result),
9635
9642
  keepOpen: r(Mf.keepOpen) === "1",
9636
9643
  fragment: r(Mf.fragment) === "1"
9637
9644
  };
9638
- }, o;
9645
+ }, s;
9639
9646
  try {
9640
- o = await fetch(e, {
9647
+ s = await fetch(e, {
9641
9648
  method: n,
9642
9649
  body: t.body,
9643
9650
  headers: i,
@@ -9645,17 +9652,17 @@ async function Rf(e, t = {}) {
9645
9652
  credentials: "same-origin"
9646
9653
  });
9647
9654
  } catch (e) {
9648
- return a(Lf(e) || t.signal?.aborted ? "aborted" : "network");
9655
+ return o(Lf(e) || t.signal?.aborted ? "aborted" : "network");
9649
9656
  }
9650
- let s = If(o.status);
9651
- if (s === "ok" && o.redirected && o.headers.get(Mf.fragment) !== "1" && (s = "session"), s === "session") return r(o.status === 401 ? o.headers.get("Location") || window.location.href : o.url), a(s, o);
9652
- let c = "";
9653
- if (s === "ok" || s === "validation") try {
9654
- c = await o.text();
9657
+ let c = If(s.status);
9658
+ if (c === "ok" && s.redirected && s.headers.get(Mf.fragment) !== "1" && (c = "session"), c === "session") return r(s.status === 401 ? s.headers.get("Location") || window.location.href : s.url), o(c, s);
9659
+ let l = "";
9660
+ if (c === "ok" || c === "validation") try {
9661
+ l = await s.text();
9655
9662
  } catch (e) {
9656
- return a(Lf(e) || t.signal?.aborted ? "aborted" : "network", o);
9663
+ return o(Lf(e) || t.signal?.aborted ? "aborted" : "network", s);
9657
9664
  }
9658
- return a(s, o, c);
9665
+ return o(c, s, l);
9659
9666
  }
9660
9667
  function zf() {
9661
9668
  let e = null, t = 0;