@bolttech/atoms-checkbox 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.
package/README.md ADDED
@@ -0,0 +1,8 @@
1
+ # atoms-checkbox
2
+
3
+ This library was generated with [Nx](https://nx.dev).
4
+
5
+ ## Running unit tests
6
+
7
+
8
+ Run `nx test atoms-checkbox` to execute the unit tests via [Jest](https://jestjs.io).
package/index.cjs ADDED
@@ -0,0 +1,1202 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var jsxRuntime = require('react/jsx-runtime');
6
+ var styled = require('styled-components');
7
+
8
+ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
9
+
10
+ var styled__default = /*#__PURE__*/_interopDefaultLegacy(styled);
11
+
12
+ var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
13
+
14
+ var check = function (it) {
15
+ return it && it.Math == Math && it;
16
+ };
17
+
18
+ // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
19
+ var global$a =
20
+ // eslint-disable-next-line es/no-global-this -- safe
21
+ check(typeof globalThis == 'object' && globalThis) ||
22
+ check(typeof window == 'object' && window) ||
23
+ // eslint-disable-next-line no-restricted-globals -- safe
24
+ check(typeof self == 'object' && self) ||
25
+ check(typeof commonjsGlobal == 'object' && commonjsGlobal) ||
26
+ // eslint-disable-next-line no-new-func -- fallback
27
+ (function () { return this; })() || Function('return this')();
28
+
29
+ var objectGetOwnPropertyDescriptor = {};
30
+
31
+ var fails$9 = function (exec) {
32
+ try {
33
+ return !!exec();
34
+ } catch (error) {
35
+ return true;
36
+ }
37
+ };
38
+
39
+ var fails$8 = fails$9;
40
+
41
+ // Detect IE8's incomplete defineProperty implementation
42
+ var descriptors = !fails$8(function () {
43
+ // eslint-disable-next-line es/no-object-defineproperty -- required for testing
44
+ return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] != 7;
45
+ });
46
+
47
+ var fails$7 = fails$9;
48
+
49
+ var functionBindNative = !fails$7(function () {
50
+ // eslint-disable-next-line es/no-function-prototype-bind -- safe
51
+ var test = (function () { /* empty */ }).bind();
52
+ // eslint-disable-next-line no-prototype-builtins -- safe
53
+ return typeof test != 'function' || test.hasOwnProperty('prototype');
54
+ });
55
+
56
+ var NATIVE_BIND$1 = functionBindNative;
57
+
58
+ var call$5 = Function.prototype.call;
59
+
60
+ var functionCall = NATIVE_BIND$1 ? call$5.bind(call$5) : function () {
61
+ return call$5.apply(call$5, arguments);
62
+ };
63
+
64
+ var objectPropertyIsEnumerable = {};
65
+
66
+ var $propertyIsEnumerable = {}.propertyIsEnumerable;
67
+ // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
68
+ var getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor;
69
+
70
+ // Nashorn ~ JDK8 bug
71
+ var NASHORN_BUG = getOwnPropertyDescriptor$1 && !$propertyIsEnumerable.call({ 1: 2 }, 1);
72
+
73
+ // `Object.prototype.propertyIsEnumerable` method implementation
74
+ // https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable
75
+ objectPropertyIsEnumerable.f = NASHORN_BUG ? function propertyIsEnumerable(V) {
76
+ var descriptor = getOwnPropertyDescriptor$1(this, V);
77
+ return !!descriptor && descriptor.enumerable;
78
+ } : $propertyIsEnumerable;
79
+
80
+ var createPropertyDescriptor$2 = function (bitmap, value) {
81
+ return {
82
+ enumerable: !(bitmap & 1),
83
+ configurable: !(bitmap & 2),
84
+ writable: !(bitmap & 4),
85
+ value: value
86
+ };
87
+ };
88
+
89
+ var NATIVE_BIND = functionBindNative;
90
+
91
+ var FunctionPrototype$1 = Function.prototype;
92
+ var call$4 = FunctionPrototype$1.call;
93
+ var uncurryThisWithBind = NATIVE_BIND && FunctionPrototype$1.bind.bind(call$4, call$4);
94
+
95
+ var functionUncurryThis = NATIVE_BIND ? uncurryThisWithBind : function (fn) {
96
+ return function () {
97
+ return call$4.apply(fn, arguments);
98
+ };
99
+ };
100
+
101
+ var uncurryThis$9 = functionUncurryThis;
102
+
103
+ var toString$1 = uncurryThis$9({}.toString);
104
+ var stringSlice$1 = uncurryThis$9(''.slice);
105
+
106
+ var classofRaw = function (it) {
107
+ return stringSlice$1(toString$1(it), 8, -1);
108
+ };
109
+
110
+ var uncurryThis$8 = functionUncurryThis;
111
+ var fails$6 = fails$9;
112
+ var classof = classofRaw;
113
+
114
+ var $Object$2 = Object;
115
+ var split = uncurryThis$8(''.split);
116
+
117
+ // fallback for non-array-like ES3 and non-enumerable old V8 strings
118
+ var indexedObject = fails$6(function () {
119
+ // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
120
+ // eslint-disable-next-line no-prototype-builtins -- safe
121
+ return !$Object$2('z').propertyIsEnumerable(0);
122
+ }) ? function (it) {
123
+ return classof(it) == 'String' ? split(it, '') : $Object$2(it);
124
+ } : $Object$2;
125
+
126
+ // we can't use just `it == null` since of `document.all` special case
127
+ // https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot-aec
128
+ var isNullOrUndefined$2 = function (it) {
129
+ return it === null || it === undefined;
130
+ };
131
+
132
+ var isNullOrUndefined$1 = isNullOrUndefined$2;
133
+
134
+ var $TypeError$5 = TypeError;
135
+
136
+ // `RequireObjectCoercible` abstract operation
137
+ // https://tc39.es/ecma262/#sec-requireobjectcoercible
138
+ var requireObjectCoercible$2 = function (it) {
139
+ if (isNullOrUndefined$1(it)) throw $TypeError$5("Can't call method on " + it);
140
+ return it;
141
+ };
142
+
143
+ // toObject with fallback for non-array-like ES3 strings
144
+ var IndexedObject$1 = indexedObject;
145
+ var requireObjectCoercible$1 = requireObjectCoercible$2;
146
+
147
+ var toIndexedObject$3 = function (it) {
148
+ return IndexedObject$1(requireObjectCoercible$1(it));
149
+ };
150
+
151
+ var documentAll$2 = typeof document == 'object' && document.all;
152
+
153
+ // https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot
154
+ // eslint-disable-next-line unicorn/no-typeof-undefined -- required for testing
155
+ var IS_HTMLDDA = typeof documentAll$2 == 'undefined' && documentAll$2 !== undefined;
156
+
157
+ var documentAll_1 = {
158
+ all: documentAll$2,
159
+ IS_HTMLDDA: IS_HTMLDDA
160
+ };
161
+
162
+ var $documentAll$1 = documentAll_1;
163
+
164
+ var documentAll$1 = $documentAll$1.all;
165
+
166
+ // `IsCallable` abstract operation
167
+ // https://tc39.es/ecma262/#sec-iscallable
168
+ var isCallable$a = $documentAll$1.IS_HTMLDDA ? function (argument) {
169
+ return typeof argument == 'function' || argument === documentAll$1;
170
+ } : function (argument) {
171
+ return typeof argument == 'function';
172
+ };
173
+
174
+ var isCallable$9 = isCallable$a;
175
+ var $documentAll = documentAll_1;
176
+
177
+ var documentAll = $documentAll.all;
178
+
179
+ var isObject$5 = $documentAll.IS_HTMLDDA ? function (it) {
180
+ return typeof it == 'object' ? it !== null : isCallable$9(it) || it === documentAll;
181
+ } : function (it) {
182
+ return typeof it == 'object' ? it !== null : isCallable$9(it);
183
+ };
184
+
185
+ var global$9 = global$a;
186
+ var isCallable$8 = isCallable$a;
187
+
188
+ var aFunction = function (argument) {
189
+ return isCallable$8(argument) ? argument : undefined;
190
+ };
191
+
192
+ var getBuiltIn$2 = function (namespace, method) {
193
+ return arguments.length < 2 ? aFunction(global$9[namespace]) : global$9[namespace] && global$9[namespace][method];
194
+ };
195
+
196
+ var uncurryThis$7 = functionUncurryThis;
197
+
198
+ var objectIsPrototypeOf = uncurryThis$7({}.isPrototypeOf);
199
+
200
+ var engineUserAgent = typeof navigator != 'undefined' && String(navigator.userAgent) || '';
201
+
202
+ var global$8 = global$a;
203
+ var userAgent = engineUserAgent;
204
+
205
+ var process = global$8.process;
206
+ var Deno = global$8.Deno;
207
+ var versions = process && process.versions || Deno && Deno.version;
208
+ var v8 = versions && versions.v8;
209
+ var match, version;
210
+
211
+ if (v8) {
212
+ match = v8.split('.');
213
+ // in old Chrome, versions of V8 isn't V8 = Chrome / 10
214
+ // but their correct versions are not interesting for us
215
+ version = match[0] > 0 && match[0] < 4 ? 1 : +(match[0] + match[1]);
216
+ }
217
+
218
+ // BrowserFS NodeJS `process` polyfill incorrectly set `.v8` to `0.0`
219
+ // so check `userAgent` even if `.v8` exists, but 0
220
+ if (!version && userAgent) {
221
+ match = userAgent.match(/Edge\/(\d+)/);
222
+ if (!match || match[1] >= 74) {
223
+ match = userAgent.match(/Chrome\/(\d+)/);
224
+ if (match) version = +match[1];
225
+ }
226
+ }
227
+
228
+ var engineV8Version = version;
229
+
230
+ /* eslint-disable es/no-symbol -- required for testing */
231
+
232
+ var V8_VERSION = engineV8Version;
233
+ var fails$5 = fails$9;
234
+
235
+ // eslint-disable-next-line es/no-object-getownpropertysymbols -- required for testing
236
+ var symbolConstructorDetection = !!Object.getOwnPropertySymbols && !fails$5(function () {
237
+ var symbol = Symbol();
238
+ // Chrome 38 Symbol has incorrect toString conversion
239
+ // `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances
240
+ return !String(symbol) || !(Object(symbol) instanceof Symbol) ||
241
+ // Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances
242
+ !Symbol.sham && V8_VERSION && V8_VERSION < 41;
243
+ });
244
+
245
+ /* eslint-disable es/no-symbol -- required for testing */
246
+
247
+ var NATIVE_SYMBOL$1 = symbolConstructorDetection;
248
+
249
+ var useSymbolAsUid = NATIVE_SYMBOL$1
250
+ && !Symbol.sham
251
+ && typeof Symbol.iterator == 'symbol';
252
+
253
+ var getBuiltIn$1 = getBuiltIn$2;
254
+ var isCallable$7 = isCallable$a;
255
+ var isPrototypeOf = objectIsPrototypeOf;
256
+ var USE_SYMBOL_AS_UID$1 = useSymbolAsUid;
257
+
258
+ var $Object$1 = Object;
259
+
260
+ var isSymbol$2 = USE_SYMBOL_AS_UID$1 ? function (it) {
261
+ return typeof it == 'symbol';
262
+ } : function (it) {
263
+ var $Symbol = getBuiltIn$1('Symbol');
264
+ return isCallable$7($Symbol) && isPrototypeOf($Symbol.prototype, $Object$1(it));
265
+ };
266
+
267
+ var $String$2 = String;
268
+
269
+ var tryToString$1 = function (argument) {
270
+ try {
271
+ return $String$2(argument);
272
+ } catch (error) {
273
+ return 'Object';
274
+ }
275
+ };
276
+
277
+ var isCallable$6 = isCallable$a;
278
+ var tryToString = tryToString$1;
279
+
280
+ var $TypeError$4 = TypeError;
281
+
282
+ // `Assert: IsCallable(argument) is true`
283
+ var aCallable$1 = function (argument) {
284
+ if (isCallable$6(argument)) return argument;
285
+ throw $TypeError$4(tryToString(argument) + ' is not a function');
286
+ };
287
+
288
+ var aCallable = aCallable$1;
289
+ var isNullOrUndefined = isNullOrUndefined$2;
290
+
291
+ // `GetMethod` abstract operation
292
+ // https://tc39.es/ecma262/#sec-getmethod
293
+ var getMethod$1 = function (V, P) {
294
+ var func = V[P];
295
+ return isNullOrUndefined(func) ? undefined : aCallable(func);
296
+ };
297
+
298
+ var call$3 = functionCall;
299
+ var isCallable$5 = isCallable$a;
300
+ var isObject$4 = isObject$5;
301
+
302
+ var $TypeError$3 = TypeError;
303
+
304
+ // `OrdinaryToPrimitive` abstract operation
305
+ // https://tc39.es/ecma262/#sec-ordinarytoprimitive
306
+ var ordinaryToPrimitive$1 = function (input, pref) {
307
+ var fn, val;
308
+ if (pref === 'string' && isCallable$5(fn = input.toString) && !isObject$4(val = call$3(fn, input))) return val;
309
+ if (isCallable$5(fn = input.valueOf) && !isObject$4(val = call$3(fn, input))) return val;
310
+ if (pref !== 'string' && isCallable$5(fn = input.toString) && !isObject$4(val = call$3(fn, input))) return val;
311
+ throw $TypeError$3("Can't convert object to primitive value");
312
+ };
313
+
314
+ var shared$3 = {exports: {}};
315
+
316
+ var global$7 = global$a;
317
+
318
+ // eslint-disable-next-line es/no-object-defineproperty -- safe
319
+ var defineProperty$2 = Object.defineProperty;
320
+
321
+ var defineGlobalProperty$3 = function (key, value) {
322
+ try {
323
+ defineProperty$2(global$7, key, { value: value, configurable: true, writable: true });
324
+ } catch (error) {
325
+ global$7[key] = value;
326
+ } return value;
327
+ };
328
+
329
+ var global$6 = global$a;
330
+ var defineGlobalProperty$2 = defineGlobalProperty$3;
331
+
332
+ var SHARED = '__core-js_shared__';
333
+ var store$3 = global$6[SHARED] || defineGlobalProperty$2(SHARED, {});
334
+
335
+ var sharedStore = store$3;
336
+
337
+ var store$2 = sharedStore;
338
+
339
+ (shared$3.exports = function (key, value) {
340
+ return store$2[key] || (store$2[key] = value !== undefined ? value : {});
341
+ })('versions', []).push({
342
+ version: '3.29.1',
343
+ mode: 'global',
344
+ copyright: '© 2014-2023 Denis Pushkarev (zloirock.ru)',
345
+ license: 'https://github.com/zloirock/core-js/blob/v3.29.1/LICENSE',
346
+ source: 'https://github.com/zloirock/core-js'
347
+ });
348
+
349
+ var requireObjectCoercible = requireObjectCoercible$2;
350
+
351
+ var $Object = Object;
352
+
353
+ // `ToObject` abstract operation
354
+ // https://tc39.es/ecma262/#sec-toobject
355
+ var toObject$2 = function (argument) {
356
+ return $Object(requireObjectCoercible(argument));
357
+ };
358
+
359
+ var uncurryThis$6 = functionUncurryThis;
360
+ var toObject$1 = toObject$2;
361
+
362
+ var hasOwnProperty = uncurryThis$6({}.hasOwnProperty);
363
+
364
+ // `HasOwnProperty` abstract operation
365
+ // https://tc39.es/ecma262/#sec-hasownproperty
366
+ // eslint-disable-next-line es/no-object-hasown -- safe
367
+ var hasOwnProperty_1 = Object.hasOwn || function hasOwn(it, key) {
368
+ return hasOwnProperty(toObject$1(it), key);
369
+ };
370
+
371
+ var uncurryThis$5 = functionUncurryThis;
372
+
373
+ var id = 0;
374
+ var postfix = Math.random();
375
+ var toString = uncurryThis$5(1.0.toString);
376
+
377
+ var uid$2 = function (key) {
378
+ return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString(++id + postfix, 36);
379
+ };
380
+
381
+ var global$5 = global$a;
382
+ var shared$2 = shared$3.exports;
383
+ var hasOwn$6 = hasOwnProperty_1;
384
+ var uid$1 = uid$2;
385
+ var NATIVE_SYMBOL = symbolConstructorDetection;
386
+ var USE_SYMBOL_AS_UID = useSymbolAsUid;
387
+
388
+ var Symbol$1 = global$5.Symbol;
389
+ var WellKnownSymbolsStore = shared$2('wks');
390
+ var createWellKnownSymbol = USE_SYMBOL_AS_UID ? Symbol$1['for'] || Symbol$1 : Symbol$1 && Symbol$1.withoutSetter || uid$1;
391
+
392
+ var wellKnownSymbol$1 = function (name) {
393
+ if (!hasOwn$6(WellKnownSymbolsStore, name)) {
394
+ WellKnownSymbolsStore[name] = NATIVE_SYMBOL && hasOwn$6(Symbol$1, name)
395
+ ? Symbol$1[name]
396
+ : createWellKnownSymbol('Symbol.' + name);
397
+ } return WellKnownSymbolsStore[name];
398
+ };
399
+
400
+ var call$2 = functionCall;
401
+ var isObject$3 = isObject$5;
402
+ var isSymbol$1 = isSymbol$2;
403
+ var getMethod = getMethod$1;
404
+ var ordinaryToPrimitive = ordinaryToPrimitive$1;
405
+ var wellKnownSymbol = wellKnownSymbol$1;
406
+
407
+ var $TypeError$2 = TypeError;
408
+ var TO_PRIMITIVE = wellKnownSymbol('toPrimitive');
409
+
410
+ // `ToPrimitive` abstract operation
411
+ // https://tc39.es/ecma262/#sec-toprimitive
412
+ var toPrimitive$1 = function (input, pref) {
413
+ if (!isObject$3(input) || isSymbol$1(input)) return input;
414
+ var exoticToPrim = getMethod(input, TO_PRIMITIVE);
415
+ var result;
416
+ if (exoticToPrim) {
417
+ if (pref === undefined) pref = 'default';
418
+ result = call$2(exoticToPrim, input, pref);
419
+ if (!isObject$3(result) || isSymbol$1(result)) return result;
420
+ throw $TypeError$2("Can't convert object to primitive value");
421
+ }
422
+ if (pref === undefined) pref = 'number';
423
+ return ordinaryToPrimitive(input, pref);
424
+ };
425
+
426
+ var toPrimitive = toPrimitive$1;
427
+ var isSymbol = isSymbol$2;
428
+
429
+ // `ToPropertyKey` abstract operation
430
+ // https://tc39.es/ecma262/#sec-topropertykey
431
+ var toPropertyKey$2 = function (argument) {
432
+ var key = toPrimitive(argument, 'string');
433
+ return isSymbol(key) ? key : key + '';
434
+ };
435
+
436
+ var global$4 = global$a;
437
+ var isObject$2 = isObject$5;
438
+
439
+ var document$1 = global$4.document;
440
+ // typeof document.createElement is 'object' in old IE
441
+ var EXISTS$1 = isObject$2(document$1) && isObject$2(document$1.createElement);
442
+
443
+ var documentCreateElement = function (it) {
444
+ return EXISTS$1 ? document$1.createElement(it) : {};
445
+ };
446
+
447
+ var DESCRIPTORS$7 = descriptors;
448
+ var fails$4 = fails$9;
449
+ var createElement = documentCreateElement;
450
+
451
+ // Thanks to IE8 for its funny defineProperty
452
+ var ie8DomDefine = !DESCRIPTORS$7 && !fails$4(function () {
453
+ // eslint-disable-next-line es/no-object-defineproperty -- required for testing
454
+ return Object.defineProperty(createElement('div'), 'a', {
455
+ get: function () { return 7; }
456
+ }).a != 7;
457
+ });
458
+
459
+ var DESCRIPTORS$6 = descriptors;
460
+ var call$1 = functionCall;
461
+ var propertyIsEnumerableModule$1 = objectPropertyIsEnumerable;
462
+ var createPropertyDescriptor$1 = createPropertyDescriptor$2;
463
+ var toIndexedObject$2 = toIndexedObject$3;
464
+ var toPropertyKey$1 = toPropertyKey$2;
465
+ var hasOwn$5 = hasOwnProperty_1;
466
+ var IE8_DOM_DEFINE$1 = ie8DomDefine;
467
+
468
+ // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
469
+ var $getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor;
470
+
471
+ // `Object.getOwnPropertyDescriptor` method
472
+ // https://tc39.es/ecma262/#sec-object.getownpropertydescriptor
473
+ objectGetOwnPropertyDescriptor.f = DESCRIPTORS$6 ? $getOwnPropertyDescriptor$1 : function getOwnPropertyDescriptor(O, P) {
474
+ O = toIndexedObject$2(O);
475
+ P = toPropertyKey$1(P);
476
+ if (IE8_DOM_DEFINE$1) try {
477
+ return $getOwnPropertyDescriptor$1(O, P);
478
+ } catch (error) { /* empty */ }
479
+ if (hasOwn$5(O, P)) return createPropertyDescriptor$1(!call$1(propertyIsEnumerableModule$1.f, O, P), O[P]);
480
+ };
481
+
482
+ var objectDefineProperty = {};
483
+
484
+ var DESCRIPTORS$5 = descriptors;
485
+ var fails$3 = fails$9;
486
+
487
+ // V8 ~ Chrome 36-
488
+ // https://bugs.chromium.org/p/v8/issues/detail?id=3334
489
+ var v8PrototypeDefineBug = DESCRIPTORS$5 && fails$3(function () {
490
+ // eslint-disable-next-line es/no-object-defineproperty -- required for testing
491
+ return Object.defineProperty(function () { /* empty */ }, 'prototype', {
492
+ value: 42,
493
+ writable: false
494
+ }).prototype != 42;
495
+ });
496
+
497
+ var isObject$1 = isObject$5;
498
+
499
+ var $String$1 = String;
500
+ var $TypeError$1 = TypeError;
501
+
502
+ // `Assert: Type(argument) is Object`
503
+ var anObject$2 = function (argument) {
504
+ if (isObject$1(argument)) return argument;
505
+ throw $TypeError$1($String$1(argument) + ' is not an object');
506
+ };
507
+
508
+ var DESCRIPTORS$4 = descriptors;
509
+ var IE8_DOM_DEFINE = ie8DomDefine;
510
+ var V8_PROTOTYPE_DEFINE_BUG = v8PrototypeDefineBug;
511
+ var anObject$1 = anObject$2;
512
+ var toPropertyKey = toPropertyKey$2;
513
+
514
+ var $TypeError = TypeError;
515
+ // eslint-disable-next-line es/no-object-defineproperty -- safe
516
+ var $defineProperty = Object.defineProperty;
517
+ // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
518
+ var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
519
+ var ENUMERABLE = 'enumerable';
520
+ var CONFIGURABLE$1 = 'configurable';
521
+ var WRITABLE = 'writable';
522
+
523
+ // `Object.defineProperty` method
524
+ // https://tc39.es/ecma262/#sec-object.defineproperty
525
+ objectDefineProperty.f = DESCRIPTORS$4 ? V8_PROTOTYPE_DEFINE_BUG ? function defineProperty(O, P, Attributes) {
526
+ anObject$1(O);
527
+ P = toPropertyKey(P);
528
+ anObject$1(Attributes);
529
+ if (typeof O === 'function' && P === 'prototype' && 'value' in Attributes && WRITABLE in Attributes && !Attributes[WRITABLE]) {
530
+ var current = $getOwnPropertyDescriptor(O, P);
531
+ if (current && current[WRITABLE]) {
532
+ O[P] = Attributes.value;
533
+ Attributes = {
534
+ configurable: CONFIGURABLE$1 in Attributes ? Attributes[CONFIGURABLE$1] : current[CONFIGURABLE$1],
535
+ enumerable: ENUMERABLE in Attributes ? Attributes[ENUMERABLE] : current[ENUMERABLE],
536
+ writable: false
537
+ };
538
+ }
539
+ } return $defineProperty(O, P, Attributes);
540
+ } : $defineProperty : function defineProperty(O, P, Attributes) {
541
+ anObject$1(O);
542
+ P = toPropertyKey(P);
543
+ anObject$1(Attributes);
544
+ if (IE8_DOM_DEFINE) try {
545
+ return $defineProperty(O, P, Attributes);
546
+ } catch (error) { /* empty */ }
547
+ if ('get' in Attributes || 'set' in Attributes) throw $TypeError('Accessors not supported');
548
+ if ('value' in Attributes) O[P] = Attributes.value;
549
+ return O;
550
+ };
551
+
552
+ var DESCRIPTORS$3 = descriptors;
553
+ var definePropertyModule$2 = objectDefineProperty;
554
+ var createPropertyDescriptor = createPropertyDescriptor$2;
555
+
556
+ var createNonEnumerableProperty$2 = DESCRIPTORS$3 ? function (object, key, value) {
557
+ return definePropertyModule$2.f(object, key, createPropertyDescriptor(1, value));
558
+ } : function (object, key, value) {
559
+ object[key] = value;
560
+ return object;
561
+ };
562
+
563
+ var makeBuiltIn$2 = {exports: {}};
564
+
565
+ var DESCRIPTORS$2 = descriptors;
566
+ var hasOwn$4 = hasOwnProperty_1;
567
+
568
+ var FunctionPrototype = Function.prototype;
569
+ // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
570
+ var getDescriptor = DESCRIPTORS$2 && Object.getOwnPropertyDescriptor;
571
+
572
+ var EXISTS = hasOwn$4(FunctionPrototype, 'name');
573
+ // additional protection from minified / mangled / dropped function names
574
+ var PROPER = EXISTS && (function something() { /* empty */ }).name === 'something';
575
+ var CONFIGURABLE = EXISTS && (!DESCRIPTORS$2 || (DESCRIPTORS$2 && getDescriptor(FunctionPrototype, 'name').configurable));
576
+
577
+ var functionName = {
578
+ EXISTS: EXISTS,
579
+ PROPER: PROPER,
580
+ CONFIGURABLE: CONFIGURABLE
581
+ };
582
+
583
+ var uncurryThis$4 = functionUncurryThis;
584
+ var isCallable$4 = isCallable$a;
585
+ var store$1 = sharedStore;
586
+
587
+ var functionToString = uncurryThis$4(Function.toString);
588
+
589
+ // this helper broken in `core-js@3.4.1-3.4.4`, so we can't use `shared` helper
590
+ if (!isCallable$4(store$1.inspectSource)) {
591
+ store$1.inspectSource = function (it) {
592
+ return functionToString(it);
593
+ };
594
+ }
595
+
596
+ var inspectSource$1 = store$1.inspectSource;
597
+
598
+ var global$3 = global$a;
599
+ var isCallable$3 = isCallable$a;
600
+
601
+ var WeakMap$1 = global$3.WeakMap;
602
+
603
+ var weakMapBasicDetection = isCallable$3(WeakMap$1) && /native code/.test(String(WeakMap$1));
604
+
605
+ var shared$1 = shared$3.exports;
606
+ var uid = uid$2;
607
+
608
+ var keys = shared$1('keys');
609
+
610
+ var sharedKey$1 = function (key) {
611
+ return keys[key] || (keys[key] = uid(key));
612
+ };
613
+
614
+ var hiddenKeys$3 = {};
615
+
616
+ var NATIVE_WEAK_MAP = weakMapBasicDetection;
617
+ var global$2 = global$a;
618
+ var isObject = isObject$5;
619
+ var createNonEnumerableProperty$1 = createNonEnumerableProperty$2;
620
+ var hasOwn$3 = hasOwnProperty_1;
621
+ var shared = sharedStore;
622
+ var sharedKey = sharedKey$1;
623
+ var hiddenKeys$2 = hiddenKeys$3;
624
+
625
+ var OBJECT_ALREADY_INITIALIZED = 'Object already initialized';
626
+ var TypeError$1 = global$2.TypeError;
627
+ var WeakMap = global$2.WeakMap;
628
+ var set, get, has;
629
+
630
+ var enforce = function (it) {
631
+ return has(it) ? get(it) : set(it, {});
632
+ };
633
+
634
+ var getterFor = function (TYPE) {
635
+ return function (it) {
636
+ var state;
637
+ if (!isObject(it) || (state = get(it)).type !== TYPE) {
638
+ throw TypeError$1('Incompatible receiver, ' + TYPE + ' required');
639
+ } return state;
640
+ };
641
+ };
642
+
643
+ if (NATIVE_WEAK_MAP || shared.state) {
644
+ var store = shared.state || (shared.state = new WeakMap());
645
+ /* eslint-disable no-self-assign -- prototype methods protection */
646
+ store.get = store.get;
647
+ store.has = store.has;
648
+ store.set = store.set;
649
+ /* eslint-enable no-self-assign -- prototype methods protection */
650
+ set = function (it, metadata) {
651
+ if (store.has(it)) throw TypeError$1(OBJECT_ALREADY_INITIALIZED);
652
+ metadata.facade = it;
653
+ store.set(it, metadata);
654
+ return metadata;
655
+ };
656
+ get = function (it) {
657
+ return store.get(it) || {};
658
+ };
659
+ has = function (it) {
660
+ return store.has(it);
661
+ };
662
+ } else {
663
+ var STATE = sharedKey('state');
664
+ hiddenKeys$2[STATE] = true;
665
+ set = function (it, metadata) {
666
+ if (hasOwn$3(it, STATE)) throw TypeError$1(OBJECT_ALREADY_INITIALIZED);
667
+ metadata.facade = it;
668
+ createNonEnumerableProperty$1(it, STATE, metadata);
669
+ return metadata;
670
+ };
671
+ get = function (it) {
672
+ return hasOwn$3(it, STATE) ? it[STATE] : {};
673
+ };
674
+ has = function (it) {
675
+ return hasOwn$3(it, STATE);
676
+ };
677
+ }
678
+
679
+ var internalState = {
680
+ set: set,
681
+ get: get,
682
+ has: has,
683
+ enforce: enforce,
684
+ getterFor: getterFor
685
+ };
686
+
687
+ var uncurryThis$3 = functionUncurryThis;
688
+ var fails$2 = fails$9;
689
+ var isCallable$2 = isCallable$a;
690
+ var hasOwn$2 = hasOwnProperty_1;
691
+ var DESCRIPTORS$1 = descriptors;
692
+ var CONFIGURABLE_FUNCTION_NAME = functionName.CONFIGURABLE;
693
+ var inspectSource = inspectSource$1;
694
+ var InternalStateModule = internalState;
695
+
696
+ var enforceInternalState = InternalStateModule.enforce;
697
+ var getInternalState = InternalStateModule.get;
698
+ var $String = String;
699
+ // eslint-disable-next-line es/no-object-defineproperty -- safe
700
+ var defineProperty$1 = Object.defineProperty;
701
+ var stringSlice = uncurryThis$3(''.slice);
702
+ var replace = uncurryThis$3(''.replace);
703
+ var join = uncurryThis$3([].join);
704
+
705
+ var CONFIGURABLE_LENGTH = DESCRIPTORS$1 && !fails$2(function () {
706
+ return defineProperty$1(function () { /* empty */ }, 'length', { value: 8 }).length !== 8;
707
+ });
708
+
709
+ var TEMPLATE = String(String).split('String');
710
+
711
+ var makeBuiltIn$1 = makeBuiltIn$2.exports = function (value, name, options) {
712
+ if (stringSlice($String(name), 0, 7) === 'Symbol(') {
713
+ name = '[' + replace($String(name), /^Symbol\(([^)]*)\)/, '$1') + ']';
714
+ }
715
+ if (options && options.getter) name = 'get ' + name;
716
+ if (options && options.setter) name = 'set ' + name;
717
+ if (!hasOwn$2(value, 'name') || (CONFIGURABLE_FUNCTION_NAME && value.name !== name)) {
718
+ if (DESCRIPTORS$1) defineProperty$1(value, 'name', { value: name, configurable: true });
719
+ else value.name = name;
720
+ }
721
+ if (CONFIGURABLE_LENGTH && options && hasOwn$2(options, 'arity') && value.length !== options.arity) {
722
+ defineProperty$1(value, 'length', { value: options.arity });
723
+ }
724
+ try {
725
+ if (options && hasOwn$2(options, 'constructor') && options.constructor) {
726
+ if (DESCRIPTORS$1) defineProperty$1(value, 'prototype', { writable: false });
727
+ // in V8 ~ Chrome 53, prototypes of some methods, like `Array.prototype.values`, are non-writable
728
+ } else if (value.prototype) value.prototype = undefined;
729
+ } catch (error) { /* empty */ }
730
+ var state = enforceInternalState(value);
731
+ if (!hasOwn$2(state, 'source')) {
732
+ state.source = join(TEMPLATE, typeof name == 'string' ? name : '');
733
+ } return value;
734
+ };
735
+
736
+ // add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
737
+ // eslint-disable-next-line no-extend-native -- required
738
+ Function.prototype.toString = makeBuiltIn$1(function toString() {
739
+ return isCallable$2(this) && getInternalState(this).source || inspectSource(this);
740
+ }, 'toString');
741
+
742
+ var isCallable$1 = isCallable$a;
743
+ var definePropertyModule$1 = objectDefineProperty;
744
+ var makeBuiltIn = makeBuiltIn$2.exports;
745
+ var defineGlobalProperty$1 = defineGlobalProperty$3;
746
+
747
+ var defineBuiltIn$1 = function (O, key, value, options) {
748
+ if (!options) options = {};
749
+ var simple = options.enumerable;
750
+ var name = options.name !== undefined ? options.name : key;
751
+ if (isCallable$1(value)) makeBuiltIn(value, name, options);
752
+ if (options.global) {
753
+ if (simple) O[key] = value;
754
+ else defineGlobalProperty$1(key, value);
755
+ } else {
756
+ try {
757
+ if (!options.unsafe) delete O[key];
758
+ else if (O[key]) simple = true;
759
+ } catch (error) { /* empty */ }
760
+ if (simple) O[key] = value;
761
+ else definePropertyModule$1.f(O, key, {
762
+ value: value,
763
+ enumerable: false,
764
+ configurable: !options.nonConfigurable,
765
+ writable: !options.nonWritable
766
+ });
767
+ } return O;
768
+ };
769
+
770
+ var objectGetOwnPropertyNames = {};
771
+
772
+ var ceil = Math.ceil;
773
+ var floor = Math.floor;
774
+
775
+ // `Math.trunc` method
776
+ // https://tc39.es/ecma262/#sec-math.trunc
777
+ // eslint-disable-next-line es/no-math-trunc -- safe
778
+ var mathTrunc = Math.trunc || function trunc(x) {
779
+ var n = +x;
780
+ return (n > 0 ? floor : ceil)(n);
781
+ };
782
+
783
+ var trunc = mathTrunc;
784
+
785
+ // `ToIntegerOrInfinity` abstract operation
786
+ // https://tc39.es/ecma262/#sec-tointegerorinfinity
787
+ var toIntegerOrInfinity$2 = function (argument) {
788
+ var number = +argument;
789
+ // eslint-disable-next-line no-self-compare -- NaN check
790
+ return number !== number || number === 0 ? 0 : trunc(number);
791
+ };
792
+
793
+ var toIntegerOrInfinity$1 = toIntegerOrInfinity$2;
794
+
795
+ var max = Math.max;
796
+ var min$1 = Math.min;
797
+
798
+ // Helper for a popular repeating case of the spec:
799
+ // Let integer be ? ToInteger(index).
800
+ // If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).
801
+ var toAbsoluteIndex$1 = function (index, length) {
802
+ var integer = toIntegerOrInfinity$1(index);
803
+ return integer < 0 ? max(integer + length, 0) : min$1(integer, length);
804
+ };
805
+
806
+ var toIntegerOrInfinity = toIntegerOrInfinity$2;
807
+
808
+ var min = Math.min;
809
+
810
+ // `ToLength` abstract operation
811
+ // https://tc39.es/ecma262/#sec-tolength
812
+ var toLength$1 = function (argument) {
813
+ return argument > 0 ? min(toIntegerOrInfinity(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
814
+ };
815
+
816
+ var toLength = toLength$1;
817
+
818
+ // `LengthOfArrayLike` abstract operation
819
+ // https://tc39.es/ecma262/#sec-lengthofarraylike
820
+ var lengthOfArrayLike$1 = function (obj) {
821
+ return toLength(obj.length);
822
+ };
823
+
824
+ var toIndexedObject$1 = toIndexedObject$3;
825
+ var toAbsoluteIndex = toAbsoluteIndex$1;
826
+ var lengthOfArrayLike = lengthOfArrayLike$1;
827
+
828
+ // `Array.prototype.{ indexOf, includes }` methods implementation
829
+ var createMethod = function (IS_INCLUDES) {
830
+ return function ($this, el, fromIndex) {
831
+ var O = toIndexedObject$1($this);
832
+ var length = lengthOfArrayLike(O);
833
+ var index = toAbsoluteIndex(fromIndex, length);
834
+ var value;
835
+ // Array#includes uses SameValueZero equality algorithm
836
+ // eslint-disable-next-line no-self-compare -- NaN check
837
+ if (IS_INCLUDES && el != el) while (length > index) {
838
+ value = O[index++];
839
+ // eslint-disable-next-line no-self-compare -- NaN check
840
+ if (value != value) return true;
841
+ // Array#indexOf ignores holes, Array#includes - not
842
+ } else for (;length > index; index++) {
843
+ if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0;
844
+ } return !IS_INCLUDES && -1;
845
+ };
846
+ };
847
+
848
+ var arrayIncludes = {
849
+ // `Array.prototype.includes` method
850
+ // https://tc39.es/ecma262/#sec-array.prototype.includes
851
+ includes: createMethod(true),
852
+ // `Array.prototype.indexOf` method
853
+ // https://tc39.es/ecma262/#sec-array.prototype.indexof
854
+ indexOf: createMethod(false)
855
+ };
856
+
857
+ var uncurryThis$2 = functionUncurryThis;
858
+ var hasOwn$1 = hasOwnProperty_1;
859
+ var toIndexedObject = toIndexedObject$3;
860
+ var indexOf = arrayIncludes.indexOf;
861
+ var hiddenKeys$1 = hiddenKeys$3;
862
+
863
+ var push = uncurryThis$2([].push);
864
+
865
+ var objectKeysInternal = function (object, names) {
866
+ var O = toIndexedObject(object);
867
+ var i = 0;
868
+ var result = [];
869
+ var key;
870
+ for (key in O) !hasOwn$1(hiddenKeys$1, key) && hasOwn$1(O, key) && push(result, key);
871
+ // Don't enum bug & hidden keys
872
+ while (names.length > i) if (hasOwn$1(O, key = names[i++])) {
873
+ ~indexOf(result, key) || push(result, key);
874
+ }
875
+ return result;
876
+ };
877
+
878
+ // IE8- don't enum bug keys
879
+ var enumBugKeys$2 = [
880
+ 'constructor',
881
+ 'hasOwnProperty',
882
+ 'isPrototypeOf',
883
+ 'propertyIsEnumerable',
884
+ 'toLocaleString',
885
+ 'toString',
886
+ 'valueOf'
887
+ ];
888
+
889
+ var internalObjectKeys$1 = objectKeysInternal;
890
+ var enumBugKeys$1 = enumBugKeys$2;
891
+
892
+ var hiddenKeys = enumBugKeys$1.concat('length', 'prototype');
893
+
894
+ // `Object.getOwnPropertyNames` method
895
+ // https://tc39.es/ecma262/#sec-object.getownpropertynames
896
+ // eslint-disable-next-line es/no-object-getownpropertynames -- safe
897
+ objectGetOwnPropertyNames.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
898
+ return internalObjectKeys$1(O, hiddenKeys);
899
+ };
900
+
901
+ var objectGetOwnPropertySymbols = {};
902
+
903
+ // eslint-disable-next-line es/no-object-getownpropertysymbols -- safe
904
+ objectGetOwnPropertySymbols.f = Object.getOwnPropertySymbols;
905
+
906
+ var getBuiltIn = getBuiltIn$2;
907
+ var uncurryThis$1 = functionUncurryThis;
908
+ var getOwnPropertyNamesModule = objectGetOwnPropertyNames;
909
+ var getOwnPropertySymbolsModule$1 = objectGetOwnPropertySymbols;
910
+ var anObject = anObject$2;
911
+
912
+ var concat$1 = uncurryThis$1([].concat);
913
+
914
+ // all object keys, includes non-enumerable and symbols
915
+ var ownKeys$1 = getBuiltIn('Reflect', 'ownKeys') || function ownKeys(it) {
916
+ var keys = getOwnPropertyNamesModule.f(anObject(it));
917
+ var getOwnPropertySymbols = getOwnPropertySymbolsModule$1.f;
918
+ return getOwnPropertySymbols ? concat$1(keys, getOwnPropertySymbols(it)) : keys;
919
+ };
920
+
921
+ var hasOwn = hasOwnProperty_1;
922
+ var ownKeys = ownKeys$1;
923
+ var getOwnPropertyDescriptorModule = objectGetOwnPropertyDescriptor;
924
+ var definePropertyModule = objectDefineProperty;
925
+
926
+ var copyConstructorProperties$1 = function (target, source, exceptions) {
927
+ var keys = ownKeys(source);
928
+ var defineProperty = definePropertyModule.f;
929
+ var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;
930
+ for (var i = 0; i < keys.length; i++) {
931
+ var key = keys[i];
932
+ if (!hasOwn(target, key) && !(exceptions && hasOwn(exceptions, key))) {
933
+ defineProperty(target, key, getOwnPropertyDescriptor(source, key));
934
+ }
935
+ }
936
+ };
937
+
938
+ var fails$1 = fails$9;
939
+ var isCallable = isCallable$a;
940
+
941
+ var replacement = /#|\.prototype\./;
942
+
943
+ var isForced$1 = function (feature, detection) {
944
+ var value = data[normalize(feature)];
945
+ return value == POLYFILL ? true
946
+ : value == NATIVE ? false
947
+ : isCallable(detection) ? fails$1(detection)
948
+ : !!detection;
949
+ };
950
+
951
+ var normalize = isForced$1.normalize = function (string) {
952
+ return String(string).replace(replacement, '.').toLowerCase();
953
+ };
954
+
955
+ var data = isForced$1.data = {};
956
+ var NATIVE = isForced$1.NATIVE = 'N';
957
+ var POLYFILL = isForced$1.POLYFILL = 'P';
958
+
959
+ var isForced_1 = isForced$1;
960
+
961
+ var global$1 = global$a;
962
+ var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f;
963
+ var createNonEnumerableProperty = createNonEnumerableProperty$2;
964
+ var defineBuiltIn = defineBuiltIn$1;
965
+ var defineGlobalProperty = defineGlobalProperty$3;
966
+ var copyConstructorProperties = copyConstructorProperties$1;
967
+ var isForced = isForced_1;
968
+
969
+ /*
970
+ options.target - name of the target object
971
+ options.global - target is the global object
972
+ options.stat - export as static methods of target
973
+ options.proto - export as prototype methods of target
974
+ options.real - real prototype method for the `pure` version
975
+ options.forced - export even if the native feature is available
976
+ options.bind - bind methods to the target, required for the `pure` version
977
+ options.wrap - wrap constructors to preventing global pollution, required for the `pure` version
978
+ options.unsafe - use the simple assignment of property instead of delete + defineProperty
979
+ options.sham - add a flag to not completely full polyfills
980
+ options.enumerable - export as enumerable property
981
+ options.dontCallGetSet - prevent calling a getter on target
982
+ options.name - the .name of the function if it does not match the key
983
+ */
984
+ var _export = function (options, source) {
985
+ var TARGET = options.target;
986
+ var GLOBAL = options.global;
987
+ var STATIC = options.stat;
988
+ var FORCED, target, key, targetProperty, sourceProperty, descriptor;
989
+ if (GLOBAL) {
990
+ target = global$1;
991
+ } else if (STATIC) {
992
+ target = global$1[TARGET] || defineGlobalProperty(TARGET, {});
993
+ } else {
994
+ target = (global$1[TARGET] || {}).prototype;
995
+ }
996
+ if (target) for (key in source) {
997
+ sourceProperty = source[key];
998
+ if (options.dontCallGetSet) {
999
+ descriptor = getOwnPropertyDescriptor(target, key);
1000
+ targetProperty = descriptor && descriptor.value;
1001
+ } else targetProperty = target[key];
1002
+ FORCED = isForced(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);
1003
+ // contained in target
1004
+ if (!FORCED && targetProperty !== undefined) {
1005
+ if (typeof sourceProperty == typeof targetProperty) continue;
1006
+ copyConstructorProperties(sourceProperty, targetProperty);
1007
+ }
1008
+ // add a flag to not completely full polyfills
1009
+ if (options.sham || (targetProperty && targetProperty.sham)) {
1010
+ createNonEnumerableProperty(sourceProperty, 'sham', true);
1011
+ }
1012
+ defineBuiltIn(target, key, sourceProperty, options);
1013
+ }
1014
+ };
1015
+
1016
+ var internalObjectKeys = objectKeysInternal;
1017
+ var enumBugKeys = enumBugKeys$2;
1018
+
1019
+ // `Object.keys` method
1020
+ // https://tc39.es/ecma262/#sec-object.keys
1021
+ // eslint-disable-next-line es/no-object-keys -- safe
1022
+ var objectKeys$1 = Object.keys || function keys(O) {
1023
+ return internalObjectKeys(O, enumBugKeys);
1024
+ };
1025
+
1026
+ var DESCRIPTORS = descriptors;
1027
+ var uncurryThis = functionUncurryThis;
1028
+ var call = functionCall;
1029
+ var fails = fails$9;
1030
+ var objectKeys = objectKeys$1;
1031
+ var getOwnPropertySymbolsModule = objectGetOwnPropertySymbols;
1032
+ var propertyIsEnumerableModule = objectPropertyIsEnumerable;
1033
+ var toObject = toObject$2;
1034
+ var IndexedObject = indexedObject;
1035
+
1036
+ // eslint-disable-next-line es/no-object-assign -- safe
1037
+ var $assign = Object.assign;
1038
+ // eslint-disable-next-line es/no-object-defineproperty -- required for testing
1039
+ var defineProperty = Object.defineProperty;
1040
+ var concat = uncurryThis([].concat);
1041
+
1042
+ // `Object.assign` method
1043
+ // https://tc39.es/ecma262/#sec-object.assign
1044
+ var objectAssign = !$assign || fails(function () {
1045
+ // should have correct order of operations (Edge bug)
1046
+ if (DESCRIPTORS && $assign({ b: 1 }, $assign(defineProperty({}, 'a', {
1047
+ enumerable: true,
1048
+ get: function () {
1049
+ defineProperty(this, 'b', {
1050
+ value: 3,
1051
+ enumerable: false
1052
+ });
1053
+ }
1054
+ }), { b: 2 })).b !== 1) return true;
1055
+ // should work with symbols and should have deterministic property order (V8 bug)
1056
+ var A = {};
1057
+ var B = {};
1058
+ // eslint-disable-next-line es/no-symbol -- safe
1059
+ var symbol = Symbol();
1060
+ var alphabet = 'abcdefghijklmnopqrst';
1061
+ A[symbol] = 7;
1062
+ alphabet.split('').forEach(function (chr) { B[chr] = chr; });
1063
+ return $assign({}, A)[symbol] != 7 || objectKeys($assign({}, B)).join('') != alphabet;
1064
+ }) ? function assign(target, source) { // eslint-disable-line no-unused-vars -- required for `.length`
1065
+ var T = toObject(target);
1066
+ var argumentsLength = arguments.length;
1067
+ var index = 1;
1068
+ var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;
1069
+ var propertyIsEnumerable = propertyIsEnumerableModule.f;
1070
+ while (argumentsLength > index) {
1071
+ var S = IndexedObject(arguments[index++]);
1072
+ var keys = getOwnPropertySymbols ? concat(objectKeys(S), getOwnPropertySymbols(S)) : objectKeys(S);
1073
+ var length = keys.length;
1074
+ var j = 0;
1075
+ var key;
1076
+ while (length > j) {
1077
+ key = keys[j++];
1078
+ if (!DESCRIPTORS || call(propertyIsEnumerable, S, key)) T[key] = S[key];
1079
+ }
1080
+ } return T;
1081
+ } : $assign;
1082
+
1083
+ var $ = _export;
1084
+ var assign = objectAssign;
1085
+
1086
+ // `Object.assign` method
1087
+ // https://tc39.es/ecma262/#sec-object.assign
1088
+ // eslint-disable-next-line es/no-object-assign -- required for testing
1089
+ $({ target: 'Object', stat: true, arity: 2, forced: Object.assign !== assign }, {
1090
+ assign: assign
1091
+ });
1092
+
1093
+ const CheckboxContainer = /*#__PURE__*/styled__default["default"].section.withConfig({
1094
+ displayName: "atoms-checkboxstyles__CheckboxContainer",
1095
+ componentId: "sc-1gq944z-0"
1096
+ })(["display:flex;flex-direction:row;"]);
1097
+ const Input = /*#__PURE__*/styled__default["default"].input.attrs({
1098
+ type: 'checkbox'
1099
+ }).withConfig({
1100
+ displayName: "atoms-checkboxstyles__Input",
1101
+ componentId: "sc-1gq944z-1"
1102
+ })(["appearance:none;margin:0;cursor:pointer;width:18px;height:18px;border:1px solid ", ";transform:translateY(-0.075em);display:grid;place-content:center;&:checked{background-color:", ";&::before{content:'';width:12px;height:12px;transform:scale(0);clip-path:polygon(11% 38%,0 53%,49% 90%,100% 24%,87% 11%,47% 65%);box-shadow:inset 12px 12px ", ";}&:not(:disabled){&:hover{background-color:", ";}}}&:focus{box-shadow:0 0 0 1px ", ",0 0 0 2px ", ";border:none;}&:not(:disabled){&:focus{box-shadow:0 0 0 1px ", ",0 0 0 2px ", ";border:none;}&:not(:checked){&:hover::before{content:'';width:12px;height:12px;transform:scale(1);box-shadow:inset 12px 12px ", ";}}}&:checked::before{transform:scale(1);}:disabled{border:1px solid ", ";cursor:not-allowed;&:checked{background-color:", ";&::before{box-shadow:inset 12px 12px ", ";}}}"], ({
1103
+ theme,
1104
+ error
1105
+ }) => error ? theme.components.checkbox.square.color.error : theme.components.checkbox.square.color.default, ({
1106
+ theme
1107
+ }) => theme.components.checkbox.innerSquare.color.selected, ({
1108
+ theme
1109
+ }) => theme.components.checkbox.checkmark.color.selected, ({
1110
+ theme
1111
+ }) => theme.components.checkbox.innerSquare.color.hoverSelected, ({
1112
+ theme
1113
+ }) => theme.components.checkbox.focus.color.focus, ({
1114
+ theme
1115
+ }) => theme.components.checkbox.focus.color.focus, ({
1116
+ theme
1117
+ }) => theme.components.checkbox.focus.color.focus, ({
1118
+ theme
1119
+ }) => theme.components.checkbox.focus.color.focus, ({
1120
+ theme
1121
+ }) => theme.components.checkbox.innerSquare.color.hover, ({
1122
+ theme
1123
+ }) => theme.components.checkbox.square.color.disable, ({
1124
+ theme
1125
+ }) => theme.components.checkbox.innerSquare.color.disableSelected, ({
1126
+ theme
1127
+ }) => theme.components.checkbox.checkmark.color.selectedDisable);
1128
+ const Label = /*#__PURE__*/styled__default["default"].label.withConfig({
1129
+ displayName: "atoms-checkboxstyles__Label",
1130
+ componentId: "sc-1gq944z-2"
1131
+ })(["color:", ";font-family:", ";font-weight:", ";line-height:", ";font-size:", ";letter-spacing:", ";padding-left:", ";"], ({
1132
+ theme,
1133
+ disabled
1134
+ }) => disabled ? theme.components.checkbox.text.color.textLabel.disable : theme.components.checkbox.text.color.textLabel.default, ({
1135
+ theme
1136
+ }) => theme.components.checkbox.fieldLabel.fontFamily, ({
1137
+ theme
1138
+ }) => theme.components.checkbox.fieldLabel.fontWeight, ({
1139
+ theme
1140
+ }) => theme.components.checkbox.fieldLabel.lineHeight, ({
1141
+ theme
1142
+ }) => theme.components.checkbox.fieldLabel.fontSize, ({
1143
+ theme
1144
+ }) => theme.components.checkbox.fieldLabel.letterSpacing, ({
1145
+ theme
1146
+ }) => theme.components.checkbox.gap);
1147
+ const CheckboxContainerError = /*#__PURE__*/styled__default["default"].section.withConfig({
1148
+ displayName: "atoms-checkboxstyles__CheckboxContainerError",
1149
+ componentId: "sc-1gq944z-3"
1150
+ })([""]);
1151
+ const LabelError = /*#__PURE__*/styled__default["default"].label.withConfig({
1152
+ displayName: "atoms-checkboxstyles__LabelError",
1153
+ componentId: "sc-1gq944z-4"
1154
+ })(["color:", ";font-family:", ";font-weight:", ";line-height:", ";font-size:", ";letter-spacing:", ";"], ({
1155
+ theme
1156
+ }) => theme.components.checkbox.text.color.errorLabel.error, ({
1157
+ theme
1158
+ }) => theme.components.checkbox.errorLabel.fontFamily, ({
1159
+ theme
1160
+ }) => theme.components.checkbox.errorLabel.fontWeight, ({
1161
+ theme
1162
+ }) => theme.components.checkbox.errorLabel.lineHeight, ({
1163
+ theme
1164
+ }) => theme.components.checkbox.errorLabel.fontSize, ({
1165
+ theme
1166
+ }) => theme.components.checkbox.errorLabel.letterSpacing);
1167
+
1168
+ function Checkbox({
1169
+ id,
1170
+ label,
1171
+ disabled = false,
1172
+ errorMessage,
1173
+ ref = null,
1174
+ checked,
1175
+ onChange
1176
+ }) {
1177
+ return jsxRuntime.jsxs(jsxRuntime.Fragment, {
1178
+ children: [jsxRuntime.jsxs(CheckboxContainer, {
1179
+ children: [jsxRuntime.jsx(Input, {
1180
+ id: id,
1181
+ disabled: disabled,
1182
+ error: errorMessage,
1183
+ checked: checked,
1184
+ ref: ref,
1185
+ type: "checkbox",
1186
+ "data-testid": `${id}-test`,
1187
+ onChange: onChange
1188
+ }), jsxRuntime.jsx(Label, Object.assign({
1189
+ htmlFor: id,
1190
+ disabled: disabled
1191
+ }, {
1192
+ children: label
1193
+ }))]
1194
+ }), errorMessage && jsxRuntime.jsx(CheckboxContainerError, {
1195
+ children: jsxRuntime.jsx(LabelError, {
1196
+ children: errorMessage
1197
+ })
1198
+ })]
1199
+ });
1200
+ }
1201
+
1202
+ exports.Checkbox = Checkbox;
package/package.json ADDED
@@ -0,0 +1,13 @@
1
+ {
2
+ "name": "@bolttech/atoms-checkbox",
3
+ "version": "0.0.1",
4
+ "main": "./index.cjs",
5
+ "type": "commonjs",
6
+ "types": "./src/index.d.ts",
7
+ "dependencies": {},
8
+ "peerDependencies": {
9
+ "@edirect/frontend-foundations": "0.0.36",
10
+ "react": "18.2.0",
11
+ "styled-components": "5.3.6"
12
+ }
13
+ }
package/src/index.d.ts ADDED
@@ -0,0 +1,2 @@
1
+ export { Checkbox } from './lib/atoms-checkbox';
2
+ export { CheckboxProps } from './lib/atoms-checkbox.type';
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ import { CheckboxProps } from './atoms-checkbox.type';
3
+ export declare function Checkbox({ id, label, disabled, errorMessage, ref, checked, onChange, }: CheckboxProps): JSX.Element;
@@ -0,0 +1,14 @@
1
+ interface LabelProps {
2
+ disabled?: boolean;
3
+ }
4
+ interface InputProps {
5
+ error?: string;
6
+ }
7
+ declare const CheckboxContainer: import("styled-components").StyledComponent<"section", import("styled-components").DefaultTheme, {}, never>;
8
+ declare const Input: import("styled-components").StyledComponent<"input", import("styled-components").DefaultTheme, {
9
+ type: "checkbox";
10
+ } & InputProps, "type">;
11
+ declare const Label: import("styled-components").StyledComponent<"label", import("styled-components").DefaultTheme, LabelProps, never>;
12
+ declare const CheckboxContainerError: import("styled-components").StyledComponent<"section", import("styled-components").DefaultTheme, {}, never>;
13
+ declare const LabelError: import("styled-components").StyledComponent<"label", import("styled-components").DefaultTheme, {}, never>;
14
+ export { CheckboxContainer, Input, Label, CheckboxContainerError, LabelError };
@@ -0,0 +1,10 @@
1
+ import { ChangeEventHandler } from 'react';
2
+ export interface CheckboxProps {
3
+ id: string;
4
+ label: string;
5
+ disabled?: boolean;
6
+ errorMessage?: string;
7
+ checked?: boolean;
8
+ ref?: ((instance: HTMLInputElement | null) => void) | React.RefObject<HTMLInputElement> | null | undefined;
9
+ onChange?: ChangeEventHandler<HTMLInputElement>;
10
+ }