pge-front-common 2.0.0 → 3.0.0

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 (92) hide show
  1. package/README.md +1 -1
  2. package/lib/components/Button/Button.d.ts +7 -27
  3. package/lib/components/Button/Button.stories.d.ts +4 -19
  4. package/lib/components/Button/styles.d.ts +3 -0
  5. package/lib/components/Input/Input.stories.d.ts +8 -0
  6. package/lib/components/Input/index.d.ts +4 -0
  7. package/lib/components/Input/index.types.d.ts +11 -0
  8. package/lib/components/Input/styles.d.ts +15 -0
  9. package/lib/components/Modal/Modal.d.ts +8 -0
  10. package/lib/components/Modal/Modal.stories.d.ts +31 -0
  11. package/lib/components/Modal/ModalConfirm/ModalConfirm.stories.d.ts +17 -0
  12. package/lib/components/Modal/ModalConfirm/index.d.ts +8 -0
  13. package/lib/components/Modal/ModalConfirm/styles.d.ts +1 -0
  14. package/lib/components/Modal/styles.d.ts +8 -0
  15. package/lib/components/Select/Select.stories.d.ts +8 -0
  16. package/lib/components/Select/index.d.ts +4 -0
  17. package/lib/components/Select/index.types.d.ts +22 -0
  18. package/lib/components/Select/styles.d.ts +25 -0
  19. package/lib/components/theme.d.ts +3 -0
  20. package/lib/icons/add-cell-icon.d.ts +2 -0
  21. package/lib/icons/add-icon.d.ts +2 -0
  22. package/lib/icons/arrow-expland-icon.d.ts +2 -0
  23. package/lib/icons/arrow-to-recall-icon.d.ts +2 -0
  24. package/lib/icons/calendar-icon.d.ts +2 -0
  25. package/lib/icons/check-circle-icon.d.ts +2 -0
  26. package/lib/icons/circle-expland-icon.d.ts +2 -0
  27. package/lib/icons/circle-to-recall-icon.d.ts +2 -0
  28. package/lib/icons/close-icon.d.ts +2 -0
  29. package/lib/icons/delete-icon.d.ts +2 -0
  30. package/lib/icons/download-icon.d.ts +2 -0
  31. package/lib/icons/edit-icon.d.ts +2 -0
  32. package/lib/icons/event-avaliable-icon.d.ts +2 -0
  33. package/lib/icons/icons.stories.d.ts +5 -0
  34. package/{src/icons/index.ts → lib/icons/index.d.ts} +24 -49
  35. package/lib/icons/logout-icon.d.ts +2 -0
  36. package/lib/icons/new-tab-icon.d.ts +2 -0
  37. package/lib/icons/pdf-icon.d.ts +2 -0
  38. package/lib/icons/profile-icon.d.ts +2 -0
  39. package/lib/icons/remove-icon.d.ts +2 -0
  40. package/lib/icons/swap-icon.d.ts +2 -0
  41. package/lib/icons/triangle-expand-icon.d.ts +2 -0
  42. package/lib/icons/triangle-to-recall-icon.d.ts +2 -0
  43. package/lib/icons/upload-icon.d.ts +2 -0
  44. package/lib/icons/visibillity-icon.d.ts +2 -0
  45. package/lib/icons/warning-icon.d.ts +2 -0
  46. package/lib/index.d.ts +62 -28
  47. package/lib/index.esm.js +3138 -28
  48. package/lib/index.esm.js.map +1 -1
  49. package/lib/index.js +3178 -26
  50. package/lib/index.js.map +1 -1
  51. package/package.json +9 -3
  52. package/.storybook/main.ts +0 -22
  53. package/.storybook/preview.ts +0 -25
  54. package/rollup.config.mjs +0 -46
  55. package/src/components/Button/Button.stories.tsx +0 -50
  56. package/src/components/Button/Button.tsx +0 -28
  57. package/src/components/Button/styles.tsx +0 -39
  58. package/src/components/Modal/Modal.stories.tsx +0 -62
  59. package/src/components/Modal/Modal.tsx +0 -42
  60. package/src/components/Modal/ModalConfirm/ModalConfirm.stories.tsx +0 -48
  61. package/src/components/Modal/ModalConfirm/index.tsx +0 -32
  62. package/src/components/Modal/ModalConfirm/styles.tsx +0 -9
  63. package/src/components/Modal/styles.tsx +0 -75
  64. package/src/components/theme.ts +0 -24
  65. package/src/icons/add-cell-icon.tsx +0 -17
  66. package/src/icons/add-icon.tsx +0 -17
  67. package/src/icons/arrow-expland-icon.tsx +0 -17
  68. package/src/icons/arrow-to-recall-icon.tsx +0 -17
  69. package/src/icons/calendar-icon.tsx +0 -17
  70. package/src/icons/check-circle-icon.tsx +0 -17
  71. package/src/icons/circle-expland-icon.tsx +0 -17
  72. package/src/icons/circle-to-recall-icon.tsx +0 -17
  73. package/src/icons/close-icon.tsx +0 -17
  74. package/src/icons/delete-icon.tsx +0 -17
  75. package/src/icons/download-icon.tsx +0 -17
  76. package/src/icons/edit-icon.tsx +0 -17
  77. package/src/icons/event-avaliable-icon.tsx +0 -17
  78. package/src/icons/icons.stories.tsx +0 -92
  79. package/src/icons/logout-icon.tsx +0 -17
  80. package/src/icons/new-tab-icon.tsx +0 -17
  81. package/src/icons/pdf-icon.tsx +0 -17
  82. package/src/icons/profile-icon.tsx +0 -17
  83. package/src/icons/remove-icon.tsx +0 -14
  84. package/src/icons/swap-icon.tsx +0 -17
  85. package/src/icons/triangle-expand-icon.tsx +0 -14
  86. package/src/icons/triangle-to-recall-icon.tsx +0 -14
  87. package/src/icons/upload-icon.tsx +0 -17
  88. package/src/icons/visibillity-icon.tsx +0 -17
  89. package/src/icons/warning-icon.tsx +0 -17
  90. package/src/index.ts +0 -56
  91. package/src/styled-components.d.ts +0 -25
  92. package/tsconfig.json +0 -23
package/lib/index.js CHANGED
@@ -1,6 +1,28 @@
1
1
  'use strict';
2
2
 
3
3
  var React = require('react');
4
+ var jsxRuntime = require('react/jsx-runtime');
5
+ var ReactDOM = require('react-dom');
6
+
7
+ function _interopNamespaceDefault(e) {
8
+ var n = Object.create(null);
9
+ if (e) {
10
+ Object.keys(e).forEach(function (k) {
11
+ if (k !== 'default') {
12
+ var d = Object.getOwnPropertyDescriptor(e, k);
13
+ Object.defineProperty(n, k, d.get ? d : {
14
+ enumerable: true,
15
+ get: function () { return e[k]; }
16
+ });
17
+ }
18
+ });
19
+ }
20
+ n.default = e;
21
+ return Object.freeze(n);
22
+ }
23
+
24
+ var React__namespace = /*#__PURE__*/_interopNamespaceDefault(React);
25
+ var ReactDOM__namespace = /*#__PURE__*/_interopNamespaceDefault(ReactDOM);
4
26
 
5
27
  /*! *****************************************************************************
6
28
  Copyright (c) Microsoft Corporation.
@@ -40,48 +62,3178 @@ function __rest(s, e) {
40
62
  t[p[i]] = s[p[i]];
41
63
  }
42
64
  return t;
65
+ }
66
+
67
+ function __spreadArray(to, from, pack) {
68
+ if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
69
+ if (ar || !(i in from)) {
70
+ if (!ar) ar = Array.prototype.slice.call(from, 0, i);
71
+ ar[i] = from[i];
72
+ }
73
+ }
74
+ return to.concat(ar || Array.prototype.slice.call(from));
75
+ }
76
+
77
+ function __makeTemplateObject(cooked, raw) {
78
+ if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
79
+ return cooked;
43
80
  }
44
81
 
45
- function styleInject(css, ref) {
46
- if ( ref === void 0 ) ref = {};
47
- var insertAt = ref.insertAt;
82
+ function memoize(fn) {
83
+ var cache = Object.create(null);
84
+ return function (arg) {
85
+ if (cache[arg] === undefined) cache[arg] = fn(arg);
86
+ return cache[arg];
87
+ };
88
+ }
48
89
 
49
- if (typeof document === 'undefined') { return; }
90
+ var reactPropsRegex = /^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/; // https://esbench.com/bench/5bfee68a4cd7e6009ef61d23
50
91
 
51
- var head = document.head || document.getElementsByTagName('head')[0];
52
- var style = document.createElement('style');
53
- style.type = 'text/css';
92
+ var isPropValid = /* #__PURE__ */memoize(function (prop) {
93
+ return reactPropsRegex.test(prop) || prop.charCodeAt(0) === 111
94
+ /* o */
95
+ && prop.charCodeAt(1) === 110
96
+ /* n */
97
+ && prop.charCodeAt(2) < 91;
98
+ }
99
+ /* Z+1 */
100
+ );
54
101
 
