@ppg_pl/pallete 0.0.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.
Files changed (117) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +51 -0
  3. package/dist/cjs/index-f418fc60.js +1340 -0
  4. package/dist/cjs/index.cjs.js +2 -0
  5. package/dist/cjs/loader.cjs.js +21 -0
  6. package/dist/cjs/my-backdrop_8.cjs.entry.js +8109 -0
  7. package/dist/cjs/pallete.cjs.js +19 -0
  8. package/dist/collection/collection-manifest.json +19 -0
  9. package/dist/collection/components/api/index.js +19 -0
  10. package/dist/collection/components/api/services.js +81 -0
  11. package/dist/collection/components/my-backdrop/my-backdrop.css +21 -0
  12. package/dist/collection/components/my-backdrop/my-backdrop.js +13 -0
  13. package/dist/collection/components/my-colorbox/my-colorbox.css +60 -0
  14. package/dist/collection/components/my-colorbox/my-colorbox.js +145 -0
  15. package/dist/collection/components/my-colorinfo/my-colorinfo.js +197 -0
  16. package/dist/collection/components/my-component/my-component.css +18 -0
  17. package/dist/collection/components/my-component/my-component.js +106 -0
  18. package/dist/collection/components/my-loader/my-loader.css +85 -0
  19. package/dist/collection/components/my-loader/my-loader.js +18 -0
  20. package/dist/collection/components/my-modal/assets/arrow_down.png +0 -0
  21. package/dist/collection/components/my-modal/assets/close.png +0 -0
  22. package/dist/collection/components/my-modal/my-modal.css +323 -0
  23. package/dist/collection/components/my-modal/my-modal.js +430 -0
  24. package/dist/collection/components/my-search/assets/search.svg +15 -0
  25. package/dist/collection/components/my-search/my-search.css +43 -0
  26. package/dist/collection/components/my-search/my-search.js +112 -0
  27. package/dist/collection/components/my-slider/index.js +145 -0
  28. package/dist/collection/components/my-slider/my-slider.css +96 -0
  29. package/dist/collection/gtmUtils.js +3 -0
  30. package/dist/collection/index.js +1 -0
  31. package/dist/collection/types.js +1 -0
  32. package/dist/components/gtmUtils.js +5 -0
  33. package/dist/components/index.d.ts +29 -0
  34. package/dist/components/index.js +9 -0
  35. package/dist/components/index2.js +5458 -0
  36. package/dist/components/my-backdrop.d.ts +11 -0
  37. package/dist/components/my-backdrop.js +6 -0
  38. package/dist/components/my-backdrop2.js +29 -0
  39. package/dist/components/my-colorbox.d.ts +11 -0
  40. package/dist/components/my-colorbox.js +6 -0
  41. package/dist/components/my-colorbox2.js +61 -0
  42. package/dist/components/my-colorinfo.d.ts +11 -0
  43. package/dist/components/my-colorinfo.js +6 -0
  44. package/dist/components/my-colorinfo2.js +64 -0
  45. package/dist/components/my-component.d.ts +11 -0
  46. package/dist/components/my-component.js +216 -0
  47. package/dist/components/my-loader.d.ts +11 -0
  48. package/dist/components/my-loader.js +6 -0
  49. package/dist/components/my-loader2.js +29 -0
  50. package/dist/components/my-modal.d.ts +11 -0
  51. package/dist/components/my-modal.js +6 -0
  52. package/dist/components/my-modal2.js +2451 -0
  53. package/dist/components/my-search.d.ts +11 -0
  54. package/dist/components/my-search.js +6 -0
  55. package/dist/components/my-search2.js +55 -0
  56. package/dist/components/my-slider.d.ts +11 -0
  57. package/dist/components/my-slider.js +6 -0
  58. package/dist/esm/index-367ea408.js +1312 -0
  59. package/dist/esm/index.js +1 -0
  60. package/dist/esm/loader.js +17 -0
  61. package/dist/esm/my-backdrop_8.entry.js +8098 -0
  62. package/dist/esm/pallete.js +17 -0
  63. package/dist/esm/polyfills/core-js.js +11 -0
  64. package/dist/esm/polyfills/css-shim.js +1 -0
  65. package/dist/esm/polyfills/dom.js +79 -0
  66. package/dist/esm/polyfills/es5-html-element.js +1 -0
  67. package/dist/esm/polyfills/index.js +34 -0
  68. package/dist/esm/polyfills/system.js +6 -0
  69. package/dist/index.cjs.js +1 -0
  70. package/dist/index.js +1 -0
  71. package/dist/pallete/assets/arrow_down.png +0 -0
  72. package/dist/pallete/assets/close.png +0 -0
  73. package/dist/pallete/assets/search.svg +15 -0
  74. package/dist/pallete/index.esm.js +0 -0
  75. package/dist/pallete/p-02fc334c.js +2 -0
  76. package/dist/pallete/p-9f47a4e8.entry.js +1 -0
  77. package/dist/pallete/pallete.css +1 -0
  78. package/dist/pallete/pallete.esm.js +1 -0
  79. package/dist/types/components/api/index.d.ts +6 -0
  80. package/dist/types/components/api/services.d.ts +4 -0
  81. package/dist/types/components/my-backdrop/my-backdrop.d.ts +3 -0
  82. package/dist/types/components/my-colorbox/my-colorbox.d.ts +13 -0
  83. package/dist/types/components/my-colorinfo/my-colorinfo.d.ts +15 -0
  84. package/dist/types/components/my-component/my-component.d.ts +9 -0
  85. package/dist/types/components/my-loader/my-loader.d.ts +3 -0
  86. package/dist/types/components/my-modal/my-modal.d.ts +56 -0
  87. package/dist/types/components/my-search/my-search.d.ts +12 -0
  88. package/dist/types/components/my-slider/index.d.ts +15 -0
  89. package/dist/types/components.d.ts +198 -0
  90. package/dist/types/gtmUtils.d.ts +1 -0
  91. package/dist/types/index.d.ts +1 -0
  92. package/dist/types/stencil-public-runtime.d.ts +1565 -0
  93. package/dist/types/types.d.ts +56 -0
  94. package/loader/cdn.js +3 -0
  95. package/loader/index.cjs.js +3 -0
  96. package/loader/index.d.ts +12 -0
  97. package/loader/index.es2017.js +3 -0
  98. package/loader/index.js +4 -0
  99. package/loader/package.json +10 -0
  100. package/package.json +49 -0
  101. package/www/build/assets/arrow_down.png +0 -0
  102. package/www/build/assets/close.png +0 -0
  103. package/www/build/assets/fonts/Galatea-Regular.eot +0 -0
  104. package/www/build/assets/fonts/Galatea-Regular.ttf +0 -0
  105. package/www/build/assets/fonts/Galatea-Regular.woff +0 -0
  106. package/www/build/assets/fonts/Galatea-Regular.woff2 +0 -0
  107. package/www/build/assets/search.svg +15 -0
  108. package/www/build/index.esm.js +0 -0
  109. package/www/build/p-02fc334c.js +2 -0
  110. package/www/build/p-95e95ceb.css +1 -0
  111. package/www/build/p-9f47a4e8.entry.js +1 -0
  112. package/www/build/p-b0b8b976.js +1 -0
  113. package/www/build/pallete.css +1 -0
  114. package/www/build/pallete.esm.js +1 -0
  115. package/www/build/pallete.js +33 -0
  116. package/www/host.config.json +15 -0
  117. package/www/index.html +22 -0
