@g4rcez/components 3.0.0-0 → 3.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (265) hide show
  1. package/dist/ai/SKILL.md +266 -0
  2. package/dist/ai/docs/Alert.md +167 -0
  3. package/dist/ai/docs/AnimatedList.md +205 -0
  4. package/dist/ai/docs/Autocomplete.md +225 -0
  5. package/dist/ai/docs/Button.md +182 -0
  6. package/dist/ai/docs/Calendar.md +219 -0
  7. package/dist/ai/docs/Card.md +174 -0
  8. package/dist/ai/docs/Checkbox.md +199 -0
  9. package/dist/ai/docs/CommandPalette.md +293 -0
  10. package/dist/ai/docs/DatePicker.md +171 -0
  11. package/dist/ai/docs/Dropdown.md +223 -0
  12. package/dist/ai/docs/Empty.md +163 -0
  13. package/dist/ai/docs/Expand.md +143 -0
  14. package/dist/ai/docs/FileUpload.md +225 -0
  15. package/dist/ai/docs/Form.md +107 -0
  16. package/dist/ai/docs/FormReset.md +117 -0
  17. package/dist/ai/docs/Heading.md +88 -0
  18. package/dist/ai/docs/Input.md +237 -0
  19. package/dist/ai/docs/InputField.md +170 -0
  20. package/dist/ai/docs/List.md +205 -0
  21. package/dist/ai/docs/Menu.md +166 -0
  22. package/dist/ai/docs/Modal.md +280 -0
  23. package/dist/ai/docs/MultiSelect.md +196 -0
  24. package/dist/ai/docs/Notifications.md +231 -0
  25. package/dist/ai/docs/PageCalendar.md +271 -0
  26. package/dist/ai/docs/Polymorph.md +159 -0
  27. package/dist/ai/docs/Progress.md +145 -0
  28. package/dist/ai/docs/Radiobox.md +128 -0
  29. package/dist/ai/docs/RenderOnView.md +138 -0
  30. package/dist/ai/docs/Resizable.md +159 -0
  31. package/dist/ai/docs/Select.md +284 -0
  32. package/dist/ai/docs/Shortcut.md +105 -0
  33. package/dist/ai/docs/Skeleton.md +166 -0
  34. package/dist/ai/docs/Slider.md +144 -0
  35. package/dist/ai/docs/Slot.md +173 -0
  36. package/dist/ai/docs/Spinner.md +118 -0
  37. package/dist/ai/docs/Stats.md +137 -0
  38. package/dist/ai/docs/Step.md +159 -0
  39. package/dist/ai/docs/Switch.md +167 -0
  40. package/dist/ai/docs/Table.md +298 -0
  41. package/dist/ai/docs/Tabs.md +191 -0
  42. package/dist/ai/docs/Tag.md +224 -0
  43. package/dist/ai/docs/TaskList.md +144 -0
  44. package/dist/ai/docs/Textarea.md +167 -0
  45. package/dist/ai/docs/Timeline.md +210 -0
  46. package/dist/ai/docs/Toolbar.md +132 -0
  47. package/dist/ai/docs/Tooltip.md +231 -0
  48. package/dist/ai/docs/TransferList.md +142 -0
  49. package/dist/ai/docs/Typography.md +187 -0
  50. package/dist/ai/docs/Wizard.md +213 -0
  51. package/dist/ai/docs/index.md +183 -0
  52. package/dist/components/core/button.d.ts +2 -8
  53. package/dist/components/core/button.d.ts.map +1 -1
  54. package/dist/components/core/polymorph.d.ts.map +1 -1
  55. package/dist/components/core/slot.d.ts +1 -1
  56. package/dist/components/core/slot.d.ts.map +1 -1
  57. package/dist/components/core/tag.d.ts +2 -2
  58. package/dist/components/core/tag.d.ts.map +1 -1
  59. package/dist/components/core/typography.d.ts.map +1 -1
  60. package/dist/components/display/alert.d.ts.map +1 -1
  61. package/dist/components/display/calendar.d.ts.map +1 -1
  62. package/dist/components/display/card.d.ts.map +1 -1
  63. package/dist/components/display/list.d.ts.map +1 -1
  64. package/dist/components/display/notifications.d.ts +2 -0
  65. package/dist/components/display/notifications.d.ts.map +1 -1
  66. package/dist/components/display/progress.d.ts.map +1 -1
  67. package/dist/components/display/skeleton.d.ts.map +1 -1
  68. package/dist/components/display/step.d.ts.map +1 -1
  69. package/dist/components/display/tabs.d.ts.map +1 -1
  70. package/dist/components/floating/command-palette.d.ts +1 -0
  71. package/dist/components/floating/command-palette.d.ts.map +1 -1
  72. package/dist/components/floating/dropdown.d.ts +1 -0
  73. package/dist/components/floating/dropdown.d.ts.map +1 -1
  74. package/dist/components/floating/menu.d.ts +2 -2
  75. package/dist/components/floating/menu.d.ts.map +1 -1
  76. package/dist/components/floating/modal.d.ts +20 -53
  77. package/dist/components/floating/modal.d.ts.map +1 -1
  78. package/dist/components/floating/tooltip.d.ts.map +1 -1
  79. package/dist/components/floating/wizard.d.ts +1 -1
  80. package/dist/components/floating/wizard.d.ts.map +1 -1
  81. package/dist/components/form/autocomplete.d.ts.map +1 -1
  82. package/dist/components/form/date-picker.d.ts.map +1 -1
  83. package/dist/components/form/free-text.d.ts.map +1 -1
  84. package/dist/components/form/input-field.d.ts +3 -2
  85. package/dist/components/form/input-field.d.ts.map +1 -1
  86. package/dist/components/form/multi-select.d.ts.map +1 -1
  87. package/dist/components/form/select.d.ts.map +1 -1
  88. package/dist/components/form/slider.d.ts.map +1 -1
  89. package/dist/components/index.d.ts +2 -0
  90. package/dist/components/index.d.ts.map +1 -1
  91. package/dist/components/page-calendar/calendar-header.d.ts +16 -0
  92. package/dist/components/page-calendar/calendar-header.d.ts.map +1 -0
  93. package/dist/components/page-calendar/day-view.d.ts +12 -0
  94. package/dist/components/page-calendar/day-view.d.ts.map +1 -0
  95. package/dist/components/page-calendar/event-pill.d.ts +9 -0
  96. package/dist/components/page-calendar/event-pill.d.ts.map +1 -0
  97. package/dist/components/page-calendar/index.d.ts +4 -0
  98. package/dist/components/page-calendar/index.d.ts.map +1 -0
  99. package/dist/components/page-calendar/month-view.d.ts +11 -0
  100. package/dist/components/page-calendar/month-view.d.ts.map +1 -0
  101. package/dist/components/page-calendar/page-calendar.d.ts +18 -0
  102. package/dist/components/page-calendar/page-calendar.d.ts.map +1 -0
  103. package/dist/components/page-calendar/page-calendar.types.d.ts +18 -0
  104. package/dist/components/page-calendar/page-calendar.types.d.ts.map +1 -0
  105. package/dist/components/page-calendar/page-calendar.utils.d.ts +18 -0
  106. package/dist/components/page-calendar/page-calendar.utils.d.ts.map +1 -0
  107. package/dist/components/page-calendar/week-view.d.ts +11 -0
  108. package/dist/components/page-calendar/week-view.d.ts.map +1 -0
  109. package/dist/components/table/index.d.ts.map +1 -1
  110. package/dist/components/table/inner-table.d.ts.map +1 -1
  111. package/dist/components/table/metadata.d.ts.map +1 -1
  112. package/dist/components/table/row.d.ts.map +1 -1
  113. package/dist/components/table/table-lib.d.ts.map +1 -1
  114. package/dist/components/table/thead.d.ts.map +1 -1
  115. package/dist/config/context.d.ts.map +1 -1
  116. package/dist/config/default-translations.d.ts +21 -4
  117. package/dist/config/default-translations.d.ts.map +1 -1
  118. package/dist/constants.d.ts.map +1 -1
  119. package/dist/hooks/use-components-provider.d.ts.map +1 -1
  120. package/dist/hooks/use-form.d.ts +11 -11
  121. package/dist/hooks/use-form.d.ts.map +1 -1
  122. package/dist/hooks/use-input-id.d.ts.map +1 -1
  123. package/dist/hooks/use-preferences.d.ts.map +1 -1
  124. package/dist/hooks/use-previous.d.ts.map +1 -1
  125. package/dist/hooks/use-reactive.d.ts.map +1 -1
  126. package/dist/hooks/use-resize-observer.d.ts.map +1 -1
  127. package/dist/hooks/use-stable-ref.d.ts.map +1 -1
  128. package/dist/hooks/use-swipe.d.ts.map +1 -1
  129. package/dist/hooks/use-translations.d.ts +21 -4
  130. package/dist/hooks/use-translations.d.ts.map +1 -1
  131. package/dist/index.css +1 -0
  132. package/dist/index.d.ts.map +1 -1
  133. package/dist/index.js +28 -20
  134. package/dist/index.js.map +1 -1
  135. package/dist/index.mjs +13862 -12512
  136. package/dist/index.mjs.map +1 -1
  137. package/dist/index.umd.js +24 -17
  138. package/dist/index.umd.js.map +1 -1
  139. package/dist/lib/dom.d.ts +1 -0
  140. package/dist/lib/dom.d.ts.map +1 -1
  141. package/dist/lib/fns.d.ts.map +1 -1
  142. package/dist/preset/plugin.tailwind.d.ts +9 -0
  143. package/dist/preset/plugin.tailwind.d.ts.map +1 -0
  144. package/dist/preset/plugin.tailwind.js +27 -0
  145. package/dist/preset/preset.tailwind.d.ts +8 -0
  146. package/dist/preset/preset.tailwind.d.ts.map +1 -0
  147. package/dist/preset/preset.tailwind.js +54 -0
  148. package/dist/preset/src/styles/common.d.ts +2 -14
  149. package/dist/preset/src/styles/common.d.ts.map +1 -1
  150. package/dist/preset/src/styles/common.js +1 -0
  151. package/dist/preset/src/styles/dark.d.ts.map +1 -1
  152. package/dist/preset/src/styles/dark.js +119 -114
  153. package/dist/preset/src/styles/light.d.ts.map +1 -1
  154. package/dist/preset/src/styles/light.js +111 -106
  155. package/dist/preset/src/styles/theme.types.d.ts +17 -8
  156. package/dist/preset/src/styles/theme.types.d.ts.map +1 -1
  157. package/dist/styles/common.d.ts +2 -14
  158. package/dist/styles/common.d.ts.map +1 -1
  159. package/dist/styles/dark.d.ts.map +1 -1
  160. package/dist/styles/light.d.ts.map +1 -1
  161. package/dist/styles/theme.types.d.ts +17 -8
  162. package/dist/styles/theme.types.d.ts.map +1 -1
  163. package/package.json +299 -301
  164. package/dist/components/core/button.jsx +0 -86
  165. package/dist/components/core/heading.jsx +0 -4
  166. package/dist/components/core/polymorph.jsx +0 -5
  167. package/dist/components/core/render-on-view.jsx +0 -31
  168. package/dist/components/core/resizable.jsx +0 -51
  169. package/dist/components/core/slot.jsx +0 -163
  170. package/dist/components/core/tag.jsx +0 -51
  171. package/dist/components/core/typography.jsx +0 -26
  172. package/dist/components/display/alert.jsx +0 -56
  173. package/dist/components/display/calendar.jsx +0 -301
  174. package/dist/components/display/card.jsx +0 -43
  175. package/dist/components/display/empty.jsx +0 -11
  176. package/dist/components/display/list.jsx +0 -81
  177. package/dist/components/display/notifications.jsx +0 -98
  178. package/dist/components/display/progress.jsx +0 -13
  179. package/dist/components/display/shortcut.jsx +0 -23
  180. package/dist/components/display/skeleton.jsx +0 -14
  181. package/dist/components/display/spinner.jsx +0 -7
  182. package/dist/components/display/stats.jsx +0 -20
  183. package/dist/components/display/step.jsx +0 -131
  184. package/dist/components/display/tabs.jsx +0 -100
  185. package/dist/components/display/timeline.jsx +0 -25
  186. package/dist/components/floating/command-palette.jsx +0 -172
  187. package/dist/components/floating/dropdown.jsx +0 -53
  188. package/dist/components/floating/expand.jsx +0 -44
  189. package/dist/components/floating/menu.jsx +0 -147
  190. package/dist/components/floating/modal.jsx +0 -241
  191. package/dist/components/floating/toolbar.jsx +0 -5
  192. package/dist/components/floating/tooltip.jsx +0 -64
  193. package/dist/components/floating/wizard.jsx +0 -164
  194. package/dist/components/form/autocomplete.jsx +0 -275
  195. package/dist/components/form/checkbox.jsx +0 -12
  196. package/dist/components/form/date-picker.jsx +0 -115
  197. package/dist/components/form/file-upload.jsx +0 -133
  198. package/dist/components/form/form.jsx +0 -10
  199. package/dist/components/form/formReset.jsx +0 -17
  200. package/dist/components/form/free-text.jsx +0 -41
  201. package/dist/components/form/input-field.jsx +0 -54
  202. package/dist/components/form/input.jsx +0 -36
  203. package/dist/components/form/multi-select.jsx +0 -328
  204. package/dist/components/form/radiobox.jsx +0 -6
  205. package/dist/components/form/select.jsx +0 -42
  206. package/dist/components/form/slider.jsx +0 -45
  207. package/dist/components/form/switch.jsx +0 -46
  208. package/dist/components/form/task-list.jsx +0 -26
  209. package/dist/components/form/textarea.jsx +0 -12
  210. package/dist/components/form/transfer-list.jsx +0 -39
  211. package/dist/components/index.js +0 -43
  212. package/dist/components/table/filter.jsx +0 -141
  213. package/dist/components/table/group.jsx +0 -68
  214. package/dist/components/table/index.jsx +0 -60
  215. package/dist/components/table/inner-table.jsx +0 -104
  216. package/dist/components/table/metadata.jsx +0 -37
  217. package/dist/components/table/pagination.jsx +0 -73
  218. package/dist/components/table/row.jsx +0 -58
  219. package/dist/components/table/sort.jsx +0 -105
  220. package/dist/components/table/table-lib.js +0 -84
  221. package/dist/components/table/table.context.jsx +0 -4
  222. package/dist/components/table/thead.jsx +0 -103
  223. package/dist/config/context.js +0 -12
  224. package/dist/config/default-translations.jsx +0 -66
  225. package/dist/config/default-tweaks.js +0 -4
  226. package/dist/constants.js +0 -2
  227. package/dist/hooks/use-click-outside.js +0 -17
  228. package/dist/hooks/use-color-parser.js +0 -9
  229. package/dist/hooks/use-components-provider.jsx +0 -16
  230. package/dist/hooks/use-debounce.js +0 -12
  231. package/dist/hooks/use-floating-ref.js +0 -6
  232. package/dist/hooks/use-form.js +0 -549
  233. package/dist/hooks/use-hover.js +0 -18
  234. package/dist/hooks/use-input-id.js +0 -5
  235. package/dist/hooks/use-is-coarse-device.js +0 -12
  236. package/dist/hooks/use-locale.js +0 -10
  237. package/dist/hooks/use-media-query.js +0 -25
  238. package/dist/hooks/use-on-event.js +0 -7
  239. package/dist/hooks/use-parent.js +0 -21
  240. package/dist/hooks/use-preferences.js +0 -23
  241. package/dist/hooks/use-previous.js +0 -8
  242. package/dist/hooks/use-reactive.js +0 -8
  243. package/dist/hooks/use-remove-scroll.js +0 -61
  244. package/dist/hooks/use-resize-observer.js +0 -17
  245. package/dist/hooks/use-stable-ref.js +0 -8
  246. package/dist/hooks/use-swipe.js +0 -16
  247. package/dist/hooks/use-translations.js +0 -9
  248. package/dist/hooks/use-tweaks.js +0 -9
  249. package/dist/hooks/use-window-size.js +0 -14
  250. package/dist/lib/combi-keys.js +0 -60
  251. package/dist/lib/dict.js +0 -39
  252. package/dist/lib/dom.js +0 -44
  253. package/dist/lib/fns.js +0 -46
  254. package/dist/lib/fzf.js +0 -117
  255. package/dist/lib/keyboard-area.js +0 -14
  256. package/dist/preset/tailwindcssv4.d.ts +0 -3
  257. package/dist/preset/tailwindcssv4.d.ts.map +0 -1
  258. package/dist/preset/tailwindcssv4.js +0 -75
  259. package/dist/styles/common.js +0 -28
  260. package/dist/styles/dark.js +0 -209
  261. package/dist/styles/design-tokens.js +0 -69
  262. package/dist/styles/light.js +0 -209
  263. package/dist/styles/theme.js +0 -4
  264. package/dist/styles/theme.types.js +0 -1
  265. package/dist/types.js +0 -1
package/dist/index.umd.js CHANGED
@@ -1,21 +1,28 @@
1
- (function(ae,S){typeof exports=="object"&&typeof module<"u"?S(exports,require("react"),require("react/jsx-runtime"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react/jsx-runtime","react-dom"],S):(ae=typeof globalThis<"u"?globalThis:ae||self,S(ae.components={},ae.React,ae["react/jsx-runtime"],ae.ReactDOM))})(this,(function(ae,S,g,Fi){"use strict";function Bh(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const A=Bh(S),jn=Bh(Fi);function Hh(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=Hh(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Wh(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=Hh(e))&&(r&&(r+=" "),r+=t);return r}const qh=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Uh=Wh,Io=(e,t)=>n=>{var r;if(t?.variants==null)return Uh(e,n?.class,n?.className);const{variants:o,defaultVariants:i}=t,a=Object.keys(o).map(c=>{const u=n?.[c],d=i?.[c];if(u===null)return null;const f=qh(u)||qh(d);return o[c][f]}),s=n&&Object.entries(n).reduce((c,u)=>{let[d,f]=u;return f===void 0||(c[d]=f),c},{}),l=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((c,u)=>{let{class:d,className:f,...p}=u;return Object.entries(p).every(v=>{let[h,m]=v;return Array.isArray(m)?m.includes({...i,...s}[h]):{...i,...s}[h]===m})?[...c,d,f]:c},[]);return Uh(e,a,l,n?.class,n?.className)};var Gh=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Yh(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function KE(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if(typeof t=="function"){var n=function r(){var o=!1;try{o=this instanceof r}catch{}return o?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var o=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,o.get?o:{enumerable:!0,get:function(){return e[r]}})}),n}var vc,Kh;function Ao(){return Kh||(Kh=1,vc=TypeError),vc}const ZE=KE(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var yc,Zh;function Za(){if(Zh)return yc;Zh=1;var e=typeof Map=="function"&&Map.prototype,t=Object.getOwnPropertyDescriptor&&e?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,n=e&&t&&typeof t.get=="function"?t.get:null,r=e&&Map.prototype.forEach,o=typeof Set=="function"&&Set.prototype,i=Object.getOwnPropertyDescriptor&&o?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,a=o&&i&&typeof i.get=="function"?i.get:null,s=o&&Set.prototype.forEach,l=typeof WeakMap=="function"&&WeakMap.prototype,c=l?WeakMap.prototype.has:null,u=typeof WeakSet=="function"&&WeakSet.prototype,d=u?WeakSet.prototype.has:null,f=typeof WeakRef=="function"&&WeakRef.prototype,p=f?WeakRef.prototype.deref:null,v=Boolean.prototype.valueOf,h=Object.prototype.toString,m=Function.prototype.toString,y=String.prototype.match,x=String.prototype.slice,b=String.prototype.replace,E=String.prototype.toUpperCase,T=String.prototype.toLowerCase,I=RegExp.prototype.test,w=Array.prototype.concat,k=Array.prototype.join,P=Array.prototype.slice,_=Math.floor,F=typeof BigInt=="function"?BigInt.prototype.valueOf:null,V=Object.getOwnPropertySymbols,D=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,O=typeof Symbol=="function"&&typeof Symbol.iterator=="object",N=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===O||!0)?Symbol.toStringTag:null,z=Object.prototype.propertyIsEnumerable,M=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(U){return U.__proto__}:null);function C(U,Z){if(U===1/0||U===-1/0||U!==U||U&&U>-1e3&&U<1e3||I.call(/e/,Z))return Z;var Pe=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof U=="number"){var Ge=U<0?-_(-U):_(U);if(Ge!==U){var Ze=String(Ge),Ne=x.call(Z,Ze.length+1);return b.call(Ze,Pe,"$&_")+"."+b.call(b.call(Ne,/([0-9]{3})/g,"$&_"),/_$/,"")}}return b.call(Z,Pe,"$&_")}var L=ZE,$=L.custom,B=ie($)?$:null,q={__proto__:null,double:'"',single:"'"},G={__proto__:null,double:/(["\\])/g,single:/(['\\])/g};yc=function U(Z,Pe,Ge,Ze){var Ne=Pe||{};if(te(Ne,"quoteStyle")&&!te(q,Ne.quoteStyle))throw new TypeError('option "quoteStyle" must be "single" or "double"');if(te(Ne,"maxStringLength")&&(typeof Ne.maxStringLength=="number"?Ne.maxStringLength<0&&Ne.maxStringLength!==1/0:Ne.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var ot=te(Ne,"customInspect")?Ne.customInspect:!0;if(typeof ot!="boolean"&&ot!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(te(Ne,"indent")&&Ne.indent!==null&&Ne.indent!==" "&&!(parseInt(Ne.indent,10)===Ne.indent&&Ne.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(te(Ne,"numericSeparator")&&typeof Ne.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var mt=Ne.numericSeparator;if(typeof Z>"u")return"undefined";if(Z===null)return"null";if(typeof Z=="boolean")return Z?"true":"false";if(typeof Z=="string")return ce(Z,Ne);if(typeof Z=="number"){if(Z===0)return 1/0/Z>0?"0":"-0";var it=String(Z);return mt?C(Z,it):it}if(typeof Z=="bigint"){var gn=String(Z)+"n";return mt?C(Z,gn):gn}var Ur=typeof Ne.depth>"u"?5:Ne.depth;if(typeof Ge>"u"&&(Ge=0),Ge>=Ur&&Ur>0&&typeof Z=="object")return ee(Z)?"[Array]":"[Object]";var Gr=ht(Ne,Ge);if(typeof Ze>"u")Ze=[];else if(ve(Ze,Z)>=0)return"[Circular]";function En(Ni,gc,mH){if(gc&&(Ze=P.call(Ze),Ze.push(gc)),mH){var YE={depth:Ne.depth};return te(Ne,"quoteStyle")&&(YE.quoteStyle=Ne.quoteStyle),U(Ni,YE,Ge+1,Ze)}return U(Ni,Ne,Ge+1,Ze)}if(typeof Z=="function"&&!K(Z)){var Mi=pe(Z),Di=$e(Z,En);return"[Function"+(Mi?": "+Mi:" (anonymous)")+"]"+(Di.length>0?" { "+k.call(Di,", ")+" }":"")}if(ie(Z)){var HE=O?b.call(String(Z),/^(Symbol\(.*\))_[^)]*$/,"$1"):D.call(Z);return typeof Z=="object"&&!O?Ce(HE):HE}if(ne(Z)){for(var Ka="<"+T.call(String(Z.nodeName)),Fh=Z.attributes||[],mc=0;mc<Fh.length;mc++)Ka+=" "+Fh[mc].name+"="+W(J(Fh[mc].value),"double",Ne);return Ka+=">",Z.childNodes&&Z.childNodes.length&&(Ka+="..."),Ka+="</"+T.call(String(Z.nodeName))+">",Ka}if(ee(Z)){if(Z.length===0)return"[]";var Lh=$e(Z,En);return Gr&&!pt(Lh)?"["+$t(Lh,Gr)+"]":"[ "+k.call(Lh,", ")+" ]"}if(X(Z)){var Vh=$e(Z,En);return!("cause"in Error.prototype)&&"cause"in Z&&!z.call(Z,"cause")?"{ ["+String(Z)+"] "+k.call(w.call("[cause]: "+En(Z.cause),Vh),", ")+" }":Vh.length===0?"["+String(Z)+"]":"{ ["+String(Z)+"] "+k.call(Vh,", ")+" }"}if(typeof Z=="object"&&ot){if(B&&typeof Z[B]=="function"&&L)return L(Z,{depth:Ur-Ge});if(ot!=="symbol"&&typeof Z.inspect=="function")return Z.inspect()}if(Ae(Z)){var WE=[];return r&&r.call(Z,function(Ni,gc){WE.push(En(gc,Z,!0)+" => "+En(Ni,Z))}),qe("Map",n.call(Z),WE,Gr)}if(j(Z)){var qE=[];return s&&s.call(Z,function(Ni){qE.push(En(Ni,Z))}),qe("Set",a.call(Z),qE,Gr)}if(me(Z))return _e("WeakMap");if(R(Z))return _e("WeakSet");if(oe(Z))return _e("WeakRef");if(H(Z))return Ce(En(Number(Z)));if(Q(Z))return Ce(En(F.call(Z)));if(se(Z))return Ce(v.call(Z));if(de(Z))return Ce(En(String(Z)));if(typeof window<"u"&&Z===window)return"{ [object Window] }";if(typeof globalThis<"u"&&Z===globalThis||typeof Gh<"u"&&Z===Gh)return"{ [object globalThis] }";if(!Y(Z)&&!K(Z)){var $h=$e(Z,En),UE=M?M(Z)===Object.prototype:Z instanceof Object||Z.constructor===Object,zh=Z instanceof Object?"":"null prototype",GE=!UE&&N&&Object(Z)===Z&&N in Z?x.call(fe(Z),8,-1):zh?"Object":"",hH=UE||typeof Z.constructor!="function"?"":Z.constructor.name?Z.constructor.name+" ":"",jh=hH+(GE||zh?"["+k.call(w.call([],GE||[],zh||[]),": ")+"] ":"");return $h.length===0?jh+"{}":Gr?jh+"{"+$t($h,Gr)+"}":jh+"{ "+k.call($h,", ")+" }"}return String(Z)};function W(U,Z,Pe){var Ge=Pe.quoteStyle||Z,Ze=q[Ge];return Ze+U+Ze}function J(U){return b.call(String(U),/"/g,"&quot;")}function re(U){return!N||!(typeof U=="object"&&(N in U||typeof U[N]<"u"))}function ee(U){return fe(U)==="[object Array]"&&re(U)}function Y(U){return fe(U)==="[object Date]"&&re(U)}function K(U){return fe(U)==="[object RegExp]"&&re(U)}function X(U){return fe(U)==="[object Error]"&&re(U)}function de(U){return fe(U)==="[object String]"&&re(U)}function H(U){return fe(U)==="[object Number]"&&re(U)}function se(U){return fe(U)==="[object Boolean]"&&re(U)}function ie(U){if(O)return U&&typeof U=="object"&&U instanceof Symbol;if(typeof U=="symbol")return!0;if(!U||typeof U!="object"||!D)return!1;try{return D.call(U),!0}catch{}return!1}function Q(U){if(!U||typeof U!="object"||!F)return!1;try{return F.call(U),!0}catch{}return!1}var le=Object.prototype.hasOwnProperty||function(U){return U in this};function te(U,Z){return le.call(U,Z)}function fe(U){return h.call(U)}function pe(U){if(U.name)return U.name;var Z=y.call(m.call(U),/^function\s*([\w$]+)/);return Z?Z[1]:null}function ve(U,Z){if(U.indexOf)return U.indexOf(Z);for(var Pe=0,Ge=U.length;Pe<Ge;Pe++)if(U[Pe]===Z)return Pe;return-1}function Ae(U){if(!n||!U||typeof U!="object")return!1;try{n.call(U);try{a.call(U)}catch{return!0}return U instanceof Map}catch{}return!1}function me(U){if(!c||!U||typeof U!="object")return!1;try{c.call(U,c);try{d.call(U,d)}catch{return!0}return U instanceof WeakMap}catch{}return!1}function oe(U){if(!p||!U||typeof U!="object")return!1;try{return p.call(U),!0}catch{}return!1}function j(U){if(!a||!U||typeof U!="object")return!1;try{a.call(U);try{n.call(U)}catch{return!0}return U instanceof Set}catch{}return!1}function R(U){if(!d||!U||typeof U!="object")return!1;try{d.call(U,d);try{c.call(U,c)}catch{return!0}return U instanceof WeakSet}catch{}return!1}function ne(U){return!U||typeof U!="object"?!1:typeof HTMLElement<"u"&&U instanceof HTMLElement?!0:typeof U.nodeName=="string"&&typeof U.getAttribute=="function"}function ce(U,Z){if(U.length>Z.maxStringLength){var Pe=U.length-Z.maxStringLength,Ge="... "+Pe+" more character"+(Pe>1?"s":"");return ce(x.call(U,0,Z.maxStringLength),Z)+Ge}var Ze=G[Z.quoteStyle||"single"];Ze.lastIndex=0;var Ne=b.call(b.call(U,Ze,"\\$1"),/[\x00-\x1f]/g,xe);return W(Ne,"single",Z)}function xe(U){var Z=U.charCodeAt(0),Pe={8:"b",9:"t",10:"n",12:"f",13:"r"}[Z];return Pe?"\\"+Pe:"\\x"+(Z<16?"0":"")+E.call(Z.toString(16))}function Ce(U){return"Object("+U+")"}function _e(U){return U+" { ? }"}function qe(U,Z,Pe,Ge){var Ze=Ge?$t(Pe,Ge):k.call(Pe,", ");return U+" ("+Z+") {"+Ze+"}"}function pt(U){for(var Z=0;Z<U.length;Z++)if(ve(U[Z],`
2
- `)>=0)return!1;return!0}function ht(U,Z){var Pe;if(U.indent===" ")Pe=" ";else if(typeof U.indent=="number"&&U.indent>0)Pe=k.call(Array(U.indent+1)," ");else return null;return{base:Pe,prev:k.call(Array(Z+1),Pe)}}function $t(U,Z){if(U.length===0)return"";var Pe=`
3
- `+Z.prev+Z.base;return Pe+k.call(U,","+Pe)+`
4
- `+Z.prev}function $e(U,Z){var Pe=ee(U),Ge=[];if(Pe){Ge.length=U.length;for(var Ze=0;Ze<U.length;Ze++)Ge[Ze]=te(U,Ze)?Z(U[Ze],U):""}var Ne=typeof V=="function"?V(U):[],ot;if(O){ot={};for(var mt=0;mt<Ne.length;mt++)ot["$"+Ne[mt]]=Ne[mt]}for(var it in U)te(U,it)&&(Pe&&String(Number(it))===it&&it<U.length||O&&ot["$"+it]instanceof Symbol||(I.call(/[^\w$]/,it)?Ge.push(Z(it,U)+": "+Z(U[it],U)):Ge.push(it+": "+Z(U[it],U))));if(typeof V=="function")for(var gn=0;gn<Ne.length;gn++)z.call(U,Ne[gn])&&Ge.push("["+Z(Ne[gn])+"]: "+Z(U[Ne[gn]],U));return Ge}return yc}var bc,Xh;function XE(){if(Xh)return bc;Xh=1;var e=Za(),t=Ao(),n=function(s,l,c){for(var u=s,d;(d=u.next)!=null;u=d)if(d.key===l)return u.next=d.next,c||(d.next=s.next,s.next=d),d},r=function(s,l){if(s){var c=n(s,l);return c&&c.value}},o=function(s,l,c){var u=n(s,l);u?u.value=c:s.next={key:l,next:s.next,value:c}},i=function(s,l){return s?!!n(s,l):!1},a=function(s,l){if(s)return n(s,l,!0)};return bc=function(){var l,c={assert:function(u){if(!c.has(u))throw new t("Side channel does not contain "+e(u))},delete:function(u){var d=l&&l.next,f=a(l,u);return f&&d&&d===f&&(l=void 0),!!f},get:function(u){return r(l,u)},has:function(u){return i(l,u)},set:function(u,d){l||(l={next:void 0}),o(l,u,d)}};return c},bc}var xc,Qh;function Jh(){return Qh||(Qh=1,xc=Object),xc}var wc,em;function QE(){return em||(em=1,wc=Error),wc}var Sc,tm;function JE(){return tm||(tm=1,Sc=EvalError),Sc}var Tc,nm;function ek(){return nm||(nm=1,Tc=RangeError),Tc}var Ec,rm;function tk(){return rm||(rm=1,Ec=ReferenceError),Ec}var kc,om;function nk(){return om||(om=1,kc=SyntaxError),kc}var Cc,im;function rk(){return im||(im=1,Cc=URIError),Cc}var Ic,am;function ok(){return am||(am=1,Ic=Math.abs),Ic}var Ac,sm;function ik(){return sm||(sm=1,Ac=Math.floor),Ac}var Pc,lm;function ak(){return lm||(lm=1,Pc=Math.max),Pc}var Oc,cm;function sk(){return cm||(cm=1,Oc=Math.min),Oc}var _c,um;function lk(){return um||(um=1,_c=Math.pow),_c}var Mc,dm;function ck(){return dm||(dm=1,Mc=Math.round),Mc}var Dc,fm;function uk(){return fm||(fm=1,Dc=Number.isNaN||function(t){return t!==t}),Dc}var Nc,pm;function dk(){if(pm)return Nc;pm=1;var e=uk();return Nc=function(n){return e(n)||n===0?n:n<0?-1:1},Nc}var Fc,hm;function fk(){return hm||(hm=1,Fc=Object.getOwnPropertyDescriptor),Fc}var Lc,mm;function gm(){if(mm)return Lc;mm=1;var e=fk();if(e)try{e([],"length")}catch{e=null}return Lc=e,Lc}var Vc,vm;function pk(){if(vm)return Vc;vm=1;var e=Object.defineProperty||!1;if(e)try{e({},"a",{value:1})}catch{e=!1}return Vc=e,Vc}var $c,ym;function hk(){return ym||(ym=1,$c=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var t={},n=Symbol("test"),r=Object(n);if(typeof n=="string"||Object.prototype.toString.call(n)!=="[object Symbol]"||Object.prototype.toString.call(r)!=="[object Symbol]")return!1;var o=42;t[n]=o;for(var i in t)return!1;if(typeof Object.keys=="function"&&Object.keys(t).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(t).length!==0)return!1;var a=Object.getOwnPropertySymbols(t);if(a.length!==1||a[0]!==n||!Object.prototype.propertyIsEnumerable.call(t,n))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var s=Object.getOwnPropertyDescriptor(t,n);if(s.value!==o||s.enumerable!==!0)return!1}return!0}),$c}var zc,bm;function mk(){if(bm)return zc;bm=1;var e=typeof Symbol<"u"&&Symbol,t=hk();return zc=function(){return typeof e!="function"||typeof Symbol!="function"||typeof e("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:t()},zc}var jc,xm;function wm(){return xm||(xm=1,jc=typeof Reflect<"u"&&Reflect.getPrototypeOf||null),jc}var Rc,Sm;function Tm(){if(Sm)return Rc;Sm=1;var e=Jh();return Rc=e.getPrototypeOf||null,Rc}var Bc,Em;function gk(){if(Em)return Bc;Em=1;var e="Function.prototype.bind called on incompatible ",t=Object.prototype.toString,n=Math.max,r="[object Function]",o=function(l,c){for(var u=[],d=0;d<l.length;d+=1)u[d]=l[d];for(var f=0;f<c.length;f+=1)u[f+l.length]=c[f];return u},i=function(l,c){for(var u=[],d=c,f=0;d<l.length;d+=1,f+=1)u[f]=l[d];return u},a=function(s,l){for(var c="",u=0;u<s.length;u+=1)c+=s[u],u+1<s.length&&(c+=l);return c};return Bc=function(l){var c=this;if(typeof c!="function"||t.apply(c)!==r)throw new TypeError(e+c);for(var u=i(arguments,1),d,f=function(){if(this instanceof d){var y=c.apply(this,o(u,arguments));return Object(y)===y?y:this}return c.apply(l,o(u,arguments))},p=n(0,c.length-u.length),v=[],h=0;h<p;h++)v[h]="$"+h;if(d=Function("binder","return function ("+a(v,",")+"){ return binder.apply(this,arguments); }")(f),c.prototype){var m=function(){};m.prototype=c.prototype,d.prototype=new m,m.prototype=null}return d},Bc}var Hc,km;function Xa(){if(km)return Hc;km=1;var e=gk();return Hc=Function.prototype.bind||e,Hc}var Wc,Cm;function qc(){return Cm||(Cm=1,Wc=Function.prototype.call),Wc}var Uc,Im;function Am(){return Im||(Im=1,Uc=Function.prototype.apply),Uc}var Gc,Pm;function vk(){return Pm||(Pm=1,Gc=typeof Reflect<"u"&&Reflect&&Reflect.apply),Gc}var Yc,Om;function yk(){if(Om)return Yc;Om=1;var e=Xa(),t=Am(),n=qc(),r=vk();return Yc=r||e.call(n,t),Yc}var Kc,_m;function Mm(){if(_m)return Kc;_m=1;var e=Xa(),t=Ao(),n=qc(),r=yk();return Kc=function(i){if(i.length<1||typeof i[0]!="function")throw new t("a function is required");return r(e,n,i)},Kc}var Zc,Dm;function bk(){if(Dm)return Zc;Dm=1;var e=Mm(),t=gm(),n;try{n=[].__proto__===Array.prototype}catch(a){if(!a||typeof a!="object"||!("code"in a)||a.code!=="ERR_PROTO_ACCESS")throw a}var r=!!n&&t&&t(Object.prototype,"__proto__"),o=Object,i=o.getPrototypeOf;return Zc=r&&typeof r.get=="function"?e([r.get]):typeof i=="function"?function(s){return i(s==null?s:o(s))}:!1,Zc}var Xc,Nm;function xk(){if(Nm)return Xc;Nm=1;var e=wm(),t=Tm(),n=bk();return Xc=e?function(o){return e(o)}:t?function(o){if(!o||typeof o!="object"&&typeof o!="function")throw new TypeError("getProto: not an object");return t(o)}:n?function(o){return n(o)}:null,Xc}var Qc,Fm;function wk(){if(Fm)return Qc;Fm=1;var e=Function.prototype.call,t=Object.prototype.hasOwnProperty,n=Xa();return Qc=n.call(e,t),Qc}var Jc,Lm;function eu(){if(Lm)return Jc;Lm=1;var e,t=Jh(),n=QE(),r=JE(),o=ek(),i=tk(),a=nk(),s=Ao(),l=rk(),c=ok(),u=ik(),d=ak(),f=sk(),p=lk(),v=ck(),h=dk(),m=Function,y=function(K){try{return m('"use strict"; return ('+K+").constructor;")()}catch{}},x=gm(),b=pk(),E=function(){throw new s},T=x?(function(){try{return arguments.callee,E}catch{try{return x(arguments,"callee").get}catch{return E}}})():E,I=mk()(),w=xk(),k=Tm(),P=wm(),_=Am(),F=qc(),V={},D=typeof Uint8Array>"u"||!w?e:w(Uint8Array),O={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?e:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?e:ArrayBuffer,"%ArrayIteratorPrototype%":I&&w?w([][Symbol.iterator]()):e,"%AsyncFromSyncIteratorPrototype%":e,"%AsyncFunction%":V,"%AsyncGenerator%":V,"%AsyncGeneratorFunction%":V,"%AsyncIteratorPrototype%":V,"%Atomics%":typeof Atomics>"u"?e:Atomics,"%BigInt%":typeof BigInt>"u"?e:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?e:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?e:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?e:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":n,"%eval%":eval,"%EvalError%":r,"%Float16Array%":typeof Float16Array>"u"?e:Float16Array,"%Float32Array%":typeof Float32Array>"u"?e:Float32Array,"%Float64Array%":typeof Float64Array>"u"?e:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?e:FinalizationRegistry,"%Function%":m,"%GeneratorFunction%":V,"%Int8Array%":typeof Int8Array>"u"?e:Int8Array,"%Int16Array%":typeof Int16Array>"u"?e:Int16Array,"%Int32Array%":typeof Int32Array>"u"?e:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":I&&w?w(w([][Symbol.iterator]())):e,"%JSON%":typeof JSON=="object"?JSON:e,"%Map%":typeof Map>"u"?e:Map,"%MapIteratorPrototype%":typeof Map>"u"||!I||!w?e:w(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":t,"%Object.getOwnPropertyDescriptor%":x,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?e:Promise,"%Proxy%":typeof Proxy>"u"?e:Proxy,"%RangeError%":o,"%ReferenceError%":i,"%Reflect%":typeof Reflect>"u"?e:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?e:Set,"%SetIteratorPrototype%":typeof Set>"u"||!I||!w?e:w(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?e:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":I&&w?w(""[Symbol.iterator]()):e,"%Symbol%":I?Symbol:e,"%SyntaxError%":a,"%ThrowTypeError%":T,"%TypedArray%":D,"%TypeError%":s,"%Uint8Array%":typeof Uint8Array>"u"?e:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?e:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?e:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?e:Uint32Array,"%URIError%":l,"%WeakMap%":typeof WeakMap>"u"?e:WeakMap,"%WeakRef%":typeof WeakRef>"u"?e:WeakRef,"%WeakSet%":typeof WeakSet>"u"?e:WeakSet,"%Function.prototype.call%":F,"%Function.prototype.apply%":_,"%Object.defineProperty%":b,"%Object.getPrototypeOf%":k,"%Math.abs%":c,"%Math.floor%":u,"%Math.max%":d,"%Math.min%":f,"%Math.pow%":p,"%Math.round%":v,"%Math.sign%":h,"%Reflect.getPrototypeOf%":P};if(w)try{null.error}catch(K){var N=w(w(K));O["%Error.prototype%"]=N}var z=function K(X){var de;if(X==="%AsyncFunction%")de=y("async function () {}");else if(X==="%GeneratorFunction%")de=y("function* () {}");else if(X==="%AsyncGeneratorFunction%")de=y("async function* () {}");else if(X==="%AsyncGenerator%"){var H=K("%AsyncGeneratorFunction%");H&&(de=H.prototype)}else if(X==="%AsyncIteratorPrototype%"){var se=K("%AsyncGenerator%");se&&w&&(de=w(se.prototype))}return O[X]=de,de},M={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},C=Xa(),L=wk(),$=C.call(F,Array.prototype.concat),B=C.call(_,Array.prototype.splice),q=C.call(F,String.prototype.replace),G=C.call(F,String.prototype.slice),W=C.call(F,RegExp.prototype.exec),J=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,re=/\\(\\)?/g,ee=function(X){var de=G(X,0,1),H=G(X,-1);if(de==="%"&&H!=="%")throw new a("invalid intrinsic syntax, expected closing `%`");if(H==="%"&&de!=="%")throw new a("invalid intrinsic syntax, expected opening `%`");var se=[];return q(X,J,function(ie,Q,le,te){se[se.length]=le?q(te,re,"$1"):Q||ie}),se},Y=function(X,de){var H=X,se;if(L(M,H)&&(se=M[H],H="%"+se[0]+"%"),L(O,H)){var ie=O[H];if(ie===V&&(ie=z(H)),typeof ie>"u"&&!de)throw new s("intrinsic "+X+" exists, but is not available. Please file an issue!");return{alias:se,name:H,value:ie}}throw new a("intrinsic "+X+" does not exist!")};return Jc=function(X,de){if(typeof X!="string"||X.length===0)throw new s("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof de!="boolean")throw new s('"allowMissing" argument must be a boolean');if(W(/^%?[^%]*%?$/,X)===null)throw new a("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var H=ee(X),se=H.length>0?H[0]:"",ie=Y("%"+se+"%",de),Q=ie.name,le=ie.value,te=!1,fe=ie.alias;fe&&(se=fe[0],B(H,$([0,1],fe)));for(var pe=1,ve=!0;pe<H.length;pe+=1){var Ae=H[pe],me=G(Ae,0,1),oe=G(Ae,-1);if((me==='"'||me==="'"||me==="`"||oe==='"'||oe==="'"||oe==="`")&&me!==oe)throw new a("property names with quotes must have matching quotes");if((Ae==="constructor"||!ve)&&(te=!0),se+="."+Ae,Q="%"+se+"%",L(O,Q))le=O[Q];else if(le!=null){if(!(Ae in le)){if(!de)throw new s("base intrinsic for "+X+" exists, but the property is not available.");return}if(x&&pe+1>=H.length){var j=x(le,Ae);ve=!!j,ve&&"get"in j&&!("originalValue"in j.get)?le=j.get:le=le[Ae]}else ve=L(le,Ae),le=le[Ae];ve&&!te&&(O[Q]=le)}}return le},Jc}var tu,Vm;function $m(){if(Vm)return tu;Vm=1;var e=eu(),t=Mm(),n=t([e("%String.prototype.indexOf%")]);return tu=function(o,i){var a=e(o,!!i);return typeof a=="function"&&n(o,".prototype.")>-1?t([a]):a},tu}var nu,zm;function jm(){if(zm)return nu;zm=1;var e=eu(),t=$m(),n=Za(),r=Ao(),o=e("%Map%",!0),i=t("Map.prototype.get",!0),a=t("Map.prototype.set",!0),s=t("Map.prototype.has",!0),l=t("Map.prototype.delete",!0),c=t("Map.prototype.size",!0);return nu=!!o&&function(){var d,f={assert:function(p){if(!f.has(p))throw new r("Side channel does not contain "+n(p))},delete:function(p){if(d){var v=l(d,p);return c(d)===0&&(d=void 0),v}return!1},get:function(p){if(d)return i(d,p)},has:function(p){return d?s(d,p):!1},set:function(p,v){d||(d=new o),a(d,p,v)}};return f},nu}var ru,Rm;function Sk(){if(Rm)return ru;Rm=1;var e=eu(),t=$m(),n=Za(),r=jm(),o=Ao(),i=e("%WeakMap%",!0),a=t("WeakMap.prototype.get",!0),s=t("WeakMap.prototype.set",!0),l=t("WeakMap.prototype.has",!0),c=t("WeakMap.prototype.delete",!0);return ru=i?function(){var d,f,p={assert:function(v){if(!p.has(v))throw new o("Side channel does not contain "+n(v))},delete:function(v){if(i&&v&&(typeof v=="object"||typeof v=="function")){if(d)return c(d,v)}else if(r&&f)return f.delete(v);return!1},get:function(v){return i&&v&&(typeof v=="object"||typeof v=="function")&&d?a(d,v):f&&f.get(v)},has:function(v){return i&&v&&(typeof v=="object"||typeof v=="function")&&d?l(d,v):!!f&&f.has(v)},set:function(v,h){i&&v&&(typeof v=="object"||typeof v=="function")?(d||(d=new i),s(d,v,h)):r&&(f||(f=r()),f.set(v,h))}};return p}:r,ru}var ou,Bm;function Hm(){if(Bm)return ou;Bm=1;var e=Ao(),t=Za(),n=XE(),r=jm(),o=Sk(),i=o||r||n;return ou=function(){var s,l={assert:function(c){if(!l.has(c))throw new e("Side channel does not contain "+t(c))},delete:function(c){return!!s&&s.delete(c)},get:function(c){return s&&s.get(c)},has:function(c){return!!s&&s.has(c)},set:function(c,u){s||(s=i()),s.set(c,u)}};return l},ou}var Wm=e=>Array.isArray(e),iu=e=>e===void 0,au=e=>e===null,Tk=Function.bind.call(Function.call,Object.prototype.toString),Ek=e=>!!e&&Tk(e)==="[object Error]"||e instanceof Error,qm=(e,t)=>e instanceof t,kk=e=>{const t=typeof e;return t==="undefined"||t===null||t==="number"||t==="string"||t==="boolean"||t==="bigint"},Ck=e=>Object.prototype.toString.call(e)==="[object Date]"&&qm(e,Date),Re={array:Wm,date:Ck,empty:e=>au(e)||iu(e)?!0:typeof e=="object"?Object.keys(e).length===0:typeof e=="string"?e==="":Array.isArray(e)?e.length===0:Number.isNaN(e),function:e=>typeof e=="function",instance:qm,isError:Ek,keyof:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),nan:e=>Number.isNaN(e),nil:e=>au(e)||iu(e),null:au,number:e=>typeof e=="number"?!Number.isNaN(e):!1,object:e=>!Wm(e)&&typeof e=="object",primitive:kk,string:e=>typeof e=="string",undefined:iu},Ik=e=>Object.keys(e),Rn=(e,t,n)=>{if(!t)return;const o=(Array.isArray(t)?t:t.match(/([^[.\]])+/g)).reduce((i,a)=>i&&i[a],e);return o===void 0?n:o},Ak=e=>e.replace(/[^0-9]/g,"");const Pk=(e,t)=>{const n=new Array(e.length+t.length);for(let r=0;r<e.length;r++)n[r]=e[r];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},Ok=(e,t)=>({classGroupId:e,validator:t}),Um=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),Qa="-",Gm=[],_k="arbitrary..",Mk=e=>{const t=Nk(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:a=>{if(a.startsWith("[")&&a.endsWith("]"))return Dk(a);const s=a.split(Qa),l=s[0]===""&&s.length>1?1:0;return Ym(s,l,t)},getConflictingClassGroupIds:(a,s)=>{if(s){const l=r[a],c=n[a];return l?c?Pk(c,l):l:c||Gm}return n[a]||Gm}}},Ym=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const o=e[t],i=n.nextPart.get(o);if(i){const c=Ym(e,t+1,i);if(c)return c}const a=n.validators;if(a===null)return;const s=t===0?e.join(Qa):e.slice(t).join(Qa),l=a.length;for(let c=0;c<l;c++){const u=a[c];if(u.validator(s))return u.classGroupId}},Dk=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),n=t.indexOf(":"),r=t.slice(0,n);return r?_k+r:void 0})(),Nk=e=>{const{theme:t,classGroups:n}=e;return Fk(n,t)},Fk=(e,t)=>{const n=Um();for(const r in e){const o=e[r];su(o,n,r,t)}return n},su=(e,t,n,r)=>{const o=e.length;for(let i=0;i<o;i++){const a=e[i];Lk(a,t,n,r)}},Lk=(e,t,n,r)=>{if(typeof e=="string"){Vk(e,t,n);return}if(typeof e=="function"){$k(e,t,n,r);return}zk(e,t,n,r)},Vk=(e,t,n)=>{const r=e===""?t:Km(t,e);r.classGroupId=n},$k=(e,t,n,r)=>{if(jk(e)){su(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(Ok(n,e))},zk=(e,t,n,r)=>{const o=Object.entries(e),i=o.length;for(let a=0;a<i;a++){const[s,l]=o[a];su(l,Km(t,s),n,r)}},Km=(e,t)=>{let n=e;const r=t.split(Qa),o=r.length;for(let i=0;i<o;i++){const a=r[i];let s=n.nextPart.get(a);s||(s=Um(),n.nextPart.set(a,s)),n=s}return n},jk=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,Rk=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null);const o=(i,a)=>{n[i]=a,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(i){let a=n[i];if(a!==void 0)return a;if((a=r[i])!==void 0)return o(i,a),a},set(i,a){i in n?n[i]=a:o(i,a)}}},lu="!",Zm=":",Bk=[],Xm=(e,t,n,r,o)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:o}),Hk=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=o=>{const i=[];let a=0,s=0,l=0,c;const u=o.length;for(let h=0;h<u;h++){const m=o[h];if(a===0&&s===0){if(m===Zm){i.push(o.slice(l,h)),l=h+1;continue}if(m==="/"){c=h;continue}}m==="["?a++:m==="]"?a--:m==="("?s++:m===")"&&s--}const d=i.length===0?o:o.slice(l);let f=d,p=!1;d.endsWith(lu)?(f=d.slice(0,-1),p=!0):d.startsWith(lu)&&(f=d.slice(1),p=!0);const v=c&&c>l?c-l:void 0;return Xm(i,p,f,v)};if(t){const o=t+Zm,i=r;r=a=>a.startsWith(o)?i(a.slice(o.length)):Xm(Bk,!1,a,void 0,!0)}if(n){const o=r;r=i=>n({className:i,parseClassName:o})}return r},Wk=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((n,r)=>{t.set(n,1e6+r)}),n=>{const r=[];let o=[];for(let i=0;i<n.length;i++){const a=n[i],s=a[0]==="[",l=t.has(a);s||l?(o.length>0&&(o.sort(),r.push(...o),o=[]),r.push(a)):o.push(a)}return o.length>0&&(o.sort(),r.push(...o)),r}},qk=e=>({cache:Rk(e.cacheSize),parseClassName:Hk(e),sortModifiers:Wk(e),...Mk(e)}),Uk=/\s+/,Gk=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o,sortModifiers:i}=t,a=[],s=e.trim().split(Uk);let l="";for(let c=s.length-1;c>=0;c-=1){const u=s[c],{isExternal:d,modifiers:f,hasImportantModifier:p,baseClassName:v,maybePostfixModifierPosition:h}=n(u);if(d){l=u+(l.length>0?" "+l:l);continue}let m=!!h,y=r(m?v.substring(0,h):v);if(!y){if(!m){l=u+(l.length>0?" "+l:l);continue}if(y=r(v),!y){l=u+(l.length>0?" "+l:l);continue}m=!1}const x=f.length===0?"":f.length===1?f[0]:i(f).join(":"),b=p?x+lu:x,E=b+y;if(a.indexOf(E)>-1)continue;a.push(E);const T=o(y,m);for(let I=0;I<T.length;++I){const w=T[I];a.push(b+w)}l=u+(l.length>0?" "+l:l)}return l},Yk=(...e)=>{let t=0,n,r,o="";for(;t<e.length;)(n=e[t++])&&(r=Qm(n))&&(o&&(o+=" "),o+=r);return o},Qm=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=Qm(e[r]))&&(n&&(n+=" "),n+=t);return n},Kk=(e,...t)=>{let n,r,o,i;const a=l=>{const c=t.reduce((u,d)=>d(u),e());return n=qk(c),r=n.cache.get,o=n.cache.set,i=s,s(l)},s=l=>{const c=r(l);if(c)return c;const u=Gk(l,n);return o(l,u),u};return i=a,(...l)=>i(Yk(...l))},Zk=[],zt=e=>{const t=n=>n[e]||Zk;return t.isThemeGetter=!0,t},Jm=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,eg=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Xk=/^\d+\/\d+$/,Qk=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Jk=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,eC=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,tC=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,nC=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Po=e=>Xk.test(e),We=e=>!!e&&!Number.isNaN(Number(e)),vr=e=>!!e&&Number.isInteger(Number(e)),cu=e=>e.endsWith("%")&&We(e.slice(0,-1)),ar=e=>Qk.test(e),rC=()=>!0,oC=e=>Jk.test(e)&&!eC.test(e),tg=()=>!1,iC=e=>tC.test(e),aC=e=>nC.test(e),sC=e=>!we(e)&&!Se(e),lC=e=>Oo(e,ag,tg),we=e=>Jm.test(e),Yr=e=>Oo(e,sg,oC),uu=e=>Oo(e,pC,We),ng=e=>Oo(e,og,tg),cC=e=>Oo(e,ig,aC),Ja=e=>Oo(e,lg,iC),Se=e=>eg.test(e),Li=e=>_o(e,sg),uC=e=>_o(e,hC),rg=e=>_o(e,og),dC=e=>_o(e,ag),fC=e=>_o(e,ig),es=e=>_o(e,lg,!0),Oo=(e,t,n)=>{const r=Jm.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},_o=(e,t,n=!1)=>{const r=eg.exec(e);return r?r[1]?t(r[1]):n:!1},og=e=>e==="position"||e==="percentage",ig=e=>e==="image"||e==="url",ag=e=>e==="length"||e==="size"||e==="bg-size",sg=e=>e==="length",pC=e=>e==="number",hC=e=>e==="family-name",lg=e=>e==="shadow",mC=Kk(()=>{const e=zt("color"),t=zt("font"),n=zt("text"),r=zt("font-weight"),o=zt("tracking"),i=zt("leading"),a=zt("breakpoint"),s=zt("container"),l=zt("spacing"),c=zt("radius"),u=zt("shadow"),d=zt("inset-shadow"),f=zt("text-shadow"),p=zt("drop-shadow"),v=zt("blur"),h=zt("perspective"),m=zt("aspect"),y=zt("ease"),x=zt("animate"),b=()=>["auto","avoid","all","avoid-page","page","left","right","column"],E=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],T=()=>[...E(),Se,we],I=()=>["auto","hidden","clip","visible","scroll"],w=()=>["auto","contain","none"],k=()=>[Se,we,l],P=()=>[Po,"full","auto",...k()],_=()=>[vr,"none","subgrid",Se,we],F=()=>["auto",{span:["full",vr,Se,we]},vr,Se,we],V=()=>[vr,"auto",Se,we],D=()=>["auto","min","max","fr",Se,we],O=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],N=()=>["start","end","center","stretch","center-safe","end-safe"],z=()=>["auto",...k()],M=()=>[Po,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...k()],C=()=>[e,Se,we],L=()=>[...E(),rg,ng,{position:[Se,we]}],$=()=>["no-repeat",{repeat:["","x","y","space","round"]}],B=()=>["auto","cover","contain",dC,lC,{size:[Se,we]}],q=()=>[cu,Li,Yr],G=()=>["","none","full",c,Se,we],W=()=>["",We,Li,Yr],J=()=>["solid","dashed","dotted","double"],re=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ee=()=>[We,cu,rg,ng],Y=()=>["","none",v,Se,we],K=()=>["none",We,Se,we],X=()=>["none",We,Se,we],de=()=>[We,Se,we],H=()=>[Po,"full",...k()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[ar],breakpoint:[ar],color:[rC],container:[ar],"drop-shadow":[ar],ease:["in","out","in-out"],font:[sC],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[ar],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[ar],shadow:[ar],spacing:["px",We],text:[ar],"text-shadow":[ar],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Po,we,Se,m]}],container:["container"],columns:[{columns:[We,we,Se,s]}],"break-after":[{"break-after":b()}],"break-before":[{"break-before":b()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:T()}],overflow:[{overflow:I()}],"overflow-x":[{"overflow-x":I()}],"overflow-y":[{"overflow-y":I()}],overscroll:[{overscroll:w()}],"overscroll-x":[{"overscroll-x":w()}],"overscroll-y":[{"overscroll-y":w()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:P()}],"inset-x":[{"inset-x":P()}],"inset-y":[{"inset-y":P()}],start:[{start:P()}],end:[{end:P()}],top:[{top:P()}],right:[{right:P()}],bottom:[{bottom:P()}],left:[{left:P()}],visibility:["visible","invisible","collapse"],z:[{z:[vr,"auto",Se,we]}],basis:[{basis:[Po,"full","auto",s,...k()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[We,Po,"auto","initial","none",we]}],grow:[{grow:["",We,Se,we]}],shrink:[{shrink:["",We,Se,we]}],order:[{order:[vr,"first","last","none",Se,we]}],"grid-cols":[{"grid-cols":_()}],"col-start-end":[{col:F()}],"col-start":[{"col-start":V()}],"col-end":[{"col-end":V()}],"grid-rows":[{"grid-rows":_()}],"row-start-end":[{row:F()}],"row-start":[{"row-start":V()}],"row-end":[{"row-end":V()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":D()}],"auto-rows":[{"auto-rows":D()}],gap:[{gap:k()}],"gap-x":[{"gap-x":k()}],"gap-y":[{"gap-y":k()}],"justify-content":[{justify:[...O(),"normal"]}],"justify-items":[{"justify-items":[...N(),"normal"]}],"justify-self":[{"justify-self":["auto",...N()]}],"align-content":[{content:["normal",...O()]}],"align-items":[{items:[...N(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...N(),{baseline:["","last"]}]}],"place-content":[{"place-content":O()}],"place-items":[{"place-items":[...N(),"baseline"]}],"place-self":[{"place-self":["auto",...N()]}],p:[{p:k()}],px:[{px:k()}],py:[{py:k()}],ps:[{ps:k()}],pe:[{pe:k()}],pt:[{pt:k()}],pr:[{pr:k()}],pb:[{pb:k()}],pl:[{pl:k()}],m:[{m:z()}],mx:[{mx:z()}],my:[{my:z()}],ms:[{ms:z()}],me:[{me:z()}],mt:[{mt:z()}],mr:[{mr:z()}],mb:[{mb:z()}],ml:[{ml:z()}],"space-x":[{"space-x":k()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":k()}],"space-y-reverse":["space-y-reverse"],size:[{size:M()}],w:[{w:[s,"screen",...M()]}],"min-w":[{"min-w":[s,"screen","none",...M()]}],"max-w":[{"max-w":[s,"screen","none","prose",{screen:[a]},...M()]}],h:[{h:["screen","lh",...M()]}],"min-h":[{"min-h":["screen","lh","none",...M()]}],"max-h":[{"max-h":["screen","lh",...M()]}],"font-size":[{text:["base",n,Li,Yr]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,Se,uu]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",cu,we]}],"font-family":[{font:[uC,we,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[o,Se,we]}],"line-clamp":[{"line-clamp":[We,"none",Se,uu]}],leading:[{leading:[i,...k()]}],"list-image":[{"list-image":["none",Se,we]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",Se,we]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:C()}],"text-color":[{text:C()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...J(),"wavy"]}],"text-decoration-thickness":[{decoration:[We,"from-font","auto",Se,Yr]}],"text-decoration-color":[{decoration:C()}],"underline-offset":[{"underline-offset":[We,"auto",Se,we]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:k()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Se,we]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Se,we]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:L()}],"bg-repeat":[{bg:$()}],"bg-size":[{bg:B()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},vr,Se,we],radial:["",Se,we],conic:[vr,Se,we]},fC,cC]}],"bg-color":[{bg:C()}],"gradient-from-pos":[{from:q()}],"gradient-via-pos":[{via:q()}],"gradient-to-pos":[{to:q()}],"gradient-from":[{from:C()}],"gradient-via":[{via:C()}],"gradient-to":[{to:C()}],rounded:[{rounded:G()}],"rounded-s":[{"rounded-s":G()}],"rounded-e":[{"rounded-e":G()}],"rounded-t":[{"rounded-t":G()}],"rounded-r":[{"rounded-r":G()}],"rounded-b":[{"rounded-b":G()}],"rounded-l":[{"rounded-l":G()}],"rounded-ss":[{"rounded-ss":G()}],"rounded-se":[{"rounded-se":G()}],"rounded-ee":[{"rounded-ee":G()}],"rounded-es":[{"rounded-es":G()}],"rounded-tl":[{"rounded-tl":G()}],"rounded-tr":[{"rounded-tr":G()}],"rounded-br":[{"rounded-br":G()}],"rounded-bl":[{"rounded-bl":G()}],"border-w":[{border:W()}],"border-w-x":[{"border-x":W()}],"border-w-y":[{"border-y":W()}],"border-w-s":[{"border-s":W()}],"border-w-e":[{"border-e":W()}],"border-w-t":[{"border-t":W()}],"border-w-r":[{"border-r":W()}],"border-w-b":[{"border-b":W()}],"border-w-l":[{"border-l":W()}],"divide-x":[{"divide-x":W()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":W()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...J(),"hidden","none"]}],"divide-style":[{divide:[...J(),"hidden","none"]}],"border-color":[{border:C()}],"border-color-x":[{"border-x":C()}],"border-color-y":[{"border-y":C()}],"border-color-s":[{"border-s":C()}],"border-color-e":[{"border-e":C()}],"border-color-t":[{"border-t":C()}],"border-color-r":[{"border-r":C()}],"border-color-b":[{"border-b":C()}],"border-color-l":[{"border-l":C()}],"divide-color":[{divide:C()}],"outline-style":[{outline:[...J(),"none","hidden"]}],"outline-offset":[{"outline-offset":[We,Se,we]}],"outline-w":[{outline:["",We,Li,Yr]}],"outline-color":[{outline:C()}],shadow:[{shadow:["","none",u,es,Ja]}],"shadow-color":[{shadow:C()}],"inset-shadow":[{"inset-shadow":["none",d,es,Ja]}],"inset-shadow-color":[{"inset-shadow":C()}],"ring-w":[{ring:W()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:C()}],"ring-offset-w":[{"ring-offset":[We,Yr]}],"ring-offset-color":[{"ring-offset":C()}],"inset-ring-w":[{"inset-ring":W()}],"inset-ring-color":[{"inset-ring":C()}],"text-shadow":[{"text-shadow":["none",f,es,Ja]}],"text-shadow-color":[{"text-shadow":C()}],opacity:[{opacity:[We,Se,we]}],"mix-blend":[{"mix-blend":[...re(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":re()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[We]}],"mask-image-linear-from-pos":[{"mask-linear-from":ee()}],"mask-image-linear-to-pos":[{"mask-linear-to":ee()}],"mask-image-linear-from-color":[{"mask-linear-from":C()}],"mask-image-linear-to-color":[{"mask-linear-to":C()}],"mask-image-t-from-pos":[{"mask-t-from":ee()}],"mask-image-t-to-pos":[{"mask-t-to":ee()}],"mask-image-t-from-color":[{"mask-t-from":C()}],"mask-image-t-to-color":[{"mask-t-to":C()}],"mask-image-r-from-pos":[{"mask-r-from":ee()}],"mask-image-r-to-pos":[{"mask-r-to":ee()}],"mask-image-r-from-color":[{"mask-r-from":C()}],"mask-image-r-to-color":[{"mask-r-to":C()}],"mask-image-b-from-pos":[{"mask-b-from":ee()}],"mask-image-b-to-pos":[{"mask-b-to":ee()}],"mask-image-b-from-color":[{"mask-b-from":C()}],"mask-image-b-to-color":[{"mask-b-to":C()}],"mask-image-l-from-pos":[{"mask-l-from":ee()}],"mask-image-l-to-pos":[{"mask-l-to":ee()}],"mask-image-l-from-color":[{"mask-l-from":C()}],"mask-image-l-to-color":[{"mask-l-to":C()}],"mask-image-x-from-pos":[{"mask-x-from":ee()}],"mask-image-x-to-pos":[{"mask-x-to":ee()}],"mask-image-x-from-color":[{"mask-x-from":C()}],"mask-image-x-to-color":[{"mask-x-to":C()}],"mask-image-y-from-pos":[{"mask-y-from":ee()}],"mask-image-y-to-pos":[{"mask-y-to":ee()}],"mask-image-y-from-color":[{"mask-y-from":C()}],"mask-image-y-to-color":[{"mask-y-to":C()}],"mask-image-radial":[{"mask-radial":[Se,we]}],"mask-image-radial-from-pos":[{"mask-radial-from":ee()}],"mask-image-radial-to-pos":[{"mask-radial-to":ee()}],"mask-image-radial-from-color":[{"mask-radial-from":C()}],"mask-image-radial-to-color":[{"mask-radial-to":C()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":E()}],"mask-image-conic-pos":[{"mask-conic":[We]}],"mask-image-conic-from-pos":[{"mask-conic-from":ee()}],"mask-image-conic-to-pos":[{"mask-conic-to":ee()}],"mask-image-conic-from-color":[{"mask-conic-from":C()}],"mask-image-conic-to-color":[{"mask-conic-to":C()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:L()}],"mask-repeat":[{mask:$()}],"mask-size":[{mask:B()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",Se,we]}],filter:[{filter:["","none",Se,we]}],blur:[{blur:Y()}],brightness:[{brightness:[We,Se,we]}],contrast:[{contrast:[We,Se,we]}],"drop-shadow":[{"drop-shadow":["","none",p,es,Ja]}],"drop-shadow-color":[{"drop-shadow":C()}],grayscale:[{grayscale:["",We,Se,we]}],"hue-rotate":[{"hue-rotate":[We,Se,we]}],invert:[{invert:["",We,Se,we]}],saturate:[{saturate:[We,Se,we]}],sepia:[{sepia:["",We,Se,we]}],"backdrop-filter":[{"backdrop-filter":["","none",Se,we]}],"backdrop-blur":[{"backdrop-blur":Y()}],"backdrop-brightness":[{"backdrop-brightness":[We,Se,we]}],"backdrop-contrast":[{"backdrop-contrast":[We,Se,we]}],"backdrop-grayscale":[{"backdrop-grayscale":["",We,Se,we]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[We,Se,we]}],"backdrop-invert":[{"backdrop-invert":["",We,Se,we]}],"backdrop-opacity":[{"backdrop-opacity":[We,Se,we]}],"backdrop-saturate":[{"backdrop-saturate":[We,Se,we]}],"backdrop-sepia":[{"backdrop-sepia":["",We,Se,we]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":k()}],"border-spacing-x":[{"border-spacing-x":k()}],"border-spacing-y":[{"border-spacing-y":k()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",Se,we]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[We,"initial",Se,we]}],ease:[{ease:["linear","initial",y,Se,we]}],delay:[{delay:[We,Se,we]}],animate:[{animate:["none",x,Se,we]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[h,Se,we]}],"perspective-origin":[{"perspective-origin":T()}],rotate:[{rotate:K()}],"rotate-x":[{"rotate-x":K()}],"rotate-y":[{"rotate-y":K()}],"rotate-z":[{"rotate-z":K()}],scale:[{scale:X()}],"scale-x":[{"scale-x":X()}],"scale-y":[{"scale-y":X()}],"scale-z":[{"scale-z":X()}],"scale-3d":["scale-3d"],skew:[{skew:de()}],"skew-x":[{"skew-x":de()}],"skew-y":[{"skew-y":de()}],transform:[{transform:[Se,we,"","none","gpu","cpu"]}],"transform-origin":[{origin:T()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:H()}],"translate-x":[{"translate-x":H()}],"translate-y":[{"translate-y":H()}],"translate-z":[{"translate-z":H()}],"translate-none":["translate-none"],accent:[{accent:C()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:C()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Se,we]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":k()}],"scroll-mx":[{"scroll-mx":k()}],"scroll-my":[{"scroll-my":k()}],"scroll-ms":[{"scroll-ms":k()}],"scroll-me":[{"scroll-me":k()}],"scroll-mt":[{"scroll-mt":k()}],"scroll-mr":[{"scroll-mr":k()}],"scroll-mb":[{"scroll-mb":k()}],"scroll-ml":[{"scroll-ml":k()}],"scroll-p":[{"scroll-p":k()}],"scroll-px":[{"scroll-px":k()}],"scroll-py":[{"scroll-py":k()}],"scroll-ps":[{"scroll-ps":k()}],"scroll-pe":[{"scroll-pe":k()}],"scroll-pt":[{"scroll-pt":k()}],"scroll-pr":[{"scroll-pr":k()}],"scroll-pb":[{"scroll-pb":k()}],"scroll-pl":[{"scroll-pl":k()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Se,we]}],fill:[{fill:["none",...C()]}],"stroke-w":[{stroke:[We,Li,Yr,uu]}],stroke:[{stroke:["none",...C()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}}),sr=(...e)=>t=>{e.forEach(n=>{typeof n=="function"?n(t):n!==null&&(n.current=t)})},gC=e=>e.$$typeof===Symbol.for("react.forward_ref")||e.$$typeof===Symbol.for("react.fragment")?!0:e.$$typeof===Symbol.for("react.element"),du=e=>Re.function(e),Oe=(...e)=>mC(Wh(e)),cg=e=>{const t=new Event("input",{bubbles:!0,composed:!0});return e?.dispatchEvent(t),Object.assign({},t,{target:e,currentTarget:e})},Vi=e=>{const t=()=>e.setAttribute("data-initialized","true");return e.addEventListener("focus",t),()=>e.removeEventListener("focus",t)},ug=e=>e.scrollHeight>e.clientHeight,$i=(e,t)=>{const n=e.getBoundingClientRect();return Math.abs(t-n.bottom)},vC=(e,t)=>{const n=e.getBoundingClientRect(),r=t.getBoundingClientRect();return{top:Math.round(n.top-r.top),left:Math.round(n.left-r.left)}},ln=S.forwardRef(function(t,n){const r=t.as||"span";return g.jsx(r,{ref:n,...t,as:void 0})}),yC={size:{icon:"p-1",big:"h-12 px-6 py-4",default:"h-8 px-4 py-2",small:"h-6 p-2 px-3 text-sm",tiny:"h-6 p-2 px-3 text-xs"},theme:{custom:"",info:"bg-tag-info-bg text-tag-info-text",warn:"bg-tag-warn-bg text-tag-warn-text",muted:"bg-tag-muted-bg text-tag-muted-text",danger:"bg-tag-danger-bg text-tag-danger-text",disabled:"bg-disabled duration-700 opacity-70",primary:"bg-tag-primary-bg text-tag-primary-text",success:"bg-tag-success-bg text-tag-success-text",neutral:"bg-transparent border border-card-border",secondary:"bg-tag-secondary-bg text-tag-secondary-text",loading:"animate-pulse bg-disabled duration-700 opacity-70"}},bC=Io("size-2.5 aspect-square rounded-full border-0",{variants:{theme:{info:"bg-info",warn:"bg-warn",muted:"bg-muted",danger:"bg-danger",neutral:"bg-muted",primary:"bg-primary",success:"bg-success",secondary:"bg-secondary"}}}),xC=Io("inline-flex rounded-pill gap-1.5 border-0 items-center justify-center align-middle whitespace-nowrap",{variants:yC,defaultVariants:{theme:"primary",size:"default"}}),ts=S.forwardRef(function({className:t,indicator:n=void 0,icon:r,loading:o,theme:i,size:a,...s},l){return g.jsxs(ln,{...s,ref:l,"data-theme":i,"data-component":"tag",as:s.as??"span",className:Oe(xC({size:a,theme:o?"loading":i}),t),children:[n?g.jsx("span",{"aria-hidden":"true",className:bC({theme:n})}):null,r,s.children]})}),wC=e=>{const t=n=>{n.persist(),n.preventDefault(),e.onSubmit?.(n)};return g.jsx("form",{...e,onSubmit:t})};var Mt=function(){return Mt=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},Mt.apply(this,arguments)};function fu(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function pu(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),o,i=[],a;try{for(;(t===void 0||t-- >0)&&!(o=r.next()).done;)i.push(o.value)}catch(s){a={error:s}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return i}typeof SuppressedError=="function"&&SuppressedError;var zi=function(e){return e.replace(new RegExp(" ","g")," ")},dg=function(e,t){var n=e.length,r=t+1;if(n>=r)return e;var o="0".repeat(r-n);return"".concat(o).concat(e)},SC=function(e){return e.replace(/^0+([0-9]+)/,"$1")},fg=function(e,t,n){var r=e.length-2,o=SC(e.substring(0,r)),i=e.substring(r);return o.split(/(?=(?:\d{3})*$)/).join(t)+n+i},pg=function(e){return e===void 0&&(e=""),e.replace(/(-(?!\d))|[^0-9|-]/g,"")||""},ns=function(e){return Number.parseFloat(e.replace(/,/g,".").replace(/(.*)\./,function(t){return"".concat(t.replace(/\./g,""),".")}).replace(/[^0-9.]/g,""))},TC=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},hu=function(e){var t=S.useRef(e);return S.useEffect(function(){t.current=e},[e]),t},EC=function(e){return e==="money"||e==="currency"},kC=function(e,t,n){return new Intl.NumberFormat(e,{style:"currency",currency:t,currencyDisplay:n}).formatToParts(1e3).reduce(function(r,o){var i;return Mt(Mt({},r),(i={},i[o.type]=o.value,i))},{currency:"",currencyDisplay:"",decimal:",",fraction:"",group:"",integer:"",literal:""})},rs=function(e,t){var n=dg(pg(e),t.fraction.length),r="".concat(t.currency).concat(fg(n,t.group,t.decimal));return zi(r)},CC=S.forwardRef(function(e,t){var n=e.locale,r=n===void 0?"pt-BR":n,o=e.currency,i=o===void 0?"BRL":o,a=e.currencyDisplay,s=a===void 0?"symbol":a;e.mask;var l=e.onChange,c=fu(e,["locale","currency","currencyDisplay","mask","onChange"]),u=S.useRef(null);S.useImperativeHandle(t,function(){return u.current});var d=S.useMemo(function(){var v=kC(r,i,s);return v.currency=zi("".concat(v.currency.trim()," ")),v.literal=zi(v.literal.trim()),v},[r,i]),f=function(v){var h=rs(v.target.value,d),m=ns(h);v.target.value=h,v.target.setAttribute("data-number",m.toString()),l?.(v),m!==0&&(u.current.selectionEnd=h.length)};S.useEffect(function(){if(u.current!==null){var v=u.current.value;if(v!==""){var h=rs(v,d),m=ns(h);u.current.value=h,u.current.setAttribute("data-number",m.toString());var y=new InputEvent("change",{});l?.(Mt(Mt({},y),{target:u.current,currentTarget:u.current})),m!==0&&(u.current.selectionEnd=h.length)}}},[d]);var p=c.defaultValue?rs(c.defaultValue,d):void 0;return S.createElement("input",Mt({},c,{value:typeof c.value=="string"?rs(c.value,d):c.value,defaultValue:p,type:"text",ref:u,onChange:f,inputMode:"decimal"}))}),IC=1,AC=function(e){return e==="percentage"||e==="percent"||e==="percentual"},PC=function(e){return new Intl.NumberFormat(e,{style:"percent",minimumFractionDigits:2}).formatToParts(1e3).reduce(function(t,n){var r;return Mt(Mt({},t),(r={},r[n.type]=n.value,r))},{decimal:"",fraction:"",group:"",integer:"",percentSign:"",type:"",value:""})},os=function(e,t){var n=dg(pg(e),t.fraction.length),r="".concat(fg(n,t.group,t.decimal)," ").concat(t.percentSign);return zi(r)},OC=S.forwardRef(function(e,t){var n=e.locale,r=n===void 0?"pt-BR":n;e.mask;var o=e.onChange,i=e.onKeyUp,a=fu(e,["locale","mask","onChange","onKeyUp"]),s=S.useRef(null),l=pu(S.useState(function(){var y,x;return(x=(y=a.value)===null||y===void 0?void 0:y.toString())!==null&&x!==void 0?x:""}),2),c=l[0],u=l[1];S.useImperativeHandle(t,function(){return s.current}),S.useEffect(function(){var y,x=Number.parseFloat("".concat((y=a.value)!==null&&y!==void 0?y:"0")).toFixed(d.fraction.length);u(os(x,d))},[a.value]);var d=S.useMemo(function(){var y=PC(r);return y.percentSign=zi("".concat(y.percentSign)),y},[r]),f=c.length-d.percentSign.length-IC,p=function(y){var x,b=s.current;b&&(b.setSelectionRange(f,f),y&&((x=a.onFocus)===null||x===void 0||x.call(a,y)))},v=function(y){var x=y.currentTarget;if(x.selectionStart!==null){var b=x.selectionStart,E=x.selectionEnd,T=b!==E,I=f<b;!T&&I&&p()}i?.(y)},h=function(y){var x=os(y.target.value,d),b=ns(x);u(x),y.target.value=x,y.target.setAttribute("data-number",b.toString()),o?.(y)};S.useEffect(function(){if(s.current!==null){var y=s.current.value;if(y!==""){var x=os(y,d),b=ns(x);u(x),s.current.value=x,s.current.setAttribute("data-number",b.toString());var E=new InputEvent("change",{});o?.(Mt(Mt({},E),{target:s.current,currentTarget:s.current}))}}},[]),S.useEffect(function(){return p()},[c]);var m=a.defaultValue?os(a.defaultValue,d):void 0;return S.createElement("input",Mt({},a,{defaultValue:m,inputMode:"decimal",onChange:h,onFocus:p,onKeyUp:v,ref:s,type:"text"}))}),ji={dots:/\./g,openParenthesis:/\(/g,closeParenthesis:/\)/g,leadingBars:/\\\\/g,escape:/[.*+?^${}()|[\]\\]/g},_C=function(e){for(var t,n=e.length,r=[],o=0;o<n;o++){var i=e[o],a=is[i];a===void 0?r.push(i.replace(ji.dots,"\\.").replace(ji.openParenthesis,"\\(").replace(ji.closeParenthesis,"\\)")):r.push((t=a.regex)===null||t===void 0?void 0:t.source)}return r.join("").replace(ji.leadingBars,"\\")},Ri=function(e,t,n){var r=typeof e=="function",o=r?"":e;if(r&&(o=e(t)),Array.isArray(o))return mu(o,n);var i=_C(o);return n?"^".concat(i,"$"):i},MC=function(e){return e.replace(ji.escape,"\\$&")},mu=function(e,t){var n=e.map(function(r){return typeof r=="string"?MC(r):r.source}).join("");return new RegExp(t?"^".concat(n,"$"):n).source},is={A:{regex:/[a-zA-Z]/,parse:function(e){return e.toLocaleUpperCase()}},H:{regex:/[a-fA-F0-9]/},X:{regex:/[0-9a-zA-Z]/},a:{regex:/[a-zA-Z]/,parse:function(e){return e.toLocaleLowerCase()}},d:{regex:/\d/,escape:!0},x:{regex:/[a-zA-Z]/}},DC=/\d/,hg="(dd) 9dddd-dddd",mg="(dd) dddd-dddd",gg="ddd.ddd.ddd-dd",vg="dd.ddd.ddd/dddd-dd",as=function(e){return e.replace(/\D/g,"")},NC=["2",/[0-3]/,":",/[0-5]/,/\d/],FC=[/[012]/,/\d/,":",/[0-5]/,/[0-9]/],nn={cep:"ddddd-ddd",date:"dd/dd/dddd",cpf:gg,isoDate:"dddd-dd-dd",cnpj:vg,telephone:mg,cellphone:hg,creditCard:"dddd dddd dddd dddd",uuid:"HHHHHHHH-HHHH-HHHH-HHHH-HHHHHHHHHHHH",color:function(e){return e.length>4?"#HHHHHH":"#HHH"},cpfCnpj:function(e){return as(e).length<=11?gg:vg},int:function(e){return e===void 0&&(e=""),DC.test(e.toString().slice(-1))?"d".repeat(Math.max(e.length,0)):"d".repeat(Math.max(e.length-1,0))},cellTelephone:function(e){var t=as(e);return t.length<11?mg:hg},time:function(e){var t=as(e),n=t[0];return n==="2"?NC:FC}},rn=function(e,t,n){var r;return n===void 0&&(n={}),Mt({mask:e,inputMode:t,strict:!0,pattern:((r=n.pattern)!==null&&r!==void 0?r:typeof e=="function")?void 0:Ri(e,"",!0),infinity:n.infinity},n)},Zt={cellTelephone:rn(nn.cellTelephone,"tel"),cellphone:rn(nn.cellphone,"tel"),cep:rn(nn.cep,"decimal"),cnpj:rn(nn.cnpj,"decimal"),color:rn(nn.color,"decimal",{pattern:"#[a-fA-F0-9]{3}([a-fA-F0-9]{3})?"}),cpf:rn(nn.cpf,"decimal"),cpfCnpj:rn(nn.cpfCnpj,"decimal",{transform:as}),creditCard:rn(nn.creditCard,"decimal",{pattern:"[0-9]{4} [0-9]{4} [0-9]{4} [0-9]{3,4}"}),date:rn(nn.date,"decimal"),int:rn(nn.int,"decimal",{pattern:"[0-9]+"}),isoDate:rn(nn.isoDate,"decimal"),telephone:rn(nn.telephone,"tel"),time:rn(nn.time,"decimal",{pattern:"[0-9]{2}:[0-9]{2}"}),uuid:rn(nn.uuid,"decimal",{pattern:"[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}"})};function yg(e,t,n,r){var o,i;r===void 0&&(r=is);for(var a=n(e),s="",l=0,c=0;l<t.length&&c<a.length;){var u=t[l],d=u instanceof RegExp?u:r[u],f=a[c];if(d===void 0){s+=u,f===u&&(c+=1),l+=1;continue}var p=d instanceof RegExp?{regex:d}:d;p.regex.test(f)&&(s+=(i=(o=p.parse)===null||o===void 0?void 0:o.call(p,f))!==null&&i!==void 0?i:f),c+=1,l+=1}return s}var bg=function(e){return e},LC=function(e,t,n){if(!e||!n)return!1;var r=new RegExp(Ri(e,n,t));return r.test(n)};function VC(e){var t=S.useRef(e);return S.useEffect(function(){t.current=e},[e]),t.current}var $C=S.forwardRef(function(e,t){var n=e.infinity,r=n===void 0?!1:n,o=e.strict,i=o===void 0?!0:o,a=e.transform,s=e.onChange,l=e.pattern,c=e.tokens,u=e.mask,d=e.onChangeText,f=e.as,p=fu(e,["infinity","strict","transform","onChange","pattern","tokens","mask","onChangeText","as"]),v=S.useRef(null);S.useImperativeHandle(t,function(){return v.current});var h=hu(s),m=hu(d),y=hu(u),x=S.useRef(LC(u,i,p.value||p.defaultValue)),b=f??"input",E=pu(S.useState(""),2),T=E[0],I=E[1],w=VC(T),k=S.useCallback(function(N,z){var M,C,L=(M=N??z)!==null&&M!==void 0?M:"";if(u===void 0)return L;var $=(C=L?.toString())!==null&&C!==void 0?C:"";return yg($,typeof u=="function"?u($):u,a??bg,c??is)},[a,u,c]),P=pu(S.useState(function(){return k(p.value,p.defaultValue)}),2),_=P[0],F=P[1],V=k(p.defaultValue,p.defaultValue),D=S.useMemo(function(){if(l||u===void 0)return l;if(typeof u=="function"){var N=u(_);return Array.isArray(N)?mu(N,i):Ri(u,_,i)}return typeof u=="string"?Ri(u,_,i):mu(u,i)},[l,_,i,u]);S.useEffect(function(){if(p.value!==void 0){var N=k(p.value,p.defaultValue);F(N),v.current!==null&&(v.current.value=N)}},[p.value,u,a,p.defaultValue]);var O=function(N){var z,M,C,L,$,B=N.currentTarget,q=N.target.value;if(y.current===void 0)return F(q),(z=m.current)===null||z===void 0||z.call(m,q),(M=h.current)===null||M===void 0||M.call(h,N),d?.(q);var G=new RegExp(Ri(y.current,q,i)),W=(C=B.selectionEnd)!==null&&C!==void 0?C:0,J=function(X,de,H){if(X.type!=="number")return X.setSelectionRange(de,H)};if(r&&x.current&&q.length>=_.length)return B.value=_,J(B,W-1,W-1);var re=!1;q.length<w.length&&(x.current=!1,re=!0),G.test(q)&&(x.current=!0);var ee=W,Y=q[ee-1],K=yg(q,typeof y.current=="function"?y.current(q):y.current,a??bg,c??is);for(B.value=K,F(K);ee<K.length&&K.charAt(ee-1)!==Y;)ee+=1;re?J(B,W,W):J(B,ee,ee),N.target.value=K,I(K),(L=m.current)===null||L===void 0||L.call(m,K),($=h.current)===null||$===void 0||$.call(h,N)};return S.createElement(b,Mt({},p,{ref:v,pattern:D,onChange:O,defaultValue:xg(p.defaultValue)?V:void 0,value:xg(p.value)?k(p.value,p.value):p.value}))}),xg=function(e){return typeof e=="string"},wg=S.forwardRef(function(e,t){return EC(e.mask)?S.createElement(CC,Mt({},e,{mask:void 0,ref:t})):AC(e.mask)?S.createElement(OC,Mt({},e,{mask:void 0,ref:t})):S.createElement($C,Mt({},e,{ref:t}))}),on=function(e){return function(t){return S.createElement(wg,Mt({},e,t))}};on(Zt.cellTelephone),on(Zt.cellphone),on(Zt.cep),on(Zt.cnpj),on(Zt.color),on(Zt.cpf),on(Zt.cpfCnpj),on(Zt.creditCard),on(Zt.date),on(Zt.int),on(Zt.isoDate),on(Zt.telephone),on(Zt.time),on(Zt.uuid);var Sg=S.forwardRef(function(t,n){var r=S.useMemo(function(){if(t.mask)return typeof t.mask=="string"&&TC(Zt,t.mask)?Zt[t.mask]:{mask:t.mask}},[t.mask]),o=Mt(Mt({},t),r);return S.createElement(wg,Mt({},o,{ref:n}))});const zC=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),jC=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase()),Tg=e=>{const t=jC(e);return t.charAt(0).toUpperCase()+t.slice(1)},Eg=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim(),RC=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};var BC={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const HC=S.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:i,iconNode:a,...s},l)=>S.createElement("svg",{ref:l,...BC,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:Eg("lucide",o),...!i&&!RC(s)&&{"aria-hidden":"true"},...s},[...a.map(([c,u])=>S.createElement(c,u)),...Array.isArray(i)?i:[i]]));const at=(e,t)=>{const n=S.forwardRef(({className:r,...o},i)=>S.createElement(HC,{ref:i,iconNode:t,className:Eg(`lucide-${zC(Tg(e))}`,`lucide-${e}`,r),...o}));return n.displayName=Tg(e),n};const WC=at("arrow-down-0-1",[["path",{d:"m3 16 4 4 4-4",key:"1co6wj"}],["path",{d:"M7 20V4",key:"1yoxec"}],["rect",{x:"15",y:"4",width:"4",height:"6",ry:"2",key:"1bwicg"}],["path",{d:"M17 20v-6h-2",key:"1qp1so"}],["path",{d:"M15 20h4",key:"1j968p"}]]);const qC=at("arrow-up-0-1",[["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}],["rect",{x:"15",y:"4",width:"4",height:"6",ry:"2",key:"1bwicg"}],["path",{d:"M17 20v-6h-2",key:"1qp1so"}],["path",{d:"M15 20h4",key:"1j968p"}]]);const kg=at("arrow-up-down",[["path",{d:"m21 16-4 4-4-4",key:"f6ql7i"}],["path",{d:"M17 20V4",key:"1ejh1v"}],["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}]]);const UC=at("audio-lines",[["path",{d:"M2 10v3",key:"1fnikh"}],["path",{d:"M6 6v11",key:"11sgs0"}],["path",{d:"M10 3v18",key:"yhl04a"}],["path",{d:"M14 8v7",key:"3a1oy3"}],["path",{d:"M18 5v13",key:"123xd1"}],["path",{d:"M22 10v3",key:"154ddg"}]]);const GC=at("calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]]);const gu=at("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);const YC=at("chevron-left",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);const vu=at("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);const Cg=at("circle-check-big",[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);const KC=at("circle-x",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);const ZC=at("command",[["path",{d:"M15 6v12a3 3 0 1 0 3-3H6a3 3 0 1 0 3 3V6a3 3 0 1 0-3 3h12a3 3 0 1 0-3-3",key:"11bfej"}]]);const XC=at("file-braces",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 12a1 1 0 0 0-1 1v1a1 1 0 0 1-1 1 1 1 0 0 1 1 1v1a1 1 0 0 0 1 1",key:"1oajmo"}],["path",{d:"M14 18a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1 1 1 0 0 1-1-1v-1a1 1 0 0 0-1-1",key:"mpwhp6"}]]);const Ig=at("file-text",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);const Ag=at("file-video-camera",[["path",{d:"M4 12V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.706.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2",key:"jrl274"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"m10 17.843 3.033-1.755a.64.64 0 0 1 .967.56v4.704a.65.65 0 0 1-.967.56L10 20.157",key:"17aeo9"}],["rect",{width:"7",height:"6",x:"3",y:"16",rx:"1",key:"s27ndx"}]]);const Pg=at("file",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}]]);const QC=at("folder-open",[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]]);const JC=at("folder",[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]]);const yu=at("funnel",[["path",{d:"M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z",key:"sc7q7i"}]]);const eI=at("grip-vertical",[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]]);const bu=at("info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);const tI=at("list-filter",[["path",{d:"M2 5h20",key:"1fs1ex"}],["path",{d:"M6 12h12",key:"8npq4p"}],["path",{d:"M9 19h6",key:"456am0"}]]);const nI=at("option",[["path",{d:"M3 3h6l6 18h6",key:"ph9rgk"}],["path",{d:"M14 3h7",key:"16f0ms"}]]);const xu=at("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);const rI=at("search-check",[["path",{d:"m8 11 2 2 4-4",key:"1sed1v"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);const oI=at("search-x",[["path",{d:"m13.5 8.5-5 5",key:"1cs55j"}],["path",{d:"m8.5 8.5 5 5",key:"a8mexj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);const wu=at("sheet",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["line",{x1:"3",x2:"21",y1:"9",y2:"9",key:"1vqk6q"}],["line",{x1:"3",x2:"21",y1:"15",y2:"15",key:"o2sbyz"}],["line",{x1:"9",x2:"9",y1:"9",y2:"21",key:"1ib60c"}],["line",{x1:"15",x2:"15",y1:"9",y2:"21",key:"1n26ft"}]]);const ss=at("trash-2",[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]]);const iI=at("triangle-alert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);const aI=at("ungroup",[["rect",{width:"8",height:"6",x:"5",y:"4",rx:"1",key:"nzclkv"}],["rect",{width:"8",height:"6",x:"11",y:"14",rx:"1",key:"4tytwb"}]]);const Mo=at("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),ls={hex:e=>e,raw:e=>e,hsl:e=>`hsl(${e})`,rgb:e=>`rgb(${e})`,z:(e,t,n)=>`var(--z-${n})`,hsla:e=>`hsla(${e})`,rgba:e=>`rgba(${e})`,cssVariable:(e,t,n)=>`var(--${n})`,formatWithVar:e=>(t,n,r)=>`${e}(var(--${r}), <alpha-value>)`},yr=(e,t,n="",r="")=>Object.entries(e).reduce((o,[i,a])=>{const s=r===""?`${n}${i}`:`${r}-${i}`;if(typeof a=="string"){const l=r===""?`${n}${i}`:i;return o.concat(t(a,l,s))}return o.concat(yr(a,t,n,s))},[]),Og=(e,t,n="",r="")=>Object.entries(e).reduce((o,[i,a])=>{const s=r===""?`${n}${i}`:`${r}-${i}`;if(typeof a=="string"){const l=r===""?`${n}${i}`:i;return{...o,[l]:t(a,i,s)}}return{...o,[i]:Og(a,t,n,s)}},{}),_g={default:e=>`:root { ${e} }`,dark:e=>`html.dark {${e}}`},cs=(e,t)=>{const n=t.value||((o,i)=>i),r=e.map(o=>`${o.key}: ${n(o.key,o.value)}`).join(";");return t.result(r)},sI={default:e=>cs(e,{result:_g.default}),dark:e=>cs(e,{result:_g.dark})},Do=e=>(t,n,r)=>{const o={key:`--${r}`,value:`${t}`};return e?e(o):o},lI=e=>({key:e.key.replace(/^--/,"--z-"),value:e.value}),Su=(e,t)=>{const n=yr(e.colors,Do(t?.colors)),r=yr(e.spacing,Do(t?.spacing)),o=yr(e.rounded,Do(t?.rounded)),i=yr(e.shadow,Do(t?.rounded)),a=yr(e.zIndex,Do(t?.zIndex??lI)),s=e.custom?yr(e.custom,Do(t?.customTokens)):[];return n.concat(r,o,s,a,i)},cI=(e,t)=>cs(Su(e),{result:n=>`html${t?`.${t}`:""} {${n}}`,value:(n,r)=>r.replace("hsla(","").replace(")","")}),uI=(e,t)=>Su(e,t).reduce((r,o)=>({...r,[o.key]:o.value}),{}),dI=(e,t)=>cs(Su(e,t),{result:n=>`html${t?.name?`.${t.name}`:""} {${n}}`,value:(n,r)=>r}),us={autocompleteEmpty:"Nothing here...",calendarBackMonth:"Back month",calendarFromDate:"From",calendarMonthLabel:"Month",calendarNextMonth:"Next month",calendarDatetimeTitle:"Time",calendarToDate:"To",calendarToday:"Today",commandPaletteEmpty:"Nothing here...",commandPaletteLoading:"Loading...",datePickerCalendarButtonLabel:"Click to open a date picker",emptyDataMessage:"No data",inputCaretDown:"Click to see all options",inputCloseValue:"Click to clear the value",inputOptionalLabel:"Optional",driverNext:"Next",driverPrevious:"Previous",driverFinish:"Finish",driverSkip:"Skip",multiSelectInnerPlaceholder:"Search...",multiSelectSelectedLabel:"Selected",tableColumnResizer:"Resize column",tableFilterColumnPlaceholder:"Filter by",tableFilterColumnTitle:"Filter by",tableFilterDropdownTitle:"Filters",tableFilterDropdownTitleUnique:"Filter by",tableFilterLabel:"Filters",tableFilterNewFilter:"New filter",tableFilterOperatorPlaceholder:"Equals to...",tableFilterOperatorTitle:"Operation",tableFilterTypeContains:"Contains",tableFilterTypeEndsWith:"Ends with",tableFilterTypeGreaterThan:"Greater than",tableFilterTypeIs:"Is",tableFilterTypeIsNot:"Is not",tableFilterTypeLessThan:"Less than",tableFilterTypeNotContains:"Not contains",tableFilterTypeStartsWith:"Starts with",tableFilterValuePlaceholder:"Something...",tableFilterValueTitle:"Value",tableGroupLabel:"Group",tableGroupLabelWithCount:"Group",tablePaginationFooter:e=>g.jsxs(S.Fragment,{children:[e.current," to ",e.pages," of ",e.totalItems," items.",Array.isArray(e.sizes)?e.select:null," ","per page."]}),tablePaginationNext:"Next",tablePaginationPrevious:"Previous",tablePaginationSelectLabel:"Select the size of page",tableSortAddButton:"Add sort",tableSortAsc:"Ascending",tableSortDesc:"Descending",tableSortDropdownTitle:"Order by",tableSortOrderByLabel:"Order by",tableSortOrderInputPlaceholder:"Order by",tableSortOrderInputTitle:"Order by",tableSortTypeInputPlaceholder:"Ascending",tableSortTypeInputTitle:"Sort type",uploadIdle:"You can drag your files here",uploadIdleButton:"Choose your files",uploadDragging:e=>`Dragging ${e.n} ${e.n>0?"files":"file"}`,uploadDialogTitle:"Details of your file",datepickerPlaceholder:e=>"day/month/year"},ds={input:{iconFeedback:!0},table:{operations:!0,sorters:!0,filters:!0,sticky:void 0}},Kr=S.createContext({parser:ls.hsla,tweaks:ds,floatingRef:void 0,map:us,locale:void 0}),Pt=()=>{const e=S.useContext(Kr);return e?e.map:us},Tu=()=>{const e=S.useContext(Kr);return e?e.tweaks:ds};function fs(){return typeof window<"u"}function br(e){return ps(e)?(e.nodeName||"").toLowerCase():"#document"}function qt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Bn(e){var t;return(t=(ps(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function ps(e){return fs()?e instanceof Node||e instanceof qt(e).Node:!1}function tt(e){return fs()?e instanceof Element||e instanceof qt(e).Element:!1}function Ot(e){return fs()?e instanceof HTMLElement||e instanceof qt(e).HTMLElement:!1}function Bi(e){return!fs()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof qt(e).ShadowRoot}const fI=new Set(["inline","contents"]);function Hi(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=cn(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!fI.has(o)}const pI=new Set(["table","td","th"]);function hI(e){return pI.has(br(e))}const mI=[":popover-open",":modal"];function hs(e){return mI.some(t=>{try{return e.matches(t)}catch{return!1}})}const gI=["transform","translate","scale","rotate","perspective"],vI=["transform","translate","scale","rotate","perspective","filter"],yI=["paint","layout","strict","content"];function Eu(e){const t=ms(),n=tt(e)?cn(e):e;return gI.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||vI.some(r=>(n.willChange||"").includes(r))||yI.some(r=>(n.contain||"").includes(r))}function bI(e){let t=cr(e);for(;Ot(t)&&!lr(t);){if(Eu(t))return t;if(hs(t))return null;t=cr(t)}return null}function ms(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const xI=new Set(["html","body","#document"]);function lr(e){return xI.has(br(e))}function cn(e){return qt(e).getComputedStyle(e)}function gs(e){return tt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function cr(e){if(br(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Bi(e)&&e.host||Bn(e);return Bi(t)?t.host:t}function Mg(e){const t=cr(e);return lr(t)?e.ownerDocument?e.ownerDocument.body:e.body:Ot(t)&&Hi(t)?t:Mg(t)}function xr(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=Mg(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),a=qt(o);if(i){const s=ku(a);return t.concat(a,a.visualViewport||[],Hi(o)?o:[],s&&n?xr(s):[])}return t.concat(o,xr(o,[],n))}function ku(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}const wI=["top","right","bottom","left"],Dg=["start","end"],Ng=wI.reduce((e,t)=>e.concat(t,t+"-"+Dg[0],t+"-"+Dg[1]),[]),wr=Math.min,un=Math.max,vs=Math.round,No=Math.floor,Hn=e=>({x:e,y:e}),SI={left:"right",right:"left",bottom:"top",top:"bottom"},TI={start:"end",end:"start"};function Cu(e,t,n){return un(e,wr(t,n))}function Zr(e,t){return typeof e=="function"?e(t):e}function Wn(e){return e.split("-")[0]}function kn(e){return e.split("-")[1]}function Fg(e){return e==="x"?"y":"x"}function Iu(e){return e==="y"?"height":"width"}const EI=new Set(["top","bottom"]);function ur(e){return EI.has(Wn(e))?"y":"x"}function Au(e){return Fg(ur(e))}function Lg(e,t,n){n===void 0&&(n=!1);const r=kn(e),o=Au(e),i=Iu(o);let a=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=bs(a)),[a,bs(a)]}function kI(e){const t=bs(e);return[ys(e),t,ys(t)]}function ys(e){return e.replace(/start|end/g,t=>TI[t])}const Vg=["left","right"],$g=["right","left"],CI=["top","bottom"],II=["bottom","top"];function AI(e,t,n){switch(e){case"top":case"bottom":return n?t?$g:Vg:t?Vg:$g;case"left":case"right":return t?CI:II;default:return[]}}function PI(e,t,n,r){const o=kn(e);let i=AI(Wn(e),n==="start",r);return o&&(i=i.map(a=>a+"-"+o),t&&(i=i.concat(i.map(ys)))),i}function bs(e){return e.replace(/left|right|bottom|top/g,t=>SI[t])}function OI(e){return{top:0,right:0,bottom:0,left:0,...e}}function zg(e){return typeof e!="number"?OI(e):{top:e,right:e,bottom:e,left:e}}function xs(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}var _I=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"],ws=_I.join(","),jg=typeof Element>"u",Fo=jg?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Ss=!jg&&Element.prototype.getRootNode?function(e){var t;return e==null||(t=e.getRootNode)===null||t===void 0?void 0:t.call(e)}:function(e){return e?.ownerDocument},Ts=function e(t,n){var r;n===void 0&&(n=!0);var o=t==null||(r=t.getAttribute)===null||r===void 0?void 0:r.call(t,"inert"),i=o===""||o==="true",a=i||n&&t&&e(t.parentNode);return a},MI=function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"},Rg=function(t,n,r){if(Ts(t))return[];var o=Array.prototype.slice.apply(t.querySelectorAll(ws));return n&&Fo.call(t,ws)&&o.unshift(t),o=o.filter(r),o},Bg=function e(t,n,r){for(var o=[],i=Array.from(t);i.length;){var a=i.shift();if(!Ts(a,!1))if(a.tagName==="SLOT"){var s=a.assignedElements(),l=s.length?s:a.children,c=e(l,!0,r);r.flatten?o.push.apply(o,c):o.push({scopeParent:a,candidates:c})}else{var u=Fo.call(a,ws);u&&r.filter(a)&&(n||!t.includes(a))&&o.push(a);var d=a.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(a),f=!Ts(d,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(a));if(d&&f){var p=e(d===!0?a.children:d.children,!0,r);r.flatten?o.push.apply(o,p):o.push({scopeParent:a,candidates:p})}else i.unshift.apply(i,a.children)}}return o},Hg=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},Wg=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||MI(t))&&!Hg(t)?0:t.tabIndex},DI=function(t,n){var r=Wg(t);return r<0&&n&&!Hg(t)?0:r},NI=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},qg=function(t){return t.tagName==="INPUT"},FI=function(t){return qg(t)&&t.type==="hidden"},LI=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},VI=function(t,n){for(var r=0;r<t.length;r++)if(t[r].checked&&t[r].form===n)return t[r]},$I=function(t){if(!t.name)return!0;var n=t.form||Ss(t),r=function(s){return n.querySelectorAll('input[type="radio"][name="'+s+'"]')},o;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")o=r(window.CSS.escape(t.name));else try{o=r(t.name)}catch(a){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",a.message),!1}var i=VI(o,t.form);return!i||i===t},zI=function(t){return qg(t)&&t.type==="radio"},jI=function(t){return zI(t)&&!$I(t)},RI=function(t){var n,r=t&&Ss(t),o=(n=r)===null||n===void 0?void 0:n.host,i=!1;if(r&&r!==t){var a,s,l;for(i=!!((a=o)!==null&&a!==void 0&&(s=a.ownerDocument)!==null&&s!==void 0&&s.contains(o)||t!=null&&(l=t.ownerDocument)!==null&&l!==void 0&&l.contains(t));!i&&o;){var c,u,d;r=Ss(o),o=(c=r)===null||c===void 0?void 0:c.host,i=!!((u=o)!==null&&u!==void 0&&(d=u.ownerDocument)!==null&&d!==void 0&&d.contains(o))}}return i},Ug=function(t){var n=t.getBoundingClientRect(),r=n.width,o=n.height;return r===0&&o===0},BI=function(t,n){var r=n.displayCheck,o=n.getShadowRoot;if(getComputedStyle(t).visibility==="hidden")return!0;var i=Fo.call(t,"details>summary:first-of-type"),a=i?t.parentElement:t;if(Fo.call(a,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="legacy-full"){if(typeof o=="function"){for(var s=t;t;){var l=t.parentElement,c=Ss(t);if(l&&!l.shadowRoot&&o(l)===!0)return Ug(t);t.assignedSlot?t=t.assignedSlot:!l&&c!==t.ownerDocument?t=c.host:t=l}t=s}if(RI(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return Ug(t);return!1},HI=function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var n=t.parentElement;n;){if(n.tagName==="FIELDSET"&&n.disabled){for(var r=0;r<n.children.length;r++){var o=n.children.item(r);if(o.tagName==="LEGEND")return Fo.call(n,"fieldset[disabled] *")?!0:!o.contains(t)}return!0}n=n.parentElement}return!1},Pu=function(t,n){return!(n.disabled||Ts(n)||FI(n)||BI(n,t)||LI(n)||HI(n))},Ou=function(t,n){return!(jI(n)||Wg(n)<0||!Pu(t,n))},WI=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},qI=function e(t){var n=[],r=[];return t.forEach(function(o,i){var a=!!o.scopeParent,s=a?o.scopeParent:o,l=DI(s,a),c=a?e(o.candidates):s;l===0?a?n.push.apply(n,c):n.push(s):r.push({documentOrder:i,tabIndex:l,item:o,isScope:a,content:c})}),r.sort(NI).reduce(function(o,i){return i.isScope?o.push.apply(o,i.content):o.push(i.content),o},[]).concat(n)},Es=function(t,n){n=n||{};var r;return n.getShadowRoot?r=Bg([t],n.includeContainer,{filter:Ou.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:WI}):r=Rg(t,n.includeContainer,Ou.bind(null,n)),qI(r)},UI=function(t,n){n=n||{};var r;return n.getShadowRoot?r=Bg([t],n.includeContainer,{filter:Pu.bind(null,n),flatten:!0,getShadowRoot:n.getShadowRoot}):r=Rg(t,n.includeContainer,Pu.bind(null,n)),r},Gg=function(t,n){if(n=n||{},!t)throw new Error("No node provided");return Fo.call(t,ws)===!1?!1:Ou(n,t)};function _u(){const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function Yg(){const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(t=>{let{brand:n,version:r}=t;return n+"/"+r}).join(" "):navigator.userAgent}function Kg(){return/apple/i.test(navigator.vendor)}function Mu(){const e=/android/i;return e.test(_u())||e.test(Yg())}function GI(){return _u().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function Zg(){return Yg().includes("jsdom/")}const Xg="data-floating-ui-focusable",YI="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])",Du="ArrowLeft",Nu="ArrowRight",KI="ArrowUp",ZI="ArrowDown";function qn(e){let t=e.activeElement;for(;((n=t)==null||(n=n.shadowRoot)==null?void 0:n.activeElement)!=null;){var n;t=t.shadowRoot.activeElement}return t}function Ht(e,t){if(!e||!t)return!1;const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&Bi(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function Un(e){return"composedPath"in e?e.composedPath()[0]:e.target}function Fu(e,t){if(t==null)return!1;if("composedPath"in e)return e.composedPath().includes(t);const n=e;return n.target!=null&&t.contains(n.target)}function XI(e){return e.matches("html,body")}function Ut(e){return e?.ownerDocument||document}function Lu(e){return Ot(e)&&e.matches(YI)}function Vu(e){return e?e.getAttribute("role")==="combobox"&&Lu(e):!1}function QI(e){if(!e||Zg())return!0;try{return e.matches(":focus-visible")}catch{return!0}}function ks(e){return e?e.hasAttribute(Xg)?e:e.querySelector("["+Xg+"]")||e:null}function Xr(e,t,n){return n===void 0&&(n=!0),e.filter(o=>{var i;return o.parentId===t&&(!n||((i=o.context)==null?void 0:i.open))}).flatMap(o=>[o,...Xr(e,o.id,n)])}function JI(e,t){let n,r=-1;function o(i,a){a>r&&(n=i,r=a),Xr(e,i).forEach(l=>{o(l.id,a+1)})}return o(t,0),e.find(i=>i.id===n)}function Qg(e,t){var n;let r=[],o=(n=e.find(i=>i.id===t))==null?void 0:n.parentId;for(;o;){const i=e.find(a=>a.id===o);o=i?.parentId,i&&(r=r.concat(i))}return r}function Gt(e){e.preventDefault(),e.stopPropagation()}function eA(e){return"nativeEvent"in e}function Jg(e){return e.mozInputSource===0&&e.isTrusted?!0:Mu()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function ev(e){return Zg()?!1:!Mu()&&e.width===0&&e.height===0||Mu()&&e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType==="mouse"||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0&&e.pointerType==="touch"}function Lo(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}var tA=typeof document<"u",nA=function(){},nt=tA?S.useLayoutEffect:nA;const rA={...A};function Wt(e){const t=A.useRef(e);return nt(()=>{t.current=e}),t}const oA=rA.useInsertionEffect||(e=>e());function kt(e){const t=A.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return oA(()=>{t.current=e}),A.useCallback(function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return t.current==null?void 0:t.current(...r)},[])}function Cs(e,t,n){return Math.floor(e/t)!==n}function Wi(e,t){return t<0||t>=e.current.length}function $u(e,t){return Xt(e,{disabledIndices:t})}function tv(e,t){return Xt(e,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function Xt(e,t){let{startingIndex:n=-1,decrement:r=!1,disabledIndices:o,amount:i=1}=t===void 0?{}:t,a=n;do a+=r?-i:i;while(a>=0&&a<=e.current.length-1&&Is(e,a,o));return a}function iA(e,t){let{event:n,orientation:r,loop:o,rtl:i,cols:a,disabledIndices:s,minIndex:l,maxIndex:c,prevIndex:u,stopEvent:d=!1}=t,f=u;if(n.key===KI){if(d&&Gt(n),u===-1)f=c;else if(f=Xt(e,{startingIndex:f,amount:a,decrement:!0,disabledIndices:s}),o&&(u-a<l||f<0)){const p=u%a,v=c%a,h=c-(v-p);v===p?f=c:f=v>p?h:h-a}Wi(e,f)&&(f=u)}if(n.key===ZI&&(d&&Gt(n),u===-1?f=l:(f=Xt(e,{startingIndex:u,amount:a,disabledIndices:s}),o&&u+a>c&&(f=Xt(e,{startingIndex:u%a-a,amount:a,disabledIndices:s}))),Wi(e,f)&&(f=u)),r==="both"){const p=No(u/a);n.key===(i?Du:Nu)&&(d&&Gt(n),u%a!==a-1?(f=Xt(e,{startingIndex:u,disabledIndices:s}),o&&Cs(f,a,p)&&(f=Xt(e,{startingIndex:u-u%a-1,disabledIndices:s}))):o&&(f=Xt(e,{startingIndex:u-u%a-1,disabledIndices:s})),Cs(f,a,p)&&(f=u)),n.key===(i?Nu:Du)&&(d&&Gt(n),u%a!==0?(f=Xt(e,{startingIndex:u,decrement:!0,disabledIndices:s}),o&&Cs(f,a,p)&&(f=Xt(e,{startingIndex:u+(a-u%a),decrement:!0,disabledIndices:s}))):o&&(f=Xt(e,{startingIndex:u+(a-u%a),decrement:!0,disabledIndices:s})),Cs(f,a,p)&&(f=u));const v=No(c/a)===p;Wi(e,f)&&(o&&v?f=n.key===(i?Nu:Du)?c:Xt(e,{startingIndex:u-u%a-1,disabledIndices:s}):f=u)}return f}function aA(e,t,n){const r=[];let o=0;return e.forEach((i,a)=>{let{width:s,height:l}=i;if(s>t&&process.env.NODE_ENV!=="production")throw new Error("[Floating UI]: Invalid grid - item width at index "+a+" is greater than grid columns");let c=!1;for(n&&(o=0);!c;){const u=[];for(let d=0;d<s;d++)for(let f=0;f<l;f++)u.push(o+d+f*t);o%t+s<=t&&u.every(d=>r[d]==null)?(u.forEach(d=>{r[d]=a}),c=!0):o++}}),[...r]}function sA(e,t,n,r,o){if(e===-1)return-1;const i=n.indexOf(e),a=t[e];switch(o){case"tl":return i;case"tr":return a?i+a.width-1:i;case"bl":return a?i+(a.height-1)*r:i;case"br":return n.lastIndexOf(e)}}function lA(e,t){return t.flatMap((n,r)=>e.includes(n)?[r]:[])}function Is(e,t,n){if(typeof n=="function")return n(t);if(n)return n.includes(t);const r=e.current[t];return r==null||r.hasAttribute("disabled")||r.getAttribute("aria-disabled")==="true"}const qi=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function nv(e,t){const n=Es(e,qi()),r=n.length;if(r===0)return;const o=qn(Ut(e)),i=n.indexOf(o),a=i===-1?t===1?0:r-1:i+t;return n[a]}function rv(e){return nv(Ut(e).body,1)||e}function ov(e){return nv(Ut(e).body,-1)||e}function Ui(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!Ht(n,r)}function cA(e){Es(e,qi()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function iv(e){e.querySelectorAll("[data-tabindex]").forEach(n=>{const r=n.dataset.tabindex;delete n.dataset.tabindex,r?n.setAttribute("tabindex",r):n.removeAttribute("tabindex")})}function av(e,t,n){let{reference:r,floating:o}=e;const i=ur(t),a=Au(t),s=Iu(a),l=Wn(t),c=i==="y",u=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,f=r[s]/2-o[s]/2;let p;switch(l){case"top":p={x:u,y:r.y-o.height};break;case"bottom":p={x:u,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:d};break;case"left":p={x:r.x-o.width,y:d};break;default:p={x:r.x,y:r.y}}switch(kn(t)){case"start":p[a]-=f*(n&&c?-1:1);break;case"end":p[a]+=f*(n&&c?-1:1);break}return p}const uA=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:a}=n,s=i.filter(Boolean),l=await(a.isRTL==null?void 0:a.isRTL(t));let c=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:d}=av(c,r,l),f=r,p={},v=0;for(let h=0;h<s.length;h++){const{name:m,fn:y}=s[h],{x,y:b,data:E,reset:T}=await y({x:u,y:d,initialPlacement:r,placement:f,strategy:o,middlewareData:p,rects:c,platform:a,elements:{reference:e,floating:t}});u=x??u,d=b??d,p={...p,[m]:{...p[m],...E}},T&&v<=50&&(v++,typeof T=="object"&&(T.placement&&(f=T.placement),T.rects&&(c=T.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:o}):T.rects),{x:u,y:d}=av(c,f,l)),h=-1)}return{x:u,y:d,placement:f,strategy:o,middlewareData:p}};async function As(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:i,rects:a,elements:s,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:f=!1,padding:p=0}=Zr(t,e),v=zg(p),m=s[f?d==="floating"?"reference":"floating":d],y=xs(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(m)))==null||n?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(s.floating)),boundary:c,rootBoundary:u,strategy:l})),x=d==="floating"?{x:r,y:o,width:a.floating.width,height:a.floating.height}:a.reference,b=await(i.getOffsetParent==null?void 0:i.getOffsetParent(s.floating)),E=await(i.isElement==null?void 0:i.isElement(b))?await(i.getScale==null?void 0:i.getScale(b))||{x:1,y:1}:{x:1,y:1},T=xs(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:x,offsetParent:b,strategy:l}):x);return{top:(y.top-T.top+v.top)/E.y,bottom:(T.bottom-y.bottom+v.bottom)/E.y,left:(y.left-T.left+v.left)/E.x,right:(T.right-y.right+v.right)/E.x}}const dA=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:a,elements:s,middlewareData:l}=t,{element:c,padding:u=0}=Zr(e,t)||{};if(c==null)return{};const d=zg(u),f={x:n,y:r},p=Au(o),v=Iu(p),h=await a.getDimensions(c),m=p==="y",y=m?"top":"left",x=m?"bottom":"right",b=m?"clientHeight":"clientWidth",E=i.reference[v]+i.reference[p]-f[p]-i.floating[v],T=f[p]-i.reference[p],I=await(a.getOffsetParent==null?void 0:a.getOffsetParent(c));let w=I?I[b]:0;(!w||!await(a.isElement==null?void 0:a.isElement(I)))&&(w=s.floating[b]||i.floating[v]);const k=E/2-T/2,P=w/2-h[v]/2-1,_=wr(d[y],P),F=wr(d[x],P),V=_,D=w-h[v]-F,O=w/2-h[v]/2+k,N=Cu(V,O,D),z=!l.arrow&&kn(o)!=null&&O!==N&&i.reference[v]/2-(O<V?_:F)-h[v]/2<0,M=z?O<V?O-V:O-D:0;return{[p]:f[p]+M,data:{[p]:N,centerOffset:O-N-M,...z&&{alignmentOffset:M}},reset:z}}});function fA(e,t,n){return(e?[...n.filter(o=>kn(o)===e),...n.filter(o=>kn(o)!==e)]:n.filter(o=>Wn(o)===o)).filter(o=>e?kn(o)===e||(t?ys(o)!==o:!1):!0)}const pA=function(e){return e===void 0&&(e={}),{name:"autoPlacement",options:e,async fn(t){var n,r,o;const{rects:i,middlewareData:a,placement:s,platform:l,elements:c}=t,{crossAxis:u=!1,alignment:d,allowedPlacements:f=Ng,autoAlignment:p=!0,...v}=Zr(e,t),h=d!==void 0||f===Ng?fA(d||null,p,f):f,m=await As(t,v),y=((n=a.autoPlacement)==null?void 0:n.index)||0,x=h[y];if(x==null)return{};const b=Lg(x,i,await(l.isRTL==null?void 0:l.isRTL(c.floating)));if(s!==x)return{reset:{placement:h[0]}};const E=[m[Wn(x)],m[b[0]],m[b[1]]],T=[...((r=a.autoPlacement)==null?void 0:r.overflows)||[],{placement:x,overflows:E}],I=h[y+1];if(I)return{data:{index:y+1,overflows:T},reset:{placement:I}};const w=T.map(_=>{const F=kn(_.placement);return[_.placement,F&&u?_.overflows.slice(0,2).reduce((V,D)=>V+D,0):_.overflows[0],_.overflows]}).sort((_,F)=>_[1]-F[1]),P=((o=w.filter(_=>_[2].slice(0,kn(_[0])?2:3).every(F=>F<=0))[0])==null?void 0:o[0])||w[0][0];return P!==s?{data:{index:y+1,overflows:T},reset:{placement:P}}:{}}}},hA=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:a,initialPlacement:s,platform:l,elements:c}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:v="none",flipAlignment:h=!0,...m}=Zr(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const y=Wn(o),x=ur(s),b=Wn(s)===s,E=await(l.isRTL==null?void 0:l.isRTL(c.floating)),T=f||(b||!h?[bs(s)]:kI(s)),I=v!=="none";!f&&I&&T.push(...PI(s,h,v,E));const w=[s,...T],k=await As(t,m),P=[];let _=((r=i.flip)==null?void 0:r.overflows)||[];if(u&&P.push(k[y]),d){const O=Lg(o,a,E);P.push(k[O[0]],k[O[1]])}if(_=[..._,{placement:o,overflows:P}],!P.every(O=>O<=0)){var F,V;const O=(((F=i.flip)==null?void 0:F.index)||0)+1,N=w[O];if(N&&(!(d==="alignment"?x!==ur(N):!1)||_.every(C=>ur(C.placement)===x?C.overflows[0]>0:!0)))return{data:{index:O,overflows:_},reset:{placement:N}};let z=(V=_.filter(M=>M.overflows[0]<=0).sort((M,C)=>M.overflows[1]-C.overflows[1])[0])==null?void 0:V.placement;if(!z)switch(p){case"bestFit":{var D;const M=(D=_.filter(C=>{if(I){const L=ur(C.placement);return L===x||L==="y"}return!0}).map(C=>[C.placement,C.overflows.filter(L=>L>0).reduce((L,$)=>L+$,0)]).sort((C,L)=>C[1]-L[1])[0])==null?void 0:D[0];M&&(z=M);break}case"initialPlacement":z=s;break}if(o!==z)return{reset:{placement:z}}}return{}}}},mA=new Set(["left","top"]);async function gA(e,t){const{placement:n,platform:r,elements:o}=e,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),a=Wn(n),s=kn(n),l=ur(n)==="y",c=mA.has(a)?-1:1,u=i&&l?-1:1,d=Zr(t,e);let{mainAxis:f,crossAxis:p,alignmentAxis:v}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof v=="number"&&(p=s==="end"?v*-1:v),l?{x:p*u,y:f*c}:{x:f*c,y:p*u}}const vA=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:a,middlewareData:s}=t,l=await gA(t,e);return a===((n=s.offset)==null?void 0:n.placement)&&(r=s.arrow)!=null&&r.alignmentOffset?{}:{x:o+l.x,y:i+l.y,data:{...l,placement:a}}}}},yA=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:a=!1,limiter:s={fn:m=>{let{x:y,y:x}=m;return{x:y,y:x}}},...l}=Zr(e,t),c={x:n,y:r},u=await As(t,l),d=ur(Wn(o)),f=Fg(d);let p=c[f],v=c[d];if(i){const m=f==="y"?"top":"left",y=f==="y"?"bottom":"right",x=p+u[m],b=p-u[y];p=Cu(x,p,b)}if(a){const m=d==="y"?"top":"left",y=d==="y"?"bottom":"right",x=v+u[m],b=v-u[y];v=Cu(x,v,b)}const h=s.fn({...t,[f]:p,[d]:v});return{...h,data:{x:h.x-n,y:h.y-r,enabled:{[f]:i,[d]:a}}}}}},bA=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:i,platform:a,elements:s}=t,{apply:l=()=>{},...c}=Zr(e,t),u=await As(t,c),d=Wn(o),f=kn(o),p=ur(o)==="y",{width:v,height:h}=i.floating;let m,y;d==="top"||d==="bottom"?(m=d,y=f===(await(a.isRTL==null?void 0:a.isRTL(s.floating))?"start":"end")?"left":"right"):(y=d,m=f==="end"?"top":"bottom");const x=h-u.top-u.bottom,b=v-u.left-u.right,E=wr(h-u[m],x),T=wr(v-u[y],b),I=!t.middlewareData.shift;let w=E,k=T;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(k=b),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(w=x),I&&!f){const _=un(u.left,0),F=un(u.right,0),V=un(u.top,0),D=un(u.bottom,0);p?k=v-2*(_!==0||F!==0?_+F:un(u.left,u.right)):w=h-2*(V!==0||D!==0?V+D:un(u.top,u.bottom))}await l({...t,availableWidth:k,availableHeight:w});const P=await a.getDimensions(s.floating);return v!==P.width||h!==P.height?{reset:{rects:!0}}:{}}}};function sv(e){const t=cn(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Ot(e),i=o?e.offsetWidth:n,a=o?e.offsetHeight:r,s=vs(n)!==i||vs(r)!==a;return s&&(n=i,r=a),{width:n,height:r,$:s}}function zu(e){return tt(e)?e:e.contextElement}function Vo(e){const t=zu(e);if(!Ot(t))return Hn(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=sv(t);let a=(i?vs(n.width):n.width)/r,s=(i?vs(n.height):n.height)/o;return(!a||!Number.isFinite(a))&&(a=1),(!s||!Number.isFinite(s))&&(s=1),{x:a,y:s}}const xA=Hn(0);function lv(e){const t=qt(e);return!ms()||!t.visualViewport?xA:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function wA(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==qt(e)?!1:t}function Qr(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),i=zu(e);let a=Hn(1);t&&(r?tt(r)&&(a=Vo(r)):a=Vo(e));const s=wA(i,n,r)?lv(i):Hn(0);let l=(o.left+s.x)/a.x,c=(o.top+s.y)/a.y,u=o.width/a.x,d=o.height/a.y;if(i){const f=qt(i),p=r&&tt(r)?qt(r):r;let v=f,h=ku(v);for(;h&&r&&p!==v;){const m=Vo(h),y=h.getBoundingClientRect(),x=cn(h),b=y.left+(h.clientLeft+parseFloat(x.paddingLeft))*m.x,E=y.top+(h.clientTop+parseFloat(x.paddingTop))*m.y;l*=m.x,c*=m.y,u*=m.x,d*=m.y,l+=b,c+=E,v=qt(h),h=ku(v)}}return xs({width:u,height:d,x:l,y:c})}function Ps(e,t){const n=gs(e).scrollLeft;return t?t.left+n:Qr(Bn(e)).left+n}function cv(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-Ps(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function SA(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i=o==="fixed",a=Bn(r),s=t?hs(t.floating):!1;if(r===a||s&&i)return n;let l={scrollLeft:0,scrollTop:0},c=Hn(1);const u=Hn(0),d=Ot(r);if((d||!d&&!i)&&((br(r)!=="body"||Hi(a))&&(l=gs(r)),Ot(r))){const p=Qr(r);c=Vo(r),u.x=p.x+r.clientLeft,u.y=p.y+r.clientTop}const f=a&&!d&&!i?cv(a,l):Hn(0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x+f.x,y:n.y*c.y-l.scrollTop*c.y+u.y+f.y}}function TA(e){return Array.from(e.getClientRects())}function EA(e){const t=Bn(e),n=gs(e),r=e.ownerDocument.body,o=un(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=un(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+Ps(e);const s=-n.scrollTop;return cn(r).direction==="rtl"&&(a+=un(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:a,y:s}}const uv=25;function kA(e,t){const n=qt(e),r=Bn(e),o=n.visualViewport;let i=r.clientWidth,a=r.clientHeight,s=0,l=0;if(o){i=o.width,a=o.height;const u=ms();(!u||u&&t==="fixed")&&(s=o.offsetLeft,l=o.offsetTop)}const c=Ps(r);if(c<=0){const u=r.ownerDocument,d=u.body,f=getComputedStyle(d),p=u.compatMode==="CSS1Compat"&&parseFloat(f.marginLeft)+parseFloat(f.marginRight)||0,v=Math.abs(r.clientWidth-d.clientWidth-p);v<=uv&&(i-=v)}else c<=uv&&(i+=c);return{width:i,height:a,x:s,y:l}}const CA=new Set(["absolute","fixed"]);function IA(e,t){const n=Qr(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=Ot(e)?Vo(e):Hn(1),a=e.clientWidth*i.x,s=e.clientHeight*i.y,l=o*i.x,c=r*i.y;return{width:a,height:s,x:l,y:c}}function dv(e,t,n){let r;if(t==="viewport")r=kA(e,n);else if(t==="document")r=EA(Bn(e));else if(tt(t))r=IA(t,n);else{const o=lv(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return xs(r)}function fv(e,t){const n=cr(e);return n===t||!tt(n)||lr(n)?!1:cn(n).position==="fixed"||fv(n,t)}function AA(e,t){const n=t.get(e);if(n)return n;let r=xr(e,[],!1).filter(s=>tt(s)&&br(s)!=="body"),o=null;const i=cn(e).position==="fixed";let a=i?cr(e):e;for(;tt(a)&&!lr(a);){const s=cn(a),l=Eu(a);!l&&s.position==="fixed"&&(o=null),(i?!l&&!o:!l&&s.position==="static"&&!!o&&CA.has(o.position)||Hi(a)&&!l&&fv(e,a))?r=r.filter(u=>u!==a):o=s,a=cr(a)}return t.set(e,r),r}function PA(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const a=[...n==="clippingAncestors"?hs(t)?[]:AA(t,this._c):[].concat(n),r],s=a[0],l=a.reduce((c,u)=>{const d=dv(t,u,o);return c.top=un(d.top,c.top),c.right=wr(d.right,c.right),c.bottom=wr(d.bottom,c.bottom),c.left=un(d.left,c.left),c},dv(t,s,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function OA(e){const{width:t,height:n}=sv(e);return{width:t,height:n}}function _A(e,t,n){const r=Ot(t),o=Bn(t),i=n==="fixed",a=Qr(e,!0,i,t);let s={scrollLeft:0,scrollTop:0};const l=Hn(0);function c(){l.x=Ps(o)}if(r||!r&&!i)if((br(t)!=="body"||Hi(o))&&(s=gs(t)),r){const p=Qr(t,!0,i,t);l.x=p.x+t.clientLeft,l.y=p.y+t.clientTop}else o&&c();i&&!r&&o&&c();const u=o&&!r&&!i?cv(o,s):Hn(0),d=a.left+s.scrollLeft-l.x-u.x,f=a.top+s.scrollTop-l.y-u.y;return{x:d,y:f,width:a.width,height:a.height}}function ju(e){return cn(e).position==="static"}function pv(e,t){if(!Ot(e)||cn(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Bn(e)===n&&(n=n.ownerDocument.body),n}function hv(e,t){const n=qt(e);if(hs(e))return n;if(!Ot(e)){let o=cr(e);for(;o&&!lr(o);){if(tt(o)&&!ju(o))return o;o=cr(o)}return n}let r=pv(e,t);for(;r&&hI(r)&&ju(r);)r=pv(r,t);return r&&lr(r)&&ju(r)&&!Eu(r)?n:r||bI(e)||n}const MA=async function(e){const t=this.getOffsetParent||hv,n=this.getDimensions,r=await n(e.floating);return{reference:_A(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function DA(e){return cn(e).direction==="rtl"}const NA={convertOffsetParentRelativeRectToViewportRelativeRect:SA,getDocumentElement:Bn,getClippingRect:PA,getOffsetParent:hv,getElementRects:MA,getClientRects:TA,getDimensions:OA,getScale:Vo,isElement:tt,isRTL:DA};function mv(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function FA(e,t){let n=null,r;const o=Bn(e);function i(){var s;clearTimeout(r),(s=n)==null||s.disconnect(),n=null}function a(s,l){s===void 0&&(s=!1),l===void 0&&(l=1),i();const c=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=c;if(s||t(),!f||!p)return;const v=No(d),h=No(o.clientWidth-(u+f)),m=No(o.clientHeight-(d+p)),y=No(u),b={rootMargin:-v+"px "+-h+"px "+-m+"px "+-y+"px",threshold:un(0,wr(1,l))||1};let E=!0;function T(I){const w=I[0].intersectionRatio;if(w!==l){if(!E)return a();w?a(!1,w):r=setTimeout(()=>{a(!1,1e-7)},1e3)}w===1&&!mv(c,e.getBoundingClientRect())&&a(),E=!1}try{n=new IntersectionObserver(T,{...b,root:o.ownerDocument})}catch{n=new IntersectionObserver(T,b)}n.observe(e)}return a(!0),i}function Jr(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,c=zu(e),u=o||i?[...c?xr(c):[],...xr(t)]:[];u.forEach(y=>{o&&y.addEventListener("scroll",n,{passive:!0}),i&&y.addEventListener("resize",n)});const d=c&&s?FA(c,n):null;let f=-1,p=null;a&&(p=new ResizeObserver(y=>{let[x]=y;x&&x.target===c&&p&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var b;(b=p)==null||b.observe(t)})),n()}),c&&!l&&p.observe(c),p.observe(t));let v,h=l?Qr(e):null;l&&m();function m(){const y=Qr(e);h&&!mv(h,y)&&n(),h=y,v=requestAnimationFrame(m)}return n(),()=>{var y;u.forEach(x=>{o&&x.removeEventListener("scroll",n),i&&x.removeEventListener("resize",n)}),d?.(),(y=p)==null||y.disconnect(),p=null,l&&cancelAnimationFrame(v)}}const LA=vA,VA=pA,$A=yA,zA=hA,jA=bA,gv=dA,RA=(e,t,n)=>{const r=new Map,o={platform:NA,...n},i={...o.platform,_c:r};return uA(e,t,{...o,platform:i})};var BA=typeof document<"u",HA=function(){},Os=BA?S.useLayoutEffect:HA;function _s(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!_s(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const i=o[r];if(!(i==="_owner"&&e.$$typeof)&&!_s(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function vv(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function yv(e,t){const n=vv(e);return Math.round(t*n)/n}function Ru(e){const t=A.useRef(e);return Os(()=>{t.current=e}),t}function WA(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:a}={},transform:s=!0,whileElementsMounted:l,open:c}=e,[u,d]=A.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=A.useState(r);_s(f,r)||p(r);const[v,h]=A.useState(null),[m,y]=A.useState(null),x=A.useCallback(C=>{C!==I.current&&(I.current=C,h(C))},[]),b=A.useCallback(C=>{C!==w.current&&(w.current=C,y(C))},[]),E=i||v,T=a||m,I=A.useRef(null),w=A.useRef(null),k=A.useRef(u),P=l!=null,_=Ru(l),F=Ru(o),V=Ru(c),D=A.useCallback(()=>{if(!I.current||!w.current)return;const C={placement:t,strategy:n,middleware:f};F.current&&(C.platform=F.current),RA(I.current,w.current,C).then(L=>{const $={...L,isPositioned:V.current!==!1};O.current&&!_s(k.current,$)&&(k.current=$,jn.flushSync(()=>{d($)}))})},[f,t,n,F,V]);Os(()=>{c===!1&&k.current.isPositioned&&(k.current.isPositioned=!1,d(C=>({...C,isPositioned:!1})))},[c]);const O=A.useRef(!1);Os(()=>(O.current=!0,()=>{O.current=!1}),[]),Os(()=>{if(E&&(I.current=E),T&&(w.current=T),E&&T){if(_.current)return _.current(E,T,D);D()}},[E,T,D,_,P]);const N=A.useMemo(()=>({reference:I,floating:w,setReference:x,setFloating:b}),[x,b]),z=A.useMemo(()=>({reference:E,floating:T}),[E,T]),M=A.useMemo(()=>{const C={position:n,left:0,top:0};if(!z.floating)return C;const L=yv(z.floating,u.x),$=yv(z.floating,u.y);return s?{...C,transform:"translate("+L+"px, "+$+"px)",...vv(z.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:L,top:$}},[n,s,z.floating,u.x,u.y]);return A.useMemo(()=>({...u,update:D,refs:N,elements:z,floatingStyles:M}),[u,D,N,z,M])}const qA=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:o}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?gv({element:r.current,padding:o}).fn(n):{}:r?gv({element:r,padding:o}).fn(n):{}}}},$o=(e,t)=>({...LA(e),options:[e,t]}),Ms=(e,t)=>({...$A(e),options:[e,t]}),Ds=(e,t)=>({...zA(e),options:[e,t]}),bv=(e,t)=>({...jA(e),options:[e,t]}),xv=(e,t)=>({...VA(e),options:[e,t]}),Bu=(e,t)=>({...qA(e),options:[e,t]});function UA(e,t){const n=e.compareDocumentPosition(t);return n&Node.DOCUMENT_POSITION_FOLLOWING||n&Node.DOCUMENT_POSITION_CONTAINED_BY?-1:n&Node.DOCUMENT_POSITION_PRECEDING||n&Node.DOCUMENT_POSITION_CONTAINS?1:0}const wv=A.createContext({register:()=>{},unregister:()=>{},map:new Map,elementsRef:{current:[]}});function GA(e){const{children:t,elementsRef:n,labelsRef:r}=e,[o,i]=A.useState(()=>new Set),a=A.useCallback(c=>{i(u=>new Set(u).add(c))},[]),s=A.useCallback(c=>{i(u=>{const d=new Set(u);return d.delete(c),d})},[]),l=A.useMemo(()=>{const c=new Map;return Array.from(o.keys()).sort(UA).forEach((d,f)=>{c.set(d,f)}),c},[o]);return g.jsx(wv.Provider,{value:A.useMemo(()=>({register:a,unregister:s,map:l,elementsRef:n,labelsRef:r}),[a,s,l,n,r]),children:t})}function Sv(e){e===void 0&&(e={});const{label:t}=e,{register:n,unregister:r,map:o,elementsRef:i,labelsRef:a}=A.useContext(wv),[s,l]=A.useState(null),c=A.useRef(null),u=A.useCallback(d=>{if(c.current=d,s!==null&&(i.current[s]=d,a)){var f;const p=t!==void 0;a.current[s]=p?t:(f=d?.textContent)!=null?f:null}},[s,i,a,t]);return nt(()=>{const d=c.current;if(d)return n(d),()=>{r(d)}},[n,r]),nt(()=>{const d=c.current?o.get(c.current):null;d!=null&&l(d)},[o]),A.useMemo(()=>({ref:u,index:s??-1}),[s,u])}const YA="data-floating-ui-focusable",Tv="active",Ev="selected",Gi="ArrowLeft",Yi="ArrowRight",kv="ArrowUp",Ns="ArrowDown",KA={...A};let Cv=!1,ZA=0;const Iv=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+ZA++;function XA(){const[e,t]=A.useState(()=>Cv?Iv():void 0);return nt(()=>{e==null&&t(Iv())},[]),A.useEffect(()=>{Cv=!0},[]),e}const Ki=KA.useId||XA;let Zi;process.env.NODE_ENV!=="production"&&(Zi=new Set);function Fs(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];const o="Floating UI: "+n.join(" ");if(!((e=Zi)!=null&&e.has(o))){var i;(i=Zi)==null||i.add(o),console.warn(o)}}function QA(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];const o="Floating UI: "+n.join(" ");if(!((e=Zi)!=null&&e.has(o))){var i;(i=Zi)==null||i.add(o),console.error(o)}}const Hu=A.forwardRef(function(t,n){const{context:{placement:r,elements:{floating:o},middlewareData:{arrow:i,shift:a}},width:s=14,height:l=7,tipRadius:c=0,strokeWidth:u=0,staticOffset:d,stroke:f,d:p,style:{transform:v,...h}={},...m}=t;process.env.NODE_ENV!=="production"&&(n||Fs("The `ref` prop is required for `FloatingArrow`."));const y=Ki(),[x,b]=A.useState(!1);if(nt(()=>{if(!o)return;cn(o).direction==="rtl"&&b(!0)},[o]),!o)return null;const[E,T]=r.split("-"),I=E==="top"||E==="bottom";let w=d;(I&&a!=null&&a.x||!I&&a!=null&&a.y)&&(w=null);const k=u*2,P=k/2,_=s/2*(c/-8+1),F=l/2*c/4,V=!!p,D=w&&T==="end"?"bottom":"top";let O=w&&T==="end"?"right":"left";w&&x&&(O=T==="end"?"left":"right");const N=i?.x!=null?w||i.x:"",z=i?.y!=null?w||i.y:"",M=p||"M0,0"+(" H"+s)+(" L"+(s-_)+","+(l-F))+(" Q"+s/2+","+l+" "+_+","+(l-F))+" Z",C={top:V?"rotate(180deg)":"",left:V?"rotate(90deg)":"rotate(-90deg)",bottom:V?"":"rotate(180deg)",right:V?"rotate(-90deg)":"rotate(90deg)"}[E];return g.jsxs("svg",{...m,"aria-hidden":!0,ref:n,width:V?s:s+k,height:s,viewBox:"0 0 "+s+" "+(l>s?l:s),style:{position:"absolute",pointerEvents:"none",[O]:N,[D]:z,[E]:I||V?"100%":"calc(100% - "+k/2+"px)",transform:[C,v].filter(L=>!!L).join(" "),...h},children:[k>0&&g.jsx("path",{clipPath:"url(#"+y+")",fill:"none",stroke:f,strokeWidth:k+(p?0:1),d:M}),g.jsx("path",{stroke:k&&!p?m.fill:"none",d:M}),g.jsx("clipPath",{id:y,children:g.jsx("rect",{x:-P,y:P*(V?-1:1),width:s+k,height:s})})]})});function Av(){const e=new Map;return{emit(t,n){var r;(r=e.get(t))==null||r.forEach(o=>o(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){var r;(r=e.get(t))==null||r.delete(n)}}}const Pv=A.createContext(null),Ov=A.createContext(null),Sr=()=>{var e;return((e=A.useContext(Pv))==null?void 0:e.id)||null},Tr=()=>A.useContext(Ov);function JA(e){const t=Ki(),n=Tr(),o=Sr();return nt(()=>{if(!t)return;const i={id:t,parentId:o};return n?.addNode(i),()=>{n?.removeNode(i)}},[n,t,o]),t}function eP(e){const{children:t,id:n}=e,r=Sr();return g.jsx(Pv.Provider,{value:A.useMemo(()=>({id:n,parentId:r}),[n,r]),children:t})}function tP(e){const{children:t}=e,n=A.useRef([]),r=A.useCallback(a=>{n.current=[...n.current,a]},[]),o=A.useCallback(a=>{n.current=n.current.filter(s=>s!==a)},[]),[i]=A.useState(()=>Av());return g.jsx(Ov.Provider,{value:A.useMemo(()=>({nodesRef:n,addNode:r,removeNode:o,events:i}),[r,o,i]),children:t})}function eo(e){return"data-floating-ui-"+e}function Yt(e){e.current!==-1&&(clearTimeout(e.current),e.current=-1)}const _v=eo("safe-polygon");function Wu(e,t,n){if(n&&!Lo(n))return 0;if(typeof e=="number")return e;if(typeof e=="function"){const r=e();return typeof r=="number"?r:r?.[t]}return e?.[t]}function qu(e){return typeof e=="function"?e():e}function Mv(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,dataRef:o,events:i,elements:a}=e,{enabled:s=!0,delay:l=0,handleClose:c=null,mouseOnly:u=!1,restMs:d=0,move:f=!0}=t,p=Tr(),v=Sr(),h=Wt(c),m=Wt(l),y=Wt(n),x=Wt(d),b=A.useRef(),E=A.useRef(-1),T=A.useRef(),I=A.useRef(-1),w=A.useRef(!0),k=A.useRef(!1),P=A.useRef(()=>{}),_=A.useRef(!1),F=kt(()=>{var M;const C=(M=o.current.openEvent)==null?void 0:M.type;return C?.includes("mouse")&&C!=="mousedown"});A.useEffect(()=>{if(!s)return;function M(C){let{open:L}=C;L||(Yt(E),Yt(I),w.current=!0,_.current=!1)}return i.on("openchange",M),()=>{i.off("openchange",M)}},[s,i]),A.useEffect(()=>{if(!s||!h.current||!n)return;function M(L){F()&&r(!1,L,"hover")}const C=Ut(a.floating).documentElement;return C.addEventListener("mouseleave",M),()=>{C.removeEventListener("mouseleave",M)}},[a.floating,n,r,s,h,F]);const V=A.useCallback(function(M,C,L){C===void 0&&(C=!0),L===void 0&&(L="hover");const $=Wu(m.current,"close",b.current);$&&!T.current?(Yt(E),E.current=window.setTimeout(()=>r(!1,M,L),$)):C&&(Yt(E),r(!1,M,L))},[m,r]),D=kt(()=>{P.current(),T.current=void 0}),O=kt(()=>{if(k.current){const M=Ut(a.floating).body;M.style.pointerEvents="",M.removeAttribute(_v),k.current=!1}}),N=kt(()=>o.current.openEvent?["click","mousedown"].includes(o.current.openEvent.type):!1);A.useEffect(()=>{if(!s)return;function M(q){if(Yt(E),w.current=!1,u&&!Lo(b.current)||qu(x.current)>0&&!Wu(m.current,"open"))return;const G=Wu(m.current,"open",b.current);G?E.current=window.setTimeout(()=>{y.current||r(!0,q,"hover")},G):n||r(!0,q,"hover")}function C(q){if(N()){O();return}P.current();const G=Ut(a.floating);if(Yt(I),_.current=!1,h.current&&o.current.floatingContext){n||Yt(E),T.current=h.current({...o.current.floatingContext,tree:p,x:q.clientX,y:q.clientY,onClose(){O(),D(),N()||V(q,!0,"safe-polygon")}});const J=T.current;G.addEventListener("mousemove",J),P.current=()=>{G.removeEventListener("mousemove",J)};return}(b.current!=="touch"||!Ht(a.floating,q.relatedTarget))&&V(q)}function L(q){N()||o.current.floatingContext&&(h.current==null||h.current({...o.current.floatingContext,tree:p,x:q.clientX,y:q.clientY,onClose(){O(),D(),N()||V(q)}})(q))}function $(){Yt(E)}function B(q){N()||V(q,!1)}if(tt(a.domReference)){const q=a.domReference,G=a.floating;return n&&q.addEventListener("mouseleave",L),f&&q.addEventListener("mousemove",M,{once:!0}),q.addEventListener("mouseenter",M),q.addEventListener("mouseleave",C),G&&(G.addEventListener("mouseleave",L),G.addEventListener("mouseenter",$),G.addEventListener("mouseleave",B)),()=>{n&&q.removeEventListener("mouseleave",L),f&&q.removeEventListener("mousemove",M),q.removeEventListener("mouseenter",M),q.removeEventListener("mouseleave",C),G&&(G.removeEventListener("mouseleave",L),G.removeEventListener("mouseenter",$),G.removeEventListener("mouseleave",B))}}},[a,s,e,u,f,V,D,O,r,n,y,p,m,h,o,N,x]),nt(()=>{var M;if(s&&n&&(M=h.current)!=null&&(M=M.__options)!=null&&M.blockPointerEvents&&F()){k.current=!0;const L=a.floating;if(tt(a.domReference)&&L){var C;const $=Ut(a.floating).body;$.setAttribute(_v,"");const B=a.domReference,q=p==null||(C=p.nodesRef.current.find(G=>G.id===v))==null||(C=C.context)==null?void 0:C.elements.floating;return q&&(q.style.pointerEvents=""),$.style.pointerEvents="none",B.style.pointerEvents="auto",L.style.pointerEvents="auto",()=>{$.style.pointerEvents="",B.style.pointerEvents="",L.style.pointerEvents=""}}}},[s,n,v,a,p,h,F]),nt(()=>{n||(b.current=void 0,_.current=!1,D(),O())},[n,D,O]),A.useEffect(()=>()=>{D(),Yt(E),Yt(I),O()},[s,a.domReference,D,O]);const z=A.useMemo(()=>{function M(C){b.current=C.pointerType}return{onPointerDown:M,onPointerEnter:M,onMouseMove(C){const{nativeEvent:L}=C;function $(){!w.current&&!y.current&&r(!0,L,"hover")}u&&!Lo(b.current)||n||qu(x.current)===0||_.current&&C.movementX**2+C.movementY**2<2||(Yt(I),b.current==="touch"?$():(_.current=!0,I.current=window.setTimeout($,qu(x.current))))}}},[u,r,n,y,x]);return A.useMemo(()=>s?{reference:z}:{},[s,z])}let Dv=0;function to(e,t){t===void 0&&(t={});const{preventScroll:n=!1,cancelPrevious:r=!0,sync:o=!1}=t;r&&cancelAnimationFrame(Dv);const i=()=>e?.focus({preventScroll:n});o?i():Dv=requestAnimationFrame(i)}function Uu(e,t){if(!e||!t)return!1;const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&Bi(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function nP(e){return"composedPath"in e?e.composedPath()[0]:e.target}function rP(e){return e?.ownerDocument||document}const zo={inert:new WeakMap,"aria-hidden":new WeakMap,none:new WeakMap};function Nv(e){return e==="inert"?zo.inert:e==="aria-hidden"?zo["aria-hidden"]:zo.none}let Ls=new WeakSet,Vs={},Gu=0;const oP=()=>typeof HTMLElement<"u"&&"inert"in HTMLElement.prototype,Fv=e=>e&&(e.host||Fv(e.parentNode)),iP=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=Fv(n);return e.contains(r)?r:null}).filter(n=>n!=null);function aP(e,t,n,r){const o="data-floating-ui-inert",i=r?"inert":n?"aria-hidden":null,a=iP(t,e),s=new Set,l=new Set(a),c=[];Vs[o]||(Vs[o]=new WeakMap);const u=Vs[o];a.forEach(d),f(t),s.clear();function d(p){!p||s.has(p)||(s.add(p),p.parentNode&&d(p.parentNode))}function f(p){!p||l.has(p)||[].forEach.call(p.children,v=>{if(br(v)!=="script")if(s.has(v))f(v);else{const h=i?v.getAttribute(i):null,m=h!==null&&h!=="false",y=Nv(i),x=(y.get(v)||0)+1,b=(u.get(v)||0)+1;y.set(v,x),u.set(v,b),c.push(v),x===1&&m&&Ls.add(v),b===1&&v.setAttribute(o,""),!m&&i&&v.setAttribute(i,i==="inert"?"":"true")}})}return Gu++,()=>{c.forEach(p=>{const v=Nv(i),m=(v.get(p)||0)-1,y=(u.get(p)||0)-1;v.set(p,m),u.set(p,y),m||(!Ls.has(p)&&i&&p.removeAttribute(i),Ls.delete(p)),y||p.removeAttribute(o)}),Gu--,Gu||(zo.inert=new WeakMap,zo["aria-hidden"]=new WeakMap,zo.none=new WeakMap,Ls=new WeakSet,Vs={})}}function Lv(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=rP(e[0]).body;return aP(e.concat(Array.from(r.querySelectorAll('[aria-live],[role="status"],output'))),r,t,n)}const $s={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"fixed",whiteSpace:"nowrap",width:"1px",top:0,left:0},zs=A.forwardRef(function(t,n){const[r,o]=A.useState();nt(()=>{Kg()&&o("button")},[]);const i={ref:n,tabIndex:0,role:r,"aria-hidden":r?void 0:!0,[eo("focus-guard")]:"",style:$s};return g.jsx("span",{...t,...i})}),Vv=A.createContext(null),$v=eo("portal");function sP(e){e===void 0&&(e={});const{id:t,root:n}=e,r=Ki(),o=zv(),[i,a]=A.useState(null),s=A.useRef(null);return nt(()=>()=>{i?.remove(),queueMicrotask(()=>{s.current=null})},[i]),nt(()=>{if(!r||s.current)return;const l=t?document.getElementById(t):null;if(!l)return;const c=document.createElement("div");c.id=r,c.setAttribute($v,""),l.appendChild(c),s.current=c,a(c)},[t,r]),nt(()=>{if(n===null||!r||s.current)return;let l=n||o?.portalNode;l&&!ps(l)&&(l=l.current),l=l||document.body;let c=null;t&&(c=document.createElement("div"),c.id=t,l.appendChild(c));const u=document.createElement("div");u.id=r,u.setAttribute($v,""),l=c||l,l.appendChild(u),s.current=u,a(u)},[t,n,r,o]),i}function dr(e){const{children:t,id:n,root:r,preserveTabOrder:o=!0}=e,i=sP({id:n,root:r}),[a,s]=A.useState(null),l=A.useRef(null),c=A.useRef(null),u=A.useRef(null),d=A.useRef(null),f=a?.modal,p=a?.open,v=!!a&&!a.modal&&a.open&&o&&!!(r||i);return A.useEffect(()=>{if(!i||!o||f)return;function h(m){i&&Ui(m)&&(m.type==="focusin"?iv:cA)(i)}return i.addEventListener("focusin",h,!0),i.addEventListener("focusout",h,!0),()=>{i.removeEventListener("focusin",h,!0),i.removeEventListener("focusout",h,!0)}},[i,o,f]),A.useEffect(()=>{i&&(p||iv(i))},[p,i]),g.jsxs(Vv.Provider,{value:A.useMemo(()=>({preserveTabOrder:o,beforeOutsideRef:l,afterOutsideRef:c,beforeInsideRef:u,afterInsideRef:d,portalNode:i,setFocusManagerState:s}),[o,i]),children:[v&&i&&g.jsx(zs,{"data-type":"outside",ref:l,onFocus:h=>{if(Ui(h,i)){var m;(m=u.current)==null||m.focus()}else{const y=a?a.domReference:null,x=ov(y);x?.focus()}}}),v&&i&&g.jsx("span",{"aria-owns":i.id,style:$s}),i&&jn.createPortal(t,i),v&&i&&g.jsx(zs,{"data-type":"outside",ref:c,onFocus:h=>{if(Ui(h,i)){var m;(m=d.current)==null||m.focus()}else{const y=a?a.domReference:null,x=rv(y);x?.focus(),a?.closeOnFocusOut&&a?.onOpenChange(!1,h.nativeEvent,"focus-out")}}})]})}const zv=()=>A.useContext(Vv);function jv(e){return A.useMemo(()=>t=>{e.forEach(n=>{n&&(n.current=t)})},e)}const lP=20;let Er=[];function Yu(){Er=Er.filter(e=>e.isConnected)}function cP(e){Yu(),e&&br(e)!=="body"&&(Er.push(e),Er.length>lP&&(Er=Er.slice(-20)))}function Rv(){return Yu(),Er[Er.length-1]}function uP(e){const t=qi();return Gg(e,t)?e:Es(e,t)[0]||e}function Bv(e,t){var n;if(!t.current.includes("floating")&&!((n=e.getAttribute("role"))!=null&&n.includes("dialog")))return;const r=qi(),i=UI(e,r).filter(s=>{const l=s.getAttribute("data-tabindex")||"";return Gg(s,r)||s.hasAttribute("data-tabindex")&&!l.startsWith("-")}),a=e.getAttribute("tabindex");t.current.includes("floating")||i.length===0?a!=="0"&&e.setAttribute("tabindex","0"):(a!=="-1"||e.hasAttribute("data-tabindex")&&e.getAttribute("data-tabindex")!=="-1")&&(e.setAttribute("tabindex","-1"),e.setAttribute("data-tabindex","-1"))}const dP=A.forwardRef(function(t,n){return g.jsx("button",{...t,type:"button",ref:n,tabIndex:-1,style:$s})});function no(e){const{context:t,children:n,disabled:r=!1,order:o=["content"],guards:i=!0,initialFocus:a=0,returnFocus:s=!0,restoreFocus:l=!1,modal:c=!0,visuallyHiddenDismiss:u=!1,closeOnFocusOut:d=!0,outsideElementsInert:f=!1,getInsideElements:p=()=>[]}=e,{open:v,onOpenChange:h,events:m,dataRef:y,elements:{domReference:x,floating:b}}=t,E=kt(()=>{var H;return(H=y.current.floatingContext)==null?void 0:H.nodeId}),T=kt(p),I=typeof a=="number"&&a<0,w=Vu(x)&&I,k=oP(),P=k?i:!0,_=!P||k&&f,F=Wt(o),V=Wt(a),D=Wt(s),O=Tr(),N=zv(),z=A.useRef(null),M=A.useRef(null),C=A.useRef(!1),L=A.useRef(!1),$=A.useRef(-1),B=A.useRef(-1),q=N!=null,G=ks(b),W=kt(function(H){return H===void 0&&(H=G),H?Es(H,qi()):[]}),J=kt(H=>{const se=W(H);return F.current.map(ie=>x&&ie==="reference"?x:G&&ie==="floating"?G:se).filter(Boolean).flat()});A.useEffect(()=>{if(r||!c)return;function H(ie){if(ie.key==="Tab"){Ht(G,qn(Ut(G)))&&W().length===0&&!w&&Gt(ie);const Q=J(),le=Un(ie);F.current[0]==="reference"&&le===x&&(Gt(ie),ie.shiftKey?to(Q[Q.length-1]):to(Q[1])),F.current[1]==="floating"&&le===G&&ie.shiftKey&&(Gt(ie),to(Q[0]))}}const se=Ut(G);return se.addEventListener("keydown",H),()=>{se.removeEventListener("keydown",H)}},[r,x,G,c,F,w,W,J]),A.useEffect(()=>{if(r||!b)return;function H(se){const ie=Un(se),le=W().indexOf(ie);le!==-1&&($.current=le)}return b.addEventListener("focusin",H),()=>{b.removeEventListener("focusin",H)}},[r,b,W]),A.useEffect(()=>{if(r||!d)return;function H(){L.current=!0,setTimeout(()=>{L.current=!1})}function se(le){const te=le.relatedTarget,fe=le.currentTarget,pe=Un(le);queueMicrotask(()=>{const ve=E(),Ae=!(Ht(x,te)||Ht(b,te)||Ht(te,b)||Ht(N?.portalNode,te)||te!=null&&te.hasAttribute(eo("focus-guard"))||O&&(Xr(O.nodesRef.current,ve).find(me=>{var oe,j;return Ht((oe=me.context)==null?void 0:oe.elements.floating,te)||Ht((j=me.context)==null?void 0:j.elements.domReference,te)})||Qg(O.nodesRef.current,ve).find(me=>{var oe,j,R;return[(oe=me.context)==null?void 0:oe.elements.floating,ks((j=me.context)==null?void 0:j.elements.floating)].includes(te)||((R=me.context)==null?void 0:R.elements.domReference)===te})));if(fe===x&&G&&Bv(G,F),l&&fe!==x&&!(pe!=null&&pe.isConnected)&&qn(Ut(G))===Ut(G).body){Ot(G)&&G.focus();const me=$.current,oe=W(),j=oe[me]||oe[oe.length-1]||G;Ot(j)&&j.focus()}if(y.current.insideReactTree){y.current.insideReactTree=!1;return}(w||!c)&&te&&Ae&&!L.current&&te!==Rv()&&(C.current=!0,h(!1,le,"focus-out"))})}const ie=!!(!O&&N);function Q(){Yt(B),y.current.insideReactTree=!0,B.current=window.setTimeout(()=>{y.current.insideReactTree=!1})}if(b&&Ot(x))return x.addEventListener("focusout",se),x.addEventListener("pointerdown",H),b.addEventListener("focusout",se),ie&&b.addEventListener("focusout",Q,!0),()=>{x.removeEventListener("focusout",se),x.removeEventListener("pointerdown",H),b.removeEventListener("focusout",se),ie&&b.removeEventListener("focusout",Q,!0)}},[r,x,b,G,c,O,N,h,d,l,W,w,E,F,y]);const re=A.useRef(null),ee=A.useRef(null),Y=jv([re,N?.beforeInsideRef]),K=jv([ee,N?.afterInsideRef]);A.useEffect(()=>{var H,se;if(r||!b)return;const ie=Array.from((N==null||(H=N.portalNode)==null?void 0:H.querySelectorAll("["+eo("portal")+"]"))||[]),le=(se=(O?Qg(O.nodesRef.current,E()):[]).find(pe=>{var ve;return Vu(((ve=pe.context)==null?void 0:ve.elements.domReference)||null)}))==null||(se=se.context)==null?void 0:se.elements.domReference,te=[b,le,...ie,...T(),z.current,M.current,re.current,ee.current,N?.beforeOutsideRef.current,N?.afterOutsideRef.current,F.current.includes("reference")||w?x:null].filter(pe=>pe!=null),fe=c||w?Lv(te,!_,_):Lv(te);return()=>{fe()}},[r,x,b,c,F,N,w,P,_,O,E,T]),nt(()=>{if(r||!Ot(G))return;const H=Ut(G),se=qn(H);queueMicrotask(()=>{const ie=J(G),Q=V.current,le=(typeof Q=="number"?ie[Q]:Q.current)||G,te=Ht(G,se);!I&&!te&&v&&to(le,{preventScroll:le===G})})},[r,v,G,I,J,V]),nt(()=>{if(r||!G)return;const H=Ut(G),se=qn(H);cP(se);function ie(te){let{reason:fe,event:pe,nested:ve}=te;if(["hover","safe-polygon"].includes(fe)&&pe.type==="mouseleave"&&(C.current=!0),fe==="outside-press")if(ve)C.current=!1;else if(Jg(pe)||ev(pe))C.current=!1;else{let Ae=!1;document.createElement("div").focus({get preventScroll(){return Ae=!0,!1}}),Ae?C.current=!1:C.current=!0}}m.on("openchange",ie);const Q=H.createElement("span");Q.setAttribute("tabindex","-1"),Q.setAttribute("aria-hidden","true"),Object.assign(Q.style,$s),q&&x&&x.insertAdjacentElement("afterend",Q);function le(){if(typeof D.current=="boolean"){const te=x||Rv();return te&&te.isConnected?te:Q}return D.current.current||Q}return()=>{m.off("openchange",ie);const te=qn(H),fe=Ht(b,te)||O&&Xr(O.nodesRef.current,E(),!1).some(ve=>{var Ae;return Ht((Ae=ve.context)==null?void 0:Ae.elements.floating,te)}),pe=le();queueMicrotask(()=>{const ve=uP(pe);D.current&&!C.current&&Ot(ve)&&(!(ve!==te&&te!==H.body)||fe)&&ve.focus({preventScroll:!0}),Q.remove()})}},[r,b,G,D,y,m,O,q,x,E]),A.useEffect(()=>(queueMicrotask(()=>{C.current=!1}),()=>{queueMicrotask(Yu)}),[r]),nt(()=>{if(!r&&N)return N.setFocusManagerState({modal:c,closeOnFocusOut:d,open:v,onOpenChange:h,domReference:x}),()=>{N.setFocusManagerState(null)}},[r,N,c,v,h,d,x]),nt(()=>{r||G&&Bv(G,F)},[r,G,F]);function X(H){return r||!u||!c?null:g.jsx(dP,{ref:H==="start"?z:M,onClick:se=>h(!1,se.nativeEvent),children:typeof u=="string"?u:"Dismiss"})}const de=!r&&P&&(c?!w:!0)&&(q||c);return g.jsxs(g.Fragment,{children:[de&&g.jsx(zs,{"data-type":"inside",ref:Y,onFocus:H=>{if(c){const ie=J();to(o[0]==="reference"?ie[0]:ie[ie.length-1])}else if(N!=null&&N.preserveTabOrder&&N.portalNode)if(C.current=!1,Ui(H,N.portalNode)){const ie=rv(x);ie?.focus()}else{var se;(se=N.beforeOutsideRef.current)==null||se.focus()}}}),!w&&X("start"),n,X("end"),de&&g.jsx(zs,{"data-type":"inside",ref:K,onFocus:H=>{if(c)to(J()[0]);else if(N!=null&&N.preserveTabOrder&&N.portalNode)if(d&&(C.current=!0),Ui(H,N.portalNode)){const ie=ov(x);ie?.focus()}else{var se;(se=N.afterOutsideRef.current)==null||se.focus()}}})]})}let js=0;const Hv="--floating-ui-scrollbar-width";function fP(){const e=_u(),t=/iP(hone|ad|od)|iOS/.test(e)||e==="MacIntel"&&navigator.maxTouchPoints>1,n=document.body.style,o=Math.round(document.documentElement.getBoundingClientRect().left)+document.documentElement.scrollLeft?"paddingLeft":"paddingRight",i=window.innerWidth-document.documentElement.clientWidth,a=n.left?parseFloat(n.left):window.scrollX,s=n.top?parseFloat(n.top):window.scrollY;if(n.overflow="hidden",n.setProperty(Hv,i+"px"),i&&(n[o]=i+"px"),t){var l,c;const u=((l=window.visualViewport)==null?void 0:l.offsetLeft)||0,d=((c=window.visualViewport)==null?void 0:c.offsetTop)||0;Object.assign(n,{position:"fixed",top:-(s-Math.floor(d))+"px",left:-(a-Math.floor(u))+"px",right:"0"})}return()=>{Object.assign(n,{overflow:"",[o]:""}),n.removeProperty(Hv),t&&(Object.assign(n,{position:"",top:"",left:"",right:""}),window.scrollTo(a,s))}}let Wv=()=>{};const Ku=A.forwardRef(function(t,n){const{lockScroll:r=!1,...o}=t;return nt(()=>{if(r)return js++,js===1&&(Wv=fP()),()=>{js--,js===0&&Wv()}},[r]),g.jsx("div",{ref:n,...o,style:{position:"fixed",overflow:"auto",top:0,right:0,bottom:0,left:0,...o.style}})});function qv(e){return Ot(e.target)&&e.target.tagName==="BUTTON"}function pP(e){return Ot(e.target)&&e.target.tagName==="A"}function Uv(e){return Lu(e)}function jo(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,dataRef:o,elements:{domReference:i}}=e,{enabled:a=!0,event:s="click",toggle:l=!0,ignoreMouse:c=!1,keyboardHandlers:u=!0,stickIfOpen:d=!0}=t,f=A.useRef(),p=A.useRef(!1),v=A.useMemo(()=>({onPointerDown(h){f.current=h.pointerType},onMouseDown(h){const m=f.current;h.button===0&&s!=="click"&&(Lo(m,!0)&&c||(n&&l&&(!(o.current.openEvent&&d)||o.current.openEvent.type==="mousedown")?r(!1,h.nativeEvent,"click"):(h.preventDefault(),r(!0,h.nativeEvent,"click"))))},onClick(h){const m=f.current;if(s==="mousedown"&&f.current){f.current=void 0;return}Lo(m,!0)&&c||(n&&l&&(!(o.current.openEvent&&d)||o.current.openEvent.type==="click")?r(!1,h.nativeEvent,"click"):r(!0,h.nativeEvent,"click"))},onKeyDown(h){f.current=void 0,!(h.defaultPrevented||!u||qv(h))&&(h.key===" "&&!Uv(i)&&(h.preventDefault(),p.current=!0),!pP(h)&&h.key==="Enter"&&r(!(n&&l),h.nativeEvent,"click"))},onKeyUp(h){h.defaultPrevented||!u||qv(h)||Uv(i)||h.key===" "&&p.current&&(p.current=!1,r(!(n&&l),h.nativeEvent,"click"))}}),[o,i,s,c,u,r,n,d,l]);return A.useMemo(()=>a?{reference:v}:{},[a,v])}function hP(e,t){let n=null,r=null,o=!1;return{contextElement:e||void 0,getBoundingClientRect(){var i;const a=e?.getBoundingClientRect()||{width:0,height:0,x:0,y:0},s=t.axis==="x"||t.axis==="both",l=t.axis==="y"||t.axis==="both",c=["mouseenter","mousemove"].includes(((i=t.dataRef.current.openEvent)==null?void 0:i.type)||"")&&t.pointerType!=="touch";let u=a.width,d=a.height,f=a.x,p=a.y;return n==null&&t.x&&s&&(n=a.x-t.x),r==null&&t.y&&l&&(r=a.y-t.y),f-=n||0,p-=r||0,u=0,d=0,!o||c?(u=t.axis==="y"?a.width:0,d=t.axis==="x"?a.height:0,f=s&&t.x!=null?t.x:f,p=l&&t.y!=null?t.y:p):o&&!c&&(d=t.axis==="x"?a.height:d,u=t.axis==="y"?a.width:u),o=!0,{width:u,height:d,x:f,y:p,top:p,right:f+u,bottom:p+d,left:f}}}}function Gv(e){return e!=null&&e.clientX!=null}function mP(e,t){t===void 0&&(t={});const{open:n,dataRef:r,elements:{floating:o,domReference:i},refs:a}=e,{enabled:s=!0,axis:l="both",x:c=null,y:u=null}=t,d=A.useRef(!1),f=A.useRef(null),[p,v]=A.useState(),[h,m]=A.useState([]),y=kt((I,w)=>{d.current||r.current.openEvent&&!Gv(r.current.openEvent)||a.setPositionReference(hP(i,{x:I,y:w,axis:l,dataRef:r,pointerType:p}))}),x=kt(I=>{c!=null||u!=null||(n?f.current||m([]):y(I.clientX,I.clientY))}),b=Lo(p)?o:n,E=A.useCallback(()=>{if(!b||!s||c!=null||u!=null)return;const I=qt(o);function w(k){const P=Un(k);Ht(o,P)?(I.removeEventListener("mousemove",w),f.current=null):y(k.clientX,k.clientY)}if(!r.current.openEvent||Gv(r.current.openEvent)){I.addEventListener("mousemove",w);const k=()=>{I.removeEventListener("mousemove",w),f.current=null};return f.current=k,k}a.setPositionReference(i)},[b,s,c,u,o,r,a,i,y]);A.useEffect(()=>E(),[E,h]),A.useEffect(()=>{s&&!o&&(d.current=!1)},[s,o]),A.useEffect(()=>{!s&&n&&(d.current=!0)},[s,n]),nt(()=>{s&&(c!=null||u!=null)&&(d.current=!1,y(c,u))},[s,c,u,y]);const T=A.useMemo(()=>{function I(w){let{pointerType:k}=w;v(k)}return{onPointerDown:I,onPointerEnter:I,onMouseMove:x,onMouseEnter:x}},[x]);return A.useMemo(()=>s?{reference:T}:{},[s,T])}const gP={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},vP={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},Yv=e=>{var t,n;return{escapeKey:typeof e=="boolean"?e:(t=e?.escapeKey)!=null?t:!1,outsidePress:typeof e=="boolean"?e:(n=e?.outsidePress)!=null?n:!0}};function kr(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,elements:o,dataRef:i}=e,{enabled:a=!0,escapeKey:s=!0,outsidePress:l=!0,outsidePressEvent:c="pointerdown",referencePress:u=!1,referencePressEvent:d="pointerdown",ancestorScroll:f=!1,bubbles:p,capture:v}=t,h=Tr(),m=kt(typeof l=="function"?l:()=>!1),y=typeof l=="function"?m:l,x=A.useRef(!1),{escapeKey:b,outsidePress:E}=Yv(p),{escapeKey:T,outsidePress:I}=Yv(v),w=A.useRef(!1),k=kt(O=>{var N;if(!n||!a||!s||O.key!=="Escape"||w.current)return;const z=(N=i.current.floatingContext)==null?void 0:N.nodeId,M=h?Xr(h.nodesRef.current,z):[];if(!b&&(O.stopPropagation(),M.length>0)){let C=!0;if(M.forEach(L=>{var $;if(($=L.context)!=null&&$.open&&!L.context.dataRef.current.__escapeKeyBubbles){C=!1;return}}),!C)return}r(!1,eA(O)?O.nativeEvent:O,"escape-key")}),P=kt(O=>{var N;const z=()=>{var M;k(O),(M=Un(O))==null||M.removeEventListener("keydown",z)};(N=Un(O))==null||N.addEventListener("keydown",z)}),_=kt(O=>{var N;const z=i.current.insideReactTree;i.current.insideReactTree=!1;const M=x.current;if(x.current=!1,c==="click"&&M||z||typeof y=="function"&&!y(O))return;const C=Un(O),L="["+eo("inert")+"]",$=Ut(o.floating).querySelectorAll(L);let B=tt(C)?C:null;for(;B&&!lr(B);){const J=cr(B);if(lr(J)||!tt(J))break;B=J}if($.length&&tt(C)&&!XI(C)&&!Ht(C,o.floating)&&Array.from($).every(J=>!Ht(B,J)))return;if(Ot(C)&&D){const J=lr(C),re=cn(C),ee=/auto|scroll/,Y=J||ee.test(re.overflowX),K=J||ee.test(re.overflowY),X=Y&&C.clientWidth>0&&C.scrollWidth>C.clientWidth,de=K&&C.clientHeight>0&&C.scrollHeight>C.clientHeight,H=re.direction==="rtl",se=de&&(H?O.offsetX<=C.offsetWidth-C.clientWidth:O.offsetX>C.clientWidth),ie=X&&O.offsetY>C.clientHeight;if(se||ie)return}const q=(N=i.current.floatingContext)==null?void 0:N.nodeId,G=h&&Xr(h.nodesRef.current,q).some(J=>{var re;return Fu(O,(re=J.context)==null?void 0:re.elements.floating)});if(Fu(O,o.floating)||Fu(O,o.domReference)||G)return;const W=h?Xr(h.nodesRef.current,q):[];if(W.length>0){let J=!0;if(W.forEach(re=>{var ee;if((ee=re.context)!=null&&ee.open&&!re.context.dataRef.current.__outsidePressBubbles){J=!1;return}}),!J)return}r(!1,O,"outside-press")}),F=kt(O=>{var N;const z=()=>{var M;_(O),(M=Un(O))==null||M.removeEventListener(c,z)};(N=Un(O))==null||N.addEventListener(c,z)});A.useEffect(()=>{if(!n||!a)return;i.current.__escapeKeyBubbles=b,i.current.__outsidePressBubbles=E;let O=-1;function N($){r(!1,$,"ancestor-scroll")}function z(){window.clearTimeout(O),w.current=!0}function M(){O=window.setTimeout(()=>{w.current=!1},ms()?5:0)}const C=Ut(o.floating);s&&(C.addEventListener("keydown",T?P:k,T),C.addEventListener("compositionstart",z),C.addEventListener("compositionend",M)),y&&C.addEventListener(c,I?F:_,I);let L=[];return f&&(tt(o.domReference)&&(L=xr(o.domReference)),tt(o.floating)&&(L=L.concat(xr(o.floating))),!tt(o.reference)&&o.reference&&o.reference.contextElement&&(L=L.concat(xr(o.reference.contextElement)))),L=L.filter($=>{var B;return $!==((B=C.defaultView)==null?void 0:B.visualViewport)}),L.forEach($=>{$.addEventListener("scroll",N,{passive:!0})}),()=>{s&&(C.removeEventListener("keydown",T?P:k,T),C.removeEventListener("compositionstart",z),C.removeEventListener("compositionend",M)),y&&C.removeEventListener(c,I?F:_,I),L.forEach($=>{$.removeEventListener("scroll",N)}),window.clearTimeout(O)}},[i,o,s,y,c,n,r,f,a,b,E,k,T,P,_,I,F]),A.useEffect(()=>{i.current.insideReactTree=!1},[i,y,c]);const V=A.useMemo(()=>({onKeyDown:k,...u&&{[gP[d]]:O=>{r(!1,O.nativeEvent,"reference-press")},...d!=="click"&&{onClick(O){r(!1,O.nativeEvent,"reference-press")}}}}),[k,r,u,d]),D=A.useMemo(()=>({onKeyDown:k,onMouseDown(){x.current=!0},onMouseUp(){x.current=!0},[vP[c]]:()=>{i.current.insideReactTree=!0}}),[k,c,i]);return A.useMemo(()=>a?{reference:V,floating:D}:{},[a,V,D])}function yP(e){const{open:t=!1,onOpenChange:n,elements:r}=e,o=Ki(),i=A.useRef({}),[a]=A.useState(()=>Av()),s=Sr()!=null;if(process.env.NODE_ENV!=="production"){const p=r.reference;p&&!tt(p)&&QA("Cannot pass a virtual element to the `elements.reference` option,","as it must be a real DOM element. Use `refs.setPositionReference()`","instead.")}const[l,c]=A.useState(r.reference),u=kt((p,v,h)=>{i.current.openEvent=p?v:void 0,a.emit("openchange",{open:p,event:v,reason:h,nested:s}),n?.(p,v,h)}),d=A.useMemo(()=>({setPositionReference:c}),[]),f=A.useMemo(()=>({reference:l||r.reference||null,floating:r.floating||null,domReference:r.reference}),[l,r.reference,r.floating]);return A.useMemo(()=>({dataRef:i,open:t,onOpenChange:u,elements:f,events:a,floatingId:o,refs:d}),[t,u,f,a,o,d])}function Gn(e){e===void 0&&(e={});const{nodeId:t}=e,n=yP({...e,elements:{reference:null,floating:null,...e.elements}}),r=e.rootContext||n,o=r.elements,[i,a]=A.useState(null),[s,l]=A.useState(null),u=o?.domReference||i,d=A.useRef(null),f=Tr();nt(()=>{u&&(d.current=u)},[u]);const p=WA({...e,elements:{...o,...s&&{reference:s}}}),v=A.useCallback(b=>{const E=tt(b)?{getBoundingClientRect:()=>b.getBoundingClientRect(),getClientRects:()=>b.getClientRects(),contextElement:b}:b;l(E),p.refs.setReference(E)},[p.refs]),h=A.useCallback(b=>{(tt(b)||b===null)&&(d.current=b,a(b)),(tt(p.refs.reference.current)||p.refs.reference.current===null||b!==null&&!tt(b))&&p.refs.setReference(b)},[p.refs]),m=A.useMemo(()=>({...p.refs,setReference:h,setPositionReference:v,domReference:d}),[p.refs,h,v]),y=A.useMemo(()=>({...p.elements,domReference:u}),[p.elements,u]),x=A.useMemo(()=>({...p,...r,refs:m,elements:y,nodeId:t}),[p,m,y,t,r]);return nt(()=>{r.dataRef.current.floatingContext=x;const b=f?.nodesRef.current.find(E=>E.id===t);b&&(b.context=x)}),A.useMemo(()=>({...p,context:x,refs:m,elements:y}),[p,m,y,x])}function Zu(){return GI()&&Kg()}function bP(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,events:o,dataRef:i,elements:a}=e,{enabled:s=!0,visibleOnly:l=!0}=t,c=A.useRef(!1),u=A.useRef(-1),d=A.useRef(!0);A.useEffect(()=>{if(!s)return;const p=qt(a.domReference);function v(){!n&&Ot(a.domReference)&&a.domReference===qn(Ut(a.domReference))&&(c.current=!0)}function h(){d.current=!0}function m(){d.current=!1}return p.addEventListener("blur",v),Zu()&&(p.addEventListener("keydown",h,!0),p.addEventListener("pointerdown",m,!0)),()=>{p.removeEventListener("blur",v),Zu()&&(p.removeEventListener("keydown",h,!0),p.removeEventListener("pointerdown",m,!0))}},[a.domReference,n,s]),A.useEffect(()=>{if(!s)return;function p(v){let{reason:h}=v;(h==="reference-press"||h==="escape-key")&&(c.current=!0)}return o.on("openchange",p),()=>{o.off("openchange",p)}},[o,s]),A.useEffect(()=>()=>{Yt(u)},[]);const f=A.useMemo(()=>({onMouseLeave(){c.current=!1},onFocus(p){if(c.current)return;const v=Un(p.nativeEvent);if(l&&tt(v)){if(Zu()&&!p.relatedTarget){if(!d.current&&!Lu(v))return}else if(!QI(v))return}r(!0,p.nativeEvent,"focus")},onBlur(p){c.current=!1;const v=p.relatedTarget,h=p.nativeEvent,m=tt(v)&&v.hasAttribute(eo("focus-guard"))&&v.getAttribute("data-type")==="outside";u.current=window.setTimeout(()=>{var y;const x=qn(a.domReference?a.domReference.ownerDocument:document);!v&&x===a.domReference||Ht((y=i.current.floatingContext)==null?void 0:y.refs.floating.current,x)||Ht(a.domReference,x)||m||r(!1,h,"focus")})}}),[i,a.domReference,r,l]);return A.useMemo(()=>s?{reference:f}:{},[s,f])}function Xu(e,t,n){const r=new Map,o=n==="item";let i=e;if(o&&e){const{[Tv]:a,[Ev]:s,...l}=e;i=l}return{...n==="floating"&&{tabIndex:-1,[YA]:""},...i,...t.map(a=>{const s=a?a[n]:null;return typeof s=="function"?e?s(e):null:s}).concat(e).reduce((a,s)=>(s&&Object.entries(s).forEach(l=>{let[c,u]=l;if(!(o&&[Tv,Ev].includes(c)))if(c.indexOf("on")===0){if(r.has(c)||r.set(c,[]),typeof u=="function"){var d;(d=r.get(c))==null||d.push(u),a[c]=function(){for(var f,p=arguments.length,v=new Array(p),h=0;h<p;h++)v[h]=arguments[h];return(f=r.get(c))==null?void 0:f.map(m=>m(...v)).find(m=>m!==void 0)}}}else a[c]=u}),a),{})}}function Yn(e){e===void 0&&(e=[]);const t=e.map(s=>s?.reference),n=e.map(s=>s?.floating),r=e.map(s=>s?.item),o=A.useCallback(s=>Xu(s,e,"reference"),t),i=A.useCallback(s=>Xu(s,e,"floating"),n),a=A.useCallback(s=>Xu(s,e,"item"),r);return A.useMemo(()=>({getReferenceProps:o,getFloatingProps:i,getItemProps:a}),[o,i,a])}const xP="Escape";function Rs(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function Bs(e,t){return Rs(t,e===kv||e===Ns,e===Gi||e===Yi)}function Qu(e,t,n){return Rs(t,e===Ns,n?e===Gi:e===Yi)||e==="Enter"||e===" "||e===""}function Kv(e,t,n){return Rs(t,n?e===Gi:e===Yi,e===Ns)}function Zv(e,t,n,r){const o=n?e===Yi:e===Gi,i=e===kv;return t==="both"||t==="horizontal"&&r&&r>1?e===xP:Rs(t,o,i)}function Hs(e,t){const{open:n,onOpenChange:r,elements:o,floatingId:i}=e,{listRef:a,activeIndex:s,onNavigate:l=()=>{},enabled:c=!0,selectedIndex:u=null,allowEscape:d=!1,loop:f=!1,nested:p=!1,rtl:v=!1,virtual:h=!1,focusItemOnOpen:m="auto",focusItemOnHover:y=!0,openOnArrowKeyDown:x=!0,disabledIndices:b=void 0,orientation:E="vertical",parentOrientation:T,cols:I=1,scrollItemIntoView:w=!0,virtualItemRef:k,itemSizes:P,dense:_=!1}=t;process.env.NODE_ENV!=="production"&&(d&&(f||Fs("`useListNavigation` looping must be enabled to allow escaping."),h||Fs("`useListNavigation` must be virtual to allow escaping.")),E==="vertical"&&I>1&&Fs("In grid list navigation mode (`cols` > 1), the `orientation` should",'be either "horizontal" or "both".'));const F=ks(o.floating),V=Wt(F),D=Sr(),O=Tr();nt(()=>{e.dataRef.current.orientation=E},[e,E]);const N=kt(()=>{l(C.current===-1?null:C.current)}),z=Vu(o.domReference),M=A.useRef(m),C=A.useRef(u??-1),L=A.useRef(null),$=A.useRef(!0),B=A.useRef(N),q=A.useRef(!!o.floating),G=A.useRef(n),W=A.useRef(!1),J=A.useRef(!1),re=Wt(b),ee=Wt(n),Y=Wt(w),K=Wt(u),[X,de]=A.useState(),[H,se]=A.useState(),ie=kt(()=>{function me(ne){if(h){var ce;(ce=ne.id)!=null&&ce.endsWith("-fui-option")&&(ne.id=i+"-"+Math.random().toString(16).slice(2,10)),de(ne.id),O?.events.emit("virtualfocus",ne),k&&(k.current=ne)}else to(ne,{sync:W.current,preventScroll:!0})}const oe=a.current[C.current],j=J.current;oe&&me(oe),(W.current?ne=>ne():requestAnimationFrame)(()=>{const ne=a.current[C.current]||oe;if(!ne)return;oe||me(ne);const ce=Y.current;ce&&le&&(j||!$.current)&&(ne.scrollIntoView==null||ne.scrollIntoView(typeof ce=="boolean"?{block:"nearest",inline:"nearest"}:ce))})});nt(()=>{c&&(n&&o.floating?M.current&&u!=null&&(J.current=!0,C.current=u,N()):q.current&&(C.current=-1,B.current()))},[c,n,o.floating,u,N]),nt(()=>{if(c&&n&&o.floating)if(s==null){if(W.current=!1,K.current!=null)return;if(q.current&&(C.current=-1,ie()),(!G.current||!q.current)&&M.current&&(L.current!=null||M.current===!0&&L.current==null)){let me=0;const oe=()=>{a.current[0]==null?(me<2&&(me?requestAnimationFrame:queueMicrotask)(oe),me++):(C.current=L.current==null||Qu(L.current,E,v)||p?$u(a,re.current):tv(a,re.current),L.current=null,N())};oe()}}else Wi(a,s)||(C.current=s,ie(),J.current=!1)},[c,n,o.floating,s,K,p,a,E,v,N,ie,re]),nt(()=>{var me;if(!c||o.floating||!O||h||!q.current)return;const oe=O.nodesRef.current,j=(me=oe.find(ce=>ce.id===D))==null||(me=me.context)==null?void 0:me.elements.floating,R=qn(Ut(o.floating)),ne=oe.some(ce=>ce.context&&Ht(ce.context.elements.floating,R));j&&!ne&&$.current&&j.focus({preventScroll:!0})},[c,o.floating,O,D,h]),nt(()=>{if(!c||!O||!h||D)return;function me(oe){se(oe.id),k&&(k.current=oe)}return O.events.on("virtualfocus",me),()=>{O.events.off("virtualfocus",me)}},[c,O,h,D,k]),nt(()=>{B.current=N,G.current=n,q.current=!!o.floating}),nt(()=>{n||(L.current=null,M.current=m)},[n,m]);const Q=s!=null,le=A.useMemo(()=>{function me(j){if(!ee.current)return;const R=a.current.indexOf(j);R!==-1&&C.current!==R&&(C.current=R,N())}return{onFocus(j){let{currentTarget:R}=j;W.current=!0,me(R)},onClick:j=>{let{currentTarget:R}=j;return R.focus({preventScroll:!0})},onMouseMove(j){let{currentTarget:R}=j;W.current=!0,J.current=!1,y&&me(R)},onPointerLeave(j){let{pointerType:R}=j;if(!(!$.current||R==="touch")&&(W.current=!0,!!y&&(C.current=-1,N(),!h))){var ne;(ne=V.current)==null||ne.focus({preventScroll:!0})}}}},[ee,V,y,a,N,h]),te=A.useCallback(()=>{var me;return T??(O==null||(me=O.nodesRef.current.find(oe=>oe.id===D))==null||(me=me.context)==null||(me=me.dataRef)==null?void 0:me.current.orientation)},[D,O,T]),fe=kt(me=>{if($.current=!1,W.current=!0,me.which===229||!ee.current&&me.currentTarget===V.current)return;if(p&&Zv(me.key,E,v,I)){Bs(me.key,te())||Gt(me),r(!1,me.nativeEvent,"list-navigation"),Ot(o.domReference)&&(h?O?.events.emit("virtualfocus",o.domReference):o.domReference.focus());return}const oe=C.current,j=$u(a,b),R=tv(a,b);if(z||(me.key==="Home"&&(Gt(me),C.current=j,N()),me.key==="End"&&(Gt(me),C.current=R,N())),I>1){const ne=P||Array.from({length:a.current.length},()=>({width:1,height:1})),ce=aA(ne,I,_),xe=ce.findIndex(qe=>qe!=null&&!Is(a,qe,b)),Ce=ce.reduce((qe,pt,ht)=>pt!=null&&!Is(a,pt,b)?ht:qe,-1),_e=ce[iA({current:ce.map(qe=>qe!=null?a.current[qe]:null)},{event:me,orientation:E,loop:f,rtl:v,cols:I,disabledIndices:lA([...(typeof b!="function"?b:null)||a.current.map((qe,pt)=>Is(a,pt,b)?pt:void 0),void 0],ce),minIndex:xe,maxIndex:Ce,prevIndex:sA(C.current>R?j:C.current,ne,ce,I,me.key===Ns?"bl":me.key===(v?Gi:Yi)?"tr":"tl"),stopEvent:!0})];if(_e!=null&&(C.current=_e,N()),E==="both")return}if(Bs(me.key,E)){if(Gt(me),n&&!h&&qn(me.currentTarget.ownerDocument)===me.currentTarget){C.current=Qu(me.key,E,v)?j:R,N();return}Qu(me.key,E,v)?f?C.current=oe>=R?d&&oe!==a.current.length?-1:j:Xt(a,{startingIndex:oe,disabledIndices:b}):C.current=Math.min(R,Xt(a,{startingIndex:oe,disabledIndices:b})):f?C.current=oe<=j?d&&oe!==-1?a.current.length:R:Xt(a,{startingIndex:oe,decrement:!0,disabledIndices:b}):C.current=Math.max(j,Xt(a,{startingIndex:oe,decrement:!0,disabledIndices:b})),Wi(a,C.current)&&(C.current=-1),N()}}),pe=A.useMemo(()=>h&&n&&Q&&{"aria-activedescendant":H||X},[h,n,Q,H,X]),ve=A.useMemo(()=>({"aria-orientation":E==="both"?void 0:E,...z?{}:pe,onKeyDown:fe,onPointerMove(){$.current=!0}}),[pe,fe,E,z]),Ae=A.useMemo(()=>{function me(j){m==="auto"&&Jg(j.nativeEvent)&&(M.current=!0)}function oe(j){M.current=m,m==="auto"&&ev(j.nativeEvent)&&(M.current=!0)}return{...pe,onKeyDown(j){$.current=!1;const R=j.key.startsWith("Arrow"),ne=["Home","End"].includes(j.key),ce=R||ne,xe=Kv(j.key,E,v),Ce=Zv(j.key,E,v,I),_e=Kv(j.key,te(),v),qe=Bs(j.key,E),pt=(p?_e:qe)||j.key==="Enter"||j.key.trim()==="";if(h&&n){const U=O?.nodesRef.current.find(Pe=>Pe.parentId==null),Z=O&&U?JI(O.nodesRef.current,U.id):null;if(ce&&Z&&k){const Pe=new KeyboardEvent("keydown",{key:j.key,bubbles:!0});if(xe||Ce){var ht,$t;const Ge=((ht=Z.context)==null?void 0:ht.elements.domReference)===j.currentTarget,Ze=Ce&&!Ge?($t=Z.context)==null?void 0:$t.elements.domReference:xe?a.current.find(Ne=>Ne?.id===X):null;Ze&&(Gt(j),Ze.dispatchEvent(Pe),se(void 0))}if((qe||ne)&&Z.context&&Z.context.open&&Z.parentId&&j.currentTarget!==Z.context.elements.domReference){var $e;Gt(j),($e=Z.context.elements.domReference)==null||$e.dispatchEvent(Pe);return}}return fe(j)}if(!(!n&&!x&&R)){if(pt){const U=Bs(j.key,te());L.current=p&&U?null:j.key}if(p){_e&&(Gt(j),n?(C.current=$u(a,re.current),N()):r(!0,j.nativeEvent,"list-navigation"));return}qe&&(u!=null&&(C.current=u),Gt(j),!n&&x?r(!0,j.nativeEvent,"list-navigation"):fe(j),n&&N())}},onFocus(){n&&!h&&(C.current=-1,N())},onPointerDown:oe,onPointerEnter:oe,onMouseDown:me,onClick:me}},[X,pe,I,fe,re,m,a,p,N,r,n,x,E,te,v,u,O,h,k]);return A.useMemo(()=>c?{reference:Ae,floating:ve,item:le}:{},[c,Ae,ve,le])}const wP=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function fr(e,t){var n,r;t===void 0&&(t={});const{open:o,elements:i,floatingId:a}=e,{enabled:s=!0,role:l="dialog"}=t,c=Ki(),u=((n=i.domReference)==null?void 0:n.id)||c,d=A.useMemo(()=>{var x;return((x=ks(i.floating))==null?void 0:x.id)||a},[i.floating,a]),f=(r=wP.get(l))!=null?r:l,v=Sr()!=null,h=A.useMemo(()=>f==="tooltip"||l==="label"?{["aria-"+(l==="label"?"labelledby":"describedby")]:o?d:void 0}:{"aria-expanded":o?"true":"false","aria-haspopup":f==="alertdialog"?"dialog":f,"aria-controls":o?d:void 0,...f==="listbox"&&{role:"combobox"},...f==="menu"&&{id:u},...f==="menu"&&v&&{role:"menuitem"},...l==="select"&&{"aria-autocomplete":"none"},...l==="combobox"&&{"aria-autocomplete":"list"}},[f,d,v,o,u,l]),m=A.useMemo(()=>{const x={id:d,...f&&{role:f}};return f==="tooltip"||l==="label"?x:{...x,...f==="menu"&&{"aria-labelledby":u}}},[f,d,u,l]),y=A.useCallback(x=>{let{active:b,selected:E}=x;const T={role:"option",...b&&{id:d+"-fui-option"}};switch(l){case"select":case"combobox":return{...T,"aria-selected":E}}return{}},[d,l]);return A.useMemo(()=>s?{reference:h,floating:m,item:y}:{},[s,h,m,y])}const Xv=e=>e.replace(/[A-Z]+(?![a-z])|[A-Z]/g,(t,n)=>(n?"-":"")+t.toLowerCase());function Ro(e,t){return typeof e=="function"?e(t):e}function SP(e,t){const[n,r]=A.useState(e);return e&&!n&&r(!0),A.useEffect(()=>{if(!e&&n){const o=setTimeout(()=>r(!1),t);return()=>clearTimeout(o)}},[e,n,t]),n}function TP(e,t){t===void 0&&(t={});const{open:n,elements:{floating:r}}=e,{duration:o=250}=t,a=(typeof o=="number"?o:o.close)||0,[s,l]=A.useState("unmounted"),c=SP(n,a);return!c&&s==="close"&&l("unmounted"),nt(()=>{if(r){if(n){l("initial");const u=requestAnimationFrame(()=>{jn.flushSync(()=>{l("open")})});return()=>{cancelAnimationFrame(u)}}l("close")}},[n,r]),{isMounted:c,status:s}}function Qv(e,t){t===void 0&&(t={});const{initial:n={opacity:0},open:r,close:o,common:i,duration:a=250}=t,s=e.placement,l=s.split("-")[0],c=A.useMemo(()=>({side:l,placement:s}),[l,s]),u=typeof a=="number",d=(u?a:a.open)||0,f=(u?a:a.close)||0,[p,v]=A.useState(()=>({...Ro(i,c),...Ro(n,c)})),{isMounted:h,status:m}=TP(e,{duration:a}),y=Wt(n),x=Wt(r),b=Wt(o),E=Wt(i);return nt(()=>{const T=Ro(y.current,c),I=Ro(b.current,c),w=Ro(E.current,c),k=Ro(x.current,c)||Object.keys(T).reduce((P,_)=>(P[_]="",P),{});if(m==="initial"&&v(P=>({transitionProperty:P.transitionProperty,...w,...T})),m==="open"&&v({transitionProperty:Object.keys(k).map(Xv).join(","),transitionDuration:d+"ms",...w,...k}),m==="close"){const P=I||T;v({transitionProperty:Object.keys(P).map(Xv).join(","),transitionDuration:f+"ms",...w,...P})}},[f,b,y,x,E,d,m,c]),{isMounted:h,styles:p}}function EP(e,t){var n;const{open:r,dataRef:o}=e,{listRef:i,activeIndex:a,onMatch:s,onTypingChange:l,enabled:c=!0,findMatch:u=null,resetMs:d=750,ignoreKeys:f=[],selectedIndex:p=null}=t,v=A.useRef(-1),h=A.useRef(""),m=A.useRef((n=p??a)!=null?n:-1),y=A.useRef(null),x=kt(s),b=kt(l),E=Wt(u),T=Wt(f);nt(()=>{r&&(Yt(v),y.current=null,h.current="")},[r]),nt(()=>{if(r&&h.current===""){var _;m.current=(_=p??a)!=null?_:-1}},[r,p,a]);const I=kt(_=>{_?o.current.typing||(o.current.typing=_,b(_)):o.current.typing&&(o.current.typing=_,b(_))}),w=kt(_=>{function F(z,M,C){const L=E.current?E.current(M,C):M.find($=>$?.toLocaleLowerCase().indexOf(C.toLocaleLowerCase())===0);return L?z.indexOf(L):-1}const V=i.current;if(h.current.length>0&&h.current[0]!==" "&&(F(V,V,h.current)===-1?I(!1):_.key===" "&&Gt(_)),V==null||T.current.includes(_.key)||_.key.length!==1||_.ctrlKey||_.metaKey||_.altKey)return;r&&_.key!==" "&&(Gt(_),I(!0)),V.every(z=>{var M,C;return z?((M=z[0])==null?void 0:M.toLocaleLowerCase())!==((C=z[1])==null?void 0:C.toLocaleLowerCase()):!0})&&h.current===_.key&&(h.current="",m.current=y.current),h.current+=_.key,Yt(v),v.current=window.setTimeout(()=>{h.current="",m.current=y.current,I(!1)},d);const O=m.current,N=F(V,[...V.slice((O||0)+1),...V.slice(0,(O||0)+1)],h.current);N!==-1?(x(N),y.current=N):_.key!==" "&&(h.current="",I(!1))}),k=A.useMemo(()=>({onKeyDown:w}),[w]),P=A.useMemo(()=>({onKeyDown:w,onKeyUp(_){_.key===" "&&I(!1)}}),[w,I]);return A.useMemo(()=>c?{reference:k,floating:P}:{},[c,k,P])}function Jv(e,t,n){return n===void 0&&(n=!0),e.filter(o=>{var i;return o.parentId===t&&(!n||((i=o.context)==null?void 0:i.open))}).flatMap(o=>[o,...Jv(e,o.id,n)])}function ey(e,t){const[n,r]=e;let o=!1;const i=t.length;for(let a=0,s=i-1;a<i;s=a++){const[l,c]=t[a]||[0,0],[u,d]=t[s]||[0,0];c>=r!=d>=r&&n<=(u-l)*(r-c)/(d-c)+l&&(o=!o)}return o}function kP(e,t){return e[0]>=t.x&&e[0]<=t.x+t.width&&e[1]>=t.y&&e[1]<=t.y+t.height}function ty(e){e===void 0&&(e={});const{buffer:t=.5,blockPointerEvents:n=!1,requireIntent:r=!0}=e,o={current:-1};let i=!1,a=null,s=null,l=typeof performance<"u"?performance.now():0;function c(d,f){const p=performance.now(),v=p-l;if(a===null||s===null||v===0)return a=d,s=f,l=p,null;const h=d-a,m=f-s,x=Math.sqrt(h*h+m*m)/v;return a=d,s=f,l=p,x}const u=d=>{let{x:f,y:p,placement:v,elements:h,onClose:m,nodeId:y,tree:x}=d;return function(E){function T(){Yt(o),m()}if(Yt(o),!h.domReference||!h.floating||v==null||f==null||p==null)return;const{clientX:I,clientY:w}=E,k=[I,w],P=nP(E),_=E.type==="mouseleave",F=Uu(h.floating,P),V=Uu(h.domReference,P),D=h.domReference.getBoundingClientRect(),O=h.floating.getBoundingClientRect(),N=v.split("-")[0],z=f>O.right-O.width/2,M=p>O.bottom-O.height/2,C=kP(k,D),L=O.width>D.width,$=O.height>D.height,B=(L?D:O).left,q=(L?D:O).right,G=($?D:O).top,W=($?D:O).bottom;if(F&&(i=!0,!_))return;if(V&&(i=!1),V&&!_){i=!0;return}if(_&&tt(E.relatedTarget)&&Uu(h.floating,E.relatedTarget)||x&&Jv(x.nodesRef.current,y).length)return;if(N==="top"&&p>=D.bottom-1||N==="bottom"&&p<=D.top+1||N==="left"&&f>=D.right-1||N==="right"&&f<=D.left+1)return T();let J=[];switch(N){case"top":J=[[B,D.top+1],[B,O.bottom-1],[q,O.bottom-1],[q,D.top+1]];break;case"bottom":J=[[B,O.top+1],[B,D.bottom-1],[q,D.bottom-1],[q,O.top+1]];break;case"left":J=[[O.right-1,W],[O.right-1,G],[D.left+1,G],[D.left+1,W]];break;case"right":J=[[D.right-1,W],[D.right-1,G],[O.left+1,G],[O.left+1,W]];break}function re(ee){let[Y,K]=ee;switch(N){case"top":{const X=[L?Y+t/2:z?Y+t*4:Y-t*4,K+t+1],de=[L?Y-t/2:z?Y+t*4:Y-t*4,K+t+1],H=[[O.left,z||L?O.bottom-t:O.top],[O.right,z?L?O.bottom-t:O.top:O.bottom-t]];return[X,de,...H]}case"bottom":{const X=[L?Y+t/2:z?Y+t*4:Y-t*4,K-t],de=[L?Y-t/2:z?Y+t*4:Y-t*4,K-t],H=[[O.left,z||L?O.top+t:O.bottom],[O.right,z?L?O.top+t:O.bottom:O.top+t]];return[X,de,...H]}case"left":{const X=[Y+t+1,$?K+t/2:M?K+t*4:K-t*4],de=[Y+t+1,$?K-t/2:M?K+t*4:K-t*4];return[...[[M||$?O.right-t:O.left,O.top],[M?$?O.right-t:O.left:O.right-t,O.bottom]],X,de]}case"right":{const X=[Y-t,$?K+t/2:M?K+t*4:K-t*4],de=[Y-t,$?K-t/2:M?K+t*4:K-t*4],H=[[M||$?O.left+t:O.right,O.top],[M?$?O.left+t:O.right:O.left+t,O.bottom]];return[X,de,...H]}}}if(!ey([I,w],J)){if(i&&!C)return T();if(!_&&r){const ee=c(E.clientX,E.clientY);if(ee!==null&&ee<.1)return T()}ey([I,w],re([f,p]))?!i&&r&&(o.current=window.setTimeout(T,40)):T()}}};return u.__options={blockPointerEvents:n},u}const ny=200,CP=500,Bo=()=>{const e=Date.now(),t=new Uint8Array(16);t[0]=e/Math.pow(2,40)&255,t[1]=e/Math.pow(2,32)&255,t[2]=e/Math.pow(2,24)&255,t[3]=e/Math.pow(2,16)&255,t[4]=e/Math.pow(2,8)&255,t[5]=e&255;const n=new Uint8Array(10);crypto.getRandomValues(n),t.set(n,6),t[6]=t[6]&15|112,t[8]=t[8]&63|128;const r=Array.from(t).map(o=>o.toString(16).padStart(2,"0")).join("");return`${r.slice(0,8)}-${r.slice(8,12)}-${r.slice(12,16)}-${r.slice(16,20)}-${r.slice(20)}`},ry=(e,t,n)=>e.split(t).filter(Boolean).reduce((r,o)=>r!=null?r[o]:r,n),oy={basic:/[,[\]]+?/,extend:/[,[\].]+?/},Ju=(e,t)=>{const n=ry(t,oy.basic,e)||ry(t,oy.extend,e);return n===void 0||n===e?void 0:n},Cr=()=>typeof window>"u",ed=e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),iy=(e,t)=>{const n=[];for(let r=0;r<t;r++){const o=r*t,i=e.slice(o,o+t);i.length>0&&n.push(i)}return n},IP=e=>!e,Ho=()=>{},ay=()=>{const e=navigator.userAgent||navigator.vendor||window.opera;return/android|iphone|ipad|ipod|opera mini|iemobile|wpdesktop/i.test(e)},td=S.forwardRef(function({as:t,open:n,title:r,children:o,placement:i,focus:a=!0,hover:s=!0,enabled:l=!0,popover:c=!0,onChange:u=Ho,followCursor:d=!1,...f},p){const[v,h]=S.useState(n??!1),m=S.useRef(null),y=t||"span",x=O=>{h(O),u?.(O)},{refs:b,floatingStyles:E,context:T}=Gn({placement:i,open:v,whileElementsMounted:Jr,onOpenChange:n?void 0:x,middleware:[Ms(),$o(5),xv(),Bu({padding:5,element:m}),Ds({fallbackAxisSideDirection:"start"})]}),I=kr(T,{enabled:l}),w=fr(T,{role:"tooltip",enabled:l}),k=bP(T,{enabled:l?a:!1}),P=jo(T,{enabled:l?c:!1}),_=mP(T,{enabled:!!l&&!!d}),F=Mv(T,{move:!0,delay:{open:ny},enabled:l?s:!1,handleClose:c?ty():null}),{getReferenceProps:V,getFloatingProps:D}=Yn([w,I,_,a?k:void 0,s?F:void 0,c?P:void 0]);return S.useEffect(()=>h(n===void 0?!1:n),[n]),g.jsxs(S.Fragment,{children:[g.jsx(y,{...V(f),ref:sr(b.setReference,p),children:r}),v&&g.jsx(dr,{children:g.jsxs(ln,{...D(),ref:b.setFloating,style:E,className:"p-3 rounded-lg border isolate z-tooltip border-tooltip-border bg-tooltip-background text-tooltip-foreground shadow-shadow-floating",children:[g.jsx(Hu,{ref:m,context:T,strokeWidth:.1,className:"fill-tooltip-background stroke-tooltip-border"}),o]})})]})}),sy=({reportStatus:e,id:t,hideLeft:n=!1,className:r,info:o,children:i,title:a})=>g.jsxs("span",{className:Oe("max-w-full justify-between w-fit",n&&i===null?"hidden":"flex",r),children:[n?null:g.jsxs("span",{className:"flex flex-1 gap-1 items-center transition-colors group-disabled:text-disabled group-error:text-danger group-hover:text-primary group-focus-within:text-primary",children:[a,e||o?g.jsxs("span",{className:"flex gap-1 justify-center items-center",children:[o?g.jsx(td,{as:"button",type:"button","aria-label":typeof o=="string"?o:void 0,"aria-describedby":typeof o=="string"?void 0:t?`tooltip-info-content-${t}`:void 0,title:g.jsx("span",{className:"cursor-help",children:g.jsx(bu,{className:"aspect-square size-3","aria-hidden":"true",size:16,strokeWidth:1,absoluteStrokeWidth:!0})}),children:g.jsx("div",{id:t?`tooltip-info-content-${t}`:void 0,className:"w-full max-w-48 whitespace-break-spaces wrap-break-word",children:o})}):null,e?g.jsxs("span",{className:"flex items-center h-3 min-w-6",children:[g.jsx(Cg,{className:"hidden opacity-0 transition-opacity aspect-square size-3 group-assert:block group-assert:text-success group-assert:opacity-100","aria-hidden":"true",size:16,strokeWidth:1,absoluteStrokeWidth:!0}),g.jsx(KC,{className:"hidden opacity-0 transition-opacity aspect-square size-3 group-error:block group-error:opacity-100","aria-hidden":"true",size:16,strokeWidth:1,absoluteStrokeWidth:!0})]}):null]}):null]}),i]}),Xi=S.forwardRef(({optionalText:e,left:t,rightLabel:n,container:r,feedback:o,interactive:i,right:a,info:s,children:l,error:c,form:u,id:d,labelClassName:f="",name:p,title:v,componentName:h,placeholder:m,hideLeft:y=!1,required:x,disabled:b,reportStatus:E},T)=>{const I=Tu(),w=E!==void 0?E:I.input.iconFeedback,k=d??p,P=Pt(),_=e??P.inputOptionalLabel;return g.jsxs("fieldset",{ref:T,form:u,disabled:b,"data-error":!!c,"aria-disabled":b,"data-component":h,"data-interactive":!!i,className:Oe("group flex min-h-0 max-w-full min-w-0 flex-col items-start",r),children:[g.jsxs("label",{form:u,htmlFor:k,className:"inline-flex relative flex-row flex-wrap gap-1 justify-between w-full max-w-full text-sm transition-colors cursor-text empty:hidden text-field-label group-disabled:cursor-not-allowed group-error:text-danger",children:[g.jsx(sy,{info:s,hideLeft:y,reportStatus:w,title:v,placeholder:m,children:_||n?g.jsxs(S.Fragment,{children:[x?null:g.jsx("span",{"aria-disabled":b,className:"text-opacity-70 transition-colors aria-disabled:text-disabled group-hover:text-primary group-focus-within:text-primary",children:_}),n?g.jsx(S.Fragment,{children:n}):null]}):null}),g.jsxs("div",{className:`group relative flex w-full flex-row flex-nowrap items-center gap-x-2 gap-y-1 rounded-md border border-input-border bg-transparent transition-colors group-hover:border-primary group-disabled:border-disabled group-error:border-danger ${f}`,children:[t?g.jsx("span",{className:"flex flex-nowrap gap-1 pl-2 whitespace-nowrap",children:t}):null,l,a?g.jsx("span",{className:"flex flex-nowrap gap-2 pr-2 whitespace-nowrap",children:a}):null]})]}),g.jsx("p",{className:"mt-input-gap hidden whitespace-pre-wrap text-wrap text-xs empty:mt-0 empty:hidden group-has-[input:not(:focus):invalid[data-initialized=true]]:flex group-error:flex group-error:text-danger",children:c}),g.jsx("p",{className:"mt-input-gap text-xs empty:mt-0 empty:hidden group-has-[input:not(:focus):valid[data-initialized=true]]:block group-assert:block group-error:hidden",children:o})]})}),ly=(e,t,n,r)=>S.forwardRef(({info:i,left:a,next:s,error:l,right:c,container:u,rightLabel:d,interactive:f,optionalText:p,type:v="text",labelClassName:h,feedback:m=null,hideLeft:y=!1,loading:x,...b},E)=>{const T=e,I=b.id??b.name,w=S.useRef(null);return S.useEffect(()=>{if(w.current===null)return;const k=w.current,P=Vi(w.current),_=r?.(k),F=V=>{const D=V;if(D.key==="Enter"&&k.enterKeyHint==="next"){const O=k.getAttribute("data-next");if(O){const N=document.getElementById(O);if(N)return N.focus(),void D.preventDefault()}}};return k.addEventListener("keydown",F),()=>{_?.(),P(),k.removeEventListener("keydown",F)}},[]),g.jsx(Xi,{...n,info:i,left:a,error:l,right:c,loading:x,form:b.form,name:b.name,feedback:m,hideLeft:y,title:b.title,container:Oe(u,n.container),rightLabel:d,disabled:b.disabled,interactive:f,required:b.required,componentName:t,id:b.name||b.id,optionalText:p,labelClassName:h,placeholder:b.placeholder,children:g.jsx(T,{...n,...b,id:I,name:I,type:v,"data-next":s,"aria-busy":b.disabled,"aria-disabled":b.disabled,"aria-readonly":b.readOnly,ref:sr(E,w),className:Oe("input placeholder-input-mask group h-input-height w-full flex-1","rounded-md bg-transparent px-input-x py-input-y text-base text-foreground","outline-hidden transition-colors focus:ring-2 focus:ring-inset focus:ring-primary","group-error:text-danger group-error:placeholder-input-mask-error","resize-y group-focus-within:border-primary group-hover:border-primary","disabled:cursor-not-allowed disabled:text-disabled",b.className)})})}),Wo=ly(Sg,"input",{type:"text"}),AP=Io("relative overflow-hidden inline-flex duration-500 enabled:hover:bg-opacity-70 enabled:focus:bg-opacity-70 data-[loading=true]:opacity-30 data-[loading=true]:animate-pulse gap-1.5 items-center justify-center align-middle cursor-pointer whitespace-nowrap font-medium transition-colors ease-in disabled:cursor-not-allowed disabled:bg-opacity-40 disabled:text-opacity-80 focus-visible:outline-hidden focus-visible:ring-4 focus-visible:ring-ring",{variants:{size:{icon:"p-1",big:"h-12 px-6 py-4",default:"h-10 px-4 py-2",min:"h-7 px-3 py-1 text-sm",small:"h-8 px-4 py-2 text-sm",tiny:"h-6 px-2 py-1 text-sm"},rounded:{rough:"rounded-xs",squared:"rounded-none",default:"rounded-button",circle:"rounded-full aspect-square"},theme:{raw:"",disabled:"bg-disabled opacity-70",loading:"animate-pulse bg-disabled",main:"bg-button-primary-bg text-button-primary-text",info:"bg-button-info-bg text-button-info-text",warn:"bg-button-warn-bg text-button-warn-text",muted:"bg-button-muted-bg text-button-muted-text",danger:"bg-button-danger-bg text-button-danger-text",neutral:"bg-transparent border-2 border-card-border",primary:"bg-button-primary-bg text-button-primary-text",success:"bg-button-success-bg text-button-success-text",secondary:"bg-button-secondary-bg text-button-secondary-text","ghost-info":"bg-transparent hover:bg-info/20 border border-info text-info","ghost-warn":"bg-transparent hover:bg-warn/20 border border-warn text-warn","ghost-danger":"bg-transparent hover:bg-danger/20 border border-danger text-danger","ghost-primary":"bg-transparent hover:bg-primary/20 border border-primary text-primary","ghost-success":"bg-transparent hover:bg-success/20 border border-success text-success","ghost-secondary":"bg-transparent hover:bg-secondary/20 border border-secondary text-secondary"}},defaultVariants:{theme:"main",size:"default",rounded:"default"}}),ro=S.forwardRef(function({className:t,icon:n,loading:r,theme:o,type:i="button",size:a,rounded:s,...l},c){const u=r||l.disabled;return g.jsxs(ln,{...l,ref:c,type:i,"data-theme":o,disabled:u,"data-loading":r,"data-component":"button","aria-disabled":u,as:l.as??"button","aria-busy":u||r,onClick:u?void 0:l.onClick,className:Oe(AP({size:a,rounded:s,theme:o}),t),children:[n,l.children]})}),oo=S.forwardRef(({required:e=!0,options:t,info:n,selectContainer:r="",feedback:o=null,labelClassName:i,interactive:a,rightLabel:s,loading:l,optionalText:c,container:u,hideLeft:d=!1,right:f,left:p,error:v,...h},m)=>{const y=Pt(),x=S.useRef(null),b=h.id??h.name;S.useImperativeHandle(m,()=>x.current),S.useEffect(()=>{if(x.current===null)return;const T=new AbortController,I=x.current,w=Vi(x.current);return I.addEventListener("change",()=>I.setAttribute("data-selected","true"),{once:!0,signal:T.signal}),()=>{w(),T.abort()}},[]);const E=()=>x.current?.focus();return g.jsx(Xi,{info:n,left:p,error:v,form:h.form,loading:l,name:h.name,feedback:o,hideLeft:d,required:e,title:h.title,container:u,componentName:"select",rightLabel:s,interactive:a,id:h.name||h.id,optionalText:c,labelClassName:i,placeholder:h.placeholder,right:g.jsxs("label",{htmlFor:b,children:[f,g.jsxs("button",{onClick:E,type:"button",className:"mt-2 transition-colors hover:text-primary",children:[g.jsx(gu,{size:20}),g.jsx("span",{className:"sr-only",children:y.inputCaretDown})]})]}),children:g.jsxs("select",{...h,id:b,name:b,required:e,ref:sr(m,x),"data-selected":!!h.value||!1,title:typeof h.title=="string"?h.title:void 0,className:Oe("input select group text-base h-10 w-full flex-1 appearance-none rounded-md","bg-transparent px-2 py-1 text-foreground placeholder-input-placeholder","outline-hidden transition-colors group-error:text-danger group-error:placeholder-input-mask-error","data-[selected=false]:text-input-placeholder",h.className),children:[g.jsx("option",{value:"",disabled:!0,hidden:!0,children:h.placeholder}),t.map(T=>S.createElement("option",{...T,value:T.value,children:T.label??T.value,key:`${b}-select-option-${T.value}`}))]})})});function Cn(e){return e?.ownerDocument||document}function PP({controlled:e,default:t,name:n,state:r="value"}){const{current:o}=A.useRef(e!==void 0),[i,a]=A.useState(t),s=o?e:i;if(process.env.NODE_ENV!=="production"){A.useEffect(()=>{o!==(e!==void 0)&&console.error([`Base UI: A component is changing the ${o?"":"un"}controlled ${r} state of ${n} to be ${o?"un":""}controlled.`,"Elements should not switch from uncontrolled to controlled (or vice versa).",`Decide between using a controlled or uncontrolled ${n} element for the lifetime of the component.`,"The nature of the state is determined during the first render. It's considered controlled if the value is not `undefined`.","More info: https://fb.me/react-controlled-components"].join(`
5
- `))},[r,n,e]);const{current:c}=A.useRef(t);A.useEffect(()=>{!o&&JSON.stringify(c)!==JSON.stringify(t)&&console.error([`Base UI: A component is changing the default ${r} state of an uncontrolled ${n} after being initialized. To suppress this warning opt to use a controlled ${n}.`].join(`
6
- `))},[JSON.stringify(t)])}const l=A.useCallback(c=>{o||a(c)},[]);return[s,l]}const cy={};function io(e,t){const n=A.useRef(cy);return n.current===cy&&(n.current=e(t)),n}const nd=A[`useInsertionEffect${Math.random().toFixed(1)}`.slice(0,-3)],OP=nd&&nd!==A.useLayoutEffect?nd:e=>e();function Ye(e){const t=io(_P).current;return t.next=e,OP(t.effect),t.trampoline}function _P(){const e={next:void 0,callback:MP,trampoline:(...t)=>e.callback?.(...t),effect:()=>{e.callback=e.next}};return e}function MP(){if(process.env.NODE_ENV!=="production")throw new Error("Base UI: Cannot call an event handler while rendering.")}const St=typeof document<"u"?A.useLayoutEffect:()=>{};function rd(e){const t=io(DP,e).current;return t.next=e,St(t.effect),t}function DP(e){const t={current:e,next:e,effect:()=>{t.current=t.next}};return t}let od;process.env.NODE_ENV!=="production"&&(od=new Set);function NP(...e){if(process.env.NODE_ENV!=="production"){const t=e.join(" ");od.has(t)||(od.add(t),console.warn(`Base UI: ${t}`))}}function In(){}const An=Object.freeze({}),FP={clipPath:"inset(50%)",position:"fixed",top:0,left:0},LP="none",uy="track-press",VP="input-change",$P="focus-out",zP="keyboard",jP="drag";function qo(e,t,n,r){let o=!1,i=!1;const a=r??An;return{reason:e,event:t??new Event("base-ui"),cancel(){o=!0},allowPropagation(){i=!0},get isCanceled(){return o},get isPropagationAllowed(){return i},trigger:n,...a}}function dy(e,t,n){const r=An;return{reason:e,event:t??new Event("base-ui"),...r}}function RP(e,t){const n=A.useRef(e),r=Ye(t);St(()=>{n.current!==e&&r(n.current)},[e,r]),St(()=>{n.current=e},[e])}const BP={...A};let fy=0;function HP(e,t="mui"){const[n,r]=A.useState(e),o=e||n;return A.useEffect(()=>{n==null&&(fy+=1,r(`${t}-${fy}`))},[n,t]),o}const py=BP.useId;function Ws(e,t){if(py!==void 0){const n=py();return e??(t?`${t}-${n}`:n)}return HP(e,t)}function qs(e){return Ws(e,"base-ui")}function Ir(e,...t){const n=new URL("https://base-ui.com/production-error");return n.searchParams.set("code",e.toString()),t.forEach(r=>n.searchParams.append("args[]",r)),`Base UI error #${e}; visit ${n} for the full message.`}function id(e,t,n,r){const o=io(hy).current;return qP(o,e,t,n,r)&&my(o,[e,t,n,r]),o.callback}function WP(e){const t=io(hy).current;return UP(t,e)&&my(t,e),t.callback}function hy(){return{callback:null,cleanup:null,refs:[]}}function qP(e,t,n,r,o){return e.refs[0]!==t||e.refs[1]!==n||e.refs[2]!==r||e.refs[3]!==o}function UP(e,t){return e.refs.length!==t.length||e.refs.some((n,r)=>n!==t[r])}function my(e,t){if(e.refs=t,t.every(n=>n==null)){e.callback=null;return}e.callback=n=>{if(e.cleanup&&(e.cleanup(),e.cleanup=null),n!=null){const r=Array(t.length).fill(null);for(let o=0;o<t.length;o+=1){const i=t[o];if(i!=null)switch(typeof i){case"function":{const a=i(n);typeof a=="function"&&(r[o]=a);break}case"object":{i.current=n;break}}}e.cleanup=()=>{for(let o=0;o<t.length;o+=1){const i=t[o];if(i!=null)switch(typeof i){case"function":{const a=r[o];typeof a=="function"?a():i(null);break}case"object":{i.current=null;break}}}}}}}const GP=parseInt(A.version,10);function gy(e){return GP>=e}function vy(e){if(!A.isValidElement(e))return null;const t=e,n=t.props;return(gy(19)?n?.ref:t.ref)??null}function ad(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}function YP(e,t){const n={};for(const r in e){const o=e[r];if(t?.hasOwnProperty(r)){const i=t[r](o);i!=null&&Object.assign(n,i);continue}o===!0?n[`data-${r.toLowerCase()}`]="":o&&(n[`data-${r.toLowerCase()}`]=o.toString())}return n}function KP(e,t){return typeof e=="function"?e(t):e}function ZP(e,t){return typeof e=="function"?e(t):e}const Qi={};function sd(e,t,n,r,o){let i={...ld(e,Qi)};return t&&(i=Us(i,t)),n&&(i=Us(i,n)),r&&(i=Us(i,r)),i}function XP(e){if(e.length===0)return Qi;if(e.length===1)return ld(e[0],Qi);let t={...ld(e[0],Qi)};for(let n=1;n<e.length;n+=1)t=Us(t,e[n]);return t}function Us(e,t){return yy(t)?t(e):QP(e,t)}function QP(e,t){if(!t)return e;for(const n in t){const r=t[n];switch(n){case"style":{e[n]=ad(e.style,r);break}case"className":{e[n]=by(e.className,r);break}default:JP(n,r)?e[n]=eO(e[n],r):e[n]=r}}return e}function JP(e,t){const n=e.charCodeAt(0),r=e.charCodeAt(1),o=e.charCodeAt(2);return n===111&&r===110&&o>=65&&o<=90&&(typeof t=="function"||typeof t>"u")}function yy(e){return typeof e=="function"}function ld(e,t){return yy(e)?e(t):e??Qi}function eO(e,t){return t?e?n=>{if(tO(n)){const o=n;cd(o);const i=t(o);return o.baseUIHandlerPrevented||e?.(o),i}const r=t(n);return e?.(n),r}:t:e}function cd(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function by(e,t){return t?e?t+" "+e:t:e}function tO(e){return e!=null&&typeof e=="object"&&"nativeEvent"in e}function an(e,t,n={}){const r=t.render,o=nO(t,n);if(n.enabled===!1)return null;const i=n.state??An;return rO(e,r,o,i)}function nO(e,t={}){const{className:n,style:r,render:o}=e,{state:i=An,ref:a,props:s,stateAttributesMapping:l,enabled:c=!0}=t,u=c?KP(n,i):void 0,d=c?ZP(r,i):void 0,f=c?YP(i,l):An,p=c?ad(f,Array.isArray(s)?XP(s):s)??An:An;return typeof document<"u"&&(c?Array.isArray(a)?p.ref=WP([p.ref,vy(o),...a]):p.ref=id(p.ref,vy(o),a):id(null,null)),c?(u!==void 0&&(p.className=by(p.className,u)),d!==void 0&&(p.style=ad(p.style,d)),p):An}function rO(e,t,n,r){if(t){if(typeof t=="function")return t(n,r);const o=sd(n,t.props);return o.ref=n.ref,A.cloneElement(t,o)}if(e&&typeof e=="string")return oO(e,n);throw new Error(process.env.NODE_ENV!=="production"?"Base UI: Render element or function are not defined.":Ir(8))}function oO(e,t){return e==="button"?S.createElement("button",{type:"button",...t,key:t.key}):e==="img"?S.createElement("img",{alt:"",...t,key:t.key}):A.createElement(e,t)}function Pn(e,t=Number.MIN_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,n))}function xy(e,t,n=(r,o)=>r===o){return e.length===t.length&&e.every((r,o)=>n(r,t[o]))}const Ji=typeof navigator<"u",ud=cO(),iO=dO(),aO=uO();typeof CSS>"u"||!CSS.supports||CSS.supports("-webkit-backdrop-filter:none"),ud.platform==="MacIntel"&&ud.maxTouchPoints>1||/iP(hone|ad|od)|iOS/.test(ud.platform);const sO=Ji&&/apple/i.test(navigator.vendor);Ji&&iO.toLowerCase().startsWith("mac")&&navigator.maxTouchPoints;const lO=aO.includes("jsdom/");function cO(){if(!Ji)return{platform:"",maxTouchPoints:-1};const e=navigator.userAgentData;return e?.platform?{platform:e.platform,maxTouchPoints:navigator.maxTouchPoints}:{platform:navigator.platform??"",maxTouchPoints:navigator.maxTouchPoints??-1}}function uO(){if(!Ji)return"";const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(({brand:t,version:n})=>`${t}/${n}`).join(" "):navigator.userAgent}function dO(){if(!Ji)return"";const e=navigator.userAgentData;return e?.platform?e.platform:navigator.platform??""}function ao(e){let t=e.activeElement;for(;t?.shadowRoot?.activeElement!=null;)t=t.shadowRoot.activeElement;return t}function Ar(e,t){if(!e||!t)return!1;const n=t.getRootNode?.();if(e.contains(t))return!0;if(n&&Bi(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function dd(e){return"composedPath"in e?e.composedPath()[0]:e.target}function fd(e){return e?.ownerDocument||document}function pd(e){if(!e||lO)return!0;try{return e.matches(":focus-visible")}catch{return!0}}var fO=["input:not([inert]):not([inert] *)","select:not([inert]):not([inert] *)","textarea:not([inert]):not([inert] *)","a[href]:not([inert]):not([inert] *)","button:not([inert]):not([inert] *)","[tabindex]:not(slot):not([inert]):not([inert] *)","audio[controls]:not([inert]):not([inert] *)","video[controls]:not([inert]):not([inert] *)",'[contenteditable]:not([contenteditable="false"]):not([inert]):not([inert] *)',"details>summary:first-of-type:not([inert]):not([inert] *)","details:not([inert]):not([inert] *)"],hd=fO.join(","),wy=typeof Element>"u",ea=wy?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Gs=!wy&&Element.prototype.getRootNode?function(e){var t;return e==null||(t=e.getRootNode)===null||t===void 0?void 0:t.call(e)}:function(e){return e?.ownerDocument},Ys=function(t,n){var r;n===void 0&&(n=!0);var o=t==null||(r=t.getAttribute)===null||r===void 0?void 0:r.call(t,"inert"),i=o===""||o==="true",a=i||n&&t&&(typeof t.closest=="function"?t.closest("[inert]"):Ys(t.parentNode));return a},pO=function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"},hO=function(t,n,r){if(Ys(t))return[];var o=Array.prototype.slice.apply(t.querySelectorAll(hd));return n&&ea.call(t,hd)&&o.unshift(t),o=o.filter(r),o},md=function(t,n,r){for(var o=[],i=Array.from(t);i.length;){var a=i.shift();if(!Ys(a,!1))if(a.tagName==="SLOT"){var s=a.assignedElements(),l=s.length?s:a.children,c=md(l,!0,r);r.flatten?o.push.apply(o,c):o.push({scopeParent:a,candidates:c})}else{var u=ea.call(a,hd);u&&r.filter(a)&&(n||!t.includes(a))&&o.push(a);var d=a.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(a),f=!Ys(d,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(a));if(d&&f){var p=md(d===!0?a.children:d.children,!0,r);r.flatten?o.push.apply(o,p):o.push({scopeParent:a,candidates:p})}else i.unshift.apply(i,a.children)}}return o},Sy=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},Ty=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||pO(t))&&!Sy(t)?0:t.tabIndex},mO=function(t,n){var r=Ty(t);return r<0&&n&&!Sy(t)?0:r},gO=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},Ey=function(t){return t.tagName==="INPUT"},vO=function(t){return Ey(t)&&t.type==="hidden"},yO=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},bO=function(t,n){for(var r=0;r<t.length;r++)if(t[r].checked&&t[r].form===n)return t[r]},xO=function(t){if(!t.name)return!0;var n=t.form||Gs(t),r=function(s){return n.querySelectorAll('input[type="radio"][name="'+s+'"]')},o;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")o=r(window.CSS.escape(t.name));else try{o=r(t.name)}catch(a){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",a.message),!1}var i=bO(o,t.form);return!i||i===t},wO=function(t){return Ey(t)&&t.type==="radio"},SO=function(t){return wO(t)&&!xO(t)},TO=function(t){var n,r=t&&Gs(t),o=(n=r)===null||n===void 0?void 0:n.host,i=!1;if(r&&r!==t){var a,s,l;for(i=!!((a=o)!==null&&a!==void 0&&(s=a.ownerDocument)!==null&&s!==void 0&&s.contains(o)||t!=null&&(l=t.ownerDocument)!==null&&l!==void 0&&l.contains(t));!i&&o;){var c,u,d;r=Gs(o),o=(c=r)===null||c===void 0?void 0:c.host,i=!!((u=o)!==null&&u!==void 0&&(d=u.ownerDocument)!==null&&d!==void 0&&d.contains(o))}}return i},ky=function(t){var n=t.getBoundingClientRect(),r=n.width,o=n.height;return r===0&&o===0},EO=function(t,n){var r=n.displayCheck,o=n.getShadowRoot;if(r==="full-native"&&"checkVisibility"in t){var i=t.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});return!i}if(getComputedStyle(t).visibility==="hidden")return!0;var a=ea.call(t,"details>summary:first-of-type"),s=a?t.parentElement:t;if(ea.call(s,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="full-native"||r==="legacy-full"){if(typeof o=="function"){for(var l=t;t;){var c=t.parentElement,u=Gs(t);if(c&&!c.shadowRoot&&o(c)===!0)return ky(t);t.assignedSlot?t=t.assignedSlot:!c&&u!==t.ownerDocument?t=u.host:t=c}t=l}if(TO(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return ky(t);return!1},kO=function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var n=t.parentElement;n;){if(n.tagName==="FIELDSET"&&n.disabled){for(var r=0;r<n.children.length;r++){var o=n.children.item(r);if(o.tagName==="LEGEND")return ea.call(n,"fieldset[disabled] *")?!0:!o.contains(t)}return!0}n=n.parentElement}return!1},CO=function(t,n){return!(n.disabled||vO(n)||EO(n,t)||yO(n)||kO(n))},Cy=function(t,n){return!(SO(n)||Ty(n)<0||!CO(t,n))},IO=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},Iy=function(t){var n=[],r=[];return t.forEach(function(o,i){var a=!!o.scopeParent,s=a?o.scopeParent:o,l=mO(s,a),c=a?Iy(o.candidates):s;l===0?a?n.push.apply(n,c):n.push(s):r.push({documentOrder:i,tabIndex:l,item:o,isScope:a,content:c})}),r.sort(gO).reduce(function(o,i){return i.isScope?o.push.apply(o,i.content):o.push(i.content),o},[]).concat(n)},Ay=function(t,n){n=n||{};var r;return n.getShadowRoot?r=md([t],n.includeContainer,{filter:Cy.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:IO}):r=hO(t,n.includeContainer,Cy.bind(null,n)),Iy(r)};const Py=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function Oy(e,t){const n=Ay(e,Py()),r=n.length;if(r===0)return;const o=ao(fd(e)),i=n.indexOf(o),a=i===-1?t===1?0:r-1:i+t;return n[a]}function AO(e){return Oy(fd(e).body,1)||e}function PO(e){return Oy(fd(e).body,-1)||e}function gd(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!Ar(n,r)}function OO(e){Ay(e,Py()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function _y(e){e.querySelectorAll("[data-tabindex]").forEach(n=>{const r=n.dataset.tabindex;delete n.dataset.tabindex,r?n.setAttribute("tabindex",r):n.removeAttribute("tabindex")})}const vd=A.createContext({register:()=>{},unregister:()=>{},subscribeMapChange:()=>()=>{},elementsRef:{current:[]},nextIndexRef:{current:0}});process.env.NODE_ENV!=="production"&&(vd.displayName="CompositeListContext");function _O(){return A.useContext(vd)}function MO(e){const{children:t,elementsRef:n,labelsRef:r,onMapChange:o}=e,i=Ye(o),a=A.useRef(0),s=io(NO).current,l=io(DO).current,[c,u]=A.useState(0),d=A.useRef(c),f=Ye((y,x)=>{l.set(y,x??null),d.current+=1,u(d.current)}),p=Ye(y=>{l.delete(y),d.current+=1,u(d.current)}),v=A.useMemo(()=>{const y=new Map;return Array.from(l.keys()).filter(b=>b.isConnected).sort(FO).forEach((b,E)=>{const T=l.get(b)??{};y.set(b,{...T,index:E})}),y},[l,c]);St(()=>{if(typeof MutationObserver!="function"||v.size===0)return;const y=new MutationObserver(x=>{const b=new Set,E=T=>b.has(T)?b.delete(T):b.add(T);x.forEach(T=>{T.removedNodes.forEach(E),T.addedNodes.forEach(E)}),b.size===0&&(d.current+=1,u(d.current))});return v.forEach((x,b)=>{b.parentElement&&y.observe(b.parentElement,{childList:!0})}),()=>{y.disconnect()}},[v]),St(()=>{d.current===c&&(n.current.length!==v.size&&(n.current.length=v.size),r&&r.current.length!==v.size&&(r.current.length=v.size),a.current=v.size),i(v)},[i,v,n,r,c]),St(()=>()=>{n.current=[]},[n]),St(()=>()=>{r&&(r.current=[])},[r]);const h=Ye(y=>(s.add(y),()=>{s.delete(y)}));St(()=>{s.forEach(y=>y(v))},[s,v]);const m=A.useMemo(()=>({register:f,unregister:p,subscribeMapChange:h,elementsRef:n,labelsRef:r,nextIndexRef:a}),[f,p,h,n,r,a]);return g.jsx(vd.Provider,{value:m,children:t})}function DO(){return new Map}function NO(){return new Set}function FO(e,t){const n=e.compareDocumentPosition(t);return n&Node.DOCUMENT_POSITION_FOLLOWING||n&Node.DOCUMENT_POSITION_CONTAINED_BY?-1:n&Node.DOCUMENT_POSITION_PRECEDING||n&Node.DOCUMENT_POSITION_CONTAINS?1:0}function LO(e,t){return{...e,state:{...e.state,valid:!t&&e.state.valid}}}const My=A.createContext({formRef:{current:{fields:new Map}},errors:{},clearErrors:In,validationMode:"onSubmit",submitAttemptedRef:{current:!1}});process.env.NODE_ENV!=="production"&&(My.displayName="FormContext");function Dy(){return A.useContext(My)}const VO={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:null,valueMissing:!1},Ny=A.createContext({invalid:void 0,name:void 0,validityData:{state:VO,errors:[],error:"",value:"",initialValue:null},setValidityData:In,disabled:void 0,touched:!1,setTouched:In,dirty:!1,setDirty:In,filled:!1,setFilled:In,focused:!1,setFocused:In,validate:()=>null,validationMode:"onSubmit",validationDebounceTime:0,shouldValidateOnChange:()=>!1,state:{disabled:!1,valid:null,touched:!1,dirty:!1,filled:!1,focused:!1},markedDirtyRef:{current:!1},validation:{getValidationProps:(e=An)=>e,getInputValidationProps:(e=An)=>e,inputRef:{current:null},commit:async()=>{}}});process.env.NODE_ENV!=="production"&&(Ny.displayName="FieldRootContext");function yd(e=!0){const t=A.useContext(Ny);if(t.setValidityData===In&&!e)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: FieldRootContext is missing. Field parts must be placed within <Field.Root>.":Ir(28));return t}function $O(e){const{enabled:t=!0,value:n,id:r,name:o,controlRef:i,commit:a}=e,{formRef:s}=Dy(),{invalid:l,markedDirtyRef:c,validityData:u,setValidityData:d}=yd(),f=Ye(e.getValue);St(()=>{if(!t)return;let p=n;p===void 0&&(p=f()),u.initialValue===null&&p!==null&&d(v=>({...v,initialValue:p}))},[t,d,n,u.initialValue,f]),St(()=>{!t||!r||s.current.fields.set(r,{getValue:f,name:o,controlRef:i,validityData:LO(u,l),validate(p=!0){let v=n;v===void 0&&(v=f()),c.current=!0,p?jn.flushSync(()=>a(v)):a(v)}})},[a,i,t,s,f,r,l,c,o,u,n]),St(()=>{const p=s.current.fields;return()=>{r&&p.delete(r)}},[s,r])}const Fy=A.createContext({controlId:void 0,setControlId:In,labelId:void 0,setLabelId:In,messageIds:[],setMessageIds:In,getDescriptionProps:e=>e});process.env.NODE_ENV!=="production"&&(Fy.displayName="LabelableContext");function Ly(){return A.useContext(Fy)}function Vy(e,t){return e-t}function zO(e,t,n){const r=e.slice();return r[t]=n,r.sort(Vy)}function $y(e,t,n,r,o,i){let a=e;return a=Pn(a,n,r),o&&(a=zO(i,t,Pn(a,i[t-1]||-1/0,i[t+1]||1/0))),a}function zy(e,t,n){if(!Array.isArray(e))return!0;const r=e.reduce((o,i,a,s)=>(a===s.length-1||o.push(Math.abs(i-s[a+1])),o),[]);return Math.min(...r)>=t*n}const ta={activeThumbIndex:()=>null,max:()=>null,min:()=>null,minStepsBetweenValues:()=>null,step:()=>null,values:()=>null},bd=A.createContext(void 0);process.env.NODE_ENV!=="production"&&(bd.displayName="SliderRootContext");function Ks(){const e=A.useContext(bd);if(e===void 0)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: SliderRootContext is missing. Slider parts must be placed within <Slider.Root>.":Ir(62));return e}function jO(e){return"key"in e?zP:VP}function RO(e,t){return typeof e=="number"&&typeof t=="number"?e===t:Array.isArray(e)&&Array.isArray(t)?xy(e,t):!1}const jy=A.forwardRef(function(t,n){const{"aria-labelledby":r,className:o,defaultValue:i,disabled:a=!1,id:s,format:l,largeStep:c=10,locale:u,render:d,max:f=100,min:p=0,minStepsBetweenValues:v=0,name:h,onValueChange:m,onValueCommitted:y,orientation:x="horizontal",step:b=1,thumbCollisionBehavior:E="push",thumbAlignment:T="center",value:I,...w}=t,k=qs(s),P=Ye(m),_=Ye(y),{clearErrors:F}=Dy(),{state:V,disabled:D,name:O,setTouched:N,setDirty:z,validityData:M,shouldValidateOnChange:C,validation:L}=yd(),{labelId:$}=Ly(),B=r??$,q=D||a,G=O??h,[W,J]=PP({controlled:I,default:i??p,name:"Slider"}),re=A.useRef(null),ee=A.useRef(null),Y=A.useRef([]),K=A.useRef(null),X=A.useRef(null),de=A.useRef(-1),H=A.useRef(null),se=A.useRef(null),ie=A.useRef("none"),Q=rd(l),[le,te]=A.useState(-1),[fe,pe]=A.useState(-1),[ve,Ae]=A.useState(!1),[me,oe]=A.useState(()=>new Map),[j,R]=A.useState([void 0,void 0]),ne=Ye($e=>{te($e),$e!==-1&&pe($e)});$O({id:k,commit:L.commit,value:W,controlRef:ee,name:G,getValue:()=>W}),RP(W,()=>{F(G),C()?L.commit(W):L.commit(W,!0);const $e=M.initialValue;let U;Array.isArray(W)&&Array.isArray($e)?U=!xy(W,$e):U=W!==$e,z(U)});const ce=Ye($e=>{$e&&(ee.current=$e)}),xe=Array.isArray(W),Ce=A.useMemo(()=>xe?W.slice().sort(Vy):[Pn(W,p,f)],[f,p,xe,W]),_e=Ye(($e,U)=>{if(Number.isNaN($e)||RO($e,W))return;const Z=U??qo(LP,void 0,void 0,{activeThumbIndex:-1});ie.current=Z.reason;const Pe=new event.constructor(event.type,event);Object.defineProperty(Pe,"target",{writable:!0,value:{value:$e,name:G}}),Z.event=Pe,se.current=$e,P($e,Z),!Z.isCanceled&&J($e)}),qe=Ye(($e,U,Z)=>{const Pe=$y($e,U,p,f,xe,Ce);if(zy(Pe,b,v)){const Ge=jO(Z);_e(Pe,qo(Ge,Z.nativeEvent,void 0,{activeThumbIndex:U})),N(!0);const Ze=se.current??Pe;_(Ze,dy(Ge,Z.nativeEvent))}});process.env.NODE_ENV!=="production"&&p>=f&&NP("Slider `max` must be greater than `min`."),St(()=>{const $e=ao(Cn(re.current));q&&$e&&re.current?.contains($e)&&$e.blur()},[q]),q&&le!==-1&&ne(-1);const pt=A.useMemo(()=>({...V,activeThumbIndex:le,disabled:q,dragging:ve,orientation:x,max:f,min:p,minStepsBetweenValues:v,step:b,values:Ce}),[V,le,q,ve,f,p,v,x,b,Ce]),ht=A.useMemo(()=>({active:le,controlRef:ee,disabled:q,dragging:ve,validation:L,formatOptionsRef:Q,handleInputChange:qe,indicatorPosition:j,inset:T!=="center",labelId:B,largeStep:c,lastUsedThumbIndex:fe,lastChangedValueRef:se,lastChangeReasonRef:ie,locale:u,max:f,min:p,minStepsBetweenValues:v,name:G,onValueCommitted:_,orientation:x,pressedInputRef:K,pressedThumbCenterOffsetRef:X,pressedThumbIndexRef:de,pressedValuesRef:H,registerFieldControlRef:ce,renderBeforeHydration:T==="edge",setActive:ne,setDragging:Ae,setIndicatorPosition:R,setValue:_e,state:pt,step:b,thumbCollisionBehavior:E,thumbMap:me,thumbRefs:Y,values:Ce}),[le,ee,B,q,ve,L,Q,qe,j,c,fe,se,ie,u,f,p,v,G,_,x,K,X,de,H,ce,ne,Ae,R,_e,pt,b,E,T,me,Y,Ce]),$t=an("div",t,{state:pt,ref:[n,re],props:[{"aria-labelledby":B,id:k,role:"group"},L.getValidationProps,w],stateAttributesMapping:ta});return g.jsx(bd.Provider,{value:ht,children:g.jsx(MO,{elementsRef:Y,onMapChange:oe,children:$t})})});process.env.NODE_ENV!=="production"&&(jy.displayName="SliderRoot");const Ry=new Map;function BO(e,t){const n=JSON.stringify({locale:e,options:t}),r=Ry.get(n);if(r)return r;const o=new Intl.NumberFormat(e,t);return Ry.set(n,o),o}function Uo(e,t,n){return e==null?"":BO(t,n).format(e)}const HO=[];function xd(e){A.useEffect(e,HO)}const Zs=null;let By=globalThis.requestAnimationFrame;class WO{callbacks=[];callbacksCount=0;nextId=1;startId=1;isScheduled=!1;tick=t=>{this.isScheduled=!1;const n=this.callbacks,r=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,r>0)for(let o=0;o<n.length;o+=1)n[o]?.(t)};request(t){const n=this.nextId;this.nextId+=1,this.callbacks.push(t),this.callbacksCount+=1;const r=process.env.NODE_ENV==="test"&&By!==requestAnimationFrame&&(By=requestAnimationFrame,!0);return(!this.isScheduled||r)&&(requestAnimationFrame(this.tick),this.isScheduled=!0),n}cancel(t){const n=t-this.startId;n<0||n>=this.callbacks.length||(this.callbacks[n]=null,this.callbacksCount-=1)}}const Xs=new WO;class wd{static create(){return new wd}static request(t){return Xs.request(t)}static cancel(t){return Xs.cancel(t)}currentId=Zs;request(t){this.cancel(),this.currentId=Xs.request(()=>{this.currentId=Zs,t()})}cancel=()=>{this.currentId!==Zs&&(Xs.cancel(this.currentId),this.currentId=Zs)};disposeEffect=()=>this.cancel}function Hy(){const e=io(wd.create).current;return xd(e.disposeEffect),e}const Wy=A.createContext(void 0);process.env.NODE_ENV!=="production"&&(Wy.displayName="DirectionContext");function qy(){return A.useContext(Wy)?.direction??"ltr"}function Uy(e){const t=e.getBoundingClientRect();return{x:(t.left+t.right)/2,y:(t.top+t.bottom)/2}}function qO(e){if(Math.abs(e)<1){const n=e.toExponential().split("e-"),r=n[0].split(".")[1];return(r?r.length:0)+parseInt(n[1],10)}const t=e.toString().split(".")[1];return t?t.length:0}function Gy(e,t,n){const r=Math.round((e-n)/t)*t+n;return Number(r.toFixed(qO(t)))}function Yy({values:e,index:t,nextValue:n,min:r,max:o,step:i,minStepsBetweenValues:a,initialValues:s}){if(e.length===0)return[];const l=e.slice(),c=i*a,u=l.length-1,d=s??e,f=r+t*c,p=o-(u-t)*c;l[t]=Pn(n,f,p);for(let v=t+1;v<=u;v+=1){const h=l[v-1]+c,m=o-(u-v)*c,y=d[v]??l[v];let x=Math.max(l[v],h);y<x&&(x=Math.max(y,h)),l[v]=Pn(x,h,m)}for(let v=t-1;v>=0;v-=1){const h=l[v+1]-c,m=r+v*c,y=d[v]??l[v];let x=Math.min(l[v],h);y>x&&(x=Math.min(y,h)),l[v]=Pn(x,m,h)}for(let v=0;v<=u;v+=1)l[v]=Number(l[v].toFixed(12));return l}function UO({behavior:e,values:t,currentValues:n,initialValues:r,pressedIndex:o,nextValue:i,min:a,max:s,step:l,minStepsBetweenValues:c}){const u=n??t,d=r??t;if(!(u.length>1))return{value:i,thumbIndex:0,didSwap:!1};const p=l*c;switch(e){case"swap":{const v=u[o],h=1e-7,m=u.slice(),y=m[o-1],x=m[o+1],b=y!=null?y+p:a,E=x!=null?x-p:s,T=Pn(i,b,E),I=Number(T.toFixed(12));m[o]=I;const w=i>v,k=i<v,P=w&&x!=null&&i>=x-h,_=k&&y!=null&&i<=y+h;if(!P&&!_)return{value:m,thumbIndex:o,didSwap:!1};const F=P?o+1:o-1,V=m.map((z,M)=>{if(M===o)return I;const C=d[M];return C??u[M]});let D=i;P?D=Math.max(i,m[F]):D=Math.min(i,m[F]);const O=Yy({values:m,index:F,nextValue:D,min:a,max:s,step:l,minStepsBetweenValues:c,initialValues:V}),N=P?F-1:F+1;if(N>=0&&N<O.length){const z=O[N-1],M=O[N+1];let C=z!=null?z+p:a;C=Math.max(C,a+N*p);let L=M!=null?M-p:s;L=Math.min(L,s-(O.length-1-N)*p);const $=Pn(I,C,L);O[N]=Number($.toFixed(12))}return{value:O,thumbIndex:F,didSwap:!0}}case"push":return{value:Yy({values:u,index:o,nextValue:i,min:a,max:s,step:l,minStepsBetweenValues:c}),thumbIndex:o,didSwap:!1};default:{const v=u.slice(),h=v[o-1],m=v[o+1],y=h!=null?h+p:a,x=m!=null?m-p:s,b=Pn(i,y,x);return v[o]=Number(b.toFixed(12)),{value:v,thumbIndex:o,didSwap:!1}}}}const GO=2;function YO(e,t){if(!e)return{start:0,end:0};function n(i){const a=i!=null?parseFloat(i):0;return Number.isNaN(a)?0:a}const r=t?"Top":"InlineStart",o=t?"Bottom":"InlineEnd";return{start:n(e[`border${r}Width`])+n(e[`padding${r}`]),end:n(e[`border${o}Width`])+n(e[`padding${o}`])}}function Qs(e,t){if(t.current!=null&&e.changedTouches){const n=e;for(let r=0;r<n.changedTouches.length;r+=1){const o=n.changedTouches[r];if(o.identifier===t.current)return{x:o.clientX,y:o.clientY}}return null}return{x:e.clientX,y:e.clientY}}const Ky=A.forwardRef(function(t,n){const{render:r,className:o,...i}=t,{disabled:a,dragging:s,validation:l,inset:c,lastChangedValueRef:u,lastChangeReasonRef:d,max:f,min:p,minStepsBetweenValues:v,onValueCommitted:h,orientation:m,pressedInputRef:y,pressedThumbCenterOffsetRef:x,pressedThumbIndexRef:b,pressedValuesRef:E,registerFieldControlRef:T,renderBeforeHydration:I,setActive:w,setDragging:k,setValue:P,state:_,step:F,thumbCollisionBehavior:V,thumbRefs:D,values:O}=Ks(),N=qy(),z=O.length>1,M=m==="vertical",C=A.useRef(null),L=A.useRef(null),$=Ye(Q=>{Q&&L.current==null&&L.current==null&&(L.current=getComputedStyle(Q))}),B=A.useRef(null),q=A.useRef(0),G=A.useRef(0),W=rd(O),J=Ye(Q=>{b.current!==Q&&(b.current=Q);const le=D.current[Q];if(!le){x.current=null,y.current=null;return}y.current=le.querySelector('input[type="range"]')}),re=Ye(Q=>{const le=C.current;if(!le)return null;const{width:te,height:fe,bottom:pe,left:ve,right:Ae}=le.getBoundingClientRect(),me=YO(L.current,M),oe=G.current,j=(M?fe:te)-me.start-me.end-oe*2,R=x.current??0,ne=Q.x-R,ce=Q.y-R,xe=M?pe-ce-me.end:(N==="rtl"?Ae-ne:ne-ve)-me.start,Ce=Pn((xe-oe)/j,0,1);let _e=(f-p)*Ce+p;if(_e=Gy(_e,F,p),_e=Pn(_e,p,f),!z)return{value:_e,thumbIndex:0,didSwap:!1};const qe=b.current;if(qe<0)return null;const pt=UO({behavior:V,values:O,currentValues:W.current??O,initialValues:E.current,pressedIndex:qe,nextValue:_e,min:p,max:f,step:F,minStepsBetweenValues:v});return V==="swap"&&pt.didSwap?J(pt.thumbIndex):b.current=pt.thumbIndex,pt}),ee=Ye(Q=>{E.current=z?O.slice():null,W.current=O;const le=b.current;let te=le;if(le>-1&&le<O.length){if(O[le]===f){let fe=le;for(;fe>0&&O[fe-1]===f;)fe-=1;te=fe}}else{const fe=M?"y":"x";let pe;te=-1;for(let ve=0;ve<D.current.length;ve+=1){const Ae=D.current[ve];if(tt(Ae)){const me=Uy(Ae),oe=Math.abs(Q[fe]-me[fe]);(pe===void 0||oe<=pe)&&(te=ve,pe=oe)}}}if(te>-1&&te!==le&&J(te),c){const fe=D.current[te];if(tt(fe)){const pe=fe.getBoundingClientRect(),ve=M?"height":"width";G.current=pe[ve]/2}}}),Y=Ye(Q=>{D.current?.[Q]?.querySelector('input[type="range"]')?.focus({preventScroll:!0})}),K=Ye(Q=>{const le=Qs(Q,B);if(le==null)return;if(q.current+=1,Q.type==="pointermove"&&Q.buttons===0){X(Q);return}const te=re(le);te!=null&&zy(te.value,F,v)&&(!s&&q.current>GO&&k(!0),P(te.value,qo(jP,Q,void 0,{activeThumbIndex:te.thumbIndex})),W.current=Array.isArray(te.value)?te.value:[te.value],te.didSwap&&Y(te.thumbIndex))});function X(Q){w(-1),k(!1),y.current=null,x.current=null;const le=Qs(Q,B),te=le!=null?re(le):null;if(te!=null){const fe=d.current;l.commit(u.current??te.value),h(u.current??te.value,dy(fe,Q))}"pointerType"in Q&&C.current?.hasPointerCapture(Q.pointerId)&&C.current?.releasePointerCapture(Q.pointerId),b.current=-1,B.current=null,E.current=null,H()}const de=Ye(Q=>{if(a)return;const le=Q.changedTouches[0];le!=null&&(B.current=le.identifier);const te=Qs(Q,B);if(te!=null){ee(te);const pe=re(te);if(pe==null)return;Y(pe.thumbIndex),P(pe.value,qo(uy,Q,void 0,{activeThumbIndex:pe.thumbIndex})),W.current=Array.isArray(pe.value)?pe.value:[pe.value],pe.didSwap&&Y(pe.thumbIndex)}q.current=0;const fe=Cn(C.current);fe.addEventListener("touchmove",K,{passive:!0}),fe.addEventListener("touchend",X,{passive:!0})}),H=Ye(()=>{const Q=Cn(C.current);Q.removeEventListener("pointermove",K),Q.removeEventListener("pointerup",X),Q.removeEventListener("touchmove",K),Q.removeEventListener("touchend",X),E.current=null}),se=Hy();return A.useEffect(()=>{const Q=C.current;return Q?(Q.addEventListener("touchstart",de,{passive:!0}),()=>{Q.removeEventListener("touchstart",de),se.cancel(),H()}):()=>H()},[H,de,C,se]),A.useEffect(()=>{a&&H()},[a,H]),an("div",t,{state:_,ref:[n,T,C,$],props:[{"data-base-ui-slider-control":I?"":void 0,onPointerDown(Q){const le=C.current;if(!le||a||Q.defaultPrevented||!tt(Q.target)||Q.button!==0)return;const te=Qs(Q,B);if(te!=null){ee(te);const pe=re(te);if(pe==null)return;Ar(D.current[pe.thumbIndex],ao(Cn(le)))?Q.preventDefault():se.request(()=>{Y(pe.thumbIndex)}),k(!0),x.current!=null||(P(pe.value,qo(uy,Q.nativeEvent,void 0,{activeThumbIndex:pe.thumbIndex})),W.current=Array.isArray(pe.value)?pe.value:[pe.value],pe.didSwap&&Y(pe.thumbIndex))}Q.nativeEvent.pointerId&&le.setPointerCapture(Q.nativeEvent.pointerId),q.current=0;const fe=Cn(C.current);fe.addEventListener("pointermove",K,{passive:!0}),fe.addEventListener("pointerup",X,{once:!0})},tabIndex:-1},i],stateAttributesMapping:ta})});process.env.NODE_ENV!=="production"&&(Ky.displayName="SliderControl");const Zy=A.forwardRef(function(t,n){const{render:r,className:o,...i}=t,{state:a}=Ks();return an("div",t,{state:a,ref:n,props:[{style:{position:"relative"}},i],stateAttributesMapping:ta})});process.env.NODE_ENV!=="production"&&(Zy.displayName="SliderTrack");const Js={...{clipPath:"inset(50%)",overflow:"hidden",whiteSpace:"nowrap",border:0,padding:0,width:1,height:1,margin:-1},position:"fixed",top:0,left:0};function el(e,t,n){return(e-t)*100/(n-t)}const tl="ArrowUp",nl="ArrowDown",rl="ArrowLeft",ol="ArrowRight",il="Home",al="End",KO=new Set([rl,ol]),ZO=new Set([tl,nl]),XO=new Set([...KO,...ZO]);[...XO];const QO=new Set([tl,nl,rl,ol,il,al]);let JO=(function(e){return e[e.None=0]="None",e[e.GuessFromOrder=1]="GuessFromOrder",e})({});function e_(e={}){const{label:t,metadata:n,textRef:r,indexGuessBehavior:o,index:i}=e,{register:a,unregister:s,subscribeMapChange:l,elementsRef:c,labelsRef:u,nextIndexRef:d}=_O(),f=A.useRef(-1),[p,v]=A.useState(i??(o===JO.GuessFromOrder?()=>{if(f.current===-1){const y=d.current;d.current+=1,f.current=y}return f.current}:-1)),h=A.useRef(null),m=A.useCallback(y=>{if(h.current=y,p!==-1&&y!==null&&(c.current[p]=y,u)){const x=t!==void 0;u.current[p]=x?t:r?.current?.textContent??y.textContent}},[p,c,u,t,r]);return St(()=>{if(i!=null)return;const y=h.current;if(y)return a(y,n),()=>{s(y)}},[i,a,s,n]),St(()=>{if(i==null)return l(y=>{const x=h.current?y.get(h.current)?.index:null;x!=null&&v(x)})},[i,l,v]),A.useMemo(()=>({ref:m,index:p}),[p,m])}const Xy=A.createContext(void 0);process.env.NODE_ENV!=="production"&&(Xy.displayName="CSPContext");const t_={disableStyleElements:!1};function n_(){return A.useContext(Xy)??t_}function r_(e={}){const{id:t,implicit:n=!1,controlRef:r}=e,{controlId:o,setControlId:i}=Ly(),a=qs(t);return St(()=>{if(!(!n&&!t||i===In)){if(n){const s=r?.current;tt(s)&&s.closest("label")!=null?i(t??null):i(o??a)}else t&&i(t);return()=>{t&&i(void 0)}}},[t,r,o,i,n,a]),o??a}let o_=(function(e){return e.index="data-index",e.dragging="data-dragging",e.orientation="data-orientation",e.disabled="data-disabled",e.valid="data-valid",e.invalid="data-invalid",e.touched="data-touched",e.dirty="data-dirty",e.focused="data-focused",e})({});const i_='!function(){const t=document.currentScript?.parentElement;if(!t)return;const e=t.closest("[data-base-ui-slider-control]");if(!e)return;const r=e.querySelector("[data-base-ui-slider-indicator]"),i=e.getBoundingClientRect(),n="vertical"===e.getAttribute("data-orientation")?"height":"width",o=e.querySelectorAll(\'input[type="range"]\'),l=o.length>1,s=o.length-1;let a=null,u=null;for(let t=0;t<o.length;t+=1){const e=o[t],y=parseFloat(e.getAttribute("value")??"");if(Number.isNaN(y))return;const c=e.parentElement;if(!c)return;const p=parseFloat(e.getAttribute("max")??"100"),g=parseFloat(e.getAttribute("min")??"0"),b=c?.getBoundingClientRect(),d=i[n]-b[n],m=100*(y-g)/(p-g),v=(b[n]/2+d*m/100)/i[n]*100;c.style.setProperty("--position",`${v}%`),Number.isFinite(v)&&(c.style.removeProperty("visibility"),r&&(0===t?(a=v,r.style.setProperty("--start-position",`${v}%`),l||r.style.removeProperty("visibility")):t===s&&(u=v-(a??0),r.style.setProperty("--end-position",`${v}%`),r.style.setProperty("--relative-size",`${u}%`),r.style.removeProperty("visibility"))))}}();',Qy="PageUp",Jy="PageDown",a_=new Set([tl,nl,rl,ol,il,al,Qy,Jy]);function s_(e,t,n,r){if(!(t<0))return e.length===2?t===0?`${Uo(e[t],r,n)} start range`:`${Uo(e[t],r,n)} end range`:n?Uo(e[t],r,n):void 0}function Go(e,t,n,r,o){return n===1?Math.min(e+t,o):Math.max(e-t,r)}const eb=A.forwardRef(function(t,n){const{render:r,children:o,className:i,"aria-describedby":a,"aria-label":s,"aria-labelledby":l,disabled:c=!1,getAriaLabel:u,getAriaValueText:d,id:f,index:p,inputRef:v,onBlur:h,onFocus:m,onKeyDown:y,tabIndex:x,...b}=t,{nonce:E}=n_(),T=qs(f),{active:I,lastUsedThumbIndex:w,controlRef:k,disabled:P,validation:_,formatOptionsRef:F,handleInputChange:V,inset:D,labelId:O,largeStep:N,locale:z,max:M,min:C,minStepsBetweenValues:L,name:$,orientation:B,pressedInputRef:q,pressedThumbCenterOffsetRef:G,pressedThumbIndexRef:W,renderBeforeHydration:J,setActive:re,setIndicatorPosition:ee,state:Y,step:K,values:X}=Ks(),de=qy(),H=c||P,se=X.length>1,ie=B==="vertical",Q=de==="rtl",{setTouched:le,setFocused:te,validationMode:fe}=yd(),pe=A.useRef(null),ve=A.useRef(null),Ae=qs(),me=r_(),oe=se?Ae:me,j=A.useMemo(()=>({inputId:oe}),[oe]),{ref:R,index:ne}=e_({metadata:j}),ce=se?p??ne:0,xe=ce===X.length-1,Ce=X[ce],_e=el(Ce,C,M),[qe,pt]=A.useState(!1),[ht,$t]=A.useState();xd(()=>pt(!0));const $e=w>=0&&w<X.length?w:-1,U=Ye(()=>{const ot=k.current,mt=pe.current;if(!ot||!mt)return;const it=mt.getBoundingClientRect(),gn=ot.getBoundingClientRect(),Ur=ie?"height":"width",Gr=gn[Ur]-it[Ur],Mi=(it[Ur]/2+Gr*_e/100)/gn[Ur]*100;$t(Mi),ce===0?ee(Di=>[Mi,Di[1]]):xe&&ee(Di=>[Di[0],Mi])});St(()=>{D&&queueMicrotask(U)},[U,D]),St(()=>{D&&U()},[U,D,_e]);const Z=A.useCallback(()=>{const ot=ie?"bottom":"insetInlineStart",mt=ie?"left":"top";let it;return se?I===ce?it=2:$e===ce&&(it=1):I===ce&&(it=1),D?{"--position":`${ht}%`,visibility:J&&!qe||ht===void 0?"hidden":void 0,position:"absolute",[ot]:"var(--position)",[mt]:"50%",translate:`${(ie||!Q?-1:1)*50}% ${(ie?1:-1)*50}%`,zIndex:it}:Number.isFinite(_e)?{position:"absolute",[ot]:`${_e}%`,[mt]:"50%",translate:`${(ie||!Q?-1:1)*50}% ${(ie?1:-1)*50}%`,zIndex:it}:Js},[I,ce,D,qe,ht,se,J,Q,$e,_e,ie]);let Pe;B==="vertical"&&(Pe=Q?"vertical-rl":"vertical-lr");const Ge=sd({"aria-label":typeof u=="function"?u(ce):s,"aria-labelledby":l??O,"aria-describedby":a,"aria-orientation":B,"aria-valuenow":Ce,"aria-valuetext":typeof d=="function"?d(Uo(Ce,z,F.current??void 0),Ce,ce):s_(X,ce,F.current??void 0,z),disabled:H,id:oe,max:M,min:C,name:$,onChange(ot){V(ot.target.valueAsNumber,ce,ot)},onFocus(){re(ce),te(!0)},onBlur(){pe.current&&(re(-1),le(!0),te(!1),fe==="onBlur"&&_.commit($y(Ce,ce,C,M,se,X)))},onKeyDown(ot){if(!a_.has(ot.key))return;QO.has(ot.key)&&ot.stopPropagation();let mt=null;const it=Gy(Ce,K,C);switch(ot.key){case tl:mt=Go(it,ot.shiftKey?N:K,1,C,M);break;case ol:mt=Go(it,ot.shiftKey?N:K,Q?-1:1,C,M);break;case nl:mt=Go(it,ot.shiftKey?N:K,-1,C,M);break;case rl:mt=Go(it,ot.shiftKey?N:K,Q?1:-1,C,M);break;case Qy:mt=Go(it,N,1,C,M);break;case Jy:mt=Go(it,N,-1,C,M);break;case al:mt=M,se&&(mt=Number.isFinite(X[ce+1])?X[ce+1]-K*L:M);break;case il:mt=C,se&&(mt=Number.isFinite(X[ce-1])?X[ce-1]+K*L:C);break}mt!==null&&(V(mt,ce,ot),ot.preventDefault())},step:K,style:{...Js,width:"100%",height:"100%",writingMode:Pe},tabIndex:x??void 0,type:"range",value:Ce??""},_.getInputValidationProps),Ze=id(ve,_.inputRef,v);return an("div",t,{state:Y,ref:[n,R,pe],props:[{[o_.index]:ce,children:g.jsxs(A.Fragment,{children:[o,g.jsx("input",{ref:Ze,...Ge}),D&&!qe&&J&&xe&&g.jsx("script",{nonce:E,dangerouslySetInnerHTML:{__html:i_},suppressHydrationWarning:!0})]}),id:T,onBlur:h,onFocus:m,onPointerDown(ot){if(W.current=ce,pe.current!=null){const mt=B==="horizontal"?"x":"y",it=Uy(pe.current),gn=(B==="horizontal"?ot.clientX:ot.clientY)-it[mt];G.current=gn}ve.current!=null&&q.current!==ve.current&&(q.current=ve.current)},style:Z(),suppressHydrationWarning:J||void 0,tabIndex:-1},b],stateAttributesMapping:ta})});process.env.NODE_ENV!=="production"&&(eb.displayName="SliderThumb");function l_(e,t,n,r,o,i){const a=n===void 0||t&&r===void 0?"hidden":void 0,s=e?"bottom":"insetInlineStart",l=e?"height":"width",u={visibility:o&&!i?"hidden":a,position:e?"absolute":"relative",[e?"width":"height"]:"inherit"};return u["--start-position"]=`${n??0}%`,t?(u["--relative-size"]=`${(r??0)-(n??0)}%`,u[s]="var(--start-position)",u[l]="var(--relative-size)",u):(u[s]=0,u[l]="var(--start-position)",u)}function c_(e,t,n,r){const o=e?"bottom":"insetInlineStart",i=e?"height":"width",s={position:e?"absolute":"relative",[e?"width":"height"]:"inherit"};if(!t)return s[o]=0,s[i]=`${n}%`,s;const l=r-n;return s[o]=`${n}%`,s[i]=`${l}%`,s}const tb=A.forwardRef(function(t,n){const{render:r,className:o,...i}=t,{indicatorPosition:a,inset:s,max:l,min:c,orientation:u,renderBeforeHydration:d,state:f,values:p}=Ks(),[v,h]=A.useState(!1);xd(()=>h(!0));const m=u==="vertical",y=p.length>1,x=s?l_(m,y,a[0],a[1],d,v):c_(m,y,el(p[0],c,l),el(p[p.length-1],c,l));return an("div",t,{state:f,ref:n,props:[{"data-base-ui-slider-indicator":d?"":void 0,style:x,suppressHydrationWarning:d||void 0},i],stateAttributesMapping:ta})});process.env.NODE_ENV!=="production"&&(tb.displayName="SliderIndicator");const sl=e=>{const t=S.useContext(Kr);if(e)return e;if(t)return t.locale||e},u_=e=>{const[t,n]=S.useState(null),r=S.useRef(null);return S.useEffect(()=>{const o=r.current;if(o===null)return;const i=Number(o.getAttribute("aria-valuenow"));Re.number(i)&&n(i);const a=new MutationObserver(s=>{const l=s[0].target,c=Number(l.getAttribute("aria-valuenow"));n(Re.number(c)?c:null)});return a.observe(o,{attributeFilter:["aria-valuenow"]}),()=>a.disconnect()},[]),g.jsx(td,{title:"",ref:r,as:eb,enabled:e.tooltip,className:"block rounded-full focus-within:border-primary focus-within::scale-105 bg-input-switch size-5 cursor-grab border-2 border-input-border shadow-shadow-floating focus-within:outline-solid active:cursor-grabbing",children:t})},d_=e=>{const{tooltip:t,className:n,defaultValue:r,value:o,...i}=e,a=S.useRef(Bo()),s=r||o||[],l=sl();return g.jsx(jy,{...i,value:o,locale:l,defaultValue:r,children:g.jsxs(Ky,{className:Oe("relative flex h-5 w-full touch-none select-none items-center",n),children:[g.jsx(Zy,{className:"relative h-2 rounded-full grow bg-background",children:g.jsx(tb,{className:"absolute h-full rounded-full bg-primary"})}),Array.isArray(s)?s.map((c,u)=>g.jsx(u_,{tooltip:t??!1},`${a.current}-${u}`)):null]})})},Pr=e=>{const t=S.useRef(e);return S.useEffect(()=>{t.current=e},[e]),t},f_=S.forwardRef(({children:e,loading:t,container:n,error:r,...o},i)=>{const a=S.useId(),[s,l]=S.useState(o.checked??!1),c=s,u=S.useRef(null),d=Pr(o.onChange);S.useImperativeHandle(i,()=>u.current),S.useEffect(()=>{if(u.current!==null&&d.current){const p=h=>{d.current&&d.current(h)},v=u.current;return v.addEventListener("change",p),()=>v?.removeEventListener("change",p)}},[]);const f=()=>{const p=!u.current?.checked;l(p),o?.onCheck?.(p),u.current!==null&&(u.current.checked=p,u.current.dispatchEvent(new Event("change",{bubbles:!0})))};return g.jsxs("fieldset",{className:Oe("flex flex-col flex-wrap justify-center",n),"data-component":"switch",disabled:o.disabled||t,children:[g.jsxs("span",{className:"flex flex-row flex-wrap items-center",children:[g.jsx("input",{...o,hidden:!0,ref:u,type:"checkbox",checked:c,id:o.id||a,"data-trigger":"change","data-checked":c,disabled:o.disabled||t,onChange:p=>l(p.target.checked)}),g.jsx("button",{type:"button",role:"switch",onClick:f,"aria-checked":c,"data-checked":c,"aria-labelledby":`${a}-label`,disabled:o.disabled||t,className:"relative inline-flex h-6 w-11 shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors duration-300 ease-in-out focus:outline-hidden focus:ring-2 focus:ring-primary focus:ring-offset-2 data-[checked=false]:bg-input-switch-bg data-[checked=true]:bg-primary",children:g.jsx("span",{"aria-hidden":"true","data-checked":c,className:"inline-block aspect-square size-5 transform rounded-full shadow-sm ring-0 transition duration-300 ease-in-out data-[checked=false]:translate-x-0 data-[checked=true]:translate-x-5 data-[checked=false]:bg-disabled data-[checked=true]:bg-input-switch"})}),g.jsx("label",{htmlFor:o.id||a,className:"ml-3 inline-block text-sm",id:`${a}-label`,children:g.jsx("span",{className:"font-medium text-foreground",children:e})})]}),g.jsx("span",{className:"mt-1 flex-1 whitespace-nowrap text-xs text-danger empty:mt-0 empty:hidden",children:r})]})}),na=S.createContext({});function On(e){const t=S.useRef(null);return t.current===null&&(t.current=e()),t.current}const nb=typeof window<"u",ll=nb?S.useLayoutEffect:S.useEffect,cl=S.createContext(null);function Sd(e,t){e.indexOf(t)===-1&&e.push(t)}function ra(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}function p_([...e],t,n){const r=t<0?e.length+t:t;if(r>=0&&r<e.length){const o=n<0?e.length+n:n,[i]=e.splice(t,1);e.splice(o,0,i)}return e}const Kn=(e,t,n)=>n>t?t:n<e?e:n;function Td(e,t){return t?`${e}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${t}`:e}let Yo=()=>{},dn=()=>{};typeof process<"u"&&process.env?.NODE_ENV!=="production"&&(Yo=(e,t,n)=>{!e&&typeof console<"u"&&console.warn(Td(t,n))},dn=(e,t,n)=>{if(!e)throw new Error(Td(t,n))});const pr={},rb=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function ob(e){return typeof e=="object"&&e!==null}const ib=e=>/^0[^.\s]+$/u.test(e);function Ed(e){let t;return()=>(t===void 0&&(t=e()),t)}const vn=e=>e,h_=(e,t)=>n=>t(e(n)),oa=(...e)=>e.reduce(h_),Ko=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r};class kd{constructor(){this.subscriptions=[]}add(t){return Sd(this.subscriptions,t),()=>ra(this.subscriptions,t)}notify(t,n,r){const o=this.subscriptions.length;if(o)if(o===1)this.subscriptions[0](t,n,r);else for(let i=0;i<o;i++){const a=this.subscriptions[i];a&&a(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const _n=e=>e*1e3,yn=e=>e/1e3;function ab(e,t){return t?e*(1e3/t):0}const sb=new Set;function Cd(e,t,n){e||sb.has(t)||(console.warn(Td(t,n)),sb.add(t))}const m_=(e,t,n)=>{const r=t-e;return((n-e)%r+r)%r+e},lb=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,g_=1e-7,v_=12;function y_(e,t,n,r,o){let i,a,s=0;do a=t+(n-t)/2,i=lb(a,r,o)-e,i>0?n=a:t=a;while(Math.abs(i)>g_&&++s<v_);return a}function ia(e,t,n,r){if(e===t&&n===r)return vn;const o=i=>y_(i,0,1,e,n);return i=>i===0||i===1?i:lb(o(i),t,r)}const cb=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,ub=e=>t=>1-e(1-t),db=ia(.33,1.53,.69,.99),Id=ub(db),fb=cb(Id),pb=e=>(e*=2)<1?.5*Id(e):.5*(2-Math.pow(2,-10*(e-1))),Ad=e=>1-Math.sin(Math.acos(e)),hb=ub(Ad),mb=cb(Ad),b_=ia(.42,0,1,1),x_=ia(0,0,.58,1),gb=ia(.42,0,.58,1),vb=e=>Array.isArray(e)&&typeof e[0]!="number";function yb(e,t){return vb(e)?e[m_(0,e.length,t)]:e}const bb=e=>Array.isArray(e)&&typeof e[0]=="number",xb={linear:vn,easeIn:b_,easeInOut:gb,easeOut:x_,circIn:Ad,circInOut:mb,circOut:hb,backIn:Id,backInOut:fb,backOut:db,anticipate:pb},w_=e=>typeof e=="string",Pd=e=>{if(bb(e)){dn(e.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[t,n,r,o]=e;return ia(t,n,r,o)}else if(w_(e))return dn(xb[e]!==void 0,`Invalid easing type '${e}'`,"invalid-easing-type"),xb[e];return e},ul=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function S_(e,t){let n=new Set,r=new Set,o=!1,i=!1;const a=new WeakSet;let s={delta:0,timestamp:0,isProcessing:!1};function l(u){a.has(u)&&(c.schedule(u),e()),u(s)}const c={schedule:(u,d=!1,f=!1)=>{const v=f&&o?n:r;return d&&a.add(u),v.has(u)||v.add(u),u},cancel:u=>{r.delete(u),a.delete(u)},process:u=>{if(s=u,o){i=!0;return}o=!0,[n,r]=[r,n],n.forEach(l),n.clear(),o=!1,i&&(i=!1,c.process(u))}};return c}const T_=40;function wb(e,t){let n=!1,r=!0;const o={delta:0,timestamp:0,isProcessing:!1},i=()=>n=!0,a=ul.reduce((b,E)=>(b[E]=S_(i),b),{}),{setup:s,read:l,resolveKeyframes:c,preUpdate:u,update:d,preRender:f,render:p,postRender:v}=a,h=()=>{const b=pr.useManualTiming?o.timestamp:performance.now();n=!1,pr.useManualTiming||(o.delta=r?1e3/60:Math.max(Math.min(b-o.timestamp,T_),1)),o.timestamp=b,o.isProcessing=!0,s.process(o),l.process(o),c.process(o),u.process(o),d.process(o),f.process(o),p.process(o),v.process(o),o.isProcessing=!1,n&&t&&(r=!1,e(h))},m=()=>{n=!0,r=!0,o.isProcessing||e(h)};return{schedule:ul.reduce((b,E)=>{const T=a[E];return b[E]=(I,w=!1,k=!1)=>(n||m(),T.schedule(I,w,k)),b},{}),cancel:b=>{for(let E=0;E<ul.length;E++)a[ul[E]].cancel(b)},state:o,steps:a}}const{schedule:gt,cancel:hr,state:Kt,steps:Od}=wb(typeof requestAnimationFrame<"u"?requestAnimationFrame:vn,!0);let dl;function E_(){dl=void 0}const Jt={now:()=>(dl===void 0&&Jt.set(Kt.isProcessing||pr.useManualTiming?Kt.timestamp:performance.now()),dl),set:e=>{dl=e,queueMicrotask(E_)}},Sb=e=>t=>typeof t=="string"&&t.startsWith(e),Tb=Sb("--"),k_=Sb("var(--"),_d=e=>k_(e)?C_.test(e.split("/*")[0].trim()):!1,C_=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function Eb(e){return typeof e!="string"?!1:e.split("/*")[0].includes("var(--")}const Zo={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},aa={...Zo,transform:e=>Kn(0,1,e)},fl={...Zo,default:1},sa=e=>Math.round(e*1e5)/1e5,Md=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function I_(e){return e==null}const A_=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Dd=(e,t)=>n=>!!(typeof n=="string"&&A_.test(n)&&n.startsWith(e)||t&&!I_(n)&&Object.prototype.hasOwnProperty.call(n,t)),kb=(e,t,n)=>r=>{if(typeof r!="string")return r;const[o,i,a,s]=r.match(Md);return{[e]:parseFloat(o),[t]:parseFloat(i),[n]:parseFloat(a),alpha:s!==void 0?parseFloat(s):1}},P_=e=>Kn(0,255,e),Nd={...Zo,transform:e=>Math.round(P_(e))},so={test:Dd("rgb","red"),parse:kb("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Nd.transform(e)+", "+Nd.transform(t)+", "+Nd.transform(n)+", "+sa(aa.transform(r))+")"};function O_(e){let t="",n="",r="",o="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),o=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),o=e.substring(4,5),t+=t,n+=n,r+=r,o+=o),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:o?parseInt(o,16)/255:1}}const Fd={test:Dd("#"),parse:O_,transform:so.transform},la=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Or=la("deg"),Zn=la("%"),Te=la("px"),__=la("vh"),M_=la("vw"),Cb={...Zn,parse:e=>Zn.parse(e)/100,transform:e=>Zn.transform(e*100)},Xo={test:Dd("hsl","hue"),parse:kb("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+Zn.transform(sa(t))+", "+Zn.transform(sa(n))+", "+sa(aa.transform(r))+")"},Ft={test:e=>so.test(e)||Fd.test(e)||Xo.test(e),parse:e=>so.test(e)?so.parse(e):Xo.test(e)?Xo.parse(e):Fd.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?so.transform(e):Xo.transform(e),getAnimatableNone:e=>{const t=Ft.parse(e);return t.alpha=0,Ft.transform(t)}},D_=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function N_(e){return isNaN(e)&&typeof e=="string"&&(e.match(Md)?.length||0)+(e.match(D_)?.length||0)>0}const Ib="number",Ab="color",F_="var",L_="var(",Pb="${}",V_=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function ca(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},o=[];let i=0;const s=t.replace(V_,l=>(Ft.test(l)?(r.color.push(i),o.push(Ab),n.push(Ft.parse(l))):l.startsWith(L_)?(r.var.push(i),o.push(F_),n.push(l)):(r.number.push(i),o.push(Ib),n.push(parseFloat(l))),++i,Pb)).split(Pb);return{values:n,split:s,indexes:r,types:o}}function Ob(e){return ca(e).values}function _b(e){const{split:t,types:n}=ca(e),r=t.length;return o=>{let i="";for(let a=0;a<r;a++)if(i+=t[a],o[a]!==void 0){const s=n[a];s===Ib?i+=sa(o[a]):s===Ab?i+=Ft.transform(o[a]):i+=o[a]}return i}}const $_=e=>typeof e=="number"?0:Ft.test(e)?Ft.getAnimatableNone(e):e;function z_(e){const t=Ob(e);return _b(e)(t.map($_))}const _r={test:N_,parse:Ob,createTransformer:_b,getAnimatableNone:z_};function Ld(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function j_({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let o=0,i=0,a=0;if(!t)o=i=a=n;else{const s=n<.5?n*(1+t):n+t-n*t,l=2*n-s;o=Ld(l,s,e+1/3),i=Ld(l,s,e),a=Ld(l,s,e-1/3)}return{red:Math.round(o*255),green:Math.round(i*255),blue:Math.round(a*255),alpha:r}}function pl(e,t){return n=>n>0?t:e}const yt=(e,t,n)=>e+(t-e)*n,Vd=(e,t,n)=>{const r=e*e,o=n*(t*t-r)+r;return o<0?0:Math.sqrt(o)},R_=[Fd,so,Xo],B_=e=>R_.find(t=>t.test(e));function Mb(e){const t=B_(e);if(Yo(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!t)return!1;let n=t.parse(e);return t===Xo&&(n=j_(n)),n}const Db=(e,t)=>{const n=Mb(e),r=Mb(t);if(!n||!r)return pl(e,t);const o={...n};return i=>(o.red=Vd(n.red,r.red,i),o.green=Vd(n.green,r.green,i),o.blue=Vd(n.blue,r.blue,i),o.alpha=yt(n.alpha,r.alpha,i),so.transform(o))},$d=new Set(["none","hidden"]);function H_(e,t){return $d.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function W_(e,t){return n=>yt(e,t,n)}function zd(e){return typeof e=="number"?W_:typeof e=="string"?_d(e)?pl:Ft.test(e)?Db:G_:Array.isArray(e)?Nb:typeof e=="object"?Ft.test(e)?Db:q_:pl}function Nb(e,t){const n=[...e],r=n.length,o=e.map((i,a)=>zd(i)(i,t[a]));return i=>{for(let a=0;a<r;a++)n[a]=o[a](i);return n}}function q_(e,t){const n={...e,...t},r={};for(const o in n)e[o]!==void 0&&t[o]!==void 0&&(r[o]=zd(e[o])(e[o],t[o]));return o=>{for(const i in r)n[i]=r[i](o);return n}}function U_(e,t){const n=[],r={color:0,var:0,number:0};for(let o=0;o<t.values.length;o++){const i=t.types[o],a=e.indexes[i][r[i]],s=e.values[a]??0;n[o]=s,r[i]++}return n}const G_=(e,t)=>{const n=_r.createTransformer(t),r=ca(e),o=ca(t);return r.indexes.var.length===o.indexes.var.length&&r.indexes.color.length===o.indexes.color.length&&r.indexes.number.length>=o.indexes.number.length?$d.has(e)&&!o.values.length||$d.has(t)&&!r.values.length?H_(e,t):oa(Nb(U_(r,o),o.values),n):(Yo(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`,"complex-values-different"),pl(e,t))};function Fb(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?yt(e,t,n):zd(e)(e,t)}const Y_=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>gt.update(t,n),stop:()=>hr(t),now:()=>Kt.isProcessing?Kt.timestamp:Jt.now()}},Lb=(e,t,n=10)=>{let r="";const o=Math.max(Math.round(t/n),2);for(let i=0;i<o;i++)r+=Math.round(e(i/(o-1))*1e4)/1e4+", ";return`linear(${r.substring(0,r.length-2)})`},hl=2e4;function jd(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<hl;)t+=n,r=e.next(t);return t>=hl?1/0:t}function Vb(e,t=100,n){const r=n({...e,keyframes:[0,t]}),o=Math.min(jd(r),hl);return{type:"keyframes",ease:i=>r.next(o*i).value/t,duration:yn(o)}}const K_=5;function $b(e,t,n){const r=Math.max(t-K_,0);return ab(n-e(r),t-r)}const Ct={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},Rd=.001;function Z_({duration:e=Ct.duration,bounce:t=Ct.bounce,velocity:n=Ct.velocity,mass:r=Ct.mass}){let o,i;Yo(e<=_n(Ct.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let a=1-t;a=Kn(Ct.minDamping,Ct.maxDamping,a),e=Kn(Ct.minDuration,Ct.maxDuration,yn(e)),a<1?(o=c=>{const u=c*a,d=u*e,f=u-n,p=Bd(c,a),v=Math.exp(-d);return Rd-f/p*v},i=c=>{const d=c*a*e,f=d*n+n,p=Math.pow(a,2)*Math.pow(c,2)*e,v=Math.exp(-d),h=Bd(Math.pow(c,2),a);return(-o(c)+Rd>0?-1:1)*((f-p)*v)/h}):(o=c=>{const u=Math.exp(-c*e),d=(c-n)*e+1;return-Rd+u*d},i=c=>{const u=Math.exp(-c*e),d=(n-c)*(e*e);return u*d});const s=5/e,l=Q_(o,i,s);if(e=_n(e),isNaN(l))return{stiffness:Ct.stiffness,damping:Ct.damping,duration:e};{const c=Math.pow(l,2)*r;return{stiffness:c,damping:a*2*Math.sqrt(r*c),duration:e}}}const X_=12;function Q_(e,t,n){let r=n;for(let o=1;o<X_;o++)r=r-e(r)/t(r);return r}function Bd(e,t){return e*Math.sqrt(1-t*t)}const J_=["duration","bounce"],eM=["stiffness","damping","mass"];function zb(e,t){return t.some(n=>e[n]!==void 0)}function tM(e){let t={velocity:Ct.velocity,stiffness:Ct.stiffness,damping:Ct.damping,mass:Ct.mass,isResolvedFromDuration:!1,...e};if(!zb(e,eM)&&zb(e,J_))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),o=r*r,i=2*Kn(.05,1,1-(e.bounce||0))*Math.sqrt(o);t={...t,mass:Ct.mass,stiffness:o,damping:i}}else{const n=Z_(e);t={...t,...n,mass:Ct.mass},t.isResolvedFromDuration=!0}return t}function ua(e=Ct.visualDuration,t=Ct.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:o}=n;const i=n.keyframes[0],a=n.keyframes[n.keyframes.length-1],s={done:!1,value:i},{stiffness:l,damping:c,mass:u,duration:d,velocity:f,isResolvedFromDuration:p}=tM({...n,velocity:-yn(n.velocity||0)}),v=f||0,h=c/(2*Math.sqrt(l*u)),m=a-i,y=yn(Math.sqrt(l/u)),x=Math.abs(m)<5;r||(r=x?Ct.restSpeed.granular:Ct.restSpeed.default),o||(o=x?Ct.restDelta.granular:Ct.restDelta.default);let b;if(h<1){const T=Bd(y,h);b=I=>{const w=Math.exp(-h*y*I);return a-w*((v+h*y*m)/T*Math.sin(T*I)+m*Math.cos(T*I))}}else if(h===1)b=T=>a-Math.exp(-y*T)*(m+(v+y*m)*T);else{const T=y*Math.sqrt(h*h-1);b=I=>{const w=Math.exp(-h*y*I),k=Math.min(T*I,300);return a-w*((v+h*y*m)*Math.sinh(k)+T*m*Math.cosh(k))/T}}const E={calculatedDuration:p&&d||null,next:T=>{const I=b(T);if(p)s.done=T>=d;else{let w=T===0?v:0;h<1&&(w=T===0?_n(v):$b(b,T,I));const k=Math.abs(w)<=r,P=Math.abs(a-I)<=o;s.done=k&&P}return s.value=s.done?a:I,s},toString:()=>{const T=Math.min(jd(E),hl),I=Lb(w=>E.next(T*w).value,T,30);return T+"ms "+I},toTransition:()=>{}};return E}ua.applyToOptions=e=>{const t=Vb(e,100,ua);return e.ease=t.ease,e.duration=_n(t.duration),e.type="keyframes",e};function Hd({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:o=10,bounceStiffness:i=500,modifyTarget:a,min:s,max:l,restDelta:c=.5,restSpeed:u}){const d=e[0],f={done:!1,value:d},p=k=>s!==void 0&&k<s||l!==void 0&&k>l,v=k=>s===void 0?l:l===void 0||Math.abs(s-k)<Math.abs(l-k)?s:l;let h=n*t;const m=d+h,y=a===void 0?m:a(m);y!==m&&(h=y-d);const x=k=>-h*Math.exp(-k/r),b=k=>y+x(k),E=k=>{const P=x(k),_=b(k);f.done=Math.abs(P)<=c,f.value=f.done?y:_};let T,I;const w=k=>{p(f.value)&&(T=k,I=ua({keyframes:[f.value,v(f.value)],velocity:$b(b,k,f.value),damping:o,stiffness:i,restDelta:c,restSpeed:u}))};return w(0),{calculatedDuration:null,next:k=>{let P=!1;return!I&&T===void 0&&(P=!0,E(k),w(k)),T!==void 0&&k>=T?I.next(k-T):(!P&&E(k),f)}}}function nM(e,t,n){const r=[],o=n||pr.mix||Fb,i=e.length-1;for(let a=0;a<i;a++){let s=o(e[a],e[a+1]);if(t){const l=Array.isArray(t)?t[a]||vn:t;s=oa(l,s)}r.push(s)}return r}function jb(e,t,{clamp:n=!0,ease:r,mixer:o}={}){const i=e.length;if(dn(i===t.length,"Both input and output ranges must be the same length","range-length"),i===1)return()=>t[0];if(i===2&&t[0]===t[1])return()=>t[1];const a=e[0]===e[1];e[0]>e[i-1]&&(e=[...e].reverse(),t=[...t].reverse());const s=nM(t,r,o),l=s.length,c=u=>{if(a&&u<e[0])return t[0];let d=0;if(l>1)for(;d<e.length-2&&!(u<e[d+1]);d++);const f=Ko(e[d],e[d+1],u);return s[d](f)};return n?u=>c(Kn(e[0],e[i-1],u)):c}function Rb(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const o=Ko(0,t,r);e.push(yt(n,1,o))}}function Bb(e){const t=[0];return Rb(t,e.length-1),t}function rM(e,t){return e.map(n=>n*t)}function oM(e,t){return e.map(()=>t||gb).splice(0,e.length-1)}function Qo({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const o=vb(r)?r.map(Pd):Pd(r),i={done:!1,value:t[0]},a=rM(n&&n.length===t.length?n:Bb(t),e),s=jb(a,t,{ease:Array.isArray(o)?o:oM(t,o)});return{calculatedDuration:e,next:l=>(i.value=s(l),i.done=l>=e,i)}}const iM=e=>e!==null;function Wd(e,{repeat:t,repeatType:n="loop"},r,o=1){const i=e.filter(iM),s=o<0||t&&n!=="loop"&&t%2===1?0:i.length-1;return!s||r===void 0?i[s]:r}const aM={decay:Hd,inertia:Hd,tween:Qo,keyframes:Qo,spring:ua};function Hb(e){typeof e.type=="string"&&(e.type=aM[e.type])}class qd{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,n){return this.finished.then(t,n)}}const sM=e=>e/100;class Ud extends qd{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{const{motionValue:n}=this.options;n&&n.updatedAt!==Jt.now()&&this.tick(Jt.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),this.options.onStop?.())},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;Hb(t);const{type:n=Qo,repeat:r=0,repeatDelay:o=0,repeatType:i,velocity:a=0}=t;let{keyframes:s}=t;const l=n||Qo;process.env.NODE_ENV!=="production"&&l!==Qo&&dn(s.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${s}`,"spring-two-frames"),l!==Qo&&typeof s[0]!="number"&&(this.mixKeyframes=oa(sM,Fb(s[0],s[1])),s=[0,100]);const c=l({...t,keyframes:s});i==="mirror"&&(this.mirroredGenerator=l({...t,keyframes:[...s].reverse(),velocity:-a})),c.calculatedDuration===null&&(c.calculatedDuration=jd(c));const{calculatedDuration:u}=c;this.calculatedDuration=u,this.resolvedDuration=u+o,this.totalDuration=this.resolvedDuration*(r+1)-o,this.generator=c}updateTime(t){const n=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(t,n=!1){const{generator:r,totalDuration:o,mixKeyframes:i,mirroredGenerator:a,resolvedDuration:s,calculatedDuration:l}=this;if(this.startTime===null)return r.next(0);const{delay:c=0,keyframes:u,repeat:d,repeatType:f,repeatDelay:p,type:v,onUpdate:h,finalKeyframe:m}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-o/this.speed,this.startTime)),n?this.currentTime=t:this.updateTime(t);const y=this.currentTime-c*(this.playbackSpeed>=0?1:-1),x=this.playbackSpeed>=0?y<0:y>o;this.currentTime=Math.max(y,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=o);let b=this.currentTime,E=r;if(d){const k=Math.min(this.currentTime,o)/s;let P=Math.floor(k),_=k%1;!_&&k>=1&&(_=1),_===1&&P--,P=Math.min(P,d+1),P%2&&(f==="reverse"?(_=1-_,p&&(_-=p/s)):f==="mirror"&&(E=a)),b=Kn(0,1,_)*s}const T=x?{done:!1,value:u[0]}:E.next(b);i&&(T.value=i(T.value));let{done:I}=T;!x&&l!==null&&(I=this.playbackSpeed>=0?this.currentTime>=o:this.currentTime<=0);const w=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&I);return w&&v!==Hd&&(T.value=Wd(u,this.options,m,this.speed)),h&&h(T.value),w&&this.finish(),T}then(t,n){return this.finished.then(t,n)}get duration(){return yn(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+yn(t)}get time(){return yn(this.currentTime)}set time(t){t=_n(t),this.currentTime=t,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),this.driver?.start(!1)}get speed(){return this.playbackSpeed}set speed(t){this.updateTime(Jt.now());const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=yn(this.currentTime))}play(){if(this.isStopped)return;const{driver:t=Y_,startTime:n}=this.options;this.driver||(this.driver=t(o=>this.tick(o))),this.options.onPlay?.();const r=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=r):this.holdTime!==null?this.startTime=r-this.holdTime:this.startTime||(this.startTime=n??r),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(Jt.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),t.observe(this)}}function lM(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const lo=e=>e*180/Math.PI,Gd=e=>{const t=lo(Math.atan2(e[1],e[0]));return Yd(t)},cM={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:Gd,rotateZ:Gd,skewX:e=>lo(Math.atan(e[1])),skewY:e=>lo(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},Yd=e=>(e=e%360,e<0&&(e+=360),e),Wb=Gd,qb=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),Ub=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),uM={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:qb,scaleY:Ub,scale:e=>(qb(e)+Ub(e))/2,rotateX:e=>Yd(lo(Math.atan2(e[6],e[5]))),rotateY:e=>Yd(lo(Math.atan2(-e[2],e[0]))),rotateZ:Wb,rotate:Wb,skewX:e=>lo(Math.atan(e[4])),skewY:e=>lo(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function Kd(e){return e.includes("scale")?1:0}function Zd(e,t){if(!e||e==="none")return Kd(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,o;if(n)r=uM,o=n;else{const s=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=cM,o=s}if(!o)return Kd(t);const i=r[t],a=o[1].split(",").map(fM);return typeof i=="function"?i(a):a[i]}const dM=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return Zd(n,t)};function fM(e){return parseFloat(e.trim())}const Jo=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],ei=new Set(Jo),Gb=e=>e===Zo||e===Te,pM=new Set(["x","y","z"]),hM=Jo.filter(e=>!pM.has(e));function mM(e){const t=[];return hM.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const Mr={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>Zd(t,"x"),y:(e,{transform:t})=>Zd(t,"y")};Mr.translateX=Mr.x,Mr.translateY=Mr.y;const co=new Set;let Xd=!1,Qd=!1,Jd=!1;function Yb(){if(Qd){const e=Array.from(co).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const o=mM(r);o.length&&(n.set(r,o),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const o=n.get(r);o&&o.forEach(([i,a])=>{r.getValue(i)?.set(a)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}Qd=!1,Xd=!1,co.forEach(e=>e.complete(Jd)),co.clear()}function Kb(){co.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Qd=!0)})}function gM(){Jd=!0,Kb(),Yb(),Jd=!1}class ef{constructor(t,n,r,o,i,a=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=o,this.element=i,this.isAsync=a}scheduleResolve(){this.state="scheduled",this.isAsync?(co.add(this),Xd||(Xd=!0,gt.read(Kb),gt.resolveKeyframes(Yb))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:o}=this;if(t[0]===null){const i=o?.get(),a=t[t.length-1];if(i!==void 0)t[0]=i;else if(r&&n){const s=r.readValue(n,a);s!=null&&(t[0]=s)}t[0]===void 0&&(t[0]=a),o&&i===void 0&&o.set(t[0])}lM(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),co.delete(this)}cancel(){this.state==="scheduled"&&(co.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const vM=e=>e.startsWith("--");function yM(e,t,n){vM(t)?e.style.setProperty(t,n):e.style[t]=n}const bM=Ed(()=>window.ScrollTimeline!==void 0),xM={};function wM(e,t){const n=Ed(e);return()=>xM[t]??n()}const Zb=wM(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),da=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,Xb={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:da([0,.65,.55,1]),circOut:da([.55,0,1,.45]),backIn:da([.31,.01,.66,-.59]),backOut:da([.33,1.53,.69,.99])};function Qb(e,t){if(e)return typeof e=="function"?Zb()?Lb(e,t):"ease-out":bb(e)?da(e):Array.isArray(e)?e.map(n=>Qb(n,t)||Xb.easeOut):Xb[e]}function SM(e,t,n,{delay:r=0,duration:o=300,repeat:i=0,repeatType:a="loop",ease:s="easeOut",times:l}={},c=void 0){const u={[t]:n};l&&(u.offset=l);const d=Qb(s,o);Array.isArray(d)&&(u.easing=d);const f={delay:r,duration:o,easing:Array.isArray(d)?"linear":d,fill:"both",iterations:i+1,direction:a==="reverse"?"alternate":"normal"};return c&&(f.pseudoElement=c),e.animate(u,f)}function tf(e){return typeof e=="function"&&"applyToOptions"in e}function TM({type:e,...t}){return tf(e)&&Zb()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class EM extends qd{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!t)return;const{element:n,name:r,keyframes:o,pseudoElement:i,allowFlatten:a=!1,finalKeyframe:s,onComplete:l}=t;this.isPseudoElement=!!i,this.allowFlatten=a,this.options=t,dn(typeof t.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");const c=TM(t);this.animation=SM(n,r,o,c,i),c.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!i){const u=Wd(o,this.options,s,this.speed);this.updateMotionValue?this.updateMotionValue(u):yM(n,r,u),this.animation.cancel()}l?.(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){this.isPseudoElement||this.animation.commitStyles?.()}get duration(){const t=this.animation.effect?.getComputedTiming?.().duration||0;return yn(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+yn(t)}get time(){return yn(Number(this.animation.currentTime)||0)}set time(t){this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=_n(t)}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(t){this.manualStartTime=this.animation.startTime=t}attachTimeline({timeline:t,observe:n}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,t&&bM()?(this.animation.timeline=t,vn):n(this)}}const Jb={anticipate:pb,backInOut:fb,circInOut:mb};function kM(e){return e in Jb}function CM(e){typeof e.ease=="string"&&kM(e.ease)&&(e.ease=Jb[e.ease])}const nf=10;class IM extends EM{constructor(t){CM(t),Hb(t),super(t),t.startTime!==void 0&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:n,onUpdate:r,onComplete:o,element:i,...a}=this.options;if(!n)return;if(t!==void 0){n.set(t);return}const s=new Ud({...a,autoplay:!1}),l=Math.max(nf,Jt.now()-this.startTime),c=Kn(0,nf,l-nf);n.setWithVelocity(s.sample(Math.max(0,l-c)).value,s.sample(l).value,c),s.stop()}}const ex=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(_r.test(e)||e==="0")&&!e.startsWith("url("));function AM(e){const t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function PM(e,t,n,r){const o=e[0];if(o===null)return!1;if(t==="display"||t==="visibility")return!0;const i=e[e.length-1],a=ex(o,t),s=ex(i,t);return Yo(a===s,`You are trying to animate ${t} from "${o}" to "${i}". "${a?i:o}" is not an animatable value.`,"value-not-animatable"),!a||!s?!1:AM(e)||(n==="spring"||tf(n))&&r}function rf(e){e.duration=0,e.type="keyframes"}const OM=new Set(["opacity","clipPath","filter","transform"]),_M=Ed(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function MM(e){const{motionValue:t,name:n,repeatDelay:r,repeatType:o,damping:i,type:a}=e;if(!(t?.owner?.current instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:c}=t.owner.getProps();return _M()&&n&&OM.has(n)&&(n!=="transform"||!c)&&!l&&!r&&o!=="mirror"&&i!==0&&a!=="inertia"}const DM=40;class NM extends qd{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:o=0,repeatDelay:i=0,repeatType:a="loop",keyframes:s,name:l,motionValue:c,element:u,...d}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=Jt.now();const f={autoplay:t,delay:n,type:r,repeat:o,repeatDelay:i,repeatType:a,name:l,motionValue:c,element:u,...d},p=u?.KeyframeResolver||ef;this.keyframeResolver=new p(s,(v,h,m)=>this.onKeyframesResolved(v,h,f,!m),l,c,u),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(t,n,r,o){this.keyframeResolver=void 0;const{name:i,type:a,velocity:s,delay:l,isHandoff:c,onUpdate:u}=r;this.resolvedAt=Jt.now(),PM(t,i,a,s)||((pr.instantAnimations||!l)&&u?.(Wd(t,r,n)),t[0]=t[t.length-1],rf(r),r.repeat=0);const f={startTime:o?this.resolvedAt?this.resolvedAt-this.createdAt>DM?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...r,keyframes:t},p=!c&&MM(f),v=f.motionValue?.owner?.current,h=p?new IM({...f,element:v}):new Ud(f);h.finished.then(()=>{this.notifyFinished()}).catch(vn),this.pendingTimeline&&(this.stopTimeline=h.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=h}get finished(){return this._animation?this.animation.finished:this._finished}then(t,n){return this.finished.finally(t).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),gM()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}class FM{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}get finished(){return Promise.all(this.animations.map(t=>t.finished))}getAll(t){return this.animations[0][t]}setAll(t,n){for(let r=0;r<this.animations.length;r++)this.animations[r][t]=n}attachTimeline(t){const n=this.animations.map(r=>r.attachTimeline(t));return()=>{n.forEach((r,o)=>{r&&r(),this.animations[o].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get state(){return this.getAll("state")}get startTime(){return this.getAll("startTime")}get duration(){return tx(this.animations,"duration")}get iterationDuration(){return tx(this.animations,"iterationDuration")}runAll(t){this.animations.forEach(n=>n[t]())}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}function tx(e,t){let n=0;for(let r=0;r<e.length;r++){const o=e[r][t];o!==null&&o>n&&(n=o)}return n}class LM extends FM{then(t,n){return this.finished.finally(t).then(()=>{})}}function nx(e,t,n,r=0,o=1){const i=Array.from(e).sort((c,u)=>c.sortNodePosition(u)).indexOf(t),a=e.size,s=(a-1)*r;return typeof n=="function"?n(i,a):o===1?i*r:s-i*r}const VM=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function $M(e){const t=VM.exec(e);if(!t)return[,];const[,n,r,o]=t;return[`--${n??r}`,o]}const zM=4;function rx(e,t,n=1){dn(n<=zM,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[r,o]=$M(e);if(!r)return;const i=window.getComputedStyle(t).getPropertyValue(r);if(i){const a=i.trim();return rb(a)?parseFloat(a):a}return _d(o)?rx(o,t,n+1):o}const jM={type:"spring",stiffness:500,damping:25,restSpeed:10},RM=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),BM={type:"keyframes",duration:.8},HM={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},WM=(e,{keyframes:t})=>t.length>2?BM:ei.has(e)?e.startsWith("scale")?RM(t[1]):jM:HM,qM=e=>e!==null;function UM(e,{repeat:t,repeatType:n="loop"},r){const o=e.filter(qM),i=t&&n!=="loop"&&t%2===1?0:o.length-1;return o[i]}function of(e,t){return e?.[t]??e?.default??e}function GM({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:o,repeat:i,repeatType:a,repeatDelay:s,from:l,elapsed:c,...u}){return!!Object.keys(u).length}const af=(e,t,n,r={},o,i)=>a=>{const s=of(r,e)||{},l=s.delay||r.delay||0;let{elapsed:c=0}=r;c=c-_n(l);const u={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...s,delay:-c,onUpdate:f=>{t.set(f),s.onUpdate&&s.onUpdate(f)},onComplete:()=>{a(),s.onComplete&&s.onComplete()},name:e,motionValue:t,element:i?void 0:o};GM(s)||Object.assign(u,WM(e,u)),u.duration&&(u.duration=_n(u.duration)),u.repeatDelay&&(u.repeatDelay=_n(u.repeatDelay)),u.from!==void 0&&(u.keyframes[0]=u.from);let d=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(rf(u),u.delay===0&&(d=!0)),(pr.instantAnimations||pr.skipAnimations)&&(d=!0,rf(u),u.delay=0),u.allowFlatten=!s.type&&!s.ease,d&&!i&&t.get()!==void 0){const f=UM(u.keyframes,s);if(f!==void 0){gt.update(()=>{u.onUpdate(f),u.onComplete()});return}}return s.isSync?new Ud(u):new NM(u)};function ox(e){const t=[{},{}];return e?.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function sf(e,t,n,r){if(typeof t=="function"){const[o,i]=ox(r);t=t(n!==void 0?n:e.custom,o,i)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[o,i]=ox(r);t=t(n!==void 0?n:e.custom,o,i)}return t}function ti(e,t,n){const r=e.getProps();return sf(r,t,n!==void 0?n:r.custom,e)}const ix=new Set(["width","height","top","left","right","bottom",...Jo]),ax=30,YM=e=>!isNaN(parseFloat(e)),fa={current:void 0};class KM{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=r=>{const o=Jt.now();if(this.updatedAt!==o&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const i of this.dependents)i.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=Jt.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=YM(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&Cd(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new kd);const r=this.events[t].add(n);return t==="change"?()=>{r(),gt.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return fa.current&&fa.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const t=Jt.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>ax)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,ax);return ab(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function uo(e,t){return new KM(e,t)}const lf=e=>Array.isArray(e);function ZM(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,uo(n))}function XM(e){return lf(e)?e[e.length-1]||0:e}function QM(e,t){const n=ti(e,t);let{transitionEnd:r={},transition:o={},...i}=n||{};i={...i,...r};for(const a in i){const s=XM(i[a]);ZM(e,a,s)}}const jt=e=>!!(e&&e.getVelocity);function JM(e){return!!(jt(e)&&e.add)}function cf(e,t){const n=e.getValue("willChange");if(JM(n))return n.add(t);if(!n&&pr.WillChange){const r=new pr.WillChange("auto");e.addValue("willChange",r),r.add(t)}}function uf(e){return e.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}const sx="data-"+uf("framerAppearId");function lx(e){return e.props[sx]}function eD({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function df(e,t,{delay:n=0,transitionOverride:r,type:o}={}){let{transition:i=e.getDefaultTransition(),transitionEnd:a,...s}=t;r&&(i=r);const l=[],c=o&&e.animationState&&e.animationState.getState()[o];for(const u in s){const d=e.getValue(u,e.latestValues[u]??null),f=s[u];if(f===void 0||c&&eD(c,u))continue;const p={delay:n,...of(i||{},u)},v=d.get();if(v!==void 0&&!d.isAnimating&&!Array.isArray(f)&&f===v&&!p.velocity)continue;let h=!1;if(window.MotionHandoffAnimation){const y=lx(e);if(y){const x=window.MotionHandoffAnimation(y,u,gt);x!==null&&(p.startTime=x,h=!0)}}cf(e,u),d.start(af(u,d,f,e.shouldReduceMotion&&ix.has(u)?{type:!1}:p,e,h));const m=d.animation;m&&l.push(m)}return a&&Promise.all(l).then(()=>{gt.update(()=>{a&&QM(e,a)})}),l}function ff(e,t,n={}){const r=ti(e,t,n.type==="exit"?e.presenceContext?.custom:void 0);let{transition:o=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(o=n.transitionOverride);const i=r?()=>Promise.all(df(e,r,n)):()=>Promise.resolve(),a=e.variantChildren&&e.variantChildren.size?(l=0)=>{const{delayChildren:c=0,staggerChildren:u,staggerDirection:d}=o;return tD(e,t,l,c,u,d,n)}:()=>Promise.resolve(),{when:s}=o;if(s){const[l,c]=s==="beforeChildren"?[i,a]:[a,i];return l().then(()=>c())}else return Promise.all([i(),a(n.delay)])}function tD(e,t,n=0,r=0,o=0,i=1,a){const s=[];for(const l of e.variantChildren)l.notify("AnimationStart",t),s.push(ff(l,t,{...a,delay:n+(typeof r=="function"?0:r)+nx(e.variantChildren,l,r,o,i)}).then(()=>l.notify("AnimationComplete",t)));return Promise.all(s)}function nD(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const o=t.map(i=>ff(e,i,n));r=Promise.all(o)}else if(typeof t=="string")r=ff(e,t,n);else{const o=typeof t=="function"?ti(e,t,n.custom):t;r=Promise.all(df(e,o,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}const rD={test:e=>e==="auto",parse:e=>e},cx=e=>t=>t.test(e),ux=[Zo,Te,Zn,Or,M_,__,rD],dx=e=>ux.find(cx(e));function oD(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||ib(e):!0}const iD=new Set(["brightness","contrast","saturate","opacity"]);function aD(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(Md)||[];if(!r)return e;const o=n.replace(r,"");let i=iD.has(t)?1:0;return r!==n&&(i*=100),t+"("+i+o+")"}const sD=/\b([a-z-]*)\(.*?\)/gu,pf={..._r,getAnimatableNone:e=>{const t=e.match(sD);return t?t.map(aD).join(" "):e}},fx={...Zo,transform:Math.round},hf={borderWidth:Te,borderTopWidth:Te,borderRightWidth:Te,borderBottomWidth:Te,borderLeftWidth:Te,borderRadius:Te,radius:Te,borderTopLeftRadius:Te,borderTopRightRadius:Te,borderBottomRightRadius:Te,borderBottomLeftRadius:Te,width:Te,maxWidth:Te,height:Te,maxHeight:Te,top:Te,right:Te,bottom:Te,left:Te,inset:Te,insetBlock:Te,insetBlockStart:Te,insetBlockEnd:Te,insetInline:Te,insetInlineStart:Te,insetInlineEnd:Te,padding:Te,paddingTop:Te,paddingRight:Te,paddingBottom:Te,paddingLeft:Te,paddingBlock:Te,paddingBlockStart:Te,paddingBlockEnd:Te,paddingInline:Te,paddingInlineStart:Te,paddingInlineEnd:Te,margin:Te,marginTop:Te,marginRight:Te,marginBottom:Te,marginLeft:Te,marginBlock:Te,marginBlockStart:Te,marginBlockEnd:Te,marginInline:Te,marginInlineStart:Te,marginInlineEnd:Te,backgroundPositionX:Te,backgroundPositionY:Te,...{rotate:Or,rotateX:Or,rotateY:Or,rotateZ:Or,scale:fl,scaleX:fl,scaleY:fl,scaleZ:fl,skew:Or,skewX:Or,skewY:Or,distance:Te,translateX:Te,translateY:Te,translateZ:Te,x:Te,y:Te,z:Te,perspective:Te,transformPerspective:Te,opacity:aa,originX:Cb,originY:Cb,originZ:Te},zIndex:fx,fillOpacity:aa,strokeOpacity:aa,numOctaves:fx},lD={...hf,color:Ft,backgroundColor:Ft,outlineColor:Ft,fill:Ft,stroke:Ft,borderColor:Ft,borderTopColor:Ft,borderRightColor:Ft,borderBottomColor:Ft,borderLeftColor:Ft,filter:pf,WebkitFilter:pf},px=e=>lD[e];function hx(e,t){let n=px(e);return n!==pf&&(n=_r),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const cD=new Set(["auto","none","0"]);function uD(e,t,n){let r=0,o;for(;r<e.length&&!o;){const i=e[r];typeof i=="string"&&!cD.has(i)&&ca(i).values.length&&(o=e[r]),r++}if(o&&n)for(const i of t)e[i]=hx(n,o)}class dD extends ef{constructor(t,n,r,o,i){super(t,n,r,o,i,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let u=0;u<t.length;u++){let d=t[u];if(typeof d=="string"&&(d=d.trim(),_d(d))){const f=rx(d,n.current);f!==void 0&&(t[u]=f),u===t.length-1&&(this.finalKeyframe=d)}}if(this.resolveNoneKeyframes(),!ix.has(r)||t.length!==2)return;const[o,i]=t,a=dx(o),s=dx(i),l=Eb(o),c=Eb(i);if(l!==c&&Mr[r]){this.needsMeasurement=!0;return}if(a!==s)if(Gb(a)&&Gb(s))for(let u=0;u<t.length;u++){const d=t[u];typeof d=="string"&&(t[u]=parseFloat(d))}else Mr[r]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let o=0;o<t.length;o++)(t[o]===null||oD(t[o]))&&r.push(o);r.length&&uD(t,r,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:r}=this;if(!t||!t.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Mr[r](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const o=n[n.length-1];o!==void 0&&t.getValue(r,o).jump(o,!1)}measureEndState(){const{element:t,name:n,unresolvedKeyframes:r}=this;if(!t||!t.current)return;const o=t.getValue(n);o&&o.jump(this.measuredOrigin,!1);const i=r.length-1,a=r[i];r[i]=Mr[n](t.measureViewportBox(),window.getComputedStyle(t.current)),a!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=a),this.removedTransforms?.length&&this.removedTransforms.forEach(([s,l])=>{t.getValue(s).set(l)}),this.resolveNoneKeyframes()}}function mx(e,t,n){if(e==null)return[];if(e instanceof EventTarget)return[e];if(typeof e=="string"){let r=document;t&&(r=t.current);const o=n?.[e]??r.querySelectorAll(e);return o?Array.from(o):[]}return Array.from(e).filter(r=>r!=null)}const gx=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function mf(e){return ob(e)&&"offsetHeight"in e}const{schedule:gf}=wb(queueMicrotask,!1),Mn={x:!1,y:!1};function vx(){return Mn.x||Mn.y}function fD(e){return e==="x"||e==="y"?Mn[e]?null:(Mn[e]=!0,()=>{Mn[e]=!1}):Mn.x||Mn.y?null:(Mn.x=Mn.y=!0,()=>{Mn.x=Mn.y=!1})}function yx(e,t){const n=mx(e),r=new AbortController,o={passive:!0,...t,signal:r.signal};return[n,o,()=>r.abort()]}function bx(e){return!(e.pointerType==="touch"||vx())}function pD(e,t,n={}){const[r,o,i]=yx(e,n),a=s=>{if(!bx(s))return;const{target:l}=s,c=t(l,s);if(typeof c!="function"||!l)return;const u=d=>{bx(d)&&(c(d),l.removeEventListener("pointerleave",u))};l.addEventListener("pointerleave",u,o)};return r.forEach(s=>{s.addEventListener("pointerenter",a,o)}),i}const xx=(e,t)=>t?e===t?!0:xx(e,t.parentElement):!1,vf=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,hD=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function wx(e){return hD.has(e.tagName)||e.isContentEditable===!0}const ml=new WeakSet;function Sx(e){return t=>{t.key==="Enter"&&e(t)}}function yf(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const mD=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=Sx(()=>{if(ml.has(n))return;yf(n,"down");const o=Sx(()=>{yf(n,"up")}),i=()=>yf(n,"cancel");n.addEventListener("keyup",o,t),n.addEventListener("blur",i,t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)};function Tx(e){return vf(e)&&!vx()}function gD(e,t,n={}){const[r,o,i]=yx(e,n),a=s=>{const l=s.currentTarget;if(!Tx(s))return;ml.add(l);const c=t(l,s),u=(p,v)=>{window.removeEventListener("pointerup",d),window.removeEventListener("pointercancel",f),ml.has(l)&&ml.delete(l),Tx(p)&&typeof c=="function"&&c(p,{success:v})},d=p=>{u(p,l===window||l===document||n.useGlobalTarget||xx(l,p.target))},f=p=>{u(p,!1)};window.addEventListener("pointerup",d,o),window.addEventListener("pointercancel",f,o)};return r.forEach(s=>{(n.useGlobalTarget?window:s).addEventListener("pointerdown",a,o),mf(s)&&(s.addEventListener("focus",c=>mD(c,o)),!wx(s)&&!s.hasAttribute("tabindex")&&(s.tabIndex=0))}),i}function bf(e){return ob(e)&&"ownerSVGElement"in e}function Ex(e){return bf(e)&&e.tagName==="svg"}function vD(e,t){if(e==="first")return 0;{const n=t-1;return e==="last"?n:n/2}}function yD(e=.1,{startDelay:t=0,from:n=0,ease:r}={}){return(o,i)=>{const a=typeof n=="number"?n:vD(n,i),s=Math.abs(a-o);let l=e*s;if(r){const c=i*e;l=Pd(r)(l/c)*c}return t+l}}function bD(...e){const t=!Array.isArray(e[0]),n=t?0:-1,r=e[0+n],o=e[1+n],i=e[2+n],a=e[3+n],s=jb(o,i,a);return t?s(r):s}const xD=[...ux,Ft,_r],wD=e=>xD.find(cx(e)),kx=()=>({translate:0,scale:1,origin:0,originPoint:0}),ni=()=>({x:kx(),y:kx()}),Cx=()=>({min:0,max:0}),Lt=()=>({x:Cx(),y:Cx()}),xf={current:null},Ix={current:!1},SD=typeof window<"u";function TD(){if(Ix.current=!0,!!SD)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>xf.current=e.matches;e.addEventListener("change",t),t()}else xf.current=!1}const pa=new WeakMap;function gl(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function ha(e){return typeof e=="string"||Array.isArray(e)}const wf=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Sf=["initial",...wf];function vl(e){return gl(e.animate)||Sf.some(t=>ha(e[t]))}function Ax(e){return!!(vl(e)||e.variants)}function ED(e,t,n){for(const r in t){const o=t[r],i=n[r];if(jt(o))e.addValue(r,o);else if(jt(i))e.addValue(r,uo(o,{owner:e}));else if(i!==o)if(e.hasValue(r)){const a=e.getValue(r);a.liveStyle===!0?a.jump(o):a.hasAnimated||a.set(o)}else{const a=e.getStaticValue(r);e.addValue(r,uo(a!==void 0?a:o,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const Px=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let yl={};function Ox(e){yl=e}function kD(){return yl}class _x{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:o,blockInitialAnimation:i,visualState:a},s={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=ef,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const f=Jt.now();this.renderScheduledAt<f&&(this.renderScheduledAt=f,gt.render(this.render,!1,!0))};const{latestValues:l,renderState:c}=a;this.latestValues=l,this.baseTarget={...l},this.initialValues=n.initial?{...l}:{},this.renderState=c,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=o,this.options=s,this.blockInitialAnimation=!!i,this.isControllingVariants=vl(n),this.isVariantNode=Ax(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:u,...d}=this.scrapeMotionValuesFromProps(n,{},this);for(const f in d){const p=d[f];l[f]!==void 0&&jt(p)&&p.set(l[f])}}mount(t){this.current=t,pa.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,r)=>this.bindToMotionValue(r,n)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(Ix.current||TD(),this.shouldReduceMotion=xf.current),process.env.NODE_ENV!=="production"&&Cd(this.shouldReduceMotion!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected.","reduced-motion-disabled"),this.parent?.addChild(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),hr(this.notifyUpdate),hr(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const n=this.features[t];n&&(n.unmount(),n.isMounted=!1)}this.current=null}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,n){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const r=ei.has(t);r&&this.onBindTransform&&this.onBindTransform();const o=n.on("change",a=>{this.latestValues[t]=a,this.props.onUpdate&&gt.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let i;typeof window<"u"&&window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{o(),i&&i(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in yl){const n=yl[t];if(!n)continue;const{isEnabled:r,Feature:o}=n;if(!this.features[t]&&o&&r(this.props)&&(this.features[t]=new o(this)),this.features[t]){const i=this.features[t];i.isMounted?i.update():(i.mount(),i.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Lt()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;r<Px.length;r++){const o=Px[r];this.propEventSubscriptions[o]&&(this.propEventSubscriptions[o](),delete this.propEventSubscriptions[o]);const i="on"+o,a=t[i];a&&(this.propEventSubscriptions[o]=this.on(o,a))}this.prevMotionValues=ED(this,this.scrapeMotionValuesFromProps(t,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const r=this.values.get(t);n!==r&&(r&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=uo(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){let r=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return r!=null&&(typeof r=="string"&&(rb(r)||ib(r))?r=parseFloat(r):!wD(r)&&_r.test(n)&&(r=hx(t,n)),this.setBaseTarget(t,jt(r)?r.get():r)),jt(r)?r.get():r}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){const{initial:n}=this.props;let r;if(typeof n=="string"||typeof n=="object"){const i=sf(this.props,n,this.presenceContext?.custom);i&&(r=i[t])}if(n&&r!==void 0)return r;const o=this.getBaseTargetFromProps(this.props,t);return o!==void 0&&!jt(o)?o:this.initialValues[t]!==void 0&&r===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new kd),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}scheduleRenderMicrotask(){gf.render(this.render)}}class Mx extends _x{constructor(){super(...arguments),this.KeyframeResolver=dD}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){const r=t.style;return r?r[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;jt(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class Dr{constructor(t){this.isMounted=!1,this.node=t}update(){}}function Dx({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function CD({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function ID(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function Tf(e){return e===void 0||e===1}function Ef({scale:e,scaleX:t,scaleY:n}){return!Tf(e)||!Tf(t)||!Tf(n)}function fo(e){return Ef(e)||Nx(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function Nx(e){return Fx(e.x)||Fx(e.y)}function Fx(e){return e&&e!=="0%"}function bl(e,t,n){const r=e-n,o=t*r;return n+o}function Lx(e,t,n,r,o){return o!==void 0&&(e=bl(e,o,r)),bl(e,n,r)+t}function kf(e,t=0,n=1,r,o){e.min=Lx(e.min,t,n,r,o),e.max=Lx(e.max,t,n,r,o)}function Vx(e,{x:t,y:n}){kf(e.x,t.translate,t.scale,t.originPoint),kf(e.y,n.translate,n.scale,n.originPoint)}const $x=.999999999999,zx=1.0000000000001;function AD(e,t,n,r=!1){const o=n.length;if(!o)return;t.x=t.y=1;let i,a;for(let s=0;s<o;s++){i=n[s],a=i.projectionDelta;const{visualElement:l}=i.options;l&&l.props.style&&l.props.style.display==="contents"||(r&&i.options.layoutScroll&&i.scroll&&i!==i.root&&oi(e,{x:-i.scroll.offset.x,y:-i.scroll.offset.y}),a&&(t.x*=a.x.scale,t.y*=a.y.scale,Vx(e,a)),r&&fo(i.latestValues)&&oi(e,i.latestValues))}t.x<zx&&t.x>$x&&(t.x=1),t.y<zx&&t.y>$x&&(t.y=1)}function ri(e,t){e.min=e.min+t,e.max=e.max+t}function jx(e,t,n,r,o=.5){const i=yt(e.min,e.max,o);kf(e,t,n,i,r)}function oi(e,t){jx(e.x,t.x,t.scaleX,t.scale,t.originX),jx(e.y,t.y,t.scaleY,t.scale,t.originY)}function Rx(e,t){return Dx(ID(e.getBoundingClientRect(),t))}function PD(e,t,n){const r=Rx(e,n),{scroll:o}=t;return o&&(ri(r.x,o.offset.x),ri(r.y,o.offset.y)),r}const OD={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},_D=Jo.length;function MD(e,t,n){let r="",o=!0;for(let i=0;i<_D;i++){const a=Jo[i],s=e[a];if(s===void 0)continue;let l=!0;if(typeof s=="number")l=s===(a.startsWith("scale")?1:0);else{const c=parseFloat(s);l=a.startsWith("scale")?c===1:c===0}if(!l||n){const c=gx(s,hf[a]);if(!l){o=!1;const u=OD[a]||a;r+=`${u}(${c}) `}n&&(t[a]=c)}}return r=r.trim(),n?r=n(t,o?"":r):o&&(r="none"),r}function Cf(e,t,n){const{style:r,vars:o,transformOrigin:i}=e;let a=!1,s=!1;for(const l in t){const c=t[l];if(ei.has(l)){a=!0;continue}else if(Tb(l)){o[l]=c;continue}else{const u=gx(c,hf[l]);l.startsWith("origin")?(s=!0,i[l]=u):r[l]=u}}if(t.transform||(a||n?r.transform=MD(t,e.transform,n):r.transform&&(r.transform="none")),s){const{originX:l="50%",originY:c="50%",originZ:u=0}=i;r.transformOrigin=`${l} ${c} ${u}`}}function Bx(e,{style:t,vars:n},r,o){const i=e.style;let a;for(a in t)i[a]=t[a];o?.applyProjectionStyles(i,r);for(a in n)i.setProperty(a,n[a])}function Hx(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const ma={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(Te.test(e))e=parseFloat(e);else return e;const n=Hx(e,t.target.x),r=Hx(e,t.target.y);return`${n}% ${r}%`}},DD={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,o=_r.parse(e);if(o.length>5)return r;const i=_r.createTransformer(e),a=typeof o[0]!="number"?1:0,s=n.x.scale*t.x,l=n.y.scale*t.y;o[0+a]/=s,o[1+a]/=l;const c=yt(s,l,.5);return typeof o[2+a]=="number"&&(o[2+a]/=c),typeof o[3+a]=="number"&&(o[3+a]/=c),i(o)}},If={borderRadius:{...ma,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:ma,borderTopRightRadius:ma,borderBottomLeftRadius:ma,borderBottomRightRadius:ma,boxShadow:DD};function Wx(e,{layout:t,layoutId:n}){return ei.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!If[e]||e==="opacity")}function Af(e,t,n){const r=e.style,o=t?.style,i={};if(!r)return i;for(const a in r)(jt(r[a])||o&&jt(o[a])||Wx(a,e)||n?.getValue(a)?.liveStyle!==void 0)&&(i[a]=r[a]);return i}function ND(e){return window.getComputedStyle(e)}class qx extends Mx{constructor(){super(...arguments),this.type="html",this.renderInstance=Bx}readValueFromInstance(t,n){if(ei.has(n))return this.projection?.isProjecting?Kd(n):dM(t,n);{const r=ND(t),o=(Tb(n)?r.getPropertyValue(n):r[n])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(t,{transformPagePoint:n}){return Rx(t,n)}build(t,n,r){Cf(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return Af(t,n,r)}}function FD(e,t){return e in t}class LD extends _x{constructor(){super(...arguments),this.type="object"}readValueFromInstance(t,n){if(FD(n,t)){const r=t[n];if(typeof r=="string"||typeof r=="number")return r}}getBaseTargetFromProps(){}removeValueFromRenderState(t,n){delete n.output[t]}measureInstanceViewportBox(){return Lt()}build(t,n){Object.assign(t.output,n)}renderInstance(t,{output:n}){Object.assign(t,n)}sortInstanceNodePosition(){return 0}}const VD={offset:"stroke-dashoffset",array:"stroke-dasharray"},$D={offset:"strokeDashoffset",array:"strokeDasharray"};function zD(e,t,n=1,r=0,o=!0){e.pathLength=1;const i=o?VD:$D;e[i.offset]=`${-r}`,e[i.array]=`${t} ${n}`}const jD=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function Ux(e,{attrX:t,attrY:n,attrScale:r,pathLength:o,pathSpacing:i=1,pathOffset:a=0,...s},l,c,u){if(Cf(e,s,c),l){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:d,style:f}=e;d.transform&&(f.transform=d.transform,delete d.transform),(f.transform||d.transformOrigin)&&(f.transformOrigin=d.transformOrigin??"50% 50%",delete d.transformOrigin),f.transform&&(f.transformBox=u?.transformBox??"fill-box",delete d.transformBox);for(const p of jD)d[p]!==void 0&&(f[p]=d[p],delete d[p]);t!==void 0&&(d.x=t),n!==void 0&&(d.y=n),r!==void 0&&(d.scale=r),o!==void 0&&zD(d,o,i,a,!1)}const Gx=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]),Yx=e=>typeof e=="string"&&e.toLowerCase()==="svg";function RD(e,t,n,r){Bx(e,t,void 0,r);for(const o in t.attrs)e.setAttribute(Gx.has(o)?o:uf(o),t.attrs[o])}function Kx(e,t,n){const r=Af(e,t,n);for(const o in e)if(jt(e[o])||jt(t[o])){const i=Jo.indexOf(o)!==-1?"attr"+o.charAt(0).toUpperCase()+o.substring(1):o;r[i]=e[o]}return r}class Zx extends Mx{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Lt}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(ei.has(n)){const r=px(n);return r&&r.default||0}return n=Gx.has(n)?n:uf(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return Kx(t,n,r)}build(t,n,r){Ux(t,n,this.isSVGTag,r.transformTemplate,r.style)}renderInstance(t,n,r,o){RD(t,n,r,o)}mount(t){this.isSVGTag=Yx(t.tagName),super.mount(t)}}const BD=Sf.length;function Xx(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?Xx(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<BD;n++){const r=Sf[n],o=e.props[r];(ha(o)||o===!1)&&(t[r]=o)}return t}function Qx(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}const HD=[...wf].reverse(),WD=wf.length;function qD(e){return t=>Promise.all(t.map(({animation:n,options:r})=>nD(e,n,r)))}function UD(e){let t=qD(e),n=Jx(),r=!0;const o=l=>(c,u)=>{const d=ti(e,u,l==="exit"?e.presenceContext?.custom:void 0);if(d){const{transition:f,transitionEnd:p,...v}=d;c={...c,...v,...p}}return c};function i(l){t=l(e)}function a(l){const{props:c}=e,u=Xx(e.parent)||{},d=[],f=new Set;let p={},v=1/0;for(let m=0;m<WD;m++){const y=HD[m],x=n[y],b=c[y]!==void 0?c[y]:u[y],E=ha(b),T=y===l?x.isActive:null;T===!1&&(v=m);let I=b===u[y]&&b!==c[y]&&E;if(I&&r&&e.manuallyAnimateOnMount&&(I=!1),x.protectedKeys={...p},!x.isActive&&T===null||!b&&!x.prevProp||gl(b)||typeof b=="boolean")continue;const w=GD(x.prevProp,b);let k=w||y===l&&x.isActive&&!I&&E||m>v&&E,P=!1;const _=Array.isArray(b)?b:[b];let F=_.reduce(o(y),{});T===!1&&(F={});const{prevResolvedValues:V={}}=x,D={...V,...F},O=M=>{k=!0,f.has(M)&&(P=!0,f.delete(M)),x.needsAnimating[M]=!0;const C=e.getValue(M);C&&(C.liveStyle=!1)};for(const M in D){const C=F[M],L=V[M];if(p.hasOwnProperty(M))continue;let $=!1;lf(C)&&lf(L)?$=!Qx(C,L):$=C!==L,$?C!=null?O(M):f.add(M):C!==void 0&&f.has(M)?O(M):x.protectedKeys[M]=!0}x.prevProp=b,x.prevResolvedValues=F,x.isActive&&(p={...p,...F}),r&&e.blockInitialAnimation&&(k=!1);const N=I&&w;k&&(!N||P)&&d.push(..._.map(M=>{const C={type:y};if(typeof M=="string"&&r&&!N&&e.manuallyAnimateOnMount&&e.parent){const{parent:L}=e,$=ti(L,M);if(L.enteringChildren&&$){const{delayChildren:B}=$.transition||{};C.delay=nx(L.enteringChildren,e,B)}}return{animation:M,options:C}}))}if(f.size){const m={};if(typeof c.initial!="boolean"){const y=ti(e,Array.isArray(c.initial)?c.initial[0]:c.initial);y&&y.transition&&(m.transition=y.transition)}f.forEach(y=>{const x=e.getBaseTarget(y),b=e.getValue(y);b&&(b.liveStyle=!0),m[y]=x??null}),d.push({animation:m})}let h=!!d.length;return r&&(c.initial===!1||c.initial===c.animate)&&!e.manuallyAnimateOnMount&&(h=!1),r=!1,h?t(d):Promise.resolve()}function s(l,c){if(n[l].isActive===c)return Promise.resolve();e.variantChildren?.forEach(d=>d.animationState?.setActive(l,c)),n[l].isActive=c;const u=a(l);for(const d in n)n[d].protectedKeys={};return u}return{animateChanges:a,setActive:s,setAnimateFunction:i,getState:()=>n,reset:()=>{n=Jx()}}}function GD(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!Qx(t,e):!1}function po(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Jx(){return{animate:po(!0),whileInView:po(),whileHover:po(),whileTap:po(),whileDrag:po(),whileFocus:po(),exit:po()}}function e0(e,t){e.min=t.min,e.max=t.max}function Dn(e,t){e0(e.x,t.x),e0(e.y,t.y)}function t0(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}const n0=1e-4,YD=1-n0,KD=1+n0,r0=.01,ZD=0-r0,XD=0+r0;function en(e){return e.max-e.min}function QD(e,t,n){return Math.abs(e-t)<=n}function o0(e,t,n,r=.5){e.origin=r,e.originPoint=yt(t.min,t.max,e.origin),e.scale=en(n)/en(t),e.translate=yt(n.min,n.max,e.origin)-e.originPoint,(e.scale>=YD&&e.scale<=KD||isNaN(e.scale))&&(e.scale=1),(e.translate>=ZD&&e.translate<=XD||isNaN(e.translate))&&(e.translate=0)}function ga(e,t,n,r){o0(e.x,t.x,n.x,r?r.originX:void 0),o0(e.y,t.y,n.y,r?r.originY:void 0)}function i0(e,t,n){e.min=n.min+t.min,e.max=e.min+en(t)}function JD(e,t,n){i0(e.x,t.x,n.x),i0(e.y,t.y,n.y)}function a0(e,t,n){e.min=t.min-n.min,e.max=e.min+en(t)}function xl(e,t,n){a0(e.x,t.x,n.x),a0(e.y,t.y,n.y)}function s0(e,t,n,r,o){return e-=t,e=bl(e,1/n,r),o!==void 0&&(e=bl(e,1/o,r)),e}function eN(e,t=0,n=1,r=.5,o,i=e,a=e){if(Zn.test(t)&&(t=parseFloat(t),t=yt(a.min,a.max,t/100)-a.min),typeof t!="number")return;let s=yt(i.min,i.max,r);e===i&&(s-=t),e.min=s0(e.min,t,n,s,o),e.max=s0(e.max,t,n,s,o)}function l0(e,t,[n,r,o],i,a){eN(e,t[n],t[r],t[o],t.scale,i,a)}const tN=["x","scaleX","originX"],nN=["y","scaleY","originY"];function c0(e,t,n,r){l0(e.x,t,tN,n?n.x:void 0,r?r.x:void 0),l0(e.y,t,nN,n?n.y:void 0,r?r.y:void 0)}function u0(e){return e.translate===0&&e.scale===1}function d0(e){return u0(e.x)&&u0(e.y)}function f0(e,t){return e.min===t.min&&e.max===t.max}function rN(e,t){return f0(e.x,t.x)&&f0(e.y,t.y)}function p0(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function h0(e,t){return p0(e.x,t.x)&&p0(e.y,t.y)}function m0(e){return en(e.x)/en(e.y)}function g0(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function bn(e){return[e("x"),e("y")]}function oN(e,t,n){let r="";const o=e.x.translate/t.x,i=e.y.translate/t.y,a=n?.z||0;if((o||i||a)&&(r=`translate3d(${o}px, ${i}px, ${a}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:c,rotate:u,rotateX:d,rotateY:f,skewX:p,skewY:v}=n;c&&(r=`perspective(${c}px) ${r}`),u&&(r+=`rotate(${u}deg) `),d&&(r+=`rotateX(${d}deg) `),f&&(r+=`rotateY(${f}deg) `),p&&(r+=`skewX(${p}deg) `),v&&(r+=`skewY(${v}deg) `)}const s=e.x.scale*t.x,l=e.y.scale*t.y;return(s!==1||l!==1)&&(r+=`scale(${s}, ${l})`),r||"none"}const v0=["TopLeft","TopRight","BottomLeft","BottomRight"],iN=v0.length,y0=e=>typeof e=="string"?parseFloat(e):e,b0=e=>typeof e=="number"||Te.test(e);function aN(e,t,n,r,o,i){o?(e.opacity=yt(0,n.opacity??1,sN(r)),e.opacityExit=yt(t.opacity??1,0,lN(r))):i&&(e.opacity=yt(t.opacity??1,n.opacity??1,r));for(let a=0;a<iN;a++){const s=`border${v0[a]}Radius`;let l=x0(t,s),c=x0(n,s);if(l===void 0&&c===void 0)continue;l||(l=0),c||(c=0),l===0||c===0||b0(l)===b0(c)?(e[s]=Math.max(yt(y0(l),y0(c),r),0),(Zn.test(c)||Zn.test(l))&&(e[s]+="%")):e[s]=c}(t.rotate||n.rotate)&&(e.rotate=yt(t.rotate||0,n.rotate||0,r))}function x0(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const sN=w0(0,.5,hb),lN=w0(.5,.95,vn);function w0(e,t,n){return r=>r<e?0:r>t?1:n(Ko(e,t,r))}function S0(e,t,n){const r=jt(e)?e:uo(e);return r.start(af("",r,t,n)),r.animation}function va(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}const cN=(e,t)=>e.depth-t.depth;class uN{constructor(){this.children=[],this.isDirty=!1}add(t){Sd(this.children,t),this.isDirty=!0}remove(t){ra(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(cN),this.isDirty=!1,this.children.forEach(t)}}function dN(e,t){const n=Jt.now(),r=({timestamp:o})=>{const i=o-n;i>=t&&(hr(r),e(i-t))};return gt.setup(r,!0),()=>hr(r)}function wl(e){return jt(e)?e.get():e}class fN{constructor(){this.members=[]}add(t){Sd(this.members,t),t.scheduleRender()}remove(t){if(ra(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(o=>t===o);if(n===0)return!1;let r;for(let o=n;o>=0;o--){const i=this.members[o];if(i.isPresent!==!1){r=i;break}}return r?(this.promote(r),!0):!1}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender(),t.resumeFrom=r,n&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:o}=t.options;o===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}const Sl={hasAnimatedSinceResize:!0,hasEverUpdated:!1},Pf=["","X","Y","Z"],pN=1e3;let hN=0;function Of(e,t,n,r){const{latestValues:o}=t;o[e]&&(n[e]=o[e],t.setStaticValue(e,0),r&&(r[e]=0))}function T0(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=lx(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:o,layoutId:i}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",gt,!(o||i))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&T0(r)}function E0({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:o}){return class{constructor(a={},s=t?.()){this.id=hN++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(vN),this.nodes.forEach(wN),this.nodes.forEach(SN),this.nodes.forEach(yN)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=a,this.root=s?s.root||s:this,this.path=s?[...s.path,s]:[],this.parent=s,this.depth=s?s.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new uN)}addEventListener(a,s){return this.eventHandlers.has(a)||this.eventHandlers.set(a,new kd),this.eventHandlers.get(a).add(s)}notifyListeners(a,...s){const l=this.eventHandlers.get(a);l&&l.notify(...s)}hasListeners(a){return this.eventHandlers.has(a)}mount(a){if(this.instance)return;this.isSVG=bf(a)&&!Ex(a),this.instance=a;const{layoutId:s,layout:l,visualElement:c}=this.options;if(c&&!c.current&&c.mount(a),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(l||s)&&(this.isLayoutDirty=!0),e){let u,d=0;const f=()=>this.root.updateBlockedByResize=!1;gt.read(()=>{d=window.innerWidth}),e(a,()=>{const p=window.innerWidth;p!==d&&(d=p,this.root.updateBlockedByResize=!0,u&&u(),u=dN(f,250),Sl.hasAnimatedSinceResize&&(Sl.hasAnimatedSinceResize=!1,this.nodes.forEach(I0)))})}s&&this.root.registerSharedNode(s,this),this.options.animate!==!1&&c&&(s||l)&&this.addEventListener("didUpdate",({delta:u,hasLayoutChanged:d,hasRelativeLayoutChanged:f,layout:p})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const v=this.options.transition||c.getDefaultTransition()||IN,{onLayoutAnimationStart:h,onLayoutAnimationComplete:m}=c.getProps(),y=!this.targetLayout||!h0(this.targetLayout,p),x=!d&&f;if(this.options.layoutRoot||this.resumeFrom||x||d&&(y||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const b={...of(v,"layout"),onPlay:h,onComplete:m};(c.shouldReduceMotion||this.options.layoutRoot)&&(b.delay=0,b.type=!1),this.startAnimation(b),this.setAnimationOrigin(u,x)}else d||I0(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=p})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const a=this.getStack();a&&a.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),hr(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(TN),this.animationId++)}getTransformTemplate(){const{visualElement:a}=this.options;return a&&a.getProps().transformTemplate}willUpdate(a=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&T0(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let u=0;u<this.path.length;u++){const d=this.path[u];d.shouldResetTransform=!0,d.updateScroll("snapshot"),d.options.layoutRoot&&d.willUpdate(!1)}const{layoutId:s,layout:l}=this.options;if(s===void 0&&!l)return;const c=this.getTransformTemplate();this.prevTransformTemplateValue=c?c(this.latestValues,""):void 0,this.updateSnapshot(),a&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(k0);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(C0);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(xN),this.nodes.forEach(mN),this.nodes.forEach(gN)):this.nodes.forEach(C0),this.clearAllSnapshots();const s=Jt.now();Kt.delta=Kn(0,1e3/60,s-Kt.timestamp),Kt.timestamp=s,Kt.isProcessing=!0,Od.update.process(Kt),Od.preRender.process(Kt),Od.render.process(Kt),Kt.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,gf.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(bN),this.sharedNodes.forEach(EN)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,gt.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){gt.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!en(this.snapshot.measuredBox.x)&&!en(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l<this.path.length;l++)this.path[l].updateScroll();const a=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected=Lt(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:s}=this.options;s&&s.notify("LayoutMeasure",this.layout.layoutBox,a?a.layoutBox:void 0)}updateScroll(a="measure"){let s=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===a&&(s=!1),s&&this.instance){const l=r(this.instance);this.scroll={animationId:this.root.animationId,phase:a,isRoot:l,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:l}}}resetTransform(){if(!o)return;const a=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,s=this.projectionDelta&&!d0(this.projectionDelta),l=this.getTransformTemplate(),c=l?l(this.latestValues,""):void 0,u=c!==this.prevTransformTemplateValue;a&&this.instance&&(s||fo(this.latestValues)||u)&&(o(this.instance,c),this.shouldResetTransform=!1,this.scheduleRender())}measure(a=!0){const s=this.measurePageBox();let l=this.removeElementScroll(s);return a&&(l=this.removeTransform(l)),AN(l),{animationId:this.root.animationId,measuredBox:s,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:a}=this.options;if(!a)return Lt();const s=a.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(PN))){const{scroll:c}=this.root;c&&(ri(s.x,c.offset.x),ri(s.y,c.offset.y))}return s}removeElementScroll(a){const s=Lt();if(Dn(s,a),this.scroll?.wasRoot)return s;for(let l=0;l<this.path.length;l++){const c=this.path[l],{scroll:u,options:d}=c;c!==this.root&&u&&d.layoutScroll&&(u.wasRoot&&Dn(s,a),ri(s.x,u.offset.x),ri(s.y,u.offset.y))}return s}applyTransform(a,s=!1){const l=Lt();Dn(l,a);for(let c=0;c<this.path.length;c++){const u=this.path[c];!s&&u.options.layoutScroll&&u.scroll&&u!==u.root&&oi(l,{x:-u.scroll.offset.x,y:-u.scroll.offset.y}),fo(u.latestValues)&&oi(l,u.latestValues)}return fo(this.latestValues)&&oi(l,this.latestValues),l}removeTransform(a){const s=Lt();Dn(s,a);for(let l=0;l<this.path.length;l++){const c=this.path[l];if(!c.instance||!fo(c.latestValues))continue;Ef(c.latestValues)&&c.updateSnapshot();const u=Lt(),d=c.measurePageBox();Dn(u,d),c0(s,c.latestValues,c.snapshot?c.snapshot.layoutBox:void 0,u)}return fo(this.latestValues)&&c0(s,this.latestValues),s}setTargetDelta(a){this.targetDelta=a,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(a){this.options={...this.options,...a,crossfade:a.crossfade!==void 0?a.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==Kt.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(a=!1){const s=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=s.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=s.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=s.isSharedProjectionDirty);const l=!!this.resumingFrom||this!==s;if(!(a||l&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:u,layoutId:d}=this.options;if(!this.layout||!(u||d))return;this.resolvedRelativeTargetAt=Kt.timestamp;const f=this.getClosestProjectingParent();f&&this.linkedParentVersion!==f.layoutVersion&&!f.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(f&&f.layout?this.createRelativeTarget(f,this.layout.layoutBox,f.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=Lt(),this.targetWithTransforms=Lt()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),JD(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):Dn(this.target,this.layout.layoutBox),Vx(this.target,this.targetDelta)):Dn(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,f&&!!f.resumingFrom==!!this.resumingFrom&&!f.options.layoutScroll&&f.target&&this.animationProgress!==1?this.createRelativeTarget(f,this.target,f.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||Ef(this.parent.latestValues)||Nx(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(a,s,l){this.relativeParent=a,this.linkedParentVersion=a.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Lt(),this.relativeTargetOrigin=Lt(),xl(this.relativeTargetOrigin,s,l),Dn(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){const a=this.getLead(),s=!!this.resumingFrom||this!==a;let l=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(l=!1),s&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(l=!1),this.resolvedRelativeTargetAt===Kt.timestamp&&(l=!1),l)return;const{layout:c,layoutId:u}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(c||u))return;Dn(this.layoutCorrected,this.layout.layoutBox);const d=this.treeScale.x,f=this.treeScale.y;AD(this.layoutCorrected,this.treeScale,this.path,s),a.layout&&!a.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(a.target=a.layout.layoutBox,a.targetWithTransforms=Lt());const{target:p}=a;if(!p){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(t0(this.prevProjectionDelta.x,this.projectionDelta.x),t0(this.prevProjectionDelta.y,this.projectionDelta.y)),ga(this.projectionDelta,this.layoutCorrected,p,this.latestValues),(this.treeScale.x!==d||this.treeScale.y!==f||!g0(this.projectionDelta.x,this.prevProjectionDelta.x)||!g0(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",p))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(a=!0){if(this.options.visualElement?.scheduleRender(),a){const s=this.getStack();s&&s.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=ni(),this.projectionDelta=ni(),this.projectionDeltaWithTransform=ni()}setAnimationOrigin(a,s=!1){const l=this.snapshot,c=l?l.latestValues:{},u={...this.latestValues},d=ni();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!s;const f=Lt(),p=l?l.source:void 0,v=this.layout?this.layout.source:void 0,h=p!==v,m=this.getStack(),y=!m||m.members.length<=1,x=!!(h&&!y&&this.options.crossfade===!0&&!this.path.some(CN));this.animationProgress=0;let b;this.mixTargetDelta=E=>{const T=E/1e3;A0(d.x,a.x,T),A0(d.y,a.y,T),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(xl(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),kN(this.relativeTarget,this.relativeTargetOrigin,f,T),b&&rN(this.relativeTarget,b)&&(this.isProjectionDirty=!1),b||(b=Lt()),Dn(b,this.relativeTarget)),h&&(this.animationValues=u,aN(u,c,this.latestValues,T,x,y)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=T},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(a){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(hr(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=gt.update(()=>{Sl.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=uo(0)),this.currentAnimation=S0(this.motionValue,[0,1e3],{...a,velocity:0,isSync:!0,onUpdate:s=>{this.mixTargetDelta(s),a.onUpdate&&a.onUpdate(s)},onStop:()=>{},onComplete:()=>{a.onComplete&&a.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const a=this.getStack();a&&a.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(pN),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const a=this.getLead();let{targetWithTransforms:s,target:l,layout:c,latestValues:u}=a;if(!(!s||!l||!c)){if(this!==a&&this.layout&&c&&D0(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||Lt();const d=en(this.layout.layoutBox.x);l.x.min=a.target.x.min,l.x.max=l.x.min+d;const f=en(this.layout.layoutBox.y);l.y.min=a.target.y.min,l.y.max=l.y.min+f}Dn(s,l),oi(s,u),ga(this.projectionDeltaWithTransform,this.layoutCorrected,s,u)}}registerSharedNode(a,s){this.sharedNodes.has(a)||this.sharedNodes.set(a,new fN),this.sharedNodes.get(a).add(s);const c=s.options.initialPromotionConfig;s.promote({transition:c?c.transition:void 0,preserveFollowOpacity:c&&c.shouldPreserveFollowOpacity?c.shouldPreserveFollowOpacity(s):void 0})}isLead(){const a=this.getStack();return a?a.lead===this:!0}getLead(){const{layoutId:a}=this.options;return a?this.getStack()?.lead||this:this}getPrevLead(){const{layoutId:a}=this.options;return a?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:a}=this.options;if(a)return this.root.sharedNodes.get(a)}promote({needsReset:a,transition:s,preserveFollowOpacity:l}={}){const c=this.getStack();c&&c.promote(this,l),a&&(this.projectionDelta=void 0,this.needsReset=!0),s&&this.setOptions({transition:s})}relegate(){const a=this.getStack();return a?a.relegate(this):!1}resetSkewAndRotation(){const{visualElement:a}=this.options;if(!a)return;let s=!1;const{latestValues:l}=a;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(s=!0),!s)return;const c={};l.z&&Of("z",a,c,this.animationValues);for(let u=0;u<Pf.length;u++)Of(`rotate${Pf[u]}`,a,c,this.animationValues),Of(`skew${Pf[u]}`,a,c,this.animationValues);a.render();for(const u in c)a.setStaticValue(u,c[u]),this.animationValues&&(this.animationValues[u]=c[u]);a.scheduleRender()}applyProjectionStyles(a,s){if(!this.instance||this.isSVG)return;if(!this.isVisible){a.visibility="hidden";return}const l=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,a.visibility="",a.opacity="",a.pointerEvents=wl(s?.pointerEvents)||"",a.transform=l?l(this.latestValues,""):"none";return}const c=this.getLead();if(!this.projectionDelta||!this.layout||!c.target){this.options.layoutId&&(a.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,a.pointerEvents=wl(s?.pointerEvents)||""),this.hasProjected&&!fo(this.latestValues)&&(a.transform=l?l({},""):"none",this.hasProjected=!1);return}a.visibility="";const u=c.animationValues||c.latestValues;this.applyTransformsToTarget();let d=oN(this.projectionDeltaWithTransform,this.treeScale,u);l&&(d=l(u,d)),a.transform=d;const{x:f,y:p}=this.projectionDelta;a.transformOrigin=`${f.origin*100}% ${p.origin*100}% 0`,c.animationValues?a.opacity=c===this?u.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:u.opacityExit:a.opacity=c===this?u.opacity!==void 0?u.opacity:"":u.opacityExit!==void 0?u.opacityExit:0;for(const v in If){if(u[v]===void 0)continue;const{correct:h,applyTo:m,isCSSVariable:y}=If[v],x=d==="none"?u[v]:h(u[v],c);if(m){const b=m.length;for(let E=0;E<b;E++)a[m[E]]=x}else y?this.options.visualElement.renderState.vars[v]=x:a[v]=x}this.options.layoutId&&(a.pointerEvents=c===this?wl(s?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(a=>a.currentAnimation?.stop()),this.root.nodes.forEach(k0),this.root.sharedNodes.clear()}}}function mN(e){e.updateLayout()}function gN(e){const t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:n,measuredBox:r}=e.layout,{animationType:o}=e.options,i=t.source!==e.layout.source;o==="size"?bn(u=>{const d=i?t.measuredBox[u]:t.layoutBox[u],f=en(d);d.min=n[u].min,d.max=d.min+f}):D0(o,t.layoutBox,n)&&bn(u=>{const d=i?t.measuredBox[u]:t.layoutBox[u],f=en(n[u]);d.max=d.min+f,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[u].max=e.relativeTarget[u].min+f)});const a=ni();ga(a,n,t.layoutBox);const s=ni();i?ga(s,e.applyTransform(r,!0),t.measuredBox):ga(s,n,t.layoutBox);const l=!d0(a);let c=!1;if(!e.resumeFrom){const u=e.getClosestProjectingParent();if(u&&!u.resumeFrom){const{snapshot:d,layout:f}=u;if(d&&f){const p=Lt();xl(p,t.layoutBox,d.layoutBox);const v=Lt();xl(v,n,f.layoutBox),h0(p,v)||(c=!0),u.options.layoutRoot&&(e.relativeTarget=v,e.relativeTargetOrigin=p,e.relativeParent=u)}}}e.notifyListeners("didUpdate",{layout:n,snapshot:t,delta:s,layoutDelta:a,hasLayoutChanged:l,hasRelativeLayoutChanged:c})}else if(e.isLead()){const{onExitComplete:n}=e.options;n&&n()}e.options.transition=void 0}function vN(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function yN(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function bN(e){e.clearSnapshot()}function k0(e){e.clearMeasurements()}function C0(e){e.isLayoutDirty=!1}function xN(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function I0(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function wN(e){e.resolveTargetDelta()}function SN(e){e.calcProjection()}function TN(e){e.resetSkewAndRotation()}function EN(e){e.removeLeadSnapshot()}function A0(e,t,n){e.translate=yt(t.translate,0,n),e.scale=yt(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function P0(e,t,n,r){e.min=yt(t.min,n.min,r),e.max=yt(t.max,n.max,r)}function kN(e,t,n,r){P0(e.x,t.x,n.x,r),P0(e.y,t.y,n.y,r)}function CN(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const IN={duration:.45,ease:[.4,0,.1,1]},O0=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),_0=O0("applewebkit/")&&!O0("chrome/")?Math.round:vn;function M0(e){e.min=_0(e.min),e.max=_0(e.max)}function AN(e){M0(e.x),M0(e.y)}function D0(e,t,n){return e==="position"||e==="preserve-aspect"&&!QD(m0(t),m0(n),.2)}function PN(e){return e!==e.root&&e.scroll?.wasRoot}const ON=E0({attachResizeListener:(e,t)=>va(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0}),_N=e=>!e.isLayoutDirty&&e.willUpdate(!1);function N0(){const e=new Set,t=new WeakMap,n=()=>e.forEach(_N);return{add:r=>{e.add(r),t.set(r,r.addEventListener("willUpdate",n))},remove:r=>{e.delete(r);const o=t.get(r);o&&(o(),t.delete(r)),n()},dirty:n}}const _f={current:void 0},F0=E0({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!_f.current){const e=new ON({});e.mount(window),e.setOptions({layoutScroll:!0}),_f.current=e}return _f.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),ii=S.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function L0(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function MN(...e){return t=>{let n=!1;const r=e.map(o=>{const i=L0(o,t);return!n&&typeof i=="function"&&(n=!0),i});if(n)return()=>{for(let o=0;o<r.length;o++){const i=r[o];typeof i=="function"?i():L0(e[o],null)}}}}function DN(...e){return A.useCallback(MN(...e),e)}class NN extends A.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const r=n.offsetParent,o=mf(r)&&r.offsetWidth||0,i=mf(r)&&r.offsetHeight||0,a=this.props.sizeRef.current;a.height=n.offsetHeight||0,a.width=n.offsetWidth||0,a.top=n.offsetTop,a.left=n.offsetLeft,a.right=o-a.width-a.left,a.bottom=i-a.height-a.top}return null}componentDidUpdate(){}render(){return this.props.children}}function FN({children:e,isPresent:t,anchorX:n,anchorY:r,root:o}){const i=S.useId(),a=S.useRef(null),s=S.useRef({width:0,height:0,top:0,left:0,right:0,bottom:0}),{nonce:l}=S.useContext(ii),c=e.props?.ref??e?.ref,u=DN(a,c);return S.useInsertionEffect(()=>{const{width:d,height:f,top:p,left:v,right:h,bottom:m}=s.current;if(t||!a.current||!d||!f)return;const y=n==="left"?`left: ${v}`:`right: ${h}`,x=r==="bottom"?`bottom: ${m}`:`top: ${p}`;a.current.dataset.motionPopId=i;const b=document.createElement("style");l&&(b.nonce=l);const E=o??document.head;return E.appendChild(b),b.sheet&&b.sheet.insertRule(`
7
- [data-motion-pop-id="${i}"] {
1
+ (function(ne,S){typeof exports=="object"&&typeof module<"u"?S(exports,require("react"),require("react/jsx-runtime"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react/jsx-runtime","react-dom"],S):(ne=typeof globalThis<"u"?globalThis:ne||self,S(ne.components={},ne.React,ne["react/jsx-runtime"],ne.ReactDOM))})(this,(function(ne,S,p,qi){"use strict";function ym(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const P=ym(S),ur=ym(qi);function vm(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=vm(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function bm(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=vm(e))&&(r&&(r+=" "),r+=t);return r}const xm=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,wm=bm,_o=(e,t)=>n=>{var r;if(t?.variants==null)return wm(e,n?.class,n?.className);const{variants:o,defaultVariants:i}=t,s=Object.keys(o).map(c=>{const u=n?.[c],d=i?.[c];if(u===null)return null;const f=xm(u)||xm(d);return o[c][f]}),a=n&&Object.entries(n).reduce((c,u)=>{let[d,f]=u;return f===void 0||(c[d]=f),c},{}),l=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((c,u)=>{let{class:d,className:f,...h}=u;return Object.entries(h).every(g=>{let[y,m]=g;return Array.isArray(m)?m.includes({...i,...a}[y]):{...i,...a}[y]===m})?[...c,d,f]:c},[]);return wm(e,s,l,n?.class,n?.className)};var Sm=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Tm(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function LC(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if(typeof t=="function"){var n=function r(){var o=!1;try{o=this instanceof r}catch{}return o?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var o=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,o.get?o:{enumerable:!0,get:function(){return e[r]}})}),n}var Vc,Em;function Fo(){return Em||(Em=1,Vc=TypeError),Vc}const VC=LC(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var $c,Cm;function pa(){if(Cm)return $c;Cm=1;var e=typeof Map=="function"&&Map.prototype,t=Object.getOwnPropertyDescriptor&&e?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,n=e&&t&&typeof t.get=="function"?t.get:null,r=e&&Map.prototype.forEach,o=typeof Set=="function"&&Set.prototype,i=Object.getOwnPropertyDescriptor&&o?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,s=o&&i&&typeof i.get=="function"?i.get:null,a=o&&Set.prototype.forEach,l=typeof WeakMap=="function"&&WeakMap.prototype,c=l?WeakMap.prototype.has:null,u=typeof WeakSet=="function"&&WeakSet.prototype,d=u?WeakSet.prototype.has:null,f=typeof WeakRef=="function"&&WeakRef.prototype,h=f?WeakRef.prototype.deref:null,g=Boolean.prototype.valueOf,y=Object.prototype.toString,m=Function.prototype.toString,v=String.prototype.match,b=String.prototype.slice,x=String.prototype.replace,T=String.prototype.toUpperCase,E=String.prototype.toLowerCase,I=RegExp.prototype.test,w=Array.prototype.concat,C=Array.prototype.join,A=Array.prototype.slice,O=Math.floor,_=typeof BigInt=="function"?BigInt.prototype.valueOf:null,N=Object.getOwnPropertySymbols,$=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,D=typeof Symbol=="function"&&typeof Symbol.iterator=="object",F=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===D||!0)?Symbol.toStringTag:null,z=Object.prototype.propertyIsEnumerable,M=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(W){return W.__proto__}:null);function k(W,K){if(W===1/0||W===-1/0||W!==W||W&&W>-1e3&&W<1e3||I.call(/e/,K))return K;var Oe=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof W=="number"){var Ue=W<0?-O(-W):O(W);if(Ue!==W){var Ye=String(Ue),$e=b.call(K,Ye.length+1);return x.call(Ye,Oe,"$&_")+"."+x.call(x.call($e,/([0-9]{3})/g,"$&_"),/_$/,"")}}return x.call(K,Oe,"$&_")}var V=VC,L=V.custom,R=ce(L)?L:null,U={__proto__:null,double:'"',single:"'"},G={__proto__:null,double:/(["\\])/g,single:/(['\\])/g};$c=function W(K,Oe,Ue,Ye){var $e=Oe||{};if(oe($e,"quoteStyle")&&!oe(U,$e.quoteStyle))throw new TypeError('option "quoteStyle" must be "single" or "double"');if(oe($e,"maxStringLength")&&(typeof $e.maxStringLength=="number"?$e.maxStringLength<0&&$e.maxStringLength!==1/0:$e.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var ot=oe($e,"customInspect")?$e.customInspect:!0;if(typeof ot!="boolean"&&ot!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(oe($e,"indent")&&$e.indent!==null&&$e.indent!==" "&&!(parseInt($e.indent,10)===$e.indent&&$e.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(oe($e,"numericSeparator")&&typeof $e.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var gt=$e.numericSeparator;if(typeof K>"u")return"undefined";if(K===null)return"null";if(typeof K=="boolean")return K?"true":"false";if(typeof K=="string")return me(K,$e);if(typeof K=="number"){if(K===0)return 1/0/K>0?"0":"-0";var it=String(K);return gt?k(K,it):it}if(typeof K=="bigint"){var wn=String(K)+"n";return gt?k(K,wn):wn}var to=typeof $e.depth>"u"?5:$e.depth;if(typeof Ue>"u"&&(Ue=0),Ue>=to&&to>0&&typeof K=="object")return te(K)?"[Array]":"[Object]";var no=_t($e,Ue);if(typeof Ye>"u")Ye=[];else if(le(Ye,K)>=0)return"[Circular]";function Pn(Wi,Lc,$3){if(Lc&&(Ye=A.call(Ye),Ye.push(Lc)),$3){var FC={depth:$e.depth};return oe($e,"quoteStyle")&&(FC.quoteStyle=$e.quoteStyle),W(Wi,FC,Ue+1,Ye)}return W(Wi,$e,Ue+1,Ye)}if(typeof K=="function"&&!Y(K)){var Ri=ie(K),Hi=Re(K,Pn);return"[Function"+(Ri?": "+Ri:" (anonymous)")+"]"+(Hi.length>0?" { "+C.call(Hi,", ")+" }":"")}if(ce(K)){var OC=D?x.call(String(K),/^(Symbol\(.*\))_[^)]*$/,"$1"):$.call(K);return typeof K=="object"&&!D?Ce(OC):OC}if(X(K)){for(var fa="<"+E.call(String(K.nodeName)),um=K.attributes||[],Fc=0;Fc<um.length;Fc++)fa+=" "+um[Fc].name+"="+H(ee(um[Fc].value),"double",$e);return fa+=">",K.childNodes&&K.childNodes.length&&(fa+="..."),fa+="</"+E.call(String(K.nodeName))+">",fa}if(te(K)){if(K.length===0)return"[]";var dm=Re(K,Pn);return no&&!ct(dm)?"["+Qt(dm,no)+"]":"[ "+C.call(dm,", ")+" ]"}if(Z(K)){var fm=Re(K,Pn);return!("cause"in Error.prototype)&&"cause"in K&&!z.call(K,"cause")?"{ ["+String(K)+"] "+C.call(w.call("[cause]: "+Pn(K.cause),fm),", ")+" }":fm.length===0?"["+String(K)+"]":"{ ["+String(K)+"] "+C.call(fm,", ")+" }"}if(typeof K=="object"&&ot){if(R&&typeof K[R]=="function"&&V)return V(K,{depth:to-Ue});if(ot!=="symbol"&&typeof K.inspect=="function")return K.inspect()}if(be(K)){var DC=[];return r&&r.call(K,function(Wi,Lc){DC.push(Pn(Lc,K,!0)+" => "+Pn(Wi,K))}),_e("Map",n.call(K),DC,no)}if(J(K)){var NC=[];return a&&a.call(K,function(Wi){NC.push(Pn(Wi,K))}),_e("Set",s.call(K),NC,no)}if(de(K))return Me("WeakMap");if(j(K))return Me("WeakSet");if(re(K))return Me("WeakRef");if(B(K))return Ce(Pn(Number(K)));if(Q(K))return Ce(Pn(_.call(K)));if(ae(K))return Ce(g.call(K));if(pe(K))return Ce(Pn(String(K)));if(typeof window<"u"&&K===window)return"{ [object Window] }";if(typeof globalThis<"u"&&K===globalThis||typeof Sm<"u"&&K===Sm)return"{ [object globalThis] }";if(!q(K)&&!Y(K)){var pm=Re(K,Pn),MC=M?M(K)===Object.prototype:K instanceof Object||K.constructor===Object,hm=K instanceof Object?"":"null prototype",_C=!MC&&F&&Object(K)===K&&F in K?b.call(he(K),8,-1):hm?"Object":"",V3=MC||typeof K.constructor!="function"?"":K.constructor.name?K.constructor.name+" ":"",mm=V3+(_C||hm?"["+C.call(w.call([],_C||[],hm||[]),": ")+"] ":"");return pm.length===0?mm+"{}":no?mm+"{"+Qt(pm,no)+"}":mm+"{ "+C.call(pm,", ")+" }"}return String(K)};function H(W,K,Oe){var Ue=Oe.quoteStyle||K,Ye=U[Ue];return Ye+W+Ye}function ee(W){return x.call(String(W),/"/g,"&quot;")}function se(W){return!F||!(typeof W=="object"&&(F in W||typeof W[F]<"u"))}function te(W){return he(W)==="[object Array]"&&se(W)}function q(W){return he(W)==="[object Date]"&&se(W)}function Y(W){return he(W)==="[object RegExp]"&&se(W)}function Z(W){return he(W)==="[object Error]"&&se(W)}function pe(W){return he(W)==="[object String]"&&se(W)}function B(W){return he(W)==="[object Number]"&&se(W)}function ae(W){return he(W)==="[object Boolean]"&&se(W)}function ce(W){if(D)return W&&typeof W=="object"&&W instanceof Symbol;if(typeof W=="symbol")return!0;if(!W||typeof W!="object"||!$)return!1;try{return $.call(W),!0}catch{}return!1}function Q(W){if(!W||typeof W!="object"||!_)return!1;try{return _.call(W),!0}catch{}return!1}var ue=Object.prototype.hasOwnProperty||function(W){return W in this};function oe(W,K){return ue.call(W,K)}function he(W){return y.call(W)}function ie(W){if(W.name)return W.name;var K=v.call(m.call(W),/^function\s*([\w$]+)/);return K?K[1]:null}function le(W,K){if(W.indexOf)return W.indexOf(K);for(var Oe=0,Ue=W.length;Oe<Ue;Oe++)if(W[Oe]===K)return Oe;return-1}function be(W){if(!n||!W||typeof W!="object")return!1;try{n.call(W);try{s.call(W)}catch{return!0}return W instanceof Map}catch{}return!1}function de(W){if(!c||!W||typeof W!="object")return!1;try{c.call(W,c);try{d.call(W,d)}catch{return!0}return W instanceof WeakMap}catch{}return!1}function re(W){if(!h||!W||typeof W!="object")return!1;try{return h.call(W),!0}catch{}return!1}function J(W){if(!s||!W||typeof W!="object")return!1;try{s.call(W);try{n.call(W)}catch{return!0}return W instanceof Set}catch{}return!1}function j(W){if(!d||!W||typeof W!="object")return!1;try{d.call(W,d);try{c.call(W,c)}catch{return!0}return W instanceof WeakSet}catch{}return!1}function X(W){return!W||typeof W!="object"?!1:typeof HTMLElement<"u"&&W instanceof HTMLElement?!0:typeof W.nodeName=="string"&&typeof W.getAttribute=="function"}function me(W,K){if(W.length>K.maxStringLength){var Oe=W.length-K.maxStringLength,Ue="... "+Oe+" more character"+(Oe>1?"s":"");return me(b.call(W,0,K.maxStringLength),K)+Ue}var Ye=G[K.quoteStyle||"single"];Ye.lastIndex=0;var $e=x.call(x.call(W,Ye,"\\$1"),/[\x00-\x1f]/g,ve);return H($e,"single",K)}function ve(W){var K=W.charCodeAt(0),Oe={8:"b",9:"t",10:"n",12:"f",13:"r"}[K];return Oe?"\\"+Oe:"\\x"+(K<16?"0":"")+T.call(K.toString(16))}function Ce(W){return"Object("+W+")"}function Me(W){return W+" { ? }"}function _e(W,K,Oe,Ue){var Ye=Ue?Qt(Oe,Ue):C.call(Oe,", ");return W+" ("+K+") {"+Ye+"}"}function ct(W){for(var K=0;K<W.length;K++)if(le(W[K],`
2
+ `)>=0)return!1;return!0}function _t(W,K){var Oe;if(W.indent===" ")Oe=" ";else if(typeof W.indent=="number"&&W.indent>0)Oe=C.call(Array(W.indent+1)," ");else return null;return{base:Oe,prev:C.call(Array(K+1),Oe)}}function Qt(W,K){if(W.length===0)return"";var Oe=`
3
+ `+K.prev+K.base;return Oe+C.call(W,","+Oe)+`
4
+ `+K.prev}function Re(W,K){var Oe=te(W),Ue=[];if(Oe){Ue.length=W.length;for(var Ye=0;Ye<W.length;Ye++)Ue[Ye]=oe(W,Ye)?K(W[Ye],W):""}var $e=typeof N=="function"?N(W):[],ot;if(D){ot={};for(var gt=0;gt<$e.length;gt++)ot["$"+$e[gt]]=$e[gt]}for(var it in W)oe(W,it)&&(Oe&&String(Number(it))===it&&it<W.length||D&&ot["$"+it]instanceof Symbol||(I.call(/[^\w$]/,it)?Ue.push(K(it,W)+": "+K(W[it],W)):Ue.push(it+": "+K(W[it],W))));if(typeof N=="function")for(var wn=0;wn<$e.length;wn++)z.call(W,$e[wn])&&Ue.push("["+K($e[wn])+"]: "+K(W[$e[wn]],W));return Ue}return $c}var zc,km;function $C(){if(km)return zc;km=1;var e=pa(),t=Fo(),n=function(a,l,c){for(var u=a,d;(d=u.next)!=null;u=d)if(d.key===l)return u.next=d.next,c||(d.next=a.next,a.next=d),d},r=function(a,l){if(a){var c=n(a,l);return c&&c.value}},o=function(a,l,c){var u=n(a,l);u?u.value=c:a.next={key:l,next:a.next,value:c}},i=function(a,l){return a?!!n(a,l):!1},s=function(a,l){if(a)return n(a,l,!0)};return zc=function(){var l,c={assert:function(u){if(!c.has(u))throw new t("Side channel does not contain "+e(u))},delete:function(u){var d=l&&l.next,f=s(l,u);return f&&d&&d===f&&(l=void 0),!!f},get:function(u){return r(l,u)},has:function(u){return i(l,u)},set:function(u,d){l||(l={next:void 0}),o(l,u,d)}};return c},zc}var jc,Im;function Am(){return Im||(Im=1,jc=Object),jc}var Bc,Pm;function zC(){return Pm||(Pm=1,Bc=Error),Bc}var Rc,Om;function jC(){return Om||(Om=1,Rc=EvalError),Rc}var Hc,Dm;function BC(){return Dm||(Dm=1,Hc=RangeError),Hc}var Wc,Nm;function RC(){return Nm||(Nm=1,Wc=ReferenceError),Wc}var qc,Mm;function HC(){return Mm||(Mm=1,qc=SyntaxError),qc}var Uc,_m;function WC(){return _m||(_m=1,Uc=URIError),Uc}var Gc,Fm;function qC(){return Fm||(Fm=1,Gc=Math.abs),Gc}var Yc,Lm;function UC(){return Lm||(Lm=1,Yc=Math.floor),Yc}var Kc,Vm;function GC(){return Vm||(Vm=1,Kc=Math.max),Kc}var Zc,$m;function YC(){return $m||($m=1,Zc=Math.min),Zc}var Xc,zm;function KC(){return zm||(zm=1,Xc=Math.pow),Xc}var Qc,jm;function ZC(){return jm||(jm=1,Qc=Math.round),Qc}var Jc,Bm;function XC(){return Bm||(Bm=1,Jc=Number.isNaN||function(t){return t!==t}),Jc}var eu,Rm;function QC(){if(Rm)return eu;Rm=1;var e=XC();return eu=function(n){return e(n)||n===0?n:n<0?-1:1},eu}var tu,Hm;function JC(){return Hm||(Hm=1,tu=Object.getOwnPropertyDescriptor),tu}var nu,Wm;function qm(){if(Wm)return nu;Wm=1;var e=JC();if(e)try{e([],"length")}catch{e=null}return nu=e,nu}var ru,Um;function ek(){if(Um)return ru;Um=1;var e=Object.defineProperty||!1;if(e)try{e({},"a",{value:1})}catch{e=!1}return ru=e,ru}var ou,Gm;function tk(){return Gm||(Gm=1,ou=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var t={},n=Symbol("test"),r=Object(n);if(typeof n=="string"||Object.prototype.toString.call(n)!=="[object Symbol]"||Object.prototype.toString.call(r)!=="[object Symbol]")return!1;var o=42;t[n]=o;for(var i in t)return!1;if(typeof Object.keys=="function"&&Object.keys(t).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(t).length!==0)return!1;var s=Object.getOwnPropertySymbols(t);if(s.length!==1||s[0]!==n||!Object.prototype.propertyIsEnumerable.call(t,n))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var a=Object.getOwnPropertyDescriptor(t,n);if(a.value!==o||a.enumerable!==!0)return!1}return!0}),ou}var iu,Ym;function nk(){if(Ym)return iu;Ym=1;var e=typeof Symbol<"u"&&Symbol,t=tk();return iu=function(){return typeof e!="function"||typeof Symbol!="function"||typeof e("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:t()},iu}var su,Km;function Zm(){return Km||(Km=1,su=typeof Reflect<"u"&&Reflect.getPrototypeOf||null),su}var au,Xm;function Qm(){if(Xm)return au;Xm=1;var e=Am();return au=e.getPrototypeOf||null,au}var lu,Jm;function rk(){if(Jm)return lu;Jm=1;var e="Function.prototype.bind called on incompatible ",t=Object.prototype.toString,n=Math.max,r="[object Function]",o=function(l,c){for(var u=[],d=0;d<l.length;d+=1)u[d]=l[d];for(var f=0;f<c.length;f+=1)u[f+l.length]=c[f];return u},i=function(l,c){for(var u=[],d=c,f=0;d<l.length;d+=1,f+=1)u[f]=l[d];return u},s=function(a,l){for(var c="",u=0;u<a.length;u+=1)c+=a[u],u+1<a.length&&(c+=l);return c};return lu=function(l){var c=this;if(typeof c!="function"||t.apply(c)!==r)throw new TypeError(e+c);for(var u=i(arguments,1),d,f=function(){if(this instanceof d){var v=c.apply(this,o(u,arguments));return Object(v)===v?v:this}return c.apply(l,o(u,arguments))},h=n(0,c.length-u.length),g=[],y=0;y<h;y++)g[y]="$"+y;if(d=Function("binder","return function ("+s(g,",")+"){ return binder.apply(this,arguments); }")(f),c.prototype){var m=function(){};m.prototype=c.prototype,d.prototype=new m,m.prototype=null}return d},lu}var cu,eg;function ha(){if(eg)return cu;eg=1;var e=rk();return cu=Function.prototype.bind||e,cu}var uu,tg;function du(){return tg||(tg=1,uu=Function.prototype.call),uu}var fu,ng;function rg(){return ng||(ng=1,fu=Function.prototype.apply),fu}var pu,og;function ok(){return og||(og=1,pu=typeof Reflect<"u"&&Reflect&&Reflect.apply),pu}var hu,ig;function ik(){if(ig)return hu;ig=1;var e=ha(),t=rg(),n=du(),r=ok();return hu=r||e.call(n,t),hu}var mu,sg;function ag(){if(sg)return mu;sg=1;var e=ha(),t=Fo(),n=du(),r=ik();return mu=function(i){if(i.length<1||typeof i[0]!="function")throw new t("a function is required");return r(e,n,i)},mu}var gu,lg;function sk(){if(lg)return gu;lg=1;var e=ag(),t=qm(),n;try{n=[].__proto__===Array.prototype}catch(s){if(!s||typeof s!="object"||!("code"in s)||s.code!=="ERR_PROTO_ACCESS")throw s}var r=!!n&&t&&t(Object.prototype,"__proto__"),o=Object,i=o.getPrototypeOf;return gu=r&&typeof r.get=="function"?e([r.get]):typeof i=="function"?function(a){return i(a==null?a:o(a))}:!1,gu}var yu,cg;function ak(){if(cg)return yu;cg=1;var e=Zm(),t=Qm(),n=sk();return yu=e?function(o){return e(o)}:t?function(o){if(!o||typeof o!="object"&&typeof o!="function")throw new TypeError("getProto: not an object");return t(o)}:n?function(o){return n(o)}:null,yu}var vu,ug;function lk(){if(ug)return vu;ug=1;var e=Function.prototype.call,t=Object.prototype.hasOwnProperty,n=ha();return vu=n.call(e,t),vu}var bu,dg;function xu(){if(dg)return bu;dg=1;var e,t=Am(),n=zC(),r=jC(),o=BC(),i=RC(),s=HC(),a=Fo(),l=WC(),c=qC(),u=UC(),d=GC(),f=YC(),h=KC(),g=ZC(),y=QC(),m=Function,v=function(Y){try{return m('"use strict"; return ('+Y+").constructor;")()}catch{}},b=qm(),x=ek(),T=function(){throw new a},E=b?(function(){try{return arguments.callee,T}catch{try{return b(arguments,"callee").get}catch{return T}}})():T,I=nk()(),w=ak(),C=Qm(),A=Zm(),O=rg(),_=du(),N={},$=typeof Uint8Array>"u"||!w?e:w(Uint8Array),D={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?e:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?e:ArrayBuffer,"%ArrayIteratorPrototype%":I&&w?w([][Symbol.iterator]()):e,"%AsyncFromSyncIteratorPrototype%":e,"%AsyncFunction%":N,"%AsyncGenerator%":N,"%AsyncGeneratorFunction%":N,"%AsyncIteratorPrototype%":N,"%Atomics%":typeof Atomics>"u"?e:Atomics,"%BigInt%":typeof BigInt>"u"?e:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?e:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?e:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?e:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":n,"%eval%":eval,"%EvalError%":r,"%Float16Array%":typeof Float16Array>"u"?e:Float16Array,"%Float32Array%":typeof Float32Array>"u"?e:Float32Array,"%Float64Array%":typeof Float64Array>"u"?e:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?e:FinalizationRegistry,"%Function%":m,"%GeneratorFunction%":N,"%Int8Array%":typeof Int8Array>"u"?e:Int8Array,"%Int16Array%":typeof Int16Array>"u"?e:Int16Array,"%Int32Array%":typeof Int32Array>"u"?e:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":I&&w?w(w([][Symbol.iterator]())):e,"%JSON%":typeof JSON=="object"?JSON:e,"%Map%":typeof Map>"u"?e:Map,"%MapIteratorPrototype%":typeof Map>"u"||!I||!w?e:w(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":t,"%Object.getOwnPropertyDescriptor%":b,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?e:Promise,"%Proxy%":typeof Proxy>"u"?e:Proxy,"%RangeError%":o,"%ReferenceError%":i,"%Reflect%":typeof Reflect>"u"?e:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?e:Set,"%SetIteratorPrototype%":typeof Set>"u"||!I||!w?e:w(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?e:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":I&&w?w(""[Symbol.iterator]()):e,"%Symbol%":I?Symbol:e,"%SyntaxError%":s,"%ThrowTypeError%":E,"%TypedArray%":$,"%TypeError%":a,"%Uint8Array%":typeof Uint8Array>"u"?e:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?e:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?e:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?e:Uint32Array,"%URIError%":l,"%WeakMap%":typeof WeakMap>"u"?e:WeakMap,"%WeakRef%":typeof WeakRef>"u"?e:WeakRef,"%WeakSet%":typeof WeakSet>"u"?e:WeakSet,"%Function.prototype.call%":_,"%Function.prototype.apply%":O,"%Object.defineProperty%":x,"%Object.getPrototypeOf%":C,"%Math.abs%":c,"%Math.floor%":u,"%Math.max%":d,"%Math.min%":f,"%Math.pow%":h,"%Math.round%":g,"%Math.sign%":y,"%Reflect.getPrototypeOf%":A};if(w)try{null.error}catch(Y){var F=w(w(Y));D["%Error.prototype%"]=F}var z=function Y(Z){var pe;if(Z==="%AsyncFunction%")pe=v("async function () {}");else if(Z==="%GeneratorFunction%")pe=v("function* () {}");else if(Z==="%AsyncGeneratorFunction%")pe=v("async function* () {}");else if(Z==="%AsyncGenerator%"){var B=Y("%AsyncGeneratorFunction%");B&&(pe=B.prototype)}else if(Z==="%AsyncIteratorPrototype%"){var ae=Y("%AsyncGenerator%");ae&&w&&(pe=w(ae.prototype))}return D[Z]=pe,pe},M={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},k=ha(),V=lk(),L=k.call(_,Array.prototype.concat),R=k.call(O,Array.prototype.splice),U=k.call(_,String.prototype.replace),G=k.call(_,String.prototype.slice),H=k.call(_,RegExp.prototype.exec),ee=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,se=/\\(\\)?/g,te=function(Z){var pe=G(Z,0,1),B=G(Z,-1);if(pe==="%"&&B!=="%")throw new s("invalid intrinsic syntax, expected closing `%`");if(B==="%"&&pe!=="%")throw new s("invalid intrinsic syntax, expected opening `%`");var ae=[];return U(Z,ee,function(ce,Q,ue,oe){ae[ae.length]=ue?U(oe,se,"$1"):Q||ce}),ae},q=function(Z,pe){var B=Z,ae;if(V(M,B)&&(ae=M[B],B="%"+ae[0]+"%"),V(D,B)){var ce=D[B];if(ce===N&&(ce=z(B)),typeof ce>"u"&&!pe)throw new a("intrinsic "+Z+" exists, but is not available. Please file an issue!");return{alias:ae,name:B,value:ce}}throw new s("intrinsic "+Z+" does not exist!")};return bu=function(Z,pe){if(typeof Z!="string"||Z.length===0)throw new a("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof pe!="boolean")throw new a('"allowMissing" argument must be a boolean');if(H(/^%?[^%]*%?$/,Z)===null)throw new s("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var B=te(Z),ae=B.length>0?B[0]:"",ce=q("%"+ae+"%",pe),Q=ce.name,ue=ce.value,oe=!1,he=ce.alias;he&&(ae=he[0],R(B,L([0,1],he)));for(var ie=1,le=!0;ie<B.length;ie+=1){var be=B[ie],de=G(be,0,1),re=G(be,-1);if((de==='"'||de==="'"||de==="`"||re==='"'||re==="'"||re==="`")&&de!==re)throw new s("property names with quotes must have matching quotes");if((be==="constructor"||!le)&&(oe=!0),ae+="."+be,Q="%"+ae+"%",V(D,Q))ue=D[Q];else if(ue!=null){if(!(be in ue)){if(!pe)throw new a("base intrinsic for "+Z+" exists, but the property is not available.");return}if(b&&ie+1>=B.length){var J=b(ue,be);le=!!J,le&&"get"in J&&!("originalValue"in J.get)?ue=J.get:ue=ue[be]}else le=V(ue,be),ue=ue[be];le&&!oe&&(D[Q]=ue)}}return ue},bu}var wu,fg;function pg(){if(fg)return wu;fg=1;var e=xu(),t=ag(),n=t([e("%String.prototype.indexOf%")]);return wu=function(o,i){var s=e(o,!!i);return typeof s=="function"&&n(o,".prototype.")>-1?t([s]):s},wu}var Su,hg;function mg(){if(hg)return Su;hg=1;var e=xu(),t=pg(),n=pa(),r=Fo(),o=e("%Map%",!0),i=t("Map.prototype.get",!0),s=t("Map.prototype.set",!0),a=t("Map.prototype.has",!0),l=t("Map.prototype.delete",!0),c=t("Map.prototype.size",!0);return Su=!!o&&function(){var d,f={assert:function(h){if(!f.has(h))throw new r("Side channel does not contain "+n(h))},delete:function(h){if(d){var g=l(d,h);return c(d)===0&&(d=void 0),g}return!1},get:function(h){if(d)return i(d,h)},has:function(h){return d?a(d,h):!1},set:function(h,g){d||(d=new o),s(d,h,g)}};return f},Su}var Tu,gg;function ck(){if(gg)return Tu;gg=1;var e=xu(),t=pg(),n=pa(),r=mg(),o=Fo(),i=e("%WeakMap%",!0),s=t("WeakMap.prototype.get",!0),a=t("WeakMap.prototype.set",!0),l=t("WeakMap.prototype.has",!0),c=t("WeakMap.prototype.delete",!0);return Tu=i?function(){var d,f,h={assert:function(g){if(!h.has(g))throw new o("Side channel does not contain "+n(g))},delete:function(g){if(i&&g&&(typeof g=="object"||typeof g=="function")){if(d)return c(d,g)}else if(r&&f)return f.delete(g);return!1},get:function(g){return i&&g&&(typeof g=="object"||typeof g=="function")&&d?s(d,g):f&&f.get(g)},has:function(g){return i&&g&&(typeof g=="object"||typeof g=="function")&&d?l(d,g):!!f&&f.has(g)},set:function(g,y){i&&g&&(typeof g=="object"||typeof g=="function")?(d||(d=new i),a(d,g,y)):r&&(f||(f=r()),f.set(g,y))}};return h}:r,Tu}var Eu,yg;function vg(){if(yg)return Eu;yg=1;var e=Fo(),t=pa(),n=$C(),r=mg(),o=ck(),i=o||r||n;return Eu=function(){var a,l={assert:function(c){if(!l.has(c))throw new e("Side channel does not contain "+t(c))},delete:function(c){return!!a&&a.delete(c)},get:function(c){return a&&a.get(c)},has:function(c){return!!a&&a.has(c)},set:function(c,u){a||(a=i()),a.set(c,u)}};return l},Eu}var bg=e=>Array.isArray(e),Cu=e=>e===void 0,ku=e=>e===null,uk=Function.bind.call(Function.call,Object.prototype.toString),dk=e=>!!e&&uk(e)==="[object Error]"||e instanceof Error,xg=(e,t)=>e instanceof t,fk=e=>{const t=typeof e;return t==="undefined"||t===null||t==="number"||t==="string"||t==="boolean"||t==="bigint"},pk=e=>Object.prototype.toString.call(e)==="[object Date]"&&xg(e,Date),He={array:bg,date:pk,empty:e=>ku(e)||Cu(e)?!0:typeof e=="object"?Object.keys(e).length===0:typeof e=="string"?e==="":Array.isArray(e)?e.length===0:Number.isNaN(e),function:e=>typeof e=="function",instance:xg,isError:dk,keyof:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),nan:e=>Number.isNaN(e),nil:e=>ku(e)||Cu(e),null:ku,number:e=>typeof e=="number"?!Number.isNaN(e):!1,object:e=>!bg(e)&&typeof e=="object",primitive:fk,string:e=>typeof e=="string",undefined:Cu},hk=e=>Object.keys(e),Hn=(e,t,n)=>{if(!t)return;const o=(Array.isArray(t)?t:t.match(/([^[.\]])+/g)).reduce((i,s)=>i&&i[s],e);return o===void 0?n:o},mk=e=>e.replace(/[^0-9]/g,"");const gk=(e,t)=>{const n=new Array(e.length+t.length);for(let r=0;r<e.length;r++)n[r]=e[r];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},yk=(e,t)=>({classGroupId:e,validator:t}),wg=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),ma="-",Sg=[],vk="arbitrary..",bk=e=>{const t=wk(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:s=>{if(s.startsWith("[")&&s.endsWith("]"))return xk(s);const a=s.split(ma),l=a[0]===""&&a.length>1?1:0;return Tg(a,l,t)},getConflictingClassGroupIds:(s,a)=>{if(a){const l=r[s],c=n[s];return l?c?gk(c,l):l:c||Sg}return n[s]||Sg}}},Tg=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const o=e[t],i=n.nextPart.get(o);if(i){const c=Tg(e,t+1,i);if(c)return c}const s=n.validators;if(s===null)return;const a=t===0?e.join(ma):e.slice(t).join(ma),l=s.length;for(let c=0;c<l;c++){const u=s[c];if(u.validator(a))return u.classGroupId}},xk=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),n=t.indexOf(":"),r=t.slice(0,n);return r?vk+r:void 0})(),wk=e=>{const{theme:t,classGroups:n}=e;return Sk(n,t)},Sk=(e,t)=>{const n=wg();for(const r in e){const o=e[r];Iu(o,n,r,t)}return n},Iu=(e,t,n,r)=>{const o=e.length;for(let i=0;i<o;i++){const s=e[i];Tk(s,t,n,r)}},Tk=(e,t,n,r)=>{if(typeof e=="string"){Ek(e,t,n);return}if(typeof e=="function"){Ck(e,t,n,r);return}kk(e,t,n,r)},Ek=(e,t,n)=>{const r=e===""?t:Eg(t,e);r.classGroupId=n},Ck=(e,t,n,r)=>{if(Ik(e)){Iu(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(yk(n,e))},kk=(e,t,n,r)=>{const o=Object.entries(e),i=o.length;for(let s=0;s<i;s++){const[a,l]=o[s];Iu(l,Eg(t,a),n,r)}},Eg=(e,t)=>{let n=e;const r=t.split(ma),o=r.length;for(let i=0;i<o;i++){const s=r[i];let a=n.nextPart.get(s);a||(a=wg(),n.nextPart.set(s,a)),n=a}return n},Ik=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,Ak=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null);const o=(i,s)=>{n[i]=s,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(i){let s=n[i];if(s!==void 0)return s;if((s=r[i])!==void 0)return o(i,s),s},set(i,s){i in n?n[i]=s:o(i,s)}}},Au="!",Cg=":",Pk=[],kg=(e,t,n,r,o)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:o}),Ok=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=o=>{const i=[];let s=0,a=0,l=0,c;const u=o.length;for(let y=0;y<u;y++){const m=o[y];if(s===0&&a===0){if(m===Cg){i.push(o.slice(l,y)),l=y+1;continue}if(m==="/"){c=y;continue}}m==="["?s++:m==="]"?s--:m==="("?a++:m===")"&&a--}const d=i.length===0?o:o.slice(l);let f=d,h=!1;d.endsWith(Au)?(f=d.slice(0,-1),h=!0):d.startsWith(Au)&&(f=d.slice(1),h=!0);const g=c&&c>l?c-l:void 0;return kg(i,h,f,g)};if(t){const o=t+Cg,i=r;r=s=>s.startsWith(o)?i(s.slice(o.length)):kg(Pk,!1,s,void 0,!0)}if(n){const o=r;r=i=>n({className:i,parseClassName:o})}return r},Dk=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((n,r)=>{t.set(n,1e6+r)}),n=>{const r=[];let o=[];for(let i=0;i<n.length;i++){const s=n[i],a=s[0]==="[",l=t.has(s);a||l?(o.length>0&&(o.sort(),r.push(...o),o=[]),r.push(s)):o.push(s)}return o.length>0&&(o.sort(),r.push(...o)),r}},Nk=e=>({cache:Ak(e.cacheSize),parseClassName:Ok(e),sortModifiers:Dk(e),...bk(e)}),Mk=/\s+/,_k=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o,sortModifiers:i}=t,s=[],a=e.trim().split(Mk);let l="";for(let c=a.length-1;c>=0;c-=1){const u=a[c],{isExternal:d,modifiers:f,hasImportantModifier:h,baseClassName:g,maybePostfixModifierPosition:y}=n(u);if(d){l=u+(l.length>0?" "+l:l);continue}let m=!!y,v=r(m?g.substring(0,y):g);if(!v){if(!m){l=u+(l.length>0?" "+l:l);continue}if(v=r(g),!v){l=u+(l.length>0?" "+l:l);continue}m=!1}const b=f.length===0?"":f.length===1?f[0]:i(f).join(":"),x=h?b+Au:b,T=x+v;if(s.indexOf(T)>-1)continue;s.push(T);const E=o(v,m);for(let I=0;I<E.length;++I){const w=E[I];s.push(x+w)}l=u+(l.length>0?" "+l:l)}return l},Fk=(...e)=>{let t=0,n,r,o="";for(;t<e.length;)(n=e[t++])&&(r=Ig(n))&&(o&&(o+=" "),o+=r);return o},Ig=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=Ig(e[r]))&&(n&&(n+=" "),n+=t);return n},Lk=(e,...t)=>{let n,r,o,i;const s=l=>{const c=t.reduce((u,d)=>d(u),e());return n=Nk(c),r=n.cache.get,o=n.cache.set,i=a,a(l)},a=l=>{const c=r(l);if(c)return c;const u=_k(l,n);return o(l,u),u};return i=s,(...l)=>i(Fk(...l))},Vk=[],$t=e=>{const t=n=>n[e]||Vk;return t.isThemeGetter=!0,t},Ag=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Pg=/^\((?:(\w[\w-]*):)?(.+)\)$/i,$k=/^\d+\/\d+$/,zk=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,jk=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Bk=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Rk=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Hk=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Lo=e=>$k.test(e),qe=e=>!!e&&!Number.isNaN(Number(e)),Tr=e=>!!e&&Number.isInteger(Number(e)),Pu=e=>e.endsWith("%")&&qe(e.slice(0,-1)),dr=e=>zk.test(e),Wk=()=>!0,qk=e=>jk.test(e)&&!Bk.test(e),Og=()=>!1,Uk=e=>Rk.test(e),Gk=e=>Hk.test(e),Yk=e=>!Se(e)&&!Te(e),Kk=e=>Vo(e,Fg,Og),Se=e=>Ag.test(e),ro=e=>Vo(e,Lg,qk),Ou=e=>Vo(e,eI,qe),Dg=e=>Vo(e,Mg,Og),Zk=e=>Vo(e,_g,Gk),ga=e=>Vo(e,Vg,Uk),Te=e=>Pg.test(e),Ui=e=>$o(e,Lg),Xk=e=>$o(e,tI),Ng=e=>$o(e,Mg),Qk=e=>$o(e,Fg),Jk=e=>$o(e,_g),ya=e=>$o(e,Vg,!0),Vo=(e,t,n)=>{const r=Ag.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},$o=(e,t,n=!1)=>{const r=Pg.exec(e);return r?r[1]?t(r[1]):n:!1},Mg=e=>e==="position"||e==="percentage",_g=e=>e==="image"||e==="url",Fg=e=>e==="length"||e==="size"||e==="bg-size",Lg=e=>e==="length",eI=e=>e==="number",tI=e=>e==="family-name",Vg=e=>e==="shadow",nI=Lk(()=>{const e=$t("color"),t=$t("font"),n=$t("text"),r=$t("font-weight"),o=$t("tracking"),i=$t("leading"),s=$t("breakpoint"),a=$t("container"),l=$t("spacing"),c=$t("radius"),u=$t("shadow"),d=$t("inset-shadow"),f=$t("text-shadow"),h=$t("drop-shadow"),g=$t("blur"),y=$t("perspective"),m=$t("aspect"),v=$t("ease"),b=$t("animate"),x=()=>["auto","avoid","all","avoid-page","page","left","right","column"],T=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],E=()=>[...T(),Te,Se],I=()=>["auto","hidden","clip","visible","scroll"],w=()=>["auto","contain","none"],C=()=>[Te,Se,l],A=()=>[Lo,"full","auto",...C()],O=()=>[Tr,"none","subgrid",Te,Se],_=()=>["auto",{span:["full",Tr,Te,Se]},Tr,Te,Se],N=()=>[Tr,"auto",Te,Se],$=()=>["auto","min","max","fr",Te,Se],D=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],F=()=>["start","end","center","stretch","center-safe","end-safe"],z=()=>["auto",...C()],M=()=>[Lo,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...C()],k=()=>[e,Te,Se],V=()=>[...T(),Ng,Dg,{position:[Te,Se]}],L=()=>["no-repeat",{repeat:["","x","y","space","round"]}],R=()=>["auto","cover","contain",Qk,Kk,{size:[Te,Se]}],U=()=>[Pu,Ui,ro],G=()=>["","none","full",c,Te,Se],H=()=>["",qe,Ui,ro],ee=()=>["solid","dashed","dotted","double"],se=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],te=()=>[qe,Pu,Ng,Dg],q=()=>["","none",g,Te,Se],Y=()=>["none",qe,Te,Se],Z=()=>["none",qe,Te,Se],pe=()=>[qe,Te,Se],B=()=>[Lo,"full",...C()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[dr],breakpoint:[dr],color:[Wk],container:[dr],"drop-shadow":[dr],ease:["in","out","in-out"],font:[Yk],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[dr],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[dr],shadow:[dr],spacing:["px",qe],text:[dr],"text-shadow":[dr],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Lo,Se,Te,m]}],container:["container"],columns:[{columns:[qe,Se,Te,a]}],"break-after":[{"break-after":x()}],"break-before":[{"break-before":x()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:E()}],overflow:[{overflow:I()}],"overflow-x":[{"overflow-x":I()}],"overflow-y":[{"overflow-y":I()}],overscroll:[{overscroll:w()}],"overscroll-x":[{"overscroll-x":w()}],"overscroll-y":[{"overscroll-y":w()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:A()}],"inset-x":[{"inset-x":A()}],"inset-y":[{"inset-y":A()}],start:[{start:A()}],end:[{end:A()}],top:[{top:A()}],right:[{right:A()}],bottom:[{bottom:A()}],left:[{left:A()}],visibility:["visible","invisible","collapse"],z:[{z:[Tr,"auto",Te,Se]}],basis:[{basis:[Lo,"full","auto",a,...C()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[qe,Lo,"auto","initial","none",Se]}],grow:[{grow:["",qe,Te,Se]}],shrink:[{shrink:["",qe,Te,Se]}],order:[{order:[Tr,"first","last","none",Te,Se]}],"grid-cols":[{"grid-cols":O()}],"col-start-end":[{col:_()}],"col-start":[{"col-start":N()}],"col-end":[{"col-end":N()}],"grid-rows":[{"grid-rows":O()}],"row-start-end":[{row:_()}],"row-start":[{"row-start":N()}],"row-end":[{"row-end":N()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":$()}],"auto-rows":[{"auto-rows":$()}],gap:[{gap:C()}],"gap-x":[{"gap-x":C()}],"gap-y":[{"gap-y":C()}],"justify-content":[{justify:[...D(),"normal"]}],"justify-items":[{"justify-items":[...F(),"normal"]}],"justify-self":[{"justify-self":["auto",...F()]}],"align-content":[{content:["normal",...D()]}],"align-items":[{items:[...F(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...F(),{baseline:["","last"]}]}],"place-content":[{"place-content":D()}],"place-items":[{"place-items":[...F(),"baseline"]}],"place-self":[{"place-self":["auto",...F()]}],p:[{p:C()}],px:[{px:C()}],py:[{py:C()}],ps:[{ps:C()}],pe:[{pe:C()}],pt:[{pt:C()}],pr:[{pr:C()}],pb:[{pb:C()}],pl:[{pl:C()}],m:[{m:z()}],mx:[{mx:z()}],my:[{my:z()}],ms:[{ms:z()}],me:[{me:z()}],mt:[{mt:z()}],mr:[{mr:z()}],mb:[{mb:z()}],ml:[{ml:z()}],"space-x":[{"space-x":C()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":C()}],"space-y-reverse":["space-y-reverse"],size:[{size:M()}],w:[{w:[a,"screen",...M()]}],"min-w":[{"min-w":[a,"screen","none",...M()]}],"max-w":[{"max-w":[a,"screen","none","prose",{screen:[s]},...M()]}],h:[{h:["screen","lh",...M()]}],"min-h":[{"min-h":["screen","lh","none",...M()]}],"max-h":[{"max-h":["screen","lh",...M()]}],"font-size":[{text:["base",n,Ui,ro]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,Te,Ou]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Pu,Se]}],"font-family":[{font:[Xk,Se,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[o,Te,Se]}],"line-clamp":[{"line-clamp":[qe,"none",Te,Ou]}],leading:[{leading:[i,...C()]}],"list-image":[{"list-image":["none",Te,Se]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",Te,Se]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:k()}],"text-color":[{text:k()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ee(),"wavy"]}],"text-decoration-thickness":[{decoration:[qe,"from-font","auto",Te,ro]}],"text-decoration-color":[{decoration:k()}],"underline-offset":[{"underline-offset":[qe,"auto",Te,Se]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:C()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Te,Se]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Te,Se]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:V()}],"bg-repeat":[{bg:L()}],"bg-size":[{bg:R()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Tr,Te,Se],radial:["",Te,Se],conic:[Tr,Te,Se]},Jk,Zk]}],"bg-color":[{bg:k()}],"gradient-from-pos":[{from:U()}],"gradient-via-pos":[{via:U()}],"gradient-to-pos":[{to:U()}],"gradient-from":[{from:k()}],"gradient-via":[{via:k()}],"gradient-to":[{to:k()}],rounded:[{rounded:G()}],"rounded-s":[{"rounded-s":G()}],"rounded-e":[{"rounded-e":G()}],"rounded-t":[{"rounded-t":G()}],"rounded-r":[{"rounded-r":G()}],"rounded-b":[{"rounded-b":G()}],"rounded-l":[{"rounded-l":G()}],"rounded-ss":[{"rounded-ss":G()}],"rounded-se":[{"rounded-se":G()}],"rounded-ee":[{"rounded-ee":G()}],"rounded-es":[{"rounded-es":G()}],"rounded-tl":[{"rounded-tl":G()}],"rounded-tr":[{"rounded-tr":G()}],"rounded-br":[{"rounded-br":G()}],"rounded-bl":[{"rounded-bl":G()}],"border-w":[{border:H()}],"border-w-x":[{"border-x":H()}],"border-w-y":[{"border-y":H()}],"border-w-s":[{"border-s":H()}],"border-w-e":[{"border-e":H()}],"border-w-t":[{"border-t":H()}],"border-w-r":[{"border-r":H()}],"border-w-b":[{"border-b":H()}],"border-w-l":[{"border-l":H()}],"divide-x":[{"divide-x":H()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":H()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...ee(),"hidden","none"]}],"divide-style":[{divide:[...ee(),"hidden","none"]}],"border-color":[{border:k()}],"border-color-x":[{"border-x":k()}],"border-color-y":[{"border-y":k()}],"border-color-s":[{"border-s":k()}],"border-color-e":[{"border-e":k()}],"border-color-t":[{"border-t":k()}],"border-color-r":[{"border-r":k()}],"border-color-b":[{"border-b":k()}],"border-color-l":[{"border-l":k()}],"divide-color":[{divide:k()}],"outline-style":[{outline:[...ee(),"none","hidden"]}],"outline-offset":[{"outline-offset":[qe,Te,Se]}],"outline-w":[{outline:["",qe,Ui,ro]}],"outline-color":[{outline:k()}],shadow:[{shadow:["","none",u,ya,ga]}],"shadow-color":[{shadow:k()}],"inset-shadow":[{"inset-shadow":["none",d,ya,ga]}],"inset-shadow-color":[{"inset-shadow":k()}],"ring-w":[{ring:H()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:k()}],"ring-offset-w":[{"ring-offset":[qe,ro]}],"ring-offset-color":[{"ring-offset":k()}],"inset-ring-w":[{"inset-ring":H()}],"inset-ring-color":[{"inset-ring":k()}],"text-shadow":[{"text-shadow":["none",f,ya,ga]}],"text-shadow-color":[{"text-shadow":k()}],opacity:[{opacity:[qe,Te,Se]}],"mix-blend":[{"mix-blend":[...se(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":se()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[qe]}],"mask-image-linear-from-pos":[{"mask-linear-from":te()}],"mask-image-linear-to-pos":[{"mask-linear-to":te()}],"mask-image-linear-from-color":[{"mask-linear-from":k()}],"mask-image-linear-to-color":[{"mask-linear-to":k()}],"mask-image-t-from-pos":[{"mask-t-from":te()}],"mask-image-t-to-pos":[{"mask-t-to":te()}],"mask-image-t-from-color":[{"mask-t-from":k()}],"mask-image-t-to-color":[{"mask-t-to":k()}],"mask-image-r-from-pos":[{"mask-r-from":te()}],"mask-image-r-to-pos":[{"mask-r-to":te()}],"mask-image-r-from-color":[{"mask-r-from":k()}],"mask-image-r-to-color":[{"mask-r-to":k()}],"mask-image-b-from-pos":[{"mask-b-from":te()}],"mask-image-b-to-pos":[{"mask-b-to":te()}],"mask-image-b-from-color":[{"mask-b-from":k()}],"mask-image-b-to-color":[{"mask-b-to":k()}],"mask-image-l-from-pos":[{"mask-l-from":te()}],"mask-image-l-to-pos":[{"mask-l-to":te()}],"mask-image-l-from-color":[{"mask-l-from":k()}],"mask-image-l-to-color":[{"mask-l-to":k()}],"mask-image-x-from-pos":[{"mask-x-from":te()}],"mask-image-x-to-pos":[{"mask-x-to":te()}],"mask-image-x-from-color":[{"mask-x-from":k()}],"mask-image-x-to-color":[{"mask-x-to":k()}],"mask-image-y-from-pos":[{"mask-y-from":te()}],"mask-image-y-to-pos":[{"mask-y-to":te()}],"mask-image-y-from-color":[{"mask-y-from":k()}],"mask-image-y-to-color":[{"mask-y-to":k()}],"mask-image-radial":[{"mask-radial":[Te,Se]}],"mask-image-radial-from-pos":[{"mask-radial-from":te()}],"mask-image-radial-to-pos":[{"mask-radial-to":te()}],"mask-image-radial-from-color":[{"mask-radial-from":k()}],"mask-image-radial-to-color":[{"mask-radial-to":k()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":T()}],"mask-image-conic-pos":[{"mask-conic":[qe]}],"mask-image-conic-from-pos":[{"mask-conic-from":te()}],"mask-image-conic-to-pos":[{"mask-conic-to":te()}],"mask-image-conic-from-color":[{"mask-conic-from":k()}],"mask-image-conic-to-color":[{"mask-conic-to":k()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:V()}],"mask-repeat":[{mask:L()}],"mask-size":[{mask:R()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",Te,Se]}],filter:[{filter:["","none",Te,Se]}],blur:[{blur:q()}],brightness:[{brightness:[qe,Te,Se]}],contrast:[{contrast:[qe,Te,Se]}],"drop-shadow":[{"drop-shadow":["","none",h,ya,ga]}],"drop-shadow-color":[{"drop-shadow":k()}],grayscale:[{grayscale:["",qe,Te,Se]}],"hue-rotate":[{"hue-rotate":[qe,Te,Se]}],invert:[{invert:["",qe,Te,Se]}],saturate:[{saturate:[qe,Te,Se]}],sepia:[{sepia:["",qe,Te,Se]}],"backdrop-filter":[{"backdrop-filter":["","none",Te,Se]}],"backdrop-blur":[{"backdrop-blur":q()}],"backdrop-brightness":[{"backdrop-brightness":[qe,Te,Se]}],"backdrop-contrast":[{"backdrop-contrast":[qe,Te,Se]}],"backdrop-grayscale":[{"backdrop-grayscale":["",qe,Te,Se]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[qe,Te,Se]}],"backdrop-invert":[{"backdrop-invert":["",qe,Te,Se]}],"backdrop-opacity":[{"backdrop-opacity":[qe,Te,Se]}],"backdrop-saturate":[{"backdrop-saturate":[qe,Te,Se]}],"backdrop-sepia":[{"backdrop-sepia":["",qe,Te,Se]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":C()}],"border-spacing-x":[{"border-spacing-x":C()}],"border-spacing-y":[{"border-spacing-y":C()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",Te,Se]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[qe,"initial",Te,Se]}],ease:[{ease:["linear","initial",v,Te,Se]}],delay:[{delay:[qe,Te,Se]}],animate:[{animate:["none",b,Te,Se]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[y,Te,Se]}],"perspective-origin":[{"perspective-origin":E()}],rotate:[{rotate:Y()}],"rotate-x":[{"rotate-x":Y()}],"rotate-y":[{"rotate-y":Y()}],"rotate-z":[{"rotate-z":Y()}],scale:[{scale:Z()}],"scale-x":[{"scale-x":Z()}],"scale-y":[{"scale-y":Z()}],"scale-z":[{"scale-z":Z()}],"scale-3d":["scale-3d"],skew:[{skew:pe()}],"skew-x":[{"skew-x":pe()}],"skew-y":[{"skew-y":pe()}],transform:[{transform:[Te,Se,"","none","gpu","cpu"]}],"transform-origin":[{origin:E()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:B()}],"translate-x":[{"translate-x":B()}],"translate-y":[{"translate-y":B()}],"translate-z":[{"translate-z":B()}],"translate-none":["translate-none"],accent:[{accent:k()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:k()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Te,Se]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":C()}],"scroll-mx":[{"scroll-mx":C()}],"scroll-my":[{"scroll-my":C()}],"scroll-ms":[{"scroll-ms":C()}],"scroll-me":[{"scroll-me":C()}],"scroll-mt":[{"scroll-mt":C()}],"scroll-mr":[{"scroll-mr":C()}],"scroll-mb":[{"scroll-mb":C()}],"scroll-ml":[{"scroll-ml":C()}],"scroll-p":[{"scroll-p":C()}],"scroll-px":[{"scroll-px":C()}],"scroll-py":[{"scroll-py":C()}],"scroll-ps":[{"scroll-ps":C()}],"scroll-pe":[{"scroll-pe":C()}],"scroll-pt":[{"scroll-pt":C()}],"scroll-pr":[{"scroll-pr":C()}],"scroll-pb":[{"scroll-pb":C()}],"scroll-pl":[{"scroll-pl":C()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Te,Se]}],fill:[{fill:["none",...k()]}],"stroke-w":[{stroke:[qe,Ui,ro,Ou]}],stroke:[{stroke:["none",...k()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}}),fr=(...e)=>t=>{e.forEach(n=>{typeof n=="function"?n(t):n!==null&&(n.current=t)})},rI=e=>e.$$typeof===Symbol.for("react.forward_ref")||e.$$typeof===Symbol.for("react.fragment")?!0:e.$$typeof===Symbol.for("react.element"),Du=e=>He.function(e),Pe=(...e)=>nI(bm(e)),$g=e=>{const t=new Event("input",{bubbles:!0,composed:!0});return e?.dispatchEvent(t),Object.assign({},t,{target:e,currentTarget:e})},Gi=e=>{const t=()=>e.setAttribute("data-initialized","true");return e.addEventListener("focus",t),()=>e.removeEventListener("focus",t)},zg=e=>e.scrollHeight>e.clientHeight,Yi=(e,t)=>{if(e&&e.getBoundingClientRect){const n=e.getBoundingClientRect();return Math.abs(t-n.bottom)}return 320},oI=(e,t)=>{const n=e.getBoundingClientRect(),r=t.getBoundingClientRect();return{top:Math.round(n.top-r.top),left:Math.round(n.left-r.left)}},jg=(e,t,n=!0)=>{const r=e.getBoundingClientRect(),o=t.getBoundingClientRect(),i=o.top>=r.top,s=o.bottom<=r.bottom,a=o.left>=r.left,l=o.right<=r.right;return n?o.top<r.bottom&&o.bottom>r.top&&o.left<r.right&&o.right>r.left:i&&s&&a&&l},un=S.forwardRef(function(t,n){const r=t.as||"span";return p.jsx(r,{ref:n,...t,as:void 0})}),iI={size:{icon:"p-1",big:"h-12 px-6 py-4",default:"h-8 px-4 py-2",tiny:"h-5 p-1 px-2 text-xs",small:"h-6 p-2 px-3 text-sm"},theme:{custom:"",info:"bg-tag-info-bg text-tag-info-text",warn:"bg-tag-warn-bg text-tag-warn-text",muted:"bg-tag-muted-bg text-tag-muted-text",danger:"bg-tag-danger-bg text-tag-danger-text",disabled:"bg-disabled duration-700 opacity-70",primary:"bg-tag-primary-bg text-tag-primary-text",success:"bg-tag-success-bg text-tag-success-text",neutral:"bg-transparent border border-card-border",secondary:"bg-tag-secondary-bg text-tag-secondary-text",loading:"animate-pulse bg-disabled duration-700 opacity-70"}},sI=_o("size-2 aspect-square rounded-full border-0",{variants:{theme:{info:"bg-info",warn:"bg-warn",muted:"bg-muted",danger:"bg-danger",neutral:"bg-muted",primary:"bg-primary",success:"bg-success",secondary:"bg-secondary"}}}),aI=_o("inline-flex rounded-pill gap-1.5 border-0 items-center justify-center align-middle whitespace-nowrap ease-linear duration-300 transition-all",{variants:iI,defaultVariants:{theme:"primary",size:"default"}}),zo=S.forwardRef(function({className:t,indicator:n=void 0,icon:r,loading:o,theme:i,size:s,...a},l){return p.jsxs(un,{...a,ref:l,"data-theme":i,"data-component":"tag",as:a.as??"span",className:Pe(aI({size:s,theme:o?"loading":i}),t),children:[n?p.jsx("span",{"aria-hidden":"true",className:sI({theme:n===!0?i:n})}):null,r,a.children]})}),lI=e=>{const t=n=>{n.persist(),n.preventDefault(),e.onSubmit?.(n)};return p.jsx("form",{...e,onSubmit:t})};var Dt=function(){return Dt=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},Dt.apply(this,arguments)};function Nu(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function Mu(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),o,i=[],s;try{for(;(t===void 0||t-- >0)&&!(o=r.next()).done;)i.push(o.value)}catch(a){s={error:a}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return i}typeof SuppressedError=="function"&&SuppressedError;var Ki=function(e){return e.replace(new RegExp(" ","g")," ")},Bg=function(e,t){var n=e.length,r=t+1;if(n>=r)return e;var o="0".repeat(r-n);return"".concat(o).concat(e)},cI=function(e){return e.replace(/^0+([0-9]+)/,"$1")},Rg=function(e,t,n){var r=e.length-2,o=cI(e.substring(0,r)),i=e.substring(r);return o.split(/(?=(?:\d{3})*$)/).join(t)+n+i},Hg=function(e){return e===void 0&&(e=""),e.replace(/(-(?!\d))|[^0-9|-]/g,"")||""},va=function(e){return Number.parseFloat(e.replace(/,/g,".").replace(/(.*)\./,function(t){return"".concat(t.replace(/\./g,""),".")}).replace(/[^0-9.]/g,""))},uI=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},_u=function(e){var t=S.useRef(e);return S.useEffect(function(){t.current=e},[e]),t},dI=function(e){return e==="money"||e==="currency"},fI=function(e,t,n){return new Intl.NumberFormat(e,{style:"currency",currency:t,currencyDisplay:n}).formatToParts(1e3).reduce(function(r,o){var i;return Dt(Dt({},r),(i={},i[o.type]=o.value,i))},{currency:"",currencyDisplay:"",decimal:",",fraction:"",group:"",integer:"",literal:""})},ba=function(e,t){var n=Bg(Hg(e),t.fraction.length),r="".concat(t.currency).concat(Rg(n,t.group,t.decimal));return Ki(r)},pI=S.forwardRef(function(e,t){var n=e.locale,r=n===void 0?"pt-BR":n,o=e.currency,i=o===void 0?"BRL":o,s=e.currencyDisplay,a=s===void 0?"symbol":s;e.mask;var l=e.onChange,c=Nu(e,["locale","currency","currencyDisplay","mask","onChange"]),u=S.useRef(null);S.useImperativeHandle(t,function(){return u.current});var d=S.useMemo(function(){var g=fI(r,i,a);return g.currency=Ki("".concat(g.currency.trim()," ")),g.literal=Ki(g.literal.trim()),g},[r,i]),f=function(g){var y=ba(g.target.value,d),m=va(y);g.target.value=y,g.target.setAttribute("data-number",m.toString()),l?.(g),m!==0&&(u.current.selectionEnd=y.length)};S.useEffect(function(){if(u.current!==null){var g=u.current.value;if(g!==""){var y=ba(g,d),m=va(y);u.current.value=y,u.current.setAttribute("data-number",m.toString());var v=new InputEvent("change",{});l?.(Dt(Dt({},v),{target:u.current,currentTarget:u.current})),m!==0&&(u.current.selectionEnd=y.length)}}},[d]);var h=c.defaultValue?ba(c.defaultValue,d):void 0;return S.createElement("input",Dt({},c,{value:typeof c.value=="string"?ba(c.value,d):c.value,defaultValue:h,type:"text",ref:u,onChange:f,inputMode:"decimal"}))}),hI=1,mI=function(e){return e==="percentage"||e==="percent"||e==="percentual"},gI=function(e){return new Intl.NumberFormat(e,{style:"percent",minimumFractionDigits:2}).formatToParts(1e3).reduce(function(t,n){var r;return Dt(Dt({},t),(r={},r[n.type]=n.value,r))},{decimal:"",fraction:"",group:"",integer:"",percentSign:"",type:"",value:""})},xa=function(e,t){var n=Bg(Hg(e),t.fraction.length),r="".concat(Rg(n,t.group,t.decimal)," ").concat(t.percentSign);return Ki(r)},yI=S.forwardRef(function(e,t){var n=e.locale,r=n===void 0?"pt-BR":n;e.mask;var o=e.onChange,i=e.onKeyUp,s=Nu(e,["locale","mask","onChange","onKeyUp"]),a=S.useRef(null),l=Mu(S.useState(function(){var v,b;return(b=(v=s.value)===null||v===void 0?void 0:v.toString())!==null&&b!==void 0?b:""}),2),c=l[0],u=l[1];S.useImperativeHandle(t,function(){return a.current}),S.useEffect(function(){var v,b=Number.parseFloat("".concat((v=s.value)!==null&&v!==void 0?v:"0")).toFixed(d.fraction.length);u(xa(b,d))},[s.value]);var d=S.useMemo(function(){var v=gI(r);return v.percentSign=Ki("".concat(v.percentSign)),v},[r]),f=c.length-d.percentSign.length-hI,h=function(v){var b,x=a.current;x&&(x.setSelectionRange(f,f),v&&((b=s.onFocus)===null||b===void 0||b.call(s,v)))},g=function(v){var b=v.currentTarget;if(b.selectionStart!==null){var x=b.selectionStart,T=b.selectionEnd,E=x!==T,I=f<x;!E&&I&&h()}i?.(v)},y=function(v){var b=xa(v.target.value,d),x=va(b);u(b),v.target.value=b,v.target.setAttribute("data-number",x.toString()),o?.(v)};S.useEffect(function(){if(a.current!==null){var v=a.current.value;if(v!==""){var b=xa(v,d),x=va(b);u(b),a.current.value=b,a.current.setAttribute("data-number",x.toString());var T=new InputEvent("change",{});o?.(Dt(Dt({},T),{target:a.current,currentTarget:a.current}))}}},[]),S.useEffect(function(){return h()},[c]);var m=s.defaultValue?xa(s.defaultValue,d):void 0;return S.createElement("input",Dt({},s,{defaultValue:m,inputMode:"decimal",onChange:y,onFocus:h,onKeyUp:g,ref:a,type:"text"}))}),Zi={dots:/\./g,openParenthesis:/\(/g,closeParenthesis:/\)/g,leadingBars:/\\\\/g,escape:/[.*+?^${}()|[\]\\]/g},vI=function(e){for(var t,n=e.length,r=[],o=0;o<n;o++){var i=e[o],s=wa[i];s===void 0?r.push(i.replace(Zi.dots,"\\.").replace(Zi.openParenthesis,"\\(").replace(Zi.closeParenthesis,"\\)")):r.push((t=s.regex)===null||t===void 0?void 0:t.source)}return r.join("").replace(Zi.leadingBars,"\\")},Xi=function(e,t,n){var r=typeof e=="function",o=r?"":e;if(r&&(o=e(t)),Array.isArray(o))return Fu(o,n);var i=vI(o);return n?"^".concat(i,"$"):i},bI=function(e){return e.replace(Zi.escape,"\\$&")},Fu=function(e,t){var n=e.map(function(r){return typeof r=="string"?bI(r):r.source}).join("");return new RegExp(t?"^".concat(n,"$"):n).source},wa={A:{regex:/[a-zA-Z]/,parse:function(e){return e.toLocaleUpperCase()}},H:{regex:/[a-fA-F0-9]/},X:{regex:/[0-9a-zA-Z]/},a:{regex:/[a-zA-Z]/,parse:function(e){return e.toLocaleLowerCase()}},d:{regex:/\d/,escape:!0},x:{regex:/[a-zA-Z]/}},xI=/\d/,Wg="(dd) 9dddd-dddd",qg="(dd) dddd-dddd",Ug="ddd.ddd.ddd-dd",Gg="dd.ddd.ddd/dddd-dd",Sa=function(e){return e.replace(/\D/g,"")},wI=["2",/[0-3]/,":",/[0-5]/,/\d/],SI=[/[012]/,/\d/,":",/[0-5]/,/[0-9]/],rn={cep:"ddddd-ddd",date:"dd/dd/dddd",cpf:Ug,isoDate:"dddd-dd-dd",cnpj:Gg,telephone:qg,cellphone:Wg,creditCard:"dddd dddd dddd dddd",uuid:"HHHHHHHH-HHHH-HHHH-HHHH-HHHHHHHHHHHH",color:function(e){return e.length>4?"#HHHHHH":"#HHH"},cpfCnpj:function(e){return Sa(e).length<=11?Ug:Gg},int:function(e){return e===void 0&&(e=""),xI.test(e.toString().slice(-1))?"d".repeat(Math.max(e.length,0)):"d".repeat(Math.max(e.length-1,0))},cellTelephone:function(e){var t=Sa(e);return t.length<11?qg:Wg},time:function(e){var t=Sa(e),n=t[0];return n==="2"?wI:SI}},on=function(e,t,n){var r;return n===void 0&&(n={}),Dt({mask:e,inputMode:t,strict:!0,pattern:((r=n.pattern)!==null&&r!==void 0?r:typeof e=="function")?void 0:Xi(e,"",!0),infinity:n.infinity},n)},Kt={cellTelephone:on(rn.cellTelephone,"tel"),cellphone:on(rn.cellphone,"tel"),cep:on(rn.cep,"decimal"),cnpj:on(rn.cnpj,"decimal"),color:on(rn.color,"decimal",{pattern:"#[a-fA-F0-9]{3}([a-fA-F0-9]{3})?"}),cpf:on(rn.cpf,"decimal"),cpfCnpj:on(rn.cpfCnpj,"decimal",{transform:Sa}),creditCard:on(rn.creditCard,"decimal",{pattern:"[0-9]{4} [0-9]{4} [0-9]{4} [0-9]{3,4}"}),date:on(rn.date,"decimal"),int:on(rn.int,"decimal",{pattern:"[0-9]+"}),isoDate:on(rn.isoDate,"decimal"),telephone:on(rn.telephone,"tel"),time:on(rn.time,"decimal",{pattern:"[0-9]{2}:[0-9]{2}"}),uuid:on(rn.uuid,"decimal",{pattern:"[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}"})};function Yg(e,t,n,r){var o,i;r===void 0&&(r=wa);for(var s=n(e),a="",l=0,c=0;l<t.length&&c<s.length;){var u=t[l],d=u instanceof RegExp?u:r[u],f=s[c];if(d===void 0){a+=u,f===u&&(c+=1),l+=1;continue}var h=d instanceof RegExp?{regex:d}:d;h.regex.test(f)&&(a+=(i=(o=h.parse)===null||o===void 0?void 0:o.call(h,f))!==null&&i!==void 0?i:f),c+=1,l+=1}return a}var Kg=function(e){return e},TI=function(e,t,n){if(!e||!n)return!1;var r=new RegExp(Xi(e,n,t));return r.test(n)};function EI(e){var t=S.useRef(e);return S.useEffect(function(){t.current=e},[e]),t.current}var CI=S.forwardRef(function(e,t){var n=e.infinity,r=n===void 0?!1:n,o=e.strict,i=o===void 0?!0:o,s=e.transform,a=e.onChange,l=e.pattern,c=e.tokens,u=e.mask,d=e.onChangeText,f=e.as,h=Nu(e,["infinity","strict","transform","onChange","pattern","tokens","mask","onChangeText","as"]),g=S.useRef(null);S.useImperativeHandle(t,function(){return g.current});var y=_u(a),m=_u(d),v=_u(u),b=S.useRef(TI(u,i,h.value||h.defaultValue)),x=f??"input",T=Mu(S.useState(""),2),E=T[0],I=T[1],w=EI(E),C=S.useCallback(function(F,z){var M,k,V=(M=F??z)!==null&&M!==void 0?M:"";if(u===void 0)return V;var L=(k=V?.toString())!==null&&k!==void 0?k:"";return Yg(L,typeof u=="function"?u(L):u,s??Kg,c??wa)},[s,u,c]),A=Mu(S.useState(function(){return C(h.value,h.defaultValue)}),2),O=A[0],_=A[1],N=C(h.defaultValue,h.defaultValue),$=S.useMemo(function(){if(l||u===void 0)return l;if(typeof u=="function"){var F=u(O);return Array.isArray(F)?Fu(F,i):Xi(u,O,i)}return typeof u=="string"?Xi(u,O,i):Fu(u,i)},[l,O,i,u]);S.useEffect(function(){if(h.value!==void 0){var F=C(h.value,h.defaultValue);_(F),g.current!==null&&(g.current.value=F)}},[h.value,u,s,h.defaultValue]);var D=function(F){var z,M,k,V,L,R=F.currentTarget,U=F.target.value;if(v.current===void 0)return _(U),(z=m.current)===null||z===void 0||z.call(m,U),(M=y.current)===null||M===void 0||M.call(y,F),d?.(U);var G=new RegExp(Xi(v.current,U,i)),H=(k=R.selectionEnd)!==null&&k!==void 0?k:0,ee=function(Z,pe,B){if(Z.type!=="number")return Z.setSelectionRange(pe,B)};if(r&&b.current&&U.length>=O.length)return R.value=O,ee(R,H-1,H-1);var se=!1;U.length<w.length&&(b.current=!1,se=!0),G.test(U)&&(b.current=!0);var te=H,q=U[te-1],Y=Yg(U,typeof v.current=="function"?v.current(U):v.current,s??Kg,c??wa);for(R.value=Y,_(Y);te<Y.length&&Y.charAt(te-1)!==q;)te+=1;se?ee(R,H,H):ee(R,te,te),F.target.value=Y,I(Y),(V=m.current)===null||V===void 0||V.call(m,Y),(L=y.current)===null||L===void 0||L.call(y,F)};return S.createElement(x,Dt({},h,{ref:g,pattern:$,onChange:D,defaultValue:Zg(h.defaultValue)?N:void 0,value:Zg(h.value)?C(h.value,h.value):h.value}))}),Zg=function(e){return typeof e=="string"},Xg=S.forwardRef(function(e,t){return dI(e.mask)?S.createElement(pI,Dt({},e,{mask:void 0,ref:t})):mI(e.mask)?S.createElement(yI,Dt({},e,{mask:void 0,ref:t})):S.createElement(CI,Dt({},e,{ref:t}))}),sn=function(e){return function(t){return S.createElement(Xg,Dt({},e,t))}};sn(Kt.cellTelephone),sn(Kt.cellphone),sn(Kt.cep),sn(Kt.cnpj),sn(Kt.color),sn(Kt.cpf),sn(Kt.cpfCnpj),sn(Kt.creditCard),sn(Kt.date),sn(Kt.int),sn(Kt.isoDate),sn(Kt.telephone),sn(Kt.time),sn(Kt.uuid);var Qg=S.forwardRef(function(t,n){var r=S.useMemo(function(){if(t.mask)return typeof t.mask=="string"&&uI(Kt,t.mask)?Kt[t.mask]:{mask:t.mask}},[t.mask]),o=Dt(Dt({},t),r);return S.createElement(Xg,Dt({},o,{ref:n}))});const Jg=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();const kI=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();const II=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase());const ey=e=>{const t=II(e);return t.charAt(0).toUpperCase()+t.slice(1)};var AI={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const PI=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1};const OI=S.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:i,iconNode:s,...a},l)=>S.createElement("svg",{ref:l,...AI,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:Jg("lucide",o),...!i&&!PI(a)&&{"aria-hidden":"true"},...a},[...s.map(([c,u])=>S.createElement(c,u)),...Array.isArray(i)?i:[i]]));const Xe=(e,t)=>{const n=S.forwardRef(({className:r,...o},i)=>S.createElement(OI,{ref:i,iconNode:t,className:Jg(`lucide-${kI(ey(e))}`,`lucide-${e}`,r),...o}));return n.displayName=ey(e),n};const DI=Xe("arrow-down-0-1",[["path",{d:"m3 16 4 4 4-4",key:"1co6wj"}],["path",{d:"M7 20V4",key:"1yoxec"}],["rect",{x:"15",y:"4",width:"4",height:"6",ry:"2",key:"1bwicg"}],["path",{d:"M17 20v-6h-2",key:"1qp1so"}],["path",{d:"M15 20h4",key:"1j968p"}]]);const NI=Xe("arrow-up-0-1",[["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}],["rect",{x:"15",y:"4",width:"4",height:"6",ry:"2",key:"1bwicg"}],["path",{d:"M17 20v-6h-2",key:"1qp1so"}],["path",{d:"M15 20h4",key:"1j968p"}]]);const ty=Xe("arrow-up-down",[["path",{d:"m21 16-4 4-4-4",key:"f6ql7i"}],["path",{d:"M17 20V4",key:"1ejh1v"}],["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}]]);const MI=Xe("audio-lines",[["path",{d:"M2 10v3",key:"1fnikh"}],["path",{d:"M6 6v11",key:"11sgs0"}],["path",{d:"M10 3v18",key:"yhl04a"}],["path",{d:"M14 8v7",key:"3a1oy3"}],["path",{d:"M18 5v13",key:"123xd1"}],["path",{d:"M22 10v3",key:"154ddg"}]]);const ny=Xe("calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]]);const Lu=Xe("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);const ry=Xe("chevron-left",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);const Ta=Xe("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);const Vu=Xe("circle-check-big",[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);const _I=Xe("circle-plus",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M8 12h8",key:"1wcyev"}],["path",{d:"M12 8v8",key:"napkw2"}]]);const FI=Xe("circle-x",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);const LI=Xe("command",[["path",{d:"M15 6v12a3 3 0 1 0 3-3H6a3 3 0 1 0 3 3V6a3 3 0 1 0-3 3h12a3 3 0 1 0-3-3",key:"11bfej"}]]);const VI=Xe("file-braces",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 12a1 1 0 0 0-1 1v1a1 1 0 0 1-1 1 1 1 0 0 1 1 1v1a1 1 0 0 0 1 1",key:"1oajmo"}],["path",{d:"M14 18a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1 1 1 0 0 1-1-1v-1a1 1 0 0 0-1-1",key:"mpwhp6"}]]);const oy=Xe("file-text",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);const iy=Xe("file-video-camera",[["path",{d:"M4 12V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.706.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2",key:"jrl274"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"m10 17.843 3.033-1.755a.64.64 0 0 1 .967.56v4.704a.65.65 0 0 1-.967.56L10 20.157",key:"17aeo9"}],["rect",{width:"7",height:"6",x:"3",y:"16",rx:"1",key:"s27ndx"}]]);const sy=Xe("file",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}]]);const $I=Xe("folder-open",[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]]);const zI=Xe("folder",[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]]);const $u=Xe("funnel",[["path",{d:"M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z",key:"sc7q7i"}]]);const jI=Xe("grip-vertical",[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]]);const Er=Xe("info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);const BI=Xe("list-filter",[["path",{d:"M2 5h20",key:"1fs1ex"}],["path",{d:"M6 12h12",key:"8npq4p"}],["path",{d:"M9 19h6",key:"456am0"}]]);const RI=Xe("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);const HI=Xe("option",[["path",{d:"M3 3h6l6 18h6",key:"ph9rgk"}],["path",{d:"M14 3h7",key:"16f0ms"}]]);const zu=Xe("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);const WI=Xe("search-check",[["path",{d:"m8 11 2 2 4-4",key:"1sed1v"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);const qI=Xe("search-x",[["path",{d:"m13.5 8.5-5 5",key:"1cs55j"}],["path",{d:"m8.5 8.5 5 5",key:"a8mexj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);const ju=Xe("sheet",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["line",{x1:"3",x2:"21",y1:"9",y2:"9",key:"1vqk6q"}],["line",{x1:"3",x2:"21",y1:"15",y2:"15",key:"o2sbyz"}],["line",{x1:"9",x2:"9",y1:"9",y2:"21",key:"1ib60c"}],["line",{x1:"15",x2:"15",y1:"9",y2:"21",key:"1n26ft"}]]);const Ea=Xe("trash-2",[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]]);const Bu=Xe("triangle-alert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);const UI=Xe("ungroup",[["rect",{width:"8",height:"6",x:"5",y:"4",rx:"1",key:"nzclkv"}],["rect",{width:"8",height:"6",x:"11",y:"14",rx:"1",key:"4tytwb"}]]);const jo=Xe("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),Ca={hex:e=>e,raw:e=>e,hsl:e=>`hsl(${e})`,rgb:e=>`rgb(${e})`,z:(e,t,n)=>`var(--z-${n})`,hsla:e=>`hsla(${e})`,rgba:e=>`rgba(${e})`,cssVariable:(e,t,n)=>`var(--${n})`,formatWithVar:e=>(t,n,r)=>`${e}(var(--${r}), <alpha-value>)`},Cr=(e,t,n="",r="")=>Object.entries(e).reduce((o,[i,s])=>{const a=r===""?`${n}${i}`:`${r}-${i}`;if(typeof s=="string"){const l=r===""?`${n}${i}`:i;return o.concat(t(s,l,a))}return o.concat(Cr(s,t,n,a))},[]),ay=(e,t,n="",r="")=>Object.entries(e).reduce((o,[i,s])=>{const a=r===""?`${n}${i}`:`${r}-${i}`;if(typeof s=="string"){const l=r===""?`${n}${i}`:i;return{...o,[l]:t(s,i,a)}}return{...o,[i]:ay(s,t,n,a)}},{}),ly={default:e=>`:root { ${e} }`,dark:e=>`html.dark {${e}}`},ka=(e,t)=>{const n=t.value||((o,i)=>i),r=e.map(o=>`${o.key}: ${n(o.key,o.value)}`).join(";");return t.result(r)},GI={default:e=>ka(e,{result:ly.default}),dark:e=>ka(e,{result:ly.dark})},Bo=e=>(t,n,r)=>{const o={key:`--${r}`,value:`${t}`};return e?e(o):o},YI=e=>({key:e.key.replace(/^--/,"--z-"),value:e.value}),Ru=(e,t)=>{const n=Cr(e.colors,Bo(t?.colors)),r=Cr(e.spacing,Bo(t?.spacing)),o=Cr(e.rounded,Bo(t?.rounded)),i=Cr(e.shadow,Bo(t?.rounded)),s=Cr(e.zIndex,Bo(t?.zIndex??YI)),a=e.custom?Cr(e.custom,Bo(t?.customTokens)):[];return n.concat(r,o,a,s,i)},KI=(e,t)=>ka(Ru(e),{result:n=>`html${t?`.${t}`:""} {${n}}`,value:(n,r)=>r.replace("hsla(","").replace(")","")}),ZI=(e,t)=>Ru(e,t).reduce((r,o)=>({...r,[o.key]:o.value}),{}),XI=(e,t)=>ka(Ru(e,t),{result:n=>`html${t?.name?`.${t.name}`:""} {${n}}`,value:(n,r)=>r}),Ia={autocompleteEmpty:"Nothing here...",calendarBackMonth:"Back month",calendarFromDate:"From",calendarMonthLabel:"Month",calendarNextMonth:"Next month",calendarDatetimeTitle:"Time",calendarToDate:"To",calendarToday:"Today",pageCalendarMonthView:"Month view",pageCalendarWeekView:"Week view",pageCalendarDayView:"Day view",pageCalendarPrevious:"Previous",pageCalendarNext:"Next",pageCalendarToday:"Today",pageCalendarAddEvent:"Add event",pageCalendarWeekLabel:e=>`Week ${e}`,pageCalendarFilter:"Filter:",pageCalendarMoreEvents:e=>`+${e} more...`,pageCalendarLabel:"Calendar",pageCalendarNavigation:"Calendar navigation",pageCalendarMonthGrid:"Calendar month",pageCalendarFilterEnabled:"enabled",pageCalendarFilterDisabled:"disabled",pageCalendarEventCount:e=>e===1?"1 event":`${e} events`,pageCalendarEventAt:(e,t)=>`${e} at ${t}`,commandPaletteEmpty:"Nothing here...",commandPaletteLoading:"Loading...",datePickerCalendarButtonLabel:"Click to open a date picker",emptyDataMessage:"No data",inputCaretDown:"Click to see all options",inputCloseValue:"Click to clear the value",inputOptionalLabel:"Optional",wizardNext:"Next",wizardPrev:"Previous",wizardFinish:"Finish",wizardSkip:"Skip",multiSelectInnerPlaceholder:"Search...",multiSelectSelectedLabel:"Selected",tableColumnResizer:"Resize column",tableFilterColumnPlaceholder:"Filter by",tableFilterColumnTitle:"Filter by",tableFilterDropdownTitle:"Filters",tableFilterDropdownTitleUnique:"Filter by",tableFilterLabel:"Filters",tableFilterNewFilter:"New filter",tableFilterOperatorPlaceholder:"Equals to...",tableFilterOperatorTitle:"Operation",tableFilterTypeContains:"Contains",tableFilterTypeEndsWith:"Ends with",tableFilterTypeGreaterThan:"Greater than",tableFilterTypeIs:"Is",tableFilterTypeIsNot:"Is not",tableFilterTypeLessThan:"Less than",tableFilterTypeNotContains:"Not contains",tableFilterTypeStartsWith:"Starts with",tableFilterValuePlaceholder:"Something...",tableFilterValueTitle:"Value",tableGroupLabel:"Group",tableGroupLabelWithCount:"Group",tablePaginationFooter:e=>p.jsxs(S.Fragment,{children:[e.current," to ",e.pages," of ",e.totalItems," items.",Array.isArray(e.sizes)?e.select:null," ","per page."]}),tablePaginationNext:"Next",tablePaginationPrevious:"Previous",tablePaginationSelectLabel:"Select the size of page",tableSortAddButton:"Add sort",tableSortAsc:"Ascending",tableSortDesc:"Descending",tableSortDropdownTitle:"Order by",tableSortOrderByLabel:"Order by",tableSortOrderInputPlaceholder:"Order by",tableSortOrderInputTitle:"Order by",tableSortTypeInputPlaceholder:"Ascending",tableSortTypeInputTitle:"Sort type",uploadIdle:"You can drag your files here",uploadIdleButton:"Choose your files",uploadDragging:e=>`Dragging ${e.n} ${e.n>0?"files":"file"}`,uploadDialogTitle:"Details of your file",datepickerPlaceholder:e=>"day/month/year"},Aa={input:{iconFeedback:!0},table:{operations:!0,sorters:!0,filters:!0,sticky:void 0}},oo=S.createContext({parser:Ca.hsla,tweaks:Aa,floatingRef:void 0,map:Ia,locale:void 0}),vt=()=>{const e=S.useContext(oo);return e?e.map:Ia},Hu=()=>{const e=S.useContext(oo);return e?e.tweaks:Aa};function Pa(){return typeof window<"u"}function kr(e){return Oa(e)?(e.nodeName||"").toLowerCase():"#document"}function Wt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Wn(e){var t;return(t=(Oa(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Oa(e){return Pa()?e instanceof Node||e instanceof Wt(e).Node:!1}function tt(e){return Pa()?e instanceof Element||e instanceof Wt(e).Element:!1}function Pt(e){return Pa()?e instanceof HTMLElement||e instanceof Wt(e).HTMLElement:!1}function Qi(e){return!Pa()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Wt(e).ShadowRoot}const QI=new Set(["inline","contents"]);function Ji(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=dn(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!QI.has(o)}const JI=new Set(["table","td","th"]);function eA(e){return JI.has(kr(e))}const tA=[":popover-open",":modal"];function Da(e){return tA.some(t=>{try{return e.matches(t)}catch{return!1}})}const nA=["transform","translate","scale","rotate","perspective"],rA=["transform","translate","scale","rotate","perspective","filter"],oA=["paint","layout","strict","content"];function Wu(e){const t=Na(),n=tt(e)?dn(e):e;return nA.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||rA.some(r=>(n.willChange||"").includes(r))||oA.some(r=>(n.contain||"").includes(r))}function iA(e){let t=hr(e);for(;Pt(t)&&!pr(t);){if(Wu(t))return t;if(Da(t))return null;t=hr(t)}return null}function Na(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const sA=new Set(["html","body","#document"]);function pr(e){return sA.has(kr(e))}function dn(e){return Wt(e).getComputedStyle(e)}function Ma(e){return tt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function hr(e){if(kr(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Qi(e)&&e.host||Wn(e);return Qi(t)?t.host:t}function cy(e){const t=hr(e);return pr(t)?e.ownerDocument?e.ownerDocument.body:e.body:Pt(t)&&Ji(t)?t:cy(t)}function Ir(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=cy(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),s=Wt(o);if(i){const a=qu(s);return t.concat(s,s.visualViewport||[],Ji(o)?o:[],a&&n?Ir(a):[])}return t.concat(o,Ir(o,[],n))}function qu(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}const aA=["top","right","bottom","left"],uy=["start","end"],dy=aA.reduce((e,t)=>e.concat(t,t+"-"+uy[0],t+"-"+uy[1]),[]),Ar=Math.min,fn=Math.max,_a=Math.round,Ro=Math.floor,qn=e=>({x:e,y:e}),lA={left:"right",right:"left",bottom:"top",top:"bottom"},cA={start:"end",end:"start"};function Uu(e,t,n){return fn(e,Ar(t,n))}function io(e,t){return typeof e=="function"?e(t):e}function Un(e){return e.split("-")[0]}function On(e){return e.split("-")[1]}function fy(e){return e==="x"?"y":"x"}function Gu(e){return e==="y"?"height":"width"}const uA=new Set(["top","bottom"]);function mr(e){return uA.has(Un(e))?"y":"x"}function Yu(e){return fy(mr(e))}function py(e,t,n){n===void 0&&(n=!1);const r=On(e),o=Yu(e),i=Gu(o);let s=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=La(s)),[s,La(s)]}function dA(e){const t=La(e);return[Fa(e),t,Fa(t)]}function Fa(e){return e.replace(/start|end/g,t=>cA[t])}const hy=["left","right"],my=["right","left"],fA=["top","bottom"],pA=["bottom","top"];function hA(e,t,n){switch(e){case"top":case"bottom":return n?t?my:hy:t?hy:my;case"left":case"right":return t?fA:pA;default:return[]}}function mA(e,t,n,r){const o=On(e);let i=hA(Un(e),n==="start",r);return o&&(i=i.map(s=>s+"-"+o),t&&(i=i.concat(i.map(Fa)))),i}function La(e){return e.replace(/left|right|bottom|top/g,t=>lA[t])}function gA(e){return{top:0,right:0,bottom:0,left:0,...e}}function gy(e){return typeof e!="number"?gA(e):{top:e,right:e,bottom:e,left:e}}function Va(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}var yA=["input:not([inert]):not([inert] *)","select:not([inert]):not([inert] *)","textarea:not([inert]):not([inert] *)","a[href]:not([inert]):not([inert] *)","button:not([inert]):not([inert] *)","[tabindex]:not(slot):not([inert]):not([inert] *)","audio[controls]:not([inert]):not([inert] *)","video[controls]:not([inert]):not([inert] *)",'[contenteditable]:not([contenteditable="false"]):not([inert]):not([inert] *)',"details>summary:first-of-type:not([inert]):not([inert] *)","details:not([inert]):not([inert] *)"],$a=yA.join(","),yy=typeof Element>"u",Ho=yy?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,za=!yy&&Element.prototype.getRootNode?function(e){var t;return e==null||(t=e.getRootNode)===null||t===void 0?void 0:t.call(e)}:function(e){return e?.ownerDocument},ja=function(t,n){var r;n===void 0&&(n=!0);var o=t==null||(r=t.getAttribute)===null||r===void 0?void 0:r.call(t,"inert"),i=o===""||o==="true",s=i||n&&t&&(typeof t.closest=="function"?t.closest("[inert]"):ja(t.parentNode));return s},vA=function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"},vy=function(t,n,r){if(ja(t))return[];var o=Array.prototype.slice.apply(t.querySelectorAll($a));return n&&Ho.call(t,$a)&&o.unshift(t),o=o.filter(r),o},Ba=function(t,n,r){for(var o=[],i=Array.from(t);i.length;){var s=i.shift();if(!ja(s,!1))if(s.tagName==="SLOT"){var a=s.assignedElements(),l=a.length?a:s.children,c=Ba(l,!0,r);r.flatten?o.push.apply(o,c):o.push({scopeParent:s,candidates:c})}else{var u=Ho.call(s,$a);u&&r.filter(s)&&(n||!t.includes(s))&&o.push(s);var d=s.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(s),f=!ja(d,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(s));if(d&&f){var h=Ba(d===!0?s.children:d.children,!0,r);r.flatten?o.push.apply(o,h):o.push({scopeParent:s,candidates:h})}else i.unshift.apply(i,s.children)}}return o},by=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},xy=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||vA(t))&&!by(t)?0:t.tabIndex},bA=function(t,n){var r=xy(t);return r<0&&n&&!by(t)?0:r},xA=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},wy=function(t){return t.tagName==="INPUT"},wA=function(t){return wy(t)&&t.type==="hidden"},SA=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},TA=function(t,n){for(var r=0;r<t.length;r++)if(t[r].checked&&t[r].form===n)return t[r]},EA=function(t){if(!t.name)return!0;var n=t.form||za(t),r=function(a){return n.querySelectorAll('input[type="radio"][name="'+a+'"]')},o;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")o=r(window.CSS.escape(t.name));else try{o=r(t.name)}catch(s){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",s.message),!1}var i=TA(o,t.form);return!i||i===t},CA=function(t){return wy(t)&&t.type==="radio"},kA=function(t){return CA(t)&&!EA(t)},IA=function(t){var n,r=t&&za(t),o=(n=r)===null||n===void 0?void 0:n.host,i=!1;if(r&&r!==t){var s,a,l;for(i=!!((s=o)!==null&&s!==void 0&&(a=s.ownerDocument)!==null&&a!==void 0&&a.contains(o)||t!=null&&(l=t.ownerDocument)!==null&&l!==void 0&&l.contains(t));!i&&o;){var c,u,d;r=za(o),o=(c=r)===null||c===void 0?void 0:c.host,i=!!((u=o)!==null&&u!==void 0&&(d=u.ownerDocument)!==null&&d!==void 0&&d.contains(o))}}return i},Sy=function(t){var n=t.getBoundingClientRect(),r=n.width,o=n.height;return r===0&&o===0},AA=function(t,n){var r=n.displayCheck,o=n.getShadowRoot;if(r==="full-native"&&"checkVisibility"in t){var i=t.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});return!i}if(getComputedStyle(t).visibility==="hidden")return!0;var s=Ho.call(t,"details>summary:first-of-type"),a=s?t.parentElement:t;if(Ho.call(a,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="full-native"||r==="legacy-full"){if(typeof o=="function"){for(var l=t;t;){var c=t.parentElement,u=za(t);if(c&&!c.shadowRoot&&o(c)===!0)return Sy(t);t.assignedSlot?t=t.assignedSlot:!c&&u!==t.ownerDocument?t=u.host:t=c}t=l}if(IA(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return Sy(t);return!1},PA=function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var n=t.parentElement;n;){if(n.tagName==="FIELDSET"&&n.disabled){for(var r=0;r<n.children.length;r++){var o=n.children.item(r);if(o.tagName==="LEGEND")return Ho.call(n,"fieldset[disabled] *")?!0:!o.contains(t)}return!0}n=n.parentElement}return!1},Ku=function(t,n){return!(n.disabled||wA(n)||AA(n,t)||SA(n)||PA(n))},Zu=function(t,n){return!(kA(n)||xy(n)<0||!Ku(t,n))},OA=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},Ty=function(t){var n=[],r=[];return t.forEach(function(o,i){var s=!!o.scopeParent,a=s?o.scopeParent:o,l=bA(a,s),c=s?Ty(o.candidates):a;l===0?s?n.push.apply(n,c):n.push(a):r.push({documentOrder:i,tabIndex:l,item:o,isScope:s,content:c})}),r.sort(xA).reduce(function(o,i){return i.isScope?o.push.apply(o,i.content):o.push(i.content),o},[]).concat(n)},Wo=function(t,n){n=n||{};var r;return n.getShadowRoot?r=Ba([t],n.includeContainer,{filter:Zu.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:OA}):r=vy(t,n.includeContainer,Zu.bind(null,n)),Ty(r)},DA=function(t,n){n=n||{};var r;return n.getShadowRoot?r=Ba([t],n.includeContainer,{filter:Ku.bind(null,n),flatten:!0,getShadowRoot:n.getShadowRoot}):r=vy(t,n.includeContainer,Ku.bind(null,n)),r},Ey=function(t,n){if(n=n||{},!t)throw new Error("No node provided");return Ho.call(t,$a)===!1?!1:Zu(n,t)};function Xu(){const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function Cy(){const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(t=>{let{brand:n,version:r}=t;return n+"/"+r}).join(" "):navigator.userAgent}function ky(){return/apple/i.test(navigator.vendor)}function Qu(){const e=/android/i;return e.test(Xu())||e.test(Cy())}function NA(){return Xu().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function Iy(){return Cy().includes("jsdom/")}const Ay="data-floating-ui-focusable",MA="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])",Ju="ArrowLeft",ed="ArrowRight",_A="ArrowUp",FA="ArrowDown";function Gn(e){let t=e.activeElement;for(;((n=t)==null||(n=n.shadowRoot)==null?void 0:n.activeElement)!=null;){var n;t=t.shadowRoot.activeElement}return t}function Rt(e,t){if(!e||!t)return!1;const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&Qi(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function Yn(e){return"composedPath"in e?e.composedPath()[0]:e.target}function td(e,t){if(t==null)return!1;if("composedPath"in e)return e.composedPath().includes(t);const n=e;return n.target!=null&&t.contains(n.target)}function LA(e){return e.matches("html,body")}function qt(e){return e?.ownerDocument||document}function nd(e){return Pt(e)&&e.matches(MA)}function rd(e){return e?e.getAttribute("role")==="combobox"&&nd(e):!1}function VA(e){if(!e||Iy())return!0;try{return e.matches(":focus-visible")}catch{return!0}}function Ra(e){return e?e.hasAttribute(Ay)?e:e.querySelector("["+Ay+"]")||e:null}function so(e,t,n){return n===void 0&&(n=!0),e.filter(o=>{var i;return o.parentId===t&&(!n||((i=o.context)==null?void 0:i.open))}).flatMap(o=>[o,...so(e,o.id,n)])}function $A(e,t){let n,r=-1;function o(i,s){s>r&&(n=i,r=s),so(e,i).forEach(l=>{o(l.id,s+1)})}return o(t,0),e.find(i=>i.id===n)}function Py(e,t){var n;let r=[],o=(n=e.find(i=>i.id===t))==null?void 0:n.parentId;for(;o;){const i=e.find(s=>s.id===o);o=i?.parentId,i&&(r=r.concat(i))}return r}function Ut(e){e.preventDefault(),e.stopPropagation()}function zA(e){return"nativeEvent"in e}function Oy(e){return e.mozInputSource===0&&e.isTrusted?!0:Qu()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function Dy(e){return Iy()?!1:!Qu()&&e.width===0&&e.height===0||Qu()&&e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType==="mouse"||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0&&e.pointerType==="touch"}function qo(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}var jA=typeof document<"u",BA=function(){},nt=jA?S.useLayoutEffect:BA;const RA={...P};function Ht(e){const t=P.useRef(e);return nt(()=>{t.current=e}),t}const HA=RA.useInsertionEffect||(e=>e());function kt(e){const t=P.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return HA(()=>{t.current=e}),P.useCallback(function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return t.current==null?void 0:t.current(...r)},[])}function Ha(e,t,n){return Math.floor(e/t)!==n}function es(e,t){return t<0||t>=e.current.length}function od(e,t){return Zt(e,{disabledIndices:t})}function Ny(e,t){return Zt(e,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function Zt(e,t){let{startingIndex:n=-1,decrement:r=!1,disabledIndices:o,amount:i=1}=t===void 0?{}:t,s=n;do s+=r?-i:i;while(s>=0&&s<=e.current.length-1&&Wa(e,s,o));return s}function WA(e,t){let{event:n,orientation:r,loop:o,rtl:i,cols:s,disabledIndices:a,minIndex:l,maxIndex:c,prevIndex:u,stopEvent:d=!1}=t,f=u;if(n.key===_A){if(d&&Ut(n),u===-1)f=c;else if(f=Zt(e,{startingIndex:f,amount:s,decrement:!0,disabledIndices:a}),o&&(u-s<l||f<0)){const h=u%s,g=c%s,y=c-(g-h);g===h?f=c:f=g>h?y:y-s}es(e,f)&&(f=u)}if(n.key===FA&&(d&&Ut(n),u===-1?f=l:(f=Zt(e,{startingIndex:u,amount:s,disabledIndices:a}),o&&u+s>c&&(f=Zt(e,{startingIndex:u%s-s,amount:s,disabledIndices:a}))),es(e,f)&&(f=u)),r==="both"){const h=Ro(u/s);n.key===(i?Ju:ed)&&(d&&Ut(n),u%s!==s-1?(f=Zt(e,{startingIndex:u,disabledIndices:a}),o&&Ha(f,s,h)&&(f=Zt(e,{startingIndex:u-u%s-1,disabledIndices:a}))):o&&(f=Zt(e,{startingIndex:u-u%s-1,disabledIndices:a})),Ha(f,s,h)&&(f=u)),n.key===(i?ed:Ju)&&(d&&Ut(n),u%s!==0?(f=Zt(e,{startingIndex:u,decrement:!0,disabledIndices:a}),o&&Ha(f,s,h)&&(f=Zt(e,{startingIndex:u+(s-u%s),decrement:!0,disabledIndices:a}))):o&&(f=Zt(e,{startingIndex:u+(s-u%s),decrement:!0,disabledIndices:a})),Ha(f,s,h)&&(f=u));const g=Ro(c/s)===h;es(e,f)&&(o&&g?f=n.key===(i?ed:Ju)?c:Zt(e,{startingIndex:u-u%s-1,disabledIndices:a}):f=u)}return f}function qA(e,t,n){const r=[];let o=0;return e.forEach((i,s)=>{let{width:a,height:l}=i;if(a>t&&process.env.NODE_ENV!=="production")throw new Error("[Floating UI]: Invalid grid - item width at index "+s+" is greater than grid columns");let c=!1;for(n&&(o=0);!c;){const u=[];for(let d=0;d<a;d++)for(let f=0;f<l;f++)u.push(o+d+f*t);o%t+a<=t&&u.every(d=>r[d]==null)?(u.forEach(d=>{r[d]=s}),c=!0):o++}}),[...r]}function UA(e,t,n,r,o){if(e===-1)return-1;const i=n.indexOf(e),s=t[e];switch(o){case"tl":return i;case"tr":return s?i+s.width-1:i;case"bl":return s?i+(s.height-1)*r:i;case"br":return n.lastIndexOf(e)}}function GA(e,t){return t.flatMap((n,r)=>e.includes(n)?[r]:[])}function Wa(e,t,n){if(typeof n=="function")return n(t);if(n)return n.includes(t);const r=e.current[t];return r==null||r.hasAttribute("disabled")||r.getAttribute("aria-disabled")==="true"}const ts=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function My(e,t){const n=Wo(e,ts()),r=n.length;if(r===0)return;const o=Gn(qt(e)),i=n.indexOf(o),s=i===-1?t===1?0:r-1:i+t;return n[s]}function _y(e){return My(qt(e).body,1)||e}function Fy(e){return My(qt(e).body,-1)||e}function ns(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!Rt(n,r)}function YA(e){Wo(e,ts()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function Ly(e){e.querySelectorAll("[data-tabindex]").forEach(n=>{const r=n.dataset.tabindex;delete n.dataset.tabindex,r?n.setAttribute("tabindex",r):n.removeAttribute("tabindex")})}function Vy(e,t,n){let{reference:r,floating:o}=e;const i=mr(t),s=Yu(t),a=Gu(s),l=Un(t),c=i==="y",u=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,f=r[a]/2-o[a]/2;let h;switch(l){case"top":h={x:u,y:r.y-o.height};break;case"bottom":h={x:u,y:r.y+r.height};break;case"right":h={x:r.x+r.width,y:d};break;case"left":h={x:r.x-o.width,y:d};break;default:h={x:r.x,y:r.y}}switch(On(t)){case"start":h[s]-=f*(n&&c?-1:1);break;case"end":h[s]+=f*(n&&c?-1:1);break}return h}async function KA(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:i,rects:s,elements:a,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:f=!1,padding:h=0}=io(t,e),g=gy(h),m=a[f?d==="floating"?"reference":"floating":d],v=Va(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(m)))==null||n?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(a.floating)),boundary:c,rootBoundary:u,strategy:l})),b=d==="floating"?{x:r,y:o,width:s.floating.width,height:s.floating.height}:s.reference,x=await(i.getOffsetParent==null?void 0:i.getOffsetParent(a.floating)),T=await(i.isElement==null?void 0:i.isElement(x))?await(i.getScale==null?void 0:i.getScale(x))||{x:1,y:1}:{x:1,y:1},E=Va(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:b,offsetParent:x,strategy:l}):b);return{top:(v.top-E.top+g.top)/T.y,bottom:(E.bottom-v.bottom+g.bottom)/T.y,left:(v.left-E.left+g.left)/T.x,right:(E.right-v.right+g.right)/T.x}}const ZA=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:s}=n,a=i.filter(Boolean),l=await(s.isRTL==null?void 0:s.isRTL(t));let c=await s.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:d}=Vy(c,r,l),f=r,h={},g=0;for(let m=0;m<a.length;m++){var y;const{name:v,fn:b}=a[m],{x,y:T,data:E,reset:I}=await b({x:u,y:d,initialPlacement:r,placement:f,strategy:o,middlewareData:h,rects:c,platform:{...s,detectOverflow:(y=s.detectOverflow)!=null?y:KA},elements:{reference:e,floating:t}});u=x??u,d=T??d,h={...h,[v]:{...h[v],...E}},I&&g<=50&&(g++,typeof I=="object"&&(I.placement&&(f=I.placement),I.rects&&(c=I.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:o}):I.rects),{x:u,y:d}=Vy(c,f,l)),m=-1)}return{x:u,y:d,placement:f,strategy:o,middlewareData:h}},XA=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:s,elements:a,middlewareData:l}=t,{element:c,padding:u=0}=io(e,t)||{};if(c==null)return{};const d=gy(u),f={x:n,y:r},h=Yu(o),g=Gu(h),y=await s.getDimensions(c),m=h==="y",v=m?"top":"left",b=m?"bottom":"right",x=m?"clientHeight":"clientWidth",T=i.reference[g]+i.reference[h]-f[h]-i.floating[g],E=f[h]-i.reference[h],I=await(s.getOffsetParent==null?void 0:s.getOffsetParent(c));let w=I?I[x]:0;(!w||!await(s.isElement==null?void 0:s.isElement(I)))&&(w=a.floating[x]||i.floating[g]);const C=T/2-E/2,A=w/2-y[g]/2-1,O=Ar(d[v],A),_=Ar(d[b],A),N=O,$=w-y[g]-_,D=w/2-y[g]/2+C,F=Uu(N,D,$),z=!l.arrow&&On(o)!=null&&D!==F&&i.reference[g]/2-(D<N?O:_)-y[g]/2<0,M=z?D<N?D-N:D-$:0;return{[h]:f[h]+M,data:{[h]:F,centerOffset:D-F-M,...z&&{alignmentOffset:M}},reset:z}}});function QA(e,t,n){return(e?[...n.filter(o=>On(o)===e),...n.filter(o=>On(o)!==e)]:n.filter(o=>Un(o)===o)).filter(o=>e?On(o)===e||(t?Fa(o)!==o:!1):!0)}const JA=function(e){return e===void 0&&(e={}),{name:"autoPlacement",options:e,async fn(t){var n,r,o;const{rects:i,middlewareData:s,placement:a,platform:l,elements:c}=t,{crossAxis:u=!1,alignment:d,allowedPlacements:f=dy,autoAlignment:h=!0,...g}=io(e,t),y=d!==void 0||f===dy?QA(d||null,h,f):f,m=await l.detectOverflow(t,g),v=((n=s.autoPlacement)==null?void 0:n.index)||0,b=y[v];if(b==null)return{};const x=py(b,i,await(l.isRTL==null?void 0:l.isRTL(c.floating)));if(a!==b)return{reset:{placement:y[0]}};const T=[m[Un(b)],m[x[0]],m[x[1]]],E=[...((r=s.autoPlacement)==null?void 0:r.overflows)||[],{placement:b,overflows:T}],I=y[v+1];if(I)return{data:{index:v+1,overflows:E},reset:{placement:I}};const w=E.map(O=>{const _=On(O.placement);return[O.placement,_&&u?O.overflows.slice(0,2).reduce((N,$)=>N+$,0):O.overflows[0],O.overflows]}).sort((O,_)=>O[1]-_[1]),A=((o=w.filter(O=>O[2].slice(0,On(O[0])?2:3).every(_=>_<=0))[0])==null?void 0:o[0])||w[0][0];return A!==a?{data:{index:v+1,overflows:E},reset:{placement:A}}:{}}}},eP=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:s,initialPlacement:a,platform:l,elements:c}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:y=!0,...m}=io(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const v=Un(o),b=mr(a),x=Un(a)===a,T=await(l.isRTL==null?void 0:l.isRTL(c.floating)),E=f||(x||!y?[La(a)]:dA(a)),I=g!=="none";!f&&I&&E.push(...mA(a,y,g,T));const w=[a,...E],C=await l.detectOverflow(t,m),A=[];let O=((r=i.flip)==null?void 0:r.overflows)||[];if(u&&A.push(C[v]),d){const D=py(o,s,T);A.push(C[D[0]],C[D[1]])}if(O=[...O,{placement:o,overflows:A}],!A.every(D=>D<=0)){var _,N;const D=(((_=i.flip)==null?void 0:_.index)||0)+1,F=w[D];if(F&&(!(d==="alignment"?b!==mr(F):!1)||O.every(k=>mr(k.placement)===b?k.overflows[0]>0:!0)))return{data:{index:D,overflows:O},reset:{placement:F}};let z=(N=O.filter(M=>M.overflows[0]<=0).sort((M,k)=>M.overflows[1]-k.overflows[1])[0])==null?void 0:N.placement;if(!z)switch(h){case"bestFit":{var $;const M=($=O.filter(k=>{if(I){const V=mr(k.placement);return V===b||V==="y"}return!0}).map(k=>[k.placement,k.overflows.filter(V=>V>0).reduce((V,L)=>V+L,0)]).sort((k,V)=>k[1]-V[1])[0])==null?void 0:$[0];M&&(z=M);break}case"initialPlacement":z=a;break}if(o!==z)return{reset:{placement:z}}}return{}}}},tP=new Set(["left","top"]);async function nP(e,t){const{placement:n,platform:r,elements:o}=e,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),s=Un(n),a=On(n),l=mr(n)==="y",c=tP.has(s)?-1:1,u=i&&l?-1:1,d=io(t,e);let{mainAxis:f,crossAxis:h,alignmentAxis:g}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return a&&typeof g=="number"&&(h=a==="end"?g*-1:g),l?{x:h*u,y:f*c}:{x:f*c,y:h*u}}const rP=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:s,middlewareData:a}=t,l=await nP(t,e);return s===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:o+l.x,y:i+l.y,data:{...l,placement:s}}}}},oP=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o,platform:i}=t,{mainAxis:s=!0,crossAxis:a=!1,limiter:l={fn:v=>{let{x:b,y:x}=v;return{x:b,y:x}}},...c}=io(e,t),u={x:n,y:r},d=await i.detectOverflow(t,c),f=mr(Un(o)),h=fy(f);let g=u[h],y=u[f];if(s){const v=h==="y"?"top":"left",b=h==="y"?"bottom":"right",x=g+d[v],T=g-d[b];g=Uu(x,g,T)}if(a){const v=f==="y"?"top":"left",b=f==="y"?"bottom":"right",x=y+d[v],T=y-d[b];y=Uu(x,y,T)}const m=l.fn({...t,[h]:g,[f]:y});return{...m,data:{x:m.x-n,y:m.y-r,enabled:{[h]:s,[f]:a}}}}}},iP=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:i,platform:s,elements:a}=t,{apply:l=()=>{},...c}=io(e,t),u=await s.detectOverflow(t,c),d=Un(o),f=On(o),h=mr(o)==="y",{width:g,height:y}=i.floating;let m,v;d==="top"||d==="bottom"?(m=d,v=f===(await(s.isRTL==null?void 0:s.isRTL(a.floating))?"start":"end")?"left":"right"):(v=d,m=f==="end"?"top":"bottom");const b=y-u.top-u.bottom,x=g-u.left-u.right,T=Ar(y-u[m],b),E=Ar(g-u[v],x),I=!t.middlewareData.shift;let w=T,C=E;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(C=x),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(w=b),I&&!f){const O=fn(u.left,0),_=fn(u.right,0),N=fn(u.top,0),$=fn(u.bottom,0);h?C=g-2*(O!==0||_!==0?O+_:fn(u.left,u.right)):w=y-2*(N!==0||$!==0?N+$:fn(u.top,u.bottom))}await l({...t,availableWidth:C,availableHeight:w});const A=await s.getDimensions(a.floating);return g!==A.width||y!==A.height?{reset:{rects:!0}}:{}}}};function $y(e){const t=dn(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Pt(e),i=o?e.offsetWidth:n,s=o?e.offsetHeight:r,a=_a(n)!==i||_a(r)!==s;return a&&(n=i,r=s),{width:n,height:r,$:a}}function id(e){return tt(e)?e:e.contextElement}function Uo(e){const t=id(e);if(!Pt(t))return qn(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=$y(t);let s=(i?_a(n.width):n.width)/r,a=(i?_a(n.height):n.height)/o;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}const sP=qn(0);function zy(e){const t=Wt(e);return!Na()||!t.visualViewport?sP:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function aP(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Wt(e)?!1:t}function ao(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),i=id(e);let s=qn(1);t&&(r?tt(r)&&(s=Uo(r)):s=Uo(e));const a=aP(i,n,r)?zy(i):qn(0);let l=(o.left+a.x)/s.x,c=(o.top+a.y)/s.y,u=o.width/s.x,d=o.height/s.y;if(i){const f=Wt(i),h=r&&tt(r)?Wt(r):r;let g=f,y=qu(g);for(;y&&r&&h!==g;){const m=Uo(y),v=y.getBoundingClientRect(),b=dn(y),x=v.left+(y.clientLeft+parseFloat(b.paddingLeft))*m.x,T=v.top+(y.clientTop+parseFloat(b.paddingTop))*m.y;l*=m.x,c*=m.y,u*=m.x,d*=m.y,l+=x,c+=T,g=Wt(y),y=qu(g)}}return Va({width:u,height:d,x:l,y:c})}function qa(e,t){const n=Ma(e).scrollLeft;return t?t.left+n:ao(Wn(e)).left+n}function jy(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-qa(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function lP(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i=o==="fixed",s=Wn(r),a=t?Da(t.floating):!1;if(r===s||a&&i)return n;let l={scrollLeft:0,scrollTop:0},c=qn(1);const u=qn(0),d=Pt(r);if((d||!d&&!i)&&((kr(r)!=="body"||Ji(s))&&(l=Ma(r)),Pt(r))){const h=ao(r);c=Uo(r),u.x=h.x+r.clientLeft,u.y=h.y+r.clientTop}const f=s&&!d&&!i?jy(s,l):qn(0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x+f.x,y:n.y*c.y-l.scrollTop*c.y+u.y+f.y}}function cP(e){return Array.from(e.getClientRects())}function uP(e){const t=Wn(e),n=Ma(e),r=e.ownerDocument.body,o=fn(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=fn(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+qa(e);const a=-n.scrollTop;return dn(r).direction==="rtl"&&(s+=fn(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:s,y:a}}const By=25;function dP(e,t){const n=Wt(e),r=Wn(e),o=n.visualViewport;let i=r.clientWidth,s=r.clientHeight,a=0,l=0;if(o){i=o.width,s=o.height;const u=Na();(!u||u&&t==="fixed")&&(a=o.offsetLeft,l=o.offsetTop)}const c=qa(r);if(c<=0){const u=r.ownerDocument,d=u.body,f=getComputedStyle(d),h=u.compatMode==="CSS1Compat"&&parseFloat(f.marginLeft)+parseFloat(f.marginRight)||0,g=Math.abs(r.clientWidth-d.clientWidth-h);g<=By&&(i-=g)}else c<=By&&(i+=c);return{width:i,height:s,x:a,y:l}}const fP=new Set(["absolute","fixed"]);function pP(e,t){const n=ao(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=Pt(e)?Uo(e):qn(1),s=e.clientWidth*i.x,a=e.clientHeight*i.y,l=o*i.x,c=r*i.y;return{width:s,height:a,x:l,y:c}}function Ry(e,t,n){let r;if(t==="viewport")r=dP(e,n);else if(t==="document")r=uP(Wn(e));else if(tt(t))r=pP(t,n);else{const o=zy(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return Va(r)}function Hy(e,t){const n=hr(e);return n===t||!tt(n)||pr(n)?!1:dn(n).position==="fixed"||Hy(n,t)}function hP(e,t){const n=t.get(e);if(n)return n;let r=Ir(e,[],!1).filter(a=>tt(a)&&kr(a)!=="body"),o=null;const i=dn(e).position==="fixed";let s=i?hr(e):e;for(;tt(s)&&!pr(s);){const a=dn(s),l=Wu(s);!l&&a.position==="fixed"&&(o=null),(i?!l&&!o:!l&&a.position==="static"&&!!o&&fP.has(o.position)||Ji(s)&&!l&&Hy(e,s))?r=r.filter(u=>u!==s):o=a,s=hr(s)}return t.set(e,r),r}function mP(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const s=[...n==="clippingAncestors"?Da(t)?[]:hP(t,this._c):[].concat(n),r],a=s[0],l=s.reduce((c,u)=>{const d=Ry(t,u,o);return c.top=fn(d.top,c.top),c.right=Ar(d.right,c.right),c.bottom=Ar(d.bottom,c.bottom),c.left=fn(d.left,c.left),c},Ry(t,a,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function gP(e){const{width:t,height:n}=$y(e);return{width:t,height:n}}function yP(e,t,n){const r=Pt(t),o=Wn(t),i=n==="fixed",s=ao(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const l=qn(0);function c(){l.x=qa(o)}if(r||!r&&!i)if((kr(t)!=="body"||Ji(o))&&(a=Ma(t)),r){const h=ao(t,!0,i,t);l.x=h.x+t.clientLeft,l.y=h.y+t.clientTop}else o&&c();i&&!r&&o&&c();const u=o&&!r&&!i?jy(o,a):qn(0),d=s.left+a.scrollLeft-l.x-u.x,f=s.top+a.scrollTop-l.y-u.y;return{x:d,y:f,width:s.width,height:s.height}}function sd(e){return dn(e).position==="static"}function Wy(e,t){if(!Pt(e)||dn(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Wn(e)===n&&(n=n.ownerDocument.body),n}function qy(e,t){const n=Wt(e);if(Da(e))return n;if(!Pt(e)){let o=hr(e);for(;o&&!pr(o);){if(tt(o)&&!sd(o))return o;o=hr(o)}return n}let r=Wy(e,t);for(;r&&eA(r)&&sd(r);)r=Wy(r,t);return r&&pr(r)&&sd(r)&&!Wu(r)?n:r||iA(e)||n}const vP=async function(e){const t=this.getOffsetParent||qy,n=this.getDimensions,r=await n(e.floating);return{reference:yP(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function bP(e){return dn(e).direction==="rtl"}const xP={convertOffsetParentRelativeRectToViewportRelativeRect:lP,getDocumentElement:Wn,getClippingRect:mP,getOffsetParent:qy,getElementRects:vP,getClientRects:cP,getDimensions:gP,getScale:Uo,isElement:tt,isRTL:bP};function Uy(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function wP(e,t){let n=null,r;const o=Wn(e);function i(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function s(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),i();const c=e.getBoundingClientRect(),{left:u,top:d,width:f,height:h}=c;if(a||t(),!f||!h)return;const g=Ro(d),y=Ro(o.clientWidth-(u+f)),m=Ro(o.clientHeight-(d+h)),v=Ro(u),x={rootMargin:-g+"px "+-y+"px "+-m+"px "+-v+"px",threshold:fn(0,Ar(1,l))||1};let T=!0;function E(I){const w=I[0].intersectionRatio;if(w!==l){if(!T)return s();w?s(!1,w):r=setTimeout(()=>{s(!1,1e-7)},1e3)}w===1&&!Uy(c,e.getBoundingClientRect())&&s(),T=!1}try{n=new IntersectionObserver(E,{...x,root:o.ownerDocument})}catch{n=new IntersectionObserver(E,x)}n.observe(e)}return s(!0),i}function lo(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,c=id(e),u=o||i?[...c?Ir(c):[],...Ir(t)]:[];u.forEach(v=>{o&&v.addEventListener("scroll",n,{passive:!0}),i&&v.addEventListener("resize",n)});const d=c&&a?wP(c,n):null;let f=-1,h=null;s&&(h=new ResizeObserver(v=>{let[b]=v;b&&b.target===c&&h&&(h.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var x;(x=h)==null||x.observe(t)})),n()}),c&&!l&&h.observe(c),h.observe(t));let g,y=l?ao(e):null;l&&m();function m(){const v=ao(e);y&&!Uy(y,v)&&n(),y=v,g=requestAnimationFrame(m)}return n(),()=>{var v;u.forEach(b=>{o&&b.removeEventListener("scroll",n),i&&b.removeEventListener("resize",n)}),d?.(),(v=h)==null||v.disconnect(),h=null,l&&cancelAnimationFrame(g)}}const SP=rP,TP=JA,EP=oP,CP=eP,kP=iP,Gy=XA,IP=(e,t,n)=>{const r=new Map,o={platform:xP,...n},i={...o.platform,_c:r};return ZA(e,t,{...o,platform:i})};var AP=typeof document<"u",PP=function(){},Ua=AP?S.useLayoutEffect:PP;function Ga(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!Ga(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const i=o[r];if(!(i==="_owner"&&e.$$typeof)&&!Ga(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function Yy(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Ky(e,t){const n=Yy(e);return Math.round(t*n)/n}function ad(e){const t=P.useRef(e);return Ua(()=>{t.current=e}),t}function OP(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:s}={},transform:a=!0,whileElementsMounted:l,open:c}=e,[u,d]=P.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,h]=P.useState(r);Ga(f,r)||h(r);const[g,y]=P.useState(null),[m,v]=P.useState(null),b=P.useCallback(k=>{k!==I.current&&(I.current=k,y(k))},[]),x=P.useCallback(k=>{k!==w.current&&(w.current=k,v(k))},[]),T=i||g,E=s||m,I=P.useRef(null),w=P.useRef(null),C=P.useRef(u),A=l!=null,O=ad(l),_=ad(o),N=ad(c),$=P.useCallback(()=>{if(!I.current||!w.current)return;const k={placement:t,strategy:n,middleware:f};_.current&&(k.platform=_.current),IP(I.current,w.current,k).then(V=>{const L={...V,isPositioned:N.current!==!1};D.current&&!Ga(C.current,L)&&(C.current=L,ur.flushSync(()=>{d(L)}))})},[f,t,n,_,N]);Ua(()=>{c===!1&&C.current.isPositioned&&(C.current.isPositioned=!1,d(k=>({...k,isPositioned:!1})))},[c]);const D=P.useRef(!1);Ua(()=>(D.current=!0,()=>{D.current=!1}),[]),Ua(()=>{if(T&&(I.current=T),E&&(w.current=E),T&&E){if(O.current)return O.current(T,E,$);$()}},[T,E,$,O,A]);const F=P.useMemo(()=>({reference:I,floating:w,setReference:b,setFloating:x}),[b,x]),z=P.useMemo(()=>({reference:T,floating:E}),[T,E]),M=P.useMemo(()=>{const k={position:n,left:0,top:0};if(!z.floating)return k;const V=Ky(z.floating,u.x),L=Ky(z.floating,u.y);return a?{...k,transform:"translate("+V+"px, "+L+"px)",...Yy(z.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:V,top:L}},[n,a,z.floating,u.x,u.y]);return P.useMemo(()=>({...u,update:$,refs:F,elements:z,floatingStyles:M}),[u,$,F,z,M])}const DP=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:o}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?Gy({element:r.current,padding:o}).fn(n):{}:r?Gy({element:r,padding:o}).fn(n):{}}}},Go=(e,t)=>({...SP(e),options:[e,t]}),Ya=(e,t)=>({...EP(e),options:[e,t]}),Ka=(e,t)=>({...CP(e),options:[e,t]}),Zy=(e,t)=>({...kP(e),options:[e,t]}),Xy=(e,t)=>({...TP(e),options:[e,t]}),ld=(e,t)=>({...DP(e),options:[e,t]});function NP(e,t){const n=e.compareDocumentPosition(t);return n&Node.DOCUMENT_POSITION_FOLLOWING||n&Node.DOCUMENT_POSITION_CONTAINED_BY?-1:n&Node.DOCUMENT_POSITION_PRECEDING||n&Node.DOCUMENT_POSITION_CONTAINS?1:0}const Qy=P.createContext({register:()=>{},unregister:()=>{},map:new Map,elementsRef:{current:[]}});function MP(e){const{children:t,elementsRef:n,labelsRef:r}=e,[o,i]=P.useState(()=>new Set),s=P.useCallback(c=>{i(u=>new Set(u).add(c))},[]),a=P.useCallback(c=>{i(u=>{const d=new Set(u);return d.delete(c),d})},[]),l=P.useMemo(()=>{const c=new Map;return Array.from(o.keys()).sort(NP).forEach((d,f)=>{c.set(d,f)}),c},[o]);return p.jsx(Qy.Provider,{value:P.useMemo(()=>({register:s,unregister:a,map:l,elementsRef:n,labelsRef:r}),[s,a,l,n,r]),children:t})}function Jy(e){e===void 0&&(e={});const{label:t}=e,{register:n,unregister:r,map:o,elementsRef:i,labelsRef:s}=P.useContext(Qy),[a,l]=P.useState(null),c=P.useRef(null),u=P.useCallback(d=>{if(c.current=d,a!==null&&(i.current[a]=d,s)){var f;const h=t!==void 0;s.current[a]=h?t:(f=d?.textContent)!=null?f:null}},[a,i,s,t]);return nt(()=>{const d=c.current;if(d)return n(d),()=>{r(d)}},[n,r]),nt(()=>{const d=c.current?o.get(c.current):null;d!=null&&l(d)},[o]),P.useMemo(()=>({ref:u,index:a??-1}),[a,u])}const _P="data-floating-ui-focusable",ev="active",tv="selected",rs="ArrowLeft",os="ArrowRight",nv="ArrowUp",Za="ArrowDown",FP={...P};let rv=!1,LP=0;const ov=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+LP++;function VP(){const[e,t]=P.useState(()=>rv?ov():void 0);return nt(()=>{e==null&&t(ov())},[]),P.useEffect(()=>{rv=!0},[]),e}const is=FP.useId||VP;let ss;process.env.NODE_ENV!=="production"&&(ss=new Set);function Xa(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];const o="Floating UI: "+n.join(" ");if(!((e=ss)!=null&&e.has(o))){var i;(i=ss)==null||i.add(o),console.warn(o)}}function $P(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];const o="Floating UI: "+n.join(" ");if(!((e=ss)!=null&&e.has(o))){var i;(i=ss)==null||i.add(o),console.error(o)}}const cd=P.forwardRef(function(t,n){const{context:{placement:r,elements:{floating:o},middlewareData:{arrow:i,shift:s}},width:a=14,height:l=7,tipRadius:c=0,strokeWidth:u=0,staticOffset:d,stroke:f,d:h,style:{transform:g,...y}={},...m}=t;process.env.NODE_ENV!=="production"&&(n||Xa("The `ref` prop is required for `FloatingArrow`."));const v=is(),[b,x]=P.useState(!1);if(nt(()=>{if(!o)return;dn(o).direction==="rtl"&&x(!0)},[o]),!o)return null;const[T,E]=r.split("-"),I=T==="top"||T==="bottom";let w=d;(I&&s!=null&&s.x||!I&&s!=null&&s.y)&&(w=null);const C=u*2,A=C/2,O=a/2*(c/-8+1),_=l/2*c/4,N=!!h,$=w&&E==="end"?"bottom":"top";let D=w&&E==="end"?"right":"left";w&&b&&(D=E==="end"?"left":"right");const F=i?.x!=null?w||i.x:"",z=i?.y!=null?w||i.y:"",M=h||"M0,0"+(" H"+a)+(" L"+(a-O)+","+(l-_))+(" Q"+a/2+","+l+" "+O+","+(l-_))+" Z",k={top:N?"rotate(180deg)":"",left:N?"rotate(90deg)":"rotate(-90deg)",bottom:N?"":"rotate(180deg)",right:N?"rotate(-90deg)":"rotate(90deg)"}[T];return p.jsxs("svg",{...m,"aria-hidden":!0,ref:n,width:N?a:a+C,height:a,viewBox:"0 0 "+a+" "+(l>a?l:a),style:{position:"absolute",pointerEvents:"none",[D]:F,[$]:z,[T]:I||N?"100%":"calc(100% - "+C/2+"px)",transform:[k,g].filter(V=>!!V).join(" "),...y},children:[C>0&&p.jsx("path",{clipPath:"url(#"+v+")",fill:"none",stroke:f,strokeWidth:C+(h?0:1),d:M}),p.jsx("path",{stroke:C&&!h?m.fill:"none",d:M}),p.jsx("clipPath",{id:v,children:p.jsx("rect",{x:-A,y:A*(N?-1:1),width:a+C,height:a})})]})});function iv(){const e=new Map;return{emit(t,n){var r;(r=e.get(t))==null||r.forEach(o=>o(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){var r;(r=e.get(t))==null||r.delete(n)}}}const sv=P.createContext(null),av=P.createContext(null),Pr=()=>{var e;return((e=P.useContext(sv))==null?void 0:e.id)||null},Or=()=>P.useContext(av);function zP(e){const t=is(),n=Or(),o=Pr();return nt(()=>{if(!t)return;const i={id:t,parentId:o};return n?.addNode(i),()=>{n?.removeNode(i)}},[n,t,o]),t}function jP(e){const{children:t,id:n}=e,r=Pr();return p.jsx(sv.Provider,{value:P.useMemo(()=>({id:n,parentId:r}),[n,r]),children:t})}function BP(e){const{children:t}=e,n=P.useRef([]),r=P.useCallback(s=>{n.current=[...n.current,s]},[]),o=P.useCallback(s=>{n.current=n.current.filter(a=>a!==s)},[]),[i]=P.useState(()=>iv());return p.jsx(av.Provider,{value:P.useMemo(()=>({nodesRef:n,addNode:r,removeNode:o,events:i}),[r,o,i]),children:t})}function co(e){return"data-floating-ui-"+e}function Gt(e){e.current!==-1&&(clearTimeout(e.current),e.current=-1)}const lv=co("safe-polygon");function ud(e,t,n){if(n&&!qo(n))return 0;if(typeof e=="number")return e;if(typeof e=="function"){const r=e();return typeof r=="number"?r:r?.[t]}return e?.[t]}function dd(e){return typeof e=="function"?e():e}function fd(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,dataRef:o,events:i,elements:s}=e,{enabled:a=!0,delay:l=0,handleClose:c=null,mouseOnly:u=!1,restMs:d=0,move:f=!0}=t,h=Or(),g=Pr(),y=Ht(c),m=Ht(l),v=Ht(n),b=Ht(d),x=P.useRef(),T=P.useRef(-1),E=P.useRef(),I=P.useRef(-1),w=P.useRef(!0),C=P.useRef(!1),A=P.useRef(()=>{}),O=P.useRef(!1),_=kt(()=>{var M;const k=(M=o.current.openEvent)==null?void 0:M.type;return k?.includes("mouse")&&k!=="mousedown"});P.useEffect(()=>{if(!a)return;function M(k){let{open:V}=k;V||(Gt(T),Gt(I),w.current=!0,O.current=!1)}return i.on("openchange",M),()=>{i.off("openchange",M)}},[a,i]),P.useEffect(()=>{if(!a||!y.current||!n)return;function M(V){_()&&r(!1,V,"hover")}const k=qt(s.floating).documentElement;return k.addEventListener("mouseleave",M),()=>{k.removeEventListener("mouseleave",M)}},[s.floating,n,r,a,y,_]);const N=P.useCallback(function(M,k,V){k===void 0&&(k=!0),V===void 0&&(V="hover");const L=ud(m.current,"close",x.current);L&&!E.current?(Gt(T),T.current=window.setTimeout(()=>r(!1,M,V),L)):k&&(Gt(T),r(!1,M,V))},[m,r]),$=kt(()=>{A.current(),E.current=void 0}),D=kt(()=>{if(C.current){const M=qt(s.floating).body;M.style.pointerEvents="",M.removeAttribute(lv),C.current=!1}}),F=kt(()=>o.current.openEvent?["click","mousedown"].includes(o.current.openEvent.type):!1);P.useEffect(()=>{if(!a)return;function M(U){if(Gt(T),w.current=!1,u&&!qo(x.current)||dd(b.current)>0&&!ud(m.current,"open"))return;const G=ud(m.current,"open",x.current);G?T.current=window.setTimeout(()=>{v.current||r(!0,U,"hover")},G):n||r(!0,U,"hover")}function k(U){if(F()){D();return}A.current();const G=qt(s.floating);if(Gt(I),O.current=!1,y.current&&o.current.floatingContext){n||Gt(T),E.current=y.current({...o.current.floatingContext,tree:h,x:U.clientX,y:U.clientY,onClose(){D(),$(),F()||N(U,!0,"safe-polygon")}});const ee=E.current;G.addEventListener("mousemove",ee),A.current=()=>{G.removeEventListener("mousemove",ee)};return}(x.current!=="touch"||!Rt(s.floating,U.relatedTarget))&&N(U)}function V(U){F()||o.current.floatingContext&&(y.current==null||y.current({...o.current.floatingContext,tree:h,x:U.clientX,y:U.clientY,onClose(){D(),$(),F()||N(U)}})(U))}function L(){Gt(T)}function R(U){F()||N(U,!1)}if(tt(s.domReference)){const U=s.domReference,G=s.floating;return n&&U.addEventListener("mouseleave",V),f&&U.addEventListener("mousemove",M,{once:!0}),U.addEventListener("mouseenter",M),U.addEventListener("mouseleave",k),G&&(G.addEventListener("mouseleave",V),G.addEventListener("mouseenter",L),G.addEventListener("mouseleave",R)),()=>{n&&U.removeEventListener("mouseleave",V),f&&U.removeEventListener("mousemove",M),U.removeEventListener("mouseenter",M),U.removeEventListener("mouseleave",k),G&&(G.removeEventListener("mouseleave",V),G.removeEventListener("mouseenter",L),G.removeEventListener("mouseleave",R))}}},[s,a,e,u,f,N,$,D,r,n,v,h,m,y,o,F,b]),nt(()=>{var M;if(a&&n&&(M=y.current)!=null&&(M=M.__options)!=null&&M.blockPointerEvents&&_()){C.current=!0;const V=s.floating;if(tt(s.domReference)&&V){var k;const L=qt(s.floating).body;L.setAttribute(lv,"");const R=s.domReference,U=h==null||(k=h.nodesRef.current.find(G=>G.id===g))==null||(k=k.context)==null?void 0:k.elements.floating;return U&&(U.style.pointerEvents=""),L.style.pointerEvents="none",R.style.pointerEvents="auto",V.style.pointerEvents="auto",()=>{L.style.pointerEvents="",R.style.pointerEvents="",V.style.pointerEvents=""}}}},[a,n,g,s,h,y,_]),nt(()=>{n||(x.current=void 0,O.current=!1,$(),D())},[n,$,D]),P.useEffect(()=>()=>{$(),Gt(T),Gt(I),D()},[a,s.domReference,$,D]);const z=P.useMemo(()=>{function M(k){x.current=k.pointerType}return{onPointerDown:M,onPointerEnter:M,onMouseMove(k){const{nativeEvent:V}=k;function L(){!w.current&&!v.current&&r(!0,V,"hover")}u&&!qo(x.current)||n||dd(b.current)===0||O.current&&k.movementX**2+k.movementY**2<2||(Gt(I),x.current==="touch"?L():(O.current=!0,I.current=window.setTimeout(L,dd(b.current))))}}},[u,r,n,v,b]);return P.useMemo(()=>a?{reference:z}:{},[a,z])}let cv=0;function uo(e,t){t===void 0&&(t={});const{preventScroll:n=!1,cancelPrevious:r=!0,sync:o=!1}=t;r&&cancelAnimationFrame(cv);const i=()=>e?.focus({preventScroll:n});o?i():cv=requestAnimationFrame(i)}function pd(e,t){if(!e||!t)return!1;const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&Qi(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function RP(e){return"composedPath"in e?e.composedPath()[0]:e.target}function HP(e){return e?.ownerDocument||document}const Yo={inert:new WeakMap,"aria-hidden":new WeakMap,none:new WeakMap};function uv(e){return e==="inert"?Yo.inert:e==="aria-hidden"?Yo["aria-hidden"]:Yo.none}let Qa=new WeakSet,Ja={},hd=0;const WP=()=>typeof HTMLElement<"u"&&"inert"in HTMLElement.prototype,dv=e=>e&&(e.host||dv(e.parentNode)),qP=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=dv(n);return e.contains(r)?r:null}).filter(n=>n!=null);function UP(e,t,n,r){const o="data-floating-ui-inert",i=r?"inert":n?"aria-hidden":null,s=qP(t,e),a=new Set,l=new Set(s),c=[];Ja[o]||(Ja[o]=new WeakMap);const u=Ja[o];s.forEach(d),f(t),a.clear();function d(h){!h||a.has(h)||(a.add(h),h.parentNode&&d(h.parentNode))}function f(h){!h||l.has(h)||[].forEach.call(h.children,g=>{if(kr(g)!=="script")if(a.has(g))f(g);else{const y=i?g.getAttribute(i):null,m=y!==null&&y!=="false",v=uv(i),b=(v.get(g)||0)+1,x=(u.get(g)||0)+1;v.set(g,b),u.set(g,x),c.push(g),b===1&&m&&Qa.add(g),x===1&&g.setAttribute(o,""),!m&&i&&g.setAttribute(i,i==="inert"?"":"true")}})}return hd++,()=>{c.forEach(h=>{const g=uv(i),m=(g.get(h)||0)-1,v=(u.get(h)||0)-1;g.set(h,m),u.set(h,v),m||(!Qa.has(h)&&i&&h.removeAttribute(i),Qa.delete(h)),v||h.removeAttribute(o)}),hd--,hd||(Yo.inert=new WeakMap,Yo["aria-hidden"]=new WeakMap,Yo.none=new WeakMap,Qa=new WeakSet,Ja={})}}function fv(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=HP(e[0]).body;return UP(e.concat(Array.from(r.querySelectorAll('[aria-live],[role="status"],output'))),r,t,n)}const md={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"fixed",whiteSpace:"nowrap",width:"1px",top:0,left:0},el=P.forwardRef(function(t,n){const[r,o]=P.useState();nt(()=>{ky()&&o("button")},[]);const i={ref:n,tabIndex:0,role:r,"aria-hidden":r?void 0:!0,[co("focus-guard")]:"",style:md};return p.jsx("span",{...t,...i})}),GP={clipPath:"inset(50%)",position:"fixed",top:0,left:0},pv=P.createContext(null),hv=co("portal");function YP(e){e===void 0&&(e={});const{id:t,root:n}=e,r=is(),o=mv(),[i,s]=P.useState(null),a=P.useRef(null);return nt(()=>()=>{i?.remove(),queueMicrotask(()=>{a.current=null})},[i]),nt(()=>{if(!r||a.current)return;const l=t?document.getElementById(t):null;if(!l)return;const c=document.createElement("div");c.id=r,c.setAttribute(hv,""),l.appendChild(c),a.current=c,s(c)},[t,r]),nt(()=>{if(n===null||!r||a.current)return;let l=n||o?.portalNode;l&&!Oa(l)&&(l=l.current),l=l||document.body;let c=null;t&&(c=document.createElement("div"),c.id=t,l.appendChild(c));const u=document.createElement("div");u.id=r,u.setAttribute(hv,""),l=c||l,l.appendChild(u),a.current=u,s(u)},[t,n,r,o]),i}function gr(e){const{children:t,id:n,root:r,preserveTabOrder:o=!0}=e,i=YP({id:n,root:r}),[s,a]=P.useState(null),l=P.useRef(null),c=P.useRef(null),u=P.useRef(null),d=P.useRef(null),f=s?.modal,h=s?.open,g=!!s&&!s.modal&&s.open&&o&&!!(r||i);return P.useEffect(()=>{if(!i||!o||f)return;function y(m){i&&ns(m)&&(m.type==="focusin"?Ly:YA)(i)}return i.addEventListener("focusin",y,!0),i.addEventListener("focusout",y,!0),()=>{i.removeEventListener("focusin",y,!0),i.removeEventListener("focusout",y,!0)}},[i,o,f]),P.useEffect(()=>{i&&(h||Ly(i))},[h,i]),p.jsxs(pv.Provider,{value:P.useMemo(()=>({preserveTabOrder:o,beforeOutsideRef:l,afterOutsideRef:c,beforeInsideRef:u,afterInsideRef:d,portalNode:i,setFocusManagerState:a}),[o,i]),children:[g&&i&&p.jsx(el,{"data-type":"outside",ref:l,onFocus:y=>{if(ns(y,i)){var m;(m=u.current)==null||m.focus()}else{const v=s?s.domReference:null,b=Fy(v);b?.focus()}}}),g&&i&&p.jsx("span",{"aria-owns":i.id,style:GP}),i&&ur.createPortal(t,i),g&&i&&p.jsx(el,{"data-type":"outside",ref:c,onFocus:y=>{if(ns(y,i)){var m;(m=d.current)==null||m.focus()}else{const v=s?s.domReference:null,b=_y(v);b?.focus(),s?.closeOnFocusOut&&s?.onOpenChange(!1,y.nativeEvent,"focus-out")}}})]})}const mv=()=>P.useContext(pv);function gv(e){return P.useMemo(()=>t=>{e.forEach(n=>{n&&(n.current=t)})},e)}const KP=20;let Dr=[];function gd(){Dr=Dr.filter(e=>{var t;return(t=e.deref())==null?void 0:t.isConnected})}function ZP(e){gd(),e&&kr(e)!=="body"&&(Dr.push(new WeakRef(e)),Dr.length>KP&&(Dr=Dr.slice(-20)))}function yv(){gd();const e=Dr[Dr.length-1];return e?.deref()}function XP(e){const t=ts();return Ey(e,t)?e:Wo(e,t)[0]||e}function vv(e,t){var n;if(!t.current.includes("floating")&&!((n=e.getAttribute("role"))!=null&&n.includes("dialog")))return;const r=ts(),i=DA(e,r).filter(a=>{const l=a.getAttribute("data-tabindex")||"";return Ey(a,r)||a.hasAttribute("data-tabindex")&&!l.startsWith("-")}),s=e.getAttribute("tabindex");t.current.includes("floating")||i.length===0?s!=="0"&&e.setAttribute("tabindex","0"):(s!=="-1"||e.hasAttribute("data-tabindex")&&e.getAttribute("data-tabindex")!=="-1")&&(e.setAttribute("tabindex","-1"),e.setAttribute("data-tabindex","-1"))}const QP=P.forwardRef(function(t,n){return p.jsx("button",{...t,type:"button",ref:n,tabIndex:-1,style:md})});function fo(e){const{context:t,children:n,disabled:r=!1,order:o=["content"],guards:i=!0,initialFocus:s=0,returnFocus:a=!0,restoreFocus:l=!1,modal:c=!0,visuallyHiddenDismiss:u=!1,closeOnFocusOut:d=!0,outsideElementsInert:f=!1,getInsideElements:h=()=>[]}=e,{open:g,onOpenChange:y,events:m,dataRef:v,elements:{domReference:b,floating:x}}=t,T=kt(()=>{var B;return(B=v.current.floatingContext)==null?void 0:B.nodeId}),E=kt(h),I=typeof s=="number"&&s<0,w=rd(b)&&I,C=WP(),A=C?i:!0,O=!A||C&&f,_=Ht(o),N=Ht(s),$=Ht(a),D=Or(),F=mv(),z=P.useRef(null),M=P.useRef(null),k=P.useRef(!1),V=P.useRef(!1),L=P.useRef(-1),R=P.useRef(-1),U=F!=null,G=Ra(x),H=kt(function(B){return B===void 0&&(B=G),B?Wo(B,ts()):[]}),ee=kt(B=>{const ae=H(B);return _.current.map(ce=>b&&ce==="reference"?b:G&&ce==="floating"?G:ae).filter(Boolean).flat()});P.useEffect(()=>{if(r||!c)return;function B(ce){if(ce.key==="Tab"){Rt(G,Gn(qt(G)))&&H().length===0&&!w&&Ut(ce);const Q=ee(),ue=Yn(ce);_.current[0]==="reference"&&ue===b&&(Ut(ce),ce.shiftKey?uo(Q[Q.length-1]):uo(Q[1])),_.current[1]==="floating"&&ue===G&&ce.shiftKey&&(Ut(ce),uo(Q[0]))}}const ae=qt(G);return ae.addEventListener("keydown",B),()=>{ae.removeEventListener("keydown",B)}},[r,b,G,c,_,w,H,ee]),P.useEffect(()=>{if(r||!x)return;function B(ae){const ce=Yn(ae),ue=H().indexOf(ce);ue!==-1&&(L.current=ue)}return x.addEventListener("focusin",B),()=>{x.removeEventListener("focusin",B)}},[r,x,H]),P.useEffect(()=>{if(r||!d)return;function B(){V.current=!0,setTimeout(()=>{V.current=!1})}function ae(ue){const oe=ue.relatedTarget,he=ue.currentTarget,ie=Yn(ue);queueMicrotask(()=>{const le=T(),be=!(Rt(b,oe)||Rt(x,oe)||Rt(oe,x)||Rt(F?.portalNode,oe)||oe!=null&&oe.hasAttribute(co("focus-guard"))||D&&(so(D.nodesRef.current,le).find(de=>{var re,J;return Rt((re=de.context)==null?void 0:re.elements.floating,oe)||Rt((J=de.context)==null?void 0:J.elements.domReference,oe)})||Py(D.nodesRef.current,le).find(de=>{var re,J,j;return[(re=de.context)==null?void 0:re.elements.floating,Ra((J=de.context)==null?void 0:J.elements.floating)].includes(oe)||((j=de.context)==null?void 0:j.elements.domReference)===oe})));if(he===b&&G&&vv(G,_),l&&he!==b&&!(ie!=null&&ie.isConnected)&&Gn(qt(G))===qt(G).body){Pt(G)&&G.focus();const de=L.current,re=H(),J=re[de]||re[re.length-1]||G;Pt(J)&&J.focus()}if(v.current.insideReactTree){v.current.insideReactTree=!1;return}(w||!c)&&oe&&be&&!V.current&&oe!==yv()&&(k.current=!0,y(!1,ue,"focus-out"))})}const ce=!!(!D&&F);function Q(){Gt(R),v.current.insideReactTree=!0,R.current=window.setTimeout(()=>{v.current.insideReactTree=!1})}if(x&&Pt(b))return b.addEventListener("focusout",ae),b.addEventListener("pointerdown",B),x.addEventListener("focusout",ae),ce&&x.addEventListener("focusout",Q,!0),()=>{b.removeEventListener("focusout",ae),b.removeEventListener("pointerdown",B),x.removeEventListener("focusout",ae),ce&&x.removeEventListener("focusout",Q,!0)}},[r,b,x,G,c,D,F,y,d,l,H,w,T,_,v]);const se=P.useRef(null),te=P.useRef(null),q=gv([se,F?.beforeInsideRef]),Y=gv([te,F?.afterInsideRef]);P.useEffect(()=>{var B,ae;if(r||!x)return;const ce=Array.from((F==null||(B=F.portalNode)==null?void 0:B.querySelectorAll("["+co("portal")+"]"))||[]),ue=(ae=(D?Py(D.nodesRef.current,T()):[]).find(ie=>{var le;return rd(((le=ie.context)==null?void 0:le.elements.domReference)||null)}))==null||(ae=ae.context)==null?void 0:ae.elements.domReference,oe=[x,ue,...ce,...E(),z.current,M.current,se.current,te.current,F?.beforeOutsideRef.current,F?.afterOutsideRef.current,_.current.includes("reference")||w?b:null].filter(ie=>ie!=null),he=c||w?fv(oe,!O,O):fv(oe);return()=>{he()}},[r,b,x,c,_,F,w,A,O,D,T,E]),nt(()=>{if(r||!Pt(G))return;const B=qt(G),ae=Gn(B);queueMicrotask(()=>{const ce=ee(G),Q=N.current,ue=(typeof Q=="number"?ce[Q]:Q.current)||G,oe=Rt(G,ae);!I&&!oe&&g&&uo(ue,{preventScroll:ue===G})})},[r,g,G,I,ee,N]),nt(()=>{if(r||!G)return;const B=qt(G),ae=Gn(B);ZP(ae);function ce(oe){let{reason:he,event:ie,nested:le}=oe;if(["hover","safe-polygon"].includes(he)&&ie.type==="mouseleave"&&(k.current=!0),he==="outside-press")if(le)k.current=!1;else if(Oy(ie)||Dy(ie))k.current=!1;else{let be=!1;document.createElement("div").focus({get preventScroll(){return be=!0,!1}}),be?k.current=!1:k.current=!0}}m.on("openchange",ce);const Q=B.createElement("span");Q.setAttribute("tabindex","-1"),Q.setAttribute("aria-hidden","true"),Object.assign(Q.style,md),U&&b&&b.insertAdjacentElement("afterend",Q);function ue(){if(typeof $.current=="boolean"){const oe=b||yv();return oe&&oe.isConnected?oe:Q}return $.current.current||Q}return()=>{m.off("openchange",ce);const oe=Gn(B),he=Rt(x,oe)||D&&so(D.nodesRef.current,T(),!1).some(le=>{var be;return Rt((be=le.context)==null?void 0:be.elements.floating,oe)}),ie=ue();queueMicrotask(()=>{const le=XP(ie);$.current&&!k.current&&Pt(le)&&(!(le!==oe&&oe!==B.body)||he)&&le.focus({preventScroll:!0}),Q.remove()})}},[r,x,G,$,v,m,D,U,b,T]),P.useEffect(()=>(queueMicrotask(()=>{k.current=!1}),()=>{queueMicrotask(gd)}),[r]),nt(()=>{if(!r&&F)return F.setFocusManagerState({modal:c,closeOnFocusOut:d,open:g,onOpenChange:y,domReference:b}),()=>{F.setFocusManagerState(null)}},[r,F,c,g,y,d,b]),nt(()=>{r||G&&vv(G,_)},[r,G,_]);function Z(B){return r||!u||!c?null:p.jsx(QP,{ref:B==="start"?z:M,onClick:ae=>y(!1,ae.nativeEvent),children:typeof u=="string"?u:"Dismiss"})}const pe=!r&&A&&(c?!w:!0)&&(U||c);return p.jsxs(p.Fragment,{children:[pe&&p.jsx(el,{"data-type":"inside",ref:q,onFocus:B=>{if(c){const ce=ee();uo(o[0]==="reference"?ce[0]:ce[ce.length-1])}else if(F!=null&&F.preserveTabOrder&&F.portalNode)if(k.current=!1,ns(B,F.portalNode)){const ce=_y(b);ce?.focus()}else{var ae;(ae=F.beforeOutsideRef.current)==null||ae.focus()}}}),!w&&Z("start"),n,Z("end"),pe&&p.jsx(el,{"data-type":"inside",ref:Y,onFocus:B=>{if(c)uo(ee()[0]);else if(F!=null&&F.preserveTabOrder&&F.portalNode)if(d&&(k.current=!0),ns(B,F.portalNode)){const ce=Fy(b);ce?.focus()}else{var ae;(ae=F.afterOutsideRef.current)==null||ae.focus()}}})]})}let tl=0;const bv="--floating-ui-scrollbar-width";function JP(){const e=Xu(),t=/iP(hone|ad|od)|iOS/.test(e)||e==="MacIntel"&&navigator.maxTouchPoints>1,n=document.body.style,o=Math.round(document.documentElement.getBoundingClientRect().left)+document.documentElement.scrollLeft?"paddingLeft":"paddingRight",i=window.innerWidth-document.documentElement.clientWidth,s=n.left?parseFloat(n.left):window.scrollX,a=n.top?parseFloat(n.top):window.scrollY;if(n.overflow="hidden",n.setProperty(bv,i+"px"),i&&(n[o]=i+"px"),t){var l,c;const u=((l=window.visualViewport)==null?void 0:l.offsetLeft)||0,d=((c=window.visualViewport)==null?void 0:c.offsetTop)||0;Object.assign(n,{position:"fixed",top:-(a-Math.floor(d))+"px",left:-(s-Math.floor(u))+"px",right:"0"})}return()=>{Object.assign(n,{overflow:"",[o]:""}),n.removeProperty(bv),t&&(Object.assign(n,{position:"",top:"",left:"",right:""}),window.scrollTo(s,a))}}let xv=()=>{};const yd=P.forwardRef(function(t,n){const{lockScroll:r=!1,...o}=t;return nt(()=>{if(r)return tl++,tl===1&&(xv=JP()),()=>{tl--,tl===0&&xv()}},[r]),p.jsx("div",{ref:n,...o,style:{position:"fixed",overflow:"auto",top:0,right:0,bottom:0,left:0,...o.style}})});function wv(e){return Pt(e.target)&&e.target.tagName==="BUTTON"}function eO(e){return Pt(e.target)&&e.target.tagName==="A"}function Sv(e){return nd(e)}function Ko(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,dataRef:o,elements:{domReference:i}}=e,{enabled:s=!0,event:a="click",toggle:l=!0,ignoreMouse:c=!1,keyboardHandlers:u=!0,stickIfOpen:d=!0}=t,f=P.useRef(),h=P.useRef(!1),g=P.useMemo(()=>({onPointerDown(y){f.current=y.pointerType},onMouseDown(y){const m=f.current;y.button===0&&a!=="click"&&(qo(m,!0)&&c||(n&&l&&(!(o.current.openEvent&&d)||o.current.openEvent.type==="mousedown")?r(!1,y.nativeEvent,"click"):(y.preventDefault(),r(!0,y.nativeEvent,"click"))))},onClick(y){const m=f.current;if(a==="mousedown"&&f.current){f.current=void 0;return}qo(m,!0)&&c||(n&&l&&(!(o.current.openEvent&&d)||o.current.openEvent.type==="click")?r(!1,y.nativeEvent,"click"):r(!0,y.nativeEvent,"click"))},onKeyDown(y){f.current=void 0,!(y.defaultPrevented||!u||wv(y))&&(y.key===" "&&!Sv(i)&&(y.preventDefault(),h.current=!0),!eO(y)&&y.key==="Enter"&&r(!(n&&l),y.nativeEvent,"click"))},onKeyUp(y){y.defaultPrevented||!u||wv(y)||Sv(i)||y.key===" "&&h.current&&(h.current=!1,r(!(n&&l),y.nativeEvent,"click"))}}),[o,i,a,c,u,r,n,d,l]);return P.useMemo(()=>s?{reference:g}:{},[s,g])}function tO(e,t){let n=null,r=null,o=!1;return{contextElement:e||void 0,getBoundingClientRect(){var i;const s=e?.getBoundingClientRect()||{width:0,height:0,x:0,y:0},a=t.axis==="x"||t.axis==="both",l=t.axis==="y"||t.axis==="both",c=["mouseenter","mousemove"].includes(((i=t.dataRef.current.openEvent)==null?void 0:i.type)||"")&&t.pointerType!=="touch";let u=s.width,d=s.height,f=s.x,h=s.y;return n==null&&t.x&&a&&(n=s.x-t.x),r==null&&t.y&&l&&(r=s.y-t.y),f-=n||0,h-=r||0,u=0,d=0,!o||c?(u=t.axis==="y"?s.width:0,d=t.axis==="x"?s.height:0,f=a&&t.x!=null?t.x:f,h=l&&t.y!=null?t.y:h):o&&!c&&(d=t.axis==="x"?s.height:d,u=t.axis==="y"?s.width:u),o=!0,{width:u,height:d,x:f,y:h,top:h,right:f+u,bottom:h+d,left:f}}}}function Tv(e){return e!=null&&e.clientX!=null}function nO(e,t){t===void 0&&(t={});const{open:n,dataRef:r,elements:{floating:o,domReference:i},refs:s}=e,{enabled:a=!0,axis:l="both",x:c=null,y:u=null}=t,d=P.useRef(!1),f=P.useRef(null),[h,g]=P.useState(),[y,m]=P.useState([]),v=kt((I,w)=>{d.current||r.current.openEvent&&!Tv(r.current.openEvent)||s.setPositionReference(tO(i,{x:I,y:w,axis:l,dataRef:r,pointerType:h}))}),b=kt(I=>{c!=null||u!=null||(n?f.current||m([]):v(I.clientX,I.clientY))}),x=qo(h)?o:n,T=P.useCallback(()=>{if(!x||!a||c!=null||u!=null)return;const I=Wt(o);function w(C){const A=Yn(C);Rt(o,A)?(I.removeEventListener("mousemove",w),f.current=null):v(C.clientX,C.clientY)}if(!r.current.openEvent||Tv(r.current.openEvent)){I.addEventListener("mousemove",w);const C=()=>{I.removeEventListener("mousemove",w),f.current=null};return f.current=C,C}s.setPositionReference(i)},[x,a,c,u,o,r,s,i,v]);P.useEffect(()=>T(),[T,y]),P.useEffect(()=>{a&&!o&&(d.current=!1)},[a,o]),P.useEffect(()=>{!a&&n&&(d.current=!0)},[a,n]),nt(()=>{a&&(c!=null||u!=null)&&(d.current=!1,v(c,u))},[a,c,u,v]);const E=P.useMemo(()=>{function I(w){let{pointerType:C}=w;g(C)}return{onPointerDown:I,onPointerEnter:I,onMouseMove:b,onMouseEnter:b}},[b]);return P.useMemo(()=>a?{reference:E}:{},[a,E])}const rO={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},oO={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},Ev=e=>{var t,n;return{escapeKey:typeof e=="boolean"?e:(t=e?.escapeKey)!=null?t:!1,outsidePress:typeof e=="boolean"?e:(n=e?.outsidePress)!=null?n:!0}};function Nr(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,elements:o,dataRef:i}=e,{enabled:s=!0,escapeKey:a=!0,outsidePress:l=!0,outsidePressEvent:c="pointerdown",referencePress:u=!1,referencePressEvent:d="pointerdown",ancestorScroll:f=!1,bubbles:h,capture:g}=t,y=Or(),m=kt(typeof l=="function"?l:()=>!1),v=typeof l=="function"?m:l,b=P.useRef(!1),{escapeKey:x,outsidePress:T}=Ev(h),{escapeKey:E,outsidePress:I}=Ev(g),w=P.useRef(!1),C=kt(D=>{var F;if(!n||!s||!a||D.key!=="Escape"||w.current)return;const z=(F=i.current.floatingContext)==null?void 0:F.nodeId,M=y?so(y.nodesRef.current,z):[];if(!x&&(D.stopPropagation(),M.length>0)){let k=!0;if(M.forEach(V=>{var L;if((L=V.context)!=null&&L.open&&!V.context.dataRef.current.__escapeKeyBubbles){k=!1;return}}),!k)return}r(!1,zA(D)?D.nativeEvent:D,"escape-key")}),A=kt(D=>{var F;const z=()=>{var M;C(D),(M=Yn(D))==null||M.removeEventListener("keydown",z)};(F=Yn(D))==null||F.addEventListener("keydown",z)}),O=kt(D=>{var F;const z=i.current.insideReactTree;i.current.insideReactTree=!1;const M=b.current;if(b.current=!1,c==="click"&&M||z||typeof v=="function"&&!v(D))return;const k=Yn(D),V="["+co("inert")+"]",L=qt(o.floating).querySelectorAll(V);let R=tt(k)?k:null;for(;R&&!pr(R);){const ee=hr(R);if(pr(ee)||!tt(ee))break;R=ee}if(L.length&&tt(k)&&!LA(k)&&!Rt(k,o.floating)&&Array.from(L).every(ee=>!Rt(R,ee)))return;if(Pt(k)&&$){const ee=pr(k),se=dn(k),te=/auto|scroll/,q=ee||te.test(se.overflowX),Y=ee||te.test(se.overflowY),Z=q&&k.clientWidth>0&&k.scrollWidth>k.clientWidth,pe=Y&&k.clientHeight>0&&k.scrollHeight>k.clientHeight,B=se.direction==="rtl",ae=pe&&(B?D.offsetX<=k.offsetWidth-k.clientWidth:D.offsetX>k.clientWidth),ce=Z&&D.offsetY>k.clientHeight;if(ae||ce)return}const U=(F=i.current.floatingContext)==null?void 0:F.nodeId,G=y&&so(y.nodesRef.current,U).some(ee=>{var se;return td(D,(se=ee.context)==null?void 0:se.elements.floating)});if(td(D,o.floating)||td(D,o.domReference)||G)return;const H=y?so(y.nodesRef.current,U):[];if(H.length>0){let ee=!0;if(H.forEach(se=>{var te;if((te=se.context)!=null&&te.open&&!se.context.dataRef.current.__outsidePressBubbles){ee=!1;return}}),!ee)return}r(!1,D,"outside-press")}),_=kt(D=>{var F;const z=()=>{var M;O(D),(M=Yn(D))==null||M.removeEventListener(c,z)};(F=Yn(D))==null||F.addEventListener(c,z)});P.useEffect(()=>{if(!n||!s)return;i.current.__escapeKeyBubbles=x,i.current.__outsidePressBubbles=T;let D=-1;function F(L){r(!1,L,"ancestor-scroll")}function z(){window.clearTimeout(D),w.current=!0}function M(){D=window.setTimeout(()=>{w.current=!1},Na()?5:0)}const k=qt(o.floating);a&&(k.addEventListener("keydown",E?A:C,E),k.addEventListener("compositionstart",z),k.addEventListener("compositionend",M)),v&&k.addEventListener(c,I?_:O,I);let V=[];return f&&(tt(o.domReference)&&(V=Ir(o.domReference)),tt(o.floating)&&(V=V.concat(Ir(o.floating))),!tt(o.reference)&&o.reference&&o.reference.contextElement&&(V=V.concat(Ir(o.reference.contextElement)))),V=V.filter(L=>{var R;return L!==((R=k.defaultView)==null?void 0:R.visualViewport)}),V.forEach(L=>{L.addEventListener("scroll",F,{passive:!0})}),()=>{a&&(k.removeEventListener("keydown",E?A:C,E),k.removeEventListener("compositionstart",z),k.removeEventListener("compositionend",M)),v&&k.removeEventListener(c,I?_:O,I),V.forEach(L=>{L.removeEventListener("scroll",F)}),window.clearTimeout(D)}},[i,o,a,v,c,n,r,f,s,x,T,C,E,A,O,I,_]),P.useEffect(()=>{i.current.insideReactTree=!1},[i,v,c]);const N=P.useMemo(()=>({onKeyDown:C,...u&&{[rO[d]]:D=>{r(!1,D.nativeEvent,"reference-press")},...d!=="click"&&{onClick(D){r(!1,D.nativeEvent,"reference-press")}}}}),[C,r,u,d]),$=P.useMemo(()=>({onKeyDown:C,onMouseDown(){b.current=!0},onMouseUp(){b.current=!0},[oO[c]]:()=>{i.current.insideReactTree=!0}}),[C,c,i]);return P.useMemo(()=>s?{reference:N,floating:$}:{},[s,N,$])}function iO(e){const{open:t=!1,onOpenChange:n,elements:r}=e,o=is(),i=P.useRef({}),[s]=P.useState(()=>iv()),a=Pr()!=null;if(process.env.NODE_ENV!=="production"){const h=r.reference;h&&!tt(h)&&$P("Cannot pass a virtual element to the `elements.reference` option,","as it must be a real DOM element. Use `refs.setPositionReference()`","instead.")}const[l,c]=P.useState(r.reference),u=kt((h,g,y)=>{i.current.openEvent=h?g:void 0,s.emit("openchange",{open:h,event:g,reason:y,nested:a}),n?.(h,g,y)}),d=P.useMemo(()=>({setPositionReference:c}),[]),f=P.useMemo(()=>({reference:l||r.reference||null,floating:r.floating||null,domReference:r.reference}),[l,r.reference,r.floating]);return P.useMemo(()=>({dataRef:i,open:t,onOpenChange:u,elements:f,events:s,floatingId:o,refs:d}),[t,u,f,s,o,d])}function Kn(e){e===void 0&&(e={});const{nodeId:t}=e,n=iO({...e,elements:{reference:null,floating:null,...e.elements}}),r=e.rootContext||n,o=r.elements,[i,s]=P.useState(null),[a,l]=P.useState(null),u=o?.domReference||i,d=P.useRef(null),f=Or();nt(()=>{u&&(d.current=u)},[u]);const h=OP({...e,elements:{...o,...a&&{reference:a}}}),g=P.useCallback(x=>{const T=tt(x)?{getBoundingClientRect:()=>x.getBoundingClientRect(),getClientRects:()=>x.getClientRects(),contextElement:x}:x;l(T),h.refs.setReference(T)},[h.refs]),y=P.useCallback(x=>{(tt(x)||x===null)&&(d.current=x,s(x)),(tt(h.refs.reference.current)||h.refs.reference.current===null||x!==null&&!tt(x))&&h.refs.setReference(x)},[h.refs]),m=P.useMemo(()=>({...h.refs,setReference:y,setPositionReference:g,domReference:d}),[h.refs,y,g]),v=P.useMemo(()=>({...h.elements,domReference:u}),[h.elements,u]),b=P.useMemo(()=>({...h,...r,refs:m,elements:v,nodeId:t}),[h,m,v,t,r]);return nt(()=>{r.dataRef.current.floatingContext=b;const x=f?.nodesRef.current.find(T=>T.id===t);x&&(x.context=b)}),P.useMemo(()=>({...h,context:b,refs:m,elements:v}),[h,m,v,b])}function vd(){return NA()&&ky()}function sO(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,events:o,dataRef:i,elements:s}=e,{enabled:a=!0,visibleOnly:l=!0}=t,c=P.useRef(!1),u=P.useRef(-1),d=P.useRef(!0);P.useEffect(()=>{if(!a)return;const h=Wt(s.domReference);function g(){!n&&Pt(s.domReference)&&s.domReference===Gn(qt(s.domReference))&&(c.current=!0)}function y(){d.current=!0}function m(){d.current=!1}return h.addEventListener("blur",g),vd()&&(h.addEventListener("keydown",y,!0),h.addEventListener("pointerdown",m,!0)),()=>{h.removeEventListener("blur",g),vd()&&(h.removeEventListener("keydown",y,!0),h.removeEventListener("pointerdown",m,!0))}},[s.domReference,n,a]),P.useEffect(()=>{if(!a)return;function h(g){let{reason:y}=g;(y==="reference-press"||y==="escape-key")&&(c.current=!0)}return o.on("openchange",h),()=>{o.off("openchange",h)}},[o,a]),P.useEffect(()=>()=>{Gt(u)},[]);const f=P.useMemo(()=>({onMouseLeave(){c.current=!1},onFocus(h){if(c.current)return;const g=Yn(h.nativeEvent);if(l&&tt(g)){if(vd()&&!h.relatedTarget){if(!d.current&&!nd(g))return}else if(!VA(g))return}r(!0,h.nativeEvent,"focus")},onBlur(h){c.current=!1;const g=h.relatedTarget,y=h.nativeEvent,m=tt(g)&&g.hasAttribute(co("focus-guard"))&&g.getAttribute("data-type")==="outside";u.current=window.setTimeout(()=>{var v;const b=Gn(s.domReference?s.domReference.ownerDocument:document);!g&&b===s.domReference||Rt((v=i.current.floatingContext)==null?void 0:v.refs.floating.current,b)||Rt(s.domReference,b)||m||r(!1,y,"focus")})}}),[i,s.domReference,r,l]);return P.useMemo(()=>a?{reference:f}:{},[a,f])}function bd(e,t,n){const r=new Map,o=n==="item";let i=e;if(o&&e){const{[ev]:s,[tv]:a,...l}=e;i=l}return{...n==="floating"&&{tabIndex:-1,[_P]:""},...i,...t.map(s=>{const a=s?s[n]:null;return typeof a=="function"?e?a(e):null:a}).concat(e).reduce((s,a)=>(a&&Object.entries(a).forEach(l=>{let[c,u]=l;if(!(o&&[ev,tv].includes(c)))if(c.indexOf("on")===0){if(r.has(c)||r.set(c,[]),typeof u=="function"){var d;(d=r.get(c))==null||d.push(u),s[c]=function(){for(var f,h=arguments.length,g=new Array(h),y=0;y<h;y++)g[y]=arguments[y];return(f=r.get(c))==null?void 0:f.map(m=>m(...g)).find(m=>m!==void 0)}}}else s[c]=u}),s),{})}}function Zn(e){e===void 0&&(e=[]);const t=e.map(a=>a?.reference),n=e.map(a=>a?.floating),r=e.map(a=>a?.item),o=P.useCallback(a=>bd(a,e,"reference"),t),i=P.useCallback(a=>bd(a,e,"floating"),n),s=P.useCallback(a=>bd(a,e,"item"),r);return P.useMemo(()=>({getReferenceProps:o,getFloatingProps:i,getItemProps:s}),[o,i,s])}const aO="Escape";function nl(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function rl(e,t){return nl(t,e===nv||e===Za,e===rs||e===os)}function xd(e,t,n){return nl(t,e===Za,n?e===rs:e===os)||e==="Enter"||e===" "||e===""}function Cv(e,t,n){return nl(t,n?e===rs:e===os,e===Za)}function kv(e,t,n,r){const o=n?e===os:e===rs,i=e===nv;return t==="both"||t==="horizontal"&&r&&r>1?e===aO:nl(t,o,i)}function ol(e,t){const{open:n,onOpenChange:r,elements:o,floatingId:i}=e,{listRef:s,activeIndex:a,onNavigate:l=()=>{},enabled:c=!0,selectedIndex:u=null,allowEscape:d=!1,loop:f=!1,nested:h=!1,rtl:g=!1,virtual:y=!1,focusItemOnOpen:m="auto",focusItemOnHover:v=!0,openOnArrowKeyDown:b=!0,disabledIndices:x=void 0,orientation:T="vertical",parentOrientation:E,cols:I=1,scrollItemIntoView:w=!0,virtualItemRef:C,itemSizes:A,dense:O=!1}=t;process.env.NODE_ENV!=="production"&&(d&&(f||Xa("`useListNavigation` looping must be enabled to allow escaping."),y||Xa("`useListNavigation` must be virtual to allow escaping.")),T==="vertical"&&I>1&&Xa("In grid list navigation mode (`cols` > 1), the `orientation` should",'be either "horizontal" or "both".'));const _=Ra(o.floating),N=Ht(_),$=Pr(),D=Or();nt(()=>{e.dataRef.current.orientation=T},[e,T]);const F=kt(()=>{l(k.current===-1?null:k.current)}),z=rd(o.domReference),M=P.useRef(m),k=P.useRef(u??-1),V=P.useRef(null),L=P.useRef(!0),R=P.useRef(F),U=P.useRef(!!o.floating),G=P.useRef(n),H=P.useRef(!1),ee=P.useRef(!1),se=Ht(x),te=Ht(n),q=Ht(w),Y=Ht(u),[Z,pe]=P.useState(),[B,ae]=P.useState(),ce=kt(()=>{function de(X){if(y){var me;(me=X.id)!=null&&me.endsWith("-fui-option")&&(X.id=i+"-"+Math.random().toString(16).slice(2,10)),pe(X.id),D?.events.emit("virtualfocus",X),C&&(C.current=X)}else uo(X,{sync:H.current,preventScroll:!0})}const re=s.current[k.current],J=ee.current;re&&de(re),(H.current?X=>X():requestAnimationFrame)(()=>{const X=s.current[k.current]||re;if(!X)return;re||de(X);const me=q.current;me&&ue&&(J||!L.current)&&(X.scrollIntoView==null||X.scrollIntoView(typeof me=="boolean"?{block:"nearest",inline:"nearest"}:me))})});nt(()=>{c&&(n&&o.floating?M.current&&u!=null&&(ee.current=!0,k.current=u,F()):U.current&&(k.current=-1,R.current()))},[c,n,o.floating,u,F]),nt(()=>{if(c&&n&&o.floating)if(a==null){if(H.current=!1,Y.current!=null)return;if(U.current&&(k.current=-1,ce()),(!G.current||!U.current)&&M.current&&(V.current!=null||M.current===!0&&V.current==null)){let de=0;const re=()=>{s.current[0]==null?(de<2&&(de?requestAnimationFrame:queueMicrotask)(re),de++):(k.current=V.current==null||xd(V.current,T,g)||h?od(s,se.current):Ny(s,se.current),V.current=null,F())};re()}}else es(s,a)||(k.current=a,ce(),ee.current=!1)},[c,n,o.floating,a,Y,h,s,T,g,F,ce,se]),nt(()=>{var de;if(!c||o.floating||!D||y||!U.current)return;const re=D.nodesRef.current,J=(de=re.find(me=>me.id===$))==null||(de=de.context)==null?void 0:de.elements.floating,j=Gn(qt(o.floating)),X=re.some(me=>me.context&&Rt(me.context.elements.floating,j));J&&!X&&L.current&&J.focus({preventScroll:!0})},[c,o.floating,D,$,y]),nt(()=>{if(!c||!D||!y||$)return;function de(re){ae(re.id),C&&(C.current=re)}return D.events.on("virtualfocus",de),()=>{D.events.off("virtualfocus",de)}},[c,D,y,$,C]),nt(()=>{R.current=F,G.current=n,U.current=!!o.floating}),nt(()=>{n||(V.current=null,M.current=m)},[n,m]);const Q=a!=null,ue=P.useMemo(()=>{function de(J){if(!te.current)return;const j=s.current.indexOf(J);j!==-1&&k.current!==j&&(k.current=j,F())}return{onFocus(J){let{currentTarget:j}=J;H.current=!0,de(j)},onClick:J=>{let{currentTarget:j}=J;return j.focus({preventScroll:!0})},onMouseMove(J){let{currentTarget:j}=J;H.current=!0,ee.current=!1,v&&de(j)},onPointerLeave(J){let{pointerType:j}=J;if(!(!L.current||j==="touch")&&(H.current=!0,!!v&&(k.current=-1,F(),!y))){var X;(X=N.current)==null||X.focus({preventScroll:!0})}}}},[te,N,v,s,F,y]),oe=P.useCallback(()=>{var de;return E??(D==null||(de=D.nodesRef.current.find(re=>re.id===$))==null||(de=de.context)==null||(de=de.dataRef)==null?void 0:de.current.orientation)},[$,D,E]),he=kt(de=>{if(L.current=!1,H.current=!0,de.which===229||!te.current&&de.currentTarget===N.current)return;if(h&&kv(de.key,T,g,I)){rl(de.key,oe())||Ut(de),r(!1,de.nativeEvent,"list-navigation"),Pt(o.domReference)&&(y?D?.events.emit("virtualfocus",o.domReference):o.domReference.focus());return}const re=k.current,J=od(s,x),j=Ny(s,x);if(z||(de.key==="Home"&&(Ut(de),k.current=J,F()),de.key==="End"&&(Ut(de),k.current=j,F())),I>1){const X=A||Array.from({length:s.current.length},()=>({width:1,height:1})),me=qA(X,I,O),ve=me.findIndex(_e=>_e!=null&&!Wa(s,_e,x)),Ce=me.reduce((_e,ct,_t)=>ct!=null&&!Wa(s,ct,x)?_t:_e,-1),Me=me[WA({current:me.map(_e=>_e!=null?s.current[_e]:null)},{event:de,orientation:T,loop:f,rtl:g,cols:I,disabledIndices:GA([...(typeof x!="function"?x:null)||s.current.map((_e,ct)=>Wa(s,ct,x)?ct:void 0),void 0],me),minIndex:ve,maxIndex:Ce,prevIndex:UA(k.current>j?J:k.current,X,me,I,de.key===Za?"bl":de.key===(g?rs:os)?"tr":"tl"),stopEvent:!0})];if(Me!=null&&(k.current=Me,F()),T==="both")return}if(rl(de.key,T)){if(Ut(de),n&&!y&&Gn(de.currentTarget.ownerDocument)===de.currentTarget){k.current=xd(de.key,T,g)?J:j,F();return}xd(de.key,T,g)?f?k.current=re>=j?d&&re!==s.current.length?-1:J:Zt(s,{startingIndex:re,disabledIndices:x}):k.current=Math.min(j,Zt(s,{startingIndex:re,disabledIndices:x})):f?k.current=re<=J?d&&re!==-1?s.current.length:j:Zt(s,{startingIndex:re,decrement:!0,disabledIndices:x}):k.current=Math.max(J,Zt(s,{startingIndex:re,decrement:!0,disabledIndices:x})),es(s,k.current)&&(k.current=-1),F()}}),ie=P.useMemo(()=>y&&n&&Q&&{"aria-activedescendant":B||Z},[y,n,Q,B,Z]),le=P.useMemo(()=>({"aria-orientation":T==="both"?void 0:T,...z?{}:ie,onKeyDown:he,onPointerMove(){L.current=!0}}),[ie,he,T,z]),be=P.useMemo(()=>{function de(J){m==="auto"&&Oy(J.nativeEvent)&&(M.current=!0)}function re(J){M.current=m,m==="auto"&&Dy(J.nativeEvent)&&(M.current=!0)}return{...ie,onKeyDown(J){L.current=!1;const j=J.key.startsWith("Arrow"),X=["Home","End"].includes(J.key),me=j||X,ve=Cv(J.key,T,g),Ce=kv(J.key,T,g,I),Me=Cv(J.key,oe(),g),_e=rl(J.key,T),ct=(h?Me:_e)||J.key==="Enter"||J.key.trim()==="";if(y&&n){const W=D?.nodesRef.current.find(Oe=>Oe.parentId==null),K=D&&W?$A(D.nodesRef.current,W.id):null;if(me&&K&&C){const Oe=new KeyboardEvent("keydown",{key:J.key,bubbles:!0});if(ve||Ce){var _t,Qt;const Ue=((_t=K.context)==null?void 0:_t.elements.domReference)===J.currentTarget,Ye=Ce&&!Ue?(Qt=K.context)==null?void 0:Qt.elements.domReference:ve?s.current.find($e=>$e?.id===Z):null;Ye&&(Ut(J),Ye.dispatchEvent(Oe),ae(void 0))}if((_e||X)&&K.context&&K.context.open&&K.parentId&&J.currentTarget!==K.context.elements.domReference){var Re;Ut(J),(Re=K.context.elements.domReference)==null||Re.dispatchEvent(Oe);return}}return he(J)}if(!(!n&&!b&&j)){if(ct){const W=rl(J.key,oe());V.current=h&&W?null:J.key}if(h){Me&&(Ut(J),n?(k.current=od(s,se.current),F()):r(!0,J.nativeEvent,"list-navigation"));return}_e&&(u!=null&&(k.current=u),Ut(J),!n&&b?r(!0,J.nativeEvent,"list-navigation"):he(J),n&&F())}},onFocus(){n&&!y&&(k.current=-1,F())},onPointerDown:re,onPointerEnter:re,onMouseDown:de,onClick:de}},[Z,ie,I,he,se,m,s,h,F,r,n,b,T,oe,g,u,D,y,C]);return P.useMemo(()=>c?{reference:be,floating:le,item:ue}:{},[c,be,le,ue])}const lO=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function yr(e,t){var n,r;t===void 0&&(t={});const{open:o,elements:i,floatingId:s}=e,{enabled:a=!0,role:l="dialog"}=t,c=is(),u=((n=i.domReference)==null?void 0:n.id)||c,d=P.useMemo(()=>{var b;return((b=Ra(i.floating))==null?void 0:b.id)||s},[i.floating,s]),f=(r=lO.get(l))!=null?r:l,g=Pr()!=null,y=P.useMemo(()=>f==="tooltip"||l==="label"?{["aria-"+(l==="label"?"labelledby":"describedby")]:o?d:void 0}:{"aria-expanded":o?"true":"false","aria-haspopup":f==="alertdialog"?"dialog":f,"aria-controls":o?d:void 0,...f==="listbox"&&{role:"combobox"},...f==="menu"&&{id:u},...f==="menu"&&g&&{role:"menuitem"},...l==="select"&&{"aria-autocomplete":"none"},...l==="combobox"&&{"aria-autocomplete":"list"}},[f,d,g,o,u,l]),m=P.useMemo(()=>{const b={id:d,...f&&{role:f}};return f==="tooltip"||l==="label"?b:{...b,...f==="menu"&&{"aria-labelledby":u}}},[f,d,u,l]),v=P.useCallback(b=>{let{active:x,selected:T}=b;const E={role:"option",...x&&{id:d+"-fui-option"}};switch(l){case"select":case"combobox":return{...E,"aria-selected":T}}return{}},[d,l]);return P.useMemo(()=>a?{reference:y,floating:m,item:v}:{},[a,y,m,v])}const Iv=e=>e.replace(/[A-Z]+(?![a-z])|[A-Z]/g,(t,n)=>(n?"-":"")+t.toLowerCase());function Zo(e,t){return typeof e=="function"?e(t):e}function cO(e,t){const[n,r]=P.useState(e);return e&&!n&&r(!0),P.useEffect(()=>{if(!e&&n){const o=setTimeout(()=>r(!1),t);return()=>clearTimeout(o)}},[e,n,t]),n}function uO(e,t){t===void 0&&(t={});const{open:n,elements:{floating:r}}=e,{duration:o=250}=t,s=(typeof o=="number"?o:o.close)||0,[a,l]=P.useState("unmounted"),c=cO(n,s);return!c&&a==="close"&&l("unmounted"),nt(()=>{if(r){if(n){l("initial");const u=requestAnimationFrame(()=>{ur.flushSync(()=>{l("open")})});return()=>{cancelAnimationFrame(u)}}l("close")}},[n,r]),{isMounted:c,status:a}}function Av(e,t){t===void 0&&(t={});const{initial:n={opacity:0},open:r,close:o,common:i,duration:s=250}=t,a=e.placement,l=a.split("-")[0],c=P.useMemo(()=>({side:l,placement:a}),[l,a]),u=typeof s=="number",d=(u?s:s.open)||0,f=(u?s:s.close)||0,[h,g]=P.useState(()=>({...Zo(i,c),...Zo(n,c)})),{isMounted:y,status:m}=uO(e,{duration:s}),v=Ht(n),b=Ht(r),x=Ht(o),T=Ht(i);return nt(()=>{const E=Zo(v.current,c),I=Zo(x.current,c),w=Zo(T.current,c),C=Zo(b.current,c)||Object.keys(E).reduce((A,O)=>(A[O]="",A),{});if(m==="initial"&&g(A=>({transitionProperty:A.transitionProperty,...w,...E})),m==="open"&&g({transitionProperty:Object.keys(C).map(Iv).join(","),transitionDuration:d+"ms",...w,...C}),m==="close"){const A=I||E;g({transitionProperty:Object.keys(A).map(Iv).join(","),transitionDuration:f+"ms",...w,...A})}},[f,x,v,b,T,d,m,c]),{isMounted:y,styles:h}}function dO(e,t){var n;const{open:r,dataRef:o}=e,{listRef:i,activeIndex:s,onMatch:a,onTypingChange:l,enabled:c=!0,findMatch:u=null,resetMs:d=750,ignoreKeys:f=[],selectedIndex:h=null}=t,g=P.useRef(-1),y=P.useRef(""),m=P.useRef((n=h??s)!=null?n:-1),v=P.useRef(null),b=kt(a),x=kt(l),T=Ht(u),E=Ht(f);nt(()=>{r&&(Gt(g),v.current=null,y.current="")},[r]),nt(()=>{if(r&&y.current===""){var O;m.current=(O=h??s)!=null?O:-1}},[r,h,s]);const I=kt(O=>{O?o.current.typing||(o.current.typing=O,x(O)):o.current.typing&&(o.current.typing=O,x(O))}),w=kt(O=>{function _(z,M,k){const V=T.current?T.current(M,k):M.find(L=>L?.toLocaleLowerCase().indexOf(k.toLocaleLowerCase())===0);return V?z.indexOf(V):-1}const N=i.current;if(y.current.length>0&&y.current[0]!==" "&&(_(N,N,y.current)===-1?I(!1):O.key===" "&&Ut(O)),N==null||E.current.includes(O.key)||O.key.length!==1||O.ctrlKey||O.metaKey||O.altKey)return;r&&O.key!==" "&&(Ut(O),I(!0)),N.every(z=>{var M,k;return z?((M=z[0])==null?void 0:M.toLocaleLowerCase())!==((k=z[1])==null?void 0:k.toLocaleLowerCase()):!0})&&y.current===O.key&&(y.current="",m.current=v.current),y.current+=O.key,Gt(g),g.current=window.setTimeout(()=>{y.current="",m.current=v.current,I(!1)},d);const D=m.current,F=_(N,[...N.slice((D||0)+1),...N.slice(0,(D||0)+1)],y.current);F!==-1?(b(F),v.current=F):O.key!==" "&&(y.current="",I(!1))}),C=P.useMemo(()=>({onKeyDown:w}),[w]),A=P.useMemo(()=>({onKeyDown:w,onKeyUp(O){O.key===" "&&I(!1)}}),[w,I]);return P.useMemo(()=>c?{reference:C,floating:A}:{},[c,C,A])}function Pv(e,t,n){return n===void 0&&(n=!0),e.filter(o=>{var i;return o.parentId===t&&(!n||((i=o.context)==null?void 0:i.open))}).flatMap(o=>[o,...Pv(e,o.id,n)])}function Ov(e,t){const[n,r]=e;let o=!1;const i=t.length;for(let s=0,a=i-1;s<i;a=s++){const[l,c]=t[s]||[0,0],[u,d]=t[a]||[0,0];c>=r!=d>=r&&n<=(u-l)*(r-c)/(d-c)+l&&(o=!o)}return o}function fO(e,t){return e[0]>=t.x&&e[0]<=t.x+t.width&&e[1]>=t.y&&e[1]<=t.y+t.height}function Dv(e){e===void 0&&(e={});const{buffer:t=.5,blockPointerEvents:n=!1,requireIntent:r=!0}=e,o={current:-1};let i=!1,s=null,a=null,l=typeof performance<"u"?performance.now():0;function c(d,f){const h=performance.now(),g=h-l;if(s===null||a===null||g===0)return s=d,a=f,l=h,null;const y=d-s,m=f-a,b=Math.sqrt(y*y+m*m)/g;return s=d,a=f,l=h,b}const u=d=>{let{x:f,y:h,placement:g,elements:y,onClose:m,nodeId:v,tree:b}=d;return function(T){function E(){Gt(o),m()}if(Gt(o),!y.domReference||!y.floating||g==null||f==null||h==null)return;const{clientX:I,clientY:w}=T,C=[I,w],A=RP(T),O=T.type==="mouseleave",_=pd(y.floating,A),N=pd(y.domReference,A),$=y.domReference.getBoundingClientRect(),D=y.floating.getBoundingClientRect(),F=g.split("-")[0],z=f>D.right-D.width/2,M=h>D.bottom-D.height/2,k=fO(C,$),V=D.width>$.width,L=D.height>$.height,R=(V?$:D).left,U=(V?$:D).right,G=(L?$:D).top,H=(L?$:D).bottom;if(_&&(i=!0,!O))return;if(N&&(i=!1),N&&!O){i=!0;return}if(O&&tt(T.relatedTarget)&&pd(y.floating,T.relatedTarget)||b&&Pv(b.nodesRef.current,v).length)return;if(F==="top"&&h>=$.bottom-1||F==="bottom"&&h<=$.top+1||F==="left"&&f>=$.right-1||F==="right"&&f<=$.left+1)return E();let ee=[];switch(F){case"top":ee=[[R,$.top+1],[R,D.bottom-1],[U,D.bottom-1],[U,$.top+1]];break;case"bottom":ee=[[R,D.top+1],[R,$.bottom-1],[U,$.bottom-1],[U,D.top+1]];break;case"left":ee=[[D.right-1,H],[D.right-1,G],[$.left+1,G],[$.left+1,H]];break;case"right":ee=[[$.right-1,H],[$.right-1,G],[D.left+1,G],[D.left+1,H]];break}function se(te){let[q,Y]=te;switch(F){case"top":{const Z=[V?q+t/2:z?q+t*4:q-t*4,Y+t+1],pe=[V?q-t/2:z?q+t*4:q-t*4,Y+t+1],B=[[D.left,z||V?D.bottom-t:D.top],[D.right,z?V?D.bottom-t:D.top:D.bottom-t]];return[Z,pe,...B]}case"bottom":{const Z=[V?q+t/2:z?q+t*4:q-t*4,Y-t],pe=[V?q-t/2:z?q+t*4:q-t*4,Y-t],B=[[D.left,z||V?D.top+t:D.bottom],[D.right,z?V?D.top+t:D.bottom:D.top+t]];return[Z,pe,...B]}case"left":{const Z=[q+t+1,L?Y+t/2:M?Y+t*4:Y-t*4],pe=[q+t+1,L?Y-t/2:M?Y+t*4:Y-t*4];return[...[[M||L?D.right-t:D.left,D.top],[M?L?D.right-t:D.left:D.right-t,D.bottom]],Z,pe]}case"right":{const Z=[q-t,L?Y+t/2:M?Y+t*4:Y-t*4],pe=[q-t,L?Y-t/2:M?Y+t*4:Y-t*4],B=[[M||L?D.left+t:D.right,D.top],[M?L?D.left+t:D.right:D.left+t,D.bottom]];return[Z,pe,...B]}}}if(!Ov([I,w],ee)){if(i&&!k)return E();if(!O&&r){const te=c(T.clientX,T.clientY);if(te!==null&&te<.1)return E()}Ov([I,w],se([f,h]))?!i&&r&&(o.current=window.setTimeout(E,40)):E()}}};return u.__options={blockPointerEvents:n},u}const Nv=200,pO=500,Xo=()=>{const e=Date.now(),t=new Uint8Array(16);t[0]=e/Math.pow(2,40)&255,t[1]=e/Math.pow(2,32)&255,t[2]=e/Math.pow(2,24)&255,t[3]=e/Math.pow(2,16)&255,t[4]=e/Math.pow(2,8)&255,t[5]=e&255;const n=new Uint8Array(10);crypto.getRandomValues(n),t.set(n,6),t[6]=t[6]&15|112,t[8]=t[8]&63|128;const r=Array.from(t).map(o=>o.toString(16).padStart(2,"0")).join("");return`${r.slice(0,8)}-${r.slice(8,12)}-${r.slice(12,16)}-${r.slice(16,20)}-${r.slice(20)}`},Mv=(e,t,n)=>e.split(t).filter(Boolean).reduce((r,o)=>r!=null?r[o]:r,n),_v={basic:/[,[\]]+?/,extend:/[,[\].]+?/},wd=(e,t)=>{const n=Mv(t,_v.basic,e)||Mv(t,_v.extend,e);return n===void 0||n===e?void 0:n},Mr=()=>typeof window>"u",Sd=e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),Fv=(e,t)=>{const n=[];for(let r=0;r<t;r++){const o=r*t,i=e.slice(o,o+t);i.length>0&&n.push(i)}return n},hO=e=>!e,Qo=()=>{},Lv=()=>{const e=navigator.userAgent||navigator.vendor||window.opera;return/android|iphone|ipad|ipod|opera mini|iemobile|wpdesktop/i.test(e)},Td=S.forwardRef(function({as:t,open:n,title:r,children:o,placement:i,focus:s=!0,hover:a=!0,enabled:l=!0,popover:c=!0,onChange:u=Qo,followCursor:d=!1,...f},h){const[g,y]=S.useState(n??!1),m=S.useRef(null),v=t||"span",b=D=>{y(D),u?.(D)},{refs:x,floatingStyles:T,context:E}=Kn({placement:i,open:g,whileElementsMounted:lo,onOpenChange:n?void 0:b,middleware:[Ya(),Go(5),Xy(),ld({padding:5,element:m}),Ka({fallbackAxisSideDirection:"start"})]}),I=Nr(E,{enabled:l}),w=yr(E,{role:"tooltip",enabled:l}),C=sO(E,{enabled:l?s:!1}),A=Ko(E,{enabled:l?c:!1}),O=nO(E,{enabled:!!l&&!!d}),_=fd(E,{move:!0,delay:{open:Nv},enabled:l?a:!1,handleClose:c?Dv():null}),{getReferenceProps:N,getFloatingProps:$}=Zn([w,I,O,s?C:void 0,a?_:void 0,c?A:void 0]);return S.useEffect(()=>y(n===void 0?!1:n),[n]),p.jsxs(S.Fragment,{children:[p.jsx(v,{...N(f),ref:fr(x.setReference,h),children:r}),g&&p.jsx(gr,{children:p.jsxs(un,{...$(),ref:x.setFloating,style:T,className:"isolate z-tooltip rounded-lg border border-tooltip-border bg-tooltip-background p-3 text-tooltip-foreground shadow-shadow-floating",children:[p.jsx(cd,{ref:m,context:E,strokeWidth:.1,className:"fill-tooltip-background stroke-tooltip-border"}),o]})})]})}),Vv=({reportStatus:e,id:t,hideLeft:n=!1,className:r,info:o,children:i,title:s})=>p.jsxs("span",{className:Pe("w-full justify-between",n&&i===null?"hidden":"flex",r),children:[n?null:p.jsxs("span",{className:"flex items-center gap-1 transition-colors group-focus-within:text-primary group-hover:text-primary group-disabled:text-disabled group-error:text-danger",children:[s,e||o?p.jsxs("span",{className:"flex items-center justify-center gap-1",children:[o?p.jsx(Td,{as:"button",type:"button","aria-label":typeof o=="string"?o:void 0,"aria-describedby":typeof o=="string"?void 0:t?`tooltip-info-content-${t}`:void 0,title:p.jsx("span",{className:"cursor-help",children:p.jsx(Er,{className:"aspect-square size-3","aria-hidden":"true",size:16,strokeWidth:1,absoluteStrokeWidth:!0})}),children:p.jsx("div",{id:t?`tooltip-info-content-${t}`:void 0,className:"w-full max-w-48 whitespace-break-spaces break-words",children:o})}):null,e?p.jsxs("span",{className:"flex h-3 min-w-6 items-center",children:[p.jsx(Vu,{className:"hidden aspect-square size-3 opacity-0 transition-opacity group-assert:block group-assert:text-success group-assert:opacity-100","aria-hidden":"true",size:16,strokeWidth:1,absoluteStrokeWidth:!0}),p.jsx(FI,{className:"hidden aspect-square size-3 opacity-0 transition-opacity group-error:block group-error:opacity-100","aria-hidden":"true",size:16,strokeWidth:1,absoluteStrokeWidth:!0})]}):null]}):null]}),i]}),as=S.forwardRef(({optionalText:e,left:t,rightLabel:n,container:r,feedback:o,interactive:i,right:s,info:a,children:l,error:c,form:u,id:d,labelClassName:f="",name:h,title:g,componentName:y,placeholder:m,hideLeft:v=!1,required:b,disabled:x,reportStatus:T,hiddenLabel:E},I)=>{const w=Hu(),C=T!==void 0?T:w.input.iconFeedback,A=d??h,O=vt(),_=e??O.inputOptionalLabel;return p.jsxs("fieldset",{ref:I,form:u,disabled:x,"data-error":!!c,"aria-disabled":x,"data-component":y,"data-interactive":!!i,className:Pe("group flex min-h-0 min-w-0 max-w-full flex-col items-start",r),children:[p.jsxs("label",{form:u,htmlFor:A,className:"relative inline-flex w-full max-w-full cursor-text flex-row flex-wrap justify-between gap-1 text-field-label text-sm transition-colors empty:hidden group-disabled:cursor-not-allowed group-error:text-danger",children:[E?null:p.jsx(Vv,{info:a,hideLeft:v,reportStatus:C,title:g,placeholder:m,children:_||n?p.jsxs(S.Fragment,{children:[b?null:p.jsx("span",{"aria-disabled":x,className:"text-opacity-70 transition-colors group-focus-within:text-primary group-hover:text-primary aria-disabled:text-disabled",children:_}),n?p.jsx(S.Fragment,{children:n}):null]}):null}),p.jsxs("div",{className:`group relative flex w-full flex-row flex-nowrap items-center gap-x-2 gap-y-1 rounded-md border border-input-border bg-transparent transition-colors group-hover:border-primary group-disabled:border-disabled group-error:border-danger ${f}`,children:[t?p.jsx("span",{className:"flex flex-nowrap gap-1 whitespace-nowrap pl-2",children:t}):null,l,s?p.jsx("span",{className:"flex flex-nowrap gap-2 whitespace-nowrap pr-2",children:s}):null]})]}),p.jsx("p",{className:"mt-input-gap hidden whitespace-pre-wrap text-wrap text-xs empty:mt-0 empty:hidden group-has-[input:not(:focus):invalid[data-initialized=true]]:flex group-error:flex group-error:text-danger",children:c}),p.jsx("p",{className:"mt-input-gap text-xs empty:mt-0 empty:hidden group-has-[input:not(:focus):valid[data-initialized=true]]:block group-assert:block group-error:hidden",children:o})]})}),$v=(e,t,n,r)=>S.forwardRef(({info:i,left:s,next:a,error:l,right:c,container:u,rightLabel:d,interactive:f,optionalText:h,type:g="text",labelClassName:y,feedback:m=null,hideLeft:v=!1,loading:b,hiddenLabel:x,...T},E)=>{const I=e,w=T.id??T.name,C=S.useRef(null);return S.useEffect(()=>{if(C.current===null)return;const A=C.current,O=Gi(C.current),_=r?.(A),N=$=>{const D=$;if(D.key==="Enter"&&A.enterKeyHint==="next"){const F=A.getAttribute("data-next");if(F){const z=document.getElementById(F);if(z)return z.focus(),void D.preventDefault()}}};return A.addEventListener("keydown",N),()=>{_?.(),O(),A.removeEventListener("keydown",N)}},[]),p.jsx(as,{...n,info:i,left:s,error:l,right:c,form:T.form,loading:b,name:T.name,feedback:m,hideLeft:v,title:T.title,rightLabel:d,disabled:T.disabled,hiddenLabel:x,interactive:f,required:T.required,componentName:t,id:T.name||T.id,optionalText:h,labelClassName:y,placeholder:T.placeholder,container:Pe(u,n.container),children:p.jsx(I,{...n,...T,id:w,name:w,type:g,"data-next":a,"aria-busy":T.disabled,"aria-disabled":T.disabled,"aria-readonly":T.readOnly,ref:fr(E,C),className:Pe("input placeholder-input-mask group h-input-height w-full flex-1","rounded-md bg-transparent px-input-x py-input-y text-base text-foreground","outline-none transition-colors focus:ring-2 focus:ring-inset focus:ring-primary","group-error:text-danger group-error:placeholder-input-mask-error","resize-y group-focus-within:border-primary group-hover:border-primary","disabled:cursor-not-allowed disabled:text-disabled",T.className)})})}),Jo=$v(Qg,"input",{type:"text"}),mO=_o("relative overflow-hidden inline-flex duration-300 enabled:hover:bg-opacity-70 enabled:focus:bg-opacity-70 data-[loading=true]:opacity-30 data-[loading=true]:animate-pulse gap-1.5 items-center justify-center align-middle cursor-pointer whitespace-nowrap font-medium transition-colors ease-linear disabled:cursor-not-allowed disabled:bg-opacity-40 disabled:text-opacity-80 focus-visible:outline-none focus-visible:ring-4 focus-visible:ring-ring",{variants:{size:{icon:"p-1",big:"h-12 px-6 py-4",default:"h-10 px-4 py-2",min:"h-7 px-3 py-1 text-sm",small:"h-8 px-4 py-2 text-sm",tiny:"h-6 px-2 py-1 text-sm"},rounded:{rough:"rounded-sm",squared:"rounded-none",default:"rounded-button",circle:"rounded-full aspect-square"},theme:{raw:"",disabled:"bg-disabled opacity-70",loading:"animate-pulse bg-disabled",main:"bg-button-primary-bg text-button-primary-text",info:"bg-button-info-bg text-button-info-text",warn:"bg-button-warn-bg text-button-warn-text",muted:"bg-button-muted-bg text-button-muted-text",danger:"bg-button-danger-bg text-button-danger-text",neutral:"bg-transparent border-1 border-card-border",primary:"bg-button-primary-bg text-button-primary-text",success:"bg-button-success-bg text-button-success-text",secondary:"bg-button-secondary-bg text-button-secondary-text","ghost-info":"bg-transparent hover:bg-info/20 border-0 border-transparent text-info","ghost-warn":"bg-transparent hover:bg-warn/20 border-0 border-transparent text-warn","ghost-danger":"bg-transparent hover:bg-danger/20 border-0 border-transparent text-danger","ghost-primary":"bg-transparent hover:bg-primary/20 border-0 border-transparent text-primary","ghost-success":"bg-transparent hover:bg-success/20 border-0 border-transparent text-success","ghost-secondary":"bg-transparent hover:bg-secondary/20 border-0 border-transparent text-secondary","ghost-muted":"bg-transparent hover:bg-muted/20 border-0 border-transparent text-muted-foreground","ghost-neutral":"bg-transparent border-0 border-card-border"}},defaultVariants:{theme:"main",size:"default",rounded:"default"}}),Jt=S.forwardRef(function({className:t,icon:n,loading:r,theme:o,type:i="button",size:s,rounded:a,...l},c){const u=r||l.disabled;return p.jsxs(un,{...l,ref:c,type:i,"data-theme":o,disabled:u,"data-loading":r,"data-component":"button","aria-disabled":u,as:l.as??"button","aria-busy":u||r,onClick:u?void 0:l.onClick,className:Pe(mO({size:s,rounded:a,theme:o}),t),children:[n,l.children]})}),po=S.forwardRef(({required:e=!0,options:t,info:n,selectContainer:r="",feedback:o=null,labelClassName:i,interactive:s,rightLabel:a,hiddenLabel:l,loading:c,optionalText:u,container:d,hideLeft:f=!1,right:h,left:g,error:y,...m},v)=>{const b=vt(),x=S.useRef(null),T=m.id??m.name;S.useImperativeHandle(v,()=>x.current),S.useEffect(()=>{if(x.current===null)return;const I=new AbortController,w=x.current,C=Gi(x.current);return w.addEventListener("change",()=>w.setAttribute("data-selected","true"),{once:!0,signal:I.signal}),()=>{C(),I.abort()}},[]);const E=()=>x.current?.focus();return p.jsx(as,{info:n,left:g,error:y,form:m.form,loading:c,name:m.name,feedback:o,hideLeft:f,required:e,title:m.title,container:d,componentName:"select",rightLabel:a,hiddenLabel:l,interactive:s,id:m.name||m.id,optionalText:u,labelClassName:i,placeholder:m.placeholder,right:p.jsxs("label",{htmlFor:T,children:[h,p.jsxs("button",{onClick:E,type:"button",className:"mt-2 transition-colors hover:text-primary",children:[p.jsx(Lu,{size:20}),p.jsx("span",{className:"sr-only",children:b.inputCaretDown})]})]}),children:p.jsxs("select",{...m,id:T,name:T,required:e,ref:fr(v,x),"data-selected":!!m.value||!1,title:typeof m.title=="string"?m.title:void 0,className:Pe("input select group h-10 w-full flex-1 appearance-none rounded-md text-base","bg-transparent px-2 py-1 text-foreground placeholder-input-placeholder","outline-none transition-colors group-error:text-danger group-error:placeholder-input-mask-error","data-[selected=false]:text-input-placeholder",m.className),children:[p.jsx("option",{value:"",disabled:!0,hidden:!0,children:m.placeholder}),t.map(I=>S.createElement("option",{...I,value:I.value,children:I.label??I.value,key:`${T}-select-option-${I.value}`}))]})})});function an(e){return e?.ownerDocument||document}function gO({controlled:e,default:t,name:n,state:r="value"}){const{current:o}=P.useRef(e!==void 0),[i,s]=P.useState(t),a=o?e:i;if(process.env.NODE_ENV!=="production"){P.useEffect(()=>{o!==(e!==void 0)&&console.error([`Base UI: A component is changing the ${o?"":"un"}controlled ${r} state of ${n} to be ${o?"un":""}controlled.`,"Elements should not switch from uncontrolled to controlled (or vice versa).",`Decide between using a controlled or uncontrolled ${n} element for the lifetime of the component.`,"The nature of the state is determined during the first render. It's considered controlled if the value is not `undefined`.","More info: https://fb.me/react-controlled-components"].join(`
5
+ `))},[r,n,e]);const{current:c}=P.useRef(t);P.useEffect(()=>{!o&&JSON.stringify(c)!==JSON.stringify(t)&&console.error([`Base UI: A component is changing the default ${r} state of an uncontrolled ${n} after being initialized. To suppress this warning opt to use a controlled ${n}.`].join(`
6
+ `))},[JSON.stringify(t)])}const l=P.useCallback(c=>{o||s(c)},[]);return[a,l]}const zv={};function Xn(e,t){const n=P.useRef(zv);return n.current===zv&&(n.current=e(t)),n}const Ed=P[`useInsertionEffect${Math.random().toFixed(1)}`.slice(0,-3)],yO=Ed&&Ed!==P.useLayoutEffect?Ed:e=>e();function ut(e){const t=Xn(vO).current;return t.next=e,yO(t.effect),t.trampoline}function vO(){const e={next:void 0,callback:bO,trampoline:(...t)=>e.callback?.(...t),effect:()=>{e.callback=e.next}};return e}function bO(){if(process.env.NODE_ENV!=="production")throw new Error("Base UI: Cannot call an event handler while rendering.")}const pt=typeof document<"u"?P.useLayoutEffect:()=>{};function Cd(e){const t=Xn(xO,e).current;return t.next=e,pt(t.effect),t}function xO(e){const t={current:e,next:e,effect:()=>{t.current=t.next}};return t}let kd;process.env.NODE_ENV!=="production"&&(kd=new Set);function wO(...e){if(process.env.NODE_ENV!=="production"){const t=e.join(" ");kd.has(t)||(kd.add(t),console.warn(`Base UI: ${t}`))}}function pn(){}const Dn=Object.freeze({}),SO={clipPath:"inset(50%)",position:"fixed",top:0,left:0},TO="none",jv="track-press",EO="input-change",CO="focus-out",kO="keyboard",IO="drag";function ei(e,t,n,r){let o=!1,i=!1;const s=r??Dn;return{reason:e,event:t??new Event("base-ui"),cancel(){o=!0},allowPropagation(){i=!0},get isCanceled(){return o},get isPropagationAllowed(){return i},trigger:n,...s}}function Bv(e,t,n){const r=Dn;return{reason:e,event:t??new Event("base-ui"),...r}}function AO(e,t){const n=P.useRef(e),r=ut(t);pt(()=>{n.current!==e&&r(n.current)},[e,r]),pt(()=>{n.current=e},[e])}const Id={...P};let Rv=0;function PO(e,t="mui"){const[n,r]=P.useState(e),o=e||n;return P.useEffect(()=>{n==null&&(Rv+=1,r(`${t}-${Rv}`))},[n,t]),o}const Hv=Id.useId;function il(e,t){if(Hv!==void 0){const n=Hv();return e??(t?`${t}-${n}`:n)}return PO(e,t)}function sl(e){return il(e,"base-ui")}function Nn(e,...t){const n=new URL("https://base-ui.com/production-error");return n.searchParams.set("code",e.toString()),t.forEach(r=>n.searchParams.append("args[]",r)),`Base UI error #${e}; visit ${n} for the full message.`}function Ad(e,t,n,r){const o=Xn(Wv).current;return DO(o,e,t,n,r)&&qv(o,[e,t,n,r]),o.callback}function OO(e){const t=Xn(Wv).current;return NO(t,e)&&qv(t,e),t.callback}function Wv(){return{callback:null,cleanup:null,refs:[]}}function DO(e,t,n,r,o){return e.refs[0]!==t||e.refs[1]!==n||e.refs[2]!==r||e.refs[3]!==o}function NO(e,t){return e.refs.length!==t.length||e.refs.some((n,r)=>n!==t[r])}function qv(e,t){if(e.refs=t,t.every(n=>n==null)){e.callback=null;return}e.callback=n=>{if(e.cleanup&&(e.cleanup(),e.cleanup=null),n!=null){const r=Array(t.length).fill(null);for(let o=0;o<t.length;o+=1){const i=t[o];if(i!=null)switch(typeof i){case"function":{const s=i(n);typeof s=="function"&&(r[o]=s);break}case"object":{i.current=n;break}}}e.cleanup=()=>{for(let o=0;o<t.length;o+=1){const i=t[o];if(i!=null)switch(typeof i){case"function":{const s=r[o];typeof s=="function"?s():i(null);break}case"object":{i.current=null;break}}}}}}}const MO=parseInt(P.version,10);function Pd(e){return MO>=e}function Uv(e){if(!P.isValidElement(e))return null;const t=e,n=t.props;return(Pd(19)?n?.ref:t.ref)??null}function Od(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}function _O(e,t){const n={};for(const r in e){const o=e[r];if(t?.hasOwnProperty(r)){const i=t[r](o);i!=null&&Object.assign(n,i);continue}o===!0?n[`data-${r.toLowerCase()}`]="":o&&(n[`data-${r.toLowerCase()}`]=o.toString())}return n}function FO(e,t){return typeof e=="function"?e(t):e}function LO(e,t){return typeof e=="function"?e(t):e}const ls={};function Dd(e,t,n,r,o){let i={...Nd(e,ls)};return t&&(i=al(i,t)),n&&(i=al(i,n)),r&&(i=al(i,r)),i}function VO(e){if(e.length===0)return ls;if(e.length===1)return Nd(e[0],ls);let t={...Nd(e[0],ls)};for(let n=1;n<e.length;n+=1)t=al(t,e[n]);return t}function al(e,t){return Gv(t)?t(e):$O(e,t)}function $O(e,t){if(!t)return e;for(const n in t){const r=t[n];switch(n){case"style":{e[n]=Od(e.style,r);break}case"className":{e[n]=Yv(e.className,r);break}default:zO(n,r)?e[n]=jO(e[n],r):e[n]=r}}return e}function zO(e,t){const n=e.charCodeAt(0),r=e.charCodeAt(1),o=e.charCodeAt(2);return n===111&&r===110&&o>=65&&o<=90&&(typeof t=="function"||typeof t>"u")}function Gv(e){return typeof e=="function"}function Nd(e,t){return Gv(e)?e(t):e??ls}function jO(e,t){return t?e?n=>{if(BO(n)){const o=n;Md(o);const i=t(o);return o.baseUIHandlerPrevented||e?.(o),i}const r=t(n);return e?.(n),r}:t:e}function Md(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function Yv(e,t){return t?e?t+" "+e:t:e}function BO(e){return e!=null&&typeof e=="object"&&"nativeEvent"in e}function ln(e,t,n={}){const r=t.render,o=RO(t,n);if(n.enabled===!1)return null;const i=n.state??Dn;return WO(e,r,o,i)}function RO(e,t={}){const{className:n,style:r,render:o}=e,{state:i=Dn,ref:s,props:a,stateAttributesMapping:l,enabled:c=!0}=t,u=c?FO(n,i):void 0,d=c?LO(r,i):void 0,f=c?_O(i,l):Dn,h=c?Od(f,Array.isArray(a)?VO(a):a)??Dn:Dn;return typeof document<"u"&&(c?Array.isArray(s)?h.ref=OO([h.ref,Uv(o),...s]):h.ref=Ad(h.ref,Uv(o),s):Ad(null,null)),c?(u!==void 0&&(h.className=Yv(h.className,u)),d!==void 0&&(h.style=Od(h.style,d)),h):Dn}const HO=Symbol.for("react.lazy");function WO(e,t,n,r){if(t){if(typeof t=="function")return t(n,r);const o=Dd(n,t.props);o.ref=n.ref;let i=t;if(i?.$$typeof===HO&&(i=P.Children.toArray(t)[0]),process.env.NODE_ENV!=="production"&&!P.isValidElement(i))throw new Error(["Base UI: The `render` prop was provided an invalid React element as `React.isValidElement(render)` is `false`.","A valid React element must be provided to the `render` prop because it is cloned with props to replace the default element.","https://base-ui.com/r/invalid-render-prop"].join(`
7
+ `));return P.cloneElement(i,o)}if(e&&typeof e=="string")return qO(e,n);throw new Error(process.env.NODE_ENV!=="production"?"Base UI: Render element or function are not defined.":Nn(8))}function qO(e,t){return e==="button"?S.createElement("button",{type:"button",...t,key:t.key}):e==="img"?S.createElement("img",{alt:"",...t,key:t.key}):P.createElement(e,t)}function Mn(e,t=Number.MIN_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,n))}function Kv(e,t,n=(r,o)=>r===o){return e.length===t.length&&e.every((r,o)=>n(r,t[o]))}const cs=typeof navigator<"u",_d=ZO(),UO=QO(),GO=XO();typeof CSS>"u"||!CSS.supports||CSS.supports("-webkit-backdrop-filter:none"),_d.platform==="MacIntel"&&_d.maxTouchPoints>1||/iP(hone|ad|od)|iOS/.test(_d.platform);const YO=cs&&/apple/i.test(navigator.vendor);cs&&UO.toLowerCase().startsWith("mac")&&navigator.maxTouchPoints;const KO=GO.includes("jsdom/");function ZO(){if(!cs)return{platform:"",maxTouchPoints:-1};const e=navigator.userAgentData;return e?.platform?{platform:e.platform,maxTouchPoints:navigator.maxTouchPoints}:{platform:navigator.platform??"",maxTouchPoints:navigator.maxTouchPoints??-1}}function XO(){if(!cs)return"";const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(({brand:t,version:n})=>`${t}/${n}`).join(" "):navigator.userAgent}function QO(){if(!cs)return"";const e=navigator.userAgentData;return e?.platform?e.platform:navigator.platform??""}function ho(e){let t=e.activeElement;for(;t?.shadowRoot?.activeElement!=null;)t=t.shadowRoot.activeElement;return t}function _r(e,t){if(!e||!t)return!1;const n=t.getRootNode?.();if(e.contains(t))return!0;if(n&&Qi(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function Fd(e){return"composedPath"in e?e.composedPath()[0]:e.target}function Ld(e){if(!e||KO)return!0;try{return e.matches(":focus-visible")}catch{return!0}}const Zv=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function Xv(e,t){const n=Wo(e,Zv()),r=n.length;if(r===0)return;const o=ho(an(e)),i=n.indexOf(o),s=i===-1?t===1?0:r-1:i+t;return n[s]}function JO(e){return Xv(an(e).body,1)||e}function eD(e){return Xv(an(e).body,-1)||e}function Vd(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!_r(n,r)}function tD(e){Wo(e,Zv()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function Qv(e){e.querySelectorAll("[data-tabindex]").forEach(n=>{const r=n.dataset.tabindex;delete n.dataset.tabindex,r?n.setAttribute("tabindex",r):n.removeAttribute("tabindex")})}const $d=P.createContext({register:()=>{},unregister:()=>{},subscribeMapChange:()=>()=>{},elementsRef:{current:[]},nextIndexRef:{current:0}});process.env.NODE_ENV!=="production"&&($d.displayName="CompositeListContext");function nD(){return P.useContext($d)}function rD(e){const{children:t,elementsRef:n,labelsRef:r,onMapChange:o}=e,i=ut(o),s=P.useRef(0),a=Xn(iD).current,l=Xn(oD).current,[c,u]=P.useState(0),d=P.useRef(c),f=ut((v,b)=>{l.set(v,b??null),d.current+=1,u(d.current)}),h=ut(v=>{l.delete(v),d.current+=1,u(d.current)}),g=P.useMemo(()=>{const v=new Map;return Array.from(l.keys()).filter(x=>x.isConnected).sort(sD).forEach((x,T)=>{const E=l.get(x)??{};v.set(x,{...E,index:T})}),v},[l,c]);pt(()=>{if(typeof MutationObserver!="function"||g.size===0)return;const v=new MutationObserver(b=>{const x=new Set,T=E=>x.has(E)?x.delete(E):x.add(E);b.forEach(E=>{E.removedNodes.forEach(T),E.addedNodes.forEach(T)}),x.size===0&&(d.current+=1,u(d.current))});return g.forEach((b,x)=>{x.parentElement&&v.observe(x.parentElement,{childList:!0})}),()=>{v.disconnect()}},[g]),pt(()=>{d.current===c&&(n.current.length!==g.size&&(n.current.length=g.size),r&&r.current.length!==g.size&&(r.current.length=g.size),s.current=g.size),i(g)},[i,g,n,r,c]),pt(()=>()=>{n.current=[]},[n]),pt(()=>()=>{r&&(r.current=[])},[r]);const y=ut(v=>(a.add(v),()=>{a.delete(v)}));pt(()=>{a.forEach(v=>v(g))},[a,g]);const m=P.useMemo(()=>({register:f,unregister:h,subscribeMapChange:y,elementsRef:n,labelsRef:r,nextIndexRef:s}),[f,h,y,n,r,s]);return p.jsx($d.Provider,{value:m,children:t})}function oD(){return new Map}function iD(){return new Set}function sD(e,t){const n=e.compareDocumentPosition(t);return n&Node.DOCUMENT_POSITION_FOLLOWING||n&Node.DOCUMENT_POSITION_CONTAINED_BY?-1:n&Node.DOCUMENT_POSITION_PRECEDING||n&Node.DOCUMENT_POSITION_CONTAINS?1:0}function aD(e,t){return{...e,state:{...e.state,valid:!t&&e.state.valid}}}const Jv=P.createContext({formRef:{current:{fields:new Map}},errors:{},clearErrors:pn,validationMode:"onSubmit",submitAttemptedRef:{current:!1}});process.env.NODE_ENV!=="production"&&(Jv.displayName="FormContext");function eb(){return P.useContext(Jv)}let tb=(function(e){return e.disabled="data-disabled",e.valid="data-valid",e.invalid="data-invalid",e.touched="data-touched",e.dirty="data-dirty",e.filled="data-filled",e.focused="data-focused",e})({});const lD={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:null,valueMissing:!1},cD={valid(e){return e===null?null:e?{[tb.valid]:""}:{[tb.invalid]:""}}},nb=P.createContext({invalid:void 0,name:void 0,validityData:{state:lD,errors:[],error:"",value:"",initialValue:null},setValidityData:pn,disabled:void 0,touched:!1,setTouched:pn,dirty:!1,setDirty:pn,filled:!1,setFilled:pn,focused:!1,setFocused:pn,validate:()=>null,validationMode:"onSubmit",validationDebounceTime:0,shouldValidateOnChange:()=>!1,state:{disabled:!1,valid:null,touched:!1,dirty:!1,filled:!1,focused:!1},markedDirtyRef:{current:!1},validation:{getValidationProps:(e=Dn)=>e,getInputValidationProps:(e=Dn)=>e,inputRef:{current:null},commit:async()=>{}}});process.env.NODE_ENV!=="production"&&(nb.displayName="FieldRootContext");function zd(e=!0){const t=P.useContext(nb);if(t.setValidityData===pn&&!e)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: FieldRootContext is missing. Field parts must be placed within <Field.Root>.":Nn(28));return t}function uD(e){const{enabled:t=!0,value:n,id:r,name:o,controlRef:i,commit:s}=e,{formRef:a}=eb(),{invalid:l,markedDirtyRef:c,validityData:u,setValidityData:d}=zd(),f=ut(e.getValue);pt(()=>{if(!t)return;let h=n;h===void 0&&(h=f()),u.initialValue===null&&h!==null&&d(g=>({...g,initialValue:h}))},[t,d,n,u.initialValue,f]),pt(()=>{!t||!r||a.current.fields.set(r,{getValue:f,name:o,controlRef:i,validityData:aD(u,l),validate(h=!0){let g=n;g===void 0&&(g=f()),c.current=!0,h?ur.flushSync(()=>s(g)):s(g)}})},[s,i,t,a,f,r,l,c,o,u,n]),pt(()=>{const h=a.current.fields;return()=>{r&&h.delete(r)}},[a,r])}const rb=P.createContext({controlId:void 0,registerControlId:pn,labelId:void 0,setLabelId:pn,messageIds:[],setMessageIds:pn,getDescriptionProps:e=>e});process.env.NODE_ENV!=="production"&&(rb.displayName="LabelableContext");function ob(){return P.useContext(rb)}function ib(e,t){return e-t}function dD(e,t,n){const r=e.slice();return r[t]=n,r.sort(ib)}function sb(e,t,n,r,o,i){let s=e;return s=Mn(s,n,r),o&&(s=dD(i,t,Mn(s,i[t-1]||-1/0,i[t+1]||1/0))),s}function ab(e,t,n){if(!Array.isArray(e))return!0;const r=e.reduce((o,i,s,a)=>(s===a.length-1||o.push(Math.abs(i-a[s+1])),o),[]);return Math.min(...r)>=t*n}const us={activeThumbIndex:()=>null,max:()=>null,min:()=>null,minStepsBetweenValues:()=>null,step:()=>null,values:()=>null,...cD},jd=P.createContext(void 0);process.env.NODE_ENV!=="production"&&(jd.displayName="SliderRootContext");function ll(){const e=P.useContext(jd);if(e===void 0)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: SliderRootContext is missing. Slider parts must be placed within <Slider.Root>.":Nn(62));return e}function fD(e){return"key"in e?kO:EO}function pD(e,t){return typeof e=="number"&&typeof t=="number"?e===t:Array.isArray(e)&&Array.isArray(t)?Kv(e,t):!1}const lb=P.forwardRef(function(t,n){const{"aria-labelledby":r,className:o,defaultValue:i,disabled:s=!1,id:a,format:l,largeStep:c=10,locale:u,render:d,max:f=100,min:h=0,minStepsBetweenValues:g=0,name:y,onValueChange:m,onValueCommitted:v,orientation:b="horizontal",step:x=1,thumbCollisionBehavior:T="push",thumbAlignment:E="center",value:I,...w}=t,C=sl(a),A=ut(m),O=ut(v),{clearErrors:_}=eb(),{state:N,disabled:$,name:D,setTouched:F,setDirty:z,validityData:M,shouldValidateOnChange:k,validation:V}=zd(),{labelId:L}=ob(),R=r??L,U=$||s,G=D??y,[H,ee]=gO({controlled:I,default:i??h,name:"Slider"}),se=P.useRef(null),te=P.useRef(null),q=P.useRef([]),Y=P.useRef(null),Z=P.useRef(null),pe=P.useRef(-1),B=P.useRef(null),ae=P.useRef(null),ce=P.useRef("none"),Q=Cd(l),[ue,oe]=P.useState(-1),[he,ie]=P.useState(-1),[le,be]=P.useState(!1),[de,re]=P.useState(()=>new Map),[J,j]=P.useState([void 0,void 0]),X=ut(Re=>{oe(Re),Re!==-1&&ie(Re)});uD({id:C,commit:V.commit,value:H,controlRef:te,name:G,getValue:()=>H}),AO(H,()=>{_(G),k()?V.commit(H):V.commit(H,!0);const Re=M.initialValue;let W;Array.isArray(H)&&Array.isArray(Re)?W=!Kv(H,Re):W=H!==Re,z(W)});const me=ut(Re=>{Re&&(te.current=Re)}),ve=Array.isArray(H),Ce=P.useMemo(()=>ve?H.slice().sort(ib):[Mn(H,h,f)],[f,h,ve,H]),Me=ut((Re,W)=>{if(Number.isNaN(Re)||pD(Re,H))return;const K=W??ei(TO,void 0,void 0,{activeThumbIndex:-1});ce.current=K.reason;const Oe=K.event,Ue=Oe.constructor??Event,Ye=new Ue(Oe.type,Oe);Object.defineProperty(Ye,"target",{writable:!0,value:{value:Re,name:G}}),K.event=Ye,ae.current=Re,A(Re,K),!K.isCanceled&&ee(Re)}),_e=ut((Re,W,K)=>{const Oe=sb(Re,W,h,f,ve,Ce);if(ab(Oe,x,g)){const Ue=fD(K);Me(Oe,ei(Ue,K.nativeEvent,void 0,{activeThumbIndex:W})),F(!0);const Ye=ae.current??Oe;O(Ye,Bv(Ue,K.nativeEvent))}});process.env.NODE_ENV!=="production"&&h>=f&&wO("Slider `max` must be greater than `min`."),pt(()=>{const Re=ho(an(se.current));U&&Re&&se.current?.contains(Re)&&Re.blur()},[U]),U&&ue!==-1&&X(-1);const ct=P.useMemo(()=>({...N,activeThumbIndex:ue,disabled:U,dragging:le,orientation:b,max:f,min:h,minStepsBetweenValues:g,step:x,values:Ce}),[N,ue,U,le,f,h,g,b,x,Ce]),_t=P.useMemo(()=>({active:ue,controlRef:te,disabled:U,dragging:le,validation:V,formatOptionsRef:Q,handleInputChange:_e,indicatorPosition:J,inset:E!=="center",labelId:R,largeStep:c,lastUsedThumbIndex:he,lastChangedValueRef:ae,lastChangeReasonRef:ce,locale:u,max:f,min:h,minStepsBetweenValues:g,name:G,onValueCommitted:O,orientation:b,pressedInputRef:Y,pressedThumbCenterOffsetRef:Z,pressedThumbIndexRef:pe,pressedValuesRef:B,registerFieldControlRef:me,renderBeforeHydration:E==="edge",setActive:X,setDragging:be,setIndicatorPosition:j,setValue:Me,state:ct,step:x,thumbCollisionBehavior:T,thumbMap:de,thumbRefs:q,values:Ce}),[ue,te,R,U,le,V,Q,_e,J,c,he,ae,ce,u,f,h,g,G,O,b,Y,Z,pe,B,me,X,be,j,Me,ct,x,T,E,de,q,Ce]),Qt=ln("div",t,{state:ct,ref:[n,se],props:[{"aria-labelledby":R,id:C,role:"group"},V.getValidationProps,w],stateAttributesMapping:us});return p.jsx(jd.Provider,{value:_t,children:p.jsx(rD,{elementsRef:q,onMapChange:re,children:Qt})})});process.env.NODE_ENV!=="production"&&(lb.displayName="SliderRoot");const cb=new Map;function hD(e,t){const n=JSON.stringify({locale:e,options:t}),r=cb.get(n);if(r)return r;const o=new Intl.NumberFormat(e,t);return cb.set(n,o),o}function ti(e,t,n){return e==null?"":hD(t,n).format(e)}function mD(e,t,n){return e==null?"":n?ti(e,t,n):ti(e/100,t,{style:"percent"})}const gD=[];function ds(e){P.useEffect(e,gD)}const cl=null;let ub=globalThis.requestAnimationFrame;class yD{callbacks=[];callbacksCount=0;nextId=1;startId=1;isScheduled=!1;tick=t=>{this.isScheduled=!1;const n=this.callbacks,r=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,r>0)for(let o=0;o<n.length;o+=1)n[o]?.(t)};request(t){const n=this.nextId;this.nextId+=1,this.callbacks.push(t),this.callbacksCount+=1;const r=process.env.NODE_ENV!=="production"&&ub!==requestAnimationFrame&&(ub=requestAnimationFrame,!0);return(!this.isScheduled||r)&&(requestAnimationFrame(this.tick),this.isScheduled=!0),n}cancel(t){const n=t-this.startId;n<0||n>=this.callbacks.length||(this.callbacks[n]=null,this.callbacksCount-=1)}}const ul=new yD;class Bd{static create(){return new Bd}static request(t){return ul.request(t)}static cancel(t){return ul.cancel(t)}currentId=cl;request(t){this.cancel(),this.currentId=ul.request(()=>{this.currentId=cl,t()})}cancel=()=>{this.currentId!==cl&&(ul.cancel(this.currentId),this.currentId=cl)};disposeEffect=()=>this.cancel}function db(){const e=Xn(Bd.create).current;return ds(e.disposeEffect),e}const fb=P.createContext(void 0);process.env.NODE_ENV!=="production"&&(fb.displayName="DirectionContext");function pb(){return P.useContext(fb)?.direction??"ltr"}function hb(e){const t=e.getBoundingClientRect();return{x:(t.left+t.right)/2,y:(t.top+t.bottom)/2}}function vD(e){if(Math.abs(e)<1){const n=e.toExponential().split("e-"),r=n[0].split(".")[1];return(r?r.length:0)+parseInt(n[1],10)}const t=e.toString().split(".")[1];return t?t.length:0}function mb(e,t,n){const r=Math.round((e-n)/t)*t+n;return Number(r.toFixed(vD(t)))}function gb({values:e,index:t,nextValue:n,min:r,max:o,step:i,minStepsBetweenValues:s,initialValues:a}){if(e.length===0)return[];const l=e.slice(),c=i*s,u=l.length-1,d=a??e,f=r+t*c,h=o-(u-t)*c;l[t]=Mn(n,f,h);for(let g=t+1;g<=u;g+=1){const y=l[g-1]+c,m=o-(u-g)*c,v=d[g]??l[g];let b=Math.max(l[g],y);v<b&&(b=Math.max(v,y)),l[g]=Mn(b,y,m)}for(let g=t-1;g>=0;g-=1){const y=l[g+1]-c,m=r+g*c,v=d[g]??l[g];let b=Math.min(l[g],y);v>b&&(b=Math.min(v,y)),l[g]=Mn(b,m,y)}for(let g=0;g<=u;g+=1)l[g]=Number(l[g].toFixed(12));return l}function bD({behavior:e,values:t,currentValues:n,initialValues:r,pressedIndex:o,nextValue:i,min:s,max:a,step:l,minStepsBetweenValues:c}){const u=n??t,d=r??t;if(!(u.length>1))return{value:i,thumbIndex:0,didSwap:!1};const h=l*c;switch(e){case"swap":{const g=u[o],y=1e-7,m=u.slice(),v=m[o-1],b=m[o+1],x=v!=null?v+h:s,T=b!=null?b-h:a,E=Mn(i,x,T),I=Number(E.toFixed(12));m[o]=I;const w=i>g,C=i<g,A=w&&b!=null&&i>=b-y,O=C&&v!=null&&i<=v+y;if(!A&&!O)return{value:m,thumbIndex:o,didSwap:!1};const _=A?o+1:o-1,N=m.map((z,M)=>{if(M===o)return I;const k=d[M];return k??u[M]});let $=i;A?$=Math.max(i,m[_]):$=Math.min(i,m[_]);const D=gb({values:m,index:_,nextValue:$,min:s,max:a,step:l,minStepsBetweenValues:c,initialValues:N}),F=A?_-1:_+1;if(F>=0&&F<D.length){const z=D[F-1],M=D[F+1];let k=z!=null?z+h:s;k=Math.max(k,s+F*h);let V=M!=null?M-h:a;V=Math.min(V,a-(D.length-1-F)*h);const L=Mn(I,k,V);D[F]=Number(L.toFixed(12))}return{value:D,thumbIndex:_,didSwap:!0}}case"push":return{value:gb({values:u,index:o,nextValue:i,min:s,max:a,step:l,minStepsBetweenValues:c}),thumbIndex:o,didSwap:!1};default:{const g=u.slice(),y=g[o-1],m=g[o+1],v=y!=null?y+h:s,b=m!=null?m-h:a,x=Mn(i,v,b);return g[o]=Number(x.toFixed(12)),{value:g,thumbIndex:o,didSwap:!1}}}}const xD=2;function wD(e,t){if(!e)return{start:0,end:0};function n(i){const s=i!=null?parseFloat(i):0;return Number.isNaN(s)?0:s}const r=t?"Top":"InlineStart",o=t?"Bottom":"InlineEnd";return{start:n(e[`border${r}Width`])+n(e[`padding${r}`]),end:n(e[`border${o}Width`])+n(e[`padding${o}`])}}function dl(e,t){if(t.current!=null&&e.changedTouches){const n=e;for(let r=0;r<n.changedTouches.length;r+=1){const o=n.changedTouches[r];if(o.identifier===t.current)return{x:o.clientX,y:o.clientY}}return null}return{x:e.clientX,y:e.clientY}}const yb=P.forwardRef(function(t,n){const{render:r,className:o,...i}=t,{disabled:s,dragging:a,validation:l,inset:c,lastChangedValueRef:u,lastChangeReasonRef:d,max:f,min:h,minStepsBetweenValues:g,onValueCommitted:y,orientation:m,pressedInputRef:v,pressedThumbCenterOffsetRef:b,pressedThumbIndexRef:x,pressedValuesRef:T,registerFieldControlRef:E,renderBeforeHydration:I,setActive:w,setDragging:C,setValue:A,state:O,step:_,thumbCollisionBehavior:N,thumbRefs:$,values:D}=ll(),F=pb(),z=D.length>1,M=m==="vertical",k=P.useRef(null),V=P.useRef(null),L=ut(Q=>{Q&&V.current==null&&V.current==null&&(V.current=getComputedStyle(Q))}),R=P.useRef(null),U=P.useRef(0),G=P.useRef(0),H=Cd(D),ee=ut(Q=>{x.current!==Q&&(x.current=Q);const ue=$.current[Q];if(!ue){b.current=null,v.current=null;return}v.current=ue.querySelector('input[type="range"]')}),se=ut(Q=>{const ue=k.current;if(!ue)return null;const{width:oe,height:he,bottom:ie,left:le,right:be}=ue.getBoundingClientRect(),de=wD(V.current,M),re=G.current,J=(M?he:oe)-de.start-de.end-re*2,j=b.current??0,X=Q.x-j,me=Q.y-j,ve=M?ie-me-de.end:(F==="rtl"?be-X:X-le)-de.start,Ce=Mn((ve-re)/J,0,1);let Me=(f-h)*Ce+h;if(Me=mb(Me,_,h),Me=Mn(Me,h,f),!z)return{value:Me,thumbIndex:0,didSwap:!1};const _e=x.current;if(_e<0)return null;const ct=bD({behavior:N,values:D,currentValues:H.current??D,initialValues:T.current,pressedIndex:_e,nextValue:Me,min:h,max:f,step:_,minStepsBetweenValues:g});return N==="swap"&&ct.didSwap?ee(ct.thumbIndex):x.current=ct.thumbIndex,ct}),te=ut(Q=>{T.current=z?D.slice():null,H.current=D;const ue=x.current;let oe=ue;if(ue>-1&&ue<D.length){if(D[ue]===f){let he=ue;for(;he>0&&D[he-1]===f;)he-=1;oe=he}}else{const he=M?"y":"x";let ie;oe=-1;for(let le=0;le<$.current.length;le+=1){const be=$.current[le];if(tt(be)){const de=hb(be),re=Math.abs(Q[he]-de[he]);(ie===void 0||re<=ie)&&(oe=le,ie=re)}}}if(oe>-1&&oe!==ue&&ee(oe),c){const he=$.current[oe];if(tt(he)){const ie=he.getBoundingClientRect(),le=M?"height":"width";G.current=ie[le]/2}}}),q=ut(Q=>{$.current?.[Q]?.querySelector('input[type="range"]')?.focus({preventScroll:!0})}),Y=ut(Q=>{const ue=dl(Q,R);if(ue==null)return;if(U.current+=1,Q.type==="pointermove"&&Q.buttons===0){Z(Q);return}const oe=se(ue);oe!=null&&ab(oe.value,_,g)&&(!a&&U.current>xD&&C(!0),A(oe.value,ei(IO,Q,void 0,{activeThumbIndex:oe.thumbIndex})),H.current=Array.isArray(oe.value)?oe.value:[oe.value],oe.didSwap&&q(oe.thumbIndex))});function Z(Q){w(-1),C(!1),v.current=null,b.current=null;const ue=dl(Q,R),oe=ue!=null?se(ue):null;if(oe!=null){const he=d.current;l.commit(u.current??oe.value),y(u.current??oe.value,Bv(he,Q))}"pointerType"in Q&&k.current?.hasPointerCapture(Q.pointerId)&&k.current?.releasePointerCapture(Q.pointerId),x.current=-1,R.current=null,T.current=null,B()}const pe=ut(Q=>{if(s)return;const ue=Q.changedTouches[0];ue!=null&&(R.current=ue.identifier);const oe=dl(Q,R);if(oe!=null){te(oe);const ie=se(oe);if(ie==null)return;q(ie.thumbIndex),A(ie.value,ei(jv,Q,void 0,{activeThumbIndex:ie.thumbIndex})),H.current=Array.isArray(ie.value)?ie.value:[ie.value],ie.didSwap&&q(ie.thumbIndex)}U.current=0;const he=an(k.current);he.addEventListener("touchmove",Y,{passive:!0}),he.addEventListener("touchend",Z,{passive:!0})}),B=ut(()=>{const Q=an(k.current);Q.removeEventListener("pointermove",Y),Q.removeEventListener("pointerup",Z),Q.removeEventListener("touchmove",Y),Q.removeEventListener("touchend",Z),T.current=null}),ae=db();return P.useEffect(()=>{const Q=k.current;return Q?(Q.addEventListener("touchstart",pe,{passive:!0}),()=>{Q.removeEventListener("touchstart",pe),ae.cancel(),B()}):()=>B()},[B,pe,k,ae]),P.useEffect(()=>{s&&B()},[s,B]),ln("div",t,{state:O,ref:[n,E,k,L],props:[{"data-base-ui-slider-control":I?"":void 0,onPointerDown(Q){const ue=k.current;if(!ue||s||Q.defaultPrevented||!tt(Q.target)||Q.button!==0)return;const oe=dl(Q,R);if(oe!=null){te(oe);const ie=se(oe);if(ie==null)return;_r($.current[ie.thumbIndex],ho(an(ue)))?Q.preventDefault():ae.request(()=>{q(ie.thumbIndex)}),C(!0),b.current!=null||(A(ie.value,ei(jv,Q.nativeEvent,void 0,{activeThumbIndex:ie.thumbIndex})),H.current=Array.isArray(ie.value)?ie.value:[ie.value],ie.didSwap&&q(ie.thumbIndex))}Q.nativeEvent.pointerId&&ue.setPointerCapture(Q.nativeEvent.pointerId),U.current=0;const he=an(k.current);he.addEventListener("pointermove",Y,{passive:!0}),he.addEventListener("pointerup",Z,{once:!0})},tabIndex:-1},i],stateAttributesMapping:us})});process.env.NODE_ENV!=="production"&&(yb.displayName="SliderControl");const vb=P.forwardRef(function(t,n){const{render:r,className:o,...i}=t,{state:s}=ll();return ln("div",t,{state:s,ref:n,props:[{style:{position:"relative"}},i],stateAttributesMapping:us})});process.env.NODE_ENV!=="production"&&(vb.displayName="SliderTrack");const fl={...{clipPath:"inset(50%)",overflow:"hidden",whiteSpace:"nowrap",border:0,padding:0,width:1,height:1,margin:-1},position:"fixed",top:0,left:0};function pl(e,t,n){return(e-t)*100/(n-t)}const hl="ArrowUp",ml="ArrowDown",gl="ArrowLeft",yl="ArrowRight",vl="Home",bl="End",SD=new Set([gl,yl]),TD=new Set([hl,ml]),ED=new Set([...SD,...TD]);[...ED];const CD=new Set([hl,ml,gl,yl,vl,bl]);let kD=(function(e){return e[e.None=0]="None",e[e.GuessFromOrder=1]="GuessFromOrder",e})({});function ID(e={}){const{label:t,metadata:n,textRef:r,indexGuessBehavior:o,index:i}=e,{register:s,unregister:a,subscribeMapChange:l,elementsRef:c,labelsRef:u,nextIndexRef:d}=nD(),f=P.useRef(-1),[h,g]=P.useState(i??(o===kD.GuessFromOrder?()=>{if(f.current===-1){const v=d.current;d.current+=1,f.current=v}return f.current}:-1)),y=P.useRef(null),m=P.useCallback(v=>{if(y.current=v,h!==-1&&v!==null&&(c.current[h]=v,u)){const b=t!==void 0;u.current[h]=b?t:r?.current?.textContent??v.textContent}},[h,c,u,t,r]);return pt(()=>{if(i!=null)return;const v=y.current;if(v)return s(v,n),()=>{a(v)}},[i,s,a,n]),pt(()=>{if(i==null)return l(v=>{const b=y.current?v.get(y.current)?.index:null;b!=null&&g(b)})},[i,l,g]),P.useMemo(()=>({ref:m,index:h}),[h,m])}const bb=P.createContext(void 0);process.env.NODE_ENV!=="production"&&(bb.displayName="CSPContext");const AD={disableStyleElements:!1};function PD(){return P.useContext(bb)??AD}function OD(e={}){const{id:t,implicit:n=!1,controlRef:r}=e,{controlId:o,registerControlId:i}=ob(),s=sl(t),a=n?o:void 0,l=Xn(()=>Symbol("labelable-control")),c=P.useRef(!1),u=P.useRef(t!=null),d=ut(()=>{!c.current||i===pn||(c.current=!1,i(l.current,void 0))});return pt(()=>{if(i===pn)return;let f;if(n){const h=r?.current;tt(h)&&h.closest("label")!=null?f=t??null:f=a??s}else if(t!=null)u.current=!0,f=t;else if(u.current)f=s;else{d();return}if(f===void 0){d();return}c.current=!0,i(l.current,f)},[t,r,a,i,n,s,l,d]),P.useEffect(()=>d,[d]),o??s}let DD=(function(e){return e.index="data-index",e.dragging="data-dragging",e.orientation="data-orientation",e.disabled="data-disabled",e.valid="data-valid",e.invalid="data-invalid",e.touched="data-touched",e.dirty="data-dirty",e.focused="data-focused",e})({});const ND='!function(){const t=document.currentScript?.parentElement;if(!t)return;const e=t.closest("[data-base-ui-slider-control]");if(!e)return;const r=e.querySelector("[data-base-ui-slider-indicator]"),i=e.getBoundingClientRect(),n="vertical"===e.getAttribute("data-orientation")?"height":"width",o=e.querySelectorAll(\'input[type="range"]\'),l=o.length>1,s=o.length-1;let a=null,u=null;for(let t=0;t<o.length;t+=1){const e=o[t],y=parseFloat(e.getAttribute("value")??"");if(Number.isNaN(y))return;const c=e.parentElement;if(!c)return;const p=parseFloat(e.getAttribute("max")??"100"),g=parseFloat(e.getAttribute("min")??"0"),b=c?.getBoundingClientRect(),d=i[n]-b[n],m=100*(y-g)/(p-g),v=(b[n]/2+d*m/100)/i[n]*100;c.style.setProperty("--position",`${v}%`),Number.isFinite(v)&&(c.style.removeProperty("visibility"),r&&(0===t?(a=v,r.style.setProperty("--start-position",`${v}%`),l||r.style.removeProperty("visibility")):t===s&&(u=v-(a??0),r.style.setProperty("--end-position",`${v}%`),r.style.setProperty("--relative-size",`${u}%`),r.style.removeProperty("visibility"))))}}();',xb="PageUp",wb="PageDown",MD=new Set([hl,ml,gl,yl,vl,bl,xb,wb]);function _D(e,t,n,r){if(!(t<0))return e.length===2?t===0?`${ti(e[t],r,n)} start range`:`${ti(e[t],r,n)} end range`:n?ti(e[t],r,n):void 0}function ni(e,t,n,r,o){return n===1?Math.min(e+t,o):Math.max(e-t,r)}const Sb=P.forwardRef(function(t,n){const{render:r,children:o,className:i,"aria-describedby":s,"aria-label":a,"aria-labelledby":l,disabled:c=!1,getAriaLabel:u,getAriaValueText:d,id:f,index:h,inputRef:g,onBlur:y,onFocus:m,onKeyDown:v,tabIndex:b,...x}=t,{nonce:T}=PD(),E=sl(f),{active:I,lastUsedThumbIndex:w,controlRef:C,disabled:A,validation:O,formatOptionsRef:_,handleInputChange:N,inset:$,labelId:D,largeStep:F,locale:z,max:M,min:k,minStepsBetweenValues:V,name:L,orientation:R,pressedInputRef:U,pressedThumbCenterOffsetRef:G,pressedThumbIndexRef:H,renderBeforeHydration:ee,setActive:se,setIndicatorPosition:te,state:q,step:Y,values:Z}=ll(),pe=pb(),B=c||A,ae=Z.length>1,ce=R==="vertical",Q=pe==="rtl",{setTouched:ue,setFocused:oe,validationMode:he}=zd(),ie=P.useRef(null),le=P.useRef(null),be=sl(),de=OD(),re=ae?be:de,J=P.useMemo(()=>({inputId:re}),[re]),{ref:j,index:X}=ID({metadata:J}),me=ae?h??X:0,ve=me===Z.length-1,Ce=Z[me],Me=pl(Ce,k,M),[_e,ct]=P.useState(!1),[_t,Qt]=P.useState();ds(()=>ct(!0));const Re=w>=0&&w<Z.length?w:-1,W=ut(()=>{const ot=C.current,gt=ie.current;if(!ot||!gt)return;const it=gt.getBoundingClientRect(),wn=ot.getBoundingClientRect(),to=ce?"height":"width",no=wn[to]-it[to],Ri=(it[to]/2+no*Me/100)/wn[to]*100;Qt(Ri),me===0?te(Hi=>[Ri,Hi[1]]):ve&&te(Hi=>[Hi[0],Ri])});pt(()=>{$&&queueMicrotask(W)},[W,$]),pt(()=>{$&&W()},[W,$,Me]);const K=P.useCallback(()=>{const ot=ce?"bottom":"insetInlineStart",gt=ce?"left":"top";let it;return ae?I===me?it=2:Re===me&&(it=1):I===me&&(it=1),$?{"--position":`${_t}%`,visibility:ee&&!_e||_t===void 0?"hidden":void 0,position:"absolute",[ot]:"var(--position)",[gt]:"50%",translate:`${(ce||!Q?-1:1)*50}% ${(ce?1:-1)*50}%`,zIndex:it}:Number.isFinite(Me)?{position:"absolute",[ot]:`${Me}%`,[gt]:"50%",translate:`${(ce||!Q?-1:1)*50}% ${(ce?1:-1)*50}%`,zIndex:it}:fl},[I,me,$,_e,_t,ae,ee,Q,Re,Me,ce]);let Oe;R==="vertical"&&(Oe=Q?"vertical-rl":"vertical-lr");const Ue=Dd({"aria-label":typeof u=="function"?u(me):a,"aria-labelledby":l??D,"aria-describedby":s,"aria-orientation":R,"aria-valuenow":Ce,"aria-valuetext":typeof d=="function"?d(ti(Ce,z,_.current??void 0),Ce,me):_D(Z,me,_.current??void 0,z),disabled:B,id:re,max:M,min:k,name:L,onChange(ot){N(ot.target.valueAsNumber,me,ot)},onFocus(){se(me),oe(!0)},onBlur(){ie.current&&(se(-1),ue(!0),oe(!1),he==="onBlur"&&O.commit(sb(Ce,me,k,M,ae,Z)))},onKeyDown(ot){if(!MD.has(ot.key))return;CD.has(ot.key)&&ot.stopPropagation();let gt=null;const it=mb(Ce,Y,k);switch(ot.key){case hl:gt=ni(it,ot.shiftKey?F:Y,1,k,M);break;case yl:gt=ni(it,ot.shiftKey?F:Y,Q?-1:1,k,M);break;case ml:gt=ni(it,ot.shiftKey?F:Y,-1,k,M);break;case gl:gt=ni(it,ot.shiftKey?F:Y,Q?1:-1,k,M);break;case xb:gt=ni(it,F,1,k,M);break;case wb:gt=ni(it,F,-1,k,M);break;case bl:gt=M,ae&&(gt=Number.isFinite(Z[me+1])?Z[me+1]-Y*V:M);break;case vl:gt=k,ae&&(gt=Number.isFinite(Z[me-1])?Z[me-1]+Y*V:k);break}gt!==null&&(N(gt,me,ot),ot.preventDefault())},step:Y,style:{...fl,width:"100%",height:"100%",writingMode:Oe},tabIndex:b??void 0,type:"range",value:Ce??""},O.getInputValidationProps),Ye=Ad(le,O.inputRef,g);return ln("div",t,{state:q,ref:[n,j,ie],props:[{[DD.index]:me,children:p.jsxs(P.Fragment,{children:[o,p.jsx("input",{ref:Ye,...Ue}),$&&!_e&&ee&&ve&&p.jsx("script",{nonce:T,dangerouslySetInnerHTML:{__html:ND},suppressHydrationWarning:!0})]}),id:E,onBlur:y,onFocus:m,onPointerDown(ot){if(H.current=me,ie.current!=null){const gt=R==="horizontal"?"x":"y",it=hb(ie.current),wn=(R==="horizontal"?ot.clientX:ot.clientY)-it[gt];G.current=wn}le.current!=null&&U.current!==le.current&&(U.current=le.current)},style:K(),suppressHydrationWarning:ee||void 0,tabIndex:-1},x],stateAttributesMapping:us})});process.env.NODE_ENV!=="production"&&(Sb.displayName="SliderThumb");function FD(e,t,n,r,o,i){const s=n===void 0||t&&r===void 0?"hidden":void 0,a=e?"bottom":"insetInlineStart",l=e?"height":"width",u={visibility:o&&!i?"hidden":s,position:e?"absolute":"relative",[e?"width":"height"]:"inherit"};return u["--start-position"]=`${n??0}%`,t?(u["--relative-size"]=`${(r??0)-(n??0)}%`,u[a]="var(--start-position)",u[l]="var(--relative-size)",u):(u[a]=0,u[l]="var(--start-position)",u)}function LD(e,t,n,r){const o=e?"bottom":"insetInlineStart",i=e?"height":"width",a={position:e?"absolute":"relative",[e?"width":"height"]:"inherit"};if(!t)return a[o]=0,a[i]=`${n}%`,a;const l=r-n;return a[o]=`${n}%`,a[i]=`${l}%`,a}const Tb=P.forwardRef(function(t,n){const{render:r,className:o,...i}=t,{indicatorPosition:s,inset:a,max:l,min:c,orientation:u,renderBeforeHydration:d,state:f,values:h}=ll(),[g,y]=P.useState(!1);ds(()=>y(!0));const m=u==="vertical",v=h.length>1,b=a?FD(m,v,s[0],s[1],d,g):LD(m,v,pl(h[0],c,l),pl(h[h.length-1],c,l));return ln("div",t,{state:f,ref:n,props:[{"data-base-ui-slider-indicator":d?"":void 0,style:b,suppressHydrationWarning:d||void 0},i],stateAttributesMapping:us})});process.env.NODE_ENV!=="production"&&(Tb.displayName="SliderIndicator");const Fr=e=>{const t=S.useContext(oo);if(e)return e;if(t)return t.locale||e},VD=e=>{const[t,n]=S.useState(null),r=S.useRef(null);return S.useEffect(()=>{const o=r.current;if(o===null)return;const i=Number(o.getAttribute("aria-valuenow"));He.number(i)&&n(i);const s=new MutationObserver(a=>{const l=a[0].target,c=Number(l.getAttribute("aria-valuenow"));n(He.number(c)?c:null)});return s.observe(o,{attributeFilter:["aria-valuenow"]}),()=>s.disconnect()},[]),p.jsx(Td,{title:"",ref:r,as:Sb,enabled:e.tooltip,className:"focus-within::scale-105 block size-5 cursor-grab rounded-full border-2 border-input-border bg-input-switch shadow-shadow-floating focus-within:border-primary focus-within:outline active:cursor-grabbing",children:t})},$D=e=>{const{tooltip:t,className:n,defaultValue:r,value:o,...i}=e,s=S.useRef(Xo()),a=r||o||[],l=Fr();return p.jsx(lb,{...i,value:o,locale:l,defaultValue:r,children:p.jsxs(yb,{className:Pe("relative flex h-5 w-full touch-none select-none items-center",n),children:[p.jsx(vb,{className:"relative h-2 grow rounded-full bg-background",children:p.jsx(Tb,{className:"absolute h-full rounded-full bg-primary"})}),Array.isArray(a)?a.map((c,u)=>p.jsx(VD,{tooltip:t??!1},`${s.current}-${u}`)):null]})})},Lr=e=>{const t=S.useRef(e);return S.useEffect(()=>{t.current=e},[e]),t},zD=S.forwardRef(({children:e,loading:t,container:n,error:r,...o},i)=>{const s=S.useId(),[a,l]=S.useState(o.checked??!1),c=a,u=S.useRef(null),d=Lr(o.onChange);S.useImperativeHandle(i,()=>u.current),S.useEffect(()=>{if(u.current!==null&&d.current){const h=y=>{d.current&&d.current(y)},g=u.current;return g.addEventListener("change",h),()=>g?.removeEventListener("change",h)}},[]);const f=()=>{const h=!u.current?.checked;l(h),o?.onCheck?.(h),u.current!==null&&(u.current.checked=h,u.current.dispatchEvent(new Event("change",{bubbles:!0})))};return p.jsxs("fieldset",{className:Pe("flex flex-col flex-wrap justify-center",n),"data-component":"switch",disabled:o.disabled||t,children:[p.jsxs("span",{className:"flex flex-row flex-wrap items-center",children:[p.jsx("input",{...o,hidden:!0,ref:u,type:"checkbox",checked:c,id:o.id||s,"data-trigger":"change","data-checked":c,disabled:o.disabled||t,onChange:h=>l(h.target.checked)}),p.jsx("button",{type:"button",role:"switch",onClick:f,"aria-checked":c,"data-checked":c,"aria-labelledby":`${s}-label`,disabled:o.disabled||t,className:"relative inline-flex h-6 w-11 flex-shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors duration-300 ease-in-out focus:outline-none focus:ring-2 focus:ring-primary focus:ring-offset-2 data-[checked=false]:bg-input-switch-bg data-[checked=true]:bg-primary",children:p.jsx("span",{"aria-hidden":"true","data-checked":c,className:"inline-block aspect-square size-5 transform rounded-full shadow ring-0 transition duration-300 ease-in-out data-[checked=false]:translate-x-0 data-[checked=true]:translate-x-5 data-[checked=false]:bg-disabled data-[checked=true]:bg-input-switch"})}),p.jsx("label",{htmlFor:o.id||s,className:"ml-3 inline-block text-sm",id:`${s}-label`,children:p.jsx("span",{className:"font-medium text-foreground",children:e})})]}),p.jsx("span",{className:"mt-1 flex-1 whitespace-nowrap text-xs text-danger empty:mt-0 empty:hidden",children:r})]})}),fs=S.createContext({});function Qn(e){const t=S.useRef(null);return t.current===null&&(t.current=e()),t.current}const Eb=typeof window<"u",xl=Eb?S.useLayoutEffect:S.useEffect,wl=S.createContext(null);function Rd(e,t){e.indexOf(t)===-1&&e.push(t)}function ri(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}function jD([...e],t,n){const r=t<0?e.length+t:t;if(r>=0&&r<e.length){const o=n<0?e.length+n:n,[i]=e.splice(t,1);e.splice(o,0,i)}return e}const Jn=(e,t,n)=>n>t?t:n<e?e:n;function Hd(e,t){return t?`${e}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${t}`:e}let oi=()=>{},hn=()=>{};typeof process<"u"&&process.env?.NODE_ENV!=="production"&&(oi=(e,t,n)=>{!e&&typeof console<"u"&&console.warn(Hd(t,n))},hn=(e,t,n)=>{if(!e)throw new Error(Hd(t,n))});const vr={},Cb=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function kb(e){return typeof e=="object"&&e!==null}const Ib=e=>/^0[^.\s]+$/u.test(e);function Ab(e){let t;return()=>(t===void 0&&(t=e()),t)}const Sn=e=>e,BD=(e,t)=>n=>t(e(n)),ps=(...e)=>e.reduce(BD),ii=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r};class Wd{constructor(){this.subscriptions=[]}add(t){return Rd(this.subscriptions,t),()=>ri(this.subscriptions,t)}notify(t,n,r){const o=this.subscriptions.length;if(o)if(o===1)this.subscriptions[0](t,n,r);else for(let i=0;i<o;i++){const s=this.subscriptions[i];s&&s(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const mn=e=>e*1e3,Tn=e=>e/1e3;function Pb(e,t){return t?e*(1e3/t):0}const Ob=new Set;function Sl(e,t,n){e||Ob.has(t)||(console.warn(Hd(t,n)),Ob.add(t))}const RD=(e,t,n)=>{const r=t-e;return((n-e)%r+r)%r+e},Db=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,HD=1e-7,WD=12;function qD(e,t,n,r,o){let i,s,a=0;do s=t+(n-t)/2,i=Db(s,r,o)-e,i>0?n=s:t=s;while(Math.abs(i)>HD&&++a<WD);return s}function hs(e,t,n,r){if(e===t&&n===r)return Sn;const o=i=>qD(i,0,1,e,n);return i=>i===0||i===1?i:Db(o(i),t,r)}const Nb=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Mb=e=>t=>1-e(1-t),_b=hs(.33,1.53,.69,.99),qd=Mb(_b),Fb=Nb(qd),Lb=e=>(e*=2)<1?.5*qd(e):.5*(2-Math.pow(2,-10*(e-1))),Ud=e=>1-Math.sin(Math.acos(e)),Vb=Mb(Ud),$b=Nb(Ud),UD=hs(.42,0,1,1),GD=hs(0,0,.58,1),zb=hs(.42,0,.58,1),jb=e=>Array.isArray(e)&&typeof e[0]!="number";function Bb(e,t){return jb(e)?e[RD(0,e.length,t)]:e}const Rb=e=>Array.isArray(e)&&typeof e[0]=="number",Hb={linear:Sn,easeIn:UD,easeInOut:zb,easeOut:GD,circIn:Ud,circInOut:$b,circOut:Vb,backIn:qd,backInOut:Fb,backOut:_b,anticipate:Lb},YD=e=>typeof e=="string",Gd=e=>{if(Rb(e)){hn(e.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[t,n,r,o]=e;return hs(t,n,r,o)}else if(YD(e))return hn(Hb[e]!==void 0,`Invalid easing type '${e}'`,"invalid-easing-type"),Hb[e];return e},Tl=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function KD(e,t){let n=new Set,r=new Set,o=!1,i=!1;const s=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1};function l(u){s.has(u)&&(c.schedule(u),e()),u(a)}const c={schedule:(u,d=!1,f=!1)=>{const g=f&&o?n:r;return d&&s.add(u),g.has(u)||g.add(u),u},cancel:u=>{r.delete(u),s.delete(u)},process:u=>{if(a=u,o){i=!0;return}o=!0,[n,r]=[r,n],n.forEach(l),n.clear(),o=!1,i&&(i=!1,c.process(u))}};return c}const ZD=40;function Wb(e,t){let n=!1,r=!0;const o={delta:0,timestamp:0,isProcessing:!1},i=()=>n=!0,s=Tl.reduce((x,T)=>(x[T]=KD(i),x),{}),{setup:a,read:l,resolveKeyframes:c,preUpdate:u,update:d,preRender:f,render:h,postRender:g}=s,y=()=>{const x=vr.useManualTiming?o.timestamp:performance.now();n=!1,vr.useManualTiming||(o.delta=r?1e3/60:Math.max(Math.min(x-o.timestamp,ZD),1)),o.timestamp=x,o.isProcessing=!0,a.process(o),l.process(o),c.process(o),u.process(o),d.process(o),f.process(o),h.process(o),g.process(o),o.isProcessing=!1,n&&t&&(r=!1,e(y))},m=()=>{n=!0,r=!0,o.isProcessing||e(y)};return{schedule:Tl.reduce((x,T)=>{const E=s[T];return x[T]=(I,w=!1,C=!1)=>(n||m(),E.schedule(I,w,C)),x},{}),cancel:x=>{for(let T=0;T<Tl.length;T++)s[Tl[T]].cancel(x)},state:o,steps:s}}const{schedule:ht,cancel:br,state:Yt,steps:Yd}=Wb(typeof requestAnimationFrame<"u"?requestAnimationFrame:Sn,!0);let El;function XD(){El=void 0}const en={now:()=>(El===void 0&&en.set(Yt.isProcessing||vr.useManualTiming?Yt.timestamp:performance.now()),El),set:e=>{El=e,queueMicrotask(XD)}},qb=e=>t=>typeof t=="string"&&t.startsWith(e),Ub=qb("--"),QD=qb("var(--"),Kd=e=>QD(e)?JD.test(e.split("/*")[0].trim()):!1,JD=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function Gb(e){return typeof e!="string"?!1:e.split("/*")[0].includes("var(--")}const si={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},ms={...si,transform:e=>Jn(0,1,e)},Cl={...si,default:1},gs=e=>Math.round(e*1e5)/1e5,Zd=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function eN(e){return e==null}const tN=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Xd=(e,t)=>n=>!!(typeof n=="string"&&tN.test(n)&&n.startsWith(e)||t&&!eN(n)&&Object.prototype.hasOwnProperty.call(n,t)),Yb=(e,t,n)=>r=>{if(typeof r!="string")return r;const[o,i,s,a]=r.match(Zd);return{[e]:parseFloat(o),[t]:parseFloat(i),[n]:parseFloat(s),alpha:a!==void 0?parseFloat(a):1}},nN=e=>Jn(0,255,e),Qd={...si,transform:e=>Math.round(nN(e))},mo={test:Xd("rgb","red"),parse:Yb("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Qd.transform(e)+", "+Qd.transform(t)+", "+Qd.transform(n)+", "+gs(ms.transform(r))+")"};function rN(e){let t="",n="",r="",o="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),o=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),o=e.substring(4,5),t+=t,n+=n,r+=r,o+=o),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:o?parseInt(o,16)/255:1}}const Jd={test:Xd("#"),parse:rN,transform:mo.transform},ys=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Vr=ys("deg"),er=ys("%"),Ee=ys("px"),oN=ys("vh"),iN=ys("vw"),Kb={...er,parse:e=>er.parse(e)/100,transform:e=>er.transform(e*100)},ai={test:Xd("hsl","hue"),parse:Yb("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+er.transform(gs(t))+", "+er.transform(gs(n))+", "+gs(ms.transform(r))+")"},Ft={test:e=>mo.test(e)||Jd.test(e)||ai.test(e),parse:e=>mo.test(e)?mo.parse(e):ai.test(e)?ai.parse(e):Jd.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?mo.transform(e):ai.transform(e),getAnimatableNone:e=>{const t=Ft.parse(e);return t.alpha=0,Ft.transform(t)}},sN=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function aN(e){return isNaN(e)&&typeof e=="string"&&(e.match(Zd)?.length||0)+(e.match(sN)?.length||0)>0}const Zb="number",Xb="color",lN="var",cN="var(",Qb="${}",uN=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function vs(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},o=[];let i=0;const a=t.replace(uN,l=>(Ft.test(l)?(r.color.push(i),o.push(Xb),n.push(Ft.parse(l))):l.startsWith(cN)?(r.var.push(i),o.push(lN),n.push(l)):(r.number.push(i),o.push(Zb),n.push(parseFloat(l))),++i,Qb)).split(Qb);return{values:n,split:a,indexes:r,types:o}}function Jb(e){return vs(e).values}function ex(e){const{split:t,types:n}=vs(e),r=t.length;return o=>{let i="";for(let s=0;s<r;s++)if(i+=t[s],o[s]!==void 0){const a=n[s];a===Zb?i+=gs(o[s]):a===Xb?i+=Ft.transform(o[s]):i+=o[s]}return i}}const dN=e=>typeof e=="number"?0:Ft.test(e)?Ft.getAnimatableNone(e):e;function fN(e){const t=Jb(e);return ex(e)(t.map(dN))}const _n={test:aN,parse:Jb,createTransformer:ex,getAnimatableNone:fN};function ef(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function pN({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let o=0,i=0,s=0;if(!t)o=i=s=n;else{const a=n<.5?n*(1+t):n+t-n*t,l=2*n-a;o=ef(l,a,e+1/3),i=ef(l,a,e),s=ef(l,a,e-1/3)}return{red:Math.round(o*255),green:Math.round(i*255),blue:Math.round(s*255),alpha:r}}function kl(e,t){return n=>n>0?t:e}const bt=(e,t,n)=>e+(t-e)*n,tf=(e,t,n)=>{const r=e*e,o=n*(t*t-r)+r;return o<0?0:Math.sqrt(o)},hN=[Jd,mo,ai],mN=e=>hN.find(t=>t.test(e));function tx(e){const t=mN(e);if(oi(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!t)return!1;let n=t.parse(e);return t===ai&&(n=pN(n)),n}const nx=(e,t)=>{const n=tx(e),r=tx(t);if(!n||!r)return kl(e,t);const o={...n};return i=>(o.red=tf(n.red,r.red,i),o.green=tf(n.green,r.green,i),o.blue=tf(n.blue,r.blue,i),o.alpha=bt(n.alpha,r.alpha,i),mo.transform(o))},nf=new Set(["none","hidden"]);function gN(e,t){return nf.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function yN(e,t){return n=>bt(e,t,n)}function rf(e){return typeof e=="number"?yN:typeof e=="string"?Kd(e)?kl:Ft.test(e)?nx:xN:Array.isArray(e)?rx:typeof e=="object"?Ft.test(e)?nx:vN:kl}function rx(e,t){const n=[...e],r=n.length,o=e.map((i,s)=>rf(i)(i,t[s]));return i=>{for(let s=0;s<r;s++)n[s]=o[s](i);return n}}function vN(e,t){const n={...e,...t},r={};for(const o in n)e[o]!==void 0&&t[o]!==void 0&&(r[o]=rf(e[o])(e[o],t[o]));return o=>{for(const i in r)n[i]=r[i](o);return n}}function bN(e,t){const n=[],r={color:0,var:0,number:0};for(let o=0;o<t.values.length;o++){const i=t.types[o],s=e.indexes[i][r[i]],a=e.values[s]??0;n[o]=a,r[i]++}return n}const xN=(e,t)=>{const n=_n.createTransformer(t),r=vs(e),o=vs(t);return r.indexes.var.length===o.indexes.var.length&&r.indexes.color.length===o.indexes.color.length&&r.indexes.number.length>=o.indexes.number.length?nf.has(e)&&!o.values.length||nf.has(t)&&!r.values.length?gN(e,t):ps(rx(bN(r,o),o.values),n):(oi(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`,"complex-values-different"),kl(e,t))};function ox(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?bt(e,t,n):rf(e)(e,t)}const wN=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>ht.update(t,n),stop:()=>br(t),now:()=>Yt.isProcessing?Yt.timestamp:en.now()}},ix=(e,t,n=10)=>{let r="";const o=Math.max(Math.round(t/n),2);for(let i=0;i<o;i++)r+=Math.round(e(i/(o-1))*1e4)/1e4+", ";return`linear(${r.substring(0,r.length-2)})`},Il=2e4;function of(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<Il;)t+=n,r=e.next(t);return t>=Il?1/0:t}function sx(e,t=100,n){const r=n({...e,keyframes:[0,t]}),o=Math.min(of(r),Il);return{type:"keyframes",ease:i=>r.next(o*i).value/t,duration:Tn(o)}}const SN=5;function ax(e,t,n){const r=Math.max(t-SN,0);return Pb(n-e(r),t-r)}const It={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},sf=.001;function TN({duration:e=It.duration,bounce:t=It.bounce,velocity:n=It.velocity,mass:r=It.mass}){let o,i;oi(e<=mn(It.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let s=1-t;s=Jn(It.minDamping,It.maxDamping,s),e=Jn(It.minDuration,It.maxDuration,Tn(e)),s<1?(o=c=>{const u=c*s,d=u*e,f=u-n,h=af(c,s),g=Math.exp(-d);return sf-f/h*g},i=c=>{const d=c*s*e,f=d*n+n,h=Math.pow(s,2)*Math.pow(c,2)*e,g=Math.exp(-d),y=af(Math.pow(c,2),s);return(-o(c)+sf>0?-1:1)*((f-h)*g)/y}):(o=c=>{const u=Math.exp(-c*e),d=(c-n)*e+1;return-sf+u*d},i=c=>{const u=Math.exp(-c*e),d=(n-c)*(e*e);return u*d});const a=5/e,l=CN(o,i,a);if(e=mn(e),isNaN(l))return{stiffness:It.stiffness,damping:It.damping,duration:e};{const c=Math.pow(l,2)*r;return{stiffness:c,damping:s*2*Math.sqrt(r*c),duration:e}}}const EN=12;function CN(e,t,n){let r=n;for(let o=1;o<EN;o++)r=r-e(r)/t(r);return r}function af(e,t){return e*Math.sqrt(1-t*t)}const kN=["duration","bounce"],IN=["stiffness","damping","mass"];function lx(e,t){return t.some(n=>e[n]!==void 0)}function AN(e){let t={velocity:It.velocity,stiffness:It.stiffness,damping:It.damping,mass:It.mass,isResolvedFromDuration:!1,...e};if(!lx(e,IN)&&lx(e,kN))if(t.velocity=0,e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),o=r*r,i=2*Jn(.05,1,1-(e.bounce||0))*Math.sqrt(o);t={...t,mass:It.mass,stiffness:o,damping:i}}else{const n=TN({...e,velocity:0});t={...t,...n,mass:It.mass},t.isResolvedFromDuration=!0}return t}function bs(e=It.visualDuration,t=It.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:o}=n;const i=n.keyframes[0],s=n.keyframes[n.keyframes.length-1],a={done:!1,value:i},{stiffness:l,damping:c,mass:u,duration:d,velocity:f,isResolvedFromDuration:h}=AN({...n,velocity:-Tn(n.velocity||0)}),g=f||0,y=c/(2*Math.sqrt(l*u)),m=s-i,v=Tn(Math.sqrt(l/u)),b=Math.abs(m)<5;r||(r=b?It.restSpeed.granular:It.restSpeed.default),o||(o=b?It.restDelta.granular:It.restDelta.default);let x;if(y<1){const E=af(v,y);x=I=>{const w=Math.exp(-y*v*I);return s-w*((g+y*v*m)/E*Math.sin(E*I)+m*Math.cos(E*I))}}else if(y===1)x=E=>s-Math.exp(-v*E)*(m+(g+v*m)*E);else{const E=v*Math.sqrt(y*y-1);x=I=>{const w=Math.exp(-y*v*I),C=Math.min(E*I,300);return s-w*((g+y*v*m)*Math.sinh(C)+E*m*Math.cosh(C))/E}}const T={calculatedDuration:h&&d||null,next:E=>{const I=x(E);if(h)a.done=E>=d;else{let w=E===0?g:0;y<1&&(w=E===0?mn(g):ax(x,E,I));const C=Math.abs(w)<=r,A=Math.abs(s-I)<=o;a.done=C&&A}return a.value=a.done?s:I,a},toString:()=>{const E=Math.min(of(T),Il),I=ix(w=>T.next(E*w).value,E,30);return E+"ms "+I},toTransition:()=>{}};return T}bs.applyToOptions=e=>{const t=sx(e,100,bs);return e.ease=t.ease,e.duration=mn(t.duration),e.type="keyframes",e};function lf({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:o=10,bounceStiffness:i=500,modifyTarget:s,min:a,max:l,restDelta:c=.5,restSpeed:u}){const d=e[0],f={done:!1,value:d},h=C=>a!==void 0&&C<a||l!==void 0&&C>l,g=C=>a===void 0?l:l===void 0||Math.abs(a-C)<Math.abs(l-C)?a:l;let y=n*t;const m=d+y,v=s===void 0?m:s(m);v!==m&&(y=v-d);const b=C=>-y*Math.exp(-C/r),x=C=>v+b(C),T=C=>{const A=b(C),O=x(C);f.done=Math.abs(A)<=c,f.value=f.done?v:O};let E,I;const w=C=>{h(f.value)&&(E=C,I=bs({keyframes:[f.value,g(f.value)],velocity:ax(x,C,f.value),damping:o,stiffness:i,restDelta:c,restSpeed:u}))};return w(0),{calculatedDuration:null,next:C=>{let A=!1;return!I&&E===void 0&&(A=!0,T(C),w(C)),E!==void 0&&C>=E?I.next(C-E):(!A&&T(C),f)}}}function PN(e,t,n){const r=[],o=n||vr.mix||ox,i=e.length-1;for(let s=0;s<i;s++){let a=o(e[s],e[s+1]);if(t){const l=Array.isArray(t)?t[s]||Sn:t;a=ps(l,a)}r.push(a)}return r}function cx(e,t,{clamp:n=!0,ease:r,mixer:o}={}){const i=e.length;if(hn(i===t.length,"Both input and output ranges must be the same length","range-length"),i===1)return()=>t[0];if(i===2&&t[0]===t[1])return()=>t[1];const s=e[0]===e[1];e[0]>e[i-1]&&(e=[...e].reverse(),t=[...t].reverse());const a=PN(t,r,o),l=a.length,c=u=>{if(s&&u<e[0])return t[0];let d=0;if(l>1)for(;d<e.length-2&&!(u<e[d+1]);d++);const f=ii(e[d],e[d+1],u);return a[d](f)};return n?u=>c(Jn(e[0],e[i-1],u)):c}function ux(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const o=ii(0,t,r);e.push(bt(n,1,o))}}function dx(e){const t=[0];return ux(t,e.length-1),t}function ON(e,t){return e.map(n=>n*t)}function DN(e,t){return e.map(()=>t||zb).splice(0,e.length-1)}function li({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const o=jb(r)?r.map(Gd):Gd(r),i={done:!1,value:t[0]},s=ON(n&&n.length===t.length?n:dx(t),e),a=cx(s,t,{ease:Array.isArray(o)?o:DN(t,o)});return{calculatedDuration:e,next:l=>(i.value=a(l),i.done=l>=e,i)}}const NN=e=>e!==null;function cf(e,{repeat:t,repeatType:n="loop"},r,o=1){const i=e.filter(NN),a=o<0||t&&n!=="loop"&&t%2===1?0:i.length-1;return!a||r===void 0?i[a]:r}const MN={decay:lf,inertia:lf,tween:li,keyframes:li,spring:bs};function fx(e){typeof e.type=="string"&&(e.type=MN[e.type])}class uf{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,n){return this.finished.then(t,n)}}const _N=e=>e/100;class df extends uf{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{const{motionValue:n}=this.options;n&&n.updatedAt!==en.now()&&this.tick(en.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),this.options.onStop?.())},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;fx(t);const{type:n=li,repeat:r=0,repeatDelay:o=0,repeatType:i,velocity:s=0}=t;let{keyframes:a}=t;const l=n||li;process.env.NODE_ENV!=="production"&&l!==li&&hn(a.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${a}`,"spring-two-frames"),l!==li&&typeof a[0]!="number"&&(this.mixKeyframes=ps(_N,ox(a[0],a[1])),a=[0,100]);const c=l({...t,keyframes:a});i==="mirror"&&(this.mirroredGenerator=l({...t,keyframes:[...a].reverse(),velocity:-s})),c.calculatedDuration===null&&(c.calculatedDuration=of(c));const{calculatedDuration:u}=c;this.calculatedDuration=u,this.resolvedDuration=u+o,this.totalDuration=this.resolvedDuration*(r+1)-o,this.generator=c}updateTime(t){const n=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(t,n=!1){const{generator:r,totalDuration:o,mixKeyframes:i,mirroredGenerator:s,resolvedDuration:a,calculatedDuration:l}=this;if(this.startTime===null)return r.next(0);const{delay:c=0,keyframes:u,repeat:d,repeatType:f,repeatDelay:h,type:g,onUpdate:y,finalKeyframe:m}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-o/this.speed,this.startTime)),n?this.currentTime=t:this.updateTime(t);const v=this.currentTime-c*(this.playbackSpeed>=0?1:-1),b=this.playbackSpeed>=0?v<0:v>o;this.currentTime=Math.max(v,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=o);let x=this.currentTime,T=r;if(d){const C=Math.min(this.currentTime,o)/a;let A=Math.floor(C),O=C%1;!O&&C>=1&&(O=1),O===1&&A--,A=Math.min(A,d+1),A%2&&(f==="reverse"?(O=1-O,h&&(O-=h/a)):f==="mirror"&&(T=s)),x=Jn(0,1,O)*a}const E=b?{done:!1,value:u[0]}:T.next(x);i&&(E.value=i(E.value));let{done:I}=E;!b&&l!==null&&(I=this.playbackSpeed>=0?this.currentTime>=o:this.currentTime<=0);const w=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&I);return w&&g!==lf&&(E.value=cf(u,this.options,m,this.speed)),y&&y(E.value),w&&this.finish(),E}then(t,n){return this.finished.then(t,n)}get duration(){return Tn(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+Tn(t)}get time(){return Tn(this.currentTime)}set time(t){t=mn(t),this.currentTime=t,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),this.driver?.start(!1)}get speed(){return this.playbackSpeed}set speed(t){this.updateTime(en.now());const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=Tn(this.currentTime))}play(){if(this.isStopped)return;const{driver:t=wN,startTime:n}=this.options;this.driver||(this.driver=t(o=>this.tick(o))),this.options.onPlay?.();const r=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=r):this.holdTime!==null?this.startTime=r-this.holdTime:this.startTime||(this.startTime=n??r),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(en.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),t.observe(this)}}function FN(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const go=e=>e*180/Math.PI,ff=e=>{const t=go(Math.atan2(e[1],e[0]));return pf(t)},LN={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:ff,rotateZ:ff,skewX:e=>go(Math.atan(e[1])),skewY:e=>go(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},pf=e=>(e=e%360,e<0&&(e+=360),e),px=ff,hx=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),mx=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),VN={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:hx,scaleY:mx,scale:e=>(hx(e)+mx(e))/2,rotateX:e=>pf(go(Math.atan2(e[6],e[5]))),rotateY:e=>pf(go(Math.atan2(-e[2],e[0]))),rotateZ:px,rotate:px,skewX:e=>go(Math.atan(e[4])),skewY:e=>go(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function hf(e){return e.includes("scale")?1:0}function mf(e,t){if(!e||e==="none")return hf(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,o;if(n)r=VN,o=n;else{const a=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=LN,o=a}if(!o)return hf(t);const i=r[t],s=o[1].split(",").map(zN);return typeof i=="function"?i(s):s[i]}const $N=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return mf(n,t)};function zN(e){return parseFloat(e.trim())}const ci=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],ui=new Set(ci),gx=e=>e===si||e===Ee,jN=new Set(["x","y","z"]),BN=ci.filter(e=>!jN.has(e));function RN(e){const t=[];return BN.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const $r={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>mf(t,"x"),y:(e,{transform:t})=>mf(t,"y")};$r.translateX=$r.x,$r.translateY=$r.y;const yo=new Set;let gf=!1,yf=!1,vf=!1;function yx(){if(yf){const e=Array.from(yo).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const o=RN(r);o.length&&(n.set(r,o),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const o=n.get(r);o&&o.forEach(([i,s])=>{r.getValue(i)?.set(s)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}yf=!1,gf=!1,yo.forEach(e=>e.complete(vf)),yo.clear()}function vx(){yo.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(yf=!0)})}function HN(){vf=!0,vx(),yx(),vf=!1}class bf{constructor(t,n,r,o,i,s=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=o,this.element=i,this.isAsync=s}scheduleResolve(){this.state="scheduled",this.isAsync?(yo.add(this),gf||(gf=!0,ht.read(vx),ht.resolveKeyframes(yx))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:o}=this;if(t[0]===null){const i=o?.get(),s=t[t.length-1];if(i!==void 0)t[0]=i;else if(r&&n){const a=r.readValue(n,s);a!=null&&(t[0]=a)}t[0]===void 0&&(t[0]=s),o&&i===void 0&&o.set(t[0])}FN(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),yo.delete(this)}cancel(){this.state==="scheduled"&&(yo.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const WN=e=>e.startsWith("--");function qN(e,t,n){WN(t)?e.style.setProperty(t,n):e.style[t]=n}const UN={};function bx(e,t){const n=Ab(e);return()=>UN[t]??n()}const GN=bx(()=>window.ScrollTimeline!==void 0,"scrollTimeline"),xx=bx(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),xs=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,wx={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:xs([0,.65,.55,1]),circOut:xs([.55,0,1,.45]),backIn:xs([.31,.01,.66,-.59]),backOut:xs([.33,1.53,.69,.99])};function Sx(e,t){if(e)return typeof e=="function"?xx()?ix(e,t):"ease-out":Rb(e)?xs(e):Array.isArray(e)?e.map(n=>Sx(n,t)||wx.easeOut):wx[e]}function YN(e,t,n,{delay:r=0,duration:o=300,repeat:i=0,repeatType:s="loop",ease:a="easeOut",times:l}={},c=void 0){const u={[t]:n};l&&(u.offset=l);const d=Sx(a,o);Array.isArray(d)&&(u.easing=d);const f={delay:r,duration:o,easing:Array.isArray(d)?"linear":d,fill:"both",iterations:i+1,direction:s==="reverse"?"alternate":"normal"};return c&&(f.pseudoElement=c),e.animate(u,f)}function xf(e){return typeof e=="function"&&"applyToOptions"in e}function KN({type:e,...t}){return xf(e)&&xx()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class Tx extends uf{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!t)return;const{element:n,name:r,keyframes:o,pseudoElement:i,allowFlatten:s=!1,finalKeyframe:a,onComplete:l}=t;this.isPseudoElement=!!i,this.allowFlatten=s,this.options=t,hn(typeof t.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");const c=KN(t);this.animation=YN(n,r,o,c,i),c.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!i){const u=cf(o,this.options,a,this.speed);this.updateMotionValue?this.updateMotionValue(u):qN(n,r,u),this.animation.cancel()}l?.(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){const t=this.options?.element;!this.isPseudoElement&&t?.isConnected&&this.animation.commitStyles?.()}get duration(){const t=this.animation.effect?.getComputedTiming?.().duration||0;return Tn(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+Tn(t)}get time(){return Tn(Number(this.animation.currentTime)||0)}set time(t){this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=mn(t)}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(t){this.manualStartTime=this.animation.startTime=t}attachTimeline({timeline:t,observe:n}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,t&&GN()?(this.animation.timeline=t,Sn):n(this)}}const Ex={anticipate:Lb,backInOut:Fb,circInOut:$b};function ZN(e){return e in Ex}function XN(e){typeof e.ease=="string"&&ZN(e.ease)&&(e.ease=Ex[e.ease])}const wf=10;class QN extends Tx{constructor(t){XN(t),fx(t),super(t),t.startTime!==void 0&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:n,onUpdate:r,onComplete:o,element:i,...s}=this.options;if(!n)return;if(t!==void 0){n.set(t);return}const a=new df({...s,autoplay:!1}),l=Math.max(wf,en.now()-this.startTime),c=Jn(0,wf,l-wf);n.setWithVelocity(a.sample(Math.max(0,l-c)).value,a.sample(l).value,c),a.stop()}}const Cx=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(_n.test(e)||e==="0")&&!e.startsWith("url("));function JN(e){const t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function eM(e,t,n,r){const o=e[0];if(o===null)return!1;if(t==="display"||t==="visibility")return!0;const i=e[e.length-1],s=Cx(o,t),a=Cx(i,t);return oi(s===a,`You are trying to animate ${t} from "${o}" to "${i}". "${s?i:o}" is not an animatable value.`,"value-not-animatable"),!s||!a?!1:JN(e)||(n==="spring"||xf(n))&&r}function Sf(e){e.duration=0,e.type="keyframes"}const tM=new Set(["opacity","clipPath","filter","transform"]),nM=Ab(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function rM(e){const{motionValue:t,name:n,repeatDelay:r,repeatType:o,damping:i,type:s}=e;if(!(t?.owner?.current instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:c}=t.owner.getProps();return nM()&&n&&tM.has(n)&&(n!=="transform"||!c)&&!l&&!r&&o!=="mirror"&&i!==0&&s!=="inertia"}const oM=40;class iM extends uf{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:o=0,repeatDelay:i=0,repeatType:s="loop",keyframes:a,name:l,motionValue:c,element:u,...d}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=en.now();const f={autoplay:t,delay:n,type:r,repeat:o,repeatDelay:i,repeatType:s,name:l,motionValue:c,element:u,...d},h=u?.KeyframeResolver||bf;this.keyframeResolver=new h(a,(g,y,m)=>this.onKeyframesResolved(g,y,f,!m),l,c,u),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(t,n,r,o){this.keyframeResolver=void 0;const{name:i,type:s,velocity:a,delay:l,isHandoff:c,onUpdate:u}=r;this.resolvedAt=en.now(),eM(t,i,s,a)||((vr.instantAnimations||!l)&&u?.(cf(t,r,n)),t[0]=t[t.length-1],Sf(r),r.repeat=0);const f={startTime:o?this.resolvedAt?this.resolvedAt-this.createdAt>oM?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...r,keyframes:t},h=!c&&rM(f),g=f.motionValue?.owner?.current,y=h?new QN({...f,element:g}):new df(f);y.finished.then(()=>{this.notifyFinished()}).catch(Sn),this.pendingTimeline&&(this.stopTimeline=y.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=y}get finished(){return this._animation?this.animation.finished:this._finished}then(t,n){return this.finished.finally(t).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),HN()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}class sM{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}get finished(){return Promise.all(this.animations.map(t=>t.finished))}getAll(t){return this.animations[0][t]}setAll(t,n){for(let r=0;r<this.animations.length;r++)this.animations[r][t]=n}attachTimeline(t){const n=this.animations.map(r=>r.attachTimeline(t));return()=>{n.forEach((r,o)=>{r&&r(),this.animations[o].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get state(){return this.getAll("state")}get startTime(){return this.getAll("startTime")}get duration(){return kx(this.animations,"duration")}get iterationDuration(){return kx(this.animations,"iterationDuration")}runAll(t){this.animations.forEach(n=>n[t]())}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}function kx(e,t){let n=0;for(let r=0;r<e.length;r++){const o=e[r][t];o!==null&&o>n&&(n=o)}return n}class aM extends sM{then(t,n){return this.finished.finally(t).then(()=>{})}}function Ix(e,t,n,r=0,o=1){const i=Array.from(e).sort((c,u)=>c.sortNodePosition(u)).indexOf(t),s=e.size,a=(s-1)*r;return typeof n=="function"?n(i,s):o===1?i*r:a-i*r}const lM=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function cM(e){const t=lM.exec(e);if(!t)return[,];const[,n,r,o]=t;return[`--${n??r}`,o]}const uM=4;function Ax(e,t,n=1){hn(n<=uM,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[r,o]=cM(e);if(!r)return;const i=window.getComputedStyle(t).getPropertyValue(r);if(i){const s=i.trim();return Cb(s)?parseFloat(s):s}return Kd(o)?Ax(o,t,n+1):o}const dM={type:"spring",stiffness:500,damping:25,restSpeed:10},fM=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),pM={type:"keyframes",duration:.8},hM={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},mM=(e,{keyframes:t})=>t.length>2?pM:ui.has(e)?e.startsWith("scale")?fM(t[1]):dM:hM,gM=e=>e!==null;function yM(e,{repeat:t,repeatType:n="loop"},r){const o=e.filter(gM),i=t&&n!=="loop"&&t%2===1?0:o.length-1;return o[i]}function Tf(e,t){if(e?.inherit&&t){const{inherit:n,...r}=e;return{...t,...r}}return e}function Ef(e,t){const n=e?.[t]??e?.default??e;return n!==e?Tf(n,e):n}function vM({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:o,repeat:i,repeatType:s,repeatDelay:a,from:l,elapsed:c,...u}){return!!Object.keys(u).length}const Cf=(e,t,n,r={},o,i)=>s=>{const a=Ef(r,e)||{},l=a.delay||r.delay||0;let{elapsed:c=0}=r;c=c-mn(l);const u={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...a,delay:-c,onUpdate:f=>{t.set(f),a.onUpdate&&a.onUpdate(f)},onComplete:()=>{s(),a.onComplete&&a.onComplete()},name:e,motionValue:t,element:i?void 0:o};vM(a)||Object.assign(u,mM(e,u)),u.duration&&(u.duration=mn(u.duration)),u.repeatDelay&&(u.repeatDelay=mn(u.repeatDelay)),u.from!==void 0&&(u.keyframes[0]=u.from);let d=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(Sf(u),u.delay===0&&(d=!0)),(vr.instantAnimations||vr.skipAnimations||o?.shouldSkipAnimations)&&(d=!0,Sf(u),u.delay=0),u.allowFlatten=!a.type&&!a.ease,d&&!i&&t.get()!==void 0){const f=yM(u.keyframes,a);if(f!==void 0){ht.update(()=>{u.onUpdate(f),u.onComplete()});return}}return a.isSync?new df(u):new iM(u)};function Px(e){const t=[{},{}];return e?.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function kf(e,t,n,r){if(typeof t=="function"){const[o,i]=Px(r);t=t(n!==void 0?n:e.custom,o,i)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[o,i]=Px(r);t=t(n!==void 0?n:e.custom,o,i)}return t}function di(e,t,n){const r=e.getProps();return kf(r,t,n!==void 0?n:r.custom,e)}const Ox=new Set(["width","height","top","left","right","bottom",...ci]),Dx=30,bM=e=>!isNaN(parseFloat(e)),ws={current:void 0};class xM{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=r=>{const o=en.now();if(this.updatedAt!==o&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const i of this.dependents)i.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=en.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=bM(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&Sl(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new Wd);const r=this.events[t].add(n);return t==="change"?()=>{r(),ht.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return ws.current&&ws.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const t=en.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>Dx)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Dx);return Pb(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function zr(e,t){return new xM(e,t)}const If=e=>Array.isArray(e);function wM(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,zr(n))}function SM(e){return If(e)?e[e.length-1]||0:e}function TM(e,t){const n=di(e,t);let{transitionEnd:r={},transition:o={},...i}=n||{};i={...i,...r};for(const s in i){const a=SM(i[s]);wM(e,s,a)}}const zt=e=>!!(e&&e.getVelocity);function EM(e){return!!(zt(e)&&e.add)}function Af(e,t){const n=e.getValue("willChange");if(EM(n))return n.add(t);if(!n&&vr.WillChange){const r=new vr.WillChange("auto");e.addValue("willChange",r),r.add(t)}}function Pf(e){return e.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}const Nx="data-"+Pf("framerAppearId");function Mx(e){return e.props[Nx]}function CM({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function Of(e,t,{delay:n=0,transitionOverride:r,type:o}={}){let{transition:i,transitionEnd:s,...a}=t;const l=e.getDefaultTransition();i=i?Tf(i,l):l;const c=i?.reduceMotion;r&&(i=r);const u=[],d=o&&e.animationState&&e.animationState.getState()[o];for(const f in a){const h=e.getValue(f,e.latestValues[f]??null),g=a[f];if(g===void 0||d&&CM(d,f))continue;const y={delay:n,...Ef(i||{},f)},m=h.get();if(m!==void 0&&!h.isAnimating&&!Array.isArray(g)&&g===m&&!y.velocity)continue;let v=!1;if(window.MotionHandoffAnimation){const T=Mx(e);if(T){const E=window.MotionHandoffAnimation(T,f,ht);E!==null&&(y.startTime=E,v=!0)}}Af(e,f);const b=c??e.shouldReduceMotion;h.start(Cf(f,h,g,b&&Ox.has(f)?{type:!1}:y,e,v));const x=h.animation;x&&u.push(x)}if(s){const f=()=>ht.update(()=>{s&&TM(e,s)});u.length?Promise.all(u).then(f):f()}return u}function Df(e,t,n={}){const r=di(e,t,n.type==="exit"?e.presenceContext?.custom:void 0);let{transition:o=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(o=n.transitionOverride);const i=r?()=>Promise.all(Of(e,r,n)):()=>Promise.resolve(),s=e.variantChildren&&e.variantChildren.size?(l=0)=>{const{delayChildren:c=0,staggerChildren:u,staggerDirection:d}=o;return kM(e,t,l,c,u,d,n)}:()=>Promise.resolve(),{when:a}=o;if(a){const[l,c]=a==="beforeChildren"?[i,s]:[s,i];return l().then(()=>c())}else return Promise.all([i(),s(n.delay)])}function kM(e,t,n=0,r=0,o=0,i=1,s){const a=[];for(const l of e.variantChildren)l.notify("AnimationStart",t),a.push(Df(l,t,{...s,delay:n+(typeof r=="function"?0:r)+Ix(e.variantChildren,l,r,o,i)}).then(()=>l.notify("AnimationComplete",t)));return Promise.all(a)}function IM(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const o=t.map(i=>Df(e,i,n));r=Promise.all(o)}else if(typeof t=="string")r=Df(e,t,n);else{const o=typeof t=="function"?di(e,t,n.custom):t;r=Promise.all(Of(e,o,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}const AM={test:e=>e==="auto",parse:e=>e},_x=e=>t=>t.test(e),Fx=[si,Ee,er,Vr,iN,oN,AM],Lx=e=>Fx.find(_x(e));function PM(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||Ib(e):!0}const OM=new Set(["brightness","contrast","saturate","opacity"]);function DM(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(Zd)||[];if(!r)return e;const o=n.replace(r,"");let i=OM.has(t)?1:0;return r!==n&&(i*=100),t+"("+i+o+")"}const NM=/\b([a-z-]*)\(.*?\)/gu,Nf={..._n,getAnimatableNone:e=>{const t=e.match(NM);return t?t.map(DM).join(" "):e}},Mf={..._n,getAnimatableNone:e=>{const t=_n.parse(e);return _n.createTransformer(e)(t.map(r=>typeof r=="number"?0:typeof r=="object"?{...r,alpha:1}:r))}},Vx={...si,transform:Math.round},_f={borderWidth:Ee,borderTopWidth:Ee,borderRightWidth:Ee,borderBottomWidth:Ee,borderLeftWidth:Ee,borderRadius:Ee,borderTopLeftRadius:Ee,borderTopRightRadius:Ee,borderBottomRightRadius:Ee,borderBottomLeftRadius:Ee,width:Ee,maxWidth:Ee,height:Ee,maxHeight:Ee,top:Ee,right:Ee,bottom:Ee,left:Ee,inset:Ee,insetBlock:Ee,insetBlockStart:Ee,insetBlockEnd:Ee,insetInline:Ee,insetInlineStart:Ee,insetInlineEnd:Ee,padding:Ee,paddingTop:Ee,paddingRight:Ee,paddingBottom:Ee,paddingLeft:Ee,paddingBlock:Ee,paddingBlockStart:Ee,paddingBlockEnd:Ee,paddingInline:Ee,paddingInlineStart:Ee,paddingInlineEnd:Ee,margin:Ee,marginTop:Ee,marginRight:Ee,marginBottom:Ee,marginLeft:Ee,marginBlock:Ee,marginBlockStart:Ee,marginBlockEnd:Ee,marginInline:Ee,marginInlineStart:Ee,marginInlineEnd:Ee,fontSize:Ee,backgroundPositionX:Ee,backgroundPositionY:Ee,...{rotate:Vr,rotateX:Vr,rotateY:Vr,rotateZ:Vr,scale:Cl,scaleX:Cl,scaleY:Cl,scaleZ:Cl,skew:Vr,skewX:Vr,skewY:Vr,distance:Ee,translateX:Ee,translateY:Ee,translateZ:Ee,x:Ee,y:Ee,z:Ee,perspective:Ee,transformPerspective:Ee,opacity:ms,originX:Kb,originY:Kb,originZ:Ee},zIndex:Vx,fillOpacity:ms,strokeOpacity:ms,numOctaves:Vx},MM={..._f,color:Ft,backgroundColor:Ft,outlineColor:Ft,fill:Ft,stroke:Ft,borderColor:Ft,borderTopColor:Ft,borderRightColor:Ft,borderBottomColor:Ft,borderLeftColor:Ft,filter:Nf,WebkitFilter:Nf,mask:Mf,WebkitMask:Mf},$x=e=>MM[e],_M=new Set([Nf,Mf]);function zx(e,t){let n=$x(e);return _M.has(n)||(n=_n),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const FM=new Set(["auto","none","0"]);function LM(e,t,n){let r=0,o;for(;r<e.length&&!o;){const i=e[r];typeof i=="string"&&!FM.has(i)&&vs(i).values.length&&(o=e[r]),r++}if(o&&n)for(const i of t)e[i]=zx(n,o)}class VM extends bf{constructor(t,n,r,o,i){super(t,n,r,o,i,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let u=0;u<t.length;u++){let d=t[u];if(typeof d=="string"&&(d=d.trim(),Kd(d))){const f=Ax(d,n.current);f!==void 0&&(t[u]=f),u===t.length-1&&(this.finalKeyframe=d)}}if(this.resolveNoneKeyframes(),!Ox.has(r)||t.length!==2)return;const[o,i]=t,s=Lx(o),a=Lx(i),l=Gb(o),c=Gb(i);if(l!==c&&$r[r]){this.needsMeasurement=!0;return}if(s!==a)if(gx(s)&&gx(a))for(let u=0;u<t.length;u++){const d=t[u];typeof d=="string"&&(t[u]=parseFloat(d))}else $r[r]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let o=0;o<t.length;o++)(t[o]===null||PM(t[o]))&&r.push(o);r.length&&LM(t,r,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:r}=this;if(!t||!t.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=$r[r](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const o=n[n.length-1];o!==void 0&&t.getValue(r,o).jump(o,!1)}measureEndState(){const{element:t,name:n,unresolvedKeyframes:r}=this;if(!t||!t.current)return;const o=t.getValue(n);o&&o.jump(this.measuredOrigin,!1);const i=r.length-1,s=r[i];r[i]=$r[n](t.measureViewportBox(),window.getComputedStyle(t.current)),s!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=s),this.removedTransforms?.length&&this.removedTransforms.forEach(([a,l])=>{t.getValue(a).set(l)}),this.resolveNoneKeyframes()}}const $M=new Set(["opacity","clipPath","filter","transform"]);function Ff(e,t,n){if(e==null)return[];if(e instanceof EventTarget)return[e];if(typeof e=="string"){let r=document;t&&(r=t.current);const o=n?.[e]??r.querySelectorAll(e);return o?Array.from(o):[]}return Array.from(e).filter(r=>r!=null)}const jx=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function Lf(e){return kb(e)&&"offsetHeight"in e}const{schedule:Vf}=Wb(queueMicrotask,!1),Fn={x:!1,y:!1};function Bx(){return Fn.x||Fn.y}function zM(e){return e==="x"||e==="y"?Fn[e]?null:(Fn[e]=!0,()=>{Fn[e]=!1}):Fn.x||Fn.y?null:(Fn.x=Fn.y=!0,()=>{Fn.x=Fn.y=!1})}function Rx(e,t){const n=Ff(e),r=new AbortController,o={passive:!0,...t,signal:r.signal};return[n,o,()=>r.abort()]}function jM(e){return!(e.pointerType==="touch"||Bx())}function BM(e,t,n={}){const[r,o,i]=Rx(e,n);return r.forEach(s=>{let a=!1,l=!1,c;const u=()=>{s.removeEventListener("pointerleave",g)},d=m=>{c&&(c(m),c=void 0),u()},f=m=>{a=!1,window.removeEventListener("pointerup",f),window.removeEventListener("pointercancel",f),l&&(l=!1,d(m))},h=()=>{a=!0,window.addEventListener("pointerup",f,o),window.addEventListener("pointercancel",f,o)},g=m=>{if(m.pointerType!=="touch"){if(a){l=!0;return}d(m)}},y=m=>{if(!jM(m))return;l=!1;const v=t(s,m);typeof v=="function"&&(c=v,s.addEventListener("pointerleave",g,o))};s.addEventListener("pointerenter",y,o),s.addEventListener("pointerdown",h,o)}),i}const Hx=(e,t)=>t?e===t?!0:Hx(e,t.parentElement):!1,$f=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,RM=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function HM(e){return RM.has(e.tagName)||e.isContentEditable===!0}const WM=new Set(["INPUT","SELECT","TEXTAREA"]);function qM(e){return WM.has(e.tagName)||e.isContentEditable===!0}const Al=new WeakSet;function Wx(e){return t=>{t.key==="Enter"&&e(t)}}function zf(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const UM=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=Wx(()=>{if(Al.has(n))return;zf(n,"down");const o=Wx(()=>{zf(n,"up")}),i=()=>zf(n,"cancel");n.addEventListener("keyup",o,t),n.addEventListener("blur",i,t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)};function qx(e){return $f(e)&&!Bx()}const Ux=new WeakSet;function GM(e,t,n={}){const[r,o,i]=Rx(e,n),s=a=>{const l=a.currentTarget;if(!qx(a)||Ux.has(a))return;Al.add(l),n.stopPropagation&&Ux.add(a);const c=t(l,a),u=(h,g)=>{window.removeEventListener("pointerup",d),window.removeEventListener("pointercancel",f),Al.has(l)&&Al.delete(l),qx(h)&&typeof c=="function"&&c(h,{success:g})},d=h=>{u(h,l===window||l===document||n.useGlobalTarget||Hx(l,h.target))},f=h=>{u(h,!1)};window.addEventListener("pointerup",d,o),window.addEventListener("pointercancel",f,o)};return r.forEach(a=>{(n.useGlobalTarget?window:a).addEventListener("pointerdown",s,o),Lf(a)&&(a.addEventListener("focus",c=>UM(c,o)),!HM(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),i}function Pl(e){return kb(e)&&"ownerSVGElement"in e}const Ol=new WeakMap;let Dl;const Gx=(e,t,n)=>(r,o)=>o&&o[0]?o[0][e+"Size"]:Pl(r)&&"getBBox"in r?r.getBBox()[t]:r[n],YM=Gx("inline","width","offsetWidth"),KM=Gx("block","height","offsetHeight");function ZM({target:e,borderBoxSize:t}){Ol.get(e)?.forEach(n=>{n(e,{get width(){return YM(e,t)},get height(){return KM(e,t)}})})}function XM(e){e.forEach(ZM)}function QM(){typeof ResizeObserver>"u"||(Dl=new ResizeObserver(XM))}function JM(e,t){Dl||QM();const n=Ff(e);return n.forEach(r=>{let o=Ol.get(r);o||(o=new Set,Ol.set(r,o)),o.add(t),Dl?.observe(r)}),()=>{n.forEach(r=>{const o=Ol.get(r);o?.delete(t),o?.size||Dl?.unobserve(r)})}}const Nl=new Set;let fi;function e_(){fi=()=>{const e={get width(){return window.innerWidth},get height(){return window.innerHeight}};Nl.forEach(t=>t(e))},window.addEventListener("resize",fi)}function t_(e){return Nl.add(e),fi||e_(),()=>{Nl.delete(e),!Nl.size&&typeof fi=="function"&&(window.removeEventListener("resize",fi),fi=void 0)}}function Yx(e,t){return typeof e=="function"?t_(e):JM(e,t)}function Kx(e){return Pl(e)&&e.tagName==="svg"}function n_(e,t){if(e==="first")return 0;{const n=t-1;return e==="last"?n:n/2}}function r_(e=.1,{startDelay:t=0,from:n=0,ease:r}={}){return(o,i)=>{const s=typeof n=="number"?n:n_(n,i),a=Math.abs(s-o);let l=e*a;if(r){const c=i*e;l=Gd(r)(l/c)*c}return t+l}}function o_(...e){const t=!Array.isArray(e[0]),n=t?0:-1,r=e[0+n],o=e[1+n],i=e[2+n],s=e[3+n],a=cx(o,i,s);return t?a(r):a}const i_=[...Fx,Ft,_n],s_=e=>i_.find(_x(e)),Zx=()=>({translate:0,scale:1,origin:0,originPoint:0}),pi=()=>({x:Zx(),y:Zx()}),Xx=()=>({min:0,max:0}),Lt=()=>({x:Xx(),y:Xx()}),Ss=new WeakMap;function Ml(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function Ts(e){return typeof e=="string"||Array.isArray(e)}const jf=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Bf=["initial",...jf];function _l(e){return Ml(e.animate)||Bf.some(t=>Ts(e[t]))}function Qx(e){return!!(_l(e)||e.variants)}function a_(e,t,n){for(const r in t){const o=t[r],i=n[r];if(zt(o))e.addValue(r,o);else if(zt(i))e.addValue(r,zr(o,{owner:e}));else if(i!==o)if(e.hasValue(r)){const s=e.getValue(r);s.liveStyle===!0?s.jump(o):s.hasAnimated||s.set(o)}else{const s=e.getStaticValue(r);e.addValue(r,zr(s!==void 0?s:o,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const Fl={current:null},Rf={current:!1},l_=typeof window<"u";function Jx(){if(Rf.current=!0,!!l_)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Fl.current=e.matches;e.addEventListener("change",t),t()}else Fl.current=!1}const e0=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let Ll={};function t0(e){Ll=e}function c_(){return Ll}class n0{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:o,skipAnimations:i,blockInitialAnimation:s,visualState:a},l={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=bf,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const h=en.now();this.renderScheduledAt<h&&(this.renderScheduledAt=h,ht.render(this.render,!1,!0))};const{latestValues:c,renderState:u}=a;this.latestValues=c,this.baseTarget={...c},this.initialValues=n.initial?{...c}:{},this.renderState=u,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=o,this.skipAnimationsConfig=i,this.options=l,this.blockInitialAnimation=!!s,this.isControllingVariants=_l(n),this.isVariantNode=Qx(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:d,...f}=this.scrapeMotionValuesFromProps(n,{},this);for(const h in f){const g=f[h];c[h]!==void 0&&zt(g)&&g.set(c[h])}}mount(t){if(this.hasBeenMounted)for(const n in this.initialValues)this.values.get(n)?.jump(this.initialValues[n]),this.latestValues[n]=this.initialValues[n];this.current=t,Ss.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,r)=>this.bindToMotionValue(r,n)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(Rf.current||Jx(),this.shouldReduceMotion=Fl.current),process.env.NODE_ENV!=="production"&&Sl(this.shouldReduceMotion!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected.","reduced-motion-disabled"),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,this.parent?.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){this.projection&&this.projection.unmount(),br(this.notifyUpdate),br(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const n=this.features[t];n&&(n.unmount(),n.isMounted=!1)}this.current=null}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,n){if(this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)(),n.accelerate&&$M.has(t)&&this.current instanceof HTMLElement){const{factory:s,keyframes:a,times:l,ease:c,duration:u}=n.accelerate,d=new Tx({element:this.current,name:t,keyframes:a,times:l,ease:c,duration:mn(u)}),f=s(d);this.valueSubscriptions.set(t,()=>{f(),d.cancel()});return}const r=ui.has(t);r&&this.onBindTransform&&this.onBindTransform();const o=n.on("change",s=>{this.latestValues[t]=s,this.props.onUpdate&&ht.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let i;typeof window<"u"&&window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{o(),i&&i(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in Ll){const n=Ll[t];if(!n)continue;const{isEnabled:r,Feature:o}=n;if(!this.features[t]&&o&&r(this.props)&&(this.features[t]=new o(this)),this.features[t]){const i=this.features[t];i.isMounted?i.update():(i.mount(),i.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Lt()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;r<e0.length;r++){const o=e0[r];this.propEventSubscriptions[o]&&(this.propEventSubscriptions[o](),delete this.propEventSubscriptions[o]);const i="on"+o,s=t[i];s&&(this.propEventSubscriptions[o]=this.on(o,s))}this.prevMotionValues=a_(this,this.scrapeMotionValuesFromProps(t,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const r=this.values.get(t);n!==r&&(r&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=zr(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){let r=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return r!=null&&(typeof r=="string"&&(Cb(r)||Ib(r))?r=parseFloat(r):!s_(r)&&_n.test(n)&&(r=zx(t,n)),this.setBaseTarget(t,zt(r)?r.get():r)),zt(r)?r.get():r}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){const{initial:n}=this.props;let r;if(typeof n=="string"||typeof n=="object"){const i=kf(this.props,n,this.presenceContext?.custom);i&&(r=i[t])}if(n&&r!==void 0)return r;const o=this.getBaseTargetFromProps(this.props,t);return o!==void 0&&!zt(o)?o:this.initialValues[t]!==void 0&&r===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new Wd),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}scheduleRenderMicrotask(){Vf.render(this.render)}}class r0 extends n0{constructor(){super(...arguments),this.KeyframeResolver=VM}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){const r=t.style;return r?r[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;zt(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class jr{constructor(t){this.isMounted=!1,this.node=t}update(){}}function o0({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function u_({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function d_(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function Hf(e){return e===void 0||e===1}function Wf({scale:e,scaleX:t,scaleY:n}){return!Hf(e)||!Hf(t)||!Hf(n)}function vo(e){return Wf(e)||i0(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function i0(e){return s0(e.x)||s0(e.y)}function s0(e){return e&&e!=="0%"}function Vl(e,t,n){const r=e-n,o=t*r;return n+o}function a0(e,t,n,r,o){return o!==void 0&&(e=Vl(e,o,r)),Vl(e,n,r)+t}function qf(e,t=0,n=1,r,o){e.min=a0(e.min,t,n,r,o),e.max=a0(e.max,t,n,r,o)}function l0(e,{x:t,y:n}){qf(e.x,t.translate,t.scale,t.originPoint),qf(e.y,n.translate,n.scale,n.originPoint)}const c0=.999999999999,u0=1.0000000000001;function f_(e,t,n,r=!1){const o=n.length;if(!o)return;t.x=t.y=1;let i,s;for(let a=0;a<o;a++){i=n[a],s=i.projectionDelta;const{visualElement:l}=i.options;l&&l.props.style&&l.props.style.display==="contents"||(r&&i.options.layoutScroll&&i.scroll&&i!==i.root&&mi(e,{x:-i.scroll.offset.x,y:-i.scroll.offset.y}),s&&(t.x*=s.x.scale,t.y*=s.y.scale,l0(e,s)),r&&vo(i.latestValues)&&mi(e,i.latestValues))}t.x<u0&&t.x>c0&&(t.x=1),t.y<u0&&t.y>c0&&(t.y=1)}function hi(e,t){e.min=e.min+t,e.max=e.max+t}function d0(e,t,n,r,o=.5){const i=bt(e.min,e.max,o);qf(e,t,n,i,r)}function mi(e,t){d0(e.x,t.x,t.scaleX,t.scale,t.originX),d0(e.y,t.y,t.scaleY,t.scale,t.originY)}function f0(e,t){return o0(d_(e.getBoundingClientRect(),t))}function p_(e,t,n){const r=f0(e,n),{scroll:o}=t;return o&&(hi(r.x,o.offset.x),hi(r.y,o.offset.y)),r}const h_={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},m_=ci.length;function g_(e,t,n){let r="",o=!0;for(let i=0;i<m_;i++){const s=ci[i],a=e[s];if(a===void 0)continue;let l=!0;if(typeof a=="number")l=a===(s.startsWith("scale")?1:0);else{const c=parseFloat(a);l=s.startsWith("scale")?c===1:c===0}if(!l||n){const c=jx(a,_f[s]);if(!l){o=!1;const u=h_[s]||s;r+=`${u}(${c}) `}n&&(t[s]=c)}}return r=r.trim(),n?r=n(t,o?"":r):o&&(r="none"),r}function Uf(e,t,n){const{style:r,vars:o,transformOrigin:i}=e;let s=!1,a=!1;for(const l in t){const c=t[l];if(ui.has(l)){s=!0;continue}else if(Ub(l)){o[l]=c;continue}else{const u=jx(c,_f[l]);l.startsWith("origin")?(a=!0,i[l]=u):r[l]=u}}if(t.transform||(s||n?r.transform=g_(t,e.transform,n):r.transform&&(r.transform="none")),a){const{originX:l="50%",originY:c="50%",originZ:u=0}=i;r.transformOrigin=`${l} ${c} ${u}`}}function p0(e,{style:t,vars:n},r,o){const i=e.style;let s;for(s in t)i[s]=t[s];o?.applyProjectionStyles(i,r);for(s in n)i.setProperty(s,n[s])}function h0(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Es={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(Ee.test(e))e=parseFloat(e);else return e;const n=h0(e,t.target.x),r=h0(e,t.target.y);return`${n}% ${r}%`}},y_={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,o=_n.parse(e);if(o.length>5)return r;const i=_n.createTransformer(e),s=typeof o[0]!="number"?1:0,a=n.x.scale*t.x,l=n.y.scale*t.y;o[0+s]/=a,o[1+s]/=l;const c=bt(a,l,.5);return typeof o[2+s]=="number"&&(o[2+s]/=c),typeof o[3+s]=="number"&&(o[3+s]/=c),i(o)}},Gf={borderRadius:{...Es,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Es,borderTopRightRadius:Es,borderBottomLeftRadius:Es,borderBottomRightRadius:Es,boxShadow:y_};function m0(e,{layout:t,layoutId:n}){return ui.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!Gf[e]||e==="opacity")}function Yf(e,t,n){const r=e.style,o=t?.style,i={};if(!r)return i;for(const s in r)(zt(r[s])||o&&zt(o[s])||m0(s,e)||n?.getValue(s)?.liveStyle!==void 0)&&(i[s]=r[s]);return i}function v_(e){return window.getComputedStyle(e)}class g0 extends r0{constructor(){super(...arguments),this.type="html",this.renderInstance=p0}readValueFromInstance(t,n){if(ui.has(n))return this.projection?.isProjecting?hf(n):$N(t,n);{const r=v_(t),o=(Ub(n)?r.getPropertyValue(n):r[n])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(t,{transformPagePoint:n}){return f0(t,n)}build(t,n,r){Uf(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return Yf(t,n,r)}}function b_(e,t){return e in t}class x_ extends n0{constructor(){super(...arguments),this.type="object"}readValueFromInstance(t,n){if(b_(n,t)){const r=t[n];if(typeof r=="string"||typeof r=="number")return r}}getBaseTargetFromProps(){}removeValueFromRenderState(t,n){delete n.output[t]}measureInstanceViewportBox(){return Lt()}build(t,n){Object.assign(t.output,n)}renderInstance(t,{output:n}){Object.assign(t,n)}sortInstanceNodePosition(){return 0}}const w_={offset:"stroke-dashoffset",array:"stroke-dasharray"},S_={offset:"strokeDashoffset",array:"strokeDasharray"};function T_(e,t,n=1,r=0,o=!0){e.pathLength=1;const i=o?w_:S_;e[i.offset]=`${-r}`,e[i.array]=`${t} ${n}`}const E_=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function y0(e,{attrX:t,attrY:n,attrScale:r,pathLength:o,pathSpacing:i=1,pathOffset:s=0,...a},l,c,u){if(Uf(e,a,c),l){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:d,style:f}=e;d.transform&&(f.transform=d.transform,delete d.transform),(f.transform||d.transformOrigin)&&(f.transformOrigin=d.transformOrigin??"50% 50%",delete d.transformOrigin),f.transform&&(f.transformBox=u?.transformBox??"fill-box",delete d.transformBox);for(const h of E_)d[h]!==void 0&&(f[h]=d[h],delete d[h]);t!==void 0&&(d.x=t),n!==void 0&&(d.y=n),r!==void 0&&(d.scale=r),o!==void 0&&T_(d,o,i,s,!1)}const v0=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]),b0=e=>typeof e=="string"&&e.toLowerCase()==="svg";function C_(e,t,n,r){p0(e,t,void 0,r);for(const o in t.attrs)e.setAttribute(v0.has(o)?o:Pf(o),t.attrs[o])}function x0(e,t,n){const r=Yf(e,t,n);for(const o in e)if(zt(e[o])||zt(t[o])){const i=ci.indexOf(o)!==-1?"attr"+o.charAt(0).toUpperCase()+o.substring(1):o;r[i]=e[o]}return r}class w0 extends r0{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Lt}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(ui.has(n)){const r=$x(n);return r&&r.default||0}return n=v0.has(n)?n:Pf(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return x0(t,n,r)}build(t,n,r){y0(t,n,this.isSVGTag,r.transformTemplate,r.style)}renderInstance(t,n,r,o){C_(t,n,r,o)}mount(t){this.isSVGTag=b0(t.tagName),super.mount(t)}}const k_=Bf.length;function S0(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?S0(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<k_;n++){const r=Bf[n],o=e.props[r];(Ts(o)||o===!1)&&(t[r]=o)}return t}function T0(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}const I_=[...jf].reverse(),A_=jf.length;function P_(e){return t=>Promise.all(t.map(({animation:n,options:r})=>IM(e,n,r)))}function O_(e){let t=P_(e),n=E0(),r=!0;const o=l=>(c,u)=>{const d=di(e,u,l==="exit"?e.presenceContext?.custom:void 0);if(d){const{transition:f,transitionEnd:h,...g}=d;c={...c,...g,...h}}return c};function i(l){t=l(e)}function s(l){const{props:c}=e,u=S0(e.parent)||{},d=[],f=new Set;let h={},g=1/0;for(let m=0;m<A_;m++){const v=I_[m],b=n[v],x=c[v]!==void 0?c[v]:u[v],T=Ts(x),E=v===l?b.isActive:null;E===!1&&(g=m);let I=x===u[v]&&x!==c[v]&&T;if(I&&r&&e.manuallyAnimateOnMount&&(I=!1),b.protectedKeys={...h},!b.isActive&&E===null||!x&&!b.prevProp||Ml(x)||typeof x=="boolean")continue;if(v==="exit"&&b.isActive&&E!==!0){b.prevResolvedValues&&(h={...h,...b.prevResolvedValues});continue}const w=D_(b.prevProp,x);let C=w||v===l&&b.isActive&&!I&&T||m>g&&T,A=!1;const O=Array.isArray(x)?x:[x];let _=O.reduce(o(v),{});E===!1&&(_={});const{prevResolvedValues:N={}}=b,$={...N,..._},D=M=>{C=!0,f.has(M)&&(A=!0,f.delete(M)),b.needsAnimating[M]=!0;const k=e.getValue(M);k&&(k.liveStyle=!1)};for(const M in $){const k=_[M],V=N[M];if(h.hasOwnProperty(M))continue;let L=!1;If(k)&&If(V)?L=!T0(k,V):L=k!==V,L?k!=null?D(M):f.add(M):k!==void 0&&f.has(M)?D(M):b.protectedKeys[M]=!0}b.prevProp=x,b.prevResolvedValues=_,b.isActive&&(h={...h,..._}),r&&e.blockInitialAnimation&&(C=!1);const F=I&&w;C&&(!F||A)&&d.push(...O.map(M=>{const k={type:v};if(typeof M=="string"&&r&&!F&&e.manuallyAnimateOnMount&&e.parent){const{parent:V}=e,L=di(V,M);if(V.enteringChildren&&L){const{delayChildren:R}=L.transition||{};k.delay=Ix(V.enteringChildren,e,R)}}return{animation:M,options:k}}))}if(f.size){const m={};if(typeof c.initial!="boolean"){const v=di(e,Array.isArray(c.initial)?c.initial[0]:c.initial);v&&v.transition&&(m.transition=v.transition)}f.forEach(v=>{const b=e.getBaseTarget(v),x=e.getValue(v);x&&(x.liveStyle=!0),m[v]=b??null}),d.push({animation:m})}let y=!!d.length;return r&&(c.initial===!1||c.initial===c.animate)&&!e.manuallyAnimateOnMount&&(y=!1),r=!1,y?t(d):Promise.resolve()}function a(l,c){if(n[l].isActive===c)return Promise.resolve();e.variantChildren?.forEach(d=>d.animationState?.setActive(l,c)),n[l].isActive=c;const u=s(l);for(const d in n)n[d].protectedKeys={};return u}return{animateChanges:s,setActive:a,setAnimateFunction:i,getState:()=>n,reset:()=>{n=E0()}}}function D_(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!T0(t,e):!1}function bo(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function E0(){return{animate:bo(!0),whileInView:bo(),whileHover:bo(),whileTap:bo(),whileDrag:bo(),whileFocus:bo(),exit:bo()}}function C0(e,t){e.min=t.min,e.max=t.max}function Ln(e,t){C0(e.x,t.x),C0(e.y,t.y)}function k0(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}const I0=1e-4,N_=1-I0,M_=1+I0,A0=.01,__=0-A0,F_=0+A0;function tn(e){return e.max-e.min}function L_(e,t,n){return Math.abs(e-t)<=n}function P0(e,t,n,r=.5){e.origin=r,e.originPoint=bt(t.min,t.max,e.origin),e.scale=tn(n)/tn(t),e.translate=bt(n.min,n.max,e.origin)-e.originPoint,(e.scale>=N_&&e.scale<=M_||isNaN(e.scale))&&(e.scale=1),(e.translate>=__&&e.translate<=F_||isNaN(e.translate))&&(e.translate=0)}function Cs(e,t,n,r){P0(e.x,t.x,n.x,r?r.originX:void 0),P0(e.y,t.y,n.y,r?r.originY:void 0)}function O0(e,t,n){e.min=n.min+t.min,e.max=e.min+tn(t)}function V_(e,t,n){O0(e.x,t.x,n.x),O0(e.y,t.y,n.y)}function D0(e,t,n){e.min=t.min-n.min,e.max=e.min+tn(t)}function $l(e,t,n){D0(e.x,t.x,n.x),D0(e.y,t.y,n.y)}function N0(e,t,n,r,o){return e-=t,e=Vl(e,1/n,r),o!==void 0&&(e=Vl(e,1/o,r)),e}function $_(e,t=0,n=1,r=.5,o,i=e,s=e){if(er.test(t)&&(t=parseFloat(t),t=bt(s.min,s.max,t/100)-s.min),typeof t!="number")return;let a=bt(i.min,i.max,r);e===i&&(a-=t),e.min=N0(e.min,t,n,a,o),e.max=N0(e.max,t,n,a,o)}function M0(e,t,[n,r,o],i,s){$_(e,t[n],t[r],t[o],t.scale,i,s)}const z_=["x","scaleX","originX"],j_=["y","scaleY","originY"];function _0(e,t,n,r){M0(e.x,t,z_,n?n.x:void 0,r?r.x:void 0),M0(e.y,t,j_,n?n.y:void 0,r?r.y:void 0)}function F0(e){return e.translate===0&&e.scale===1}function L0(e){return F0(e.x)&&F0(e.y)}function V0(e,t){return e.min===t.min&&e.max===t.max}function B_(e,t){return V0(e.x,t.x)&&V0(e.y,t.y)}function $0(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function z0(e,t){return $0(e.x,t.x)&&$0(e.y,t.y)}function j0(e){return tn(e.x)/tn(e.y)}function B0(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function tr(e){return[e("x"),e("y")]}function R_(e,t,n){let r="";const o=e.x.translate/t.x,i=e.y.translate/t.y,s=n?.z||0;if((o||i||s)&&(r=`translate3d(${o}px, ${i}px, ${s}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:c,rotate:u,rotateX:d,rotateY:f,skewX:h,skewY:g}=n;c&&(r=`perspective(${c}px) ${r}`),u&&(r+=`rotate(${u}deg) `),d&&(r+=`rotateX(${d}deg) `),f&&(r+=`rotateY(${f}deg) `),h&&(r+=`skewX(${h}deg) `),g&&(r+=`skewY(${g}deg) `)}const a=e.x.scale*t.x,l=e.y.scale*t.y;return(a!==1||l!==1)&&(r+=`scale(${a}, ${l})`),r||"none"}const R0=["TopLeft","TopRight","BottomLeft","BottomRight"],H_=R0.length,H0=e=>typeof e=="string"?parseFloat(e):e,W0=e=>typeof e=="number"||Ee.test(e);function W_(e,t,n,r,o,i){o?(e.opacity=bt(0,n.opacity??1,q_(r)),e.opacityExit=bt(t.opacity??1,0,U_(r))):i&&(e.opacity=bt(t.opacity??1,n.opacity??1,r));for(let s=0;s<H_;s++){const a=`border${R0[s]}Radius`;let l=q0(t,a),c=q0(n,a);if(l===void 0&&c===void 0)continue;l||(l=0),c||(c=0),l===0||c===0||W0(l)===W0(c)?(e[a]=Math.max(bt(H0(l),H0(c),r),0),(er.test(c)||er.test(l))&&(e[a]+="%")):e[a]=c}(t.rotate||n.rotate)&&(e.rotate=bt(t.rotate||0,n.rotate||0,r))}function q0(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const q_=U0(0,.5,Vb),U_=U0(.5,.95,Sn);function U0(e,t,n){return r=>r<e?0:r>t?1:n(ii(e,t,r))}function G0(e,t,n){const r=zt(e)?e:zr(e);return r.start(Cf("",r,t,n)),r.animation}function ks(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}const G_=(e,t)=>e.depth-t.depth;class Y_{constructor(){this.children=[],this.isDirty=!1}add(t){Rd(this.children,t),this.isDirty=!0}remove(t){ri(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(G_),this.isDirty=!1,this.children.forEach(t)}}function K_(e,t){const n=en.now(),r=({timestamp:o})=>{const i=o-n;i>=t&&(br(r),e(i-t))};return ht.setup(r,!0),()=>br(r)}function zl(e){return zt(e)?e.get():e}class Z_{constructor(){this.members=[]}add(t){Rd(this.members,t);for(let n=this.members.length-1;n>=0;n--){const r=this.members[n];if(r===t||r===this.lead||r===this.prevLead)continue;const o=r.instance;o&&o.isConnected===!1&&r.isPresent!==!1&&!r.snapshot&&ri(this.members,r)}t.scheduleRender()}remove(t){if(ri(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(o=>t===o);if(n===0)return!1;let r;for(let o=n;o>=0;o--){const i=this.members[o],s=i.instance;if(i.isPresent!==!1&&(!s||s.isConnected!==!1)){r=i;break}}return r?(this.promote(r),!0):!1}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender();const o=r.options.layoutDependency,i=t.options.layoutDependency;if(!(o!==void 0&&i!==void 0&&o===i)){const l=r.instance;l&&l.isConnected===!1&&!r.snapshot||(t.resumeFrom=r,n&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0))}const{crossfade:a}=t.options;a===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}const jl={hasAnimatedSinceResize:!0,hasEverUpdated:!1},Kf=["","X","Y","Z"],X_=1e3;let Q_=0;function Zf(e,t,n,r){const{latestValues:o}=t;o[e]&&(n[e]=o[e],t.setStaticValue(e,0),r&&(r[e]=0))}function Y0(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=Mx(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:o,layoutId:i}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",ht,!(o||i))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&Y0(r)}function K0({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:o}){return class{constructor(s={},a=t?.()){this.id=Q_++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(t2),this.nodes.forEach(i2),this.nodes.forEach(s2),this.nodes.forEach(n2)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=s,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new Y_)}addEventListener(s,a){return this.eventHandlers.has(s)||this.eventHandlers.set(s,new Wd),this.eventHandlers.get(s).add(a)}notifyListeners(s,...a){const l=this.eventHandlers.get(s);l&&l.notify(...a)}hasListeners(s){return this.eventHandlers.has(s)}mount(s){if(this.instance)return;this.isSVG=Pl(s)&&!Kx(s),this.instance=s;const{layoutId:a,layout:l,visualElement:c}=this.options;if(c&&!c.current&&c.mount(s),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(l||a)&&(this.isLayoutDirty=!0),e){let u,d=0;const f=()=>this.root.updateBlockedByResize=!1;ht.read(()=>{d=window.innerWidth}),e(s,()=>{const h=window.innerWidth;h!==d&&(d=h,this.root.updateBlockedByResize=!0,u&&u(),u=K_(f,250),jl.hasAnimatedSinceResize&&(jl.hasAnimatedSinceResize=!1,this.nodes.forEach(Q0)))})}a&&this.root.registerSharedNode(a,this),this.options.animate!==!1&&c&&(a||l)&&this.addEventListener("didUpdate",({delta:u,hasLayoutChanged:d,hasRelativeLayoutChanged:f,layout:h})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const g=this.options.transition||c.getDefaultTransition()||d2,{onLayoutAnimationStart:y,onLayoutAnimationComplete:m}=c.getProps(),v=!this.targetLayout||!z0(this.targetLayout,h),b=!d&&f;if(this.options.layoutRoot||this.resumeFrom||b||d&&(v||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const x={...Ef(g,"layout"),onPlay:y,onComplete:m};(c.shouldReduceMotion||this.options.layoutRoot)&&(x.delay=0,x.type=!1),this.startAnimation(x),this.setAnimationOrigin(u,b)}else d||Q0(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=h})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const s=this.getStack();s&&s.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),br(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(a2),this.animationId++)}getTransformTemplate(){const{visualElement:s}=this.options;return s&&s.getProps().transformTemplate}willUpdate(s=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Y0(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let u=0;u<this.path.length;u++){const d=this.path[u];d.shouldResetTransform=!0,d.updateScroll("snapshot"),d.options.layoutRoot&&d.willUpdate(!1)}const{layoutId:a,layout:l}=this.options;if(a===void 0&&!l)return;const c=this.getTransformTemplate();this.prevTransformTemplateValue=c?c(this.latestValues,""):void 0,this.updateSnapshot(),s&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(Z0);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(X0);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(o2),this.nodes.forEach(J_),this.nodes.forEach(e2)):this.nodes.forEach(X0),this.clearAllSnapshots();const a=en.now();Yt.delta=Jn(0,1e3/60,a-Yt.timestamp),Yt.timestamp=a,Yt.isProcessing=!0,Yd.update.process(Yt),Yd.preRender.process(Yt),Yd.render.process(Yt),Yt.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Vf.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(r2),this.sharedNodes.forEach(l2)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,ht.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){ht.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!tn(this.snapshot.measuredBox.x)&&!tn(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l<this.path.length;l++)this.path[l].updateScroll();const s=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected=Lt(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:a}=this.options;a&&a.notify("LayoutMeasure",this.layout.layoutBox,s?s.layoutBox:void 0)}updateScroll(s="measure"){let a=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===s&&(a=!1),a&&this.instance){const l=r(this.instance);this.scroll={animationId:this.root.animationId,phase:s,isRoot:l,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:l}}}resetTransform(){if(!o)return;const s=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!L0(this.projectionDelta),l=this.getTransformTemplate(),c=l?l(this.latestValues,""):void 0,u=c!==this.prevTransformTemplateValue;s&&this.instance&&(a||vo(this.latestValues)||u)&&(o(this.instance,c),this.shouldResetTransform=!1,this.scheduleRender())}measure(s=!0){const a=this.measurePageBox();let l=this.removeElementScroll(a);return s&&(l=this.removeTransform(l)),f2(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:s}=this.options;if(!s)return Lt();const a=s.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(p2))){const{scroll:c}=this.root;c&&(hi(a.x,c.offset.x),hi(a.y,c.offset.y))}return a}removeElementScroll(s){const a=Lt();if(Ln(a,s),this.scroll?.wasRoot)return a;for(let l=0;l<this.path.length;l++){const c=this.path[l],{scroll:u,options:d}=c;c!==this.root&&u&&d.layoutScroll&&(u.wasRoot&&Ln(a,s),hi(a.x,u.offset.x),hi(a.y,u.offset.y))}return a}applyTransform(s,a=!1){const l=Lt();Ln(l,s);for(let c=0;c<this.path.length;c++){const u=this.path[c];!a&&u.options.layoutScroll&&u.scroll&&u!==u.root&&mi(l,{x:-u.scroll.offset.x,y:-u.scroll.offset.y}),vo(u.latestValues)&&mi(l,u.latestValues)}return vo(this.latestValues)&&mi(l,this.latestValues),l}removeTransform(s){const a=Lt();Ln(a,s);for(let l=0;l<this.path.length;l++){const c=this.path[l];if(!c.instance||!vo(c.latestValues))continue;Wf(c.latestValues)&&c.updateSnapshot();const u=Lt(),d=c.measurePageBox();Ln(u,d),_0(a,c.latestValues,c.snapshot?c.snapshot.layoutBox:void 0,u)}return vo(this.latestValues)&&_0(a,this.latestValues),a}setTargetDelta(s){this.targetDelta=s,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(s){this.options={...this.options,...s,crossfade:s.crossfade!==void 0?s.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==Yt.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(s=!1){const a=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=a.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=a.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=a.isSharedProjectionDirty);const l=!!this.resumingFrom||this!==a;if(!(s||l&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:u,layoutId:d}=this.options;if(!this.layout||!(u||d))return;this.resolvedRelativeTargetAt=Yt.timestamp;const f=this.getClosestProjectingParent();f&&this.linkedParentVersion!==f.layoutVersion&&!f.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(f&&f.layout?this.createRelativeTarget(f,this.layout.layoutBox,f.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=Lt(),this.targetWithTransforms=Lt()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),V_(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):Ln(this.target,this.layout.layoutBox),l0(this.target,this.targetDelta)):Ln(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,f&&!!f.resumingFrom==!!this.resumingFrom&&!f.options.layoutScroll&&f.target&&this.animationProgress!==1?this.createRelativeTarget(f,this.target,f.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||Wf(this.parent.latestValues)||i0(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(s,a,l){this.relativeParent=s,this.linkedParentVersion=s.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Lt(),this.relativeTargetOrigin=Lt(),$l(this.relativeTargetOrigin,a,l),Ln(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){const s=this.getLead(),a=!!this.resumingFrom||this!==s;let l=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(l=!1),a&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(l=!1),this.resolvedRelativeTargetAt===Yt.timestamp&&(l=!1),l)return;const{layout:c,layoutId:u}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(c||u))return;Ln(this.layoutCorrected,this.layout.layoutBox);const d=this.treeScale.x,f=this.treeScale.y;f_(this.layoutCorrected,this.treeScale,this.path,a),s.layout&&!s.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(s.target=s.layout.layoutBox,s.targetWithTransforms=Lt());const{target:h}=s;if(!h){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(k0(this.prevProjectionDelta.x,this.projectionDelta.x),k0(this.prevProjectionDelta.y,this.projectionDelta.y)),Cs(this.projectionDelta,this.layoutCorrected,h,this.latestValues),(this.treeScale.x!==d||this.treeScale.y!==f||!B0(this.projectionDelta.x,this.prevProjectionDelta.x)||!B0(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",h))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(s=!0){if(this.options.visualElement?.scheduleRender(),s){const a=this.getStack();a&&a.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=pi(),this.projectionDelta=pi(),this.projectionDeltaWithTransform=pi()}setAnimationOrigin(s,a=!1){const l=this.snapshot,c=l?l.latestValues:{},u={...this.latestValues},d=pi();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const f=Lt(),h=l?l.source:void 0,g=this.layout?this.layout.source:void 0,y=h!==g,m=this.getStack(),v=!m||m.members.length<=1,b=!!(y&&!v&&this.options.crossfade===!0&&!this.path.some(u2));this.animationProgress=0;let x;this.mixTargetDelta=T=>{const E=T/1e3;J0(d.x,s.x,E),J0(d.y,s.y,E),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&($l(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),c2(this.relativeTarget,this.relativeTargetOrigin,f,E),x&&B_(this.relativeTarget,x)&&(this.isProjectionDirty=!1),x||(x=Lt()),Ln(x,this.relativeTarget)),y&&(this.animationValues=u,W_(u,c,this.latestValues,E,b,v)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=E},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(s){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(br(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=ht.update(()=>{jl.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=zr(0)),this.motionValue.jump(0,!1),this.currentAnimation=G0(this.motionValue,[0,1e3],{...s,velocity:0,isSync:!0,onUpdate:a=>{this.mixTargetDelta(a),s.onUpdate&&s.onUpdate(a)},onStop:()=>{},onComplete:()=>{s.onComplete&&s.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const s=this.getStack();s&&s.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(X_),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const s=this.getLead();let{targetWithTransforms:a,target:l,layout:c,latestValues:u}=s;if(!(!a||!l||!c)){if(this!==s&&this.layout&&c&&ow(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||Lt();const d=tn(this.layout.layoutBox.x);l.x.min=s.target.x.min,l.x.max=l.x.min+d;const f=tn(this.layout.layoutBox.y);l.y.min=s.target.y.min,l.y.max=l.y.min+f}Ln(a,l),mi(a,u),Cs(this.projectionDeltaWithTransform,this.layoutCorrected,a,u)}}registerSharedNode(s,a){this.sharedNodes.has(s)||this.sharedNodes.set(s,new Z_),this.sharedNodes.get(s).add(a);const c=a.options.initialPromotionConfig;a.promote({transition:c?c.transition:void 0,preserveFollowOpacity:c&&c.shouldPreserveFollowOpacity?c.shouldPreserveFollowOpacity(a):void 0})}isLead(){const s=this.getStack();return s?s.lead===this:!0}getLead(){const{layoutId:s}=this.options;return s?this.getStack()?.lead||this:this}getPrevLead(){const{layoutId:s}=this.options;return s?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:s}=this.options;if(s)return this.root.sharedNodes.get(s)}promote({needsReset:s,transition:a,preserveFollowOpacity:l}={}){const c=this.getStack();c&&c.promote(this,l),s&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const s=this.getStack();return s?s.relegate(this):!1}resetSkewAndRotation(){const{visualElement:s}=this.options;if(!s)return;let a=!1;const{latestValues:l}=s;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(a=!0),!a)return;const c={};l.z&&Zf("z",s,c,this.animationValues);for(let u=0;u<Kf.length;u++)Zf(`rotate${Kf[u]}`,s,c,this.animationValues),Zf(`skew${Kf[u]}`,s,c,this.animationValues);s.render();for(const u in c)s.setStaticValue(u,c[u]),this.animationValues&&(this.animationValues[u]=c[u]);s.scheduleRender()}applyProjectionStyles(s,a){if(!this.instance||this.isSVG)return;if(!this.isVisible){s.visibility="hidden";return}const l=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,s.visibility="",s.opacity="",s.pointerEvents=zl(a?.pointerEvents)||"",s.transform=l?l(this.latestValues,""):"none";return}const c=this.getLead();if(!this.projectionDelta||!this.layout||!c.target){this.options.layoutId&&(s.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,s.pointerEvents=zl(a?.pointerEvents)||""),this.hasProjected&&!vo(this.latestValues)&&(s.transform=l?l({},""):"none",this.hasProjected=!1);return}s.visibility="";const u=c.animationValues||c.latestValues;this.applyTransformsToTarget();let d=R_(this.projectionDeltaWithTransform,this.treeScale,u);l&&(d=l(u,d)),s.transform=d;const{x:f,y:h}=this.projectionDelta;s.transformOrigin=`${f.origin*100}% ${h.origin*100}% 0`,c.animationValues?s.opacity=c===this?u.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:u.opacityExit:s.opacity=c===this?u.opacity!==void 0?u.opacity:"":u.opacityExit!==void 0?u.opacityExit:0;for(const g in Gf){if(u[g]===void 0)continue;const{correct:y,applyTo:m,isCSSVariable:v}=Gf[g],b=d==="none"?u[g]:y(u[g],c);if(m){const x=m.length;for(let T=0;T<x;T++)s[m[T]]=b}else v?this.options.visualElement.renderState.vars[g]=b:s[g]=b}this.options.layoutId&&(s.pointerEvents=c===this?zl(a?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(s=>s.currentAnimation?.stop()),this.root.nodes.forEach(Z0),this.root.sharedNodes.clear()}}}function J_(e){e.updateLayout()}function e2(e){const t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:n,measuredBox:r}=e.layout,{animationType:o}=e.options,i=t.source!==e.layout.source;o==="size"?tr(u=>{const d=i?t.measuredBox[u]:t.layoutBox[u],f=tn(d);d.min=n[u].min,d.max=d.min+f}):ow(o,t.layoutBox,n)&&tr(u=>{const d=i?t.measuredBox[u]:t.layoutBox[u],f=tn(n[u]);d.max=d.min+f,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[u].max=e.relativeTarget[u].min+f)});const s=pi();Cs(s,n,t.layoutBox);const a=pi();i?Cs(a,e.applyTransform(r,!0),t.measuredBox):Cs(a,n,t.layoutBox);const l=!L0(s);let c=!1;if(!e.resumeFrom){const u=e.getClosestProjectingParent();if(u&&!u.resumeFrom){const{snapshot:d,layout:f}=u;if(d&&f){const h=Lt();$l(h,t.layoutBox,d.layoutBox);const g=Lt();$l(g,n,f.layoutBox),z0(h,g)||(c=!0),u.options.layoutRoot&&(e.relativeTarget=g,e.relativeTargetOrigin=h,e.relativeParent=u)}}}e.notifyListeners("didUpdate",{layout:n,snapshot:t,delta:a,layoutDelta:s,hasLayoutChanged:l,hasRelativeLayoutChanged:c})}else if(e.isLead()){const{onExitComplete:n}=e.options;n&&n()}e.options.transition=void 0}function t2(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function n2(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function r2(e){e.clearSnapshot()}function Z0(e){e.clearMeasurements()}function X0(e){e.isLayoutDirty=!1}function o2(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function Q0(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function i2(e){e.resolveTargetDelta()}function s2(e){e.calcProjection()}function a2(e){e.resetSkewAndRotation()}function l2(e){e.removeLeadSnapshot()}function J0(e,t,n){e.translate=bt(t.translate,0,n),e.scale=bt(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function ew(e,t,n,r){e.min=bt(t.min,n.min,r),e.max=bt(t.max,n.max,r)}function c2(e,t,n,r){ew(e.x,t.x,n.x,r),ew(e.y,t.y,n.y,r)}function u2(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const d2={duration:.45,ease:[.4,0,.1,1]},tw=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),nw=tw("applewebkit/")&&!tw("chrome/")?Math.round:Sn;function rw(e){e.min=nw(e.min),e.max=nw(e.max)}function f2(e){rw(e.x),rw(e.y)}function ow(e,t,n){return e==="position"||e==="preserve-aspect"&&!L_(j0(t),j0(n),.2)}function p2(e){return e!==e.root&&e.scroll?.wasRoot}const h2=K0({attachResizeListener:(e,t)=>ks(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0}),m2=e=>!e.isLayoutDirty&&e.willUpdate(!1);function iw(){const e=new Set,t=new WeakMap,n=()=>e.forEach(m2);return{add:r=>{e.add(r),t.set(r,r.addEventListener("willUpdate",n))},remove:r=>{e.delete(r);const o=t.get(r);o&&(o(),t.delete(r)),n()},dirty:n}}const Xf={current:void 0},sw=K0({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Xf.current){const e=new h2({});e.mount(window),e.setOptions({layoutScroll:!0}),Xf.current=e}return Xf.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),xo=S.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function aw(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function g2(...e){return t=>{let n=!1;const r=e.map(o=>{const i=aw(o,t);return!n&&typeof i=="function"&&(n=!0),i});if(n)return()=>{for(let o=0;o<r.length;o++){const i=r[o];typeof i=="function"?i():aw(e[o],null)}}}}function y2(...e){return P.useCallback(g2(...e),e)}class v2 extends P.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent&&this.props.pop!==!1){const r=n.offsetParent,o=Lf(r)&&r.offsetWidth||0,i=Lf(r)&&r.offsetHeight||0,s=this.props.sizeRef.current;s.height=n.offsetHeight||0,s.width=n.offsetWidth||0,s.top=n.offsetTop,s.left=n.offsetLeft,s.right=o-s.width-s.left,s.bottom=i-s.height-s.top}return null}componentDidUpdate(){}render(){return this.props.children}}function b2({children:e,isPresent:t,anchorX:n,anchorY:r,root:o,pop:i}){const s=S.useId(),a=S.useRef(null),l=S.useRef({width:0,height:0,top:0,left:0,right:0,bottom:0}),{nonce:c}=S.useContext(xo),u=e.props?.ref??e?.ref,d=y2(a,u);return S.useInsertionEffect(()=>{const{width:f,height:h,top:g,left:y,right:m,bottom:v}=l.current;if(t||i===!1||!a.current||!f||!h)return;const b=n==="left"?`left: ${y}`:`right: ${m}`,x=r==="bottom"?`bottom: ${v}`:`top: ${g}`;a.current.dataset.motionPopId=s;const T=document.createElement("style");c&&(T.nonce=c);const E=o??document.head;return E.appendChild(T),T.sheet&&T.sheet.insertRule(`
8
+ [data-motion-pop-id="${s}"] {
8
9
  position: absolute !important;
9
- width: ${d}px !important;
10
- height: ${f}px !important;
11
- ${y}px !important;
10
+ width: ${f}px !important;
11
+ height: ${h}px !important;
12
+ ${b}px !important;
12
13
  ${x}px !important;
13
14
  }
14
- `),()=>{E.contains(b)&&E.removeChild(b)}},[t]),g.jsx(NN,{isPresent:t,childRef:a,sizeRef:s,children:A.cloneElement(e,{ref:u})})}const LN=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:o,presenceAffectsLayout:i,mode:a,anchorX:s,anchorY:l,root:c})=>{const u=On(VN),d=S.useId();let f=!0,p=S.useMemo(()=>(f=!1,{id:d,initial:t,isPresent:n,custom:o,onExitComplete:v=>{u.set(v,!0);for(const h of u.values())if(!h)return;r&&r()},register:v=>(u.set(v,!1),()=>u.delete(v))}),[n,u,r]);return i&&f&&(p={...p}),S.useMemo(()=>{u.forEach((v,h)=>u.set(h,!1))},[n]),A.useEffect(()=>{!n&&!u.size&&r&&r()},[n]),a==="popLayout"&&(e=g.jsx(FN,{isPresent:n,anchorX:s,anchorY:l,root:c,children:e})),g.jsx(cl.Provider,{value:p,children:e})};function VN(){return new Map}function V0(e=!0){const t=S.useContext(cl);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:o}=t,i=S.useId();S.useEffect(()=>{if(e)return o(i)},[e]);const a=S.useCallback(()=>e&&r&&r(i),[i,r,e]);return!n&&r?[!1,a]:[!0]}const Tl=e=>e.key||"";function $0(e){const t=[];return S.Children.forEach(e,n=>{S.isValidElement(n)&&t.push(n)}),t}const Nn=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:o=!0,mode:i="sync",propagate:a=!1,anchorX:s="left",anchorY:l="top",root:c})=>{const[u,d]=V0(a),f=S.useMemo(()=>$0(e),[e]),p=a&&!u?[]:f.map(Tl),v=S.useRef(!0),h=S.useRef(f),m=On(()=>new Map),y=S.useRef(new Set),[x,b]=S.useState(f),[E,T]=S.useState(f);ll(()=>{v.current=!1,h.current=f;for(let k=0;k<E.length;k++){const P=Tl(E[k]);p.includes(P)?(m.delete(P),y.current.delete(P)):m.get(P)!==!0&&m.set(P,!1)}},[E,p.length,p.join("-")]);const I=[];if(f!==x){let k=[...f];for(let P=0;P<E.length;P++){const _=E[P],F=Tl(_);p.includes(F)||(k.splice(P,0,_),I.push(_))}return i==="wait"&&I.length&&(k=I),T($0(k)),b(f),null}process.env.NODE_ENV!=="production"&&i==="wait"&&E.length>1&&console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`);const{forceRender:w}=S.useContext(na);return g.jsx(g.Fragment,{children:E.map(k=>{const P=Tl(k),_=a&&!u?!1:f===E||p.includes(P),F=()=>{if(y.current.has(P))return;if(y.current.add(P),m.has(P))m.set(P,!0);else return;let V=!0;m.forEach(D=>{D||(V=!1)}),V&&(w?.(),T(h.current),a&&d?.(),r&&r())};return g.jsx(LN,{isPresent:_,initial:!v.current||n?void 0:!1,custom:t,presenceAffectsLayout:o,mode:i,root:c,onExitComplete:_?void 0:F,anchorX:s,anchorY:l,children:k},P)})})},$N=S.createContext(null);function zN(){const e=S.useRef(!1);return ll(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function jN(){const e=zN(),[t,n]=S.useState(0),r=S.useCallback(()=>{e.current&&n(t+1)},[t]);return[S.useCallback(()=>gt.postRender(r),[r]),t]}const z0=e=>e===!0,RN=e=>z0(e===!0)||e==="id",BN=({children:e,id:t,inherit:n=!0})=>{const r=S.useContext(na),o=S.useContext($N),[i,a]=jN(),s=S.useRef(null),l=r.id||o;s.current===null&&(RN(n)&&l&&(t=t?l+"-"+t:l),s.current={id:t,group:z0(n)&&r.group||N0()});const c=S.useMemo(()=>({...s.current,forceRender:i}),[a]);return g.jsx(na.Provider,{value:c,children:e})},j0=S.createContext({strict:!1}),R0={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]};let B0=!1;function HN(){if(B0)return;const e={};for(const t in R0)e[t]={isEnabled:n=>R0[t].some(r=>!!n[r])};Ox(e),B0=!0}function H0(){return HN(),kD()}function WN(e){const t=H0();for(const n in e)t[n]={...t[n],...e[n]};Ox(t)}const qN=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function El(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||qN.has(e)}let W0=e=>!El(e);function q0(e){typeof e=="function"&&(W0=t=>t.startsWith("on")?!El(t):e(t))}try{q0(require("@emotion/is-prop-valid").default)}catch{}function UN(e,t,n){const r={};for(const o in e)o==="values"&&typeof e.values=="object"||(W0(o)||n===!0&&El(o)||!t&&!El(o)||e.draggable&&o.startsWith("onDrag"))&&(r[o]=e[o]);return r}function Mf({children:e,isValidProp:t,...n}){t&&q0(t),n={...S.useContext(ii),...n},n.isStatic=On(()=>n.isStatic);const r=S.useMemo(()=>n,[JSON.stringify(n.transition),n.transformPagePoint,n.reducedMotion]);return g.jsx(ii.Provider,{value:r,children:e})}const kl=S.createContext({});function GN(e,t){if(vl(e)){const{initial:n,animate:r}=e;return{initial:n===!1||ha(n)?n:void 0,animate:ha(r)?r:void 0}}return e.inherit!==!1?t:{}}function YN(e){const{initial:t,animate:n}=GN(e,S.useContext(kl));return S.useMemo(()=>({initial:t,animate:n}),[U0(t),U0(n)])}function U0(e){return Array.isArray(e)?e.join(" "):e}const Df=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function G0(e,t,n){for(const r in t)!jt(t[r])&&!Wx(r,n)&&(e[r]=t[r])}function KN({transformTemplate:e},t){return S.useMemo(()=>{const n=Df();return Cf(n,t,e),Object.assign({},n.vars,n.style)},[t])}function ZN(e,t){const n=e.style||{},r={};return G0(r,n,e),Object.assign(r,KN(e,t)),r}function XN(e,t){const n={},r=ZN(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}const Y0=()=>({...Df(),attrs:{}});function QN(e,t,n,r){const o=S.useMemo(()=>{const i=Y0();return Ux(i,t,Yx(r),e.transformTemplate,e.style),{...i.attrs,style:{...i.style}}},[t]);if(e.style){const i={};G0(i,e.style,e),o.style={...i,...o.style}}return o}const JN=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function Nf(e){return typeof e!="string"||e.includes("-")?!1:!!(JN.indexOf(e)>-1||/[A-Z]/u.test(e))}function e2(e,t,n,{latestValues:r},o,i=!1,a){const l=(a??Nf(e)?QN:XN)(t,r,o,e),c=UN(t,typeof e=="string",i),u=e!==S.Fragment?{...c,...l,ref:n}:{},{children:d}=t,f=S.useMemo(()=>jt(d)?d.get():d,[d]);return S.createElement(e,{...u,children:f})}function t2({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,o){return{latestValues:n2(n,r,o,e),renderState:t()}}function n2(e,t,n,r){const o={},i=r(e,{});for(const f in i)o[f]=wl(i[f]);let{initial:a,animate:s}=e;const l=vl(e),c=Ax(e);t&&c&&!l&&e.inherit!==!1&&(a===void 0&&(a=t.initial),s===void 0&&(s=t.animate));let u=n?n.initial===!1:!1;u=u||a===!1;const d=u?s:a;if(d&&typeof d!="boolean"&&!gl(d)){const f=Array.isArray(d)?d:[d];for(let p=0;p<f.length;p++){const v=sf(e,f[p]);if(v){const{transitionEnd:h,transition:m,...y}=v;for(const x in y){let b=y[x];if(Array.isArray(b)){const E=u?b.length-1:0;b=b[E]}b!==null&&(o[x]=b)}for(const x in h)o[x]=h[x]}}}return o}const K0=e=>(t,n)=>{const r=S.useContext(kl),o=S.useContext(cl),i=()=>t2(e,t,r,o);return n?i():On(i)},r2=K0({scrapeMotionValuesFromProps:Af,createRenderState:Df}),o2=K0({scrapeMotionValuesFromProps:Kx,createRenderState:Y0}),i2=Symbol.for("motionComponentSymbol");function a2(e,t,n){const r=S.useRef(n);S.useInsertionEffect(()=>{r.current=n});const o=S.useRef(null);return S.useCallback(i=>{i&&e.onMount?.(i),t&&(i?t.mount(i):t.unmount());const a=r.current;if(typeof a=="function")if(i){const s=a(i);typeof s=="function"&&(o.current=s)}else o.current?(o.current(),o.current=null):a(i);else a&&(a.current=i)},[t])}const Z0=S.createContext({});function ya(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function s2(e,t,n,r,o,i){const{visualElement:a}=S.useContext(kl),s=S.useContext(j0),l=S.useContext(cl),c=S.useContext(ii).reducedMotion,u=S.useRef(null);r=r||s.renderer,!u.current&&r&&(u.current=r(e,{visualState:t,parent:a,props:n,presenceContext:l,blockInitialAnimation:l?l.initial===!1:!1,reducedMotionConfig:c,isSVG:i}));const d=u.current,f=S.useContext(Z0);d&&!d.projection&&o&&(d.type==="html"||d.type==="svg")&&l2(u.current,n,o,f);const p=S.useRef(!1);S.useInsertionEffect(()=>{d&&p.current&&d.update(n,l)});const v=n[sx],h=S.useRef(!!v&&!window.MotionHandoffIsComplete?.(v)&&window.MotionHasOptimisedAnimation?.(v));return ll(()=>{d&&(p.current=!0,window.MotionIsMounted=!0,d.updateFeatures(),d.scheduleRenderMicrotask(),h.current&&d.animationState&&d.animationState.animateChanges())}),S.useEffect(()=>{d&&(!h.current&&d.animationState&&d.animationState.animateChanges(),h.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(v)}),h.current=!1),d.enteringChildren=void 0)}),d}function l2(e,t,n,r){const{layoutId:o,layout:i,drag:a,dragConstraints:s,layoutScroll:l,layoutRoot:c,layoutCrossfade:u}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:X0(e.parent)),e.projection.setOptions({layoutId:o,layout:i,alwaysMeasureLayout:!!a||s&&ya(s),visualElement:e,animationType:typeof i=="string"?i:"both",initialPromotionConfig:r,crossfade:u,layoutScroll:l,layoutRoot:c})}function X0(e){if(e)return e.options.allowProjection!==!1?e.projection:X0(e.parent)}function Ff(e,{forwardMotionProps:t=!1,type:n}={},r,o){r&&WN(r);const i=n?n==="svg":Nf(e),a=i?o2:r2;function s(c,u){let d;const f={...S.useContext(ii),...c,layoutId:c2(c)},{isStatic:p}=f,v=YN(c),h=a(c,p);if(!p&&nb){u2(f,r);const m=d2(f);d=m.MeasureLayout,v.visualElement=s2(e,h,f,o,m.ProjectionNode,i)}return g.jsxs(kl.Provider,{value:v,children:[d&&v.visualElement?g.jsx(d,{visualElement:v.visualElement,...f}):null,e2(e,c,a2(h,v.visualElement,u),h,p,t,i)]})}s.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const l=S.forwardRef(s);return l[i2]=e,l}function c2({layoutId:e}){const t=S.useContext(na).id;return t&&e!==void 0?t+"-"+e:e}function u2(e,t){const n=S.useContext(j0).strict;if(process.env.NODE_ENV!=="production"&&t&&n){const r="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";e.ignoreStrict?Yo(!1,r,"lazy-strict-mode"):dn(!1,r,"lazy-strict-mode")}}function d2(e){const t=H0(),{drag:n,layout:r}=t;if(!n&&!r)return{};const o={...n,...r};return{MeasureLayout:n?.isEnabled(e)||r?.isEnabled(e)?o.MeasureLayout:void 0,ProjectionNode:o.ProjectionNode}}function f2(e,t){if(typeof Proxy>"u")return Ff;const n=new Map,r=(i,a)=>Ff(i,a,e,t),o=(i,a)=>(process.env.NODE_ENV!=="production"&&Cd(!1,"motion() is deprecated. Use motion.create() instead."),r(i,a));return new Proxy(o,{get:(i,a)=>a==="create"?r:(n.has(a)||n.set(a,Ff(a,void 0,e,t)),n.get(a))})}const p2=(e,t)=>t.isSVG??Nf(e)?new Zx(t):new qx(t,{allowProjection:e!==S.Fragment});class h2 extends Dr{constructor(t){super(t),t.animationState||(t.animationState=UD(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();gl(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}}let m2=0;class g2 extends Dr{constructor(){super(...arguments),this.id=m2++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;const o=this.node.animationState.setActive("exit",!t);n&&!t&&o.then(()=>{n(this.id)})}mount(){const{register:t,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const v2={animation:{Feature:h2},exit:{Feature:g2}};function ba(e){return{point:{x:e.pageX,y:e.pageY}}}const y2=e=>t=>vf(t)&&e(t,ba(t));function xa(e,t,n,r){return va(e,t,y2(n),r)}const Q0=({current:e})=>e?e.ownerDocument.defaultView:null,J0=(e,t)=>Math.abs(e-t);function b2(e,t){const n=J0(e.x,t.x),r=J0(e.y,t.y);return Math.sqrt(n**2+r**2)}const ew=new Set(["auto","scroll"]);class tw{constructor(t,n,{transformPagePoint:r,contextWindow:o=window,dragSnapToOrigin:i=!1,distanceThreshold:a=3,element:s}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=p=>{this.handleScroll(p.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const p=Vf(this.lastMoveEventInfo,this.history),v=this.startEvent!==null,h=b2(p.offset,{x:0,y:0})>=this.distanceThreshold;if(!v&&!h)return;const{point:m}=p,{timestamp:y}=Kt;this.history.push({...m,timestamp:y});const{onStart:x,onMove:b}=this.handlers;v||(x&&x(this.lastMoveEvent,p),this.startEvent=this.lastMoveEvent),b&&b(this.lastMoveEvent,p)},this.handlePointerMove=(p,v)=>{this.lastMoveEvent=p,this.lastMoveEventInfo=Lf(v,this.transformPagePoint),gt.update(this.updatePoint,!0)},this.handlePointerUp=(p,v)=>{this.end();const{onEnd:h,onSessionEnd:m,resumeAnimation:y}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&y&&y(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const x=Vf(p.type==="pointercancel"?this.lastMoveEventInfo:Lf(v,this.transformPagePoint),this.history);this.startEvent&&h&&h(p,x),m&&m(p,x)},!vf(t))return;this.dragSnapToOrigin=i,this.handlers=n,this.transformPagePoint=r,this.distanceThreshold=a,this.contextWindow=o||window;const l=ba(t),c=Lf(l,this.transformPagePoint),{point:u}=c,{timestamp:d}=Kt;this.history=[{...u,timestamp:d}];const{onSessionStart:f}=n;f&&f(t,Vf(c,this.history)),this.removeListeners=oa(xa(this.contextWindow,"pointermove",this.handlePointerMove),xa(this.contextWindow,"pointerup",this.handlePointerUp),xa(this.contextWindow,"pointercancel",this.handlePointerUp)),s&&this.startScrollTracking(s)}startScrollTracking(t){let n=t.parentElement;for(;n;){const r=getComputedStyle(n);(ew.has(r.overflowX)||ew.has(r.overflowY))&&this.scrollPositions.set(n,{x:n.scrollLeft,y:n.scrollTop}),n=n.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0,passive:!0}),window.addEventListener("scroll",this.onWindowScroll,{passive:!0}),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(t){const n=this.scrollPositions.get(t);if(!n)return;const r=t===window,o=r?{x:window.scrollX,y:window.scrollY}:{x:t.scrollLeft,y:t.scrollTop},i={x:o.x-n.x,y:o.y-n.y};i.x===0&&i.y===0||(r?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=i.x,this.lastMoveEventInfo.point.y+=i.y):this.history.length>0&&(this.history[0].x-=i.x,this.history[0].y-=i.y),this.scrollPositions.set(t,o),gt.update(this.updatePoint,!0))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),hr(this.updatePoint)}}function Lf(e,t){return t?{point:t(e.point)}:e}function nw(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Vf({point:e},t){return{point:e,delta:nw(e,rw(t)),offset:nw(e,x2(t)),velocity:w2(t,.1)}}function x2(e){return e[0]}function rw(e){return e[e.length-1]}function w2(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const o=rw(e);for(;n>=0&&(r=e[n],!(o.timestamp-r.timestamp>_n(t)));)n--;if(!r)return{x:0,y:0};const i=yn(o.timestamp-r.timestamp);if(i===0)return{x:0,y:0};const a={x:(o.x-r.x)/i,y:(o.y-r.y)/i};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function S2(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?yt(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?yt(n,e,r.max):Math.min(e,n)),e}function ow(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function T2(e,{top:t,left:n,bottom:r,right:o}){return{x:ow(e.x,n,o),y:ow(e.y,t,r)}}function iw(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function E2(e,t){return{x:iw(e.x,t.x),y:iw(e.y,t.y)}}function k2(e,t){let n=.5;const r=en(e),o=en(t);return o>r?n=Ko(t.min,t.max-r,e.min):r>o&&(n=Ko(e.min,e.max-o,t.min)),Kn(0,1,n)}function C2(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const $f=.35;function I2(e=$f){return e===!1?e=0:e===!0&&(e=$f),{x:aw(e,"left","right"),y:aw(e,"top","bottom")}}function aw(e,t,n){return{min:sw(e,t),max:sw(e,n)}}function sw(e,t){return typeof e=="number"?e:e[t]||0}const A2=new WeakMap;class P2{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Lt(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:n=!1,distanceThreshold:r}={}){const{presenceContext:o}=this.visualElement;if(o&&o.isPresent===!1)return;const i=d=>{n?(this.stopAnimation(),this.snapToCursor(ba(d).point)):this.pauseAnimation()},a=(d,f)=>{this.stopAnimation();const{drag:p,dragPropagation:v,onDragStart:h}=this.getProps();if(p&&!v&&(this.openDragLock&&this.openDragLock(),this.openDragLock=fD(p),!this.openDragLock))return;this.latestPointerEvent=d,this.latestPanInfo=f,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),bn(y=>{let x=this.getAxisMotionValue(y).get()||0;if(Zn.test(x)){const{projection:b}=this.visualElement;if(b&&b.layout){const E=b.layout.layoutBox[y];E&&(x=en(E)*(parseFloat(x)/100))}}this.originPoint[y]=x}),h&&gt.postRender(()=>h(d,f)),cf(this.visualElement,"transform");const{animationState:m}=this.visualElement;m&&m.setActive("whileDrag",!0)},s=(d,f)=>{this.latestPointerEvent=d,this.latestPanInfo=f;const{dragPropagation:p,dragDirectionLock:v,onDirectionLock:h,onDrag:m}=this.getProps();if(!p&&!this.openDragLock)return;const{offset:y}=f;if(v&&this.currentDirection===null){this.currentDirection=O2(y),this.currentDirection!==null&&h&&h(this.currentDirection);return}this.updateAxis("x",f.point,y),this.updateAxis("y",f.point,y),this.visualElement.render(),m&&m(d,f)},l=(d,f)=>{this.latestPointerEvent=d,this.latestPanInfo=f,this.stop(d,f),this.latestPointerEvent=null,this.latestPanInfo=null},c=()=>bn(d=>this.getAnimationState(d)==="paused"&&this.getAxisMotionValue(d).animation?.play()),{dragSnapToOrigin:u}=this.getProps();this.panSession=new tw(t,{onSessionStart:i,onStart:a,onMove:s,onSessionEnd:l,resumeAnimation:c},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u,distanceThreshold:r,contextWindow:Q0(this.visualElement),element:this.visualElement.current})}stop(t,n){const r=t||this.latestPointerEvent,o=n||this.latestPanInfo,i=this.isDragging;if(this.cancel(),!i||!o||!r)return;const{velocity:a}=o;this.startAnimation(a);const{onDragEnd:s}=this.getProps();s&&gt.postRender(()=>s(r,o))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.endPanSession();const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(t,n,r){const{drag:o}=this.getProps();if(!r||!Cl(t,o,this.currentDirection))return;const i=this.getAxisMotionValue(t);let a=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(a=S2(a,this.constraints[t],this.elastic[t])),i.set(a)}resolveConstraints(){const{dragConstraints:t,dragElastic:n}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,o=this.constraints;t&&ya(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=T2(r.layoutBox,t):this.constraints=!1,this.elastic=I2(n),o!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&bn(i=>{this.constraints!==!1&&this.getAxisMotionValue(i)&&(this.constraints[i]=C2(r.layoutBox[i],this.constraints[i]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!ya(t))return!1;const r=t.current;dn(r!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.","drag-constraints-ref");const{projection:o}=this.visualElement;if(!o||!o.layout)return!1;const i=PD(r,o.root,this.visualElement.getTransformPagePoint());let a=E2(o.layout.layoutBox,i);if(n){const s=n(CD(a));this.hasMutatedConstraints=!!s,s&&(a=Dx(s))}return a}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:o,dragTransition:i,dragSnapToOrigin:a,onDragTransitionEnd:s}=this.getProps(),l=this.constraints||{},c=bn(u=>{if(!Cl(u,n,this.currentDirection))return;let d=l&&l[u]||{};a&&(d={min:0,max:0});const f=o?200:1e6,p=o?40:1e7,v={type:"inertia",velocity:r?t[u]:0,bounceStiffness:f,bounceDamping:p,timeConstant:750,restDelta:1,restSpeed:10,...i,...d};return this.startAxisValueAnimation(u,v)});return Promise.all(c).then(s)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return cf(this.visualElement,t),r.start(af(t,r,0,n,this.visualElement,!1))}stopAnimation(){bn(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){bn(t=>this.getAxisMotionValue(t).animation?.pause())}getAnimationState(t){return this.getAxisMotionValue(t).animation?.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,r=this.visualElement.getProps(),o=r[n];return o||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){bn(n=>{const{drag:r}=this.getProps();if(!Cl(n,r,this.currentDirection))return;const{projection:o}=this.visualElement,i=this.getAxisMotionValue(n);if(o&&o.layout){const{min:a,max:s}=o.layout.layoutBox[n],l=i.get()||0;i.set(t[n]-yt(a,s,.5)+l)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!ya(n)||!r||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};bn(a=>{const s=this.getAxisMotionValue(a);if(s&&this.constraints!==!1){const l=s.get();o[a]=k2({min:l,max:l},this.constraints[a])}});const{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),bn(a=>{if(!Cl(a,t,null))return;const s=this.getAxisMotionValue(a),{min:l,max:c}=this.constraints[a];s.set(yt(l,c,o[a]))})}addListeners(){if(!this.visualElement.current)return;A2.set(this.visualElement,this);const t=this.visualElement.current,n=xa(t,"pointerdown",l=>{const{drag:c,dragListener:u=!0}=this.getProps(),d=l.target,f=d!==t&&wx(d);c&&u&&!f&&this.start(l)}),r=()=>{const{dragConstraints:l}=this.getProps();ya(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:o}=this.visualElement,i=o.addEventListener("measure",r);o&&!o.layout&&(o.root&&o.root.updateScroll(),o.updateLayout()),gt.read(r);const a=va(window,"resize",()=>this.scalePositionWithinConstraints()),s=o.addEventListener("didUpdate",(({delta:l,hasLayoutChanged:c})=>{this.isDragging&&c&&(bn(u=>{const d=this.getAxisMotionValue(u);d&&(this.originPoint[u]+=l[u].translate,d.set(d.get()+l[u].translate))}),this.visualElement.render())}));return()=>{a(),n(),i(),s&&s()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:o=!1,dragConstraints:i=!1,dragElastic:a=$f,dragMomentum:s=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:o,dragConstraints:i,dragElastic:a,dragMomentum:s}}}function Cl(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function O2(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class _2 extends Dr{constructor(t){super(t),this.removeGroupControls=vn,this.removeListeners=vn,this.controls=new P2(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||vn}update(){const{dragControls:t}=this.node.getProps(),{dragControls:n}=this.node.prevProps||{};t!==n&&(this.removeGroupControls(),t&&(this.removeGroupControls=t.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.endPanSession()}}const lw=e=>(t,n)=>{e&&gt.postRender(()=>e(t,n))};class M2 extends Dr{constructor(){super(...arguments),this.removePointerDownListener=vn}onPointerDown(t){this.session=new tw(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Q0(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:o}=this.node.getProps();return{onSessionStart:lw(t),onStart:lw(n),onMove:r,onEnd:(i,a)=>{delete this.session,o&&gt.postRender(()=>o(i,a))}}}mount(){this.removePointerDownListener=xa(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}let zf=!1;class D2 extends S.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:o}=this.props,{projection:i}=t;i&&(n.group&&n.group.add(i),r&&r.register&&o&&r.register(i),zf&&i.root.didUpdate(),i.addEventListener("animationComplete",()=>{this.safeToRemove()}),i.setOptions({...i.options,onExitComplete:()=>this.safeToRemove()})),Sl.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:o,isPresent:i}=this.props,{projection:a}=r;return a&&(a.isPresent=i,zf=!0,o||t.layoutDependency!==n||n===void 0||t.isPresent!==i?a.willUpdate():this.safeToRemove(),t.isPresent!==i&&(i?a.promote():a.relegate()||gt.postRender(()=>{const s=a.getStack();(!s||!s.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),gf.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:o}=t;zf=!0,o&&(o.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(o),r&&r.deregister&&r.deregister(o))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function cw(e){const[t,n]=V0(),r=S.useContext(na);return g.jsx(D2,{...e,layoutGroup:r,switchLayoutGroup:S.useContext(Z0),isPresent:t,safeToRemove:n})}const N2={pan:{Feature:M2},drag:{Feature:_2,ProjectionNode:F0,MeasureLayout:cw}};function uw(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",n==="Start");const o="onHover"+n,i=r[o];i&&gt.postRender(()=>i(t,ba(t)))}class F2 extends Dr{mount(){const{current:t}=this.node;t&&(this.unmount=pD(t,(n,r)=>(uw(this.node,r,"Start"),o=>uw(this.node,o,"End"))))}unmount(){}}class L2 extends Dr{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=oa(va(this.node.current,"focus",()=>this.onFocus()),va(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function dw(e,t,n){const{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap",n==="Start");const o="onTap"+(n==="End"?"":n),i=r[o];i&&gt.postRender(()=>i(t,ba(t)))}class V2 extends Dr{mount(){const{current:t}=this.node;t&&(this.unmount=gD(t,(n,r)=>(dw(this.node,r,"Start"),(o,{success:i})=>dw(this.node,o,i?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const jf=new WeakMap,Rf=new WeakMap,$2=e=>{const t=jf.get(e.target);t&&t(e)},z2=e=>{e.forEach($2)};function j2({root:e,...t}){const n=e||document;Rf.has(n)||Rf.set(n,{});const r=Rf.get(n),o=JSON.stringify(t);return r[o]||(r[o]=new IntersectionObserver(z2,{root:e,...t})),r[o]}function R2(e,t,n){const r=j2(t);return jf.set(e,n),r.observe(e),()=>{jf.delete(e),r.unobserve(e)}}const B2={some:0,all:1};class H2 extends Dr{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:o="some",once:i}=t,a={root:n?n.current:void 0,rootMargin:r,threshold:typeof o=="number"?o:B2[o]},s=l=>{const{isIntersecting:c}=l;if(this.isInView===c||(this.isInView=c,i&&!c&&this.hasEnteredView))return;c&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",c);const{onViewportEnter:u,onViewportLeave:d}=this.node.getProps(),f=c?u:d;f&&f(l)};return R2(this.node.current,a,s)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(W2(t,n))&&this.startObserver()}unmount(){}}function W2({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const q2={...v2,...{inView:{Feature:H2},tap:{Feature:V2},focus:{Feature:L2},hover:{Feature:F2}},...N2,...{layout:{ProjectionNode:F0,MeasureLayout:cw}}},Be=f2(q2,p2);function U2(e){return S.useEffect(()=>()=>e(),[])}function ho(e){const t=On(()=>uo(e)),{isStatic:n}=S.useContext(ii);if(n){const[,r]=S.useState(e);S.useEffect(()=>t.on("change",r),[])}return t}function fw(e,t){const n=ho(t()),r=()=>n.set(t());return r(),ll(()=>{const o=()=>gt.preRender(r,!1,!0),i=e.map(a=>a.on("change",o));return()=>{i.forEach(a=>a()),hr(r)}}),n}function G2(e){fa.current=[],e();const t=fw(fa.current,e);return fa.current=void 0,t}function Y2(e,t,n,r){if(typeof e=="function")return G2(e);const i=typeof t=="function"?t:bD(t,n,r);return Array.isArray(e)?pw(e,i):pw([e],([a])=>i(a))}function pw(e,t){const n=On(()=>[]);return fw(e,()=>{n.length=0;const r=e.length;for(let o=0;o<r;o++)n[o]=e[o].get();return t(n)})}function Bf(e){return typeof e=="object"&&!Array.isArray(e)}function hw(e,t,n,r){return e==null?[]:typeof e=="string"&&Bf(t)?mx(e,n,r):e instanceof NodeList?Array.from(e):Array.isArray(e)?e.filter(o=>o!=null):[e]}function K2(e,t,n){return e*(t+1)}function mw(e,t,n,r){return typeof t=="number"?t:t.startsWith("-")||t.startsWith("+")?Math.max(0,e+parseFloat(t)):t==="<"?n:t.startsWith("<")?Math.max(0,n+parseFloat(t.slice(1))):r.get(t)??e}function Z2(e,t,n){for(let r=0;r<e.length;r++){const o=e[r];o.at>t&&o.at<n&&(ra(e,o),r--)}}function X2(e,t,n,r,o,i){Z2(e,o,i);for(let a=0;a<t.length;a++)e.push({value:t[a],at:yt(o,i,r[a]),easing:yb(n,a)})}function Q2(e,t){for(let n=0;n<e.length;n++)e[n]=e[n]/(t+1)}function J2(e,t){return e.at===t.at?e.value===null?1:t.value===null?-1:0:e.at-t.at}const eF="easeInOut",tF=20;function nF(e,{defaultTransition:t={},...n}={},r,o){const i=t.duration||.3,a=new Map,s=new Map,l={},c=new Map;let u=0,d=0,f=0;for(let p=0;p<e.length;p++){const v=e[p];if(typeof v=="string"){c.set(v,d);continue}else if(!Array.isArray(v)){c.set(v.name,mw(d,v.at,u,c));continue}let[h,m,y={}]=v;y.at!==void 0&&(d=mw(d,y.at,u,c));let x=0;const b=(E,T,I,w=0,k=0)=>{const P=rF(E),{delay:_=0,times:F=Bb(P),type:V=t.type||"keyframes",repeat:D,repeatType:O,repeatDelay:N=0,...z}=T;let{ease:M=t.ease||"easeOut",duration:C}=T;const L=typeof _=="function"?_(w,k):_,$=P.length,B=tf(V)?V:o?.[V||"keyframes"];if($<=2&&B){let J=100;if($===2&&aF(P)){const Y=P[1]-P[0];J=Math.abs(Y)}const re={...t,...z};C!==void 0&&(re.duration=_n(C));const ee=Vb(re,J,B);M=ee.ease,C=ee.duration}C??(C=i);const q=d+L;F.length===1&&F[0]===0&&(F[1]=1);const G=F.length-P.length;if(G>0&&Rb(F,G),P.length===1&&P.unshift(null),D){dn(D<tF,"Repeat count too high, must be less than 20","repeat-count-high"),C=K2(C,D);const J=[...P],re=[...F];M=Array.isArray(M)?[...M]:[M];const ee=[...M];for(let Y=0;Y<D;Y++){P.push(...J);for(let K=0;K<J.length;K++)F.push(re[K]+(Y+1)),M.push(K===0?"linear":yb(ee,K-1))}Q2(F,D)}const W=q+C;X2(I,P,M,F,q,W),x=Math.max(L+C,x),f=Math.max(W,f)};if(jt(h)){const E=gw(h,s);b(m,y,vw("default",E))}else{const E=hw(h,m,r,l),T=E.length;for(let I=0;I<T;I++){m=m,y=y;const w=E[I],k=gw(w,s);for(const P in m)b(m[P],oF(y,P),vw(P,k),I,T)}}u=d,d+=x}return s.forEach((p,v)=>{for(const h in p){const m=p[h];m.sort(J2);const y=[],x=[],b=[];for(let w=0;w<m.length;w++){const{at:k,value:P,easing:_}=m[w];y.push(P),x.push(Ko(0,f,k)),b.push(_||"easeOut")}x[0]!==0&&(x.unshift(0),y.unshift(y[0]),b.unshift(eF)),x[x.length-1]!==1&&(x.push(1),y.push(null)),a.has(v)||a.set(v,{keyframes:{},transition:{}});const E=a.get(v);E.keyframes[h]=y;const{type:T,...I}=t;E.transition[h]={...I,duration:f,ease:b,times:x,...n}}}),a}function gw(e,t){return!t.has(e)&&t.set(e,{}),t.get(e)}function vw(e,t){return t[e]||(t[e]=[]),t[e]}function rF(e){return Array.isArray(e)?e:[e]}function oF(e,t){return e&&e[t]?{...e,...e[t]}:{...e}}const iF=e=>typeof e=="number",aF=e=>e.every(iF);function sF(e){const t={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},n=bf(e)&&!Ex(e)?new Zx(t):new qx(t);n.mount(e),pa.set(e,n)}function lF(e){const t={presenceContext:null,props:{},visualState:{renderState:{output:{}},latestValues:{}}},n=new LD(t);n.mount(e),pa.set(e,n)}function cF(e,t){return jt(e)||typeof e=="number"||typeof e=="string"&&!Bf(t)}function yw(e,t,n,r){const o=[];if(cF(e,t))o.push(S0(e,Bf(t)&&t.default||t,n&&(n.default||n)));else{if(e==null)return o;const i=hw(e,t,r),a=i.length;dn(!!a,"No valid elements provided.","no-valid-elements");for(let s=0;s<a;s++){const l=i[s],c=l instanceof Element?sF:lF;pa.has(l)||c(l);const u=pa.get(l),d={...n};"delay"in d&&typeof d.delay=="function"&&(d.delay=d.delay(s,a)),o.push(...df(u,{...t,transition:d},{}))}}return o}function uF(e,t,n){const r=[];return nF(e,t,n,{spring:ua}).forEach(({keyframes:i,transition:a},s)=>{r.push(...yw(s,i,a))}),r}function dF(e){return Array.isArray(e)&&e.some(Array.isArray)}function bw(e){function t(n,r,o){let i=[],a;if(dF(n))i=uF(n,r,e);else{const{onComplete:l,...c}=o||{};typeof l=="function"&&(a=l),i=yw(n,r,c,e)}const s=new LM(i);return a&&s.finished.then(a),e&&(e.animations.push(s),s.finished.then(()=>{ra(e.animations,s)})),s}return t}const xw=bw();function fF(){const e=On(()=>({current:null,animations:[]})),t=On(()=>bw(e));return U2(()=>{e.animations.forEach(n=>n.stop()),e.animations.length=0}),[e,t]}class pF{constructor(){this.componentControls=new Set}subscribe(t){return this.componentControls.add(t),()=>this.componentControls.delete(t)}start(t,n){this.componentControls.forEach(r=>{r.start(t.nativeEvent||t,n)})}cancel(){this.componentControls.forEach(t=>{t.cancel()})}stop(){this.componentControls.forEach(t=>{t.stop()})}}const hF=()=>new pF;function mF(){return On(hF)}const ww=S.createContext(null);function gF(e,t,n,r){if(!r)return e;const o=e.findIndex(u=>u.value===t);if(o===-1)return e;const i=r>0?1:-1,a=e[o+i];if(!a)return e;const s=e[o],l=a.layout,c=yt(l.min,l.max,.5);return i===1&&s.layout.max+n>c||i===-1&&s.layout.min+n<c?p_(e,o,o+i):e}function vF({children:e,as:t="ul",axis:n="y",onReorder:r,values:o,...i},a){const s=On(()=>Be[t]),l=[],c=S.useRef(!1),u=S.useRef(null);dn(!!o,"Reorder.Group must be provided a values prop","reorder-values");const d={axis:n,groupRef:u,registerItem:(v,h)=>{const m=l.findIndex(y=>v===y.value);m!==-1?l[m].layout=h[n]:l.push({value:v,layout:h[n]}),l.sort(bF)},updateOrder:(v,h,m)=>{if(c.current)return;const y=gF(l,v,h,m);l!==y&&(c.current=!0,r(y.map(yF).filter(x=>o.indexOf(x)!==-1)))}};S.useEffect(()=>{c.current=!1});const f=v=>{u.current=v,typeof a=="function"?a(v):a&&(a.current=v)},p={overflowAnchor:"none",...i.style};return g.jsx(s,{...i,style:p,ref:f,ignoreStrict:!0,children:g.jsx(ww.Provider,{value:d,children:e})})}const Sw=S.forwardRef(vF);function yF(e){return e.value}function bF(e,t){return e.layout.min-t.layout.min}const Il=50,Tw=25,xF=new Set(["auto","scroll"]),wa=new WeakMap,Sa=new WeakMap;let Ta=null;function wF(){if(Ta){const e=Hf(Ta,"y");e&&(Sa.delete(e),wa.delete(e));const t=Hf(Ta,"x");t&&t!==e&&(Sa.delete(t),wa.delete(t)),Ta=null}}function SF(e,t){const n=getComputedStyle(e),r=t==="x"?n.overflowX:n.overflowY;return xF.has(r)}function Hf(e,t){let n=e?.parentElement;for(;n;){if(SF(n,t))return n;n=n.parentElement}return null}function TF(e,t,n){const r=t.getBoundingClientRect(),o=n==="x"?r.left:r.top,i=n==="x"?r.right:r.bottom,a=e-o,s=i-e;if(a<Il){const l=1-a/Il;return{amount:-Tw*l*l,edge:"start"}}else if(s<Il){const l=1-s/Il;return{amount:Tw*l*l,edge:"end"}}return{amount:0,edge:null}}function EF(e,t,n,r){if(!e)return;Ta=e;const o=Hf(e,n);if(!o)return;const i=t-(n==="x"?window.scrollX:window.scrollY),{amount:a,edge:s}=TF(i,o,n);if(s===null){Sa.delete(o),wa.delete(o);return}if(Sa.get(o)!==s){if(!(s==="start"&&r<0||s==="end"&&r>0))return;Sa.set(o,s);const u=n==="x"?o.scrollWidth-o.clientWidth:o.scrollHeight-o.clientHeight;wa.set(o,u)}if(a>0){const c=wa.get(o);if((n==="x"?o.scrollLeft:o.scrollTop)>=c)return}n==="x"?o.scrollLeft+=a:o.scrollTop+=a}function Ew(e,t=0){return jt(e)?e:ho(t)}function kF({children:e,style:t={},value:n,as:r="li",onDrag:o,onDragEnd:i,layout:a=!0,...s},l){const c=On(()=>Be[r]),u=S.useContext(ww),d={x:Ew(t.x),y:Ew(t.y)},f=Y2([d.x,d.y],([y,x])=>y||x?1:"unset");dn(!!u,"Reorder.Item must be a child of Reorder.Group","reorder-item-child");const{axis:p,registerItem:v,updateOrder:h,groupRef:m}=u;return g.jsx(c,{drag:p,...s,dragSnapToOrigin:!0,style:{...t,x:d.x,y:d.y,zIndex:f},layout:a,onDrag:(y,x)=>{const{velocity:b,point:E}=x,T=d[p].get();h(n,T,b[p]),EF(m.current,E[p],p,b[p]),o&&o(y,x)},onDragEnd:(y,x)=>{wF(),i&&i(y,x)},onLayoutMeasure:y=>{v(n,y)},ref:l,ignoreStrict:!0,children:e})}const kw=S.forwardRef(kF);var Al={exports:{}},Wf={},Pl={exports:{}},qf={};var Cw;function CF(){if(Cw)return qf;Cw=1;var e=S;function t(d,f){return d===f&&(d!==0||1/d===1/f)||d!==d&&f!==f}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,o=e.useEffect,i=e.useLayoutEffect,a=e.useDebugValue;function s(d,f){var p=f(),v=r({inst:{value:p,getSnapshot:f}}),h=v[0].inst,m=v[1];return i(function(){h.value=p,h.getSnapshot=f,l(h)&&m({inst:h})},[d,p,f]),o(function(){return l(h)&&m({inst:h}),d(function(){l(h)&&m({inst:h})})},[d]),a(p),p}function l(d){var f=d.getSnapshot;d=d.value;try{var p=f();return!n(d,p)}catch{return!0}}function c(d,f){return f()}var u=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?c:s;return qf.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:u,qf}var Uf={};var Iw;function IF(){return Iw||(Iw=1,process.env.NODE_ENV!=="production"&&(function(){function e(p,v){return p===v&&(p!==0||1/p===1/v)||p!==p&&v!==v}function t(p,v){u||o.startTransition===void 0||(u=!0,console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var h=v();if(!d){var m=v();i(h,m)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),d=!0)}m=a({inst:{value:h,getSnapshot:v}});var y=m[0].inst,x=m[1];return l(function(){y.value=h,y.getSnapshot=v,n(y)&&x({inst:y})},[p,h,v]),s(function(){return n(y)&&x({inst:y}),p(function(){n(y)&&x({inst:y})})},[p]),c(h),h}function n(p){var v=p.getSnapshot;p=p.value;try{var h=v();return!i(p,h)}catch{return!0}}function r(p,v){return v()}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var o=S,i=typeof Object.is=="function"?Object.is:e,a=o.useState,s=o.useEffect,l=o.useLayoutEffect,c=o.useDebugValue,u=!1,d=!1,f=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?r:t;Uf.useSyncExternalStore=o.useSyncExternalStore!==void 0?o.useSyncExternalStore:f,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()),Uf}var Aw;function Pw(){return Aw||(Aw=1,process.env.NODE_ENV==="production"?Pl.exports=CF():Pl.exports=IF()),Pl.exports}var Ow;function AF(){if(Ow)return Wf;Ow=1;var e=S,t=Pw();function n(c,u){return c===u&&(c!==0||1/c===1/u)||c!==c&&u!==u}var r=typeof Object.is=="function"?Object.is:n,o=t.useSyncExternalStore,i=e.useRef,a=e.useEffect,s=e.useMemo,l=e.useDebugValue;return Wf.useSyncExternalStoreWithSelector=function(c,u,d,f,p){var v=i(null);if(v.current===null){var h={hasValue:!1,value:null};v.current=h}else h=v.current;v=s(function(){function y(I){if(!x){if(x=!0,b=I,I=f(I),p!==void 0&&h.hasValue){var w=h.value;if(p(w,I))return E=w}return E=I}if(w=E,r(b,I))return w;var k=f(I);return p!==void 0&&p(w,k)?(b=I,w):(b=I,E=k)}var x=!1,b,E,T=d===void 0?null:d;return[function(){return y(u())},T===null?void 0:function(){return y(T())}]},[u,d,f,p]);var m=o(c,v[0],v[1]);return a(function(){h.hasValue=!0,h.value=m},[m]),l(m),m},Wf}var Gf={};var _w;function PF(){return _w||(_w=1,process.env.NODE_ENV!=="production"&&(function(){function e(c,u){return c===u&&(c!==0||1/c===1/u)||c!==c&&u!==u}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var t=S,n=Pw(),r=typeof Object.is=="function"?Object.is:e,o=n.useSyncExternalStore,i=t.useRef,a=t.useEffect,s=t.useMemo,l=t.useDebugValue;Gf.useSyncExternalStoreWithSelector=function(c,u,d,f,p){var v=i(null);if(v.current===null){var h={hasValue:!1,value:null};v.current=h}else h=v.current;v=s(function(){function y(I){if(!x){if(x=!0,b=I,I=f(I),p!==void 0&&h.hasValue){var w=h.value;if(p(w,I))return E=w}return E=I}if(w=E,r(b,I))return w;var k=f(I);return p!==void 0&&p(w,k)?(b=I,w):(b=I,E=k)}var x=!1,b,E,T=d===void 0?null:d;return[function(){return y(u())},T===null?void 0:function(){return y(T())}]},[u,d,f,p]);var m=o(c,v[0],v[1]);return a(function(){h.hasValue=!0,h.value=m},[m]),l(m),m},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()),Gf}var Mw;function OF(){return Mw||(Mw=1,process.env.NODE_ENV==="production"?Al.exports=AF():Al.exports=PF()),Al.exports}OF();var ai=function(){return ai=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},ai.apply(this,arguments)};function Ea(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),o,i=[],a;try{for(;(t===void 0||t-- >0)&&!(o=r.next()).done;)i.push(o.value)}catch(s){a={error:s}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return i}function Dw(e,t,n){if(arguments.length===2)for(var r=0,o=t.length,i;r<o;r++)(i||!(r in t))&&(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))}typeof SuppressedError=="function"&&SuppressedError;var si=function(e){var t=S.useRef(e??{});return S.useEffect(function(){t.current=e},[e]),t},_F=function(e){var t=S.useRef(void 0);return S.useEffect(function(){t.current=e},[e]),t.current},MF=function(e){return Object.entries(e)},Nw=function(e){return e instanceof Promise},Fw=function(e,t,n,r){return t===e?n.reduce(function(o,i){return i(o,t,r)},e):e.constructor.name===Object.name?n.reduce(function(o,i){return i(o,t,r)},ai(ai({},t),e)):n.reduce(function(o,i){return i(o,t,r)},e)},DF=function(e,t,n,r,o,i){return function(){for(var a=[],s=0;s<arguments.length;s++)a[s]=arguments[s];var l=performance.now(),c=t.apply(void 0,Dw([],Ea(a),!1)),u=function(d,f){return n(function(p){return Fw(d,p,i,f)})};return Nw(c)?c.then(function(d){o.current={method:e,props:r(),time:performance.now()-l},u(d,o.current)}):(o.current={method:e,props:r(),time:performance.now()-l},void u(c,o.current))}},NF=function(e,t,n,r,o,i){return function(){for(var a=[],s=0;s<arguments.length;s++)a[s]=arguments[s];o.current={method:e,time:0,props:r()};var l=t.apply(void 0,Dw([],Ea(a),!1)),c=function(u){return n(function(d){return Fw(u,d,i,o.current)})};return Nw(l)?l.then(function(u){return c(u)}):c(l)}},Yf=function(e,t,n){var r,o,i,a=Ea(S.useState(function(){return e}),2),s=a[0],l=a[1],c=si(s),u=si((r=n?.props)!==null&&r!==void 0?r:{}),d=si(t),f=si((o=n?.postMiddleware)!==null&&o!==void 0?o:[]),p=si((i=n?.interceptor)!==null&&i!==void 0?i:[]),v=S.useRef(e),h=_F(s),m=si(h),y=S.useRef(null);S.useEffect(function(){if(y.current!==null){var E=y.current;f.current.forEach(function(T){T(s,h,E)})}},[s,f,h]);var x=Ea(S.useState(function(){var E=function(){return u.current},T=d.current({props:E,state:function(){return c.current},initialState:v.current,previousState:function(){return m.current}});return MF(T).reduce(function(I,w){var k,P=Ea(w,2),_=P[0],F=P[1];return ai(ai({},I),(k={},k[_]=n?.debug?DF(_,F,l,E,y,p.current):NF(_,F,l,E,y,p.current),k))},{})}),1),b=x[0];return[s,b,u.current]},FF=Object.defineProperty,Lw=Object.getOwnPropertySymbols,LF=Object.prototype.hasOwnProperty,VF=Object.prototype.propertyIsEnumerable,Vw=(e,t,n)=>t in e?FF(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,$F=(e,t)=>{for(var n in t||(t={}))LF.call(t,n)&&Vw(e,n,t[n]);if(Lw)for(var n of Lw(t))VF.call(t,n)&&Vw(e,n,t[n]);return e},Kf=(e,t)=>{const n=e.length;for(let r=0;r<n;r++)if(t(e[r],r,e))return!0;return!1},zF=(e,t,n,r)=>_l(Kf,e,t,n,r),li=e=>typeof e=="object",Nr=(e,t)=>{if(e===t)return!0;if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();if(!e||!t||!li(e)&&!li(t))return e===t;if(e.prototype!==t.prototype)return!1;const n=Object.keys(e);return n.length!==Object.keys(t).length?!1:n.every(r=>Nr(e[r],t[r]))},jF=(e,t)=>(li(e)||Array.isArray(e))&&t?e[t]:e,RF=e=>(t,n)=>t[e]===n[e]?0:t[e]>n[e]?1:-1,Ol=e=>/[0-9.]+/.test(e),$w=e=>["string","number"].includes(typeof e),zw=e=>e==null||e?.length===0||e==="",jw={eq:Nr,is:Object.is,"!=":(e,t)=>e!=t,"!==":(e,t)=>e!==t,"<":(e,t)=>e<t,"<=":(e,t)=>e<=t,"==":(e,t)=>e==t,"===":(e,t)=>e===t,">":(e,t)=>e>t,">=":(e,t)=>e>=t,includes:(e,t)=>`${e}`.includes(t),notIncludes:(e,t)=>!`${e}`.includes(t),startsWith:(e,t)=>`${e}`.startsWith(t),endsWith:(e,t)=>`${e}`.endsWith(t),like:(e,t)=>new RegExp(`.*${t}.*`,"gi").test(`${e}`),alphabetical:(e,t)=>e.toString().localeCompare(t.toString()),empty:zw,notEmpty:e=>!zw(e),in:(e,t)=>Kf(t,n=>Nr(e,n)),notIn:(e,t)=>Rw(t,n=>!Nr(e,n))},BF=e=>{if(e in jw)return jw[e];throw new Error("Linq - Symbol not found")},ci=(e,t)=>{const n=[],r=e.length;for(let o=0;o<r;o++)t(e[o],o,e)&&n.push(e[o]);return n},_l=(e,t,n,r,o)=>{if(typeof n=="function")return e(t,n);const i=BF(r);return n&&r&&o!==void 0?e(t,a=>i(a[n],o)):e(t,a=>i(a,o))},HF=(e,t,n,r)=>_l(ci,e,t,n,r),Rw=(e,t)=>{for(let n=0;n<e.length;n++)if(!t(e[n],n,e))return!1;return!0},WF=(e,t,n,r)=>_l(Rw,e,t,n,r),Bw=e=>{if(e===null)return null;const t=$F({},e);return Object.keys(t).forEach(n=>t[n]=li(e[n])?Bw(e[n]):e[n]),Array.isArray(e)&&e.length?(t.length=e.length)&&Array.from(t):Array.isArray(e)?Array.from(e):t},Hw=(e,t)=>{if(li(t)){for(let n=0;n<e.length;n++){const r=e[n];if(Nr(t,r))return!0}return!1}for(let n=0;n<e.length;n++){const r=e[n];if(Nr(t,r))return!0}return!1},qF=(e,t)=>{const n=new Map(e.map(r=>[r[t],r]));return Object.fromEntries(n.entries())},UF=e=>ci(e,(t,n,r)=>li(t)?n===r.findIndex(o=>Nr(o,t)):n===r.indexOf(t)),GF=(e,t)=>{const n=e.length;for(let r=0;r<n;r++)if(t(e[r],r,e))return e[r]},Ww=(e,t)=>{const n=new Map;return e.forEach(r=>{const o=t(r),i=n.get(o)||[];i.push(r),n.set(o,i)}),Object.fromEntries(n.entries())},YF=(e,t)=>Ww(e,n=>n[t]),qw=(e,t)=>{const n=[];let r=0;const o=e.length;for(r;r<o;r++){const i=t(e[r],r,e);n.push(i)}return n},KF=(e,t)=>{let n=Number.parseInt(e,10),r=Number.parseInt(t,10);return n>r?[r,n]:[n,r]},ZF=(e,t,n=1)=>{const r=[];let o=e.charCodeAt(0);const i=t.charCodeAt(0);for(;o<=i;o+=n)r.push(String.fromCharCode(o));return Ol(e)&&Ol(t)?r.map(a=>Number.parseInt(a)):r},Zf=(e,t,n=1)=>{let r=Math.abs(n);if((e.length>1||t.length>1)&&Ol(e)&&Ol(t)){const o=[],[i,a]=KF(e,t);for(let s=i;s<=a;s+=r)o.push(s);return o}return ZF(e,t,r)},XF=(e,t,n=1)=>{if(t===void 0){const[r,o,i]=e.split("..");return i===void 0?Zf(r,o,1):Zf(r,i,Number.parseInt(o,10))}return $w(e)&&$w(t)?Zf(`${e}`,`${t}`,n):Array.from({length:e},(r,o)=>o*Math.abs(t))},Xf=(e,t,n)=>{let r=t;const o=n.length;for(let i=0;i<o;i++){const a=n[i];r=e(r,a,i,n)}return r},Uw=e=>{const t=Array.from(e.values());let n=null,r=null,o=t.length;for(n=0;n<o/2;n+=1){r=o-1-n;let i=t[n];t[n]=t[r],t[r]=i}return t},QF=(e,t)=>{if(typeof t=="number")return e.slice(t);let n=e.length;for(let r=0;r<n;r++){const o=e[r];if(t(o,r,e))return e.slice(r)}return e.slice(0)},JF=(e,t,n,r)=>_l(QF,e,t,n,r),Gw=(e,t)=>{const n=[...e];return t===void 0?n.sort():typeof t=="function"?n.toSorted(t):n.toSorted(RF(t))},Yw=(e=>(e.Asc="asc",e.Desc="desc",e))(Yw||{}),eL=e=>(t,n)=>e.reduce((r,o)=>{const i=o.type==="desc"?-1:1,a=o.key,s=t[a]>n[a]?i:t[a]<n[a]?-i:0;return r!==0?r:s},0),tL=(e,t)=>e.sort(eL(t)),nL=(e,t)=>{if(t===void 0)return[...new Set(e).values()];const n=new Set;return Array.isArray(t)?[...new Set(t)]:ci(e,r=>{const o=t?n.has(r[t]):n.has(t);return t&&(o||n.add(r[t])),!o})},rL=class Rh{constructor(t=[]){this.array=t}static Range(...t){return XF(...t)}static New(t){return new Rh(t)}Where(t,n,r){return this.array=HF(this.array,t,n,r),this}Some(t,n,r){return zF(this.array,t,n,r)}All(t,n,r){return WF(this.array,t,n,r)}Reverse(){return this.array=Uw(this.array),this}Add(t){return this.array=Array.isArray(t)?this.array.concat(t):this.array.concat([t]),this}Prepend(t){return this.array=Array.isArray(t)?t.concat(this.array):[t].concat(this.array),this}Select(t){return t===void 0?this.array:this.array.map(t)}Take(t,n){return n!==void 0?this.array=this.array.slice(t,Math.max(0,n)):this.array=this.array.slice(t),this}Head(){return this.array[0]}Tail(){return this.Skip(1)}Skip(t,n,r){return this.array=JF(this.array,t,n,r),this}Distinct(){return this.array=UF(this.array),this}First(t){return t===void 0?this.array[0]:GF(this.array,t)||null}Last(t){const n=this.array.length;if(t===void 0)return this.array[n-1];for(let r=n;r!==0;r--)if(t(this.array[r],r,this.array))return this.array[r]}Sum(t){return t===void 0?Xf((n,r)=>n+r,0,this.array):Xf((n,r)=>n+jF(r,t),0,this.array)}Average(t){return this.Sum(t)/this.array.length}GroupBy(t){return YF(this.array,t)}GroupWith(t){return Ww(this.array,t)}Except(t){return ci(this.array,n=>!Hw(t,n))}Intersect(t){return ci(this.array,n=>Hw(t,n))}OrderBy(t,n){let r;return r=t?Gw(this.array,t):this.array.toSorted(),this.array=n==="desc"?Uw(r):r,this}Includes(t){return Kf(this.array,n=>Nr(n,t))}In(t){const n=t.length;for(let r=0;r<n;r++){const o=t[r];if(this.Includes(o))return!0}return!1}Reduce(t,n){return Xf(t,n??this.array[0],this.array)}Empty(){return this.array.length===0}ToMap(t){return new Map(qw(this.array,n=>[t,n]))}Zip(t,n){return qw(this.array,(r,o)=>n(r,t[o]))}Count(t){return t===void 0?this.array.length:ci(this.array,t).length}Get(t){return this.array[t]}Clone(){return new Rh(Bw(this.array))}ToObject(t){return qF(this.array,t)}Sort(t){return Array.isArray(t)?tL(this.array,t):Gw(this.array,t)}Unique(t){return nL(this.array,t)}},Kw=rL;const Ml=0,Fr=1,ui=2,Zw=4;function Xw(e){return()=>e}function oL(e){e()}function ka(e,t){return n=>e(t(n))}function Qw(e,t){return()=>e(t)}function iL(e,t){return n=>e(t,n)}function Qf(e){return e!==void 0}function aL(...e){return()=>{e.map(oL)}}function di(){}function Dl(e,t){return t(e),e}function sL(e,t){return t(e)}function bt(...e){return e}function st(e,t){return e(Fr,t)}function ze(e,t){e(Ml,t)}function Jf(e){e(ui)}function Tt(e){return e(Zw)}function Ie(e,t){return st(e,iL(t,Ml))}function Fn(e,t){const n=e(Fr,r=>{n(),t(r)});return n}function Jw(e){let t,n;return r=>o=>{t=o,n&&clearTimeout(n),n=setTimeout(()=>{r(t)},e)}}function e1(e,t){return e===t}function xt(e=e1){let t;return n=>r=>{e(t,r)||(t=r,n(r))}}function Me(e){return t=>n=>{e(n)&&t(n)}}function be(e){return t=>ka(t,e)}function Xn(e){return t=>()=>{t(e)}}function ue(e,...t){const n=lL(...t);return((r,o)=>{switch(r){case ui:Jf(e);return;case Fr:return st(e,n(o))}})}function Qn(e,t){return n=>r=>{n(t=e(t,r))}}function mo(e){return t=>n=>{e>0?e--:t(n)}}function mr(e){let t=null,n;return r=>o=>{t=o,!n&&(n=setTimeout(()=>{n=void 0,r(t)},e))}}function He(...e){const t=new Array(e.length);let n=0,r=null;const o=Math.pow(2,e.length)-1;return e.forEach((i,a)=>{const s=Math.pow(2,a);st(i,l=>{const c=n;n=n|s,t[a]=l,c!==o&&n===o&&r&&(r(),r=null)})}),i=>a=>{const s=()=>{i([a].concat(t))};n===o?s():r=s}}function lL(...e){return t=>e.reduceRight(sL,t)}function cL(e){let t,n;const r=()=>t?.();return function(o,i){switch(o){case Fr:return i?n===i?void 0:(r(),n=i,t=st(e,i),t):(r(),di);case ui:r(),n=null;return}}}function he(e){let t=e;const n=Ke();return((r,o)=>{switch(r){case Ml:t=o;break;case Fr:{o(t);break}case Zw:return t}return n(r,o)})}function Qt(e,t){return Dl(he(t),n=>Ie(e,n))}function Ke(){const e=[];return((t,n)=>{switch(t){case Ml:e.slice().forEach(r=>{r(n)});return;case ui:e.splice(0,e.length);return;case Fr:return e.push(n),()=>{const r=e.indexOf(n);r>-1&&e.splice(r,1)}}})}function fn(e){return Dl(Ke(),t=>Ie(e,t))}function Qe(e,t=[],{singleton:n}={singleton:!0}){return{constructor:e,dependencies:t,id:uL(),singleton:n}}const uL=()=>Symbol();function dL(e){const t=new Map,n=({constructor:r,dependencies:o,id:i,singleton:a})=>{if(a&&t.has(i))return t.get(i);const s=r(o.map(l=>n(l)));return a&&t.set(i,s),s};return n(e)}function Vt(...e){const t=Ke(),n=new Array(e.length);let r=0;const o=Math.pow(2,e.length)-1;return e.forEach((i,a)=>{const s=Math.pow(2,a);st(i,l=>{n[a]=l,r=r|s,r===o&&ze(t,n)})}),function(i,a){switch(i){case ui:{Jf(t);return}case Fr:return r===o&&a(n),st(t,a)}}}function De(e,t=e1){return ue(e,xt(t))}function ep(...e){return function(t,n){switch(t){case ui:return;case Fr:return aL(...e.map(r=>st(r,n)))}}}var sn=(e=>(e[e.DEBUG=0]="DEBUG",e[e.INFO=1]="INFO",e[e.WARN=2]="WARN",e[e.ERROR=3]="ERROR",e))(sn||{});const fL={0:"debug",3:"error",1:"log",2:"warn"},pL=()=>typeof globalThis>"u"?window:globalThis,Lr=Qe(()=>{const e=he(3);return{log:he((t,n,r=1)=>{var o;const i=(o=pL().VIRTUOSO_LOG_LEVEL)!=null?o:Tt(e);r>=i&&console[fL[r]]("%creact-virtuoso: %c%s %o","color: #0253b3; font-weight: bold","color: initial",t,n)}),logLevel:e}},[],{singleton:!0});function Jn(e,t,n){return tp(e,t,n).callbackRef}function tp(e,t,n){const r=S.useRef(null);let o=a=>{};const i=S.useMemo(()=>typeof ResizeObserver<"u"?new ResizeObserver(a=>{const s=()=>{const l=a[0].target;l.offsetParent!==null&&e(l)};n?s():requestAnimationFrame(s)}):null,[e,n]);return o=a=>{a&&t?(i?.observe(a),r.current=a):(r.current&&i?.unobserve(r.current),r.current=null)},{callbackRef:o,ref:r}}function t1(e,t,n,r,o,i,a,s,l){const c=S.useCallback(u=>{const d=hL(u.children,t,s?"offsetWidth":"offsetHeight",o);let f=u.parentElement;for(;!f.dataset.virtuosoScroller;)f=f.parentElement;const p=f.lastElementChild.dataset.viewportType==="window";let v;p&&(v=f.ownerDocument.defaultView);const h=a?s?a.scrollLeft:a.scrollTop:p?s?v.scrollX||v.document.documentElement.scrollLeft:v.scrollY||v.document.documentElement.scrollTop:s?f.scrollLeft:f.scrollTop,m=a?s?a.scrollWidth:a.scrollHeight:p?s?v.document.documentElement.scrollWidth:v.document.documentElement.scrollHeight:s?f.scrollWidth:f.scrollHeight,y=a?s?a.offsetWidth:a.offsetHeight:p?s?v.innerWidth:v.innerHeight:s?f.offsetWidth:f.offsetHeight;r({scrollHeight:m,scrollTop:Math.max(h,0),viewportHeight:y}),i?.(s?n1("column-gap",getComputedStyle(u).columnGap,o):n1("row-gap",getComputedStyle(u).rowGap,o)),d!==null&&e(d)},[e,t,o,i,a,r,s]);return tp(c,n,l)}function hL(e,t,n,r){const o=e.length;if(o===0)return null;const i=[];for(let a=0;a<o;a++){const s=e.item(a);if(s.dataset.index===void 0)continue;const l=parseInt(s.dataset.index),c=parseFloat(s.dataset.knownSize),u=t(s,n);if(u===0&&r("Zero-sized element, this should not happen",{child:s},sn.ERROR),u===c)continue;const d=i[i.length-1];i.length===0||d.size!==u||d.endIndex!==l-1?i.push({endIndex:l,size:u,startIndex:l}):i[i.length-1].endIndex++}return i}function n1(e,t,n){return t!=="normal"&&!(t!=null&&t.endsWith("px"))&&n(`${e} was not resolved to pixel value correctly`,t,sn.WARN),t==="normal"?0:parseInt(t??"0",10)}function np(e,t,n){const r=S.useRef(null),o=S.useCallback(l=>{if(!(l!=null&&l.offsetParent))return;const c=l.getBoundingClientRect(),u=c.width;let d,f;if(t){const p=t.getBoundingClientRect(),v=c.top-p.top;f=p.height-Math.max(0,v),d=v+t.scrollTop}else{const p=a.current.ownerDocument.defaultView;f=p.innerHeight-Math.max(0,c.top),d=c.top+p.scrollY}r.current={offsetTop:d,visibleHeight:f,visibleWidth:u},e(r.current)},[e,t]),{callbackRef:i,ref:a}=tp(o,!0,n),s=S.useCallback(()=>{o(a.current)},[o,a]);return S.useEffect(()=>{var l;if(t){t.addEventListener("scroll",s);const c=new ResizeObserver(()=>{requestAnimationFrame(s)});return c.observe(t),()=>{t.removeEventListener("scroll",s),c.unobserve(t)}}else{const c=(l=a.current)==null?void 0:l.ownerDocument.defaultView;return c?.addEventListener("scroll",s),c?.addEventListener("resize",s),()=>{c?.removeEventListener("scroll",s),c?.removeEventListener("resize",s)}}},[s,t,a]),i}const tn=Qe(()=>{const e=Ke(),t=Ke(),n=he(0),r=Ke(),o=he(0),i=Ke(),a=Ke(),s=he(0),l=he(0),c=he(0),u=he(0),d=Ke(),f=Ke(),p=he(!1),v=he(!1),h=he(!1);return Ie(ue(e,be(({scrollTop:m})=>m)),t),Ie(ue(e,be(({scrollHeight:m})=>m)),a),Ie(t,o),{deviation:n,fixedFooterHeight:c,fixedHeaderHeight:l,footerHeight:u,headerHeight:s,horizontalDirection:v,scrollBy:f,scrollContainerState:e,scrollHeight:a,scrollingInProgress:p,scrollTo:d,scrollTop:t,skipAnimationFrameInResizeObserver:h,smoothScrollTargetReached:r,statefulScrollTop:o,viewportHeight:i}},[],{singleton:!0}),Ca={lvl:0};function r1(e,t){const n=e.length;if(n===0)return[];let{index:r,value:o}=t(e[0]);const i=[];for(let a=1;a<n;a++){const{index:s,value:l}=t(e[a]);i.push({end:s-1,start:r,value:o}),r=s,o=l}return i.push({end:1/0,start:r,value:o}),i}function ft(e){return e===Ca}function Ia(e,t){if(!ft(e))return t===e.k?e.v:t<e.k?Ia(e.l,t):Ia(e.r,t)}function Ln(e,t,n="k"){if(ft(e))return[-1/0,void 0];if(Number(e[n])===t)return[e.k,e.v];if(Number(e[n])<t){const r=Ln(e.r,t,n);return r[0]===-1/0?[e.k,e.v]:r}return Ln(e.l,t,n)}function pn(e,t,n){return ft(e)?a1(t,n,1):t===e.k?Rt(e,{k:t,v:n}):t<e.k?s1(Rt(e,{l:pn(e.l,t,n)})):s1(Rt(e,{r:pn(e.r,t,n)}))}function fi(){return Ca}function pi(e,t,n){if(ft(e))return[];const r=Ln(e,t)[0];return mL(op(e,r,n))}function rp(e,t){if(ft(e))return Ca;const{k:n,l:r,r:o}=e;if(t===n){if(ft(r))return o;if(ft(o))return r;{const[i,a]=i1(r);return Nl(Rt(e,{k:i,l:o1(r),v:a}))}}else return t<n?Nl(Rt(e,{l:rp(r,t)})):Nl(Rt(e,{r:rp(o,t)}))}function go(e){return ft(e)?[]:[...go(e.l),{k:e.k,v:e.v},...go(e.r)]}function op(e,t,n){if(ft(e))return[];const{k:r,l:o,r:i,v:a}=e;let s=[];return r>t&&(s=s.concat(op(o,t,n))),r>=t&&r<=n&&s.push({k:r,v:a}),r<=n&&(s=s.concat(op(i,t,n))),s}function Nl(e){const{l:t,lvl:n,r}=e;if(r.lvl>=n-1&&t.lvl>=n-1)return e;if(n>r.lvl+1){if(ip(t))return l1(Rt(e,{lvl:n-1}));if(!ft(t)&&!ft(t.r))return Rt(t.r,{l:Rt(t,{r:t.r.l}),lvl:n,r:Rt(e,{l:t.r.r,lvl:n-1})});throw new Error("Unexpected empty nodes")}else{if(ip(e))return ap(Rt(e,{lvl:n-1}));if(!ft(r)&&!ft(r.l)){const o=r.l,i=ip(o)?r.lvl-1:r.lvl;return Rt(o,{l:Rt(e,{lvl:n-1,r:o.l}),lvl:o.lvl+1,r:ap(Rt(r,{l:o.r,lvl:i}))})}else throw new Error("Unexpected empty nodes")}}function Rt(e,t){return a1(t.k!==void 0?t.k:e.k,t.v!==void 0?t.v:e.v,t.lvl!==void 0?t.lvl:e.lvl,t.l!==void 0?t.l:e.l,t.r!==void 0?t.r:e.r)}function o1(e){return ft(e.r)?e.l:Nl(Rt(e,{r:o1(e.r)}))}function ip(e){return ft(e)||e.lvl>e.r.lvl}function i1(e){return ft(e.r)?[e.k,e.v]:i1(e.r)}function a1(e,t,n,r=Ca,o=Ca){return{k:e,l:r,lvl:n,r:o,v:t}}function s1(e){return ap(l1(e))}function l1(e){const{l:t}=e;return!ft(t)&&t.lvl===e.lvl?Rt(t,{r:Rt(e,{l:t.r})}):e}function ap(e){const{lvl:t,r:n}=e;return!ft(n)&&!ft(n.r)&&n.lvl===t&&n.r.lvl===t?Rt(n,{l:Rt(e,{r:n.l}),lvl:t+1}):e}function mL(e){return r1(e,({k:t,v:n})=>({index:t,value:n}))}function c1(e,t){return!!(e&&e.startIndex===t.startIndex&&e.endIndex===t.endIndex)}function Aa(e,t){return!!(e&&e[0]===t[0]&&e[1]===t[1])}const sp=Qe(()=>({recalcInProgress:he(!1)}),[],{singleton:!0});function u1(e,t,n){return e[Fl(e,t,n)]}function Fl(e,t,n,r=0){let o=e.length-1;for(;r<=o;){const i=Math.floor((r+o)/2),a=e[i],s=n(a,t);if(s===0)return i;if(s===-1){if(o-r<2)return i-1;o=i-1}else{if(o===r)return i;r=i+1}}throw new Error(`Failed binary finding record in array - ${e.join(",")}, searched for ${t}`)}function gL(e,t,n,r){const o=Fl(e,t,r),i=Fl(e,n,r,o);return e.slice(o,i+1)}function Vn(e,t){return Math.round(e.getBoundingClientRect()[t])}function Ll(e){return!ft(e.groupOffsetTree)}function lp({index:e},t){return t===e?0:t<e?-1:1}function vL(){return{groupIndices:[],groupOffsetTree:fi(),lastIndex:0,lastOffset:0,lastSize:0,offsetTree:[],sizeTree:fi()}}function yL(e,t){let n=ft(e)?0:1/0;for(const r of t){const{endIndex:o,size:i,startIndex:a}=r;if(n=Math.min(n,a),ft(e)){e=pn(e,0,i);continue}const s=pi(e,a-1,o+1);if(s.some(kL(r)))continue;let l=!1,c=!1;for(const{end:u,start:d,value:f}of s)l?(o>=d||i===f)&&(e=rp(e,d)):(c=f!==i,l=!0),u>o&&o>=d&&f!==i&&(e=pn(e,o+1,f));c&&(e=pn(e,a,i))}return[e,n]}function bL(e){return typeof e.groupIndex<"u"}function xL({offset:e},t){return t===e?0:t<e?-1:1}function Pa(e,t,n){if(t.length===0)return 0;const{index:r,offset:o,size:i}=u1(t,e,lp),a=e-r,s=i*a+(a-1)*n+o;return s>0?s+n:s}function d1(e,t){if(!Ll(t))return e;let n=0;for(;t.groupIndices[n]<=e+n;)n++;return e+n}function f1(e,t,n){if(bL(e))return t.groupIndices[e.groupIndex]+1;{const r=e.index==="LAST"?n:e.index;let o=d1(r,t);return o=Math.max(0,o,Math.min(n,o)),o}}function wL(e,t,n,r=0){return r>0&&(t=Math.max(t,u1(e,r,lp).offset)),r1(gL(e,t,n,xL),EL)}function SL(e,[t,n,r,o]){t.length>0&&r("received item sizes",t,sn.DEBUG);const i=e.sizeTree;let a=i,s=0;if(n.length>0&&ft(i)&&t.length===2){const f=t[0].size,p=t[1].size;a=n.reduce((v,h)=>pn(pn(v,h,f),h+1,p),a)}else[a,s]=yL(a,t);if(a===i)return e;const{lastIndex:l,lastOffset:c,lastSize:u,offsetTree:d}=cp(e.offsetTree,s,a,o);return{groupIndices:n,groupOffsetTree:n.reduce((f,p)=>pn(f,p,Pa(p,d,o)),fi()),lastIndex:l,lastOffset:c,lastSize:u,offsetTree:d,sizeTree:a}}function TL(e){return go(e).map(({k:t,v:n},r,o)=>{const i=o[r+1];return{endIndex:i?i.k-1:1/0,size:n,startIndex:t}})}function p1(e,t){let n=0,r=0;for(;n<e;)n+=t[r+1]-t[r]-1,r++;return r-(n===e?0:1)}function cp(e,t,n,r){let o=e,i=0,a=0,s=0,l=0;if(t!==0){l=Fl(o,t-1,lp),s=o[l].offset;const c=Ln(n,t-1);i=c[0],a=c[1],o.length&&o[l].size===Ln(n,t)[1]&&(l-=1),o=o.slice(0,l+1)}else o=[];for(const{start:c,value:u}of pi(n,t,1/0)){const d=c-i,f=d*a+s+d*r;o.push({index:c,offset:f,size:u}),i=c,s=f,a=u}return{lastIndex:i,lastOffset:s,lastSize:a,offsetTree:o}}function EL(e){return{index:e.index,value:e}}function kL(e){const{endIndex:t,size:n,startIndex:r}=e;return o=>o.start===r&&(o.end===t||o.end===1/0)&&o.value===n}const CL={offsetHeight:"height",offsetWidth:"width"},er=Qe(([{log:e},{recalcInProgress:t}])=>{const n=Ke(),r=Ke(),o=Qt(r,0),i=Ke(),a=Ke(),s=he(0),l=he([]),c=he(void 0),u=he(void 0),d=he(void 0),f=he(void 0),p=he((w,k)=>Vn(w,CL[k])),v=he(void 0),h=he(0),m=vL(),y=Qt(ue(n,He(l,e,h),Qn(SL,m),xt()),m),x=Qt(ue(l,xt(),Qn((w,k)=>({current:k,prev:w.current}),{current:[],prev:[]}),be(({prev:w})=>w)),[]);Ie(ue(l,Me(w=>w.length>0),He(y,h),be(([w,k,P])=>{const _=w.reduce((F,V,D)=>pn(F,V,Pa(V,k.offsetTree,P)||D),fi());return{...k,groupIndices:w,groupOffsetTree:_}})),y),Ie(ue(r,He(y),Me(([w,{lastIndex:k}])=>w<k),be(([w,{lastIndex:k,lastSize:P}])=>[{endIndex:k,size:P,startIndex:w}])),n),Ie(c,u);const b=Qt(ue(c,be(w=>w===void 0)),!0);Ie(ue(u,Me(w=>w!==void 0&&ft(Tt(y).sizeTree)),be(w=>{const k=Tt(d),P=Tt(l).length>0;return k?P?[{endIndex:0,size:k,startIndex:0},{endIndex:1,size:w,startIndex:1}]:[]:[{endIndex:0,size:w,startIndex:0}]})),n),Ie(ue(f,Me(w=>w!==void 0&&w.length>0&&ft(Tt(y).sizeTree)),be(w=>{const k=[];let P=w[0],_=0;for(let F=1;F<w.length;F++){const V=w[F];V!==P&&(k.push({endIndex:F-1,size:P,startIndex:_}),P=V,_=F)}return k.push({endIndex:w.length-1,size:P,startIndex:_}),k})),n),Ie(ue(l,He(d,u),Me(([,w,k])=>w!==void 0&&k!==void 0),be(([w,k,P])=>{const _=[];for(let F=0;F<w.length;F++){const V=w[F],D=w[F+1];_.push({startIndex:V,endIndex:V,size:k}),D!==void 0&&_.push({startIndex:V+1,endIndex:D-1,size:P})}return _})),n);const E=fn(ue(n,He(y),Qn(({sizes:w},[k,P])=>({changed:P!==w,sizes:P}),{changed:!1,sizes:m}),be(w=>w.changed)));st(ue(s,Qn((w,k)=>({diff:w.prev-k,prev:k}),{diff:0,prev:0}),be(w=>w.diff)),w=>{const{groupIndices:k}=Tt(y);if(w>0)ze(t,!0),ze(i,w+p1(w,k));else if(w<0){const P=Tt(x);P.length>0&&(w-=p1(-w,P)),ze(a,w)}}),st(ue(s,He(e)),([w,k])=>{w<0&&k("`firstItemIndex` prop should not be set to less than zero. If you don't know the total count, just use a very high value",{firstItemIndex:s},sn.ERROR)});const T=fn(i);Ie(ue(i,He(y),be(([w,k])=>{const P=k.groupIndices.length>0,_=[],F=k.lastSize;if(P){const V=Ia(k.sizeTree,0);let D=0,O=0;for(;D<w;){const z=k.groupIndices[O],M=k.groupIndices.length===O+1?1/0:k.groupIndices[O+1]-z-1;_.push({endIndex:z,size:V,startIndex:z}),_.push({endIndex:z+1+M-1,size:F,startIndex:z+1}),O++,D+=M+1}const N=go(k.sizeTree);return D!==w&&N.shift(),N.reduce((z,{k:M,v:C})=>{let L=z.ranges;return z.prevSize!==0&&(L=[...z.ranges,{endIndex:M+w-1,size:z.prevSize,startIndex:z.prevIndex}]),{prevIndex:M+w,prevSize:C,ranges:L}},{prevIndex:w,prevSize:0,ranges:_}).ranges}return go(k.sizeTree).reduce((V,{k:D,v:O})=>({prevIndex:D+w,prevSize:O,ranges:[...V.ranges,{endIndex:D+w-1,size:V.prevSize,startIndex:V.prevIndex}]}),{prevIndex:0,prevSize:F,ranges:[]}).ranges})),n);const I=fn(ue(a,He(y,h),be(([w,{offsetTree:k},P])=>{const _=-w;return Pa(_,k,P)})));return Ie(ue(a,He(y,h),be(([w,k,P])=>{if(k.groupIndices.length>0){if(ft(k.sizeTree))return k;let _=fi();const F=Tt(x);let V=0,D=0,O=0;for(;V<-w;){O=F[D];const N=F[D+1]-O-1;D++,V+=N+1}if(_=go(k.sizeTree).reduce((N,{k:z,v:M})=>pn(N,Math.max(0,z+w),M),_),V!==-w){const N=Ia(k.sizeTree,O);_=pn(_,0,N);const z=Ln(k.sizeTree,-w+1)[1];_=pn(_,1,z)}return{...k,sizeTree:_,...cp(k.offsetTree,0,_,P)}}else{const _=go(k.sizeTree).reduce((F,{k:V,v:D})=>pn(F,Math.max(0,V+w),D),fi());return{...k,sizeTree:_,...cp(k.offsetTree,0,_,P)}}})),y),{beforeUnshiftWith:T,data:v,defaultItemSize:u,firstItemIndex:s,fixedItemSize:c,fixedGroupSize:d,gap:h,groupIndices:l,heightEstimates:f,itemSize:p,listRefresh:E,shiftWith:a,shiftWithOffset:I,sizeRanges:n,sizes:y,statefulTotalCount:o,totalCount:r,trackItemSizes:b,unshiftWith:i}},bt(Lr,sp),{singleton:!0});function IL(e){return e.reduce((t,n)=>(t.groupIndices.push(t.totalCount),t.totalCount+=n+1,t),{groupIndices:[],totalCount:0})}const h1=Qe(([{groupIndices:e,sizes:t,totalCount:n},{headerHeight:r,scrollTop:o}])=>{const i=Ke(),a=Ke(),s=fn(ue(i,be(IL)));return Ie(ue(s,be(l=>l.totalCount)),n),Ie(ue(s,be(l=>l.groupIndices)),e),Ie(ue(Vt(o,t,r),Me(([l,c])=>Ll(c)),be(([l,c,u])=>Ln(c.groupOffsetTree,Math.max(l-u,0),"v")[0]),xt(),be(l=>[l])),a),{groupCounts:i,topItemsIndexes:a}},bt(er,tn)),Vr=Qe(([{log:e}])=>{const t=he(!1),n=fn(ue(t,Me(r=>r),xt()));return st(t,r=>{r&&Tt(e)("props updated",{},sn.DEBUG)}),{didMount:n,propsReady:t}},bt(Lr),{singleton:!0}),AL=typeof document<"u"&&"scrollBehavior"in document.documentElement.style;function m1(e){const t=typeof e=="number"?{index:e}:e;return t.align||(t.align="start"),(!t.behavior||!AL)&&(t.behavior="auto"),t.offset||(t.offset=0),t}const Oa=Qe(([{gap:e,listRefresh:t,sizes:n,totalCount:r},{fixedFooterHeight:o,fixedHeaderHeight:i,footerHeight:a,headerHeight:s,scrollingInProgress:l,scrollTo:c,smoothScrollTargetReached:u,viewportHeight:d},{log:f}])=>{const p=Ke(),v=Ke(),h=he(0);let m=null,y=null,x=null;function b(){m&&(m(),m=null),x&&(x(),x=null),y&&(clearTimeout(y),y=null),ze(l,!1)}return Ie(ue(p,He(n,d,r,h,s,a,f),He(e,i,o),be(([[E,T,I,w,k,P,_,F],V,D,O])=>{const N=m1(E),{align:z,behavior:M,offset:C}=N,L=w-1,$=f1(N,T,L);let B=Pa($,T.offsetTree,V)+P;z==="end"?(B+=D+Ln(T.sizeTree,$)[1]-I+O,$===L&&(B+=_)):z==="center"?B+=(D+Ln(T.sizeTree,$)[1]-I+O)/2:B-=k,C&&(B+=C);const q=G=>{b(),G?(F("retrying to scroll to",{location:E},sn.DEBUG),ze(p,E)):(ze(v,!0),F("list did not change, scroll successful",{},sn.DEBUG))};if(b(),M==="smooth"){let G=!1;x=st(t,W=>{G=G||W}),m=Fn(u,()=>{q(G)})}else m=Fn(ue(t,PL(150)),q);return y=setTimeout(()=>{b()},1200),ze(l,!0),F("scrolling from index to",{behavior:M,index:$,top:B},sn.DEBUG),{behavior:M,top:B}})),c),{scrollTargetReached:v,scrollToIndex:p,topListHeight:h}},bt(er,tn,Lr),{singleton:!0});function PL(e){return t=>{const n=setTimeout(()=>{t(!1)},e);return r=>{r&&(t(!0),clearTimeout(n))}}}function up(e,t){e==0?t():requestAnimationFrame(()=>{up(e-1,t)})}function dp(e,t){const n=t-1;return typeof e=="number"?e:e.index==="LAST"?n:e.index}const _a=Qe(([{defaultItemSize:e,listRefresh:t,sizes:n},{scrollTop:r},{scrollTargetReached:o,scrollToIndex:i},{didMount:a}])=>{const s=he(!0),l=he(0),c=he(!0);return Ie(ue(a,He(l),Me(([u,d])=>!!d),Xn(!1)),s),Ie(ue(a,He(l),Me(([u,d])=>!!d),Xn(!1)),c),st(ue(Vt(t,a),He(s,n,e,c),Me(([[,u],d,{sizeTree:f},p,v])=>u&&(!ft(f)||Qf(p))&&!d&&!v),He(l)),([,u])=>{Fn(o,()=>{ze(c,!0)}),up(4,()=>{Fn(r,()=>{ze(s,!0)}),ze(i,u)})}),{initialItemFinalLocationReached:c,initialTopMostItemIndex:l,scrolledToInitialItem:s}},bt(er,tn,Oa,Vr),{singleton:!0});function g1(e,t){return Math.abs(e-t)<1.01}const Ma="up",Da="down",OL="none",_L={atBottom:!1,notAtBottomBecause:"NOT_SHOWING_LAST_ITEM",state:{offsetBottom:0,scrollHeight:0,scrollTop:0,viewportHeight:0}},ML=0,Na=Qe(([{footerHeight:e,headerHeight:t,scrollBy:n,scrollContainerState:r,scrollTop:o,viewportHeight:i}])=>{const a=he(!1),s=he(!0),l=Ke(),c=Ke(),u=he(4),d=he(ML),f=Qt(ue(ep(ue(De(o),mo(1),Xn(!0)),ue(De(o),mo(1),Xn(!1),Jw(100))),xt()),!1),p=Qt(ue(ep(ue(n,Xn(!0)),ue(n,Xn(!1),Jw(200))),xt()),!1);Ie(ue(Vt(De(o),De(d)),be(([x,b])=>x<=b),xt()),s),Ie(ue(s,mr(50)),c);const v=fn(ue(Vt(r,De(i),De(t),De(e),De(u)),Qn((x,[{scrollHeight:b,scrollTop:E},T,I,w,k])=>{const P=E+T-b>-k,_={scrollHeight:b,scrollTop:E,viewportHeight:T};if(P){let V,D;return E>x.state.scrollTop?(V="SCROLLED_DOWN",D=x.state.scrollTop-E):(V="SIZE_DECREASED",D=x.state.scrollTop-E||x.scrollTopDelta),{atBottom:!0,atBottomBecause:V,scrollTopDelta:D,state:_}}let F;return _.scrollHeight>x.state.scrollHeight?F="SIZE_INCREASED":T<x.state.viewportHeight?F="VIEWPORT_HEIGHT_DECREASING":E<x.state.scrollTop?F="SCROLLING_UPWARDS":F="NOT_FULLY_SCROLLED_TO_LAST_ITEM_BOTTOM",{atBottom:!1,notAtBottomBecause:F,state:_}},_L),xt((x,b)=>x&&x.atBottom===b.atBottom))),h=Qt(ue(r,Qn((x,{scrollHeight:b,scrollTop:E,viewportHeight:T})=>{if(g1(x.scrollHeight,b))return{changed:!1,jump:0,scrollHeight:b,scrollTop:E};{const I=b-(E+T)<1;return x.scrollTop!==E&&I?{changed:!0,jump:x.scrollTop-E,scrollHeight:b,scrollTop:E}:{changed:!0,jump:0,scrollHeight:b,scrollTop:E}}},{changed:!1,jump:0,scrollHeight:0,scrollTop:0}),Me(x=>x.changed),be(x=>x.jump)),0);Ie(ue(v,be(x=>x.atBottom)),a),Ie(ue(a,mr(50)),l);const m=he(Da);Ie(ue(r,be(({scrollTop:x})=>x),xt(),Qn((x,b)=>Tt(p)?{direction:x.direction,prevScrollTop:b}:{direction:b<x.prevScrollTop?Ma:Da,prevScrollTop:b},{direction:Da,prevScrollTop:0}),be(x=>x.direction)),m),Ie(ue(r,mr(50),Xn(OL)),m);const y=he(0);return Ie(ue(f,Me(x=>!x),Xn(0)),y),Ie(ue(o,mr(100),He(f),Me(([x,b])=>b),Qn(([x,b],[E])=>[b,E],[0,0]),be(([x,b])=>b-x)),y),{atBottomState:v,atBottomStateChange:l,atBottomThreshold:u,atTopStateChange:c,atTopThreshold:d,isAtBottom:a,isAtTop:s,isScrolling:f,lastJumpDueToItemResize:h,scrollDirection:m,scrollVelocity:y}},bt(tn)),Fa="top",La="bottom",v1="none";function y1(e,t,n){return typeof e=="number"?n===Ma&&t===Fa||n===Da&&t===La?e:0:n===Ma?t===Fa?e.main:e.reverse:t===La?e.main:e.reverse}function b1(e,t){var n;return typeof e=="number"?e:(n=e[t])!=null?n:0}const fp=Qe(([{deviation:e,fixedHeaderHeight:t,headerHeight:n,scrollTop:r,viewportHeight:o}])=>{const i=Ke(),a=he(0),s=he(0),l=he(0),c=Qt(ue(Vt(De(r),De(o),De(n),De(i,Aa),De(l),De(a),De(t),De(e),De(s)),be(([u,d,f,[p,v],h,m,y,x,b])=>{const E=u-x,T=m+y,I=Math.max(f-E,0);let w=v1;const k=b1(b,Fa),P=b1(b,La);return p-=x,p+=f+y,v+=f+y,v-=x,p>u+T-k&&(w=Ma),v<u-I+d+P&&(w=Da),w!==v1?[Math.max(E-f-y1(h,Fa,w)-k,0),E-I-y+d+y1(h,La,w)+P]:null}),Me(u=>u!=null),xt(Aa)),[0,0]);return{increaseViewportBy:s,listBoundary:i,overscan:l,topListHeight:a,visibleRange:c}},bt(tn),{singleton:!0});function DL(e,t,n){if(Ll(t)){const r=d1(e,t);return[{index:Ln(t.groupOffsetTree,r)[0],offset:0,size:0},{data:n?.[0],index:r,offset:0,size:0}]}return[{data:n?.[0],index:e,offset:0,size:0}]}const pp={bottom:0,firstItemIndex:0,items:[],offsetBottom:0,offsetTop:0,top:0,topItems:[],topListHeight:0,totalCount:0};function Vl(e,t,n,r,o,i){const{lastIndex:a,lastOffset:s,lastSize:l}=o;let c=0,u=0;if(e.length>0){c=e[0].offset;const h=e[e.length-1];u=h.offset+h.size}const d=n-a,f=s+d*l+(d-1)*r,p=c,v=f-u;return{bottom:u,firstItemIndex:i,items:w1(e,o,i),offsetBottom:v,offsetTop:c,top:p,topItems:w1(t,o,i),topListHeight:t.reduce((h,m)=>m.size+h,0),totalCount:n}}function x1(e,t,n,r,o,i){let a=0;if(n.groupIndices.length>0)for(const u of n.groupIndices){if(u-a>=e)break;a++}const s=e+a,l=dp(t,s),c=Array.from({length:s}).map((u,d)=>({data:i[d+l],index:d+l,offset:0,size:0}));return Vl(c,[],s,o,n,r)}function w1(e,t,n){if(e.length===0)return[];if(!Ll(t))return e.map(c=>({...c,index:c.index+n,originalIndex:c.index}));const r=e[0].index,o=e[e.length-1].index,i=[],a=pi(t.groupOffsetTree,r,o);let s,l=0;for(const c of e){(!s||s.end<c.index)&&(s=a.shift(),l=t.groupIndices.indexOf(s.start));let u;c.index===s.start?u={index:l,type:"group"}:u={groupIndex:l,index:c.index-(l+1)+n},i.push({...u,data:c.data,offset:c.offset,originalIndex:c.index,size:c.size})}return i}function S1(e,t){var n;return e===void 0?0:typeof e=="number"?e:(n=e[t])!=null?n:0}const vo=Qe(([{data:e,firstItemIndex:t,gap:n,sizes:r,totalCount:o},i,{listBoundary:a,topListHeight:s,visibleRange:l},{initialTopMostItemIndex:c,scrolledToInitialItem:u},{topListHeight:d},f,{didMount:p},{recalcInProgress:v}])=>{const h=he([]),m=he(0),y=Ke(),x=he(0);Ie(i.topItemsIndexes,h);const b=Qt(ue(Vt(p,v,De(l,Aa),De(o),De(r),De(c),u,De(h),De(t),De(n),De(x),e),Me(([w,k,,P,,,,,,,,_])=>{const F=_&&_.length!==P;return w&&!k&&!F}),be(([,,[w,k],P,_,F,V,D,O,N,z,M])=>{var C,L,$,B;const q=_,{offsetTree:G,sizeTree:W}=q,J=Tt(m);if(P===0)return{...pp,totalCount:P};if(w===0&&k===0)return J===0?{...pp,totalCount:P}:x1(J,F,_,O,N,M||[]);if(ft(W))return J>0?null:Vl(DL(dp(F,P),q,M),[],P,N,q,O);const re=[];if(D.length>0){const se=D[0],ie=D[D.length-1];let Q=0;for(const le of pi(W,se,ie)){const te=le.value,fe=Math.max(le.start,se),pe=Math.min(le.end,ie);for(let ve=fe;ve<=pe;ve++)re.push({data:M?.[ve],index:ve,offset:Q,size:te}),Q+=te}}if(!V)return Vl([],re,P,N,q,O);const ee=D.length>0?D[D.length-1]+1:0,Y=wL(G,w,k,ee);if(Y.length===0)return null;const K=P-1,X=Dl([],se=>{for(const ie of Y){const Q=ie.value;let le=Q.offset,te=ie.start;const fe=Q.size;if(Q.offset<w){te+=Math.floor((w-Q.offset+N)/(fe+N));const ve=te-ie.start;le+=ve*fe+ve*N}te<ee&&(le+=(ee-te)*fe,te=ee);const pe=Math.min(ie.end,K);for(let ve=te;ve<=pe&&!(le>=k);ve++)se.push({data:M?.[ve],index:ve,offset:le,size:fe}),le+=fe+N}}),de=S1(z,Fa),H=S1(z,La);if(X.length>0&&(de>0||H>0)){const se=X[0],ie=X[X.length-1];if(de>0&&se.index>ee){const Q=Math.min(de,se.index-ee),le=[];let te=se.offset;for(let fe=se.index-1;fe>=se.index-Q;fe--){const pe=(L=(C=pi(W,fe,fe)[0])==null?void 0:C.value)!=null?L:se.size;te-=pe+N,le.unshift({data:M?.[fe],index:fe,offset:te,size:pe})}X.unshift(...le)}if(H>0&&ie.index<K){const Q=Math.min(H,K-ie.index);let le=ie.offset+ie.size+N;for(let te=ie.index+1;te<=ie.index+Q;te++){const fe=(B=($=pi(W,te,te)[0])==null?void 0:$.value)!=null?B:ie.size;X.push({data:M?.[te],index:te,offset:le,size:fe}),le+=fe+N}}}return Vl(X,re,P,N,q,O)}),Me(w=>w!==null),xt()),pp);Ie(ue(e,Me(Qf),be(w=>w?.length)),o),Ie(ue(b,be(w=>w.topListHeight)),d),Ie(d,s),Ie(ue(b,be(w=>[w.top,w.bottom])),a),Ie(ue(b,be(w=>w.items)),y);const E=fn(ue(b,Me(({items:w})=>w.length>0),He(o,e),Me(([{items:w},k])=>w[w.length-1].originalIndex===k-1),be(([,w,k])=>[w-1,k]),xt(Aa),be(([w])=>w))),T=fn(ue(b,mr(200),Me(({items:w,topItems:k})=>w.length>0&&w[0].originalIndex===k.length),be(({items:w})=>w[0].index),xt())),I=fn(ue(b,Me(({items:w})=>w.length>0),be(({items:w})=>{let k=0,P=w.length-1;for(;w[k].type==="group"&&k<P;)k++;for(;w[P].type==="group"&&P>k;)P--;return{endIndex:w[P].index,startIndex:w[k].index}}),xt(c1)));return{endReached:E,initialItemCount:m,itemsRendered:y,listState:b,minOverscanItemCount:x,rangeChanged:I,startReached:T,topItemsIndexes:h,...f}},bt(er,h1,fp,_a,Oa,Na,Vr,sp),{singleton:!0}),T1=Qe(([{fixedFooterHeight:e,fixedHeaderHeight:t,footerHeight:n,headerHeight:r},{listState:o}])=>{const i=Ke(),a=Qt(ue(Vt(n,e,r,t,o),be(([s,l,c,u,d])=>s+l+c+u+d.offsetBottom+d.bottom)),0);return Ie(De(a),i),{totalListHeight:a,totalListHeightChanged:i}},bt(tn,vo),{singleton:!0}),NL=Qe(([{viewportHeight:e},{totalListHeight:t}])=>{const n=he(!1),r=Qt(ue(Vt(n,e,t),Me(([o])=>o),be(([,o,i])=>Math.max(0,o-i)),mr(0),xt()),0);return{alignToBottom:n,paddingTopAddition:r}},bt(tn,T1),{singleton:!0}),E1=Qe(()=>({context:he(null)})),FL=({itemBottom:e,itemTop:t,locationParams:{align:n,behavior:r,...o},viewportBottom:i,viewportTop:a})=>t<a?{...o,align:n??"start",behavior:r}:e>i?{...o,align:n??"end",behavior:r}:null,k1=Qe(([{gap:e,sizes:t,totalCount:n},{fixedFooterHeight:r,fixedHeaderHeight:o,headerHeight:i,scrollingInProgress:a,scrollTop:s,viewportHeight:l},{scrollToIndex:c}])=>{const u=Ke();return Ie(ue(u,He(t,l,n,i,o,r,s),He(e),be(([[d,f,p,v,h,m,y,x],b])=>{const{align:E,behavior:T,calculateViewLocation:I=FL,done:w,...k}=d,P=f1(d,f,v-1),_=Pa(P,f.offsetTree,b)+h+m,F=_+Ln(f.sizeTree,P)[1],V=x+m,D=x+p-y,O=I({itemBottom:F,itemTop:_,locationParams:{align:E,behavior:T,...k},viewportBottom:D,viewportTop:V});return O?w&&Fn(ue(a,Me(N=>!N),mo(Tt(a)?1:2)),w):w?.(),O}),Me(d=>d!==null)),c),{scrollIntoView:u}},bt(er,tn,Oa,vo,Lr),{singleton:!0});function C1(e){return e?e==="smooth"?"smooth":"auto":!1}const LL=(e,t)=>typeof e=="function"?C1(e(t)):t&&C1(e),VL=Qe(([{listRefresh:e,totalCount:t,fixedItemSize:n,data:r},{atBottomState:o,isAtBottom:i},{scrollToIndex:a},{scrolledToInitialItem:s},{didMount:l,propsReady:c},{log:u},{scrollingInProgress:d},{context:f},{scrollIntoView:p}])=>{const v=he(!1),h=Ke();let m=null;function y(T){ze(a,{align:"end",behavior:T,index:"LAST"})}st(ue(Vt(ue(De(t),mo(1)),l),He(De(v),i,s,d),be(([[T,I],w,k,P,_])=>{let F=I&&P,V="auto";return F&&(V=LL(w,k||_),F=F&&!!V),{followOutputBehavior:V,shouldFollow:F,totalCount:T}}),Me(({shouldFollow:T})=>T)),({followOutputBehavior:T,totalCount:I})=>{m&&(m(),m=null),Tt(n)?requestAnimationFrame(()=>{Tt(u)("following output to ",{totalCount:I},sn.DEBUG),y(T)}):m=Fn(e,()=>{Tt(u)("following output to ",{totalCount:I},sn.DEBUG),y(T),m=null})});function x(T){const I=Fn(o,w=>{T&&!w.atBottom&&w.notAtBottomBecause==="SIZE_INCREASED"&&!m&&(Tt(u)("scrolling to bottom due to increased size",{},sn.DEBUG),y("auto"))});setTimeout(I,100)}st(ue(Vt(De(v),t,c),Me(([T,,I])=>T&&I),Qn(({value:T},[,I])=>({refreshed:T===I,value:I}),{refreshed:!1,value:0}),Me(({refreshed:T})=>T),He(v,t)),([,T])=>{Tt(s)&&x(T!==!1)}),st(h,()=>{x(Tt(v)!==!1)}),st(Vt(De(v),o),([T,I])=>{T&&!I.atBottom&&I.notAtBottomBecause==="VIEWPORT_HEIGHT_DECREASING"&&y("auto")});const b=he(null),E=Ke();return Ie(ep(ue(De(r),be(T=>{var I;return(I=T?.length)!=null?I:0})),ue(De(t))),E),st(ue(Vt(ue(E,mo(1)),l),He(De(b),s,d,f),be(([[T,I],w,k,P,_])=>I&&k&&w?.({context:_,totalCount:T,scrollingInProgress:P})),Me(T=>!!T),mr(0)),T=>{m&&(m(),m=null),Tt(n)?requestAnimationFrame(()=>{Tt(u)("scrolling into view",{}),ze(p,T)}):m=Fn(e,()=>{Tt(u)("scrolling into view",{}),ze(p,T),m=null})}),{autoscrollToBottom:h,followOutput:v,scrollIntoViewOnChange:b}},bt(er,Na,Oa,_a,Vr,Lr,tn,E1,k1)),$L=Qe(([{data:e,firstItemIndex:t,gap:n,sizes:r},{initialTopMostItemIndex:o},{initialItemCount:i,listState:a},{didMount:s}])=>(Ie(ue(s,He(i),Me(([,l])=>l!==0),He(o,r,t,n,e),be(([[,l],c,u,d,f,p=[]])=>x1(l,c,u,d,f,p))),a),{}),bt(er,_a,vo,Vr),{singleton:!0}),zL=Qe(([{didMount:e},{scrollTo:t},{listState:n}])=>{const r=he(0);return st(ue(e,He(r),Me(([,o])=>o!==0),be(([,o])=>({top:o}))),o=>{Fn(ue(n,mo(1),Me(i=>i.items.length>1)),()=>{requestAnimationFrame(()=>{ze(t,o)})})}),{initialScrollTop:r}},bt(Vr,tn,vo),{singleton:!0}),I1=Qe(([{scrollVelocity:e}])=>{const t=he(!1),n=Ke(),r=he(!1);return Ie(ue(e,He(r,t,n),Me(([o,i])=>!!i),be(([o,i,a,s])=>{const{enter:l,exit:c}=i;if(a){if(c(o,s))return!1}else if(l(o,s))return!0;return a}),xt()),t),st(ue(Vt(t,e,n),He(r)),([[o,i,a],s])=>{o&&s&&s.change&&s.change(i,a)}),{isSeeking:t,scrollSeekConfiguration:r,scrollSeekRangeChanged:n,scrollVelocity:e}},bt(Na),{singleton:!0}),hp=Qe(([{scrollContainerState:e,scrollTo:t}])=>{const n=Ke(),r=Ke(),o=Ke(),i=he(!1),a=he(void 0);return Ie(ue(Vt(n,r),be(([{scrollHeight:s,scrollTop:l,viewportHeight:c},{offsetTop:u}])=>({scrollHeight:s,scrollTop:Math.max(0,l-u),viewportHeight:c}))),e),Ie(ue(t,He(r),be(([s,{offsetTop:l}])=>({...s,top:s.top+l}))),o),{customScrollParent:a,useWindowScroll:i,windowScrollContainerState:n,windowScrollTo:o,windowViewportRect:r}},bt(tn)),jL=Qe(([{sizeRanges:e,sizes:t},{headerHeight:n,scrollTop:r},{initialTopMostItemIndex:o},{didMount:i},{useWindowScroll:a,windowScrollContainerState:s,windowViewportRect:l}])=>{const c=Ke(),u=he(void 0),d=he(null),f=he(null);return Ie(s,d),Ie(l,f),st(ue(c,He(t,r,a,d,f,n)),([p,v,h,m,y,x,b])=>{const E=TL(v.sizeTree);m&&y!==null&&x!==null&&(h=y.scrollTop-x.offsetTop),h-=b,p({ranges:E,scrollTop:h})}),Ie(ue(u,Me(Qf),be(RL)),o),Ie(ue(i,He(u),Me(([,p])=>p!==void 0),xt(),be(([,p])=>p.ranges)),e),{getState:c,restoreStateFrom:u}},bt(er,tn,_a,Vr,hp));function RL(e){return{align:"start",index:0,offset:e.scrollTop}}const BL=Qe(([{topItemsIndexes:e}])=>{const t=he(0);return Ie(ue(t,Me(n=>n>=0),be(n=>Array.from({length:n}).map((r,o)=>o))),e),{topItemCount:t}},bt(vo));function A1(e){let t=!1,n;return(()=>(t||(t=!0,n=e()),n))}const HL=A1(()=>/iP(ad|od|hone)/i.test(navigator.userAgent)&&/WebKit/i.test(navigator.userAgent)),WL=Qe(([{deviation:e,scrollBy:t,scrollingInProgress:n,scrollTop:r},{isAtBottom:o,isScrolling:i,lastJumpDueToItemResize:a,scrollDirection:s},{listState:l},{beforeUnshiftWith:c,gap:u,shiftWithOffset:d,sizes:f},{log:p},{recalcInProgress:v}])=>{const h=fn(ue(l,He(a),Qn(([,y,x,b],[{bottom:E,items:T,offsetBottom:I,totalCount:w},k])=>{const P=E+I;let _=0;return x===w&&y.length>0&&T.length>0&&(T[0].originalIndex===0&&y[0].originalIndex===0||(_=P-b,_!==0&&(_+=k))),[_,T,w,P]},[0,[],0,0]),Me(([y])=>y!==0),He(r,s,n,o,p,v),Me(([,y,x,b,,,E])=>!E&&!b&&y!==0&&x===Ma),be(([[y],,,,,x])=>(x("Upward scrolling compensation",{amount:y},sn.DEBUG),y))));function m(y){y>0?(ze(t,{behavior:"auto",top:-y}),ze(e,0)):(ze(e,0),ze(t,{behavior:"auto",top:-y}))}return st(ue(h,He(e,i)),([y,x,b])=>{b&&HL()?ze(e,x-y):m(-y)}),st(ue(Vt(Qt(i,!1),e,v),Me(([y,x,b])=>!y&&!b&&x!==0),be(([y,x])=>x),mr(1)),m),Ie(ue(d,be(y=>({top:-y}))),t),st(ue(c,He(f,u),be(([y,{groupIndices:x,lastSize:b,sizeTree:E},T])=>{function I(w){return w*(b+T)}if(x.length===0)return I(y);{let w=0;const k=Ia(E,0);let P=0,_=0;for(;P<y;){P++,w+=k;let F=x.length===_+1?1/0:x[_+1]-x[_]-1;P+F>y&&(w-=k,F=y-P+1),P+=F,w+=I(F),_++}return w}})),y=>{ze(e,y),requestAnimationFrame(()=>{ze(t,{top:y}),requestAnimationFrame(()=>{ze(e,0),ze(v,!1)})})}),{deviation:e}},bt(tn,Na,vo,er,Lr,sp)),qL=Qe(([e,t,n,r,o,i,a,s,l,c,u])=>({...e,...t,...n,...r,...o,...i,...a,...s,...l,...c,...u}),bt(fp,$L,Vr,I1,T1,zL,NL,hp,k1,Lr,E1)),P1=Qe(([{data:e,defaultItemSize:t,firstItemIndex:n,fixedItemSize:r,fixedGroupSize:o,gap:i,groupIndices:a,heightEstimates:s,itemSize:l,sizeRanges:c,sizes:u,statefulTotalCount:d,totalCount:f,trackItemSizes:p},{initialItemFinalLocationReached:v,initialTopMostItemIndex:h,scrolledToInitialItem:m},y,x,b,E,{scrollToIndex:T},I,{topItemCount:w},{groupCounts:k},P])=>{const{listState:_,minOverscanItemCount:F,topItemsIndexes:V,rangeChanged:D,...O}=E;return Ie(D,P.scrollSeekRangeChanged),Ie(ue(P.windowViewportRect,be(N=>N.visibleHeight)),y.viewportHeight),{data:e,defaultItemHeight:t,firstItemIndex:n,fixedItemHeight:r,fixedGroupHeight:o,gap:i,groupCounts:k,heightEstimates:s,initialItemFinalLocationReached:v,initialTopMostItemIndex:h,scrolledToInitialItem:m,sizeRanges:c,topItemCount:w,topItemsIndexes:V,totalCount:f,...b,groupIndices:a,itemSize:l,listState:_,minOverscanItemCount:F,scrollToIndex:T,statefulTotalCount:d,trackItemSizes:p,rangeChanged:D,...O,...P,...y,sizes:u,...x}},bt(er,_a,tn,jL,VL,vo,Oa,WL,BL,h1,qL));function UL(e,t){const n={},r={};let o=0;const i=e.length;for(;o<i;)r[e[o]]=1,o+=1;for(const a in t)Object.hasOwn(r,a)||(n[a]=t[a]);return n}const $l=typeof document<"u"?S.useLayoutEffect:S.useEffect;function mp(e,t,n){const r=Object.keys(t.required||{}),o=Object.keys(t.optional||{}),i=Object.keys(t.methods||{}),a=Object.keys(t.events||{}),s=S.createContext({});function l(m,y){m.propsReady&&ze(m.propsReady,!1);for(const x of r){const b=m[t.required[x]];ze(b,y[x])}for(const x of o)if(x in y){const b=m[t.optional[x]];ze(b,y[x])}m.propsReady&&ze(m.propsReady,!0)}function c(m){return i.reduce((y,x)=>(y[x]=b=>{const E=m[t.methods[x]];ze(E,b)},y),{})}function u(m){return a.reduce((y,x)=>(y[x]=cL(m[t.events[x]]),y),{})}const d=S.forwardRef((m,y)=>{const{children:x,...b}=m,[E]=S.useState(()=>Dl(dL(e),w=>{l(w,b)})),[T]=S.useState(Qw(u,E));$l(()=>{for(const w of a)w in b&&st(T[w],b[w]);return()=>{Object.values(T).map(Jf)}},[b,T,E]),$l(()=>{l(E,b)}),S.useImperativeHandle(y,Xw(c(E)));const I=n;return g.jsx(s.Provider,{value:E,children:n?g.jsx(I,{...UL([...r,...o,...a],b),children:x}):x})}),f=m=>{const y=S.useContext(s);return S.useCallback(x=>{ze(y[m],x)},[y,m])},p=m=>{const y=S.useContext(s)[m],x=S.useCallback(b=>st(y,b),[y]);return S.useSyncExternalStore(x,()=>Tt(y),()=>Tt(y))},v=m=>{const y=S.useContext(s)[m],[x,b]=S.useState(Qw(Tt,y));return $l(()=>st(y,E=>{E!==x&&b(Xw(E))}),[y,x]),x},h=S.version.startsWith("18")?p:v;return{Component:d,useEmitter:(m,y)=>{const x=S.useContext(s)[m];$l(()=>st(x,y),[y,x])},useEmitterValue:h,usePublisher:f}}const zl=S.createContext(void 0),O1=S.createContext(void 0),_1=typeof document<"u"?S.useLayoutEffect:S.useEffect;function gp(e){return"self"in e}function GL(e){return"body"in e}function M1(e,t,n,r=di,o,i){const a=S.useRef(null),s=S.useRef(null),l=S.useRef(null),c=S.useCallback(f=>{let p,v,h;const m=f.target;if(GL(m)||gp(m)){const x=gp(m)?m:m.defaultView;h=i?x.scrollX:x.scrollY,p=i?x.document.documentElement.scrollWidth:x.document.documentElement.scrollHeight,v=i?x.innerWidth:x.innerHeight}else h=i?m.scrollLeft:m.scrollTop,p=i?m.scrollWidth:m.scrollHeight,v=i?m.offsetWidth:m.offsetHeight;const y=()=>{e({scrollHeight:p,scrollTop:Math.max(h,0),viewportHeight:v})};f.suppressFlushSync?y():Fi.flushSync(y),s.current!==null&&(h===s.current||h<=0||h===p-v)&&(s.current=null,t(!0),l.current&&(clearTimeout(l.current),l.current=null))},[e,t,i]);S.useEffect(()=>{const f=o||a.current;return r(o||a.current),c({suppressFlushSync:!0,target:f}),f.addEventListener("scroll",c,{passive:!0}),()=>{r(null),f.removeEventListener("scroll",c)}},[a,c,n,r,o]);function u(f){const p=a.current;if(!p||(i?"offsetWidth"in p&&p.offsetWidth===0:"offsetHeight"in p&&p.offsetHeight===0))return;const v=f.behavior==="smooth";let h,m,y;gp(p)?(m=Math.max(Vn(p.document.documentElement,i?"width":"height"),i?p.document.documentElement.scrollWidth:p.document.documentElement.scrollHeight),h=i?p.innerWidth:p.innerHeight,y=i?window.scrollX:window.scrollY):(m=p[i?"scrollWidth":"scrollHeight"],h=Vn(p,i?"width":"height"),y=p[i?"scrollLeft":"scrollTop"]);const x=m-h;if(f.top=Math.ceil(Math.max(Math.min(x,f.top),0)),g1(h,m)||f.top===y){e({scrollHeight:m,scrollTop:y,viewportHeight:h}),v&&t(!0);return}v?(s.current=f.top,l.current&&clearTimeout(l.current),l.current=setTimeout(()=>{l.current=null,s.current=null,t(!0)},1e3)):s.current=null,i&&(f={behavior:f.behavior,left:f.top}),p.scrollTo(f)}function d(f){i&&(f={behavior:f.behavior,left:f.top}),a.current.scrollBy(f)}return{scrollByCallback:d,scrollerRef:a,scrollToCallback:u}}const vp="-webkit-sticky",D1="sticky",yp=A1(()=>{if(typeof document>"u")return D1;const e=document.createElement("div");return e.style.position=vp,e.style.position===vp?vp:D1});function bp(e){return e}const YL=Qe(()=>{const e=he(s=>`Item ${s}`),t=he(s=>`Group ${s}`),n=he({}),r=he(bp),o=he("div"),i=he(di),a=(s,l=null)=>Qt(ue(n,be(c=>c[s]),xt()),l);return{components:n,computeItemKey:r,EmptyPlaceholder:a("EmptyPlaceholder"),FooterComponent:a("Footer"),GroupComponent:a("Group","div"),groupContent:t,HeaderComponent:a("Header"),HeaderFooterTag:o,ItemComponent:a("Item","div"),itemContent:e,ListComponent:a("List","div"),ScrollerComponent:a("Scroller","div"),scrollerRef:i,ScrollSeekPlaceholder:a("ScrollSeekPlaceholder"),TopItemListComponent:a("TopItemList")}}),KL=Qe(([e,t])=>({...e,...t}),bt(P1,YL)),ZL=({height:e})=>g.jsx("div",{style:{height:e}}),XL={overflowAnchor:"none",position:yp(),zIndex:1},N1={overflowAnchor:"none"},QL={...N1,display:"inline-block",height:"100%"},F1=S.memo(function({showTopList:e=!1}){const t=Fe("listState"),n=xn("sizeRanges"),r=Fe("useWindowScroll"),o=Fe("customScrollParent"),i=xn("windowScrollContainerState"),a=xn("scrollContainerState"),s=o||r?i:a,l=Fe("itemContent"),c=Fe("context"),u=Fe("groupContent"),d=Fe("trackItemSizes"),f=Fe("itemSize"),p=Fe("log"),v=xn("gap"),h=Fe("horizontalDirection"),{callbackRef:m}=t1(n,f,d,e?di:s,p,v,o,h,Fe("skipAnimationFrameInResizeObserver")),[y,x]=S.useState(0);Sp("deviation",O=>{y!==O&&x(O)});const b=Fe("EmptyPlaceholder"),E=Fe("ScrollSeekPlaceholder")||ZL,T=Fe("ListComponent"),I=Fe("ItemComponent"),w=Fe("GroupComponent"),k=Fe("computeItemKey"),P=Fe("isSeeking"),_=Fe("groupIndices").length>0,F=Fe("alignToBottom"),V=Fe("initialItemFinalLocationReached"),D=e?{}:{boxSizing:"border-box",...h?{display:"inline-block",height:"100%",marginLeft:y!==0?y:F?"auto":0,paddingLeft:t.offsetTop,paddingRight:t.offsetBottom,whiteSpace:"nowrap"}:{marginTop:y!==0?y:F?"auto":0,paddingBottom:t.offsetBottom,paddingTop:t.offsetTop},...V?{}:{visibility:"hidden"}};return!e&&t.totalCount===0&&b?g.jsx(b,{...wt(b,c)}):g.jsx(T,{...wt(T,c),"data-testid":e?"virtuoso-top-item-list":"virtuoso-item-list",ref:m,style:D,children:(e?t.topItems:t.items).map(O=>{const N=O.originalIndex,z=k(N+t.firstItemIndex,O.data,c);return P?S.createElement(E,{...wt(E,c),height:O.size,index:O.index,key:z,type:O.type||"item",...O.type==="group"?{}:{groupIndex:O.groupIndex}}):O.type==="group"?S.createElement(w,{...wt(w,c),"data-index":N,"data-item-index":O.index,"data-known-size":O.size,key:z,style:XL},u(O.index,c)):S.createElement(I,{...wt(I,c),...L1(I,O.data),"data-index":N,"data-item-group-index":O.groupIndex,"data-item-index":O.index,"data-known-size":O.size,key:z,style:h?QL:N1},_?l(O.index,O.groupIndex,O.data,c):l(O.index,O.data,c))})})}),JL={height:"100%",outline:"none",overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},eV={outline:"none",overflowX:"auto",position:"relative"},hi=e=>({height:"100%",position:"absolute",top:0,width:"100%",...e?{display:"flex",flexDirection:"column"}:{}}),tV={position:yp(),top:0,width:"100%",zIndex:1};function wt(e,t){if(typeof e!="string")return{context:t}}function L1(e,t){return{item:typeof e=="string"?void 0:t}}const nV=S.memo(function(){const e=Fe("HeaderComponent"),t=xn("headerHeight"),n=Fe("HeaderFooterTag"),r=Jn(S.useMemo(()=>i=>{t(Vn(i,"height"))},[t]),!0,Fe("skipAnimationFrameInResizeObserver")),o=Fe("context");return e?g.jsx(n,{ref:r,children:g.jsx(e,{...wt(e,o)})}):null}),rV=S.memo(function(){const e=Fe("FooterComponent"),t=xn("footerHeight"),n=Fe("HeaderFooterTag"),r=Jn(S.useMemo(()=>i=>{t(Vn(i,"height"))},[t]),!0,Fe("skipAnimationFrameInResizeObserver")),o=Fe("context");return e?g.jsx(n,{ref:r,children:g.jsx(e,{...wt(e,o)})}):null});function xp({useEmitter:e,useEmitterValue:t,usePublisher:n}){return S.memo(function({children:r,style:o,context:i,...a}){const s=n("scrollContainerState"),l=t("ScrollerComponent"),c=n("smoothScrollTargetReached"),u=t("scrollerRef"),d=t("horizontalDirection")||!1,{scrollByCallback:f,scrollerRef:p,scrollToCallback:v}=M1(s,c,l,u,void 0,d);return e("scrollTo",v),e("scrollBy",f),g.jsx(l,{"data-testid":"virtuoso-scroller","data-virtuoso-scroller":!0,ref:p,style:{...d?eV:JL,...o},tabIndex:0,...a,...wt(l,i),children:r})})}function wp({useEmitter:e,useEmitterValue:t,usePublisher:n}){return S.memo(function({children:r,style:o,context:i,...a}){const s=n("windowScrollContainerState"),l=t("ScrollerComponent"),c=n("smoothScrollTargetReached"),u=t("totalListHeight"),d=t("deviation"),f=t("customScrollParent"),p=S.useRef(null),v=t("scrollerRef"),{scrollByCallback:h,scrollerRef:m,scrollToCallback:y}=M1(s,c,l,v,f);return _1(()=>{var x;return m.current=f||((x=p.current)==null?void 0:x.ownerDocument.defaultView),()=>{m.current=null}},[m,f]),e("windowScrollTo",y),e("scrollBy",h),g.jsx(l,{ref:p,"data-virtuoso-scroller":!0,style:{position:"relative",...o,...u!==0?{height:u+d}:{}},...a,...wt(l,i),children:r})})}const oV=({children:e})=>{const t=S.useContext(zl),n=xn("viewportHeight"),r=xn("fixedItemHeight"),o=Fe("alignToBottom"),i=Fe("horizontalDirection"),a=S.useMemo(()=>ka(n,l=>Vn(l,i?"width":"height")),[n,i]),s=Jn(a,!0,Fe("skipAnimationFrameInResizeObserver"));return S.useEffect(()=>{t&&(n(t.viewportHeight),r(t.itemHeight))},[t,n,r]),g.jsx("div",{"data-viewport-type":"element",ref:s,style:hi(o),children:e})},iV=({children:e})=>{const t=S.useContext(zl),n=xn("windowViewportRect"),r=xn("fixedItemHeight"),o=Fe("customScrollParent"),i=np(n,o,Fe("skipAnimationFrameInResizeObserver")),a=Fe("alignToBottom");return S.useEffect(()=>{t&&(r(t.itemHeight),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:100}))},[t,n,r]),g.jsx("div",{"data-viewport-type":"window",ref:i,style:hi(a),children:e})},aV=({children:e})=>{const t=Fe("TopItemListComponent")||"div",n=Fe("headerHeight"),r={...tV,marginTop:`${n}px`},o=Fe("context");return g.jsx(t,{style:r,...wt(t,o),children:e})},sV=S.memo(function(e){const t=Fe("useWindowScroll"),n=Fe("topItemsIndexes").length>0,r=Fe("customScrollParent"),o=Fe("context");return g.jsxs(r||t?uV:cV,{...e,context:o,children:[n&&g.jsx(aV,{children:g.jsx(F1,{showTopList:!0})}),g.jsxs(r||t?iV:oV,{children:[g.jsx(nV,{}),g.jsx(F1,{}),g.jsx(rV,{})]})]})}),{Component:lV,useEmitter:Sp,useEmitterValue:Fe,usePublisher:xn}=mp(KL,{required:{},optional:{restoreStateFrom:"restoreStateFrom",context:"context",followOutput:"followOutput",scrollIntoViewOnChange:"scrollIntoViewOnChange",itemContent:"itemContent",groupContent:"groupContent",overscan:"overscan",increaseViewportBy:"increaseViewportBy",minOverscanItemCount:"minOverscanItemCount",totalCount:"totalCount",groupCounts:"groupCounts",topItemCount:"topItemCount",firstItemIndex:"firstItemIndex",initialTopMostItemIndex:"initialTopMostItemIndex",components:"components",atBottomThreshold:"atBottomThreshold",atTopThreshold:"atTopThreshold",computeItemKey:"computeItemKey",defaultItemHeight:"defaultItemHeight",fixedGroupHeight:"fixedGroupHeight",fixedItemHeight:"fixedItemHeight",heightEstimates:"heightEstimates",itemSize:"itemSize",scrollSeekConfiguration:"scrollSeekConfiguration",headerFooterTag:"HeaderFooterTag",data:"data",initialItemCount:"initialItemCount",initialScrollTop:"initialScrollTop",alignToBottom:"alignToBottom",useWindowScroll:"useWindowScroll",customScrollParent:"customScrollParent",scrollerRef:"scrollerRef",logLevel:"logLevel",horizontalDirection:"horizontalDirection",skipAnimationFrameInResizeObserver:"skipAnimationFrameInResizeObserver"},methods:{scrollToIndex:"scrollToIndex",scrollIntoView:"scrollIntoView",scrollTo:"scrollTo",scrollBy:"scrollBy",autoscrollToBottom:"autoscrollToBottom",getState:"getState"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",totalListHeightChanged:"totalListHeightChanged",itemsRendered:"itemsRendered",groupIndices:"groupIndices"}},sV),cV=xp({useEmitter:Sp,useEmitterValue:Fe,usePublisher:xn}),uV=wp({useEmitter:Sp,useEmitterValue:Fe,usePublisher:xn}),Tp=lV,dV=Qe(()=>{const e=he(c=>g.jsxs("td",{children:["Item $",c]})),t=he(null),n=he(c=>g.jsxs("td",{colSpan:1e3,children:["Group ",c]})),r=he(null),o=he(null),i=he({}),a=he(bp),s=he(di),l=(c,u=null)=>Qt(ue(i,be(d=>d[c]),xt()),u);return{components:i,computeItemKey:a,context:t,EmptyPlaceholder:l("EmptyPlaceholder"),FillerRow:l("FillerRow"),fixedFooterContent:o,fixedHeaderContent:r,itemContent:e,groupContent:n,ScrollerComponent:l("Scroller","div"),scrollerRef:s,ScrollSeekPlaceholder:l("ScrollSeekPlaceholder"),TableBodyComponent:l("TableBody","tbody"),TableComponent:l("Table","table"),TableFooterComponent:l("TableFoot","tfoot"),TableHeadComponent:l("TableHead","thead"),TableRowComponent:l("TableRow","tr"),GroupComponent:l("Group","tr")}}),fV=Qe(([e,t])=>({...e,...t}),bt(P1,dV)),pV=({height:e})=>g.jsx("tr",{children:g.jsx("td",{style:{height:e}})}),hV=({height:e})=>g.jsx("tr",{children:g.jsx("td",{style:{border:0,height:e,padding:0}})}),mV={overflowAnchor:"none"},V1={position:yp(),zIndex:2,overflowAnchor:"none"},$1=S.memo(function({showTopList:e=!1}){const t=je("listState"),n=je("computeItemKey"),r=je("firstItemIndex"),o=je("context"),i=je("isSeeking"),a=je("fixedHeaderHeight"),s=je("groupIndices").length>0,l=je("itemContent"),c=je("groupContent"),u=je("ScrollSeekPlaceholder")||pV,d=je("GroupComponent"),f=je("TableRowComponent"),p=(e?t.topItems:[]).reduce((h,m,y)=>(y===0?h.push(m.size):h.push(h[y-1]+m.size),h),[]),v=(e?t.topItems:t.items).map(h=>{const m=h.originalIndex,y=n(m+r,h.data,o),x=e?m===0?0:p[m-1]:0;return i?S.createElement(u,{...wt(u,o),height:h.size,index:h.index,key:y,type:h.type||"item"}):h.type==="group"?S.createElement(d,{...wt(d,o),"data-index":m,"data-item-index":h.index,"data-known-size":h.size,key:y,style:{...V1,top:a}},c(h.index,o)):S.createElement(f,{...wt(f,o),...L1(f,h.data),"data-index":m,"data-item-index":h.index,"data-known-size":h.size,"data-item-group-index":h.groupIndex,key:y,style:e?{...V1,top:a+x}:mV},s?l(h.index,h.groupIndex,h.data,o):l(h.index,h.data,o))});return g.jsx(g.Fragment,{children:v})}),gV=S.memo(function(){const e=je("listState"),t=je("topItemsIndexes").length>0,n=$n("sizeRanges"),r=je("useWindowScroll"),o=je("customScrollParent"),i=$n("windowScrollContainerState"),a=$n("scrollContainerState"),s=o||r?i:a,l=je("trackItemSizes"),c=je("itemSize"),u=je("log"),{callbackRef:d,ref:f}=t1(n,c,l,s,u,void 0,o,!1,je("skipAnimationFrameInResizeObserver")),[p,v]=S.useState(0);Ep("deviation",_=>{p!==_&&(f.current.style.marginTop=`${_}px`,v(_))});const h=je("EmptyPlaceholder"),m=je("FillerRow")||hV,y=je("TableBodyComponent"),x=je("paddingTopAddition"),b=je("statefulTotalCount"),E=je("context");if(b===0&&h)return g.jsx(h,{...wt(h,E)});const T=(t?e.topItems:[]).reduce((_,F)=>_+F.size,0),I=e.offsetTop+x+p-T,w=e.offsetBottom,k=I>0?g.jsx(m,{context:E,height:I},"padding-top"):null,P=w>0?g.jsx(m,{context:E,height:w},"padding-bottom"):null;return g.jsxs(y,{"data-testid":"virtuoso-item-list",ref:d,...wt(y,E),children:[k,t&&g.jsx($1,{showTopList:!0}),g.jsx($1,{}),P]})}),vV=({children:e})=>{const t=S.useContext(zl),n=$n("viewportHeight"),r=$n("fixedItemHeight"),o=Jn(S.useMemo(()=>ka(n,i=>Vn(i,"height")),[n]),!0,je("skipAnimationFrameInResizeObserver"));return S.useEffect(()=>{t&&(n(t.viewportHeight),r(t.itemHeight))},[t,n,r]),g.jsx("div",{"data-viewport-type":"element",ref:o,style:hi(!1),children:e})},yV=({children:e})=>{const t=S.useContext(zl),n=$n("windowViewportRect"),r=$n("fixedItemHeight"),o=je("customScrollParent"),i=np(n,o,je("skipAnimationFrameInResizeObserver"));return S.useEffect(()=>{t&&(r(t.itemHeight),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:100}))},[t,n,r]),g.jsx("div",{"data-viewport-type":"window",ref:i,style:hi(!1),children:e})},bV=S.memo(function(e){const t=je("useWindowScroll"),n=je("customScrollParent"),r=$n("fixedHeaderHeight"),o=$n("fixedFooterHeight"),i=je("fixedHeaderContent"),a=je("fixedFooterContent"),s=je("context"),l=Jn(S.useMemo(()=>ka(r,y=>Vn(y,"height")),[r]),!0,je("skipAnimationFrameInResizeObserver")),c=Jn(S.useMemo(()=>ka(o,y=>Vn(y,"height")),[o]),!0,je("skipAnimationFrameInResizeObserver")),u=n||t?SV:wV,d=n||t?yV:vV,f=je("TableComponent"),p=je("TableHeadComponent"),v=je("TableFooterComponent"),h=i?g.jsx(p,{ref:l,style:{position:"sticky",top:0,zIndex:2},...wt(p,s),children:i()},"TableHead"):null,m=a?g.jsx(v,{ref:c,style:{bottom:0,position:"sticky",zIndex:1},...wt(v,s),children:a()},"TableFoot"):null;return g.jsx(u,{...e,...wt(u,s),children:g.jsx(d,{children:g.jsxs(f,{style:{borderSpacing:0,overflowAnchor:"none"},...wt(f,s),children:[h,g.jsx(gV,{},"TableBody"),m]})})})}),{Component:xV,useEmitter:Ep,useEmitterValue:je,usePublisher:$n}=mp(fV,{required:{},optional:{restoreStateFrom:"restoreStateFrom",context:"context",followOutput:"followOutput",firstItemIndex:"firstItemIndex",itemContent:"itemContent",groupContent:"groupContent",fixedHeaderContent:"fixedHeaderContent",fixedFooterContent:"fixedFooterContent",overscan:"overscan",increaseViewportBy:"increaseViewportBy",minOverscanItemCount:"minOverscanItemCount",totalCount:"totalCount",topItemCount:"topItemCount",initialTopMostItemIndex:"initialTopMostItemIndex",components:"components",groupCounts:"groupCounts",atBottomThreshold:"atBottomThreshold",atTopThreshold:"atTopThreshold",computeItemKey:"computeItemKey",defaultItemHeight:"defaultItemHeight",fixedGroupHeight:"fixedGroupHeight",fixedItemHeight:"fixedItemHeight",itemSize:"itemSize",scrollSeekConfiguration:"scrollSeekConfiguration",data:"data",initialItemCount:"initialItemCount",initialScrollTop:"initialScrollTop",alignToBottom:"alignToBottom",useWindowScroll:"useWindowScroll",customScrollParent:"customScrollParent",scrollerRef:"scrollerRef",logLevel:"logLevel"},methods:{scrollToIndex:"scrollToIndex",scrollIntoView:"scrollIntoView",scrollTo:"scrollTo",scrollBy:"scrollBy",getState:"getState"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",totalListHeightChanged:"totalListHeightChanged",itemsRendered:"itemsRendered",groupIndices:"groupIndices"}},bV),wV=xp({useEmitter:Ep,useEmitterValue:je,usePublisher:$n}),SV=wp({useEmitter:Ep,useEmitterValue:je,usePublisher:$n}),TV=xV,z1={bottom:0,itemHeight:0,items:[],itemWidth:0,offsetBottom:0,offsetTop:0,top:0},EV={bottom:0,itemHeight:0,items:[{index:0}],itemWidth:0,offsetBottom:0,offsetTop:0,top:0},{ceil:j1,floor:jl,max:Va,min:kp,round:R1}=Math;function B1(e,t,n){return Array.from({length:t-e+1}).map((r,o)=>({data:n===null?null:n[o+e],index:o+e}))}function kV(e){return{...EV,items:e}}function Rl(e,t){return e&&e.width===t.width&&e.height===t.height}function CV(e,t){return e&&e.column===t.column&&e.row===t.row}const IV=Qe(([{increaseViewportBy:e,listBoundary:t,overscan:n,visibleRange:r},{footerHeight:o,headerHeight:i,scrollBy:a,scrollContainerState:s,scrollTo:l,scrollTop:c,smoothScrollTargetReached:u,viewportHeight:d},f,p,{didMount:v,propsReady:h},{customScrollParent:m,useWindowScroll:y,windowScrollContainerState:x,windowScrollTo:b,windowViewportRect:E},T])=>{const I=he(0),w=he(0),k=he(z1),P=he({height:0,width:0}),_=he({height:0,width:0}),F=Ke(),V=Ke(),D=he(0),O=he(null),N=he({column:0,row:0}),z=Ke(),M=Ke(),C=he(!1),L=he(0),$=he(!0),B=he(!1),q=he(!1);st(ue(v,He(L),Me(([Y,K])=>!!K)),()=>{ze($,!1)}),st(ue(Vt(v,$,_,P,L,B),Me(([Y,K,X,de,,H])=>Y&&!K&&X.height!==0&&de.height!==0&&!H)),([,,,,Y])=>{ze(B,!0),up(1,()=>{ze(F,Y)}),Fn(ue(c),()=>{ze(t,[0,0]),ze($,!0)})}),Ie(ue(M,Me(Y=>Y!=null&&Y.scrollTop>0),Xn(0)),w),st(ue(v,He(M),Me(([,Y])=>Y!=null)),([,Y])=>{Y&&(ze(P,Y.viewport),ze(_,Y.item),ze(N,Y.gap),Y.scrollTop>0&&(ze(C,!0),Fn(ue(c,mo(1)),K=>{ze(C,!1)}),ze(l,{top:Y.scrollTop})))}),Ie(ue(P,be(({height:Y})=>Y)),d),Ie(ue(Vt(De(P,Rl),De(_,Rl),De(N,(Y,K)=>Y&&Y.column===K.column&&Y.row===K.row),De(c)),be(([Y,K,X,de])=>({gap:X,item:K,scrollTop:de,viewport:Y}))),z),Ie(ue(Vt(De(I),r,De(N,CV),De(_,Rl),De(P,Rl),De(O),De(w),De(C),De($),De(L)),Me(([,,,,,,,Y])=>!Y),be(([Y,[K,X],de,H,se,ie,Q,,le,te])=>{const{column:fe,row:pe}=de,{height:ve,width:Ae}=H,{width:me}=se;if(Q===0&&(Y===0||me===0))return z1;if(Ae===0){const qe=dp(te,Y),pt=qe+Math.max(Q-1,0);return kV(B1(qe,pt,ie))}const oe=H1(me,Ae,fe);let j,R;le?K===0&&X===0&&Q>0?(j=0,R=Q-1):(j=oe*jl((K+pe)/(ve+pe)),R=oe*j1((X+pe)/(ve+pe))-1,R=kp(Y-1,Va(R,oe-1)),j=kp(R,Va(0,j))):(j=0,R=-1);const ne=B1(j,R,ie),{bottom:ce,top:xe}=W1(se,de,H,ne),Ce=j1(Y/oe),_e=Ce*ve+(Ce-1)*pe-ce;return{bottom:ce,itemHeight:ve,items:ne,itemWidth:Ae,offsetBottom:_e,offsetTop:xe,top:xe}})),k),Ie(ue(O,Me(Y=>Y!==null),be(Y=>Y.length)),I),Ie(ue(Vt(P,_,k,N),Me(([Y,K,{items:X}])=>X.length>0&&K.height!==0&&Y.height!==0),be(([Y,K,{items:X},de])=>{const{bottom:H,top:se}=W1(Y,de,K,X);return[se,H]}),xt(Aa)),t);const G=he(!1);Ie(ue(c,He(G),be(([Y,K])=>K||Y!==0)),G);const W=fn(ue(Vt(k,I),Me(([{items:Y}])=>Y.length>0),He(G),Me(([[Y,K],X])=>{const de=Y.items[Y.items.length-1].index===K-1;return(X||Y.bottom>0&&Y.itemHeight>0&&Y.offsetBottom===0&&Y.items.length===K)&&de}),be(([[,Y]])=>Y-1),xt())),J=fn(ue(De(k),Me(({items:Y})=>Y.length>0&&Y[0].index===0),Xn(0),xt())),re=fn(ue(De(k),He(C),Me(([{items:Y},K])=>Y.length>0&&!K),be(([{items:Y}])=>({endIndex:Y[Y.length-1].index,startIndex:Y[0].index})),xt(c1),mr(0)));Ie(re,p.scrollSeekRangeChanged),Ie(ue(F,He(P,_,I,N),be(([Y,K,X,de,H])=>{const se=m1(Y),{align:ie,behavior:Q,offset:le}=se;let te=se.index;te==="LAST"&&(te=de-1),te=Va(0,te,kp(de-1,te));let fe=Cp(K,H,X,te);return ie==="end"?fe=R1(fe-K.height+X.height):ie==="center"&&(fe=R1(fe-K.height/2+X.height/2)),le&&(fe+=le),{behavior:Q,top:fe}})),l);const ee=Qt(ue(k,be(Y=>Y.offsetBottom+Y.bottom)),0);return Ie(ue(E,be(Y=>({height:Y.visibleHeight,width:Y.visibleWidth}))),P),{customScrollParent:m,data:O,deviation:D,footerHeight:o,gap:N,headerHeight:i,increaseViewportBy:e,initialItemCount:w,itemDimensions:_,overscan:n,restoreStateFrom:M,scrollBy:a,scrollContainerState:s,scrollHeight:V,scrollTo:l,scrollToIndex:F,scrollTop:c,smoothScrollTargetReached:u,totalCount:I,useWindowScroll:y,viewportDimensions:P,windowScrollContainerState:x,windowScrollTo:b,windowViewportRect:E,...p,gridState:k,horizontalDirection:q,initialTopMostItemIndex:L,totalListHeight:ee,...f,endReached:W,propsReady:h,rangeChanged:re,startReached:J,stateChanged:z,stateRestoreInProgress:C,...T}},bt(fp,tn,Na,I1,Vr,hp,Lr));function H1(e,t,n){return Va(1,jl((e+n)/(jl(t)+n)))}function W1(e,t,n,r){const{height:o}=n;if(o===void 0||r.length===0)return{bottom:0,top:0};const i=Cp(e,t,n,r[0].index);return{bottom:Cp(e,t,n,r[r.length-1].index)+o,top:i}}function Cp(e,t,n,r){const o=H1(e.width,n.width,t.column),i=jl(r/o),a=i*n.height+Va(0,i-1)*t.row;return a>0?a+t.row:a}const AV=Qe(()=>{const e=he(d=>`Item ${d}`),t=he({}),n=he(null),r=he("virtuoso-grid-item"),o=he("virtuoso-grid-list"),i=he(bp),a=he("div"),s=he(di),l=(d,f=null)=>Qt(ue(t,be(p=>p[d]),xt()),f),c=he(!1),u=he(!1);return Ie(De(u),c),{components:t,computeItemKey:i,context:n,FooterComponent:l("Footer"),HeaderComponent:l("Header"),headerFooterTag:a,itemClassName:r,ItemComponent:l("Item","div"),itemContent:e,listClassName:o,ListComponent:l("List","div"),readyStateChanged:c,reportReadyState:u,ScrollerComponent:l("Scroller","div"),scrollerRef:s,ScrollSeekPlaceholder:l("ScrollSeekPlaceholder","div")}}),PV=Qe(([e,t])=>({...e,...t}),bt(IV,AV)),OV=S.memo(function(){const e=Et("gridState"),t=Et("listClassName"),n=Et("itemClassName"),r=Et("itemContent"),o=Et("computeItemKey"),i=Et("isSeeking"),a=wn("scrollHeight"),s=Et("ItemComponent"),l=Et("ListComponent"),c=Et("ScrollSeekPlaceholder"),u=Et("context"),d=wn("itemDimensions"),f=wn("gap"),p=Et("log"),v=Et("stateRestoreInProgress"),h=wn("reportReadyState"),m=Jn(S.useMemo(()=>y=>{const x=y.parentElement.parentElement.scrollHeight;a(x);const b=y.firstChild;if(b){const{height:E,width:T}=b.getBoundingClientRect();d({height:E,width:T})}f({column:U1("column-gap",getComputedStyle(y).columnGap,p),row:U1("row-gap",getComputedStyle(y).rowGap,p)})},[a,d,f,p]),!0,!1);return _1(()=>{e.itemHeight>0&&e.itemWidth>0&&h(!0)},[e]),v?null:g.jsx(l,{className:t,ref:m,...wt(l,u),"data-testid":"virtuoso-item-list",style:{paddingBottom:e.offsetBottom,paddingTop:e.offsetTop},children:e.items.map(y=>{const x=o(y.index,y.data,u);return i?g.jsx(c,{...wt(c,u),height:e.itemHeight,index:y.index,width:e.itemWidth},x):S.createElement(s,{...wt(s,u),className:n,"data-index":y.index,key:x},r(y.index,y.data,u))})})}),_V=S.memo(function(){const e=Et("HeaderComponent"),t=wn("headerHeight"),n=Et("headerFooterTag"),r=Jn(S.useMemo(()=>i=>{t(Vn(i,"height"))},[t]),!0,!1),o=Et("context");return e?g.jsx(n,{ref:r,children:g.jsx(e,{...wt(e,o)})}):null}),MV=S.memo(function(){const e=Et("FooterComponent"),t=wn("footerHeight"),n=Et("headerFooterTag"),r=Jn(S.useMemo(()=>i=>{t(Vn(i,"height"))},[t]),!0,!1),o=Et("context");return e?g.jsx(n,{ref:r,children:g.jsx(e,{...wt(e,o)})}):null}),DV=({children:e})=>{const t=S.useContext(O1),n=wn("itemDimensions"),r=wn("viewportDimensions"),o=Jn(S.useMemo(()=>i=>{r(i.getBoundingClientRect())},[r]),!0,!1);return S.useEffect(()=>{t&&(r({height:t.viewportHeight,width:t.viewportWidth}),n({height:t.itemHeight,width:t.itemWidth}))},[t,r,n]),g.jsx("div",{ref:o,style:hi(!1),children:e})},NV=({children:e})=>{const t=S.useContext(O1),n=wn("windowViewportRect"),r=wn("itemDimensions"),o=Et("customScrollParent"),i=np(n,o,!1);return S.useEffect(()=>{t&&(r({height:t.itemHeight,width:t.itemWidth}),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:t.viewportWidth}))},[t,n,r]),g.jsx("div",{ref:i,style:hi(!1),children:e})},FV=S.memo(function({...e}){const t=Et("useWindowScroll"),n=Et("customScrollParent"),r=n||t?VV:LV,o=n||t?NV:DV,i=Et("context");return g.jsx(r,{...e,...wt(r,i),children:g.jsxs(o,{children:[g.jsx(_V,{}),g.jsx(OV,{}),g.jsx(MV,{})]})})}),{useEmitter:q1,useEmitterValue:Et,usePublisher:wn}=mp(PV,{optional:{context:"context",totalCount:"totalCount",overscan:"overscan",itemContent:"itemContent",components:"components",computeItemKey:"computeItemKey",data:"data",initialItemCount:"initialItemCount",scrollSeekConfiguration:"scrollSeekConfiguration",headerFooterTag:"headerFooterTag",listClassName:"listClassName",itemClassName:"itemClassName",useWindowScroll:"useWindowScroll",customScrollParent:"customScrollParent",scrollerRef:"scrollerRef",logLevel:"logLevel",restoreStateFrom:"restoreStateFrom",initialTopMostItemIndex:"initialTopMostItemIndex",increaseViewportBy:"increaseViewportBy"},methods:{scrollTo:"scrollTo",scrollBy:"scrollBy",scrollToIndex:"scrollToIndex"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",stateChanged:"stateChanged",readyStateChanged:"readyStateChanged"}},FV),LV=xp({useEmitter:q1,useEmitterValue:Et,usePublisher:wn}),VV=wp({useEmitter:q1,useEmitterValue:Et,usePublisher:wn});function U1(e,t,n){return t!=="normal"&&!(t!=null&&t.endsWith("px"))&&n(`${e} was not resolved to pixel value correctly`,t,sn.WARN),t==="normal"?0:parseInt(t??"0",10)}const G1=e=>{const t=e.Icon??Pg,n=Pt();return g.jsxs("div",{className:"flex flex-col gap-4 justify-center items-center py-12 px-8 w-full",children:[g.jsx(t,{size:64,className:"text-disabled"}),g.jsx("p",{className:"text-disabled",children:e.message??n.emptyDataMessage})]})},Ip=g.jsx("div",{className:"w-10/12 h-6 rounded-sm animate-pulse bg-muted"}),$a=e=>g.jsx(ln,{...e,as:e.as||"span",className:Oe("block rounded-sm h-8 w-32 animate-pulse bg-muted",e.className)});function $V(e,t){if(!e||!t)return[];const n=[1];if(e===1&&t===1)return n;e>4&&n.push("-");const r=2,o=e-r,i=e+r;for(let s=o>2?o:2;s<=Math.min(t,i);s++)n.push(s);const a=t-2;return i+1!==a&&i+1<t&&n.push("_"),i<t&&(n.push(t-2),n.push(t-1),n.push(t)),Array.from(new Set(n))}const zV=e=>{const t=S.useId(),n=Pt(),r=S.useMemo(()=>$V(e.current,e.pages),[e.current,e.pages]),o=e.current<e.pages;return g.jsxs("footer",{className:"flex flex-wrap items-center justify-center gap-4 p-3 border-t-muted text-sm lg:flex-nowrap lg:justify-between",children:[g.jsx("p",{children:g.jsx(n.tablePaginationFooter,{...e,sizes:e.sizes,select:e.onChangeSize&&Array.isArray(e.sizes)?g.jsxs(S.Fragment,{children:[g.jsx("label",{htmlFor:t,children:n.tablePaginationSelectLabel}),g.jsx("select",{id:t,value:e.size,className:"cursor-pointer bg-transparent",onChange:i=>{e.onChangeSize?.(Number(i.target.value))},children:e.sizes.map(i=>g.jsx("option",{value:i,children:i},`pagination-opt-${i}`))})," "]}):null})}),g.jsx("nav",{children:g.jsxs("ul",{className:"flex items-center gap-2",children:[e.current>1?g.jsx("li",{children:g.jsx(ln,{as:e.asLink||"button",href:"previous",className:"",children:n.tablePaginationPrevious})}):null,r.map(i=>i===null?null:g.jsx(S.Fragment,{children:typeof i=="string"?g.jsx("li",{children:"..."}):g.jsx("li",{children:g.jsx(ln,{href:i,as:e.asLink||"button",className:`cursor-pointer border-b-2 px-3 py-1 proportional-nums transition-colors hover:border-primary-subtle hover:text-primary-subtle ${i===e.current?"border-primary text-primary":"border-transparent"}`,children:i})})},`pagination-${i}`)),o?g.jsx("li",{children:g.jsx(ln,{as:e.asLink||"button",href:"next",className:"",children:n.tablePaginationNext})}):null]})})]})},jV=e=>{const t=S.useRef(null),n=S.useRef(null),[r,o]=S.useState("opacity-0"),i=r==="opacity-0",a=()=>o("opacity-0"),s=()=>{const c=n.current,u=t.current;c===null||u===null||(u.style.left=`-${c.getBoundingClientRect().width+4}px`)},l=()=>o("opacity-100");return S.useEffect(()=>{const c=n.current;if(c===null||parent===null)return;s();const u=new IntersectionObserver(d=>d.forEach(s),{root:document.documentElement});return u.observe(c),()=>u.disconnect()},[]),g.jsx("div",{ref:t,onMouseEnter:l,onMouseLeave:a,"data-component":"cell-aside",inert:i?!0:void 0,tabIndex:i?-1:void 0,className:`group-table-cell-aside absolute inset-0 top-0 flex h-full w-full items-stretch transition-opacity duration-300 ease-in-out ${r}`,children:g.jsx("div",{ref:n,className:"block isolate",children:e.children})})},RV=(e,t,n)=>{const r=n.cols,o=n.loading;return g.jsx(S.Fragment,{children:r.map((i,a)=>{const s=`${a},${e}`,l=Ju(t,i.id),c=i.Element,u=i.cellProps?.className||"",d=a===0&&n.Aside&&o===!1,f=n.Aside;return S.createElement("td",{...i.cellProps,role:"cell","data-matrix":s,key:`accessor-${e}-${a}`,className:`typography group-table-cell p-(--table-cell-padding) whitespace-pre-wrap flex flex-col md:table-cell border-b border md:border-l-transparent md:border-b-0 border-y border-collapse border-table-border md:border-r md:last:border-r-transparent ${u}`},d?g.jsx(jV,{children:g.jsx(f,{col:i,row:t,rowIndex:e})}):null,g.jsx("span",{className:"block text-sm font-bold leading-tight md:hidden",children:i.thead}),g.jsx("span",{className:"relative",children:o?Ip:c?g.jsx(S.Fragment,{children:g.jsx(c,{row:t,matrix:s,col:i,rowIndex:e,value:l})}):g.jsx(S.Fragment,{children:Re.nil(l)?"":l})}))})})},mi=e=>{const t=S.useId(),[n,r]=S.useState(e.open);S.useEffect(()=>r(e.open),[e.open]);const o=S.useRef(null),i=S.useMemo(()=>[$o(10),Ds({fallbackAxisSideDirection:"end"}),Ms(),Bu({padding:5,element:o})],[e.arrow]),{refs:a,floatingStyles:s,context:l}=Gn({open:n,middleware:i,transform:!0,whileElementsMounted:Jr,onOpenChange:(v,h)=>{const m=h?.relatedTarget;m&&m.dataset.floating==="true"&&!v||(r(v),e.onChange?.(v))}}),c=jo(l),u=kr(l),d=fr(l,{role:"tooltip"}),{getReferenceProps:f,getFloatingProps:p}=Yn([c,u,d]);return g.jsxs(S.Fragment,{children:[g.jsx("button",{ref:a.setReference,...f(e.buttonProps),type:"button",children:e.trigger}),n&&g.jsx(dr,{preserveTabOrder:!0,id:`${t}-portal`,children:g.jsx(no,{guards:!0,restoreFocus:!0,returnFocus:!0,visuallyHiddenDismiss:!0,context:l,modal:!1,children:g.jsxs("div",{className:"relative p-4 rounded-lg border isolate z-floating min-w-96 border-floating-border bg-floating-background shadow-shadow-floating",ref:a.setFloating,"aria-labelledby":t,style:s,...p(),children:[g.jsx(Hu,{ref:o,context:l,strokeWidth:.1,className:"fill-floating-background stroke-floating-border"}),g.jsx("header",{className:"mb-2",children:g.jsx("h3",{className:"text-2xl font-medium tracking-wide leading-snug text-left",children:e.title})}),e.children]})})})]})};var Ap={},Y1;function BV(){return Y1||(Y1=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=(m,y)=>{try{Object.keys(m).forEach(y)}catch(x){window.console.log(x)}},n=m=>m==null,r=m=>{const y=typeof m;return y==="string"||y==="number"||y==="boolean"||n(m)},o=(m,y)=>{const x=y.getItem(m);try{return JSON.parse(x)}catch{return x??null}},i=m=>Object.keys(m).reduce((y,x)=>({...y,[x]:o(x,m)}),{}),a=m=>m instanceof Date?m:typeof m=="number"?new Date(new Date*1+m*864e5):m,s="1969-12-31T23:59:59.000Z",l=()=>document.cookie===""?{}:document.cookie.split("; ").map(m=>m.split("=")).reduce((m,y)=>(m[decodeURIComponent(y[0].trim())]=decodeURIComponent(y[1].trim()),m),{}),c=new Set,u=()=>{const m=l();c.forEach(y=>y(m))},d=[{name:"expires",parse:m=>`expires=${a(m.expires??s)}`},{name:"maxAge",parse:m=>m.maxAge?`max-age=${a(m.expires??s)}`:""},{name:"path",parse:m=>`path=${m.path??"/"}`},{name:"sameSite",parse:m=>`samesite=${m.sameSite??"strict"}`},{name:"useSecure",parse:m=>`${m.useSecure??!0?"secure":""}`},{name:"domain",parse:m=>{const y=m.domain??"";return y===""?"":`domain=${m.multiDomain?".":""}${y}`}},{name:"partitioned",parse:m=>m.partitioned?"Partitioned":""}],f={json:l,listener:m=>(c.add(m),()=>c.delete(m)),clearListeners:()=>c.clear(),has:m=>document.cookie.split(";").some(y=>y.trim().startsWith(`${m}=`)),deleteAll:()=>{document.cookie.split(";").forEach(m=>{document.cookie=m.replace(/^ +/,"").replace(/=.*/,`=;expires=${new Date().toUTCString()};path=/`)}),u()},get:m=>{const y=f.json()[m];if(n(y))return null;try{return JSON.parse(decodeURIComponent(y))}catch{return y}},delete:m=>{document.cookie=`${encodeURIComponent(m)}=;expires=${new Date().toUTCString()}`,u()},set:(m,y,x={})=>{const b=r(y)?y:encodeURIComponent(JSON.stringify(y)),E=d.reduce((T,I)=>{const w=I.parse(x);return w===""?T:T.concat(w)},[`${encodeURIComponent(m)}=${b}`]).join(";");document.cookie=E,u()}},p=m=>{const y=new Set,x=b=>{m().removeItem(b);const E=i(m());y.forEach(T=>T(E))};return{delete:x,listener:b=>(y.add(b),()=>y.delete(b)),clearListeners:()=>y.clear(),json:(b=!1)=>b?i(m()):m(),has:b=>{const E=m().getItem(b);return!n(E)},deleteAll:()=>{t(m(),x),y.forEach(b=>b(m()))},get:b=>o(b,m()),set:(b,E)=>{m().setItem(b,JSON.stringify(E)),y.forEach(T=>T(m()))}}},v=p(()=>window.sessionStorage),h=p(()=>window.localStorage);e.Cookie=f,e.LocalStorage=h,e.SessionStorage=v,e.createStorage=p})(Ap)),Ap}var za=BV();const Pp=e=>e.headerLabel??e.thead??e.id,Op=e=>e.map(t=>({value:t.id,label:t.thead??t.headerLabel??t.id}));var gi=(e=>(e.Boolean="boolean",e.Number="number",e.Select="select",e.Text="text",e))(gi||{});const _p=e=>e.type==="number"?e.valueAsNumber:e.value,HV=e=>{let t=[];return e({add:(a,s,l)=>t.push({...l,id:a,thead:s}),remove:a=>t=t.filter(s=>s.id!==a),getAll:()=>Array.from(t),filter:a=>t=Array.from(t.filter(a))}),t},WV={},qV=(e,t)=>{if(!Array.isArray(t))return e;const n=new Set(t.map(o=>o.id));if(!e.every(o=>n.has(o.id)))return e;const r=new Map(e.map(o=>[o.id,o]));return t.map((o,i)=>{const a=r.get(o.id);return a===void 0?e[i]:a})},UV=(e,t,n=WV)=>{const r=Cr()?null:za.LocalStorage.get(`@components/table-${e}`)||null,[o,i]=Yf({name:e,groups:n.groups||r?.groups||[],sorters:n.sorters||r?.sorters||[],filters:n.filters||r?.filters||[],cols:qV(t,r?.cols)},a=>{const s=l=>{const c=a.state(),u={...c,...l};return Cr()||za.LocalStorage.set(`@components/table-${c.name}`,u),u};return s(a.state()),{set:l=>s(l)}});return{...o,...i,name:e}},GV=e=>{const t=Pr(e),n=S.useRef(null),r=S.useCallback(o=>{t.current(o),o.forEach(i=>{const a=n.current.querySelector(`th[data-tableheader="${i.id}"]`);a&&(a.style.width="auto")})},[t]);return[n,r]},YV=()=>Cr()?void 0:document.querySelector('[data-component="modal-body"]'),KV=e=>(t,n)=>e.reduce((r,o)=>{const i=o.type==="desc"?-1:1,a=o.value,s=t[a]>n[a]?i:t[a]<n[a]?-i:0;return r!==0?r:s},0),ZV=(e,t)=>e.toSorted(KV(t)),K1=(e,t,n)=>({label:t,id:Bo(),type:n,value:e.id}),XV=e=>{const t=Pt(),n={asc:{label:t.tableSortAsc,value:"asc"},desc:{label:t.tableSortDesc,value:"desc"}},r=[n.asc,n.desc],o=()=>{const l=e.cols[0];l&&e.set(c=>[...c,K1(l,n.asc.label,n.asc.value)])},i=l=>c=>{const u=c.target.value;e.set(d=>d.map(f=>f.id===l?{...f,value:u}:f))},a=l=>c=>{const u=c.target.value;e.set(d=>d.map(f=>f.id===l?{...f,type:u}:f))},s=l=>{const c=l.currentTarget.dataset.id||"";e.set(u=>u.filter(d=>d.id!==c))};return g.jsx(S.Fragment,{children:g.jsx(mi,{title:t.tableSortDropdownTitle,trigger:g.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[g.jsx(kg,{size:14}),t.tableSortOrderByLabel," ",e.sorters.length===0?"":` (${e.sorters.length})`]}),children:g.jsxs("ul",{className:"mt-4 space-y-2",children:[e.sorters.map(l=>g.jsxs("li",{className:"flex flex-nowrap gap-3",children:[g.jsx(oo,{options:e.options,value:l.value,onChange:i(l.id),title:t.tableSortOrderInputTitle,placeholder:t.tableSortOrderInputPlaceholder}),g.jsx(oo,{onChange:a(l.id),value:l.type,options:r,title:t.tableSortTypeInputTitle,placeholder:t.tableSortTypeInputPlaceholder}),g.jsx("button",{className:"mt-4","data-id":l.id,onClick:s,children:g.jsx(ss,{className:"text-danger",size:14})})]},`sorter-select-${l.id}`)),g.jsx("li",{children:g.jsxs("button",{type:"button",onClick:o,className:"text-primary flex items-center gap-1",children:[g.jsx(xu,{size:14})," ",t.tableSortAddButton]})})]})})})},QV=e=>{const t=Pt(),[n,r]=S.useState(()=>{const s=e.sorters.find(l=>l.value===e.col.id);return s?s.type:"undefined"}),o=()=>r(s=>s==="undefined"?"asc":s==="asc"?"desc":"undefined");S.useEffect(()=>{e.setSorters(s=>{if(n==="undefined")return s.filter(u=>u.value!==e.col.id);const l=s.findIndex(u=>u.value===e.col.id),c=K1(e.col,n,n);return l===-1?[...s,c]:(s[l]=c,[...s])})},[n,e.col]);const i=`${e.col.id}-sorter-id`,a=Pp(e.col);return g.jsxs("button",{"aria-labelledby":i,className:"isolate flex items-center",onClick:o,type:"button",children:[g.jsxs("span",{id:i,className:"sr-only",children:[t.tableSortDropdownTitle," ",a]}),n==="asc"?g.jsx(qC,{size:14}):null,n==="desc"?g.jsx(WC,{size:14}):null,n==="undefined"?g.jsx(kg,{size:14}):null]})},Z1=S.createContext({}),JV=Z1.Provider,e$=()=>S.useContext(Z1),Mp=(e,t,n,r={})=>{const o=e.id,i=e.type??gi.Text,a=t[i]??[],s=a.find(c=>c["data-default"])?.value??a[0]?.value,l=n[s];return{id:Bo(),operation:l,label:Pp(e),name:o,type:i,value:"",...r}},Dp=()=>{const e=Pt(),t=S.useMemo(()=>({contains:{value:"contains",label:e.tableFilterTypeContains,symbol:"includes","data-default":"true"},is:{value:"is",label:e.tableFilterTypeIs,symbol:"is"},isNot:{value:"isNot",label:e.tableFilterTypeIsNot,symbol:"!=="},notContains:{value:"notContains",label:e.tableFilterTypeNotContains,symbol:"notIncludes"},lessThan:{value:"lessThan",label:e.tableFilterTypeLessThan,symbol:"<="},greaterThan:{value:"greaterThan",label:e.tableFilterTypeGreaterThan,symbol:">="},startsWith:{value:"startsWith",label:e.tableFilterTypeStartsWith,symbol:"startsWith"},endsWith:{value:"endsWith",label:e.tableFilterTypeEndsWith,symbol:"endsWith"}}),[e]);return{options:S.useMemo(()=>({[gi.Text]:[t.is,t.isNot,t.contains,t.notContains,t.startsWith,t.endsWith],[gi.Boolean]:[t.is,t.isNot],[gi.Number]:[t.is,t.isNot,t.greaterThan,t.lessThan]}),[t]),operations:t}},t$=e=>{const t=Pt(),n=Dp(),r=()=>{const l=e.cols.at(0);e.set(c=>[...c,Mp(l,n.options,n.operations)])},o=l=>{const c=l.target.dataset.id||"",u=l.target.value;e.set(d=>d.map(f=>{if(c!==f.id)return f;const p=e.cols.find(v=>u===v.id);return Mp(p,n.options,n.operations,{value:""})}))},i=l=>{const c=l.target.dataset.id||"",u=l.target.value;e.set(d=>d.map(f=>f.id===c?{...f,operation:n.operations[u]}:f))},a=l=>{const c=l.currentTarget.dataset.id||"";e.set(u=>u.filter(d=>d.id!==c))},s=l=>{const c=l.target.dataset.id||"",u=_p(l.target);e.set(d=>d.map(f=>f.id===c?{...f,value:u}:f))};return g.jsx(S.Fragment,{children:g.jsx(mi,{arrow:!0,title:t.tableFilterDropdownTitle,trigger:g.jsxs("span",{className:"flex gap-1 items-center proportional-nums",children:[g.jsx(tI,{size:14}),t.tableFilterLabel," ",e.filters.length===0?"":` (${e.filters.length})`]}),children:g.jsxs("ul",{className:"mt-4 space-y-2",children:[e.filters.map(l=>{const c=n.options[l.type];return g.jsxs("li",{className:"flex flex-nowrap gap-3",children:[g.jsx(oo,{options:e.options,title:t.tableFilterColumnTitle,placeholder:t.tableFilterColumnPlaceholder,value:l.name,"data-id":l.id,onChange:o}),g.jsx(oo,{"data-id":l.id,onChange:i,value:l.operation.value,options:c,title:t.tableFilterOperatorTitle,placeholder:t.tableFilterOperatorPlaceholder}),g.jsx(Wo,{optionalText:"","data-id":l.id,onChange:s,value:l.value,type:l.type,title:t.tableFilterValueTitle,placeholder:t.tableFilterValuePlaceholder}),g.jsx("div",{className:"flex justify-center items-center mt-5",children:g.jsx("button",{"data-id":l.id,type:"button",onClick:a,children:g.jsx(ss,{className:"text-danger",size:16})})})]},`filter-select-${l.id}`)}),g.jsx("li",{children:g.jsxs("button",{type:"button",onClick:r,className:"flex gap-1 items-center text-primary",children:[g.jsx(xu,{size:14})," ",t.tableFilterNewFilter]})})]})})})},n$=({filter:e,onDelete:t,set:n})=>{const r=Pt(),o=Dp(),i=s=>{const l=s.target.value,c=s.target.dataset.id||"";n(u=>u.map(d=>d.id===c?{...d,operation:o.operations[l]}:d))},a=s=>{const l=s.target.dataset.id||"",c=_p(s.target);n(u=>u.map(d=>d.id===l?{...d,value:c}:d))};return g.jsxs("div",{className:"flex flex-nowrap gap-4 items-center py-2",children:[g.jsx(oo,{"data-id":e.id,onChange:i,value:e.operation.value,options:o.options[e.type],title:r.tableFilterColumnTitle,placeholder:r.tableFilterColumnPlaceholder}),g.jsx(Wo,{optionalText:" ","data-id":e.id,onChange:a,value:e.value,type:e.type,title:r.tableFilterValueTitle,placeholder:r.tableFilterValueTitle}),g.jsx("button",{onClick:t,"data-id":e.id,type:"button",className:"mt-4",children:g.jsx(ss,{className:"text-danger",size:14})})]})},r$={top:0,left:0,right:0,bottom:-1},o$=e=>{const t=Tu(),n=Pt(),r=e.filters.filter(h=>h.name===e.header.id),o=r.length>0,i=e.header.allowSort??t.table.sorters??!0,a=e.header.allowFilter??t.table.filters??!0,s=Dp(),l=o?rI:oI,c=S.useRef(null),u=h=>{const m=h.currentTarget.dataset.id||"";return e.setFilters(y=>y.filter(x=>x.id!==m))},d=S.useCallback(h=>{if(h===null)return;c.current=h;const m=new AbortController;return h.addEventListener("pointerdown",y=>{if(y.target.dataset.type==="resizer")return y.stopPropagation(),y.stopImmediatePropagation()},{signal:m.signal}),()=>m.abort()},[]),f=e.sorters.find(h=>e.header.id===h.value),p=f?.type?f.type===Yw.Asc?"ascending":"descending":"none",v=Pp(e.header);return g.jsxs(kw,{...e.header.thProps,as:"th",ref:d,initial:!1,dragSnapToOrigin:!0,dragDirectionLock:!0,role:"columnheader","aria-sort":p,value:e.header,"aria-busy":e.loading,"data-tableheader":e.header.id,whileDrag:{cursor:"grabbing"},className:`relative md:h-14 typography min-w-0 cursor-grab font-medium ${e.header.thProps?.className??""}`,children:[g.jsx("span",{className:`flex h-full items-center justify-between bg-table-header p-(--table-cell-padding) ${e.isLast?"rounded-tr-lg":""} ${e.index===0?"rounded-tl-lg":""}`,children:g.jsxs("span",{className:"flex gap-1 items-center",children:[e.inlineFilter&&a?g.jsx(mi,{arrow:!0,trigger:g.jsxs("span",{children:[g.jsxs("span",{id:`${e.header.id}-filter-dropdown-button`,className:"sr-only",children:[n.tableFilterDropdownTitleUnique," ",v]}),g.jsx(l,{"aria-labelledby":`${e.header.id}-filter-dropdown-button`,size:14})]}),title:g.jsxs("span",{className:"text-lg",children:[n.tableFilterDropdownTitleUnique," ",g.jsx("span",{className:"font-medium",children:v})]}),children:g.jsxs("ul",{className:"font-medium",children:[r.length===0?null:g.jsx(S.Fragment,{children:r.map(h=>g.jsx("li",{className:"my-1",children:g.jsx(n$,{onDelete:u,filter:h,set:e.setFilters})},`thead-filter-${h.id}`))}),g.jsx("li",{children:g.jsxs("button",{type:"button",className:"flex gap-1 items-center text-primary",onClick:()=>e.setFilters(h=>h.concat(Mp(e.header,s.options,s.operations))),children:[g.jsx(xu,{size:14})," ",n.tableFilterNewFilter]})})]})}):null,g.jsx("span",{className:"text-base pointer-events-auto text-balance",children:e.header.thead}),e.inlineSorter&&i?g.jsx(QV,{col:e.header,setSorters:e.setSorters,sorters:e.sorters}):null]})}),e.isLast?null:g.jsx(Be.button,{drag:"x",draggable:!0,dragListener:!0,dragMomentum:!0,type:"button",animate:!1,dragElastic:0,dragPropagation:!0,initial:!1,dragSnapToOrigin:!0,dragDirectionLock:!0,"data-type":"resizer",title:e.header.id,dragConstraints:r$,className:"block absolute top-0 h-full hover:w-1.5 active:w-1.5 -right-[0.5px] z-calendar w-px cursor-col-resize bg-transparent hover:bg-primary active:bg-primary",onClick:h=>{h.currentTarget.focus()},onKeyDown:h=>{if(h.key==="ArrowLeft"||h.key==="ArrowRight"){if(c.current===null)return;c.current.setAttribute("data-resized","true");const m=c.current.getBoundingClientRect().width,x=(h.shiftKey?50:10)*(h.key==="ArrowLeft"?-1:1);c.current.style.width=`${Math.abs(m+x)}px`}},onDoubleClick:()=>{c.current!==null&&(c.current.style.width="auto")},onDrag:(h,m)=>{if(c.current===null)return;c.current.setAttribute("data-resized","true");const y=c.current.getBoundingClientRect().width,x=m.delta.x;c.current.style.width=`${Math.abs(y+x)}px`}})]})},i$=e=>{const[t,n]=GV(e.setCols);return g.jsx(Sw,{layout:!0,as:"tr",axis:"x",drag:"x",ref:t,layoutRoot:!0,role:"row",layoutScroll:!0,onReorder:n,values:e.headers,children:g.jsx(Nn,{children:e.headers.map((r,o)=>g.jsx(o$,{index:o,header:r,filters:e.filters,loading:e.loading,sorters:e.sorters,setFilters:e.setFilters,setSorters:e.setSorters,inlineFilter:e.inlineFilter,inlineSorter:e.inlineSorter,isLast:o===e.headers.length-1},`header-child-item-${r.id}`))})})},a$=S.forwardRef(({context:e,className:t="",...n},r)=>g.jsx("tbody",{...n,role:"rowgroup",className:`divide-y divide-table-border ${t}`,ref:r,children:g.jsx(Nn,{children:n.children})})),s$=S.forwardRef(({context:e,className:t="",...n},r)=>g.jsx("table",{...n,role:"table",ref:r,style:{...n.style,"--table-cell-padding":"0.75rem"},className:`table w-full table-fixed border-spacing-0 border-separate text-left ${t??""}`})),l$=S.forwardRef(({context:e,...t},n)=>{const r=e$(),o={...t?.style,top:Re.number(r.sticky)?`${r.sticky}px`:void 0};return g.jsx("thead",{...t,ref:n,style:o,role:"rowgroup",className:"hidden top-0 bg-transparent md:table-header-group group:sticky"})}),c$=S.forwardRef(({context:e,item:t,...n},r)=>{const o=e?.getRowProps?.(t),i={...n,...o};return g.jsx("tr",{...i,role:"row",ref:r,className:`group-table-row pb-4 flex h-fit flex-col flex-wrap justify-center gap-1 md:table-row ${n?.className??""}`})}),u$=S.forwardRef((e,t)=>e.context.loadingMore?g.jsx("tfoot",{...e,ref:t,className:"bg-card-background",children:g.jsx("tr",{role:"row",className:"bg-card-background",children:g.jsx("td",{colSpan:999,className:"px-2 h-14 bg-card-background",children:g.jsx("span",{className:"block w-full h-2 rounded-sm opacity-60 animate-pulse bg-foreground"})})})}):null),d$={TableRow:c$,TableFoot:u$,TableHead:l$,Table:s$,TableBody:a$},f$=[0,0,0,0,0,0,0,0,0,0],p$=e=>g.jsx("div",{className:"flex justify-center items-center px-2 w-full h-48",children:e.loading?Ip:g.jsx(G1,{})}),h$=()=>g.jsx(S.Fragment,{}),m$=[],X1=({cols:e,filters:t,setCols:n,sorters:r,setFilters:o,setSorters:i,onScrollEnd:a,getScrollRef:s,pagination:l=null,useControl:c=!1,...u})=>{const d=S.useRef(null),[,f]=S.useState(!1),p=Pr(a),v=Pr(u.loadingMore),h=S.useMemo(()=>{if(u.loading)return f$;if(c)return u.rows;const x=new Kw(u.rows);return t.length>0&&t.forEach(b=>b.value===""||Number.isNaN(b.value)?void 0:x.Where(b.name,b.operation.symbol,b.value)),r.length===0?x.Select():ZV(x.Select(),r)},[u.loading,u.rows,c,t,r]);S.useEffect(()=>{if(d.current===null)return()=>{};const x=d.current,b=new IntersectionObserver(E=>E[E.length-1].isIntersecting&&v.current?(p.current?.(),void f(!0)):f(!1));return b.observe(x),()=>b.disconnect()},[v,p]);const m=h.length===0,y={cols:e,Aside:u.Aside,loading:u.loading,getRowProps:u.getRowProps,loadingMore:u.loadingMore};return g.jsxs("div",{className:"flex relative flex-col w-full whitespace-nowrap rounded-lg group",children:[g.jsx(TV,{components:d$,context:y,totalCount:h.length,itemContent:m?h$:RV,data:m?m$:h,useWindowScroll:!s,customScrollParent:s?s():void 0,fixedHeaderContent:()=>g.jsx(i$,{headers:e,filters:t,setCols:n,sorters:r,setFilters:o,setSorters:i,loading:!!u.loading,inlineFilter:u.inlineFilter,inlineSorter:u.inlineSorter})}),m?g.jsx(p$,{loading:u.loading}):null,g.jsx("div",{"aria-hidden":"true",ref:d,className:"w-full h-0.5"}),l!==null?g.jsx(zV,{...l}):null]})},g$=({item:e,onPointerDown:t})=>{const n=ho(0);return g.jsxs(kw,{onPointerDown:t,id:e.groupId,className:"flex flex-row items-center gap-2",value:e,style:{y:n},children:[g.jsx("button",{type:"button",className:"cursor-grab",children:g.jsx(eI,{size:14})}),g.jsx("span",{children:e.groupName})]},e.groupId)},v$=e=>{const t=Pt(),n=Op(e.cols),r=mF(),[o,i]=S.useState(e.groups[0]?.thead||""),a=l=>{const c=l.target,u=c.value,d=c.options.selectedIndex,f=c.options.item(d)?.label||"";i(f);const p=new Kw(e.rows).GroupBy(u),v=e.cols.find(h=>h.id===u);e.setGroups(Ik(p).map((h,m)=>{const y=p[h];return{...v,groupId:Bo(),groupKey:u,index:m,rows:y,groupName:h}}))},s=()=>e.setGroups([]);return g.jsx(S.Fragment,{children:g.jsxs(mi,{arrow:!1,title:t.tableGroupLabel,trigger:g.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[g.jsx(aI,{size:14}),t.tableGroupLabelWithCount,e.groups.length>0?` - ${o}(${e.groups.length})`:""]}),children:[g.jsxs("div",{className:"flex flex-nowrap items-center",children:[g.jsx(oo,{value:o,title:"Tipo de agrupamento",onChange:a,options:n,placeholder:"Agrupar por..."}),g.jsx(ro,{className:"mt-4",onClick:s,theme:"raw","data-id":o,children:g.jsx(ss,{size:16,className:"text-danger"})})]}),e.groups.length>0?g.jsxs("section",{className:"my-4",children:[g.jsx("header",{children:g.jsx("h2",{className:"text-xl font-medium",children:"Order groups"})}),g.jsx(BN,{children:g.jsx(Sw,{axis:"y",className:"relative space-y-2",drag:!0,dragControls:r,dragListener:!1,layoutScroll:!0,onReorder:e.setGroups,values:e.groups,children:e.groups.map(l=>g.jsx(g$,{item:l,onPointerDown:c=>{r.start(c),e.setGroups([...e.groups])}},l.groupId))})})]}):null]})})},y$=e=>g.jsx("header",{className:"mb-1 min-w-full",children:g.jsxs("div",{className:"flex flex-wrap gap-y-1 gap-x-4 justify-between items-center min-w-full",children:[g.jsxs("div",{className:"flex gap-4 py-2 whitespace-nowrap w-fit items-centeend",children:[g.jsx("span",{children:g.jsx(t$,{cols:e.cols,options:e.options,filters:e.filters,set:e.setFilters})}),g.jsx("span",{children:g.jsx(XV,{options:e.options,cols:e.cols,sorters:e.sorters,set:e.setSorters})}),g.jsx("span",{children:g.jsx(v$,{rows:e.rows,groups:e.groups,setGroups:e.setGroups,options:e.options,cols:e.cols})})]}),g.jsx("ul",{className:"flex flex-row flex-wrap flex-1 grow gap-4 items-center w-full md:justify-end",children:e.filters.map(t=>g.jsxs("li",{className:"flex gap-1 items-center py-0.5 px-4 rounded-xl border border-card-border",children:[g.jsxs("span",{children:[g.jsx("span",{className:"inline-block mr-2 rounded-full size-3 aspect-square bg-primary","aria-hidden":"true"}),t.label," ",t.operation.label.toLowerCase(),":"]}),g.jsxs("div",{className:"relative w-min min-w-[1ch]",children:[g.jsx("span",{"aria-hidden":"true",className:"invisible p-0 whitespace-pre",children:t.value||" "}),g.jsx("input",{type:t.type,value:t.value,className:"absolute left-0 top-0 m-0 inline-block w-full bg-transparent p-0 placeholder-primary/70 outline-hidden [appearance:textfield] empty:after:text-primary/70 [&::-webkit-inner-spin-button]:appearance-none [&::-webkit-outer-spin-button]:appearance-none",onChange:n=>{const r=_p(n.target);e.setFilters(o=>o.map(i=>t.id===i.id?{...i,value:r}:i))}})]})]},`filter-table-${t.id}`))})]})}),b$=(e,t)=>typeof t=="function"?t(e):t,Bl=(e,t,n)=>e===t?void 0:n?.(t),x$=e=>{const t=Tu(),n=S.useMemo(()=>({sticky:e.sticky===void 0?t.table.sticky??void 0:e.sticky??void 0}),[e.sticky,t.table.sticky]),r=e.operations??t.table.operations??!0,o=S.useMemo(()=>Op(e.cols),[e.cols]),[i,a]=Yf({cols:e.cols,sorters:e.sorters??[],groups:e.groups??[],filters:e.filters??[]},s=>{const l=c=>u=>{const d=s.state();return{...d,[c]:b$(d[c],u)}};return{cols:l("cols"),sorters:l("sorters"),groups:l("groups"),filters:l("filters")}},{postMiddleware:[(s,l)=>(e.set?.(s),Bl(l?.filters??[],s.filters??[],e.setFilters),Bl(l?.sorters??[],s.sorters??[],e.setSorters),Bl(l?.groups??[],s.groups??[],e.setGroups),Bl(l?.cols??[],s.cols??[],e.setCols),s)]});return S.useEffect(()=>{a.cols(e.cols)},[e.cols]),g.jsx(JV,{value:n,children:g.jsxs(Nn,{initial:!1,children:[r?g.jsx(y$,{cols:i.cols,rows:e.rows,options:o,groups:i.groups,filters:i.filters,setCols:a.cols,sorters:i.sorters,setGroups:a.groups,setFilters:a.filters,setSorters:a.sorters,pagination:e.pagination??null,inlineFilter:e.inlineFilter??!0,inlineSorter:e.inlineSorter??!0}):null,i.groups.length===0?g.jsx(X1,{...e,index:0,cols:i.cols,options:o,groups:i.groups,filters:i.filters,optionCols:o,setCols:a.cols,sorters:i.sorters,setGroups:a.groups,setFilters:a.filters,setSorters:a.sorters,onScrollEnd:e.onScrollEnd,pagination:e.pagination??null,inlineFilter:e.inlineFilter??!0,inlineSorter:e.inlineSorter??!0}):g.jsx("div",{className:"flex flex-wrap gap-4",children:i.groups.map((s,l)=>g.jsx("div",{className:"min-w-full",children:g.jsx(X1,{...e,group:s,index:l,cols:i.cols,pagination:null,rows:s.rows,options:o,groups:i.groups,filters:i.filters,optionCols:o,setCols:a.cols,sorters:i.sorters,setGroups:a.groups,setFilters:a.filters,setSorters:a.sorters,onScrollEnd:e.onScrollEnd,inlineFilter:e.inlineFilter??!0,inlineSorter:e.inlineSorter??!0})},`group-${s.groupId}`))})]})})},Hl=({title:e,loading:t,children:n,as:r,header:o=null,container:i="",titleClassName:a="",...s})=>g.jsxs(ln,{...s,as:r||"div","data-component":"card",className:Oe("flex shadow-shadow-card flex-col gap-4 rounded-card border border-card-border bg-card-background w-full py-4",i),children:[e?g.jsx("header",{"data-component":"card-title",className:Oe("mb-2 w-full border-b border-card-border px-6 pb-4 text-xl font-medium",a),children:e}):o,g.jsx("div",{"data-component":"card-body",className:Oe("min-w-full px-6",s.className),children:t?g.jsxs("div",{className:"flex flex-col gap-4",children:[g.jsx($a,{className:"w-full"}),g.jsx($a,{className:"w-8/12"}),g.jsx($a,{className:"w-10/12"}),g.jsx($a,{className:"w-1/2"})]}):n})]});Hl.Title=({as:e,titleTag:t,navTag:n,children:r,...o})=>{const i=e||"div",a=t||"h2",s=n||"nav";return g.jsxs(i,{...o,title:Re.string(o.title)?o.title:void 0,className:Oe("flex w-full flex-col flex-wrap items-start justify-between gap-base sm:flex-row sm:items-center",o.className),children:[g.jsx(a,{className:"font-semibold",children:o.title}),r?g.jsx(s,{className:"flex flex-col justify-start items-start sm:flex-row sm:justify-end sm:items-center gap-kilo",children:r}):null]})};const w$=e=>{const t=e.interactive??!0,n=e.Icon??bu;return g.jsx(Hl,{...e,title:null,loading:void 0,container:"px-0 py-0",className:"flex gap-4 items-center px-0",children:g.jsxs("div",{className:`flex w-full items-center gap-4 rounded-card px-0 lg:px-0 ${t?"transition-colors duration-300 ease-linear hover:bg-primary-hover/10":""}`,children:[g.jsx("div",{className:Oe("flex aspect-square h-[stretch] w-20 items-center justify-center rounded-l-card bg-primary p-4 text-primary-foreground",e.mark),children:g.jsx(n,{size:48})}),g.jsxs("div",{className:"flex flex-col gap-2 justify-center py-2",children:[g.jsx("p",{className:"text-lg",children:e.title}),e.loading?g.jsx($a,{className:"h-10"}):g.jsx("p",{className:"text-4xl font-bold tracking-wide",children:e.value})]})]})})},S$=({item:e,context:t,setter:n,get:r,refs:o})=>g.jsx(dr,{children:g.jsx(Mf,{reducedMotion:"user",transition:{type:"tween",stiffness:25,duration:.3},children:g.jsxs(Nn,{presenceAffectsLayout:!0,children:[e?g.jsx(Be.div,{exit:{opacity:0},animate:{opacity:1},initial:{opacity:0},className:"pointer-events-none fixed inset-0 top-0 z-overlay h-screen w-screen bg-floating-overlay/70"}):null,e?g.jsx(Ku,{lockScroll:!0,className:"absolute inset-0 z-floating flex items-center justify-center",children:g.jsx(no,{visuallyHiddenDismiss:!0,modal:!0,closeOnFocusOut:!0,context:t,children:g.jsxs(Be.div,{layout:!0,layoutId:`item-${e.id}`,className:"relative flex h-min w-min min-w-xs flex-col gap-4 rounded-card border border-card-border bg-card-background p-6 py-4 pb-8 shadow-shadow-card",ref:o.setFloating,...r(),children:[g.jsx("nav",{className:"absolute right-4 top-1 lg:right-2",children:g.jsx("button",{type:"button",onClick:n,className:"p-1 opacity-70 transition-colors hover:text-danger hover:opacity-100 focus:text-danger",children:g.jsx(Mo,{})})}),g.jsxs("header",{className:"flex w-full flex-wrap items-center justify-between gap-2",children:[g.jsx("h3",{className:"min-w-full text-balance text-2xl font-medium",children:e.title}),g.jsx("p",{className:"text-sm leading-snug text-secondary",children:e.description})]}),e.children]})})}):null]})})}),T$=e=>{const[t,n]=S.useState(null),r=S.useId(),{context:o,refs:i}=Gn({open:t!==null,transform:!0,onOpenChange:f=>f?void 0:n(null)}),a=jo(o),s=fr(o,{role:"dialog"}),l=kr(o,{escapeKey:!0,referencePress:!0,outsidePress:!0}),{getFloatingProps:c}=Yn([a,s,l]),u=S.useCallback(()=>{n(null)},[]),d=S.Children.toArray(e.children);return g.jsxs(S.Fragment,{children:[g.jsx(S$,{refs:i,context:o,get:c,item:t,setter:u}),g.jsx("ul",{role:"list",children:d.map((f,p)=>{const v=f.props,h=`${r}-${p}`,m=()=>n({...v,id:h}),y=v.leading;return g.jsx(Be.li,{layout:!0,layoutId:`item-${h}`,className:"border-b border-card-border py-2 last:border-transparent",children:g.jsx(Be.div,{layoutId:`toast-${h}`,className:"relative",children:g.jsx("div",{className:"relative flex items-start space-x-3",children:g.jsxs(S.Fragment,{children:[v.avatar?g.jsx("div",{children:g.jsx("div",{className:"relative px-1",children:g.jsx("button",{onClick:m,className:"flex size-10 items-center justify-center ring-primary",children:v.avatar})})}):null,g.jsx("div",{className:"min-w-0 flex-1 py-1 text-foreground",children:g.jsxs("div",{className:"flex flex-row flex-nowrap justify-between gap-4",children:[g.jsxs("button",{onClick:m,className:"cursor-pointer text-left transition-all ease-out hover:text-primary",children:[g.jsx("h3",{children:v.title}),g.jsx("p",{className:"text-sm leading-snug text-secondary",children:v.description})]}),y?g.jsx(y,{open:m}):null]})})]})})})},h)})})]})},E$=e=>g.jsx(S.Fragment,{children:e.children}),Q1=()=>{const e=S.useContext(Kr);return e?e.parser:ls.hsla},Np=.3,Wl={duration:Np,type:"tween",ease:"easeInOut"},J1=S.createContext(null),Fp={delay:.2,duration:.3,type:"tween",ease:"easeOut"},vi={initial:{pathLength:0,opacity:0},animate:{pathLength:1,opacity:1}},k$=e=>g.jsxs("svg",{...e,viewBox:"0 0 24 24",fill:"currentColor",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[g.jsx(Be.path,{className:"currentColor",initial:vi.initial,animate:vi.animate,transition:Fp,d:"M18 6 6 18"}),g.jsx(Be.path,{className:"currentColor",initial:vi.initial,animate:vi.animate,transition:Fp,d:"m6 6 12 12"})]}),C$=e=>g.jsx("svg",{...e,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:3,children:g.jsx(Be.path,{d:"M5 13l4 4L19 7",strokeLinecap:"round",strokeLinejoin:"round",animate:vi.animate,initial:vi.initial,transition:Fp})}),I$={complete:{scale:1.25},active:{scale:1,transition:{delay:0,duration:.3}}},A$={duration:.6,delay:.2,type:"tween",ease:"circOut"},P$=(e,t,n)=>n==="error"?"error":t===e?"active":t<e?"inactive":"complete",O$=(e,t,n,r)=>t===n?0:t>n?e<=n||e>t?0:(e-n)/(t-n)*r:e<=t||e>n?0:(n-e)/(n-t)*r,eS=()=>S.useContext(J1),_$=({step:e,currentStep:t,status:n,title:r,titleClassName:o,...i})=>{const a=Q1(),s=eS(),[l,c]=S.useState(t);S.useEffect(()=>{if(!s){c(t);return}const d=O$(e,s.currentStep,s.previousStep,s.progressBarDuration);if(d===0){c(t);return}const f=setTimeout(()=>{c(t)},d*1e3);return()=>clearTimeout(f)},[t,s,e]);const u=P$(e,l,n);return s?.steps&&100/s?.steps,g.jsxs(S.Fragment,{children:[g.jsx("div",{className:`h-[2px] w-full xl:block bg-card-border hidden first:hidden ${u==="active"||u==="complete"?"bg-success":""}`}),g.jsxs(Be.button,{...i,type:"button","data-step":e,animate:u,className:"flex relative justify-center items-center w-auto text-center",children:[g.jsx(Be.div,{variants:I$,transition:A$,className:`hidden xl:block absolute inset-0 rounded-full text-center ${u==="error"?"bg-danger":""}`}),g.jsx(Be.div,{initial:!1,animate:u,transition:Wl,className:"flex relative justify-center items-center font-semibold rounded-full size-10 aspect-square",variants:{error:{color:a("var(--danger-foreground)"),borderColor:a("var(--danger-hover)"),backgroundColor:a("var(--danger-DEFAULT)")},inactive:{transition:Wl,color:a("var(--disabled)"),borderColor:a("var(--card-border)"),backgroundColor:a("var(--background)")},active:{transition:Wl,color:a("var(--primary-foreground)"),borderColor:a("var(--primary-DEFAULT)"),backgroundColor:a("var(--primary-DEFAULT)")},complete:{transition:Wl,color:a("var(--success-foreground)"),borderColor:a("var(--success-DEFAULT)"),backgroundColor:a("var(--success-DEFAULT)")}},children:g.jsx("div",{className:"flex justify-center items-center",children:u==="complete"?g.jsx(C$,{className:"size-6 text-primary-foreground"}):u==="error"?g.jsx(k$,{className:"size-6 text-danger-foreground"}):g.jsx(S.Fragment,{children:g.jsx("span",{children:e})})})}),g.jsx("header",{className:"flex flex-col justify-start items-start px-2",children:g.jsx("h3",{className:`h-full whitespace-nowrap flex items-center ${o}`,children:r})})]})]})},M$=e=>{const t=S.useRef(e.currentStep),[n,r]=S.useState(e.currentStep);S.useEffect(()=>{t.current=n;const i=setTimeout(()=>{r(e.currentStep)},Np*1e3);return()=>clearTimeout(i)},[e.currentStep,n]);const o={currentStep:e.currentStep,previousStep:t.current,progressBarDuration:Np,steps:S.Children.count(e.children)};return g.jsx(J1.Provider,{value:o,children:g.jsx("div",{className:"flex relative flex-col gap-4 justify-center items-start w-full lg:flex-row lg:justify-between lg:items-center",children:e.children})})},tS=(e,t)=>{const[n,r]=S.useState(()=>t||e);return S.useEffect(()=>{r(e)},[e]),[n,r]},nS={ArrowLeft:"ArrowLeft",ArrowRight:"ArrowRight"},rS=S.createContext(""),D$=e=>e.hasAttribute("disabled")||e.getAttribute("aria-disabled")==="true",Lp=(e,t,n)=>{const r=n==="forward"?1:-1,o=t+r;for(let i=o;i>=0&&i<e.length;i+=r){const a=e[i];if(!D$(a))return a}return n==="backward"?Lp(e,e.length-1,"backward"):Lp(e,-1,"forward")},oS=(e,t)=>{const n=Array.from(e.querySelectorAll("li")),r=n.findIndex(i=>i.dataset.active==="true");if(r===-1)return null;const o=Lp(n,r,t);return o===null?null:(o.querySelector("button")?.focus({preventScroll:!1}),o.getAttribute("data-id")||"")},iS={[nS.ArrowLeft]:(e,t)=>oS(t,"backward"),[nS.ArrowRight]:(e,t)=>oS(t,"forward")},N$=e=>{const[t,n]=tS(e.active),r=S.useRef(null),o=Pr(e.onChange);S.useEffect(()=>{const l=r.current;if(l===null)return;let c=l.querySelector("li[data-active=true]");if(c===null){c=l.querySelector("li[data-id]");const u=c.getAttribute("data-id")||"";n(u)}},[e.active,n]),S.useEffect(()=>{o.current&&o.current(t)},[o,t]);const i=S.Children.toArray(e.children),a=l=>{const c=l.currentTarget;n(c.dataset.id||"")},s=l=>{if(r.current===null)return;const c=l.key;if(Re.keyof(iS,c)){const u=iS[c],d=u(l,r.current);if(d===null)return;n(d)}};return g.jsx(rS.Provider,{value:t,children:g.jsx(Hl,{className:e.className,container:Oe("pt-0 max-w-full w-full min-w-0",e.container),header:g.jsxs("header",{className:"overflow-x-auto relative mb-2",children:[g.jsx("div",{className:"absolute bottom-0 w-full h-px bg-card-border"}),g.jsx("nav",{className:"min-w-0",children:g.jsx("ul",{onKeyDown:s,ref:r,className:"flex overflow-x-auto flex-1 justify-start w-0 min-w-full",children:i.map(l=>{const c=l.props,u=t===c.id;return g.jsx("li",{"data-id":c.id,"data-active":u,"aria-disabled":c.disabled,className:Oe("relative w-fit border-b border-transparent transition-all",u?"border-primary font-medium text-primary":"",c.disabled?"aria-disabled:text-disabled":""),children:g.jsx(ln,{as:"button",type:"button","data-id":c.id,"aria-current":"page",disabled:c.disabled,onClick:c.disabled?void 0:a,className:"block py-4 px-10 w-full whitespace-nowrap disabled:cursor-not-allowed",children:c.title})},`tab-header-${c.id}`)})})})]}),children:e.children})})},F$=()=>S.useContext(rS),L$=e=>{const t=F$();return g.jsx(S.Fragment,{children:e.id===t?e.children:null})},aS={true:{opacity:1,height:"auto"},false:{opacity:[.7,.3,0],height:0}},V$={type:"tween",duration:.7,ease:[.04,.62,.23,.98]},sS=e=>g.jsx(Be.div,{...e,layout:!0,layoutRoot:!0,layoutScroll:!0,initial:!1,variants:aS,exit:aS.false,transition:V$,"aria-hidden":!e.open,"data-component":"collapse",animate:e.open.toString(),className:Oe("aria-hidden:pointer-events-none",e.className),children:e.children}),$$=Io("p-4 w-full block border relative rounded-lg text-sm",{variants:{theme:{primary:"bg-alert-primary-bg text-alert-primary-text border-alert-primary-border",danger:"bg-alert-danger-bg text-alert-danger-text border-alert-danger-border",info:"bg-alert-info-bg text-alert-info-text border-alert-info-border",success:"bg-alert-success-bg text-alert-success-text border-alert-success-border",secondary:"bg-alert-secondary-bg text-alert-secondary-text border-alert-secondary-border",warn:"bg-alert-warn-bg text-alert-warn-text border-alert-warn-border",neutral:"bg-transparent border border-card-border text-alert-primary-text"}},defaultVariants:{theme:"neutral"}}),z$=S.forwardRef(function({className:t,theme:n,Icon:r,onClose:o,open:i=!0,...a},s){const l=()=>o?.(!1);return g.jsx(Nn,{presenceAffectsLayout:!0,propagate:!0,mode:"sync",children:i?g.jsx(Be.div,{"data-open":!!i,"aria-hidden":!i,"data-component":"alert",className:Oe("isolate w-full",i?"pointer-events-auto":"pointer-events-none"),children:g.jsx(sS,{"data-open":!!i,open:!!i,children:g.jsxs(ln,{...a,ref:s,role:"alert","data-theme":n,as:a.as??"div",className:Oe($$({theme:n}),t),children:[g.jsxs("h4",{className:"flex gap-2 items-center mb-2",children:[!r&&n==="success"?g.jsx(Cg,{"aria-hidden":"true",size:20}):null,!r&&n==="info"?g.jsx(bu,{"aria-hidden":"true",size:20}):null,!r&&n==="danger"?g.jsx(iI,{"aria-hidden":"true",size:20}):null,r,g.jsx("span",{className:"text-lg font-semibold tracking-3 text-balance",children:a.title})]}),a.children,o!==void 0&&i?g.jsx("button",{type:"button",onClick:l,className:"absolute top-3 right-3 transition-colors duration-300 ease-in-out text-foreground hover:text-danger",children:g.jsx(Mo,{size:20})}):null]})})}):null})}),j$=e=>g.jsxs("div",{className:"divide-y divide-card-border rounded-card border border-card-border bg-card-background shadow-shadow-card",children:[g.jsxs("header",{className:"flex items-start gap-4 p-6",children:[g.jsx("div",{className:Oe("flex aspect-square size-10 items-center justify-center rounded-card bg-primary p-8",e.iconContainer),children:g.jsx("div",{children:g.jsx(e.Icon,{className:"aspect-square size-10 text-primary-foreground"})})}),g.jsxs("div",{className:"flex flex-col gap-1",children:[g.jsx("header",{children:g.jsx("h3",{className:"text-base leading-none",children:e.title})}),g.jsx("p",{className:"text-4xl font-semibold",children:e.children})]})]}),e.footer?g.jsx("footer",{className:"px-6 py-2",children:e.footer}):null]}),R$=Symbol.for("react.lazy");function lS(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function B$(...e){return t=>{let n=!1;const r=e.map(o=>{const i=lS(o,t);return!n&&typeof i=="function"&&(n=!0),i});if(n)return()=>{for(let o=0;o<r.length;o++){const i=r[o];typeof i=="function"?i():lS(e[o],null)}}}}const ql=A[" use ".trim().toString()];function H$(e){return typeof e=="object"&&e!==null&&"then"in e}function cS(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===R$&&"_payload"in e&&H$(e._payload)}function W$(e){const t=q$(e),n=A.forwardRef((r,o)=>{let{children:i,...a}=r;cS(i)&&typeof ql=="function"&&(i=ql(i._payload));const s=A.Children.toArray(i),l=s.find(G$);if(l){const c=l.props.children,u=s.map(d=>d===l?A.Children.count(c)>1?A.Children.only(null):A.isValidElement(c)?c.props.children:null:d);return g.jsx(t,{...a,ref:o,children:A.isValidElement(c)?A.cloneElement(c,void 0,u):null})}return g.jsx(t,{...a,ref:o,children:i})});return n.displayName=`${e}.Slot`,n}const uS=W$("Slot");function q$(e){const t=A.forwardRef((n,r)=>{let{children:o,...i}=n;if(cS(o)&&typeof ql=="function"&&(o=ql(o._payload)),A.isValidElement(o)){const a=K$(o),s=Y$(i,o.props);return o.type!==A.Fragment&&(s.ref=r?B$(r,a):a),A.cloneElement(o,s)}return A.Children.count(o)>1?A.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}const U$=Symbol("radix.slottable");function G$(e){return A.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===U$}function Y$(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...s)=>{const l=i(...s);return o(...s),l}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function K$(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}const dS=(e="")=>Oe("w-full min-w-36 outline-hidden p-2.5 items-center flex justify-between text-left","hover:bg-primary focus:bg-primary aria-expanded:opacity-80","focus:text-primary-foreground hover:text-primary-foreground","first-of-type:rounded-t-lg last-of-type:rounded-b-lg","disabled:opacity-40 disabled:cursor-not-allowed",e),Vp=S.createContext({isOpen:!1,activeIndex:null,getItemProps:()=>({}),setActiveIndex:()=>{},setHasFocusInside:()=>{}}),fS=S.forwardRef(({children:e,FloatingComponent:t="div",hover:n=!0,open:r,isParent:o=!1,restoreFocus:i=!1,floatingClassName:a="",label:s,...l},c)=>{const[u,d]=S.useState(r??!1),[f,p]=S.useState(!1),[v,h]=S.useState(null),m=S.useRef([]),y=S.useRef([]),x=S.useContext(Vp),b=Sr(),E=Tr(),T=JA(),I=Sv(),w=b!==null,{floatingStyles:k,refs:P,context:_}=Gn({nodeId:T,open:u,transform:!0,strategy:"absolute",onOpenChange:d,whileElementsMounted:Jr,placement:w?"right":"bottom-start",middleware:[$o({mainAxis:w?0:4,alignmentAxis:w?-4:0}),Ds(),Ms()]}),F=fr(_,{role:"menu"}),V=kr(_,{bubbles:!0}),D=Mv(_,{move:!1,enabled:n,delay:{open:ny},handleClose:ty({blockPointerEvents:!0,requireIntent:!1})}),O=jo(_,{toggle:!w,event:"mousedown",ignoreMouse:w,keyboardHandlers:!0}),N=Hs(_,{loop:!0,activeIndex:v,nested:w,listRef:m,onNavigate:h}),z=EP(_,{activeIndex:v,listRef:y,resetMs:CP,onMatch:u?h:void 0}),{getReferenceProps:M,getFloatingProps:C,getItemProps:L}=Yn([D,O,F,V,N,z]);S.useEffect(()=>{if(!E)return;const B=()=>d(!1),q=G=>{G.nodeId!==T&&G.parentId===b&&d(!1)};return E.events.on("click",B),E.events.on("menuopen",q),()=>{E.events.off("click",B),E.events.off("menuopen",q)}},[E,T,b]),S.useEffect(()=>{u&&E&&E.events.emit("menuopen",{parentId:b,nodeId:T})},[E,u,T,b]);const $=o?l.className:Oe(dS(l.className));return g.jsxs(eP,{id:T,children:[g.jsx(S.Fragment,{children:l.asChild?g.jsx(uS,{...M(x.getItemProps({...l,onFocus(B){l.onFocus?.(B),p(!1),x.setHasFocusInside(!0)}})),children:s,className:$,"data-open":u?"":void 0,"data-nested":w?"":void 0,role:w?"menuitem":void 0,"data-focus-inside":f?"":void 0,ref:sr(P.setReference,I.ref,c),tabIndex:w?x.activeIndex===I.index?0:-1:void 0}):g.jsxs("button",{type:"button",className:$,"data-open":u?"":void 0,"data-nested":w?"":void 0,role:w?"menuitem":void 0,"data-focus-inside":f?"":void 0,ref:sr(P.setReference,I.ref,c),tabIndex:w?x.activeIndex===I.index?0:-1:void 0,...M(x.getItemProps({...l,onFocus(B){l.onFocus?.(B),p(!1),x.setHasFocusInside(!0)}})),children:[s,w&&g.jsxs("span",{style:{marginLeft:10,fontSize:10},children:[g.jsx("span",{className:"sr-only",children:"Next menu"}),g.jsx(vu,{size:14})]})]})}),g.jsx(Vp.Provider,{value:{activeIndex:v,setActiveIndex:h,getItemProps:L,setHasFocusInside:p,isOpen:u},children:g.jsx(GA,{elementsRef:m,labelsRef:y,children:u&&g.jsx(dr,{children:g.jsx(no,{context:_,modal:!1,initialFocus:w?-1:0,returnFocus:o?i:!w,children:g.jsx(t,{...C(),ref:P.setFloating,style:{...l.style,...k},className:Oe("isolate z-tooltip flex max-h-80 flex-col items-start overflow-y-auto rounded-lg border border-floating-border bg-floating-background text-left shadow-shadow-floating outline-hidden",a),children:e})})})})})]})}),Z$=S.forwardRef(({title:e,Right:t,disabled:n,children:r,...o},i)=>{const a=S.useContext(Vp),s=Sv({label:n?null:e}),l=Tr(),c=s.index===a.activeIndex;return g.jsxs("button",{...o,title:e,type:"button",role:"menuitem",disabled:n,"data-active":c,"data-open":a.isOpen,tabIndex:c?0:-1,ref:sr(s.ref,i),className:dS(`${o.className??""} ${c?"bg-primary text-primary-foreground":""}`),...a.getItemProps({onClick(u){o.onClick?.(u),l?.events.emit("click")},onFocus(u){o.onFocus?.(u),a.setHasFocusInside(!0)}}),children:[r,t?g.jsx(t,{size:16}):null]})}),X$=S.forwardRef((e,t)=>Sr()===null?g.jsx(tP,{children:g.jsx(fS,{...e,isParent:!0,ref:t})}):g.jsx(fS,{...e,isParent:!1,ref:t})),$p=S.forwardRef(({children:e,asTask:t=!1,labelClassName:n,loading:r,error:o,className:i="",size:a,container:s,...l},c)=>{const u=l.disabled||r;return g.jsxs("label",{"aria-disabled":u,"data-disabled":u,"data-task":t,"data-component":"checkbox",className:Oe("group flex w-fit flex-wrap items-center font-normal data-[disabled=true]:cursor-not-allowed",t?"group-checkbox-checked:line-through":"",s),children:[g.jsx("input",{...l,ref:c,disabled:u,type:"checkbox","data-task":t,className:Oe("form-checkbox mr-2 inline-block size-4 appearance-none rounded-sm border-card-border bg-origin-border text-primary focus:ring-primary disabled:opacity-70 group-aria-disabled:cursor-not-allowed",i)}),e,g.jsx("span",{"data-name":"checkbox-label",className:Oe("min-w-full flex-1 text-xs text-danger empty:mt-0 empty:hidden",n),children:o})]})}),Q$=({children:e,className:t="",size:n,...r})=>g.jsxs("label",{"data-component":"radiobox","data-disabled":r.disabled,"aria-disabled":r.disabled,className:"group flex items-center gap-2 font-normal data-[disabled=true]:cursor-not-allowed",children:[g.jsx("input",{...r,type:"radio",className:Oe("app form-radio inline-block h-4 w-4 appearance-none rounded-full border-card-border bg-origin-border text-primary focus:ring-primary disabled:opacity-70 group-aria-disabled:cursor-not-allowed",t),...r}),e]}),J$=ly("textarea","textarea",{container:"w-full"},e=>{const t=()=>{const n=e.value.split(`
15
- `);if(e.style.height="auto",n.length>1)return void(e.style.height=`${e.scrollHeight}px`)};return e.addEventListener("input",t),()=>e.removeEventListener("input",t)}),ez=(e,t)=>Cr()?t:window.matchMedia(e).matches,tz=(e,t=!0)=>{const[n,r]=S.useState(t);return S.useLayoutEffect(()=>{const o=window.matchMedia(e),i=()=>r(ez(e,t));return i(),o.addListener?(o.addListener(i),()=>o.removeListener?o.removeListener(i):void 0):(o.addEventListener("change",i),()=>o.removeEventListener("change",i))},[e]),n},nz=()=>S.useContext(Kr).floatingRef??void 0,Sn="500ms",rz={exit:{x:["0%","-30%"],opacity:0,animationDuration:Sn},enter:{x:["-30%","0%"],opacity:1,animationDuration:Sn},initial:{x:["-30%","0%"],opacity:.8,animationDuration:Sn}},oz={enter:{x:"0%",opacity:1,animationDuration:Sn},exit:{x:["0%","30%"],opacity:0,animationDuration:Sn},initial:{x:["30%","0%"],opacity:.8,animationDuration:Sn}},zp={drawer:e=>e==="left"?rz:oz,sheet:{enter:{opacity:1,y:"0%",animationDuration:Sn,transformOrigin:"bottom"},exit:{opacity:.4,y:"10%",animationDuration:Sn,transformOrigin:"bottom"},initial:{opacity:.7,y:"10%",animationDuration:Sn,transformOrigin:"bottom"}},dialog:{exit:{opacity:0,scale:.95,animationDuration:Sn},enter:{opacity:1,scale:[1.05,1],animationDuration:Sn},initial:{opacity:.5,scale:.95,animationDuration:Sn,transition:{duration:.5,ease:"easeInOut"}}}},iz=Io("z-floating border border-floating-border ring-0 outline-0 appearance-none flex flex-col gap-4 flex-nowrap min-w-xs bg-floating-background",{variants:{type:{drawer:"max-h-screen max-w-[90%] absolute w-fit h-screen min-h-0",dialog:"max-h-[calc(100lvh-10%)] relative container h-min rounded-lg py-4",sheet:"w-screen absolute bottom-0 max-h-[calc(100vh-15%)] max-h-[calc(100svh-5%)] h-screen pt-6 pb-4 rounded-t-lg"},position:{none:"",right:"py-4 absolute right-0 top-0 rounded-l-lg",left:"py-4 absolute left-0 top-0 rounded-r-lg"}},defaultVariants:{position:"right",type:"dialog"}}),pS={top:0,left:0,right:0,bottom:0},hS=e=>e*.6,az=e=>{const t=(n,r)=>{if(e.parent.current){if(n.stopPropagation(),n.stopImmediatePropagation(),e.sheet){const c=e.parent.current.getBoundingClientRect(),u=e.value.get()||c.height,d=Math.abs(u-r.delta.y),f=window.outerHeight,p=hS(f);return d>=p?e.value.set(d):(document.activeElement instanceof HTMLElement&&document.activeElement?.blur(),e.onChange(!1),setTimeout(()=>e.value.set(void 0),350))}const o=e.parent.current,i=e.value.get()||o.getBoundingClientRect().width,a=e.position==="right"?-r.delta.x:r.delta.x,s=Math.abs(i+a);return e.value.set(s)}};return g.jsx(Be.button,{draggable:!0,dragListener:!0,dragMomentum:!0,type:"button",animate:!1,dragElastic:0,dragPropagation:!0,initial:!1,onDrag:t,dragSnapToOrigin:!0,dragDirectionLock:!0,drag:e.sheet?"y":"x",dragConstraints:pS,whileDrag:{cursor:"grabbing"},className:Oe("absolute rounded-lg isolate z-calendar",e.sheet?"cursor-row-resize":"cursor-col-resize bg-floating-border",e.sheet?"top-1 flex h-3 w-full justify-center py-2":e.position==="left"?"right-5 top-1/2 h-10 w-2":"left-2 top-1/2 h-10 w-2"),children:e.sheet?g.jsx("div",{className:"w-1/4 h-2 rounded-lg bg-floating-border"}):null})},Ul={drawer:"right",sheet:"none",dialog:"none"},sz=(e,t,n,r)=>{const o=n||"dialog";return e?n==="drawer"?r??Ul.drawer:Ul[o]:t?Ul[o]:Ul.sheet},lz=[],jp=S.forwardRef(({open:e,title:t,footer:n,asChild:r,trigger:o,children:i,onChange:a,ariaTitle:s,className:l,bodyClassName:c,resizer:u=!0,animated:d=!0,closable:f=!0,forceType:p=!1,layoutId:v=void 0,overlayClassName:h="",type:m="dialog",position:y,overlayClickClose:x=!1,closeOnFocusOut:b=!1,interactions:E=lz,...T},I)=>{const w=nz(),k=S.useRef(null),P=S.useRef(null),_=S.useId(),F=S.useId(),V=tz("(min-width: 64rem)"),D=sz(V,p,m,y),O=V||p?zp[m]:zp.sheet,N=typeof O=="function"?O(D):O,z=V||p?m:"sheet",M=z!=="dialog",C=Gn({open:e,onOpenChange:a,strategy:"fixed"}),L=jo(C.context,{}),$=fr(C.context,{role:"dialog"}),B=kr(C.context,{bubbles:!0,escapeKey:!0,outsidePress:ie=>{const Q=ie.target;return x&&!!Q?.isConnected}}),q=Yn([L,B,$].concat(E)),G=o,W=ho(void 0),J=ho(void 0),re=S.useRef(!1),ee=S.useRef(0);S.useEffect(()=>{W.set(void 0),J.set(void 0)},[z,W,J]);const Y=()=>a(!1);S.useImperativeHandle(I,()=>({context:C.context,floating:P.current}),[C.context,P]);const X=z==="sheet"?{drag:"y",animate:!1,dragElastic:0,initial:!1,dragConstraints:pS,draggable:!0,dragListener:!0,dragMomentum:!0,onDrag:(ie,Q)=>{const te=C.refs.floating.current.getBoundingClientRect(),fe=W.get()||te.height,pe=Math.abs(fe-Q.delta.y),ve=window.outerHeight,Ae=hS(ve);return pe>=Ae?W.set(pe):(document.activeElement instanceof HTMLElement&&document.activeElement?.blur(),a?.(!1),setTimeout(()=>W.set(void 0),350))},dragPropagation:!0,dragSnapToOrigin:!0,dragDirectionLock:!0,whileDrag:{cursor:"grabbing"}}:{animate:d,initial:!1},de=ho(void 0),H=ho(void 0),se=r?uS:Be.button;return g.jsxs(S.Fragment,{children:[o?g.jsx(se,{ref:C.refs.setReference,...q.getReferenceProps(),layoutId:v,type:"button",children:G}):null,g.jsx(dr,{preserveTabOrder:!0,root:w,children:e?g.jsx(Ku,{lockScroll:!0,className:Oe("inset-0 flex isolate bg-floating-overlay/70 z-overlay h-dvh overflow-clip!",z==="drawer"?"":"items-start justify-center lg:p-10 pt-10",h),children:g.jsx(Mf,{reducedMotion:d?"user":"always",children:g.jsx(no,{guards:!0,modal:!0,closeOnFocusOut:b,context:C.context,children:g.jsxs(Be.div,{...T,...t?{"aria-labelledby":_,"aria-describedby":F}:{"aria-label":s},...q.getFloatingProps({"aria-modal":e,ref:sr(C.refs.setFloating,P),className:Oe(iz({position:D,type:z}),l,"isolate overscroll-contain")}),exit:"exit",layout:!0,animate:"enter",initial:"initial",layoutId:v,variants:N,"data-component":"modal",style:z==="drawer"?{width:W}:{height:W,y:J},children:[M&&u?g.jsx(az,{onChange:a,value:W,sheet:z==="sheet",position:D,parent:C.refs.floating}):null,t?g.jsx(Be.header,{...X,className:"relative w-full isolate",children:t?g.jsx("h2",{id:_,className:"block px-8 pb-2 text-3xl font-medium leading-relaxed border-b select-text border-floating-border",children:t}):null}):null,g.jsx(Be.section,{ref:k,"data-component":"modal-body",className:Oe("flex-1 select-text overflow-y-auto px-8 py-1",c),onTouchEnd:async()=>{if(H.set(void 0),de.set(void 0),re.current){const ie=J.get()||0,Q=window.innerHeight*.2;ie>Q?(await xw(J,window.innerHeight,{duration:.2,ease:"easeIn"}).finished,a(!1)):xw(J,0,{type:"spring",bounce:0,duration:.3}),re.current=!1}},onTouchStart:ie=>{const Q=ie.changedTouches[0];de.set(Q.pageY),H.set(Q.pageY),re.current=!1},onTouchMove:ie=>{const le=ie.changedTouches[0].pageY,te=H.get()||le,fe=k.current?.scrollTop||0;if(!re.current&&fe<=0&&le>te&&z==="sheet"&&(re.current=!0,ee.current=le),re.current){const pe=le-ee.current;pe<0?J.set(pe*.2):J.set(pe)}H.set(le)},children:i}),n?g.jsx("footer",{className:"px-8 pt-4 w-full border-t select-text border-floating-border",children:n}):null,f?g.jsx("nav",{className:"absolute top-1 right-4 z-floating",children:g.jsx("button",{type:"button",onClick:Y,className:"p-1 opacity-70 transition-colors hover:opacity-100 hover:text-danger focus:text-danger",children:g.jsx(Mo,{})})}):null]})})})}):null})]})}),cz=e=>{const[t,n]=fF();return S.useEffect(()=>{const r=t.current;if(!r)return;const o=i=>{const a=i.target,s=Array.from(r.querySelectorAll("input[data-task=true]")),l=s.every(u=>u.checked),c=s.indexOf(a);l&&c!==-1&&n("input",{scale:[1,1.35,1],rotate:[0,20,-20,0]},{duration:.5,delay:yD(.075,{from:c})})};return r.addEventListener("change",o),()=>r.removeEventListener("change",o)},[]),g.jsx("fieldset",{...e,"data-component":"task-list",ref:t})},uz=e=>g.jsx("p",{...e,className:Oe("text-base leading-snug",e.className)}),dz=e=>g.jsx("p",{...e,className:Oe("mb-kilo text-sm text-secondary",e.className)}),fz=e=>g.jsx("div",{className:Oe(`flex ${e.row?"flex-row items-center":"flex-col"} gap-1`,e.className),children:g.jsxs(S.Fragment,{children:[g.jsx("span",{className:"text-sm font-medium tracking-wide",children:e.row?`${e.label}:`:e.label}),g.jsx("span",{className:`w-fit ${e.disabled?"text-disabled":""} ${e.row?"text-base":"text-lg"}`,children:e.children})]})}),mS=e=>g.jsxs("div",{children:[g.jsx("h2",{className:"text-3xl font-bold typography tracking-wide",children:e.title}),g.jsx("p",{className:"text-secondary typography",children:e.children})]}),pz=e=>g.jsxs("header",{className:"flex flex-row flex-wrap justify-between items-center gap-mega",children:[g.jsx("div",{children:g.jsx(mS,{title:e.title,children:e.description})}),g.jsx("div",{className:"flex gap-kilo items-center flex-wrap",children:e.children})]}),gS=e=>g.jsx("span",{"aria-busy":"true","aria-description":"Carregando...",className:Oe("box-border inline-block aspect-square size-12 animate-spin rounded-full border-4 border-background border-b-primary",e.className)}),hz=()=>g.jsx("div",{className:"flex h-full w-full items-center justify-center p-12",children:g.jsx(gS,{})}),mz=e=>{const t=S.useRef(null),n=S.useId(),r=`${n}:wrapper`,o=`${n}:title`,[i,a]=S.useState(e.open??!1);S.useEffect(()=>{a(e.open??!1)},[e.open]);const{context:s,refs:l}=Gn({transform:!0,open:i!==null,nodeId:n,onOpenChange:a,strategy:"absolute"}),c=jo(s,{enabled:e.disabled??!0}),u=fr(s,{role:"tooltip"}),d=kr(s,{escapeKey:!0,referencePress:!0,outsidePress:!0}),{getFloatingProps:f,getReferenceProps:p}=Yn([c,u,d]);return g.jsxs("div",{className:"relative inline-flex items-center justify-center",ref:t,children:[g.jsx(ro,{...p(e),as:Be.button,layoutId:r,ref:l.setReference,size:"small",onClick:()=>a(!0),children:g.jsx(Be.span,{layoutId:o,children:e.trigger})}),g.jsx(Nn,{children:i?g.jsx(dr,{root:t,children:g.jsx(no,{visuallyHiddenDismiss:!0,modal:!0,closeOnFocusOut:!0,context:s,children:g.jsx(Be.div,{...f(),ref:l.setFloating,layoutId:r,className:"absolute -left-1/4 -top-3/4",children:e.children})})}):null})]})},gz=(e,t)=>{const n=S.useRef(t);n.current=t,S.useEffect(()=>{if(!e)return;const r=new ResizeObserver(o=>{o[0]&&n.current(o[0])});return r.observe(e),()=>r.disconnect()},[e])},vz=()=>{const[e,t]=S.useState({width:0,height:0});return S.useEffect(()=>{if(typeof window>"u")return;const n=()=>t({width:window.innerWidth,height:window.innerHeight});return n(),window.addEventListener("resize",n,{passive:!0}),()=>window.removeEventListener("resize",n)},[]),e},yz=e=>({top:0,left:0,width:0,height:0,bottom:0,right:0}),bz=e=>typeof e=="string"?document.querySelector(e):"current"in e?e.current:e,xz=({steps:e,active:t=!1,onClose:n=Ho,onFinish:r=Ho,onChange:o=Ho,labels:i})=>{const a=Pt(),[s,l]=S.useState(0),c=e[s],[u,d]=S.useState(null),[f,p]=S.useState(yz()),[v,h]=S.useState(!1),m=S.useRef(null),{width:y,height:x}=vz(),b={next:i?.next??a.driverNext,previous:i?.previous??a.driverPrevious,finish:i?.finish??a.driverFinish,skip:i?.skip??a.driverSkip},{refs:E,floatingStyles:T,context:I}=Gn({open:t&&v,placement:c?.side||"bottom",whileElementsMounted:Jr,middleware:[$o(10),Ds(),Ms(),Bu({element:m})]}),{getFloatingProps:w}=Yn([fr(I)]);S.useEffect(()=>{t&&l(0)},[t]),S.useEffect(()=>{h(!1)},[s,t]),S.useEffect(()=>{if(!t||!c)return;const V=bz(c.element);V?(c.onEnter?.(),setTimeout(()=>{p(V.getBoundingClientRect()),E.setReference(V),d(V)},100)):(console.warn("Driver: Element not found:",c.element),d(null),p({top:0,left:0,width:0,height:0,bottom:0,right:0}))},[s,t,c,E]),S.useLayoutEffect(()=>{if(!u)return;const V=()=>p(u.getBoundingClientRect());return V(),window.addEventListener("scroll",V,{capture:!0,passive:!0}),window.addEventListener("resize",V,{capture:!0,passive:!0}),()=>{window.removeEventListener("scroll",V,{capture:!0}),window.removeEventListener("resize",V,{capture:!0})}},[u,y,x]),gz(u,V=>{p(V.target.getBoundingClientRect())});const k=()=>{c.onNext?.(),setTimeout(()=>{s<e.length-1?(l(V=>V+1),o(s+1)):(r(),n())},0)},P=()=>{c.onPrevious?.(),s>0&&(l(V=>V-1),o(s-1))};if(!t)return null;const _=s<e.length-1,F=s>0;return g.jsx(dr,{children:g.jsxs("div",{className:"fixed inset-0 pointer-events-none z-wizard",children:[g.jsxs("svg",{className:"absolute inset-0 w-full h-full fill-current text-floating-overlay/70",xmlns:"http://www.w3.org/2000/svg",children:[g.jsx("defs",{children:g.jsxs("mask",{id:"driver-mask",children:[g.jsx("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:"white"}),g.jsx(Be.rect,{rx:"4",fill:"black",initial:!1,onAnimationComplete:()=>h(!0),transition:{type:"spring",duration:.5,ease:"easeInOut"},animate:{x:f.left-5,y:f.top-5,width:f.width+10,height:f.height+10}})]})}),g.jsx("rect",{x:"0",y:"0",width:"100%",height:"100%",mask:"url(#driver-mask)",className:"pointer-events-auto"})]}),g.jsx(Nn,{mode:"wait",children:c&&v&&g.jsx("div",{...w(),ref:E.setFloating,style:u?T:{position:"fixed",top:"50%",left:"50%",transform:"translate(-50%, -50%)"},className:"outline-hidden pointer-events-auto",children:g.jsxs(Be.div,{transition:{duration:.2},exit:{opacity:0,scale:.9},animate:{opacity:1,scale:1},initial:{opacity:0,scale:.9},className:"flex flex-col gap-3 p-4 w-80 max-w-sm rounded-lg border shadow-lg bg-card-background border-card-border",children:[u&&g.jsx(Hu,{ref:m,context:I,className:"fill-card-background stroke-card-border"}),c.title&&g.jsx("h3",{children:c.title}),c.description&&g.jsx(S.Fragment,{children:c.description}),g.jsxs("div",{className:"flex justify-between items-center pt-2 mt-2 border-t border-floating-border",children:[g.jsx(ro,{theme:"raw",size:"small",onClick:n,className:"text-xs text-muted-foreground hover:text-foreground",children:b.skip}),g.jsxs("div",{className:"flex gap-2",children:[F&&g.jsx(ro,{size:"small",theme:"neutral",onClick:P,children:b.previous}),g.jsx(ro,{size:"small",onClick:k,children:_?b.next:b.finish})]})]}),g.jsxs("div",{className:"absolute top-2 right-2 text-xs text-muted-foreground",children:[s+1," / ",e.length]})]})})})]})})},vS=6048e5,wz=864e5,Sz=6e4,Tz=36e5,Ez=1e3,yS=Symbol.for("constructDateFrom");function ut(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&yS in e?e[yS](t):e instanceof Date?new e.constructor(t):new Date(t)}function Je(e,t){return ut(t||e,e)}function Gl(e,t,n){const r=Je(e,n?.in);return isNaN(t)?ut(n?.in||e,NaN):(t&&r.setDate(r.getDate()+t),r)}function bS(e,t,n){const r=Je(e,n?.in);if(isNaN(t))return ut(e,NaN);if(!t)return r;const o=r.getDate(),i=ut(e,r.getTime());i.setMonth(r.getMonth()+t+1,0);const a=i.getDate();return o>=a?i:(r.setFullYear(i.getFullYear(),i.getMonth(),o),r)}function yi(e,t,n){const{years:r=0,months:o=0,weeks:i=0,days:a=0,hours:s=0,minutes:l=0,seconds:c=0}=t,u=Je(e,n?.in),d=o||r?bS(u,o+r*12):u,f=a||i?Gl(d,a+i*7):d,p=l+s*60,h=(c+p*60)*1e3;return ut(e,+f+h)}let kz={};function yo(){return kz}function tr(e,t){const n=yo(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,o=Je(e,t?.in),i=o.getDay(),a=(i<r?7:0)+i-r;return o.setDate(o.getDate()-a),o.setHours(0,0,0,0),o}function bi(e,t){return tr(e,{...t,weekStartsOn:1})}function xS(e,t){const n=Je(e,t?.in),r=n.getFullYear(),o=ut(n,0);o.setFullYear(r+1,0,4),o.setHours(0,0,0,0);const i=bi(o),a=ut(n,0);a.setFullYear(r,0,4),a.setHours(0,0,0,0);const s=bi(a);return n.getTime()>=i.getTime()?r+1:n.getTime()>=s.getTime()?r:r-1}function Yl(e){const t=Je(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function Kl(e,...t){const n=ut.bind(null,t.find(r=>typeof r=="object"));return t.map(n)}function bo(e,t){const n=Je(e,t?.in);return n.setHours(0,0,0,0),n}function Cz(e,t,n){const[r,o]=Kl(n?.in,e,t),i=bo(r),a=bo(o),s=+i-Yl(i),l=+a-Yl(a);return Math.round((s-l)/wz)}function Iz(e,t){const n=xS(e,t),r=ut(e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),bi(r)}function Az(e){return ut(e,Date.now())}function Pz(e,t,n){const[r,o]=Kl(n?.in,e,t);return+bo(r)==+bo(o)}function Oz(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function Zl(e){return!(!Oz(e)&&typeof e!="number"||isNaN(+Je(e)))}function _z(e,t){const[n,r]=Kl(e,t.start,t.end);return{start:n,end:r}}function wS(e,t){const{start:n,end:r}=_z(t?.in,e);let o=+n>+r;const i=o?+n:+r,a=o?r:n;a.setHours(0,0,0,0);let s=1;const l=[];for(;+a<=i;)l.push(ut(n,a)),a.setDate(a.getDate()+s),a.setHours(0,0,0,0);return o?l.reverse():l}function SS(e,t){const n=Je(e,t?.in);return n.setDate(1),n.setHours(0,0,0,0),n}function Mz(e,t){const n=Je(e,t?.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}function Dz(e,t){const n=yo(),r=n.weekStartsOn??n.locale?.options?.weekStartsOn??0,o=Je(e,t?.in),i=o.getDay(),a=(i<r?-7:0)+6-(i-r);return o.setDate(o.getDate()+a),o.setHours(23,59,59,999),o}const Nz={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},Fz=(e,t,n)=>{let r;const o=Nz[e];return typeof o=="string"?r=o:t===1?r=o.one:r=o.other.replace("{{count}}",t.toString()),n?.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function Rp(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const Lz={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},Vz={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},$z={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},zz={date:Rp({formats:Lz,defaultWidth:"full"}),time:Rp({formats:Vz,defaultWidth:"full"}),dateTime:Rp({formats:$z,defaultWidth:"full"})},jz={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Rz=(e,t,n,r)=>jz[e];function ja(e){return(t,n)=>{const r=n?.context?String(n.context):"standalone";let o;if(r==="formatting"&&e.formattingValues){const a=e.defaultFormattingWidth||e.defaultWidth,s=n?.width?String(n.width):a;o=e.formattingValues[s]||e.formattingValues[a]}else{const a=e.defaultWidth,s=n?.width?String(n.width):e.defaultWidth;o=e.values[s]||e.values[a]}const i=e.argumentCallback?e.argumentCallback(t):t;return o[i]}}const Bz={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Hz={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Wz={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},qz={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},Uz={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},Gz={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},Yz={ordinalNumber:(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:ja({values:Bz,defaultWidth:"wide"}),quarter:ja({values:Hz,defaultWidth:"wide",argumentCallback:e=>e-1}),month:ja({values:Wz,defaultWidth:"wide"}),day:ja({values:qz,defaultWidth:"wide"}),dayPeriod:ja({values:Uz,defaultWidth:"wide",formattingValues:Gz,defaultFormattingWidth:"wide"})};function Ra(e){return(t,n={})=>{const r=n.width,o=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],i=t.match(o);if(!i)return null;const a=i[0],s=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(s)?Zz(s,d=>d.test(a)):Kz(s,d=>d.test(a));let c;c=e.valueCallback?e.valueCallback(l):l,c=n.valueCallback?n.valueCallback(c):c;const u=t.slice(a.length);return{value:c,rest:u}}}function Kz(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function Zz(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function Xz(e){return(t,n={})=>{const r=t.match(e.matchPattern);if(!r)return null;const o=r[0],i=t.match(e.parsePattern);if(!i)return null;let a=e.valueCallback?e.valueCallback(i[0]):i[0];a=n.valueCallback?n.valueCallback(a):a;const s=t.slice(o.length);return{value:a,rest:s}}}const Qz=/^(\d+)(th|st|nd|rd)?/i,Jz=/\d+/i,ej={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},tj={any:[/^b/i,/^(a|c)/i]},nj={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},rj={any:[/1/i,/2/i,/3/i,/4/i]},oj={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},ij={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},aj={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},sj={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},lj={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},cj={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},uj={ordinalNumber:Xz({matchPattern:Qz,parsePattern:Jz,valueCallback:e=>parseInt(e,10)}),era:Ra({matchPatterns:ej,defaultMatchWidth:"wide",parsePatterns:tj,defaultParseWidth:"any"}),quarter:Ra({matchPatterns:nj,defaultMatchWidth:"wide",parsePatterns:rj,defaultParseWidth:"any",valueCallback:e=>e+1}),month:Ra({matchPatterns:oj,defaultMatchWidth:"wide",parsePatterns:ij,defaultParseWidth:"any"}),day:Ra({matchPatterns:aj,defaultMatchWidth:"wide",parsePatterns:sj,defaultParseWidth:"any"}),dayPeriod:Ra({matchPatterns:lj,defaultMatchWidth:"any",parsePatterns:cj,defaultParseWidth:"any"})},TS={code:"en-US",formatDistance:Fz,formatLong:zz,formatRelative:Rz,localize:Yz,match:uj,options:{weekStartsOn:0,firstWeekContainsDate:1}};function dj(e,t){const n=Je(e,t?.in);return Cz(n,Mz(n))+1}function ES(e,t){const n=Je(e,t?.in),r=+bi(n)-+Iz(n);return Math.round(r/vS)+1}function Bp(e,t){const n=Je(e,t?.in),r=n.getFullYear(),o=yo(),i=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??o.firstWeekContainsDate??o.locale?.options?.firstWeekContainsDate??1,a=ut(t?.in||e,0);a.setFullYear(r+1,0,i),a.setHours(0,0,0,0);const s=tr(a,t),l=ut(t?.in||e,0);l.setFullYear(r,0,i),l.setHours(0,0,0,0);const c=tr(l,t);return+n>=+s?r+1:+n>=+c?r:r-1}function fj(e,t){const n=yo(),r=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,o=Bp(e,t),i=ut(t?.in||e,0);return i.setFullYear(o,0,r),i.setHours(0,0,0,0),tr(i,t)}function kS(e,t){const n=Je(e,t?.in),r=+tr(n,t)-+fj(n,t);return Math.round(r/vS)+1}function dt(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const $r={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return dt(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):dt(n+1,2)},d(e,t){return dt(e.getDate(),t.length)},a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];default:return n==="am"?"a.m.":"p.m."}},h(e,t){return dt(e.getHours()%12||12,t.length)},H(e,t){return dt(e.getHours(),t.length)},m(e,t){return dt(e.getMinutes(),t.length)},s(e,t){return dt(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),o=Math.trunc(r*Math.pow(10,n-3));return dt(o,t.length)}},xi={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},CS={G:function(e,t,n){const r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if(t==="yo"){const r=e.getFullYear(),o=r>0?r:1-r;return n.ordinalNumber(o,{unit:"year"})}return $r.y(e,t)},Y:function(e,t,n,r){const o=Bp(e,r),i=o>0?o:1-o;if(t==="YY"){const a=i%100;return dt(a,2)}return t==="Yo"?n.ordinalNumber(i,{unit:"year"}):dt(i,t.length)},R:function(e,t){const n=xS(e);return dt(n,t.length)},u:function(e,t){const n=e.getFullYear();return dt(n,t.length)},Q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return dt(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return dt(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){const r=e.getMonth();switch(t){case"M":case"MM":return $r.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return dt(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const o=kS(e,r);return t==="wo"?n.ordinalNumber(o,{unit:"week"}):dt(o,t.length)},I:function(e,t,n){const r=ES(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):dt(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):$r.d(e,t)},D:function(e,t,n){const r=dj(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):dt(r,t.length)},E:function(e,t,n){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const o=e.getDay(),i=(o-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(i);case"ee":return dt(i,2);case"eo":return n.ordinalNumber(i,{unit:"day"});case"eee":return n.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(o,{width:"short",context:"formatting"});default:return n.day(o,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const o=e.getDay(),i=(o-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(i);case"cc":return dt(i,t.length);case"co":return n.ordinalNumber(i,{unit:"day"});case"ccc":return n.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(o,{width:"narrow",context:"standalone"});case"cccccc":return n.day(o,{width:"short",context:"standalone"});default:return n.day(o,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),o=r===0?7:r;switch(t){case"i":return String(o);case"ii":return dt(o,t.length);case"io":return n.ordinalNumber(o,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const o=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(o,{width:"narrow",context:"formatting"});default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let o;switch(r===12?o=xi.noon:r===0?o=xi.midnight:o=r/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(o,{width:"narrow",context:"formatting"});default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let o;switch(r>=17?o=xi.evening:r>=12?o=xi.afternoon:r>=4?o=xi.morning:o=xi.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(o,{width:"narrow",context:"formatting"});default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},h:function(e,t,n){if(t==="ho"){let r=e.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return $r.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):$r.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):dt(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):dt(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):$r.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):$r.s(e,t)},S:function(e,t){return $r.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return AS(r);case"XXXX":case"XX":return xo(r);default:return xo(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return AS(r);case"xxxx":case"xx":return xo(r);default:return xo(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+IS(r,":");default:return"GMT"+xo(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+IS(r,":");default:return"GMT"+xo(r,":")}},t:function(e,t,n){const r=Math.trunc(+e/1e3);return dt(r,t.length)},T:function(e,t,n){return dt(+e,t.length)}};function IS(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=Math.trunc(r/60),i=r%60;return i===0?n+String(o):n+String(o)+t+dt(i,2)}function AS(e,t){return e%60===0?(e>0?"-":"+")+dt(Math.abs(e)/60,2):xo(e,t)}function xo(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=dt(Math.trunc(r/60),2),i=dt(r%60,2);return n+o+t+i}const PS=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});default:return t.date({width:"full"})}},OS=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});default:return t.time({width:"full"})}},Hp={p:OS,P:(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],o=n[2];if(!o)return PS(e,t);let i;switch(r){case"P":i=t.dateTime({width:"short"});break;case"PP":i=t.dateTime({width:"medium"});break;case"PPP":i=t.dateTime({width:"long"});break;default:i=t.dateTime({width:"full"});break}return i.replace("{{date}}",PS(r,t)).replace("{{time}}",OS(o,t))}},pj=/^D+$/,hj=/^Y+$/,mj=["D","DD","YY","YYYY"];function _S(e){return pj.test(e)}function MS(e){return hj.test(e)}function Wp(e,t,n){const r=gj(e,t,n);if(console.warn(r),mj.includes(e))throw new RangeError(r)}function gj(e,t,n){const r=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const vj=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,yj=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,bj=/^'([^]*?)'?$/,xj=/''/g,wj=/[a-zA-Z]/;function qp(e,t,n){const r=yo(),o=r.locale??TS,i=r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,a=r.weekStartsOn??r.locale?.options?.weekStartsOn??0,s=Je(e,n?.in);if(!Zl(s))throw new RangeError("Invalid time value");let l=t.match(yj).map(u=>{const d=u[0];if(d==="p"||d==="P"){const f=Hp[d];return f(u,o.formatLong)}return u}).join("").match(vj).map(u=>{if(u==="''")return{isToken:!1,value:"'"};const d=u[0];if(d==="'")return{isToken:!1,value:Sj(u)};if(CS[d])return{isToken:!0,value:u};if(d.match(wj))throw new RangeError("Format string contains an unescaped latin alphabet character `"+d+"`");return{isToken:!1,value:u}});o.localize.preprocessor&&(l=o.localize.preprocessor(s,l));const c={firstWeekContainsDate:i,weekStartsOn:a,locale:o};return l.map(u=>{if(!u.isToken)return u.value;const d=u.value;(MS(d)||_S(d))&&Wp(d,t,String(e));const f=CS[d[0]];return f(s,d,o.localize,c)}).join("")}function Sj(e){const t=e.match(bj);return t?t[1].replace(xj,"'"):e}function Tj(e,t){const n=Je(e,t?.in),r=n.getFullYear(),o=n.getMonth(),i=ut(n,0);return i.setFullYear(r,o+1,0),i.setHours(0,0,0,0),i.getDate()}function Ej(){return Object.assign({},yo())}function kj(e,t){const n=Je(e,t?.in).getDay();return n===0?7:n}function Cj(e,t){return+Je(e)>+Je(t)}function Ij(e,t){return+Je(e)<+Je(t)}function Aj(e,t){const n=Pj(t)?new t(0):ut(t,0);return n.setFullYear(e.getFullYear(),e.getMonth(),e.getDate()),n.setHours(e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()),n}function Pj(e){return typeof e=="function"&&e.prototype?.constructor===e}const Oj=10;class DS{subPriority=0;validate(t,n){return!0}}class _j extends DS{constructor(t,n,r,o,i){super(),this.value=t,this.validateValue=n,this.setValue=r,this.priority=o,i&&(this.subPriority=i)}validate(t,n){return this.validateValue(t,this.value,n)}set(t,n,r){return this.setValue(t,n,this.value,r)}}class Mj extends DS{priority=Oj;subPriority=-1;constructor(t,n){super(),this.context=t||(r=>ut(n,r))}set(t,n){return n.timestampIsSet?t:ut(t,Aj(t,this.context))}}class rt{run(t,n,r,o){const i=this.parse(t,n,r,o);return i?{setter:new _j(i.value,this.validate,this.set,this.priority,this.subPriority),rest:i.rest}:null}validate(t,n,r){return!0}}class Dj extends rt{priority=140;parse(t,n,r){switch(n){case"G":case"GG":case"GGG":return r.era(t,{width:"abbreviated"})||r.era(t,{width:"narrow"});case"GGGGG":return r.era(t,{width:"narrow"});default:return r.era(t,{width:"wide"})||r.era(t,{width:"abbreviated"})||r.era(t,{width:"narrow"})}}set(t,n,r){return n.era=r,t.setFullYear(r,0,1),t.setHours(0,0,0,0),t}incompatibleTokens=["R","u","t","T"]}const Dt={month:/^(1[0-2]|0?\d)/,date:/^(3[0-1]|[0-2]?\d)/,dayOfYear:/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,week:/^(5[0-3]|[0-4]?\d)/,hour23h:/^(2[0-3]|[0-1]?\d)/,hour24h:/^(2[0-4]|[0-1]?\d)/,hour11h:/^(1[0-1]|0?\d)/,hour12h:/^(1[0-2]|0?\d)/,minute:/^[0-5]?\d/,second:/^[0-5]?\d/,singleDigit:/^\d/,twoDigits:/^\d{1,2}/,threeDigits:/^\d{1,3}/,fourDigits:/^\d{1,4}/,anyDigitsSigned:/^-?\d+/,singleDigitSigned:/^-?\d/,twoDigitsSigned:/^-?\d{1,2}/,threeDigitsSigned:/^-?\d{1,3}/,fourDigitsSigned:/^-?\d{1,4}/},nr={basicOptionalMinutes:/^([+-])(\d{2})(\d{2})?|Z/,basic:/^([+-])(\d{2})(\d{2})|Z/,basicOptionalSeconds:/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,extended:/^([+-])(\d{2}):(\d{2})|Z/,extendedOptionalSeconds:/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/};function Nt(e,t){return e&&{value:t(e.value),rest:e.rest}}function It(e,t){const n=t.match(e);return n?{value:parseInt(n[0],10),rest:t.slice(n[0].length)}:null}function rr(e,t){const n=t.match(e);if(!n)return null;if(n[0]==="Z")return{value:0,rest:t.slice(1)};const r=n[1]==="+"?1:-1,o=n[2]?parseInt(n[2],10):0,i=n[3]?parseInt(n[3],10):0,a=n[5]?parseInt(n[5],10):0;return{value:r*(o*Tz+i*Sz+a*Ez),rest:t.slice(n[0].length)}}function NS(e){return It(Dt.anyDigitsSigned,e)}function _t(e,t){switch(e){case 1:return It(Dt.singleDigit,t);case 2:return It(Dt.twoDigits,t);case 3:return It(Dt.threeDigits,t);case 4:return It(Dt.fourDigits,t);default:return It(new RegExp("^\\d{1,"+e+"}"),t)}}function Xl(e,t){switch(e){case 1:return It(Dt.singleDigitSigned,t);case 2:return It(Dt.twoDigitsSigned,t);case 3:return It(Dt.threeDigitsSigned,t);case 4:return It(Dt.fourDigitsSigned,t);default:return It(new RegExp("^-?\\d{1,"+e+"}"),t)}}function Up(e){switch(e){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;default:return 0}}function FS(e,t){const n=t>0,r=n?t:1-t;let o;if(r<=50)o=e||100;else{const i=r+50,a=Math.trunc(i/100)*100,s=e>=i%100;o=e+a-(s?100:0)}return n?o:1-o}function LS(e){return e%400===0||e%4===0&&e%100!==0}class Nj extends rt{priority=130;incompatibleTokens=["Y","R","u","w","I","i","e","c","t","T"];parse(t,n,r){const o=i=>({year:i,isTwoDigitYear:n==="yy"});switch(n){case"y":return Nt(_t(4,t),o);case"yo":return Nt(r.ordinalNumber(t,{unit:"year"}),o);default:return Nt(_t(n.length,t),o)}}validate(t,n){return n.isTwoDigitYear||n.year>0}set(t,n,r){const o=t.getFullYear();if(r.isTwoDigitYear){const a=FS(r.year,o);return t.setFullYear(a,0,1),t.setHours(0,0,0,0),t}const i=!("era"in n)||n.era===1?r.year:1-r.year;return t.setFullYear(i,0,1),t.setHours(0,0,0,0),t}}class Fj extends rt{priority=130;parse(t,n,r){const o=i=>({year:i,isTwoDigitYear:n==="YY"});switch(n){case"Y":return Nt(_t(4,t),o);case"Yo":return Nt(r.ordinalNumber(t,{unit:"year"}),o);default:return Nt(_t(n.length,t),o)}}validate(t,n){return n.isTwoDigitYear||n.year>0}set(t,n,r,o){const i=Bp(t,o);if(r.isTwoDigitYear){const s=FS(r.year,i);return t.setFullYear(s,0,o.firstWeekContainsDate),t.setHours(0,0,0,0),tr(t,o)}const a=!("era"in n)||n.era===1?r.year:1-r.year;return t.setFullYear(a,0,o.firstWeekContainsDate),t.setHours(0,0,0,0),tr(t,o)}incompatibleTokens=["y","R","u","Q","q","M","L","I","d","D","i","t","T"]}class Lj extends rt{priority=130;parse(t,n){return Xl(n==="R"?4:n.length,t)}set(t,n,r){const o=ut(t,0);return o.setFullYear(r,0,4),o.setHours(0,0,0,0),bi(o)}incompatibleTokens=["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"]}class Vj extends rt{priority=130;parse(t,n){return Xl(n==="u"?4:n.length,t)}set(t,n,r){return t.setFullYear(r,0,1),t.setHours(0,0,0,0),t}incompatibleTokens=["G","y","Y","R","w","I","i","e","c","t","T"]}class $j extends rt{priority=120;parse(t,n,r){switch(n){case"Q":case"QQ":return _t(n.length,t);case"Qo":return r.ordinalNumber(t,{unit:"quarter"});case"QQQ":return r.quarter(t,{width:"abbreviated",context:"formatting"})||r.quarter(t,{width:"narrow",context:"formatting"});case"QQQQQ":return r.quarter(t,{width:"narrow",context:"formatting"});default:return r.quarter(t,{width:"wide",context:"formatting"})||r.quarter(t,{width:"abbreviated",context:"formatting"})||r.quarter(t,{width:"narrow",context:"formatting"})}}validate(t,n){return n>=1&&n<=4}set(t,n,r){return t.setMonth((r-1)*3,1),t.setHours(0,0,0,0),t}incompatibleTokens=["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"]}class zj extends rt{priority=120;parse(t,n,r){switch(n){case"q":case"qq":return _t(n.length,t);case"qo":return r.ordinalNumber(t,{unit:"quarter"});case"qqq":return r.quarter(t,{width:"abbreviated",context:"standalone"})||r.quarter(t,{width:"narrow",context:"standalone"});case"qqqqq":return r.quarter(t,{width:"narrow",context:"standalone"});default:return r.quarter(t,{width:"wide",context:"standalone"})||r.quarter(t,{width:"abbreviated",context:"standalone"})||r.quarter(t,{width:"narrow",context:"standalone"})}}validate(t,n){return n>=1&&n<=4}set(t,n,r){return t.setMonth((r-1)*3,1),t.setHours(0,0,0,0),t}incompatibleTokens=["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"]}class jj extends rt{incompatibleTokens=["Y","R","q","Q","L","w","I","D","i","e","c","t","T"];priority=110;parse(t,n,r){const o=i=>i-1;switch(n){case"M":return Nt(It(Dt.month,t),o);case"MM":return Nt(_t(2,t),o);case"Mo":return Nt(r.ordinalNumber(t,{unit:"month"}),o);case"MMM":return r.month(t,{width:"abbreviated",context:"formatting"})||r.month(t,{width:"narrow",context:"formatting"});case"MMMMM":return r.month(t,{width:"narrow",context:"formatting"});default:return r.month(t,{width:"wide",context:"formatting"})||r.month(t,{width:"abbreviated",context:"formatting"})||r.month(t,{width:"narrow",context:"formatting"})}}validate(t,n){return n>=0&&n<=11}set(t,n,r){return t.setMonth(r,1),t.setHours(0,0,0,0),t}}class Rj extends rt{priority=110;parse(t,n,r){const o=i=>i-1;switch(n){case"L":return Nt(It(Dt.month,t),o);case"LL":return Nt(_t(2,t),o);case"Lo":return Nt(r.ordinalNumber(t,{unit:"month"}),o);case"LLL":return r.month(t,{width:"abbreviated",context:"standalone"})||r.month(t,{width:"narrow",context:"standalone"});case"LLLLL":return r.month(t,{width:"narrow",context:"standalone"});default:return r.month(t,{width:"wide",context:"standalone"})||r.month(t,{width:"abbreviated",context:"standalone"})||r.month(t,{width:"narrow",context:"standalone"})}}validate(t,n){return n>=0&&n<=11}set(t,n,r){return t.setMonth(r,1),t.setHours(0,0,0,0),t}incompatibleTokens=["Y","R","q","Q","M","w","I","D","i","e","c","t","T"]}function Bj(e,t,n){const r=Je(e,n?.in),o=kS(r,n)-t;return r.setDate(r.getDate()-o*7),Je(r,n?.in)}class Hj extends rt{priority=100;parse(t,n,r){switch(n){case"w":return It(Dt.week,t);case"wo":return r.ordinalNumber(t,{unit:"week"});default:return _t(n.length,t)}}validate(t,n){return n>=1&&n<=53}set(t,n,r,o){return tr(Bj(t,r,o),o)}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","i","t","T"]}function Wj(e,t,n){const r=Je(e,n?.in),o=ES(r,n)-t;return r.setDate(r.getDate()-o*7),r}class qj extends rt{priority=100;parse(t,n,r){switch(n){case"I":return It(Dt.week,t);case"Io":return r.ordinalNumber(t,{unit:"week"});default:return _t(n.length,t)}}validate(t,n){return n>=1&&n<=53}set(t,n,r){return bi(Wj(t,r))}incompatibleTokens=["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"]}const Uj=[31,28,31,30,31,30,31,31,30,31,30,31],Gj=[31,29,31,30,31,30,31,31,30,31,30,31];class Yj extends rt{priority=90;subPriority=1;parse(t,n,r){switch(n){case"d":return It(Dt.date,t);case"do":return r.ordinalNumber(t,{unit:"date"});default:return _t(n.length,t)}}validate(t,n){const r=t.getFullYear(),o=LS(r),i=t.getMonth();return o?n>=1&&n<=Gj[i]:n>=1&&n<=Uj[i]}set(t,n,r){return t.setDate(r),t.setHours(0,0,0,0),t}incompatibleTokens=["Y","R","q","Q","w","I","D","i","e","c","t","T"]}class Kj extends rt{priority=90;subpriority=1;parse(t,n,r){switch(n){case"D":case"DD":return It(Dt.dayOfYear,t);case"Do":return r.ordinalNumber(t,{unit:"date"});default:return _t(n.length,t)}}validate(t,n){const r=t.getFullYear();return LS(r)?n>=1&&n<=366:n>=1&&n<=365}set(t,n,r){return t.setMonth(0,r),t.setHours(0,0,0,0),t}incompatibleTokens=["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"]}function Gp(e,t,n){const r=yo(),o=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,i=Je(e,n?.in),a=i.getDay(),l=(t%7+7)%7,c=7-o,u=t<0||t>6?t-(a+c)%7:(l+c)%7-(a+c)%7;return Gl(i,u,n)}class Zj extends rt{priority=90;parse(t,n,r){switch(n){case"E":case"EE":case"EEE":return r.day(t,{width:"abbreviated",context:"formatting"})||r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"});case"EEEEE":return r.day(t,{width:"narrow",context:"formatting"});case"EEEEEE":return r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"});default:return r.day(t,{width:"wide",context:"formatting"})||r.day(t,{width:"abbreviated",context:"formatting"})||r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"})}}validate(t,n){return n>=0&&n<=6}set(t,n,r,o){return t=Gp(t,r,o),t.setHours(0,0,0,0),t}incompatibleTokens=["D","i","e","c","t","T"]}class Xj extends rt{priority=90;parse(t,n,r,o){const i=a=>{const s=Math.floor((a-1)/7)*7;return(a+o.weekStartsOn+6)%7+s};switch(n){case"e":case"ee":return Nt(_t(n.length,t),i);case"eo":return Nt(r.ordinalNumber(t,{unit:"day"}),i);case"eee":return r.day(t,{width:"abbreviated",context:"formatting"})||r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"});case"eeeee":return r.day(t,{width:"narrow",context:"formatting"});case"eeeeee":return r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"});default:return r.day(t,{width:"wide",context:"formatting"})||r.day(t,{width:"abbreviated",context:"formatting"})||r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"})}}validate(t,n){return n>=0&&n<=6}set(t,n,r,o){return t=Gp(t,r,o),t.setHours(0,0,0,0),t}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"]}class Qj extends rt{priority=90;parse(t,n,r,o){const i=a=>{const s=Math.floor((a-1)/7)*7;return(a+o.weekStartsOn+6)%7+s};switch(n){case"c":case"cc":return Nt(_t(n.length,t),i);case"co":return Nt(r.ordinalNumber(t,{unit:"day"}),i);case"ccc":return r.day(t,{width:"abbreviated",context:"standalone"})||r.day(t,{width:"short",context:"standalone"})||r.day(t,{width:"narrow",context:"standalone"});case"ccccc":return r.day(t,{width:"narrow",context:"standalone"});case"cccccc":return r.day(t,{width:"short",context:"standalone"})||r.day(t,{width:"narrow",context:"standalone"});default:return r.day(t,{width:"wide",context:"standalone"})||r.day(t,{width:"abbreviated",context:"standalone"})||r.day(t,{width:"short",context:"standalone"})||r.day(t,{width:"narrow",context:"standalone"})}}validate(t,n){return n>=0&&n<=6}set(t,n,r,o){return t=Gp(t,r,o),t.setHours(0,0,0,0),t}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"]}function Jj(e,t,n){const r=Je(e,n?.in),o=kj(r,n),i=t-o;return Gl(r,i,n)}class eR extends rt{priority=90;parse(t,n,r){const o=i=>i===0?7:i;switch(n){case"i":case"ii":return _t(n.length,t);case"io":return r.ordinalNumber(t,{unit:"day"});case"iii":return Nt(r.day(t,{width:"abbreviated",context:"formatting"})||r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"}),o);case"iiiii":return Nt(r.day(t,{width:"narrow",context:"formatting"}),o);case"iiiiii":return Nt(r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"}),o);default:return Nt(r.day(t,{width:"wide",context:"formatting"})||r.day(t,{width:"abbreviated",context:"formatting"})||r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"}),o)}}validate(t,n){return n>=1&&n<=7}set(t,n,r){return t=Jj(t,r),t.setHours(0,0,0,0),t}incompatibleTokens=["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"]}class tR extends rt{priority=80;parse(t,n,r){switch(n){case"a":case"aa":case"aaa":return r.dayPeriod(t,{width:"abbreviated",context:"formatting"})||r.dayPeriod(t,{width:"narrow",context:"formatting"});case"aaaaa":return r.dayPeriod(t,{width:"narrow",context:"formatting"});default:return r.dayPeriod(t,{width:"wide",context:"formatting"})||r.dayPeriod(t,{width:"abbreviated",context:"formatting"})||r.dayPeriod(t,{width:"narrow",context:"formatting"})}}set(t,n,r){return t.setHours(Up(r),0,0,0),t}incompatibleTokens=["b","B","H","k","t","T"]}class nR extends rt{priority=80;parse(t,n,r){switch(n){case"b":case"bb":case"bbb":return r.dayPeriod(t,{width:"abbreviated",context:"formatting"})||r.dayPeriod(t,{width:"narrow",context:"formatting"});case"bbbbb":return r.dayPeriod(t,{width:"narrow",context:"formatting"});default:return r.dayPeriod(t,{width:"wide",context:"formatting"})||r.dayPeriod(t,{width:"abbreviated",context:"formatting"})||r.dayPeriod(t,{width:"narrow",context:"formatting"})}}set(t,n,r){return t.setHours(Up(r),0,0,0),t}incompatibleTokens=["a","B","H","k","t","T"]}class rR extends rt{priority=80;parse(t,n,r){switch(n){case"B":case"BB":case"BBB":return r.dayPeriod(t,{width:"abbreviated",context:"formatting"})||r.dayPeriod(t,{width:"narrow",context:"formatting"});case"BBBBB":return r.dayPeriod(t,{width:"narrow",context:"formatting"});default:return r.dayPeriod(t,{width:"wide",context:"formatting"})||r.dayPeriod(t,{width:"abbreviated",context:"formatting"})||r.dayPeriod(t,{width:"narrow",context:"formatting"})}}set(t,n,r){return t.setHours(Up(r),0,0,0),t}incompatibleTokens=["a","b","t","T"]}class oR extends rt{priority=70;parse(t,n,r){switch(n){case"h":return It(Dt.hour12h,t);case"ho":return r.ordinalNumber(t,{unit:"hour"});default:return _t(n.length,t)}}validate(t,n){return n>=1&&n<=12}set(t,n,r){const o=t.getHours()>=12;return o&&r<12?t.setHours(r+12,0,0,0):!o&&r===12?t.setHours(0,0,0,0):t.setHours(r,0,0,0),t}incompatibleTokens=["H","K","k","t","T"]}class iR extends rt{priority=70;parse(t,n,r){switch(n){case"H":return It(Dt.hour23h,t);case"Ho":return r.ordinalNumber(t,{unit:"hour"});default:return _t(n.length,t)}}validate(t,n){return n>=0&&n<=23}set(t,n,r){return t.setHours(r,0,0,0),t}incompatibleTokens=["a","b","h","K","k","t","T"]}class aR extends rt{priority=70;parse(t,n,r){switch(n){case"K":return It(Dt.hour11h,t);case"Ko":return r.ordinalNumber(t,{unit:"hour"});default:return _t(n.length,t)}}validate(t,n){return n>=0&&n<=11}set(t,n,r){return t.getHours()>=12&&r<12?t.setHours(r+12,0,0,0):t.setHours(r,0,0,0),t}incompatibleTokens=["h","H","k","t","T"]}class sR extends rt{priority=70;parse(t,n,r){switch(n){case"k":return It(Dt.hour24h,t);case"ko":return r.ordinalNumber(t,{unit:"hour"});default:return _t(n.length,t)}}validate(t,n){return n>=1&&n<=24}set(t,n,r){const o=r<=24?r%24:r;return t.setHours(o,0,0,0),t}incompatibleTokens=["a","b","h","H","K","t","T"]}class lR extends rt{priority=60;parse(t,n,r){switch(n){case"m":return It(Dt.minute,t);case"mo":return r.ordinalNumber(t,{unit:"minute"});default:return _t(n.length,t)}}validate(t,n){return n>=0&&n<=59}set(t,n,r){return t.setMinutes(r,0,0),t}incompatibleTokens=["t","T"]}class cR extends rt{priority=50;parse(t,n,r){switch(n){case"s":return It(Dt.second,t);case"so":return r.ordinalNumber(t,{unit:"second"});default:return _t(n.length,t)}}validate(t,n){return n>=0&&n<=59}set(t,n,r){return t.setSeconds(r,0),t}incompatibleTokens=["t","T"]}class uR extends rt{priority=30;parse(t,n){const r=o=>Math.trunc(o*Math.pow(10,-n.length+3));return Nt(_t(n.length,t),r)}set(t,n,r){return t.setMilliseconds(r),t}incompatibleTokens=["t","T"]}class dR extends rt{priority=10;parse(t,n){switch(n){case"X":return rr(nr.basicOptionalMinutes,t);case"XX":return rr(nr.basic,t);case"XXXX":return rr(nr.basicOptionalSeconds,t);case"XXXXX":return rr(nr.extendedOptionalSeconds,t);default:return rr(nr.extended,t)}}set(t,n,r){return n.timestampIsSet?t:ut(t,t.getTime()-Yl(t)-r)}incompatibleTokens=["t","T","x"]}class fR extends rt{priority=10;parse(t,n){switch(n){case"x":return rr(nr.basicOptionalMinutes,t);case"xx":return rr(nr.basic,t);case"xxxx":return rr(nr.basicOptionalSeconds,t);case"xxxxx":return rr(nr.extendedOptionalSeconds,t);default:return rr(nr.extended,t)}}set(t,n,r){return n.timestampIsSet?t:ut(t,t.getTime()-Yl(t)-r)}incompatibleTokens=["t","T","X"]}class pR extends rt{priority=40;parse(t){return NS(t)}set(t,n,r){return[ut(t,r*1e3),{timestampIsSet:!0}]}incompatibleTokens="*"}class hR extends rt{priority=20;parse(t){return NS(t)}set(t,n,r){return[ut(t,r),{timestampIsSet:!0}]}incompatibleTokens="*"}const mR={G:new Dj,y:new Nj,Y:new Fj,R:new Lj,u:new Vj,Q:new $j,q:new zj,M:new jj,L:new Rj,w:new Hj,I:new qj,d:new Yj,D:new Kj,E:new Zj,e:new Xj,c:new Qj,i:new eR,a:new tR,b:new nR,B:new rR,h:new oR,H:new iR,K:new aR,k:new sR,m:new lR,s:new cR,S:new uR,X:new dR,x:new fR,t:new pR,T:new hR},gR=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,vR=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,yR=/^'([^]*?)'?$/,bR=/''/g,xR=/\S/,wR=/[a-zA-Z]/;function SR(e,t,n,r){const o=()=>ut(n,NaN),i=Ej(),a=i.locale??TS,s=i.firstWeekContainsDate??i.locale?.options?.firstWeekContainsDate??1,l=i.weekStartsOn??i.locale?.options?.weekStartsOn??0;if(!t)return e?o():Je(n,r?.in);const c={firstWeekContainsDate:s,weekStartsOn:l,locale:a},u=[new Mj(r?.in,n)],d=t.match(vR).map(m=>{const y=m[0];if(y in Hp){const x=Hp[y];return x(m,a.formatLong)}return m}).join("").match(gR),f=[];for(let m of d){MS(m)&&Wp(m,t,e),_S(m)&&Wp(m,t,e);const y=m[0],x=mR[y];if(x){const{incompatibleTokens:b}=x;if(Array.isArray(b)){const T=f.find(I=>b.includes(I.token)||I.token===y);if(T)throw new RangeError(`The format string mustn't contain \`${T.fullToken}\` and \`${m}\` at the same time`)}else if(x.incompatibleTokens==="*"&&f.length>0)throw new RangeError(`The format string mustn't contain \`${m}\` and any other token at the same time`);f.push({token:y,fullToken:m});const E=x.run(e,m,a.match,c);if(!E)return o();u.push(E.setter),e=E.rest}else{if(y.match(wR))throw new RangeError("Format string contains an unescaped latin alphabet character `"+y+"`");if(m==="''"?m="'":y==="'"&&(m=TR(m)),e.indexOf(m)===0)e=e.slice(m.length);else return o()}}if(e.length>0&&xR.test(e))return o();const p=u.map(m=>m.priority).sort((m,y)=>y-m).filter((m,y,x)=>x.indexOf(m)===y).map(m=>u.filter(y=>y.priority===m).sort((y,x)=>x.subPriority-y.subPriority)).map(m=>m[0]);let v=Je(n,r?.in);if(isNaN(+v))return o();const h={};for(const m of p){if(!m.validate(v,c))return o();const y=m.set(v,h,c);Array.isArray(y)?(v=y[0],Object.assign(h,y[1])):v=y}return v}function TR(e){return e.match(yR)[1].replace(bR,"'")}function ER(e,t,n){const[r,o]=Kl(n?.in,e,t);return r.getFullYear()===o.getFullYear()&&r.getMonth()===o.getMonth()}function kR(e,t){return Pz(ut(e,e),Az(e))}function CR(e,t,n){return Gl(e,-t,n)}function IR(e,t,n){const r=Je(e,n?.in),o=r.getFullYear(),i=r.getDate(),a=ut(e,0);a.setFullYear(o,t,15),a.setHours(0,0,0,0);const s=Tj(a);return r.setMonth(t,Math.min(i,s)),r}function AR(e,t,n){let r=Je(e,n?.in);return isNaN(+r)?ut(e,NaN):(t.year!=null&&r.setFullYear(t.year),t.month!=null&&(r=IR(r,t.month)),t.date!=null&&r.setDate(t.date),t.hours!=null&&r.setHours(t.hours),t.minutes!=null&&r.setMinutes(t.minutes),t.seconds!=null&&r.setSeconds(t.seconds),t.milliseconds!=null&&r.setMilliseconds(t.milliseconds),r)}function PR(e,t,n){const r=Je(e,n?.in);return isNaN(+r)?ut(e,NaN):(r.setFullYear(t),r)}function OR(e,t,n){return bS(e,-t,n)}function Ba(e,t,n){const{years:r=0,months:o=0,weeks:i=0,days:a=0,hours:s=0,minutes:l=0,seconds:c=0}=t,u=OR(e,o+r*12,n),d=CR(u,a+i*7,n),f=l+s*60,v=(c+f*60)*1e3;return ut(e,+d-v)}const _R=(e,t=0)=>{let n;return function(...o){clearTimeout(n),n=setTimeout(()=>e(...o),t)}};function MR(e,t){return S.useRef(_R(e,t)).current}function VS(e,t){const n=S.useRef(null);return{onTouchStart:i=>n.current=i.touches[0].clientX,onTouchEnd:i=>{if(n.current===null)return;const s=i.changedTouches[0].clientX-n.current;Math.abs(s)>t&&e(i,s>0?"right":"left"),n.current=null}}}const DR=/^(?<hour>\d\d):(?<min>\d\d)$/,NR={type:"spring",bounce:.3,duration:.6},$S=e=>(t=1)=>({x:`${100*e*t}%`,opacity:.25}),zS={enter:$S(1),exit:$S(-1),middle:{x:"0%",opacity:1}},jS={exit:{visibility:"hidden"}},FR=e=>{const t=tr(SS(e));return wS({start:t,end:yi(t,{days:41})})},RS=(e,t)=>e.toLocaleDateString(t,{month:"long"}),LR=(e,t,n)=>Array.from({length:12}).map((r,o)=>{const i=SS(new Date(1970,o,1).setMonth(o)),a=RS(i,n);return g.jsx("option",{value:a,"data-index":o,children:a},`${e}-${a}`)}),Yp={ArrowLeft:(e,t)=>t==="days"?Ba(e,{days:1}):Ba(e,{months:1}),ArrowRight:(e,t)=>t==="days"?yi(e,{days:1}):yi(e,{months:1}),ArrowUp:(e,t)=>t==="days"?Ba(e,{weeks:1}):Ba(e,{years:1}),ArrowDown:(e,t)=>t==="days"?yi(e,{weeks:1}):yi(e,{years:1})},BS=(e,t,n,r=0)=>{const o=n.toISOString(),i=()=>{if(e?.dataset.focustrap){const a=t.current?.querySelector(`button[data-focustrap="${e?.dataset.focustrap}"]`);return setTimeout(()=>a?.focus({preventScroll:!0}),r)}if(t.current){const a=t.current.querySelector(`button[data-date="${o}"]`);if(a)return a.focus({preventScroll:!0})}};r===0&&i(),setTimeout(i,r)},wo=e=>e.getFullYear().toString().padStart(4,"0"),VR=(e,t,n)=>e===void 0||n===void 0?!1:Cj(t,e)&&Ij(t,n),$R=e=>{const t=Pt();return g.jsx(Be.tbody,{layout:!0,variants:zS,custom:e.direction,onKeyDown:e.onKeyDown,className:Oe(e.styles?.week),children:e.zip.map((n,r)=>{const o=Re.function(e.styles?.week)?e.styles?.week(n):e.styles?.week;return g.jsx("tr",{className:o,children:n.map(i=>{const a=i.toISOString(),s=e.rangeMode?a===e.range?.to?.toISOString()||a===e.range?.from?.toISOString():a===(e.date?bo(e.date).toISOString():void 0),l=kR(i)&&e.markToday,c=e.disabledDate?.(i)||!1,u=ER(i,e.stateDate),d=!u||c,f=e.rangeMode?VR(e.range?.from,i,e.range?.to):!1;return g.jsxs("td",{align:"center",className:Oe("relative",Re.function(e.styles?.dayFrame)?e.styles?.dayFrame(i):e.styles?.dayFrame),children:[g.jsxs("button",{type:"button","data-date":a,disabled:c,"data-samemonth":u,"data-range":e.rangeMode,onClick:e.dispatch.onSelectDate,"data-view":e.stateDate.getMonth().toString(),className:Oe(`flex size-10 items-center justify-center rounded-full proportional-nums disabled:cursor-not-allowed ${l?"text-emphasis":""} ${d?"text-disabled":""} ${s?"bg-primary text-primary-foreground":""}`,f&&e.markRange?"size-10 border border-dashed border-card-border":"",Re.function(e.styles?.day)?e.styles?.day(i):e.styles?.day),children:[i.getDate(),s&&e.stateRange.from?.toISOString()===a?g.jsx("span",{className:"absolute -top-2 left-0 h-full w-full",children:g.jsx("span",{className:"text-xs text-foreground",children:e.labelRange?.from??t.calendarFromDate})}):null,s&&e.stateRange.to?.toISOString()===a?g.jsx("span",{className:"absolute -top-2 left-0 h-full w-full",children:g.jsx("span",{className:"text-xs text-foreground",children:e.labelRange?.to??t.calendarToDate})}):null]}),e.RenderOnDay?g.jsx(e.RenderOnDay,{date:i}):null]},a)})},`week-${n.length}-${r}`)})})},zR=()=>bo(new Date),HS=({RenderOnDay:e,changeOnlyOnClick:t=!1,labelRange:n,disabledDate:r,locale:o,markToday:i=!0,onChangeMonth:a,onChangeYear:s,rangeMode:l=!1,onChange:c,styles:u,markRange:d=!0,type:f="date",datetimeTitle:p,...v})=>{const h=S.useRef(Bo()),m=Pt(),y=sl(o),x=S.useRef(null),{date:b,range:E}=v,T=b||new Date,I=S.useRef(null),[w,k]=Yf({date:T,isAnimating:!1,year:wo(T),direction:void 0,range:{from:E?.from,to:E?.to},months:LR(h.current,T,y),selectMode:l?"from":void 0,week:wS({start:tr(T),end:Dz(T)})},M=>({onChangeYear:C=>({year:C}),onExitComplete:()=>(BS(I.current||null,x,M.state().date,200),I.current=null,{isAnimating:!1}),date:C=>{const L=C(M.state().date);return{date:L,year:wo(L)}},nextMonth:C=>{C&&(I.current=C.currentTarget);const L=M.state();if(L.isAnimating)return L;const $=yi(L.date,{months:1});return{date:$,isAnimating:!0,direction:1,year:wo($)}},previousMonth:C=>{C&&(I.current=C.currentTarget);const L=M.state();if(L.isAnimating)return L;const $=Ba(L.date,{months:1});return{date:$,isAnimating:!0,direction:-1,year:wo($)}},onSelectDate:C=>{const L=M.state(),$=C.currentTarget.dataset.range==="true",B=C.currentTarget.dataset.date||"",q=new Date(B);return{date:q,year:wo(q),selectMode:L.selectMode===void 0?void 0:L.selectMode==="from"?"to":"from",range:$?{from:L.selectMode==="from"?q:L.range.from,to:L.selectMode==="to"?q:L.range.to}:L.range}},onChangeMonth:C=>{const L=C.target.value,B=Array.from(C.target.options).find(G=>G.value===L),q=M.state();if(B){const G=B.dataset.index||"",W=new Date(M.state().date);return W.setMonth(+G),{...q,date:W,year:wo(W)}}return q},onKeyDown:C=>{const L=C.key,$=M.state();if(L in Yp){(L==="ArrowUp"||L==="ArrowDown")&&C.preventDefault();const B=M.state().date,q=Re.keyof(Yp,L)?Yp[L](B,C.shiftKey?"month":"days"):null;if(q!==null)return BS(C.target,x,q),{...$,date:q,year:wo(q)}}return M.state()}}),{props:{onChangeMonth:a,onChangeYear:s},postMiddleware:[(M,C,L)=>((L.method==="onChangeMonth"||L.method==="previousMonth"||L.method==="nextMonth")&&L.props.onChangeMonth?.(M.date),M),(M,C,L)=>(L.method==="onChangeYear"&&L.props.onChangeYear?.(M.date),M),(M,C,L)=>{const $=L.method==="onSelectDate"||L.method==="setToday"||L.method==="onKeyDown";return l&&$&&t?(c?.(M.range),M):($&&t&&c?.(M.date),M)}]}),P=FR(w.date),_=iy(P,7),F=w.date.toISOString(),V=RS(w.date,y);S.useEffect(()=>{t||c?.(w.date)},[F,t]);const D=MR(M=>k.date(C=>PR(new Date(C),+M)),1200),O=M=>{const C=M.currentTarget.value;k.onChangeYear(C),s?.(new Date(C)),D(C)},N=VS((M,C)=>(M.preventDefault(),C==="right"?k.previousMonth():k.nextMonth()),10),z=()=>{const M=zR();k.date(()=>M),c?.(M)};return g.jsx(Mf,{transition:NR,children:g.jsxs("div",{ref:x,"data-component":"calendar",onTouchEnd:N.onTouchEnd,onTouchStart:N.onTouchStart,className:Oe("relative overflow-hidden",Re.function(u?.calendar)?u?.calendar(P):u?.calendar),children:[g.jsx("div",{className:"flex flex-col justify-center rounded-sm text-center",children:g.jsx(Nn,{initial:!1,mode:"popLayout",custom:w.direction,onExitComplete:k.onExitComplete,children:g.jsxs(Be.div,{initial:"enter",animate:"middle",exit:"exit",children:[g.jsxs("header",{className:"relative flex justify-between",children:[g.jsx(Be.button,{layout:!0,type:"button","data-focustrap":"prev",variants:jS,onClick:k.previousMonth,title:m.calendarBackMonth,className:"z-calendar rounded-full p-1.5 hover:bg-primary hover:text-primary-foreground",children:g.jsx(YC,{className:"h-4 w-4"})}),g.jsx(Be.span,{layout:!0,variants:zS,custom:w.direction,className:"absolute inset-0 isolate z-normal flex items-center justify-center font-semibold",children:g.jsxs("span",{className:"flex w-fit items-center justify-center gap-0.5 py-1",children:[g.jsx("select",{value:V,onChange:k.onChangeMonth,"aria-label":m.calendarMonthLabel,style:{width:`${V.length+1}ch`},className:"cursor-pointer appearance-none bg-transparent capitalize proportional-nums hover:text-primary",children:w.months}),g.jsx(Sg,{mask:"int",maxLength:4,placeholder:"YYYY",value:w.year,onChange:O,style:{width:`${w.year.length}ch`},className:"w-16 cursor-pointer appearance-none bg-transparent hover:text-primary"})]})}),g.jsx(Be.button,{layout:!0,type:"button","data-focustrap":"next",variants:jS,onClick:k.nextMonth,title:m.calendarNextMonth,className:"z-calendar rounded-full p-1.5 hover:bg-primary hover:text-primary-foreground",children:g.jsx(vu,{className:"h-4 w-4"})}),g.jsx("div",{className:"absolute inset-0",style:{backgroundImage:"linear-gradient(to right, hsla(var(--card-background)) 15%, transparent 30%, transparent 70%, hsla(var(--card-background)) 85%)"}})]}),g.jsxs(Be.table,{className:"mt-2 table min-w-full table-auto border-0",children:[g.jsx("thead",{children:g.jsx("tr",{children:w.week.map(M=>g.jsx("th",{role:"columnheader",className:Oe("py-2 text-sm font-medium capitalize",Re.function(u?.weekDay)?u.weekDay(M):u?.weekDay),children:M.toLocaleDateString(y,{weekday:"short"})},M.toString()))})}),g.jsx($R,{zip:_,range:E,styles:u,date:b||null,dispatch:k,markRange:d,markToday:i,rangeMode:l,stateDate:w.date,labelRange:n,stateRange:w.range,RenderOnDay:e,direction:w.direction,disabledDate:r,onKeyDown:k.onKeyDown})]})]},V)})}),f==="datetime"?g.jsx("section",{className:"grid items-center my-4",children:g.jsx(Wo,{info:null,mask:"time",optionalText:" ",container:"w-full",reportStatus:!1,defaultValue:b?qp(b,"HH:mm"):void 0,title:p||m.calendarDatetimeTitle,onChange:M=>{const C=M.target.value,L=DR.exec(C);if(!L)return;const $=L.groups.hour,B=L.groups.min,q=AR(w.date,{hours:Number($),minutes:Number(B),seconds:0});k.date(()=>q),c?.(q)}})}):null,g.jsx("footer",{className:"mt-2 text-center text-primary",children:g.jsx("button",{type:"button",onClick:z,className:"transition-transform duration-300 hover:scale-105",children:m.calendarToday})})]})})},Kp=A.createContext(void 0);process.env.NODE_ENV!=="production"&&(Kp.displayName="ProgressRootContext");function jR(){const e=A.useContext(Kp);if(e===void 0)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: ProgressRootContext is missing. Progress parts must be placed within <Progress.Root>.":Ir(51));return e}let Zp=(function(e){return e.complete="data-complete",e.indeterminate="data-indeterminate",e.progressing="data-progressing",e})({});const WS={status(e){return e==="progressing"?{[Zp.progressing]:""}:e==="complete"?{[Zp.complete]:""}:e==="indeterminate"?{[Zp.indeterminate]:""}:null}};function RR(e,t,n){return e==null?"":n?Uo(e,t,n):Uo(e/100,t,{style:"percent"})}function BR(e,t){return t==null?"indeterminate progress":e||`${t}%`}const qS=A.forwardRef(function(t,n){const{format:r,getAriaValueText:o=BR,locale:i,max:a=100,min:s=0,value:l,render:c,className:u,...d}=t,[f,p]=A.useState(),v=rd(r);let h="indeterminate";Number.isFinite(l)&&(h=l===a?"complete":"progressing");const m=RR(l,i,v.current),y=A.useMemo(()=>({status:h}),[h]),x={"aria-labelledby":f,"aria-valuemax":a,"aria-valuemin":s,"aria-valuenow":l??void 0,"aria-valuetext":o(m,l),role:"progressbar"},b=A.useMemo(()=>({formattedValue:m,max:a,min:s,setLabelId:p,state:y,status:h,value:l}),[m,a,s,p,y,h,l]),E=an("div",t,{state:y,ref:n,props:[x,d],stateAttributesMapping:WS});return g.jsx(Kp.Provider,{value:b,children:E})});process.env.NODE_ENV!=="production"&&(qS.displayName="ProgressRoot");const US=A.forwardRef(function(t,n){const{render:r,className:o,...i}=t,{max:a,min:s,value:l,state:c}=jR(),u=Number.isFinite(l)&&l!==null?el(l,s,a):null,d=A.useCallback(()=>u==null?{}:{insetInlineStart:0,height:"inherit",width:`${u}%`},[u]);return an("div",t,{state:c,ref:n,props:[{style:d()},i],stateAttributesMapping:WS})});process.env.NODE_ENV!=="production"&&(US.displayName="ProgressIndicator");const HR=e=>g.jsxs(qS,{max:e.max,value:e.percent??null,style:{transform:"translateZ(0)"},className:Oe("overflow-hidden relative w-full rounded-full h-6 bg-background",e.container),children:[g.jsx(US,{style:{transform:Re.number(e.percent)?`translateX(-${100-e.percent}%)`:void 0},className:Oe("bg-primary transition-transform ease-in-out size-full duration-500",e.className)}),Re.number(e.percent)?g.jsx("p",{className:Oe("flex absolute inset-0 justify-center items-center w-full font-semibold tabular-nums text-primary-foreground",e.textClassName),children:e.label?e.label:`${e.percent} %`}):null]}),Ql=e=>g.jsxs("li",{"data-component":"timeline-item",className:"relative pb-12",role:"listitem",children:[g.jsx("span",{"aria-hidden":"true",className:"absolute left-6 top-8 -ml-px h-full w-0.5 bg-card-border"}),g.jsx("div",{className:"relative flex items-stretch justify-start space-x-3",children:e.children})]});Ql.Icon=function(t){return g.jsx("header",{...t,className:Oe("flex size-12 items-center justify-center rounded-full bg-primary p-2 text-primary-foreground",t.className),children:t.children})},Ql.Body=function(t){return g.jsx(ln,{...t,className:Oe("min-w-0 flex-1",t.className),children:t.children})},Ql.Right=function(t){return g.jsx("footer",{className:"flex gap-6 self-stretch px-4 align-baseline",children:g.jsx(ln,{...t,type:"button"})})};const WR=e=>g.jsx("ul",{"data-component":"timeline",role:"list",className:"flow-root [&>li:last-child>span[aria-hidden=true]]:hidden",children:e.children}),qR=e=>g.jsx(Be.div,{className:"sticky bottom-4 flex items-center justify-center rounded-lg border border-card-border bg-background p-4",children:e.children}),GS=new Date(1970,11,31),Xp={year:()=>[/\d/,/\d/,/\d/,/\d/],month:()=>[/\d/,/\d/],day:()=>[/\d/,/\d/],hour:()=>[/\d/,/\d/],minute:()=>[/\d/,/\d/],literal:e=>e.split("")},YS={day:()=>"dd",hour:()=>"HH",month:()=>"MM",minute:()=>"mm",year:()=>"yyyy",literal:e=>e},UR={literal:(e,t)=>t,year:e=>e.getFullYear().toString(),day:e=>e.getDate().toString().padStart(2,"0"),hour:e=>e.getHours().toString().padStart(2,"0"),minute:e=>e.getMinutes().toString().padStart(2,"0"),month:e=>(e.getMonth()+1).toString().padStart(2,"0")},Qp=(e,t)=>{try{return e.formatToParts(t).map(n=>n.type==="literal"&&n.value===", "?{type:n.type,value:" "}:n)}catch{return[]}},GR={day:"numeric",month:"numeric",year:"numeric",hour:"numeric",minute:"numeric"},YR={day:"numeric",month:"numeric",year:"numeric"},KR=S.forwardRef(({date:e,locale:t,disabledDate:n,onChange:r,markToday:o,clickToClose:i,floating:a=!0,type:s,...l},c)=>{const u=sl(t),d=S.useId(),f=Pt(),p=S.useMemo(()=>new Intl.DateTimeFormat(u,s==="datetime"?GR:YR),[u,s]),[v,h]=S.useState(e||void 0),[m,y]=S.useState(!1),x=Qp(p,GS).flatMap(V=>Re.keyof(Xp,V.type)?Xp[V.type](V.value):[]),b=S.useMemo(()=>Qp(p,GS).reduce((V,D)=>V+(Re.keyof(YS,D.type)?YS[D.type](D.value):""),""),[p]),E=e?.toISOString(),[T,I]=S.useState(v?Qp(p,v).reduce((V,D)=>V+(Re.keyof(Xp,D.type)?UR[D.type](v,D.value):""),""):""),w=V=>{const D=V.target.value;if(I(D),x.length===D.length&&x.every((N,z)=>{const M=D.charAt(z);return typeof N=="string"?M===N:N.test(M)})){const N=SR(D,b,new Date),z=s==="datetime"?N:bo(N);return h(z),r?.(z)}return h(void 0),r?.(void 0)};S.useEffect(()=>{Zl(e)&&(h(e),I(qp(e,b)))},[E,b]);const k=V=>(h(V),r?.(V),i&&y(!1),I(V?qp(V,b):"")),P=Zl(v),_=P?v.toISOString():void 0,F=g.jsx(HS,{...l,type:s,locale:u,changeOnlyOnClick:!0,markToday:o,onChange:k,disabledDate:n,date:P?v:void 0});return g.jsx(S.Fragment,{children:g.jsx(Wo,{...l,mask:x,value:T,id:void 0,name:void 0,"data-value":_,formNoValidate:!m,"data-target":l.name,"data-component":"date-picker",onChange:w,required:l.required??!0,error:m?void 0:l.error,placeholder:l.placeholder||f.datepickerPlaceholder(b),right:a?g.jsxs(S.Fragment,{children:[g.jsx("input",{"data-origin":l.name,defaultValue:_,form:l.form,hidden:!0,id:l.name,name:l.name,ref:c,type:"date"}),g.jsx(mi,{open:m,onChange:y,buttonProps:{"aria-describedby":d},trigger:g.jsxs("span",{"aria-labelledby":d,children:[g.jsx("span",{id:d,className:"sr-only",children:f.datePickerCalendarButtonLabel}),g.jsx(GC,{})]}),children:F})]}):null})})}),ZR=["B","kB","MB","GB","TB","PB","EB","ZB","YB"],XR=["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],QR=["b","kbit","Mbit","Gbit","Tbit","Pbit","Ebit","Zbit","Ybit"],JR=["b","kibit","Mibit","Gibit","Tibit","Pibit","Eibit","Zibit","Yibit"],KS=(e,t,n)=>{let r=e;return typeof t=="string"||Array.isArray(t)?r=e.toLocaleString(t,n):(t===!0||n!==void 0)&&(r=e.toLocaleString(void 0,n)),r},ZS=e=>{if(typeof e=="number")return Math.log10(e);const t=e.toString(10);return t.length+Math.log10(`0.${t.slice(0,15)}`)},eB=e=>typeof e=="number"?Math.log(e):ZS(e)*Math.log(10),tB=(e,t)=>{if(typeof e=="number")return e/t;const n=e/BigInt(t),r=e%BigInt(t);return Number(n)+Number(r)/t},XS=(e,t)=>{if(t===void 0)return e;if(typeof t!="number"||!Number.isSafeInteger(t)||t<0)throw new TypeError(`Expected fixedWidth to be a non-negative integer, got ${typeof t}: ${t}`);return t===0?e:e.length<t?e.padStart(t," "):e},nB=e=>{const{minimumFractionDigits:t,maximumFractionDigits:n}=e;if(!(t===void 0&&n===void 0))return{...t!==void 0&&{minimumFractionDigits:t},...n!==void 0&&{maximumFractionDigits:n},roundingMode:"trunc"}};function rB(e,t){if(typeof e!="bigint"&&!Number.isFinite(e))throw new TypeError(`Expected a finite number, got ${typeof e}: ${e}`);t={bits:!1,binary:!1,space:!0,nonBreakingSpace:!1,...t};const n=t.bits?t.binary?JR:QR:t.binary?XR:ZR,r=t.space?t.nonBreakingSpace?" ":" ":"",o=typeof e=="number"?e===0:e===0n;if(t.signed&&o){const c=` 0${r}${n[0]}`;return XS(c,t.fixedWidth)}const i=e<0,a=i?"-":t.signed?"+":"";i&&(e=-e);const s=nB(t);let l;if(e<1){const c=KS(e,t.locale,s);l=a+c+r+n[0]}else{const c=Math.min(Math.floor(t.binary?eB(e)/Math.log(1024):ZS(e)/3),n.length-1);if(e=tB(e,(t.binary?1024:1e3)**c),!s){const f=Math.max(3,Math.floor(e).toString().length);e=e.toPrecision(f)}const u=KS(Number(e),t.locale,s),d=n[c];l=a+u+r+d}return XS(l,t.fixedWidth)}var Jl={exports:{}},ec={exports:{}},lt={};var QS;function oB(){if(QS)return lt;QS=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,f=e?Symbol.for("react.suspense_list"):60120,p=e?Symbol.for("react.memo"):60115,v=e?Symbol.for("react.lazy"):60116,h=e?Symbol.for("react.block"):60121,m=e?Symbol.for("react.fundamental"):60117,y=e?Symbol.for("react.responder"):60118,x=e?Symbol.for("react.scope"):60119;function b(T){if(typeof T=="object"&&T!==null){var I=T.$$typeof;switch(I){case t:switch(T=T.type,T){case l:case c:case r:case i:case o:case d:return T;default:switch(T=T&&T.$$typeof,T){case s:case u:case v:case p:case a:return T;default:return I}}case n:return I}}}function E(T){return b(T)===c}return lt.AsyncMode=l,lt.ConcurrentMode=c,lt.ContextConsumer=s,lt.ContextProvider=a,lt.Element=t,lt.ForwardRef=u,lt.Fragment=r,lt.Lazy=v,lt.Memo=p,lt.Portal=n,lt.Profiler=i,lt.StrictMode=o,lt.Suspense=d,lt.isAsyncMode=function(T){return E(T)||b(T)===l},lt.isConcurrentMode=E,lt.isContextConsumer=function(T){return b(T)===s},lt.isContextProvider=function(T){return b(T)===a},lt.isElement=function(T){return typeof T=="object"&&T!==null&&T.$$typeof===t},lt.isForwardRef=function(T){return b(T)===u},lt.isFragment=function(T){return b(T)===r},lt.isLazy=function(T){return b(T)===v},lt.isMemo=function(T){return b(T)===p},lt.isPortal=function(T){return b(T)===n},lt.isProfiler=function(T){return b(T)===i},lt.isStrictMode=function(T){return b(T)===o},lt.isSuspense=function(T){return b(T)===d},lt.isValidElementType=function(T){return typeof T=="string"||typeof T=="function"||T===r||T===c||T===i||T===o||T===d||T===f||typeof T=="object"&&T!==null&&(T.$$typeof===v||T.$$typeof===p||T.$$typeof===a||T.$$typeof===s||T.$$typeof===u||T.$$typeof===m||T.$$typeof===y||T.$$typeof===x||T.$$typeof===h)},lt.typeOf=b,lt}var ct={};var JS;function iB(){return JS||(JS=1,process.env.NODE_ENV!=="production"&&(function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,f=e?Symbol.for("react.suspense_list"):60120,p=e?Symbol.for("react.memo"):60115,v=e?Symbol.for("react.lazy"):60116,h=e?Symbol.for("react.block"):60121,m=e?Symbol.for("react.fundamental"):60117,y=e?Symbol.for("react.responder"):60118,x=e?Symbol.for("react.scope"):60119;function b(H){return typeof H=="string"||typeof H=="function"||H===r||H===c||H===i||H===o||H===d||H===f||typeof H=="object"&&H!==null&&(H.$$typeof===v||H.$$typeof===p||H.$$typeof===a||H.$$typeof===s||H.$$typeof===u||H.$$typeof===m||H.$$typeof===y||H.$$typeof===x||H.$$typeof===h)}function E(H){if(typeof H=="object"&&H!==null){var se=H.$$typeof;switch(se){case t:var ie=H.type;switch(ie){case l:case c:case r:case i:case o:case d:return ie;default:var Q=ie&&ie.$$typeof;switch(Q){case s:case u:case v:case p:case a:return Q;default:return se}}case n:return se}}}var T=l,I=c,w=s,k=a,P=t,_=u,F=r,V=v,D=p,O=n,N=i,z=o,M=d,C=!1;function L(H){return C||(C=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),$(H)||E(H)===l}function $(H){return E(H)===c}function B(H){return E(H)===s}function q(H){return E(H)===a}function G(H){return typeof H=="object"&&H!==null&&H.$$typeof===t}function W(H){return E(H)===u}function J(H){return E(H)===r}function re(H){return E(H)===v}function ee(H){return E(H)===p}function Y(H){return E(H)===n}function K(H){return E(H)===i}function X(H){return E(H)===o}function de(H){return E(H)===d}ct.AsyncMode=T,ct.ConcurrentMode=I,ct.ContextConsumer=w,ct.ContextProvider=k,ct.Element=P,ct.ForwardRef=_,ct.Fragment=F,ct.Lazy=V,ct.Memo=D,ct.Portal=O,ct.Profiler=N,ct.StrictMode=z,ct.Suspense=M,ct.isAsyncMode=L,ct.isConcurrentMode=$,ct.isContextConsumer=B,ct.isContextProvider=q,ct.isElement=G,ct.isForwardRef=W,ct.isFragment=J,ct.isLazy=re,ct.isMemo=ee,ct.isPortal=Y,ct.isProfiler=K,ct.isStrictMode=X,ct.isSuspense=de,ct.isValidElementType=b,ct.typeOf=E})()),ct}var eT;function tT(){return eT||(eT=1,process.env.NODE_ENV==="production"?ec.exports=oB():ec.exports=iB()),ec.exports}var Jp,nT;function aB(){if(nT)return Jp;nT=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function r(i){if(i==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(i)}function o(){try{if(!Object.assign)return!1;var i=new String("abc");if(i[5]="de",Object.getOwnPropertyNames(i)[0]==="5")return!1;for(var a={},s=0;s<10;s++)a["_"+String.fromCharCode(s)]=s;var l=Object.getOwnPropertyNames(a).map(function(u){return a[u]});if(l.join("")!=="0123456789")return!1;var c={};return"abcdefghijklmnopqrst".split("").forEach(function(u){c[u]=u}),Object.keys(Object.assign({},c)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return Jp=o()?Object.assign:function(i,a){for(var s,l=r(i),c,u=1;u<arguments.length;u++){s=Object(arguments[u]);for(var d in s)t.call(s,d)&&(l[d]=s[d]);if(e){c=e(s);for(var f=0;f<c.length;f++)n.call(s,c[f])&&(l[c[f]]=s[c[f]])}}return l},Jp}var eh,rT;function th(){if(rT)return eh;rT=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return eh=e,eh}var nh,oT;function iT(){return oT||(oT=1,nh=Function.call.bind(Object.prototype.hasOwnProperty)),nh}var rh,aT;function sB(){if(aT)return rh;aT=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=th(),n={},r=iT();e=function(i){var a="Warning: "+i;typeof console<"u"&&console.error(a);try{throw new Error(a)}catch{}}}function o(i,a,s,l,c){if(process.env.NODE_ENV!=="production"){for(var u in i)if(r(i,u)){var d;try{if(typeof i[u]!="function"){var f=Error((l||"React class")+": "+s+" type `"+u+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof i[u]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw f.name="Invariant Violation",f}d=i[u](a,u,l,s,null,t)}catch(v){d=v}if(d&&!(d instanceof Error)&&e((l||"React class")+": type specification of "+s+" `"+u+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof d+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),d instanceof Error&&!(d.message in n)){n[d.message]=!0;var p=c?c():"";e("Failed "+s+" type: "+d.message+(p??""))}}}}return o.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(n={})},rh=o,rh}var oh,sT;function lB(){if(sT)return oh;sT=1;var e=tT(),t=aB(),n=th(),r=iT(),o=sB(),i=function(){};process.env.NODE_ENV!=="production"&&(i=function(s){var l="Warning: "+s;typeof console<"u"&&console.error(l);try{throw new Error(l)}catch{}});function a(){return null}return oh=function(s,l){var c=typeof Symbol=="function"&&Symbol.iterator,u="@@iterator";function d($){var B=$&&(c&&$[c]||$[u]);if(typeof B=="function")return B}var f="<<anonymous>>",p={array:y("array"),bigint:y("bigint"),bool:y("boolean"),func:y("function"),number:y("number"),object:y("object"),string:y("string"),symbol:y("symbol"),any:x(),arrayOf:b,element:E(),elementType:T(),instanceOf:I,node:_(),objectOf:k,oneOf:w,oneOfType:P,shape:V,exact:D};function v($,B){return $===B?$!==0||1/$===1/B:$!==$&&B!==B}function h($,B){this.message=$,this.data=B&&typeof B=="object"?B:{},this.stack=""}h.prototype=Error.prototype;function m($){if(process.env.NODE_ENV!=="production")var B={},q=0;function G(J,re,ee,Y,K,X,de){if(Y=Y||f,X=X||ee,de!==n){if(l){var H=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw H.name="Invariant Violation",H}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var se=Y+":"+ee;!B[se]&&q<3&&(i("You are manually calling a React.PropTypes validation function for the `"+X+"` prop on `"+Y+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),B[se]=!0,q++)}}return re[ee]==null?J?re[ee]===null?new h("The "+K+" `"+X+"` is marked as required "+("in `"+Y+"`, but its value is `null`.")):new h("The "+K+" `"+X+"` is marked as required in "+("`"+Y+"`, but its value is `undefined`.")):null:$(re,ee,Y,K,X)}var W=G.bind(null,!1);return W.isRequired=G.bind(null,!0),W}function y($){function B(q,G,W,J,re,ee){var Y=q[G],K=z(Y);if(K!==$){var X=M(Y);return new h("Invalid "+J+" `"+re+"` of type "+("`"+X+"` supplied to `"+W+"`, expected ")+("`"+$+"`."),{expectedType:$})}return null}return m(B)}function x(){return m(a)}function b($){function B(q,G,W,J,re){if(typeof $!="function")return new h("Property `"+re+"` of component `"+W+"` has invalid PropType notation inside arrayOf.");var ee=q[G];if(!Array.isArray(ee)){var Y=z(ee);return new h("Invalid "+J+" `"+re+"` of type "+("`"+Y+"` supplied to `"+W+"`, expected an array."))}for(var K=0;K<ee.length;K++){var X=$(ee,K,W,J,re+"["+K+"]",n);if(X instanceof Error)return X}return null}return m(B)}function E(){function $(B,q,G,W,J){var re=B[q];if(!s(re)){var ee=z(re);return new h("Invalid "+W+" `"+J+"` of type "+("`"+ee+"` supplied to `"+G+"`, expected a single ReactElement."))}return null}return m($)}function T(){function $(B,q,G,W,J){var re=B[q];if(!e.isValidElementType(re)){var ee=z(re);return new h("Invalid "+W+" `"+J+"` of type "+("`"+ee+"` supplied to `"+G+"`, expected a single ReactElement type."))}return null}return m($)}function I($){function B(q,G,W,J,re){if(!(q[G]instanceof $)){var ee=$.name||f,Y=L(q[G]);return new h("Invalid "+J+" `"+re+"` of type "+("`"+Y+"` supplied to `"+W+"`, expected ")+("instance of `"+ee+"`."))}return null}return m(B)}function w($){if(!Array.isArray($))return process.env.NODE_ENV!=="production"&&(arguments.length>1?i("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):i("Invalid argument supplied to oneOf, expected an array.")),a;function B(q,G,W,J,re){for(var ee=q[G],Y=0;Y<$.length;Y++)if(v(ee,$[Y]))return null;var K=JSON.stringify($,function(de,H){var se=M(H);return se==="symbol"?String(H):H});return new h("Invalid "+J+" `"+re+"` of value `"+String(ee)+"` "+("supplied to `"+W+"`, expected one of "+K+"."))}return m(B)}function k($){function B(q,G,W,J,re){if(typeof $!="function")return new h("Property `"+re+"` of component `"+W+"` has invalid PropType notation inside objectOf.");var ee=q[G],Y=z(ee);if(Y!=="object")return new h("Invalid "+J+" `"+re+"` of type "+("`"+Y+"` supplied to `"+W+"`, expected an object."));for(var K in ee)if(r(ee,K)){var X=$(ee,K,W,J,re+"."+K,n);if(X instanceof Error)return X}return null}return m(B)}function P($){if(!Array.isArray($))return process.env.NODE_ENV!=="production"&&i("Invalid argument supplied to oneOfType, expected an instance of array."),a;for(var B=0;B<$.length;B++){var q=$[B];if(typeof q!="function")return i("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+C(q)+" at index "+B+"."),a}function G(W,J,re,ee,Y){for(var K=[],X=0;X<$.length;X++){var de=$[X],H=de(W,J,re,ee,Y,n);if(H==null)return null;H.data&&r(H.data,"expectedType")&&K.push(H.data.expectedType)}var se=K.length>0?", expected one of type ["+K.join(", ")+"]":"";return new h("Invalid "+ee+" `"+Y+"` supplied to "+("`"+re+"`"+se+"."))}return m(G)}function _(){function $(B,q,G,W,J){return O(B[q])?null:new h("Invalid "+W+" `"+J+"` supplied to "+("`"+G+"`, expected a ReactNode."))}return m($)}function F($,B,q,G,W){return new h(($||"React class")+": "+B+" type `"+q+"."+G+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+W+"`.")}function V($){function B(q,G,W,J,re){var ee=q[G],Y=z(ee);if(Y!=="object")return new h("Invalid "+J+" `"+re+"` of type `"+Y+"` "+("supplied to `"+W+"`, expected `object`."));for(var K in $){var X=$[K];if(typeof X!="function")return F(W,J,re,K,M(X));var de=X(ee,K,W,J,re+"."+K,n);if(de)return de}return null}return m(B)}function D($){function B(q,G,W,J,re){var ee=q[G],Y=z(ee);if(Y!=="object")return new h("Invalid "+J+" `"+re+"` of type `"+Y+"` "+("supplied to `"+W+"`, expected `object`."));var K=t({},q[G],$);for(var X in K){var de=$[X];if(r($,X)&&typeof de!="function")return F(W,J,re,X,M(de));if(!de)return new h("Invalid "+J+" `"+re+"` key `"+X+"` supplied to `"+W+"`.\nBad object: "+JSON.stringify(q[G],null," ")+`
16
- Valid keys: `+JSON.stringify(Object.keys($),null," "));var H=de(ee,X,W,J,re+"."+X,n);if(H)return H}return null}return m(B)}function O($){switch(typeof $){case"number":case"string":case"undefined":return!0;case"boolean":return!$;case"object":if(Array.isArray($))return $.every(O);if($===null||s($))return!0;var B=d($);if(B){var q=B.call($),G;if(B!==$.entries){for(;!(G=q.next()).done;)if(!O(G.value))return!1}else for(;!(G=q.next()).done;){var W=G.value;if(W&&!O(W[1]))return!1}}else return!1;return!0;default:return!1}}function N($,B){return $==="symbol"?!0:B?B["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&B instanceof Symbol:!1}function z($){var B=typeof $;return Array.isArray($)?"array":$ instanceof RegExp?"object":N(B,$)?"symbol":B}function M($){if(typeof $>"u"||$===null)return""+$;var B=z($);if(B==="object"){if($ instanceof Date)return"date";if($ instanceof RegExp)return"regexp"}return B}function C($){var B=M($);switch(B){case"array":case"object":return"an "+B;case"boolean":case"date":case"regexp":return"a "+B;default:return B}}function L($){return!$.constructor||!$.constructor.name?f:$.constructor.name}return p.checkPropTypes=o,p.resetWarningCache=o.resetWarningCache,p.PropTypes=p,p},oh}var ih,lT;function cB(){if(lT)return ih;lT=1;var e=th();function t(){}function n(){}return n.resetWarningCache=t,ih=function(){function r(a,s,l,c,u,d){if(d!==e){var f=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw f.name="Invariant Violation",f}}r.isRequired=r;function o(){return r}var i={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:o,element:r,elementType:r,instanceOf:o,node:r,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:n,resetWarningCache:t};return i.PropTypes=i,i},ih}var cT;function uB(){if(cT)return Jl.exports;if(cT=1,process.env.NODE_ENV!=="production"){var e=tT(),t=!0;Jl.exports=lB()(e.isElement,t)}else Jl.exports=cB()();return Jl.exports}var dB=uB();const vt=Yh(dB);function So(e,t,n,r){function o(i){return i instanceof n?i:new n(function(a){a(i)})}return new(n||(n=Promise))(function(i,a){function s(u){try{c(r.next(u))}catch(d){a(d)}}function l(u){try{c(r.throw(u))}catch(d){a(d)}}function c(u){u.done?i(u.value):o(u.value).then(s,l)}c((r=r.apply(e,t||[])).next())})}typeof SuppressedError=="function"&&SuppressedError;const fB=new Map([["1km","application/vnd.1000minds.decision-model+xml"],["3dml","text/vnd.in3d.3dml"],["3ds","image/x-3ds"],["3g2","video/3gpp2"],["3gp","video/3gp"],["3gpp","video/3gpp"],["3mf","model/3mf"],["7z","application/x-7z-compressed"],["7zip","application/x-7z-compressed"],["123","application/vnd.lotus-1-2-3"],["aab","application/x-authorware-bin"],["aac","audio/x-acc"],["aam","application/x-authorware-map"],["aas","application/x-authorware-seg"],["abw","application/x-abiword"],["ac","application/vnd.nokia.n-gage.ac+xml"],["ac3","audio/ac3"],["acc","application/vnd.americandynamics.acc"],["ace","application/x-ace-compressed"],["acu","application/vnd.acucobol"],["acutc","application/vnd.acucorp"],["adp","audio/adpcm"],["aep","application/vnd.audiograph"],["afm","application/x-font-type1"],["afp","application/vnd.ibm.modcap"],["ahead","application/vnd.ahead.space"],["ai","application/pdf"],["aif","audio/x-aiff"],["aifc","audio/x-aiff"],["aiff","audio/x-aiff"],["air","application/vnd.adobe.air-application-installer-package+zip"],["ait","application/vnd.dvb.ait"],["ami","application/vnd.amiga.ami"],["amr","audio/amr"],["apk","application/vnd.android.package-archive"],["apng","image/apng"],["appcache","text/cache-manifest"],["application","application/x-ms-application"],["apr","application/vnd.lotus-approach"],["arc","application/x-freearc"],["arj","application/x-arj"],["asc","application/pgp-signature"],["asf","video/x-ms-asf"],["asm","text/x-asm"],["aso","application/vnd.accpac.simply.aso"],["asx","video/x-ms-asf"],["atc","application/vnd.acucorp"],["atom","application/atom+xml"],["atomcat","application/atomcat+xml"],["atomdeleted","application/atomdeleted+xml"],["atomsvc","application/atomsvc+xml"],["atx","application/vnd.antix.game-component"],["au","audio/x-au"],["avi","video/x-msvideo"],["avif","image/avif"],["aw","application/applixware"],["azf","application/vnd.airzip.filesecure.azf"],["azs","application/vnd.airzip.filesecure.azs"],["azv","image/vnd.airzip.accelerator.azv"],["azw","application/vnd.amazon.ebook"],["b16","image/vnd.pco.b16"],["bat","application/x-msdownload"],["bcpio","application/x-bcpio"],["bdf","application/x-font-bdf"],["bdm","application/vnd.syncml.dm+wbxml"],["bdoc","application/x-bdoc"],["bed","application/vnd.realvnc.bed"],["bh2","application/vnd.fujitsu.oasysprs"],["bin","application/octet-stream"],["blb","application/x-blorb"],["blorb","application/x-blorb"],["bmi","application/vnd.bmi"],["bmml","application/vnd.balsamiq.bmml+xml"],["bmp","image/bmp"],["book","application/vnd.framemaker"],["box","application/vnd.previewsystems.box"],["boz","application/x-bzip2"],["bpk","application/octet-stream"],["bpmn","application/octet-stream"],["bsp","model/vnd.valve.source.compiled-map"],["btif","image/prs.btif"],["buffer","application/octet-stream"],["bz","application/x-bzip"],["bz2","application/x-bzip2"],["c","text/x-c"],["c4d","application/vnd.clonk.c4group"],["c4f","application/vnd.clonk.c4group"],["c4g","application/vnd.clonk.c4group"],["c4p","application/vnd.clonk.c4group"],["c4u","application/vnd.clonk.c4group"],["c11amc","application/vnd.cluetrust.cartomobile-config"],["c11amz","application/vnd.cluetrust.cartomobile-config-pkg"],["cab","application/vnd.ms-cab-compressed"],["caf","audio/x-caf"],["cap","application/vnd.tcpdump.pcap"],["car","application/vnd.curl.car"],["cat","application/vnd.ms-pki.seccat"],["cb7","application/x-cbr"],["cba","application/x-cbr"],["cbr","application/x-cbr"],["cbt","application/x-cbr"],["cbz","application/x-cbr"],["cc","text/x-c"],["cco","application/x-cocoa"],["cct","application/x-director"],["ccxml","application/ccxml+xml"],["cdbcmsg","application/vnd.contact.cmsg"],["cda","application/x-cdf"],["cdf","application/x-netcdf"],["cdfx","application/cdfx+xml"],["cdkey","application/vnd.mediastation.cdkey"],["cdmia","application/cdmi-capability"],["cdmic","application/cdmi-container"],["cdmid","application/cdmi-domain"],["cdmio","application/cdmi-object"],["cdmiq","application/cdmi-queue"],["cdr","application/cdr"],["cdx","chemical/x-cdx"],["cdxml","application/vnd.chemdraw+xml"],["cdy","application/vnd.cinderella"],["cer","application/pkix-cert"],["cfs","application/x-cfs-compressed"],["cgm","image/cgm"],["chat","application/x-chat"],["chm","application/vnd.ms-htmlhelp"],["chrt","application/vnd.kde.kchart"],["cif","chemical/x-cif"],["cii","application/vnd.anser-web-certificate-issue-initiation"],["cil","application/vnd.ms-artgalry"],["cjs","application/node"],["cla","application/vnd.claymore"],["class","application/octet-stream"],["clkk","application/vnd.crick.clicker.keyboard"],["clkp","application/vnd.crick.clicker.palette"],["clkt","application/vnd.crick.clicker.template"],["clkw","application/vnd.crick.clicker.wordbank"],["clkx","application/vnd.crick.clicker"],["clp","application/x-msclip"],["cmc","application/vnd.cosmocaller"],["cmdf","chemical/x-cmdf"],["cml","chemical/x-cml"],["cmp","application/vnd.yellowriver-custom-menu"],["cmx","image/x-cmx"],["cod","application/vnd.rim.cod"],["coffee","text/coffeescript"],["com","application/x-msdownload"],["conf","text/plain"],["cpio","application/x-cpio"],["cpp","text/x-c"],["cpt","application/mac-compactpro"],["crd","application/x-mscardfile"],["crl","application/pkix-crl"],["crt","application/x-x509-ca-cert"],["crx","application/x-chrome-extension"],["cryptonote","application/vnd.rig.cryptonote"],["csh","application/x-csh"],["csl","application/vnd.citationstyles.style+xml"],["csml","chemical/x-csml"],["csp","application/vnd.commonspace"],["csr","application/octet-stream"],["css","text/css"],["cst","application/x-director"],["csv","text/csv"],["cu","application/cu-seeme"],["curl","text/vnd.curl"],["cww","application/prs.cww"],["cxt","application/x-director"],["cxx","text/x-c"],["dae","model/vnd.collada+xml"],["daf","application/vnd.mobius.daf"],["dart","application/vnd.dart"],["dataless","application/vnd.fdsn.seed"],["davmount","application/davmount+xml"],["dbf","application/vnd.dbf"],["dbk","application/docbook+xml"],["dcr","application/x-director"],["dcurl","text/vnd.curl.dcurl"],["dd2","application/vnd.oma.dd2+xml"],["ddd","application/vnd.fujixerox.ddd"],["ddf","application/vnd.syncml.dmddf+xml"],["dds","image/vnd.ms-dds"],["deb","application/x-debian-package"],["def","text/plain"],["deploy","application/octet-stream"],["der","application/x-x509-ca-cert"],["dfac","application/vnd.dreamfactory"],["dgc","application/x-dgc-compressed"],["dic","text/x-c"],["dir","application/x-director"],["dis","application/vnd.mobius.dis"],["disposition-notification","message/disposition-notification"],["dist","application/octet-stream"],["distz","application/octet-stream"],["djv","image/vnd.djvu"],["djvu","image/vnd.djvu"],["dll","application/octet-stream"],["dmg","application/x-apple-diskimage"],["dmn","application/octet-stream"],["dmp","application/vnd.tcpdump.pcap"],["dms","application/octet-stream"],["dna","application/vnd.dna"],["doc","application/msword"],["docm","application/vnd.ms-word.template.macroEnabled.12"],["docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],["dot","application/msword"],["dotm","application/vnd.ms-word.template.macroEnabled.12"],["dotx","application/vnd.openxmlformats-officedocument.wordprocessingml.template"],["dp","application/vnd.osgi.dp"],["dpg","application/vnd.dpgraph"],["dra","audio/vnd.dra"],["drle","image/dicom-rle"],["dsc","text/prs.lines.tag"],["dssc","application/dssc+der"],["dtb","application/x-dtbook+xml"],["dtd","application/xml-dtd"],["dts","audio/vnd.dts"],["dtshd","audio/vnd.dts.hd"],["dump","application/octet-stream"],["dvb","video/vnd.dvb.file"],["dvi","application/x-dvi"],["dwd","application/atsc-dwd+xml"],["dwf","model/vnd.dwf"],["dwg","image/vnd.dwg"],["dxf","image/vnd.dxf"],["dxp","application/vnd.spotfire.dxp"],["dxr","application/x-director"],["ear","application/java-archive"],["ecelp4800","audio/vnd.nuera.ecelp4800"],["ecelp7470","audio/vnd.nuera.ecelp7470"],["ecelp9600","audio/vnd.nuera.ecelp9600"],["ecma","application/ecmascript"],["edm","application/vnd.novadigm.edm"],["edx","application/vnd.novadigm.edx"],["efif","application/vnd.picsel"],["ei6","application/vnd.pg.osasli"],["elc","application/octet-stream"],["emf","image/emf"],["eml","message/rfc822"],["emma","application/emma+xml"],["emotionml","application/emotionml+xml"],["emz","application/x-msmetafile"],["eol","audio/vnd.digital-winds"],["eot","application/vnd.ms-fontobject"],["eps","application/postscript"],["epub","application/epub+zip"],["es","application/ecmascript"],["es3","application/vnd.eszigno3+xml"],["esa","application/vnd.osgi.subsystem"],["esf","application/vnd.epson.esf"],["et3","application/vnd.eszigno3+xml"],["etx","text/x-setext"],["eva","application/x-eva"],["evy","application/x-envoy"],["exe","application/octet-stream"],["exi","application/exi"],["exp","application/express"],["exr","image/aces"],["ext","application/vnd.novadigm.ext"],["ez","application/andrew-inset"],["ez2","application/vnd.ezpix-album"],["ez3","application/vnd.ezpix-package"],["f","text/x-fortran"],["f4v","video/mp4"],["f77","text/x-fortran"],["f90","text/x-fortran"],["fbs","image/vnd.fastbidsheet"],["fcdt","application/vnd.adobe.formscentral.fcdt"],["fcs","application/vnd.isac.fcs"],["fdf","application/vnd.fdf"],["fdt","application/fdt+xml"],["fe_launch","application/vnd.denovo.fcselayout-link"],["fg5","application/vnd.fujitsu.oasysgp"],["fgd","application/x-director"],["fh","image/x-freehand"],["fh4","image/x-freehand"],["fh5","image/x-freehand"],["fh7","image/x-freehand"],["fhc","image/x-freehand"],["fig","application/x-xfig"],["fits","image/fits"],["flac","audio/x-flac"],["fli","video/x-fli"],["flo","application/vnd.micrografx.flo"],["flv","video/x-flv"],["flw","application/vnd.kde.kivio"],["flx","text/vnd.fmi.flexstor"],["fly","text/vnd.fly"],["fm","application/vnd.framemaker"],["fnc","application/vnd.frogans.fnc"],["fo","application/vnd.software602.filler.form+xml"],["for","text/x-fortran"],["fpx","image/vnd.fpx"],["frame","application/vnd.framemaker"],["fsc","application/vnd.fsc.weblaunch"],["fst","image/vnd.fst"],["ftc","application/vnd.fluxtime.clip"],["fti","application/vnd.anser-web-funds-transfer-initiation"],["fvt","video/vnd.fvt"],["fxp","application/vnd.adobe.fxp"],["fxpl","application/vnd.adobe.fxp"],["fzs","application/vnd.fuzzysheet"],["g2w","application/vnd.geoplan"],["g3","image/g3fax"],["g3w","application/vnd.geospace"],["gac","application/vnd.groove-account"],["gam","application/x-tads"],["gbr","application/rpki-ghostbusters"],["gca","application/x-gca-compressed"],["gdl","model/vnd.gdl"],["gdoc","application/vnd.google-apps.document"],["geo","application/vnd.dynageo"],["geojson","application/geo+json"],["gex","application/vnd.geometry-explorer"],["ggb","application/vnd.geogebra.file"],["ggt","application/vnd.geogebra.tool"],["ghf","application/vnd.groove-help"],["gif","image/gif"],["gim","application/vnd.groove-identity-message"],["glb","model/gltf-binary"],["gltf","model/gltf+json"],["gml","application/gml+xml"],["gmx","application/vnd.gmx"],["gnumeric","application/x-gnumeric"],["gpg","application/gpg-keys"],["gph","application/vnd.flographit"],["gpx","application/gpx+xml"],["gqf","application/vnd.grafeq"],["gqs","application/vnd.grafeq"],["gram","application/srgs"],["gramps","application/x-gramps-xml"],["gre","application/vnd.geometry-explorer"],["grv","application/vnd.groove-injector"],["grxml","application/srgs+xml"],["gsf","application/x-font-ghostscript"],["gsheet","application/vnd.google-apps.spreadsheet"],["gslides","application/vnd.google-apps.presentation"],["gtar","application/x-gtar"],["gtm","application/vnd.groove-tool-message"],["gtw","model/vnd.gtw"],["gv","text/vnd.graphviz"],["gxf","application/gxf"],["gxt","application/vnd.geonext"],["gz","application/gzip"],["gzip","application/gzip"],["h","text/x-c"],["h261","video/h261"],["h263","video/h263"],["h264","video/h264"],["hal","application/vnd.hal+xml"],["hbci","application/vnd.hbci"],["hbs","text/x-handlebars-template"],["hdd","application/x-virtualbox-hdd"],["hdf","application/x-hdf"],["heic","image/heic"],["heics","image/heic-sequence"],["heif","image/heif"],["heifs","image/heif-sequence"],["hej2","image/hej2k"],["held","application/atsc-held+xml"],["hh","text/x-c"],["hjson","application/hjson"],["hlp","application/winhlp"],["hpgl","application/vnd.hp-hpgl"],["hpid","application/vnd.hp-hpid"],["hps","application/vnd.hp-hps"],["hqx","application/mac-binhex40"],["hsj2","image/hsj2"],["htc","text/x-component"],["htke","application/vnd.kenameaapp"],["htm","text/html"],["html","text/html"],["hvd","application/vnd.yamaha.hv-dic"],["hvp","application/vnd.yamaha.hv-voice"],["hvs","application/vnd.yamaha.hv-script"],["i2g","application/vnd.intergeo"],["icc","application/vnd.iccprofile"],["ice","x-conference/x-cooltalk"],["icm","application/vnd.iccprofile"],["ico","image/x-icon"],["ics","text/calendar"],["ief","image/ief"],["ifb","text/calendar"],["ifm","application/vnd.shana.informed.formdata"],["iges","model/iges"],["igl","application/vnd.igloader"],["igm","application/vnd.insors.igm"],["igs","model/iges"],["igx","application/vnd.micrografx.igx"],["iif","application/vnd.shana.informed.interchange"],["img","application/octet-stream"],["imp","application/vnd.accpac.simply.imp"],["ims","application/vnd.ms-ims"],["in","text/plain"],["ini","text/plain"],["ink","application/inkml+xml"],["inkml","application/inkml+xml"],["install","application/x-install-instructions"],["iota","application/vnd.astraea-software.iota"],["ipfix","application/ipfix"],["ipk","application/vnd.shana.informed.package"],["irm","application/vnd.ibm.rights-management"],["irp","application/vnd.irepository.package+xml"],["iso","application/x-iso9660-image"],["itp","application/vnd.shana.informed.formtemplate"],["its","application/its+xml"],["ivp","application/vnd.immervision-ivp"],["ivu","application/vnd.immervision-ivu"],["jad","text/vnd.sun.j2me.app-descriptor"],["jade","text/jade"],["jam","application/vnd.jam"],["jar","application/java-archive"],["jardiff","application/x-java-archive-diff"],["java","text/x-java-source"],["jhc","image/jphc"],["jisp","application/vnd.jisp"],["jls","image/jls"],["jlt","application/vnd.hp-jlyt"],["jng","image/x-jng"],["jnlp","application/x-java-jnlp-file"],["joda","application/vnd.joost.joda-archive"],["jp2","image/jp2"],["jpe","image/jpeg"],["jpeg","image/jpeg"],["jpf","image/jpx"],["jpg","image/jpeg"],["jpg2","image/jp2"],["jpgm","video/jpm"],["jpgv","video/jpeg"],["jph","image/jph"],["jpm","video/jpm"],["jpx","image/jpx"],["js","application/javascript"],["json","application/json"],["json5","application/json5"],["jsonld","application/ld+json"],["jsonl","application/jsonl"],["jsonml","application/jsonml+json"],["jsx","text/jsx"],["jxr","image/jxr"],["jxra","image/jxra"],["jxrs","image/jxrs"],["jxs","image/jxs"],["jxsc","image/jxsc"],["jxsi","image/jxsi"],["jxss","image/jxss"],["kar","audio/midi"],["karbon","application/vnd.kde.karbon"],["kdb","application/octet-stream"],["kdbx","application/x-keepass2"],["key","application/x-iwork-keynote-sffkey"],["kfo","application/vnd.kde.kformula"],["kia","application/vnd.kidspiration"],["kml","application/vnd.google-earth.kml+xml"],["kmz","application/vnd.google-earth.kmz"],["kne","application/vnd.kinar"],["knp","application/vnd.kinar"],["kon","application/vnd.kde.kontour"],["kpr","application/vnd.kde.kpresenter"],["kpt","application/vnd.kde.kpresenter"],["kpxx","application/vnd.ds-keypoint"],["ksp","application/vnd.kde.kspread"],["ktr","application/vnd.kahootz"],["ktx","image/ktx"],["ktx2","image/ktx2"],["ktz","application/vnd.kahootz"],["kwd","application/vnd.kde.kword"],["kwt","application/vnd.kde.kword"],["lasxml","application/vnd.las.las+xml"],["latex","application/x-latex"],["lbd","application/vnd.llamagraphics.life-balance.desktop"],["lbe","application/vnd.llamagraphics.life-balance.exchange+xml"],["les","application/vnd.hhe.lesson-player"],["less","text/less"],["lgr","application/lgr+xml"],["lha","application/octet-stream"],["link66","application/vnd.route66.link66+xml"],["list","text/plain"],["list3820","application/vnd.ibm.modcap"],["listafp","application/vnd.ibm.modcap"],["litcoffee","text/coffeescript"],["lnk","application/x-ms-shortcut"],["log","text/plain"],["lostxml","application/lost+xml"],["lrf","application/octet-stream"],["lrm","application/vnd.ms-lrm"],["ltf","application/vnd.frogans.ltf"],["lua","text/x-lua"],["luac","application/x-lua-bytecode"],["lvp","audio/vnd.lucent.voice"],["lwp","application/vnd.lotus-wordpro"],["lzh","application/octet-stream"],["m1v","video/mpeg"],["m2a","audio/mpeg"],["m2v","video/mpeg"],["m3a","audio/mpeg"],["m3u","text/plain"],["m3u8","application/vnd.apple.mpegurl"],["m4a","audio/x-m4a"],["m4p","application/mp4"],["m4s","video/iso.segment"],["m4u","application/vnd.mpegurl"],["m4v","video/x-m4v"],["m13","application/x-msmediaview"],["m14","application/x-msmediaview"],["m21","application/mp21"],["ma","application/mathematica"],["mads","application/mads+xml"],["maei","application/mmt-aei+xml"],["mag","application/vnd.ecowin.chart"],["maker","application/vnd.framemaker"],["man","text/troff"],["manifest","text/cache-manifest"],["map","application/json"],["mar","application/octet-stream"],["markdown","text/markdown"],["mathml","application/mathml+xml"],["mb","application/mathematica"],["mbk","application/vnd.mobius.mbk"],["mbox","application/mbox"],["mc1","application/vnd.medcalcdata"],["mcd","application/vnd.mcd"],["mcurl","text/vnd.curl.mcurl"],["md","text/markdown"],["mdb","application/x-msaccess"],["mdi","image/vnd.ms-modi"],["mdx","text/mdx"],["me","text/troff"],["mesh","model/mesh"],["meta4","application/metalink4+xml"],["metalink","application/metalink+xml"],["mets","application/mets+xml"],["mfm","application/vnd.mfmp"],["mft","application/rpki-manifest"],["mgp","application/vnd.osgeo.mapguide.package"],["mgz","application/vnd.proteus.magazine"],["mid","audio/midi"],["midi","audio/midi"],["mie","application/x-mie"],["mif","application/vnd.mif"],["mime","message/rfc822"],["mj2","video/mj2"],["mjp2","video/mj2"],["mjs","application/javascript"],["mk3d","video/x-matroska"],["mka","audio/x-matroska"],["mkd","text/x-markdown"],["mks","video/x-matroska"],["mkv","video/x-matroska"],["mlp","application/vnd.dolby.mlp"],["mmd","application/vnd.chipnuts.karaoke-mmd"],["mmf","application/vnd.smaf"],["mml","text/mathml"],["mmr","image/vnd.fujixerox.edmics-mmr"],["mng","video/x-mng"],["mny","application/x-msmoney"],["mobi","application/x-mobipocket-ebook"],["mods","application/mods+xml"],["mov","video/quicktime"],["movie","video/x-sgi-movie"],["mp2","audio/mpeg"],["mp2a","audio/mpeg"],["mp3","audio/mpeg"],["mp4","video/mp4"],["mp4a","audio/mp4"],["mp4s","application/mp4"],["mp4v","video/mp4"],["mp21","application/mp21"],["mpc","application/vnd.mophun.certificate"],["mpd","application/dash+xml"],["mpe","video/mpeg"],["mpeg","video/mpeg"],["mpg","video/mpeg"],["mpg4","video/mp4"],["mpga","audio/mpeg"],["mpkg","application/vnd.apple.installer+xml"],["mpm","application/vnd.blueice.multipass"],["mpn","application/vnd.mophun.application"],["mpp","application/vnd.ms-project"],["mpt","application/vnd.ms-project"],["mpy","application/vnd.ibm.minipay"],["mqy","application/vnd.mobius.mqy"],["mrc","application/marc"],["mrcx","application/marcxml+xml"],["ms","text/troff"],["mscml","application/mediaservercontrol+xml"],["mseed","application/vnd.fdsn.mseed"],["mseq","application/vnd.mseq"],["msf","application/vnd.epson.msf"],["msg","application/vnd.ms-outlook"],["msh","model/mesh"],["msi","application/x-msdownload"],["msl","application/vnd.mobius.msl"],["msm","application/octet-stream"],["msp","application/octet-stream"],["msty","application/vnd.muvee.style"],["mtl","model/mtl"],["mts","model/vnd.mts"],["mus","application/vnd.musician"],["musd","application/mmt-usd+xml"],["musicxml","application/vnd.recordare.musicxml+xml"],["mvb","application/x-msmediaview"],["mvt","application/vnd.mapbox-vector-tile"],["mwf","application/vnd.mfer"],["mxf","application/mxf"],["mxl","application/vnd.recordare.musicxml"],["mxmf","audio/mobile-xmf"],["mxml","application/xv+xml"],["mxs","application/vnd.triscape.mxs"],["mxu","video/vnd.mpegurl"],["n-gage","application/vnd.nokia.n-gage.symbian.install"],["n3","text/n3"],["nb","application/mathematica"],["nbp","application/vnd.wolfram.player"],["nc","application/x-netcdf"],["ncx","application/x-dtbncx+xml"],["nfo","text/x-nfo"],["ngdat","application/vnd.nokia.n-gage.data"],["nitf","application/vnd.nitf"],["nlu","application/vnd.neurolanguage.nlu"],["nml","application/vnd.enliven"],["nnd","application/vnd.noblenet-directory"],["nns","application/vnd.noblenet-sealer"],["nnw","application/vnd.noblenet-web"],["npx","image/vnd.net-fpx"],["nq","application/n-quads"],["nsc","application/x-conference"],["nsf","application/vnd.lotus-notes"],["nt","application/n-triples"],["ntf","application/vnd.nitf"],["numbers","application/x-iwork-numbers-sffnumbers"],["nzb","application/x-nzb"],["oa2","application/vnd.fujitsu.oasys2"],["oa3","application/vnd.fujitsu.oasys3"],["oas","application/vnd.fujitsu.oasys"],["obd","application/x-msbinder"],["obgx","application/vnd.openblox.game+xml"],["obj","model/obj"],["oda","application/oda"],["odb","application/vnd.oasis.opendocument.database"],["odc","application/vnd.oasis.opendocument.chart"],["odf","application/vnd.oasis.opendocument.formula"],["odft","application/vnd.oasis.opendocument.formula-template"],["odg","application/vnd.oasis.opendocument.graphics"],["odi","application/vnd.oasis.opendocument.image"],["odm","application/vnd.oasis.opendocument.text-master"],["odp","application/vnd.oasis.opendocument.presentation"],["ods","application/vnd.oasis.opendocument.spreadsheet"],["odt","application/vnd.oasis.opendocument.text"],["oga","audio/ogg"],["ogex","model/vnd.opengex"],["ogg","audio/ogg"],["ogv","video/ogg"],["ogx","application/ogg"],["omdoc","application/omdoc+xml"],["onepkg","application/onenote"],["onetmp","application/onenote"],["onetoc","application/onenote"],["onetoc2","application/onenote"],["opf","application/oebps-package+xml"],["opml","text/x-opml"],["oprc","application/vnd.palm"],["opus","audio/ogg"],["org","text/x-org"],["osf","application/vnd.yamaha.openscoreformat"],["osfpvg","application/vnd.yamaha.openscoreformat.osfpvg+xml"],["osm","application/vnd.openstreetmap.data+xml"],["otc","application/vnd.oasis.opendocument.chart-template"],["otf","font/otf"],["otg","application/vnd.oasis.opendocument.graphics-template"],["oth","application/vnd.oasis.opendocument.text-web"],["oti","application/vnd.oasis.opendocument.image-template"],["otp","application/vnd.oasis.opendocument.presentation-template"],["ots","application/vnd.oasis.opendocument.spreadsheet-template"],["ott","application/vnd.oasis.opendocument.text-template"],["ova","application/x-virtualbox-ova"],["ovf","application/x-virtualbox-ovf"],["owl","application/rdf+xml"],["oxps","application/oxps"],["oxt","application/vnd.openofficeorg.extension"],["p","text/x-pascal"],["p7a","application/x-pkcs7-signature"],["p7b","application/x-pkcs7-certificates"],["p7c","application/pkcs7-mime"],["p7m","application/pkcs7-mime"],["p7r","application/x-pkcs7-certreqresp"],["p7s","application/pkcs7-signature"],["p8","application/pkcs8"],["p10","application/x-pkcs10"],["p12","application/x-pkcs12"],["pac","application/x-ns-proxy-autoconfig"],["pages","application/x-iwork-pages-sffpages"],["pas","text/x-pascal"],["paw","application/vnd.pawaafile"],["pbd","application/vnd.powerbuilder6"],["pbm","image/x-portable-bitmap"],["pcap","application/vnd.tcpdump.pcap"],["pcf","application/x-font-pcf"],["pcl","application/vnd.hp-pcl"],["pclxl","application/vnd.hp-pclxl"],["pct","image/x-pict"],["pcurl","application/vnd.curl.pcurl"],["pcx","image/x-pcx"],["pdb","application/x-pilot"],["pde","text/x-processing"],["pdf","application/pdf"],["pem","application/x-x509-user-cert"],["pfa","application/x-font-type1"],["pfb","application/x-font-type1"],["pfm","application/x-font-type1"],["pfr","application/font-tdpfr"],["pfx","application/x-pkcs12"],["pgm","image/x-portable-graymap"],["pgn","application/x-chess-pgn"],["pgp","application/pgp"],["php","application/x-httpd-php"],["php3","application/x-httpd-php"],["php4","application/x-httpd-php"],["phps","application/x-httpd-php-source"],["phtml","application/x-httpd-php"],["pic","image/x-pict"],["pkg","application/octet-stream"],["pki","application/pkixcmp"],["pkipath","application/pkix-pkipath"],["pkpass","application/vnd.apple.pkpass"],["pl","application/x-perl"],["plb","application/vnd.3gpp.pic-bw-large"],["plc","application/vnd.mobius.plc"],["plf","application/vnd.pocketlearn"],["pls","application/pls+xml"],["pm","application/x-perl"],["pml","application/vnd.ctc-posml"],["png","image/png"],["pnm","image/x-portable-anymap"],["portpkg","application/vnd.macports.portpkg"],["pot","application/vnd.ms-powerpoint"],["potm","application/vnd.ms-powerpoint.presentation.macroEnabled.12"],["potx","application/vnd.openxmlformats-officedocument.presentationml.template"],["ppa","application/vnd.ms-powerpoint"],["ppam","application/vnd.ms-powerpoint.addin.macroEnabled.12"],["ppd","application/vnd.cups-ppd"],["ppm","image/x-portable-pixmap"],["pps","application/vnd.ms-powerpoint"],["ppsm","application/vnd.ms-powerpoint.slideshow.macroEnabled.12"],["ppsx","application/vnd.openxmlformats-officedocument.presentationml.slideshow"],["ppt","application/powerpoint"],["pptm","application/vnd.ms-powerpoint.presentation.macroEnabled.12"],["pptx","application/vnd.openxmlformats-officedocument.presentationml.presentation"],["pqa","application/vnd.palm"],["prc","application/x-pilot"],["pre","application/vnd.lotus-freelance"],["prf","application/pics-rules"],["provx","application/provenance+xml"],["ps","application/postscript"],["psb","application/vnd.3gpp.pic-bw-small"],["psd","application/x-photoshop"],["psf","application/x-font-linux-psf"],["pskcxml","application/pskc+xml"],["pti","image/prs.pti"],["ptid","application/vnd.pvi.ptid1"],["pub","application/x-mspublisher"],["pvb","application/vnd.3gpp.pic-bw-var"],["pwn","application/vnd.3m.post-it-notes"],["pya","audio/vnd.ms-playready.media.pya"],["pyv","video/vnd.ms-playready.media.pyv"],["qam","application/vnd.epson.quickanime"],["qbo","application/vnd.intu.qbo"],["qfx","application/vnd.intu.qfx"],["qps","application/vnd.publishare-delta-tree"],["qt","video/quicktime"],["qwd","application/vnd.quark.quarkxpress"],["qwt","application/vnd.quark.quarkxpress"],["qxb","application/vnd.quark.quarkxpress"],["qxd","application/vnd.quark.quarkxpress"],["qxl","application/vnd.quark.quarkxpress"],["qxt","application/vnd.quark.quarkxpress"],["ra","audio/x-realaudio"],["ram","audio/x-pn-realaudio"],["raml","application/raml+yaml"],["rapd","application/route-apd+xml"],["rar","application/x-rar"],["ras","image/x-cmu-raster"],["rcprofile","application/vnd.ipunplugged.rcprofile"],["rdf","application/rdf+xml"],["rdz","application/vnd.data-vision.rdz"],["relo","application/p2p-overlay+xml"],["rep","application/vnd.businessobjects"],["res","application/x-dtbresource+xml"],["rgb","image/x-rgb"],["rif","application/reginfo+xml"],["rip","audio/vnd.rip"],["ris","application/x-research-info-systems"],["rl","application/resource-lists+xml"],["rlc","image/vnd.fujixerox.edmics-rlc"],["rld","application/resource-lists-diff+xml"],["rm","audio/x-pn-realaudio"],["rmi","audio/midi"],["rmp","audio/x-pn-realaudio-plugin"],["rms","application/vnd.jcp.javame.midlet-rms"],["rmvb","application/vnd.rn-realmedia-vbr"],["rnc","application/relax-ng-compact-syntax"],["rng","application/xml"],["roa","application/rpki-roa"],["roff","text/troff"],["rp9","application/vnd.cloanto.rp9"],["rpm","audio/x-pn-realaudio-plugin"],["rpss","application/vnd.nokia.radio-presets"],["rpst","application/vnd.nokia.radio-preset"],["rq","application/sparql-query"],["rs","application/rls-services+xml"],["rsa","application/x-pkcs7"],["rsat","application/atsc-rsat+xml"],["rsd","application/rsd+xml"],["rsheet","application/urc-ressheet+xml"],["rss","application/rss+xml"],["rtf","text/rtf"],["rtx","text/richtext"],["run","application/x-makeself"],["rusd","application/route-usd+xml"],["rv","video/vnd.rn-realvideo"],["s","text/x-asm"],["s3m","audio/s3m"],["saf","application/vnd.yamaha.smaf-audio"],["sass","text/x-sass"],["sbml","application/sbml+xml"],["sc","application/vnd.ibm.secure-container"],["scd","application/x-msschedule"],["scm","application/vnd.lotus-screencam"],["scq","application/scvp-cv-request"],["scs","application/scvp-cv-response"],["scss","text/x-scss"],["scurl","text/vnd.curl.scurl"],["sda","application/vnd.stardivision.draw"],["sdc","application/vnd.stardivision.calc"],["sdd","application/vnd.stardivision.impress"],["sdkd","application/vnd.solent.sdkm+xml"],["sdkm","application/vnd.solent.sdkm+xml"],["sdp","application/sdp"],["sdw","application/vnd.stardivision.writer"],["sea","application/octet-stream"],["see","application/vnd.seemail"],["seed","application/vnd.fdsn.seed"],["sema","application/vnd.sema"],["semd","application/vnd.semd"],["semf","application/vnd.semf"],["senmlx","application/senml+xml"],["sensmlx","application/sensml+xml"],["ser","application/java-serialized-object"],["setpay","application/set-payment-initiation"],["setreg","application/set-registration-initiation"],["sfd-hdstx","application/vnd.hydrostatix.sof-data"],["sfs","application/vnd.spotfire.sfs"],["sfv","text/x-sfv"],["sgi","image/sgi"],["sgl","application/vnd.stardivision.writer-global"],["sgm","text/sgml"],["sgml","text/sgml"],["sh","application/x-sh"],["shar","application/x-shar"],["shex","text/shex"],["shf","application/shf+xml"],["shtml","text/html"],["sid","image/x-mrsid-image"],["sieve","application/sieve"],["sig","application/pgp-signature"],["sil","audio/silk"],["silo","model/mesh"],["sis","application/vnd.symbian.install"],["sisx","application/vnd.symbian.install"],["sit","application/x-stuffit"],["sitx","application/x-stuffitx"],["siv","application/sieve"],["skd","application/vnd.koan"],["skm","application/vnd.koan"],["skp","application/vnd.koan"],["skt","application/vnd.koan"],["sldm","application/vnd.ms-powerpoint.slide.macroenabled.12"],["sldx","application/vnd.openxmlformats-officedocument.presentationml.slide"],["slim","text/slim"],["slm","text/slim"],["sls","application/route-s-tsid+xml"],["slt","application/vnd.epson.salt"],["sm","application/vnd.stepmania.stepchart"],["smf","application/vnd.stardivision.math"],["smi","application/smil"],["smil","application/smil"],["smv","video/x-smv"],["smzip","application/vnd.stepmania.package"],["snd","audio/basic"],["snf","application/x-font-snf"],["so","application/octet-stream"],["spc","application/x-pkcs7-certificates"],["spdx","text/spdx"],["spf","application/vnd.yamaha.smaf-phrase"],["spl","application/x-futuresplash"],["spot","text/vnd.in3d.spot"],["spp","application/scvp-vp-response"],["spq","application/scvp-vp-request"],["spx","audio/ogg"],["sql","application/x-sql"],["src","application/x-wais-source"],["srt","application/x-subrip"],["sru","application/sru+xml"],["srx","application/sparql-results+xml"],["ssdl","application/ssdl+xml"],["sse","application/vnd.kodak-descriptor"],["ssf","application/vnd.epson.ssf"],["ssml","application/ssml+xml"],["sst","application/octet-stream"],["st","application/vnd.sailingtracker.track"],["stc","application/vnd.sun.xml.calc.template"],["std","application/vnd.sun.xml.draw.template"],["stf","application/vnd.wt.stf"],["sti","application/vnd.sun.xml.impress.template"],["stk","application/hyperstudio"],["stl","model/stl"],["stpx","model/step+xml"],["stpxz","model/step-xml+zip"],["stpz","model/step+zip"],["str","application/vnd.pg.format"],["stw","application/vnd.sun.xml.writer.template"],["styl","text/stylus"],["stylus","text/stylus"],["sub","text/vnd.dvb.subtitle"],["sus","application/vnd.sus-calendar"],["susp","application/vnd.sus-calendar"],["sv4cpio","application/x-sv4cpio"],["sv4crc","application/x-sv4crc"],["svc","application/vnd.dvb.service"],["svd","application/vnd.svd"],["svg","image/svg+xml"],["svgz","image/svg+xml"],["swa","application/x-director"],["swf","application/x-shockwave-flash"],["swi","application/vnd.aristanetworks.swi"],["swidtag","application/swid+xml"],["sxc","application/vnd.sun.xml.calc"],["sxd","application/vnd.sun.xml.draw"],["sxg","application/vnd.sun.xml.writer.global"],["sxi","application/vnd.sun.xml.impress"],["sxm","application/vnd.sun.xml.math"],["sxw","application/vnd.sun.xml.writer"],["t","text/troff"],["t3","application/x-t3vm-image"],["t38","image/t38"],["taglet","application/vnd.mynfc"],["tao","application/vnd.tao.intent-module-archive"],["tap","image/vnd.tencent.tap"],["tar","application/x-tar"],["tcap","application/vnd.3gpp2.tcap"],["tcl","application/x-tcl"],["td","application/urc-targetdesc+xml"],["teacher","application/vnd.smart.teacher"],["tei","application/tei+xml"],["teicorpus","application/tei+xml"],["tex","application/x-tex"],["texi","application/x-texinfo"],["texinfo","application/x-texinfo"],["text","text/plain"],["tfi","application/thraud+xml"],["tfm","application/x-tex-tfm"],["tfx","image/tiff-fx"],["tga","image/x-tga"],["tgz","application/x-tar"],["thmx","application/vnd.ms-officetheme"],["tif","image/tiff"],["tiff","image/tiff"],["tk","application/x-tcl"],["tmo","application/vnd.tmobile-livetv"],["toml","application/toml"],["torrent","application/x-bittorrent"],["tpl","application/vnd.groove-tool-template"],["tpt","application/vnd.trid.tpt"],["tr","text/troff"],["tra","application/vnd.trueapp"],["trig","application/trig"],["trm","application/x-msterminal"],["ts","video/mp2t"],["tsd","application/timestamped-data"],["tsv","text/tab-separated-values"],["ttc","font/collection"],["ttf","font/ttf"],["ttl","text/turtle"],["ttml","application/ttml+xml"],["twd","application/vnd.simtech-mindmapper"],["twds","application/vnd.simtech-mindmapper"],["txd","application/vnd.genomatix.tuxedo"],["txf","application/vnd.mobius.txf"],["txt","text/plain"],["u8dsn","message/global-delivery-status"],["u8hdr","message/global-headers"],["u8mdn","message/global-disposition-notification"],["u8msg","message/global"],["u32","application/x-authorware-bin"],["ubj","application/ubjson"],["udeb","application/x-debian-package"],["ufd","application/vnd.ufdl"],["ufdl","application/vnd.ufdl"],["ulx","application/x-glulx"],["umj","application/vnd.umajin"],["unityweb","application/vnd.unity"],["uoml","application/vnd.uoml+xml"],["uri","text/uri-list"],["uris","text/uri-list"],["urls","text/uri-list"],["usdz","model/vnd.usdz+zip"],["ustar","application/x-ustar"],["utz","application/vnd.uiq.theme"],["uu","text/x-uuencode"],["uva","audio/vnd.dece.audio"],["uvd","application/vnd.dece.data"],["uvf","application/vnd.dece.data"],["uvg","image/vnd.dece.graphic"],["uvh","video/vnd.dece.hd"],["uvi","image/vnd.dece.graphic"],["uvm","video/vnd.dece.mobile"],["uvp","video/vnd.dece.pd"],["uvs","video/vnd.dece.sd"],["uvt","application/vnd.dece.ttml+xml"],["uvu","video/vnd.uvvu.mp4"],["uvv","video/vnd.dece.video"],["uvva","audio/vnd.dece.audio"],["uvvd","application/vnd.dece.data"],["uvvf","application/vnd.dece.data"],["uvvg","image/vnd.dece.graphic"],["uvvh","video/vnd.dece.hd"],["uvvi","image/vnd.dece.graphic"],["uvvm","video/vnd.dece.mobile"],["uvvp","video/vnd.dece.pd"],["uvvs","video/vnd.dece.sd"],["uvvt","application/vnd.dece.ttml+xml"],["uvvu","video/vnd.uvvu.mp4"],["uvvv","video/vnd.dece.video"],["uvvx","application/vnd.dece.unspecified"],["uvvz","application/vnd.dece.zip"],["uvx","application/vnd.dece.unspecified"],["uvz","application/vnd.dece.zip"],["vbox","application/x-virtualbox-vbox"],["vbox-extpack","application/x-virtualbox-vbox-extpack"],["vcard","text/vcard"],["vcd","application/x-cdlink"],["vcf","text/x-vcard"],["vcg","application/vnd.groove-vcard"],["vcs","text/x-vcalendar"],["vcx","application/vnd.vcx"],["vdi","application/x-virtualbox-vdi"],["vds","model/vnd.sap.vds"],["vhd","application/x-virtualbox-vhd"],["vis","application/vnd.visionary"],["viv","video/vnd.vivo"],["vlc","application/videolan"],["vmdk","application/x-virtualbox-vmdk"],["vob","video/x-ms-vob"],["vor","application/vnd.stardivision.writer"],["vox","application/x-authorware-bin"],["vrml","model/vrml"],["vsd","application/vnd.visio"],["vsf","application/vnd.vsf"],["vss","application/vnd.visio"],["vst","application/vnd.visio"],["vsw","application/vnd.visio"],["vtf","image/vnd.valve.source.texture"],["vtt","text/vtt"],["vtu","model/vnd.vtu"],["vxml","application/voicexml+xml"],["w3d","application/x-director"],["wad","application/x-doom"],["wadl","application/vnd.sun.wadl+xml"],["war","application/java-archive"],["wasm","application/wasm"],["wav","audio/x-wav"],["wax","audio/x-ms-wax"],["wbmp","image/vnd.wap.wbmp"],["wbs","application/vnd.criticaltools.wbs+xml"],["wbxml","application/wbxml"],["wcm","application/vnd.ms-works"],["wdb","application/vnd.ms-works"],["wdp","image/vnd.ms-photo"],["weba","audio/webm"],["webapp","application/x-web-app-manifest+json"],["webm","video/webm"],["webmanifest","application/manifest+json"],["webp","image/webp"],["wg","application/vnd.pmi.widget"],["wgt","application/widget"],["wks","application/vnd.ms-works"],["wm","video/x-ms-wm"],["wma","audio/x-ms-wma"],["wmd","application/x-ms-wmd"],["wmf","image/wmf"],["wml","text/vnd.wap.wml"],["wmlc","application/wmlc"],["wmls","text/vnd.wap.wmlscript"],["wmlsc","application/vnd.wap.wmlscriptc"],["wmv","video/x-ms-wmv"],["wmx","video/x-ms-wmx"],["wmz","application/x-msmetafile"],["woff","font/woff"],["woff2","font/woff2"],["word","application/msword"],["wpd","application/vnd.wordperfect"],["wpl","application/vnd.ms-wpl"],["wps","application/vnd.ms-works"],["wqd","application/vnd.wqd"],["wri","application/x-mswrite"],["wrl","model/vrml"],["wsc","message/vnd.wfa.wsc"],["wsdl","application/wsdl+xml"],["wspolicy","application/wspolicy+xml"],["wtb","application/vnd.webturbo"],["wvx","video/x-ms-wvx"],["x3d","model/x3d+xml"],["x3db","model/x3d+fastinfoset"],["x3dbz","model/x3d+binary"],["x3dv","model/x3d-vrml"],["x3dvz","model/x3d+vrml"],["x3dz","model/x3d+xml"],["x32","application/x-authorware-bin"],["x_b","model/vnd.parasolid.transmit.binary"],["x_t","model/vnd.parasolid.transmit.text"],["xaml","application/xaml+xml"],["xap","application/x-silverlight-app"],["xar","application/vnd.xara"],["xav","application/xcap-att+xml"],["xbap","application/x-ms-xbap"],["xbd","application/vnd.fujixerox.docuworks.binder"],["xbm","image/x-xbitmap"],["xca","application/xcap-caps+xml"],["xcs","application/calendar+xml"],["xdf","application/xcap-diff+xml"],["xdm","application/vnd.syncml.dm+xml"],["xdp","application/vnd.adobe.xdp+xml"],["xdssc","application/dssc+xml"],["xdw","application/vnd.fujixerox.docuworks"],["xel","application/xcap-el+xml"],["xenc","application/xenc+xml"],["xer","application/patch-ops-error+xml"],["xfdf","application/vnd.adobe.xfdf"],["xfdl","application/vnd.xfdl"],["xht","application/xhtml+xml"],["xhtml","application/xhtml+xml"],["xhvml","application/xv+xml"],["xif","image/vnd.xiff"],["xl","application/excel"],["xla","application/vnd.ms-excel"],["xlam","application/vnd.ms-excel.addin.macroEnabled.12"],["xlc","application/vnd.ms-excel"],["xlf","application/xliff+xml"],["xlm","application/vnd.ms-excel"],["xls","application/vnd.ms-excel"],["xlsb","application/vnd.ms-excel.sheet.binary.macroEnabled.12"],["xlsm","application/vnd.ms-excel.sheet.macroEnabled.12"],["xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],["xlt","application/vnd.ms-excel"],["xltm","application/vnd.ms-excel.template.macroEnabled.12"],["xltx","application/vnd.openxmlformats-officedocument.spreadsheetml.template"],["xlw","application/vnd.ms-excel"],["xm","audio/xm"],["xml","application/xml"],["xns","application/xcap-ns+xml"],["xo","application/vnd.olpc-sugar"],["xop","application/xop+xml"],["xpi","application/x-xpinstall"],["xpl","application/xproc+xml"],["xpm","image/x-xpixmap"],["xpr","application/vnd.is-xpr"],["xps","application/vnd.ms-xpsdocument"],["xpw","application/vnd.intercon.formnet"],["xpx","application/vnd.intercon.formnet"],["xsd","application/xml"],["xsl","application/xml"],["xslt","application/xslt+xml"],["xsm","application/vnd.syncml+xml"],["xspf","application/xspf+xml"],["xul","application/vnd.mozilla.xul+xml"],["xvm","application/xv+xml"],["xvml","application/xv+xml"],["xwd","image/x-xwindowdump"],["xyz","chemical/x-xyz"],["xz","application/x-xz"],["yaml","text/yaml"],["yang","application/yang"],["yin","application/yin+xml"],["yml","text/yaml"],["ymp","text/x-suse-ymp"],["z","application/x-compress"],["z1","application/x-zmachine"],["z2","application/x-zmachine"],["z3","application/x-zmachine"],["z4","application/x-zmachine"],["z5","application/x-zmachine"],["z6","application/x-zmachine"],["z7","application/x-zmachine"],["z8","application/x-zmachine"],["zaz","application/vnd.zzazz.deck+xml"],["zip","application/zip"],["zir","application/vnd.zul"],["zirz","application/vnd.zul"],["zmm","application/vnd.handheld-entertainment+xml"],["zsh","text/x-scriptzsh"]]);function wi(e,t,n){const r=pB(e),{webkitRelativePath:o}=e,i=typeof t=="string"?t:typeof o=="string"&&o.length>0?o:`./${e.name}`;return typeof r.path!="string"&&uT(r,"path",i),uT(r,"relativePath",i),r}function pB(e){const{name:t}=e;if(t&&t.lastIndexOf(".")!==-1&&!e.type){const r=t.split(".").pop().toLowerCase(),o=fB.get(r);o&&Object.defineProperty(e,"type",{value:o,writable:!1,configurable:!1,enumerable:!0})}return e}function uT(e,t,n){Object.defineProperty(e,t,{value:n,writable:!1,configurable:!1,enumerable:!0})}const hB=[".DS_Store","Thumbs.db"];function mB(e){return So(this,void 0,void 0,function*(){return tc(e)&&gB(e.dataTransfer)?xB(e.dataTransfer,e.type):vB(e)?yB(e):Array.isArray(e)&&e.every(t=>"getFile"in t&&typeof t.getFile=="function")?bB(e):[]})}function gB(e){return tc(e)}function vB(e){return tc(e)&&tc(e.target)}function tc(e){return typeof e=="object"&&e!==null}function yB(e){return ah(e.target.files).map(t=>wi(t))}function bB(e){return So(this,void 0,void 0,function*(){return(yield Promise.all(e.map(n=>n.getFile()))).map(n=>wi(n))})}function xB(e,t){return So(this,void 0,void 0,function*(){if(e.items){const n=ah(e.items).filter(o=>o.kind==="file");if(t!=="drop")return n;const r=yield Promise.all(n.map(wB));return dT(fT(r))}return dT(ah(e.files).map(n=>wi(n)))})}function dT(e){return e.filter(t=>hB.indexOf(t.name)===-1)}function ah(e){if(e===null)return[];const t=[];for(let n=0;n<e.length;n++){const r=e[n];t.push(r)}return t}function wB(e){if(typeof e.webkitGetAsEntry!="function")return pT(e);const t=e.webkitGetAsEntry();return t&&t.isDirectory?hT(t):pT(e,t)}function fT(e){return e.reduce((t,n)=>[...t,...Array.isArray(n)?fT(n):[n]],[])}function pT(e,t){return So(this,void 0,void 0,function*(){var n;if(globalThis.isSecureContext&&typeof e.getAsFileSystemHandle=="function"){const i=yield e.getAsFileSystemHandle();if(i===null)throw new Error(`${e} is not a File`);if(i!==void 0){const a=yield i.getFile();return a.handle=i,wi(a)}}const r=e.getAsFile();if(!r)throw new Error(`${e} is not a File`);return wi(r,(n=t?.fullPath)!==null&&n!==void 0?n:void 0)})}function SB(e){return So(this,void 0,void 0,function*(){return e.isDirectory?hT(e):TB(e)})}function hT(e){const t=e.createReader();return new Promise((n,r)=>{const o=[];function i(){t.readEntries(a=>So(this,void 0,void 0,function*(){if(a.length){const s=Promise.all(a.map(SB));o.push(s),i()}else try{const s=yield Promise.all(o);n(s)}catch(s){r(s)}}),a=>{r(a)})}i()})}function TB(e){return So(this,void 0,void 0,function*(){return new Promise((t,n)=>{e.file(r=>{const o=wi(r,e.fullPath);t(o)},r=>{n(r)})})})}var nc={},mT;function EB(){return mT||(mT=1,nc.__esModule=!0,nc.default=function(e,t){if(e&&t){var n=Array.isArray(t)?t:t.split(",");if(n.length===0)return!0;var r=e.name||"",o=(e.type||"").toLowerCase(),i=o.replace(/\/.*$/,"");return n.some(function(a){var s=a.trim().toLowerCase();return s.charAt(0)==="."?r.toLowerCase().endsWith(s):s.endsWith("/*")?i===s.replace(/\/.*$/,""):o===s})}return!0}),nc}var kB=EB();const sh=Yh(kB);function gT(e){return AB(e)||IB(e)||xT(e)||CB()}function CB(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
17
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function IB(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function AB(e){if(Array.isArray(e))return lh(e)}function vT(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function yT(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?vT(Object(n),!0).forEach(function(r){bT(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):vT(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function bT(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ha(e,t){return _B(e)||OB(e,t)||xT(e,t)||PB()}function PB(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
18
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function xT(e,t){if(e){if(typeof e=="string")return lh(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return lh(e,t)}}function lh(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function OB(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],o=!0,i=!1,a,s;try{for(n=n.call(e);!(o=(a=n.next()).done)&&(r.push(a.value),!(t&&r.length===t));o=!0);}catch(l){i=!0,s=l}finally{try{!o&&n.return!=null&&n.return()}finally{if(i)throw s}}return r}}function _B(e){if(Array.isArray(e))return e}var MB=typeof sh=="function"?sh:sh.default,DB="file-invalid-type",NB="file-too-large",FB="file-too-small",LB="too-many-files",VB=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",n=t.split(","),r=n.length>1?"one of ".concat(n.join(", ")):n[0];return{code:DB,message:"File type must be ".concat(r)}},wT=function(t){return{code:NB,message:"File is larger than ".concat(t," ").concat(t===1?"byte":"bytes")}},ST=function(t){return{code:FB,message:"File is smaller than ".concat(t," ").concat(t===1?"byte":"bytes")}},$B={code:LB,message:"Too many files"};function TT(e,t){var n=e.type==="application/x-moz-file"||MB(e,t);return[n,n?null:VB(t)]}function ET(e,t,n){if(To(e.size))if(To(t)&&To(n)){if(e.size>n)return[!1,wT(n)];if(e.size<t)return[!1,ST(t)]}else{if(To(t)&&e.size<t)return[!1,ST(t)];if(To(n)&&e.size>n)return[!1,wT(n)]}return[!0,null]}function To(e){return e!=null}function zB(e){var t=e.files,n=e.accept,r=e.minSize,o=e.maxSize,i=e.multiple,a=e.maxFiles,s=e.validator;return!i&&t.length>1||i&&a>=1&&t.length>a?!1:t.every(function(l){var c=TT(l,n),u=Ha(c,1),d=u[0],f=ET(l,r,o),p=Ha(f,1),v=p[0],h=s?s(l):null;return d&&v&&!h})}function rc(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function oc(e){return e.dataTransfer?Array.prototype.some.call(e.dataTransfer.types,function(t){return t==="Files"||t==="application/x-moz-file"}):!!e.target&&!!e.target.files}function kT(e){e.preventDefault()}function jB(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function RB(e){return e.indexOf("Edge/")!==-1}function BB(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return jB(e)||RB(e)}function or(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(r){for(var o=arguments.length,i=new Array(o>1?o-1:0),a=1;a<o;a++)i[a-1]=arguments[a];return t.some(function(s){return!rc(r)&&s&&s.apply(void 0,[r].concat(i)),rc(r)})}}function HB(){return"showOpenFilePicker"in window}function WB(e){if(To(e)){var t=Object.entries(e).filter(function(n){var r=Ha(n,2),o=r[0],i=r[1],a=!0;return CT(o)||(console.warn('Skipped "'.concat(o,'" because it is not a valid MIME type. Check https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types for a list of valid MIME types.')),a=!1),(!Array.isArray(i)||!i.every(IT))&&(console.warn('Skipped "'.concat(o,'" because an invalid file extension was provided.')),a=!1),a}).reduce(function(n,r){var o=Ha(r,2),i=o[0],a=o[1];return yT(yT({},n),{},bT({},i,a))},{});return[{description:"Files",accept:t}]}return e}function qB(e){if(To(e))return Object.entries(e).reduce(function(t,n){var r=Ha(n,2),o=r[0],i=r[1];return[].concat(gT(t),[o],gT(i))},[]).filter(function(t){return CT(t)||IT(t)}).join(",")}function UB(e){return e instanceof DOMException&&(e.name==="AbortError"||e.code===e.ABORT_ERR)}function GB(e){return e instanceof DOMException&&(e.name==="SecurityError"||e.code===e.SECURITY_ERR)}function CT(e){return e==="audio/*"||e==="video/*"||e==="image/*"||e==="text/*"||e==="application/*"||/\w+\/[-+.\w]+/g.test(e)}function IT(e){return/^.*\.[\w]+$/.test(e)}var YB=["children"],KB=["open"],ZB=["refKey","role","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"],XB=["refKey","onChange","onClick"];function QB(e){return t4(e)||e4(e)||AT(e)||JB()}function JB(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
19
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function e4(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function t4(e){if(Array.isArray(e))return uh(e)}function ch(e,t){return o4(e)||r4(e,t)||AT(e,t)||n4()}function n4(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
20
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function AT(e,t){if(e){if(typeof e=="string")return uh(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return uh(e,t)}}function uh(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function r4(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],o=!0,i=!1,a,s;try{for(n=n.call(e);!(o=(a=n.next()).done)&&(r.push(a.value),!(t&&r.length===t));o=!0);}catch(l){i=!0,s=l}finally{try{!o&&n.return!=null&&n.return()}finally{if(i)throw s}}return r}}function o4(e){if(Array.isArray(e))return e}function PT(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function At(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?PT(Object(n),!0).forEach(function(r){dh(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):PT(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function dh(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ic(e,t){if(e==null)return{};var n=i4(e,t),r,o;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)r=i[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function i4(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,i;for(i=0;i<r.length;i++)o=r[i],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}var fh=S.forwardRef(function(e,t){var n=e.children,r=ic(e,YB),o=_T(r),i=o.open,a=ic(o,KB);return S.useImperativeHandle(t,function(){return{open:i}},[i]),S.createElement(S.Fragment,null,n(At(At({},a),{},{open:i})))});fh.displayName="Dropzone";var OT={disabled:!1,getFilesFromEvent:mB,maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!1,autoFocus:!1};fh.defaultProps=OT,fh.propTypes={children:vt.func,accept:vt.objectOf(vt.arrayOf(vt.string)),multiple:vt.bool,preventDropOnDocument:vt.bool,noClick:vt.bool,noKeyboard:vt.bool,noDrag:vt.bool,noDragEventsBubbling:vt.bool,minSize:vt.number,maxSize:vt.number,maxFiles:vt.number,disabled:vt.bool,getFilesFromEvent:vt.func,onFileDialogCancel:vt.func,onFileDialogOpen:vt.func,useFsAccessApi:vt.bool,autoFocus:vt.bool,onDragEnter:vt.func,onDragLeave:vt.func,onDragOver:vt.func,onDrop:vt.func,onDropAccepted:vt.func,onDropRejected:vt.func,onError:vt.func,validator:vt.func};var ph={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function _T(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=At(At({},OT),e),n=t.accept,r=t.disabled,o=t.getFilesFromEvent,i=t.maxSize,a=t.minSize,s=t.multiple,l=t.maxFiles,c=t.onDragEnter,u=t.onDragLeave,d=t.onDragOver,f=t.onDrop,p=t.onDropAccepted,v=t.onDropRejected,h=t.onFileDialogCancel,m=t.onFileDialogOpen,y=t.useFsAccessApi,x=t.autoFocus,b=t.preventDropOnDocument,E=t.noClick,T=t.noKeyboard,I=t.noDrag,w=t.noDragEventsBubbling,k=t.onError,P=t.validator,_=S.useMemo(function(){return qB(n)},[n]),F=S.useMemo(function(){return WB(n)},[n]),V=S.useMemo(function(){return typeof m=="function"?m:MT},[m]),D=S.useMemo(function(){return typeof h=="function"?h:MT},[h]),O=S.useRef(null),N=S.useRef(null),z=S.useReducer(a4,ph),M=ch(z,2),C=M[0],L=M[1],$=C.isFocused,B=C.isFileDialogActive,q=S.useRef(typeof window<"u"&&window.isSecureContext&&y&&HB()),G=function(){!q.current&&B&&setTimeout(function(){if(N.current){var R=N.current.files;R.length||(L({type:"closeDialog"}),D())}},300)};S.useEffect(function(){return window.addEventListener("focus",G,!1),function(){window.removeEventListener("focus",G,!1)}},[N,B,D,q]);var W=S.useRef([]),J=function(R){O.current&&O.current.contains(R.target)||(R.preventDefault(),W.current=[])};S.useEffect(function(){return b&&(document.addEventListener("dragover",kT,!1),document.addEventListener("drop",J,!1)),function(){b&&(document.removeEventListener("dragover",kT),document.removeEventListener("drop",J))}},[O,b]),S.useEffect(function(){return!r&&x&&O.current&&O.current.focus(),function(){}},[O,x,r]);var re=S.useCallback(function(j){k?k(j):console.error(j)},[k]),ee=S.useCallback(function(j){j.preventDefault(),j.persist(),ve(j),W.current=[].concat(QB(W.current),[j.target]),oc(j)&&Promise.resolve(o(j)).then(function(R){if(!(rc(j)&&!w)){var ne=R.length,ce=ne>0&&zB({files:R,accept:_,minSize:a,maxSize:i,multiple:s,maxFiles:l,validator:P}),xe=ne>0&&!ce;L({isDragAccept:ce,isDragReject:xe,isDragActive:!0,type:"setDraggedFiles"}),c&&c(j)}}).catch(function(R){return re(R)})},[o,c,re,w,_,a,i,s,l,P]),Y=S.useCallback(function(j){j.preventDefault(),j.persist(),ve(j);var R=oc(j);if(R&&j.dataTransfer)try{j.dataTransfer.dropEffect="copy"}catch{}return R&&d&&d(j),!1},[d,w]),K=S.useCallback(function(j){j.preventDefault(),j.persist(),ve(j);var R=W.current.filter(function(ce){return O.current&&O.current.contains(ce)}),ne=R.indexOf(j.target);ne!==-1&&R.splice(ne,1),W.current=R,!(R.length>0)&&(L({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),oc(j)&&u&&u(j))},[O,u,w]),X=S.useCallback(function(j,R){var ne=[],ce=[];j.forEach(function(xe){var Ce=TT(xe,_),_e=ch(Ce,2),qe=_e[0],pt=_e[1],ht=ET(xe,a,i),$t=ch(ht,2),$e=$t[0],U=$t[1],Z=P?P(xe):null;if(qe&&$e&&!Z)ne.push(xe);else{var Pe=[pt,U];Z&&(Pe=Pe.concat(Z)),ce.push({file:xe,errors:Pe.filter(function(Ge){return Ge})})}}),(!s&&ne.length>1||s&&l>=1&&ne.length>l)&&(ne.forEach(function(xe){ce.push({file:xe,errors:[$B]})}),ne.splice(0)),L({acceptedFiles:ne,fileRejections:ce,isDragReject:ce.length>0,type:"setFiles"}),f&&f(ne,ce,R),ce.length>0&&v&&v(ce,R),ne.length>0&&p&&p(ne,R)},[L,s,_,a,i,l,f,p,v,P]),de=S.useCallback(function(j){j.preventDefault(),j.persist(),ve(j),W.current=[],oc(j)&&Promise.resolve(o(j)).then(function(R){rc(j)&&!w||X(R,j)}).catch(function(R){return re(R)}),L({type:"reset"})},[o,X,re,w]),H=S.useCallback(function(){if(q.current){L({type:"openDialog"}),V();var j={multiple:s,types:F};window.showOpenFilePicker(j).then(function(R){return o(R)}).then(function(R){X(R,null),L({type:"closeDialog"})}).catch(function(R){UB(R)?(D(R),L({type:"closeDialog"})):GB(R)?(q.current=!1,N.current?(N.current.value=null,N.current.click()):re(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no <input> was provided."))):re(R)});return}N.current&&(L({type:"openDialog"}),V(),N.current.value=null,N.current.click())},[L,V,D,y,X,re,F,s]),se=S.useCallback(function(j){!O.current||!O.current.isEqualNode(j.target)||(j.key===" "||j.key==="Enter"||j.keyCode===32||j.keyCode===13)&&(j.preventDefault(),H())},[O,H]),ie=S.useCallback(function(){L({type:"focus"})},[]),Q=S.useCallback(function(){L({type:"blur"})},[]),le=S.useCallback(function(){E||(BB()?setTimeout(H,0):H())},[E,H]),te=function(R){return r?null:R},fe=function(R){return T?null:te(R)},pe=function(R){return I?null:te(R)},ve=function(R){w&&R.stopPropagation()},Ae=S.useMemo(function(){return function(){var j=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},R=j.refKey,ne=R===void 0?"ref":R,ce=j.role,xe=j.onKeyDown,Ce=j.onFocus,_e=j.onBlur,qe=j.onClick,pt=j.onDragEnter,ht=j.onDragOver,$t=j.onDragLeave,$e=j.onDrop,U=ic(j,ZB);return At(At(dh({onKeyDown:fe(or(xe,se)),onFocus:fe(or(Ce,ie)),onBlur:fe(or(_e,Q)),onClick:te(or(qe,le)),onDragEnter:pe(or(pt,ee)),onDragOver:pe(or(ht,Y)),onDragLeave:pe(or($t,K)),onDrop:pe(or($e,de)),role:typeof ce=="string"&&ce!==""?ce:"presentation"},ne,O),!r&&!T?{tabIndex:0}:{}),U)}},[O,se,ie,Q,le,ee,Y,K,de,T,I,r]),me=S.useCallback(function(j){j.stopPropagation()},[]),oe=S.useMemo(function(){return function(){var j=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},R=j.refKey,ne=R===void 0?"ref":R,ce=j.onChange,xe=j.onClick,Ce=ic(j,XB),_e=dh({accept:_,multiple:s,type:"file",style:{border:0,clip:"rect(0, 0, 0, 0)",clipPath:"inset(50%)",height:"1px",margin:"0 -1px -1px 0",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap"},onChange:te(or(ce,de)),onClick:te(or(xe,me)),tabIndex:-1},ne,N);return At(At({},_e),Ce)}},[N,n,s,de,r]);return At(At({},C),{},{isFocused:$&&!r,getRootProps:Ae,getInputProps:oe,rootRef:O,inputRef:N,open:te(H)})}function a4(e,t){switch(t.type){case"focus":return At(At({},e),{},{isFocused:!0});case"blur":return At(At({},e),{},{isFocused:!1});case"openDialog":return At(At({},ph),{},{isFileDialogActive:!0});case"closeDialog":return At(At({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return At(At({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return At(At({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections,isDragReject:t.isDragReject});case"reset":return At({},ph);default:return e}}function MT(){}const DT=S.createContext([null,()=>{}]),s4=()=>S.useContext(DT),l4=e=>e.type.startsWith("image/")?"img":e.type.startsWith("audio/")?"audio":e.type.startsWith("video/")?"video":e.type,c4={csv:wu,xls:wu,mov:Ag,mp4:Ag,xlsx:wu,pdf:Ig,txt:Ig,json:XC,mp3:UC},u4=e=>{const[,t]=s4(),[n,r]=S.useState({url:"",type:"",size:""});S.useEffect(()=>{const l=e.file,c=URL.createObjectURL(l);return r({url:c,type:l4(l),size:rB(l.size)}),()=>URL.revokeObjectURL(c)},[e.file]);const o=l=>{l.stopPropagation(),l.preventDefault(),t({...n,file:e.file})},i=l=>{l.preventDefault(),l.stopPropagation(),e.onDeleteFile?.(e.file)},a=c4[e.file.name.split(".").at(-1)]??Pg,s=n.type==="img"?g.jsx("img",{src:n.url,className:"object-contain w-full",alt:e.file.name}):g.jsx(a,{strokeWidth:2,absoluteStrokeWidth:!0,size:48});return g.jsxs("li",{className:"flex flex-row gap-4 justify-between w-full border-b border-card-border last:border-b-transparent",children:[g.jsxs("div",{className:"flex flex-col gap-4",children:[g.jsxs("div",{className:"flex flex-row gap-4 items-center",children:[g.jsx("button",{type:"button",onClick:o,className:"flex overflow-hidden justify-center items-center max-w-16 m-2 size-16",children:s}),g.jsxs("div",{className:"flex flex-col justify-start items-start text-left",children:[g.jsx("span",{children:e.file.name}),g.jsx("span",{className:"text-sm italic",children:n.size})]})]}),e.File?g.jsx("div",{className:"flex-1 min-w-full",children:g.jsx(e.File,{file:e.file})}):null]}),g.jsx("div",{className:"flex justify-start py-4 transition-colors duration-300 ease-linear align-start hover:text-danger-hover",children:g.jsx("button",{onClick:i,type:"button",className:"flex justify-center items-center size-6",children:g.jsx(Mo,{size:16})})})]})},d4=e=>g.jsx("ul",{className:"space-y-8 w-full",children:e.files.map(t=>g.jsx(u4,{File:e.File,onDeleteFile:e.onDeleteFile,file:t},t.name))}),NT=e=>{const t=Pt(),n=e.dragging?QC:JC;return g.jsxs("div",{className:"flex flex-col justify-center items-center",children:[g.jsx("div",{className:"flex flex-col gap-2 justify-center items-center",children:g.jsx(n,{className:"text-primary",size:80})}),g.jsxs("div",{className:"flex flex-col gap-1 items-center my-4",children:[g.jsx("p",{children:t.uploadIdle}),g.jsx("button",{className:"underline text-primary",type:"button",children:t.uploadIdleButton})]})]})},f4=e=>e.isDragActive?g.jsx(NT,{files:e.files,dragging:!0}):e.files.length>0?g.jsx(d4,{File:e.File,onDeleteFile:e.onDeleteFile,files:e.files}):g.jsx(S.Fragment,{children:e.idle}),p4=g.jsx(NT,{dragging:!1}),h4=e=>{const t=e.item.file,n=e.item.type;return g.jsxs("div",{className:"flex flex-col gap-4",children:[g.jsx("p",{className:"text-lg font-medium",children:e.item.file.name}),g.jsx("p",{className:"text-base",children:e.item.size}),n==="img"?g.jsx("img",{className:"container inline-block w-full max-w-96",src:e.item.url,alt:t.name}):n==="video"?g.jsx("video",{className:"container block w-full max-w-96",src:e.item.url,controls:!0,muted:!0}):n==="audio"?g.jsx("figure",{children:g.jsx("audio",{controls:!0,src:e.item.url})}):null]})},m4=({idle:e=p4,onDeleteFile:t,File:n,onDrop:r,...o})=>{const i=Pt(),a=S.useState(null),[s,l]=S.useState([]),c=o.files??s,u=()=>a[1](null),d=h=>{r?.(h),l(m=>m.concat(h))},{getRootProps:f,getInputProps:p,isDragActive:v}=_T({onDrop:d});return g.jsxs(DT.Provider,{value:a,children:[g.jsx(jp,{overlayClickClose:!0,title:i.uploadDialogTitle,ariaTitle:i.uploadDialogTitle,open:a[0]!==null,onChange:u,children:a[0]?g.jsx(h4,{item:a[0]}):null}),g.jsxs("div",{...f(),"data-active":c?c.length>0:!1,className:"flex flex-col items-center justify-center rounded-lg border border-card-border p-6 text-foreground data-[active=true]:border-solid data-[active=false]:border-dashed data-[active=true]:border-transparent data-[active=true]:bg-card-background",children:[g.jsx("input",{...p(o),name:o.name,id:o.name}),g.jsx(f4,{File:n,onDeleteFile:t,isDragActive:v,idle:e,files:c})]})]})},FT=()=>window.matchMedia("@media (pointer: coarse)"),g4=()=>{const e=S.useRef(Cr()?null:FT()),[t,n]=S.useState(Cr()?!1:e.current?.matches??!1);return S.useEffect(()=>{(e.current===null?FT():e.current).addEventListener("change",o=>n(o.matches))},[]),t},LT=(e,t="overflow-hidden")=>{const n=S.useRef(null),r=g4(),o=S.useRef(Cr()?"":document.documentElement.style.overflowY);return S.useEffect(()=>{if(!(n.current===null&&!e)&&t!=="block-only"&&t==="overflow-hidden")if(e){if(o.current=document.documentElement.style.overflowY,document.documentElement.style.overflowY="hidden",r||ay())return;document.documentElement.style.padding=ug(document.documentElement)?"0 15px 0 0":""}else document.documentElement.style.padding="",document.documentElement.style.overflowY=o.current},[e,r,t]),S.useEffect(()=>{if(!e)return;const i=new AbortController,a=document.documentElement,s=l=>{const c=n.current;if(c&&c.contains(l.target)){const u=c.getBoundingClientRect(),d=c.style.height?Number(Ak(c.style.height)):null,f=Re.number(d)?d:u.height,p=c.scrollHeight<=f;return f===c.scrollHeight?e?l.preventDefault():void 0:p?void 0:e?l.preventDefault():void 0}return l.currentTarget===document.documentElement,e?l.preventDefault():void 0};return a.addEventListener("wheel",s,{signal:i.signal,passive:!1}),a.addEventListener("scroll",s,{signal:i.signal,passive:!1}),()=>{i.abort()}},[e]),n},v4=(e,t)=>{e=String(e).toLocaleLowerCase(),t=String(t).toLocaleLowerCase();const n=t[0],r=e.split("").map((a,s)=>a===n?s:!1).filter(a=>a!==!1);if(r.length===0)return null;const o=[];if(r.forEach(a=>{let s=a+1;const l=[a];for(let c=1;c<t.length;c++){const u=t[c];if(s=e.indexOf(u,s),s===-1)return;l.push(s),s++}o.push(l)}),o.length===0)return null;const i=o.sort((a,s)=>{if(a.length===1)return a[0]-s[0];const l=a[a.length-1]-a[0],c=s[s.length-1]-s[0];return l-c})[0];return e===t?1:i.length>1?2+(i[i.length-1]-i[0]):2+i[0]},VT=(e,t,n)=>{const r=e.split(t).filter(Boolean);let o=n;for(const i of r){if(o==null)return o;o=o[i]}return o},$T={basic:/[,[\]]+?/,extend:/[,[\].]+?/},zT=(e,t)=>{const n=VT(t,$T.basic,e);return n!==void 0&&n!==e?n:VT(t,$T.extend,e)},jT=e=>e.replace(/[^0-9]/g,""),ac=e=>e.normalize("NFD").replace(/[\u0300-\u036f]/g,""),RT=(e,t,n,r="FUZZY")=>r==="CONTAINS"?e.includes(t):r==="EQUAL"?e===t:r==="CONTAINS_NUMBERS"?jT(e).includes(jT(t)):r==="STARTS_WITH"?e.startsWith(t):r==="ENDS_WITH"?e.endsWith(t):r==="FUZZY"?v4(e,t)!==null:!1,y4=(e,t,n,r="FUZZY")=>Array.isArray(t)?t.some(o=>RT(e,o,n,r)):RT(e,t,n,r),hh=(e,t,n)=>{if(n.length===0)return e;const r=new Map,o=n.map(i=>({...i,value:Re.array(i.value)?i.value.map(ac):ac(`${i.value}`)}));return e.forEach(i=>{const a=zT(i,t);o.forEach(s=>{const l=zT(i,s.key);if(!l)return;const c=ac(`${s.value}`.toLocaleLowerCase()).trim(),u=ac(`${l}`.toLocaleLowerCase()).trim();if(y4(u,c,s.score,s.match))return void r.set(a,i);Re.function(s.ifNotMatch)&&s.ifNotMatch(c,u)&&r.set(a,i)})}),Array.from(r.values())},b4=e=>g.jsx(S.Fragment,{children:e.children}),x4={duration:200,initial:{transform:"scaleY(0)",opacity:.2},open:{transform:"scaleY(1)",opacity:1},close:{transform:"scaleY(0)",opacity:0}},w4=[],S4=S.forwardRef(function(t,n){return g.jsx(Be.ul,{...t,ref:n,className:"overscroll-contain w-full rounded-lg h-96",children:g.jsx(Nn,{children:t.children})})}),T4=S.forwardRef(function({item:t,context:n,...r},o){return g.jsx(Be.li,{...r,ref:o,className:"first:rounded-t-lg last:rounded-t-lg"})}),E4={List:S4,Item:T4},Si=40,k4=S.forwardRef(({left:e,error:t,right:n,loading:r,options:o,container:i,rightLabel:a,interactive:s,emptyMessage:l,optionalText:c,labelClassName:u,feedback:d=null,hideLeft:f=!1,required:p=!1,dynamicOption:v=!1,...h},m)=>{const y=S.useRef(null),x=S.useRef(null),b=S.useRef(null),E=h.value??h.defaultValue??"",T=Pt(),[I,w]=S.useState(()=>Math.min(320,Si*o.length)),[k,P]=S.useState(!1),[_,F]=S.useState(""),[V,D]=S.useState(E),[O,N]=S.useState(()=>o.find(R=>R.value===E)?.label??E),[z,M]=S.useState(null),C=S.useRef(w4),L=LT(k,"block-only"),$=v&&_!==""?[{value:_,label:_,"data-dynamic":"true"},...o]:o,B=()=>Fi.flushSync(()=>P(!0)),q=_?hh($,"value",[{key:"value",value:_},{key:"label",value:_}]):$,G=()=>{P(!1),w(0)},W=q.filter(R=>R.hidden!==!0),J=v?void 0:`^(${o.map(R=>`${ed(R.value)}${R.label?"|"+ed(R.label):""}`).join("|")})$`,{x:re,y:ee,strategy:Y,refs:K,context:X,placement:de}=Gn({open:k,transform:!0,onOpenChange:P,whileElementsMounted:Jr,middleware:[$o(4),xv({allowedPlacements:["top-start","bottom-start"],alignment:"start"}),bv({padding:10,elementContext:"reference",apply(R){const ce=R.elements.floating.querySelector("ul")?.getBoundingClientRect().height||0,xe=$i(K.reference.current,window.innerHeight),Ce=Math.min(ce<Si?xe:ce,xe,R.availableHeight),_e=W.length===0?Si:Math.min(Ce,xe,ce),qe=`${x.current.getBoundingClientRect().width}px`;Object.assign(R.elements.floating.style,{width:qe,maxWidth:qe,height:_e})}})]}),H=Qv(X,x4),{getReferenceProps:se,getFloatingProps:ie,getItemProps:Q}=Yn([fr(X,{role:"listbox"}),kr(X),Hs(X,{cols:0,listRef:C,loop:!0,virtual:!0,allowEscape:!0,activeIndex:z,selectedIndex:z,focusItemOnOpen:"auto",openOnArrowKeyDown:!0,scrollItemIntoView:!0})]);S.useEffect(()=>{if(h.value){const R=o.find(ne=>ne.value===h.value);R&&(N(R.label??R.value),D(h.value))}},[h.value,o.length]),S.useEffect(()=>{if(!k)return w(0);const R=K.reference;if(R.current===null)return;const ne=$i(R.current,window.innerHeight);setTimeout(()=>w(Math.min(ne,W.length*Si)),100)},[_,k,K.reference,W.length]),S.useEffect(()=>{const R=K.reference.current;if(R)return Vi(R)},[]);const le=(R,ne)=>{D(R.value);const ce=K.reference.current;if(!ce)return;ce?.setAttribute("data-value",R.value),ce.value=R.value;const xe=new Event("change",{bubbles:!1,cancelable:!0});ce.dispatchEvent(xe),h.onChange&&h.onChange(xe),N(R.label??""),G(),F(""),M(ne)},te=R=>{const ne=R.target.value;return F(ne),!k&&ne===""?P(!0):(R.target.name=h.name||"",ne?P(!0):h.onChange?.(R))},fe=()=>{B(),F(""),K.reference.current?.focus()},pe=()=>{M(R=>R===null?0:R),B(),F("")},ve=()=>{K.reference.current?.setAttribute("data-value",""),F(""),D(""),N(""),cg(K.reference.current),G()},Ae=h.id||h.name,me=`${Ae}-shadow`,oe=W.length===0,j=de==="top"||de==="top-start";return g.jsxs(Xi,{...h,left:e,error:t,ref:x,form:h.form,loading:r,name:h.name,feedback:k&&j?h.title:d,hideLeft:f,required:p,title:h.title,container:i,rightLabel:a,interactive:s,id:me,optionalText:c,componentName:"autocomplete",labelClassName:u,placeholder:h.placeholder,right:g.jsxs("span",{className:"flex gap-0.5 items-center",children:[n,g.jsxs("button",{type:"button",className:"p-2 transition-colors md:p-1 link:text-primary",onClick:fe,children:[g.jsx(gu,{size:20}),g.jsx("span",{className:"sr-only",children:T.inputCaretDown})]}),V?g.jsx("button",{type:"button",onClick:ve,className:"p-2 transition-colors md:p-1 link:text-danger",children:g.jsx("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:g.jsx("path",{d:"M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})})}):null]}),children:[g.jsx("input",{"data-shadow":"true",...se({...h,onFocus:pe,pattern:J,onChange:te,id:me,name:me,ref:K.setReference,onClick:R=>R.currentTarget.focus(),onKeyDown(R){if(R.key==="Escape")return R.currentTarget.blur(),G();if(k){if(R.key==="ArrowDown"){let ne=Re.number(z)?z+1:0;return ne>W.length-1&&(ne=0),b.current?.scrollIntoView({index:ne}),M(ne)}if(R.key==="ArrowUp"){let ne=Re.number(z)?z-1:W.length-1;return ne<0&&(ne=W.length-1),b.current?.scrollIntoView({index:ne}),M(ne)}if(R.key==="Enter"){if(z!==null&&W[z])return R.preventDefault(),le(W[z],z);if(W.length===1)return R.preventDefault(),le(W[0],0)}}}}),"data-value":V,"data-error":!!t,"data-name":Ae,"data-target":Ae,required:p,value:k?_:o.length===0?"":O||V,"aria-autocomplete":"list",autoComplete:"off",className:Oe("input placeholder-input-mask group h-input-height w-full flex-1","rounded-md bg-transparent px-input-x py-input-y text-foreground","outline-hidden transition-colors focus:ring-2 focus:ring-inset focus:ring-primary","group-error:text-danger group-error:placeholder-input-mask-error","text-base group-focus-within:border-primary group-hover:border-primary",h.className)}),g.jsx("input",{id:Ae,name:Ae,type:"hidden","data-origin":Ae,ref:m,required:p,defaultValue:h.value||V||void 0}),g.jsx(dr,{preserveTabOrder:!0,children:k?g.jsx(no,{modal:!0,guards:!0,returnFocus:!1,context:X,initialFocus:-1,visuallyHiddenDismiss:!0,children:g.jsxs(Be.div,{...ie({ref:sr(L,K.setFloating),style:{...H.styles,left:re,top:ee??0,position:Y,height:"auto"}}),initial:!1,"data-floating":"true",animate:{height:oe?"auto":I},className:Oe("overscroll-contain p-0 m-0 max-h-80 list-none rounded-t-lg rounded-b-lg border ease-in-out isolate z-floating border-floating-border bg-floating-background text-foreground shadow-floating",j?"origin-[bottom_center]":"origin-[top_center]"),onAnimationComplete:()=>{if(!k)return w(0);const ne=K.floating.current.querySelectorAll("li").item(0),ce=(ne?ne.getBoundingClientRect().height:Si)*W.length;return Fi.flushSync(()=>w(ce+2))},children:[oe?g.jsx("div",{role:"option",className:"w-full border-b border-tooltip-border",children:g.jsx("span",{className:"flex justify-between p-2 w-full text-left text-disabled",children:l||T.autocompleteEmpty})}):null,g.jsx(Tp,{overscan:40,ref:b,hidden:oe,data:W,style:{height:I},defaultItemHeight:Si,components:E4,scrollerRef:R=>{y.current=R},className:"overscroll-contain p-0 max-h-full rounded-lg border-floating bg-floating-background text-foreground",itemContent:(R,ne)=>{const ce=ne.Render??b4,xe=V===ne.value||V===ne.label,Ce=z===R,_e=ne.label??ne.value;return g.jsx("button",{"data-value":ne.value,...Q({ref:qe=>{C.current[R]=qe},role:"option",type:"button","aria-checked":xe,"aria-current":xe,"aria-selected":xe,"aria-busy":ne.disabled,onClick:()=>le(ne,R),className:`cursor-pointer min-h-10 hover:bg-floating-hover w-full p-2 text-left ${xe?"bg-primary-hover text-primary-foreground":""} ${Ce?"bg-floating-hover text-floating-foreground":""}`}),children:g.jsx(ce,{...h,label:ne.label,value:ne.value,children:_e})})}})]})}):null})]})});class zn extends Map{list=[];constructor(t){super(t),this.list=[],Array.isArray(t)&&(this.list=t),t instanceof zn&&(this.list=Array.from(t.entries()))}set(t,n){return super.set(t,n),this.list=(this.list??[]).concat([[t,n]]),this}remove(t){return super.delete(t),this.list=Array.from(this.entries())??[],this}map(t){return this.list.map((n,r)=>t(n[1],r))}clone(t){const n=new zn(this);return t?t(n):n}static from(t,n){return new zn(t.map(r=>[n(r),r]))}static unique(t,n){return Array.from(zn.from(t,n).values())}toArray(){return Array.from(this.values())}}const BT=40,C4=e=>g.jsx(S.Fragment,{children:e.children}),I4={duration:300,initial:{transform:"scaleY(0)",opacity:.2},open:{transform:"scaleY(1)",opacity:1},close:{transform:"scaleY(0)",opacity:0}},HT=[],A4=S.forwardRef(function(t,n){return g.jsx(Be.ul,{...t,role:"listbox",ref:n,className:"w-full rounded-b-lg border-b last:border-transparent border-tooltip-border",children:g.jsx(Nn,{children:t.children})})}),P4=S.forwardRef(function({item:t,context:n,...r},o){return g.jsx(Be.li,{...r,ref:o,className:"last:rounded-t-lg"})}),O4={List:A4,Item:P4},_4=e=>{const t=Pt(),n=S.useRef(null),r=S.Children.count(e.children),[o,i]=S.useState(!1);return S.useEffect(()=>{if(n.current===null)return;const a=n.current.parentElement.getBoundingClientRect(),l=Array.from(n.current.querySelectorAll("[data-component='tag']")).reduce((u,d)=>u+d.getBoundingClientRect().width,0);if(n.current.querySelectorAll("[data-multicounter]").length&&r<=3)return i(!1);if(l>a.width)return i(!0)},[r]),g.jsx("span",{ref:n,className:"flex flex-nowrap gap-x-2",children:o?g.jsxs(ts,{size:"small","data-multicounter":"true",children:[r," ",t.multiSelectSelectedLabel]}):e.children})},M4=S.forwardRef(({left:e,error:t,right:n,options:r,container:o,rightLabel:i,interactive:a,emptyMessage:s,optionalText:l,selectedLabel:c,labelClassName:u,feedback:d=null,hideLeft:f=!1,required:p=!1,dynamicOption:v=!1,onChangeOptions:h,...m},y)=>{const x=S.useMemo(()=>new zn(r.map(oe=>[oe.value,oe])),[r]),b=S.useRef(null),E=S.useRef(null),T=m.value??m.defaultValue??HT,I=Pt(),[w,k]=S.useState(0),[P,_]=S.useState(!1),[F,V]=S.useState(""),[D,O]=S.useState(()=>{const oe=new zn;return T.forEach(j=>{const R=x.get(j);return R?oe.set(j,R):void 0}),oe}),N=S.useMemo(()=>Array.from(D.keys()),[D]),[z,M]=S.useState(()=>{const oe=new Set(T);return r.reduce((j,R)=>oe.has(R.value)?[...j,R.label??R.value]:j,[])??T}),[C,L]=S.useState(null),$=S.useRef(HT),B=v&&F!==""?[{value:F,label:F,"data-dynamic":"true"},...r]:r,q=F.length===0?B:hh(B,"value",[{key:"value",value:F},{key:"label",value:F}]),G=LT(P,"block-only"),W=q.filter(oe=>oe.hidden!==!0),J=W.length===0,{x:re,y:ee,strategy:Y,refs:K,context:X}=Gn({open:P,transform:!0,placement:"bottom-start",strategy:"absolute",onOpenChange:_,whileElementsMounted:Jr,middleware:[$o(4),bv({padding:10,elementContext:"reference",apply(oe){const R=oe.elements.floating.querySelector("ul")?.getBoundingClientRect().height||0,ne=$i(K.reference.current,window.innerHeight),ce=Math.min(R<BT?ne:R,ne,oe.availableHeight),xe=W.length===0?BT:Math.min(ce,ne,R),Ce=`${b.current.getBoundingClientRect().width}px`;Object.assign(oe.elements.floating.style,{width:Ce,maxWidth:Ce,height:xe})}})]}),de=Qv(X,I4),{getReferenceProps:H,getFloatingProps:se,getItemProps:ie}=Yn([fr(X,{role:"listbox"}),kr(X),Hs(X,{cols:0,listRef:$,loop:!0,virtual:!0,allowEscape:!0,activeIndex:C,selectedIndex:C,focusItemOnOpen:"auto",openOnArrowKeyDown:!0,scrollItemIntoView:!0,onNavigate:oe=>L(j=>oe??j)})]);S.useEffect(()=>{if(!P)return k(0);const oe=K.reference;if(oe.current===null)return;const j=$i(oe.current,window.innerHeight);setTimeout(()=>k(Math.min(j,W.length*40)),100)},[F,P,K.reference]),S.useEffect(()=>{m.value&&O(new zn(m.value.map(oe=>[oe,x.get(oe)])))},[m.value,x]),S.useEffect(()=>{const oe=K.reference.current;if(oe)return Vi(oe)},[]);const Q=(oe,j)=>{const R=D.clone(xe=>xe.has(oe.value)?xe.remove(oe.value):xe.set(oe.value,oe));O(R);const ne=K.reference.current;if(!ne)return;const ce=R.map(xe=>xe.value);ne?.setAttribute("data-value",JSON.stringify(ce)),h&&h(ce),M(xe=>xe.concat(oe.label??"")),V(""),L(j)},le=oe=>{const j=oe.target.value;return V(j),!P&&j===""?_(!0):(oe.target.name=m.name||"",j?_(!0):void 0)},te=()=>{_(!0),V(""),K.reference.current?.focus()},fe=()=>{_(!0),V("")},pe=()=>{K.reference.current?.setAttribute("data-value","[]"),V(""),_(!1),O(new zn),h?.([])},ve=m.id||m.name,Ae=D.map((oe,j)=>g.jsx(ts,{size:"small",icon:g.jsx("button",{type:"button",className:"text-current hover:text-danger focus:text-danger",onClick:R=>{R.preventDefault(),R.stopPropagation(),Q(oe,j)},children:g.jsx(Mo,{size:14})}),children:oe.label??oe.value},`MultiSelect-${oe.value}-x`)),me={height:J?"0":D.size===0?w-49:w-86};return g.jsxs(Xi,{...m,left:e,error:t,ref:b,form:m.form,name:m.name,feedback:d,hideLeft:f,required:p,title:m.title,container:o,rightLabel:i,interactive:a,id:m.name||m.id,optionalText:l,componentName:"autocomplete",labelClassName:u,placeholder:m.placeholder,right:g.jsxs("span",{className:"flex gap-0.5 items-center",children:[n,g.jsxs("button",{type:"button",className:"transition-colors link:text-primary",onClick:te,children:[g.jsx(gu,{size:20}),g.jsx("span",{className:"sr-only",children:I.inputCaretDown})]}),D?g.jsx("button",{type:"button",onClick:pe,className:"transition-colors link:text-danger",children:g.jsx("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:g.jsx("path",{d:"M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})})}):null]}),children:[g.jsxs("ul",{...H({...m,onFocus:fe,id:`${ve}-shadow`,name:`${ve}-shadow`,ref:K.setReference}),tabIndex:0,role:"button","data-name":ve,"data-target":ve,"data-shadow":"true","data-error":!!t,"aria-autocomplete":"list","data-value":N.join(","),className:Oe("input text-base placeholder-input-mask group h-input-height w-full","rounded-md bg-transparent px-input-x py-input-y text-foreground","outline-hidden transition-colors focus:ring-2 focus:ring-inset focus:ring-primary","group-error:text-danger group-error:placeholder-input-mask-error","group-focus-within:border-primary group-hover:border-primary","flex flex-row items-center gap-2 whitespace-nowrap text-left","max-w-full overflow-x-auto truncate text-ellipsis",m.className),children:[N.length>0?null:g.jsx("li",{className:"text-input-placeholder",children:m.placeholder}),g.jsx(_4,{label:c,children:Ae})]}),g.jsx("input",{id:ve,name:ve,type:"hidden","data-origin":ve,ref:y,required:p,defaultValue:m.value||N||void 0}),g.jsx(dr,{preserveTabOrder:!0,children:P?g.jsx(Ku,{lockScroll:!0,children:g.jsx(no,{modal:!0,guards:!0,returnFocus:!1,context:X,initialFocus:-1,visuallyHiddenDismiss:!0,children:g.jsxs("div",{...se({ref:K.setFloating,style:{...de.styles,top:ee??0,position:Y,left:re,height:w-(N.length===0?65:30)}}),"data-floating":"true",className:"overscroll-contain p-0 m-0 w-full max-h-96 list-none rounded-t-lg rounded-b-lg border shadow-floating isolate z-floating origin-[top_center] border-floating-border bg-floating-background text-foreground",children:[g.jsx("input",{autoFocus:!0,value:F,onChange:le,title:m.title,placeholder:I.multiSelectInnerPlaceholder,className:"flex-1 mb-1 w-full h-10 bg-transparent rounded-sm border-b transition-colors outline-hidden focus:ring-2 focus:ring-inset input placeholder-input-mask group border-input-border px-input-x py-input-y focus:ring-primary",onKeyDown:oe=>{if(oe.key==="ArrowDown"){let j=C+1;return j>W.length-1&&(j=0),E.current?.scrollIntoView({index:j}),L(j)}if(oe.key==="ArrowUp"){let j=C-1;return j<0&&(j=W.length-1),E.current?.scrollIntoView({index:j}),L(j)}if(oe.key==="Escape")return oe.currentTarget.blur(),_(!1);if(oe.key==="Enter"){if(C!==null&&W[C])return oe.preventDefault(),Q(W[C],C);if(W.length===1)return oe.preventDefault(),Q(W[0],0)}}}),J?g.jsx("li",{role:"option",className:"w-full border-b last:border-transparent border-tooltip-border",children:g.jsx("span",{className:"flex justify-between p-2 w-full text-left text-disabled",children:s||I.autocompleteEmpty})}):null,J?null:g.jsx(Be.div,{initial:!1,"data-floating":"true",ref:G,animate:{height:J?"auto":w},style:me,className:"overscroll-contain w-full max-h-72",onAnimationComplete:()=>{if(!P)return k(0);const j=K.floating.current.querySelectorAll("li").item(0),R=(j?j.getBoundingClientRect().height:40)*W.length;return Fi.flushSync(()=>k(R+2))},children:g.jsx(Tp,{ref:E,hidden:J,data:W,components:O4,style:me,className:"p-0 max-h-72 border-floating-border bg-floating-background text-foreground",itemContent:(oe,j)=>{const R=j.Render??C4,ne=D.has(j.value)||D.has(j.label??""),ce=C===oe,xe=j.label??j.value;return g.jsxs("button",{"data-value":j.value,...ie({ref:Ce=>{$.current[oe]=Ce},role:"option",type:"button","aria-checked":ne,"aria-current":ne,"aria-selected":ne,"aria-busy":j.disabled,onClick:()=>Q(j,oe)}),className:`flex w-full max-w-full cursor-pointer items-center justify-start p-2 text-left hover:bg-floating-hover focus:bg-floating-hover ${ne||ce?"bg-floating-hover text-floating-foreground":""}`,children:[g.jsx($p,{onChange:Ho,checked:ne,"aria-checked":ne,onClick:Ce=>{Ce.stopPropagation(),Q(j,oe)}}),g.jsx(R,{...m,label:j.label,value:j.value,children:xe})]})}})}),g.jsx("div",{className:"flex overflow-x-auto sticky bottom-0 flex-nowrap gap-2 items-center p-2 w-full rounded-b-lg bg-floating-background",children:D.size===0?g.jsx(ts,{theme:"muted",size:"small",children:I.autocompleteEmpty}):Ae})]})})}):null})]})}),D4=e=>{const[t,n]=S.useState(0);return S.useEffect(()=>{const r=e.current;if(!r)return;const o=r.parentElement;if(!o)return;const i=()=>{n(o.clientHeight)};return o.addEventListener("resize",i),i(),()=>{o.removeEventListener("resize",i)}},[]),t},N4={Item:S.forwardRef(function(t,n){return g.jsx("li",{...t,ref:n,className:"flex items-center gap-1 justify-between"})}),List:S.forwardRef(function(t,n){return g.jsx("ul",{...t,ref:n,className:"space-y-3"})})},F4=e=>{const t=S.useRef(null),n=D4(t);return g.jsxs("div",{className:"flex flex-row gap-4",ref:t,children:[g.jsxs("div",{className:"py-8 space-y-4 min-w-64 w-fit flex flex-col whitespace-nowrap rounded-lg border border-card-border",children:[g.jsx("header",{className:"border-b border-card-border pb-2"}),g.jsxs("div",{className:"px-8 space-y-2",children:[g.jsx(Wo,{rightLabel:"",title:"Search",placeholder:"Looking for..."}),g.jsx(Tp,{height:n,useWindowScroll:!0,data:e.source,components:N4,itemContent:(r,o)=>g.jsx(S.Fragment,{children:g.jsx($p,{children:g.jsx(e.Item,{data:o})})})})]})]}),g.jsx("div",{children:g.jsx(ro,{children:g.jsx(vu,{})})}),g.jsx("div",{})]})};function L4(e){const t=e.getBoundingClientRect();return t.top>=0&&t.left>=0&&t.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&t.right<=(window.innerWidth||document.documentElement.clientWidth)}const V4=({children:e,...t})=>{const n=Pr(t.onIntersection),r=S.useRef(null),[o,i]=S.useState(()=>r.current===null?!1:L4(r.current));return S.useLayoutEffect(()=>{const a=r.current;if(a===null)return;const s=new IntersectionObserver(l=>{const c=l[0];return c.isIntersecting&&n.current?.(),i(u=>c.isIntersecting?!0:u)});return s.observe(a),()=>s.disconnect()},[]),g.jsx("div",{...t,ref:r,children:o?e:null})};let WT=0;function $4(e){return WT+=1,`${e}-${Math.random().toString(36).slice(2,6)}-${WT}`}const Wa=0;class sc{static create(){return new sc}currentId=Wa;start(t,n){this.clear(),this.currentId=setTimeout(()=>{this.currentId=Wa,n()},t)}isStarted(){return this.currentId!==Wa}clear=()=>{this.currentId!==Wa&&(clearTimeout(this.currentId),this.currentId=Wa)};disposeEffect=()=>this.clear}const lc=A.createContext(void 0);process.env.NODE_ENV!=="production"&&(lc.displayName="ToastContext");function mh(){const e=A.useContext(lc);if(!e)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: useToastManager must be used within <Toast.Provider>.":Ir(73));return e}function gh(e,t){if(typeof e=="string")return{description:e};if(typeof e=="function"){const n=e(t);return typeof n=="string"?{description:n}:n}return e}const qT=function(t){const{children:n,timeout:r=5e3,limit:o=3,toastManager:i}=t,[a,s]=A.useState([]),[l,c]=A.useState(!1),[u,d]=A.useState(!1),[f,p]=A.useState(null);a.length===0&&(l&&c(!1),u&&d(!1));const v=l||u,h=A.useRef(new Map),m=A.useRef(null),y=A.useRef(!0),x=A.useRef(!1);function b(D){const O=ao(Cn(m.current));if(!m.current||!Ar(m.current,O)||!pd(O))return;const N=a.findIndex(C=>C.id===D);let z=null,M=N+1;for(;M<a.length;){if(a[M].transitionStatus!=="ending"){z=a[M];break}M+=1}if(!z)for(M=N-1;M>=0;){if(a[M].transitionStatus!=="ending"){z=a[M];break}M-=1}z?z.ref?.current?.focus():f?.focus({preventScroll:!0})}const E=Ye(()=>{x.current||(x.current=!0,h.current.forEach(D=>{if(D.timeout){D.timeout.clear();const O=Date.now()-D.start,N=D.delay-O;D.remaining=N>0?N:0}}))}),T=Ye(()=>{x.current&&(x.current=!1,h.current.forEach((D,O)=>{D.remaining=D.remaining>0?D.remaining:D.delay,D.timeout??=sc.create(),D.timeout.start(D.remaining,()=>{h.current.delete(O),D.callback()}),D.start=Date.now()}))}),I=Ye(D=>{s(z=>{const M=z.map(L=>L.id===D?{...L,transitionStatus:"ending",height:0}:L),C=M.filter(L=>L.transitionStatus!=="ending");return M.map(L=>{if(L.transitionStatus==="ending")return L;const $=C.indexOf(L)>=o;return{...L,limited:$}})});const O=h.current.get(D);O&&O.timeout&&(O.timeout.clear(),h.current.delete(D)),a.find(z=>z.id===D)?.onClose?.(),b(D),a.length===1&&(c(!1),d(!1))}),w=Ye(D=>{s(N=>N.filter(z=>z.id!==D)),a.find(N=>N.id===D)?.onRemove?.()}),k=Ye((D,O,N)=>{const z=Date.now(),M=y.current&&!l&&!u,C=M?sc.create():void 0;C?.start(O,()=>{h.current.delete(D),N()}),h.current.set(D,{timeout:C,start:M?z:0,delay:O,remaining:O,callback:N})}),P=Ye(D=>{const O=D.id||$4("toast"),N={...D,id:O,transitionStatus:"starting"};s(M=>{const C=[N,...M],L=C.filter($=>$.transitionStatus!=="ending");if(L.length>o){const $=L.length-o,B=L.slice(-$);return C.map(q=>B.some(G=>G.id===q.id)?{...q,limited:!0}:{...q,limited:!1})}return C.map($=>({...$,limited:!1}))});const z=N.timeout??r;return N.type!=="loading"&&z>0&&k(O,z,()=>I(O)),(l||u||!y.current)&&E(),O}),_=Ye((D,O)=>{const N=a.find(W=>W.id===D)??null,z=N?{...N,...O}:null;if(jn.flushSync(()=>{s(W=>W.map(J=>J.id===D?{...J,...O}:J))}),!z)return;const M=z.timeout??r,C=N?.timeout??r,L=Object.hasOwn(O,"timeout"),$=z.transitionStatus!=="ending"&&z.type!=="loading"&&M>0,B=h.current.has(D),q=C!==M,G=N?.type==="loading";if(!$&&B){h.current.get(D)?.timeout?.clear(),h.current.delete(D);return}if($&&(!B||q||L||G)){const W=h.current.get(D);W&&(W.timeout?.clear(),h.current.delete(D)),k(D,M,()=>I(D)),(l||u||!y.current)&&E()}}),F=Ye((D,O)=>{const N=gh(O.loading),z=P({...N,type:"loading"}),M=D.then(C=>{const L=gh(O.success,C);return _(z,{...L,type:"success",timeout:L.timeout}),C}).catch(C=>{const L=gh(O.error,C);return _(z,{...L,type:"error",timeout:L.timeout}),Promise.reject(C)});return{}.hasOwnProperty.call(O,"setPromise")&&O.setPromise(M),M});A.useEffect(function(){return i?i[" subscribe"](({action:N,options:z})=>{const M=z.id;N==="promise"&&z.promise?F(z.promise,z):N==="update"&&M?_(M,z):N==="close"&&M?I(M):P(z)}):void 0},[P,_,k,r,i,F,I]);const V=A.useMemo(()=>({toasts:a,setToasts:s,hovering:l,setHovering:c,focused:u,setFocused:d,expanded:v,add:P,close:I,remove:w,update:_,promise:F,pauseTimers:E,resumeTimers:T,prevFocusElement:f,setPrevFocusElement:p,viewportRef:m,scheduleTimer:k,windowFocusedRef:y}),[P,I,u,l,v,E,f,F,w,T,k,a,_]);return g.jsx(lc.Provider,{value:V,children:n})};process.env.NODE_ENV!=="production"&&(qT.displayName="ToastProvider");const Ti=A.forwardRef(function(t,n){const[r,o]=A.useState();St(()=>{sO&&o("button")},[]);const i={tabIndex:0,role:r};return g.jsx("span",{...t,ref:n,style:Js,"aria-hidden":r?void 0:!0,...i,"data-base-ui-focus-guard":""})});process.env.NODE_ENV!=="production"&&(Ti.displayName="FocusGuard");const UT=A.createContext(void 0);process.env.NODE_ENV!=="production"&&(UT.displayName="ToastViewportContext");let z4=(function(e){return e.frontmostHeight="--toast-frontmost-height",e})({});const GT=A.forwardRef(function(t,n){const{render:r,className:o,children:i,...a}=t,{toasts:s,pauseTimers:l,resumeTimers:c,setHovering:u,setFocused:d,viewportRef:f,windowFocusedRef:p,prevFocusElement:v,setPrevFocusElement:h,expanded:m,focused:y}=mh(),x=A.useRef(!1),b=A.useRef(!1),E=s.length,T=s[0]?.height??0,I=A.useMemo(()=>s.some(C=>C.transitionStatus==="ending"),[s]);A.useEffect(()=>{if(!f.current)return;function C($){E!==0&&$.key==="F6"&&$.target!==f.current&&($.preventDefault(),h(ao(Cn(f.current))),f.current?.focus({preventScroll:!0}),l(),d(!0))}const L=qt(f.current);return L.addEventListener("keydown",C),()=>{L.removeEventListener("keydown",C)}},[l,d,h,E,f]),A.useEffect(()=>{if(!f.current||!E)return;const C=qt(f.current);function L(B){B.target===C&&(p.current=!1,l())}function $(B){if(B.relatedTarget||B.target===C)return;const q=dd(B),G=ao(Cn(f.current));(!Ar(f.current,q)||!pd(G))&&c(),setTimeout(()=>{p.current=!0})}return C.addEventListener("blur",L,!0),C.addEventListener("focus",$,!0),()=>{C.removeEventListener("blur",L,!0),C.removeEventListener("focus",$,!0)}},[l,c,f,p,d,E]),A.useEffect(()=>{const C=f.current;if(!C||E===0)return;const L=Cn(C);function $(B){if(B.pointerType!=="touch")return;const q=dd(B);Ar(C,q)||(c(),u(!1),d(!1))}return L.addEventListener("pointerdown",$,!0),()=>{L.removeEventListener("pointerdown",$,!0)}},[E,c,d,u,f]);function w(C){f.current&&(x.current=!0,C.relatedTarget===f.current?s[0]?.ref?.current?.focus():v?.focus({preventScroll:!0}))}function k(C){C.key==="Tab"&&C.shiftKey&&C.target===f.current&&(C.preventDefault(),v?.focus({preventScroll:!0}),c())}A.useEffect(()=>{!p.current||I||!b.current||(c(),u(!1),b.current=!1)},[I,c,u,p]);function P(){l(),u(!0),b.current=!1}function _(){s.some(C=>C.transitionStatus==="ending")?b.current=!0:(c(),u(!1))}function F(){if(x.current){x.current=!1;return}y||pd(Cn(f.current).activeElement)&&(d(!0),l())}function V(C){!y||Ar(f.current,C.relatedTarget)||(d(!1),c())}const D={tabIndex:-1,role:"region","aria-live":"polite","aria-atomic":!1,"aria-relevant":"additions text","aria-label":"Notifications",onMouseEnter:P,onMouseMove:P,onMouseLeave:_,onFocus:F,onBlur:V,onKeyDown:k,onClick:F},O=A.useMemo(()=>({expanded:m}),[m]),N=an("div",t,{ref:[n,f],state:O,props:[D,{style:{[z4.frontmostHeight]:T?`${T}px`:void 0}},a,{children:g.jsxs(A.Fragment,{children:[E>0&&v&&g.jsx(Ti,{onFocus:w}),i,E>0&&v&&g.jsx(Ti,{onFocus:w})]})}]}),z=A.useMemo(()=>({viewportRef:f}),[f]),M=A.useMemo(()=>s.filter(C=>C.priority==="high"),[s]);return g.jsxs(UT.Provider,{value:z,children:[E>0&&v&&g.jsx(Ti,{onFocus:w}),N,!y&&M.length>0&&g.jsx("div",{style:Js,children:M.map(C=>g.jsxs("div",{role:"alert","aria-atomic":!0,children:[g.jsx("div",{children:C.title}),g.jsx("div",{children:C.description})]},C.id))})]})});process.env.NODE_ENV!=="production"&&(GT.displayName="ToastViewport");function j4(e){return gy(19)?e:e?"true":void 0}const vh=A.createContext(void 0);process.env.NODE_ENV!=="production"&&(vh.displayName="ToastRootContext");function Ei(){const e=A.useContext(vh);if(!e)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: ToastRootContext is missing. Toast parts must be used within <Toast.Root>.":Ir(66));return e}let yh=(function(e){return e.startingStyle="data-starting-style",e.endingStyle="data-ending-style",e})({});const R4={[yh.startingStyle]:""},B4={[yh.endingStyle]:""},H4={transitionStatus(e){return e==="starting"?R4:e==="ending"?B4:null}};function W4(e){return e==null?e:"current"in e?e.current:e}function q4(e,t=!1,n=!0){const r=Hy();return Ye((o,i=null)=>{r.cancel();function a(){jn.flushSync(o)}const s=W4(e);if(s==null)return;const l=s;if(typeof l.getAnimations!="function"||globalThis.BASE_UI_ANIMATIONS_DISABLED)o();else{let c=function(){const d=yh.startingStyle;if(!l.hasAttribute(d)){r.request(u);return}const f=new MutationObserver(()=>{l.hasAttribute(d)||(f.disconnect(),u())});f.observe(l,{attributes:!0,attributeFilter:[d]}),i?.addEventListener("abort",()=>f.disconnect(),{once:!0})},u=function(){Promise.all(l.getAnimations().map(d=>d.finished)).then(()=>{i?.aborted||a()}).catch(()=>{const d=l.getAnimations();if(n){if(i?.aborted)return;a()}else d.length>0&&d.some(f=>f.pending||f.playState!=="finished")&&u()})};if(t){c();return}r.request(u)}})}function U4(e){const{enabled:t=!0,open:n,ref:r,onComplete:o}=e,i=Ye(o),a=q4(r,n,!1);A.useEffect(()=>{if(!t)return;const s=new AbortController;return a(i,s.signal),()=>{s.abort()}},[t,n,i,a])}let Eo=(function(e){return e.index="--toast-index",e.offsetY="--toast-offset-y",e.height="--toast-height",e.swipeMovementX="--toast-swipe-movement-x",e.swipeMovementY="--toast-swipe-movement-y",e})({});const G4={...H4,swipeDirection(e){return e?{"data-swipe-direction":e}:null}},qa=40,Y4=10,zr=.5,K4=1;function YT(e,t,n){switch(e){case"up":return-n;case"down":return n;case"left":return-t;case"right":return t;default:return 0}}function Z4(e){const n=window.getComputedStyle(e).transform;let r=0,o=0,i=1;if(n&&n!=="none"){const a=n.match(/matrix(?:3d)?\(([^)]+)\)/);if(a){const s=a[1].split(", ").map(parseFloat);s.length===6?(r=s[4],o=s[5],i=Math.sqrt(s[0]*s[0]+s[1]*s[1])):s.length===16&&(r=s[12],o=s[13],i=s[0])}}return{x:r,y:o,scale:i}}const KT=A.forwardRef(function(t,n){const{toast:r,render:o,className:i,swipeDirection:a=["down","right"],...s}=t,l=r.positionerProps?.anchor!==void 0;let c=[];l||(c=Array.isArray(a)?a:[a]);const u=c.length>0,{toasts:d,focused:f,close:p,remove:v,setToasts:h,pauseTimers:m,expanded:y,setHovering:x}=mh(),[b,E]=A.useState(void 0),[T,I]=A.useState(!1),[w,k]=A.useState(!1),[P,_]=A.useState(!1),[F,V]=A.useState({x:0,y:0}),[D,O]=A.useState({x:0,y:0,scale:1}),[N,z]=A.useState(),[M,C]=A.useState(),[L,$]=A.useState(null),B=A.useRef(null),q=A.useRef({x:0,y:0}),G=A.useRef({x:0,y:0,scale:1}),W=A.useRef(void 0),J=A.useRef(0),re=A.useRef(!1),ee=A.useRef({x:0,y:0}),Y=A.useRef(!1),K=A.useMemo(()=>d.indexOf(r),[r,d]),X=A.useMemo(()=>d.filter(j=>j.transitionStatus!=="ending").indexOf(r),[r,d]),de=A.useMemo(()=>d.slice(0,d.indexOf(r)).reduce((j,R)=>j+(R.height||0),0),[d,r]);U4({open:r.transitionStatus!=="ending",ref:B,onComplete(){r.transitionStatus==="ending"&&v(r.id)}});const H=Ye((j=!1)=>{const R=B.current;if(!R)return;const ne=R.style.height;R.style.height="auto";const ce=R.offsetHeight;R.style.height=ne;function xe(){h(Ce=>Ce.map(_e=>_e.id===r.id?{..._e,ref:B,height:ce,transitionStatus:void 0}:_e))}j?jn.flushSync(xe):xe()});St(H,[H]);function se(j,R){let ne=j,ce=R;return!c.includes("left")&&!c.includes("right")?ne=j>0?j**zr:-(Math.abs(j)**zr):(!c.includes("right")&&j>0&&(ne=j**zr),!c.includes("left")&&j<0&&(ne=-(Math.abs(j)**zr))),!c.includes("up")&&!c.includes("down")?ce=R>0?R**zr:-(Math.abs(R)**zr):(!c.includes("down")&&R>0&&(ce=R**zr),!c.includes("up")&&R<0&&(ce=-(Math.abs(R)**zr))),{x:ne,y:ce}}function ie(j){if(j.button!==0)return;j.pointerType==="touch"&&m();const R=dd(j.nativeEvent);if(!(R&&R.closest('button,a,input,textarea,[role="button"],[data-swipe-ignore]'))){if(re.current=!1,W.current=void 0,J.current=0,q.current={x:j.clientX,y:j.clientY},ee.current=q.current,B.current){const ce=Z4(B.current);G.current=ce,O(ce),V({x:ce.x,y:ce.y})}x(!0),I(!0),k(!1),$(null),Y.current=!0,B.current?.setPointerCapture(j.pointerId)}}function Q(j){if(!T)return;j.preventDefault(),Y.current&&(q.current={x:j.clientX,y:j.clientY},Y.current=!1);const{clientY:R,clientX:ne,movementX:ce,movementY:xe}=j;(xe<0&&R>ee.current.y||xe>0&&R<ee.current.y)&&(ee.current={x:ee.current.x,y:R}),(ce<0&&ne>ee.current.x||ce>0&&ne<ee.current.x)&&(ee.current={x:ne,y:ee.current.y});const Ce=ne-q.current.x,_e=R-q.current.y,qe=R-ee.current.y,pt=ne-ee.current.x;if(!w&&Math.sqrt(Ce*Ce+_e*_e)>=K4&&(k(!0),L===null)){const Pe=c.includes("left")||c.includes("right"),Ge=c.includes("up")||c.includes("down");if(Pe&&Ge){const Ze=Math.abs(Ce),Ne=Math.abs(_e);$(Ze>Ne?"horizontal":"vertical")}}let ht;if(!W.current)L==="vertical"?_e>0?ht="down":_e<0&&(ht="up"):L==="horizontal"?Ce>0?ht="right":Ce<0&&(ht="left"):Math.abs(Ce)>=Math.abs(_e)?ht=Ce>0?"right":"left":ht=_e>0?"down":"up",ht&&c.includes(ht)&&(W.current=ht,J.current=YT(ht,Ce,_e),E(ht));else{const Z=W.current,Pe=YT(Z,pt,qe);Pe>qa?(re.current=!1,E(Z)):!(c.includes("left")&&c.includes("right"))&&!(c.includes("up")&&c.includes("down"))&&J.current-Pe>=Y4&&(re.current=!0)}const $t=se(Ce,_e);let $e=G.current.x,U=G.current.y;L==="horizontal"?(c.includes("left")||c.includes("right"))&&($e+=$t.x):(L==="vertical"||(c.includes("left")||c.includes("right"))&&($e+=$t.x),(c.includes("up")||c.includes("down"))&&(U+=$t.y)),V({x:$e,y:U})}function le(j){if(!T)return;if(I(!1),k(!1),$(null),B.current?.releasePointerCapture(j.pointerId),re.current){V({x:D.x,y:D.y}),E(void 0);return}let R=!1;const ne=F.x-D.x,ce=F.y-D.y;let xe;for(const Ce of c){switch(Ce){case"right":ne>qa&&(R=!0,xe="right");break;case"left":ne<-qa&&(R=!0,xe="left");break;case"down":ce>qa&&(R=!0,xe="down");break;case"up":ce<-qa&&(R=!0,xe="up");break}if(R)break}R?(E(xe),_(!0),p(r.id)):(V({x:D.x,y:D.y}),E(void 0))}function te(j){if(j.key==="Escape"){if(!B.current||!Ar(B.current,ao(Cn(B.current))))return;p(r.id)}}A.useEffect(()=>{if(!u)return;const j=B.current;if(!j)return;function R(ne){Ar(j,ne.target)&&ne.preventDefault()}return j.addEventListener("touchmove",R,{passive:!1}),()=>{j.removeEventListener("touchmove",R)}},[u]);function fe(){if(!T&&F.x===D.x&&F.y===D.y&&!P)return{[Eo.swipeMovementX]:"0px",[Eo.swipeMovementY]:"0px"};const j=F.x-D.x,R=F.y-D.y;return{transition:T?"none":void 0,transform:T?`translateX(${F.x}px) translateY(${F.y}px) scale(${D.scale})`:void 0,[Eo.swipeMovementX]:`${j}px`,[Eo.swipeMovementY]:`${R}px`}}const pe=r.priority==="high",ve={role:pe?"alertdialog":"dialog",tabIndex:0,"aria-modal":!1,"aria-labelledby":N,"aria-describedby":M,"aria-hidden":pe&&!f?!0:void 0,onPointerDown:u?ie:void 0,onPointerMove:u?Q:void 0,onPointerUp:u?le:void 0,onKeyDown:te,inert:j4(r.limited),style:{...fe(),[Eo.index]:r.transitionStatus==="ending"?K:X,[Eo.offsetY]:`${de}px`,[Eo.height]:r.height?`${r.height}px`:void 0}},Ae=A.useMemo(()=>({rootRef:B,toast:r,titleId:N,setTitleId:z,descriptionId:M,setDescriptionId:C,swiping:T,swipeDirection:b,recalculateHeight:H,index:K,visibleIndex:X,expanded:y}),[r,N,M,T,b,H,K,X,y]),me=A.useMemo(()=>({transitionStatus:r.transitionStatus,expanded:y,limited:r.limited||!1,type:r.type,swiping:Ae.swiping,swipeDirection:Ae.swipeDirection}),[y,r.transitionStatus,r.limited,r.type,Ae.swiping,Ae.swipeDirection]),oe=an("div",t,{ref:[n,Ae.rootRef],state:me,stateAttributesMapping:G4,props:[ve,s]});return g.jsx(vh.Provider,{value:Ae,children:oe})});process.env.NODE_ENV!=="production"&&(KT.displayName="ToastRoot");const ZT=A.forwardRef(function(t,n){const{render:r,className:o,...i}=t,{visibleIndex:a,expanded:s,recalculateHeight:l}=Ei(),c=A.useRef(null);St(()=>{const p=c.current;if(!p||(l(),typeof ResizeObserver!="function"||typeof MutationObserver!="function"))return;const v=new ResizeObserver(()=>l(!0)),h=new MutationObserver(()=>l(!0));return v.observe(p),h.observe(p,{childList:!0,subtree:!0,characterData:!0}),()=>{v.disconnect(),h.disconnect()}},[l]);const u=a>0,d=A.useMemo(()=>({expanded:s,behind:u}),[s,u]);return an("div",t,{ref:[n,c],state:d,props:i})});process.env.NODE_ENV!=="production"&&(ZT.displayName="ToastContent");const XT=A.forwardRef(function(t,n){const{render:r,className:o,id:i,children:a,...s}=t,{toast:l}=Ei(),c=a??l.description,u=!!c,d=Ws(i),{setDescriptionId:f}=Ei();St(()=>{if(u)return f(d),()=>{f(void 0)}},[u,d,f]);const p=A.useMemo(()=>({type:l.type}),[l.type]),v=an("p",t,{ref:n,state:p,props:{...s,id:d,children:c}});return u?v:null});process.env.NODE_ENV!=="production"&&(XT.displayName="ToastDescription");const QT=A.forwardRef(function(t,n){const{render:r,className:o,id:i,children:a,...s}=t,{toast:l}=Ei(),c=a??l.title,u=!!c,d=Ws(i),{setTitleId:f}=Ei();St(()=>{if(u)return f(d),()=>{f(void 0)}},[u,d,f]);const p=A.useMemo(()=>({type:l.type}),[l.type]),v=an("h2",t,{ref:n,state:p,props:{...s,id:d,children:c}});return u?v:null});process.env.NODE_ENV!=="production"&&(QT.displayName="ToastTitle");let bh;process.env.NODE_ENV!=="production"&&(bh=new Set);function JT(...e){if(process.env.NODE_ENV!=="production"){const t=e.join(" ");bh.has(t)||(bh.add(t),console.error(`Base UI: ${t}`))}}const eE=A.createContext(void 0);process.env.NODE_ENV!=="production"&&(eE.displayName="CompositeRootContext");function X4(e=!1){const t=A.useContext(eE);if(t===void 0&&!e)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: CompositeRootContext is missing. Composite parts must be placed within <Composite.Root>.":Ir(16));return t}function Q4(e){const{focusableWhenDisabled:t,disabled:n,composite:r=!1,tabIndex:o=0,isNativeButton:i}=e,a=r&&t!==!1,s=r&&t===!1;return{props:A.useMemo(()=>{const c={onKeyDown(u){n&&t&&u.key!=="Tab"&&u.preventDefault()}};return r||(c.tabIndex=o,!i&&n&&(c.tabIndex=t?o:-1)),(i&&(t||a)||!i&&n)&&(c["aria-disabled"]=n),i&&(!t||s)&&(c.disabled=n),c},[r,n,t,a,s,i,o])}}function J4(e={}){const{disabled:t=!1,focusableWhenDisabled:n,tabIndex:r=0,native:o=!0}=e,i=A.useRef(null),a=X4(!0)!==void 0,s=Ye(()=>{const f=i.current;return!!(f?.tagName==="A"&&f?.href)}),{props:l}=Q4({focusableWhenDisabled:n,disabled:t,composite:a,tabIndex:r,isNativeButton:o});process.env.NODE_ENV!=="production"&&A.useEffect(()=>{if(!i.current)return;const f=i.current.tagName==="BUTTON";o?f||JT("A component that acts as a button was not rendered as a native <button>, which does not match the default. Ensure that the element passed to the `render` prop of the component is a real <button>, or set the `nativeButton` prop on the component to `false`."):f&&JT("A component that acts as a button was rendered as a native <button>, which does not match the default. Ensure that the element passed to the `render` prop of the component is not a real <button>, or set the `nativeButton` prop on the component to `true`.")},[o]);const c=A.useCallback(()=>{const f=i.current;e3(f)&&a&&t&&l.disabled===void 0&&f.disabled&&(f.disabled=!1)},[t,l.disabled,a]);St(c,[c]);const u=A.useCallback((f={})=>{const{onClick:p,onMouseDown:v,onKeyUp:h,onKeyDown:m,onPointerDown:y,...x}=f;return sd({type:o?"button":void 0,onClick(E){if(t){E.preventDefault();return}p?.(E)},onMouseDown(E){t||v?.(E)},onKeyDown(E){if(t||(cd(E),m?.(E)),E.baseUIHandlerPrevented)return;const T=E.target===E.currentTarget&&!o&&!s()&&!t,I=E.key==="Enter",w=E.key===" ";T&&((w||I)&&E.preventDefault(),I&&p?.(E))},onKeyUp(E){t||(cd(E),h?.(E)),!E.baseUIHandlerPrevented&&E.target===E.currentTarget&&!o&&!t&&E.key===" "&&p?.(E)},onPointerDown(E){if(t){E.preventDefault();return}y?.(E)}},o?void 0:{role:"button"},l,x)},[t,l,o,s]),d=Ye(f=>{i.current=f,c()});return{getButtonProps:u,buttonRef:d}}function e3(e){return Ot(e)&&e.tagName==="BUTTON"}const tE=A.forwardRef(function(t,n){const{render:r,className:o,disabled:i,nativeButton:a=!0,...s}=t,{close:l,expanded:c}=mh(),{toast:u}=Ei(),[d,f]=A.useState(!1),{getButtonProps:p,buttonRef:v}=J4({disabled:i,native:a}),h=A.useMemo(()=>({type:u.type}),[u.type]);return an("button",t,{ref:[n,v],state:h,props:[{"aria-hidden":!c&&!d,onClick(){l(u.id)},onFocus(){f(!0)},onBlur(){f(!1)}},s,p]})});process.env.NODE_ENV!=="production"&&(tE.displayName="ToastClose");function t3(e){return`data-base-ui-${e}`}const xh=A.createContext(null);process.env.NODE_ENV!=="production"&&(xh.displayName="PortalContext");const n3=()=>A.useContext(xh),r3=t3("portal");function nE(e={}){const{ref:t,container:n,componentProps:r=An,elementProps:o,elementState:i}=e,a=Ws(),l=n3()?.portalNode,[c,u]=A.useState(null),[d,f]=A.useState(null),p=Ye(y=>{y!==null&&f(y)}),v=A.useRef(null);St(()=>{if(n===null){v.current&&(v.current=null,f(null),u(null));return}if(a==null)return;const y=(n&&(ps(n)?n:n.current))??l??document.body;if(y==null){v.current&&(v.current=null,f(null),u(null));return}v.current!==y&&(v.current=y,f(null),u(y))},[n,l,a]);const h=an("div",r,{ref:[t,p],state:i,props:[{id:a,[r3]:""},o]});return{portalNode:d,portalSubtree:c&&h?jn.createPortal(h,c):null}}const o3=A.forwardRef(function(t,n){const{children:r,container:o,className:i,render:a,renderGuards:s,...l}=t,{portalNode:c,portalSubtree:u}=nE({container:o,ref:n,componentProps:t,elementProps:l}),d=A.useRef(null),f=A.useRef(null),p=A.useRef(null),v=A.useRef(null),[h,m]=A.useState(null),y=h?.modal,x=h?.open,b=typeof s=="boolean"?s:!!h&&!h.modal&&h.open&&!!c;A.useEffect(()=>{if(!c||y)return;function T(I){c&&I.relatedTarget&&gd(I)&&(I.type==="focusin"?_y:OO)(c)}return c.addEventListener("focusin",T,!0),c.addEventListener("focusout",T,!0),()=>{c.removeEventListener("focusin",T,!0),c.removeEventListener("focusout",T,!0)}},[c,y]),A.useEffect(()=>{!c||x||_y(c)},[x,c]);const E=A.useMemo(()=>({beforeOutsideRef:d,afterOutsideRef:f,beforeInsideRef:p,afterInsideRef:v,portalNode:c,setFocusManagerState:m}),[c]);return g.jsxs(A.Fragment,{children:[u,g.jsxs(xh.Provider,{value:E,children:[b&&c&&g.jsx(Ti,{"data-type":"outside",ref:d,onFocus:T=>{if(gd(T,c))p.current?.focus();else{const I=h?h.domReference:null;PO(I)?.focus()}}}),b&&c&&g.jsx("span",{"aria-owns":c.id,style:FP}),c&&jn.createPortal(r,c),b&&c&&g.jsx(Ti,{"data-type":"outside",ref:f,onFocus:T=>{if(gd(T,c))v.current?.focus();else{const I=h?h.domReference:null;AO(I)?.focus(),h?.closeOnFocusOut&&h?.onOpenChange(!1,qo($P,T.nativeEvent))}}})]})]})});process.env.NODE_ENV!=="production"&&(o3.displayName="FloatingPortal");const rE=A.forwardRef(function(t,n){const{children:r,container:o,className:i,render:a,...s}=t,{portalNode:l,portalSubtree:c}=nE({container:o,ref:n,componentProps:t,elementProps:s});return!c&&!l?null:g.jsxs(A.Fragment,{children:[c,l&&jn.createPortal(r,l)]})});process.env.NODE_ENV!=="production"&&(rE.displayName="FloatingPortalLite");const i3=rE;function oE(){const e=A.useContext(lc);if(!e)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: useToastManager must be used within <Toast.Provider>.":Ir(73));const{toasts:t,add:n,close:r,update:o,promise:i}=e;return A.useMemo(()=>({toasts:t,add:n,close:r,update:o,promise:i}),[t,n,r,o,i])}const a3=e=>{const[t,n]=S.useState(!1),r=()=>n(!0),o=()=>n(!1);return S.useEffect(()=>{const i=e.current;if(i)return i.addEventListener("mouseenter",r),i.addEventListener("mouseleave",o),()=>{i.removeEventListener("mouseenter",r),i.removeEventListener("mouseleave",o)}},[]),t},s3=Io("relative isolate z-tooltip flex justify-between overflow-hidden whitespace-wrap rounded-lg border text-sm shadow-shadow-notification",{variants:{theme:{default:"border-card-border bg-card-background text-foreground",info:"bg-alert-info-bg text-alert-info-text border-alert-info-border",warn:"bg-alert-warn-bg text-alert-warn-text border-alert-warn-border",muted:"bg-alert-muted-bg text-alert-muted-text border-alert-muted-border",danger:"bg-alert-danger-bg text-alert-danger-text border-alert-danger-border",success:"bg-alert-success-bg text-alert-success-text border-alert-success-border",secondary:"bg-alert-secondary-bg text-alert-secondary-text border-alert-secondary-border"}},defaultVariants:{theme:"default"}}),iE=S.createContext(()=>{throw new Error("Not implemented")}),l3=()=>S.useContext(iE),aE={0:{opacity:1,y:[10,15],scale:[1,.98]},1:{opacity:1,y:[15,20],scale:[1,.97]},2:{opacity:1,y:[20,25],scale:[1,.96]},default:{opacity:1,y:[25,30],scale:[1,.95]}};function c3(e){const t=e.toast.data?.closable??!0,n=e.hover?"hover":e.isLast?"isLast":"other",r=s3({theme:e.toast.data?.theme||"default"});return g.jsx(KT,{toast:e.toast,swipeDirection:["down","right"],children:g.jsx(Be.li,{layout:!0,layoutScroll:!0,animate:n,"data-index":e.index,initial:{y:-100,zIndex:-1},className:"absolute top-0 right-0 w-80 pointer-events-auto text-select",transition:{type:"spring",mass:1.2,damping:30,stiffness:200},exit:{opacity:[.9,0],transition:{opacity:{bounce:.25,duration:.3}}},variants:{isLast:{y:10,scale:1,animationDuration:"300ms",opacity:1},hover:{y:0,position:"static",scale:1,opacity:1},other:aE[e.reversedIndex]||aE.default},children:g.jsxs(ZT,{className:r,children:[g.jsxs("div",{className:"flex flex-col p-4",children:[e.toast.title?g.jsx(QT,{className:"text-lg font-medium leading-relaxed select-text"}):null,g.jsx(XT,{className:"select-text"})]}),t?g.jsx(tE,{className:"absolute top-2 right-2 p-1 rounded-full transition text-foreground hover:bg-danger/10 hover:text-danger-hover",children:g.jsx(Mo,{className:"size-5"})}):null]})})})}function u3({max:e=5}){const t=S.useRef(null),n=a3(t),o=oE().toasts.slice(-e);return g.jsx(GT,{ref:t,"data-items":o.length,style:{justifyContent:"start",height:`${(n?o.length:Math.min(1,o.length))*7}rem`},className:"fixed right-4 top-10 flex w-80 list-none flex-col-reverse items-end gap-4 overflow-y-clip overflow-x-visible data-[items=true]:pb-8 max-sm:top-20",children:g.jsx(Be.ol,{className:"flex flex-col gap-4",children:g.jsx(Nn,{presenceAffectsLayout:!0,mode:"popLayout",children:o.reverse().map((i,a,s)=>g.jsx(c3,{toast:i,hover:n,index:a,isLast:s.length-1===a,reversedIndex:s.length-(a+1)},i.id))})})})}function d3({children:e,max:t=5}){const n=oE(),r=S.useCallback(()=>{n.toasts.forEach(i=>n.close(i.id))},[n]),o=S.useCallback((i,a)=>{const s=n.add({description:i,title:a?.title,timeout:a?.timeout,data:{theme:a?.theme,closable:a?.closable}});return{close:()=>n.close(s),clear:r}},[n,r]);return g.jsxs(iE.Provider,{value:o,children:[e,g.jsx(i3,{children:g.jsx(u3,{max:t})})]})}function f3({children:e,max:t=5,timeout:n=5e3}){return g.jsx(qT,{limit:t,timeout:n,children:g.jsx(d3,{max:t,children:e})})}const p3=/Mac|iPod|iPhone|iPad/,cc=()=>p3.test(navigator.userAgent),h3=e=>e.split("+").map(t=>{const n=t.trim();return n==="Mod"?cc()?"Meta":"Control":n==="Hyper"?cc()?"Meta+Shift+Alt":"Control+Shift+Alt":n}),sE=e=>e.map(t=>t.trim()).join("+");class m3{combinations=[];constructor(t=[]){this.combinations=this.combinations.concat(t),this.combinations.forEach(n=>{this.add(n.key,n.fn)})}add(t,n){const r=sE(h3(t));if(!this.combinations.find(o=>o.key===r))return this.combinations.push({fn:n,key:r}),this}register(){const t=new AbortController,n=r=>{const o=r.target;if((o.tagName==="INPUT"||o.tagName==="TEXTAREA")&&o.getAttribute("data-combikeysbypass")!=="true")return;const i=new Set;if(r.metaKey&&i.add("Meta"),r.ctrlKey&&i.add("Control"),r.altKey&&i.add("Alt"),r.key.charCodeAt(0)>127){const s=r.code.replace(/^Digit/,"").replace(/^Key/,"");i.add(r.shiftKey?s.toUpperCase():s.toLowerCase())}else i.add(r.shiftKey?r.key.toUpperCase():r.key);const a=sE(Array.from(i));this.combinations.forEach(s=>{if(s.key===a)return r.preventDefault(),void s.fn(r)})};return window.addEventListener("keydown",n,{signal:t.signal}),()=>t.abort()}}const g3=e=>(e=e.trim(),e==="Alt"?cc()?g.jsx(nI,{"aria-label":"Option",size:12}):"Alt":e==="Mod"?cc()?g.jsx(ZC,{"aria-label":"Command",size:12}):"Ctrl":e),v3=e=>{const t=e.value.trim().split("+");return g.jsx("span",{className:"flex text-sm items-center gap-1",children:t.map((n,r)=>{const o=t.length-1===r;return g.jsxs(S.Fragment,{children:[g.jsx("kbd",{"aria-label":n,children:g3(n)}),o?null:g.jsx("span",{children:"+"})]},`${e.value}-${n}-key-${r}`)})})},y3=e=>g.jsx("span",{className:"flex items-center h-full text-sm font-medium text-left text-secondary",children:du(e.item.title)?g.jsx(e.item.title,{text:e.text}):e.item.title}),b3=S.forwardRef((e,t)=>{const n=S.useId(),r=e.active,o=e.item;return o.type==="group"?g.jsx("div",{id:n,className:"px-2 pt-2 pb-1 h-10",children:g.jsx(y3,{text:e.text,item:o})}):o.type!=="shortcut"?g.jsx(S.Fragment,{}):g.jsxs("button",{...e,id:n,ref:t,role:"option",type:"button","aria-selected":r,"data-component":"command-palette-item",className:Oe("flex h-10 items-center justify-between rounded-lg p-2 hover:bg-floating-hover",r?"bg-floating-hover":""),children:[g.jsxs("span",{className:"flex gap-2 items-center",children:[o.Icon?o.Icon:null,g.jsx("span",{children:du(o.title)?g.jsx(o.title,{text:e.text}):o.title})]}),o.shortcut?g.jsx(v3,{value:o.shortcut}):null]})}),x3=(e,t)=>{if(t.length===0)return e;const n=[{key:"title",value:t},{key:"shortcut",value:t},{key:"hint",value:t}],r=e.map(s=>({...s,title:Re.function(s.title)?s.title({text:t}):s.title})),o=r.reduce((s,l)=>{const c=Re.function(l.enabled)?l.enabled({text:t}):l.enabled??!0;return c&&s.push({...l,enabled:c}),s},[]),i=hh(o,"title",n),a=r.filter(s=>Re.function(s.enabled)?s.enabled({text:t}):!1);return zn.unique(i.concat(a),s=>s.title)},w3=[0,0,0,0,0],S3=e=>{const t=e.bind??"Mod + k",n=S.useRef([]),r=Pt(),[o,i]=S.useState(""),a=Pr(o),s=S.useId(),l=S.useRef(null),[c,u]=S.useState(null),d=Gn({open:e.open,strategy:"absolute",whileElementsMounted:Jr,onOpenChange:e.onChangeVisibility}),f=Hs(d.context,{cols:0,listRef:n,loop:!0,activeIndex:c,virtual:!0,allowEscape:!0,focusItemOnHover:!1,focusItemOnOpen:"auto",openOnArrowKeyDown:!0,scrollItemIntoView:!1,selectedIndex:c,onNavigate:b=>{Re.number(b)&&n.current[b]?.scrollIntoView({block:"start",inline:"start"}),u(E=>Re.number(b)?b:e.open?E??0:null)}}),{getItemProps:p,getReferenceProps:v}=Yn([f]),h=e.commands.flatMap(b=>b.type==="group"?[b,...b.items]:[b]),m=x3(h,o),y=o===""?h:[{type:"group",title:"Results",items:[]},...m.filter(b=>b.type!=="group")];S.useEffect(()=>{const b=new m3;return b.add(t,()=>e.onChangeVisibility?.(!0)),h.forEach(E=>{E.type!=="group"&&E.type==="shortcut"&&E.shortcut!==void 0&&b.add(E.shortcut,T=>E.action({event:T,text:a.current,setOpen:e.onChangeVisibility}))}),b.register()},[t,h,e,a]);const x=e.Icon??yu;return g.jsx(S.Fragment,{children:g.jsxs(jp,{ref:l,animated:!1,closable:!1,open:e.open,overlayClickClose:!0,ariaTitle:"Command palette",bodyClassName:"px-0 py-0 pt-0","data-component":"command-palette",onChange:e.onChangeVisibility,className:"container relative py-0 md:max-w-(--breakpoint-sm) lg:max-w-(--breakpoint-md) overflow-clip",children:[g.jsxs("header",{className:"flex sticky top-0 items-center w-full h-12 border-b overflow-clip isolate z-floating border-floating-border bg-floating-background",children:[g.jsx("div",{className:"flex justify-center items-center size-10",children:e.Icon?g.jsx(x,{Default:yu,text:o,size:16}):g.jsx(yu,{size:16})}),g.jsx("input",{...v({ref:d.refs.setReference,onKeyDown:b=>{const E=Re.number(c)?y[c]:null;E&&b.key==="Enter"&&E.type==="shortcut"&&E.action({event:b,text:o,setOpen:e.onChangeVisibility})}}),autoFocus:!0,value:o,"data-combikeysbypass":"true",placeholder:"Search for...",onChange:b=>i(b.target.value),className:"items-center py-2 px-2 pb-2 w-full h-12 text-lg text-left bg-transparent outline-hidden"})]}),e.loading?g.jsxs("ul",{role:"listbox","data-component":"command-palette-list",className:"flex overflow-y-auto flex-col gap-1 px-2 my-2 w-full max-h-96 origin-[top_center]",children:[g.jsx("div",{className:"px-2 pt-2 pb-1 h-10",children:r.commandPaletteLoading}),w3.map((b,E)=>g.jsx("li",{className:Oe("flex h-10 items-center justify-between rounded-lg p-2 hover:bg-primary hover:text-primary-foreground"),children:Ip},`${s}-${E}-skeleton-index`))]}):g.jsxs("div",{className:"flex flex-row flex-nowrap min-w-full","data-component":"command-palette-container",children:[g.jsxs("ul",{role:"listbox","data-component":"command-palette-list",className:"flex overflow-y-auto flex-col gap-1 px-2 my-2 w-full max-h-96 h-fit origin-[top_center]",children:[y.map((b,E)=>S.createElement(b3,{...p({onMouseEnter:()=>u(E),ref(T){n.current[E]=T},onClick(T){T.preventDefault(),e.onChangeVisibility(!1),b.type==="shortcut"&&b.action({event:T,text:o,setOpen:e.onChangeVisibility})}}),item:b,text:o,active:c===E,key:`${s}-${b.type}-${E}`})),y.length===1?g.jsx("div",{className:Oe("flex items-center justify-between rounded-lg p-2 text-secondary"),children:r.commandPaletteEmpty??e.emptyMessage}):null]}),e.Preview&&Re.number(c)?g.jsx(e.Preview,{command:y[c],text:o}):null]}),e.footer?g.jsx("footer",{className:"flex items-center p-2 h-8 rounded-b-lg bg-background",children:e.footer}):null]})})},T3=["INPUT","SELECT"],lE=e=>{if(!e)return;Array.from(e.elements).forEach(n=>{T3.includes(n.tagName)&&(n.tagName==="INPUT"&&(n.value=n.defaultValue),n.tagName==="SELECT"&&(n.value=""),n.setAttribute("data-initialized","false"))})};var wh,cE;function Sh(){if(cE)return wh;cE=1;var e=String.prototype.replace,t=/%20/g,n={RFC1738:"RFC1738",RFC3986:"RFC3986"};return wh={default:n.RFC3986,formatters:{RFC1738:function(r){return e.call(r,t,"+")},RFC3986:function(r){return String(r)}},RFC1738:n.RFC1738,RFC3986:n.RFC3986},wh}var Th,uE;function dE(){if(uE)return Th;uE=1;var e=Sh(),t=Hm(),n=Object.prototype.hasOwnProperty,r=Array.isArray,o=t(),i=function(w,k){return o.set(w,k),w},a=function(w){return o.has(w)},s=function(w){return o.get(w)},l=function(w,k){o.set(w,k)},c=(function(){for(var I=[],w=0;w<256;++w)I.push("%"+((w<16?"0":"")+w.toString(16)).toUpperCase());return I})(),u=function(w){for(;w.length>1;){var k=w.pop(),P=k.obj[k.prop];if(r(P)){for(var _=[],F=0;F<P.length;++F)typeof P[F]<"u"&&_.push(P[F]);k.obj[k.prop]=_}}},d=function(w,k){for(var P=k&&k.plainObjects?{__proto__:null}:{},_=0;_<w.length;++_)typeof w[_]<"u"&&(P[_]=w[_]);return P},f=function I(w,k,P){if(!k)return w;if(typeof k!="object"&&typeof k!="function"){if(r(w))w.push(k);else if(w&&typeof w=="object")if(a(w)){var _=s(w)+1;w[_]=k,l(w,_)}else(P&&(P.plainObjects||P.allowPrototypes)||!n.call(Object.prototype,k))&&(w[k]=!0);else return[w,k];return w}if(!w||typeof w!="object"){if(a(k)){for(var F=Object.keys(k),V=P&&P.plainObjects?{__proto__:null,0:w}:{0:w},D=0;D<F.length;D++){var O=parseInt(F[D],10);V[O+1]=k[F[D]]}return i(V,s(k)+1)}return[w].concat(k)}var N=w;return r(w)&&!r(k)&&(N=d(w,P)),r(w)&&r(k)?(k.forEach(function(z,M){if(n.call(w,M)){var C=w[M];C&&typeof C=="object"&&z&&typeof z=="object"?w[M]=I(C,z,P):w.push(z)}else w[M]=z}),w):Object.keys(k).reduce(function(z,M){var C=k[M];return n.call(z,M)?z[M]=I(z[M],C,P):z[M]=C,z},N)},p=function(w,k){return Object.keys(k).reduce(function(P,_){return P[_]=k[_],P},w)},v=function(I,w,k){var P=I.replace(/\+/g," ");if(k==="iso-8859-1")return P.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(P)}catch{return P}},h=1024,m=function(w,k,P,_,F){if(w.length===0)return w;var V=w;if(typeof w=="symbol"?V=Symbol.prototype.toString.call(w):typeof w!="string"&&(V=String(w)),P==="iso-8859-1")return escape(V).replace(/%u[0-9a-f]{4}/gi,function(L){return"%26%23"+parseInt(L.slice(2),16)+"%3B"});for(var D="",O=0;O<V.length;O+=h){for(var N=V.length>=h?V.slice(O,O+h):V,z=[],M=0;M<N.length;++M){var C=N.charCodeAt(M);if(C===45||C===46||C===95||C===126||C>=48&&C<=57||C>=65&&C<=90||C>=97&&C<=122||F===e.RFC1738&&(C===40||C===41)){z[z.length]=N.charAt(M);continue}if(C<128){z[z.length]=c[C];continue}if(C<2048){z[z.length]=c[192|C>>6]+c[128|C&63];continue}if(C<55296||C>=57344){z[z.length]=c[224|C>>12]+c[128|C>>6&63]+c[128|C&63];continue}M+=1,C=65536+((C&1023)<<10|N.charCodeAt(M)&1023),z[z.length]=c[240|C>>18]+c[128|C>>12&63]+c[128|C>>6&63]+c[128|C&63]}D+=z.join("")}return D},y=function(w){for(var k=[{obj:{o:w},prop:"o"}],P=[],_=0;_<k.length;++_)for(var F=k[_],V=F.obj[F.prop],D=Object.keys(V),O=0;O<D.length;++O){var N=D[O],z=V[N];typeof z=="object"&&z!==null&&P.indexOf(z)===-1&&(k.push({obj:V,prop:N}),P.push(z))}return u(k),w},x=function(w){return Object.prototype.toString.call(w)==="[object RegExp]"},b=function(w){return!w||typeof w!="object"?!1:!!(w.constructor&&w.constructor.isBuffer&&w.constructor.isBuffer(w))},E=function(w,k,P,_){if(a(w)){var F=s(w)+1;return w[F]=k,l(w,F),w}var V=[].concat(w,k);return V.length>P?i(d(V,{plainObjects:_}),V.length-1):V},T=function(w,k){if(r(w)){for(var P=[],_=0;_<w.length;_+=1)P.push(k(w[_]));return P}return k(w)};return Th={arrayToObject:d,assign:p,combine:E,compact:y,decode:v,encode:m,isBuffer:b,isOverflow:a,isRegExp:x,maybeMap:T,merge:f},Th}var Eh,fE;function E3(){if(fE)return Eh;fE=1;var e=Hm(),t=dE(),n=Sh(),r=Object.prototype.hasOwnProperty,o={brackets:function(m){return m+"[]"},comma:"comma",indices:function(m,y){return m+"["+y+"]"},repeat:function(m){return m}},i=Array.isArray,a=Array.prototype.push,s=function(h,m){a.apply(h,i(m)?m:[m])},l=Date.prototype.toISOString,c=n.default,u={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,commaRoundTrip:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:t.encode,encodeValuesOnly:!1,filter:void 0,format:c,formatter:n.formatters[c],indices:!1,serializeDate:function(m){return l.call(m)},skipNulls:!1,strictNullHandling:!1},d=function(m){return typeof m=="string"||typeof m=="number"||typeof m=="boolean"||typeof m=="symbol"||typeof m=="bigint"},f={},p=function h(m,y,x,b,E,T,I,w,k,P,_,F,V,D,O,N,z,M){for(var C=m,L=M,$=0,B=!1;(L=L.get(f))!==void 0&&!B;){var q=L.get(m);if($+=1,typeof q<"u"){if(q===$)throw new RangeError("Cyclic object value");B=!0}typeof L.get(f)>"u"&&($=0)}if(typeof P=="function"?C=P(y,C):C instanceof Date?C=V(C):x==="comma"&&i(C)&&(C=t.maybeMap(C,function(Q){return Q instanceof Date?V(Q):Q})),C===null){if(T)return k&&!N?k(y,u.encoder,z,"key",D):y;C=""}if(d(C)||t.isBuffer(C)){if(k){var G=N?y:k(y,u.encoder,z,"key",D);return[O(G)+"="+O(k(C,u.encoder,z,"value",D))]}return[O(y)+"="+O(String(C))]}var W=[];if(typeof C>"u")return W;var J;if(x==="comma"&&i(C))N&&k&&(C=t.maybeMap(C,k)),J=[{value:C.length>0?C.join(",")||null:void 0}];else if(i(P))J=P;else{var re=Object.keys(C);J=_?re.sort(_):re}var ee=w?String(y).replace(/\./g,"%2E"):String(y),Y=b&&i(C)&&C.length===1?ee+"[]":ee;if(E&&i(C)&&C.length===0)return Y+"[]";for(var K=0;K<J.length;++K){var X=J[K],de=typeof X=="object"&&X&&typeof X.value<"u"?X.value:C[X];if(!(I&&de===null)){var H=F&&w?String(X).replace(/\./g,"%2E"):String(X),se=i(C)?typeof x=="function"?x(Y,H):Y:Y+(F?"."+H:"["+H+"]");M.set(m,$);var ie=e();ie.set(f,M),s(W,h(de,se,x,b,E,T,I,w,x==="comma"&&N&&i(C)?null:k,P,_,F,V,D,O,N,z,ie))}}return W},v=function(m){if(!m)return u;if(typeof m.allowEmptyArrays<"u"&&typeof m.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof m.encodeDotInKeys<"u"&&typeof m.encodeDotInKeys!="boolean")throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(m.encoder!==null&&typeof m.encoder<"u"&&typeof m.encoder!="function")throw new TypeError("Encoder has to be a function.");var y=m.charset||u.charset;if(typeof m.charset<"u"&&m.charset!=="utf-8"&&m.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var x=n.default;if(typeof m.format<"u"){if(!r.call(n.formatters,m.format))throw new TypeError("Unknown format option provided.");x=m.format}var b=n.formatters[x],E=u.filter;(typeof m.filter=="function"||i(m.filter))&&(E=m.filter);var T;if(m.arrayFormat in o?T=m.arrayFormat:"indices"in m?T=m.indices?"indices":"repeat":T=u.arrayFormat,"commaRoundTrip"in m&&typeof m.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var I=typeof m.allowDots>"u"?m.encodeDotInKeys===!0?!0:u.allowDots:!!m.allowDots;return{addQueryPrefix:typeof m.addQueryPrefix=="boolean"?m.addQueryPrefix:u.addQueryPrefix,allowDots:I,allowEmptyArrays:typeof m.allowEmptyArrays=="boolean"?!!m.allowEmptyArrays:u.allowEmptyArrays,arrayFormat:T,charset:y,charsetSentinel:typeof m.charsetSentinel=="boolean"?m.charsetSentinel:u.charsetSentinel,commaRoundTrip:!!m.commaRoundTrip,delimiter:typeof m.delimiter>"u"?u.delimiter:m.delimiter,encode:typeof m.encode=="boolean"?m.encode:u.encode,encodeDotInKeys:typeof m.encodeDotInKeys=="boolean"?m.encodeDotInKeys:u.encodeDotInKeys,encoder:typeof m.encoder=="function"?m.encoder:u.encoder,encodeValuesOnly:typeof m.encodeValuesOnly=="boolean"?m.encodeValuesOnly:u.encodeValuesOnly,filter:E,format:x,formatter:b,serializeDate:typeof m.serializeDate=="function"?m.serializeDate:u.serializeDate,skipNulls:typeof m.skipNulls=="boolean"?m.skipNulls:u.skipNulls,sort:typeof m.sort=="function"?m.sort:null,strictNullHandling:typeof m.strictNullHandling=="boolean"?m.strictNullHandling:u.strictNullHandling}};return Eh=function(h,m){var y=h,x=v(m),b,E;typeof x.filter=="function"?(E=x.filter,y=E("",y)):i(x.filter)&&(E=x.filter,b=E);var T=[];if(typeof y!="object"||y===null)return"";var I=o[x.arrayFormat],w=I==="comma"&&x.commaRoundTrip;b||(b=Object.keys(y)),x.sort&&b.sort(x.sort);for(var k=e(),P=0;P<b.length;++P){var _=b[P],F=y[_];x.skipNulls&&F===null||s(T,p(F,_,I,w,x.allowEmptyArrays,x.strictNullHandling,x.skipNulls,x.encodeDotInKeys,x.encode?x.encoder:null,x.filter,x.sort,x.allowDots,x.serializeDate,x.format,x.formatter,x.encodeValuesOnly,x.charset,k))}var V=T.join(x.delimiter),D=x.addQueryPrefix===!0?"?":"";return x.charsetSentinel&&(x.charset==="iso-8859-1"?D+="utf8=%26%2310003%3B&":D+="utf8=%E2%9C%93&"),V.length>0?D+V:""},Eh}var kh,pE;function k3(){if(pE)return kh;pE=1;var e=dE(),t=Object.prototype.hasOwnProperty,n=Array.isArray,r={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:e.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictNullHandling:!1,throwOnLimitExceeded:!1},o=function(p){return p.replace(/&#(\d+);/g,function(v,h){return String.fromCharCode(parseInt(h,10))})},i=function(p,v,h){if(p&&typeof p=="string"&&v.comma&&p.indexOf(",")>-1)return p.split(",");if(v.throwOnLimitExceeded&&h>=v.arrayLimit)throw new RangeError("Array limit exceeded. Only "+v.arrayLimit+" element"+(v.arrayLimit===1?"":"s")+" allowed in an array.");return p},a="utf8=%26%2310003%3B",s="utf8=%E2%9C%93",l=function(v,h){var m={__proto__:null},y=h.ignoreQueryPrefix?v.replace(/^\?/,""):v;y=y.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var x=h.parameterLimit===1/0?void 0:h.parameterLimit,b=y.split(h.delimiter,h.throwOnLimitExceeded?x+1:x);if(h.throwOnLimitExceeded&&b.length>x)throw new RangeError("Parameter limit exceeded. Only "+x+" parameter"+(x===1?"":"s")+" allowed.");var E=-1,T,I=h.charset;if(h.charsetSentinel)for(T=0;T<b.length;++T)b[T].indexOf("utf8=")===0&&(b[T]===s?I="utf-8":b[T]===a&&(I="iso-8859-1"),E=T,T=b.length);for(T=0;T<b.length;++T)if(T!==E){var w=b[T],k=w.indexOf("]="),P=k===-1?w.indexOf("="):k+1,_,F;if(P===-1?(_=h.decoder(w,r.decoder,I,"key"),F=h.strictNullHandling?null:""):(_=h.decoder(w.slice(0,P),r.decoder,I,"key"),_!==null&&(F=e.maybeMap(i(w.slice(P+1),h,n(m[_])?m[_].length:0),function(D){return h.decoder(D,r.decoder,I,"value")}))),F&&h.interpretNumericEntities&&I==="iso-8859-1"&&(F=o(String(F))),w.indexOf("[]=")>-1&&(F=n(F)?[F]:F),_!==null){var V=t.call(m,_);V&&h.duplicates==="combine"?m[_]=e.combine(m[_],F,h.arrayLimit,h.plainObjects):(!V||h.duplicates==="last")&&(m[_]=F)}}return m},c=function(p,v,h,m){var y=0;if(p.length>0&&p[p.length-1]==="[]"){var x=p.slice(0,-1).join("");y=Array.isArray(v)&&v[x]?v[x].length:0}for(var b=m?v:i(v,h,y),E=p.length-1;E>=0;--E){var T,I=p[E];if(I==="[]"&&h.parseArrays)e.isOverflow(b)?T=b:T=h.allowEmptyArrays&&(b===""||h.strictNullHandling&&b===null)?[]:e.combine([],b,h.arrayLimit,h.plainObjects);else{T=h.plainObjects?{__proto__:null}:{};var w=I.charAt(0)==="["&&I.charAt(I.length-1)==="]"?I.slice(1,-1):I,k=h.decodeDotInKeys?w.replace(/%2E/g,"."):w,P=parseInt(k,10);!h.parseArrays&&k===""?T={0:b}:!isNaN(P)&&I!==k&&String(P)===k&&P>=0&&h.parseArrays&&P<=h.arrayLimit?(T=[],T[P]=b):k!=="__proto__"&&(T[k]=b)}b=T}return b},u=function(v,h){var m=h.allowDots?v.replace(/\.([^.[]+)/g,"[$1]"):v;if(h.depth<=0)return!h.plainObjects&&t.call(Object.prototype,m)&&!h.allowPrototypes?void 0:[m];var y=/(\[[^[\]]*])/,x=/(\[[^[\]]*])/g,b=y.exec(m),E=b?m.slice(0,b.index):m,T=[];if(E){if(!h.plainObjects&&t.call(Object.prototype,E)&&!h.allowPrototypes)return;T.push(E)}for(var I=0;(b=x.exec(m))!==null&&I<h.depth;){I+=1;var w=b[1].slice(1,-1);if(!h.plainObjects&&t.call(Object.prototype,w)&&!h.allowPrototypes)return;T.push(b[1])}if(b){if(h.strictDepth===!0)throw new RangeError("Input depth exceeded depth option of "+h.depth+" and strictDepth is true");T.push("["+m.slice(b.index)+"]")}return T},d=function(v,h,m,y){if(v){var x=u(v,m);if(x)return c(x,h,m,y)}},f=function(v){if(!v)return r;if(typeof v.allowEmptyArrays<"u"&&typeof v.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof v.decodeDotInKeys<"u"&&typeof v.decodeDotInKeys!="boolean")throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(v.decoder!==null&&typeof v.decoder<"u"&&typeof v.decoder!="function")throw new TypeError("Decoder has to be a function.");if(typeof v.charset<"u"&&v.charset!=="utf-8"&&v.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");if(typeof v.throwOnLimitExceeded<"u"&&typeof v.throwOnLimitExceeded!="boolean")throw new TypeError("`throwOnLimitExceeded` option must be a boolean");var h=typeof v.charset>"u"?r.charset:v.charset,m=typeof v.duplicates>"u"?r.duplicates:v.duplicates;if(m!=="combine"&&m!=="first"&&m!=="last")throw new TypeError("The duplicates option must be either combine, first, or last");var y=typeof v.allowDots>"u"?v.decodeDotInKeys===!0?!0:r.allowDots:!!v.allowDots;return{allowDots:y,allowEmptyArrays:typeof v.allowEmptyArrays=="boolean"?!!v.allowEmptyArrays:r.allowEmptyArrays,allowPrototypes:typeof v.allowPrototypes=="boolean"?v.allowPrototypes:r.allowPrototypes,allowSparse:typeof v.allowSparse=="boolean"?v.allowSparse:r.allowSparse,arrayLimit:typeof v.arrayLimit=="number"?v.arrayLimit:r.arrayLimit,charset:h,charsetSentinel:typeof v.charsetSentinel=="boolean"?v.charsetSentinel:r.charsetSentinel,comma:typeof v.comma=="boolean"?v.comma:r.comma,decodeDotInKeys:typeof v.decodeDotInKeys=="boolean"?v.decodeDotInKeys:r.decodeDotInKeys,decoder:typeof v.decoder=="function"?v.decoder:r.decoder,delimiter:typeof v.delimiter=="string"||e.isRegExp(v.delimiter)?v.delimiter:r.delimiter,depth:typeof v.depth=="number"||v.depth===!1?+v.depth:r.depth,duplicates:m,ignoreQueryPrefix:v.ignoreQueryPrefix===!0,interpretNumericEntities:typeof v.interpretNumericEntities=="boolean"?v.interpretNumericEntities:r.interpretNumericEntities,parameterLimit:typeof v.parameterLimit=="number"?v.parameterLimit:r.parameterLimit,parseArrays:v.parseArrays!==!1,plainObjects:typeof v.plainObjects=="boolean"?v.plainObjects:r.plainObjects,strictDepth:typeof v.strictDepth=="boolean"?!!v.strictDepth:r.strictDepth,strictNullHandling:typeof v.strictNullHandling=="boolean"?v.strictNullHandling:r.strictNullHandling,throwOnLimitExceeded:typeof v.throwOnLimitExceeded=="boolean"?v.throwOnLimitExceeded:!1}};return kh=function(p,v){var h=f(v);if(p===""||p===null||typeof p>"u")return h.plainObjects?{__proto__:null}:{};for(var m=typeof p=="string"?l(p,h):p,y=h.plainObjects?{__proto__:null}:{},x=Object.keys(m),b=0;b<x.length;++b){var E=x[b],T=d(E,m[E],h,typeof p=="string");y=e.merge(y,T,h)}return h.allowSparse===!0?y:e.compact(y)},kh}var Ch,hE;function C3(){if(hE)return Ch;hE=1;var e=E3(),t=k3(),n=Sh();return Ch={formats:n,parse:t,stringify:e},Ch}var I3=C3(),et;(function(e){e.assertEqual=o=>{};function t(o){}e.assertIs=t;function n(o){throw new Error}e.assertNever=n,e.arrayToEnum=o=>{const i={};for(const a of o)i[a]=a;return i},e.getValidEnumValues=o=>{const i=e.objectKeys(o).filter(s=>typeof o[o[s]]!="number"),a={};for(const s of i)a[s]=o[s];return e.objectValues(a)},e.objectValues=o=>e.objectKeys(o).map(function(i){return o[i]}),e.objectKeys=typeof Object.keys=="function"?o=>Object.keys(o):o=>{const i=[];for(const a in o)Object.prototype.hasOwnProperty.call(o,a)&&i.push(a);return i},e.find=(o,i)=>{for(const a of o)if(i(a))return a},e.isInteger=typeof Number.isInteger=="function"?o=>Number.isInteger(o):o=>typeof o=="number"&&Number.isFinite(o)&&Math.floor(o)===o;function r(o,i=" | "){return o.map(a=>typeof a=="string"?`'${a}'`:a).join(i)}e.joinValues=r,e.jsonStringifyReplacer=(o,i)=>typeof i=="bigint"?i.toString():i})(et||(et={}));var mE;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(mE||(mE={}));const Ee=et.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),jr=e=>{switch(typeof e){case"undefined":return Ee.undefined;case"string":return Ee.string;case"number":return Number.isNaN(e)?Ee.nan:Ee.number;case"boolean":return Ee.boolean;case"function":return Ee.function;case"bigint":return Ee.bigint;case"symbol":return Ee.symbol;case"object":return Array.isArray(e)?Ee.array:e===null?Ee.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?Ee.promise:typeof Map<"u"&&e instanceof Map?Ee.map:typeof Set<"u"&&e instanceof Set?Ee.set:typeof Date<"u"&&e instanceof Date?Ee.date:Ee.object;default:return Ee.unknown}},ge=et.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class gr extends Error{get errors(){return this.issues}constructor(t){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=t}format(t){const n=t||function(i){return i.message},r={_errors:[]},o=i=>{for(const a of i.issues)if(a.code==="invalid_union")a.unionErrors.map(o);else if(a.code==="invalid_return_type")o(a.returnTypeError);else if(a.code==="invalid_arguments")o(a.argumentsError);else if(a.path.length===0)r._errors.push(n(a));else{let s=r,l=0;for(;l<a.path.length;){const c=a.path[l];l===a.path.length-1?(s[c]=s[c]||{_errors:[]},s[c]._errors.push(n(a))):s[c]=s[c]||{_errors:[]},s=s[c],l++}}};return o(this),r}static assert(t){if(!(t instanceof gr))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,et.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=n=>n.message){const n={},r=[];for(const o of this.issues)o.path.length>0?(n[o.path[0]]=n[o.path[0]]||[],n[o.path[0]].push(t(o))):r.push(t(o));return{formErrors:r,fieldErrors:n}}get formErrors(){return this.flatten()}}gr.create=e=>new gr(e);const Ih=(e,t)=>{let n;switch(e.code){case ge.invalid_type:e.received===Ee.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case ge.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,et.jsonStringifyReplacer)}`;break;case ge.unrecognized_keys:n=`Unrecognized key(s) in object: ${et.joinValues(e.keys,", ")}`;break;case ge.invalid_union:n="Invalid input";break;case ge.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${et.joinValues(e.options)}`;break;case ge.invalid_enum_value:n=`Invalid enum value. Expected ${et.joinValues(e.options)}, received '${e.received}'`;break;case ge.invalid_arguments:n="Invalid function arguments";break;case ge.invalid_return_type:n="Invalid function return type";break;case ge.invalid_date:n="Invalid date";break;case ge.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:et.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case ge.too_small:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:n="Invalid input";break;case ge.too_big:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?n=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:n="Invalid input";break;case ge.custom:n="Invalid input";break;case ge.invalid_intersection_types:n="Intersection results could not be merged";break;case ge.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case ge.not_finite:n="Number must be finite";break;default:n=t.defaultError,et.assertNever(e)}return{message:n}};let A3=Ih;function P3(){return A3}const O3=e=>{const{data:t,path:n,errorMaps:r,issueData:o}=e,i=[...n,...o.path||[]],a={...o,path:i};if(o.message!==void 0)return{...o,path:i,message:o.message};let s="";const l=r.filter(c=>!!c).slice().reverse();for(const c of l)s=c(a,{data:t,defaultError:s}).message;return{...o,path:i,message:s}};function ye(e,t){const n=P3(),r=O3({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===Ih?void 0:Ih].filter(o=>!!o)});e.common.issues.push(r)}class hn{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,n){const r=[];for(const o of n){if(o.status==="aborted")return Le;o.status==="dirty"&&t.dirty(),r.push(o.value)}return{status:t.value,value:r}}static async mergeObjectAsync(t,n){const r=[];for(const o of n){const i=await o.key,a=await o.value;r.push({key:i,value:a})}return hn.mergeObjectSync(t,r)}static mergeObjectSync(t,n){const r={};for(const o of n){const{key:i,value:a}=o;if(i.status==="aborted"||a.status==="aborted")return Le;i.status==="dirty"&&t.dirty(),a.status==="dirty"&&t.dirty(),i.value!=="__proto__"&&(typeof a.value<"u"||o.alwaysSet)&&(r[i.value]=a.value)}return{status:t.value,value:r}}}const Le=Object.freeze({status:"aborted"}),Ua=e=>({status:"dirty",value:e}),Tn=e=>({status:"valid",value:e}),gE=e=>e.status==="aborted",vE=e=>e.status==="dirty",ki=e=>e.status==="valid",uc=e=>typeof Promise<"u"&&e instanceof Promise;var ke;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t?.message})(ke||(ke={}));class Rr{constructor(t,n,r,o){this._cachedPath=[],this.parent=t,this.data=n,this._path=r,this._key=o}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const yE=(e,t)=>{if(ki(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const n=new gr(e.common.issues);return this._error=n,this._error}}};function Ue(e){if(!e)return{};const{errorMap:t,invalid_type_error:n,required_error:r,description:o}=e;if(t&&(n||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:o}:{errorMap:(a,s)=>{const{message:l}=e;return a.code==="invalid_enum_value"?{message:l??s.defaultError}:typeof s.data>"u"?{message:l??r??s.defaultError}:a.code!=="invalid_type"?{message:s.defaultError}:{message:l??n??s.defaultError}},description:o}}class Xe{get description(){return this._def.description}_getType(t){return jr(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:jr(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new hn,ctx:{common:t.parent.common,data:t.data,parsedType:jr(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(uc(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(t){const n=this._parse(t);return Promise.resolve(n)}parse(t,n){const r=this.safeParse(t,n);if(r.success)return r.data;throw r.error}safeParse(t,n){const r={common:{issues:[],async:n?.async??!1,contextualErrorMap:n?.errorMap},path:n?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:jr(t)},o=this._parseSync({data:t,path:r.path,parent:r});return yE(r,o)}"~validate"(t){const n={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:jr(t)};if(!this["~standard"].async)try{const r=this._parseSync({data:t,path:[],parent:n});return ki(r)?{value:r.value}:{issues:n.common.issues}}catch(r){r?.message?.toLowerCase()?.includes("encountered")&&(this["~standard"].async=!0),n.common={issues:[],async:!0}}return this._parseAsync({data:t,path:[],parent:n}).then(r=>ki(r)?{value:r.value}:{issues:n.common.issues})}async parseAsync(t,n){const r=await this.safeParseAsync(t,n);if(r.success)return r.data;throw r.error}async safeParseAsync(t,n){const r={common:{issues:[],contextualErrorMap:n?.errorMap,async:!0},path:n?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:jr(t)},o=this._parse({data:t,path:r.path,parent:r}),i=await(uc(o)?o:Promise.resolve(o));return yE(r,i)}refine(t,n){const r=o=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(o):n;return this._refinement((o,i)=>{const a=t(o),s=()=>i.addIssue({code:ge.custom,...r(o)});return typeof Promise<"u"&&a instanceof Promise?a.then(l=>l?!0:(s(),!1)):a?!0:(s(),!1)})}refinement(t,n){return this._refinement((r,o)=>t(r)?!0:(o.addIssue(typeof n=="function"?n(r,o):n),!1))}_refinement(t){return new Pi({schema:this,typeName:Ve.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:n=>this["~validate"](n)}}optional(){return Hr.create(this,this._def)}nullable(){return Oi.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return ir.create(this)}promise(){return hc.create(this,this._def)}or(t){return fc.create([this,t],this._def)}and(t){return pc.create(this,t,this._def)}transform(t){return new Pi({...Ue(this._def),schema:this,typeName:Ve.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new Oh({...Ue(this._def),innerType:this,defaultValue:n,typeName:Ve.ZodDefault})}brand(){return new J3({typeName:Ve.ZodBranded,type:this,...Ue(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new _h({...Ue(this._def),innerType:this,catchValue:n,typeName:Ve.ZodCatch})}describe(t){const n=this.constructor;return new n({...this._def,description:t})}pipe(t){return Mh.create(this,t)}readonly(){return Dh.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const _3=/^c[^\s-]{8,}$/i,M3=/^[0-9a-z]+$/,D3=/^[0-9A-HJKMNP-TV-Z]{26}$/i,N3=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,F3=/^[a-z0-9_-]{21}$/i,L3=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,V3=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,$3=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,z3="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Ah;const j3=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,R3=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,B3=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,H3=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,W3=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,q3=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,bE="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",U3=new RegExp(`^${bE}$`);function xE(e){let t="[0-5]\\d";e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`);const n=e.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${t})${n}`}function G3(e){return new RegExp(`^${xE(e)}$`)}function Y3(e){let t=`${bE}T${xE(e)}`;const n=[];return n.push(e.local?"Z?":"Z"),e.offset&&n.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${n.join("|")})`,new RegExp(`^${t}$`)}function K3(e,t){return!!((t==="v4"||!t)&&j3.test(e)||(t==="v6"||!t)&&B3.test(e))}function Z3(e,t){if(!L3.test(e))return!1;try{const[n]=e.split("."),r=n.replace(/-/g,"+").replace(/_/g,"/").padEnd(n.length+(4-n.length%4)%4,"="),o=JSON.parse(atob(r));return!(typeof o!="object"||o===null||"typ"in o&&o?.typ!=="JWT"||!o.alg||t&&o.alg!==t)}catch{return!1}}function X3(e,t){return!!((t==="v4"||!t)&&R3.test(e)||(t==="v6"||!t)&&H3.test(e))}class ko extends Xe{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==Ee.string){const i=this._getOrReturnCtx(t);return ye(i,{code:ge.invalid_type,expected:Ee.string,received:i.parsedType}),Le}const r=new hn;let o;for(const i of this._def.checks)if(i.kind==="min")t.data.length<i.value&&(o=this._getOrReturnCtx(t,o),ye(o,{code:ge.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),r.dirty());else if(i.kind==="max")t.data.length>i.value&&(o=this._getOrReturnCtx(t,o),ye(o,{code:ge.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),r.dirty());else if(i.kind==="length"){const a=t.data.length>i.value,s=t.data.length<i.value;(a||s)&&(o=this._getOrReturnCtx(t,o),a?ye(o,{code:ge.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):s&&ye(o,{code:ge.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),r.dirty())}else if(i.kind==="email")$3.test(t.data)||(o=this._getOrReturnCtx(t,o),ye(o,{validation:"email",code:ge.invalid_string,message:i.message}),r.dirty());else if(i.kind==="emoji")Ah||(Ah=new RegExp(z3,"u")),Ah.test(t.data)||(o=this._getOrReturnCtx(t,o),ye(o,{validation:"emoji",code:ge.invalid_string,message:i.message}),r.dirty());else if(i.kind==="uuid")N3.test(t.data)||(o=this._getOrReturnCtx(t,o),ye(o,{validation:"uuid",code:ge.invalid_string,message:i.message}),r.dirty());else if(i.kind==="nanoid")F3.test(t.data)||(o=this._getOrReturnCtx(t,o),ye(o,{validation:"nanoid",code:ge.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid")_3.test(t.data)||(o=this._getOrReturnCtx(t,o),ye(o,{validation:"cuid",code:ge.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid2")M3.test(t.data)||(o=this._getOrReturnCtx(t,o),ye(o,{validation:"cuid2",code:ge.invalid_string,message:i.message}),r.dirty());else if(i.kind==="ulid")D3.test(t.data)||(o=this._getOrReturnCtx(t,o),ye(o,{validation:"ulid",code:ge.invalid_string,message:i.message}),r.dirty());else if(i.kind==="url")try{new URL(t.data)}catch{o=this._getOrReturnCtx(t,o),ye(o,{validation:"url",code:ge.invalid_string,message:i.message}),r.dirty()}else i.kind==="regex"?(i.regex.lastIndex=0,i.regex.test(t.data)||(o=this._getOrReturnCtx(t,o),ye(o,{validation:"regex",code:ge.invalid_string,message:i.message}),r.dirty())):i.kind==="trim"?t.data=t.data.trim():i.kind==="includes"?t.data.includes(i.value,i.position)||(o=this._getOrReturnCtx(t,o),ye(o,{code:ge.invalid_string,validation:{includes:i.value,position:i.position},message:i.message}),r.dirty()):i.kind==="toLowerCase"?t.data=t.data.toLowerCase():i.kind==="toUpperCase"?t.data=t.data.toUpperCase():i.kind==="startsWith"?t.data.startsWith(i.value)||(o=this._getOrReturnCtx(t,o),ye(o,{code:ge.invalid_string,validation:{startsWith:i.value},message:i.message}),r.dirty()):i.kind==="endsWith"?t.data.endsWith(i.value)||(o=this._getOrReturnCtx(t,o),ye(o,{code:ge.invalid_string,validation:{endsWith:i.value},message:i.message}),r.dirty()):i.kind==="datetime"?Y3(i).test(t.data)||(o=this._getOrReturnCtx(t,o),ye(o,{code:ge.invalid_string,validation:"datetime",message:i.message}),r.dirty()):i.kind==="date"?U3.test(t.data)||(o=this._getOrReturnCtx(t,o),ye(o,{code:ge.invalid_string,validation:"date",message:i.message}),r.dirty()):i.kind==="time"?G3(i).test(t.data)||(o=this._getOrReturnCtx(t,o),ye(o,{code:ge.invalid_string,validation:"time",message:i.message}),r.dirty()):i.kind==="duration"?V3.test(t.data)||(o=this._getOrReturnCtx(t,o),ye(o,{validation:"duration",code:ge.invalid_string,message:i.message}),r.dirty()):i.kind==="ip"?K3(t.data,i.version)||(o=this._getOrReturnCtx(t,o),ye(o,{validation:"ip",code:ge.invalid_string,message:i.message}),r.dirty()):i.kind==="jwt"?Z3(t.data,i.alg)||(o=this._getOrReturnCtx(t,o),ye(o,{validation:"jwt",code:ge.invalid_string,message:i.message}),r.dirty()):i.kind==="cidr"?X3(t.data,i.version)||(o=this._getOrReturnCtx(t,o),ye(o,{validation:"cidr",code:ge.invalid_string,message:i.message}),r.dirty()):i.kind==="base64"?W3.test(t.data)||(o=this._getOrReturnCtx(t,o),ye(o,{validation:"base64",code:ge.invalid_string,message:i.message}),r.dirty()):i.kind==="base64url"?q3.test(t.data)||(o=this._getOrReturnCtx(t,o),ye(o,{validation:"base64url",code:ge.invalid_string,message:i.message}),r.dirty()):et.assertNever(i);return{status:r.value,value:t.data}}_regex(t,n,r){return this.refinement(o=>t.test(o),{validation:n,code:ge.invalid_string,...ke.errToObj(r)})}_addCheck(t){return new ko({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...ke.errToObj(t)})}url(t){return this._addCheck({kind:"url",...ke.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...ke.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...ke.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...ke.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...ke.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...ke.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...ke.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...ke.errToObj(t)})}base64url(t){return this._addCheck({kind:"base64url",...ke.errToObj(t)})}jwt(t){return this._addCheck({kind:"jwt",...ke.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...ke.errToObj(t)})}cidr(t){return this._addCheck({kind:"cidr",...ke.errToObj(t)})}datetime(t){return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof t?.precision>"u"?null:t?.precision,offset:t?.offset??!1,local:t?.local??!1,...ke.errToObj(t?.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof t?.precision>"u"?null:t?.precision,...ke.errToObj(t?.message)})}duration(t){return this._addCheck({kind:"duration",...ke.errToObj(t)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...ke.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n?.position,...ke.errToObj(n?.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...ke.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...ke.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...ke.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...ke.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...ke.errToObj(n)})}nonempty(t){return this.min(1,ke.errToObj(t))}trim(){return new ko({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new ko({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new ko({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isDate(){return!!this._def.checks.find(t=>t.kind==="date")}get isTime(){return!!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return!!this._def.checks.find(t=>t.kind==="duration")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(t=>t.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get isCIDR(){return!!this._def.checks.find(t=>t.kind==="cidr")}get isBase64(){return!!this._def.checks.find(t=>t.kind==="base64")}get isBase64url(){return!!this._def.checks.find(t=>t.kind==="base64url")}get minLength(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxLength(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}ko.create=e=>new ko({checks:[],typeName:Ve.ZodString,coerce:e?.coerce??!1,...Ue(e)});function Q3(e,t){const n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,o=n>r?n:r,i=Number.parseInt(e.toFixed(o).replace(".","")),a=Number.parseInt(t.toFixed(o).replace(".",""));return i%a/10**o}class Ci extends Xe{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==Ee.number){const i=this._getOrReturnCtx(t);return ye(i,{code:ge.invalid_type,expected:Ee.number,received:i.parsedType}),Le}let r;const o=new hn;for(const i of this._def.checks)i.kind==="int"?et.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),ye(r,{code:ge.invalid_type,expected:"integer",received:"float",message:i.message}),o.dirty()):i.kind==="min"?(i.inclusive?t.data<i.value:t.data<=i.value)&&(r=this._getOrReturnCtx(t,r),ye(r,{code:ge.too_small,minimum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),o.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(r=this._getOrReturnCtx(t,r),ye(r,{code:ge.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),o.dirty()):i.kind==="multipleOf"?Q3(t.data,i.value)!==0&&(r=this._getOrReturnCtx(t,r),ye(r,{code:ge.not_multiple_of,multipleOf:i.value,message:i.message}),o.dirty()):i.kind==="finite"?Number.isFinite(t.data)||(r=this._getOrReturnCtx(t,r),ye(r,{code:ge.not_finite,message:i.message}),o.dirty()):et.assertNever(i);return{status:o.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,ke.toString(n))}gt(t,n){return this.setLimit("min",t,!1,ke.toString(n))}lte(t,n){return this.setLimit("max",t,!0,ke.toString(n))}lt(t,n){return this.setLimit("max",t,!1,ke.toString(n))}setLimit(t,n,r,o){return new Ci({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:ke.toString(o)}]})}_addCheck(t){return new Ci({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:ke.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:ke.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:ke.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:ke.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:ke.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:ke.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:ke.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:ke.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:ke.toString(t)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&et.isInteger(t.value))}get isFinite(){let t=null,n=null;for(const r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(n===null||r.value>n)&&(n=r.value):r.kind==="max"&&(t===null||r.value<t)&&(t=r.value)}return Number.isFinite(n)&&Number.isFinite(t)}}Ci.create=e=>new Ci({checks:[],typeName:Ve.ZodNumber,coerce:e?.coerce||!1,...Ue(e)});class Ga extends Xe{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce)try{t.data=BigInt(t.data)}catch{return this._getInvalidInput(t)}if(this._getType(t)!==Ee.bigint)return this._getInvalidInput(t);let r;const o=new hn;for(const i of this._def.checks)i.kind==="min"?(i.inclusive?t.data<i.value:t.data<=i.value)&&(r=this._getOrReturnCtx(t,r),ye(r,{code:ge.too_small,type:"bigint",minimum:i.value,inclusive:i.inclusive,message:i.message}),o.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(r=this._getOrReturnCtx(t,r),ye(r,{code:ge.too_big,type:"bigint",maximum:i.value,inclusive:i.inclusive,message:i.message}),o.dirty()):i.kind==="multipleOf"?t.data%i.value!==BigInt(0)&&(r=this._getOrReturnCtx(t,r),ye(r,{code:ge.not_multiple_of,multipleOf:i.value,message:i.message}),o.dirty()):et.assertNever(i);return{status:o.value,value:t.data}}_getInvalidInput(t){const n=this._getOrReturnCtx(t);return ye(n,{code:ge.invalid_type,expected:Ee.bigint,received:n.parsedType}),Le}gte(t,n){return this.setLimit("min",t,!0,ke.toString(n))}gt(t,n){return this.setLimit("min",t,!1,ke.toString(n))}lte(t,n){return this.setLimit("max",t,!0,ke.toString(n))}lt(t,n){return this.setLimit("max",t,!1,ke.toString(n))}setLimit(t,n,r,o){return new Ga({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:ke.toString(o)}]})}_addCheck(t){return new Ga({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:ke.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:ke.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:ke.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:ke.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:ke.toString(n)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}Ga.create=e=>new Ga({checks:[],typeName:Ve.ZodBigInt,coerce:e?.coerce??!1,...Ue(e)});class wE extends Xe{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==Ee.boolean){const r=this._getOrReturnCtx(t);return ye(r,{code:ge.invalid_type,expected:Ee.boolean,received:r.parsedType}),Le}return Tn(t.data)}}wE.create=e=>new wE({typeName:Ve.ZodBoolean,coerce:e?.coerce||!1,...Ue(e)});class dc extends Xe{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==Ee.date){const i=this._getOrReturnCtx(t);return ye(i,{code:ge.invalid_type,expected:Ee.date,received:i.parsedType}),Le}if(Number.isNaN(t.data.getTime())){const i=this._getOrReturnCtx(t);return ye(i,{code:ge.invalid_date}),Le}const r=new hn;let o;for(const i of this._def.checks)i.kind==="min"?t.data.getTime()<i.value&&(o=this._getOrReturnCtx(t,o),ye(o,{code:ge.too_small,message:i.message,inclusive:!0,exact:!1,minimum:i.value,type:"date"}),r.dirty()):i.kind==="max"?t.data.getTime()>i.value&&(o=this._getOrReturnCtx(t,o),ye(o,{code:ge.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),r.dirty()):et.assertNever(i);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new dc({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:ke.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:ke.toString(n)})}get minDate(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t!=null?new Date(t):null}}dc.create=e=>new dc({checks:[],coerce:e?.coerce||!1,typeName:Ve.ZodDate,...Ue(e)});class SE extends Xe{_parse(t){if(this._getType(t)!==Ee.symbol){const r=this._getOrReturnCtx(t);return ye(r,{code:ge.invalid_type,expected:Ee.symbol,received:r.parsedType}),Le}return Tn(t.data)}}SE.create=e=>new SE({typeName:Ve.ZodSymbol,...Ue(e)});class TE extends Xe{_parse(t){if(this._getType(t)!==Ee.undefined){const r=this._getOrReturnCtx(t);return ye(r,{code:ge.invalid_type,expected:Ee.undefined,received:r.parsedType}),Le}return Tn(t.data)}}TE.create=e=>new TE({typeName:Ve.ZodUndefined,...Ue(e)});class EE extends Xe{_parse(t){if(this._getType(t)!==Ee.null){const r=this._getOrReturnCtx(t);return ye(r,{code:ge.invalid_type,expected:Ee.null,received:r.parsedType}),Le}return Tn(t.data)}}EE.create=e=>new EE({typeName:Ve.ZodNull,...Ue(e)});class kE extends Xe{constructor(){super(...arguments),this._any=!0}_parse(t){return Tn(t.data)}}kE.create=e=>new kE({typeName:Ve.ZodAny,...Ue(e)});class CE extends Xe{constructor(){super(...arguments),this._unknown=!0}_parse(t){return Tn(t.data)}}CE.create=e=>new CE({typeName:Ve.ZodUnknown,...Ue(e)});class Br extends Xe{_parse(t){const n=this._getOrReturnCtx(t);return ye(n,{code:ge.invalid_type,expected:Ee.never,received:n.parsedType}),Le}}Br.create=e=>new Br({typeName:Ve.ZodNever,...Ue(e)});class IE extends Xe{_parse(t){if(this._getType(t)!==Ee.undefined){const r=this._getOrReturnCtx(t);return ye(r,{code:ge.invalid_type,expected:Ee.void,received:r.parsedType}),Le}return Tn(t.data)}}IE.create=e=>new IE({typeName:Ve.ZodVoid,...Ue(e)});class ir extends Xe{_parse(t){const{ctx:n,status:r}=this._processInputParams(t),o=this._def;if(n.parsedType!==Ee.array)return ye(n,{code:ge.invalid_type,expected:Ee.array,received:n.parsedType}),Le;if(o.exactLength!==null){const a=n.data.length>o.exactLength.value,s=n.data.length<o.exactLength.value;(a||s)&&(ye(n,{code:a?ge.too_big:ge.too_small,minimum:s?o.exactLength.value:void 0,maximum:a?o.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:o.exactLength.message}),r.dirty())}if(o.minLength!==null&&n.data.length<o.minLength.value&&(ye(n,{code:ge.too_small,minimum:o.minLength.value,type:"array",inclusive:!0,exact:!1,message:o.minLength.message}),r.dirty()),o.maxLength!==null&&n.data.length>o.maxLength.value&&(ye(n,{code:ge.too_big,maximum:o.maxLength.value,type:"array",inclusive:!0,exact:!1,message:o.maxLength.message}),r.dirty()),n.common.async)return Promise.all([...n.data].map((a,s)=>o.type._parseAsync(new Rr(n,a,n.path,s)))).then(a=>hn.mergeArray(r,a));const i=[...n.data].map((a,s)=>o.type._parseSync(new Rr(n,a,n.path,s)));return hn.mergeArray(r,i)}get element(){return this._def.type}min(t,n){return new ir({...this._def,minLength:{value:t,message:ke.toString(n)}})}max(t,n){return new ir({...this._def,maxLength:{value:t,message:ke.toString(n)}})}length(t,n){return new ir({...this._def,exactLength:{value:t,message:ke.toString(n)}})}nonempty(t){return this.min(1,t)}}ir.create=(e,t)=>new ir({type:e,minLength:null,maxLength:null,exactLength:null,typeName:Ve.ZodArray,...Ue(t)});function Ii(e){if(e instanceof Bt){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=Hr.create(Ii(r))}return new Bt({...e._def,shape:()=>t})}else return e instanceof ir?new ir({...e._def,type:Ii(e.element)}):e instanceof Hr?Hr.create(Ii(e.unwrap())):e instanceof Oi?Oi.create(Ii(e.unwrap())):e instanceof Co?Co.create(e.items.map(t=>Ii(t))):e}class Bt extends Xe{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const t=this._def.shape(),n=et.objectKeys(t);return this._cached={shape:t,keys:n},this._cached}_parse(t){if(this._getType(t)!==Ee.object){const c=this._getOrReturnCtx(t);return ye(c,{code:ge.invalid_type,expected:Ee.object,received:c.parsedType}),Le}const{status:r,ctx:o}=this._processInputParams(t),{shape:i,keys:a}=this._getCached(),s=[];if(!(this._def.catchall instanceof Br&&this._def.unknownKeys==="strip"))for(const c in o.data)a.includes(c)||s.push(c);const l=[];for(const c of a){const u=i[c],d=o.data[c];l.push({key:{status:"valid",value:c},value:u._parse(new Rr(o,d,o.path,c)),alwaysSet:c in o.data})}if(this._def.catchall instanceof Br){const c=this._def.unknownKeys;if(c==="passthrough")for(const u of s)l.push({key:{status:"valid",value:u},value:{status:"valid",value:o.data[u]}});else if(c==="strict")s.length>0&&(ye(o,{code:ge.unrecognized_keys,keys:s}),r.dirty());else if(c!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const c=this._def.catchall;for(const u of s){const d=o.data[u];l.push({key:{status:"valid",value:u},value:c._parse(new Rr(o,d,o.path,u)),alwaysSet:u in o.data})}}return o.common.async?Promise.resolve().then(async()=>{const c=[];for(const u of l){const d=await u.key,f=await u.value;c.push({key:d,value:f,alwaysSet:u.alwaysSet})}return c}).then(c=>hn.mergeObjectSync(r,c)):hn.mergeObjectSync(r,l)}get shape(){return this._def.shape()}strict(t){return ke.errToObj,new Bt({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,r)=>{const o=this._def.errorMap?.(n,r).message??r.defaultError;return n.code==="unrecognized_keys"?{message:ke.errToObj(t).message??o}:{message:o}}}:{}})}strip(){return new Bt({...this._def,unknownKeys:"strip"})}passthrough(){return new Bt({...this._def,unknownKeys:"passthrough"})}extend(t){return new Bt({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new Bt({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:Ve.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new Bt({...this._def,catchall:t})}pick(t){const n={};for(const r of et.objectKeys(t))t[r]&&this.shape[r]&&(n[r]=this.shape[r]);return new Bt({...this._def,shape:()=>n})}omit(t){const n={};for(const r of et.objectKeys(this.shape))t[r]||(n[r]=this.shape[r]);return new Bt({...this._def,shape:()=>n})}deepPartial(){return Ii(this)}partial(t){const n={};for(const r of et.objectKeys(this.shape)){const o=this.shape[r];t&&!t[r]?n[r]=o:n[r]=o.optional()}return new Bt({...this._def,shape:()=>n})}required(t){const n={};for(const r of et.objectKeys(this.shape))if(t&&!t[r])n[r]=this.shape[r];else{let i=this.shape[r];for(;i instanceof Hr;)i=i._def.innerType;n[r]=i}return new Bt({...this._def,shape:()=>n})}keyof(){return _E(et.objectKeys(this.shape))}}Bt.create=(e,t)=>new Bt({shape:()=>e,unknownKeys:"strip",catchall:Br.create(),typeName:Ve.ZodObject,...Ue(t)}),Bt.strictCreate=(e,t)=>new Bt({shape:()=>e,unknownKeys:"strict",catchall:Br.create(),typeName:Ve.ZodObject,...Ue(t)}),Bt.lazycreate=(e,t)=>new Bt({shape:e,unknownKeys:"strip",catchall:Br.create(),typeName:Ve.ZodObject,...Ue(t)});class fc extends Xe{_parse(t){const{ctx:n}=this._processInputParams(t),r=this._def.options;function o(i){for(const s of i)if(s.result.status==="valid")return s.result;for(const s of i)if(s.result.status==="dirty")return n.common.issues.push(...s.ctx.common.issues),s.result;const a=i.map(s=>new gr(s.ctx.common.issues));return ye(n,{code:ge.invalid_union,unionErrors:a}),Le}if(n.common.async)return Promise.all(r.map(async i=>{const a={...n,common:{...n.common,issues:[]},parent:null};return{result:await i._parseAsync({data:n.data,path:n.path,parent:a}),ctx:a}})).then(o);{let i;const a=[];for(const l of r){const c={...n,common:{...n.common,issues:[]},parent:null},u=l._parseSync({data:n.data,path:n.path,parent:c});if(u.status==="valid")return u;u.status==="dirty"&&!i&&(i={result:u,ctx:c}),c.common.issues.length&&a.push(c.common.issues)}if(i)return n.common.issues.push(...i.ctx.common.issues),i.result;const s=a.map(l=>new gr(l));return ye(n,{code:ge.invalid_union,unionErrors:s}),Le}}get options(){return this._def.options}}fc.create=(e,t)=>new fc({options:e,typeName:Ve.ZodUnion,...Ue(t)});function Ph(e,t){const n=jr(e),r=jr(t);if(e===t)return{valid:!0,data:e};if(n===Ee.object&&r===Ee.object){const o=et.objectKeys(t),i=et.objectKeys(e).filter(s=>o.indexOf(s)!==-1),a={...e,...t};for(const s of i){const l=Ph(e[s],t[s]);if(!l.valid)return{valid:!1};a[s]=l.data}return{valid:!0,data:a}}else if(n===Ee.array&&r===Ee.array){if(e.length!==t.length)return{valid:!1};const o=[];for(let i=0;i<e.length;i++){const a=e[i],s=t[i],l=Ph(a,s);if(!l.valid)return{valid:!1};o.push(l.data)}return{valid:!0,data:o}}else return n===Ee.date&&r===Ee.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class pc extends Xe{_parse(t){const{status:n,ctx:r}=this._processInputParams(t),o=(i,a)=>{if(gE(i)||gE(a))return Le;const s=Ph(i.value,a.value);return s.valid?((vE(i)||vE(a))&&n.dirty(),{status:n.value,value:s.data}):(ye(r,{code:ge.invalid_intersection_types}),Le)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([i,a])=>o(i,a)):o(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}pc.create=(e,t,n)=>new pc({left:e,right:t,typeName:Ve.ZodIntersection,...Ue(n)});class Co extends Xe{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==Ee.array)return ye(r,{code:ge.invalid_type,expected:Ee.array,received:r.parsedType}),Le;if(r.data.length<this._def.items.length)return ye(r,{code:ge.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),Le;!this._def.rest&&r.data.length>this._def.items.length&&(ye(r,{code:ge.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const i=[...r.data].map((a,s)=>{const l=this._def.items[s]||this._def.rest;return l?l._parse(new Rr(r,a,r.path,s)):null}).filter(a=>!!a);return r.common.async?Promise.all(i).then(a=>hn.mergeArray(n,a)):hn.mergeArray(n,i)}get items(){return this._def.items}rest(t){return new Co({...this._def,rest:t})}}Co.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Co({items:e,typeName:Ve.ZodTuple,rest:null,...Ue(t)})};class AE extends Xe{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==Ee.map)return ye(r,{code:ge.invalid_type,expected:Ee.map,received:r.parsedType}),Le;const o=this._def.keyType,i=this._def.valueType,a=[...r.data.entries()].map(([s,l],c)=>({key:o._parse(new Rr(r,s,r.path,[c,"key"])),value:i._parse(new Rr(r,l,r.path,[c,"value"]))}));if(r.common.async){const s=new Map;return Promise.resolve().then(async()=>{for(const l of a){const c=await l.key,u=await l.value;if(c.status==="aborted"||u.status==="aborted")return Le;(c.status==="dirty"||u.status==="dirty")&&n.dirty(),s.set(c.value,u.value)}return{status:n.value,value:s}})}else{const s=new Map;for(const l of a){const c=l.key,u=l.value;if(c.status==="aborted"||u.status==="aborted")return Le;(c.status==="dirty"||u.status==="dirty")&&n.dirty(),s.set(c.value,u.value)}return{status:n.value,value:s}}}}AE.create=(e,t,n)=>new AE({valueType:t,keyType:e,typeName:Ve.ZodMap,...Ue(n)});class Ya extends Xe{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==Ee.set)return ye(r,{code:ge.invalid_type,expected:Ee.set,received:r.parsedType}),Le;const o=this._def;o.minSize!==null&&r.data.size<o.minSize.value&&(ye(r,{code:ge.too_small,minimum:o.minSize.value,type:"set",inclusive:!0,exact:!1,message:o.minSize.message}),n.dirty()),o.maxSize!==null&&r.data.size>o.maxSize.value&&(ye(r,{code:ge.too_big,maximum:o.maxSize.value,type:"set",inclusive:!0,exact:!1,message:o.maxSize.message}),n.dirty());const i=this._def.valueType;function a(l){const c=new Set;for(const u of l){if(u.status==="aborted")return Le;u.status==="dirty"&&n.dirty(),c.add(u.value)}return{status:n.value,value:c}}const s=[...r.data.values()].map((l,c)=>i._parse(new Rr(r,l,r.path,c)));return r.common.async?Promise.all(s).then(l=>a(l)):a(s)}min(t,n){return new Ya({...this._def,minSize:{value:t,message:ke.toString(n)}})}max(t,n){return new Ya({...this._def,maxSize:{value:t,message:ke.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}}Ya.create=(e,t)=>new Ya({valueType:e,minSize:null,maxSize:null,typeName:Ve.ZodSet,...Ue(t)});class PE extends Xe{get schema(){return this._def.getter()}_parse(t){const{ctx:n}=this._processInputParams(t);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}}PE.create=(e,t)=>new PE({getter:e,typeName:Ve.ZodLazy,...Ue(t)});class OE extends Xe{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return ye(n,{received:n.data,code:ge.invalid_literal,expected:this._def.value}),Le}return{status:"valid",value:t.data}}get value(){return this._def.value}}OE.create=(e,t)=>new OE({value:e,typeName:Ve.ZodLiteral,...Ue(t)});function _E(e,t){return new Ai({values:e,typeName:Ve.ZodEnum,...Ue(t)})}class Ai extends Xe{_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),r=this._def.values;return ye(n,{expected:et.joinValues(r),received:n.parsedType,code:ge.invalid_type}),Le}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(t.data)){const n=this._getOrReturnCtx(t),r=this._def.values;return ye(n,{received:n.data,code:ge.invalid_enum_value,options:r}),Le}return Tn(t.data)}get options(){return this._def.values}get enum(){const t={};for(const n of this._def.values)t[n]=n;return t}get Values(){const t={};for(const n of this._def.values)t[n]=n;return t}get Enum(){const t={};for(const n of this._def.values)t[n]=n;return t}extract(t,n=this._def){return Ai.create(t,{...this._def,...n})}exclude(t,n=this._def){return Ai.create(this.options.filter(r=>!t.includes(r)),{...this._def,...n})}}Ai.create=_E;class ME extends Xe{_parse(t){const n=et.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==Ee.string&&r.parsedType!==Ee.number){const o=et.objectValues(n);return ye(r,{expected:et.joinValues(o),received:r.parsedType,code:ge.invalid_type}),Le}if(this._cache||(this._cache=new Set(et.getValidEnumValues(this._def.values))),!this._cache.has(t.data)){const o=et.objectValues(n);return ye(r,{received:r.data,code:ge.invalid_enum_value,options:o}),Le}return Tn(t.data)}get enum(){return this._def.values}}ME.create=(e,t)=>new ME({values:e,typeName:Ve.ZodNativeEnum,...Ue(t)});class hc extends Xe{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==Ee.promise&&n.common.async===!1)return ye(n,{code:ge.invalid_type,expected:Ee.promise,received:n.parsedType}),Le;const r=n.parsedType===Ee.promise?n.data:Promise.resolve(n.data);return Tn(r.then(o=>this._def.type.parseAsync(o,{path:n.path,errorMap:n.common.contextualErrorMap})))}}hc.create=(e,t)=>new hc({type:e,typeName:Ve.ZodPromise,...Ue(t)});class Pi extends Xe{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Ve.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:n,ctx:r}=this._processInputParams(t),o=this._def.effect||null,i={addIssue:a=>{ye(r,a),a.fatal?n.abort():n.dirty()},get path(){return r.path}};if(i.addIssue=i.addIssue.bind(i),o.type==="preprocess"){const a=o.transform(r.data,i);if(r.common.async)return Promise.resolve(a).then(async s=>{if(n.value==="aborted")return Le;const l=await this._def.schema._parseAsync({data:s,path:r.path,parent:r});return l.status==="aborted"?Le:l.status==="dirty"||n.value==="dirty"?Ua(l.value):l});{if(n.value==="aborted")return Le;const s=this._def.schema._parseSync({data:a,path:r.path,parent:r});return s.status==="aborted"?Le:s.status==="dirty"||n.value==="dirty"?Ua(s.value):s}}if(o.type==="refinement"){const a=s=>{const l=o.refinement(s,i);if(r.common.async)return Promise.resolve(l);if(l instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return s};if(r.common.async===!1){const s=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return s.status==="aborted"?Le:(s.status==="dirty"&&n.dirty(),a(s.value),{status:n.value,value:s.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(s=>s.status==="aborted"?Le:(s.status==="dirty"&&n.dirty(),a(s.value).then(()=>({status:n.value,value:s.value}))))}if(o.type==="transform")if(r.common.async===!1){const a=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!ki(a))return Le;const s=o.transform(a.value,i);if(s instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:s}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(a=>ki(a)?Promise.resolve(o.transform(a.value,i)).then(s=>({status:n.value,value:s})):Le);et.assertNever(o)}}Pi.create=(e,t,n)=>new Pi({schema:e,typeName:Ve.ZodEffects,effect:t,...Ue(n)}),Pi.createWithPreprocess=(e,t,n)=>new Pi({schema:t,effect:{type:"preprocess",transform:e},typeName:Ve.ZodEffects,...Ue(n)});class Hr extends Xe{_parse(t){return this._getType(t)===Ee.undefined?Tn(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Hr.create=(e,t)=>new Hr({innerType:e,typeName:Ve.ZodOptional,...Ue(t)});class Oi extends Xe{_parse(t){return this._getType(t)===Ee.null?Tn(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Oi.create=(e,t)=>new Oi({innerType:e,typeName:Ve.ZodNullable,...Ue(t)});class Oh extends Xe{_parse(t){const{ctx:n}=this._processInputParams(t);let r=n.data;return n.parsedType===Ee.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}Oh.create=(e,t)=>new Oh({innerType:e,typeName:Ve.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...Ue(t)});class _h extends Xe{_parse(t){const{ctx:n}=this._processInputParams(t),r={...n,common:{...n.common,issues:[]}},o=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return uc(o)?o.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new gr(r.common.issues)},input:r.data})})):{status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new gr(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}_h.create=(e,t)=>new _h({innerType:e,typeName:Ve.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...Ue(t)});class DE extends Xe{_parse(t){if(this._getType(t)!==Ee.nan){const r=this._getOrReturnCtx(t);return ye(r,{code:ge.invalid_type,expected:Ee.nan,received:r.parsedType}),Le}return{status:"valid",value:t.data}}}DE.create=e=>new DE({typeName:Ve.ZodNaN,...Ue(e)});class J3 extends Xe{_parse(t){const{ctx:n}=this._processInputParams(t),r=n.data;return this._def.type._parse({data:r,path:n.path,parent:n})}unwrap(){return this._def.type}}class Mh extends Xe{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.common.async)return(async()=>{const i=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return i.status==="aborted"?Le:i.status==="dirty"?(n.dirty(),Ua(i.value)):this._def.out._parseAsync({data:i.value,path:r.path,parent:r})})();{const o=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return o.status==="aborted"?Le:o.status==="dirty"?(n.dirty(),{status:"dirty",value:o.value}):this._def.out._parseSync({data:o.value,path:r.path,parent:r})}}static create(t,n){return new Mh({in:t,out:n,typeName:Ve.ZodPipeline})}}class Dh extends Xe{_parse(t){const n=this._def.innerType._parse(t),r=o=>(ki(o)&&(o.value=Object.freeze(o.value)),o);return uc(n)?n.then(o=>r(o)):r(n)}unwrap(){return this._def.innerType}}Dh.create=(e,t)=>new Dh({innerType:e,typeName:Ve.ZodReadonly,...Ue(t)});var Ve;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(Ve||(Ve={})),Br.create,ir.create,fc.create,pc.create,Co.create,Ai.create,hc.create,Hr.create,Oi.create;const eH=e=>{if(typeof e!="string")try{e=JSON.stringify(e)}catch{return!1}try{return JSON.parse(e),!0}catch{return!1}},tH=(e,t,n)=>{const r=t.length-1;for(let o=0;o<t.length;o++){const i=t[o];if(o===r)e[i]=n;else{if(!(i in e)||typeof e[i]!="object"){const a=t[o+1];e[i]=isNaN(Number(a))?{}:[]}e=e[i]}}},NE=e=>e.replace(/\[(\d+)]/g,".$1").split("."),mn=(e,t,n)=>{const r=Array.isArray(t)?t.map(String):NE(t),o=structuredClone(e);return tH(o,r,n),o},nH=(e,t)=>e.localeCompare(t),_i={},FE=e=>{const t=e._def.typeName;if(t==="ZodDefault")return e._def.defaultValue();if(t==="ZodObject")return LE(e);if(t==="ZodArray")return[];if("innerType"in e._def){const n=FE(e._def.innerType);return t==="ZodArray"?n??[]:n}},LE=e=>Object.fromEntries(Object.entries(e.shape).map(([t,n])=>[t,FE(n)])),VE=(e,t)=>{const n=structuredClone(e);for(const r in t){const o=t[r],i=e[r];o!==void 0&&(typeof o=="object"&&o!==null&&!Array.isArray(o)&&typeof i=="object"&&i!==null&&!Array.isArray(i)?n[r]=VE(i,o):n[r]=o||i)}return n},rH={sort:nH,allowDots:!0,charset:"utf-8",parseArrays:!0,plainObjects:!0,charsetSentinel:!0,allowPrototypes:!1,depth:Number.MAX_SAFE_INTEGER,arrayLimit:Number.MAX_SAFE_INTEGER,parameterLimit:Number.MAX_SAFE_INTEGER},$E=e=>{const t=new FormData(e),n=new URLSearchParams(t);return I3.parse(n.toString(),rH)},Wr=(e,t)=>NE(e).reduce((n,r)=>{if(r==="")return n;const o=n.shape?.[r]||n;return o._def.typeName==="ZodArray"?o.element:o},t),qr=e=>e.dataset.value?e.dataset.value:e.type==="checkbox"?e.checked:e.type==="number"?e.valueAsNumber:e.value||e.getAttribute("value"),Nh=e=>{const t=e.dataset.target;if(!t)return qr(e);const n=document.querySelector(`[data-origin="${t}"]`);return qr(n||e)},oH={state:{},loading:!1,useOnChange:!1},zE=e=>e.dataset.target||e.name,iH=e=>{const t=`@use-form/${e}`;return{get:()=>{const n=za.LocalStorage.get(t);return eH(n)?n:{}},clear:()=>{za.LocalStorage.delete(t)},set:n=>za.LocalStorage.set(t,n)}},aH=(e,t,n=oH)=>{const[r,o]=S.useState(null),i=S.useRef({}),[a,s]=S.useState(()=>Re.function(n?.state)?n.state():n?.state??LE(e)??{}),l=S.useCallback(b=>{const E=b.target,T=b.currentTarget;if(E.dataset.optional==="true")return;const w=zE(E),k=Nh(E)||(T?qr(T):""),P=Wr(w,e);if(E.setAttribute("data-initialized","true"),P){const _=P.safeParse(k),F=_.success?void 0:_.error.issues[0]?.message??"";o(V=>mn(V??{},w,F))}},[e]),c=S.useCallback(b=>E=>{const T=E.currentTarget,I=Object.values(i.current).reduce((k,P)=>{const _=P.element,F=P.schema.safeParse(qr(_));if(_.dataset.ignore==="ignore"||F.success)return k;const V=F.error.issues[0]?.message;_.setAttribute("data-initialized","true");const D=_.dataset.name||_.name||"";return mn(k,D,V)},{}),w=Re.empty(I)?null:I;o(w),console.error(w),b?.({form:T,errors:w||{}})},[]),u=(b,E=_i)=>{const T=Wr(b,e),I=w=>{if(!Zl(w))return;s(P=>mn(P,b,w.toISOString())),o(P=>mn(P,b,void 0));const k=i.current[b].element;if(k){const P=k.getAttribute("data-origin"),_=document.querySelector(`input[data-target="${P}"]`);_&&_.setCustomValidity("")}E?.onChange?.(w)};return{...E,loading:n.loading,name:b,id:b,onChange:I,form:t,date:Re.string(a[b])?new Date(a[b]):a[b],required:E.required??!T.isOptional(),error:Rn(r,b),ref:w=>{w!==null&&(i.current[b]={element:w,schema:T})}}},d=(b,E=_i)=>{const T=Wr(b,e);return{...E,name:b,id:b,onChange:w=>{const k=w.target.value;s(P=>mn(P,b,k)),E?.onChange?.(w)},form:t,loading:n.loading,onInvalid:l,error:Rn(r,b,void 0),value:Rn(a,b,void 0)??"",required:E.required??!T.isOptional(),ref:w=>w!==null?i.current[b]={element:w,schema:T}:void 0}},f=(b,E=_i)=>{const T=Wr(b,e);return{...E,name:b,id:b,onChange:w=>{const k=w.target.checked;s(P=>mn(P??{},b,k)),E?.onChange?.(w)},form:t,loading:n.loading,onInvalid:l,error:Rn(r,b,void 0),required:E.required??!T.isOptional(),ref:w=>w!==null?void(i.current[b]={element:w,schema:T}):void 0}},p=(b,E=_i)=>{const T=Wr(b,e),I=w=>{w.persist?.();const k=w.target.value;E?.onChange?.(w),s(P=>mn(P,b,k))};return{...E,loading:n.loading,name:b,id:b,onChange:I,form:t,onInvalid:l,error:Rn(r,b,void 0),required:E.required??!T.isOptional(),value:Rn(a,b,void 0)||E?.value||"",type:Re.instance(T,Ci)?"number":E?.type??"text",ref:w=>w===null?void 0:i.current[b]={element:w,schema:T}}},v=(b,E=_i)=>{const T=Wr(b,e);return{...E,name:b,id:b,onChangeOptions:w=>{s(k=>mn(k,b,w))},form:t,loading:n.loading,onInvalid:l,error:Rn(r,b,void 0),required:E.required??!T.isOptional(),value:Rn(a,b,void 0)||E?.value||[],ref:w=>w===null?void 0:void(i.current[b]={element:w,schema:T})}},h=(b,E=_i)=>{const T=Wr(b,e),I=T._def.typeName==="ZodNumber";return{...E,name:b,id:b,onChange:k=>{k.persist?.();const P=I?k.target.valueAsNumber:k.target.value;E?.onChange?.(k),s(_=>mn(_,b,P))},form:t,loading:n.loading,onInvalid:l,error:Rn(r,b,void 0),required:E.required??!T.isOptional(),type:I?"number":E?.type??"text",value:Rn(a,b,void 0)||E?.value||"",ref:k=>k===null?void 0:void(i.current[b]={element:k,schema:T})}};S.useEffect(()=>{const b=Object.values(i.current).map(T=>{const I=T.element.dataset.origin?document.querySelector(`[data-target="${T.element.name}"]`):T.element,w=T.schema.safeParse(qr(I)),k=V=>{const D=zE(V.target);if(!D)return!1;const O=V.target,N=Nh(V.target)||(V.relatedTarget?qr(V.relatedTarget):""),z=T.schema.safeParse(N);if(O.setAttribute("value",N),z.success)return I.setCustomValidity&&I.setCustomValidity(""),o(M=>{if(Re.null(M))return null;const C=mn(M,D,void 0);return Re.empty(M)||Re.nil(M)||Re.empty(C)?null:C}),!1;if(I.required){const M=z.error.issues[0]?.message||"";I.setCustomValidity&&I.setCustomValidity(M),o(C=>{if(Re.null(C))return null;const L=mn(C,D,M||void 0);return Re.empty(L)?null:L})}return!1},P=new AbortController,_=I.getAttribute("data-trigger")||"blur";I.addEventListener(_,k,{signal:P.signal});const F=I.dataset.shadow?!1:I.required?!w.success:!1;return{input:T,hasInitialError:F,unsubscribe:()=>P.abort()}});return b.some(T=>T.hasInitialError)&&o(T=>T===null?{}:T),()=>b.forEach(T=>T.unsubscribe())});const m=b=>E=>{E.preventDefault();const T=E.currentTarget;let I=$E(T);Array.from(t?document.querySelectorAll(`[form="${t}"]`):T.elements).forEach(F=>{if(F.tagName==="SELECT"){const V=F;I=mn(I,V.name,V.value)}if(F.tagName==="INPUT"){const V=F,D=Nh(V)||(V?qr(V):"");I=mn(I,V.dataset.target||V.name,D)}});const k=VE(I,a),P=e.safeParse(k),_=()=>{lE(T),n.interceptor?.clear()};if(P.success){const F=JSON.stringify(P.data);return T.setAttribute("data-json",F),n.interceptor?.clear(),b?.(E,{form:T,event:E,reset:_,setErrors:o,errors:[],success:!0,data:P.data,json:P.data})}return console.group("useForm error"),console.info(P),console.info(P.error.issues),console.error(P.error),console.groupEnd(),T.reportValidity(),b?.(E,{form:T,json:I,event:E,reset:_,setErrors:o,data:I,success:!1,errors:P.error.issues.map(F=>({message:F.message,path:F.path.map(V=>String(V))}))})},y=b=>Ju(a,b)||"",x=b=>({...b,id:t,name:t});return S.useEffect(()=>{n.interceptor&&n.interceptor?.set(a)},[a]),{get:y,input:h,state:a,errors:r,select:d,checkbox:f,onSubmit:m,setState:s,textarea:p,onInvalid:c,controller:x,datepicker:u,name:t,multiselect:v,disabled:r!==null}},sH=e=>e?JSON.parse(e.getAttribute("data-json")):{},lH=e=>{const t=S.useRef(void 0);return S.useEffect(()=>{t.current=e},[e]),t.current},jE={button:"0.55rem",pill:"2rem",card:"0.75rem",full:"9999px"},RE={base:"1rem",hairline:"0.0625rem",lg:"1.125rem",sm:"0.75rem","field-height":"1.5rem","field-label":"0.875rem","input-height":"2.5rem","input-x":"0.5rem","input-y":"0.25rem","input-inline":"0.25rem","input-gap":"0.3rem"},BE={wizard:"50",normal:"1",navbar:"22",calendar:"2",overlay:"21",tooltip:"20",floating:"22"},cH={name:"dark",zIndex:BE,rounded:jE,spacing:RE,shadow:{"shadow-notification":"1px 2px 2px 2px hsla(210, 15%, 20%, 0.15)","shadow-floating":"0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)","shadow-card":"0px 1px 1px 1px hsla(210, 25%, 20%, 0.1)","shadow-table":"0px 1px 1px 1px hsla(210, 25%, 20%, 0.1)"},colors:{foreground:"hsla(210, 50%, 98%)",background:"hsla(0, 0%, 9%)",border:"hsla(240, 7%, 27%)",muted:"hsla(210, 10%, 40%)",disabled:"hsla(240, 4%, 33%)",emphasis:{foreground:"hsla(251, 91%, 95%)",DEFAULT:"hsla(255, 92%, 76%)",subtle:"hsla(252, 95%, 85%)",hover:"hsla(262, 83%, 58%)"},primary:{foreground:"hsla(210, 40%, 98%)",DEFAULT:"hsla(200,98%,39%)",subtle:"hsla(199, 95%, 87%)",hover:"hsla(199, 97%, 40%)"},secondary:{DEFAULT:"hsla(210, 32%, 70%)",background:"hsla(210, 30%, 81%)",subtle:"hsla(210, 27%, 88%)",hover:"hsla(210, 10%, 58%)",foreground:"hsla(210, 20%, 30%)"},info:{DEFAULT:"hsla(219, 91%, 59%)",subtle:"hsla(219, 93%, 77%)",hover:"hsla(219, 83%, 41%)",foreground:"hsla(210, 40%, 98%)",notification:"hsla(219, 91%, 59%)"},warn:{DEFAULT:"hsla(27, 96%, 61%)",subtle:"hsla(45, 95%, 66%)",hover:"hsla(21, 90%, 48%)",foreground:"hsla(210, 40%, 98%)",notification:"hsla(32, 65%, 75%)"},danger:{DEFAULT:"hsla(358, 65%, 57%)",subtle:"hsla(0, 94%, 81%)",hover:"hsla(0, 82%, 47%)",foreground:"hsla(210, 40%, 98%)",notification:"hsla(358, 40%, 23%)"},success:{DEFAULT:"hsla(160, 73%, 36%)",subtle:"hsla(160, 75%, 75%)",hover:"hsla(160, 91%, 27%)",foreground:"hsla(160, 91%, 50%)",notification:"hsla(160,90%,5%)"},input:{border:"hsla(240, 4%, 25%)",placeholder:"hsla(210, 24%, 71%)","mask-error":"hsla(0, 94%, 81%)","switch-bg":"hsla(0, 0%, 9%)",switch:"hsla(0, 0%, 100%)",slider:"hsla(0, 0%, 100%)"},card:{muted:"hsla(0, 0%, 22%)",border:"hsla(240, 7%, 20%)",background:"hsla(0, 0%, 15%)"},floating:{foreground:"hsla(210, 40%, 98%)",background:"hsla(219, 15%, 12%)",hover:"hsla(221, 10%, 22%)",border:"hsla(240, 7%, 17%)",overlay:"hsla(0, 0%, 0%)"},tooltip:{foreground:"hsla(210, 40%, 98%)",background:"hsla(221, 5%, 15%)",hover:"hsla(221, 10%, 35%)",border:"hsla(0, 0%, 19%)",overlay:"hsla(0, 0%, 0%)"},table:{header:"hsla(0, 0%, 12%)",border:"hsla(240, 4%, 20%)",background:"hsla(0, 0%, 15%)"},button:{primary:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)"},warn:{text:"hsla(26,100%,67%)",bg:"hsla(37,100%,15%)"},info:{text:"hsla(200,80%,70%)",bg:"hsla(206,66%,24%)"},success:{text:"hsla(151,65%,54%)",bg:"hsla(154,52%,19%)"},danger:{text:"hsla(2,100%,90%)",bg:"hsla(5,62%,23%)"},muted:{text:"hsla(0, 100%, 100%)",bg:"hsla(0, 0%, 12%)"},neutral:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)"},secondary:{text:"hsla(216,10%,90%)",bg:"hsla(214,7%,19%)"}},tag:{primary:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)"},warn:{text:"hsla(26,100%,67%)",bg:"hsla(37,100%,15%)"},info:{text:"hsla(200,80%,70%)",bg:"hsla(206,66%,24%)"},success:{text:"hsla(151,65%,54%)",bg:"hsla(154,52%,19%)"},danger:{text:"hsla(2,100%,79%)",bg:"hsla(5,62%,23%)"},neutral:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)"},secondary:{text:"hsla(216,10%,90%)",bg:"hsla(214,7%,19%)"},muted:{text:"hsla(0, 100%, 100%)",bg:"hsla(0, 0%, 12%)"}},alert:{primary:{text:"hsla(210,100%,72%)",border:"hsla(212,69%,16%)",bg:"hsla(215,42%,9%)"},warn:{bg:"hsla(28,33%,9%)",border:"hsla(29,65%,12%)",text:"hsla(27,100%,78%)"},info:{text:"hsla(253,100%,83%)",bg:"hsla(263,28%,11%)",border:"hsla(252,34%,51%)"},success:{text:"hsla(144,79%,79%)",bg:"hsla(153,20%,9%)",border:"hsla(144,70%,14%)"},danger:{text:"hsla(350,100%,91%)",bg:"hsla(355,25%,15%)",border:"hsla(355,25%,10%)"},neutral:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)",border:"hsla(200,90%,89%)"},secondary:{text:"hsla(220,9%,94%)",bg:"hsla(220,6%,10%)",border:"hsla(214,7%,19%)"},muted:{bg:"hsla(0, 0%, 12%)",border:"hsla(0, 0%, 40%)",text:"hsla(0, 100%, 100%)"}}}},uH={rounded:jE,spacing:RE,name:"light",shadow:{"shadow-notification":"1px 2px 2px 2px hsla(210, 25%, 40%, 0.15)","shadow-floating":"0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)","shadow-card":"0px 1px 2px 1px hsla(210, 25%, 20%, 0.1)","shadow-table":"0px 1px 1px 1px hsla(210, 0%, 0%, 0.1)"},zIndex:BE,colors:{foreground:"hsla(217, 15%, 30%)",background:"hsla(210, 40%, 98%)",border:"hsla(210, 25%, 88%)",muted:"hsla(210, 30%, 86%)",disabled:"hsla(240, 10%, 78%)",emphasis:{foreground:"hsla(251,91%,95%)",DEFAULT:"hsla(255,92%,76%)",subtle:"hsla(252,95%,85%)",hover:"hsla(262,83%,58%)"},primary:{foreground:"hsla(210, 40%, 98%)",DEFAULT:"hsla(199, 89%, 54%)",subtle:"hsla(199, 95%, 87%)",hover:"hsla(199, 97%, 40%)"},secondary:{background:"hsla(210, 25%, 35%)",DEFAULT:"hsla(210, 25%, 45%)",subtle:"hsla(207, 29%, 39%)",hover:"hsla(210, 21%, 67%)",foreground:"hsla(210, 40%, 98%)"},info:{DEFAULT:"hsla(219, 91%, 59%)",subtle:"hsla(219, 70%, 90%)",hover:"hsla(219, 83%, 41%)",foreground:"hsla(210, 34%, 96%)",notification:"hsla(219, 91%, 59%)"},danger:{DEFAULT:"hsla(0, 82%, 63%)",subtle:"hsla(0, 96%, 95%)",hover:"hsla(0, 82%, 47%)",foreground:"hsla(210, 34%, 96%)",notification:"hsla(0, 100%, 87%)"},warn:{DEFAULT:"hsla(27, 100%, 70%)",subtle:"hsla(45, 95%, 80%)",hover:"hsla(29, 85%, 50%)",foreground:"hsla(210, 34%, 96%)",notification:"hsla(27, 85%, 92%)"},success:{DEFAULT:"hsla(160, 73%, 36%)",subtle:"hsla(160, 75%, 90%)",hover:"hsla(160, 91%, 27%)",foreground:"hsla(160, 91%, 17%)",notification:"hsla(160, 75%, 80%)"},input:{border:"hsla(218, 22%, 85%)",placeholder:"hsla(210, 24%, 71%)","mask-error":"hsla(0, 94%, 81%)","switch-bg":"hsla(0, 0%, 45%)",switch:"hsla(0, 0%, 100%)",slider:"hsla(0, 0%, 100%)"},card:{muted:"hsla(210, 25%, 94%)",border:"hsla(210, 25%, 95%)",background:"hsla(0, 0%, 100%)"},floating:{foreground:"hsla(217, 15%, 20%)",background:"hsla(0, 0%, 100%)",hover:"hsla(0, 0%, 92%)",border:"hsla(210, 25%, 88%)",overlay:"hsla(0, 0%, 0%)"},tooltip:{foreground:"hsla(217, 15%, 20%)",background:"hsla(210, 25%, 98%)",hover:"hsla(210, 25%, 92%)",border:"hsla(200, 1%, 80%)",overlay:"hsla(0, 0%, 0%)"},table:{header:"hsla(210, 20%, 98%)",background:"hsla(0, 0%, 100%)",border:"hsla(210, 20%, 92%)"},button:{muted:{bg:"hsla(210, 30%, 86%)",text:"hsla(210, 10%, 15%)"},primary:{text:"hsla(0, 0%, 100%)",bg:"hsla(207,96%,48%)"},warn:{bg:"hsla(26,90%,60%)",text:"hsla(0, 0%, 100%)"},info:{text:"hsla(0, 0%, 100%)",bg:"hsla(210,60%,60%)"},success:{text:"hsla(0, 0%, 100%)",bg:"hsla(152,56%,39%)"},danger:{text:"hsla(0, 0%, 100%)",bg:"hsla(10,78%,54%)"},neutral:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)"},secondary:{text:"hsla(216,10%,90%)",bg:"hsla(214,7%,19%)"}},tag:{muted:{bg:"hsla(210, 30%, 92%)",text:"hsla(210, 10%, 25%)"},primary:{text:"hsla(0, 0%, 100%)",bg:"hsla(207,70%,55%)"},warn:{bg:"hsla(30,100%,82%)",text:"hsla(23,100%,40%)"},info:{text:"hsla(196,100%,20%)",bg:"hsla(197,65%,80%)"},success:{text:"hsla(154,52%,19%)",bg:"hsla(152,56%,80%)"},danger:{text:"hsla(10,82%,45%)",bg:"hsla(359,94%,92%)"},neutral:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)"},secondary:{text:"hsla(216,10%,90%)",bg:"hsla(214,7%,19%)"}},alert:{muted:{bg:"hsla(210, 30%, 86%)",text:"hsla(210, 30%, 86%)",border:"hsla(210, 10%, 70%)"},primary:{text:"hsla(206,70%,50%)",border:"hsla(206,90%,89%)",bg:"hsla(205,92%,95%)"},warn:{bg:"hsla(23,100%,96%)",text:"hsla(23,93%,53%)",border:"hsla(33,100%,85%)"},info:{text:"hsla(252,56%,57%)",bg:"hsla(256,100%,95%)",border:"hsla(252,76%,84%)"},success:{text:"hsla(152,56%,39%)",bg:"hsla(139,47%,93%)",border:"hsla(152,58%,78%)"},danger:{text:"hsla(358,69%,55%)",bg:"hsla(357,90%,96%)",border:"hsla(359,100%,90%)"},neutral:{text:"hsla(200,98%,60%)",bg:"hsla(200,28%,19%)",border:"hsla(200,90%,89%)"},secondary:{text:"hsla(216,10%,10%)",bg:"hsla(214,7%,92%)",border:"hsla(216,22%,78%)"}}}},dH=cH,fH=uH,pH=e=>{const t=S.useMemo(()=>({locale:e.locale,floatingRef:e.rootFloating,tweaks:{...ds,...e.tweaks},parser:e.parser||ls.hsla,map:{...us,...e.map}}),[e]);return g.jsx(Kr.Provider,{value:t,children:e.children})};ae.Alert=z$,ae.AnimatedList=T$,ae.AnimatedListItem=E$,ae.Autocomplete=k4,ae.Button=ro,ae.Calendar=HS,ae.Card=Hl,ae.Checkbox=$p,ae.ColType=gi,ae.Collapse=sS,ae.CommandPalette=S3,ae.ComponentsProvider=pH,ae.Context=Kr,ae.DatePicker=KR,ae.Description=dz,ae.Dict=zn,ae.Dropdown=mi,ae.Empty=G1,ae.Expand=mz,ae.FileUpload=m4,ae.Form=wC,ae.Info=fz,ae.Input=Wo,ae.InputFeedback=sy,ae.InputField=Xi,ae.Loading=hz,ae.Menu=X$,ae.MenuItem=Z$,ae.Modal=jp,ae.MultiSelect=M4,ae.Notifications=f3,ae.PageHeader=pz,ae.PageTitle=mS,ae.Paragraph=uz,ae.Polymorph=ln,ae.Progress=HR,ae.Radiobox=Q$,ae.RenderOnView=V4,ae.Select=oo,ae.Slider=d_,ae.Spinner=gS,ae.Stats=j$,ae.StatsCard=w$,ae.Step=_$,ae.Steps=M$,ae.Switch=f_,ae.Tab=L$,ae.Table=x$,ae.Tabs=N$,ae.Tag=ts,ae.TaskList=cz,ae.Textarea=J$,ae.Timeline=WR,ae.TimelineItem=Ql,ae.Toolbar=qR,ae.Tooltip=td,ae.TransferList=F4,ae.Wizard=xz,ae.createColumns=HV,ae.createCssProperties=uI,ae.createDesignTokens=Og,ae.createFormStorage=iH,ae.createOptionCols=Op,ae.createStyles=sI,ae.createTheme=cI,ae.createTokenStyles=dI,ae.css=Oe,ae.defaultDarkTheme=dH,ae.defaultLightTheme=fH,ae.defaultTranslations=us,ae.defaultTweaks=ds,ae.dispatchInput=cg,ae.formReset=lE,ae.formToJson=$E,ae.getCoords=vC,ae.getJsonForm=sH,ae.getModalScrollerRef=YV,ae.getRemainingSize=$i,ae.getSchemaShape=Wr,ae.hasVerticalScroll=ug,ae.initializeInputDataset=Vi,ae.isMobile=ay,ae.isReactComponent=gC,ae.isReactFC=du,ae.isSsr=Cr,ae.mergeRefs=sr,ae.negate=IP,ae.noop=Ho,ae.parsers=ls,ae.path=Ju,ae.reduceTokens=yr,ae.safeRegex=ed,ae.splitInto=iy,ae.useColorParser=Q1,ae.useForm=aH,ae.useLocale=sl,ae.useNotification=l3,ae.usePrevious=lH,ae.useReactive=tS,ae.useStableRef=Pr,ae.useStepContext=eS,ae.useSwipe=VS,ae.useTablePreferences=UV,ae.useTranslations=Pt,ae.uuid=Bo,Object.defineProperty(ae,Symbol.toStringTag,{value:"Module"})}));
15
+ `),()=>{E.contains(T)&&E.removeChild(T)}},[t]),p.jsx(v2,{isPresent:t,childRef:a,sizeRef:l,pop:i,children:i===!1?e:P.cloneElement(e,{ref:d})})}const x2=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:o,presenceAffectsLayout:i,mode:s,anchorX:a,anchorY:l,root:c})=>{const u=Qn(w2),d=S.useId();let f=!0,h=S.useMemo(()=>(f=!1,{id:d,initial:t,isPresent:n,custom:o,onExitComplete:g=>{u.set(g,!0);for(const y of u.values())if(!y)return;r&&r()},register:g=>(u.set(g,!1),()=>u.delete(g))}),[n,u,r]);return i&&f&&(h={...h}),S.useMemo(()=>{u.forEach((g,y)=>u.set(y,!1))},[n]),P.useEffect(()=>{!n&&!u.size&&r&&r()},[n]),e=p.jsx(b2,{pop:s==="popLayout",isPresent:n,anchorX:a,anchorY:l,root:c,children:e}),p.jsx(wl.Provider,{value:h,children:e})};function w2(){return new Map}function lw(e=!0){const t=S.useContext(wl);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:o}=t,i=S.useId();S.useEffect(()=>{if(e)return o(i)},[e]);const s=S.useCallback(()=>e&&r&&r(i),[i,r,e]);return!n&&r?[!1,s]:[!0]}const Bl=e=>e.key||"";function cw(e){const t=[];return S.Children.forEach(e,n=>{S.isValidElement(n)&&t.push(n)}),t}const gn=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:o=!0,mode:i="sync",propagate:s=!1,anchorX:a="left",anchorY:l="top",root:c})=>{const[u,d]=lw(s),f=S.useMemo(()=>cw(e),[e]),h=s&&!u?[]:f.map(Bl),g=S.useRef(!0),y=S.useRef(f),m=Qn(()=>new Map),v=S.useRef(new Set),[b,x]=S.useState(f),[T,E]=S.useState(f);xl(()=>{g.current=!1,y.current=f;for(let C=0;C<T.length;C++){const A=Bl(T[C]);h.includes(A)?(m.delete(A),v.current.delete(A)):m.get(A)!==!0&&m.set(A,!1)}},[T,h.length,h.join("-")]);const I=[];if(f!==b){let C=[...f];for(let A=0;A<T.length;A++){const O=T[A],_=Bl(O);h.includes(_)||(C.splice(A,0,O),I.push(O))}return i==="wait"&&I.length&&(C=I),E(cw(C)),x(f),null}process.env.NODE_ENV!=="production"&&i==="wait"&&T.length>1&&console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`);const{forceRender:w}=S.useContext(fs);return p.jsx(p.Fragment,{children:T.map(C=>{const A=Bl(C),O=s&&!u?!1:f===T||h.includes(A),_=()=>{if(v.current.has(A))return;if(v.current.add(A),m.has(A))m.set(A,!0);else return;let N=!0;m.forEach($=>{$||(N=!1)}),N&&(w?.(),E(y.current),s&&d?.(),r&&r())};return p.jsx(x2,{isPresent:O,initial:!g.current||n?void 0:!1,custom:t,presenceAffectsLayout:o,mode:i,root:c,onExitComplete:O?void 0:_,anchorX:a,anchorY:l,children:C},A)})})},S2=S.createContext(null);function T2(){const e=S.useRef(!1);return xl(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function E2(){const e=T2(),[t,n]=S.useState(0),r=S.useCallback(()=>{e.current&&n(t+1)},[t]);return[S.useCallback(()=>ht.postRender(r),[r]),t]}const uw=e=>e===!0,C2=e=>uw(e===!0)||e==="id",k2=({children:e,id:t,inherit:n=!0})=>{const r=S.useContext(fs),o=S.useContext(S2),[i,s]=E2(),a=S.useRef(null),l=r.id||o;a.current===null&&(C2(n)&&l&&(t=t?l+"-"+t:l),a.current={id:t,group:uw(n)&&r.group||iw()});const c=S.useMemo(()=>({...a.current,forceRender:i}),[s]);return p.jsx(fs.Provider,{value:c,children:e})},dw=S.createContext({strict:!1}),fw={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]};let pw=!1;function I2(){if(pw)return;const e={};for(const t in fw)e[t]={isEnabled:n=>fw[t].some(r=>!!n[r])};t0(e),pw=!0}function hw(){return I2(),c_()}function A2(e){const t=hw();for(const n in e)t[n]={...t[n],...e[n]};t0(t)}const P2=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","propagate","ignoreStrict","viewport"]);function Rl(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||P2.has(e)}let mw=e=>!Rl(e);function gw(e){typeof e=="function"&&(mw=t=>t.startsWith("on")?!Rl(t):e(t))}try{gw(require("@emotion/is-prop-valid").default)}catch{}function O2(e,t,n){const r={};for(const o in e)o==="values"&&typeof e.values=="object"||(mw(o)||n===!0&&Rl(o)||!t&&!Rl(o)||e.draggable&&o.startsWith("onDrag"))&&(r[o]=e[o]);return r}function Qf({children:e,isValidProp:t,...n}){t&&gw(t);const r=S.useContext(xo);n={...r,...n},n.transition=Tf(n.transition,r.transition),n.isStatic=Qn(()=>n.isStatic);const o=S.useMemo(()=>n,[JSON.stringify(n.transition),n.transformPagePoint,n.reducedMotion,n.skipAnimations]);return p.jsx(xo.Provider,{value:o,children:e})}const Hl=S.createContext({});function D2(e,t){if(_l(e)){const{initial:n,animate:r}=e;return{initial:n===!1||Ts(n)?n:void 0,animate:Ts(r)?r:void 0}}return e.inherit!==!1?t:{}}function N2(e){const{initial:t,animate:n}=D2(e,S.useContext(Hl));return S.useMemo(()=>({initial:t,animate:n}),[yw(t),yw(n)])}function yw(e){return Array.isArray(e)?e.join(" "):e}const Jf=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function vw(e,t,n){for(const r in t)!zt(t[r])&&!m0(r,n)&&(e[r]=t[r])}function M2({transformTemplate:e},t){return S.useMemo(()=>{const n=Jf();return Uf(n,t,e),Object.assign({},n.vars,n.style)},[t])}function _2(e,t){const n=e.style||{},r={};return vw(r,n,e),Object.assign(r,M2(e,t)),r}function F2(e,t){const n={},r=_2(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}const bw=()=>({...Jf(),attrs:{}});function L2(e,t,n,r){const o=S.useMemo(()=>{const i=bw();return y0(i,t,b0(r),e.transformTemplate,e.style),{...i.attrs,style:{...i.style}}},[t]);if(e.style){const i={};vw(i,e.style,e),o.style={...i,...o.style}}return o}const V2=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function ep(e){return typeof e!="string"||e.includes("-")?!1:!!(V2.indexOf(e)>-1||/[A-Z]/u.test(e))}function $2(e,t,n,{latestValues:r},o,i=!1,s){const l=(s??ep(e)?L2:F2)(t,r,o,e),c=O2(t,typeof e=="string",i),u=e!==S.Fragment?{...c,...l,ref:n}:{},{children:d}=t,f=S.useMemo(()=>zt(d)?d.get():d,[d]);return S.createElement(e,{...u,children:f})}function z2({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,o){return{latestValues:j2(n,r,o,e),renderState:t()}}function j2(e,t,n,r){const o={},i=r(e,{});for(const f in i)o[f]=zl(i[f]);let{initial:s,animate:a}=e;const l=_l(e),c=Qx(e);t&&c&&!l&&e.inherit!==!1&&(s===void 0&&(s=t.initial),a===void 0&&(a=t.animate));let u=n?n.initial===!1:!1;u=u||s===!1;const d=u?a:s;if(d&&typeof d!="boolean"&&!Ml(d)){const f=Array.isArray(d)?d:[d];for(let h=0;h<f.length;h++){const g=kf(e,f[h]);if(g){const{transitionEnd:y,transition:m,...v}=g;for(const b in v){let x=v[b];if(Array.isArray(x)){const T=u?x.length-1:0;x=x[T]}x!==null&&(o[b]=x)}for(const b in y)o[b]=y[b]}}}return o}const xw=e=>(t,n)=>{const r=S.useContext(Hl),o=S.useContext(wl),i=()=>z2(e,t,r,o);return n?i():Qn(i)},B2=xw({scrapeMotionValuesFromProps:Yf,createRenderState:Jf}),R2=xw({scrapeMotionValuesFromProps:x0,createRenderState:bw}),H2=Symbol.for("motionComponentSymbol");function W2(e,t,n){const r=S.useRef(n);S.useInsertionEffect(()=>{r.current=n});const o=S.useRef(null);return S.useCallback(i=>{i&&e.onMount?.(i),t&&(i?t.mount(i):t.unmount());const s=r.current;if(typeof s=="function")if(i){const a=s(i);typeof a=="function"&&(o.current=a)}else o.current?(o.current(),o.current=null):s(i);else s&&(s.current=i)},[t])}const ww=S.createContext({});function gi(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function q2(e,t,n,r,o,i){const{visualElement:s}=S.useContext(Hl),a=S.useContext(dw),l=S.useContext(wl),c=S.useContext(xo),u=c.reducedMotion,d=c.skipAnimations,f=S.useRef(null),h=S.useRef(!1);r=r||a.renderer,!f.current&&r&&(f.current=r(e,{visualState:t,parent:s,props:n,presenceContext:l,blockInitialAnimation:l?l.initial===!1:!1,reducedMotionConfig:u,skipAnimations:d,isSVG:i}),h.current&&f.current&&(f.current.manuallyAnimateOnMount=!0));const g=f.current,y=S.useContext(ww);g&&!g.projection&&o&&(g.type==="html"||g.type==="svg")&&U2(f.current,n,o,y);const m=S.useRef(!1);S.useInsertionEffect(()=>{g&&m.current&&g.update(n,l)});const v=n[Nx],b=S.useRef(!!v&&!window.MotionHandoffIsComplete?.(v)&&window.MotionHasOptimisedAnimation?.(v));return xl(()=>{h.current=!0,g&&(m.current=!0,window.MotionIsMounted=!0,g.updateFeatures(),g.scheduleRenderMicrotask(),b.current&&g.animationState&&g.animationState.animateChanges())}),S.useEffect(()=>{g&&(!b.current&&g.animationState&&g.animationState.animateChanges(),b.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(v)}),b.current=!1),g.enteringChildren=void 0)}),g}function U2(e,t,n,r){const{layoutId:o,layout:i,drag:s,dragConstraints:a,layoutScroll:l,layoutRoot:c,layoutCrossfade:u}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:Sw(e.parent)),e.projection.setOptions({layoutId:o,layout:i,alwaysMeasureLayout:!!s||a&&gi(a),visualElement:e,animationType:typeof i=="string"?i:"both",initialPromotionConfig:r,crossfade:u,layoutScroll:l,layoutRoot:c})}function Sw(e){if(e)return e.options.allowProjection!==!1?e.projection:Sw(e.parent)}function tp(e,{forwardMotionProps:t=!1,type:n}={},r,o){r&&A2(r);const i=n?n==="svg":ep(e),s=i?R2:B2;function a(c,u){let d;const f={...S.useContext(xo),...c,layoutId:G2(c)},{isStatic:h}=f,g=N2(c),y=s(c,h);if(!h&&Eb){Y2(f,r);const m=K2(f);d=m.MeasureLayout,g.visualElement=q2(e,y,f,o,m.ProjectionNode,i)}return p.jsxs(Hl.Provider,{value:g,children:[d&&g.visualElement?p.jsx(d,{visualElement:g.visualElement,...f}):null,$2(e,c,W2(y,g.visualElement,u),y,h,t,i)]})}a.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const l=S.forwardRef(a);return l[H2]=e,l}function G2({layoutId:e}){const t=S.useContext(fs).id;return t&&e!==void 0?t+"-"+e:e}function Y2(e,t){const n=S.useContext(dw).strict;if(process.env.NODE_ENV!=="production"&&t&&n){const r="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";e.ignoreStrict?oi(!1,r,"lazy-strict-mode"):hn(!1,r,"lazy-strict-mode")}}function K2(e){const t=hw(),{drag:n,layout:r}=t;if(!n&&!r)return{};const o={...n,...r};return{MeasureLayout:n?.isEnabled(e)||r?.isEnabled(e)?o.MeasureLayout:void 0,ProjectionNode:o.ProjectionNode}}function Z2(e,t){if(typeof Proxy>"u")return tp;const n=new Map,r=(i,s)=>tp(i,s,e,t),o=(i,s)=>(process.env.NODE_ENV!=="production"&&Sl(!1,"motion() is deprecated. Use motion.create() instead."),r(i,s));return new Proxy(o,{get:(i,s)=>s==="create"?r:(n.has(s)||n.set(s,tp(s,void 0,e,t)),n.get(s))})}const X2=(e,t)=>t.isSVG??ep(e)?new w0(t):new g0(t,{allowProjection:e!==S.Fragment});class Q2 extends jr{constructor(t){super(t),t.animationState||(t.animationState=O_(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Ml(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}}let J2=0;class eF extends jr{constructor(){super(...arguments),this.id=J2++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;const o=this.node.animationState.setActive("exit",!t);n&&!t&&o.then(()=>{n(this.id)})}mount(){const{register:t,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const tF={animation:{Feature:Q2},exit:{Feature:eF}};function Is(e){return{point:{x:e.pageX,y:e.pageY}}}const nF=e=>t=>$f(t)&&e(t,Is(t));function As(e,t,n,r){return ks(e,t,nF(n),r)}const Tw=({current:e})=>e?e.ownerDocument.defaultView:null,Ew=(e,t)=>Math.abs(e-t);function rF(e,t){const n=Ew(e.x,t.x),r=Ew(e.y,t.y);return Math.sqrt(n**2+r**2)}const Cw=new Set(["auto","scroll"]);class kw{constructor(t,n,{transformPagePoint:r,contextWindow:o=window,dragSnapToOrigin:i=!1,distanceThreshold:s=3,element:a}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=h=>{this.handleScroll(h.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const h=rp(this.lastMoveEventInfo,this.history),g=this.startEvent!==null,y=rF(h.offset,{x:0,y:0})>=this.distanceThreshold;if(!g&&!y)return;const{point:m}=h,{timestamp:v}=Yt;this.history.push({...m,timestamp:v});const{onStart:b,onMove:x}=this.handlers;g||(b&&b(this.lastMoveEvent,h),this.startEvent=this.lastMoveEvent),x&&x(this.lastMoveEvent,h)},this.handlePointerMove=(h,g)=>{this.lastMoveEvent=h,this.lastMoveEventInfo=np(g,this.transformPagePoint),ht.update(this.updatePoint,!0)},this.handlePointerUp=(h,g)=>{this.end();const{onEnd:y,onSessionEnd:m,resumeAnimation:v}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&v&&v(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const b=rp(h.type==="pointercancel"?this.lastMoveEventInfo:np(g,this.transformPagePoint),this.history);this.startEvent&&y&&y(h,b),m&&m(h,b)},!$f(t))return;this.dragSnapToOrigin=i,this.handlers=n,this.transformPagePoint=r,this.distanceThreshold=s,this.contextWindow=o||window;const l=Is(t),c=np(l,this.transformPagePoint),{point:u}=c,{timestamp:d}=Yt;this.history=[{...u,timestamp:d}];const{onSessionStart:f}=n;f&&f(t,rp(c,this.history)),this.removeListeners=ps(As(this.contextWindow,"pointermove",this.handlePointerMove),As(this.contextWindow,"pointerup",this.handlePointerUp),As(this.contextWindow,"pointercancel",this.handlePointerUp)),a&&this.startScrollTracking(a)}startScrollTracking(t){let n=t.parentElement;for(;n;){const r=getComputedStyle(n);(Cw.has(r.overflowX)||Cw.has(r.overflowY))&&this.scrollPositions.set(n,{x:n.scrollLeft,y:n.scrollTop}),n=n.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0}),window.addEventListener("scroll",this.onWindowScroll),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(t){const n=this.scrollPositions.get(t);if(!n)return;const r=t===window,o=r?{x:window.scrollX,y:window.scrollY}:{x:t.scrollLeft,y:t.scrollTop},i={x:o.x-n.x,y:o.y-n.y};i.x===0&&i.y===0||(r?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=i.x,this.lastMoveEventInfo.point.y+=i.y):this.history.length>0&&(this.history[0].x-=i.x,this.history[0].y-=i.y),this.scrollPositions.set(t,o),ht.update(this.updatePoint,!0))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),br(this.updatePoint)}}function np(e,t){return t?{point:t(e.point)}:e}function Iw(e,t){return{x:e.x-t.x,y:e.y-t.y}}function rp({point:e},t){return{point:e,delta:Iw(e,Aw(t)),offset:Iw(e,oF(t)),velocity:iF(t,.1)}}function oF(e){return e[0]}function Aw(e){return e[e.length-1]}function iF(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const o=Aw(e);for(;n>=0&&(r=e[n],!(o.timestamp-r.timestamp>mn(t)));)n--;if(!r)return{x:0,y:0};r===e[0]&&e.length>2&&o.timestamp-r.timestamp>mn(t)*2&&(r=e[1]);const i=Tn(o.timestamp-r.timestamp);if(i===0)return{x:0,y:0};const s={x:(o.x-r.x)/i,y:(o.y-r.y)/i};return s.x===1/0&&(s.x=0),s.y===1/0&&(s.y=0),s}function sF(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?bt(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?bt(n,e,r.max):Math.min(e,n)),e}function Pw(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function aF(e,{top:t,left:n,bottom:r,right:o}){return{x:Pw(e.x,n,o),y:Pw(e.y,t,r)}}function Ow(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function lF(e,t){return{x:Ow(e.x,t.x),y:Ow(e.y,t.y)}}function cF(e,t){let n=.5;const r=tn(e),o=tn(t);return o>r?n=ii(t.min,t.max-r,e.min):r>o&&(n=ii(e.min,e.max-o,t.min)),Jn(0,1,n)}function uF(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const op=.35;function dF(e=op){return e===!1?e=0:e===!0&&(e=op),{x:Dw(e,"left","right"),y:Dw(e,"top","bottom")}}function Dw(e,t,n){return{min:Nw(e,t),max:Nw(e,n)}}function Nw(e,t){return typeof e=="number"?e:e[t]||0}const fF=new WeakMap;class pF{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Lt(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:n=!1,distanceThreshold:r}={}){const{presenceContext:o}=this.visualElement;if(o&&o.isPresent===!1)return;const i=d=>{n&&this.snapToCursor(Is(d).point),this.stopAnimation()},s=(d,f)=>{const{drag:h,dragPropagation:g,onDragStart:y}=this.getProps();if(h&&!g&&(this.openDragLock&&this.openDragLock(),this.openDragLock=zM(h),!this.openDragLock))return;this.latestPointerEvent=d,this.latestPanInfo=f,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),tr(v=>{let b=this.getAxisMotionValue(v).get()||0;if(er.test(b)){const{projection:x}=this.visualElement;if(x&&x.layout){const T=x.layout.layoutBox[v];T&&(b=tn(T)*(parseFloat(b)/100))}}this.originPoint[v]=b}),y&&ht.update(()=>y(d,f),!1,!0),Af(this.visualElement,"transform");const{animationState:m}=this.visualElement;m&&m.setActive("whileDrag",!0)},a=(d,f)=>{this.latestPointerEvent=d,this.latestPanInfo=f;const{dragPropagation:h,dragDirectionLock:g,onDirectionLock:y,onDrag:m}=this.getProps();if(!h&&!this.openDragLock)return;const{offset:v}=f;if(g&&this.currentDirection===null){this.currentDirection=mF(v),this.currentDirection!==null&&y&&y(this.currentDirection);return}this.updateAxis("x",f.point,v),this.updateAxis("y",f.point,v),this.visualElement.render(),m&&ht.update(()=>m(d,f),!1,!0)},l=(d,f)=>{this.latestPointerEvent=d,this.latestPanInfo=f,this.stop(d,f),this.latestPointerEvent=null,this.latestPanInfo=null},c=()=>{const{dragSnapToOrigin:d}=this.getProps();(d||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:u}=this.getProps();this.panSession=new kw(t,{onSessionStart:i,onStart:s,onMove:a,onSessionEnd:l,resumeAnimation:c},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u,distanceThreshold:r,contextWindow:Tw(this.visualElement),element:this.visualElement.current})}stop(t,n){const r=t||this.latestPointerEvent,o=n||this.latestPanInfo,i=this.isDragging;if(this.cancel(),!i||!o||!r)return;const{velocity:s}=o;this.startAnimation(s);const{onDragEnd:a}=this.getProps();a&&ht.postRender(()=>a(r,o))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.endPanSession();const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(t,n,r){const{drag:o}=this.getProps();if(!r||!Wl(t,o,this.currentDirection))return;const i=this.getAxisMotionValue(t);let s=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(s=sF(s,this.constraints[t],this.elastic[t])),i.set(s)}resolveConstraints(){const{dragConstraints:t,dragElastic:n}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,o=this.constraints;t&&gi(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=aF(r.layoutBox,t):this.constraints=!1,this.elastic=dF(n),o!==this.constraints&&!gi(t)&&r&&this.constraints&&!this.hasMutatedConstraints&&tr(i=>{this.constraints!==!1&&this.getAxisMotionValue(i)&&(this.constraints[i]=uF(r.layoutBox[i],this.constraints[i]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!gi(t))return!1;const r=t.current;hn(r!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.","drag-constraints-ref");const{projection:o}=this.visualElement;if(!o||!o.layout)return!1;const i=p_(r,o.root,this.visualElement.getTransformPagePoint());let s=lF(o.layout.layoutBox,i);if(n){const a=n(u_(s));this.hasMutatedConstraints=!!a,a&&(s=o0(a))}return s}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:o,dragTransition:i,dragSnapToOrigin:s,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},c=tr(u=>{if(!Wl(u,n,this.currentDirection))return;let d=l&&l[u]||{};s&&(d={min:0,max:0});const f=o?200:1e6,h=o?40:1e7,g={type:"inertia",velocity:r?t[u]:0,bounceStiffness:f,bounceDamping:h,timeConstant:750,restDelta:1,restSpeed:10,...i,...d};return this.startAxisValueAnimation(u,g)});return Promise.all(c).then(a)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return Af(this.visualElement,t),r.start(Cf(t,r,0,n,this.visualElement,!1))}stopAnimation(){tr(t=>this.getAxisMotionValue(t).stop())}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,r=this.visualElement.getProps(),o=r[n];return o||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){tr(n=>{const{drag:r}=this.getProps();if(!Wl(n,r,this.currentDirection))return;const{projection:o}=this.visualElement,i=this.getAxisMotionValue(n);if(o&&o.layout){const{min:s,max:a}=o.layout.layoutBox[n],l=i.get()||0;i.set(t[n]-bt(s,a,.5)+l)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!gi(n)||!r||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};tr(s=>{const a=this.getAxisMotionValue(s);if(a&&this.constraints!==!1){const l=a.get();o[s]=cF({min:l,max:l},this.constraints[s])}});const{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.constraints=!1,this.resolveConstraints(),tr(s=>{if(!Wl(s,t,null))return;const a=this.getAxisMotionValue(s),{min:l,max:c}=this.constraints[s];a.set(bt(l,c,o[s]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;fF.set(this.visualElement,this);const t=this.visualElement.current,n=As(t,"pointerdown",c=>{const{drag:u,dragListener:d=!0}=this.getProps(),f=c.target,h=f!==t&&qM(f);u&&d&&!h&&this.start(c)});let r;const o=()=>{const{dragConstraints:c}=this.getProps();gi(c)&&c.current&&(this.constraints=this.resolveRefConstraints(),r||(r=hF(t,c.current,()=>this.scalePositionWithinConstraints())))},{projection:i}=this.visualElement,s=i.addEventListener("measure",o);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),ht.read(o);const a=ks(window,"resize",()=>this.scalePositionWithinConstraints()),l=i.addEventListener("didUpdate",(({delta:c,hasLayoutChanged:u})=>{this.isDragging&&u&&(tr(d=>{const f=this.getAxisMotionValue(d);f&&(this.originPoint[d]+=c[d].translate,f.set(f.get()+c[d].translate))}),this.visualElement.render())}));return()=>{a(),n(),s(),l&&l(),r&&r()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:o=!1,dragConstraints:i=!1,dragElastic:s=op,dragMomentum:a=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:o,dragConstraints:i,dragElastic:s,dragMomentum:a}}}function Mw(e){let t=!0;return()=>{if(t){t=!1;return}e()}}function hF(e,t,n){const r=Yx(e,Mw(n)),o=Yx(t,Mw(n));return()=>{r(),o()}}function Wl(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function mF(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class gF extends jr{constructor(t){super(t),this.removeGroupControls=Sn,this.removeListeners=Sn,this.controls=new pF(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Sn}update(){const{dragControls:t}=this.node.getProps(),{dragControls:n}=this.node.prevProps||{};t!==n&&(this.removeGroupControls(),t&&(this.removeGroupControls=t.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}}const ip=e=>(t,n)=>{e&&ht.update(()=>e(t,n),!1,!0)};class yF extends jr{constructor(){super(...arguments),this.removePointerDownListener=Sn}onPointerDown(t){this.session=new kw(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Tw(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:o}=this.node.getProps();return{onSessionStart:ip(t),onStart:ip(n),onMove:ip(r),onEnd:(i,s)=>{delete this.session,o&&ht.postRender(()=>o(i,s))}}}mount(){this.removePointerDownListener=As(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}let sp=!1;class vF extends S.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:o}=this.props,{projection:i}=t;i&&(n.group&&n.group.add(i),r&&r.register&&o&&r.register(i),sp&&i.root.didUpdate(),i.addEventListener("animationComplete",()=>{this.safeToRemove()}),i.setOptions({...i.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),jl.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:o,isPresent:i}=this.props,{projection:s}=r;return s&&(s.isPresent=i,t.layoutDependency!==n&&s.setOptions({...s.options,layoutDependency:n}),sp=!0,o||t.layoutDependency!==n||n===void 0||t.isPresent!==i?s.willUpdate():this.safeToRemove(),t.isPresent!==i&&(i?s.promote():s.relegate()||ht.postRender(()=>{const a=s.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),Vf.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:o}=t;sp=!0,o&&(o.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(o),r&&r.deregister&&r.deregister(o))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function _w(e){const[t,n]=lw(),r=S.useContext(fs);return p.jsx(vF,{...e,layoutGroup:r,switchLayoutGroup:S.useContext(ww),isPresent:t,safeToRemove:n})}const bF={pan:{Feature:yF},drag:{Feature:gF,ProjectionNode:sw,MeasureLayout:_w}};function Fw(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",n==="Start");const o="onHover"+n,i=r[o];i&&ht.postRender(()=>i(t,Is(t)))}class xF extends jr{mount(){const{current:t}=this.node;t&&(this.unmount=BM(t,(n,r)=>(Fw(this.node,r,"Start"),o=>Fw(this.node,o,"End"))))}unmount(){}}class wF extends jr{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=ps(ks(this.node.current,"focus",()=>this.onFocus()),ks(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function Lw(e,t,n){const{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap",n==="Start");const o="onTap"+(n==="End"?"":n),i=r[o];i&&ht.postRender(()=>i(t,Is(t)))}class SF extends jr{mount(){const{current:t}=this.node;if(!t)return;const{globalTapTarget:n,propagate:r}=this.node.props;this.unmount=GM(t,(o,i)=>(Lw(this.node,i,"Start"),(s,{success:a})=>Lw(this.node,s,a?"End":"Cancel")),{useGlobalTarget:n,stopPropagation:r?.tap===!1})}unmount(){}}const ap=new WeakMap,lp=new WeakMap,TF=e=>{const t=ap.get(e.target);t&&t(e)},EF=e=>{e.forEach(TF)};function CF({root:e,...t}){const n=e||document;lp.has(n)||lp.set(n,{});const r=lp.get(n),o=JSON.stringify(t);return r[o]||(r[o]=new IntersectionObserver(EF,{root:e,...t})),r[o]}function kF(e,t,n){const r=CF(t);return ap.set(e,n),r.observe(e),()=>{ap.delete(e),r.unobserve(e)}}const IF={some:0,all:1};class AF extends jr{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:o="some",once:i}=t,s={root:n?n.current:void 0,rootMargin:r,threshold:typeof o=="number"?o:IF[o]},a=l=>{const{isIntersecting:c}=l;if(this.isInView===c||(this.isInView=c,i&&!c&&this.hasEnteredView))return;c&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",c);const{onViewportEnter:u,onViewportLeave:d}=this.node.getProps(),f=c?u:d;f&&f(l)};return kF(this.node.current,s,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(PF(t,n))&&this.startObserver()}unmount(){}}function PF({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const OF={...tF,...{inView:{Feature:AF},tap:{Feature:SF},focus:{Feature:wF},hover:{Feature:xF}},...bF,...{layout:{ProjectionNode:sw,MeasureLayout:_w}}},ze=Z2(OF,X2);function DF(e){return S.useEffect(()=>()=>e(),[])}function wo(e){const t=Qn(()=>zr(e)),{isStatic:n}=S.useContext(xo);if(n){const[,r]=S.useState(e);S.useEffect(()=>t.on("change",r),[])}return t}function Vw(e,t){const n=wo(t()),r=()=>n.set(t());return r(),xl(()=>{const o=()=>ht.preRender(r,!1,!0),i=e.map(s=>s.on("change",o));return()=>{i.forEach(s=>s()),br(r)}}),n}function NF(e){ws.current=[],e();const t=Vw(ws.current,e);return ws.current=void 0,t}function MF(e,t,n,r){if(typeof e=="function")return NF(e);const i=typeof t=="function"?t:o_(t,n,r),s=Array.isArray(e)?$w(e,i):$w([e],([l])=>i(l)),a=Array.isArray(e)?void 0:e.accelerate;return a&&!a.isTransformed&&typeof t!="function"&&Array.isArray(n)&&r?.clamp!==!1&&(s.accelerate={...a,times:t,keyframes:n,isTransformed:!0}),s}function $w(e,t){const n=Qn(()=>[]);return Vw(e,()=>{n.length=0;const r=e.length;for(let o=0;o<r;o++)n[o]=e[o].get();return t(n)})}function _F(){!Rf.current&&Jx();const[e]=S.useState(Fl.current);return process.env.NODE_ENV!=="production"&&Sl(e!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected.","reduced-motion-disabled"),e}function FF(){const e=_F(),{reducedMotion:t}=S.useContext(xo);return t==="never"?!1:t==="always"?!0:e}function cp(e){return typeof e=="object"&&!Array.isArray(e)}function zw(e,t,n,r){return e==null?[]:typeof e=="string"&&cp(t)?Ff(e,n,r):e instanceof NodeList?Array.from(e):Array.isArray(e)?e.filter(o=>o!=null):[e]}function LF(e,t,n){return e*(t+1)}function jw(e,t,n,r){return typeof t=="number"?t:t.startsWith("-")||t.startsWith("+")?Math.max(0,e+parseFloat(t)):t==="<"?n:t.startsWith("<")?Math.max(0,n+parseFloat(t.slice(1))):r.get(t)??e}function VF(e,t,n){for(let r=0;r<e.length;r++){const o=e[r];o.at>t&&o.at<n&&(ri(e,o),r--)}}function $F(e,t,n,r,o,i){VF(e,o,i);for(let s=0;s<t.length;s++)e.push({value:t[s],at:bt(o,i,r[s]),easing:Bb(n,s)})}function zF(e,t){for(let n=0;n<e.length;n++)e[n]=e[n]/(t+1)}function jF(e,t){return e.at===t.at?e.value===null?1:t.value===null?-1:0:e.at-t.at}const BF="easeInOut",RF=20;function HF(e,{defaultTransition:t={},...n}={},r,o){const i=t.duration||.3,s=new Map,a=new Map,l={},c=new Map;let u=0,d=0,f=0;for(let h=0;h<e.length;h++){const g=e[h];if(typeof g=="string"){c.set(g,d);continue}else if(!Array.isArray(g)){c.set(g.name,jw(d,g.at,u,c));continue}let[y,m,v={}]=g;v.at!==void 0&&(d=jw(d,v.at,u,c));let b=0;const x=(T,E,I,w=0,C=0)=>{const A=WF(T),{delay:O=0,times:_=dx(A),type:N=t.type||"keyframes",repeat:$,repeatType:D,repeatDelay:F=0,...z}=E;let{ease:M=t.ease||"easeOut",duration:k}=E;const V=typeof O=="function"?O(w,C):O,L=A.length,R=xf(N)?N:o?.[N||"keyframes"];if(L<=2&&R){let ee=100;if(L===2&&GF(A)){const q=A[1]-A[0];ee=Math.abs(q)}const se={...t,...z};k!==void 0&&(se.duration=mn(k));const te=sx(se,ee,R);M=te.ease,k=te.duration}k??(k=i);const U=d+V;_.length===1&&_[0]===0&&(_[1]=1);const G=_.length-A.length;if(G>0&&ux(_,G),A.length===1&&A.unshift(null),$){hn($<RF,"Repeat count too high, must be less than 20","repeat-count-high"),k=LF(k,$);const ee=[...A],se=[..._];M=Array.isArray(M)?[...M]:[M];const te=[...M];for(let q=0;q<$;q++){A.push(...ee);for(let Y=0;Y<ee.length;Y++)_.push(se[Y]+(q+1)),M.push(Y===0?"linear":Bb(te,Y-1))}zF(_,$)}const H=U+k;$F(I,A,M,_,U,H),b=Math.max(V+k,b),f=Math.max(H,f)};if(zt(y)){const T=Bw(y,a);x(m,v,Rw("default",T))}else{const T=zw(y,m,r,l),E=T.length;for(let I=0;I<E;I++){m=m,v=v;const w=T[I],C=Bw(w,a);for(const A in m)x(m[A],qF(v,A),Rw(A,C),I,E)}}u=d,d+=b}return a.forEach((h,g)=>{for(const y in h){const m=h[y];m.sort(jF);const v=[],b=[],x=[];for(let w=0;w<m.length;w++){const{at:C,value:A,easing:O}=m[w];v.push(A),b.push(ii(0,f,C)),x.push(O||"easeOut")}b[0]!==0&&(b.unshift(0),v.unshift(v[0]),x.unshift(BF)),b[b.length-1]!==1&&(b.push(1),v.push(null)),s.has(g)||s.set(g,{keyframes:{},transition:{}});const T=s.get(g);T.keyframes[y]=v;const{type:E,...I}=t;T.transition[y]={...I,duration:f,ease:x,times:b,...n}}}),s}function Bw(e,t){return!t.has(e)&&t.set(e,{}),t.get(e)}function Rw(e,t){return t[e]||(t[e]=[]),t[e]}function WF(e){return Array.isArray(e)?e:[e]}function qF(e,t){return e&&e[t]?{...e,...e[t]}:{...e}}const UF=e=>typeof e=="number",GF=e=>e.every(UF);function YF(e){const t={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},n=Pl(e)&&!Kx(e)?new w0(t):new g0(t);n.mount(e),Ss.set(e,n)}function KF(e){const t={presenceContext:null,props:{},visualState:{renderState:{output:{}},latestValues:{}}},n=new x_(t);n.mount(e),Ss.set(e,n)}function ZF(e,t){return zt(e)||typeof e=="number"||typeof e=="string"&&!cp(t)}function Hw(e,t,n,r){const o=[];if(ZF(e,t))o.push(G0(e,cp(t)&&t.default||t,n&&(n.default||n)));else{if(e==null)return o;const i=zw(e,t,r),s=i.length;hn(!!s,"No valid elements provided.","no-valid-elements");for(let a=0;a<s;a++){const l=i[a],c=l instanceof Element?YF:KF;Ss.has(l)||c(l);const u=Ss.get(l),d={...n};"delay"in d&&typeof d.delay=="function"&&(d.delay=d.delay(a,s)),o.push(...Of(u,{...t,transition:d},{}))}}return o}function XF(e,t,n){const r=[],o=e.map(s=>{if(Array.isArray(s)&&typeof s[0]=="function"){const a=s[0],l=zr(0);return l.on("change",a),s.length===1?[l,[0,1]]:s.length===2?[l,[0,1],s[1]]:[l,s[1],s[2]]}return s});return HF(o,t,n,{spring:bs}).forEach(({keyframes:s,transition:a},l)=>{r.push(...Hw(l,s,a))}),r}function QF(e){return Array.isArray(e)&&e.some(Array.isArray)}function Ww(e={}){const{scope:t,reduceMotion:n}=e;function r(o,i,s){let a=[],l;if(QF(o))a=XF(o,n!==void 0?{reduceMotion:n,...i}:i,t);else{const{onComplete:u,...d}=s||{};typeof u=="function"&&(l=u),a=Hw(o,i,n!==void 0?{reduceMotion:n,...d}:d,t)}const c=new aM(a);return l&&c.finished.then(l),t&&(t.animations.push(c),c.finished.then(()=>{ri(t.animations,c)})),c}return r}const qw=Ww();function JF(){const e=Qn(()=>({current:null,animations:[]})),t=FF()??void 0,n=S.useMemo(()=>Ww({scope:e,reduceMotion:t}),[e,t]);return DF(()=>{e.animations.forEach(r=>r.stop()),e.animations.length=0}),[e,n]}class eL{constructor(){this.componentControls=new Set}subscribe(t){return this.componentControls.add(t),()=>this.componentControls.delete(t)}start(t,n){this.componentControls.forEach(r=>{r.start(t.nativeEvent||t,n)})}cancel(){this.componentControls.forEach(t=>{t.cancel()})}stop(){this.componentControls.forEach(t=>{t.stop()})}}const tL=()=>new eL;function nL(){return Qn(tL)}const Uw=S.createContext(null);function rL(e,t,n,r){if(!r)return e;const o=e.findIndex(u=>u.value===t);if(o===-1)return e;const i=r>0?1:-1,s=e[o+i];if(!s)return e;const a=e[o],l=s.layout,c=bt(l.min,l.max,.5);return i===1&&a.layout.max+n>c||i===-1&&a.layout.min+n<c?jD(e,o,o+i):e}function oL({children:e,as:t="ul",axis:n="y",onReorder:r,values:o,...i},s){const a=Qn(()=>ze[t]),l=[],c=S.useRef(!1),u=S.useRef(null);hn(!!o,"Reorder.Group must be provided a values prop","reorder-values");const d={axis:n,groupRef:u,registerItem:(g,y)=>{const m=l.findIndex(v=>g===v.value);m!==-1?l[m].layout=y[n]:l.push({value:g,layout:y[n]}),l.sort(sL)},updateOrder:(g,y,m)=>{if(c.current)return;const v=rL(l,g,y,m);l!==v&&(c.current=!0,r(v.map(iL).filter(b=>o.indexOf(b)!==-1)))}};S.useEffect(()=>{c.current=!1});const f=g=>{u.current=g,typeof s=="function"?s(g):s&&(s.current=g)},h={overflowAnchor:"none",...i.style};return p.jsx(a,{...i,style:h,ref:f,ignoreStrict:!0,children:p.jsx(Uw.Provider,{value:d,children:e})})}const Gw=S.forwardRef(oL);function iL(e){return e.value}function sL(e,t){return e.layout.min-t.layout.min}const ql=50,Yw=25,aL=new Set(["auto","scroll"]),Ps=new WeakMap,Os=new WeakMap;let Ds=null;function lL(){if(Ds){const e=up(Ds,"y");e&&(Os.delete(e),Ps.delete(e));const t=up(Ds,"x");t&&t!==e&&(Os.delete(t),Ps.delete(t)),Ds=null}}function cL(e,t){const n=getComputedStyle(e),r=t==="x"?n.overflowX:n.overflowY,o=e===document.body||e===document.documentElement;return aL.has(r)||o}function up(e,t){let n=e?.parentElement;for(;n;){if(cL(n,t))return n;n=n.parentElement}return null}function uL(e,t,n){const r=t.getBoundingClientRect(),o=n==="x"?Math.max(0,r.left):Math.max(0,r.top),i=n==="x"?Math.min(window.innerWidth,r.right):Math.min(window.innerHeight,r.bottom),s=e-o,a=i-e;if(s<ql){const l=1-s/ql;return{amount:-Yw*l*l,edge:"start"}}else if(a<ql){const l=1-a/ql;return{amount:Yw*l*l,edge:"end"}}return{amount:0,edge:null}}function dL(e,t,n,r){if(!e)return;Ds=e;const o=up(e,n);if(!o)return;const i=t-(n==="x"?window.scrollX:window.scrollY),{amount:s,edge:a}=uL(i,o,n);if(a===null){Os.delete(o),Ps.delete(o);return}const l=Os.get(o),c=o===document.body||o===document.documentElement;if(l!==a){if(!(a==="start"&&r<0||a==="end"&&r>0))return;Os.set(o,a);const d=n==="x"?o.scrollWidth-(c?window.innerWidth:o.clientWidth):o.scrollHeight-(c?window.innerHeight:o.clientHeight);Ps.set(o,d)}if(s>0){const u=Ps.get(o);if((n==="x"?c?window.scrollX:o.scrollLeft:c?window.scrollY:o.scrollTop)>=u)return}n==="x"?c?window.scrollBy({left:s}):o.scrollLeft+=s:c?window.scrollBy({top:s}):o.scrollTop+=s}function Kw(e,t=0){return zt(e)?e:wo(t)}function fL({children:e,style:t={},value:n,as:r="li",onDrag:o,onDragEnd:i,layout:s=!0,...a},l){const c=Qn(()=>ze[r]),u=S.useContext(Uw),d={x:Kw(t.x),y:Kw(t.y)},f=MF([d.x,d.y],([v,b])=>v||b?1:"unset");hn(!!u,"Reorder.Item must be a child of Reorder.Group","reorder-item-child");const{axis:h,registerItem:g,updateOrder:y,groupRef:m}=u;return p.jsx(c,{drag:h,...a,dragSnapToOrigin:!0,style:{...t,x:d.x,y:d.y,zIndex:f},layout:s,onDrag:(v,b)=>{const{velocity:x,point:T}=b,E=d[h].get();y(n,E,x[h]),dL(m.current,T[h],h,x[h]),o&&o(v,b)},onDragEnd:(v,b)=>{lL(),i&&i(v,b)},onLayoutMeasure:v=>{g(n,v)},ref:l,ignoreStrict:!0,children:e})}const Zw=S.forwardRef(fL);var Ul={exports:{}},dp={},Gl={exports:{}},fp={};var Xw;function pL(){if(Xw)return fp;Xw=1;var e=S;function t(d,f){return d===f&&(d!==0||1/d===1/f)||d!==d&&f!==f}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,o=e.useEffect,i=e.useLayoutEffect,s=e.useDebugValue;function a(d,f){var h=f(),g=r({inst:{value:h,getSnapshot:f}}),y=g[0].inst,m=g[1];return i(function(){y.value=h,y.getSnapshot=f,l(y)&&m({inst:y})},[d,h,f]),o(function(){return l(y)&&m({inst:y}),d(function(){l(y)&&m({inst:y})})},[d]),s(h),h}function l(d){var f=d.getSnapshot;d=d.value;try{var h=f();return!n(d,h)}catch{return!0}}function c(d,f){return f()}var u=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?c:a;return fp.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:u,fp}var pp={};var Qw;function hL(){return Qw||(Qw=1,process.env.NODE_ENV!=="production"&&(function(){function e(h,g){return h===g&&(h!==0||1/h===1/g)||h!==h&&g!==g}function t(h,g){u||o.startTransition===void 0||(u=!0,console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var y=g();if(!d){var m=g();i(y,m)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),d=!0)}m=s({inst:{value:y,getSnapshot:g}});var v=m[0].inst,b=m[1];return l(function(){v.value=y,v.getSnapshot=g,n(v)&&b({inst:v})},[h,y,g]),a(function(){return n(v)&&b({inst:v}),h(function(){n(v)&&b({inst:v})})},[h]),c(y),y}function n(h){var g=h.getSnapshot;h=h.value;try{var y=g();return!i(h,y)}catch{return!0}}function r(h,g){return g()}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var o=S,i=typeof Object.is=="function"?Object.is:e,s=o.useState,a=o.useEffect,l=o.useLayoutEffect,c=o.useDebugValue,u=!1,d=!1,f=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?r:t;pp.useSyncExternalStore=o.useSyncExternalStore!==void 0?o.useSyncExternalStore:f,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()),pp}var Jw;function hp(){return Jw||(Jw=1,process.env.NODE_ENV==="production"?Gl.exports=pL():Gl.exports=hL()),Gl.exports}var e1;function mL(){if(e1)return dp;e1=1;var e=S,t=hp();function n(c,u){return c===u&&(c!==0||1/c===1/u)||c!==c&&u!==u}var r=typeof Object.is=="function"?Object.is:n,o=t.useSyncExternalStore,i=e.useRef,s=e.useEffect,a=e.useMemo,l=e.useDebugValue;return dp.useSyncExternalStoreWithSelector=function(c,u,d,f,h){var g=i(null);if(g.current===null){var y={hasValue:!1,value:null};g.current=y}else y=g.current;g=a(function(){function v(I){if(!b){if(b=!0,x=I,I=f(I),h!==void 0&&y.hasValue){var w=y.value;if(h(w,I))return T=w}return T=I}if(w=T,r(x,I))return w;var C=f(I);return h!==void 0&&h(w,C)?(x=I,w):(x=I,T=C)}var b=!1,x,T,E=d===void 0?null:d;return[function(){return v(u())},E===null?void 0:function(){return v(E())}]},[u,d,f,h]);var m=o(c,g[0],g[1]);return s(function(){y.hasValue=!0,y.value=m},[m]),l(m),m},dp}var mp={};var t1;function gL(){return t1||(t1=1,process.env.NODE_ENV!=="production"&&(function(){function e(c,u){return c===u&&(c!==0||1/c===1/u)||c!==c&&u!==u}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var t=S,n=hp(),r=typeof Object.is=="function"?Object.is:e,o=n.useSyncExternalStore,i=t.useRef,s=t.useEffect,a=t.useMemo,l=t.useDebugValue;mp.useSyncExternalStoreWithSelector=function(c,u,d,f,h){var g=i(null);if(g.current===null){var y={hasValue:!1,value:null};g.current=y}else y=g.current;g=a(function(){function v(I){if(!b){if(b=!0,x=I,I=f(I),h!==void 0&&y.hasValue){var w=y.value;if(h(w,I))return T=w}return T=I}if(w=T,r(x,I))return w;var C=f(I);return h!==void 0&&h(w,C)?(x=I,w):(x=I,T=C)}var b=!1,x,T,E=d===void 0?null:d;return[function(){return v(u())},E===null?void 0:function(){return v(E())}]},[u,d,f,h]);var m=o(c,g[0],g[1]);return s(function(){y.hasValue=!0,y.value=m},[m]),l(m),m},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()),mp}var n1;function yL(){return n1||(n1=1,process.env.NODE_ENV==="production"?Ul.exports=mL():Ul.exports=gL()),Ul.exports}var vL=yL(),bL=hp(),yi=function(){return yi=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},yi.apply(this,arguments)};function Ns(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),o,i=[],s;try{for(;(t===void 0||t-- >0)&&!(o=r.next()).done;)i.push(o.value)}catch(a){s={error:a}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return i}function r1(e,t,n){if(arguments.length===2)for(var r=0,o=t.length,i;r<o;r++)(i||!(r in t))&&(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))}typeof SuppressedError=="function"&&SuppressedError;var vi=function(e){var t=S.useRef(e??{});return S.useEffect(function(){t.current=e},[e]),t},xL=function(e){var t=S.useRef(void 0);return S.useEffect(function(){t.current=e},[e]),t.current},wL=function(e){return Object.entries(e)},o1=function(e){return e instanceof Promise},i1=function(e,t,n,r){return t===e?n.reduce(function(o,i){return i(o,t,r)},e):e.constructor.name===Object.name?n.reduce(function(o,i){return i(o,t,r)},yi(yi({},t),e)):n.reduce(function(o,i){return i(o,t,r)},e)},SL=function(e,t,n,r,o,i){return function(){for(var s=[],a=0;a<arguments.length;a++)s[a]=arguments[a];var l=performance.now(),c=t.apply(void 0,r1([],Ns(s),!1)),u=function(d,f){return n(function(h){return i1(d,h,i,f)})};return o1(c)?c.then(function(d){o.current={method:e,props:r(),time:performance.now()-l},u(d,o.current)}):(o.current={method:e,props:r(),time:performance.now()-l},void u(c,o.current))}},TL=function(e,t,n,r,o,i){return function(){for(var s=[],a=0;a<arguments.length;a++)s[a]=arguments[a];o.current={method:e,time:0,props:r()};var l=t.apply(void 0,r1([],Ns(s),!1)),c=function(u){return n(function(d){return i1(u,d,i,o.current)})};return o1(l)?l.then(function(u){return c(u)}):c(l)}},gp=function(e,t,n){var r,o,i,s=Ns(S.useState(function(){return e}),2),a=s[0],l=s[1],c=vi(a),u=vi((r=n?.props)!==null&&r!==void 0?r:{}),d=vi(t),f=vi((o=n?.postMiddleware)!==null&&o!==void 0?o:[]),h=vi((i=n?.interceptor)!==null&&i!==void 0?i:[]),g=S.useRef(e),y=xL(a),m=vi(y),v=S.useRef(null);S.useEffect(function(){if(v.current!==null){var T=v.current;f.current.forEach(function(E){E(a,y,T)})}},[a,f,y]);var b=Ns(S.useState(function(){var T=function(){return u.current},E=d.current({props:T,state:function(){return c.current},initialState:g.current,previousState:function(){return m.current}});return wL(E).reduce(function(I,w){var C,A=Ns(w,2),O=A[0],_=A[1];return yi(yi({},I),(C={},C[O]=n?.debug?SL(O,_,l,T,v,h.current):TL(O,_,l,T,v,h.current),C))},{})}),1),x=b[0];return[a,x,u.current]},EL=Object.defineProperty,s1=Object.getOwnPropertySymbols,CL=Object.prototype.hasOwnProperty,kL=Object.prototype.propertyIsEnumerable,a1=(e,t,n)=>t in e?EL(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,IL=(e,t)=>{for(var n in t||(t={}))CL.call(t,n)&&a1(e,n,t[n]);if(s1)for(var n of s1(t))kL.call(t,n)&&a1(e,n,t[n]);return e},yp=(e,t)=>{const n=e.length;for(let r=0;r<n;r++)if(t(e[r],r,e))return!0;return!1},AL=(e,t,n,r)=>Kl(yp,e,t,n,r),bi=e=>typeof e=="object",Br=(e,t)=>{if(e===t)return!0;if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();if(!e||!t||!bi(e)&&!bi(t))return e===t;if(e.prototype!==t.prototype)return!1;const n=Object.keys(e);return n.length!==Object.keys(t).length?!1:n.every(r=>Br(e[r],t[r]))},PL=(e,t)=>(bi(e)||Array.isArray(e))&&t?e[t]:e,OL=e=>(t,n)=>t[e]===n[e]?0:t[e]>n[e]?1:-1,Yl=e=>/[0-9.]+/.test(e),l1=e=>["string","number"].includes(typeof e),c1=e=>e==null||e?.length===0||e==="",u1={eq:Br,is:Object.is,"!=":(e,t)=>e!=t,"!==":(e,t)=>e!==t,"<":(e,t)=>e<t,"<=":(e,t)=>e<=t,"==":(e,t)=>e==t,"===":(e,t)=>e===t,">":(e,t)=>e>t,">=":(e,t)=>e>=t,includes:(e,t)=>`${e}`.includes(t),notIncludes:(e,t)=>!`${e}`.includes(t),startsWith:(e,t)=>`${e}`.startsWith(t),endsWith:(e,t)=>`${e}`.endsWith(t),like:(e,t)=>new RegExp(`.*${t}.*`,"gi").test(`${e}`),alphabetical:(e,t)=>e.toString().localeCompare(t.toString()),empty:c1,notEmpty:e=>!c1(e),in:(e,t)=>yp(t,n=>Br(e,n)),notIn:(e,t)=>d1(t,n=>!Br(e,n))},DL=e=>{if(e in u1)return u1[e];throw new Error("Linq - Symbol not found")},xi=(e,t)=>{const n=[],r=e.length;for(let o=0;o<r;o++)t(e[o],o,e)&&n.push(e[o]);return n},Kl=(e,t,n,r,o)=>{if(typeof n=="function")return e(t,n);const i=DL(r);return n&&r&&o!==void 0?e(t,s=>i(s[n],o)):e(t,s=>i(s,o))},NL=(e,t,n,r)=>Kl(xi,e,t,n,r),d1=(e,t)=>{for(let n=0;n<e.length;n++)if(!t(e[n],n,e))return!1;return!0},ML=(e,t,n,r)=>Kl(d1,e,t,n,r),f1=e=>{if(e===null)return null;const t=IL({},e);return Object.keys(t).forEach(n=>t[n]=bi(e[n])?f1(e[n]):e[n]),Array.isArray(e)&&e.length?(t.length=e.length)&&Array.from(t):Array.isArray(e)?Array.from(e):t},p1=(e,t)=>{if(bi(t)){for(let n=0;n<e.length;n++){const r=e[n];if(Br(t,r))return!0}return!1}for(let n=0;n<e.length;n++){const r=e[n];if(Br(t,r))return!0}return!1},_L=(e,t)=>{const n=new Map(e.map(r=>[r[t],r]));return Object.fromEntries(n.entries())},FL=e=>xi(e,(t,n,r)=>bi(t)?n===r.findIndex(o=>Br(o,t)):n===r.indexOf(t)),LL=(e,t)=>{const n=e.length;for(let r=0;r<n;r++)if(t(e[r],r,e))return e[r]},h1=(e,t)=>{const n=new Map;return e.forEach(r=>{const o=t(r),i=n.get(o)||[];i.push(r),n.set(o,i)}),Object.fromEntries(n.entries())},VL=(e,t)=>h1(e,n=>n[t]),m1=(e,t)=>{const n=[];let r=0;const o=e.length;for(r;r<o;r++){const i=t(e[r],r,e);n.push(i)}return n},$L=(e,t)=>{let n=Number.parseInt(e,10),r=Number.parseInt(t,10);return n>r?[r,n]:[n,r]},zL=(e,t,n=1)=>{const r=[];let o=e.charCodeAt(0);const i=t.charCodeAt(0);for(;o<=i;o+=n)r.push(String.fromCharCode(o));return Yl(e)&&Yl(t)?r.map(s=>Number.parseInt(s)):r},vp=(e,t,n=1)=>{let r=Math.abs(n);if((e.length>1||t.length>1)&&Yl(e)&&Yl(t)){const o=[],[i,s]=$L(e,t);for(let a=i;a<=s;a+=r)o.push(a);return o}return zL(e,t,r)},jL=(e,t,n=1)=>{if(t===void 0){const[r,o,i]=e.split("..");return i===void 0?vp(r,o,1):vp(r,i,Number.parseInt(o,10))}return l1(e)&&l1(t)?vp(`${e}`,`${t}`,n):Array.from({length:e},(r,o)=>o*Math.abs(t))},bp=(e,t,n)=>{let r=t;const o=n.length;for(let i=0;i<o;i++){const s=n[i];r=e(r,s,i,n)}return r},g1=e=>{const t=Array.from(e.values());let n=null,r=null,o=t.length;for(n=0;n<o/2;n+=1){r=o-1-n;let i=t[n];t[n]=t[r],t[r]=i}return t},BL=(e,t)=>{if(typeof t=="number")return e.slice(t);let n=e.length;for(let r=0;r<n;r++){const o=e[r];if(t(o,r,e))return e.slice(r)}return e.slice(0)},RL=(e,t,n,r)=>Kl(BL,e,t,n,r),y1=(e,t)=>{const n=[...e];return t===void 0?n.sort():typeof t=="function"?n.toSorted(t):n.toSorted(OL(t))},v1=(e=>(e.Asc="asc",e.Desc="desc",e))(v1||{}),HL=e=>(t,n)=>e.reduce((r,o)=>{const i=o.type==="desc"?-1:1,s=o.key,a=t[s]>n[s]?i:t[s]<n[s]?-i:0;return r!==0?r:a},0),WL=(e,t)=>e.sort(HL(t)),qL=(e,t)=>{if(t===void 0)return[...new Set(e).values()];const n=new Set;return Array.isArray(t)?[...new Set(t)]:xi(e,r=>{const o=t?n.has(r[t]):n.has(t);return t&&(o||n.add(r[t])),!o})},UL=class gm{constructor(t=[]){this.array=t}static Range(...t){return jL(...t)}static New(t){return new gm(t)}Where(t,n,r){return this.array=NL(this.array,t,n,r),this}Some(t,n,r){return AL(this.array,t,n,r)}All(t,n,r){return ML(this.array,t,n,r)}Reverse(){return this.array=g1(this.array),this}Add(t){return this.array=Array.isArray(t)?this.array.concat(t):this.array.concat([t]),this}Prepend(t){return this.array=Array.isArray(t)?t.concat(this.array):[t].concat(this.array),this}Select(t){return t===void 0?this.array:this.array.map(t)}Take(t,n){return n!==void 0?this.array=this.array.slice(t,Math.max(0,n)):this.array=this.array.slice(t),this}Head(){return this.array[0]}Tail(){return this.Skip(1)}Skip(t,n,r){return this.array=RL(this.array,t,n,r),this}Distinct(){return this.array=FL(this.array),this}First(t){return t===void 0?this.array[0]:LL(this.array,t)||null}Last(t){const n=this.array.length;if(t===void 0)return this.array[n-1];for(let r=n;r!==0;r--)if(t(this.array[r],r,this.array))return this.array[r]}Sum(t){return t===void 0?bp((n,r)=>n+r,0,this.array):bp((n,r)=>n+PL(r,t),0,this.array)}Average(t){return this.Sum(t)/this.array.length}GroupBy(t){return VL(this.array,t)}GroupWith(t){return h1(this.array,t)}Except(t){return xi(this.array,n=>!p1(t,n))}Intersect(t){return xi(this.array,n=>p1(t,n))}OrderBy(t,n){let r;return r=t?y1(this.array,t):this.array.toSorted(),this.array=n==="desc"?g1(r):r,this}Includes(t){return yp(this.array,n=>Br(n,t))}In(t){const n=t.length;for(let r=0;r<n;r++){const o=t[r];if(this.Includes(o))return!0}return!1}Reduce(t,n){return bp(t,n??this.array[0],this.array)}Empty(){return this.array.length===0}ToMap(t){return new Map(m1(this.array,n=>[t,n]))}Zip(t,n){return m1(this.array,(r,o)=>n(r,t[o]))}Count(t){return t===void 0?this.array.length:xi(this.array,t).length}Get(t){return this.array[t]}Clone(){return new gm(f1(this.array))}ToObject(t){return _L(this.array,t)}Sort(t){return Array.isArray(t)?WL(this.array,t):y1(this.array,t)}Unique(t){return qL(this.array,t)}},b1=UL;const Zl=0,Rr=1,wi=2,x1=4;function w1(e){return()=>e}function GL(e){e()}function Ms(e,t){return n=>e(t(n))}function S1(e,t){return()=>e(t)}function YL(e,t){return n=>e(t,n)}function xp(e){return e!==void 0}function KL(...e){return()=>{e.map(GL)}}function Si(){}function Xl(e,t){return t(e),e}function ZL(e,t){return t(e)}function xt(...e){return e}function st(e,t){return e(Rr,t)}function je(e,t){e(Zl,t)}function wp(e){e(wi)}function Et(e){return e(x1)}function Ae(e,t){return st(e,YL(t,Zl))}function Vn(e,t){const n=e(Rr,r=>{n(),t(r)});return n}function T1(e){let t,n;return r=>o=>{t=o,n&&clearTimeout(n),n=setTimeout(()=>{r(t)},e)}}function E1(e,t){return e===t}function wt(e=E1){let t;return n=>r=>{e(t,r)||(t=r,n(r))}}function De(e){return t=>n=>{e(n)&&t(n)}}function we(e){return t=>Ms(t,e)}function nr(e){return t=>()=>{t(e)}}function fe(e,...t){const n=XL(...t);return((r,o)=>{switch(r){case wi:wp(e);return;case Rr:return st(e,n(o))}})}function rr(e,t){return n=>r=>{n(t=e(t,r))}}function So(e){return t=>n=>{e>0?e--:t(n)}}function xr(e){let t=null,n;return r=>o=>{t=o,!n&&(n=setTimeout(()=>{n=void 0,r(t)},e))}}function We(...e){const t=new Array(e.length);let n=0,r=null;const o=Math.pow(2,e.length)-1;return e.forEach((i,s)=>{const a=Math.pow(2,s);st(i,l=>{const c=n;n=n|a,t[s]=l,c!==o&&n===o&&r&&(r(),r=null)})}),i=>s=>{const a=()=>{i([s].concat(t))};n===o?a():r=a}}function XL(...e){return t=>e.reduceRight(ZL,t)}function QL(e){let t,n;const r=()=>t?.();return function(o,i){switch(o){case Rr:return i?n===i?void 0:(r(),n=i,t=st(e,i),t):(r(),Si);case wi:r(),n=null;return}}}function ge(e){let t=e;const n=Ke();return((r,o)=>{switch(r){case Zl:t=o;break;case Rr:{o(t);break}case x1:return t}return n(r,o)})}function Xt(e,t){return Xl(ge(t),n=>Ae(e,n))}function Ke(){const e=[];return((t,n)=>{switch(t){case Zl:e.slice().forEach(r=>{r(n)});return;case wi:e.splice(0,e.length);return;case Rr:return e.push(n),()=>{const r=e.indexOf(n);r>-1&&e.splice(r,1)}}})}function yn(e){return Xl(Ke(),t=>Ae(e,t))}function Qe(e,t=[],{singleton:n}={singleton:!0}){return{constructor:e,dependencies:t,id:JL(),singleton:n}}const JL=()=>Symbol();function eV(e){const t=new Map,n=({constructor:r,dependencies:o,id:i,singleton:s})=>{if(s&&t.has(i))return t.get(i);const a=r(o.map(l=>n(l)));return s&&t.set(i,a),a};return n(e)}function Vt(...e){const t=Ke(),n=new Array(e.length);let r=0;const o=Math.pow(2,e.length)-1;return e.forEach((i,s)=>{const a=Math.pow(2,s);st(i,l=>{n[s]=l,r=r|a,r===o&&je(t,n)})}),function(i,s){switch(i){case wi:{wp(t);return}case Rr:return r===o&&s(n),st(t,s)}}}function Ne(e,t=E1){return fe(e,wt(t))}function Sp(...e){return function(t,n){switch(t){case wi:return;case Rr:return KL(...e.map(r=>st(r,n)))}}}var cn=(e=>(e[e.DEBUG=0]="DEBUG",e[e.INFO=1]="INFO",e[e.WARN=2]="WARN",e[e.ERROR=3]="ERROR",e))(cn||{});const tV={0:"debug",3:"error",1:"log",2:"warn"},nV=()=>typeof globalThis>"u"?window:globalThis,Hr=Qe(()=>{const e=ge(3);return{log:ge((t,n,r=1)=>{var o;const i=(o=nV().VIRTUOSO_LOG_LEVEL)!=null?o:Et(e);r>=i&&console[tV[r]]("%creact-virtuoso: %c%s %o","color: #0253b3; font-weight: bold","color: initial",t,n)}),logLevel:e}},[],{singleton:!0});function or(e,t,n){return Tp(e,t,n).callbackRef}function Tp(e,t,n){const r=S.useRef(null);let o=s=>{};const i=S.useMemo(()=>typeof ResizeObserver<"u"?new ResizeObserver(s=>{const a=()=>{const l=s[0].target;l.offsetParent!==null&&e(l)};n?a():requestAnimationFrame(a)}):null,[e,n]);return o=s=>{s&&t?(i?.observe(s),r.current=s):(r.current&&i?.unobserve(r.current),r.current=null)},{callbackRef:o,ref:r}}function C1(e,t,n,r,o,i,s,a,l){const c=S.useCallback(u=>{const d=rV(u.children,t,a?"offsetWidth":"offsetHeight",o);let f=u.parentElement;for(;!f.dataset.virtuosoScroller;)f=f.parentElement;const h=f.lastElementChild.dataset.viewportType==="window";let g;h&&(g=f.ownerDocument.defaultView);const y=s?a?s.scrollLeft:s.scrollTop:h?a?g.scrollX||g.document.documentElement.scrollLeft:g.scrollY||g.document.documentElement.scrollTop:a?f.scrollLeft:f.scrollTop,m=s?a?s.scrollWidth:s.scrollHeight:h?a?g.document.documentElement.scrollWidth:g.document.documentElement.scrollHeight:a?f.scrollWidth:f.scrollHeight,v=s?a?s.offsetWidth:s.offsetHeight:h?a?g.innerWidth:g.innerHeight:a?f.offsetWidth:f.offsetHeight;r({scrollHeight:m,scrollTop:Math.max(y,0),viewportHeight:v}),i?.(a?k1("column-gap",getComputedStyle(u).columnGap,o):k1("row-gap",getComputedStyle(u).rowGap,o)),d!==null&&e(d)},[e,t,o,i,s,r,a]);return Tp(c,n,l)}function rV(e,t,n,r){const o=e.length;if(o===0)return null;const i=[];for(let s=0;s<o;s++){const a=e.item(s);if(a.dataset.index===void 0)continue;const l=parseInt(a.dataset.index),c=parseFloat(a.dataset.knownSize),u=t(a,n);if(u===0&&r("Zero-sized element, this should not happen",{child:a},cn.ERROR),u===c)continue;const d=i[i.length-1];i.length===0||d.size!==u||d.endIndex!==l-1?i.push({endIndex:l,size:u,startIndex:l}):i[i.length-1].endIndex++}return i}function k1(e,t,n){return t!=="normal"&&!(t!=null&&t.endsWith("px"))&&n(`${e} was not resolved to pixel value correctly`,t,cn.WARN),t==="normal"?0:parseInt(t??"0",10)}function Ep(e,t,n){const r=S.useRef(null),o=S.useCallback(l=>{if(!(l!=null&&l.offsetParent))return;const c=l.getBoundingClientRect(),u=c.width;let d,f;if(t){const h=t.getBoundingClientRect(),g=c.top-h.top;f=h.height-Math.max(0,g),d=g+t.scrollTop}else{const h=s.current.ownerDocument.defaultView;f=h.innerHeight-Math.max(0,c.top),d=c.top+h.scrollY}r.current={offsetTop:d,visibleHeight:f,visibleWidth:u},e(r.current)},[e,t]),{callbackRef:i,ref:s}=Tp(o,!0,n),a=S.useCallback(()=>{o(s.current)},[o,s]);return S.useEffect(()=>{var l;if(t){t.addEventListener("scroll",a);const c=new ResizeObserver(()=>{requestAnimationFrame(a)});return c.observe(t),()=>{t.removeEventListener("scroll",a),c.unobserve(t)}}else{const c=(l=s.current)==null?void 0:l.ownerDocument.defaultView;return c?.addEventListener("scroll",a),c?.addEventListener("resize",a),()=>{c?.removeEventListener("scroll",a),c?.removeEventListener("resize",a)}}},[a,t,s]),i}const nn=Qe(()=>{const e=Ke(),t=Ke(),n=ge(0),r=Ke(),o=ge(0),i=Ke(),s=Ke(),a=ge(0),l=ge(0),c=ge(0),u=ge(0),d=Ke(),f=Ke(),h=ge(!1),g=ge(!1),y=ge(!1);return Ae(fe(e,we(({scrollTop:m})=>m)),t),Ae(fe(e,we(({scrollHeight:m})=>m)),s),Ae(t,o),{deviation:n,fixedFooterHeight:c,fixedHeaderHeight:l,footerHeight:u,headerHeight:a,horizontalDirection:g,scrollBy:f,scrollContainerState:e,scrollHeight:s,scrollingInProgress:h,scrollTo:d,scrollTop:t,skipAnimationFrameInResizeObserver:y,smoothScrollTargetReached:r,statefulScrollTop:o,viewportHeight:i}},[],{singleton:!0}),_s={lvl:0};function I1(e,t){const n=e.length;if(n===0)return[];let{index:r,value:o}=t(e[0]);const i=[];for(let s=1;s<n;s++){const{index:a,value:l}=t(e[s]);i.push({end:a-1,start:r,value:o}),r=a,o=l}return i.push({end:1/0,start:r,value:o}),i}function mt(e){return e===_s}function Fs(e,t){if(!mt(e))return t===e.k?e.v:t<e.k?Fs(e.l,t):Fs(e.r,t)}function $n(e,t,n="k"){if(mt(e))return[-1/0,void 0];if(Number(e[n])===t)return[e.k,e.v];if(Number(e[n])<t){const r=$n(e.r,t,n);return r[0]===-1/0?[e.k,e.v]:r}return $n(e.l,t,n)}function vn(e,t,n){return mt(e)?O1(t,n,1):t===e.k?jt(e,{k:t,v:n}):t<e.k?D1(jt(e,{l:vn(e.l,t,n)})):D1(jt(e,{r:vn(e.r,t,n)}))}function Ti(){return _s}function Ei(e,t,n){if(mt(e))return[];const r=$n(e,t)[0];return oV(kp(e,r,n))}function Cp(e,t){if(mt(e))return _s;const{k:n,l:r,r:o}=e;if(t===n){if(mt(r))return o;if(mt(o))return r;{const[i,s]=P1(r);return Ql(jt(e,{k:i,l:A1(r),v:s}))}}else return t<n?Ql(jt(e,{l:Cp(r,t)})):Ql(jt(e,{r:Cp(o,t)}))}function To(e){return mt(e)?[]:[...To(e.l),{k:e.k,v:e.v},...To(e.r)]}function kp(e,t,n){if(mt(e))return[];const{k:r,l:o,r:i,v:s}=e;let a=[];return r>t&&(a=a.concat(kp(o,t,n))),r>=t&&r<=n&&a.push({k:r,v:s}),r<=n&&(a=a.concat(kp(i,t,n))),a}function Ql(e){const{l:t,lvl:n,r}=e;if(r.lvl>=n-1&&t.lvl>=n-1)return e;if(n>r.lvl+1){if(Ip(t))return N1(jt(e,{lvl:n-1}));if(!mt(t)&&!mt(t.r))return jt(t.r,{l:jt(t,{r:t.r.l}),lvl:n,r:jt(e,{l:t.r.r,lvl:n-1})});throw new Error("Unexpected empty nodes")}else{if(Ip(e))return Ap(jt(e,{lvl:n-1}));if(!mt(r)&&!mt(r.l)){const o=r.l,i=Ip(o)?r.lvl-1:r.lvl;return jt(o,{l:jt(e,{lvl:n-1,r:o.l}),lvl:o.lvl+1,r:Ap(jt(r,{l:o.r,lvl:i}))})}else throw new Error("Unexpected empty nodes")}}function jt(e,t){return O1(t.k!==void 0?t.k:e.k,t.v!==void 0?t.v:e.v,t.lvl!==void 0?t.lvl:e.lvl,t.l!==void 0?t.l:e.l,t.r!==void 0?t.r:e.r)}function A1(e){return mt(e.r)?e.l:Ql(jt(e,{r:A1(e.r)}))}function Ip(e){return mt(e)||e.lvl>e.r.lvl}function P1(e){return mt(e.r)?[e.k,e.v]:P1(e.r)}function O1(e,t,n,r=_s,o=_s){return{k:e,l:r,lvl:n,r:o,v:t}}function D1(e){return Ap(N1(e))}function N1(e){const{l:t}=e;return!mt(t)&&t.lvl===e.lvl?jt(t,{r:jt(e,{l:t.r})}):e}function Ap(e){const{lvl:t,r:n}=e;return!mt(n)&&!mt(n.r)&&n.lvl===t&&n.r.lvl===t?jt(n,{l:jt(e,{r:n.l}),lvl:t+1}):e}function oV(e){return I1(e,({k:t,v:n})=>({index:t,value:n}))}function M1(e,t){return!!(e&&e.startIndex===t.startIndex&&e.endIndex===t.endIndex)}function Ls(e,t){return!!(e&&e[0]===t[0]&&e[1]===t[1])}const Pp=Qe(()=>({recalcInProgress:ge(!1)}),[],{singleton:!0});function _1(e,t,n){return e[Jl(e,t,n)]}function Jl(e,t,n,r=0){let o=e.length-1;for(;r<=o;){const i=Math.floor((r+o)/2),s=e[i],a=n(s,t);if(a===0)return i;if(a===-1){if(o-r<2)return i-1;o=i-1}else{if(o===r)return i;r=i+1}}throw new Error(`Failed binary finding record in array - ${e.join(",")}, searched for ${t}`)}function iV(e,t,n,r){const o=Jl(e,t,r),i=Jl(e,n,r,o);return e.slice(o,i+1)}function zn(e,t){return Math.round(e.getBoundingClientRect()[t])}function ec(e){return!mt(e.groupOffsetTree)}function Op({index:e},t){return t===e?0:t<e?-1:1}function sV(){return{groupIndices:[],groupOffsetTree:Ti(),lastIndex:0,lastOffset:0,lastSize:0,offsetTree:[],sizeTree:Ti()}}function aV(e,t){let n=mt(e)?0:1/0;for(const r of t){const{endIndex:o,size:i,startIndex:s}=r;if(n=Math.min(n,s),mt(e)){e=vn(e,0,i);continue}const a=Ei(e,s-1,o+1);if(a.some(hV(r)))continue;let l=!1,c=!1;for(const{end:u,start:d,value:f}of a)l?(o>=d||i===f)&&(e=Cp(e,d)):(c=f!==i,l=!0),u>o&&o>=d&&f!==i&&(e=vn(e,o+1,f));c&&(e=vn(e,s,i))}return[e,n]}function lV(e){return typeof e.groupIndex<"u"}function cV({offset:e},t){return t===e?0:t<e?-1:1}function Vs(e,t,n){if(t.length===0)return 0;const{index:r,offset:o,size:i}=_1(t,e,Op),s=e-r,a=i*s+(s-1)*n+o;return a>0?a+n:a}function F1(e,t){if(!ec(t))return e;let n=0;for(;t.groupIndices[n]<=e+n;)n++;return e+n}function L1(e,t,n){if(lV(e))return t.groupIndices[e.groupIndex]+1;{const r=e.index==="LAST"?n:e.index;let o=F1(r,t);return o=Math.max(0,o,Math.min(n,o)),o}}function uV(e,t,n,r=0){return r>0&&(t=Math.max(t,_1(e,r,Op).offset)),I1(iV(e,t,n,cV),pV)}function dV(e,[t,n,r,o]){t.length>0&&r("received item sizes",t,cn.DEBUG);const i=e.sizeTree;let s=i,a=0;if(n.length>0&&mt(i)&&t.length===2){const f=t[0].size,h=t[1].size;s=n.reduce((g,y)=>vn(vn(g,y,f),y+1,h),s)}else[s,a]=aV(s,t);if(s===i)return e;const{lastIndex:l,lastOffset:c,lastSize:u,offsetTree:d}=Dp(e.offsetTree,a,s,o);return{groupIndices:n,groupOffsetTree:n.reduce((f,h)=>vn(f,h,Vs(h,d,o)),Ti()),lastIndex:l,lastOffset:c,lastSize:u,offsetTree:d,sizeTree:s}}function fV(e){return To(e).map(({k:t,v:n},r,o)=>{const i=o[r+1];return{endIndex:i?i.k-1:1/0,size:n,startIndex:t}})}function V1(e,t){let n=0,r=0;for(;n<e;)n+=t[r+1]-t[r]-1,r++;return r-(n===e?0:1)}function Dp(e,t,n,r){let o=e,i=0,s=0,a=0,l=0;if(t!==0){l=Jl(o,t-1,Op),a=o[l].offset;const c=$n(n,t-1);i=c[0],s=c[1],o.length&&o[l].size===$n(n,t)[1]&&(l-=1),o=o.slice(0,l+1)}else o=[];for(const{start:c,value:u}of Ei(n,t,1/0)){const d=c-i,f=d*s+a+d*r;o.push({index:c,offset:f,size:u}),i=c,a=f,s=u}return{lastIndex:i,lastOffset:a,lastSize:s,offsetTree:o}}function pV(e){return{index:e.index,value:e}}function hV(e){const{endIndex:t,size:n,startIndex:r}=e;return o=>o.start===r&&(o.end===t||o.end===1/0)&&o.value===n}const mV={offsetHeight:"height",offsetWidth:"width"},ir=Qe(([{log:e},{recalcInProgress:t}])=>{const n=Ke(),r=Ke(),o=Xt(r,0),i=Ke(),s=Ke(),a=ge(0),l=ge([]),c=ge(void 0),u=ge(void 0),d=ge(void 0),f=ge(void 0),h=ge((w,C)=>zn(w,mV[C])),g=ge(void 0),y=ge(0),m=sV(),v=Xt(fe(n,We(l,e,y),rr(dV,m),wt()),m),b=Xt(fe(l,wt(),rr((w,C)=>({current:C,prev:w.current}),{current:[],prev:[]}),we(({prev:w})=>w)),[]);Ae(fe(l,De(w=>w.length>0),We(v,y),we(([w,C,A])=>{const O=w.reduce((_,N,$)=>vn(_,N,Vs(N,C.offsetTree,A)||$),Ti());return{...C,groupIndices:w,groupOffsetTree:O}})),v),Ae(fe(r,We(v),De(([w,{lastIndex:C}])=>w<C),we(([w,{lastIndex:C,lastSize:A}])=>[{endIndex:C,size:A,startIndex:w}])),n),Ae(c,u);const x=Xt(fe(c,we(w=>w===void 0)),!0);Ae(fe(u,De(w=>w!==void 0&&mt(Et(v).sizeTree)),we(w=>{const C=Et(d),A=Et(l).length>0;return C?A?[{endIndex:0,size:C,startIndex:0},{endIndex:1,size:w,startIndex:1}]:[]:[{endIndex:0,size:w,startIndex:0}]})),n),Ae(fe(f,De(w=>w!==void 0&&w.length>0&&mt(Et(v).sizeTree)),we(w=>{const C=[];let A=w[0],O=0;for(let _=1;_<w.length;_++){const N=w[_];N!==A&&(C.push({endIndex:_-1,size:A,startIndex:O}),A=N,O=_)}return C.push({endIndex:w.length-1,size:A,startIndex:O}),C})),n),Ae(fe(l,We(d,u),De(([,w,C])=>w!==void 0&&C!==void 0),we(([w,C,A])=>{const O=[];for(let _=0;_<w.length;_++){const N=w[_],$=w[_+1];O.push({startIndex:N,endIndex:N,size:C}),$!==void 0&&O.push({startIndex:N+1,endIndex:$-1,size:A})}return O})),n);const T=yn(fe(n,We(v),rr(({sizes:w},[C,A])=>({changed:A!==w,sizes:A}),{changed:!1,sizes:m}),we(w=>w.changed)));st(fe(a,rr((w,C)=>({diff:w.prev-C,prev:C}),{diff:0,prev:0}),we(w=>w.diff)),w=>{const{groupIndices:C}=Et(v);if(w>0)je(t,!0),je(i,w+V1(w,C));else if(w<0){const A=Et(b);A.length>0&&(w-=V1(-w,A)),je(s,w)}}),st(fe(a,We(e)),([w,C])=>{w<0&&C("`firstItemIndex` prop should not be set to less than zero. If you don't know the total count, just use a very high value",{firstItemIndex:a},cn.ERROR)});const E=yn(i);Ae(fe(i,We(v),we(([w,C])=>{const A=C.groupIndices.length>0,O=[],_=C.lastSize;if(A){const N=Fs(C.sizeTree,0);let $=0,D=0;for(;$<w;){const z=C.groupIndices[D],M=C.groupIndices.length===D+1?1/0:C.groupIndices[D+1]-z-1;O.push({endIndex:z,size:N,startIndex:z}),O.push({endIndex:z+1+M-1,size:_,startIndex:z+1}),D++,$+=M+1}const F=To(C.sizeTree);return $!==w&&F.shift(),F.reduce((z,{k:M,v:k})=>{let V=z.ranges;return z.prevSize!==0&&(V=[...z.ranges,{endIndex:M+w-1,size:z.prevSize,startIndex:z.prevIndex}]),{prevIndex:M+w,prevSize:k,ranges:V}},{prevIndex:w,prevSize:0,ranges:O}).ranges}return To(C.sizeTree).reduce((N,{k:$,v:D})=>({prevIndex:$+w,prevSize:D,ranges:[...N.ranges,{endIndex:$+w-1,size:N.prevSize,startIndex:N.prevIndex}]}),{prevIndex:0,prevSize:_,ranges:[]}).ranges})),n);const I=yn(fe(s,We(v,y),we(([w,{offsetTree:C},A])=>{const O=-w;return Vs(O,C,A)})));return Ae(fe(s,We(v,y),we(([w,C,A])=>{if(C.groupIndices.length>0){if(mt(C.sizeTree))return C;let O=Ti();const _=Et(b);let N=0,$=0,D=0;for(;N<-w;){D=_[$];const F=_[$+1]-D-1;$++,N+=F+1}if(O=To(C.sizeTree).reduce((F,{k:z,v:M})=>vn(F,Math.max(0,z+w),M),O),N!==-w){const F=Fs(C.sizeTree,D);O=vn(O,0,F);const z=$n(C.sizeTree,-w+1)[1];O=vn(O,1,z)}return{...C,sizeTree:O,...Dp(C.offsetTree,0,O,A)}}else{const O=To(C.sizeTree).reduce((_,{k:N,v:$})=>vn(_,Math.max(0,N+w),$),Ti());return{...C,sizeTree:O,...Dp(C.offsetTree,0,O,A)}}})),v),{beforeUnshiftWith:E,data:g,defaultItemSize:u,firstItemIndex:a,fixedItemSize:c,fixedGroupSize:d,gap:y,groupIndices:l,heightEstimates:f,itemSize:h,listRefresh:T,shiftWith:s,shiftWithOffset:I,sizeRanges:n,sizes:v,statefulTotalCount:o,totalCount:r,trackItemSizes:x,unshiftWith:i}},xt(Hr,Pp),{singleton:!0});function gV(e){return e.reduce((t,n)=>(t.groupIndices.push(t.totalCount),t.totalCount+=n+1,t),{groupIndices:[],totalCount:0})}const $1=Qe(([{groupIndices:e,sizes:t,totalCount:n},{headerHeight:r,scrollTop:o}])=>{const i=Ke(),s=Ke(),a=yn(fe(i,we(gV)));return Ae(fe(a,we(l=>l.totalCount)),n),Ae(fe(a,we(l=>l.groupIndices)),e),Ae(fe(Vt(o,t,r),De(([l,c])=>ec(c)),we(([l,c,u])=>$n(c.groupOffsetTree,Math.max(l-u,0),"v")[0]),wt(),we(l=>[l])),s),{groupCounts:i,topItemsIndexes:s}},xt(ir,nn)),Wr=Qe(([{log:e}])=>{const t=ge(!1),n=yn(fe(t,De(r=>r),wt()));return st(t,r=>{r&&Et(e)("props updated",{},cn.DEBUG)}),{didMount:n,propsReady:t}},xt(Hr),{singleton:!0}),yV=typeof document<"u"&&"scrollBehavior"in document.documentElement.style;function z1(e){const t=typeof e=="number"?{index:e}:e;return t.align||(t.align="start"),(!t.behavior||!yV)&&(t.behavior="auto"),t.offset||(t.offset=0),t}const $s=Qe(([{gap:e,listRefresh:t,sizes:n,totalCount:r},{fixedFooterHeight:o,fixedHeaderHeight:i,footerHeight:s,headerHeight:a,scrollingInProgress:l,scrollTo:c,smoothScrollTargetReached:u,viewportHeight:d},{log:f}])=>{const h=Ke(),g=Ke(),y=ge(0);let m=null,v=null,b=null;function x(){m&&(m(),m=null),b&&(b(),b=null),v&&(clearTimeout(v),v=null),je(l,!1)}return Ae(fe(h,We(n,d,r,y,a,s,f),We(e,i,o),we(([[T,E,I,w,C,A,O,_],N,$,D])=>{const F=z1(T),{align:z,behavior:M,offset:k}=F,V=w-1,L=L1(F,E,V);let R=Vs(L,E.offsetTree,N)+A;z==="end"?(R+=$+$n(E.sizeTree,L)[1]-I+D,L===V&&(R+=O)):z==="center"?R+=($+$n(E.sizeTree,L)[1]-I+D)/2:R-=C,k&&(R+=k);const U=G=>{x(),G?(_("retrying to scroll to",{location:T},cn.DEBUG),je(h,T)):(je(g,!0),_("list did not change, scroll successful",{},cn.DEBUG))};if(x(),M==="smooth"){let G=!1;b=st(t,H=>{G=G||H}),m=Vn(u,()=>{U(G)})}else m=Vn(fe(t,vV(150)),U);return v=setTimeout(()=>{x()},1200),je(l,!0),_("scrolling from index to",{behavior:M,index:L,top:R},cn.DEBUG),{behavior:M,top:R}})),c),{scrollTargetReached:g,scrollToIndex:h,topListHeight:y}},xt(ir,nn,Hr),{singleton:!0});function vV(e){return t=>{const n=setTimeout(()=>{t(!1)},e);return r=>{r&&(t(!0),clearTimeout(n))}}}function Np(e,t){e==0?t():requestAnimationFrame(()=>{Np(e-1,t)})}function Mp(e,t){const n=t-1;return typeof e=="number"?e:e.index==="LAST"?n:e.index}const zs=Qe(([{defaultItemSize:e,listRefresh:t,sizes:n},{scrollTop:r},{scrollTargetReached:o,scrollToIndex:i},{didMount:s}])=>{const a=ge(!0),l=ge(0),c=ge(!0);return Ae(fe(s,We(l),De(([u,d])=>!!d),nr(!1)),a),Ae(fe(s,We(l),De(([u,d])=>!!d),nr(!1)),c),st(fe(Vt(t,s),We(a,n,e,c),De(([[,u],d,{sizeTree:f},h,g])=>u&&(!mt(f)||xp(h))&&!d&&!g),We(l)),([,u])=>{Vn(o,()=>{je(c,!0)}),Np(4,()=>{Vn(r,()=>{je(a,!0)}),je(i,u)})}),{initialItemFinalLocationReached:c,initialTopMostItemIndex:l,scrolledToInitialItem:a}},xt(ir,nn,$s,Wr),{singleton:!0});function j1(e,t){return Math.abs(e-t)<1.01}const js="up",Bs="down",bV="none",xV={atBottom:!1,notAtBottomBecause:"NOT_SHOWING_LAST_ITEM",state:{offsetBottom:0,scrollHeight:0,scrollTop:0,viewportHeight:0}},wV=0,Rs=Qe(([{footerHeight:e,headerHeight:t,scrollBy:n,scrollContainerState:r,scrollTop:o,viewportHeight:i}])=>{const s=ge(!1),a=ge(!0),l=Ke(),c=Ke(),u=ge(4),d=ge(wV),f=Xt(fe(Sp(fe(Ne(o),So(1),nr(!0)),fe(Ne(o),So(1),nr(!1),T1(100))),wt()),!1),h=Xt(fe(Sp(fe(n,nr(!0)),fe(n,nr(!1),T1(200))),wt()),!1);Ae(fe(Vt(Ne(o),Ne(d)),we(([b,x])=>b<=x),wt()),a),Ae(fe(a,xr(50)),c);const g=yn(fe(Vt(r,Ne(i),Ne(t),Ne(e),Ne(u)),rr((b,[{scrollHeight:x,scrollTop:T},E,I,w,C])=>{const A=T+E-x>-C,O={scrollHeight:x,scrollTop:T,viewportHeight:E};if(A){let N,$;return T>b.state.scrollTop?(N="SCROLLED_DOWN",$=b.state.scrollTop-T):(N="SIZE_DECREASED",$=b.state.scrollTop-T||b.scrollTopDelta),{atBottom:!0,atBottomBecause:N,scrollTopDelta:$,state:O}}let _;return O.scrollHeight>b.state.scrollHeight?_="SIZE_INCREASED":E<b.state.viewportHeight?_="VIEWPORT_HEIGHT_DECREASING":T<b.state.scrollTop?_="SCROLLING_UPWARDS":_="NOT_FULLY_SCROLLED_TO_LAST_ITEM_BOTTOM",{atBottom:!1,notAtBottomBecause:_,state:O}},xV),wt((b,x)=>b&&b.atBottom===x.atBottom))),y=Xt(fe(r,rr((b,{scrollHeight:x,scrollTop:T,viewportHeight:E})=>{if(j1(b.scrollHeight,x))return{changed:!1,jump:0,scrollHeight:x,scrollTop:T};{const I=x-(T+E)<1;return b.scrollTop!==T&&I?{changed:!0,jump:b.scrollTop-T,scrollHeight:x,scrollTop:T}:{changed:!0,jump:0,scrollHeight:x,scrollTop:T}}},{changed:!1,jump:0,scrollHeight:0,scrollTop:0}),De(b=>b.changed),we(b=>b.jump)),0);Ae(fe(g,we(b=>b.atBottom)),s),Ae(fe(s,xr(50)),l);const m=ge(Bs);Ae(fe(r,we(({scrollTop:b})=>b),wt(),rr((b,x)=>Et(h)?{direction:b.direction,prevScrollTop:x}:{direction:x<b.prevScrollTop?js:Bs,prevScrollTop:x},{direction:Bs,prevScrollTop:0}),we(b=>b.direction)),m),Ae(fe(r,xr(50),nr(bV)),m);const v=ge(0);return Ae(fe(f,De(b=>!b),nr(0)),v),Ae(fe(o,xr(100),We(f),De(([b,x])=>x),rr(([b,x],[T])=>[x,T],[0,0]),we(([b,x])=>x-b)),v),{atBottomState:g,atBottomStateChange:l,atBottomThreshold:u,atTopStateChange:c,atTopThreshold:d,isAtBottom:s,isAtTop:a,isScrolling:f,lastJumpDueToItemResize:y,scrollDirection:m,scrollVelocity:v}},xt(nn)),Hs="top",Ws="bottom",B1="none";function R1(e,t,n){return typeof e=="number"?n===js&&t===Hs||n===Bs&&t===Ws?e:0:n===js?t===Hs?e.main:e.reverse:t===Ws?e.main:e.reverse}function H1(e,t){var n;return typeof e=="number"?e:(n=e[t])!=null?n:0}const _p=Qe(([{deviation:e,fixedHeaderHeight:t,headerHeight:n,scrollTop:r,viewportHeight:o}])=>{const i=Ke(),s=ge(0),a=ge(0),l=ge(0),c=Xt(fe(Vt(Ne(r),Ne(o),Ne(n),Ne(i,Ls),Ne(l),Ne(s),Ne(t),Ne(e),Ne(a)),we(([u,d,f,[h,g],y,m,v,b,x])=>{const T=u-b,E=m+v,I=Math.max(f-T,0);let w=B1;const C=H1(x,Hs),A=H1(x,Ws);return h-=b,h+=f+v,g+=f+v,g-=b,h>u+E-C&&(w=js),g<u-I+d+A&&(w=Bs),w!==B1?[Math.max(T-f-R1(y,Hs,w)-C,0),T-I-v+d+R1(y,Ws,w)+A]:null}),De(u=>u!=null),wt(Ls)),[0,0]);return{increaseViewportBy:a,listBoundary:i,overscan:l,topListHeight:s,visibleRange:c}},xt(nn),{singleton:!0});function SV(e,t,n){if(ec(t)){const r=F1(e,t);return[{index:$n(t.groupOffsetTree,r)[0],offset:0,size:0},{data:n?.[0],index:r,offset:0,size:0}]}return[{data:n?.[0],index:e,offset:0,size:0}]}const Fp={bottom:0,firstItemIndex:0,items:[],offsetBottom:0,offsetTop:0,top:0,topItems:[],topListHeight:0,totalCount:0};function tc(e,t,n,r,o,i){const{lastIndex:s,lastOffset:a,lastSize:l}=o;let c=0,u=0;if(e.length>0){c=e[0].offset;const y=e[e.length-1];u=y.offset+y.size}const d=n-s,f=a+d*l+(d-1)*r,h=c,g=f-u;return{bottom:u,firstItemIndex:i,items:q1(e,o,i),offsetBottom:g,offsetTop:c,top:h,topItems:q1(t,o,i),topListHeight:t.reduce((y,m)=>m.size+y,0),totalCount:n}}function W1(e,t,n,r,o,i){let s=0;if(n.groupIndices.length>0)for(const u of n.groupIndices){if(u-s>=e)break;s++}const a=e+s,l=Mp(t,a),c=Array.from({length:a}).map((u,d)=>({data:i[d+l],index:d+l,offset:0,size:0}));return tc(c,[],a,o,n,r)}function q1(e,t,n){if(e.length===0)return[];if(!ec(t))return e.map(c=>({...c,index:c.index+n,originalIndex:c.index}));const r=e[0].index,o=e[e.length-1].index,i=[],s=Ei(t.groupOffsetTree,r,o);let a,l=0;for(const c of e){(!a||a.end<c.index)&&(a=s.shift(),l=t.groupIndices.indexOf(a.start));let u;c.index===a.start?u={index:l,type:"group"}:u={groupIndex:l,index:c.index-(l+1)+n},i.push({...u,data:c.data,offset:c.offset,originalIndex:c.index,size:c.size})}return i}function U1(e,t){var n;return e===void 0?0:typeof e=="number"?e:(n=e[t])!=null?n:0}const Eo=Qe(([{data:e,firstItemIndex:t,gap:n,sizes:r,totalCount:o},i,{listBoundary:s,topListHeight:a,visibleRange:l},{initialTopMostItemIndex:c,scrolledToInitialItem:u},{topListHeight:d},f,{didMount:h},{recalcInProgress:g}])=>{const y=ge([]),m=ge(0),v=Ke(),b=ge(0);Ae(i.topItemsIndexes,y);const x=Xt(fe(Vt(h,g,Ne(l,Ls),Ne(o),Ne(r),Ne(c),u,Ne(y),Ne(t),Ne(n),Ne(b),e),De(([w,C,,A,,,,,,,,O])=>{const _=O&&O.length!==A;return w&&!C&&!_}),we(([,,[w,C],A,O,_,N,$,D,F,z,M])=>{var k,V,L,R;const U=O,{offsetTree:G,sizeTree:H}=U,ee=Et(m);if(A===0)return{...Fp,totalCount:A};if(w===0&&C===0)return ee===0?{...Fp,totalCount:A}:W1(ee,_,O,D,F,M||[]);if(mt(H))return ee>0?null:tc(SV(Mp(_,A),U,M),[],A,F,U,D);const se=[];if($.length>0){const ae=$[0],ce=$[$.length-1];let Q=0;for(const ue of Ei(H,ae,ce)){const oe=ue.value,he=Math.max(ue.start,ae),ie=Math.min(ue.end,ce);for(let le=he;le<=ie;le++)se.push({data:M?.[le],index:le,offset:Q,size:oe}),Q+=oe}}if(!N)return tc([],se,A,F,U,D);const te=$.length>0?$[$.length-1]+1:0,q=uV(G,w,C,te);if(q.length===0)return null;const Y=A-1,Z=Xl([],ae=>{for(const ce of q){const Q=ce.value;let ue=Q.offset,oe=ce.start;const he=Q.size;if(Q.offset<w){oe+=Math.floor((w-Q.offset+F)/(he+F));const le=oe-ce.start;ue+=le*he+le*F}oe<te&&(ue+=(te-oe)*he,oe=te);const ie=Math.min(ce.end,Y);for(let le=oe;le<=ie&&!(ue>=C);le++)ae.push({data:M?.[le],index:le,offset:ue,size:he}),ue+=he+F}}),pe=U1(z,Hs),B=U1(z,Ws);if(Z.length>0&&(pe>0||B>0)){const ae=Z[0],ce=Z[Z.length-1];if(pe>0&&ae.index>te){const Q=Math.min(pe,ae.index-te),ue=[];let oe=ae.offset;for(let he=ae.index-1;he>=ae.index-Q;he--){const ie=(V=(k=Ei(H,he,he)[0])==null?void 0:k.value)!=null?V:ae.size;oe-=ie+F,ue.unshift({data:M?.[he],index:he,offset:oe,size:ie})}Z.unshift(...ue)}if(B>0&&ce.index<Y){const Q=Math.min(B,Y-ce.index);let ue=ce.offset+ce.size+F;for(let oe=ce.index+1;oe<=ce.index+Q;oe++){const he=(R=(L=Ei(H,oe,oe)[0])==null?void 0:L.value)!=null?R:ce.size;Z.push({data:M?.[oe],index:oe,offset:ue,size:he}),ue+=he+F}}}return tc(Z,se,A,F,U,D)}),De(w=>w!==null),wt()),Fp);Ae(fe(e,De(xp),we(w=>w?.length)),o),Ae(fe(x,we(w=>w.topListHeight)),d),Ae(d,a),Ae(fe(x,we(w=>[w.top,w.bottom])),s),Ae(fe(x,we(w=>w.items)),v);const T=yn(fe(x,De(({items:w})=>w.length>0),We(o,e),De(([{items:w},C])=>w[w.length-1].originalIndex===C-1),we(([,w,C])=>[w-1,C]),wt(Ls),we(([w])=>w))),E=yn(fe(x,xr(200),De(({items:w,topItems:C})=>w.length>0&&w[0].originalIndex===C.length),we(({items:w})=>w[0].index),wt())),I=yn(fe(x,De(({items:w})=>w.length>0),we(({items:w})=>{let C=0,A=w.length-1;for(;w[C].type==="group"&&C<A;)C++;for(;w[A].type==="group"&&A>C;)A--;return{endIndex:w[A].index,startIndex:w[C].index}}),wt(M1)));return{endReached:T,initialItemCount:m,itemsRendered:v,listState:x,minOverscanItemCount:b,rangeChanged:I,startReached:E,topItemsIndexes:y,...f}},xt(ir,$1,_p,zs,$s,Rs,Wr,Pp),{singleton:!0}),G1=Qe(([{fixedFooterHeight:e,fixedHeaderHeight:t,footerHeight:n,headerHeight:r},{listState:o}])=>{const i=Ke(),s=Xt(fe(Vt(n,e,r,t,o),we(([a,l,c,u,d])=>a+l+c+u+d.offsetBottom+d.bottom)),0);return Ae(Ne(s),i),{totalListHeight:s,totalListHeightChanged:i}},xt(nn,Eo),{singleton:!0}),TV=Qe(([{viewportHeight:e},{totalListHeight:t}])=>{const n=ge(!1),r=Xt(fe(Vt(n,e,t),De(([o])=>o),we(([,o,i])=>Math.max(0,o-i)),xr(0),wt()),0);return{alignToBottom:n,paddingTopAddition:r}},xt(nn,G1),{singleton:!0}),Y1=Qe(()=>({context:ge(null)})),EV=({itemBottom:e,itemTop:t,locationParams:{align:n,behavior:r,...o},viewportBottom:i,viewportTop:s})=>t<s?{...o,align:n??"start",behavior:r}:e>i?{...o,align:n??"end",behavior:r}:null,K1=Qe(([{gap:e,sizes:t,totalCount:n},{fixedFooterHeight:r,fixedHeaderHeight:o,headerHeight:i,scrollingInProgress:s,scrollTop:a,viewportHeight:l},{scrollToIndex:c}])=>{const u=Ke();return Ae(fe(u,We(t,l,n,i,o,r,a),We(e),we(([[d,f,h,g,y,m,v,b],x])=>{const{align:T,behavior:E,calculateViewLocation:I=EV,done:w,...C}=d,A=L1(d,f,g-1),O=Vs(A,f.offsetTree,x)+y+m,_=O+$n(f.sizeTree,A)[1],N=b+m,$=b+h-v,D=I({itemBottom:_,itemTop:O,locationParams:{align:T,behavior:E,...C},viewportBottom:$,viewportTop:N});return D?w&&Vn(fe(s,De(F=>!F),So(Et(s)?1:2)),w):w?.(),D}),De(d=>d!==null)),c),{scrollIntoView:u}},xt(ir,nn,$s,Eo,Hr),{singleton:!0});function Z1(e){return e?e==="smooth"?"smooth":"auto":!1}const CV=(e,t)=>typeof e=="function"?Z1(e(t)):t&&Z1(e),kV=Qe(([{listRefresh:e,totalCount:t,fixedItemSize:n,data:r},{atBottomState:o,isAtBottom:i},{scrollToIndex:s},{scrolledToInitialItem:a},{didMount:l,propsReady:c},{log:u},{scrollingInProgress:d},{context:f},{scrollIntoView:h}])=>{const g=ge(!1),y=Ke();let m=null;function v(E){je(s,{align:"end",behavior:E,index:"LAST"})}st(fe(Vt(fe(Ne(t),So(1)),l),We(Ne(g),i,a,d),we(([[E,I],w,C,A,O])=>{let _=I&&A,N="auto";return _&&(N=CV(w,C||O),_=_&&!!N),{followOutputBehavior:N,shouldFollow:_,totalCount:E}}),De(({shouldFollow:E})=>E)),({followOutputBehavior:E,totalCount:I})=>{m&&(m(),m=null),Et(n)?requestAnimationFrame(()=>{Et(u)("following output to ",{totalCount:I},cn.DEBUG),v(E)}):m=Vn(e,()=>{Et(u)("following output to ",{totalCount:I},cn.DEBUG),v(E),m=null})});function b(E){const I=Vn(o,w=>{E&&!w.atBottom&&w.notAtBottomBecause==="SIZE_INCREASED"&&!m&&(Et(u)("scrolling to bottom due to increased size",{},cn.DEBUG),v("auto"))});setTimeout(I,100)}st(fe(Vt(Ne(g),t,c),De(([E,,I])=>E&&I),rr(({value:E},[,I])=>({refreshed:E===I,value:I}),{refreshed:!1,value:0}),De(({refreshed:E})=>E),We(g,t)),([,E])=>{Et(a)&&b(E!==!1)}),st(y,()=>{b(Et(g)!==!1)}),st(Vt(Ne(g),o),([E,I])=>{E&&!I.atBottom&&I.notAtBottomBecause==="VIEWPORT_HEIGHT_DECREASING"&&v("auto")});const x=ge(null),T=Ke();return Ae(Sp(fe(Ne(r),we(E=>{var I;return(I=E?.length)!=null?I:0})),fe(Ne(t))),T),st(fe(Vt(fe(T,So(1)),l),We(Ne(x),a,d,f),we(([[E,I],w,C,A,O])=>I&&C&&w?.({context:O,totalCount:E,scrollingInProgress:A})),De(E=>!!E),xr(0)),E=>{m&&(m(),m=null),Et(n)?requestAnimationFrame(()=>{Et(u)("scrolling into view",{}),je(h,E)}):m=Vn(e,()=>{Et(u)("scrolling into view",{}),je(h,E),m=null})}),{autoscrollToBottom:y,followOutput:g,scrollIntoViewOnChange:x}},xt(ir,Rs,$s,zs,Wr,Hr,nn,Y1,K1)),IV=Qe(([{data:e,firstItemIndex:t,gap:n,sizes:r},{initialTopMostItemIndex:o},{initialItemCount:i,listState:s},{didMount:a}])=>(Ae(fe(a,We(i),De(([,l])=>l!==0),We(o,r,t,n,e),we(([[,l],c,u,d,f,h=[]])=>W1(l,c,u,d,f,h))),s),{}),xt(ir,zs,Eo,Wr),{singleton:!0}),AV=Qe(([{didMount:e},{scrollTo:t},{listState:n}])=>{const r=ge(0);return st(fe(e,We(r),De(([,o])=>o!==0),we(([,o])=>({top:o}))),o=>{Vn(fe(n,So(1),De(i=>i.items.length>1)),()=>{requestAnimationFrame(()=>{je(t,o)})})}),{initialScrollTop:r}},xt(Wr,nn,Eo),{singleton:!0}),X1=Qe(([{scrollVelocity:e}])=>{const t=ge(!1),n=Ke(),r=ge(!1);return Ae(fe(e,We(r,t,n),De(([o,i])=>!!i),we(([o,i,s,a])=>{const{enter:l,exit:c}=i;if(s){if(c(o,a))return!1}else if(l(o,a))return!0;return s}),wt()),t),st(fe(Vt(t,e,n),We(r)),([[o,i,s],a])=>{o&&a&&a.change&&a.change(i,s)}),{isSeeking:t,scrollSeekConfiguration:r,scrollSeekRangeChanged:n,scrollVelocity:e}},xt(Rs),{singleton:!0}),Lp=Qe(([{scrollContainerState:e,scrollTo:t}])=>{const n=Ke(),r=Ke(),o=Ke(),i=ge(!1),s=ge(void 0);return Ae(fe(Vt(n,r),we(([{scrollHeight:a,scrollTop:l,viewportHeight:c},{offsetTop:u}])=>({scrollHeight:a,scrollTop:Math.max(0,l-u),viewportHeight:c}))),e),Ae(fe(t,We(r),we(([a,{offsetTop:l}])=>({...a,top:a.top+l}))),o),{customScrollParent:s,useWindowScroll:i,windowScrollContainerState:n,windowScrollTo:o,windowViewportRect:r}},xt(nn)),PV=Qe(([{sizeRanges:e,sizes:t},{headerHeight:n,scrollTop:r},{initialTopMostItemIndex:o},{didMount:i},{useWindowScroll:s,windowScrollContainerState:a,windowViewportRect:l}])=>{const c=Ke(),u=ge(void 0),d=ge(null),f=ge(null);return Ae(a,d),Ae(l,f),st(fe(c,We(t,r,s,d,f,n)),([h,g,y,m,v,b,x])=>{const T=fV(g.sizeTree);m&&v!==null&&b!==null&&(y=v.scrollTop-b.offsetTop),y-=x,h({ranges:T,scrollTop:y})}),Ae(fe(u,De(xp),we(OV)),o),Ae(fe(i,We(u),De(([,h])=>h!==void 0),wt(),we(([,h])=>h.ranges)),e),{getState:c,restoreStateFrom:u}},xt(ir,nn,zs,Wr,Lp));function OV(e){return{align:"start",index:0,offset:e.scrollTop}}const DV=Qe(([{topItemsIndexes:e}])=>{const t=ge(0);return Ae(fe(t,De(n=>n>=0),we(n=>Array.from({length:n}).map((r,o)=>o))),e),{topItemCount:t}},xt(Eo));function Q1(e){let t=!1,n;return(()=>(t||(t=!0,n=e()),n))}const NV=Q1(()=>/iP(ad|od|hone)/i.test(navigator.userAgent)&&/WebKit/i.test(navigator.userAgent)),MV=Qe(([{deviation:e,scrollBy:t,scrollingInProgress:n,scrollTop:r},{isAtBottom:o,isScrolling:i,lastJumpDueToItemResize:s,scrollDirection:a},{listState:l},{beforeUnshiftWith:c,gap:u,shiftWithOffset:d,sizes:f},{log:h},{recalcInProgress:g}])=>{const y=yn(fe(l,We(s),rr(([,v,b,x],[{bottom:T,items:E,offsetBottom:I,totalCount:w},C])=>{const A=T+I;let O=0;return b===w&&v.length>0&&E.length>0&&(E[0].originalIndex===0&&v[0].originalIndex===0||(O=A-x,O!==0&&(O+=C))),[O,E,w,A]},[0,[],0,0]),De(([v])=>v!==0),We(r,a,n,o,h,g),De(([,v,b,x,,,T])=>!T&&!x&&v!==0&&b===js),we(([[v],,,,,b])=>(b("Upward scrolling compensation",{amount:v},cn.DEBUG),v))));function m(v){v>0?(je(t,{behavior:"auto",top:-v}),je(e,0)):(je(e,0),je(t,{behavior:"auto",top:-v}))}return st(fe(y,We(e,i)),([v,b,x])=>{x&&NV()?je(e,b-v):m(-v)}),st(fe(Vt(Xt(i,!1),e,g),De(([v,b,x])=>!v&&!x&&b!==0),we(([v,b])=>b),xr(1)),m),Ae(fe(d,we(v=>({top:-v}))),t),st(fe(c,We(f,u),we(([v,{groupIndices:b,lastSize:x,sizeTree:T},E])=>{function I(w){return w*(x+E)}if(b.length===0)return I(v);{let w=0;const C=Fs(T,0);let A=0,O=0;for(;A<v;){A++,w+=C;let _=b.length===O+1?1/0:b[O+1]-b[O]-1;A+_>v&&(w-=C,_=v-A+1),A+=_,w+=I(_),O++}return w}})),v=>{je(e,v),requestAnimationFrame(()=>{je(t,{top:v}),requestAnimationFrame(()=>{je(e,0),je(g,!1)})})}),{deviation:e}},xt(nn,Rs,Eo,ir,Hr,Pp)),_V=Qe(([e,t,n,r,o,i,s,a,l,c,u])=>({...e,...t,...n,...r,...o,...i,...s,...a,...l,...c,...u}),xt(_p,IV,Wr,X1,G1,AV,TV,Lp,K1,Hr,Y1)),J1=Qe(([{data:e,defaultItemSize:t,firstItemIndex:n,fixedItemSize:r,fixedGroupSize:o,gap:i,groupIndices:s,heightEstimates:a,itemSize:l,sizeRanges:c,sizes:u,statefulTotalCount:d,totalCount:f,trackItemSizes:h},{initialItemFinalLocationReached:g,initialTopMostItemIndex:y,scrolledToInitialItem:m},v,b,x,T,{scrollToIndex:E},I,{topItemCount:w},{groupCounts:C},A])=>{const{listState:O,minOverscanItemCount:_,topItemsIndexes:N,rangeChanged:$,...D}=T;return Ae($,A.scrollSeekRangeChanged),Ae(fe(A.windowViewportRect,we(F=>F.visibleHeight)),v.viewportHeight),{data:e,defaultItemHeight:t,firstItemIndex:n,fixedItemHeight:r,fixedGroupHeight:o,gap:i,groupCounts:C,heightEstimates:a,initialItemFinalLocationReached:g,initialTopMostItemIndex:y,scrolledToInitialItem:m,sizeRanges:c,topItemCount:w,topItemsIndexes:N,totalCount:f,...x,groupIndices:s,itemSize:l,listState:O,minOverscanItemCount:_,scrollToIndex:E,statefulTotalCount:d,trackItemSizes:h,rangeChanged:$,...D,...A,...v,sizes:u,...b}},xt(ir,zs,nn,PV,kV,Eo,$s,MV,DV,$1,_V));function FV(e,t){const n={},r={};let o=0;const i=e.length;for(;o<i;)r[e[o]]=1,o+=1;for(const s in t)Object.hasOwn(r,s)||(n[s]=t[s]);return n}const nc=typeof document<"u"?S.useLayoutEffect:S.useEffect;function Vp(e,t,n){const r=Object.keys(t.required||{}),o=Object.keys(t.optional||{}),i=Object.keys(t.methods||{}),s=Object.keys(t.events||{}),a=S.createContext({});function l(m,v){m.propsReady&&je(m.propsReady,!1);for(const b of r){const x=m[t.required[b]];je(x,v[b])}for(const b of o)if(b in v){const x=m[t.optional[b]];je(x,v[b])}m.propsReady&&je(m.propsReady,!0)}function c(m){return i.reduce((v,b)=>(v[b]=x=>{const T=m[t.methods[b]];je(T,x)},v),{})}function u(m){return s.reduce((v,b)=>(v[b]=QL(m[t.events[b]]),v),{})}const d=S.forwardRef((m,v)=>{const{children:b,...x}=m,[T]=S.useState(()=>Xl(eV(e),w=>{l(w,x)})),[E]=S.useState(S1(u,T));nc(()=>{for(const w of s)w in x&&st(E[w],x[w]);return()=>{Object.values(E).map(wp)}},[x,E,T]),nc(()=>{l(T,x)}),S.useImperativeHandle(v,w1(c(T)));const I=n;return p.jsx(a.Provider,{value:T,children:n?p.jsx(I,{...FV([...r,...o,...s],x),children:b}):b})}),f=m=>{const v=S.useContext(a);return S.useCallback(b=>{je(v[m],b)},[v,m])},h=m=>{const v=S.useContext(a)[m],b=S.useCallback(x=>st(v,x),[v]);return S.useSyncExternalStore(b,()=>Et(v),()=>Et(v))},g=m=>{const v=S.useContext(a)[m],[b,x]=S.useState(S1(Et,v));return nc(()=>st(v,T=>{T!==b&&x(w1(T))}),[v,b]),b},y=S.version.startsWith("18")?h:g;return{Component:d,useEmitter:(m,v)=>{const b=S.useContext(a)[m];nc(()=>st(b,v),[v,b])},useEmitterValue:y,usePublisher:f}}const rc=S.createContext(void 0),eS=S.createContext(void 0),tS=typeof document<"u"?S.useLayoutEffect:S.useEffect;function $p(e){return"self"in e}function LV(e){return"body"in e}function nS(e,t,n,r=Si,o,i){const s=S.useRef(null),a=S.useRef(null),l=S.useRef(null),c=S.useCallback(f=>{let h,g,y;const m=f.target;if(LV(m)||$p(m)){const b=$p(m)?m:m.defaultView;y=i?b.scrollX:b.scrollY,h=i?b.document.documentElement.scrollWidth:b.document.documentElement.scrollHeight,g=i?b.innerWidth:b.innerHeight}else y=i?m.scrollLeft:m.scrollTop,h=i?m.scrollWidth:m.scrollHeight,g=i?m.offsetWidth:m.offsetHeight;const v=()=>{e({scrollHeight:h,scrollTop:Math.max(y,0),viewportHeight:g})};f.suppressFlushSync?v():qi.flushSync(v),a.current!==null&&(y===a.current||y<=0||y===h-g)&&(a.current=null,t(!0),l.current&&(clearTimeout(l.current),l.current=null))},[e,t,i]);S.useEffect(()=>{const f=o||s.current;return r(o||s.current),c({suppressFlushSync:!0,target:f}),f.addEventListener("scroll",c,{passive:!0}),()=>{r(null),f.removeEventListener("scroll",c)}},[s,c,n,r,o]);function u(f){const h=s.current;if(!h||(i?"offsetWidth"in h&&h.offsetWidth===0:"offsetHeight"in h&&h.offsetHeight===0))return;const g=f.behavior==="smooth";let y,m,v;$p(h)?(m=Math.max(zn(h.document.documentElement,i?"width":"height"),i?h.document.documentElement.scrollWidth:h.document.documentElement.scrollHeight),y=i?h.innerWidth:h.innerHeight,v=i?window.scrollX:window.scrollY):(m=h[i?"scrollWidth":"scrollHeight"],y=zn(h,i?"width":"height"),v=h[i?"scrollLeft":"scrollTop"]);const b=m-y;if(f.top=Math.ceil(Math.max(Math.min(b,f.top),0)),j1(y,m)||f.top===v){e({scrollHeight:m,scrollTop:v,viewportHeight:y}),g&&t(!0);return}g?(a.current=f.top,l.current&&clearTimeout(l.current),l.current=setTimeout(()=>{l.current=null,a.current=null,t(!0)},1e3)):a.current=null,i&&(f={behavior:f.behavior,left:f.top}),h.scrollTo(f)}function d(f){i&&(f={behavior:f.behavior,left:f.top}),s.current.scrollBy(f)}return{scrollByCallback:d,scrollerRef:s,scrollToCallback:u}}const zp="-webkit-sticky",rS="sticky",jp=Q1(()=>{if(typeof document>"u")return rS;const e=document.createElement("div");return e.style.position=zp,e.style.position===zp?zp:rS});function Bp(e){return e}const VV=Qe(()=>{const e=ge(a=>`Item ${a}`),t=ge(a=>`Group ${a}`),n=ge({}),r=ge(Bp),o=ge("div"),i=ge(Si),s=(a,l=null)=>Xt(fe(n,we(c=>c[a]),wt()),l);return{components:n,computeItemKey:r,EmptyPlaceholder:s("EmptyPlaceholder"),FooterComponent:s("Footer"),GroupComponent:s("Group","div"),groupContent:t,HeaderComponent:s("Header"),HeaderFooterTag:o,ItemComponent:s("Item","div"),itemContent:e,ListComponent:s("List","div"),ScrollerComponent:s("Scroller","div"),scrollerRef:i,ScrollSeekPlaceholder:s("ScrollSeekPlaceholder"),TopItemListComponent:s("TopItemList")}}),$V=Qe(([e,t])=>({...e,...t}),xt(J1,VV)),zV=({height:e})=>p.jsx("div",{style:{height:e}}),jV={overflowAnchor:"none",position:jp(),zIndex:1},oS={overflowAnchor:"none"},BV={...oS,display:"inline-block",height:"100%"},iS=S.memo(function({showTopList:e=!1}){const t=Fe("listState"),n=En("sizeRanges"),r=Fe("useWindowScroll"),o=Fe("customScrollParent"),i=En("windowScrollContainerState"),s=En("scrollContainerState"),a=o||r?i:s,l=Fe("itemContent"),c=Fe("context"),u=Fe("groupContent"),d=Fe("trackItemSizes"),f=Fe("itemSize"),h=Fe("log"),g=En("gap"),y=Fe("horizontalDirection"),{callbackRef:m}=C1(n,f,d,e?Si:a,h,g,o,y,Fe("skipAnimationFrameInResizeObserver")),[v,b]=S.useState(0);Wp("deviation",D=>{v!==D&&b(D)});const x=Fe("EmptyPlaceholder"),T=Fe("ScrollSeekPlaceholder")||zV,E=Fe("ListComponent"),I=Fe("ItemComponent"),w=Fe("GroupComponent"),C=Fe("computeItemKey"),A=Fe("isSeeking"),O=Fe("groupIndices").length>0,_=Fe("alignToBottom"),N=Fe("initialItemFinalLocationReached"),$=e?{}:{boxSizing:"border-box",...y?{display:"inline-block",height:"100%",marginLeft:v!==0?v:_?"auto":0,paddingLeft:t.offsetTop,paddingRight:t.offsetBottom,whiteSpace:"nowrap"}:{marginTop:v!==0?v:_?"auto":0,paddingBottom:t.offsetBottom,paddingTop:t.offsetTop},...N?{}:{visibility:"hidden"}};return!e&&t.totalCount===0&&x?p.jsx(x,{...St(x,c)}):p.jsx(E,{...St(E,c),"data-testid":e?"virtuoso-top-item-list":"virtuoso-item-list",ref:m,style:$,children:(e?t.topItems:t.items).map(D=>{const F=D.originalIndex,z=C(F+t.firstItemIndex,D.data,c);return A?S.createElement(T,{...St(T,c),height:D.size,index:D.index,key:z,type:D.type||"item",...D.type==="group"?{}:{groupIndex:D.groupIndex}}):D.type==="group"?S.createElement(w,{...St(w,c),"data-index":F,"data-item-index":D.index,"data-known-size":D.size,key:z,style:jV},u(D.index,c)):S.createElement(I,{...St(I,c),...sS(I,D.data),"data-index":F,"data-item-group-index":D.groupIndex,"data-item-index":D.index,"data-known-size":D.size,key:z,style:y?BV:oS},O?l(D.index,D.groupIndex,D.data,c):l(D.index,D.data,c))})})}),RV={height:"100%",outline:"none",overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},HV={outline:"none",overflowX:"auto",position:"relative"},Ci=e=>({height:"100%",position:"absolute",top:0,width:"100%",...e?{display:"flex",flexDirection:"column"}:{}}),WV={position:jp(),top:0,width:"100%",zIndex:1};function St(e,t){if(typeof e!="string")return{context:t}}function sS(e,t){return{item:typeof e=="string"?void 0:t}}const qV=S.memo(function(){const e=Fe("HeaderComponent"),t=En("headerHeight"),n=Fe("HeaderFooterTag"),r=or(S.useMemo(()=>i=>{t(zn(i,"height"))},[t]),!0,Fe("skipAnimationFrameInResizeObserver")),o=Fe("context");return e?p.jsx(n,{ref:r,children:p.jsx(e,{...St(e,o)})}):null}),UV=S.memo(function(){const e=Fe("FooterComponent"),t=En("footerHeight"),n=Fe("HeaderFooterTag"),r=or(S.useMemo(()=>i=>{t(zn(i,"height"))},[t]),!0,Fe("skipAnimationFrameInResizeObserver")),o=Fe("context");return e?p.jsx(n,{ref:r,children:p.jsx(e,{...St(e,o)})}):null});function Rp({useEmitter:e,useEmitterValue:t,usePublisher:n}){return S.memo(function({children:r,style:o,context:i,...s}){const a=n("scrollContainerState"),l=t("ScrollerComponent"),c=n("smoothScrollTargetReached"),u=t("scrollerRef"),d=t("horizontalDirection")||!1,{scrollByCallback:f,scrollerRef:h,scrollToCallback:g}=nS(a,c,l,u,void 0,d);return e("scrollTo",g),e("scrollBy",f),p.jsx(l,{"data-testid":"virtuoso-scroller","data-virtuoso-scroller":!0,ref:h,style:{...d?HV:RV,...o},tabIndex:0,...s,...St(l,i),children:r})})}function Hp({useEmitter:e,useEmitterValue:t,usePublisher:n}){return S.memo(function({children:r,style:o,context:i,...s}){const a=n("windowScrollContainerState"),l=t("ScrollerComponent"),c=n("smoothScrollTargetReached"),u=t("totalListHeight"),d=t("deviation"),f=t("customScrollParent"),h=S.useRef(null),g=t("scrollerRef"),{scrollByCallback:y,scrollerRef:m,scrollToCallback:v}=nS(a,c,l,g,f);return tS(()=>{var b;return m.current=f||((b=h.current)==null?void 0:b.ownerDocument.defaultView),()=>{m.current=null}},[m,f]),e("windowScrollTo",v),e("scrollBy",y),p.jsx(l,{ref:h,"data-virtuoso-scroller":!0,style:{position:"relative",...o,...u!==0?{height:u+d}:{}},...s,...St(l,i),children:r})})}const GV=({children:e})=>{const t=S.useContext(rc),n=En("viewportHeight"),r=En("fixedItemHeight"),o=Fe("alignToBottom"),i=Fe("horizontalDirection"),s=S.useMemo(()=>Ms(n,l=>zn(l,i?"width":"height")),[n,i]),a=or(s,!0,Fe("skipAnimationFrameInResizeObserver"));return S.useEffect(()=>{t&&(n(t.viewportHeight),r(t.itemHeight))},[t,n,r]),p.jsx("div",{"data-viewport-type":"element",ref:a,style:Ci(o),children:e})},YV=({children:e})=>{const t=S.useContext(rc),n=En("windowViewportRect"),r=En("fixedItemHeight"),o=Fe("customScrollParent"),i=Ep(n,o,Fe("skipAnimationFrameInResizeObserver")),s=Fe("alignToBottom");return S.useEffect(()=>{t&&(r(t.itemHeight),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:100}))},[t,n,r]),p.jsx("div",{"data-viewport-type":"window",ref:i,style:Ci(s),children:e})},KV=({children:e})=>{const t=Fe("TopItemListComponent")||"div",n=Fe("headerHeight"),r={...WV,marginTop:`${n}px`},o=Fe("context");return p.jsx(t,{style:r,...St(t,o),children:e})},ZV=S.memo(function(e){const t=Fe("useWindowScroll"),n=Fe("topItemsIndexes").length>0,r=Fe("customScrollParent"),o=Fe("context");return p.jsxs(r||t?JV:QV,{...e,context:o,children:[n&&p.jsx(KV,{children:p.jsx(iS,{showTopList:!0})}),p.jsxs(r||t?YV:GV,{children:[p.jsx(qV,{}),p.jsx(iS,{}),p.jsx(UV,{})]})]})}),{Component:XV,useEmitter:Wp,useEmitterValue:Fe,usePublisher:En}=Vp($V,{required:{},optional:{restoreStateFrom:"restoreStateFrom",context:"context",followOutput:"followOutput",scrollIntoViewOnChange:"scrollIntoViewOnChange",itemContent:"itemContent",groupContent:"groupContent",overscan:"overscan",increaseViewportBy:"increaseViewportBy",minOverscanItemCount:"minOverscanItemCount",totalCount:"totalCount",groupCounts:"groupCounts",topItemCount:"topItemCount",firstItemIndex:"firstItemIndex",initialTopMostItemIndex:"initialTopMostItemIndex",components:"components",atBottomThreshold:"atBottomThreshold",atTopThreshold:"atTopThreshold",computeItemKey:"computeItemKey",defaultItemHeight:"defaultItemHeight",fixedGroupHeight:"fixedGroupHeight",fixedItemHeight:"fixedItemHeight",heightEstimates:"heightEstimates",itemSize:"itemSize",scrollSeekConfiguration:"scrollSeekConfiguration",headerFooterTag:"HeaderFooterTag",data:"data",initialItemCount:"initialItemCount",initialScrollTop:"initialScrollTop",alignToBottom:"alignToBottom",useWindowScroll:"useWindowScroll",customScrollParent:"customScrollParent",scrollerRef:"scrollerRef",logLevel:"logLevel",horizontalDirection:"horizontalDirection",skipAnimationFrameInResizeObserver:"skipAnimationFrameInResizeObserver"},methods:{scrollToIndex:"scrollToIndex",scrollIntoView:"scrollIntoView",scrollTo:"scrollTo",scrollBy:"scrollBy",autoscrollToBottom:"autoscrollToBottom",getState:"getState"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",totalListHeightChanged:"totalListHeightChanged",itemsRendered:"itemsRendered",groupIndices:"groupIndices"}},ZV),QV=Rp({useEmitter:Wp,useEmitterValue:Fe,usePublisher:En}),JV=Hp({useEmitter:Wp,useEmitterValue:Fe,usePublisher:En}),qp=XV,e$=Qe(()=>{const e=ge(c=>p.jsxs("td",{children:["Item $",c]})),t=ge(null),n=ge(c=>p.jsxs("td",{colSpan:1e3,children:["Group ",c]})),r=ge(null),o=ge(null),i=ge({}),s=ge(Bp),a=ge(Si),l=(c,u=null)=>Xt(fe(i,we(d=>d[c]),wt()),u);return{components:i,computeItemKey:s,context:t,EmptyPlaceholder:l("EmptyPlaceholder"),FillerRow:l("FillerRow"),fixedFooterContent:o,fixedHeaderContent:r,itemContent:e,groupContent:n,ScrollerComponent:l("Scroller","div"),scrollerRef:a,ScrollSeekPlaceholder:l("ScrollSeekPlaceholder"),TableBodyComponent:l("TableBody","tbody"),TableComponent:l("Table","table"),TableFooterComponent:l("TableFoot","tfoot"),TableHeadComponent:l("TableHead","thead"),TableRowComponent:l("TableRow","tr"),GroupComponent:l("Group","tr")}}),t$=Qe(([e,t])=>({...e,...t}),xt(J1,e$)),n$=({height:e})=>p.jsx("tr",{children:p.jsx("td",{style:{height:e}})}),r$=({height:e})=>p.jsx("tr",{children:p.jsx("td",{style:{border:0,height:e,padding:0}})}),o$={overflowAnchor:"none"},aS={position:jp(),zIndex:2,overflowAnchor:"none"},lS=S.memo(function({showTopList:e=!1}){const t=Be("listState"),n=Be("computeItemKey"),r=Be("firstItemIndex"),o=Be("context"),i=Be("isSeeking"),s=Be("fixedHeaderHeight"),a=Be("groupIndices").length>0,l=Be("itemContent"),c=Be("groupContent"),u=Be("ScrollSeekPlaceholder")||n$,d=Be("GroupComponent"),f=Be("TableRowComponent"),h=(e?t.topItems:[]).reduce((y,m,v)=>(v===0?y.push(m.size):y.push(y[v-1]+m.size),y),[]),g=(e?t.topItems:t.items).map(y=>{const m=y.originalIndex,v=n(m+r,y.data,o),b=e?m===0?0:h[m-1]:0;return i?S.createElement(u,{...St(u,o),height:y.size,index:y.index,key:v,type:y.type||"item"}):y.type==="group"?S.createElement(d,{...St(d,o),"data-index":m,"data-item-index":y.index,"data-known-size":y.size,key:v,style:{...aS,top:s}},c(y.index,o)):S.createElement(f,{...St(f,o),...sS(f,y.data),"data-index":m,"data-item-index":y.index,"data-known-size":y.size,"data-item-group-index":y.groupIndex,key:v,style:e?{...aS,top:s+b}:o$},a?l(y.index,y.groupIndex,y.data,o):l(y.index,y.data,o))});return p.jsx(p.Fragment,{children:g})}),i$=S.memo(function(){const e=Be("listState"),t=Be("topItemsIndexes").length>0,n=jn("sizeRanges"),r=Be("useWindowScroll"),o=Be("customScrollParent"),i=jn("windowScrollContainerState"),s=jn("scrollContainerState"),a=o||r?i:s,l=Be("trackItemSizes"),c=Be("itemSize"),u=Be("log"),{callbackRef:d,ref:f}=C1(n,c,l,a,u,void 0,o,!1,Be("skipAnimationFrameInResizeObserver")),[h,g]=S.useState(0);Up("deviation",O=>{h!==O&&(f.current.style.marginTop=`${O}px`,g(O))});const y=Be("EmptyPlaceholder"),m=Be("FillerRow")||r$,v=Be("TableBodyComponent"),b=Be("paddingTopAddition"),x=Be("statefulTotalCount"),T=Be("context");if(x===0&&y)return p.jsx(y,{...St(y,T)});const E=(t?e.topItems:[]).reduce((O,_)=>O+_.size,0),I=e.offsetTop+b+h-E,w=e.offsetBottom,C=I>0?p.jsx(m,{context:T,height:I},"padding-top"):null,A=w>0?p.jsx(m,{context:T,height:w},"padding-bottom"):null;return p.jsxs(v,{"data-testid":"virtuoso-item-list",ref:d,...St(v,T),children:[C,t&&p.jsx(lS,{showTopList:!0}),p.jsx(lS,{}),A]})}),s$=({children:e})=>{const t=S.useContext(rc),n=jn("viewportHeight"),r=jn("fixedItemHeight"),o=or(S.useMemo(()=>Ms(n,i=>zn(i,"height")),[n]),!0,Be("skipAnimationFrameInResizeObserver"));return S.useEffect(()=>{t&&(n(t.viewportHeight),r(t.itemHeight))},[t,n,r]),p.jsx("div",{"data-viewport-type":"element",ref:o,style:Ci(!1),children:e})},a$=({children:e})=>{const t=S.useContext(rc),n=jn("windowViewportRect"),r=jn("fixedItemHeight"),o=Be("customScrollParent"),i=Ep(n,o,Be("skipAnimationFrameInResizeObserver"));return S.useEffect(()=>{t&&(r(t.itemHeight),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:100}))},[t,n,r]),p.jsx("div",{"data-viewport-type":"window",ref:i,style:Ci(!1),children:e})},l$=S.memo(function(e){const t=Be("useWindowScroll"),n=Be("customScrollParent"),r=jn("fixedHeaderHeight"),o=jn("fixedFooterHeight"),i=Be("fixedHeaderContent"),s=Be("fixedFooterContent"),a=Be("context"),l=or(S.useMemo(()=>Ms(r,v=>zn(v,"height")),[r]),!0,Be("skipAnimationFrameInResizeObserver")),c=or(S.useMemo(()=>Ms(o,v=>zn(v,"height")),[o]),!0,Be("skipAnimationFrameInResizeObserver")),u=n||t?d$:u$,d=n||t?a$:s$,f=Be("TableComponent"),h=Be("TableHeadComponent"),g=Be("TableFooterComponent"),y=i?p.jsx(h,{ref:l,style:{position:"sticky",top:0,zIndex:2},...St(h,a),children:i()},"TableHead"):null,m=s?p.jsx(g,{ref:c,style:{bottom:0,position:"sticky",zIndex:1},...St(g,a),children:s()},"TableFoot"):null;return p.jsx(u,{...e,...St(u,a),children:p.jsx(d,{children:p.jsxs(f,{style:{borderSpacing:0,overflowAnchor:"none"},...St(f,a),children:[y,p.jsx(i$,{},"TableBody"),m]})})})}),{Component:c$,useEmitter:Up,useEmitterValue:Be,usePublisher:jn}=Vp(t$,{required:{},optional:{restoreStateFrom:"restoreStateFrom",context:"context",followOutput:"followOutput",firstItemIndex:"firstItemIndex",itemContent:"itemContent",groupContent:"groupContent",fixedHeaderContent:"fixedHeaderContent",fixedFooterContent:"fixedFooterContent",overscan:"overscan",increaseViewportBy:"increaseViewportBy",minOverscanItemCount:"minOverscanItemCount",totalCount:"totalCount",topItemCount:"topItemCount",initialTopMostItemIndex:"initialTopMostItemIndex",components:"components",groupCounts:"groupCounts",atBottomThreshold:"atBottomThreshold",atTopThreshold:"atTopThreshold",computeItemKey:"computeItemKey",defaultItemHeight:"defaultItemHeight",fixedGroupHeight:"fixedGroupHeight",fixedItemHeight:"fixedItemHeight",itemSize:"itemSize",scrollSeekConfiguration:"scrollSeekConfiguration",data:"data",initialItemCount:"initialItemCount",initialScrollTop:"initialScrollTop",alignToBottom:"alignToBottom",useWindowScroll:"useWindowScroll",customScrollParent:"customScrollParent",scrollerRef:"scrollerRef",logLevel:"logLevel"},methods:{scrollToIndex:"scrollToIndex",scrollIntoView:"scrollIntoView",scrollTo:"scrollTo",scrollBy:"scrollBy",getState:"getState"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",totalListHeightChanged:"totalListHeightChanged",itemsRendered:"itemsRendered",groupIndices:"groupIndices"}},l$),u$=Rp({useEmitter:Up,useEmitterValue:Be,usePublisher:jn}),d$=Hp({useEmitter:Up,useEmitterValue:Be,usePublisher:jn}),f$=c$,cS={bottom:0,itemHeight:0,items:[],itemWidth:0,offsetBottom:0,offsetTop:0,top:0},p$={bottom:0,itemHeight:0,items:[{index:0}],itemWidth:0,offsetBottom:0,offsetTop:0,top:0},{ceil:uS,floor:oc,max:qs,min:Gp,round:dS}=Math;function fS(e,t,n){return Array.from({length:t-e+1}).map((r,o)=>({data:n===null?null:n[o+e],index:o+e}))}function h$(e){return{...p$,items:e}}function ic(e,t){return e&&e.width===t.width&&e.height===t.height}function m$(e,t){return e&&e.column===t.column&&e.row===t.row}const g$=Qe(([{increaseViewportBy:e,listBoundary:t,overscan:n,visibleRange:r},{footerHeight:o,headerHeight:i,scrollBy:s,scrollContainerState:a,scrollTo:l,scrollTop:c,smoothScrollTargetReached:u,viewportHeight:d},f,h,{didMount:g,propsReady:y},{customScrollParent:m,useWindowScroll:v,windowScrollContainerState:b,windowScrollTo:x,windowViewportRect:T},E])=>{const I=ge(0),w=ge(0),C=ge(cS),A=ge({height:0,width:0}),O=ge({height:0,width:0}),_=Ke(),N=Ke(),$=ge(0),D=ge(null),F=ge({column:0,row:0}),z=Ke(),M=Ke(),k=ge(!1),V=ge(0),L=ge(!0),R=ge(!1),U=ge(!1);st(fe(g,We(V),De(([q,Y])=>!!Y)),()=>{je(L,!1)}),st(fe(Vt(g,L,O,A,V,R),De(([q,Y,Z,pe,,B])=>q&&!Y&&Z.height!==0&&pe.height!==0&&!B)),([,,,,q])=>{je(R,!0),Np(1,()=>{je(_,q)}),Vn(fe(c),()=>{je(t,[0,0]),je(L,!0)})}),Ae(fe(M,De(q=>q!=null&&q.scrollTop>0),nr(0)),w),st(fe(g,We(M),De(([,q])=>q!=null)),([,q])=>{q&&(je(A,q.viewport),je(O,q.item),je(F,q.gap),q.scrollTop>0&&(je(k,!0),Vn(fe(c,So(1)),Y=>{je(k,!1)}),je(l,{top:q.scrollTop})))}),Ae(fe(A,we(({height:q})=>q)),d),Ae(fe(Vt(Ne(A,ic),Ne(O,ic),Ne(F,(q,Y)=>q&&q.column===Y.column&&q.row===Y.row),Ne(c)),we(([q,Y,Z,pe])=>({gap:Z,item:Y,scrollTop:pe,viewport:q}))),z),Ae(fe(Vt(Ne(I),r,Ne(F,m$),Ne(O,ic),Ne(A,ic),Ne(D),Ne(w),Ne(k),Ne(L),Ne(V)),De(([,,,,,,,q])=>!q),we(([q,[Y,Z],pe,B,ae,ce,Q,,ue,oe])=>{const{column:he,row:ie}=pe,{height:le,width:be}=B,{width:de}=ae;if(Q===0&&(q===0||de===0))return cS;if(be===0){const _e=Mp(oe,q),ct=_e+Math.max(Q-1,0);return h$(fS(_e,ct,ce))}const re=pS(de,be,he);let J,j;ue?Y===0&&Z===0&&Q>0?(J=0,j=Q-1):(J=re*oc((Y+ie)/(le+ie)),j=re*uS((Z+ie)/(le+ie))-1,j=Gp(q-1,qs(j,re-1)),J=Gp(j,qs(0,J))):(J=0,j=-1);const X=fS(J,j,ce),{bottom:me,top:ve}=hS(ae,pe,B,X),Ce=uS(q/re),Me=Ce*le+(Ce-1)*ie-me;return{bottom:me,itemHeight:le,items:X,itemWidth:be,offsetBottom:Me,offsetTop:ve,top:ve}})),C),Ae(fe(D,De(q=>q!==null),we(q=>q.length)),I),Ae(fe(Vt(A,O,C,F),De(([q,Y,{items:Z}])=>Z.length>0&&Y.height!==0&&q.height!==0),we(([q,Y,{items:Z},pe])=>{const{bottom:B,top:ae}=hS(q,pe,Y,Z);return[ae,B]}),wt(Ls)),t);const G=ge(!1);Ae(fe(c,We(G),we(([q,Y])=>Y||q!==0)),G);const H=yn(fe(Vt(C,I),De(([{items:q}])=>q.length>0),We(G),De(([[q,Y],Z])=>{const pe=q.items[q.items.length-1].index===Y-1;return(Z||q.bottom>0&&q.itemHeight>0&&q.offsetBottom===0&&q.items.length===Y)&&pe}),we(([[,q]])=>q-1),wt())),ee=yn(fe(Ne(C),De(({items:q})=>q.length>0&&q[0].index===0),nr(0),wt())),se=yn(fe(Ne(C),We(k),De(([{items:q},Y])=>q.length>0&&!Y),we(([{items:q}])=>({endIndex:q[q.length-1].index,startIndex:q[0].index})),wt(M1),xr(0)));Ae(se,h.scrollSeekRangeChanged),Ae(fe(_,We(A,O,I,F),we(([q,Y,Z,pe,B])=>{const ae=z1(q),{align:ce,behavior:Q,offset:ue}=ae;let oe=ae.index;oe==="LAST"&&(oe=pe-1),oe=qs(0,oe,Gp(pe-1,oe));let he=Yp(Y,B,Z,oe);return ce==="end"?he=dS(he-Y.height+Z.height):ce==="center"&&(he=dS(he-Y.height/2+Z.height/2)),ue&&(he+=ue),{behavior:Q,top:he}})),l);const te=Xt(fe(C,we(q=>q.offsetBottom+q.bottom)),0);return Ae(fe(T,we(q=>({height:q.visibleHeight,width:q.visibleWidth}))),A),{customScrollParent:m,data:D,deviation:$,footerHeight:o,gap:F,headerHeight:i,increaseViewportBy:e,initialItemCount:w,itemDimensions:O,overscan:n,restoreStateFrom:M,scrollBy:s,scrollContainerState:a,scrollHeight:N,scrollTo:l,scrollToIndex:_,scrollTop:c,smoothScrollTargetReached:u,totalCount:I,useWindowScroll:v,viewportDimensions:A,windowScrollContainerState:b,windowScrollTo:x,windowViewportRect:T,...h,gridState:C,horizontalDirection:U,initialTopMostItemIndex:V,totalListHeight:te,...f,endReached:H,propsReady:y,rangeChanged:se,startReached:ee,stateChanged:z,stateRestoreInProgress:k,...E}},xt(_p,nn,Rs,X1,Wr,Lp,Hr));function pS(e,t,n){return qs(1,oc((e+n)/(oc(t)+n)))}function hS(e,t,n,r){const{height:o}=n;if(o===void 0||r.length===0)return{bottom:0,top:0};const i=Yp(e,t,n,r[0].index);return{bottom:Yp(e,t,n,r[r.length-1].index)+o,top:i}}function Yp(e,t,n,r){const o=pS(e.width,n.width,t.column),i=oc(r/o),s=i*n.height+qs(0,i-1)*t.row;return s>0?s+t.row:s}const y$=Qe(()=>{const e=ge(d=>`Item ${d}`),t=ge({}),n=ge(null),r=ge("virtuoso-grid-item"),o=ge("virtuoso-grid-list"),i=ge(Bp),s=ge("div"),a=ge(Si),l=(d,f=null)=>Xt(fe(t,we(h=>h[d]),wt()),f),c=ge(!1),u=ge(!1);return Ae(Ne(u),c),{components:t,computeItemKey:i,context:n,FooterComponent:l("Footer"),HeaderComponent:l("Header"),headerFooterTag:s,itemClassName:r,ItemComponent:l("Item","div"),itemContent:e,listClassName:o,ListComponent:l("List","div"),readyStateChanged:c,reportReadyState:u,ScrollerComponent:l("Scroller","div"),scrollerRef:a,ScrollSeekPlaceholder:l("ScrollSeekPlaceholder","div")}}),v$=Qe(([e,t])=>({...e,...t}),xt(g$,y$)),b$=S.memo(function(){const e=Ct("gridState"),t=Ct("listClassName"),n=Ct("itemClassName"),r=Ct("itemContent"),o=Ct("computeItemKey"),i=Ct("isSeeking"),s=Cn("scrollHeight"),a=Ct("ItemComponent"),l=Ct("ListComponent"),c=Ct("ScrollSeekPlaceholder"),u=Ct("context"),d=Cn("itemDimensions"),f=Cn("gap"),h=Ct("log"),g=Ct("stateRestoreInProgress"),y=Cn("reportReadyState"),m=or(S.useMemo(()=>v=>{const b=v.parentElement.parentElement.scrollHeight;s(b);const x=v.firstChild;if(x){const{height:T,width:E}=x.getBoundingClientRect();d({height:T,width:E})}f({column:gS("column-gap",getComputedStyle(v).columnGap,h),row:gS("row-gap",getComputedStyle(v).rowGap,h)})},[s,d,f,h]),!0,!1);return tS(()=>{e.itemHeight>0&&e.itemWidth>0&&y(!0)},[e]),g?null:p.jsx(l,{className:t,ref:m,...St(l,u),"data-testid":"virtuoso-item-list",style:{paddingBottom:e.offsetBottom,paddingTop:e.offsetTop},children:e.items.map(v=>{const b=o(v.index,v.data,u);return i?p.jsx(c,{...St(c,u),height:e.itemHeight,index:v.index,width:e.itemWidth},b):S.createElement(a,{...St(a,u),className:n,"data-index":v.index,key:b},r(v.index,v.data,u))})})}),x$=S.memo(function(){const e=Ct("HeaderComponent"),t=Cn("headerHeight"),n=Ct("headerFooterTag"),r=or(S.useMemo(()=>i=>{t(zn(i,"height"))},[t]),!0,!1),o=Ct("context");return e?p.jsx(n,{ref:r,children:p.jsx(e,{...St(e,o)})}):null}),w$=S.memo(function(){const e=Ct("FooterComponent"),t=Cn("footerHeight"),n=Ct("headerFooterTag"),r=or(S.useMemo(()=>i=>{t(zn(i,"height"))},[t]),!0,!1),o=Ct("context");return e?p.jsx(n,{ref:r,children:p.jsx(e,{...St(e,o)})}):null}),S$=({children:e})=>{const t=S.useContext(eS),n=Cn("itemDimensions"),r=Cn("viewportDimensions"),o=or(S.useMemo(()=>i=>{r(i.getBoundingClientRect())},[r]),!0,!1);return S.useEffect(()=>{t&&(r({height:t.viewportHeight,width:t.viewportWidth}),n({height:t.itemHeight,width:t.itemWidth}))},[t,r,n]),p.jsx("div",{ref:o,style:Ci(!1),children:e})},T$=({children:e})=>{const t=S.useContext(eS),n=Cn("windowViewportRect"),r=Cn("itemDimensions"),o=Ct("customScrollParent"),i=Ep(n,o,!1);return S.useEffect(()=>{t&&(r({height:t.itemHeight,width:t.itemWidth}),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:t.viewportWidth}))},[t,n,r]),p.jsx("div",{ref:i,style:Ci(!1),children:e})},E$=S.memo(function({...e}){const t=Ct("useWindowScroll"),n=Ct("customScrollParent"),r=n||t?k$:C$,o=n||t?T$:S$,i=Ct("context");return p.jsx(r,{...e,...St(r,i),children:p.jsxs(o,{children:[p.jsx(x$,{}),p.jsx(b$,{}),p.jsx(w$,{})]})})}),{useEmitter:mS,useEmitterValue:Ct,usePublisher:Cn}=Vp(v$,{optional:{context:"context",totalCount:"totalCount",overscan:"overscan",itemContent:"itemContent",components:"components",computeItemKey:"computeItemKey",data:"data",initialItemCount:"initialItemCount",scrollSeekConfiguration:"scrollSeekConfiguration",headerFooterTag:"headerFooterTag",listClassName:"listClassName",itemClassName:"itemClassName",useWindowScroll:"useWindowScroll",customScrollParent:"customScrollParent",scrollerRef:"scrollerRef",logLevel:"logLevel",restoreStateFrom:"restoreStateFrom",initialTopMostItemIndex:"initialTopMostItemIndex",increaseViewportBy:"increaseViewportBy"},methods:{scrollTo:"scrollTo",scrollBy:"scrollBy",scrollToIndex:"scrollToIndex"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",stateChanged:"stateChanged",readyStateChanged:"readyStateChanged"}},E$),C$=Rp({useEmitter:mS,useEmitterValue:Ct,usePublisher:Cn}),k$=Hp({useEmitter:mS,useEmitterValue:Ct,usePublisher:Cn});function gS(e,t,n){return t!=="normal"&&!(t!=null&&t.endsWith("px"))&&n(`${e} was not resolved to pixel value correctly`,t,cn.WARN),t==="normal"?0:parseInt(t??"0",10)}const yS=e=>{const t=e.Icon??sy,n=vt();return p.jsxs("div",{className:"flex w-full flex-col items-center justify-center gap-4 px-8 py-12",children:[p.jsx(t,{size:64,className:"text-disabled"}),p.jsx("p",{className:"text-disabled",children:e.message??n.emptyDataMessage})]})},Kp=p.jsx("div",{className:"h-6 w-10/12 animate-pulse rounded bg-muted"}),Us=e=>p.jsx(un,{...e,as:e.as||"span",className:Pe("block h-8 w-32 animate-pulse rounded bg-muted",e.className)});function I$(e,t){if(!e||!t)return[];const n=[1];if(e===1&&t===1)return n;e>4&&n.push("-");const r=2,o=e-r,i=e+r;for(let a=o>2?o:2;a<=Math.min(t,i);a++)n.push(a);const s=t-2;return i+1!==s&&i+1<t&&n.push("_"),i<t&&(n.push(t-2),n.push(t-1),n.push(t)),Array.from(new Set(n))}const A$=e=>{const t=S.useId(),n=vt(),r=S.useMemo(()=>I$(e.current,e.pages),[e.current,e.pages]),o=e.current<e.pages;return p.jsxs("footer",{className:"flex flex-wrap items-center justify-center gap-4 border-t-muted p-3 text-sm lg:flex-nowrap lg:justify-between",children:[p.jsx("p",{children:p.jsx(n.tablePaginationFooter,{...e,sizes:e.sizes,select:e.onChangeSize&&Array.isArray(e.sizes)?p.jsxs(S.Fragment,{children:[p.jsx("label",{htmlFor:t,children:n.tablePaginationSelectLabel}),p.jsx("select",{id:t,value:e.size,className:"cursor-pointer bg-transparent",onChange:i=>{e.onChangeSize?.(Number(i.target.value))},children:e.sizes.map(i=>p.jsx("option",{value:i,children:i},`pagination-opt-${i}`))})," "]}):null})}),p.jsx("nav",{children:p.jsxs("ul",{className:"flex items-center gap-2",children:[e.current>1?p.jsx("li",{children:p.jsx(un,{as:e.asLink||"button",href:"previous",className:"",children:n.tablePaginationPrevious})}):null,r.map(i=>i===null?null:p.jsx(S.Fragment,{children:typeof i=="string"?p.jsx("li",{children:"..."}):p.jsx("li",{children:p.jsx(un,{href:i,as:e.asLink||"button",className:`cursor-pointer border-b-2 px-3 py-1 proportional-nums transition-colors hover:border-primary-subtle hover:text-primary-subtle ${i===e.current?"border-primary text-primary":"border-transparent"}`,children:i})})},`pagination-${i}`)),o?p.jsx("li",{children:p.jsx(un,{as:e.asLink||"button",href:"next",className:"",children:n.tablePaginationNext})}):null]})})]})},P$=e=>{const t=S.useRef(null),n=S.useRef(null),[r,o]=S.useState("opacity-0"),i=r==="opacity-0",s=()=>o("opacity-0"),a=()=>{const c=n.current,u=t.current;c===null||u===null||(u.style.left=`-${c.getBoundingClientRect().width+4}px`)},l=()=>o("opacity-100");return S.useEffect(()=>{const c=n.current;if(c===null||parent===null)return;a();const u=new IntersectionObserver(d=>d.forEach(a),{root:document.documentElement});return u.observe(c),()=>u.disconnect()},[]),p.jsx("div",{ref:t,onMouseEnter:l,onMouseLeave:s,"data-component":"cell-aside",inert:i?!0:void 0,tabIndex:i?-1:void 0,className:`group-table-cell-aside absolute inset-0 top-0 flex h-full w-full items-stretch transition-opacity duration-300 ease-in-out ${r}`,children:p.jsx("div",{ref:n,className:"isolate block",children:e.children})})},O$=(e,t,n)=>{const r=n.cols,o=n.loading;return p.jsx(S.Fragment,{children:r.map((i,s)=>{const a=`${s},${e}`,l=wd(t,i.id),c=i.Element,u=i.cellProps?.className||"",d=s===0&&n.Aside&&o===!1,f=n.Aside;return S.createElement("td",{...i.cellProps,role:"cell","data-matrix":a,key:`accessor-${e}-${s}`,className:`typography group-table-cell flex border-collapse flex-col whitespace-pre-wrap border border-y border-b border-table-border p-[var(--table-cell-padding)] md:table-cell md:border-b-0 md:border-r md:border-l-transparent md:last:border-r-transparent ${u}`},d?p.jsx(P$,{children:p.jsx(f,{col:i,row:t,rowIndex:e})}):null,p.jsx("span",{className:"block text-sm font-bold leading-tight md:hidden",children:i.thead}),p.jsx("span",{className:"relative",children:o?Kp:c?p.jsx(S.Fragment,{children:p.jsx(c,{row:t,matrix:a,col:i,rowIndex:e,value:l})}):p.jsx(S.Fragment,{children:He.nil(l)?"":l})}))})})},ki=e=>{const t=S.useId(),[n,r]=S.useState(e.open);S.useEffect(()=>r(e.open),[e.open]);const o=S.useRef(null),i=S.useMemo(()=>[Go(10),Ka({fallbackAxisSideDirection:"end"}),Ya(),ld({padding:5,element:o})],[e.arrow]),{refs:s,floatingStyles:a,context:l}=Kn({open:n,middleware:i,transform:!0,whileElementsMounted:lo,onOpenChange:(y,m)=>{const v=m?.relatedTarget;v&&v.dataset.floating==="true"&&!y||(r(y),e.onChange?.(y))}}),c=Ko(l),u=fd(l,{enabled:e.hover??!1}),d=Nr(l),f=yr(l,{role:"tooltip"}),{getReferenceProps:h,getFloatingProps:g}=Zn([c,d,f,u]);return p.jsxs(S.Fragment,{children:[p.jsx("button",{ref:s.setReference,...h(e.buttonProps),type:"button",children:e.trigger}),n&&p.jsx(gr,{preserveTabOrder:!0,id:`${t}-portal`,children:p.jsx(fo,{guards:!0,restoreFocus:!0,returnFocus:!0,visuallyHiddenDismiss:!0,context:l,modal:!1,children:p.jsxs("div",{className:"relative isolate z-floating rounded-lg border border-floating-border bg-floating-background p-4 shadow-shadow-floating",ref:s.setFloating,"aria-labelledby":t,style:a,...g(),children:[p.jsx(cd,{ref:o,context:l,strokeWidth:.1,className:"fill-floating-background stroke-floating-border"}),p.jsx("header",{className:"mb-2",children:p.jsx("h3",{className:"text-left text-2xl font-medium leading-snug tracking-wide",children:e.title})}),e.children]})})})]})};var Zp={},vS;function D$(){return vS||(vS=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=(m,v)=>{try{Object.keys(m).forEach(v)}catch(b){window.console.log(b)}},n=m=>m==null,r=m=>{const v=typeof m;return v==="string"||v==="number"||v==="boolean"||n(m)},o=(m,v)=>{const b=v.getItem(m);try{return JSON.parse(b)}catch{return b??null}},i=m=>Object.keys(m).reduce((v,b)=>({...v,[b]:o(b,m)}),{}),s=m=>m instanceof Date?m:typeof m=="number"?new Date(new Date*1+m*864e5):m,a="1969-12-31T23:59:59.000Z",l=()=>document.cookie===""?{}:document.cookie.split("; ").map(m=>m.split("=")).reduce((m,v)=>(m[decodeURIComponent(v[0].trim())]=decodeURIComponent(v[1].trim()),m),{}),c=new Set,u=()=>{const m=l();c.forEach(v=>v(m))},d=[{name:"expires",parse:m=>`expires=${s(m.expires??a)}`},{name:"maxAge",parse:m=>m.maxAge?`max-age=${s(m.expires??a)}`:""},{name:"path",parse:m=>`path=${m.path??"/"}`},{name:"sameSite",parse:m=>`samesite=${m.sameSite??"strict"}`},{name:"useSecure",parse:m=>`${m.useSecure??!0?"secure":""}`},{name:"domain",parse:m=>{const v=m.domain??"";return v===""?"":`domain=${m.multiDomain?".":""}${v}`}},{name:"partitioned",parse:m=>m.partitioned?"Partitioned":""}],f={json:l,listener:m=>(c.add(m),()=>c.delete(m)),clearListeners:()=>c.clear(),has:m=>document.cookie.split(";").some(v=>v.trim().startsWith(`${m}=`)),deleteAll:()=>{document.cookie.split(";").forEach(m=>{document.cookie=m.replace(/^ +/,"").replace(/=.*/,`=;expires=${new Date().toUTCString()};path=/`)}),u()},get:m=>{const v=f.json()[m];if(n(v))return null;try{return JSON.parse(decodeURIComponent(v))}catch{return v}},delete:m=>{document.cookie=`${encodeURIComponent(m)}=;expires=${new Date().toUTCString()}`,u()},set:(m,v,b={})=>{const x=r(v)?v:encodeURIComponent(JSON.stringify(v)),T=d.reduce((E,I)=>{const w=I.parse(b);return w===""?E:E.concat(w)},[`${encodeURIComponent(m)}=${x}`]).join(";");document.cookie=T,u()}},h=m=>{const v=new Set,b=x=>{m().removeItem(x);const T=i(m());v.forEach(E=>E(T))};return{delete:b,listener:x=>(v.add(x),()=>v.delete(x)),clearListeners:()=>v.clear(),json:(x=!1)=>x?i(m()):m(),has:x=>{const T=m().getItem(x);return!n(T)},deleteAll:()=>{t(m(),b),v.forEach(x=>x(m()))},get:x=>o(x,m()),set:(x,T)=>{m().setItem(x,JSON.stringify(T)),v.forEach(E=>E(m()))}}},g=h(()=>window.sessionStorage),y=h(()=>window.localStorage);e.Cookie=f,e.LocalStorage=y,e.SessionStorage=g,e.createStorage=h})(Zp)),Zp}var Gs=D$();const Xp=e=>e.headerLabel??e.thead??e.id,Qp=e=>e.map(t=>({value:t.id,label:t.thead??t.headerLabel??t.id}));var Ii=(e=>(e.Boolean="boolean",e.Number="number",e.Select="select",e.Text="text",e))(Ii||{});const Jp=e=>e.type==="number"?e.valueAsNumber:e.value,N$=e=>{let t=[];return e({add:(s,a,l)=>t.push({...l,id:s,thead:a}),remove:s=>t=t.filter(a=>a.id!==s),getAll:()=>Array.from(t),filter:s=>t=Array.from(t.filter(s))}),t},M$={},_$=(e,t)=>{if(!Array.isArray(t))return e;const n=new Set(t.map(o=>o.id));if(!e.every(o=>n.has(o.id)))return e;const r=new Map(e.map(o=>[o.id,o]));return t.map((o,i)=>{const s=r.get(o.id);return s===void 0?e[i]:s})},F$=(e,t,n=M$)=>{const r=Mr()?null:Gs.LocalStorage.get(`@components/table-${e}`)||null,[o,i]=gp({name:e,groups:n.groups||r?.groups||[],sorters:n.sorters||r?.sorters||[],filters:n.filters||r?.filters||[],cols:_$(t,r?.cols)},s=>{const a=l=>{const c=s.state(),u={...c,...l};return Mr()||Gs.LocalStorage.set(`@components/table-${c.name}`,u),u};return a(s.state()),{set:l=>a(l)}});return{...o,...i,name:e}},L$=e=>{const t=Lr(e),n=S.useRef(null),r=S.useCallback(o=>{t.current(o),o.forEach(i=>{const s=n.current.querySelector(`th[data-tableheader="${i.id}"]`);s&&(s.style.width="auto")})},[t]);return[n,r]},V$=()=>Mr()?void 0:document.querySelector('[data-component="modal-body"]'),$$=e=>(t,n)=>e.reduce((r,o)=>{const i=o.type==="desc"?-1:1,s=o.value,a=t[s]>n[s]?i:t[s]<n[s]?-i:0;return r!==0?r:a},0),z$=(e,t)=>e.toSorted($$(t)),bS=(e,t,n)=>({label:t,id:Xo(),type:n,value:e.id}),j$=e=>{const t=vt(),n={asc:{label:t.tableSortAsc,value:"asc"},desc:{label:t.tableSortDesc,value:"desc"}},r=[n.asc,n.desc],o=()=>{const l=e.cols[0];l&&e.set(c=>[...c,bS(l,n.asc.label,n.asc.value)])},i=l=>c=>{const u=c.target.value;e.set(d=>d.map(f=>f.id===l?{...f,value:u}:f))},s=l=>c=>{const u=c.target.value;e.set(d=>d.map(f=>f.id===l?{...f,type:u}:f))},a=l=>{const c=l.currentTarget.dataset.id||"";e.set(u=>u.filter(d=>d.id!==c))};return p.jsx(S.Fragment,{children:p.jsx(ki,{title:t.tableSortDropdownTitle,trigger:p.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[p.jsx(ty,{size:14}),t.tableSortOrderByLabel," ",e.sorters.length===0?"":` (${e.sorters.length})`]}),children:p.jsxs("ul",{className:"mt-4 space-y-2",children:[e.sorters.map(l=>p.jsxs("li",{className:"flex flex-nowrap gap-3",children:[p.jsx(po,{options:e.options,value:l.value,onChange:i(l.id),title:t.tableSortOrderInputTitle,placeholder:t.tableSortOrderInputPlaceholder}),p.jsx(po,{onChange:s(l.id),value:l.type,options:r,title:t.tableSortTypeInputTitle,placeholder:t.tableSortTypeInputPlaceholder}),p.jsx("button",{className:"mt-4","data-id":l.id,onClick:a,children:p.jsx(Ea,{className:"text-danger",size:14})})]},`sorter-select-${l.id}`)),p.jsx("li",{children:p.jsxs("button",{type:"button",onClick:o,className:"flex items-center gap-1 text-primary",children:[p.jsx(zu,{size:14})," ",t.tableSortAddButton]})})]})})})},B$=e=>{const t=vt(),[n,r]=S.useState(()=>{const a=e.sorters.find(l=>l.value===e.col.id);return a?a.type:"undefined"}),o=()=>r(a=>a==="undefined"?"asc":a==="asc"?"desc":"undefined");S.useEffect(()=>{e.setSorters(a=>{if(n==="undefined")return a.filter(u=>u.value!==e.col.id);const l=a.findIndex(u=>u.value===e.col.id),c=bS(e.col,n,n);return l===-1?[...a,c]:(a[l]=c,[...a])})},[n,e.col]);const i=`${e.col.id}-sorter-id`,s=Xp(e.col);return p.jsxs("button",{"aria-labelledby":i,className:"isolate flex items-center",onClick:o,type:"button",children:[p.jsxs("span",{id:i,className:"sr-only",children:[t.tableSortDropdownTitle," ",s]}),n==="asc"?p.jsx(NI,{size:14}):null,n==="desc"?p.jsx(DI,{size:14}):null,n==="undefined"?p.jsx(ty,{size:14}):null]})},xS=S.createContext({}),R$=xS.Provider,H$=()=>S.useContext(xS),eh=(e,t,n,r={})=>{const o=e.id,i=e.type??Ii.Text,s=t[i]??[],a=s.find(c=>c["data-default"])?.value??s[0]?.value,l=n[a];return{id:Xo(),operation:l,label:Xp(e),name:o,type:i,value:"",...r}},th=()=>{const e=vt(),t=S.useMemo(()=>({contains:{value:"contains",label:e.tableFilterTypeContains,symbol:"includes","data-default":"true"},is:{value:"is",label:e.tableFilterTypeIs,symbol:"is"},isNot:{value:"isNot",label:e.tableFilterTypeIsNot,symbol:"!=="},notContains:{value:"notContains",label:e.tableFilterTypeNotContains,symbol:"notIncludes"},lessThan:{value:"lessThan",label:e.tableFilterTypeLessThan,symbol:"<="},greaterThan:{value:"greaterThan",label:e.tableFilterTypeGreaterThan,symbol:">="},startsWith:{value:"startsWith",label:e.tableFilterTypeStartsWith,symbol:"startsWith"},endsWith:{value:"endsWith",label:e.tableFilterTypeEndsWith,symbol:"endsWith"}}),[e]);return{options:S.useMemo(()=>({[Ii.Text]:[t.is,t.isNot,t.contains,t.notContains,t.startsWith,t.endsWith],[Ii.Boolean]:[t.is,t.isNot],[Ii.Number]:[t.is,t.isNot,t.greaterThan,t.lessThan]}),[t]),operations:t}},W$=e=>{const t=vt(),n=th(),r=()=>{const l=e.cols.at(0);e.set(c=>[...c,eh(l,n.options,n.operations)])},o=l=>{const c=l.target.dataset.id||"",u=l.target.value;e.set(d=>d.map(f=>{if(c!==f.id)return f;const h=e.cols.find(g=>u===g.id);return eh(h,n.options,n.operations,{value:""})}))},i=l=>{const c=l.target.dataset.id||"",u=l.target.value;e.set(d=>d.map(f=>f.id===c?{...f,operation:n.operations[u]}:f))},s=l=>{const c=l.currentTarget.dataset.id||"";e.set(u=>u.filter(d=>d.id!==c))},a=l=>{const c=l.target.dataset.id||"",u=Jp(l.target);e.set(d=>d.map(f=>f.id===c?{...f,value:u}:f))};return p.jsx(S.Fragment,{children:p.jsx(ki,{arrow:!0,title:t.tableFilterDropdownTitle,trigger:p.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[p.jsx(BI,{size:14}),t.tableFilterLabel," ",e.filters.length===0?"":` (${e.filters.length})`]}),children:p.jsxs("ul",{className:"mt-4 space-y-2",children:[e.filters.map(l=>{const c=n.options[l.type];return p.jsxs("li",{className:"flex flex-nowrap gap-3",children:[p.jsx(po,{options:e.options,title:t.tableFilterColumnTitle,placeholder:t.tableFilterColumnPlaceholder,value:l.name,"data-id":l.id,onChange:o}),p.jsx(po,{"data-id":l.id,onChange:i,value:l.operation.value,options:c,title:t.tableFilterOperatorTitle,placeholder:t.tableFilterOperatorPlaceholder}),p.jsx(Jo,{optionalText:"","data-id":l.id,onChange:a,value:l.value,type:l.type,title:t.tableFilterValueTitle,placeholder:t.tableFilterValuePlaceholder}),p.jsx("div",{className:"mt-5 flex items-center justify-center",children:p.jsx("button",{"data-id":l.id,type:"button",onClick:s,children:p.jsx(Ea,{className:"text-danger",size:16})})})]},`filter-select-${l.id}`)}),p.jsx("li",{children:p.jsxs("button",{type:"button",onClick:r,className:"flex items-center gap-1 text-primary",children:[p.jsx(zu,{size:14})," ",t.tableFilterNewFilter]})})]})})})},q$=({filter:e,onDelete:t,set:n})=>{const r=vt(),o=th(),i=a=>{const l=a.target.value,c=a.target.dataset.id||"";n(u=>u.map(d=>d.id===c?{...d,operation:o.operations[l]}:d))},s=a=>{const l=a.target.dataset.id||"",c=Jp(a.target);n(u=>u.map(d=>d.id===l?{...d,value:c}:d))};return p.jsxs("div",{className:"flex flex-nowrap items-center gap-4 py-2",children:[p.jsx(po,{"data-id":e.id,onChange:i,value:e.operation.value,options:o.options[e.type],title:r.tableFilterColumnTitle,placeholder:r.tableFilterColumnPlaceholder}),p.jsx(Jo,{optionalText:" ","data-id":e.id,onChange:s,value:e.value,type:e.type,title:r.tableFilterValueTitle,placeholder:r.tableFilterValueTitle}),p.jsx("button",{onClick:t,"data-id":e.id,type:"button",className:"mt-4",children:p.jsx(Ea,{className:"text-danger",size:14})})]})},U$={top:0,left:0,right:0,bottom:-1},G$=e=>{const t=Hu(),n=vt(),r=e.filters.filter(y=>y.name===e.header.id),o=r.length>0,i=e.header.allowSort??t.table.sorters??!0,s=e.header.allowFilter??t.table.filters??!0,a=th(),l=o?WI:qI,c=S.useRef(null),u=y=>{const m=y.currentTarget.dataset.id||"";return e.setFilters(v=>v.filter(b=>b.id!==m))},d=S.useCallback(y=>{if(y===null)return;c.current=y;const m=new AbortController;return y.addEventListener("pointerdown",v=>{if(v.target.dataset.type==="resizer")return v.stopPropagation(),v.stopImmediatePropagation()},{signal:m.signal}),()=>m.abort()},[]),f=e.sorters.find(y=>e.header.id===y.value),h=f?.type?f.type===v1.Asc?"ascending":"descending":"none",g=Xp(e.header);return p.jsxs(Zw,{...e.header.thProps,as:"th",ref:d,initial:!1,dragSnapToOrigin:!0,dragDirectionLock:!0,role:"columnheader","aria-sort":h,value:e.header,"aria-busy":e.loading,"data-tableheader":e.header.id,whileDrag:{cursor:"grabbing"},className:`typography bg-table-header first:rounded-tl-lg last:rounded-tr-lg overflow-clip last:border-r-transparent border-table-border border-r-[1px] relative min-w-0 cursor-grab font-medium md:h-14 ${e.header.thProps?.className??""}`,children:[p.jsx("span",{className:`flex h-full items-center justify-between bg-table-header p-[var(--table-cell-padding)] ${e.isLast?"rounded-tr-lg":""} ${e.index===0?"rounded-tl-lg":""}`,children:p.jsxs("span",{className:"flex items-center gap-1",children:[e.inlineFilter&&s?p.jsx(ki,{arrow:!0,trigger:p.jsxs("span",{children:[p.jsxs("span",{id:`${e.header.id}-filter-dropdown-button`,className:"sr-only",children:[n.tableFilterDropdownTitleUnique," ",g]}),p.jsx(l,{"aria-labelledby":`${e.header.id}-filter-dropdown-button`,size:14})]}),title:p.jsxs("span",{className:"text-lg",children:[n.tableFilterDropdownTitleUnique," ",p.jsx("span",{className:"font-medium",children:g})]}),children:p.jsxs("ul",{className:"font-medium",children:[r.length===0?null:p.jsx(S.Fragment,{children:r.map(y=>p.jsx("li",{className:"my-1",children:p.jsx(q$,{onDelete:u,filter:y,set:e.setFilters})},`thead-filter-${y.id}`))}),p.jsx("li",{children:p.jsxs("button",{type:"button",className:"flex items-center gap-1 text-primary",onClick:()=>e.setFilters(y=>y.concat(eh(e.header,a.options,a.operations))),children:[p.jsx(zu,{size:14})," ",n.tableFilterNewFilter]})})]})}):null,p.jsx("span",{className:"pointer-events-auto text-balance text-base",children:e.header.thead}),e.inlineSorter&&i?p.jsx(B$,{col:e.header,setSorters:e.setSorters,sorters:e.sorters}):null]})}),e.isLast?null:p.jsx(ze.button,{drag:"x",draggable:!0,dragListener:!0,dragMomentum:!0,type:"button",animate:!1,dragElastic:0,dragPropagation:!0,initial:!1,dragSnapToOrigin:!0,dragDirectionLock:!0,"data-type":"resizer",title:e.header.id,dragConstraints:U$,className:"absolute -right-[0.5px] top-0 z-calendar block h-full w-[1px] cursor-col-resize bg-transparent hover:w-1.5 hover:bg-primary active:w-1.5 active:bg-primary",onClick:y=>{y.currentTarget.focus()},onKeyDown:y=>{if(y.key==="ArrowLeft"||y.key==="ArrowRight"){if(c.current===null)return;c.current.setAttribute("data-resized","true");const m=c.current.getBoundingClientRect().width,b=(y.shiftKey?50:10)*(y.key==="ArrowLeft"?-1:1);c.current.style.width=`${Math.abs(m+b)}px`}},onDoubleClick:()=>{c.current!==null&&(c.current.style.width="auto")},onDrag:(y,m)=>{if(c.current===null)return;c.current.setAttribute("data-resized","true");const v=c.current.getBoundingClientRect().width,b=m.delta.x;c.current.style.width=`${Math.abs(v+b)}px`}})]})},Y$=e=>{const[t,n]=L$(e.setCols);return p.jsx(Gw,{layout:!0,as:"tr",axis:"x",drag:"x",ref:t,layoutRoot:!0,role:"row",layoutScroll:!0,onReorder:n,values:e.headers,children:p.jsx(gn,{children:e.headers.map((r,o)=>p.jsx(G$,{index:o,header:r,filters:e.filters,loading:e.loading,sorters:e.sorters,setFilters:e.setFilters,setSorters:e.setSorters,inlineFilter:e.inlineFilter,inlineSorter:e.inlineSorter,isLast:o===e.headers.length-1},`header-child-item-${r.id}`))})})},K$=S.forwardRef(({context:e,className:t="",...n},r)=>p.jsx("tbody",{...n,role:"rowgroup",className:`divide-y divide-table-border ${t}`,ref:r,children:p.jsx(gn,{children:n.children})})),Z$=S.forwardRef(({context:e,className:t="",...n},r)=>p.jsx("table",{...n,role:"table",ref:r,style:{...n.style,"--table-cell-padding":"0.75rem"},className:`table w-full table-fixed border-separate border-spacing-0 text-left ${t??""}`})),X$=S.forwardRef(({context:e,...t},n)=>{const r=H$(),o={...t?.style,top:He.number(r.sticky)?`${r.sticky}px`:void 0};return p.jsx("thead",{...t,ref:n,style:o,role:"rowgroup",className:"group:sticky top-0 hidden bg-transparent md:table-header-group"})}),Q$=S.forwardRef(({context:e,item:t,...n},r)=>{const o=e?.getRowProps?.(t),i={...n,...o};return p.jsx("tr",{...i,role:"row",ref:r,className:`group-table-row flex h-fit flex-col flex-wrap justify-center gap-1 pb-4 md:table-row ${[n?.className,o?.className].filter(Boolean).join(" ")}`})}),J$=S.forwardRef((e,t)=>e.context.loadingMore?p.jsx("tfoot",{...e,ref:t,className:"bg-card-background",children:p.jsx("tr",{role:"row",className:"bg-card-background",children:p.jsx("td",{colSpan:999,className:"h-14 bg-card-background px-2",children:p.jsx("span",{className:"block h-2 w-full animate-pulse rounded bg-foreground opacity-60"})})})}):null),ez={TableRow:Q$,TableFoot:J$,TableHead:X$,Table:Z$,TableBody:K$},tz=[0,0,0,0,0,0,0,0,0,0],nz=e=>p.jsx("div",{className:"flex h-48 w-full items-center justify-center px-2",children:e.loading?Kp:p.jsx(yS,{})}),rz=()=>p.jsx(S.Fragment,{}),oz=[],wS=({cols:e,filters:t,setCols:n,sorters:r,setFilters:o,setSorters:i,onScrollEnd:s,getScrollRef:a,pagination:l=null,useControl:c=!1,...u})=>{const d=S.useRef(null),[,f]=S.useState(!1),h=Lr(s),g=Lr(u.loadingMore),y=S.useMemo(()=>{if(u.loading)return tz;if(c)return u.rows;const b=new b1(u.rows);return t.length>0&&t.forEach(x=>x.value===""||Number.isNaN(x.value)?void 0:b.Where(x.name,x.operation.symbol,x.value)),r.length===0?b.Select():z$(b.Select(),r)},[u.loading,u.rows,c,t,r]);S.useEffect(()=>{if(d.current===null)return()=>{};const b=d.current,x=new IntersectionObserver(T=>T[T.length-1].isIntersecting&&g.current?(h.current?.(),void f(!0)):f(!1));return x.observe(b),()=>x.disconnect()},[g,h]);const m=y.length===0,v={cols:e,Aside:u.Aside,loading:u.loading,getRowProps:u.getRowProps,loadingMore:u.loadingMore};return p.jsxs("div",{className:"group bg-table-background relative flex w-full flex-col whitespace-nowrap rounded-lg",children:[p.jsx(f$,{components:ez,context:v,totalCount:y.length,itemContent:m?rz:O$,data:m?oz:y,useWindowScroll:!a,customScrollParent:a?a():void 0,fixedHeaderContent:()=>p.jsx(Y$,{headers:e,filters:t,setCols:n,sorters:r,setFilters:o,setSorters:i,loading:!!u.loading,inlineFilter:u.inlineFilter,inlineSorter:u.inlineSorter})}),m?p.jsx(nz,{loading:u.loading}):null,p.jsx("div",{"aria-hidden":"true",ref:d,className:"h-0.5 w-full"}),l!==null?p.jsx(A$,{...l}):null]})},iz=({item:e,onPointerDown:t})=>{const n=wo(0);return p.jsxs(Zw,{onPointerDown:t,id:e.groupId,className:"flex flex-row items-center gap-2",value:e,style:{y:n},children:[p.jsx("button",{type:"button",className:"cursor-grab",children:p.jsx(jI,{size:14})}),p.jsx("span",{children:e.groupName})]},e.groupId)},sz=e=>{const t=vt(),n=Qp(e.cols),r=nL(),[o,i]=S.useState(e.groups[0]?.thead||""),s=l=>{const c=l.target,u=c.value,d=c.options.selectedIndex,f=c.options.item(d)?.label||"";i(f);const h=new b1(e.rows).GroupBy(u),g=e.cols.find(y=>y.id===u);e.setGroups(hk(h).map((y,m)=>{const v=h[y];return{...g,groupId:Xo(),groupKey:u,index:m,rows:v,groupName:y}}))},a=()=>e.setGroups([]);return p.jsx(S.Fragment,{children:p.jsxs(ki,{arrow:!1,title:t.tableGroupLabel,trigger:p.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[p.jsx(UI,{size:14}),t.tableGroupLabelWithCount,e.groups.length>0?` - ${o}(${e.groups.length})`:""]}),children:[p.jsxs("div",{className:"flex flex-nowrap items-center",children:[p.jsx(po,{value:o,title:"Tipo de agrupamento",onChange:s,options:n,placeholder:"Agrupar por..."}),p.jsx(Jt,{className:"mt-4",onClick:a,theme:"raw","data-id":o,children:p.jsx(Ea,{size:16,className:"text-danger"})})]}),e.groups.length>0?p.jsxs("section",{className:"my-4",children:[p.jsx("header",{children:p.jsx("h2",{className:"text-xl font-medium",children:"Order groups"})}),p.jsx(k2,{children:p.jsx(Gw,{axis:"y",className:"relative space-y-2",drag:!0,dragControls:r,dragListener:!1,layoutScroll:!0,onReorder:e.setGroups,values:e.groups,children:e.groups.map(l=>p.jsx(iz,{item:l,onPointerDown:c=>{r.start(c),e.setGroups([...e.groups])}},l.groupId))})})]}):null]})})},az=e=>p.jsx("header",{className:"mb-1 min-w-full",children:p.jsxs("div",{className:"flex min-w-full flex-wrap items-center justify-between gap-x-4 gap-y-1",children:[p.jsxs("div",{className:"items-centeend flex w-fit gap-4 whitespace-nowrap py-2",children:[p.jsx("span",{children:p.jsx(W$,{cols:e.cols,options:e.options,filters:e.filters,set:e.setFilters})}),p.jsx("span",{children:p.jsx(j$,{options:e.options,cols:e.cols,sorters:e.sorters,set:e.setSorters})}),p.jsx("span",{children:p.jsx(sz,{rows:e.rows,groups:e.groups,setGroups:e.setGroups,options:e.options,cols:e.cols})})]}),p.jsx("ul",{className:"flex w-full flex-1 flex-grow flex-row flex-wrap items-center gap-4 md:justify-end",children:e.filters.map(t=>p.jsxs("li",{className:"flex items-center gap-1 rounded-xl border border-card-border px-4 py-0.5",children:[p.jsxs("span",{children:[p.jsx("span",{className:"mr-2 inline-block aspect-square size-3 rounded-full bg-primary","aria-hidden":"true"}),t.label," ",t.operation.label.toLowerCase(),":"]}),p.jsxs("div",{className:"relative w-min min-w-[1ch]",children:[p.jsx("span",{"aria-hidden":"true",className:"invisible whitespace-pre p-0",children:t.value||" "}),p.jsx("input",{type:t.type,value:t.value,className:"absolute left-0 top-0 m-0 inline-block w-full bg-transparent p-0 placeholder-primary/70 outline-none [appearance:textfield] after:empty:text-primary/70 [&::-webkit-inner-spin-button]:appearance-none [&::-webkit-outer-spin-button]:appearance-none",onChange:n=>{const r=Jp(n.target);e.setFilters(o=>o.map(i=>t.id===i.id?{...i,value:r}:i))}})]})]},`filter-table-${t.id}`))})]})}),lz=(e,t)=>typeof t=="function"?t(e):t,sc=(e,t,n)=>e===t?void 0:n?.(t),cz=e=>{const t=Hu(),n=S.useMemo(()=>({sticky:e.sticky===void 0?t.table.sticky??void 0:e.sticky??void 0}),[e.sticky,t.table.sticky]),r=e.operations??t.table.operations??!0,o=S.useMemo(()=>Qp(e.cols),[e.cols]),[i,s]=gp({cols:e.cols,sorters:e.sorters??[],groups:e.groups??[],filters:e.filters??[]},a=>{const l=c=>u=>{const d=a.state();return{...d,[c]:lz(d[c],u)}};return{cols:l("cols"),sorters:l("sorters"),groups:l("groups"),filters:l("filters")}},{postMiddleware:[(a,l)=>(e.set?.(a),sc(l?.filters??[],a.filters??[],e.setFilters),sc(l?.sorters??[],a.sorters??[],e.setSorters),sc(l?.groups??[],a.groups??[],e.setGroups),sc(l?.cols??[],a.cols??[],e.setCols),a)]});return S.useEffect(()=>{s.cols(e.cols)},[e.cols]),p.jsx(R$,{value:n,children:p.jsxs(gn,{propagate:!0,initial:!1,children:[r?p.jsx(az,{cols:i.cols,rows:e.rows,options:o,groups:i.groups,filters:i.filters,setCols:s.cols,sorters:i.sorters,setGroups:s.groups,setFilters:s.filters,setSorters:s.sorters,pagination:e.pagination??null,inlineFilter:e.inlineFilter??!0,inlineSorter:e.inlineSorter??!0}):null,i.groups.length===0?p.jsx(wS,{...e,index:0,cols:i.cols,options:o,groups:i.groups,filters:i.filters,optionCols:o,setCols:s.cols,sorters:i.sorters,setGroups:s.groups,setFilters:s.filters,setSorters:s.sorters,onScrollEnd:e.onScrollEnd,pagination:e.pagination??null,inlineFilter:e.inlineFilter??!0,inlineSorter:e.inlineSorter??!0}):p.jsx("div",{className:"flex flex-wrap gap-4",children:i.groups.map((a,l)=>p.jsx("div",{className:"min-w-full",children:p.jsx(wS,{...e,group:a,index:l,cols:i.cols,pagination:null,rows:a.rows,options:o,groups:i.groups,filters:i.filters,optionCols:o,setCols:s.cols,sorters:i.sorters,setGroups:s.groups,setFilters:s.filters,setSorters:s.sorters,onScrollEnd:e.onScrollEnd,inlineFilter:e.inlineFilter??!0,inlineSorter:e.inlineSorter??!0})},`group-${a.groupId}`))})]})})},ac=({title:e,loading:t,children:n,as:r,header:o=null,container:i="",titleClassName:s="",...a})=>p.jsxs(un,{...a,as:r||"div","data-component":"card",className:Pe("flex w-full flex-col gap-4 rounded-card border border-card-border bg-card-background py-3 shadow-shadow-card",i),children:[e?p.jsx("header",{"data-component":"card-title",className:Pe("mb-2 w-full border-b border-card-border px-6 pb-2 text-xl font-medium",s),children:e}):o,p.jsx("div",{"data-component":"card-body",className:Pe("min-w-full px-6",a.className),children:t?p.jsxs("div",{className:"flex flex-col gap-4",children:[p.jsx(Us,{className:"w-full"}),p.jsx(Us,{className:"w-8/12"}),p.jsx(Us,{className:"w-10/12"}),p.jsx(Us,{className:"w-1/2"})]}):n})]});ac.Title=({as:e,titleTag:t,navTag:n,children:r,...o})=>{const i=e||"div",s=t||"h2",a=n||"nav";return p.jsxs(i,{...o,title:He.string(o.title)?o.title:void 0,className:Pe("flex w-full flex-col flex-wrap items-start justify-between gap-base sm:flex-row sm:items-center",o.className),children:[p.jsx(s,{className:"font-semibold",children:o.title}),r?p.jsx(a,{className:"gap-kilo flex flex-col items-start justify-start sm:flex-row sm:items-center sm:justify-end",children:r}):null]})};const uz=e=>{const t=e.interactive??!0,n=e.Icon??Er;return p.jsx(ac,{...e,title:null,loading:void 0,container:"px-0 py-0",className:"flex items-center gap-4 px-0",children:p.jsxs("div",{className:`flex w-full items-center gap-4 rounded-card px-0 lg:px-0 ${t?"transition-colors duration-300 ease-linear hover:bg-primary-hover/10":""}`,children:[p.jsx("div",{className:Pe("flex aspect-square h-[stretch] w-20 items-center justify-center rounded-l-card bg-primary p-4 text-primary-foreground",e.mark),children:p.jsx(n,{size:48})}),p.jsxs("div",{className:"flex flex-col justify-center gap-2 py-2",children:[p.jsx("p",{className:"text-lg",children:e.title}),e.loading?p.jsx(Us,{className:"h-10"}):p.jsx("p",{className:"text-4xl font-bold tracking-wide",children:e.value})]})]})})},dz=({item:e,context:t,setter:n,get:r,refs:o})=>p.jsx(gr,{children:p.jsx(Qf,{reducedMotion:"user",transition:{type:"spring",damping:30,stiffness:350},children:p.jsxs(gn,{mode:"wait",presenceAffectsLayout:!0,children:[e?p.jsx(ze.div,{exit:{opacity:0},animate:{opacity:1},initial:{opacity:0},transition:{type:"tween",duration:.15,ease:"easeOut"},className:"pointer-events-none fixed inset-0 top-0 z-overlay h-screen w-screen bg-floating-overlay/70"},"overlay"):null,e?p.jsx(yd,{lockScroll:!0,className:"absolute inset-0 z-floating flex items-center justify-center",children:p.jsx(fo,{visuallyHiddenDismiss:!0,modal:!0,closeOnFocusOut:!0,context:t,children:p.jsxs(ze.div,{layout:!0,layoutId:`item-${e.id}`,initial:{opacity:.6,scale:.98},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.98},className:"relative flex h-min w-min min-w-xs flex-col gap-4 rounded-card border border-card-border bg-card-background p-6 py-4 pb-8 shadow-shadow-card",ref:o.setFloating,...r(),children:[p.jsx("nav",{className:"absolute right-4 top-1 lg:right-2",children:p.jsx("button",{type:"button",onClick:n,className:"p-1 opacity-70 transition-colors hover:text-danger hover:opacity-100 focus:text-danger",children:p.jsx(jo,{})})}),p.jsxs(ze.header,{layout:!0,className:"flex w-full flex-wrap items-center justify-between gap-2",children:[p.jsx("h3",{className:"min-w-full text-balance text-2xl font-medium",children:e.title}),p.jsx("p",{className:"text-sm leading-snug text-secondary",children:e.description})]}),p.jsx(ze.div,{layout:!0,children:e.children})]})})},"card"):null]})})}),fz=e=>{const[t,n]=S.useState(null),r=S.useId(),{context:o,refs:i}=Kn({open:t!==null,transform:!0,onOpenChange:f=>f?void 0:n(null)}),s=Ko(o),a=yr(o,{role:"dialog"}),l=Nr(o,{escapeKey:!0,referencePress:!0,outsidePress:!0}),{getFloatingProps:c}=Zn([s,a,l]),u=S.useCallback(()=>{n(null)},[]),d=S.Children.toArray(e.children);return p.jsxs(S.Fragment,{children:[p.jsx(dz,{refs:i,context:o,get:c,item:t,setter:u}),p.jsx("ul",{role:"list",children:d.map((f,h)=>{const g=f.props,y=`${r}-${h}`,m=()=>n({...g,id:y}),v=g.leading;return p.jsx(ze.li,{layout:!0,layoutId:`item-${y}`,className:"border-b border-card-border py-2 last:border-transparent",children:p.jsx(ze.div,{layoutId:`toast-${y}`,className:"relative",children:p.jsx("div",{className:"relative flex items-start space-x-3",children:p.jsxs(S.Fragment,{children:[g.avatar?p.jsx("div",{children:p.jsx("div",{className:"relative px-1",children:p.jsx("button",{onClick:m,className:"flex size-10 items-center justify-center ring-primary",children:g.avatar})})}):null,p.jsx("div",{className:"min-w-0 flex-1 py-1 text-foreground",children:p.jsxs("div",{className:"flex flex-row flex-nowrap justify-between gap-4",children:[p.jsxs("button",{onClick:m,className:"cursor-pointer text-left transition-all ease-out hover:text-primary",children:[p.jsx("h3",{children:g.title}),p.jsx("p",{className:"text-sm leading-snug text-secondary",children:g.description})]}),v?p.jsx(v,{open:m}):null]})})]})})})},y)})})]})},pz=e=>p.jsx(S.Fragment,{children:e.children}),SS=()=>{const e=S.useContext(oo);return e?e.parser:Ca.hsla},nh=.3,lc={duration:nh,type:"tween",ease:"easeInOut"},TS=S.createContext(null),rh={delay:.2,duration:.3,type:"tween",ease:"easeOut"},Ai={initial:{pathLength:0,opacity:0},animate:{pathLength:1,opacity:1}},hz=e=>p.jsxs("svg",{...e,viewBox:"0 0 24 24",fill:"currentColor",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[p.jsx(ze.path,{className:"currentColor",initial:Ai.initial,animate:Ai.animate,transition:rh,d:"M18 6 6 18"}),p.jsx(ze.path,{className:"currentColor",initial:Ai.initial,animate:Ai.animate,transition:rh,d:"m6 6 12 12"})]}),mz=e=>p.jsx("svg",{...e,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:3,children:p.jsx(ze.path,{d:"M5 13l4 4L19 7",strokeLinecap:"round",strokeLinejoin:"round",animate:Ai.animate,initial:Ai.initial,transition:rh})}),gz={complete:{scale:1.25},active:{scale:1,transition:{delay:0,duration:.3}}},yz={duration:.6,delay:.2,type:"tween",ease:"circOut"},vz=(e,t,n)=>n==="error"?"error":t===e?"active":t<e?"inactive":"complete",bz=(e,t,n,r)=>t===n?0:t>n?e<=n||e>t?0:(e-n)/(t-n)*r:e<=t||e>n?0:(n-e)/(n-t)*r,ES=()=>S.useContext(TS),xz=({step:e,currentStep:t,status:n,title:r,titleClassName:o,...i})=>{const s=SS(),a=ES(),[l,c]=S.useState(t);S.useEffect(()=>{if(!a){c(t);return}const d=bz(e,a.currentStep,a.previousStep,a.progressBarDuration);if(d===0){c(t);return}const f=setTimeout(()=>{c(t)},d*1e3);return()=>clearTimeout(f)},[t,a,e]);const u=vz(e,l,n);return a?.steps&&100/a?.steps,p.jsxs(S.Fragment,{children:[p.jsx("div",{className:`hidden h-[2px] w-full bg-card-border first:hidden xl:block ${u==="active"||u==="complete"?"bg-success":""}`}),p.jsxs(ze.button,{...i,type:"button","data-step":e,animate:u,className:"relative flex w-auto items-center justify-center text-center",children:[p.jsx(ze.div,{variants:gz,transition:yz,className:`absolute inset-0 hidden rounded-full text-center xl:block ${u==="error"?"bg-danger":""}`}),p.jsx(ze.div,{initial:!1,animate:u,transition:lc,className:"relative flex aspect-square size-10 items-center justify-center rounded-full font-medium",variants:{error:{color:s("var(--danger-foreground)"),borderColor:s("var(--danger-hover)"),backgroundColor:s("var(--danger-DEFAULT)")},inactive:{transition:lc,color:s("var(--disabled)"),borderColor:s("var(--card-border)"),backgroundColor:s("var(--background)")},active:{transition:lc,color:s("var(--primary-foreground)"),borderColor:s("var(--primary-DEFAULT)"),backgroundColor:s("var(--primary-DEFAULT)")},complete:{transition:lc,color:s("var(--success-foreground)"),borderColor:s("var(--success-DEFAULT)"),backgroundColor:s("var(--success-DEFAULT)")}},children:p.jsx("div",{className:"flex items-center justify-center",children:u==="complete"?p.jsx(mz,{className:"size-6 text-primary-foreground"}):u==="error"?p.jsx(hz,{className:"size-6 text-danger-foreground"}):p.jsx(S.Fragment,{children:p.jsx("span",{children:e})})})}),p.jsx("header",{className:"flex flex-col items-start justify-start px-2",children:p.jsx("h3",{className:`flex h-full items-center whitespace-nowrap font-normal ${o}`,children:r})})]})]})},wz=e=>{const t=S.useRef(e.currentStep),[n,r]=S.useState(e.currentStep);S.useEffect(()=>{t.current=n;const i=setTimeout(()=>{r(e.currentStep)},nh*1e3);return()=>clearTimeout(i)},[e.currentStep,n]);const o={currentStep:e.currentStep,previousStep:t.current,progressBarDuration:nh,steps:S.Children.count(e.children)};return p.jsx(TS.Provider,{value:o,children:p.jsx("div",{className:"relative flex w-full flex-col items-start justify-center gap-4 lg:flex-row lg:items-center lg:justify-between",children:e.children})})},CS=(e,t)=>{const[n,r]=S.useState(()=>t||e);return S.useEffect(()=>{r(e)},[e]),[n,r]},kS={ArrowLeft:"ArrowLeft",ArrowRight:"ArrowRight"},IS=S.createContext(""),Sz=e=>e.hasAttribute("disabled")||e.getAttribute("aria-disabled")==="true",oh=(e,t,n)=>{const r=n==="forward"?1:-1,o=t+r;for(let i=o;i>=0&&i<e.length;i+=r){const s=e[i];if(!Sz(s))return s}return n==="backward"?oh(e,e.length-1,"backward"):oh(e,-1,"forward")},AS=(e,t)=>{const n=Array.from(e.querySelectorAll("li")),r=n.findIndex(i=>i.dataset.active==="true");if(r===-1)return null;const o=oh(n,r,t);return o===null?null:(o.querySelector("button")?.focus({preventScroll:!1}),o.getAttribute("data-id")||"")},PS={[kS.ArrowLeft]:(e,t)=>AS(t,"backward"),[kS.ArrowRight]:(e,t)=>AS(t,"forward")},Tz=e=>{const[t,n]=CS(e.active),r=S.useRef(null),o=Lr(e.onChange);S.useEffect(()=>{const l=r.current;if(l===null)return;let c=l.querySelector("li[data-active=true]");if(c===null){c=l.querySelector("li[data-id]");const u=c.getAttribute("data-id")||"";n(u)}},[e.active,n]),S.useEffect(()=>{o.current&&o.current(t)},[o,t]);const i=S.Children.toArray(e.children),s=l=>{const c=l.currentTarget;n(c.dataset.id||"")},a=l=>{if(r.current===null)return;const c=l.key;if(He.keyof(PS,c)){const u=PS[c],d=u(l,r.current);if(d===null)return;n(d)}};return p.jsx(IS.Provider,{value:t,children:p.jsx(ac,{className:e.className,container:Pe("pt-0 max-w-full w-full min-w-0",e.container),header:p.jsxs("header",{className:"relative mb-2 overflow-x-auto",children:[p.jsx("div",{className:"absolute bottom-0 h-[1px] w-full bg-card-border"}),p.jsx("nav",{className:"min-w-0",children:p.jsx("ul",{onKeyDown:a,ref:r,className:"flex w-0 min-w-full flex-1 justify-start overflow-x-auto",children:i.map(l=>{const c=l.props,u=t===c.id;return p.jsx("li",{"data-id":c.id,"data-active":u,"aria-disabled":c.disabled,className:Pe("relative w-fit border-b border-transparent transition-all",u?"border-primary font-medium text-primary":"",c.disabled?"aria-disabled:text-disabled":""),children:p.jsx(un,{as:"button",type:"button","data-id":c.id,"aria-current":"page",disabled:c.disabled,onClick:c.disabled?void 0:s,className:"block w-full whitespace-nowrap px-10 py-4 disabled:cursor-not-allowed",children:c.title})},`tab-header-${c.id}`)})})})]}),children:e.children})})},Ez=()=>S.useContext(IS),Cz=e=>{const t=Ez();return p.jsx(S.Fragment,{children:e.id===t?e.children:null})},OS={true:{opacity:1,height:"auto"},false:{opacity:[.7,.3,0],height:0}},kz={type:"tween",duration:.7,ease:[.04,.62,.23,.98]},DS=e=>p.jsx(ze.div,{...e,layout:!0,layoutRoot:!0,layoutScroll:!0,initial:!1,variants:OS,exit:OS.false,transition:kz,"aria-hidden":!e.open,"data-component":"collapse",animate:e.open.toString(),className:Pe("aria-hidden:pointer-events-none",e.className),children:e.children}),Iz=_o("p-4 w-full block border relative rounded-lg text-sm",{variants:{theme:{primary:"bg-alert-primary-bg text-alert-primary-text border-alert-primary-border",danger:"bg-alert-danger-bg text-alert-danger-text border-alert-danger-border",info:"bg-alert-info-bg text-alert-info-text border-alert-info-border",success:"bg-alert-success-bg text-alert-success-text border-alert-success-border",secondary:"bg-alert-secondary-bg text-alert-secondary-text border-alert-secondary-border",warn:"bg-alert-warn-bg text-alert-warn-text border-alert-warn-border",neutral:"bg-transparent border border-card-border text-alert-primary-text"}},defaultVariants:{theme:"neutral"}}),Az=S.forwardRef(function({className:t,theme:n,Icon:r,onClose:o,open:i=!0,...s},a){const l=()=>o?.(!1);return p.jsx(gn,{presenceAffectsLayout:!0,propagate:!0,mode:"sync",children:i?p.jsx(ze.div,{"data-open":!!i,"aria-hidden":!i,"data-component":"alert",className:Pe("isolate w-full",i?"pointer-events-auto":"pointer-events-none"),children:p.jsx(DS,{"data-open":!!i,open:!!i,children:p.jsx(un,{...s,ref:a,role:"alert","data-theme":n,as:s.as??"div",className:Pe(Iz({theme:n}),t),children:p.jsxs("div",{className:"grid grid-cols-[auto_1fr] gap-base",children:[o!==void 0&&i?p.jsx("button",{type:"button",onClick:l,className:"absolute right-3 top-3 text-foreground transition-colors duration-300 ease-in-out hover:text-danger",children:p.jsx(jo,{size:20})}):null,p.jsxs("div",{className:Pe("flex items-center gap-2",s.title?"":"w-fit"),children:[!r&&n==="success"?p.jsx(Vu,{"aria-hidden":"true",size:20}):null,!r&&n==="info"?p.jsx(Er,{"aria-hidden":"true",size:20}):null,!r&&n==="danger"?p.jsx(Bu,{"aria-hidden":"true",size:20}):null,r]}),s.title?p.jsx("h4",{className:"tracking-3 col-start-2 text-balance text-lg font-semibold",children:s.title}):null,p.jsx("div",{className:"col-start-2 w-full",children:s.children})]})})})}):null})}),Pz=e=>p.jsxs("div",{className:"divide-y divide-card-border rounded-card border border-card-border bg-card-background shadow-shadow-card",children:[p.jsxs("header",{className:"flex items-start gap-4 p-6",children:[p.jsx("div",{className:Pe("flex aspect-square size-10 items-center justify-center rounded-card bg-primary p-8",e.iconContainer),children:p.jsx("div",{children:p.jsx(e.Icon,{className:"aspect-square size-10 text-primary-foreground"})})}),p.jsxs("div",{className:"flex flex-col gap-1",children:[p.jsx("header",{children:p.jsx("h3",{className:"text-base leading-none",children:e.title})}),p.jsx("p",{className:"text-4xl font-semibold",children:e.children})]})]}),e.footer?p.jsx("footer",{className:"px-6 py-2",children:e.footer}):null]}),Oz=Symbol.for("react.lazy");function NS(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Dz(...e){return t=>{let n=!1;const r=e.map(o=>{const i=NS(o,t);return!n&&typeof i=="function"&&(n=!0),i});if(n)return()=>{for(let o=0;o<r.length;o++){const i=r[o];typeof i=="function"?i():NS(e[o],null)}}}}const cc=P[" use ".trim().toString()];function Nz(e){return typeof e=="object"&&e!==null&&"then"in e}function MS(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===Oz&&"_payload"in e&&Nz(e._payload)}function Mz(e){const t=_z(e),n=P.forwardRef((r,o)=>{let{children:i,...s}=r;MS(i)&&typeof cc=="function"&&(i=cc(i._payload));const a=P.Children.toArray(i),l=a.find(Lz);if(l){const c=l.props.children,u=a.map(d=>d===l?P.Children.count(c)>1?P.Children.only(null):P.isValidElement(c)?c.props.children:null:d);return p.jsx(t,{...s,ref:o,children:P.isValidElement(c)?P.cloneElement(c,void 0,u):null})}return p.jsx(t,{...s,ref:o,children:i})});return n.displayName=`${e}.Slot`,n}const _S=Mz("Slot");function _z(e){const t=P.forwardRef((n,r)=>{let{children:o,...i}=n;if(MS(o)&&typeof cc=="function"&&(o=cc(o._payload)),P.isValidElement(o)){const s=$z(o),a=Vz(i,o.props);return o.type!==P.Fragment&&(a.ref=r?Dz(r,s):s),P.cloneElement(o,a)}return P.Children.count(o)>1?P.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}const Fz=Symbol("radix.slottable");function Lz(e){return P.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Fz}function Vz(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...a)=>{const l=i(...a);return o(...a),l}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function $z(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}const FS=(e="")=>Pe("w-full min-w-36 outline-none p-2.5 items-center flex justify-between text-left","hover:bg-primary focus:bg-primary aria-expanded:opacity-80","focus:text-primary-foreground hover:text-primary-foreground","first-of-type:rounded-t-lg last-of-type:rounded-b-lg","disabled:opacity-40 disabled:cursor-not-allowed",e),ih=S.createContext({isOpen:!1,activeIndex:null,getItemProps:()=>({}),setActiveIndex:()=>{},setHasFocusInside:()=>{}}),LS=S.forwardRef(({children:e,FloatingComponent:t="div",hover:n=!0,open:r,isParent:o=!1,restoreFocus:i=!1,floatingClassName:s="",label:a,...l},c)=>{const[u,d]=S.useState(r??!1),[f,h]=S.useState(!1),[g,y]=S.useState(null),m=S.useRef([]),v=S.useRef([]),b=S.useContext(ih),x=Pr(),T=Or(),E=zP(),I=Jy(),w=x!==null,{floatingStyles:C,refs:A,context:O}=Kn({nodeId:E,open:u,transform:!0,strategy:"absolute",onOpenChange:d,whileElementsMounted:lo,placement:w?"right":"bottom-start",middleware:[Go({mainAxis:w?0:4,alignmentAxis:w?-4:0}),Ka(),Ya()]}),_=yr(O,{role:"menu"}),N=Nr(O,{bubbles:!0}),$=fd(O,{move:!1,enabled:n,delay:{open:Nv},handleClose:Dv({blockPointerEvents:!0,requireIntent:!1})}),D=Ko(O,{toggle:!w,event:"mousedown",ignoreMouse:w,keyboardHandlers:!0}),F=ol(O,{loop:!0,activeIndex:g,nested:w,listRef:m,onNavigate:y}),z=dO(O,{activeIndex:g,listRef:v,resetMs:pO,onMatch:u?y:void 0}),{getReferenceProps:M,getFloatingProps:k,getItemProps:V}=Zn([$,D,_,N,F,z]);S.useEffect(()=>{if(!T)return;const R=()=>d(!1),U=G=>{G.nodeId!==E&&G.parentId===x&&d(!1)};return T.events.on("click",R),T.events.on("menuopen",U),()=>{T.events.off("click",R),T.events.off("menuopen",U)}},[T,E,x]),S.useEffect(()=>{u&&T&&T.events.emit("menuopen",{parentId:x,nodeId:E})},[T,u,E,x]);const L=o?l.className:Pe(FS(l.className));return p.jsxs(jP,{id:E,children:[p.jsx(S.Fragment,{children:l.asChild?p.jsx(_S,{...M(b.getItemProps({...l,onFocus(R){l.onFocus?.(R),h(!1),b.setHasFocusInside(!0)}})),children:a,className:L,"data-open":u?"":void 0,"data-nested":w?"":void 0,role:w?"menuitem":void 0,"data-focus-inside":f?"":void 0,ref:fr(A.setReference,I.ref,c),tabIndex:w?b.activeIndex===I.index?0:-1:void 0}):p.jsxs("button",{type:"button",className:L,"data-open":u?"":void 0,"data-nested":w?"":void 0,role:w?"menuitem":void 0,"data-focus-inside":f?"":void 0,ref:fr(A.setReference,I.ref,c),tabIndex:w?b.activeIndex===I.index?0:-1:void 0,...M(b.getItemProps({...l,onFocus(R){l.onFocus?.(R),h(!1),b.setHasFocusInside(!0)}})),children:[a,w&&p.jsxs("span",{style:{marginLeft:10,fontSize:10},children:[p.jsx("span",{className:"sr-only",children:"Next menu"}),p.jsx(Ta,{size:14})]})]})}),p.jsx(ih.Provider,{value:{activeIndex:g,setActiveIndex:y,getItemProps:V,setHasFocusInside:h,isOpen:u},children:p.jsx(MP,{elementsRef:m,labelsRef:v,children:u&&p.jsx(gr,{children:p.jsx(fo,{context:O,modal:!1,initialFocus:w?-1:0,returnFocus:o?i:!w,children:p.jsx(t,{...k(),ref:A.setFloating,style:{...l.style,...C},className:Pe("isolate z-tooltip flex max-h-80 flex-col items-start overflow-y-auto rounded-lg border border-floating-border bg-floating-background text-left shadow-shadow-floating outline-none",s),children:e})})})})})]})}),zz=S.forwardRef(({title:e,Right:t,disabled:n,children:r,...o},i)=>{const s=S.useContext(ih),a=Jy({label:n?null:e}),l=Or(),c=a.index===s.activeIndex;return p.jsxs("button",{...o,title:e,type:"button",role:"menuitem",disabled:n,"data-active":c,"data-open":s.isOpen,tabIndex:c?0:-1,ref:fr(a.ref,i),className:FS(`${o.className??""} ${c?"bg-primary text-primary-foreground":""}`),...s.getItemProps({onClick(u){o.onClick?.(u),l?.events.emit("click")},onFocus(u){o.onFocus?.(u),s.setHasFocusInside(!0)}}),children:[r,t?p.jsx(t,{size:16}):null]})}),jz=S.forwardRef((e,t)=>Pr()===null?p.jsx(BP,{children:p.jsx(LS,{...e,isParent:!0,ref:t})}):p.jsx(LS,{...e,isParent:!1,ref:t})),sh=S.forwardRef(({children:e,asTask:t=!1,labelClassName:n,loading:r,error:o,className:i="",size:s,container:a,...l},c)=>{const u=l.disabled||r;return p.jsxs("label",{"aria-disabled":u,"data-disabled":u,"data-task":t,"data-component":"checkbox",className:Pe("group flex w-fit flex-wrap items-center font-normal data-[disabled=true]:cursor-not-allowed",t?"group-checkbox-checked:line-through":"",a),children:[p.jsx("input",{...l,ref:c,disabled:u,type:"checkbox","data-task":t,className:Pe("form-checkbox mr-2 inline-block size-4 appearance-none rounded border-card-border bg-origin-border text-primary focus:ring-primary disabled:opacity-70 group-aria-disabled:cursor-not-allowed",i)}),e,p.jsx("span",{"data-name":"checkbox-label",className:Pe("min-w-full flex-1 text-xs text-danger empty:mt-0 empty:hidden",n),children:o})]})}),Bz=({children:e,className:t="",size:n,...r})=>p.jsxs("label",{"data-component":"radiobox","data-disabled":r.disabled,"aria-disabled":r.disabled,className:"group flex items-center gap-2 font-normal data-[disabled=true]:cursor-not-allowed",children:[p.jsx("input",{...r,type:"radio",className:Pe("app form-radio inline-block h-4 w-4 appearance-none rounded-full border-card-border bg-origin-border text-primary focus:ring-primary disabled:opacity-70 group-aria-disabled:cursor-not-allowed",t),...r}),e]}),Rz=$v("textarea","textarea",{container:"w-full"},e=>{const t=()=>{const n=e.value.split(`
16
+ `);if(e.style.height="auto",n.length>1)return void(e.style.height=`${e.scrollHeight}px`)};return e.addEventListener("input",t),()=>e.removeEventListener("input",t)}),Hz=(e,t)=>Mr()?t:window.matchMedia(e).matches,Wz=(e,t=!0)=>{const[n,r]=S.useState(t);return S.useLayoutEffect(()=>{const o=window.matchMedia(e),i=()=>r(Hz(e,t));return i(),o.addListener?(o.addListener(i),()=>o.removeListener?o.removeListener(i):void 0):(o.addEventListener("change",i),()=>o.removeEventListener("change",i))},[e]),n},qz=()=>S.useContext(oo).floatingRef??void 0,VS=S.createContext(async()=>!1),Uz=()=>S.useContext(VS),kn="500ms",Gz={exit:{x:["0%","-30%"],opacity:0,animationDuration:kn},enter:{x:["-30%","0%"],opacity:1,animationDuration:kn},initial:{x:["-30%","0%"],opacity:.8,animationDuration:kn}},Yz={enter:{x:"0%",opacity:1,animationDuration:kn},exit:{x:["0%","30%"],opacity:0,animationDuration:kn},initial:{x:["30%","0%"],opacity:.8,animationDuration:kn}},ah={drawer:e=>e==="left"?Gz:Yz,sheet:{enter:{opacity:1,y:"0%",animationDuration:kn,transformOrigin:"bottom"},exit:{opacity:.4,y:"10%",animationDuration:kn,transformOrigin:"bottom"},initial:{opacity:.7,y:"10%",animationDuration:kn,transformOrigin:"bottom"}},dialog:{exit:{opacity:0,scale:.95,animationDuration:kn},enter:{opacity:1,scale:[1.05,1],animationDuration:kn},initial:{opacity:.5,scale:.95,animationDuration:kn,transition:{duration:.5,ease:"easeInOut"}}}},Kz=_o("z-floating border border-floating-border ring-0 outline-0 appearance-none flex flex-col gap-4 flex-nowrap min-w-xs bg-floating-background",{variants:{type:{drawer:"max-h-screen max-w-[90%] absolute w-fit h-screen min-h-0",dialog:"max-h-[calc(100lvh-10%)] relative container h-min rounded-lg py-4",sheet:"w-screen absolute bottom-0 max-h-[calc(100vh-15%)] max-h-[calc(100svh-5%)] h-screen pt-6 pb-4 rounded-t-lg"},position:{none:"",right:"py-4 absolute right-0 top-0 rounded-l-lg",left:"py-4 absolute left-0 top-0 rounded-r-lg"}},defaultVariants:{position:"right",type:"dialog"}}),$S={top:0,left:0,right:0,bottom:0},zS=e=>e*.6,Zz=e=>{const t=(n,r)=>{if(e.parent.current){if(n.stopPropagation(),n.stopImmediatePropagation(),e.sheet){const c=e.parent.current.getBoundingClientRect(),u=e.value.get()||c.height,d=Math.abs(u-r.delta.y),f=window.outerHeight,h=zS(f);return d>=h?e.value.set(d):(document.activeElement instanceof HTMLElement&&document.activeElement?.blur(),e.onChange(!1),setTimeout(()=>e.value.set(void 0),350))}const o=e.parent.current,i=e.value.get()||o.getBoundingClientRect().width,s=e.position==="right"?-r.delta.x:r.delta.x,a=Math.abs(i+s);return e.value.set(a)}};return p.jsx(ze.button,{draggable:!0,dragListener:!0,dragMomentum:!0,type:"button",animate:!1,dragElastic:0,dragPropagation:!0,initial:!1,onDrag:t,dragSnapToOrigin:!0,dragDirectionLock:!0,drag:e.sheet?"y":"x",dragConstraints:$S,whileDrag:{cursor:"grabbing"},className:Pe("absolute isolate z-calendar rounded-lg",e.sheet?"cursor-row-resize":"cursor-col-resize bg-floating-border",e.sheet?"top-1 flex h-3 w-full justify-center py-2":e.position==="left"?"right-5 top-1/2 h-10 w-2":"left-2 top-1/2 h-10 w-2"),children:e.sheet?p.jsx("div",{className:"h-2 w-1/4 rounded-lg bg-floating-border"}):null})},uc={drawer:"right",sheet:"none",dialog:"none"},Xz=(e,t,n,r)=>{const o=n||"dialog";return e?n==="drawer"?r??uc.drawer:uc[o]:t?uc[o]:uc.sheet},Qz=[],Ys=S.forwardRef(({open:e,title:t,footer:n,asChild:r,trigger:o,children:i,onChange:s,ariaTitle:a,className:l,bodyClassName:c,resizer:u=!0,animated:d=!0,closable:f=!0,forceType:h=!1,layoutId:g=void 0,overlayClassName:y="",type:m="dialog",position:v,overlayClickClose:b=!1,closeOnFocusOut:x=!1,interactions:T=Qz,...E},I)=>{const w=qz(),C=S.useRef(null),A=S.useRef(null),O=S.useId(),_=S.useId(),N=Wz("(min-width: 64rem)"),$=Xz(N,h,m,v),D=N||h?ah[m]:ah.sheet,F=typeof D=="function"?D($):D,z=N||h?m:"sheet",M=z!=="dialog",k=Kn({open:e,onOpenChange:s,strategy:"fixed"}),V=Ko(k.context,{}),L=yr(k.context,{role:"dialog"}),R=Nr(k.context,{bubbles:!0,escapeKey:!0,outsidePress:ce=>{const Q=ce.target;return b&&!!Q?.isConnected}}),U=Zn([V,R,L].concat(T)),G=o,H=wo(void 0),ee=wo(void 0),se=S.useRef(!1),te=S.useRef(0);S.useEffect(()=>{H.set(void 0),ee.set(void 0)},[z,H,ee]);const q=()=>s(!1);S.useImperativeHandle(I,()=>({context:k.context,floating:A.current}),[k.context,A]);const Z=z==="sheet"?{drag:"y",animate:!1,dragElastic:0,initial:!1,dragConstraints:$S,draggable:!0,dragListener:!0,dragMomentum:!0,onDrag:(ce,Q)=>{const oe=k.refs.floating.current.getBoundingClientRect(),he=H.get()||oe.height,ie=Math.abs(he-Q.delta.y),le=window.outerHeight,be=zS(le);return ie>=be?H.set(ie):(document.activeElement instanceof HTMLElement&&document.activeElement?.blur(),s?.(!1),setTimeout(()=>H.set(void 0),350))},dragPropagation:!0,dragSnapToOrigin:!0,dragDirectionLock:!0,whileDrag:{cursor:"grabbing"}}:{animate:d,initial:!1},pe=wo(void 0),B=wo(void 0),ae=r?_S:ze.button;return p.jsxs(S.Fragment,{children:[o?p.jsx(ae,{ref:k.refs.setReference,...U.getReferenceProps(),layoutId:g,type:"button",children:G}):null,p.jsx(Qf,{reducedMotion:d?"user":"always",children:p.jsx(gr,{preserveTabOrder:!0,root:w,children:p.jsx(gn,{mode:"wait",propagate:!0,children:e?p.jsx(yd,{lockScroll:!0,className:Pe("inset-0 isolate z-overlay flex h-[100dvh] !overflow-clip bg-floating-overlay/80",z==="drawer"?"":"items-start justify-center pt-10 lg:p-10",y),children:p.jsx(fo,{guards:!0,modal:!0,closeOnFocusOut:x,context:k.context,children:p.jsx(gn,{propagate:!0,children:p.jsxs(ze.div,{...E,...t?{"aria-labelledby":O,"aria-describedby":_}:{"aria-label":a},...U.getFloatingProps({"aria-modal":e,ref:fr(k.refs.setFloating,A),className:Pe(Kz({position:$,type:z}),l,"isolate overscroll-contain")}),exit:"exit",layout:!0,animate:"enter",initial:"initial",layoutId:g,variants:F,"data-component":"modal",style:z==="drawer"?{width:H}:{height:H,y:ee},children:[M&&u?p.jsx(Zz,{onChange:s,value:H,sheet:z==="sheet",position:$,parent:k.refs.floating}):null,t?p.jsx(ze.header,{...Z,className:"relative isolate w-full",children:t?p.jsx("h2",{id:O,className:"block select-text border-b border-floating-border px-8 pb-2 text-3xl font-medium leading-relaxed",children:t}):null}):null,p.jsx(ze.section,{ref:C,"data-component":"modal-body",className:Pe("flex-1 select-text overflow-y-auto px-8 py-1",c),onTouchEnd:async()=>{if(B.set(void 0),pe.set(void 0),se.current){const ce=ee.get()||0,Q=window.innerHeight*.2;ce>Q?(await qw(ee,window.innerHeight,{duration:.2,ease:"easeIn"}).finished,s(!1)):qw(ee,0,{type:"spring",bounce:0,duration:.3}),se.current=!1}},onTouchStart:ce=>{const Q=ce.changedTouches[0];pe.set(Q.pageY),B.set(Q.pageY),se.current=!1},onTouchMove:ce=>{const ue=ce.changedTouches[0].pageY,oe=B.get()||ue,he=C.current?.scrollTop||0;if(!se.current&&he<=0&&ue>oe&&z==="sheet"&&(se.current=!0,te.current=ue),se.current){const ie=ue-te.current;ie<0?ee.set(ie*.2):ee.set(ie)}B.set(ue)},children:i}),n?p.jsx("footer",{className:"w-full select-text border-t border-floating-border px-8 pt-4",children:n}):null,f?p.jsx("nav",{className:"absolute right-4 top-1 z-floating",children:p.jsx("button",{type:"button",onClick:q,className:"p-1 opacity-70 transition-colors hover:text-danger hover:opacity-100 focus:text-danger",children:p.jsx(jo,{})})}):null]})})})}):null})})})]})});let jS=async e=>(typeof window<"u"&&console.warn("ConfirmationProvider is not mounted"),!1);Ys.confirm=e=>jS(e);const BS=({children:e})=>{const[t,n]=S.useState(!1),[r,o]=S.useState({}),[i,s]=S.useState(()=>{}),a=S.useCallback(u=>(o(u),n(!0),new Promise(d=>{s(()=>d)})),[]);S.useEffect(()=>{jS=a},[a]);const l=()=>{n(!1);const u=r.confirm?.value??!0;i(u??!0)},c=()=>{n(!1);const u=r.cancel?.value??!1;i(u??!1)};return p.jsxs(VS.Provider,{value:a,children:[e,p.jsx(Ys,{open:t,type:"dialog",closable:!1,onChange:n,overlayClickClose:!1,title:r.title||"Confirmation",className:"container max-w-dialog lg:max-w-96",footer:p.jsxs("div",{className:"flex justify-end gap-2",children:[p.jsx(Jt,{theme:r.cancel?.theme||"ghost-muted",onClick:c,children:r.cancel?.text||"Cancel"}),p.jsx(Jt,{autoFocus:!0,theme:r.confirm?.theme||"primary",onClick:l,children:r.confirm?.text||"Confirm"})]}),children:p.jsx("div",{className:"py-2 text-foreground",children:r.description})})]})},Jz=e=>{const[t,n]=JF();return S.useEffect(()=>{const r=t.current;if(!r)return;const o=i=>{const s=i.target,a=Array.from(r.querySelectorAll("input[data-task=true]")),l=a.every(u=>u.checked),c=a.indexOf(s);l&&c!==-1&&n("input",{scale:[1,1.35,1],rotate:[0,20,-20,0]},{duration:.5,delay:r_(.075,{from:c})})};return r.addEventListener("change",o),()=>r.removeEventListener("change",o)},[]),p.jsx("fieldset",{...e,"data-component":"task-list",ref:t})},ej=e=>p.jsx("p",{...e,className:Pe("text-base leading-snug",e.className)}),tj=e=>p.jsx("p",{...e,className:Pe("mb-kilo text-sm text-secondary",e.className)}),nj=e=>p.jsx("div",{className:Pe(`flex ${e.row?"flex-row items-center":"flex-col"} gap-1`,e.className),children:p.jsxs(S.Fragment,{children:[p.jsx("span",{className:"text-sm font-medium tracking-wide",children:e.row?`${e.label}:`:e.label}),p.jsx("span",{className:Pe(e.disabled?"text-disabled":"",e.row?"w-fit text-base":"w-full text-lg"),children:e.children})]})}),RS=e=>p.jsxs("div",{children:[p.jsx("h2",{className:"typography text-3xl font-bold tracking-wide",children:e.title}),p.jsx("p",{className:"typography text-secondary",children:e.children})]}),rj=e=>p.jsxs("header",{className:"gap-mega min-w-full flex flex-row flex-wrap items-center justify-between",children:[p.jsx("div",{children:p.jsx(RS,{title:e.title,children:e.description})}),p.jsx("div",{className:"gap-kilo flex flex-wrap items-center",children:e.children})]}),HS=e=>p.jsx("span",{"aria-busy":"true","aria-description":"Carregando...",className:Pe("box-border inline-block aspect-square size-12 animate-spin rounded-full border-4 border-background border-b-primary",e.className)}),oj=()=>p.jsx("div",{className:"flex h-full w-full items-center justify-center p-12",children:p.jsx(HS,{})}),ij=e=>{const t=S.useRef(null),n=S.useId(),r=`${n}:wrapper`,o=`${n}:title`,[i,s]=S.useState(e.open??!1);S.useEffect(()=>{s(e.open??!1)},[e.open]);const{context:a,refs:l}=Kn({transform:!0,open:i!==null,nodeId:n,onOpenChange:s,strategy:"absolute"}),c=Ko(a,{enabled:e.disabled??!0}),u=yr(a,{role:"tooltip"}),d=Nr(a,{escapeKey:!0,referencePress:!0,outsidePress:!0}),{getFloatingProps:f,getReferenceProps:h}=Zn([c,u,d]);return p.jsxs("div",{className:"relative inline-flex items-center justify-center",ref:t,children:[p.jsx(Jt,{...h(e),as:ze.button,layoutId:r,ref:l.setReference,size:"small",onClick:()=>s(!0),children:p.jsx(ze.span,{layoutId:o,children:e.trigger})}),p.jsx(gn,{children:i?p.jsx(gr,{root:t,children:p.jsx(fo,{visuallyHiddenDismiss:!0,modal:!0,closeOnFocusOut:!0,context:a,children:p.jsx(ze.div,{...f(),ref:l.setFloating,layoutId:r,className:"absolute -left-1/4 -top-3/4",children:e.children})})}):null})]})},sj=(e,t)=>{const n=S.useRef(t);n.current=t,S.useEffect(()=>{if(!e)return;const r=new ResizeObserver(o=>{o[0]&&n.current(o[0])});return r.observe(e),()=>r.disconnect()},[e])},aj=()=>{const[e,t]=S.useState({width:0,height:0});return S.useEffect(()=>{if(typeof window>"u")return;const n=()=>t({width:window.innerWidth,height:window.innerHeight});return n(),window.addEventListener("resize",n,{passive:!0}),()=>window.removeEventListener("resize",n)},[]),e},lj=e=>({top:0,left:0,width:0,height:0,bottom:0,right:0}),cj=e=>typeof e=="string"?document.querySelector(e):"current"in e?e.current:e,uj=({steps:e,active:t=!1,onClose:n=Qo,onFinish:r=Qo,onChange:o=Qo,labels:i})=>{const s=vt(),[a,l]=S.useState(0),c=e[a],[u,d]=S.useState(null),[f,h]=S.useState(lj()),[g,y]=S.useState(!1),m=S.useRef(null),{width:v,height:b}=aj(),x={next:i?.next??s.wizardNext,previous:i?.previous??s.wizardPrev,finish:i?.finish??s.wizardFinish,skip:i?.skip??s.wizardSkip},{refs:T,floatingStyles:E,context:I}=Kn({open:t&&g,placement:c?.side||"bottom",whileElementsMounted:lo,middleware:[Go(10),Ka(),Ya(),ld({element:m})]}),{getFloatingProps:w}=Zn([yr(I)]);S.useEffect(()=>{t&&l(0)},[t]),S.useEffect(()=>{y(!1)},[a,t]),S.useEffect(()=>{if(!t||!c)return;const N=cj(c.element);N?(c.onEnter?.(),setTimeout(()=>{h(N.getBoundingClientRect()),T.setReference(N),d(N)},100)):(console.warn("Driver: Element not found:",c.element),d(null),h({top:0,left:0,width:0,height:0,bottom:0,right:0}))},[a,t,c,T]),S.useLayoutEffect(()=>{if(!u)return;const N=()=>h(u.getBoundingClientRect());return N(),window.addEventListener("scroll",N,{capture:!0,passive:!0}),window.addEventListener("resize",N,{capture:!0,passive:!0}),()=>{window.removeEventListener("scroll",N,{capture:!0}),window.removeEventListener("resize",N,{capture:!0})}},[u,v,b]),sj(u,N=>{h(N.target.getBoundingClientRect())});const C=()=>{c.onNext?.(),setTimeout(()=>{a<e.length-1?(l(N=>N+1),o(a+1)):(r(),n())},0)},A=()=>{c.onPrevious?.(),a>0&&(l(N=>N-1),o(a-1))};if(!t)return null;const O=a<e.length-1,_=a>0;return p.jsx(gr,{children:p.jsxs("div",{className:"pointer-events-none fixed inset-0 z-wizard",children:[p.jsxs("svg",{className:"absolute inset-0 h-full w-full fill-current text-floating-overlay/70",xmlns:"http://www.w3.org/2000/svg",children:[p.jsx("defs",{children:p.jsxs("mask",{id:"driver-mask",children:[p.jsx("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:"white"}),p.jsx(ze.rect,{rx:"4",fill:"black",initial:!1,onAnimationComplete:()=>y(!0),transition:{type:"spring",duration:.5,ease:"easeInOut"},animate:{x:f.left-5,y:f.top-5,width:f.width+10,height:f.height+10}})]})}),p.jsx("rect",{x:"0",y:"0",width:"100%",height:"100%",mask:"url(#driver-mask)",className:"pointer-events-auto"})]}),p.jsx(gn,{mode:"wait",children:c&&g&&p.jsx("div",{...w(),ref:T.setFloating,style:u?E:{position:"fixed",top:"50%",left:"50%",transform:"translate(-50%, -50%)"},className:"pointer-events-auto outline-none",children:p.jsxs(ze.div,{transition:{duration:.2},exit:{opacity:0,scale:.9},animate:{opacity:1,scale:1},initial:{opacity:0,scale:.9},className:"flex w-80 max-w-sm flex-col gap-3 rounded-lg border border-floating-border bg-floating-background p-4 shadow-lg",children:[u&&p.jsx(cd,{ref:m,context:I,className:"fill-floating-background stroke-floating-border"}),c.title&&p.jsx("h3",{children:c.title}),c.description&&p.jsx(S.Fragment,{children:c.description}),p.jsxs("div",{className:"mt-2 flex items-center justify-between border-t border-floating-border pt-2",children:[p.jsx(Jt,{theme:"raw",size:"small",onClick:n,className:"text-xs text-muted-foreground hover:text-foreground",children:x.skip}),p.jsxs("div",{className:"flex gap-2",children:[_&&p.jsx(Jt,{size:"small",theme:"ghost-muted",onClick:A,children:x.previous}),p.jsx(Jt,{size:"small",onClick:C,children:O?x.next:x.finish})]})]}),p.jsxs("div",{className:"absolute right-2 top-2 text-xs text-muted-foreground",children:[a+1," / ",e.length]})]})})})]})})},WS=6048e5,dj=864e5,fj=6e4,pj=36e5,hj=1e3,qS=Symbol.for("constructDateFrom");function dt(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&qS in e?e[qS](t):e instanceof Date?new e.constructor(t):new Date(t)}function Je(e,t){return dt(t||e,e)}function qr(e,t,n){const r=Je(e,n?.in);return isNaN(t)?dt(n?.in||e,NaN):(t&&r.setDate(r.getDate()+t),r)}function lh(e,t,n){const r=Je(e,n?.in);if(isNaN(t))return dt(e,NaN);if(!t)return r;const o=r.getDate(),i=dt(e,r.getTime());i.setMonth(r.getMonth()+t+1,0);const s=i.getDate();return o>=s?i:(r.setFullYear(i.getFullYear(),i.getMonth(),o),r)}function Pi(e,t,n){const{years:r=0,months:o=0,weeks:i=0,days:s=0,hours:a=0,minutes:l=0,seconds:c=0}=t,u=Je(e,n?.in),d=o||r?lh(u,o+r*12):u,f=s||i?qr(d,s+i*7):d,h=l+a*60,y=(c+h*60)*1e3;return dt(e,+f+y)}let mj={};function Co(){return mj}function In(e,t){const n=Co(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,o=Je(e,t?.in),i=o.getDay(),s=(i<r?7:0)+i-r;return o.setDate(o.getDate()-s),o.setHours(0,0,0,0),o}function Oi(e,t){return In(e,{...t,weekStartsOn:1})}function US(e,t){const n=Je(e,t?.in),r=n.getFullYear(),o=dt(n,0);o.setFullYear(r+1,0,4),o.setHours(0,0,0,0);const i=Oi(o),s=dt(n,0);s.setFullYear(r,0,4),s.setHours(0,0,0,0);const a=Oi(s);return n.getTime()>=i.getTime()?r+1:n.getTime()>=a.getTime()?r:r-1}function dc(e){const t=Je(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function fc(e,...t){const n=dt.bind(null,t.find(r=>typeof r=="object"));return t.map(n)}function ko(e,t){const n=Je(e,t?.in);return n.setHours(0,0,0,0),n}function gj(e,t,n){const[r,o]=fc(n?.in,e,t),i=ko(r),s=ko(o),a=+i-dc(i),l=+s-dc(s);return Math.round((a-l)/dj)}function yj(e,t){const n=US(e,t),r=dt(e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),Oi(r)}function GS(e,t,n){return qr(e,t*7,n)}function vj(e){return dt(e,Date.now())}function bj(e,t,n){const[r,o]=fc(n?.in,e,t);return+ko(r)==+ko(o)}function xj(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function pc(e){return!(!xj(e)&&typeof e!="number"||isNaN(+Je(e)))}function wj(e,t){const[n,r]=fc(e,t.start,t.end);return{start:n,end:r}}function YS(e,t){const{start:n,end:r}=wj(t?.in,e);let o=+n>+r;const i=o?+n:+r,s=o?r:n;s.setHours(0,0,0,0);let a=1;const l=[];for(;+s<=i;)l.push(dt(n,s)),s.setDate(s.getDate()+a),s.setHours(0,0,0,0);return o?l.reverse():l}function ch(e,t){const n=Je(e,t?.in);return n.setDate(1),n.setHours(0,0,0,0),n}function Sj(e,t){const n=Je(e,t?.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}function Tj(e,t){const n=Co(),r=n.weekStartsOn??n.locale?.options?.weekStartsOn??0,o=Je(e,t?.in),i=o.getDay(),s=(i<r?-7:0)+6-(i-r);return o.setDate(o.getDate()+s),o.setHours(23,59,59,999),o}const Ej={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},Cj=(e,t,n)=>{let r;const o=Ej[e];return typeof o=="string"?r=o:t===1?r=o.one:r=o.other.replace("{{count}}",t.toString()),n?.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function uh(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const kj={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},Ij={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},Aj={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Pj={date:uh({formats:kj,defaultWidth:"full"}),time:uh({formats:Ij,defaultWidth:"full"}),dateTime:uh({formats:Aj,defaultWidth:"full"})},Oj={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Dj=(e,t,n,r)=>Oj[e];function Ks(e){return(t,n)=>{const r=n?.context?String(n.context):"standalone";let o;if(r==="formatting"&&e.formattingValues){const s=e.defaultFormattingWidth||e.defaultWidth,a=n?.width?String(n.width):s;o=e.formattingValues[a]||e.formattingValues[s]}else{const s=e.defaultWidth,a=n?.width?String(n.width):e.defaultWidth;o=e.values[a]||e.values[s]}const i=e.argumentCallback?e.argumentCallback(t):t;return o[i]}}const Nj={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Mj={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},_j={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},Fj={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},Lj={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},Vj={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},$j={ordinalNumber:(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:Ks({values:Nj,defaultWidth:"wide"}),quarter:Ks({values:Mj,defaultWidth:"wide",argumentCallback:e=>e-1}),month:Ks({values:_j,defaultWidth:"wide"}),day:Ks({values:Fj,defaultWidth:"wide"}),dayPeriod:Ks({values:Lj,defaultWidth:"wide",formattingValues:Vj,defaultFormattingWidth:"wide"})};function Zs(e){return(t,n={})=>{const r=n.width,o=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],i=t.match(o);if(!i)return null;const s=i[0],a=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(a)?jj(a,d=>d.test(s)):zj(a,d=>d.test(s));let c;c=e.valueCallback?e.valueCallback(l):l,c=n.valueCallback?n.valueCallback(c):c;const u=t.slice(s.length);return{value:c,rest:u}}}function zj(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function jj(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function Bj(e){return(t,n={})=>{const r=t.match(e.matchPattern);if(!r)return null;const o=r[0],i=t.match(e.parsePattern);if(!i)return null;let s=e.valueCallback?e.valueCallback(i[0]):i[0];s=n.valueCallback?n.valueCallback(s):s;const a=t.slice(o.length);return{value:s,rest:a}}}const Rj=/^(\d+)(th|st|nd|rd)?/i,Hj=/\d+/i,Wj={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},qj={any:[/^b/i,/^(a|c)/i]},Uj={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},Gj={any:[/1/i,/2/i,/3/i,/4/i]},Yj={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},Kj={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},Zj={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},Xj={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},Qj={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},Jj={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},e4={ordinalNumber:Bj({matchPattern:Rj,parsePattern:Hj,valueCallback:e=>parseInt(e,10)}),era:Zs({matchPatterns:Wj,defaultMatchWidth:"wide",parsePatterns:qj,defaultParseWidth:"any"}),quarter:Zs({matchPatterns:Uj,defaultMatchWidth:"wide",parsePatterns:Gj,defaultParseWidth:"any",valueCallback:e=>e+1}),month:Zs({matchPatterns:Yj,defaultMatchWidth:"wide",parsePatterns:Kj,defaultParseWidth:"any"}),day:Zs({matchPatterns:Zj,defaultMatchWidth:"wide",parsePatterns:Xj,defaultParseWidth:"any"}),dayPeriod:Zs({matchPatterns:Qj,defaultMatchWidth:"any",parsePatterns:Jj,defaultParseWidth:"any"})},KS={code:"en-US",formatDistance:Cj,formatLong:Pj,formatRelative:Dj,localize:$j,match:e4,options:{weekStartsOn:0,firstWeekContainsDate:1}};function t4(e,t){const n=Je(e,t?.in);return gj(n,Sj(n))+1}function dh(e,t){const n=Je(e,t?.in),r=+Oi(n)-+yj(n);return Math.round(r/WS)+1}function fh(e,t){const n=Je(e,t?.in),r=n.getFullYear(),o=Co(),i=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??o.firstWeekContainsDate??o.locale?.options?.firstWeekContainsDate??1,s=dt(t?.in||e,0);s.setFullYear(r+1,0,i),s.setHours(0,0,0,0);const a=In(s,t),l=dt(t?.in||e,0);l.setFullYear(r,0,i),l.setHours(0,0,0,0);const c=In(l,t);return+n>=+a?r+1:+n>=+c?r:r-1}function n4(e,t){const n=Co(),r=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,o=fh(e,t),i=dt(t?.in||e,0);return i.setFullYear(o,0,r),i.setHours(0,0,0,0),In(i,t)}function ZS(e,t){const n=Je(e,t?.in),r=+In(n,t)-+n4(n,t);return Math.round(r/WS)+1}function ft(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const Ur={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return ft(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):ft(n+1,2)},d(e,t){return ft(e.getDate(),t.length)},a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];default:return n==="am"?"a.m.":"p.m."}},h(e,t){return ft(e.getHours()%12||12,t.length)},H(e,t){return ft(e.getHours(),t.length)},m(e,t){return ft(e.getMinutes(),t.length)},s(e,t){return ft(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),o=Math.trunc(r*Math.pow(10,n-3));return ft(o,t.length)}},Di={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},XS={G:function(e,t,n){const r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if(t==="yo"){const r=e.getFullYear(),o=r>0?r:1-r;return n.ordinalNumber(o,{unit:"year"})}return Ur.y(e,t)},Y:function(e,t,n,r){const o=fh(e,r),i=o>0?o:1-o;if(t==="YY"){const s=i%100;return ft(s,2)}return t==="Yo"?n.ordinalNumber(i,{unit:"year"}):ft(i,t.length)},R:function(e,t){const n=US(e);return ft(n,t.length)},u:function(e,t){const n=e.getFullYear();return ft(n,t.length)},Q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return ft(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return ft(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){const r=e.getMonth();switch(t){case"M":case"MM":return Ur.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return ft(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const o=ZS(e,r);return t==="wo"?n.ordinalNumber(o,{unit:"week"}):ft(o,t.length)},I:function(e,t,n){const r=dh(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):ft(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):Ur.d(e,t)},D:function(e,t,n){const r=t4(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):ft(r,t.length)},E:function(e,t,n){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const o=e.getDay(),i=(o-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(i);case"ee":return ft(i,2);case"eo":return n.ordinalNumber(i,{unit:"day"});case"eee":return n.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(o,{width:"short",context:"formatting"});default:return n.day(o,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const o=e.getDay(),i=(o-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(i);case"cc":return ft(i,t.length);case"co":return n.ordinalNumber(i,{unit:"day"});case"ccc":return n.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(o,{width:"narrow",context:"standalone"});case"cccccc":return n.day(o,{width:"short",context:"standalone"});default:return n.day(o,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),o=r===0?7:r;switch(t){case"i":return String(o);case"ii":return ft(o,t.length);case"io":return n.ordinalNumber(o,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const o=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(o,{width:"narrow",context:"formatting"});default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let o;switch(r===12?o=Di.noon:r===0?o=Di.midnight:o=r/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(o,{width:"narrow",context:"formatting"});default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let o;switch(r>=17?o=Di.evening:r>=12?o=Di.afternoon:r>=4?o=Di.morning:o=Di.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(o,{width:"narrow",context:"formatting"});default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},h:function(e,t,n){if(t==="ho"){let r=e.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return Ur.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):Ur.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):ft(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):ft(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):Ur.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):Ur.s(e,t)},S:function(e,t){return Ur.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return JS(r);case"XXXX":case"XX":return Io(r);default:return Io(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return JS(r);case"xxxx":case"xx":return Io(r);default:return Io(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+QS(r,":");default:return"GMT"+Io(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+QS(r,":");default:return"GMT"+Io(r,":")}},t:function(e,t,n){const r=Math.trunc(+e/1e3);return ft(r,t.length)},T:function(e,t,n){return ft(+e,t.length)}};function QS(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=Math.trunc(r/60),i=r%60;return i===0?n+String(o):n+String(o)+t+ft(i,2)}function JS(e,t){return e%60===0?(e>0?"-":"+")+ft(Math.abs(e)/60,2):Io(e,t)}function Io(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=ft(Math.trunc(r/60),2),i=ft(r%60,2);return n+o+t+i}const eT=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});default:return t.date({width:"full"})}},tT=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});default:return t.time({width:"full"})}},ph={p:tT,P:(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],o=n[2];if(!o)return eT(e,t);let i;switch(r){case"P":i=t.dateTime({width:"short"});break;case"PP":i=t.dateTime({width:"medium"});break;case"PPP":i=t.dateTime({width:"long"});break;default:i=t.dateTime({width:"full"});break}return i.replace("{{date}}",eT(r,t)).replace("{{time}}",tT(o,t))}},r4=/^D+$/,o4=/^Y+$/,i4=["D","DD","YY","YYYY"];function nT(e){return r4.test(e)}function rT(e){return o4.test(e)}function hh(e,t,n){const r=s4(e,t,n);if(console.warn(r),i4.includes(e))throw new RangeError(r)}function s4(e,t,n){const r=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const a4=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,l4=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,c4=/^'([^]*?)'?$/,u4=/''/g,d4=/[a-zA-Z]/;function mh(e,t,n){const r=Co(),o=r.locale??KS,i=r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,s=r.weekStartsOn??r.locale?.options?.weekStartsOn??0,a=Je(e,n?.in);if(!pc(a))throw new RangeError("Invalid time value");let l=t.match(l4).map(u=>{const d=u[0];if(d==="p"||d==="P"){const f=ph[d];return f(u,o.formatLong)}return u}).join("").match(a4).map(u=>{if(u==="''")return{isToken:!1,value:"'"};const d=u[0];if(d==="'")return{isToken:!1,value:f4(u)};if(XS[d])return{isToken:!0,value:u};if(d.match(d4))throw new RangeError("Format string contains an unescaped latin alphabet character `"+d+"`");return{isToken:!1,value:u}});o.localize.preprocessor&&(l=o.localize.preprocessor(a,l));const c={firstWeekContainsDate:i,weekStartsOn:s,locale:o};return l.map(u=>{if(!u.isToken)return u.value;const d=u.value;(rT(d)||nT(d))&&hh(d,t,String(e));const f=XS[d[0]];return f(a,d,o.localize,c)}).join("")}function f4(e){const t=e.match(c4);return t?t[1].replace(u4,"'"):e}function p4(e,t){const n=Je(e,t?.in),r=n.getFullYear(),o=n.getMonth(),i=dt(n,0);return i.setFullYear(r,o+1,0),i.setHours(0,0,0,0),i.getDate()}function h4(){return Object.assign({},Co())}function m4(e,t){const n=Je(e,t?.in).getDay();return n===0?7:n}function g4(e,t){return+Je(e)>+Je(t)}function y4(e,t){return+Je(e)<+Je(t)}function v4(e,t){const n=b4(t)?new t(0):dt(t,0);return n.setFullYear(e.getFullYear(),e.getMonth(),e.getDate()),n.setHours(e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()),n}function b4(e){return typeof e=="function"&&e.prototype?.constructor===e}const x4=10;class oT{subPriority=0;validate(t,n){return!0}}class w4 extends oT{constructor(t,n,r,o,i){super(),this.value=t,this.validateValue=n,this.setValue=r,this.priority=o,i&&(this.subPriority=i)}validate(t,n){return this.validateValue(t,this.value,n)}set(t,n,r){return this.setValue(t,n,this.value,r)}}class S4 extends oT{priority=x4;subPriority=-1;constructor(t,n){super(),this.context=t||(r=>dt(n,r))}set(t,n){return n.timestampIsSet?t:dt(t,v4(t,this.context))}}class rt{run(t,n,r,o){const i=this.parse(t,n,r,o);return i?{setter:new w4(i.value,this.validate,this.set,this.priority,this.subPriority),rest:i.rest}:null}validate(t,n,r){return!0}}class T4 extends rt{priority=140;parse(t,n,r){switch(n){case"G":case"GG":case"GGG":return r.era(t,{width:"abbreviated"})||r.era(t,{width:"narrow"});case"GGGGG":return r.era(t,{width:"narrow"});default:return r.era(t,{width:"wide"})||r.era(t,{width:"abbreviated"})||r.era(t,{width:"narrow"})}}set(t,n,r){return n.era=r,t.setFullYear(r,0,1),t.setHours(0,0,0,0),t}incompatibleTokens=["R","u","t","T"]}const Nt={month:/^(1[0-2]|0?\d)/,date:/^(3[0-1]|[0-2]?\d)/,dayOfYear:/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,week:/^(5[0-3]|[0-4]?\d)/,hour23h:/^(2[0-3]|[0-1]?\d)/,hour24h:/^(2[0-4]|[0-1]?\d)/,hour11h:/^(1[0-1]|0?\d)/,hour12h:/^(1[0-2]|0?\d)/,minute:/^[0-5]?\d/,second:/^[0-5]?\d/,singleDigit:/^\d/,twoDigits:/^\d{1,2}/,threeDigits:/^\d{1,3}/,fourDigits:/^\d{1,4}/,anyDigitsSigned:/^-?\d+/,singleDigitSigned:/^-?\d/,twoDigitsSigned:/^-?\d{1,2}/,threeDigitsSigned:/^-?\d{1,3}/,fourDigitsSigned:/^-?\d{1,4}/},sr={basicOptionalMinutes:/^([+-])(\d{2})(\d{2})?|Z/,basic:/^([+-])(\d{2})(\d{2})|Z/,basicOptionalSeconds:/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,extended:/^([+-])(\d{2}):(\d{2})|Z/,extendedOptionalSeconds:/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/};function Mt(e,t){return e&&{value:t(e.value),rest:e.rest}}function At(e,t){const n=t.match(e);return n?{value:parseInt(n[0],10),rest:t.slice(n[0].length)}:null}function ar(e,t){const n=t.match(e);if(!n)return null;if(n[0]==="Z")return{value:0,rest:t.slice(1)};const r=n[1]==="+"?1:-1,o=n[2]?parseInt(n[2],10):0,i=n[3]?parseInt(n[3],10):0,s=n[5]?parseInt(n[5],10):0;return{value:r*(o*pj+i*fj+s*hj),rest:t.slice(n[0].length)}}function iT(e){return At(Nt.anyDigitsSigned,e)}function Ot(e,t){switch(e){case 1:return At(Nt.singleDigit,t);case 2:return At(Nt.twoDigits,t);case 3:return At(Nt.threeDigits,t);case 4:return At(Nt.fourDigits,t);default:return At(new RegExp("^\\d{1,"+e+"}"),t)}}function hc(e,t){switch(e){case 1:return At(Nt.singleDigitSigned,t);case 2:return At(Nt.twoDigitsSigned,t);case 3:return At(Nt.threeDigitsSigned,t);case 4:return At(Nt.fourDigitsSigned,t);default:return At(new RegExp("^-?\\d{1,"+e+"}"),t)}}function gh(e){switch(e){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;default:return 0}}function sT(e,t){const n=t>0,r=n?t:1-t;let o;if(r<=50)o=e||100;else{const i=r+50,s=Math.trunc(i/100)*100,a=e>=i%100;o=e+s-(a?100:0)}return n?o:1-o}function aT(e){return e%400===0||e%4===0&&e%100!==0}class E4 extends rt{priority=130;incompatibleTokens=["Y","R","u","w","I","i","e","c","t","T"];parse(t,n,r){const o=i=>({year:i,isTwoDigitYear:n==="yy"});switch(n){case"y":return Mt(Ot(4,t),o);case"yo":return Mt(r.ordinalNumber(t,{unit:"year"}),o);default:return Mt(Ot(n.length,t),o)}}validate(t,n){return n.isTwoDigitYear||n.year>0}set(t,n,r){const o=t.getFullYear();if(r.isTwoDigitYear){const s=sT(r.year,o);return t.setFullYear(s,0,1),t.setHours(0,0,0,0),t}const i=!("era"in n)||n.era===1?r.year:1-r.year;return t.setFullYear(i,0,1),t.setHours(0,0,0,0),t}}class C4 extends rt{priority=130;parse(t,n,r){const o=i=>({year:i,isTwoDigitYear:n==="YY"});switch(n){case"Y":return Mt(Ot(4,t),o);case"Yo":return Mt(r.ordinalNumber(t,{unit:"year"}),o);default:return Mt(Ot(n.length,t),o)}}validate(t,n){return n.isTwoDigitYear||n.year>0}set(t,n,r,o){const i=fh(t,o);if(r.isTwoDigitYear){const a=sT(r.year,i);return t.setFullYear(a,0,o.firstWeekContainsDate),t.setHours(0,0,0,0),In(t,o)}const s=!("era"in n)||n.era===1?r.year:1-r.year;return t.setFullYear(s,0,o.firstWeekContainsDate),t.setHours(0,0,0,0),In(t,o)}incompatibleTokens=["y","R","u","Q","q","M","L","I","d","D","i","t","T"]}class k4 extends rt{priority=130;parse(t,n){return hc(n==="R"?4:n.length,t)}set(t,n,r){const o=dt(t,0);return o.setFullYear(r,0,4),o.setHours(0,0,0,0),Oi(o)}incompatibleTokens=["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"]}class I4 extends rt{priority=130;parse(t,n){return hc(n==="u"?4:n.length,t)}set(t,n,r){return t.setFullYear(r,0,1),t.setHours(0,0,0,0),t}incompatibleTokens=["G","y","Y","R","w","I","i","e","c","t","T"]}class A4 extends rt{priority=120;parse(t,n,r){switch(n){case"Q":case"QQ":return Ot(n.length,t);case"Qo":return r.ordinalNumber(t,{unit:"quarter"});case"QQQ":return r.quarter(t,{width:"abbreviated",context:"formatting"})||r.quarter(t,{width:"narrow",context:"formatting"});case"QQQQQ":return r.quarter(t,{width:"narrow",context:"formatting"});default:return r.quarter(t,{width:"wide",context:"formatting"})||r.quarter(t,{width:"abbreviated",context:"formatting"})||r.quarter(t,{width:"narrow",context:"formatting"})}}validate(t,n){return n>=1&&n<=4}set(t,n,r){return t.setMonth((r-1)*3,1),t.setHours(0,0,0,0),t}incompatibleTokens=["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"]}class P4 extends rt{priority=120;parse(t,n,r){switch(n){case"q":case"qq":return Ot(n.length,t);case"qo":return r.ordinalNumber(t,{unit:"quarter"});case"qqq":return r.quarter(t,{width:"abbreviated",context:"standalone"})||r.quarter(t,{width:"narrow",context:"standalone"});case"qqqqq":return r.quarter(t,{width:"narrow",context:"standalone"});default:return r.quarter(t,{width:"wide",context:"standalone"})||r.quarter(t,{width:"abbreviated",context:"standalone"})||r.quarter(t,{width:"narrow",context:"standalone"})}}validate(t,n){return n>=1&&n<=4}set(t,n,r){return t.setMonth((r-1)*3,1),t.setHours(0,0,0,0),t}incompatibleTokens=["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"]}class O4 extends rt{incompatibleTokens=["Y","R","q","Q","L","w","I","D","i","e","c","t","T"];priority=110;parse(t,n,r){const o=i=>i-1;switch(n){case"M":return Mt(At(Nt.month,t),o);case"MM":return Mt(Ot(2,t),o);case"Mo":return Mt(r.ordinalNumber(t,{unit:"month"}),o);case"MMM":return r.month(t,{width:"abbreviated",context:"formatting"})||r.month(t,{width:"narrow",context:"formatting"});case"MMMMM":return r.month(t,{width:"narrow",context:"formatting"});default:return r.month(t,{width:"wide",context:"formatting"})||r.month(t,{width:"abbreviated",context:"formatting"})||r.month(t,{width:"narrow",context:"formatting"})}}validate(t,n){return n>=0&&n<=11}set(t,n,r){return t.setMonth(r,1),t.setHours(0,0,0,0),t}}class D4 extends rt{priority=110;parse(t,n,r){const o=i=>i-1;switch(n){case"L":return Mt(At(Nt.month,t),o);case"LL":return Mt(Ot(2,t),o);case"Lo":return Mt(r.ordinalNumber(t,{unit:"month"}),o);case"LLL":return r.month(t,{width:"abbreviated",context:"standalone"})||r.month(t,{width:"narrow",context:"standalone"});case"LLLLL":return r.month(t,{width:"narrow",context:"standalone"});default:return r.month(t,{width:"wide",context:"standalone"})||r.month(t,{width:"abbreviated",context:"standalone"})||r.month(t,{width:"narrow",context:"standalone"})}}validate(t,n){return n>=0&&n<=11}set(t,n,r){return t.setMonth(r,1),t.setHours(0,0,0,0),t}incompatibleTokens=["Y","R","q","Q","M","w","I","D","i","e","c","t","T"]}function N4(e,t,n){const r=Je(e,n?.in),o=ZS(r,n)-t;return r.setDate(r.getDate()-o*7),Je(r,n?.in)}class M4 extends rt{priority=100;parse(t,n,r){switch(n){case"w":return At(Nt.week,t);case"wo":return r.ordinalNumber(t,{unit:"week"});default:return Ot(n.length,t)}}validate(t,n){return n>=1&&n<=53}set(t,n,r,o){return In(N4(t,r,o),o)}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","i","t","T"]}function _4(e,t,n){const r=Je(e,n?.in),o=dh(r,n)-t;return r.setDate(r.getDate()-o*7),r}class F4 extends rt{priority=100;parse(t,n,r){switch(n){case"I":return At(Nt.week,t);case"Io":return r.ordinalNumber(t,{unit:"week"});default:return Ot(n.length,t)}}validate(t,n){return n>=1&&n<=53}set(t,n,r){return Oi(_4(t,r))}incompatibleTokens=["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"]}const L4=[31,28,31,30,31,30,31,31,30,31,30,31],V4=[31,29,31,30,31,30,31,31,30,31,30,31];class $4 extends rt{priority=90;subPriority=1;parse(t,n,r){switch(n){case"d":return At(Nt.date,t);case"do":return r.ordinalNumber(t,{unit:"date"});default:return Ot(n.length,t)}}validate(t,n){const r=t.getFullYear(),o=aT(r),i=t.getMonth();return o?n>=1&&n<=V4[i]:n>=1&&n<=L4[i]}set(t,n,r){return t.setDate(r),t.setHours(0,0,0,0),t}incompatibleTokens=["Y","R","q","Q","w","I","D","i","e","c","t","T"]}class z4 extends rt{priority=90;subpriority=1;parse(t,n,r){switch(n){case"D":case"DD":return At(Nt.dayOfYear,t);case"Do":return r.ordinalNumber(t,{unit:"date"});default:return Ot(n.length,t)}}validate(t,n){const r=t.getFullYear();return aT(r)?n>=1&&n<=366:n>=1&&n<=365}set(t,n,r){return t.setMonth(0,r),t.setHours(0,0,0,0),t}incompatibleTokens=["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"]}function yh(e,t,n){const r=Co(),o=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,i=Je(e,n?.in),s=i.getDay(),l=(t%7+7)%7,c=7-o,u=t<0||t>6?t-(s+c)%7:(l+c)%7-(s+c)%7;return qr(i,u,n)}class j4 extends rt{priority=90;parse(t,n,r){switch(n){case"E":case"EE":case"EEE":return r.day(t,{width:"abbreviated",context:"formatting"})||r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"});case"EEEEE":return r.day(t,{width:"narrow",context:"formatting"});case"EEEEEE":return r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"});default:return r.day(t,{width:"wide",context:"formatting"})||r.day(t,{width:"abbreviated",context:"formatting"})||r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"})}}validate(t,n){return n>=0&&n<=6}set(t,n,r,o){return t=yh(t,r,o),t.setHours(0,0,0,0),t}incompatibleTokens=["D","i","e","c","t","T"]}class B4 extends rt{priority=90;parse(t,n,r,o){const i=s=>{const a=Math.floor((s-1)/7)*7;return(s+o.weekStartsOn+6)%7+a};switch(n){case"e":case"ee":return Mt(Ot(n.length,t),i);case"eo":return Mt(r.ordinalNumber(t,{unit:"day"}),i);case"eee":return r.day(t,{width:"abbreviated",context:"formatting"})||r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"});case"eeeee":return r.day(t,{width:"narrow",context:"formatting"});case"eeeeee":return r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"});default:return r.day(t,{width:"wide",context:"formatting"})||r.day(t,{width:"abbreviated",context:"formatting"})||r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"})}}validate(t,n){return n>=0&&n<=6}set(t,n,r,o){return t=yh(t,r,o),t.setHours(0,0,0,0),t}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"]}class R4 extends rt{priority=90;parse(t,n,r,o){const i=s=>{const a=Math.floor((s-1)/7)*7;return(s+o.weekStartsOn+6)%7+a};switch(n){case"c":case"cc":return Mt(Ot(n.length,t),i);case"co":return Mt(r.ordinalNumber(t,{unit:"day"}),i);case"ccc":return r.day(t,{width:"abbreviated",context:"standalone"})||r.day(t,{width:"short",context:"standalone"})||r.day(t,{width:"narrow",context:"standalone"});case"ccccc":return r.day(t,{width:"narrow",context:"standalone"});case"cccccc":return r.day(t,{width:"short",context:"standalone"})||r.day(t,{width:"narrow",context:"standalone"});default:return r.day(t,{width:"wide",context:"standalone"})||r.day(t,{width:"abbreviated",context:"standalone"})||r.day(t,{width:"short",context:"standalone"})||r.day(t,{width:"narrow",context:"standalone"})}}validate(t,n){return n>=0&&n<=6}set(t,n,r,o){return t=yh(t,r,o),t.setHours(0,0,0,0),t}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"]}function H4(e,t,n){const r=Je(e,n?.in),o=m4(r,n),i=t-o;return qr(r,i,n)}class W4 extends rt{priority=90;parse(t,n,r){const o=i=>i===0?7:i;switch(n){case"i":case"ii":return Ot(n.length,t);case"io":return r.ordinalNumber(t,{unit:"day"});case"iii":return Mt(r.day(t,{width:"abbreviated",context:"formatting"})||r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"}),o);case"iiiii":return Mt(r.day(t,{width:"narrow",context:"formatting"}),o);case"iiiiii":return Mt(r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"}),o);default:return Mt(r.day(t,{width:"wide",context:"formatting"})||r.day(t,{width:"abbreviated",context:"formatting"})||r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"}),o)}}validate(t,n){return n>=1&&n<=7}set(t,n,r){return t=H4(t,r),t.setHours(0,0,0,0),t}incompatibleTokens=["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"]}class q4 extends rt{priority=80;parse(t,n,r){switch(n){case"a":case"aa":case"aaa":return r.dayPeriod(t,{width:"abbreviated",context:"formatting"})||r.dayPeriod(t,{width:"narrow",context:"formatting"});case"aaaaa":return r.dayPeriod(t,{width:"narrow",context:"formatting"});default:return r.dayPeriod(t,{width:"wide",context:"formatting"})||r.dayPeriod(t,{width:"abbreviated",context:"formatting"})||r.dayPeriod(t,{width:"narrow",context:"formatting"})}}set(t,n,r){return t.setHours(gh(r),0,0,0),t}incompatibleTokens=["b","B","H","k","t","T"]}class U4 extends rt{priority=80;parse(t,n,r){switch(n){case"b":case"bb":case"bbb":return r.dayPeriod(t,{width:"abbreviated",context:"formatting"})||r.dayPeriod(t,{width:"narrow",context:"formatting"});case"bbbbb":return r.dayPeriod(t,{width:"narrow",context:"formatting"});default:return r.dayPeriod(t,{width:"wide",context:"formatting"})||r.dayPeriod(t,{width:"abbreviated",context:"formatting"})||r.dayPeriod(t,{width:"narrow",context:"formatting"})}}set(t,n,r){return t.setHours(gh(r),0,0,0),t}incompatibleTokens=["a","B","H","k","t","T"]}class G4 extends rt{priority=80;parse(t,n,r){switch(n){case"B":case"BB":case"BBB":return r.dayPeriod(t,{width:"abbreviated",context:"formatting"})||r.dayPeriod(t,{width:"narrow",context:"formatting"});case"BBBBB":return r.dayPeriod(t,{width:"narrow",context:"formatting"});default:return r.dayPeriod(t,{width:"wide",context:"formatting"})||r.dayPeriod(t,{width:"abbreviated",context:"formatting"})||r.dayPeriod(t,{width:"narrow",context:"formatting"})}}set(t,n,r){return t.setHours(gh(r),0,0,0),t}incompatibleTokens=["a","b","t","T"]}class Y4 extends rt{priority=70;parse(t,n,r){switch(n){case"h":return At(Nt.hour12h,t);case"ho":return r.ordinalNumber(t,{unit:"hour"});default:return Ot(n.length,t)}}validate(t,n){return n>=1&&n<=12}set(t,n,r){const o=t.getHours()>=12;return o&&r<12?t.setHours(r+12,0,0,0):!o&&r===12?t.setHours(0,0,0,0):t.setHours(r,0,0,0),t}incompatibleTokens=["H","K","k","t","T"]}class K4 extends rt{priority=70;parse(t,n,r){switch(n){case"H":return At(Nt.hour23h,t);case"Ho":return r.ordinalNumber(t,{unit:"hour"});default:return Ot(n.length,t)}}validate(t,n){return n>=0&&n<=23}set(t,n,r){return t.setHours(r,0,0,0),t}incompatibleTokens=["a","b","h","K","k","t","T"]}class Z4 extends rt{priority=70;parse(t,n,r){switch(n){case"K":return At(Nt.hour11h,t);case"Ko":return r.ordinalNumber(t,{unit:"hour"});default:return Ot(n.length,t)}}validate(t,n){return n>=0&&n<=11}set(t,n,r){return t.getHours()>=12&&r<12?t.setHours(r+12,0,0,0):t.setHours(r,0,0,0),t}incompatibleTokens=["h","H","k","t","T"]}class X4 extends rt{priority=70;parse(t,n,r){switch(n){case"k":return At(Nt.hour24h,t);case"ko":return r.ordinalNumber(t,{unit:"hour"});default:return Ot(n.length,t)}}validate(t,n){return n>=1&&n<=24}set(t,n,r){const o=r<=24?r%24:r;return t.setHours(o,0,0,0),t}incompatibleTokens=["a","b","h","H","K","t","T"]}class Q4 extends rt{priority=60;parse(t,n,r){switch(n){case"m":return At(Nt.minute,t);case"mo":return r.ordinalNumber(t,{unit:"minute"});default:return Ot(n.length,t)}}validate(t,n){return n>=0&&n<=59}set(t,n,r){return t.setMinutes(r,0,0),t}incompatibleTokens=["t","T"]}class J4 extends rt{priority=50;parse(t,n,r){switch(n){case"s":return At(Nt.second,t);case"so":return r.ordinalNumber(t,{unit:"second"});default:return Ot(n.length,t)}}validate(t,n){return n>=0&&n<=59}set(t,n,r){return t.setSeconds(r,0),t}incompatibleTokens=["t","T"]}class eB extends rt{priority=30;parse(t,n){const r=o=>Math.trunc(o*Math.pow(10,-n.length+3));return Mt(Ot(n.length,t),r)}set(t,n,r){return t.setMilliseconds(r),t}incompatibleTokens=["t","T"]}class tB extends rt{priority=10;parse(t,n){switch(n){case"X":return ar(sr.basicOptionalMinutes,t);case"XX":return ar(sr.basic,t);case"XXXX":return ar(sr.basicOptionalSeconds,t);case"XXXXX":return ar(sr.extendedOptionalSeconds,t);default:return ar(sr.extended,t)}}set(t,n,r){return n.timestampIsSet?t:dt(t,t.getTime()-dc(t)-r)}incompatibleTokens=["t","T","x"]}class nB extends rt{priority=10;parse(t,n){switch(n){case"x":return ar(sr.basicOptionalMinutes,t);case"xx":return ar(sr.basic,t);case"xxxx":return ar(sr.basicOptionalSeconds,t);case"xxxxx":return ar(sr.extendedOptionalSeconds,t);default:return ar(sr.extended,t)}}set(t,n,r){return n.timestampIsSet?t:dt(t,t.getTime()-dc(t)-r)}incompatibleTokens=["t","T","X"]}class rB extends rt{priority=40;parse(t){return iT(t)}set(t,n,r){return[dt(t,r*1e3),{timestampIsSet:!0}]}incompatibleTokens="*"}class oB extends rt{priority=20;parse(t){return iT(t)}set(t,n,r){return[dt(t,r),{timestampIsSet:!0}]}incompatibleTokens="*"}const iB={G:new T4,y:new E4,Y:new C4,R:new k4,u:new I4,Q:new A4,q:new P4,M:new O4,L:new D4,w:new M4,I:new F4,d:new $4,D:new z4,E:new j4,e:new B4,c:new R4,i:new W4,a:new q4,b:new U4,B:new G4,h:new Y4,H:new K4,K:new Z4,k:new X4,m:new Q4,s:new J4,S:new eB,X:new tB,x:new nB,t:new rB,T:new oB},sB=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,aB=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,lB=/^'([^]*?)'?$/,cB=/''/g,uB=/\S/,dB=/[a-zA-Z]/;function fB(e,t,n,r){const o=()=>dt(n,NaN),i=h4(),s=i.locale??KS,a=i.firstWeekContainsDate??i.locale?.options?.firstWeekContainsDate??1,l=i.weekStartsOn??i.locale?.options?.weekStartsOn??0;if(!t)return e?o():Je(n,r?.in);const c={firstWeekContainsDate:a,weekStartsOn:l,locale:s},u=[new S4(r?.in,n)],d=t.match(aB).map(m=>{const v=m[0];if(v in ph){const b=ph[v];return b(m,s.formatLong)}return m}).join("").match(sB),f=[];for(let m of d){rT(m)&&hh(m,t,e),nT(m)&&hh(m,t,e);const v=m[0],b=iB[v];if(b){const{incompatibleTokens:x}=b;if(Array.isArray(x)){const E=f.find(I=>x.includes(I.token)||I.token===v);if(E)throw new RangeError(`The format string mustn't contain \`${E.fullToken}\` and \`${m}\` at the same time`)}else if(b.incompatibleTokens==="*"&&f.length>0)throw new RangeError(`The format string mustn't contain \`${m}\` and any other token at the same time`);f.push({token:v,fullToken:m});const T=b.run(e,m,s.match,c);if(!T)return o();u.push(T.setter),e=T.rest}else{if(v.match(dB))throw new RangeError("Format string contains an unescaped latin alphabet character `"+v+"`");if(m==="''"?m="'":v==="'"&&(m=pB(m)),e.indexOf(m)===0)e=e.slice(m.length);else return o()}}if(e.length>0&&uB.test(e))return o();const h=u.map(m=>m.priority).sort((m,v)=>v-m).filter((m,v,b)=>b.indexOf(m)===v).map(m=>u.filter(v=>v.priority===m).sort((v,b)=>b.subPriority-v.subPriority)).map(m=>m[0]);let g=Je(n,r?.in);if(isNaN(+g))return o();const y={};for(const m of h){if(!m.validate(g,c))return o();const v=m.set(g,y,c);Array.isArray(v)?(g=v[0],Object.assign(y,v[1])):g=v}return g}function pB(e){return e.match(lB)[1].replace(cB,"'")}function lT(e,t,n){const[r,o]=fc(n?.in,e,t);return r.getFullYear()===o.getFullYear()&&r.getMonth()===o.getMonth()}function Xs(e,t){return bj(dt(e,e),vj(e))}function cT(e,t,n){return qr(e,-t,n)}function hB(e,t,n){const r=Je(e,n?.in),o=r.getFullYear(),i=r.getDate(),s=dt(e,0);s.setFullYear(o,t,15),s.setHours(0,0,0,0);const a=p4(s);return r.setMonth(t,Math.min(i,a)),r}function mB(e,t,n){let r=Je(e,n?.in);return isNaN(+r)?dt(e,NaN):(t.year!=null&&r.setFullYear(t.year),t.month!=null&&(r=hB(r,t.month)),t.date!=null&&r.setDate(t.date),t.hours!=null&&r.setHours(t.hours),t.minutes!=null&&r.setMinutes(t.minutes),t.seconds!=null&&r.setSeconds(t.seconds),t.milliseconds!=null&&r.setMilliseconds(t.milliseconds),r)}function gB(e,t,n){const r=Je(e,n?.in);return isNaN(+r)?dt(e,NaN):(r.setFullYear(t),r)}function uT(e,t,n){return lh(e,-t,n)}function Qs(e,t,n){const{years:r=0,months:o=0,weeks:i=0,days:s=0,hours:a=0,minutes:l=0,seconds:c=0}=t,u=uT(e,o+r*12,n),d=cT(u,s+i*7,n),f=l+a*60,g=(c+f*60)*1e3;return dt(e,+d-g)}function yB(e,t,n){return GS(e,-1,n)}const vB=(e,t=0)=>{let n;return function(...o){clearTimeout(n),n=setTimeout(()=>e(...o),t)}};function bB(e,t){return S.useRef(vB(e,t)).current}function dT(e,t){const n=S.useRef(null);return{onTouchStart:i=>n.current=i.touches[0].clientX,onTouchEnd:i=>{if(n.current===null)return;const a=i.changedTouches[0].clientX-n.current;Math.abs(a)>t&&e(i,a>0?"right":"left"),n.current=null}}}const xB=/^(?<hour>\d\d):(?<min>\d\d)$/,wB={type:"spring",bounce:.3,duration:.6},fT=e=>(t=1)=>({x:`${100*e*t}%`,opacity:.25}),pT={enter:fT(1),exit:fT(-1),middle:{x:"0%",opacity:1}},hT={exit:{visibility:"hidden"}},SB=e=>{const t=In(ch(e));return YS({start:t,end:Pi(t,{days:41})})},mT=(e,t)=>e.toLocaleDateString(t,{month:"long"}),TB=(e,t,n)=>Array.from({length:12}).map((r,o)=>{const i=ch(new Date(1970,o,1).setMonth(o)),s=mT(i,n);return p.jsx("option",{value:s,"data-index":o,children:s},`${e}-${s}`)}),vh={ArrowLeft:(e,t)=>t==="days"?Qs(e,{days:1}):Qs(e,{months:1}),ArrowRight:(e,t)=>t==="days"?Pi(e,{days:1}):Pi(e,{months:1}),ArrowUp:(e,t)=>t==="days"?Qs(e,{weeks:1}):Qs(e,{years:1}),ArrowDown:(e,t)=>t==="days"?Pi(e,{weeks:1}):Pi(e,{years:1})},gT=(e,t,n,r=0)=>{const o=n.toISOString(),i=()=>{if(e?.dataset.focustrap){const s=t.current?.querySelector(`button[data-focustrap="${e?.dataset.focustrap}"]`);return setTimeout(()=>s?.focus({preventScroll:!0}),r)}if(t.current){const s=t.current.querySelector(`button[data-date="${o}"]`);if(s)return s.focus({preventScroll:!0})}};r===0&&i(),setTimeout(i,r)},Ao=e=>e.getFullYear().toString().padStart(4,"0"),EB=(e,t,n)=>e===void 0||n===void 0?!1:g4(t,e)&&y4(t,n),CB=e=>{const t=vt();return p.jsx(ze.tbody,{layout:!0,variants:pT,custom:e.direction,onKeyDown:e.onKeyDown,className:Pe(e.styles?.week),children:e.zip.map((n,r)=>{const o=He.function(e.styles?.week)?e.styles?.week(n):e.styles?.week;return p.jsx("tr",{className:o,children:n.map(i=>{const s=i.toISOString(),a=e.rangeMode?s===e.range?.to?.toISOString()||s===e.range?.from?.toISOString():s===(e.date?ko(e.date).toISOString():void 0),l=Xs(i)&&e.markToday,c=e.disabledDate?.(i)||!1,u=lT(i,e.stateDate),d=!u||c,f=e.rangeMode?EB(e.range?.from,i,e.range?.to):!1;return p.jsxs("td",{align:"center",className:Pe("relative p-1",He.function(e.styles?.dayFrame)?e.styles?.dayFrame(i):e.styles?.dayFrame),children:[p.jsxs("button",{type:"button","data-date":s,disabled:c,"data-samemonth":u,"data-range":e.rangeMode,onClick:e.dispatch.onSelectDate,"data-view":e.stateDate.getMonth().toString(),className:Pe(`relative flex size-9 items-center justify-center rounded-full proportional-nums disabled:cursor-not-allowed ${l?"text-emphasis":""} ${d?"text-disabled":""} ${a?"bg-primary text-primary-foreground":""}`,f&&e.markRange?"size-9 border border-dashed border-card-border":"",He.function(e.styles?.day)?e.styles?.day(i):e.styles?.day),children:[p.jsx("div",{}),i.getDate(),a&&e.stateRange.from?.toISOString()===s?p.jsx("span",{className:"absolute -top-2 left-0 h-full w-full",children:p.jsx("span",{className:"text-xs text-foreground",children:e.labelRange?.from??t.calendarFromDate})}):null,a&&e.stateRange.to?.toISOString()===s?p.jsx("span",{className:"absolute -top-2 left-0 h-full w-full",children:p.jsx("span",{className:"text-xs text-foreground",children:e.labelRange?.to??t.calendarToDate})}):null]}),e.RenderOnDay?p.jsx(e.RenderOnDay,{date:i}):null]},s)})},`week-${n.length}-${r}`)})})},kB=()=>ko(new Date),bh=({RenderOnDay:e,changeOnlyOnClick:t=!1,labelRange:n,disabledDate:r,locale:o,markToday:i=!0,onChangeMonth:s,onChangeYear:a,rangeMode:l=!1,onChange:c,styles:u,markRange:d=!0,type:f="date",datetimeTitle:h,...g})=>{const y=S.useRef(Xo()),m=vt(),v=Fr(o),b=S.useRef(null),{date:x,range:T}=g,E=x||new Date,I=S.useRef(null),[w,C]=gp({date:E,isAnimating:!1,year:Ao(E),direction:void 0,range:{from:T?.from,to:T?.to},months:TB(y.current,E,v),selectMode:l?"from":void 0,week:YS({start:In(E),end:Tj(E)})},M=>({onChangeYear:k=>({year:k}),onExitComplete:()=>(gT(I.current||null,b,M.state().date,200),I.current=null,{isAnimating:!1}),date:k=>{const V=k(M.state().date);return{date:V,year:Ao(V)}},nextMonth:k=>{k&&(I.current=k.currentTarget);const V=M.state();if(V.isAnimating)return V;const L=Pi(V.date,{months:1});return{date:L,isAnimating:!0,direction:1,year:Ao(L)}},previousMonth:k=>{k&&(I.current=k.currentTarget);const V=M.state();if(V.isAnimating)return V;const L=Qs(V.date,{months:1});return{date:L,isAnimating:!0,direction:-1,year:Ao(L)}},onSelectDate:k=>{const V=M.state(),L=k.currentTarget.dataset.range==="true",R=k.currentTarget.dataset.date||"",U=new Date(R);return{date:U,year:Ao(U),selectMode:V.selectMode===void 0?void 0:V.selectMode==="from"?"to":"from",range:L?{from:V.selectMode==="from"?U:V.range.from,to:V.selectMode==="to"?U:V.range.to}:V.range}},onChangeMonth:k=>{const V=k.target.value,R=Array.from(k.target.options).find(G=>G.value===V),U=M.state();if(R){const G=R.dataset.index||"",H=new Date(M.state().date);return H.setMonth(+G),{...U,date:H,year:Ao(H)}}return U},onKeyDown:k=>{const V=k.key,L=M.state();if(V in vh){(V==="ArrowUp"||V==="ArrowDown")&&k.preventDefault();const R=M.state().date,U=He.keyof(vh,V)?vh[V](R,k.shiftKey?"month":"days"):null;if(U!==null)return gT(k.target,b,U),{...L,date:U,year:Ao(U)}}return M.state()}}),{props:{onChangeMonth:s,onChangeYear:a},postMiddleware:[(M,k,V)=>((V.method==="onChangeMonth"||V.method==="previousMonth"||V.method==="nextMonth")&&V.props.onChangeMonth?.(M.date),M),(M,k,V)=>(V.method==="onChangeYear"&&V.props.onChangeYear?.(M.date),M),(M,k,V)=>{const L=V.method==="onSelectDate"||V.method==="setToday"||V.method==="onKeyDown";return l&&L&&t?(c?.(M.range),M):(L&&t&&c?.(M.date),M)}]}),A=SB(w.date),O=Fv(A,7),_=w.date.toISOString(),N=mT(w.date,v);S.useEffect(()=>{t||c?.(w.date)},[_,t]);const $=bB(M=>C.date(k=>gB(new Date(k),+M)),1200),D=M=>{const k=M.currentTarget.value;C.onChangeYear(k),a?.(new Date(k)),$(k)},F=dT((M,k)=>(M.preventDefault(),k==="right"?C.previousMonth():C.nextMonth()),10),z=()=>{const M=kB();C.date(()=>M),c?.(M)};return p.jsx(Qf,{transition:wB,children:p.jsxs("div",{ref:b,"data-component":"calendar",onTouchEnd:F.onTouchEnd,onTouchStart:F.onTouchStart,className:Pe("relative overflow-hidden",He.function(u?.calendar)?u?.calendar(A):u?.calendar),children:[p.jsx("div",{className:"flex flex-col justify-center rounded text-center",children:p.jsx(gn,{initial:!1,mode:"popLayout",custom:w.direction,onExitComplete:C.onExitComplete,children:p.jsxs(ze.div,{initial:"enter",animate:"middle",exit:"exit",children:[p.jsxs("header",{className:"relative flex justify-between",children:[p.jsx(ze.button,{layout:!0,type:"button","data-focustrap":"prev",variants:hT,onClick:C.previousMonth,title:m.calendarBackMonth,className:"z-calendar rounded-full p-1.5 hover:bg-primary hover:text-primary-foreground",children:p.jsx(ry,{className:"h-4 w-4"})}),p.jsx(ze.span,{layout:!0,variants:pT,custom:w.direction,className:"absolute inset-0 isolate z-normal flex items-center justify-center font-semibold",children:p.jsxs("span",{className:"flex w-fit items-center justify-center gap-0.5 py-1",children:[p.jsx("select",{value:N,onChange:C.onChangeMonth,"aria-label":m.calendarMonthLabel,style:{width:`${N.length+1}ch`},className:"cursor-pointer appearance-none bg-transparent capitalize proportional-nums hover:text-primary",children:w.months}),p.jsx(Qg,{mask:"int",maxLength:4,placeholder:"YYYY",value:w.year,onChange:D,style:{width:`${w.year.length}ch`},className:"w-16 cursor-pointer appearance-none bg-transparent hover:text-primary"})]})}),p.jsx(ze.button,{layout:!0,type:"button","data-focustrap":"next",variants:hT,onClick:C.nextMonth,title:m.calendarNextMonth,className:"z-calendar rounded-full p-1.5 hover:bg-primary hover:text-primary-foreground",children:p.jsx(Ta,{className:"h-4 w-4"})})]}),p.jsxs(ze.table,{className:"mt-2 table min-w-full table-auto border-0",children:[p.jsx("thead",{children:p.jsx("tr",{children:w.week.map(M=>p.jsx("th",{role:"columnheader",className:Pe("py-2 text-sm font-medium capitalize",He.function(u?.weekDay)?u.weekDay(M):u?.weekDay),children:M.toLocaleDateString(v,{weekday:"short"})},M.toString()))})}),p.jsx(CB,{zip:O,range:T,styles:u,date:x||null,dispatch:C,markRange:d,markToday:i,rangeMode:l,stateDate:w.date,labelRange:n,stateRange:w.range,RenderOnDay:e,direction:w.direction,disabledDate:r,onKeyDown:C.onKeyDown})]})]},N)})}),f==="datetime"?p.jsx("section",{className:"my-4 grid items-center",children:p.jsx(Jo,{info:null,mask:"time",optionalText:" ",container:"w-full",reportStatus:!1,defaultValue:x?mh(x,"HH:mm"):void 0,title:h||m.calendarDatetimeTitle,onChange:M=>{const k=M.target.value,V=xB.exec(k);if(!V)return;const L=V.groups.hour,R=V.groups.min,U=mB(w.date,{hours:Number(L),minutes:Number(R),seconds:0});C.date(()=>U),c?.(U)}})}):null,p.jsx("footer",{className:"mt-2 text-center text-primary",children:p.jsx("button",{type:"button",onClick:z,className:"transition-transform duration-300 hover:scale-105",children:m.calendarToday})})]})})},xh=P.createContext(void 0);process.env.NODE_ENV!=="production"&&(xh.displayName="ProgressRootContext");function IB(){const e=P.useContext(xh);if(e===void 0)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: ProgressRootContext is missing. Progress parts must be placed within <Progress.Root>.":Nn(51));return e}let wh=(function(e){return e.complete="data-complete",e.indeterminate="data-indeterminate",e.progressing="data-progressing",e})({});const yT={status(e){return e==="progressing"?{[wh.progressing]:""}:e==="complete"?{[wh.complete]:""}:e==="indeterminate"?{[wh.indeterminate]:""}:null}};function AB(e,t){return t==null?"indeterminate progress":e||`${t}%`}const vT=P.forwardRef(function(t,n){const{format:r,getAriaValueText:o=AB,locale:i,max:s=100,min:a=0,value:l,render:c,className:u,...d}=t,[f,h]=P.useState(),g=Cd(r);let y="indeterminate";Number.isFinite(l)&&(y=l===s?"complete":"progressing");const m=mD(l,i,g.current),v=P.useMemo(()=>({status:y}),[y]),b={"aria-labelledby":f,"aria-valuemax":s,"aria-valuemin":a,"aria-valuenow":l??void 0,"aria-valuetext":o(m,l),role:"progressbar"},x=P.useMemo(()=>({formattedValue:m,max:s,min:a,setLabelId:h,state:v,status:y,value:l}),[m,s,a,h,v,y,l]),T=ln("div",t,{state:v,ref:n,props:[b,d],stateAttributesMapping:yT});return p.jsx(xh.Provider,{value:x,children:T})});process.env.NODE_ENV!=="production"&&(vT.displayName="ProgressRoot");const bT=P.forwardRef(function(t,n){const{render:r,className:o,...i}=t,{max:s,min:a,value:l,state:c}=IB(),u=Number.isFinite(l)&&l!==null?pl(l,a,s):null,d=P.useCallback(()=>u==null?{}:{insetInlineStart:0,height:"inherit",width:`${u}%`},[u]);return ln("div",t,{state:c,ref:n,props:[{style:d()},i],stateAttributesMapping:yT})});process.env.NODE_ENV!=="production"&&(bT.displayName="ProgressIndicator");const PB=e=>p.jsxs(vT,{max:e.max,value:e.percent??null,style:{transform:"translateZ(0)"},className:Pe("relative h-6 w-full overflow-hidden rounded-full bg-background",e.container),children:[p.jsx(bT,{style:{transform:He.number(e.percent)?`translateX(-${100-e.percent}%)`:void 0},className:Pe("size-full bg-primary transition-transform duration-500 ease-in-out",e.className)}),He.number(e.percent)?p.jsx("p",{className:Pe("absolute inset-0 flex w-full items-center justify-center font-semibold tabular-nums text-primary-foreground",e.textClassName),children:e.label?e.label:`${e.percent} %`}):null]}),mc=e=>p.jsxs("li",{"data-component":"timeline-item",className:"relative pb-12",role:"listitem",children:[p.jsx("span",{"aria-hidden":"true",className:"absolute left-6 top-8 -ml-px h-full w-0.5 bg-card-border"}),p.jsx("div",{className:"relative flex items-stretch justify-start space-x-3",children:e.children})]});mc.Icon=function(t){return p.jsx("header",{...t,className:Pe("flex size-12 items-center justify-center rounded-full bg-primary p-2 text-warn-foreground",t.className),children:t.children})},mc.Body=function(t){return p.jsx(un,{...t,className:Pe("min-w-0 flex-1",t.className),children:t.children})},mc.Right=function(t){return p.jsx("footer",{className:"flex gap-6 self-stretch px-4 align-baseline",children:p.jsx(un,{...t,type:"button"})})};const OB=e=>p.jsx("ul",{"data-component":"timeline",role:"list",className:"flow-root [&>li:last-child>span[aria-hidden=true]]:hidden",children:e.children}),DB=e=>p.jsx(ze.div,{className:"sticky bottom-4 flex items-center justify-center rounded-lg border border-card-border bg-background p-4",children:e.children}),xT=new Date(1970,11,31),Sh={year:()=>[/\d/,/\d/,/\d/,/\d/],month:()=>[/\d/,/\d/],day:()=>[/\d/,/\d/],hour:()=>[/\d/,/\d/],minute:()=>[/\d/,/\d/],literal:e=>e.split("")},wT={day:()=>"dd",hour:()=>"HH",month:()=>"MM",minute:()=>"mm",year:()=>"yyyy",literal:e=>e},NB={literal:(e,t)=>t,year:e=>e.getFullYear().toString(),day:e=>e.getDate().toString().padStart(2,"0"),hour:e=>e.getHours().toString().padStart(2,"0"),minute:e=>e.getMinutes().toString().padStart(2,"0"),month:e=>(e.getMonth()+1).toString().padStart(2,"0")},Th=(e,t)=>{try{return e.formatToParts(t).map(n=>n.type==="literal"&&n.value===", "?{type:n.type,value:" "}:n)}catch{return[]}},MB={day:"numeric",month:"numeric",year:"numeric",hour:"numeric",minute:"numeric"},_B={day:"numeric",month:"numeric",year:"numeric"},FB=S.forwardRef(({date:e,locale:t,disabledDate:n,onChange:r,markToday:o,clickToClose:i,floating:s=!0,type:a,...l},c)=>{const u=Fr(t),d=S.useId(),f=vt(),h=S.useMemo(()=>new Intl.DateTimeFormat(u,a==="datetime"?MB:_B),[u,a]),[g,y]=S.useState(e||void 0),[m,v]=S.useState(!1),b=Th(h,xT).flatMap(N=>He.keyof(Sh,N.type)?Sh[N.type](N.value):[]),x=S.useMemo(()=>Th(h,xT).reduce((N,$)=>N+(He.keyof(wT,$.type)?wT[$.type]($.value):""),""),[h]),T=e?.toISOString(),[E,I]=S.useState(g?Th(h,g).reduce((N,$)=>N+(He.keyof(Sh,$.type)?NB[$.type](g,$.value):""),""):""),w=N=>{const $=N.target.value;if(I($),b.length===$.length&&b.every((F,z)=>{const M=$.charAt(z);return typeof F=="string"?M===F:F.test(M)})){const F=fB($,x,new Date),z=a==="datetime"?F:ko(F);return y(z),r?.(z)}return y(void 0),r?.(void 0)};S.useEffect(()=>{pc(e)&&(y(e),I(mh(e,x)))},[T,x]);const C=N=>(y(N),r?.(N),i&&v(!1),I(N?mh(N,x):"")),A=pc(g),O=A?g.toISOString():void 0,_=p.jsx(bh,{...l,type:a,locale:u,changeOnlyOnClick:!0,markToday:o,onChange:C,disabledDate:n,date:A?g:void 0});return p.jsx(S.Fragment,{children:p.jsx(Jo,{...l,mask:b,value:E,id:void 0,name:void 0,"data-value":O,formNoValidate:!m,"data-target":l.name,"data-component":"date-picker",onChange:w,required:l.required??!0,error:m?void 0:l.error,placeholder:l.placeholder||f.datepickerPlaceholder(x),right:s?p.jsxs(S.Fragment,{children:[p.jsx("input",{"data-origin":l.name,defaultValue:O,form:l.form,hidden:!0,id:l.name,name:l.name,ref:c,type:"date"}),p.jsx(ki,{open:m,onChange:v,buttonProps:{"aria-describedby":d},trigger:p.jsxs("span",{"aria-labelledby":d,children:[p.jsx("span",{id:d,className:"sr-only",children:f.datePickerCalendarButtonLabel}),p.jsx(ny,{})]}),children:_})]}):null})})}),LB=["B","kB","MB","GB","TB","PB","EB","ZB","YB"],VB=["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],$B=["b","kbit","Mbit","Gbit","Tbit","Pbit","Ebit","Zbit","Ybit"],zB=["b","kibit","Mibit","Gibit","Tibit","Pibit","Eibit","Zibit","Yibit"],ST=(e,t,n)=>{let r=e;return typeof t=="string"||Array.isArray(t)?r=e.toLocaleString(t,n):(t===!0||n!==void 0)&&(r=e.toLocaleString(void 0,n)),r},TT=e=>{if(typeof e=="number")return Math.log10(e);const t=e.toString(10);return t.length+Math.log10(`0.${t.slice(0,15)}`)},jB=e=>typeof e=="number"?Math.log(e):TT(e)*Math.log(10),BB=(e,t)=>{if(typeof e=="number")return e/t;const n=e/BigInt(t),r=e%BigInt(t);return Number(n)+Number(r)/t},ET=(e,t)=>{if(t===void 0)return e;if(typeof t!="number"||!Number.isSafeInteger(t)||t<0)throw new TypeError(`Expected fixedWidth to be a non-negative integer, got ${typeof t}: ${t}`);return t===0?e:e.length<t?e.padStart(t," "):e},RB=e=>{const{minimumFractionDigits:t,maximumFractionDigits:n}=e;if(!(t===void 0&&n===void 0))return{...t!==void 0&&{minimumFractionDigits:t},...n!==void 0&&{maximumFractionDigits:n},roundingMode:"trunc"}};function HB(e,t){if(typeof e!="bigint"&&!Number.isFinite(e))throw new TypeError(`Expected a finite number, got ${typeof e}: ${e}`);t={bits:!1,binary:!1,space:!0,nonBreakingSpace:!1,...t};const n=t.bits?t.binary?zB:$B:t.binary?VB:LB,r=t.space?t.nonBreakingSpace?" ":" ":"",o=typeof e=="number"?e===0:e===0n;if(t.signed&&o){const c=` 0${r}${n[0]}`;return ET(c,t.fixedWidth)}const i=e<0,s=i?"-":t.signed?"+":"";i&&(e=-e);const a=RB(t);let l;if(e<1){const c=ST(e,t.locale,a);l=s+c+r+n[0]}else{const c=Math.min(Math.floor(t.binary?jB(e)/Math.log(1024):TT(e)/3),n.length-1);if(e=BB(e,(t.binary?1024:1e3)**c),!a){const f=Math.max(3,Math.floor(e).toString().length);e=e.toPrecision(f)}const u=ST(Number(e),t.locale,a),d=n[c];l=s+u+r+d}return ET(l,t.fixedWidth)}var gc={exports:{}},yc={exports:{}},at={};var CT;function WB(){if(CT)return at;CT=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,s=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,f=e?Symbol.for("react.suspense_list"):60120,h=e?Symbol.for("react.memo"):60115,g=e?Symbol.for("react.lazy"):60116,y=e?Symbol.for("react.block"):60121,m=e?Symbol.for("react.fundamental"):60117,v=e?Symbol.for("react.responder"):60118,b=e?Symbol.for("react.scope"):60119;function x(E){if(typeof E=="object"&&E!==null){var I=E.$$typeof;switch(I){case t:switch(E=E.type,E){case l:case c:case r:case i:case o:case d:return E;default:switch(E=E&&E.$$typeof,E){case a:case u:case g:case h:case s:return E;default:return I}}case n:return I}}}function T(E){return x(E)===c}return at.AsyncMode=l,at.ConcurrentMode=c,at.ContextConsumer=a,at.ContextProvider=s,at.Element=t,at.ForwardRef=u,at.Fragment=r,at.Lazy=g,at.Memo=h,at.Portal=n,at.Profiler=i,at.StrictMode=o,at.Suspense=d,at.isAsyncMode=function(E){return T(E)||x(E)===l},at.isConcurrentMode=T,at.isContextConsumer=function(E){return x(E)===a},at.isContextProvider=function(E){return x(E)===s},at.isElement=function(E){return typeof E=="object"&&E!==null&&E.$$typeof===t},at.isForwardRef=function(E){return x(E)===u},at.isFragment=function(E){return x(E)===r},at.isLazy=function(E){return x(E)===g},at.isMemo=function(E){return x(E)===h},at.isPortal=function(E){return x(E)===n},at.isProfiler=function(E){return x(E)===i},at.isStrictMode=function(E){return x(E)===o},at.isSuspense=function(E){return x(E)===d},at.isValidElementType=function(E){return typeof E=="string"||typeof E=="function"||E===r||E===c||E===i||E===o||E===d||E===f||typeof E=="object"&&E!==null&&(E.$$typeof===g||E.$$typeof===h||E.$$typeof===s||E.$$typeof===a||E.$$typeof===u||E.$$typeof===m||E.$$typeof===v||E.$$typeof===b||E.$$typeof===y)},at.typeOf=x,at}var lt={};var kT;function qB(){return kT||(kT=1,process.env.NODE_ENV!=="production"&&(function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,s=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,f=e?Symbol.for("react.suspense_list"):60120,h=e?Symbol.for("react.memo"):60115,g=e?Symbol.for("react.lazy"):60116,y=e?Symbol.for("react.block"):60121,m=e?Symbol.for("react.fundamental"):60117,v=e?Symbol.for("react.responder"):60118,b=e?Symbol.for("react.scope"):60119;function x(B){return typeof B=="string"||typeof B=="function"||B===r||B===c||B===i||B===o||B===d||B===f||typeof B=="object"&&B!==null&&(B.$$typeof===g||B.$$typeof===h||B.$$typeof===s||B.$$typeof===a||B.$$typeof===u||B.$$typeof===m||B.$$typeof===v||B.$$typeof===b||B.$$typeof===y)}function T(B){if(typeof B=="object"&&B!==null){var ae=B.$$typeof;switch(ae){case t:var ce=B.type;switch(ce){case l:case c:case r:case i:case o:case d:return ce;default:var Q=ce&&ce.$$typeof;switch(Q){case a:case u:case g:case h:case s:return Q;default:return ae}}case n:return ae}}}var E=l,I=c,w=a,C=s,A=t,O=u,_=r,N=g,$=h,D=n,F=i,z=o,M=d,k=!1;function V(B){return k||(k=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),L(B)||T(B)===l}function L(B){return T(B)===c}function R(B){return T(B)===a}function U(B){return T(B)===s}function G(B){return typeof B=="object"&&B!==null&&B.$$typeof===t}function H(B){return T(B)===u}function ee(B){return T(B)===r}function se(B){return T(B)===g}function te(B){return T(B)===h}function q(B){return T(B)===n}function Y(B){return T(B)===i}function Z(B){return T(B)===o}function pe(B){return T(B)===d}lt.AsyncMode=E,lt.ConcurrentMode=I,lt.ContextConsumer=w,lt.ContextProvider=C,lt.Element=A,lt.ForwardRef=O,lt.Fragment=_,lt.Lazy=N,lt.Memo=$,lt.Portal=D,lt.Profiler=F,lt.StrictMode=z,lt.Suspense=M,lt.isAsyncMode=V,lt.isConcurrentMode=L,lt.isContextConsumer=R,lt.isContextProvider=U,lt.isElement=G,lt.isForwardRef=H,lt.isFragment=ee,lt.isLazy=se,lt.isMemo=te,lt.isPortal=q,lt.isProfiler=Y,lt.isStrictMode=Z,lt.isSuspense=pe,lt.isValidElementType=x,lt.typeOf=T})()),lt}var IT;function AT(){return IT||(IT=1,process.env.NODE_ENV==="production"?yc.exports=WB():yc.exports=qB()),yc.exports}var Eh,PT;function UB(){if(PT)return Eh;PT=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function r(i){if(i==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(i)}function o(){try{if(!Object.assign)return!1;var i=new String("abc");if(i[5]="de",Object.getOwnPropertyNames(i)[0]==="5")return!1;for(var s={},a=0;a<10;a++)s["_"+String.fromCharCode(a)]=a;var l=Object.getOwnPropertyNames(s).map(function(u){return s[u]});if(l.join("")!=="0123456789")return!1;var c={};return"abcdefghijklmnopqrst".split("").forEach(function(u){c[u]=u}),Object.keys(Object.assign({},c)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return Eh=o()?Object.assign:function(i,s){for(var a,l=r(i),c,u=1;u<arguments.length;u++){a=Object(arguments[u]);for(var d in a)t.call(a,d)&&(l[d]=a[d]);if(e){c=e(a);for(var f=0;f<c.length;f++)n.call(a,c[f])&&(l[c[f]]=a[c[f]])}}return l},Eh}var Ch,OT;function kh(){if(OT)return Ch;OT=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Ch=e,Ch}var Ih,DT;function NT(){return DT||(DT=1,Ih=Function.call.bind(Object.prototype.hasOwnProperty)),Ih}var Ah,MT;function GB(){if(MT)return Ah;MT=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=kh(),n={},r=NT();e=function(i){var s="Warning: "+i;typeof console<"u"&&console.error(s);try{throw new Error(s)}catch{}}}function o(i,s,a,l,c){if(process.env.NODE_ENV!=="production"){for(var u in i)if(r(i,u)){var d;try{if(typeof i[u]!="function"){var f=Error((l||"React class")+": "+a+" type `"+u+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof i[u]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw f.name="Invariant Violation",f}d=i[u](s,u,l,a,null,t)}catch(g){d=g}if(d&&!(d instanceof Error)&&e((l||"React class")+": type specification of "+a+" `"+u+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof d+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),d instanceof Error&&!(d.message in n)){n[d.message]=!0;var h=c?c():"";e("Failed "+a+" type: "+d.message+(h??""))}}}}return o.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(n={})},Ah=o,Ah}var Ph,_T;function YB(){if(_T)return Ph;_T=1;var e=AT(),t=UB(),n=kh(),r=NT(),o=GB(),i=function(){};process.env.NODE_ENV!=="production"&&(i=function(a){var l="Warning: "+a;typeof console<"u"&&console.error(l);try{throw new Error(l)}catch{}});function s(){return null}return Ph=function(a,l){var c=typeof Symbol=="function"&&Symbol.iterator,u="@@iterator";function d(L){var R=L&&(c&&L[c]||L[u]);if(typeof R=="function")return R}var f="<<anonymous>>",h={array:v("array"),bigint:v("bigint"),bool:v("boolean"),func:v("function"),number:v("number"),object:v("object"),string:v("string"),symbol:v("symbol"),any:b(),arrayOf:x,element:T(),elementType:E(),instanceOf:I,node:O(),objectOf:C,oneOf:w,oneOfType:A,shape:N,exact:$};function g(L,R){return L===R?L!==0||1/L===1/R:L!==L&&R!==R}function y(L,R){this.message=L,this.data=R&&typeof R=="object"?R:{},this.stack=""}y.prototype=Error.prototype;function m(L){if(process.env.NODE_ENV!=="production")var R={},U=0;function G(ee,se,te,q,Y,Z,pe){if(q=q||f,Z=Z||te,pe!==n){if(l){var B=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw B.name="Invariant Violation",B}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var ae=q+":"+te;!R[ae]&&U<3&&(i("You are manually calling a React.PropTypes validation function for the `"+Z+"` prop on `"+q+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),R[ae]=!0,U++)}}return se[te]==null?ee?se[te]===null?new y("The "+Y+" `"+Z+"` is marked as required "+("in `"+q+"`, but its value is `null`.")):new y("The "+Y+" `"+Z+"` is marked as required in "+("`"+q+"`, but its value is `undefined`.")):null:L(se,te,q,Y,Z)}var H=G.bind(null,!1);return H.isRequired=G.bind(null,!0),H}function v(L){function R(U,G,H,ee,se,te){var q=U[G],Y=z(q);if(Y!==L){var Z=M(q);return new y("Invalid "+ee+" `"+se+"` of type "+("`"+Z+"` supplied to `"+H+"`, expected ")+("`"+L+"`."),{expectedType:L})}return null}return m(R)}function b(){return m(s)}function x(L){function R(U,G,H,ee,se){if(typeof L!="function")return new y("Property `"+se+"` of component `"+H+"` has invalid PropType notation inside arrayOf.");var te=U[G];if(!Array.isArray(te)){var q=z(te);return new y("Invalid "+ee+" `"+se+"` of type "+("`"+q+"` supplied to `"+H+"`, expected an array."))}for(var Y=0;Y<te.length;Y++){var Z=L(te,Y,H,ee,se+"["+Y+"]",n);if(Z instanceof Error)return Z}return null}return m(R)}function T(){function L(R,U,G,H,ee){var se=R[U];if(!a(se)){var te=z(se);return new y("Invalid "+H+" `"+ee+"` of type "+("`"+te+"` supplied to `"+G+"`, expected a single ReactElement."))}return null}return m(L)}function E(){function L(R,U,G,H,ee){var se=R[U];if(!e.isValidElementType(se)){var te=z(se);return new y("Invalid "+H+" `"+ee+"` of type "+("`"+te+"` supplied to `"+G+"`, expected a single ReactElement type."))}return null}return m(L)}function I(L){function R(U,G,H,ee,se){if(!(U[G]instanceof L)){var te=L.name||f,q=V(U[G]);return new y("Invalid "+ee+" `"+se+"` of type "+("`"+q+"` supplied to `"+H+"`, expected ")+("instance of `"+te+"`."))}return null}return m(R)}function w(L){if(!Array.isArray(L))return process.env.NODE_ENV!=="production"&&(arguments.length>1?i("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):i("Invalid argument supplied to oneOf, expected an array.")),s;function R(U,G,H,ee,se){for(var te=U[G],q=0;q<L.length;q++)if(g(te,L[q]))return null;var Y=JSON.stringify(L,function(pe,B){var ae=M(B);return ae==="symbol"?String(B):B});return new y("Invalid "+ee+" `"+se+"` of value `"+String(te)+"` "+("supplied to `"+H+"`, expected one of "+Y+"."))}return m(R)}function C(L){function R(U,G,H,ee,se){if(typeof L!="function")return new y("Property `"+se+"` of component `"+H+"` has invalid PropType notation inside objectOf.");var te=U[G],q=z(te);if(q!=="object")return new y("Invalid "+ee+" `"+se+"` of type "+("`"+q+"` supplied to `"+H+"`, expected an object."));for(var Y in te)if(r(te,Y)){var Z=L(te,Y,H,ee,se+"."+Y,n);if(Z instanceof Error)return Z}return null}return m(R)}function A(L){if(!Array.isArray(L))return process.env.NODE_ENV!=="production"&&i("Invalid argument supplied to oneOfType, expected an instance of array."),s;for(var R=0;R<L.length;R++){var U=L[R];if(typeof U!="function")return i("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+k(U)+" at index "+R+"."),s}function G(H,ee,se,te,q){for(var Y=[],Z=0;Z<L.length;Z++){var pe=L[Z],B=pe(H,ee,se,te,q,n);if(B==null)return null;B.data&&r(B.data,"expectedType")&&Y.push(B.data.expectedType)}var ae=Y.length>0?", expected one of type ["+Y.join(", ")+"]":"";return new y("Invalid "+te+" `"+q+"` supplied to "+("`"+se+"`"+ae+"."))}return m(G)}function O(){function L(R,U,G,H,ee){return D(R[U])?null:new y("Invalid "+H+" `"+ee+"` supplied to "+("`"+G+"`, expected a ReactNode."))}return m(L)}function _(L,R,U,G,H){return new y((L||"React class")+": "+R+" type `"+U+"."+G+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+H+"`.")}function N(L){function R(U,G,H,ee,se){var te=U[G],q=z(te);if(q!=="object")return new y("Invalid "+ee+" `"+se+"` of type `"+q+"` "+("supplied to `"+H+"`, expected `object`."));for(var Y in L){var Z=L[Y];if(typeof Z!="function")return _(H,ee,se,Y,M(Z));var pe=Z(te,Y,H,ee,se+"."+Y,n);if(pe)return pe}return null}return m(R)}function $(L){function R(U,G,H,ee,se){var te=U[G],q=z(te);if(q!=="object")return new y("Invalid "+ee+" `"+se+"` of type `"+q+"` "+("supplied to `"+H+"`, expected `object`."));var Y=t({},U[G],L);for(var Z in Y){var pe=L[Z];if(r(L,Z)&&typeof pe!="function")return _(H,ee,se,Z,M(pe));if(!pe)return new y("Invalid "+ee+" `"+se+"` key `"+Z+"` supplied to `"+H+"`.\nBad object: "+JSON.stringify(U[G],null," ")+`
17
+ Valid keys: `+JSON.stringify(Object.keys(L),null," "));var B=pe(te,Z,H,ee,se+"."+Z,n);if(B)return B}return null}return m(R)}function D(L){switch(typeof L){case"number":case"string":case"undefined":return!0;case"boolean":return!L;case"object":if(Array.isArray(L))return L.every(D);if(L===null||a(L))return!0;var R=d(L);if(R){var U=R.call(L),G;if(R!==L.entries){for(;!(G=U.next()).done;)if(!D(G.value))return!1}else for(;!(G=U.next()).done;){var H=G.value;if(H&&!D(H[1]))return!1}}else return!1;return!0;default:return!1}}function F(L,R){return L==="symbol"?!0:R?R["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&R instanceof Symbol:!1}function z(L){var R=typeof L;return Array.isArray(L)?"array":L instanceof RegExp?"object":F(R,L)?"symbol":R}function M(L){if(typeof L>"u"||L===null)return""+L;var R=z(L);if(R==="object"){if(L instanceof Date)return"date";if(L instanceof RegExp)return"regexp"}return R}function k(L){var R=M(L);switch(R){case"array":case"object":return"an "+R;case"boolean":case"date":case"regexp":return"a "+R;default:return R}}function V(L){return!L.constructor||!L.constructor.name?f:L.constructor.name}return h.checkPropTypes=o,h.resetWarningCache=o.resetWarningCache,h.PropTypes=h,h},Ph}var Oh,FT;function KB(){if(FT)return Oh;FT=1;var e=kh();function t(){}function n(){}return n.resetWarningCache=t,Oh=function(){function r(s,a,l,c,u,d){if(d!==e){var f=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw f.name="Invariant Violation",f}}r.isRequired=r;function o(){return r}var i={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:o,element:r,elementType:r,instanceOf:o,node:r,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:n,resetWarningCache:t};return i.PropTypes=i,i},Oh}var LT;function ZB(){if(LT)return gc.exports;if(LT=1,process.env.NODE_ENV!=="production"){var e=AT(),t=!0;gc.exports=YB()(e.isElement,t)}else gc.exports=KB()();return gc.exports}var XB=ZB();const yt=Tm(XB);function Po(e,t,n,r){function o(i){return i instanceof n?i:new n(function(s){s(i)})}return new(n||(n=Promise))(function(i,s){function a(u){try{c(r.next(u))}catch(d){s(d)}}function l(u){try{c(r.throw(u))}catch(d){s(d)}}function c(u){u.done?i(u.value):o(u.value).then(a,l)}c((r=r.apply(e,t||[])).next())})}typeof SuppressedError=="function"&&SuppressedError;const QB=new Map([["1km","application/vnd.1000minds.decision-model+xml"],["3dml","text/vnd.in3d.3dml"],["3ds","image/x-3ds"],["3g2","video/3gpp2"],["3gp","video/3gp"],["3gpp","video/3gpp"],["3mf","model/3mf"],["7z","application/x-7z-compressed"],["7zip","application/x-7z-compressed"],["123","application/vnd.lotus-1-2-3"],["aab","application/x-authorware-bin"],["aac","audio/x-acc"],["aam","application/x-authorware-map"],["aas","application/x-authorware-seg"],["abw","application/x-abiword"],["ac","application/vnd.nokia.n-gage.ac+xml"],["ac3","audio/ac3"],["acc","application/vnd.americandynamics.acc"],["ace","application/x-ace-compressed"],["acu","application/vnd.acucobol"],["acutc","application/vnd.acucorp"],["adp","audio/adpcm"],["aep","application/vnd.audiograph"],["afm","application/x-font-type1"],["afp","application/vnd.ibm.modcap"],["ahead","application/vnd.ahead.space"],["ai","application/pdf"],["aif","audio/x-aiff"],["aifc","audio/x-aiff"],["aiff","audio/x-aiff"],["air","application/vnd.adobe.air-application-installer-package+zip"],["ait","application/vnd.dvb.ait"],["ami","application/vnd.amiga.ami"],["amr","audio/amr"],["apk","application/vnd.android.package-archive"],["apng","image/apng"],["appcache","text/cache-manifest"],["application","application/x-ms-application"],["apr","application/vnd.lotus-approach"],["arc","application/x-freearc"],["arj","application/x-arj"],["asc","application/pgp-signature"],["asf","video/x-ms-asf"],["asm","text/x-asm"],["aso","application/vnd.accpac.simply.aso"],["asx","video/x-ms-asf"],["atc","application/vnd.acucorp"],["atom","application/atom+xml"],["atomcat","application/atomcat+xml"],["atomdeleted","application/atomdeleted+xml"],["atomsvc","application/atomsvc+xml"],["atx","application/vnd.antix.game-component"],["au","audio/x-au"],["avi","video/x-msvideo"],["avif","image/avif"],["aw","application/applixware"],["azf","application/vnd.airzip.filesecure.azf"],["azs","application/vnd.airzip.filesecure.azs"],["azv","image/vnd.airzip.accelerator.azv"],["azw","application/vnd.amazon.ebook"],["b16","image/vnd.pco.b16"],["bat","application/x-msdownload"],["bcpio","application/x-bcpio"],["bdf","application/x-font-bdf"],["bdm","application/vnd.syncml.dm+wbxml"],["bdoc","application/x-bdoc"],["bed","application/vnd.realvnc.bed"],["bh2","application/vnd.fujitsu.oasysprs"],["bin","application/octet-stream"],["blb","application/x-blorb"],["blorb","application/x-blorb"],["bmi","application/vnd.bmi"],["bmml","application/vnd.balsamiq.bmml+xml"],["bmp","image/bmp"],["book","application/vnd.framemaker"],["box","application/vnd.previewsystems.box"],["boz","application/x-bzip2"],["bpk","application/octet-stream"],["bpmn","application/octet-stream"],["bsp","model/vnd.valve.source.compiled-map"],["btif","image/prs.btif"],["buffer","application/octet-stream"],["bz","application/x-bzip"],["bz2","application/x-bzip2"],["c","text/x-c"],["c4d","application/vnd.clonk.c4group"],["c4f","application/vnd.clonk.c4group"],["c4g","application/vnd.clonk.c4group"],["c4p","application/vnd.clonk.c4group"],["c4u","application/vnd.clonk.c4group"],["c11amc","application/vnd.cluetrust.cartomobile-config"],["c11amz","application/vnd.cluetrust.cartomobile-config-pkg"],["cab","application/vnd.ms-cab-compressed"],["caf","audio/x-caf"],["cap","application/vnd.tcpdump.pcap"],["car","application/vnd.curl.car"],["cat","application/vnd.ms-pki.seccat"],["cb7","application/x-cbr"],["cba","application/x-cbr"],["cbr","application/x-cbr"],["cbt","application/x-cbr"],["cbz","application/x-cbr"],["cc","text/x-c"],["cco","application/x-cocoa"],["cct","application/x-director"],["ccxml","application/ccxml+xml"],["cdbcmsg","application/vnd.contact.cmsg"],["cda","application/x-cdf"],["cdf","application/x-netcdf"],["cdfx","application/cdfx+xml"],["cdkey","application/vnd.mediastation.cdkey"],["cdmia","application/cdmi-capability"],["cdmic","application/cdmi-container"],["cdmid","application/cdmi-domain"],["cdmio","application/cdmi-object"],["cdmiq","application/cdmi-queue"],["cdr","application/cdr"],["cdx","chemical/x-cdx"],["cdxml","application/vnd.chemdraw+xml"],["cdy","application/vnd.cinderella"],["cer","application/pkix-cert"],["cfs","application/x-cfs-compressed"],["cgm","image/cgm"],["chat","application/x-chat"],["chm","application/vnd.ms-htmlhelp"],["chrt","application/vnd.kde.kchart"],["cif","chemical/x-cif"],["cii","application/vnd.anser-web-certificate-issue-initiation"],["cil","application/vnd.ms-artgalry"],["cjs","application/node"],["cla","application/vnd.claymore"],["class","application/octet-stream"],["clkk","application/vnd.crick.clicker.keyboard"],["clkp","application/vnd.crick.clicker.palette"],["clkt","application/vnd.crick.clicker.template"],["clkw","application/vnd.crick.clicker.wordbank"],["clkx","application/vnd.crick.clicker"],["clp","application/x-msclip"],["cmc","application/vnd.cosmocaller"],["cmdf","chemical/x-cmdf"],["cml","chemical/x-cml"],["cmp","application/vnd.yellowriver-custom-menu"],["cmx","image/x-cmx"],["cod","application/vnd.rim.cod"],["coffee","text/coffeescript"],["com","application/x-msdownload"],["conf","text/plain"],["cpio","application/x-cpio"],["cpp","text/x-c"],["cpt","application/mac-compactpro"],["crd","application/x-mscardfile"],["crl","application/pkix-crl"],["crt","application/x-x509-ca-cert"],["crx","application/x-chrome-extension"],["cryptonote","application/vnd.rig.cryptonote"],["csh","application/x-csh"],["csl","application/vnd.citationstyles.style+xml"],["csml","chemical/x-csml"],["csp","application/vnd.commonspace"],["csr","application/octet-stream"],["css","text/css"],["cst","application/x-director"],["csv","text/csv"],["cu","application/cu-seeme"],["curl","text/vnd.curl"],["cww","application/prs.cww"],["cxt","application/x-director"],["cxx","text/x-c"],["dae","model/vnd.collada+xml"],["daf","application/vnd.mobius.daf"],["dart","application/vnd.dart"],["dataless","application/vnd.fdsn.seed"],["davmount","application/davmount+xml"],["dbf","application/vnd.dbf"],["dbk","application/docbook+xml"],["dcr","application/x-director"],["dcurl","text/vnd.curl.dcurl"],["dd2","application/vnd.oma.dd2+xml"],["ddd","application/vnd.fujixerox.ddd"],["ddf","application/vnd.syncml.dmddf+xml"],["dds","image/vnd.ms-dds"],["deb","application/x-debian-package"],["def","text/plain"],["deploy","application/octet-stream"],["der","application/x-x509-ca-cert"],["dfac","application/vnd.dreamfactory"],["dgc","application/x-dgc-compressed"],["dic","text/x-c"],["dir","application/x-director"],["dis","application/vnd.mobius.dis"],["disposition-notification","message/disposition-notification"],["dist","application/octet-stream"],["distz","application/octet-stream"],["djv","image/vnd.djvu"],["djvu","image/vnd.djvu"],["dll","application/octet-stream"],["dmg","application/x-apple-diskimage"],["dmn","application/octet-stream"],["dmp","application/vnd.tcpdump.pcap"],["dms","application/octet-stream"],["dna","application/vnd.dna"],["doc","application/msword"],["docm","application/vnd.ms-word.template.macroEnabled.12"],["docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],["dot","application/msword"],["dotm","application/vnd.ms-word.template.macroEnabled.12"],["dotx","application/vnd.openxmlformats-officedocument.wordprocessingml.template"],["dp","application/vnd.osgi.dp"],["dpg","application/vnd.dpgraph"],["dra","audio/vnd.dra"],["drle","image/dicom-rle"],["dsc","text/prs.lines.tag"],["dssc","application/dssc+der"],["dtb","application/x-dtbook+xml"],["dtd","application/xml-dtd"],["dts","audio/vnd.dts"],["dtshd","audio/vnd.dts.hd"],["dump","application/octet-stream"],["dvb","video/vnd.dvb.file"],["dvi","application/x-dvi"],["dwd","application/atsc-dwd+xml"],["dwf","model/vnd.dwf"],["dwg","image/vnd.dwg"],["dxf","image/vnd.dxf"],["dxp","application/vnd.spotfire.dxp"],["dxr","application/x-director"],["ear","application/java-archive"],["ecelp4800","audio/vnd.nuera.ecelp4800"],["ecelp7470","audio/vnd.nuera.ecelp7470"],["ecelp9600","audio/vnd.nuera.ecelp9600"],["ecma","application/ecmascript"],["edm","application/vnd.novadigm.edm"],["edx","application/vnd.novadigm.edx"],["efif","application/vnd.picsel"],["ei6","application/vnd.pg.osasli"],["elc","application/octet-stream"],["emf","image/emf"],["eml","message/rfc822"],["emma","application/emma+xml"],["emotionml","application/emotionml+xml"],["emz","application/x-msmetafile"],["eol","audio/vnd.digital-winds"],["eot","application/vnd.ms-fontobject"],["eps","application/postscript"],["epub","application/epub+zip"],["es","application/ecmascript"],["es3","application/vnd.eszigno3+xml"],["esa","application/vnd.osgi.subsystem"],["esf","application/vnd.epson.esf"],["et3","application/vnd.eszigno3+xml"],["etx","text/x-setext"],["eva","application/x-eva"],["evy","application/x-envoy"],["exe","application/octet-stream"],["exi","application/exi"],["exp","application/express"],["exr","image/aces"],["ext","application/vnd.novadigm.ext"],["ez","application/andrew-inset"],["ez2","application/vnd.ezpix-album"],["ez3","application/vnd.ezpix-package"],["f","text/x-fortran"],["f4v","video/mp4"],["f77","text/x-fortran"],["f90","text/x-fortran"],["fbs","image/vnd.fastbidsheet"],["fcdt","application/vnd.adobe.formscentral.fcdt"],["fcs","application/vnd.isac.fcs"],["fdf","application/vnd.fdf"],["fdt","application/fdt+xml"],["fe_launch","application/vnd.denovo.fcselayout-link"],["fg5","application/vnd.fujitsu.oasysgp"],["fgd","application/x-director"],["fh","image/x-freehand"],["fh4","image/x-freehand"],["fh5","image/x-freehand"],["fh7","image/x-freehand"],["fhc","image/x-freehand"],["fig","application/x-xfig"],["fits","image/fits"],["flac","audio/x-flac"],["fli","video/x-fli"],["flo","application/vnd.micrografx.flo"],["flv","video/x-flv"],["flw","application/vnd.kde.kivio"],["flx","text/vnd.fmi.flexstor"],["fly","text/vnd.fly"],["fm","application/vnd.framemaker"],["fnc","application/vnd.frogans.fnc"],["fo","application/vnd.software602.filler.form+xml"],["for","text/x-fortran"],["fpx","image/vnd.fpx"],["frame","application/vnd.framemaker"],["fsc","application/vnd.fsc.weblaunch"],["fst","image/vnd.fst"],["ftc","application/vnd.fluxtime.clip"],["fti","application/vnd.anser-web-funds-transfer-initiation"],["fvt","video/vnd.fvt"],["fxp","application/vnd.adobe.fxp"],["fxpl","application/vnd.adobe.fxp"],["fzs","application/vnd.fuzzysheet"],["g2w","application/vnd.geoplan"],["g3","image/g3fax"],["g3w","application/vnd.geospace"],["gac","application/vnd.groove-account"],["gam","application/x-tads"],["gbr","application/rpki-ghostbusters"],["gca","application/x-gca-compressed"],["gdl","model/vnd.gdl"],["gdoc","application/vnd.google-apps.document"],["geo","application/vnd.dynageo"],["geojson","application/geo+json"],["gex","application/vnd.geometry-explorer"],["ggb","application/vnd.geogebra.file"],["ggt","application/vnd.geogebra.tool"],["ghf","application/vnd.groove-help"],["gif","image/gif"],["gim","application/vnd.groove-identity-message"],["glb","model/gltf-binary"],["gltf","model/gltf+json"],["gml","application/gml+xml"],["gmx","application/vnd.gmx"],["gnumeric","application/x-gnumeric"],["gpg","application/gpg-keys"],["gph","application/vnd.flographit"],["gpx","application/gpx+xml"],["gqf","application/vnd.grafeq"],["gqs","application/vnd.grafeq"],["gram","application/srgs"],["gramps","application/x-gramps-xml"],["gre","application/vnd.geometry-explorer"],["grv","application/vnd.groove-injector"],["grxml","application/srgs+xml"],["gsf","application/x-font-ghostscript"],["gsheet","application/vnd.google-apps.spreadsheet"],["gslides","application/vnd.google-apps.presentation"],["gtar","application/x-gtar"],["gtm","application/vnd.groove-tool-message"],["gtw","model/vnd.gtw"],["gv","text/vnd.graphviz"],["gxf","application/gxf"],["gxt","application/vnd.geonext"],["gz","application/gzip"],["gzip","application/gzip"],["h","text/x-c"],["h261","video/h261"],["h263","video/h263"],["h264","video/h264"],["hal","application/vnd.hal+xml"],["hbci","application/vnd.hbci"],["hbs","text/x-handlebars-template"],["hdd","application/x-virtualbox-hdd"],["hdf","application/x-hdf"],["heic","image/heic"],["heics","image/heic-sequence"],["heif","image/heif"],["heifs","image/heif-sequence"],["hej2","image/hej2k"],["held","application/atsc-held+xml"],["hh","text/x-c"],["hjson","application/hjson"],["hlp","application/winhlp"],["hpgl","application/vnd.hp-hpgl"],["hpid","application/vnd.hp-hpid"],["hps","application/vnd.hp-hps"],["hqx","application/mac-binhex40"],["hsj2","image/hsj2"],["htc","text/x-component"],["htke","application/vnd.kenameaapp"],["htm","text/html"],["html","text/html"],["hvd","application/vnd.yamaha.hv-dic"],["hvp","application/vnd.yamaha.hv-voice"],["hvs","application/vnd.yamaha.hv-script"],["i2g","application/vnd.intergeo"],["icc","application/vnd.iccprofile"],["ice","x-conference/x-cooltalk"],["icm","application/vnd.iccprofile"],["ico","image/x-icon"],["ics","text/calendar"],["ief","image/ief"],["ifb","text/calendar"],["ifm","application/vnd.shana.informed.formdata"],["iges","model/iges"],["igl","application/vnd.igloader"],["igm","application/vnd.insors.igm"],["igs","model/iges"],["igx","application/vnd.micrografx.igx"],["iif","application/vnd.shana.informed.interchange"],["img","application/octet-stream"],["imp","application/vnd.accpac.simply.imp"],["ims","application/vnd.ms-ims"],["in","text/plain"],["ini","text/plain"],["ink","application/inkml+xml"],["inkml","application/inkml+xml"],["install","application/x-install-instructions"],["iota","application/vnd.astraea-software.iota"],["ipfix","application/ipfix"],["ipk","application/vnd.shana.informed.package"],["irm","application/vnd.ibm.rights-management"],["irp","application/vnd.irepository.package+xml"],["iso","application/x-iso9660-image"],["itp","application/vnd.shana.informed.formtemplate"],["its","application/its+xml"],["ivp","application/vnd.immervision-ivp"],["ivu","application/vnd.immervision-ivu"],["jad","text/vnd.sun.j2me.app-descriptor"],["jade","text/jade"],["jam","application/vnd.jam"],["jar","application/java-archive"],["jardiff","application/x-java-archive-diff"],["java","text/x-java-source"],["jhc","image/jphc"],["jisp","application/vnd.jisp"],["jls","image/jls"],["jlt","application/vnd.hp-jlyt"],["jng","image/x-jng"],["jnlp","application/x-java-jnlp-file"],["joda","application/vnd.joost.joda-archive"],["jp2","image/jp2"],["jpe","image/jpeg"],["jpeg","image/jpeg"],["jpf","image/jpx"],["jpg","image/jpeg"],["jpg2","image/jp2"],["jpgm","video/jpm"],["jpgv","video/jpeg"],["jph","image/jph"],["jpm","video/jpm"],["jpx","image/jpx"],["js","application/javascript"],["json","application/json"],["json5","application/json5"],["jsonld","application/ld+json"],["jsonl","application/jsonl"],["jsonml","application/jsonml+json"],["jsx","text/jsx"],["jxr","image/jxr"],["jxra","image/jxra"],["jxrs","image/jxrs"],["jxs","image/jxs"],["jxsc","image/jxsc"],["jxsi","image/jxsi"],["jxss","image/jxss"],["kar","audio/midi"],["karbon","application/vnd.kde.karbon"],["kdb","application/octet-stream"],["kdbx","application/x-keepass2"],["key","application/x-iwork-keynote-sffkey"],["kfo","application/vnd.kde.kformula"],["kia","application/vnd.kidspiration"],["kml","application/vnd.google-earth.kml+xml"],["kmz","application/vnd.google-earth.kmz"],["kne","application/vnd.kinar"],["knp","application/vnd.kinar"],["kon","application/vnd.kde.kontour"],["kpr","application/vnd.kde.kpresenter"],["kpt","application/vnd.kde.kpresenter"],["kpxx","application/vnd.ds-keypoint"],["ksp","application/vnd.kde.kspread"],["ktr","application/vnd.kahootz"],["ktx","image/ktx"],["ktx2","image/ktx2"],["ktz","application/vnd.kahootz"],["kwd","application/vnd.kde.kword"],["kwt","application/vnd.kde.kword"],["lasxml","application/vnd.las.las+xml"],["latex","application/x-latex"],["lbd","application/vnd.llamagraphics.life-balance.desktop"],["lbe","application/vnd.llamagraphics.life-balance.exchange+xml"],["les","application/vnd.hhe.lesson-player"],["less","text/less"],["lgr","application/lgr+xml"],["lha","application/octet-stream"],["link66","application/vnd.route66.link66+xml"],["list","text/plain"],["list3820","application/vnd.ibm.modcap"],["listafp","application/vnd.ibm.modcap"],["litcoffee","text/coffeescript"],["lnk","application/x-ms-shortcut"],["log","text/plain"],["lostxml","application/lost+xml"],["lrf","application/octet-stream"],["lrm","application/vnd.ms-lrm"],["ltf","application/vnd.frogans.ltf"],["lua","text/x-lua"],["luac","application/x-lua-bytecode"],["lvp","audio/vnd.lucent.voice"],["lwp","application/vnd.lotus-wordpro"],["lzh","application/octet-stream"],["m1v","video/mpeg"],["m2a","audio/mpeg"],["m2v","video/mpeg"],["m3a","audio/mpeg"],["m3u","text/plain"],["m3u8","application/vnd.apple.mpegurl"],["m4a","audio/x-m4a"],["m4p","application/mp4"],["m4s","video/iso.segment"],["m4u","application/vnd.mpegurl"],["m4v","video/x-m4v"],["m13","application/x-msmediaview"],["m14","application/x-msmediaview"],["m21","application/mp21"],["ma","application/mathematica"],["mads","application/mads+xml"],["maei","application/mmt-aei+xml"],["mag","application/vnd.ecowin.chart"],["maker","application/vnd.framemaker"],["man","text/troff"],["manifest","text/cache-manifest"],["map","application/json"],["mar","application/octet-stream"],["markdown","text/markdown"],["mathml","application/mathml+xml"],["mb","application/mathematica"],["mbk","application/vnd.mobius.mbk"],["mbox","application/mbox"],["mc1","application/vnd.medcalcdata"],["mcd","application/vnd.mcd"],["mcurl","text/vnd.curl.mcurl"],["md","text/markdown"],["mdb","application/x-msaccess"],["mdi","image/vnd.ms-modi"],["mdx","text/mdx"],["me","text/troff"],["mesh","model/mesh"],["meta4","application/metalink4+xml"],["metalink","application/metalink+xml"],["mets","application/mets+xml"],["mfm","application/vnd.mfmp"],["mft","application/rpki-manifest"],["mgp","application/vnd.osgeo.mapguide.package"],["mgz","application/vnd.proteus.magazine"],["mid","audio/midi"],["midi","audio/midi"],["mie","application/x-mie"],["mif","application/vnd.mif"],["mime","message/rfc822"],["mj2","video/mj2"],["mjp2","video/mj2"],["mjs","application/javascript"],["mk3d","video/x-matroska"],["mka","audio/x-matroska"],["mkd","text/x-markdown"],["mks","video/x-matroska"],["mkv","video/x-matroska"],["mlp","application/vnd.dolby.mlp"],["mmd","application/vnd.chipnuts.karaoke-mmd"],["mmf","application/vnd.smaf"],["mml","text/mathml"],["mmr","image/vnd.fujixerox.edmics-mmr"],["mng","video/x-mng"],["mny","application/x-msmoney"],["mobi","application/x-mobipocket-ebook"],["mods","application/mods+xml"],["mov","video/quicktime"],["movie","video/x-sgi-movie"],["mp2","audio/mpeg"],["mp2a","audio/mpeg"],["mp3","audio/mpeg"],["mp4","video/mp4"],["mp4a","audio/mp4"],["mp4s","application/mp4"],["mp4v","video/mp4"],["mp21","application/mp21"],["mpc","application/vnd.mophun.certificate"],["mpd","application/dash+xml"],["mpe","video/mpeg"],["mpeg","video/mpeg"],["mpg","video/mpeg"],["mpg4","video/mp4"],["mpga","audio/mpeg"],["mpkg","application/vnd.apple.installer+xml"],["mpm","application/vnd.blueice.multipass"],["mpn","application/vnd.mophun.application"],["mpp","application/vnd.ms-project"],["mpt","application/vnd.ms-project"],["mpy","application/vnd.ibm.minipay"],["mqy","application/vnd.mobius.mqy"],["mrc","application/marc"],["mrcx","application/marcxml+xml"],["ms","text/troff"],["mscml","application/mediaservercontrol+xml"],["mseed","application/vnd.fdsn.mseed"],["mseq","application/vnd.mseq"],["msf","application/vnd.epson.msf"],["msg","application/vnd.ms-outlook"],["msh","model/mesh"],["msi","application/x-msdownload"],["msl","application/vnd.mobius.msl"],["msm","application/octet-stream"],["msp","application/octet-stream"],["msty","application/vnd.muvee.style"],["mtl","model/mtl"],["mts","model/vnd.mts"],["mus","application/vnd.musician"],["musd","application/mmt-usd+xml"],["musicxml","application/vnd.recordare.musicxml+xml"],["mvb","application/x-msmediaview"],["mvt","application/vnd.mapbox-vector-tile"],["mwf","application/vnd.mfer"],["mxf","application/mxf"],["mxl","application/vnd.recordare.musicxml"],["mxmf","audio/mobile-xmf"],["mxml","application/xv+xml"],["mxs","application/vnd.triscape.mxs"],["mxu","video/vnd.mpegurl"],["n-gage","application/vnd.nokia.n-gage.symbian.install"],["n3","text/n3"],["nb","application/mathematica"],["nbp","application/vnd.wolfram.player"],["nc","application/x-netcdf"],["ncx","application/x-dtbncx+xml"],["nfo","text/x-nfo"],["ngdat","application/vnd.nokia.n-gage.data"],["nitf","application/vnd.nitf"],["nlu","application/vnd.neurolanguage.nlu"],["nml","application/vnd.enliven"],["nnd","application/vnd.noblenet-directory"],["nns","application/vnd.noblenet-sealer"],["nnw","application/vnd.noblenet-web"],["npx","image/vnd.net-fpx"],["nq","application/n-quads"],["nsc","application/x-conference"],["nsf","application/vnd.lotus-notes"],["nt","application/n-triples"],["ntf","application/vnd.nitf"],["numbers","application/x-iwork-numbers-sffnumbers"],["nzb","application/x-nzb"],["oa2","application/vnd.fujitsu.oasys2"],["oa3","application/vnd.fujitsu.oasys3"],["oas","application/vnd.fujitsu.oasys"],["obd","application/x-msbinder"],["obgx","application/vnd.openblox.game+xml"],["obj","model/obj"],["oda","application/oda"],["odb","application/vnd.oasis.opendocument.database"],["odc","application/vnd.oasis.opendocument.chart"],["odf","application/vnd.oasis.opendocument.formula"],["odft","application/vnd.oasis.opendocument.formula-template"],["odg","application/vnd.oasis.opendocument.graphics"],["odi","application/vnd.oasis.opendocument.image"],["odm","application/vnd.oasis.opendocument.text-master"],["odp","application/vnd.oasis.opendocument.presentation"],["ods","application/vnd.oasis.opendocument.spreadsheet"],["odt","application/vnd.oasis.opendocument.text"],["oga","audio/ogg"],["ogex","model/vnd.opengex"],["ogg","audio/ogg"],["ogv","video/ogg"],["ogx","application/ogg"],["omdoc","application/omdoc+xml"],["onepkg","application/onenote"],["onetmp","application/onenote"],["onetoc","application/onenote"],["onetoc2","application/onenote"],["opf","application/oebps-package+xml"],["opml","text/x-opml"],["oprc","application/vnd.palm"],["opus","audio/ogg"],["org","text/x-org"],["osf","application/vnd.yamaha.openscoreformat"],["osfpvg","application/vnd.yamaha.openscoreformat.osfpvg+xml"],["osm","application/vnd.openstreetmap.data+xml"],["otc","application/vnd.oasis.opendocument.chart-template"],["otf","font/otf"],["otg","application/vnd.oasis.opendocument.graphics-template"],["oth","application/vnd.oasis.opendocument.text-web"],["oti","application/vnd.oasis.opendocument.image-template"],["otp","application/vnd.oasis.opendocument.presentation-template"],["ots","application/vnd.oasis.opendocument.spreadsheet-template"],["ott","application/vnd.oasis.opendocument.text-template"],["ova","application/x-virtualbox-ova"],["ovf","application/x-virtualbox-ovf"],["owl","application/rdf+xml"],["oxps","application/oxps"],["oxt","application/vnd.openofficeorg.extension"],["p","text/x-pascal"],["p7a","application/x-pkcs7-signature"],["p7b","application/x-pkcs7-certificates"],["p7c","application/pkcs7-mime"],["p7m","application/pkcs7-mime"],["p7r","application/x-pkcs7-certreqresp"],["p7s","application/pkcs7-signature"],["p8","application/pkcs8"],["p10","application/x-pkcs10"],["p12","application/x-pkcs12"],["pac","application/x-ns-proxy-autoconfig"],["pages","application/x-iwork-pages-sffpages"],["pas","text/x-pascal"],["paw","application/vnd.pawaafile"],["pbd","application/vnd.powerbuilder6"],["pbm","image/x-portable-bitmap"],["pcap","application/vnd.tcpdump.pcap"],["pcf","application/x-font-pcf"],["pcl","application/vnd.hp-pcl"],["pclxl","application/vnd.hp-pclxl"],["pct","image/x-pict"],["pcurl","application/vnd.curl.pcurl"],["pcx","image/x-pcx"],["pdb","application/x-pilot"],["pde","text/x-processing"],["pdf","application/pdf"],["pem","application/x-x509-user-cert"],["pfa","application/x-font-type1"],["pfb","application/x-font-type1"],["pfm","application/x-font-type1"],["pfr","application/font-tdpfr"],["pfx","application/x-pkcs12"],["pgm","image/x-portable-graymap"],["pgn","application/x-chess-pgn"],["pgp","application/pgp"],["php","application/x-httpd-php"],["php3","application/x-httpd-php"],["php4","application/x-httpd-php"],["phps","application/x-httpd-php-source"],["phtml","application/x-httpd-php"],["pic","image/x-pict"],["pkg","application/octet-stream"],["pki","application/pkixcmp"],["pkipath","application/pkix-pkipath"],["pkpass","application/vnd.apple.pkpass"],["pl","application/x-perl"],["plb","application/vnd.3gpp.pic-bw-large"],["plc","application/vnd.mobius.plc"],["plf","application/vnd.pocketlearn"],["pls","application/pls+xml"],["pm","application/x-perl"],["pml","application/vnd.ctc-posml"],["png","image/png"],["pnm","image/x-portable-anymap"],["portpkg","application/vnd.macports.portpkg"],["pot","application/vnd.ms-powerpoint"],["potm","application/vnd.ms-powerpoint.presentation.macroEnabled.12"],["potx","application/vnd.openxmlformats-officedocument.presentationml.template"],["ppa","application/vnd.ms-powerpoint"],["ppam","application/vnd.ms-powerpoint.addin.macroEnabled.12"],["ppd","application/vnd.cups-ppd"],["ppm","image/x-portable-pixmap"],["pps","application/vnd.ms-powerpoint"],["ppsm","application/vnd.ms-powerpoint.slideshow.macroEnabled.12"],["ppsx","application/vnd.openxmlformats-officedocument.presentationml.slideshow"],["ppt","application/powerpoint"],["pptm","application/vnd.ms-powerpoint.presentation.macroEnabled.12"],["pptx","application/vnd.openxmlformats-officedocument.presentationml.presentation"],["pqa","application/vnd.palm"],["prc","application/x-pilot"],["pre","application/vnd.lotus-freelance"],["prf","application/pics-rules"],["provx","application/provenance+xml"],["ps","application/postscript"],["psb","application/vnd.3gpp.pic-bw-small"],["psd","application/x-photoshop"],["psf","application/x-font-linux-psf"],["pskcxml","application/pskc+xml"],["pti","image/prs.pti"],["ptid","application/vnd.pvi.ptid1"],["pub","application/x-mspublisher"],["pvb","application/vnd.3gpp.pic-bw-var"],["pwn","application/vnd.3m.post-it-notes"],["pya","audio/vnd.ms-playready.media.pya"],["pyv","video/vnd.ms-playready.media.pyv"],["qam","application/vnd.epson.quickanime"],["qbo","application/vnd.intu.qbo"],["qfx","application/vnd.intu.qfx"],["qps","application/vnd.publishare-delta-tree"],["qt","video/quicktime"],["qwd","application/vnd.quark.quarkxpress"],["qwt","application/vnd.quark.quarkxpress"],["qxb","application/vnd.quark.quarkxpress"],["qxd","application/vnd.quark.quarkxpress"],["qxl","application/vnd.quark.quarkxpress"],["qxt","application/vnd.quark.quarkxpress"],["ra","audio/x-realaudio"],["ram","audio/x-pn-realaudio"],["raml","application/raml+yaml"],["rapd","application/route-apd+xml"],["rar","application/x-rar"],["ras","image/x-cmu-raster"],["rcprofile","application/vnd.ipunplugged.rcprofile"],["rdf","application/rdf+xml"],["rdz","application/vnd.data-vision.rdz"],["relo","application/p2p-overlay+xml"],["rep","application/vnd.businessobjects"],["res","application/x-dtbresource+xml"],["rgb","image/x-rgb"],["rif","application/reginfo+xml"],["rip","audio/vnd.rip"],["ris","application/x-research-info-systems"],["rl","application/resource-lists+xml"],["rlc","image/vnd.fujixerox.edmics-rlc"],["rld","application/resource-lists-diff+xml"],["rm","audio/x-pn-realaudio"],["rmi","audio/midi"],["rmp","audio/x-pn-realaudio-plugin"],["rms","application/vnd.jcp.javame.midlet-rms"],["rmvb","application/vnd.rn-realmedia-vbr"],["rnc","application/relax-ng-compact-syntax"],["rng","application/xml"],["roa","application/rpki-roa"],["roff","text/troff"],["rp9","application/vnd.cloanto.rp9"],["rpm","audio/x-pn-realaudio-plugin"],["rpss","application/vnd.nokia.radio-presets"],["rpst","application/vnd.nokia.radio-preset"],["rq","application/sparql-query"],["rs","application/rls-services+xml"],["rsa","application/x-pkcs7"],["rsat","application/atsc-rsat+xml"],["rsd","application/rsd+xml"],["rsheet","application/urc-ressheet+xml"],["rss","application/rss+xml"],["rtf","text/rtf"],["rtx","text/richtext"],["run","application/x-makeself"],["rusd","application/route-usd+xml"],["rv","video/vnd.rn-realvideo"],["s","text/x-asm"],["s3m","audio/s3m"],["saf","application/vnd.yamaha.smaf-audio"],["sass","text/x-sass"],["sbml","application/sbml+xml"],["sc","application/vnd.ibm.secure-container"],["scd","application/x-msschedule"],["scm","application/vnd.lotus-screencam"],["scq","application/scvp-cv-request"],["scs","application/scvp-cv-response"],["scss","text/x-scss"],["scurl","text/vnd.curl.scurl"],["sda","application/vnd.stardivision.draw"],["sdc","application/vnd.stardivision.calc"],["sdd","application/vnd.stardivision.impress"],["sdkd","application/vnd.solent.sdkm+xml"],["sdkm","application/vnd.solent.sdkm+xml"],["sdp","application/sdp"],["sdw","application/vnd.stardivision.writer"],["sea","application/octet-stream"],["see","application/vnd.seemail"],["seed","application/vnd.fdsn.seed"],["sema","application/vnd.sema"],["semd","application/vnd.semd"],["semf","application/vnd.semf"],["senmlx","application/senml+xml"],["sensmlx","application/sensml+xml"],["ser","application/java-serialized-object"],["setpay","application/set-payment-initiation"],["setreg","application/set-registration-initiation"],["sfd-hdstx","application/vnd.hydrostatix.sof-data"],["sfs","application/vnd.spotfire.sfs"],["sfv","text/x-sfv"],["sgi","image/sgi"],["sgl","application/vnd.stardivision.writer-global"],["sgm","text/sgml"],["sgml","text/sgml"],["sh","application/x-sh"],["shar","application/x-shar"],["shex","text/shex"],["shf","application/shf+xml"],["shtml","text/html"],["sid","image/x-mrsid-image"],["sieve","application/sieve"],["sig","application/pgp-signature"],["sil","audio/silk"],["silo","model/mesh"],["sis","application/vnd.symbian.install"],["sisx","application/vnd.symbian.install"],["sit","application/x-stuffit"],["sitx","application/x-stuffitx"],["siv","application/sieve"],["skd","application/vnd.koan"],["skm","application/vnd.koan"],["skp","application/vnd.koan"],["skt","application/vnd.koan"],["sldm","application/vnd.ms-powerpoint.slide.macroenabled.12"],["sldx","application/vnd.openxmlformats-officedocument.presentationml.slide"],["slim","text/slim"],["slm","text/slim"],["sls","application/route-s-tsid+xml"],["slt","application/vnd.epson.salt"],["sm","application/vnd.stepmania.stepchart"],["smf","application/vnd.stardivision.math"],["smi","application/smil"],["smil","application/smil"],["smv","video/x-smv"],["smzip","application/vnd.stepmania.package"],["snd","audio/basic"],["snf","application/x-font-snf"],["so","application/octet-stream"],["spc","application/x-pkcs7-certificates"],["spdx","text/spdx"],["spf","application/vnd.yamaha.smaf-phrase"],["spl","application/x-futuresplash"],["spot","text/vnd.in3d.spot"],["spp","application/scvp-vp-response"],["spq","application/scvp-vp-request"],["spx","audio/ogg"],["sql","application/x-sql"],["src","application/x-wais-source"],["srt","application/x-subrip"],["sru","application/sru+xml"],["srx","application/sparql-results+xml"],["ssdl","application/ssdl+xml"],["sse","application/vnd.kodak-descriptor"],["ssf","application/vnd.epson.ssf"],["ssml","application/ssml+xml"],["sst","application/octet-stream"],["st","application/vnd.sailingtracker.track"],["stc","application/vnd.sun.xml.calc.template"],["std","application/vnd.sun.xml.draw.template"],["stf","application/vnd.wt.stf"],["sti","application/vnd.sun.xml.impress.template"],["stk","application/hyperstudio"],["stl","model/stl"],["stpx","model/step+xml"],["stpxz","model/step-xml+zip"],["stpz","model/step+zip"],["str","application/vnd.pg.format"],["stw","application/vnd.sun.xml.writer.template"],["styl","text/stylus"],["stylus","text/stylus"],["sub","text/vnd.dvb.subtitle"],["sus","application/vnd.sus-calendar"],["susp","application/vnd.sus-calendar"],["sv4cpio","application/x-sv4cpio"],["sv4crc","application/x-sv4crc"],["svc","application/vnd.dvb.service"],["svd","application/vnd.svd"],["svg","image/svg+xml"],["svgz","image/svg+xml"],["swa","application/x-director"],["swf","application/x-shockwave-flash"],["swi","application/vnd.aristanetworks.swi"],["swidtag","application/swid+xml"],["sxc","application/vnd.sun.xml.calc"],["sxd","application/vnd.sun.xml.draw"],["sxg","application/vnd.sun.xml.writer.global"],["sxi","application/vnd.sun.xml.impress"],["sxm","application/vnd.sun.xml.math"],["sxw","application/vnd.sun.xml.writer"],["t","text/troff"],["t3","application/x-t3vm-image"],["t38","image/t38"],["taglet","application/vnd.mynfc"],["tao","application/vnd.tao.intent-module-archive"],["tap","image/vnd.tencent.tap"],["tar","application/x-tar"],["tcap","application/vnd.3gpp2.tcap"],["tcl","application/x-tcl"],["td","application/urc-targetdesc+xml"],["teacher","application/vnd.smart.teacher"],["tei","application/tei+xml"],["teicorpus","application/tei+xml"],["tex","application/x-tex"],["texi","application/x-texinfo"],["texinfo","application/x-texinfo"],["text","text/plain"],["tfi","application/thraud+xml"],["tfm","application/x-tex-tfm"],["tfx","image/tiff-fx"],["tga","image/x-tga"],["tgz","application/x-tar"],["thmx","application/vnd.ms-officetheme"],["tif","image/tiff"],["tiff","image/tiff"],["tk","application/x-tcl"],["tmo","application/vnd.tmobile-livetv"],["toml","application/toml"],["torrent","application/x-bittorrent"],["tpl","application/vnd.groove-tool-template"],["tpt","application/vnd.trid.tpt"],["tr","text/troff"],["tra","application/vnd.trueapp"],["trig","application/trig"],["trm","application/x-msterminal"],["ts","video/mp2t"],["tsd","application/timestamped-data"],["tsv","text/tab-separated-values"],["ttc","font/collection"],["ttf","font/ttf"],["ttl","text/turtle"],["ttml","application/ttml+xml"],["twd","application/vnd.simtech-mindmapper"],["twds","application/vnd.simtech-mindmapper"],["txd","application/vnd.genomatix.tuxedo"],["txf","application/vnd.mobius.txf"],["txt","text/plain"],["u8dsn","message/global-delivery-status"],["u8hdr","message/global-headers"],["u8mdn","message/global-disposition-notification"],["u8msg","message/global"],["u32","application/x-authorware-bin"],["ubj","application/ubjson"],["udeb","application/x-debian-package"],["ufd","application/vnd.ufdl"],["ufdl","application/vnd.ufdl"],["ulx","application/x-glulx"],["umj","application/vnd.umajin"],["unityweb","application/vnd.unity"],["uoml","application/vnd.uoml+xml"],["uri","text/uri-list"],["uris","text/uri-list"],["urls","text/uri-list"],["usdz","model/vnd.usdz+zip"],["ustar","application/x-ustar"],["utz","application/vnd.uiq.theme"],["uu","text/x-uuencode"],["uva","audio/vnd.dece.audio"],["uvd","application/vnd.dece.data"],["uvf","application/vnd.dece.data"],["uvg","image/vnd.dece.graphic"],["uvh","video/vnd.dece.hd"],["uvi","image/vnd.dece.graphic"],["uvm","video/vnd.dece.mobile"],["uvp","video/vnd.dece.pd"],["uvs","video/vnd.dece.sd"],["uvt","application/vnd.dece.ttml+xml"],["uvu","video/vnd.uvvu.mp4"],["uvv","video/vnd.dece.video"],["uvva","audio/vnd.dece.audio"],["uvvd","application/vnd.dece.data"],["uvvf","application/vnd.dece.data"],["uvvg","image/vnd.dece.graphic"],["uvvh","video/vnd.dece.hd"],["uvvi","image/vnd.dece.graphic"],["uvvm","video/vnd.dece.mobile"],["uvvp","video/vnd.dece.pd"],["uvvs","video/vnd.dece.sd"],["uvvt","application/vnd.dece.ttml+xml"],["uvvu","video/vnd.uvvu.mp4"],["uvvv","video/vnd.dece.video"],["uvvx","application/vnd.dece.unspecified"],["uvvz","application/vnd.dece.zip"],["uvx","application/vnd.dece.unspecified"],["uvz","application/vnd.dece.zip"],["vbox","application/x-virtualbox-vbox"],["vbox-extpack","application/x-virtualbox-vbox-extpack"],["vcard","text/vcard"],["vcd","application/x-cdlink"],["vcf","text/x-vcard"],["vcg","application/vnd.groove-vcard"],["vcs","text/x-vcalendar"],["vcx","application/vnd.vcx"],["vdi","application/x-virtualbox-vdi"],["vds","model/vnd.sap.vds"],["vhd","application/x-virtualbox-vhd"],["vis","application/vnd.visionary"],["viv","video/vnd.vivo"],["vlc","application/videolan"],["vmdk","application/x-virtualbox-vmdk"],["vob","video/x-ms-vob"],["vor","application/vnd.stardivision.writer"],["vox","application/x-authorware-bin"],["vrml","model/vrml"],["vsd","application/vnd.visio"],["vsf","application/vnd.vsf"],["vss","application/vnd.visio"],["vst","application/vnd.visio"],["vsw","application/vnd.visio"],["vtf","image/vnd.valve.source.texture"],["vtt","text/vtt"],["vtu","model/vnd.vtu"],["vxml","application/voicexml+xml"],["w3d","application/x-director"],["wad","application/x-doom"],["wadl","application/vnd.sun.wadl+xml"],["war","application/java-archive"],["wasm","application/wasm"],["wav","audio/x-wav"],["wax","audio/x-ms-wax"],["wbmp","image/vnd.wap.wbmp"],["wbs","application/vnd.criticaltools.wbs+xml"],["wbxml","application/wbxml"],["wcm","application/vnd.ms-works"],["wdb","application/vnd.ms-works"],["wdp","image/vnd.ms-photo"],["weba","audio/webm"],["webapp","application/x-web-app-manifest+json"],["webm","video/webm"],["webmanifest","application/manifest+json"],["webp","image/webp"],["wg","application/vnd.pmi.widget"],["wgt","application/widget"],["wks","application/vnd.ms-works"],["wm","video/x-ms-wm"],["wma","audio/x-ms-wma"],["wmd","application/x-ms-wmd"],["wmf","image/wmf"],["wml","text/vnd.wap.wml"],["wmlc","application/wmlc"],["wmls","text/vnd.wap.wmlscript"],["wmlsc","application/vnd.wap.wmlscriptc"],["wmv","video/x-ms-wmv"],["wmx","video/x-ms-wmx"],["wmz","application/x-msmetafile"],["woff","font/woff"],["woff2","font/woff2"],["word","application/msword"],["wpd","application/vnd.wordperfect"],["wpl","application/vnd.ms-wpl"],["wps","application/vnd.ms-works"],["wqd","application/vnd.wqd"],["wri","application/x-mswrite"],["wrl","model/vrml"],["wsc","message/vnd.wfa.wsc"],["wsdl","application/wsdl+xml"],["wspolicy","application/wspolicy+xml"],["wtb","application/vnd.webturbo"],["wvx","video/x-ms-wvx"],["x3d","model/x3d+xml"],["x3db","model/x3d+fastinfoset"],["x3dbz","model/x3d+binary"],["x3dv","model/x3d-vrml"],["x3dvz","model/x3d+vrml"],["x3dz","model/x3d+xml"],["x32","application/x-authorware-bin"],["x_b","model/vnd.parasolid.transmit.binary"],["x_t","model/vnd.parasolid.transmit.text"],["xaml","application/xaml+xml"],["xap","application/x-silverlight-app"],["xar","application/vnd.xara"],["xav","application/xcap-att+xml"],["xbap","application/x-ms-xbap"],["xbd","application/vnd.fujixerox.docuworks.binder"],["xbm","image/x-xbitmap"],["xca","application/xcap-caps+xml"],["xcs","application/calendar+xml"],["xdf","application/xcap-diff+xml"],["xdm","application/vnd.syncml.dm+xml"],["xdp","application/vnd.adobe.xdp+xml"],["xdssc","application/dssc+xml"],["xdw","application/vnd.fujixerox.docuworks"],["xel","application/xcap-el+xml"],["xenc","application/xenc+xml"],["xer","application/patch-ops-error+xml"],["xfdf","application/vnd.adobe.xfdf"],["xfdl","application/vnd.xfdl"],["xht","application/xhtml+xml"],["xhtml","application/xhtml+xml"],["xhvml","application/xv+xml"],["xif","image/vnd.xiff"],["xl","application/excel"],["xla","application/vnd.ms-excel"],["xlam","application/vnd.ms-excel.addin.macroEnabled.12"],["xlc","application/vnd.ms-excel"],["xlf","application/xliff+xml"],["xlm","application/vnd.ms-excel"],["xls","application/vnd.ms-excel"],["xlsb","application/vnd.ms-excel.sheet.binary.macroEnabled.12"],["xlsm","application/vnd.ms-excel.sheet.macroEnabled.12"],["xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],["xlt","application/vnd.ms-excel"],["xltm","application/vnd.ms-excel.template.macroEnabled.12"],["xltx","application/vnd.openxmlformats-officedocument.spreadsheetml.template"],["xlw","application/vnd.ms-excel"],["xm","audio/xm"],["xml","application/xml"],["xns","application/xcap-ns+xml"],["xo","application/vnd.olpc-sugar"],["xop","application/xop+xml"],["xpi","application/x-xpinstall"],["xpl","application/xproc+xml"],["xpm","image/x-xpixmap"],["xpr","application/vnd.is-xpr"],["xps","application/vnd.ms-xpsdocument"],["xpw","application/vnd.intercon.formnet"],["xpx","application/vnd.intercon.formnet"],["xsd","application/xml"],["xsl","application/xml"],["xslt","application/xslt+xml"],["xsm","application/vnd.syncml+xml"],["xspf","application/xspf+xml"],["xul","application/vnd.mozilla.xul+xml"],["xvm","application/xv+xml"],["xvml","application/xv+xml"],["xwd","image/x-xwindowdump"],["xyz","chemical/x-xyz"],["xz","application/x-xz"],["yaml","text/yaml"],["yang","application/yang"],["yin","application/yin+xml"],["yml","text/yaml"],["ymp","text/x-suse-ymp"],["z","application/x-compress"],["z1","application/x-zmachine"],["z2","application/x-zmachine"],["z3","application/x-zmachine"],["z4","application/x-zmachine"],["z5","application/x-zmachine"],["z6","application/x-zmachine"],["z7","application/x-zmachine"],["z8","application/x-zmachine"],["zaz","application/vnd.zzazz.deck+xml"],["zip","application/zip"],["zir","application/vnd.zul"],["zirz","application/vnd.zul"],["zmm","application/vnd.handheld-entertainment+xml"],["zsh","text/x-scriptzsh"]]);function Ni(e,t,n){const r=JB(e),{webkitRelativePath:o}=e,i=typeof t=="string"?t:typeof o=="string"&&o.length>0?o:`./${e.name}`;return typeof r.path!="string"&&VT(r,"path",i),VT(r,"relativePath",i),r}function JB(e){const{name:t}=e;if(t&&t.lastIndexOf(".")!==-1&&!e.type){const r=t.split(".").pop().toLowerCase(),o=QB.get(r);o&&Object.defineProperty(e,"type",{value:o,writable:!1,configurable:!1,enumerable:!0})}return e}function VT(e,t,n){Object.defineProperty(e,t,{value:n,writable:!1,configurable:!1,enumerable:!0})}const eR=[".DS_Store","Thumbs.db"];function tR(e){return Po(this,void 0,void 0,function*(){return vc(e)&&nR(e.dataTransfer)?sR(e.dataTransfer,e.type):rR(e)?oR(e):Array.isArray(e)&&e.every(t=>"getFile"in t&&typeof t.getFile=="function")?iR(e):[]})}function nR(e){return vc(e)}function rR(e){return vc(e)&&vc(e.target)}function vc(e){return typeof e=="object"&&e!==null}function oR(e){return Dh(e.target.files).map(t=>Ni(t))}function iR(e){return Po(this,void 0,void 0,function*(){return(yield Promise.all(e.map(n=>n.getFile()))).map(n=>Ni(n))})}function sR(e,t){return Po(this,void 0,void 0,function*(){if(e.items){const n=Dh(e.items).filter(o=>o.kind==="file");if(t!=="drop")return n;const r=yield Promise.all(n.map(aR));return $T(zT(r))}return $T(Dh(e.files).map(n=>Ni(n)))})}function $T(e){return e.filter(t=>eR.indexOf(t.name)===-1)}function Dh(e){if(e===null)return[];const t=[];for(let n=0;n<e.length;n++){const r=e[n];t.push(r)}return t}function aR(e){if(typeof e.webkitGetAsEntry!="function")return jT(e);const t=e.webkitGetAsEntry();return t&&t.isDirectory?BT(t):jT(e,t)}function zT(e){return e.reduce((t,n)=>[...t,...Array.isArray(n)?zT(n):[n]],[])}function jT(e,t){return Po(this,void 0,void 0,function*(){var n;if(globalThis.isSecureContext&&typeof e.getAsFileSystemHandle=="function"){const i=yield e.getAsFileSystemHandle();if(i===null)throw new Error(`${e} is not a File`);if(i!==void 0){const s=yield i.getFile();return s.handle=i,Ni(s)}}const r=e.getAsFile();if(!r)throw new Error(`${e} is not a File`);return Ni(r,(n=t?.fullPath)!==null&&n!==void 0?n:void 0)})}function lR(e){return Po(this,void 0,void 0,function*(){return e.isDirectory?BT(e):cR(e)})}function BT(e){const t=e.createReader();return new Promise((n,r)=>{const o=[];function i(){t.readEntries(s=>Po(this,void 0,void 0,function*(){if(s.length){const a=Promise.all(s.map(lR));o.push(a),i()}else try{const a=yield Promise.all(o);n(a)}catch(a){r(a)}}),s=>{r(s)})}i()})}function cR(e){return Po(this,void 0,void 0,function*(){return new Promise((t,n)=>{e.file(r=>{const o=Ni(r,e.fullPath);t(o)},r=>{n(r)})})})}var bc={},RT;function uR(){return RT||(RT=1,bc.__esModule=!0,bc.default=function(e,t){if(e&&t){var n=Array.isArray(t)?t:t.split(",");if(n.length===0)return!0;var r=e.name||"",o=(e.type||"").toLowerCase(),i=o.replace(/\/.*$/,"");return n.some(function(s){var a=s.trim().toLowerCase();return a.charAt(0)==="."?r.toLowerCase().endsWith(a):a.endsWith("/*")?i===a.replace(/\/.*$/,""):o===a})}return!0}),bc}var dR=uR();const Nh=Tm(dR);function HT(e){return hR(e)||pR(e)||GT(e)||fR()}function fR(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
18
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function pR(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function hR(e){if(Array.isArray(e))return Mh(e)}function WT(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function qT(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?WT(Object(n),!0).forEach(function(r){UT(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):WT(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function UT(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Js(e,t){return yR(e)||gR(e,t)||GT(e,t)||mR()}function mR(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
19
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function GT(e,t){if(e){if(typeof e=="string")return Mh(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Mh(e,t)}}function Mh(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function gR(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],o=!0,i=!1,s,a;try{for(n=n.call(e);!(o=(s=n.next()).done)&&(r.push(s.value),!(t&&r.length===t));o=!0);}catch(l){i=!0,a=l}finally{try{!o&&n.return!=null&&n.return()}finally{if(i)throw a}}return r}}function yR(e){if(Array.isArray(e))return e}var vR=typeof Nh=="function"?Nh:Nh.default,bR="file-invalid-type",xR="file-too-large",wR="file-too-small",SR="too-many-files",TR=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",n=t.split(","),r=n.length>1?"one of ".concat(n.join(", ")):n[0];return{code:bR,message:"File type must be ".concat(r)}},YT=function(t){return{code:xR,message:"File is larger than ".concat(t," ").concat(t===1?"byte":"bytes")}},KT=function(t){return{code:wR,message:"File is smaller than ".concat(t," ").concat(t===1?"byte":"bytes")}},ER={code:SR,message:"Too many files"};function CR(e){return e.type===""&&typeof e.getAsFile=="function"}function ZT(e,t){var n=e.type==="application/x-moz-file"||vR(e,t)||CR(e);return[n,n?null:TR(t)]}function XT(e,t,n){if(Oo(e.size))if(Oo(t)&&Oo(n)){if(e.size>n)return[!1,YT(n)];if(e.size<t)return[!1,KT(t)]}else{if(Oo(t)&&e.size<t)return[!1,KT(t)];if(Oo(n)&&e.size>n)return[!1,YT(n)]}return[!0,null]}function Oo(e){return e!=null}function kR(e){var t=e.files,n=e.accept,r=e.minSize,o=e.maxSize,i=e.multiple,s=e.maxFiles,a=e.validator;return!i&&t.length>1||i&&s>=1&&t.length>s?!1:t.every(function(l){var c=ZT(l,n),u=Js(c,1),d=u[0],f=XT(l,r,o),h=Js(f,1),g=h[0],y=a?a(l):null;return d&&g&&!y})}function xc(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function ea(e){return e.dataTransfer?Array.prototype.some.call(e.dataTransfer.types,function(t){return t==="Files"||t==="application/x-moz-file"}):!!e.target&&!!e.target.files}function QT(e){e.preventDefault()}function IR(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function AR(e){return e.indexOf("Edge/")!==-1}function PR(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return IR(e)||AR(e)}function lr(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(r){for(var o=arguments.length,i=new Array(o>1?o-1:0),s=1;s<o;s++)i[s-1]=arguments[s];return t.some(function(a){return!xc(r)&&a&&a.apply(void 0,[r].concat(i)),xc(r)})}}function OR(){return"showOpenFilePicker"in window}function DR(e){if(Oo(e)){var t=Object.entries(e).filter(function(n){var r=Js(n,2),o=r[0],i=r[1],s=!0;return JT(o)||(console.warn('Skipped "'.concat(o,'" because it is not a valid MIME type. Check https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types for a list of valid MIME types.')),s=!1),(!Array.isArray(i)||!i.every(eE))&&(console.warn('Skipped "'.concat(o,'" because an invalid file extension was provided.')),s=!1),s}).reduce(function(n,r){var o=Js(r,2),i=o[0],s=o[1];return qT(qT({},n),{},UT({},i,s))},{});return[{description:"Files",accept:t}]}return e}function NR(e){if(Oo(e))return Object.entries(e).reduce(function(t,n){var r=Js(n,2),o=r[0],i=r[1];return[].concat(HT(t),[o],HT(i))},[]).filter(function(t){return JT(t)||eE(t)}).join(",")}function MR(e){return e instanceof DOMException&&(e.name==="AbortError"||e.code===e.ABORT_ERR)}function _R(e){return e instanceof DOMException&&(e.name==="SecurityError"||e.code===e.SECURITY_ERR)}function JT(e){return e==="audio/*"||e==="video/*"||e==="image/*"||e==="text/*"||e==="application/*"||/\w+\/[-+.\w]+/g.test(e)}function eE(e){return/^.*\.[\w]+$/.test(e)}var FR=["children"],LR=["open"],VR=["refKey","role","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"],$R=["refKey","onChange","onClick"];function tE(e){return BR(e)||jR(e)||nE(e)||zR()}function zR(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
20
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function jR(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function BR(e){if(Array.isArray(e))return Fh(e)}function _h(e,t){return WR(e)||HR(e,t)||nE(e,t)||RR()}function RR(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
21
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function nE(e,t){if(e){if(typeof e=="string")return Fh(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Fh(e,t)}}function Fh(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function HR(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],o=!0,i=!1,s,a;try{for(n=n.call(e);!(o=(s=n.next()).done)&&(r.push(s.value),!(t&&r.length===t));o=!0);}catch(l){i=!0,a=l}finally{try{!o&&n.return!=null&&n.return()}finally{if(i)throw a}}return r}}function WR(e){if(Array.isArray(e))return e}function rE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function Tt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?rE(Object(n),!0).forEach(function(r){Lh(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):rE(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Lh(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function wc(e,t){if(e==null)return{};var n=qR(e,t),r,o;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)r=i[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function qR(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,i;for(i=0;i<r.length;i++)o=r[i],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}var Vh=S.forwardRef(function(e,t){var n=e.children,r=wc(e,FR),o=iE(r),i=o.open,s=wc(o,LR);return S.useImperativeHandle(t,function(){return{open:i}},[i]),S.createElement(S.Fragment,null,n(Tt(Tt({},s),{},{open:i})))});Vh.displayName="Dropzone";var oE={disabled:!1,getFilesFromEvent:tR,maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!1,autoFocus:!1};Vh.defaultProps=oE,Vh.propTypes={children:yt.func,accept:yt.objectOf(yt.arrayOf(yt.string)),multiple:yt.bool,preventDropOnDocument:yt.bool,noClick:yt.bool,noKeyboard:yt.bool,noDrag:yt.bool,noDragEventsBubbling:yt.bool,minSize:yt.number,maxSize:yt.number,maxFiles:yt.number,disabled:yt.bool,getFilesFromEvent:yt.func,onFileDialogCancel:yt.func,onFileDialogOpen:yt.func,useFsAccessApi:yt.bool,autoFocus:yt.bool,onDragEnter:yt.func,onDragLeave:yt.func,onDragOver:yt.func,onDrop:yt.func,onDropAccepted:yt.func,onDropRejected:yt.func,onError:yt.func,validator:yt.func};var $h={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,isDragGlobal:!1,acceptedFiles:[],fileRejections:[]};function iE(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=Tt(Tt({},oE),e),n=t.accept,r=t.disabled,o=t.getFilesFromEvent,i=t.maxSize,s=t.minSize,a=t.multiple,l=t.maxFiles,c=t.onDragEnter,u=t.onDragLeave,d=t.onDragOver,f=t.onDrop,h=t.onDropAccepted,g=t.onDropRejected,y=t.onFileDialogCancel,m=t.onFileDialogOpen,v=t.useFsAccessApi,b=t.autoFocus,x=t.preventDropOnDocument,T=t.noClick,E=t.noKeyboard,I=t.noDrag,w=t.noDragEventsBubbling,C=t.onError,A=t.validator,O=S.useMemo(function(){return NR(n)},[n]),_=S.useMemo(function(){return DR(n)},[n]),N=S.useMemo(function(){return typeof m=="function"?m:sE},[m]),$=S.useMemo(function(){return typeof y=="function"?y:sE},[y]),D=S.useRef(null),F=S.useRef(null),z=S.useReducer(UR,$h),M=_h(z,2),k=M[0],V=M[1],L=k.isFocused,R=k.isFileDialogActive,U=S.useRef(typeof window<"u"&&window.isSecureContext&&v&&OR()),G=function(){!U.current&&R&&setTimeout(function(){if(F.current){var X=F.current.files;X.length||(V({type:"closeDialog"}),$())}},300)};S.useEffect(function(){return window.addEventListener("focus",G,!1),function(){window.removeEventListener("focus",G,!1)}},[F,R,$,U]);var H=S.useRef([]),ee=S.useRef([]),se=function(X){D.current&&D.current.contains(X.target)||(X.preventDefault(),H.current=[])};S.useEffect(function(){return x&&(document.addEventListener("dragover",QT,!1),document.addEventListener("drop",se,!1)),function(){x&&(document.removeEventListener("dragover",QT),document.removeEventListener("drop",se))}},[D,x]),S.useEffect(function(){var j=function(Me){ee.current=[].concat(tE(ee.current),[Me.target]),ea(Me)&&V({isDragGlobal:!0,type:"setDragGlobal"})},X=function(Me){ee.current=ee.current.filter(function(_e){return _e!==Me.target&&_e!==null}),!(ee.current.length>0)&&V({isDragGlobal:!1,type:"setDragGlobal"})},me=function(){ee.current=[],V({isDragGlobal:!1,type:"setDragGlobal"})},ve=function(){ee.current=[],V({isDragGlobal:!1,type:"setDragGlobal"})};return document.addEventListener("dragenter",j,!1),document.addEventListener("dragleave",X,!1),document.addEventListener("dragend",me,!1),document.addEventListener("drop",ve,!1),function(){document.removeEventListener("dragenter",j),document.removeEventListener("dragleave",X),document.removeEventListener("dragend",me),document.removeEventListener("drop",ve)}},[D]),S.useEffect(function(){return!r&&b&&D.current&&D.current.focus(),function(){}},[D,b,r]);var te=S.useCallback(function(j){C?C(j):console.error(j)},[C]),q=S.useCallback(function(j){j.preventDefault(),j.persist(),be(j),H.current=[].concat(tE(H.current),[j.target]),ea(j)&&Promise.resolve(o(j)).then(function(X){if(!(xc(j)&&!w)){var me=X.length,ve=me>0&&kR({files:X,accept:O,minSize:s,maxSize:i,multiple:a,maxFiles:l,validator:A}),Ce=me>0&&!ve;V({isDragAccept:ve,isDragReject:Ce,isDragActive:!0,type:"setDraggedFiles"}),c&&c(j)}}).catch(function(X){return te(X)})},[o,c,te,w,O,s,i,a,l,A]),Y=S.useCallback(function(j){j.preventDefault(),j.persist(),be(j);var X=ea(j);if(X&&j.dataTransfer)try{j.dataTransfer.dropEffect="copy"}catch{}return X&&d&&d(j),!1},[d,w]),Z=S.useCallback(function(j){j.preventDefault(),j.persist(),be(j);var X=H.current.filter(function(ve){return D.current&&D.current.contains(ve)}),me=X.indexOf(j.target);me!==-1&&X.splice(me,1),H.current=X,!(X.length>0)&&(V({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),ea(j)&&u&&u(j))},[D,u,w]),pe=S.useCallback(function(j,X){var me=[],ve=[];j.forEach(function(Ce){var Me=ZT(Ce,O),_e=_h(Me,2),ct=_e[0],_t=_e[1],Qt=XT(Ce,s,i),Re=_h(Qt,2),W=Re[0],K=Re[1],Oe=A?A(Ce):null;if(ct&&W&&!Oe)me.push(Ce);else{var Ue=[_t,K];Oe&&(Ue=Ue.concat(Oe)),ve.push({file:Ce,errors:Ue.filter(function(Ye){return Ye})})}}),(!a&&me.length>1||a&&l>=1&&me.length>l)&&(me.forEach(function(Ce){ve.push({file:Ce,errors:[ER]})}),me.splice(0)),V({acceptedFiles:me,fileRejections:ve,type:"setFiles"}),f&&f(me,ve,X),ve.length>0&&g&&g(ve,X),me.length>0&&h&&h(me,X)},[V,a,O,s,i,l,f,h,g,A]),B=S.useCallback(function(j){j.preventDefault(),j.persist(),be(j),H.current=[],ea(j)&&Promise.resolve(o(j)).then(function(X){xc(j)&&!w||pe(X,j)}).catch(function(X){return te(X)}),V({type:"reset"})},[o,pe,te,w]),ae=S.useCallback(function(){if(U.current){V({type:"openDialog"}),N();var j={multiple:a,types:_};window.showOpenFilePicker(j).then(function(X){return o(X)}).then(function(X){pe(X,null),V({type:"closeDialog"})}).catch(function(X){MR(X)?($(X),V({type:"closeDialog"})):_R(X)?(U.current=!1,F.current?(F.current.value=null,F.current.click()):te(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no <input> was provided."))):te(X)});return}F.current&&(V({type:"openDialog"}),N(),F.current.value=null,F.current.click())},[V,N,$,v,pe,te,_,a]),ce=S.useCallback(function(j){!D.current||!D.current.isEqualNode(j.target)||(j.key===" "||j.key==="Enter"||j.keyCode===32||j.keyCode===13)&&(j.preventDefault(),ae())},[D,ae]),Q=S.useCallback(function(){V({type:"focus"})},[]),ue=S.useCallback(function(){V({type:"blur"})},[]),oe=S.useCallback(function(){T||(PR()?setTimeout(ae,0):ae())},[T,ae]),he=function(X){return r?null:X},ie=function(X){return E?null:he(X)},le=function(X){return I?null:he(X)},be=function(X){w&&X.stopPropagation()},de=S.useMemo(function(){return function(){var j=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},X=j.refKey,me=X===void 0?"ref":X,ve=j.role,Ce=j.onKeyDown,Me=j.onFocus,_e=j.onBlur,ct=j.onClick,_t=j.onDragEnter,Qt=j.onDragOver,Re=j.onDragLeave,W=j.onDrop,K=wc(j,VR);return Tt(Tt(Lh({onKeyDown:ie(lr(Ce,ce)),onFocus:ie(lr(Me,Q)),onBlur:ie(lr(_e,ue)),onClick:he(lr(ct,oe)),onDragEnter:le(lr(_t,q)),onDragOver:le(lr(Qt,Y)),onDragLeave:le(lr(Re,Z)),onDrop:le(lr(W,B)),role:typeof ve=="string"&&ve!==""?ve:"presentation"},me,D),!r&&!E?{tabIndex:0}:{}),K)}},[D,ce,Q,ue,oe,q,Y,Z,B,E,I,r]),re=S.useCallback(function(j){j.stopPropagation()},[]),J=S.useMemo(function(){return function(){var j=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},X=j.refKey,me=X===void 0?"ref":X,ve=j.onChange,Ce=j.onClick,Me=wc(j,$R),_e=Lh({accept:O,multiple:a,type:"file",style:{border:0,clip:"rect(0, 0, 0, 0)",clipPath:"inset(50%)",height:"1px",margin:"0 -1px -1px 0",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap"},onChange:he(lr(ve,B)),onClick:he(lr(Ce,re)),tabIndex:-1},me,F);return Tt(Tt({},_e),Me)}},[F,n,a,B,r]);return Tt(Tt({},k),{},{isFocused:L&&!r,getRootProps:de,getInputProps:J,rootRef:D,inputRef:F,open:he(ae)})}function UR(e,t){switch(t.type){case"focus":return Tt(Tt({},e),{},{isFocused:!0});case"blur":return Tt(Tt({},e),{},{isFocused:!1});case"openDialog":return Tt(Tt({},$h),{},{isFileDialogActive:!0});case"closeDialog":return Tt(Tt({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return Tt(Tt({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return Tt(Tt({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections,isDragReject:!1});case"setDragGlobal":return Tt(Tt({},e),{},{isDragGlobal:t.isDragGlobal});case"reset":return Tt({},$h);default:return e}}function sE(){}const aE=S.createContext([null,()=>{}]),GR=()=>S.useContext(aE),YR=e=>e.type.startsWith("image/")?"img":e.type.startsWith("audio/")?"audio":e.type.startsWith("video/")?"video":e.type,KR={csv:ju,xls:ju,mov:iy,mp4:iy,xlsx:ju,pdf:oy,txt:oy,json:VI,mp3:MI},ZR=e=>{const[,t]=GR(),[n,r]=S.useState({url:"",type:"",size:""});S.useEffect(()=>{const l=e.file,c=URL.createObjectURL(l);return r({url:c,type:YR(l),size:HB(l.size)}),()=>URL.revokeObjectURL(c)},[e.file]);const o=l=>{l.stopPropagation(),l.preventDefault(),t({...n,file:e.file})},i=l=>{l.preventDefault(),l.stopPropagation(),e.onDeleteFile?.(e.file)},s=KR[e.file.name.split(".").at(-1)]??sy,a=n.type==="img"?p.jsx("img",{src:n.url,className:"w-full object-contain",alt:e.file.name}):p.jsx(s,{strokeWidth:2,absoluteStrokeWidth:!0,size:48});return p.jsxs("li",{className:"flex w-full flex-row justify-between gap-4 border-b border-card-border last:border-b-transparent",children:[p.jsxs("div",{className:"flex flex-col gap-4",children:[p.jsxs("div",{className:"flex flex-row items-center gap-4",children:[p.jsx("button",{type:"button",onClick:o,className:"m-2 flex size-16 max-w-16 items-center justify-center overflow-hidden",children:a}),p.jsxs("div",{className:"flex flex-col items-start justify-start text-left",children:[p.jsx("span",{children:e.file.name}),p.jsx("span",{className:"text-sm italic",children:n.size})]})]}),e.File?p.jsx("div",{className:"min-w-full flex-1",children:p.jsx(e.File,{file:e.file})}):null]}),p.jsx("div",{className:"align-start flex justify-start py-4 transition-colors duration-300 ease-linear hover:text-danger-hover",children:p.jsx("button",{onClick:i,type:"button",className:"flex size-6 items-center justify-center",children:p.jsx(jo,{size:16})})})]})},XR=e=>p.jsx("ul",{className:"w-full space-y-8",children:e.files.map(t=>p.jsx(ZR,{File:e.File,onDeleteFile:e.onDeleteFile,file:t},t.name))}),lE=e=>{const t=vt(),n=e.dragging?$I:zI;return p.jsxs("div",{className:"flex flex-col items-center justify-center",children:[p.jsx("div",{className:"flex flex-col items-center justify-center gap-2",children:p.jsx(n,{className:"text-primary",size:80})}),p.jsxs("div",{className:"my-4 flex flex-col items-center gap-1",children:[p.jsx("p",{children:t.uploadIdle}),p.jsx("button",{className:"text-primary underline",type:"button",children:t.uploadIdleButton})]})]})},QR=e=>e.isDragActive?p.jsx(lE,{files:e.files,dragging:!0}):e.files.length>0?p.jsx(XR,{File:e.File,onDeleteFile:e.onDeleteFile,files:e.files}):p.jsx(S.Fragment,{children:e.idle}),JR=p.jsx(lE,{dragging:!1}),eH=e=>{const t=e.item.file,n=e.item.type;return p.jsxs("div",{className:"flex flex-col gap-4",children:[p.jsx("p",{className:"text-lg font-medium",children:e.item.file.name}),p.jsx("p",{className:"text-base",children:e.item.size}),n==="img"?p.jsx("img",{className:"container inline-block w-full max-w-96",src:e.item.url,alt:t.name}):n==="video"?p.jsx("video",{className:"container block w-full max-w-96",src:e.item.url,controls:!0,muted:!0}):n==="audio"?p.jsx("figure",{children:p.jsx("audio",{controls:!0,src:e.item.url})}):null]})},tH=({idle:e=JR,onDeleteFile:t,File:n,onDrop:r,...o})=>{const i=vt(),s=S.useState(null),[a,l]=S.useState([]),c=o.files??a,u=()=>s[1](null),d=y=>{r?.(y),l(m=>m.concat(y))},{getRootProps:f,getInputProps:h,isDragActive:g}=iE({onDrop:d});return p.jsxs(aE.Provider,{value:s,children:[p.jsx(Ys,{overlayClickClose:!0,title:i.uploadDialogTitle,ariaTitle:i.uploadDialogTitle,open:s[0]!==null,onChange:u,children:s[0]?p.jsx(eH,{item:s[0]}):null}),p.jsxs("div",{...f(),"data-active":c?c.length>0:!1,className:"flex flex-col items-center justify-center rounded-lg border border-card-border p-6 text-foreground data-[active=true]:border-solid data-[active=false]:border-dashed data-[active=true]:border-transparent data-[active=true]:bg-card-background",children:[p.jsx("input",{...h(o),name:o.name,id:o.name}),p.jsx(QR,{File:n,onDeleteFile:t,isDragActive:g,idle:e,files:c})]})]})},cE=()=>window.matchMedia("@media (pointer: coarse)"),nH=()=>{const e=S.useRef(Mr()?null:cE()),[t,n]=S.useState(Mr()?!1:e.current?.matches??!1);return S.useEffect(()=>{(e.current===null?cE():e.current).addEventListener("change",o=>n(o.matches))},[]),t},uE=(e,t="overflow-hidden")=>{const n=S.useRef(null),r=nH(),o=S.useRef(Mr()?"":document.documentElement.style.overflowY);return S.useEffect(()=>{if(!(n.current===null&&!e)&&t!=="block-only"&&t==="overflow-hidden")if(e){if(o.current=document.documentElement.style.overflowY,document.documentElement.style.overflowY="hidden",r||Lv())return;document.documentElement.style.padding=zg(document.documentElement)?"0 15px 0 0":""}else document.documentElement.style.padding="",document.documentElement.style.overflowY=o.current},[e,r,t]),S.useEffect(()=>{if(!e)return;const i=new AbortController,s=document.documentElement,a=l=>{const c=n.current;if(c&&c.contains(l.target)){const u=c.getBoundingClientRect(),d=c.style.height?Number(mk(c.style.height)):null,f=He.number(d)?d:u.height,h=c.scrollHeight<=f;return f===c.scrollHeight?e?l.preventDefault():void 0:h?void 0:e?l.preventDefault():void 0}return l.currentTarget===document.documentElement,e?l.preventDefault():void 0};return s.addEventListener("wheel",a,{signal:i.signal,passive:!1}),s.addEventListener("scroll",a,{signal:i.signal,passive:!1}),()=>{i.abort()}},[e]),n},rH=(e,t)=>{e=String(e).toLocaleLowerCase(),t=String(t).toLocaleLowerCase();const n=t[0],r=e.split("").map((s,a)=>s===n?a:!1).filter(s=>s!==!1);if(r.length===0)return null;const o=[];if(r.forEach(s=>{let a=s+1;const l=[s];for(let c=1;c<t.length;c++){const u=t[c];if(a=e.indexOf(u,a),a===-1)return;l.push(a),a++}o.push(l)}),o.length===0)return null;const i=o.sort((s,a)=>{if(s.length===1)return s[0]-a[0];const l=s[s.length-1]-s[0],c=a[a.length-1]-a[0];return l-c})[0];return e===t?1:i.length>1?2+(i[i.length-1]-i[0]):2+i[0]},dE=(e,t,n)=>{const r=e.split(t).filter(Boolean);let o=n;for(const i of r){if(o==null)return o;o=o[i]}return o},fE={basic:/[,[\]]+?/,extend:/[,[\].]+?/},pE=(e,t)=>{const n=dE(t,fE.basic,e);return n!==void 0&&n!==e?n:dE(t,fE.extend,e)},hE=e=>e.replace(/[^0-9]/g,""),Sc=e=>e.normalize("NFD").replace(/[\u0300-\u036f]/g,""),mE=(e,t,n,r="FUZZY")=>r==="CONTAINS"?e.includes(t):r==="EQUAL"?e===t:r==="CONTAINS_NUMBERS"?hE(e).includes(hE(t)):r==="STARTS_WITH"?e.startsWith(t):r==="ENDS_WITH"?e.endsWith(t):r==="FUZZY"?rH(e,t)!==null:!1,oH=(e,t,n,r="FUZZY")=>Array.isArray(t)?t.some(o=>mE(e,o,n,r)):mE(e,t,n,r),zh=(e,t,n)=>{if(n.length===0)return e;const r=new Map,o=n.map(i=>({...i,value:He.array(i.value)?i.value.map(Sc):Sc(`${i.value}`)}));return e.forEach(i=>{const s=pE(i,t);o.forEach(a=>{const l=pE(i,a.key);if(!l)return;const c=Sc(`${a.value}`.toLocaleLowerCase()).trim(),u=Sc(`${l}`.toLocaleLowerCase()).trim();if(oH(u,c,a.score,a.match))return void r.set(s,i);He.function(a.ifNotMatch)&&a.ifNotMatch(c,u)&&r.set(s,i)})}),Array.from(r.values())},iH=e=>p.jsx(S.Fragment,{children:e.children}),sH={duration:200,open:{transform:"scaleY(1)",opacity:1},close:{transform:"scaleY(0)",opacity:0},initial:{transform:"scaleY(0)",opacity:.2}},aH=[],lH=S.forwardRef(function(t,n){return p.jsx(ze.ul,{...t,ref:n,className:"max-h-96 w-full overscroll-contain rounded-lg",children:p.jsx(gn,{children:t.children})})}),cH=S.forwardRef(function({item:t,context:n,...r},o){return p.jsx(ze.li,{...r,ref:o,className:"first:rounded-t-lg last:rounded-t-lg"})}),uH={List:lH,Item:cH},Mi=40,dH=S.forwardRef(({left:e,error:t,right:n,loading:r,options:o,container:i,rightLabel:s,interactive:a,emptyMessage:l,optionalText:c,labelClassName:u,feedback:d=null,hideLeft:f=!1,required:h=!1,dynamicOption:g=!1,...y},m)=>{const v=S.useRef(null),b=S.useRef(null),x=S.useRef(null),T=y.value??y.defaultValue??"",E=vt(),[I,w]=S.useState(()=>Math.min(320,Mi*o.length)),[C,A]=S.useState(!1),[O,_]=S.useState(""),[N,$]=S.useState(T),[D,F]=S.useState(()=>o.find(j=>j.value===T)?.label??T),[z,M]=S.useState(null),k=S.useRef(aH),V=uE(C,"block-only"),L=g&&O!==""?[{value:O,label:O,"data-dynamic":"true"},...o]:o,R=()=>qi.flushSync(()=>A(!0)),U=O?zh(L,"value",[{key:"value",value:O},{key:"label",value:O}]):L,G=()=>{A(!1),w(0)},H=U.filter(j=>j.hidden!==!0),ee=g?void 0:`^(${o.map(j=>`${Sd(j.value)}${j.label?"|"+Sd(j.label):""}`).join("|")})$`,{x:se,y:te,strategy:q,refs:Y,context:Z,placement:pe}=Kn({open:C,transform:!0,onOpenChange:A,placement:"bottom-start",whileElementsMounted:lo,middleware:[Go(4),Xy({allowedPlacements:["top-start","bottom-start"],alignment:"start"}),Zy({padding:10,elementContext:"reference",apply(j){const me=j.elements.floating.querySelector("ul")?.getBoundingClientRect().height||0,ve=Yi(Y.reference.current,window.innerHeight),Ce=Math.min(me<Mi?ve:me,ve,j.availableHeight),Me=H.length===0?Mi:Math.min(Ce,ve,me),_e=`${b.current?.getBoundingClientRect().width||ve}px`;Object.assign(j.elements.floating.style,{width:_e,maxWidth:_e,height:Me})}})]}),B=Av(Z,sH),{getReferenceProps:ae,getFloatingProps:ce,getItemProps:Q}=Zn([yr(Z,{role:"listbox"}),Nr(Z),ol(Z,{cols:0,listRef:k,loop:!0,virtual:!0,allowEscape:!0,activeIndex:z,selectedIndex:z,focusItemOnOpen:"auto",openOnArrowKeyDown:!0,scrollItemIntoView:!0})]);S.useEffect(()=>{if(y.value){const j=o.find(X=>X.value===y.value);j&&(F(j.label??j.value),$(y.value))}},[y.value,o.length]),S.useEffect(()=>{if(!C)return w(0);const j=Y.reference;if(j.current===null)return;const X=Yi(j.current,window.innerHeight);setTimeout(()=>w(Math.min(X,H.length*Mi)),100)},[O,C,Y.reference,H.length]),S.useEffect(()=>{const j=Y.reference.current;if(j)return Gi(j)},[]);const ue=(j,X)=>{$(j.value);const me=Y.reference.current;if(!me)return;me?.setAttribute("data-value",j.value),me.value=j.value;const ve=new Event("change",{bubbles:!1,cancelable:!0});me.dispatchEvent(ve),y.onChange&&y.onChange(ve),F(j.label??""),G(),_(""),M(X)},oe=j=>{const X=j.target.value;return _(X),!C&&X===""?A(!0):(j.target.name=y.name||"",X?A(!0):y.onChange?.(j))},he=()=>{R(),_(""),Y.reference.current?.focus()},ie=()=>{M(j=>j===null?0:j),R(),_("")},le=()=>{Y.reference.current?.setAttribute("data-value",""),_(""),$(""),F(""),$g(Y.reference.current),G()},be=y.id||y.name,de=`${be}-shadow`,re=H.length===0,J=pe==="top"||pe==="top-start";return p.jsxs(as,{...y,left:e,error:t,ref:b,form:y.form,loading:r,name:y.name,feedback:C&&J?y.title:d,hideLeft:f,required:h,title:y.title,container:i,rightLabel:s,interactive:a,id:de,optionalText:c,componentName:"autocomplete",labelClassName:u,placeholder:y.placeholder,right:p.jsxs("span",{className:"flex items-center gap-0.5",children:[n,p.jsxs("button",{type:"button",className:"p-2 transition-colors link:text-primary md:p-1",onClick:he,children:[p.jsx(Lu,{size:20}),p.jsx("span",{className:"sr-only",children:E.inputCaretDown})]}),N?p.jsx("button",{type:"button",onClick:le,className:"p-2 transition-colors link:text-danger md:p-1",children:p.jsx("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:p.jsx("path",{d:"M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})})}):null]}),children:[p.jsx("input",{"data-shadow":"true",...ae({...y,onFocus:ie,pattern:ee,onChange:oe,id:de,name:de,ref:Y.setReference,onClick:j=>j.currentTarget.focus(),onKeyDown(j){if(j.key==="Escape")return j.currentTarget.blur(),G();if(C){if(j.key==="ArrowDown"){let X=He.number(z)?z+1:0;return X>H.length-1&&(X=0),x.current?.scrollIntoView({index:X}),M(X)}if(j.key==="ArrowUp"){let X=He.number(z)?z-1:H.length-1;return X<0&&(X=H.length-1),x.current?.scrollIntoView({index:X}),M(X)}if(j.key==="Enter"){if(z!==null&&H[z])return j.preventDefault(),ue(H[z],z);if(H.length===1)return j.preventDefault(),ue(H[0],0)}}}}),"data-value":N,"data-error":!!t,"data-name":be,"data-target":be,required:h,value:C?O:o.length===0?"":D||N,"aria-autocomplete":"list",autoComplete:"off",className:Pe("input placeholder-input-mask group h-input-height w-full flex-1","rounded-md bg-transparent px-input-x py-input-y text-foreground","outline-none transition-colors focus:ring-2 focus:ring-inset focus:ring-primary","group-error:text-danger group-error:placeholder-input-mask-error","text-base group-focus-within:border-primary group-hover:border-primary",y.className)}),p.jsx("input",{id:be,name:be,type:"hidden","data-origin":be,ref:m,required:h,defaultValue:y.value||N||void 0}),p.jsx(gr,{preserveTabOrder:!0,children:C?p.jsx(fo,{modal:!0,guards:!0,returnFocus:!1,context:Z,initialFocus:-1,visuallyHiddenDismiss:!0,children:p.jsxs(ze.div,{...ce({ref:fr(V,Y.setFloating),style:{...B.styles,left:se,top:te??0,position:q,height:"auto"}}),initial:!1,"data-floating":"true",animate:{height:re?"auto":I},className:Pe("shadow-floating isolate z-floating m-0 max-h-80 origin-[top_center] list-none overscroll-contain rounded-b-lg rounded-t-lg border border-floating-border bg-floating-background p-0 text-foreground ease-in-out",J?"origin-[bottom_center]":"origin-[top_center]"),onAnimationComplete:()=>{if(!C)return w(0);const X=Y.floating.current.querySelectorAll("li").item(0),me=(X?X.getBoundingClientRect().height:Mi)*H.length;return qi.flushSync(()=>w(me+2))},children:[re?p.jsx("div",{role:"option",className:"w-full border-b border-tooltip-border",children:p.jsx("span",{className:"flex w-full justify-between p-2 text-left text-disabled",children:l||E.autocompleteEmpty})}):null,p.jsx(qp,{overscan:40,ref:x,hidden:re,data:H,style:{height:I},defaultItemHeight:Mi,components:uH,scrollerRef:j=>{v.current=j},className:"border-floating max-h-full overscroll-contain rounded-lg bg-floating-background p-0 text-foreground",itemContent:(j,X)=>{const me=X.Render??iH,ve=N===X.value||N===X.label,Ce=z===j,Me=X.label??X.value;return p.jsx("button",{"data-value":X.value,...Q({ref:_e=>{k.current[j]=_e},role:"option",type:"button","aria-checked":ve,"aria-current":ve,"aria-selected":ve,"aria-busy":X.disabled,onClick:()=>ue(X,j),className:`cursor-pointer min-h-10 hover:bg-floating-hover w-full p-2 text-left ${ve?"bg-primary-hover text-primary-foreground":""} ${Ce?"bg-floating-hover text-floating-foreground":""}`}),children:p.jsx(me,{...y,label:X.label,value:X.value,children:Me})})}})]})}):null})]})});class Bn extends Map{list=[];constructor(t){super(t),this.list=[],Array.isArray(t)&&(this.list=t),t instanceof Bn&&(this.list=Array.from(t.entries()))}set(t,n){return super.set(t,n),this.list=(this.list??[]).concat([[t,n]]),this}remove(t){return super.delete(t),this.list=Array.from(this.entries())??[],this}map(t){return this.list.map((n,r)=>t(n[1],r))}clone(t){const n=new Bn(this);return t?t(n):n}static from(t,n){return new Bn(t.map(r=>[n(r),r]))}static unique(t,n){return Array.from(Bn.from(t,n).values())}toArray(){return Array.from(this.values())}}const gE=40,fH=e=>p.jsx(S.Fragment,{children:e.children}),pH={duration:300,initial:{transform:"scaleY(0)",opacity:.2},open:{transform:"scaleY(1)",opacity:1},close:{transform:"scaleY(0)",opacity:0}},yE=[],hH=S.forwardRef(function(t,n){return p.jsx(ze.ul,{...t,role:"listbox",ref:n,className:"w-full rounded-b-lg border-b border-tooltip-border last:border-transparent",children:p.jsx(gn,{children:t.children})})}),mH=S.forwardRef(function({item:t,context:n,...r},o){return p.jsx(ze.li,{...r,ref:o,className:"last:rounded-t-lg"})}),gH={List:hH,Item:mH},yH=e=>{const t=vt(),n=S.useRef(null),r=S.Children.count(e.children),[o,i]=S.useState(!1);return S.useEffect(()=>{if(n.current===null)return;const s=n.current.parentElement.getBoundingClientRect(),l=Array.from(n.current.querySelectorAll("[data-component='tag']")).reduce((u,d)=>u+d.getBoundingClientRect().width,0);if(n.current.querySelectorAll("[data-multicounter]").length&&r<=3)return i(!1);if(l>s.width)return i(!0)},[r]),p.jsx("span",{ref:n,className:"flex flex-nowrap gap-x-2",children:o?p.jsxs(zo,{size:"small","data-multicounter":"true",children:[r," ",t.multiSelectSelectedLabel]}):e.children})},vH=S.forwardRef(({left:e,error:t,right:n,options:r,container:o,rightLabel:i,interactive:s,emptyMessage:a,optionalText:l,selectedLabel:c,labelClassName:u,feedback:d=null,hideLeft:f=!1,required:h=!1,dynamicOption:g=!1,onChangeOptions:y,...m},v)=>{const b=S.useMemo(()=>new Bn(r.map(re=>[re.value,re])),[r]),x=S.useRef(null),T=S.useRef(null),E=m.value??m.defaultValue??yE,I=vt(),[w,C]=S.useState(0),[A,O]=S.useState(!1),[_,N]=S.useState(""),[$,D]=S.useState(()=>{const re=new Bn;return E.forEach(J=>{const j=b.get(J);return j?re.set(J,j):void 0}),re}),F=S.useMemo(()=>Array.from($.keys()),[$]),[z,M]=S.useState(()=>{const re=new Set(E);return r.reduce((J,j)=>re.has(j.value)?[...J,j.label??j.value]:J,[])??E}),[k,V]=S.useState(null),L=S.useRef(yE),R=g&&_!==""?[{value:_,label:_,"data-dynamic":"true"},...r]:r,U=_.length===0?R:zh(R,"value",[{key:"value",value:_},{key:"label",value:_}]),G=uE(A,"block-only"),H=U.filter(re=>re.hidden!==!0),ee=H.length===0,{x:se,y:te,strategy:q,refs:Y,context:Z}=Kn({open:A,transform:!0,placement:"bottom-start",strategy:"absolute",onOpenChange:O,whileElementsMounted:lo,middleware:[Go(4),Zy({padding:10,elementContext:"reference",apply(re){const j=re.elements.floating.querySelector("ul")?.getBoundingClientRect().height||0,X=Yi(Y.reference.current,window.innerHeight),me=Math.min(j<gE?X:j,X,re.availableHeight),ve=H.length===0?gE:Math.min(me,X,j),Ce=`${x.current.getBoundingClientRect().width}px`;Object.assign(re.elements.floating.style,{width:Ce,maxWidth:Ce,height:ve})}})]}),pe=Av(Z,pH),{getReferenceProps:B,getFloatingProps:ae,getItemProps:ce}=Zn([yr(Z,{role:"listbox"}),Nr(Z),ol(Z,{cols:0,listRef:L,loop:!0,virtual:!0,allowEscape:!0,activeIndex:k,selectedIndex:k,focusItemOnOpen:"auto",openOnArrowKeyDown:!0,scrollItemIntoView:!0,onNavigate:re=>V(J=>re??J)})]);S.useEffect(()=>{if(!A)return C(0);const re=Y.reference;if(re.current===null)return;const J=Yi(re.current,window.innerHeight);setTimeout(()=>C(Math.min(J,H.length*40)),100)},[_,A,Y.reference]),S.useEffect(()=>{m.value&&D(new Bn(m.value.map(re=>[re,b.get(re)])))},[m.value,b]),S.useEffect(()=>{const re=Y.reference.current;if(re)return Gi(re)},[]);const Q=(re,J)=>{const j=$.clone(ve=>ve.has(re.value)?ve.remove(re.value):ve.set(re.value,re));D(j);const X=Y.reference.current;if(!X)return;const me=j.map(ve=>ve.value);X?.setAttribute("data-value",JSON.stringify(me)),y&&y(me),M(ve=>ve.concat(re.label??"")),N(""),V(J)},ue=re=>{const J=re.target.value;return N(J),!A&&J===""?O(!0):(re.target.name=m.name||"",J?O(!0):void 0)},oe=()=>{O(!0),N(""),Y.reference.current?.focus()},he=()=>{O(!0),N("")},ie=()=>{Y.reference.current?.setAttribute("data-value","[]"),N(""),O(!1),D(new Bn),y?.([])},le=m.id||m.name,be=$.map((re,J)=>p.jsx(zo,{size:"small",icon:p.jsx("button",{type:"button",className:"text-current hover:text-danger focus:text-danger",onClick:j=>{j.preventDefault(),j.stopPropagation(),Q(re,J)},children:p.jsx(jo,{size:14})}),children:re.label??re.value},`MultiSelect-${re.value}-x`)),de={height:ee?"0":$.size===0?w-49:w-86};return p.jsxs(as,{...m,left:e,error:t,ref:x,form:m.form,name:m.name,feedback:d,hideLeft:f,required:h,title:m.title,container:o,rightLabel:i,interactive:s,id:m.name||m.id,optionalText:l,componentName:"autocomplete",labelClassName:u,placeholder:m.placeholder,right:p.jsxs("span",{className:"flex items-center gap-0.5",children:[n,p.jsxs("button",{type:"button",className:"transition-colors link:text-primary",onClick:oe,children:[p.jsx(Lu,{size:20}),p.jsx("span",{className:"sr-only",children:I.inputCaretDown})]}),$?p.jsx("button",{type:"button",onClick:ie,className:"transition-colors link:text-danger",children:p.jsx("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:p.jsx("path",{d:"M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})})}):null]}),children:[p.jsxs("ul",{...B({...m,onFocus:he,id:`${le}-shadow`,name:`${le}-shadow`,ref:Y.setReference}),tabIndex:0,role:"button","data-name":le,"data-target":le,"data-shadow":"true","data-error":!!t,"aria-autocomplete":"list","data-value":F.join(","),className:Pe("input placeholder-input-mask group h-input-height w-full text-base","rounded-md bg-transparent px-input-x py-input-y text-foreground","outline-none transition-colors focus:ring-2 focus:ring-inset focus:ring-primary","group-error:text-danger group-error:placeholder-input-mask-error","group-focus-within:border-primary group-hover:border-primary","flex flex-row items-center gap-2 whitespace-nowrap text-left","max-w-full overflow-x-auto truncate overflow-ellipsis",m.className),children:[F.length>0?null:p.jsx("li",{className:"text-input-placeholder",children:m.placeholder}),p.jsx(yH,{label:c,children:be})]}),p.jsx("input",{id:le,name:le,type:"hidden","data-origin":le,ref:v,required:h,defaultValue:m.value||F||void 0}),p.jsx(gr,{preserveTabOrder:!0,children:A?p.jsx(yd,{lockScroll:!0,children:p.jsx(fo,{modal:!0,guards:!0,returnFocus:!1,context:Z,initialFocus:-1,visuallyHiddenDismiss:!0,children:p.jsxs("div",{...ae({ref:Y.setFloating,style:{...pe.styles,top:te??0,position:q,left:se,height:w-(F.length===0?65:30)}}),"data-floating":"true",className:"shadow-floating isolate z-floating m-0 max-h-96 w-full origin-[top_center] list-none overscroll-contain rounded-b-lg rounded-t-lg border border-floating-border bg-floating-background p-0 text-foreground",children:[p.jsx("input",{autoFocus:!0,value:_,onChange:ue,title:m.title,placeholder:I.multiSelectInnerPlaceholder,className:"input placeholder-input-mask group mb-1 h-10 w-full flex-1 rounded border-b border-input-border bg-transparent px-input-x py-input-y outline-none transition-colors focus:ring-2 focus:ring-inset focus:ring-primary",onKeyDown:re=>{if(re.key==="ArrowDown"){let J=k+1;return J>H.length-1&&(J=0),T.current?.scrollIntoView({index:J}),V(J)}if(re.key==="ArrowUp"){let J=k-1;return J<0&&(J=H.length-1),T.current?.scrollIntoView({index:J}),V(J)}if(re.key==="Escape")return re.currentTarget.blur(),O(!1);if(re.key==="Enter"){if(k!==null&&H[k])return re.preventDefault(),Q(H[k],k);if(H.length===1)return re.preventDefault(),Q(H[0],0)}}}),ee?p.jsx("li",{role:"option",className:"w-full border-b border-tooltip-border last:border-transparent",children:p.jsx("span",{className:"flex w-full justify-between p-2 text-left text-disabled",children:a||I.autocompleteEmpty})}):null,ee?null:p.jsx(ze.div,{initial:!1,"data-floating":"true",ref:G,animate:{height:ee?"auto":w},style:de,className:"max-h-72 w-full overscroll-contain",onAnimationComplete:()=>{if(!A)return C(0);const J=Y.floating.current.querySelectorAll("li").item(0),j=(J?J.getBoundingClientRect().height:40)*H.length;return qi.flushSync(()=>C(j+2))},children:p.jsx(qp,{ref:T,hidden:ee,data:H,components:gH,style:de,className:"max-h-72 border-floating-border bg-floating-background p-0 text-foreground",itemContent:(re,J)=>{const j=J.Render??fH,X=$.has(J.value)||$.has(J.label??""),me=k===re,ve=J.label??J.value;return p.jsxs("button",{"data-value":J.value,...ce({ref:Ce=>{L.current[re]=Ce},role:"option",type:"button","aria-checked":X,"aria-current":X,"aria-selected":X,"aria-busy":J.disabled,onClick:()=>Q(J,re)}),className:`flex w-full max-w-full cursor-pointer items-center justify-start p-2 text-left hover:bg-floating-hover focus:bg-floating-hover ${X||me?"bg-floating-hover text-floating-foreground":""}`,children:[p.jsx(sh,{onChange:Qo,checked:X,"aria-checked":X,onClick:Ce=>{Ce.stopPropagation(),Q(J,re)}}),p.jsx(j,{...m,label:J.label,value:J.value,children:ve})]})}})}),p.jsx("div",{className:"sticky bottom-0 flex w-full flex-nowrap items-center gap-2 overflow-x-auto rounded-b-lg bg-floating-background p-2",children:$.size===0?p.jsx(zo,{theme:"muted",size:"small",children:I.autocompleteEmpty}):be})]})})}):null})]})}),bH=e=>{const[t,n]=S.useState(0);return S.useEffect(()=>{const r=e.current;if(!r)return;const o=r.parentElement;if(!o)return;const i=()=>{n(o.clientHeight)};return o.addEventListener("resize",i),i(),()=>{o.removeEventListener("resize",i)}},[]),t},xH={Item:S.forwardRef(function(t,n){return p.jsx("li",{...t,ref:n,className:"flex items-center justify-between gap-1"})}),List:S.forwardRef(function(t,n){return p.jsx("ul",{...t,ref:n,className:"space-y-3"})})},wH=e=>{const t=S.useRef(null),n=bH(t);return p.jsxs("div",{className:"flex flex-row gap-4",ref:t,children:[p.jsxs("div",{className:"flex w-fit min-w-64 flex-col space-y-4 whitespace-nowrap rounded-lg border border-card-border py-8",children:[p.jsx("header",{className:"border-b border-card-border pb-2"}),p.jsxs("div",{className:"space-y-2 px-8",children:[p.jsx(Jo,{rightLabel:"",title:"Search",placeholder:"Looking for..."}),p.jsx(qp,{height:n,useWindowScroll:!0,data:e.source,components:xH,itemContent:(r,o)=>p.jsx(S.Fragment,{children:p.jsx(sh,{children:p.jsx(e.Item,{data:o})})})})]})]}),p.jsx("div",{children:p.jsx(Jt,{children:p.jsx(Ta,{})})}),p.jsx("div",{})]})};function SH(e){const t=e.getBoundingClientRect();return t.top>=0&&t.left>=0&&t.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&t.right<=(window.innerWidth||document.documentElement.clientWidth)}const TH=({children:e,...t})=>{const n=Lr(t.onIntersection),r=S.useRef(null),[o,i]=S.useState(()=>r.current===null?!1:SH(r.current));return S.useLayoutEffect(()=>{const s=r.current;if(s===null)return;const a=new IntersectionObserver(l=>{const c=l[0];return c.isIntersecting&&n.current?.(),i(u=>c.isIntersecting?!0:u)});return a.observe(s),()=>a.disconnect()},[]),p.jsx("div",{...t,ref:r,children:o?e:null})},Tc=P.createContext(void 0);process.env.NODE_ENV!=="production"&&(Tc.displayName="ToastContext");function jh(){const e=P.useContext(Tc);if(!e)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: useToastManager must be used within <Toast.Provider>.":Nn(73));return e}var EH=(e,t,n)=>{if(t.length===1&&t[0]===n){let r=!1;try{const o={};e(o)===o&&(r=!0)}catch{}if(r){let o;try{throw new Error}catch(i){({stack:o}=i)}console.warn(`The result function returned its own inputs without modification. e.g
22
+ \`createSelector([state => state.todos], todos => todos)\`
23
+ This could lead to inefficient memoization and unnecessary re-renders.
24
+ Ensure transformation logic is in the result function, and extraction logic is in the input selectors.`,{stack:o})}}},CH=(e,t,n)=>{const{memoize:r,memoizeOptions:o}=t,{inputSelectorResults:i,inputSelectorResultsCopy:s}=e,a=r(()=>({}),...o);if(!(a.apply(null,i)===a.apply(null,s))){let c;try{throw new Error}catch(u){({stack:c}=u)}console.warn(`An input selector returned a different result when passed same arguments.
25
+ This means your output selector will likely run more frequently than intended.
26
+ Avoid returning a new reference inside your input selector, e.g.
27
+ \`createSelector([state => state.todos.map(todo => todo.id)], todoIds => todoIds.length)\``,{arguments:n,firstInputs:i,secondInputs:s,stack:c})}},kH={inputStabilityCheck:"once",identityFunctionCheck:"once"},Ec=Symbol("NOT_FOUND");function IH(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function AH(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function PH(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(n=>typeof n=="function")){const n=e.map(r=>typeof r=="function"?`function ${r.name||"unnamed"}()`:typeof r).join(", ");throw new TypeError(`${t}[${n}]`)}}var vE=e=>Array.isArray(e)?e:[e];function OH(e){const t=Array.isArray(e[0])?e[0]:e;return PH(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function bE(e,t){const n=[],{length:r}=e;for(let o=0;o<r;o++)n.push(e[o].apply(null,t));return n}var DH=(e,t)=>{const{identityFunctionCheck:n,inputStabilityCheck:r}={...kH,...t};return{identityFunctionCheck:{shouldRun:n==="always"||n==="once"&&e,run:EH},inputStabilityCheck:{shouldRun:r==="always"||r==="once"&&e,run:CH}}};function NH(e){let t;return{get(n){return t&&e(t.key,n)?t.value:Ec},put(n,r){t={key:n,value:r}},getEntries(){return t?[t]:[]},clear(){t=void 0}}}function MH(e,t){let n=[];function r(a){const l=n.findIndex(c=>t(a,c.key));if(l>-1){const c=n[l];return l>0&&(n.splice(l,1),n.unshift(c)),c.value}return Ec}function o(a,l){r(a)===Ec&&(n.unshift({key:a,value:l}),n.length>e&&n.pop())}function i(){return n}function s(){n=[]}return{get:r,put:o,getEntries:i,clear:s}}var _H=(e,t)=>e===t;function FH(e){return function(n,r){if(n===null||r===null||n.length!==r.length)return!1;const{length:o}=n;for(let i=0;i<o;i++)if(!e(n[i],r[i]))return!1;return!0}}function LH(e,t){const n=typeof t=="object"?t:{equalityCheck:t},{equalityCheck:r=_H,maxSize:o=1,resultEqualityCheck:i}=n,s=FH(r);let a=0;const l=o<=1?NH(s):MH(o,s);function c(){let u=l.get(arguments);if(u===Ec){if(u=e.apply(null,arguments),a++,i){const f=l.getEntries().find(h=>i(h.value,u));f&&(u=f.value,a!==0&&a--)}l.put(arguments,u)}return u}return c.clearCache=()=>{l.clear(),c.resetResultsCount()},c.resultsCount=()=>a,c.resetResultsCount=()=>{a=0},c}var VH=class{constructor(e){this.value=e}deref(){return this.value}},$H=typeof WeakRef<"u"?WeakRef:VH,zH=0,xE=1;function Cc(){return{s:zH,v:void 0,o:null,p:null}}function wE(e,t={}){let n=Cc();const{resultEqualityCheck:r}=t;let o,i=0;function s(){let a=n;const{length:l}=arguments;for(let d=0,f=l;d<f;d++){const h=arguments[d];if(typeof h=="function"||typeof h=="object"&&h!==null){let g=a.o;g===null&&(a.o=g=new WeakMap);const y=g.get(h);y===void 0?(a=Cc(),g.set(h,a)):a=y}else{let g=a.p;g===null&&(a.p=g=new Map);const y=g.get(h);y===void 0?(a=Cc(),g.set(h,a)):a=y}}const c=a;let u;if(a.s===xE)u=a.v;else if(u=e.apply(null,arguments),i++,r){const d=o?.deref?.()??o;d!=null&&r(d,u)&&(u=d,i!==0&&i--),o=typeof u=="object"&&u!==null||typeof u=="function"?new $H(u):u}return c.s=xE,c.v=u,u}return s.clearCache=()=>{n=Cc(),s.resetResultsCount()},s.resultsCount=()=>i,s.resetResultsCount=()=>{i=0},s}function SE(e,...t){const n=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,r=(...o)=>{let i=0,s=0,a,l={},c=o.pop();typeof c=="object"&&(l=c,c=o.pop()),IH(c,`createSelector expects an output function after the inputs, but received: [${typeof c}]`);const u={...n,...l},{memoize:d,memoizeOptions:f=[],argsMemoize:h=wE,argsMemoizeOptions:g=[],devModeChecks:y={}}=u,m=vE(f),v=vE(g),b=OH(o),x=d(function(){return i++,c.apply(null,arguments)},...m);let T=!0;const E=h(function(){s++;const w=bE(b,arguments);if(a=x.apply(null,w),process.env.NODE_ENV!=="production"){const{identityFunctionCheck:C,inputStabilityCheck:A}=DH(T,y);if(C.shouldRun&&C.run(c,w,a),A.shouldRun){const O=bE(b,arguments);A.run({inputSelectorResults:w,inputSelectorResultsCopy:O},{memoize:d,memoizeOptions:m},arguments)}T&&(T=!1)}return a},...v);return Object.assign(E,{resultFunc:c,memoizedResultFunc:x,dependencies:b,dependencyRecomputations:()=>s,resetDependencyRecomputations:()=>{s=0},lastResult:()=>a,recomputations:()=>i,resetRecomputations:()=>{i=0},memoize:d,argsMemoize:h})};return Object.assign(r,{withTypes:()=>r}),r}var jH=SE(wE),BH=Object.assign((e,t=jH)=>{AH(e,`createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof e}`);const n=Object.keys(e),r=n.map(i=>e[i]);return t(r,(...i)=>i.reduce((s,a,l)=>(s[n[l]]=a,s),{}))},{withTypes:()=>BH});const RH=SE({memoize:LH,memoizeOptions:{maxSize:1,equalityCheck:Object.is}}),Rn=(e,t,n,r,o,i,...s)=>{if(s.length>0)throw new Error(process.env.NODE_ENV!=="production"?"Unsupported number of selectors":Nn(1));let a;if(e&&t)a=(l,c,u,d)=>{const f=e(l,c,u,d);return t(f,c,u,d)};else if(e)a=e;else throw new Error("Missing arguments");return a},HH=(...e)=>{const t=new WeakMap;let n=1;const r=e[e.length-1],o=e.length-1||1,i=r.length-o;if(i>3)throw new Error(process.env.NODE_ENV!=="production"?"Unsupported number of arguments":Nn(2));return(a,l,c,u)=>{let d=a.__cacheKey__;d||(d={id:n},a.__cacheKey__=d,n+=1);let f=t.get(d);if(!f){let h=e;const g=[void 0,void 0,void 0];switch(i){case 0:break;case 1:{h=[...e.slice(0,-1),()=>g[0],r];break}case 2:{h=[...e.slice(0,-1),()=>g[0],()=>g[1],r];break}case 3:{h=[...e.slice(0,-1),()=>g[0],()=>g[1],()=>g[2],r];break}default:throw new Error(process.env.NODE_ENV!=="production"?"Unsupported number of arguments":Nn(2))}f=RH(...h),f.selectorArgs=g,t.set(d,f)}switch(f.selectorArgs[0]=l,f.selectorArgs[1]=c,f.selectorArgs[2]=u,i){case 0:return f(a);case 1:return f(a,l);case 2:return f(a,l,c);case 3:return f(a,l,c,u);default:throw new Error("unreachable")}}},WH=Pd(19)?UH:GH;function TE(e,t,n,r,o){return WH(e,t,n,r,o)}function qH(e,t,n,r,o){const i=P.useCallback(()=>t(e.getSnapshot(),n,r,o),[e,t,n,r,o]);return bL.useSyncExternalStore(e.subscribe,i,i)}function UH(e,t,n,r,o){return qH(e,t,n,r,o)}function GH(e,t,n,r,o){return vL.useSyncExternalStoreWithSelector(e.subscribe,e.getSnapshot,e.getSnapshot,i=>t(i,n,r,o))}class YH{constructor(t){this.state=t,this.listeners=new Set,this.updateTick=0}subscribe=t=>(this.listeners.add(t),()=>{this.listeners.delete(t)});getSnapshot=()=>this.state;setState(t){if(this.state===t)return;this.state=t,this.updateTick+=1;const n=this.updateTick;for(const r of this.listeners){if(n!==this.updateTick)return;r(t)}}update(t){for(const n in t)if(!Object.is(this.state[n],t[n])){this.setState({...this.state,...t});return}}set(t,n){Object.is(this.state[t],n)||this.setState({...this.state,[t]:n})}notifyAll(){const t={...this.state};this.setState(t)}use(t,n,r,o){return TE(this,t,n,r,o)}}class KH extends YH{constructor(t,n={},r){super(t),this.context=n,this.selectors=r}useSyncedValue(t,n){P.useDebugValue(t),pt(()=>{this.state[t]!==n&&this.set(t,n)},[t,n])}useSyncedValueWithCleanup(t,n){const r=this;pt(()=>(r.state[t]!==n&&r.set(t,n),()=>{r.set(t,void 0)}),[r,t,n])}useSyncedValues(t){const n=this;if(process.env.NODE_ENV!=="production"){P.useDebugValue(t,s=>Object.keys(s));const o=P.useRef(Object.keys(t)).current,i=Object.keys(t);(o.length!==i.length||o.some((s,a)=>s!==i[a]))&&console.error("ReactStore.useSyncedValues expects the same prop keys on every render. Keys should be stable.")}const r=Object.values(t);pt(()=>{n.update(t)},[n,...r])}useControlledProp(t,n){P.useDebugValue(t);const r=n!==void 0;if(pt(()=>{r&&!Object.is(this.state[t],n)&&super.setState({...this.state,[t]:n})},[t,n,r]),process.env.NODE_ENV!=="production"){const o=this.controlledValues??=new Map;o.has(t)||o.set(t,r);const i=o.get(t);i!==void 0&&i!==r&&console.error(`A component is changing the ${r?"":"un"}controlled state of ${t.toString()} to be ${r?"un":""}controlled. Elements should not switch from uncontrolled to controlled (or vice versa).`)}}select(t,n,r,o){const i=this.selectors[t];return i(this.state,n,r,o)}useState(t,n,r,o){return P.useDebugValue(t),TE(this,this.selectors[t],n,r,o)}useContextCallback(t,n){P.useDebugValue(t);const r=ut(n??pn);this.context[t]=r}useStateSetter(t){const n=P.useRef(void 0);return n.current===void 0&&(n.current=r=>{this.set(t,r)}),n.current}observe(t,n){let r;typeof t=="function"?r=t:r=this.selectors[t];let o=r(this.state);return n(o,o,this),this.subscribe(i=>{const s=r(i);if(!Object.is(o,s)){const a=o;o=s,n(s,a,this)}})}}const ta=0;class na{static create(){return new na}currentId=ta;start(t,n){this.clear(),this.currentId=setTimeout(()=>{this.currentId=ta,n()},t)}isStarted(){return this.currentId!==ta}clear=()=>{this.currentId!==ta&&(clearTimeout(this.currentId),this.currentId=ta)};disposeEffect=()=>this.clear}function ZH(){const e=Xn(na.create).current;return ds(e.disposeEffect),e}let EE=0;function XH(e){return EE+=1,`${e}-${Math.random().toString(36).slice(2,6)}-${EE}`}function Bh(e,t){if(typeof e=="string")return{description:e};if(typeof e=="function"){const n=e(t);return typeof n=="string"?{description:n}:n}return e}const kc=HH(e=>e.toasts,e=>{const t=new Map;let n=0,r=0;return e.forEach((o,i)=>{const s=o.transitionStatus==="ending";t.set(o.id,{value:o,domIndex:i,visibleIndex:s?-1:n,offsetY:r}),r+=o.height||0,s||(n+=1)}),t}),wr={toasts:Rn(e=>e.toasts),isEmpty:Rn(e=>e.toasts.length===0),toast:Rn(kc,(e,t)=>e.get(t)?.value),toastIndex:Rn(kc,(e,t)=>e.get(t)?.domIndex??-1),toastOffsetY:Rn(kc,(e,t)=>e.get(t)?.offsetY??0),toastVisibleIndex:Rn(kc,(e,t)=>e.get(t)?.visibleIndex??-1),hovering:Rn(e=>e.hovering),focused:Rn(e=>e.focused),expanded:Rn(e=>e.hovering||e.focused),expandedOrOutOfFocus:Rn(e=>e.hovering||e.focused||!e.isWindowFocused),prevFocusElement:Rn(e=>e.prevFocusElement)};class QH extends KH{timers=new Map;areTimersPaused=!1;constructor(t){super(t,{},wr)}setFocused(t){this.set("focused",t)}setHovering(t){this.set("hovering",t)}setIsWindowFocused(t){this.set("isWindowFocused",t)}setPrevFocusElement(t){this.set("prevFocusElement",t)}setViewport=t=>{this.set("viewport",t)};disposeEffect=()=>()=>{this.timers.forEach(t=>{t.timeout?.clear()}),this.timers.clear()};removeToast(t){const n=wr.toastIndex(this.state,t);if(n===-1)return;this.state.toasts[n]?.onRemove?.();const o=[...this.state.toasts];o.splice(n,1),this.setToasts(o)}addToast=t=>{const{toasts:n,timeout:r,limit:o}=this.state,i=t.id||XH("toast"),s={...t,id:i,transitionStatus:"starting"},a=[s,...n],l=a.filter(u=>u.transitionStatus!=="ending");if(l.length>o){const u=l.length-o,d=l.slice(-u),f=new Set(d.map(h=>h.id));this.setToasts(a.map(h=>{const g=f.has(h.id);return h.limited!==g?{...h,limited:g}:h}))}else this.setToasts(a.map(u=>u.limited?{...u,limited:!1}:u));const c=s.timeout??r;return s.type!=="loading"&&c>0&&this.scheduleTimer(i,c,()=>this.closeToast(i)),wr.expandedOrOutOfFocus(this.state)&&this.pauseTimers(),i};updateToast=(t,n)=>{this.updateToastInternal(t,n)};updateToastInternal=(t,n)=>{const{timeout:r,toasts:o}=this.state,i=wr.toast(this.state,t)??null;if(!i||i.transitionStatus==="ending")return;const s={...i,...n};this.setToasts(o.map(g=>g.id===t?{...g,...n}:g));const a=s.timeout??r,l=i?.timeout??r,c=Object.hasOwn(n,"timeout"),u=s.transitionStatus!=="ending"&&s.type!=="loading"&&a>0,d=this.timers.has(t),f=l!==a,h=i?.type==="loading";if(!u&&d){this.timers.get(t)?.timeout?.clear(),this.timers.delete(t);return}if(u&&(!d||f||c||h)){const g=this.timers.get(t);g&&(g.timeout?.clear(),this.timers.delete(t)),this.scheduleTimer(t,a,()=>this.closeToast(t)),wr.expandedOrOutOfFocus(this.state)&&this.pauseTimers()}};closeToast=t=>{wr.toast(this.state,t)?.onClose?.();const{limit:r,toasts:o}=this.state;let i=0;const s=o.map(l=>{if(l.id===t)return{...l,transitionStatus:"ending",height:0};if(l.transitionStatus==="ending")return l;const c=i>=r;return i+=1,l.limited!==c?{...l,limited:c}:l}),a=this.timers.get(t);a&&a.timeout&&(a.timeout.clear(),this.timers.delete(t)),this.handleFocusManagement(t),this.setToasts(s)};promiseToast=(t,n)=>{const r=Bh(n.loading),o=this.addToast({...r,type:"loading"}),i=t.then(s=>{const a=Bh(n.success,s);return this.updateToast(o,{...a,type:"success",timeout:a.timeout}),s}).catch(s=>{const a=Bh(n.error,s);return this.updateToast(o,{...a,type:"error",timeout:a.timeout}),Promise.reject(s)});return{}.hasOwnProperty.call(n,"setPromise")&&n.setPromise(i),i};pauseTimers(){this.areTimersPaused||(this.areTimersPaused=!0,this.timers.forEach(t=>{if(t.timeout){t.timeout.clear();const n=Date.now()-t.start,r=t.delay-n;t.remaining=r>0?r:0}}))}resumeTimers(){this.areTimersPaused&&(this.areTimersPaused=!1,this.timers.forEach((t,n)=>{t.remaining=t.remaining>0?t.remaining:t.delay,t.timeout??=na.create(),t.timeout.start(t.remaining,()=>{this.timers.delete(n),t.callback()}),t.start=Date.now()}))}restoreFocusToPrevElement(){this.state.prevFocusElement?.focus({preventScroll:!0})}handleDocumentPointerDown=t=>{if(t.pointerType!=="touch")return;const n=Fd(t);_r(this.state.viewport,n)||(this.resumeTimers(),this.update({hovering:!1,focused:!1}))};scheduleTimer(t,n,r){const o=Date.now(),i=!wr.expandedOrOutOfFocus(this.state),s=i?na.create():void 0;s?.start(n,()=>{this.timers.delete(t),r()}),this.timers.set(t,{timeout:s,start:i?o:0,delay:n,remaining:n,callback:r})}setToasts(t){const n={toasts:t};t.length===0&&(n.hovering=!1,n.focused=!1),this.update(n)}handleFocusManagement(t){const n=ho(an(this.state.viewport));if(!this.state.viewport||!_r(this.state.viewport,n)||!Ld(n))return;const r=wr.toasts(this.state),o=wr.toastIndex(this.state,t);let i=null,s=o+1;for(;s<r.length;){if(r[s].transitionStatus!=="ending"){i=r[s];break}s+=1}if(!i)for(s=o-1;s>=0;){if(r[s].transitionStatus!=="ending"){i=r[s];break}s-=1}i?i.ref?.current?.focus():this.restoreFocusToPrevElement()}}const CE=function(t){const{children:n,timeout:r=5e3,limit:o=3,toastManager:i}=t,s=Xn(()=>new QH({timeout:r,limit:o,viewport:null,toasts:[],hovering:!1,focused:!1,isWindowFocused:!0,prevFocusElement:null})).current;return ds(s.disposeEffect),P.useEffect(function(){return i?i[" subscribe"](({action:c,options:u})=>{const d=u.id;c==="promise"&&u.promise?s.promiseToast(u.promise,u):c==="update"&&d?s.updateToast(d,u):c==="close"&&d?s.closeToast(d):s.addToast(u)}):void 0},[s,r,i]),s.useSyncedValues({timeout:r,limit:o}),p.jsx(Tc.Provider,{value:s,children:n})};process.env.NODE_ENV!=="production"&&(CE.displayName="ToastProvider");const _i=P.forwardRef(function(t,n){const[r,o]=P.useState();pt(()=>{YO&&o("button")},[]);const i={tabIndex:0,role:r};return p.jsx("span",{...t,ref:n,style:fl,"aria-hidden":r?void 0:!0,...i,"data-base-ui-focus-guard":""})});process.env.NODE_ENV!=="production"&&(_i.displayName="FocusGuard");let JH=(function(e){return e.frontmostHeight="--toast-frontmost-height",e})({});const kE=P.forwardRef(function(t,n){const{render:r,className:o,children:i,...s}=t,a=jh(),l=ZH(),c=P.useRef(!1),u=P.useRef(!1),d=a.useState("isEmpty"),f=a.useState("toasts"),h=a.useState("focused"),g=a.useState("expanded"),y=a.useState("prevFocusElement"),m=f[0]?.height??0,v=P.useMemo(()=>f.some(N=>N.transitionStatus==="ending"),[f]);P.useEffect(()=>{const N=a.state.viewport;if(!N)return;function $(F){d||F.key==="F6"&&F.target!==N&&(F.preventDefault(),a.setPrevFocusElement(ho(an(N))),N?.focus({preventScroll:!0}),a.pauseTimers(),a.setFocused(!0))}const D=Wt(N);return D.addEventListener("keydown",$),()=>{D.removeEventListener("keydown",$)}},[a,d]),P.useEffect(()=>{const N=a.state.viewport;if(!N||d)return;const $=Wt(N);function D(z){z.target===$&&(a.setIsWindowFocused(!1),a.pauseTimers())}function F(z){if(z.relatedTarget||z.target===$)return;const M=Fd(z),k=ho(an(N));(!_r(N,M)||!Ld(k))&&a.resumeTimers(),l.start(0,()=>a.setIsWindowFocused(!0))}return $.addEventListener("blur",D,!0),$.addEventListener("focus",F,!0),()=>{$.removeEventListener("blur",D,!0),$.removeEventListener("focus",F,!0)}},[a,l,d]),P.useEffect(()=>{const N=a.state.viewport;if(!N||d)return;const $=an(N);return $.addEventListener("pointerdown",a.handleDocumentPointerDown,!0),()=>{$.removeEventListener("pointerdown",a.handleDocumentPointerDown,!0)}},[d,a]);function b(N){const $=a.state.viewport;$&&(c.current=!0,N.relatedTarget===$?f[0]?.ref?.current?.focus():a.restoreFocusToPrevElement())}function x(N){N.key==="Tab"&&N.shiftKey&&N.target===a.state.viewport&&(N.preventDefault(),a.restoreFocusToPrevElement(),a.resumeTimers())}P.useEffect(()=>{!a.state.isWindowFocused||v||!u.current||(a.resumeTimers(),a.setHovering(!1),u.current=!1)},[v,a]);function T(){a.pauseTimers(),a.setHovering(!0),u.current=!1}function E(){v?u.current=!0:(a.resumeTimers(),a.setHovering(!1))}function I(){if(c.current){c.current=!1;return}h||Ld(an(a.state.viewport).activeElement)&&(a.setFocused(!0),a.pauseTimers())}function w(N){!h||_r(a.state.viewport,N.relatedTarget)||(a.setFocused(!1),a.resumeTimers())}const C={tabIndex:-1,role:"region","aria-live":"polite","aria-atomic":!1,"aria-relevant":"additions text","aria-label":"Notifications",onMouseEnter:T,onMouseMove:T,onMouseLeave:E,onFocus:I,onBlur:w,onKeyDown:x,onClick:I},A={expanded:g},O=ln("div",t,{ref:[n,a.setViewport],state:A,props:[C,{style:{[JH.frontmostHeight]:m?`${m}px`:void 0}},s,{children:p.jsxs(P.Fragment,{children:[!d&&y&&p.jsx(_i,{onFocus:b}),i,!d&&y&&p.jsx(_i,{onFocus:b})]})}]}),_=P.useMemo(()=>f.filter(N=>N.priority==="high"),[f]);return p.jsxs(P.Fragment,{children:[!d&&y&&p.jsx(_i,{onFocus:b}),O,!h&&_.length>0&&p.jsx("div",{style:fl,children:_.map(N=>p.jsxs("div",{role:"alert","aria-atomic":!0,children:[p.jsx("div",{children:N.title}),p.jsx("div",{children:N.description})]},N.id))})]})});process.env.NODE_ENV!=="production"&&(kE.displayName="ToastViewport");function eW(e){return Pd(19)?e:e?"true":void 0}const Rh=P.createContext(void 0);process.env.NODE_ENV!=="production"&&(Rh.displayName="ToastRootContext");function Ic(){const e=P.useContext(Rh);if(!e)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: ToastRootContext is missing. Toast parts must be used within <Toast.Root>.":Nn(66));return e}let Hh=(function(e){return e.startingStyle="data-starting-style",e.endingStyle="data-ending-style",e})({});const tW={[Hh.startingStyle]:""},nW={[Hh.endingStyle]:""},rW={transitionStatus(e){return e==="starting"?tW:e==="ending"?nW:null}};function oW(e){return e==null?e:"current"in e?e.current:e}function iW(e,t=!1,n=!0){const r=db();return ut((o,i=null)=>{r.cancel();function s(){ur.flushSync(o)}const a=oW(e);if(a==null)return;const l=a;if(typeof l.getAnimations!="function"||globalThis.BASE_UI_ANIMATIONS_DISABLED)o();else{let c=function(){const d=Hh.startingStyle;if(!l.hasAttribute(d)){r.request(u);return}const f=new MutationObserver(()=>{l.hasAttribute(d)||(f.disconnect(),u())});f.observe(l,{attributes:!0,attributeFilter:[d]}),i?.addEventListener("abort",()=>f.disconnect(),{once:!0})},u=function(){Promise.all(l.getAnimations().map(d=>d.finished)).then(()=>{i?.aborted||s()}).catch(()=>{const d=l.getAnimations();if(n){if(i?.aborted)return;s()}else d.length>0&&d.some(f=>f.pending||f.playState!=="finished")&&u()})};if(t){c();return}r.request(u)}})}function sW(e){const{enabled:t=!0,open:n,ref:r,onComplete:o}=e,i=ut(o),s=iW(r,n,!1);P.useEffect(()=>{if(!t)return;const a=new AbortController;return s(i,a.signal),()=>{a.abort()}},[t,n,i,s])}let Do=(function(e){return e.index="--toast-index",e.offsetY="--toast-offset-y",e.height="--toast-height",e.swipeMovementX="--toast-swipe-movement-x",e.swipeMovementY="--toast-swipe-movement-y",e})({});const aW={...rW,swipeDirection(e){return e?{"data-swipe-direction":e}:null}},ra=40,lW=10,Gr=.5,cW=1;function IE(e,t,n){switch(e){case"up":return-n;case"down":return n;case"left":return-t;case"right":return t;default:return 0}}function uW(e){const n=window.getComputedStyle(e).transform;let r=0,o=0,i=1;if(n&&n!=="none"){const s=n.match(/matrix(?:3d)?\(([^)]+)\)/);if(s){const a=s[1].split(", ").map(parseFloat);a.length===6?(r=a[4],o=a[5],i=Math.sqrt(a[0]*a[0]+a[1]*a[1])):a.length===16&&(r=a[12],o=a[13],i=a[0])}}return{x:r,y:o,scale:i}}const AE=P.forwardRef(function(t,n){const{toast:r,render:o,className:i,swipeDirection:s=["down","right"],...a}=t,l=r.positionerProps?.anchor!==void 0;let c=[];l||(c=Array.isArray(s)?s:[s]);const u=c.length>0,d=jh(),[f,h]=P.useState(void 0),[g,y]=P.useState(!1),[m,v]=P.useState(!1),[b,x]=P.useState(!1),[T,E]=P.useState({x:0,y:0}),[I,w]=P.useState({x:0,y:0,scale:1}),[C,A]=P.useState(),[O,_]=P.useState(),[N,$]=P.useState(null),D=P.useRef(null),F=P.useRef({x:0,y:0}),z=P.useRef({x:0,y:0,scale:1}),M=P.useRef(void 0),k=P.useRef(0),V=P.useRef(!1),L=P.useRef({x:0,y:0}),R=P.useRef(!1),U=d.useState("toastIndex",r.id),G=d.useState("toastVisibleIndex",r.id),H=d.useState("toastOffsetY",r.id),ee=d.useState("focused"),se=d.useState("expanded");sW({open:r.transitionStatus!=="ending",ref:D,onComplete(){r.transitionStatus==="ending"&&d.removeToast(r.id)}});const te=ut((ie=!1)=>{const le=D.current;if(!le)return;const be=le.style.height;le.style.height="auto";const de=le.offsetHeight;le.style.height=be;function re(){d.updateToastInternal(r.id,{ref:D,height:de,...r.transitionStatus==="starting"?{transitionStatus:void 0}:{}})}ie?ur.flushSync(re):re()});pt(te,[te]);function q(ie,le){let be=ie,de=le;return!c.includes("left")&&!c.includes("right")?be=ie>0?ie**Gr:-(Math.abs(ie)**Gr):(!c.includes("right")&&ie>0&&(be=ie**Gr),!c.includes("left")&&ie<0&&(be=-(Math.abs(ie)**Gr))),!c.includes("up")&&!c.includes("down")?de=le>0?le**Gr:-(Math.abs(le)**Gr):(!c.includes("down")&&le>0&&(de=le**Gr),!c.includes("up")&&le<0&&(de=-(Math.abs(le)**Gr))),{x:be,y:de}}function Y(ie){if(ie.button!==0)return;ie.pointerType==="touch"&&d.pauseTimers();const le=Fd(ie.nativeEvent);if(!(le&&le.closest('button,a,input,textarea,[role="button"],[data-swipe-ignore]'))){if(V.current=!1,M.current=void 0,k.current=0,F.current={x:ie.clientX,y:ie.clientY},L.current=F.current,D.current){const de=uW(D.current);z.current=de,w(de),E({x:de.x,y:de.y})}d.setHovering(!0),y(!0),v(!1),$(null),R.current=!0,D.current?.setPointerCapture(ie.pointerId)}}function Z(ie){if(!g)return;ie.preventDefault(),R.current&&(F.current={x:ie.clientX,y:ie.clientY},R.current=!1);const{clientY:le,clientX:be,movementX:de,movementY:re}=ie;(re<0&&le>L.current.y||re>0&&le<L.current.y)&&(L.current={x:L.current.x,y:le}),(de<0&&be>L.current.x||de>0&&be<L.current.x)&&(L.current={x:be,y:L.current.y});const J=be-F.current.x,j=le-F.current.y,X=le-L.current.y,me=be-L.current.x;if(!m&&Math.sqrt(J*J+j*j)>=cW&&(v(!0),N===null)){const _t=c.includes("left")||c.includes("right"),Qt=c.includes("up")||c.includes("down");if(_t&&Qt){const Re=Math.abs(J),W=Math.abs(j);$(Re>W?"horizontal":"vertical")}}let ve;if(!M.current)N==="vertical"?j>0?ve="down":j<0&&(ve="up"):N==="horizontal"?J>0?ve="right":J<0&&(ve="left"):Math.abs(J)>=Math.abs(j)?ve=J>0?"right":"left":ve=j>0?"down":"up",ve&&c.includes(ve)&&(M.current=ve,k.current=IE(ve,J,j),h(ve));else{const ct=M.current,_t=IE(ct,me,X);_t>ra?(V.current=!1,h(ct)):!(c.includes("left")&&c.includes("right"))&&!(c.includes("up")&&c.includes("down"))&&k.current-_t>=lW&&(V.current=!0)}const Ce=q(J,j);let Me=z.current.x,_e=z.current.y;N==="horizontal"?(c.includes("left")||c.includes("right"))&&(Me+=Ce.x):(N==="vertical"||(c.includes("left")||c.includes("right"))&&(Me+=Ce.x),(c.includes("up")||c.includes("down"))&&(_e+=Ce.y)),E({x:Me,y:_e})}function pe(ie){if(!g)return;if(y(!1),v(!1),$(null),D.current?.releasePointerCapture(ie.pointerId),V.current){E({x:I.x,y:I.y}),h(void 0);return}let le=!1;const be=T.x-I.x,de=T.y-I.y;let re;for(const J of c){switch(J){case"right":be>ra&&(le=!0,re="right");break;case"left":be<-ra&&(le=!0,re="left");break;case"down":de>ra&&(le=!0,re="down");break;case"up":de<-ra&&(le=!0,re="up");break}if(le)break}le?(h(re),x(!0),d.closeToast(r.id)):(E({x:I.x,y:I.y}),h(void 0))}function B(ie){if(ie.key==="Escape"){if(!D.current||!_r(D.current,ho(an(D.current))))return;d.closeToast(r.id)}}P.useEffect(()=>{if(!u)return;const ie=D.current;if(!ie)return;function le(be){_r(ie,be.target)&&be.preventDefault()}return ie.addEventListener("touchmove",le,{passive:!1}),()=>{ie.removeEventListener("touchmove",le)}},[u]);function ae(){if(!g&&T.x===I.x&&T.y===I.y&&!b)return{[Do.swipeMovementX]:"0px",[Do.swipeMovementY]:"0px"};const ie=T.x-I.x,le=T.y-I.y;return{transition:g?"none":void 0,transform:g?`translateX(${T.x}px) translateY(${T.y}px) scale(${I.scale})`:void 0,[Do.swipeMovementX]:`${ie}px`,[Do.swipeMovementY]:`${le}px`}}const ce=r.priority==="high",Q={role:ce?"alertdialog":"dialog",tabIndex:0,"aria-modal":!1,"aria-labelledby":C,"aria-describedby":O,"aria-hidden":ce&&!ee?!0:void 0,onPointerDown:u?Y:void 0,onPointerMove:u?Z:void 0,onPointerUp:u?pe:void 0,onKeyDown:B,inert:eW(r.limited),style:{...ae(),[Do.index]:r.transitionStatus==="ending"?U:G,[Do.offsetY]:`${H}px`,[Do.height]:r.height?`${r.height}px`:void 0}},ue=P.useMemo(()=>({rootRef:D,toast:r,titleId:C,setTitleId:A,descriptionId:O,setDescriptionId:_,swiping:g,swipeDirection:f,recalculateHeight:te,index:U,visibleIndex:G,expanded:se}),[r,C,O,g,f,te,U,G,se]),oe={transitionStatus:r.transitionStatus,expanded:se,limited:r.limited||!1,type:r.type,swiping:ue.swiping,swipeDirection:ue.swipeDirection},he=ln("div",t,{ref:[n,ue.rootRef],state:oe,stateAttributesMapping:aW,props:[Q,a]});return p.jsx(Rh.Provider,{value:ue,children:he})});process.env.NODE_ENV!=="production"&&(AE.displayName="ToastRoot");const PE=P.forwardRef(function(t,n){const{render:r,className:o,...i}=t,{visibleIndex:s,expanded:a,recalculateHeight:l}=Ic(),c=P.useRef(null);pt(()=>{const h=c.current;if(!h||(l(),typeof ResizeObserver!="function"||typeof MutationObserver!="function"))return;const g=new ResizeObserver(()=>l(!0)),y=new MutationObserver(()=>l(!0));return g.observe(h),y.observe(h,{childList:!0,subtree:!0,characterData:!0}),()=>{g.disconnect(),y.disconnect()}},[l]);const u=s>0;return ln("div",t,{ref:[n,c],state:{expanded:a,behind:u},props:i})});process.env.NODE_ENV!=="production"&&(PE.displayName="ToastContent");const OE=P.forwardRef(function(t,n){const{render:r,className:o,id:i,children:s,...a}=t,{toast:l,setDescriptionId:c}=Ic(),u=s??l.description,d=!!u,f=il(i);pt(()=>{if(d)return c(f),()=>{c(void 0)}},[d,f,c]);const h={type:l.type},g=ln("p",t,{ref:n,state:h,props:{...a,id:f,children:u}});return d?g:null});process.env.NODE_ENV!=="production"&&(OE.displayName="ToastDescription");const DE=P.forwardRef(function(t,n){const{render:r,className:o,id:i,children:s,...a}=t,{toast:l,setTitleId:c}=Ic(),u=s??l.title,d=!!u,f=il(i);pt(()=>{if(d)return c(f),()=>{c(void 0)}},[d,f,c]);const h={type:l.type},g=ln("h2",t,{ref:n,state:h,props:{...a,id:f,children:u}});return d?g:null});process.env.NODE_ENV!=="production"&&(DE.displayName="ToastTitle");let Wh;process.env.NODE_ENV!=="production"&&(Wh=new Set);function NE(...e){if(process.env.NODE_ENV!=="production"){const t=e.join(" ");Wh.has(t)||(Wh.add(t),console.error(`Base UI: ${t}`))}}const ME=P.createContext(void 0);process.env.NODE_ENV!=="production"&&(ME.displayName="CompositeRootContext");function dW(e=!1){const t=P.useContext(ME);if(t===void 0&&!e)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: CompositeRootContext is missing. Composite parts must be placed within <Composite.Root>.":Nn(16));return t}function fW(e){const{focusableWhenDisabled:t,disabled:n,composite:r=!1,tabIndex:o=0,isNativeButton:i}=e,s=r&&t!==!1,a=r&&t===!1;return{props:P.useMemo(()=>{const c={onKeyDown(u){n&&t&&u.key!=="Tab"&&u.preventDefault()}};return r||(c.tabIndex=o,!i&&n&&(c.tabIndex=t?o:-1)),(i&&(t||s)||!i&&n)&&(c["aria-disabled"]=n),i&&(!t||a)&&(c.disabled=n),c},[r,n,t,s,a,i,o])}}function pW(e={}){const{disabled:t=!1,focusableWhenDisabled:n,tabIndex:r=0,native:o=!0}=e,i=P.useRef(null),s=dW(!0)!==void 0,a=ut(()=>{const f=i.current;return!!(f?.tagName==="A"&&f?.href)}),{props:l}=fW({focusableWhenDisabled:n,disabled:t,composite:s,tabIndex:r,isNativeButton:o});process.env.NODE_ENV!=="production"&&P.useEffect(()=>{if(!i.current)return;const f=i.current.tagName==="BUTTON";if(o){if(!f){const h=Id.captureOwnerStack?.()||"";NE(`A component that acts as a button expected a native <button> because the \`nativeButton\` prop is true. Rendering a non-<button> removes native button semantics, which can impact forms and accessibility. Use a real <button> in the \`render\` prop, or set \`nativeButton\` to \`false\`.${h}`)}}else if(f){const h=Id.captureOwnerStack?.()||"";NE(`A component that acts as a button expected a non-<button> because the \`nativeButton\` prop is false. Rendering a <button> keeps native behavior while Base UI applies non-native attributes and handlers, which can add unintended extra attributes (such as \`role\` or \`aria-disabled\`). Use a non-<button> in the \`render\` prop, or set \`nativeButton\` to \`true\`.${h}`)}},[o]);const c=P.useCallback(()=>{const f=i.current;hW(f)&&s&&t&&l.disabled===void 0&&f.disabled&&(f.disabled=!1)},[t,l.disabled,s]);pt(c,[c]);const u=P.useCallback((f={})=>{const{onClick:h,onMouseDown:g,onKeyUp:y,onKeyDown:m,onPointerDown:v,...b}=f;return Dd({type:o?"button":void 0,onClick(T){if(t){T.preventDefault();return}h?.(T)},onMouseDown(T){t||g?.(T)},onKeyDown(T){if(t||(Md(T),m?.(T)),T.baseUIHandlerPrevented)return;const E=T.target===T.currentTarget&&!o&&!a()&&!t,I=T.key==="Enter",w=T.key===" ";E&&((w||I)&&T.preventDefault(),I&&h?.(T))},onKeyUp(T){t||(Md(T),y?.(T)),!T.baseUIHandlerPrevented&&T.target===T.currentTarget&&!o&&!t&&T.key===" "&&h?.(T)},onPointerDown(T){if(t){T.preventDefault();return}v?.(T)}},o?void 0:{role:"button"},l,b)},[t,l,o,a]),d=ut(f=>{i.current=f,c()});return{getButtonProps:u,buttonRef:d}}function hW(e){return Pt(e)&&e.tagName==="BUTTON"}const _E=P.forwardRef(function(t,n){const{render:r,className:o,disabled:i,nativeButton:s=!0,...a}=t,l=jh(),{toast:c}=Ic(),u=l.useState("expanded"),[d,f]=P.useState(!1),{getButtonProps:h,buttonRef:g}=pW({disabled:i,native:s}),y={type:c.type};return ln("button",t,{ref:[n,g],state:y,props:[{"aria-hidden":!u&&!d,onClick(){l.closeToast(c.id)},onFocus(){f(!0)},onBlur(){f(!1)}},a,h]})});process.env.NODE_ENV!=="production"&&(_E.displayName="ToastClose");function mW(e){return`data-base-ui-${e}`}const qh=P.createContext(null);process.env.NODE_ENV!=="production"&&(qh.displayName="PortalContext");const gW=()=>P.useContext(qh),yW=mW("portal");function FE(e={}){const{ref:t,container:n,componentProps:r=Dn,elementProps:o}=e,i=il(),a=gW()?.portalNode,[l,c]=P.useState(null),[u,d]=P.useState(null),f=ut(m=>{m!==null&&d(m)}),h=P.useRef(null);pt(()=>{if(n===null){h.current&&(h.current=null,d(null),c(null));return}if(i==null)return;const m=(n&&(Oa(n)?n:n.current))??a??document.body;if(m==null){h.current&&(h.current=null,d(null),c(null));return}h.current!==m&&(h.current=m,d(null),c(m))},[n,a,i]);const g=ln("div",r,{ref:[t,f],props:[{id:i,[yW]:""},o]});return{portalNode:u,portalSubtree:l&&g?ur.createPortal(g,l):null}}const vW=P.forwardRef(function(t,n){const{children:r,container:o,className:i,render:s,renderGuards:a,...l}=t,{portalNode:c,portalSubtree:u}=FE({container:o,ref:n,componentProps:t,elementProps:l}),d=P.useRef(null),f=P.useRef(null),h=P.useRef(null),g=P.useRef(null),[y,m]=P.useState(null),v=y?.modal,b=y?.open,x=typeof a=="boolean"?a:!!y&&!y.modal&&y.open&&!!c;P.useEffect(()=>{if(!c||v)return;function E(I){c&&I.relatedTarget&&Vd(I)&&(I.type==="focusin"?Qv:tD)(c)}return c.addEventListener("focusin",E,!0),c.addEventListener("focusout",E,!0),()=>{c.removeEventListener("focusin",E,!0),c.removeEventListener("focusout",E,!0)}},[c,v]),P.useEffect(()=>{!c||b||Qv(c)},[b,c]);const T=P.useMemo(()=>({beforeOutsideRef:d,afterOutsideRef:f,beforeInsideRef:h,afterInsideRef:g,portalNode:c,setFocusManagerState:m}),[c]);return p.jsxs(P.Fragment,{children:[u,p.jsxs(qh.Provider,{value:T,children:[x&&c&&p.jsx(_i,{"data-type":"outside",ref:d,onFocus:E=>{if(Vd(E,c))h.current?.focus();else{const I=y?y.domReference:null;eD(I)?.focus()}}}),x&&c&&p.jsx("span",{"aria-owns":c.id,style:SO}),c&&ur.createPortal(r,c),x&&c&&p.jsx(_i,{"data-type":"outside",ref:f,onFocus:E=>{if(Vd(E,c))g.current?.focus();else{const I=y?y.domReference:null;JO(I)?.focus(),y?.closeOnFocusOut&&y?.onOpenChange(!1,ei(CO,E.nativeEvent))}}})]})]})});process.env.NODE_ENV!=="production"&&(vW.displayName="FloatingPortal");const LE=P.forwardRef(function(t,n){const{children:r,container:o,className:i,render:s,...a}=t,{portalNode:l,portalSubtree:c}=FE({container:o,ref:n,componentProps:t,elementProps:a});return!c&&!l?null:p.jsxs(P.Fragment,{children:[c,l&&ur.createPortal(r,l)]})});process.env.NODE_ENV!=="production"&&(LE.displayName="FloatingPortalLite");const bW=LE;function VE(){const e=P.useContext(Tc);if(!e)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: useToastManager must be used within <Toast.Provider>.":Nn(73));const t=e.useState("toasts");return P.useMemo(()=>({toasts:t,add:e.addToast,close:e.closeToast,update:e.updateToast,promise:e.promiseToast}),[t,e])}const xW=e=>{const[t,n]=S.useState(!1),r=()=>n(!0),o=()=>n(!1);return S.useEffect(()=>{const i=e.current;if(i)return i.addEventListener("mouseenter",r),i.addEventListener("mouseleave",o),()=>{i.removeEventListener("mouseenter",r),i.removeEventListener("mouseleave",o)}},[]),t},wW=_o("relative isolate z-tooltip flex w-full flex-col overflow-hidden rounded-xl border bg-card-background backdrop-blur-md text-sm shadow-notification transition-all duration-300",{variants:{theme:{default:"border-card-border text-foreground shadow-black/5",info:"bg-alert-info-bg text-alert-info-text border-alert-info-border",warn:"bg-alert-warn-bg text-alert-warn-text border-alert-warn-border",muted:"bg-alert-muted-bg text-alert-muted-text border-alert-muted-border",danger:"bg-alert-danger-bg text-alert-danger-text border-alert-danger-border",success:"bg-alert-success-bg text-alert-success-text border-alert-success-border",secondary:"bg-alert-secondary-bg text-alert-secondary-text border-alert-secondary-border"}},defaultVariants:{theme:"default"}}),SW={default:Er,info:Er,warn:Bu,muted:Er,danger:Bu,success:Vu,secondary:Er},$E=S.createContext(()=>{throw new Error("Not implemented")}),TW=()=>S.useContext($E);function EW(e){const t=e.toast.data?.closable??!0,n=e.toast.data?.loading??!1,r=e.toast.data?.theme||"default",o=wW({theme:r}),i=n?RI:SW[r]||Er;return p.jsx(AE,{toast:e.toast,swipeDirection:"right",children:p.jsx(ze.li,{layout:!0,initial:{opacity:0,y:-20,scale:.95},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,scale:.9,y:-20,transition:{duration:.2}},transition:{type:"spring",damping:25,stiffness:300},className:"pointer-events-auto w-full list-none",children:p.jsx(PE,{className:Pe(o,"shadow-lg"),children:p.jsxs("div",{className:"flex items-start gap-3 p-4",children:[p.jsx("div",{className:Pe("mt-0.5 shrink-0 opacity-80",n&&"animate-spin"),children:p.jsx(i,{className:"size-4"})}),p.jsxs("div",{className:"flex flex-1 flex-col gap-1 overflow-hidden",children:[e.toast.title?p.jsx(DE,{className:"select-text truncate font-semibold leading-tight tracking-tight"}):null,p.jsx(OE,{className:"line-clamp-2 select-text text-xs font-medium leading-relaxed opacity-90"})]}),t&&!n?p.jsx(_E,{className:"-mr-1 -mt-1 shrink-0 rounded-lg p-1.5 text-foreground/40 transition hover:bg-foreground/10 hover:text-foreground",children:p.jsx(jo,{className:"size-3.5"})}):null]})})})})}function CW({max:e=5}){const t=S.useRef(null),n=xW(t),r=VE(),o=e?r.toasts.slice(0,e):r.toasts,i=n?o:o.slice(0,3),s=o.length-i.length;return p.jsxs(kE,{ref:t,className:"pointer-events-none fixed left-1/2 top-6 z-[100] flex w-full max-w-[380px] -translate-x-1/2 flex-col gap-3 overflow-visible outline-none",children:[p.jsx(gn,{mode:"popLayout",initial:!1,children:i.map(a=>p.jsx(EW,{toast:a},a.id))}),!n&&s>0&&p.jsxs(ze.div,{layout:!0,initial:{opacity:0,y:-10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},className:"pointer-events-auto cursor-default self-center rounded-full border border-card-border bg-card-background/80 px-3 py-1 text-[10px] font-bold uppercase tracking-wider text-foreground/50 shadow-sm backdrop-blur transition-all hover:bg-card-background hover:text-foreground/80",children:["+",s," more"]})]})}function kW({children:e,max:t=5}){const n=VE(),r=S.useCallback(()=>{n.toasts.forEach(i=>n.close(i.id))},[n]),o=S.useCallback((i,s)=>{const a={theme:s?.theme,closable:s?.closable,loading:s?.loading};if(s?.id&&n.toasts.find(u=>u.id===s.id))return n.update(s.id,{description:i,title:s.title,timeout:s.timeout,data:a}),{close:()=>n.close(s.id),clear:r};const l=n.add({description:i,id:s?.id,title:s?.title,timeout:s?.timeout,data:a});return{close:()=>n.close(l),clear:r}},[n,r]);return p.jsxs($E.Provider,{value:o,children:[e,p.jsx(bW,{children:p.jsx(CW,{max:t})})]})}function IW({children:e,max:t=5,timeout:n=5e3}){return p.jsx(CE,{limit:t,timeout:n,children:p.jsx(kW,{max:t,children:e})})}const AW=/Mac|iPod|iPhone|iPad/,Ac=()=>AW.test(navigator.userAgent),PW=e=>e.split("+").map(t=>{const n=t.trim();return n==="Mod"?Ac()?"Meta":"Control":n==="Hyper"?Ac()?"Meta+Shift+Alt":"Control+Shift+Alt":n}),zE=e=>e.map(t=>t.trim()).join("+");class OW{combinations=[];constructor(t=[]){this.combinations=this.combinations.concat(t),this.combinations.forEach(n=>{this.add(n.key,n.fn)})}add(t,n){const r=zE(PW(t));if(!this.combinations.find(o=>o.key===r))return this.combinations.push({fn:n,key:r}),this}register(){const t=new AbortController,n=r=>{const o=r.target;if((o.tagName==="INPUT"||o.tagName==="TEXTAREA")&&o.getAttribute("data-combikeysbypass")!=="true")return;const i=new Set;if(r.metaKey&&i.add("Meta"),r.ctrlKey&&i.add("Control"),r.altKey&&i.add("Alt"),r.key.charCodeAt(0)>127){const a=r.code.replace(/^Digit/,"").replace(/^Key/,"");i.add(r.shiftKey?a.toUpperCase():a.toLowerCase())}else i.add(r.shiftKey?r.key.toUpperCase():r.key);const s=zE(Array.from(i));this.combinations.forEach(a=>{if(a.key===s)return r.preventDefault(),void a.fn(r)})};return window.addEventListener("keydown",n,{signal:t.signal}),()=>t.abort()}}const DW=e=>(e=e.trim(),e==="Alt"?Ac()?p.jsx(HI,{"aria-label":"Option",size:12}):"Alt":e==="Mod"?Ac()?p.jsx(LI,{"aria-label":"Command",size:12}):"Ctrl":e),NW=e=>{const t=e.value.trim().split("+");return p.jsx("span",{className:"flex items-center gap-1 text-sm",children:t.map((n,r)=>{const o=t.length-1===r;return p.jsxs(S.Fragment,{children:[p.jsx("kbd",{"aria-label":n,children:DW(n)}),o?null:p.jsx("span",{children:"+"})]},`${e.value}-${n}-key-${r}`)})})},MW=e=>p.jsx("span",{className:"flex h-full items-center text-left text-sm font-medium text-secondary",children:Du(e.item.title)?p.jsx(e.item.title,{text:e.text}):e.item.title}),_W=S.forwardRef((e,t)=>{const n=S.useId(),r=e.active,o=e.item;return o.type==="group"?p.jsx("div",{id:n,className:"h-10 px-2 pb-1 pt-2",children:p.jsx(MW,{text:e.text,item:o})}):o.type!=="shortcut"?p.jsx(S.Fragment,{}):p.jsxs("button",{...e,id:n,ref:t,role:"option",type:"button","aria-selected":r,"data-component":"command-palette-item",className:Pe("flex h-10 items-center justify-between rounded-lg p-2 hover:bg-floating-hover",r?"bg-floating-hover":""),children:[p.jsxs("span",{className:"flex items-center gap-2",children:[o.Icon?o.Icon:null,p.jsx("span",{children:Du(o.title)?p.jsx(o.title,{text:e.text}):o.title})]}),o.shortcut?p.jsx(NW,{value:o.shortcut}):null]})}),FW=(e,t)=>{if(t.length===0)return e;const n=[{key:"title",value:t},{key:"shortcut",value:t},{key:"hint",value:t}],r=e.map(a=>({...a,title:He.function(a.title)?a.title({text:t}):a.title})),o=r.reduce((a,l)=>{const c=He.function(l.enabled)?l.enabled({text:t}):l.enabled??!0;return c&&a.push({...l,enabled:c}),a},[]),i=zh(o,"title",n),s=r.filter(a=>He.function(a.enabled)?a.enabled({text:t}):!1);return Bn.unique(i.concat(s),a=>a.title)},LW=[0,0,0,0,0],jE=e=>{for(let t=0;t<e.length;t++){const n=e[t];if(n.type==="shortcut")return n;const r=jE(n.items);if(r)return r}return null},BE=e=>{const t=S.useId(),n=S.useRef(null),[r,o]=S.useState(""),i=S.useRef([]),s=vt(),a=Lr(r),[l,c]=S.useState(null),u=e.bind??"Mod + k",d=Kn({open:e.open,strategy:"absolute",whileElementsMounted:lo,onOpenChange:e.onChangeVisibility}),f=e.commands.flatMap(T=>T.type==="group"?[T,...T.items]:[T]),h=FW(f,r),g=r===""?f:[{type:"group",title:"Results",items:[]},...h.filter(T=>T.type!=="group")],y=ol(d.context,{listRef:i,loop:!0,activeIndex:l,virtual:!0,allowEscape:!1,focusItemOnOpen:!0,focusItemOnHover:!0,openOnArrowKeyDown:!0,scrollItemIntoView:!1,selectedIndex:l,disabledIndices:T=>{const E=g[T];return E?E.type==="group":!1},onNavigate:T=>{He.number(T)&&(jg(n.current,i.current[T])||i.current[T]?.scrollIntoView({block:"start",inline:"start"})),c(E=>He.number(T)?T:e.open?E??0:null)}}),{getItemProps:m,getReferenceProps:v,getFloatingProps:b}=Zn([y]);S.useEffect(()=>{const T=new OW;return T.add(u,()=>e.onChangeVisibility?.(!0)),f.forEach(E=>{E.type!=="group"&&E.type==="shortcut"&&E.shortcut!==void 0&&T.add(E.shortcut,I=>E.action({event:I,setText:o,text:a.current,setOpen:e.onChangeVisibility}))}),T.register()},[u,f,e,a]);const x=e.Icon??$u;return p.jsx(S.Fragment,{children:p.jsxs(Ys,{...b(),animated:!1,closable:!1,open:e.open,overlayClickClose:!0,ariaTitle:"Command palette",bodyClassName:"px-0 py-0 pt-0","data-component":"command-palette",onChange:e.onChangeVisibility,className:"container relative overflow-clip py-0 md:max-w-screen-sm lg:max-w-screen-md",children:[p.jsxs("header",{className:"sticky top-0 isolate z-floating flex h-12 w-full items-center overflow-clip border-b border-floating-border bg-floating-background",children:[p.jsx("div",{className:"flex size-10 items-center justify-center",children:e.Icon?p.jsx(x,{Default:$u,text:r,size:16}):p.jsx($u,{size:16})}),p.jsx("input",{...v({ref:d.refs.setReference,onKeyDown:T=>{const E=He.number(l)?g[l]:null;if(T.key==="Enter")if(E)E.type==="shortcut"&&E.action({event:T,text:r,setOpen:e.onChangeVisibility,setText:o});else{const w=jE(h);w?.type==="shortcut"&&w.action({event:T,text:r,setOpen:e.onChangeVisibility,setText:o})}}}),autoFocus:!0,value:r,"data-combikeysbypass":"true",placeholder:"Search for...",onChange:T=>o(T.target.value),className:"h-12 w-full items-center bg-transparent px-2 py-2 pb-2 text-left text-lg outline-none"})]}),e.loading?p.jsxs("ul",{role:"listbox","data-component":"command-palette-list",className:"my-2 flex max-h-96 w-full origin-[top_center] flex-col gap-1 overflow-y-auto px-2",children:[p.jsx("div",{className:"h-10 px-2 pb-1 pt-2",children:s.commandPaletteLoading}),LW.map((T,E)=>p.jsx("li",{className:Pe("flex h-10 items-center justify-between rounded-lg p-2 hover:bg-primary hover:text-primary-foreground"),children:Kp},`${t}-${E}-skeleton-index`))]}):p.jsxs("div",{className:"flex min-w-full flex-row flex-nowrap","data-component":"command-palette-container",children:[p.jsxs("ul",{role:"listbox",ref:n,"data-component":"command-palette-list",className:"my-2 flex h-fit max-h-96 w-full origin-[top_center] flex-col gap-1 overflow-y-auto px-2",children:[g.map((T,E)=>S.createElement(_W,{...m({onMouseEnter:()=>c(E),ref(I){i.current[E]=I},onClick(I){I.preventDefault(),e.onChangeVisibility(!1),T.type==="shortcut"&&T.action({event:I,text:r,setOpen:e.onChangeVisibility,setText:o})}}),item:T,text:r,active:l===E,key:`${t}-${T.type}-${E}`})),g.length===1?p.jsx("div",{className:Pe("flex items-center justify-between rounded-lg p-2 text-secondary"),children:s.commandPaletteEmpty??e.emptyMessage}):null]}),e.Preview&&He.number(l)?p.jsx(e.Preview,{command:g[l],text:r}):null]}),e.footer?p.jsx("footer",{className:"flex h-8 items-center rounded-b-lg border-t border-floating-border p-2",children:e.footer}):null]})})};function Yr(e){return`${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,"0")}-${String(e.getDate()).padStart(2,"0")}`}function RE(e){const t=new Map;for(const n of e){const r=Yr(n.date),o=t.get(r);o?o.push(n):t.set(r,[n])}return t}function HE(e){const t=ch(e),n=In(t,{weekStartsOn:1}),r=[];for(let o=0;o<42;o++)r.push(qr(n,o));return r}function Uh(e){const t=In(e,{weekStartsOn:1}),n=[];for(let r=0;r<7;r++)n.push(qr(t,r));return n}function Gh(){return Array.from({length:24},(e,t)=>t)}function Pc(e,t){return new Intl.DateTimeFormat(t,{hour:"2-digit",minute:"2-digit",hour12:!1}).format(new Date(e))}function oa(e,t){return new Intl.DateTimeFormat(t,{day:"numeric"}).format(e)}function VW(e,t){return new Intl.DateTimeFormat(t,{weekday:"short"}).format(e)}function WE(e,t){return new Intl.DateTimeFormat(t,{weekday:"long"}).format(e)}function qE(e,t){return new Intl.DateTimeFormat(t,{weekday:"short"}).format(e)}function Yh(e,t){return new Intl.DateTimeFormat(t,{month:"long",year:"numeric"}).format(e)}function UE(e,t){return new Intl.DateTimeFormat(t,{month:"short"}).format(e)}function ia(e,t){return new Intl.DateTimeFormat(t,{hour:"2-digit",minute:"2-digit",hour12:!1}).format(new Date(0,0,0,e))}function sa(e,t){return new Intl.DateTimeFormat(t,{weekday:"long",month:"short",day:"numeric",year:"numeric"}).format(e)}function GE(e,t){return new Intl.DateTimeFormat(t,{hour:"2-digit",minute:"2-digit",hour12:!1}).format(e)}function YE(e){return dh(e)}function $W({currentDate:e,currentView:t,filters:n,filterArea:r,setCurrentDate:o,setCurrentView:i,onToggleFilter:s,onAddEvent:a}){const l=Fr(),c=vt(),u=Xs(e),d=S.useMemo(()=>[{value:"month",label:c.pageCalendarMonthView},{value:"week",label:c.pageCalendarWeekView},{value:"day",label:c.pageCalendarDayView}],[c]),f=()=>{o(y=>t==="month"?uT(y,1):t==="week"?yB(y):cT(y,1))},h=()=>{o(y=>t==="month"?lh(y,1):t==="week"?GS(y,1):qr(y,1))},g=YE(e);return p.jsxs("header",{className:"flex flex-col gap-4",children:[p.jsxs("div",{className:"flex items-center justify-between gap-4",children:[p.jsxs("div",{className:"flex items-center gap-3",children:[p.jsxs("div",{"aria-hidden":"true",className:`flex size-12 flex-col items-center justify-center overflow-hidden rounded-lg text-xs ${u?"bg-primary text-primary-foreground":"bg-card text-foreground"}`,children:[p.jsx("span",{className:"font-light uppercase leading-none",children:UE(e,l)}),p.jsx("span",{className:"text-xl font-medium leading-none",children:oa(e,l)})]}),p.jsxs("div",{children:[p.jsx("h1",{"aria-live":"polite","aria-atomic":"true",className:"text-xl font-bold leading-tight",children:Yh(e,l)}),p.jsx("span",{className:"text-xs text-muted-foreground",children:c.pageCalendarWeekLabel(g)})]})]}),p.jsxs("nav",{"aria-label":c.pageCalendarNavigation,className:"flex items-center gap-2",children:[p.jsxs("div",{className:"flex items-center gap-1",children:[p.jsx(Jt,{size:"small",title:c.pageCalendarPrevious,"aria-label":c.pageCalendarPrevious,theme:"ghost-muted",onClick:f,children:p.jsx(ry,{size:16})}),p.jsx("button",{type:"button","aria-label":c.pageCalendarToday,onClick:()=>o(new Date),className:"rounded-md px-3 py-1.5 text-sm transition-colors hover:bg-muted/50",children:c.pageCalendarToday}),p.jsx(Jt,{size:"small",title:c.pageCalendarNext,"aria-label":c.pageCalendarNext,theme:"ghost-muted",onClick:h,children:p.jsx(Ta,{size:16})})]}),p.jsx("div",{className:"flex rounded-md",children:d.map(y=>p.jsx(Jt,{size:"small",onClick:()=>i(y.value),theme:t===y.value?"primary":"muted","aria-pressed":t===y.value,className:"rounded-none first:rounded-l-button last:rounded-r-button",children:y.label},y.value))}),a&&p.jsxs(Jt,{theme:"primary",size:"small",onClick:a,children:[p.jsx(_I,{size:14}),c.pageCalendarAddEvent]})]})]}),r??(n.length>0&&p.jsxs("div",{role:"group","aria-label":c.pageCalendarFilter,className:"flex flex-wrap items-center gap-1.5",children:[p.jsx(ny,{size:14,className:"text-muted-foreground","aria-hidden":"true"}),p.jsx("span",{className:"mr-1 text-xs text-muted-foreground",children:c.pageCalendarFilter}),n.map(y=>p.jsx(zo,{as:"button",size:"small",type:"button",theme:y.theme,indicator:y.enabled?y.theme:void 0,"aria-pressed":y.enabled,"aria-label":`${y.label}, ${y.enabled?c.pageCalendarFilterEnabled:c.pageCalendarFilterDisabled}`,onClick:()=>s(y.id),children:y.label},y.id))]}))]})}function Kh({event:e,onClick:t,compact:n=!1}){const r=vt(),o={style:{border:"0",padding:"0 0.5rem",height:"1.25rem",borderRadius:"0.25rem"},className:Pe("w-full border-0 justify-start rounded text-xs truncate text-ellipsis overflow-hidden border leading-tight",e.className)};return n?p.jsx(Jt,{...o,size:"small",onClick:t,title:e.title,"aria-label":r.pageCalendarEventAt(e.title,Pc(e.date)),theme:e.className?"raw":"primary",children:e.title}):p.jsxs(Jt,{...o,size:"small",onClick:t,title:e.title,"aria-label":r.pageCalendarEventAt(e.title,Pc(e.date)),theme:e.className?"raw":"primary",children:[p.jsx("div",{className:"truncate font-medium",children:e.title}),p.jsx("div",{className:"text-xs opacity-60",children:Pc(e.date)})]})}function zW({days:e,eventsByDate:t,currentDate:n,onEventClick:r,onDayClick:o}){const i=Fr(),s=vt(),a=S.useMemo(()=>Uh(new Date),[]);return p.jsxs("div",{className:"flex h-full flex-1 flex-col",children:[p.jsx("ul",{role:"row","aria-hidden":"true",className:"grid grid-cols-7 border-b border-border",children:a.map(l=>{const c=VW(l,i);return p.jsx("li",{className:"py-2 text-center text-xs font-medium text-muted-foreground",children:c},c)})}),p.jsx("div",{role:"grid","aria-label":s.pageCalendarMonthGrid,className:"grid flex-1 auto-rows-fr grid-cols-7",children:e.map((l,c)=>{const u=Yr(l),d=t.get(u)||[],f=lT(l,n),h=Xs(l),g=d.slice(0,2),y=d.length-2;return p.jsxs("button",{type:"button",onClick:()=>o(l),"aria-label":`${sa(l,i)}${d.length>0?`, ${s.pageCalendarEventCount(d.length)}`:""}`,className:`group flex min-h-32 cursor-pointer flex-col gap-1 border-b border-r border-border p-2 transition-colors hover:bg-muted hover:bg-opacity-20 ${f?"":"opacity-50"}`,children:[p.jsxs("div",{className:"flex items-center justify-between",children:[p.jsx("span",{className:`flex h-6 w-6 items-center justify-center rounded-full text-xs font-medium ${h?"bg-primary text-primary-foreground":"text-foreground"}`,children:oa(l,i)}),p.jsx("span",{"aria-hidden":"true",className:"text-lg leading-none text-muted-foreground opacity-0 transition-opacity group-hover:opacity-40",children:"+"})]}),p.jsxs("div",{className:"flex flex-col gap-0.5",children:[g.map(m=>p.jsx("div",{onClick:v=>v.stopPropagation(),children:p.jsx(Kh,{compact:!0,event:m,onClick:()=>r(m)})},m.id)),y>0&&p.jsx("span",{className:"pl-1 text-xs text-muted-foreground",children:s.pageCalendarMoreEvents(y)})]})]},c)})})]})}const aa=48;function jW(e){const t=e.date.getHours(),n=e.date.getMinutes();return t*aa+n/60*aa}function BW({days:e,eventsByDate:t,onEventClick:n,onSlotClick:r}){const o=Fr(),i=S.useRef(null),s=S.useRef(null),a=Gh();return S.useEffect(()=>{if(s.current&&i.current){const l=i.current.offsetTop;s.current.scrollTop=l-s.current.clientHeight/2}},[]),p.jsxs("div",{className:"flex flex-1 flex-col overflow-hidden",children:[p.jsxs("div",{className:"flex flex-shrink-0 border-b border-border",children:[p.jsx("div",{className:"w-[60px] flex-shrink-0"}),e.map((l,c)=>{const u=Xs(l);return p.jsxs("div",{"aria-label":sa(l,o),className:"flex-1 py-2 text-center text-xs font-medium text-muted-foreground",children:[p.jsx("span",{className:"block",children:qE(l,o)}),p.jsx("span",{className:`inline-flex h-6 w-6 items-center justify-center rounded-full text-sm font-bold ${u?"bg-primary text-primary-foreground":"text-foreground"}`,children:oa(l,o)})]},c)})]}),p.jsxs("div",{ref:s,className:"flex flex-1 items-start overflow-y-auto",children:[p.jsx("div",{className:"w-[60px] flex-shrink-0",children:a.map(l=>p.jsxs("div",{className:"relative",style:{height:aa},children:[p.jsx("span",{className:"absolute -top-2.5 right-2 text-[10px] text-muted-foreground",children:l===0?"":ia(l,o)}),l===new Date().getHours()&&p.jsx("div",{ref:i})]},l))}),e.map((l,c)=>{const u=Yr(l),d=t.get(u)||[];return p.jsxs("div",{className:"relative flex-1 border-l border-card-border",children:[a.map(f=>{const h=new Date(l);return h.setHours(f,0,0,0),p.jsx("div",{role:"button",tabIndex:0,"aria-label":ia(f,o),className:"cursor-pointer border-b border-border/50 hover:bg-muted/20",style:{height:aa},onClick:()=>r?.(h),onKeyDown:g=>{(g.key==="Enter"||g.key===" ")&&(g.preventDefault(),r?.(h))}},f)}),d.map(f=>p.jsx("div",{className:"absolute left-0.5 right-0.5",style:{top:jW(f),height:aa},onClick:h=>h.stopPropagation(),children:p.jsx(Kh,{event:f,onClick:()=>n(f)})},f.id))]},c)})]})]})}const la=48;function RW(e){const t=e.date.getHours(),n=e.date.getMinutes();return t*la+n/60*la}function HW({currentDate:e,onSlotClick:t,renderEvent:n,eventsByDate:r,onDateChange:o,onEventClick:i}){const s=Fr(),a=S.useRef(null),l=S.useRef(null),c=Gh(),[u,d]=S.useState(null);S.useEffect(()=>{if(l.current&&a.current){const m=a.current.offsetTop;l.current.scrollTop=m-l.current.clientHeight/2}},[]);const f=Yr(e),h=r.get(f)||[],g=({date:m})=>{const v=Yr(m),b=(r.get(v)||[]).length>0,x=Yr(m)===Yr(e);return!b||x?null:p.jsx("span",{className:"absolute bottom-0.5 left-1/2 h-1 w-1 -translate-x-1/2 rounded-full bg-primary"})},y=m=>{d(m),i(m)};return p.jsxs("div",{className:"flex flex-1 min-w-full",children:[p.jsxs("div",{className:"flex w-full flex-1 flex-col",children:[p.jsxs("div",{"aria-label":sa(e,s),className:"flex flex-shrink-0 items-center gap-3 border-b border-border px-4 py-2",children:[p.jsx("span",{className:`inline-flex h-8 w-8 items-center justify-center rounded-full font-bold ${Xs(e)?"bg-primary text-primary-foreground":"text-foreground"}`,children:oa(e,s)}),p.jsxs("div",{children:[p.jsx("div",{className:"font-semibold",children:WE(e,s)}),p.jsx("div",{className:"text-xs text-muted-foreground",children:Yh(e,s)})]})]}),p.jsxs("div",{ref:l,className:"flex flex-1 items-start overflow-y-auto",children:[p.jsx("div",{className:"w-[60px] flex-shrink-0",children:c.map(m=>p.jsxs("div",{className:"relative",style:{height:la},children:[p.jsx("span",{className:"absolute -top-2.5 right-2 text-[10px] text-muted-foreground",children:m===0?"":ia(m,s)}),m===new Date().getHours()&&p.jsx("div",{ref:a})]},m))}),p.jsxs("div",{className:"relative flex-1 border-l border-card-border",children:[c.map(m=>{const v=new Date(e);return v.setHours(m,0,0,0),p.jsx("div",{role:"button",tabIndex:0,"aria-label":ia(m,s),className:"cursor-pointer border-b border-border/50 hover:bg-muted/20",style:{height:la},onClick:()=>t?.(v),onKeyDown:b=>{(b.key==="Enter"||b.key===" ")&&(b.preventDefault(),t?.(v))}},m)}),h.map(m=>p.jsx("div",{className:"absolute left-1 right-1",style:{top:RW(m),height:la},onClick:v=>v.stopPropagation(),children:p.jsx(Kh,{event:m,onClick:()=>y(m)})},m.id))]})]})]}),p.jsxs("div",{className:"flex flex-col overflow-y-auto border-l border-card-border px-4",children:[p.jsx(bh,{date:e,markToday:!0,changeOnlyOnClick:!0,RenderOnDay:g,onChange:m=>m&&o(m)}),u&&p.jsx("div",{className:"flex flex-col gap-2 border-t p-3",children:n?n(u):p.jsxs(p.Fragment,{children:[p.jsx("div",{className:"truncate text-sm font-semibold",children:u.title}),p.jsx("div",{className:"text-xs text-muted-foreground",children:sa(u.date,s)}),p.jsx("div",{className:"text-xs text-muted-foreground",children:GE(u.date,s)}),p.jsx(zo,{theme:u.className?"custom":"primary",size:"small",className:`self-start${u.className?` ${u.className}`:""}`})]})})]})]})}const WW=[];function qW({events:e,filterArea:t,onAddEvent:n,defaultDate:r,onSlotClick:o,getFilterId:i,renderEvent:s,onEventClick:a,filters:l=WW,defaultView:c="month",onChangeFilters:u}){const d=vt(),[f,h]=S.useState(c),[g,y]=S.useState(()=>r??new Date),[m,v]=S.useState(l),b=A=>{v(O=>{const _=O.map(N=>N.id===A?{...N,enabled:!N.enabled}:N);return u?.(_),_})},x=S.useMemo(()=>{if(l.length===0)return e;const A=i??(O=>O?.filterId);return e.filter(O=>m.find(_=>_.id===A(O))?.enabled??!0)},[e,m,l]),T=S.useMemo(()=>RE(x),[x]),E=S.useMemo(()=>HE(g),[g]),I=S.useMemo(()=>Uh(g),[g]),w=A=>a?.(A),C=A=>{y(A),h("day")};return p.jsxs("div",{role:"application","aria-label":d.pageCalendarLabel,className:"flex h-full w-full flex-grow flex-col gap-4",children:[p.jsx($W,{filters:m,filterArea:t,onAddEvent:n,currentDate:g,currentView:f,setCurrentDate:y,setCurrentView:h,onToggleFilter:b}),f==="month"&&p.jsx(zW,{days:E,currentDate:g,eventsByDate:T,onDayClick:C,onEventClick:w}),f==="week"&&p.jsx(BW,{days:I,currentDate:g,onSlotClick:o,eventsByDate:T,onEventClick:w}),f==="day"&&p.jsx(HW,{currentDate:g,onSlotClick:o,renderEvent:s,eventsByDate:T,onDateChange:y,onEventClick:w})]})}const UW=["INPUT","SELECT"],KE=e=>{if(!e)return;Array.from(e.elements).forEach(n=>{UW.includes(n.tagName)&&(n.tagName==="INPUT"&&(n.value=n.defaultValue),n.tagName==="SELECT"&&(n.value=""),n.setAttribute("data-initialized","false"))})};var Zh,ZE;function Xh(){if(ZE)return Zh;ZE=1;var e=String.prototype.replace,t=/%20/g,n={RFC1738:"RFC1738",RFC3986:"RFC3986"};return Zh={default:n.RFC3986,formatters:{RFC1738:function(r){return e.call(r,t,"+")},RFC3986:function(r){return String(r)}},RFC1738:n.RFC1738,RFC3986:n.RFC3986},Zh}var Qh,XE;function QE(){if(XE)return Qh;XE=1;var e=Xh(),t=vg(),n=Object.prototype.hasOwnProperty,r=Array.isArray,o=t(),i=function(w,C){return o.set(w,C),w},s=function(w){return o.has(w)},a=function(w){return o.get(w)},l=function(w,C){o.set(w,C)},c=(function(){for(var I=[],w=0;w<256;++w)I[I.length]="%"+((w<16?"0":"")+w.toString(16)).toUpperCase();return I})(),u=function(w){for(;w.length>1;){var C=w.pop(),A=C.obj[C.prop];if(r(A)){for(var O=[],_=0;_<A.length;++_)typeof A[_]<"u"&&(O[O.length]=A[_]);C.obj[C.prop]=O}}},d=function(w,C){for(var A=C&&C.plainObjects?{__proto__:null}:{},O=0;O<w.length;++O)typeof w[O]<"u"&&(A[O]=w[O]);return A},f=function I(w,C,A){if(!C)return w;if(typeof C!="object"&&typeof C!="function"){if(r(w)){var O=w.length;if(A&&typeof A.arrayLimit=="number"&&O>A.arrayLimit)return i(d(w.concat(C),A),O);w[O]=C}else if(w&&typeof w=="object")if(s(w)){var _=a(w)+1;w[_]=C,l(w,_)}else{if(A&&A.strictMerge)return[w,C];(A&&(A.plainObjects||A.allowPrototypes)||!n.call(Object.prototype,C))&&(w[C]=!0)}else return[w,C];return w}if(!w||typeof w!="object"){if(s(C)){for(var N=Object.keys(C),$=A&&A.plainObjects?{__proto__:null,0:w}:{0:w},D=0;D<N.length;D++){var F=parseInt(N[D],10);$[F+1]=C[N[D]]}return i($,a(C)+1)}var z=[w].concat(C);return A&&typeof A.arrayLimit=="number"&&z.length>A.arrayLimit?i(d(z,A),z.length-1):z}var M=w;return r(w)&&!r(C)&&(M=d(w,A)),r(w)&&r(C)?(C.forEach(function(k,V){if(n.call(w,V)){var L=w[V];L&&typeof L=="object"&&k&&typeof k=="object"?w[V]=I(L,k,A):w[w.length]=k}else w[V]=k}),w):Object.keys(C).reduce(function(k,V){var L=C[V];if(n.call(k,V)?k[V]=I(k[V],L,A):k[V]=L,s(C)&&!s(k)&&i(k,a(C)),s(k)){var R=parseInt(V,10);String(R)===V&&R>=0&&R>a(k)&&l(k,R)}return k},M)},h=function(w,C){return Object.keys(C).reduce(function(A,O){return A[O]=C[O],A},w)},g=function(I,w,C){var A=I.replace(/\+/g," ");if(C==="iso-8859-1")return A.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(A)}catch{return A}},y=1024,m=function(w,C,A,O,_){if(w.length===0)return w;var N=w;if(typeof w=="symbol"?N=Symbol.prototype.toString.call(w):typeof w!="string"&&(N=String(w)),A==="iso-8859-1")return escape(N).replace(/%u[0-9a-f]{4}/gi,function(V){return"%26%23"+parseInt(V.slice(2),16)+"%3B"});for(var $="",D=0;D<N.length;D+=y){for(var F=N.length>=y?N.slice(D,D+y):N,z=[],M=0;M<F.length;++M){var k=F.charCodeAt(M);if(k===45||k===46||k===95||k===126||k>=48&&k<=57||k>=65&&k<=90||k>=97&&k<=122||_===e.RFC1738&&(k===40||k===41)){z[z.length]=F.charAt(M);continue}if(k<128){z[z.length]=c[k];continue}if(k<2048){z[z.length]=c[192|k>>6]+c[128|k&63];continue}if(k<55296||k>=57344){z[z.length]=c[224|k>>12]+c[128|k>>6&63]+c[128|k&63];continue}M+=1,k=65536+((k&1023)<<10|F.charCodeAt(M)&1023),z[z.length]=c[240|k>>18]+c[128|k>>12&63]+c[128|k>>6&63]+c[128|k&63]}$+=z.join("")}return $},v=function(w){for(var C=[{obj:{o:w},prop:"o"}],A=[],O=0;O<C.length;++O)for(var _=C[O],N=_.obj[_.prop],$=Object.keys(N),D=0;D<$.length;++D){var F=$[D],z=N[F];typeof z=="object"&&z!==null&&A.indexOf(z)===-1&&(C[C.length]={obj:N,prop:F},A[A.length]=z)}return u(C),w},b=function(w){return Object.prototype.toString.call(w)==="[object RegExp]"},x=function(w){return!w||typeof w!="object"?!1:!!(w.constructor&&w.constructor.isBuffer&&w.constructor.isBuffer(w))},T=function(w,C,A,O){if(s(w)){var _=a(w)+1;return w[_]=C,l(w,_),w}var N=[].concat(w,C);return N.length>A?i(d(N,{plainObjects:O}),N.length-1):N},E=function(w,C){if(r(w)){for(var A=[],O=0;O<w.length;O+=1)A[A.length]=C(w[O]);return A}return C(w)};return Qh={arrayToObject:d,assign:h,combine:T,compact:v,decode:g,encode:m,isBuffer:x,isOverflow:s,isRegExp:b,markOverflow:i,maybeMap:E,merge:f},Qh}var Jh,JE;function GW(){if(JE)return Jh;JE=1;var e=vg(),t=QE(),n=Xh(),r=Object.prototype.hasOwnProperty,o={brackets:function(m){return m+"[]"},comma:"comma",indices:function(m,v){return m+"["+v+"]"},repeat:function(m){return m}},i=Array.isArray,s=Array.prototype.push,a=function(y,m){s.apply(y,i(m)?m:[m])},l=Date.prototype.toISOString,c=n.default,u={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,commaRoundTrip:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:t.encode,encodeValuesOnly:!1,filter:void 0,format:c,formatter:n.formatters[c],indices:!1,serializeDate:function(m){return l.call(m)},skipNulls:!1,strictNullHandling:!1},d=function(m){return typeof m=="string"||typeof m=="number"||typeof m=="boolean"||typeof m=="symbol"||typeof m=="bigint"},f={},h=function y(m,v,b,x,T,E,I,w,C,A,O,_,N,$,D,F,z,M){for(var k=m,V=M,L=0,R=!1;(V=V.get(f))!==void 0&&!R;){var U=V.get(m);if(L+=1,typeof U<"u"){if(U===L)throw new RangeError("Cyclic object value");R=!0}typeof V.get(f)>"u"&&(L=0)}if(typeof A=="function"?k=A(v,k):k instanceof Date?k=N(k):b==="comma"&&i(k)&&(k=t.maybeMap(k,function(Q){return Q instanceof Date?N(Q):Q})),k===null){if(E)return C&&!F?C(v,u.encoder,z,"key",$):v;k=""}if(d(k)||t.isBuffer(k)){if(C){var G=F?v:C(v,u.encoder,z,"key",$);return[D(G)+"="+D(C(k,u.encoder,z,"value",$))]}return[D(v)+"="+D(String(k))]}var H=[];if(typeof k>"u")return H;var ee;if(b==="comma"&&i(k))F&&C&&(k=t.maybeMap(k,C)),ee=[{value:k.length>0?k.join(",")||null:void 0}];else if(i(A))ee=A;else{var se=Object.keys(k);ee=O?se.sort(O):se}var te=w?String(v).replace(/\./g,"%2E"):String(v),q=x&&i(k)&&k.length===1?te+"[]":te;if(T&&i(k)&&k.length===0)return q+"[]";for(var Y=0;Y<ee.length;++Y){var Z=ee[Y],pe=typeof Z=="object"&&Z&&typeof Z.value<"u"?Z.value:k[Z];if(!(I&&pe===null)){var B=_&&w?String(Z).replace(/\./g,"%2E"):String(Z),ae=i(k)?typeof b=="function"?b(q,B):q:q+(_?"."+B:"["+B+"]");M.set(m,L);var ce=e();ce.set(f,M),a(H,y(pe,ae,b,x,T,E,I,w,b==="comma"&&F&&i(k)?null:C,A,O,_,N,$,D,F,z,ce))}}return H},g=function(m){if(!m)return u;if(typeof m.allowEmptyArrays<"u"&&typeof m.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof m.encodeDotInKeys<"u"&&typeof m.encodeDotInKeys!="boolean")throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(m.encoder!==null&&typeof m.encoder<"u"&&typeof m.encoder!="function")throw new TypeError("Encoder has to be a function.");var v=m.charset||u.charset;if(typeof m.charset<"u"&&m.charset!=="utf-8"&&m.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var b=n.default;if(typeof m.format<"u"){if(!r.call(n.formatters,m.format))throw new TypeError("Unknown format option provided.");b=m.format}var x=n.formatters[b],T=u.filter;(typeof m.filter=="function"||i(m.filter))&&(T=m.filter);var E;if(m.arrayFormat in o?E=m.arrayFormat:"indices"in m?E=m.indices?"indices":"repeat":E=u.arrayFormat,"commaRoundTrip"in m&&typeof m.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var I=typeof m.allowDots>"u"?m.encodeDotInKeys===!0?!0:u.allowDots:!!m.allowDots;return{addQueryPrefix:typeof m.addQueryPrefix=="boolean"?m.addQueryPrefix:u.addQueryPrefix,allowDots:I,allowEmptyArrays:typeof m.allowEmptyArrays=="boolean"?!!m.allowEmptyArrays:u.allowEmptyArrays,arrayFormat:E,charset:v,charsetSentinel:typeof m.charsetSentinel=="boolean"?m.charsetSentinel:u.charsetSentinel,commaRoundTrip:!!m.commaRoundTrip,delimiter:typeof m.delimiter>"u"?u.delimiter:m.delimiter,encode:typeof m.encode=="boolean"?m.encode:u.encode,encodeDotInKeys:typeof m.encodeDotInKeys=="boolean"?m.encodeDotInKeys:u.encodeDotInKeys,encoder:typeof m.encoder=="function"?m.encoder:u.encoder,encodeValuesOnly:typeof m.encodeValuesOnly=="boolean"?m.encodeValuesOnly:u.encodeValuesOnly,filter:T,format:b,formatter:x,serializeDate:typeof m.serializeDate=="function"?m.serializeDate:u.serializeDate,skipNulls:typeof m.skipNulls=="boolean"?m.skipNulls:u.skipNulls,sort:typeof m.sort=="function"?m.sort:null,strictNullHandling:typeof m.strictNullHandling=="boolean"?m.strictNullHandling:u.strictNullHandling}};return Jh=function(y,m){var v=y,b=g(m),x,T;typeof b.filter=="function"?(T=b.filter,v=T("",v)):i(b.filter)&&(T=b.filter,x=T);var E=[];if(typeof v!="object"||v===null)return"";var I=o[b.arrayFormat],w=I==="comma"&&b.commaRoundTrip;x||(x=Object.keys(v)),b.sort&&x.sort(b.sort);for(var C=e(),A=0;A<x.length;++A){var O=x[A],_=v[O];b.skipNulls&&_===null||a(E,h(_,O,I,w,b.allowEmptyArrays,b.strictNullHandling,b.skipNulls,b.encodeDotInKeys,b.encode?b.encoder:null,b.filter,b.sort,b.allowDots,b.serializeDate,b.format,b.formatter,b.encodeValuesOnly,b.charset,C))}var N=E.join(b.delimiter),$=b.addQueryPrefix===!0?"?":"";return b.charsetSentinel&&(b.charset==="iso-8859-1"?$+="utf8=%26%2310003%3B&":$+="utf8=%E2%9C%93&"),N.length>0?$+N:""},Jh}var em,eC;function YW(){if(eC)return em;eC=1;var e=QE(),t=Object.prototype.hasOwnProperty,n=Array.isArray,r={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:e.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictMerge:!0,strictNullHandling:!1,throwOnLimitExceeded:!1},o=function(h){return h.replace(/&#(\d+);/g,function(g,y){return String.fromCharCode(parseInt(y,10))})},i=function(h,g,y){if(h&&typeof h=="string"&&g.comma&&h.indexOf(",")>-1)return h.split(",");if(g.throwOnLimitExceeded&&y>=g.arrayLimit)throw new RangeError("Array limit exceeded. Only "+g.arrayLimit+" element"+(g.arrayLimit===1?"":"s")+" allowed in an array.");return h},s="utf8=%26%2310003%3B",a="utf8=%E2%9C%93",l=function(g,y){var m={__proto__:null},v=y.ignoreQueryPrefix?g.replace(/^\?/,""):g;v=v.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var b=y.parameterLimit===1/0?void 0:y.parameterLimit,x=v.split(y.delimiter,y.throwOnLimitExceeded?b+1:b);if(y.throwOnLimitExceeded&&x.length>b)throw new RangeError("Parameter limit exceeded. Only "+b+" parameter"+(b===1?"":"s")+" allowed.");var T=-1,E,I=y.charset;if(y.charsetSentinel)for(E=0;E<x.length;++E)x[E].indexOf("utf8=")===0&&(x[E]===a?I="utf-8":x[E]===s&&(I="iso-8859-1"),T=E,E=x.length);for(E=0;E<x.length;++E)if(E!==T){var w=x[E],C=w.indexOf("]="),A=C===-1?w.indexOf("="):C+1,O,_;if(A===-1?(O=y.decoder(w,r.decoder,I,"key"),_=y.strictNullHandling?null:""):(O=y.decoder(w.slice(0,A),r.decoder,I,"key"),O!==null&&(_=e.maybeMap(i(w.slice(A+1),y,n(m[O])?m[O].length:0),function($){return y.decoder($,r.decoder,I,"value")}))),_&&y.interpretNumericEntities&&I==="iso-8859-1"&&(_=o(String(_))),w.indexOf("[]=")>-1&&(_=n(_)?[_]:_),y.comma&&n(_)&&_.length>y.arrayLimit){if(y.throwOnLimitExceeded)throw new RangeError("Array limit exceeded. Only "+y.arrayLimit+" element"+(y.arrayLimit===1?"":"s")+" allowed in an array.");_=e.combine([],_,y.arrayLimit,y.plainObjects)}if(O!==null){var N=t.call(m,O);N&&(y.duplicates==="combine"||w.indexOf("[]=")>-1)?m[O]=e.combine(m[O],_,y.arrayLimit,y.plainObjects):(!N||y.duplicates==="last")&&(m[O]=_)}}return m},c=function(h,g,y,m){var v=0;if(h.length>0&&h[h.length-1]==="[]"){var b=h.slice(0,-1).join("");v=Array.isArray(g)&&g[b]?g[b].length:0}for(var x=m?g:i(g,y,v),T=h.length-1;T>=0;--T){var E,I=h[T];if(I==="[]"&&y.parseArrays)e.isOverflow(x)?E=x:E=y.allowEmptyArrays&&(x===""||y.strictNullHandling&&x===null)?[]:e.combine([],x,y.arrayLimit,y.plainObjects);else{E=y.plainObjects?{__proto__:null}:{};var w=I.charAt(0)==="["&&I.charAt(I.length-1)==="]"?I.slice(1,-1):I,C=y.decodeDotInKeys?w.replace(/%2E/g,"."):w,A=parseInt(C,10),O=!isNaN(A)&&I!==C&&String(A)===C&&A>=0&&y.parseArrays;if(!y.parseArrays&&C==="")E={0:x};else if(O&&A<y.arrayLimit)E=[],E[A]=x;else{if(O&&y.throwOnLimitExceeded)throw new RangeError("Array limit exceeded. Only "+y.arrayLimit+" element"+(y.arrayLimit===1?"":"s")+" allowed in an array.");O?(E[A]=x,e.markOverflow(E,A)):C!=="__proto__"&&(E[C]=x)}}x=E}return x},u=function(g,y){var m=y.allowDots?g.replace(/\.([^.[]+)/g,"[$1]"):g;if(y.depth<=0)return!y.plainObjects&&t.call(Object.prototype,m)&&!y.allowPrototypes?void 0:[m];var v=/(\[[^[\]]*])/,b=/(\[[^[\]]*])/g,x=v.exec(m),T=x?m.slice(0,x.index):m,E=[];if(T){if(!y.plainObjects&&t.call(Object.prototype,T)&&!y.allowPrototypes)return;E[E.length]=T}for(var I=0;(x=b.exec(m))!==null&&I<y.depth;){I+=1;var w=x[1].slice(1,-1);if(!y.plainObjects&&t.call(Object.prototype,w)&&!y.allowPrototypes)return;E[E.length]=x[1]}if(x){if(y.strictDepth===!0)throw new RangeError("Input depth exceeded depth option of "+y.depth+" and strictDepth is true");E[E.length]="["+m.slice(x.index)+"]"}return E},d=function(g,y,m,v){if(g){var b=u(g,m);if(b)return c(b,y,m,v)}},f=function(g){if(!g)return r;if(typeof g.allowEmptyArrays<"u"&&typeof g.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof g.decodeDotInKeys<"u"&&typeof g.decodeDotInKeys!="boolean")throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(g.decoder!==null&&typeof g.decoder<"u"&&typeof g.decoder!="function")throw new TypeError("Decoder has to be a function.");if(typeof g.charset<"u"&&g.charset!=="utf-8"&&g.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");if(typeof g.throwOnLimitExceeded<"u"&&typeof g.throwOnLimitExceeded!="boolean")throw new TypeError("`throwOnLimitExceeded` option must be a boolean");var y=typeof g.charset>"u"?r.charset:g.charset,m=typeof g.duplicates>"u"?r.duplicates:g.duplicates;if(m!=="combine"&&m!=="first"&&m!=="last")throw new TypeError("The duplicates option must be either combine, first, or last");var v=typeof g.allowDots>"u"?g.decodeDotInKeys===!0?!0:r.allowDots:!!g.allowDots;return{allowDots:v,allowEmptyArrays:typeof g.allowEmptyArrays=="boolean"?!!g.allowEmptyArrays:r.allowEmptyArrays,allowPrototypes:typeof g.allowPrototypes=="boolean"?g.allowPrototypes:r.allowPrototypes,allowSparse:typeof g.allowSparse=="boolean"?g.allowSparse:r.allowSparse,arrayLimit:typeof g.arrayLimit=="number"?g.arrayLimit:r.arrayLimit,charset:y,charsetSentinel:typeof g.charsetSentinel=="boolean"?g.charsetSentinel:r.charsetSentinel,comma:typeof g.comma=="boolean"?g.comma:r.comma,decodeDotInKeys:typeof g.decodeDotInKeys=="boolean"?g.decodeDotInKeys:r.decodeDotInKeys,decoder:typeof g.decoder=="function"?g.decoder:r.decoder,delimiter:typeof g.delimiter=="string"||e.isRegExp(g.delimiter)?g.delimiter:r.delimiter,depth:typeof g.depth=="number"||g.depth===!1?+g.depth:r.depth,duplicates:m,ignoreQueryPrefix:g.ignoreQueryPrefix===!0,interpretNumericEntities:typeof g.interpretNumericEntities=="boolean"?g.interpretNumericEntities:r.interpretNumericEntities,parameterLimit:typeof g.parameterLimit=="number"?g.parameterLimit:r.parameterLimit,parseArrays:g.parseArrays!==!1,plainObjects:typeof g.plainObjects=="boolean"?g.plainObjects:r.plainObjects,strictDepth:typeof g.strictDepth=="boolean"?!!g.strictDepth:r.strictDepth,strictMerge:typeof g.strictMerge=="boolean"?!!g.strictMerge:r.strictMerge,strictNullHandling:typeof g.strictNullHandling=="boolean"?g.strictNullHandling:r.strictNullHandling,throwOnLimitExceeded:typeof g.throwOnLimitExceeded=="boolean"?g.throwOnLimitExceeded:!1}};return em=function(h,g){var y=f(g);if(h===""||h===null||typeof h>"u")return y.plainObjects?{__proto__:null}:{};for(var m=typeof h=="string"?l(h,y):h,v=y.plainObjects?{__proto__:null}:{},b=Object.keys(m),x=0;x<b.length;++x){var T=b[x],E=d(T,m[T],y,typeof h=="string");v=e.merge(v,E,y)}return y.allowSparse===!0?v:e.compact(v)},em}var tm,tC;function KW(){if(tC)return tm;tC=1;var e=GW(),t=YW(),n=Xh();return tm={formats:n,parse:t,stringify:e},tm}var ZW=KW(),et;(function(e){e.assertEqual=o=>{};function t(o){}e.assertIs=t;function n(o){throw new Error}e.assertNever=n,e.arrayToEnum=o=>{const i={};for(const s of o)i[s]=s;return i},e.getValidEnumValues=o=>{const i=e.objectKeys(o).filter(a=>typeof o[o[a]]!="number"),s={};for(const a of i)s[a]=o[a];return e.objectValues(s)},e.objectValues=o=>e.objectKeys(o).map(function(i){return o[i]}),e.objectKeys=typeof Object.keys=="function"?o=>Object.keys(o):o=>{const i=[];for(const s in o)Object.prototype.hasOwnProperty.call(o,s)&&i.push(s);return i},e.find=(o,i)=>{for(const s of o)if(i(s))return s},e.isInteger=typeof Number.isInteger=="function"?o=>Number.isInteger(o):o=>typeof o=="number"&&Number.isFinite(o)&&Math.floor(o)===o;function r(o,i=" | "){return o.map(s=>typeof s=="string"?`'${s}'`:s).join(i)}e.joinValues=r,e.jsonStringifyReplacer=(o,i)=>typeof i=="bigint"?i.toString():i})(et||(et={}));var nC;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(nC||(nC={}));const ke=et.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Kr=e=>{switch(typeof e){case"undefined":return ke.undefined;case"string":return ke.string;case"number":return Number.isNaN(e)?ke.nan:ke.number;case"boolean":return ke.boolean;case"function":return ke.function;case"bigint":return ke.bigint;case"symbol":return ke.symbol;case"object":return Array.isArray(e)?ke.array:e===null?ke.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?ke.promise:typeof Map<"u"&&e instanceof Map?ke.map:typeof Set<"u"&&e instanceof Set?ke.set:typeof Date<"u"&&e instanceof Date?ke.date:ke.object;default:return ke.unknown}},ye=et.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class Sr extends Error{get errors(){return this.issues}constructor(t){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=t}format(t){const n=t||function(i){return i.message},r={_errors:[]},o=i=>{for(const s of i.issues)if(s.code==="invalid_union")s.unionErrors.map(o);else if(s.code==="invalid_return_type")o(s.returnTypeError);else if(s.code==="invalid_arguments")o(s.argumentsError);else if(s.path.length===0)r._errors.push(n(s));else{let a=r,l=0;for(;l<s.path.length;){const c=s.path[l];l===s.path.length-1?(a[c]=a[c]||{_errors:[]},a[c]._errors.push(n(s))):a[c]=a[c]||{_errors:[]},a=a[c],l++}}};return o(this),r}static assert(t){if(!(t instanceof Sr))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,et.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=n=>n.message){const n={},r=[];for(const o of this.issues)o.path.length>0?(n[o.path[0]]=n[o.path[0]]||[],n[o.path[0]].push(t(o))):r.push(t(o));return{formErrors:r,fieldErrors:n}}get formErrors(){return this.flatten()}}Sr.create=e=>new Sr(e);const nm=(e,t)=>{let n;switch(e.code){case ye.invalid_type:e.received===ke.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case ye.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,et.jsonStringifyReplacer)}`;break;case ye.unrecognized_keys:n=`Unrecognized key(s) in object: ${et.joinValues(e.keys,", ")}`;break;case ye.invalid_union:n="Invalid input";break;case ye.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${et.joinValues(e.options)}`;break;case ye.invalid_enum_value:n=`Invalid enum value. Expected ${et.joinValues(e.options)}, received '${e.received}'`;break;case ye.invalid_arguments:n="Invalid function arguments";break;case ye.invalid_return_type:n="Invalid function return type";break;case ye.invalid_date:n="Invalid date";break;case ye.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:et.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case ye.too_small:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:n="Invalid input";break;case ye.too_big:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?n=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:n="Invalid input";break;case ye.custom:n="Invalid input";break;case ye.invalid_intersection_types:n="Intersection results could not be merged";break;case ye.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case ye.not_finite:n="Number must be finite";break;default:n=t.defaultError,et.assertNever(e)}return{message:n}};let XW=nm;function QW(){return XW}const JW=e=>{const{data:t,path:n,errorMaps:r,issueData:o}=e,i=[...n,...o.path||[]],s={...o,path:i};if(o.message!==void 0)return{...o,path:i,message:o.message};let a="";const l=r.filter(c=>!!c).slice().reverse();for(const c of l)a=c(s,{data:t,defaultError:a}).message;return{...o,path:i,message:a}};function xe(e,t){const n=QW(),r=JW({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===nm?void 0:nm].filter(o=>!!o)});e.common.issues.push(r)}class bn{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,n){const r=[];for(const o of n){if(o.status==="aborted")return Le;o.status==="dirty"&&t.dirty(),r.push(o.value)}return{status:t.value,value:r}}static async mergeObjectAsync(t,n){const r=[];for(const o of n){const i=await o.key,s=await o.value;r.push({key:i,value:s})}return bn.mergeObjectSync(t,r)}static mergeObjectSync(t,n){const r={};for(const o of n){const{key:i,value:s}=o;if(i.status==="aborted"||s.status==="aborted")return Le;i.status==="dirty"&&t.dirty(),s.status==="dirty"&&t.dirty(),i.value!=="__proto__"&&(typeof s.value<"u"||o.alwaysSet)&&(r[i.value]=s.value)}return{status:t.value,value:r}}}const Le=Object.freeze({status:"aborted"}),ca=e=>({status:"dirty",value:e}),An=e=>({status:"valid",value:e}),rC=e=>e.status==="aborted",oC=e=>e.status==="dirty",Fi=e=>e.status==="valid",Oc=e=>typeof Promise<"u"&&e instanceof Promise;var Ie;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t?.message})(Ie||(Ie={}));class Zr{constructor(t,n,r,o){this._cachedPath=[],this.parent=t,this.data=n,this._path=r,this._key=o}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const iC=(e,t)=>{if(Fi(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const n=new Sr(e.common.issues);return this._error=n,this._error}}};function Ge(e){if(!e)return{};const{errorMap:t,invalid_type_error:n,required_error:r,description:o}=e;if(t&&(n||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:o}:{errorMap:(s,a)=>{const{message:l}=e;return s.code==="invalid_enum_value"?{message:l??a.defaultError}:typeof a.data>"u"?{message:l??r??a.defaultError}:s.code!=="invalid_type"?{message:a.defaultError}:{message:l??n??a.defaultError}},description:o}}class Ze{get description(){return this._def.description}_getType(t){return Kr(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:Kr(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new bn,ctx:{common:t.parent.common,data:t.data,parsedType:Kr(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(Oc(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(t){const n=this._parse(t);return Promise.resolve(n)}parse(t,n){const r=this.safeParse(t,n);if(r.success)return r.data;throw r.error}safeParse(t,n){const r={common:{issues:[],async:n?.async??!1,contextualErrorMap:n?.errorMap},path:n?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Kr(t)},o=this._parseSync({data:t,path:r.path,parent:r});return iC(r,o)}"~validate"(t){const n={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Kr(t)};if(!this["~standard"].async)try{const r=this._parseSync({data:t,path:[],parent:n});return Fi(r)?{value:r.value}:{issues:n.common.issues}}catch(r){r?.message?.toLowerCase()?.includes("encountered")&&(this["~standard"].async=!0),n.common={issues:[],async:!0}}return this._parseAsync({data:t,path:[],parent:n}).then(r=>Fi(r)?{value:r.value}:{issues:n.common.issues})}async parseAsync(t,n){const r=await this.safeParseAsync(t,n);if(r.success)return r.data;throw r.error}async safeParseAsync(t,n){const r={common:{issues:[],contextualErrorMap:n?.errorMap,async:!0},path:n?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Kr(t)},o=this._parse({data:t,path:r.path,parent:r}),i=await(Oc(o)?o:Promise.resolve(o));return iC(r,i)}refine(t,n){const r=o=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(o):n;return this._refinement((o,i)=>{const s=t(o),a=()=>i.addIssue({code:ye.custom,...r(o)});return typeof Promise<"u"&&s instanceof Promise?s.then(l=>l?!0:(a(),!1)):s?!0:(a(),!1)})}refinement(t,n){return this._refinement((r,o)=>t(r)?!0:(o.addIssue(typeof n=="function"?n(r,o):n),!1))}_refinement(t){return new zi({schema:this,typeName:Ve.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:n=>this["~validate"](n)}}optional(){return Qr.create(this,this._def)}nullable(){return ji.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return cr.create(this)}promise(){return _c.create(this,this._def)}or(t){return Nc.create([this,t],this._def)}and(t){return Mc.create(this,t,this._def)}transform(t){return new zi({...Ge(this._def),schema:this,typeName:Ve.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new im({...Ge(this._def),innerType:this,defaultValue:n,typeName:Ve.ZodDefault})}brand(){return new S3({typeName:Ve.ZodBranded,type:this,...Ge(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new sm({...Ge(this._def),innerType:this,catchValue:n,typeName:Ve.ZodCatch})}describe(t){const n=this.constructor;return new n({...this._def,description:t})}pipe(t){return am.create(this,t)}readonly(){return lm.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const e3=/^c[^\s-]{8,}$/i,t3=/^[0-9a-z]+$/,n3=/^[0-9A-HJKMNP-TV-Z]{26}$/i,r3=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,o3=/^[a-z0-9_-]{21}$/i,i3=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,s3=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,a3=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,l3="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let rm;const c3=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,u3=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,d3=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,f3=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,p3=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,h3=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,sC="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",m3=new RegExp(`^${sC}$`);function aC(e){let t="[0-5]\\d";e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`);const n=e.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${t})${n}`}function g3(e){return new RegExp(`^${aC(e)}$`)}function y3(e){let t=`${sC}T${aC(e)}`;const n=[];return n.push(e.local?"Z?":"Z"),e.offset&&n.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${n.join("|")})`,new RegExp(`^${t}$`)}function v3(e,t){return!!((t==="v4"||!t)&&c3.test(e)||(t==="v6"||!t)&&d3.test(e))}function b3(e,t){if(!i3.test(e))return!1;try{const[n]=e.split("."),r=n.replace(/-/g,"+").replace(/_/g,"/").padEnd(n.length+(4-n.length%4)%4,"="),o=JSON.parse(atob(r));return!(typeof o!="object"||o===null||"typ"in o&&o?.typ!=="JWT"||!o.alg||t&&o.alg!==t)}catch{return!1}}function x3(e,t){return!!((t==="v4"||!t)&&u3.test(e)||(t==="v6"||!t)&&f3.test(e))}class No extends Ze{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==ke.string){const i=this._getOrReturnCtx(t);return xe(i,{code:ye.invalid_type,expected:ke.string,received:i.parsedType}),Le}const r=new bn;let o;for(const i of this._def.checks)if(i.kind==="min")t.data.length<i.value&&(o=this._getOrReturnCtx(t,o),xe(o,{code:ye.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),r.dirty());else if(i.kind==="max")t.data.length>i.value&&(o=this._getOrReturnCtx(t,o),xe(o,{code:ye.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),r.dirty());else if(i.kind==="length"){const s=t.data.length>i.value,a=t.data.length<i.value;(s||a)&&(o=this._getOrReturnCtx(t,o),s?xe(o,{code:ye.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):a&&xe(o,{code:ye.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),r.dirty())}else if(i.kind==="email")a3.test(t.data)||(o=this._getOrReturnCtx(t,o),xe(o,{validation:"email",code:ye.invalid_string,message:i.message}),r.dirty());else if(i.kind==="emoji")rm||(rm=new RegExp(l3,"u")),rm.test(t.data)||(o=this._getOrReturnCtx(t,o),xe(o,{validation:"emoji",code:ye.invalid_string,message:i.message}),r.dirty());else if(i.kind==="uuid")r3.test(t.data)||(o=this._getOrReturnCtx(t,o),xe(o,{validation:"uuid",code:ye.invalid_string,message:i.message}),r.dirty());else if(i.kind==="nanoid")o3.test(t.data)||(o=this._getOrReturnCtx(t,o),xe(o,{validation:"nanoid",code:ye.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid")e3.test(t.data)||(o=this._getOrReturnCtx(t,o),xe(o,{validation:"cuid",code:ye.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid2")t3.test(t.data)||(o=this._getOrReturnCtx(t,o),xe(o,{validation:"cuid2",code:ye.invalid_string,message:i.message}),r.dirty());else if(i.kind==="ulid")n3.test(t.data)||(o=this._getOrReturnCtx(t,o),xe(o,{validation:"ulid",code:ye.invalid_string,message:i.message}),r.dirty());else if(i.kind==="url")try{new URL(t.data)}catch{o=this._getOrReturnCtx(t,o),xe(o,{validation:"url",code:ye.invalid_string,message:i.message}),r.dirty()}else i.kind==="regex"?(i.regex.lastIndex=0,i.regex.test(t.data)||(o=this._getOrReturnCtx(t,o),xe(o,{validation:"regex",code:ye.invalid_string,message:i.message}),r.dirty())):i.kind==="trim"?t.data=t.data.trim():i.kind==="includes"?t.data.includes(i.value,i.position)||(o=this._getOrReturnCtx(t,o),xe(o,{code:ye.invalid_string,validation:{includes:i.value,position:i.position},message:i.message}),r.dirty()):i.kind==="toLowerCase"?t.data=t.data.toLowerCase():i.kind==="toUpperCase"?t.data=t.data.toUpperCase():i.kind==="startsWith"?t.data.startsWith(i.value)||(o=this._getOrReturnCtx(t,o),xe(o,{code:ye.invalid_string,validation:{startsWith:i.value},message:i.message}),r.dirty()):i.kind==="endsWith"?t.data.endsWith(i.value)||(o=this._getOrReturnCtx(t,o),xe(o,{code:ye.invalid_string,validation:{endsWith:i.value},message:i.message}),r.dirty()):i.kind==="datetime"?y3(i).test(t.data)||(o=this._getOrReturnCtx(t,o),xe(o,{code:ye.invalid_string,validation:"datetime",message:i.message}),r.dirty()):i.kind==="date"?m3.test(t.data)||(o=this._getOrReturnCtx(t,o),xe(o,{code:ye.invalid_string,validation:"date",message:i.message}),r.dirty()):i.kind==="time"?g3(i).test(t.data)||(o=this._getOrReturnCtx(t,o),xe(o,{code:ye.invalid_string,validation:"time",message:i.message}),r.dirty()):i.kind==="duration"?s3.test(t.data)||(o=this._getOrReturnCtx(t,o),xe(o,{validation:"duration",code:ye.invalid_string,message:i.message}),r.dirty()):i.kind==="ip"?v3(t.data,i.version)||(o=this._getOrReturnCtx(t,o),xe(o,{validation:"ip",code:ye.invalid_string,message:i.message}),r.dirty()):i.kind==="jwt"?b3(t.data,i.alg)||(o=this._getOrReturnCtx(t,o),xe(o,{validation:"jwt",code:ye.invalid_string,message:i.message}),r.dirty()):i.kind==="cidr"?x3(t.data,i.version)||(o=this._getOrReturnCtx(t,o),xe(o,{validation:"cidr",code:ye.invalid_string,message:i.message}),r.dirty()):i.kind==="base64"?p3.test(t.data)||(o=this._getOrReturnCtx(t,o),xe(o,{validation:"base64",code:ye.invalid_string,message:i.message}),r.dirty()):i.kind==="base64url"?h3.test(t.data)||(o=this._getOrReturnCtx(t,o),xe(o,{validation:"base64url",code:ye.invalid_string,message:i.message}),r.dirty()):et.assertNever(i);return{status:r.value,value:t.data}}_regex(t,n,r){return this.refinement(o=>t.test(o),{validation:n,code:ye.invalid_string,...Ie.errToObj(r)})}_addCheck(t){return new No({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...Ie.errToObj(t)})}url(t){return this._addCheck({kind:"url",...Ie.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...Ie.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...Ie.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...Ie.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...Ie.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...Ie.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...Ie.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...Ie.errToObj(t)})}base64url(t){return this._addCheck({kind:"base64url",...Ie.errToObj(t)})}jwt(t){return this._addCheck({kind:"jwt",...Ie.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...Ie.errToObj(t)})}cidr(t){return this._addCheck({kind:"cidr",...Ie.errToObj(t)})}datetime(t){return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof t?.precision>"u"?null:t?.precision,offset:t?.offset??!1,local:t?.local??!1,...Ie.errToObj(t?.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof t?.precision>"u"?null:t?.precision,...Ie.errToObj(t?.message)})}duration(t){return this._addCheck({kind:"duration",...Ie.errToObj(t)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...Ie.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n?.position,...Ie.errToObj(n?.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...Ie.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...Ie.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...Ie.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...Ie.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...Ie.errToObj(n)})}nonempty(t){return this.min(1,Ie.errToObj(t))}trim(){return new No({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new No({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new No({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isDate(){return!!this._def.checks.find(t=>t.kind==="date")}get isTime(){return!!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return!!this._def.checks.find(t=>t.kind==="duration")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(t=>t.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get isCIDR(){return!!this._def.checks.find(t=>t.kind==="cidr")}get isBase64(){return!!this._def.checks.find(t=>t.kind==="base64")}get isBase64url(){return!!this._def.checks.find(t=>t.kind==="base64url")}get minLength(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxLength(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}No.create=e=>new No({checks:[],typeName:Ve.ZodString,coerce:e?.coerce??!1,...Ge(e)});function w3(e,t){const n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,o=n>r?n:r,i=Number.parseInt(e.toFixed(o).replace(".","")),s=Number.parseInt(t.toFixed(o).replace(".",""));return i%s/10**o}class Li extends Ze{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==ke.number){const i=this._getOrReturnCtx(t);return xe(i,{code:ye.invalid_type,expected:ke.number,received:i.parsedType}),Le}let r;const o=new bn;for(const i of this._def.checks)i.kind==="int"?et.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),xe(r,{code:ye.invalid_type,expected:"integer",received:"float",message:i.message}),o.dirty()):i.kind==="min"?(i.inclusive?t.data<i.value:t.data<=i.value)&&(r=this._getOrReturnCtx(t,r),xe(r,{code:ye.too_small,minimum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),o.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(r=this._getOrReturnCtx(t,r),xe(r,{code:ye.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),o.dirty()):i.kind==="multipleOf"?w3(t.data,i.value)!==0&&(r=this._getOrReturnCtx(t,r),xe(r,{code:ye.not_multiple_of,multipleOf:i.value,message:i.message}),o.dirty()):i.kind==="finite"?Number.isFinite(t.data)||(r=this._getOrReturnCtx(t,r),xe(r,{code:ye.not_finite,message:i.message}),o.dirty()):et.assertNever(i);return{status:o.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,Ie.toString(n))}gt(t,n){return this.setLimit("min",t,!1,Ie.toString(n))}lte(t,n){return this.setLimit("max",t,!0,Ie.toString(n))}lt(t,n){return this.setLimit("max",t,!1,Ie.toString(n))}setLimit(t,n,r,o){return new Li({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:Ie.toString(o)}]})}_addCheck(t){return new Li({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:Ie.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:Ie.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:Ie.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:Ie.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:Ie.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:Ie.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:Ie.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:Ie.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:Ie.toString(t)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&et.isInteger(t.value))}get isFinite(){let t=null,n=null;for(const r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(n===null||r.value>n)&&(n=r.value):r.kind==="max"&&(t===null||r.value<t)&&(t=r.value)}return Number.isFinite(n)&&Number.isFinite(t)}}Li.create=e=>new Li({checks:[],typeName:Ve.ZodNumber,coerce:e?.coerce||!1,...Ge(e)});class ua extends Ze{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce)try{t.data=BigInt(t.data)}catch{return this._getInvalidInput(t)}if(this._getType(t)!==ke.bigint)return this._getInvalidInput(t);let r;const o=new bn;for(const i of this._def.checks)i.kind==="min"?(i.inclusive?t.data<i.value:t.data<=i.value)&&(r=this._getOrReturnCtx(t,r),xe(r,{code:ye.too_small,type:"bigint",minimum:i.value,inclusive:i.inclusive,message:i.message}),o.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(r=this._getOrReturnCtx(t,r),xe(r,{code:ye.too_big,type:"bigint",maximum:i.value,inclusive:i.inclusive,message:i.message}),o.dirty()):i.kind==="multipleOf"?t.data%i.value!==BigInt(0)&&(r=this._getOrReturnCtx(t,r),xe(r,{code:ye.not_multiple_of,multipleOf:i.value,message:i.message}),o.dirty()):et.assertNever(i);return{status:o.value,value:t.data}}_getInvalidInput(t){const n=this._getOrReturnCtx(t);return xe(n,{code:ye.invalid_type,expected:ke.bigint,received:n.parsedType}),Le}gte(t,n){return this.setLimit("min",t,!0,Ie.toString(n))}gt(t,n){return this.setLimit("min",t,!1,Ie.toString(n))}lte(t,n){return this.setLimit("max",t,!0,Ie.toString(n))}lt(t,n){return this.setLimit("max",t,!1,Ie.toString(n))}setLimit(t,n,r,o){return new ua({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:Ie.toString(o)}]})}_addCheck(t){return new ua({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:Ie.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:Ie.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:Ie.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:Ie.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:Ie.toString(n)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}ua.create=e=>new ua({checks:[],typeName:Ve.ZodBigInt,coerce:e?.coerce??!1,...Ge(e)});class lC extends Ze{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==ke.boolean){const r=this._getOrReturnCtx(t);return xe(r,{code:ye.invalid_type,expected:ke.boolean,received:r.parsedType}),Le}return An(t.data)}}lC.create=e=>new lC({typeName:Ve.ZodBoolean,coerce:e?.coerce||!1,...Ge(e)});class Dc extends Ze{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==ke.date){const i=this._getOrReturnCtx(t);return xe(i,{code:ye.invalid_type,expected:ke.date,received:i.parsedType}),Le}if(Number.isNaN(t.data.getTime())){const i=this._getOrReturnCtx(t);return xe(i,{code:ye.invalid_date}),Le}const r=new bn;let o;for(const i of this._def.checks)i.kind==="min"?t.data.getTime()<i.value&&(o=this._getOrReturnCtx(t,o),xe(o,{code:ye.too_small,message:i.message,inclusive:!0,exact:!1,minimum:i.value,type:"date"}),r.dirty()):i.kind==="max"?t.data.getTime()>i.value&&(o=this._getOrReturnCtx(t,o),xe(o,{code:ye.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),r.dirty()):et.assertNever(i);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new Dc({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:Ie.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:Ie.toString(n)})}get minDate(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t!=null?new Date(t):null}}Dc.create=e=>new Dc({checks:[],coerce:e?.coerce||!1,typeName:Ve.ZodDate,...Ge(e)});class cC extends Ze{_parse(t){if(this._getType(t)!==ke.symbol){const r=this._getOrReturnCtx(t);return xe(r,{code:ye.invalid_type,expected:ke.symbol,received:r.parsedType}),Le}return An(t.data)}}cC.create=e=>new cC({typeName:Ve.ZodSymbol,...Ge(e)});class uC extends Ze{_parse(t){if(this._getType(t)!==ke.undefined){const r=this._getOrReturnCtx(t);return xe(r,{code:ye.invalid_type,expected:ke.undefined,received:r.parsedType}),Le}return An(t.data)}}uC.create=e=>new uC({typeName:Ve.ZodUndefined,...Ge(e)});class dC extends Ze{_parse(t){if(this._getType(t)!==ke.null){const r=this._getOrReturnCtx(t);return xe(r,{code:ye.invalid_type,expected:ke.null,received:r.parsedType}),Le}return An(t.data)}}dC.create=e=>new dC({typeName:Ve.ZodNull,...Ge(e)});class fC extends Ze{constructor(){super(...arguments),this._any=!0}_parse(t){return An(t.data)}}fC.create=e=>new fC({typeName:Ve.ZodAny,...Ge(e)});class pC extends Ze{constructor(){super(...arguments),this._unknown=!0}_parse(t){return An(t.data)}}pC.create=e=>new pC({typeName:Ve.ZodUnknown,...Ge(e)});class Xr extends Ze{_parse(t){const n=this._getOrReturnCtx(t);return xe(n,{code:ye.invalid_type,expected:ke.never,received:n.parsedType}),Le}}Xr.create=e=>new Xr({typeName:Ve.ZodNever,...Ge(e)});class hC extends Ze{_parse(t){if(this._getType(t)!==ke.undefined){const r=this._getOrReturnCtx(t);return xe(r,{code:ye.invalid_type,expected:ke.void,received:r.parsedType}),Le}return An(t.data)}}hC.create=e=>new hC({typeName:Ve.ZodVoid,...Ge(e)});class cr extends Ze{_parse(t){const{ctx:n,status:r}=this._processInputParams(t),o=this._def;if(n.parsedType!==ke.array)return xe(n,{code:ye.invalid_type,expected:ke.array,received:n.parsedType}),Le;if(o.exactLength!==null){const s=n.data.length>o.exactLength.value,a=n.data.length<o.exactLength.value;(s||a)&&(xe(n,{code:s?ye.too_big:ye.too_small,minimum:a?o.exactLength.value:void 0,maximum:s?o.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:o.exactLength.message}),r.dirty())}if(o.minLength!==null&&n.data.length<o.minLength.value&&(xe(n,{code:ye.too_small,minimum:o.minLength.value,type:"array",inclusive:!0,exact:!1,message:o.minLength.message}),r.dirty()),o.maxLength!==null&&n.data.length>o.maxLength.value&&(xe(n,{code:ye.too_big,maximum:o.maxLength.value,type:"array",inclusive:!0,exact:!1,message:o.maxLength.message}),r.dirty()),n.common.async)return Promise.all([...n.data].map((s,a)=>o.type._parseAsync(new Zr(n,s,n.path,a)))).then(s=>bn.mergeArray(r,s));const i=[...n.data].map((s,a)=>o.type._parseSync(new Zr(n,s,n.path,a)));return bn.mergeArray(r,i)}get element(){return this._def.type}min(t,n){return new cr({...this._def,minLength:{value:t,message:Ie.toString(n)}})}max(t,n){return new cr({...this._def,maxLength:{value:t,message:Ie.toString(n)}})}length(t,n){return new cr({...this._def,exactLength:{value:t,message:Ie.toString(n)}})}nonempty(t){return this.min(1,t)}}cr.create=(e,t)=>new cr({type:e,minLength:null,maxLength:null,exactLength:null,typeName:Ve.ZodArray,...Ge(t)});function Vi(e){if(e instanceof Bt){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=Qr.create(Vi(r))}return new Bt({...e._def,shape:()=>t})}else return e instanceof cr?new cr({...e._def,type:Vi(e.element)}):e instanceof Qr?Qr.create(Vi(e.unwrap())):e instanceof ji?ji.create(Vi(e.unwrap())):e instanceof Mo?Mo.create(e.items.map(t=>Vi(t))):e}class Bt extends Ze{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const t=this._def.shape(),n=et.objectKeys(t);return this._cached={shape:t,keys:n},this._cached}_parse(t){if(this._getType(t)!==ke.object){const c=this._getOrReturnCtx(t);return xe(c,{code:ye.invalid_type,expected:ke.object,received:c.parsedType}),Le}const{status:r,ctx:o}=this._processInputParams(t),{shape:i,keys:s}=this._getCached(),a=[];if(!(this._def.catchall instanceof Xr&&this._def.unknownKeys==="strip"))for(const c in o.data)s.includes(c)||a.push(c);const l=[];for(const c of s){const u=i[c],d=o.data[c];l.push({key:{status:"valid",value:c},value:u._parse(new Zr(o,d,o.path,c)),alwaysSet:c in o.data})}if(this._def.catchall instanceof Xr){const c=this._def.unknownKeys;if(c==="passthrough")for(const u of a)l.push({key:{status:"valid",value:u},value:{status:"valid",value:o.data[u]}});else if(c==="strict")a.length>0&&(xe(o,{code:ye.unrecognized_keys,keys:a}),r.dirty());else if(c!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const c=this._def.catchall;for(const u of a){const d=o.data[u];l.push({key:{status:"valid",value:u},value:c._parse(new Zr(o,d,o.path,u)),alwaysSet:u in o.data})}}return o.common.async?Promise.resolve().then(async()=>{const c=[];for(const u of l){const d=await u.key,f=await u.value;c.push({key:d,value:f,alwaysSet:u.alwaysSet})}return c}).then(c=>bn.mergeObjectSync(r,c)):bn.mergeObjectSync(r,l)}get shape(){return this._def.shape()}strict(t){return Ie.errToObj,new Bt({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,r)=>{const o=this._def.errorMap?.(n,r).message??r.defaultError;return n.code==="unrecognized_keys"?{message:Ie.errToObj(t).message??o}:{message:o}}}:{}})}strip(){return new Bt({...this._def,unknownKeys:"strip"})}passthrough(){return new Bt({...this._def,unknownKeys:"passthrough"})}extend(t){return new Bt({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new Bt({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:Ve.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new Bt({...this._def,catchall:t})}pick(t){const n={};for(const r of et.objectKeys(t))t[r]&&this.shape[r]&&(n[r]=this.shape[r]);return new Bt({...this._def,shape:()=>n})}omit(t){const n={};for(const r of et.objectKeys(this.shape))t[r]||(n[r]=this.shape[r]);return new Bt({...this._def,shape:()=>n})}deepPartial(){return Vi(this)}partial(t){const n={};for(const r of et.objectKeys(this.shape)){const o=this.shape[r];t&&!t[r]?n[r]=o:n[r]=o.optional()}return new Bt({...this._def,shape:()=>n})}required(t){const n={};for(const r of et.objectKeys(this.shape))if(t&&!t[r])n[r]=this.shape[r];else{let i=this.shape[r];for(;i instanceof Qr;)i=i._def.innerType;n[r]=i}return new Bt({...this._def,shape:()=>n})}keyof(){return vC(et.objectKeys(this.shape))}}Bt.create=(e,t)=>new Bt({shape:()=>e,unknownKeys:"strip",catchall:Xr.create(),typeName:Ve.ZodObject,...Ge(t)}),Bt.strictCreate=(e,t)=>new Bt({shape:()=>e,unknownKeys:"strict",catchall:Xr.create(),typeName:Ve.ZodObject,...Ge(t)}),Bt.lazycreate=(e,t)=>new Bt({shape:e,unknownKeys:"strip",catchall:Xr.create(),typeName:Ve.ZodObject,...Ge(t)});class Nc extends Ze{_parse(t){const{ctx:n}=this._processInputParams(t),r=this._def.options;function o(i){for(const a of i)if(a.result.status==="valid")return a.result;for(const a of i)if(a.result.status==="dirty")return n.common.issues.push(...a.ctx.common.issues),a.result;const s=i.map(a=>new Sr(a.ctx.common.issues));return xe(n,{code:ye.invalid_union,unionErrors:s}),Le}if(n.common.async)return Promise.all(r.map(async i=>{const s={...n,common:{...n.common,issues:[]},parent:null};return{result:await i._parseAsync({data:n.data,path:n.path,parent:s}),ctx:s}})).then(o);{let i;const s=[];for(const l of r){const c={...n,common:{...n.common,issues:[]},parent:null},u=l._parseSync({data:n.data,path:n.path,parent:c});if(u.status==="valid")return u;u.status==="dirty"&&!i&&(i={result:u,ctx:c}),c.common.issues.length&&s.push(c.common.issues)}if(i)return n.common.issues.push(...i.ctx.common.issues),i.result;const a=s.map(l=>new Sr(l));return xe(n,{code:ye.invalid_union,unionErrors:a}),Le}}get options(){return this._def.options}}Nc.create=(e,t)=>new Nc({options:e,typeName:Ve.ZodUnion,...Ge(t)});function om(e,t){const n=Kr(e),r=Kr(t);if(e===t)return{valid:!0,data:e};if(n===ke.object&&r===ke.object){const o=et.objectKeys(t),i=et.objectKeys(e).filter(a=>o.indexOf(a)!==-1),s={...e,...t};for(const a of i){const l=om(e[a],t[a]);if(!l.valid)return{valid:!1};s[a]=l.data}return{valid:!0,data:s}}else if(n===ke.array&&r===ke.array){if(e.length!==t.length)return{valid:!1};const o=[];for(let i=0;i<e.length;i++){const s=e[i],a=t[i],l=om(s,a);if(!l.valid)return{valid:!1};o.push(l.data)}return{valid:!0,data:o}}else return n===ke.date&&r===ke.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class Mc extends Ze{_parse(t){const{status:n,ctx:r}=this._processInputParams(t),o=(i,s)=>{if(rC(i)||rC(s))return Le;const a=om(i.value,s.value);return a.valid?((oC(i)||oC(s))&&n.dirty(),{status:n.value,value:a.data}):(xe(r,{code:ye.invalid_intersection_types}),Le)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([i,s])=>o(i,s)):o(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}Mc.create=(e,t,n)=>new Mc({left:e,right:t,typeName:Ve.ZodIntersection,...Ge(n)});class Mo extends Ze{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==ke.array)return xe(r,{code:ye.invalid_type,expected:ke.array,received:r.parsedType}),Le;if(r.data.length<this._def.items.length)return xe(r,{code:ye.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),Le;!this._def.rest&&r.data.length>this._def.items.length&&(xe(r,{code:ye.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const i=[...r.data].map((s,a)=>{const l=this._def.items[a]||this._def.rest;return l?l._parse(new Zr(r,s,r.path,a)):null}).filter(s=>!!s);return r.common.async?Promise.all(i).then(s=>bn.mergeArray(n,s)):bn.mergeArray(n,i)}get items(){return this._def.items}rest(t){return new Mo({...this._def,rest:t})}}Mo.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Mo({items:e,typeName:Ve.ZodTuple,rest:null,...Ge(t)})};class mC extends Ze{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==ke.map)return xe(r,{code:ye.invalid_type,expected:ke.map,received:r.parsedType}),Le;const o=this._def.keyType,i=this._def.valueType,s=[...r.data.entries()].map(([a,l],c)=>({key:o._parse(new Zr(r,a,r.path,[c,"key"])),value:i._parse(new Zr(r,l,r.path,[c,"value"]))}));if(r.common.async){const a=new Map;return Promise.resolve().then(async()=>{for(const l of s){const c=await l.key,u=await l.value;if(c.status==="aborted"||u.status==="aborted")return Le;(c.status==="dirty"||u.status==="dirty")&&n.dirty(),a.set(c.value,u.value)}return{status:n.value,value:a}})}else{const a=new Map;for(const l of s){const c=l.key,u=l.value;if(c.status==="aborted"||u.status==="aborted")return Le;(c.status==="dirty"||u.status==="dirty")&&n.dirty(),a.set(c.value,u.value)}return{status:n.value,value:a}}}}mC.create=(e,t,n)=>new mC({valueType:t,keyType:e,typeName:Ve.ZodMap,...Ge(n)});class da extends Ze{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==ke.set)return xe(r,{code:ye.invalid_type,expected:ke.set,received:r.parsedType}),Le;const o=this._def;o.minSize!==null&&r.data.size<o.minSize.value&&(xe(r,{code:ye.too_small,minimum:o.minSize.value,type:"set",inclusive:!0,exact:!1,message:o.minSize.message}),n.dirty()),o.maxSize!==null&&r.data.size>o.maxSize.value&&(xe(r,{code:ye.too_big,maximum:o.maxSize.value,type:"set",inclusive:!0,exact:!1,message:o.maxSize.message}),n.dirty());const i=this._def.valueType;function s(l){const c=new Set;for(const u of l){if(u.status==="aborted")return Le;u.status==="dirty"&&n.dirty(),c.add(u.value)}return{status:n.value,value:c}}const a=[...r.data.values()].map((l,c)=>i._parse(new Zr(r,l,r.path,c)));return r.common.async?Promise.all(a).then(l=>s(l)):s(a)}min(t,n){return new da({...this._def,minSize:{value:t,message:Ie.toString(n)}})}max(t,n){return new da({...this._def,maxSize:{value:t,message:Ie.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}}da.create=(e,t)=>new da({valueType:e,minSize:null,maxSize:null,typeName:Ve.ZodSet,...Ge(t)});class gC extends Ze{get schema(){return this._def.getter()}_parse(t){const{ctx:n}=this._processInputParams(t);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}}gC.create=(e,t)=>new gC({getter:e,typeName:Ve.ZodLazy,...Ge(t)});class yC extends Ze{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return xe(n,{received:n.data,code:ye.invalid_literal,expected:this._def.value}),Le}return{status:"valid",value:t.data}}get value(){return this._def.value}}yC.create=(e,t)=>new yC({value:e,typeName:Ve.ZodLiteral,...Ge(t)});function vC(e,t){return new $i({values:e,typeName:Ve.ZodEnum,...Ge(t)})}class $i extends Ze{_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),r=this._def.values;return xe(n,{expected:et.joinValues(r),received:n.parsedType,code:ye.invalid_type}),Le}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(t.data)){const n=this._getOrReturnCtx(t),r=this._def.values;return xe(n,{received:n.data,code:ye.invalid_enum_value,options:r}),Le}return An(t.data)}get options(){return this._def.values}get enum(){const t={};for(const n of this._def.values)t[n]=n;return t}get Values(){const t={};for(const n of this._def.values)t[n]=n;return t}get Enum(){const t={};for(const n of this._def.values)t[n]=n;return t}extract(t,n=this._def){return $i.create(t,{...this._def,...n})}exclude(t,n=this._def){return $i.create(this.options.filter(r=>!t.includes(r)),{...this._def,...n})}}$i.create=vC;class bC extends Ze{_parse(t){const n=et.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==ke.string&&r.parsedType!==ke.number){const o=et.objectValues(n);return xe(r,{expected:et.joinValues(o),received:r.parsedType,code:ye.invalid_type}),Le}if(this._cache||(this._cache=new Set(et.getValidEnumValues(this._def.values))),!this._cache.has(t.data)){const o=et.objectValues(n);return xe(r,{received:r.data,code:ye.invalid_enum_value,options:o}),Le}return An(t.data)}get enum(){return this._def.values}}bC.create=(e,t)=>new bC({values:e,typeName:Ve.ZodNativeEnum,...Ge(t)});class _c extends Ze{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==ke.promise&&n.common.async===!1)return xe(n,{code:ye.invalid_type,expected:ke.promise,received:n.parsedType}),Le;const r=n.parsedType===ke.promise?n.data:Promise.resolve(n.data);return An(r.then(o=>this._def.type.parseAsync(o,{path:n.path,errorMap:n.common.contextualErrorMap})))}}_c.create=(e,t)=>new _c({type:e,typeName:Ve.ZodPromise,...Ge(t)});class zi extends Ze{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Ve.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:n,ctx:r}=this._processInputParams(t),o=this._def.effect||null,i={addIssue:s=>{xe(r,s),s.fatal?n.abort():n.dirty()},get path(){return r.path}};if(i.addIssue=i.addIssue.bind(i),o.type==="preprocess"){const s=o.transform(r.data,i);if(r.common.async)return Promise.resolve(s).then(async a=>{if(n.value==="aborted")return Le;const l=await this._def.schema._parseAsync({data:a,path:r.path,parent:r});return l.status==="aborted"?Le:l.status==="dirty"||n.value==="dirty"?ca(l.value):l});{if(n.value==="aborted")return Le;const a=this._def.schema._parseSync({data:s,path:r.path,parent:r});return a.status==="aborted"?Le:a.status==="dirty"||n.value==="dirty"?ca(a.value):a}}if(o.type==="refinement"){const s=a=>{const l=o.refinement(a,i);if(r.common.async)return Promise.resolve(l);if(l instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return a};if(r.common.async===!1){const a=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return a.status==="aborted"?Le:(a.status==="dirty"&&n.dirty(),s(a.value),{status:n.value,value:a.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(a=>a.status==="aborted"?Le:(a.status==="dirty"&&n.dirty(),s(a.value).then(()=>({status:n.value,value:a.value}))))}if(o.type==="transform")if(r.common.async===!1){const s=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!Fi(s))return Le;const a=o.transform(s.value,i);if(a instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:a}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(s=>Fi(s)?Promise.resolve(o.transform(s.value,i)).then(a=>({status:n.value,value:a})):Le);et.assertNever(o)}}zi.create=(e,t,n)=>new zi({schema:e,typeName:Ve.ZodEffects,effect:t,...Ge(n)}),zi.createWithPreprocess=(e,t,n)=>new zi({schema:t,effect:{type:"preprocess",transform:e},typeName:Ve.ZodEffects,...Ge(n)});class Qr extends Ze{_parse(t){return this._getType(t)===ke.undefined?An(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Qr.create=(e,t)=>new Qr({innerType:e,typeName:Ve.ZodOptional,...Ge(t)});class ji extends Ze{_parse(t){return this._getType(t)===ke.null?An(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}ji.create=(e,t)=>new ji({innerType:e,typeName:Ve.ZodNullable,...Ge(t)});class im extends Ze{_parse(t){const{ctx:n}=this._processInputParams(t);let r=n.data;return n.parsedType===ke.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}im.create=(e,t)=>new im({innerType:e,typeName:Ve.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...Ge(t)});class sm extends Ze{_parse(t){const{ctx:n}=this._processInputParams(t),r={...n,common:{...n.common,issues:[]}},o=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return Oc(o)?o.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new Sr(r.common.issues)},input:r.data})})):{status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new Sr(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}sm.create=(e,t)=>new sm({innerType:e,typeName:Ve.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...Ge(t)});class xC extends Ze{_parse(t){if(this._getType(t)!==ke.nan){const r=this._getOrReturnCtx(t);return xe(r,{code:ye.invalid_type,expected:ke.nan,received:r.parsedType}),Le}return{status:"valid",value:t.data}}}xC.create=e=>new xC({typeName:Ve.ZodNaN,...Ge(e)});class S3 extends Ze{_parse(t){const{ctx:n}=this._processInputParams(t),r=n.data;return this._def.type._parse({data:r,path:n.path,parent:n})}unwrap(){return this._def.type}}class am extends Ze{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.common.async)return(async()=>{const i=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return i.status==="aborted"?Le:i.status==="dirty"?(n.dirty(),ca(i.value)):this._def.out._parseAsync({data:i.value,path:r.path,parent:r})})();{const o=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return o.status==="aborted"?Le:o.status==="dirty"?(n.dirty(),{status:"dirty",value:o.value}):this._def.out._parseSync({data:o.value,path:r.path,parent:r})}}static create(t,n){return new am({in:t,out:n,typeName:Ve.ZodPipeline})}}class lm extends Ze{_parse(t){const n=this._def.innerType._parse(t),r=o=>(Fi(o)&&(o.value=Object.freeze(o.value)),o);return Oc(n)?n.then(o=>r(o)):r(n)}unwrap(){return this._def.innerType}}lm.create=(e,t)=>new lm({innerType:e,typeName:Ve.ZodReadonly,...Ge(t)});var Ve;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(Ve||(Ve={})),Xr.create,cr.create,Nc.create,Mc.create,Mo.create,$i.create,_c.create,Qr.create,ji.create;const T3=e=>{if(typeof e!="string")try{e=JSON.stringify(e)}catch{return!1}try{return JSON.parse(e),!0}catch{return!1}},E3=(e,t,n)=>{const r=t.length-1;for(let o=0;o<t.length;o++){const i=t[o];if(o===r)e[i]=n;else{if(!(i in e)||typeof e[i]!="object"){const s=t[o+1];e[i]=isNaN(Number(s))?{}:[]}e=e[i]}}},wC=e=>e.replace(/\[(\d+)]/g,".$1").split("."),xn=(e,t,n)=>{const r=Array.isArray(t)?t.map(String):wC(t),o=structuredClone(e);return E3(o,r,n),o},C3=(e,t)=>e.localeCompare(t),Bi={},SC=e=>{const t=e._def.typeName;if(t==="ZodDefault")return e._def.defaultValue();if(t==="ZodObject")return TC(e);if(t==="ZodArray")return[];if("innerType"in e._def){const n=SC(e._def.innerType);return t==="ZodArray"?n??[]:n}},TC=e=>Object.fromEntries(Object.entries(e.shape).map(([t,n])=>[t,SC(n)])),EC=(e,t)=>{const n=structuredClone(e);for(const r in t){const o=t[r],i=e[r];o!==void 0&&(typeof o=="object"&&o!==null&&!Array.isArray(o)&&typeof i=="object"&&i!==null&&!Array.isArray(i)?n[r]=EC(i,o):n[r]=o||i)}return n},k3={sort:C3,allowDots:!0,charset:"utf-8",parseArrays:!0,plainObjects:!0,charsetSentinel:!0,allowPrototypes:!1,depth:Number.MAX_SAFE_INTEGER,arrayLimit:Number.MAX_SAFE_INTEGER,parameterLimit:Number.MAX_SAFE_INTEGER},CC=e=>{const t=new FormData(e),n=new URLSearchParams(t);return ZW.parse(n.toString(),k3)},Jr=(e,t)=>wC(e).reduce((n,r)=>{if(r==="")return n;const o=n.shape?.[r]||n;return o._def.typeName==="ZodArray"?o.element:o},t),eo=e=>e.dataset.value?e.dataset.value:e.type==="checkbox"?e.checked:e.type==="number"?e.valueAsNumber:e.value||e.getAttribute("value"),cm=e=>{const t=e.dataset.target;if(!t)return eo(e);const n=document.querySelector(`[data-origin="${t}"]`);return eo(n||e)},I3={state:{},loading:!1,useOnChange:!1},kC=e=>e.dataset.target||e.name,A3=e=>{const t=`@use-form/${e}`;return{get:()=>{const n=Gs.LocalStorage.get(t);return T3(n)?n:{}},clear:()=>{Gs.LocalStorage.delete(t)},set:n=>Gs.LocalStorage.set(t,n)}},P3=(e,t,n=I3)=>{const[r,o]=S.useState(null),i=S.useRef({}),[s,a]=S.useState(()=>He.function(n?.state)?n.state():n?.state??TC(e)??{}),l=S.useCallback(x=>{const T=x.target,E=x.currentTarget;if(T.dataset.optional==="true")return;const w=kC(T),C=cm(T)||(E?eo(E):""),A=Jr(w,e);if(T.setAttribute("data-initialized","true"),A){const O=A.safeParse(C),_=O.success?void 0:O.error.issues[0]?.message??"";o(N=>xn(N??{},w,_))}},[e]),c=S.useCallback(x=>T=>{const E=T.currentTarget,I=Object.values(i.current).reduce((C,A)=>{const O=A.element,_=A.schema.safeParse(eo(O));if(O.dataset.ignore==="ignore"||_.success)return C;const N=_.error.issues[0]?.message;O.setAttribute("data-initialized","true");const $=O.dataset.name||O.name||"";return xn(C,$,N)},{}),w=He.empty(I)?null:I;o(w),console.error(w),x?.({form:E,errors:w||{}})},[]),u=(x,T=Bi)=>{const E=Jr(x,e),I=w=>{if(!pc(w))return;a(A=>xn(A,x,w.toISOString())),o(A=>xn(A,x,void 0));const C=i.current[x].element;if(C){const A=C.getAttribute("data-origin"),O=document.querySelector(`input[data-target="${A}"]`);O&&O.setCustomValidity("")}T?.onChange?.(w)};return{...T,loading:n.loading,name:x,id:x,onChange:I,form:t,date:He.string(s[x])?new Date(s[x]):s[x],required:T.required??!E.isOptional(),error:Hn(r,x),ref:w=>{w!==null&&(i.current[x]={element:w,schema:E})}}},d=(x,T=Bi)=>{const E=Jr(x,e);return{...T,name:x,id:x,onChange:w=>{const C=w.target.value;a(A=>xn(A,x,C)),T?.onChange?.(w)},form:t,loading:n.loading,onInvalid:l,error:Hn(r,x,void 0),value:Hn(s,x,void 0)??"",required:T.required??!E.isOptional(),ref:w=>w!==null?i.current[x]={element:w,schema:E}:void 0}},f=(x,T=Bi)=>{const E=Jr(x,e);return{...T,name:x,id:x,onChange:w=>{const C=w.target.checked;a(A=>xn(A??{},x,C)),T?.onChange?.(w)},form:t,loading:n.loading,onInvalid:l,error:Hn(r,x,void 0),required:T.required??!E.isOptional(),ref:w=>w!==null?void(i.current[x]={element:w,schema:E}):void 0}},h=(x,T=Bi)=>{const E=Jr(x,e),I=w=>{w.persist?.();const C=w.target.value;T?.onChange?.(w),a(A=>xn(A,x,C))};return{...T,loading:n.loading,name:x,id:x,onChange:I,form:t,onInvalid:l,error:Hn(r,x,void 0),required:T.required??!E.isOptional(),value:Hn(s,x,void 0)||T?.value||"",type:He.instance(E,Li)?"number":T?.type??"text",ref:w=>w===null?void 0:i.current[x]={element:w,schema:E}}},g=(x,T=Bi)=>{const E=Jr(x,e);return{...T,name:x,id:x,onChangeOptions:w=>{a(C=>xn(C,x,w))},form:t,loading:n.loading,onInvalid:l,error:Hn(r,x,void 0),required:T.required??!E.isOptional(),value:Hn(s,x,void 0)||T?.value||[],ref:w=>w===null?void 0:void(i.current[x]={element:w,schema:E})}},y=(x,T=Bi)=>{const E=Jr(x,e),I=E._def.typeName==="ZodNumber";return{...T,name:x,id:x,onChange:C=>{C.persist?.();const A=I?C.target.valueAsNumber:C.target.value;T?.onChange?.(C),a(O=>xn(O,x,A))},form:t,loading:n.loading,onInvalid:l,error:Hn(r,x,void 0),required:T.required??!E.isOptional(),type:I?"number":T?.type??"text",value:Hn(s,x,void 0)||T?.value||"",ref:C=>C===null?void 0:void(i.current[x]={element:C,schema:E})}};S.useEffect(()=>{const x=Object.values(i.current).map(E=>{const I=E.element.dataset.origin?document.querySelector(`[data-target="${E.element.name}"]`):E.element,w=E.schema.safeParse(eo(I)),C=N=>{const $=kC(N.target);if(!$)return!1;const D=N.target,F=cm(N.target)||(N.relatedTarget?eo(N.relatedTarget):""),z=E.schema.safeParse(F);if(D.setAttribute("value",F),z.success)return I.setCustomValidity&&I.setCustomValidity(""),o(M=>{if(He.null(M))return null;const k=xn(M,$,void 0);return He.empty(M)||He.nil(M)||He.empty(k)?null:k}),!1;if(I.required){const M=z.error.issues[0]?.message||"";I.setCustomValidity&&I.setCustomValidity(M),o(k=>{if(He.null(k))return null;const V=xn(k,$,M||void 0);return He.empty(V)?null:V})}return!1},A=new AbortController,O=I.getAttribute("data-trigger")||"blur";I.addEventListener(O,C,{signal:A.signal});const _=I.dataset.shadow?!1:I.required?!w.success:!1;return{input:E,hasInitialError:_,unsubscribe:()=>A.abort()}});return x.some(E=>E.hasInitialError)&&o(E=>E===null?{}:E),()=>x.forEach(E=>E.unsubscribe())});const m=x=>T=>{T.preventDefault();const E=T.currentTarget;let I=CC(E);Array.from(t?document.querySelectorAll(`[form="${t}"]`):E.elements).forEach(_=>{if(_.tagName==="SELECT"){const N=_;I=xn(I,N.name,N.value)}if(_.tagName==="INPUT"){const N=_,$=cm(N)||(N?eo(N):"");I=xn(I,N.dataset.target||N.name,$)}});const C=EC(I,s),A=e.safeParse(C),O=()=>{KE(E),n.interceptor?.clear()};if(A.success){const _=JSON.stringify(A.data);return E.setAttribute("data-json",_),n.interceptor?.clear(),x?.(T,{form:E,event:T,reset:O,setErrors:o,errors:[],success:!0,data:A.data,json:A.data})}return console.group("useForm error"),console.info(A),console.info(A.error.issues),console.error(A.error),console.groupEnd(),E.reportValidity(),x?.(T,{form:E,json:I,event:T,reset:O,setErrors:o,data:I,success:!1,errors:A.error.issues.map(_=>({message:_.message,path:_.path.map(N=>String(N))}))})},v=x=>wd(s,x)||"",b=x=>({...x,id:t,name:t});return S.useEffect(()=>{n.interceptor&&n.interceptor?.set(s)},[s]),{get:v,input:y,state:s,errors:r,select:d,checkbox:f,onSubmit:m,setState:a,textarea:h,onInvalid:c,controller:b,datepicker:u,name:t,multiselect:g,disabled:r!==null}},O3=e=>e?JSON.parse(e.getAttribute("data-json")):{},D3=e=>{const t=S.useRef(void 0);return S.useEffect(()=>{t.current=e},[e]),t.current},IC={button:"0.55rem",pill:"2rem",card:"0.75rem",full:"9999px"},AC={base:"1rem",hairline:"0.0625rem",lg:"1.125rem",sm:"0.75rem",dialog:"20rem","field-height":"1.5rem","field-label":"0.875rem","input-height":"2.5rem","input-x":"0.5rem","input-y":"0.25rem","input-inline":"0.25rem","input-gap":"0.3rem"},PC={wizard:"50",normal:"1",navbar:"22",calendar:"2",overlay:"21",tooltip:"20",floating:"22"},N3={name:"dark",zIndex:PC,rounded:IC,spacing:AC,shadow:{"shadow-notification":"1px 2px 2px 2px hsla(210, 15%, 20%, 0.15)","shadow-floating":"0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)","shadow-card":"0px 1px 1px 1px hsla(210, 25%, 20%, 0.1)","shadow-table":"0px 1px 1px 1px hsla(210, 25%, 20%, 0.1)"},colors:{foreground:"hsla(240, 5%, 96%)",background:"hsla(240, 10%, 8%)",border:"hsla(240, 4%, 16%)",disabled:"hsla(240, 4%, 16%)",muted:{DEFAULT:"hsla(240, 4%, 16%)",foreground:"hsla(240, 5%, 65%)",subtle:"hsla(240, 5%, 65%)",hover:"hsla(240, 4%, 20%)"},emphasis:{foreground:"hsla(199, 89%, 48%)",DEFAULT:"hsla(199, 89%, 10%)",subtle:"hsla(199, 89%, 15%)",hover:"hsla(199, 89%, 40%)"},primary:{foreground:"hsla(240, 6%, 10%)",DEFAULT:"hsla(201,49%,54%)",subtle:"hsla(201,49%,36%)",hover:"hsla(201,49%,22%)"},secondary:{DEFAULT:"hsla(240, 5%, 96%)",background:"hsla(240, 4%, 16%)",subtle:"hsla(240, 4%, 20%)",hover:"hsla(240, 4%, 25%)",foreground:"hsla(240, 5%, 96%)"},info:{DEFAULT:"hsla(199, 89%, 48%)",subtle:"hsla(199, 89%, 15%)",hover:"hsla(199, 89%, 40%)",foreground:"hsla(0, 0%, 100%)",notification:"hsla(199, 89%, 48%)"},danger:{DEFAULT:"hsla(0, 84%, 60%)",subtle:"hsla(0, 84%, 15%)",hover:"hsla(0, 84%, 50%)",foreground:"hsla(0, 0%, 100%)",notification:"hsla(0, 84%, 60%)"},warn:{DEFAULT:"hsla(38, 92%, 50%)",subtle:"hsla(38, 92%, 15%)",hover:"hsla(38, 92%, 45%)",foreground:"hsla(240, 10%, 4%)",notification:"hsla(38, 92%, 50%)"},success:{DEFAULT:"hsla(142, 71%, 45%)",subtle:"hsla(142, 71%, 15%)",hover:"hsla(142, 71%, 40%)",foreground:"hsla(240, 10%, 4%)",notification:"hsla(142, 71%, 45%)"},input:{border:"hsla(240, 4%, 16%)",placeholder:"hsla(240, 5%, 65%)","mask-error":"hsla(0, 84%, 20%)","switch-bg":"hsla(240, 4%, 16%)",switch:"hsla(0, 0%, 100%)",slider:"hsla(0, 0%, 100%)"},card:{muted:"hsla(240, 4%, 10%)",border:"hsla(240, 4%, 11%)",background:"hsla(221, 16%, 9%)"},floating:{foreground:"hsla(240, 5%, 96%)",background:"hsla(240, 10%, 8%)",hover:"hsla(240, 4%, 16%)",border:"hsla(240, 4%, 16%)",overlay:"hsla(0, 0%, 0%)"},tooltip:{foreground:"hsla(240, 10%, 4%)",background:"hsla(0, 0%, 100%)",hover:"hsla(0, 0%, 100%)",border:"hsla(0, 0%, 100%)",overlay:"hsla(0, 0%, 0%)"},table:{header:"hsla(240, 4%, 10%)",border:"hsla(240, 4%, 16%)",background:"hsla(240, 10%, 4%)"},button:{primary:{text:"hsla(221, 52%, 100%)",bg:"hsla(201,49%,42%)"},warn:{text:"hsla(240, 10%, 4%)",bg:"hsla(38, 92%, 50%)"},info:{text:"hsla(0, 0%, 100%)",bg:"hsla(199, 89%, 48%)"},success:{text:"hsla(240, 10%, 4%)",bg:"hsla(142, 71%, 45%)"},danger:{text:"hsla(0, 0%, 100%)",bg:"hsla(0, 84%, 60%)"},muted:{text:"hsla(240, 5%, 96%)",bg:"hsla(240, 4%, 16%)"},neutral:{text:"hsla(240, 5%, 96%)",bg:"hsla(240, 4%, 16%)"},secondary:{text:"hsla(240, 10%, 4%)",bg:"hsla(0, 0%, 100%)"}},tag:{primary:{text:"hsla(0, 0%, 100%)",bg:"hsla(240, 4%, 20%)"},warn:{text:"hsla(38, 92%, 70%)",bg:"hsla(38, 92%, 15%)"},info:{text:"hsla(199, 89%, 70%)",bg:"hsla(199, 89%, 15%)"},success:{text:"hsla(142, 71%, 70%)",bg:"hsla(142, 71%, 15%)"},danger:{text:"hsla(0, 84%, 70%)",bg:"hsla(0, 84%, 15%)"},neutral:{text:"hsla(240, 5%, 96%)",bg:"hsla(240, 4%, 16%)"},secondary:{text:"hsla(240, 10%, 4%)",bg:"hsla(0, 0%, 100%)"},muted:{text:"hsla(240, 5%, 96%)",bg:"hsla(240, 4%, 16%)"}},alert:{primary:{text:"hsla(199, 89%, 80%)",border:"hsla(199, 89%, 25%)",bg:"hsla(199, 89%, 12%)"},warn:{bg:"hsla(38, 92%, 12%)",border:"hsla(38, 92%, 25%)",text:"hsla(38, 92%, 80%)"},info:{text:"hsla(199, 89%, 80%)",bg:"hsla(199, 89%, 12%)",border:"hsla(199, 89%, 25%)"},success:{text:"hsla(142, 71%, 80%)",bg:"hsla(142, 71%, 12%)",border:"hsla(142, 71%, 25%)"},danger:{text:"hsla(0, 84%, 80%)",bg:"hsla(0, 84%, 12%)",border:"hsla(0, 84%, 25%)"},neutral:{text:"hsla(240, 5%, 96%)",bg:"hsla(240, 4%, 16%)",border:"hsla(240, 4%, 20%)"},secondary:{text:"hsla(240, 10%, 4%)",bg:"hsla(0, 0%, 100%)",border:"hsla(0, 0%, 100%)"},muted:{bg:"hsla(240, 4%, 16%)",border:"hsla(240, 4%, 20%)",text:"hsla(240, 5%, 96%)"}}}},M3={rounded:IC,spacing:AC,name:"light",shadow:{"shadow-notification":"1px 2px 2px 2px hsla(210, 25%, 40%, 0.15)","shadow-floating":"0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)","shadow-card":"0px 1px 2px 1px hsla(210, 25%, 20%, 0.1)","shadow-table":"0px 1px 1px 1px hsla(210, 0%, 0%, 0.1)"},zIndex:PC,colors:{foreground:"hsla(221, 15%, 23%)",background:"hsla(0, 0%, 100%)",border:"hsla(240, 6%, 90%)",muted:{DEFAULT:"hsla(240, 5%, 96%)",foreground:"hsla(240, 4%, 46%)",subtle:"hsla(240, 4%, 46%)",hover:"hsla(240, 5%, 96%)"},disabled:"hsla(240, 5%, 96%)",emphasis:{foreground:"hsla(199, 89%, 48%)",DEFAULT:"hsla(199, 89%, 96%)",subtle:"hsla(199, 89%, 92%)",hover:"hsla(199, 89%, 40%)"},primary:{foreground:"hsla(240, 6%, 10%)",DEFAULT:"hsla(201,49%,54%)",subtle:"hsla(201,49%,36%)",hover:"hsla(201,49%,22%)"},secondary:{background:"hsla(240, 5%, 96%)",DEFAULT:"hsla(240, 6%, 10%)",subtle:"hsla(240, 5%, 96%)",hover:"hsla(240, 6%, 15%)",foreground:"hsla(0, 0%, 100%)"},info:{DEFAULT:"hsla(199, 89%, 48%)",subtle:"hsla(199, 89%, 96%)",hover:"hsla(199, 89%, 40%)",foreground:"hsla(0, 0%, 100%)",notification:"hsla(199, 89%, 48%)"},danger:{DEFAULT:"hsla(0, 84%, 60%)",subtle:"hsla(0, 84%, 96%)",hover:"hsla(0, 84%, 50%)",foreground:"hsla(0, 0%, 100%)",notification:"hsla(0, 84%, 60%)"},warn:{DEFAULT:"hsla(38, 92%, 50%)",subtle:"hsla(38, 92%, 96%)",hover:"hsla(38, 92%, 45%)",foreground:"hsla(0, 0%, 100%)",notification:"hsla(38, 92%, 50%)"},success:{DEFAULT:"hsla(142, 71%, 45%)",subtle:"hsla(142, 71%, 96%)",hover:"hsla(142, 71%, 40%)",foreground:"hsla(0, 0%, 100%)",notification:"hsla(142, 71%, 45%)"},input:{border:"hsla(240, 6%, 90%)",placeholder:"hsla(240, 4%, 46%)","mask-error":"hsla(0, 84%, 96%)","switch-bg":"hsla(240, 6%, 90%)",switch:"hsla(0, 0%, 100%)",slider:"hsla(199, 89%, 48%)"},card:{muted:"hsla(240, 5%, 96%)",border:"hsla(240, 6%, 90%)",background:"hsla(0, 0%, 100%)"},floating:{foreground:"hsla(240, 10%, 4%)",background:"hsla(0, 0%, 100%)",hover:"hsla(240, 5%, 96%)",border:"hsla(240, 6%, 90%)",overlay:"hsla(240, 10%, 4%)"},tooltip:{foreground:"hsla(0, 0%, 100%)",background:"hsla(240, 10%, 4%)",hover:"hsla(240, 10%, 4%)",border:"hsla(240, 10%, 4%)",overlay:"hsla(0, 0%, 0%)"},table:{header:"hsla(240, 5%, 96%)",background:"hsla(0, 0%, 100%)",border:"hsla(240, 6%, 90%)"},button:{muted:{bg:"hsla(240, 5%, 96%)",text:"hsla(240, 6%, 10%)"},primary:{text:"hsla(0, 0%, 100%)",bg:"hsla(201,49%,54%)"},warn:{bg:"hsla(38, 92%, 50%)",text:"hsla(0, 0%, 100%)"},info:{text:"hsla(0, 0%, 100%)",bg:"hsla(199, 89%, 48%)"},success:{text:"hsla(0, 0%, 100%)",bg:"hsla(142, 71%, 45%)"},danger:{text:"hsla(0, 0%, 100%)",bg:"hsla(0, 84%, 60%)"},neutral:{text:"hsla(240, 6%, 10%)",bg:"hsla(240, 5%, 96%)"},secondary:{text:"hsla(0, 0%, 100%)",bg:"hsla(240, 6%, 10%)"}},tag:{muted:{bg:"hsla(240, 5%, 96%)",text:"hsla(240, 4%, 46%)"},primary:{text:"hsla(199, 89%, 48%)",bg:"hsla(199, 89%, 96%)"},warn:{bg:"hsla(38, 92%, 96%)",text:"hsla(38, 92%, 40%)"},info:{text:"hsla(199, 89%, 40%)",bg:"hsla(199, 89%, 96%)"},success:{text:"hsla(142, 71%, 35%)",bg:"hsla(142, 71%, 96%)"},danger:{text:"hsla(0, 84%, 45%)",bg:"hsla(0, 84%, 96%)"},neutral:{text:"hsla(240, 6%, 10%)",bg:"hsla(240, 5%, 96%)"},secondary:{text:"hsla(0, 0%, 100%)",bg:"hsla(240, 6%, 10%)"}},alert:{muted:{bg:"hsla(240, 5%, 96%)",text:"hsla(240, 6%, 10%)",border:"hsla(240, 6%, 90%)"},primary:{text:"hsla(199, 89%, 40%)",border:"hsla(199, 89%, 90%)",bg:"hsla(199, 89%, 98%)"},warn:{bg:"hsla(38, 92%, 98%)",text:"hsla(38, 92%, 35%)",border:"hsla(38, 92%, 90%)"},info:{text:"hsla(199, 89%, 35%)",bg:"hsla(199, 89%, 98%)",border:"hsla(199, 89%, 90%)"},success:{text:"hsla(142, 71%, 30%)",bg:"hsla(142, 71%, 98%)",border:"hsla(142, 71%, 90%)"},danger:{text:"hsla(0, 84%, 40%)",bg:"hsla(0, 84%, 98%)",border:"hsla(0, 84%, 90%)"},neutral:{text:"hsla(240, 6%, 10%)",bg:"hsla(240, 5%, 96%)",border:"hsla(240, 6%, 90%)"},secondary:{text:"hsla(0, 0%, 100%)",bg:"hsla(240, 6%, 10%)",border:"hsla(240, 6%, 10%)"}}}},_3=N3,F3=M3,L3=e=>{const t=S.useMemo(()=>({locale:e.locale,floatingRef:e.rootFloating,tweaks:{...Aa,...e.tweaks},parser:e.parser||Ca.hsla,map:{...Ia,...e.map}}),[e]);return p.jsx(oo.Provider,{value:t,children:p.jsx(BS,{children:e.children})})};ne.Alert=Az,ne.AnimatedList=fz,ne.AnimatedListItem=pz,ne.Autocomplete=dH,ne.Button=Jt,ne.Calendar=bh,ne.Card=ac,ne.Checkbox=sh,ne.ColType=Ii,ne.Collapse=DS,ne.CommandPalette=BE,ne.Commander=BE,ne.ComponentsProvider=L3,ne.Context=oo,ne.DatePicker=FB,ne.Description=tj,ne.Dict=Bn,ne.Dropdown=ki,ne.Empty=yS,ne.Expand=ij,ne.FileUpload=tH,ne.Form=lI,ne.Info=nj,ne.Input=Jo,ne.InputFeedback=Vv,ne.InputField=as,ne.Loading=oj,ne.Menu=jz,ne.MenuItem=zz,ne.Modal=Ys,ne.ModalConfirmProvider=BS,ne.MultiSelect=vH,ne.Notifications=IW,ne.PageCalendar=qW,ne.PageHeader=rj,ne.PageTitle=RS,ne.Paragraph=ej,ne.Polymorph=un,ne.Progress=PB,ne.Radiobox=Bz,ne.RenderOnView=TH,ne.Select=po,ne.Slider=$D,ne.Spinner=HS,ne.Stats=Pz,ne.StatsCard=uz,ne.Step=xz,ne.Steps=wz,ne.Switch=zD,ne.Tab=Cz,ne.Table=cz,ne.Tabs=Tz,ne.Tag=zo,ne.TaskList=Jz,ne.Textarea=Rz,ne.Timeline=OB,ne.TimelineItem=mc,ne.Toolbar=DB,ne.Tooltip=Td,ne.TransferList=wH,ne.Wizard=uj,ne.createColumns=N$,ne.createCssProperties=ZI,ne.createDesignTokens=ay,ne.createFormStorage=A3,ne.createOptionCols=Qp,ne.createStyles=GI,ne.createTheme=KI,ne.createTokenStyles=XI,ne.css=Pe,ne.defaultDarkTheme=_3,ne.defaultLightTheme=F3,ne.defaultTranslations=Ia,ne.defaultTweaks=Aa,ne.dispatchInput=$g,ne.formReset=KE,ne.formToJson=CC,ne.formatDay=oa,ne.formatEventTime=Pc,ne.formatFullDate=sa,ne.formatHourLabel=ia,ne.formatMonthShort=UE,ne.formatMonthYear=Yh,ne.formatTime=GE,ne.formatWeekdayLong=WE,ne.formatWeekdayShort=qE,ne.getCoords=oI,ne.getHourSlots=Gh,ne.getJsonForm=O3,ne.getModalScrollerRef=V$,ne.getMonthDays=HE,ne.getRemainingSize=Yi,ne.getSchemaShape=Jr,ne.getWeekDays=Uh,ne.getWeekNumber=YE,ne.groupEventsByDate=RE,ne.hasVerticalScroll=zg,ne.initializeInputDataset=Gi,ne.isChildVisible=jg,ne.isMobile=Lv,ne.isReactComponent=rI,ne.isReactFC=Du,ne.isSsr=Mr,ne.mergeRefs=fr,ne.negate=hO,ne.noop=Qo,ne.parsers=Ca,ne.path=wd,ne.reduceTokens=Cr,ne.safeRegex=Sd,ne.splitInto=Fv,ne.toDateKey=Yr,ne.useColorParser=SS,ne.useConfirm=Uz,ne.useForm=P3,ne.useLocale=Fr,ne.useNotification=TW,ne.usePrevious=D3,ne.useReactive=CS,ne.useStableRef=Lr,ne.useStepContext=ES,ne.useSwipe=dT,ne.useTablePreferences=F$,ne.useTranslations=vt,ne.uuid=Xo,Object.defineProperty(ne,Symbol.toStringTag,{value:"Module"})}));
21
28
  //# sourceMappingURL=index.umd.js.map