@agility/plenum-ui 1.1.0 → 1.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (117) hide show
  1. package/lib/components/Combobox/Combobox.d.ts +9 -9
  2. package/lib/components/Combobox/Combobox.stories.d.ts +9 -6
  3. package/lib/components/TreeView/TreeItem/TreeItem.d.ts +2 -11
  4. package/lib/components/TreeView/TreeItem/TreeItem.stories.d.ts +1 -4
  5. package/lib/components/TreeView/context.d.ts +8 -5
  6. package/lib/components/TreeView/sampleData.d.ts +5 -5
  7. package/lib/index.esm.js +3174 -370
  8. package/lib/index.esm.js.map +1 -1
  9. package/lib/index.js +3173 -369
  10. package/lib/index.js.map +1 -1
  11. package/package.json +1 -1
  12. package/coverage/Forms/TextInputSelect/InputSelect/InputSelect.tsx.html +0 -204
  13. package/coverage/Forms/TextInputSelect/InputSelect/index.html +0 -155
  14. package/coverage/Select/Select.tsx.html +0 -264
  15. package/coverage/Select/index.html +0 -153
  16. package/coverage/Select.tsx.html +0 -261
  17. package/coverage/agility-component-lib-react/index.html +0 -116
  18. package/coverage/agility-component-lib-react/src/components/Button/Button.tsx.html +0 -343
  19. package/coverage/agility-component-lib-react/src/components/Button/index.html +0 -116
  20. package/coverage/agility-component-lib-react/src/components/Checkbox/Checkbox.tsx.html +0 -235
  21. package/coverage/agility-component-lib-react/src/components/Checkbox/index.html +0 -156
  22. package/coverage/agility-component-lib-react/src/components/Forms/BaseField/BaseField.tsx.html +0 -406
  23. package/coverage/agility-component-lib-react/src/components/Forms/BaseField/index.html +0 -116
  24. package/coverage/agility-component-lib-react/src/components/Forms/Checkbox/Checkbox.tsx.html +0 -283
  25. package/coverage/agility-component-lib-react/src/components/Forms/Checkbox/index.html +0 -116
  26. package/coverage/agility-component-lib-react/src/components/Forms/InputCounter/InputCounter.tsx.html +0 -139
  27. package/coverage/agility-component-lib-react/src/components/Forms/InputCounter/index.html +0 -116
  28. package/coverage/agility-component-lib-react/src/components/Forms/InputLabel/InputLabel.tsx.html +0 -211
  29. package/coverage/agility-component-lib-react/src/components/Forms/InputLabel/index.html +0 -131
  30. package/coverage/agility-component-lib-react/src/components/Forms/InputLabel/index.ts.html +0 -94
  31. package/coverage/agility-component-lib-react/src/components/Forms/Radio/Radio.tsx.html +0 -271
  32. package/coverage/agility-component-lib-react/src/components/Forms/Radio/index.html +0 -116
  33. package/coverage/agility-component-lib-react/src/components/Forms/Select/Select.tsx.html +0 -337
  34. package/coverage/agility-component-lib-react/src/components/Forms/Select/index.html +0 -116
  35. package/coverage/agility-component-lib-react/src/components/Forms/TextInputAddon/InputCta/InputCta.tsx.html +0 -271
  36. package/coverage/agility-component-lib-react/src/components/Forms/TextInputAddon/InputCta/index.html +0 -116
  37. package/coverage/agility-component-lib-react/src/components/Forms/TextInputSelect/InputSelect/InputSelect.tsx.html +0 -217
  38. package/coverage/agility-component-lib-react/src/components/Forms/TextInputSelect/InputSelect/index.html +0 -116
  39. package/coverage/agility-component-lib-react/src/components/Radio/Radio.tsx.html +0 -243
  40. package/coverage/agility-component-lib-react/src/components/Radio/index.html +0 -156
  41. package/coverage/agility-component-lib-react/src/components/Switch/Switch.tsx.html +0 -214
  42. package/coverage/agility-component-lib-react/src/components/Switch/index.html +0 -116
  43. package/coverage/agility-component-lib-react/src/util/DynamicIcons.tsx.html +0 -151
  44. package/coverage/agility-component-lib-react/src/util/Loader.tsx.html +0 -139
  45. package/coverage/agility-component-lib-react/src/util/index.html +0 -131
  46. package/coverage/agility-component-lib-react/styleMock.js.html +0 -91
  47. package/coverage/base.css +0 -224
  48. package/coverage/block-navigation.js +0 -87
  49. package/coverage/clover.xml +0 -145
  50. package/coverage/coverage-final.json +0 -5
  51. package/coverage/favicon.png +0 -0
  52. package/coverage/index.html +0 -146
  53. package/coverage/lcov-report/agility-component-lib-react/index.html +0 -153
  54. package/coverage/lcov-report/agility-component-lib-react/src/components/Button/Button.tsx.html +0 -255
  55. package/coverage/lcov-report/agility-component-lib-react/src/components/Button/index.html +0 -156
  56. package/coverage/lcov-report/agility-component-lib-react/src/components/Checkbox/Checkbox.tsx.html +0 -235
  57. package/coverage/lcov-report/agility-component-lib-react/src/components/Checkbox/index.html +0 -156
  58. package/coverage/lcov-report/agility-component-lib-react/src/components/Forms/BaseField/BaseField.tsx.html +0 -330
  59. package/coverage/lcov-report/agility-component-lib-react/src/components/Forms/BaseField/index.html +0 -158
  60. package/coverage/lcov-report/agility-component-lib-react/src/components/Forms/InputCounter/InputCounter.tsx.html +0 -147
  61. package/coverage/lcov-report/agility-component-lib-react/src/components/Forms/InputCounter/index.html +0 -158
  62. package/coverage/lcov-report/agility-component-lib-react/src/components/Forms/TextInputAddon/InputCta/InputCta.tsx.html +0 -258
  63. package/coverage/lcov-report/agility-component-lib-react/src/components/Forms/TextInputAddon/InputCta/index.html +0 -159
  64. package/coverage/lcov-report/agility-component-lib-react/src/components/Forms/TextInputSelect/InputSelect/InputSelect.tsx.html +0 -210
  65. package/coverage/lcov-report/agility-component-lib-react/src/components/Forms/TextInputSelect/InputSelect/index.html +0 -159
  66. package/coverage/lcov-report/agility-component-lib-react/src/components/Radio/Radio.tsx.html +0 -243
  67. package/coverage/lcov-report/agility-component-lib-react/src/components/Radio/index.html +0 -156
  68. package/coverage/lcov-report/agility-component-lib-react/src/components/Switch/Switch.tsx.html +0 -225
  69. package/coverage/lcov-report/agility-component-lib-react/src/components/Switch/index.html +0 -156
  70. package/coverage/lcov-report/agility-component-lib-react/src/util/DynamicIcons.tsx.html +0 -137
  71. package/coverage/lcov-report/agility-component-lib-react/src/util/index.html +0 -155
  72. package/coverage/lcov-report/agility-component-lib-react/styleMock.js.html +0 -90
  73. package/coverage/lcov-report/base.css +0 -354
  74. package/coverage/lcov-report/block-navigation.js +0 -82
  75. package/coverage/lcov-report/favicon.png +0 -0
  76. package/coverage/lcov-report/index.html +0 -385
  77. package/coverage/lcov-report/prettify.css +0 -101
  78. package/coverage/lcov-report/prettify.js +0 -955
  79. package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
  80. package/coverage/lcov-report/sorter.js +0 -189
  81. package/coverage/lcov.info +0 -267
  82. package/coverage/prettify.css +0 -1
  83. package/coverage/prettify.js +0 -2
  84. package/coverage/sort-arrow-sprite.png +0 -0
  85. package/coverage/sorter.js +0 -196
  86. package/lib/components/Checkbox/Checkbox.d.ts +0 -19
  87. package/lib/components/Checkbox/Checkbox.stories.d.ts +0 -12
  88. package/lib/components/Checkbox/Checkbox.test.d.ts +0 -1
  89. package/lib/components/Checkbox/index.d.ts +0 -1
  90. package/lib/components/DatePicker/DatePicker.d.ts +0 -7
  91. package/lib/components/DatePicker/DatePicker.stories.d.ts +0 -6
  92. package/lib/components/DatePicker/DatePicker.test.d.ts +0 -1
  93. package/lib/components/DatePicker/index.d.ts +0 -1
  94. package/lib/components/Forms/InputCta/InputCta.d.ts +0 -16
  95. package/lib/components/Forms/InputCta/InputCta.stories.d.ts +0 -6
  96. package/lib/components/Forms/InputCta/InputCta.test.d.ts +0 -1
  97. package/lib/components/Forms/InputCta/index.d.ts +0 -1
  98. package/lib/components/InputCounter/InputCounter.d.ts +0 -16
  99. package/lib/components/InputCounter/InputCounter.stories.d.ts +0 -6
  100. package/lib/components/InputCounter/InputCounter.test.d.ts +0 -1
  101. package/lib/components/InputCounter/index.d.ts +0 -1
  102. package/lib/components/Radio/Radio.d.ts +0 -21
  103. package/lib/components/Radio/Radio.stories.d.ts +0 -12
  104. package/lib/components/Radio/Radio.test.d.ts +0 -1
  105. package/lib/components/Radio/index.d.ts +0 -1
  106. package/lib/components/Select/Select.d.ts +0 -25
  107. package/lib/components/Select/Select.stories.d.ts +0 -11
  108. package/lib/components/Select/Select.test.d.ts +0 -1
  109. package/lib/components/Select/index.d.ts +0 -1
  110. package/lib/components/TextInput/TextInput.d.ts +0 -46
  111. package/lib/components/TextInput/TextInput.stories.d.ts +0 -10
  112. package/lib/components/TextInput/index.d.ts +0 -1
  113. package/lib/components/TextInputAddon/TextInputAddon.d.ts +0 -51
  114. package/lib/components/TextInputAddon/TextInputAddon.stories.d.ts +0 -6
  115. package/lib/components/TextInputAddon/index.d.ts +0 -1
  116. package/lib/components/TreeView/types/tree.types.d.ts +0 -21
  117. package/yarn-error.log +0 -12463
package/lib/index.esm.js CHANGED
@@ -1,6 +1,7 @@
1
1
  import * as React from 'react';
2
- import React__default, { createContext, forwardRef, useEffect, useCallback, useMemo, useContext, useState, useRef, useReducer, createRef, Fragment, useLayoutEffect, isValidElement, cloneElement, createElement, useImperativeHandle } from 'react';
2
+ import React__default, { createContext, forwardRef, useEffect, useCallback, useMemo, useContext, useState, useRef, useReducer, createRef, Fragment, useLayoutEffect, isValidElement, cloneElement, createElement, memo, useImperativeHandle } from 'react';
3
3
  import { createPortal } from 'react-dom';
4
+ import { jsx } from 'react/jsx-runtime';
4
5
 
5
6
  var classnames = {exports: {}};
6
7
 
@@ -7035,7 +7036,7 @@ function styleInject(css, ref) {
7035
7036
  }
7036
7037
  }
7037
7038
 
