@sebgroup/green-react 1.0.0-beta.3 → 1.0.0-beta.34

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 (39) hide show
  1. package/index.d.ts +6 -0
  2. package/{react.esm.js → index.esm.js} +1342 -404
  3. package/index.umd.js +2953 -0
  4. package/lib/alert/alert.d.ts +3 -2
  5. package/lib/badge/badge.d.ts +12 -0
  6. package/lib/card/card.d.ts +3 -4
  7. package/lib/datepicker/datepicker.d.ts +2 -0
  8. package/lib/datepicker/hook.d.ts +12 -0
  9. package/lib/dropdown/dropdown.d.ts +4 -7
  10. package/lib/dropdown/hooks.d.ts +18 -8
  11. package/lib/form/{button.d.ts → button/button.d.ts} +2 -1
  12. package/lib/form/{buttonGroup.d.ts → buttonGroup/buttonGroup.d.ts} +2 -2
  13. package/lib/form/form.d.ts +5 -4
  14. package/lib/form/formContext.d.ts +13 -0
  15. package/lib/form/formItems.d.ts +9 -0
  16. package/lib/form/group/group.d.ts +9 -0
  17. package/lib/form/index.d.ts +7 -4
  18. package/lib/form/input/input.d.ts +11 -0
  19. package/lib/form/radioButton/radioGroup.d.ts +13 -0
  20. package/lib/form/{text.d.ts → text/text.d.ts} +1 -1
  21. package/lib/form/types.d.ts +14 -16
  22. package/lib/form/useInput.d.ts +2 -3
  23. package/lib/form/validateInput.d.ts +9 -0
  24. package/lib/layout/flexbox/flexbox.d.ts +13 -0
  25. package/lib/layout/flexbox/types.d.ts +5 -0
  26. package/lib/layout/index.d.ts +1 -2
  27. package/lib/link/link.d.ts +7 -0
  28. package/lib/list/list.d.ts +14 -0
  29. package/lib/list/listItem.d.ts +10 -0
  30. package/lib/modal/modal.d.ts +2 -1
  31. package/lib/navbar/navbar.d.ts +12 -0
  32. package/lib/stepper/hook.d.ts +3 -0
  33. package/lib/stepper/stepper.d.ts +8 -0
  34. package/lib/tabs/tabs.d.ts +13 -0
  35. package/package.json +7 -10
  36. package/lib/form/input.d.ts +0 -5
  37. package/lib/layout/flexbox.d.ts +0 -9
  38. package/lib/layout/group.d.ts +0 -6
  39. package/react.umd.js +0 -1456
