mp-front-cli 0.0.33 → 0.0.35

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,10 +1,10 @@
1
1
  var Xr = Object.defineProperty;
2
2
  var Yr = (t, e, r) => e in t ? Xr(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r;
3
- var ee = (t, e, r) => (Yr(t, typeof e != "symbol" ? e + "" : e, r), r);
4
- import { g as ht, C as Zr } from "./custom-encoder-b2078b5c.js";
3
+ var Kt = (t, e, r) => (Yr(t, typeof e != "symbol" ? e + "" : e, r), r);
4
+ import { g as ft, C as Zr } from "./custom-encoder-b2078b5c.js";
5
+ import { CustomLogger as jt } from "./mp-front-cli-logger.es.js";
5
6
  import { t as Qr } from "./index-6f6eb615.js";
6
- import { CustomLogger as jr } from "./mp-front-cli-logger.es.js";
7
- const en = {
7
+ const jr = {
8
8
  type: "logger",
9
9
  log(t) {
10
10
  this.output("log", t);
@@ -19,14 +19,14 @@ const en = {
19
19
  console && console[t] && console[t].apply(console, e);
20
20
  }
21
21
  };
22
- class Ce {
22
+ class xe {
23
23
  constructor(e) {
24
24
  let r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
25
25
  this.init(e, r);
26
26
  }
27
27
  init(e) {
28
28
  let r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
29
- this.prefix = r.prefix || "i18next:", this.logger = e || en, this.options = r, this.debug = r.debug;
29
+ this.prefix = r.prefix || "i18next:", this.logger = e || jr, this.options = r, this.debug = r.debug;
30
30
  }
31
31
  log() {
32
32
  for (var e = arguments.length, r = new Array(e), n = 0; n < e; n++)
@@ -52,17 +52,17 @@ class Ce {
52
52
  return a && !this.debug ? null : (typeof e[0] == "string" && (e[0] = `${n}${this.prefix} ${e[0]}`), this.logger[r](e));
53
53
  }
54
54
  create(e) {
55
- return new Ce(this.logger, {
55
+ return new xe(this.logger, {
56
56
  prefix: `${this.prefix}:${e}:`,
57
57
  ...this.options
58
58
  });
59
59
  }
60
60
  clone(e) {
61
- return e = e || this.options, e.prefix = e.prefix || this.prefix, new Ce(this.logger, e);
61
+ return e = e || this.options, e.prefix = e.prefix || this.prefix, new xe(this.logger, e);
62
62
  }
63
63
  }
64
- var Z = new Ce();
65
- class Le {
64
+ var Z = new xe();
65
+ class Ue {
66
66
  constructor() {
67
67
  this.observers = {};
68
68
  }
@@ -90,7 +90,7 @@ class Le {
90
90
  });
91
91
  }
92
92
  }
93
- function pe() {
93
+ function he() {
94
94
  let t, e;
95
95
  const r = new Promise((n, a) => {
96
96
  t = n, e = a;
@@ -100,12 +100,12 @@ function pe() {
100
100
  function Rt(t) {
101
101
  return t == null ? "" : "" + t;
102
102
  }
103
- function tn(t, e, r) {
103
+ function en(t, e, r) {
104
104
  t.forEach((n) => {
105
105
  e[n] && (r[n] = e[n]);
106
106
  });
107
107
  }
108
- function pt(t, e, r) {
108
+ function ht(t, e, r) {
109
109
  function n(i) {
110
110
  return i && i.indexOf("###") > -1 ? i.replace(/###/g, ".") : i;
111
111
  }
@@ -128,37 +128,37 @@ function Ot(t, e, r) {
128
128
  const {
129
129
  obj: n,
130
130
  k: a
131
- } = pt(t, e, Object);
131
+ } = ht(t, e, Object);
132
132
  n[a] = r;
133
133
  }
134
- function rn(t, e, r, n) {
134
+ function tn(t, e, r, n) {
135
135
  const {
136
136
  obj: a,
137
137
  k: s
138
- } = pt(t, e, Object);
138
+ } = ht(t, e, Object);
139
139
  a[s] = a[s] || [], n && (a[s] = a[s].concat(r)), n || a[s].push(r);
140
140
  }
141
- function _e(t, e) {
141
+ function Ce(t, e) {
142
142
  const {
143
143
  obj: r,
144
144
  k: n
145
- } = pt(t, e);
145
+ } = ht(t, e);
146
146
  if (r)
147
147
  return r[n];
148
148
  }
149
- function nn(t, e, r) {
150
- const n = _e(t, r);
151
- return n !== void 0 ? n : _e(e, r);
149
+ function rn(t, e, r) {
150
+ const n = Ce(t, r);
151
+ return n !== void 0 ? n : Ce(e, r);
152
152
  }
153
- function jt(t, e, r) {
153
+ function er(t, e, r) {
154
154
  for (const n in e)
155
- n !== "__proto__" && n !== "constructor" && (n in t ? typeof t[n] == "string" || t[n] instanceof String || typeof e[n] == "string" || e[n] instanceof String ? r && (t[n] = e[n]) : jt(t[n], e[n], r) : t[n] = e[n]);
155
+ n !== "__proto__" && n !== "constructor" && (n in t ? typeof t[n] == "string" || t[n] instanceof String || typeof e[n] == "string" || e[n] instanceof String ? r && (t[n] = e[n]) : er(t[n], e[n], r) : t[n] = e[n]);
156
156
  return t;
157
157
  }
158
- function ce(t) {
158
+ function oe(t) {
159
159
  return t.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&");
160
160
  }
161
- var an = {
161
+ var nn = {
162
162
  "&": "&amp;",
163
163
  "<": "&lt;",
164
164
  ">": "&gt;",
@@ -166,13 +166,13 @@ var an = {
166
166
  "'": "&#39;",
167
167
  "/": "&#x2F;"
168
168
  };
169
- function sn(t) {
170
- return typeof t == "string" ? t.replace(/[&<>"'\/]/g, (e) => an[e]) : t;
169
+ function an(t) {
170
+ return typeof t == "string" ? t.replace(/[&<>"'\/]/g, (e) => nn[e]) : t;
171
171
  }
172
- const on = [" ", ",", "?", "!", ";"];
173
- function cn(t, e, r) {
172
+ const sn = [" ", ",", "?", "!", ";"];
173
+ function on(t, e, r) {
174
174
  e = e || "", r = r || "";
175
- const n = on.filter((i) => e.indexOf(i) < 0 && r.indexOf(i) < 0);
175
+ const n = sn.filter((i) => e.indexOf(i) < 0 && r.indexOf(i) < 0);
176
176
  if (n.length === 0)
177
177
  return !0;
178
178
  const a = new RegExp(`(${n.map((i) => i === "?" ? "\\?" : i).join("|")})`);
@@ -183,7 +183,7 @@ function cn(t, e, r) {
183
183
  }
184
184
  return s;
185
185
  }
186
- function Pe(t, e) {
186
+ function _e(t, e) {
187
187
  let r = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : ".";
188
188
  if (!t)
189
189
  return;
@@ -209,16 +209,16 @@ function Pe(t, e) {
209
209
  return c[o];
210
210
  }
211
211
  const u = n.slice(s + i).join(r);
212
- return u ? Pe(c, u, r) : void 0;
212
+ return u ? _e(c, u, r) : void 0;
213
213
  }
214
214
  a = a[n[s]];
215
215
  }
216
216
  return a;
217
217
  }
218
- function He(t) {
218
+ function Pe(t) {
219
219
  return t && t.indexOf("_") > 0 ? t.replace("_", "-") : t;
220
220
  }
221
- class Tt extends Le {
221
+ class Tt extends Ue {
222
222
  constructor(e) {
223
223
  let r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {
224
224
  ns: ["translation"],
@@ -238,8 +238,8 @@ class Tt extends Le {
238
238
  const s = a.keySeparator !== void 0 ? a.keySeparator : this.options.keySeparator, i = a.ignoreJSONStructure !== void 0 ? a.ignoreJSONStructure : this.options.ignoreJSONStructure;
239
239
  let o = [e, r];
240
240
  n && typeof n != "string" && (o = o.concat(n)), n && typeof n == "string" && (o = o.concat(s ? n.split(s) : n)), e.indexOf(".") > -1 && (o = e.split("."));
241
- const c = _e(this.data, o);
242
- return c || !i || typeof n != "string" ? c : Pe(this.data && this.data[e] && this.data[e][r], n, s);
241
+ const c = Ce(this.data, o);
242
+ return c || !i || typeof n != "string" ? c : _e(this.data && this.data[e] && this.data[e][r], n, s);
243
243
  }
244
244
  addResource(e, r, n, a) {
245
245
  let s = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : {
@@ -264,8 +264,8 @@ class Tt extends Le {
264
264
  silent: !1
265
265
  }, o = [e, r];
266
266
  e.indexOf(".") > -1 && (o = e.split("."), a = n, n = r, r = o[1]), this.addNamespaces(r);
267
- let c = _e(this.data, o) || {};
268
- a ? jt(c, n, s) : c = {
267
+ let c = Ce(this.data, o) || {};
268
+ a ? er(c, n, s) : c = {
269
269
  ...c,
270
270
  ...n
271
271
  }, Ot(this.data, o, c), i.silent || this.emit("added", e, r, n);
@@ -292,7 +292,7 @@ class Tt extends Le {
292
292
  return this.data;
293
293
  }
294
294
  }
295
- var er = {
295
+ var tr = {
296
296
  processors: {},
297
297
  addPostProcessor(t) {
298
298
  this.processors[t.name] = t;
@@ -304,10 +304,10 @@ var er = {
304
304
  }
305
305
  };
306
306
  const It = {};
307
- class Ke extends Le {
307
+ class He extends Ue {
308
308
  constructor(e) {
309
309
  let r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
310
- super(), tn(["resourceStore", "languageUtils", "pluralResolver", "interpolator", "backendConnector", "i18nFormat", "utils"], e, this), this.options = r, this.options.keySeparator === void 0 && (this.options.keySeparator = "."), this.logger = Z.create("translator");
310
+ super(), en(["resourceStore", "languageUtils", "pluralResolver", "interpolator", "backendConnector", "i18nFormat", "utils"], e, this), this.options = r, this.options.keySeparator === void 0 && (this.options.keySeparator = "."), this.logger = Z.create("translator");
311
311
  }
312
312
  changeLanguage(e) {
313
313
  e && (this.language = e);
@@ -326,7 +326,7 @@ class Ke extends Le {
326
326
  n === void 0 && (n = ":");
327
327
  const a = r.keySeparator !== void 0 ? r.keySeparator : this.options.keySeparator;
328
328
  let s = r.ns || this.options.defaultNS || [];
329
- const i = n && e.indexOf(n) > -1, o = !this.options.userDefinedKeySeparator && !r.keySeparator && !this.options.userDefinedNsSeparator && !r.nsSeparator && !cn(e, n, a);
329
+ const i = n && e.indexOf(n) > -1, o = !this.options.userDefinedKeySeparator && !r.keySeparator && !this.options.userDefinedNsSeparator && !r.nsSeparator && !on(e, n, a);
330
330
  if (i && !o) {
331
331
  const c = e.match(this.interpolator.nestingRegexp);
332
332
  if (c && c.length > 0)
@@ -402,36 +402,36 @@ class Ke extends Le {
402
402
  d = d.join(C), d && (d = this.extendTranslation(d, e, r, n));
403
403
  else {
404
404
  let m = !1, E = !1;
405
- const _ = r.count !== void 0 && typeof r.count != "string", A = Ke.hasDefaultValue(r), R = _ ? this.pluralResolver.getSuffix(u, r.count, r) : "", F = r.ordinal && _ ? this.pluralResolver.getSuffix(u, r.count, {
405
+ const _ = r.count !== void 0 && typeof r.count != "string", A = He.hasDefaultValue(r), R = _ ? this.pluralResolver.getSuffix(u, r.count, r) : "", F = r.ordinal && _ ? this.pluralResolver.getSuffix(u, r.count, {
406
406
  ordinal: !1
407
407
  }) : "", q = _ && !r.ordinal && r.count === 0 && this.pluralResolver.shouldUseIntlApi(), Y = q && r[`defaultValue${this.options.pluralSeparator}zero`] || r[`defaultValue${R}`] || r[`defaultValue${F}`] || r.defaultValue;
408
408
  !this.isValidLookup(d) && A && (m = !0, d = Y), this.isValidLookup(d) || (E = !0, d = i);
409
- const qr = (r.missingKeyNoValueFallbackToKey || this.options.missingKeyNoValueFallbackToKey) && E ? void 0 : d, de = A && Y !== d && this.options.updateMissing;
410
- if (E || m || de) {
411
- if (this.logger.log(de ? "updateKey" : "missingKey", u, c, i, de ? Y : d), s) {
409
+ const qr = (r.missingKeyNoValueFallbackToKey || this.options.missingKeyNoValueFallbackToKey) && E ? void 0 : d, le = A && Y !== d && this.options.updateMissing;
410
+ if (E || m || le) {
411
+ if (this.logger.log(le ? "updateKey" : "missingKey", u, c, i, le ? Y : d), s) {
412
412
  const z = this.resolve(i, {
413
413
  ...r,
414
414
  keySeparator: !1
415
415
  });
416
416
  z && z.res && this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.");
417
417
  }
418
- let fe = [];
419
- const Se = this.languageUtils.getFallbackCodes(this.options.fallbackLng, r.lng || this.language);
420
- if (this.options.saveMissingTo === "fallback" && Se && Se[0])
421
- for (let z = 0; z < Se.length; z++)
422
- fe.push(Se[z]);
418
+ let de = [];
419
+ const we = this.languageUtils.getFallbackCodes(this.options.fallbackLng, r.lng || this.language);
420
+ if (this.options.saveMissingTo === "fallback" && we && we[0])
421
+ for (let z = 0; z < we.length; z++)
422
+ de.push(we[z]);
423
423
  else
424
- this.options.saveMissingTo === "all" ? fe = this.languageUtils.toResolveHierarchy(r.lng || this.language) : fe.push(r.lng || this.language);
425
- const Ht = (z, ie, he) => {
426
- const Kt = A && he !== d ? he : qr;
427
- this.options.missingKeyHandler ? this.options.missingKeyHandler(z, c, ie, Kt, de, r) : this.backendConnector && this.backendConnector.saveMissing && this.backendConnector.saveMissing(z, c, ie, Kt, de, r), this.emit("missingKey", z, c, ie, d);
424
+ this.options.saveMissingTo === "all" ? de = this.languageUtils.toResolveHierarchy(r.lng || this.language) : de.push(r.lng || this.language);
425
+ const Pt = (z, se, fe) => {
426
+ const Ht = A && fe !== d ? fe : qr;
427
+ this.options.missingKeyHandler ? this.options.missingKeyHandler(z, c, se, Ht, le, r) : this.backendConnector && this.backendConnector.saveMissing && this.backendConnector.saveMissing(z, c, se, Ht, le, r), this.emit("missingKey", z, c, se, d);
428
428
  };
429
- this.options.saveMissing && (this.options.saveMissingPlurals && _ ? fe.forEach((z) => {
430
- const ie = this.pluralResolver.getSuffixes(z, r);
431
- q && r[`defaultValue${this.options.pluralSeparator}zero`] && ie.indexOf(`${this.options.pluralSeparator}zero`) < 0 && ie.push(`${this.options.pluralSeparator}zero`), ie.forEach((he) => {
432
- Ht([z], i + he, r[`defaultValue${he}`] || Y);
429
+ this.options.saveMissing && (this.options.saveMissingPlurals && _ ? de.forEach((z) => {
430
+ const se = this.pluralResolver.getSuffixes(z, r);
431
+ q && r[`defaultValue${this.options.pluralSeparator}zero`] && se.indexOf(`${this.options.pluralSeparator}zero`) < 0 && se.push(`${this.options.pluralSeparator}zero`), se.forEach((fe) => {
432
+ Pt([z], i + fe, r[`defaultValue${fe}`] || Y);
433
433
  });
434
- }) : Ht(fe, i, Y));
434
+ }) : Pt(de, i, Y));
435
435
  }
436
436
  d = this.extendTranslation(d, e, r, f, n), E && d === i && this.options.appendNamespaceToMissingKey && (d = `${c}:${i}`), (E || m) && this.options.parseMissingKeyHandler && (this.options.compatibilityAPI !== "v1" ? d = this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey ? `${c}:${i}` : i, m ? d : void 0) : d = this.options.parseMissingKeyHandler(d));
437
437
  }
@@ -475,7 +475,7 @@ class Ke extends Le {
475
475
  }, n)), n.interpolation && this.interpolator.reset();
476
476
  }
477
477
  const o = n.postProcess || this.options.postProcess, c = typeof o == "string" ? [o] : o;
478
- return e != null && c && c.length && n.applyPostProcessor !== !1 && (e = er.handle(c, e, r, this.options && this.options.postProcessPassResolved ? {
478
+ return e != null && c && c.length && n.applyPostProcessor !== !1 && (e = tr.handle(c, e, r, this.options && this.options.postProcessPassResolved ? {
479
479
  i18nResolved: {
480
480
  ...a,
481
481
  usedParams: this.getUsedParamsDetails(n)
@@ -554,7 +554,7 @@ class Ke extends Le {
554
554
  return !1;
555
555
  }
556
556
  }
557
- function ze(t) {
557
+ function Ge(t) {
558
558
  return t.charAt(0).toUpperCase() + t.slice(1);
559
559
  }
560
560
  class Wt {
@@ -562,13 +562,13 @@ class Wt {
562
562
  this.options = e, this.supportedLngs = this.options.supportedLngs || !1, this.logger = Z.create("languageUtils");
563
563
  }
564
564
  getScriptPartFromCode(e) {
565
- if (e = He(e), !e || e.indexOf("-") < 0)
565
+ if (e = Pe(e), !e || e.indexOf("-") < 0)
566
566
  return null;
567
567
  const r = e.split("-");
568
568
  return r.length === 2 || (r.pop(), r[r.length - 1].toLowerCase() === "x") ? null : this.formatLanguageCode(r.join("-"));
569
569
  }
570
570
  getLanguagePartFromCode(e) {
571
- if (e = He(e), !e || e.indexOf("-") < 0)
571
+ if (e = Pe(e), !e || e.indexOf("-") < 0)
572
572
  return e;
573
573
  const r = e.split("-");
574
574
  return this.formatLanguageCode(r[0]);
@@ -577,7 +577,7 @@ class Wt {
577
577
  if (typeof e == "string" && e.indexOf("-") > -1) {
578
578
  const r = ["hans", "hant", "latn", "cyrl", "cans", "mong", "arab"];
579
579
  let n = e.split("-");
580
- return this.options.lowerCaseLng ? n = n.map((a) => a.toLowerCase()) : n.length === 2 ? (n[0] = n[0].toLowerCase(), n[1] = n[1].toUpperCase(), r.indexOf(n[1].toLowerCase()) > -1 && (n[1] = ze(n[1].toLowerCase()))) : n.length === 3 && (n[0] = n[0].toLowerCase(), n[1].length === 2 && (n[1] = n[1].toUpperCase()), n[0] !== "sgn" && n[2].length === 2 && (n[2] = n[2].toUpperCase()), r.indexOf(n[1].toLowerCase()) > -1 && (n[1] = ze(n[1].toLowerCase())), r.indexOf(n[2].toLowerCase()) > -1 && (n[2] = ze(n[2].toLowerCase()))), n.join("-");
580
+ return this.options.lowerCaseLng ? n = n.map((a) => a.toLowerCase()) : n.length === 2 ? (n[0] = n[0].toLowerCase(), n[1] = n[1].toUpperCase(), r.indexOf(n[1].toLowerCase()) > -1 && (n[1] = Ge(n[1].toLowerCase()))) : n.length === 3 && (n[0] = n[0].toLowerCase(), n[1].length === 2 && (n[1] = n[1].toUpperCase()), n[0] !== "sgn" && n[2].length === 2 && (n[2] = n[2].toUpperCase()), r.indexOf(n[1].toLowerCase()) > -1 && (n[1] = Ge(n[1].toLowerCase())), r.indexOf(n[2].toLowerCase()) > -1 && (n[2] = Ge(n[2].toLowerCase()))), n.join("-");
581
581
  }
582
582
  return this.options.cleanCode || this.options.lowerCaseLng ? e.toLowerCase() : e;
583
583
  }
@@ -626,7 +626,7 @@ class Wt {
626
626
  }), a;
627
627
  }
628
628
  }
629
- let un = [{
629
+ let cn = [{
630
630
  lngs: ["ach", "ak", "am", "arn", "br", "fil", "gun", "ln", "mfe", "mg", "mi", "oc", "pt", "pt-BR", "tg", "tl", "ti", "tr", "uz", "wa"],
631
631
  nr: [1, 2],
632
632
  fc: 1
@@ -718,7 +718,7 @@ let un = [{
718
718
  lngs: ["he", "iw"],
719
719
  nr: [1, 2, 20, 21],
720
720
  fc: 22
721
- }], ln = {
721
+ }], un = {
722
722
  1: function(t) {
723
723
  return +(t > 1);
724
724
  },
@@ -786,7 +786,7 @@ let un = [{
786
786
  return t == 1 ? 0 : t == 2 ? 1 : (t < 0 || t > 10) && t % 10 == 0 ? 2 : 3;
787
787
  }
788
788
  };
789
- const dn = ["v1", "v2", "v3"], fn = ["v4"], Ut = {
789
+ const ln = ["v1", "v2", "v3"], dn = ["v4"], Ut = {
790
790
  zero: 0,
791
791
  one: 1,
792
792
  two: 2,
@@ -794,21 +794,21 @@ const dn = ["v1", "v2", "v3"], fn = ["v4"], Ut = {
794
794
  many: 4,
795
795
  other: 5
796
796
  };
797
- function hn() {
797
+ function fn() {
798
798
  const t = {};
799
- return un.forEach((e) => {
799
+ return cn.forEach((e) => {
800
800
  e.lngs.forEach((r) => {
801
801
  t[r] = {
802
802
  numbers: e.nr,
803
- plurals: ln[e.fc]
803
+ plurals: un[e.fc]
804
804
  };
805
805
  });
806
806
  }), t;
807
807
  }
808
- class pn {
808
+ class hn {
809
809
  constructor(e) {
810
810
  let r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
811
- this.languageUtils = e, this.options = r, this.logger = Z.create("pluralResolver"), (!this.options.compatibilityJSON || fn.includes(this.options.compatibilityJSON)) && (typeof Intl > "u" || !Intl.PluralRules) && (this.options.compatibilityJSON = "v3", this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")), this.rules = hn();
811
+ this.languageUtils = e, this.options = r, this.logger = Z.create("pluralResolver"), (!this.options.compatibilityJSON || dn.includes(this.options.compatibilityJSON)) && (typeof Intl > "u" || !Intl.PluralRules) && (this.options.compatibilityJSON = "v3", this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")), this.rules = fn();
812
812
  }
813
813
  addRule(e, r) {
814
814
  this.rules[e] = r;
@@ -817,7 +817,7 @@ class pn {
817
817
  let r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
818
818
  if (this.shouldUseIntlApi())
819
819
  try {
820
- return new Intl.PluralRules(He(e === "dev" ? "en" : e), {
820
+ return new Intl.PluralRules(Pe(e === "dev" ? "en" : e), {
821
821
  type: r.ordinal ? "ordinal" : "cardinal"
822
822
  });
823
823
  } catch {
@@ -852,14 +852,14 @@ class pn {
852
852
  return this.options.compatibilityJSON === "v1" ? a === 1 ? "" : typeof a == "number" ? `_plural_${a.toString()}` : s() : this.options.compatibilityJSON === "v2" || this.options.simplifyPluralSuffix && e.numbers.length === 2 && e.numbers[0] === 1 ? s() : this.options.prepend && n.toString() ? this.options.prepend + n.toString() : n.toString();
853
853
  }
854
854
  shouldUseIntlApi() {
855
- return !dn.includes(this.options.compatibilityJSON);
855
+ return !ln.includes(this.options.compatibilityJSON);
856
856
  }
857
857
  }
858
858
  function Lt(t, e, r) {
859
- let n = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : ".", a = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : !0, s = nn(t, e, r);
860
- return !s && a && typeof r == "string" && (s = Pe(t, r, n), s === void 0 && (s = Pe(e, r, n))), s;
859
+ let n = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : ".", a = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : !0, s = rn(t, e, r);
860
+ return !s && a && typeof r == "string" && (s = _e(t, r, n), s === void 0 && (s = _e(e, r, n))), s;
861
861
  }
862
- class gn {
862
+ class pn {
863
863
  constructor() {
864
864
  let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
865
865
  this.logger = Z.create("interpolator"), this.options = e, this.format = e.interpolation && e.interpolation.format || ((r) => r), this.init(e);
@@ -870,7 +870,7 @@ class gn {
870
870
  escapeValue: !0
871
871
  });
872
872
  const r = e.interpolation;
873
- this.escape = r.escape !== void 0 ? r.escape : sn, this.escapeValue = r.escapeValue !== void 0 ? r.escapeValue : !0, this.useRawValueToEscape = r.useRawValueToEscape !== void 0 ? r.useRawValueToEscape : !1, this.prefix = r.prefix ? ce(r.prefix) : r.prefixEscaped || "{{", this.suffix = r.suffix ? ce(r.suffix) : r.suffixEscaped || "}}", this.formatSeparator = r.formatSeparator ? r.formatSeparator : r.formatSeparator || ",", this.unescapePrefix = r.unescapeSuffix ? "" : r.unescapePrefix || "-", this.unescapeSuffix = this.unescapePrefix ? "" : r.unescapeSuffix || "", this.nestingPrefix = r.nestingPrefix ? ce(r.nestingPrefix) : r.nestingPrefixEscaped || ce("$t("), this.nestingSuffix = r.nestingSuffix ? ce(r.nestingSuffix) : r.nestingSuffixEscaped || ce(")"), this.nestingOptionsSeparator = r.nestingOptionsSeparator ? r.nestingOptionsSeparator : r.nestingOptionsSeparator || ",", this.maxReplaces = r.maxReplaces ? r.maxReplaces : 1e3, this.alwaysFormat = r.alwaysFormat !== void 0 ? r.alwaysFormat : !1, this.resetRegExp();
873
+ this.escape = r.escape !== void 0 ? r.escape : an, this.escapeValue = r.escapeValue !== void 0 ? r.escapeValue : !0, this.useRawValueToEscape = r.useRawValueToEscape !== void 0 ? r.useRawValueToEscape : !1, this.prefix = r.prefix ? oe(r.prefix) : r.prefixEscaped || "{{", this.suffix = r.suffix ? oe(r.suffix) : r.suffixEscaped || "}}", this.formatSeparator = r.formatSeparator ? r.formatSeparator : r.formatSeparator || ",", this.unescapePrefix = r.unescapeSuffix ? "" : r.unescapePrefix || "-", this.unescapeSuffix = this.unescapePrefix ? "" : r.unescapeSuffix || "", this.nestingPrefix = r.nestingPrefix ? oe(r.nestingPrefix) : r.nestingPrefixEscaped || oe("$t("), this.nestingSuffix = r.nestingSuffix ? oe(r.nestingSuffix) : r.nestingSuffixEscaped || oe(")"), this.nestingOptionsSeparator = r.nestingOptionsSeparator ? r.nestingOptionsSeparator : r.nestingOptionsSeparator || ",", this.maxReplaces = r.maxReplaces ? r.maxReplaces : 1e3, this.alwaysFormat = r.alwaysFormat !== void 0 ? r.alwaysFormat : !1, this.resetRegExp();
874
874
  }
875
875
  reset() {
876
876
  this.options && this.init(this.options);
@@ -976,7 +976,7 @@ class gn {
976
976
  return e;
977
977
  }
978
978
  }
979
- function mn(t) {
979
+ function gn(t) {
980
980
  let e = t.toLowerCase().trim();
981
981
  const r = {};
982
982
  if (t.indexOf("(") > -1) {
@@ -995,44 +995,44 @@ function mn(t) {
995
995
  formatOptions: r
996
996
  };
997
997
  }
998
- function ue(t) {
998
+ function ce(t) {
999
999
  const e = {};
1000
1000
  return function(n, a, s) {
1001
1001
  const i = a + JSON.stringify(s);
1002
1002
  let o = e[i];
1003
- return o || (o = t(He(a), s), e[i] = o), o(n);
1003
+ return o || (o = t(Pe(a), s), e[i] = o), o(n);
1004
1004
  };
1005
1005
  }
1006
- class yn {
1006
+ class mn {
1007
1007
  constructor() {
1008
1008
  let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
1009
1009
  this.logger = Z.create("formatter"), this.options = e, this.formats = {
1010
- number: ue((r, n) => {
1010
+ number: ce((r, n) => {
1011
1011
  const a = new Intl.NumberFormat(r, {
1012
1012
  ...n
1013
1013
  });
1014
1014
  return (s) => a.format(s);
1015
1015
  }),
1016
- currency: ue((r, n) => {
1016
+ currency: ce((r, n) => {
1017
1017
  const a = new Intl.NumberFormat(r, {
1018
1018
  ...n,
1019
1019
  style: "currency"
1020
1020
  });
1021
1021
  return (s) => a.format(s);
1022
1022
  }),
1023
- datetime: ue((r, n) => {
1023
+ datetime: ce((r, n) => {
1024
1024
  const a = new Intl.DateTimeFormat(r, {
1025
1025
  ...n
1026
1026
  });
1027
1027
  return (s) => a.format(s);
1028
1028
  }),
1029
- relativetime: ue((r, n) => {
1029
+ relativetime: ce((r, n) => {
1030
1030
  const a = new Intl.RelativeTimeFormat(r, {
1031
1031
  ...n
1032
1032
  });
1033
1033
  return (s) => a.format(s, n.range || "day");
1034
1034
  }),
1035
- list: ue((r, n) => {
1035
+ list: ce((r, n) => {
1036
1036
  const a = new Intl.ListFormat(r, {
1037
1037
  ...n
1038
1038
  });
@@ -1050,7 +1050,7 @@ class yn {
1050
1050
  this.formats[e.toLowerCase().trim()] = r;
1051
1051
  }
1052
1052
  addCached(e, r) {
1053
- this.formats[e.toLowerCase().trim()] = ue(r);
1053
+ this.formats[e.toLowerCase().trim()] = ce(r);
1054
1054
  }
1055
1055
  format(e, r, n) {
1056
1056
  let a = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : {};
@@ -1058,7 +1058,7 @@ class yn {
1058
1058
  const {
1059
1059
  formatName: u,
1060
1060
  formatOptions: l
1061
- } = mn(c);
1061
+ } = gn(c);
1062
1062
  if (this.formats[u]) {
1063
1063
  let f = o;
1064
1064
  try {
@@ -1078,10 +1078,10 @@ class yn {
1078
1078
  }, e);
1079
1079
  }
1080
1080
  }
1081
- function wn(t, e) {
1081
+ function yn(t, e) {
1082
1082
  t.pending[e] !== void 0 && (delete t.pending[e], t.pendingCount--);
1083
1083
  }
1084
- class Sn extends Le {
1084
+ class wn extends Ue {
1085
1085
  constructor(e, r, n) {
1086
1086
  let a = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : {};
1087
1087
  super(), this.backend = e, this.store = r, this.services = n, this.languageUtils = n.languageUtils, this.options = a, this.logger = Z.create("backendConnector"), this.waitingReads = [], this.maxParallelReads = a.maxParallelReads || 10, this.readingCalls = 0, this.maxRetries = a.maxRetries >= 0 ? a.maxRetries : 5, this.retryTimeout = a.retryTimeout >= 1 ? a.retryTimeout : 350, this.state = {}, this.queue = [], this.backend && this.backend.init && this.backend.init(n, a.backend, a);
@@ -1112,7 +1112,7 @@ class Sn extends Le {
1112
1112
  r && this.emit("failedLoading", s, i, r), n && this.store.addResourceBundle(s, i, n), this.state[e] = r ? -1 : 2;
1113
1113
  const o = {};
1114
1114
  this.queue.forEach((c) => {
1115
- rn(c.loaded, [s], i), wn(c, e), r && c.errors.push(r), c.pendingCount === 0 && !c.done && (Object.keys(c.loaded).forEach((u) => {
1115
+ tn(c.loaded, [s], i), yn(c, e), r && c.errors.push(r), c.pendingCount === 0 && !c.done && (Object.keys(c.loaded).forEach((u) => {
1116
1116
  o[u] || (o[u] = {});
1117
1117
  const l = c.loaded[u];
1118
1118
  l.length && l.forEach((f) => {
@@ -1277,19 +1277,19 @@ function Dt() {
1277
1277
  function Jt(t) {
1278
1278
  return typeof t.ns == "string" && (t.ns = [t.ns]), typeof t.fallbackLng == "string" && (t.fallbackLng = [t.fallbackLng]), typeof t.fallbackNS == "string" && (t.fallbackNS = [t.fallbackNS]), t.supportedLngs && t.supportedLngs.indexOf("cimode") < 0 && (t.supportedLngs = t.supportedLngs.concat(["cimode"])), t;
1279
1279
  }
1280
- function be() {
1280
+ function Se() {
1281
1281
  }
1282
- function bn(t) {
1282
+ function Sn(t) {
1283
1283
  Object.getOwnPropertyNames(Object.getPrototypeOf(t)).forEach((r) => {
1284
1284
  typeof t[r] == "function" && (t[r] = t[r].bind(t));
1285
1285
  });
1286
1286
  }
1287
- class ge extends Le {
1287
+ class pe extends Ue {
1288
1288
  constructor() {
1289
1289
  let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, r = arguments.length > 1 ? arguments[1] : void 0;
1290
1290
  if (super(), this.options = Jt(e), this.services = {}, this.logger = Z, this.modules = {
1291
1291
  external: []
1292
- }, bn(this), r && !this.isInitialized && !e.isClone) {
1292
+ }, Sn(this), r && !this.isInitialized && !e.isClone) {
1293
1293
  if (!this.options.initImmediate)
1294
1294
  return this.init(e, r), this;
1295
1295
  setTimeout(() => {
@@ -1316,21 +1316,21 @@ class ge extends Le {
1316
1316
  if (!this.options.isClone) {
1317
1317
  this.modules.logger ? Z.init(s(this.modules.logger), this.options) : Z.init(null, this.options);
1318
1318
  let l;
1319
- this.modules.formatter ? l = this.modules.formatter : typeof Intl < "u" && (l = yn);
1319
+ this.modules.formatter ? l = this.modules.formatter : typeof Intl < "u" && (l = mn);
1320
1320
  const f = new Wt(this.options);
1321
1321
  this.store = new Tt(this.options.resources, this.options);
1322
1322
  const d = this.services;
1323
- d.logger = Z, d.resourceStore = this.store, d.languageUtils = f, d.pluralResolver = new pn(f, {
1323
+ d.logger = Z, d.resourceStore = this.store, d.languageUtils = f, d.pluralResolver = new hn(f, {
1324
1324
  prepend: this.options.pluralSeparator,
1325
1325
  compatibilityJSON: this.options.compatibilityJSON,
1326
1326
  simplifyPluralSuffix: this.options.simplifyPluralSuffix
1327
- }), l && (!this.options.interpolation.format || this.options.interpolation.format === a.interpolation.format) && (d.formatter = s(l), d.formatter.init(d, this.options), this.options.interpolation.format = d.formatter.format.bind(d.formatter)), d.interpolator = new gn(this.options), d.utils = {
1327
+ }), l && (!this.options.interpolation.format || this.options.interpolation.format === a.interpolation.format) && (d.formatter = s(l), d.formatter.init(d, this.options), this.options.interpolation.format = d.formatter.format.bind(d.formatter)), d.interpolator = new pn(this.options), d.utils = {
1328
1328
  hasLoadedNamespace: this.hasLoadedNamespace.bind(this)
1329
- }, d.backendConnector = new Sn(s(this.modules.backend), d.resourceStore, d, this.options), d.backendConnector.on("*", function(p) {
1329
+ }, d.backendConnector = new wn(s(this.modules.backend), d.resourceStore, d, this.options), d.backendConnector.on("*", function(p) {
1330
1330
  for (var h = arguments.length, g = new Array(h > 1 ? h - 1 : 0), S = 1; S < h; S++)
1331
1331
  g[S - 1] = arguments[S];
1332
1332
  e.emit(p, ...g);
1333
- }), this.modules.languageDetector && (d.languageDetector = s(this.modules.languageDetector), d.languageDetector.init && d.languageDetector.init(d, this.options.detection, this.options)), this.modules.i18nFormat && (d.i18nFormat = s(this.modules.i18nFormat), d.i18nFormat.init && d.i18nFormat.init(this)), this.translator = new Ke(this.services, this.options), this.translator.on("*", function(p) {
1333
+ }), this.modules.languageDetector && (d.languageDetector = s(this.modules.languageDetector), d.languageDetector.init && d.languageDetector.init(d, this.options.detection, this.options)), this.modules.i18nFormat && (d.i18nFormat = s(this.modules.i18nFormat), d.i18nFormat.init && d.i18nFormat.init(this)), this.translator = new He(this.services, this.options), this.translator.on("*", function(p) {
1334
1334
  for (var h = arguments.length, g = new Array(h > 1 ? h - 1 : 0), S = 1; S < h; S++)
1335
1335
  g[S - 1] = arguments[S];
1336
1336
  e.emit(p, ...g);
@@ -1338,7 +1338,7 @@ class ge extends Le {
1338
1338
  p.init && p.init(this);
1339
1339
  });
1340
1340
  }
1341
- if (this.format = this.options.interpolation.format, n || (n = be), this.options.fallbackLng && !this.services.languageDetector && !this.options.lng) {
1341
+ if (this.format = this.options.interpolation.format, n || (n = Se), this.options.fallbackLng && !this.services.languageDetector && !this.options.lng) {
1342
1342
  const l = this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);
1343
1343
  l.length > 0 && l[0] !== "dev" && (this.options.lng = l[0]);
1344
1344
  }
@@ -1351,7 +1351,7 @@ class ge extends Le {
1351
1351
  return e.store[l](...arguments), e;
1352
1352
  };
1353
1353
  });
1354
- const c = pe(), u = () => {
1354
+ const c = he(), u = () => {
1355
1355
  const l = (f, d) => {
1356
1356
  this.isInitialized && !this.initializedStoreOnce && this.logger.warn("init: i18next is already initialized. You should call init just once!"), this.isInitialized = !0, this.options.isClone || this.logger.log("initialized", this.options), this.emit("initialized", this.options), c.resolve(d), n(f, d);
1357
1357
  };
@@ -1362,7 +1362,7 @@ class ge extends Le {
1362
1362
  return this.options.resources || !this.options.initImmediate ? u() : setTimeout(u, 0), c;
1363
1363
  }
1364
1364
  loadResources(e) {
1365
- let n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : be;
1365
+ let n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : Se;
1366
1366
  const a = typeof e == "string" ? e : this.language;
1367
1367
  if (typeof e == "function" && (n = e), !this.options.resources || this.options.partialBundledLanguages) {
1368
1368
  if (a && a.toLowerCase() === "cimode" && (!this.options.preload || this.options.preload.length === 0))
@@ -1381,8 +1381,8 @@ class ge extends Le {
1381
1381
  n(null);
1382
1382
  }
1383
1383
  reloadResources(e, r, n) {
1384
- const a = pe();
1385
- return e || (e = this.languages), r || (r = this.options.ns), n || (n = be), this.services.backendConnector.reload(e, r, (s) => {
1384
+ const a = he();
1385
+ return e || (e = this.languages), r || (r = this.options.ns), n || (n = Se), this.services.backendConnector.reload(e, r, (s) => {
1386
1386
  a.resolve(), n(s);
1387
1387
  }), a;
1388
1388
  }
@@ -1391,7 +1391,7 @@ class ge extends Le {
1391
1391
  throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");
1392
1392
  if (!e.type)
1393
1393
  throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");
1394
- return e.type === "backend" && (this.modules.backend = e), (e.type === "logger" || e.log && e.warn && e.error) && (this.modules.logger = e), e.type === "languageDetector" && (this.modules.languageDetector = e), e.type === "i18nFormat" && (this.modules.i18nFormat = e), e.type === "postProcessor" && er.addPostProcessor(e), e.type === "formatter" && (this.modules.formatter = e), e.type === "3rdParty" && this.modules.external.push(e), this;
1394
+ return e.type === "backend" && (this.modules.backend = e), (e.type === "logger" || e.log && e.warn && e.error) && (this.modules.logger = e), e.type === "languageDetector" && (this.modules.languageDetector = e), e.type === "i18nFormat" && (this.modules.i18nFormat = e), e.type === "postProcessor" && tr.addPostProcessor(e), e.type === "formatter" && (this.modules.formatter = e), e.type === "3rdParty" && this.modules.external.push(e), this;
1395
1395
  }
1396
1396
  setResolvedLanguage(e) {
1397
1397
  if (!(!e || !this.languages) && !(["cimode", "dev"].indexOf(e) > -1))
@@ -1406,7 +1406,7 @@ class ge extends Le {
1406
1406
  changeLanguage(e, r) {
1407
1407
  var n = this;
1408
1408
  this.isLanguageChangingTo = e;
1409
- const a = pe();
1409
+ const a = he();
1410
1410
  this.emit("languageChanging", e);
1411
1411
  const s = (c) => {
1412
1412
  this.language = c, this.languages = this.services.languageUtils.toResolveHierarchy(c), this.resolvedLanguage = void 0, this.setResolvedLanguage(c);
@@ -1474,7 +1474,7 @@ class ge extends Le {
1474
1474
  return !!(this.hasResourceBundle(n, e) || !this.services.backendConnector.backend || this.options.resources && !this.options.partialBundledLanguages || i(n, e) && (!a || i(s, e)));
1475
1475
  }
1476
1476
  loadNamespaces(e, r) {
1477
- const n = pe();
1477
+ const n = he();
1478
1478
  return this.options.ns ? (typeof e == "string" && (e = [e]), e.forEach((a) => {
1479
1479
  this.options.ns.indexOf(a) < 0 && this.options.ns.push(a);
1480
1480
  }), this.loadResources((a) => {
@@ -1482,7 +1482,7 @@ class ge extends Le {
1482
1482
  }), n) : (r && r(), Promise.resolve());
1483
1483
  }
1484
1484
  loadLanguages(e, r) {
1485
- const n = pe();
1485
+ const n = he();
1486
1486
  typeof e == "string" && (e = [e]);
1487
1487
  const a = this.options.preload || [], s = e.filter((i) => a.indexOf(i) < 0);
1488
1488
  return s.length ? (this.options.preload = a.concat(s), this.loadResources((i) => {
@@ -1497,24 +1497,24 @@ class ge extends Le {
1497
1497
  }
1498
1498
  static createInstance() {
1499
1499
  let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, r = arguments.length > 1 ? arguments[1] : void 0;
1500
- return new ge(e, r);
1500
+ return new pe(e, r);
1501
1501
  }
1502
1502
  cloneInstance() {
1503
- let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : be;
1503
+ let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : Se;
1504
1504
  const n = e.forkResourceStore;
1505
1505
  n && delete e.forkResourceStore;
1506
1506
  const a = {
1507
1507
  ...this.options,
1508
1508
  ...e,
1509
1509
  isClone: !0
1510
- }, s = new ge(a);
1510
+ }, s = new pe(a);
1511
1511
  return (e.debug !== void 0 || e.prefix !== void 0) && (s.logger = s.logger.clone(e)), ["store", "services", "language"].forEach((o) => {
1512
1512
  s[o] = this[o];
1513
1513
  }), s.services = {
1514
1514
  ...this.services
1515
1515
  }, s.services.utils = {
1516
1516
  hasLoadedNamespace: s.hasLoadedNamespace.bind(s)
1517
- }, n && (s.store = new Tt(this.store.data, a), s.services.resourceStore = s.store), s.translator = new Ke(s.services, a), s.translator.on("*", function(o) {
1517
+ }, n && (s.store = new Tt(this.store.data, a), s.services.resourceStore = s.store), s.translator = new He(s.services, a), s.translator.on("*", function(o) {
1518
1518
  for (var c = arguments.length, u = new Array(c > 1 ? c - 1 : 0), l = 1; l < c; l++)
1519
1519
  u[l - 1] = arguments[l];
1520
1520
  s.emit(o, ...u);
@@ -1532,8 +1532,8 @@ class ge extends Le {
1532
1532
  };
1533
1533
  }
1534
1534
  }
1535
- const k = ge.createInstance();
1536
- k.createInstance = ge.createInstance;
1535
+ const k = pe.createInstance();
1536
+ k.createInstance = pe.createInstance;
1537
1537
  k.createInstance;
1538
1538
  k.dir;
1539
1539
  k.init;
@@ -1542,13 +1542,13 @@ k.reloadResources;
1542
1542
  k.use;
1543
1543
  k.changeLanguage;
1544
1544
  k.getFixedT;
1545
- const ve = k.t;
1545
+ const be = k.t;
1546
1546
  k.exists;
1547
1547
  k.setDefaultNamespace;
1548
1548
  k.hasLoadedNamespace;
1549
1549
  k.loadNamespaces;
1550
1550
  k.loadLanguages;
1551
- const vn = {
1551
+ const bn = {
1552
1552
  es: {
1553
1553
  translation: {
1554
1554
  ...Qr
@@ -1556,7 +1556,7 @@ const vn = {
1556
1556
  }
1557
1557
  };
1558
1558
  k.init({
1559
- resources: vn,
1559
+ resources: bn,
1560
1560
  lng: "es",
1561
1561
  // language to use, more information here: https://www.i18next.com/overview/configuration-options#languages-namespaces-resources
1562
1562
  // you can use the i18n.changeLanguage function to change the language manually: https://www.i18next.com/overview/api#changelanguage
@@ -1568,19 +1568,6 @@ k.init({
1568
1568
  },
1569
1569
  debug: !1
1570
1570
  });
1571
- class tr extends En {
1572
- constructor(r) {
1573
- super();
1574
- ee(this, "message", "Internal Error");
1575
- ee(this, "type", "modal");
1576
- ee(this, "level", "error");
1577
- ee(this, "title", "Error");
1578
- ee(this, "code");
1579
- ee(this, "payload");
1580
- ee(this, "clearCookieSession");
1581
- Object.assign(this, this.get(r)), this.logError("MessageErrorBFF", JSON.stringify(this));
1582
- }
1583
- }
1584
1571
  const j = {
1585
1572
  // EXAMPLE ERROR
1586
1573
  "MP-001": {
@@ -1619,31 +1606,40 @@ const j = {
1619
1606
  level: "warning"
1620
1607
  }
1621
1608
  };
1622
- class En extends jr {
1609
+ class vn extends jt {
1623
1610
  get(e = "default") {
1624
1611
  var a, s;
1625
- if (e instanceof tr)
1626
- return e;
1627
1612
  if (e instanceof Error)
1628
1613
  return this.logError(e.message), {
1629
1614
  ...j.internalError,
1630
- title: ve(j.internalError.title),
1631
- message: ve(j.internalError.message)
1615
+ title: be(j.internalError.title),
1616
+ message: be(j.internalError.message)
1632
1617
  };
1633
1618
  const r = typeof e == "string" ? e : e.code ?? e.errorType, n = typeof e == "string" ? {} : { ...e };
1634
1619
  return {
1635
1620
  ...j[r] ?? j.default,
1636
- title: ve(
1621
+ title: be(
1637
1622
  ((a = j[r]) == null ? void 0 : a.title) ?? j.default.title,
1638
1623
  n
1639
1624
  ),
1640
- message: ve(
1625
+ message: be(
1641
1626
  ((s = j[r]) == null ? void 0 : s.message) ?? j.default.message,
1642
1627
  n
1643
1628
  )
1644
1629
  };
1645
1630
  }
1646
1631
  }
1632
+ class En extends jt {
1633
+ constructor(r) {
1634
+ super();
1635
+ Kt(this, "messageError");
1636
+ const n = new vn();
1637
+ this.messageError = n.get(r), this.logError("MessageErrorBFF", JSON.stringify(this.messageError));
1638
+ }
1639
+ get() {
1640
+ return this.messageError;
1641
+ }
1642
+ }
1647
1643
  var rr = {}, nr = { exports: {} };
1648
1644
  (function(t) {
1649
1645
  function e(r) {
@@ -1657,7 +1653,7 @@ var ar = nr.exports;
1657
1653
  const b = crypto, G = (t) => t instanceof CryptoKey, sr = async (t, e) => {
1658
1654
  const r = `SHA-${t.slice(-3)}`;
1659
1655
  return new Uint8Array(await b.subtle.digest(r, e));
1660
- }, K = new TextEncoder(), X = new TextDecoder(), Re = 2 ** 32;
1656
+ }, K = new TextEncoder(), X = new TextDecoder(), Ke = 2 ** 32;
1661
1657
  function Q(...t) {
1662
1658
  const e = t.reduce((a, { length: s }) => a + s, 0), r = new Uint8Array(e);
1663
1659
  let n = 0;
@@ -1668,38 +1664,38 @@ function Q(...t) {
1668
1664
  function An(t, e) {
1669
1665
  return Q(K.encode(t), new Uint8Array([0]), e);
1670
1666
  }
1671
- function ot(t, e, r) {
1672
- if (e < 0 || e >= Re)
1673
- throw new RangeError(`value must be >= 0 and <= ${Re - 1}. Received ${e}`);
1667
+ function it(t, e, r) {
1668
+ if (e < 0 || e >= Ke)
1669
+ throw new RangeError(`value must be >= 0 and <= ${Ke - 1}. Received ${e}`);
1674
1670
  t.set([e >>> 24, e >>> 16, e >>> 8, e & 255], r);
1675
1671
  }
1676
1672
  function ir(t) {
1677
- const e = Math.floor(t / Re), r = t % Re, n = new Uint8Array(8);
1678
- return ot(n, e, 0), ot(n, r, 4), n;
1673
+ const e = Math.floor(t / Ke), r = t % Ke, n = new Uint8Array(8);
1674
+ return it(n, e, 0), it(n, r, 4), n;
1679
1675
  }
1680
- function gt(t) {
1676
+ function pt(t) {
1681
1677
  const e = new Uint8Array(4);
1682
- return ot(e, t), e;
1678
+ return it(e, t), e;
1683
1679
  }
1684
- function qe(t) {
1685
- return Q(gt(t.length), t);
1680
+ function ze(t) {
1681
+ return Q(pt(t.length), t);
1686
1682
  }
1687
1683
  async function xn(t, e, r) {
1688
1684
  const n = Math.ceil((e >> 3) / 32), a = new Uint8Array(n * 32);
1689
1685
  for (let s = 0; s < n; s++) {
1690
1686
  const i = new Uint8Array(4 + t.length + r.length);
1691
- i.set(gt(s + 1)), i.set(t, 4), i.set(r, 4 + t.length), a.set(await sr("sha256", i), s * 32);
1687
+ i.set(pt(s + 1)), i.set(t, 4), i.set(r, 4 + t.length), a.set(await sr("sha256", i), s * 32);
1692
1688
  }
1693
1689
  return a.slice(0, e >> 3);
1694
1690
  }
1695
- const mt = (t) => {
1691
+ const gt = (t) => {
1696
1692
  let e = t;
1697
1693
  typeof e == "string" && (e = K.encode(e));
1698
1694
  const r = 32768, n = [];
1699
1695
  for (let a = 0; a < e.length; a += r)
1700
1696
  n.push(String.fromCharCode.apply(null, e.subarray(a, a + r)));
1701
1697
  return btoa(n.join(""));
1702
- }, O = (t) => mt(t).replace(/=/g, "").replace(/\+/g, "-").replace(/\//g, "_"), or = (t) => {
1698
+ }, O = (t) => gt(t).replace(/=/g, "").replace(/\+/g, "-").replace(/\//g, "_"), or = (t) => {
1703
1699
  const e = atob(t), r = new Uint8Array(e.length);
1704
1700
  for (let n = 0; n < e.length; n++)
1705
1701
  r[n] = e.charCodeAt(n);
@@ -1730,7 +1726,7 @@ class V extends L {
1730
1726
  super(e), this.code = "ERR_JWT_CLAIM_VALIDATION_FAILED", this.claim = r, this.reason = n;
1731
1727
  }
1732
1728
  }
1733
- class ct extends L {
1729
+ class ot extends L {
1734
1730
  static get code() {
1735
1731
  return "ERR_JWT_EXPIRED";
1736
1732
  }
@@ -1738,7 +1734,7 @@ class ct extends L {
1738
1734
  super(e), this.code = "ERR_JWT_EXPIRED", this.claim = r, this.reason = n;
1739
1735
  }
1740
1736
  }
1741
- class Oe extends L {
1737
+ class Re extends L {
1742
1738
  constructor() {
1743
1739
  super(...arguments), this.code = "ERR_JOSE_ALG_NOT_ALLOWED";
1744
1740
  }
@@ -1754,7 +1750,7 @@ class x extends L {
1754
1750
  return "ERR_JOSE_NOT_SUPPORTED";
1755
1751
  }
1756
1752
  }
1757
- class me extends L {
1753
+ class ge extends L {
1758
1754
  constructor() {
1759
1755
  super(...arguments), this.code = "ERR_JWE_DECRYPTION_FAILED", this.message = "decryption operation failed";
1760
1756
  }
@@ -1794,7 +1790,7 @@ class cr extends L {
1794
1790
  return "ERR_JWK_INVALID";
1795
1791
  }
1796
1792
  }
1797
- class De extends L {
1793
+ class Le extends L {
1798
1794
  constructor() {
1799
1795
  super(...arguments), this.code = "ERR_JWKS_INVALID";
1800
1796
  }
@@ -1802,7 +1798,7 @@ class De extends L {
1802
1798
  return "ERR_JWKS_INVALID";
1803
1799
  }
1804
1800
  }
1805
- class yt extends L {
1801
+ class mt extends L {
1806
1802
  constructor() {
1807
1803
  super(...arguments), this.code = "ERR_JWKS_NO_MATCHING_KEY", this.message = "no applicable key found in the JSON Web Key Set";
1808
1804
  }
@@ -1826,7 +1822,7 @@ class lr extends L {
1826
1822
  return "ERR_JWKS_TIMEOUT";
1827
1823
  }
1828
1824
  }
1829
- class wt extends L {
1825
+ class yt extends L {
1830
1826
  constructor() {
1831
1827
  super(...arguments), this.code = "ERR_JWS_SIGNATURE_VERIFICATION_FAILED", this.message = "signature verification failed";
1832
1828
  }
@@ -1836,22 +1832,22 @@ class wt extends L {
1836
1832
  }
1837
1833
  const Cn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1838
1834
  __proto__: null,
1839
- JOSEAlgNotAllowed: Oe,
1835
+ JOSEAlgNotAllowed: Re,
1840
1836
  JOSEError: L,
1841
1837
  JOSENotSupported: x,
1842
- JWEDecryptionFailed: me,
1838
+ JWEDecryptionFailed: ge,
1843
1839
  JWEInvalid: y,
1844
1840
  JWKInvalid: cr,
1845
- JWKSInvalid: De,
1841
+ JWKSInvalid: Le,
1846
1842
  JWKSMultipleMatchingKeys: ur,
1847
- JWKSNoMatchingKey: yt,
1843
+ JWKSNoMatchingKey: mt,
1848
1844
  JWKSTimeout: lr,
1849
1845
  JWSInvalid: P,
1850
- JWSSignatureVerificationFailed: wt,
1846
+ JWSSignatureVerificationFailed: yt,
1851
1847
  JWTClaimValidationFailed: V,
1852
- JWTExpired: ct,
1848
+ JWTExpired: ot,
1853
1849
  JWTInvalid: B
1854
- }, Symbol.toStringTag, { value: "Module" })), Je = b.getRandomValues.bind(b);
1850
+ }, Symbol.toStringTag, { value: "Module" })), De = b.getRandomValues.bind(b);
1855
1851
  function dr(t) {
1856
1852
  switch (t) {
1857
1853
  case "A128GCM":
@@ -1869,10 +1865,10 @@ function dr(t) {
1869
1865
  throw new x(`Unsupported JWE Algorithm: ${t}`);
1870
1866
  }
1871
1867
  }
1872
- const fr = (t) => Je(new Uint8Array(dr(t) >> 3)), hr = (t, e) => {
1868
+ const fr = (t) => De(new Uint8Array(dr(t) >> 3)), hr = (t, e) => {
1873
1869
  if (e.length << 3 !== dr(t))
1874
1870
  throw new y("Invalid Initialization Vector length");
1875
- }, Te = (t, e) => {
1871
+ }, Oe = (t, e) => {
1876
1872
  const r = t.byteLength << 3;
1877
1873
  if (r !== e)
1878
1874
  throw new y(`Invalid Content Encryption Key length. Expected ${e} bits, got ${r} bits`);
@@ -1892,10 +1888,10 @@ const fr = (t) => Je(new Uint8Array(dr(t) >> 3)), hr = (t, e) => {
1892
1888
  function U(t, e = "algorithm.name") {
1893
1889
  return new TypeError(`CryptoKey does not support this operation, its ${e} must be ${t}`);
1894
1890
  }
1895
- function ne(t, e) {
1891
+ function re(t, e) {
1896
1892
  return t.name === e;
1897
1893
  }
1898
- function Ae(t) {
1894
+ function Ee(t) {
1899
1895
  return parseInt(t.name.slice(4), 10);
1900
1896
  }
1901
1897
  function Pn(t) {
@@ -1926,30 +1922,30 @@ function Hn(t, e, ...r) {
1926
1922
  case "HS256":
1927
1923
  case "HS384":
1928
1924
  case "HS512": {
1929
- if (!ne(t.algorithm, "HMAC"))
1925
+ if (!re(t.algorithm, "HMAC"))
1930
1926
  throw U("HMAC");
1931
1927
  const n = parseInt(e.slice(2), 10);
1932
- if (Ae(t.algorithm.hash) !== n)
1928
+ if (Ee(t.algorithm.hash) !== n)
1933
1929
  throw U(`SHA-${n}`, "algorithm.hash");
1934
1930
  break;
1935
1931
  }
1936
1932
  case "RS256":
1937
1933
  case "RS384":
1938
1934
  case "RS512": {
1939
- if (!ne(t.algorithm, "RSASSA-PKCS1-v1_5"))
1935
+ if (!re(t.algorithm, "RSASSA-PKCS1-v1_5"))
1940
1936
  throw U("RSASSA-PKCS1-v1_5");
1941
1937
  const n = parseInt(e.slice(2), 10);
1942
- if (Ae(t.algorithm.hash) !== n)
1938
+ if (Ee(t.algorithm.hash) !== n)
1943
1939
  throw U(`SHA-${n}`, "algorithm.hash");
1944
1940
  break;
1945
1941
  }
1946
1942
  case "PS256":
1947
1943
  case "PS384":
1948
1944
  case "PS512": {
1949
- if (!ne(t.algorithm, "RSA-PSS"))
1945
+ if (!re(t.algorithm, "RSA-PSS"))
1950
1946
  throw U("RSA-PSS");
1951
1947
  const n = parseInt(e.slice(2), 10);
1952
- if (Ae(t.algorithm.hash) !== n)
1948
+ if (Ee(t.algorithm.hash) !== n)
1953
1949
  throw U(`SHA-${n}`, "algorithm.hash");
1954
1950
  break;
1955
1951
  }
@@ -1961,7 +1957,7 @@ function Hn(t, e, ...r) {
1961
1957
  case "ES256":
1962
1958
  case "ES384":
1963
1959
  case "ES512": {
1964
- if (!ne(t.algorithm, "ECDSA"))
1960
+ if (!re(t.algorithm, "ECDSA"))
1965
1961
  throw U("ECDSA");
1966
1962
  const n = Pn(e);
1967
1963
  if (t.algorithm.namedCurve !== n)
@@ -1973,12 +1969,12 @@ function Hn(t, e, ...r) {
1973
1969
  }
1974
1970
  pr(t, r);
1975
1971
  }
1976
- function se(t, e, ...r) {
1972
+ function ae(t, e, ...r) {
1977
1973
  switch (e) {
1978
1974
  case "A128GCM":
1979
1975
  case "A192GCM":
1980
1976
  case "A256GCM": {
1981
- if (!ne(t.algorithm, "AES-GCM"))
1977
+ if (!re(t.algorithm, "AES-GCM"))
1982
1978
  throw U("AES-GCM");
1983
1979
  const n = parseInt(e.slice(1, 4), 10);
1984
1980
  if (t.algorithm.length !== n)
@@ -1988,7 +1984,7 @@ function se(t, e, ...r) {
1988
1984
  case "A128KW":
1989
1985
  case "A192KW":
1990
1986
  case "A256KW": {
1991
- if (!ne(t.algorithm, "AES-KW"))
1987
+ if (!re(t.algorithm, "AES-KW"))
1992
1988
  throw U("AES-KW");
1993
1989
  const n = parseInt(e.slice(1, 4), 10);
1994
1990
  if (t.algorithm.length !== n)
@@ -2009,17 +2005,17 @@ function se(t, e, ...r) {
2009
2005
  case "PBES2-HS256+A128KW":
2010
2006
  case "PBES2-HS384+A192KW":
2011
2007
  case "PBES2-HS512+A256KW":
2012
- if (!ne(t.algorithm, "PBKDF2"))
2008
+ if (!re(t.algorithm, "PBKDF2"))
2013
2009
  throw U("PBKDF2");
2014
2010
  break;
2015
2011
  case "RSA-OAEP":
2016
2012
  case "RSA-OAEP-256":
2017
2013
  case "RSA-OAEP-384":
2018
2014
  case "RSA-OAEP-512": {
2019
- if (!ne(t.algorithm, "RSA-OAEP"))
2015
+ if (!re(t.algorithm, "RSA-OAEP"))
2020
2016
  throw U("RSA-OAEP");
2021
2017
  const n = parseInt(e.slice(9), 10) || 1;
2022
- if (Ae(t.algorithm.hash) !== n)
2018
+ if (Ee(t.algorithm.hash) !== n)
2023
2019
  throw U(`SHA-${n}`, "algorithm.hash");
2024
2020
  break;
2025
2021
  }
@@ -2054,19 +2050,19 @@ async function Kn(t, e, r, n, a, s) {
2054
2050
  } catch {
2055
2051
  }
2056
2052
  if (!f)
2057
- throw new me();
2053
+ throw new ge();
2058
2054
  let d;
2059
2055
  try {
2060
2056
  d = new Uint8Array(await b.subtle.decrypt({ iv: n, name: "AES-CBC" }, o, r));
2061
2057
  } catch {
2062
2058
  }
2063
2059
  if (!d)
2064
- throw new me();
2060
+ throw new ge();
2065
2061
  return d;
2066
2062
  }
2067
2063
  async function Rn(t, e, r, n, a, s) {
2068
2064
  let i;
2069
- e instanceof Uint8Array ? i = await b.subtle.importKey("raw", e, "AES-GCM", !1, ["decrypt"]) : (se(e, t, "decrypt"), i = e);
2065
+ e instanceof Uint8Array ? i = await b.subtle.importKey("raw", e, "AES-GCM", !1, ["decrypt"]) : (ae(e, t, "decrypt"), i = e);
2070
2066
  try {
2071
2067
  return new Uint8Array(await b.subtle.decrypt({
2072
2068
  additionalData: s,
@@ -2075,7 +2071,7 @@ async function Rn(t, e, r, n, a, s) {
2075
2071
  tagLength: 128
2076
2072
  }, i, Q(r, a)));
2077
2073
  } catch {
2078
- throw new me();
2074
+ throw new ge();
2079
2075
  }
2080
2076
  }
2081
2077
  const wr = async (t, e, r, n, a, s) => {
@@ -2085,11 +2081,11 @@ const wr = async (t, e, r, n, a, s) => {
2085
2081
  case "A128CBC-HS256":
2086
2082
  case "A192CBC-HS384":
2087
2083
  case "A256CBC-HS512":
2088
- return e instanceof Uint8Array && Te(e, parseInt(t.slice(-3), 10)), Kn(t, e, r, n, a, s);
2084
+ return e instanceof Uint8Array && Oe(e, parseInt(t.slice(-3), 10)), Kn(t, e, r, n, a, s);
2089
2085
  case "A128GCM":
2090
2086
  case "A192GCM":
2091
2087
  case "A256GCM":
2092
- return e instanceof Uint8Array && Te(e, parseInt(t.slice(1, 4), 10)), Rn(t, e, r, n, a, s);
2088
+ return e instanceof Uint8Array && Oe(e, parseInt(t.slice(1, 4), 10)), Rn(t, e, r, n, a, s);
2093
2089
  default:
2094
2090
  throw new x("Unsupported JWE Content Encryption Algorithm");
2095
2091
  }
@@ -2097,7 +2093,7 @@ const wr = async (t, e, r, n, a, s) => {
2097
2093
  throw new x('JWE "zip" (Compression Algorithm) Header Parameter is not supported by your javascript runtime. You need to use the `inflateRaw` decrypt option to provide Inflate Raw implementation.');
2098
2094
  }, Tn = async () => {
2099
2095
  throw new x('JWE "zip" (Compression Algorithm) Header Parameter is not supported by your javascript runtime. You need to use the `deflateRaw` encrypt option to provide Deflate Raw implementation.');
2100
- }, ye = (...t) => {
2096
+ }, me = (...t) => {
2101
2097
  const e = t.filter(Boolean);
2102
2098
  if (e.length === 0 || e.length === 1)
2103
2099
  return !0;
@@ -2129,7 +2125,7 @@ function I(t) {
2129
2125
  e = Object.getPrototypeOf(e);
2130
2126
  return Object.getPrototypeOf(t) === e;
2131
2127
  }
2132
- const Ne = [
2128
+ const Je = [
2133
2129
  { hash: "SHA-256", name: "HMAC" },
2134
2130
  !0,
2135
2131
  ["sign"]
@@ -2140,29 +2136,29 @@ function Sr(t, e) {
2140
2136
  }
2141
2137
  function br(t, e, r) {
2142
2138
  if (G(t))
2143
- return se(t, e, r), t;
2139
+ return ae(t, e, r), t;
2144
2140
  if (t instanceof Uint8Array)
2145
2141
  return b.subtle.importKey("raw", t, "AES-KW", !0, [r]);
2146
2142
  throw new TypeError(M(t, ...H, "Uint8Array"));
2147
2143
  }
2148
- const ut = async (t, e, r) => {
2144
+ const ct = async (t, e, r) => {
2149
2145
  const n = await br(e, t, "wrapKey");
2150
2146
  Sr(n, t);
2151
- const a = await b.subtle.importKey("raw", r, ...Ne);
2147
+ const a = await b.subtle.importKey("raw", r, ...Je);
2152
2148
  return new Uint8Array(await b.subtle.wrapKey("raw", a, n, "AES-KW"));
2153
- }, lt = async (t, e, r) => {
2149
+ }, ut = async (t, e, r) => {
2154
2150
  const n = await br(e, t, "unwrapKey");
2155
2151
  Sr(n, t);
2156
- const a = await b.subtle.unwrapKey("raw", r, n, "AES-KW", ...Ne);
2152
+ const a = await b.subtle.unwrapKey("raw", r, n, "AES-KW", ...Je);
2157
2153
  return new Uint8Array(await b.subtle.exportKey("raw", a));
2158
2154
  };
2159
2155
  async function vr(t, e, r, n, a = new Uint8Array(0), s = new Uint8Array(0)) {
2160
2156
  if (!G(t))
2161
2157
  throw new TypeError(M(t, ...H));
2162
- if (se(t, "ECDH"), !G(e))
2158
+ if (ae(t, "ECDH"), !G(e))
2163
2159
  throw new TypeError(M(e, ...H));
2164
- se(e, "ECDH", "deriveBits");
2165
- const i = Q(qe(K.encode(r)), qe(a), qe(s), gt(n));
2160
+ ae(e, "ECDH", "deriveBits");
2161
+ const i = Q(ze(K.encode(r)), ze(a), ze(s), pt(n));
2166
2162
  let o;
2167
2163
  t.algorithm.name === "X25519" ? o = 256 : t.algorithm.name === "X448" ? o = 448 : o = Math.ceil(parseInt(t.algorithm.namedCurve.substr(-3), 10) / 8) << 3;
2168
2164
  const c = new Uint8Array(await b.subtle.deriveBits({
@@ -2189,7 +2185,7 @@ function Ln(t, e) {
2189
2185
  if (t instanceof Uint8Array)
2190
2186
  return b.subtle.importKey("raw", t, "PBKDF2", !1, ["deriveBits"]);
2191
2187
  if (G(t))
2192
- return se(t, e, "deriveBits", "deriveKey"), t;
2188
+ return ae(t, e, "deriveBits", "deriveKey"), t;
2193
2189
  throw new TypeError(M(t, ...H, "Uint8Array"));
2194
2190
  }
2195
2191
  async function Ar(t, e, r, n) {
@@ -2209,14 +2205,14 @@ async function Ar(t, e, r, n) {
2209
2205
  return b.subtle.deriveKey(i, c, o, !1, ["wrapKey", "unwrapKey"]);
2210
2206
  throw new TypeError('PBKDF2 key "usages" must include "deriveBits" or "deriveKey"');
2211
2207
  }
2212
- const Dn = async (t, e, r, n = 2048, a = Je(new Uint8Array(16))) => {
2208
+ const Dn = async (t, e, r, n = 2048, a = De(new Uint8Array(16))) => {
2213
2209
  const s = await Ar(a, t, n, e);
2214
- return { encryptedKey: await ut(t.slice(-6), s, r), p2c: n, p2s: O(a) };
2210
+ return { encryptedKey: await ct(t.slice(-6), s, r), p2c: n, p2s: O(a) };
2215
2211
  }, Jn = async (t, e, r, n, a) => {
2216
2212
  const s = await Ar(a, t, n, e);
2217
- return lt(t.slice(-6), s, r);
2213
+ return ut(t.slice(-6), s, r);
2218
2214
  };
2219
- function Ie(t) {
2215
+ function Te(t) {
2220
2216
  switch (t) {
2221
2217
  case "RSA-OAEP":
2222
2218
  case "RSA-OAEP-256":
@@ -2227,7 +2223,7 @@ function Ie(t) {
2227
2223
  throw new x(`alg ${t} is not supported either by JOSE or your javascript runtime`);
2228
2224
  }
2229
2225
  }
2230
- const $e = (t, e) => {
2226
+ const Ne = (t, e) => {
2231
2227
  if (t.startsWith("RS") || t.startsWith("PS")) {
2232
2228
  const { modulusLength: r } = e.algorithm;
2233
2229
  if (typeof r != "number" || r < 2048)
@@ -2236,25 +2232,25 @@ const $e = (t, e) => {
2236
2232
  }, Nn = async (t, e, r) => {
2237
2233
  if (!G(e))
2238
2234
  throw new TypeError(M(e, ...H));
2239
- if (se(e, t, "encrypt", "wrapKey"), $e(t, e), e.usages.includes("encrypt"))
2240
- return new Uint8Array(await b.subtle.encrypt(Ie(t), e, r));
2235
+ if (ae(e, t, "encrypt", "wrapKey"), Ne(t, e), e.usages.includes("encrypt"))
2236
+ return new Uint8Array(await b.subtle.encrypt(Te(t), e, r));
2241
2237
  if (e.usages.includes("wrapKey")) {
2242
- const n = await b.subtle.importKey("raw", r, ...Ne);
2243
- return new Uint8Array(await b.subtle.wrapKey("raw", n, e, Ie(t)));
2238
+ const n = await b.subtle.importKey("raw", r, ...Je);
2239
+ return new Uint8Array(await b.subtle.wrapKey("raw", n, e, Te(t)));
2244
2240
  }
2245
2241
  throw new TypeError('RSA-OAEP key "usages" must include "encrypt" or "wrapKey" for this operation');
2246
2242
  }, $n = async (t, e, r) => {
2247
2243
  if (!G(e))
2248
2244
  throw new TypeError(M(e, ...H));
2249
- if (se(e, t, "decrypt", "unwrapKey"), $e(t, e), e.usages.includes("decrypt"))
2250
- return new Uint8Array(await b.subtle.decrypt(Ie(t), e, r));
2245
+ if (ae(e, t, "decrypt", "unwrapKey"), Ne(t, e), e.usages.includes("decrypt"))
2246
+ return new Uint8Array(await b.subtle.decrypt(Te(t), e, r));
2251
2247
  if (e.usages.includes("unwrapKey")) {
2252
- const n = await b.subtle.unwrapKey("raw", r, e, Ie(t), ...Ne);
2248
+ const n = await b.subtle.unwrapKey("raw", r, e, Te(t), ...Je);
2253
2249
  return new Uint8Array(await b.subtle.exportKey("raw", n));
2254
2250
  }
2255
2251
  throw new TypeError('RSA-OAEP key "usages" must include "decrypt" or "unwrapKey" for this operation');
2256
2252
  };
2257
- function St(t) {
2253
+ function wt(t) {
2258
2254
  switch (t) {
2259
2255
  case "A128GCM":
2260
2256
  return 128;
@@ -2271,7 +2267,7 @@ function St(t) {
2271
2267
  throw new x(`Unsupported JWE Algorithm: ${t}`);
2272
2268
  }
2273
2269
  }
2274
- const oe = (t) => Je(new Uint8Array(St(t) >> 3)), xr = (t, e) => {
2270
+ const ie = (t) => De(new Uint8Array(wt(t) >> 3)), xr = (t, e) => {
2275
2271
  const r = (t.match(/.{1,64}/g) || []).join(`
2276
2272
  `);
2277
2273
  return `-----BEGIN ${e}-----
@@ -2284,29 +2280,29 @@ ${r}
2284
2280
  throw new TypeError("CryptoKey is not extractable");
2285
2281
  if (r.type !== t)
2286
2282
  throw new TypeError(`key is not a ${t} key`);
2287
- return xr(mt(new Uint8Array(await b.subtle.exportKey(e, r))), `${t.toUpperCase()} KEY`);
2288
- }, Mn = (t) => Cr("public", "spki", t), kn = (t) => Cr("private", "pkcs8", t), re = (t, e, r = 0) => {
2283
+ return xr(gt(new Uint8Array(await b.subtle.exportKey(e, r))), `${t.toUpperCase()} KEY`);
2284
+ }, Mn = (t) => Cr("public", "spki", t), kn = (t) => Cr("private", "pkcs8", t), te = (t, e, r = 0) => {
2289
2285
  r === 0 && (e.unshift(e.length), e.unshift(6));
2290
2286
  let n = t.indexOf(e[0], r);
2291
2287
  if (n === -1)
2292
2288
  return !1;
2293
2289
  const a = t.subarray(n, n + e.length);
2294
- return a.length !== e.length ? !1 : a.every((s, i) => s === e[i]) || re(t, e, n + 1);
2290
+ return a.length !== e.length ? !1 : a.every((s, i) => s === e[i]) || te(t, e, n + 1);
2295
2291
  }, Nt = (t) => {
2296
2292
  switch (!0) {
2297
- case re(t, [42, 134, 72, 206, 61, 3, 1, 7]):
2293
+ case te(t, [42, 134, 72, 206, 61, 3, 1, 7]):
2298
2294
  return "P-256";
2299
- case re(t, [43, 129, 4, 0, 34]):
2295
+ case te(t, [43, 129, 4, 0, 34]):
2300
2296
  return "P-384";
2301
- case re(t, [43, 129, 4, 0, 35]):
2297
+ case te(t, [43, 129, 4, 0, 35]):
2302
2298
  return "P-521";
2303
- case re(t, [43, 101, 110]):
2299
+ case te(t, [43, 101, 110]):
2304
2300
  return "X25519";
2305
- case re(t, [43, 101, 111]):
2301
+ case te(t, [43, 101, 111]):
2306
2302
  return "X448";
2307
- case re(t, [43, 101, 112]):
2303
+ case te(t, [43, 101, 112]):
2308
2304
  return "Ed25519";
2309
- case re(t, [43, 101, 113]):
2305
+ case te(t, [43, 101, 113]):
2310
2306
  return "Ed448";
2311
2307
  default:
2312
2308
  throw new x("Invalid or unsupported EC Key Curve or OKP Key Sub Type");
@@ -2405,7 +2401,7 @@ function Hr(t) {
2405
2401
  }
2406
2402
  function Vn(t) {
2407
2403
  const e = $t($t(Hr(t).contents)[0].contents);
2408
- return mt(e[e[0].raw[0] === 160 ? 6 : 5].raw);
2404
+ return gt(e[e[0].raw[0] === 160 ? 6 : 5].raw);
2409
2405
  }
2410
2406
  function Bn(t) {
2411
2407
  const e = t.replace(/(?:-----(?:BEGIN|END) CERTIFICATE-----|\s)/g, ""), r = or(e);
@@ -2555,7 +2551,7 @@ async function Zn(t, e, r) {
2555
2551
  throw new TypeError('"pkcs8" must be PKCS#8 formatted string');
2556
2552
  return Fn(t, e, r);
2557
2553
  }
2558
- async function Me(t, e, r) {
2554
+ async function $e(t, e, r) {
2559
2555
  var n;
2560
2556
  if (!I(t))
2561
2557
  throw new TypeError("JWK must be an object");
@@ -2594,7 +2590,7 @@ const Qn = (t, e) => {
2594
2590
  throw new TypeError(`${H.join(" or ")} instances for asymmetric algorithm verifying must be of type "public"`);
2595
2591
  if (e.algorithm && r === "encrypt" && e.type === "private")
2596
2592
  throw new TypeError(`${H.join(" or ")} instances for asymmetric algorithm encryption must be of type "public"`);
2597
- }, ke = (t, e, r) => {
2593
+ }, Me = (t, e, r) => {
2598
2594
  t.startsWith("HS") || t === "dir" || t.startsWith("PBES2") || /^A\d{3}(?:GCM)?KW$/.test(t) ? Qn(t, e) : jn(t, e, r);
2599
2595
  };
2600
2596
  async function ea(t, e, r, n, a) {
@@ -2611,7 +2607,7 @@ async function ea(t, e, r, n, a) {
2611
2607
  }
2612
2608
  async function ta(t, e, r, n, a) {
2613
2609
  let s;
2614
- r instanceof Uint8Array ? s = await b.subtle.importKey("raw", r, "AES-GCM", !1, ["encrypt"]) : (se(r, t, "encrypt"), s = r);
2610
+ r instanceof Uint8Array ? s = await b.subtle.importKey("raw", r, "AES-GCM", !1, ["encrypt"]) : (ae(r, t, "encrypt"), s = r);
2615
2611
  const i = new Uint8Array(await b.subtle.encrypt({
2616
2612
  additionalData: a,
2617
2613
  iv: n,
@@ -2620,18 +2616,18 @@ async function ta(t, e, r, n, a) {
2620
2616
  }, s, e)), o = i.slice(-16);
2621
2617
  return { ciphertext: i.slice(0, -16), tag: o };
2622
2618
  }
2623
- const dt = async (t, e, r, n, a) => {
2619
+ const lt = async (t, e, r, n, a) => {
2624
2620
  if (!G(r) && !(r instanceof Uint8Array))
2625
2621
  throw new TypeError(M(r, ...H, "Uint8Array"));
2626
2622
  switch (hr(t, n), t) {
2627
2623
  case "A128CBC-HS256":
2628
2624
  case "A192CBC-HS384":
2629
2625
  case "A256CBC-HS512":
2630
- return r instanceof Uint8Array && Te(r, parseInt(t.slice(-3), 10)), ea(t, e, r, n, a);
2626
+ return r instanceof Uint8Array && Oe(r, parseInt(t.slice(-3), 10)), ea(t, e, r, n, a);
2631
2627
  case "A128GCM":
2632
2628
  case "A192GCM":
2633
2629
  case "A256GCM":
2634
- return r instanceof Uint8Array && Te(r, parseInt(t.slice(1, 4), 10)), ta(t, e, r, n, a);
2630
+ return r instanceof Uint8Array && Oe(r, parseInt(t.slice(1, 4), 10)), ta(t, e, r, n, a);
2635
2631
  default:
2636
2632
  throw new x("Unsupported JWE Content Encryption Algorithm");
2637
2633
  }
@@ -2639,7 +2635,7 @@ const dt = async (t, e, r, n, a) => {
2639
2635
  async function ra(t, e, r, n) {
2640
2636
  const a = t.slice(0, 7);
2641
2637
  n || (n = fr(a));
2642
- const { ciphertext: s, tag: i } = await dt(a, r, e, n, new Uint8Array(0));
2638
+ const { ciphertext: s, tag: i } = await lt(a, r, e, n, new Uint8Array(0));
2643
2639
  return { encryptedKey: s, iv: O(n), tag: O(i) };
2644
2640
  }
2645
2641
  async function na(t, e, r, n, a) {
@@ -2647,7 +2643,7 @@ async function na(t, e, r, n, a) {
2647
2643
  return wr(s, e, r, n, a, new Uint8Array(0));
2648
2644
  }
2649
2645
  async function aa(t, e, r, n, a) {
2650
- switch (ke(t, e, "decrypt"), t) {
2646
+ switch (Me(t, e, "decrypt"), t) {
2651
2647
  case "dir": {
2652
2648
  if (r !== void 0)
2653
2649
  throw new y("Encountered unexpected JWE Encrypted Key");
@@ -2663,7 +2659,7 @@ async function aa(t, e, r, n, a) {
2663
2659
  throw new y('JOSE Header "epk" (Ephemeral Public Key) missing or invalid');
2664
2660
  if (!Er(e))
2665
2661
  throw new x("ECDH with the provided key is not allowed or not supported by your javascript runtime");
2666
- const s = await Me(n.epk, t);
2662
+ const s = await $e(n.epk, t);
2667
2663
  let i, o;
2668
2664
  if (n.apu !== void 0) {
2669
2665
  if (typeof n.apu != "string")
@@ -2683,12 +2679,12 @@ async function aa(t, e, r, n, a) {
2683
2679
  throw new y("Failed to base64url decode the apv");
2684
2680
  }
2685
2681
  }
2686
- const c = await vr(s, e, t === "ECDH-ES" ? n.enc : t, t === "ECDH-ES" ? St(n.enc) : parseInt(t.slice(-5, -2), 10), i, o);
2682
+ const c = await vr(s, e, t === "ECDH-ES" ? n.enc : t, t === "ECDH-ES" ? wt(n.enc) : parseInt(t.slice(-5, -2), 10), i, o);
2687
2683
  if (t === "ECDH-ES")
2688
2684
  return c;
2689
2685
  if (r === void 0)
2690
2686
  throw new y("JWE Encrypted Key missing");
2691
- return lt(t.slice(-6), c, r);
2687
+ return ut(t.slice(-6), c, r);
2692
2688
  }
2693
2689
  case "RSA1_5":
2694
2690
  case "RSA-OAEP":
@@ -2724,7 +2720,7 @@ async function aa(t, e, r, n, a) {
2724
2720
  case "A256KW": {
2725
2721
  if (r === void 0)
2726
2722
  throw new y("JWE Encrypted Key missing");
2727
- return lt(t, e, r);
2723
+ return ut(t, e, r);
2728
2724
  }
2729
2725
  case "A128GCMKW":
2730
2726
  case "A192GCMKW":
@@ -2753,7 +2749,7 @@ async function aa(t, e, r, n, a) {
2753
2749
  throw new x('Invalid or unsupported "alg" (JWE Algorithm) header value');
2754
2750
  }
2755
2751
  }
2756
- function we(t, e, r, n, a) {
2752
+ function ye(t, e, r, n, a) {
2757
2753
  if (a.crit !== void 0 && n.crit === void 0)
2758
2754
  throw new t('"crit" (Critical) Header Parameter MUST be integrity protected');
2759
2755
  if (!n || n.crit === void 0)
@@ -2772,13 +2768,13 @@ function we(t, e, r, n, a) {
2772
2768
  }
2773
2769
  return new Set(n.crit);
2774
2770
  }
2775
- const ft = (t, e) => {
2771
+ const dt = (t, e) => {
2776
2772
  if (e !== void 0 && (!Array.isArray(e) || e.some((r) => typeof r != "string")))
2777
2773
  throw new TypeError(`"${t}" option must be an array of strings`);
2778
2774
  if (e)
2779
2775
  return new Set(e);
2780
2776
  };
2781
- async function bt(t, e, r) {
2777
+ async function St(t, e, r) {
2782
2778
  var n;
2783
2779
  if (!I(t))
2784
2780
  throw new y("Flattened JWE must be an object");
@@ -2808,14 +2804,14 @@ async function bt(t, e, r) {
2808
2804
  } catch {
2809
2805
  throw new y("JWE Protected Header is invalid");
2810
2806
  }
2811
- if (!ye(a, t.header, t.unprotected))
2807
+ if (!me(a, t.header, t.unprotected))
2812
2808
  throw new y("JWE Protected, JWE Unprotected Header, and JWE Per-Recipient Unprotected Header Parameter names must be disjoint");
2813
2809
  const s = {
2814
2810
  ...a,
2815
2811
  ...t.header,
2816
2812
  ...t.unprotected
2817
2813
  };
2818
- if (we(y, /* @__PURE__ */ new Map(), r == null ? void 0 : r.crit, a, s), s.zip !== void 0) {
2814
+ if (ye(y, /* @__PURE__ */ new Map(), r == null ? void 0 : r.crit, a, s), s.zip !== void 0) {
2819
2815
  if (!a || !a.zip)
2820
2816
  throw new y('JWE "zip" (Compression Algorithm) Header MUST be integrity protected');
2821
2817
  if (s.zip !== "DEF")
@@ -2826,11 +2822,11 @@ async function bt(t, e, r) {
2826
2822
  throw new y("missing JWE Algorithm (alg) in JWE Header");
2827
2823
  if (typeof o != "string" || !o)
2828
2824
  throw new y("missing JWE Encryption Algorithm (enc) in JWE Header");
2829
- const c = r && ft("keyManagementAlgorithms", r.keyManagementAlgorithms), u = r && ft("contentEncryptionAlgorithms", r.contentEncryptionAlgorithms);
2825
+ const c = r && dt("keyManagementAlgorithms", r.keyManagementAlgorithms), u = r && dt("contentEncryptionAlgorithms", r.contentEncryptionAlgorithms);
2830
2826
  if (c && !c.has(i))
2831
- throw new Oe('"alg" (Algorithm) Header Parameter not allowed');
2827
+ throw new Re('"alg" (Algorithm) Header Parameter not allowed');
2832
2828
  if (u && !u.has(o))
2833
- throw new Oe('"enc" (Encryption Algorithm) Header Parameter not allowed');
2829
+ throw new Re('"enc" (Encryption Algorithm) Header Parameter not allowed');
2834
2830
  let l;
2835
2831
  if (t.encrypted_key !== void 0)
2836
2832
  try {
@@ -2846,7 +2842,7 @@ async function bt(t, e, r) {
2846
2842
  } catch (m) {
2847
2843
  if (m instanceof TypeError || m instanceof y || m instanceof x)
2848
2844
  throw m;
2849
- d = oe(o);
2845
+ d = ie(o);
2850
2846
  }
2851
2847
  let p, h;
2852
2848
  try {
@@ -2885,7 +2881,7 @@ async function Kr(t, e, r) {
2885
2881
  const { 0: n, 1: a, 2: s, 3: i, 4: o, length: c } = t.split(".");
2886
2882
  if (c !== 5)
2887
2883
  throw new y("Invalid Compact JWE");
2888
- const u = await bt({
2884
+ const u = await St({
2889
2885
  ciphertext: i,
2890
2886
  iv: s || void 0,
2891
2887
  protected: n || void 0,
@@ -2903,7 +2899,7 @@ async function sa(t, e, r) {
2903
2899
  throw new y("JWE Recipients has no members");
2904
2900
  for (const n of t.recipients)
2905
2901
  try {
2906
- return await bt({
2902
+ return await St({
2907
2903
  aad: t.aad,
2908
2904
  ciphertext: t.ciphertext,
2909
2905
  encrypted_key: n.encrypted_key,
@@ -2915,7 +2911,7 @@ async function sa(t, e, r) {
2915
2911
  }, e, r);
2916
2912
  } catch {
2917
2913
  }
2918
- throw new me();
2914
+ throw new ge();
2919
2915
  }
2920
2916
  const ia = async (t) => {
2921
2917
  if (t instanceof Uint8Array)
@@ -2941,7 +2937,7 @@ async function Rr(t) {
2941
2937
  }
2942
2938
  async function Or(t, e, r, n, a = {}) {
2943
2939
  let s, i, o;
2944
- switch (ke(t, r, "encrypt"), t) {
2940
+ switch (Me(t, r, "encrypt"), t) {
2945
2941
  case "dir": {
2946
2942
  o = r;
2947
2943
  break;
@@ -2955,14 +2951,14 @@ async function Or(t, e, r, n, a = {}) {
2955
2951
  const { apu: c, apv: u } = a;
2956
2952
  let { epk: l } = a;
2957
2953
  l || (l = (await Wn(r)).privateKey);
2958
- const { x: f, y: d, crv: p, kty: h } = await Rr(l), g = await vr(r, l, t === "ECDH-ES" ? e : t, t === "ECDH-ES" ? St(e) : parseInt(t.slice(-5, -2), 10), c, u);
2954
+ const { x: f, y: d, crv: p, kty: h } = await Rr(l), g = await vr(r, l, t === "ECDH-ES" ? e : t, t === "ECDH-ES" ? wt(e) : parseInt(t.slice(-5, -2), 10), c, u);
2959
2955
  if (i = { epk: { x: f, crv: p, kty: h } }, h === "EC" && (i.epk.y = d), c && (i.apu = O(c)), u && (i.apv = O(u)), t === "ECDH-ES") {
2960
2956
  o = g;
2961
2957
  break;
2962
2958
  }
2963
- o = n || oe(e);
2959
+ o = n || ie(e);
2964
2960
  const S = t.slice(-6);
2965
- s = await ut(S, g, o);
2961
+ s = await ct(S, g, o);
2966
2962
  break;
2967
2963
  }
2968
2964
  case "RSA1_5":
@@ -2970,13 +2966,13 @@ async function Or(t, e, r, n, a = {}) {
2970
2966
  case "RSA-OAEP-256":
2971
2967
  case "RSA-OAEP-384":
2972
2968
  case "RSA-OAEP-512": {
2973
- o = n || oe(e), s = await Nn(t, r, o);
2969
+ o = n || ie(e), s = await Nn(t, r, o);
2974
2970
  break;
2975
2971
  }
2976
2972
  case "PBES2-HS256+A128KW":
2977
2973
  case "PBES2-HS384+A192KW":
2978
2974
  case "PBES2-HS512+A256KW": {
2979
- o = n || oe(e);
2975
+ o = n || ie(e);
2980
2976
  const { p2c: c, p2s: u } = a;
2981
2977
  ({ encryptedKey: s, ...i } = await Dn(t, r, o, c, u));
2982
2978
  break;
@@ -2984,13 +2980,13 @@ async function Or(t, e, r, n, a = {}) {
2984
2980
  case "A128KW":
2985
2981
  case "A192KW":
2986
2982
  case "A256KW": {
2987
- o = n || oe(e), s = await ut(t, r, o);
2983
+ o = n || ie(e), s = await ct(t, r, o);
2988
2984
  break;
2989
2985
  }
2990
2986
  case "A128GCMKW":
2991
2987
  case "A192GCMKW":
2992
2988
  case "A256GCMKW": {
2993
- o = n || oe(e);
2989
+ o = n || ie(e);
2994
2990
  const { iv: c } = a;
2995
2991
  ({ encryptedKey: s, ...i } = await ra(t, r, o, c));
2996
2992
  break;
@@ -3001,7 +2997,7 @@ async function Or(t, e, r, n, a = {}) {
3001
2997
  return { cek: o, encryptedKey: s, parameters: i };
3002
2998
  }
3003
2999
  const Tr = Symbol();
3004
- class We {
3000
+ class Ie {
3005
3001
  constructor(e) {
3006
3002
  if (!(e instanceof Uint8Array))
3007
3003
  throw new TypeError("plaintext must be an instance of Uint8Array");
@@ -3043,14 +3039,14 @@ class We {
3043
3039
  async encrypt(e, r) {
3044
3040
  if (!this._protectedHeader && !this._unprotectedHeader && !this._sharedUnprotectedHeader)
3045
3041
  throw new y("either setProtectedHeader, setUnprotectedHeader, or sharedUnprotectedHeader must be called before #encrypt()");
3046
- if (!ye(this._protectedHeader, this._unprotectedHeader, this._sharedUnprotectedHeader))
3042
+ if (!me(this._protectedHeader, this._unprotectedHeader, this._sharedUnprotectedHeader))
3047
3043
  throw new y("JWE Protected, JWE Shared Unprotected and JWE Per-Recipient Header Parameter names must be disjoint");
3048
3044
  const n = {
3049
3045
  ...this._protectedHeader,
3050
3046
  ...this._unprotectedHeader,
3051
3047
  ...this._sharedUnprotectedHeader
3052
3048
  };
3053
- if (we(y, /* @__PURE__ */ new Map(), r == null ? void 0 : r.crit, this._protectedHeader, n), n.zip !== void 0) {
3049
+ if (ye(y, /* @__PURE__ */ new Map(), r == null ? void 0 : r.crit, this._protectedHeader, n), n.zip !== void 0) {
3054
3050
  if (!this._protectedHeader || !this._protectedHeader.zip)
3055
3051
  throw new y('JWE "zip" (Compression Algorithm) Header MUST be integrity protected');
3056
3052
  if (n.zip !== "DEF")
@@ -3078,9 +3074,9 @@ class We {
3078
3074
  let f, d;
3079
3075
  if (n.zip === "DEF") {
3080
3076
  const h = await ((r == null ? void 0 : r.deflateRaw) || Tn)(this._plaintext);
3081
- ({ ciphertext: f, tag: d } = await dt(s, h, o, this._iv, c));
3077
+ ({ ciphertext: f, tag: d } = await lt(s, h, o, this._iv, c));
3082
3078
  } else
3083
- ({ ciphertext: f, tag: d } = await dt(s, this._plaintext, o, this._iv, c));
3079
+ ({ ciphertext: f, tag: d } = await lt(s, this._plaintext, o, this._iv, c));
3084
3080
  const p = {
3085
3081
  ciphertext: O(f),
3086
3082
  iv: O(this._iv),
@@ -3134,7 +3130,7 @@ class da {
3134
3130
  if (!this._recipients.length)
3135
3131
  throw new y("at least one recipient must be added");
3136
3132
  if (e = { deflateRaw: e == null ? void 0 : e.deflateRaw }, this._recipients.length === 1) {
3137
- const [c] = this._recipients, u = await new We(this._plaintext).setAdditionalAuthenticatedData(this._aad).setProtectedHeader(this._protectedHeader).setSharedUnprotectedHeader(this._unprotectedHeader).setUnprotectedHeader(c.unprotectedHeader).encrypt(c.key, { ...c.options, ...e });
3133
+ const [c] = this._recipients, u = await new Ie(this._plaintext).setAdditionalAuthenticatedData(this._aad).setProtectedHeader(this._protectedHeader).setSharedUnprotectedHeader(this._unprotectedHeader).setUnprotectedHeader(c.unprotectedHeader).encrypt(c.key, { ...c.options, ...e });
3138
3134
  let l = {
3139
3135
  ciphertext: u.ciphertext,
3140
3136
  iv: u.iv,
@@ -3146,7 +3142,7 @@ class da {
3146
3142
  let s;
3147
3143
  for (let c = 0; c < this._recipients.length; c++) {
3148
3144
  const u = this._recipients[c];
3149
- if (!ye(this._protectedHeader, this._unprotectedHeader, u.unprotectedHeader))
3145
+ if (!me(this._protectedHeader, this._unprotectedHeader, u.unprotectedHeader))
3150
3146
  throw new y("JWE Protected, JWE Shared Unprotected and JWE Per-Recipient Header Parameter names must be disjoint");
3151
3147
  const l = {
3152
3148
  ...this._protectedHeader,
@@ -3163,10 +3159,10 @@ class da {
3163
3159
  s = l.enc;
3164
3160
  else if (s !== l.enc)
3165
3161
  throw new y('JWE "enc" (Encryption Algorithm) Header Parameter must be the same for all recipients');
3166
- if (we(y, /* @__PURE__ */ new Map(), u.options.crit, this._protectedHeader, l), l.zip !== void 0 && (!this._protectedHeader || !this._protectedHeader.zip))
3162
+ if (ye(y, /* @__PURE__ */ new Map(), u.options.crit, this._protectedHeader, l), l.zip !== void 0 && (!this._protectedHeader || !this._protectedHeader.zip))
3167
3163
  throw new y('JWE "zip" (Compression Algorithm) Header MUST be integrity protected');
3168
3164
  }
3169
- const i = oe(s);
3165
+ const i = ie(s);
3170
3166
  let o = {
3171
3167
  ciphertext: "",
3172
3168
  iv: "",
@@ -3182,7 +3178,7 @@ class da {
3182
3178
  ...u.unprotectedHeader
3183
3179
  }.alg.startsWith("PBES2") ? 2048 + c : void 0;
3184
3180
  if (c === 0) {
3185
- const g = await new We(this._plaintext).setAdditionalAuthenticatedData(this._aad).setContentEncryptionKey(i).setProtectedHeader(this._protectedHeader).setSharedUnprotectedHeader(this._unprotectedHeader).setUnprotectedHeader(u.unprotectedHeader).setKeyManagementParameters({ p2c: d }).encrypt(u.key, {
3181
+ const g = await new Ie(this._plaintext).setAdditionalAuthenticatedData(this._aad).setContentEncryptionKey(i).setProtectedHeader(this._protectedHeader).setSharedUnprotectedHeader(this._unprotectedHeader).setUnprotectedHeader(u.unprotectedHeader).setKeyManagementParameters({ p2c: d }).encrypt(u.key, {
3186
3182
  ...u.options,
3187
3183
  ...e,
3188
3184
  [Tr]: !0
@@ -3233,7 +3229,7 @@ function Wr(t, e, r) {
3233
3229
  }
3234
3230
  const fa = async (t, e, r, n) => {
3235
3231
  const a = await Wr(t, e, "verify");
3236
- $e(t, a);
3232
+ Ne(t, a);
3237
3233
  const s = Ir(t, a.algorithm);
3238
3234
  try {
3239
3235
  return await b.subtle.verify(s, a, r, n);
@@ -3241,7 +3237,7 @@ const fa = async (t, e, r, n) => {
3241
3237
  return !1;
3242
3238
  }
3243
3239
  };
3244
- async function vt(t, e, r) {
3240
+ async function bt(t, e, r) {
3245
3241
  var n;
3246
3242
  if (!I(t))
3247
3243
  throw new P("Flattened JWS must be an object");
@@ -3263,28 +3259,28 @@ async function vt(t, e, r) {
3263
3259
  } catch {
3264
3260
  throw new P("JWS Protected Header is invalid");
3265
3261
  }
3266
- if (!ye(a, t.header))
3262
+ if (!me(a, t.header))
3267
3263
  throw new P("JWS Protected and JWS Unprotected Header Parameter names must be disjoint");
3268
3264
  const s = {
3269
3265
  ...a,
3270
3266
  ...t.header
3271
- }, i = we(P, /* @__PURE__ */ new Map([["b64", !0]]), r == null ? void 0 : r.crit, a, s);
3267
+ }, i = ye(P, /* @__PURE__ */ new Map([["b64", !0]]), r == null ? void 0 : r.crit, a, s);
3272
3268
  let o = !0;
3273
3269
  if (i.has("b64") && (o = a.b64, typeof o != "boolean"))
3274
3270
  throw new P('The "b64" (base64url-encode payload) Header Parameter must be a boolean');
3275
3271
  const { alg: c } = s;
3276
3272
  if (typeof c != "string" || !c)
3277
3273
  throw new P('JWS "alg" (Algorithm) Header Parameter missing or invalid');
3278
- const u = r && ft("algorithms", r.algorithms);
3274
+ const u = r && dt("algorithms", r.algorithms);
3279
3275
  if (u && !u.has(c))
3280
- throw new Oe('"alg" (Algorithm) Header Parameter not allowed');
3276
+ throw new Re('"alg" (Algorithm) Header Parameter not allowed');
3281
3277
  if (o) {
3282
3278
  if (typeof t.payload != "string")
3283
3279
  throw new P("JWS Payload must be a string");
3284
3280
  } else if (typeof t.payload != "string" && !(t.payload instanceof Uint8Array))
3285
3281
  throw new P("JWS Payload must be a string or an Uint8Array instance");
3286
3282
  let l = !1;
3287
- typeof e == "function" && (e = await e(a, t), l = !0), ke(c, e, "verify");
3283
+ typeof e == "function" && (e = await e(a, t), l = !0), Me(c, e, "verify");
3288
3284
  const f = Q(K.encode((n = t.protected) !== null && n !== void 0 ? n : ""), K.encode("."), typeof t.payload == "string" ? K.encode(t.payload) : t.payload);
3289
3285
  let d;
3290
3286
  try {
@@ -3293,7 +3289,7 @@ async function vt(t, e, r) {
3293
3289
  throw new P("Failed to base64url decode the signature");
3294
3290
  }
3295
3291
  if (!await fa(c, e, d, f))
3296
- throw new wt();
3292
+ throw new yt();
3297
3293
  let h;
3298
3294
  if (o)
3299
3295
  try {
@@ -3312,7 +3308,7 @@ async function Ur(t, e, r) {
3312
3308
  const { 0: n, 1: a, 2: s, length: i } = t.split(".");
3313
3309
  if (i !== 3)
3314
3310
  throw new P("Invalid Compact JWS");
3315
- const o = await vt({ payload: a, protected: n, signature: s }, e, r), c = { payload: o.payload, protectedHeader: o.protectedHeader };
3311
+ const o = await bt({ payload: a, protected: n, signature: s }, e, r), c = { payload: o.payload, protectedHeader: o.protectedHeader };
3316
3312
  return typeof e == "function" ? { ...c, key: o.key } : c;
3317
3313
  }
3318
3314
  async function ha(t, e, r) {
@@ -3322,7 +3318,7 @@ async function ha(t, e, r) {
3322
3318
  throw new P("JWS Signatures missing or incorrect type");
3323
3319
  for (const n of t.signatures)
3324
3320
  try {
3325
- return await vt({
3321
+ return await bt({
3326
3322
  header: n.header,
3327
3323
  payload: t.payload,
3328
3324
  protected: n.protected,
@@ -3330,9 +3326,9 @@ async function ha(t, e, r) {
3330
3326
  }, e, r);
3331
3327
  } catch {
3332
3328
  }
3333
- throw new wt();
3329
+ throw new yt();
3334
3330
  }
3335
- const xe = (t) => Math.floor(t.getTime() / 1e3), Lr = 60, Dr = Lr * 60, Et = Dr * 24, pa = Et * 7, ga = Et * 365.25, ma = /^(\d+|\d+\.\d+) ?(seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)$/i, Ue = (t) => {
3331
+ const Ae = (t) => Math.floor(t.getTime() / 1e3), Lr = 60, Dr = Lr * 60, vt = Dr * 24, pa = vt * 7, ga = vt * 365.25, ma = /^(\d+|\d+\.\d+) ?(seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)$/i, We = (t) => {
3336
3332
  const e = ma.exec(t);
3337
3333
  if (!e)
3338
3334
  throw new TypeError("Invalid time period format");
@@ -3359,7 +3355,7 @@ const xe = (t) => Math.floor(t.getTime() / 1e3), Lr = 60, Dr = Lr * 60, Et = Dr
3359
3355
  case "day":
3360
3356
  case "days":
3361
3357
  case "d":
3362
- return Math.round(r * Et);
3358
+ return Math.round(r * vt);
3363
3359
  case "week":
3364
3360
  case "weeks":
3365
3361
  case "w":
@@ -3367,7 +3363,7 @@ const xe = (t) => Math.floor(t.getTime() / 1e3), Lr = 60, Dr = Lr * 60, Et = Dr
3367
3363
  default:
3368
3364
  return Math.round(r * ga);
3369
3365
  }
3370
- }, kt = (t) => t.toLowerCase().replace(/^application\//, ""), ya = (t, e) => typeof t == "string" ? e.includes(t) : Array.isArray(t) ? e.some(Set.prototype.has.bind(new Set(t))) : !1, At = (t, e, r = {}) => {
3366
+ }, kt = (t) => t.toLowerCase().replace(/^application\//, ""), ya = (t, e) => typeof t == "string" ? e.includes(t) : Array.isArray(t) ? e.some(Set.prototype.has.bind(new Set(t))) : !1, Et = (t, e, r = {}) => {
3371
3367
  const { typ: n } = r;
3372
3368
  if (n && (typeof t.typ != "string" || kt(t.typ) !== kt(n)))
3373
3369
  throw new V('unexpected "typ" JWT header value', "typ", "check_failed");
@@ -3392,7 +3388,7 @@ const xe = (t) => Math.floor(t.getTime() / 1e3), Lr = 60, Dr = Lr * 60, Et = Dr
3392
3388
  let l;
3393
3389
  switch (typeof r.clockTolerance) {
3394
3390
  case "string":
3395
- l = Ue(r.clockTolerance);
3391
+ l = We(r.clockTolerance);
3396
3392
  break;
3397
3393
  case "number":
3398
3394
  l = r.clockTolerance;
@@ -3403,7 +3399,7 @@ const xe = (t) => Math.floor(t.getTime() / 1e3), Lr = 60, Dr = Lr * 60, Et = Dr
3403
3399
  default:
3404
3400
  throw new TypeError("Invalid clockTolerance option type");
3405
3401
  }
3406
- const { currentDate: f } = r, d = xe(f || /* @__PURE__ */ new Date());
3402
+ const { currentDate: f } = r, d = Ae(f || /* @__PURE__ */ new Date());
3407
3403
  if ((a.iat !== void 0 || u) && typeof a.iat != "number")
3408
3404
  throw new V('"iat" claim must be a number', "iat", "invalid");
3409
3405
  if (a.nbf !== void 0) {
@@ -3416,12 +3412,12 @@ const xe = (t) => Math.floor(t.getTime() / 1e3), Lr = 60, Dr = Lr * 60, Et = Dr
3416
3412
  if (typeof a.exp != "number")
3417
3413
  throw new V('"exp" claim must be a number', "exp", "invalid");
3418
3414
  if (a.exp <= d - l)
3419
- throw new ct('"exp" claim timestamp check failed', "exp", "check_failed");
3415
+ throw new ot('"exp" claim timestamp check failed', "exp", "check_failed");
3420
3416
  }
3421
3417
  if (u) {
3422
- const p = d - a.iat, h = typeof u == "number" ? u : Ue(u);
3418
+ const p = d - a.iat, h = typeof u == "number" ? u : We(u);
3423
3419
  if (p - l > h)
3424
- throw new ct('"iat" claim timestamp check failed (too far in the past)', "iat", "check_failed");
3420
+ throw new ot('"iat" claim timestamp check failed (too far in the past)', "iat", "check_failed");
3425
3421
  if (p < 0 - l)
3426
3422
  throw new V('"iat" claim timestamp check failed (it should be in the past)', "iat", "check_failed");
3427
3423
  }
@@ -3432,11 +3428,11 @@ async function wa(t, e, r) {
3432
3428
  const a = await Ur(t, e, r);
3433
3429
  if (!((n = a.protectedHeader.crit) === null || n === void 0) && n.includes("b64") && a.protectedHeader.b64 === !1)
3434
3430
  throw new B("JWTs MUST NOT use unencoded payload");
3435
- const i = { payload: At(a.protectedHeader, a.payload, r), protectedHeader: a.protectedHeader };
3431
+ const i = { payload: Et(a.protectedHeader, a.payload, r), protectedHeader: a.protectedHeader };
3436
3432
  return typeof e == "function" ? { ...i, key: a.key } : i;
3437
3433
  }
3438
3434
  async function Sa(t, e, r) {
3439
- const n = await Kr(t, e, r), a = At(n.protectedHeader, n.plaintext, r), { protectedHeader: s } = n;
3435
+ const n = await Kr(t, e, r), a = Et(n.protectedHeader, n.plaintext, r), { protectedHeader: s } = n;
3440
3436
  if (s.iss !== void 0 && s.iss !== a.iss)
3441
3437
  throw new V('replicated "iss" claim header parameter mismatch', "iss", "mismatch");
3442
3438
  if (s.sub !== void 0 && s.sub !== a.sub)
@@ -3448,7 +3444,7 @@ async function Sa(t, e, r) {
3448
3444
  }
3449
3445
  class Jr {
3450
3446
  constructor(e) {
3451
- this._flattened = new We(e);
3447
+ this._flattened = new Ie(e);
3452
3448
  }
3453
3449
  setContentEncryptionKey(e) {
3454
3450
  return this._flattened.setContentEncryptionKey(e), this;
@@ -3469,11 +3465,11 @@ class Jr {
3469
3465
  }
3470
3466
  const ba = async (t, e, r) => {
3471
3467
  const n = await Wr(t, e, "sign");
3472
- $e(t, n);
3468
+ Ne(t, n);
3473
3469
  const a = await b.subtle.sign(Ir(t, n.algorithm), n, r);
3474
3470
  return new Uint8Array(a);
3475
3471
  };
3476
- class xt {
3472
+ class At {
3477
3473
  constructor(e) {
3478
3474
  if (!(e instanceof Uint8Array))
3479
3475
  throw new TypeError("payload must be an instance of Uint8Array");
@@ -3492,19 +3488,19 @@ class xt {
3492
3488
  async sign(e, r) {
3493
3489
  if (!this._protectedHeader && !this._unprotectedHeader)
3494
3490
  throw new P("either setProtectedHeader or setUnprotectedHeader must be called before #sign()");
3495
- if (!ye(this._protectedHeader, this._unprotectedHeader))
3491
+ if (!me(this._protectedHeader, this._unprotectedHeader))
3496
3492
  throw new P("JWS Protected and JWS Unprotected Header Parameter names must be disjoint");
3497
3493
  const n = {
3498
3494
  ...this._protectedHeader,
3499
3495
  ...this._unprotectedHeader
3500
- }, a = we(P, /* @__PURE__ */ new Map([["b64", !0]]), r == null ? void 0 : r.crit, this._protectedHeader, n);
3496
+ }, a = ye(P, /* @__PURE__ */ new Map([["b64", !0]]), r == null ? void 0 : r.crit, this._protectedHeader, n);
3501
3497
  let s = !0;
3502
3498
  if (a.has("b64") && (s = this._protectedHeader.b64, typeof s != "boolean"))
3503
3499
  throw new P('The "b64" (base64url-encode payload) Header Parameter must be a boolean');
3504
3500
  const { alg: i } = n;
3505
3501
  if (typeof i != "string" || !i)
3506
3502
  throw new P('JWS "alg" (Algorithm) Header Parameter missing or invalid');
3507
- ke(i, e, "sign");
3503
+ Me(i, e, "sign");
3508
3504
  let o = this._payload;
3509
3505
  s && (o = K.encode(O(o)));
3510
3506
  let c;
@@ -3518,7 +3514,7 @@ class xt {
3518
3514
  }
3519
3515
  class Nr {
3520
3516
  constructor(e) {
3521
- this._flattened = new xt(e);
3517
+ this._flattened = new At(e);
3522
3518
  }
3523
3519
  setProtectedHeader(e) {
3524
3520
  return this._flattened.setProtectedHeader(e), this;
@@ -3570,7 +3566,7 @@ class Ea {
3570
3566
  payload: ""
3571
3567
  };
3572
3568
  for (let r = 0; r < this._signatures.length; r++) {
3573
- const n = this._signatures[r], a = new xt(this._payload);
3569
+ const n = this._signatures[r], a = new At(this._payload);
3574
3570
  a.setProtectedHeader(n.protectedHeader), a.setUnprotectedHeader(n.unprotectedHeader);
3575
3571
  const { payload: s, ...i } = await a.sign(n.key, n.options);
3576
3572
  if (r === 0)
@@ -3582,7 +3578,7 @@ class Ea {
3582
3578
  return e;
3583
3579
  }
3584
3580
  }
3585
- class Ct {
3581
+ class xt {
3586
3582
  constructor(e) {
3587
3583
  if (!I(e))
3588
3584
  throw new TypeError("JWT Claims Set MUST be an object");
@@ -3601,16 +3597,16 @@ class Ct {
3601
3597
  return this._payload = { ...this._payload, jti: e }, this;
3602
3598
  }
3603
3599
  setNotBefore(e) {
3604
- return typeof e == "number" ? this._payload = { ...this._payload, nbf: e } : this._payload = { ...this._payload, nbf: xe(/* @__PURE__ */ new Date()) + Ue(e) }, this;
3600
+ return typeof e == "number" ? this._payload = { ...this._payload, nbf: e } : this._payload = { ...this._payload, nbf: Ae(/* @__PURE__ */ new Date()) + We(e) }, this;
3605
3601
  }
3606
3602
  setExpirationTime(e) {
3607
- return typeof e == "number" ? this._payload = { ...this._payload, exp: e } : this._payload = { ...this._payload, exp: xe(/* @__PURE__ */ new Date()) + Ue(e) }, this;
3603
+ return typeof e == "number" ? this._payload = { ...this._payload, exp: e } : this._payload = { ...this._payload, exp: Ae(/* @__PURE__ */ new Date()) + We(e) }, this;
3608
3604
  }
3609
3605
  setIssuedAt(e) {
3610
- return typeof e > "u" ? this._payload = { ...this._payload, iat: xe(/* @__PURE__ */ new Date()) } : this._payload = { ...this._payload, iat: e }, this;
3606
+ return typeof e > "u" ? this._payload = { ...this._payload, iat: Ae(/* @__PURE__ */ new Date()) } : this._payload = { ...this._payload, iat: e }, this;
3611
3607
  }
3612
3608
  }
3613
- class Aa extends Ct {
3609
+ class Aa extends xt {
3614
3610
  setProtectedHeader(e) {
3615
3611
  return this._protectedHeader = e, this;
3616
3612
  }
@@ -3622,7 +3618,7 @@ class Aa extends Ct {
3622
3618
  return a.sign(e, r);
3623
3619
  }
3624
3620
  }
3625
- class xa extends Ct {
3621
+ class xa extends xt {
3626
3622
  setProtectedHeader(e) {
3627
3623
  if (this._protectedHeader)
3628
3624
  throw new TypeError("setProtectedHeader can only be called once");
@@ -3657,7 +3653,7 @@ class xa extends Ct {
3657
3653
  return this._replicateIssuerAsHeader && (this._protectedHeader = { ...this._protectedHeader, iss: this._payload.iss }), this._replicateSubjectAsHeader && (this._protectedHeader = { ...this._protectedHeader, sub: this._payload.sub }), this._replicateAudienceAsHeader && (this._protectedHeader = { ...this._protectedHeader, aud: this._payload.aud }), n.setProtectedHeader(this._protectedHeader), this._iv && n.setInitializationVector(this._iv), this._cek && n.setContentEncryptionKey(this._cek), this._keyManagementParameters && n.setKeyManagementParameters(this._keyManagementParameters), n.encrypt(e, r);
3658
3654
  }
3659
3655
  }
3660
- const te = (t, e) => {
3656
+ const ee = (t, e) => {
3661
3657
  if (typeof t != "string" || !t)
3662
3658
  throw new cr(`${e} missing or invalid`);
3663
3659
  };
@@ -3669,16 +3665,16 @@ async function $r(t, e) {
3669
3665
  let r;
3670
3666
  switch (t.kty) {
3671
3667
  case "EC":
3672
- te(t.crv, '"crv" (Curve) Parameter'), te(t.x, '"x" (X Coordinate) Parameter'), te(t.y, '"y" (Y Coordinate) Parameter'), r = { crv: t.crv, kty: t.kty, x: t.x, y: t.y };
3668
+ ee(t.crv, '"crv" (Curve) Parameter'), ee(t.x, '"x" (X Coordinate) Parameter'), ee(t.y, '"y" (Y Coordinate) Parameter'), r = { crv: t.crv, kty: t.kty, x: t.x, y: t.y };
3673
3669
  break;
3674
3670
  case "OKP":
3675
- te(t.crv, '"crv" (Subtype of Key Pair) Parameter'), te(t.x, '"x" (Public Key) Parameter'), r = { crv: t.crv, kty: t.kty, x: t.x };
3671
+ ee(t.crv, '"crv" (Subtype of Key Pair) Parameter'), ee(t.x, '"x" (Public Key) Parameter'), r = { crv: t.crv, kty: t.kty, x: t.x };
3676
3672
  break;
3677
3673
  case "RSA":
3678
- te(t.e, '"e" (Exponent) Parameter'), te(t.n, '"n" (Modulus) Parameter'), r = { e: t.e, kty: t.kty, n: t.n };
3674
+ ee(t.e, '"e" (Exponent) Parameter'), ee(t.n, '"n" (Modulus) Parameter'), r = { e: t.e, kty: t.kty, n: t.n };
3679
3675
  break;
3680
3676
  case "oct":
3681
- te(t.k, '"k" (Key Value) Parameter'), r = { k: t.k, kty: t.kty };
3677
+ ee(t.k, '"k" (Key Value) Parameter'), r = { k: t.k, kty: t.kty };
3682
3678
  break;
3683
3679
  default:
3684
3680
  throw new x('"kty" (Key Type) Parameter missing or unsupported');
@@ -3698,7 +3694,7 @@ async function _a(t, e) {
3698
3694
  };
3699
3695
  if (!I(r.jwk))
3700
3696
  throw new P('"jwk" (JSON Web Key) Header Parameter must be a JSON object');
3701
- const n = await Me({ ...r.jwk, ext: !0 }, r.alg, !0);
3697
+ const n = await $e({ ...r.jwk, ext: !0 }, r.alg, !0);
3702
3698
  if (n instanceof Uint8Array || n.type !== "public")
3703
3699
  throw new P('"jwk" (JSON Web Key) Header Parameter must be a public key');
3704
3700
  return n;
@@ -3728,7 +3724,7 @@ function Ka(t) {
3728
3724
  class kr {
3729
3725
  constructor(e) {
3730
3726
  if (this._cached = /* @__PURE__ */ new WeakMap(), !Mr(e))
3731
- throw new De("JSON Web Key Set malformed");
3727
+ throw new Le("JSON Web Key Set malformed");
3732
3728
  this._jwks = Ka(e);
3733
3729
  }
3734
3730
  async getKey(e, r) {
@@ -3752,7 +3748,7 @@ class kr {
3752
3748
  return l;
3753
3749
  }), { 0: o, length: c } = i;
3754
3750
  if (c === 0)
3755
- throw new yt();
3751
+ throw new mt();
3756
3752
  if (c !== 1) {
3757
3753
  const u = new ur(), { _cached: l } = this;
3758
3754
  throw u[Symbol.asyncIterator] = async function* () {
@@ -3770,9 +3766,9 @@ class kr {
3770
3766
  async function Ft(t, e, r) {
3771
3767
  const n = t.get(e) || t.set(e, {}).get(e);
3772
3768
  if (n[r] === void 0) {
3773
- const a = await Me({ ...e, ext: !0 }, r);
3769
+ const a = await $e({ ...e, ext: !0 }, r);
3774
3770
  if (a instanceof Uint8Array || a.type !== "public")
3775
- throw new De("JSON Web Key Set members must be public keys");
3771
+ throw new Le("JSON Web Key Set members must be public keys");
3776
3772
  n[r] = a;
3777
3773
  }
3778
3774
  return n[r];
@@ -3823,7 +3819,7 @@ class Ia extends kr {
3823
3819
  try {
3824
3820
  return await super.getKey(e, r);
3825
3821
  } catch (n) {
3826
- if (n instanceof yt && this.coolingDown() === !1)
3822
+ if (n instanceof mt && this.coolingDown() === !1)
3827
3823
  return await this.reload(), super.getKey(e, r);
3828
3824
  throw n;
3829
3825
  }
@@ -3831,7 +3827,7 @@ class Ia extends kr {
3831
3827
  async reload() {
3832
3828
  this._pendingFetch && Ta() && (this._pendingFetch = void 0), this._pendingFetch || (this._pendingFetch = Oa(this._url, this._timeoutDuration, this._options).then((e) => {
3833
3829
  if (!Mr(e))
3834
- throw new De("JSON Web Key Set malformed");
3830
+ throw new Le("JSON Web Key Set malformed");
3835
3831
  this._jwks = { keys: e.keys }, this._jwksTimestamp = Date.now(), this._pendingFetch = void 0;
3836
3832
  }).catch((e) => {
3837
3833
  throw this._pendingFetch = void 0, e;
@@ -3844,7 +3840,7 @@ function Wa(t, e) {
3844
3840
  return r.getKey(n, a);
3845
3841
  };
3846
3842
  }
3847
- class Ua extends Ct {
3843
+ class Ua extends xt {
3848
3844
  encode() {
3849
3845
  const e = O(JSON.stringify({ alg: "none" })), r = O(JSON.stringify(this._payload));
3850
3846
  return `${e}.${r}.`;
@@ -3862,12 +3858,12 @@ class Ua extends Ct {
3862
3858
  } catch {
3863
3859
  throw new B("Invalid Unsecured JWT");
3864
3860
  }
3865
- return { payload: At(o, T(a), r), header: o };
3861
+ return { payload: Et(o, T(a), r), header: o };
3866
3862
  }
3867
3863
  }
3868
- const La = O, _t = T, Da = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3864
+ const La = O, Ct = T, Da = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3869
3865
  __proto__: null,
3870
- decode: _t,
3866
+ decode: Ct,
3871
3867
  encode: La
3872
3868
  }, Symbol.toStringTag, { value: "Module" }));
3873
3869
  function Ja(t) {
@@ -3883,7 +3879,7 @@ function Ja(t) {
3883
3879
  try {
3884
3880
  if (typeof e != "string" || !e)
3885
3881
  throw new Error();
3886
- const r = JSON.parse(X.decode(_t(e)));
3882
+ const r = JSON.parse(X.decode(Ct(e)));
3887
3883
  if (!I(r))
3888
3884
  throw new Error();
3889
3885
  return r;
@@ -3903,7 +3899,7 @@ function Na(t) {
3903
3899
  throw new B("JWTs must contain a payload");
3904
3900
  let n;
3905
3901
  try {
3906
- n = _t(e);
3902
+ n = Ct(e);
3907
3903
  } catch {
3908
3904
  throw new B("Failed to base64url decode the payload");
3909
3905
  }
@@ -3929,7 +3925,7 @@ async function $a(t, e) {
3929
3925
  case "A128CBC-HS256":
3930
3926
  case "A192CBC-HS384":
3931
3927
  case "A256CBC-HS512":
3932
- return n = parseInt(t.slice(-3), 10), Je(new Uint8Array(n >> 3));
3928
+ return n = parseInt(t.slice(-3), 10), De(new Uint8Array(n >> 3));
3933
3929
  case "A128KW":
3934
3930
  case "A192KW":
3935
3931
  case "A256KW":
@@ -3948,7 +3944,7 @@ async function $a(t, e) {
3948
3944
  }
3949
3945
  return b.subtle.generateKey(a, (r = e == null ? void 0 : e.extractable) !== null && r !== void 0 ? r : !1, s);
3950
3946
  }
3951
- function Xe(t) {
3947
+ function qe(t) {
3952
3948
  var e;
3953
3949
  const r = (e = t == null ? void 0 : t.modulusLength) !== null && e !== void 0 ? e : 2048;
3954
3950
  if (typeof r != "number" || r < 2048)
@@ -3966,7 +3962,7 @@ async function Ma(t, e) {
3966
3962
  name: "RSA-PSS",
3967
3963
  hash: `SHA-${t.slice(-3)}`,
3968
3964
  publicExponent: new Uint8Array([1, 0, 1]),
3969
- modulusLength: Xe(e)
3965
+ modulusLength: qe(e)
3970
3966
  }, i = ["sign", "verify"];
3971
3967
  break;
3972
3968
  case "RS256":
@@ -3976,7 +3972,7 @@ async function Ma(t, e) {
3976
3972
  name: "RSASSA-PKCS1-v1_5",
3977
3973
  hash: `SHA-${t.slice(-3)}`,
3978
3974
  publicExponent: new Uint8Array([1, 0, 1]),
3979
- modulusLength: Xe(e)
3975
+ modulusLength: qe(e)
3980
3976
  }, i = ["sign", "verify"];
3981
3977
  break;
3982
3978
  case "RSA-OAEP":
@@ -3987,7 +3983,7 @@ async function Ma(t, e) {
3987
3983
  name: "RSA-OAEP",
3988
3984
  hash: `SHA-${parseInt(t.slice(-3), 10) || 1}`,
3989
3985
  publicExponent: new Uint8Array([1, 0, 1]),
3990
- modulusLength: Xe(e)
3986
+ modulusLength: qe(e)
3991
3987
  }, i = ["decrypt", "unwrapKey", "encrypt", "wrapKey"];
3992
3988
  break;
3993
3989
  case "ES256":
@@ -4050,8 +4046,8 @@ const Va = "WebCryptoAPI", Ba = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Ob
4050
4046
  CompactSign: Nr,
4051
4047
  EmbeddedJWK: _a,
4052
4048
  EncryptJWT: xa,
4053
- FlattenedEncrypt: We,
4054
- FlattenedSign: xt,
4049
+ FlattenedEncrypt: Ie,
4050
+ FlattenedSign: At,
4055
4051
  GeneralEncrypt: da,
4056
4052
  GeneralSign: Ea,
4057
4053
  SignJWT: Aa,
@@ -4070,19 +4066,19 @@ const Va = "WebCryptoAPI", Ba = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Ob
4070
4066
  exportJWK: Rr,
4071
4067
  exportPKCS8: ua,
4072
4068
  exportSPKI: ca,
4073
- flattenedDecrypt: bt,
4074
- flattenedVerify: vt,
4069
+ flattenedDecrypt: St,
4070
+ flattenedVerify: bt,
4075
4071
  generalDecrypt: sa,
4076
4072
  generalVerify: ha,
4077
4073
  generateKeyPair: ka,
4078
4074
  generateSecret: Fa,
4079
- importJWK: Me,
4075
+ importJWK: $e,
4080
4076
  importPKCS8: Zn,
4081
4077
  importSPKI: Xn,
4082
4078
  importX509: Yn,
4083
4079
  jwtDecrypt: Sa,
4084
4080
  jwtVerify: wa
4085
- }, Symbol.toStringTag, { value: "Module" })), Ga = /* @__PURE__ */ ht(Ba), za = () => {
4081
+ }, Symbol.toStringTag, { value: "Module" })), Ga = /* @__PURE__ */ ft(Ba), za = () => {
4086
4082
  if (typeof globalThis < "u")
4087
4083
  return globalThis;
4088
4084
  if (typeof self < "u")
@@ -4110,7 +4106,7 @@ function Xa(t) {
4110
4106
  throw new TypeError('unsupported "digest" value');
4111
4107
  }
4112
4108
  }
4113
- function Pt(t, e) {
4109
+ function _t(t, e) {
4114
4110
  if (typeof t == "string")
4115
4111
  return new TextEncoder().encode(t);
4116
4112
  if (!(t instanceof Uint8Array))
@@ -4118,13 +4114,13 @@ function Pt(t, e) {
4118
4114
  return t;
4119
4115
  }
4120
4116
  function Ya(t) {
4121
- const e = Pt(t, "ikm");
4117
+ const e = _t(t, "ikm");
4122
4118
  if (!e.byteLength)
4123
4119
  throw new TypeError('"ikm" must be at least one byte in length');
4124
4120
  return e;
4125
4121
  }
4126
4122
  function Za(t) {
4127
- const e = Pt(t, "info");
4123
+ const e = _t(t, "info");
4128
4124
  if (e.byteLength > 1024)
4129
4125
  throw TypeError('"info" must not contain more than 1024 bytes');
4130
4126
  return e;
@@ -4138,55 +4134,55 @@ function Qa(t, e) {
4138
4134
  return t;
4139
4135
  }
4140
4136
  async function Vt(t, e, r, n, a) {
4141
- return qa(Xa(t), Ya(e), Pt(r, "salt"), Za(n), Qa(a, t));
4137
+ return qa(Xa(t), Ya(e), _t(r, "salt"), Za(n), Qa(a, t));
4142
4138
  }
4143
4139
  const ja = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4144
4140
  __proto__: null,
4145
4141
  default: Vt,
4146
4142
  hkdf: Vt
4147
- }, Symbol.toStringTag, { value: "Module" })), es = /* @__PURE__ */ ht(ja);
4148
- var Ee, ts = new Uint8Array(16);
4143
+ }, Symbol.toStringTag, { value: "Module" })), es = /* @__PURE__ */ ft(ja);
4144
+ var ve, ts = new Uint8Array(16);
4149
4145
  function Fr() {
4150
- if (!Ee && (Ee = typeof crypto < "u" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto) || typeof msCrypto < "u" && typeof msCrypto.getRandomValues == "function" && msCrypto.getRandomValues.bind(msCrypto), !Ee))
4146
+ if (!ve && (ve = typeof crypto < "u" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto) || typeof msCrypto < "u" && typeof msCrypto.getRandomValues == "function" && msCrypto.getRandomValues.bind(msCrypto), !ve))
4151
4147
  throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
4152
- return Ee(ts);
4148
+ return ve(ts);
4153
4149
  }
4154
4150
  const rs = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;
4155
- function Fe(t) {
4151
+ function ke(t) {
4156
4152
  return typeof t == "string" && rs.test(t);
4157
4153
  }
4158
4154
  var W = [];
4159
- for (var Ye = 0; Ye < 256; ++Ye)
4160
- W.push((Ye + 256).toString(16).substr(1));
4161
- function Ve(t) {
4155
+ for (var Xe = 0; Xe < 256; ++Xe)
4156
+ W.push((Xe + 256).toString(16).substr(1));
4157
+ function Fe(t) {
4162
4158
  var e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0, r = (W[t[e + 0]] + W[t[e + 1]] + W[t[e + 2]] + W[t[e + 3]] + "-" + W[t[e + 4]] + W[t[e + 5]] + "-" + W[t[e + 6]] + W[t[e + 7]] + "-" + W[t[e + 8]] + W[t[e + 9]] + "-" + W[t[e + 10]] + W[t[e + 11]] + W[t[e + 12]] + W[t[e + 13]] + W[t[e + 14]] + W[t[e + 15]]).toLowerCase();
4163
- if (!Fe(r))
4159
+ if (!ke(r))
4164
4160
  throw TypeError("Stringified UUID is invalid");
4165
4161
  return r;
4166
4162
  }
4167
- var Bt, Ze, Qe = 0, je = 0;
4163
+ var Bt, Ye, Ze = 0, Qe = 0;
4168
4164
  function ns(t, e, r) {
4169
4165
  var n = e && r || 0, a = e || new Array(16);
4170
4166
  t = t || {};
4171
- var s = t.node || Bt, i = t.clockseq !== void 0 ? t.clockseq : Ze;
4167
+ var s = t.node || Bt, i = t.clockseq !== void 0 ? t.clockseq : Ye;
4172
4168
  if (s == null || i == null) {
4173
4169
  var o = t.random || (t.rng || Fr)();
4174
- s == null && (s = Bt = [o[0] | 1, o[1], o[2], o[3], o[4], o[5]]), i == null && (i = Ze = (o[6] << 8 | o[7]) & 16383);
4170
+ s == null && (s = Bt = [o[0] | 1, o[1], o[2], o[3], o[4], o[5]]), i == null && (i = Ye = (o[6] << 8 | o[7]) & 16383);
4175
4171
  }
4176
- var c = t.msecs !== void 0 ? t.msecs : Date.now(), u = t.nsecs !== void 0 ? t.nsecs : je + 1, l = c - Qe + (u - je) / 1e4;
4177
- if (l < 0 && t.clockseq === void 0 && (i = i + 1 & 16383), (l < 0 || c > Qe) && t.nsecs === void 0 && (u = 0), u >= 1e4)
4172
+ var c = t.msecs !== void 0 ? t.msecs : Date.now(), u = t.nsecs !== void 0 ? t.nsecs : Qe + 1, l = c - Ze + (u - Qe) / 1e4;
4173
+ if (l < 0 && t.clockseq === void 0 && (i = i + 1 & 16383), (l < 0 || c > Ze) && t.nsecs === void 0 && (u = 0), u >= 1e4)
4178
4174
  throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");
4179
- Qe = c, je = u, Ze = i, c += 122192928e5;
4175
+ Ze = c, Qe = u, Ye = i, c += 122192928e5;
4180
4176
  var f = ((c & 268435455) * 1e4 + u) % 4294967296;
4181
4177
  a[n++] = f >>> 24 & 255, a[n++] = f >>> 16 & 255, a[n++] = f >>> 8 & 255, a[n++] = f & 255;
4182
4178
  var d = c / 4294967296 * 1e4 & 268435455;
4183
4179
  a[n++] = d >>> 8 & 255, a[n++] = d & 255, a[n++] = d >>> 24 & 15 | 16, a[n++] = d >>> 16 & 255, a[n++] = i >>> 8 | 128, a[n++] = i & 255;
4184
4180
  for (var p = 0; p < 6; ++p)
4185
4181
  a[n + p] = s[p];
4186
- return e || Ve(a);
4182
+ return e || Fe(a);
4187
4183
  }
4188
4184
  function Vr(t) {
4189
- if (!Fe(t))
4185
+ if (!ke(t))
4190
4186
  throw TypeError("Invalid UUID");
4191
4187
  var e, r = new Uint8Array(16);
4192
4188
  return r[0] = (e = parseInt(t.slice(0, 8), 16)) >>> 24, r[1] = e >>> 16 & 255, r[2] = e >>> 8 & 255, r[3] = e & 255, r[4] = (e = parseInt(t.slice(9, 13), 16)) >>> 8, r[5] = e & 255, r[6] = (e = parseInt(t.slice(14, 18), 16)) >>> 8, r[7] = e & 255, r[8] = (e = parseInt(t.slice(19, 23), 16)) >>> 8, r[9] = e & 255, r[10] = (e = parseInt(t.slice(24, 36), 16)) / 1099511627776 & 255, r[11] = e / 4294967296 & 255, r[12] = e >>> 24 & 255, r[13] = e >>> 16 & 255, r[14] = e >>> 8 & 255, r[15] = e & 255, r;
@@ -4209,7 +4205,7 @@ function Br(t, e, r) {
4209
4205
  i[o + u] = c[u];
4210
4206
  return i;
4211
4207
  }
4212
- return Ve(c);
4208
+ return Fe(c);
4213
4209
  }
4214
4210
  try {
4215
4211
  n.name = t;
@@ -4240,7 +4236,7 @@ function us(t, e) {
4240
4236
  t[e >> 5] |= 128 << e % 32, t[Gr(e) - 1] = e;
4241
4237
  for (var r = 1732584193, n = -271733879, a = -1732584194, s = 271733878, i = 0; i < t.length; i += 16) {
4242
4238
  var o = r, c = n, u = a, l = s;
4243
- r = D(r, n, a, s, t[i], 7, -680876936), s = D(s, r, n, a, t[i + 1], 12, -389564586), a = D(a, s, r, n, t[i + 2], 17, 606105819), n = D(n, a, s, r, t[i + 3], 22, -1044525330), r = D(r, n, a, s, t[i + 4], 7, -176418897), s = D(s, r, n, a, t[i + 5], 12, 1200080426), a = D(a, s, r, n, t[i + 6], 17, -1473231341), n = D(n, a, s, r, t[i + 7], 22, -45705983), r = D(r, n, a, s, t[i + 8], 7, 1770035416), s = D(s, r, n, a, t[i + 9], 12, -1958414417), a = D(a, s, r, n, t[i + 10], 17, -42063), n = D(n, a, s, r, t[i + 11], 22, -1990404162), r = D(r, n, a, s, t[i + 12], 7, 1804603682), s = D(s, r, n, a, t[i + 13], 12, -40341101), a = D(a, s, r, n, t[i + 14], 17, -1502002290), n = D(n, a, s, r, t[i + 15], 22, 1236535329), r = J(r, n, a, s, t[i + 1], 5, -165796510), s = J(s, r, n, a, t[i + 6], 9, -1069501632), a = J(a, s, r, n, t[i + 11], 14, 643717713), n = J(n, a, s, r, t[i], 20, -373897302), r = J(r, n, a, s, t[i + 5], 5, -701558691), s = J(s, r, n, a, t[i + 10], 9, 38016083), a = J(a, s, r, n, t[i + 15], 14, -660478335), n = J(n, a, s, r, t[i + 4], 20, -405537848), r = J(r, n, a, s, t[i + 9], 5, 568446438), s = J(s, r, n, a, t[i + 14], 9, -1019803690), a = J(a, s, r, n, t[i + 3], 14, -187363961), n = J(n, a, s, r, t[i + 8], 20, 1163531501), r = J(r, n, a, s, t[i + 13], 5, -1444681467), s = J(s, r, n, a, t[i + 2], 9, -51403784), a = J(a, s, r, n, t[i + 7], 14, 1735328473), n = J(n, a, s, r, t[i + 12], 20, -1926607734), r = N(r, n, a, s, t[i + 5], 4, -378558), s = N(s, r, n, a, t[i + 8], 11, -2022574463), a = N(a, s, r, n, t[i + 11], 16, 1839030562), n = N(n, a, s, r, t[i + 14], 23, -35309556), r = N(r, n, a, s, t[i + 1], 4, -1530992060), s = N(s, r, n, a, t[i + 4], 11, 1272893353), a = N(a, s, r, n, t[i + 7], 16, -155497632), n = N(n, a, s, r, t[i + 10], 23, -1094730640), r = N(r, n, a, s, t[i + 13], 4, 681279174), s = N(s, r, n, a, t[i], 11, -358537222), a = N(a, s, r, n, t[i + 3], 16, -722521979), n = N(n, a, s, r, t[i + 6], 23, 76029189), r = N(r, n, a, s, t[i + 9], 4, -640364487), s = N(s, r, n, a, t[i + 12], 11, -421815835), a = N(a, s, r, n, t[i + 15], 16, 530742520), n = N(n, a, s, r, t[i + 2], 23, -995338651), r = $(r, n, a, s, t[i], 6, -198630844), s = $(s, r, n, a, t[i + 7], 10, 1126891415), a = $(a, s, r, n, t[i + 14], 15, -1416354905), n = $(n, a, s, r, t[i + 5], 21, -57434055), r = $(r, n, a, s, t[i + 12], 6, 1700485571), s = $(s, r, n, a, t[i + 3], 10, -1894986606), a = $(a, s, r, n, t[i + 10], 15, -1051523), n = $(n, a, s, r, t[i + 1], 21, -2054922799), r = $(r, n, a, s, t[i + 8], 6, 1873313359), s = $(s, r, n, a, t[i + 15], 10, -30611744), a = $(a, s, r, n, t[i + 6], 15, -1560198380), n = $(n, a, s, r, t[i + 13], 21, 1309151649), r = $(r, n, a, s, t[i + 4], 6, -145523070), s = $(s, r, n, a, t[i + 11], 10, -1120210379), a = $(a, s, r, n, t[i + 2], 15, 718787259), n = $(n, a, s, r, t[i + 9], 21, -343485551), r = ae(r, o), n = ae(n, c), a = ae(a, u), s = ae(s, l);
4239
+ r = D(r, n, a, s, t[i], 7, -680876936), s = D(s, r, n, a, t[i + 1], 12, -389564586), a = D(a, s, r, n, t[i + 2], 17, 606105819), n = D(n, a, s, r, t[i + 3], 22, -1044525330), r = D(r, n, a, s, t[i + 4], 7, -176418897), s = D(s, r, n, a, t[i + 5], 12, 1200080426), a = D(a, s, r, n, t[i + 6], 17, -1473231341), n = D(n, a, s, r, t[i + 7], 22, -45705983), r = D(r, n, a, s, t[i + 8], 7, 1770035416), s = D(s, r, n, a, t[i + 9], 12, -1958414417), a = D(a, s, r, n, t[i + 10], 17, -42063), n = D(n, a, s, r, t[i + 11], 22, -1990404162), r = D(r, n, a, s, t[i + 12], 7, 1804603682), s = D(s, r, n, a, t[i + 13], 12, -40341101), a = D(a, s, r, n, t[i + 14], 17, -1502002290), n = D(n, a, s, r, t[i + 15], 22, 1236535329), r = J(r, n, a, s, t[i + 1], 5, -165796510), s = J(s, r, n, a, t[i + 6], 9, -1069501632), a = J(a, s, r, n, t[i + 11], 14, 643717713), n = J(n, a, s, r, t[i], 20, -373897302), r = J(r, n, a, s, t[i + 5], 5, -701558691), s = J(s, r, n, a, t[i + 10], 9, 38016083), a = J(a, s, r, n, t[i + 15], 14, -660478335), n = J(n, a, s, r, t[i + 4], 20, -405537848), r = J(r, n, a, s, t[i + 9], 5, 568446438), s = J(s, r, n, a, t[i + 14], 9, -1019803690), a = J(a, s, r, n, t[i + 3], 14, -187363961), n = J(n, a, s, r, t[i + 8], 20, 1163531501), r = J(r, n, a, s, t[i + 13], 5, -1444681467), s = J(s, r, n, a, t[i + 2], 9, -51403784), a = J(a, s, r, n, t[i + 7], 14, 1735328473), n = J(n, a, s, r, t[i + 12], 20, -1926607734), r = N(r, n, a, s, t[i + 5], 4, -378558), s = N(s, r, n, a, t[i + 8], 11, -2022574463), a = N(a, s, r, n, t[i + 11], 16, 1839030562), n = N(n, a, s, r, t[i + 14], 23, -35309556), r = N(r, n, a, s, t[i + 1], 4, -1530992060), s = N(s, r, n, a, t[i + 4], 11, 1272893353), a = N(a, s, r, n, t[i + 7], 16, -155497632), n = N(n, a, s, r, t[i + 10], 23, -1094730640), r = N(r, n, a, s, t[i + 13], 4, 681279174), s = N(s, r, n, a, t[i], 11, -358537222), a = N(a, s, r, n, t[i + 3], 16, -722521979), n = N(n, a, s, r, t[i + 6], 23, 76029189), r = N(r, n, a, s, t[i + 9], 4, -640364487), s = N(s, r, n, a, t[i + 12], 11, -421815835), a = N(a, s, r, n, t[i + 15], 16, 530742520), n = N(n, a, s, r, t[i + 2], 23, -995338651), r = $(r, n, a, s, t[i], 6, -198630844), s = $(s, r, n, a, t[i + 7], 10, 1126891415), a = $(a, s, r, n, t[i + 14], 15, -1416354905), n = $(n, a, s, r, t[i + 5], 21, -57434055), r = $(r, n, a, s, t[i + 12], 6, 1700485571), s = $(s, r, n, a, t[i + 3], 10, -1894986606), a = $(a, s, r, n, t[i + 10], 15, -1051523), n = $(n, a, s, r, t[i + 1], 21, -2054922799), r = $(r, n, a, s, t[i + 8], 6, 1873313359), s = $(s, r, n, a, t[i + 15], 10, -30611744), a = $(a, s, r, n, t[i + 6], 15, -1560198380), n = $(n, a, s, r, t[i + 13], 21, 1309151649), r = $(r, n, a, s, t[i + 4], 6, -145523070), s = $(s, r, n, a, t[i + 11], 10, -1120210379), a = $(a, s, r, n, t[i + 2], 15, 718787259), n = $(n, a, s, r, t[i + 9], 21, -343485551), r = ne(r, o), n = ne(n, c), a = ne(a, u), s = ne(s, l);
4244
4240
  }
4245
4241
  return [r, n, a, s];
4246
4242
  }
@@ -4251,27 +4247,27 @@ function ls(t) {
4251
4247
  r[n >> 5] |= (t[n / 8] & 255) << n % 32;
4252
4248
  return r;
4253
4249
  }
4254
- function ae(t, e) {
4250
+ function ne(t, e) {
4255
4251
  var r = (t & 65535) + (e & 65535), n = (t >> 16) + (e >> 16) + (r >> 16);
4256
4252
  return n << 16 | r & 65535;
4257
4253
  }
4258
4254
  function ds(t, e) {
4259
4255
  return t << e | t >>> 32 - e;
4260
4256
  }
4261
- function Be(t, e, r, n, a, s) {
4262
- return ae(ds(ae(ae(e, t), ae(n, s)), a), r);
4257
+ function Ve(t, e, r, n, a, s) {
4258
+ return ne(ds(ne(ne(e, t), ne(n, s)), a), r);
4263
4259
  }
4264
4260
  function D(t, e, r, n, a, s, i) {
4265
- return Be(e & r | ~e & n, t, e, a, s, i);
4261
+ return Ve(e & r | ~e & n, t, e, a, s, i);
4266
4262
  }
4267
4263
  function J(t, e, r, n, a, s, i) {
4268
- return Be(e & n | r & ~n, t, e, a, s, i);
4264
+ return Ve(e & n | r & ~n, t, e, a, s, i);
4269
4265
  }
4270
4266
  function N(t, e, r, n, a, s, i) {
4271
- return Be(e ^ r ^ n, t, e, a, s, i);
4267
+ return Ve(e ^ r ^ n, t, e, a, s, i);
4272
4268
  }
4273
4269
  function $(t, e, r, n, a, s, i) {
4274
- return Be(r ^ (e | ~n), t, e, a, s, i);
4270
+ return Ve(r ^ (e | ~n), t, e, a, s, i);
4275
4271
  }
4276
4272
  var fs = Br("v3", 48, os);
4277
4273
  const hs = fs;
@@ -4284,7 +4280,7 @@ function ps(t, e, r) {
4284
4280
  e[r + a] = n[a];
4285
4281
  return e;
4286
4282
  }
4287
- return Ve(n);
4283
+ return Fe(n);
4288
4284
  }
4289
4285
  function gs(t, e, r, n) {
4290
4286
  switch (t) {
@@ -4298,7 +4294,7 @@ function gs(t, e, r, n) {
4298
4294
  return e ^ r ^ n;
4299
4295
  }
4300
4296
  }
4301
- function et(t, e) {
4297
+ function je(t, e) {
4302
4298
  return t << e | t >>> 32 - e;
4303
4299
  }
4304
4300
  function ms(t) {
@@ -4321,10 +4317,10 @@ function ms(t) {
4321
4317
  for (var d = new Uint32Array(80), p = 0; p < 16; ++p)
4322
4318
  d[p] = o[f][p];
4323
4319
  for (var h = 16; h < 80; ++h)
4324
- d[h] = et(d[h - 3] ^ d[h - 8] ^ d[h - 14] ^ d[h - 16], 1);
4320
+ d[h] = je(d[h - 3] ^ d[h - 8] ^ d[h - 14] ^ d[h - 16], 1);
4325
4321
  for (var g = r[0], S = r[1], C = r[2], v = r[3], w = r[4], m = 0; m < 80; ++m) {
4326
- var E = Math.floor(m / 20), _ = et(g, 5) + gs(E, S, C, v) + w + e[E] + d[m] >>> 0;
4327
- w = v, v = C, C = et(S, 30) >>> 0, S = g, g = _;
4322
+ var E = Math.floor(m / 20), _ = je(g, 5) + gs(E, S, C, v) + w + e[E] + d[m] >>> 0;
4323
+ w = v, v = C, C = je(S, 30) >>> 0, S = g, g = _;
4328
4324
  }
4329
4325
  r[0] = r[0] + g >>> 0, r[1] = r[1] + S >>> 0, r[2] = r[2] + C >>> 0, r[3] = r[3] + v >>> 0, r[4] = r[4] + w >>> 0;
4330
4326
  }
@@ -4333,7 +4329,7 @@ function ms(t) {
4333
4329
  var ys = Br("v5", 80, ms);
4334
4330
  const ws = ys, Ss = "00000000-0000-0000-0000-000000000000";
4335
4331
  function bs(t) {
4336
- if (!Fe(t))
4332
+ if (!ke(t))
4337
4333
  throw TypeError("Invalid UUID");
4338
4334
  return parseInt(t.substr(14, 1), 16);
4339
4335
  }
@@ -4341,24 +4337,24 @@ const vs = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4341
4337
  __proto__: null,
4342
4338
  NIL: Ss,
4343
4339
  parse: Vr,
4344
- stringify: Ve,
4340
+ stringify: Fe,
4345
4341
  v1: ns,
4346
4342
  v3: hs,
4347
4343
  v4: ps,
4348
4344
  v5: ws,
4349
- validate: Fe,
4345
+ validate: ke,
4350
4346
  version: bs
4351
- }, Symbol.toStringTag, { value: "Module" })), Es = /* @__PURE__ */ ht(vs);
4352
- var le = {}, tt = { exports: {} }, rt = { exports: {} }, Gt;
4347
+ }, Symbol.toStringTag, { value: "Module" })), Es = /* @__PURE__ */ ft(vs);
4348
+ var ue = {}, et = { exports: {} }, tt = { exports: {} }, Gt;
4353
4349
  function As() {
4354
4350
  return Gt || (Gt = 1, function(t) {
4355
4351
  function e(r, n) {
4356
4352
  return n.get ? n.get.call(r) : n.value;
4357
4353
  }
4358
4354
  t.exports = e, t.exports.__esModule = !0, t.exports.default = t.exports;
4359
- }(rt)), rt.exports;
4355
+ }(tt)), tt.exports;
4360
4356
  }
4361
- var nt = { exports: {} }, zt;
4357
+ var rt = { exports: {} }, zt;
4362
4358
  function zr() {
4363
4359
  return zt || (zt = 1, function(t) {
4364
4360
  function e(r, n, a) {
@@ -4367,7 +4363,7 @@ function zr() {
4367
4363
  return n.get(r);
4368
4364
  }
4369
4365
  t.exports = e, t.exports.__esModule = !0, t.exports.default = t.exports;
4370
- }(nt)), nt.exports;
4366
+ }(rt)), rt.exports;
4371
4367
  }
4372
4368
  var qt;
4373
4369
  function xs() {
@@ -4378,9 +4374,9 @@ function xs() {
4378
4374
  return e(a, i);
4379
4375
  }
4380
4376
  t.exports = n, t.exports.__esModule = !0, t.exports.default = t.exports;
4381
- }(tt)), tt.exports;
4377
+ }(et)), et.exports;
4382
4378
  }
4383
- var at = { exports: {} }, st = { exports: {} }, Xt;
4379
+ var nt = { exports: {} }, at = { exports: {} }, Xt;
4384
4380
  function Cs() {
4385
4381
  return Xt || (Xt = 1, function(t) {
4386
4382
  function e(r, n, a) {
@@ -4393,7 +4389,7 @@ function Cs() {
4393
4389
  }
4394
4390
  }
4395
4391
  t.exports = e, t.exports.__esModule = !0, t.exports.default = t.exports;
4396
- }(st)), st.exports;
4392
+ }(at)), at.exports;
4397
4393
  }
4398
4394
  var Yt;
4399
4395
  function _s() {
@@ -4404,17 +4400,17 @@ function _s() {
4404
4400
  return e(a, o, i), i;
4405
4401
  }
4406
4402
  t.exports = n, t.exports.__esModule = !0, t.exports.default = t.exports;
4407
- }(at)), at.exports;
4403
+ }(nt)), nt.exports;
4408
4404
  }
4409
4405
  var Zt;
4410
4406
  function Ps() {
4411
4407
  if (Zt)
4412
- return le;
4408
+ return ue;
4413
4409
  Zt = 1;
4414
4410
  var t = ar;
4415
- Object.defineProperty(le, "__esModule", {
4411
+ Object.defineProperty(ue, "__esModule", {
4416
4412
  value: !0
4417
- }), le.SessionStore = void 0, le.defaultCookies = l;
4413
+ }), ue.SessionStore = void 0, ue.defaultCookies = l;
4418
4414
  var e = t(xs()), r = t(_s());
4419
4415
  function n(w, m) {
4420
4416
  s(w, m), m.add(w);
@@ -4548,7 +4544,7 @@ function Ps() {
4548
4544
  return Object.values(i(this, g, v).call(this));
4549
4545
  }
4550
4546
  }
4551
- le.SessionStore = S;
4547
+ ue.SessionStore = S;
4552
4548
  function C(w) {
4553
4549
  const m = Math.ceil(w.value.length / u);
4554
4550
  if (m === 1)
@@ -4584,13 +4580,13 @@ function Ps() {
4584
4580
  }
4585
4581
  return w;
4586
4582
  }
4587
- return le;
4583
+ return ue;
4588
4584
  }
4589
- var it = {}, Qt;
4585
+ var st = {}, Qt;
4590
4586
  function Hs() {
4591
- return Qt || (Qt = 1, Object.defineProperty(it, "__esModule", {
4587
+ return Qt || (Qt = 1, Object.defineProperty(st, "__esModule", {
4592
4588
  value: !0
4593
- })), it;
4589
+ })), st;
4594
4590
  }
4595
4591
  (function(t) {
4596
4592
  var e = ar;
@@ -4664,8 +4660,8 @@ function Hs() {
4664
4660
  }, A).value;
4665
4661
  const Y = v.headers instanceof Headers ? v.headers.get("authorization") : (C = v.headers) === null || C === void 0 ? void 0 : C.authorization;
4666
4662
  if (!q && (Y == null ? void 0 : Y.split(" ")[0]) === "Bearer") {
4667
- const Ge = Y.split(" ")[1];
4668
- q = decodeURIComponent(Ge);
4663
+ const Be = Y.split(" ")[1];
4664
+ q = decodeURIComponent(Be);
4669
4665
  }
4670
4666
  if (!q)
4671
4667
  return null;
@@ -4689,12 +4685,12 @@ class Is extends Zr {
4689
4685
  this.logDebug("entra validate Token Front");
4690
4686
  const r = await rr.getToken({ req: e });
4691
4687
  if (this.logDebug("Token Front", JSON.stringify(r)), !r)
4692
- throw new tr("UNAUTHORIZED").get();
4688
+ throw new En("UNAUTHORIZED").get();
4693
4689
  return e;
4694
4690
  }
4695
4691
  }
4696
4692
  export {
4697
4693
  Is as C,
4698
- En as E,
4699
- tr as M
4694
+ vn as E,
4695
+ En as M
4700
4696
  };