7038
- var css_248z = "/*\n! tailwindcss v3.0.21 | MIT License | https://tailwindcss.com\n*//*\n1. Prevent padding and border from affecting element width. (https://github.com/mozdevs/cssremedy/issues/4)\n2. Allow adding a border to an element by just adding a border-width. (https://github.com/tailwindcss/tailwindcss/pull/116)\n*/\n\n*,\n::before,\n::after {\n box-sizing: border-box; /* 1 */\n border-width: 0; /* 2 */\n border-style: solid; /* 2 */\n border-color: #e5e7eb; /* 2 */\n}\n\n::before,\n::after {\n --tw-content: '';\n}\n\n/*\n1. Use a consistent sensible line-height in all browsers.\n2. Prevent adjustments of font size after orientation changes in iOS.\n3. Use a more readable tab size.\n4. Use the user's configured `sans` font-family by default.\n*/\n\nhtml {\n line-height: 1.5; /* 1 */\n -webkit-text-size-adjust: 100%; /* 2 */\n -moz-tab-size: 4; /* 3 */\n -o-tab-size: 4;\n tab-size: 4; /* 3 */\n font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, \"Noto Sans\", sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\", \"Noto Color Emoji\"; /* 4 */\n}\n\n/*\n1. Remove the margin in all browsers.\n2. Inherit line-height from `html` so users can set them as a class directly on the `html` element.\n*/\n\nbody {\n margin: 0; /* 1 */\n line-height: inherit; /* 2 */\n}\n\n/*\n1. Add the correct height in Firefox.\n2. Correct the inheritance of border color in Firefox. (https://bugzilla.mozilla.org/show_bug.cgi?id=190655)\n3. Ensure horizontal rules are visible by default.\n*/\n\nhr {\n height: 0; /* 1 */\n color: inherit; /* 2 */\n border-top-width: 1px; /* 3 */\n}\n\n/*\nAdd the correct text decoration in Chrome, Edge, and Safari.\n*/\n\nabbr:where([title]) {\n -webkit-text-decoration: underline dotted;\n text-decoration: underline dotted;\n}\n\n/*\nRemove the default font size and weight for headings.\n*/\n\nh1,\nh2,\nh3,\nh4,\nh5,\nh6 {\n font-size: inherit;\n font-weight: inherit;\n}\n\n/*\nReset links to optimize for opt-in styling instead of opt-out.\n*/\n\na {\n color: inherit;\n text-decoration: inherit;\n}\n\n/*\nAdd the correct font weight in Edge and Safari.\n*/\n\nb,\nstrong {\n font-weight: bolder;\n}\n\n/*\n1. Use the user's configured `mono` font family by default.\n2. Correct the odd `em` font sizing in all browsers.\n*/\n\ncode,\nkbd,\nsamp,\npre {\n font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, \"Liberation Mono\", \"Courier New\", monospace; /* 1 */\n font-size: 1em; /* 2 */\n}\n\n/*\nAdd the correct font size in all browsers.\n*/\n\nsmall {\n font-size: 80%;\n}\n\n/*\nPrevent `sub` and `sup` elements from affecting the line height in all browsers.\n*/\n\nsub,\nsup {\n font-size: 75%;\n line-height: 0;\n position: relative;\n vertical-align: baseline;\n}\n\nsub {\n bottom: -0.25em;\n}\n\nsup {\n top: -0.5em;\n}\n\n/*\n1. Remove text indentation from table contents in Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=999088, https://bugs.webkit.org/show_bug.cgi?id=201297)\n2. Correct table border color inheritance in all Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=935729, https://bugs.webkit.org/show_bug.cgi?id=195016)\n3. Remove gaps between table borders by default.\n*/\n\ntable {\n text-indent: 0; /* 1 */\n border-color: inherit; /* 2 */\n border-collapse: collapse; /* 3 */\n}\n\n/*\n1. Change the font styles in all browsers.\n2. Remove the margin in Firefox and Safari.\n3. Remove default padding in all browsers.\n*/\n\nbutton,\ninput,\noptgroup,\nselect,\ntextarea {\n font-family: inherit; /* 1 */\n font-size: 100%; /* 1 */\n line-height: inherit; /* 1 */\n color: inherit; /* 1 */\n margin: 0; /* 2 */\n padding: 0; /* 3 */\n}\n\n/*\nRemove the inheritance of text transform in Edge and Firefox.\n*/\n\nbutton,\nselect {\n text-transform: none;\n}\n\n/*\n1. Correct the inability to style clickable types in iOS and Safari.\n2. Remove default button styles.\n*/\n\nbutton,\n[type='button'],\n[type='reset'],\n[type='submit'] {\n -webkit-appearance: button; /* 1 */\n background-color: transparent; /* 2 */\n background-image: none; /* 2 */\n}\n\n/*\nUse the modern Firefox focus style for all focusable elements.\n*/\n\n:-moz-focusring {\n outline: auto;\n}\n\n/*\nRemove the additional `:invalid` styles in Firefox. (https://github.com/mozilla/gecko-dev/blob/2f9eacd9d3d995c937b4251a5557d95d494c9be1/layout/style/res/forms.css#L728-L737)\n*/\n\n:-moz-ui-invalid {\n box-shadow: none;\n}\n\n/*\nAdd the correct vertical alignment in Chrome and Firefox.\n*/\n\nprogress {\n vertical-align: baseline;\n}\n\n/*\nCorrect the cursor style of increment and decrement buttons in Safari.\n*/\n\n::-webkit-inner-spin-button,\n::-webkit-outer-spin-button {\n height: auto;\n}\n\n/*\n1. Correct the odd appearance in Chrome and Safari.\n2. Correct the outline style in Safari.\n*/\n\n[type='search'] {\n -webkit-appearance: textfield; /* 1 */\n outline-offset: -2px; /* 2 */\n}\n\n/*\nRemove the inner padding in Chrome and Safari on macOS.\n*/\n\n::-webkit-search-decoration {\n -webkit-appearance: none;\n}\n\n/*\n1. Correct the inability to style clickable types in iOS and Safari.\n2. Change font properties to `inherit` in Safari.\n*/\n\n::-webkit-file-upload-button {\n -webkit-appearance: button; /* 1 */\n font: inherit; /* 2 */\n}\n\n/*\nAdd the correct display in Chrome and Safari.\n*/\n\nsummary {\n display: list-item;\n}\n\n/*\nRemoves the default spacing and border for appropriate elements.\n*/\n\nblockquote,\ndl,\ndd,\nh1,\nh2,\nh3,\nh4,\nh5,\nh6,\nhr,\nfigure,\np,\npre {\n margin: 0;\n}\n\nfieldset {\n margin: 0;\n padding: 0;\n}\n\nlegend {\n padding: 0;\n}\n\nol,\nul,\nmenu {\n list-style: none;\n margin: 0;\n padding: 0;\n}\n\n/*\nPrevent resizing textareas horizontally by default.\n*/\n\ntextarea {\n resize: vertical;\n}\n\n/*\n1. Reset the default placeholder opacity in Firefox. (https://github.com/tailwindlabs/tailwindcss/issues/3300)\n2. Set the default placeholder color to the user's configured gray 400 color.\n*/\n\ninput::-moz-placeholder, textarea::-moz-placeholder {\n opacity: 1; /* 1 */\n color: #9ca3af; /* 2 */\n}\n\ninput:-ms-input-placeholder, textarea:-ms-input-placeholder {\n opacity: 1; /* 1 */\n color: #9ca3af; /* 2 */\n}\n\ninput::placeholder,\ntextarea::placeholder {\n opacity: 1; /* 1 */\n color: #9ca3af; /* 2 */\n}\n\n/*\nSet the default cursor for buttons.\n*/\n\nbutton,\n[role=\"button\"] {\n cursor: pointer;\n}\n\n/*\nMake sure disabled buttons don't get the pointer cursor.\n*/\n:disabled {\n cursor: default;\n}\n\n/*\n1. Make replaced elements `display: block` by default. (https://github.com/mozdevs/cssremedy/issues/14)\n2. Add `vertical-align: middle` to align replaced elements more sensibly by default. (https://github.com/jensimmons/cssremedy/issues/14#issuecomment-634934210)\n This can trigger a poorly considered lint error in some tools but is included by design.\n*/\n\nimg,\nsvg,\nvideo,\ncanvas,\naudio,\niframe,\nembed,\nobject {\n display: block; /* 1 */\n vertical-align: middle; /* 2 */\n}\n\n/*\nConstrain images and videos to the parent width and preserve their intrinsic aspect ratio. (https://github.com/mozdevs/cssremedy/issues/14)\n*/\n\nimg,\nvideo {\n max-width: 100%;\n height: auto;\n}\n\n/*\nEnsure the default browser behavior of the `hidden` attribute.\n*/\n\n[hidden] {\n display: none;\n}\n\n[type='text'],[type='email'],[type='url'],[type='password'],[type='number'],[type='date'],[type='datetime-local'],[type='month'],[type='search'],[type='tel'],[type='time'],[type='week'],[multiple],textarea,select {\n -webkit-appearance: none;\n -moz-appearance: none;\n appearance: none;\n background-color: #fff;\n border-color: #6b7280;\n border-width: 1px;\n border-radius: 0px;\n padding-top: 0.5rem;\n padding-right: 0.75rem;\n padding-bottom: 0.5rem;\n padding-left: 0.75rem;\n font-size: 1rem;\n line-height: 1.5rem;\n --tw-shadow: 0 0 #0000;\n}\n\n[type='text']:focus, [type='email']:focus, [type='url']:focus, [type='password']:focus, [type='number']:focus, [type='date']:focus, [type='datetime-local']:focus, [type='month']:focus, [type='search']:focus, [type='tel']:focus, [type='time']:focus, [type='week']:focus, [multiple]:focus, textarea:focus, select:focus {\n outline: 2px solid transparent;\n outline-offset: 2px;\n --tw-ring-inset: var(--tw-empty,/*!*/ /*!*/);\n --tw-ring-offset-width: 0px;\n --tw-ring-offset-color: #fff;\n --tw-ring-color: #2563eb;\n --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);\n --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);\n box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);\n border-color: #2563eb;\n}\n\ninput::-moz-placeholder, textarea::-moz-placeholder {\n color: #6b7280;\n opacity: 1;\n}\n\ninput:-ms-input-placeholder, textarea:-ms-input-placeholder {\n color: #6b7280;\n opacity: 1;\n}\n\ninput::placeholder,textarea::placeholder {\n color: #6b7280;\n opacity: 1;\n}\n\n::-webkit-datetime-edit-fields-wrapper {\n padding: 0;\n}\n\n::-webkit-date-and-time-value {\n min-height: 1.5em;\n}\n\nselect {\n background-image: url(\"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e\");\n background-position: right 0.5rem center;\n background-repeat: no-repeat;\n background-size: 1.5em 1.5em;\n padding-right: 2.5rem;\n -webkit-print-color-adjust: exact;\n color-adjust: exact;\n}\n\n[multiple] {\n background-image: initial;\n background-position: initial;\n background-repeat: unset;\n background-size: initial;\n padding-right: 0.75rem;\n -webkit-print-color-adjust: unset;\n color-adjust: unset;\n}\n\n[type='checkbox'],[type='radio'] {\n -webkit-appearance: none;\n -moz-appearance: none;\n appearance: none;\n padding: 0;\n -webkit-print-color-adjust: exact;\n color-adjust: exact;\n display: inline-block;\n vertical-align: middle;\n background-origin: border-box;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n flex-shrink: 0;\n height: 1rem;\n width: 1rem;\n color: #2563eb;\n background-color: #fff;\n border-color: #6b7280;\n border-width: 1px;\n --tw-shadow: 0 0 #0000;\n}\n\n[type='checkbox'] {\n border-radius: 0px;\n}\n\n[type='radio'] {\n border-radius: 100%;\n}\n\n[type='checkbox']:focus,[type='radio']:focus {\n outline: 2px solid transparent;\n outline-offset: 2px;\n --tw-ring-inset: var(--tw-empty,/*!*/ /*!*/);\n --tw-ring-offset-width: 2px;\n --tw-ring-offset-color: #fff;\n --tw-ring-color: #2563eb;\n --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);\n --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);\n box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);\n}\n\n[type='checkbox']:checked,[type='radio']:checked {\n border-color: transparent;\n background-color: currentColor;\n background-size: 100% 100%;\n background-position: center;\n background-repeat: no-repeat;\n}\n\n[type='checkbox']:checked {\n background-image: url(\"data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z'/%3e%3c/svg%3e\");\n}\n\n[type='radio']:checked {\n background-image: url(\"data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3ccircle cx='8' cy='8' r='3'/%3e%3c/svg%3e\");\n}\n\n[type='checkbox']:checked:hover,[type='checkbox']:checked:focus,[type='radio']:checked:hover,[type='radio']:checked:focus {\n border-color: transparent;\n background-color: currentColor;\n}\n\n[type='checkbox']:indeterminate {\n background-image: url(\"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 16 16'%3e%3cpath stroke='white' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M4 8h8'/%3e%3c/svg%3e\");\n border-color: transparent;\n background-color: currentColor;\n background-size: 100% 100%;\n background-position: center;\n background-repeat: no-repeat;\n}\n\n[type='checkbox']:indeterminate:hover,[type='checkbox']:indeterminate:focus {\n border-color: transparent;\n background-color: currentColor;\n}\n\n[type='file'] {\n background: unset;\n border-color: inherit;\n border-width: 0;\n border-radius: 0;\n padding: 0;\n font-size: unset;\n line-height: inherit;\n}\n\n[type='file']:focus {\n outline: 1px auto -webkit-focus-ring-color;\n}\n\n*, ::before, ::after {\n --tw-translate-x: 0;\n --tw-translate-y: 0;\n --tw-rotate: 0;\n --tw-skew-x: 0;\n --tw-skew-y: 0;\n --tw-scale-x: 1;\n --tw-scale-y: 1;\n --tw-pan-x: ;\n --tw-pan-y: ;\n --tw-pinch-zoom: ;\n --tw-scroll-snap-strictness: proximity;\n --tw-ordinal: ;\n --tw-slashed-zero: ;\n --tw-numeric-figure: ;\n --tw-numeric-spacing: ;\n --tw-numeric-fraction: ;\n --tw-ring-inset: ;\n --tw-ring-offset-width: 0px;\n --tw-ring-offset-color: #fff;\n --tw-ring-color: rgb(59 130 246 / 0.5);\n --tw-ring-offset-shadow: 0 0 #0000;\n --tw-ring-shadow: 0 0 #0000;\n --tw-shadow: 0 0 #0000;\n --tw-shadow-colored: 0 0 #0000;\n --tw-blur: ;\n --tw-brightness: ;\n --tw-contrast: ;\n --tw-grayscale: ;\n --tw-hue-rotate: ;\n --tw-invert: ;\n --tw-saturate: ;\n --tw-sepia: ;\n --tw-drop-shadow: ;\n --tw-backdrop-blur: ;\n --tw-backdrop-brightness: ;\n --tw-backdrop-contrast: ;\n --tw-backdrop-grayscale: ;\n --tw-backdrop-hue-rotate: ;\n --tw-backdrop-invert: ;\n --tw-backdrop-opacity: ;\n --tw-backdrop-saturate: ;\n --tw-backdrop-sepia: ;\n}\n.container {\n width: 100%;\n}\n@media (min-width: 640px) {\n\n .container {\n max-width: 640px;\n }\n}\n@media (min-width: 768px) {\n\n .container {\n max-width: 768px;\n }\n}\n@media (min-width: 1024px) {\n\n .container {\n max-width: 1024px;\n }\n}\n@media (min-width: 1280px) {\n\n .container {\n max-width: 1280px;\n }\n}\n@media (min-width: 1536px) {\n\n .container {\n max-width: 1536px;\n }\n}\n.sr-only {\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n white-space: nowrap;\n border-width: 0;\n}\n.pointer-events-none {\n pointer-events: none;\n}\n.absolute {\n position: absolute;\n}\n.relative {\n position: relative;\n}\n.inset-y-0 {\n top: 0px;\n bottom: 0px;\n}\n.right-0 {\n right: 0px;\n}\n.bottom-0 {\n bottom: 0px;\n}\n.bottom-8 {\n bottom: 2rem;\n}\n.left-4 {\n left: 1rem;\n}\n.top-8 {\n top: 2rem;\n}\n.top-\\[10px\\] {\n top: 10px;\n}\n.left-0 {\n left: 0px;\n}\n.z-30 {\n z-index: 30;\n}\n.z-10 {\n z-index: 10;\n}\n.z-20 {\n z-index: 20;\n}\n.m-auto {\n margin: auto;\n}\n.mt-5 {\n margin-top: 1.25rem;\n}\n.mt-1 {\n margin-top: 0.25rem;\n}\n.mt-2 {\n margin-top: 0.5rem;\n}\n.mr-3 {\n margin-right: 0.75rem;\n}\n.ml-0 {\n margin-left: 0px;\n}\n.ml-3 {\n margin-left: 0.75rem;\n}\n.mt-10 {\n margin-top: 2.5rem;\n}\n.mb-1 {\n margin-bottom: 0.25rem;\n}\n.ml-2 {\n margin-left: 0.5rem;\n}\n.mr-1 {\n margin-right: 0.25rem;\n}\n.-ml-px {\n margin-left: -1px;\n}\n.-mr-px {\n margin-right: -1px;\n}\n.block {\n display: block;\n}\n.inline-block {\n display: inline-block;\n}\n.inline {\n display: inline;\n}\n.flex {\n display: flex;\n}\n.inline-flex {\n display: inline-flex;\n}\n.table {\n display: table;\n}\n.grid {\n display: grid;\n}\n.contents {\n display: contents;\n}\n.hidden {\n display: none;\n}\n.h-6 {\n height: 1.5rem;\n}\n.h-16 {\n height: 4rem;\n}\n.h-5 {\n height: 1.25rem;\n}\n.h-\\[38px\\] {\n height: 38px;\n}\n.h-\\[28px\\] {\n height: 28px;\n}\n.h-\\[18px\\] {\n height: 18px;\n}\n.h-\\[34px\\] {\n height: 34px;\n}\n.h-\\[24px\\] {\n height: 24px;\n}\n.h-\\[14px\\] {\n height: 14px;\n}\n.h-\\[500px\\] {\n height: 500px;\n}\n.h-\\[2px\\] {\n height: 2px;\n}\n.h-4 {\n height: 1rem;\n}\n.h-auto {\n height: auto;\n}\n.h-7 {\n height: 1.75rem;\n}\n.max-h-60 {\n max-height: 15rem;\n}\n.w-6 {\n width: 1.5rem;\n}\n.w-16 {\n width: 4rem;\n}\n.w-5 {\n width: 1.25rem;\n}\n.w-full {\n width: 100%;\n}\n.w-56 {\n width: 14rem;\n}\n.w-\\[74px\\] {\n width: 74px;\n}\n.w-\\[64px\\] {\n width: 64px;\n}\n.w-\\[34px\\] {\n width: 34px;\n}\n.w-\\[24px\\] {\n width: 24px;\n}\n.w-\\[14px\\] {\n width: 14px;\n}\n.w-\\[calc\\(100\\%-16px\\)\\] {\n width: calc(100% - 16px);\n}\n.w-4 {\n width: 1rem;\n}\n.min-w-\\[320px\\] {\n min-width: 320px;\n}\n.flex-shrink-0 {\n flex-shrink: 0;\n}\n.shrink-0 {\n flex-shrink: 0;\n}\n.flex-grow {\n flex-grow: 1;\n}\n.grow {\n flex-grow: 1;\n}\n.origin-bottom-right {\n transform-origin: bottom right;\n}\n.translate-x-9 {\n --tw-translate-x: 2.25rem;\n transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));\n}\n.translate-x-0 {\n --tw-translate-x: 0px;\n transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));\n}\n.translate-x-4 {\n --tw-translate-x: 1rem;\n transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));\n}\n.scale-95 {\n --tw-scale-x: .95;\n --tw-scale-y: .95;\n transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));\n}\n.scale-100 {\n --tw-scale-x: 1;\n --tw-scale-y: 1;\n transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));\n}\n.transform {\n transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));\n}\n@-webkit-keyframes spin {\n\n to {\n transform: rotate(360deg);\n }\n}\n@keyframes spin {\n\n to {\n transform: rotate(360deg);\n }\n}\n.animate-spin {\n -webkit-animation: spin 1s linear infinite;\n animation: spin 1s linear infinite;\n}\n.cursor-auto {\n cursor: auto;\n}\n.cursor-default {\n cursor: default;\n}\n.cursor-pointer {\n cursor: pointer;\n}\n.select-none {\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n}\n.grid-flow-row {\n grid-auto-flow: row;\n}\n.flex-row {\n flex-direction: row;\n}\n.flex-col {\n flex-direction: column;\n}\n.items-start {\n align-items: flex-start;\n}\n.items-center {\n align-items: center;\n}\n.justify-center {\n justify-content: center;\n}\n.gap-4 {\n gap: 1rem;\n}\n.gap-3 {\n gap: 0.75rem;\n}\n.space-x-2 > :not([hidden]) ~ :not([hidden]) {\n --tw-space-x-reverse: 0;\n margin-right: calc(0.5rem * var(--tw-space-x-reverse));\n margin-left: calc(0.5rem * calc(1 - var(--tw-space-x-reverse)));\n}\n.space-x-3 > :not([hidden]) ~ :not([hidden]) {\n --tw-space-x-reverse: 0;\n margin-right: calc(0.75rem * var(--tw-space-x-reverse));\n margin-left: calc(0.75rem * calc(1 - var(--tw-space-x-reverse)));\n}\n.divide-y > :not([hidden]) ~ :not([hidden]) {\n --tw-divide-y-reverse: 0;\n border-top-width: calc(1px * calc(1 - var(--tw-divide-y-reverse)));\n border-bottom-width: calc(1px * var(--tw-divide-y-reverse));\n}\n.divide-gray-100 > :not([hidden]) ~ :not([hidden]) {\n --tw-divide-opacity: 1;\n border-color: rgb(243 244 246 / var(--tw-divide-opacity));\n}\n.self-end {\n align-self: flex-end;\n}\n.self-center {\n align-self: center;\n}\n.overflow-auto {\n overflow: auto;\n}\n.overflow-hidden {\n overflow: hidden;\n}\n.truncate {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.rounded-full {\n border-radius: 9999px;\n}\n.rounded-md {\n border-radius: 0.375rem;\n}\n.rounded {\n border-radius: 0.25rem;\n}\n.rounded-none {\n border-radius: 0px;\n}\n.rounded-r-md {\n border-top-right-radius: 0.375rem;\n border-bottom-right-radius: 0.375rem;\n}\n.\\!rounded-r-none {\n border-top-right-radius: 0px !important;\n border-bottom-right-radius: 0px !important;\n}\n.\\!rounded-l-md {\n border-top-left-radius: 0.375rem !important;\n border-bottom-left-radius: 0.375rem !important;\n}\n.\\!rounded-r-md {\n border-top-right-radius: 0.375rem !important;\n border-bottom-right-radius: 0.375rem !important;\n}\n.rounded-l-md {\n border-top-left-radius: 0.375rem;\n border-bottom-left-radius: 0.375rem;\n}\n.border-8 {\n border-width: 8px;\n}\n.border {\n border-width: 1px;\n}\n.border-2 {\n border-width: 2px;\n}\n.\\!border-l-0 {\n border-left-width: 0px !important;\n}\n.border-l {\n border-left-width: 1px;\n}\n.border-purple-700 {\n --tw-border-opacity: 1;\n border-color: rgb(126 34 206 / var(--tw-border-opacity));\n}\n.border-gray-300 {\n --tw-border-opacity: 1;\n border-color: rgb(209 213 219 / var(--tw-border-opacity));\n}\n.border-red-300 {\n --tw-border-opacity: 1;\n border-color: rgb(252 165 165 / var(--tw-border-opacity));\n}\n.border-red-500 {\n --tw-border-opacity: 1;\n border-color: rgb(239 68 68 / var(--tw-border-opacity));\n}\n.border-transparent {\n border-color: transparent;\n}\n.border-indigo-500 {\n --tw-border-opacity: 1;\n border-color: rgb(99 102 241 / var(--tw-border-opacity));\n}\n.\\!border-red-500 {\n --tw-border-opacity: 1 !important;\n border-color: rgb(239 68 68 / var(--tw-border-opacity)) !important;\n}\n.border-r-gray-200 {\n --tw-border-opacity: 1;\n border-right-color: rgb(229 231 235 / var(--tw-border-opacity));\n}\n.border-l-gray-300 {\n --tw-border-opacity: 1;\n border-left-color: rgb(209 213 219 / var(--tw-border-opacity));\n}\n.\\!border-l-white {\n --tw-border-opacity: 1 !important;\n border-left-color: rgb(255 255 255 / var(--tw-border-opacity)) !important;\n}\n.\\!border-r-white {\n --tw-border-opacity: 1 !important;\n border-right-color: rgb(255 255 255 / var(--tw-border-opacity)) !important;\n}\n.border-r-white {\n --tw-border-opacity: 1;\n border-right-color: rgb(255 255 255 / var(--tw-border-opacity));\n}\n.border-l-white {\n --tw-border-opacity: 1;\n border-left-color: rgb(255 255 255 / var(--tw-border-opacity));\n}\n.bg-purple-600 {\n --tw-bg-opacity: 1;\n background-color: rgb(147 51 234 / var(--tw-bg-opacity));\n}\n.bg-purple-100 {\n --tw-bg-opacity: 1;\n background-color: rgb(243 232 255 / var(--tw-bg-opacity));\n}\n.bg-white {\n --tw-bg-opacity: 1;\n background-color: rgb(255 255 255 / var(--tw-bg-opacity));\n}\n.bg-red-600 {\n --tw-bg-opacity: 1;\n background-color: rgb(220 38 38 / var(--tw-bg-opacity));\n}\n.bg-gray-100 {\n --tw-bg-opacity: 1;\n background-color: rgb(243 244 246 / var(--tw-bg-opacity));\n}\n.bg-gray-200 {\n --tw-bg-opacity: 1;\n background-color: rgb(229 231 235 / var(--tw-bg-opacity));\n}\n.bg-purple-500 {\n --tw-bg-opacity: 1;\n background-color: rgb(168 85 247 / var(--tw-bg-opacity));\n}\n.bg-gray-50 {\n --tw-bg-opacity: 1;\n background-color: rgb(249 250 251 / var(--tw-bg-opacity));\n}\n.fill-white {\n fill: #fff;\n}\n.p-1 {\n padding: 0.25rem;\n}\n.px-4 {\n padding-left: 1rem;\n padding-right: 1rem;\n}\n.py-2 {\n padding-top: 0.5rem;\n padding-bottom: 0.5rem;\n}\n.px-5 {\n padding-left: 1.25rem;\n padding-right: 1.25rem;\n}\n.px-2 {\n padding-left: 0.5rem;\n padding-right: 0.5rem;\n}\n.py-1 {\n padding-top: 0.25rem;\n padding-bottom: 0.25rem;\n}\n.py-16 {\n padding-top: 4rem;\n padding-bottom: 4rem;\n}\n.px-3 {\n padding-left: 0.75rem;\n padding-right: 0.75rem;\n}\n.px-1 {\n padding-left: 0.25rem;\n padding-right: 0.25rem;\n}\n.py-\\[6px\\] {\n padding-top: 6px;\n padding-bottom: 6px;\n}\n.pl-3 {\n padding-left: 0.75rem;\n}\n.pr-10 {\n padding-right: 2.5rem;\n}\n.pr-9 {\n padding-right: 2.25rem;\n}\n.pr-4 {\n padding-right: 1rem;\n}\n.pl-0 {\n padding-left: 0px;\n}\n.pl-2 {\n padding-left: 0.5rem;\n}\n.pl-10 {\n padding-left: 2.5rem;\n}\n.pl-7 {\n padding-left: 1.75rem;\n}\n.pr-7 {\n padding-right: 1.75rem;\n}\n.text-left {\n text-align: left;\n}\n.text-center {\n text-align: center;\n}\n.align-middle {\n vertical-align: middle;\n}\n.font-muli {\n font-family: Muli, sans-serif;\n}\n.text-lg {\n font-size: 1.125rem;\n line-height: 1.75rem;\n}\n.text-base {\n font-size: 1rem;\n line-height: 1.5rem;\n}\n.text-sm {\n font-size: 0.875rem;\n line-height: 1.25rem;\n}\n.text-xs {\n font-size: 0.75rem;\n line-height: 1rem;\n}\n.font-medium {\n font-weight: 500;\n}\n.font-semibold {\n font-weight: 600;\n}\n.font-normal {\n font-weight: 400;\n}\n.leading-5 {\n line-height: 1.25rem;\n}\n.text-gray-600 {\n --tw-text-opacity: 1;\n color: rgb(75 85 99 / var(--tw-text-opacity));\n}\n.text-white {\n --tw-text-opacity: 1;\n color: rgb(255 255 255 / var(--tw-text-opacity));\n}\n.text-purple-700 {\n --tw-text-opacity: 1;\n color: rgb(126 34 206 / var(--tw-text-opacity));\n}\n.text-gray-700 {\n --tw-text-opacity: 1;\n color: rgb(55 65 81 / var(--tw-text-opacity));\n}\n.text-gray-400 {\n --tw-text-opacity: 1;\n color: rgb(156 163 175 / var(--tw-text-opacity));\n}\n.text-gray-900 {\n --tw-text-opacity: 1;\n color: rgb(17 24 39 / var(--tw-text-opacity));\n}\n.text-purple-600 {\n --tw-text-opacity: 1;\n color: rgb(147 51 234 / var(--tw-text-opacity));\n}\n.text-red-500 {\n --tw-text-opacity: 1;\n color: rgb(239 68 68 / var(--tw-text-opacity));\n}\n.text-gray-200 {\n --tw-text-opacity: 1;\n color: rgb(229 231 235 / var(--tw-text-opacity));\n}\n.text-gray-500 {\n --tw-text-opacity: 1;\n color: rgb(107 114 128 / var(--tw-text-opacity));\n}\n.text-indigo-600 {\n --tw-text-opacity: 1;\n color: rgb(79 70 229 / var(--tw-text-opacity));\n}\n.text-gray-700\\/\\[\\.5\\] {\n color: rgb(55 65 81 / .5);\n}\n.text-purple-500 {\n --tw-text-opacity: 1;\n color: rgb(168 85 247 / var(--tw-text-opacity));\n}\n.opacity-50 {\n opacity: 0.5;\n}\n.opacity-0 {\n opacity: 0;\n}\n.opacity-100 {\n opacity: 1;\n}\n.shadow-sm {\n --tw-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);\n --tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);\n box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);\n}\n.shadow-lg {\n --tw-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);\n --tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);\n box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);\n}\n.shadow-none {\n --tw-shadow: 0 0 #0000;\n --tw-shadow-colored: 0 0 #0000;\n box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);\n}\n.outline {\n outline-style: solid;\n}\n.outline-indigo-500 {\n outline-color: #6366f1;\n}\n.outline-red-500 {\n outline-color: #ef4444;\n}\n.ring-1 {\n --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);\n --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);\n box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);\n}\n.ring-0 {\n --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);\n --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color);\n box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);\n}\n.ring-black {\n --tw-ring-opacity: 1;\n --tw-ring-color: rgb(0 0 0 / var(--tw-ring-opacity));\n}\n.ring-opacity-5 {\n --tw-ring-opacity: 0.05;\n}\n.blur {\n --tw-blur: blur(8px);\n filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);\n}\n.filter {\n filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);\n}\n.transition-all {\n transition-property: all;\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n transition-duration: 150ms;\n}\n.transition {\n transition-property: color, background-color, border-color, fill, stroke, opacity, box-shadow, transform, filter, -webkit-text-decoration-color, -webkit-backdrop-filter;\n transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter;\n transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter, -webkit-text-decoration-color, -webkit-backdrop-filter;\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n transition-duration: 150ms;\n}\n.transition-colors {\n transition-property: color, background-color, border-color, fill, stroke, -webkit-text-decoration-color;\n transition-property: color, background-color, border-color, text-decoration-color, fill, stroke;\n transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, -webkit-text-decoration-color;\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n transition-duration: 150ms;\n}\n.duration-100 {\n transition-duration: 100ms;\n}\n.duration-75 {\n transition-duration: 75ms;\n}\n.duration-200 {\n transition-duration: 200ms;\n}\n.ease-out {\n transition-timing-function: cubic-bezier(0, 0, 0.2, 1);\n}\n.ease-in {\n transition-timing-function: cubic-bezier(0.4, 0, 1, 1);\n}\n.ease-in-out {\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n}\n.focus-within\\:z-20:focus-within {\n z-index: 20;\n}\n.focus-within\\:z-10:focus-within {\n z-index: 10;\n}\n.hover\\:bg-purple-700:hover {\n --tw-bg-opacity: 1;\n background-color: rgb(126 34 206 / var(--tw-bg-opacity));\n}\n.hover\\:bg-purple-200:hover {\n --tw-bg-opacity: 1;\n background-color: rgb(233 213 255 / var(--tw-bg-opacity));\n}\n.hover\\:bg-gray-50:hover {\n --tw-bg-opacity: 1;\n background-color: rgb(249 250 251 / var(--tw-bg-opacity));\n}\n.hover\\:bg-red-700:hover {\n --tw-bg-opacity: 1;\n background-color: rgb(185 28 28 / var(--tw-bg-opacity));\n}\n.hover\\:bg-gray-100:hover {\n --tw-bg-opacity: 1;\n background-color: rgb(243 244 246 / var(--tw-bg-opacity));\n}\n.hover\\:text-purple-700:hover {\n --tw-text-opacity: 1;\n color: rgb(126 34 206 / var(--tw-text-opacity));\n}\n.hover\\:text-gray-700:hover {\n --tw-text-opacity: 1;\n color: rgb(55 65 81 / var(--tw-text-opacity));\n}\n.hover\\:text-white:hover {\n --tw-text-opacity: 1;\n color: rgb(255 255 255 / var(--tw-text-opacity));\n}\n.hover\\:text-gray-600:hover {\n --tw-text-opacity: 1;\n color: rgb(75 85 99 / var(--tw-text-opacity));\n}\n.hover\\:text-red-500:hover {\n --tw-text-opacity: 1;\n color: rgb(239 68 68 / var(--tw-text-opacity));\n}\n.focus\\:border-purple-500:focus {\n --tw-border-opacity: 1;\n border-color: rgb(168 85 247 / var(--tw-border-opacity));\n}\n.focus\\:border-indigo-500:focus {\n --tw-border-opacity: 1;\n border-color: rgb(99 102 241 / var(--tw-border-opacity));\n}\n.focus\\:outline-none:focus {\n outline: 2px solid transparent;\n outline-offset: 2px;\n}\n.focus\\:ring-1:focus {\n --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);\n --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);\n box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);\n}\n.focus\\:ring-purple-500:focus {\n --tw-ring-opacity: 1;\n --tw-ring-color: rgb(168 85 247 / var(--tw-ring-opacity));\n}\n.focus\\:ring-indigo-500:focus {\n --tw-ring-opacity: 1;\n --tw-ring-color: rgb(99 102 241 / var(--tw-ring-opacity));\n}\n.focus\\:ring-red-500:focus {\n --tw-ring-opacity: 1;\n --tw-ring-color: rgb(239 68 68 / var(--tw-ring-opacity));\n}\n.focus-visible\\:ring-2:focus-visible {\n --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);\n --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);\n box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);\n}\n.focus-visible\\:ring-white:focus-visible {\n --tw-ring-opacity: 1;\n --tw-ring-color: rgb(255 255 255 / var(--tw-ring-opacity));\n}\n.focus-visible\\:ring-opacity-75:focus-visible {\n --tw-ring-opacity: 0.75;\n}\n.group:hover .group-hover\\:block {\n display: block;\n}\n.group:hover .group-hover\\:text-gray-500 {\n --tw-text-opacity: 1;\n color: rgb(107 114 128 / var(--tw-text-opacity));\n}\n.group:hover .group-hover\\:text-red-500 {\n --tw-text-opacity: 1;\n color: rgb(239 68 68 / var(--tw-text-opacity));\n}\n@media (prefers-color-scheme: dark) {\n\n .dark\\:text-purple-500 {\n --tw-text-opacity: 1;\n color: rgb(168 85 247 / var(--tw-text-opacity));\n }\n}\n@media (min-width: 640px) {\n\n .sm\\:text-sm {\n font-size: 0.875rem;\n line-height: 1.25rem;\n }\n}\n";
7039
+ var css_248z = "/*\n! tailwindcss v3.0.21 | MIT License | https://tailwindcss.com\n*//*\n1. Prevent padding and border from affecting element width. (https://github.com/mozdevs/cssremedy/issues/4)\n2. Allow adding a border to an element by just adding a border-width. (https://github.com/tailwindcss/tailwindcss/pull/116)\n*/\n\n*,\n::before,\n::after {\n box-sizing: border-box; /* 1 */\n border-width: 0; /* 2 */\n border-style: solid; /* 2 */\n border-color: #e5e7eb; /* 2 */\n}\n\n::before,\n::after {\n --tw-content: '';\n}\n\n/*\n1. Use a consistent sensible line-height in all browsers.\n2. Prevent adjustments of font size after orientation changes in iOS.\n3. Use a more readable tab size.\n4. Use the user's configured `sans` font-family by default.\n*/\n\nhtml {\n line-height: 1.5; /* 1 */\n -webkit-text-size-adjust: 100%; /* 2 */\n -moz-tab-size: 4; /* 3 */\n -o-tab-size: 4;\n tab-size: 4; /* 3 */\n font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, \"Noto Sans\", sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\", \"Noto Color Emoji\"; /* 4 */\n}\n\n/*\n1. Remove the margin in all browsers.\n2. Inherit line-height from `html` so users can set them as a class directly on the `html` element.\n*/\n\nbody {\n margin: 0; /* 1 */\n line-height: inherit; /* 2 */\n}\n\n/*\n1. Add the correct height in Firefox.\n2. Correct the inheritance of border color in Firefox. (https://bugzilla.mozilla.org/show_bug.cgi?id=190655)\n3. Ensure horizontal rules are visible by default.\n*/\n\nhr {\n height: 0; /* 1 */\n color: inherit; /* 2 */\n border-top-width: 1px; /* 3 */\n}\n\n/*\nAdd the correct text decoration in Chrome, Edge, and Safari.\n*/\n\nabbr:where([title]) {\n -webkit-text-decoration: underline dotted;\n text-decoration: underline dotted;\n}\n\n/*\nRemove the default font size and weight for headings.\n*/\n\nh1,\nh2,\nh3,\nh4,\nh5,\nh6 {\n font-size: inherit;\n font-weight: inherit;\n}\n\n/*\nReset links to optimize for opt-in styling instead of opt-out.\n*/\n\na {\n color: inherit;\n text-decoration: inherit;\n}\n\n/*\nAdd the correct font weight in Edge and Safari.\n*/\n\nb,\nstrong {\n font-weight: bolder;\n}\n\n/*\n1. Use the user's configured `mono` font family by default.\n2. Correct the odd `em` font sizing in all browsers.\n*/\n\ncode,\nkbd,\nsamp,\npre {\n font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, \"Liberation Mono\", \"Courier New\", monospace; /* 1 */\n font-size: 1em; /* 2 */\n}\n\n/*\nAdd the correct font size in all browsers.\n*/\n\nsmall {\n font-size: 80%;\n}\n\n/*\nPrevent `sub` and `sup` elements from affecting the line height in all browsers.\n*/\n\nsub,\nsup {\n font-size: 75%;\n line-height: 0;\n position: relative;\n vertical-align: baseline;\n}\n\nsub {\n bottom: -0.25em;\n}\n\nsup {\n top: -0.5em;\n}\n\n/*\n1. Remove text indentation from table contents in Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=999088, https://bugs.webkit.org/show_bug.cgi?id=201297)\n2. Correct table border color inheritance in all Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=935729, https://bugs.webkit.org/show_bug.cgi?id=195016)\n3. Remove gaps between table borders by default.\n*/\n\ntable {\n text-indent: 0; /* 1 */\n border-color: inherit; /* 2 */\n border-collapse: collapse; /* 3 */\n}\n\n/*\n1. Change the font styles in all browsers.\n2. Remove the margin in Firefox and Safari.\n3. Remove default padding in all browsers.\n*/\n\nbutton,\ninput,\noptgroup,\nselect,\ntextarea {\n font-family: inherit; /* 1 */\n font-size: 100%; /* 1 */\n line-height: inherit; /* 1 */\n color: inherit; /* 1 */\n margin: 0; /* 2 */\n padding: 0; /* 3 */\n}\n\n/*\nRemove the inheritance of text transform in Edge and Firefox.\n*/\n\nbutton,\nselect {\n text-transform: none;\n}\n\n/*\n1. Correct the inability to style clickable types in iOS and Safari.\n2. Remove default button styles.\n*/\n\nbutton,\n[type='button'],\n[type='reset'],\n[type='submit'] {\n -webkit-appearance: button; /* 1 */\n background-color: transparent; /* 2 */\n background-image: none; /* 2 */\n}\n\n/*\nUse the modern Firefox focus style for all focusable elements.\n*/\n\n:-moz-focusring {\n outline: auto;\n}\n\n/*\nRemove the additional `:invalid` styles in Firefox. (https://github.com/mozilla/gecko-dev/blob/2f9eacd9d3d995c937b4251a5557d95d494c9be1/layout/style/res/forms.css#L728-L737)\n*/\n\n:-moz-ui-invalid {\n box-shadow: none;\n}\n\n/*\nAdd the correct vertical alignment in Chrome and Firefox.\n*/\n\nprogress {\n vertical-align: baseline;\n}\n\n/*\nCorrect the cursor style of increment and decrement buttons in Safari.\n*/\n\n::-webkit-inner-spin-button,\n::-webkit-outer-spin-button {\n height: auto;\n}\n\n/*\n1. Correct the odd appearance in Chrome and Safari.\n2. Correct the outline style in Safari.\n*/\n\n[type='search'] {\n -webkit-appearance: textfield; /* 1 */\n outline-offset: -2px; /* 2 */\n}\n\n/*\nRemove the inner padding in Chrome and Safari on macOS.\n*/\n\n::-webkit-search-decoration {\n -webkit-appearance: none;\n}\n\n/*\n1. Correct the inability to style clickable types in iOS and Safari.\n2. Change font properties to `inherit` in Safari.\n*/\n\n::-webkit-file-upload-button {\n -webkit-appearance: button; /* 1 */\n font: inherit; /* 2 */\n}\n\n/*\nAdd the correct display in Chrome and Safari.\n*/\n\nsummary {\n display: list-item;\n}\n\n/*\nRemoves the default spacing and border for appropriate elements.\n*/\n\nblockquote,\ndl,\ndd,\nh1,\nh2,\nh3,\nh4,\nh5,\nh6,\nhr,\nfigure,\np,\npre {\n margin: 0;\n}\n\nfieldset {\n margin: 0;\n padding: 0;\n}\n\nlegend {\n padding: 0;\n}\n\nol,\nul,\nmenu {\n list-style: none;\n margin: 0;\n padding: 0;\n}\n\n/*\nPrevent resizing textareas horizontally by default.\n*/\n\ntextarea {\n resize: vertical;\n}\n\n/*\n1. Reset the default placeholder opacity in Firefox. (https://github.com/tailwindlabs/tailwindcss/issues/3300)\n2. Set the default placeholder color to the user's configured gray 400 color.\n*/\n\ninput::-moz-placeholder, textarea::-moz-placeholder {\n opacity: 1; /* 1 */\n color: #9ca3af; /* 2 */\n}\n\ninput:-ms-input-placeholder, textarea:-ms-input-placeholder {\n opacity: 1; /* 1 */\n color: #9ca3af; /* 2 */\n}\n\ninput::placeholder,\ntextarea::placeholder {\n opacity: 1; /* 1 */\n color: #9ca3af; /* 2 */\n}\n\n/*\nSet the default cursor for buttons.\n*/\n\nbutton,\n[role=\"button\"] {\n cursor: pointer;\n}\n\n/*\nMake sure disabled buttons don't get the pointer cursor.\n*/\n:disabled {\n cursor: default;\n}\n\n/*\n1. Make replaced elements `display: block` by default. (https://github.com/mozdevs/cssremedy/issues/14)\n2. Add `vertical-align: middle` to align replaced elements more sensibly by default. (https://github.com/jensimmons/cssremedy/issues/14#issuecomment-634934210)\n This can trigger a poorly considered lint error in some tools but is included by design.\n*/\n\nimg,\nsvg,\nvideo,\ncanvas,\naudio,\niframe,\nembed,\nobject {\n display: block; /* 1 */\n vertical-align: middle; /* 2 */\n}\n\n/*\nConstrain images and videos to the parent width and preserve their intrinsic aspect ratio. (https://github.com/mozdevs/cssremedy/issues/14)\n*/\n\nimg,\nvideo {\n max-width: 100%;\n height: auto;\n}\n\n/*\nEnsure the default browser behavior of the `hidden` attribute.\n*/\n\n[hidden] {\n display: none;\n}\n\n[type='text'],[type='email'],[type='url'],[type='password'],[type='number'],[type='date'],[type='datetime-local'],[type='month'],[type='search'],[type='tel'],[type='time'],[type='week'],[multiple],textarea,select {\n -webkit-appearance: none;\n -moz-appearance: none;\n appearance: none;\n background-color: #fff;\n border-color: #6b7280;\n border-width: 1px;\n border-radius: 0px;\n padding-top: 0.5rem;\n padding-right: 0.75rem;\n padding-bottom: 0.5rem;\n padding-left: 0.75rem;\n font-size: 1rem;\n line-height: 1.5rem;\n --tw-shadow: 0 0 #0000;\n}\n\n[type='text']:focus, [type='email']:focus, [type='url']:focus, [type='password']:focus, [type='number']:focus, [type='date']:focus, [type='datetime-local']:focus, [type='month']:focus, [type='search']:focus, [type='tel']:focus, [type='time']:focus, [type='week']:focus, [multiple]:focus, textarea:focus, select:focus {\n outline: 2px solid transparent;\n outline-offset: 2px;\n --tw-ring-inset: var(--tw-empty,/*!*/ /*!*/);\n --tw-ring-offset-width: 0px;\n --tw-ring-offset-color: #fff;\n --tw-ring-color: #2563eb;\n --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);\n --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);\n box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);\n border-color: #2563eb;\n}\n\ninput::-moz-placeholder, textarea::-moz-placeholder {\n color: #6b7280;\n opacity: 1;\n}\n\ninput:-ms-input-placeholder, textarea:-ms-input-placeholder {\n color: #6b7280;\n opacity: 1;\n}\n\ninput::placeholder,textarea::placeholder {\n color: #6b7280;\n opacity: 1;\n}\n\n::-webkit-datetime-edit-fields-wrapper {\n padding: 0;\n}\n\n::-webkit-date-and-time-value {\n min-height: 1.5em;\n}\n\nselect {\n background-image: url(\"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e\");\n background-position: right 0.5rem center;\n background-repeat: no-repeat;\n background-size: 1.5em 1.5em;\n padding-right: 2.5rem;\n -webkit-print-color-adjust: exact;\n color-adjust: exact;\n}\n\n[multiple] {\n background-image: initial;\n background-position: initial;\n background-repeat: unset;\n background-size: initial;\n padding-right: 0.75rem;\n -webkit-print-color-adjust: unset;\n color-adjust: unset;\n}\n\n[type='checkbox'],[type='radio'] {\n -webkit-appearance: none;\n -moz-appearance: none;\n appearance: none;\n padding: 0;\n -webkit-print-color-adjust: exact;\n color-adjust: exact;\n display: inline-block;\n vertical-align: middle;\n background-origin: border-box;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n flex-shrink: 0;\n height: 1rem;\n width: 1rem;\n color: #2563eb;\n background-color: #fff;\n border-color: #6b7280;\n border-width: 1px;\n --tw-shadow: 0 0 #0000;\n}\n\n[type='checkbox'] {\n border-radius: 0px;\n}\n\n[type='radio'] {\n border-radius: 100%;\n}\n\n[type='checkbox']:focus,[type='radio']:focus {\n outline: 2px solid transparent;\n outline-offset: 2px;\n --tw-ring-inset: var(--tw-empty,/*!*/ /*!*/);\n --tw-ring-offset-width: 2px;\n --tw-ring-offset-color: #fff;\n --tw-ring-color: #2563eb;\n --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);\n --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);\n box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);\n}\n\n[type='checkbox']:checked,[type='radio']:checked {\n border-color: transparent;\n background-color: currentColor;\n background-size: 100% 100%;\n background-position: center;\n background-repeat: no-repeat;\n}\n\n[type='checkbox']:checked {\n background-image: url(\"data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z'/%3e%3c/svg%3e\");\n}\n\n[type='radio']:checked {\n background-image: url(\"data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3ccircle cx='8' cy='8' r='3'/%3e%3c/svg%3e\");\n}\n\n[type='checkbox']:checked:hover,[type='checkbox']:checked:focus,[type='radio']:checked:hover,[type='radio']:checked:focus {\n border-color: transparent;\n background-color: currentColor;\n}\n\n[type='checkbox']:indeterminate {\n background-image: url(\"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 16 16'%3e%3cpath stroke='white' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M4 8h8'/%3e%3c/svg%3e\");\n border-color: transparent;\n background-color: currentColor;\n background-size: 100% 100%;\n background-position: center;\n background-repeat: no-repeat;\n}\n\n[type='checkbox']:indeterminate:hover,[type='checkbox']:indeterminate:focus {\n border-color: transparent;\n background-color: currentColor;\n}\n\n[type='file'] {\n background: unset;\n border-color: inherit;\n border-width: 0;\n border-radius: 0;\n padding: 0;\n font-size: unset;\n line-height: inherit;\n}\n\n[type='file']:focus {\n outline: 1px auto -webkit-focus-ring-color;\n}\n\n*, ::before, ::after {\n --tw-translate-x: 0;\n --tw-translate-y: 0;\n --tw-rotate: 0;\n --tw-skew-x: 0;\n --tw-skew-y: 0;\n --tw-scale-x: 1;\n --tw-scale-y: 1;\n --tw-pan-x: ;\n --tw-pan-y: ;\n --tw-pinch-zoom: ;\n --tw-scroll-snap-strictness: proximity;\n --tw-ordinal: ;\n --tw-slashed-zero: ;\n --tw-numeric-figure: ;\n --tw-numeric-spacing: ;\n --tw-numeric-fraction: ;\n --tw-ring-inset: ;\n --tw-ring-offset-width: 0px;\n --tw-ring-offset-color: #fff;\n --tw-ring-color: rgb(59 130 246 / 0.5);\n --tw-ring-offset-shadow: 0 0 #0000;\n --tw-ring-shadow: 0 0 #0000;\n --tw-shadow: 0 0 #0000;\n --tw-shadow-colored: 0 0 #0000;\n --tw-blur: ;\n --tw-brightness: ;\n --tw-contrast: ;\n --tw-grayscale: ;\n --tw-hue-rotate: ;\n --tw-invert: ;\n --tw-saturate: ;\n --tw-sepia: ;\n --tw-drop-shadow: ;\n --tw-backdrop-blur: ;\n --tw-backdrop-brightness: ;\n --tw-backdrop-contrast: ;\n --tw-backdrop-grayscale: ;\n --tw-backdrop-hue-rotate: ;\n --tw-backdrop-invert: ;\n --tw-backdrop-opacity: ;\n --tw-backdrop-saturate: ;\n --tw-backdrop-sepia: ;\n}\n.container {\n width: 100%;\n}\n@media (min-width: 640px) {\n\n .container {\n max-width: 640px;\n }\n}\n@media (min-width: 768px) {\n\n .container {\n max-width: 768px;\n }\n}\n@media (min-width: 1024px) {\n\n .container {\n max-width: 1024px;\n }\n}\n@media (min-width: 1280px) {\n\n .container {\n max-width: 1280px;\n }\n}\n@media (min-width: 1536px) {\n\n .container {\n max-width: 1536px;\n }\n}\n.sr-only {\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n white-space: nowrap;\n border-width: 0;\n}\n.pointer-events-none {\n pointer-events: none;\n}\n.absolute {\n position: absolute;\n}\n.relative {\n position: relative;\n}\n.inset-y-0 {\n top: 0px;\n bottom: 0px;\n}\n.right-0 {\n right: 0px;\n}\n.bottom-0 {\n bottom: 0px;\n}\n.bottom-8 {\n bottom: 2rem;\n}\n.left-4 {\n left: 1rem;\n}\n.top-8 {\n top: 2rem;\n}\n.top-\\[10px\\] {\n top: 10px;\n}\n.left-0 {\n left: 0px;\n}\n.z-30 {\n z-index: 30;\n}\n.z-10 {\n z-index: 10;\n}\n.z-20 {\n z-index: 20;\n}\n.m-auto {\n margin: auto;\n}\n.mt-5 {\n margin-top: 1.25rem;\n}\n.mt-1 {\n margin-top: 0.25rem;\n}\n.mt-2 {\n margin-top: 0.5rem;\n}\n.mr-3 {\n margin-right: 0.75rem;\n}\n.ml-0 {\n margin-left: 0px;\n}\n.ml-3 {\n margin-left: 0.75rem;\n}\n.mt-10 {\n margin-top: 2.5rem;\n}\n.mb-1 {\n margin-bottom: 0.25rem;\n}\n.ml-2 {\n margin-left: 0.5rem;\n}\n.mr-1 {\n margin-right: 0.25rem;\n}\n.-ml-px {\n margin-left: -1px;\n}\n.-mr-px {\n margin-right: -1px;\n}\n.block {\n display: block;\n}\n.inline-block {\n display: inline-block;\n}\n.inline {\n display: inline;\n}\n.flex {\n display: flex;\n}\n.inline-flex {\n display: inline-flex;\n}\n.table {\n display: table;\n}\n.grid {\n display: grid;\n}\n.contents {\n display: contents;\n}\n.hidden {\n display: none;\n}\n.h-6 {\n height: 1.5rem;\n}\n.h-16 {\n height: 4rem;\n}\n.h-5 {\n height: 1.25rem;\n}\n.h-\\[38px\\] {\n height: 38px;\n}\n.h-\\[28px\\] {\n height: 28px;\n}\n.h-\\[18px\\] {\n height: 18px;\n}\n.h-\\[34px\\] {\n height: 34px;\n}\n.h-\\[24px\\] {\n height: 24px;\n}\n.h-\\[14px\\] {\n height: 14px;\n}\n.h-\\[500px\\] {\n height: 500px;\n}\n.h-\\[2px\\] {\n height: 2px;\n}\n.h-4 {\n height: 1rem;\n}\n.h-auto {\n height: auto;\n}\n.h-7 {\n height: 1.75rem;\n}\n.max-h-60 {\n max-height: 15rem;\n}\n.w-6 {\n width: 1.5rem;\n}\n.w-16 {\n width: 4rem;\n}\n.w-5 {\n width: 1.25rem;\n}\n.w-full {\n width: 100%;\n}\n.w-56 {\n width: 14rem;\n}\n.w-\\[74px\\] {\n width: 74px;\n}\n.w-\\[64px\\] {\n width: 64px;\n}\n.w-\\[34px\\] {\n width: 34px;\n}\n.w-\\[24px\\] {\n width: 24px;\n}\n.w-\\[14px\\] {\n width: 14px;\n}\n.w-\\[calc\\(100\\%-16px\\)\\] {\n width: calc(100% - 16px);\n}\n.w-4 {\n width: 1rem;\n}\n.min-w-\\[320px\\] {\n min-width: 320px;\n}\n.flex-shrink-0 {\n flex-shrink: 0;\n}\n.shrink-0 {\n flex-shrink: 0;\n}\n.flex-grow {\n flex-grow: 1;\n}\n.grow {\n flex-grow: 1;\n}\n.origin-bottom-right {\n transform-origin: bottom right;\n}\n.translate-x-9 {\n --tw-translate-x: 2.25rem;\n transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));\n}\n.translate-x-0 {\n --tw-translate-x: 0px;\n transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));\n}\n.translate-x-4 {\n --tw-translate-x: 1rem;\n transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));\n}\n.scale-95 {\n --tw-scale-x: .95;\n --tw-scale-y: .95;\n transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));\n}\n.scale-100 {\n --tw-scale-x: 1;\n --tw-scale-y: 1;\n transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));\n}\n.transform {\n transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));\n}\n@-webkit-keyframes spin {\n\n to {\n transform: rotate(360deg);\n }\n}\n@keyframes spin {\n\n to {\n transform: rotate(360deg);\n }\n}\n.animate-spin {\n -webkit-animation: spin 1s linear infinite;\n animation: spin 1s linear infinite;\n}\n.cursor-auto {\n cursor: auto;\n}\n.cursor-default {\n cursor: default;\n}\n.cursor-pointer {\n cursor: pointer;\n}\n.select-none {\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n}\n.grid-flow-row {\n grid-auto-flow: row;\n}\n.flex-row {\n flex-direction: row;\n}\n.flex-col {\n flex-direction: column;\n}\n.items-start {\n align-items: flex-start;\n}\n.items-center {\n align-items: center;\n}\n.justify-center {\n justify-content: center;\n}\n.gap-4 {\n gap: 1rem;\n}\n.gap-3 {\n gap: 0.75rem;\n}\n.space-x-2 > :not([hidden]) ~ :not([hidden]) {\n --tw-space-x-reverse: 0;\n margin-right: calc(0.5rem * var(--tw-space-x-reverse));\n margin-left: calc(0.5rem * calc(1 - var(--tw-space-x-reverse)));\n}\n.space-x-3 > :not([hidden]) ~ :not([hidden]) {\n --tw-space-x-reverse: 0;\n margin-right: calc(0.75rem * var(--tw-space-x-reverse));\n margin-left: calc(0.75rem * calc(1 - var(--tw-space-x-reverse)));\n}\n.divide-y > :not([hidden]) ~ :not([hidden]) {\n --tw-divide-y-reverse: 0;\n border-top-width: calc(1px * calc(1 - var(--tw-divide-y-reverse)));\n border-bottom-width: calc(1px * var(--tw-divide-y-reverse));\n}\n.divide-gray-100 > :not([hidden]) ~ :not([hidden]) {\n --tw-divide-opacity: 1;\n border-color: rgb(243 244 246 / var(--tw-divide-opacity));\n}\n.self-end {\n align-self: flex-end;\n}\n.self-center {\n align-self: center;\n}\n.overflow-auto {\n overflow: auto;\n}\n.overflow-hidden {\n overflow: hidden;\n}\n.truncate {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.rounded-full {\n border-radius: 9999px;\n}\n.rounded-md {\n border-radius: 0.375rem;\n}\n.rounded {\n border-radius: 0.25rem;\n}\n.rounded-none {\n border-radius: 0px;\n}\n.rounded-r-md {\n border-top-right-radius: 0.375rem;\n border-bottom-right-radius: 0.375rem;\n}\n.\\!rounded-r-none {\n border-top-right-radius: 0px !important;\n border-bottom-right-radius: 0px !important;\n}\n.\\!rounded-l-md {\n border-top-left-radius: 0.375rem !important;\n border-bottom-left-radius: 0.375rem !important;\n}\n.\\!rounded-r-md {\n border-top-right-radius: 0.375rem !important;\n border-bottom-right-radius: 0.375rem !important;\n}\n.rounded-l-md {\n border-top-left-radius: 0.375rem;\n border-bottom-left-radius: 0.375rem;\n}\n.border-8 {\n border-width: 8px;\n}\n.border {\n border-width: 1px;\n}\n.border-2 {\n border-width: 2px;\n}\n.\\!border-l-0 {\n border-left-width: 0px !important;\n}\n.border-l {\n border-left-width: 1px;\n}\n.border-purple-700 {\n --tw-border-opacity: 1;\n border-color: rgb(126 34 206 / var(--tw-border-opacity));\n}\n.border-gray-300 {\n --tw-border-opacity: 1;\n border-color: rgb(209 213 219 / var(--tw-border-opacity));\n}\n.border-red-300 {\n --tw-border-opacity: 1;\n border-color: rgb(252 165 165 / var(--tw-border-opacity));\n}\n.border-red-500 {\n --tw-border-opacity: 1;\n border-color: rgb(239 68 68 / var(--tw-border-opacity));\n}\n.border-transparent {\n border-color: transparent;\n}\n.border-purple-500 {\n --tw-border-opacity: 1;\n border-color: rgb(168 85 247 / var(--tw-border-opacity));\n}\n.\\!border-red-500 {\n --tw-border-opacity: 1 !important;\n border-color: rgb(239 68 68 / var(--tw-border-opacity)) !important;\n}\n.border-r-gray-200 {\n --tw-border-opacity: 1;\n border-right-color: rgb(229 231 235 / var(--tw-border-opacity));\n}\n.border-l-gray-300 {\n --tw-border-opacity: 1;\n border-left-color: rgb(209 213 219 / var(--tw-border-opacity));\n}\n.\\!border-l-white {\n --tw-border-opacity: 1 !important;\n border-left-color: rgb(255 255 255 / var(--tw-border-opacity)) !important;\n}\n.\\!border-r-white {\n --tw-border-opacity: 1 !important;\n border-right-color: rgb(255 255 255 / var(--tw-border-opacity)) !important;\n}\n.border-r-white {\n --tw-border-opacity: 1;\n border-right-color: rgb(255 255 255 / var(--tw-border-opacity));\n}\n.border-l-white {\n --tw-border-opacity: 1;\n border-left-color: rgb(255 255 255 / var(--tw-border-opacity));\n}\n.bg-purple-600 {\n --tw-bg-opacity: 1;\n background-color: rgb(147 51 234 / var(--tw-bg-opacity));\n}\n.bg-purple-100 {\n --tw-bg-opacity: 1;\n background-color: rgb(243 232 255 / var(--tw-bg-opacity));\n}\n.bg-white {\n --tw-bg-opacity: 1;\n background-color: rgb(255 255 255 / var(--tw-bg-opacity));\n}\n.bg-red-600 {\n --tw-bg-opacity: 1;\n background-color: rgb(220 38 38 / var(--tw-bg-opacity));\n}\n.bg-gray-100 {\n --tw-bg-opacity: 1;\n background-color: rgb(243 244 246 / var(--tw-bg-opacity));\n}\n.bg-gray-200 {\n --tw-bg-opacity: 1;\n background-color: rgb(229 231 235 / var(--tw-bg-opacity));\n}\n.bg-purple-500 {\n --tw-bg-opacity: 1;\n background-color: rgb(168 85 247 / var(--tw-bg-opacity));\n}\n.bg-gray-50 {\n --tw-bg-opacity: 1;\n background-color: rgb(249 250 251 / var(--tw-bg-opacity));\n}\n.fill-white {\n fill: #fff;\n}\n.p-1 {\n padding: 0.25rem;\n}\n.px-4 {\n padding-left: 1rem;\n padding-right: 1rem;\n}\n.py-2 {\n padding-top: 0.5rem;\n padding-bottom: 0.5rem;\n}\n.px-5 {\n padding-left: 1.25rem;\n padding-right: 1.25rem;\n}\n.px-2 {\n padding-left: 0.5rem;\n padding-right: 0.5rem;\n}\n.py-1 {\n padding-top: 0.25rem;\n padding-bottom: 0.25rem;\n}\n.py-16 {\n padding-top: 4rem;\n padding-bottom: 4rem;\n}\n.px-3 {\n padding-left: 0.75rem;\n padding-right: 0.75rem;\n}\n.px-1 {\n padding-left: 0.25rem;\n padding-right: 0.25rem;\n}\n.py-\\[6px\\] {\n padding-top: 6px;\n padding-bottom: 6px;\n}\n.pl-3 {\n padding-left: 0.75rem;\n}\n.pr-10 {\n padding-right: 2.5rem;\n}\n.pr-9 {\n padding-right: 2.25rem;\n}\n.pr-4 {\n padding-right: 1rem;\n}\n.pl-0 {\n padding-left: 0px;\n}\n.pl-2 {\n padding-left: 0.5rem;\n}\n.pl-10 {\n padding-left: 2.5rem;\n}\n.pl-7 {\n padding-left: 1.75rem;\n}\n.pr-7 {\n padding-right: 1.75rem;\n}\n.text-left {\n text-align: left;\n}\n.text-center {\n text-align: center;\n}\n.align-middle {\n vertical-align: middle;\n}\n.font-muli {\n font-family: Muli, sans-serif;\n}\n.text-lg {\n font-size: 1.125rem;\n line-height: 1.75rem;\n}\n.text-base {\n font-size: 1rem;\n line-height: 1.5rem;\n}\n.text-sm {\n font-size: 0.875rem;\n line-height: 1.25rem;\n}\n.text-xs {\n font-size: 0.75rem;\n line-height: 1rem;\n}\n.font-medium {\n font-weight: 500;\n}\n.font-semibold {\n font-weight: 600;\n}\n.font-normal {\n font-weight: 400;\n}\n.leading-5 {\n line-height: 1.25rem;\n}\n.text-gray-600 {\n --tw-text-opacity: 1;\n color: rgb(75 85 99 / var(--tw-text-opacity));\n}\n.text-white {\n --tw-text-opacity: 1;\n color: rgb(255 255 255 / var(--tw-text-opacity));\n}\n.text-purple-700 {\n --tw-text-opacity: 1;\n color: rgb(126 34 206 / var(--tw-text-opacity));\n}\n.text-gray-700 {\n --tw-text-opacity: 1;\n color: rgb(55 65 81 / var(--tw-text-opacity));\n}\n.text-gray-400 {\n --tw-text-opacity: 1;\n color: rgb(156 163 175 / var(--tw-text-opacity));\n}\n.text-gray-900 {\n --tw-text-opacity: 1;\n color: rgb(17 24 39 / var(--tw-text-opacity));\n}\n.text-purple-600 {\n --tw-text-opacity: 1;\n color: rgb(147 51 234 / var(--tw-text-opacity));\n}\n.text-red-500 {\n --tw-text-opacity: 1;\n color: rgb(239 68 68 / var(--tw-text-opacity));\n}\n.text-gray-200 {\n --tw-text-opacity: 1;\n color: rgb(229 231 235 / var(--tw-text-opacity));\n}\n.text-gray-500 {\n --tw-text-opacity: 1;\n color: rgb(107 114 128 / var(--tw-text-opacity));\n}\n.text-gray-700\\/\\[\\.5\\] {\n color: rgb(55 65 81 / .5);\n}\n.text-purple-500 {\n --tw-text-opacity: 1;\n color: rgb(168 85 247 / var(--tw-text-opacity));\n}\n.opacity-50 {\n opacity: 0.5;\n}\n.opacity-0 {\n opacity: 0;\n}\n.opacity-100 {\n opacity: 1;\n}\n.shadow-sm {\n --tw-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);\n --tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);\n box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);\n}\n.shadow-lg {\n --tw-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);\n --tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);\n box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);\n}\n.shadow-none {\n --tw-shadow: 0 0 #0000;\n --tw-shadow-colored: 0 0 #0000;\n box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);\n}\n.outline {\n outline-style: solid;\n}\n.outline-purple-500 {\n outline-color: #a855f7;\n}\n.\\!outline-red-500 {\n outline-color: #ef4444 !important;\n}\n.outline-red-500 {\n outline-color: #ef4444;\n}\n.ring-1 {\n --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);\n --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);\n box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);\n}\n.ring-0 {\n --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);\n --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color);\n box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);\n}\n.ring-black {\n --tw-ring-opacity: 1;\n --tw-ring-color: rgb(0 0 0 / var(--tw-ring-opacity));\n}\n.ring-opacity-5 {\n --tw-ring-opacity: 0.05;\n}\n.blur {\n --tw-blur: blur(8px);\n filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);\n}\n.filter {\n filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);\n}\n.transition-all {\n transition-property: all;\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n transition-duration: 150ms;\n}\n.transition {\n transition-property: color, background-color, border-color, fill, stroke, opacity, box-shadow, transform, filter, -webkit-text-decoration-color, -webkit-backdrop-filter;\n transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter;\n transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter, -webkit-text-decoration-color, -webkit-backdrop-filter;\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n transition-duration: 150ms;\n}\n.transition-colors {\n transition-property: color, background-color, border-color, fill, stroke, -webkit-text-decoration-color;\n transition-property: color, background-color, border-color, text-decoration-color, fill, stroke;\n transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, -webkit-text-decoration-color;\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n transition-duration: 150ms;\n}\n.duration-100 {\n transition-duration: 100ms;\n}\n.duration-75 {\n transition-duration: 75ms;\n}\n.duration-200 {\n transition-duration: 200ms;\n}\n.ease-out {\n transition-timing-function: cubic-bezier(0, 0, 0.2, 1);\n}\n.ease-in {\n transition-timing-function: cubic-bezier(0.4, 0, 1, 1);\n}\n.ease-in-out {\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n}\n.focus-within\\:z-20:focus-within {\n z-index: 20;\n}\n.focus-within\\:z-10:focus-within {\n z-index: 10;\n}\n.hover\\:bg-purple-700:hover {\n --tw-bg-opacity: 1;\n background-color: rgb(126 34 206 / var(--tw-bg-opacity));\n}\n.hover\\:bg-purple-200:hover {\n --tw-bg-opacity: 1;\n background-color: rgb(233 213 255 / var(--tw-bg-opacity));\n}\n.hover\\:bg-gray-50:hover {\n --tw-bg-opacity: 1;\n background-color: rgb(249 250 251 / var(--tw-bg-opacity));\n}\n.hover\\:bg-red-700:hover {\n --tw-bg-opacity: 1;\n background-color: rgb(185 28 28 / var(--tw-bg-opacity));\n}\n.hover\\:bg-gray-100:hover {\n --tw-bg-opacity: 1;\n background-color: rgb(243 244 246 / var(--tw-bg-opacity));\n}\n.hover\\:text-purple-700:hover {\n --tw-text-opacity: 1;\n color: rgb(126 34 206 / var(--tw-text-opacity));\n}\n.hover\\:text-gray-700:hover {\n --tw-text-opacity: 1;\n color: rgb(55 65 81 / var(--tw-text-opacity));\n}\n.hover\\:text-white:hover {\n --tw-text-opacity: 1;\n color: rgb(255 255 255 / var(--tw-text-opacity));\n}\n.hover\\:text-gray-600:hover {\n --tw-text-opacity: 1;\n color: rgb(75 85 99 / var(--tw-text-opacity));\n}\n.hover\\:text-red-500:hover {\n --tw-text-opacity: 1;\n color: rgb(239 68 68 / var(--tw-text-opacity));\n}\n.focus\\:border-purple-500:focus {\n --tw-border-opacity: 1;\n border-color: rgb(168 85 247 / var(--tw-border-opacity));\n}\n.focus\\:outline-none:focus {\n outline: 2px solid transparent;\n outline-offset: 2px;\n}\n.focus\\:ring-1:focus {\n --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);\n --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);\n box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);\n}\n.focus\\:ring-purple-500:focus {\n --tw-ring-opacity: 1;\n --tw-ring-color: rgb(168 85 247 / var(--tw-ring-opacity));\n}\n.focus\\:ring-red-500:focus {\n --tw-ring-opacity: 1;\n --tw-ring-color: rgb(239 68 68 / var(--tw-ring-opacity));\n}\n.focus-visible\\:ring-2:focus-visible {\n --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);\n --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);\n box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);\n}\n.focus-visible\\:ring-white:focus-visible {\n --tw-ring-opacity: 1;\n --tw-ring-color: rgb(255 255 255 / var(--tw-ring-opacity));\n}\n.focus-visible\\:ring-opacity-75:focus-visible {\n --tw-ring-opacity: 0.75;\n}\n.group:hover .group-hover\\:block {\n display: block;\n}\n.group:hover .group-hover\\:text-gray-500 {\n --tw-text-opacity: 1;\n color: rgb(107 114 128 / var(--tw-text-opacity));\n}\n.group:hover .group-hover\\:text-red-500 {\n --tw-text-opacity: 1;\n color: rgb(239 68 68 / var(--tw-text-opacity));\n}\n@media (prefers-color-scheme: dark) {\n\n .dark\\:text-purple-500 {\n --tw-text-opacity: 1;\n color: rgb(168 85 247 / var(--tw-text-opacity));\n }\n}\n@media (min-width: 640px) {\n\n .sm\\:text-sm {\n font-size: 0.875rem;\n line-height: 1.25rem;\n }\n}\n";
7039
7040
  styleInject(css_248z);
