@arkitektbedriftene/fe-lib 0.3.4 → 0.3.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/oidc.es.js CHANGED
@@ -1,8 +1,11 @@
1
- import { j as se } from "./jsx-runtime-a0589023.js";
2
- import { createContext as ue, useContext as ge, useMemo as _e, useEffect as L, useState as Ce, useRef as pe, useCallback as ae } from "react";
3
- import { u as Re } from "./useLocalStorageState-b4fb2a60.js";
1
+ import { j as re } from "./jsx-runtime-d0aa4c5b.js";
2
+ import { createContext as _e, useContext as pe, useMemo as fe, useEffect as F, useState as Te, useRef as we, useCallback as ce } from "react";
3
+ import { u as Ie } from "./useLocalStorageState-b4fb2a60.js";
4
4
  var N = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
5
- function Te(e) {
5
+ function Ue(e) {
6
+ return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
7
+ }
8
+ function Ae(e) {
6
9
  if (e.__esModule)
7
10
  return e;
8
11
  var t = e.default;
@@ -29,124 +32,400 @@ function Te(e) {
29
32
  });
30
33
  }), s;
31
34
  }
32
- function Ie(e) {
35
+ function Pe(e) {
33
36
  throw new Error('Could not dynamically require "' + e + '". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.');
34
37
  }
35
- var H = {}, Ue = {
38
+ var L = {}, Oe = {
36
39
  get exports() {
37
- return H;
40
+ return L;
38
41
  },
39
42
  set exports(e) {
40
- H = e;
43
+ L = e;
41
44
  }
42
45
  };
43
- const Ae = {}, Pe = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
46
+ const qe = {}, Ne = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
44
47
  __proto__: null,
45
- default: Ae
46
- }, Symbol.toStringTag, { value: "Module" })), Oe = /* @__PURE__ */ Te(Pe);
47
- (function(e, t) {
48
- (function(s, r) {
49
- e.exports = r();
50
- })(N, function() {
51
- var s = s || function(r, i) {
52
- var n;
53
- if (typeof window < "u" && window.crypto && (n = window.crypto), typeof self < "u" && self.crypto && (n = self.crypto), typeof globalThis < "u" && globalThis.crypto && (n = globalThis.crypto), !n && typeof window < "u" && window.msCrypto && (n = window.msCrypto), !n && typeof N < "u" && N.crypto && (n = N.crypto), !n && typeof Ie == "function")
54
- try {
55
- n = Oe;
56
- } catch {
57
- }
58
- var o = function() {
59
- if (n) {
60
- if (typeof n.getRandomValues == "function")
61
- try {
62
- return n.getRandomValues(new Uint32Array(1))[0];
63
- } catch {
48
+ default: qe
49
+ }, Symbol.toStringTag, { value: "Module" })), je = /* @__PURE__ */ Ae(Ne);
50
+ var le;
51
+ function J() {
52
+ return le || (le = 1, function(e, t) {
53
+ (function(s, r) {
54
+ e.exports = r();
55
+ })(N, function() {
56
+ var s = s || function(r, i) {
57
+ var n;
58
+ if (typeof window < "u" && window.crypto && (n = window.crypto), typeof self < "u" && self.crypto && (n = self.crypto), typeof globalThis < "u" && globalThis.crypto && (n = globalThis.crypto), !n && typeof window < "u" && window.msCrypto && (n = window.msCrypto), !n && typeof N < "u" && N.crypto && (n = N.crypto), !n && typeof Pe == "function")
59
+ try {
60
+ n = je;
61
+ } catch {
62
+ }
63
+ var o = function() {
64
+ if (n) {
65
+ if (typeof n.getRandomValues == "function")
66
+ try {
67
+ return n.getRandomValues(new Uint32Array(1))[0];
68
+ } catch {
69
+ }
70
+ if (typeof n.randomBytes == "function")
71
+ try {
72
+ return n.randomBytes(4).readInt32LE();
73
+ } catch {
74
+ }
75
+ }
76
+ throw new Error("Native crypto module could not be used to get secure random number.");
77
+ }, c = Object.create || function() {
78
+ function a() {
79
+ }
80
+ return function(d) {
81
+ var p;
82
+ return a.prototype = d, p = new a(), a.prototype = null, p;
83
+ };
84
+ }(), l = {}, h = l.lib = {}, g = h.Base = function() {
85
+ return {
86
+ /**
87
+ * Creates a new object that inherits from this object.
88
+ *
89
+ * @param {Object} overrides Properties to copy into the new object.
90
+ *
91
+ * @return {Object} The new object.
92
+ *
93
+ * @static
94
+ *
95
+ * @example
96
+ *
97
+ * var MyType = CryptoJS.lib.Base.extend({
98
+ * field: 'value',
99
+ *
100
+ * method: function () {
101
+ * }
102
+ * });
103
+ */
104
+ extend: function(a) {
105
+ var d = c(this);
106
+ return a && d.mixIn(a), (!d.hasOwnProperty("init") || this.init === d.init) && (d.init = function() {
107
+ d.$super.init.apply(this, arguments);
108
+ }), d.init.prototype = d, d.$super = this, d;
109
+ },
110
+ /**
111
+ * Extends this object and runs the init method.
112
+ * Arguments to create() will be passed to init().
113
+ *
114
+ * @return {Object} The new object.
115
+ *
116
+ * @static
117
+ *
118
+ * @example
119
+ *
120
+ * var instance = MyType.create();
121
+ */
122
+ create: function() {
123
+ var a = this.extend();
124
+ return a.init.apply(a, arguments), a;
125
+ },
126
+ /**
127
+ * Initializes a newly created object.
128
+ * Override this method to add some logic when your objects are created.
129
+ *
130
+ * @example
131
+ *
132
+ * var MyType = CryptoJS.lib.Base.extend({
133
+ * init: function () {
134
+ * // ...
135
+ * }
136
+ * });
137
+ */
138
+ init: function() {
139
+ },
140
+ /**
141
+ * Copies properties into this object.
142
+ *
143
+ * @param {Object} properties The properties to mix in.
144
+ *
145
+ * @example
146
+ *
147
+ * MyType.mixIn({
148
+ * field: 'value'
149
+ * });
150
+ */
151
+ mixIn: function(a) {
152
+ for (var d in a)
153
+ a.hasOwnProperty(d) && (this[d] = a[d]);
154
+ a.hasOwnProperty("toString") && (this.toString = a.toString);
155
+ },
156
+ /**
157
+ * Creates a copy of this object.
158
+ *
159
+ * @return {Object} The clone.
160
+ *
161
+ * @example
162
+ *
163
+ * var clone = instance.clone();
164
+ */
165
+ clone: function() {
166
+ return this.init.prototype.extend(this);
64
167
  }
65
- if (typeof n.randomBytes == "function")
66
- try {
67
- return n.randomBytes(4).readInt32LE();
68
- } catch {
168
+ };
169
+ }(), u = h.WordArray = g.extend({
170
+ /**
171
+ * Initializes a newly created word array.
172
+ *
173
+ * @param {Array} words (Optional) An array of 32-bit words.
174
+ * @param {number} sigBytes (Optional) The number of significant bytes in the words.
175
+ *
176
+ * @example
177
+ *
178
+ * var wordArray = CryptoJS.lib.WordArray.create();
179
+ * var wordArray = CryptoJS.lib.WordArray.create([0x00010203, 0x04050607]);
180
+ * var wordArray = CryptoJS.lib.WordArray.create([0x00010203, 0x04050607], 6);
181
+ */
182
+ init: function(a, d) {
183
+ a = this.words = a || [], d != i ? this.sigBytes = d : this.sigBytes = a.length * 4;
184
+ },
185
+ /**
186
+ * Converts this word array to a string.
187
+ *
188
+ * @param {Encoder} encoder (Optional) The encoding strategy to use. Default: CryptoJS.enc.Hex
189
+ *
190
+ * @return {string} The stringified word array.
191
+ *
192
+ * @example
193
+ *
194
+ * var string = wordArray + '';
195
+ * var string = wordArray.toString();
196
+ * var string = wordArray.toString(CryptoJS.enc.Utf8);
197
+ */
198
+ toString: function(a) {
199
+ return (a || w).stringify(this);
200
+ },
201
+ /**
202
+ * Concatenates a word array to this word array.
203
+ *
204
+ * @param {WordArray} wordArray The word array to append.
205
+ *
206
+ * @return {WordArray} This word array.
207
+ *
208
+ * @example
209
+ *
210
+ * wordArray1.concat(wordArray2);
211
+ */
212
+ concat: function(a) {
213
+ var d = this.words, p = a.words, m = this.sigBytes, b = a.sigBytes;
214
+ if (this.clamp(), m % 4)
215
+ for (var E = 0; E < b; E++) {
216
+ var C = p[E >>> 2] >>> 24 - E % 4 * 8 & 255;
217
+ d[m + E >>> 2] |= C << 24 - (m + E) % 4 * 8;
218
+ }
219
+ else
220
+ for (var x = 0; x < b; x += 4)
221
+ d[m + x >>> 2] = p[x >>> 2];
222
+ return this.sigBytes += b, this;
223
+ },
224
+ /**
225
+ * Removes insignificant bits.
226
+ *
227
+ * @example
228
+ *
229
+ * wordArray.clamp();
230
+ */
231
+ clamp: function() {
232
+ var a = this.words, d = this.sigBytes;
233
+ a[d >>> 2] &= 4294967295 << 32 - d % 4 * 8, a.length = r.ceil(d / 4);
234
+ },
235
+ /**
236
+ * Creates a copy of this word array.
237
+ *
238
+ * @return {WordArray} The clone.
239
+ *
240
+ * @example
241
+ *
242
+ * var clone = wordArray.clone();
243
+ */
244
+ clone: function() {
245
+ var a = g.clone.call(this);
246
+ return a.words = this.words.slice(0), a;
247
+ },
248
+ /**
249
+ * Creates a word array filled with random bytes.
250
+ *
251
+ * @param {number} nBytes The number of random bytes to generate.
252
+ *
253
+ * @return {WordArray} The random word array.
254
+ *
255
+ * @static
256
+ *
257
+ * @example
258
+ *
259
+ * var wordArray = CryptoJS.lib.WordArray.random(16);
260
+ */
261
+ random: function(a) {
262
+ for (var d = [], p = 0; p < a; p += 4)
263
+ d.push(o());
264
+ return new u.init(d, a);
265
+ }
266
+ }), S = l.enc = {}, w = S.Hex = {
267
+ /**
268
+ * Converts a word array to a hex string.
269
+ *
270
+ * @param {WordArray} wordArray The word array.
271
+ *
272
+ * @return {string} The hex string.
273
+ *
274
+ * @static
275
+ *
276
+ * @example
277
+ *
278
+ * var hexString = CryptoJS.enc.Hex.stringify(wordArray);
279
+ */
280
+ stringify: function(a) {
281
+ for (var d = a.words, p = a.sigBytes, m = [], b = 0; b < p; b++) {
282
+ var E = d[b >>> 2] >>> 24 - b % 4 * 8 & 255;
283
+ m.push((E >>> 4).toString(16)), m.push((E & 15).toString(16));
69
284
  }
70
- }
71
- throw new Error("Native crypto module could not be used to get secure random number.");
72
- }, c = Object.create || function() {
73
- function a() {
74
- }
75
- return function(d) {
76
- var p;
77
- return a.prototype = d, p = new a(), a.prototype = null, p;
78
- };
79
- }(), l = {}, h = l.lib = {}, g = h.Base = function() {
80
- return {
285
+ return m.join("");
286
+ },
81
287
  /**
82
- * Creates a new object that inherits from this object.
288
+ * Converts a hex string to a word array.
83
289
  *
84
- * @param {Object} overrides Properties to copy into the new object.
290
+ * @param {string} hexStr The hex string.
85
291
  *
86
- * @return {Object} The new object.
292
+ * @return {WordArray} The word array.
87
293
  *
88
294
  * @static
89
295
  *
90
296
  * @example
91
297
  *
92
- * var MyType = CryptoJS.lib.Base.extend({
93
- * field: 'value',
298
+ * var wordArray = CryptoJS.enc.Hex.parse(hexString);
299
+ */
300
+ parse: function(a) {
301
+ for (var d = a.length, p = [], m = 0; m < d; m += 2)
302
+ p[m >>> 3] |= parseInt(a.substr(m, 2), 16) << 24 - m % 8 * 4;
303
+ return new u.init(p, d / 2);
304
+ }
305
+ }, k = S.Latin1 = {
306
+ /**
307
+ * Converts a word array to a Latin1 string.
308
+ *
309
+ * @param {WordArray} wordArray The word array.
310
+ *
311
+ * @return {string} The Latin1 string.
312
+ *
313
+ * @static
314
+ *
315
+ * @example
316
+ *
317
+ * var latin1String = CryptoJS.enc.Latin1.stringify(wordArray);
318
+ */
319
+ stringify: function(a) {
320
+ for (var d = a.words, p = a.sigBytes, m = [], b = 0; b < p; b++) {
321
+ var E = d[b >>> 2] >>> 24 - b % 4 * 8 & 255;
322
+ m.push(String.fromCharCode(E));
323
+ }
324
+ return m.join("");
325
+ },
326
+ /**
327
+ * Converts a Latin1 string to a word array.
328
+ *
329
+ * @param {string} latin1Str The Latin1 string.
330
+ *
331
+ * @return {WordArray} The word array.
332
+ *
333
+ * @static
334
+ *
335
+ * @example
336
+ *
337
+ * var wordArray = CryptoJS.enc.Latin1.parse(latin1String);
338
+ */
339
+ parse: function(a) {
340
+ for (var d = a.length, p = [], m = 0; m < d; m++)
341
+ p[m >>> 2] |= (a.charCodeAt(m) & 255) << 24 - m % 4 * 8;
342
+ return new u.init(p, d);
343
+ }
344
+ }, _ = S.Utf8 = {
345
+ /**
346
+ * Converts a word array to a UTF-8 string.
347
+ *
348
+ * @param {WordArray} wordArray The word array.
349
+ *
350
+ * @return {string} The UTF-8 string.
351
+ *
352
+ * @static
94
353
  *
95
- * method: function () {
96
- * }
97
- * });
354
+ * @example
355
+ *
356
+ * var utf8String = CryptoJS.enc.Utf8.stringify(wordArray);
98
357
  */
99
- extend: function(a) {
100
- var d = c(this);
101
- return a && d.mixIn(a), (!d.hasOwnProperty("init") || this.init === d.init) && (d.init = function() {
102
- d.$super.init.apply(this, arguments);
103
- }), d.init.prototype = d, d.$super = this, d;
358
+ stringify: function(a) {
359
+ try {
360
+ return decodeURIComponent(escape(k.stringify(a)));
361
+ } catch {
362
+ throw new Error("Malformed UTF-8 data");
363
+ }
104
364
  },
105
365
  /**
106
- * Extends this object and runs the init method.
107
- * Arguments to create() will be passed to init().
366
+ * Converts a UTF-8 string to a word array.
367
+ *
368
+ * @param {string} utf8Str The UTF-8 string.
108
369
  *
109
- * @return {Object} The new object.
370
+ * @return {WordArray} The word array.
110
371
  *
111
372
  * @static
112
373
  *
113
374
  * @example
114
375
  *
115
- * var instance = MyType.create();
376
+ * var wordArray = CryptoJS.enc.Utf8.parse(utf8String);
116
377
  */
117
- create: function() {
118
- var a = this.extend();
119
- return a.init.apply(a, arguments), a;
378
+ parse: function(a) {
379
+ return k.parse(unescape(encodeURIComponent(a)));
380
+ }
381
+ }, v = h.BufferedBlockAlgorithm = g.extend({
382
+ /**
383
+ * Resets this block algorithm's data buffer to its initial state.
384
+ *
385
+ * @example
386
+ *
387
+ * bufferedBlockAlgorithm.reset();
388
+ */
389
+ reset: function() {
390
+ this._data = new u.init(), this._nDataBytes = 0;
120
391
  },
121
392
  /**
122
- * Initializes a newly created object.
123
- * Override this method to add some logic when your objects are created.
393
+ * Adds new data to this block algorithm's buffer.
394
+ *
395
+ * @param {WordArray|string} data The data to append. Strings are converted to a WordArray using UTF-8.
124
396
  *
125
397
  * @example
126
398
  *
127
- * var MyType = CryptoJS.lib.Base.extend({
128
- * init: function () {
129
- * // ...
130
- * }
131
- * });
399
+ * bufferedBlockAlgorithm._append('data');
400
+ * bufferedBlockAlgorithm._append(wordArray);
132
401
  */
133
- init: function() {
402
+ _append: function(a) {
403
+ typeof a == "string" && (a = _.parse(a)), this._data.concat(a), this._nDataBytes += a.sigBytes;
134
404
  },
135
405
  /**
136
- * Copies properties into this object.
406
+ * Processes available data blocks.
407
+ *
408
+ * This method invokes _doProcessBlock(offset), which must be implemented by a concrete subtype.
409
+ *
410
+ * @param {boolean} doFlush Whether all blocks and partial blocks should be processed.
137
411
  *
138
- * @param {Object} properties The properties to mix in.
412
+ * @return {WordArray} The processed data.
139
413
  *
140
414
  * @example
141
415
  *
142
- * MyType.mixIn({
143
- * field: 'value'
144
- * });
416
+ * var processedData = bufferedBlockAlgorithm._process();
417
+ * var processedData = bufferedBlockAlgorithm._process(!!'flush');
145
418
  */
146
- mixIn: function(a) {
147
- for (var d in a)
148
- a.hasOwnProperty(d) && (this[d] = a[d]);
149
- a.hasOwnProperty("toString") && (this.toString = a.toString);
419
+ _process: function(a) {
420
+ var d, p = this._data, m = p.words, b = p.sigBytes, E = this.blockSize, C = E * 4, x = b / C;
421
+ a ? x = r.ceil(x) : x = r.max((x | 0) - this._minBufferSize, 0);
422
+ var P = x * E, R = r.min(P * 4, b);
423
+ if (P) {
424
+ for (var q = 0; q < P; q += E)
425
+ this._doProcessBlock(m, q);
426
+ d = m.splice(0, P), p.sigBytes -= R;
427
+ }
428
+ return new u.init(d, R);
150
429
  },
151
430
  /**
152
431
  * Creates a copy of this object.
@@ -155,404 +434,133 @@ const Ae = {}, Pe = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineP
155
434
  *
156
435
  * @example
157
436
  *
158
- * var clone = instance.clone();
437
+ * var clone = bufferedBlockAlgorithm.clone();
159
438
  */
160
439
  clone: function() {
161
- return this.init.prototype.extend(this);
162
- }
163
- };
164
- }(), u = h.WordArray = g.extend({
165
- /**
166
- * Initializes a newly created word array.
167
- *
168
- * @param {Array} words (Optional) An array of 32-bit words.
169
- * @param {number} sigBytes (Optional) The number of significant bytes in the words.
170
- *
171
- * @example
172
- *
173
- * var wordArray = CryptoJS.lib.WordArray.create();
174
- * var wordArray = CryptoJS.lib.WordArray.create([0x00010203, 0x04050607]);
175
- * var wordArray = CryptoJS.lib.WordArray.create([0x00010203, 0x04050607], 6);
176
- */
177
- init: function(a, d) {
178
- a = this.words = a || [], d != i ? this.sigBytes = d : this.sigBytes = a.length * 4;
179
- },
180
- /**
181
- * Converts this word array to a string.
182
- *
183
- * @param {Encoder} encoder (Optional) The encoding strategy to use. Default: CryptoJS.enc.Hex
184
- *
185
- * @return {string} The stringified word array.
186
- *
187
- * @example
188
- *
189
- * var string = wordArray + '';
190
- * var string = wordArray.toString();
191
- * var string = wordArray.toString(CryptoJS.enc.Utf8);
192
- */
193
- toString: function(a) {
194
- return (a || w).stringify(this);
195
- },
196
- /**
197
- * Concatenates a word array to this word array.
198
- *
199
- * @param {WordArray} wordArray The word array to append.
200
- *
201
- * @return {WordArray} This word array.
202
- *
203
- * @example
204
- *
205
- * wordArray1.concat(wordArray2);
206
- */
207
- concat: function(a) {
208
- var d = this.words, p = a.words, m = this.sigBytes, b = a.sigBytes;
209
- if (this.clamp(), m % 4)
210
- for (var E = 0; E < b; E++) {
211
- var x = p[E >>> 2] >>> 24 - E % 4 * 8 & 255;
212
- d[m + E >>> 2] |= x << 24 - (m + E) % 4 * 8;
213
- }
214
- else
215
- for (var C = 0; C < b; C += 4)
216
- d[m + C >>> 2] = p[C >>> 2];
217
- return this.sigBytes += b, this;
218
- },
219
- /**
220
- * Removes insignificant bits.
221
- *
222
- * @example
223
- *
224
- * wordArray.clamp();
225
- */
226
- clamp: function() {
227
- var a = this.words, d = this.sigBytes;
228
- a[d >>> 2] &= 4294967295 << 32 - d % 4 * 8, a.length = r.ceil(d / 4);
229
- },
230
- /**
231
- * Creates a copy of this word array.
232
- *
233
- * @return {WordArray} The clone.
234
- *
235
- * @example
236
- *
237
- * var clone = wordArray.clone();
238
- */
239
- clone: function() {
240
- var a = g.clone.call(this);
241
- return a.words = this.words.slice(0), a;
242
- },
243
- /**
244
- * Creates a word array filled with random bytes.
245
- *
246
- * @param {number} nBytes The number of random bytes to generate.
247
- *
248
- * @return {WordArray} The random word array.
249
- *
250
- * @static
251
- *
252
- * @example
253
- *
254
- * var wordArray = CryptoJS.lib.WordArray.random(16);
255
- */
256
- random: function(a) {
257
- for (var d = [], p = 0; p < a; p += 4)
258
- d.push(o());
259
- return new u.init(d, a);
260
- }
261
- }), S = l.enc = {}, w = S.Hex = {
262
- /**
263
- * Converts a word array to a hex string.
264
- *
265
- * @param {WordArray} wordArray The word array.
266
- *
267
- * @return {string} The hex string.
268
- *
269
- * @static
270
- *
271
- * @example
272
- *
273
- * var hexString = CryptoJS.enc.Hex.stringify(wordArray);
274
- */
275
- stringify: function(a) {
276
- for (var d = a.words, p = a.sigBytes, m = [], b = 0; b < p; b++) {
277
- var E = d[b >>> 2] >>> 24 - b % 4 * 8 & 255;
278
- m.push((E >>> 4).toString(16)), m.push((E & 15).toString(16));
279
- }
280
- return m.join("");
281
- },
282
- /**
283
- * Converts a hex string to a word array.
284
- *
285
- * @param {string} hexStr The hex string.
286
- *
287
- * @return {WordArray} The word array.
288
- *
289
- * @static
290
- *
291
- * @example
292
- *
293
- * var wordArray = CryptoJS.enc.Hex.parse(hexString);
294
- */
295
- parse: function(a) {
296
- for (var d = a.length, p = [], m = 0; m < d; m += 2)
297
- p[m >>> 3] |= parseInt(a.substr(m, 2), 16) << 24 - m % 8 * 4;
298
- return new u.init(p, d / 2);
299
- }
300
- }, k = S.Latin1 = {
301
- /**
302
- * Converts a word array to a Latin1 string.
303
- *
304
- * @param {WordArray} wordArray The word array.
305
- *
306
- * @return {string} The Latin1 string.
307
- *
308
- * @static
309
- *
310
- * @example
311
- *
312
- * var latin1String = CryptoJS.enc.Latin1.stringify(wordArray);
313
- */
314
- stringify: function(a) {
315
- for (var d = a.words, p = a.sigBytes, m = [], b = 0; b < p; b++) {
316
- var E = d[b >>> 2] >>> 24 - b % 4 * 8 & 255;
317
- m.push(String.fromCharCode(E));
318
- }
319
- return m.join("");
320
- },
321
- /**
322
- * Converts a Latin1 string to a word array.
323
- *
324
- * @param {string} latin1Str The Latin1 string.
325
- *
326
- * @return {WordArray} The word array.
327
- *
328
- * @static
329
- *
330
- * @example
331
- *
332
- * var wordArray = CryptoJS.enc.Latin1.parse(latin1String);
333
- */
334
- parse: function(a) {
335
- for (var d = a.length, p = [], m = 0; m < d; m++)
336
- p[m >>> 2] |= (a.charCodeAt(m) & 255) << 24 - m % 4 * 8;
337
- return new u.init(p, d);
338
- }
339
- }, _ = S.Utf8 = {
340
- /**
341
- * Converts a word array to a UTF-8 string.
342
- *
343
- * @param {WordArray} wordArray The word array.
344
- *
345
- * @return {string} The UTF-8 string.
346
- *
347
- * @static
348
- *
349
- * @example
350
- *
351
- * var utf8String = CryptoJS.enc.Utf8.stringify(wordArray);
352
- */
353
- stringify: function(a) {
354
- try {
355
- return decodeURIComponent(escape(k.stringify(a)));
356
- } catch {
357
- throw new Error("Malformed UTF-8 data");
358
- }
359
- },
360
- /**
361
- * Converts a UTF-8 string to a word array.
362
- *
363
- * @param {string} utf8Str The UTF-8 string.
364
- *
365
- * @return {WordArray} The word array.
366
- *
367
- * @static
368
- *
369
- * @example
370
- *
371
- * var wordArray = CryptoJS.enc.Utf8.parse(utf8String);
372
- */
373
- parse: function(a) {
374
- return k.parse(unescape(encodeURIComponent(a)));
375
- }
376
- }, v = h.BufferedBlockAlgorithm = g.extend({
377
- /**
378
- * Resets this block algorithm's data buffer to its initial state.
379
- *
380
- * @example
381
- *
382
- * bufferedBlockAlgorithm.reset();
383
- */
384
- reset: function() {
385
- this._data = new u.init(), this._nDataBytes = 0;
386
- },
387
- /**
388
- * Adds new data to this block algorithm's buffer.
389
- *
390
- * @param {WordArray|string} data The data to append. Strings are converted to a WordArray using UTF-8.
391
- *
392
- * @example
393
- *
394
- * bufferedBlockAlgorithm._append('data');
395
- * bufferedBlockAlgorithm._append(wordArray);
396
- */
397
- _append: function(a) {
398
- typeof a == "string" && (a = _.parse(a)), this._data.concat(a), this._nDataBytes += a.sigBytes;
399
- },
400
- /**
401
- * Processes available data blocks.
402
- *
403
- * This method invokes _doProcessBlock(offset), which must be implemented by a concrete subtype.
404
- *
405
- * @param {boolean} doFlush Whether all blocks and partial blocks should be processed.
406
- *
407
- * @return {WordArray} The processed data.
408
- *
409
- * @example
410
- *
411
- * var processedData = bufferedBlockAlgorithm._process();
412
- * var processedData = bufferedBlockAlgorithm._process(!!'flush');
413
- */
414
- _process: function(a) {
415
- var d, p = this._data, m = p.words, b = p.sigBytes, E = this.blockSize, x = E * 4, C = b / x;
416
- a ? C = r.ceil(C) : C = r.max((C | 0) - this._minBufferSize, 0);
417
- var P = C * E, R = r.min(P * 4, b);
418
- if (P) {
419
- for (var q = 0; q < P; q += E)
420
- this._doProcessBlock(m, q);
421
- d = m.splice(0, P), p.sigBytes -= R;
440
+ var a = g.clone.call(this);
441
+ return a._data = this._data.clone(), a;
442
+ },
443
+ _minBufferSize: 0
444
+ });
445
+ h.Hasher = v.extend({
446
+ /**
447
+ * Configuration options.
448
+ */
449
+ cfg: g.extend(),
450
+ /**
451
+ * Initializes a newly created hasher.
452
+ *
453
+ * @param {Object} cfg (Optional) The configuration options to use for this hash computation.
454
+ *
455
+ * @example
456
+ *
457
+ * var hasher = CryptoJS.algo.SHA256.create();
458
+ */
459
+ init: function(a) {
460
+ this.cfg = this.cfg.extend(a), this.reset();
461
+ },
462
+ /**
463
+ * Resets this hasher to its initial state.
464
+ *
465
+ * @example
466
+ *
467
+ * hasher.reset();
468
+ */
469
+ reset: function() {
470
+ v.reset.call(this), this._doReset();
471
+ },
472
+ /**
473
+ * Updates this hasher with a message.
474
+ *
475
+ * @param {WordArray|string} messageUpdate The message to append.
476
+ *
477
+ * @return {Hasher} This hasher.
478
+ *
479
+ * @example
480
+ *
481
+ * hasher.update('message');
482
+ * hasher.update(wordArray);
483
+ */
484
+ update: function(a) {
485
+ return this._append(a), this._process(), this;
486
+ },
487
+ /**
488
+ * Finalizes the hash computation.
489
+ * Note that the finalize operation is effectively a destructive, read-once operation.
490
+ *
491
+ * @param {WordArray|string} messageUpdate (Optional) A final message update.
492
+ *
493
+ * @return {WordArray} The hash.
494
+ *
495
+ * @example
496
+ *
497
+ * var hash = hasher.finalize();
498
+ * var hash = hasher.finalize('message');
499
+ * var hash = hasher.finalize(wordArray);
500
+ */
501
+ finalize: function(a) {
502
+ a && this._append(a);
503
+ var d = this._doFinalize();
504
+ return d;
505
+ },
506
+ blockSize: 16,
507
+ /**
508
+ * Creates a shortcut function to a hasher's object interface.
509
+ *
510
+ * @param {Hasher} hasher The hasher to create a helper for.
511
+ *
512
+ * @return {Function} The shortcut function.
513
+ *
514
+ * @static
515
+ *
516
+ * @example
517
+ *
518
+ * var SHA256 = CryptoJS.lib.Hasher._createHelper(CryptoJS.algo.SHA256);
519
+ */
520
+ _createHelper: function(a) {
521
+ return function(d, p) {
522
+ return new a.init(p).finalize(d);
523
+ };
524
+ },
525
+ /**
526
+ * Creates a shortcut function to the HMAC's object interface.
527
+ *
528
+ * @param {Hasher} hasher The hasher to use in this HMAC helper.
529
+ *
530
+ * @return {Function} The shortcut function.
531
+ *
532
+ * @static
533
+ *
534
+ * @example
535
+ *
536
+ * var HmacSHA256 = CryptoJS.lib.Hasher._createHmacHelper(CryptoJS.algo.SHA256);
537
+ */
538
+ _createHmacHelper: function(a) {
539
+ return function(d, p) {
540
+ return new y.HMAC.init(a, p).finalize(d);
541
+ };
422
542
  }
423
- return new u.init(d, R);
424
- },
425
- /**
426
- * Creates a copy of this object.
427
- *
428
- * @return {Object} The clone.
429
- *
430
- * @example
431
- *
432
- * var clone = bufferedBlockAlgorithm.clone();
433
- */
434
- clone: function() {
435
- var a = g.clone.call(this);
436
- return a._data = this._data.clone(), a;
437
- },
438
- _minBufferSize: 0
439
- });
440
- h.Hasher = v.extend({
441
- /**
442
- * Configuration options.
443
- */
444
- cfg: g.extend(),
445
- /**
446
- * Initializes a newly created hasher.
447
- *
448
- * @param {Object} cfg (Optional) The configuration options to use for this hash computation.
449
- *
450
- * @example
451
- *
452
- * var hasher = CryptoJS.algo.SHA256.create();
453
- */
454
- init: function(a) {
455
- this.cfg = this.cfg.extend(a), this.reset();
456
- },
457
- /**
458
- * Resets this hasher to its initial state.
459
- *
460
- * @example
461
- *
462
- * hasher.reset();
463
- */
464
- reset: function() {
465
- v.reset.call(this), this._doReset();
466
- },
467
- /**
468
- * Updates this hasher with a message.
469
- *
470
- * @param {WordArray|string} messageUpdate The message to append.
471
- *
472
- * @return {Hasher} This hasher.
473
- *
474
- * @example
475
- *
476
- * hasher.update('message');
477
- * hasher.update(wordArray);
478
- */
479
- update: function(a) {
480
- return this._append(a), this._process(), this;
481
- },
482
- /**
483
- * Finalizes the hash computation.
484
- * Note that the finalize operation is effectively a destructive, read-once operation.
485
- *
486
- * @param {WordArray|string} messageUpdate (Optional) A final message update.
487
- *
488
- * @return {WordArray} The hash.
489
- *
490
- * @example
491
- *
492
- * var hash = hasher.finalize();
493
- * var hash = hasher.finalize('message');
494
- * var hash = hasher.finalize(wordArray);
495
- */
496
- finalize: function(a) {
497
- a && this._append(a);
498
- var d = this._doFinalize();
499
- return d;
500
- },
501
- blockSize: 16,
502
- /**
503
- * Creates a shortcut function to a hasher's object interface.
504
- *
505
- * @param {Hasher} hasher The hasher to create a helper for.
506
- *
507
- * @return {Function} The shortcut function.
508
- *
509
- * @static
510
- *
511
- * @example
512
- *
513
- * var SHA256 = CryptoJS.lib.Hasher._createHelper(CryptoJS.algo.SHA256);
514
- */
515
- _createHelper: function(a) {
516
- return function(d, p) {
517
- return new a.init(p).finalize(d);
518
- };
519
- },
520
- /**
521
- * Creates a shortcut function to the HMAC's object interface.
522
- *
523
- * @param {Hasher} hasher The hasher to use in this HMAC helper.
524
- *
525
- * @return {Function} The shortcut function.
526
- *
527
- * @static
528
- *
529
- * @example
530
- *
531
- * var HmacSHA256 = CryptoJS.lib.Hasher._createHmacHelper(CryptoJS.algo.SHA256);
532
- */
533
- _createHmacHelper: function(a) {
534
- return function(d, p) {
535
- return new y.HMAC.init(a, p).finalize(d);
536
- };
537
- }
538
- });
539
- var y = l.algo = {};
540
- return l;
541
- }(Math);
542
- return s;
543
- });
544
- })(Ue);
545
- var Q = {}, qe = {
543
+ });
544
+ var y = l.algo = {};
545
+ return l;
546
+ }(Math);
547
+ return s;
548
+ });
549
+ }(Oe)), L;
550
+ }
551
+ var Me = J();
552
+ const He = /* @__PURE__ */ Ue(Me);
553
+ var X = {}, We = {
546
554
  get exports() {
547
- return Q;
555
+ return X;
548
556
  },
549
557
  set exports(e) {
550
- Q = e;
558
+ X = e;
551
559
  }
552
560
  };
553
561
  (function(e, t) {
554
562
  (function(s, r) {
555
- e.exports = r(H);
563
+ e.exports = r(J());
556
564
  })(N, function(s) {
557
565
  return function(r) {
558
566
  var i = s, n = i.lib, o = n.WordArray, c = n.Hasher, l = i.algo, h = [], g = [];
@@ -574,15 +582,15 @@ var Q = {}, qe = {
574
582
  this._hash = new o.init(h.slice(0));
575
583
  },
576
584
  _doProcessBlock: function(w, k) {
577
- for (var _ = this._hash.words, v = _[0], y = _[1], a = _[2], d = _[3], p = _[4], m = _[5], b = _[6], E = _[7], x = 0; x < 64; x++) {
578
- if (x < 16)
579
- u[x] = w[k + x] | 0;
585
+ for (var _ = this._hash.words, v = _[0], y = _[1], a = _[2], d = _[3], p = _[4], m = _[5], b = _[6], E = _[7], C = 0; C < 64; C++) {
586
+ if (C < 16)
587
+ u[C] = w[k + C] | 0;
580
588
  else {
581
- var C = u[x - 15], P = (C << 25 | C >>> 7) ^ (C << 14 | C >>> 18) ^ C >>> 3, R = u[x - 2], q = (R << 15 | R >>> 17) ^ (R << 13 | R >>> 19) ^ R >>> 10;
582
- u[x] = P + u[x - 7] + q + u[x - 16];
589
+ var x = u[C - 15], P = (x << 25 | x >>> 7) ^ (x << 14 | x >>> 18) ^ x >>> 3, R = u[C - 2], q = (R << 15 | R >>> 17) ^ (R << 13 | R >>> 19) ^ R >>> 10;
590
+ u[C] = P + u[C - 7] + q + u[C - 16];
583
591
  }
584
- var W = p & m ^ ~p & b, J = v & y ^ v & a ^ y & a, K = (v << 30 | v >>> 2) ^ (v << 19 | v >>> 13) ^ (v << 10 | v >>> 22), V = (p << 26 | p >>> 6) ^ (p << 21 | p >>> 11) ^ (p << 7 | p >>> 25), B = E + V + W + g[x] + u[x], xe = K + J;
585
- E = b, b = m, m = p, p = d + B | 0, d = a, a = y, y = v, v = B + xe | 0;
592
+ var H = p & m ^ ~p & b, K = v & y ^ v & a ^ y & a, V = (v << 30 | v >>> 2) ^ (v << 19 | v >>> 13) ^ (v << 10 | v >>> 22), G = (p << 26 | p >>> 6) ^ (p << 21 | p >>> 11) ^ (p << 7 | p >>> 25), W = E + G + H + g[C] + u[C], Re = V + K;
593
+ E = b, b = m, m = p, p = d + W | 0, d = a, a = y, y = v, v = W + Re | 0;
586
594
  }
587
595
  _[0] = _[0] + v | 0, _[1] = _[1] + y | 0, _[2] = _[2] + a | 0, _[3] = _[3] + d | 0, _[4] = _[4] + p | 0, _[5] = _[5] + m | 0, _[6] = _[6] + b | 0, _[7] = _[7] + E | 0;
588
596
  },
@@ -598,8 +606,8 @@ var Q = {}, qe = {
598
606
  i.SHA256 = c._createHelper(S), i.HmacSHA256 = c._createHmacHelper(S);
599
607
  }(Math), s.SHA256;
600
608
  });
601
- })(qe);
602
- var $ = {}, Ne = {
609
+ })(We);
610
+ var $ = {}, Be = {
603
611
  get exports() {
604
612
  return $;
605
613
  },
@@ -609,7 +617,7 @@ var $ = {}, Ne = {
609
617
  };
610
618
  (function(e, t) {
611
619
  (function(s, r) {
612
- e.exports = r(H);
620
+ e.exports = r(J());
613
621
  })(N, function(s) {
614
622
  return function() {
615
623
  var r = s, i = r.lib, n = i.WordArray, o = r.enc;
@@ -678,35 +686,35 @@ var $ = {}, Ne = {
678
686
  }
679
687
  }(), s.enc.Base64;
680
688
  });
681
- })(Ne);
682
- var X = {}, je = {
689
+ })(Be);
690
+ var Y = {}, Fe = {
683
691
  get exports() {
684
- return X;
692
+ return Y;
685
693
  },
686
694
  set exports(e) {
687
- X = e;
695
+ Y = e;
688
696
  }
689
697
  };
690
698
  (function(e, t) {
691
699
  (function(s, r) {
692
- e.exports = r(H);
700
+ e.exports = r(J());
693
701
  })(N, function(s) {
694
702
  return s.enc.Utf8;
695
703
  });
696
- })(je);
697
- function Y(e) {
704
+ })(Fe);
705
+ function Z(e) {
698
706
  this.message = e;
699
707
  }
700
- Y.prototype = new Error(), Y.prototype.name = "InvalidCharacterError";
701
- var ce = typeof window < "u" && window.atob && window.atob.bind(window) || function(e) {
708
+ Z.prototype = new Error(), Z.prototype.name = "InvalidCharacterError";
709
+ var de = typeof window < "u" && window.atob && window.atob.bind(window) || function(e) {
702
710
  var t = String(e).replace(/=+$/, "");
703
711
  if (t.length % 4 == 1)
704
- throw new Y("'atob' failed: The string to be decoded is not correctly encoded.");
712
+ throw new Z("'atob' failed: The string to be decoded is not correctly encoded.");
705
713
  for (var s, r, i = 0, n = 0, o = ""; r = t.charAt(n++); ~r && (s = i % 4 ? 64 * s + r : r, i++ % 4) ? o += String.fromCharCode(255 & s >> (-2 * i & 6)) : 0)
706
714
  r = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(r);
707
715
  return o;
708
716
  };
709
- function He(e) {
717
+ function Le(e) {
710
718
  var t = e.replace(/-/g, "+").replace(/_/g, "/");
711
719
  switch (t.length % 4) {
712
720
  case 0:
@@ -722,30 +730,30 @@ function He(e) {
722
730
  }
723
731
  try {
724
732
  return function(s) {
725
- return decodeURIComponent(ce(s).replace(/(.)/g, function(r, i) {
733
+ return decodeURIComponent(de(s).replace(/(.)/g, function(r, i) {
726
734
  var n = i.charCodeAt(0).toString(16).toUpperCase();
727
735
  return n.length < 2 && (n = "0" + n), "%" + n;
728
736
  }));
729
737
  }(t);
730
738
  } catch {
731
- return ce(t);
739
+ return de(t);
732
740
  }
733
741
  }
734
742
  function z(e) {
735
743
  this.message = e;
736
744
  }
737
- function Me(e, t) {
745
+ function $e(e, t) {
738
746
  if (typeof e != "string")
739
747
  throw new z("Invalid token specified");
740
748
  var s = (t = t || {}).header === !0 ? 0 : 1;
741
749
  try {
742
- return JSON.parse(He(e.split(".")[s]));
750
+ return JSON.parse(Le(e.split(".")[s]));
743
751
  } catch (r) {
744
752
  throw new z("Invalid token specified: " + r.message);
745
753
  }
746
754
  }
747
755
  z.prototype = new Error(), z.prototype.name = "InvalidTokenError";
748
- var We = {
756
+ var ze = {
749
757
  debug: () => {
750
758
  },
751
759
  info: () => {
@@ -757,7 +765,7 @@ var We = {
757
765
  }, I, U, D = /* @__PURE__ */ ((e) => (e[e.NONE = 0] = "NONE", e[e.ERROR = 1] = "ERROR", e[e.WARN = 2] = "WARN", e[e.INFO = 3] = "INFO", e[e.DEBUG = 4] = "DEBUG", e))(D || {});
758
766
  ((e) => {
759
767
  function t() {
760
- I = 3, U = We;
768
+ I = 3, U = ze;
761
769
  }
762
770
  e.reset = t;
763
771
  function s(i) {
@@ -817,15 +825,15 @@ var f = class {
817
825
  }
818
826
  };
819
827
  D.reset();
820
- var Be = "10000000-1000-4000-8000-100000000000", A = class {
828
+ var De = "10000000-1000-4000-8000-100000000000", A = class {
821
829
  static _randomWord() {
822
- return H.lib.WordArray.random(1).words[0];
830
+ return He.lib.WordArray.random(1).words[0];
823
831
  }
824
832
  /**
825
833
  * Generates RFC4122 version 4 guid
826
834
  */
827
835
  static generateUUIDv4() {
828
- return Be.replace(
836
+ return De.replace(
829
837
  /[018]/g,
830
838
  (t) => (+t ^ A._randomWord() & 15 >> +t / 4).toString(16)
831
839
  ).replace(/-/g, "");
@@ -841,7 +849,7 @@ var Be = "10000000-1000-4000-8000-100000000000", A = class {
841
849
  */
842
850
  static generateCodeChallenge(e) {
843
851
  try {
844
- const t = Q(e);
852
+ const t = X(e);
845
853
  return $.stringify(t).replace(/\+/g, "-").replace(/\//g, "_").replace(/=+$/, "");
846
854
  } catch (t) {
847
855
  throw f.error("CryptoUtils.generateCodeChallenge", t), t;
@@ -851,7 +859,7 @@ var Be = "10000000-1000-4000-8000-100000000000", A = class {
851
859
  * Generates a base64-encoded string for a basic auth header
852
860
  */
853
861
  static generateBasicAuth(e, t) {
854
- const s = X.parse([e, t].join(":"));
862
+ const s = Y.parse([e, t].join(":"));
855
863
  return $.stringify(s);
856
864
  }
857
865
  }, O = class {
@@ -870,16 +878,16 @@ var Be = "10000000-1000-4000-8000-100000000000", A = class {
870
878
  for (const t of this._callbacks)
871
879
  t(...e);
872
880
  }
873
- }, Z = class {
881
+ }, ee = class {
874
882
  // IMPORTANT: doesn't validate the token
875
883
  static decode(e) {
876
884
  try {
877
- return Me(e);
885
+ return $e(e);
878
886
  } catch (t) {
879
887
  throw f.error("JwtUtils.decode", t), t;
880
888
  }
881
889
  }
882
- }, le = class {
890
+ }, he = class {
883
891
  /**
884
892
  * Populates a map of window features with a placement centered in front of
885
893
  * the current window. If no explicit width is given, a default value is
@@ -921,7 +929,7 @@ var Be = "10000000-1000-4000-8000-100000000000", A = class {
921
929
  cancel() {
922
930
  this._logger.create("cancel"), this._timerHandle && (clearInterval(this._timerHandle), this._timerHandle = null);
923
931
  }
924
- }, ee = class {
932
+ }, te = class {
925
933
  static readParams(e, t = "query") {
926
934
  if (!e)
927
935
  throw new TypeError("Invalid URL");
@@ -935,11 +943,11 @@ var Be = "10000000-1000-4000-8000-100000000000", A = class {
935
943
  throw f.error("ErrorResponse", "No error passed"), new Error("No error passed");
936
944
  this.error = e.error, this.error_description = (s = e.error_description) != null ? s : null, this.error_uri = (r = e.error_uri) != null ? r : null, this.state = e.userState, this.session_state = (i = e.session_state) != null ? i : null;
937
945
  }
938
- }, re = class extends Error {
946
+ }, ie = class extends Error {
939
947
  constructor(e) {
940
948
  super(e), this.name = "ErrorTimeout";
941
949
  }
942
- }, Fe = class {
950
+ }, Je = class {
943
951
  constructor(e) {
944
952
  this._logger = new f("AccessTokenEvents"), this._expiringTimer = new T("Access token expiring"), this._expiredTimer = new T("Access token expired"), this._expiringNotificationTimeInSeconds = e.expiringNotificationTimeInSeconds;
945
953
  }
@@ -984,7 +992,7 @@ var Be = "10000000-1000-4000-8000-100000000000", A = class {
984
992
  removeAccessTokenExpired(e) {
985
993
  this._expiredTimer.removeHandler(e);
986
994
  }
987
- }, Le = class {
995
+ }, Ke = class {
988
996
  constructor(e, t, s, r, i) {
989
997
  this._callback = e, this._client_id = t, this._intervalInSeconds = r, this._stopOnError = i, this._logger = new f("CheckSessionIFrame"), this._timer = null, this._session_state = null, this._message = (o) => {
990
998
  o.origin === this._frame_origin && o.source === this._frame.contentWindow && (o.data === "error" ? (this._logger.error("error message from check session op iframe"), this._stopOnError && this.stop()) : o.data === "changed" ? (this._logger.debug("changed message from check session op iframe"), this.stop(), this._callback()) : this._logger.debug(o.data + " message from check session op iframe"));
@@ -1011,7 +1019,7 @@ var Be = "10000000-1000-4000-8000-100000000000", A = class {
1011
1019
  stop() {
1012
1020
  this._logger.create("stop"), this._session_state = null, this._timer && (clearInterval(this._timer), this._timer = null);
1013
1021
  }
1014
- }, fe = class {
1022
+ }, me = class {
1015
1023
  constructor() {
1016
1024
  this._logger = new f("InMemoryWebStorage"), this._data = {};
1017
1025
  }
@@ -1033,7 +1041,7 @@ var Be = "10000000-1000-4000-8000-100000000000", A = class {
1033
1041
  key(e) {
1034
1042
  return Object.getOwnPropertyNames(this._data)[e];
1035
1043
  }
1036
- }, ie = class {
1044
+ }, ne = class {
1037
1045
  constructor(e = [], t = null) {
1038
1046
  this._jwtHandler = t, this._logger = new f("JsonService"), this._contentTypes = [], this._contentTypes.push(...e, "application/json"), t && this._contentTypes.push("application/jwt");
1039
1047
  }
@@ -1048,7 +1056,7 @@ var Be = "10000000-1000-4000-8000-100000000000", A = class {
1048
1056
  signal: i.signal
1049
1057
  });
1050
1058
  } catch (o) {
1051
- throw o instanceof DOMException && o.name === "AbortError" ? new re("Network timed out") : o;
1059
+ throw o instanceof DOMException && o.name === "AbortError" ? new ie("Network timed out") : o;
1052
1060
  } finally {
1053
1061
  clearTimeout(n);
1054
1062
  }
@@ -1114,9 +1122,9 @@ var Be = "10000000-1000-4000-8000-100000000000", A = class {
1114
1122
  throw n.error("Error from server:", g), g.error ? new j(g, t) : new Error(`${c.statusText} (${c.status}): ${JSON.stringify(g)}`);
1115
1123
  return g;
1116
1124
  }
1117
- }, $e = class {
1125
+ }, Ve = class {
1118
1126
  constructor(e) {
1119
- this._settings = e, this._logger = new f("MetadataService"), this._jsonService = new ie(["application/jwk-set+json"]), this._signingKeys = null, this._metadata = null, this._metadataUrl = this._settings.metadataUrl, this._settings.signingKeys && (this._logger.debug("using signingKeys from settings"), this._signingKeys = this._settings.signingKeys), this._settings.metadata && (this._logger.debug("using metadata from settings"), this._metadata = this._settings.metadata), this._settings.fetchRequestCredentials && (this._logger.debug("using fetchRequestCredentials from settings"), this._fetchRequestCredentials = this._settings.fetchRequestCredentials);
1127
+ this._settings = e, this._logger = new f("MetadataService"), this._jsonService = new ne(["application/jwk-set+json"]), this._signingKeys = null, this._metadata = null, this._metadataUrl = this._settings.metadataUrl, this._settings.signingKeys && (this._logger.debug("using signingKeys from settings"), this._signingKeys = this._settings.signingKeys), this._settings.metadata && (this._logger.debug("using metadata from settings"), this._metadata = this._settings.metadata), this._settings.fetchRequestCredentials && (this._logger.debug("using fetchRequestCredentials from settings"), this._fetchRequestCredentials = this._settings.fetchRequestCredentials);
1120
1128
  }
1121
1129
  resetSigningKeys() {
1122
1130
  this._signingKeys = null;
@@ -1177,7 +1185,7 @@ var Be = "10000000-1000-4000-8000-100000000000", A = class {
1177
1185
  throw e.throw(new Error("Missing keys on keyset")), null;
1178
1186
  return this._signingKeys = s.keys, this._signingKeys;
1179
1187
  }
1180
- }, we = class {
1188
+ }, ve = class {
1181
1189
  constructor({
1182
1190
  prefix: e = "oidc.",
1183
1191
  store: t = localStorage
@@ -1204,7 +1212,7 @@ var Be = "10000000-1000-4000-8000-100000000000", A = class {
1204
1212
  }
1205
1213
  return t;
1206
1214
  }
1207
- }, ze = "code", De = "openid", Je = "client_secret_post", Ke = "query", Ve = 60 * 15, Ge = 60 * 5, me = class {
1215
+ }, Ge = "code", Qe = "openid", Xe = "client_secret_post", Ye = "query", Ze = 60 * 15, et = 60 * 5, Se = class {
1208
1216
  constructor({
1209
1217
  // metadata related
1210
1218
  authority: e,
@@ -1215,11 +1223,11 @@ var Be = "10000000-1000-4000-8000-100000000000", A = class {
1215
1223
  // client related
1216
1224
  client_id: n,
1217
1225
  client_secret: o,
1218
- response_type: c = ze,
1219
- scope: l = De,
1226
+ response_type: c = Ge,
1227
+ scope: l = Qe,
1220
1228
  redirect_uri: h,
1221
1229
  post_logout_redirect_uri: g,
1222
- client_authentication: u = Je,
1230
+ client_authentication: u = Xe,
1223
1231
  // optional protocol
1224
1232
  prompt: S,
1225
1233
  display: w,
@@ -1227,44 +1235,44 @@ var Be = "10000000-1000-4000-8000-100000000000", A = class {
1227
1235
  ui_locales: _,
1228
1236
  acr_values: v,
1229
1237
  resource: y,
1230
- response_mode: a = Ke,
1238
+ response_mode: a = Ye,
1231
1239
  // behavior flags
1232
1240
  filterProtocolClaims: d = !0,
1233
1241
  loadUserInfo: p = !1,
1234
- staleStateAgeInSeconds: m = Ve,
1235
- clockSkewInSeconds: b = Ge,
1242
+ staleStateAgeInSeconds: m = Ze,
1243
+ clockSkewInSeconds: b = et,
1236
1244
  userInfoJwtIssuer: E = "OP",
1237
- mergeClaims: x = !1,
1238
- disablePKCE: C = !1,
1245
+ mergeClaims: C = !1,
1246
+ disablePKCE: x = !1,
1239
1247
  // other behavior
1240
1248
  stateStore: P,
1241
1249
  refreshTokenCredentials: R,
1242
1250
  revokeTokenAdditionalContentTypes: q,
1243
- fetchRequestCredentials: W,
1244
- refreshTokenAllowedScope: J,
1251
+ fetchRequestCredentials: H,
1252
+ refreshTokenAllowedScope: K,
1245
1253
  // extra query params
1246
- extraQueryParams: K = {},
1247
- extraTokenParams: V = {}
1254
+ extraQueryParams: V = {},
1255
+ extraTokenParams: G = {}
1248
1256
  }) {
1249
- if (this.authority = e, t ? this.metadataUrl = t : (this.metadataUrl = e, e && (this.metadataUrl.endsWith("/") || (this.metadataUrl += "/"), this.metadataUrl += ".well-known/openid-configuration")), this.metadata = s, this.metadataSeed = i, this.signingKeys = r, this.client_id = n, this.client_secret = o, this.response_type = c, this.scope = l, this.redirect_uri = h, this.post_logout_redirect_uri = g, this.client_authentication = u, this.prompt = S, this.display = w, this.max_age = k, this.ui_locales = _, this.acr_values = v, this.resource = y, this.response_mode = a, this.filterProtocolClaims = d ?? !0, this.loadUserInfo = !!p, this.staleStateAgeInSeconds = m, this.clockSkewInSeconds = b, this.userInfoJwtIssuer = E, this.mergeClaims = !!x, this.disablePKCE = !!C, this.revokeTokenAdditionalContentTypes = q, W && R && console.warn("Both fetchRequestCredentials and refreshTokenCredentials is set. Only fetchRequestCredentials will be used."), this.fetchRequestCredentials = W || R || "same-origin", P)
1257
+ if (this.authority = e, t ? this.metadataUrl = t : (this.metadataUrl = e, e && (this.metadataUrl.endsWith("/") || (this.metadataUrl += "/"), this.metadataUrl += ".well-known/openid-configuration")), this.metadata = s, this.metadataSeed = i, this.signingKeys = r, this.client_id = n, this.client_secret = o, this.response_type = c, this.scope = l, this.redirect_uri = h, this.post_logout_redirect_uri = g, this.client_authentication = u, this.prompt = S, this.display = w, this.max_age = k, this.ui_locales = _, this.acr_values = v, this.resource = y, this.response_mode = a, this.filterProtocolClaims = d ?? !0, this.loadUserInfo = !!p, this.staleStateAgeInSeconds = m, this.clockSkewInSeconds = b, this.userInfoJwtIssuer = E, this.mergeClaims = !!C, this.disablePKCE = !!x, this.revokeTokenAdditionalContentTypes = q, H && R && console.warn("Both fetchRequestCredentials and refreshTokenCredentials is set. Only fetchRequestCredentials will be used."), this.fetchRequestCredentials = H || R || "same-origin", P)
1250
1258
  this.stateStore = P;
1251
1259
  else {
1252
- const B = typeof window < "u" ? window.localStorage : new fe();
1253
- this.stateStore = new we({ store: B });
1260
+ const W = typeof window < "u" ? window.localStorage : new me();
1261
+ this.stateStore = new ve({ store: W });
1254
1262
  }
1255
- this.refreshTokenAllowedScope = J, this.extraQueryParams = K, this.extraTokenParams = V;
1263
+ this.refreshTokenAllowedScope = K, this.extraQueryParams = V, this.extraTokenParams = G;
1256
1264
  }
1257
- }, Qe = class {
1265
+ }, tt = class {
1258
1266
  constructor(e, t) {
1259
1267
  this._settings = e, this._metadataService = t, this._logger = new f("UserInfoService"), this._getClaimsFromJwt = async (s) => {
1260
1268
  const r = this._logger.create("_getClaimsFromJwt");
1261
1269
  try {
1262
- const i = Z.decode(s);
1270
+ const i = ee.decode(s);
1263
1271
  return r.debug("JWT decoding successful"), i;
1264
1272
  } catch (i) {
1265
1273
  throw r.error("Error parsing JWT response"), i;
1266
1274
  }
1267
- }, this._jsonService = new ie(void 0, this._getClaimsFromJwt);
1275
+ }, this._jsonService = new ne(void 0, this._getClaimsFromJwt);
1268
1276
  }
1269
1277
  async getClaims(e) {
1270
1278
  const t = this._logger.create("getClaims");
@@ -1277,9 +1285,9 @@ var Be = "10000000-1000-4000-8000-100000000000", A = class {
1277
1285
  });
1278
1286
  return t.debug("got claims", r), r;
1279
1287
  }
1280
- }, ve = class {
1288
+ }, ye = class {
1281
1289
  constructor(e, t) {
1282
- this._settings = e, this._metadataService = t, this._logger = new f("TokenClient"), this._jsonService = new ie(this._settings.revokeTokenAdditionalContentTypes);
1290
+ this._settings = e, this._metadataService = t, this._logger = new f("TokenClient"), this._jsonService = new ne(this._settings.revokeTokenAdditionalContentTypes);
1283
1291
  }
1284
1292
  async exchangeCode({
1285
1293
  grant_type: e = "authorization_code",
@@ -1381,7 +1389,7 @@ var Be = "10000000-1000-4000-8000-100000000000", A = class {
1381
1389
  o != null && i.set(n, o);
1382
1390
  i.set("client_id", this._settings.client_id), this._settings.client_secret && i.set("client_secret", this._settings.client_secret), await this._jsonService.postForm(r, { body: i }), s.debug("got response");
1383
1391
  }
1384
- }, Xe = [
1392
+ }, st = [
1385
1393
  "nbf",
1386
1394
  "jti",
1387
1395
  "auth_time",
@@ -1391,9 +1399,9 @@ var Be = "10000000-1000-4000-8000-100000000000", A = class {
1391
1399
  "azp",
1392
1400
  "at_hash"
1393
1401
  // https://openid.net/specs/openid-connect-core-1_0.html#CodeIDToken
1394
- ], Ye = ["sub", "iss", "aud", "exp", "iat"], Ze = class {
1402
+ ], rt = ["sub", "iss", "aud", "exp", "iat"], it = class {
1395
1403
  constructor(e, t) {
1396
- this._settings = e, this._metadataService = t, this._logger = new f("ResponseValidator"), this._userInfoService = new Qe(this._settings, this._metadataService), this._tokenClient = new ve(this._settings, this._metadataService);
1404
+ this._settings = e, this._metadataService = t, this._logger = new f("ResponseValidator"), this._userInfoService = new tt(this._settings, this._metadataService), this._tokenClient = new ye(this._settings, this._metadataService);
1397
1405
  }
1398
1406
  async validateSigninResponse(e, t) {
1399
1407
  const s = this._logger.create("validateSigninResponse");
@@ -1445,9 +1453,9 @@ var Be = "10000000-1000-4000-8000-100000000000", A = class {
1445
1453
  const t = { ...e };
1446
1454
  if (this._settings.filterProtocolClaims) {
1447
1455
  let s;
1448
- Array.isArray(this._settings.filterProtocolClaims) ? s = this._settings.filterProtocolClaims : s = Xe;
1456
+ Array.isArray(this._settings.filterProtocolClaims) ? s = this._settings.filterProtocolClaims : s = st;
1449
1457
  for (const r of s)
1450
- Ye.includes(r) || delete t[r];
1458
+ rt.includes(r) || delete t[r];
1451
1459
  }
1452
1460
  return t;
1453
1461
  }
@@ -1471,9 +1479,9 @@ var Be = "10000000-1000-4000-8000-100000000000", A = class {
1471
1479
  var s;
1472
1480
  const r = this._logger.create("_validateIdTokenAttributes");
1473
1481
  r.debug("decoding ID Token JWT");
1474
- const i = Z.decode((s = e.id_token) != null ? s : "");
1482
+ const i = ee.decode((s = e.id_token) != null ? s : "");
1475
1483
  if (i.sub || r.throw(new Error("ID Token is missing a subject claim")), t) {
1476
- const n = Z.decode(t);
1484
+ const n = ee.decode(t);
1477
1485
  n.sub !== i.sub && r.throw(new Error("sub in id_token does not match current sub")), n.auth_time && n.auth_time !== i.auth_time && r.throw(new Error("auth_time in id_token does not match original auth_time")), n.azp && n.azp !== i.azp && r.throw(new Error("azp in id_token does not match original azp")), !n.azp && i.azp && r.throw(new Error("azp not in id_token, but present in original id_token"));
1478
1486
  }
1479
1487
  e.profile = i;
@@ -1511,7 +1519,7 @@ var Be = "10000000-1000-4000-8000-100000000000", A = class {
1511
1519
  l && (s.debug("removed item for key:", o), e.remove(o));
1512
1520
  }
1513
1521
  }
1514
- }, ne = class extends M {
1522
+ }, oe = class extends M {
1515
1523
  constructor(e) {
1516
1524
  super(e), e.code_verifier === !0 ? this.code_verifier = A.generateCodeVerifier() : e.code_verifier && (this.code_verifier = e.code_verifier), this.code_verifier && (this.code_challenge = A.generateCodeChallenge(this.code_verifier)), this.authority = e.authority, this.client_id = e.client_id, this.redirect_uri = e.redirect_uri, this.scope = e.scope, this.client_secret = e.client_secret, this.extraTokenParams = e.extraTokenParams, this.response_mode = e.response_mode, this.skipUserInfo = e.skipUserInfo;
1517
1525
  }
@@ -1535,9 +1543,9 @@ var Be = "10000000-1000-4000-8000-100000000000", A = class {
1535
1543
  static fromStorageString(e) {
1536
1544
  f.createStatic("SigninState", "fromStorageString");
1537
1545
  const t = JSON.parse(e);
1538
- return new ne(t);
1546
+ return new oe(t);
1539
1547
  }
1540
- }, et = class {
1548
+ }, nt = class {
1541
1549
  constructor({
1542
1550
  // mandatory
1543
1551
  url: e,
@@ -1571,7 +1579,7 @@ var Be = "10000000-1000-4000-8000-100000000000", A = class {
1571
1579
  throw this._logger.error("ctor: No scope passed"), new Error("scope");
1572
1580
  if (!t)
1573
1581
  throw this._logger.error("ctor: No authority passed"), new Error("authority");
1574
- this.state = new ne({
1582
+ this.state = new oe({
1575
1583
  data: o,
1576
1584
  request_type: l,
1577
1585
  code_verifier: !_,
@@ -1590,7 +1598,7 @@ var Be = "10000000-1000-4000-8000-100000000000", A = class {
1590
1598
  d != null && y.searchParams.append(a, d.toString());
1591
1599
  this.url = y.href;
1592
1600
  }
1593
- }, tt = "openid", G = class {
1601
+ }, ot = "openid", Q = class {
1594
1602
  constructor(e) {
1595
1603
  this.access_token = "", this.token_type = "", this.profile = {}, this.state = e.get("state"), this.session_state = e.get("session_state"), this.error = e.get("error"), this.error_description = e.get("error_description"), this.error_uri = e.get("error_uri"), this.code = e.get("code");
1596
1604
  }
@@ -1603,9 +1611,9 @@ var Be = "10000000-1000-4000-8000-100000000000", A = class {
1603
1611
  }
1604
1612
  get isOpenId() {
1605
1613
  var e;
1606
- return ((e = this.scope) == null ? void 0 : e.split(" ").includes(tt)) || !!this.id_token;
1614
+ return ((e = this.scope) == null ? void 0 : e.split(" ").includes(ot)) || !!this.id_token;
1607
1615
  }
1608
- }, st = class {
1616
+ }, at = class {
1609
1617
  constructor({
1610
1618
  url: e,
1611
1619
  state_data: t,
@@ -1622,13 +1630,13 @@ var Be = "10000000-1000-4000-8000-100000000000", A = class {
1622
1630
  l != null && o.searchParams.append(c, l.toString());
1623
1631
  this.url = o.href;
1624
1632
  }
1625
- }, rt = class {
1633
+ }, ct = class {
1626
1634
  constructor(e) {
1627
1635
  this.state = e.get("state"), this.error = e.get("error"), this.error_description = e.get("error_description"), this.error_uri = e.get("error_uri");
1628
1636
  }
1629
- }, it = class {
1637
+ }, lt = class {
1630
1638
  constructor(e) {
1631
- this._logger = new f("OidcClient"), this.settings = new me(e), this.metadataService = new $e(this.settings), this._validator = new Ze(this.settings, this.metadataService), this._tokenClient = new ve(this.settings, this.metadataService);
1639
+ this._logger = new f("OidcClient"), this.settings = new Se(e), this.metadataService = new Ve(this.settings), this._validator = new it(this.settings, this.metadataService), this._tokenClient = new ye(this.settings, this.metadataService);
1632
1640
  }
1633
1641
  async createSigninRequest({
1634
1642
  state: e,
@@ -1657,7 +1665,7 @@ var Be = "10000000-1000-4000-8000-100000000000", A = class {
1657
1665
  throw new Error("Only the Authorization Code flow (with PKCE) is supported");
1658
1666
  const m = await this.metadataService.getAuthorizationEndpoint();
1659
1667
  p.debug("Received authorization endpoint", m);
1660
- const b = new et({
1668
+ const b = new nt({
1661
1669
  url: m,
1662
1670
  authority: this.settings.authority,
1663
1671
  client_id: this.settings.client_id,
@@ -1689,13 +1697,13 @@ var Be = "10000000-1000-4000-8000-100000000000", A = class {
1689
1697
  return await this.settings.stateStore.set(E.id, E.toStorageString()), b;
1690
1698
  }
1691
1699
  async readSigninResponseState(e, t = !1) {
1692
- const s = this._logger.create("readSigninResponseState"), r = new G(ee.readParams(e, this.settings.response_mode));
1700
+ const s = this._logger.create("readSigninResponseState"), r = new Q(te.readParams(e, this.settings.response_mode));
1693
1701
  if (!r.state)
1694
1702
  throw s.throw(new Error("No state in response")), null;
1695
1703
  const i = await this.settings.stateStore[t ? "remove" : "get"](r.state);
1696
1704
  if (!i)
1697
1705
  throw s.throw(new Error("No matching state found in storage")), null;
1698
- return { state: ne.fromStorageString(i), response: r };
1706
+ return { state: oe.fromStorageString(i), response: r };
1699
1707
  }
1700
1708
  async processSigninResponse(e) {
1701
1709
  const t = this._logger.create("processSigninResponse"), { state: s, response: r } = await this.readSigninResponseState(e, !0);
@@ -1707,7 +1715,7 @@ var Be = "10000000-1000-4000-8000-100000000000", A = class {
1707
1715
  skipUserInfo: s = !1,
1708
1716
  extraTokenParams: r = {}
1709
1717
  }) {
1710
- const i = await this._tokenClient.exchangeCredentials({ username: e, password: t, ...r }), n = new G(new URLSearchParams());
1718
+ const i = await this._tokenClient.exchangeCredentials({ username: e, password: t, ...r }), n = new Q(new URLSearchParams());
1711
1719
  return Object.assign(n, i), await this._validator.validateCredentialsResponse(n, s), n;
1712
1720
  }
1713
1721
  async useRefreshToken({
@@ -1728,7 +1736,7 @@ var Be = "10000000-1000-4000-8000-100000000000", A = class {
1728
1736
  // provide the (possible filtered) scope list
1729
1737
  scope: i,
1730
1738
  timeoutInSeconds: t
1731
- }), o = new G(new URLSearchParams());
1739
+ }), o = new Q(new URLSearchParams());
1732
1740
  return Object.assign(o, n), r.debug("validating response", o), await this._validator.validateRefreshResponse(o, {
1733
1741
  ...e,
1734
1742
  // overide the scope in the state handed over to the validator
@@ -1747,7 +1755,7 @@ var Be = "10000000-1000-4000-8000-100000000000", A = class {
1747
1755
  if (!o)
1748
1756
  throw n.throw(new Error("No end session endpoint")), null;
1749
1757
  n.debug("Received end session endpoint", o);
1750
- const c = new st({
1758
+ const c = new at({
1751
1759
  url: o,
1752
1760
  id_token_hint: t,
1753
1761
  post_logout_redirect_uri: r,
@@ -1760,7 +1768,7 @@ var Be = "10000000-1000-4000-8000-100000000000", A = class {
1760
1768
  return l && (n.debug("Signout request has state to persist"), await this.settings.stateStore.set(l.id, l.toStorageString())), c;
1761
1769
  }
1762
1770
  async readSignoutResponseState(e, t = !1) {
1763
- const s = this._logger.create("readSignoutResponseState"), r = new rt(ee.readParams(e, this.settings.response_mode));
1771
+ const s = this._logger.create("readSignoutResponseState"), r = new ct(te.readParams(e, this.settings.response_mode));
1764
1772
  if (!r.state) {
1765
1773
  if (s.debug("No state in response"), r.error)
1766
1774
  throw s.warn("Response was error:", r.error), new j(r);
@@ -1784,7 +1792,7 @@ var Be = "10000000-1000-4000-8000-100000000000", A = class {
1784
1792
  token_type_hint: t
1785
1793
  });
1786
1794
  }
1787
- }, nt = class {
1795
+ }, dt = class {
1788
1796
  constructor(e) {
1789
1797
  this._userManager = e, this._logger = new f("SessionMonitor"), this._start = async (t) => {
1790
1798
  const s = t.session_state;
@@ -1799,7 +1807,7 @@ var Be = "10000000-1000-4000-8000-100000000000", A = class {
1799
1807
  const i = await this._userManager.metadataService.getCheckSessionIframe();
1800
1808
  if (i) {
1801
1809
  r.debug("initializing check session iframe");
1802
- const n = this._userManager.settings.client_id, o = this._userManager.settings.checkSessionIntervalInSeconds, c = this._userManager.settings.stopCheckSessionOnError, l = new Le(this._callback, n, i, o, c);
1810
+ const n = this._userManager.settings.client_id, o = this._userManager.settings.checkSessionIntervalInSeconds, c = this._userManager.settings.stopCheckSessionOnError, l = new Ke(this._callback, n, i, o, c);
1803
1811
  await l.load(), this._checkSessionIFrame = l, l.start(s);
1804
1812
  } else
1805
1813
  r.warn("no check session iframe found in the metadata");
@@ -1860,7 +1868,7 @@ var Be = "10000000-1000-4000-8000-100000000000", A = class {
1860
1868
  }
1861
1869
  }
1862
1870
  }
1863
- }, F = class {
1871
+ }, B = class {
1864
1872
  constructor(e) {
1865
1873
  var t;
1866
1874
  this.id_token = e.id_token, this.session_state = (t = e.session_state) != null ? t : null, this.access_token = e.access_token, this.refresh_token = e.refresh_token, this.token_type = e.token_type, this.scope = e.scope, this.profile = e.profile, this.expires_at = e.expires_at, this.state = e.userState;
@@ -1897,9 +1905,9 @@ var Be = "10000000-1000-4000-8000-100000000000", A = class {
1897
1905
  });
1898
1906
  }
1899
1907
  static fromStorageString(e) {
1900
- return f.createStatic("User", "fromStorageString"), new F(JSON.parse(e));
1908
+ return f.createStatic("User", "fromStorageString"), new B(JSON.parse(e));
1901
1909
  }
1902
- }, de = "oidc-client", Se = class {
1910
+ }, ue = "oidc-client", be = class {
1903
1911
  constructor() {
1904
1912
  this._abort = new O("Window navigation aborted"), this._disposeHandlers = /* @__PURE__ */ new Set(), this._window = null;
1905
1913
  }
@@ -1912,9 +1920,9 @@ var Be = "10000000-1000-4000-8000-100000000000", A = class {
1912
1920
  const o = (c) => {
1913
1921
  var l;
1914
1922
  const h = c.data, g = (l = e.scriptOrigin) != null ? l : window.location.origin;
1915
- if (!(c.origin !== g || (h == null ? void 0 : h.source) !== de)) {
1923
+ if (!(c.origin !== g || (h == null ? void 0 : h.source) !== ue)) {
1916
1924
  try {
1917
- const u = ee.readParams(h.url, e.response_mode).get("state");
1925
+ const u = te.readParams(h.url, e.response_mode).get("state");
1918
1926
  if (u || t.warn("no state found in response url"), c.source !== this._window && u !== e.state)
1919
1927
  return;
1920
1928
  } catch {
@@ -1937,54 +1945,54 @@ var Be = "10000000-1000-4000-8000-100000000000", A = class {
1937
1945
  }
1938
1946
  static _notifyParent(e, t, s = !1, r = window.location.origin) {
1939
1947
  e.postMessage({
1940
- source: de,
1948
+ source: ue,
1941
1949
  url: t,
1942
1950
  keepOpen: s
1943
1951
  }, r);
1944
1952
  }
1945
- }, ye = {
1953
+ }, ke = {
1946
1954
  location: !1,
1947
1955
  toolbar: !1,
1948
1956
  height: 640
1949
- }, be = "_blank", ot = 60, at = 2, ke = 10, ct = class extends me {
1957
+ }, Ee = "_blank", ht = 60, ut = 2, Ce = 10, gt = class extends Se {
1950
1958
  constructor(e) {
1951
1959
  const {
1952
1960
  popup_redirect_uri: t = e.redirect_uri,
1953
1961
  popup_post_logout_redirect_uri: s = e.post_logout_redirect_uri,
1954
- popupWindowFeatures: r = ye,
1955
- popupWindowTarget: i = be,
1962
+ popupWindowFeatures: r = ke,
1963
+ popupWindowTarget: i = Ee,
1956
1964
  redirectMethod: n = "assign",
1957
1965
  redirectTarget: o = "self",
1958
1966
  iframeNotifyParentOrigin: c = e.iframeNotifyParentOrigin,
1959
1967
  iframeScriptOrigin: l = e.iframeScriptOrigin,
1960
1968
  silent_redirect_uri: h = e.redirect_uri,
1961
- silentRequestTimeoutInSeconds: g = ke,
1969
+ silentRequestTimeoutInSeconds: g = Ce,
1962
1970
  automaticSilentRenew: u = !0,
1963
1971
  validateSubOnSilentRenew: S = !0,
1964
1972
  includeIdTokenInSilentRenew: w = !1,
1965
1973
  monitorSession: k = !1,
1966
1974
  monitorAnonymousSession: _ = !1,
1967
- checkSessionIntervalInSeconds: v = at,
1975
+ checkSessionIntervalInSeconds: v = ut,
1968
1976
  query_status_response_type: y = "code",
1969
1977
  stopCheckSessionOnError: a = !0,
1970
1978
  revokeTokenTypes: d = ["access_token", "refresh_token"],
1971
1979
  revokeTokensOnSignout: p = !1,
1972
1980
  includeIdTokenInSilentSignout: m = !1,
1973
- accessTokenExpiringNotificationTimeInSeconds: b = ot,
1981
+ accessTokenExpiringNotificationTimeInSeconds: b = ht,
1974
1982
  userStore: E
1975
1983
  } = e;
1976
1984
  if (super(e), this.popup_redirect_uri = t, this.popup_post_logout_redirect_uri = s, this.popupWindowFeatures = r, this.popupWindowTarget = i, this.redirectMethod = n, this.redirectTarget = o, this.iframeNotifyParentOrigin = c, this.iframeScriptOrigin = l, this.silent_redirect_uri = h, this.silentRequestTimeoutInSeconds = g, this.automaticSilentRenew = u, this.validateSubOnSilentRenew = S, this.includeIdTokenInSilentRenew = w, this.monitorSession = k, this.monitorAnonymousSession = _, this.checkSessionIntervalInSeconds = v, this.stopCheckSessionOnError = a, this.query_status_response_type = y, this.revokeTokenTypes = d, this.revokeTokensOnSignout = p, this.includeIdTokenInSilentSignout = m, this.accessTokenExpiringNotificationTimeInSeconds = b, E)
1977
1985
  this.userStore = E;
1978
1986
  else {
1979
- const x = typeof window < "u" ? window.sessionStorage : new fe();
1980
- this.userStore = new we({ store: x });
1987
+ const C = typeof window < "u" ? window.sessionStorage : new me();
1988
+ this.userStore = new ve({ store: C });
1981
1989
  }
1982
1990
  }
1983
- }, te = class extends Se {
1991
+ }, se = class extends be {
1984
1992
  constructor({
1985
- silentRequestTimeoutInSeconds: e = ke
1993
+ silentRequestTimeoutInSeconds: e = Ce
1986
1994
  }) {
1987
- super(), this._logger = new f("IFrameWindow"), this._timeoutInSeconds = e, this._frame = te.createHiddenIframe(), this._window = this._frame.contentWindow;
1995
+ super(), this._logger = new f("IFrameWindow"), this._timeoutInSeconds = e, this._frame = se.createHiddenIframe(), this._window = this._frame.contentWindow;
1988
1996
  }
1989
1997
  static createHiddenIframe() {
1990
1998
  const e = window.document.createElement("iframe");
@@ -1992,7 +2000,7 @@ var Be = "10000000-1000-4000-8000-100000000000", A = class {
1992
2000
  }
1993
2001
  async navigate(e) {
1994
2002
  this._logger.debug("navigate: Using timeout of:", this._timeoutInSeconds);
1995
- const t = setTimeout(() => this._abort.raise(new re("IFrame timed out without a response")), this._timeoutInSeconds * 1e3);
2003
+ const t = setTimeout(() => this._abort.raise(new ie("IFrame timed out without a response")), this._timeoutInSeconds * 1e3);
1996
2004
  return this._disposeHandlers.add(() => clearTimeout(t)), await super.navigate(e);
1997
2005
  }
1998
2006
  close() {
@@ -2006,33 +2014,33 @@ var Be = "10000000-1000-4000-8000-100000000000", A = class {
2006
2014
  static notifyParent(e, t) {
2007
2015
  return super._notifyParent(window.parent, e, !1, t);
2008
2016
  }
2009
- }, lt = class {
2017
+ }, _t = class {
2010
2018
  constructor(e) {
2011
2019
  this._settings = e, this._logger = new f("IFrameNavigator");
2012
2020
  }
2013
2021
  async prepare({
2014
2022
  silentRequestTimeoutInSeconds: e = this._settings.silentRequestTimeoutInSeconds
2015
2023
  }) {
2016
- return new te({ silentRequestTimeoutInSeconds: e });
2024
+ return new se({ silentRequestTimeoutInSeconds: e });
2017
2025
  }
2018
2026
  async callback(e) {
2019
- this._logger.create("callback"), te.notifyParent(e, this._settings.iframeNotifyParentOrigin);
2027
+ this._logger.create("callback"), se.notifyParent(e, this._settings.iframeNotifyParentOrigin);
2020
2028
  }
2021
- }, dt = 500, he = class extends Se {
2029
+ }, pt = 500, ge = class extends be {
2022
2030
  constructor({
2023
- popupWindowTarget: e = be,
2031
+ popupWindowTarget: e = Ee,
2024
2032
  popupWindowFeatures: t = {}
2025
2033
  }) {
2026
2034
  super(), this._logger = new f("PopupWindow");
2027
- const s = le.center({ ...ye, ...t });
2028
- this._window = window.open(void 0, e, le.serialize(s));
2035
+ const s = he.center({ ...ke, ...t });
2036
+ this._window = window.open(void 0, e, he.serialize(s));
2029
2037
  }
2030
2038
  async navigate(e) {
2031
2039
  var t;
2032
2040
  (t = this._window) == null || t.focus();
2033
2041
  const s = setInterval(() => {
2034
2042
  (!this._window || this._window.closed) && this._abort.raise(new Error("Popup closed by user"));
2035
- }, dt);
2043
+ }, pt);
2036
2044
  return this._disposeHandlers.add(() => clearInterval(s)), await super.navigate(e);
2037
2045
  }
2038
2046
  close() {
@@ -2043,7 +2051,7 @@ var Be = "10000000-1000-4000-8000-100000000000", A = class {
2043
2051
  throw new Error("No window.opener. Can't complete notification.");
2044
2052
  return super._notifyParent(window.opener, e, t);
2045
2053
  }
2046
- }, ht = class {
2054
+ }, ft = class {
2047
2055
  constructor(e) {
2048
2056
  this._settings = e, this._logger = new f("PopupNavigator");
2049
2057
  }
@@ -2051,12 +2059,12 @@ var Be = "10000000-1000-4000-8000-100000000000", A = class {
2051
2059
  popupWindowFeatures: e = this._settings.popupWindowFeatures,
2052
2060
  popupWindowTarget: t = this._settings.popupWindowTarget
2053
2061
  }) {
2054
- return new he({ popupWindowFeatures: e, popupWindowTarget: t });
2062
+ return new ge({ popupWindowFeatures: e, popupWindowTarget: t });
2055
2063
  }
2056
2064
  async callback(e, t = !1) {
2057
- this._logger.create("callback"), he.notifyOpener(e, t);
2065
+ this._logger.create("callback"), ge.notifyOpener(e, t);
2058
2066
  }
2059
- }, ut = class {
2067
+ }, wt = class {
2060
2068
  constructor(e) {
2061
2069
  this._settings = e, this._logger = new f("RedirectNavigator");
2062
2070
  }
@@ -2083,7 +2091,7 @@ var Be = "10000000-1000-4000-8000-100000000000", A = class {
2083
2091
  }
2084
2092
  };
2085
2093
  }
2086
- }, gt = class extends Fe {
2094
+ }, mt = class extends Je {
2087
2095
  constructor(e) {
2088
2096
  super({ expiringNotificationTimeInSeconds: e.accessTokenExpiringNotificationTimeInSeconds }), this._logger = new f("UserManagerEvents"), this._userLoaded = new O("User loaded"), this._userUnloaded = new O("User unloaded"), this._silentRenewError = new O("Silent renew error"), this._userSignedIn = new O("User signed in"), this._userSignedOut = new O("User signed out"), this._userSessionChanged = new O("User session changed");
2089
2097
  }
@@ -2192,14 +2200,14 @@ var Be = "10000000-1000-4000-8000-100000000000", A = class {
2192
2200
  _raiseUserSessionChanged() {
2193
2201
  this._userSessionChanged.raise();
2194
2202
  }
2195
- }, _t = class {
2203
+ }, vt = class {
2196
2204
  constructor(e) {
2197
2205
  this._userManager = e, this._logger = new f("SilentRenewService"), this._isStarted = !1, this._retryTimer = new T("Retry Silent Renew"), this._tokenExpiring = async () => {
2198
2206
  const t = this._logger.create("_tokenExpiring");
2199
2207
  try {
2200
2208
  await this._userManager.signinSilent(), t.debug("silent token renewal successful");
2201
2209
  } catch (s) {
2202
- if (s instanceof re) {
2210
+ if (s instanceof ie) {
2203
2211
  t.warn("ErrorTimeout from signinSilent:", s, "retry in 5s"), this._retryTimer.init(5);
2204
2212
  return;
2205
2213
  }
@@ -2221,13 +2229,13 @@ var Be = "10000000-1000-4000-8000-100000000000", A = class {
2221
2229
  stop() {
2222
2230
  this._isStarted && (this._retryTimer.cancel(), this._retryTimer.removeHandler(this._tokenExpiring), this._userManager.events.removeAccessTokenExpiring(this._tokenExpiring), this._isStarted = !1);
2223
2231
  }
2224
- }, pt = class {
2232
+ }, St = class {
2225
2233
  constructor(e) {
2226
2234
  this.refresh_token = e.refresh_token, this.id_token = e.id_token, this.session_state = e.session_state, this.scope = e.scope, this.profile = e.profile, this.data = e.state;
2227
2235
  }
2228
- }, xt = class {
2236
+ }, Ut = class {
2229
2237
  constructor(e) {
2230
- this._logger = new f("UserManager"), this.settings = new ct(e), this._client = new it(e), this._redirectNavigator = new ut(this.settings), this._popupNavigator = new ht(this.settings), this._iframeNavigator = new lt(this.settings), this._events = new gt(this.settings), this._silentRenewService = new _t(this), this.settings.automaticSilentRenew && this.startSilentRenew(), this._sessionMonitor = null, this.settings.monitorSession && (this._sessionMonitor = new nt(this));
2238
+ this._logger = new f("UserManager"), this.settings = new gt(e), this._client = new lt(e), this._redirectNavigator = new wt(this.settings), this._popupNavigator = new ft(this.settings), this._iframeNavigator = new _t(this.settings), this._events = new mt(this.settings), this._silentRenewService = new vt(this), this.settings.automaticSilentRenew && this.startSilentRenew(), this._sessionMonitor = null, this.settings.monitorSession && (this._sessionMonitor = new dt(this));
2231
2239
  }
2232
2240
  /** Returns an object used to register for events raised by the `UserManager`. */
2233
2241
  get events() {
@@ -2325,7 +2333,7 @@ var Be = "10000000-1000-4000-8000-100000000000", A = class {
2325
2333
  let n = await this._loadUser();
2326
2334
  if (n != null && n.refresh_token) {
2327
2335
  s.debug("using refresh token");
2328
- const h = new pt(n);
2336
+ const h = new St(n);
2329
2337
  return await this._useRefreshToken(h);
2330
2338
  }
2331
2339
  const o = this.settings.silent_redirect_uri;
@@ -2345,7 +2353,7 @@ var Be = "10000000-1000-4000-8000-100000000000", A = class {
2345
2353
  const t = await this._client.useRefreshToken({
2346
2354
  state: e,
2347
2355
  timeoutInSeconds: this.settings.silentRequestTimeoutInSeconds
2348
- }), s = new F({ ...e, ...t });
2356
+ }), s = new B({ ...e, ...t });
2349
2357
  return await this.storeUser(s), this._events.load(s), s;
2350
2358
  }
2351
2359
  /**
@@ -2450,7 +2458,7 @@ var Be = "10000000-1000-4000-8000-100000000000", A = class {
2450
2458
  return s.debug("got signin response"), await this._buildUser(r, t);
2451
2459
  }
2452
2460
  async _buildUser(e, t) {
2453
- const s = this._logger.create("_buildUser"), r = new F(e);
2461
+ const s = this._logger.create("_buildUser"), r = new B(e);
2454
2462
  if (t) {
2455
2463
  if (t !== r.profile.sub)
2456
2464
  throw s.debug("current user does not match user returned from signin. sub from signin:", r.profile.sub), new j({ ...e, error: "login_required" });
@@ -2593,7 +2601,7 @@ var Be = "10000000-1000-4000-8000-100000000000", A = class {
2593
2601
  }
2594
2602
  async _loadUser() {
2595
2603
  const e = this._logger.create("_loadUser"), t = await this.settings.userStore.get(this._userStoreKey);
2596
- return t ? (e.debug("user storageString loaded"), F.fromStorageString(t)) : (e.debug("no user storageString"), null);
2604
+ return t ? (e.debug("user storageString loaded"), B.fromStorageString(t)) : (e.debug("no user storageString"), null);
2597
2605
  }
2598
2606
  async storeUser(e) {
2599
2607
  const t = this._logger.create("storeUser");
@@ -2610,45 +2618,45 @@ var Be = "10000000-1000-4000-8000-100000000000", A = class {
2610
2618
  async clearStaleState() {
2611
2619
  await this._client.clearStaleState();
2612
2620
  }
2613
- }, ft = "2.2.2", Ct = ft;
2614
- const Ee = ue(
2621
+ }, yt = "2.2.2", At = yt;
2622
+ const xe = _e(
2615
2623
  null
2616
- ), wt = () => {
2617
- const e = ge(Ee);
2624
+ ), bt = () => {
2625
+ const e = pe(xe);
2618
2626
  if (!e)
2619
2627
  throw new Error(
2620
2628
  "useImpersonationContext must be used within a ImpersonationContextProvider"
2621
2629
  );
2622
2630
  return e;
2623
- }, Rt = ({
2631
+ }, Pt = ({
2624
2632
  children: e
2625
2633
  }) => {
2626
- const [t, s] = Re("impersonationState", {
2634
+ const [t, s] = Ie("impersonationState", {
2627
2635
  defaultValue: {}
2628
- }), r = _e(() => ({
2636
+ }), r = fe(() => ({
2629
2637
  accessToken: t == null ? void 0 : t.accessToken,
2630
2638
  userInfo: t == null ? void 0 : t.userInfo,
2631
2639
  setImpersonation: (i, n) => {
2632
2640
  s({ accessToken: i, userInfo: n });
2633
2641
  }
2634
2642
  }), []);
2635
- return /* @__PURE__ */ se.jsx(Ee.Provider, { value: r, children: e });
2636
- }, mt = (e) => {
2643
+ return /* @__PURE__ */ re.jsx(xe.Provider, { value: r, children: e });
2644
+ }, kt = (e) => {
2637
2645
  const s = e.split(".")[1].replace(/-/g, "+").replace(/_/g, "/"), r = atob(s);
2638
2646
  return JSON.parse(r);
2639
- }, Tt = (e) => {
2640
- const { setImpersonation: t } = wt();
2641
- L(() => {
2647
+ }, Ot = (e) => {
2648
+ const { setImpersonation: t } = bt();
2649
+ F(() => {
2642
2650
  const { search: s } = window.location, r = new URLSearchParams(s).get(
2643
2651
  "impersonateAccessToken"
2644
2652
  );
2645
2653
  if (r && t) {
2646
- const i = mt(r);
2654
+ const i = kt(r);
2647
2655
  t(r, i), e();
2648
2656
  }
2649
2657
  }, []);
2650
2658
  };
2651
- function It(e) {
2659
+ function qt(e) {
2652
2660
  return JSON.parse(e).map((r) => {
2653
2661
  const [
2654
2662
  i,
@@ -2666,19 +2674,19 @@ function It(e) {
2666
2674
  };
2667
2675
  });
2668
2676
  }
2669
- const vt = ({
2677
+ const Et = ({
2670
2678
  userManager: e,
2671
2679
  context: t,
2672
2680
  children: s
2673
2681
  }) => {
2674
- const [r, i] = Ce({
2682
+ const [r, i] = Te({
2675
2683
  user: null,
2676
2684
  isLoading: !0,
2677
2685
  isAuthenticated: !1,
2678
2686
  isError: !1,
2679
2687
  error: null
2680
- }), n = pe(!1);
2681
- L(() => {
2688
+ }), n = we(!1);
2689
+ F(() => {
2682
2690
  n.current || (n.current = !0, (async () => {
2683
2691
  try {
2684
2692
  const h = await e.getUser();
@@ -2699,7 +2707,7 @@ const vt = ({
2699
2707
  });
2700
2708
  }
2701
2709
  })());
2702
- }, [e]), L(() => {
2710
+ }, [e]), F(() => {
2703
2711
  const h = (S) => {
2704
2712
  i({
2705
2713
  user: S,
@@ -2730,7 +2738,7 @@ const vt = ({
2730
2738
  e.events.removeUserLoaded(h), e.events.removeUserUnloaded(g), e.events.removeSilentRenewError(u);
2731
2739
  };
2732
2740
  }, [e]);
2733
- const o = ae(async () => {
2741
+ const o = ce(async () => {
2734
2742
  const h = await e.signinCallback();
2735
2743
  return i({
2736
2744
  user: h ?? null,
@@ -2739,7 +2747,7 @@ const vt = ({
2739
2747
  isError: !1,
2740
2748
  error: null
2741
2749
  }), h ?? void 0;
2742
- }, [e]), c = ae(
2750
+ }, [e]), c = ce(
2743
2751
  async (h) => {
2744
2752
  try {
2745
2753
  await e.signinRedirect(h);
@@ -2748,7 +2756,7 @@ const vt = ({
2748
2756
  }
2749
2757
  },
2750
2758
  [e]
2751
- ), l = _e(
2759
+ ), l = fe(
2752
2760
  () => ({
2753
2761
  state: r,
2754
2762
  handleSigninCallback: o,
@@ -2756,32 +2764,32 @@ const vt = ({
2756
2764
  }),
2757
2765
  [r, o, c]
2758
2766
  );
2759
- return /* @__PURE__ */ se.jsx(t.Provider, { value: l, children: s });
2760
- }, oe = (e) => {
2761
- const t = ge(e);
2767
+ return /* @__PURE__ */ re.jsx(t.Provider, { value: l, children: s });
2768
+ }, ae = (e) => {
2769
+ const t = pe(e);
2762
2770
  if (!t)
2763
2771
  throw new Error("useAuthContext must be used within an AuthProvider");
2764
2772
  return t;
2765
- }, St = (e) => {
2766
- const { state: t } = oe(e);
2773
+ }, Ct = (e) => {
2774
+ const { state: t } = ae(e);
2767
2775
  return t;
2768
- }, yt = (e, t) => {
2769
- const { state: s, handleSigninCallback: r } = oe(e), i = pe(!1);
2770
- return L(() => {
2776
+ }, xt = (e, t) => {
2777
+ const { state: s, handleSigninCallback: r } = ae(e), i = we(!1);
2778
+ return F(() => {
2771
2779
  i.current || (i.current = !0, r().then(
2772
2780
  (n) => new Promise(
2773
2781
  (o) => setTimeout(() => o(n), 0)
2774
2782
  )
2775
2783
  ).then((n) => t == null ? void 0 : t(n)));
2776
2784
  }, [r]), s;
2777
- }, Ut = (e) => {
2778
- const t = ue(null);
2785
+ }, Nt = (e) => {
2786
+ const t = _e(null);
2779
2787
  return {
2780
2788
  AuthContext: t,
2781
- AuthProvider: ({ children: c }) => /* @__PURE__ */ se.jsx(vt, { userManager: e, context: t, children: c }),
2782
- useAuthContext: () => oe(t),
2783
- useAuthState: () => St(t),
2784
- useSigninCallback: (c) => yt(t, c),
2789
+ AuthProvider: ({ children: c }) => /* @__PURE__ */ re.jsx(Et, { userManager: e, context: t, children: c }),
2790
+ useAuthContext: () => ae(t),
2791
+ useAuthState: () => Ct(t),
2792
+ useSigninCallback: (c) => xt(t, c),
2785
2793
  getAccessToken: async () => {
2786
2794
  const c = await e.getUser();
2787
2795
  return c ? c.access_token : null;
@@ -2789,29 +2797,29 @@ const vt = ({
2789
2797
  };
2790
2798
  };
2791
2799
  export {
2792
- Fe as AccessTokenEvents,
2793
- Le as CheckSessionIFrame,
2800
+ Je as AccessTokenEvents,
2801
+ Ke as CheckSessionIFrame,
2794
2802
  j as ErrorResponse,
2795
- re as ErrorTimeout,
2796
- Rt as ImpersonationContextProvider,
2797
- fe as InMemoryWebStorage,
2803
+ ie as ErrorTimeout,
2804
+ Pt as ImpersonationContextProvider,
2805
+ me as InMemoryWebStorage,
2798
2806
  D as Log,
2799
2807
  f as Logger,
2800
- $e as MetadataService,
2801
- it as OidcClient,
2802
- me as OidcClientSettingsStore,
2803
- nt as SessionMonitor,
2804
- G as SigninResponse,
2805
- ne as SigninState,
2806
- rt as SignoutResponse,
2808
+ Ve as MetadataService,
2809
+ lt as OidcClient,
2810
+ Se as OidcClientSettingsStore,
2811
+ dt as SessionMonitor,
2812
+ Q as SigninResponse,
2813
+ oe as SigninState,
2814
+ ct as SignoutResponse,
2807
2815
  M as State,
2808
- F as User,
2809
- xt as UserManager,
2810
- ct as UserManagerSettingsStore,
2811
- Ct as Version,
2812
- we as WebStorageStateStore,
2813
- Ut as createAuthContext,
2814
- It as parseUserProfileFCString,
2815
- Tt as useImpersonationCallback,
2816
- wt as useImpersonationContext
2816
+ B as User,
2817
+ Ut as UserManager,
2818
+ gt as UserManagerSettingsStore,
2819
+ At as Version,
2820
+ ve as WebStorageStateStore,
2821
+ Nt as createAuthContext,
2822
+ qt as parseUserProfileFCString,
2823
+ Ot as useImpersonationCallback,
2824
+ bt as useImpersonationContext
2817
2825
  };