@fluxo-dev/api-client-base 25.1.11 → 25.2.1
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/index.cjs.js
CHANGED
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
var axios = require('axios');
|
|
4
4
|
var state = require('@fluxo-dev/state');
|
|
5
5
|
var jsxRuntime = require('react/jsx-runtime');
|
|
6
|
-
var React = require('react');
|
|
7
6
|
|
|
8
7
|
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
9
8
|
|
|
@@ -25,7 +24,7 @@ var global$k =
|
|
|
25
24
|
|
|
26
25
|
var objectGetOwnPropertyDescriptor = {};
|
|
27
26
|
|
|
28
|
-
var fails$
|
|
27
|
+
var fails$j = function (exec) {
|
|
29
28
|
try {
|
|
30
29
|
return !!exec();
|
|
31
30
|
} catch (error) {
|
|
@@ -33,17 +32,17 @@ var fails$i = function (exec) {
|
|
|
33
32
|
}
|
|
34
33
|
};
|
|
35
34
|
|
|
36
|
-
var fails$
|
|
35
|
+
var fails$i = fails$j;
|
|
37
36
|
|
|
38
37
|
// Detect IE8's incomplete defineProperty implementation
|
|
39
|
-
var descriptors = !fails$
|
|
38
|
+
var descriptors = !fails$i(function () {
|
|
40
39
|
// eslint-disable-next-line es/no-object-defineproperty -- required for testing
|
|
41
40
|
return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] !== 7;
|
|
42
41
|
});
|
|
43
42
|
|
|
44
|
-
var fails$
|
|
43
|
+
var fails$h = fails$j;
|
|
45
44
|
|
|
46
|
-
var functionBindNative = !fails$
|
|
45
|
+
var functionBindNative = !fails$h(function () {
|
|
47
46
|
// eslint-disable-next-line es/no-function-prototype-bind -- safe
|
|
48
47
|
var test = (function () { /* empty */ }).bind();
|
|
49
48
|
// eslint-disable-next-line no-prototype-builtins -- safe
|
|
@@ -52,10 +51,10 @@ var functionBindNative = !fails$g(function () {
|
|
|
52
51
|
|
|
53
52
|
var NATIVE_BIND$3 = functionBindNative;
|
|
54
53
|
|
|
55
|
-
var call$
|
|
54
|
+
var call$h = Function.prototype.call;
|
|
56
55
|
|
|
57
|
-
var functionCall = NATIVE_BIND$3 ? call$
|
|
58
|
-
return call$
|
|
56
|
+
var functionCall = NATIVE_BIND$3 ? call$h.bind(call$h) : function () {
|
|
57
|
+
return call$h.apply(call$h, arguments);
|
|
59
58
|
};
|
|
60
59
|
|
|
61
60
|
var objectPropertyIsEnumerable = {};
|
|
@@ -86,12 +85,12 @@ var createPropertyDescriptor$4 = function (bitmap, value) {
|
|
|
86
85
|
var NATIVE_BIND$2 = functionBindNative;
|
|
87
86
|
|
|
88
87
|
var FunctionPrototype$2 = Function.prototype;
|
|
89
|
-
var call$
|
|
90
|
-
var uncurryThisWithBind = NATIVE_BIND$2 && FunctionPrototype$2.bind.bind(call$
|
|
88
|
+
var call$g = FunctionPrototype$2.call;
|
|
89
|
+
var uncurryThisWithBind = NATIVE_BIND$2 && FunctionPrototype$2.bind.bind(call$g, call$g);
|
|
91
90
|
|
|
92
91
|
var functionUncurryThis = NATIVE_BIND$2 ? uncurryThisWithBind : function (fn) {
|
|
93
92
|
return function () {
|
|
94
|
-
return call$
|
|
93
|
+
return call$g.apply(fn, arguments);
|
|
95
94
|
};
|
|
96
95
|
};
|
|
97
96
|
|
|
@@ -105,14 +104,14 @@ var classofRaw$2 = function (it) {
|
|
|
105
104
|
};
|
|
106
105
|
|
|
107
106
|
var uncurryThis$i = functionUncurryThis;
|
|
108
|
-
var fails$
|
|
107
|
+
var fails$g = fails$j;
|
|
109
108
|
var classof$8 = classofRaw$2;
|
|
110
109
|
|
|
111
110
|
var $Object$4 = Object;
|
|
112
111
|
var split = uncurryThis$i(''.split);
|
|
113
112
|
|
|
114
113
|
// fallback for non-array-like ES3 and non-enumerable old V8 strings
|
|
115
|
-
var indexedObject = fails$
|
|
114
|
+
var indexedObject = fails$g(function () {
|
|
116
115
|
// throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
|
|
117
116
|
// eslint-disable-next-line no-prototype-builtins -- safe
|
|
118
117
|
return !$Object$4('z').propertyIsEnumerable(0);
|
|
@@ -210,13 +209,13 @@ var engineV8Version = version;
|
|
|
210
209
|
|
|
211
210
|
/* eslint-disable es/no-symbol -- required for testing */
|
|
212
211
|
var V8_VERSION$1 = engineV8Version;
|
|
213
|
-
var fails$
|
|
212
|
+
var fails$f = fails$j;
|
|
214
213
|
var global$h = global$k;
|
|
215
214
|
|
|
216
215
|
var $String$6 = global$h.String;
|
|
217
216
|
|
|
218
217
|
// eslint-disable-next-line es/no-object-getownpropertysymbols -- required for testing
|
|
219
|
-
var symbolConstructorDetection = !!Object.getOwnPropertySymbols && !fails$
|
|
218
|
+
var symbolConstructorDetection = !!Object.getOwnPropertySymbols && !fails$f(function () {
|
|
220
219
|
var symbol = Symbol('symbol detection');
|
|
221
220
|
// Chrome 38 Symbol has incorrect toString conversion
|
|
222
221
|
// `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances
|
|
@@ -236,7 +235,7 @@ var useSymbolAsUid = NATIVE_SYMBOL$3
|
|
|
236
235
|
|
|
237
236
|
var getBuiltIn$8 = getBuiltIn$9;
|
|
238
237
|
var isCallable$k = isCallable$n;
|
|
239
|
-
var isPrototypeOf$
|
|
238
|
+
var isPrototypeOf$5 = objectIsPrototypeOf;
|
|
240
239
|
var USE_SYMBOL_AS_UID$1 = useSymbolAsUid;
|
|
241
240
|
|
|
242
241
|
var $Object$3 = Object;
|
|
@@ -245,7 +244,7 @@ var isSymbol$3 = USE_SYMBOL_AS_UID$1 ? function (it) {
|
|
|
245
244
|
return typeof it == 'symbol';
|
|
246
245
|
} : function (it) {
|
|
247
246
|
var $Symbol = getBuiltIn$8('Symbol');
|
|
248
|
-
return isCallable$k($Symbol) && isPrototypeOf$
|
|
247
|
+
return isCallable$k($Symbol) && isPrototypeOf$5($Symbol.prototype, $Object$3(it));
|
|
249
248
|
};
|
|
250
249
|
|
|
251
250
|
var $String$5 = String;
|
|
@@ -279,7 +278,7 @@ var getMethod$4 = function (V, P) {
|
|
|
279
278
|
return isNullOrUndefined$2(func) ? undefined : aCallable$c(func);
|
|
280
279
|
};
|
|
281
280
|
|
|
282
|
-
var call$
|
|
281
|
+
var call$f = functionCall;
|
|
283
282
|
var isCallable$i = isCallable$n;
|
|
284
283
|
var isObject$d = isObject$e;
|
|
285
284
|
|
|
@@ -289,9 +288,9 @@ var $TypeError$e = TypeError;
|
|
|
289
288
|
// https://tc39.es/ecma262/#sec-ordinarytoprimitive
|
|
290
289
|
var ordinaryToPrimitive$1 = function (input, pref) {
|
|
291
290
|
var fn, val;
|
|
292
|
-
if (pref === 'string' && isCallable$i(fn = input.toString) && !isObject$d(val = call$
|
|
293
|
-
if (isCallable$i(fn = input.valueOf) && !isObject$d(val = call$
|
|
294
|
-
if (pref !== 'string' && isCallable$i(fn = input.toString) && !isObject$d(val = call$
|
|
291
|
+
if (pref === 'string' && isCallable$i(fn = input.toString) && !isObject$d(val = call$f(fn, input))) return val;
|
|
292
|
+
if (isCallable$i(fn = input.valueOf) && !isObject$d(val = call$f(fn, input))) return val;
|
|
293
|
+
if (pref !== 'string' && isCallable$i(fn = input.toString) && !isObject$d(val = call$f(fn, input))) return val;
|
|
295
294
|
throw new $TypeError$e("Can't convert object to primitive value");
|
|
296
295
|
};
|
|
297
296
|
|
|
@@ -368,7 +367,7 @@ var uid$2 = function (key) {
|
|
|
368
367
|
|
|
369
368
|
var global$f = global$k;
|
|
370
369
|
var shared$2 = shared$3;
|
|
371
|
-
var hasOwn$
|
|
370
|
+
var hasOwn$d = hasOwnProperty_1;
|
|
372
371
|
var uid$1 = uid$2;
|
|
373
372
|
var NATIVE_SYMBOL$2 = symbolConstructorDetection;
|
|
374
373
|
var USE_SYMBOL_AS_UID = useSymbolAsUid;
|
|
@@ -378,14 +377,14 @@ var WellKnownSymbolsStore = shared$2('wks');
|
|
|
378
377
|
var createWellKnownSymbol = USE_SYMBOL_AS_UID ? Symbol$1['for'] || Symbol$1 : Symbol$1 && Symbol$1.withoutSetter || uid$1;
|
|
379
378
|
|
|
380
379
|
var wellKnownSymbol$h = function (name) {
|
|
381
|
-
if (!hasOwn$
|
|
382
|
-
WellKnownSymbolsStore[name] = NATIVE_SYMBOL$2 && hasOwn$
|
|
380
|
+
if (!hasOwn$d(WellKnownSymbolsStore, name)) {
|
|
381
|
+
WellKnownSymbolsStore[name] = NATIVE_SYMBOL$2 && hasOwn$d(Symbol$1, name)
|
|
383
382
|
? Symbol$1[name]
|
|
384
383
|
: createWellKnownSymbol('Symbol.' + name);
|
|
385
384
|
} return WellKnownSymbolsStore[name];
|
|
386
385
|
};
|
|
387
386
|
|
|
388
|
-
var call$
|
|
387
|
+
var call$e = functionCall;
|
|
389
388
|
var isObject$c = isObject$e;
|
|
390
389
|
var isSymbol$2 = isSymbol$3;
|
|
391
390
|
var getMethod$3 = getMethod$4;
|
|
@@ -403,7 +402,7 @@ var toPrimitive$1 = function (input, pref) {
|
|
|
403
402
|
var result;
|
|
404
403
|
if (exoticToPrim) {
|
|
405
404
|
if (pref === undefined) pref = 'default';
|
|
406
|
-
result = call$
|
|
405
|
+
result = call$e(exoticToPrim, input, pref);
|
|
407
406
|
if (!isObject$c(result) || isSymbol$2(result)) return result;
|
|
408
407
|
throw new $TypeError$d("Can't convert object to primitive value");
|
|
409
408
|
}
|
|
@@ -433,11 +432,11 @@ var documentCreateElement$1 = function (it) {
|
|
|
433
432
|
};
|
|
434
433
|
|
|
435
434
|
var DESCRIPTORS$f = descriptors;
|
|
436
|
-
var fails$
|
|
435
|
+
var fails$e = fails$j;
|
|
437
436
|
var createElement$1 = documentCreateElement$1;
|
|
438
437
|
|
|
439
438
|
// Thanks to IE8 for its funny defineProperty
|
|
440
|
-
var ie8DomDefine = !DESCRIPTORS$f && !fails$
|
|
439
|
+
var ie8DomDefine = !DESCRIPTORS$f && !fails$e(function () {
|
|
441
440
|
// eslint-disable-next-line es/no-object-defineproperty -- required for testing
|
|
442
441
|
return Object.defineProperty(createElement$1('div'), 'a', {
|
|
443
442
|
get: function () { return 7; }
|
|
@@ -445,12 +444,12 @@ var ie8DomDefine = !DESCRIPTORS$f && !fails$d(function () {
|
|
|
445
444
|
});
|
|
446
445
|
|
|
447
446
|
var DESCRIPTORS$e = descriptors;
|
|
448
|
-
var call$
|
|
447
|
+
var call$d = functionCall;
|
|
449
448
|
var propertyIsEnumerableModule$1 = objectPropertyIsEnumerable;
|
|
450
449
|
var createPropertyDescriptor$3 = createPropertyDescriptor$4;
|
|
451
450
|
var toIndexedObject$3 = toIndexedObject$4;
|
|
452
451
|
var toPropertyKey$1 = toPropertyKey$2;
|
|
453
|
-
var hasOwn$
|
|
452
|
+
var hasOwn$c = hasOwnProperty_1;
|
|
454
453
|
var IE8_DOM_DEFINE$1 = ie8DomDefine;
|
|
455
454
|
|
|
456
455
|
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
|
|
@@ -464,17 +463,17 @@ objectGetOwnPropertyDescriptor.f = DESCRIPTORS$e ? $getOwnPropertyDescriptor$1 :
|
|
|
464
463
|
if (IE8_DOM_DEFINE$1) try {
|
|
465
464
|
return $getOwnPropertyDescriptor$1(O, P);
|
|
466
465
|
} catch (error) { /* empty */ }
|
|
467
|
-
if (hasOwn$
|
|
466
|
+
if (hasOwn$c(O, P)) return createPropertyDescriptor$3(!call$d(propertyIsEnumerableModule$1.f, O, P), O[P]);
|
|
468
467
|
};
|
|
469
468
|
|
|
470
469
|
var objectDefineProperty = {};
|
|
471
470
|
|
|
472
471
|
var DESCRIPTORS$d = descriptors;
|
|
473
|
-
var fails$
|
|
472
|
+
var fails$d = fails$j;
|
|
474
473
|
|
|
475
474
|
// V8 ~ Chrome 36-
|
|
476
475
|
// https://bugs.chromium.org/p/v8/issues/detail?id=3334
|
|
477
|
-
var v8PrototypeDefineBug = DESCRIPTORS$d && fails$
|
|
476
|
+
var v8PrototypeDefineBug = DESCRIPTORS$d && fails$d(function () {
|
|
478
477
|
// eslint-disable-next-line es/no-object-defineproperty -- required for testing
|
|
479
478
|
return Object.defineProperty(function () { /* empty */ }, 'prototype', {
|
|
480
479
|
value: 42,
|
|
@@ -488,7 +487,7 @@ var $String$4 = String;
|
|
|
488
487
|
var $TypeError$c = TypeError;
|
|
489
488
|
|
|
490
489
|
// `Assert: Type(argument) is Object`
|
|
491
|
-
var anObject$
|
|
490
|
+
var anObject$i = function (argument) {
|
|
492
491
|
if (isObject$a(argument)) return argument;
|
|
493
492
|
throw new $TypeError$c($String$4(argument) + ' is not an object');
|
|
494
493
|
};
|
|
@@ -496,7 +495,7 @@ var anObject$g = function (argument) {
|
|
|
496
495
|
var DESCRIPTORS$c = descriptors;
|
|
497
496
|
var IE8_DOM_DEFINE = ie8DomDefine;
|
|
498
497
|
var V8_PROTOTYPE_DEFINE_BUG$1 = v8PrototypeDefineBug;
|
|
499
|
-
var anObject$
|
|
498
|
+
var anObject$h = anObject$i;
|
|
500
499
|
var toPropertyKey = toPropertyKey$2;
|
|
501
500
|
|
|
502
501
|
var $TypeError$b = TypeError;
|
|
@@ -511,9 +510,9 @@ var WRITABLE = 'writable';
|
|
|
511
510
|
// `Object.defineProperty` method
|
|
512
511
|
// https://tc39.es/ecma262/#sec-object.defineproperty
|
|
513
512
|
objectDefineProperty.f = DESCRIPTORS$c ? V8_PROTOTYPE_DEFINE_BUG$1 ? function defineProperty(O, P, Attributes) {
|
|
514
|
-
anObject$
|
|
513
|
+
anObject$h(O);
|
|
515
514
|
P = toPropertyKey(P);
|
|
516
|
-
anObject$
|
|
515
|
+
anObject$h(Attributes);
|
|
517
516
|
if (typeof O === 'function' && P === 'prototype' && 'value' in Attributes && WRITABLE in Attributes && !Attributes[WRITABLE]) {
|
|
518
517
|
var current = $getOwnPropertyDescriptor(O, P);
|
|
519
518
|
if (current && current[WRITABLE]) {
|
|
@@ -526,9 +525,9 @@ objectDefineProperty.f = DESCRIPTORS$c ? V8_PROTOTYPE_DEFINE_BUG$1 ? function de
|
|
|
526
525
|
}
|
|
527
526
|
} return $defineProperty(O, P, Attributes);
|
|
528
527
|
} : $defineProperty : function defineProperty(O, P, Attributes) {
|
|
529
|
-
anObject$
|
|
528
|
+
anObject$h(O);
|
|
530
529
|
P = toPropertyKey(P);
|
|
531
|
-
anObject$
|
|
530
|
+
anObject$h(Attributes);
|
|
532
531
|
if (IE8_DOM_DEFINE) try {
|
|
533
532
|
return $defineProperty(O, P, Attributes);
|
|
534
533
|
} catch (error) { /* empty */ }
|
|
@@ -551,16 +550,19 @@ var createNonEnumerableProperty$6 = DESCRIPTORS$b ? function (object, key, value
|
|
|
551
550
|
var makeBuiltIn$3 = {exports: {}};
|
|
552
551
|
|
|
553
552
|
var DESCRIPTORS$a = descriptors;
|
|
554
|
-
var hasOwn$
|
|
553
|
+
var hasOwn$b = hasOwnProperty_1;
|
|
555
554
|
|
|
556
555
|
var FunctionPrototype$1 = Function.prototype;
|
|
557
556
|
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
|
|
558
557
|
var getDescriptor = DESCRIPTORS$a && Object.getOwnPropertyDescriptor;
|
|
559
558
|
|
|
560
|
-
var EXISTS = hasOwn$
|
|
559
|
+
var EXISTS = hasOwn$b(FunctionPrototype$1, 'name');
|
|
560
|
+
// additional protection from minified / mangled / dropped function names
|
|
561
|
+
var PROPER = EXISTS && (function something() { /* empty */ }).name === 'something';
|
|
561
562
|
var CONFIGURABLE = EXISTS && (!DESCRIPTORS$a || (DESCRIPTORS$a && getDescriptor(FunctionPrototype$1, 'name').configurable));
|
|
562
563
|
|
|
563
564
|
var functionName = {
|
|
565
|
+
PROPER: PROPER,
|
|
564
566
|
CONFIGURABLE: CONFIGURABLE
|
|
565
567
|
};
|
|
566
568
|
|
|
@@ -601,7 +603,7 @@ var NATIVE_WEAK_MAP = weakMapBasicDetection;
|
|
|
601
603
|
var global$c = global$k;
|
|
602
604
|
var isObject$9 = isObject$e;
|
|
603
605
|
var createNonEnumerableProperty$5 = createNonEnumerableProperty$6;
|
|
604
|
-
var hasOwn$
|
|
606
|
+
var hasOwn$a = hasOwnProperty_1;
|
|
605
607
|
var shared = sharedStoreExports;
|
|
606
608
|
var sharedKey$2 = sharedKey$3;
|
|
607
609
|
var hiddenKeys$3 = hiddenKeys$4;
|
|
@@ -647,16 +649,16 @@ if (NATIVE_WEAK_MAP || shared.state) {
|
|
|
647
649
|
var STATE = sharedKey$2('state');
|
|
648
650
|
hiddenKeys$3[STATE] = true;
|
|
649
651
|
set$1 = function (it, metadata) {
|
|
650
|
-
if (hasOwn$
|
|
652
|
+
if (hasOwn$a(it, STATE)) throw new TypeError$2(OBJECT_ALREADY_INITIALIZED);
|
|
651
653
|
metadata.facade = it;
|
|
652
654
|
createNonEnumerableProperty$5(it, STATE, metadata);
|
|
653
655
|
return metadata;
|
|
654
656
|
};
|
|
655
657
|
get = function (it) {
|
|
656
|
-
return hasOwn$
|
|
658
|
+
return hasOwn$a(it, STATE) ? it[STATE] : {};
|
|
657
659
|
};
|
|
658
660
|
has = function (it) {
|
|
659
|
-
return hasOwn$
|
|
661
|
+
return hasOwn$a(it, STATE);
|
|
660
662
|
};
|
|
661
663
|
}
|
|
662
664
|
|
|
@@ -669,9 +671,9 @@ var internalState = {
|
|
|
669
671
|
};
|
|
670
672
|
|
|
671
673
|
var uncurryThis$d = functionUncurryThis;
|
|
672
|
-
var fails$
|
|
674
|
+
var fails$c = fails$j;
|
|
673
675
|
var isCallable$f = isCallable$n;
|
|
674
|
-
var hasOwn$
|
|
676
|
+
var hasOwn$9 = hasOwnProperty_1;
|
|
675
677
|
var DESCRIPTORS$9 = descriptors;
|
|
676
678
|
var CONFIGURABLE_FUNCTION_NAME = functionName.CONFIGURABLE;
|
|
677
679
|
var inspectSource$2 = inspectSource$3;
|
|
@@ -686,7 +688,7 @@ var stringSlice$1 = uncurryThis$d(''.slice);
|
|
|
686
688
|
var replace$3 = uncurryThis$d(''.replace);
|
|
687
689
|
var join = uncurryThis$d([].join);
|
|
688
690
|
|
|
689
|
-
var CONFIGURABLE_LENGTH = DESCRIPTORS$9 && !fails$
|
|
691
|
+
var CONFIGURABLE_LENGTH = DESCRIPTORS$9 && !fails$c(function () {
|
|
690
692
|
return defineProperty$5(function () { /* empty */ }, 'length', { value: 8 }).length !== 8;
|
|
691
693
|
});
|
|
692
694
|
|
|
@@ -698,21 +700,21 @@ var makeBuiltIn$2 = makeBuiltIn$3.exports = function (value, name, options) {
|
|
|
698
700
|
}
|
|
699
701
|
if (options && options.getter) name = 'get ' + name;
|
|
700
702
|
if (options && options.setter) name = 'set ' + name;
|
|
701
|
-
if (!hasOwn$
|
|
703
|
+
if (!hasOwn$9(value, 'name') || (CONFIGURABLE_FUNCTION_NAME && value.name !== name)) {
|
|
702
704
|
if (DESCRIPTORS$9) defineProperty$5(value, 'name', { value: name, configurable: true });
|
|
703
705
|
else value.name = name;
|
|
704
706
|
}
|
|
705
|
-
if (CONFIGURABLE_LENGTH && options && hasOwn$
|
|
707
|
+
if (CONFIGURABLE_LENGTH && options && hasOwn$9(options, 'arity') && value.length !== options.arity) {
|
|
706
708
|
defineProperty$5(value, 'length', { value: options.arity });
|
|
707
709
|
}
|
|
708
710
|
try {
|
|
709
|
-
if (options && hasOwn$
|
|
711
|
+
if (options && hasOwn$9(options, 'constructor') && options.constructor) {
|
|
710
712
|
if (DESCRIPTORS$9) defineProperty$5(value, 'prototype', { writable: false });
|
|
711
713
|
// in V8 ~ Chrome 53, prototypes of some methods, like `Array.prototype.values`, are non-writable
|
|
712
714
|
} else if (value.prototype) value.prototype = undefined;
|
|
713
715
|
} catch (error) { /* empty */ }
|
|
714
716
|
var state = enforceInternalState(value);
|
|
715
|
-
if (!hasOwn$
|
|
717
|
+
if (!hasOwn$9(state, 'source')) {
|
|
716
718
|
state.source = join(TEMPLATE, typeof name == 'string' ? name : '');
|
|
717
719
|
} return value;
|
|
718
720
|
};
|
|
@@ -730,7 +732,7 @@ var definePropertyModule$3 = objectDefineProperty;
|
|
|
730
732
|
var makeBuiltIn$1 = makeBuiltInExports;
|
|
731
733
|
var defineGlobalProperty$1 = defineGlobalProperty$3;
|
|
732
734
|
|
|
733
|
-
var defineBuiltIn$
|
|
735
|
+
var defineBuiltIn$6 = function (O, key, value, options) {
|
|
734
736
|
if (!options) options = {};
|
|
735
737
|
var simple = options.enumerable;
|
|
736
738
|
var name = options.name !== undefined ? options.name : key;
|
|
@@ -843,7 +845,7 @@ var arrayIncludes = {
|
|
|
843
845
|
};
|
|
844
846
|
|
|
845
847
|
var uncurryThis$c = functionUncurryThis;
|
|
846
|
-
var hasOwn$
|
|
848
|
+
var hasOwn$8 = hasOwnProperty_1;
|
|
847
849
|
var toIndexedObject$1 = toIndexedObject$4;
|
|
848
850
|
var indexOf = arrayIncludes.indexOf;
|
|
849
851
|
var hiddenKeys$2 = hiddenKeys$4;
|
|
@@ -855,9 +857,9 @@ var objectKeysInternal = function (object, names) {
|
|
|
855
857
|
var i = 0;
|
|
856
858
|
var result = [];
|
|
857
859
|
var key;
|
|
858
|
-
for (key in O) !hasOwn$
|
|
860
|
+
for (key in O) !hasOwn$8(hiddenKeys$2, key) && hasOwn$8(O, key) && push$1(result, key);
|
|
859
861
|
// Don't enum bug & hidden keys
|
|
860
|
-
while (names.length > i) if (hasOwn$
|
|
862
|
+
while (names.length > i) if (hasOwn$8(O, key = names[i++])) {
|
|
861
863
|
~indexOf(result, key) || push$1(result, key);
|
|
862
864
|
}
|
|
863
865
|
return result;
|
|
@@ -895,18 +897,18 @@ var getBuiltIn$7 = getBuiltIn$9;
|
|
|
895
897
|
var uncurryThis$b = functionUncurryThis;
|
|
896
898
|
var getOwnPropertyNamesModule = objectGetOwnPropertyNames;
|
|
897
899
|
var getOwnPropertySymbolsModule$1 = objectGetOwnPropertySymbols;
|
|
898
|
-
var anObject$
|
|
900
|
+
var anObject$g = anObject$i;
|
|
899
901
|
|
|
900
902
|
var concat$1 = uncurryThis$b([].concat);
|
|
901
903
|
|
|
902
904
|
// all object keys, includes non-enumerable and symbols
|
|
903
905
|
var ownKeys$1 = getBuiltIn$7('Reflect', 'ownKeys') || function ownKeys(it) {
|
|
904
|
-
var keys = getOwnPropertyNamesModule.f(anObject$
|
|
906
|
+
var keys = getOwnPropertyNamesModule.f(anObject$g(it));
|
|
905
907
|
var getOwnPropertySymbols = getOwnPropertySymbolsModule$1.f;
|
|
906
908
|
return getOwnPropertySymbols ? concat$1(keys, getOwnPropertySymbols(it)) : keys;
|
|
907
909
|
};
|
|
908
910
|
|
|
909
|
-
var hasOwn$
|
|
911
|
+
var hasOwn$7 = hasOwnProperty_1;
|
|
910
912
|
var ownKeys = ownKeys$1;
|
|
911
913
|
var getOwnPropertyDescriptorModule = objectGetOwnPropertyDescriptor;
|
|
912
914
|
var definePropertyModule$2 = objectDefineProperty;
|
|
@@ -917,13 +919,13 @@ var copyConstructorProperties$3 = function (target, source, exceptions) {
|
|
|
917
919
|
var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;
|
|
918
920
|
for (var i = 0; i < keys.length; i++) {
|
|
919
921
|
var key = keys[i];
|
|
920
|
-
if (!hasOwn$
|
|
922
|
+
if (!hasOwn$7(target, key) && !(exceptions && hasOwn$7(exceptions, key))) {
|
|
921
923
|
defineProperty(target, key, getOwnPropertyDescriptor(source, key));
|
|
922
924
|
}
|
|
923
925
|
}
|
|
924
926
|
};
|
|
925
927
|
|
|
926
|
-
var fails$
|
|
928
|
+
var fails$b = fails$j;
|
|
927
929
|
var isCallable$d = isCallable$n;
|
|
928
930
|
|
|
929
931
|
var replacement = /#|\.prototype\./;
|
|
@@ -932,7 +934,7 @@ var isForced$2 = function (feature, detection) {
|
|
|
932
934
|
var value = data[normalize(feature)];
|
|
933
935
|
return value === POLYFILL ? true
|
|
934
936
|
: value === NATIVE ? false
|
|
935
|
-
: isCallable$d(detection) ? fails$
|
|
937
|
+
: isCallable$d(detection) ? fails$b(detection)
|
|
936
938
|
: !!detection;
|
|
937
939
|
};
|
|
938
940
|
|
|
@@ -949,7 +951,7 @@ var isForced_1 = isForced$2;
|
|
|
949
951
|
var global$b = global$k;
|
|
950
952
|
var getOwnPropertyDescriptor$2 = objectGetOwnPropertyDescriptor.f;
|
|
951
953
|
var createNonEnumerableProperty$4 = createNonEnumerableProperty$6;
|
|
952
|
-
var defineBuiltIn$
|
|
954
|
+
var defineBuiltIn$5 = defineBuiltIn$6;
|
|
953
955
|
var defineGlobalProperty = defineGlobalProperty$3;
|
|
954
956
|
var copyConstructorProperties$2 = copyConstructorProperties$3;
|
|
955
957
|
var isForced$1 = isForced_1;
|
|
@@ -997,7 +999,7 @@ var _export = function (options, source) {
|
|
|
997
999
|
if (options.sham || (targetProperty && targetProperty.sham)) {
|
|
998
1000
|
createNonEnumerableProperty$4(sourceProperty, 'sham', true);
|
|
999
1001
|
}
|
|
1000
|
-
defineBuiltIn$
|
|
1002
|
+
defineBuiltIn$5(target, key, sourceProperty, options);
|
|
1001
1003
|
}
|
|
1002
1004
|
};
|
|
1003
1005
|
|
|
@@ -1005,11 +1007,11 @@ var NATIVE_BIND$1 = functionBindNative;
|
|
|
1005
1007
|
|
|
1006
1008
|
var FunctionPrototype = Function.prototype;
|
|
1007
1009
|
var apply$3 = FunctionPrototype.apply;
|
|
1008
|
-
var call$
|
|
1010
|
+
var call$c = FunctionPrototype.call;
|
|
1009
1011
|
|
|
1010
1012
|
// eslint-disable-next-line es/no-reflect -- safe
|
|
1011
|
-
var functionApply = typeof Reflect == 'object' && Reflect.apply || (NATIVE_BIND$1 ? call$
|
|
1012
|
-
return call$
|
|
1013
|
+
var functionApply = typeof Reflect == 'object' && Reflect.apply || (NATIVE_BIND$1 ? call$c.bind(apply$3) : function () {
|
|
1014
|
+
return call$c.apply(apply$3, arguments);
|
|
1013
1015
|
});
|
|
1014
1016
|
|
|
1015
1017
|
var uncurryThis$a = functionUncurryThis;
|
|
@@ -1177,10 +1179,10 @@ var errorStackClear = function (stack, dropEntries) {
|
|
|
1177
1179
|
} return stack;
|
|
1178
1180
|
};
|
|
1179
1181
|
|
|
1180
|
-
var fails$
|
|
1182
|
+
var fails$a = fails$j;
|
|
1181
1183
|
var createPropertyDescriptor$1 = createPropertyDescriptor$4;
|
|
1182
1184
|
|
|
1183
|
-
var errorStackInstallable = !fails$
|
|
1185
|
+
var errorStackInstallable = !fails$a(function () {
|
|
1184
1186
|
var error = new Error('a');
|
|
1185
1187
|
if (!('stack' in error)) return true;
|
|
1186
1188
|
// eslint-disable-next-line es/no-object-defineproperty -- safe
|
|
@@ -1203,9 +1205,9 @@ var errorStackInstall = function (error, C, stack, dropEntries) {
|
|
|
1203
1205
|
};
|
|
1204
1206
|
|
|
1205
1207
|
var getBuiltIn$6 = getBuiltIn$9;
|
|
1206
|
-
var hasOwn$
|
|
1208
|
+
var hasOwn$6 = hasOwnProperty_1;
|
|
1207
1209
|
var createNonEnumerableProperty$1 = createNonEnumerableProperty$6;
|
|
1208
|
-
var isPrototypeOf$
|
|
1210
|
+
var isPrototypeOf$4 = objectIsPrototypeOf;
|
|
1209
1211
|
var setPrototypeOf$1 = objectSetPrototypeOf;
|
|
1210
1212
|
var copyConstructorProperties$1 = copyConstructorProperties$3;
|
|
1211
1213
|
var proxyAccessor = proxyAccessor$1;
|
|
@@ -1227,7 +1229,7 @@ var wrapErrorConstructorWithCause$1 = function (FULL_NAME, wrapper, FORCED, IS_A
|
|
|
1227
1229
|
var OriginalErrorPrototype = OriginalError.prototype;
|
|
1228
1230
|
|
|
1229
1231
|
// V8 9.3- bug https://bugs.chromium.org/p/v8/issues/detail?id=12006
|
|
1230
|
-
if (hasOwn$
|
|
1232
|
+
if (hasOwn$6(OriginalErrorPrototype, 'cause')) delete OriginalErrorPrototype.cause;
|
|
1231
1233
|
|
|
1232
1234
|
if (!FORCED) return OriginalError;
|
|
1233
1235
|
|
|
@@ -1238,7 +1240,7 @@ var wrapErrorConstructorWithCause$1 = function (FULL_NAME, wrapper, FORCED, IS_A
|
|
|
1238
1240
|
var result = IS_AGGREGATE_ERROR ? new OriginalError(a) : new OriginalError();
|
|
1239
1241
|
if (message !== undefined) createNonEnumerableProperty$1(result, 'message', message);
|
|
1240
1242
|
installErrorStack(result, WrappedError, result.stack, 2);
|
|
1241
|
-
if (this && isPrototypeOf$
|
|
1243
|
+
if (this && isPrototypeOf$4(OriginalErrorPrototype, this)) inheritIfRequired(result, this, WrappedError);
|
|
1242
1244
|
if (arguments.length > OPTIONS_POSITION) installErrorCause(result, arguments[OPTIONS_POSITION]);
|
|
1243
1245
|
return result;
|
|
1244
1246
|
});
|
|
@@ -1373,9 +1375,9 @@ var toObject$3 = toObject$5;
|
|
|
1373
1375
|
var lengthOfArrayLike$3 = lengthOfArrayLike$5;
|
|
1374
1376
|
var setArrayLength = arraySetLength;
|
|
1375
1377
|
var doesNotExceedSafeInteger$1 = doesNotExceedSafeInteger$2;
|
|
1376
|
-
var fails$
|
|
1378
|
+
var fails$9 = fails$j;
|
|
1377
1379
|
|
|
1378
|
-
var INCORRECT_TO_LENGTH = fails$
|
|
1380
|
+
var INCORRECT_TO_LENGTH = fails$9(function () {
|
|
1379
1381
|
return [].push.call({ length: 0x100000000 }, 1) !== 4294967297;
|
|
1380
1382
|
});
|
|
1381
1383
|
|
|
@@ -1454,8 +1456,8 @@ var objectKeys$2 = Object.keys || function keys(O) {
|
|
|
1454
1456
|
|
|
1455
1457
|
var DESCRIPTORS$6 = descriptors;
|
|
1456
1458
|
var uncurryThis$8 = functionUncurryThis;
|
|
1457
|
-
var call$
|
|
1458
|
-
var fails$
|
|
1459
|
+
var call$b = functionCall;
|
|
1460
|
+
var fails$8 = fails$j;
|
|
1459
1461
|
var objectKeys$1 = objectKeys$2;
|
|
1460
1462
|
var getOwnPropertySymbolsModule = objectGetOwnPropertySymbols;
|
|
1461
1463
|
var propertyIsEnumerableModule = objectPropertyIsEnumerable;
|
|
@@ -1470,7 +1472,7 @@ var concat = uncurryThis$8([].concat);
|
|
|
1470
1472
|
|
|
1471
1473
|
// `Object.assign` method
|
|
1472
1474
|
// https://tc39.es/ecma262/#sec-object.assign
|
|
1473
|
-
var objectAssign = !$assign || fails$
|
|
1475
|
+
var objectAssign = !$assign || fails$8(function () {
|
|
1474
1476
|
// should have correct order of operations (Edge bug)
|
|
1475
1477
|
if (DESCRIPTORS$6 && $assign({ b: 1 }, $assign(defineProperty$3({}, 'a', {
|
|
1476
1478
|
enumerable: true,
|
|
@@ -1504,7 +1506,7 @@ var objectAssign = !$assign || fails$7(function () {
|
|
|
1504
1506
|
var key;
|
|
1505
1507
|
while (length > j) {
|
|
1506
1508
|
key = keys[j++];
|
|
1507
|
-
if (!DESCRIPTORS$6 || call$
|
|
1509
|
+
if (!DESCRIPTORS$6 || call$b(propertyIsEnumerable, S, key)) T[key] = S[key];
|
|
1508
1510
|
}
|
|
1509
1511
|
} return T;
|
|
1510
1512
|
} : $assign;
|
|
@@ -1525,14 +1527,14 @@ var classof$4 = classofRaw$2;
|
|
|
1525
1527
|
var engineIsNode = classof$4(global$9.process) === 'process';
|
|
1526
1528
|
|
|
1527
1529
|
var defineProperty$2 = objectDefineProperty.f;
|
|
1528
|
-
var hasOwn$
|
|
1530
|
+
var hasOwn$5 = hasOwnProperty_1;
|
|
1529
1531
|
var wellKnownSymbol$d = wellKnownSymbol$h;
|
|
1530
1532
|
|
|
1531
1533
|
var TO_STRING_TAG$2 = wellKnownSymbol$d('toStringTag');
|
|
1532
1534
|
|
|
1533
1535
|
var setToStringTag$1 = function (target, TAG, STATIC) {
|
|
1534
1536
|
if (target && !STATIC) target = target.prototype;
|
|
1535
|
-
if (target && !hasOwn$
|
|
1537
|
+
if (target && !hasOwn$5(target, TO_STRING_TAG$2)) {
|
|
1536
1538
|
defineProperty$2(target, TO_STRING_TAG$2, { configurable: true, value: TAG });
|
|
1537
1539
|
}
|
|
1538
1540
|
};
|
|
@@ -1564,17 +1566,17 @@ var setSpecies$1 = function (CONSTRUCTOR_NAME) {
|
|
|
1564
1566
|
}
|
|
1565
1567
|
};
|
|
1566
1568
|
|
|
1567
|
-
var isPrototypeOf$
|
|
1569
|
+
var isPrototypeOf$3 = objectIsPrototypeOf;
|
|
1568
1570
|
|
|
1569
1571
|
var $TypeError$7 = TypeError;
|
|
1570
1572
|
|
|
1571
1573
|
var anInstance$2 = function (it, Prototype) {
|
|
1572
|
-
if (isPrototypeOf$
|
|
1574
|
+
if (isPrototypeOf$3(Prototype, it)) return it;
|
|
1573
1575
|
throw new $TypeError$7('Incorrect invocation');
|
|
1574
1576
|
};
|
|
1575
1577
|
|
|
1576
1578
|
var uncurryThis$7 = functionUncurryThis;
|
|
1577
|
-
var fails$
|
|
1579
|
+
var fails$7 = fails$j;
|
|
1578
1580
|
var isCallable$a = isCallable$n;
|
|
1579
1581
|
var classof$3 = classof$7;
|
|
1580
1582
|
var getBuiltIn$4 = getBuiltIn$9;
|
|
@@ -1617,7 +1619,7 @@ isConstructorLegacy.sham = true;
|
|
|
1617
1619
|
|
|
1618
1620
|
// `IsConstructor` abstract operation
|
|
1619
1621
|
// https://tc39.es/ecma262/#sec-isconstructor
|
|
1620
|
-
var isConstructor$2 = !construct || fails$
|
|
1622
|
+
var isConstructor$2 = !construct || fails$7(function () {
|
|
1621
1623
|
var called;
|
|
1622
1624
|
return isConstructorModern(isConstructorModern.call)
|
|
1623
1625
|
|| !isConstructorModern(Object)
|
|
@@ -1636,7 +1638,7 @@ var aConstructor$1 = function (argument) {
|
|
|
1636
1638
|
throw new $TypeError$6(tryToString$2(argument) + ' is not a constructor');
|
|
1637
1639
|
};
|
|
1638
1640
|
|
|
1639
|
-
var anObject$
|
|
1641
|
+
var anObject$f = anObject$i;
|
|
1640
1642
|
var aConstructor = aConstructor$1;
|
|
1641
1643
|
var isNullOrUndefined$1 = isNullOrUndefined$4;
|
|
1642
1644
|
var wellKnownSymbol$b = wellKnownSymbol$h;
|
|
@@ -1646,9 +1648,9 @@ var SPECIES$2 = wellKnownSymbol$b('species');
|
|
|
1646
1648
|
// `SpeciesConstructor` abstract operation
|
|
1647
1649
|
// https://tc39.es/ecma262/#sec-speciesconstructor
|
|
1648
1650
|
var speciesConstructor$1 = function (O, defaultConstructor) {
|
|
1649
|
-
var C = anObject$
|
|
1651
|
+
var C = anObject$f(O).constructor;
|
|
1650
1652
|
var S;
|
|
1651
|
-
return C === undefined || isNullOrUndefined$1(S = anObject$
|
|
1653
|
+
return C === undefined || isNullOrUndefined$1(S = anObject$f(C)[SPECIES$2]) ? defaultConstructor : aConstructor(S);
|
|
1652
1654
|
};
|
|
1653
1655
|
|
|
1654
1656
|
var classofRaw = classofRaw$2;
|
|
@@ -1699,8 +1701,8 @@ var global$8 = global$k;
|
|
|
1699
1701
|
var apply$1 = functionApply;
|
|
1700
1702
|
var bind$4 = functionBindContext;
|
|
1701
1703
|
var isCallable$9 = isCallable$n;
|
|
1702
|
-
var hasOwn$
|
|
1703
|
-
var fails$
|
|
1704
|
+
var hasOwn$4 = hasOwnProperty_1;
|
|
1705
|
+
var fails$6 = fails$j;
|
|
1704
1706
|
var html$1 = html$2;
|
|
1705
1707
|
var arraySlice$1 = arraySlice$2;
|
|
1706
1708
|
var createElement = documentCreateElement$1;
|
|
@@ -1720,13 +1722,13 @@ var queue$2 = {};
|
|
|
1720
1722
|
var ONREADYSTATECHANGE = 'onreadystatechange';
|
|
1721
1723
|
var $location, defer, channel, port;
|
|
1722
1724
|
|
|
1723
|
-
fails$
|
|
1725
|
+
fails$6(function () {
|
|
1724
1726
|
// Deno throws a ReferenceError on `location` access without `--location` flag
|
|
1725
1727
|
$location = global$8.location;
|
|
1726
1728
|
});
|
|
1727
1729
|
|
|
1728
1730
|
var run = function (id) {
|
|
1729
|
-
if (hasOwn$
|
|
1731
|
+
if (hasOwn$4(queue$2, id)) {
|
|
1730
1732
|
var fn = queue$2[id];
|
|
1731
1733
|
delete queue$2[id];
|
|
1732
1734
|
fn();
|
|
@@ -1787,7 +1789,7 @@ if (!set || !clear) {
|
|
|
1787
1789
|
isCallable$9(global$8.postMessage) &&
|
|
1788
1790
|
!global$8.importScripts &&
|
|
1789
1791
|
$location && $location.protocol !== 'file:' &&
|
|
1790
|
-
!fails$
|
|
1792
|
+
!fails$6(globalPostMessageDefer)
|
|
1791
1793
|
) {
|
|
1792
1794
|
defer = globalPostMessageDefer;
|
|
1793
1795
|
global$8.addEventListener('message', eventListener, false);
|
|
@@ -2035,8 +2037,8 @@ newPromiseCapability$2.f = function (C) {
|
|
|
2035
2037
|
var $$g = _export;
|
|
2036
2038
|
var IS_NODE = engineIsNode;
|
|
2037
2039
|
var global$3 = global$k;
|
|
2038
|
-
var call$
|
|
2039
|
-
var defineBuiltIn$
|
|
2040
|
+
var call$a = functionCall;
|
|
2041
|
+
var defineBuiltIn$4 = defineBuiltIn$6;
|
|
2040
2042
|
var setPrototypeOf = objectSetPrototypeOf;
|
|
2041
2043
|
var setToStringTag = setToStringTag$1;
|
|
2042
2044
|
var setSpecies = setSpecies$1;
|
|
@@ -2113,7 +2115,7 @@ var callReaction = function (reaction, state) {
|
|
|
2113
2115
|
if (result === reaction.promise) {
|
|
2114
2116
|
reject(new TypeError$1('Promise-chain cycle'));
|
|
2115
2117
|
} else if (then = isThenable(result)) {
|
|
2116
|
-
call$
|
|
2118
|
+
call$a(then, result, resolve, reject);
|
|
2117
2119
|
} else resolve(result);
|
|
2118
2120
|
} else reject(value);
|
|
2119
2121
|
} catch (error) {
|
|
@@ -2150,7 +2152,7 @@ var dispatchEvent = function (name, promise, reason) {
|
|
|
2150
2152
|
};
|
|
2151
2153
|
|
|
2152
2154
|
var onUnhandled = function (state) {
|
|
2153
|
-
call$
|
|
2155
|
+
call$a(task, global$3, function () {
|
|
2154
2156
|
var promise = state.facade;
|
|
2155
2157
|
var value = state.value;
|
|
2156
2158
|
var IS_UNHANDLED = isUnhandled(state);
|
|
@@ -2173,7 +2175,7 @@ var isUnhandled = function (state) {
|
|
|
2173
2175
|
};
|
|
2174
2176
|
|
|
2175
2177
|
var onHandleUnhandled = function (state) {
|
|
2176
|
-
call$
|
|
2178
|
+
call$a(task, global$3, function () {
|
|
2177
2179
|
var promise = state.facade;
|
|
2178
2180
|
if (IS_NODE) {
|
|
2179
2181
|
process.emit('rejectionHandled', promise);
|
|
@@ -2207,7 +2209,7 @@ var internalResolve = function (state, value, unwrap) {
|
|
|
2207
2209
|
microtask(function () {
|
|
2208
2210
|
var wrapper = { done: false };
|
|
2209
2211
|
try {
|
|
2210
|
-
call$
|
|
2212
|
+
call$a(then, value,
|
|
2211
2213
|
bind$2(internalResolve, wrapper, state),
|
|
2212
2214
|
bind$2(internalReject, wrapper, state)
|
|
2213
2215
|
);
|
|
@@ -2231,7 +2233,7 @@ if (FORCED_PROMISE_CONSTRUCTOR$4) {
|
|
|
2231
2233
|
PromiseConstructor = function Promise(executor) {
|
|
2232
2234
|
anInstance$1(this, PromisePrototype);
|
|
2233
2235
|
aCallable$8(executor);
|
|
2234
|
-
call$
|
|
2236
|
+
call$a(Internal, this);
|
|
2235
2237
|
var state = getInternalPromiseState(this);
|
|
2236
2238
|
try {
|
|
2237
2239
|
executor(bind$2(internalResolve, state), bind$2(internalReject, state));
|
|
@@ -2258,7 +2260,7 @@ if (FORCED_PROMISE_CONSTRUCTOR$4) {
|
|
|
2258
2260
|
|
|
2259
2261
|
// `Promise.prototype.then` method
|
|
2260
2262
|
// https://tc39.es/ecma262/#sec-promise.prototype.then
|
|
2261
|
-
Internal.prototype = defineBuiltIn$
|
|
2263
|
+
Internal.prototype = defineBuiltIn$4(PromisePrototype, 'then', function then(onFulfilled, onRejected) {
|
|
2262
2264
|
var state = getInternalPromiseState(this);
|
|
2263
2265
|
var reaction = newPromiseCapability$1(speciesConstructor(this, PromiseConstructor));
|
|
2264
2266
|
state.parent = true;
|
|
@@ -2291,10 +2293,10 @@ if (FORCED_PROMISE_CONSTRUCTOR$4) {
|
|
|
2291
2293
|
|
|
2292
2294
|
if (!NATIVE_PROMISE_SUBCLASSING) {
|
|
2293
2295
|
// make `Promise#then` return a polyfilled `Promise` for native promise-based APIs
|
|
2294
|
-
defineBuiltIn$
|
|
2296
|
+
defineBuiltIn$4(NativePromisePrototype$1, 'then', function then(onFulfilled, onRejected) {
|
|
2295
2297
|
var that = this;
|
|
2296
2298
|
return new PromiseConstructor(function (resolve, reject) {
|
|
2297
|
-
call$
|
|
2299
|
+
call$a(nativeThen, that, resolve, reject);
|
|
2298
2300
|
}).then(onFulfilled, onRejected);
|
|
2299
2301
|
// https://github.com/zloirock/core-js/issues/640
|
|
2300
2302
|
}, { unsafe: true });
|
|
@@ -2346,9 +2348,9 @@ var getIteratorMethod$2 = function (it) {
|
|
|
2346
2348
|
|| Iterators[classof$2(it)];
|
|
2347
2349
|
};
|
|
2348
2350
|
|
|
2349
|
-
var call$
|
|
2351
|
+
var call$9 = functionCall;
|
|
2350
2352
|
var aCallable$7 = aCallable$d;
|
|
2351
|
-
var anObject$
|
|
2353
|
+
var anObject$e = anObject$i;
|
|
2352
2354
|
var tryToString$1 = tryToString$4;
|
|
2353
2355
|
var getIteratorMethod$1 = getIteratorMethod$2;
|
|
2354
2356
|
|
|
@@ -2356,41 +2358,41 @@ var $TypeError$3 = TypeError;
|
|
|
2356
2358
|
|
|
2357
2359
|
var getIterator$1 = function (argument, usingIterator) {
|
|
2358
2360
|
var iteratorMethod = arguments.length < 2 ? getIteratorMethod$1(argument) : usingIterator;
|
|
2359
|
-
if (aCallable$7(iteratorMethod)) return anObject$
|
|
2361
|
+
if (aCallable$7(iteratorMethod)) return anObject$e(call$9(iteratorMethod, argument));
|
|
2360
2362
|
throw new $TypeError$3(tryToString$1(argument) + ' is not iterable');
|
|
2361
2363
|
};
|
|
2362
2364
|
|
|
2363
|
-
var call$
|
|
2364
|
-
var anObject$
|
|
2365
|
+
var call$8 = functionCall;
|
|
2366
|
+
var anObject$d = anObject$i;
|
|
2365
2367
|
var getMethod$1 = getMethod$4;
|
|
2366
2368
|
|
|
2367
2369
|
var iteratorClose$3 = function (iterator, kind, value) {
|
|
2368
2370
|
var innerResult, innerError;
|
|
2369
|
-
anObject$
|
|
2371
|
+
anObject$d(iterator);
|
|
2370
2372
|
try {
|
|
2371
2373
|
innerResult = getMethod$1(iterator, 'return');
|
|
2372
2374
|
if (!innerResult) {
|
|
2373
2375
|
if (kind === 'throw') throw value;
|
|
2374
2376
|
return value;
|
|
2375
2377
|
}
|
|
2376
|
-
innerResult = call$
|
|
2378
|
+
innerResult = call$8(innerResult, iterator);
|
|
2377
2379
|
} catch (error) {
|
|
2378
2380
|
innerError = true;
|
|
2379
2381
|
innerResult = error;
|
|
2380
2382
|
}
|
|
2381
2383
|
if (kind === 'throw') throw value;
|
|
2382
2384
|
if (innerError) throw innerResult;
|
|
2383
|
-
anObject$
|
|
2385
|
+
anObject$d(innerResult);
|
|
2384
2386
|
return value;
|
|
2385
2387
|
};
|
|
2386
2388
|
|
|
2387
2389
|
var bind$1 = functionBindContext;
|
|
2388
|
-
var call$
|
|
2389
|
-
var anObject$
|
|
2390
|
+
var call$7 = functionCall;
|
|
2391
|
+
var anObject$c = anObject$i;
|
|
2390
2392
|
var tryToString = tryToString$4;
|
|
2391
2393
|
var isArrayIteratorMethod = isArrayIteratorMethod$1;
|
|
2392
2394
|
var lengthOfArrayLike$2 = lengthOfArrayLike$5;
|
|
2393
|
-
var isPrototypeOf$
|
|
2395
|
+
var isPrototypeOf$2 = objectIsPrototypeOf;
|
|
2394
2396
|
var getIterator = getIterator$1;
|
|
2395
2397
|
var getIteratorMethod = getIteratorMethod$2;
|
|
2396
2398
|
var iteratorClose$2 = iteratorClose$3;
|
|
@@ -2420,7 +2422,7 @@ var iterate$5 = function (iterable, unboundFunction, options) {
|
|
|
2420
2422
|
|
|
2421
2423
|
var callFn = function (value) {
|
|
2422
2424
|
if (AS_ENTRIES) {
|
|
2423
|
-
anObject$
|
|
2425
|
+
anObject$c(value);
|
|
2424
2426
|
return INTERRUPTED ? fn(value[0], value[1], stop) : fn(value[0], value[1]);
|
|
2425
2427
|
} return INTERRUPTED ? fn(value, stop) : fn(value);
|
|
2426
2428
|
};
|
|
@@ -2436,20 +2438,20 @@ var iterate$5 = function (iterable, unboundFunction, options) {
|
|
|
2436
2438
|
if (isArrayIteratorMethod(iterFn)) {
|
|
2437
2439
|
for (index = 0, length = lengthOfArrayLike$2(iterable); length > index; index++) {
|
|
2438
2440
|
result = callFn(iterable[index]);
|
|
2439
|
-
if (result && isPrototypeOf$
|
|
2441
|
+
if (result && isPrototypeOf$2(ResultPrototype, result)) return result;
|
|
2440
2442
|
} return new Result(false);
|
|
2441
2443
|
}
|
|
2442
2444
|
iterator = getIterator(iterable, iterFn);
|
|
2443
2445
|
}
|
|
2444
2446
|
|
|
2445
2447
|
next = IS_RECORD ? iterable.next : iterator.next;
|
|
2446
|
-
while (!(step = call$
|
|
2448
|
+
while (!(step = call$7(next, iterator)).done) {
|
|
2447
2449
|
try {
|
|
2448
2450
|
result = callFn(step.value);
|
|
2449
2451
|
} catch (error) {
|
|
2450
2452
|
iteratorClose$2(iterator, 'throw', error);
|
|
2451
2453
|
}
|
|
2452
|
-
if (typeof result == 'object' && result && isPrototypeOf$
|
|
2454
|
+
if (typeof result == 'object' && result && isPrototypeOf$2(ResultPrototype, result)) return result;
|
|
2453
2455
|
} return new Result(false);
|
|
2454
2456
|
};
|
|
2455
2457
|
|
|
@@ -2503,7 +2505,7 @@ var promiseStaticsIncorrectIteration = FORCED_PROMISE_CONSTRUCTOR$3 || !checkCor
|
|
|
2503
2505
|
});
|
|
2504
2506
|
|
|
2505
2507
|
var $$f = _export;
|
|
2506
|
-
var call$
|
|
2508
|
+
var call$6 = functionCall;
|
|
2507
2509
|
var aCallable$6 = aCallable$d;
|
|
2508
2510
|
var newPromiseCapabilityModule$2 = newPromiseCapability$2;
|
|
2509
2511
|
var perform$1 = perform$3;
|
|
@@ -2527,7 +2529,7 @@ $$f({ target: 'Promise', stat: true, forced: PROMISE_STATICS_INCORRECT_ITERATION
|
|
|
2527
2529
|
var index = counter++;
|
|
2528
2530
|
var alreadyCalled = false;
|
|
2529
2531
|
remaining++;
|
|
2530
|
-
call$
|
|
2532
|
+
call$6($promiseResolve, C, promise).then(function (value) {
|
|
2531
2533
|
if (alreadyCalled) return;
|
|
2532
2534
|
alreadyCalled = true;
|
|
2533
2535
|
values[index] = value;
|
|
@@ -2546,7 +2548,7 @@ var FORCED_PROMISE_CONSTRUCTOR$2 = promiseConstructorDetection.CONSTRUCTOR;
|
|
|
2546
2548
|
var NativePromiseConstructor = promiseNativeConstructor;
|
|
2547
2549
|
var getBuiltIn$2 = getBuiltIn$9;
|
|
2548
2550
|
var isCallable$6 = isCallable$n;
|
|
2549
|
-
var defineBuiltIn$
|
|
2551
|
+
var defineBuiltIn$3 = defineBuiltIn$6;
|
|
2550
2552
|
|
|
2551
2553
|
var NativePromisePrototype = NativePromiseConstructor && NativePromiseConstructor.prototype;
|
|
2552
2554
|
|
|
@@ -2562,12 +2564,12 @@ $$e({ target: 'Promise', proto: true, forced: FORCED_PROMISE_CONSTRUCTOR$2, real
|
|
|
2562
2564
|
if (isCallable$6(NativePromiseConstructor)) {
|
|
2563
2565
|
var method = getBuiltIn$2('Promise').prototype['catch'];
|
|
2564
2566
|
if (NativePromisePrototype['catch'] !== method) {
|
|
2565
|
-
defineBuiltIn$
|
|
2567
|
+
defineBuiltIn$3(NativePromisePrototype, 'catch', method, { unsafe: true });
|
|
2566
2568
|
}
|
|
2567
2569
|
}
|
|
2568
2570
|
|
|
2569
2571
|
var $$d = _export;
|
|
2570
|
-
var call$
|
|
2572
|
+
var call$5 = functionCall;
|
|
2571
2573
|
var aCallable$5 = aCallable$d;
|
|
2572
2574
|
var newPromiseCapabilityModule$1 = newPromiseCapability$2;
|
|
2573
2575
|
var perform = perform$3;
|
|
@@ -2584,7 +2586,7 @@ $$d({ target: 'Promise', stat: true, forced: PROMISE_STATICS_INCORRECT_ITERATION
|
|
|
2584
2586
|
var result = perform(function () {
|
|
2585
2587
|
var $promiseResolve = aCallable$5(C.resolve);
|
|
2586
2588
|
iterate$3(iterable, function (promise) {
|
|
2587
|
-
call$
|
|
2589
|
+
call$5($promiseResolve, C, promise).then(capability.resolve, reject);
|
|
2588
2590
|
});
|
|
2589
2591
|
});
|
|
2590
2592
|
if (result.error) reject(result.value);
|
|
@@ -2607,12 +2609,12 @@ $$c({ target: 'Promise', stat: true, forced: FORCED_PROMISE_CONSTRUCTOR$1 }, {
|
|
|
2607
2609
|
}
|
|
2608
2610
|
});
|
|
2609
2611
|
|
|
2610
|
-
var anObject$
|
|
2612
|
+
var anObject$b = anObject$i;
|
|
2611
2613
|
var isObject$3 = isObject$e;
|
|
2612
2614
|
var newPromiseCapability = newPromiseCapability$2;
|
|
2613
2615
|
|
|
2614
2616
|
var promiseResolve$1 = function (C, x) {
|
|
2615
|
-
anObject$
|
|
2617
|
+
anObject$b(C);
|
|
2616
2618
|
if (isObject$3(x) && x.constructor === C) return x;
|
|
2617
2619
|
var promiseCapability = newPromiseCapability.f(C);
|
|
2618
2620
|
var resolve = promiseCapability.resolve;
|
|
@@ -2718,9 +2720,9 @@ var getJsonReplacerFunction = function (replacer) {
|
|
|
2718
2720
|
var $$a = _export;
|
|
2719
2721
|
var getBuiltIn = getBuiltIn$9;
|
|
2720
2722
|
var apply = functionApply;
|
|
2721
|
-
var call$
|
|
2723
|
+
var call$4 = functionCall;
|
|
2722
2724
|
var uncurryThis$2 = functionUncurryThis;
|
|
2723
|
-
var fails$
|
|
2725
|
+
var fails$5 = fails$j;
|
|
2724
2726
|
var isCallable$4 = isCallable$n;
|
|
2725
2727
|
var isSymbol = isSymbol$3;
|
|
2726
2728
|
var arraySlice = arraySlice$2;
|
|
@@ -2739,7 +2741,7 @@ var tester = /[\uD800-\uDFFF]/g;
|
|
|
2739
2741
|
var low = /^[\uD800-\uDBFF]$/;
|
|
2740
2742
|
var hi = /^[\uDC00-\uDFFF]$/;
|
|
2741
2743
|
|
|
2742
|
-
var WRONG_SYMBOLS_CONVERSION = !NATIVE_SYMBOL$1 || fails$
|
|
2744
|
+
var WRONG_SYMBOLS_CONVERSION = !NATIVE_SYMBOL$1 || fails$5(function () {
|
|
2743
2745
|
var symbol = getBuiltIn('Symbol')('stringify detection');
|
|
2744
2746
|
// MS Edge converts symbol values to JSON as {}
|
|
2745
2747
|
return $stringify([symbol]) !== '[null]'
|
|
@@ -2750,7 +2752,7 @@ var WRONG_SYMBOLS_CONVERSION = !NATIVE_SYMBOL$1 || fails$4(function () {
|
|
|
2750
2752
|
});
|
|
2751
2753
|
|
|
2752
2754
|
// https://github.com/tc39/proposal-well-formed-stringify
|
|
2753
|
-
var ILL_FORMED_UNICODE = fails$
|
|
2755
|
+
var ILL_FORMED_UNICODE = fails$5(function () {
|
|
2754
2756
|
return $stringify('\uDF06\uD834') !== '"\\udf06\\ud834"'
|
|
2755
2757
|
|| $stringify('\uDEAD') !== '"\\udead"';
|
|
2756
2758
|
});
|
|
@@ -2761,7 +2763,7 @@ var stringifyWithSymbolsFix = function (it, replacer) {
|
|
|
2761
2763
|
if (!isCallable$4($replacer) && (it === undefined || isSymbol(it))) return; // IE8 returns string on undefined
|
|
2762
2764
|
args[1] = function (key, value) {
|
|
2763
2765
|
// some old implementations (like WebKit) could pass numbers as keys
|
|
2764
|
-
if (isCallable$4($replacer)) value = call$
|
|
2766
|
+
if (isCallable$4($replacer)) value = call$4($replacer, this, $String(key), value);
|
|
2765
2767
|
if (!isSymbol(value)) return value;
|
|
2766
2768
|
};
|
|
2767
2769
|
return apply($stringify, null, args);
|
|
@@ -2859,18 +2861,430 @@ class FluxoStateDispatcher {
|
|
|
2859
2861
|
static dispatchSetSessionMode(mode) {
|
|
2860
2862
|
state.store.dispatch(state.setMode(mode));
|
|
2861
2863
|
}
|
|
2864
|
+
static dispatchSetNavigationMode(mode) {
|
|
2865
|
+
state.store.dispatch(state.setNavigationMode(mode));
|
|
2866
|
+
}
|
|
2862
2867
|
static dispatchSetRoutes(routes) {
|
|
2863
2868
|
state.store.dispatch(state.setRoutes(routes));
|
|
2864
2869
|
}
|
|
2865
2870
|
}
|
|
2866
2871
|
|
|
2872
|
+
var anObject$a = anObject$i;
|
|
2873
|
+
|
|
2874
|
+
// `RegExp.prototype.flags` getter implementation
|
|
2875
|
+
// https://tc39.es/ecma262/#sec-get-regexp.prototype.flags
|
|
2876
|
+
var regexpFlags = function () {
|
|
2877
|
+
var that = anObject$a(this);
|
|
2878
|
+
var result = '';
|
|
2879
|
+
if (that.hasIndices) result += 'd';
|
|
2880
|
+
if (that.global) result += 'g';
|
|
2881
|
+
if (that.ignoreCase) result += 'i';
|
|
2882
|
+
if (that.multiline) result += 'm';
|
|
2883
|
+
if (that.dotAll) result += 's';
|
|
2884
|
+
if (that.unicode) result += 'u';
|
|
2885
|
+
if (that.unicodeSets) result += 'v';
|
|
2886
|
+
if (that.sticky) result += 'y';
|
|
2887
|
+
return result;
|
|
2888
|
+
};
|
|
2889
|
+
|
|
2890
|
+
var call$3 = functionCall;
|
|
2891
|
+
var hasOwn$3 = hasOwnProperty_1;
|
|
2892
|
+
var isPrototypeOf$1 = objectIsPrototypeOf;
|
|
2893
|
+
var regExpFlags = regexpFlags;
|
|
2894
|
+
|
|
2895
|
+
var RegExpPrototype$1 = RegExp.prototype;
|
|
2896
|
+
|
|
2897
|
+
var regexpGetFlags = function (R) {
|
|
2898
|
+
var flags = R.flags;
|
|
2899
|
+
return flags === undefined && !('flags' in RegExpPrototype$1) && !hasOwn$3(R, 'flags') && isPrototypeOf$1(RegExpPrototype$1, R)
|
|
2900
|
+
? call$3(regExpFlags, R) : flags;
|
|
2901
|
+
};
|
|
2902
|
+
|
|
2903
|
+
var PROPER_FUNCTION_NAME = functionName.PROPER;
|
|
2904
|
+
var defineBuiltIn$2 = defineBuiltIn$6;
|
|
2905
|
+
var anObject$9 = anObject$i;
|
|
2906
|
+
var $toString = toString$4;
|
|
2907
|
+
var fails$4 = fails$j;
|
|
2908
|
+
var getRegExpFlags = regexpGetFlags;
|
|
2909
|
+
|
|
2910
|
+
var TO_STRING = 'toString';
|
|
2911
|
+
var RegExpPrototype = RegExp.prototype;
|
|
2912
|
+
var nativeToString = RegExpPrototype[TO_STRING];
|
|
2913
|
+
|
|
2914
|
+
var NOT_GENERIC = fails$4(function () { return nativeToString.call({ source: 'a', flags: 'b' }) !== '/a/b'; });
|
|
2915
|
+
// FF44- RegExp#toString has a wrong name
|
|
2916
|
+
var INCORRECT_NAME = PROPER_FUNCTION_NAME && nativeToString.name !== TO_STRING;
|
|
2917
|
+
|
|
2918
|
+
// `RegExp.prototype.toString` method
|
|
2919
|
+
// https://tc39.es/ecma262/#sec-regexp.prototype.tostring
|
|
2920
|
+
if (NOT_GENERIC || INCORRECT_NAME) {
|
|
2921
|
+
defineBuiltIn$2(RegExpPrototype, TO_STRING, function toString() {
|
|
2922
|
+
var R = anObject$9(this);
|
|
2923
|
+
var pattern = $toString(R.source);
|
|
2924
|
+
var flags = $toString(getRegExpFlags(R));
|
|
2925
|
+
return '/' + pattern + '/' + flags;
|
|
2926
|
+
}, { unsafe: true });
|
|
2927
|
+
}
|
|
2928
|
+
|
|
2929
|
+
// Costanti per la gestione del lock
|
|
2930
|
+
const LOCK_TIMEOUT_MS = 10000; // 10 secondi di timeout per il lock
|
|
2931
|
+
const LOCK_KEY = 'auth_refresh_lock';
|
|
2932
|
+
const HEARTBEAT_INTERVAL_MS = 5000; // Heartbeat ogni 5 secondi
|
|
2933
|
+
const LOCK_CLEANUP_INTERVAL_MS = 15000; // Pulizia lock orfani ogni 15 secondi
|
|
2934
|
+
class TabSyncAuthManager {
|
|
2935
|
+
constructor(refreshAction, onErrorCallback) {
|
|
2936
|
+
this.refreshTimeout = null;
|
|
2937
|
+
this.heartbeatInterval = null;
|
|
2938
|
+
this.lockCleanupInterval = null;
|
|
2939
|
+
this.isDestroyed = false;
|
|
2940
|
+
this.tabId = this.generateTabId();
|
|
2941
|
+
this.refreshTokenAction = refreshAction;
|
|
2942
|
+
this.onErrorCallback = onErrorCallback;
|
|
2943
|
+
console.log(`🔄 TabSyncAuthManager: Inizializzazione tab ${this.tabId}`);
|
|
2944
|
+
// Inizializza Broadcast Channel con fallback per browser vecchi
|
|
2945
|
+
this.broadcastChannel = this.initBroadcastChannel();
|
|
2946
|
+
// Setup degli interval per heartbeat e cleanup
|
|
2947
|
+
this.setupIntervals();
|
|
2948
|
+
// Setup event listeners
|
|
2949
|
+
this.setupEventListeners();
|
|
2950
|
+
}
|
|
2951
|
+
static Init(refreshAction, onErrorCallback) {
|
|
2952
|
+
if (!this._instance) {
|
|
2953
|
+
this._instance = new TabSyncAuthManager(refreshAction, onErrorCallback);
|
|
2954
|
+
}
|
|
2955
|
+
}
|
|
2956
|
+
static get Instance() {
|
|
2957
|
+
if (!this._instance) {
|
|
2958
|
+
throw new Error('TabSyncAuthManager not initialized');
|
|
2959
|
+
}
|
|
2960
|
+
return this._instance;
|
|
2961
|
+
}
|
|
2962
|
+
generateTabId() {
|
|
2963
|
+
return `tab_${Date.now()}_${Math.random().toString(36).substr(2, 9)}`;
|
|
2964
|
+
}
|
|
2965
|
+
initBroadcastChannel() {
|
|
2966
|
+
try {
|
|
2967
|
+
const channel = new BroadcastChannel('fluxo-auth-sync');
|
|
2968
|
+
console.log(`🔄 TabSyncAuthManager: BroadcastChannel inizializzato per tab ${this.tabId}`);
|
|
2969
|
+
return channel;
|
|
2970
|
+
} catch (error) {
|
|
2971
|
+
console.warn('🔄 TabSyncAuthManager: BroadcastChannel non supportato, fallback a storage events');
|
|
2972
|
+
// Fallback: usa storage events (implementazione semplificata)
|
|
2973
|
+
throw new Error('BroadcastChannel not supported - fallback needed');
|
|
2974
|
+
}
|
|
2975
|
+
}
|
|
2976
|
+
setupIntervals() {
|
|
2977
|
+
// Heartbeat per indicare che il tab è ancora vivo
|
|
2978
|
+
this.heartbeatInterval = setInterval(() => {
|
|
2979
|
+
if (!this.isDestroyed) {
|
|
2980
|
+
this.sendHeartbeat();
|
|
2981
|
+
}
|
|
2982
|
+
}, HEARTBEAT_INTERVAL_MS);
|
|
2983
|
+
// Cleanup periodico dei lock orfani
|
|
2984
|
+
this.lockCleanupInterval = setInterval(() => {
|
|
2985
|
+
if (!this.isDestroyed) {
|
|
2986
|
+
this.cleanupOrphanedLocks();
|
|
2987
|
+
}
|
|
2988
|
+
}, LOCK_CLEANUP_INTERVAL_MS);
|
|
2989
|
+
}
|
|
2990
|
+
setupEventListeners() {
|
|
2991
|
+
// Ascolta messaggi da altri tab
|
|
2992
|
+
this.broadcastChannel.onmessage = event => {
|
|
2993
|
+
this.handleTabMessage(event.data);
|
|
2994
|
+
};
|
|
2995
|
+
// Cleanup quando il tab viene chiuso
|
|
2996
|
+
window.addEventListener('beforeunload', () => {
|
|
2997
|
+
this.destroy();
|
|
2998
|
+
});
|
|
2999
|
+
// Gestione visibilità per ottimizzazioni
|
|
3000
|
+
document.addEventListener('visibilitychange', () => {
|
|
3001
|
+
if (document.visibilityState === 'visible') {
|
|
3002
|
+
console.log(`🔄 TabSyncAuthManager: Tab ${this.tabId} tornato visibile`);
|
|
3003
|
+
// Potenziale sync quando il tab torna visibile
|
|
3004
|
+
this.syncWithStoredToken();
|
|
3005
|
+
}
|
|
3006
|
+
});
|
|
3007
|
+
}
|
|
3008
|
+
handleTabMessage(message) {
|
|
3009
|
+
if (message.tabId === this.tabId) {
|
|
3010
|
+
return; // Ignora i propri messaggi
|
|
3011
|
+
}
|
|
3012
|
+
//console.log(`🔄 TabSyncAuthManager: Tab ${this.tabId} ricevuto messaggio:`, message.type, `da tab ${message.tabId}`);
|
|
3013
|
+
switch (message.type) {
|
|
3014
|
+
case 'TOKEN_REFRESHED':
|
|
3015
|
+
this.handleTokenRefreshed(message);
|
|
3016
|
+
break;
|
|
3017
|
+
case 'TOKEN_REFRESH_FAILED':
|
|
3018
|
+
this.handleTokenRefreshFailed(message);
|
|
3019
|
+
break;
|
|
3020
|
+
}
|
|
3021
|
+
}
|
|
3022
|
+
handleTokenRefreshed(message) {
|
|
3023
|
+
console.log(`🔄 TabSyncAuthManager: Tab ${this.tabId} sincronizzazione con nuovo token`);
|
|
3024
|
+
// Cancella il timeout locale se in corso
|
|
3025
|
+
if (this.refreshTimeout) {
|
|
3026
|
+
clearTimeout(this.refreshTimeout);
|
|
3027
|
+
this.refreshTimeout = null;
|
|
3028
|
+
console.log(`🔄 TabSyncAuthManager: Tab ${this.tabId} timeout cancellato, token già aggiornato da altro tab`);
|
|
3029
|
+
}
|
|
3030
|
+
// Sincronizza con il nuovo token e riavvia il timer
|
|
3031
|
+
this.syncWithStoredToken();
|
|
3032
|
+
this.scheduleNextRefresh();
|
|
3033
|
+
}
|
|
3034
|
+
handleTokenRefreshFailed(message) {
|
|
3035
|
+
console.error(`🔄 TabSyncAuthManager: Tab ${this.tabId} refresh fallito su altro tab, eseguo logout`);
|
|
3036
|
+
this.onErrorCallback();
|
|
3037
|
+
}
|
|
3038
|
+
syncWithStoredToken() {
|
|
3039
|
+
// Verifica che il token in localStorage sia ancora valido
|
|
3040
|
+
const token = localStorage.getItem(LocalStorageConstants.accessToken);
|
|
3041
|
+
if (!token) {
|
|
3042
|
+
console.log(`🔄 TabSyncAuthManager: Tab ${this.tabId} nessun token trovato durante sync`);
|
|
3043
|
+
return;
|
|
3044
|
+
}
|
|
3045
|
+
console.log(`🔄 TabSyncAuthManager: Tab ${this.tabId} sincronizzato con token esistente`);
|
|
3046
|
+
}
|
|
3047
|
+
startRefreshTimer(timeoutMs) {
|
|
3048
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
3049
|
+
console.log(`🔄 TabSyncAuthManager: Tab ${this.tabId} timer refresh impostato per ${timeoutMs}ms`);
|
|
3050
|
+
if (this.refreshTimeout) {
|
|
3051
|
+
clearTimeout(this.refreshTimeout);
|
|
3052
|
+
}
|
|
3053
|
+
this.refreshTimeout = setTimeout(() => __awaiter(this, void 0, void 0, function* () {
|
|
3054
|
+
yield this.coordinatedRefresh();
|
|
3055
|
+
}), timeoutMs);
|
|
3056
|
+
});
|
|
3057
|
+
}
|
|
3058
|
+
stopRefreshTimer() {
|
|
3059
|
+
if (this.refreshTimeout) {
|
|
3060
|
+
clearTimeout(this.refreshTimeout);
|
|
3061
|
+
this.refreshTimeout = null;
|
|
3062
|
+
console.log(`🔄 TabSyncAuthManager: Tab ${this.tabId} timer refresh fermato`);
|
|
3063
|
+
}
|
|
3064
|
+
}
|
|
3065
|
+
// Metodi per compatibilità con RefreshTokenManager
|
|
3066
|
+
start(timeoutMs) {
|
|
3067
|
+
this.startRefreshTimer(timeoutMs);
|
|
3068
|
+
}
|
|
3069
|
+
stop() {
|
|
3070
|
+
this.stopRefreshTimer();
|
|
3071
|
+
}
|
|
3072
|
+
coordinatedRefresh() {
|
|
3073
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
3074
|
+
console.log(`🔄 TabSyncAuthManager: Tab ${this.tabId} tentativo di acquisizione lock per refresh`);
|
|
3075
|
+
if (yield this.acquireLock()) {
|
|
3076
|
+
console.log(`🔄 TabSyncAuthManager: Tab ${this.tabId} lock acquisito, eseguo refresh`);
|
|
3077
|
+
try {
|
|
3078
|
+
const success = yield this.refreshTokenAction();
|
|
3079
|
+
if (success) {
|
|
3080
|
+
console.log(`🔄 TabSyncAuthManager: Tab ${this.tabId} refresh completato con successo`);
|
|
3081
|
+
this.broadcastMessage({
|
|
3082
|
+
type: 'TOKEN_REFRESHED',
|
|
3083
|
+
tabId: this.tabId,
|
|
3084
|
+
timestamp: Date.now()
|
|
3085
|
+
});
|
|
3086
|
+
this.scheduleNextRefresh();
|
|
3087
|
+
} else {
|
|
3088
|
+
console.error(`🔄 TabSyncAuthManager: Tab ${this.tabId} refresh fallito`);
|
|
3089
|
+
this.broadcastMessage({
|
|
3090
|
+
type: 'TOKEN_REFRESH_FAILED',
|
|
3091
|
+
tabId: this.tabId,
|
|
3092
|
+
timestamp: Date.now()
|
|
3093
|
+
});
|
|
3094
|
+
}
|
|
3095
|
+
} catch (error) {
|
|
3096
|
+
console.error(`🔄 TabSyncAuthManager: Tab ${this.tabId} errore durante refresh`, error);
|
|
3097
|
+
this.broadcastMessage({
|
|
3098
|
+
type: 'TOKEN_REFRESH_FAILED',
|
|
3099
|
+
tabId: this.tabId,
|
|
3100
|
+
timestamp: Date.now()
|
|
3101
|
+
});
|
|
3102
|
+
} finally {
|
|
3103
|
+
this.releaseLock();
|
|
3104
|
+
}
|
|
3105
|
+
} else {
|
|
3106
|
+
console.log(`🔄 TabSyncAuthManager: Tab ${this.tabId} lock non acquisito, aspetto aggiornamento da altro tab`);
|
|
3107
|
+
// Non fa nulla, aspetta che il tab che ha il lock completi il refresh
|
|
3108
|
+
// Il timer verrà reimpostato quando riceverà TOKEN_REFRESHED
|
|
3109
|
+
}
|
|
3110
|
+
});
|
|
3111
|
+
}
|
|
3112
|
+
acquireLock() {
|
|
3113
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
3114
|
+
const maxRetries = 3;
|
|
3115
|
+
const retryDelayMs = 50; // Piccolo delay tra retry
|
|
3116
|
+
for (let attempt = 0; attempt < maxRetries; attempt++) {
|
|
3117
|
+
if (yield this.tryAcquireLockOnce()) {
|
|
3118
|
+
return true;
|
|
3119
|
+
}
|
|
3120
|
+
// Piccolo delay random per evitare sincronizzazione
|
|
3121
|
+
yield new Promise(resolve => setTimeout(resolve, retryDelayMs + Math.random() * 20));
|
|
3122
|
+
}
|
|
3123
|
+
return false;
|
|
3124
|
+
});
|
|
3125
|
+
}
|
|
3126
|
+
tryAcquireLockOnce() {
|
|
3127
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
3128
|
+
const now = Date.now();
|
|
3129
|
+
const lockData = {
|
|
3130
|
+
tabId: this.tabId,
|
|
3131
|
+
timestamp: now,
|
|
3132
|
+
expiresAt: now + LOCK_TIMEOUT_MS
|
|
3133
|
+
};
|
|
3134
|
+
try {
|
|
3135
|
+
// FASE 1: Controllo se esiste già un lock valido
|
|
3136
|
+
const existingLockStr = localStorage.getItem(LOCK_KEY);
|
|
3137
|
+
if (existingLockStr) {
|
|
3138
|
+
try {
|
|
3139
|
+
const existingLock = JSON.parse(existingLockStr);
|
|
3140
|
+
// Se il lock non è scaduto e non è il nostro, non possiamo acquisirlo
|
|
3141
|
+
if (existingLock.expiresAt > now && existingLock.tabId !== this.tabId) {
|
|
3142
|
+
console.log(`🔄 TabSyncAuthManager: Tab ${this.tabId} lock già occupato da tab ${existingLock.tabId} (scade in ${existingLock.expiresAt - now}ms)`);
|
|
3143
|
+
return false;
|
|
3144
|
+
}
|
|
3145
|
+
} catch (parseError) {
|
|
3146
|
+
console.warn(`🔄 TabSyncAuthManager: Tab ${this.tabId} lock corrotto, procedo con acquisizione`);
|
|
3147
|
+
// Lock corrotto, procediamo con l'acquisizione
|
|
3148
|
+
}
|
|
3149
|
+
}
|
|
3150
|
+
// FASE 2: Tentativo di acquisizione con timestamp unico
|
|
3151
|
+
const uniqueLockData = Object.assign(Object.assign({}, lockData), {
|
|
3152
|
+
timestamp: now + Math.random() // Timestamp leggermente diverso per evitare collisioni
|
|
3153
|
+
});
|
|
3154
|
+
localStorage.setItem(LOCK_KEY, JSON.stringify(uniqueLockData));
|
|
3155
|
+
// FASE 3: Verifica IMMEDIATA che il lock sia nostro
|
|
3156
|
+
// Piccolo delay per permettere ad altri tab di scrivere
|
|
3157
|
+
yield new Promise(resolve => setTimeout(resolve, 10));
|
|
3158
|
+
const verifyLockStr = localStorage.getItem(LOCK_KEY);
|
|
3159
|
+
if (!verifyLockStr) {
|
|
3160
|
+
console.log(`🔄 TabSyncAuthManager: Tab ${this.tabId} lock scomparso durante verifica`);
|
|
3161
|
+
return false;
|
|
3162
|
+
}
|
|
3163
|
+
try {
|
|
3164
|
+
const verifyLock = JSON.parse(verifyLockStr);
|
|
3165
|
+
// Verifica che il tabId sia esattamente il nostro
|
|
3166
|
+
if (verifyLock.tabId === this.tabId) {
|
|
3167
|
+
console.log(`🔄 TabSyncAuthManager: Tab ${this.tabId} lock acquisito con successo (timestamp: ${verifyLock.timestamp})`);
|
|
3168
|
+
return true;
|
|
3169
|
+
} else {
|
|
3170
|
+
console.log(`🔄 TabSyncAuthManager: Tab ${this.tabId} lock perso, ora appartiene a tab ${verifyLock.tabId}`);
|
|
3171
|
+
return false;
|
|
3172
|
+
}
|
|
3173
|
+
} catch (parseError) {
|
|
3174
|
+
console.error(`🔄 TabSyncAuthManager: Tab ${this.tabId} errore parsing verifica lock`, parseError);
|
|
3175
|
+
return false;
|
|
3176
|
+
}
|
|
3177
|
+
} catch (error) {
|
|
3178
|
+
console.error(`🔄 TabSyncAuthManager: Tab ${this.tabId} errore durante acquisizione lock`, error);
|
|
3179
|
+
return false;
|
|
3180
|
+
}
|
|
3181
|
+
});
|
|
3182
|
+
}
|
|
3183
|
+
releaseLock() {
|
|
3184
|
+
try {
|
|
3185
|
+
const lockStr = localStorage.getItem(LOCK_KEY);
|
|
3186
|
+
if (lockStr) {
|
|
3187
|
+
const lock = JSON.parse(lockStr);
|
|
3188
|
+
if (lock.tabId === this.tabId) {
|
|
3189
|
+
localStorage.removeItem(LOCK_KEY);
|
|
3190
|
+
console.log(`🔄 TabSyncAuthManager: Tab ${this.tabId} lock rilasciato`);
|
|
3191
|
+
}
|
|
3192
|
+
}
|
|
3193
|
+
} catch (error) {
|
|
3194
|
+
console.error(`🔄 TabSyncAuthManager: Tab ${this.tabId} errore durante rilascio lock`, error);
|
|
3195
|
+
}
|
|
3196
|
+
}
|
|
3197
|
+
cleanupOrphanedLocks() {
|
|
3198
|
+
try {
|
|
3199
|
+
const lockStr = localStorage.getItem(LOCK_KEY);
|
|
3200
|
+
if (lockStr) {
|
|
3201
|
+
const lock = JSON.parse(lockStr);
|
|
3202
|
+
const now = Date.now();
|
|
3203
|
+
if (lock.expiresAt < now) {
|
|
3204
|
+
localStorage.removeItem(LOCK_KEY);
|
|
3205
|
+
console.log(`🔄 TabSyncAuthManager: Tab ${this.tabId} rimosso lock orfano di tab ${lock.tabId}`);
|
|
3206
|
+
}
|
|
3207
|
+
}
|
|
3208
|
+
} catch (error) {
|
|
3209
|
+
console.error(`🔄 TabSyncAuthManager: Tab ${this.tabId} errore durante cleanup lock`, error);
|
|
3210
|
+
}
|
|
3211
|
+
}
|
|
3212
|
+
scheduleNextRefresh() {
|
|
3213
|
+
// Calcola il tempo rimanente per il prossimo refresh
|
|
3214
|
+
const remainingLifetimeMs = this.getJwtTokenRemainingLifetime();
|
|
3215
|
+
if (remainingLifetimeMs) {
|
|
3216
|
+
const timeoutMs = remainingLifetimeMs - 30000; // 30 secondi di margine
|
|
3217
|
+
if (timeoutMs > 0) {
|
|
3218
|
+
this.startRefreshTimer(timeoutMs);
|
|
3219
|
+
} else {
|
|
3220
|
+
// Token scade molto presto, refresh immediato
|
|
3221
|
+
setTimeout(() => this.coordinatedRefresh(), 1000);
|
|
3222
|
+
}
|
|
3223
|
+
}
|
|
3224
|
+
}
|
|
3225
|
+
getJwtTokenRemainingLifetime() {
|
|
3226
|
+
console.log(`🔄 TabSyncAuthManager: Tab ${this.tabId} calcolo tempo rimanente del token`);
|
|
3227
|
+
const token = localStorage.getItem(LocalStorageConstants.accessToken);
|
|
3228
|
+
if (!token) {
|
|
3229
|
+
console.warn(`🔄 TabSyncAuthManager: Tab ${this.tabId} nessun access token trovato`);
|
|
3230
|
+
return null;
|
|
3231
|
+
}
|
|
3232
|
+
try {
|
|
3233
|
+
const decoded = o(token);
|
|
3234
|
+
const expTimeInSeconds = decoded.exp;
|
|
3235
|
+
const currentTimeInMs = Date.now();
|
|
3236
|
+
const expTimeInMs = expTimeInSeconds * 1000;
|
|
3237
|
+
const diffMs = expTimeInMs - currentTimeInMs;
|
|
3238
|
+
console.log(`🔄 TabSyncAuthManager: Tab ${this.tabId} token scade in ${diffMs}ms (${Math.round(diffMs / 1000 / 60)} minuti)`);
|
|
3239
|
+
return diffMs <= 0 ? 0 : diffMs;
|
|
3240
|
+
} catch (error) {
|
|
3241
|
+
console.error(`🔄 TabSyncAuthManager: Tab ${this.tabId} errore decodifica JWT token`, error);
|
|
3242
|
+
return null;
|
|
3243
|
+
}
|
|
3244
|
+
}
|
|
3245
|
+
sendHeartbeat() {
|
|
3246
|
+
// Riduco il logging degli heartbeat per evitare spam
|
|
3247
|
+
this.broadcastMessage({
|
|
3248
|
+
type: 'HEARTBEAT',
|
|
3249
|
+
tabId: this.tabId,
|
|
3250
|
+
timestamp: Date.now()
|
|
3251
|
+
});
|
|
3252
|
+
}
|
|
3253
|
+
broadcastMessage(message) {
|
|
3254
|
+
try {
|
|
3255
|
+
this.broadcastChannel.postMessage(message);
|
|
3256
|
+
} catch (error) {
|
|
3257
|
+
console.error(`🔄 TabSyncAuthManager: Tab ${this.tabId} errore durante broadcast`, error);
|
|
3258
|
+
}
|
|
3259
|
+
}
|
|
3260
|
+
destroy() {
|
|
3261
|
+
console.log(`🔄 TabSyncAuthManager: Tab ${this.tabId} distruzione in corso`);
|
|
3262
|
+
this.isDestroyed = true;
|
|
3263
|
+
// Ferma tutti i timer
|
|
3264
|
+
this.stopRefreshTimer();
|
|
3265
|
+
if (this.heartbeatInterval) {
|
|
3266
|
+
clearInterval(this.heartbeatInterval);
|
|
3267
|
+
this.heartbeatInterval = null;
|
|
3268
|
+
}
|
|
3269
|
+
if (this.lockCleanupInterval) {
|
|
3270
|
+
clearInterval(this.lockCleanupInterval);
|
|
3271
|
+
this.lockCleanupInterval = null;
|
|
3272
|
+
}
|
|
3273
|
+
// Rilascia il lock se lo abbiamo
|
|
3274
|
+
this.releaseLock();
|
|
3275
|
+
// Chiudi il broadcast channel
|
|
3276
|
+
this.broadcastChannel.close();
|
|
3277
|
+
console.log(`🔄 TabSyncAuthManager: Tab ${this.tabId} distrutto`);
|
|
3278
|
+
}
|
|
3279
|
+
}
|
|
3280
|
+
|
|
2867
3281
|
// Costanti per la gestione del refresh token
|
|
2868
3282
|
const REFRESH_TOKEN_SAFETY_MARGIN_MS = 30000; // 30 secondi prima della scadenza
|
|
2869
3283
|
class AuthService {
|
|
2870
3284
|
constructor() {
|
|
2871
3285
|
this.isRefreshingToken = false;
|
|
2872
3286
|
console.log("🔐 AuthService: Inizializzazione");
|
|
2873
|
-
|
|
3287
|
+
TabSyncAuthManager.Init(() => this.refreshToken(), () => this.logout());
|
|
2874
3288
|
}
|
|
2875
3289
|
setup() {
|
|
2876
3290
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -2908,7 +3322,7 @@ class AuthService {
|
|
|
2908
3322
|
if (remainingLifetimeMs) {
|
|
2909
3323
|
const timeoutMs = remainingLifetimeMs - REFRESH_TOKEN_SAFETY_MARGIN_MS;
|
|
2910
3324
|
console.log(`🔐 AuthService: Tempo rimanente: ${remainingLifetimeMs}ms, imposto refresh tra ${timeoutMs}ms`);
|
|
2911
|
-
|
|
3325
|
+
TabSyncAuthManager.Instance.start(timeoutMs);
|
|
2912
3326
|
} else {
|
|
2913
3327
|
console.log("🔐 AuthService: Impossibile calcolare tempo rimanente per il token");
|
|
2914
3328
|
}
|
|
@@ -2947,7 +3361,7 @@ class AuthService {
|
|
|
2947
3361
|
if (remainingLifetimeMs) {
|
|
2948
3362
|
const timeoutMs = remainingLifetimeMs - REFRESH_TOKEN_SAFETY_MARGIN_MS;
|
|
2949
3363
|
console.log(`🔐 AuthService: Imposto refresh token tra ${timeoutMs}ms`);
|
|
2950
|
-
|
|
3364
|
+
TabSyncAuthManager.Instance.start(timeoutMs);
|
|
2951
3365
|
} else {
|
|
2952
3366
|
console.log("🔐 AuthService: Impossibile calcolare tempo rimanente per il token");
|
|
2953
3367
|
}
|
|
@@ -2965,7 +3379,7 @@ class AuthService {
|
|
|
2965
3379
|
}
|
|
2966
3380
|
logout() {
|
|
2967
3381
|
console.log("🔐 AuthService: Esecuzione logout");
|
|
2968
|
-
|
|
3382
|
+
TabSyncAuthManager.Instance.stop();
|
|
2969
3383
|
localStorage.removeItem(LocalStorageConstants.accessToken);
|
|
2970
3384
|
localStorage.removeItem(LocalStorageConstants.userData);
|
|
2971
3385
|
console.log("🔐 AuthService: Token e dati utente rimossi da localStorage");
|
|
@@ -2992,13 +3406,13 @@ class AuthService {
|
|
|
2992
3406
|
localStorage.setItem(LocalStorageConstants.accessToken, data.token);
|
|
2993
3407
|
localStorage.setItem(LocalStorageConstants.userData, JSON.stringify(data.userData));
|
|
2994
3408
|
console.log("🔐 AuthService: Nuovo token e dati utente salvati in localStorage");
|
|
2995
|
-
|
|
3409
|
+
TabSyncAuthManager.Instance.stop();
|
|
2996
3410
|
console.log("🔐 AuthService: Timeout precedente fermato");
|
|
2997
3411
|
const remainingLifetimeMs = AuthService.getJwtTokenRemainingLifetime();
|
|
2998
3412
|
if (remainingLifetimeMs) {
|
|
2999
3413
|
const timeoutMs = remainingLifetimeMs - REFRESH_TOKEN_SAFETY_MARGIN_MS;
|
|
3000
3414
|
console.log(`🔐 AuthService: Imposto nuovo refresh token tra ${timeoutMs}ms`);
|
|
3001
|
-
|
|
3415
|
+
TabSyncAuthManager.Instance.start(timeoutMs);
|
|
3002
3416
|
} else {
|
|
3003
3417
|
console.log("🔐 AuthService: Impossibile calcolare tempo rimanente per il nuovo token");
|
|
3004
3418
|
}
|
|
@@ -3035,62 +3449,6 @@ class AuthService {
|
|
|
3035
3449
|
}
|
|
3036
3450
|
}
|
|
3037
3451
|
}
|
|
3038
|
-
class RefreshTokenManager {
|
|
3039
|
-
constructor(refreshAction, onErrorCallback) {
|
|
3040
|
-
this._refreshTokenTimeout = null;
|
|
3041
|
-
console.log("🔄 RefreshTokenManager: Inizializzazione");
|
|
3042
|
-
this._refreshTokenAction = refreshAction;
|
|
3043
|
-
this._onErrorCallback = onErrorCallback;
|
|
3044
|
-
}
|
|
3045
|
-
static Init(refreshAction, onErrorCallback) {
|
|
3046
|
-
console.log("🔄 RefreshTokenManager: Init chiamato");
|
|
3047
|
-
if (!this._instance) {
|
|
3048
|
-
console.log("🔄 RefreshTokenManager: Creazione nuova istanza");
|
|
3049
|
-
this._instance = new RefreshTokenManager(refreshAction, onErrorCallback);
|
|
3050
|
-
} else {
|
|
3051
|
-
console.log("🔄 RefreshTokenManager: Istanza già esistente");
|
|
3052
|
-
}
|
|
3053
|
-
}
|
|
3054
|
-
static get Instance() {
|
|
3055
|
-
if (!this._instance) {
|
|
3056
|
-
console.error("🔄 RefreshTokenManager: Tentativo di accesso all'istanza prima dell'inizializzazione");
|
|
3057
|
-
throw new Error('RefreshTokenManager not initialized');
|
|
3058
|
-
}
|
|
3059
|
-
return this._instance;
|
|
3060
|
-
}
|
|
3061
|
-
start(timeoutMs) {
|
|
3062
|
-
// Arrotonda il timeout a un valore positivo
|
|
3063
|
-
const safeTimeoutMs = Math.max(1000, Math.floor(timeoutMs));
|
|
3064
|
-
console.log(`🔄 RefreshTokenManager: Avvio refresh token in: ${safeTimeoutMs}ms (${Math.round(safeTimeoutMs / 1000 / 60)} minuti)`);
|
|
3065
|
-
// Assicuriamoci di fermare qualsiasi timeout precedente
|
|
3066
|
-
this.stop();
|
|
3067
|
-
this._refreshTokenTimeout = setTimeout(() => __awaiter(this, void 0, void 0, function* () {
|
|
3068
|
-
console.log("🔄 RefreshTokenManager: Timeout scaduto, esecuzione refresh token");
|
|
3069
|
-
try {
|
|
3070
|
-
const success = yield this._refreshTokenAction();
|
|
3071
|
-
console.log(`🔄 RefreshTokenManager: Refresh token completato con ${success ? 'successo' : 'fallimento'}`);
|
|
3072
|
-
if (!success) {
|
|
3073
|
-
console.log("🔄 RefreshTokenManager: Chiamata callback di errore");
|
|
3074
|
-
this._onErrorCallback();
|
|
3075
|
-
}
|
|
3076
|
-
} catch (error) {
|
|
3077
|
-
console.error('🔄 RefreshTokenManager: Errore durante refresh token', error);
|
|
3078
|
-
console.log("🔄 RefreshTokenManager: Chiamata callback di errore dopo eccezione");
|
|
3079
|
-
this._onErrorCallback();
|
|
3080
|
-
}
|
|
3081
|
-
}), safeTimeoutMs);
|
|
3082
|
-
}
|
|
3083
|
-
stop() {
|
|
3084
|
-
console.log('🔄 RefreshTokenManager: Stop refresh token');
|
|
3085
|
-
if (this._refreshTokenTimeout) {
|
|
3086
|
-
console.log('🔄 RefreshTokenManager: Cancellazione timeout esistente');
|
|
3087
|
-
clearTimeout(this._refreshTokenTimeout);
|
|
3088
|
-
this._refreshTokenTimeout = null;
|
|
3089
|
-
} else {
|
|
3090
|
-
console.log('🔄 RefreshTokenManager: Nessun timeout attivo da cancellare');
|
|
3091
|
-
}
|
|
3092
|
-
}
|
|
3093
|
-
}
|
|
3094
3452
|
|
|
3095
3453
|
exports.FluxoACLMode = void 0;
|
|
3096
3454
|
(function (FluxoACLMode) {
|
|
@@ -3153,6 +3511,14 @@ class ConfigurationService {
|
|
|
3153
3511
|
getAllDomainRoleFrontends() {
|
|
3154
3512
|
return HttpClient.Instance().client.get(`client/frontend`);
|
|
3155
3513
|
}
|
|
3514
|
+
getMultisessionUserState() {
|
|
3515
|
+
return HttpClient.Instance().client.get('client/multisession');
|
|
3516
|
+
}
|
|
3517
|
+
setMultisessionUserState(state) {
|
|
3518
|
+
return HttpClient.Instance().client.post('client/multisession', {
|
|
3519
|
+
state
|
|
3520
|
+
});
|
|
3521
|
+
}
|
|
3156
3522
|
}
|
|
3157
3523
|
|
|
3158
3524
|
class UserService {
|
|
@@ -3208,7 +3574,7 @@ class UserService {
|
|
|
3208
3574
|
}
|
|
3209
3575
|
}
|
|
3210
3576
|
|
|
3211
|
-
var fails$3 = fails$
|
|
3577
|
+
var fails$3 = fails$j;
|
|
3212
3578
|
|
|
3213
3579
|
var correctPrototypeGetter = !fails$3(function () {
|
|
3214
3580
|
function F() { /* empty */ }
|
|
@@ -3253,7 +3619,7 @@ var objectDefineProperties = {};
|
|
|
3253
3619
|
var DESCRIPTORS$2 = descriptors;
|
|
3254
3620
|
var V8_PROTOTYPE_DEFINE_BUG = v8PrototypeDefineBug;
|
|
3255
3621
|
var definePropertyModule = objectDefineProperty;
|
|
3256
|
-
var anObject$8 = anObject$
|
|
3622
|
+
var anObject$8 = anObject$i;
|
|
3257
3623
|
var toIndexedObject = toIndexedObject$4;
|
|
3258
3624
|
var objectKeys = objectKeys$2;
|
|
3259
3625
|
|
|
@@ -3272,7 +3638,7 @@ objectDefineProperties.f = DESCRIPTORS$2 && !V8_PROTOTYPE_DEFINE_BUG ? Object.de
|
|
|
3272
3638
|
};
|
|
3273
3639
|
|
|
3274
3640
|
/* global ActiveXObject -- old IE, WSH */
|
|
3275
|
-
var anObject$7 = anObject$
|
|
3641
|
+
var anObject$7 = anObject$i;
|
|
3276
3642
|
var definePropertiesModule = objectDefineProperties;
|
|
3277
3643
|
var enumBugKeys = enumBugKeys$3;
|
|
3278
3644
|
var hiddenKeys = hiddenKeys$4;
|
|
@@ -3355,11 +3721,11 @@ var objectCreate = Object.create || function create(O, Properties) {
|
|
|
3355
3721
|
return Properties === undefined ? result : definePropertiesModule.f(result, Properties);
|
|
3356
3722
|
};
|
|
3357
3723
|
|
|
3358
|
-
var fails$2 = fails$
|
|
3724
|
+
var fails$2 = fails$j;
|
|
3359
3725
|
var isCallable$2 = isCallable$n;
|
|
3360
3726
|
var isObject$2 = isObject$e;
|
|
3361
3727
|
var getPrototypeOf$1 = objectGetPrototypeOf;
|
|
3362
|
-
var defineBuiltIn$1 = defineBuiltIn$
|
|
3728
|
+
var defineBuiltIn$1 = defineBuiltIn$6;
|
|
3363
3729
|
var wellKnownSymbol$6 = wellKnownSymbol$h;
|
|
3364
3730
|
|
|
3365
3731
|
var ITERATOR$1 = wellKnownSymbol$6('iterator');
|
|
@@ -3401,12 +3767,12 @@ var iteratorsCore = {
|
|
|
3401
3767
|
var $$9 = _export;
|
|
3402
3768
|
var global$2 = global$k;
|
|
3403
3769
|
var anInstance = anInstance$2;
|
|
3404
|
-
var anObject$6 = anObject$
|
|
3770
|
+
var anObject$6 = anObject$i;
|
|
3405
3771
|
var isCallable$1 = isCallable$n;
|
|
3406
3772
|
var getPrototypeOf = objectGetPrototypeOf;
|
|
3407
3773
|
var defineBuiltInAccessor$1 = defineBuiltInAccessor$3;
|
|
3408
3774
|
var createProperty = createProperty$1;
|
|
3409
|
-
var fails$1 = fails$
|
|
3775
|
+
var fails$1 = fails$j;
|
|
3410
3776
|
var hasOwn$1 = hasOwnProperty_1;
|
|
3411
3777
|
var wellKnownSymbol$5 = wellKnownSymbol$h;
|
|
3412
3778
|
var IteratorPrototype$1 = iteratorsCore.IteratorPrototype;
|
|
@@ -3474,7 +3840,7 @@ var getIteratorDirect$5 = function (obj) {
|
|
|
3474
3840
|
var $$8 = _export;
|
|
3475
3841
|
var iterate$2 = iterate$5;
|
|
3476
3842
|
var aCallable$4 = aCallable$d;
|
|
3477
|
-
var anObject$5 = anObject$
|
|
3843
|
+
var anObject$5 = anObject$i;
|
|
3478
3844
|
var getIteratorDirect$4 = getIteratorDirect$5;
|
|
3479
3845
|
|
|
3480
3846
|
// `Iterator.prototype.forEach` method
|
|
@@ -3838,7 +4204,7 @@ var addToUnscopables$1 = addToUnscopables$2;
|
|
|
3838
4204
|
// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
|
|
3839
4205
|
addToUnscopables$1('flat');
|
|
3840
4206
|
|
|
3841
|
-
var defineBuiltIn = defineBuiltIn$
|
|
4207
|
+
var defineBuiltIn = defineBuiltIn$6;
|
|
3842
4208
|
|
|
3843
4209
|
var defineBuiltIns$1 = function (target, src, options) {
|
|
3844
4210
|
for (var key in src) defineBuiltIn(target, key, src[key], options);
|
|
@@ -3927,7 +4293,7 @@ var iteratorCreateProxy = function (nextHandler, IS_ITERATOR) {
|
|
|
3927
4293
|
return IteratorProxy;
|
|
3928
4294
|
};
|
|
3929
4295
|
|
|
3930
|
-
var anObject$4 = anObject$
|
|
4296
|
+
var anObject$4 = anObject$i;
|
|
3931
4297
|
var iteratorClose = iteratorClose$3;
|
|
3932
4298
|
|
|
3933
4299
|
// call something on iterator step with safe closing on error
|
|
@@ -3942,7 +4308,7 @@ var callWithSafeIterationClosing$2 = function (iterator, fn, value, ENTRIES) {
|
|
|
3942
4308
|
var $$6 = _export;
|
|
3943
4309
|
var call$1 = functionCall;
|
|
3944
4310
|
var aCallable$3 = aCallable$d;
|
|
3945
|
-
var anObject$3 = anObject$
|
|
4311
|
+
var anObject$3 = anObject$i;
|
|
3946
4312
|
var getIteratorDirect$3 = getIteratorDirect$5;
|
|
3947
4313
|
var createIteratorProxy$1 = iteratorCreateProxy;
|
|
3948
4314
|
var callWithSafeIterationClosing$1 = callWithSafeIterationClosing$2;
|
|
@@ -3976,7 +4342,7 @@ $$6({ target: 'Iterator', proto: true, real: true, forced: IS_PURE$1 }, {
|
|
|
3976
4342
|
|
|
3977
4343
|
var call = functionCall;
|
|
3978
4344
|
var aCallable$2 = aCallable$d;
|
|
3979
|
-
var anObject$2 = anObject$
|
|
4345
|
+
var anObject$2 = anObject$i;
|
|
3980
4346
|
var getIteratorDirect$2 = getIteratorDirect$5;
|
|
3981
4347
|
var createIteratorProxy = iteratorCreateProxy;
|
|
3982
4348
|
var callWithSafeIterationClosing = callWithSafeIterationClosing$2;
|
|
@@ -4011,7 +4377,7 @@ $$5({ target: 'Iterator', proto: true, real: true, forced: IS_PURE }, {
|
|
|
4011
4377
|
var $$4 = _export;
|
|
4012
4378
|
var iterate$1 = iterate$5;
|
|
4013
4379
|
var aCallable$1 = aCallable$d;
|
|
4014
|
-
var anObject$1 = anObject$
|
|
4380
|
+
var anObject$1 = anObject$i;
|
|
4015
4381
|
var getIteratorDirect$1 = getIteratorDirect$5;
|
|
4016
4382
|
|
|
4017
4383
|
// `Iterator.prototype.some` method
|
|
@@ -4028,18 +4394,8 @@ $$4({ target: 'Iterator', proto: true, real: true }, {
|
|
|
4028
4394
|
}
|
|
4029
4395
|
});
|
|
4030
4396
|
|
|
4031
|
-
const useIsomorphicEffect = typeof document !== "undefined" ? React.useLayoutEffect : React.useEffect;
|
|
4032
|
-
|
|
4033
|
-
function useDocumentTitle(title) {
|
|
4034
|
-
useIsomorphicEffect(() => {
|
|
4035
|
-
if (typeof title === "string" && title.trim().length > 0) {
|
|
4036
|
-
document.title = title.trim();
|
|
4037
|
-
}
|
|
4038
|
-
}, [title]);
|
|
4039
|
-
}
|
|
4040
|
-
|
|
4041
4397
|
function NavigationPage(props) {
|
|
4042
|
-
useDocumentTitle(props.title);
|
|
4398
|
+
//useDocumentTitle(props.title);
|
|
4043
4399
|
return jsxRuntime.jsx(jsxRuntime.Fragment, {
|
|
4044
4400
|
children: props.component
|
|
4045
4401
|
});
|
|
@@ -4726,7 +5082,7 @@ if (DESCRIPTORS && isCallable(NativeSymbol) && (!('description' in SymbolPrototy
|
|
|
4726
5082
|
|
|
4727
5083
|
var $$2 = _export;
|
|
4728
5084
|
var $includes = arrayIncludes.includes;
|
|
4729
|
-
var fails = fails$
|
|
5085
|
+
var fails = fails$j;
|
|
4730
5086
|
var addToUnscopables = addToUnscopables$2;
|
|
4731
5087
|
|
|
4732
5088
|
// FF99+ bug
|
|
@@ -4809,7 +5165,7 @@ $$1({ target: 'String', proto: true, forced: !correctIsRegExpLogic('includes') }
|
|
|
4809
5165
|
var $ = _export;
|
|
4810
5166
|
var iterate = iterate$5;
|
|
4811
5167
|
var aCallable = aCallable$d;
|
|
4812
|
-
var anObject = anObject$
|
|
5168
|
+
var anObject = anObject$i;
|
|
4813
5169
|
var getIteratorDirect = getIteratorDirect$5;
|
|
4814
5170
|
|
|
4815
5171
|
// `Iterator.prototype.every` method
|