55
- if (insertAt === 'top') {
56
- if (head.firstChild) {
57
- head.insertBefore(style, head.firstChild);
58
- } else {
59
- head.appendChild(style);
102
+ var MS = '-ms-';
103
+ var MOZ = '-moz-';
104
+ var WEBKIT = '-webkit-';
105
+
106
+ var COMMENT = 'comm';
107
+ var RULESET = 'rule';
108
+ var DECLARATION = 'decl';
109
+ var IMPORT = '@import';
110
+ var KEYFRAMES = '@keyframes';
111
+ var LAYER = '@layer';
112
+
113
+ /**
114
+ * @param {number}
115
+ * @return {number}
116
+ */
117
+ var abs = Math.abs;
118
+
119
+ /**
120
+ * @param {number}
121
+ * @return {string}
122
+ */
123
+ var from = String.fromCharCode;
124
+
125
+ /**
126
+ * @param {object}
127
+ * @return {object}
128
+ */
129
+ var assign = Object.assign;
130
+
131
+ /**
132
+ * @param {string} value
133
+ * @param {number} length
134
+ * @return {number}
135
+ */
136
+ function hash (value, length) {
137
+ return charat(value, 0) ^ 45 ? (((((((length << 2) ^ charat(value, 0)) << 2) ^ charat(value, 1)) << 2) ^ charat(value, 2)) << 2) ^ charat(value, 3) : 0
138
+ }
139
+
140
+ /**
141
+ * @param {string} value
142
+ * @return {string}
143
+ */
144
+ function trim (value) {
145
+ return value.trim()
146
+ }
147
+
148
+ /**
149
+ * @param {string} value
150
+ * @param {RegExp} pattern
151
+ * @return {string?}
152
+ */
153
+ function match (value, pattern) {
154
+ return (value = pattern.exec(value)) ? value[0] : value
155
+ }
156
+
157
+ /**
158
+ * @param {string} value
159
+ * @param {(string|RegExp)} pattern
160
+ * @param {string} replacement
161
+ * @return {string}
162
+ */
163
+ function replace (value, pattern, replacement) {
164
+ return value.replace(pattern, replacement)
165
+ }
166
+
167
+ /**
168
+ * @param {string} value
169
+ * @param {string} search
170
+ * @param {number} position
171
+ * @return {number}
172
+ */
173
+ function indexof (value, search, position) {
174
+ return value.indexOf(search, position)
175
+ }
176
+
177
+ /**
178
+ * @param {string} value
179
+ * @param {number} index
180
+ * @return {number}
181
+ */
182
+ function charat (value, index) {
183
+ return value.charCodeAt(index) | 0
184
+ }
185
+
186
+ /**
187
+ * @param {string} value
188
+ * @param {number} begin
189
+ * @param {number} end
190
+ * @return {string}
191
+ */
192
+ function substr (value, begin, end) {
193
+ return value.slice(begin, end)
194
+ }
195
+
196
+ /**
197
+ * @param {string} value
198
+ * @return {number}
199
+ */
200
+ function strlen (value) {
201
+ return value.length
202
+ }
203
+
204
+ /**
205
+ * @param {any[]} value
206
+ * @return {number}
207
+ */
208
+ function sizeof (value) {
209
+ return value.length
210
+ }
211
+
212
+ /**
213
+ * @param {any} value
214
+ * @param {any[]} array
215
+ * @return {any}
216
+ */
217
+ function append (value, array) {
218
+ return array.push(value), value
219
+ }
220
+
221
+ /**
222
+ * @param {string[]} array
223
+ * @param {function} callback
224
+ * @return {string}
225
+ */
226
+ function combine (array, callback) {
227
+ return array.map(callback).join('')
228
+ }
229
+
230
+ /**
231
+ * @param {string[]} array
232
+ * @param {RegExp} pattern
233
+ * @return {string[]}
234
+ */
235
+ function filter (array, pattern) {
236
+ return array.filter(function (value) { return !match(value, pattern) })
237
+ }
238
+
239
+ var line = 1;
240
+ var column = 1;
241
+ var length = 0;
242
+ var position = 0;
243
+ var character = 0;
244
+ var characters = '';
245
+
246
+ /**
247
+ * @param {string} value
248
+ * @param {object | null} root
249
+ * @param {object | null} parent
250
+ * @param {string} type
251
+ * @param {string[] | string} props
252
+ * @param {object[] | string} children
253
+ * @param {object[]} siblings
254
+ * @param {number} length
255
+ */
256
+ function node (value, root, parent, type, props, children, length, siblings) {
257
+ return {value: value, root: root, parent: parent, type: type, props: props, children: children, line: line, column: column, length: length, return: '', siblings: siblings}
258
+ }
259
+
260
+ /**
261
+ * @param {object} root
262
+ * @param {object} props
263
+ * @return {object}
264
+ */
265
+ function copy (root, props) {
266
+ return assign(node('', null, null, '', null, null, 0, root.siblings), root, {length: -root.length}, props)
267
+ }
268
+
269
+ /**
270
+ * @param {object} root
271
+ */
272
+ function lift (root) {
273
+ while (root.root)
274
+ root = copy(root.root, {children: [root]});
275
+
276
+ append(root, root.siblings);
277
+ }
278
+
279
+ /**
280
+ * @return {number}
281
+ */
282
+ function char () {
283
+ return character
284
+ }
285
+
286
+ /**
287
+ * @return {number}
288
+ */
289
+ function prev () {
290
+ character = position > 0 ? charat(characters, --position) : 0;
291
+
292
+ if (column--, character === 10)
293
+ column = 1, line--;
294
+
295
+ return character
296
+ }
297
+
298
+ /**
299
+ * @return {number}
300
+ */
301
+ function next () {
302
+ character = position < length ? charat(characters, position++) : 0;
303
+
304
+ if (column++, character === 10)
305
+ column = 1, line++;
306
+
307
+ return character
308
+ }
309
+
310
+ /**
311
+ * @return {number}
312
+ */
313
+ function peek () {
314
+ return charat(characters, position)
315
+ }
316
+
317
+ /**
318
+ * @return {number}
319
+ */
320
+ function caret () {
321
+ return position
322
+ }
323
+
324
+ /**
325
+ * @param {number} begin
326
+ * @param {number} end
327
+ * @return {string}
328
+ */
329
+ function slice (begin, end) {
330
+ return substr(characters, begin, end)
331
+ }
332
+
333
+ /**
334
+ * @param {number} type
335
+ * @return {number}
336
+ */
337
+ function token (type) {
338
+ switch (type) {
339
+ // \0 \t \n \r \s whitespace token
340
+ case 0: case 9: case 10: case 13: case 32:
341
+ return 5
342
+ // ! + , / > @ ~ isolate token
343
+ case 33: case 43: case 44: case 47: case 62: case 64: case 126:
344
+ // ; { } breakpoint token
345
+ case 59: case 123: case 125:
346
+ return 4
347
+ // : accompanied token
348
+ case 58:
349
+ return 3
350
+ // " ' ( [ opening delimit token
351
+ case 34: case 39: case 40: case 91:
352
+ return 2
353
+ // ) ] closing delimit token
354
+ case 41: case 93:
355
+ return 1
356
+ }
357
+
358
+ return 0
359
+ }
360
+
361
+ /**
362
+ * @param {string} value
363
+ * @return {any[]}
364
+ */
365
+ function alloc (value) {
366
+ return line = column = 1, length = strlen(characters = value), position = 0, []
367
+ }
368
+
369
+ /**
370
+ * @param {any} value
371
+ * @return {any}
372
+ */
373
+ function dealloc (value) {
374
+ return characters = '', value
375
+ }
376
+
377
+ /**
378
+ * @param {number} type
379
+ * @return {string}
380
+ */
381
+ function delimit (type) {
382
+ return trim(slice(position - 1, delimiter(type === 91 ? type + 2 : type === 40 ? type + 1 : type)))
383
+ }
384
+
385
+ /**
386
+ * @param {number} type
387
+ * @return {string}
388
+ */
389
+ function whitespace (type) {
390
+ while (character = peek())
391
+ if (character < 33)
392
+ next();
393
+ else
394
+ break
395
+
396
+ return token(type) > 2 || token(character) > 3 ? '' : ' '
397
+ }
398
+
399
+ /**
400
+ * @param {number} index
401
+ * @param {number} count
402
+ * @return {string}
403
+ */
404
+ function escaping (index, count) {
405
+ while (--count && next())
406
+ // not 0-9 A-F a-f
407
+ if (character < 48 || character > 102 || (character > 57 && character < 65) || (character > 70 && character < 97))
408
+ break
409
+
410
+ return slice(index, caret() + (count < 6 && peek() == 32 && next() == 32))
411
+ }
412
+
413
+ /**
414
+ * @param {number} type
415
+ * @return {number}
416
+ */
417
+ function delimiter (type) {
418
+ while (next())
419
+ switch (character) {
420
+ // ] ) " '
421
+ case type:
422
+ return position
423
+ // " '
424
+ case 34: case 39:
425
+ if (type !== 34 && type !== 39)
426
+ delimiter(character);
427
+ break
428
+ // (
429
+ case 40:
430
+ if (type === 41)
431
+ delimiter(type);
432
+ break
433
+ // \
434
+ case 92:
435
+ next();
436
+ break
437
+ }
438
+
439
+ return position
440
+ }
441
+
442
+ /**
443
+ * @param {number} type
444
+ * @param {number} index
445
+ * @return {number}
446
+ */
447
+ function commenter (type, index) {
448
+ while (next())
449
+ // //
450
+ if (type + character === 47 + 10)
451
+ break
452
+ // /*
453
+ else if (type + character === 42 + 42 && peek() === 47)
454
+ break
455
+
456
+ return '/*' + slice(index, position - 1) + '*' + from(type === 47 ? type : next())
457
+ }
458
+
459
+ /**
460
+ * @param {number} index
461
+ * @return {string}
462
+ */
463
+ function identifier (index) {
464
+ while (!token(peek()))
465
+ next();
466
+
467
+ return slice(index, position)
468
+ }
469
+
470
+ /**
471
+ * @param {string} value
472
+ * @return {object[]}
473
+ */
474
+ function compile (value) {
475
+ return dealloc(parse$1('', null, null, null, [''], value = alloc(value), 0, [0], value))
476
+ }
477
+
478
+ /**
479
+ * @param {string} value
480
+ * @param {object} root
481
+ * @param {object?} parent
482
+ * @param {string[]} rule
483
+ * @param {string[]} rules
484
+ * @param {string[]} rulesets
485
+ * @param {number[]} pseudo
486
+ * @param {number[]} points
487
+ * @param {string[]} declarations
488
+ * @return {object}
489
+ */
490
+ function parse$1 (value, root, parent, rule, rules, rulesets, pseudo, points, declarations) {
491
+ var index = 0;
492
+ var offset = 0;
493
+ var length = pseudo;
494
+ var atrule = 0;
495
+ var property = 0;
496
+ var previous = 0;
497
+ var variable = 1;
498
+ var scanning = 1;
499
+ var ampersand = 1;
500
+ var character = 0;
501
+ var type = '';
502
+ var props = rules;
503
+ var children = rulesets;
504
+ var reference = rule;
505
+ var characters = type;
506
+
507
+ while (scanning)
508
+ switch (previous = character, character = next()) {
509
+ // (
510
+ case 40:
511
+ if (previous != 108 && charat(characters, length - 1) == 58) {
512
+ if (indexof(characters += replace(delimit(character), '&', '&\f'), '&\f', abs(index ? points[index - 1] : 0)) != -1)
513
+ ampersand = -1;
514
+ break
515
+ }
516
+ // " ' [
517
+ case 34: case 39: case 91:
518
+ characters += delimit(character);
519
+ break
520
+ // \t \n \r \s
521
+ case 9: case 10: case 13: case 32:
522
+ characters += whitespace(previous);
523
+ break
524
+ // \
525
+ case 92:
526
+ characters += escaping(caret() - 1, 7);
527
+ continue
528
+ // /
529
+ case 47:
530
+ switch (peek()) {
531
+ case 42: case 47:
532
+ append(comment(commenter(next(), caret()), root, parent, declarations), declarations);
533
+ break
534
+ default:
535
+ characters += '/';
536
+ }
537
+ break
538
+ // {
539
+ case 123 * variable:
540
+ points[index++] = strlen(characters) * ampersand;
541
+ // } ; \0
542
+ case 125 * variable: case 59: case 0:
543
+ switch (character) {
544
+ // \0 }
545
+ case 0: case 125: scanning = 0;
546
+ // ;
547
+ case 59 + offset: if (ampersand == -1) characters = replace(characters, /\f/g, '');
548
+ if (property > 0 && (strlen(characters) - length))
549
+ append(property > 32 ? declaration(characters + ';', rule, parent, length - 1, declarations) : declaration(replace(characters, ' ', '') + ';', rule, parent, length - 2, declarations), declarations);
550
+ break
551
+ // @ ;
552
+ case 59: characters += ';';
553
+ // { rule/at-rule
554
+ default:
555
+ append(reference = ruleset(characters, root, parent, index, offset, rules, points, type, props = [], children = [], length, rulesets), rulesets);
556
+
557
+ if (character === 123)
558
+ if (offset === 0)
559
+ parse$1(characters, root, reference, reference, props, rulesets, length, points, children);
560
+ else
561
+ switch (atrule === 99 && charat(characters, 3) === 110 ? 100 : atrule) {
562
+ // d l m s
563
+ case 100: case 108: case 109: case 115:
564
+ parse$1(value, reference, reference, rule && append(ruleset(value, reference, reference, 0, 0, rules, points, type, rules, props = [], length, children), children), rules, children, length, points, rule ? props : children);
565
+ break
566
+ default:
567
+ parse$1(characters, reference, reference, reference, [''], children, 0, points, children);
568
+ }
569
+ }
570
+
571
+ index = offset = property = 0, variable = ampersand = 1, type = characters = '', length = pseudo;
572
+ break
573
+ // :
574
+ case 58:
575
+ length = 1 + strlen(characters), property = previous;
576
+ default:
577
+ if (variable < 1)
578
+ if (character == 123)
579
+ --variable;
580
+ else if (character == 125 && variable++ == 0 && prev() == 125)
581
+ continue
582
+
583
+ switch (characters += from(character), character * variable) {
584
+ // &
585
+ case 38:
586
+ ampersand = offset > 0 ? 1 : (characters += '\f', -1);
587
+ break
588
+ // ,
589
+ case 44:
590
+ points[index++] = (strlen(characters) - 1) * ampersand, ampersand = 1;
591
+ break
592
+ // @
593
+ case 64:
594
+ // -
595
+ if (peek() === 45)
596
+ characters += delimit(next());
597
+
598
+ atrule = peek(), offset = length = strlen(type = characters += identifier(caret())), character++;
599
+ break
600
+ // -
601
+ case 45:
602
+ if (previous === 45 && strlen(characters) == 2)
603
+ variable = 0;
604
+ }
605
+ }
606
+
607
+ return rulesets
608
+ }
609
+
610
+ /**
611
+ * @param {string} value
612
+ * @param {object} root
613
+ * @param {object?} parent
614
+ * @param {number} index
615
+ * @param {number} offset
616
+ * @param {string[]} rules
617
+ * @param {number[]} points
618
+ * @param {string} type
619
+ * @param {string[]} props
620
+ * @param {string[]} children
621
+ * @param {number} length
622
+ * @param {object[]} siblings
623
+ * @return {object}
624
+ */
625
+ function ruleset (value, root, parent, index, offset, rules, points, type, props, children, length, siblings) {
626
+ var post = offset - 1;
627
+ var rule = offset === 0 ? rules : [''];
628
+ var size = sizeof(rule);
629
+
630
+ for (var i = 0, j = 0, k = 0; i < index; ++i)
631
+ for (var x = 0, y = substr(value, post + 1, post = abs(j = points[i])), z = value; x < size; ++x)
632
+ if (z = trim(j > 0 ? rule[x] + ' ' + y : replace(y, /&\f/g, rule[x])))
633
+ props[k++] = z;
634
+
635
+ return node(value, root, parent, offset === 0 ? RULESET : type, props, children, length, siblings)
636
+ }
637
+
638
+ /**
639
+ * @param {number} value
640
+ * @param {object} root
641
+ * @param {object?} parent
642
+ * @param {object[]} siblings
643
+ * @return {object}
644
+ */
645
+ function comment (value, root, parent, siblings) {
646
+ return node(value, root, parent, COMMENT, from(char()), substr(value, 2, -2), 0, siblings)
647
+ }
648
+
649
+ /**
650
+ * @param {string} value
651
+ * @param {object} root
652
+ * @param {object?} parent
653
+ * @param {number} length
654
+ * @param {object[]} siblings
655
+ * @return {object}
656
+ */
657
+ function declaration (value, root, parent, length, siblings) {
658
+ return node(value, root, parent, DECLARATION, substr(value, 0, length), substr(value, length + 1, -1), length, siblings)
659
+ }
660
+
661
+ /**
662
+ * @param {string} value
663
+ * @param {number} length
664
+ * @param {object[]} children
665
+ * @return {string}
666
+ */
667
+ function prefix (value, length, children) {
668
+ switch (hash(value, length)) {
669
+ // color-adjust
670
+ case 5103:
671
+ return WEBKIT + 'print-' + value + value
672
+ // animation, animation-(delay|direction|duration|fill-mode|iteration-count|name|play-state|timing-function)
673
+ case 5737: case 4201: case 3177: case 3433: case 1641: case 4457: case 2921:
674
+ // text-decoration, filter, clip-path, backface-visibility, column, box-decoration-break
675
+ case 5572: case 6356: case 5844: case 3191: case 6645: case 3005:
676
+ // mask, mask-image, mask-(mode|clip|size), mask-(repeat|origin), mask-position, mask-composite,
677
+ case 6391: case 5879: case 5623: case 6135: case 4599: case 4855:
678
+ // background-clip, columns, column-(count|fill|gap|rule|rule-color|rule-style|rule-width|span|width)
679
+ case 4215: case 6389: case 5109: case 5365: case 5621: case 3829:
680
+ return WEBKIT + value + value
681
+ // tab-size
682
+ case 4789:
683
+ return MOZ + value + value
684
+ // appearance, user-select, transform, hyphens, text-size-adjust
685
+ case 5349: case 4246: case 4810: case 6968: case 2756:
686
+ return WEBKIT + value + MOZ + value + MS + value + value
687
+ // writing-mode
688
+ case 5936:
689
+ switch (charat(value, length + 11)) {
690
+ // vertical-l(r)
691
+ case 114:
692
+ return WEBKIT + value + MS + replace(value, /[svh]\w+-[tblr]{2}/, 'tb') + value
693
+ // vertical-r(l)
694
+ case 108:
695
+ return WEBKIT + value + MS + replace(value, /[svh]\w+-[tblr]{2}/, 'tb-rl') + value
696
+ // horizontal(-)tb
697
+ case 45:
698
+ return WEBKIT + value + MS + replace(value, /[svh]\w+-[tblr]{2}/, 'lr') + value
699
+ // default: fallthrough to below
700
+ }
701
+ // flex, flex-direction, scroll-snap-type, writing-mode
702
+ case 6828: case 4268: case 2903:
703
+ return WEBKIT + value + MS + value + value
704
+ // order
705
+ case 6165:
706
+ return WEBKIT + value + MS + 'flex-' + value + value
707
+ // align-items
708
+ case 5187:
709
+ return WEBKIT + value + replace(value, /(\w+).+(:[^]+)/, WEBKIT + 'box-$1$2' + MS + 'flex-$1$2') + value
710
+ // align-self
711
+ case 5443:
712
+ return WEBKIT + value + MS + 'flex-item-' + replace(value, /flex-|-self/g, '') + (!match(value, /flex-|baseline/) ? MS + 'grid-row-' + replace(value, /flex-|-self/g, '') : '') + value
713
+ // align-content
714
+ case 4675:
715
+ return WEBKIT + value + MS + 'flex-line-pack' + replace(value, /align-content|flex-|-self/g, '') + value
716
+ // flex-shrink
717
+ case 5548:
718
+ return WEBKIT + value + MS + replace(value, 'shrink', 'negative') + value
719
+ // flex-basis
720
+ case 5292:
721
+ return WEBKIT + value + MS + replace(value, 'basis', 'preferred-size') + value
722
+ // flex-grow
723
+ case 6060:
724
+ return WEBKIT + 'box-' + replace(value, '-grow', '') + WEBKIT + value + MS + replace(value, 'grow', 'positive') + value
725
+ // transition
726
+ case 4554:
727
+ return WEBKIT + replace(value, /([^-])(transform)/g, '$1' + WEBKIT + '$2') + value
728
+ // cursor
729
+ case 6187:
730
+ return replace(replace(replace(value, /(zoom-|grab)/, WEBKIT + '$1'), /(image-set)/, WEBKIT + '$1'), value, '') + value
731
+ // background, background-image
732
+ case 5495: case 3959:
733
+ return replace(value, /(image-set\([^]*)/, WEBKIT + '$1' + '$`$1')
734
+ // justify-content
735
+ case 4968:
736
+ return replace(replace(value, /(.+:)(flex-)?(.*)/, WEBKIT + 'box-pack:$3' + MS + 'flex-pack:$3'), /s.+-b[^;]+/, 'justify') + WEBKIT + value + value
737
+ // justify-self
738
+ case 4200:
739
+ if (!match(value, /flex-|baseline/)) return MS + 'grid-column-align' + substr(value, length) + value
740
+ break
741
+ // grid-template-(columns|rows)
742
+ case 2592: case 3360:
743
+ return MS + replace(value, 'template-', '') + value
744
+ // grid-(row|column)-start
745
+ case 4384: case 3616:
746
+ if (children && children.some(function (element, index) { return length = index, match(element.props, /grid-\w+-end/) })) {
747
+ return ~indexof(value + (children = children[length].value), 'span', 0) ? value : (MS + replace(value, '-start', '') + value + MS + 'grid-row-span:' + (~indexof(children, 'span', 0) ? match(children, /\d+/) : +match(children, /\d+/) - +match(value, /\d+/)) + ';')
748
+ }
749
+ return MS + replace(value, '-start', '') + value
750
+ // grid-(row|column)-end
751
+ case 4896: case 4128:
752
+ return (children && children.some(function (element) { return match(element.props, /grid-\w+-start/) })) ? value : MS + replace(replace(value, '-end', '-span'), 'span ', '') + value
753
+ // (margin|padding)-inline-(start|end)
754
+ case 4095: case 3583: case 4068: case 2532:
755
+ return replace(value, /(.+)-inline(.+)/, WEBKIT + '$1$2') + value
756
+ // (min|max)?(width|height|inline-size|block-size)
757
+ case 8116: case 7059: case 5753: case 5535:
758
+ case 5445: case 5701: case 4933: case 4677:
759
+ case 5533: case 5789: case 5021: case 4765:
760
+ // stretch, max-content, min-content, fill-available
761
+ if (strlen(value) - 1 - length > 6)
762
+ switch (charat(value, length + 1)) {
763
+ // (m)ax-content, (m)in-content
764
+ case 109:
765
+ // -
766
+ if (charat(value, length + 4) !== 45)
767
+ break
768
+ // (f)ill-available, (f)it-content
769
+ case 102:
770
+ return replace(value, /(.+:)(.+)-([^]+)/, '$1' + WEBKIT + '$2-$3' + '$1' + MOZ + (charat(value, length + 3) == 108 ? '$3' : '$2-$3')) + value
771
+ // (s)tretch
772
+ case 115:
773
+ return ~indexof(value, 'stretch', 0) ? prefix(replace(value, 'stretch', 'fill-available'), length, children) + value : value
774
+ }
775
+ break
776
+ // grid-(column|row)
777
+ case 5152: case 5920:
778
+ return replace(value, /(.+?):(\d+)(\s*\/\s*(span)?\s*(\d+))?(.*)/, function (_, a, b, c, d, e, f) { return (MS + a + ':' + b + f) + (c ? (MS + a + '-span:' + (d ? e : +e - +b)) + f : '') + value })
779
+ // position: sticky
780
+ case 4949:
781
+ // stick(y)?
782
+ if (charat(value, length + 6) === 121)
783
+ return replace(value, ':', ':' + WEBKIT) + value
784
+ break
785
+ // display: (flex|inline-flex|grid|inline-grid)
786
+ case 6444:
787
+ switch (charat(value, charat(value, 14) === 45 ? 18 : 11)) {
788
+ // (inline-)?fle(x)
789
+ case 120:
790
+ return replace(value, /(.+:)([^;\s!]+)(;|(\s+)?!.+)?/, '$1' + WEBKIT + (charat(value, 14) === 45 ? 'inline-' : '') + 'box$3' + '$1' + WEBKIT + '$2$3' + '$1' + MS + '$2box$3') + value
791
+ // (inline-)?gri(d)
792
+ case 100:
793
+ return replace(value, ':', ':' + MS) + value
794
+ }
795
+ break
796
+ // scroll-margin, scroll-margin-(top|right|bottom|left)
797
+ case 5719: case 2647: case 2135: case 3927: case 2391:
798
+ return replace(value, 'scroll-', 'scroll-snap-') + value
799
+ }
800
+
801
+ return value
802
+ }
803
+
804
+ /**
805
+ * @param {object[]} children
806
+ * @param {function} callback
807
+ * @return {string}
808
+ */
809
+ function serialize (children, callback) {
810
+ var output = '';
811
+
812
+ for (var i = 0; i < children.length; i++)
813
+ output += callback(children[i], i, children, callback) || '';
814
+
815
+ return output
816
+ }
817
+
818
+ /**
819
+ * @param {object} element
820
+ * @param {number} index
821
+ * @param {object[]} children
822
+ * @param {function} callback
823
+ * @return {string}
824
+ */
825
+ function stringify (element, index, children, callback) {
826
+ switch (element.type) {
827
+ case LAYER: if (element.children.length) break
828
+ case IMPORT: case DECLARATION: return element.return = element.return || element.value
829
+ case COMMENT: return ''
830
+ case KEYFRAMES: return element.return = element.value + '{' + serialize(element.children, callback) + '}'
831
+ case RULESET: if (!strlen(element.value = element.props.join(','))) return ''
832
+ }
833
+
834
+ return strlen(children = serialize(element.children, callback)) ? element.return = element.value + '{' + children + '}' : ''
835
+ }
836
+
837
+ /**
838
+ * @param {function[]} collection
839
+ * @return {function}
840
+ */
841
+ function middleware (collection) {
842
+ var length = sizeof(collection);
843
+
844
+ return function (element, index, children, callback) {
845
+ var output = '';
846
+
847
+ for (var i = 0; i < length; i++)
848
+ output += collection[i](element, index, children, callback) || '';
849
+
850
+ return output
851
+ }
852
+ }
853
+
854
+ /**
855
+ * @param {function} callback
856
+ * @return {function}
857
+ */
858
+ function rulesheet (callback) {
859
+ return function (element) {
860
+ if (!element.root)
861
+ if (element = element.return)
862
+ callback(element);
863
+ }
864
+ }
865
+
866
+ /**
867
+ * @param {object} element
868
+ * @param {number} index
869
+ * @param {object[]} children
870
+ * @param {function} callback
871
+ */
872
+ function prefixer (element, index, children, callback) {
873
+ if (element.length > -1)
874
+ if (!element.return)
875
+ switch (element.type) {
876
+ case DECLARATION: element.return = prefix(element.value, element.length, children);
877
+ return
878
+ case KEYFRAMES:
879
+ return serialize([copy(element, {value: replace(element.value, '@', '@' + WEBKIT)})], callback)
880
+ case RULESET:
881
+ if (element.length)
882
+ return combine(children = element.props, function (value) {
883
+ switch (match(value, callback = /(::plac\w+|:read-\w+)/)) {
884
+ // :read-(only|write)
885
+ case ':read-only': case ':read-write':
886
+ lift(copy(element, {props: [replace(value, /:(read-\w+)/, ':' + MOZ + '$1')]}));
887
+ lift(copy(element, {props: [value]}));
888
+ assign(element, {props: filter(children, callback)});
889
+ break
890
+ // :placeholder
891
+ case '::placeholder':
892
+ lift(copy(element, {props: [replace(value, /:(plac\w+)/, ':' + WEBKIT + 'input-$1')]}));
893
+ lift(copy(element, {props: [replace(value, /:(plac\w+)/, ':' + MOZ + '$1')]}));
894
+ lift(copy(element, {props: [replace(value, /:(plac\w+)/, MS + 'input-$1')]}));
895
+ lift(copy(element, {props: [value]}));
896
+ assign(element, {props: filter(children, callback)});
897
+ break
898
+ }
899
+
900
+ return ''
901
+ })
902
+ }
903
+ }
904
+
905
+ var unitlessKeys = {
906
+ animationIterationCount: 1,
907
+ aspectRatio: 1,
908
+ borderImageOutset: 1,
909
+ borderImageSlice: 1,
910
+ borderImageWidth: 1,
911
+ boxFlex: 1,
912
+ boxFlexGroup: 1,
913
+ boxOrdinalGroup: 1,
914
+ columnCount: 1,
915
+ columns: 1,
916
+ flex: 1,
917
+ flexGrow: 1,
918
+ flexPositive: 1,
919
+ flexShrink: 1,
920
+ flexNegative: 1,
921
+ flexOrder: 1,
922
+ gridRow: 1,
923
+ gridRowEnd: 1,
924
+ gridRowSpan: 1,
925
+ gridRowStart: 1,
926
+ gridColumn: 1,
927
+ gridColumnEnd: 1,
928
+ gridColumnSpan: 1,
929
+ gridColumnStart: 1,
930
+ msGridRow: 1,
931
+ msGridRowSpan: 1,
932
+ msGridColumn: 1,
933
+ msGridColumnSpan: 1,
934
+ fontWeight: 1,
935
+ lineHeight: 1,
936
+ opacity: 1,
937
+ order: 1,
938
+ orphans: 1,
939
+ tabSize: 1,
940
+ widows: 1,
941
+ zIndex: 1,
942
+ zoom: 1,
943
+ WebkitLineClamp: 1,
944
+ // SVG-related properties
945
+ fillOpacity: 1,
946
+ floodOpacity: 1,
947
+ stopOpacity: 1,
948
+ strokeDasharray: 1,
949
+ strokeDashoffset: 1,
950
+ strokeMiterlimit: 1,
951
+ strokeOpacity: 1,
952
+ strokeWidth: 1
953
+ };
954
+
955
+ var f="undefined"!=typeof process&&void 0!==process.env&&(process.env.REACT_APP_SC_ATTR||process.env.SC_ATTR)||"data-styled",m="active",y="data-styled-version",v="6.1.11",g="/*!sc*/\n",S="undefined"!=typeof window&&"HTMLElement"in window,w=Boolean("boolean"==typeof SC_DISABLE_SPEEDY?SC_DISABLE_SPEEDY:"undefined"!=typeof process&&void 0!==process.env&&void 0!==process.env.REACT_APP_SC_DISABLE_SPEEDY&&""!==process.env.REACT_APP_SC_DISABLE_SPEEDY?"false"!==process.env.REACT_APP_SC_DISABLE_SPEEDY&&process.env.REACT_APP_SC_DISABLE_SPEEDY:"undefined"!=typeof process&&void 0!==process.env&&void 0!==process.env.SC_DISABLE_SPEEDY&&""!==process.env.SC_DISABLE_SPEEDY?"false"!==process.env.SC_DISABLE_SPEEDY&&process.env.SC_DISABLE_SPEEDY:"production"!==process.env.NODE_ENV),E=/invalid hook call/i,N=new Set,P=function(t,n){if("production"!==process.env.NODE_ENV){var o=n?' with the id of "'.concat(n,'"'):"",s="The component ".concat(t).concat(o," has been created dynamically.\n")+"You may see this warning because you've called styled inside another component.\nTo resolve this only create new StyledComponents outside of any render method and function component.",i=console.error;try{var a=!0;console.error=function(t){for(var n=[],o=1;o<arguments.length;o++)n[o-1]=arguments[o];E.test(t)?(a=!1,N.delete(s)):i.apply(void 0,__spreadArray([t],n,!1));},React.useRef(),a&&!N.has(s)&&(console.warn(s),N.add(s));}catch(e){E.test(e.message)&&N.delete(s);}finally{console.error=i;}}},_=Object.freeze([]),C=Object.freeze({});function I(e,t,n){return void 0===n&&(n=C),e.theme!==n.theme&&e.theme||t||n.theme}var A=new Set(["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","track","u","ul","use","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"]),O=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,D=/(^-|-$)/g;function R(e){return e.replace(O,"-").replace(D,"")}var T=/(a)(d)/gi,k=52,j=function(e){return String.fromCharCode(e+(e>25?39:97))};function x(e){var t,n="";for(t=Math.abs(e);t>k;t=t/k|0)n=j(t%k)+n;return (j(t%k)+n).replace(T,"$1-$2")}var V,F=5381,M=function(e,t){for(var n=t.length;n;)e=33*e^t.charCodeAt(--n);return e},z=function(e){return M(F,e)};function $(e){return x(z(e)>>>0)}function B(e){return "production"!==process.env.NODE_ENV&&"string"==typeof e&&e||e.displayName||e.name||"Component"}function L(e){return "string"==typeof e&&("production"===process.env.NODE_ENV||e.charAt(0)===e.charAt(0).toLowerCase())}var G="function"==typeof Symbol&&Symbol.for,Y=G?Symbol.for("react.memo"):60115,q=G?Symbol.for("react.forward_ref"):60112,W={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},H={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},U={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},J=((V={})[q]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},V[Y]=U,V);function X(e){return ("type"in(t=e)&&t.type.$$typeof)===Y?U:"$$typeof"in e?J[e.$$typeof]:W;var t;}var Z=Object.defineProperty,K=Object.getOwnPropertyNames,Q=Object.getOwnPropertySymbols,ee=Object.getOwnPropertyDescriptor,te=Object.getPrototypeOf,ne=Object.prototype;function oe(e,t,n){if("string"!=typeof t){if(ne){var o=te(t);o&&o!==ne&&oe(e,o,n);}var r=K(t);Q&&(r=r.concat(Q(t)));for(var s=X(e),i=X(t),a=0;a<r.length;++a){var c=r[a];if(!(c in H||n&&n[c]||i&&c in i||s&&c in s)){var l=ee(t,c);try{Z(e,c,l);}catch(e){}}}}return e}function re(e){return "function"==typeof e}function se(e){return "object"==typeof e&&"styledComponentId"in e}function ie(e,t){return e&&t?"".concat(e," ").concat(t):e||t||""}function ae(e,t){if(0===e.length)return "";for(var n=e[0],o=1;o<e.length;o++)n+=e[o];return n}function ce(e){return null!==e&&"object"==typeof e&&e.constructor.name===Object.name&&!("props"in e&&e.$$typeof)}function le(e,t,n){if(void 0===n&&(n=!1),!n&&!ce(e)&&!Array.isArray(e))return t;if(Array.isArray(t))for(var o=0;o<t.length;o++)e[o]=le(e[o],t[o]);else if(ce(t))for(var o in t)e[o]=le(e[o],t[o]);return e}function ue(e,t){Object.defineProperty(e,"toString",{value:t});}var pe="production"!==process.env.NODE_ENV?{1:"Cannot create styled-component for component: %s.\n\n",2:"Can't collect styles once you've consumed a `ServerStyleSheet`'s styles! `ServerStyleSheet` is a one off instance for each server-side render cycle.\n\n- Are you trying to reuse it across renders?\n- Are you accidentally calling collectStyles twice?\n\n",3:"Streaming SSR is only supported in a Node.js environment; Please do not try to call this method in the browser.\n\n",4:"The `StyleSheetManager` expects a valid target or sheet prop!\n\n- Does this error occur on the client and is your target falsy?\n- Does this error occur on the server and is the sheet falsy?\n\n",5:"The clone method cannot be used on the client!\n\n- Are you running in a client-like environment on the server?\n- Are you trying to run SSR on the client?\n\n",6:"Trying to insert a new style tag, but the given Node is unmounted!\n\n- Are you using a custom target that isn't mounted?\n- Does your document not have a valid head element?\n- Have you accidentally removed a style tag manually?\n\n",7:'ThemeProvider: Please return an object from your "theme" prop function, e.g.\n\n```js\ntheme={() => ({})}\n```\n\n',8:'ThemeProvider: Please make your "theme" prop an object.\n\n',9:"Missing document `<head>`\n\n",10:"Cannot find a StyleSheet instance. Usually this happens if there are multiple copies of styled-components loaded at once. Check out this issue for how to troubleshoot and fix the common cases where this situation can happen: https://github.com/styled-components/styled-components/issues/1941#issuecomment-417862021\n\n",11:"_This error was replaced with a dev-time warning, it will be deleted for v4 final._ [createGlobalStyle] received children which will not be rendered. Please use the component without passing children elements.\n\n",12:"It seems you are interpolating a keyframe declaration (%s) into an untagged string. This was supported in styled-components v3, but is not longer supported in v4 as keyframes are now injected on-demand. Please wrap your string in the css\\`\\` helper which ensures the styles are injected correctly. See https://www.styled-components.com/docs/api#css\n\n",13:"%s is not a styled component and cannot be referred to via component selector. See https://www.styled-components.com/docs/advanced#referring-to-other-components for more details.\n\n",14:'ThemeProvider: "theme" prop is required.\n\n',15:"A stylis plugin has been supplied that is not named. We need a name for each plugin to be able to prevent styling collisions between different stylis configurations within the same app. Before you pass your plugin to `<StyleSheetManager stylisPlugins={[]}>`, please make sure each plugin is uniquely-named, e.g.\n\n```js\nObject.defineProperty(importedPlugin, 'name', { value: 'some-unique-name' });\n```\n\n",16:"Reached the limit of how many styled components may be created at group %s.\nYou may only create up to 1,073,741,824 components. If you're creating components dynamically,\nas for instance in your render method then you may be running into this limitation.\n\n",17:"CSSStyleSheet could not be found on HTMLStyleElement.\nHas styled-components' style tag been unmounted or altered by another script?\n",18:"ThemeProvider: Please make sure your useTheme hook is within a `<ThemeProvider>`"}:{};function de(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var n=e[0],o=[],r=1,s=e.length;r<s;r+=1)o.push(e[r]);return o.forEach(function(e){n=n.replace(/%[a-z]/,e);}),n}function he(t){for(var n=[],o=1;o<arguments.length;o++)n[o-1]=arguments[o];return "production"===process.env.NODE_ENV?new Error("An error occurred. See https://github.com/styled-components/styled-components/blob/main/packages/styled-components/src/utils/errors.md#".concat(t," for more information.").concat(n.length>0?" Args: ".concat(n.join(", ")):"")):new Error(de.apply(void 0,__spreadArray([pe[t]],n,!1)).trim())}var fe=function(){function e(e){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=e;}return e.prototype.indexOfGroup=function(e){for(var t=0,n=0;n<e;n++)t+=this.groupSizes[n];return t},e.prototype.insertRules=function(e,t){if(e>=this.groupSizes.length){for(var n=this.groupSizes,o=n.length,r=o;e>=r;)if((r<<=1)<0)throw he(16,"".concat(e));this.groupSizes=new Uint32Array(r),this.groupSizes.set(n),this.length=r;for(var s=o;s<r;s++)this.groupSizes[s]=0;}for(var i=this.indexOfGroup(e+1),a=(s=0,t.length);s<a;s++)this.tag.insertRule(i,t[s])&&(this.groupSizes[e]++,i++);},e.prototype.clearGroup=function(e){if(e<this.length){var t=this.groupSizes[e],n=this.indexOfGroup(e),o=n+t;this.groupSizes[e]=0;for(var r=n;r<o;r++)this.tag.deleteRule(n);}},e.prototype.getGroup=function(e){var t="";if(e>=this.length||0===this.groupSizes[e])return t;for(var n=this.groupSizes[e],o=this.indexOfGroup(e),r=o+n,s=o;s<r;s++)t+="".concat(this.tag.getRule(s)).concat(g);return t},e}(),me=1<<30,ye=new Map,ve=new Map,ge=1,Se=function(e){if(ye.has(e))return ye.get(e);for(;ve.has(ge);)ge++;var t=ge++;if("production"!==process.env.NODE_ENV&&((0|t)<0||t>me))throw he(16,"".concat(t));return ye.set(e,t),ve.set(t,e),t},we=function(e,t){ge=t+1,ye.set(e,t),ve.set(t,e);},be="style[".concat(f,"][").concat(y,'="').concat(v,'"]'),Ee=new RegExp("^".concat(f,'\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)')),Ne=function(e,t,n){for(var o,r=n.split(","),s=0,i=r.length;s<i;s++)(o=r[s])&&e.registerName(t,o);},Pe=function(e,t){for(var n,o=(null!==(n=t.textContent)&&void 0!==n?n:"").split(g),r=[],s=0,i=o.length;s<i;s++){var a=o[s].trim();if(a){var c=a.match(Ee);if(c){var l=0|parseInt(c[1],10),u=c[2];0!==l&&(we(u,l),Ne(e,u,c[3]),e.getTag().insertRules(l,r)),r.length=0;}else r.push(a);}}};function _e(){return "undefined"!=typeof __webpack_nonce__?__webpack_nonce__:null}var Ce=function(e){var t=document.head,n=e||t,o=document.createElement("style"),r=function(e){var t=Array.from(e.querySelectorAll("style[".concat(f,"]")));return t[t.length-1]}(n),s=void 0!==r?r.nextSibling:null;o.setAttribute(f,m),o.setAttribute(y,v);var i=_e();return i&&o.setAttribute("nonce",i),n.insertBefore(o,s),o},Ie=function(){function e(e){this.element=Ce(e),this.element.appendChild(document.createTextNode("")),this.sheet=function(e){if(e.sheet)return e.sheet;for(var t=document.styleSheets,n=0,o=t.length;n<o;n++){var r=t[n];if(r.ownerNode===e)return r}throw he(17)}(this.element),this.length=0;}return e.prototype.insertRule=function(e,t){try{return this.sheet.insertRule(t,e),this.length++,!0}catch(e){return !1}},e.prototype.deleteRule=function(e){this.sheet.deleteRule(e),this.length--;},e.prototype.getRule=function(e){var t=this.sheet.cssRules[e];return t&&t.cssText?t.cssText:""},e}(),Ae=function(){function e(e){this.element=Ce(e),this.nodes=this.element.childNodes,this.length=0;}return e.prototype.insertRule=function(e,t){if(e<=this.length&&e>=0){var n=document.createTextNode(t);return this.element.insertBefore(n,this.nodes[e]||null),this.length++,!0}return !1},e.prototype.deleteRule=function(e){this.element.removeChild(this.nodes[e]),this.length--;},e.prototype.getRule=function(e){return e<this.length?this.nodes[e].textContent:""},e}(),Oe=function(){function e(e){this.rules=[],this.length=0;}return e.prototype.insertRule=function(e,t){return e<=this.length&&(this.rules.splice(e,0,t),this.length++,!0)},e.prototype.deleteRule=function(e){this.rules.splice(e,1),this.length--;},e.prototype.getRule=function(e){return e<this.length?this.rules[e]:""},e}(),De=S,Re={isServer:!S,useCSSOMInjection:!w},Te=function(){function e(e,n,o){void 0===e&&(e=C),void 0===n&&(n={});var r=this;this.options=__assign(__assign({},Re),e),this.gs=n,this.names=new Map(o),this.server=!!e.isServer,!this.server&&S&&De&&(De=!1,function(e){for(var t=document.querySelectorAll(be),n=0,o=t.length;n<o;n++){var r=t[n];r&&r.getAttribute(f)!==m&&(Pe(e,r),r.parentNode&&r.parentNode.removeChild(r));}}(this)),ue(this,function(){return function(e){for(var t=e.getTag(),n=t.length,o="",r=function(n){var r=function(e){return ve.get(e)}(n);if(void 0===r)return "continue";var s=e.names.get(r),i=t.getGroup(n);if(void 0===s||0===i.length)return "continue";var a="".concat(f,".g").concat(n,'[id="').concat(r,'"]'),c="";void 0!==s&&s.forEach(function(e){e.length>0&&(c+="".concat(e,","));}),o+="".concat(i).concat(a,'{content:"').concat(c,'"}').concat(g);},s=0;s<n;s++)r(s);return o}(r)});}return e.registerId=function(e){return Se(e)},e.prototype.reconstructWithOptions=function(n,o){return void 0===o&&(o=!0),new e(__assign(__assign({},this.options),n),this.gs,o&&this.names||void 0)},e.prototype.allocateGSInstance=function(e){return this.gs[e]=(this.gs[e]||0)+1},e.prototype.getTag=function(){return this.tag||(this.tag=(e=function(e){var t=e.useCSSOMInjection,n=e.target;return e.isServer?new Oe(n):t?new Ie(n):new Ae(n)}(this.options),new fe(e)));var e;},e.prototype.hasNameForId=function(e,t){return this.names.has(e)&&this.names.get(e).has(t)},e.prototype.registerName=function(e,t){if(Se(e),this.names.has(e))this.names.get(e).add(t);else {var n=new Set;n.add(t),this.names.set(e,n);}},e.prototype.insertRules=function(e,t,n){this.registerName(e,t),this.getTag().insertRules(Se(e),n);},e.prototype.clearNames=function(e){this.names.has(e)&&this.names.get(e).clear();},e.prototype.clearRules=function(e){this.getTag().clearGroup(Se(e)),this.clearNames(e);},e.prototype.clearTag=function(){this.tag=void 0;},e}(),ke=/&/g,je=/^\s*\/\/.*$/gm;function xe(e,t){return e.map(function(e){return "rule"===e.type&&(e.value="".concat(t," ").concat(e.value),e.value=e.value.replaceAll(",",",".concat(t," ")),e.props=e.props.map(function(e){return "".concat(t," ").concat(e)})),Array.isArray(e.children)&&"@keyframes"!==e.type&&(e.children=xe(e.children,t)),e})}function Ve(e){var t,n,o,r=C,s=r.options,i=void 0===s?C:s,a=r.plugins,c=void 0===a?_:a,l=function(e,o,r){return r.startsWith(n)&&r.endsWith(n)&&r.replaceAll(n,"").length>0?".".concat(t):e},u=c.slice();u.push(function(e){e.type===RULESET&&e.value.includes("&")&&(e.props[0]=e.props[0].replace(ke,n).replace(o,l));}),i.prefix&&u.push(prefixer),u.push(stringify);var p=function(e,r,s,a){void 0===r&&(r=""),void 0===s&&(s=""),void 0===a&&(a="&"),t=a,n=r,o=new RegExp("\\".concat(n,"\\b"),"g");var c=e.replace(je,""),l=compile(s||r?"".concat(s," ").concat(r," { ").concat(c," }"):c);i.namespace&&(l=xe(l,i.namespace));var p=[];return serialize(l,middleware(u.concat(rulesheet(function(e){return p.push(e)})))),p};return p.hash=c.length?c.reduce(function(e,t){return t.name||he(15),M(e,t.name)},F).toString():"",p}var Fe=new Te,Me=Ve(),ze=React.createContext({shouldForwardProp:void 0,styleSheet:Fe,stylis:Me});ze.Consumer;React.createContext(void 0);function Le(){return React.useContext(ze)}var Ye=function(){function e(e,t){var n=this;this.inject=function(e,t){void 0===t&&(t=Me);var o=n.name+t.hash;e.hasNameForId(n.id,o)||e.insertRules(n.id,o,t(n.rules,o,"@keyframes"));},this.name=e,this.id="sc-keyframes-".concat(e),this.rules=t,ue(this,function(){throw he(12,String(n.name))});}return e.prototype.getName=function(e){return void 0===e&&(e=Me),this.name+e.hash},e}(),qe=function(e){return e>="A"&&e<="Z"};function We(e){for(var t="",n=0;n<e.length;n++){var o=e[n];if(1===n&&"-"===o&&"-"===e[0])return e;qe(o)?t+="-"+o.toLowerCase():t+=o;}return t.startsWith("ms-")?"-"+t:t}var He=function(e){return null==e||!1===e||""===e},Ue=function(t){var n,o,r=[];for(var s in t){var i=t[s];t.hasOwnProperty(s)&&!He(i)&&(Array.isArray(i)&&i.isCss||re(i)?r.push("".concat(We(s),":"),i,";"):ce(i)?r.push.apply(r,__spreadArray(__spreadArray(["".concat(s," {")],Ue(i),!1),["}"],!1)):r.push("".concat(We(s),": ").concat((n=s,null==(o=i)||"boolean"==typeof o||""===o?"":"number"!=typeof o||0===o||n in unitlessKeys||n.startsWith("--")?String(o).trim():"".concat(o,"px")),";")));}return r};function Je(e,t,n,o){if(He(e))return [];if(se(e))return [".".concat(e.styledComponentId)];if(re(e)){if(!re(s=e)||s.prototype&&s.prototype.isReactComponent||!t)return [e];var r=e(t);return "production"===process.env.NODE_ENV||"object"!=typeof r||Array.isArray(r)||r instanceof Ye||ce(r)||null===r||console.error("".concat(B(e)," is not a styled component and cannot be referred to via component selector. See https://www.styled-components.com/docs/advanced#referring-to-other-components for more details.")),Je(r,t,n,o)}var s;return e instanceof Ye?n?(e.inject(n,o),[e.getName(o)]):[e]:ce(e)?Ue(e):Array.isArray(e)?Array.prototype.concat.apply(_,e.map(function(e){return Je(e,t,n,o)})):[e.toString()]}function Xe(e){for(var t=0;t<e.length;t+=1){var n=e[t];if(re(n)&&!se(n))return !1}return !0}var Ze=z(v),Ke=function(){function e(e,t,n){this.rules=e,this.staticRulesId="",this.isStatic="production"===process.env.NODE_ENV&&(void 0===n||n.isStatic)&&Xe(e),this.componentId=t,this.baseHash=M(Ze,t),this.baseStyle=n,Te.registerId(t);}return e.prototype.generateAndInjectStyles=function(e,t,n){var o=this.baseStyle?this.baseStyle.generateAndInjectStyles(e,t,n):"";if(this.isStatic&&!n.hash)if(this.staticRulesId&&t.hasNameForId(this.componentId,this.staticRulesId))o=ie(o,this.staticRulesId);else {var r=ae(Je(this.rules,e,t,n)),s=x(M(this.baseHash,r)>>>0);if(!t.hasNameForId(this.componentId,s)){var i=n(r,".".concat(s),void 0,this.componentId);t.insertRules(this.componentId,s,i);}o=ie(o,s),this.staticRulesId=s;}else {for(var a=M(this.baseHash,n.hash),c="",l=0;l<this.rules.length;l++){var u=this.rules[l];if("string"==typeof u)c+=u,"production"!==process.env.NODE_ENV&&(a=M(a,u));else if(u){var p=ae(Je(u,e,t,n));a=M(a,p+l),c+=p;}}if(c){var d=x(a>>>0);t.hasNameForId(this.componentId,d)||t.insertRules(this.componentId,d,n(c,".".concat(d),void 0,this.componentId)),o=ie(o,d);}}return o},e}(),Qe=React.createContext(void 0);Qe.Consumer;var ot={},rt=new Set;function st(e,r,s){var i=se(e),a=e,c=!L(e),p=r.attrs,d=void 0===p?_:p,h=r.componentId,f=void 0===h?function(e,t){var n="string"!=typeof e?"sc":R(e);ot[n]=(ot[n]||0)+1;var o="".concat(n,"-").concat($(v+n+ot[n]));return t?"".concat(t,"-").concat(o):o}(r.displayName,r.parentComponentId):h,m=r.displayName,y=void 0===m?function(e){return L(e)?"styled.".concat(e):"Styled(".concat(B(e),")")}(e):m,g=r.displayName&&r.componentId?"".concat(R(r.displayName),"-").concat(r.componentId):r.componentId||f,S=i&&a.attrs?a.attrs.concat(d).filter(Boolean):d,w=r.shouldForwardProp;if(i&&a.shouldForwardProp){var b=a.shouldForwardProp;if(r.shouldForwardProp){var E=r.shouldForwardProp;w=function(e,t){return b(e,t)&&E(e,t)};}else w=b;}var N=new Ke(s,g,i?a.componentStyle:void 0);function O(e,r){return function(e,r,s){var i=e.attrs,a=e.componentStyle,c=e.defaultProps,p=e.foldedComponentIds,d=e.styledComponentId,h=e.target,f=React.useContext(Qe),m=Le(),y=e.shouldForwardProp||m.shouldForwardProp;"production"!==process.env.NODE_ENV&&React.useDebugValue(d);var v=I(r,f,c)||C,g=function(e,n,o){for(var r,s=__assign(__assign({},n),{className:void 0,theme:o}),i=0;i<e.length;i+=1){var a=re(r=e[i])?r(s):r;for(var c in a)s[c]="className"===c?ie(s[c],a[c]):"style"===c?__assign(__assign({},s[c]),a[c]):a[c];}return n.className&&(s.className=ie(s.className,n.className)),s}(i,r,v),S=g.as||h,w={};for(var b in g)void 0===g[b]||"$"===b[0]||"as"===b||"theme"===b&&g.theme===v||("forwardedAs"===b?w.as=g.forwardedAs:y&&!y(b,S)||(w[b]=g[b],y||"development"!==process.env.NODE_ENV||isPropValid(b)||rt.has(b)||!A.has(S)||(rt.add(b),console.warn('styled-components: it looks like an unknown prop "'.concat(b,'" is being sent through to the DOM, which will likely trigger a React console error. If you would like automatic filtering of unknown props, you can opt-into that behavior via `<StyleSheetManager shouldForwardProp={...}>` (connect an API like `@emotion/is-prop-valid`) or consider using transient props (`$` prefix for automatic filtering.)')))));var E=function(e,t){var n=Le(),o=e.generateAndInjectStyles(t,n.styleSheet,n.stylis);return "production"!==process.env.NODE_ENV&&React.useDebugValue(o),o}(a,g);"production"!==process.env.NODE_ENV&&e.warnTooManyClasses&&e.warnTooManyClasses(E);var N=ie(p,d);return E&&(N+=" "+E),g.className&&(N+=" "+g.className),w[L(S)&&!A.has(S)?"class":"className"]=N,w.ref=s,React.createElement(S,w)}(D,e,r)}O.displayName=y;var D=React.forwardRef(O);return D.attrs=S,D.componentStyle=N,D.displayName=y,D.shouldForwardProp=w,D.foldedComponentIds=i?ie(a.foldedComponentIds,a.styledComponentId):"",D.styledComponentId=g,D.target=i?a.target:e,Object.defineProperty(D,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(e){this._foldedDefaultProps=i?function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];for(var o=0,r=t;o<r.length;o++)le(e,r[o],!0);return e}({},a.defaultProps,e):e;}}),"production"!==process.env.NODE_ENV&&(P(y,g),D.warnTooManyClasses=function(e,t){var n={},o=!1;return function(r){if(!o&&(n[r]=!0,Object.keys(n).length>=200)){var s=t?' with the id of "'.concat(t,'"'):"";console.warn("Over ".concat(200," classes were generated for component ").concat(e).concat(s,".\n")+"Consider using the attrs method, together with a style object for frequently changed styles.\nExample:\n const Component = styled.div.attrs(props => ({\n style: {\n background: props.background,\n },\n }))`width: 100%;`\n\n <Component />"),o=!0,n={};}}}(y,g)),ue(D,function(){return ".".concat(D.styledComponentId)}),c&&oe(D,e,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0}),D}function it(e,t){for(var n=[e[0]],o=0,r=t.length;o<r;o+=1)n.push(t[o],e[o+1]);return n}var at=function(e){return Object.assign(e,{isCss:!0})};function ct(t){for(var n=[],o=1;o<arguments.length;o++)n[o-1]=arguments[o];if(re(t)||ce(t))return at(Je(it(_,__spreadArray([t],n,!0))));var r=t;return 0===n.length&&1===r.length&&"string"==typeof r[0]?Je(r):at(Je(it(r,n)))}function lt(n,o,r){if(void 0===r&&(r=C),!o)throw he(1,o);var s=function(t){for(var s=[],i=1;i<arguments.length;i++)s[i-1]=arguments[i];return n(o,r,ct.apply(void 0,__spreadArray([t],s,!1)))};return s.attrs=function(e){return lt(n,o,__assign(__assign({},r),{attrs:Array.prototype.concat(r.attrs,e).filter(Boolean)}))},s.withConfig=function(e){return lt(n,o,__assign(__assign({},r),e))},s}var ut=function(e){return lt(st,e)},pt=ut;A.forEach(function(e){pt[e]=ut(e);});function ft(t){for(var n=[],o=1;o<arguments.length;o++)n[o-1]=arguments[o];"production"!==process.env.NODE_ENV&&"undefined"!=typeof navigator&&"ReactNative"===navigator.product&&console.warn("`keyframes` cannot be used on ReactNative, only on the web. To do animation in ReactNative please use Animated.");var r=ae(ct.apply(void 0,__spreadArray([t],n,!1))),s=$(r);return new Ye(s,r)}"production"!==process.env.NODE_ENV&&"undefined"!=typeof navigator&&"ReactNative"===navigator.product&&console.warn("It looks like you've imported 'styled-components' on React Native.\nPerhaps you're looking to import 'styled-components/native'?\nRead more about this at https://www.styled-components.com/docs/basics#react-native");var St="__sc-".concat(f,"__");"production"!==process.env.NODE_ENV&&"test"!==process.env.NODE_ENV&&"undefined"!=typeof window&&(window[St]||(window[St]=0),1===window[St]&&console.warn("It looks like there are several instances of 'styled-components' initialized in this application. This may cause dynamic styles to not render properly, errors during the rehydration process, a missing theme prop, and makes your application bigger without good reason.\n\nSee https://s-c.sh/2BAXzed for more info."),window[St]+=1);
956
+
957
+ // Estilos base compartilhados
958
+ var BaseButton = pt.button(templateObject_1$2 || (templateObject_1$2 = __makeTemplateObject(["\n all: unset;\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 4px;\n cursor: pointer;\n\n &:disabled {\n cursor: not-allowed;\n }\n"], ["\n all: unset;\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 4px;\n cursor: pointer;\n\n &:disabled {\n cursor: not-allowed;\n }\n"])));
959
+ // Estilos do botão primário
960
+ var PrimaryButton = ct(templateObject_2$1 || (templateObject_2$1 = __makeTemplateObject(["\n width: fit-content;\n height: fit-content;\n padding: 12px 16px;\n border-radius: 8px;\n border: 1px solid ", ";\n color: #fff;\n font-weight: 700;\n background: ", ";\n"], ["\n width: fit-content;\n height: fit-content;\n padding: 12px 16px;\n border-radius: 8px;\n border: 1px solid ", ";\n color: #fff;\n font-weight: 700;\n background: ", ";\n"])), function (_a) {
961
+ var theme = _a.theme;
962
+ return theme.colors.primary;
963
+ }, function (_a) {
964
+ var theme = _a.theme;
965
+ return theme.colors.primary;
966
+ });
967
+ // Estilos do botão secundário
968
+ var SecondaryButton = ct(templateObject_3$1 || (templateObject_3$1 = __makeTemplateObject(["\n width: fit-content;\n height: fit-content;\n padding: 12px 8px;\n border-radius: 8px;\n border: 1px solid ", ";\n font-weight: 700;\n color: ", ";\n background: transparent;\n"], ["\n width: fit-content;\n height: fit-content;\n padding: 12px 8px;\n border-radius: 8px;\n border: 1px solid ", ";\n font-weight: 700;\n color: ", ";\n background: transparent;\n"])), function (_a) {
969
+ var theme = _a.theme;
970
+ return theme.colors.primary;
971
+ }, function (_a) {
972
+ var theme = _a.theme;
973
+ return theme.colors.primary;
974
+ });
975
+ var templateObject_1$2, templateObject_2$1, templateObject_3$1;
976
+
977
+ var StyledButton = pt(BaseButton)(templateObject_1$1 || (templateObject_1$1 = __makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), function (_a) {
978
+ var variant = _a.variant;
979
+ return variant === "primary" ? PrimaryButton : SecondaryButton;
980
+ });
981
+ function Button(_a) {
982
+ var variant = _a.variant, _b = _a.text, text = _b === void 0 ? "" : _b, leftIcon = _a.leftIcon, props = __rest(_a, ["variant", "text", "leftIcon"]);
983
+ return (React.createElement(StyledButton, __assign({ variant: variant }, props),
984
+ leftIcon,
985
+ text));
986
+ }
987
+ var templateObject_1$1;
988
+
989
+ // packages/react/context/src/createContext.tsx
990
+ function createContext2(rootComponentName, defaultContext) {
991
+ const Context = React__namespace.createContext(defaultContext);
992
+ function Provider(props) {
993
+ const { children, ...context } = props;
994
+ const value = React__namespace.useMemo(() => context, Object.values(context));
995
+ return /* @__PURE__ */ jsxRuntime.jsx(Context.Provider, { value, children });
996
+ }
997
+ function useContext2(consumerName) {
998
+ const context = React__namespace.useContext(Context);
999
+ if (context) return context;
1000
+ if (defaultContext !== void 0) return defaultContext;
1001
+ throw new Error(`\`${consumerName}\` must be used within \`${rootComponentName}\``);
1002
+ }
1003
+ Provider.displayName = rootComponentName + "Provider";
1004
+ return [Provider, useContext2];
1005
+ }
1006
+ function createContextScope(scopeName, createContextScopeDeps = []) {
1007
+ let defaultContexts = [];
1008
+ function createContext3(rootComponentName, defaultContext) {
1009
+ const BaseContext = React__namespace.createContext(defaultContext);
1010
+ const index = defaultContexts.length;
1011
+ defaultContexts = [...defaultContexts, defaultContext];
1012
+ function Provider(props) {
1013
+ const { scope, children, ...context } = props;
1014
+ const Context = scope?.[scopeName][index] || BaseContext;
1015
+ const value = React__namespace.useMemo(() => context, Object.values(context));
1016
+ return /* @__PURE__ */ jsxRuntime.jsx(Context.Provider, { value, children });
60
1017
  }
61
- } else {
62
- head.appendChild(style);
1018
+ function useContext2(consumerName, scope) {
1019
+ const Context = scope?.[scopeName][index] || BaseContext;
1020
+ const context = React__namespace.useContext(Context);
1021
+ if (context) return context;
1022
+ if (defaultContext !== void 0) return defaultContext;
1023
+ throw new Error(`\`${consumerName}\` must be used within \`${rootComponentName}\``);
1024
+ }
1025
+ Provider.displayName = rootComponentName + "Provider";
1026
+ return [Provider, useContext2];
1027
+ }
1028
+ const createScope = () => {
1029
+ const scopeContexts = defaultContexts.map((defaultContext) => {
1030
+ return React__namespace.createContext(defaultContext);
1031
+ });
1032
+ return function useScope(scope) {
1033
+ const contexts = scope?.[scopeName] || scopeContexts;
1034
+ return React__namespace.useMemo(
1035
+ () => ({ [`__scope${scopeName}`]: { ...scope, [scopeName]: contexts } }),
1036
+ [scope, contexts]
1037
+ );
1038
+ };
1039
+ };
1040
+ createScope.scopeName = scopeName;
1041
+ return [createContext3, composeContextScopes(createScope, ...createContextScopeDeps)];
1042
+ }
1043
+ function composeContextScopes(...scopes) {
1044
+ const baseScope = scopes[0];
1045
+ if (scopes.length === 1) return baseScope;
1046
+ const createScope = () => {
1047
+ const scopeHooks = scopes.map((createScope2) => ({
1048
+ useScope: createScope2(),
1049
+ scopeName: createScope2.scopeName
1050
+ }));
1051
+ return function useComposedScopes(overrideScopes) {
1052
+ const nextScopes = scopeHooks.reduce((nextScopes2, { useScope, scopeName }) => {
1053
+ const scopeProps = useScope(overrideScopes);
1054
+ const currentScope = scopeProps[`__scope${scopeName}`];
1055
+ return { ...nextScopes2, ...currentScope };
1056
+ }, {});
1057
+ return React__namespace.useMemo(() => ({ [`__scope${baseScope.scopeName}`]: nextScopes }), [nextScopes]);
1058
+ };
1059
+ };
1060
+ createScope.scopeName = baseScope.scopeName;
1061
+ return createScope;
1062
+ }
1063
+
1064
+ // packages/react/compose-refs/src/composeRefs.tsx
1065
+ function setRef(ref, value) {
1066
+ if (typeof ref === "function") {
1067
+ ref(value);
1068
+ } else if (ref !== null && ref !== void 0) {
1069
+ ref.current = value;
63
1070
  }
1071
+ }
1072
+ function composeRefs(...refs) {
1073
+ return (node) => refs.forEach((ref) => setRef(ref, node));
1074
+ }
1075
+ function useComposedRefs(...refs) {
1076
+ return React__namespace.useCallback(composeRefs(...refs), refs);
1077
+ }
64
1078
 