7040
7041
 
7041
7042
  function Loader(_a) {
@@ -7088,9 +7089,9 @@ function classNames() {
7088
7089
  }
7089
7090
  return classes.filter(Boolean).join(' ');
7090
7091
  }
7091
- /** Comment */
7092
+ // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-constraint
7092
7093
  var Combobox = function (_a) {
7093
- var label = _a.label, items = _a.items, onChange = _a.onChange, placeholder = _a.placeholder, isDisabled = _a.isDisabled, isError = _a.isError, isRequired = _a.isRequired, id = _a.id;
7094
+ var label = _a.label, items = _a.items, displayProperty = _a.displayProperty, keyProperty = _a.keyProperty, onChange = _a.onChange, placeholder = _a.placeholder, isDisabled = _a.isDisabled, isError = _a.isError, isRequired = _a.isRequired, id = _a.id;
7094
7095
  var _b = useState(''), query = _b[0], setQuery = _b[1];
7095
7096
  var _c = useState(), selectedItem = _c[0], setSelectedItem = _c[1];
7096
7097
  useEffect(function () {
@@ -7099,7 +7100,7 @@ var Combobox = function (_a) {
7099
7100
  var filteredItems = query === ''
7100
7101
  ? items
7101
7102
  : items.filter(function (item) {
7102
- return item.value.toLowerCase().includes(query.toLowerCase());
7103
+ return "".concat(item[displayProperty]).toLowerCase().includes(query.toLowerCase());
7103
7104
  });
7104
7105
  var inputStyles = cn$1('w-full rounded-md border bg-white py-2 pl-3 pr-10 shadow-sm sm:text-sm', 'focus:border-purple-500 focus:outline-none focus:ring-1 focus:ring-purple-500', { 'border-red-500': isError }, { 'border-gray-300': !isError });
7105
7106
  var labelStyles = cn$1('block text-sm font-medium text-gray-700');
@@ -7109,16 +7110,16 @@ var Combobox = function (_a) {
7109
7110
  label && (React__default.createElement(Na.Label, { className: labelStyles },
7110
7111
  React__default.createElement(InputLabel, { isPlaceholder: true, isActive: true, label: label, isRequired: isRequired, id: id, isError: isError, isDisabled: isDisabled }))),
7111
7112
  React__default.createElement("div", { className: "relative" },
7112
- React__default.createElement(Na.Input, { className: inputStyles, onChange: function (event) { return setQuery(event.target.value); }, displayValue: function (item) { return item.value; }, placeholder: placeholder }),
7113
+ React__default.createElement(Na.Input, { className: inputStyles, onChange: function (event) { return setQuery(event.target.value); }, displayValue: function (item) { return "".concat(item[displayProperty]); }, placeholder: placeholder }),
7113
7114
  React__default.createElement(Na.Button, { className: buttonStyles },
7114
7115
  React__default.createElement(DynamicIcons, { icon: "SelectorIcon", className: "h-5 w-5 text-gray-400", "aria-hidden": "true" })),
7115
- filteredItems.length > 0 && (React__default.createElement(Na.Options, { className: optionStyles }, filteredItems.map(function (item, index) { return (React__default.createElement(Na.Option, { key: index, value: item, className: function (_a) {
7116
+ filteredItems.length > 0 && (React__default.createElement(Na.Options, { className: optionStyles }, filteredItems.map(function (item, index) { return (React__default.createElement(Na.Option, { key: "".concat(item[keyProperty], "-").concat(index), value: item, className: function (_a) {
7116
7117
  var active = _a.active;
7117
7118
  return classNames('relative cursor-default select-none py-2 pl-3 pr-9', active ? 'bg-purple-600 text-white' : 'text-gray-900');
7118
7119
  } }, function (_a) {
7119
7120
  var active = _a.active, selected = _a.selected;
7120
7121
  return (React__default.createElement(React__default.Fragment, null,
7121
- React__default.createElement("span", { className: classNames('block truncate', selected ? 'font-semibold' : '') }, item.value),
7122
+ React__default.createElement("span", { className: classNames('block truncate', selected ? 'font-semibold' : '') }, "".concat(item[displayProperty])),
7122
7123
  selected && (React__default.createElement("span", { className: classNames('absolute inset-y-0 right-0 flex items-center pr-4', active ? 'text-white' : 'text-purple-600') },
7123
7124
  React__default.createElement(DynamicIcons, { icon: "CheckIcon", className: "h-5 w-5", "aria-hidden": "true" })))));
7124
7125
  })); }))))));
@@ -7199,430 +7200,1870 @@ function __spreadArray$1(to, from, pack) {
7199
7200
  return to.concat(ar || Array.prototype.slice.call(from));
7200
7201
  }
7201
7202
 
7202
- let emptyImage;
7203
- function getEmptyImage() {
7204
- if (!emptyImage) {
7205
- emptyImage = new Image();
7206
- emptyImage.src = 'data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==';
7207
- }
7208
- return emptyImage;
7209
- }
7210
-
7211
- function _createForOfIteratorHelper(o, allowArrayLike) { var it; if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) { if (Array.isArray(o) || (it = _unsupportedIterableToArray$1(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = o[Symbol.iterator](); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
7212
-
7213
- function _unsupportedIterableToArray$1(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray$1(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray$1(o, minLen); }
7214
-
7215
- function _arrayLikeToArray$1(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
7216
-
7217
- function _classCallCheck$1(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
7218
-
7219
- function _defineProperty$1(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
7220
-
7221
- function _classPrivateFieldGet$1(receiver, privateMap) { var descriptor = _classExtractFieldDescriptor$1(receiver, privateMap, "get"); return _classApplyDescriptorGet$1(receiver, descriptor); }
7222
-
7223
- function _classApplyDescriptorGet$1(receiver, descriptor) { if (descriptor.get) { return descriptor.get.call(receiver); } return descriptor.value; }
7224
-
7225
- function _classPrivateFieldSet$1(receiver, privateMap, value) { var descriptor = _classExtractFieldDescriptor$1(receiver, privateMap, "set"); _classApplyDescriptorSet$1(receiver, descriptor, value); return value; }
7226
-
7227
- function _classExtractFieldDescriptor$1(receiver, privateMap, action) { if (!privateMap.has(receiver)) { throw new TypeError("attempted to " + action + " private field on non-instance"); } return privateMap.get(receiver); }
7228
-
7229
- function _classApplyDescriptorSet$1(receiver, descriptor, value) { if (descriptor.set) { descriptor.set.call(receiver, value); } else { if (!descriptor.writable) { throw new TypeError("attempted to set read only private field"); } descriptor.value = value; } }
7203
+ /**
7204
+ * Create the React Context
7205
+ */ const DndContext = createContext({
7206
+ dragDropManager: undefined
7207
+ });
7230
7208
 
7231
- var _previews$1 = new WeakMap();
7209
+ /**
7210
+ * Adapted from React: https://github.com/facebook/react/blob/master/packages/shared/formatProdErrorMessage.js
7211
+ *
7212
+ * Do not require this module directly! Use normal throw error calls. These messages will be replaced with error codes
7213
+ * during build.
7214
+ * @param {number} code
7215
+ */
7216
+ function formatProdErrorMessage(code) {
7217
+ return "Minified Redux error #" + code + "; visit https://redux.js.org/Errors?code=" + code + " for the full message or " + 'use the non-minified dev environment for full errors. ';
7218
+ }
7232
7219
 
7233
- var PreviewListImpl =
7234
- /*private*/
7235
- function PreviewListImpl() {
7236
- var _this = this;
7220
+ // Inlined version of the `symbol-observable` polyfill
7221
+ var $$observable = (function () {
7222
+ return typeof Symbol === 'function' && Symbol.observable || '@@observable';
7223
+ })();
7237
7224
 
7238
- _classCallCheck$1(this, PreviewListImpl);
7225
+ /**
7226
+ * These are private action types reserved by Redux.
7227
+ * For any unknown actions, you must return the current state.
7228
+ * If the current state is undefined, you must return the initial state.
7229
+ * Do not reference these action types directly in your code.
7230
+ */
7231
+ var randomString = function randomString() {
7232
+ return Math.random().toString(36).substring(7).split('').join('.');
7233
+ };
7239
7234
 
7240
- _previews$1.set(this, {
7241
- writable: true,
7242
- value: void 0
7243
- });
7235
+ var ActionTypes = {
7236
+ INIT: "@@redux/INIT" + randomString(),
7237
+ REPLACE: "@@redux/REPLACE" + randomString(),
7238
+ PROBE_UNKNOWN_ACTION: function PROBE_UNKNOWN_ACTION() {
7239
+ return "@@redux/PROBE_UNKNOWN_ACTION" + randomString();
7240
+ }
7241
+ };
7244
7242
 
7245
- _defineProperty$1(this, "register", function (preview) {
7246
- _classPrivateFieldGet$1(_this, _previews$1).push(preview);
7247
- });
7243
+ /**
7244
+ * @param {any} obj The object to inspect.
7245
+ * @returns {boolean} True if the argument appears to be a plain object.
7246
+ */
7247
+ function isPlainObject(obj) {
7248
+ if (typeof obj !== 'object' || obj === null) return false;
7249
+ var proto = obj;
7248
7250
 
7249
- _defineProperty$1(this, "unregister", function (preview) {
7250
- var index;
7251
+ while (Object.getPrototypeOf(proto) !== null) {
7252
+ proto = Object.getPrototypeOf(proto);
7253
+ }
7251
7254
 
7252
- while ((index = _classPrivateFieldGet$1(_this, _previews$1).indexOf(preview)) !== -1) {
7253
- _classPrivateFieldGet$1(_this, _previews$1).splice(index, 1);
7254
- }
7255
- });
7255
+ return Object.getPrototypeOf(obj) === proto;
7256
+ }
7256
7257
 
7257
- _defineProperty$1(this, "backendChanged", function (backend) {
7258
- var _iterator = _createForOfIteratorHelper(_classPrivateFieldGet$1(_this, _previews$1)),
7259
- _step;
7258
+ // Inlined / shortened version of `kindOf` from https://github.com/jonschlinkert/kind-of
7259
+ function miniKindOf(val) {
7260
+ if (val === void 0) return 'undefined';
7261
+ if (val === null) return 'null';
7262
+ var type = typeof val;
7260
7263
 
7261
- try {
7262
- for (_iterator.s(); !(_step = _iterator.n()).done;) {
7263
- var preview = _step.value;
7264
- preview.backendChanged(backend);
7264
+ switch (type) {
7265
+ case 'boolean':
7266
+ case 'string':
7267
+ case 'number':
7268
+ case 'symbol':
7269
+ case 'function':
7270
+ {
7271
+ return type;
7265
7272
  }
7266
- } catch (err) {
7267
- _iterator.e(err);
7268
- } finally {
7269
- _iterator.f();
7270
- }
7271
- });
7272
-
7273
- _classPrivateFieldSet$1(this, _previews$1, []);
7274
- };
7275
-
7276
- function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
7277
-
7278
- function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
7279
-
7280
- function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
7281
-
7282
- function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter); }
7273
+ }
7283
7274
 
7284
- function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
7275
+ if (Array.isArray(val)) return 'array';
7276
+ if (isDate(val)) return 'date';
7277
+ if (isError(val)) return 'error';
7278
+ var constructorName = ctorName(val);
7285
7279
 
7286
- function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
7280
+ switch (constructorName) {
7281
+ case 'Symbol':
7282
+ case 'Promise':
7283
+ case 'WeakMap':
7284
+ case 'WeakSet':
7285
+ case 'Map':
7286
+ case 'Set':
7287
+ return constructorName;
7288
+ } // other
7287
7289
 
7288
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
7289
7290
 
7290
- function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
7291
+ return type.slice(8, -1).toLowerCase().replace(/\s/g, '');
7292
+ }
7291
7293
 
7292
- function _classPrivateFieldGet(receiver, privateMap) { var descriptor = _classExtractFieldDescriptor(receiver, privateMap, "get"); return _classApplyDescriptorGet(receiver, descriptor); }
7294
+ function ctorName(val) {
7295
+ return typeof val.constructor === 'function' ? val.constructor.name : null;
7296
+ }
7293
7297
 
7294
- function _classApplyDescriptorGet(receiver, descriptor) { if (descriptor.get) { return descriptor.get.call(receiver); } return descriptor.value; }
7298
+ function isError(val) {
7299
+ return val instanceof Error || typeof val.message === 'string' && val.constructor && typeof val.constructor.stackTraceLimit === 'number';
7300
+ }
7295
7301
 
7296
- function _classPrivateFieldSet(receiver, privateMap, value) { var descriptor = _classExtractFieldDescriptor(receiver, privateMap, "set"); _classApplyDescriptorSet(receiver, descriptor, value); return value; }
7302
+ function isDate(val) {
7303
+ if (val instanceof Date) return true;
7304
+ return typeof val.toDateString === 'function' && typeof val.getDate === 'function' && typeof val.setDate === 'function';
7305
+ }
7297
7306
 
7298
- function _classExtractFieldDescriptor(receiver, privateMap, action) { if (!privateMap.has(receiver)) { throw new TypeError("attempted to " + action + " private field on non-instance"); } return privateMap.get(receiver); }
7307
+ function kindOf(val) {
7308
+ var typeOfVal = typeof val;
7299
7309
 
7300
- function _classApplyDescriptorSet(receiver, descriptor, value) { if (descriptor.set) { descriptor.set.call(receiver, value); } else { if (!descriptor.writable) { throw new TypeError("attempted to set read only private field"); } descriptor.value = value; } }
7310
+ if (process.env.NODE_ENV !== 'production') {
7311
+ typeOfVal = miniKindOf(val);
7312
+ }
7301
7313
 
7302
- var _current = new WeakMap();
7314
+ return typeOfVal;
7315
+ }
7303
7316
 
7304
- var _previews = new WeakMap();
7317
+ /**
7318
+ * @deprecated
7319
+ *
7320
+ * **We recommend using the `configureStore` method
7321
+ * of the `@reduxjs/toolkit` package**, which replaces `createStore`.
7322
+ *
7323
+ * Redux Toolkit is our recommended approach for writing Redux logic today,
7324
+ * including store setup, reducers, data fetching, and more.
7325
+ *
7326
+ * **For more details, please read this Redux docs page:**
7327
+ * **https://redux.js.org/introduction/why-rtk-is-redux-today**
7328
+ *
7329
+ * `configureStore` from Redux Toolkit is an improved version of `createStore` that
7330
+ * simplifies setup and helps avoid common bugs.
7331
+ *
7332
+ * You should not be using the `redux` core package by itself today, except for learning purposes.
7333
+ * The `createStore` method from the core `redux` package will not be removed, but we encourage
7334
+ * all users to migrate to using Redux Toolkit for all Redux code.
7335
+ *
7336
+ * If you want to use `createStore` without this visual deprecation warning, use
7337
+ * the `legacy_createStore` import instead:
7338
+ *
7339
+ * `import { legacy_createStore as createStore} from 'redux'`
7340
+ *
7341
+ */
7305
7342
 
7306
- var _backends = new WeakMap();
7343
+ function createStore(reducer, preloadedState, enhancer) {
7344
+ var _ref2;
7307
7345
 
7308
- var _backendsList = new WeakMap();
7346
+ if (typeof preloadedState === 'function' && typeof enhancer === 'function' || typeof enhancer === 'function' && typeof arguments[3] === 'function') {
7347
+ throw new Error(process.env.NODE_ENV === "production" ? formatProdErrorMessage(0) : 'It looks like you are passing several store enhancers to ' + 'createStore(). This is not supported. Instead, compose them ' + 'together to a single function. See https://redux.js.org/tutorials/fundamentals/part-4-store#creating-a-store-with-enhancers for an example.');
7348
+ }
7309
7349
 
7310
- var _nodes = new WeakMap();
7350
+ if (typeof preloadedState === 'function' && typeof enhancer === 'undefined') {
7351
+ enhancer = preloadedState;
7352
+ preloadedState = undefined;
7353
+ }
7311
7354
 
7312
- var _createBackend = new WeakMap();
7355
+ if (typeof enhancer !== 'undefined') {
7356
+ if (typeof enhancer !== 'function') {
7357
+ throw new Error(process.env.NODE_ENV === "production" ? formatProdErrorMessage(1) : "Expected the enhancer to be a function. Instead, received: '" + kindOf(enhancer) + "'");
7358
+ }
7313
7359
 
7314
- var _addEventListeners = new WeakMap();
7360
+ return enhancer(createStore)(reducer, preloadedState);
7361
+ }
7315
7362
 
7316
- var _removeEventListeners = new WeakMap();
7363
+ if (typeof reducer !== 'function') {
7364
+ throw new Error(process.env.NODE_ENV === "production" ? formatProdErrorMessage(2) : "Expected the root reducer to be a function. Instead, received: '" + kindOf(reducer) + "'");
7365
+ }
7317
7366
 
7318
- var _backendSwitcher = new WeakMap();
7367
+ var currentReducer = reducer;
7368
+ var currentState = preloadedState;
7369
+ var currentListeners = [];
7370
+ var nextListeners = currentListeners;
7371
+ var isDispatching = false;
7372
+ /**
7373
+ * This makes a shallow copy of currentListeners so we can use
7374
+ * nextListeners as a temporary list while dispatching.
7375
+ *
7376
+ * This prevents any bugs around consumers calling
7377
+ * subscribe/unsubscribe in the middle of a dispatch.
7378
+ */
7379
+
7380
+ function ensureCanMutateNextListeners() {
7381
+ if (nextListeners === currentListeners) {
7382
+ nextListeners = currentListeners.slice();
7383
+ }
7384
+ }
7385
+ /**
7386
+ * Reads the state tree managed by the store.
7387
+ *
7388
+ * @returns {any} The current state tree of your application.
7389
+ */
7319
7390
 
7320
- var _callBackend = new WeakMap();
7321
7391
 
7322
- var _connectBackend = new WeakMap();
7392
+ function getState() {
7393
+ if (isDispatching) {
7394
+ throw new Error(process.env.NODE_ENV === "production" ? formatProdErrorMessage(3) : 'You may not call store.getState() while the reducer is executing. ' + 'The reducer has already received the state as an argument. ' + 'Pass it down from the top reducer instead of reading it from the store.');
7395
+ }
7323
7396
 
7324
- var MultiBackendImpl =
7325
- /*private*/
7397
+ return currentState;
7398
+ }
7399
+ /**
7400
+ * Adds a change listener. It will be called any time an action is dispatched,
7401
+ * and some part of the state tree may potentially have changed. You may then
7402
+ * call `getState()` to read the current state tree inside the callback.
7403
+ *
7404
+ * You may call `dispatch()` from a change listener, with the following
7405
+ * caveats:
7406
+ *
7407
+ * 1. The subscriptions are snapshotted just before every `dispatch()` call.
7408
+ * If you subscribe or unsubscribe while the listeners are being invoked, this
7409
+ * will not have any effect on the `dispatch()` that is currently in progress.
7410
+ * However, the next `dispatch()` call, whether nested or not, will use a more
7411
+ * recent snapshot of the subscription list.
7412
+ *
7413
+ * 2. The listener should not expect to see all state changes, as the state
7414
+ * might have been updated multiple times during a nested `dispatch()` before
7415
+ * the listener is called. It is, however, guaranteed that all subscribers
7416
+ * registered before the `dispatch()` started will be called with the latest
7417
+ * state by the time it exits.
7418
+ *
7419
+ * @param {Function} listener A callback to be invoked on every dispatch.
7420
+ * @returns {Function} A function to remove this change listener.
7421
+ */
7422
+
7423
+
7424
+ function subscribe(listener) {
7425
+ if (typeof listener !== 'function') {
7426
+ throw new Error(process.env.NODE_ENV === "production" ? formatProdErrorMessage(4) : "Expected the listener to be a function. Instead, received: '" + kindOf(listener) + "'");
7427
+ }
7428
+
7429
+ if (isDispatching) {
7430
+ throw new Error(process.env.NODE_ENV === "production" ? formatProdErrorMessage(5) : 'You may not call store.subscribe() while the reducer is executing. ' + 'If you would like to be notified after the store has been updated, subscribe from a ' + 'component and invoke store.getState() in the callback to access the latest state. ' + 'See https://redux.js.org/api/store#subscribelistener for more details.');
7431
+ }
7432
+
7433
+ var isSubscribed = true;
7434
+ ensureCanMutateNextListeners();
7435
+ nextListeners.push(listener);
7436
+ return function unsubscribe() {
7437
+ if (!isSubscribed) {
7438
+ return;
7439
+ }
7326
7440
 
7327
- /*private*/
7441
+ if (isDispatching) {
7442
+ throw new Error(process.env.NODE_ENV === "production" ? formatProdErrorMessage(6) : 'You may not unsubscribe from a store listener while the reducer is executing. ' + 'See https://redux.js.org/api/store#subscribelistener for more details.');
7443
+ }
7328
7444
 
7329
- /*private*/
7445
+ isSubscribed = false;
7446
+ ensureCanMutateNextListeners();
7447
+ var index = nextListeners.indexOf(listener);
7448
+ nextListeners.splice(index, 1);
7449
+ currentListeners = null;
7450
+ };
7451
+ }
7452
+ /**
7453
+ * Dispatches an action. It is the only way to trigger a state change.
7454
+ *
7455
+ * The `reducer` function, used to create the store, will be called with the
7456
+ * current state tree and the given `action`. Its return value will
7457
+ * be considered the **next** state of the tree, and the change listeners
7458
+ * will be notified.
7459
+ *
7460
+ * The base implementation only supports plain object actions. If you want to
7461
+ * dispatch a Promise, an Observable, a thunk, or something else, you need to
7462
+ * wrap your store creating function into the corresponding middleware. For
7463
+ * example, see the documentation for the `redux-thunk` package. Even the
7464
+ * middleware will eventually dispatch plain object actions using this method.
7465
+ *
7466
+ * @param {Object} action A plain object representing “what changed”. It is
7467
+ * a good idea to keep actions serializable so you can record and replay user
7468
+ * sessions, or use the time travelling `redux-devtools`. An action must have
7469
+ * a `type` property which may not be `undefined`. It is a good idea to use
7470
+ * string constants for action types.
7471
+ *
7472
+ * @returns {Object} For convenience, the same action object you dispatched.
7473
+ *
7474
+ * Note that, if you use a custom middleware, it may wrap `dispatch()` to
7475
+ * return something else (for example, a Promise you can await).
7476
+ */
7477
+
7478
+
7479
+ function dispatch(action) {
7480
+ if (!isPlainObject(action)) {
7481
+ throw new Error(process.env.NODE_ENV === "production" ? formatProdErrorMessage(7) : "Actions must be plain objects. Instead, the actual type was: '" + kindOf(action) + "'. You may need to add middleware to your store setup to handle dispatching other values, such as 'redux-thunk' to handle dispatching functions. See https://redux.js.org/tutorials/fundamentals/part-4-store#middleware and https://redux.js.org/tutorials/fundamentals/part-6-async-logic#using-the-redux-thunk-middleware for examples.");
7482
+ }
7483
+
7484
+ if (typeof action.type === 'undefined') {
7485
+ throw new Error(process.env.NODE_ENV === "production" ? formatProdErrorMessage(8) : 'Actions may not have an undefined "type" property. You may have misspelled an action type string constant.');
7486
+ }
7487
+
7488
+ if (isDispatching) {
7489
+ throw new Error(process.env.NODE_ENV === "production" ? formatProdErrorMessage(9) : 'Reducers may not dispatch actions.');
7490
+ }
7330
7491
 
7331
- /*private*/
7492
+ try {
7493
+ isDispatching = true;
7494
+ currentState = currentReducer(currentState, action);
7495
+ } finally {
7496
+ isDispatching = false;
7497
+ }
7332
7498
 
7333
- /*private*/
7334
- function MultiBackendImpl(_manager, _context, _options) {
7335
- var _this = this;
7499
+ var listeners = currentListeners = nextListeners;
7336
7500
 
7337
- _classCallCheck(this, MultiBackendImpl);
7501
+ for (var i = 0; i < listeners.length; i++) {
7502
+ var listener = listeners[i];
7503
+ listener();
7504
+ }
7338
7505
 
7339
- _current.set(this, {
7340
- writable: true,
7341
- value: void 0
7342
- });
7506
+ return action;
7507
+ }
7508
+ /**
7509
+ * Replaces the reducer currently used by the store to calculate the state.
7510
+ *
7511
+ * You might need this if your app implements code splitting and you want to
7512
+ * load some of the reducers dynamically. You might also need this if you
7513
+ * implement a hot reloading mechanism for Redux.
7514
+ *
7515
+ * @param {Function} nextReducer The reducer for the store to use instead.
7516
+ * @returns {void}
7517
+ */
7518
+
7519
+
7520
+ function replaceReducer(nextReducer) {
7521
+ if (typeof nextReducer !== 'function') {
7522
+ throw new Error(process.env.NODE_ENV === "production" ? formatProdErrorMessage(10) : "Expected the nextReducer to be a function. Instead, received: '" + kindOf(nextReducer));
7523
+ }
7524
+
7525
+ currentReducer = nextReducer; // This action has a similiar effect to ActionTypes.INIT.
7526
+ // Any reducers that existed in both the new and old rootReducer
7527
+ // will receive the previous state. This effectively populates
7528
+ // the new state tree with any relevant data from the old one.
7529
+
7530
+ dispatch({
7531
+ type: ActionTypes.REPLACE
7532
+ });
7533
+ }
7534
+ /**
7535
+ * Interoperability point for observable/reactive libraries.
7536
+ * @returns {observable} A minimal observable of state changes.
7537
+ * For more information, see the observable proposal:
7538
+ * https://github.com/tc39/proposal-observable
7539
+ */
7540
+
7541
+
7542
+ function observable() {
7543
+ var _ref;
7544
+
7545
+ var outerSubscribe = subscribe;
7546
+ return _ref = {
7547
+ /**
7548
+ * The minimal observable subscription method.
7549
+ * @param {Object} observer Any object that can be used as an observer.
7550
+ * The observer object should have a `next` method.
7551
+ * @returns {subscription} An object with an `unsubscribe` method that can
7552
+ * be used to unsubscribe the observable from the store, and prevent further
7553
+ * emission of values from the observable.
7554
+ */
7555
+ subscribe: function subscribe(observer) {
7556
+ if (typeof observer !== 'object' || observer === null) {
7557
+ throw new Error(process.env.NODE_ENV === "production" ? formatProdErrorMessage(11) : "Expected the observer to be an object. Instead, received: '" + kindOf(observer) + "'");
7558
+ }
7343
7559
 
7344
- _previews.set(this, {
7345
- writable: true,
7346
- value: void 0
7347
- });
7560
+ function observeState() {
7561
+ if (observer.next) {
7562
+ observer.next(getState());
7563
+ }
7564
+ }
7348
7565
 
7349
- _backends.set(this, {
7350
- writable: true,
7351
- value: void 0
7352
- });
7566
+ observeState();
7567
+ var unsubscribe = outerSubscribe(observeState);
7568
+ return {
7569
+ unsubscribe: unsubscribe
7570
+ };
7571
+ }
7572
+ }, _ref[$$observable] = function () {
7573
+ return this;
7574
+ }, _ref;
7575
+ } // When a store is created, an "INIT" action is dispatched so that every
7576
+ // reducer returns their initial state. This effectively populates
7577
+ // the initial state tree.
7353
7578
 
7354
- _backendsList.set(this, {
7355
- writable: true,
7356
- value: void 0
7357
- });
7358
7579
 
7359
- _nodes.set(this, {
7360
- writable: true,
7361
- value: void 0
7580
+ dispatch({
7581
+ type: ActionTypes.INIT
7362
7582
  });
7583
+ return _ref2 = {
7584
+ dispatch: dispatch,
7585
+ subscribe: subscribe,
7586
+ getState: getState,
7587
+ replaceReducer: replaceReducer
7588
+ }, _ref2[$$observable] = observable, _ref2;
7589
+ }
7363
7590
 
7364
- _createBackend.set(this, {
7365
- writable: true,
7366
- value: function value(manager, context, backend) {
7367
- var _backend$preview, _backend$skipDispatch;
7591
+ /**
7592
+ * Prints a warning in the console if it exists.
7593
+ *
7594
+ * @param {String} message The warning message.
7595
+ * @returns {void}
7596
+ */
7597
+ function warning(message) {
7598
+ /* eslint-disable no-console */
7599
+ if (typeof console !== 'undefined' && typeof console.error === 'function') {
7600
+ console.error(message);
7601
+ }
7602
+ /* eslint-enable no-console */
7368
7603
 
7369
- if (!backend.backend) {
7370
- throw new Error("You must specify a 'backend' property in your Backend entry: ".concat(JSON.stringify(backend)));
7371
- }
7372
7604
 
7373
- var instance = backend.backend(manager, context, backend.options);
7374
- var id = backend.id; // Try to infer an `id` if one doesn't exist
7605
+ try {
7606
+ // This error was thrown as a convenience so that if you enable
7607
+ // "break on all exceptions" in your console,
7608
+ // it would pause the execution at this line.
7609
+ throw new Error(message);
7610
+ } catch (e) {} // eslint-disable-line no-empty
7375
7611
 
7376
- var inferName = !backend.id && instance && instance.constructor;
7612
+ }
7377
7613
 
7378
- if (inferName) {
7379
- id = instance.constructor.name;
7380
- }
7614
+ /*
7615
+ * This is a dummy function to check if the function name has been altered by minification.
7616
+ * If the function has been minified and NODE_ENV !== 'production', warn the user.
7617
+ */
7381
7618
 
7382
- if (!id) {
7383
- throw new Error("You must specify an 'id' property in your Backend entry: ".concat(JSON.stringify(backend), "\n see this guide: https://github.com/louisbrunner/dnd-multi-backend/tree/master/packages/react-dnd-multi-backend#migrating-from-5xx"));
7384
- } else if (inferName) {
7385
- console.warn( // eslint-disable-line no-console
7386
- "Deprecation notice: You are using a pipeline which doesn't include backends' 'id'.\n This might be unsupported in the future, please specify 'id' explicitely for every backend.");
7387
- }
7619
+ function isCrushed() {}
7388
7620
 
7389
- if (_classPrivateFieldGet(_this, _backends)[id]) {
7390
- throw new Error("You must specify a unique 'id' property in your Backend entry:\n ".concat(JSON.stringify(backend), " (conflicts with: ").concat(JSON.stringify(_classPrivateFieldGet(_this, _backends)[id]), ")"));
7391
- }
7621
+ if (process.env.NODE_ENV !== 'production' && typeof isCrushed.name === 'string' && isCrushed.name !== 'isCrushed') {
7622
+ warning('You are currently using minified code outside of NODE_ENV === "production". ' + 'This means that you are running a slower development build of Redux. ' + 'You can use loose-envify (https://github.com/zertosh/loose-envify) for browserify ' + 'or setting mode to production in webpack (https://webpack.js.org/concepts/mode/) ' + 'to ensure you have the correct code for your production build.');
7623
+ }
7392
7624
 
7393
- return {
7394
- id: id,
7395
- instance: instance,
7396
- preview: (_backend$preview = backend.preview) !== null && _backend$preview !== void 0 ? _backend$preview : false,
7397
- transition: backend.transition,
7398
- skipDispatchOnTransition: (_backend$skipDispatch = backend.skipDispatchOnTransition) !== null && _backend$skipDispatch !== void 0 ? _backend$skipDispatch : false
7399
- };
7625
+ /**
7626
+ * Use invariant() to assert state which your program assumes to be true.
7627
+ *
7628
+ * Provide sprintf-style format (only %s is supported) and arguments
7629
+ * to provide information about what broke and what you were
7630
+ * expecting.
7631
+ *
7632
+ * The invariant message will be stripped in production, but the invariant
7633
+ * will remain to ensure logic does not differ in production.
7634
+ */ function invariant(condition, format, ...args) {
7635
+ if (isProduction()) {
7636
+ if (format === undefined) {
7637
+ throw new Error('invariant requires an error message argument');
7638
+ }
7400
7639
  }
7401
- });
7402
-
7403
- _defineProperty(this, "setup", function () {
7404
- if (typeof window === 'undefined') {
7405
- return;
7640
+ if (!condition) {
7641
+ let error;
7642
+ if (format === undefined) {
7643
+ error = new Error('Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.');
7644
+ } else {
7645
+ let argIndex = 0;
7646
+ error = new Error(format.replace(/%s/g, function() {
7647
+ return args[argIndex++];
7648
+ }));
7649
+ error.name = 'Invariant Violation';
7650
+ }
7651
+ error.framesToPop = 1 // we don't care about invariant's own frame
7652
+ ;
7653
+ throw error;
7406
7654
  }
7655
+ }
7656
+ function isProduction() {
7657
+ return typeof process !== 'undefined' && process.env['NODE_ENV'] === 'production';
7658
+ }
7407
7659
 
7408
- if (MultiBackendImpl.isSetUp) {
7409
- throw new Error('Cannot have two MultiBackends at the same time.');
7410
- }
7411
-
7412
- MultiBackendImpl.isSetUp = true;
7660
+ // cheap lodash replacements
7661
+ /**
7662
+ * drop-in replacement for _.get
7663
+ * @param obj
7664
+ * @param path
7665
+ * @param defaultValue
7666
+ */ function get(obj, path, defaultValue) {
7667
+ return path.split('.').reduce((a, c)=>a && a[c] ? a[c] : defaultValue || null
7668
+ , obj);
7669
+ }
7670
+ /**
7671
+ * drop-in replacement for _.without
7672
+ */ function without$1(items, item) {
7673
+ return items.filter((i)=>i !== item
7674
+ );
7675
+ }
7676
+ /**
7677
+ * drop-in replacement for _.isString
7678
+ * @param input
7679
+ */ function isObject(input) {
7680
+ return typeof input === 'object';
7681
+ }
7682
+ /**
7683
+ * replacement for _.xor
7684
+ * @param itemsA
7685
+ * @param itemsB
7686
+ */ function xor(itemsA, itemsB) {
7687
+ const map = new Map();
7688
+ const insertItem = (item)=>{
7689
+ map.set(item, map.has(item) ? map.get(item) + 1 : 1);
7690
+ };
7691
+ itemsA.forEach(insertItem);
7692
+ itemsB.forEach(insertItem);
7693
+ const result = [];
7694
+ map.forEach((count, key)=>{
7695
+ if (count === 1) {
7696
+ result.push(key);
7697
+ }
7698
+ });
7699
+ return result;
7700
+ }
7701
+ /**
7702
+ * replacement for _.intersection
7703
+ * @param itemsA
7704
+ * @param itemsB
7705
+ */ function intersection(itemsA, itemsB) {
7706
+ return itemsA.filter((t)=>itemsB.indexOf(t) > -1
7707
+ );
7708
+ }
7413
7709
 
7414
- _classPrivateFieldGet(_this, _addEventListeners).call(_this, window);
7710
+ const INIT_COORDS = 'dnd-core/INIT_COORDS';
7711
+ const BEGIN_DRAG = 'dnd-core/BEGIN_DRAG';
7712
+ const PUBLISH_DRAG_SOURCE = 'dnd-core/PUBLISH_DRAG_SOURCE';
7713
+ const HOVER = 'dnd-core/HOVER';
7714
+ const DROP = 'dnd-core/DROP';
7715
+ const END_DRAG = 'dnd-core/END_DRAG';
7415
7716
 
7416
- _classPrivateFieldGet(_this, _backends)[_classPrivateFieldGet(_this, _current)].instance.setup();
7417
- });
7717
+ function setClientOffset(clientOffset, sourceClientOffset) {
7718
+ return {
7719
+ type: INIT_COORDS,
7720
+ payload: {
7721
+ sourceClientOffset: sourceClientOffset || null,
7722
+ clientOffset: clientOffset || null
7723
+ }
7724
+ };
7725
+ }
7418
7726
 
7419
- _defineProperty(this, "teardown", function () {
7420
- if (typeof window === 'undefined') {
7421
- return;
7727
+ const ResetCoordinatesAction = {
7728
+ type: INIT_COORDS,
7729
+ payload: {
7730
+ clientOffset: null,
7731
+ sourceClientOffset: null
7422
7732
  }
7423
-
7424
- MultiBackendImpl.isSetUp = false;
7425
-
7426
- _classPrivateFieldGet(_this, _removeEventListeners).call(_this, window);
7427
-
7428
- _classPrivateFieldGet(_this, _backends)[_classPrivateFieldGet(_this, _current)].instance.teardown();
7429
- });
7430
-
7431
- _defineProperty(this, "connectDragSource", function (sourceId, node, options) {
7432
- return _classPrivateFieldGet(_this, _connectBackend).call(_this, 'connectDragSource', sourceId, node, options);
7433
- });
7434
-
7435
- _defineProperty(this, "connectDragPreview", function (sourceId, node, options) {
7436
- return _classPrivateFieldGet(_this, _connectBackend).call(_this, 'connectDragPreview', sourceId, node, options);
7437
- });
7438
-
7439
- _defineProperty(this, "connectDropTarget", function (sourceId, node, options) {
7440
- return _classPrivateFieldGet(_this, _connectBackend).call(_this, 'connectDropTarget', sourceId, node, options);
7441
- });
7442
-
7443
- _defineProperty(this, "profile", function () {
7444
- return _classPrivateFieldGet(_this, _backends)[_classPrivateFieldGet(_this, _current)].instance.profile();
7445
- });
7446
-
7447
- _defineProperty(this, "previewEnabled", function () {
7448
- return _classPrivateFieldGet(_this, _backends)[_classPrivateFieldGet(_this, _current)].preview;
7449
- });
7450
-
7451
- _defineProperty(this, "previewsList", function () {
7452
- return _classPrivateFieldGet(_this, _previews);
7453
- });
7454
-
7455
- _defineProperty(this, "backendsList", function () {
7456
- return _classPrivateFieldGet(_this, _backendsList);
7457
- });
7458
-
7459
- _addEventListeners.set(this, {
7460
- writable: true,
7461
- value: function value(target) {
7462
- _classPrivateFieldGet(_this, _backendsList).forEach(function (backend) {
7463
- if (backend.transition) {
7464
- target.addEventListener(backend.transition.event, _classPrivateFieldGet(_this, _backendSwitcher));
7733
+ };
7734
+ function createBeginDrag(manager) {
7735
+ return function beginDrag(sourceIds = [], options = {
7736
+ publishSource: true
7737
+ }) {
7738
+ const { publishSource =true , clientOffset , getSourceClientOffset , } = options;
7739
+ const monitor = manager.getMonitor();
7740
+ const registry = manager.getRegistry();
7741
+ // Initialize the coordinates using the client offset
7742
+ manager.dispatch(setClientOffset(clientOffset));
7743
+ verifyInvariants$1(sourceIds, monitor, registry);
7744
+ // Get the draggable source
7745
+ const sourceId = getDraggableSource(sourceIds, monitor);
7746
+ if (sourceId == null) {
7747
+ manager.dispatch(ResetCoordinatesAction);
7748
+ return;
7465
7749
  }
7466
- });
7467
- }
7468
- });
7469
-
7470
- _removeEventListeners.set(this, {
7471
- writable: true,
7472
- value: function value(target) {
7473
- _classPrivateFieldGet(_this, _backendsList).forEach(function (backend) {
7474
- if (backend.transition) {
7475
- target.removeEventListener(backend.transition.event, _classPrivateFieldGet(_this, _backendSwitcher));
7750
+ // Get the source client offset
7751
+ let sourceClientOffset = null;
7752
+ if (clientOffset) {
7753
+ if (!getSourceClientOffset) {
7754
+ throw new Error('getSourceClientOffset must be defined');
7755
+ }
7756
+ verifyGetSourceClientOffsetIsFunction(getSourceClientOffset);
7757
+ sourceClientOffset = getSourceClientOffset(sourceId);
7476
7758
  }
7477
- });
7478
- }
7479
- });
7480
-
7481
- _backendSwitcher.set(this, {
7482
- writable: true,
7483
- value: function value(event) {
7484
- var oldBackend = _classPrivateFieldGet(_this, _current);
7485
-
7486
- _classPrivateFieldGet(_this, _backendsList).some(function (backend) {
7487
- if (backend.id !== _classPrivateFieldGet(_this, _current) && backend.transition && backend.transition.check(event)) {
7488
- _classPrivateFieldSet(_this, _current, backend.id);
7489
-
7490
- return true;
7759
+ // Initialize the full coordinates
7760
+ manager.dispatch(setClientOffset(clientOffset, sourceClientOffset));
7761
+ const source = registry.getSource(sourceId);
7762
+ const item = source.beginDrag(monitor, sourceId);
7763
+ // If source.beginDrag returns null, this is an indicator to cancel the drag
7764
+ if (item == null) {
7765
+ return undefined;
7491
7766
  }
7767
+ verifyItemIsObject(item);
7768
+ registry.pinSource(sourceId);
7769
+ const itemType = registry.getSourceType(sourceId);
7770
+ return {
7771
+ type: BEGIN_DRAG,
7772
+ payload: {
7773
+ itemType,
7774
+ item,
7775
+ sourceId,
7776
+ clientOffset: clientOffset || null,
7777
+ sourceClientOffset: sourceClientOffset || null,
7778
+ isSourcePublic: !!publishSource
7779
+ }
7780
+ };
7781
+ };
7782
+ }
7783
+ function verifyInvariants$1(sourceIds, monitor, registry) {
7784
+ invariant(!monitor.isDragging(), 'Cannot call beginDrag while dragging.');
7785
+ sourceIds.forEach(function(sourceId) {
7786
+ invariant(registry.getSource(sourceId), 'Expected sourceIds to be registered.');
7787
+ });
7788
+ }
7789
+ function verifyGetSourceClientOffsetIsFunction(getSourceClientOffset) {
7790
+ invariant(typeof getSourceClientOffset === 'function', 'When clientOffset is provided, getSourceClientOffset must be a function.');
7791
+ }
7792
+ function verifyItemIsObject(item) {
7793
+ invariant(isObject(item), 'Item must be an object.');
7794
+ }
7795
+ function getDraggableSource(sourceIds, monitor) {
7796
+ let sourceId = null;
7797
+ for(let i = sourceIds.length - 1; i >= 0; i--){
7798
+ if (monitor.canDragSource(sourceIds[i])) {
7799
+ sourceId = sourceIds[i];
7800
+ break;
7801
+ }
7802
+ }
7803
+ return sourceId;
7804
+ }
7492
7805
 
7493
- return false;
7494
- });
7495
-
7496
- if (_classPrivateFieldGet(_this, _current) !== oldBackend) {
7497
- var _event$target;
7498
-
7499
- _classPrivateFieldGet(_this, _backends)[oldBackend].instance.teardown();
7500
-
7501
- Object.keys(_classPrivateFieldGet(_this, _nodes)).forEach(function (id) {
7502
- var _classPrivateFieldGet2;
7503
-
7504
- var node = _classPrivateFieldGet(_this, _nodes)[id];
7505
-
7506
- node.unsubscribe();
7507
- node.unsubscribe = (_classPrivateFieldGet2 = _classPrivateFieldGet(_this, _callBackend)).call.apply(_classPrivateFieldGet2, [_this, node.func].concat(_toConsumableArray(node.args)));
7806
+ function _defineProperty$6(obj, key, value) {
7807
+ if (key in obj) {
7808
+ Object.defineProperty(obj, key, {
7809
+ value: value,
7810
+ enumerable: true,
7811
+ configurable: true,
7812
+ writable: true
7508
7813
  });
7509
-
7510
- _classPrivateFieldGet(_this, _previews).backendChanged(_this);
7511
-
7512
- var newBackend = _classPrivateFieldGet(_this, _backends)[_classPrivateFieldGet(_this, _current)];
7513
-
7514
- newBackend.instance.setup();
7515
-
7516
- if (newBackend.skipDispatchOnTransition) {
7517
- return;
7814
+ } else {
7815
+ obj[key] = value;
7816
+ }
7817
+ return obj;
7818
+ }
7819
+ function _objectSpread$4(target) {
7820
+ for(var i = 1; i < arguments.length; i++){
7821
+ var source = arguments[i] != null ? arguments[i] : {};
7822
+ var ownKeys = Object.keys(source);
7823
+ if (typeof Object.getOwnPropertySymbols === 'function') {
7824
+ ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
7825
+ return Object.getOwnPropertyDescriptor(source, sym).enumerable;
7826
+ }));
7518
7827
  }
7519
-
7520
- var newEvent = null;
7521
-
7522
- try {
7523
- newEvent = event.constructor(event.type, event);
7524
- } catch (_e) {
7525
- newEvent = document.createEvent('Event');
7526
- newEvent.initEvent(event.type, event.bubbles, event.cancelable);
7828
+ ownKeys.forEach(function(key) {
7829
+ _defineProperty$6(target, key, source[key]);
7830
+ });
7831
+ }
7832
+ return target;
7833
+ }
7834
+ function createDrop(manager) {
7835
+ return function drop(options = {}) {
7836
+ const monitor = manager.getMonitor();
7837
+ const registry = manager.getRegistry();
7838
+ verifyInvariants(monitor);
7839
+ const targetIds = getDroppableTargets(monitor);
7840
+ // Multiple actions are dispatched here, which is why this doesn't return an action
7841
+ targetIds.forEach((targetId, index)=>{
7842
+ const dropResult = determineDropResult(targetId, index, registry, monitor);
7843
+ const action = {
7844
+ type: DROP,
7845
+ payload: {
7846
+ dropResult: _objectSpread$4({}, options, dropResult)
7847
+ }
7848
+ };
7849
+ manager.dispatch(action);
7850
+ });
7851
+ };
7852
+ }
7853
+ function verifyInvariants(monitor) {
7854
+ invariant(monitor.isDragging(), 'Cannot call drop while not dragging.');
7855
+ invariant(!monitor.didDrop(), 'Cannot call drop twice during one drag operation.');
7856
+ }
7857
+ function determineDropResult(targetId, index, registry, monitor) {
7858
+ const target = registry.getTarget(targetId);
7859
+ let dropResult = target ? target.drop(monitor, targetId) : undefined;
7860
+ verifyDropResultType(dropResult);
7861
+ if (typeof dropResult === 'undefined') {
7862
+ dropResult = index === 0 ? {} : monitor.getDropResult();
7863
+ }
7864
+ return dropResult;
7865
+ }
7866
+ function verifyDropResultType(dropResult) {
7867
+ invariant(typeof dropResult === 'undefined' || isObject(dropResult), 'Drop result must either be an object or undefined.');
7868
+ }
7869
+ function getDroppableTargets(monitor) {
7870
+ const targetIds = monitor.getTargetIds().filter(monitor.canDropOnTarget, monitor);
7871
+ targetIds.reverse();
7872
+ return targetIds;
7873
+ }
7874
+
7875
+ function createEndDrag(manager) {
7876
+ return function endDrag() {
7877
+ const monitor = manager.getMonitor();
7878
+ const registry = manager.getRegistry();
7879
+ verifyIsDragging(monitor);
7880
+ const sourceId = monitor.getSourceId();
7881
+ if (sourceId != null) {
7882
+ const source = registry.getSource(sourceId, true);
7883
+ source.endDrag(monitor, sourceId);
7884
+ registry.unpinSource();
7527
7885
  }
7886
+ return {
7887
+ type: END_DRAG
7888
+ };
7889
+ };
7890
+ }
7891
+ function verifyIsDragging(monitor) {
7892
+ invariant(monitor.isDragging(), 'Cannot call endDrag while not dragging.');
7893
+ }
7528
7894
 
7529
- (_event$target = event.target) === null || _event$target === void 0 ? void 0 : _event$target.dispatchEvent(newEvent);
7530
- }
7895
+ function matchesType(targetType, draggedItemType) {
7896
+ if (draggedItemType === null) {
7897
+ return targetType === null;
7531
7898
  }
7532
- });
7899
+ return Array.isArray(targetType) ? targetType.some((t)=>t === draggedItemType
7900
+ ) : targetType === draggedItemType;
7901
+ }
7533
7902
 
7534
- _callBackend.set(this, {
7535
- writable: true,
7536
- value: function value(func, sourceId, node, options) {
7537
- return _classPrivateFieldGet(_this, _backends)[_classPrivateFieldGet(_this, _current)].instance[func](sourceId, node, options);
7903
+ function createHover(manager) {
7904
+ return function hover(targetIdsArg, { clientOffset } = {}) {
7905
+ verifyTargetIdsIsArray(targetIdsArg);
7906
+ const targetIds = targetIdsArg.slice(0);
7907
+ const monitor = manager.getMonitor();
7908
+ const registry = manager.getRegistry();
7909
+ const draggedItemType = monitor.getItemType();
7910
+ removeNonMatchingTargetIds(targetIds, registry, draggedItemType);
7911
+ checkInvariants(targetIds, monitor, registry);
7912
+ hoverAllTargets(targetIds, monitor, registry);
7913
+ return {
7914
+ type: HOVER,
7915
+ payload: {
7916
+ targetIds,
7917
+ clientOffset: clientOffset || null
7918
+ }
7919
+ };
7920
+ };
7921
+ }
7922
+ function verifyTargetIdsIsArray(targetIdsArg) {
7923
+ invariant(Array.isArray(targetIdsArg), 'Expected targetIds to be an array.');
7924
+ }
7925
+ function checkInvariants(targetIds, monitor, registry) {
7926
+ invariant(monitor.isDragging(), 'Cannot call hover while not dragging.');
7927
+ invariant(!monitor.didDrop(), 'Cannot call hover after drop.');
7928
+ for(let i = 0; i < targetIds.length; i++){
7929
+ const targetId = targetIds[i];
7930
+ invariant(targetIds.lastIndexOf(targetId) === i, 'Expected targetIds to be unique in the passed array.');
7931
+ const target = registry.getTarget(targetId);
7932
+ invariant(target, 'Expected targetIds to be registered.');
7933
+ }
7934
+ }
7935
+ function removeNonMatchingTargetIds(targetIds, registry, draggedItemType) {
7936
+ // Remove those targetIds that don't match the targetType. This
7937
+ // fixes shallow isOver which would only be non-shallow because of
7938
+ // non-matching targets.
7939
+ for(let i = targetIds.length - 1; i >= 0; i--){
7940
+ const targetId = targetIds[i];
7941
+ const targetType = registry.getTargetType(targetId);
7942
+ if (!matchesType(targetType, draggedItemType)) {
7943
+ targetIds.splice(i, 1);
7944
+ }
7538
7945
  }
7539
- });
7540
-
7541
- _connectBackend.set(this, {
7542
- writable: true,
7543
- value: function value(func, sourceId, node, options) {
7544
- var nodeId = "".concat(func, "_").concat(sourceId);
7946
+ }
7947
+ function hoverAllTargets(targetIds, monitor, registry) {
7948
+ // Finally call hover on all matching targets.
7949
+ targetIds.forEach(function(targetId) {
7950
+ const target = registry.getTarget(targetId);
7951
+ target.hover(monitor, targetId);
7952
+ });
7953
+ }
7545
7954
 
7546
- var unsubscribe = _classPrivateFieldGet(_this, _callBackend).call(_this, func, sourceId, node, options);
7955
+ function createPublishDragSource(manager) {
7956
+ return function publishDragSource() {
7957
+ const monitor = manager.getMonitor();
7958
+ if (monitor.isDragging()) {
7959
+ return {
7960
+ type: PUBLISH_DRAG_SOURCE
7961
+ };
7962
+ }
7963
+ return;
7964
+ };
7965
+ }
7547
7966
 
7548
- _classPrivateFieldGet(_this, _nodes)[nodeId] = {
7549
- func: func,
7550
- args: [sourceId, node, options],
7551
- unsubscribe: unsubscribe
7552
- };
7553
- return function () {
7554
- _classPrivateFieldGet(_this, _nodes)[nodeId].unsubscribe();
7967
+ function createDragDropActions(manager) {
7968
+ return {
7969
+ beginDrag: createBeginDrag(manager),
7970
+ publishDragSource: createPublishDragSource(manager),
7971
+ hover: createHover(manager),
7972
+ drop: createDrop(manager),
7973
+ endDrag: createEndDrag(manager)
7974
+ };
7975
+ }
7555
7976
 
7556
- delete _classPrivateFieldGet(_this, _nodes)[nodeId];
7557
- };
7977
+ class DragDropManagerImpl {
7978
+ receiveBackend(backend) {
7979
+ this.backend = backend;
7558
7980
  }
7559
- });
7560
-
7561
- if (!_options || !_options.backends || _options.backends.length < 1) {
7562
- throw new Error("You must specify at least one Backend, if you are coming from 2.x.x (or don't understand this error)\n see this guide: https://github.com/louisbrunner/dnd-multi-backend/tree/master/packages/react-dnd-multi-backend#migrating-from-2xx");
7563
- }
7564
-
7565
- _classPrivateFieldSet(this, _previews, new PreviewListImpl());
7566
-
7567
- _classPrivateFieldSet(this, _backends, {});
7568
-
7569
- _classPrivateFieldSet(this, _backendsList, []);
7570
-
7571
- _options.backends.forEach(function (backend) {
7572
- var backendRecord = _classPrivateFieldGet(_this, _createBackend).call(_this, _manager, _context, backend);
7573
-
7574
- _classPrivateFieldGet(_this, _backends)[backendRecord.id] = backendRecord;
7575
-
7576
- _classPrivateFieldGet(_this, _backendsList).push(backendRecord);
7577
- });
7578
-
7579
- _classPrivateFieldSet(this, _current, _classPrivateFieldGet(this, _backendsList)[0].id);
7580
-
7581
- _classPrivateFieldSet(this, _nodes, {});
7582
- };
7583
-
7584
- _defineProperty(MultiBackendImpl, "isSetUp", false);
7981
+ getMonitor() {
7982
+ return this.monitor;
7983
+ }
7984
+ getBackend() {
7985
+ return this.backend;
7986
+ }
7987
+ getRegistry() {
7988
+ return this.monitor.registry;
7989
+ }
7990
+ getActions() {
7991
+ /* eslint-disable-next-line @typescript-eslint/no-this-alias */ const manager = this;
7992
+ const { dispatch } = this.store;
7993
+ function bindActionCreator(actionCreator) {
7994
+ return (...args)=>{
7995
+ const action = actionCreator.apply(manager, args);
7996
+ if (typeof action !== 'undefined') {
7997
+ dispatch(action);
7998
+ }
7999
+ };
8000
+ }
8001
+ const actions = createDragDropActions(this);
8002
+ return Object.keys(actions).reduce((boundActions, key)=>{
8003
+ const action = actions[key];
8004
+ boundActions[key] = bindActionCreator(action);
8005
+ return boundActions;
8006
+ }, {});
8007
+ }
8008
+ dispatch(action) {
8009
+ this.store.dispatch(action);
8010
+ }
8011
+ constructor(store, monitor){
8012
+ this.isSetUp = false;
8013
+ this.handleRefCountChange = ()=>{
8014
+ const shouldSetUp = this.store.getState().refCount > 0;
8015
+ if (this.backend) {
8016
+ if (shouldSetUp && !this.isSetUp) {
8017
+ this.backend.setup();
8018
+ this.isSetUp = true;
8019
+ } else if (!shouldSetUp && this.isSetUp) {
8020
+ this.backend.teardown();
8021
+ this.isSetUp = false;
8022
+ }
8023
+ }
8024
+ };
8025
+ this.store = store;
8026
+ this.monitor = monitor;
8027
+ store.subscribe(this.handleRefCountChange);
8028
+ }
8029
+ }
7585
8030
 
7586
8031
  /**
7587
- * Use invariant() to assert state which your program assumes to be true.
8032
+ * Coordinate addition
8033
+ * @param a The first coordinate
8034
+ * @param b The second coordinate
8035
+ */ function add(a, b) {
8036
+ return {
8037
+ x: a.x + b.x,
8038
+ y: a.y + b.y
8039
+ };
8040
+ }
8041
+ /**
8042
+ * Coordinate subtraction
8043
+ * @param a The first coordinate
8044
+ * @param b The second coordinate
8045
+ */ function subtract(a, b) {
8046
+ return {
8047
+ x: a.x - b.x,
8048
+ y: a.y - b.y
8049
+ };
8050
+ }
8051
+ /**
8052
+ * Returns the cartesian distance of the drag source component's position, based on its position
8053
+ * at the time when the current drag operation has started, and the movement difference.
7588
8054
  *
7589
- * Provide sprintf-style format (only %s is supported) and arguments
7590
- * to provide information about what broke and what you were
7591
- * expecting.
8055
+ * Returns null if no item is being dragged.
7592
8056
  *
7593
- * The invariant message will be stripped in production, but the invariant
7594
- * will remain to ensure logic does not differ in production.
7595
- */ function invariant(condition, format, ...args) {
7596
- if (isProduction()) {
7597
- if (format === undefined) {
7598
- throw new Error('invariant requires an error message argument');
8057
+ * @param state The offset state to compute from
8058
+ */ function getSourceClientOffset(state) {
8059
+ const { clientOffset , initialClientOffset , initialSourceClientOffset } = state;
8060
+ if (!clientOffset || !initialClientOffset || !initialSourceClientOffset) {
8061
+ return null;
8062
+ }
8063
+ return subtract(add(clientOffset, initialSourceClientOffset), initialClientOffset);
8064
+ }
8065
+ /**
8066
+ * Determines the x,y offset between the client offset and the initial client offset
8067
+ *
8068
+ * @param state The offset state to compute from
8069
+ */ function getDifferenceFromInitialOffset(state) {
8070
+ const { clientOffset , initialClientOffset } = state;
8071
+ if (!clientOffset || !initialClientOffset) {
8072
+ return null;
8073
+ }
8074
+ return subtract(clientOffset, initialClientOffset);
8075
+ }
8076
+
8077
+ const NONE = [];
8078
+ const ALL = [];
8079
+ NONE.__IS_NONE__ = true;
8080
+ ALL.__IS_ALL__ = true;
8081
+ /**
8082
+ * Determines if the given handler IDs are dirty or not.
8083
+ *
8084
+ * @param dirtyIds The set of dirty handler ids
8085
+ * @param handlerIds The set of handler ids to check
8086
+ */ function areDirty(dirtyIds, handlerIds) {
8087
+ if (dirtyIds === NONE) {
8088
+ return false;
8089
+ }
8090
+ if (dirtyIds === ALL || typeof handlerIds === 'undefined') {
8091
+ return true;
8092
+ }
8093
+ const commonIds = intersection(handlerIds, dirtyIds);
8094
+ return commonIds.length > 0;
8095
+ }
8096
+
8097
+ class DragDropMonitorImpl {
8098
+ subscribeToStateChange(listener, options = {}) {
8099
+ const { handlerIds } = options;
8100
+ invariant(typeof listener === 'function', 'listener must be a function.');
8101
+ invariant(typeof handlerIds === 'undefined' || Array.isArray(handlerIds), 'handlerIds, when specified, must be an array of strings.');
8102
+ let prevStateId = this.store.getState().stateId;
8103
+ const handleChange = ()=>{
8104
+ const state = this.store.getState();
8105
+ const currentStateId = state.stateId;
8106
+ try {
8107
+ const canSkipListener = currentStateId === prevStateId || currentStateId === prevStateId + 1 && !areDirty(state.dirtyHandlerIds, handlerIds);
8108
+ if (!canSkipListener) {
8109
+ listener();
8110
+ }
8111
+ } finally{
8112
+ prevStateId = currentStateId;
8113
+ }
8114
+ };
8115
+ return this.store.subscribe(handleChange);
8116
+ }
8117
+ subscribeToOffsetChange(listener) {
8118
+ invariant(typeof listener === 'function', 'listener must be a function.');
8119
+ let previousState = this.store.getState().dragOffset;
8120
+ const handleChange = ()=>{
8121
+ const nextState = this.store.getState().dragOffset;
8122
+ if (nextState === previousState) {
8123
+ return;
8124
+ }
8125
+ previousState = nextState;
8126
+ listener();
8127
+ };
8128
+ return this.store.subscribe(handleChange);
8129
+ }
8130
+ canDragSource(sourceId) {
8131
+ if (!sourceId) {
8132
+ return false;
7599
8133
  }
8134
+ const source = this.registry.getSource(sourceId);
8135
+ invariant(source, `Expected to find a valid source. sourceId=${sourceId}`);
8136
+ if (this.isDragging()) {
8137
+ return false;
8138
+ }
8139
+ return source.canDrag(this, sourceId);
7600
8140
  }
7601
- if (!condition) {
7602
- let error;
7603
- if (format === undefined) {
7604
- error = new Error('Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.');
8141
+ canDropOnTarget(targetId) {
8142
+ // undefined on initial render
8143
+ if (!targetId) {
8144
+ return false;
8145
+ }
8146
+ const target = this.registry.getTarget(targetId);
8147
+ invariant(target, `Expected to find a valid target. targetId=${targetId}`);
8148
+ if (!this.isDragging() || this.didDrop()) {
8149
+ return false;
8150
+ }
8151
+ const targetType = this.registry.getTargetType(targetId);
8152
+ const draggedItemType = this.getItemType();
8153
+ return matchesType(targetType, draggedItemType) && target.canDrop(this, targetId);
8154
+ }
8155
+ isDragging() {
8156
+ return Boolean(this.getItemType());
8157
+ }
8158
+ isDraggingSource(sourceId) {
8159
+ // undefined on initial render
8160
+ if (!sourceId) {
8161
+ return false;
8162
+ }
8163
+ const source = this.registry.getSource(sourceId, true);
8164
+ invariant(source, `Expected to find a valid source. sourceId=${sourceId}`);
8165
+ if (!this.isDragging() || !this.isSourcePublic()) {
8166
+ return false;
8167
+ }
8168
+ const sourceType = this.registry.getSourceType(sourceId);
8169
+ const draggedItemType = this.getItemType();
8170
+ if (sourceType !== draggedItemType) {
8171
+ return false;
8172
+ }
8173
+ return source.isDragging(this, sourceId);
8174
+ }
8175
+ isOverTarget(targetId, options = {
8176
+ shallow: false
8177
+ }) {
8178
+ // undefined on initial render
8179
+ if (!targetId) {
8180
+ return false;
8181
+ }
8182
+ const { shallow } = options;
8183
+ if (!this.isDragging()) {
8184
+ return false;
8185
+ }
8186
+ const targetType = this.registry.getTargetType(targetId);
8187
+ const draggedItemType = this.getItemType();
8188
+ if (draggedItemType && !matchesType(targetType, draggedItemType)) {
8189
+ return false;
8190
+ }
8191
+ const targetIds = this.getTargetIds();
8192
+ if (!targetIds.length) {
8193
+ return false;
8194
+ }
8195
+ const index = targetIds.indexOf(targetId);
8196
+ if (shallow) {
8197
+ return index === targetIds.length - 1;
7605
8198
  } else {
7606
- let argIndex = 0;
7607
- error = new Error(format.replace(/%s/g, function() {
7608
- return args[argIndex++];
7609
- }));
7610
- error.name = 'Invariant Violation';
8199
+ return index > -1;
7611
8200
  }
7612
- error.framesToPop = 1 // we don't care about invariant's own frame
7613
- ;
7614
- throw error;
7615
8201
  }
8202
+ getItemType() {
8203
+ return this.store.getState().dragOperation.itemType;
8204
+ }
8205
+ getItem() {
8206
+ return this.store.getState().dragOperation.item;
8207
+ }
8208
+ getSourceId() {
8209
+ return this.store.getState().dragOperation.sourceId;
8210
+ }
8211
+ getTargetIds() {
8212
+ return this.store.getState().dragOperation.targetIds;
8213
+ }
8214
+ getDropResult() {
8215
+ return this.store.getState().dragOperation.dropResult;
8216
+ }
8217
+ didDrop() {
8218
+ return this.store.getState().dragOperation.didDrop;
8219
+ }
8220
+ isSourcePublic() {
8221
+ return Boolean(this.store.getState().dragOperation.isSourcePublic);
8222
+ }
8223
+ getInitialClientOffset() {
8224
+ return this.store.getState().dragOffset.initialClientOffset;
8225
+ }
8226
+ getInitialSourceClientOffset() {
8227
+ return this.store.getState().dragOffset.initialSourceClientOffset;
8228
+ }
8229
+ getClientOffset() {
8230
+ return this.store.getState().dragOffset.clientOffset;
8231
+ }
8232
+ getSourceClientOffset() {
8233
+ return getSourceClientOffset(this.store.getState().dragOffset);
8234
+ }
8235
+ getDifferenceFromInitialOffset() {
8236
+ return getDifferenceFromInitialOffset(this.store.getState().dragOffset);
8237
+ }
8238
+ constructor(store, registry){
8239
+ this.store = store;
8240
+ this.registry = registry;
8241
+ }
8242
+ }
8243
+
8244
+ // Safari 6 and 6.1 for desktop, iPad, and iPhone are the only browsers that
8245
+ // have WebKitMutationObserver but not un-prefixed MutationObserver.
8246
+ // Must use `global` or `self` instead of `window` to work in both frames and web
8247
+ // workers. `global` is a provision of Browserify, Mr, Mrs, or Mop.
8248
+ /* globals self */ const scope = typeof global !== 'undefined' ? global : self;
8249
+ const BrowserMutationObserver = scope.MutationObserver || scope.WebKitMutationObserver;
8250
+ function makeRequestCallFromTimer(callback) {
8251
+ return function requestCall() {
8252
+ // We dispatch a timeout with a specified delay of 0 for engines that
8253
+ // can reliably accommodate that request. This will usually be snapped
8254
+ // to a 4 milisecond delay, but once we're flushing, there's no delay
8255
+ // between events.
8256
+ const timeoutHandle = setTimeout(handleTimer, 0);
8257
+ // However, since this timer gets frequently dropped in Firefox
8258
+ // workers, we enlist an interval handle that will try to fire
8259
+ // an event 20 times per second until it succeeds.
8260
+ const intervalHandle = setInterval(handleTimer, 50);
8261
+ function handleTimer() {
8262
+ // Whichever timer succeeds will cancel both timers and
8263
+ // execute the callback.
8264
+ clearTimeout(timeoutHandle);
8265
+ clearInterval(intervalHandle);
8266
+ callback();
8267
+ }
8268
+ };
7616
8269
  }
7617
- function isProduction() {
7618
- return typeof process !== 'undefined' && process.env['NODE_ENV'] === 'production';
8270
+ // To request a high priority event, we induce a mutation observer by toggling
8271
+ // the text of a text node between "1" and "-1".
8272
+ function makeRequestCallFromMutationObserver(callback) {
8273
+ let toggle = 1;
8274
+ const observer = new BrowserMutationObserver(callback);
8275
+ const node = document.createTextNode('');
8276
+ observer.observe(node, {
8277
+ characterData: true
8278
+ });
8279
+ return function requestCall() {
8280
+ toggle = -toggle;
8281
+ node.data = toggle;
8282
+ };
8283
+ }
8284
+ const makeRequestCall = typeof BrowserMutationObserver === 'function' ? // reliably everywhere they are implemented.
8285
+ // They are implemented in all modern browsers.
8286
+ //
8287
+ // - Android 4-4.3
8288
+ // - Chrome 26-34
8289
+ // - Firefox 14-29
8290
+ // - Internet Explorer 11
8291
+ // - iPad Safari 6-7.1
8292
+ // - iPhone Safari 7-7.1
8293
+ // - Safari 6-7
8294
+ makeRequestCallFromMutationObserver : // task queue, are implemented in Internet Explorer 10, Safari 5.0-1, and Opera
8295
+ // 11-12, and in web workers in many engines.
8296
+ // Although message channels yield to any queued rendering and IO tasks, they
8297
+ // would be better than imposing the 4ms delay of timers.
8298
+ // However, they do not work reliably in Internet Explorer or Safari.
8299
+ // Internet Explorer 10 is the only browser that has setImmediate but does
8300
+ // not have MutationObservers.
8301
+ // Although setImmediate yields to the browser's renderer, it would be
8302
+ // preferrable to falling back to setTimeout since it does not have
8303
+ // the minimum 4ms penalty.
8304
+ // Unfortunately there appears to be a bug in Internet Explorer 10 Mobile (and
8305
+ // Desktop to a lesser extent) that renders both setImmediate and
8306
+ // MessageChannel useless for the purposes of ASAP.
8307
+ // https://github.com/kriskowal/q/issues/396
8308
+ // Timers are implemented universally.
8309
+ // We fall back to timers in workers in most engines, and in foreground
8310
+ // contexts in the following browsers.
8311
+ // However, note that even this simple case requires nuances to operate in a
8312
+ // broad spectrum of browsers.
8313
+ //
8314
+ // - Firefox 3-13
8315
+ // - Internet Explorer 6-9
8316
+ // - iPad Safari 4.3
8317
+ // - Lynx 2.8.7
8318
+ makeRequestCallFromTimer;
8319
+
8320
+ class AsapQueue {
8321
+ // Use the fastest means possible to execute a task in its own turn, with
8322
+ // priority over other events including IO, animation, reflow, and redraw
8323
+ // events in browsers.
8324
+ //
8325
+ // An exception thrown by a task will permanently interrupt the processing of
8326
+ // subsequent tasks. The higher level `asap` function ensures that if an
8327
+ // exception is thrown by a task, that the task queue will continue flushing as
8328
+ // soon as possible, but if you use `rawAsap` directly, you are responsible to
8329
+ // either ensure that no exceptions are thrown from your task, or to manually
8330
+ // call `rawAsap.requestFlush` if an exception is thrown.
8331
+ enqueueTask(task) {
8332
+ const { queue: q , requestFlush } = this;
8333
+ if (!q.length) {
8334
+ requestFlush();
8335
+ this.flushing = true;
8336
+ }
8337
+ // Equivalent to push, but avoids a function call.
8338
+ q[q.length] = task;
8339
+ }
8340
+ constructor(){
8341
+ this.queue = [];
8342
+ // We queue errors to ensure they are thrown in right order (FIFO).
8343
+ // Array-as-queue is good enough here, since we are just dealing with exceptions.
8344
+ this.pendingErrors = [];
8345
+ // Once a flush has been requested, no further calls to `requestFlush` are
8346
+ // necessary until the next `flush` completes.
8347
+ // @ts-ignore
8348
+ this.flushing = false;
8349
+ // The position of the next task to execute in the task queue. This is
8350
+ // preserved between calls to `flush` so that it can be resumed if
8351
+ // a task throws an exception.
8352
+ this.index = 0;
8353
+ // If a task schedules additional tasks recursively, the task queue can grow
8354
+ // unbounded. To prevent memory exhaustion, the task queue will periodically
8355
+ // truncate already-completed tasks.
8356
+ this.capacity = 1024;
8357
+ // The flush function processes all tasks that have been scheduled with
8358
+ // `rawAsap` unless and until one of those tasks throws an exception.
8359
+ // If a task throws an exception, `flush` ensures that its state will remain
8360
+ // consistent and will resume where it left off when called again.
8361
+ // However, `flush` does not make any arrangements to be called again if an
8362
+ // exception is thrown.
8363
+ this.flush = ()=>{
8364
+ const { queue: q } = this;
8365
+ while(this.index < q.length){
8366
+ const currentIndex = this.index;
8367
+ // Advance the index before calling the task. This ensures that we will
8368
+ // begin flushing on the next task the task throws an error.
8369
+ this.index++;
8370
+ q[currentIndex].call();
8371
+ // Prevent leaking memory for long chains of recursive calls to `asap`.
8372
+ // If we call `asap` within tasks scheduled by `asap`, the queue will
8373
+ // grow, but to avoid an O(n) walk for every task we execute, we don't
8374
+ // shift tasks off the queue after they have been executed.
8375
+ // Instead, we periodically shift 1024 tasks off the queue.
8376
+ if (this.index > this.capacity) {
8377
+ // Manually shift all values starting at the index back to the
8378
+ // beginning of the queue.
8379
+ for(let scan = 0, newLength = q.length - this.index; scan < newLength; scan++){
8380
+ q[scan] = q[scan + this.index];
8381
+ }
8382
+ q.length -= this.index;
8383
+ this.index = 0;
8384
+ }
8385
+ }
8386
+ q.length = 0;
8387
+ this.index = 0;
8388
+ this.flushing = false;
8389
+ };
8390
+ // In a web browser, exceptions are not fatal. However, to avoid
8391
+ // slowing down the queue of pending tasks, we rethrow the error in a
8392
+ // lower priority turn.
8393
+ this.registerPendingError = (err)=>{
8394
+ this.pendingErrors.push(err);
8395
+ this.requestErrorThrow();
8396
+ };
8397
+ // `requestFlush` requests that the high priority event queue be flushed as
8398
+ // soon as possible.
8399
+ // This is useful to prevent an error thrown in a task from stalling the event
8400
+ // queue if the exception handled by Node.js’s
8401
+ // `process.on("uncaughtException")` or by a domain.
8402
+ // `requestFlush` is implemented using a strategy based on data collected from
8403
+ // every available SauceLabs Selenium web driver worker at time of writing.
8404
+ // https://docs.google.com/spreadsheets/d/1mG-5UYGup5qxGdEMWkhP6BWCz053NUb2E1QoUTU16uA/edit#gid=783724593
8405
+ this.requestFlush = makeRequestCall(this.flush);
8406
+ this.requestErrorThrow = makeRequestCallFromTimer(()=>{
8407
+ // Throw first error
8408
+ if (this.pendingErrors.length) {
8409
+ throw this.pendingErrors.shift();
8410
+ }
8411
+ });
8412
+ }
8413
+ } // The message channel technique was discovered by Malte Ubl and was the
8414
+ // original foundation for this library.
8415
+ // http://www.nonblocking.io/2011/06/windownexttick.html
8416
+ // Safari 6.0.5 (at least) intermittently fails to create message ports on a
8417
+ // page's first load. Thankfully, this version of Safari supports
8418
+ // MutationObservers, so we don't need to fall back in that case.
8419
+ // function makeRequestCallFromMessageChannel(callback) {
8420
+ // var channel = new MessageChannel();
8421
+ // channel.port1.onmessage = callback;
8422
+ // return function requestCall() {
8423
+ // channel.port2.postMessage(0);
8424
+ // };
8425
+ // }
8426
+ // For reasons explained above, we are also unable to use `setImmediate`
8427
+ // under any circumstances.
8428
+ // Even if we were, there is another bug in Internet Explorer 10.
8429
+ // It is not sufficient to assign `setImmediate` to `requestFlush` because
8430
+ // `setImmediate` must be called *by name* and therefore must be wrapped in a
8431
+ // closure.
8432
+ // Never forget.
8433
+ // function makeRequestCallFromSetImmediate(callback) {
8434
+ // return function requestCall() {
8435
+ // setImmediate(callback);
8436
+ // };
8437
+ // }
8438
+ // Safari 6.0 has a problem where timers will get lost while the user is
8439
+ // scrolling. This problem does not impact ASAP because Safari 6.0 supports
8440
+ // mutation observers, so that implementation is used instead.
8441
+ // However, if we ever elect to use timers in Safari, the prevalent work-around
8442
+ // is to add a scroll event listener that calls for a flush.
8443
+ // `setTimeout` does not call the passed callback if the delay is less than
8444
+ // approximately 7 in web workers in Firefox 8 through 18, and sometimes not
8445
+ // even then.
8446
+ // This is for `asap.js` only.
8447
+ // Its name will be periodically randomized to break any code that depends on
8448
+ // // its existence.
8449
+ // rawAsap.makeRequestCallFromTimer = makeRequestCallFromTimer
8450
+ // ASAP was originally a nextTick shim included in Q. This was factored out
8451
+ // into this ASAP package. It was later adapted to RSVP which made further
8452
+ // amendments. These decisions, particularly to marginalize MessageChannel and
8453
+ // to capture the MutationObserver implementation in a closure, were integrated
8454
+ // back into ASAP proper.
8455
+ // https://github.com/tildeio/rsvp.js/blob/cddf7232546a9cf858524b75cde6f9edf72620a7/lib/rsvp/asap.js
8456
+
8457
+ // `call`, just like a function.
8458
+ class RawTask {
8459
+ call() {
8460
+ try {
8461
+ this.task && this.task();
8462
+ } catch (error) {
8463
+ this.onError(error);
8464
+ } finally{
8465
+ this.task = null;
8466
+ this.release(this);
8467
+ }
8468
+ }
8469
+ constructor(onError, release){
8470
+ this.onError = onError;
8471
+ this.release = release;
8472
+ this.task = null;
8473
+ }
8474
+ }
8475
+
8476
+ class TaskFactory {
8477
+ create(task) {
8478
+ const tasks = this.freeTasks;
8479
+ const t1 = tasks.length ? tasks.pop() : new RawTask(this.onError, (t)=>tasks[tasks.length] = t
8480
+ );
8481
+ t1.task = task;
8482
+ return t1;
8483
+ }
8484
+ constructor(onError){
8485
+ this.onError = onError;
8486
+ this.freeTasks = [];
8487
+ }
7619
8488
  }
7620
8489
 
8490
+ const asapQueue = new AsapQueue();
8491
+ const taskFactory = new TaskFactory(asapQueue.registerPendingError);
7621
8492
  /**
7622
- * Create the React Context
7623
- */ const DndContext = createContext({
7624
- dragDropManager: undefined
8493
+ * Calls a task as soon as possible after returning, in its own event, with priority
8494
+ * over other events like animation, reflow, and repaint. An error thrown from an
8495
+ * event will not interrupt, nor even substantially slow down the processing of
8496
+ * other events, but will be rather postponed to a lower priority event.
8497
+ * @param {{call}} task A callable object, typically a function that takes no
8498
+ * arguments.
8499
+ */ function asap(task) {
8500
+ asapQueue.enqueueTask(taskFactory.create(task));
8501
+ }
8502
+
8503
+ const ADD_SOURCE = 'dnd-core/ADD_SOURCE';
8504
+ const ADD_TARGET = 'dnd-core/ADD_TARGET';
8505
+ const REMOVE_SOURCE = 'dnd-core/REMOVE_SOURCE';
8506
+ const REMOVE_TARGET = 'dnd-core/REMOVE_TARGET';
8507
+ function addSource(sourceId) {
8508
+ return {
8509
+ type: ADD_SOURCE,
8510
+ payload: {
8511
+ sourceId
8512
+ }
8513
+ };
8514
+ }
8515
+ function addTarget(targetId) {
8516
+ return {
8517
+ type: ADD_TARGET,
8518
+ payload: {
8519
+ targetId
8520
+ }
8521
+ };
8522
+ }
8523
+ function removeSource(sourceId) {
8524
+ return {
8525
+ type: REMOVE_SOURCE,
8526
+ payload: {
8527
+ sourceId
8528
+ }
8529
+ };
8530
+ }
8531
+ function removeTarget(targetId) {
8532
+ return {
8533
+ type: REMOVE_TARGET,
8534
+ payload: {
8535
+ targetId
8536
+ }
8537
+ };
8538
+ }
8539
+
8540
+ function validateSourceContract(source) {
8541
+ invariant(typeof source.canDrag === 'function', 'Expected canDrag to be a function.');
8542
+ invariant(typeof source.beginDrag === 'function', 'Expected beginDrag to be a function.');
8543
+ invariant(typeof source.endDrag === 'function', 'Expected endDrag to be a function.');
8544
+ }
8545
+ function validateTargetContract(target) {
8546
+ invariant(typeof target.canDrop === 'function', 'Expected canDrop to be a function.');
8547
+ invariant(typeof target.hover === 'function', 'Expected hover to be a function.');
8548
+ invariant(typeof target.drop === 'function', 'Expected beginDrag to be a function.');
8549
+ }
8550
+ function validateType(type, allowArray) {
8551
+ if (allowArray && Array.isArray(type)) {
8552
+ type.forEach((t)=>validateType(t, false)
8553
+ );
8554
+ return;
8555
+ }
8556
+ invariant(typeof type === 'string' || typeof type === 'symbol', allowArray ? 'Type can only be a string, a symbol, or an array of either.' : 'Type can only be a string or a symbol.');
8557
+ }
8558
+
8559
+ var HandlerRole;
8560
+ (function(HandlerRole) {
8561
+ HandlerRole["SOURCE"] = "SOURCE";
8562
+ HandlerRole["TARGET"] = "TARGET";
8563
+ })(HandlerRole || (HandlerRole = {}));
8564
+
8565
+ let nextUniqueId = 0;
8566
+ function getNextUniqueId() {
8567
+ return nextUniqueId++;
8568
+ }
8569
+
8570
+ function getNextHandlerId(role) {
8571
+ const id = getNextUniqueId().toString();
8572
+ switch(role){
8573
+ case HandlerRole.SOURCE:
8574
+ return `S${id}`;
8575
+ case HandlerRole.TARGET:
8576
+ return `T${id}`;
8577
+ default:
8578
+ throw new Error(`Unknown Handler Role: ${role}`);
8579
+ }
8580
+ }
8581
+ function parseRoleFromHandlerId(handlerId) {
8582
+ switch(handlerId[0]){
8583
+ case 'S':
8584
+ return HandlerRole.SOURCE;
8585
+ case 'T':
8586
+ return HandlerRole.TARGET;
8587
+ default:
8588
+ throw new Error(`Cannot parse handler ID: ${handlerId}`);
8589
+ }
8590
+ }
8591
+ function mapContainsValue(map, searchValue) {
8592
+ const entries = map.entries();
8593
+ let isDone = false;
8594
+ do {
8595
+ const { done , value: [, value] , } = entries.next();
8596
+ if (value === searchValue) {
8597
+ return true;
8598
+ }
8599
+ isDone = !!done;
8600
+ }while (!isDone)
8601
+ return false;
8602
+ }
8603
+ class HandlerRegistryImpl {
8604
+ addSource(type, source) {
8605
+ validateType(type);
8606
+ validateSourceContract(source);
8607
+ const sourceId = this.addHandler(HandlerRole.SOURCE, type, source);
8608
+ this.store.dispatch(addSource(sourceId));
8609
+ return sourceId;
8610
+ }
8611
+ addTarget(type, target) {
8612
+ validateType(type, true);
8613
+ validateTargetContract(target);
8614
+ const targetId = this.addHandler(HandlerRole.TARGET, type, target);
8615
+ this.store.dispatch(addTarget(targetId));
8616
+ return targetId;
8617
+ }
8618
+ containsHandler(handler) {
8619
+ return mapContainsValue(this.dragSources, handler) || mapContainsValue(this.dropTargets, handler);
8620
+ }
8621
+ getSource(sourceId, includePinned = false) {
8622
+ invariant(this.isSourceId(sourceId), 'Expected a valid source ID.');
8623
+ const isPinned = includePinned && sourceId === this.pinnedSourceId;
8624
+ const source = isPinned ? this.pinnedSource : this.dragSources.get(sourceId);
8625
+ return source;
8626
+ }
8627
+ getTarget(targetId) {
8628
+ invariant(this.isTargetId(targetId), 'Expected a valid target ID.');
8629
+ return this.dropTargets.get(targetId);
8630
+ }
8631
+ getSourceType(sourceId) {
8632
+ invariant(this.isSourceId(sourceId), 'Expected a valid source ID.');
8633
+ return this.types.get(sourceId);
8634
+ }
8635
+ getTargetType(targetId) {
8636
+ invariant(this.isTargetId(targetId), 'Expected a valid target ID.');
8637
+ return this.types.get(targetId);
8638
+ }
8639
+ isSourceId(handlerId) {
8640
+ const role = parseRoleFromHandlerId(handlerId);
8641
+ return role === HandlerRole.SOURCE;
8642
+ }
8643
+ isTargetId(handlerId) {
8644
+ const role = parseRoleFromHandlerId(handlerId);
8645
+ return role === HandlerRole.TARGET;
8646
+ }
8647
+ removeSource(sourceId) {
8648
+ invariant(this.getSource(sourceId), 'Expected an existing source.');
8649
+ this.store.dispatch(removeSource(sourceId));
8650
+ asap(()=>{
8651
+ this.dragSources.delete(sourceId);
8652
+ this.types.delete(sourceId);
8653
+ });
8654
+ }
8655
+ removeTarget(targetId) {
8656
+ invariant(this.getTarget(targetId), 'Expected an existing target.');
8657
+ this.store.dispatch(removeTarget(targetId));
8658
+ this.dropTargets.delete(targetId);
8659
+ this.types.delete(targetId);
8660
+ }
8661
+ pinSource(sourceId) {
8662
+ const source = this.getSource(sourceId);
8663
+ invariant(source, 'Expected an existing source.');
8664
+ this.pinnedSourceId = sourceId;
8665
+ this.pinnedSource = source;
8666
+ }
8667
+ unpinSource() {
8668
+ invariant(this.pinnedSource, 'No source is pinned at the time.');
8669
+ this.pinnedSourceId = null;
8670
+ this.pinnedSource = null;
8671
+ }
8672
+ addHandler(role, type, handler) {
8673
+ const id = getNextHandlerId(role);
8674
+ this.types.set(id, type);
8675
+ if (role === HandlerRole.SOURCE) {
8676
+ this.dragSources.set(id, handler);
8677
+ } else if (role === HandlerRole.TARGET) {
8678
+ this.dropTargets.set(id, handler);
8679
+ }
8680
+ return id;
8681
+ }
8682
+ constructor(store){
8683
+ this.types = new Map();
8684
+ this.dragSources = new Map();
8685
+ this.dropTargets = new Map();
8686
+ this.pinnedSourceId = null;
8687
+ this.pinnedSource = null;
8688
+ this.store = store;
8689
+ }
8690
+ }
8691
+
8692
+ const strictEquality = (a, b)=>a === b
8693
+ ;
8694
+ /**
8695
+ * Determine if two cartesian coordinate offsets are equal
8696
+ * @param offsetA
8697
+ * @param offsetB
8698
+ */ function areCoordsEqual(offsetA, offsetB) {
8699
+ if (!offsetA && !offsetB) {
8700
+ return true;
8701
+ } else if (!offsetA || !offsetB) {
8702
+ return false;
8703
+ } else {
8704
+ return offsetA.x === offsetB.x && offsetA.y === offsetB.y;
8705
+ }
8706
+ }
8707
+ /**
8708
+ * Determines if two arrays of items are equal
8709
+ * @param a The first array of items
8710
+ * @param b The second array of items
8711
+ */ function areArraysEqual(a, b, isEqual = strictEquality) {
8712
+ if (a.length !== b.length) {
8713
+ return false;
8714
+ }
8715
+ for(let i = 0; i < a.length; ++i){
8716
+ if (!isEqual(a[i], b[i])) {
8717
+ return false;
8718
+ }
8719
+ }
8720
+ return true;
8721
+ }
8722
+
8723
+ function reduce$5(// eslint-disable-next-line @typescript-eslint/no-unused-vars
8724
+ _state = NONE, action) {
8725
+ switch(action.type){
8726
+ case HOVER:
8727
+ break;
8728
+ case ADD_SOURCE:
8729
+ case ADD_TARGET:
8730
+ case REMOVE_TARGET:
8731
+ case REMOVE_SOURCE:
8732
+ return NONE;
8733
+ case BEGIN_DRAG:
8734
+ case PUBLISH_DRAG_SOURCE:
8735
+ case END_DRAG:
8736
+ case DROP:
8737
+ default:
8738
+ return ALL;
8739
+ }
8740
+ const { targetIds =[] , prevTargetIds =[] } = action.payload;
8741
+ const result = xor(targetIds, prevTargetIds);
8742
+ const didChange = result.length > 0 || !areArraysEqual(targetIds, prevTargetIds);
8743
+ if (!didChange) {
8744
+ return NONE;
8745
+ }
8746
+ // Check the target ids at the innermost position. If they are valid, add them
8747
+ // to the result
8748
+ const prevInnermostTargetId = prevTargetIds[prevTargetIds.length - 1];
8749
+ const innermostTargetId = targetIds[targetIds.length - 1];
8750
+ if (prevInnermostTargetId !== innermostTargetId) {
8751
+ if (prevInnermostTargetId) {
8752
+ result.push(prevInnermostTargetId);
8753
+ }
8754
+ if (innermostTargetId) {
8755
+ result.push(innermostTargetId);
8756
+ }
8757
+ }
8758
+ return result;
8759
+ }
8760
+
8761
+ function _defineProperty$5(obj, key, value) {
8762
+ if (key in obj) {
8763
+ Object.defineProperty(obj, key, {
8764
+ value: value,
8765
+ enumerable: true,
8766
+ configurable: true,
8767
+ writable: true
8768
+ });
8769
+ } else {
8770
+ obj[key] = value;
8771
+ }
8772
+ return obj;
8773
+ }
8774
+ function _objectSpread$3(target) {
8775
+ for(var i = 1; i < arguments.length; i++){
8776
+ var source = arguments[i] != null ? arguments[i] : {};
8777
+ var ownKeys = Object.keys(source);
8778
+ if (typeof Object.getOwnPropertySymbols === 'function') {
8779
+ ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
8780
+ return Object.getOwnPropertyDescriptor(source, sym).enumerable;
8781
+ }));
8782
+ }
8783
+ ownKeys.forEach(function(key) {
8784
+ _defineProperty$5(target, key, source[key]);
8785
+ });
8786
+ }
8787
+ return target;
8788
+ }
8789
+ const initialState$3 = {
8790
+ initialSourceClientOffset: null,
8791
+ initialClientOffset: null,
8792
+ clientOffset: null
8793
+ };
8794
+ function reduce$4(state = initialState$3, action) {
8795
+ const { payload } = action;
8796
+ switch(action.type){
8797
+ case INIT_COORDS:
8798
+ case BEGIN_DRAG:
8799
+ return {
8800
+ initialSourceClientOffset: payload.sourceClientOffset,
8801
+ initialClientOffset: payload.clientOffset,
8802
+ clientOffset: payload.clientOffset
8803
+ };
8804
+ case HOVER:
8805
+ if (areCoordsEqual(state.clientOffset, payload.clientOffset)) {
8806
+ return state;
8807
+ }
8808
+ return _objectSpread$3({}, state, {
8809
+ clientOffset: payload.clientOffset
8810
+ });
8811
+ case END_DRAG:
8812
+ case DROP:
8813
+ return initialState$3;
8814
+ default:
8815
+ return state;
8816
+ }
8817
+ }
8818
+
8819
+ function _defineProperty$4(obj, key, value) {
8820
+ if (key in obj) {
8821
+ Object.defineProperty(obj, key, {
8822
+ value: value,
8823
+ enumerable: true,
8824
+ configurable: true,
8825
+ writable: true
8826
+ });
8827
+ } else {
8828
+ obj[key] = value;
8829
+ }
8830
+ return obj;
8831
+ }
8832
+ function _objectSpread$2(target) {
8833
+ for(var i = 1; i < arguments.length; i++){
8834
+ var source = arguments[i] != null ? arguments[i] : {};
8835
+ var ownKeys = Object.keys(source);
8836
+ if (typeof Object.getOwnPropertySymbols === 'function') {
8837
+ ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
8838
+ return Object.getOwnPropertyDescriptor(source, sym).enumerable;
8839
+ }));
8840
+ }
8841
+ ownKeys.forEach(function(key) {
8842
+ _defineProperty$4(target, key, source[key]);
8843
+ });
8844
+ }
8845
+ return target;
8846
+ }
8847
+ const initialState$2 = {
8848
+ itemType: null,
8849
+ item: null,
8850
+ sourceId: null,
8851
+ targetIds: [],
8852
+ dropResult: null,
8853
+ didDrop: false,
8854
+ isSourcePublic: null
8855
+ };
8856
+ function reduce$3(state = initialState$2, action) {
8857
+ const { payload } = action;
8858
+ switch(action.type){
8859
+ case BEGIN_DRAG:
8860
+ return _objectSpread$2({}, state, {
8861
+ itemType: payload.itemType,
8862
+ item: payload.item,
8863
+ sourceId: payload.sourceId,
8864
+ isSourcePublic: payload.isSourcePublic,
8865
+ dropResult: null,
8866
+ didDrop: false
8867
+ });
8868
+ case PUBLISH_DRAG_SOURCE:
8869
+ return _objectSpread$2({}, state, {
8870
+ isSourcePublic: true
8871
+ });
8872
+ case HOVER:
8873
+ return _objectSpread$2({}, state, {
8874
+ targetIds: payload.targetIds
8875
+ });
8876
+ case REMOVE_TARGET:
8877
+ if (state.targetIds.indexOf(payload.targetId) === -1) {
8878
+ return state;
8879
+ }
8880
+ return _objectSpread$2({}, state, {
8881
+ targetIds: without$1(state.targetIds, payload.targetId)
8882
+ });
8883
+ case DROP:
8884
+ return _objectSpread$2({}, state, {
8885
+ dropResult: payload.dropResult,
8886
+ didDrop: true,
8887
+ targetIds: []
8888
+ });
8889
+ case END_DRAG:
8890
+ return _objectSpread$2({}, state, {
8891
+ itemType: null,
8892
+ item: null,
8893
+ sourceId: null,
8894
+ dropResult: null,
8895
+ didDrop: false,
8896
+ isSourcePublic: null,
8897
+ targetIds: []
8898
+ });
8899
+ default:
8900
+ return state;
8901
+ }
8902
+ }
8903
+
8904
+ function reduce$2(state = 0, action) {
8905
+ switch(action.type){
8906
+ case ADD_SOURCE:
8907
+ case ADD_TARGET:
8908
+ return state + 1;
8909
+ case REMOVE_SOURCE:
8910
+ case REMOVE_TARGET:
8911
+ return state - 1;
8912
+ default:
8913
+ return state;
8914
+ }
8915
+ }
8916
+
8917
+ function reduce$1(state = 0) {
8918
+ return state + 1;
8919
+ }
8920
+
8921
+ function _defineProperty$3(obj, key, value) {
8922
+ if (key in obj) {
8923
+ Object.defineProperty(obj, key, {
8924
+ value: value,
8925
+ enumerable: true,
8926
+ configurable: true,
8927
+ writable: true
8928
+ });
8929
+ } else {
8930
+ obj[key] = value;
8931
+ }
8932
+ return obj;
8933
+ }
8934
+ function _objectSpread$1(target) {
8935
+ for(var i = 1; i < arguments.length; i++){
8936
+ var source = arguments[i] != null ? arguments[i] : {};
8937
+ var ownKeys = Object.keys(source);
8938
+ if (typeof Object.getOwnPropertySymbols === 'function') {
8939
+ ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
8940
+ return Object.getOwnPropertyDescriptor(source, sym).enumerable;
8941
+ }));
8942
+ }
8943
+ ownKeys.forEach(function(key) {
8944
+ _defineProperty$3(target, key, source[key]);
8945
+ });
8946
+ }
8947
+ return target;
8948
+ }
8949
+ function reduce(state = {}, action) {
8950
+ return {
8951
+ dirtyHandlerIds: reduce$5(state.dirtyHandlerIds, {
8952
+ type: action.type,
8953
+ payload: _objectSpread$1({}, action.payload, {
8954
+ prevTargetIds: get(state, 'dragOperation.targetIds', [])
8955
+ })
8956
+ }),
8957
+ dragOffset: reduce$4(state.dragOffset, action),
8958
+ refCount: reduce$2(state.refCount, action),
8959
+ dragOperation: reduce$3(state.dragOperation, action),
8960
+ stateId: reduce$1(state.stateId)
8961
+ };
8962
+ }
8963
+
8964
+ function createDragDropManager(backendFactory, globalContext = undefined, backendOptions = {}, debugMode = false) {
8965
+ const store = makeStoreInstance(debugMode);
8966
+ const monitor = new DragDropMonitorImpl(store, new HandlerRegistryImpl(store));
8967
+ const manager = new DragDropManagerImpl(store, monitor);
8968
+ const backend = backendFactory(manager, globalContext, backendOptions);
8969
+ manager.receiveBackend(backend);
8970
+ return manager;
8971
+ }
8972
+ function makeStoreInstance(debugMode) {
8973
+ // TODO: if we ever make a react-native version of this,
8974
+ // we'll need to consider how to pull off dev-tooling
8975
+ const reduxDevTools = typeof window !== 'undefined' && window.__REDUX_DEVTOOLS_EXTENSION__;
8976
+ return createStore(reduce, debugMode && reduxDevTools && reduxDevTools({
8977
+ name: 'dnd-core',
8978
+ instanceId: 'dnd-core'
8979
+ }));
8980
+ }
8981
+
8982
+ function _objectWithoutProperties(source, excluded) {
8983
+ if (source == null) return {};
8984
+ var target = _objectWithoutPropertiesLoose(source, excluded);
8985
+ var key, i;
8986
+ if (Object.getOwnPropertySymbols) {
8987
+ var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
8988
+ for(i = 0; i < sourceSymbolKeys.length; i++){
8989
+ key = sourceSymbolKeys[i];
8990
+ if (excluded.indexOf(key) >= 0) continue;
8991
+ if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
8992
+ target[key] = source[key];
8993
+ }
8994
+ }
8995
+ return target;
8996
+ }
8997
+ function _objectWithoutPropertiesLoose(source, excluded) {
8998
+ if (source == null) return {};
8999
+ var target = {};
9000
+ var sourceKeys = Object.keys(source);
9001
+ var key, i;
9002
+ for(i = 0; i < sourceKeys.length; i++){
9003
+ key = sourceKeys[i];
9004
+ if (excluded.indexOf(key) >= 0) continue;
9005
+ target[key] = source[key];
9006
+ }
9007
+ return target;
9008
+ }
9009
+ let refCount = 0;
9010
+ const INSTANCE_SYM = Symbol.for('__REACT_DND_CONTEXT_INSTANCE__');
9011
+ var DndProvider = /*#__PURE__*/ memo(function DndProvider(_param) {
9012
+ var { children } = _param, props = _objectWithoutProperties(_param, [
9013
+ "children"
9014
+ ]);
9015
+ const [manager, isGlobalInstance] = getDndContextValue(props) // memoized from props
9016
+ ;
9017
+ /**
9018
+ * If the global context was used to store the DND context
9019
+ * then where theres no more references to it we should
9020
+ * clean it up to avoid memory leaks
9021
+ */ useEffect(()=>{
9022
+ if (isGlobalInstance) {
9023
+ const context = getGlobalContext();
9024
+ ++refCount;
9025
+ return ()=>{
9026
+ if (--refCount === 0) {
9027
+ context[INSTANCE_SYM] = null;
9028
+ }
9029
+ };
9030
+ }
9031
+ return;
9032
+ }, []);
9033
+ return /*#__PURE__*/ jsx(DndContext.Provider, {
9034
+ value: manager,
9035
+ children: children
9036
+ });
7625
9037
  });
9038
+ function getDndContextValue(props) {
9039
+ if ('manager' in props) {
9040
+ const manager = {
9041
+ dragDropManager: props.manager
9042
+ };
9043
+ return [
9044
+ manager,
9045
+ false
9046
+ ];
9047
+ }
9048
+ const manager = createSingletonDndContext(props.backend, props.context, props.options, props.debugMode);
9049
+ const isGlobalInstance = !props.context;
9050
+ return [
9051
+ manager,
9052
+ isGlobalInstance
9053
+ ];
9054
+ }
9055
+ function createSingletonDndContext(backend, context = getGlobalContext(), options, debugMode) {
9056
+ const ctx = context;
9057
+ if (!ctx[INSTANCE_SYM]) {
9058
+ ctx[INSTANCE_SYM] = {
9059
+ dragDropManager: createDragDropManager(backend, context, options, debugMode)
9060
+ };
9061
+ }
9062
+ return ctx[INSTANCE_SYM];
9063
+ }
9064
+ function getGlobalContext() {
9065
+ return typeof global !== 'undefined' ? global : window;
9066
+ }
7626
9067
 
7627
9068
  // do not edit .js files directly - edit src/index.jst
7628
9069
 
@@ -8560,6 +10001,1368 @@ function useRegisteredDropTarget(spec, monitor, connector) {
8560
10001
  ];
8561
10002
  }
8562
10003
 
10004
+ // cheap lodash replacements
10005
+ function memoize(fn) {
10006
+ let result = null;
10007
+ const memoized = ()=>{
10008
+ if (result == null) {
10009
+ result = fn();
10010
+ }
10011
+ return result;
10012
+ };
10013
+ return memoized;
10014
+ }
10015
+ /**
10016
+ * drop-in replacement for _.without
10017
+ */ function without(items, item) {
10018
+ return items.filter((i)=>i !== item
10019
+ );
10020
+ }
10021
+ function union(itemsA, itemsB) {
10022
+ const set = new Set();
10023
+ const insertItem = (item)=>set.add(item)
10024
+ ;
10025
+ itemsA.forEach(insertItem);
10026
+ itemsB.forEach(insertItem);
10027
+ const result = [];
10028
+ set.forEach((key)=>result.push(key)
10029
+ );
10030
+ return result;
10031
+ }
10032
+
10033
+ class EnterLeaveCounter {
10034
+ enter(enteringNode) {
10035
+ const previousLength = this.entered.length;
10036
+ const isNodeEntered = (node)=>this.isNodeInDocument(node) && (!node.contains || node.contains(enteringNode))
10037
+ ;
10038
+ this.entered = union(this.entered.filter(isNodeEntered), [
10039
+ enteringNode
10040
+ ]);
10041
+ return previousLength === 0 && this.entered.length > 0;
10042
+ }
10043
+ leave(leavingNode) {
10044
+ const previousLength = this.entered.length;
10045
+ this.entered = without(this.entered.filter(this.isNodeInDocument), leavingNode);
10046
+ return previousLength > 0 && this.entered.length === 0;
10047
+ }
10048
+ reset() {
10049
+ this.entered = [];
10050
+ }
10051
+ constructor(isNodeInDocument){
10052
+ this.entered = [];
10053
+ this.isNodeInDocument = isNodeInDocument;
10054
+ }
10055
+ }
10056
+
10057
+ class NativeDragSource {
10058
+ initializeExposedProperties() {
10059
+ Object.keys(this.config.exposeProperties).forEach((property)=>{
10060
+ Object.defineProperty(this.item, property, {
10061
+ configurable: true,
10062
+ enumerable: true,
10063
+ get () {
10064
+ // eslint-disable-next-line no-console
10065
+ console.warn(`Browser doesn't allow reading "${property}" until the drop event.`);
10066
+ return null;
10067
+ }
10068
+ });
10069
+ });
10070
+ }
10071
+ loadDataTransfer(dataTransfer) {
10072
+ if (dataTransfer) {
10073
+ const newProperties = {};
10074
+ Object.keys(this.config.exposeProperties).forEach((property)=>{
10075
+ const propertyFn = this.config.exposeProperties[property];
10076
+ if (propertyFn != null) {
10077
+ newProperties[property] = {
10078
+ value: propertyFn(dataTransfer, this.config.matchesTypes),
10079
+ configurable: true,
10080
+ enumerable: true
10081
+ };
10082
+ }
10083
+ });
10084
+ Object.defineProperties(this.item, newProperties);
10085
+ }
10086
+ }
10087
+ canDrag() {
10088
+ return true;
10089
+ }
10090
+ beginDrag() {
10091
+ return this.item;
10092
+ }
10093
+ isDragging(monitor, handle) {
10094
+ return handle === monitor.getSourceId();
10095
+ }
10096
+ endDrag() {
10097
+ // empty
10098
+ }
10099
+ constructor(config){
10100
+ this.config = config;
10101
+ this.item = {};
10102
+ this.initializeExposedProperties();
10103
+ }
10104
+ }
10105
+
10106
+ const FILE = '__NATIVE_FILE__';
10107
+ const URL = '__NATIVE_URL__';
10108
+ const TEXT = '__NATIVE_TEXT__';
10109
+ const HTML = '__NATIVE_HTML__';
10110
+
10111
+ var NativeTypes = /*#__PURE__*/Object.freeze({
10112
+ __proto__: null,
10113
+ FILE: FILE,
10114
+ URL: URL,
10115
+ TEXT: TEXT,
10116
+ HTML: HTML
10117
+ });
10118
+
10119
+ function getDataFromDataTransfer(dataTransfer, typesToTry, defaultValue) {
10120
+ const result = typesToTry.reduce((resultSoFar, typeToTry)=>resultSoFar || dataTransfer.getData(typeToTry)
10121
+ , '');
10122
+ return result != null ? result : defaultValue;
10123
+ }
10124
+
10125
+ const nativeTypesConfig = {
10126
+ [FILE]: {
10127
+ exposeProperties: {
10128
+ files: (dataTransfer)=>Array.prototype.slice.call(dataTransfer.files)
10129
+ ,
10130
+ items: (dataTransfer)=>dataTransfer.items
10131
+ ,
10132
+ dataTransfer: (dataTransfer)=>dataTransfer
10133
+ },
10134
+ matchesTypes: [
10135
+ 'Files'
10136
+ ]
10137
+ },
10138
+ [HTML]: {
10139
+ exposeProperties: {
10140
+ html: (dataTransfer, matchesTypes)=>getDataFromDataTransfer(dataTransfer, matchesTypes, '')
10141
+ ,
10142
+ dataTransfer: (dataTransfer)=>dataTransfer
10143
+ },
10144
+ matchesTypes: [
10145
+ 'Html',
10146
+ 'text/html'
10147
+ ]
10148
+ },
10149
+ [URL]: {
10150
+ exposeProperties: {
10151
+ urls: (dataTransfer, matchesTypes)=>getDataFromDataTransfer(dataTransfer, matchesTypes, '').split('\n')
10152
+ ,
10153
+ dataTransfer: (dataTransfer)=>dataTransfer
10154
+ },
10155
+ matchesTypes: [
10156
+ 'Url',
10157
+ 'text/uri-list'
10158
+ ]
10159
+ },
10160
+ [TEXT]: {
10161
+ exposeProperties: {
10162
+ text: (dataTransfer, matchesTypes)=>getDataFromDataTransfer(dataTransfer, matchesTypes, '')
10163
+ ,
10164
+ dataTransfer: (dataTransfer)=>dataTransfer
10165
+ },
10166
+ matchesTypes: [
10167
+ 'Text',
10168
+ 'text/plain'
10169
+ ]
10170
+ }
10171
+ };
10172
+
10173
+ function createNativeDragSource(type, dataTransfer) {
10174
+ const config = nativeTypesConfig[type];
10175
+ if (!config) {
10176
+ throw new Error(`native type ${type} has no configuration`);
10177
+ }
10178
+ const result = new NativeDragSource(config);
10179
+ result.loadDataTransfer(dataTransfer);
10180
+ return result;
10181
+ }
10182
+ function matchNativeItemType(dataTransfer) {
10183
+ if (!dataTransfer) {
10184
+ return null;
10185
+ }
10186
+ const dataTransferTypes = Array.prototype.slice.call(dataTransfer.types || []);
10187
+ return Object.keys(nativeTypesConfig).filter((nativeItemType)=>{
10188
+ const typeConfig = nativeTypesConfig[nativeItemType];
10189
+ if (!(typeConfig === null || typeConfig === void 0 ? void 0 : typeConfig.matchesTypes)) {
10190
+ return false;
10191
+ }
10192
+ return typeConfig.matchesTypes.some((t)=>dataTransferTypes.indexOf(t) > -1
10193
+ );
10194
+ })[0] || null;
10195
+ }
10196
+
10197
+ const isFirefox = memoize(()=>/firefox/i.test(navigator.userAgent)
10198
+ );
10199
+ const isSafari = memoize(()=>Boolean(window.safari)
10200
+ );
10201
+
10202
+ class MonotonicInterpolant {
10203
+ interpolate(x) {
10204
+ const { xs , ys , c1s , c2s , c3s } = this;
10205
+ // The rightmost point in the dataset should give an exact result
10206
+ let i = xs.length - 1;
10207
+ if (x === xs[i]) {
10208
+ return ys[i];
10209
+ }
10210
+ // Search for the interval x is in, returning the corresponding y if x is one of the original xs
10211
+ let low = 0;
10212
+ let high = c3s.length - 1;
10213
+ let mid;
10214
+ while(low <= high){
10215
+ mid = Math.floor(0.5 * (low + high));
10216
+ const xHere = xs[mid];
10217
+ if (xHere < x) {
10218
+ low = mid + 1;
10219
+ } else if (xHere > x) {
10220
+ high = mid - 1;
10221
+ } else {
10222
+ return ys[mid];
10223
+ }
10224
+ }
10225
+ i = Math.max(0, high);
10226
+ // Interpolate
10227
+ const diff = x - xs[i];
10228
+ const diffSq = diff * diff;
10229
+ return ys[i] + c1s[i] * diff + c2s[i] * diffSq + c3s[i] * diff * diffSq;
10230
+ }
10231
+ constructor(xs, ys){
10232
+ const { length } = xs;
10233
+ // Rearrange xs and ys so that xs is sorted
10234
+ const indexes = [];
10235
+ for(let i = 0; i < length; i++){
10236
+ indexes.push(i);
10237
+ }
10238
+ indexes.sort((a, b)=>xs[a] < xs[b] ? -1 : 1
10239
+ );
10240
+ const dxs = [];
10241
+ const ms = [];
10242
+ let dx;
10243
+ let dy;
10244
+ for(let i1 = 0; i1 < length - 1; i1++){
10245
+ dx = xs[i1 + 1] - xs[i1];
10246
+ dy = ys[i1 + 1] - ys[i1];
10247
+ dxs.push(dx);
10248
+ ms.push(dy / dx);
10249
+ }
10250
+ // Get degree-1 coefficients
10251
+ const c1s = [
10252
+ ms[0]
10253
+ ];
10254
+ for(let i2 = 0; i2 < dxs.length - 1; i2++){
10255
+ const m2 = ms[i2];
10256
+ const mNext = ms[i2 + 1];
10257
+ if (m2 * mNext <= 0) {
10258
+ c1s.push(0);
10259
+ } else {
10260
+ dx = dxs[i2];
10261
+ const dxNext = dxs[i2 + 1];
10262
+ const common = dx + dxNext;
10263
+ c1s.push(3 * common / ((common + dxNext) / m2 + (common + dx) / mNext));
10264
+ }
10265
+ }
10266
+ c1s.push(ms[ms.length - 1]);
10267
+ // Get degree-2 and degree-3 coefficients
10268
+ const c2s = [];
10269
+ const c3s = [];
10270
+ let m;
10271
+ for(let i3 = 0; i3 < c1s.length - 1; i3++){
10272
+ m = ms[i3];
10273
+ const c1 = c1s[i3];
10274
+ const invDx = 1 / dxs[i3];
10275
+ const common = c1 + c1s[i3 + 1] - m - m;
10276
+ c2s.push((m - c1 - common) * invDx);
10277
+ c3s.push(common * invDx * invDx);
10278
+ }
10279
+ this.xs = xs;
10280
+ this.ys = ys;
10281
+ this.c1s = c1s;
10282
+ this.c2s = c2s;
10283
+ this.c3s = c3s;
10284
+ }
10285
+ }
10286
+
10287
+ const ELEMENT_NODE = 1;
10288
+ function getNodeClientOffset(node) {
10289
+ const el = node.nodeType === ELEMENT_NODE ? node : node.parentElement;
10290
+ if (!el) {
10291
+ return null;
10292
+ }
10293
+ const { top , left } = el.getBoundingClientRect();
10294
+ return {
10295
+ x: left,
10296
+ y: top
10297
+ };
10298
+ }
10299
+ function getEventClientOffset(e) {
10300
+ return {
10301
+ x: e.clientX,
10302
+ y: e.clientY
10303
+ };
10304
+ }
10305
+ function isImageNode(node) {
10306
+ var ref;
10307
+ return node.nodeName === 'IMG' && (isFirefox() || !((ref = document.documentElement) === null || ref === void 0 ? void 0 : ref.contains(node)));
10308
+ }
10309
+ function getDragPreviewSize(isImage, dragPreview, sourceWidth, sourceHeight) {
10310
+ let dragPreviewWidth = isImage ? dragPreview.width : sourceWidth;
10311
+ let dragPreviewHeight = isImage ? dragPreview.height : sourceHeight;
10312
+ // Work around @2x coordinate discrepancies in browsers
10313
+ if (isSafari() && isImage) {
10314
+ dragPreviewHeight /= window.devicePixelRatio;
10315
+ dragPreviewWidth /= window.devicePixelRatio;
10316
+ }
10317
+ return {
10318
+ dragPreviewWidth,
10319
+ dragPreviewHeight
10320
+ };
10321
+ }
10322
+ function getDragPreviewOffset(sourceNode, dragPreview, clientOffset, anchorPoint, offsetPoint) {
10323
+ // The browsers will use the image intrinsic size under different conditions.
10324
+ // Firefox only cares if it's an image, but WebKit also wants it to be detached.
10325
+ const isImage = isImageNode(dragPreview);
10326
+ const dragPreviewNode = isImage ? sourceNode : dragPreview;
10327
+ const dragPreviewNodeOffsetFromClient = getNodeClientOffset(dragPreviewNode);
10328
+ const offsetFromDragPreview = {
10329
+ x: clientOffset.x - dragPreviewNodeOffsetFromClient.x,
10330
+ y: clientOffset.y - dragPreviewNodeOffsetFromClient.y
10331
+ };
10332
+ const { offsetWidth: sourceWidth , offsetHeight: sourceHeight } = sourceNode;
10333
+ const { anchorX , anchorY } = anchorPoint;
10334
+ const { dragPreviewWidth , dragPreviewHeight } = getDragPreviewSize(isImage, dragPreview, sourceWidth, sourceHeight);
10335
+ const calculateYOffset = ()=>{
10336
+ const interpolantY = new MonotonicInterpolant([
10337
+ 0,
10338
+ 0.5,
10339
+ 1
10340
+ ], [
10341
+ // Dock to the top
10342
+ offsetFromDragPreview.y,
10343
+ // Align at the center
10344
+ (offsetFromDragPreview.y / sourceHeight) * dragPreviewHeight,
10345
+ // Dock to the bottom
10346
+ offsetFromDragPreview.y + dragPreviewHeight - sourceHeight,
10347
+ ]);
10348
+ let y = interpolantY.interpolate(anchorY);
10349
+ // Work around Safari 8 positioning bug
10350
+ if (isSafari() && isImage) {
10351
+ // We'll have to wait for @3x to see if this is entirely correct
10352
+ y += (window.devicePixelRatio - 1) * dragPreviewHeight;
10353
+ }
10354
+ return y;
10355
+ };
10356
+ const calculateXOffset = ()=>{
10357
+ // Interpolate coordinates depending on anchor point
10358
+ // If you know a simpler way to do this, let me know
10359
+ const interpolantX = new MonotonicInterpolant([
10360
+ 0,
10361
+ 0.5,
10362
+ 1
10363
+ ], [
10364
+ // Dock to the left
10365
+ offsetFromDragPreview.x,
10366
+ // Align at the center
10367
+ (offsetFromDragPreview.x / sourceWidth) * dragPreviewWidth,
10368
+ // Dock to the right
10369
+ offsetFromDragPreview.x + dragPreviewWidth - sourceWidth,
10370
+ ]);
10371
+ return interpolantX.interpolate(anchorX);
10372
+ };
10373
+ // Force offsets if specified in the options.
10374
+ const { offsetX , offsetY } = offsetPoint;
10375
+ const isManualOffsetX = offsetX === 0 || offsetX;
10376
+ const isManualOffsetY = offsetY === 0 || offsetY;
10377
+ return {
10378
+ x: isManualOffsetX ? offsetX : calculateXOffset(),
10379
+ y: isManualOffsetY ? offsetY : calculateYOffset()
10380
+ };
10381
+ }
10382
+
10383
+ class OptionsReader {
10384
+ get window() {
10385
+ if (this.globalContext) {
10386
+ return this.globalContext;
10387
+ } else if (typeof window !== 'undefined') {
10388
+ return window;
10389
+ }
10390
+ return undefined;
10391
+ }
10392
+ get document() {
10393
+ var ref;
10394
+ if ((ref = this.globalContext) === null || ref === void 0 ? void 0 : ref.document) {
10395
+ return this.globalContext.document;
10396
+ } else if (this.window) {
10397
+ return this.window.document;
10398
+ } else {
10399
+ return undefined;
10400
+ }
10401
+ }
10402
+ get rootElement() {
10403
+ var ref;
10404
+ return ((ref = this.optionsArgs) === null || ref === void 0 ? void 0 : ref.rootElement) || this.window;
10405
+ }
10406
+ constructor(globalContext, options){
10407
+ this.ownerDocument = null;
10408
+ this.globalContext = globalContext;
10409
+ this.optionsArgs = options;
10410
+ }
10411
+ }
10412
+
10413
+ function _defineProperty$2(obj, key, value) {
10414
+ if (key in obj) {
10415
+ Object.defineProperty(obj, key, {
10416
+ value: value,
10417
+ enumerable: true,
10418
+ configurable: true,
10419
+ writable: true
10420
+ });
10421
+ } else {
10422
+ obj[key] = value;
10423
+ }
10424
+ return obj;
10425
+ }
10426
+ function _objectSpread(target) {
10427
+ for(var i = 1; i < arguments.length; i++){
10428
+ var source = arguments[i] != null ? arguments[i] : {};
10429
+ var ownKeys = Object.keys(source);
10430
+ if (typeof Object.getOwnPropertySymbols === 'function') {
10431
+ ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
10432
+ return Object.getOwnPropertyDescriptor(source, sym).enumerable;
10433
+ }));
10434
+ }
10435
+ ownKeys.forEach(function(key) {
10436
+ _defineProperty$2(target, key, source[key]);
10437
+ });
10438
+ }
10439
+ return target;
10440
+ }
10441
+ class HTML5BackendImpl {
10442
+ /**
10443
+ * Generate profiling statistics for the HTML5Backend.
10444
+ */ profile() {
10445
+ var ref, ref1;
10446
+ return {
10447
+ sourcePreviewNodes: this.sourcePreviewNodes.size,
10448
+ sourcePreviewNodeOptions: this.sourcePreviewNodeOptions.size,
10449
+ sourceNodeOptions: this.sourceNodeOptions.size,
10450
+ sourceNodes: this.sourceNodes.size,
10451
+ dragStartSourceIds: ((ref = this.dragStartSourceIds) === null || ref === void 0 ? void 0 : ref.length) || 0,
10452
+ dropTargetIds: this.dropTargetIds.length,
10453
+ dragEnterTargetIds: this.dragEnterTargetIds.length,
10454
+ dragOverTargetIds: ((ref1 = this.dragOverTargetIds) === null || ref1 === void 0 ? void 0 : ref1.length) || 0
10455
+ };
10456
+ }
10457
+ // public for test
10458
+ get window() {
10459
+ return this.options.window;
10460
+ }
10461
+ get document() {
10462
+ return this.options.document;
10463
+ }
10464
+ /**
10465
+ * Get the root element to use for event subscriptions
10466
+ */ get rootElement() {
10467
+ return this.options.rootElement;
10468
+ }
10469
+ setup() {
10470
+ const root = this.rootElement;
10471
+ if (root === undefined) {
10472
+ return;
10473
+ }
10474
+ if (root.__isReactDndBackendSetUp) {
10475
+ throw new Error('Cannot have two HTML5 backends at the same time.');
10476
+ }
10477
+ root.__isReactDndBackendSetUp = true;
10478
+ this.addEventListeners(root);
10479
+ }
10480
+ teardown() {
10481
+ const root = this.rootElement;
10482
+ if (root === undefined) {
10483
+ return;
10484
+ }
10485
+ root.__isReactDndBackendSetUp = false;
10486
+ this.removeEventListeners(this.rootElement);
10487
+ this.clearCurrentDragSourceNode();
10488
+ if (this.asyncEndDragFrameId) {
10489
+ var ref;
10490
+ (ref = this.window) === null || ref === void 0 ? void 0 : ref.cancelAnimationFrame(this.asyncEndDragFrameId);
10491
+ }
10492
+ }
10493
+ connectDragPreview(sourceId, node, options) {
10494
+ this.sourcePreviewNodeOptions.set(sourceId, options);
10495
+ this.sourcePreviewNodes.set(sourceId, node);
10496
+ return ()=>{
10497
+ this.sourcePreviewNodes.delete(sourceId);
10498
+ this.sourcePreviewNodeOptions.delete(sourceId);
10499
+ };
10500
+ }
10501
+ connectDragSource(sourceId, node, options) {
10502
+ this.sourceNodes.set(sourceId, node);
10503
+ this.sourceNodeOptions.set(sourceId, options);
10504
+ const handleDragStart = (e)=>this.handleDragStart(e, sourceId)
10505
+ ;
10506
+ const handleSelectStart = (e)=>this.handleSelectStart(e)
10507
+ ;
10508
+ node.setAttribute('draggable', 'true');
10509
+ node.addEventListener('dragstart', handleDragStart);
10510
+ node.addEventListener('selectstart', handleSelectStart);
10511
+ return ()=>{
10512
+ this.sourceNodes.delete(sourceId);
10513
+ this.sourceNodeOptions.delete(sourceId);
10514
+ node.removeEventListener('dragstart', handleDragStart);
10515
+ node.removeEventListener('selectstart', handleSelectStart);
10516
+ node.setAttribute('draggable', 'false');
10517
+ };
10518
+ }
10519
+ connectDropTarget(targetId, node) {
10520
+ const handleDragEnter = (e)=>this.handleDragEnter(e, targetId)
10521
+ ;
10522
+ const handleDragOver = (e)=>this.handleDragOver(e, targetId)
10523
+ ;
10524
+ const handleDrop = (e)=>this.handleDrop(e, targetId)
10525
+ ;
10526
+ node.addEventListener('dragenter', handleDragEnter);
10527
+ node.addEventListener('dragover', handleDragOver);
10528
+ node.addEventListener('drop', handleDrop);
10529
+ return ()=>{
10530
+ node.removeEventListener('dragenter', handleDragEnter);
10531
+ node.removeEventListener('dragover', handleDragOver);
10532
+ node.removeEventListener('drop', handleDrop);
10533
+ };
10534
+ }
10535
+ addEventListeners(target) {
10536
+ // SSR Fix (https://github.com/react-dnd/react-dnd/pull/813
10537
+ if (!target.addEventListener) {
10538
+ return;
10539
+ }
10540
+ target.addEventListener('dragstart', this.handleTopDragStart);
10541
+ target.addEventListener('dragstart', this.handleTopDragStartCapture, true);
10542
+ target.addEventListener('dragend', this.handleTopDragEndCapture, true);
10543
+ target.addEventListener('dragenter', this.handleTopDragEnter);
10544
+ target.addEventListener('dragenter', this.handleTopDragEnterCapture, true);
10545
+ target.addEventListener('dragleave', this.handleTopDragLeaveCapture, true);
10546
+ target.addEventListener('dragover', this.handleTopDragOver);
10547
+ target.addEventListener('dragover', this.handleTopDragOverCapture, true);
10548
+ target.addEventListener('drop', this.handleTopDrop);
10549
+ target.addEventListener('drop', this.handleTopDropCapture, true);
10550
+ }
10551
+ removeEventListeners(target) {
10552
+ // SSR Fix (https://github.com/react-dnd/react-dnd/pull/813
10553
+ if (!target.removeEventListener) {
10554
+ return;
10555
+ }
10556
+ target.removeEventListener('dragstart', this.handleTopDragStart);
10557
+ target.removeEventListener('dragstart', this.handleTopDragStartCapture, true);
10558
+ target.removeEventListener('dragend', this.handleTopDragEndCapture, true);
10559
+ target.removeEventListener('dragenter', this.handleTopDragEnter);
10560
+ target.removeEventListener('dragenter', this.handleTopDragEnterCapture, true);
10561
+ target.removeEventListener('dragleave', this.handleTopDragLeaveCapture, true);
10562
+ target.removeEventListener('dragover', this.handleTopDragOver);
10563
+ target.removeEventListener('dragover', this.handleTopDragOverCapture, true);
10564
+ target.removeEventListener('drop', this.handleTopDrop);
10565
+ target.removeEventListener('drop', this.handleTopDropCapture, true);
10566
+ }
10567
+ getCurrentSourceNodeOptions() {
10568
+ const sourceId = this.monitor.getSourceId();
10569
+ const sourceNodeOptions = this.sourceNodeOptions.get(sourceId);
10570
+ return _objectSpread({
10571
+ dropEffect: this.altKeyPressed ? 'copy' : 'move'
10572
+ }, sourceNodeOptions || {});
10573
+ }
10574
+ getCurrentDropEffect() {
10575
+ if (this.isDraggingNativeItem()) {
10576
+ // It makes more sense to default to 'copy' for native resources
10577
+ return 'copy';
10578
+ }
10579
+ return this.getCurrentSourceNodeOptions().dropEffect;
10580
+ }
10581
+ getCurrentSourcePreviewNodeOptions() {
10582
+ const sourceId = this.monitor.getSourceId();
10583
+ const sourcePreviewNodeOptions = this.sourcePreviewNodeOptions.get(sourceId);
10584
+ return _objectSpread({
10585
+ anchorX: 0.5,
10586
+ anchorY: 0.5,
10587
+ captureDraggingState: false
10588
+ }, sourcePreviewNodeOptions || {});
10589
+ }
10590
+ isDraggingNativeItem() {
10591
+ const itemType = this.monitor.getItemType();
10592
+ return Object.keys(NativeTypes).some((key)=>NativeTypes[key] === itemType
10593
+ );
10594
+ }
10595
+ beginDragNativeItem(type, dataTransfer) {
10596
+ this.clearCurrentDragSourceNode();
10597
+ this.currentNativeSource = createNativeDragSource(type, dataTransfer);
10598
+ this.currentNativeHandle = this.registry.addSource(type, this.currentNativeSource);
10599
+ this.actions.beginDrag([
10600
+ this.currentNativeHandle
10601
+ ]);
10602
+ }
10603
+ setCurrentDragSourceNode(node) {
10604
+ this.clearCurrentDragSourceNode();
10605
+ this.currentDragSourceNode = node;
10606
+ // A timeout of > 0 is necessary to resolve Firefox issue referenced
10607
+ // See:
10608
+ // * https://github.com/react-dnd/react-dnd/pull/928
10609
+ // * https://github.com/react-dnd/react-dnd/issues/869
10610
+ const MOUSE_MOVE_TIMEOUT = 1000;
10611
+ // Receiving a mouse event in the middle of a dragging operation
10612
+ // means it has ended and the drag source node disappeared from DOM,
10613
+ // so the browser didn't dispatch the dragend event.
10614
+ //
10615
+ // We need to wait before we start listening for mousemove events.
10616
+ // This is needed because the drag preview needs to be drawn or else it fires an 'mousemove' event
10617
+ // immediately in some browsers.
10618
+ //
10619
+ // See:
10620
+ // * https://github.com/react-dnd/react-dnd/pull/928
10621
+ // * https://github.com/react-dnd/react-dnd/issues/869
10622
+ //
10623
+ this.mouseMoveTimeoutTimer = setTimeout(()=>{
10624
+ var ref;
10625
+ return (ref = this.rootElement) === null || ref === void 0 ? void 0 : ref.addEventListener('mousemove', this.endDragIfSourceWasRemovedFromDOM, true);
10626
+ }, MOUSE_MOVE_TIMEOUT);
10627
+ }
10628
+ clearCurrentDragSourceNode() {
10629
+ if (this.currentDragSourceNode) {
10630
+ this.currentDragSourceNode = null;
10631
+ if (this.rootElement) {
10632
+ var ref;
10633
+ (ref = this.window) === null || ref === void 0 ? void 0 : ref.clearTimeout(this.mouseMoveTimeoutTimer || undefined);
10634
+ this.rootElement.removeEventListener('mousemove', this.endDragIfSourceWasRemovedFromDOM, true);
10635
+ }
10636
+ this.mouseMoveTimeoutTimer = null;
10637
+ return true;
10638
+ }
10639
+ return false;
10640
+ }
10641
+ handleDragStart(e, sourceId) {
10642
+ if (e.defaultPrevented) {
10643
+ return;
10644
+ }
10645
+ if (!this.dragStartSourceIds) {
10646
+ this.dragStartSourceIds = [];
10647
+ }
10648
+ this.dragStartSourceIds.unshift(sourceId);
10649
+ }
10650
+ handleDragEnter(_e, targetId) {
10651
+ this.dragEnterTargetIds.unshift(targetId);
10652
+ }
10653
+ handleDragOver(_e, targetId) {
10654
+ if (this.dragOverTargetIds === null) {
10655
+ this.dragOverTargetIds = [];
10656
+ }
10657
+ this.dragOverTargetIds.unshift(targetId);
10658
+ }
10659
+ handleDrop(_e, targetId) {
10660
+ this.dropTargetIds.unshift(targetId);
10661
+ }
10662
+ constructor(manager, globalContext, options){
10663
+ this.sourcePreviewNodes = new Map();
10664
+ this.sourcePreviewNodeOptions = new Map();
10665
+ this.sourceNodes = new Map();
10666
+ this.sourceNodeOptions = new Map();
10667
+ this.dragStartSourceIds = null;
10668
+ this.dropTargetIds = [];
10669
+ this.dragEnterTargetIds = [];
10670
+ this.currentNativeSource = null;
10671
+ this.currentNativeHandle = null;
10672
+ this.currentDragSourceNode = null;
10673
+ this.altKeyPressed = false;
10674
+ this.mouseMoveTimeoutTimer = null;
10675
+ this.asyncEndDragFrameId = null;
10676
+ this.dragOverTargetIds = null;
10677
+ this.lastClientOffset = null;
10678
+ this.hoverRafId = null;
10679
+ this.getSourceClientOffset = (sourceId)=>{
10680
+ const source = this.sourceNodes.get(sourceId);
10681
+ return source && getNodeClientOffset(source) || null;
10682
+ };
10683
+ this.endDragNativeItem = ()=>{
10684
+ if (!this.isDraggingNativeItem()) {
10685
+ return;
10686
+ }
10687
+ this.actions.endDrag();
10688
+ if (this.currentNativeHandle) {
10689
+ this.registry.removeSource(this.currentNativeHandle);
10690
+ }
10691
+ this.currentNativeHandle = null;
10692
+ this.currentNativeSource = null;
10693
+ };
10694
+ this.isNodeInDocument = (node)=>{
10695
+ // Check the node either in the main document or in the current context
10696
+ return Boolean(node && this.document && this.document.body && this.document.body.contains(node));
10697
+ };
10698
+ this.endDragIfSourceWasRemovedFromDOM = ()=>{
10699
+ const node = this.currentDragSourceNode;
10700
+ if (node == null || this.isNodeInDocument(node)) {
10701
+ return;
10702
+ }
10703
+ if (this.clearCurrentDragSourceNode() && this.monitor.isDragging()) {
10704
+ this.actions.endDrag();
10705
+ }
10706
+ this.cancelHover();
10707
+ };
10708
+ this.scheduleHover = (dragOverTargetIds)=>{
10709
+ if (this.hoverRafId === null && typeof requestAnimationFrame !== 'undefined') {
10710
+ this.hoverRafId = requestAnimationFrame(()=>{
10711
+ if (this.monitor.isDragging()) {
10712
+ this.actions.hover(dragOverTargetIds || [], {
10713
+ clientOffset: this.lastClientOffset
10714
+ });
10715
+ }
10716
+ this.hoverRafId = null;
10717
+ });
10718
+ }
10719
+ };
10720
+ this.cancelHover = ()=>{
10721
+ if (this.hoverRafId !== null && typeof cancelAnimationFrame !== 'undefined') {
10722
+ cancelAnimationFrame(this.hoverRafId);
10723
+ this.hoverRafId = null;
10724
+ }
10725
+ };
10726
+ this.handleTopDragStartCapture = ()=>{
10727
+ this.clearCurrentDragSourceNode();
10728
+ this.dragStartSourceIds = [];
10729
+ };
10730
+ this.handleTopDragStart = (e)=>{
10731
+ if (e.defaultPrevented) {
10732
+ return;
10733
+ }
10734
+ const { dragStartSourceIds } = this;
10735
+ this.dragStartSourceIds = null;
10736
+ const clientOffset = getEventClientOffset(e);
10737
+ // Avoid crashing if we missed a drop event or our previous drag died
10738
+ if (this.monitor.isDragging()) {
10739
+ this.actions.endDrag();
10740
+ this.cancelHover();
10741
+ }
10742
+ // Don't publish the source just yet (see why below)
10743
+ this.actions.beginDrag(dragStartSourceIds || [], {
10744
+ publishSource: false,
10745
+ getSourceClientOffset: this.getSourceClientOffset,
10746
+ clientOffset
10747
+ });
10748
+ const { dataTransfer } = e;
10749
+ const nativeType = matchNativeItemType(dataTransfer);
10750
+ if (this.monitor.isDragging()) {
10751
+ if (dataTransfer && typeof dataTransfer.setDragImage === 'function') {
10752
+ // Use custom drag image if user specifies it.
10753
+ // If child drag source refuses drag but parent agrees,
10754
+ // use parent's node as drag image. Neither works in IE though.
10755
+ const sourceId = this.monitor.getSourceId();
10756
+ const sourceNode = this.sourceNodes.get(sourceId);
10757
+ const dragPreview = this.sourcePreviewNodes.get(sourceId) || sourceNode;
10758
+ if (dragPreview) {
10759
+ const { anchorX , anchorY , offsetX , offsetY } = this.getCurrentSourcePreviewNodeOptions();
10760
+ const anchorPoint = {
10761
+ anchorX,
10762
+ anchorY
10763
+ };
10764
+ const offsetPoint = {
10765
+ offsetX,
10766
+ offsetY
10767
+ };
10768
+ const dragPreviewOffset = getDragPreviewOffset(sourceNode, dragPreview, clientOffset, anchorPoint, offsetPoint);
10769
+ dataTransfer.setDragImage(dragPreview, dragPreviewOffset.x, dragPreviewOffset.y);
10770
+ }
10771
+ }
10772
+ try {
10773
+ // Firefox won't drag without setting data
10774
+ dataTransfer === null || dataTransfer === void 0 ? void 0 : dataTransfer.setData('application/json', {});
10775
+ } catch (err) {
10776
+ // IE doesn't support MIME types in setData
10777
+ }
10778
+ // Store drag source node so we can check whether
10779
+ // it is removed from DOM and trigger endDrag manually.
10780
+ this.setCurrentDragSourceNode(e.target);
10781
+ // Now we are ready to publish the drag source.. or are we not?
10782
+ const { captureDraggingState } = this.getCurrentSourcePreviewNodeOptions();
10783
+ if (!captureDraggingState) {
10784
+ // Usually we want to publish it in the next tick so that browser
10785
+ // is able to screenshot the current (not yet dragging) state.
10786
+ //
10787
+ // It also neatly avoids a situation where render() returns null
10788
+ // in the same tick for the source element, and browser freaks out.
10789
+ setTimeout(()=>this.actions.publishDragSource()
10790
+ , 0);
10791
+ } else {
10792
+ // In some cases the user may want to override this behavior, e.g.
10793
+ // to work around IE not supporting custom drag previews.
10794
+ //
10795
+ // When using a custom drag layer, the only way to prevent
10796
+ // the default drag preview from drawing in IE is to screenshot
10797
+ // the dragging state in which the node itself has zero opacity
10798
+ // and height. In this case, though, returning null from render()
10799
+ // will abruptly end the dragging, which is not obvious.
10800
+ //
10801
+ // This is the reason such behavior is strictly opt-in.
10802
+ this.actions.publishDragSource();
10803
+ }
10804
+ } else if (nativeType) {
10805
+ // A native item (such as URL) dragged from inside the document
10806
+ this.beginDragNativeItem(nativeType);
10807
+ } else if (dataTransfer && !dataTransfer.types && (e.target && !e.target.hasAttribute || !e.target.hasAttribute('draggable'))) {
10808
+ // Looks like a Safari bug: dataTransfer.types is null, but there was no draggable.
10809
+ // Just let it drag. It's a native type (URL or text) and will be picked up in
10810
+ // dragenter handler.
10811
+ return;
10812
+ } else {
10813
+ // If by this time no drag source reacted, tell browser not to drag.
10814
+ e.preventDefault();
10815
+ }
10816
+ };
10817
+ this.handleTopDragEndCapture = ()=>{
10818
+ if (this.clearCurrentDragSourceNode() && this.monitor.isDragging()) {
10819
+ // Firefox can dispatch this event in an infinite loop
10820
+ // if dragend handler does something like showing an alert.
10821
+ // Only proceed if we have not handled it already.
10822
+ this.actions.endDrag();
10823
+ }
10824
+ this.cancelHover();
10825
+ };
10826
+ this.handleTopDragEnterCapture = (e)=>{
10827
+ this.dragEnterTargetIds = [];
10828
+ if (this.isDraggingNativeItem()) {
10829
+ var ref;
10830
+ (ref = this.currentNativeSource) === null || ref === void 0 ? void 0 : ref.loadDataTransfer(e.dataTransfer);
10831
+ }
10832
+ const isFirstEnter = this.enterLeaveCounter.enter(e.target);
10833
+ if (!isFirstEnter || this.monitor.isDragging()) {
10834
+ return;
10835
+ }
10836
+ const { dataTransfer } = e;
10837
+ const nativeType = matchNativeItemType(dataTransfer);
10838
+ if (nativeType) {
10839
+ // A native item (such as file or URL) dragged from outside the document
10840
+ this.beginDragNativeItem(nativeType, dataTransfer);
10841
+ }
10842
+ };
10843
+ this.handleTopDragEnter = (e)=>{
10844
+ const { dragEnterTargetIds } = this;
10845
+ this.dragEnterTargetIds = [];
10846
+ if (!this.monitor.isDragging()) {
10847
+ // This is probably a native item type we don't understand.
10848
+ return;
10849
+ }
10850
+ this.altKeyPressed = e.altKey;
10851
+ // If the target changes position as the result of `dragenter`, `dragover` might still
10852
+ // get dispatched despite target being no longer there. The easy solution is to check
10853
+ // whether there actually is a target before firing `hover`.
10854
+ if (dragEnterTargetIds.length > 0) {
10855
+ this.actions.hover(dragEnterTargetIds, {
10856
+ clientOffset: getEventClientOffset(e)
10857
+ });
10858
+ }
10859
+ const canDrop = dragEnterTargetIds.some((targetId)=>this.monitor.canDropOnTarget(targetId)
10860
+ );
10861
+ if (canDrop) {
10862
+ // IE requires this to fire dragover events
10863
+ e.preventDefault();
10864
+ if (e.dataTransfer) {
10865
+ e.dataTransfer.dropEffect = this.getCurrentDropEffect();
10866
+ }
10867
+ }
10868
+ };
10869
+ this.handleTopDragOverCapture = (e)=>{
10870
+ this.dragOverTargetIds = [];
10871
+ if (this.isDraggingNativeItem()) {
10872
+ var ref;
10873
+ (ref = this.currentNativeSource) === null || ref === void 0 ? void 0 : ref.loadDataTransfer(e.dataTransfer);
10874
+ }
10875
+ };
10876
+ this.handleTopDragOver = (e)=>{
10877
+ const { dragOverTargetIds } = this;
10878
+ this.dragOverTargetIds = [];
10879
+ if (!this.monitor.isDragging()) {
10880
+ // This is probably a native item type we don't understand.
10881
+ // Prevent default "drop and blow away the whole document" action.
10882
+ e.preventDefault();
10883
+ if (e.dataTransfer) {
10884
+ e.dataTransfer.dropEffect = 'none';
10885
+ }
10886
+ return;
10887
+ }
10888
+ this.altKeyPressed = e.altKey;
10889
+ this.lastClientOffset = getEventClientOffset(e);
10890
+ this.scheduleHover(dragOverTargetIds);
10891
+ const canDrop = (dragOverTargetIds || []).some((targetId)=>this.monitor.canDropOnTarget(targetId)
10892
+ );
10893
+ if (canDrop) {
10894
+ // Show user-specified drop effect.
10895
+ e.preventDefault();
10896
+ if (e.dataTransfer) {
10897
+ e.dataTransfer.dropEffect = this.getCurrentDropEffect();
10898
+ }
10899
+ } else if (this.isDraggingNativeItem()) {
10900
+ // Don't show a nice cursor but still prevent default
10901
+ // "drop and blow away the whole document" action.
10902
+ e.preventDefault();
10903
+ } else {
10904
+ e.preventDefault();
10905
+ if (e.dataTransfer) {
10906
+ e.dataTransfer.dropEffect = 'none';
10907
+ }
10908
+ }
10909
+ };
10910
+ this.handleTopDragLeaveCapture = (e)=>{
10911
+ if (this.isDraggingNativeItem()) {
10912
+ e.preventDefault();
10913
+ }
10914
+ const isLastLeave = this.enterLeaveCounter.leave(e.target);
10915
+ if (!isLastLeave) {
10916
+ return;
10917
+ }
10918
+ if (this.isDraggingNativeItem()) {
10919
+ setTimeout(()=>this.endDragNativeItem()
10920
+ , 0);
10921
+ }
10922
+ this.cancelHover();
10923
+ };
10924
+ this.handleTopDropCapture = (e)=>{
10925
+ this.dropTargetIds = [];
10926
+ if (this.isDraggingNativeItem()) {
10927
+ var ref;
10928
+ e.preventDefault();
10929
+ (ref = this.currentNativeSource) === null || ref === void 0 ? void 0 : ref.loadDataTransfer(e.dataTransfer);
10930
+ } else if (matchNativeItemType(e.dataTransfer)) {
10931
+ // Dragging some elements, like <a> and <img> may still behave like a native drag event,
10932
+ // even if the current drag event matches a user-defined type.
10933
+ // Stop the default behavior when we're not expecting a native item to be dropped.
10934
+ e.preventDefault();
10935
+ }
10936
+ this.enterLeaveCounter.reset();
10937
+ };
10938
+ this.handleTopDrop = (e)=>{
10939
+ const { dropTargetIds } = this;
10940
+ this.dropTargetIds = [];
10941
+ this.actions.hover(dropTargetIds, {
10942
+ clientOffset: getEventClientOffset(e)
10943
+ });
10944
+ this.actions.drop({
10945
+ dropEffect: this.getCurrentDropEffect()
10946
+ });
10947
+ if (this.isDraggingNativeItem()) {
10948
+ this.endDragNativeItem();
10949
+ } else if (this.monitor.isDragging()) {
10950
+ this.actions.endDrag();
10951
+ }
10952
+ this.cancelHover();
10953
+ };
10954
+ this.handleSelectStart = (e)=>{
10955
+ const target = e.target;
10956
+ // Only IE requires us to explicitly say
10957
+ // we want drag drop operation to start
10958
+ if (typeof target.dragDrop !== 'function') {
10959
+ return;
10960
+ }
10961
+ // Inputs and textareas should be selectable
10962
+ if (target.tagName === 'INPUT' || target.tagName === 'SELECT' || target.tagName === 'TEXTAREA' || target.isContentEditable) {
10963
+ return;
10964
+ }
10965
+ // For other targets, ask IE
10966
+ // to enable drag and drop
10967
+ e.preventDefault();
10968
+ target.dragDrop();
10969
+ };
10970
+ this.options = new OptionsReader(globalContext, options);
10971
+ this.actions = manager.getActions();
10972
+ this.monitor = manager.getMonitor();
10973
+ this.registry = manager.getRegistry();
10974
+ this.enterLeaveCounter = new EnterLeaveCounter(this.isNodeInDocument);
10975
+ }
10976
+ }
10977
+
10978
+ let emptyImage;
10979
+ function getEmptyImage() {
10980
+ if (!emptyImage) {
10981
+ emptyImage = new Image();
10982
+ emptyImage.src = 'data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==';
10983
+ }
10984
+ return emptyImage;
10985
+ }
10986
+
10987
+ const HTML5Backend = function createBackend(manager, context, options) {
10988
+ return new HTML5BackendImpl(manager, context, options);
10989
+ };
10990
+
10991
+ function _createForOfIteratorHelper(o, allowArrayLike) { var it; if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) { if (Array.isArray(o) || (it = _unsupportedIterableToArray$1(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = o[Symbol.iterator](); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
10992
+
10993
+ function _unsupportedIterableToArray$1(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray$1(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray$1(o, minLen); }
10994
+
10995
+ function _arrayLikeToArray$1(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
10996
+
10997
+ function _classCallCheck$1(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
10998
+
10999
+ function _defineProperty$1(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
11000
+
11001
+ function _classPrivateFieldGet$1(receiver, privateMap) { var descriptor = _classExtractFieldDescriptor$1(receiver, privateMap, "get"); return _classApplyDescriptorGet$1(receiver, descriptor); }
11002
+
11003
+ function _classApplyDescriptorGet$1(receiver, descriptor) { if (descriptor.get) { return descriptor.get.call(receiver); } return descriptor.value; }
11004
+
11005
+ function _classPrivateFieldSet$1(receiver, privateMap, value) { var descriptor = _classExtractFieldDescriptor$1(receiver, privateMap, "set"); _classApplyDescriptorSet$1(receiver, descriptor, value); return value; }
11006
+
11007
+ function _classExtractFieldDescriptor$1(receiver, privateMap, action) { if (!privateMap.has(receiver)) { throw new TypeError("attempted to " + action + " private field on non-instance"); } return privateMap.get(receiver); }
11008
+
11009
+ function _classApplyDescriptorSet$1(receiver, descriptor, value) { if (descriptor.set) { descriptor.set.call(receiver, value); } else { if (!descriptor.writable) { throw new TypeError("attempted to set read only private field"); } descriptor.value = value; } }
11010
+
11011
+ var _previews$1 = new WeakMap();
11012
+
11013
+ var PreviewListImpl =
11014
+ /*private*/
11015
+ function PreviewListImpl() {
11016
+ var _this = this;
11017
+
11018
+ _classCallCheck$1(this, PreviewListImpl);
11019
+
11020
+ _previews$1.set(this, {
11021
+ writable: true,
11022
+ value: void 0
11023
+ });
11024
+
11025
+ _defineProperty$1(this, "register", function (preview) {
11026
+ _classPrivateFieldGet$1(_this, _previews$1).push(preview);
11027
+ });
11028
+
11029
+ _defineProperty$1(this, "unregister", function (preview) {
11030
+ var index;
11031
+
11032
+ while ((index = _classPrivateFieldGet$1(_this, _previews$1).indexOf(preview)) !== -1) {
11033
+ _classPrivateFieldGet$1(_this, _previews$1).splice(index, 1);
11034
+ }
11035
+ });
11036
+
11037
+ _defineProperty$1(this, "backendChanged", function (backend) {
11038
+ var _iterator = _createForOfIteratorHelper(_classPrivateFieldGet$1(_this, _previews$1)),
11039
+ _step;
11040
+
11041
+ try {
11042
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
11043
+ var preview = _step.value;
11044
+ preview.backendChanged(backend);
11045
+ }
11046
+ } catch (err) {
11047
+ _iterator.e(err);
11048
+ } finally {
11049
+ _iterator.f();
11050
+ }
11051
+ });
11052
+
11053
+ _classPrivateFieldSet$1(this, _previews$1, []);
11054
+ };
11055
+
11056
+ function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
11057
+
11058
+ function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
11059
+
11060
+ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
11061
+
11062
+ function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter); }
11063
+
11064
+ function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
11065
+
11066
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
11067
+
11068
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
11069
+
11070
+ function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
11071
+
11072
+ function _classPrivateFieldGet(receiver, privateMap) { var descriptor = _classExtractFieldDescriptor(receiver, privateMap, "get"); return _classApplyDescriptorGet(receiver, descriptor); }
11073
+
11074
+ function _classApplyDescriptorGet(receiver, descriptor) { if (descriptor.get) { return descriptor.get.call(receiver); } return descriptor.value; }
11075
+
11076
+ function _classPrivateFieldSet(receiver, privateMap, value) { var descriptor = _classExtractFieldDescriptor(receiver, privateMap, "set"); _classApplyDescriptorSet(receiver, descriptor, value); return value; }
11077
+
11078
+ function _classExtractFieldDescriptor(receiver, privateMap, action) { if (!privateMap.has(receiver)) { throw new TypeError("attempted to " + action + " private field on non-instance"); } return privateMap.get(receiver); }
11079
+
11080
+ function _classApplyDescriptorSet(receiver, descriptor, value) { if (descriptor.set) { descriptor.set.call(receiver, value); } else { if (!descriptor.writable) { throw new TypeError("attempted to set read only private field"); } descriptor.value = value; } }
11081
+
11082
+ var _current = new WeakMap();
11083
+
11084
+ var _previews = new WeakMap();
11085
+
11086
+ var _backends = new WeakMap();
11087
+
11088
+ var _backendsList = new WeakMap();
11089
+
11090
+ var _nodes = new WeakMap();
11091
+
11092
+ var _createBackend = new WeakMap();
11093
+
11094
+ var _addEventListeners = new WeakMap();
11095
+
11096
+ var _removeEventListeners = new WeakMap();
11097
+
11098
+ var _backendSwitcher = new WeakMap();
11099
+
11100
+ var _callBackend = new WeakMap();
11101
+
11102
+ var _connectBackend = new WeakMap();
11103
+
11104
+ var MultiBackendImpl =
11105
+ /*private*/
11106
+
11107
+ /*private*/
11108
+
11109
+ /*private*/
11110
+
11111
+ /*private*/
11112
+
11113
+ /*private*/
11114
+ function MultiBackendImpl(_manager, _context, _options) {
11115
+ var _this = this;
11116
+
11117
+ _classCallCheck(this, MultiBackendImpl);
11118
+
11119
+ _current.set(this, {
11120
+ writable: true,
11121
+ value: void 0
11122
+ });
11123
+
11124
+ _previews.set(this, {
11125
+ writable: true,
11126
+ value: void 0
11127
+ });
11128
+
11129
+ _backends.set(this, {
11130
+ writable: true,
11131
+ value: void 0
11132
+ });
11133
+
11134
+ _backendsList.set(this, {
11135
+ writable: true,
11136
+ value: void 0
11137
+ });
11138
+
11139
+ _nodes.set(this, {
11140
+ writable: true,
11141
+ value: void 0
11142
+ });
11143
+
11144
+ _createBackend.set(this, {
11145
+ writable: true,
11146
+ value: function value(manager, context, backend) {
11147
+ var _backend$preview, _backend$skipDispatch;
11148
+
11149
+ if (!backend.backend) {
11150
+ throw new Error("You must specify a 'backend' property in your Backend entry: ".concat(JSON.stringify(backend)));
11151
+ }
11152
+
11153
+ var instance = backend.backend(manager, context, backend.options);
11154
+ var id = backend.id; // Try to infer an `id` if one doesn't exist
11155
+
11156
+ var inferName = !backend.id && instance && instance.constructor;
11157
+
11158
+ if (inferName) {
11159
+ id = instance.constructor.name;
11160
+ }
11161
+
11162
+ if (!id) {
11163
+ throw new Error("You must specify an 'id' property in your Backend entry: ".concat(JSON.stringify(backend), "\n see this guide: https://github.com/louisbrunner/dnd-multi-backend/tree/master/packages/react-dnd-multi-backend#migrating-from-5xx"));
11164
+ } else if (inferName) {
11165
+ console.warn( // eslint-disable-line no-console
11166
+ "Deprecation notice: You are using a pipeline which doesn't include backends' 'id'.\n This might be unsupported in the future, please specify 'id' explicitely for every backend.");
11167
+ }
11168
+
11169
+ if (_classPrivateFieldGet(_this, _backends)[id]) {
11170
+ throw new Error("You must specify a unique 'id' property in your Backend entry:\n ".concat(JSON.stringify(backend), " (conflicts with: ").concat(JSON.stringify(_classPrivateFieldGet(_this, _backends)[id]), ")"));
11171
+ }
11172
+
11173
+ return {
11174
+ id: id,
11175
+ instance: instance,
11176
+ preview: (_backend$preview = backend.preview) !== null && _backend$preview !== void 0 ? _backend$preview : false,
11177
+ transition: backend.transition,
11178
+ skipDispatchOnTransition: (_backend$skipDispatch = backend.skipDispatchOnTransition) !== null && _backend$skipDispatch !== void 0 ? _backend$skipDispatch : false
11179
+ };
11180
+ }
11181
+ });
11182
+
11183
+ _defineProperty(this, "setup", function () {
11184
+ if (typeof window === 'undefined') {
11185
+ return;
11186
+ }
11187
+
11188
+ if (MultiBackendImpl.isSetUp) {
11189
+ throw new Error('Cannot have two MultiBackends at the same time.');
11190
+ }
11191
+
11192
+ MultiBackendImpl.isSetUp = true;
11193
+
11194
+ _classPrivateFieldGet(_this, _addEventListeners).call(_this, window);
11195
+
11196
+ _classPrivateFieldGet(_this, _backends)[_classPrivateFieldGet(_this, _current)].instance.setup();
11197
+ });
11198
+
11199
+ _defineProperty(this, "teardown", function () {
11200
+ if (typeof window === 'undefined') {
11201
+ return;
11202
+ }
11203
+
11204
+ MultiBackendImpl.isSetUp = false;
11205
+
11206
+ _classPrivateFieldGet(_this, _removeEventListeners).call(_this, window);
11207
+
11208
+ _classPrivateFieldGet(_this, _backends)[_classPrivateFieldGet(_this, _current)].instance.teardown();
11209
+ });
11210
+
11211
+ _defineProperty(this, "connectDragSource", function (sourceId, node, options) {
11212
+ return _classPrivateFieldGet(_this, _connectBackend).call(_this, 'connectDragSource', sourceId, node, options);
11213
+ });
11214
+
11215
+ _defineProperty(this, "connectDragPreview", function (sourceId, node, options) {
11216
+ return _classPrivateFieldGet(_this, _connectBackend).call(_this, 'connectDragPreview', sourceId, node, options);
11217
+ });
11218
+
11219
+ _defineProperty(this, "connectDropTarget", function (sourceId, node, options) {
11220
+ return _classPrivateFieldGet(_this, _connectBackend).call(_this, 'connectDropTarget', sourceId, node, options);
11221
+ });
11222
+
11223
+ _defineProperty(this, "profile", function () {
11224
+ return _classPrivateFieldGet(_this, _backends)[_classPrivateFieldGet(_this, _current)].instance.profile();
11225
+ });
11226
+
11227
+ _defineProperty(this, "previewEnabled", function () {
11228
+ return _classPrivateFieldGet(_this, _backends)[_classPrivateFieldGet(_this, _current)].preview;
11229
+ });
11230
+
11231
+ _defineProperty(this, "previewsList", function () {
11232
+ return _classPrivateFieldGet(_this, _previews);
11233
+ });
11234
+
11235
+ _defineProperty(this, "backendsList", function () {
11236
+ return _classPrivateFieldGet(_this, _backendsList);
11237
+ });
11238
+
11239
+ _addEventListeners.set(this, {
11240
+ writable: true,
11241
+ value: function value(target) {
11242
+ _classPrivateFieldGet(_this, _backendsList).forEach(function (backend) {
11243
+ if (backend.transition) {
11244
+ target.addEventListener(backend.transition.event, _classPrivateFieldGet(_this, _backendSwitcher));
11245
+ }
11246
+ });
11247
+ }
11248
+ });
11249
+
11250
+ _removeEventListeners.set(this, {
11251
+ writable: true,
11252
+ value: function value(target) {
11253
+ _classPrivateFieldGet(_this, _backendsList).forEach(function (backend) {
11254
+ if (backend.transition) {
11255
+ target.removeEventListener(backend.transition.event, _classPrivateFieldGet(_this, _backendSwitcher));
11256
+ }
11257
+ });
11258
+ }
11259
+ });
11260
+
11261
+ _backendSwitcher.set(this, {
11262
+ writable: true,
11263
+ value: function value(event) {
11264
+ var oldBackend = _classPrivateFieldGet(_this, _current);
11265
+
11266
+ _classPrivateFieldGet(_this, _backendsList).some(function (backend) {
11267
+ if (backend.id !== _classPrivateFieldGet(_this, _current) && backend.transition && backend.transition.check(event)) {
11268
+ _classPrivateFieldSet(_this, _current, backend.id);
11269
+
11270
+ return true;
11271
+ }
11272
+
11273
+ return false;
11274
+ });
11275
+
11276
+ if (_classPrivateFieldGet(_this, _current) !== oldBackend) {
11277
+ var _event$target;
11278
+
11279
+ _classPrivateFieldGet(_this, _backends)[oldBackend].instance.teardown();
11280
+
11281
+ Object.keys(_classPrivateFieldGet(_this, _nodes)).forEach(function (id) {
11282
+ var _classPrivateFieldGet2;
11283
+
11284
+ var node = _classPrivateFieldGet(_this, _nodes)[id];
11285
+
11286
+ node.unsubscribe();
11287
+ node.unsubscribe = (_classPrivateFieldGet2 = _classPrivateFieldGet(_this, _callBackend)).call.apply(_classPrivateFieldGet2, [_this, node.func].concat(_toConsumableArray(node.args)));
11288
+ });
11289
+
11290
+ _classPrivateFieldGet(_this, _previews).backendChanged(_this);
11291
+
11292
+ var newBackend = _classPrivateFieldGet(_this, _backends)[_classPrivateFieldGet(_this, _current)];
11293
+
11294
+ newBackend.instance.setup();
11295
+
11296
+ if (newBackend.skipDispatchOnTransition) {
11297
+ return;
11298
+ }
11299
+
11300
+ var newEvent = null;
11301
+
11302
+ try {
11303
+ newEvent = event.constructor(event.type, event);
11304
+ } catch (_e) {
11305
+ newEvent = document.createEvent('Event');
11306
+ newEvent.initEvent(event.type, event.bubbles, event.cancelable);
11307
+ }
11308
+
11309
+ (_event$target = event.target) === null || _event$target === void 0 ? void 0 : _event$target.dispatchEvent(newEvent);
11310
+ }
11311
+ }
11312
+ });
11313
+
11314
+ _callBackend.set(this, {
11315
+ writable: true,
11316
+ value: function value(func, sourceId, node, options) {
11317
+ return _classPrivateFieldGet(_this, _backends)[_classPrivateFieldGet(_this, _current)].instance[func](sourceId, node, options);
11318
+ }
11319
+ });
11320
+
11321
+ _connectBackend.set(this, {
11322
+ writable: true,
11323
+ value: function value(func, sourceId, node, options) {
11324
+ var nodeId = "".concat(func, "_").concat(sourceId);
11325
+
11326
+ var unsubscribe = _classPrivateFieldGet(_this, _callBackend).call(_this, func, sourceId, node, options);
11327
+
11328
+ _classPrivateFieldGet(_this, _nodes)[nodeId] = {
11329
+ func: func,
11330
+ args: [sourceId, node, options],
11331
+ unsubscribe: unsubscribe
11332
+ };
11333
+ return function () {
11334
+ _classPrivateFieldGet(_this, _nodes)[nodeId].unsubscribe();
11335
+
11336
+ delete _classPrivateFieldGet(_this, _nodes)[nodeId];
11337
+ };
11338
+ }
11339
+ });
11340
+
11341
+ if (!_options || !_options.backends || _options.backends.length < 1) {
11342
+ throw new Error("You must specify at least one Backend, if you are coming from 2.x.x (or don't understand this error)\n see this guide: https://github.com/louisbrunner/dnd-multi-backend/tree/master/packages/react-dnd-multi-backend#migrating-from-2xx");
11343
+ }
11344
+
11345
+ _classPrivateFieldSet(this, _previews, new PreviewListImpl());
11346
+
11347
+ _classPrivateFieldSet(this, _backends, {});
11348
+
11349
+ _classPrivateFieldSet(this, _backendsList, []);
11350
+
11351
+ _options.backends.forEach(function (backend) {
11352
+ var backendRecord = _classPrivateFieldGet(_this, _createBackend).call(_this, _manager, _context, backend);
11353
+
11354
+ _classPrivateFieldGet(_this, _backends)[backendRecord.id] = backendRecord;
11355
+
11356
+ _classPrivateFieldGet(_this, _backendsList).push(backendRecord);
11357
+ });
11358
+
11359
+ _classPrivateFieldSet(this, _current, _classPrivateFieldGet(this, _backendsList)[0].id);
11360
+
11361
+ _classPrivateFieldSet(this, _nodes, {});
11362
+ };
11363
+
11364
+ _defineProperty(MultiBackendImpl, "isSetUp", false);
11365
+
8563
11366
  /******************************************************************************
8564
11367
  Copyright (c) Microsoft Corporation.
8565
11368
 
@@ -9375,25 +12178,26 @@ var TreeView = function (_a, ref) {
9375
12178
  setShowTree(false);
9376
12179
  }
9377
12180
  }, [initialOpen, treeData]);
9378
- return (React__default.createElement(React__default.Fragment, null, showTree && (React__default.createElement(Tree, { ref: ref, tree: list, classes: {
9379
- root: 'pl-0 ml-0 !border-l-0',
9380
- container: 'border-l pl-2 ml-3 border-l-gray-300 relative',
9381
- listItem: 'flex text-sm font-medium rounded-md flex-col',
9382
- dropTarget: 'classes-dropTarget',
9383
- draggingSource: 'classes-draggingSource',
9384
- placeholder: 'bg-purple-500 h-[2px] absolute w-[calc(100%-16px)] left-4'
9385
- }, rootId: 0, onDrop: handleDrop, sort: false, insertDroppableFirst: false, canDrop: function (tree, _a) {
9386
- var dragSource = _a.dragSource, dropTargetId = _a.dropTargetId;
9387
- if ((dragSource === null || dragSource === void 0 ? void 0 : dragSource.parent) === dropTargetId) {
9388
- return true;
9389
- }
9390
- }, initialOpen: openKeys, dropTargetOffset: 5, placeholderRender: function (node, _a) {
9391
- var depth = _a.depth;
9392
- return (React__default.createElement(Placeholder, { node: node, depth: depth }));
9393
- }, render: function (node, _a) {
9394
- var depth = _a.depth, isOpen = _a.isOpen, onToggle = _a.onToggle;
9395
- return (React__default.createElement(CustomNode, { node: node, depth: depth, isOpen: isOpen, onToggle: onToggle, onUpdate: handleUpdateList }));
9396
- } }))));
12181
+ return (React__default.createElement(React__default.Fragment, null,
12182
+ React__default.createElement(DndProvider, { backend: HTML5Backend }, showTree && (React__default.createElement(Tree, { ref: ref, tree: list, classes: {
12183
+ root: 'pl-0 ml-0 !border-l-0',
12184
+ container: 'border-l pl-2 ml-3 border-l-gray-300 relative',
12185
+ listItem: 'flex text-sm font-medium rounded-md flex-col',
12186
+ dropTarget: 'classes-dropTarget',
12187
+ draggingSource: 'classes-draggingSource',
12188
+ placeholder: 'bg-purple-500 h-[2px] absolute w-[calc(100%-16px)] left-4'
12189
+ }, rootId: 0, onDrop: handleDrop, sort: false, insertDroppableFirst: false, canDrop: function (tree, _a) {
12190
+ var dragSource = _a.dragSource, dropTargetId = _a.dropTargetId;
12191
+ if ((dragSource === null || dragSource === void 0 ? void 0 : dragSource.parent) === dropTargetId) {
12192
+ return true;
12193
+ }
12194
+ }, initialOpen: openKeys, dropTargetOffset: 5, placeholderRender: function (node, _a) {
12195
+ var depth = _a.depth;
12196
+ return (React__default.createElement(Placeholder, { node: node, depth: depth }));
12197
+ }, render: function (node, _a) {
12198
+ var depth = _a.depth, isOpen = _a.isOpen, onToggle = _a.onToggle;
12199
+ return (React__default.createElement(CustomNode, { node: node, depth: depth, isOpen: isOpen, onToggle: onToggle, onUpdate: handleUpdateList }));
12200
+ } })))));
9397
12201
  };
9398
12202
  var _TreeView = forwardRef(TreeView);
9399
12203
 
@@ -9471,7 +12275,7 @@ var TextInput = function (_a) {
9471
12275
  setIsFocus(false);
9472
12276
  setIsActive(!(input && input.value === ''));
9473
12277
  };
9474
- var inputStyles = cn$1('border py-2 px-3 rounded-md text-sm leading-5 font-normal w-full', { 'border-gray-300 shadow-sm': !isFocus && !isError }, { 'focus:ring-indigo-500 border-indigo-500 outline-indigo-500 shadow-none': isFocus && !isError }, { 'focus:ring-red-500 !border-red-500 shadow-none': isError });
12278
+ var inputStyles = cn$1('border py-2 px-3 rounded-md text-sm leading-5 font-normal w-full', { 'border-gray-300 shadow-sm': !isFocus && !isError }, { 'focus:ring-purple-500 border-purple-500 outline-purple-500 shadow-none': isFocus && !isError }, { 'focus:ring-red-500 !border-red-500 shadow-none': isError });
9475
12279
  var discriptionStyles = cn$1('text-sm mt-1 block', { 'text-gray-500': !isError }, { 'text-red-500': isError });
9476
12280
  return (React__default.createElement("div", null,
9477
12281
  React__default.createElement(InputLabel, { isPlaceholder: true, label: label, isRequired: isRequired, id: id, isError: isError, isActive: isActive, isDisabled: isDisabled }),
@@ -9489,7 +12293,7 @@ var InputCta = function (_a) {
9489
12293
  var handleClick = function () {
9490
12294
  onClickHandler && onClickHandler();
9491
12295
  };
9492
- var buttonStyle = cn$1('relative z-10 inline-flex items-center space-x-2 px-4 py-2 border border-gray-300 text-sm font-medium focus:outline-none focus:ring-1 focus:ring-indigo-500 focus:border-indigo-500', {
12296
+ var buttonStyle = cn$1('relative z-10 inline-flex items-center space-x-2 px-4 py-2 border border-gray-300 text-sm font-medium focus:outline-none focus:ring-1 focus:ring-purple-500 focus:border-purple-500', {
9493
12297
  'rounded-r-md text-gray-700 -ml-px': align === 'right'
9494
12298
  }, {
9495
12299
  'rounded-l-md text-gray-500 -mr-px focus-within:z-10': align === 'left'
@@ -9542,7 +12346,7 @@ var TextInputAddon = function (_a) {
9542
12346
  setIsFocus(false);
9543
12347
  // add other focus effects here
9544
12348
  };
9545
- var inputStyles = cn$1('border py-2 px-3 rounded-md text-sm leading-5 font-normal w-full border-gray-300 shadow-sm', { 'focus:ring-red-500 border-red-500 outline-red-500 shadow-none': isError }, { 'pl-10': inlineIcon }, { '!rounded-r-none !rounded-l-md': (trailIcon || trailLabel) && !(leadIcon || leadLabel) }, { '!rounded-r-none !rounded-r-md': !(trailIcon || trailLabel) && (leadIcon || leadLabel) }, { 'rounded-none': (trailIcon || trailLabel) && (leadIcon || leadLabel) });
12349
+ var inputStyles = cn$1('border py-2 px-3 rounded-md text-sm leading-5 font-normal w-full border-gray-300 outline-purple-500 shadow-sm focus:outline-none focus:ring-1 focus:ring-purple-500 focus:border-purple-500 ', { 'focus:ring-red-500 !border-red-500 !outline-red-500 shadow-none': isError }, { 'pl-10': inlineIcon }, { '!rounded-r-none !rounded-l-md': (trailIcon || trailLabel) && !(leadIcon || leadLabel) }, { '!rounded-r-none !rounded-r-md': !(trailIcon || trailLabel) && (leadIcon || leadLabel) }, { 'rounded-none': (trailIcon || trailLabel) && (leadIcon || leadLabel) });
9546
12350
  var discriptionStyles = cn$1('text-sm mt-1 block', { 'text-gray-500': !isError }, { 'text-red-500': isError });
9547
12351
  return (React__default.createElement("div", null,
9548
12352
  label && (React__default.createElement(InputLabel, { label: label, isRequired: isRequired, id: id, isError: isError, isDisabled: isDisabled })),
@@ -9568,7 +12372,7 @@ var InputSelect = function (_a) {
9568
12372
  onSelectOption && onSelectOption(targetValue);
9569
12373
  setSelectedOption(targetValue);
9570
12374
  };
9571
- var selectStyle = cn$1('relative z-10 inline-flex items-center space-x-2 bg-white px-4 py-2 pr-7 border border-gray-300 text-sm font-medium focus:outline-none focus:ring-1 focus:ring-indigo-500 focus:border-indigo-500', { 'rounded-r-md text-gray-700 -ml-px': align === 'right' }, { 'rounded-l-md text-gray-500 -mr-px focus-within:z-10': align === 'left' }, { 'cursor-default': !onSelectOption }, { 'border-l-white': align === 'right' }, { 'border-r-white': align === 'left' });
12375
+ var selectStyle = cn$1('relative z-10 inline-flex items-center space-x-2 bg-white px-4 py-2 pr-7 border border-gray-300 text-sm font-medium focus:outline-none focus:ring-1 focus:ring-purple-500 focus:border-purple-500', { 'rounded-r-md text-gray-700 -ml-px': align === 'right' }, { 'rounded-l-md text-gray-500 -mr-px focus-within:z-10': align === 'left' }, { 'cursor-default': !onSelectOption }, { 'border-l-white': align === 'right' }, { 'border-r-white': align === 'left' });
9572
12376
  if (!(inputOptions === null || inputOptions === void 0 ? void 0 : inputOptions.length))
9573
12377
  return null;
9574
12378
  return (React__default.createElement("select", { className: selectStyle, onChange: handleChange, value: selectedOption }, inputOptions.map(function (option) { return (React__default.createElement("option", { key: option.value, value: option.value }, option.label)); })));
@@ -9698,7 +12502,7 @@ var Select = function (_a) {
9698
12502
  /** Comment */
9699
12503
  var Checkbox = function (_a) {
9700
12504
  var label = _a.label, id = _a.id, isDisabled = _a.isDisabled, isChecked = _a.isChecked, isRequired = _a.isRequired, isError = _a.isError, message = _a.message, onChange = _a.onChange;
9701
- var checboxStyles = cn$1('focus:ring-indigo-500 h-4 w-4 text-indigo-600 border-gray-300 rounded', { 'border-red-500 shadow-none': isError });
12505
+ var checboxStyles = cn$1('focus:ring-purple-500 h-4 w-4 text-purple-600 border-gray-300 rounded', { 'border-red-500 shadow-none': isError });
9702
12506
  var wrapperStyles = cn$1('relative flex items-start', { 'opacity-50': isDisabled });
9703
12507
  var handleChange = function (e) {
9704
12508
  var targetValue = e.currentTarget.value;