@@ -0,0 +1,2451 @@
1
+ import { proxyCustomElement, HTMLElement as HTMLElement$1, createEvent, h, getAssetPath } from '@stencil/core/internal/client';
2
+ import { s as setDataLayer } from './gtmUtils.js';
3
+ import { d as defineCustomElement$5 } from './my-colorbox2.js';
4
+ import { d as defineCustomElement$4 } from './my-colorinfo2.js';
5
+ import { d as defineCustomElement$3 } from './my-loader2.js';
6
+ import { d as defineCustomElement$2 } from './my-search2.js';
7
+ import { d as defineCustomElement$1 } from './index2.js';
8
+
9
+ const APIURL = 'https://pallete-colors-backend.herokuapp.com';
10
+ class API {
11
+ async getData(ep) {
12
+ try {
13
+ const request = await fetch(`${APIURL}/api/${ep}`, {
14
+ method: 'GET',
15
+ headers: {
16
+ 'Content-Type': 'application/json',
17
+ },
18
+ });
19
+ const response = await request.json();
20
+ return response;
21
+ }
22
+ catch (error) {
23
+ console.error(error);
24
+ }
25
+ }
26
+ }
27
+ const ApiService = new API();
28
+
29
+ /* eslint complexity: [2, 18], max-statements: [2, 33] */
30
+ var shams = function hasSymbols() {
31
+ if (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; }
32
+ if (typeof Symbol.iterator === 'symbol') { return true; }
33
+
34
+ var obj = {};
35
+ var sym = Symbol('test');
36
+ var symObj = Object(sym);
37
+ if (typeof sym === 'string') { return false; }
38
+
39
+ if (Object.prototype.toString.call(sym) !== '[object Symbol]') { return false; }
40
+ if (Object.prototype.toString.call(symObj) !== '[object Symbol]') { return false; }
41
+
42
+ // temp disabled per https://github.com/ljharb/object.assign/issues/17
43
+ // if (sym instanceof Symbol) { return false; }
44
+ // temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4
45
+ // if (!(symObj instanceof Symbol)) { return false; }
46
+
47
+ // if (typeof Symbol.prototype.toString !== 'function') { return false; }
48
+ // if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; }
49
+
50
+ var symVal = 42;
51
+ obj[sym] = symVal;
52
+ for (sym in obj) { return false; } // eslint-disable-line no-restricted-syntax, no-unreachable-loop
53
+ if (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; }
54
+
55
+ if (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; }
56
+
57
+ var syms = Object.getOwnPropertySymbols(obj);
58
+ if (syms.length !== 1 || syms[0] !== sym) { return false; }
59
+
60
+ if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; }
61
+
62
+ if (typeof Object.getOwnPropertyDescriptor === 'function') {
63
+ var descriptor = Object.getOwnPropertyDescriptor(obj, sym);
64
+ if (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; }
65
+ }
66
+
67
+ return true;
68
+ };
69
+
70
+ var origSymbol = typeof Symbol !== 'undefined' && Symbol;
71
+
72
+
73
+ var hasSymbols$1 = function hasNativeSymbols() {
74
+ if (typeof origSymbol !== 'function') { return false; }
75
+ if (typeof Symbol !== 'function') { return false; }
76
+ if (typeof origSymbol('foo') !== 'symbol') { return false; }
77
+ if (typeof Symbol('bar') !== 'symbol') { return false; }
78
+
79
+ return shams();
80
+ };
81
+
82
+ /* eslint no-invalid-this: 1 */
83
+
84
+ var ERROR_MESSAGE = 'Function.prototype.bind called on incompatible ';
85
+ var slice = Array.prototype.slice;
86
+ var toStr$1 = Object.prototype.toString;
87
+ var funcType = '[object Function]';
88
+
89
+ var implementation = function bind(that) {
90
+ var target = this;
91
+ if (typeof target !== 'function' || toStr$1.call(target) !== funcType) {
92
+ throw new TypeError(ERROR_MESSAGE + target);
93
+ }
94
+ var args = slice.call(arguments, 1);
95
+
96
+ var bound;
97
+ var binder = function () {
98
+ if (this instanceof bound) {
99
+ var result = target.apply(
100
+ this,
101
+ args.concat(slice.call(arguments))
102
+ );
103
+ if (Object(result) === result) {
104
+ return result;
105
+ }
106
+ return this;
107
+ } else {
108
+ return target.apply(
109
+ that,
110
+ args.concat(slice.call(arguments))
111
+ );
112
+ }
113
+ };
114
+
115
+ var boundLength = Math.max(0, target.length - args.length);
116
+ var boundArgs = [];
117
+ for (var i = 0; i < boundLength; i++) {
118
+ boundArgs.push('$' + i);
119
+ }
120
+
121
+ bound = Function('binder', 'return function (' + boundArgs.join(',') + '){ return binder.apply(this,arguments); }')(binder);
122
+
123
+ if (target.prototype) {
124
+ var Empty = function Empty() {};
125
+ Empty.prototype = target.prototype;
126
+ bound.prototype = new Empty();
127
+ Empty.prototype = null;
128
+ }
129
+
130
+ return bound;
131
+ };
132
+
133
+ var functionBind = Function.prototype.bind || implementation;
134
+
135
+ var src = functionBind.call(Function.call, Object.prototype.hasOwnProperty);
136
+
137
+ var undefined$1;
138
+
139
+ var $SyntaxError = SyntaxError;
140
+ var $Function = Function;
141
+ var $TypeError$1 = TypeError;
142
+
143
+ // eslint-disable-next-line consistent-return
144
+ var getEvalledConstructor = function (expressionSyntax) {
145
+ try {
146
+ return $Function('"use strict"; return (' + expressionSyntax + ').constructor;')();
147
+ } catch (e) {}
148
+ };
149
+
150
+ var $gOPD = Object.getOwnPropertyDescriptor;
151
+
152
+ var throwTypeError = function () {
153
+ throw new $TypeError$1();
154
+ };
155
+ var ThrowTypeError = $gOPD
156
+ ? (function () {
157
+ try {
158
+ return throwTypeError;
159
+ } catch (calleeThrows) {
160
+ try {
161
+ // IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '')
162
+ return $gOPD(arguments, 'callee').get;
163
+ } catch (gOPDthrows) {
164
+ return throwTypeError;
165
+ }
166
+ }
167
+ }())
168
+ : throwTypeError;
169
+
170
+ var hasSymbols = hasSymbols$1();
171
+
172
+ var getProto = Object.getPrototypeOf || function (x) { return x.__proto__; }; // eslint-disable-line no-proto
173
+
174
+ var needsEval = {};
175
+
176
+ var TypedArray = typeof Uint8Array === 'undefined' ? undefined$1 : getProto(Uint8Array);
177
+
178
+ var INTRINSICS = {
179
+ '%AggregateError%': typeof AggregateError === 'undefined' ? undefined$1 : AggregateError,
180
+ '%Array%': Array,
181
+ '%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined$1 : ArrayBuffer,
182
+ '%ArrayIteratorPrototype%': hasSymbols ? getProto([][Symbol.iterator]()) : undefined$1,
183
+ '%AsyncFromSyncIteratorPrototype%': undefined$1,
184
+ '%AsyncFunction%': needsEval,
185
+ '%AsyncGenerator%': needsEval,
186
+ '%AsyncGeneratorFunction%': needsEval,
187
+ '%AsyncIteratorPrototype%': needsEval,
188
+ '%Atomics%': typeof Atomics === 'undefined' ? undefined$1 : Atomics,
189
+ '%BigInt%': typeof BigInt === 'undefined' ? undefined$1 : BigInt,
190
+ '%Boolean%': Boolean,
191
+ '%DataView%': typeof DataView === 'undefined' ? undefined$1 : DataView,
192
+ '%Date%': Date,
193
+ '%decodeURI%': decodeURI,
194
+ '%decodeURIComponent%': decodeURIComponent,
195
+ '%encodeURI%': encodeURI,
196
+ '%encodeURIComponent%': encodeURIComponent,
197
+ '%Error%': Error,
198
+ '%eval%': eval, // eslint-disable-line no-eval
199
+ '%EvalError%': EvalError,
200
+ '%Float32Array%': typeof Float32Array === 'undefined' ? undefined$1 : Float32Array,
201
+ '%Float64Array%': typeof Float64Array === 'undefined' ? undefined$1 : Float64Array,
202
+ '%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined$1 : FinalizationRegistry,
203
+ '%Function%': $Function,
204
+ '%GeneratorFunction%': needsEval,
205
+ '%Int8Array%': typeof Int8Array === 'undefined' ? undefined$1 : Int8Array,
206
+ '%Int16Array%': typeof Int16Array === 'undefined' ? undefined$1 : Int16Array,
207
+ '%Int32Array%': typeof Int32Array === 'undefined' ? undefined$1 : Int32Array,
208
+ '%isFinite%': isFinite,
209
+ '%isNaN%': isNaN,
210
+ '%IteratorPrototype%': hasSymbols ? getProto(getProto([][Symbol.iterator]())) : undefined$1,
211
+ '%JSON%': typeof JSON === 'object' ? JSON : undefined$1,
212
+ '%Map%': typeof Map === 'undefined' ? undefined$1 : Map,
213
+ '%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols ? undefined$1 : getProto(new Map()[Symbol.iterator]()),
214
+ '%Math%': Math,
215
+ '%Number%': Number,
216
+ '%Object%': Object,
217
+ '%parseFloat%': parseFloat,
218
+ '%parseInt%': parseInt,
219
+ '%Promise%': typeof Promise === 'undefined' ? undefined$1 : Promise,
220
+ '%Proxy%': typeof Proxy === 'undefined' ? undefined$1 : Proxy,
221
+ '%RangeError%': RangeError,
222
+ '%ReferenceError%': ReferenceError,
223
+ '%Reflect%': typeof Reflect === 'undefined' ? undefined$1 : Reflect,
224
+ '%RegExp%': RegExp,
225
+ '%Set%': typeof Set === 'undefined' ? undefined$1 : Set,
226
+ '%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols ? undefined$1 : getProto(new Set()[Symbol.iterator]()),
227
+ '%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined$1 : SharedArrayBuffer,
228
+ '%String%': String,
229
+ '%StringIteratorPrototype%': hasSymbols ? getProto(''[Symbol.iterator]()) : undefined$1,
230
+ '%Symbol%': hasSymbols ? Symbol : undefined$1,
231
+ '%SyntaxError%': $SyntaxError,
232
+ '%ThrowTypeError%': ThrowTypeError,
233
+ '%TypedArray%': TypedArray,
234
+ '%TypeError%': $TypeError$1,
235
+ '%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined$1 : Uint8Array,
236
+ '%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined$1 : Uint8ClampedArray,
237
+ '%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined$1 : Uint16Array,
238
+ '%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined$1 : Uint32Array,
239
+ '%URIError%': URIError,
240
+ '%WeakMap%': typeof WeakMap === 'undefined' ? undefined$1 : WeakMap,
241
+ '%WeakRef%': typeof WeakRef === 'undefined' ? undefined$1 : WeakRef,
242
+ '%WeakSet%': typeof WeakSet === 'undefined' ? undefined$1 : WeakSet
243
+ };
244
+
245
+ var doEval = function doEval(name) {
246
+ var value;
247
+ if (name === '%AsyncFunction%') {
248
+ value = getEvalledConstructor('async function () {}');
249
+ } else if (name === '%GeneratorFunction%') {
250
+ value = getEvalledConstructor('function* () {}');
251
+ } else if (name === '%AsyncGeneratorFunction%') {
252
+ value = getEvalledConstructor('async function* () {}');
253
+ } else if (name === '%AsyncGenerator%') {
254
+ var fn = doEval('%AsyncGeneratorFunction%');
255
+ if (fn) {
256
+ value = fn.prototype;
257
+ }
258
+ } else if (name === '%AsyncIteratorPrototype%') {
259
+ var gen = doEval('%AsyncGenerator%');
260
+ if (gen) {
261
+ value = getProto(gen.prototype);
262
+ }
263
+ }
264
+
265
+ INTRINSICS[name] = value;
266
+
267
+ return value;
268
+ };
269
+
270
+ var LEGACY_ALIASES = {
271
+ '%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'],
272
+ '%ArrayPrototype%': ['Array', 'prototype'],
273
+ '%ArrayProto_entries%': ['Array', 'prototype', 'entries'],
274
+ '%ArrayProto_forEach%': ['Array', 'prototype', 'forEach'],
275
+ '%ArrayProto_keys%': ['Array', 'prototype', 'keys'],
276
+ '%ArrayProto_values%': ['Array', 'prototype', 'values'],
277
+ '%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'],
278
+ '%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'],
279
+ '%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'],
280
+ '%BooleanPrototype%': ['Boolean', 'prototype'],
281
+ '%DataViewPrototype%': ['DataView', 'prototype'],
282
+ '%DatePrototype%': ['Date', 'prototype'],
283
+ '%ErrorPrototype%': ['Error', 'prototype'],
284
+ '%EvalErrorPrototype%': ['EvalError', 'prototype'],
285
+ '%Float32ArrayPrototype%': ['Float32Array', 'prototype'],
286
+ '%Float64ArrayPrototype%': ['Float64Array', 'prototype'],
287
+ '%FunctionPrototype%': ['Function', 'prototype'],
288
+ '%Generator%': ['GeneratorFunction', 'prototype'],
289
+ '%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'],
290
+ '%Int8ArrayPrototype%': ['Int8Array', 'prototype'],
291
+ '%Int16ArrayPrototype%': ['Int16Array', 'prototype'],
292
+ '%Int32ArrayPrototype%': ['Int32Array', 'prototype'],
293
+ '%JSONParse%': ['JSON', 'parse'],
294
+ '%JSONStringify%': ['JSON', 'stringify'],
295
+ '%MapPrototype%': ['Map', 'prototype'],
296
+ '%NumberPrototype%': ['Number', 'prototype'],
297
+ '%ObjectPrototype%': ['Object', 'prototype'],
298
+ '%ObjProto_toString%': ['Object', 'prototype', 'toString'],
299
+ '%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'],
300
+ '%PromisePrototype%': ['Promise', 'prototype'],
301
+ '%PromiseProto_then%': ['Promise', 'prototype', 'then'],
302
+ '%Promise_all%': ['Promise', 'all'],
303
+ '%Promise_reject%': ['Promise', 'reject'],
304
+ '%Promise_resolve%': ['Promise', 'resolve'],
305
+ '%RangeErrorPrototype%': ['RangeError', 'prototype'],
306
+ '%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'],
307
+ '%RegExpPrototype%': ['RegExp', 'prototype'],
308
+ '%SetPrototype%': ['Set', 'prototype'],
309
+ '%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'],
310
+ '%StringPrototype%': ['String', 'prototype'],
311
+ '%SymbolPrototype%': ['Symbol', 'prototype'],
312
+ '%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'],
313
+ '%TypedArrayPrototype%': ['TypedArray', 'prototype'],
314
+ '%TypeErrorPrototype%': ['TypeError', 'prototype'],
315
+ '%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'],
316
+ '%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'],
317
+ '%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'],
318
+ '%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'],
319
+ '%URIErrorPrototype%': ['URIError', 'prototype'],
320
+ '%WeakMapPrototype%': ['WeakMap', 'prototype'],
321
+ '%WeakSetPrototype%': ['WeakSet', 'prototype']
322
+ };
323
+
324
+
325
+
326
+ var $concat$1 = functionBind.call(Function.call, Array.prototype.concat);
327
+ var $spliceApply = functionBind.call(Function.apply, Array.prototype.splice);
328
+ var $replace$1 = functionBind.call(Function.call, String.prototype.replace);
329
+ var $strSlice = functionBind.call(Function.call, String.prototype.slice);
330
+ var $exec = functionBind.call(Function.call, RegExp.prototype.exec);
331
+
332
+ /* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */
333
+ var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g;
334
+ var reEscapeChar = /\\(\\)?/g; /** Used to match backslashes in property paths. */
335
+ var stringToPath = function stringToPath(string) {
336
+ var first = $strSlice(string, 0, 1);
337
+ var last = $strSlice(string, -1);
338
+ if (first === '%' && last !== '%') {
339
+ throw new $SyntaxError('invalid intrinsic syntax, expected closing `%`');
340
+ } else if (last === '%' && first !== '%') {
341
+ throw new $SyntaxError('invalid intrinsic syntax, expected opening `%`');
342
+ }
343
+ var result = [];
344
+ $replace$1(string, rePropName, function (match, number, quote, subString) {
345
+ result[result.length] = quote ? $replace$1(subString, reEscapeChar, '$1') : number || match;
346
+ });
347
+ return result;
348
+ };
349
+ /* end adaptation */
350
+
351
+ var getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) {
352
+ var intrinsicName = name;
353
+ var alias;
354
+ if (src(LEGACY_ALIASES, intrinsicName)) {
355
+ alias = LEGACY_ALIASES[intrinsicName];
356
+ intrinsicName = '%' + alias[0] + '%';
357
+ }
358
+
359
+ if (src(INTRINSICS, intrinsicName)) {
360
+ var value = INTRINSICS[intrinsicName];
361
+ if (value === needsEval) {
362
+ value = doEval(intrinsicName);
363
+ }
364
+ if (typeof value === 'undefined' && !allowMissing) {
365
+ throw new $TypeError$1('intrinsic ' + name + ' exists, but is not available. Please file an issue!');
366
+ }
367
+
368
+ return {
369
+ alias: alias,
370
+ name: intrinsicName,
371
+ value: value
372
+ };
373
+ }
374
+
375
+ throw new $SyntaxError('intrinsic ' + name + ' does not exist!');
376
+ };
377
+
378
+ var getIntrinsic = function GetIntrinsic(name, allowMissing) {
379
+ if (typeof name !== 'string' || name.length === 0) {
380
+ throw new $TypeError$1('intrinsic name must be a non-empty string');
381
+ }
382
+ if (arguments.length > 1 && typeof allowMissing !== 'boolean') {
383
+ throw new $TypeError$1('"allowMissing" argument must be a boolean');
384
+ }
385
+
386
+ if ($exec(/^%?[^%]*%?$/g, name) === null) {
387
+ throw new $SyntaxError('`%` may not be present anywhere but at the beginning and end of the intrinsic name');
388
+ }
389
+ var parts = stringToPath(name);
390
+ var intrinsicBaseName = parts.length > 0 ? parts[0] : '';
391
+
392
+ var intrinsic = getBaseIntrinsic('%' + intrinsicBaseName + '%', allowMissing);
393
+ var intrinsicRealName = intrinsic.name;
394
+ var value = intrinsic.value;
395
+ var skipFurtherCaching = false;
396
+
397
+ var alias = intrinsic.alias;
398
+ if (alias) {
399
+ intrinsicBaseName = alias[0];
400
+ $spliceApply(parts, $concat$1([0, 1], alias));
401
+ }
402
+
403
+ for (var i = 1, isOwn = true; i < parts.length; i += 1) {
404
+ var part = parts[i];
405
+ var first = $strSlice(part, 0, 1);
406
+ var last = $strSlice(part, -1);
407
+ if (
408
+ (
409
+ (first === '"' || first === "'" || first === '`')
410
+ || (last === '"' || last === "'" || last === '`')
411
+ )
412
+ && first !== last
413
+ ) {
414
+ throw new $SyntaxError('property names with quotes must have matching quotes');
415
+ }
416
+ if (part === 'constructor' || !isOwn) {
417
+ skipFurtherCaching = true;
418
+ }
419
+
420
+ intrinsicBaseName += '.' + part;
421
+ intrinsicRealName = '%' + intrinsicBaseName + '%';
422
+
423
+ if (src(INTRINSICS, intrinsicRealName)) {
424
+ value = INTRINSICS[intrinsicRealName];
425
+ } else if (value != null) {
426
+ if (!(part in value)) {
427
+ if (!allowMissing) {
428
+ throw new $TypeError$1('base intrinsic for ' + name + ' exists, but the property is not available.');
429
+ }
430
+ return void undefined$1;
431
+ }
432
+ if ($gOPD && (i + 1) >= parts.length) {
433
+ var desc = $gOPD(value, part);
434
+ isOwn = !!desc;
435
+
436
+ // By convention, when a data property is converted to an accessor
437
+ // property to emulate a data property that does not suffer from
438
+ // the override mistake, that accessor's getter is marked with
439
+ // an `originalValue` property. Here, when we detect this, we
440
+ // uphold the illusion by pretending to see that original data
441
+ // property, i.e., returning the value rather than the getter
442
+ // itself.
443
+ if (isOwn && 'get' in desc && !('originalValue' in desc.get)) {
444
+ value = desc.get;
445
+ } else {
446
+ value = value[part];
447
+ }
448
+ } else {
449
+ isOwn = src(value, part);
450
+ value = value[part];
451
+ }
452
+
453
+ if (isOwn && !skipFurtherCaching) {
454
+ INTRINSICS[intrinsicRealName] = value;
455
+ }
456
+ }
457
+ }
458
+ return value;
459
+ };
460
+
461
+ function createCommonjsModule(fn, basedir, module) {
462
+ return module = {
463
+ path: basedir,
464
+ exports: {},
465
+ require: function (path, base) {
466
+ return commonjsRequire();
467
+ }
468
+ }, fn(module, module.exports), module.exports;
469
+ }
470
+
471
+ function getAugmentedNamespace(n) {
472
+ if (n.__esModule) return n;
473
+ var a = Object.defineProperty({}, '__esModule', {value: true});
474
+ Object.keys(n).forEach(function (k) {
475
+ var d = Object.getOwnPropertyDescriptor(n, k);
476
+ Object.defineProperty(a, k, d.get ? d : {
477
+ enumerable: true,
478
+ get: function () {
479
+ return n[k];
480
+ }
481
+ });
482
+ });
483
+ return a;
484
+ }
485
+
486
+ function commonjsRequire () {
487
+ throw new Error('Dynamic requires are not currently supported by @rollup/plugin-commonjs');
488
+ }
489
+
490
+ var callBind = createCommonjsModule(function (module) {
491
+
492
+
493
+
494
+
495
+ var $apply = getIntrinsic('%Function.prototype.apply%');
496
+ var $call = getIntrinsic('%Function.prototype.call%');
497
+ var $reflectApply = getIntrinsic('%Reflect.apply%', true) || functionBind.call($call, $apply);
498
+
499
+ var $gOPD = getIntrinsic('%Object.getOwnPropertyDescriptor%', true);
500
+ var $defineProperty = getIntrinsic('%Object.defineProperty%', true);
501
+ var $max = getIntrinsic('%Math.max%');
502
+
503
+ if ($defineProperty) {
504
+ try {
505
+ $defineProperty({}, 'a', { value: 1 });
506
+ } catch (e) {
507
+ // IE 8 has a broken defineProperty
508
+ $defineProperty = null;
509
+ }
510
+ }
511
+
512
+ module.exports = function callBind(originalFunction) {
513
+ var func = $reflectApply(functionBind, $call, arguments);
514
+ if ($gOPD && $defineProperty) {
515
+ var desc = $gOPD(func, 'length');
516
+ if (desc.configurable) {
517
+ // original length, plus the receiver, minus any additional arguments (after the receiver)
518
+ $defineProperty(
519
+ func,
520
+ 'length',
521
+ { value: 1 + $max(0, originalFunction.length - (arguments.length - 1)) }
522
+ );
523
+ }
524
+ }
525
+ return func;
526
+ };
527
+
528
+ var applyBind = function applyBind() {
529
+ return $reflectApply(functionBind, $apply, arguments);
530
+ };
531
+
532
+ if ($defineProperty) {
533
+ $defineProperty(module.exports, 'apply', { value: applyBind });
534
+ } else {
535
+ module.exports.apply = applyBind;
536
+ }
537
+ });
538
+
539
+ var $indexOf = callBind(getIntrinsic('String.prototype.indexOf'));
540
+
541
+ var callBound = function callBoundIntrinsic(name, allowMissing) {
542
+ var intrinsic = getIntrinsic(name, !!allowMissing);
543
+ if (typeof intrinsic === 'function' && $indexOf(name, '.prototype.') > -1) {
544
+ return callBind(intrinsic);
545
+ }
546
+ return intrinsic;
547
+ };
548
+
549
+ const _nodeResolve_empty = {};
550
+
551
+ const _nodeResolve_empty$1 = /*#__PURE__*/Object.freeze({
552
+ __proto__: null,
553
+ 'default': _nodeResolve_empty
554
+ });
555
+
556
+ const utilInspect = /*@__PURE__*/getAugmentedNamespace(_nodeResolve_empty$1);
557
+
558
+ var hasMap = typeof Map === 'function' && Map.prototype;
559
+ var mapSizeDescriptor = Object.getOwnPropertyDescriptor && hasMap ? Object.getOwnPropertyDescriptor(Map.prototype, 'size') : null;
560
+ var mapSize = hasMap && mapSizeDescriptor && typeof mapSizeDescriptor.get === 'function' ? mapSizeDescriptor.get : null;
561
+ var mapForEach = hasMap && Map.prototype.forEach;
562
+ var hasSet = typeof Set === 'function' && Set.prototype;
563
+ var setSizeDescriptor = Object.getOwnPropertyDescriptor && hasSet ? Object.getOwnPropertyDescriptor(Set.prototype, 'size') : null;
564
+ var setSize = hasSet && setSizeDescriptor && typeof setSizeDescriptor.get === 'function' ? setSizeDescriptor.get : null;
565
+ var setForEach = hasSet && Set.prototype.forEach;
566
+ var hasWeakMap = typeof WeakMap === 'function' && WeakMap.prototype;
567
+ var weakMapHas = hasWeakMap ? WeakMap.prototype.has : null;
568
+ var hasWeakSet = typeof WeakSet === 'function' && WeakSet.prototype;
569
+ var weakSetHas = hasWeakSet ? WeakSet.prototype.has : null;
570
+ var hasWeakRef = typeof WeakRef === 'function' && WeakRef.prototype;
571
+ var weakRefDeref = hasWeakRef ? WeakRef.prototype.deref : null;
572
+ var booleanValueOf = Boolean.prototype.valueOf;
573
+ var objectToString = Object.prototype.toString;
574
+ var functionToString = Function.prototype.toString;
575
+ var $match = String.prototype.match;
576
+ var $slice = String.prototype.slice;
577
+ var $replace = String.prototype.replace;
578
+ var $toUpperCase = String.prototype.toUpperCase;
579
+ var $toLowerCase = String.prototype.toLowerCase;
580
+ var $test = RegExp.prototype.test;
581
+ var $concat = Array.prototype.concat;
582
+ var $join = Array.prototype.join;
583
+ var $arrSlice = Array.prototype.slice;
584
+ var $floor = Math.floor;
585
+ var bigIntValueOf = typeof BigInt === 'function' ? BigInt.prototype.valueOf : null;
586
+ var gOPS = Object.getOwnPropertySymbols;
587
+ var symToString = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol' ? Symbol.prototype.toString : null;
588
+ var hasShammedSymbols = typeof Symbol === 'function' && typeof Symbol.iterator === 'object';
589
+ // ie, `has-tostringtag/shams
590
+ var toStringTag = typeof Symbol === 'function' && Symbol.toStringTag && (typeof Symbol.toStringTag === hasShammedSymbols ? 'object' : 'symbol')
591
+ ? Symbol.toStringTag
592
+ : null;
593
+ var isEnumerable = Object.prototype.propertyIsEnumerable;
594
+
595
+ var gPO = (typeof Reflect === 'function' ? Reflect.getPrototypeOf : Object.getPrototypeOf) || (
596
+ [].__proto__ === Array.prototype // eslint-disable-line no-proto
597
+ ? function (O) {
598
+ return O.__proto__; // eslint-disable-line no-proto
599
+ }
600
+ : null
601
+ );
602
+
603
+ function addNumericSeparator(num, str) {
604
+ if (
605
+ num === Infinity
606
+ || num === -Infinity
607
+ || num !== num
608
+ || (num && num > -1000 && num < 1000)
609
+ || $test.call(/e/, str)
610
+ ) {
611
+ return str;
612
+ }
613
+ var sepRegex = /[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;
614
+ if (typeof num === 'number') {
615
+ var int = num < 0 ? -$floor(-num) : $floor(num); // trunc(num)
616
+ if (int !== num) {
617
+ var intStr = String(int);
618
+ var dec = $slice.call(str, intStr.length + 1);
619
+ return $replace.call(intStr, sepRegex, '$&_') + '.' + $replace.call($replace.call(dec, /([0-9]{3})/g, '$&_'), /_$/, '');
620
+ }
621
+ }
622
+ return $replace.call(str, sepRegex, '$&_');
623
+ }
624
+
625
+
626
+ var inspectCustom = utilInspect.custom;
627
+ var inspectSymbol = isSymbol(inspectCustom) ? inspectCustom : null;
628
+
629
+ var objectInspect = function inspect_(obj, options, depth, seen) {
630
+ var opts = options || {};
631
+
632
+ if (has$3(opts, 'quoteStyle') && (opts.quoteStyle !== 'single' && opts.quoteStyle !== 'double')) {
633
+ throw new TypeError('option "quoteStyle" must be "single" or "double"');
634
+ }
635
+ if (
636
+ has$3(opts, 'maxStringLength') && (typeof opts.maxStringLength === 'number'
637
+ ? opts.maxStringLength < 0 && opts.maxStringLength !== Infinity
638
+ : opts.maxStringLength !== null
639
+ )
640
+ ) {
641
+ throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');
642
+ }
643
+ var customInspect = has$3(opts, 'customInspect') ? opts.customInspect : true;
644
+ if (typeof customInspect !== 'boolean' && customInspect !== 'symbol') {
645
+ throw new TypeError('option "customInspect", if provided, must be `true`, `false`, or `\'symbol\'`');
646
+ }
647
+
648
+ if (
649
+ has$3(opts, 'indent')
650
+ && opts.indent !== null
651
+ && opts.indent !== '\t'
652
+ && !(parseInt(opts.indent, 10) === opts.indent && opts.indent > 0)
653
+ ) {
654
+ throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');
655
+ }
656
+ if (has$3(opts, 'numericSeparator') && typeof opts.numericSeparator !== 'boolean') {
657
+ throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');
658
+ }
659
+ var numericSeparator = opts.numericSeparator;
660
+
661
+ if (typeof obj === 'undefined') {
662
+ return 'undefined';
663
+ }
664
+ if (obj === null) {
665
+ return 'null';
666
+ }
667
+ if (typeof obj === 'boolean') {
668
+ return obj ? 'true' : 'false';
669
+ }
670
+
671
+ if (typeof obj === 'string') {
672
+ return inspectString(obj, opts);
673
+ }
674
+ if (typeof obj === 'number') {
675
+ if (obj === 0) {
676
+ return Infinity / obj > 0 ? '0' : '-0';
677
+ }
678
+ var str = String(obj);
679
+ return numericSeparator ? addNumericSeparator(obj, str) : str;
680
+ }
681
+ if (typeof obj === 'bigint') {
682
+ var bigIntStr = String(obj) + 'n';
683
+ return numericSeparator ? addNumericSeparator(obj, bigIntStr) : bigIntStr;
684
+ }
685
+
686
+ var maxDepth = typeof opts.depth === 'undefined' ? 5 : opts.depth;
687
+ if (typeof depth === 'undefined') { depth = 0; }
688
+ if (depth >= maxDepth && maxDepth > 0 && typeof obj === 'object') {
689
+ return isArray$3(obj) ? '[Array]' : '[Object]';
690
+ }
691
+
692
+ var indent = getIndent(opts, depth);
693
+
694
+ if (typeof seen === 'undefined') {
695
+ seen = [];
696
+ } else if (indexOf(seen, obj) >= 0) {
697
+ return '[Circular]';
698
+ }
699
+
700
+ function inspect(value, from, noIndent) {
701
+ if (from) {
702
+ seen = $arrSlice.call(seen);
703
+ seen.push(from);
704
+ }
705
+ if (noIndent) {
706
+ var newOpts = {
707
+ depth: opts.depth
708
+ };
709
+ if (has$3(opts, 'quoteStyle')) {
710
+ newOpts.quoteStyle = opts.quoteStyle;
711
+ }
712
+ return inspect_(value, newOpts, depth + 1, seen);
713
+ }
714
+ return inspect_(value, opts, depth + 1, seen);
715
+ }
716
+
717
+ if (typeof obj === 'function' && !isRegExp$1(obj)) { // in older engines, regexes are callable
718
+ var name = nameOf(obj);
719
+ var keys = arrObjKeys(obj, inspect);
720
+ return '[Function' + (name ? ': ' + name : ' (anonymous)') + ']' + (keys.length > 0 ? ' { ' + $join.call(keys, ', ') + ' }' : '');
721
+ }
722
+ if (isSymbol(obj)) {
723
+ var symString = hasShammedSymbols ? $replace.call(String(obj), /^(Symbol\(.*\))_[^)]*$/, '$1') : symToString.call(obj);
724
+ return typeof obj === 'object' && !hasShammedSymbols ? markBoxed(symString) : symString;
725
+ }
726
+ if (isElement(obj)) {
727
+ var s = '<' + $toLowerCase.call(String(obj.nodeName));
728
+ var attrs = obj.attributes || [];
729
+ for (var i = 0; i < attrs.length; i++) {
730
+ s += ' ' + attrs[i].name + '=' + wrapQuotes(quote(attrs[i].value), 'double', opts);
731
+ }
732
+ s += '>';
733
+ if (obj.childNodes && obj.childNodes.length) { s += '...'; }
734
+ s += '</' + $toLowerCase.call(String(obj.nodeName)) + '>';
735
+ return s;
736
+ }
737
+ if (isArray$3(obj)) {
738
+ if (obj.length === 0) { return '[]'; }
739
+ var xs = arrObjKeys(obj, inspect);
740
+ if (indent && !singleLineValues(xs)) {
741
+ return '[' + indentedJoin(xs, indent) + ']';
742
+ }
743
+ return '[ ' + $join.call(xs, ', ') + ' ]';
744
+ }
745
+ if (isError(obj)) {
746
+ var parts = arrObjKeys(obj, inspect);
747
+ if (!('cause' in Error.prototype) && 'cause' in obj && !isEnumerable.call(obj, 'cause')) {
748
+ return '{ [' + String(obj) + '] ' + $join.call($concat.call('[cause]: ' + inspect(obj.cause), parts), ', ') + ' }';
749
+ }
750
+ if (parts.length === 0) { return '[' + String(obj) + ']'; }
751
+ return '{ [' + String(obj) + '] ' + $join.call(parts, ', ') + ' }';
752
+ }
753
+ if (typeof obj === 'object' && customInspect) {
754
+ if (inspectSymbol && typeof obj[inspectSymbol] === 'function' && utilInspect) {
755
+ return utilInspect(obj, { depth: maxDepth - depth });
756
+ } else if (customInspect !== 'symbol' && typeof obj.inspect === 'function') {
757
+ return obj.inspect();
758
+ }
759
+ }
760
+ if (isMap(obj)) {
761
+ var mapParts = [];
762
+ mapForEach.call(obj, function (value, key) {
763
+ mapParts.push(inspect(key, obj, true) + ' => ' + inspect(value, obj));
764
+ });
765
+ return collectionOf('Map', mapSize.call(obj), mapParts, indent);
766
+ }
767
+ if (isSet(obj)) {
768
+ var setParts = [];
769
+ setForEach.call(obj, function (value) {
770
+ setParts.push(inspect(value, obj));
771
+ });
772
+ return collectionOf('Set', setSize.call(obj), setParts, indent);
773
+ }
774
+ if (isWeakMap(obj)) {
775
+ return weakCollectionOf('WeakMap');
776
+ }
777
+ if (isWeakSet(obj)) {
778
+ return weakCollectionOf('WeakSet');
779
+ }
780
+ if (isWeakRef(obj)) {
781
+ return weakCollectionOf('WeakRef');
782
+ }
783
+ if (isNumber(obj)) {
784
+ return markBoxed(inspect(Number(obj)));
785
+ }
786
+ if (isBigInt(obj)) {
787
+ return markBoxed(inspect(bigIntValueOf.call(obj)));
788
+ }
789
+ if (isBoolean(obj)) {
790
+ return markBoxed(booleanValueOf.call(obj));
791
+ }
792
+ if (isString(obj)) {
793
+ return markBoxed(inspect(String(obj)));
794
+ }
795
+ if (!isDate(obj) && !isRegExp$1(obj)) {
796
+ var ys = arrObjKeys(obj, inspect);
797
+ var isPlainObject = gPO ? gPO(obj) === Object.prototype : obj instanceof Object || obj.constructor === Object;
798
+ var protoTag = obj instanceof Object ? '' : 'null prototype';
799
+ var stringTag = !isPlainObject && toStringTag && Object(obj) === obj && toStringTag in obj ? $slice.call(toStr(obj), 8, -1) : protoTag ? 'Object' : '';
800
+ var constructorTag = isPlainObject || typeof obj.constructor !== 'function' ? '' : obj.constructor.name ? obj.constructor.name + ' ' : '';
801
+ var tag = constructorTag + (stringTag || protoTag ? '[' + $join.call($concat.call([], stringTag || [], protoTag || []), ': ') + '] ' : '');
802
+ if (ys.length === 0) { return tag + '{}'; }
803
+ if (indent) {
804
+ return tag + '{' + indentedJoin(ys, indent) + '}';
805
+ }
806
+ return tag + '{ ' + $join.call(ys, ', ') + ' }';
807
+ }
808
+ return String(obj);
809
+ };
810
+
811
+ function wrapQuotes(s, defaultStyle, opts) {
812
+ var quoteChar = (opts.quoteStyle || defaultStyle) === 'double' ? '"' : "'";
813
+ return quoteChar + s + quoteChar;
814
+ }
815
+
816
+ function quote(s) {
817
+ return $replace.call(String(s), /"/g, '&quot;');
818
+ }
819
+
820
+ function isArray$3(obj) { return toStr(obj) === '[object Array]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
821
+ function isDate(obj) { return toStr(obj) === '[object Date]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
822
+ function isRegExp$1(obj) { return toStr(obj) === '[object RegExp]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
823
+ function isError(obj) { return toStr(obj) === '[object Error]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
824
+ function isString(obj) { return toStr(obj) === '[object String]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
825
+ function isNumber(obj) { return toStr(obj) === '[object Number]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
826
+ function isBoolean(obj) { return toStr(obj) === '[object Boolean]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
827
+
828
+ // Symbol and BigInt do have Symbol.toStringTag by spec, so that can't be used to eliminate false positives
829
+ function isSymbol(obj) {
830
+ if (hasShammedSymbols) {
831
+ return obj && typeof obj === 'object' && obj instanceof Symbol;
832
+ }
833
+ if (typeof obj === 'symbol') {
834
+ return true;
835
+ }
836
+ if (!obj || typeof obj !== 'object' || !symToString) {
837
+ return false;
838
+ }
839
+ try {
840
+ symToString.call(obj);
841
+ return true;
842
+ } catch (e) {}
843
+ return false;
844
+ }
845
+
846
+ function isBigInt(obj) {
847
+ if (!obj || typeof obj !== 'object' || !bigIntValueOf) {
848
+ return false;
849
+ }
850
+ try {
851
+ bigIntValueOf.call(obj);
852
+ return true;
853
+ } catch (e) {}
854
+ return false;
855
+ }
856
+
857
+ var hasOwn = Object.prototype.hasOwnProperty || function (key) { return key in this; };
858
+ function has$3(obj, key) {
859
+ return hasOwn.call(obj, key);
860
+ }
861
+
862
+ function toStr(obj) {
863
+ return objectToString.call(obj);
864
+ }
865
+
866
+ function nameOf(f) {
867
+ if (f.name) { return f.name; }
868
+ var m = $match.call(functionToString.call(f), /^function\s*([\w$]+)/);
869
+ if (m) { return m[1]; }
870
+ return null;
871
+ }
872
+
873
+ function indexOf(xs, x) {
874
+ if (xs.indexOf) { return xs.indexOf(x); }
875
+ for (var i = 0, l = xs.length; i < l; i++) {
876
+ if (xs[i] === x) { return i; }
877
+ }
878
+ return -1;
879
+ }
880
+
881
+ function isMap(x) {
882
+ if (!mapSize || !x || typeof x !== 'object') {
883
+ return false;
884
+ }
885
+ try {
886
+ mapSize.call(x);
887
+ try {
888
+ setSize.call(x);
889
+ } catch (s) {
890
+ return true;
891
+ }
892
+ return x instanceof Map; // core-js workaround, pre-v2.5.0
893
+ } catch (e) {}
894
+ return false;
895
+ }
896
+
897
+ function isWeakMap(x) {
898
+ if (!weakMapHas || !x || typeof x !== 'object') {
899
+ return false;
900
+ }
901
+ try {
902
+ weakMapHas.call(x, weakMapHas);
903
+ try {
904
+ weakSetHas.call(x, weakSetHas);
905
+ } catch (s) {
906
+ return true;
907
+ }
908
+ return x instanceof WeakMap; // core-js workaround, pre-v2.5.0
909
+ } catch (e) {}
910
+ return false;
911
+ }
912
+
913
+ function isWeakRef(x) {
914
+ if (!weakRefDeref || !x || typeof x !== 'object') {
915
+ return false;
916
+ }
917
+ try {
918
+ weakRefDeref.call(x);
919
+ return true;
920
+ } catch (e) {}
921
+ return false;
922
+ }
923
+
924
+ function isSet(x) {
925
+ if (!setSize || !x || typeof x !== 'object') {
926
+ return false;
927
+ }
928
+ try {
929
+ setSize.call(x);
930
+ try {
931
+ mapSize.call(x);
932
+ } catch (m) {
933
+ return true;
934
+ }
935
+ return x instanceof Set; // core-js workaround, pre-v2.5.0
936
+ } catch (e) {}
937
+ return false;
938
+ }
939
+
940
+ function isWeakSet(x) {
941
+ if (!weakSetHas || !x || typeof x !== 'object') {
942
+ return false;
943
+ }
944
+ try {
945
+ weakSetHas.call(x, weakSetHas);
946
+ try {
947
+ weakMapHas.call(x, weakMapHas);
948
+ } catch (s) {
949
+ return true;
950
+ }
951
+ return x instanceof WeakSet; // core-js workaround, pre-v2.5.0
952
+ } catch (e) {}
953
+ return false;
954
+ }
955
+
956
+ function isElement(x) {
957
+ if (!x || typeof x !== 'object') { return false; }
958
+ if (typeof HTMLElement !== 'undefined' && x instanceof HTMLElement) {
959
+ return true;
960
+ }
961
+ return typeof x.nodeName === 'string' && typeof x.getAttribute === 'function';
962
+ }
963
+
964
+ function inspectString(str, opts) {
965
+ if (str.length > opts.maxStringLength) {
966
+ var remaining = str.length - opts.maxStringLength;
967
+ var trailer = '... ' + remaining + ' more character' + (remaining > 1 ? 's' : '');
968
+ return inspectString($slice.call(str, 0, opts.maxStringLength), opts) + trailer;
969
+ }
970
+ // eslint-disable-next-line no-control-regex
971
+ var s = $replace.call($replace.call(str, /(['\\])/g, '\\$1'), /[\x00-\x1f]/g, lowbyte);
972
+ return wrapQuotes(s, 'single', opts);
973
+ }
974
+
975
+ function lowbyte(c) {
976
+ var n = c.charCodeAt(0);
977
+ var x = {
978
+ 8: 'b',
979
+ 9: 't',
980
+ 10: 'n',
981
+ 12: 'f',
982
+ 13: 'r'
983
+ }[n];
984
+ if (x) { return '\\' + x; }
985
+ return '\\x' + (n < 0x10 ? '0' : '') + $toUpperCase.call(n.toString(16));
986
+ }
987
+
988
+ function markBoxed(str) {
989
+ return 'Object(' + str + ')';
990
+ }
991
+
992
+ function weakCollectionOf(type) {
993
+ return type + ' { ? }';
994
+ }
995
+
996
+ function collectionOf(type, size, entries, indent) {
997
+ var joinedEntries = indent ? indentedJoin(entries, indent) : $join.call(entries, ', ');
998
+ return type + ' (' + size + ') {' + joinedEntries + '}';
999
+ }
1000
+
1001
+ function singleLineValues(xs) {
1002
+ for (var i = 0; i < xs.length; i++) {
1003
+ if (indexOf(xs[i], '\n') >= 0) {
1004
+ return false;
1005
+ }
1006
+ }
1007
+ return true;
1008
+ }
1009
+
1010
+ function getIndent(opts, depth) {
1011
+ var baseIndent;
1012
+ if (opts.indent === '\t') {
1013
+ baseIndent = '\t';
1014
+ } else if (typeof opts.indent === 'number' && opts.indent > 0) {
1015
+ baseIndent = $join.call(Array(opts.indent + 1), ' ');
1016
+ } else {
1017
+ return null;
1018
+ }
1019
+ return {
1020
+ base: baseIndent,
1021
+ prev: $join.call(Array(depth + 1), baseIndent)
1022
+ };
1023
+ }
1024
+
1025
+ function indentedJoin(xs, indent) {
1026
+ if (xs.length === 0) { return ''; }
1027
+ var lineJoiner = '\n' + indent.prev + indent.base;
1028
+ return lineJoiner + $join.call(xs, ',' + lineJoiner) + '\n' + indent.prev;
1029
+ }
1030
+
1031
+ function arrObjKeys(obj, inspect) {
1032
+ var isArr = isArray$3(obj);
1033
+ var xs = [];
1034
+ if (isArr) {
1035
+ xs.length = obj.length;
1036
+ for (var i = 0; i < obj.length; i++) {
1037
+ xs[i] = has$3(obj, i) ? inspect(obj[i], obj) : '';
1038
+ }
1039
+ }
1040
+ var syms = typeof gOPS === 'function' ? gOPS(obj) : [];
1041
+ var symMap;
1042
+ if (hasShammedSymbols) {
1043
+ symMap = {};
1044
+ for (var k = 0; k < syms.length; k++) {
1045
+ symMap['$' + syms[k]] = syms[k];
1046
+ }
1047
+ }
1048
+
1049
+ for (var key in obj) { // eslint-disable-line no-restricted-syntax
1050
+ if (!has$3(obj, key)) { continue; } // eslint-disable-line no-restricted-syntax, no-continue
1051
+ if (isArr && String(Number(key)) === key && key < obj.length) { continue; } // eslint-disable-line no-restricted-syntax, no-continue
1052
+ if (hasShammedSymbols && symMap['$' + key] instanceof Symbol) {
1053
+ // this is to prevent shammed Symbols, which are stored as strings, from being included in the string key section
1054
+ continue; // eslint-disable-line no-restricted-syntax, no-continue
1055
+ } else if ($test.call(/[^\w$]/, key)) {
1056
+ xs.push(inspect(key, obj) + ': ' + inspect(obj[key], obj));
1057
+ } else {
1058
+ xs.push(key + ': ' + inspect(obj[key], obj));
1059
+ }
1060
+ }
1061
+ if (typeof gOPS === 'function') {
1062
+ for (var j = 0; j < syms.length; j++) {
1063
+ if (isEnumerable.call(obj, syms[j])) {
1064
+ xs.push('[' + inspect(syms[j]) + ']: ' + inspect(obj[syms[j]], obj));
1065
+ }
1066
+ }
1067
+ }
1068
+ return xs;
1069
+ }
1070
+
1071
+ var $TypeError = getIntrinsic('%TypeError%');
1072
+ var $WeakMap = getIntrinsic('%WeakMap%', true);
1073
+ var $Map = getIntrinsic('%Map%', true);
1074
+
1075
+ var $weakMapGet = callBound('WeakMap.prototype.get', true);
1076
+ var $weakMapSet = callBound('WeakMap.prototype.set', true);
1077
+ var $weakMapHas = callBound('WeakMap.prototype.has', true);
1078
+ var $mapGet = callBound('Map.prototype.get', true);
1079
+ var $mapSet = callBound('Map.prototype.set', true);
1080
+ var $mapHas = callBound('Map.prototype.has', true);
1081
+
1082
+ /*
1083
+ * This function traverses the list returning the node corresponding to the
1084
+ * given key.
1085
+ *
1086
+ * That node is also moved to the head of the list, so that if it's accessed
1087
+ * again we don't need to traverse the whole list. By doing so, all the recently
1088
+ * used nodes can be accessed relatively quickly.
1089
+ */
1090
+ var listGetNode = function (list, key) { // eslint-disable-line consistent-return
1091
+ for (var prev = list, curr; (curr = prev.next) !== null; prev = curr) {
1092
+ if (curr.key === key) {
1093
+ prev.next = curr.next;
1094
+ curr.next = list.next;
1095
+ list.next = curr; // eslint-disable-line no-param-reassign
1096
+ return curr;
1097
+ }
1098
+ }
1099
+ };
1100
+
1101
+ var listGet = function (objects, key) {
1102
+ var node = listGetNode(objects, key);
1103
+ return node && node.value;
1104
+ };
1105
+ var listSet = function (objects, key, value) {
1106
+ var node = listGetNode(objects, key);
1107
+ if (node) {
1108
+ node.value = value;
1109
+ } else {
1110
+ // Prepend the new node to the beginning of the list
1111
+ objects.next = { // eslint-disable-line no-param-reassign
1112
+ key: key,
1113
+ next: objects.next,
1114
+ value: value
1115
+ };
1116
+ }
1117
+ };
1118
+ var listHas = function (objects, key) {
1119
+ return !!listGetNode(objects, key);
1120
+ };
1121
+
1122
+ var sideChannel = function getSideChannel() {
1123
+ var $wm;
1124
+ var $m;
1125
+ var $o;
1126
+ var channel = {
1127
+ assert: function (key) {
1128
+ if (!channel.has(key)) {
1129
+ throw new $TypeError('Side channel does not contain ' + objectInspect(key));
1130
+ }
1131
+ },
1132
+ get: function (key) { // eslint-disable-line consistent-return
1133
+ if ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {
1134
+ if ($wm) {
1135
+ return $weakMapGet($wm, key);
1136
+ }
1137
+ } else if ($Map) {
1138
+ if ($m) {
1139
+ return $mapGet($m, key);
1140
+ }
1141
+ } else {
1142
+ if ($o) { // eslint-disable-line no-lonely-if
1143
+ return listGet($o, key);
1144
+ }
1145
+ }
1146
+ },
1147
+ has: function (key) {
1148
+ if ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {
1149
+ if ($wm) {
1150
+ return $weakMapHas($wm, key);
1151
+ }
1152
+ } else if ($Map) {
1153
+ if ($m) {
1154
+ return $mapHas($m, key);
1155
+ }
1156
+ } else {
1157
+ if ($o) { // eslint-disable-line no-lonely-if
1158
+ return listHas($o, key);
1159
+ }
1160
+ }
1161
+ return false;
1162
+ },
1163
+ set: function (key, value) {
1164
+ if ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {
1165
+ if (!$wm) {
1166
+ $wm = new $WeakMap();
1167
+ }
1168
+ $weakMapSet($wm, key, value);
1169
+ } else if ($Map) {
1170
+ if (!$m) {
1171
+ $m = new $Map();
1172
+ }
1173
+ $mapSet($m, key, value);
1174
+ } else {
1175
+ if (!$o) {
1176
+ /*
1177
+ * Initialize the linked list as an empty node, so that we don't have
1178
+ * to special-case handling of the first node: we can always refer to
1179
+ * it as (previous node).next, instead of something like (list).head
1180
+ */
1181
+ $o = { key: {}, next: null };
1182
+ }
1183
+ listSet($o, key, value);
1184
+ }
1185
+ }
1186
+ };
1187
+ return channel;
1188
+ };
1189
+
1190
+ var replace = String.prototype.replace;
1191
+ var percentTwenties = /%20/g;
1192
+
1193
+ var Format = {
1194
+ RFC1738: 'RFC1738',
1195
+ RFC3986: 'RFC3986'
1196
+ };
1197
+
1198
+ var formats = {
1199
+ 'default': Format.RFC3986,
1200
+ formatters: {
1201
+ RFC1738: function (value) {
1202
+ return replace.call(value, percentTwenties, '+');
1203
+ },
1204
+ RFC3986: function (value) {
1205
+ return String(value);
1206
+ }
1207
+ },
1208
+ RFC1738: Format.RFC1738,
1209
+ RFC3986: Format.RFC3986
1210
+ };
1211
+
1212
+ var has$2 = Object.prototype.hasOwnProperty;
1213
+ var isArray$2 = Array.isArray;
1214
+
1215
+ var hexTable = (function () {
1216
+ var array = [];
1217
+ for (var i = 0; i < 256; ++i) {
1218
+ array.push('%' + ((i < 16 ? '0' : '') + i.toString(16)).toUpperCase());
1219
+ }
1220
+
1221
+ return array;
1222
+ }());
1223
+
1224
+ var compactQueue = function compactQueue(queue) {
1225
+ while (queue.length > 1) {
1226
+ var item = queue.pop();
1227
+ var obj = item.obj[item.prop];
1228
+
1229
+ if (isArray$2(obj)) {
1230
+ var compacted = [];
1231
+
1232
+ for (var j = 0; j < obj.length; ++j) {
1233
+ if (typeof obj[j] !== 'undefined') {
1234
+ compacted.push(obj[j]);
1235
+ }
1236
+ }
1237
+
1238
+ item.obj[item.prop] = compacted;
1239
+ }
1240
+ }
1241
+ };
1242
+
1243
+ var arrayToObject = function arrayToObject(source, options) {
1244
+ var obj = options && options.plainObjects ? Object.create(null) : {};
1245
+ for (var i = 0; i < source.length; ++i) {
1246
+ if (typeof source[i] !== 'undefined') {
1247
+ obj[i] = source[i];
1248
+ }
1249
+ }
1250
+
1251
+ return obj;
1252
+ };
1253
+
1254
+ var merge = function merge(target, source, options) {
1255
+ /* eslint no-param-reassign: 0 */
1256
+ if (!source) {
1257
+ return target;
1258
+ }
1259
+
1260
+ if (typeof source !== 'object') {
1261
+ if (isArray$2(target)) {
1262
+ target.push(source);
1263
+ } else if (target && typeof target === 'object') {
1264
+ if ((options && (options.plainObjects || options.allowPrototypes)) || !has$2.call(Object.prototype, source)) {
1265
+ target[source] = true;
1266
+ }
1267
+ } else {
1268
+ return [target, source];
1269
+ }
1270
+
1271
+ return target;
1272
+ }
1273
+
1274
+ if (!target || typeof target !== 'object') {
1275
+ return [target].concat(source);
1276
+ }
1277
+
1278
+ var mergeTarget = target;
1279
+ if (isArray$2(target) && !isArray$2(source)) {
1280
+ mergeTarget = arrayToObject(target, options);
1281
+ }
1282
+
1283
+ if (isArray$2(target) && isArray$2(source)) {
1284
+ source.forEach(function (item, i) {
1285
+ if (has$2.call(target, i)) {
1286
+ var targetItem = target[i];
1287
+ if (targetItem && typeof targetItem === 'object' && item && typeof item === 'object') {
1288
+ target[i] = merge(targetItem, item, options);
1289
+ } else {
1290
+ target.push(item);
1291
+ }
1292
+ } else {
1293
+ target[i] = item;
1294
+ }
1295
+ });
1296
+ return target;
1297
+ }
1298
+
1299
+ return Object.keys(source).reduce(function (acc, key) {
1300
+ var value = source[key];
1301
+
1302
+ if (has$2.call(acc, key)) {
1303
+ acc[key] = merge(acc[key], value, options);
1304
+ } else {
1305
+ acc[key] = value;
1306
+ }
1307
+ return acc;
1308
+ }, mergeTarget);
1309
+ };
1310
+
1311
+ var assign = function assignSingleSource(target, source) {
1312
+ return Object.keys(source).reduce(function (acc, key) {
1313
+ acc[key] = source[key];
1314
+ return acc;
1315
+ }, target);
1316
+ };
1317
+
1318
+ var decode = function (str, decoder, charset) {
1319
+ var strWithoutPlus = str.replace(/\+/g, ' ');
1320
+ if (charset === 'iso-8859-1') {
1321
+ // unescape never throws, no try...catch needed:
1322
+ return strWithoutPlus.replace(/%[0-9a-f]{2}/gi, unescape);
1323
+ }
1324
+ // utf-8
1325
+ try {
1326
+ return decodeURIComponent(strWithoutPlus);
1327
+ } catch (e) {
1328
+ return strWithoutPlus;
1329
+ }
1330
+ };
1331
+
1332
+ var encode = function encode(str, defaultEncoder, charset, kind, format) {
1333
+ // This code was originally written by Brian White (mscdex) for the io.js core querystring library.
1334
+ // It has been adapted here for stricter adherence to RFC 3986
1335
+ if (str.length === 0) {
1336
+ return str;
1337
+ }
1338
+
1339
+ var string = str;
1340
+ if (typeof str === 'symbol') {
1341
+ string = Symbol.prototype.toString.call(str);
1342
+ } else if (typeof str !== 'string') {
1343
+ string = String(str);
1344
+ }
1345
+
1346
+ if (charset === 'iso-8859-1') {
1347
+ return escape(string).replace(/%u[0-9a-f]{4}/gi, function ($0) {
1348
+ return '%26%23' + parseInt($0.slice(2), 16) + '%3B';
1349
+ });
1350
+ }
1351
+
1352
+ var out = '';
1353
+ for (var i = 0; i < string.length; ++i) {
1354
+ var c = string.charCodeAt(i);
1355
+
1356
+ if (
1357
+ c === 0x2D // -
1358
+ || c === 0x2E // .
1359
+ || c === 0x5F // _
1360
+ || c === 0x7E // ~
1361
+ || (c >= 0x30 && c <= 0x39) // 0-9
1362
+ || (c >= 0x41 && c <= 0x5A) // a-z
1363
+ || (c >= 0x61 && c <= 0x7A) // A-Z
1364
+ || (format === formats.RFC1738 && (c === 0x28 || c === 0x29)) // ( )
1365
+ ) {
1366
+ out += string.charAt(i);
1367
+ continue;
1368
+ }
1369
+
1370
+ if (c < 0x80) {
1371
+ out = out + hexTable[c];
1372
+ continue;
1373
+ }
1374
+
1375
+ if (c < 0x800) {
1376
+ out = out + (hexTable[0xC0 | (c >> 6)] + hexTable[0x80 | (c & 0x3F)]);
1377
+ continue;
1378
+ }
1379
+
1380
+ if (c < 0xD800 || c >= 0xE000) {
1381
+ out = out + (hexTable[0xE0 | (c >> 12)] + hexTable[0x80 | ((c >> 6) & 0x3F)] + hexTable[0x80 | (c & 0x3F)]);
1382
+ continue;
1383
+ }
1384
+
1385
+ i += 1;
1386
+ c = 0x10000 + (((c & 0x3FF) << 10) | (string.charCodeAt(i) & 0x3FF));
1387
+ /* eslint operator-linebreak: [2, "before"] */
1388
+ out += hexTable[0xF0 | (c >> 18)]
1389
+ + hexTable[0x80 | ((c >> 12) & 0x3F)]
1390
+ + hexTable[0x80 | ((c >> 6) & 0x3F)]
1391
+ + hexTable[0x80 | (c & 0x3F)];
1392
+ }
1393
+
1394
+ return out;
1395
+ };
1396
+
1397
+ var compact = function compact(value) {
1398
+ var queue = [{ obj: { o: value }, prop: 'o' }];
1399
+ var refs = [];
1400
+
1401
+ for (var i = 0; i < queue.length; ++i) {
1402
+ var item = queue[i];
1403
+ var obj = item.obj[item.prop];
1404
+
1405
+ var keys = Object.keys(obj);
1406
+ for (var j = 0; j < keys.length; ++j) {
1407
+ var key = keys[j];
1408
+ var val = obj[key];
1409
+ if (typeof val === 'object' && val !== null && refs.indexOf(val) === -1) {
1410
+ queue.push({ obj: obj, prop: key });
1411
+ refs.push(val);
1412
+ }
1413
+ }
1414
+ }
1415
+
1416
+ compactQueue(queue);
1417
+
1418
+ return value;
1419
+ };
1420
+
1421
+ var isRegExp = function isRegExp(obj) {
1422
+ return Object.prototype.toString.call(obj) === '[object RegExp]';
1423
+ };
1424
+
1425
+ var isBuffer = function isBuffer(obj) {
1426
+ if (!obj || typeof obj !== 'object') {
1427
+ return false;
1428
+ }
1429
+
1430
+ return !!(obj.constructor && obj.constructor.isBuffer && obj.constructor.isBuffer(obj));
1431
+ };
1432
+
1433
+ var combine = function combine(a, b) {
1434
+ return [].concat(a, b);
1435
+ };
1436
+
1437
+ var maybeMap = function maybeMap(val, fn) {
1438
+ if (isArray$2(val)) {
1439
+ var mapped = [];
1440
+ for (var i = 0; i < val.length; i += 1) {
1441
+ mapped.push(fn(val[i]));
1442
+ }
1443
+ return mapped;
1444
+ }
1445
+ return fn(val);
1446
+ };
1447
+
1448
+ var utils = {
1449
+ arrayToObject: arrayToObject,
1450
+ assign: assign,
1451
+ combine: combine,
1452
+ compact: compact,
1453
+ decode: decode,
1454
+ encode: encode,
1455
+ isBuffer: isBuffer,
1456
+ isRegExp: isRegExp,
1457
+ maybeMap: maybeMap,
1458
+ merge: merge
1459
+ };
1460
+
1461
+ var has$1 = Object.prototype.hasOwnProperty;
1462
+
1463
+ var arrayPrefixGenerators = {
1464
+ brackets: function brackets(prefix) {
1465
+ return prefix + '[]';
1466
+ },
1467
+ comma: 'comma',
1468
+ indices: function indices(prefix, key) {
1469
+ return prefix + '[' + key + ']';
1470
+ },
1471
+ repeat: function repeat(prefix) {
1472
+ return prefix;
1473
+ }
1474
+ };
1475
+
1476
+ var isArray$1 = Array.isArray;
1477
+ var split = String.prototype.split;
1478
+ var push = Array.prototype.push;
1479
+ var pushToArray = function (arr, valueOrArray) {
1480
+ push.apply(arr, isArray$1(valueOrArray) ? valueOrArray : [valueOrArray]);
1481
+ };
1482
+
1483
+ var toISO = Date.prototype.toISOString;
1484
+
1485
+ var defaultFormat = formats['default'];
1486
+ var defaults$1 = {
1487
+ addQueryPrefix: false,
1488
+ allowDots: false,
1489
+ charset: 'utf-8',
1490
+ charsetSentinel: false,
1491
+ delimiter: '&',
1492
+ encode: true,
1493
+ encoder: utils.encode,
1494
+ encodeValuesOnly: false,
1495
+ format: defaultFormat,
1496
+ formatter: formats.formatters[defaultFormat],
1497
+ // deprecated
1498
+ indices: false,
1499
+ serializeDate: function serializeDate(date) {
1500
+ return toISO.call(date);
1501
+ },
1502
+ skipNulls: false,
1503
+ strictNullHandling: false
1504
+ };
1505
+
1506
+ var isNonNullishPrimitive = function isNonNullishPrimitive(v) {
1507
+ return typeof v === 'string'
1508
+ || typeof v === 'number'
1509
+ || typeof v === 'boolean'
1510
+ || typeof v === 'symbol'
1511
+ || typeof v === 'bigint';
1512
+ };
1513
+
1514
+ var sentinel = {};
1515
+
1516
+ var stringify = function stringify(
1517
+ object,
1518
+ prefix,
1519
+ generateArrayPrefix,
1520
+ commaRoundTrip,
1521
+ strictNullHandling,
1522
+ skipNulls,
1523
+ encoder,
1524
+ filter,
1525
+ sort,
1526
+ allowDots,
1527
+ serializeDate,
1528
+ format,
1529
+ formatter,
1530
+ encodeValuesOnly,
1531
+ charset,
1532
+ sideChannel$1
1533
+ ) {
1534
+ var obj = object;
1535
+
1536
+ var tmpSc = sideChannel$1;
1537
+ var step = 0;
1538
+ var findFlag = false;
1539
+ while ((tmpSc = tmpSc.get(sentinel)) !== void undefined && !findFlag) {
1540
+ // Where object last appeared in the ref tree
1541
+ var pos = tmpSc.get(object);
1542
+ step += 1;
1543
+ if (typeof pos !== 'undefined') {
1544
+ if (pos === step) {
1545
+ throw new RangeError('Cyclic object value');
1546
+ } else {
1547
+ findFlag = true; // Break while
1548
+ }
1549
+ }
1550
+ if (typeof tmpSc.get(sentinel) === 'undefined') {
1551
+ step = 0;
1552
+ }
1553
+ }
1554
+
1555
+ if (typeof filter === 'function') {
1556
+ obj = filter(prefix, obj);
1557
+ } else if (obj instanceof Date) {
1558
+ obj = serializeDate(obj);
1559
+ } else if (generateArrayPrefix === 'comma' && isArray$1(obj)) {
1560
+ obj = utils.maybeMap(obj, function (value) {
1561
+ if (value instanceof Date) {
1562
+ return serializeDate(value);
1563
+ }
1564
+ return value;
1565
+ });
1566
+ }
1567
+
1568
+ if (obj === null) {
1569
+ if (strictNullHandling) {
1570
+ return encoder && !encodeValuesOnly ? encoder(prefix, defaults$1.encoder, charset, 'key', format) : prefix;
1571
+ }
1572
+
1573
+ obj = '';
1574
+ }
1575
+
1576
+ if (isNonNullishPrimitive(obj) || utils.isBuffer(obj)) {
1577
+ if (encoder) {
1578
+ var keyValue = encodeValuesOnly ? prefix : encoder(prefix, defaults$1.encoder, charset, 'key', format);
1579
+ if (generateArrayPrefix === 'comma' && encodeValuesOnly) {
1580
+ var valuesArray = split.call(String(obj), ',');
1581
+ var valuesJoined = '';
1582
+ for (var i = 0; i < valuesArray.length; ++i) {
1583
+ valuesJoined += (i === 0 ? '' : ',') + formatter(encoder(valuesArray[i], defaults$1.encoder, charset, 'value', format));
1584
+ }
1585
+ return [formatter(keyValue) + (commaRoundTrip && isArray$1(obj) && valuesArray.length === 1 ? '[]' : '') + '=' + valuesJoined];
1586
+ }
1587
+ return [formatter(keyValue) + '=' + formatter(encoder(obj, defaults$1.encoder, charset, 'value', format))];
1588
+ }
1589
+ return [formatter(prefix) + '=' + formatter(String(obj))];
1590
+ }
1591
+
1592
+ var values = [];
1593
+
1594
+ if (typeof obj === 'undefined') {
1595
+ return values;
1596
+ }
1597
+
1598
+ var objKeys;
1599
+ if (generateArrayPrefix === 'comma' && isArray$1(obj)) {
1600
+ // we need to join elements in
1601
+ objKeys = [{ value: obj.length > 0 ? obj.join(',') || null : void undefined }];
1602
+ } else if (isArray$1(filter)) {
1603
+ objKeys = filter;
1604
+ } else {
1605
+ var keys = Object.keys(obj);
1606
+ objKeys = sort ? keys.sort(sort) : keys;
1607
+ }
1608
+
1609
+ var adjustedPrefix = commaRoundTrip && isArray$1(obj) && obj.length === 1 ? prefix + '[]' : prefix;
1610
+
1611
+ for (var j = 0; j < objKeys.length; ++j) {
1612
+ var key = objKeys[j];
1613
+ var value = typeof key === 'object' && typeof key.value !== 'undefined' ? key.value : obj[key];
1614
+
1615
+ if (skipNulls && value === null) {
1616
+ continue;
1617
+ }
1618
+
1619
+ var keyPrefix = isArray$1(obj)
1620
+ ? typeof generateArrayPrefix === 'function' ? generateArrayPrefix(adjustedPrefix, key) : adjustedPrefix
1621
+ : adjustedPrefix + (allowDots ? '.' + key : '[' + key + ']');
1622
+
1623
+ sideChannel$1.set(object, step);
1624
+ var valueSideChannel = sideChannel();
1625
+ valueSideChannel.set(sentinel, sideChannel$1);
1626
+ pushToArray(values, stringify(
1627
+ value,
1628
+ keyPrefix,
1629
+ generateArrayPrefix,
1630
+ commaRoundTrip,
1631
+ strictNullHandling,
1632
+ skipNulls,
1633
+ encoder,
1634
+ filter,
1635
+ sort,
1636
+ allowDots,
1637
+ serializeDate,
1638
+ format,
1639
+ formatter,
1640
+ encodeValuesOnly,
1641
+ charset,
1642
+ valueSideChannel
1643
+ ));
1644
+ }
1645
+
1646
+ return values;
1647
+ };
1648
+
1649
+ var normalizeStringifyOptions = function normalizeStringifyOptions(opts) {
1650
+ if (!opts) {
1651
+ return defaults$1;
1652
+ }
1653
+
1654
+ if (opts.encoder !== null && typeof opts.encoder !== 'undefined' && typeof opts.encoder !== 'function') {
1655
+ throw new TypeError('Encoder has to be a function.');
1656
+ }
1657
+
1658
+ var charset = opts.charset || defaults$1.charset;
1659
+ if (typeof opts.charset !== 'undefined' && opts.charset !== 'utf-8' && opts.charset !== 'iso-8859-1') {
1660
+ throw new TypeError('The charset option must be either utf-8, iso-8859-1, or undefined');
1661
+ }
1662
+
1663
+ var format = formats['default'];
1664
+ if (typeof opts.format !== 'undefined') {
1665
+ if (!has$1.call(formats.formatters, opts.format)) {
1666
+ throw new TypeError('Unknown format option provided.');
1667
+ }
1668
+ format = opts.format;
1669
+ }
1670
+ var formatter = formats.formatters[format];
1671
+
1672
+ var filter = defaults$1.filter;
1673
+ if (typeof opts.filter === 'function' || isArray$1(opts.filter)) {
1674
+ filter = opts.filter;
1675
+ }
1676
+
1677
+ return {
1678
+ addQueryPrefix: typeof opts.addQueryPrefix === 'boolean' ? opts.addQueryPrefix : defaults$1.addQueryPrefix,
1679
+ allowDots: typeof opts.allowDots === 'undefined' ? defaults$1.allowDots : !!opts.allowDots,
1680
+ charset: charset,
1681
+ charsetSentinel: typeof opts.charsetSentinel === 'boolean' ? opts.charsetSentinel : defaults$1.charsetSentinel,
1682
+ delimiter: typeof opts.delimiter === 'undefined' ? defaults$1.delimiter : opts.delimiter,
1683
+ encode: typeof opts.encode === 'boolean' ? opts.encode : defaults$1.encode,
1684
+ encoder: typeof opts.encoder === 'function' ? opts.encoder : defaults$1.encoder,
1685
+ encodeValuesOnly: typeof opts.encodeValuesOnly === 'boolean' ? opts.encodeValuesOnly : defaults$1.encodeValuesOnly,
1686
+ filter: filter,
1687
+ format: format,
1688
+ formatter: formatter,
1689
+ serializeDate: typeof opts.serializeDate === 'function' ? opts.serializeDate : defaults$1.serializeDate,
1690
+ skipNulls: typeof opts.skipNulls === 'boolean' ? opts.skipNulls : defaults$1.skipNulls,
1691
+ sort: typeof opts.sort === 'function' ? opts.sort : null,
1692
+ strictNullHandling: typeof opts.strictNullHandling === 'boolean' ? opts.strictNullHandling : defaults$1.strictNullHandling
1693
+ };
1694
+ };
1695
+
1696
+ var stringify_1 = function (object, opts) {
1697
+ var obj = object;
1698
+ var options = normalizeStringifyOptions(opts);
1699
+
1700
+ var objKeys;
1701
+ var filter;
1702
+
1703
+ if (typeof options.filter === 'function') {
1704
+ filter = options.filter;
1705
+ obj = filter('', obj);
1706
+ } else if (isArray$1(options.filter)) {
1707
+ filter = options.filter;
1708
+ objKeys = filter;
1709
+ }
1710
+
1711
+ var keys = [];
1712
+
1713
+ if (typeof obj !== 'object' || obj === null) {
1714
+ return '';
1715
+ }
1716
+
1717
+ var arrayFormat;
1718
+ if (opts && opts.arrayFormat in arrayPrefixGenerators) {
1719
+ arrayFormat = opts.arrayFormat;
1720
+ } else if (opts && 'indices' in opts) {
1721
+ arrayFormat = opts.indices ? 'indices' : 'repeat';
1722
+ } else {
1723
+ arrayFormat = 'indices';
1724
+ }
1725
+
1726
+ var generateArrayPrefix = arrayPrefixGenerators[arrayFormat];
1727
+ if (opts && 'commaRoundTrip' in opts && typeof opts.commaRoundTrip !== 'boolean') {
1728
+ throw new TypeError('`commaRoundTrip` must be a boolean, or absent');
1729
+ }
1730
+ var commaRoundTrip = generateArrayPrefix === 'comma' && opts && opts.commaRoundTrip;
1731
+
1732
+ if (!objKeys) {
1733
+ objKeys = Object.keys(obj);
1734
+ }
1735
+
1736
+ if (options.sort) {
1737
+ objKeys.sort(options.sort);
1738
+ }
1739
+
1740
+ var sideChannel$1 = sideChannel();
1741
+ for (var i = 0; i < objKeys.length; ++i) {
1742
+ var key = objKeys[i];
1743
+
1744
+ if (options.skipNulls && obj[key] === null) {
1745
+ continue;
1746
+ }
1747
+ pushToArray(keys, stringify(
1748
+ obj[key],
1749
+ key,
1750
+ generateArrayPrefix,
1751
+ commaRoundTrip,
1752
+ options.strictNullHandling,
1753
+ options.skipNulls,
1754
+ options.encode ? options.encoder : null,
1755
+ options.filter,
1756
+ options.sort,
1757
+ options.allowDots,
1758
+ options.serializeDate,
1759
+ options.format,
1760
+ options.formatter,
1761
+ options.encodeValuesOnly,
1762
+ options.charset,
1763
+ sideChannel$1
1764
+ ));
1765
+ }
1766
+
1767
+ var joined = keys.join(options.delimiter);
1768
+ var prefix = options.addQueryPrefix === true ? '?' : '';
1769
+
1770
+ if (options.charsetSentinel) {
1771
+ if (options.charset === 'iso-8859-1') {
1772
+ // encodeURIComponent('&#10003;'), the "numeric entity" representation of a checkmark
1773
+ prefix += 'utf8=%26%2310003%3B&';
1774
+ } else {
1775
+ // encodeURIComponent('✓')
1776
+ prefix += 'utf8=%E2%9C%93&';
1777
+ }
1778
+ }
1779
+
1780
+ return joined.length > 0 ? prefix + joined : '';
1781
+ };
1782
+
1783
+ var has = Object.prototype.hasOwnProperty;
1784
+ var isArray = Array.isArray;
1785
+
1786
+ var defaults = {
1787
+ allowDots: false,
1788
+ allowPrototypes: false,
1789
+ allowSparse: false,
1790
+ arrayLimit: 20,
1791
+ charset: 'utf-8',
1792
+ charsetSentinel: false,
1793
+ comma: false,
1794
+ decoder: utils.decode,
1795
+ delimiter: '&',
1796
+ depth: 5,
1797
+ ignoreQueryPrefix: false,
1798
+ interpretNumericEntities: false,
1799
+ parameterLimit: 1000,
1800
+ parseArrays: true,
1801
+ plainObjects: false,
1802
+ strictNullHandling: false
1803
+ };
1804
+
1805
+ var interpretNumericEntities = function (str) {
1806
+ return str.replace(/&#(\d+);/g, function ($0, numberStr) {
1807
+ return String.fromCharCode(parseInt(numberStr, 10));
1808
+ });
1809
+ };
1810
+
1811
+ var parseArrayValue = function (val, options) {
1812
+ if (val && typeof val === 'string' && options.comma && val.indexOf(',') > -1) {
1813
+ return val.split(',');
1814
+ }
1815
+
1816
+ return val;
1817
+ };
1818
+
1819
+ // This is what browsers will submit when the ✓ character occurs in an
1820
+ // application/x-www-form-urlencoded body and the encoding of the page containing
1821
+ // the form is iso-8859-1, or when the submitted form has an accept-charset
1822
+ // attribute of iso-8859-1. Presumably also with other charsets that do not contain
1823
+ // the ✓ character, such as us-ascii.
1824
+ var isoSentinel = 'utf8=%26%2310003%3B'; // encodeURIComponent('&#10003;')
1825
+
1826
+ // These are the percent-encoded utf-8 octets representing a checkmark, indicating that the request actually is utf-8 encoded.
1827
+ var charsetSentinel = 'utf8=%E2%9C%93'; // encodeURIComponent('✓')
1828
+
1829
+ var parseValues = function parseQueryStringValues(str, options) {
1830
+ var obj = {};
1831
+ var cleanStr = options.ignoreQueryPrefix ? str.replace(/^\?/, '') : str;
1832
+ var limit = options.parameterLimit === Infinity ? undefined : options.parameterLimit;
1833
+ var parts = cleanStr.split(options.delimiter, limit);
1834
+ var skipIndex = -1; // Keep track of where the utf8 sentinel was found
1835
+ var i;
1836
+
1837
+ var charset = options.charset;
1838
+ if (options.charsetSentinel) {
1839
+ for (i = 0; i < parts.length; ++i) {
1840
+ if (parts[i].indexOf('utf8=') === 0) {
1841
+ if (parts[i] === charsetSentinel) {
1842
+ charset = 'utf-8';
1843
+ } else if (parts[i] === isoSentinel) {
1844
+ charset = 'iso-8859-1';
1845
+ }
1846
+ skipIndex = i;
1847
+ i = parts.length; // The eslint settings do not allow break;
1848
+ }
1849
+ }
1850
+ }
1851
+
1852
+ for (i = 0; i < parts.length; ++i) {
1853
+ if (i === skipIndex) {
1854
+ continue;
1855
+ }
1856
+ var part = parts[i];
1857
+
1858
+ var bracketEqualsPos = part.indexOf(']=');
1859
+ var pos = bracketEqualsPos === -1 ? part.indexOf('=') : bracketEqualsPos + 1;
1860
+
1861
+ var key, val;
1862
+ if (pos === -1) {
1863
+ key = options.decoder(part, defaults.decoder, charset, 'key');
1864
+ val = options.strictNullHandling ? null : '';
1865
+ } else {
1866
+ key = options.decoder(part.slice(0, pos), defaults.decoder, charset, 'key');
1867
+ val = utils.maybeMap(
1868
+ parseArrayValue(part.slice(pos + 1), options),
1869
+ function (encodedVal) {
1870
+ return options.decoder(encodedVal, defaults.decoder, charset, 'value');
1871
+ }
1872
+ );
1873
+ }
1874
+
1875
+ if (val && options.interpretNumericEntities && charset === 'iso-8859-1') {
1876
+ val = interpretNumericEntities(val);
1877
+ }
1878
+
1879
+ if (part.indexOf('[]=') > -1) {
1880
+ val = isArray(val) ? [val] : val;
1881
+ }
1882
+
1883
+ if (has.call(obj, key)) {
1884
+ obj[key] = utils.combine(obj[key], val);
1885
+ } else {
1886
+ obj[key] = val;
1887
+ }
1888
+ }
1889
+
1890
+ return obj;
1891
+ };
1892
+
1893
+ var parseObject = function (chain, val, options, valuesParsed) {
1894
+ var leaf = valuesParsed ? val : parseArrayValue(val, options);
1895
+
1896
+ for (var i = chain.length - 1; i >= 0; --i) {
1897
+ var obj;
1898
+ var root = chain[i];
1899
+
1900
+ if (root === '[]' && options.parseArrays) {
1901
+ obj = [].concat(leaf);
1902
+ } else {
1903
+ obj = options.plainObjects ? Object.create(null) : {};
1904
+ var cleanRoot = root.charAt(0) === '[' && root.charAt(root.length - 1) === ']' ? root.slice(1, -1) : root;
1905
+ var index = parseInt(cleanRoot, 10);
1906
+ if (!options.parseArrays && cleanRoot === '') {
1907
+ obj = { 0: leaf };
1908
+ } else if (
1909
+ !isNaN(index)
1910
+ && root !== cleanRoot
1911
+ && String(index) === cleanRoot
1912
+ && index >= 0
1913
+ && (options.parseArrays && index <= options.arrayLimit)
1914
+ ) {
1915
+ obj = [];
1916
+ obj[index] = leaf;
1917
+ } else if (cleanRoot !== '__proto__') {
1918
+ obj[cleanRoot] = leaf;
1919
+ }
1920
+ }
1921
+
1922
+ leaf = obj;
1923
+ }
1924
+
1925
+ return leaf;
1926
+ };
1927
+
1928
+ var parseKeys = function parseQueryStringKeys(givenKey, val, options, valuesParsed) {
1929
+ if (!givenKey) {
1930
+ return;
1931
+ }
1932
+
1933
+ // Transform dot notation to bracket notation
1934
+ var key = options.allowDots ? givenKey.replace(/\.([^.[]+)/g, '[$1]') : givenKey;
1935
+
1936
+ // The regex chunks
1937
+
1938
+ var brackets = /(\[[^[\]]*])/;
1939
+ var child = /(\[[^[\]]*])/g;
1940
+
1941
+ // Get the parent
1942
+
1943
+ var segment = options.depth > 0 && brackets.exec(key);
1944
+ var parent = segment ? key.slice(0, segment.index) : key;
1945
+
1946
+ // Stash the parent if it exists
1947
+
1948
+ var keys = [];
1949
+ if (parent) {
1950
+ // If we aren't using plain objects, optionally prefix keys that would overwrite object prototype properties
1951
+ if (!options.plainObjects && has.call(Object.prototype, parent)) {
1952
+ if (!options.allowPrototypes) {
1953
+ return;
1954
+ }
1955
+ }
1956
+
1957
+ keys.push(parent);
1958
+ }
1959
+
1960
+ // Loop through children appending to the array until we hit depth
1961
+
1962
+ var i = 0;
1963
+ while (options.depth > 0 && (segment = child.exec(key)) !== null && i < options.depth) {
1964
+ i += 1;
1965
+ if (!options.plainObjects && has.call(Object.prototype, segment[1].slice(1, -1))) {
1966
+ if (!options.allowPrototypes) {
1967
+ return;
1968
+ }
1969
+ }
1970
+ keys.push(segment[1]);
1971
+ }
1972
+
1973
+ // If there's a remainder, just add whatever is left
1974
+
1975
+ if (segment) {
1976
+ keys.push('[' + key.slice(segment.index) + ']');
1977
+ }
1978
+
1979
+ return parseObject(keys, val, options, valuesParsed);
1980
+ };
1981
+
1982
+ var normalizeParseOptions = function normalizeParseOptions(opts) {
1983
+ if (!opts) {
1984
+ return defaults;
1985
+ }
1986
+
1987
+ if (opts.decoder !== null && opts.decoder !== undefined && typeof opts.decoder !== 'function') {
1988
+ throw new TypeError('Decoder has to be a function.');
1989
+ }
1990
+
1991
+ if (typeof opts.charset !== 'undefined' && opts.charset !== 'utf-8' && opts.charset !== 'iso-8859-1') {
1992
+ throw new TypeError('The charset option must be either utf-8, iso-8859-1, or undefined');
1993
+ }
1994
+ var charset = typeof opts.charset === 'undefined' ? defaults.charset : opts.charset;
1995
+
1996
+ return {
1997
+ allowDots: typeof opts.allowDots === 'undefined' ? defaults.allowDots : !!opts.allowDots,
1998
+ allowPrototypes: typeof opts.allowPrototypes === 'boolean' ? opts.allowPrototypes : defaults.allowPrototypes,
1999
+ allowSparse: typeof opts.allowSparse === 'boolean' ? opts.allowSparse : defaults.allowSparse,
2000
+ arrayLimit: typeof opts.arrayLimit === 'number' ? opts.arrayLimit : defaults.arrayLimit,
2001
+ charset: charset,
2002
+ charsetSentinel: typeof opts.charsetSentinel === 'boolean' ? opts.charsetSentinel : defaults.charsetSentinel,
2003
+ comma: typeof opts.comma === 'boolean' ? opts.comma : defaults.comma,
2004
+ decoder: typeof opts.decoder === 'function' ? opts.decoder : defaults.decoder,
2005
+ delimiter: typeof opts.delimiter === 'string' || utils.isRegExp(opts.delimiter) ? opts.delimiter : defaults.delimiter,
2006
+ // eslint-disable-next-line no-implicit-coercion, no-extra-parens
2007
+ depth: (typeof opts.depth === 'number' || opts.depth === false) ? +opts.depth : defaults.depth,
2008
+ ignoreQueryPrefix: opts.ignoreQueryPrefix === true,
2009
+ interpretNumericEntities: typeof opts.interpretNumericEntities === 'boolean' ? opts.interpretNumericEntities : defaults.interpretNumericEntities,
2010
+ parameterLimit: typeof opts.parameterLimit === 'number' ? opts.parameterLimit : defaults.parameterLimit,
2011
+ parseArrays: opts.parseArrays !== false,
2012
+ plainObjects: typeof opts.plainObjects === 'boolean' ? opts.plainObjects : defaults.plainObjects,
2013
+ strictNullHandling: typeof opts.strictNullHandling === 'boolean' ? opts.strictNullHandling : defaults.strictNullHandling
2014
+ };
2015
+ };
2016
+
2017
+ var parse = function (str, opts) {
2018
+ var options = normalizeParseOptions(opts);
2019
+
2020
+ if (str === '' || str === null || typeof str === 'undefined') {
2021
+ return options.plainObjects ? Object.create(null) : {};
2022
+ }
2023
+
2024
+ var tempObj = typeof str === 'string' ? parseValues(str, options) : str;
2025
+ var obj = options.plainObjects ? Object.create(null) : {};
2026
+
2027
+ // Iterate over the keys and setup the new object
2028
+
2029
+ var keys = Object.keys(tempObj);
2030
+ for (var i = 0; i < keys.length; ++i) {
2031
+ var key = keys[i];
2032
+ var newObj = parseKeys(key, tempObj[key], options, typeof str === 'string');
2033
+ obj = utils.merge(obj, newObj, options);
2034
+ }
2035
+
2036
+ if (options.allowSparse === true) {
2037
+ return obj;
2038
+ }
2039
+
2040
+ return utils.compact(obj);
2041
+ };
2042
+
2043
+ var lib = {
2044
+ formats: formats,
2045
+ parse: parse,
2046
+ stringify: stringify_1
2047
+ };
2048
+
2049
+ const fetchProductColorsQuery = (id, page) => lib.stringify({
2050
+ filters: {
2051
+ products: {
2052
+ id: {
2053
+ $eq: id,
2054
+ },
2055
+ },
2056
+ },
2057
+ sort: ['position:asc'],
2058
+ populate: ['image', 'category', 'links', 'links.shop'],
2059
+ pagination: {
2060
+ page: page || 1,
2061
+ pageSize: 100,
2062
+ },
2063
+ }, {
2064
+ encodeValuesOnly: true, // prettify url
2065
+ });
2066
+ const fetchCategoryColorsQuery = (color) => lib.stringify({
2067
+ filters: {
2068
+ category: {
2069
+ id: {
2070
+ $eq: color.id,
2071
+ },
2072
+ },
2073
+ },
2074
+ sort: ['position:asc'],
2075
+ populate: ['image', 'category', 'links', 'links.shop'],
2076
+ pagination: {
2077
+ page: 1,
2078
+ pageSize: 100,
2079
+ },
2080
+ }, {
2081
+ encodeValuesOnly: true, // prettify url
2082
+ });
2083
+ const fetchColorByNumber = (productId, colorNumber) => lib.stringify({
2084
+ filters: {
2085
+ $or: [
2086
+ {
2087
+ $and: [
2088
+ {
2089
+ number: {
2090
+ $contains: colorNumber,
2091
+ },
2092
+ },
2093
+ {
2094
+ products: {
2095
+ id: {
2096
+ $eq: productId,
2097
+ },
2098
+ },
2099
+ },
2100
+ ],
2101
+ },
2102
+ {
2103
+ $and: [
2104
+ {
2105
+ name: {
2106
+ $contains: colorNumber,
2107
+ },
2108
+ },
2109
+ {
2110
+ products: {
2111
+ id: {
2112
+ $eq: productId,
2113
+ },
2114
+ },
2115
+ },
2116
+ ],
2117
+ },
2118
+ ],
2119
+ },
2120
+ sort: ['position:asc'],
2121
+ populate: ['image', 'category', 'product', 'links', 'links.shop'],
2122
+ pagination: {
2123
+ page: 1,
2124
+ pageSize: 100,
2125
+ },
2126
+ }, {
2127
+ encodeValuesOnly: true, // prettify url
2128
+ });
2129
+
2130
+ const myModalCss = "html{font-size:62.5%}body{font-size:1.5rem}*{font-family:\"Galatea\", sans-serif}.my-modal{box-shadow:1px 1px 1px #ccc;background-color:#fff;position:fixed;top:50%;left:50%;transform:translate(-50%, -50%);max-width:1555px;width:90%;z-index:1000;text-align:center;padding:35px 40px;max-height:calc(100vh - 100px);overflow-y:auto}@media (max-width: 1024px){.my-modal{padding:80px 20px 20px}}.my-modal::-webkit-scrollbar{display:none}.my-modal .loader{display:flex;flex-direction:column;align-items:center;justify-content:center;height:300px}.my-modal>img{width:300px;object-fit:cover}@media (max-width: 768px){.my-modal>img{width:200px}}.my-modal__close{position:absolute;right:20px;top:20px;background:transparent;border:none}.my-modal__close>img{width:45px;height:45px;object-fit:cover;cursor:pointer}@media (max-width: 1024px){.my-modal__close{top:65px}}.my-modal__see-more{font-size:2.2rem;margin-bottom:27px;display:flex;justify-content:center;align-items:center}@media (max-width: 1024px){.my-modal__see-more{font-size:1.8rem}}.my-modal__see-more img{width:45px;height:45px}@media (max-width: 1024px){.my-modal__see-more img{display:none}}.my-modal__wrapper{display:flex;flex-direction:column;position:relative}.my-modal__wrapper .boxes{display:flex;flex-direction:column;flex-wrap:wrap}.my-modal__wrapper .boxes__list{display:flex;flex-wrap:wrap;gap:5px 5px}.my-modal__wrapper .boxes__box-content{width:100%;margin-bottom:5px;height:500px;text-align:left;display:flex;flex-direction:row;justify-content:space-between;position:relative}.my-modal__wrapper .boxes__box-content .closebtn{position:absolute;right:10px;top:10px;width:53px;height:53px;cursor:pointer;object-fit:cover;z-index:9999}@media (max-width: 1024px){.my-modal__wrapper .boxes__box-content{flex-direction:column-reverse;height:350px}}.my-modal__wrapper .boxes__box-content__info{width:40%;padding:50px 40px;position:relative}@media (max-width: 1024px){.my-modal__wrapper .boxes__box-content__info{width:100%;padding:15px;min-height:100px}}.my-modal__wrapper .boxes__box-content__info h2{font-size:3.5rem;font-weight:normal;text-transform:capitalize;margin-bottom:7px;color:#232323}.my-modal__wrapper .boxes__box-content__info h4{margin-top:0px;margin-bottom:15px;font-size:1.6rem;color:#4c4c4c}.my-modal__wrapper .boxes__box-content__info .divider{border:1px solid #4c4c4c;opacity:0.2;margin-bottom:20px}.my-modal__wrapper .boxes__box-content__info__value{display:flex;flex-direction:row;justify-content:flex-start}@media (max-width: 1024px){.my-modal__wrapper .boxes__box-content__info__value{justify-content:flex-start}}.my-modal__wrapper .boxes__box-content__info__value-image img{width:114px;object-fit:cover}@media (max-width: 1024px){.my-modal__wrapper .boxes__box-content__info__value-image img{width:75px}}.my-modal__wrapper .boxes__box-content__info__value-product{color:#232323;margin-left:10px}@media (max-width: 1024px){.my-modal__wrapper .boxes__box-content__info__value-product h2{font-size:2.6rem;margin:0;margin-right:10px}}@media (max-width: 768px){.my-modal__wrapper .boxes__box-content__info__value-product h2{font-size:1.6rem}}.my-modal__wrapper .boxes__box-content__info__value-product p{font-size:2rem;margin-top:0px;margin-bottom:0px}.my-modal__wrapper .boxes__box-content__info__value-product p:last-of-type{margin-bottom:20px}@media (max-width: 1024px){.my-modal__wrapper .boxes__box-content__info__value-product p:last-of-type{margin-bottom:0}}@media (max-width: 768px){.my-modal__wrapper .boxes__box-content__info__value-product p{font-size:1rem}}.my-modal__wrapper .boxes__box-content__info__value-product a{background-color:#fff;font-size:1.6rem;box-shadow:0 10px 20px 0 rgba(0, 0, 0, 0.1);border-radius:22.5px;padding:15px 30px;color:#232323;text-decoration:none;display:block;text-align:center;transition:all 0.7s ease-in-out}@media (max-width: 1024px){.my-modal__wrapper .boxes__box-content__info__value-product a{max-width:150px;font-size:1.3rem;padding:12px 25px}}.my-modal__wrapper .boxes__box-content__info__value-product a:hover{color:#fff;background-color:#232323}.my-modal__wrapper .boxes__box-content__info__value-product a.inverse{background-color:#232323;color:#fff}.my-modal__wrapper .boxes__box-content__info__value-product a.inverse:hover{color:#232323;background-color:#fff}@media (max-width: 1024px){.my-modal__wrapper .boxes__box-content__info__value-product>div{display:flex;justify-content:flex-start;align-items:center}}.my-modal__wrapper .boxes__box-content__slider{width:60%;position:relative}@media (max-width: 1024px){.my-modal__wrapper .boxes__box-content__slider{width:100%;display:block}}.my-modal__wrapper .boxes__box-content__white *{color:#fff}.my-modal__wrapper .boxes__box-content__white h2{color:#fff}.my-modal__wrapper .pagination{margin:10px 0px;font-size:16px;display:flex;flex-direction:row;align-items:center;justify-content:center}.my-modal__wrapper .pagination>span{margin:0 3px;cursor:pointer;min-width:20px;padding:5px;box-shadow:1px 1px 1px #ccc}.my-modal__wrapper .pagination .current{background-color:wheat}.my-modal .categories{padding-bottom:20px;margin-bottom:20px;border-bottom:1px solid #dfdfdf;display:flex;flex-direction:column;align-items:flex-start}.my-modal .categories__container{display:flex;flex-wrap:nowrap;gap:5px 5px;overflow-x:auto;width:100%}@media (max-width: 1024px){.my-modal .categories__container{padding-bottom:5px}}.my-modal .categories__slide-information{display:flex;flex-direction:row;align-items:center;justify-content:space-between}.my-modal .categories__slide-information span{color:#4c4c4c;font-size:1.6rem;font-weight:normal}.my-modal .categories__slide-information span:first-of-type{margin-left:7px}.my-modal .categories__slide-information span:last-of-type{margin-right:7px}";
2131
+
2132
+ const MyModal = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement$1 {
2133
+ constructor() {
2134
+ super();
2135
+ this.__registerHost();
2136
+ this.close = createEvent(this, "close", 7);
2137
+ this.boxDesktopWidth = 130;
2138
+ this.boxMobileWidth = 85;
2139
+ this.desktopPadding = 75;
2140
+ this.mobilePadding = 35;
2141
+ this.mediumBreakpoint = 1024;
2142
+ this.closeImage = 'close.png';
2143
+ this.arrowDown = 'arrow_down.png';
2144
+ this.chunksNum = 12;
2145
+ this.data = null;
2146
+ this.preloader = false;
2147
+ this.loading = false;
2148
+ this.colors = null;
2149
+ this.currentColor = null;
2150
+ this.currentIndex = null;
2151
+ this.infoBoxWidth = null;
2152
+ this.boxWidth = this.boxDesktopWidth; // box width with gap
2153
+ this.padding = this.desktopPadding;
2154
+ this.isMobile = false;
2155
+ this.showRange = false;
2156
+ this.colorCategories = null;
2157
+ this.selectedCategory = null;
2158
+ this.page = 1;
2159
+ this.clearInterval = () => {
2160
+ this.colorTimerInterval && clearInterval(this.colorTimerInterval);
2161
+ this.colorTimerInterval = undefined;
2162
+ };
2163
+ this.colorTimer = () => {
2164
+ if (this.currentColor && this.currentColor.id) {
2165
+ this.colorTimerInterval = setInterval(() => {
2166
+ var _a, _b;
2167
+ ((_a = this.currentColor) === null || _a === void 0 ? void 0 : _a.name) &&
2168
+ setDataLayer({
2169
+ event: 'ColorTimer',
2170
+ shop: this.shop,
2171
+ product: this.product,
2172
+ color: (_b = this.currentColor) === null || _b === void 0 ? void 0 : _b.name,
2173
+ timer: '10',
2174
+ });
2175
+ }, 10000);
2176
+ }
2177
+ else {
2178
+ this.clearInterval();
2179
+ }
2180
+ };
2181
+ this.chunks = (xs, y = []) => {
2182
+ return xs.length === 0 ? y : this.chunks(xs.slice(this.chunksNum), y.concat([xs.slice(0, this.chunksNum)]));
2183
+ };
2184
+ this.calculateBoxCount = () => {
2185
+ var _a;
2186
+ const modalWidth = this.modalEl.children && this.modalEl.children[0] && ((_a = this.modalEl.children[0]) === null || _a === void 0 ? void 0 : _a.clientWidth) - this.padding;
2187
+ const boxWidth = this.boxWidth;
2188
+ const calc = Math.floor(modalWidth / boxWidth);
2189
+ const boxesCount = calc;
2190
+ if (!this.preloader)
2191
+ this.chunksNum = boxesCount;
2192
+ };
2193
+ this.displayForMobile = () => {
2194
+ if (window.innerWidth < this.mediumBreakpoint) {
2195
+ this.boxWidth = this.boxMobileWidth;
2196
+ this.padding = this.mobilePadding;
2197
+ this.isMobile = true;
2198
+ }
2199
+ else {
2200
+ this.isMobile = false;
2201
+ this.boxWidth = this.boxDesktopWidth;
2202
+ this.padding = this.desktopPadding;
2203
+ }
2204
+ };
2205
+ this.fetchProductData = async () => {
2206
+ try {
2207
+ const response = await ApiService.getData(`products?populate[0]=modalLogo&populate[1]=images&populate[2]=shops&populate[3]=categories&filters[name][$contains]=${this.product}`);
2208
+ if (response) {
2209
+ if (response.data[0].attributes.shops.data.find((shop) => shop.attributes.name === this.shop).id) {
2210
+ this.data = Object.assign(Object.assign({}, response.data[0].attributes), { id: response.data[0].id });
2211
+ }
2212
+ }
2213
+ }
2214
+ catch (error) {
2215
+ console.error(error);
2216
+ }
2217
+ finally {
2218
+ this.preloader = false;
2219
+ }
2220
+ };
2221
+ // TODO:
2222
+ this.fetchProductColors = async (id, page) => {
2223
+ this.loading = true;
2224
+ try {
2225
+ const response = await ApiService.getData(`colors?${fetchProductColorsQuery(id, page)}`);
2226
+ if (response) {
2227
+ this.colors = {
2228
+ list: response &&
2229
+ response.data &&
2230
+ response.data.map((item) => (Object.assign({ id: item.id }, item.attributes))),
2231
+ pagination: response.meta.pagination,
2232
+ };
2233
+ }
2234
+ }
2235
+ catch (error) {
2236
+ console.error(error);
2237
+ }
2238
+ finally {
2239
+ this.loading = false;
2240
+ }
2241
+ };
2242
+ this.fetchCategoryColors = async (color) => {
2243
+ this.loading = true;
2244
+ try {
2245
+ const response = await ApiService.getData(`colors?${fetchCategoryColorsQuery(color)}`);
2246
+ if (response) {
2247
+ this.colors = {
2248
+ list: response &&
2249
+ response.data &&
2250
+ response.data.map((item) => (Object.assign({ id: item.id }, item.attributes))),
2251
+ pagination: response.meta.pagination,
2252
+ };
2253
+ }
2254
+ }
2255
+ catch (error) {
2256
+ console.error(error);
2257
+ }
2258
+ finally {
2259
+ this.loading = false;
2260
+ }
2261
+ };
2262
+ // private onIntersection = async (entries: any) => {
2263
+ // console.log(entries[0]);
2264
+ // if (entries[0].intersectionRatio === 0) {
2265
+ // console.log('d');
2266
+ // }
2267
+ // };
2268
+ // private handleObserve = () => {
2269
+ // console.log(this.modalEl.shadowRoot);
2270
+ // const boxesList: any = (this.modalEl as any).querySelector('.my-modal__wrapper');
2271
+ // console.log(boxesList);
2272
+ // if (boxesList) {
2273
+ // this.observer = new IntersectionObserver(this.onIntersection);
2274
+ // this.observer.observe(boxesList);
2275
+ // }
2276
+ // };
2277
+ this.onPage = (page) => {
2278
+ this.data && this.fetchProductColors(String(this.data.id), page);
2279
+ this.page = page;
2280
+ this.currentColor = null;
2281
+ this.currentIndex = null;
2282
+ };
2283
+ this.handleCategoryClick = (color) => {
2284
+ if (this.selectedCategory && color && this.selectedCategory.id === color.id && !this.showRange) {
2285
+ this.data && this.fetchProductColors(String(this.data.id));
2286
+ this.selectedCategory = null;
2287
+ }
2288
+ else {
2289
+ color && this.fetchCategoryColors(color);
2290
+ this.selectedCategory = color;
2291
+ }
2292
+ this.currentColor = null;
2293
+ };
2294
+ }
2295
+ setInfoBoxWidth(newValue) {
2296
+ this.infoBoxWidth = newValue * this.boxWidth;
2297
+ }
2298
+ watchPropHandler(newValue) {
2299
+ if (newValue.categories.data.length > 0) {
2300
+ this.showRange = true;
2301
+ this.handleCategoryClick(newValue.categories.data[0]);
2302
+ }
2303
+ else {
2304
+ this.fetchProductColors(String(newValue.id));
2305
+ }
2306
+ }
2307
+ async open() {
2308
+ this.modalEl.style.display = 'block';
2309
+ }
2310
+ closeModalHandler() {
2311
+ this.close.emit();
2312
+ }
2313
+ closeInfoBoxHandler() {
2314
+ this.currentColor = null;
2315
+ this.currentIndex = null;
2316
+ }
2317
+ handleResize() {
2318
+ this.calculateBoxCount();
2319
+ this.displayForMobile();
2320
+ }
2321
+ async searchColorsHandler(event) {
2322
+ var _a;
2323
+ // if search is empty set to first category to not showing whole product colors
2324
+ if (event.detail === '') {
2325
+ this.handleCategoryClick((_a = this.data) === null || _a === void 0 ? void 0 : _a.categories.data[0]);
2326
+ }
2327
+ try {
2328
+ if (this.data && this.data.id && event.detail !== '') {
2329
+ this.selectedCategory = null;
2330
+ const response = await ApiService.getData(`colors?${fetchColorByNumber(Number(this.data.id), event.detail)}`);
2331
+ if (response) {
2332
+ this.colors = {
2333
+ list: response &&
2334
+ response.data &&
2335
+ response.data.map((item) => (Object.assign({ id: item.id }, item.attributes))),
2336
+ pagination: response.meta.pagination,
2337
+ };
2338
+ }
2339
+ }
2340
+ }
2341
+ catch (error) {
2342
+ console.error(error);
2343
+ }
2344
+ }
2345
+ componentWillLoad() {
2346
+ this.preloader = true;
2347
+ this.fetchProductData();
2348
+ }
2349
+ componentWillRender() {
2350
+ this.displayForMobile();
2351
+ this.calculateBoxCount();
2352
+ this.colorTimer();
2353
+ }
2354
+ render() {
2355
+ var _a, _b, _c, _d, _e, _f, _g;
2356
+ return (h("div", { class: `my-modal` }, this.preloader && (h("div", { class: 'loader' }, h("my-loader", null))), !this.preloader && (h("button", { class: "my-modal__close", onClick: () => this.closeModalHandler() }, h("img", { src: getAssetPath(`./assets/${this.closeImage}`), alt: "closebtn" }))), !this.preloader && this.data && this.data.modalLogo && h("img", { src: `${(_d = (_c = (_b = (_a = this.data) === null || _a === void 0 ? void 0 : _a.modalLogo) === null || _b === void 0 ? void 0 : _b.data) === null || _c === void 0 ? void 0 : _c.attributes) === null || _d === void 0 ? void 0 : _d.url}`, alt: "modal-logo" }), !this.preloader && (h("p", { class: "my-modal__see-more" }, (_e = this.data) === null || _e === void 0 ? void 0 : _e.modalDescription)), this.showRange && (h("div", { class: 'categories' }, this.data && h("my-search", { productId: Number((_f = this.data) === null || _f === void 0 ? void 0 : _f.id), isMobile: this.isMobile }), h("div", { class: 'categories__container', style: { maxWidth: `${this.infoBoxWidth}px` } }, (_g = this.data) === null || _g === void 0 ? void 0 : _g.categories.data.map((c) => {
2357
+ var _a;
2358
+ return (h("my-colorbox", { key: c.id, onClick: () => this.handleCategoryClick(c), color: c.attributes.hex, name: c.attributes.name, shop: this.shop, product: this.product, isCategoryActive: ((_a = this.selectedCategory) === null || _a === void 0 ? void 0 : _a.id) === c.id }));
2359
+ })), this.isMobile && (h("div", { class: 'categories__slide-information', style: { width: `${this.infoBoxWidth}px` } }, h("span", null, "Przewi\u0144 w lewo"), h("span", null, "Przewi\u0144 w prawo"))))), h("div", { class: 'my-modal__wrapper' }, this.loading && h("my-loader", null), !this.loading && this.colors && (h("div", { class: 'container_boxes' }, this.colors.list.length > 0 ? (this.chunks(this.colors.list).map((color, index) => {
2360
+ var _a;
2361
+ return (h("div", { key: index, class: "boxes" }, h("div", { class: "boxes__list" }, color.map((c) => {
2362
+ var _a;
2363
+ return (h("my-colorbox", { key: c.id, onClick: () => {
2364
+ var _a, _b, _c;
2365
+ return [
2366
+ ((_a = this.currentColor) === null || _a === void 0 ? void 0 : _a.id) ? (((_b = this.currentColor) === null || _b === void 0 ? void 0 : _b.id) === c.id ? (this.currentColor = null) : (this.currentColor = c)) : (this.currentColor = c),
2367
+ (this.currentIndex = index),
2368
+ setDataLayer({
2369
+ event: 'ColorClick',
2370
+ shop: this.shop,
2371
+ product: this.product,
2372
+ color: c.name,
2373
+ }),
2374
+ ((_c = this.currentColor) === null || _c === void 0 ? void 0 : _c.id) && this.clearInterval(),
2375
+ ];
2376
+ }, color: c.hex, name: c.name, isActive: ((_a = this.currentColor) === null || _a === void 0 ? void 0 : _a.id) === c.id, shop: this.shop, product: this.product }));
2377
+ })), ((_a = this.currentColor) === null || _a === void 0 ? void 0 : _a.id) && index === this.currentIndex && (h("my-colorinfo", { currentColor: this.currentColor, shop: this.shop, product: this.product, data: this.data, isMobile: this.isMobile, infoBoxWidth: this.infoBoxWidth }))));
2378
+ })) : (h("p", null, "Brak wynik\u00F3w")), this.colors.pagination.pageCount > 1 && (h("div", { class: 'pagination' }, Array.from({ length: this.colors.pagination.pageCount }).map((page, i) => (h("span", { class: i + 1 === this.page ? 'current' : '', onClick: e => {
2379
+ e.preventDefault();
2380
+ this.onPage(i + 1);
2381
+ }, key: `#${i + 1 + page}` }, i + 1))))))))));
2382
+ }
2383
+ static get assetsDirs() { return ["assets"]; }
2384
+ get modalEl() { return this; }
2385
+ static get watchers() { return {
2386
+ "chunksNum": ["setInfoBoxWidth"],
2387
+ "data": ["watchPropHandler"]
2388
+ }; }
2389
+ static get style() { return myModalCss; }
2390
+ }, [0, "my-modal", {
2391
+ "shop": [1],
2392
+ "product": [1],
2393
+ "closeImage": [1, "close-image"],
2394
+ "arrowDown": [1, "arrow-down"],
2395
+ "chunksNum": [32],
2396
+ "data": [32],
2397
+ "preloader": [32],
2398
+ "loading": [32],
2399
+ "colors": [32],
2400
+ "currentColor": [32],
2401
+ "currentIndex": [32],
2402
+ "infoBoxWidth": [32],
2403
+ "boxWidth": [32],
2404
+ "padding": [32],
2405
+ "isMobile": [32],
2406
+ "showRange": [32],
2407
+ "colorCategories": [32],
2408
+ "selectedCategory": [32],
2409
+ "page": [32],
2410
+ "open": [64]
2411
+ }, [[0, "closeInfoBox", "closeInfoBoxHandler"], [9, "resize", "handleResize"], [0, "searchColors", "searchColorsHandler"]]]);
2412
+ function defineCustomElement() {
2413
+ if (typeof customElements === "undefined") {
2414
+ return;
2415
+ }
2416
+ const components = ["my-modal", "my-colorbox", "my-colorinfo", "my-loader", "my-search", "my-slider"];
2417
+ components.forEach(tagName => { switch (tagName) {
2418
+ case "my-modal":
2419
+ if (!customElements.get(tagName)) {
2420
+ customElements.define(tagName, MyModal);
2421
+ }
2422
+ break;
2423
+ case "my-colorbox":
2424
+ if (!customElements.get(tagName)) {
2425
+ defineCustomElement$5();
2426
+ }
2427
+ break;
2428
+ case "my-colorinfo":
2429
+ if (!customElements.get(tagName)) {
2430
+ defineCustomElement$4();
2431
+ }
2432
+ break;
2433
+ case "my-loader":
2434
+ if (!customElements.get(tagName)) {
2435
+ defineCustomElement$3();
2436
+ }
2437
+ break;
2438
+ case "my-search":
2439
+ if (!customElements.get(tagName)) {
2440
+ defineCustomElement$2();
2441
+ }
2442
+ break;
2443
+ case "my-slider":
2444
+ if (!customElements.get(tagName)) {
2445
+ defineCustomElement$1();
2446
+ }
2447
+ break;
2448
+ } });
2449
+ }
2450
+
2451
+ export { MyModal as M, defineCustomElement as d };