65
- if (style.styleSheet) {
66
- style.styleSheet.cssText = css;
1079
+ // packages/core/primitive/src/primitive.tsx
1080
+ function composeEventHandlers(originalEventHandler, ourEventHandler, { checkForDefaultPrevented = true } = {}) {
1081
+ return function handleEvent(event) {
1082
+ originalEventHandler?.(event);
1083
+ if (checkForDefaultPrevented === false || !event.defaultPrevented) {
1084
+ return ourEventHandler?.(event);
1085
+ }
1086
+ };
1087
+ }
1088
+
1089
+ // packages/react/use-layout-effect/src/useLayoutEffect.tsx
1090
+ var useLayoutEffect2 = Boolean(globalThis?.document) ? React__namespace.useLayoutEffect : () => {
1091
+ };
1092
+
1093
+ // packages/react/id/src/id.tsx
1094
+ var useReactId = React__namespace["useId".toString()] || (() => void 0);
1095
+ var count$1 = 0;
1096
+ function useId(deterministicId) {
1097
+ const [id, setId] = React__namespace.useState(useReactId());
1098
+ useLayoutEffect2(() => {
1099
+ if (!deterministicId) setId((reactId) => reactId ?? String(count$1++));
1100
+ }, [deterministicId]);
1101
+ return deterministicId || (id ? `radix-${id}` : "");
1102
+ }
1103
+
1104
+ // packages/react/use-callback-ref/src/useCallbackRef.tsx
1105
+ function useCallbackRef$1(callback) {
1106
+ const callbackRef = React__namespace.useRef(callback);
1107
+ React__namespace.useEffect(() => {
1108
+ callbackRef.current = callback;
1109
+ });
1110
+ return React__namespace.useMemo(() => (...args) => callbackRef.current?.(...args), []);
1111
+ }
1112
+
1113
+ // packages/react/use-controllable-state/src/useControllableState.tsx
1114
+ function useControllableState({
1115
+ prop,
1116
+ defaultProp,
1117
+ onChange = () => {
1118
+ }
1119
+ }) {
1120
+ const [uncontrolledProp, setUncontrolledProp] = useUncontrolledState({ defaultProp, onChange });
1121
+ const isControlled = prop !== void 0;
1122
+ const value = isControlled ? prop : uncontrolledProp;
1123
+ const handleChange = useCallbackRef$1(onChange);
1124
+ const setValue = React__namespace.useCallback(
1125
+ (nextValue) => {
1126
+ if (isControlled) {
1127
+ const setter = nextValue;
1128
+ const value2 = typeof nextValue === "function" ? setter(prop) : nextValue;
1129
+ if (value2 !== prop) handleChange(value2);
1130
+ } else {
1131
+ setUncontrolledProp(nextValue);
1132
+ }
1133
+ },
1134
+ [isControlled, prop, setUncontrolledProp, handleChange]
1135
+ );
1136
+ return [value, setValue];
1137
+ }
1138
+ function useUncontrolledState({
1139
+ defaultProp,
1140
+ onChange
1141
+ }) {
1142
+ const uncontrolledState = React__namespace.useState(defaultProp);
1143
+ const [value] = uncontrolledState;
1144
+ const prevValueRef = React__namespace.useRef(value);
1145
+ const handleChange = useCallbackRef$1(onChange);
1146
+ React__namespace.useEffect(() => {
1147
+ if (prevValueRef.current !== value) {
1148
+ handleChange(value);
1149
+ prevValueRef.current = value;
1150
+ }
1151
+ }, [value, prevValueRef, handleChange]);
1152
+ return uncontrolledState;
1153
+ }
1154
+
1155
+ // packages/react/slot/src/Slot.tsx
1156
+ var Slot = React__namespace.forwardRef((props, forwardedRef) => {
1157
+ const { children, ...slotProps } = props;
1158
+ const childrenArray = React__namespace.Children.toArray(children);
1159
+ const slottable = childrenArray.find(isSlottable);
1160
+ if (slottable) {
1161
+ const newElement = slottable.props.children;
1162
+ const newChildren = childrenArray.map((child) => {
1163
+ if (child === slottable) {
1164
+ if (React__namespace.Children.count(newElement) > 1) return React__namespace.Children.only(null);
1165
+ return React__namespace.isValidElement(newElement) ? newElement.props.children : null;
1166
+ } else {
1167
+ return child;
1168
+ }
1169
+ });
1170
+ return /* @__PURE__ */ jsxRuntime.jsx(SlotClone, { ...slotProps, ref: forwardedRef, children: React__namespace.isValidElement(newElement) ? React__namespace.cloneElement(newElement, void 0, newChildren) : null });
1171
+ }
1172
+ return /* @__PURE__ */ jsxRuntime.jsx(SlotClone, { ...slotProps, ref: forwardedRef, children });
1173
+ });
1174
+ Slot.displayName = "Slot";
1175
+ var SlotClone = React__namespace.forwardRef((props, forwardedRef) => {
1176
+ const { children, ...slotProps } = props;
1177
+ if (React__namespace.isValidElement(children)) {
1178
+ const childrenRef = getElementRef$1(children);
1179
+ return React__namespace.cloneElement(children, {
1180
+ ...mergeProps(slotProps, children.props),
1181
+ // @ts-ignore
1182
+ ref: forwardedRef ? composeRefs(forwardedRef, childrenRef) : childrenRef
1183
+ });
1184
+ }
1185
+ return React__namespace.Children.count(children) > 1 ? React__namespace.Children.only(null) : null;
1186
+ });
1187
+ SlotClone.displayName = "SlotClone";
1188
+ var Slottable = ({ children }) => {
1189
+ return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children });
1190
+ };
1191
+ function isSlottable(child) {
1192
+ return React__namespace.isValidElement(child) && child.type === Slottable;
1193
+ }
1194
+ function mergeProps(slotProps, childProps) {
1195
+ const overrideProps = { ...childProps };
1196
+ for (const propName in childProps) {
1197
+ const slotPropValue = slotProps[propName];
1198
+ const childPropValue = childProps[propName];
1199
+ const isHandler = /^on[A-Z]/.test(propName);
1200
+ if (isHandler) {
1201
+ if (slotPropValue && childPropValue) {
1202
+ overrideProps[propName] = (...args) => {
1203
+ childPropValue(...args);
1204
+ slotPropValue(...args);
1205
+ };
1206
+ } else if (slotPropValue) {
1207
+ overrideProps[propName] = slotPropValue;
1208
+ }
1209
+ } else if (propName === "style") {
1210
+ overrideProps[propName] = { ...slotPropValue, ...childPropValue };
1211
+ } else if (propName === "className") {
1212
+ overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(" ");
1213
+ }
1214
+ }
1215
+ return { ...slotProps, ...overrideProps };
1216
+ }
1217
+ function getElementRef$1(element) {
1218
+ let getter = Object.getOwnPropertyDescriptor(element.props, "ref")?.get;
1219
+ let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
1220
+ if (mayWarn) {
1221
+ return element.ref;
1222
+ }
1223
+ getter = Object.getOwnPropertyDescriptor(element, "ref")?.get;
1224
+ mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
1225
+ if (mayWarn) {
1226
+ return element.props.ref;
1227
+ }
1228
+ return element.props.ref || element.ref;
1229
+ }
1230
+
1231
+ // packages/react/primitive/src/Primitive.tsx
1232
+ var NODES = [
1233
+ "a",
1234
+ "button",
1235
+ "div",
1236
+ "form",
1237
+ "h2",
1238
+ "h3",
1239
+ "img",
1240
+ "input",
1241
+ "label",
1242
+ "li",
1243
+ "nav",
1244
+ "ol",
1245
+ "p",
1246
+ "span",
1247
+ "svg",
1248
+ "ul"
1249
+ ];
1250
+ var Primitive = NODES.reduce((primitive, node) => {
1251
+ const Node = React__namespace.forwardRef((props, forwardedRef) => {
1252
+ const { asChild, ...primitiveProps } = props;
1253
+ const Comp = asChild ? Slot : node;
1254
+ if (typeof window !== "undefined") {
1255
+ window[Symbol.for("radix-ui")] = true;
1256
+ }
1257
+ return /* @__PURE__ */ jsxRuntime.jsx(Comp, { ...primitiveProps, ref: forwardedRef });
1258
+ });
1259
+ Node.displayName = `Primitive.${node}`;
1260
+ return { ...primitive, [node]: Node };
1261
+ }, {});
1262
+ function dispatchDiscreteCustomEvent(target, event) {
1263
+ if (target) ReactDOM__namespace.flushSync(() => target.dispatchEvent(event));
1264
+ }
1265
+
1266
+ // packages/react/use-escape-keydown/src/useEscapeKeydown.tsx
1267
+ function useEscapeKeydown(onEscapeKeyDownProp, ownerDocument = globalThis?.document) {
1268
+ const onEscapeKeyDown = useCallbackRef$1(onEscapeKeyDownProp);
1269
+ React__namespace.useEffect(() => {
1270
+ const handleKeyDown = (event) => {
1271
+ if (event.key === "Escape") {
1272
+ onEscapeKeyDown(event);
1273
+ }
1274
+ };
1275
+ ownerDocument.addEventListener("keydown", handleKeyDown, { capture: true });
1276
+ return () => ownerDocument.removeEventListener("keydown", handleKeyDown, { capture: true });
1277
+ }, [onEscapeKeyDown, ownerDocument]);
1278
+ }
1279
+
1280
+ var DISMISSABLE_LAYER_NAME = "DismissableLayer";
1281
+ var CONTEXT_UPDATE = "dismissableLayer.update";
1282
+ var POINTER_DOWN_OUTSIDE = "dismissableLayer.pointerDownOutside";
1283
+ var FOCUS_OUTSIDE = "dismissableLayer.focusOutside";
1284
+ var originalBodyPointerEvents;
1285
+ var DismissableLayerContext = React__namespace.createContext({
1286
+ layers: /* @__PURE__ */ new Set(),
1287
+ layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),
1288
+ branches: /* @__PURE__ */ new Set()
1289
+ });
1290
+ var DismissableLayer = React__namespace.forwardRef(
1291
+ (props, forwardedRef) => {
1292
+ const {
1293
+ disableOutsidePointerEvents = false,
1294
+ onEscapeKeyDown,
1295
+ onPointerDownOutside,
1296
+ onFocusOutside,
1297
+ onInteractOutside,
1298
+ onDismiss,
1299
+ ...layerProps
1300
+ } = props;
1301
+ const context = React__namespace.useContext(DismissableLayerContext);
1302
+ const [node, setNode] = React__namespace.useState(null);
1303
+ const ownerDocument = node?.ownerDocument ?? globalThis?.document;
1304
+ const [, force] = React__namespace.useState({});
1305
+ const composedRefs = useComposedRefs(forwardedRef, (node2) => setNode(node2));
1306
+ const layers = Array.from(context.layers);
1307
+ const [highestLayerWithOutsidePointerEventsDisabled] = [...context.layersWithOutsidePointerEventsDisabled].slice(-1);
1308
+ const highestLayerWithOutsidePointerEventsDisabledIndex = layers.indexOf(highestLayerWithOutsidePointerEventsDisabled);
1309
+ const index = node ? layers.indexOf(node) : -1;
1310
+ const isBodyPointerEventsDisabled = context.layersWithOutsidePointerEventsDisabled.size > 0;
1311
+ const isPointerEventsEnabled = index >= highestLayerWithOutsidePointerEventsDisabledIndex;
1312
+ const pointerDownOutside = usePointerDownOutside((event) => {
1313
+ const target = event.target;
1314
+ const isPointerDownOnBranch = [...context.branches].some((branch) => branch.contains(target));
1315
+ if (!isPointerEventsEnabled || isPointerDownOnBranch) return;
1316
+ onPointerDownOutside?.(event);
1317
+ onInteractOutside?.(event);
1318
+ if (!event.defaultPrevented) onDismiss?.();
1319
+ }, ownerDocument);
1320
+ const focusOutside = useFocusOutside((event) => {
1321
+ const target = event.target;
1322
+ const isFocusInBranch = [...context.branches].some((branch) => branch.contains(target));
1323
+ if (isFocusInBranch) return;
1324
+ onFocusOutside?.(event);
1325
+ onInteractOutside?.(event);
1326
+ if (!event.defaultPrevented) onDismiss?.();
1327
+ }, ownerDocument);
1328
+ useEscapeKeydown((event) => {
1329
+ const isHighestLayer = index === context.layers.size - 1;
1330
+ if (!isHighestLayer) return;
1331
+ onEscapeKeyDown?.(event);
1332
+ if (!event.defaultPrevented && onDismiss) {
1333
+ event.preventDefault();
1334
+ onDismiss();
1335
+ }
1336
+ }, ownerDocument);
1337
+ React__namespace.useEffect(() => {
1338
+ if (!node) return;
1339
+ if (disableOutsidePointerEvents) {
1340
+ if (context.layersWithOutsidePointerEventsDisabled.size === 0) {
1341
+ originalBodyPointerEvents = ownerDocument.body.style.pointerEvents;
1342
+ ownerDocument.body.style.pointerEvents = "none";
1343
+ }
1344
+ context.layersWithOutsidePointerEventsDisabled.add(node);
1345
+ }
1346
+ context.layers.add(node);
1347
+ dispatchUpdate();
1348
+ return () => {
1349
+ if (disableOutsidePointerEvents && context.layersWithOutsidePointerEventsDisabled.size === 1) {
1350
+ ownerDocument.body.style.pointerEvents = originalBodyPointerEvents;
1351
+ }
1352
+ };
1353
+ }, [node, ownerDocument, disableOutsidePointerEvents, context]);
1354
+ React__namespace.useEffect(() => {
1355
+ return () => {
1356
+ if (!node) return;
1357
+ context.layers.delete(node);
1358
+ context.layersWithOutsidePointerEventsDisabled.delete(node);
1359
+ dispatchUpdate();
1360
+ };
1361
+ }, [node, context]);
1362
+ React__namespace.useEffect(() => {
1363
+ const handleUpdate = () => force({});
1364
+ document.addEventListener(CONTEXT_UPDATE, handleUpdate);
1365
+ return () => document.removeEventListener(CONTEXT_UPDATE, handleUpdate);
1366
+ }, []);
1367
+ return /* @__PURE__ */ jsxRuntime.jsx(
1368
+ Primitive.div,
1369
+ {
1370
+ ...layerProps,
1371
+ ref: composedRefs,
1372
+ style: {
1373
+ pointerEvents: isBodyPointerEventsDisabled ? isPointerEventsEnabled ? "auto" : "none" : void 0,
1374
+ ...props.style
1375
+ },
1376
+ onFocusCapture: composeEventHandlers(props.onFocusCapture, focusOutside.onFocusCapture),
1377
+ onBlurCapture: composeEventHandlers(props.onBlurCapture, focusOutside.onBlurCapture),
1378
+ onPointerDownCapture: composeEventHandlers(
1379
+ props.onPointerDownCapture,
1380
+ pointerDownOutside.onPointerDownCapture
1381
+ )
1382
+ }
1383
+ );
1384
+ }
1385
+ );
1386
+ DismissableLayer.displayName = DISMISSABLE_LAYER_NAME;
1387
+ var BRANCH_NAME = "DismissableLayerBranch";
1388
+ var DismissableLayerBranch = React__namespace.forwardRef((props, forwardedRef) => {
1389
+ const context = React__namespace.useContext(DismissableLayerContext);
1390
+ const ref = React__namespace.useRef(null);
1391
+ const composedRefs = useComposedRefs(forwardedRef, ref);
1392
+ React__namespace.useEffect(() => {
1393
+ const node = ref.current;
1394
+ if (node) {
1395
+ context.branches.add(node);
1396
+ return () => {
1397
+ context.branches.delete(node);
1398
+ };
1399
+ }
1400
+ }, [context.branches]);
1401
+ return /* @__PURE__ */ jsxRuntime.jsx(Primitive.div, { ...props, ref: composedRefs });
1402
+ });
1403
+ DismissableLayerBranch.displayName = BRANCH_NAME;
1404
+ function usePointerDownOutside(onPointerDownOutside, ownerDocument = globalThis?.document) {
1405
+ const handlePointerDownOutside = useCallbackRef$1(onPointerDownOutside);
1406
+ const isPointerInsideReactTreeRef = React__namespace.useRef(false);
1407
+ const handleClickRef = React__namespace.useRef(() => {
1408
+ });
1409
+ React__namespace.useEffect(() => {
1410
+ const handlePointerDown = (event) => {
1411
+ if (event.target && !isPointerInsideReactTreeRef.current) {
1412
+ let handleAndDispatchPointerDownOutsideEvent2 = function() {
1413
+ handleAndDispatchCustomEvent(
1414
+ POINTER_DOWN_OUTSIDE,
1415
+ handlePointerDownOutside,
1416
+ eventDetail,
1417
+ { discrete: true }
1418
+ );
1419
+ };
1420
+ const eventDetail = { originalEvent: event };
1421
+ if (event.pointerType === "touch") {
1422
+ ownerDocument.removeEventListener("click", handleClickRef.current);
1423
+ handleClickRef.current = handleAndDispatchPointerDownOutsideEvent2;
1424
+ ownerDocument.addEventListener("click", handleClickRef.current, { once: true });
1425
+ } else {
1426
+ handleAndDispatchPointerDownOutsideEvent2();
1427
+ }
1428
+ } else {
1429
+ ownerDocument.removeEventListener("click", handleClickRef.current);
1430
+ }
1431
+ isPointerInsideReactTreeRef.current = false;
1432
+ };
1433
+ const timerId = window.setTimeout(() => {
1434
+ ownerDocument.addEventListener("pointerdown", handlePointerDown);
1435
+ }, 0);
1436
+ return () => {
1437
+ window.clearTimeout(timerId);
1438
+ ownerDocument.removeEventListener("pointerdown", handlePointerDown);
1439
+ ownerDocument.removeEventListener("click", handleClickRef.current);
1440
+ };
1441
+ }, [ownerDocument, handlePointerDownOutside]);
1442
+ return {
1443
+ // ensures we check React component tree (not just DOM tree)
1444
+ onPointerDownCapture: () => isPointerInsideReactTreeRef.current = true
1445
+ };
1446
+ }
1447
+ function useFocusOutside(onFocusOutside, ownerDocument = globalThis?.document) {
1448
+ const handleFocusOutside = useCallbackRef$1(onFocusOutside);
1449
+ const isFocusInsideReactTreeRef = React__namespace.useRef(false);
1450
+ React__namespace.useEffect(() => {
1451
+ const handleFocus = (event) => {
1452
+ if (event.target && !isFocusInsideReactTreeRef.current) {
1453
+ const eventDetail = { originalEvent: event };
1454
+ handleAndDispatchCustomEvent(FOCUS_OUTSIDE, handleFocusOutside, eventDetail, {
1455
+ discrete: false
1456
+ });
1457
+ }
1458
+ };
1459
+ ownerDocument.addEventListener("focusin", handleFocus);
1460
+ return () => ownerDocument.removeEventListener("focusin", handleFocus);
1461
+ }, [ownerDocument, handleFocusOutside]);
1462
+ return {
1463
+ onFocusCapture: () => isFocusInsideReactTreeRef.current = true,
1464
+ onBlurCapture: () => isFocusInsideReactTreeRef.current = false
1465
+ };
1466
+ }
1467
+ function dispatchUpdate() {
1468
+ const event = new CustomEvent(CONTEXT_UPDATE);
1469
+ document.dispatchEvent(event);
1470
+ }
1471
+ function handleAndDispatchCustomEvent(name, handler, detail, { discrete }) {
1472
+ const target = detail.originalEvent.target;
1473
+ const event = new CustomEvent(name, { bubbles: false, cancelable: true, detail });
1474
+ if (handler) target.addEventListener(name, handler, { once: true });
1475
+ if (discrete) {
1476
+ dispatchDiscreteCustomEvent(target, event);
67
1477
  } else {
68
- style.appendChild(document.createTextNode(css));
1478
+ target.dispatchEvent(event);
1479
+ }
1480
+ }
1481
+
1482
+ var AUTOFOCUS_ON_MOUNT = "focusScope.autoFocusOnMount";
1483
+ var AUTOFOCUS_ON_UNMOUNT = "focusScope.autoFocusOnUnmount";
1484
+ var EVENT_OPTIONS = { bubbles: false, cancelable: true };
1485
+ var FOCUS_SCOPE_NAME = "FocusScope";
1486
+ var FocusScope = React__namespace.forwardRef((props, forwardedRef) => {
1487
+ const {
1488
+ loop = false,
1489
+ trapped = false,
1490
+ onMountAutoFocus: onMountAutoFocusProp,
1491
+ onUnmountAutoFocus: onUnmountAutoFocusProp,
1492
+ ...scopeProps
1493
+ } = props;
1494
+ const [container, setContainer] = React__namespace.useState(null);
1495
+ const onMountAutoFocus = useCallbackRef$1(onMountAutoFocusProp);
1496
+ const onUnmountAutoFocus = useCallbackRef$1(onUnmountAutoFocusProp);
1497
+ const lastFocusedElementRef = React__namespace.useRef(null);
1498
+ const composedRefs = useComposedRefs(forwardedRef, (node) => setContainer(node));
1499
+ const focusScope = React__namespace.useRef({
1500
+ paused: false,
1501
+ pause() {
1502
+ this.paused = true;
1503
+ },
1504
+ resume() {
1505
+ this.paused = false;
1506
+ }
1507
+ }).current;
1508
+ React__namespace.useEffect(() => {
1509
+ if (trapped) {
1510
+ let handleFocusIn2 = function(event) {
1511
+ if (focusScope.paused || !container) return;
1512
+ const target = event.target;
1513
+ if (container.contains(target)) {
1514
+ lastFocusedElementRef.current = target;
1515
+ } else {
1516
+ focus(lastFocusedElementRef.current, { select: true });
1517
+ }
1518
+ }, handleFocusOut2 = function(event) {
1519
+ if (focusScope.paused || !container) return;
1520
+ const relatedTarget = event.relatedTarget;
1521
+ if (relatedTarget === null) return;
1522
+ if (!container.contains(relatedTarget)) {
1523
+ focus(lastFocusedElementRef.current, { select: true });
1524
+ }
1525
+ }, handleMutations2 = function(mutations) {
1526
+ const focusedElement = document.activeElement;
1527
+ if (focusedElement !== document.body) return;
1528
+ for (const mutation of mutations) {
1529
+ if (mutation.removedNodes.length > 0) focus(container);
1530
+ }
1531
+ };
1532
+ document.addEventListener("focusin", handleFocusIn2);
1533
+ document.addEventListener("focusout", handleFocusOut2);
1534
+ const mutationObserver = new MutationObserver(handleMutations2);
1535
+ if (container) mutationObserver.observe(container, { childList: true, subtree: true });
1536
+ return () => {
1537
+ document.removeEventListener("focusin", handleFocusIn2);
1538
+ document.removeEventListener("focusout", handleFocusOut2);
1539
+ mutationObserver.disconnect();
1540
+ };
1541
+ }
1542
+ }, [trapped, container, focusScope.paused]);
1543
+ React__namespace.useEffect(() => {
1544
+ if (container) {
1545
+ focusScopesStack.add(focusScope);
1546
+ const previouslyFocusedElement = document.activeElement;
1547
+ const hasFocusedCandidate = container.contains(previouslyFocusedElement);
1548
+ if (!hasFocusedCandidate) {
1549
+ const mountEvent = new CustomEvent(AUTOFOCUS_ON_MOUNT, EVENT_OPTIONS);
1550
+ container.addEventListener(AUTOFOCUS_ON_MOUNT, onMountAutoFocus);
1551
+ container.dispatchEvent(mountEvent);
1552
+ if (!mountEvent.defaultPrevented) {
1553
+ focusFirst(removeLinks(getTabbableCandidates(container)), { select: true });
1554
+ if (document.activeElement === previouslyFocusedElement) {
1555
+ focus(container);
1556
+ }
1557
+ }
1558
+ }
1559
+ return () => {
1560
+ container.removeEventListener(AUTOFOCUS_ON_MOUNT, onMountAutoFocus);
1561
+ setTimeout(() => {
1562
+ const unmountEvent = new CustomEvent(AUTOFOCUS_ON_UNMOUNT, EVENT_OPTIONS);
1563
+ container.addEventListener(AUTOFOCUS_ON_UNMOUNT, onUnmountAutoFocus);
1564
+ container.dispatchEvent(unmountEvent);
1565
+ if (!unmountEvent.defaultPrevented) {
1566
+ focus(previouslyFocusedElement ?? document.body, { select: true });
1567
+ }
1568
+ container.removeEventListener(AUTOFOCUS_ON_UNMOUNT, onUnmountAutoFocus);
1569
+ focusScopesStack.remove(focusScope);
1570
+ }, 0);
1571
+ };
1572
+ }
1573
+ }, [container, onMountAutoFocus, onUnmountAutoFocus, focusScope]);
1574
+ const handleKeyDown = React__namespace.useCallback(
1575
+ (event) => {
1576
+ if (!loop && !trapped) return;
1577
+ if (focusScope.paused) return;
1578
+ const isTabKey = event.key === "Tab" && !event.altKey && !event.ctrlKey && !event.metaKey;
1579
+ const focusedElement = document.activeElement;
1580
+ if (isTabKey && focusedElement) {
1581
+ const container2 = event.currentTarget;
1582
+ const [first, last] = getTabbableEdges(container2);
1583
+ const hasTabbableElementsInside = first && last;
1584
+ if (!hasTabbableElementsInside) {
1585
+ if (focusedElement === container2) event.preventDefault();
1586
+ } else {
1587
+ if (!event.shiftKey && focusedElement === last) {
1588
+ event.preventDefault();
1589
+ if (loop) focus(first, { select: true });
1590
+ } else if (event.shiftKey && focusedElement === first) {
1591
+ event.preventDefault();
1592
+ if (loop) focus(last, { select: true });
1593
+ }
1594
+ }
1595
+ }
1596
+ },
1597
+ [loop, trapped, focusScope.paused]
1598
+ );
1599
+ return /* @__PURE__ */ jsxRuntime.jsx(Primitive.div, { tabIndex: -1, ...scopeProps, ref: composedRefs, onKeyDown: handleKeyDown });
1600
+ });
1601
+ FocusScope.displayName = FOCUS_SCOPE_NAME;
1602
+ function focusFirst(candidates, { select = false } = {}) {
1603
+ const previouslyFocusedElement = document.activeElement;
1604
+ for (const candidate of candidates) {
1605
+ focus(candidate, { select });
1606
+ if (document.activeElement !== previouslyFocusedElement) return;
1607
+ }
1608
+ }
1609
+ function getTabbableEdges(container) {
1610
+ const candidates = getTabbableCandidates(container);
1611
+ const first = findVisible(candidates, container);
1612
+ const last = findVisible(candidates.reverse(), container);
1613
+ return [first, last];
1614
+ }
1615
+ function getTabbableCandidates(container) {
1616
+ const nodes = [];
1617
+ const walker = document.createTreeWalker(container, NodeFilter.SHOW_ELEMENT, {
1618
+ acceptNode: (node) => {
1619
+ const isHiddenInput = node.tagName === "INPUT" && node.type === "hidden";
1620
+ if (node.disabled || node.hidden || isHiddenInput) return NodeFilter.FILTER_SKIP;
1621
+ return node.tabIndex >= 0 ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
1622
+ }
1623
+ });
1624
+ while (walker.nextNode()) nodes.push(walker.currentNode);
1625
+ return nodes;
1626
+ }
1627
+ function findVisible(elements, container) {
1628
+ for (const element of elements) {
1629
+ if (!isHidden(element, { upTo: container })) return element;
1630
+ }
1631
+ }
1632
+ function isHidden(node, { upTo }) {
1633
+ if (getComputedStyle(node).visibility === "hidden") return true;
1634
+ while (node) {
1635
+ if (upTo !== void 0 && node === upTo) return false;
1636
+ if (getComputedStyle(node).display === "none") return true;
1637
+ node = node.parentElement;
1638
+ }
1639
+ return false;
1640
+ }
1641
+ function isSelectableInput(element) {
1642
+ return element instanceof HTMLInputElement && "select" in element;
1643
+ }
1644
+ function focus(element, { select = false } = {}) {
1645
+ if (element && element.focus) {
1646
+ const previouslyFocusedElement = document.activeElement;
1647
+ element.focus({ preventScroll: true });
1648
+ if (element !== previouslyFocusedElement && isSelectableInput(element) && select)
1649
+ element.select();
1650
+ }
1651
+ }
1652
+ var focusScopesStack = createFocusScopesStack();
1653
+ function createFocusScopesStack() {
1654
+ let stack = [];
1655
+ return {
1656
+ add(focusScope) {
1657
+ const activeFocusScope = stack[0];
1658
+ if (focusScope !== activeFocusScope) {
1659
+ activeFocusScope?.pause();
1660
+ }
1661
+ stack = arrayRemove(stack, focusScope);
1662
+ stack.unshift(focusScope);
1663
+ },
1664
+ remove(focusScope) {
1665
+ stack = arrayRemove(stack, focusScope);
1666
+ stack[0]?.resume();
1667
+ }
1668
+ };
1669
+ }
1670
+ function arrayRemove(array, item) {
1671
+ const updatedArray = [...array];
1672
+ const index = updatedArray.indexOf(item);
1673
+ if (index !== -1) {
1674
+ updatedArray.splice(index, 1);
1675
+ }
1676
+ return updatedArray;
1677
+ }
1678
+ function removeLinks(items) {
1679
+ return items.filter((item) => item.tagName !== "A");
1680
+ }
1681
+
1682
+ var PORTAL_NAME$2 = "Portal";
1683
+ var Portal$1 = React__namespace.forwardRef((props, forwardedRef) => {
1684
+ const { container: containerProp, ...portalProps } = props;
1685
+ const [mounted, setMounted] = React__namespace.useState(false);
1686
+ useLayoutEffect2(() => setMounted(true), []);
1687
+ const container = containerProp || mounted && globalThis?.document?.body;
1688
+ return container ? ReactDOM.createPortal(/* @__PURE__ */ jsxRuntime.jsx(Primitive.div, { ...portalProps, ref: forwardedRef }), container) : null;
1689
+ });
1690
+ Portal$1.displayName = PORTAL_NAME$2;
1691
+
1692
+ function useStateMachine(initialState, machine) {
1693
+ return React__namespace.useReducer((state, event) => {
1694
+ const nextState = machine[state][event];
1695
+ return nextState ?? state;
1696
+ }, initialState);
1697
+ }
1698
+
1699
+ // packages/react/presence/src/Presence.tsx
1700
+ var Presence = (props) => {
1701
+ const { present, children } = props;
1702
+ const presence = usePresence(present);
1703
+ const child = typeof children === "function" ? children({ present: presence.isPresent }) : React__namespace.Children.only(children);
1704
+ const ref = useComposedRefs(presence.ref, getElementRef(child));
1705
+ const forceMount = typeof children === "function";
1706
+ return forceMount || presence.isPresent ? React__namespace.cloneElement(child, { ref }) : null;
1707
+ };
1708
+ Presence.displayName = "Presence";
1709
+ function usePresence(present) {
1710
+ const [node, setNode] = React__namespace.useState();
1711
+ const stylesRef = React__namespace.useRef({});
1712
+ const prevPresentRef = React__namespace.useRef(present);
1713
+ const prevAnimationNameRef = React__namespace.useRef("none");
1714
+ const initialState = present ? "mounted" : "unmounted";
1715
+ const [state, send] = useStateMachine(initialState, {
1716
+ mounted: {
1717
+ UNMOUNT: "unmounted",
1718
+ ANIMATION_OUT: "unmountSuspended"
1719
+ },
1720
+ unmountSuspended: {
1721
+ MOUNT: "mounted",
1722
+ ANIMATION_END: "unmounted"
1723
+ },
1724
+ unmounted: {
1725
+ MOUNT: "mounted"
1726
+ }
1727
+ });
1728
+ React__namespace.useEffect(() => {
1729
+ const currentAnimationName = getAnimationName(stylesRef.current);
1730
+ prevAnimationNameRef.current = state === "mounted" ? currentAnimationName : "none";
1731
+ }, [state]);
1732
+ useLayoutEffect2(() => {
1733
+ const styles = stylesRef.current;
1734
+ const wasPresent = prevPresentRef.current;
1735
+ const hasPresentChanged = wasPresent !== present;
1736
+ if (hasPresentChanged) {
1737
+ const prevAnimationName = prevAnimationNameRef.current;
1738
+ const currentAnimationName = getAnimationName(styles);
1739
+ if (present) {
1740
+ send("MOUNT");
1741
+ } else if (currentAnimationName === "none" || styles?.display === "none") {
1742
+ send("UNMOUNT");
1743
+ } else {
1744
+ const isAnimating = prevAnimationName !== currentAnimationName;
1745
+ if (wasPresent && isAnimating) {
1746
+ send("ANIMATION_OUT");
1747
+ } else {
1748
+ send("UNMOUNT");
1749
+ }
1750
+ }
1751
+ prevPresentRef.current = present;
1752
+ }
1753
+ }, [present, send]);
1754
+ useLayoutEffect2(() => {
1755
+ if (node) {
1756
+ const handleAnimationEnd = (event) => {
1757
+ const currentAnimationName = getAnimationName(stylesRef.current);
1758
+ const isCurrentAnimation = currentAnimationName.includes(event.animationName);
1759
+ if (event.target === node && isCurrentAnimation) {
1760
+ ReactDOM__namespace.flushSync(() => send("ANIMATION_END"));
1761
+ }
1762
+ };
1763
+ const handleAnimationStart = (event) => {
1764
+ if (event.target === node) {
1765
+ prevAnimationNameRef.current = getAnimationName(stylesRef.current);
1766
+ }
1767
+ };
1768
+ node.addEventListener("animationstart", handleAnimationStart);
1769
+ node.addEventListener("animationcancel", handleAnimationEnd);
1770
+ node.addEventListener("animationend", handleAnimationEnd);
1771
+ return () => {
1772
+ node.removeEventListener("animationstart", handleAnimationStart);
1773
+ node.removeEventListener("animationcancel", handleAnimationEnd);
1774
+ node.removeEventListener("animationend", handleAnimationEnd);
1775
+ };
1776
+ } else {
1777
+ send("ANIMATION_END");
1778
+ }
1779
+ }, [node, send]);
1780
+ return {
1781
+ isPresent: ["mounted", "unmountSuspended"].includes(state),
1782
+ ref: React__namespace.useCallback((node2) => {
1783
+ if (node2) stylesRef.current = getComputedStyle(node2);
1784
+ setNode(node2);
1785
+ }, [])
1786
+ };
1787
+ }
1788
+ function getAnimationName(styles) {
1789
+ return styles?.animationName || "none";
1790
+ }
1791
+ function getElementRef(element) {
1792
+ let getter = Object.getOwnPropertyDescriptor(element.props, "ref")?.get;
1793
+ let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
1794
+ if (mayWarn) {
1795
+ return element.ref;
69
1796
  }
1797
+ getter = Object.getOwnPropertyDescriptor(element, "ref")?.get;
1798
+ mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
1799
+ if (mayWarn) {
1800
+ return element.props.ref;
1801
+ }
1802
+ return element.props.ref || element.ref;
1803
+ }
1804
+
1805
+ var count = 0;
1806
+ function useFocusGuards() {
1807
+ React__namespace.useEffect(() => {
1808
+ const edgeGuards = document.querySelectorAll("[data-radix-focus-guard]");
1809
+ document.body.insertAdjacentElement("afterbegin", edgeGuards[0] ?? createFocusGuard());
1810
+ document.body.insertAdjacentElement("beforeend", edgeGuards[1] ?? createFocusGuard());
1811
+ count++;
1812
+ return () => {
1813
+ if (count === 1) {
1814
+ document.querySelectorAll("[data-radix-focus-guard]").forEach((node) => node.remove());
1815
+ }
1816
+ count--;
1817
+ };
1818
+ }, []);
1819
+ }
1820
+ function createFocusGuard() {
1821
+ const element = document.createElement("span");
1822
+ element.setAttribute("data-radix-focus-guard", "");
1823
+ element.tabIndex = 0;
1824
+ element.style.cssText = "outline: none; opacity: 0; position: fixed; pointer-events: none";
1825
+ return element;
1826
+ }
1827
+
1828
+ var zeroRightClassName = 'right-scroll-bar-position';
1829
+ var fullWidthClassName = 'width-before-scroll-bar';
1830
+ var noScrollbarsClassName = 'with-scroll-bars-hidden';
1831
+ /**
1832
+ * Name of a CSS variable containing the amount of "hidden" scrollbar
1833
+ * ! might be undefined ! use will fallback!
1834
+ */
1835
+ var removedBarSizeVariable = '--removed-body-scroll-bar-size';
1836
+
1837
+ /**
1838
+ * Assigns a value for a given ref, no matter of the ref format
1839
+ * @param {RefObject} ref - a callback function or ref object
1840
+ * @param value - a new value
1841
+ *
1842
+ * @see https://github.com/theKashey/use-callback-ref#assignref
1843
+ * @example
1844
+ * const refObject = useRef();
1845
+ * const refFn = (ref) => {....}
1846
+ *
1847
+ * assignRef(refObject, "refValue");
1848
+ * assignRef(refFn, "refValue");
1849
+ */
1850
+ function assignRef(ref, value) {
1851
+ if (typeof ref === 'function') {
1852
+ ref(value);
1853
+ }
1854
+ else if (ref) {
1855
+ ref.current = value;
1856
+ }
1857
+ return ref;
1858
+ }
1859
+
1860
+ /**
1861
+ * creates a MutableRef with ref change callback
1862
+ * @param initialValue - initial ref value
1863
+ * @param {Function} callback - a callback to run when value changes
1864
+ *
1865
+ * @example
1866
+ * const ref = useCallbackRef(0, (newValue, oldValue) => console.log(oldValue, '->', newValue);
1867
+ * ref.current = 1;
1868
+ * // prints 0 -> 1
1869
+ *
1870
+ * @see https://reactjs.org/docs/hooks-reference.html#useref
1871
+ * @see https://github.com/theKashey/use-callback-ref#usecallbackref---to-replace-reactuseref
1872
+ * @returns {MutableRefObject}
1873
+ */
1874
+ function useCallbackRef(initialValue, callback) {
1875
+ var ref = React.useState(function () { return ({
1876
+ // value
1877
+ value: initialValue,
1878
+ // last callback
1879
+ callback: callback,
1880
+ // "memoized" public interface
1881
+ facade: {
1882
+ get current() {
1883
+ return ref.value;
1884
+ },
1885
+ set current(value) {
1886
+ var last = ref.value;
1887
+ if (last !== value) {
1888
+ ref.value = value;
1889
+ ref.callback(value, last);
1890
+ }
1891
+ },
1892
+ },
1893
+ }); })[0];
1894
+ // update callback
1895
+ ref.callback = callback;
1896
+ return ref.facade;
1897
+ }
1898
+
1899
+ var useIsomorphicLayoutEffect = typeof window !== 'undefined' ? React__namespace.useLayoutEffect : React__namespace.useEffect;
1900
+ var currentValues = new WeakMap();
1901
+ /**
1902
+ * Merges two or more refs together providing a single interface to set their value
1903
+ * @param {RefObject|Ref} refs
1904
+ * @returns {MutableRefObject} - a new ref, which translates all changes to {refs}
1905
+ *
1906
+ * @see {@link mergeRefs} a version without buit-in memoization
1907
+ * @see https://github.com/theKashey/use-callback-ref#usemergerefs
1908
+ * @example
1909
+ * const Component = React.forwardRef((props, ref) => {
1910
+ * const ownRef = useRef();
1911
+ * const domRef = useMergeRefs([ref, ownRef]); // 👈 merge together
1912
+ * return <div ref={domRef}>...</div>
1913
+ * }
1914
+ */
1915
+ function useMergeRefs(refs, defaultValue) {
1916
+ var callbackRef = useCallbackRef(null, function (newValue) {
1917
+ return refs.forEach(function (ref) { return assignRef(ref, newValue); });
1918
+ });
1919
+ // handle refs changes - added or removed
1920
+ useIsomorphicLayoutEffect(function () {
1921
+ var oldValue = currentValues.get(callbackRef);
1922
+ if (oldValue) {
1923
+ var prevRefs_1 = new Set(oldValue);
1924
+ var nextRefs_1 = new Set(refs);
1925
+ var current_1 = callbackRef.current;
1926
+ prevRefs_1.forEach(function (ref) {
1927
+ if (!nextRefs_1.has(ref)) {
1928
+ assignRef(ref, null);
1929
+ }
1930
+ });
1931
+ nextRefs_1.forEach(function (ref) {
1932
+ if (!prevRefs_1.has(ref)) {
1933
+ assignRef(ref, current_1);
1934
+ }
1935
+ });
1936
+ }
1937
+ currentValues.set(callbackRef, refs);
1938
+ }, [refs]);
1939
+ return callbackRef;
70
1940
  }
