@ninetailed/experience.js-plugin-preview 1.0.1-beta.16

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.umd.js ADDED
@@ -0,0 +1,1953 @@
1
+ (function (global, factory) {
2
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('lodash/union'), require('lodash/isEqual'), require('@reduxjs/toolkit')) :
3
+ typeof define === 'function' && define.amd ? define(['exports', 'lodash/union', 'lodash/isEqual', '@reduxjs/toolkit'], factory) :
4
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.PreviewPlugin = {}, global.union, global.isEqual, global.toolkit));
5
+ })(this, (function (exports, union, isEqual, toolkit) { 'use strict';
6
+
7
+ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
8
+
9
+ var union__default = /*#__PURE__*/_interopDefaultLegacy(union);
10
+ var isEqual__default = /*#__PURE__*/_interopDefaultLegacy(isEqual);
11
+
12
+ var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
13
+
14
+ var check = function (it) {
15
+ return it && it.Math == Math && it;
16
+ };
17
+
18
+ // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
19
+ var global$r =
20
+ // eslint-disable-next-line es/no-global-this -- safe
21
+ check(typeof globalThis == 'object' && globalThis) ||
22
+ check(typeof window == 'object' && window) ||
23
+ // eslint-disable-next-line no-restricted-globals -- safe
24
+ check(typeof self == 'object' && self) ||
25
+ check(typeof commonjsGlobal == 'object' && commonjsGlobal) ||
26
+ // eslint-disable-next-line no-new-func -- fallback
27
+ (function () { return this; })() || Function('return this')();
28
+
29
+ var objectGetOwnPropertyDescriptor = {};
30
+
31
+ var fails$a = function (exec) {
32
+ try {
33
+ return !!exec();
34
+ } catch (error) {
35
+ return true;
36
+ }
37
+ };
38
+
39
+ var fails$9 = fails$a;
40
+
41
+ // Detect IE8's incomplete defineProperty implementation
42
+ var descriptors = !fails$9(function () {
43
+ // eslint-disable-next-line es/no-object-defineproperty -- required for testing
44
+ return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] != 7;
45
+ });
46
+
47
+ var fails$8 = fails$a;
48
+
49
+ var functionBindNative = !fails$8(function () {
50
+ var test = (function () { /* empty */ }).bind();
51
+ // eslint-disable-next-line no-prototype-builtins -- safe
52
+ return typeof test != 'function' || test.hasOwnProperty('prototype');
53
+ });
54
+
55
+ var NATIVE_BIND$1 = functionBindNative;
56
+
57
+ var call$6 = Function.prototype.call;
58
+
59
+ var functionCall = NATIVE_BIND$1 ? call$6.bind(call$6) : function () {
60
+ return call$6.apply(call$6, arguments);
61
+ };
62
+
63
+ var objectPropertyIsEnumerable = {};
64
+
65
+ var $propertyIsEnumerable = {}.propertyIsEnumerable;
66
+ // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
67
+ var getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor;
68
+
69
+ // Nashorn ~ JDK8 bug
70
+ var NASHORN_BUG = getOwnPropertyDescriptor$1 && !$propertyIsEnumerable.call({ 1: 2 }, 1);
71
+
72
+ // `Object.prototype.propertyIsEnumerable` method implementation
73
+ // https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable
74
+ objectPropertyIsEnumerable.f = NASHORN_BUG ? function propertyIsEnumerable(V) {
75
+ var descriptor = getOwnPropertyDescriptor$1(this, V);
76
+ return !!descriptor && descriptor.enumerable;
77
+ } : $propertyIsEnumerable;
78
+
79
+ var createPropertyDescriptor$3 = function (bitmap, value) {
80
+ return {
81
+ enumerable: !(bitmap & 1),
82
+ configurable: !(bitmap & 2),
83
+ writable: !(bitmap & 4),
84
+ value: value
85
+ };
86
+ };
87
+
88
+ var NATIVE_BIND = functionBindNative;
89
+
90
+ var FunctionPrototype$1 = Function.prototype;
91
+ var bind = FunctionPrototype$1.bind;
92
+ var call$5 = FunctionPrototype$1.call;
93
+ var uncurryThis$c = NATIVE_BIND && bind.bind(call$5, call$5);
94
+
95
+ var functionUncurryThis = NATIVE_BIND ? function (fn) {
96
+ return fn && uncurryThis$c(fn);
97
+ } : function (fn) {
98
+ return fn && function () {
99
+ return call$5.apply(fn, arguments);
100
+ };
101
+ };
102
+
103
+ var uncurryThis$b = functionUncurryThis;
104
+
105
+ var toString$3 = uncurryThis$b({}.toString);
106
+ var stringSlice = uncurryThis$b(''.slice);
107
+
108
+ var classofRaw$1 = function (it) {
109
+ return stringSlice(toString$3(it), 8, -1);
110
+ };
111
+
112
+ var global$q = global$r;
113
+ var uncurryThis$a = functionUncurryThis;
114
+ var fails$7 = fails$a;
115
+ var classof$3 = classofRaw$1;
116
+
117
+ var Object$5 = global$q.Object;
118
+ var split = uncurryThis$a(''.split);
119
+
120
+ // fallback for non-array-like ES3 and non-enumerable old V8 strings
121
+ var indexedObject = fails$7(function () {
122
+ // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
123
+ // eslint-disable-next-line no-prototype-builtins -- safe
124
+ return !Object$5('z').propertyIsEnumerable(0);
125
+ }) ? function (it) {
126
+ return classof$3(it) == 'String' ? split(it, '') : Object$5(it);
127
+ } : Object$5;
128
+
129
+ var global$p = global$r;
130
+
131
+ var TypeError$9 = global$p.TypeError;
132
+
133
+ // `RequireObjectCoercible` abstract operation
134
+ // https://tc39.es/ecma262/#sec-requireobjectcoercible
135
+ var requireObjectCoercible$3 = function (it) {
136
+ if (it == undefined) throw TypeError$9("Can't call method on " + it);
137
+ return it;
138
+ };
139
+
140
+ // toObject with fallback for non-array-like ES3 strings
141
+ var IndexedObject$1 = indexedObject;
142
+ var requireObjectCoercible$2 = requireObjectCoercible$3;
143
+
144
+ var toIndexedObject$5 = function (it) {
145
+ return IndexedObject$1(requireObjectCoercible$2(it));
146
+ };
147
+
148
+ // `IsCallable` abstract operation
149
+ // https://tc39.es/ecma262/#sec-iscallable
150
+ var isCallable$e = function (argument) {
151
+ return typeof argument == 'function';
152
+ };
153
+
154
+ var isCallable$d = isCallable$e;
155
+
156
+ var isObject$6 = function (it) {
157
+ return typeof it == 'object' ? it !== null : isCallable$d(it);
158
+ };
159
+
160
+ var global$o = global$r;
161
+ var isCallable$c = isCallable$e;
162
+
163
+ var aFunction = function (argument) {
164
+ return isCallable$c(argument) ? argument : undefined;
165
+ };
166
+
167
+ var getBuiltIn$4 = function (namespace, method) {
168
+ return arguments.length < 2 ? aFunction(global$o[namespace]) : global$o[namespace] && global$o[namespace][method];
169
+ };
170
+
171
+ var uncurryThis$9 = functionUncurryThis;
172
+
173
+ var objectIsPrototypeOf = uncurryThis$9({}.isPrototypeOf);
174
+
175
+ var getBuiltIn$3 = getBuiltIn$4;
176
+
177
+ var engineUserAgent = getBuiltIn$3('navigator', 'userAgent') || '';
178
+
179
+ var global$n = global$r;
180
+ var userAgent = engineUserAgent;
181
+
182
+ var process = global$n.process;
183
+ var Deno = global$n.Deno;
184
+ var versions = process && process.versions || Deno && Deno.version;
185
+ var v8 = versions && versions.v8;
186
+ var match, version;
187
+
188
+ if (v8) {
189
+ match = v8.split('.');
190
+ // in old Chrome, versions of V8 isn't V8 = Chrome / 10
191
+ // but their correct versions are not interesting for us
192
+ version = match[0] > 0 && match[0] < 4 ? 1 : +(match[0] + match[1]);
193
+ }
194
+
195
+ // BrowserFS NodeJS `process` polyfill incorrectly set `.v8` to `0.0`
196
+ // so check `userAgent` even if `.v8` exists, but 0
197
+ if (!version && userAgent) {
198
+ match = userAgent.match(/Edge\/(\d+)/);
199
+ if (!match || match[1] >= 74) {
200
+ match = userAgent.match(/Chrome\/(\d+)/);
201
+ if (match) version = +match[1];
202
+ }
203
+ }
204
+
205
+ var engineV8Version = version;
206
+
207
+ /* eslint-disable es/no-symbol -- required for testing */
208
+
209
+ var V8_VERSION = engineV8Version;
210
+ var fails$6 = fails$a;
211
+
212
+ // eslint-disable-next-line es/no-object-getownpropertysymbols -- required for testing
213
+ var nativeSymbol = !!Object.getOwnPropertySymbols && !fails$6(function () {
214
+ var symbol = Symbol();
215
+ // Chrome 38 Symbol has incorrect toString conversion
216
+ // `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances
217
+ return !String(symbol) || !(Object(symbol) instanceof Symbol) ||
218
+ // Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances
219
+ !Symbol.sham && V8_VERSION && V8_VERSION < 41;
220
+ });
221
+
222
+ /* eslint-disable es/no-symbol -- required for testing */
223
+
224
+ var NATIVE_SYMBOL$1 = nativeSymbol;
225
+
226
+ var useSymbolAsUid = NATIVE_SYMBOL$1
227
+ && !Symbol.sham
228
+ && typeof Symbol.iterator == 'symbol';
229
+
230
+ var global$m = global$r;
231
+ var getBuiltIn$2 = getBuiltIn$4;
232
+ var isCallable$b = isCallable$e;
233
+ var isPrototypeOf = objectIsPrototypeOf;
234
+ var USE_SYMBOL_AS_UID$1 = useSymbolAsUid;
235
+
236
+ var Object$4 = global$m.Object;
237
+
238
+ var isSymbol$2 = USE_SYMBOL_AS_UID$1 ? function (it) {
239
+ return typeof it == 'symbol';
240
+ } : function (it) {
241
+ var $Symbol = getBuiltIn$2('Symbol');
242
+ return isCallable$b($Symbol) && isPrototypeOf($Symbol.prototype, Object$4(it));
243
+ };
244
+
245
+ var global$l = global$r;
246
+
247
+ var String$4 = global$l.String;
248
+
249
+ var tryToString$1 = function (argument) {
250
+ try {
251
+ return String$4(argument);
252
+ } catch (error) {
253
+ return 'Object';
254
+ }
255
+ };
256
+
257
+ var global$k = global$r;
258
+ var isCallable$a = isCallable$e;
259
+ var tryToString = tryToString$1;
260
+
261
+ var TypeError$8 = global$k.TypeError;
262
+
263
+ // `Assert: IsCallable(argument) is true`
264
+ var aCallable$1 = function (argument) {
265
+ if (isCallable$a(argument)) return argument;
266
+ throw TypeError$8(tryToString(argument) + ' is not a function');
267
+ };
268
+
269
+ var aCallable = aCallable$1;
270
+
271
+ // `GetMethod` abstract operation
272
+ // https://tc39.es/ecma262/#sec-getmethod
273
+ var getMethod$1 = function (V, P) {
274
+ var func = V[P];
275
+ return func == null ? undefined : aCallable(func);
276
+ };
277
+
278
+ var global$j = global$r;
279
+ var call$4 = functionCall;
280
+ var isCallable$9 = isCallable$e;
281
+ var isObject$5 = isObject$6;
282
+
283
+ var TypeError$7 = global$j.TypeError;
284
+
285
+ // `OrdinaryToPrimitive` abstract operation
286
+ // https://tc39.es/ecma262/#sec-ordinarytoprimitive
287
+ var ordinaryToPrimitive$1 = function (input, pref) {
288
+ var fn, val;
289
+ if (pref === 'string' && isCallable$9(fn = input.toString) && !isObject$5(val = call$4(fn, input))) return val;
290
+ if (isCallable$9(fn = input.valueOf) && !isObject$5(val = call$4(fn, input))) return val;
291
+ if (pref !== 'string' && isCallable$9(fn = input.toString) && !isObject$5(val = call$4(fn, input))) return val;
292
+ throw TypeError$7("Can't convert object to primitive value");
293
+ };
294
+
295
+ var shared$3 = {exports: {}};
296
+
297
+ var global$i = global$r;
298
+
299
+ // eslint-disable-next-line es/no-object-defineproperty -- safe
300
+ var defineProperty$3 = Object.defineProperty;
301
+
302
+ var setGlobal$3 = function (key, value) {
303
+ try {
304
+ defineProperty$3(global$i, key, { value: value, configurable: true, writable: true });
305
+ } catch (error) {
306
+ global$i[key] = value;
307
+ } return value;
308
+ };
309
+
310
+ var global$h = global$r;
311
+ var setGlobal$2 = setGlobal$3;
312
+
313
+ var SHARED = '__core-js_shared__';
314
+ var store$4 = global$h[SHARED] || setGlobal$2(SHARED, {});
315
+
316
+ var sharedStore = store$4;
317
+
318
+ var store$3 = sharedStore;
319
+
320
+ (shared$3.exports = function (key, value) {
321
+ return store$3[key] || (store$3[key] = value !== undefined ? value : {});
322
+ })('versions', []).push({
323
+ version: '3.21.1',
324
+ mode: 'global',
325
+ copyright: '© 2014-2022 Denis Pushkarev (zloirock.ru)',
326
+ license: 'https://github.com/zloirock/core-js/blob/v3.21.1/LICENSE',
327
+ source: 'https://github.com/zloirock/core-js'
328
+ });
329
+
330
+ var global$g = global$r;
331
+ var requireObjectCoercible$1 = requireObjectCoercible$3;
332
+
333
+ var Object$3 = global$g.Object;
334
+
335
+ // `ToObject` abstract operation
336
+ // https://tc39.es/ecma262/#sec-toobject
337
+ var toObject$3 = function (argument) {
338
+ return Object$3(requireObjectCoercible$1(argument));
339
+ };
340
+
341
+ var uncurryThis$8 = functionUncurryThis;
342
+ var toObject$2 = toObject$3;
343
+
344
+ var hasOwnProperty = uncurryThis$8({}.hasOwnProperty);
345
+
346
+ // `HasOwnProperty` abstract operation
347
+ // https://tc39.es/ecma262/#sec-hasownproperty
348
+ var hasOwnProperty_1 = Object.hasOwn || function hasOwn(it, key) {
349
+ return hasOwnProperty(toObject$2(it), key);
350
+ };
351
+
352
+ var uncurryThis$7 = functionUncurryThis;
353
+
354
+ var id = 0;
355
+ var postfix = Math.random();
356
+ var toString$2 = uncurryThis$7(1.0.toString);
357
+
358
+ var uid$2 = function (key) {
359
+ return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString$2(++id + postfix, 36);
360
+ };
361
+
362
+ var global$f = global$r;
363
+ var shared$2 = shared$3.exports;
364
+ var hasOwn$8 = hasOwnProperty_1;
365
+ var uid$1 = uid$2;
366
+ var NATIVE_SYMBOL = nativeSymbol;
367
+ var USE_SYMBOL_AS_UID = useSymbolAsUid;
368
+
369
+ var WellKnownSymbolsStore = shared$2('wks');
370
+ var Symbol$1 = global$f.Symbol;
371
+ var symbolFor = Symbol$1 && Symbol$1['for'];
372
+ var createWellKnownSymbol = USE_SYMBOL_AS_UID ? Symbol$1 : Symbol$1 && Symbol$1.withoutSetter || uid$1;
373
+
374
+ var wellKnownSymbol$a = function (name) {
375
+ if (!hasOwn$8(WellKnownSymbolsStore, name) || !(NATIVE_SYMBOL || typeof WellKnownSymbolsStore[name] == 'string')) {
376
+ var description = 'Symbol.' + name;
377
+ if (NATIVE_SYMBOL && hasOwn$8(Symbol$1, name)) {
378
+ WellKnownSymbolsStore[name] = Symbol$1[name];
379
+ } else if (USE_SYMBOL_AS_UID && symbolFor) {
380
+ WellKnownSymbolsStore[name] = symbolFor(description);
381
+ } else {
382
+ WellKnownSymbolsStore[name] = createWellKnownSymbol(description);
383
+ }
384
+ } return WellKnownSymbolsStore[name];
385
+ };
386
+
387
+ var global$e = global$r;
388
+ var call$3 = functionCall;
389
+ var isObject$4 = isObject$6;
390
+ var isSymbol$1 = isSymbol$2;
391
+ var getMethod = getMethod$1;
392
+ var ordinaryToPrimitive = ordinaryToPrimitive$1;
393
+ var wellKnownSymbol$9 = wellKnownSymbol$a;
394
+
395
+ var TypeError$6 = global$e.TypeError;
396
+ var TO_PRIMITIVE = wellKnownSymbol$9('toPrimitive');
397
+
398
+ // `ToPrimitive` abstract operation
399
+ // https://tc39.es/ecma262/#sec-toprimitive
400
+ var toPrimitive$1 = function (input, pref) {
401
+ if (!isObject$4(input) || isSymbol$1(input)) return input;
402
+ var exoticToPrim = getMethod(input, TO_PRIMITIVE);
403
+ var result;
404
+ if (exoticToPrim) {
405
+ if (pref === undefined) pref = 'default';
406
+ result = call$3(exoticToPrim, input, pref);
407
+ if (!isObject$4(result) || isSymbol$1(result)) return result;
408
+ throw TypeError$6("Can't convert object to primitive value");
409
+ }
410
+ if (pref === undefined) pref = 'number';
411
+ return ordinaryToPrimitive(input, pref);
412
+ };
413
+
414
+ var toPrimitive = toPrimitive$1;
415
+ var isSymbol = isSymbol$2;
416
+
417
+ // `ToPropertyKey` abstract operation
418
+ // https://tc39.es/ecma262/#sec-topropertykey
419
+ var toPropertyKey$2 = function (argument) {
420
+ var key = toPrimitive(argument, 'string');
421
+ return isSymbol(key) ? key : key + '';
422
+ };
423
+
424
+ var global$d = global$r;
425
+ var isObject$3 = isObject$6;
426
+
427
+ var document$1 = global$d.document;
428
+ // typeof document.createElement is 'object' in old IE
429
+ var EXISTS$1 = isObject$3(document$1) && isObject$3(document$1.createElement);
430
+
431
+ var documentCreateElement$2 = function (it) {
432
+ return EXISTS$1 ? document$1.createElement(it) : {};
433
+ };
434
+
435
+ var DESCRIPTORS$8 = descriptors;
436
+ var fails$5 = fails$a;
437
+ var createElement = documentCreateElement$2;
438
+
439
+ // Thanks to IE8 for its funny defineProperty
440
+ var ie8DomDefine = !DESCRIPTORS$8 && !fails$5(function () {
441
+ // eslint-disable-next-line es/no-object-defineproperty -- required for testing
442
+ return Object.defineProperty(createElement('div'), 'a', {
443
+ get: function () { return 7; }
444
+ }).a != 7;
445
+ });
446
+
447
+ var DESCRIPTORS$7 = descriptors;
448
+ var call$2 = functionCall;
449
+ var propertyIsEnumerableModule$1 = objectPropertyIsEnumerable;
450
+ var createPropertyDescriptor$2 = createPropertyDescriptor$3;
451
+ var toIndexedObject$4 = toIndexedObject$5;
452
+ var toPropertyKey$1 = toPropertyKey$2;
453
+ var hasOwn$7 = hasOwnProperty_1;
454
+ var IE8_DOM_DEFINE$1 = ie8DomDefine;
455
+
456
+ // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
457
+ var $getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor;
458
+
459
+ // `Object.getOwnPropertyDescriptor` method
460
+ // https://tc39.es/ecma262/#sec-object.getownpropertydescriptor
461
+ objectGetOwnPropertyDescriptor.f = DESCRIPTORS$7 ? $getOwnPropertyDescriptor$1 : function getOwnPropertyDescriptor(O, P) {
462
+ O = toIndexedObject$4(O);
463
+ P = toPropertyKey$1(P);
464
+ if (IE8_DOM_DEFINE$1) try {
465
+ return $getOwnPropertyDescriptor$1(O, P);
466
+ } catch (error) { /* empty */ }
467
+ if (hasOwn$7(O, P)) return createPropertyDescriptor$2(!call$2(propertyIsEnumerableModule$1.f, O, P), O[P]);
468
+ };
469
+
470
+ var objectDefineProperty = {};
471
+
472
+ var DESCRIPTORS$6 = descriptors;
473
+ var fails$4 = fails$a;
474
+
475
+ // V8 ~ Chrome 36-
476
+ // https://bugs.chromium.org/p/v8/issues/detail?id=3334
477
+ var v8PrototypeDefineBug = DESCRIPTORS$6 && fails$4(function () {
478
+ // eslint-disable-next-line es/no-object-defineproperty -- required for testing
479
+ return Object.defineProperty(function () { /* empty */ }, 'prototype', {
480
+ value: 42,
481
+ writable: false
482
+ }).prototype != 42;
483
+ });
484
+
485
+ var global$c = global$r;
486
+ var isObject$2 = isObject$6;
487
+
488
+ var String$3 = global$c.String;
489
+ var TypeError$5 = global$c.TypeError;
490
+
491
+ // `Assert: Type(argument) is Object`
492
+ var anObject$5 = function (argument) {
493
+ if (isObject$2(argument)) return argument;
494
+ throw TypeError$5(String$3(argument) + ' is not an object');
495
+ };
496
+
497
+ var global$b = global$r;
498
+ var DESCRIPTORS$5 = descriptors;
499
+ var IE8_DOM_DEFINE = ie8DomDefine;
500
+ var V8_PROTOTYPE_DEFINE_BUG$1 = v8PrototypeDefineBug;
501
+ var anObject$4 = anObject$5;
502
+ var toPropertyKey = toPropertyKey$2;
503
+
504
+ var TypeError$4 = global$b.TypeError;
505
+ // eslint-disable-next-line es/no-object-defineproperty -- safe
506
+ var $defineProperty = Object.defineProperty;
507
+ // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
508
+ var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
509
+ var ENUMERABLE = 'enumerable';
510
+ var CONFIGURABLE$1 = 'configurable';
511
+ var WRITABLE = 'writable';
512
+
513
+ // `Object.defineProperty` method
514
+ // https://tc39.es/ecma262/#sec-object.defineproperty
515
+ objectDefineProperty.f = DESCRIPTORS$5 ? V8_PROTOTYPE_DEFINE_BUG$1 ? function defineProperty(O, P, Attributes) {
516
+ anObject$4(O);
517
+ P = toPropertyKey(P);
518
+ anObject$4(Attributes);
519
+ if (typeof O === 'function' && P === 'prototype' && 'value' in Attributes && WRITABLE in Attributes && !Attributes[WRITABLE]) {
520
+ var current = $getOwnPropertyDescriptor(O, P);
521
+ if (current && current[WRITABLE]) {
522
+ O[P] = Attributes.value;
523
+ Attributes = {
524
+ configurable: CONFIGURABLE$1 in Attributes ? Attributes[CONFIGURABLE$1] : current[CONFIGURABLE$1],
525
+ enumerable: ENUMERABLE in Attributes ? Attributes[ENUMERABLE] : current[ENUMERABLE],
526
+ writable: false
527
+ };
528
+ }
529
+ } return $defineProperty(O, P, Attributes);
530
+ } : $defineProperty : function defineProperty(O, P, Attributes) {
531
+ anObject$4(O);
532
+ P = toPropertyKey(P);
533
+ anObject$4(Attributes);
534
+ if (IE8_DOM_DEFINE) try {
535
+ return $defineProperty(O, P, Attributes);
536
+ } catch (error) { /* empty */ }
537
+ if ('get' in Attributes || 'set' in Attributes) throw TypeError$4('Accessors not supported');
538
+ if ('value' in Attributes) O[P] = Attributes.value;
539
+ return O;
540
+ };
541
+
542
+ var DESCRIPTORS$4 = descriptors;
543
+ var definePropertyModule$3 = objectDefineProperty;
544
+ var createPropertyDescriptor$1 = createPropertyDescriptor$3;
545
+
546
+ var createNonEnumerableProperty$5 = DESCRIPTORS$4 ? function (object, key, value) {
547
+ return definePropertyModule$3.f(object, key, createPropertyDescriptor$1(1, value));
548
+ } : function (object, key, value) {
549
+ object[key] = value;
550
+ return object;
551
+ };
552
+
553
+ var redefine$3 = {exports: {}};
554
+
555
+ var uncurryThis$6 = functionUncurryThis;
556
+ var isCallable$8 = isCallable$e;
557
+ var store$2 = sharedStore;
558
+
559
+ var functionToString = uncurryThis$6(Function.toString);
560
+
561
+ // this helper broken in `core-js@3.4.1-3.4.4`, so we can't use `shared` helper
562
+ if (!isCallable$8(store$2.inspectSource)) {
563
+ store$2.inspectSource = function (it) {
564
+ return functionToString(it);
565
+ };
566
+ }
567
+
568
+ var inspectSource$2 = store$2.inspectSource;
569
+
570
+ var global$a = global$r;
571
+ var isCallable$7 = isCallable$e;
572
+ var inspectSource$1 = inspectSource$2;
573
+
574
+ var WeakMap$1 = global$a.WeakMap;
575
+
576
+ var nativeWeakMap = isCallable$7(WeakMap$1) && /native code/.test(inspectSource$1(WeakMap$1));
577
+
578
+ var shared$1 = shared$3.exports;
579
+ var uid = uid$2;
580
+
581
+ var keys = shared$1('keys');
582
+
583
+ var sharedKey$3 = function (key) {
584
+ return keys[key] || (keys[key] = uid(key));
585
+ };
586
+
587
+ var hiddenKeys$4 = {};
588
+
589
+ var NATIVE_WEAK_MAP = nativeWeakMap;
590
+ var global$9 = global$r;
591
+ var uncurryThis$5 = functionUncurryThis;
592
+ var isObject$1 = isObject$6;
593
+ var createNonEnumerableProperty$4 = createNonEnumerableProperty$5;
594
+ var hasOwn$6 = hasOwnProperty_1;
595
+ var shared = sharedStore;
596
+ var sharedKey$2 = sharedKey$3;
597
+ var hiddenKeys$3 = hiddenKeys$4;
598
+
599
+ var OBJECT_ALREADY_INITIALIZED = 'Object already initialized';
600
+ var TypeError$3 = global$9.TypeError;
601
+ var WeakMap = global$9.WeakMap;
602
+ var set, get, has;
603
+
604
+ var enforce = function (it) {
605
+ return has(it) ? get(it) : set(it, {});
606
+ };
607
+
608
+ var getterFor = function (TYPE) {
609
+ return function (it) {
610
+ var state;
611
+ if (!isObject$1(it) || (state = get(it)).type !== TYPE) {
612
+ throw TypeError$3('Incompatible receiver, ' + TYPE + ' required');
613
+ } return state;
614
+ };
615
+ };
616
+
617
+ if (NATIVE_WEAK_MAP || shared.state) {
618
+ var store$1 = shared.state || (shared.state = new WeakMap());
619
+ var wmget = uncurryThis$5(store$1.get);
620
+ var wmhas = uncurryThis$5(store$1.has);
621
+ var wmset = uncurryThis$5(store$1.set);
622
+ set = function (it, metadata) {
623
+ if (wmhas(store$1, it)) throw new TypeError$3(OBJECT_ALREADY_INITIALIZED);
624
+ metadata.facade = it;
625
+ wmset(store$1, it, metadata);
626
+ return metadata;
627
+ };
628
+ get = function (it) {
629
+ return wmget(store$1, it) || {};
630
+ };
631
+ has = function (it) {
632
+ return wmhas(store$1, it);
633
+ };
634
+ } else {
635
+ var STATE = sharedKey$2('state');
636
+ hiddenKeys$3[STATE] = true;
637
+ set = function (it, metadata) {
638
+ if (hasOwn$6(it, STATE)) throw new TypeError$3(OBJECT_ALREADY_INITIALIZED);
639
+ metadata.facade = it;
640
+ createNonEnumerableProperty$4(it, STATE, metadata);
641
+ return metadata;
642
+ };
643
+ get = function (it) {
644
+ return hasOwn$6(it, STATE) ? it[STATE] : {};
645
+ };
646
+ has = function (it) {
647
+ return hasOwn$6(it, STATE);
648
+ };
649
+ }
650
+
651
+ var internalState = {
652
+ set: set,
653
+ get: get,
654
+ has: has,
655
+ enforce: enforce,
656
+ getterFor: getterFor
657
+ };
658
+
659
+ var DESCRIPTORS$3 = descriptors;
660
+ var hasOwn$5 = hasOwnProperty_1;
661
+
662
+ var FunctionPrototype = Function.prototype;
663
+ // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
664
+ var getDescriptor = DESCRIPTORS$3 && Object.getOwnPropertyDescriptor;
665
+
666
+ var EXISTS = hasOwn$5(FunctionPrototype, 'name');
667
+ // additional protection from minified / mangled / dropped function names
668
+ var PROPER = EXISTS && (function something() { /* empty */ }).name === 'something';
669
+ var CONFIGURABLE = EXISTS && (!DESCRIPTORS$3 || (DESCRIPTORS$3 && getDescriptor(FunctionPrototype, 'name').configurable));
670
+
671
+ var functionName = {
672
+ EXISTS: EXISTS,
673
+ PROPER: PROPER,
674
+ CONFIGURABLE: CONFIGURABLE
675
+ };
676
+
677
+ var global$8 = global$r;
678
+ var isCallable$6 = isCallable$e;
679
+ var hasOwn$4 = hasOwnProperty_1;
680
+ var createNonEnumerableProperty$3 = createNonEnumerableProperty$5;
681
+ var setGlobal$1 = setGlobal$3;
682
+ var inspectSource = inspectSource$2;
683
+ var InternalStateModule$1 = internalState;
684
+ var CONFIGURABLE_FUNCTION_NAME$1 = functionName.CONFIGURABLE;
685
+
686
+ var getInternalState$1 = InternalStateModule$1.get;
687
+ var enforceInternalState = InternalStateModule$1.enforce;
688
+ var TEMPLATE = String(String).split('String');
689
+
690
+ (redefine$3.exports = function (O, key, value, options) {
691
+ var unsafe = options ? !!options.unsafe : false;
692
+ var simple = options ? !!options.enumerable : false;
693
+ var noTargetGet = options ? !!options.noTargetGet : false;
694
+ var name = options && options.name !== undefined ? options.name : key;
695
+ var state;
696
+ if (isCallable$6(value)) {
697
+ if (String(name).slice(0, 7) === 'Symbol(') {
698
+ name = '[' + String(name).replace(/^Symbol\(([^)]*)\)/, '$1') + ']';
699
+ }
700
+ if (!hasOwn$4(value, 'name') || (CONFIGURABLE_FUNCTION_NAME$1 && value.name !== name)) {
701
+ createNonEnumerableProperty$3(value, 'name', name);
702
+ }
703
+ state = enforceInternalState(value);
704
+ if (!state.source) {
705
+ state.source = TEMPLATE.join(typeof name == 'string' ? name : '');
706
+ }
707
+ }
708
+ if (O === global$8) {
709
+ if (simple) O[key] = value;
710
+ else setGlobal$1(key, value);
711
+ return;
712
+ } else if (!unsafe) {
713
+ delete O[key];
714
+ } else if (!noTargetGet && O[key]) {
715
+ simple = true;
716
+ }
717
+ if (simple) O[key] = value;
718
+ else createNonEnumerableProperty$3(O, key, value);
719
+ // add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
720
+ })(Function.prototype, 'toString', function toString() {
721
+ return isCallable$6(this) && getInternalState$1(this).source || inspectSource(this);
722
+ });
723
+
724
+ var objectGetOwnPropertyNames = {};
725
+
726
+ var ceil = Math.ceil;
727
+ var floor = Math.floor;
728
+
729
+ // `ToIntegerOrInfinity` abstract operation
730
+ // https://tc39.es/ecma262/#sec-tointegerorinfinity
731
+ var toIntegerOrInfinity$2 = function (argument) {
732
+ var number = +argument;
733
+ // eslint-disable-next-line no-self-compare -- safe
734
+ return number !== number || number === 0 ? 0 : (number > 0 ? floor : ceil)(number);
735
+ };
736
+
737
+ var toIntegerOrInfinity$1 = toIntegerOrInfinity$2;
738
+
739
+ var max = Math.max;
740
+ var min$1 = Math.min;
741
+
742
+ // Helper for a popular repeating case of the spec:
743
+ // Let integer be ? ToInteger(index).
744
+ // If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).
745
+ var toAbsoluteIndex$1 = function (index, length) {
746
+ var integer = toIntegerOrInfinity$1(index);
747
+ return integer < 0 ? max(integer + length, 0) : min$1(integer, length);
748
+ };
749
+
750
+ var toIntegerOrInfinity = toIntegerOrInfinity$2;
751
+
752
+ var min = Math.min;
753
+
754
+ // `ToLength` abstract operation
755
+ // https://tc39.es/ecma262/#sec-tolength
756
+ var toLength$1 = function (argument) {
757
+ return argument > 0 ? min(toIntegerOrInfinity(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
758
+ };
759
+
760
+ var toLength = toLength$1;
761
+
762
+ // `LengthOfArrayLike` abstract operation
763
+ // https://tc39.es/ecma262/#sec-lengthofarraylike
764
+ var lengthOfArrayLike$1 = function (obj) {
765
+ return toLength(obj.length);
766
+ };
767
+
768
+ var toIndexedObject$3 = toIndexedObject$5;
769
+ var toAbsoluteIndex = toAbsoluteIndex$1;
770
+ var lengthOfArrayLike = lengthOfArrayLike$1;
771
+
772
+ // `Array.prototype.{ indexOf, includes }` methods implementation
773
+ var createMethod = function (IS_INCLUDES) {
774
+ return function ($this, el, fromIndex) {
775
+ var O = toIndexedObject$3($this);
776
+ var length = lengthOfArrayLike(O);
777
+ var index = toAbsoluteIndex(fromIndex, length);
778
+ var value;
779
+ // Array#includes uses SameValueZero equality algorithm
780
+ // eslint-disable-next-line no-self-compare -- NaN check
781
+ if (IS_INCLUDES && el != el) while (length > index) {
782
+ value = O[index++];
783
+ // eslint-disable-next-line no-self-compare -- NaN check
784
+ if (value != value) return true;
785
+ // Array#indexOf ignores holes, Array#includes - not
786
+ } else for (;length > index; index++) {
787
+ if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0;
788
+ } return !IS_INCLUDES && -1;
789
+ };
790
+ };
791
+
792
+ var arrayIncludes = {
793
+ // `Array.prototype.includes` method
794
+ // https://tc39.es/ecma262/#sec-array.prototype.includes
795
+ includes: createMethod(true),
796
+ // `Array.prototype.indexOf` method
797
+ // https://tc39.es/ecma262/#sec-array.prototype.indexof
798
+ indexOf: createMethod(false)
799
+ };
800
+
801
+ var uncurryThis$4 = functionUncurryThis;
802
+ var hasOwn$3 = hasOwnProperty_1;
803
+ var toIndexedObject$2 = toIndexedObject$5;
804
+ var indexOf = arrayIncludes.indexOf;
805
+ var hiddenKeys$2 = hiddenKeys$4;
806
+
807
+ var push = uncurryThis$4([].push);
808
+
809
+ var objectKeysInternal = function (object, names) {
810
+ var O = toIndexedObject$2(object);
811
+ var i = 0;
812
+ var result = [];
813
+ var key;
814
+ for (key in O) !hasOwn$3(hiddenKeys$2, key) && hasOwn$3(O, key) && push(result, key);
815
+ // Don't enum bug & hidden keys
816
+ while (names.length > i) if (hasOwn$3(O, key = names[i++])) {
817
+ ~indexOf(result, key) || push(result, key);
818
+ }
819
+ return result;
820
+ };
821
+
822
+ // IE8- don't enum bug keys
823
+ var enumBugKeys$3 = [
824
+ 'constructor',
825
+ 'hasOwnProperty',
826
+ 'isPrototypeOf',
827
+ 'propertyIsEnumerable',
828
+ 'toLocaleString',
829
+ 'toString',
830
+ 'valueOf'
831
+ ];
832
+
833
+ var internalObjectKeys$1 = objectKeysInternal;
834
+ var enumBugKeys$2 = enumBugKeys$3;
835
+
836
+ var hiddenKeys$1 = enumBugKeys$2.concat('length', 'prototype');
837
+
838
+ // `Object.getOwnPropertyNames` method
839
+ // https://tc39.es/ecma262/#sec-object.getownpropertynames
840
+ // eslint-disable-next-line es/no-object-getownpropertynames -- safe
841
+ objectGetOwnPropertyNames.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
842
+ return internalObjectKeys$1(O, hiddenKeys$1);
843
+ };
844
+
845
+ var objectGetOwnPropertySymbols = {};
846
+
847
+ // eslint-disable-next-line es/no-object-getownpropertysymbols -- safe
848
+ objectGetOwnPropertySymbols.f = Object.getOwnPropertySymbols;
849
+
850
+ var getBuiltIn$1 = getBuiltIn$4;
851
+ var uncurryThis$3 = functionUncurryThis;
852
+ var getOwnPropertyNamesModule = objectGetOwnPropertyNames;
853
+ var getOwnPropertySymbolsModule$1 = objectGetOwnPropertySymbols;
854
+ var anObject$3 = anObject$5;
855
+
856
+ var concat$1 = uncurryThis$3([].concat);
857
+
858
+ // all object keys, includes non-enumerable and symbols
859
+ var ownKeys$1 = getBuiltIn$1('Reflect', 'ownKeys') || function ownKeys(it) {
860
+ var keys = getOwnPropertyNamesModule.f(anObject$3(it));
861
+ var getOwnPropertySymbols = getOwnPropertySymbolsModule$1.f;
862
+ return getOwnPropertySymbols ? concat$1(keys, getOwnPropertySymbols(it)) : keys;
863
+ };
864
+
865
+ var hasOwn$2 = hasOwnProperty_1;
866
+ var ownKeys = ownKeys$1;
867
+ var getOwnPropertyDescriptorModule = objectGetOwnPropertyDescriptor;
868
+ var definePropertyModule$2 = objectDefineProperty;
869
+
870
+ var copyConstructorProperties$1 = function (target, source, exceptions) {
871
+ var keys = ownKeys(source);
872
+ var defineProperty = definePropertyModule$2.f;
873
+ var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;
874
+ for (var i = 0; i < keys.length; i++) {
875
+ var key = keys[i];
876
+ if (!hasOwn$2(target, key) && !(exceptions && hasOwn$2(exceptions, key))) {
877
+ defineProperty(target, key, getOwnPropertyDescriptor(source, key));
878
+ }
879
+ }
880
+ };
881
+
882
+ var fails$3 = fails$a;
883
+ var isCallable$5 = isCallable$e;
884
+
885
+ var replacement = /#|\.prototype\./;
886
+
887
+ var isForced$1 = function (feature, detection) {
888
+ var value = data[normalize(feature)];
889
+ return value == POLYFILL ? true
890
+ : value == NATIVE ? false
891
+ : isCallable$5(detection) ? fails$3(detection)
892
+ : !!detection;
893
+ };
894
+
895
+ var normalize = isForced$1.normalize = function (string) {
896
+ return String(string).replace(replacement, '.').toLowerCase();
897
+ };
898
+
899
+ var data = isForced$1.data = {};
900
+ var NATIVE = isForced$1.NATIVE = 'N';
901
+ var POLYFILL = isForced$1.POLYFILL = 'P';
902
+
903
+ var isForced_1 = isForced$1;
904
+
905
+ var global$7 = global$r;
906
+ var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f;
907
+ var createNonEnumerableProperty$2 = createNonEnumerableProperty$5;
908
+ var redefine$2 = redefine$3.exports;
909
+ var setGlobal = setGlobal$3;
910
+ var copyConstructorProperties = copyConstructorProperties$1;
911
+ var isForced = isForced_1;
912
+
913
+ /*
914
+ options.target - name of the target object
915
+ options.global - target is the global object
916
+ options.stat - export as static methods of target
917
+ options.proto - export as prototype methods of target
918
+ options.real - real prototype method for the `pure` version
919
+ options.forced - export even if the native feature is available
920
+ options.bind - bind methods to the target, required for the `pure` version
921
+ options.wrap - wrap constructors to preventing global pollution, required for the `pure` version
922
+ options.unsafe - use the simple assignment of property instead of delete + defineProperty
923
+ options.sham - add a flag to not completely full polyfills
924
+ options.enumerable - export as enumerable property
925
+ options.noTargetGet - prevent calling a getter on target
926
+ options.name - the .name of the function if it does not match the key
927
+ */
928
+ var _export = function (options, source) {
929
+ var TARGET = options.target;
930
+ var GLOBAL = options.global;
931
+ var STATIC = options.stat;
932
+ var FORCED, target, key, targetProperty, sourceProperty, descriptor;
933
+ if (GLOBAL) {
934
+ target = global$7;
935
+ } else if (STATIC) {
936
+ target = global$7[TARGET] || setGlobal(TARGET, {});
937
+ } else {
938
+ target = (global$7[TARGET] || {}).prototype;
939
+ }
940
+ if (target) for (key in source) {
941
+ sourceProperty = source[key];
942
+ if (options.noTargetGet) {
943
+ descriptor = getOwnPropertyDescriptor(target, key);
944
+ targetProperty = descriptor && descriptor.value;
945
+ } else targetProperty = target[key];
946
+ FORCED = isForced(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);
947
+ // contained in target
948
+ if (!FORCED && targetProperty !== undefined) {
949
+ if (typeof sourceProperty == typeof targetProperty) continue;
950
+ copyConstructorProperties(sourceProperty, targetProperty);
951
+ }
952
+ // add a flag to not completely full polyfills
953
+ if (options.sham || (targetProperty && targetProperty.sham)) {
954
+ createNonEnumerableProperty$2(sourceProperty, 'sham', true);
955
+ }
956
+ // extend global
957
+ redefine$2(target, key, sourceProperty, options);
958
+ }
959
+ };
960
+
961
+ var internalObjectKeys = objectKeysInternal;
962
+ var enumBugKeys$1 = enumBugKeys$3;
963
+
964
+ // `Object.keys` method
965
+ // https://tc39.es/ecma262/#sec-object.keys
966
+ // eslint-disable-next-line es/no-object-keys -- safe
967
+ var objectKeys$2 = Object.keys || function keys(O) {
968
+ return internalObjectKeys(O, enumBugKeys$1);
969
+ };
970
+
971
+ var DESCRIPTORS$2 = descriptors;
972
+ var uncurryThis$2 = functionUncurryThis;
973
+ var call$1 = functionCall;
974
+ var fails$2 = fails$a;
975
+ var objectKeys$1 = objectKeys$2;
976
+ var getOwnPropertySymbolsModule = objectGetOwnPropertySymbols;
977
+ var propertyIsEnumerableModule = objectPropertyIsEnumerable;
978
+ var toObject$1 = toObject$3;
979
+ var IndexedObject = indexedObject;
980
+
981
+ // eslint-disable-next-line es/no-object-assign -- safe
982
+ var $assign = Object.assign;
983
+ // eslint-disable-next-line es/no-object-defineproperty -- required for testing
984
+ var defineProperty$2 = Object.defineProperty;
985
+ var concat = uncurryThis$2([].concat);
986
+
987
+ // `Object.assign` method
988
+ // https://tc39.es/ecma262/#sec-object.assign
989
+ var objectAssign = !$assign || fails$2(function () {
990
+ // should have correct order of operations (Edge bug)
991
+ if (DESCRIPTORS$2 && $assign({ b: 1 }, $assign(defineProperty$2({}, 'a', {
992
+ enumerable: true,
993
+ get: function () {
994
+ defineProperty$2(this, 'b', {
995
+ value: 3,
996
+ enumerable: false
997
+ });
998
+ }
999
+ }), { b: 2 })).b !== 1) return true;
1000
+ // should work with symbols and should have deterministic property order (V8 bug)
1001
+ var A = {};
1002
+ var B = {};
1003
+ // eslint-disable-next-line es/no-symbol -- safe
1004
+ var symbol = Symbol();
1005
+ var alphabet = 'abcdefghijklmnopqrst';
1006
+ A[symbol] = 7;
1007
+ alphabet.split('').forEach(function (chr) { B[chr] = chr; });
1008
+ return $assign({}, A)[symbol] != 7 || objectKeys$1($assign({}, B)).join('') != alphabet;
1009
+ }) ? function assign(target, source) { // eslint-disable-line no-unused-vars -- required for `.length`
1010
+ var T = toObject$1(target);
1011
+ var argumentsLength = arguments.length;
1012
+ var index = 1;
1013
+ var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;
1014
+ var propertyIsEnumerable = propertyIsEnumerableModule.f;
1015
+ while (argumentsLength > index) {
1016
+ var S = IndexedObject(arguments[index++]);
1017
+ var keys = getOwnPropertySymbols ? concat(objectKeys$1(S), getOwnPropertySymbols(S)) : objectKeys$1(S);
1018
+ var length = keys.length;
1019
+ var j = 0;
1020
+ var key;
1021
+ while (length > j) {
1022
+ key = keys[j++];
1023
+ if (!DESCRIPTORS$2 || call$1(propertyIsEnumerable, S, key)) T[key] = S[key];
1024
+ }
1025
+ } return T;
1026
+ } : $assign;
1027
+
1028
+ var $$2 = _export;
1029
+ var assign = objectAssign;
1030
+
1031
+ // `Object.assign` method
1032
+ // https://tc39.es/ecma262/#sec-object.assign
1033
+ // eslint-disable-next-line es/no-object-assign -- required for testing
1034
+ $$2({ target: 'Object', stat: true, forced: Object.assign !== assign }, {
1035
+ assign: assign
1036
+ });
1037
+
1038
+ /*! *****************************************************************************
1039
+ Copyright (c) Microsoft Corporation.
1040
+
1041
+ Permission to use, copy, modify, and/or distribute this software for any
1042
+ purpose with or without fee is hereby granted.
1043
+
1044
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
1045
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
1046
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
1047
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
1048
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
1049
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
1050
+ PERFORMANCE OF THIS SOFTWARE.
1051
+ ***************************************************************************** */
1052
+
1053
+ var __assign = function() {
1054
+ __assign = Object.assign || function __assign(t) {
1055
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
1056
+ s = arguments[i];
1057
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
1058
+ }
1059
+ return t;
1060
+ };
1061
+ return __assign.apply(this, arguments);
1062
+ };
1063
+
1064
+ function __read(o, n) {
1065
+ var m = typeof Symbol === "function" && o[Symbol.iterator];
1066
+ if (!m) return o;
1067
+ var i = m.call(o), r, ar = [], e;
1068
+ try {
1069
+ while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
1070
+ }
1071
+ catch (error) { e = { error: error }; }
1072
+ finally {
1073
+ try {
1074
+ if (r && !r.done && (m = i["return"])) m.call(i);
1075
+ }
1076
+ finally { if (e) throw e.error; }
1077
+ }
1078
+ return ar;
1079
+ }
1080
+
1081
+ function __spreadArray(to, from, pack) {
1082
+ if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
1083
+ if (ar || !(i in from)) {
1084
+ if (!ar) ar = Array.prototype.slice.call(from, 0, i);
1085
+ ar[i] = from[i];
1086
+ }
1087
+ }
1088
+ return to.concat(ar || Array.prototype.slice.call(from));
1089
+ }
1090
+
1091
+ var DRAWER_OPEN = 'drawer/open';
1092
+ var DRAWER_CLOSE = 'drawer/close';
1093
+ var DRAWER_TOGGLE = 'drawer/toggle';
1094
+ var openDrawer$1 = toolkit.createAction(DRAWER_OPEN);
1095
+ var closeDrawer$1 = toolkit.createAction(DRAWER_CLOSE);
1096
+ var toggleDrawer$1 = toolkit.createAction(DRAWER_TOGGLE);
1097
+
1098
+ var initialState$1 = {
1099
+ isOpen: false
1100
+ }; // DRAWER REDUCER
1101
+
1102
+ var reducer$1 = toolkit.createReducer(initialState$1, function (builder) {
1103
+ builder.addCase(openDrawer$1, function (state) {
1104
+ state.isOpen = true;
1105
+ });
1106
+ builder.addCase(closeDrawer$1, function (state) {
1107
+ state.isOpen = false;
1108
+ });
1109
+ builder.addCase(toggleDrawer$1, function (state) {
1110
+ state.isOpen = !state.isOpen;
1111
+ });
1112
+ });
1113
+
1114
+ var isObject = isObject$6;
1115
+ var classof$2 = classofRaw$1;
1116
+ var wellKnownSymbol$8 = wellKnownSymbol$a;
1117
+
1118
+ var MATCH$1 = wellKnownSymbol$8('match');
1119
+
1120
+ // `IsRegExp` abstract operation
1121
+ // https://tc39.es/ecma262/#sec-isregexp
1122
+ var isRegexp = function (it) {
1123
+ var isRegExp;
1124
+ return isObject(it) && ((isRegExp = it[MATCH$1]) !== undefined ? !!isRegExp : classof$2(it) == 'RegExp');
1125
+ };
1126
+
1127
+ var global$6 = global$r;
1128
+ var isRegExp = isRegexp;
1129
+
1130
+ var TypeError$2 = global$6.TypeError;
1131
+
1132
+ var notARegexp = function (it) {
1133
+ if (isRegExp(it)) {
1134
+ throw TypeError$2("The method doesn't accept regular expressions");
1135
+ } return it;
1136
+ };
1137
+
1138
+ var wellKnownSymbol$7 = wellKnownSymbol$a;
1139
+
1140
+ var TO_STRING_TAG$3 = wellKnownSymbol$7('toStringTag');
1141
+ var test = {};
1142
+
1143
+ test[TO_STRING_TAG$3] = 'z';
1144
+
1145
+ var toStringTagSupport = String(test) === '[object z]';
1146
+
1147
+ var global$5 = global$r;
1148
+ var TO_STRING_TAG_SUPPORT = toStringTagSupport;
1149
+ var isCallable$4 = isCallable$e;
1150
+ var classofRaw = classofRaw$1;
1151
+ var wellKnownSymbol$6 = wellKnownSymbol$a;
1152
+
1153
+ var TO_STRING_TAG$2 = wellKnownSymbol$6('toStringTag');
1154
+ var Object$2 = global$5.Object;
1155
+
1156
+ // ES3 wrong here
1157
+ var CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) == 'Arguments';
1158
+
1159
+ // fallback for IE11 Script Access Denied error
1160
+ var tryGet = function (it, key) {
1161
+ try {
1162
+ return it[key];
1163
+ } catch (error) { /* empty */ }
1164
+ };
1165
+
1166
+ // getting tag from ES6+ `Object.prototype.toString`
1167
+ var classof$1 = TO_STRING_TAG_SUPPORT ? classofRaw : function (it) {
1168
+ var O, tag, result;
1169
+ return it === undefined ? 'Undefined' : it === null ? 'Null'
1170
+ // @@toStringTag case
1171
+ : typeof (tag = tryGet(O = Object$2(it), TO_STRING_TAG$2)) == 'string' ? tag
1172
+ // builtinTag case
1173
+ : CORRECT_ARGUMENTS ? classofRaw(O)
1174
+ // ES3 arguments fallback
1175
+ : (result = classofRaw(O)) == 'Object' && isCallable$4(O.callee) ? 'Arguments' : result;
1176
+ };
1177
+
1178
+ var global$4 = global$r;
1179
+ var classof = classof$1;
1180
+
1181
+ var String$2 = global$4.String;
1182
+
1183
+ var toString$1 = function (argument) {
1184
+ if (classof(argument) === 'Symbol') throw TypeError('Cannot convert a Symbol value to a string');
1185
+ return String$2(argument);
1186
+ };
1187
+
1188
+ var wellKnownSymbol$5 = wellKnownSymbol$a;
1189
+
1190
+ var MATCH = wellKnownSymbol$5('match');
1191
+
1192
+ var correctIsRegexpLogic = function (METHOD_NAME) {
1193
+ var regexp = /./;
1194
+ try {
1195
+ '/./'[METHOD_NAME](regexp);
1196
+ } catch (error1) {
1197
+ try {
1198
+ regexp[MATCH] = false;
1199
+ return '/./'[METHOD_NAME](regexp);
1200
+ } catch (error2) { /* empty */ }
1201
+ } return false;
1202
+ };
1203
+
1204
+ var $$1 = _export;
1205
+ var uncurryThis$1 = functionUncurryThis;
1206
+ var notARegExp = notARegexp;
1207
+ var requireObjectCoercible = requireObjectCoercible$3;
1208
+ var toString = toString$1;
1209
+ var correctIsRegExpLogic = correctIsRegexpLogic;
1210
+
1211
+ var stringIndexOf = uncurryThis$1(''.indexOf);
1212
+
1213
+ // `String.prototype.includes` method
1214
+ // https://tc39.es/ecma262/#sec-string.prototype.includes
1215
+ $$1({ target: 'String', proto: true, forced: !correctIsRegExpLogic('includes') }, {
1216
+ includes: function includes(searchString /* , position = 0 */) {
1217
+ return !!~stringIndexOf(
1218
+ toString(requireObjectCoercible(this)),
1219
+ toString(notARegExp(searchString)),
1220
+ arguments.length > 1 ? arguments[1] : undefined
1221
+ );
1222
+ }
1223
+ });
1224
+
1225
+ var objectDefineProperties = {};
1226
+
1227
+ var DESCRIPTORS$1 = descriptors;
1228
+ var V8_PROTOTYPE_DEFINE_BUG = v8PrototypeDefineBug;
1229
+ var definePropertyModule$1 = objectDefineProperty;
1230
+ var anObject$2 = anObject$5;
1231
+ var toIndexedObject$1 = toIndexedObject$5;
1232
+ var objectKeys = objectKeys$2;
1233
+
1234
+ // `Object.defineProperties` method
1235
+ // https://tc39.es/ecma262/#sec-object.defineproperties
1236
+ // eslint-disable-next-line es/no-object-defineproperties -- safe
1237
+ objectDefineProperties.f = DESCRIPTORS$1 && !V8_PROTOTYPE_DEFINE_BUG ? Object.defineProperties : function defineProperties(O, Properties) {
1238
+ anObject$2(O);
1239
+ var props = toIndexedObject$1(Properties);
1240
+ var keys = objectKeys(Properties);
1241
+ var length = keys.length;
1242
+ var index = 0;
1243
+ var key;
1244
+ while (length > index) definePropertyModule$1.f(O, key = keys[index++], props[key]);
1245
+ return O;
1246
+ };
1247
+
1248
+ var getBuiltIn = getBuiltIn$4;
1249
+
1250
+ var html$1 = getBuiltIn('document', 'documentElement');
1251
+
1252
+ /* global ActiveXObject -- old IE, WSH */
1253
+
1254
+ var anObject$1 = anObject$5;
1255
+ var definePropertiesModule = objectDefineProperties;
1256
+ var enumBugKeys = enumBugKeys$3;
1257
+ var hiddenKeys = hiddenKeys$4;
1258
+ var html = html$1;
1259
+ var documentCreateElement$1 = documentCreateElement$2;
1260
+ var sharedKey$1 = sharedKey$3;
1261
+
1262
+ var GT = '>';
1263
+ var LT = '<';
1264
+ var PROTOTYPE = 'prototype';
1265
+ var SCRIPT = 'script';
1266
+ var IE_PROTO$1 = sharedKey$1('IE_PROTO');
1267
+
1268
+ var EmptyConstructor = function () { /* empty */ };
1269
+
1270
+ var scriptTag = function (content) {
1271
+ return LT + SCRIPT + GT + content + LT + '/' + SCRIPT + GT;
1272
+ };
1273
+
1274
+ // Create object with fake `null` prototype: use ActiveX Object with cleared prototype
1275
+ var NullProtoObjectViaActiveX = function (activeXDocument) {
1276
+ activeXDocument.write(scriptTag(''));
1277
+ activeXDocument.close();
1278
+ var temp = activeXDocument.parentWindow.Object;
1279
+ activeXDocument = null; // avoid memory leak
1280
+ return temp;
1281
+ };
1282
+
1283
+ // Create object with fake `null` prototype: use iframe Object with cleared prototype
1284
+ var NullProtoObjectViaIFrame = function () {
1285
+ // Thrash, waste and sodomy: IE GC bug
1286
+ var iframe = documentCreateElement$1('iframe');
1287
+ var JS = 'java' + SCRIPT + ':';
1288
+ var iframeDocument;
1289
+ iframe.style.display = 'none';
1290
+ html.appendChild(iframe);
1291
+ // https://github.com/zloirock/core-js/issues/475
1292
+ iframe.src = String(JS);
1293
+ iframeDocument = iframe.contentWindow.document;
1294
+ iframeDocument.open();
1295
+ iframeDocument.write(scriptTag('document.F=Object'));
1296
+ iframeDocument.close();
1297
+ return iframeDocument.F;
1298
+ };
1299
+
1300
+ // Check for document.domain and active x support
1301
+ // No need to use active x approach when document.domain is not set
1302
+ // see https://github.com/es-shims/es5-shim/issues/150
1303
+ // variation of https://github.com/kitcambridge/es5-shim/commit/4f738ac066346
1304
+ // avoid IE GC bug
1305
+ var activeXDocument;
1306
+ var NullProtoObject = function () {
1307
+ try {
1308
+ activeXDocument = new ActiveXObject('htmlfile');
1309
+ } catch (error) { /* ignore */ }
1310
+ NullProtoObject = typeof document != 'undefined'
1311
+ ? document.domain && activeXDocument
1312
+ ? NullProtoObjectViaActiveX(activeXDocument) // old IE
1313
+ : NullProtoObjectViaIFrame()
1314
+ : NullProtoObjectViaActiveX(activeXDocument); // WSH
1315
+ var length = enumBugKeys.length;
1316
+ while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys[length]];
1317
+ return NullProtoObject();
1318
+ };
1319
+
1320
+ hiddenKeys[IE_PROTO$1] = true;
1321
+
1322
+ // `Object.create` method
1323
+ // https://tc39.es/ecma262/#sec-object.create
1324
+ var objectCreate = Object.create || function create(O, Properties) {
1325
+ var result;
1326
+ if (O !== null) {
1327
+ EmptyConstructor[PROTOTYPE] = anObject$1(O);
1328
+ result = new EmptyConstructor();
1329
+ EmptyConstructor[PROTOTYPE] = null;
1330
+ // add "__proto__" for Object.getPrototypeOf polyfill
1331
+ result[IE_PROTO$1] = O;
1332
+ } else result = NullProtoObject();
1333
+ return Properties === undefined ? result : definePropertiesModule.f(result, Properties);
1334
+ };
1335
+
1336
+ var wellKnownSymbol$4 = wellKnownSymbol$a;
1337
+ var create$1 = objectCreate;
1338
+ var definePropertyModule = objectDefineProperty;
1339
+
1340
+ var UNSCOPABLES = wellKnownSymbol$4('unscopables');
1341
+ var ArrayPrototype = Array.prototype;
1342
+
1343
+ // Array.prototype[@@unscopables]
1344
+ // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
1345
+ if (ArrayPrototype[UNSCOPABLES] == undefined) {
1346
+ definePropertyModule.f(ArrayPrototype, UNSCOPABLES, {
1347
+ configurable: true,
1348
+ value: create$1(null)
1349
+ });
1350
+ }
1351
+
1352
+ // add a key to Array.prototype[@@unscopables]
1353
+ var addToUnscopables$1 = function (key) {
1354
+ ArrayPrototype[UNSCOPABLES][key] = true;
1355
+ };
1356
+
1357
+ var iterators = {};
1358
+
1359
+ var fails$1 = fails$a;
1360
+
1361
+ var correctPrototypeGetter = !fails$1(function () {
1362
+ function F() { /* empty */ }
1363
+ F.prototype.constructor = null;
1364
+ // eslint-disable-next-line es/no-object-getprototypeof -- required for testing
1365
+ return Object.getPrototypeOf(new F()) !== F.prototype;
1366
+ });
1367
+
1368
+ var global$3 = global$r;
1369
+ var hasOwn$1 = hasOwnProperty_1;
1370
+ var isCallable$3 = isCallable$e;
1371
+ var toObject = toObject$3;
1372
+ var sharedKey = sharedKey$3;
1373
+ var CORRECT_PROTOTYPE_GETTER = correctPrototypeGetter;
1374
+
1375
+ var IE_PROTO = sharedKey('IE_PROTO');
1376
+ var Object$1 = global$3.Object;
1377
+ var ObjectPrototype = Object$1.prototype;
1378
+
1379
+ // `Object.getPrototypeOf` method
1380
+ // https://tc39.es/ecma262/#sec-object.getprototypeof
1381
+ var objectGetPrototypeOf = CORRECT_PROTOTYPE_GETTER ? Object$1.getPrototypeOf : function (O) {
1382
+ var object = toObject(O);
1383
+ if (hasOwn$1(object, IE_PROTO)) return object[IE_PROTO];
1384
+ var constructor = object.constructor;
1385
+ if (isCallable$3(constructor) && object instanceof constructor) {
1386
+ return constructor.prototype;
1387
+ } return object instanceof Object$1 ? ObjectPrototype : null;
1388
+ };
1389
+
1390
+ var fails = fails$a;
1391
+ var isCallable$2 = isCallable$e;
1392
+ var getPrototypeOf$1 = objectGetPrototypeOf;
1393
+ var redefine$1 = redefine$3.exports;
1394
+ var wellKnownSymbol$3 = wellKnownSymbol$a;
1395
+
1396
+ var ITERATOR$2 = wellKnownSymbol$3('iterator');
1397
+ var BUGGY_SAFARI_ITERATORS$1 = false;
1398
+
1399
+ // `%IteratorPrototype%` object
1400
+ // https://tc39.es/ecma262/#sec-%iteratorprototype%-object
1401
+ var IteratorPrototype$2, PrototypeOfArrayIteratorPrototype, arrayIterator;
1402
+
1403
+ /* eslint-disable es/no-array-prototype-keys -- safe */
1404
+ if ([].keys) {
1405
+ arrayIterator = [].keys();
1406
+ // Safari 8 has buggy iterators w/o `next`
1407
+ if (!('next' in arrayIterator)) BUGGY_SAFARI_ITERATORS$1 = true;
1408
+ else {
1409
+ PrototypeOfArrayIteratorPrototype = getPrototypeOf$1(getPrototypeOf$1(arrayIterator));
1410
+ if (PrototypeOfArrayIteratorPrototype !== Object.prototype) IteratorPrototype$2 = PrototypeOfArrayIteratorPrototype;
1411
+ }
1412
+ }
1413
+
1414
+ var NEW_ITERATOR_PROTOTYPE = IteratorPrototype$2 == undefined || fails(function () {
1415
+ var test = {};
1416
+ // FF44- legacy iterators case
1417
+ return IteratorPrototype$2[ITERATOR$2].call(test) !== test;
1418
+ });
1419
+
1420
+ if (NEW_ITERATOR_PROTOTYPE) IteratorPrototype$2 = {};
1421
+
1422
+ // `%IteratorPrototype%[@@iterator]()` method
1423
+ // https://tc39.es/ecma262/#sec-%iteratorprototype%-@@iterator
1424
+ if (!isCallable$2(IteratorPrototype$2[ITERATOR$2])) {
1425
+ redefine$1(IteratorPrototype$2, ITERATOR$2, function () {
1426
+ return this;
1427
+ });
1428
+ }
1429
+
1430
+ var iteratorsCore = {
1431
+ IteratorPrototype: IteratorPrototype$2,
1432
+ BUGGY_SAFARI_ITERATORS: BUGGY_SAFARI_ITERATORS$1
1433
+ };
1434
+
1435
+ var defineProperty$1 = objectDefineProperty.f;
1436
+ var hasOwn = hasOwnProperty_1;
1437
+ var wellKnownSymbol$2 = wellKnownSymbol$a;
1438
+
1439
+ var TO_STRING_TAG$1 = wellKnownSymbol$2('toStringTag');
1440
+
1441
+ var setToStringTag$2 = function (target, TAG, STATIC) {
1442
+ if (target && !STATIC) target = target.prototype;
1443
+ if (target && !hasOwn(target, TO_STRING_TAG$1)) {
1444
+ defineProperty$1(target, TO_STRING_TAG$1, { configurable: true, value: TAG });
1445
+ }
1446
+ };
1447
+
1448
+ var IteratorPrototype$1 = iteratorsCore.IteratorPrototype;
1449
+ var create = objectCreate;
1450
+ var createPropertyDescriptor = createPropertyDescriptor$3;
1451
+ var setToStringTag$1 = setToStringTag$2;
1452
+ var Iterators$2 = iterators;
1453
+
1454
+ var returnThis$1 = function () { return this; };
1455
+
1456
+ var createIteratorConstructor$1 = function (IteratorConstructor, NAME, next, ENUMERABLE_NEXT) {
1457
+ var TO_STRING_TAG = NAME + ' Iterator';
1458
+ IteratorConstructor.prototype = create(IteratorPrototype$1, { next: createPropertyDescriptor(+!ENUMERABLE_NEXT, next) });
1459
+ setToStringTag$1(IteratorConstructor, TO_STRING_TAG, false);
1460
+ Iterators$2[TO_STRING_TAG] = returnThis$1;
1461
+ return IteratorConstructor;
1462
+ };
1463
+
1464
+ var global$2 = global$r;
1465
+ var isCallable$1 = isCallable$e;
1466
+
1467
+ var String$1 = global$2.String;
1468
+ var TypeError$1 = global$2.TypeError;
1469
+
1470
+ var aPossiblePrototype$1 = function (argument) {
1471
+ if (typeof argument == 'object' || isCallable$1(argument)) return argument;
1472
+ throw TypeError$1("Can't set " + String$1(argument) + ' as a prototype');
1473
+ };
1474
+
1475
+ /* eslint-disable no-proto -- safe */
1476
+
1477
+ var uncurryThis = functionUncurryThis;
1478
+ var anObject = anObject$5;
1479
+ var aPossiblePrototype = aPossiblePrototype$1;
1480
+
1481
+ // `Object.setPrototypeOf` method
1482
+ // https://tc39.es/ecma262/#sec-object.setprototypeof
1483
+ // Works with __proto__ only. Old v8 can't work with null proto objects.
1484
+ // eslint-disable-next-line es/no-object-setprototypeof -- safe
1485
+ var objectSetPrototypeOf = Object.setPrototypeOf || ('__proto__' in {} ? function () {
1486
+ var CORRECT_SETTER = false;
1487
+ var test = {};
1488
+ var setter;
1489
+ try {
1490
+ // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
1491
+ setter = uncurryThis(Object.getOwnPropertyDescriptor(Object.prototype, '__proto__').set);
1492
+ setter(test, []);
1493
+ CORRECT_SETTER = test instanceof Array;
1494
+ } catch (error) { /* empty */ }
1495
+ return function setPrototypeOf(O, proto) {
1496
+ anObject(O);
1497
+ aPossiblePrototype(proto);
1498
+ if (CORRECT_SETTER) setter(O, proto);
1499
+ else O.__proto__ = proto;
1500
+ return O;
1501
+ };
1502
+ }() : undefined);
1503
+
1504
+ var $ = _export;
1505
+ var call = functionCall;
1506
+ var FunctionName = functionName;
1507
+ var isCallable = isCallable$e;
1508
+ var createIteratorConstructor = createIteratorConstructor$1;
1509
+ var getPrototypeOf = objectGetPrototypeOf;
1510
+ var setPrototypeOf = objectSetPrototypeOf;
1511
+ var setToStringTag = setToStringTag$2;
1512
+ var createNonEnumerableProperty$1 = createNonEnumerableProperty$5;
1513
+ var redefine = redefine$3.exports;
1514
+ var wellKnownSymbol$1 = wellKnownSymbol$a;
1515
+ var Iterators$1 = iterators;
1516
+ var IteratorsCore = iteratorsCore;
1517
+
1518
+ var PROPER_FUNCTION_NAME = FunctionName.PROPER;
1519
+ var CONFIGURABLE_FUNCTION_NAME = FunctionName.CONFIGURABLE;
1520
+ var IteratorPrototype = IteratorsCore.IteratorPrototype;
1521
+ var BUGGY_SAFARI_ITERATORS = IteratorsCore.BUGGY_SAFARI_ITERATORS;
1522
+ var ITERATOR$1 = wellKnownSymbol$1('iterator');
1523
+ var KEYS = 'keys';
1524
+ var VALUES = 'values';
1525
+ var ENTRIES = 'entries';
1526
+
1527
+ var returnThis = function () { return this; };
1528
+
1529
+ var defineIterator$1 = function (Iterable, NAME, IteratorConstructor, next, DEFAULT, IS_SET, FORCED) {
1530
+ createIteratorConstructor(IteratorConstructor, NAME, next);
1531
+
1532
+ var getIterationMethod = function (KIND) {
1533
+ if (KIND === DEFAULT && defaultIterator) return defaultIterator;
1534
+ if (!BUGGY_SAFARI_ITERATORS && KIND in IterablePrototype) return IterablePrototype[KIND];
1535
+ switch (KIND) {
1536
+ case KEYS: return function keys() { return new IteratorConstructor(this, KIND); };
1537
+ case VALUES: return function values() { return new IteratorConstructor(this, KIND); };
1538
+ case ENTRIES: return function entries() { return new IteratorConstructor(this, KIND); };
1539
+ } return function () { return new IteratorConstructor(this); };
1540
+ };
1541
+
1542
+ var TO_STRING_TAG = NAME + ' Iterator';
1543
+ var INCORRECT_VALUES_NAME = false;
1544
+ var IterablePrototype = Iterable.prototype;
1545
+ var nativeIterator = IterablePrototype[ITERATOR$1]
1546
+ || IterablePrototype['@@iterator']
1547
+ || DEFAULT && IterablePrototype[DEFAULT];
1548
+ var defaultIterator = !BUGGY_SAFARI_ITERATORS && nativeIterator || getIterationMethod(DEFAULT);
1549
+ var anyNativeIterator = NAME == 'Array' ? IterablePrototype.entries || nativeIterator : nativeIterator;
1550
+ var CurrentIteratorPrototype, methods, KEY;
1551
+
1552
+ // fix native
1553
+ if (anyNativeIterator) {
1554
+ CurrentIteratorPrototype = getPrototypeOf(anyNativeIterator.call(new Iterable()));
1555
+ if (CurrentIteratorPrototype !== Object.prototype && CurrentIteratorPrototype.next) {
1556
+ if (getPrototypeOf(CurrentIteratorPrototype) !== IteratorPrototype) {
1557
+ if (setPrototypeOf) {
1558
+ setPrototypeOf(CurrentIteratorPrototype, IteratorPrototype);
1559
+ } else if (!isCallable(CurrentIteratorPrototype[ITERATOR$1])) {
1560
+ redefine(CurrentIteratorPrototype, ITERATOR$1, returnThis);
1561
+ }
1562
+ }
1563
+ // Set @@toStringTag to native iterators
1564
+ setToStringTag(CurrentIteratorPrototype, TO_STRING_TAG, true);
1565
+ }
1566
+ }
1567
+
1568
+ // fix Array.prototype.{ values, @@iterator }.name in V8 / FF
1569
+ if (PROPER_FUNCTION_NAME && DEFAULT == VALUES && nativeIterator && nativeIterator.name !== VALUES) {
1570
+ if (CONFIGURABLE_FUNCTION_NAME) {
1571
+ createNonEnumerableProperty$1(IterablePrototype, 'name', VALUES);
1572
+ } else {
1573
+ INCORRECT_VALUES_NAME = true;
1574
+ defaultIterator = function values() { return call(nativeIterator, this); };
1575
+ }
1576
+ }
1577
+
1578
+ // export additional methods
1579
+ if (DEFAULT) {
1580
+ methods = {
1581
+ values: getIterationMethod(VALUES),
1582
+ keys: IS_SET ? defaultIterator : getIterationMethod(KEYS),
1583
+ entries: getIterationMethod(ENTRIES)
1584
+ };
1585
+ if (FORCED) for (KEY in methods) {
1586
+ if (BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME || !(KEY in IterablePrototype)) {
1587
+ redefine(IterablePrototype, KEY, methods[KEY]);
1588
+ }
1589
+ } else $({ target: NAME, proto: true, forced: BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME }, methods);
1590
+ }
1591
+
1592
+ // define iterator
1593
+ if (IterablePrototype[ITERATOR$1] !== defaultIterator) {
1594
+ redefine(IterablePrototype, ITERATOR$1, defaultIterator, { name: DEFAULT });
1595
+ }
1596
+ Iterators$1[NAME] = defaultIterator;
1597
+
1598
+ return methods;
1599
+ };
1600
+
1601
+ var toIndexedObject = toIndexedObject$5;
1602
+ var addToUnscopables = addToUnscopables$1;
1603
+ var Iterators = iterators;
1604
+ var InternalStateModule = internalState;
1605
+ var defineProperty = objectDefineProperty.f;
1606
+ var defineIterator = defineIterator$1;
1607
+ var DESCRIPTORS = descriptors;
1608
+
1609
+ var ARRAY_ITERATOR = 'Array Iterator';
1610
+ var setInternalState = InternalStateModule.set;
1611
+ var getInternalState = InternalStateModule.getterFor(ARRAY_ITERATOR);
1612
+
1613
+ // `Array.prototype.entries` method
1614
+ // https://tc39.es/ecma262/#sec-array.prototype.entries
1615
+ // `Array.prototype.keys` method
1616
+ // https://tc39.es/ecma262/#sec-array.prototype.keys
1617
+ // `Array.prototype.values` method
1618
+ // https://tc39.es/ecma262/#sec-array.prototype.values
1619
+ // `Array.prototype[@@iterator]` method
1620
+ // https://tc39.es/ecma262/#sec-array.prototype-@@iterator
1621
+ // `CreateArrayIterator` internal method
1622
+ // https://tc39.es/ecma262/#sec-createarrayiterator
1623
+ var es_array_iterator = defineIterator(Array, 'Array', function (iterated, kind) {
1624
+ setInternalState(this, {
1625
+ type: ARRAY_ITERATOR,
1626
+ target: toIndexedObject(iterated), // target
1627
+ index: 0, // next index
1628
+ kind: kind // kind
1629
+ });
1630
+ // `%ArrayIteratorPrototype%.next` method
1631
+ // https://tc39.es/ecma262/#sec-%arrayiteratorprototype%.next
1632
+ }, function () {
1633
+ var state = getInternalState(this);
1634
+ var target = state.target;
1635
+ var kind = state.kind;
1636
+ var index = state.index++;
1637
+ if (!target || index >= target.length) {
1638
+ state.target = undefined;
1639
+ return { value: undefined, done: true };
1640
+ }
1641
+ if (kind == 'keys') return { value: index, done: false };
1642
+ if (kind == 'values') return { value: target[index], done: false };
1643
+ return { value: [index, target[index]], done: false };
1644
+ }, 'values');
1645
+
1646
+ // argumentsList[@@iterator] is %ArrayProto_values%
1647
+ // https://tc39.es/ecma262/#sec-createunmappedargumentsobject
1648
+ // https://tc39.es/ecma262/#sec-createmappedargumentsobject
1649
+ var values = Iterators.Arguments = Iterators.Array;
1650
+
1651
+ // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
1652
+ addToUnscopables('keys');
1653
+ addToUnscopables('values');
1654
+ addToUnscopables('entries');
1655
+
1656
+ // V8 ~ Chrome 45- bug
1657
+ if (DESCRIPTORS && values.name !== 'values') try {
1658
+ defineProperty(values, 'name', { value: 'values' });
1659
+ } catch (error) { /* empty */ }
1660
+
1661
+ // iterable DOM collections
1662
+ // flag - `iterable` interface - 'entries', 'keys', 'values', 'forEach' methods
1663
+ var domIterables = {
1664
+ CSSRuleList: 0,
1665
+ CSSStyleDeclaration: 0,
1666
+ CSSValueList: 0,
1667
+ ClientRectList: 0,
1668
+ DOMRectList: 0,
1669
+ DOMStringList: 0,
1670
+ DOMTokenList: 1,
1671
+ DataTransferItemList: 0,
1672
+ FileList: 0,
1673
+ HTMLAllCollection: 0,
1674
+ HTMLCollection: 0,
1675
+ HTMLFormElement: 0,
1676
+ HTMLSelectElement: 0,
1677
+ MediaList: 0,
1678
+ MimeTypeArray: 0,
1679
+ NamedNodeMap: 0,
1680
+ NodeList: 1,
1681
+ PaintRequestList: 0,
1682
+ Plugin: 0,
1683
+ PluginArray: 0,
1684
+ SVGLengthList: 0,
1685
+ SVGNumberList: 0,
1686
+ SVGPathSegList: 0,
1687
+ SVGPointList: 0,
1688
+ SVGStringList: 0,
1689
+ SVGTransformList: 0,
1690
+ SourceBufferList: 0,
1691
+ StyleSheetList: 0,
1692
+ TextTrackCueList: 0,
1693
+ TextTrackList: 0,
1694
+ TouchList: 0
1695
+ };
1696
+
1697
+ // in old WebKit versions, `element.classList` is not an instance of global `DOMTokenList`
1698
+ var documentCreateElement = documentCreateElement$2;
1699
+
1700
+ var classList = documentCreateElement('span').classList;
1701
+ var DOMTokenListPrototype$1 = classList && classList.constructor && classList.constructor.prototype;
1702
+
1703
+ var domTokenListPrototype = DOMTokenListPrototype$1 === Object.prototype ? undefined : DOMTokenListPrototype$1;
1704
+
1705
+ var global$1 = global$r;
1706
+ var DOMIterables = domIterables;
1707
+ var DOMTokenListPrototype = domTokenListPrototype;
1708
+ var ArrayIteratorMethods = es_array_iterator;
1709
+ var createNonEnumerableProperty = createNonEnumerableProperty$5;
1710
+ var wellKnownSymbol = wellKnownSymbol$a;
1711
+
1712
+ var ITERATOR = wellKnownSymbol('iterator');
1713
+ var TO_STRING_TAG = wellKnownSymbol('toStringTag');
1714
+ var ArrayValues = ArrayIteratorMethods.values;
1715
+
1716
+ var handlePrototype = function (CollectionPrototype, COLLECTION_NAME) {
1717
+ if (CollectionPrototype) {
1718
+ // some Chrome versions have non-configurable methods on DOMTokenList
1719
+ if (CollectionPrototype[ITERATOR] !== ArrayValues) try {
1720
+ createNonEnumerableProperty(CollectionPrototype, ITERATOR, ArrayValues);
1721
+ } catch (error) {
1722
+ CollectionPrototype[ITERATOR] = ArrayValues;
1723
+ }
1724
+ if (!CollectionPrototype[TO_STRING_TAG]) {
1725
+ createNonEnumerableProperty(CollectionPrototype, TO_STRING_TAG, COLLECTION_NAME);
1726
+ }
1727
+ if (DOMIterables[COLLECTION_NAME]) for (var METHOD_NAME in ArrayIteratorMethods) {
1728
+ // some Chrome versions have non-configurable methods on DOMTokenList
1729
+ if (CollectionPrototype[METHOD_NAME] !== ArrayIteratorMethods[METHOD_NAME]) try {
1730
+ createNonEnumerableProperty(CollectionPrototype, METHOD_NAME, ArrayIteratorMethods[METHOD_NAME]);
1731
+ } catch (error) {
1732
+ CollectionPrototype[METHOD_NAME] = ArrayIteratorMethods[METHOD_NAME];
1733
+ }
1734
+ }
1735
+ }
1736
+ };
1737
+
1738
+ for (var COLLECTION_NAME in DOMIterables) {
1739
+ handlePrototype(global$1[COLLECTION_NAME] && global$1[COLLECTION_NAME].prototype, COLLECTION_NAME);
1740
+ }
1741
+
1742
+ handlePrototype(DOMTokenListPrototype, 'DOMTokenList');
1743
+
1744
+ var SET_ACTIVE_AUDIENCES = 'audiences/set-active-audiences';
1745
+ var FORCE_ACTIVATE_AUDIENCE = 'audiences/force-activate-audience';
1746
+ var FORCE_DEACTIVATE_AUDIENCE = 'audiences/force-deactivate-audience';
1747
+ var RESET_AUDIENCES = 'audiences/reset-audiences';
1748
+ var setActiveAudiences$1 = toolkit.createAction(SET_ACTIVE_AUDIENCES);
1749
+ var forceActivateAudience$1 = toolkit.createAction(FORCE_ACTIVATE_AUDIENCE);
1750
+ var forceDeactivateAudience = toolkit.createAction(FORCE_DEACTIVATE_AUDIENCE);
1751
+ var resetAudiences$1 = toolkit.createAction(RESET_AUDIENCES);
1752
+
1753
+ /*
1754
+ forced and forcedDeactivated are arrays containing the ids that are coming from the active array
1755
+ and they exchange data whenever an audience is activated or deactivated by clie
1756
+ */
1757
+
1758
+ var initialState = {
1759
+ active: [],
1760
+ forced: [],
1761
+ deactivatedForced: []
1762
+ };
1763
+ var reducer = toolkit.createReducer(initialState, function (builder) {
1764
+ builder.addCase(setActiveAudiences$1, function (state, action) {
1765
+ state.active = action.payload;
1766
+ });
1767
+ builder.addCase(forceActivateAudience$1, function (state, action) {
1768
+ if (state.forced.includes(action.payload)) {
1769
+ var filtered = state.forced.filter(function (id) {
1770
+ return id !== action.payload;
1771
+ });
1772
+ state.forced = filtered;
1773
+ return;
1774
+ }
1775
+
1776
+ state.forced = __spreadArray([], __read(new Set(__spreadArray(__spreadArray([], __read(state.forced), false), [action.payload], false))), false);
1777
+ });
1778
+ builder.addCase(resetAudiences$1, function (state) {
1779
+ state.forced = [];
1780
+ });
1781
+ });
1782
+
1783
+ var store = toolkit.configureStore({
1784
+ reducer: {
1785
+ drawer: reducer$1,
1786
+ audiences: reducer
1787
+ }
1788
+ });
1789
+
1790
+ var openDrawer = toolkit.bindActionCreators(openDrawer$1, store.dispatch);
1791
+ var closeDrawer = toolkit.bindActionCreators(closeDrawer$1, store.dispatch);
1792
+ var toggleDrawer = toolkit.bindActionCreators(toggleDrawer$1, store.dispatch);
1793
+
1794
+ var setActiveAudiences = toolkit.bindActionCreators(setActiveAudiences$1, store.dispatch);
1795
+ var forceActivateAudience = toolkit.bindActionCreators(forceActivateAudience$1, store.dispatch);
1796
+ toolkit.bindActionCreators(forceDeactivateAudience, store.dispatch);
1797
+ var resetAudiences = toolkit.bindActionCreators(resetAudiences$1, store.dispatch);
1798
+
1799
+ var buildPreviewSdk = function buildPreviewSdk(_a) {
1800
+ var clientId = _a.clientId,
1801
+ secret = _a.secret,
1802
+ environment = _a.environment;
1803
+ var state = store.getState();
1804
+ return {
1805
+ version: '0.0.1',
1806
+ credentials: {
1807
+ clientId: clientId,
1808
+ secret: secret
1809
+ },
1810
+ connection: {
1811
+ environment: environment
1812
+ },
1813
+ drawer: __assign(__assign({}, state.drawer), {
1814
+ open: openDrawer,
1815
+ close: closeDrawer,
1816
+ toggle: toggleDrawer
1817
+ }),
1818
+ audiences: __assign(__assign({}, state.audiences), {
1819
+ forceActivateAudience: forceActivateAudience,
1820
+ resetAudiences: resetAudiences
1821
+ })
1822
+ };
1823
+ }; //subscribePreviewSdk watches for changes in the state and send them to the buildPreviewSdk
1824
+
1825
+
1826
+ var subscribePreviewSdk = function subscribePreviewSdk(previewSdkArgs, handler) {
1827
+ handler(buildPreviewSdk(previewSdkArgs));
1828
+ store.subscribe(function () {
1829
+ handler(buildPreviewSdk(previewSdkArgs));
1830
+ });
1831
+ };
1832
+
1833
+ var BUTTON_VARIABLES = {
1834
+ bottom: '128px',
1835
+ right: '0px',
1836
+ width: '48px',
1837
+ height: '184px'
1838
+ };
1839
+ var PREVIEW_VARIABLES = {
1840
+ bottom: '0px',
1841
+ right: '0px',
1842
+ width: '432px',
1843
+ height: '100vh'
1844
+ };
1845
+
1846
+ var registerWindowHandlers = function registerWindowHandlers(previewSdk) {
1847
+ var _a;
1848
+
1849
+ if (typeof window !== 'undefined') {
1850
+ window.ninetailed = Object.assign({}, window.ninetailed, {
1851
+ plugins: __assign(__assign({}, (_a = window.ninetailed) === null || _a === void 0 ? void 0 : _a.plugins), {
1852
+ preview: {
1853
+ open: previewSdk.drawer.open,
1854
+ close: previewSdk.drawer.close
1855
+ }
1856
+ })
1857
+ });
1858
+ }
1859
+ };
1860
+
1861
+ var enrichProfile = function enrichProfile(previewSdk, profile) {
1862
+ if (previewSdk) {
1863
+ var audiences = union__default["default"](profile === null || profile === void 0 ? void 0 : profile.audiences, previewSdk.audiences.forced);
1864
+
1865
+ if (!isEqual__default["default"](profile === null || profile === void 0 ? void 0 : profile.audiences, previewSdk.audiences.forced)) {
1866
+ return __assign(__assign({}, profile), {
1867
+ audiences: audiences
1868
+ });
1869
+ }
1870
+ }
1871
+
1872
+ return profile;
1873
+ };
1874
+
1875
+ var NinetailedPreviewPlugin = function NinetailedPreviewPlugin(_a) {
1876
+ var clientId = _a.clientId,
1877
+ secret = _a.secret,
1878
+ url = _a.url,
1879
+ environment = _a.environment,
1880
+ hideSidebarOpener = _a.hideSidebarOpener;
1881
+ var previewSdk;
1882
+ var lastProfile;
1883
+ return {
1884
+ name: 'ninetailed:preview',
1885
+ config: {},
1886
+ initialize: function (_a) {
1887
+ var instance = _a.instance;
1888
+
1889
+ if (typeof window !== 'undefined') {
1890
+ var PreviewBridge = require('@ninetailed/experience.js-preview-bridge').PreviewBridge;
1891
+
1892
+ var container_1 = document.createElement('div');
1893
+ container_1.style.cssText = "position:fixed; z-index:999999;\n bottom: ".concat(BUTTON_VARIABLES.bottom, "; right: ").concat(BUTTON_VARIABLES.right, ";\n width: ").concat(BUTTON_VARIABLES.width, "; height: ").concat(BUTTON_VARIABLES.height, ";");
1894
+ document.body.appendChild(container_1);
1895
+ var preview_1 = PreviewBridge({
1896
+ url: url
1897
+ });
1898
+ preview_1.render(container_1);
1899
+ subscribePreviewSdk({
1900
+ clientId: clientId,
1901
+ secret: secret,
1902
+ environment: environment
1903
+ }, function (updatedPreviewSdk) {
1904
+ previewSdk = updatedPreviewSdk;
1905
+
1906
+ if (updatedPreviewSdk.drawer.isOpen) {
1907
+ container_1.style.right = PREVIEW_VARIABLES.right;
1908
+ container_1.style.bottom = PREVIEW_VARIABLES.bottom;
1909
+ container_1.style.width = PREVIEW_VARIABLES.width;
1910
+ container_1.style.height = PREVIEW_VARIABLES.height;
1911
+ } else {
1912
+ container_1.style.right = BUTTON_VARIABLES.right;
1913
+ container_1.style.bottom = BUTTON_VARIABLES.bottom;
1914
+ container_1.style.width = hideSidebarOpener ? '0px' : BUTTON_VARIABLES.width;
1915
+ container_1.style.height = hideSidebarOpener ? '0px' : BUTTON_VARIABLES.height;
1916
+ }
1917
+
1918
+ preview_1.updateProps({
1919
+ props: updatedPreviewSdk
1920
+ });
1921
+ instance.dispatch({
1922
+ type: 'profile',
1923
+ profile: lastProfile
1924
+ });
1925
+ registerWindowHandlers(updatedPreviewSdk);
1926
+ });
1927
+ }
1928
+ },
1929
+ profile: function (_a) {
1930
+ var _b, _c;
1931
+
1932
+ var payload = _a.payload;
1933
+ lastProfile = payload.profile;
1934
+
1935
+ if (!isEqual__default["default"](previewSdk.audiences.active, (_b = payload.profile) === null || _b === void 0 ? void 0 : _b.audiences)) {
1936
+ setActiveAudiences((_c = payload.profile) === null || _c === void 0 ? void 0 : _c.audiences);
1937
+ }
1938
+
1939
+ return __assign(__assign({}, payload), {
1940
+ profile: enrichProfile(previewSdk, lastProfile)
1941
+ });
1942
+ },
1943
+ loaded: function () {
1944
+ return true;
1945
+ }
1946
+ };
1947
+ };
1948
+
1949
+ exports.NinetailedPreviewPlugin = NinetailedPreviewPlugin;
1950
+
1951
+ Object.defineProperty(exports, '__esModule', { value: true });
1952
+
1953
+ }));