package/react.umd.js DELETED
@@ -1,1456 +0,0 @@
1
- (function (global, factory) {
2
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('react/jsx-runtime'), require('@sebgroup/extract'), require('react')) :
3
- typeof define === 'function' && define.amd ? define(['exports', 'react/jsx-runtime', '@sebgroup/extract', 'react'], factory) :
4
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.React = {}, global.jsxRuntime, global.extract, global.React));
5
- })(this, (function (exports, jsxRuntime, extract, react) { 'use strict';
6
-
7
- /*! *****************************************************************************
8
- Copyright (c) Microsoft Corporation.
9
-
10
- Permission to use, copy, modify, and/or distribute this software for any
11
- purpose with or without fee is hereby granted.
12
-
13
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
14
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
15
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
16
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
17
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
18
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
19
- PERFORMANCE OF THIS SOFTWARE.
20
- ***************************************************************************** */
21
-
22
- var __assign = function() {
23
- __assign = Object.assign || function __assign(t) {
24
- for (var s, i = 1, n = arguments.length; i < n; i++) {
25
- s = arguments[i];
26
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
27
- }
28
- return t;
29
- };
30
- return __assign.apply(this, arguments);
31
- };
32
-
33
- function __rest(s, e) {
34
- var t = {};
35
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
36
- t[p] = s[p];
37
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
38
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
39
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
40
- t[p[i]] = s[p[i]];
41
- }
42
- return t;
43
- }
44
-
45
- function Button(_a) {
46
- var children = _a.children,
47
- variant = _a.variant,
48
- onClick = _a.onClick,
49
- _b = _a.active,
50
- active = _b === void 0 ? false : _b,
51
- _c = _a.type,
52
- type = _c === void 0 ? 'button' : _c;
53
- var props = {
54
- type: type
55
- };
56
- var classNames = [];
57
- if (variant) classNames.push(variant);
58
- if (active) classNames.push('active');
59
- if (classNames.length) props.className = classNames.join(' ');
60
- if (onClick) props.onClick = onClick;
61
- return jsxRuntime.jsx("button", __assign({}, props, {
62
- children: children
63
- }), void 0);
64
- }
65
-
66
- var ModalHeader = function ModalHeader(_a) {
67
- var _b = _a.header,
68
- header = _b === void 0 ? '' : _b,
69
- onClose = _a.onClose;
70
-
71
- var handleClose = function handleClose(event) {
72
- if (onClose) onClose(event);
73
- };
74
-
75
- return jsxRuntime.jsxs("div", __assign({
76
- className: "header"
77
- }, {
78
- children: [jsxRuntime.jsx("h3", {
79
- children: header
80
- }, void 0), jsxRuntime.jsx("button", __assign({
81
- className: "close",
82
- onClick: handleClose
83
- }, {
84
- children: jsxRuntime.jsx("span", __assign({
85
- className: "sr-only"
86
- }, {
87
- children: "Close"
88
- }), void 0)
89
- }), void 0)]
90
- }), void 0);
91
- };
92
-
93
- var ModalBody = function ModalBody(_a) {
94
- var children = _a.children;
95
- return jsxRuntime.jsx("div", __assign({
96
- className: "body"
97
- }, {
98
- children: children
99
- }), void 0);
100
- };
101
-
102
- var ModalFooter = function ModalFooter(_a) {
103
- var confirm = _a.confirm,
104
- dismiss = _a.dismiss,
105
- onClose = _a.onClose,
106
- onConfirm = _a.onConfirm,
107
- onDismiss = _a.onDismiss;
108
-
109
- var handleConfirm = function handleConfirm(event) {
110
- if (onConfirm) onConfirm(event);
111
- if (onClose) onClose(event);
112
- };
113
-
114
- var handleDismiss = function handleDismiss(event) {
115
- if (onDismiss) onDismiss(event);
116
- if (onClose) onClose(event);
117
- };
118
-
119
- return jsxRuntime.jsxs("div", __assign({
120
- className: "footer"
121
- }, {
122
- children: [dismiss && jsxRuntime.jsx(Button, __assign({
123
- variant: "secondary",
124
- onClick: handleDismiss
125
- }, {
126
- children: dismiss
127
- }), void 0), confirm && jsxRuntime.jsx(Button, __assign({
128
- variant: "primary",
129
- onClick: handleConfirm
130
- }, {
131
- children: confirm
132
- }), void 0)]
133
- }), void 0);
134
- };
135
-
136
- var Modal = function Modal(_a) {
137
- var _b = _a.type,
138
- type = _b === void 0 ? 'default' : _b,
139
- props = __rest(_a, ["type"]);
140
-
141
- return jsxRuntime.jsxs("section", __assign({
142
- role: extract.ModalRole[type]
143
- }, {
144
- children: [jsxRuntime.jsx(ModalHeader, __assign({}, props), void 0), jsxRuntime.jsx(ModalBody, __assign({}, props), void 0), jsxRuntime.jsx(ModalFooter, __assign({}, props), void 0)]
145
- }), void 0);
146
- };
147
-
148
- var Flexbox = function Flexbox(_a) {
149
- var alignContent = _a.alignContent,
150
- alignItems = _a.alignItems,
151
- alignSelf = _a.alignSelf,
152
- children = _a.children,
153
- justifyContent = _a.justifyContent;
154
-
155
- var _b = react.useState(['d-flex']),
156
- classes = _b[0],
157
- setClasses = _b[1];
158
-
159
- var _c = react.useState('d-flex'),
160
- className = _c[0],
161
- setClassName = _c[1]; // update className when classes change
162
-
163
-
164
- react.useEffect(function () {
165
- var newClassName = classes.join(' ');
166
- if (newClassName !== className) setClassName(newClassName);
167
- }, [classes, className]); // update classes when props change
168
-
169
- react.useEffect(function () {
170
- var newClasses = ['d-flex'];
171
- if (alignItems) newClasses.push("align-items-" + alignItems);
172
- if (alignContent) newClasses.push("align-content-" + alignContent);
173
- if (alignSelf) newClasses.push("align-content-" + alignSelf);
174
- if (justifyContent) newClasses.push("justify-content-" + justifyContent);
175
- setClasses(newClasses);
176
- }, [alignContent, alignItems, alignSelf, justifyContent]);
177
- return jsxRuntime.jsx("div", __assign({
178
- className: className
179
- }, {
180
- children: children
181
- }), void 0);
182
- };
183
-
184
- function Group(_a) {
185
- var children = _a.children;
186
- return jsxRuntime.jsx("div", __assign({
187
- className: "group"
188
- }, {
189
- children: children
190
- }), void 0);
191
- }
192
-
193
- function Card(_a) {
194
- var children = _a.children,
195
- headline = _a.headline,
196
- buttons = _a.buttons;
197
- return jsxRuntime.jsx("section", __assign({
198
- className: "card"
199
- }, {
200
- children: jsxRuntime.jsxs("div", __assign({
201
- className: "card-body"
202
- }, {
203
- children: [headline && jsxRuntime.jsx("h2", {
204
- children: headline
205
- }, void 0), jsxRuntime.jsx("p", {
206
- children: children
207
- }, void 0), buttons && jsxRuntime.jsx("footer", {
208
- children: buttons
209
- }, void 0)]
210
- }), void 0)
211
- }), void 0);
212
- }
213
-
214
- function Alert(_a) {
215
- var type = _a.type,
216
- heading = _a.heading,
217
- children = _a.children,
218
- closeText = _a.closeText,
219
- _b = _a.isCloseable,
220
- isCloseable = _b === void 0 ? true : _b;
221
-
222
- var _c = react.useState(),
223
- closeButton = _c[0],
224
- setCloseButton = _c[1];
225
-
226
- react.useEffect(function () {
227
- if (!isCloseable) {
228
- setCloseButton(null);
229
- } else {
230
- if (closeText) setCloseButton(jsxRuntime.jsx(Button, {
231
- children: closeText
232
- }, void 0));else setCloseButton(jsxRuntime.jsx("button", {
233
- className: "close"
234
- }, void 0));
235
- }
236
- }, [isCloseable, closeText]);
237
- return jsxRuntime.jsxs("div", __assign({
238
- role: "alert",
239
- className: type
240
- }, {
241
- children: [heading && jsxRuntime.jsx("h3", {
242
- children: heading
243
- }, void 0), jsxRuntime.jsx("p", {
244
- children: children
245
- }, void 0), closeButton]
246
- }), void 0);
247
- }
248
-
249
- var ButtonGroup = function ButtonGroup(_a) {
250
- var children = _a.children,
251
- selectedIndex = _a.selectedIndex,
252
- variant = _a.variant;
253
-
254
- var _b = react.useState(selectedIndex),
255
- selected = _b[0],
256
- setSelected = _b[1];
257
-
258
- var _c = react.useState([]),
259
- buttons = _c[0],
260
- setButtons = _c[1];
261
-
262
- react.useEffect(function () {
263
- var buttonProps = (children instanceof Array ? children : [children]).filter(function (b) {
264
- return b && b.props;
265
- }).map(function (b, ix) {
266
- var bp = b.props;
267
-
268
- var props = __assign(__assign({}, bp), {
269
- variant: variant,
270
- key: bp.key || "btn_" + ix,
271
- active: ix === selected,
272
- onClick: function (e) {
273
- setSelected(ix);
274
- if (bp.onClick) bp.onClick(e);
275
- }
276
- });
277
-
278
- return props;
279
- });
280
- setButtons(buttonProps);
281
- }, [children, selected, variant]);
282
- return jsxRuntime.jsx(Group, {
283
- children: buttons.map(function (props) {
284
- return jsxRuntime.jsx(Button, __assign({}, props), props.key);
285
- })
286
- }, void 0);
287
- };
288
-
289
- function Form(_a) {
290
- var children = _a.children,
291
- _b = _a.direction,
292
- direction = _b === void 0 ? 'vertical' : _b,
293
- _c = _a.size,
294
- size = _c === void 0 ? 'md' : _c;
295
- return jsxRuntime.jsx("form", __assign({
296
- className: [direction, "size-" + size].join(' ')
297
- }, {
298
- children: children
299
- }), void 0);
300
- }
301
-
302
- var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
303
-
304
- var check = function (it) {
305
- return it && it.Math == Math && it;
306
- };
307
-
308
- // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
309
- var global$o =
310
- // eslint-disable-next-line es/no-global-this -- safe
311
- check(typeof globalThis == 'object' && globalThis) ||
312
- check(typeof window == 'object' && window) ||
313
- // eslint-disable-next-line no-restricted-globals -- safe
314
- check(typeof self == 'object' && self) ||
315
- check(typeof commonjsGlobal == 'object' && commonjsGlobal) ||
316
- // eslint-disable-next-line no-new-func -- fallback
317
- (function () { return this; })() || Function('return this')();
318
-
319
- var objectGetOwnPropertyDescriptor = {};
320
-
321
- var fails$6 = function (exec) {
322
- try {
323
- return !!exec();
324
- } catch (error) {
325
- return true;
326
- }
327
- };
328
-
329
- var fails$5 = fails$6;
330
-
331
- // Detect IE8's incomplete defineProperty implementation
332
- var descriptors = !fails$5(function () {
333
- // eslint-disable-next-line es/no-object-defineproperty -- required for testing
334
- return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] != 7;
335
- });
336
-
337
- var call$4 = Function.prototype.call;
338
-
339
- var functionCall = call$4.bind ? call$4.bind(call$4) : function () {
340
- return call$4.apply(call$4, arguments);
341
- };
342
-
343
- var objectPropertyIsEnumerable = {};
344
-
345
- var $propertyIsEnumerable = {}.propertyIsEnumerable;
346
- // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
347
- var getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor;
348
-
349
- // Nashorn ~ JDK8 bug
350
- var NASHORN_BUG = getOwnPropertyDescriptor$1 && !$propertyIsEnumerable.call({ 1: 2 }, 1);
351
-
352
- // `Object.prototype.propertyIsEnumerable` method implementation
353
- // https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable
354
- objectPropertyIsEnumerable.f = NASHORN_BUG ? function propertyIsEnumerable(V) {
355
- var descriptor = getOwnPropertyDescriptor$1(this, V);
356
- return !!descriptor && descriptor.enumerable;
357
- } : $propertyIsEnumerable;
358
-
359
- var createPropertyDescriptor$2 = function (bitmap, value) {
360
- return {
361
- enumerable: !(bitmap & 1),
362
- configurable: !(bitmap & 2),
363
- writable: !(bitmap & 4),
364
- value: value
365
- };
366
- };
367
-
368
- var FunctionPrototype$1 = Function.prototype;
369
- var bind = FunctionPrototype$1.bind;
370
- var call$3 = FunctionPrototype$1.call;
371
- var callBind = bind && bind.bind(call$3);
372
-
373
- var functionUncurryThis = bind ? function (fn) {
374
- return fn && callBind(call$3, fn);
375
- } : function (fn) {
376
- return fn && function () {
377
- return call$3.apply(fn, arguments);
378
- };
379
- };
380
-
381
- var uncurryThis$a = functionUncurryThis;
382
-
383
- var toString$4 = uncurryThis$a({}.toString);
384
- var stringSlice = uncurryThis$a(''.slice);
385
-
386
- var classofRaw$1 = function (it) {
387
- return stringSlice(toString$4(it), 8, -1);
388
- };
389
-
390
- var global$n = global$o;
391
- var uncurryThis$9 = functionUncurryThis;
392
- var fails$4 = fails$6;
393
- var classof$2 = classofRaw$1;
394
-
395
- var Object$4 = global$n.Object;
396
- var split = uncurryThis$9(''.split);
397
-
398
- // fallback for non-array-like ES3 and non-enumerable old V8 strings
399
- var indexedObject = fails$4(function () {
400
- // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
401
- // eslint-disable-next-line no-prototype-builtins -- safe
402
- return !Object$4('z').propertyIsEnumerable(0);
403
- }) ? function (it) {
404
- return classof$2(it) == 'String' ? split(it, '') : Object$4(it);
405
- } : Object$4;
406
-
407
- var global$m = global$o;
408
-
409
- var TypeError$7 = global$m.TypeError;
410
-
411
- // `RequireObjectCoercible` abstract operation
412
- // https://tc39.es/ecma262/#sec-requireobjectcoercible
413
- var requireObjectCoercible$3 = function (it) {
414
- if (it == undefined) throw TypeError$7("Can't call method on " + it);
415
- return it;
416
- };
417
-
418
- // toObject with fallback for non-array-like ES3 strings
419
- var IndexedObject = indexedObject;
420
- var requireObjectCoercible$2 = requireObjectCoercible$3;
421
-
422
- var toIndexedObject$3 = function (it) {
423
- return IndexedObject(requireObjectCoercible$2(it));
424
- };
425
-
426
- // `IsCallable` abstract operation
427
- // https://tc39.es/ecma262/#sec-iscallable
428
- var isCallable$a = function (argument) {
429
- return typeof argument == 'function';
430
- };
431
-
432
- var isCallable$9 = isCallable$a;
433
-
434
- var isObject$5 = function (it) {
435
- return typeof it == 'object' ? it !== null : isCallable$9(it);
436
- };
437
-
438
- var global$l = global$o;
439
- var isCallable$8 = isCallable$a;
440
-
441
- var aFunction = function (argument) {
442
- return isCallable$8(argument) ? argument : undefined;
443
- };
444
-
445
- var getBuiltIn$3 = function (namespace, method) {
446
- return arguments.length < 2 ? aFunction(global$l[namespace]) : global$l[namespace] && global$l[namespace][method];
447
- };
448
-
449
- var uncurryThis$8 = functionUncurryThis;
450
-
451
- var objectIsPrototypeOf = uncurryThis$8({}.isPrototypeOf);
452
-
453
- var getBuiltIn$2 = getBuiltIn$3;
454
-
455
- var engineUserAgent = getBuiltIn$2('navigator', 'userAgent') || '';
456
-
457
- var global$k = global$o;
458
- var userAgent = engineUserAgent;
459
-
460
- var process = global$k.process;
461
- var Deno = global$k.Deno;
462
- var versions = process && process.versions || Deno && Deno.version;
463
- var v8 = versions && versions.v8;
464
- var match, version;
465
-
466
- if (v8) {
467
- match = v8.split('.');
468
- // in old Chrome, versions of V8 isn't V8 = Chrome / 10
469
- // but their correct versions are not interesting for us
470
- version = match[0] > 0 && match[0] < 4 ? 1 : +(match[0] + match[1]);
471
- }
472
-
473
- // BrowserFS NodeJS `process` polyfill incorrectly set `.v8` to `0.0`
474
- // so check `userAgent` even if `.v8` exists, but 0
475
- if (!version && userAgent) {
476
- match = userAgent.match(/Edge\/(\d+)/);
477
- if (!match || match[1] >= 74) {
478
- match = userAgent.match(/Chrome\/(\d+)/);
479
- if (match) version = +match[1];
480
- }
481
- }
482
-
483
- var engineV8Version = version;
484
-
485
- /* eslint-disable es/no-symbol -- required for testing */
486
-
487
- var V8_VERSION = engineV8Version;
488
- var fails$3 = fails$6;
489
-
490
- // eslint-disable-next-line es/no-object-getownpropertysymbols -- required for testing
491
- var nativeSymbol = !!Object.getOwnPropertySymbols && !fails$3(function () {
492
- var symbol = Symbol();
493
- // Chrome 38 Symbol has incorrect toString conversion
494
- // `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances
495
- return !String(symbol) || !(Object(symbol) instanceof Symbol) ||
496
- // Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances
497
- !Symbol.sham && V8_VERSION && V8_VERSION < 41;
498
- });
499
-
500
- /* eslint-disable es/no-symbol -- required for testing */
501
-
502
- var NATIVE_SYMBOL$1 = nativeSymbol;
503
-
504
- var useSymbolAsUid = NATIVE_SYMBOL$1
505
- && !Symbol.sham
506
- && typeof Symbol.iterator == 'symbol';
507
-
508
- var global$j = global$o;
509
- var getBuiltIn$1 = getBuiltIn$3;
510
- var isCallable$7 = isCallable$a;
511
- var isPrototypeOf = objectIsPrototypeOf;
512
- var USE_SYMBOL_AS_UID$1 = useSymbolAsUid;
513
-
514
- var Object$3 = global$j.Object;
515
-
516
- var isSymbol$2 = USE_SYMBOL_AS_UID$1 ? function (it) {
517
- return typeof it == 'symbol';
518
- } : function (it) {
519
- var $Symbol = getBuiltIn$1('Symbol');
520
- return isCallable$7($Symbol) && isPrototypeOf($Symbol.prototype, Object$3(it));
521
- };
522
-
523
- var global$i = global$o;
524
-
525
- var String$3 = global$i.String;
526
-
527
- var tryToString$1 = function (argument) {
528
- try {
529
- return String$3(argument);
530
- } catch (error) {
531
- return 'Object';
532
- }
533
- };
534
-
535
- var global$h = global$o;
536
- var isCallable$6 = isCallable$a;
537
- var tryToString = tryToString$1;
538
-
539
- var TypeError$6 = global$h.TypeError;
540
-
541
- // `Assert: IsCallable(argument) is true`
542
- var aCallable$1 = function (argument) {
543
- if (isCallable$6(argument)) return argument;
544
- throw TypeError$6(tryToString(argument) + ' is not a function');
545
- };
546
-
547
- var aCallable = aCallable$1;
548
-
549
- // `GetMethod` abstract operation
550
- // https://tc39.es/ecma262/#sec-getmethod
551
- var getMethod$1 = function (V, P) {
552
- var func = V[P];
553
- return func == null ? undefined : aCallable(func);
554
- };
555
-
556
- var global$g = global$o;
557
- var call$2 = functionCall;
558
- var isCallable$5 = isCallable$a;
559
- var isObject$4 = isObject$5;
560
-
561
- var TypeError$5 = global$g.TypeError;
562
-
563
- // `OrdinaryToPrimitive` abstract operation
564
- // https://tc39.es/ecma262/#sec-ordinarytoprimitive
565
- var ordinaryToPrimitive$1 = function (input, pref) {
566
- var fn, val;
567
- if (pref === 'string' && isCallable$5(fn = input.toString) && !isObject$4(val = call$2(fn, input))) return val;
568
- if (isCallable$5(fn = input.valueOf) && !isObject$4(val = call$2(fn, input))) return val;
569
- if (pref !== 'string' && isCallable$5(fn = input.toString) && !isObject$4(val = call$2(fn, input))) return val;
570
- throw TypeError$5("Can't convert object to primitive value");
571
- };
572
-
573
- var shared$3 = {exports: {}};
574
-
575
- var global$f = global$o;
576
-
577
- // eslint-disable-next-line es/no-object-defineproperty -- safe
578
- var defineProperty = Object.defineProperty;
579
-
580
- var setGlobal$3 = function (key, value) {
581
- try {
582
- defineProperty(global$f, key, { value: value, configurable: true, writable: true });
583
- } catch (error) {
584
- global$f[key] = value;
585
- } return value;
586
- };
587
-
588
- var global$e = global$o;
589
- var setGlobal$2 = setGlobal$3;
590
-
591
- var SHARED = '__core-js_shared__';
592
- var store$3 = global$e[SHARED] || setGlobal$2(SHARED, {});
593
-
594
- var sharedStore = store$3;
595
-
596
- var store$2 = sharedStore;
597
-
598
- (shared$3.exports = function (key, value) {
599
- return store$2[key] || (store$2[key] = value !== undefined ? value : {});
600
- })('versions', []).push({
601
- version: '3.19.0',
602
- mode: 'global',
603
- copyright: '© 2021 Denis Pushkarev (zloirock.ru)'
604
- });
605
-
606
- var global$d = global$o;
607
- var requireObjectCoercible$1 = requireObjectCoercible$3;
608
-
609
- var Object$2 = global$d.Object;
610
-
611
- // `ToObject` abstract operation
612
- // https://tc39.es/ecma262/#sec-toobject
613
- var toObject$1 = function (argument) {
614
- return Object$2(requireObjectCoercible$1(argument));
615
- };
616
-
617
- var uncurryThis$7 = functionUncurryThis;
618
- var toObject = toObject$1;
619
-
620
- var hasOwnProperty = uncurryThis$7({}.hasOwnProperty);
621
-
622
- // `HasOwnProperty` abstract operation
623
- // https://tc39.es/ecma262/#sec-hasownproperty
624
- var hasOwnProperty_1 = Object.hasOwn || function hasOwn(it, key) {
625
- return hasOwnProperty(toObject(it), key);
626
- };
627
-
628
- var uncurryThis$6 = functionUncurryThis;
629
-
630
- var id = 0;
631
- var postfix = Math.random();
632
- var toString$3 = uncurryThis$6(1.0.toString);
633
-
634
- var uid$2 = function (key) {
635
- return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString$3(++id + postfix, 36);
636
- };
637
-
638
- var global$c = global$o;
639
- var shared$2 = shared$3.exports;
640
- var hasOwn$6 = hasOwnProperty_1;
641
- var uid$1 = uid$2;
642
- var NATIVE_SYMBOL = nativeSymbol;
643
- var USE_SYMBOL_AS_UID = useSymbolAsUid;
644
-
645
- var WellKnownSymbolsStore = shared$2('wks');
646
- var Symbol$2 = global$c.Symbol;
647
- var symbolFor = Symbol$2 && Symbol$2['for'];
648
- var createWellKnownSymbol = USE_SYMBOL_AS_UID ? Symbol$2 : Symbol$2 && Symbol$2.withoutSetter || uid$1;
649
-
650
- var wellKnownSymbol$3 = function (name) {
651
- if (!hasOwn$6(WellKnownSymbolsStore, name) || !(NATIVE_SYMBOL || typeof WellKnownSymbolsStore[name] == 'string')) {
652
- var description = 'Symbol.' + name;
653
- if (NATIVE_SYMBOL && hasOwn$6(Symbol$2, name)) {
654
- WellKnownSymbolsStore[name] = Symbol$2[name];
655
- } else if (USE_SYMBOL_AS_UID && symbolFor) {
656
- WellKnownSymbolsStore[name] = symbolFor(description);
657
- } else {
658
- WellKnownSymbolsStore[name] = createWellKnownSymbol(description);
659
- }
660
- } return WellKnownSymbolsStore[name];
661
- };
662
-
663
- var global$b = global$o;
664
- var call$1 = functionCall;
665
- var isObject$3 = isObject$5;
666
- var isSymbol$1 = isSymbol$2;
667
- var getMethod = getMethod$1;
668
- var ordinaryToPrimitive = ordinaryToPrimitive$1;
669
- var wellKnownSymbol$2 = wellKnownSymbol$3;
670
-
671
- var TypeError$4 = global$b.TypeError;
672
- var TO_PRIMITIVE = wellKnownSymbol$2('toPrimitive');
673
-
674
- // `ToPrimitive` abstract operation
675
- // https://tc39.es/ecma262/#sec-toprimitive
676
- var toPrimitive$1 = function (input, pref) {
677
- if (!isObject$3(input) || isSymbol$1(input)) return input;
678
- var exoticToPrim = getMethod(input, TO_PRIMITIVE);
679
- var result;
680
- if (exoticToPrim) {
681
- if (pref === undefined) pref = 'default';
682
- result = call$1(exoticToPrim, input, pref);
683
- if (!isObject$3(result) || isSymbol$1(result)) return result;
684
- throw TypeError$4("Can't convert object to primitive value");
685
- }
686
- if (pref === undefined) pref = 'number';
687
- return ordinaryToPrimitive(input, pref);
688
- };
689
-
690
- var toPrimitive = toPrimitive$1;
691
- var isSymbol = isSymbol$2;
692
-
693
- // `ToPropertyKey` abstract operation
694
- // https://tc39.es/ecma262/#sec-topropertykey
695
- var toPropertyKey$2 = function (argument) {
696
- var key = toPrimitive(argument, 'string');
697
- return isSymbol(key) ? key : key + '';
698
- };
699
-
700
- var global$a = global$o;
701
- var isObject$2 = isObject$5;
702
-
703
- var document = global$a.document;
704
- // typeof document.createElement is 'object' in old IE
705
- var EXISTS$1 = isObject$2(document) && isObject$2(document.createElement);
706
-
707
- var documentCreateElement = function (it) {
708
- return EXISTS$1 ? document.createElement(it) : {};
709
- };
710
-
711
- var DESCRIPTORS$4 = descriptors;
712
- var fails$2 = fails$6;
713
- var createElement = documentCreateElement;
714
-
715
- // Thank's IE8 for his funny defineProperty
716
- var ie8DomDefine = !DESCRIPTORS$4 && !fails$2(function () {
717
- // eslint-disable-next-line es/no-object-defineproperty -- requied for testing
718
- return Object.defineProperty(createElement('div'), 'a', {
719
- get: function () { return 7; }
720
- }).a != 7;
721
- });
722
-
723
- var DESCRIPTORS$3 = descriptors;
724
- var call = functionCall;
725
- var propertyIsEnumerableModule = objectPropertyIsEnumerable;
726
- var createPropertyDescriptor$1 = createPropertyDescriptor$2;
727
- var toIndexedObject$2 = toIndexedObject$3;
728
- var toPropertyKey$1 = toPropertyKey$2;
729
- var hasOwn$5 = hasOwnProperty_1;
730
- var IE8_DOM_DEFINE$1 = ie8DomDefine;
731
-
732
- // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
733
- var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
734
-
735
- // `Object.getOwnPropertyDescriptor` method
736
- // https://tc39.es/ecma262/#sec-object.getownpropertydescriptor
737
- objectGetOwnPropertyDescriptor.f = DESCRIPTORS$3 ? $getOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) {
738
- O = toIndexedObject$2(O);
739
- P = toPropertyKey$1(P);
740
- if (IE8_DOM_DEFINE$1) try {
741
- return $getOwnPropertyDescriptor(O, P);
742
- } catch (error) { /* empty */ }
743
- if (hasOwn$5(O, P)) return createPropertyDescriptor$1(!call(propertyIsEnumerableModule.f, O, P), O[P]);
744
- };
745
-
746
- var objectDefineProperty = {};
747
-
748
- var global$9 = global$o;
749
- var isObject$1 = isObject$5;
750
-
751
- var String$2 = global$9.String;
752
- var TypeError$3 = global$9.TypeError;
753
-
754
- // `Assert: Type(argument) is Object`
755
- var anObject$2 = function (argument) {
756
- if (isObject$1(argument)) return argument;
757
- throw TypeError$3(String$2(argument) + ' is not an object');
758
- };
759
-
760
- var global$8 = global$o;
761
- var DESCRIPTORS$2 = descriptors;
762
- var IE8_DOM_DEFINE = ie8DomDefine;
763
- var anObject$1 = anObject$2;
764
- var toPropertyKey = toPropertyKey$2;
765
-
766
- var TypeError$2 = global$8.TypeError;
767
- // eslint-disable-next-line es/no-object-defineproperty -- safe
768
- var $defineProperty = Object.defineProperty;
769
-
770
- // `Object.defineProperty` method
771
- // https://tc39.es/ecma262/#sec-object.defineproperty
772
- objectDefineProperty.f = DESCRIPTORS$2 ? $defineProperty : function defineProperty(O, P, Attributes) {
773
- anObject$1(O);
774
- P = toPropertyKey(P);
775
- anObject$1(Attributes);
776
- if (IE8_DOM_DEFINE) try {
777
- return $defineProperty(O, P, Attributes);
778
- } catch (error) { /* empty */ }
779
- if ('get' in Attributes || 'set' in Attributes) throw TypeError$2('Accessors not supported');
780
- if ('value' in Attributes) O[P] = Attributes.value;
781
- return O;
782
- };
783
-
784
- var DESCRIPTORS$1 = descriptors;
785
- var definePropertyModule$1 = objectDefineProperty;
786
- var createPropertyDescriptor = createPropertyDescriptor$2;
787
-
788
- var createNonEnumerableProperty$3 = DESCRIPTORS$1 ? function (object, key, value) {
789
- return definePropertyModule$1.f(object, key, createPropertyDescriptor(1, value));
790
- } : function (object, key, value) {
791
- object[key] = value;
792
- return object;
793
- };
794
-
795
- var redefine$1 = {exports: {}};
796
-
797
- var uncurryThis$5 = functionUncurryThis;
798
- var isCallable$4 = isCallable$a;
799
- var store$1 = sharedStore;
800
-
801
- var functionToString = uncurryThis$5(Function.toString);
802
-
803
- // this helper broken in `core-js@3.4.1-3.4.4`, so we can't use `shared` helper
804
- if (!isCallable$4(store$1.inspectSource)) {
805
- store$1.inspectSource = function (it) {
806
- return functionToString(it);
807
- };
808
- }
809
-
810
- var inspectSource$2 = store$1.inspectSource;
811
-
812
- var global$7 = global$o;
813
- var isCallable$3 = isCallable$a;
814
- var inspectSource$1 = inspectSource$2;
815
-
816
- var WeakMap$1 = global$7.WeakMap;
817
-
818
- var nativeWeakMap = isCallable$3(WeakMap$1) && /native code/.test(inspectSource$1(WeakMap$1));
819
-
820
- var shared$1 = shared$3.exports;
821
- var uid = uid$2;
822
-
823
- var keys = shared$1('keys');
824
-
825
- var sharedKey$1 = function (key) {
826
- return keys[key] || (keys[key] = uid(key));
827
- };
828
-
829
- var hiddenKeys$3 = {};
830
-
831
- var NATIVE_WEAK_MAP = nativeWeakMap;
832
- var global$6 = global$o;
833
- var uncurryThis$4 = functionUncurryThis;
834
- var isObject = isObject$5;
835
- var createNonEnumerableProperty$2 = createNonEnumerableProperty$3;
836
- var hasOwn$4 = hasOwnProperty_1;
837
- var shared = sharedStore;
838
- var sharedKey = sharedKey$1;
839
- var hiddenKeys$2 = hiddenKeys$3;
840
-
841
- var OBJECT_ALREADY_INITIALIZED = 'Object already initialized';
842
- var TypeError$1 = global$6.TypeError;
843
- var WeakMap = global$6.WeakMap;
844
- var set, get, has;
845
-
846
- var enforce = function (it) {
847
- return has(it) ? get(it) : set(it, {});
848
- };
849
-
850
- var getterFor = function (TYPE) {
851
- return function (it) {
852
- var state;
853
- if (!isObject(it) || (state = get(it)).type !== TYPE) {
854
- throw TypeError$1('Incompatible receiver, ' + TYPE + ' required');
855
- } return state;
856
- };
857
- };
858
-
859
- if (NATIVE_WEAK_MAP || shared.state) {
860
- var store = shared.state || (shared.state = new WeakMap());
861
- var wmget = uncurryThis$4(store.get);
862
- var wmhas = uncurryThis$4(store.has);
863
- var wmset = uncurryThis$4(store.set);
864
- set = function (it, metadata) {
865
- if (wmhas(store, it)) throw new TypeError$1(OBJECT_ALREADY_INITIALIZED);
866
- metadata.facade = it;
867
- wmset(store, it, metadata);
868
- return metadata;
869
- };
870
- get = function (it) {
871
- return wmget(store, it) || {};
872
- };
873
- has = function (it) {
874
- return wmhas(store, it);
875
- };
876
- } else {
877
- var STATE = sharedKey('state');
878
- hiddenKeys$2[STATE] = true;
879
- set = function (it, metadata) {
880
- if (hasOwn$4(it, STATE)) throw new TypeError$1(OBJECT_ALREADY_INITIALIZED);
881
- metadata.facade = it;
882
- createNonEnumerableProperty$2(it, STATE, metadata);
883
- return metadata;
884
- };
885
- get = function (it) {
886
- return hasOwn$4(it, STATE) ? it[STATE] : {};
887
- };
888
- has = function (it) {
889
- return hasOwn$4(it, STATE);
890
- };
891
- }
892
-
893
- var internalState = {
894
- set: set,
895
- get: get,
896
- has: has,
897
- enforce: enforce,
898
- getterFor: getterFor
899
- };
900
-
901
- var DESCRIPTORS = descriptors;
902
- var hasOwn$3 = hasOwnProperty_1;
903
-
904
- var FunctionPrototype = Function.prototype;
905
- // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
906
- var getDescriptor = DESCRIPTORS && Object.getOwnPropertyDescriptor;
907
-
908
- var EXISTS = hasOwn$3(FunctionPrototype, 'name');
909
- // additional protection from minified / mangled / dropped function names
910
- var PROPER = EXISTS && (function something() { /* empty */ }).name === 'something';
911
- var CONFIGURABLE = EXISTS && (!DESCRIPTORS || (DESCRIPTORS && getDescriptor(FunctionPrototype, 'name').configurable));
912
-
913
- var functionName = {
914
- EXISTS: EXISTS,
915
- PROPER: PROPER,
916
- CONFIGURABLE: CONFIGURABLE
917
- };
918
-
919
- var global$5 = global$o;
920
- var isCallable$2 = isCallable$a;
921
- var hasOwn$2 = hasOwnProperty_1;
922
- var createNonEnumerableProperty$1 = createNonEnumerableProperty$3;
923
- var setGlobal$1 = setGlobal$3;
924
- var inspectSource = inspectSource$2;
925
- var InternalStateModule = internalState;
926
- var CONFIGURABLE_FUNCTION_NAME = functionName.CONFIGURABLE;
927
-
928
- var getInternalState = InternalStateModule.get;
929
- var enforceInternalState = InternalStateModule.enforce;
930
- var TEMPLATE = String(String).split('String');
931
-
932
- (redefine$1.exports = function (O, key, value, options) {
933
- var unsafe = options ? !!options.unsafe : false;
934
- var simple = options ? !!options.enumerable : false;
935
- var noTargetGet = options ? !!options.noTargetGet : false;
936
- var name = options && options.name !== undefined ? options.name : key;
937
- var state;
938
- if (isCallable$2(value)) {
939
- if (String(name).slice(0, 7) === 'Symbol(') {
940
- name = '[' + String(name).replace(/^Symbol\(([^)]*)\)/, '$1') + ']';
941
- }
942
- if (!hasOwn$2(value, 'name') || (CONFIGURABLE_FUNCTION_NAME && value.name !== name)) {
943
- createNonEnumerableProperty$1(value, 'name', name);
944
- }
945
- state = enforceInternalState(value);
946
- if (!state.source) {
947
- state.source = TEMPLATE.join(typeof name == 'string' ? name : '');
948
- }
949
- }
950
- if (O === global$5) {
951
- if (simple) O[key] = value;
952
- else setGlobal$1(key, value);
953
- return;
954
- } else if (!unsafe) {
955
- delete O[key];
956
- } else if (!noTargetGet && O[key]) {
957
- simple = true;
958
- }
959
- if (simple) O[key] = value;
960
- else createNonEnumerableProperty$1(O, key, value);
961
- // add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
962
- })(Function.prototype, 'toString', function toString() {
963
- return isCallable$2(this) && getInternalState(this).source || inspectSource(this);
964
- });
965
-
966
- var objectGetOwnPropertyNames = {};
967
-
968
- var ceil = Math.ceil;
969
- var floor = Math.floor;
970
-
971
- // `ToIntegerOrInfinity` abstract operation
972
- // https://tc39.es/ecma262/#sec-tointegerorinfinity
973
- var toIntegerOrInfinity$2 = function (argument) {
974
- var number = +argument;
975
- // eslint-disable-next-line no-self-compare -- safe
976
- return number !== number || number === 0 ? 0 : (number > 0 ? floor : ceil)(number);
977
- };
978
-
979
- var toIntegerOrInfinity$1 = toIntegerOrInfinity$2;
980
-
981
- var max = Math.max;
982
- var min$1 = Math.min;
983
-
984
- // Helper for a popular repeating case of the spec:
985
- // Let integer be ? ToInteger(index).
986
- // If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).
987
- var toAbsoluteIndex$1 = function (index, length) {
988
- var integer = toIntegerOrInfinity$1(index);
989
- return integer < 0 ? max(integer + length, 0) : min$1(integer, length);
990
- };
991
-
992
- var toIntegerOrInfinity = toIntegerOrInfinity$2;
993
-
994
- var min = Math.min;
995
-
996
- // `ToLength` abstract operation
997
- // https://tc39.es/ecma262/#sec-tolength
998
- var toLength$1 = function (argument) {
999
- return argument > 0 ? min(toIntegerOrInfinity(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
1000
- };
1001
-
1002
- var toLength = toLength$1;
1003
-
1004
- // `LengthOfArrayLike` abstract operation
1005
- // https://tc39.es/ecma262/#sec-lengthofarraylike
1006
- var lengthOfArrayLike$1 = function (obj) {
1007
- return toLength(obj.length);
1008
- };
1009
-
1010
- var toIndexedObject$1 = toIndexedObject$3;
1011
- var toAbsoluteIndex = toAbsoluteIndex$1;
1012
- var lengthOfArrayLike = lengthOfArrayLike$1;
1013
-
1014
- // `Array.prototype.{ indexOf, includes }` methods implementation
1015
- var createMethod$1 = function (IS_INCLUDES) {
1016
- return function ($this, el, fromIndex) {
1017
- var O = toIndexedObject$1($this);
1018
- var length = lengthOfArrayLike(O);
1019
- var index = toAbsoluteIndex(fromIndex, length);
1020
- var value;
1021
- // Array#includes uses SameValueZero equality algorithm
1022
- // eslint-disable-next-line no-self-compare -- NaN check
1023
- if (IS_INCLUDES && el != el) while (length > index) {
1024
- value = O[index++];
1025
- // eslint-disable-next-line no-self-compare -- NaN check
1026
- if (value != value) return true;
1027
- // Array#indexOf ignores holes, Array#includes - not
1028
- } else for (;length > index; index++) {
1029
- if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0;
1030
- } return !IS_INCLUDES && -1;
1031
- };
1032
- };
1033
-
1034
- var arrayIncludes = {
1035
- // `Array.prototype.includes` method
1036
- // https://tc39.es/ecma262/#sec-array.prototype.includes
1037
- includes: createMethod$1(true),
1038
- // `Array.prototype.indexOf` method
1039
- // https://tc39.es/ecma262/#sec-array.prototype.indexof
1040
- indexOf: createMethod$1(false)
1041
- };
1042
-
1043
- var uncurryThis$3 = functionUncurryThis;
1044
- var hasOwn$1 = hasOwnProperty_1;
1045
- var toIndexedObject = toIndexedObject$3;
1046
- var indexOf = arrayIncludes.indexOf;
1047
- var hiddenKeys$1 = hiddenKeys$3;
1048
-
1049
- var push = uncurryThis$3([].push);
1050
-
1051
- var objectKeysInternal = function (object, names) {
1052
- var O = toIndexedObject(object);
1053
- var i = 0;
1054
- var result = [];
1055
- var key;
1056
- for (key in O) !hasOwn$1(hiddenKeys$1, key) && hasOwn$1(O, key) && push(result, key);
1057
- // Don't enum bug & hidden keys
1058
- while (names.length > i) if (hasOwn$1(O, key = names[i++])) {
1059
- ~indexOf(result, key) || push(result, key);
1060
- }
1061
- return result;
1062
- };
1063
-
1064
- // IE8- don't enum bug keys
1065
- var enumBugKeys$1 = [
1066
- 'constructor',
1067
- 'hasOwnProperty',
1068
- 'isPrototypeOf',
1069
- 'propertyIsEnumerable',
1070
- 'toLocaleString',
1071
- 'toString',
1072
- 'valueOf'
1073
- ];
1074
-
1075
- var internalObjectKeys = objectKeysInternal;
1076
- var enumBugKeys = enumBugKeys$1;
1077
-
1078
- var hiddenKeys = enumBugKeys.concat('length', 'prototype');
1079
-
1080
- // `Object.getOwnPropertyNames` method
1081
- // https://tc39.es/ecma262/#sec-object.getownpropertynames
1082
- // eslint-disable-next-line es/no-object-getownpropertynames -- safe
1083
- objectGetOwnPropertyNames.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
1084
- return internalObjectKeys(O, hiddenKeys);
1085
- };
1086
-
1087
- var objectGetOwnPropertySymbols = {};
1088
-
1089
- // eslint-disable-next-line es/no-object-getownpropertysymbols -- safe
1090
- objectGetOwnPropertySymbols.f = Object.getOwnPropertySymbols;
1091
-
1092
- var getBuiltIn = getBuiltIn$3;
1093
- var uncurryThis$2 = functionUncurryThis;
1094
- var getOwnPropertyNamesModule = objectGetOwnPropertyNames;
1095
- var getOwnPropertySymbolsModule = objectGetOwnPropertySymbols;
1096
- var anObject = anObject$2;
1097
-
1098
- var concat = uncurryThis$2([].concat);
1099
-
1100
- // all object keys, includes non-enumerable and symbols
1101
- var ownKeys$1 = getBuiltIn('Reflect', 'ownKeys') || function ownKeys(it) {
1102
- var keys = getOwnPropertyNamesModule.f(anObject(it));
1103
- var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;
1104
- return getOwnPropertySymbols ? concat(keys, getOwnPropertySymbols(it)) : keys;
1105
- };
1106
-
1107
- var hasOwn = hasOwnProperty_1;
1108
- var ownKeys = ownKeys$1;
1109
- var getOwnPropertyDescriptorModule = objectGetOwnPropertyDescriptor;
1110
- var definePropertyModule = objectDefineProperty;
1111
-
1112
- var copyConstructorProperties$1 = function (target, source) {
1113
- var keys = ownKeys(source);
1114
- var defineProperty = definePropertyModule.f;
1115
- var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;
1116
- for (var i = 0; i < keys.length; i++) {
1117
- var key = keys[i];
1118
- if (!hasOwn(target, key)) defineProperty(target, key, getOwnPropertyDescriptor(source, key));
1119
- }
1120
- };
1121
-
1122
- var fails$1 = fails$6;
1123
- var isCallable$1 = isCallable$a;
1124
-
1125
- var replacement = /#|\.prototype\./;
1126
-
1127
- var isForced$1 = function (feature, detection) {
1128
- var value = data[normalize(feature)];
1129
- return value == POLYFILL ? true
1130
- : value == NATIVE ? false
1131
- : isCallable$1(detection) ? fails$1(detection)
1132
- : !!detection;
1133
- };
1134
-
1135
- var normalize = isForced$1.normalize = function (string) {
1136
- return String(string).replace(replacement, '.').toLowerCase();
1137
- };
1138
-
1139
- var data = isForced$1.data = {};
1140
- var NATIVE = isForced$1.NATIVE = 'N';
1141
- var POLYFILL = isForced$1.POLYFILL = 'P';
1142
-
1143
- var isForced_1 = isForced$1;
1144
-
1145
- var global$4 = global$o;
1146
- var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f;
1147
- var createNonEnumerableProperty = createNonEnumerableProperty$3;
1148
- var redefine = redefine$1.exports;
1149
- var setGlobal = setGlobal$3;
1150
- var copyConstructorProperties = copyConstructorProperties$1;
1151
- var isForced = isForced_1;
1152
-
1153
- /*
1154
- options.target - name of the target object
1155
- options.global - target is the global object
1156
- options.stat - export as static methods of target
1157
- options.proto - export as prototype methods of target
1158
- options.real - real prototype method for the `pure` version
1159
- options.forced - export even if the native feature is available
1160
- options.bind - bind methods to the target, required for the `pure` version
1161
- options.wrap - wrap constructors to preventing global pollution, required for the `pure` version
1162
- options.unsafe - use the simple assignment of property instead of delete + defineProperty
1163
- options.sham - add a flag to not completely full polyfills
1164
- options.enumerable - export as enumerable property
1165
- options.noTargetGet - prevent calling a getter on target
1166
- options.name - the .name of the function if it does not match the key
1167
- */
1168
- var _export = function (options, source) {
1169
- var TARGET = options.target;
1170
- var GLOBAL = options.global;
1171
- var STATIC = options.stat;
1172
- var FORCED, target, key, targetProperty, sourceProperty, descriptor;
1173
- if (GLOBAL) {
1174
- target = global$4;
1175
- } else if (STATIC) {
1176
- target = global$4[TARGET] || setGlobal(TARGET, {});
1177
- } else {
1178
- target = (global$4[TARGET] || {}).prototype;
1179
- }
1180
- if (target) for (key in source) {
1181
- sourceProperty = source[key];
1182
- if (options.noTargetGet) {
1183
- descriptor = getOwnPropertyDescriptor(target, key);
1184
- targetProperty = descriptor && descriptor.value;
1185
- } else targetProperty = target[key];
1186
- FORCED = isForced(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);
1187
- // contained in target
1188
- if (!FORCED && targetProperty !== undefined) {
1189
- if (typeof sourceProperty == typeof targetProperty) continue;
1190
- copyConstructorProperties(sourceProperty, targetProperty);
1191
- }
1192
- // add a flag to not completely full polyfills
1193
- if (options.sham || (targetProperty && targetProperty.sham)) {
1194
- createNonEnumerableProperty(sourceProperty, 'sham', true);
1195
- }
1196
- // extend global
1197
- redefine(target, key, sourceProperty, options);
1198
- }
1199
- };
1200
-
1201
- var wellKnownSymbol$1 = wellKnownSymbol$3;
1202
-
1203
- var TO_STRING_TAG$1 = wellKnownSymbol$1('toStringTag');
1204
- var test = {};
1205
-
1206
- test[TO_STRING_TAG$1] = 'z';
1207
-
1208
- var toStringTagSupport = String(test) === '[object z]';
1209
-
1210
- var global$3 = global$o;
1211
- var TO_STRING_TAG_SUPPORT = toStringTagSupport;
1212
- var isCallable = isCallable$a;
1213
- var classofRaw = classofRaw$1;
1214
- var wellKnownSymbol = wellKnownSymbol$3;
1215
-
1216
- var TO_STRING_TAG = wellKnownSymbol('toStringTag');
1217
- var Object$1 = global$3.Object;
1218
-
1219
- // ES3 wrong here
1220
- var CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) == 'Arguments';
1221
-
1222
- // fallback for IE11 Script Access Denied error
1223
- var tryGet = function (it, key) {
1224
- try {
1225
- return it[key];
1226
- } catch (error) { /* empty */ }
1227
- };
1228
-
1229
- // getting tag from ES6+ `Object.prototype.toString`
1230
- var classof$1 = TO_STRING_TAG_SUPPORT ? classofRaw : function (it) {
1231
- var O, tag, result;
1232
- return it === undefined ? 'Undefined' : it === null ? 'Null'
1233
- // @@toStringTag case
1234
- : typeof (tag = tryGet(O = Object$1(it), TO_STRING_TAG)) == 'string' ? tag
1235
- // builtinTag case
1236
- : CORRECT_ARGUMENTS ? classofRaw(O)
1237
- // ES3 arguments fallback
1238
- : (result = classofRaw(O)) == 'Object' && isCallable(O.callee) ? 'Arguments' : result;
1239
- };
1240
-
1241
- var global$2 = global$o;
1242
- var classof = classof$1;
1243
-
1244
- var String$1 = global$2.String;
1245
-
1246
- var toString$2 = function (argument) {
1247
- if (classof(argument) === 'Symbol') throw TypeError('Cannot convert a Symbol value to a string');
1248
- return String$1(argument);
1249
- };
1250
-
1251
- // a string of all valid unicode whitespaces
1252
- var whitespaces$2 = '\u0009\u000A\u000B\u000C\u000D\u0020\u00A0\u1680\u2000\u2001\u2002' +
1253
- '\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF';
1254
-
1255
- var uncurryThis$1 = functionUncurryThis;
1256
- var requireObjectCoercible = requireObjectCoercible$3;
1257
- var toString$1 = toString$2;
1258
- var whitespaces$1 = whitespaces$2;
1259
-
1260
- var replace = uncurryThis$1(''.replace);
1261
- var whitespace = '[' + whitespaces$1 + ']';
1262
- var ltrim = RegExp('^' + whitespace + whitespace + '*');
1263
- var rtrim = RegExp(whitespace + whitespace + '*$');
1264
-
1265
- // `String.prototype.{ trim, trimStart, trimEnd, trimLeft, trimRight }` methods implementation
1266
- var createMethod = function (TYPE) {
1267
- return function ($this) {
1268
- var string = toString$1(requireObjectCoercible($this));
1269
- if (TYPE & 1) string = replace(string, ltrim, '');
1270
- if (TYPE & 2) string = replace(string, rtrim, '');
1271
- return string;
1272
- };
1273
- };
1274
-
1275
- var stringTrim = {
1276
- // `String.prototype.{ trimLeft, trimStart }` methods
1277
- // https://tc39.es/ecma262/#sec-string.prototype.trimstart
1278
- start: createMethod(1),
1279
- // `String.prototype.{ trimRight, trimEnd }` methods
1280
- // https://tc39.es/ecma262/#sec-string.prototype.trimend
1281
- end: createMethod(2),
1282
- // `String.prototype.trim` method
1283
- // https://tc39.es/ecma262/#sec-string.prototype.trim
1284
- trim: createMethod(3)
1285
- };
1286
-
1287
- var global$1 = global$o;
1288
- var fails = fails$6;
1289
- var uncurryThis = functionUncurryThis;
1290
- var toString = toString$2;
1291
- var trim = stringTrim.trim;
1292
- var whitespaces = whitespaces$2;
1293
-
1294
- var $parseInt$1 = global$1.parseInt;
1295
- var Symbol$1 = global$1.Symbol;
1296
- var ITERATOR = Symbol$1 && Symbol$1.iterator;
1297
- var hex = /^[+-]?0x/i;
1298
- var exec = uncurryThis(hex.exec);
1299
- var FORCED = $parseInt$1(whitespaces + '08') !== 8 || $parseInt$1(whitespaces + '0x16') !== 22
1300
- // MS Edge 18- broken with boxed symbols
1301
- || (ITERATOR && !fails(function () { $parseInt$1(Object(ITERATOR)); }));
1302
-
1303
- // `parseInt` method
1304
- // https://tc39.es/ecma262/#sec-parseint-string-radix
1305
- var numberParseInt = FORCED ? function parseInt(string, radix) {
1306
- var S = trim(toString(string));
1307
- return $parseInt$1(S, (radix >>> 0) || (exec(hex, S) ? 16 : 10));
1308
- } : $parseInt$1;
1309
-
1310
- var $ = _export;
1311
- var $parseInt = numberParseInt;
1312
-
1313
- // `parseInt` method
1314
- // https://tc39.es/ecma262/#sec-parseint-string-radix
1315
- $({ global: true, forced: parseInt != $parseInt }, {
1316
- parseInt: $parseInt
1317
- });
1318
-
1319
- var useInput = function useInput(props, evaluator, notify) {
1320
- var id = react.useMemo(function () {
1321
- return props.id || extract.randomId();
1322
- }, [props.id]);
1323
- var ref = react.useRef(null);
1324
-
1325
- var _a = react.useState(props.value),
1326
- value = _a[0],
1327
- setValue = _a[1];
1328
-
1329
- var _b = react.useState(props.checked),
1330
- checked = _b[0],
1331
- setChecked = _b[1];
1332
-
1333
- react.useEffect(function () {
1334
- if (ref.current && ref.current.form) {
1335
- var resetListener_1 = function resetListener_1() {
1336
- setValue(props.value);
1337
- setChecked(props.checked);
1338
- };
1339
-
1340
- var form_1 = ref.current.form;
1341
- form_1.addEventListener('reset', resetListener_1);
1342
- return function () {
1343
- return form_1.removeEventListener('reset', resetListener_1);
1344
- };
1345
- } else {
1346
- // eslint-disable-next-line @typescript-eslint/no-empty-function
1347
- return function () {};
1348
- }
1349
- }, [props]);
1350
-
1351
- var onChange = function onChange(event) {
1352
- setValue(event.target.value);
1353
- setChecked(event.target.checked);
1354
- if (notify) notify(evaluator(event.target));
1355
- };
1356
-
1357
- return __assign(__assign({}, props), {
1358
- id: id,
1359
- ref: ref,
1360
- value: value,
1361
- checked: checked,
1362
- onChange: onChange
1363
- });
1364
- };
1365
-
1366
- var RenderInput = function RenderInput(type, props, evaluator, label, info, listener) {
1367
- var _a = useInput(props, evaluator, listener),
1368
- value = _a.value,
1369
- inputProps = __rest(_a, ["value"]);
1370
-
1371
- var propsWithDescription = info ? __assign(__assign({}, inputProps), {
1372
- 'aria-describedby': inputProps.id + "_info"
1373
- }) : inputProps;
1374
- return jsxRuntime.jsxs("div", __assign({
1375
- className: "form-field"
1376
- }, {
1377
- children: [label && jsxRuntime.jsx("label", __assign({
1378
- htmlFor: inputProps.id
1379
- }, {
1380
- children: label
1381
- }), void 0), info && jsxRuntime.jsx("span", __assign({
1382
- className: "form-info",
1383
- id: "{inputProps.id}_info"
1384
- }, {
1385
- children: info
1386
- }), void 0), jsxRuntime.jsx("input", __assign({
1387
- type: type,
1388
- value: value
1389
- }, propsWithDescription), void 0)]
1390
- }), void 0);
1391
- };
1392
-
1393
- var TextInput = function TextInput(_a) {
1394
- var label = _a.label,
1395
- info = _a.info,
1396
- onChangeText = _a.onChangeText,
1397
- props = __rest(_a, ["label", "info", "onChangeText"]);
1398
-
1399
- return RenderInput('text', props, function (e) {
1400
- return e.value;
1401
- }, label, info, onChangeText);
1402
- };
1403
- var EmailInput = function EmailInput(_a) {
1404
- var label = _a.label,
1405
- info = _a.info,
1406
- onChangeText = _a.onChangeText,
1407
- props = __rest(_a, ["label", "info", "onChangeText"]);
1408
-
1409
- return RenderInput('email', props, function (e) {
1410
- return e.value;
1411
- }, label, info, onChangeText);
1412
- };
1413
- var NumberInput = function NumberInput(_a) {
1414
- var label = _a.label,
1415
- info = _a.info,
1416
- onChangeText = _a.onChangeText,
1417
- props = __rest(_a, ["label", "info", "onChangeText"]);
1418
-
1419
- return RenderInput('number', props, function (e) {
1420
- return e.value.length ? parseInt(e.value, 10) : undefined;
1421
- }, label, info, onChangeText);
1422
- };
1423
- var Checkbox = function Checkbox(_a) {
1424
- var label = _a.label,
1425
- onChecked = _a.onChecked,
1426
- props = __rest(_a, ["label", "onChecked"]);
1427
-
1428
- var inputProps = useInput(props, function (e) {
1429
- return e.checked;
1430
- }, onChecked);
1431
- return jsxRuntime.jsxs("label", __assign({
1432
- htmlFor: inputProps.id,
1433
- className: "form-control"
1434
- }, {
1435
- children: [label, jsxRuntime.jsx("input", __assign({
1436
- type: "checkbox"
1437
- }, inputProps), void 0), jsxRuntime.jsx("span", {}, void 0)]
1438
- }), void 0);
1439
- };
1440
-
1441
- exports.Alert = Alert;
1442
- exports.Button = Button;
1443
- exports.ButtonGroup = ButtonGroup;
1444
- exports.Card = Card;
1445
- exports.Checkbox = Checkbox;
1446
- exports.EmailInput = EmailInput;
1447
- exports.Flexbox = Flexbox;
1448
- exports.Form = Form;
1449
- exports.Group = Group;
1450
- exports.Modal = Modal;
1451
- exports.NumberInput = NumberInput;
1452
- exports.TextInput = TextInput;
1453
-
1454
- Object.defineProperty(exports, '__esModule', { value: true });
1455
-
1456
- }));