71
1941
 
72
- var css_248z = ".storybook-button {\r\n font-family: \"Nunito Sans\", \"Helvetica Neue\", Helvetica, Arial, sans-serif;\r\n font-weight: 700;\r\n border: 0;\r\n border-radius: 3em;\r\n cursor: pointer;\r\n display: inline-block;\r\n line-height: 1;\r\n}\r\n.storybook-button--primary {\r\n color: white;\r\n background-color: #1ea7fd;\r\n}\r\n.storybook-button--secondary {\r\n color: #333;\r\n background-color: transparent;\r\n box-shadow: rgba(0, 0, 0, 0.15) 0px 0px 0px 1px inset;\r\n}\r\n.storybook-button--small {\r\n font-size: 12px;\r\n padding: 10px 16px;\r\n}\r\n.storybook-button--medium {\r\n font-size: 14px;\r\n padding: 11px 20px;\r\n}\r\n.storybook-button--large {\r\n font-size: 16px;\r\n padding: 12px 24px;\r\n}\r\n";
73
- styleInject(css_248z);
1942
+ function ItoI(a) {
1943
+ return a;
1944
+ }
1945
+ function innerCreateMedium(defaults, middleware) {
1946
+ if (middleware === void 0) { middleware = ItoI; }
1947
+ var buffer = [];
1948
+ var assigned = false;
1949
+ var medium = {
1950
+ read: function () {
1951
+ if (assigned) {
1952
+ throw new Error('Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.');
1953
+ }
1954
+ if (buffer.length) {
1955
+ return buffer[buffer.length - 1];
1956
+ }
1957
+ return defaults;
1958
+ },
1959
+ useMedium: function (data) {
1960
+ var item = middleware(data, assigned);
1961
+ buffer.push(item);
1962
+ return function () {
1963
+ buffer = buffer.filter(function (x) { return x !== item; });
1964
+ };
1965
+ },
1966
+ assignSyncMedium: function (cb) {
1967
+ assigned = true;
1968
+ while (buffer.length) {
1969
+ var cbs = buffer;
1970
+ buffer = [];
1971
+ cbs.forEach(cb);
1972
+ }
1973
+ buffer = {
1974
+ push: function (x) { return cb(x); },
1975
+ filter: function () { return buffer; },
1976
+ };
1977
+ },
1978
+ assignMedium: function (cb) {
1979
+ assigned = true;
1980
+ var pendingQueue = [];
1981
+ if (buffer.length) {
1982
+ var cbs = buffer;
1983
+ buffer = [];
1984
+ cbs.forEach(cb);
1985
+ pendingQueue = buffer;
1986
+ }
1987
+ var executeQueue = function () {
1988
+ var cbs = pendingQueue;
1989
+ pendingQueue = [];
1990
+ cbs.forEach(cb);
1991
+ };
1992
+ var cycle = function () { return Promise.resolve().then(executeQueue); };
1993
+ cycle();
1994
+ buffer = {
1995
+ push: function (x) {
1996
+ pendingQueue.push(x);
1997
+ cycle();
1998
+ },
1999
+ filter: function (filter) {
2000
+ pendingQueue = pendingQueue.filter(filter);
2001
+ return buffer;
2002
+ },
2003
+ };
2004
+ },
2005
+ };
2006
+ return medium;
2007
+ }
2008
+ // eslint-disable-next-line @typescript-eslint/ban-types
2009
+ function createSidecarMedium(options) {
2010
+ if (options === void 0) { options = {}; }
2011
+ var medium = innerCreateMedium(null);
2012
+ medium.options = __assign({ async: true, ssr: false }, options);
2013
+ return medium;
2014
+ }
74
2015
 
2016
+ var SideCar$1 = function (_a) {
2017
+ var sideCar = _a.sideCar, rest = __rest(_a, ["sideCar"]);
2018
+ if (!sideCar) {
2019
+ throw new Error('Sidecar: please provide `sideCar` property to import the right car');
2020
+ }
2021
+ var Target = sideCar.read();
2022
+ if (!Target) {
2023
+ throw new Error('Sidecar medium not found');
2024
+ }
2025
+ return React__namespace.createElement(Target, __assign({}, rest));
2026
+ };
2027
+ SideCar$1.isSideCarExport = true;
2028
+ function exportSidecar(medium, exported) {
2029
+ medium.useMedium(exported);
2030
+ return SideCar$1;
2031
+ }
2032
+
2033
+ var effectCar = createSidecarMedium();
2034
+
2035
+ var nothing = function () {
2036
+ return;
2037
+ };
75
2038
  /**
76
- * Primary UI component for user interaction
2039
+ * Removes scrollbar from the page and contain the scroll within the Lock
77
2040
  */
78
- var Button = function (_a) {
79
- var _b = _a.primary, primary = _b === void 0 ? false : _b, _c = _a.size, size = _c === void 0 ? "medium" : _c, backgroundColor = _a.backgroundColor, label = _a.label, props = __rest(_a, ["primary", "size", "backgroundColor", "label"]);
80
- var mode = primary
81
- ? "storybook-button--primary"
82
- : "storybook-button--secondary";
83
- return (React.createElement("button", __assign({ type: "button", className: ["storybook-button", "storybook-button--".concat(size), mode].join(" "), style: { backgroundColor: backgroundColor } }, props), label));
2041
+ var RemoveScroll = React__namespace.forwardRef(function (props, parentRef) {
2042
+ var ref = React__namespace.useRef(null);
2043
+ var _a = React__namespace.useState({
2044
+ onScrollCapture: nothing,
2045
+ onWheelCapture: nothing,
2046
+ onTouchMoveCapture: nothing,
2047
+ }), callbacks = _a[0], setCallbacks = _a[1];
2048
+ var forwardProps = props.forwardProps, children = props.children, className = props.className, removeScrollBar = props.removeScrollBar, enabled = props.enabled, shards = props.shards, sideCar = props.sideCar, noIsolation = props.noIsolation, inert = props.inert, allowPinchZoom = props.allowPinchZoom, _b = props.as, Container = _b === void 0 ? 'div' : _b, gapMode = props.gapMode, rest = __rest(props, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noIsolation", "inert", "allowPinchZoom", "as", "gapMode"]);
2049
+ var SideCar = sideCar;
2050
+ var containerRef = useMergeRefs([ref, parentRef]);
2051
+ var containerProps = __assign(__assign({}, rest), callbacks);
2052
+ return (React__namespace.createElement(React__namespace.Fragment, null,
2053
+ enabled && (React__namespace.createElement(SideCar, { sideCar: effectCar, removeScrollBar: removeScrollBar, shards: shards, noIsolation: noIsolation, inert: inert, setCallbacks: setCallbacks, allowPinchZoom: !!allowPinchZoom, lockRef: ref, gapMode: gapMode })),
2054
+ forwardProps ? (React__namespace.cloneElement(React__namespace.Children.only(children), __assign(__assign({}, containerProps), { ref: containerRef }))) : (React__namespace.createElement(Container, __assign({}, containerProps, { className: className, ref: containerRef }), children))));
2055
+ });
2056
+ RemoveScroll.defaultProps = {
2057
+ enabled: true,
2058
+ removeScrollBar: true,
2059
+ inert: false,
84
2060
  };
2061
+ RemoveScroll.classNames = {
2062
+ fullWidth: fullWidthClassName,
2063
+ zeroRight: zeroRightClassName,
2064
+ };
2065
+
2066
+ var getNonce = function () {
2067
+ if (typeof __webpack_nonce__ !== 'undefined') {
2068
+ return __webpack_nonce__;
2069
+ }
2070
+ return undefined;
2071
+ };
2072
+
2073
+ function makeStyleTag() {
2074
+ if (!document)
2075
+ return null;
2076
+ var tag = document.createElement('style');
2077
+ tag.type = 'text/css';
2078
+ var nonce = getNonce();
2079
+ if (nonce) {
2080
+ tag.setAttribute('nonce', nonce);
2081
+ }
2082
+ return tag;
2083
+ }
2084
+ function injectStyles(tag, css) {
2085
+ // @ts-ignore
2086
+ if (tag.styleSheet) {
2087
+ // @ts-ignore
2088
+ tag.styleSheet.cssText = css;
2089
+ }
2090
+ else {
2091
+ tag.appendChild(document.createTextNode(css));
2092
+ }
2093
+ }
2094
+ function insertStyleTag(tag) {
2095
+ var head = document.head || document.getElementsByTagName('head')[0];
2096
+ head.appendChild(tag);
2097
+ }
2098
+ var stylesheetSingleton = function () {
2099
+ var counter = 0;
2100
+ var stylesheet = null;
2101
+ return {
2102
+ add: function (style) {
2103
+ if (counter == 0) {
2104
+ if ((stylesheet = makeStyleTag())) {
2105
+ injectStyles(stylesheet, style);
2106
+ insertStyleTag(stylesheet);
2107
+ }
2108
+ }
2109
+ counter++;
2110
+ },
2111
+ remove: function () {
2112
+ counter--;
2113
+ if (!counter && stylesheet) {
2114
+ stylesheet.parentNode && stylesheet.parentNode.removeChild(stylesheet);
2115
+ stylesheet = null;
2116
+ }
2117
+ },
2118
+ };
2119
+ };
2120
+
2121
+ /**
2122
+ * creates a hook to control style singleton
2123
+ * @see {@link styleSingleton} for a safer component version
2124
+ * @example
2125
+ * ```tsx
2126
+ * const useStyle = styleHookSingleton();
2127
+ * ///
2128
+ * useStyle('body { overflow: hidden}');
2129
+ */
2130
+ var styleHookSingleton = function () {
2131
+ var sheet = stylesheetSingleton();
2132
+ return function (styles, isDynamic) {
2133
+ React__namespace.useEffect(function () {
2134
+ sheet.add(styles);
2135
+ return function () {
2136
+ sheet.remove();
2137
+ };
2138
+ }, [styles && isDynamic]);
2139
+ };
2140
+ };
2141
+
2142
+ /**
2143
+ * create a Component to add styles on demand
2144
+ * - styles are added when first instance is mounted
2145
+ * - styles are removed when the last instance is unmounted
2146
+ * - changing styles in runtime does nothing unless dynamic is set. But with multiple components that can lead to the undefined behavior
2147
+ */
2148
+ var styleSingleton = function () {
2149
+ var useStyle = styleHookSingleton();
2150
+ var Sheet = function (_a) {
2151
+ var styles = _a.styles, dynamic = _a.dynamic;
2152
+ useStyle(styles, dynamic);
2153
+ return null;
2154
+ };
2155
+ return Sheet;
2156
+ };
2157
+
2158
+ var zeroGap = {
2159
+ left: 0,
2160
+ top: 0,
2161
+ right: 0,
2162
+ gap: 0,
2163
+ };
2164
+ var parse = function (x) { return parseInt(x || '', 10) || 0; };
2165
+ var getOffset = function (gapMode) {
2166
+ var cs = window.getComputedStyle(document.body);
2167
+ var left = cs[gapMode === 'padding' ? 'paddingLeft' : 'marginLeft'];
2168
+ var top = cs[gapMode === 'padding' ? 'paddingTop' : 'marginTop'];
2169
+ var right = cs[gapMode === 'padding' ? 'paddingRight' : 'marginRight'];
2170
+ return [parse(left), parse(top), parse(right)];
2171
+ };
2172
+ var getGapWidth = function (gapMode) {
2173
+ if (gapMode === void 0) { gapMode = 'margin'; }
2174
+ if (typeof window === 'undefined') {
2175
+ return zeroGap;
2176
+ }
2177
+ var offsets = getOffset(gapMode);
2178
+ var documentWidth = document.documentElement.clientWidth;
2179
+ var windowWidth = window.innerWidth;
2180
+ return {
2181
+ left: offsets[0],
2182
+ top: offsets[1],
2183
+ right: offsets[2],
2184
+ gap: Math.max(0, windowWidth - documentWidth + offsets[2] - offsets[0]),
2185
+ };
2186
+ };
2187
+
2188
+ var Style = styleSingleton();
2189
+ var lockAttribute = 'data-scroll-locked';
2190
+ // important tip - once we measure scrollBar width and remove them
2191
+ // we could not repeat this operation
2192
+ // thus we are using style-singleton - only the first "yet correct" style will be applied.
2193
+ var getStyles = function (_a, allowRelative, gapMode, important) {
2194
+ var left = _a.left, top = _a.top, right = _a.right, gap = _a.gap;
2195
+ if (gapMode === void 0) { gapMode = 'margin'; }
2196
+ return "\n .".concat(noScrollbarsClassName, " {\n overflow: hidden ").concat(important, ";\n padding-right: ").concat(gap, "px ").concat(important, ";\n }\n body[").concat(lockAttribute, "] {\n overflow: hidden ").concat(important, ";\n overscroll-behavior: contain;\n ").concat([
2197
+ allowRelative && "position: relative ".concat(important, ";"),
2198
+ gapMode === 'margin' &&
2199
+ "\n padding-left: ".concat(left, "px;\n padding-top: ").concat(top, "px;\n padding-right: ").concat(right, "px;\n margin-left:0;\n margin-top:0;\n margin-right: ").concat(gap, "px ").concat(important, ";\n "),
2200
+ gapMode === 'padding' && "padding-right: ".concat(gap, "px ").concat(important, ";"),
2201
+ ]
2202
+ .filter(Boolean)
2203
+ .join(''), "\n }\n \n .").concat(zeroRightClassName, " {\n right: ").concat(gap, "px ").concat(important, ";\n }\n \n .").concat(fullWidthClassName, " {\n margin-right: ").concat(gap, "px ").concat(important, ";\n }\n \n .").concat(zeroRightClassName, " .").concat(zeroRightClassName, " {\n right: 0 ").concat(important, ";\n }\n \n .").concat(fullWidthClassName, " .").concat(fullWidthClassName, " {\n margin-right: 0 ").concat(important, ";\n }\n \n body[").concat(lockAttribute, "] {\n ").concat(removedBarSizeVariable, ": ").concat(gap, "px;\n }\n");
2204
+ };
2205
+ var getCurrentUseCounter = function () {
2206
+ var counter = parseInt(document.body.getAttribute(lockAttribute) || '0', 10);
2207
+ return isFinite(counter) ? counter : 0;
2208
+ };
2209
+ var useLockAttribute = function () {
2210
+ React__namespace.useEffect(function () {
2211
+ document.body.setAttribute(lockAttribute, (getCurrentUseCounter() + 1).toString());
2212
+ return function () {
2213
+ var newCounter = getCurrentUseCounter() - 1;
2214
+ if (newCounter <= 0) {
2215
+ document.body.removeAttribute(lockAttribute);
2216
+ }
2217
+ else {
2218
+ document.body.setAttribute(lockAttribute, newCounter.toString());
2219
+ }
2220
+ };
2221
+ }, []);
2222
+ };
2223
+ /**
2224
+ * Removes page scrollbar and blocks page scroll when mounted
2225
+ */
2226
+ var RemoveScrollBar = function (_a) {
2227
+ var noRelative = _a.noRelative, noImportant = _a.noImportant, _b = _a.gapMode, gapMode = _b === void 0 ? 'margin' : _b;
2228
+ useLockAttribute();
2229
+ /*
2230
+ gap will be measured on every component mount
2231
+ however it will be used only by the "first" invocation
2232
+ due to singleton nature of <Style
2233
+ */
2234
+ var gap = React__namespace.useMemo(function () { return getGapWidth(gapMode); }, [gapMode]);
2235
+ return React__namespace.createElement(Style, { styles: getStyles(gap, !noRelative, gapMode, !noImportant ? '!important' : '') });
2236
+ };
2237
+
2238
+ var passiveSupported = false;
2239
+ if (typeof window !== 'undefined') {
2240
+ try {
2241
+ var options = Object.defineProperty({}, 'passive', {
2242
+ get: function () {
2243
+ passiveSupported = true;
2244
+ return true;
2245
+ },
2246
+ });
2247
+ // @ts-ignore
2248
+ window.addEventListener('test', options, options);
2249
+ // @ts-ignore
2250
+ window.removeEventListener('test', options, options);
2251
+ }
2252
+ catch (err) {
2253
+ passiveSupported = false;
2254
+ }
2255
+ }
2256
+ var nonPassive = passiveSupported ? { passive: false } : false;
2257
+
2258
+ var alwaysContainsScroll = function (node) {
2259
+ // textarea will always _contain_ scroll inside self. It only can be hidden
2260
+ return node.tagName === 'TEXTAREA';
2261
+ };
2262
+ var elementCanBeScrolled = function (node, overflow) {
2263
+ var styles = window.getComputedStyle(node);
2264
+ return (
2265
+ // not-not-scrollable
2266
+ styles[overflow] !== 'hidden' &&
2267
+ // contains scroll inside self
2268
+ !(styles.overflowY === styles.overflowX && !alwaysContainsScroll(node) && styles[overflow] === 'visible'));
2269
+ };
2270
+ var elementCouldBeVScrolled = function (node) { return elementCanBeScrolled(node, 'overflowY'); };
2271
+ var elementCouldBeHScrolled = function (node) { return elementCanBeScrolled(node, 'overflowX'); };
2272
+ var locationCouldBeScrolled = function (axis, node) {
2273
+ var ownerDocument = node.ownerDocument;
2274
+ var current = node;
2275
+ do {
2276
+ // Skip over shadow root
2277
+ if (typeof ShadowRoot !== 'undefined' && current instanceof ShadowRoot) {
2278
+ current = current.host;
2279
+ }
2280
+ var isScrollable = elementCouldBeScrolled(axis, current);
2281
+ if (isScrollable) {
2282
+ var _a = getScrollVariables(axis, current), s = _a[1], d = _a[2];
2283
+ if (s > d) {
2284
+ return true;
2285
+ }
2286
+ }
2287
+ current = current.parentNode;
2288
+ } while (current && current !== ownerDocument.body);
2289
+ return false;
2290
+ };
2291
+ var getVScrollVariables = function (_a) {
2292
+ var scrollTop = _a.scrollTop, scrollHeight = _a.scrollHeight, clientHeight = _a.clientHeight;
2293
+ return [
2294
+ scrollTop,
2295
+ scrollHeight,
2296
+ clientHeight,
2297
+ ];
2298
+ };
2299
+ var getHScrollVariables = function (_a) {
2300
+ var scrollLeft = _a.scrollLeft, scrollWidth = _a.scrollWidth, clientWidth = _a.clientWidth;
2301
+ return [
2302
+ scrollLeft,
2303
+ scrollWidth,
2304
+ clientWidth,
2305
+ ];
2306
+ };
2307
+ var elementCouldBeScrolled = function (axis, node) {
2308
+ return axis === 'v' ? elementCouldBeVScrolled(node) : elementCouldBeHScrolled(node);
2309
+ };
2310
+ var getScrollVariables = function (axis, node) {
2311
+ return axis === 'v' ? getVScrollVariables(node) : getHScrollVariables(node);
2312
+ };
2313
+ var getDirectionFactor = function (axis, direction) {
2314
+ /**
2315
+ * If the element's direction is rtl (right-to-left), then scrollLeft is 0 when the scrollbar is at its rightmost position,
2316
+ * and then increasingly negative as you scroll towards the end of the content.
2317
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollLeft
2318
+ */
2319
+ return axis === 'h' && direction === 'rtl' ? -1 : 1;
2320
+ };
2321
+ var handleScroll = function (axis, endTarget, event, sourceDelta, noOverscroll) {
2322
+ var directionFactor = getDirectionFactor(axis, window.getComputedStyle(endTarget).direction);
2323
+ var delta = directionFactor * sourceDelta;
2324
+ // find scrollable target
2325
+ var target = event.target;
2326
+ var targetInLock = endTarget.contains(target);
2327
+ var shouldCancelScroll = false;
2328
+ var isDeltaPositive = delta > 0;
2329
+ var availableScroll = 0;
2330
+ var availableScrollTop = 0;
2331
+ do {
2332
+ var _a = getScrollVariables(axis, target), position = _a[0], scroll_1 = _a[1], capacity = _a[2];
2333
+ var elementScroll = scroll_1 - capacity - directionFactor * position;
2334
+ if (position || elementScroll) {
2335
+ if (elementCouldBeScrolled(axis, target)) {
2336
+ availableScroll += elementScroll;
2337
+ availableScrollTop += position;
2338
+ }
2339
+ }
2340
+ if (target instanceof ShadowRoot) {
2341
+ target = target.host;
2342
+ }
2343
+ else {
2344
+ target = target.parentNode;
2345
+ }
2346
+ } while (
2347
+ // portaled content
2348
+ (!targetInLock && target !== document.body) ||
2349
+ // self content
2350
+ (targetInLock && (endTarget.contains(target) || endTarget === target)));
2351
+ // handle epsilon around 0 (non standard zoom levels)
2352
+ if (isDeltaPositive &&
2353
+ ((Math.abs(availableScroll) < 1) || (!noOverscroll ))) {
2354
+ shouldCancelScroll = true;
2355
+ }
2356
+ else if (!isDeltaPositive &&
2357
+ ((Math.abs(availableScrollTop) < 1) || (!noOverscroll ))) {
2358
+ shouldCancelScroll = true;
2359
+ }
2360
+ return shouldCancelScroll;
2361
+ };
2362
+
2363
+ var getTouchXY = function (event) {
2364
+ return 'changedTouches' in event ? [event.changedTouches[0].clientX, event.changedTouches[0].clientY] : [0, 0];
2365
+ };
2366
+ var getDeltaXY = function (event) { return [event.deltaX, event.deltaY]; };
2367
+ var extractRef = function (ref) {
2368
+ return ref && 'current' in ref ? ref.current : ref;
2369
+ };
2370
+ var deltaCompare = function (x, y) { return x[0] === y[0] && x[1] === y[1]; };
2371
+ var generateStyle = function (id) { return "\n .block-interactivity-".concat(id, " {pointer-events: none;}\n .allow-interactivity-").concat(id, " {pointer-events: all;}\n"); };
2372
+ var idCounter = 0;
2373
+ var lockStack = [];
2374
+ function RemoveScrollSideCar(props) {
2375
+ var shouldPreventQueue = React__namespace.useRef([]);
2376
+ var touchStartRef = React__namespace.useRef([0, 0]);
2377
+ var activeAxis = React__namespace.useRef();
2378
+ var id = React__namespace.useState(idCounter++)[0];
2379
+ var Style = React__namespace.useState(styleSingleton)[0];
2380
+ var lastProps = React__namespace.useRef(props);
2381
+ React__namespace.useEffect(function () {
2382
+ lastProps.current = props;
2383
+ }, [props]);
2384
+ React__namespace.useEffect(function () {
2385
+ if (props.inert) {
2386
+ document.body.classList.add("block-interactivity-".concat(id));
2387
+ var allow_1 = __spreadArray([props.lockRef.current], (props.shards || []).map(extractRef), true).filter(Boolean);
2388
+ allow_1.forEach(function (el) { return el.classList.add("allow-interactivity-".concat(id)); });
2389
+ return function () {
2390
+ document.body.classList.remove("block-interactivity-".concat(id));
2391
+ allow_1.forEach(function (el) { return el.classList.remove("allow-interactivity-".concat(id)); });
2392
+ };
2393
+ }
2394
+ return;
2395
+ }, [props.inert, props.lockRef.current, props.shards]);
2396
+ var shouldCancelEvent = React__namespace.useCallback(function (event, parent) {
2397
+ if ('touches' in event && event.touches.length === 2) {
2398
+ return !lastProps.current.allowPinchZoom;
2399
+ }
2400
+ var touch = getTouchXY(event);
2401
+ var touchStart = touchStartRef.current;
2402
+ var deltaX = 'deltaX' in event ? event.deltaX : touchStart[0] - touch[0];
2403
+ var deltaY = 'deltaY' in event ? event.deltaY : touchStart[1] - touch[1];
2404
+ var currentAxis;
2405
+ var target = event.target;
2406
+ var moveDirection = Math.abs(deltaX) > Math.abs(deltaY) ? 'h' : 'v';
2407
+ // allow horizontal touch move on Range inputs. They will not cause any scroll
2408
+ if ('touches' in event && moveDirection === 'h' && target.type === 'range') {
2409
+ return false;
2410
+ }
2411
+ var canBeScrolledInMainDirection = locationCouldBeScrolled(moveDirection, target);
2412
+ if (!canBeScrolledInMainDirection) {
2413
+ return true;
2414
+ }
2415
+ if (canBeScrolledInMainDirection) {
2416
+ currentAxis = moveDirection;
2417
+ }
2418
+ else {
2419
+ currentAxis = moveDirection === 'v' ? 'h' : 'v';
2420
+ canBeScrolledInMainDirection = locationCouldBeScrolled(moveDirection, target);
2421
+ // other axis might be not scrollable
2422
+ }
2423
+ if (!canBeScrolledInMainDirection) {
2424
+ return false;
2425
+ }
2426
+ if (!activeAxis.current && 'changedTouches' in event && (deltaX || deltaY)) {
2427
+ activeAxis.current = currentAxis;
2428
+ }
2429
+ if (!currentAxis) {
2430
+ return true;
2431
+ }
2432
+ var cancelingAxis = activeAxis.current || currentAxis;
2433
+ return handleScroll(cancelingAxis, parent, event, cancelingAxis === 'h' ? deltaX : deltaY, true);
2434
+ }, []);
2435
+ var shouldPrevent = React__namespace.useCallback(function (_event) {
2436
+ var event = _event;
2437
+ if (!lockStack.length || lockStack[lockStack.length - 1] !== Style) {
2438
+ // not the last active
2439
+ return;
2440
+ }
2441
+ var delta = 'deltaY' in event ? getDeltaXY(event) : getTouchXY(event);
2442
+ var sourceEvent = shouldPreventQueue.current.filter(function (e) { return e.name === event.type && (e.target === event.target || event.target === e.shadowParent) && deltaCompare(e.delta, delta); })[0];
2443
+ // self event, and should be canceled
2444
+ if (sourceEvent && sourceEvent.should) {
2445
+ if (event.cancelable) {
2446
+ event.preventDefault();
2447
+ }
2448
+ return;
2449
+ }
2450
+ // outside or shard event
2451
+ if (!sourceEvent) {
2452
+ var shardNodes = (lastProps.current.shards || [])
2453
+ .map(extractRef)
2454
+ .filter(Boolean)
2455
+ .filter(function (node) { return node.contains(event.target); });
2456
+ var shouldStop = shardNodes.length > 0 ? shouldCancelEvent(event, shardNodes[0]) : !lastProps.current.noIsolation;
2457
+ if (shouldStop) {
2458
+ if (event.cancelable) {
2459
+ event.preventDefault();
2460
+ }
2461
+ }
2462
+ }
2463
+ }, []);
2464
+ var shouldCancel = React__namespace.useCallback(function (name, delta, target, should) {
2465
+ var event = { name: name, delta: delta, target: target, should: should, shadowParent: getOutermostShadowParent(target) };
2466
+ shouldPreventQueue.current.push(event);
2467
+ setTimeout(function () {
2468
+ shouldPreventQueue.current = shouldPreventQueue.current.filter(function (e) { return e !== event; });
2469
+ }, 1);
2470
+ }, []);
2471
+ var scrollTouchStart = React__namespace.useCallback(function (event) {
2472
+ touchStartRef.current = getTouchXY(event);
2473
+ activeAxis.current = undefined;
2474
+ }, []);
2475
+ var scrollWheel = React__namespace.useCallback(function (event) {
2476
+ shouldCancel(event.type, getDeltaXY(event), event.target, shouldCancelEvent(event, props.lockRef.current));
2477
+ }, []);
2478
+ var scrollTouchMove = React__namespace.useCallback(function (event) {
2479
+ shouldCancel(event.type, getTouchXY(event), event.target, shouldCancelEvent(event, props.lockRef.current));
2480
+ }, []);
2481
+ React__namespace.useEffect(function () {
2482
+ lockStack.push(Style);
2483
+ props.setCallbacks({
2484
+ onScrollCapture: scrollWheel,
2485
+ onWheelCapture: scrollWheel,
2486
+ onTouchMoveCapture: scrollTouchMove,
2487
+ });
2488
+ document.addEventListener('wheel', shouldPrevent, nonPassive);
2489
+ document.addEventListener('touchmove', shouldPrevent, nonPassive);
2490
+ document.addEventListener('touchstart', scrollTouchStart, nonPassive);
2491
+ return function () {
2492
+ lockStack = lockStack.filter(function (inst) { return inst !== Style; });
2493
+ document.removeEventListener('wheel', shouldPrevent, nonPassive);
2494
+ document.removeEventListener('touchmove', shouldPrevent, nonPassive);
2495
+ document.removeEventListener('touchstart', scrollTouchStart, nonPassive);
2496
+ };
2497
+ }, []);
2498
+ var removeScrollBar = props.removeScrollBar, inert = props.inert;
2499
+ return (React__namespace.createElement(React__namespace.Fragment, null,
2500
+ inert ? React__namespace.createElement(Style, { styles: generateStyle(id) }) : null,
2501
+ removeScrollBar ? React__namespace.createElement(RemoveScrollBar, { gapMode: props.gapMode }) : null));
2502
+ }
2503
+ function getOutermostShadowParent(node) {
2504
+ var shadowParent = null;
2505
+ while (node !== null) {
2506
+ if (node instanceof ShadowRoot) {
2507
+ shadowParent = node.host;
2508
+ node = node.host;
2509
+ }
2510
+ node = node.parentNode;
2511
+ }
2512
+ return shadowParent;
2513
+ }
2514
+
2515
+ var SideCar = exportSidecar(effectCar, RemoveScrollSideCar);
2516
+
2517
+ var ReactRemoveScroll = React__namespace.forwardRef(function (props, ref) { return (React__namespace.createElement(RemoveScroll, __assign({}, props, { ref: ref, sideCar: SideCar }))); });
2518
+ ReactRemoveScroll.classNames = RemoveScroll.classNames;
2519
+
2520
+ var getDefaultParent = function (originalTarget) {
2521
+ if (typeof document === 'undefined') {
2522
+ return null;
2523
+ }
2524
+ var sampleTarget = Array.isArray(originalTarget) ? originalTarget[0] : originalTarget;
2525
+ return sampleTarget.ownerDocument.body;
2526
+ };
2527
+ var counterMap = new WeakMap();
2528
+ var uncontrolledNodes = new WeakMap();
2529
+ var markerMap = {};
2530
+ var lockCount = 0;
2531
+ var unwrapHost = function (node) {
2532
+ return node && (node.host || unwrapHost(node.parentNode));
2533
+ };
2534
+ var correctTargets = function (parent, targets) {
2535
+ return targets
2536
+ .map(function (target) {
2537
+ if (parent.contains(target)) {
2538
+ return target;
2539
+ }
2540
+ var correctedTarget = unwrapHost(target);
2541
+ if (correctedTarget && parent.contains(correctedTarget)) {
2542
+ return correctedTarget;
2543
+ }
2544
+ console.error('aria-hidden', target, 'in not contained inside', parent, '. Doing nothing');
2545
+ return null;
2546
+ })
2547
+ .filter(function (x) { return Boolean(x); });
2548
+ };
2549
+ /**
2550
+ * Marks everything except given node(or nodes) as aria-hidden
2551
+ * @param {Element | Element[]} originalTarget - elements to keep on the page
2552
+ * @param [parentNode] - top element, defaults to document.body
2553
+ * @param {String} [markerName] - a special attribute to mark every node
2554
+ * @param {String} [controlAttribute] - html Attribute to control
2555
+ * @return {Undo} undo command
2556
+ */
2557
+ var applyAttributeToOthers = function (originalTarget, parentNode, markerName, controlAttribute) {
2558
+ var targets = correctTargets(parentNode, Array.isArray(originalTarget) ? originalTarget : [originalTarget]);
2559
+ if (!markerMap[markerName]) {
2560
+ markerMap[markerName] = new WeakMap();
2561
+ }
2562
+ var markerCounter = markerMap[markerName];
2563
+ var hiddenNodes = [];
2564
+ var elementsToKeep = new Set();
2565
+ var elementsToStop = new Set(targets);
2566
+ var keep = function (el) {
2567
+ if (!el || elementsToKeep.has(el)) {
2568
+ return;
2569
+ }
2570
+ elementsToKeep.add(el);
2571
+ keep(el.parentNode);
2572
+ };
2573
+ targets.forEach(keep);
2574
+ var deep = function (parent) {
2575
+ if (!parent || elementsToStop.has(parent)) {
2576
+ return;
2577
+ }
2578
+ Array.prototype.forEach.call(parent.children, function (node) {
2579
+ if (elementsToKeep.has(node)) {
2580
+ deep(node);
2581
+ }
2582
+ else {
2583
+ try {
2584
+ var attr = node.getAttribute(controlAttribute);
2585
+ var alreadyHidden = attr !== null && attr !== 'false';
2586
+ var counterValue = (counterMap.get(node) || 0) + 1;
2587
+ var markerValue = (markerCounter.get(node) || 0) + 1;
2588
+ counterMap.set(node, counterValue);
2589
+ markerCounter.set(node, markerValue);
2590
+ hiddenNodes.push(node);
2591
+ if (counterValue === 1 && alreadyHidden) {
2592
+ uncontrolledNodes.set(node, true);
2593
+ }
2594
+ if (markerValue === 1) {
2595
+ node.setAttribute(markerName, 'true');
2596
+ }
2597
+ if (!alreadyHidden) {
2598
+ node.setAttribute(controlAttribute, 'true');
2599
+ }
2600
+ }
2601
+ catch (e) {
2602
+ console.error('aria-hidden: cannot operate on ', node, e);
2603
+ }
2604
+ }
2605
+ });
2606
+ };
2607
+ deep(parentNode);
2608
+ elementsToKeep.clear();
2609
+ lockCount++;
2610
+ return function () {
2611
+ hiddenNodes.forEach(function (node) {
2612
+ var counterValue = counterMap.get(node) - 1;
2613
+ var markerValue = markerCounter.get(node) - 1;
2614
+ counterMap.set(node, counterValue);
2615
+ markerCounter.set(node, markerValue);
2616
+ if (!counterValue) {
2617
+ if (!uncontrolledNodes.has(node)) {
2618
+ node.removeAttribute(controlAttribute);
2619
+ }
2620
+ uncontrolledNodes.delete(node);
2621
+ }
2622
+ if (!markerValue) {
2623
+ node.removeAttribute(markerName);
2624
+ }
2625
+ });
2626
+ lockCount--;
2627
+ if (!lockCount) {
2628
+ // clear
2629
+ counterMap = new WeakMap();
2630
+ counterMap = new WeakMap();
2631
+ uncontrolledNodes = new WeakMap();
2632
+ markerMap = {};
2633
+ }
2634
+ };
2635
+ };
2636
+ /**
2637
+ * Marks everything except given node(or nodes) as aria-hidden
2638
+ * @param {Element | Element[]} originalTarget - elements to keep on the page
2639
+ * @param [parentNode] - top element, defaults to document.body
2640
+ * @param {String} [markerName] - a special attribute to mark every node
2641
+ * @return {Undo} undo command
2642
+ */
2643
+ var hideOthers = function (originalTarget, parentNode, markerName) {
2644
+ if (markerName === void 0) { markerName = 'data-aria-hidden'; }
2645
+ var targets = Array.from(Array.isArray(originalTarget) ? originalTarget : [originalTarget]);
2646
+ var activeParentNode = getDefaultParent(originalTarget);
2647
+ if (!activeParentNode) {
2648
+ return function () { return null; };
2649
+ }
2650
+ // we should not hide ariaLive elements - https://github.com/theKashey/aria-hidden/issues/10
2651
+ targets.push.apply(targets, Array.from(activeParentNode.querySelectorAll('[aria-live]')));
2652
+ return applyAttributeToOthers(targets, activeParentNode, markerName, 'aria-hidden');
2653
+ };
2654
+
2655
+ var DIALOG_NAME = "Dialog";
2656
+ var [createDialogContext, createDialogScope] = createContextScope(DIALOG_NAME);
2657
+ var [DialogProvider, useDialogContext] = createDialogContext(DIALOG_NAME);
2658
+ var Dialog = (props) => {
2659
+ const {
2660
+ __scopeDialog,
2661
+ children,
2662
+ open: openProp,
2663
+ defaultOpen,
2664
+ onOpenChange,
2665
+ modal = true
2666
+ } = props;
2667
+ const triggerRef = React__namespace.useRef(null);
2668
+ const contentRef = React__namespace.useRef(null);
2669
+ const [open = false, setOpen] = useControllableState({
2670
+ prop: openProp,
2671
+ defaultProp: defaultOpen,
2672
+ onChange: onOpenChange
2673
+ });
2674
+ return /* @__PURE__ */ jsxRuntime.jsx(
2675
+ DialogProvider,
2676
+ {
2677
+ scope: __scopeDialog,
2678
+ triggerRef,
2679
+ contentRef,
2680
+ contentId: useId(),
2681
+ titleId: useId(),
2682
+ descriptionId: useId(),
2683
+ open,
2684
+ onOpenChange: setOpen,
2685
+ onOpenToggle: React__namespace.useCallback(() => setOpen((prevOpen) => !prevOpen), [setOpen]),
2686
+ modal,
2687
+ children
2688
+ }
2689
+ );
2690
+ };
2691
+ Dialog.displayName = DIALOG_NAME;
2692
+ var TRIGGER_NAME$1 = "DialogTrigger";
2693
+ var DialogTrigger = React__namespace.forwardRef(
2694
+ (props, forwardedRef) => {
2695
+ const { __scopeDialog, ...triggerProps } = props;
2696
+ const context = useDialogContext(TRIGGER_NAME$1, __scopeDialog);
2697
+ const composedTriggerRef = useComposedRefs(forwardedRef, context.triggerRef);
2698
+ return /* @__PURE__ */ jsxRuntime.jsx(
2699
+ Primitive.button,
2700
+ {
2701
+ type: "button",
2702
+ "aria-haspopup": "dialog",
2703
+ "aria-expanded": context.open,
2704
+ "aria-controls": context.contentId,
2705
+ "data-state": getState(context.open),
2706
+ ...triggerProps,
2707
+ ref: composedTriggerRef,
2708
+ onClick: composeEventHandlers(props.onClick, context.onOpenToggle)
2709
+ }
2710
+ );
2711
+ }
2712
+ );
2713
+ DialogTrigger.displayName = TRIGGER_NAME$1;
2714
+ var PORTAL_NAME$1 = "DialogPortal";
2715
+ var [PortalProvider, usePortalContext] = createDialogContext(PORTAL_NAME$1, {
2716
+ forceMount: void 0
2717
+ });
2718
+ var DialogPortal = (props) => {
2719
+ const { __scopeDialog, forceMount, children, container } = props;
2720
+ const context = useDialogContext(PORTAL_NAME$1, __scopeDialog);
2721
+ return /* @__PURE__ */ jsxRuntime.jsx(PortalProvider, { scope: __scopeDialog, forceMount, children: React__namespace.Children.map(children, (child) => /* @__PURE__ */ jsxRuntime.jsx(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ jsxRuntime.jsx(Portal$1, { asChild: true, container, children: child }) })) });
2722
+ };
2723
+ DialogPortal.displayName = PORTAL_NAME$1;
2724
+ var OVERLAY_NAME$1 = "DialogOverlay";
2725
+ var DialogOverlay = React__namespace.forwardRef(
2726
+ (props, forwardedRef) => {
2727
+ const portalContext = usePortalContext(OVERLAY_NAME$1, props.__scopeDialog);
2728
+ const { forceMount = portalContext.forceMount, ...overlayProps } = props;
2729
+ const context = useDialogContext(OVERLAY_NAME$1, props.__scopeDialog);
2730
+ return context.modal ? /* @__PURE__ */ jsxRuntime.jsx(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ jsxRuntime.jsx(DialogOverlayImpl, { ...overlayProps, ref: forwardedRef }) }) : null;
2731
+ }
2732
+ );
2733
+ DialogOverlay.displayName = OVERLAY_NAME$1;
2734
+ var DialogOverlayImpl = React__namespace.forwardRef(
2735
+ (props, forwardedRef) => {
2736
+ const { __scopeDialog, ...overlayProps } = props;
2737
+ const context = useDialogContext(OVERLAY_NAME$1, __scopeDialog);
2738
+ return (
2739
+ // Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`
2740
+ // ie. when `Overlay` and `Content` are siblings
2741
+ /* @__PURE__ */ jsxRuntime.jsx(ReactRemoveScroll, { as: Slot, allowPinchZoom: true, shards: [context.contentRef], children: /* @__PURE__ */ jsxRuntime.jsx(
2742
+ Primitive.div,
2743
+ {
2744
+ "data-state": getState(context.open),
2745
+ ...overlayProps,
2746
+ ref: forwardedRef,
2747
+ style: { pointerEvents: "auto", ...overlayProps.style }
2748
+ }
2749
+ ) })
2750
+ );
2751
+ }
2752
+ );
2753
+ var CONTENT_NAME$1 = "DialogContent";
2754
+ var DialogContent = React__namespace.forwardRef(
2755
+ (props, forwardedRef) => {
2756
+ const portalContext = usePortalContext(CONTENT_NAME$1, props.__scopeDialog);
2757
+ const { forceMount = portalContext.forceMount, ...contentProps } = props;
2758
+ const context = useDialogContext(CONTENT_NAME$1, props.__scopeDialog);
2759
+ return /* @__PURE__ */ jsxRuntime.jsx(Presence, { present: forceMount || context.open, children: context.modal ? /* @__PURE__ */ jsxRuntime.jsx(DialogContentModal, { ...contentProps, ref: forwardedRef }) : /* @__PURE__ */ jsxRuntime.jsx(DialogContentNonModal, { ...contentProps, ref: forwardedRef }) });
2760
+ }
2761
+ );
2762
+ DialogContent.displayName = CONTENT_NAME$1;
2763
+ var DialogContentModal = React__namespace.forwardRef(
2764
+ (props, forwardedRef) => {
2765
+ const context = useDialogContext(CONTENT_NAME$1, props.__scopeDialog);
2766
+ const contentRef = React__namespace.useRef(null);
2767
+ const composedRefs = useComposedRefs(forwardedRef, context.contentRef, contentRef);
2768
+ React__namespace.useEffect(() => {
2769
+ const content = contentRef.current;
2770
+ if (content) return hideOthers(content);
2771
+ }, []);
2772
+ return /* @__PURE__ */ jsxRuntime.jsx(
2773
+ DialogContentImpl,
2774
+ {
2775
+ ...props,
2776
+ ref: composedRefs,
2777
+ trapFocus: context.open,
2778
+ disableOutsidePointerEvents: true,
2779
+ onCloseAutoFocus: composeEventHandlers(props.onCloseAutoFocus, (event) => {
2780
+ event.preventDefault();
2781
+ context.triggerRef.current?.focus();
2782
+ }),
2783
+ onPointerDownOutside: composeEventHandlers(props.onPointerDownOutside, (event) => {
2784
+ const originalEvent = event.detail.originalEvent;
2785
+ const ctrlLeftClick = originalEvent.button === 0 && originalEvent.ctrlKey === true;
2786
+ const isRightClick = originalEvent.button === 2 || ctrlLeftClick;
2787
+ if (isRightClick) event.preventDefault();
2788
+ }),
2789
+ onFocusOutside: composeEventHandlers(
2790
+ props.onFocusOutside,
2791
+ (event) => event.preventDefault()
2792
+ )
2793
+ }
2794
+ );
2795
+ }
2796
+ );
2797
+ var DialogContentNonModal = React__namespace.forwardRef(
2798
+ (props, forwardedRef) => {
2799
+ const context = useDialogContext(CONTENT_NAME$1, props.__scopeDialog);
2800
+ const hasInteractedOutsideRef = React__namespace.useRef(false);
2801
+ const hasPointerDownOutsideRef = React__namespace.useRef(false);
2802
+ return /* @__PURE__ */ jsxRuntime.jsx(
2803
+ DialogContentImpl,
2804
+ {
2805
+ ...props,
2806
+ ref: forwardedRef,
2807
+ trapFocus: false,
2808
+ disableOutsidePointerEvents: false,
2809
+ onCloseAutoFocus: (event) => {
2810
+ props.onCloseAutoFocus?.(event);
2811
+ if (!event.defaultPrevented) {
2812
+ if (!hasInteractedOutsideRef.current) context.triggerRef.current?.focus();
2813
+ event.preventDefault();
2814
+ }
2815
+ hasInteractedOutsideRef.current = false;
2816
+ hasPointerDownOutsideRef.current = false;
2817
+ },
2818
+ onInteractOutside: (event) => {
2819
+ props.onInteractOutside?.(event);
2820
+ if (!event.defaultPrevented) {
2821
+ hasInteractedOutsideRef.current = true;
2822
+ if (event.detail.originalEvent.type === "pointerdown") {
2823
+ hasPointerDownOutsideRef.current = true;
2824
+ }
2825
+ }
2826
+ const target = event.target;
2827
+ const targetIsTrigger = context.triggerRef.current?.contains(target);
2828
+ if (targetIsTrigger) event.preventDefault();
2829
+ if (event.detail.originalEvent.type === "focusin" && hasPointerDownOutsideRef.current) {
2830
+ event.preventDefault();
2831
+ }
2832
+ }
2833
+ }
2834
+ );
2835
+ }
2836
+ );
2837
+ var DialogContentImpl = React__namespace.forwardRef(
2838
+ (props, forwardedRef) => {
2839
+ const { __scopeDialog, trapFocus, onOpenAutoFocus, onCloseAutoFocus, ...contentProps } = props;
2840
+ const context = useDialogContext(CONTENT_NAME$1, __scopeDialog);
2841
+ const contentRef = React__namespace.useRef(null);
2842
+ const composedRefs = useComposedRefs(forwardedRef, contentRef);
2843
+ useFocusGuards();
2844
+ return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
2845
+ /* @__PURE__ */ jsxRuntime.jsx(
2846
+ FocusScope,
2847
+ {
2848
+ asChild: true,
2849
+ loop: true,
2850
+ trapped: trapFocus,
2851
+ onMountAutoFocus: onOpenAutoFocus,
2852
+ onUnmountAutoFocus: onCloseAutoFocus,
2853
+ children: /* @__PURE__ */ jsxRuntime.jsx(
2854
+ DismissableLayer,
2855
+ {
2856
+ role: "dialog",
2857
+ id: context.contentId,
2858
+ "aria-describedby": context.descriptionId,
2859
+ "aria-labelledby": context.titleId,
2860
+ "data-state": getState(context.open),
2861
+ ...contentProps,
2862
+ ref: composedRefs,
2863
+ onDismiss: () => context.onOpenChange(false)
2864
+ }
2865
+ )
2866
+ }
2867
+ ),
2868
+ /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
2869
+ /* @__PURE__ */ jsxRuntime.jsx(TitleWarning, { titleId: context.titleId }),
2870
+ /* @__PURE__ */ jsxRuntime.jsx(DescriptionWarning$1, { contentRef, descriptionId: context.descriptionId })
2871
+ ] })
2872
+ ] });
2873
+ }
2874
+ );
2875
+ var TITLE_NAME$1 = "DialogTitle";
2876
+ var DialogTitle = React__namespace.forwardRef(
2877
+ (props, forwardedRef) => {
2878
+ const { __scopeDialog, ...titleProps } = props;
2879
+ const context = useDialogContext(TITLE_NAME$1, __scopeDialog);
2880
+ return /* @__PURE__ */ jsxRuntime.jsx(Primitive.h2, { id: context.titleId, ...titleProps, ref: forwardedRef });
2881
+ }
2882
+ );
2883
+ DialogTitle.displayName = TITLE_NAME$1;
2884
+ var DESCRIPTION_NAME$1 = "DialogDescription";
2885
+ var DialogDescription = React__namespace.forwardRef(
2886
+ (props, forwardedRef) => {
2887
+ const { __scopeDialog, ...descriptionProps } = props;
2888
+ const context = useDialogContext(DESCRIPTION_NAME$1, __scopeDialog);
2889
+ return /* @__PURE__ */ jsxRuntime.jsx(Primitive.p, { id: context.descriptionId, ...descriptionProps, ref: forwardedRef });
2890
+ }
2891
+ );
2892
+ DialogDescription.displayName = DESCRIPTION_NAME$1;
2893
+ var CLOSE_NAME = "DialogClose";
2894
+ var DialogClose = React__namespace.forwardRef(
2895
+ (props, forwardedRef) => {
2896
+ const { __scopeDialog, ...closeProps } = props;
2897
+ const context = useDialogContext(CLOSE_NAME, __scopeDialog);
2898
+ return /* @__PURE__ */ jsxRuntime.jsx(
2899
+ Primitive.button,
2900
+ {
2901
+ type: "button",
2902
+ ...closeProps,
2903
+ ref: forwardedRef,
2904
+ onClick: composeEventHandlers(props.onClick, () => context.onOpenChange(false))
2905
+ }
2906
+ );
2907
+ }
2908
+ );
2909
+ DialogClose.displayName = CLOSE_NAME;
2910
+ function getState(open) {
2911
+ return open ? "open" : "closed";
2912
+ }
2913
+ var TITLE_WARNING_NAME = "DialogTitleWarning";
2914
+ var [WarningProvider, useWarningContext] = createContext2(TITLE_WARNING_NAME, {
2915
+ contentName: CONTENT_NAME$1,
2916
+ titleName: TITLE_NAME$1,
2917
+ docsSlug: "dialog"
2918
+ });
2919
+ var TitleWarning = ({ titleId }) => {
2920
+ const titleWarningContext = useWarningContext(TITLE_WARNING_NAME);
2921
+ const MESSAGE = `\`${titleWarningContext.contentName}\` requires a \`${titleWarningContext.titleName}\` for the component to be accessible for screen reader users.
2922
+
2923
+ If you want to hide the \`${titleWarningContext.titleName}\`, you can wrap it with our VisuallyHidden component.
2924
+
2925
+ For more information, see https://radix-ui.com/primitives/docs/components/${titleWarningContext.docsSlug}`;
2926
+ React__namespace.useEffect(() => {
2927
+ if (titleId) {
2928
+ const hasTitle = document.getElementById(titleId);
2929
+ if (!hasTitle) console.error(MESSAGE);
2930
+ }
2931
+ }, [MESSAGE, titleId]);
2932
+ return null;
2933
+ };
2934
+ var DESCRIPTION_WARNING_NAME = "DialogDescriptionWarning";
2935
+ var DescriptionWarning$1 = ({ contentRef, descriptionId }) => {
2936
+ const descriptionWarningContext = useWarningContext(DESCRIPTION_WARNING_NAME);
2937
+ const MESSAGE = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${descriptionWarningContext.contentName}}.`;
2938
+ React__namespace.useEffect(() => {
2939
+ const describedById = contentRef.current?.getAttribute("aria-describedby");
2940
+ if (descriptionId && describedById) {
2941
+ const hasDescription = document.getElementById(descriptionId);
2942
+ if (!hasDescription) console.warn(MESSAGE);
2943
+ }
2944
+ }, [MESSAGE, contentRef, descriptionId]);
2945
+ return null;
2946
+ };
2947
+ var Root = Dialog;
2948
+ var Trigger = DialogTrigger;
2949
+ var Portal = DialogPortal;
2950
+ var Overlay = DialogOverlay;
2951
+ var Content = DialogContent;
2952
+ var Title = DialogTitle;
2953
+ var Description = DialogDescription;
2954
+ var Close = DialogClose;
2955
+
2956
+ var ROOT_NAME = "AlertDialog";
2957
+ var [createAlertDialogContext, createAlertDialogScope] = createContextScope(ROOT_NAME, [
2958
+ createDialogScope
2959
+ ]);
2960
+ var useDialogScope = createDialogScope();
2961
+ var AlertDialog = (props) => {
2962
+ const { __scopeAlertDialog, ...alertDialogProps } = props;
2963
+ const dialogScope = useDialogScope(__scopeAlertDialog);
2964
+ return /* @__PURE__ */ jsxRuntime.jsx(Root, { ...dialogScope, ...alertDialogProps, modal: true });
2965
+ };
2966
+ AlertDialog.displayName = ROOT_NAME;
2967
+ var TRIGGER_NAME = "AlertDialogTrigger";
2968
+ var AlertDialogTrigger = React__namespace.forwardRef(
2969
+ (props, forwardedRef) => {
2970
+ const { __scopeAlertDialog, ...triggerProps } = props;
2971
+ const dialogScope = useDialogScope(__scopeAlertDialog);
2972
+ return /* @__PURE__ */ jsxRuntime.jsx(Trigger, { ...dialogScope, ...triggerProps, ref: forwardedRef });
2973
+ }
2974
+ );
2975
+ AlertDialogTrigger.displayName = TRIGGER_NAME;
2976
+ var PORTAL_NAME = "AlertDialogPortal";
2977
+ var AlertDialogPortal = (props) => {
2978
+ const { __scopeAlertDialog, ...portalProps } = props;
2979
+ const dialogScope = useDialogScope(__scopeAlertDialog);
2980
+ return /* @__PURE__ */ jsxRuntime.jsx(Portal, { ...dialogScope, ...portalProps });
2981
+ };
2982
+ AlertDialogPortal.displayName = PORTAL_NAME;
2983
+ var OVERLAY_NAME = "AlertDialogOverlay";
2984
+ var AlertDialogOverlay = React__namespace.forwardRef(
2985
+ (props, forwardedRef) => {
2986
+ const { __scopeAlertDialog, ...overlayProps } = props;
2987
+ const dialogScope = useDialogScope(__scopeAlertDialog);
2988
+ return /* @__PURE__ */ jsxRuntime.jsx(Overlay, { ...dialogScope, ...overlayProps, ref: forwardedRef });
2989
+ }
2990
+ );
2991
+ AlertDialogOverlay.displayName = OVERLAY_NAME;
2992
+ var CONTENT_NAME = "AlertDialogContent";
2993
+ var [AlertDialogContentProvider, useAlertDialogContentContext] = createAlertDialogContext(CONTENT_NAME);
2994
+ var AlertDialogContent = React__namespace.forwardRef(
2995
+ (props, forwardedRef) => {
2996
+ const { __scopeAlertDialog, children, ...contentProps } = props;
2997
+ const dialogScope = useDialogScope(__scopeAlertDialog);
2998
+ const contentRef = React__namespace.useRef(null);
2999
+ const composedRefs = useComposedRefs(forwardedRef, contentRef);
3000
+ const cancelRef = React__namespace.useRef(null);
3001
+ return /* @__PURE__ */ jsxRuntime.jsx(
3002
+ WarningProvider,
3003
+ {
3004
+ contentName: CONTENT_NAME,
3005
+ titleName: TITLE_NAME,
3006
+ docsSlug: "alert-dialog",
3007
+ children: /* @__PURE__ */ jsxRuntime.jsx(AlertDialogContentProvider, { scope: __scopeAlertDialog, cancelRef, children: /* @__PURE__ */ jsxRuntime.jsxs(
3008
+ Content,
3009
+ {
3010
+ role: "alertdialog",
3011
+ ...dialogScope,
3012
+ ...contentProps,
3013
+ ref: composedRefs,
3014
+ onOpenAutoFocus: composeEventHandlers(contentProps.onOpenAutoFocus, (event) => {
3015
+ event.preventDefault();
3016
+ cancelRef.current?.focus({ preventScroll: true });
3017
+ }),
3018
+ onPointerDownOutside: (event) => event.preventDefault(),
3019
+ onInteractOutside: (event) => event.preventDefault(),
3020
+ children: [
3021
+ /* @__PURE__ */ jsxRuntime.jsx(Slottable, { children }),
3022
+ /* @__PURE__ */ jsxRuntime.jsx(DescriptionWarning, { contentRef })
3023
+ ]
3024
+ }
3025
+ ) })
3026
+ }
3027
+ );
3028
+ }
3029
+ );
3030
+ AlertDialogContent.displayName = CONTENT_NAME;
3031
+ var TITLE_NAME = "AlertDialogTitle";
3032
+ var AlertDialogTitle = React__namespace.forwardRef(
3033
+ (props, forwardedRef) => {
3034
+ const { __scopeAlertDialog, ...titleProps } = props;
3035
+ const dialogScope = useDialogScope(__scopeAlertDialog);
3036
+ return /* @__PURE__ */ jsxRuntime.jsx(Title, { ...dialogScope, ...titleProps, ref: forwardedRef });
3037
+ }
3038
+ );
3039
+ AlertDialogTitle.displayName = TITLE_NAME;
3040
+ var DESCRIPTION_NAME = "AlertDialogDescription";
3041
+ var AlertDialogDescription = React__namespace.forwardRef((props, forwardedRef) => {
3042
+ const { __scopeAlertDialog, ...descriptionProps } = props;
3043
+ const dialogScope = useDialogScope(__scopeAlertDialog);
3044
+ return /* @__PURE__ */ jsxRuntime.jsx(Description, { ...dialogScope, ...descriptionProps, ref: forwardedRef });
3045
+ });
3046
+ AlertDialogDescription.displayName = DESCRIPTION_NAME;
3047
+ var ACTION_NAME = "AlertDialogAction";
3048
+ var AlertDialogAction = React__namespace.forwardRef(
3049
+ (props, forwardedRef) => {
3050
+ const { __scopeAlertDialog, ...actionProps } = props;
3051
+ const dialogScope = useDialogScope(__scopeAlertDialog);
3052
+ return /* @__PURE__ */ jsxRuntime.jsx(Close, { ...dialogScope, ...actionProps, ref: forwardedRef });
3053
+ }
3054
+ );
3055
+ AlertDialogAction.displayName = ACTION_NAME;
3056
+ var CANCEL_NAME = "AlertDialogCancel";
3057
+ var AlertDialogCancel = React__namespace.forwardRef(
3058
+ (props, forwardedRef) => {
3059
+ const { __scopeAlertDialog, ...cancelProps } = props;
3060
+ const { cancelRef } = useAlertDialogContentContext(CANCEL_NAME, __scopeAlertDialog);
3061
+ const dialogScope = useDialogScope(__scopeAlertDialog);
3062
+ const ref = useComposedRefs(forwardedRef, cancelRef);
3063
+ return /* @__PURE__ */ jsxRuntime.jsx(Close, { ...dialogScope, ...cancelProps, ref });
3064
+ }
3065
+ );
3066
+ AlertDialogCancel.displayName = CANCEL_NAME;
3067
+ var DescriptionWarning = ({ contentRef }) => {
3068
+ const MESSAGE = `\`${CONTENT_NAME}\` requires a description for the component to be accessible for screen reader users.
3069
+
3070
+ You can add a description to the \`${CONTENT_NAME}\` by passing a \`${DESCRIPTION_NAME}\` component as a child, which also benefits sighted users by adding visible context to the dialog.
3071
+
3072
+ Alternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${CONTENT_NAME}\`. If the description is confusing or duplicative for sighted users, you can use the \`@radix-ui/react-visually-hidden\` primitive as a wrapper around your description component.
3073
+
3074
+ For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;
3075
+ React__namespace.useEffect(() => {
3076
+ const hasDescription = document.getElementById(
3077
+ contentRef.current?.getAttribute("aria-describedby")
3078
+ );
3079
+ if (!hasDescription) console.warn(MESSAGE);
3080
+ }, [MESSAGE, contentRef]);
3081
+ return null;
3082
+ };
3083
+ var Root2 = AlertDialog;
3084
+ var Portal2 = AlertDialogPortal;
3085
+
3086
+ var overlayShow = ft(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n"], ["\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n"])));
3087
+ var AlertOverlay = pt.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n background: rgb(61 62 63 / 0.5);\n position: fixed;\n inset: 0;\n animation: ", " 300ms cubic-bezier(0.16, 1, 0.3, 1);\n"], ["\n background: rgb(61 62 63 / 0.5);\n position: fixed;\n inset: 0;\n animation: ", " 300ms cubic-bezier(0.16, 1, 0.3, 1);\n"])), overlayShow);
3088
+ var ModalHeaderContainer = pt.div(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n width: 410px;\n height: 56px;\n border-radius: 6px 6px 0 0;\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: space-between;\n background: ", ";\n padding-left: 24px;\n padding-right: 24px;\n"], ["\n width: 410px;\n height: 56px;\n border-radius: 6px 6px 0 0;\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: space-between;\n background: ", ";\n padding-left: 24px;\n padding-right: 24px;\n"])), function (_a) {
3089
+ var theme = _a.theme;
3090
+ return theme.colors.primary;
3091
+ });
3092
+ var ModalHeaderText = pt.div(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n font-size: 20px;\n font-weight: 700;\n line-height: 24px;\n text-align: left;\n color: ", ";\n"], ["\n font-size: 20px;\n font-weight: 700;\n line-height: 24px;\n text-align: left;\n color: ", ";\n"])), function (_a) {
3093
+ var theme = _a.theme;
3094
+ return theme.colors.base.white;
3095
+ });
3096
+ var CloseBtn = pt.button(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n all: unset;\n cursor: pointer;\n"], ["\n all: unset;\n cursor: pointer;\n"])));
3097
+ pt.div(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n color: ", ";\n"], ["\n color: ", ";\n"])), function (_a) {
3098
+ var theme = _a.theme;
3099
+ return theme.colors.base.white;
3100
+ });
3101
+ var ContentContainer = pt.div(templateObject_7 || (templateObject_7 = __makeTemplateObject(["\n border-radius: 6px;\n box-shadow:\n hsl(206 22% 7% / 35%) 0px 10px 38px -10px,\n hsl(206 22% 7% / 20%) 0px 10px 20px -15px;\n position: fixed;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n max-width: 500px;\n height: auto;\n background: ", ";\n"], ["\n border-radius: 6px;\n box-shadow:\n hsl(206 22% 7% / 35%) 0px 10px 38px -10px,\n hsl(206 22% 7% / 20%) 0px 10px 20px -15px;\n position: fixed;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n max-width: 500px;\n height: auto;\n background: ", ";\n"])), function (_a) {
3102
+ var theme = _a.theme;
3103
+ return theme.colors.base.white;
3104
+ });
3105
+ var ContentChildren = pt.div(templateObject_8 || (templateObject_8 = __makeTemplateObject(["\n padding: 20px;\n"], ["\n padding: 20px;\n"])));
3106
+ var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6, templateObject_7, templateObject_8;
3107
+
3108
+ var IconCLose = function (props) {
3109
+ var _a;
3110
+ return (React.createElement("svg", __assign({ width: "15", height: "15", viewBox: "0 0 15 15", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, props),
3111
+ React.createElement("path", { d: "M2.0665 14.5L0.666504 13.1L6.2665 7.5L0.666504 1.9L2.0665 0.5L7.6665 6.1L13.2665 0.5L14.6665 1.9L9.0665 7.5L14.6665 13.1L13.2665 14.5L7.6665 8.9L2.0665 14.5Z", fill: (_a = props === null || props === void 0 ? void 0 : props.fill) !== null && _a !== void 0 ? _a : "black" })));
3112
+ };
3113
+
3114
+ var theme = {
3115
+ colors: {
3116
+ primary: "#005a92",
3117
+ secondary: "",
3118
+ hover: "#005A92",
3119
+ textSecondary: "",
3120
+ iconColor: "#4A4A4B",
3121
+ success: "#198754",
3122
+ warning: "#CB8700",
3123
+ alert: "#CB0A0A",
3124
+ information: "#1A95B0",
3125
+ border: "#D9D9D9",
3126
+ lightGrey: "#C3C3C3",
3127
+ grey: "#A0A0A0",
3128
+ base: {
3129
+ white: "#FFFFFF",
3130
+ black: "#303030",
3131
+ },
3132
+ },
3133
+ };
3134
+
3135
+ var Modal = function (_a) {
3136
+ var isModalOpen = _a.isModalOpen, onOpenChange = _a.onOpenChange, children = _a.children, title = _a.title;
3137
+ return (React.createElement(Root2, { open: isModalOpen, onOpenChange: onOpenChange },
3138
+ React.createElement(Portal2, null,
3139
+ React.createElement(AlertOverlay, null),
3140
+ React.createElement(ContentContainer, null,
3141
+ React.createElement(ModalHeaderContainer, null,
3142
+ React.createElement(ModalHeaderText, null, title),
3143
+ React.createElement(CloseBtn, { onClick: function () { return onOpenChange(!isModalOpen); } },
3144
+ React.createElement(IconCLose, { fill: theme.colors.base.white }))),
3145
+ React.createElement(ContentChildren, null, children)))));
3146
+ };
3147
+
3148
+ var IconDownload = function (props) { return (React.createElement("svg", __assign({ width: "17", height: "17", viewBox: "0 0 17 17", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, props),
3149
+ React.createElement("path", { d: "M8.6665 12.5L3.6665 7.5L5.0665 6.05L7.6665 8.65V0.5H9.6665V8.65L12.2665 6.05L13.6665 7.5L8.6665 12.5ZM2.6665 16.5C2.1165 16.5 1.64567 16.3042 1.254 15.9125C0.862337 15.5208 0.666504 15.05 0.666504 14.5V11.5H2.6665V14.5H14.6665V11.5H16.6665V14.5C16.6665 15.05 16.4707 15.5208 16.079 15.9125C15.6873 16.3042 15.2165 16.5 14.6665 16.5H2.6665Z", fill: "#4A4A4B" }))); };
3150
+
3151
+ var IconVisibillity = function (props) { return (React.createElement("svg", __assign({ width: "23", height: "15", viewBox: "0 0 23 15", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, props),
3152
+ React.createElement("path", { d: "M11.6665 12C12.9165 12 13.979 11.5625 14.854 10.6875C15.729 9.8125 16.1665 8.75 16.1665 7.5C16.1665 6.25 15.729 5.1875 14.854 4.3125C13.979 3.4375 12.9165 3 11.6665 3C10.4165 3 9.354 3.4375 8.479 4.3125C7.604 5.1875 7.1665 6.25 7.1665 7.5C7.1665 8.75 7.604 9.8125 8.479 10.6875C9.354 11.5625 10.4165 12 11.6665 12ZM11.6665 10.2C10.9165 10.2 10.279 9.9375 9.754 9.4125C9.229 8.8875 8.9665 8.25 8.9665 7.5C8.9665 6.75 9.229 6.1125 9.754 5.5875C10.279 5.0625 10.9165 4.8 11.6665 4.8C12.4165 4.8 13.054 5.0625 13.579 5.5875C14.104 6.1125 14.3665 6.75 14.3665 7.5C14.3665 8.25 14.104 8.8875 13.579 9.4125C13.054 9.9375 12.4165 10.2 11.6665 10.2ZM11.6665 15C9.23317 15 7.0165 14.3208 5.0165 12.9625C3.0165 11.6042 1.5665 9.78333 0.666504 7.5C1.5665 5.21667 3.0165 3.39583 5.0165 2.0375C7.0165 0.679167 9.23317 0 11.6665 0C14.0998 0 16.3165 0.679167 18.3165 2.0375C20.3165 3.39583 21.7665 5.21667 22.6665 7.5C21.7665 9.78333 20.3165 11.6042 18.3165 12.9625C16.3165 14.3208 14.0998 15 11.6665 15ZM11.6665 13C13.5498 13 15.279 12.5042 16.854 11.5125C18.429 10.5208 19.6332 9.18333 20.4665 7.5C19.6332 5.81667 18.429 4.47917 16.854 3.4875C15.279 2.49583 13.5498 2 11.6665 2C9.78317 2 8.054 2.49583 6.479 3.4875C4.904 4.47917 3.69984 5.81667 2.8665 7.5C3.69984 9.18333 4.904 10.5208 6.479 11.5125C8.054 12.5042 9.78317 13 11.6665 13Z", fill: "#4A4A4B" }))); };
3153
+
3154
+ var IconEdit = function (props) { return (React.createElement("svg", __assign({ width: "19", height: "19", viewBox: "0 0 19 19", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, props),
3155
+ React.createElement("path", { d: "M2.6665 16.5H4.0915L13.8665 6.725L12.4415 5.3L2.6665 15.075V16.5ZM0.666504 18.5V14.25L13.8665 1.075C14.0665 0.891667 14.2873 0.75 14.529 0.65C14.7707 0.55 15.0248 0.5 15.2915 0.5C15.5582 0.5 15.8165 0.55 16.0665 0.65C16.3165 0.75 16.5332 0.9 16.7165 1.1L18.0915 2.5C18.2915 2.68333 18.4373 2.9 18.529 3.15C18.6207 3.4 18.6665 3.65 18.6665 3.9C18.6665 4.16667 18.6207 4.42083 18.529 4.6625C18.4373 4.90417 18.2915 5.125 18.0915 5.325L4.9165 18.5H0.666504ZM13.1415 6.025L12.4415 5.3L13.8665 6.725L13.1415 6.025Z", fill: "#4A4A4B" }))); };
3156
+
3157
+ var IconDelete = function (props) { return (React.createElement("svg", __assign({ width: "17", height: "19", viewBox: "0 0 17 19", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, props),
3158
+ React.createElement("path", { d: "M3.6665 18.5C3.1165 18.5 2.64567 18.3042 2.254 17.9125C1.86234 17.5208 1.6665 17.05 1.6665 16.5V3.5H0.666504V1.5H5.6665V0.5H11.6665V1.5H16.6665V3.5H15.6665V16.5C15.6665 17.05 15.4707 17.5208 15.079 17.9125C14.6873 18.3042 14.2165 18.5 13.6665 18.5H3.6665ZM13.6665 3.5H3.6665V16.5H13.6665V3.5ZM5.6665 14.5H7.6665V5.5H5.6665V14.5ZM9.6665 14.5H11.6665V5.5H9.6665V14.5Z", fill: "#4A4A4B" }))); };
3159
+
3160
+ var IconCalendar = function (props) { return (React.createElement("svg", __assign({ width: "19", height: "21", viewBox: "0 0 19 21", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, props),
3161
+ React.createElement("path", { d: "M2.6665 20.5C2.1165 20.5 1.64567 20.3042 1.254 19.9125C0.862337 19.5208 0.666504 19.05 0.666504 18.5V4.5C0.666504 3.95 0.862337 3.47917 1.254 3.0875C1.64567 2.69583 2.1165 2.5 2.6665 2.5H3.6665V0.5H5.6665V2.5H13.6665V0.5H15.6665V2.5H16.6665C17.2165 2.5 17.6873 2.69583 18.079 3.0875C18.4707 3.47917 18.6665 3.95 18.6665 4.5V18.5C18.6665 19.05 18.4707 19.5208 18.079 19.9125C17.6873 20.3042 17.2165 20.5 16.6665 20.5H2.6665ZM2.6665 18.5H16.6665V8.5H2.6665V18.5ZM2.6665 6.5H16.6665V4.5H2.6665V6.5ZM9.6665 12.5C9.38317 12.5 9.14567 12.4042 8.954 12.2125C8.76234 12.0208 8.6665 11.7833 8.6665 11.5C8.6665 11.2167 8.76234 10.9792 8.954 10.7875C9.14567 10.5958 9.38317 10.5 9.6665 10.5C9.94984 10.5 10.1873 10.5958 10.379 10.7875C10.5707 10.9792 10.6665 11.2167 10.6665 11.5C10.6665 11.7833 10.5707 12.0208 10.379 12.2125C10.1873 12.4042 9.94984 12.5 9.6665 12.5ZM5.6665 12.5C5.38317 12.5 5.14567 12.4042 4.954 12.2125C4.76234 12.0208 4.6665 11.7833 4.6665 11.5C4.6665 11.2167 4.76234 10.9792 4.954 10.7875C5.14567 10.5958 5.38317 10.5 5.6665 10.5C5.94984 10.5 6.18734 10.5958 6.379 10.7875C6.57067 10.9792 6.6665 11.2167 6.6665 11.5C6.6665 11.7833 6.57067 12.0208 6.379 12.2125C6.18734 12.4042 5.94984 12.5 5.6665 12.5ZM13.6665 12.5C13.3832 12.5 13.1457 12.4042 12.954 12.2125C12.7623 12.0208 12.6665 11.7833 12.6665 11.5C12.6665 11.2167 12.7623 10.9792 12.954 10.7875C13.1457 10.5958 13.3832 10.5 13.6665 10.5C13.9498 10.5 14.1873 10.5958 14.379 10.7875C14.5707 10.9792 14.6665 11.2167 14.6665 11.5C14.6665 11.7833 14.5707 12.0208 14.379 12.2125C14.1873 12.4042 13.9498 12.5 13.6665 12.5ZM9.6665 16.5C9.38317 16.5 9.14567 16.4042 8.954 16.2125C8.76234 16.0208 8.6665 15.7833 8.6665 15.5C8.6665 15.2167 8.76234 14.9792 8.954 14.7875C9.14567 14.5958 9.38317 14.5 9.6665 14.5C9.94984 14.5 10.1873 14.5958 10.379 14.7875C10.5707 14.9792 10.6665 15.2167 10.6665 15.5C10.6665 15.7833 10.5707 16.0208 10.379 16.2125C10.1873 16.4042 9.94984 16.5 9.6665 16.5ZM5.6665 16.5C5.38317 16.5 5.14567 16.4042 4.954 16.2125C4.76234 16.0208 4.6665 15.7833 4.6665 15.5C4.6665 15.2167 4.76234 14.9792 4.954 14.7875C5.14567 14.5958 5.38317 14.5 5.6665 14.5C5.94984 14.5 6.18734 14.5958 6.379 14.7875C6.57067 14.9792 6.6665 15.2167 6.6665 15.5C6.6665 15.7833 6.57067 16.0208 6.379 16.2125C6.18734 16.4042 5.94984 16.5 5.6665 16.5ZM13.6665 16.5C13.3832 16.5 13.1457 16.4042 12.954 16.2125C12.7623 16.0208 12.6665 15.7833 12.6665 15.5C12.6665 15.2167 12.7623 14.9792 12.954 14.7875C13.1457 14.5958 13.3832 14.5 13.6665 14.5C13.9498 14.5 14.1873 14.5958 14.379 14.7875C14.5707 14.9792 14.6665 15.2167 14.6665 15.5C14.6665 15.7833 14.5707 16.0208 14.379 16.2125C14.1873 16.4042 13.9498 16.5 13.6665 16.5Z", fill: "#4A4A4B" }))); };
3162
+
3163
+ var IconProfile = function (props) { return (React.createElement("svg", __assign({ width: "17", height: "17", viewBox: "0 0 17 17", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, props),
3164
+ React.createElement("path", { d: "M8.6665 8.5C7.5665 8.5 6.62484 8.10833 5.8415 7.325C5.05817 6.54167 4.6665 5.6 4.6665 4.5C4.6665 3.4 5.05817 2.45833 5.8415 1.675C6.62484 0.891667 7.5665 0.5 8.6665 0.5C9.7665 0.5 10.7082 0.891667 11.4915 1.675C12.2748 2.45833 12.6665 3.4 12.6665 4.5C12.6665 5.6 12.2748 6.54167 11.4915 7.325C10.7082 8.10833 9.7665 8.5 8.6665 8.5ZM0.666504 16.5V13.7C0.666504 13.1333 0.812337 12.6125 1.104 12.1375C1.39567 11.6625 1.78317 11.3 2.2665 11.05C3.29984 10.5333 4.34984 10.1458 5.4165 9.8875C6.48317 9.62917 7.5665 9.5 8.6665 9.5C9.7665 9.5 10.8498 9.62917 11.9165 9.8875C12.9832 10.1458 14.0332 10.5333 15.0665 11.05C15.5498 11.3 15.9373 11.6625 16.229 12.1375C16.5207 12.6125 16.6665 13.1333 16.6665 13.7V16.5H0.666504ZM2.6665 14.5H14.6665V13.7C14.6665 13.5167 14.6207 13.35 14.529 13.2C14.4373 13.05 14.3165 12.9333 14.1665 12.85C13.2665 12.4 12.3582 12.0625 11.4415 11.8375C10.5248 11.6125 9.59984 11.5 8.6665 11.5C7.73317 11.5 6.80817 11.6125 5.8915 11.8375C4.97484 12.0625 4.0665 12.4 3.1665 12.85C3.0165 12.9333 2.89567 13.05 2.804 13.2C2.71234 13.35 2.6665 13.5167 2.6665 13.7V14.5ZM8.6665 6.5C9.2165 6.5 9.68734 6.30417 10.079 5.9125C10.4707 5.52083 10.6665 5.05 10.6665 4.5C10.6665 3.95 10.4707 3.47917 10.079 3.0875C9.68734 2.69583 9.2165 2.5 8.6665 2.5C8.1165 2.5 7.64567 2.69583 7.254 3.0875C6.86234 3.47917 6.6665 3.95 6.6665 4.5C6.6665 5.05 6.86234 5.52083 7.254 5.9125C7.64567 6.30417 8.1165 6.5 8.6665 6.5Z", fill: "#4A4A4B" }))); };
3165
+
3166
+ var IconUpload = function (props) { return (React.createElement("svg", __assign({ width: "17", height: "17", viewBox: "0 0 17 17", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, props),
3167
+ React.createElement("path", { d: "M7.6665 16.5V8.35L5.0665 10.95L3.6665 9.5L8.6665 4.5L13.6665 9.5L12.2665 10.95L9.6665 8.35V16.5H7.6665ZM0.666504 5.5V2.5C0.666504 1.95 0.862337 1.47917 1.254 1.0875C1.64567 0.695833 2.1165 0.5 2.6665 0.5H14.6665C15.2165 0.5 15.6873 0.695833 16.079 1.0875C16.4707 1.47917 16.6665 1.95 16.6665 2.5V5.5H14.6665V2.5H2.6665V5.5H0.666504Z", fill: "#4A4A4B" }))); };
3168
+
3169
+ var IconNewTab = function (props) { return (React.createElement("svg", __assign({ width: "19", height: "19", viewBox: "0 0 19 19", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, props),
3170
+ React.createElement("path", { d: "M2.6665 18.5C2.1165 18.5 1.64567 18.3042 1.254 17.9125C0.862337 17.5208 0.666504 17.05 0.666504 16.5V2.5C0.666504 1.95 0.862337 1.47917 1.254 1.0875C1.64567 0.695833 2.1165 0.5 2.6665 0.5H9.6665V2.5H2.6665V16.5H16.6665V9.5H18.6665V16.5C18.6665 17.05 18.4707 17.5208 18.079 17.9125C17.6873 18.3042 17.2165 18.5 16.6665 18.5H2.6665ZM7.3665 13.2L5.9665 11.8L15.2665 2.5H11.6665V0.5H18.6665V7.5H16.6665V3.9L7.3665 13.2Z", fill: "#4A4A4B" }))); };
3171
+
3172
+ var IconWarning = function (props) { return (React.createElement("svg", __assign({ width: "23", height: "20", viewBox: "0 0 23 20", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, props),
3173
+ React.createElement("path", { d: "M0.666504 19.5L11.6665 0.5L22.6665 19.5H0.666504ZM4.1165 17.5H19.2165L11.6665 4.5L4.1165 17.5ZM11.6665 16.5C11.9498 16.5 12.1873 16.4042 12.379 16.2125C12.5707 16.0208 12.6665 15.7833 12.6665 15.5C12.6665 15.2167 12.5707 14.9792 12.379 14.7875C12.1873 14.5958 11.9498 14.5 11.6665 14.5C11.3832 14.5 11.1457 14.5958 10.954 14.7875C10.7623 14.9792 10.6665 15.2167 10.6665 15.5C10.6665 15.7833 10.7623 16.0208 10.954 16.2125C11.1457 16.4042 11.3832 16.5 11.6665 16.5ZM10.6665 13.5H12.6665V8.5H10.6665V13.5Z", fill: "#4A4A4B" }))); };
3174
+
3175
+ var IconCheckCircle = function (props) { return (React.createElement("svg", __assign({ width: "21", height: "21", viewBox: "0 0 21 21", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, props),
3176
+ React.createElement("path", { d: "M9.2665 15.1L16.3165 8.05L14.9165 6.65L9.2665 12.3L6.4165 9.45L5.0165 10.85L9.2665 15.1ZM10.6665 20.5C9.28317 20.5 7.98317 20.2375 6.7665 19.7125C5.54984 19.1875 4.4915 18.475 3.5915 17.575C2.6915 16.675 1.979 15.6167 1.454 14.4C0.929004 13.1833 0.666504 11.8833 0.666504 10.5C0.666504 9.11667 0.929004 7.81667 1.454 6.6C1.979 5.38333 2.6915 4.325 3.5915 3.425C4.4915 2.525 5.54984 1.8125 6.7665 1.2875C7.98317 0.7625 9.28317 0.5 10.6665 0.5C12.0498 0.5 13.3498 0.7625 14.5665 1.2875C15.7832 1.8125 16.8415 2.525 17.7415 3.425C18.6415 4.325 19.354 5.38333 19.879 6.6C20.404 7.81667 20.6665 9.11667 20.6665 10.5C20.6665 11.8833 20.404 13.1833 19.879 14.4C19.354 15.6167 18.6415 16.675 17.7415 17.575C16.8415 18.475 15.7832 19.1875 14.5665 19.7125C13.3498 20.2375 12.0498 20.5 10.6665 20.5ZM10.6665 18.5C12.8998 18.5 14.7915 17.725 16.3415 16.175C17.8915 14.625 18.6665 12.7333 18.6665 10.5C18.6665 8.26667 17.8915 6.375 16.3415 4.825C14.7915 3.275 12.8998 2.5 10.6665 2.5C8.43317 2.5 6.5415 3.275 4.9915 4.825C3.4415 6.375 2.6665 8.26667 2.6665 10.5C2.6665 12.7333 3.4415 14.625 4.9915 16.175C6.5415 17.725 8.43317 18.5 10.6665 18.5Z", fill: "black" }))); };
3177
+
3178
+ var IconEventAvaliable = function (props) { return (React.createElement("svg", __assign({ width: "17", height: "21", viewBox: "0 0 17 21", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, props),
3179
+ React.createElement("path", { d: "M7.74775 16.85L4.6415 13.3L5.91025 11.85L7.74775 13.95L11.4228 9.75L12.6915 11.2L7.74775 16.85ZM2.5415 20.5C2.06025 20.5 1.64827 20.3042 1.30557 19.9125C0.962858 19.5208 0.791504 19.05 0.791504 18.5V4.5C0.791504 3.95 0.962858 3.47917 1.30557 3.0875C1.64827 2.69583 2.06025 2.5 2.5415 2.5H3.4165V0.5H5.1665V2.5H12.1665V0.5H13.9165V2.5H14.7915C15.2728 2.5 15.6847 2.69583 16.0274 3.0875C16.3701 3.47917 16.5415 3.95 16.5415 4.5V18.5C16.5415 19.05 16.3701 19.5208 16.0274 19.9125C15.6847 20.3042 15.2728 20.5 14.7915 20.5H2.5415ZM2.5415 18.5H14.7915V8.5H2.5415V18.5ZM2.5415 6.5H14.7915V4.5H2.5415V6.5Z", fill: "black" }))); };
3180
+
3181
+ var IconLogout = function (props) { return (React.createElement("svg", __assign({ width: "19", height: "19", viewBox: "0 0 19 19", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, props),
3182
+ React.createElement("path", { d: "M2.6665 18.5C2.1165 18.5 1.64567 18.3042 1.254 17.9125C0.862337 17.5208 0.666504 17.05 0.666504 16.5V2.5C0.666504 1.95 0.862337 1.47917 1.254 1.0875C1.64567 0.695833 2.1165 0.5 2.6665 0.5H9.6665V2.5H2.6665V16.5H9.6665V18.5H2.6665ZM13.6665 14.5L12.2915 13.05L14.8415 10.5H6.6665V8.5H14.8415L12.2915 5.95L13.6665 4.5L18.6665 9.5L13.6665 14.5Z", fill: "#4A4A4B" }))); };
3183
+
3184
+ var IconAdd = function (props) { return (React.createElement("svg", __assign({ width: "15", height: "15", viewBox: "0 0 15 15", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, props),
3185
+ React.createElement("path", { d: "M6.6665 8.5H0.666504V6.5H6.6665V0.5H8.6665V6.5H14.6665V8.5H8.6665V14.5H6.6665V8.5Z", fill: "black" }))); };
3186
+
3187
+ var IconRemove = function (props) { return (React.createElement("svg", __assign({ width: "15", height: "3", viewBox: "0 0 15 3", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, props),
3188
+ React.createElement("path", { d: "M0.666504 2.5V0.5H14.6665V2.5H0.666504Z", fill: "black" }))); };
3189
+
3190
+ var IconCircleExpland = function (props) { return (React.createElement("svg", __assign({ width: "21", height: "21", viewBox: "0 0 21 21", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, props),
3191
+ React.createElement("path", { d: "M10.6665 14L15.1665 9.5L13.7415 8.1L10.6665 11.175L7.5915 8.1L6.1665 9.5L10.6665 14ZM10.6665 20.5C9.28317 20.5 7.98317 20.2375 6.7665 19.7125C5.54984 19.1875 4.4915 18.475 3.5915 17.575C2.6915 16.675 1.979 15.6167 1.454 14.4C0.929004 13.1833 0.666504 11.8833 0.666504 10.5C0.666504 9.11667 0.929004 7.81667 1.454 6.6C1.979 5.38333 2.6915 4.325 3.5915 3.425C4.4915 2.525 5.54984 1.8125 6.7665 1.2875C7.98317 0.7625 9.28317 0.5 10.6665 0.5C12.0498 0.5 13.3498 0.7625 14.5665 1.2875C15.7832 1.8125 16.8415 2.525 17.7415 3.425C18.6415 4.325 19.354 5.38333 19.879 6.6C20.404 7.81667 20.6665 9.11667 20.6665 10.5C20.6665 11.8833 20.404 13.1833 19.879 14.4C19.354 15.6167 18.6415 16.675 17.7415 17.575C16.8415 18.475 15.7832 19.1875 14.5665 19.7125C13.3498 20.2375 12.0498 20.5 10.6665 20.5ZM10.6665 18.5C12.8998 18.5 14.7915 17.725 16.3415 16.175C17.8915 14.625 18.6665 12.7333 18.6665 10.5C18.6665 8.26667 17.8915 6.375 16.3415 4.825C14.7915 3.275 12.8998 2.5 10.6665 2.5C8.43317 2.5 6.5415 3.275 4.9915 4.825C3.4415 6.375 2.6665 8.26667 2.6665 10.5C2.6665 12.7333 3.4415 14.625 4.9915 16.175C6.5415 17.725 8.43317 18.5 10.6665 18.5Z", fill: "black" }))); };
3192
+
3193
+ var IconCircleRecall = function (props) { return (React.createElement("svg", __assign({ width: "21", height: "21", viewBox: "0 0 21 21", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, props),
3194
+ React.createElement("path", { d: "M7.5915 12.9L10.6665 9.825L13.7415 12.9L15.1665 11.5L10.6665 7L6.1665 11.5L7.5915 12.9ZM10.6665 20.5C9.28317 20.5 7.98317 20.2375 6.7665 19.7125C5.54984 19.1875 4.4915 18.475 3.5915 17.575C2.6915 16.675 1.979 15.6167 1.454 14.4C0.929004 13.1833 0.666504 11.8833 0.666504 10.5C0.666504 9.11667 0.929004 7.81667 1.454 6.6C1.979 5.38333 2.6915 4.325 3.5915 3.425C4.4915 2.525 5.54984 1.8125 6.7665 1.2875C7.98317 0.7625 9.28317 0.5 10.6665 0.5C12.0498 0.5 13.3498 0.7625 14.5665 1.2875C15.7832 1.8125 16.8415 2.525 17.7415 3.425C18.6415 4.325 19.354 5.38333 19.879 6.6C20.404 7.81667 20.6665 9.11667 20.6665 10.5C20.6665 11.8833 20.404 13.1833 19.879 14.4C19.354 15.6167 18.6415 16.675 17.7415 17.575C16.8415 18.475 15.7832 19.1875 14.5665 19.7125C13.3498 20.2375 12.0498 20.5 10.6665 20.5ZM10.6665 18.5C12.8998 18.5 14.7915 17.725 16.3415 16.175C17.8915 14.625 18.6665 12.7333 18.6665 10.5C18.6665 8.26667 17.8915 6.375 16.3415 4.825C14.7915 3.275 12.8998 2.5 10.6665 2.5C8.43317 2.5 6.5415 3.275 4.9915 4.825C3.4415 6.375 2.6665 8.26667 2.6665 10.5C2.6665 12.7333 3.4415 14.625 4.9915 16.175C6.5415 17.725 8.43317 18.5 10.6665 18.5Z", fill: "black" }))); };
3195
+
3196
+ var IconArrowExpland = function (props) { return (React.createElement("svg", __assign({ width: "13", height: "8", viewBox: "0 0 13 8", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, props),
3197
+ React.createElement("path", { d: "M2.0665 7.87498L0.666504 6.47498L6.6665 0.474976L12.6665 6.47498L11.2665 7.87498L6.6665 3.27498L2.0665 7.87498Z", fill: "black" }))); };
3198
+
3199
+ var IconArrowRecall = function (props) { return (React.createElement("svg", __assign({ width: "13", height: "8", viewBox: "0 0 13 8", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, props),
3200
+ React.createElement("path", { d: "M6.6665 7.87498L0.666504 1.87498L2.0665 0.474976L6.6665 5.07498L11.2665 0.474976L12.6665 1.87498L6.6665 7.87498Z", fill: "#4A4A4B" }))); };
3201
+
3202
+ var IconTriangleExpand = function (props) { return (React.createElement("svg", __assign({ width: "11", height: "6", viewBox: "0 0 11 6", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, props),
3203
+ React.createElement("path", { d: "M0.666504 5.5L5.6665 0.5L10.6665 5.5H0.666504Z", fill: "black" }))); };
3204
+
3205
+ var IconTriangleRecall = function (props) { return (React.createElement("svg", __assign({ width: "11", height: "6", viewBox: "0 0 11 6", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, props),
3206
+ React.createElement("path", { d: "M5.6665 5.5L0.666504 0.5H10.6665L5.6665 5.5Z", fill: "#4A4A4B" }))); };
3207
+
3208
+ var IconSwap = function (props) { return (React.createElement("svg", __assign({ width: "17", height: "21", viewBox: "0 0 17 21", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, props),
3209
+ React.createElement("path", { d: "M4.6665 11.5V4.325L2.0915 6.9L0.666504 5.5L5.6665 0.5L10.6665 5.5L9.2415 6.9L6.6665 4.325V11.5H4.6665ZM11.6665 20.5L6.6665 15.5L8.0915 14.1L10.6665 16.675V9.5H12.6665V16.675L15.2415 14.1L16.6665 15.5L11.6665 20.5Z", fill: "black" }))); };
3210
+
3211
+ var IconAddCell = function (props) { return (React.createElement("svg", __assign({ width: "21", height: "21", viewBox: "0 0 21 21", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, props),
3212
+ React.createElement("path", { d: "M9.6665 15.5H11.6665V11.5H15.6665V9.5H11.6665V5.5H9.6665V9.5H5.6665V11.5H9.6665V15.5ZM10.6665 20.5C9.28317 20.5 7.98317 20.2375 6.7665 19.7125C5.54984 19.1875 4.4915 18.475 3.5915 17.575C2.6915 16.675 1.979 15.6167 1.454 14.4C0.929004 13.1833 0.666504 11.8833 0.666504 10.5C0.666504 9.11667 0.929004 7.81667 1.454 6.6C1.979 5.38333 2.6915 4.325 3.5915 3.425C4.4915 2.525 5.54984 1.8125 6.7665 1.2875C7.98317 0.7625 9.28317 0.5 10.6665 0.5C12.0498 0.5 13.3498 0.7625 14.5665 1.2875C15.7832 1.8125 16.8415 2.525 17.7415 3.425C18.6415 4.325 19.354 5.38333 19.879 6.6C20.404 7.81667 20.6665 9.11667 20.6665 10.5C20.6665 11.8833 20.404 13.1833 19.879 14.4C19.354 15.6167 18.6415 16.675 17.7415 17.575C16.8415 18.475 15.7832 19.1875 14.5665 19.7125C13.3498 20.2375 12.0498 20.5 10.6665 20.5ZM10.6665 18.5C12.8998 18.5 14.7915 17.725 16.3415 16.175C17.8915 14.625 18.6665 12.7333 18.6665 10.5C18.6665 8.26667 17.8915 6.375 16.3415 4.825C14.7915 3.275 12.8998 2.5 10.6665 2.5C8.43317 2.5 6.5415 3.275 4.9915 4.825C3.4415 6.375 2.6665 8.26667 2.6665 10.5C2.6665 12.7333 3.4415 14.625 4.9915 16.175C6.5415 17.725 8.43317 18.5 10.6665 18.5Z", fill: "#4A4A4B" }))); };
85
3213
 
86
3214
  exports.Button = Button;
3215
+ exports.IconAdd = IconAdd;
3216
+ exports.IconAddCell = IconAddCell;
3217
+ exports.IconArrowExpland = IconArrowExpland;
3218
+ exports.IconArrowRecall = IconArrowRecall;
3219
+ exports.IconCLose = IconCLose;
3220
+ exports.IconCalendar = IconCalendar;
3221
+ exports.IconCheckCircle = IconCheckCircle;
3222
+ exports.IconCircleExpland = IconCircleExpland;
3223
+ exports.IconCircleRecall = IconCircleRecall;
3224
+ exports.IconDelete = IconDelete;
3225
+ exports.IconDownload = IconDownload;
3226
+ exports.IconEdit = IconEdit;
3227
+ exports.IconEventAvaliable = IconEventAvaliable;
3228
+ exports.IconLogout = IconLogout;
3229
+ exports.IconNewTab = IconNewTab;
3230
+ exports.IconProfile = IconProfile;
3231
+ exports.IconRemove = IconRemove;
3232
+ exports.IconSwap = IconSwap;
3233
+ exports.IconTriangleExpand = IconTriangleExpand;
3234
+ exports.IconTriangleRecall = IconTriangleRecall;
3235
+ exports.IconUpload = IconUpload;
3236
+ exports.IconVisibillity = IconVisibillity;
3237
+ exports.IconWarning = IconWarning;
3238
+ exports.Modal = Modal;
87
3239
  //# sourceMappingURL=index.js.map