@dss-kit/ui-kit 0.2.8 → 0.2.11

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 (261) hide show
  1. package/dist/components/builders/Box/Box.d.ts +119 -0
  2. package/dist/components/builders/Box/Box.d.ts.map +1 -0
  3. package/dist/components/builders/Box/index.d.ts +2 -0
  4. package/dist/components/builders/Box/index.d.ts.map +1 -0
  5. package/dist/components/builders/Loader/Loader.d.ts +7 -0
  6. package/dist/components/builders/Loader/Loader.d.ts.map +1 -0
  7. package/dist/components/builders/Loader/index.d.ts +2 -0
  8. package/dist/components/builders/Loader/index.d.ts.map +1 -0
  9. package/dist/components/builders/Modal/Modal.d.ts +32 -0
  10. package/dist/components/builders/Modal/Modal.d.ts.map +1 -0
  11. package/dist/components/builders/Modal/Modal.stories.d.ts +9 -0
  12. package/dist/components/builders/Modal/Modal.stories.d.ts.map +1 -0
  13. package/dist/components/builders/Modal/ModalFooter/ModalFooter.d.ts +4 -0
  14. package/dist/components/builders/Modal/ModalFooter/ModalFooter.d.ts.map +1 -0
  15. package/dist/components/builders/Modal/ModalFooter/index.d.ts +2 -0
  16. package/dist/components/builders/Modal/ModalFooter/index.d.ts.map +1 -0
  17. package/dist/components/builders/Modal/ModalHeader/ModalHeader.d.ts +12 -0
  18. package/dist/components/builders/Modal/ModalHeader/ModalHeader.d.ts.map +1 -0
  19. package/dist/components/builders/Modal/ModalHeader/index.d.ts +2 -0
  20. package/dist/components/builders/Modal/ModalHeader/index.d.ts.map +1 -0
  21. package/dist/components/builders/Modal/ModalMain/ModalMain.d.ts +37 -0
  22. package/dist/components/builders/Modal/ModalMain/ModalMain.d.ts.map +1 -0
  23. package/dist/components/builders/Modal/ModalMain/index.d.ts +3 -0
  24. package/dist/components/builders/Modal/ModalMain/index.d.ts.map +1 -0
  25. package/dist/components/builders/Modal/context.d.ts +9 -0
  26. package/dist/components/builders/Modal/context.d.ts.map +1 -0
  27. package/dist/components/builders/Modal/index.d.ts +13 -0
  28. package/dist/components/builders/Modal/index.d.ts.map +1 -0
  29. package/dist/components/builders/Portal/Portal.d.ts +3 -0
  30. package/dist/components/builders/Portal/Portal.d.ts.map +1 -0
  31. package/dist/components/builders/Portal/context.d.ts +5 -0
  32. package/dist/components/builders/Portal/context.d.ts.map +1 -0
  33. package/dist/components/builders/Portal/index.d.ts +2 -0
  34. package/dist/components/builders/Portal/index.d.ts.map +1 -0
  35. package/dist/components/builders/Ripple/Ripple.d.ts +39 -0
  36. package/dist/components/builders/Ripple/Ripple.d.ts.map +1 -0
  37. package/dist/components/builders/Ripple/index.d.ts +2 -0
  38. package/dist/components/builders/Ripple/index.d.ts.map +1 -0
  39. package/dist/components/builders/Table/Table.d.ts +17 -0
  40. package/dist/components/builders/Table/Table.d.ts.map +1 -0
  41. package/dist/components/builders/Table/Table.stories.d.ts +26 -0
  42. package/dist/components/builders/Table/Table.stories.d.ts.map +1 -0
  43. package/dist/components/builders/Table/Table.types.d.ts +96 -0
  44. package/dist/components/builders/Table/Table.types.d.ts.map +1 -0
  45. package/dist/components/builders/Table/TableBodyCell/TableBodyCell.d.ts +15 -0
  46. package/dist/components/builders/Table/TableBodyCell/TableBodyCell.d.ts.map +1 -0
  47. package/dist/components/builders/Table/TableBodyCell/index.d.ts +2 -0
  48. package/dist/components/builders/Table/TableBodyCell/index.d.ts.map +1 -0
  49. package/dist/components/builders/Table/TableBodyCellContent/TableBodyCellContent.d.ts +3 -0
  50. package/dist/components/builders/Table/TableBodyCellContent/TableBodyCellContent.d.ts.map +1 -0
  51. package/dist/components/builders/Table/TableBodyCellContent/index.d.ts +2 -0
  52. package/dist/components/builders/Table/TableBodyCellContent/index.d.ts.map +1 -0
  53. package/dist/components/builders/Table/TableBodyRow/TableBodyRow.d.ts +14 -0
  54. package/dist/components/builders/Table/TableBodyRow/TableBodyRow.d.ts.map +1 -0
  55. package/dist/components/builders/Table/TableBodyRow/index.d.ts +2 -0
  56. package/dist/components/builders/Table/TableBodyRow/index.d.ts.map +1 -0
  57. package/dist/components/builders/Table/TableHeadCell/TableHeadCell.d.ts +14 -0
  58. package/dist/components/builders/Table/TableHeadCell/TableHeadCell.d.ts.map +1 -0
  59. package/dist/components/builders/Table/TableHeadCell/index.d.ts +2 -0
  60. package/dist/components/builders/Table/TableHeadCell/index.d.ts.map +1 -0
  61. package/dist/components/builders/Table/TableHeadCellContent/TableHeadCellContent.d.ts +3 -0
  62. package/dist/components/builders/Table/TableHeadCellContent/TableHeadCellContent.d.ts.map +1 -0
  63. package/dist/components/builders/Table/TableHeadCellContent/index.d.ts +2 -0
  64. package/dist/components/builders/Table/TableHeadCellContent/index.d.ts.map +1 -0
  65. package/dist/components/builders/Table/TableHeadCellContentSortable/TableHeadCellContentSortable.d.ts +11 -0
  66. package/dist/components/builders/Table/TableHeadCellContentSortable/TableHeadCellContentSortable.d.ts.map +1 -0
  67. package/dist/components/builders/Table/TableHeadCellContentSortable/index.d.ts +2 -0
  68. package/dist/components/builders/Table/TableHeadCellContentSortable/index.d.ts.map +1 -0
  69. package/dist/components/builders/Table/TableHeadRow/TableHeadRow.d.ts +14 -0
  70. package/dist/components/builders/Table/TableHeadRow/TableHeadRow.d.ts.map +1 -0
  71. package/dist/components/builders/Table/TableHeadRow/index.d.ts +2 -0
  72. package/dist/components/builders/Table/TableHeadRow/index.d.ts.map +1 -0
  73. package/dist/components/builders/Table/TablePagination/TablePagination.d.ts +27 -0
  74. package/dist/components/builders/Table/TablePagination/TablePagination.d.ts.map +1 -0
  75. package/dist/components/builders/Table/TablePagination/TablePagination.utils.d.ts +8 -0
  76. package/dist/components/builders/Table/TablePagination/TablePagination.utils.d.ts.map +1 -0
  77. package/dist/components/builders/Table/TablePagination/index.d.ts +3 -0
  78. package/dist/components/builders/Table/TablePagination/index.d.ts.map +1 -0
  79. package/dist/components/builders/Table/TableSortIcon/TableSortIcon.d.ts +9 -0
  80. package/dist/components/builders/Table/TableSortIcon/TableSortIcon.d.ts.map +1 -0
  81. package/dist/components/builders/Table/TableSortIcon/index.d.ts +2 -0
  82. package/dist/components/builders/Table/TableSortIcon/index.d.ts.map +1 -0
  83. package/dist/components/builders/Table/TableWrapper/TableWrapper.d.ts +8 -0
  84. package/dist/components/builders/Table/TableWrapper/TableWrapper.d.ts.map +1 -0
  85. package/dist/components/builders/Table/TableWrapper/index.d.ts +2 -0
  86. package/dist/components/builders/Table/TableWrapper/index.d.ts.map +1 -0
  87. package/dist/components/builders/Table/index.d.ts +6 -0
  88. package/dist/components/builders/Table/index.d.ts.map +1 -0
  89. package/dist/components/builders/Text/Text.d.ts +330 -0
  90. package/dist/components/builders/Text/Text.d.ts.map +1 -0
  91. package/dist/components/builders/Text/Text.stories.d.ts +11 -0
  92. package/dist/components/builders/Text/Text.stories.d.ts.map +1 -0
  93. package/dist/components/builders/Text/index.d.ts +2 -0
  94. package/dist/components/builders/Text/index.d.ts.map +1 -0
  95. package/dist/components/builders/Text/utils/systemToClass.d.ts +26 -0
  96. package/dist/components/builders/Text/utils/systemToClass.d.ts.map +1 -0
  97. package/dist/components/builders/index.d.ts +8 -0
  98. package/dist/components/builders/index.d.ts.map +1 -0
  99. package/dist/components/controls/Button/Button.d.ts +82 -0
  100. package/dist/components/controls/Button/Button.d.ts.map +1 -0
  101. package/dist/components/controls/Button/Button.stories.d.ts +15 -0
  102. package/dist/components/controls/Button/Button.stories.d.ts.map +1 -0
  103. package/dist/components/controls/Button/index.d.ts +3 -0
  104. package/dist/components/controls/Button/index.d.ts.map +1 -0
  105. package/dist/components/controls/Button/styles.d.ts +8 -0
  106. package/dist/components/controls/Button/styles.d.ts.map +1 -0
  107. package/dist/components/controls/Button/types.d.ts +19 -0
  108. package/dist/components/controls/Button/types.d.ts.map +1 -0
  109. package/dist/components/controls/Checkbox/Checkbox.d.ts +34 -0
  110. package/dist/components/controls/Checkbox/Checkbox.d.ts.map +1 -0
  111. package/dist/components/controls/Checkbox/Checkbox.stories.d.ts +12 -0
  112. package/dist/components/controls/Checkbox/Checkbox.stories.d.ts.map +1 -0
  113. package/dist/components/controls/Checkbox/index.d.ts +2 -0
  114. package/dist/components/controls/Checkbox/index.d.ts.map +1 -0
  115. package/dist/components/controls/IconButton/IconButton.d.ts +3 -0
  116. package/dist/components/controls/IconButton/IconButton.d.ts.map +1 -0
  117. package/dist/components/controls/IconButton/IconButton.stories.d.ts +8 -0
  118. package/dist/components/controls/IconButton/IconButton.stories.d.ts.map +1 -0
  119. package/dist/components/controls/IconButton/IconButton.types.d.ts +13 -0
  120. package/dist/components/controls/IconButton/IconButton.types.d.ts.map +1 -0
  121. package/dist/components/controls/IconButton/index.d.ts +3 -0
  122. package/dist/components/controls/IconButton/index.d.ts.map +1 -0
  123. package/dist/components/controls/Input/Input.d.ts +81 -0
  124. package/dist/components/controls/Input/Input.d.ts.map +1 -0
  125. package/dist/components/controls/Input/Input.stories.d.ts +19 -0
  126. package/dist/components/controls/Input/Input.stories.d.ts.map +1 -0
  127. package/dist/components/controls/Input/index.d.ts +2 -0
  128. package/dist/components/controls/Input/index.d.ts.map +1 -0
  129. package/dist/components/controls/OtpInput/OtpInput.d.ts +78 -0
  130. package/dist/components/controls/OtpInput/OtpInput.d.ts.map +1 -0
  131. package/dist/components/controls/OtpInput/OtpInput.stories.d.ts +11 -0
  132. package/dist/components/controls/OtpInput/OtpInput.stories.d.ts.map +1 -0
  133. package/dist/components/controls/OtpInput/index.d.ts +3 -0
  134. package/dist/components/controls/OtpInput/index.d.ts.map +1 -0
  135. package/dist/components/controls/OtpInput/usePrevious.d.ts +2 -0
  136. package/dist/components/controls/OtpInput/usePrevious.d.ts.map +1 -0
  137. package/dist/components/controls/SegmentControl/SegmentControl.d.ts +57 -0
  138. package/dist/components/controls/SegmentControl/SegmentControl.d.ts.map +1 -0
  139. package/dist/components/controls/SegmentControl/SegmentControl.stories.d.ts +11 -0
  140. package/dist/components/controls/SegmentControl/SegmentControl.stories.d.ts.map +1 -0
  141. package/dist/components/controls/SegmentControl/index.d.ts +3 -0
  142. package/dist/components/controls/SegmentControl/index.d.ts.map +1 -0
  143. package/dist/components/controls/Select/Select.d.ts +186 -0
  144. package/dist/components/controls/Select/Select.d.ts.map +1 -0
  145. package/dist/components/controls/Select/Select.stories.d.ts +23 -0
  146. package/dist/components/controls/Select/Select.stories.d.ts.map +1 -0
  147. package/dist/components/controls/Select/index.d.ts +2 -0
  148. package/dist/components/controls/Select/index.d.ts.map +1 -0
  149. package/dist/components/controls/Switch/Switch.d.ts +90 -0
  150. package/dist/components/controls/Switch/Switch.d.ts.map +1 -0
  151. package/dist/components/controls/Switch/Switch.stories.d.ts +11 -0
  152. package/dist/components/controls/Switch/Switch.stories.d.ts.map +1 -0
  153. package/dist/components/controls/Switch/index.d.ts +3 -0
  154. package/dist/components/controls/Switch/index.d.ts.map +1 -0
  155. package/dist/components/controls/index.d.ts +9 -0
  156. package/dist/components/controls/index.d.ts.map +1 -0
  157. package/dist/components/index.d.ts +5 -0
  158. package/dist/components/index.d.ts.map +1 -0
  159. package/dist/components/navigation/Breadcrumbs/Breadcrumbs.d.ts +67 -0
  160. package/dist/components/navigation/Breadcrumbs/Breadcrumbs.d.ts.map +1 -0
  161. package/dist/components/navigation/Breadcrumbs/Breadcrumbs.stories.d.ts +16 -0
  162. package/dist/components/navigation/Breadcrumbs/Breadcrumbs.stories.d.ts.map +1 -0
  163. package/dist/components/navigation/Breadcrumbs/index.d.ts +2 -0
  164. package/dist/components/navigation/Breadcrumbs/index.d.ts.map +1 -0
  165. package/dist/components/navigation/index.d.ts +2 -0
  166. package/dist/components/navigation/index.d.ts.map +1 -0
  167. package/dist/components/shared/Avatar/Avatar.d.ts +3 -0
  168. package/dist/components/shared/Avatar/Avatar.d.ts.map +1 -0
  169. package/dist/components/shared/Avatar/Avatar.stories.d.ts +13 -0
  170. package/dist/components/shared/Avatar/Avatar.stories.d.ts.map +1 -0
  171. package/dist/components/shared/Avatar/Avatar.types.d.ts +14 -0
  172. package/dist/components/shared/Avatar/Avatar.types.d.ts.map +1 -0
  173. package/dist/components/shared/Avatar/index.d.ts +3 -0
  174. package/dist/components/shared/Avatar/index.d.ts.map +1 -0
  175. package/dist/components/shared/Badge/Badge.d.ts +19 -0
  176. package/dist/components/shared/Badge/Badge.d.ts.map +1 -0
  177. package/dist/components/shared/Badge/Badge.stories.d.ts +11 -0
  178. package/dist/components/shared/Badge/Badge.stories.d.ts.map +1 -0
  179. package/dist/components/shared/Badge/index.d.ts +3 -0
  180. package/dist/components/shared/Badge/index.d.ts.map +1 -0
  181. package/dist/components/shared/Hint/Hint.d.ts +31 -0
  182. package/dist/components/shared/Hint/Hint.d.ts.map +1 -0
  183. package/dist/components/shared/Hint/Hint.stories.d.ts +28 -0
  184. package/dist/components/shared/Hint/Hint.stories.d.ts.map +1 -0
  185. package/dist/components/shared/Hint/index.d.ts +2 -0
  186. package/dist/components/shared/Hint/index.d.ts.map +1 -0
  187. package/dist/components/shared/Popover/Popover.d.ts +73 -0
  188. package/dist/components/shared/Popover/Popover.d.ts.map +1 -0
  189. package/dist/components/shared/Popover/Popover.stories.d.ts +30 -0
  190. package/dist/components/shared/Popover/Popover.stories.d.ts.map +1 -0
  191. package/dist/components/shared/Popover/PopoverContent/PopoverContent.d.ts +5 -0
  192. package/dist/components/shared/Popover/PopoverContent/PopoverContent.d.ts.map +1 -0
  193. package/dist/components/shared/Popover/PopoverContent/index.d.ts +2 -0
  194. package/dist/components/shared/Popover/PopoverContent/index.d.ts.map +1 -0
  195. package/dist/components/shared/Popover/index.d.ts +2 -0
  196. package/dist/components/shared/Popover/index.d.ts.map +1 -0
  197. package/dist/components/shared/Tag/Tag.d.ts +49 -0
  198. package/dist/components/shared/Tag/Tag.d.ts.map +1 -0
  199. package/dist/components/shared/Tag/Tag.stories.d.ts +17 -0
  200. package/dist/components/shared/Tag/Tag.stories.d.ts.map +1 -0
  201. package/dist/components/shared/Tag/index.d.ts +3 -0
  202. package/dist/components/shared/Tag/index.d.ts.map +1 -0
  203. package/dist/components/shared/index.d.ts +5 -0
  204. package/dist/components/shared/index.d.ts.map +1 -0
  205. package/dist/index.d.ts +5 -0
  206. package/dist/index.d.ts.map +1 -0
  207. package/dist/providers/ThemeProviderScoped/ThemeProviderScoped.d.ts +3 -0
  208. package/dist/providers/ThemeProviderScoped/ThemeProviderScoped.d.ts.map +1 -0
  209. package/dist/providers/ThemeProviderScoped/ThemeProviderScoped.types.d.ts +7 -0
  210. package/dist/providers/ThemeProviderScoped/ThemeProviderScoped.types.d.ts.map +1 -0
  211. package/dist/providers/ThemeProviderScoped/index.d.ts +3 -0
  212. package/dist/providers/ThemeProviderScoped/index.d.ts.map +1 -0
  213. package/dist/providers/index.d.ts +2 -0
  214. package/dist/providers/index.d.ts.map +1 -0
  215. package/dist/root.css +1 -0
  216. package/dist/styles/utils/breakpoints/base.scss +11 -0
  217. package/dist/styles/utils/breakpoints/index.scss +3 -0
  218. package/dist/styles/utils/breakpoints/screen.scss +61 -0
  219. package/dist/styles/utils/breakpoints/semantic.scss +31 -0
  220. package/dist/styles/utils/fonts/font-family.scss +3 -0
  221. package/dist/styles/utils/fonts/index.scss +1 -0
  222. package/dist/styles/utils/index.scss +5 -0
  223. package/dist/styles/utils/size/index.scss +1 -0
  224. package/dist/styles/utils/size/modifiers.scss +41 -0
  225. package/dist/styles/utils/style/index.scss +1 -0
  226. package/dist/styles/utils/style/variants.scss +34 -0
  227. package/dist/styles/utils/typography/_font-weight.scss +33 -0
  228. package/dist/styles/utils/typography/_variants.scss +85 -0
  229. package/dist/styles/utils/typography/index.scss +2 -0
  230. package/dist/types/children.types.d.ts +4 -0
  231. package/dist/types/children.types.d.ts.map +1 -0
  232. package/dist/types/index.d.ts +3 -0
  233. package/dist/types/index.d.ts.map +1 -0
  234. package/dist/types/tokens.types.d.ts +24 -0
  235. package/dist/types/tokens.types.d.ts.map +1 -0
  236. package/dist/ui-kit.cjs.js +58 -0
  237. package/dist/ui-kit.cjs.js.map +1 -0
  238. package/dist/ui-kit.css +1 -0
  239. package/dist/ui-kit.es.js +12139 -0
  240. package/dist/ui-kit.es.js.map +1 -0
  241. package/dist/utils/hooks/index.d.ts +2 -0
  242. package/dist/utils/hooks/index.d.ts.map +1 -0
  243. package/dist/utils/hooks/useControlled.d.ts +13 -0
  244. package/dist/utils/hooks/useControlled.d.ts.map +1 -0
  245. package/dist/utils/index.d.ts +3 -0
  246. package/dist/utils/index.d.ts.map +1 -0
  247. package/dist/utils/styles/getFontWeightClass/getFontWeightClass.d.ts +3 -0
  248. package/dist/utils/styles/getFontWeightClass/getFontWeightClass.d.ts.map +1 -0
  249. package/dist/utils/styles/getFontWeightClass/index.d.ts +2 -0
  250. package/dist/utils/styles/getFontWeightClass/index.d.ts.map +1 -0
  251. package/dist/utils/styles/getSizeClass/getSizeClass.d.ts +3 -0
  252. package/dist/utils/styles/getSizeClass/getSizeClass.d.ts.map +1 -0
  253. package/dist/utils/styles/getSizeClass/index.d.ts +2 -0
  254. package/dist/utils/styles/getSizeClass/index.d.ts.map +1 -0
  255. package/dist/utils/styles/getStyleClass/getStyleClass.d.ts +2 -0
  256. package/dist/utils/styles/getStyleClass/getStyleClass.d.ts.map +1 -0
  257. package/dist/utils/styles/getStyleClass/index.d.ts +2 -0
  258. package/dist/utils/styles/getStyleClass/index.d.ts.map +1 -0
  259. package/dist/utils/styles/index.d.ts +3 -0
  260. package/dist/utils/styles/index.d.ts.map +1 -0
  261. package/package.json +3 -3
@@ -0,0 +1,58 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const w=require("react/jsx-runtime"),F=require("@emotion/css"),C=require("react"),ci=require("react-dom");function Xr(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const _=Xr(C),bu=Xr(ci);function Ru(e){const{h:t,w:n,m:o,mx:i,my:s,mt:r,mr:a,mb:l,ml:u,p:c,px:f,py:d,pt:h,pr:m,pb:g,pl:y,gap:v,xGap:x,yGap:p,row:S,flex:b,relative:P,absolute:V,display:M,overflow:D,absoluteFill:k,center:j,justifyContent:N,alignItems:O,alignSelf:A,borderWidth:B,borderBottomWidth:z,borderColor:E,borderRadius:R,zIndex:T,minWidth:L,minHeight:Y,maxWidth:U,maxHeight:q,flexWrap:ge,flexGrow:J,flexShrink:ie,flexBasis:$,backgroundColor:Z,position:se,top:ae,right:Ce,bottom:et,left:At,...Dt}=e;return{spacers:{h:t,w:n,m:o,mx:i,my:s,mt:r,mr:a,mb:l,ml:u,p:c,px:f,py:d,pt:h,pr:m,pb:g,pl:y,gap:v,xGap:x,yGap:p,row:S,flex:b,relative:P,absolute:V,display:M,overflow:D,absoluteFill:k,center:j,justifyContent:N,alignItems:O,alignSelf:A,borderWidth:B,borderBottomWidth:z,borderColor:E,borderRadius:R,zIndex:T,minWidth:L,minHeight:Y,maxWidth:U,maxHeight:q,flexWrap:ge,flexGrow:J,flexShrink:ie,flexBasis:$,backgroundColor:Z,position:se,top:ae,right:Ce,bottom:et,left:At},rest:Dt}}const Eu=e=>F.css({display:e.display??"flex",flexDirection:e.row?"row":"column",height:e.h==="screen"?"100vh":e.h==="full"?"100%":e.h,width:e.w==="screen"?"100vw":e.w==="full"?"100%":e.w,margin:e.m,marginTop:e.mt??e.my,marginBottom:e.mb??e.my,marginLeft:e.ml??e.mx,marginRight:e.mr??e.mx,padding:e.p,paddingTop:e.pt??e.py,paddingBottom:e.pb??e.py,paddingLeft:e.pl??e.px,paddingRight:e.pr??e.px,gap:e.gap,columnGap:e.xGap,rowGap:e.yGap,justifyContent:e.center?"center":e.justifyContent,alignItems:e.center?"center":e.alignItems,alignSelf:e.alignSelf,borderWidth:e.borderWidth,borderBottomWidth:e.borderBottomWidth,borderColor:e.borderColor,borderRadius:e.borderRadius,zIndex:e.zIndex,overflow:e.overflow,minWidth:e.minWidth,minHeight:e.minHeight,maxWidth:e.maxWidth,maxHeight:e.maxHeight,flex:e.flex===!0?1:e.flex,flexWrap:e.flexWrap,flexGrow:e.flexGrow,flexShrink:e.flexShrink,flexBasis:e.flexBasis,backgroundColor:e.backgroundColor,position:e?.position?e?.position:e?.absolute?"absolute":e?.relative?"relative":void 0,...e.absoluteFill&&{position:"absolute",top:0,right:0,bottom:0,left:0},top:e?.top,right:e?.right,bottom:e?.bottom,left:e?.left}),I=C.forwardRef(({className:e,children:t,...n},o)=>{const{spacers:i,rest:s}=Ru(n),r=C.useMemo(()=>Eu(i),[i]);return w.jsx("div",{ref:o,className:F.cx(r,e),...s,children:t})});I.displayName="Box";const Mu="_loader_1qleq_8",Pu={loader:Mu},Yr=({color:e="var(--text-accent)"})=>w.jsx("span",{className:F.cx(Pu.loader,F.css({"--loader-color":e}))}),Zr=e=>_.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},_.createElement("path",{d:"M18 6L6 18M6 6L18 18",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}));function Tu(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Jn={exports:{}};/*!
2
+ Copyright (c) 2018 Jed Watson.
3
+ Licensed under the MIT License (MIT), see
4
+ http://jedwatson.github.io/classnames
5
+ */var is;function Vu(){return is||(is=1,(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var s="",r=0;r<arguments.length;r++){var a=arguments[r];a&&(s=i(s,o(a)))}return s}function o(s){if(typeof s=="string"||typeof s=="number")return s;if(typeof s!="object")return"";if(Array.isArray(s))return n.apply(null,s);if(s.toString!==Object.prototype.toString&&!s.toString.toString().includes("[native code]"))return s.toString();var r="";for(var a in s)t.call(s,a)&&s[a]&&(r=i(r,a));return r}function i(s,r){return r?s?s+" "+r:s+r:s}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(Jn)),Jn.exports}var Au=Vu();const ot=Tu(Au),Du="_rippleOverlay_s2kim_8",ku="_ripple_s2kim_8",ss={rippleOverlay:Du,ripple:ku},Qn="button, a, input, label, [role='button'], [data-ripple]";function Fu(e){if(typeof e.composedPath=="function")return e.composedPath();const t=[];let n=e.target;for(;n;)t.push(n),n=n.parentNode||n.host;return t.push(window),t}const bt=C.forwardRef(({color:e="rgba(0,0,0,0.18)",duration:t=1e3,radius:n="auto",className:o},i)=>{const s=C.useRef(null),[r,a]=C.useState([]),l=C.useRef([]),u=C.useRef(1),c=C.useRef(null),f=()=>{l.current.map(g=>clearTimeout(g)),l.current=[]},d=C.useCallback((g,y,v,x)=>{if(typeof window>"u")return;const p=v.getBoundingClientRect(),S=n==="auto"?Math.max(p.width,p.height)*2:n,b=g-x.left,P=y-x.top,V=Math.max(0,p.top-x.top),M=Math.max(0,p.left-x.left),D=Math.max(0,x.right-p.right),k=Math.max(0,x.bottom-p.bottom),N=window.getComputedStyle(v).borderRadius||"0px",O=u.current++,A={id:O,left:b-S/2,top:P-S/2,size:Math.ceil(S),clip:{top:Math.round(V),right:Math.round(D),bottom:Math.round(k),left:Math.round(M)},borderRadius:N};a(z=>[...z,A]);const B=window.setTimeout(()=>{a(z=>z.filter(E=>E.id!==O))},t+80);l.current.push(B)},[t,n]),h=C.useCallback(g=>{try{if(!s.current)return;const y=s.current,v=y.parentElement;if(!v)return;const x=Fu(g);let p=null;for(const M of x)if(M instanceof Element){if(M===v)break;if(M.matches&&M.matches(Qn)){p=M;break}}if(p||(p=v),p.closest&&(p.closest("[disabled]")||p.getAttribute("aria-disabled")==="true"||p.classList.contains("ripple-disabled")))return;const S=g.target;if(S?.closest&&(S.closest("[disabled]")||S.getAttribute?.("aria-disabled")==="true"))return;const b=y.getBoundingClientRect(),{clientX:P}=g,{clientY:V}=g;d(P,V,p,b)}catch{}},[d]),m=C.useCallback(g=>{if(!s.current||!(g.key==="Enter"||g.key===" "))return;const y=s.current,v=y.parentElement;if(!v)return;const x=document.activeElement;let p=null;if(x instanceof Element&&x.matches(Qn)&&(p=x),p||(p=v),p.closest&&(p.closest("[disabled]")||p.getAttribute("aria-disabled")==="true"))return;const S=y.getBoundingClientRect(),b=p.getBoundingClientRect().left+p.getBoundingClientRect().width/2,P=p.getBoundingClientRect().top+p.getBoundingClientRect().height/2;d(b,P,p,S)},[d]);return C.useImperativeHandle(i,()=>({trigger:({center:g=!0,x:y,y:v}={})=>{const x=s.current;if(!x)return;const p=x.parentElement;if(!p)return;const S=x.getBoundingClientRect(),b=document.activeElement instanceof Element&&document.activeElement.matches(Qn)?document.activeElement:p,P=g?b.getBoundingClientRect().left+b.getBoundingClientRect().width/2:y??S.left+S.width/2,V=g?b.getBoundingClientRect().top+b.getBoundingClientRect().height/2:v??S.top+S.height/2;d(P,V,b,S)}}),[d]),C.useEffect(()=>{const g=s.current;if(!g)return;const y=g.parentElement;if(!y||typeof window>"u")return;const v=window.getComputedStyle(y);let x=!1;return v.position==="static"&&(y.style.position="relative",x=!0,c.current=y),y.addEventListener("pointerdown",h,!0),y.addEventListener("keydown",m),()=>{y.removeEventListener("pointerdown",h,!0),y.removeEventListener("keydown",m),x&&c.current&&(c.current.style.position="",c.current=null),f()}},[h,m]),C.useEffect(()=>()=>f(),[]),w.jsx("div",{ref:s,className:`${ss.rippleOverlay} ${o??""}`,"aria-hidden":!0,children:r.map(g=>w.jsx("span",{className:ss.ripple,style:{left:`${g.left}px`,top:`${g.top}px`,width:`${g.size}px`,height:`${g.size}px`,backgroundColor:e,animationDuration:`${t}ms`,clipPath:`inset(${g.clip.top}px ${g.clip.right}px ${g.clip.bottom}px ${g.clip.left}px round ${g.borderRadius})`}},g.id))})});function Jt(e,t){const{current:n}=C.useRef(e!==void 0),[o,i]=C.useState(t),s=n?e:o,r=C.useCallback(a=>{n||i(a)},[]);return[s,r]}function Ln(e,t,n,o=""){if(n)return e[`${t}_${n}${o}`]}function Ht(e,t,n){return Ln(e,t,n,"Size")}const Lu="_button_11ykb_8",Iu="_button_primary_11ykb_19",$u="_button_secondary_11ykb_22",ju="_button_negative_11ykb_25",Ou="_button_positive_11ykb_28",zu="_button_warning_11ykb_31",Bu="_button_neutral_11ykb_34",Nu="_button_mdSize_11ykb_118",Hu="_button_smSize_11ykb_128",Wu="_button_xsSize_11ykb_138",eo={button:Lu,button_primary:Iu,button_secondary:$u,button_negative:ju,button_positive:Ou,button_warning:zu,button_neutral:Bu,"button_neutral-white":"_button_neutral-white_11ykb_37","button_no-bg":"_button_no-bg_11ykb_40",button_mdSize:Nu,button_smSize:Hu,button_xsSize:Wu};function Wt({attr:e,children:t,className:n,type:o="button",color:i="primary",size:s="md",...r}){const a="button";return w.jsxs("button",{...e,...r,type:o,className:ot(eo[a],n,Ht(eo,a,s),Ln(eo,a,i)),children:[w.jsx(bt,{}),t]})}const Jr=C.createContext({isOpen:!1,onClose:()=>{}}),Gu=()=>C.useContext(Jr),Uu="_overlay_1gnp0_8",Ku="_modal_1gnp0_12",qu="_closeButton_1gnp0_28",Xu="_size_lg_1gnp0_35",Yu="_size_md_1gnp0_38",Zu="_size_sm_1gnp0_41",an={overlay:Uu,modal:Ku,"modal-animation":"_modal-animation_1gnp0_1",closeButton:qu,size_lg:Xu,size_md:Yu,size_sm:Zu},Qr=C.forwardRef(({isOpen:e,onClose:t,overlayClassName:n,modalClassName:o,size:i="md",closeOnBackdropClick:s=!0,closeOnEsc:r=!0,disableBodyScroll:a=!0,showAbsoluteCloseButton:l=!1,children:u},c)=>{C.useEffect(()=>{if(a&&e&&typeof window<"u"&&typeof document<"u"){const h=window.getComputedStyle(document.body).overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=h}}},[e,a]);const f=C.useCallback(h=>{h.key==="Escape"&&t()},[t]);C.useEffect(()=>{if(typeof window<"u"&&typeof document<"u"&&r&&e)return document.addEventListener("keydown",f),()=>document.removeEventListener("keydown",f)},[e,r,f]);const d=C.useCallback(h=>{s&&h.target===h.currentTarget&&t()},[s,t]);return e?w.jsx(Kn,{children:w.jsx(Jr.Provider,{value:{isOpen:e,onClose:t},children:w.jsx(I,{position:"fixed",top:0,right:0,bottom:0,left:0,row:!0,center:!0,flex:1,onClick:d,backgroundColor:"var(--fill-bg-overlay-primary)",className:F.cx(an.overlay,n),zIndex:1,children:w.jsxs(I,{ref:c,className:F.cx(an.modal,an[`size_${i}`],o),relative:!0,children:[l&&w.jsx(Wt,{className:an.closeButton,onClick:t,color:"neutral",children:w.jsx(Zr,{})}),u]})})})}):null});Qr.displayName="Modal";const Ju="_footer_1bo08_8",Qu={footer:Ju},ea=C.forwardRef(({children:e,row:t=!0,flex:n=!0,gap:o="var(--spacing-lg)",p:i="var(--spacing-2xl)",className:s,...r},a)=>w.jsx(I,{flex:n,row:t,gap:o,p:i,className:F.cx(Qu.footer,s),ref:a,...r,children:e}));ea.displayName="ModalFooter";const di=C.createContext({});function fi(e){const t=C.useRef(null);return t.current===null&&(t.current=e()),t.current}const hi=typeof window<"u",ta=hi?C.useLayoutEffect:C.useEffect,In=C.createContext(null);function gi(e,t){e.indexOf(t)===-1&&e.push(t)}function mi(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const Be=(e,t,n)=>n>t?t:n<e?e:n;function Ao(e,t){return t?`${e}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${t}`:e}let Rt=()=>{},Ne=()=>{};process.env.NODE_ENV!=="production"&&(Rt=(e,t,n)=>{!e&&typeof console<"u"&&console.warn(Ao(t,n))},Ne=(e,t,n)=>{if(!e)throw new Error(Ao(t,n))});const He={},na=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function oa(e){return typeof e=="object"&&e!==null}const ia=e=>/^0[^.\s]+$/u.test(e);function pi(e){let t;return()=>(t===void 0&&(t=e()),t)}const Ee=e=>e,ec=(e,t)=>n=>t(e(n)),Qt=(...e)=>e.reduce(ec),Gt=(e,t,n)=>{const o=t-e;return o===0?1:(n-e)/o};class vi{constructor(){this.subscriptions=[]}add(t){return gi(this.subscriptions,t),()=>mi(this.subscriptions,t)}notify(t,n,o){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](t,n,o);else for(let s=0;s<i;s++){const r=this.subscriptions[s];r&&r(t,n,o)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const Ae=e=>e*1e3,Re=e=>e/1e3;function sa(e,t){return t?e*(1e3/t):0}const rs=new Set;function yi(e,t,n){e||rs.has(t)||(console.warn(Ao(t,n)),rs.add(t))}const ra=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,tc=1e-7,nc=12;function oc(e,t,n,o,i){let s,r,a=0;do r=t+(n-t)/2,s=ra(r,o,i)-e,s>0?n=r:t=r;while(Math.abs(s)>tc&&++a<nc);return r}function en(e,t,n,o){if(e===t&&n===o)return Ee;const i=s=>oc(s,0,1,e,n);return s=>s===0||s===1?s:ra(i(s),t,o)}const aa=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,la=e=>t=>1-e(1-t),ua=en(.33,1.53,.69,.99),wi=la(ua),ca=aa(wi),da=e=>(e*=2)<1?.5*wi(e):.5*(2-Math.pow(2,-10*(e-1))),xi=e=>1-Math.sin(Math.acos(e)),fa=la(xi),ha=aa(xi),ic=en(.42,0,1,1),sc=en(0,0,.58,1),ga=en(.42,0,.58,1),rc=e=>Array.isArray(e)&&typeof e[0]!="number",ma=e=>Array.isArray(e)&&typeof e[0]=="number",as={linear:Ee,easeIn:ic,easeInOut:ga,easeOut:sc,circIn:xi,circInOut:ha,circOut:fa,backIn:wi,backInOut:ca,backOut:ua,anticipate:da},ac=e=>typeof e=="string",ls=e=>{if(ma(e)){Ne(e.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[t,n,o,i]=e;return en(t,n,o,i)}else if(ac(e))return Ne(as[e]!==void 0,`Invalid easing type '${e}'`,"invalid-easing-type"),as[e];return e},ln=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function lc(e,t){let n=new Set,o=new Set,i=!1,s=!1;const r=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1};function l(c){r.has(c)&&(u.schedule(c),e()),c(a)}const u={schedule:(c,f=!1,d=!1)=>{const m=d&&i?n:o;return f&&r.add(c),m.has(c)||m.add(c),c},cancel:c=>{o.delete(c),r.delete(c)},process:c=>{if(a=c,i){s=!0;return}i=!0,[n,o]=[o,n],n.forEach(l),n.clear(),i=!1,s&&(s=!1,u.process(c))}};return u}const uc=40;function pa(e,t){let n=!1,o=!0;const i={delta:0,timestamp:0,isProcessing:!1},s=()=>n=!0,r=ln.reduce((p,S)=>(p[S]=lc(s),p),{}),{setup:a,read:l,resolveKeyframes:u,preUpdate:c,update:f,preRender:d,render:h,postRender:m}=r,g=()=>{const p=He.useManualTiming?i.timestamp:performance.now();n=!1,He.useManualTiming||(i.delta=o?1e3/60:Math.max(Math.min(p-i.timestamp,uc),1)),i.timestamp=p,i.isProcessing=!0,a.process(i),l.process(i),u.process(i),c.process(i),f.process(i),d.process(i),h.process(i),m.process(i),i.isProcessing=!1,n&&t&&(o=!1,e(g))},y=()=>{n=!0,o=!0,i.isProcessing||e(g)};return{schedule:ln.reduce((p,S)=>{const b=r[S];return p[S]=(P,V=!1,M=!1)=>(n||y(),b.schedule(P,V,M)),p},{}),cancel:p=>{for(let S=0;S<ln.length;S++)r[ln[S]].cancel(p)},state:i,steps:r}}const{schedule:te,cancel:Xe,state:ce,steps:to}=pa(typeof requestAnimationFrame<"u"?requestAnimationFrame:Ee,!0);let wn;function cc(){wn=void 0}const pe={now:()=>(wn===void 0&&pe.set(ce.isProcessing||He.useManualTiming?ce.timestamp:performance.now()),wn),set:e=>{wn=e,queueMicrotask(cc)}},va=e=>t=>typeof t=="string"&&t.startsWith(e),Ci=va("--"),dc=va("var(--"),Si=e=>dc(e)?fc.test(e.split("/*")[0].trim()):!1,fc=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,Et={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Ut={...Et,transform:e=>Be(0,1,e)},un={...Et,default:1},jt=e=>Math.round(e*1e5)/1e5,_i=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function hc(e){return e==null}const gc=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,bi=(e,t)=>n=>!!(typeof n=="string"&&gc.test(n)&&n.startsWith(e)||t&&!hc(n)&&Object.prototype.hasOwnProperty.call(n,t)),ya=(e,t,n)=>o=>{if(typeof o!="string")return o;const[i,s,r,a]=o.match(_i);return{[e]:parseFloat(i),[t]:parseFloat(s),[n]:parseFloat(r),alpha:a!==void 0?parseFloat(a):1}},mc=e=>Be(0,255,e),no={...Et,transform:e=>Math.round(mc(e))},it={test:bi("rgb","red"),parse:ya("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:o=1})=>"rgba("+no.transform(e)+", "+no.transform(t)+", "+no.transform(n)+", "+jt(Ut.transform(o))+")"};function pc(e){let t="",n="",o="",i="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),o=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),o=e.substring(3,4),i=e.substring(4,5),t+=t,n+=n,o+=o,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(o,16),alpha:i?parseInt(i,16)/255:1}}const Do={test:bi("#"),parse:pc,transform:it.transform},tn=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Ue=tn("deg"),Fe=tn("%"),G=tn("px"),vc=tn("vh"),yc=tn("vw"),us={...Fe,parse:e=>Fe.parse(e)/100,transform:e=>Fe.transform(e*100)},dt={test:bi("hsl","hue"),parse:ya("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:o=1})=>"hsla("+Math.round(e)+", "+Fe.transform(jt(t))+", "+Fe.transform(jt(n))+", "+jt(Ut.transform(o))+")"},le={test:e=>it.test(e)||Do.test(e)||dt.test(e),parse:e=>it.test(e)?it.parse(e):dt.test(e)?dt.parse(e):Do.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?it.transform(e):dt.transform(e),getAnimatableNone:e=>{const t=le.parse(e);return t.alpha=0,le.transform(t)}},wc=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function xc(e){return isNaN(e)&&typeof e=="string"&&(e.match(_i)?.length||0)+(e.match(wc)?.length||0)>0}const wa="number",xa="color",Cc="var",Sc="var(",cs="${}",_c=/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 Kt(e){const t=e.toString(),n=[],o={color:[],number:[],var:[]},i=[];let s=0;const a=t.replace(_c,l=>(le.test(l)?(o.color.push(s),i.push(xa),n.push(le.parse(l))):l.startsWith(Sc)?(o.var.push(s),i.push(Cc),n.push(l)):(o.number.push(s),i.push(wa),n.push(parseFloat(l))),++s,cs)).split(cs);return{values:n,split:a,indexes:o,types:i}}function Ca(e){return Kt(e).values}function Sa(e){const{split:t,types:n}=Kt(e),o=t.length;return i=>{let s="";for(let r=0;r<o;r++)if(s+=t[r],i[r]!==void 0){const a=n[r];a===wa?s+=jt(i[r]):a===xa?s+=le.transform(i[r]):s+=i[r]}return s}}const bc=e=>typeof e=="number"?0:le.test(e)?le.getAnimatableNone(e):e;function Rc(e){const t=Ca(e);return Sa(e)(t.map(bc))}const Ye={test:xc,parse:Ca,createTransformer:Sa,getAnimatableNone:Rc};function oo(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 Ec({hue:e,saturation:t,lightness:n,alpha:o}){e/=360,t/=100,n/=100;let i=0,s=0,r=0;if(!t)i=s=r=n;else{const a=n<.5?n*(1+t):n+t-n*t,l=2*n-a;i=oo(l,a,e+1/3),s=oo(l,a,e),r=oo(l,a,e-1/3)}return{red:Math.round(i*255),green:Math.round(s*255),blue:Math.round(r*255),alpha:o}}function En(e,t){return n=>n>0?t:e}const oe=(e,t,n)=>e+(t-e)*n,io=(e,t,n)=>{const o=e*e,i=n*(t*t-o)+o;return i<0?0:Math.sqrt(i)},Mc=[Do,it,dt],Pc=e=>Mc.find(t=>t.test(e));function ds(e){const t=Pc(e);if(Rt(!!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===dt&&(n=Ec(n)),n}const fs=(e,t)=>{const n=ds(e),o=ds(t);if(!n||!o)return En(e,t);const i={...n};return s=>(i.red=io(n.red,o.red,s),i.green=io(n.green,o.green,s),i.blue=io(n.blue,o.blue,s),i.alpha=oe(n.alpha,o.alpha,s),it.transform(i))},ko=new Set(["none","hidden"]);function Tc(e,t){return ko.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function Vc(e,t){return n=>oe(e,t,n)}function Ri(e){return typeof e=="number"?Vc:typeof e=="string"?Si(e)?En:le.test(e)?fs:kc:Array.isArray(e)?_a:typeof e=="object"?le.test(e)?fs:Ac:En}function _a(e,t){const n=[...e],o=n.length,i=e.map((s,r)=>Ri(s)(s,t[r]));return s=>{for(let r=0;r<o;r++)n[r]=i[r](s);return n}}function Ac(e,t){const n={...e,...t},o={};for(const i in n)e[i]!==void 0&&t[i]!==void 0&&(o[i]=Ri(e[i])(e[i],t[i]));return i=>{for(const s in o)n[s]=o[s](i);return n}}function Dc(e,t){const n=[],o={color:0,var:0,number:0};for(let i=0;i<t.values.length;i++){const s=t.types[i],r=e.indexes[s][o[s]],a=e.values[r]??0;n[i]=a,o[s]++}return n}const kc=(e,t)=>{const n=Ye.createTransformer(t),o=Kt(e),i=Kt(t);return o.indexes.var.length===i.indexes.var.length&&o.indexes.color.length===i.indexes.color.length&&o.indexes.number.length>=i.indexes.number.length?ko.has(e)&&!i.values.length||ko.has(t)&&!o.values.length?Tc(e,t):Qt(_a(Dc(o,i),i.values),n):(Rt(!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"),En(e,t))};function ba(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?oe(e,t,n):Ri(e)(e,t)}const Fc=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>te.update(t,n),stop:()=>Xe(t),now:()=>ce.isProcessing?ce.timestamp:pe.now()}},Ra=(e,t,n=10)=>{let o="";const i=Math.max(Math.round(t/n),2);for(let s=0;s<i;s++)o+=Math.round(e(s/(i-1))*1e4)/1e4+", ";return`linear(${o.substring(0,o.length-2)})`},Mn=2e4;function Ei(e){let t=0;const n=50;let o=e.next(t);for(;!o.done&&t<Mn;)t+=n,o=e.next(t);return t>=Mn?1/0:t}function Lc(e,t=100,n){const o=n({...e,keyframes:[0,t]}),i=Math.min(Ei(o),Mn);return{type:"keyframes",ease:s=>o.next(i*s).value/t,duration:Re(i)}}const Ic=5;function Ea(e,t,n){const o=Math.max(t-Ic,0);return sa(n-e(o),t-o)}const ne={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},so=.001;function $c({duration:e=ne.duration,bounce:t=ne.bounce,velocity:n=ne.velocity,mass:o=ne.mass}){let i,s;Rt(e<=Ae(ne.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let r=1-t;r=Be(ne.minDamping,ne.maxDamping,r),e=Be(ne.minDuration,ne.maxDuration,Re(e)),r<1?(i=u=>{const c=u*r,f=c*e,d=c-n,h=Fo(u,r),m=Math.exp(-f);return so-d/h*m},s=u=>{const f=u*r*e,d=f*n+n,h=Math.pow(r,2)*Math.pow(u,2)*e,m=Math.exp(-f),g=Fo(Math.pow(u,2),r);return(-i(u)+so>0?-1:1)*((d-h)*m)/g}):(i=u=>{const c=Math.exp(-u*e),f=(u-n)*e+1;return-so+c*f},s=u=>{const c=Math.exp(-u*e),f=(n-u)*(e*e);return c*f});const a=5/e,l=Oc(i,s,a);if(e=Ae(e),isNaN(l))return{stiffness:ne.stiffness,damping:ne.damping,duration:e};{const u=Math.pow(l,2)*o;return{stiffness:u,damping:r*2*Math.sqrt(o*u),duration:e}}}const jc=12;function Oc(e,t,n){let o=n;for(let i=1;i<jc;i++)o=o-e(o)/t(o);return o}function Fo(e,t){return e*Math.sqrt(1-t*t)}const zc=["duration","bounce"],Bc=["stiffness","damping","mass"];function hs(e,t){return t.some(n=>e[n]!==void 0)}function Nc(e){let t={velocity:ne.velocity,stiffness:ne.stiffness,damping:ne.damping,mass:ne.mass,isResolvedFromDuration:!1,...e};if(!hs(e,Bc)&&hs(e,zc))if(e.visualDuration){const n=e.visualDuration,o=2*Math.PI/(n*1.2),i=o*o,s=2*Be(.05,1,1-(e.bounce||0))*Math.sqrt(i);t={...t,mass:ne.mass,stiffness:i,damping:s}}else{const n=$c(e);t={...t,...n,mass:ne.mass},t.isResolvedFromDuration=!0}return t}function Pn(e=ne.visualDuration,t=ne.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:o,restDelta:i}=n;const s=n.keyframes[0],r=n.keyframes[n.keyframes.length-1],a={done:!1,value:s},{stiffness:l,damping:u,mass:c,duration:f,velocity:d,isResolvedFromDuration:h}=Nc({...n,velocity:-Re(n.velocity||0)}),m=d||0,g=u/(2*Math.sqrt(l*c)),y=r-s,v=Re(Math.sqrt(l/c)),x=Math.abs(y)<5;o||(o=x?ne.restSpeed.granular:ne.restSpeed.default),i||(i=x?ne.restDelta.granular:ne.restDelta.default);let p;if(g<1){const b=Fo(v,g);p=P=>{const V=Math.exp(-g*v*P);return r-V*((m+g*v*y)/b*Math.sin(b*P)+y*Math.cos(b*P))}}else if(g===1)p=b=>r-Math.exp(-v*b)*(y+(m+v*y)*b);else{const b=v*Math.sqrt(g*g-1);p=P=>{const V=Math.exp(-g*v*P),M=Math.min(b*P,300);return r-V*((m+g*v*y)*Math.sinh(M)+b*y*Math.cosh(M))/b}}const S={calculatedDuration:h&&f||null,next:b=>{const P=p(b);if(h)a.done=b>=f;else{let V=b===0?m:0;g<1&&(V=b===0?Ae(m):Ea(p,b,P));const M=Math.abs(V)<=o,D=Math.abs(r-P)<=i;a.done=M&&D}return a.value=a.done?r:P,a},toString:()=>{const b=Math.min(Ei(S),Mn),P=Ra(V=>S.next(b*V).value,b,30);return b+"ms "+P},toTransition:()=>{}};return S}Pn.applyToOptions=e=>{const t=Lc(e,100,Pn);return e.ease=t.ease,e.duration=Ae(t.duration),e.type="keyframes",e};function Lo({keyframes:e,velocity:t=0,power:n=.8,timeConstant:o=325,bounceDamping:i=10,bounceStiffness:s=500,modifyTarget:r,min:a,max:l,restDelta:u=.5,restSpeed:c}){const f=e[0],d={done:!1,value:f},h=M=>a!==void 0&&M<a||l!==void 0&&M>l,m=M=>a===void 0?l:l===void 0||Math.abs(a-M)<Math.abs(l-M)?a:l;let g=n*t;const y=f+g,v=r===void 0?y:r(y);v!==y&&(g=v-f);const x=M=>-g*Math.exp(-M/o),p=M=>v+x(M),S=M=>{const D=x(M),k=p(M);d.done=Math.abs(D)<=u,d.value=d.done?v:k};let b,P;const V=M=>{h(d.value)&&(b=M,P=Pn({keyframes:[d.value,m(d.value)],velocity:Ea(p,M,d.value),damping:i,stiffness:s,restDelta:u,restSpeed:c}))};return V(0),{calculatedDuration:null,next:M=>{let D=!1;return!P&&b===void 0&&(D=!0,S(M),V(M)),b!==void 0&&M>=b?P.next(M-b):(!D&&S(M),d)}}}function Hc(e,t,n){const o=[],i=n||He.mix||ba,s=e.length-1;for(let r=0;r<s;r++){let a=i(e[r],e[r+1]);if(t){const l=Array.isArray(t)?t[r]||Ee:t;a=Qt(l,a)}o.push(a)}return o}function Wc(e,t,{clamp:n=!0,ease:o,mixer:i}={}){const s=e.length;if(Ne(s===t.length,"Both input and output ranges must be the same length","range-length"),s===1)return()=>t[0];if(s===2&&t[0]===t[1])return()=>t[1];const r=e[0]===e[1];e[0]>e[s-1]&&(e=[...e].reverse(),t=[...t].reverse());const a=Hc(t,o,i),l=a.length,u=c=>{if(r&&c<e[0])return t[0];let f=0;if(l>1)for(;f<e.length-2&&!(c<e[f+1]);f++);const d=Gt(e[f],e[f+1],c);return a[f](d)};return n?c=>u(Be(e[0],e[s-1],c)):u}function Gc(e,t){const n=e[e.length-1];for(let o=1;o<=t;o++){const i=Gt(0,t,o);e.push(oe(n,1,i))}}function Uc(e){const t=[0];return Gc(t,e.length-1),t}function Kc(e,t){return e.map(n=>n*t)}function qc(e,t){return e.map(()=>t||ga).splice(0,e.length-1)}function ft({duration:e=300,keyframes:t,times:n,ease:o="easeInOut"}){const i=rc(o)?o.map(ls):ls(o),s={done:!1,value:t[0]},r=Kc(n&&n.length===t.length?n:Uc(t),e),a=Wc(r,t,{ease:Array.isArray(i)?i:qc(t,i)});return{calculatedDuration:e,next:l=>(s.value=a(l),s.done=l>=e,s)}}const Xc=e=>e!==null;function Mi(e,{repeat:t,repeatType:n="loop"},o,i=1){const s=e.filter(Xc),a=i<0||t&&n!=="loop"&&t%2===1?0:s.length-1;return!a||o===void 0?s[a]:o}const Yc={decay:Lo,inertia:Lo,tween:ft,keyframes:ft,spring:Pn};function Ma(e){typeof e.type=="string"&&(e.type=Yc[e.type])}class Pi{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 Zc=e=>e/100;class Ti extends Pi{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!==pe.now()&&this.tick(pe.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;Ma(t);const{type:n=ft,repeat:o=0,repeatDelay:i=0,repeatType:s,velocity:r=0}=t;let{keyframes:a}=t;const l=n||ft;process.env.NODE_ENV!=="production"&&l!==ft&&Ne(a.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${a}`,"spring-two-frames"),l!==ft&&typeof a[0]!="number"&&(this.mixKeyframes=Qt(Zc,ba(a[0],a[1])),a=[0,100]);const u=l({...t,keyframes:a});s==="mirror"&&(this.mirroredGenerator=l({...t,keyframes:[...a].reverse(),velocity:-r})),u.calculatedDuration===null&&(u.calculatedDuration=Ei(u));const{calculatedDuration:c}=u;this.calculatedDuration=c,this.resolvedDuration=c+i,this.totalDuration=this.resolvedDuration*(o+1)-i,this.generator=u}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:o,totalDuration:i,mixKeyframes:s,mirroredGenerator:r,resolvedDuration:a,calculatedDuration:l}=this;if(this.startTime===null)return o.next(0);const{delay:u=0,keyframes:c,repeat:f,repeatType:d,repeatDelay:h,type:m,onUpdate:g,finalKeyframe:y}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-i/this.speed,this.startTime)),n?this.currentTime=t:this.updateTime(t);const v=this.currentTime-u*(this.playbackSpeed>=0?1:-1),x=this.playbackSpeed>=0?v<0:v>i;this.currentTime=Math.max(v,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=i);let p=this.currentTime,S=o;if(f){const M=Math.min(this.currentTime,i)/a;let D=Math.floor(M),k=M%1;!k&&M>=1&&(k=1),k===1&&D--,D=Math.min(D,f+1),!!(D%2)&&(d==="reverse"?(k=1-k,h&&(k-=h/a)):d==="mirror"&&(S=r)),p=Be(0,1,k)*a}const b=x?{done:!1,value:c[0]}:S.next(p);s&&(b.value=s(b.value));let{done:P}=b;!x&&l!==null&&(P=this.playbackSpeed>=0?this.currentTime>=i:this.currentTime<=0);const V=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&P);return V&&m!==Lo&&(b.value=Mi(c,this.options,y,this.speed)),g&&g(b.value),V&&this.finish(),b}then(t,n){return this.finished.then(t,n)}get duration(){return Re(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+Re(t)}get time(){return Re(this.currentTime)}set time(t){t=Ae(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(pe.now());const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=Re(this.currentTime))}play(){if(this.isStopped)return;const{driver:t=Fc,startTime:n}=this.options;this.driver||(this.driver=t(i=>this.tick(i))),this.options.onPlay?.();const o=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=o):this.holdTime!==null?this.startTime=o-this.holdTime:this.startTime||(this.startTime=n??o),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(pe.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 Jc(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const st=e=>e*180/Math.PI,Io=e=>{const t=st(Math.atan2(e[1],e[0]));return $o(t)},Qc={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:Io,rotateZ:Io,skewX:e=>st(Math.atan(e[1])),skewY:e=>st(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},$o=e=>(e=e%360,e<0&&(e+=360),e),gs=Io,ms=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),ps=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),ed={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:ms,scaleY:ps,scale:e=>(ms(e)+ps(e))/2,rotateX:e=>$o(st(Math.atan2(e[6],e[5]))),rotateY:e=>$o(st(Math.atan2(-e[2],e[0]))),rotateZ:gs,rotate:gs,skewX:e=>st(Math.atan(e[4])),skewY:e=>st(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function jo(e){return e.includes("scale")?1:0}function Oo(e,t){if(!e||e==="none")return jo(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let o,i;if(n)o=ed,i=n;else{const a=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);o=Qc,i=a}if(!i)return jo(t);const s=o[t],r=i[1].split(",").map(nd);return typeof s=="function"?s(r):r[s]}const td=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return Oo(n,t)};function nd(e){return parseFloat(e.trim())}const Mt=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Pt=new Set(Mt),vs=e=>e===Et||e===G,od=new Set(["x","y","z"]),id=Mt.filter(e=>!od.has(e));function sd(e){const t=[];return id.forEach(n=>{const o=e.getValue(n);o!==void 0&&(t.push([n,o.get()]),o.set(n.startsWith("scale")?1:0))}),t}const rt={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})=>Oo(t,"x"),y:(e,{transform:t})=>Oo(t,"y")};rt.translateX=rt.x;rt.translateY=rt.y;const at=new Set;let zo=!1,Bo=!1,No=!1;function Pa(){if(Bo){const e=Array.from(at).filter(o=>o.needsMeasurement),t=new Set(e.map(o=>o.element)),n=new Map;t.forEach(o=>{const i=sd(o);i.length&&(n.set(o,i),o.render())}),e.forEach(o=>o.measureInitialState()),t.forEach(o=>{o.render();const i=n.get(o);i&&i.forEach(([s,r])=>{o.getValue(s)?.set(r)})}),e.forEach(o=>o.measureEndState()),e.forEach(o=>{o.suspendedScrollY!==void 0&&window.scrollTo(0,o.suspendedScrollY)})}Bo=!1,zo=!1,at.forEach(e=>e.complete(No)),at.clear()}function Ta(){at.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Bo=!0)})}function rd(){No=!0,Ta(),Pa(),No=!1}class Vi{constructor(t,n,o,i,s,r=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=o,this.motionValue=i,this.element=s,this.isAsync=r}scheduleResolve(){this.state="scheduled",this.isAsync?(at.add(this),zo||(zo=!0,te.read(Ta),te.resolveKeyframes(Pa))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:o,motionValue:i}=this;if(t[0]===null){const s=i?.get(),r=t[t.length-1];if(s!==void 0)t[0]=s;else if(o&&n){const a=o.readValue(n,r);a!=null&&(t[0]=a)}t[0]===void 0&&(t[0]=r),i&&s===void 0&&i.set(t[0])}Jc(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),at.delete(this)}cancel(){this.state==="scheduled"&&(at.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const ad=e=>e.startsWith("--");function ld(e,t,n){ad(t)?e.style.setProperty(t,n):e.style[t]=n}const ud=pi(()=>window.ScrollTimeline!==void 0),cd={};function dd(e,t){const n=pi(e);return()=>cd[t]??n()}const Va=dd(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),$t=([e,t,n,o])=>`cubic-bezier(${e}, ${t}, ${n}, ${o})`,ys={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:$t([0,.65,.55,1]),circOut:$t([.55,0,1,.45]),backIn:$t([.31,.01,.66,-.59]),backOut:$t([.33,1.53,.69,.99])};function Aa(e,t){if(e)return typeof e=="function"?Va()?Ra(e,t):"ease-out":ma(e)?$t(e):Array.isArray(e)?e.map(n=>Aa(n,t)||ys.easeOut):ys[e]}function fd(e,t,n,{delay:o=0,duration:i=300,repeat:s=0,repeatType:r="loop",ease:a="easeOut",times:l}={},u=void 0){const c={[t]:n};l&&(c.offset=l);const f=Aa(a,i);Array.isArray(f)&&(c.easing=f);const d={delay:o,duration:i,easing:Array.isArray(f)?"linear":f,fill:"both",iterations:s+1,direction:r==="reverse"?"alternate":"normal"};return u&&(d.pseudoElement=u),e.animate(c,d)}function Da(e){return typeof e=="function"&&"applyToOptions"in e}function hd({type:e,...t}){return Da(e)&&Va()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class gd extends Pi{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,!t)return;const{element:n,name:o,keyframes:i,pseudoElement:s,allowFlatten:r=!1,finalKeyframe:a,onComplete:l}=t;this.isPseudoElement=!!s,this.allowFlatten=r,this.options=t,Ne(typeof t.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");const u=hd(t);this.animation=fd(n,o,i,u,s),u.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!s){const c=Mi(i,this.options,a,this.speed);this.updateMotionValue?this.updateMotionValue(c):ld(n,o,c),this.animation.cancel()}l?.(),this.notifyFinished()}}play(){this.isStopped||(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 Re(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+Re(t)}get time(){return Re(Number(this.animation.currentTime)||0)}set time(t){this.finishedTime=null,this.animation.currentTime=Ae(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 Number(this.animation.startTime)}set startTime(t){this.animation.startTime=t}attachTimeline({timeline:t,observe:n}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,t&&ud()?(this.animation.timeline=t,Ee):n(this)}}const ka={anticipate:da,backInOut:ca,circInOut:ha};function md(e){return e in ka}function pd(e){typeof e.ease=="string"&&md(e.ease)&&(e.ease=ka[e.ease])}const ws=10;class vd extends gd{constructor(t){pd(t),Ma(t),super(t),t.startTime&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:n,onUpdate:o,onComplete:i,element:s,...r}=this.options;if(!n)return;if(t!==void 0){n.set(t);return}const a=new Ti({...r,autoplay:!1}),l=Ae(this.finishedTime??this.time);n.setWithVelocity(a.sample(l-ws).value,a.sample(l).value,ws),a.stop()}}const xs=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Ye.test(e)||e==="0")&&!e.startsWith("url("));function yd(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 wd(e,t,n,o){const i=e[0];if(i===null)return!1;if(t==="display"||t==="visibility")return!0;const s=e[e.length-1],r=xs(i,t),a=xs(s,t);return Rt(r===a,`You are trying to animate ${t} from "${i}" to "${s}". "${r?s:i}" is not an animatable value.`,"value-not-animatable"),!r||!a?!1:yd(e)||(n==="spring"||Da(n))&&o}function Ho(e){e.duration=0,e.type="keyframes"}const xd=new Set(["opacity","clipPath","filter","transform"]),Cd=pi(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function Sd(e){const{motionValue:t,name:n,repeatDelay:o,repeatType:i,damping:s,type:r}=e;if(!(t?.owner?.current instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:u}=t.owner.getProps();return Cd()&&n&&xd.has(n)&&(n!=="transform"||!u)&&!l&&!o&&i!=="mirror"&&s!==0&&r!=="inertia"}const _d=40;class bd extends Pi{constructor({autoplay:t=!0,delay:n=0,type:o="keyframes",repeat:i=0,repeatDelay:s=0,repeatType:r="loop",keyframes:a,name:l,motionValue:u,element:c,...f}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=pe.now();const d={autoplay:t,delay:n,type:o,repeat:i,repeatDelay:s,repeatType:r,name:l,motionValue:u,element:c,...f},h=c?.KeyframeResolver||Vi;this.keyframeResolver=new h(a,(m,g,y)=>this.onKeyframesResolved(m,g,d,!y),l,u,c),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(t,n,o,i){this.keyframeResolver=void 0;const{name:s,type:r,velocity:a,delay:l,isHandoff:u,onUpdate:c}=o;this.resolvedAt=pe.now(),wd(t,s,r,a)||((He.instantAnimations||!l)&&c?.(Mi(t,o,n)),t[0]=t[t.length-1],Ho(o),o.repeat=0);const d={startTime:i?this.resolvedAt?this.resolvedAt-this.createdAt>_d?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...o,keyframes:t},h=!u&&Sd(d)?new vd({...d,element:d.motionValue.owner.current}):new Ti(d);h.finished.then(()=>this.notifyFinished()).catch(Ee),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(),rd()),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()}}const Rd=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Ed(e){const t=Rd.exec(e);if(!t)return[,];const[,n,o,i]=t;return[`--${n??o}`,i]}const Md=4;function Fa(e,t,n=1){Ne(n<=Md,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[o,i]=Ed(e);if(!o)return;const s=window.getComputedStyle(t).getPropertyValue(o);if(s){const r=s.trim();return na(r)?parseFloat(r):r}return Si(i)?Fa(i,t,n+1):i}function Ai(e,t){return e?.[t]??e?.default??e}const La=new Set(["width","height","top","left","right","bottom",...Mt]),Pd={test:e=>e==="auto",parse:e=>e},Ia=e=>t=>t.test(e),$a=[Et,G,Fe,Ue,yc,vc,Pd],Cs=e=>$a.find(Ia(e));function Td(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||ia(e):!0}const Vd=new Set(["brightness","contrast","saturate","opacity"]);function Ad(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[o]=n.match(_i)||[];if(!o)return e;const i=n.replace(o,"");let s=Vd.has(t)?1:0;return o!==n&&(s*=100),t+"("+s+i+")"}const Dd=/\b([a-z-]*)\(.*?\)/gu,Wo={...Ye,getAnimatableNone:e=>{const t=e.match(Dd);return t?t.map(Ad).join(" "):e}},Ss={...Et,transform:Math.round},kd={rotate:Ue,rotateX:Ue,rotateY:Ue,rotateZ:Ue,scale:un,scaleX:un,scaleY:un,scaleZ:un,skew:Ue,skewX:Ue,skewY:Ue,distance:G,translateX:G,translateY:G,translateZ:G,x:G,y:G,z:G,perspective:G,transformPerspective:G,opacity:Ut,originX:us,originY:us,originZ:G},Di={borderWidth:G,borderTopWidth:G,borderRightWidth:G,borderBottomWidth:G,borderLeftWidth:G,borderRadius:G,radius:G,borderTopLeftRadius:G,borderTopRightRadius:G,borderBottomRightRadius:G,borderBottomLeftRadius:G,width:G,maxWidth:G,height:G,maxHeight:G,top:G,right:G,bottom:G,left:G,padding:G,paddingTop:G,paddingRight:G,paddingBottom:G,paddingLeft:G,margin:G,marginTop:G,marginRight:G,marginBottom:G,marginLeft:G,backgroundPositionX:G,backgroundPositionY:G,...kd,zIndex:Ss,fillOpacity:Ut,strokeOpacity:Ut,numOctaves:Ss},Fd={...Di,color:le,backgroundColor:le,outlineColor:le,fill:le,stroke:le,borderColor:le,borderTopColor:le,borderRightColor:le,borderBottomColor:le,borderLeftColor:le,filter:Wo,WebkitFilter:Wo},ja=e=>Fd[e];function Oa(e,t){let n=ja(e);return n!==Wo&&(n=Ye),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const Ld=new Set(["auto","none","0"]);function Id(e,t,n){let o=0,i;for(;o<e.length&&!i;){const s=e[o];typeof s=="string"&&!Ld.has(s)&&Kt(s).values.length&&(i=e[o]),o++}if(i&&n)for(const s of t)e[s]=Oa(n,i)}class $d extends Vi{constructor(t,n,o,i,s){super(t,n,o,i,s,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:o}=this;if(!n||!n.current)return;super.readKeyframes();for(let l=0;l<t.length;l++){let u=t[l];if(typeof u=="string"&&(u=u.trim(),Si(u))){const c=Fa(u,n.current);c!==void 0&&(t[l]=c),l===t.length-1&&(this.finalKeyframe=u)}}if(this.resolveNoneKeyframes(),!La.has(o)||t.length!==2)return;const[i,s]=t,r=Cs(i),a=Cs(s);if(r!==a)if(vs(r)&&vs(a))for(let l=0;l<t.length;l++){const u=t[l];typeof u=="string"&&(t[l]=parseFloat(u))}else rt[o]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,o=[];for(let i=0;i<t.length;i++)(t[i]===null||Td(t[i]))&&o.push(i);o.length&&Id(t,o,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:o}=this;if(!t||!t.current)return;o==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=rt[o](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const i=n[n.length-1];i!==void 0&&t.getValue(o,i).jump(i,!1)}measureEndState(){const{element:t,name:n,unresolvedKeyframes:o}=this;if(!t||!t.current)return;const i=t.getValue(n);i&&i.jump(this.measuredOrigin,!1);const s=o.length-1,r=o[s];o[s]=rt[n](t.measureViewportBox(),window.getComputedStyle(t.current)),r!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=r),this.removedTransforms?.length&&this.removedTransforms.forEach(([a,l])=>{t.getValue(a).set(l)}),this.resolveNoneKeyframes()}}function jd(e,t,n){if(e instanceof EventTarget)return[e];if(typeof e=="string"){let o=document;const i=n?.[e]??o.querySelectorAll(e);return i?Array.from(i):[]}return Array.from(e)}const za=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function Ba(e){return oa(e)&&"offsetHeight"in e}const _s=30,Od=e=>!isNaN(parseFloat(e));class zd{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=o=>{const i=pe.now();if(this.updatedAt!==i&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(o),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const s of this.dependents)s.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=pe.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=Od(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&yi(!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 vi);const o=this.events[t].add(n);return t==="change"?()=>{o(),te.read(()=>{this.events.change.getSize()||this.stop()})}:o}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,o){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-o}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 this.current}getPrevious(){return this.prev}getVelocity(){const t=pe.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>_s)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,_s);return sa(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 xt(e,t){return new zd(e,t)}const{schedule:ki}=pa(queueMicrotask,!1),Ve={x:!1,y:!1};function Na(){return Ve.x||Ve.y}function Bd(e){return e==="x"||e==="y"?Ve[e]?null:(Ve[e]=!0,()=>{Ve[e]=!1}):Ve.x||Ve.y?null:(Ve.x=Ve.y=!0,()=>{Ve.x=Ve.y=!1})}function Ha(e,t){const n=jd(e),o=new AbortController,i={passive:!0,...t,signal:o.signal};return[n,i,()=>o.abort()]}function bs(e){return!(e.pointerType==="touch"||Na())}function Nd(e,t,n={}){const[o,i,s]=Ha(e,n),r=a=>{if(!bs(a))return;const{target:l}=a,u=t(l,a);if(typeof u!="function"||!l)return;const c=f=>{bs(f)&&(u(f),l.removeEventListener("pointerleave",c))};l.addEventListener("pointerleave",c,i)};return o.forEach(a=>{a.addEventListener("pointerenter",r,i)}),s}const Wa=(e,t)=>t?e===t?!0:Wa(e,t.parentElement):!1,Fi=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,Hd=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function Wd(e){return Hd.has(e.tagName)||e.tabIndex!==-1}const xn=new WeakSet;function Rs(e){return t=>{t.key==="Enter"&&e(t)}}function ro(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const Gd=(e,t)=>{const n=e.currentTarget;if(!n)return;const o=Rs(()=>{if(xn.has(n))return;ro(n,"down");const i=Rs(()=>{ro(n,"up")}),s=()=>ro(n,"cancel");n.addEventListener("keyup",i,t),n.addEventListener("blur",s,t)});n.addEventListener("keydown",o,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",o),t)};function Es(e){return Fi(e)&&!Na()}function Ud(e,t,n={}){const[o,i,s]=Ha(e,n),r=a=>{const l=a.currentTarget;if(!Es(a))return;xn.add(l);const u=t(l,a),c=(h,m)=>{window.removeEventListener("pointerup",f),window.removeEventListener("pointercancel",d),xn.has(l)&&xn.delete(l),Es(h)&&typeof u=="function"&&u(h,{success:m})},f=h=>{c(h,l===window||l===document||n.useGlobalTarget||Wa(l,h.target))},d=h=>{c(h,!1)};window.addEventListener("pointerup",f,i),window.addEventListener("pointercancel",d,i)};return o.forEach(a=>{(n.useGlobalTarget?window:a).addEventListener("pointerdown",r,i),Ba(a)&&(a.addEventListener("focus",u=>Gd(u,i)),!Wd(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),s}function Ga(e){return oa(e)&&"ownerSVGElement"in e}function Kd(e){return Ga(e)&&e.tagName==="svg"}const fe=e=>!!(e&&e.getVelocity),qd=[...$a,le,Ye],Xd=e=>qd.find(Ia(e)),Li=C.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function Ms(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Yd(...e){return t=>{let n=!1;const o=e.map(i=>{const s=Ms(i,t);return!n&&typeof s=="function"&&(n=!0),s});if(n)return()=>{for(let i=0;i<o.length;i++){const s=o[i];typeof s=="function"?s():Ms(e[i],null)}}}}function Zd(...e){return _.useCallback(Yd(...e),e)}class Jd extends _.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const o=n.offsetParent,i=Ba(o)&&o.offsetWidth||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=i-s.width-s.left}return null}componentDidUpdate(){}render(){return this.props.children}}function Qd({children:e,isPresent:t,anchorX:n,root:o}){const i=C.useId(),s=C.useRef(null),r=C.useRef({width:0,height:0,top:0,left:0,right:0}),{nonce:a}=C.useContext(Li),l=Zd(s,e?.ref);return C.useInsertionEffect(()=>{const{width:u,height:c,top:f,left:d,right:h}=r.current;if(t||!s.current||!u||!c)return;const m=n==="left"?`left: ${d}`:`right: ${h}`;s.current.dataset.motionPopId=i;const g=document.createElement("style");a&&(g.nonce=a);const y=o??document.head;return y.appendChild(g),g.sheet&&g.sheet.insertRule(`
6
+ [data-motion-pop-id="${i}"] {
7
+ position: absolute !important;
8
+ width: ${u}px !important;
9
+ height: ${c}px !important;
10
+ ${m}px !important;
11
+ top: ${f}px !important;
12
+ }
13
+ `),()=>{y.contains(g)&&y.removeChild(g)}},[t]),w.jsx(Jd,{isPresent:t,childRef:s,sizeRef:r,children:_.cloneElement(e,{ref:l})})}const ef=({children:e,initial:t,isPresent:n,onExitComplete:o,custom:i,presenceAffectsLayout:s,mode:r,anchorX:a,root:l})=>{const u=fi(tf),c=C.useId();let f=!0,d=C.useMemo(()=>(f=!1,{id:c,initial:t,isPresent:n,custom:i,onExitComplete:h=>{u.set(h,!0);for(const m of u.values())if(!m)return;o&&o()},register:h=>(u.set(h,!1),()=>u.delete(h))}),[n,u,o]);return s&&f&&(d={...d}),C.useMemo(()=>{u.forEach((h,m)=>u.set(m,!1))},[n]),_.useEffect(()=>{!n&&!u.size&&o&&o()},[n]),r==="popLayout"&&(e=w.jsx(Qd,{isPresent:n,anchorX:a,root:l,children:e})),w.jsx(In.Provider,{value:d,children:e})};function tf(){return new Map}function Ua(e=!0){const t=C.useContext(In);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:o,register:i}=t,s=C.useId();C.useEffect(()=>{if(e)return i(s)},[e]);const r=C.useCallback(()=>e&&o&&o(s),[s,o,e]);return!n&&o?[!1,r]:[!0]}const cn=e=>e.key||"";function Ps(e){const t=[];return C.Children.forEach(e,n=>{C.isValidElement(n)&&t.push(n)}),t}const nf=({children:e,custom:t,initial:n=!0,onExitComplete:o,presenceAffectsLayout:i=!0,mode:s="sync",propagate:r=!1,anchorX:a="left",root:l})=>{const[u,c]=Ua(r),f=C.useMemo(()=>Ps(e),[e]),d=r&&!u?[]:f.map(cn),h=C.useRef(!0),m=C.useRef(f),g=fi(()=>new Map),[y,v]=C.useState(f),[x,p]=C.useState(f);ta(()=>{h.current=!1,m.current=f;for(let P=0;P<x.length;P++){const V=cn(x[P]);d.includes(V)?g.delete(V):g.get(V)!==!0&&g.set(V,!1)}},[x,d.length,d.join("-")]);const S=[];if(f!==y){let P=[...f];for(let V=0;V<x.length;V++){const M=x[V],D=cn(M);d.includes(D)||(P.splice(V,0,M),S.push(M))}return s==="wait"&&S.length&&(P=S),p(Ps(P)),v(f),null}process.env.NODE_ENV!=="production"&&s==="wait"&&x.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:b}=C.useContext(di);return w.jsx(w.Fragment,{children:x.map(P=>{const V=cn(P),M=r&&!u?!1:f===x||d.includes(V),D=()=>{if(g.has(V))g.set(V,!0);else return;let k=!0;g.forEach(j=>{j||(k=!1)}),k&&(b?.(),p(m.current),r&&c?.(),o&&o())};return w.jsx(ef,{isPresent:M,initial:!h.current||n?void 0:!1,custom:t,presenceAffectsLayout:i,mode:s,root:l,onExitComplete:M?void 0:D,anchorX:a,children:P},V)})})},Ka=C.createContext({strict:!1}),Ts={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"]},Ct={};for(const e in Ts)Ct[e]={isEnabled:t=>Ts[e].some(n=>!!t[n])};function of(e){for(const t in e)Ct[t]={...Ct[t],...e[t]}}const sf=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 Tn(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||sf.has(e)}let qa=e=>!Tn(e);function rf(e){typeof e=="function"&&(qa=t=>t.startsWith("on")?!Tn(t):e(t))}try{rf(require("@emotion/is-prop-valid").default)}catch{}function af(e,t,n){const o={};for(const i in e)i==="values"&&typeof e.values=="object"||(qa(i)||n===!0&&Tn(i)||!t&&!Tn(i)||e.draggable&&i.startsWith("onDrag"))&&(o[i]=e[i]);return o}const $n=C.createContext({});function jn(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function qt(e){return typeof e=="string"||Array.isArray(e)}const Ii=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],$i=["initial",...Ii];function On(e){return jn(e.animate)||$i.some(t=>qt(e[t]))}function Xa(e){return!!(On(e)||e.variants)}function lf(e,t){if(On(e)){const{initial:n,animate:o}=e;return{initial:n===!1||qt(n)?n:void 0,animate:qt(o)?o:void 0}}return e.inherit!==!1?t:{}}function uf(e){const{initial:t,animate:n}=lf(e,C.useContext($n));return C.useMemo(()=>({initial:t,animate:n}),[Vs(t),Vs(n)])}function Vs(e){return Array.isArray(e)?e.join(" "):e}const Xt={};function cf(e){for(const t in e)Xt[t]=e[t],Ci(t)&&(Xt[t].isCSSVariable=!0)}function Ya(e,{layout:t,layoutId:n}){return Pt.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!Xt[e]||e==="opacity")}const df={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},ff=Mt.length;function hf(e,t,n){let o="",i=!0;for(let s=0;s<ff;s++){const r=Mt[s],a=e[r];if(a===void 0)continue;let l=!0;if(typeof a=="number"?l=a===(r.startsWith("scale")?1:0):l=parseFloat(a)===0,!l||n){const u=za(a,Di[r]);if(!l){i=!1;const c=df[r]||r;o+=`${c}(${u}) `}n&&(t[r]=u)}}return o=o.trim(),n?o=n(t,i?"":o):i&&(o="none"),o}function ji(e,t,n){const{style:o,vars:i,transformOrigin:s}=e;let r=!1,a=!1;for(const l in t){const u=t[l];if(Pt.has(l)){r=!0;continue}else if(Ci(l)){i[l]=u;continue}else{const c=za(u,Di[l]);l.startsWith("origin")?(a=!0,s[l]=c):o[l]=c}}if(t.transform||(r||n?o.transform=hf(t,e.transform,n):o.transform&&(o.transform="none")),a){const{originX:l="50%",originY:u="50%",originZ:c=0}=s;o.transformOrigin=`${l} ${u} ${c}`}}const Oi=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Za(e,t,n){for(const o in t)!fe(t[o])&&!Ya(o,n)&&(e[o]=t[o])}function gf({transformTemplate:e},t){return C.useMemo(()=>{const n=Oi();return ji(n,t,e),Object.assign({},n.vars,n.style)},[t])}function mf(e,t){const n=e.style||{},o={};return Za(o,n,e),Object.assign(o,gf(e,t)),o}function pf(e,t){const n={},o=mf(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,o.userSelect=o.WebkitUserSelect=o.WebkitTouchCallout="none",o.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=o,n}const vf={offset:"stroke-dashoffset",array:"stroke-dasharray"},yf={offset:"strokeDashoffset",array:"strokeDasharray"};function wf(e,t,n=1,o=0,i=!0){e.pathLength=1;const s=i?vf:yf;e[s.offset]=G.transform(-o);const r=G.transform(t),a=G.transform(n);e[s.array]=`${r} ${a}`}function Ja(e,{attrX:t,attrY:n,attrScale:o,pathLength:i,pathSpacing:s=1,pathOffset:r=0,...a},l,u,c){if(ji(e,a,u),l){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:f,style:d}=e;f.transform&&(d.transform=f.transform,delete f.transform),(d.transform||f.transformOrigin)&&(d.transformOrigin=f.transformOrigin??"50% 50%",delete f.transformOrigin),d.transform&&(d.transformBox=c?.transformBox??"fill-box",delete f.transformBox),t!==void 0&&(f.x=t),n!==void 0&&(f.y=n),o!==void 0&&(f.scale=o),i!==void 0&&wf(f,i,s,r,!1)}const Qa=()=>({...Oi(),attrs:{}}),el=e=>typeof e=="string"&&e.toLowerCase()==="svg";function xf(e,t,n,o){const i=C.useMemo(()=>{const s=Qa();return Ja(s,t,el(o),e.transformTemplate,e.style),{...s.attrs,style:{...s.style}}},[t]);if(e.style){const s={};Za(s,e.style,e),i.style={...s,...i.style}}return i}const Cf=["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 zi(e){return typeof e!="string"||e.includes("-")?!1:!!(Cf.indexOf(e)>-1||/[A-Z]/u.test(e))}function Sf(e,t,n,{latestValues:o},i,s=!1){const a=(zi(e)?xf:pf)(t,o,i,e),l=af(t,typeof e=="string",s),u=e!==C.Fragment?{...l,...a,ref:n}:{},{children:c}=t,f=C.useMemo(()=>fe(c)?c.get():c,[c]);return C.createElement(e,{...u,children:f})}function As(e){const t=[{},{}];return e?.values.forEach((n,o)=>{t[0][o]=n.get(),t[1][o]=n.getVelocity()}),t}function Bi(e,t,n,o){if(typeof t=="function"){const[i,s]=As(o);t=t(n!==void 0?n:e.custom,i,s)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[i,s]=As(o);t=t(n!==void 0?n:e.custom,i,s)}return t}function Cn(e){return fe(e)?e.get():e}function _f({scrapeMotionValuesFromProps:e,createRenderState:t},n,o,i){return{latestValues:bf(n,o,i,e),renderState:t()}}function bf(e,t,n,o){const i={},s=o(e,{});for(const d in s)i[d]=Cn(s[d]);let{initial:r,animate:a}=e;const l=On(e),u=Xa(e);t&&u&&!l&&e.inherit!==!1&&(r===void 0&&(r=t.initial),a===void 0&&(a=t.animate));let c=n?n.initial===!1:!1;c=c||r===!1;const f=c?a:r;if(f&&typeof f!="boolean"&&!jn(f)){const d=Array.isArray(f)?f:[f];for(let h=0;h<d.length;h++){const m=Bi(e,d[h]);if(m){const{transitionEnd:g,transition:y,...v}=m;for(const x in v){let p=v[x];if(Array.isArray(p)){const S=c?p.length-1:0;p=p[S]}p!==null&&(i[x]=p)}for(const x in g)i[x]=g[x]}}}return i}const tl=e=>(t,n)=>{const o=C.useContext($n),i=C.useContext(In),s=()=>_f(e,t,o,i);return n?s():fi(s)};function Ni(e,t,n){const{style:o}=e,i={};for(const s in o)(fe(o[s])||t.style&&fe(t.style[s])||Ya(s,e)||n?.getValue(s)?.liveStyle!==void 0)&&(i[s]=o[s]);return i}const Rf=tl({scrapeMotionValuesFromProps:Ni,createRenderState:Oi});function nl(e,t,n){const o=Ni(e,t,n);for(const i in e)if(fe(e[i])||fe(t[i])){const s=Mt.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;o[s]=e[i]}return o}const Ef=tl({scrapeMotionValuesFromProps:nl,createRenderState:Qa}),Mf=Symbol.for("motionComponentSymbol");function ht(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function Pf(e,t,n){return C.useCallback(o=>{o&&e.onMount&&e.onMount(o),t&&(o?t.mount(o):t.unmount()),n&&(typeof n=="function"?n(o):ht(n)&&(n.current=o))},[t])}const Hi=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),Tf="framerAppearId",ol="data-"+Hi(Tf),il=C.createContext({});function Vf(e,t,n,o,i){const{visualElement:s}=C.useContext($n),r=C.useContext(Ka),a=C.useContext(In),l=C.useContext(Li).reducedMotion,u=C.useRef(null);o=o||r.renderer,!u.current&&o&&(u.current=o(e,{visualState:t,parent:s,props:n,presenceContext:a,blockInitialAnimation:a?a.initial===!1:!1,reducedMotionConfig:l}));const c=u.current,f=C.useContext(il);c&&!c.projection&&i&&(c.type==="html"||c.type==="svg")&&Af(u.current,n,i,f);const d=C.useRef(!1);C.useInsertionEffect(()=>{c&&d.current&&c.update(n,a)});const h=n[ol],m=C.useRef(!!h&&!window.MotionHandoffIsComplete?.(h)&&window.MotionHasOptimisedAnimation?.(h));return ta(()=>{c&&(d.current=!0,window.MotionIsMounted=!0,c.updateFeatures(),c.scheduleRenderMicrotask(),m.current&&c.animationState&&c.animationState.animateChanges())}),C.useEffect(()=>{c&&(!m.current&&c.animationState&&c.animationState.animateChanges(),m.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(h)}),m.current=!1),c.enteringChildren=void 0)}),c}function Af(e,t,n,o){const{layoutId:i,layout:s,drag:r,dragConstraints:a,layoutScroll:l,layoutRoot:u,layoutCrossfade:c}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:sl(e.parent)),e.projection.setOptions({layoutId:i,layout:s,alwaysMeasureLayout:!!r||a&&ht(a),visualElement:e,animationType:typeof s=="string"?s:"both",initialPromotionConfig:o,crossfade:c,layoutScroll:l,layoutRoot:u})}function sl(e){if(e)return e.options.allowProjection!==!1?e.projection:sl(e.parent)}function ao(e,{forwardMotionProps:t=!1}={},n,o){n&&of(n);const i=zi(e)?Ef:Rf;function s(a,l){let u;const c={...C.useContext(Li),...a,layoutId:Df(a)},{isStatic:f}=c,d=uf(a),h=i(a,f);if(!f&&hi){kf(c,n);const m=Ff(c);u=m.MeasureLayout,d.visualElement=Vf(e,h,c,o,m.ProjectionNode)}return w.jsxs($n.Provider,{value:d,children:[u&&d.visualElement?w.jsx(u,{visualElement:d.visualElement,...c}):null,Sf(e,a,Pf(h,d.visualElement,l),h,f,t)]})}s.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const r=C.forwardRef(s);return r[Mf]=e,r}function Df({layoutId:e}){const t=C.useContext(di).id;return t&&e!==void 0?t+"-"+e:e}function kf(e,t){const n=C.useContext(Ka).strict;if(process.env.NODE_ENV!=="production"&&t&&n){const o="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";e.ignoreStrict?Rt(!1,o,"lazy-strict-mode"):Ne(!1,o,"lazy-strict-mode")}}function Ff(e){const{drag:t,layout:n}=Ct;if(!t&&!n)return{};const o={...t,...n};return{MeasureLayout:t?.isEnabled(e)||n?.isEnabled(e)?o.MeasureLayout:void 0,ProjectionNode:o.ProjectionNode}}function Lf(e,t){if(typeof Proxy>"u")return ao;const n=new Map,o=(s,r)=>ao(s,r,e,t),i=(s,r)=>(process.env.NODE_ENV!=="production"&&yi(!1,"motion() is deprecated. Use motion.create() instead."),o(s,r));return new Proxy(i,{get:(s,r)=>r==="create"?o:(n.has(r)||n.set(r,ao(r,void 0,e,t)),n.get(r))})}function rl({top:e,left:t,right:n,bottom:o}){return{x:{min:t,max:n},y:{min:e,max:o}}}function If({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function $f(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),o=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:o.y,right:o.x}}function lo(e){return e===void 0||e===1}function Go({scale:e,scaleX:t,scaleY:n}){return!lo(e)||!lo(t)||!lo(n)}function nt(e){return Go(e)||al(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function al(e){return Ds(e.x)||Ds(e.y)}function Ds(e){return e&&e!=="0%"}function Vn(e,t,n){const o=e-n,i=t*o;return n+i}function ks(e,t,n,o,i){return i!==void 0&&(e=Vn(e,i,o)),Vn(e,n,o)+t}function Uo(e,t=0,n=1,o,i){e.min=ks(e.min,t,n,o,i),e.max=ks(e.max,t,n,o,i)}function ll(e,{x:t,y:n}){Uo(e.x,t.translate,t.scale,t.originPoint),Uo(e.y,n.translate,n.scale,n.originPoint)}const Fs=.999999999999,Ls=1.0000000000001;function jf(e,t,n,o=!1){const i=n.length;if(!i)return;t.x=t.y=1;let s,r;for(let a=0;a<i;a++){s=n[a],r=s.projectionDelta;const{visualElement:l}=s.options;l&&l.props.style&&l.props.style.display==="contents"||(o&&s.options.layoutScroll&&s.scroll&&s!==s.root&&mt(e,{x:-s.scroll.offset.x,y:-s.scroll.offset.y}),r&&(t.x*=r.x.scale,t.y*=r.y.scale,ll(e,r)),o&&nt(s.latestValues)&&mt(e,s.latestValues))}t.x<Ls&&t.x>Fs&&(t.x=1),t.y<Ls&&t.y>Fs&&(t.y=1)}function gt(e,t){e.min=e.min+t,e.max=e.max+t}function Is(e,t,n,o,i=.5){const s=oe(e.min,e.max,i);Uo(e,t,n,s,o)}function mt(e,t){Is(e.x,t.x,t.scaleX,t.scale,t.originX),Is(e.y,t.y,t.scaleY,t.scale,t.originY)}function ul(e,t){return rl($f(e.getBoundingClientRect(),t))}function Of(e,t,n){const o=ul(e,n),{scroll:i}=t;return i&&(gt(o.x,i.offset.x),gt(o.y,i.offset.y)),o}const $s=()=>({translate:0,scale:1,origin:0,originPoint:0}),pt=()=>({x:$s(),y:$s()}),js=()=>({min:0,max:0}),re=()=>({x:js(),y:js()}),Ko={current:null},cl={current:!1};function zf(){if(cl.current=!0,!!hi)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Ko.current=e.matches;e.addEventListener("change",t),t()}else Ko.current=!1}const Bf=new WeakMap;function Nf(e,t,n){for(const o in t){const i=t[o],s=n[o];if(fe(i))e.addValue(o,i);else if(fe(s))e.addValue(o,xt(i,{owner:e}));else if(s!==i)if(e.hasValue(o)){const r=e.getValue(o);r.liveStyle===!0?r.jump(i):r.hasAnimated||r.set(i)}else{const r=e.getStaticValue(o);e.addValue(o,xt(r!==void 0?r:i,{owner:e}))}}for(const o in n)t[o]===void 0&&e.removeValue(o);return t}const Os=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class Hf{scrapeMotionValuesFromProps(t,n,o){return{}}constructor({parent:t,props:n,presenceContext:o,reducedMotionConfig:i,blockInitialAnimation:s,visualState:r},a={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=Vi,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 d=pe.now();this.renderScheduledAt<d&&(this.renderScheduledAt=d,te.render(this.render,!1,!0))};const{latestValues:l,renderState:u}=r;this.latestValues=l,this.baseTarget={...l},this.initialValues=n.initial?{...l}:{},this.renderState=u,this.parent=t,this.props=n,this.presenceContext=o,this.depth=t?t.depth+1:0,this.reducedMotionConfig=i,this.options=a,this.blockInitialAnimation=!!s,this.isControllingVariants=On(n),this.isVariantNode=Xa(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:c,...f}=this.scrapeMotionValuesFromProps(n,{},this);for(const d in f){const h=f[d];l[d]!==void 0&&fe(h)&&h.set(l[d])}}mount(t){this.current=t,Bf.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,o)=>this.bindToMotionValue(o,n)),cl.current||zf(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Ko.current,process.env.NODE_ENV!=="production"&&yi(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(),Xe(this.notifyUpdate),Xe(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 o=Pt.has(t);o&&this.onBindTransform&&this.onBindTransform();const i=n.on("change",r=>{this.latestValues[t]=r,this.props.onUpdate&&te.preRender(this.notifyUpdate),o&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let s;window.MotionCheckAppearSync&&(s=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{i(),s&&s(),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 Ct){const n=Ct[t];if(!n)continue;const{isEnabled:o,Feature:i}=n;if(!this.features[t]&&i&&o(this.props)&&(this.features[t]=new i(this)),this.features[t]){const s=this.features[t];s.isMounted?s.update():(s.mount(),s.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):re()}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 o=0;o<Os.length;o++){const i=Os[o];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const s="on"+i,r=t[s];r&&(this.propEventSubscriptions[i]=this.on(i,r))}this.prevMotionValues=Nf(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 o=this.values.get(t);n!==o&&(o&&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 o=this.values.get(t);return o===void 0&&n!==void 0&&(o=xt(n===null?void 0:n,{owner:this}),this.addValue(t,o)),o}readValue(t,n){let o=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return o!=null&&(typeof o=="string"&&(na(o)||ia(o))?o=parseFloat(o):!Xd(o)&&Ye.test(n)&&(o=Oa(t,n)),this.setBaseTarget(t,fe(o)?o.get():o)),fe(o)?o.get():o}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){const{initial:n}=this.props;let o;if(typeof n=="string"||typeof n=="object"){const s=Bi(this.props,n,this.presenceContext?.custom);s&&(o=s[t])}if(n&&o!==void 0)return o;const i=this.getBaseTargetFromProps(this.props,t);return i!==void 0&&!fe(i)?i:this.initialValues[t]!==void 0&&o===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new vi),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}scheduleRenderMicrotask(){ki.render(this.render)}}class dl extends Hf{constructor(){super(...arguments),this.KeyframeResolver=$d}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:void 0}removeValueFromRenderState(t,{vars:n,style:o}){delete n[t],delete o[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;fe(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function fl(e,{style:t,vars:n},o,i){const s=e.style;let r;for(r in t)s[r]=t[r];i?.applyProjectionStyles(s,o);for(r in n)s.setProperty(r,n[r])}function Wf(e){return window.getComputedStyle(e)}class Gf extends dl{constructor(){super(...arguments),this.type="html",this.renderInstance=fl}readValueFromInstance(t,n){if(Pt.has(n))return this.projection?.isProjecting?jo(n):td(t,n);{const o=Wf(t),i=(Ci(n)?o.getPropertyValue(n):o[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(t,{transformPagePoint:n}){return ul(t,n)}build(t,n,o){ji(t,n,o.transformTemplate)}scrapeMotionValuesFromProps(t,n,o){return Ni(t,n,o)}}const hl=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"]);function Uf(e,t,n,o){fl(e,t,void 0,o);for(const i in t.attrs)e.setAttribute(hl.has(i)?i:Hi(i),t.attrs[i])}class Kf extends dl{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=re}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(Pt.has(n)){const o=ja(n);return o&&o.default||0}return n=hl.has(n)?n:Hi(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,o){return nl(t,n,o)}build(t,n,o){Ja(t,n,this.isSVGTag,o.transformTemplate,o.style)}renderInstance(t,n,o,i){Uf(t,n,o,i)}mount(t){this.isSVGTag=el(t.tagName),super.mount(t)}}const qf=(e,t)=>zi(e)?new Kf(t):new Gf(t,{allowProjection:e!==C.Fragment});function yt(e,t,n){const o=e.getProps();return Bi(o,t,n!==void 0?n:o.custom,e)}const qo=e=>Array.isArray(e);function Xf(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,xt(n))}function Yf(e){return qo(e)?e[e.length-1]||0:e}function Zf(e,t){const n=yt(e,t);let{transitionEnd:o={},transition:i={},...s}=n||{};s={...s,...o};for(const r in s){const a=Yf(s[r]);Xf(e,r,a)}}function Jf(e){return!!(fe(e)&&e.add)}function Xo(e,t){const n=e.getValue("willChange");if(Jf(n))return n.add(t);if(!n&&He.WillChange){const o=new He.WillChange("auto");e.addValue("willChange",o),o.add(t)}}function gl(e){return e.props[ol]}const Qf=e=>e!==null;function eh(e,{repeat:t,repeatType:n="loop"},o){const i=e.filter(Qf),s=t&&n!=="loop"&&t%2===1?0:i.length-1;return i[s]}const th={type:"spring",stiffness:500,damping:25,restSpeed:10},nh=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),oh={type:"keyframes",duration:.8},ih={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},sh=(e,{keyframes:t})=>t.length>2?oh:Pt.has(e)?e.startsWith("scale")?nh(t[1]):th:ih;function rh({when:e,delay:t,delayChildren:n,staggerChildren:o,staggerDirection:i,repeat:s,repeatType:r,repeatDelay:a,from:l,elapsed:u,...c}){return!!Object.keys(c).length}const Wi=(e,t,n,o={},i,s)=>r=>{const a=Ai(o,e)||{},l=a.delay||o.delay||0;let{elapsed:u=0}=o;u=u-Ae(l);const c={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...a,delay:-u,onUpdate:d=>{t.set(d),a.onUpdate&&a.onUpdate(d)},onComplete:()=>{r(),a.onComplete&&a.onComplete()},name:e,motionValue:t,element:s?void 0:i};rh(a)||Object.assign(c,sh(e,c)),c.duration&&(c.duration=Ae(c.duration)),c.repeatDelay&&(c.repeatDelay=Ae(c.repeatDelay)),c.from!==void 0&&(c.keyframes[0]=c.from);let f=!1;if((c.type===!1||c.duration===0&&!c.repeatDelay)&&(Ho(c),c.delay===0&&(f=!0)),(He.instantAnimations||He.skipAnimations)&&(f=!0,Ho(c),c.delay=0),c.allowFlatten=!a.type&&!a.ease,f&&!s&&t.get()!==void 0){const d=eh(c.keyframes,a);if(d!==void 0){te.update(()=>{c.onUpdate(d),c.onComplete()});return}}return a.isSync?new Ti(c):new bd(c)};function ah({protectedKeys:e,needsAnimating:t},n){const o=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,o}function ml(e,t,{delay:n=0,transitionOverride:o,type:i}={}){let{transition:s=e.getDefaultTransition(),transitionEnd:r,...a}=t;o&&(s=o);const l=[],u=i&&e.animationState&&e.animationState.getState()[i];for(const c in a){const f=e.getValue(c,e.latestValues[c]??null),d=a[c];if(d===void 0||u&&ah(u,c))continue;const h={delay:n,...Ai(s||{},c)},m=f.get();if(m!==void 0&&!f.isAnimating&&!Array.isArray(d)&&d===m&&!h.velocity)continue;let g=!1;if(window.MotionHandoffAnimation){const v=gl(e);if(v){const x=window.MotionHandoffAnimation(v,c,te);x!==null&&(h.startTime=x,g=!0)}}Xo(e,c),f.start(Wi(c,f,d,e.shouldReduceMotion&&La.has(c)?{type:!1}:h,e,g));const y=f.animation;y&&l.push(y)}return r&&Promise.all(l).then(()=>{te.update(()=>{r&&Zf(e,r)})}),l}function pl(e,t,n,o=0,i=1){const s=Array.from(e).sort((u,c)=>u.sortNodePosition(c)).indexOf(t),r=e.size,a=(r-1)*o;return typeof n=="function"?n(s,r):i===1?s*o:a-s*o}function Yo(e,t,n={}){const o=yt(e,t,n.type==="exit"?e.presenceContext?.custom:void 0);let{transition:i=e.getDefaultTransition()||{}}=o||{};n.transitionOverride&&(i=n.transitionOverride);const s=o?()=>Promise.all(ml(e,o,n)):()=>Promise.resolve(),r=e.variantChildren&&e.variantChildren.size?(l=0)=>{const{delayChildren:u=0,staggerChildren:c,staggerDirection:f}=i;return lh(e,t,l,u,c,f,n)}:()=>Promise.resolve(),{when:a}=i;if(a){const[l,u]=a==="beforeChildren"?[s,r]:[r,s];return l().then(()=>u())}else return Promise.all([s(),r(n.delay)])}function lh(e,t,n=0,o=0,i=0,s=1,r){const a=[];for(const l of e.variantChildren)l.notify("AnimationStart",t),a.push(Yo(l,t,{...r,delay:n+(typeof o=="function"?0:o)+pl(e.variantChildren,l,o,i,s)}).then(()=>l.notify("AnimationComplete",t)));return Promise.all(a)}function uh(e,t,n={}){e.notify("AnimationStart",t);let o;if(Array.isArray(t)){const i=t.map(s=>Yo(e,s,n));o=Promise.all(i)}else if(typeof t=="string")o=Yo(e,t,n);else{const i=typeof t=="function"?yt(e,t,n.custom):t;o=Promise.all(ml(e,i,n))}return o.then(()=>{e.notify("AnimationComplete",t)})}function vl(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let o=0;o<n;o++)if(t[o]!==e[o])return!1;return!0}const ch=$i.length;function yl(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?yl(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<ch;n++){const o=$i[n],i=e.props[o];(qt(i)||i===!1)&&(t[o]=i)}return t}const dh=[...Ii].reverse(),fh=Ii.length;function hh(e){return t=>Promise.all(t.map(({animation:n,options:o})=>uh(e,n,o)))}function gh(e){let t=hh(e),n=zs(),o=!0;const i=l=>(u,c)=>{const f=yt(e,c,l==="exit"?e.presenceContext?.custom:void 0);if(f){const{transition:d,transitionEnd:h,...m}=f;u={...u,...m,...h}}return u};function s(l){t=l(e)}function r(l){const{props:u}=e,c=yl(e.parent)||{},f=[],d=new Set;let h={},m=1/0;for(let y=0;y<fh;y++){const v=dh[y],x=n[v],p=u[v]!==void 0?u[v]:c[v],S=qt(p),b=v===l?x.isActive:null;b===!1&&(m=y);let P=p===c[v]&&p!==u[v]&&S;if(P&&o&&e.manuallyAnimateOnMount&&(P=!1),x.protectedKeys={...h},!x.isActive&&b===null||!p&&!x.prevProp||jn(p)||typeof p=="boolean")continue;const V=mh(x.prevProp,p);let M=V||v===l&&x.isActive&&!P&&S||y>m&&S,D=!1;const k=Array.isArray(p)?p:[p];let j=k.reduce(i(v),{});b===!1&&(j={});const{prevResolvedValues:N={}}=x,O={...N,...j},A=E=>{M=!0,d.has(E)&&(D=!0,d.delete(E)),x.needsAnimating[E]=!0;const R=e.getValue(E);R&&(R.liveStyle=!1)};for(const E in O){const R=j[E],T=N[E];if(h.hasOwnProperty(E))continue;let L=!1;qo(R)&&qo(T)?L=!vl(R,T):L=R!==T,L?R!=null?A(E):d.add(E):R!==void 0&&d.has(E)?A(E):x.protectedKeys[E]=!0}x.prevProp=p,x.prevResolvedValues=j,x.isActive&&(h={...h,...j}),o&&e.blockInitialAnimation&&(M=!1);const B=P&&V;M&&(!B||D)&&f.push(...k.map(E=>{const R={type:v};if(typeof E=="string"&&o&&!B&&e.manuallyAnimateOnMount&&e.parent){const{parent:T}=e,L=yt(T,E);if(T.enteringChildren&&L){const{delayChildren:Y}=L.transition||{};R.delay=pl(T.enteringChildren,e,Y)}}return{animation:E,options:R}}))}if(d.size){const y={};if(typeof u.initial!="boolean"){const v=yt(e,Array.isArray(u.initial)?u.initial[0]:u.initial);v&&v.transition&&(y.transition=v.transition)}d.forEach(v=>{const x=e.getBaseTarget(v),p=e.getValue(v);p&&(p.liveStyle=!0),y[v]=x??null}),f.push({animation:y})}let g=!!f.length;return o&&(u.initial===!1||u.initial===u.animate)&&!e.manuallyAnimateOnMount&&(g=!1),o=!1,g?t(f):Promise.resolve()}function a(l,u){if(n[l].isActive===u)return Promise.resolve();e.variantChildren?.forEach(f=>f.animationState?.setActive(l,u)),n[l].isActive=u;const c=r(l);for(const f in n)n[f].protectedKeys={};return c}return{animateChanges:r,setActive:a,setAnimateFunction:s,getState:()=>n,reset:()=>{n=zs(),o=!0}}}function mh(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!vl(t,e):!1}function tt(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function zs(){return{animate:tt(!0),whileInView:tt(),whileHover:tt(),whileTap:tt(),whileDrag:tt(),whileFocus:tt(),exit:tt()}}class Qe{constructor(t){this.isMounted=!1,this.node=t}update(){}}class ph extends Qe{constructor(t){super(t),t.animationState||(t.animationState=gh(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();jn(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 vh=0;class yh extends Qe{constructor(){super(...arguments),this.id=vh++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:o}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===o)return;const i=this.node.animationState.setActive("exit",!t);n&&!t&&i.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 wh={animation:{Feature:ph},exit:{Feature:yh}};function Yt(e,t,n,o={passive:!0}){return e.addEventListener(t,n,o),()=>e.removeEventListener(t,n)}function nn(e){return{point:{x:e.pageX,y:e.pageY}}}const xh=e=>t=>Fi(t)&&e(t,nn(t));function Ot(e,t,n,o){return Yt(e,t,xh(n),o)}const wl=1e-4,Ch=1-wl,Sh=1+wl,xl=.01,_h=0-xl,bh=0+xl;function he(e){return e.max-e.min}function Rh(e,t,n){return Math.abs(e-t)<=n}function Bs(e,t,n,o=.5){e.origin=o,e.originPoint=oe(t.min,t.max,e.origin),e.scale=he(n)/he(t),e.translate=oe(n.min,n.max,e.origin)-e.originPoint,(e.scale>=Ch&&e.scale<=Sh||isNaN(e.scale))&&(e.scale=1),(e.translate>=_h&&e.translate<=bh||isNaN(e.translate))&&(e.translate=0)}function zt(e,t,n,o){Bs(e.x,t.x,n.x,o?o.originX:void 0),Bs(e.y,t.y,n.y,o?o.originY:void 0)}function Ns(e,t,n){e.min=n.min+t.min,e.max=e.min+he(t)}function Eh(e,t,n){Ns(e.x,t.x,n.x),Ns(e.y,t.y,n.y)}function Hs(e,t,n){e.min=t.min-n.min,e.max=e.min+he(t)}function Bt(e,t,n){Hs(e.x,t.x,n.x),Hs(e.y,t.y,n.y)}function be(e){return[e("x"),e("y")]}const Cl=({current:e})=>e?e.ownerDocument.defaultView:null,Ws=(e,t)=>Math.abs(e-t);function Mh(e,t){const n=Ws(e.x,t.x),o=Ws(e.y,t.y);return Math.sqrt(n**2+o**2)}class Sl{constructor(t,n,{transformPagePoint:o,contextWindow:i=window,dragSnapToOrigin:s=!1,distanceThreshold:r=3}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const d=co(this.lastMoveEventInfo,this.history),h=this.startEvent!==null,m=Mh(d.offset,{x:0,y:0})>=this.distanceThreshold;if(!h&&!m)return;const{point:g}=d,{timestamp:y}=ce;this.history.push({...g,timestamp:y});const{onStart:v,onMove:x}=this.handlers;h||(v&&v(this.lastMoveEvent,d),this.startEvent=this.lastMoveEvent),x&&x(this.lastMoveEvent,d)},this.handlePointerMove=(d,h)=>{this.lastMoveEvent=d,this.lastMoveEventInfo=uo(h,this.transformPagePoint),te.update(this.updatePoint,!0)},this.handlePointerUp=(d,h)=>{this.end();const{onEnd:m,onSessionEnd:g,resumeAnimation:y}=this.handlers;if(this.dragSnapToOrigin&&y&&y(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const v=co(d.type==="pointercancel"?this.lastMoveEventInfo:uo(h,this.transformPagePoint),this.history);this.startEvent&&m&&m(d,v),g&&g(d,v)},!Fi(t))return;this.dragSnapToOrigin=s,this.handlers=n,this.transformPagePoint=o,this.distanceThreshold=r,this.contextWindow=i||window;const a=nn(t),l=uo(a,this.transformPagePoint),{point:u}=l,{timestamp:c}=ce;this.history=[{...u,timestamp:c}];const{onSessionStart:f}=n;f&&f(t,co(l,this.history)),this.removeListeners=Qt(Ot(this.contextWindow,"pointermove",this.handlePointerMove),Ot(this.contextWindow,"pointerup",this.handlePointerUp),Ot(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Xe(this.updatePoint)}}function uo(e,t){return t?{point:t(e.point)}:e}function Gs(e,t){return{x:e.x-t.x,y:e.y-t.y}}function co({point:e},t){return{point:e,delta:Gs(e,_l(t)),offset:Gs(e,Ph(t)),velocity:Th(t,.1)}}function Ph(e){return e[0]}function _l(e){return e[e.length-1]}function Th(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,o=null;const i=_l(e);for(;n>=0&&(o=e[n],!(i.timestamp-o.timestamp>Ae(t)));)n--;if(!o)return{x:0,y:0};const s=Re(i.timestamp-o.timestamp);if(s===0)return{x:0,y:0};const r={x:(i.x-o.x)/s,y:(i.y-o.y)/s};return r.x===1/0&&(r.x=0),r.y===1/0&&(r.y=0),r}function Vh(e,{min:t,max:n},o){return t!==void 0&&e<t?e=o?oe(t,e,o.min):Math.max(e,t):n!==void 0&&e>n&&(e=o?oe(n,e,o.max):Math.min(e,n)),e}function Us(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 Ah(e,{top:t,left:n,bottom:o,right:i}){return{x:Us(e.x,n,i),y:Us(e.y,t,o)}}function Ks(e,t){let n=t.min-e.min,o=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,o]=[o,n]),{min:n,max:o}}function Dh(e,t){return{x:Ks(e.x,t.x),y:Ks(e.y,t.y)}}function kh(e,t){let n=.5;const o=he(e),i=he(t);return i>o?n=Gt(t.min,t.max-o,e.min):o>i&&(n=Gt(e.min,e.max-i,t.min)),Be(0,1,n)}function Fh(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 Zo=.35;function Lh(e=Zo){return e===!1?e=0:e===!0&&(e=Zo),{x:qs(e,"left","right"),y:qs(e,"top","bottom")}}function qs(e,t,n){return{min:Xs(e,t),max:Xs(e,n)}}function Xs(e,t){return typeof e=="number"?e:e[t]||0}const Ih=new WeakMap;class $h{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=re(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:n=!1,distanceThreshold:o}={}){const{presenceContext:i}=this.visualElement;if(i&&i.isPresent===!1)return;const s=f=>{const{dragSnapToOrigin:d}=this.getProps();d?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(nn(f).point)},r=(f,d)=>{const{drag:h,dragPropagation:m,onDragStart:g}=this.getProps();if(h&&!m&&(this.openDragLock&&this.openDragLock(),this.openDragLock=Bd(h),!this.openDragLock))return;this.latestPointerEvent=f,this.latestPanInfo=d,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),be(v=>{let x=this.getAxisMotionValue(v).get()||0;if(Fe.test(x)){const{projection:p}=this.visualElement;if(p&&p.layout){const S=p.layout.layoutBox[v];S&&(x=he(S)*(parseFloat(x)/100))}}this.originPoint[v]=x}),g&&te.postRender(()=>g(f,d)),Xo(this.visualElement,"transform");const{animationState:y}=this.visualElement;y&&y.setActive("whileDrag",!0)},a=(f,d)=>{this.latestPointerEvent=f,this.latestPanInfo=d;const{dragPropagation:h,dragDirectionLock:m,onDirectionLock:g,onDrag:y}=this.getProps();if(!h&&!this.openDragLock)return;const{offset:v}=d;if(m&&this.currentDirection===null){this.currentDirection=jh(v),this.currentDirection!==null&&g&&g(this.currentDirection);return}this.updateAxis("x",d.point,v),this.updateAxis("y",d.point,v),this.visualElement.render(),y&&y(f,d)},l=(f,d)=>{this.latestPointerEvent=f,this.latestPanInfo=d,this.stop(f,d),this.latestPointerEvent=null,this.latestPanInfo=null},u=()=>be(f=>this.getAnimationState(f)==="paused"&&this.getAxisMotionValue(f).animation?.play()),{dragSnapToOrigin:c}=this.getProps();this.panSession=new Sl(t,{onSessionStart:s,onStart:r,onMove:a,onSessionEnd:l,resumeAnimation:u},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,distanceThreshold:o,contextWindow:Cl(this.visualElement)})}stop(t,n){const o=t||this.latestPointerEvent,i=n||this.latestPanInfo,s=this.isDragging;if(this.cancel(),!s||!i||!o)return;const{velocity:r}=i;this.startAnimation(r);const{onDragEnd:a}=this.getProps();a&&te.postRender(()=>a(o,i))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:o}=this.getProps();!o&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,o){const{drag:i}=this.getProps();if(!o||!dn(t,i,this.currentDirection))return;const s=this.getAxisMotionValue(t);let r=this.originPoint[t]+o[t];this.constraints&&this.constraints[t]&&(r=Vh(r,this.constraints[t],this.elastic[t])),s.set(r)}resolveConstraints(){const{dragConstraints:t,dragElastic:n}=this.getProps(),o=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,i=this.constraints;t&&ht(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&o?this.constraints=Ah(o.layoutBox,t):this.constraints=!1,this.elastic=Lh(n),i!==this.constraints&&o&&this.constraints&&!this.hasMutatedConstraints&&be(s=>{this.constraints!==!1&&this.getAxisMotionValue(s)&&(this.constraints[s]=Fh(o.layoutBox[s],this.constraints[s]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!ht(t))return!1;const o=t.current;Ne(o!==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:i}=this.visualElement;if(!i||!i.layout)return!1;const s=Of(o,i.root,this.visualElement.getTransformPagePoint());let r=Dh(i.layout.layoutBox,s);if(n){const a=n(If(r));this.hasMutatedConstraints=!!a,a&&(r=rl(a))}return r}startAnimation(t){const{drag:n,dragMomentum:o,dragElastic:i,dragTransition:s,dragSnapToOrigin:r,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},u=be(c=>{if(!dn(c,n,this.currentDirection))return;let f=l&&l[c]||{};r&&(f={min:0,max:0});const d=i?200:1e6,h=i?40:1e7,m={type:"inertia",velocity:o?t[c]:0,bounceStiffness:d,bounceDamping:h,timeConstant:750,restDelta:1,restSpeed:10,...s,...f};return this.startAxisValueAnimation(c,m)});return Promise.all(u).then(a)}startAxisValueAnimation(t,n){const o=this.getAxisMotionValue(t);return Xo(this.visualElement,t),o.start(Wi(t,o,0,n,this.visualElement,!1))}stopAnimation(){be(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){be(t=>this.getAxisMotionValue(t).animation?.pause())}getAnimationState(t){return this.getAxisMotionValue(t).animation?.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,o=this.visualElement.getProps(),i=o[n];return i||this.visualElement.getValue(t,(o.initial?o.initial[t]:void 0)||0)}snapToCursor(t){be(n=>{const{drag:o}=this.getProps();if(!dn(n,o,this.currentDirection))return;const{projection:i}=this.visualElement,s=this.getAxisMotionValue(n);if(i&&i.layout){const{min:r,max:a}=i.layout.layoutBox[n];s.set(t[n]-oe(r,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:o}=this.visualElement;if(!ht(n)||!o||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};be(r=>{const a=this.getAxisMotionValue(r);if(a&&this.constraints!==!1){const l=a.get();i[r]=kh({min:l,max:l},this.constraints[r])}});const{transformTemplate:s}=this.visualElement.getProps();this.visualElement.current.style.transform=s?s({},""):"none",o.root&&o.root.updateScroll(),o.updateLayout(),this.resolveConstraints(),be(r=>{if(!dn(r,t,null))return;const a=this.getAxisMotionValue(r),{min:l,max:u}=this.constraints[r];a.set(oe(l,u,i[r]))})}addListeners(){if(!this.visualElement.current)return;Ih.set(this.visualElement,this);const t=this.visualElement.current,n=Ot(t,"pointerdown",l=>{const{drag:u,dragListener:c=!0}=this.getProps();u&&c&&this.start(l)}),o=()=>{const{dragConstraints:l}=this.getProps();ht(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,s=i.addEventListener("measure",o);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),te.read(o);const r=Yt(window,"resize",()=>this.scalePositionWithinConstraints()),a=i.addEventListener("didUpdate",(({delta:l,hasLayoutChanged:u})=>{this.isDragging&&u&&(be(c=>{const f=this.getAxisMotionValue(c);f&&(this.originPoint[c]+=l[c].translate,f.set(f.get()+l[c].translate))}),this.visualElement.render())}));return()=>{r(),n(),s(),a&&a()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:o=!1,dragPropagation:i=!1,dragConstraints:s=!1,dragElastic:r=Zo,dragMomentum:a=!0}=t;return{...t,drag:n,dragDirectionLock:o,dragPropagation:i,dragConstraints:s,dragElastic:r,dragMomentum:a}}}function dn(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function jh(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class Oh extends Qe{constructor(t){super(t),this.removeGroupControls=Ee,this.removeListeners=Ee,this.controls=new $h(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Ee}unmount(){this.removeGroupControls(),this.removeListeners()}}const Ys=e=>(t,n)=>{e&&te.postRender(()=>e(t,n))};class zh extends Qe{constructor(){super(...arguments),this.removePointerDownListener=Ee}onPointerDown(t){this.session=new Sl(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Cl(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:o,onPanEnd:i}=this.node.getProps();return{onSessionStart:Ys(t),onStart:Ys(n),onMove:o,onEnd:(s,r)=>{delete this.session,i&&te.postRender(()=>i(s,r))}}}mount(){this.removePointerDownListener=Ot(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const Sn={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function Zs(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const kt={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(G.test(e))e=parseFloat(e);else return e;const n=Zs(e,t.target.x),o=Zs(e,t.target.y);return`${n}% ${o}%`}},Bh={correct:(e,{treeScale:t,projectionDelta:n})=>{const o=e,i=Ye.parse(e);if(i.length>5)return o;const s=Ye.createTransformer(e),r=typeof i[0]!="number"?1:0,a=n.x.scale*t.x,l=n.y.scale*t.y;i[0+r]/=a,i[1+r]/=l;const u=oe(a,l,.5);return typeof i[2+r]=="number"&&(i[2+r]/=u),typeof i[3+r]=="number"&&(i[3+r]/=u),s(i)}};let fo=!1;class Nh extends C.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:o,layoutId:i}=this.props,{projection:s}=t;cf(Hh),s&&(n.group&&n.group.add(s),o&&o.register&&i&&o.register(s),fo&&s.root.didUpdate(),s.addEventListener("animationComplete",()=>{this.safeToRemove()}),s.setOptions({...s.options,onExitComplete:()=>this.safeToRemove()})),Sn.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:o,drag:i,isPresent:s}=this.props,{projection:r}=o;return r&&(r.isPresent=s,fo=!0,i||t.layoutDependency!==n||n===void 0||t.isPresent!==s?r.willUpdate():this.safeToRemove(),t.isPresent!==s&&(s?r.promote():r.relegate()||te.postRender(()=>{const a=r.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),ki.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:o}=this.props,{projection:i}=t;fo=!0,i&&(i.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(i),o&&o.deregister&&o.deregister(i))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function bl(e){const[t,n]=Ua(),o=C.useContext(di);return w.jsx(Nh,{...e,layoutGroup:o,switchLayoutGroup:C.useContext(il),isPresent:t,safeToRemove:n})}const Hh={borderRadius:{...kt,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:kt,borderTopRightRadius:kt,borderBottomLeftRadius:kt,borderBottomRightRadius:kt,boxShadow:Bh};function Wh(e,t,n){const o=fe(e)?e:xt(e);return o.start(Wi("",o,t,n)),o.animation}const Gh=(e,t)=>e.depth-t.depth;class Uh{constructor(){this.children=[],this.isDirty=!1}add(t){gi(this.children,t),this.isDirty=!0}remove(t){mi(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(Gh),this.isDirty=!1,this.children.forEach(t)}}function Kh(e,t){const n=pe.now(),o=({timestamp:i})=>{const s=i-n;s>=t&&(Xe(o),e(s-t))};return te.setup(o,!0),()=>Xe(o)}const Rl=["TopLeft","TopRight","BottomLeft","BottomRight"],qh=Rl.length,Js=e=>typeof e=="string"?parseFloat(e):e,Qs=e=>typeof e=="number"||G.test(e);function Xh(e,t,n,o,i,s){i?(e.opacity=oe(0,n.opacity??1,Yh(o)),e.opacityExit=oe(t.opacity??1,0,Zh(o))):s&&(e.opacity=oe(t.opacity??1,n.opacity??1,o));for(let r=0;r<qh;r++){const a=`border${Rl[r]}Radius`;let l=er(t,a),u=er(n,a);if(l===void 0&&u===void 0)continue;l||(l=0),u||(u=0),l===0||u===0||Qs(l)===Qs(u)?(e[a]=Math.max(oe(Js(l),Js(u),o),0),(Fe.test(u)||Fe.test(l))&&(e[a]+="%")):e[a]=u}(t.rotate||n.rotate)&&(e.rotate=oe(t.rotate||0,n.rotate||0,o))}function er(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const Yh=El(0,.5,fa),Zh=El(.5,.95,Ee);function El(e,t,n){return o=>o<e?0:o>t?1:n(Gt(e,t,o))}function tr(e,t){e.min=t.min,e.max=t.max}function Se(e,t){tr(e.x,t.x),tr(e.y,t.y)}function nr(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function or(e,t,n,o,i){return e-=t,e=Vn(e,1/n,o),i!==void 0&&(e=Vn(e,1/i,o)),e}function Jh(e,t=0,n=1,o=.5,i,s=e,r=e){if(Fe.test(t)&&(t=parseFloat(t),t=oe(r.min,r.max,t/100)-r.min),typeof t!="number")return;let a=oe(s.min,s.max,o);e===s&&(a-=t),e.min=or(e.min,t,n,a,i),e.max=or(e.max,t,n,a,i)}function ir(e,t,[n,o,i],s,r){Jh(e,t[n],t[o],t[i],t.scale,s,r)}const Qh=["x","scaleX","originX"],eg=["y","scaleY","originY"];function sr(e,t,n,o){ir(e.x,t,Qh,n?n.x:void 0,o?o.x:void 0),ir(e.y,t,eg,n?n.y:void 0,o?o.y:void 0)}function rr(e){return e.translate===0&&e.scale===1}function Ml(e){return rr(e.x)&&rr(e.y)}function ar(e,t){return e.min===t.min&&e.max===t.max}function tg(e,t){return ar(e.x,t.x)&&ar(e.y,t.y)}function lr(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function Pl(e,t){return lr(e.x,t.x)&&lr(e.y,t.y)}function ur(e){return he(e.x)/he(e.y)}function cr(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class ng{constructor(){this.members=[]}add(t){gi(this.members,t),t.scheduleRender()}remove(t){if(mi(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(i=>t===i);if(n===0)return!1;let o;for(let i=n;i>=0;i--){const s=this.members[i];if(s.isPresent!==!1){o=s;break}}return o?(this.promote(o),!0):!1}promote(t,n){const o=this.lead;if(t!==o&&(this.prevLead=o,this.lead=t,t.show(),o)){o.instance&&o.scheduleRender(),t.scheduleRender(),t.resumeFrom=o,n&&(t.resumeFrom.preserveOpacity=!0),o.snapshot&&(t.snapshot=o.snapshot,t.snapshot.latestValues=o.animationValues||o.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:i}=t.options;i===!1&&o.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:o}=t;n.onExitComplete&&n.onExitComplete(),o&&o.options.onExitComplete&&o.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function og(e,t,n){let o="";const i=e.x.translate/t.x,s=e.y.translate/t.y,r=n?.z||0;if((i||s||r)&&(o=`translate3d(${i}px, ${s}px, ${r}px) `),(t.x!==1||t.y!==1)&&(o+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:u,rotate:c,rotateX:f,rotateY:d,skewX:h,skewY:m}=n;u&&(o=`perspective(${u}px) ${o}`),c&&(o+=`rotate(${c}deg) `),f&&(o+=`rotateX(${f}deg) `),d&&(o+=`rotateY(${d}deg) `),h&&(o+=`skewX(${h}deg) `),m&&(o+=`skewY(${m}deg) `)}const a=e.x.scale*t.x,l=e.y.scale*t.y;return(a!==1||l!==1)&&(o+=`scale(${a}, ${l})`),o||"none"}const ho=["","X","Y","Z"],ig=1e3;let sg=0;function go(e,t,n,o){const{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),o&&(o[e]=0))}function Tl(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=gl(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:i,layoutId:s}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",te,!(i||s))}const{parent:o}=e;o&&!o.hasCheckedOptimisedAppear&&Tl(o)}function Vl({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:o,resetTransform:i}){return class{constructor(r={},a=t?.()){this.id=sg++,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.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(lg),this.nodes.forEach(fg),this.nodes.forEach(hg),this.nodes.forEach(ug)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=r,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 Uh)}addEventListener(r,a){return this.eventHandlers.has(r)||this.eventHandlers.set(r,new vi),this.eventHandlers.get(r).add(a)}notifyListeners(r,...a){const l=this.eventHandlers.get(r);l&&l.notify(...a)}hasListeners(r){return this.eventHandlers.has(r)}mount(r){if(this.instance)return;this.isSVG=Ga(r)&&!Kd(r),this.instance=r;const{layoutId:a,layout:l,visualElement:u}=this.options;if(u&&!u.current&&u.mount(r),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(l||a)&&(this.isLayoutDirty=!0),e){let c,f=0;const d=()=>this.root.updateBlockedByResize=!1;te.read(()=>{f=window.innerWidth}),e(r,()=>{const h=window.innerWidth;h!==f&&(f=h,this.root.updateBlockedByResize=!0,c&&c(),c=Kh(d,250),Sn.hasAnimatedSinceResize&&(Sn.hasAnimatedSinceResize=!1,this.nodes.forEach(hr)))})}a&&this.root.registerSharedNode(a,this),this.options.animate!==!1&&u&&(a||l)&&this.addEventListener("didUpdate",({delta:c,hasLayoutChanged:f,hasRelativeLayoutChanged:d,layout:h})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const m=this.options.transition||u.getDefaultTransition()||yg,{onLayoutAnimationStart:g,onLayoutAnimationComplete:y}=u.getProps(),v=!this.targetLayout||!Pl(this.targetLayout,h),x=!f&&d;if(this.options.layoutRoot||this.resumeFrom||x||f&&(v||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const p={...Ai(m,"layout"),onPlay:g,onComplete:y};(u.shouldReduceMotion||this.options.layoutRoot)&&(p.delay=0,p.type=!1),this.startAnimation(p),this.setAnimationOrigin(c,x)}else f||hr(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=h})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const r=this.getStack();r&&r.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),Xe(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(gg),this.animationId++)}getTransformTemplate(){const{visualElement:r}=this.options;return r&&r.getProps().transformTemplate}willUpdate(r=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Tl(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let c=0;c<this.path.length;c++){const f=this.path[c];f.shouldResetTransform=!0,f.updateScroll("snapshot"),f.options.layoutRoot&&f.willUpdate(!1)}const{layoutId:a,layout:l}=this.options;if(a===void 0&&!l)return;const u=this.getTransformTemplate();this.prevTransformTemplateValue=u?u(this.latestValues,""):void 0,this.updateSnapshot(),r&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(dr);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(fr);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(dg),this.nodes.forEach(rg),this.nodes.forEach(ag)):this.nodes.forEach(fr),this.clearAllSnapshots();const a=pe.now();ce.delta=Be(0,1e3/60,a-ce.timestamp),ce.timestamp=a,ce.isProcessing=!0,to.update.process(ce),to.preRender.process(ce),to.render.process(ce),ce.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,ki.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(cg),this.sharedNodes.forEach(mg)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,te.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){te.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!he(this.snapshot.measuredBox.x)&&!he(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 r=this.layout;this.layout=this.measure(!1),this.layoutCorrected=re(),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,r?r.layoutBox:void 0)}updateScroll(r="measure"){let a=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===r&&(a=!1),a&&this.instance){const l=o(this.instance);this.scroll={animationId:this.root.animationId,phase:r,isRoot:l,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:l}}}resetTransform(){if(!i)return;const r=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!Ml(this.projectionDelta),l=this.getTransformTemplate(),u=l?l(this.latestValues,""):void 0,c=u!==this.prevTransformTemplateValue;r&&this.instance&&(a||nt(this.latestValues)||c)&&(i(this.instance,u),this.shouldResetTransform=!1,this.scheduleRender())}measure(r=!0){const a=this.measurePageBox();let l=this.removeElementScroll(a);return r&&(l=this.removeTransform(l)),wg(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:r}=this.options;if(!r)return re();const a=r.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(xg))){const{scroll:u}=this.root;u&&(gt(a.x,u.offset.x),gt(a.y,u.offset.y))}return a}removeElementScroll(r){const a=re();if(Se(a,r),this.scroll?.wasRoot)return a;for(let l=0;l<this.path.length;l++){const u=this.path[l],{scroll:c,options:f}=u;u!==this.root&&c&&f.layoutScroll&&(c.wasRoot&&Se(a,r),gt(a.x,c.offset.x),gt(a.y,c.offset.y))}return a}applyTransform(r,a=!1){const l=re();Se(l,r);for(let u=0;u<this.path.length;u++){const c=this.path[u];!a&&c.options.layoutScroll&&c.scroll&&c!==c.root&&mt(l,{x:-c.scroll.offset.x,y:-c.scroll.offset.y}),nt(c.latestValues)&&mt(l,c.latestValues)}return nt(this.latestValues)&&mt(l,this.latestValues),l}removeTransform(r){const a=re();Se(a,r);for(let l=0;l<this.path.length;l++){const u=this.path[l];if(!u.instance||!nt(u.latestValues))continue;Go(u.latestValues)&&u.updateSnapshot();const c=re(),f=u.measurePageBox();Se(c,f),sr(a,u.latestValues,u.snapshot?u.snapshot.layoutBox:void 0,c)}return nt(this.latestValues)&&sr(a,this.latestValues),a}setTargetDelta(r){this.targetDelta=r,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(r){this.options={...this.options,...r,crossfade:r.crossfade!==void 0?r.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!==ce.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(r=!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(!(r||l&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:c,layoutId:f}=this.options;if(!(!this.layout||!(c||f))){if(this.resolvedRelativeTargetAt=ce.timestamp,!this.targetDelta&&!this.relativeTarget){const d=this.getClosestProjectingParent();d&&d.layout&&this.animationProgress!==1?(this.relativeParent=d,this.forceRelativeParentToResolveTarget(),this.relativeTarget=re(),this.relativeTargetOrigin=re(),Bt(this.relativeTargetOrigin,this.layout.layoutBox,d.layout.layoutBox),Se(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=re(),this.targetWithTransforms=re()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),Eh(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):Se(this.target,this.layout.layoutBox),ll(this.target,this.targetDelta)):Se(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget)){this.attemptToResolveRelativeTarget=!1;const d=this.getClosestProjectingParent();d&&!!d.resumingFrom==!!this.resumingFrom&&!d.options.layoutScroll&&d.target&&this.animationProgress!==1?(this.relativeParent=d,this.forceRelativeParentToResolveTarget(),this.relativeTarget=re(),this.relativeTargetOrigin=re(),Bt(this.relativeTargetOrigin,this.target,d.target),Se(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(!(!this.parent||Go(this.parent.latestValues)||al(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){const r=this.getLead(),a=!!this.resumingFrom||this!==r;let l=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(l=!1),a&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(l=!1),this.resolvedRelativeTargetAt===ce.timestamp&&(l=!1),l)return;const{layout:u,layoutId:c}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(u||c))return;Se(this.layoutCorrected,this.layout.layoutBox);const f=this.treeScale.x,d=this.treeScale.y;jf(this.layoutCorrected,this.treeScale,this.path,a),r.layout&&!r.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(r.target=r.layout.layoutBox,r.targetWithTransforms=re());const{target:h}=r;if(!h){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(nr(this.prevProjectionDelta.x,this.projectionDelta.x),nr(this.prevProjectionDelta.y,this.projectionDelta.y)),zt(this.projectionDelta,this.layoutCorrected,h,this.latestValues),(this.treeScale.x!==f||this.treeScale.y!==d||!cr(this.projectionDelta.x,this.prevProjectionDelta.x)||!cr(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",h))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(r=!0){if(this.options.visualElement?.scheduleRender(),r){const a=this.getStack();a&&a.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=pt(),this.projectionDelta=pt(),this.projectionDeltaWithTransform=pt()}setAnimationOrigin(r,a=!1){const l=this.snapshot,u=l?l.latestValues:{},c={...this.latestValues},f=pt();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const d=re(),h=l?l.source:void 0,m=this.layout?this.layout.source:void 0,g=h!==m,y=this.getStack(),v=!y||y.members.length<=1,x=!!(g&&!v&&this.options.crossfade===!0&&!this.path.some(vg));this.animationProgress=0;let p;this.mixTargetDelta=S=>{const b=S/1e3;gr(f.x,r.x,b),gr(f.y,r.y,b),this.setTargetDelta(f),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Bt(d,this.layout.layoutBox,this.relativeParent.layout.layoutBox),pg(this.relativeTarget,this.relativeTargetOrigin,d,b),p&&tg(this.relativeTarget,p)&&(this.isProjectionDirty=!1),p||(p=re()),Se(p,this.relativeTarget)),g&&(this.animationValues=c,Xh(c,u,this.latestValues,b,x,v)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=b},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(r){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(Xe(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=te.update(()=>{Sn.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=xt(0)),this.currentAnimation=Wh(this.motionValue,[0,1e3],{...r,velocity:0,isSync:!0,onUpdate:a=>{this.mixTargetDelta(a),r.onUpdate&&r.onUpdate(a)},onStop:()=>{},onComplete:()=>{r.onComplete&&r.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 r=this.getStack();r&&r.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(ig),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const r=this.getLead();let{targetWithTransforms:a,target:l,layout:u,latestValues:c}=r;if(!(!a||!l||!u)){if(this!==r&&this.layout&&u&&Al(this.options.animationType,this.layout.layoutBox,u.layoutBox)){l=this.target||re();const f=he(this.layout.layoutBox.x);l.x.min=r.target.x.min,l.x.max=l.x.min+f;const d=he(this.layout.layoutBox.y);l.y.min=r.target.y.min,l.y.max=l.y.min+d}Se(a,l),mt(a,c),zt(this.projectionDeltaWithTransform,this.layoutCorrected,a,c)}}registerSharedNode(r,a){this.sharedNodes.has(r)||this.sharedNodes.set(r,new ng),this.sharedNodes.get(r).add(a);const u=a.options.initialPromotionConfig;a.promote({transition:u?u.transition:void 0,preserveFollowOpacity:u&&u.shouldPreserveFollowOpacity?u.shouldPreserveFollowOpacity(a):void 0})}isLead(){const r=this.getStack();return r?r.lead===this:!0}getLead(){const{layoutId:r}=this.options;return r?this.getStack()?.lead||this:this}getPrevLead(){const{layoutId:r}=this.options;return r?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:r}=this.options;if(r)return this.root.sharedNodes.get(r)}promote({needsReset:r,transition:a,preserveFollowOpacity:l}={}){const u=this.getStack();u&&u.promote(this,l),r&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const r=this.getStack();return r?r.relegate(this):!1}resetSkewAndRotation(){const{visualElement:r}=this.options;if(!r)return;let a=!1;const{latestValues:l}=r;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(a=!0),!a)return;const u={};l.z&&go("z",r,u,this.animationValues);for(let c=0;c<ho.length;c++)go(`rotate${ho[c]}`,r,u,this.animationValues),go(`skew${ho[c]}`,r,u,this.animationValues);r.render();for(const c in u)r.setStaticValue(c,u[c]),this.animationValues&&(this.animationValues[c]=u[c]);r.scheduleRender()}applyProjectionStyles(r,a){if(!this.instance||this.isSVG)return;if(!this.isVisible){r.visibility="hidden";return}const l=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,r.visibility="",r.opacity="",r.pointerEvents=Cn(a?.pointerEvents)||"",r.transform=l?l(this.latestValues,""):"none";return}const u=this.getLead();if(!this.projectionDelta||!this.layout||!u.target){this.options.layoutId&&(r.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,r.pointerEvents=Cn(a?.pointerEvents)||""),this.hasProjected&&!nt(this.latestValues)&&(r.transform=l?l({},""):"none",this.hasProjected=!1);return}r.visibility="";const c=u.animationValues||u.latestValues;this.applyTransformsToTarget();let f=og(this.projectionDeltaWithTransform,this.treeScale,c);l&&(f=l(c,f)),r.transform=f;const{x:d,y:h}=this.projectionDelta;r.transformOrigin=`${d.origin*100}% ${h.origin*100}% 0`,u.animationValues?r.opacity=u===this?c.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:c.opacityExit:r.opacity=u===this?c.opacity!==void 0?c.opacity:"":c.opacityExit!==void 0?c.opacityExit:0;for(const m in Xt){if(c[m]===void 0)continue;const{correct:g,applyTo:y,isCSSVariable:v}=Xt[m],x=f==="none"?c[m]:g(c[m],u);if(y){const p=y.length;for(let S=0;S<p;S++)r[y[S]]=x}else v?this.options.visualElement.renderState.vars[m]=x:r[m]=x}this.options.layoutId&&(r.pointerEvents=u===this?Cn(a?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(r=>r.currentAnimation?.stop()),this.root.nodes.forEach(dr),this.root.sharedNodes.clear()}}}function rg(e){e.updateLayout()}function ag(e){const t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:n,measuredBox:o}=e.layout,{animationType:i}=e.options,s=t.source!==e.layout.source;i==="size"?be(c=>{const f=s?t.measuredBox[c]:t.layoutBox[c],d=he(f);f.min=n[c].min,f.max=f.min+d}):Al(i,t.layoutBox,n)&&be(c=>{const f=s?t.measuredBox[c]:t.layoutBox[c],d=he(n[c]);f.max=f.min+d,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[c].max=e.relativeTarget[c].min+d)});const r=pt();zt(r,n,t.layoutBox);const a=pt();s?zt(a,e.applyTransform(o,!0),t.measuredBox):zt(a,n,t.layoutBox);const l=!Ml(r);let u=!1;if(!e.resumeFrom){const c=e.getClosestProjectingParent();if(c&&!c.resumeFrom){const{snapshot:f,layout:d}=c;if(f&&d){const h=re();Bt(h,t.layoutBox,f.layoutBox);const m=re();Bt(m,n,d.layoutBox),Pl(h,m)||(u=!0),c.options.layoutRoot&&(e.relativeTarget=m,e.relativeTargetOrigin=h,e.relativeParent=c)}}}e.notifyListeners("didUpdate",{layout:n,snapshot:t,delta:a,layoutDelta:r,hasLayoutChanged:l,hasRelativeLayoutChanged:u})}else if(e.isLead()){const{onExitComplete:n}=e.options;n&&n()}e.options.transition=void 0}function lg(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 ug(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function cg(e){e.clearSnapshot()}function dr(e){e.clearMeasurements()}function fr(e){e.isLayoutDirty=!1}function dg(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function hr(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function fg(e){e.resolveTargetDelta()}function hg(e){e.calcProjection()}function gg(e){e.resetSkewAndRotation()}function mg(e){e.removeLeadSnapshot()}function gr(e,t,n){e.translate=oe(t.translate,0,n),e.scale=oe(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function mr(e,t,n,o){e.min=oe(t.min,n.min,o),e.max=oe(t.max,n.max,o)}function pg(e,t,n,o){mr(e.x,t.x,n.x,o),mr(e.y,t.y,n.y,o)}function vg(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const yg={duration:.45,ease:[.4,0,.1,1]},pr=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),vr=pr("applewebkit/")&&!pr("chrome/")?Math.round:Ee;function yr(e){e.min=vr(e.min),e.max=vr(e.max)}function wg(e){yr(e.x),yr(e.y)}function Al(e,t,n){return e==="position"||e==="preserve-aspect"&&!Rh(ur(t),ur(n),.2)}function xg(e){return e!==e.root&&e.scroll?.wasRoot}const Cg=Vl({attachResizeListener:(e,t)=>Yt(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),mo={current:void 0},Dl=Vl({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!mo.current){const e=new Cg({});e.mount(window),e.setOptions({layoutScroll:!0}),mo.current=e}return mo.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),Sg={pan:{Feature:zh},drag:{Feature:Oh,ProjectionNode:Dl,MeasureLayout:bl}};function wr(e,t,n){const{props:o}=e;e.animationState&&o.whileHover&&e.animationState.setActive("whileHover",n==="Start");const i="onHover"+n,s=o[i];s&&te.postRender(()=>s(t,nn(t)))}class _g extends Qe{mount(){const{current:t}=this.node;t&&(this.unmount=Nd(t,(n,o)=>(wr(this.node,o,"Start"),i=>wr(this.node,i,"End"))))}unmount(){}}class bg extends Qe{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=Qt(Yt(this.node.current,"focus",()=>this.onFocus()),Yt(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function xr(e,t,n){const{props:o}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&o.whileTap&&e.animationState.setActive("whileTap",n==="Start");const i="onTap"+(n==="End"?"":n),s=o[i];s&&te.postRender(()=>s(t,nn(t)))}class Rg extends Qe{mount(){const{current:t}=this.node;t&&(this.unmount=Ud(t,(n,o)=>(xr(this.node,o,"Start"),(i,{success:s})=>xr(this.node,i,s?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const Jo=new WeakMap,po=new WeakMap,Eg=e=>{const t=Jo.get(e.target);t&&t(e)},Mg=e=>{e.forEach(Eg)};function Pg({root:e,...t}){const n=e||document;po.has(n)||po.set(n,{});const o=po.get(n),i=JSON.stringify(t);return o[i]||(o[i]=new IntersectionObserver(Mg,{root:e,...t})),o[i]}function Tg(e,t,n){const o=Pg(t);return Jo.set(e,n),o.observe(e),()=>{Jo.delete(e),o.unobserve(e)}}const Vg={some:0,all:1};class Ag extends Qe{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:o,amount:i="some",once:s}=t,r={root:n?n.current:void 0,rootMargin:o,threshold:typeof i=="number"?i:Vg[i]},a=l=>{const{isIntersecting:u}=l;if(this.isInView===u||(this.isInView=u,s&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",u);const{onViewportEnter:c,onViewportLeave:f}=this.node.getProps(),d=u?c:f;d&&d(l)};return Tg(this.node.current,r,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(Dg(t,n))&&this.startObserver()}unmount(){}}function Dg({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const kg={inView:{Feature:Ag},tap:{Feature:Rg},focus:{Feature:bg},hover:{Feature:_g}},Fg={layout:{ProjectionNode:Dl,MeasureLayout:bl}},Lg={...wh,...kg,...Sg,...Fg},zn=Lf(Lg,qf),Ig="_primary_13825_8",$g="_secondary_13825_12",jg="_tertiary_13825_16",Og="_positive_13825_20",zg="_negative_13825_24",Bg="_warning_13825_28",Ng="_accent_13825_32",Hg="_inverse_13825_36",Wg="_text_13825_111",Gg="_regular_13825_117",Ug="_medium_13825_121",Kg="_semibold_13825_125",qg="_bold_13825_129",fn={primary:Ig,secondary:$g,tertiary:jg,positive:Og,negative:zg,warning:Bg,accent:Ng,inverse:Hg,"title-1":"_title-1_13825_41","title-2":"_title-2_13825_51","title-3":"_title-3_13825_61","headline-1":"_headline-1_13825_76","headline-2":"_headline-2_13825_81","headline-3":"_headline-3_13825_86","body-1":"_body-1_13825_91","body-2":"_body-2_13825_96","caption-1":"_caption-1_13825_101","caption-2":"_caption-2_13825_106",text:Wg,regular:Gg,medium:Ug,semibold:Kg,bold:qg},Xg=e=>{let t;e.center?t="center":e.left?t="left":e.right&&(t="right");let n;return e.uppercase?n="uppercase":e.lowercase?n="lowercase":e.capitalize&&(n="capitalize"),F.css({marginTop:e.mt,marginBottom:e.mb,marginRight:e.mr,marginLeft:e.ml,flex:e.flex,cursor:e.cursor,wordBreak:e.wordBreak,whiteSpace:e.whiteSpace,textOverflow:e.textOverflow,textDecoration:e.decoration,textAlign:t,textTransform:n,color:e.color,opacity:e.disabled?.5:void 0,overflow:e.overflow})},K=C.forwardRef(({children:e,className:t,variant:n="body-1",fontWeight:o="medium",tag:i="p",colorName:s="primary",style:r,clickOpacity:a=.5,opacityDuration:l=200,onClick:u,disabled:c,mt:f,mb:d,ml:h,mr:m,flex:g,cursor:y,wordBreak:v,whiteSpace:x,textOverflow:p,decoration:S,color:b,center:P,left:V,right:M,uppercase:D,lowercase:k,capitalize:j,overflow:N,...O},A)=>{const[B,z]=C.useState(!1),E=!!u,R=()=>E&&z(!0),T=()=>E&&z(!1),L=Xg({mt:f,mb:d,ml:h,mr:m,flex:g,cursor:y,wordBreak:v,whiteSpace:x,textOverflow:p,decoration:S,color:b,center:P,left:V,right:M,uppercase:D,lowercase:k,capitalize:j,overflow:N}),Y=i,U=E?F.css({opacity:B?a:1,transition:`opacity ${l}ms ease`}):"";return w.jsx(Y,{ref:A,...O,className:F.cx(fn.text,fn[n],fn[s],fn[o],U,t,L),style:r,onClick:u,onMouseDown:R,onMouseUp:T,onMouseLeave:T,onTouchStart:R,onTouchEnd:T,role:E?"button":void 0,tabIndex:E?0:void 0,children:e})});K.displayName="Text";const kl=zn(K),Yg=F.css({display:"flex",alignItems:"center",justifyContent:"center",position:"relative",borderRadius:16,height:48,padding:"0 16px",cursor:"pointer",fontSize:16,fontWeight:600,overflow:"hidden",transition:"all 0.2s ease",gap:8}),Ft={zero:"var(--corner-zero)",xs:"var(--corner-xs)",sm:"var(--corner-sm)",md:"var(--corner-md)",lg:"var(--corner-lg)",xl:"var(--corner-xl)","2xl":"var(--corner-2xl)","3xl":"var(--corner-3xl)","4xl":"var(--corner-4xl)","5xl":"var(--corner-5xl)","6xl":"var(--corner-6xl)","full-round":"var(--corner-full-round)"},Zg={xs:"var(--height-button-xs)",sm:"var(--height-button-sm)",md:"var(--height-button-md)",lg:"var(--height-button-lg)"},Jg={clear:F.css({backgroundColor:"transparent",border:"none"}),filled:F.css({backgroundColor:"var(--fill-accent-primary)",color:"white",border:"none"}),outline:F.css({backgroundColor:"transparent",border:"1px solid var(--border-accent-primary)"})},Qg=(e,t,n,o)=>{if(o)return F.css({cursor:"not-allowed",opacity:.7});const i={transition:"all 0.2s ease",borderRadius:"var(--corner-lg)",border:"none",color:e==="filled"?"var(--text-inverse)":`var(--text-${t})`};switch(e){case"filled":return F.css({...i,backgroundColor:`var(--fill-${t}-${n})`,":hover":{backgroundColor:`var(--fill-${t}-${n}-hover)`},":active":{backgroundColor:`var(--fill-${t}-${n}-hover)`}});case"outline":return F.css({...i,backgroundColor:"transparent",border:`1px solid var(--border-${t}-${n})`,":hover":{backgroundColor:`var(--fill-${t}-secondary-hover)`},":active":{backgroundColor:`var(--fill-${t}-secondary-hover)`}});case"clear":return F.css({...i,backgroundColor:"transparent",":hover":{backgroundColor:`var(--fill-${t}-secondary-hover)`},":active":{backgroundColor:`var(--fill-${t}-secondary-hover)`}});default:return F.css(i)}},Qo=({disabled:e,loading:t,wrapperClassName:n,buttonClassName:o,buttonDisabledClassName:i,textClassName:s,children:r,variant:a="filled",backgroundColor:l,textColor:u,textFontWeight:c,borderColor:f,color:d="accent",opacity:h,borderRadius:m,width:g="full",size:y="md",iconLeft:v,iconRight:x,intensity:p="primary",flex:S,type:b="button",...P})=>{const V=C.useMemo(()=>{switch(g){case"full":return"100%";case"auto":return"auto";default:return g}},[g]),M=C.useMemo(()=>l||(a==="filled"?d==="neutral"?"var(--fill-neutral-secondary)":`var(--fill-${d}-${p})`:"transparent"),[a,l,d,p]),D=C.useMemo(()=>{if(p==="primary"){if(d==="neutral")return"var(--text-secondary)";if(a==="filled")return"var(--text-inverse)"}else if(d==="neutral")return"var(--text-secondary)";return`var(--text-${d})`},[p,d,a]),k=C.useMemo(()=>{if(p==="primary"){if(d==="neutral")return"secondary";if(a==="filled")return"inverse"}else if(d==="neutral")return"secondary";return d},[a,d,p]),j=C.useMemo(()=>f||(a==="outline"?`var(--border-${d}-${p})`:"transparent"),[a,f,d,p]),N=C.useMemo(()=>{switch(y){case"lg":return Ft.lg;case"md":case"sm":return Ft.md;case"xs":return Ft.sm;default:return Ft.md}},[y]),O=F.cx(Yg,Qg(a,d,p,e),Jg[a],e?i:void 0,F.css({borderRadius:m?Ft[m]:N,backgroundColor:M,borderColor:j,color:u,width:"100%",height:Zg[y],opacity:h||(e?.7:1)}),o),A=C.useMemo(()=>{switch(y){case"lg":case"md":return"body-1";case"sm":case"xs":return"body-2";default:return"body-1"}},[y]);return w.jsx(I,{className:F.cx(n),w:V,flex:S,relative:!0,overflow:"hidden",children:w.jsxs(zn.button,{...P,whileTap:!e&&!t?{scale:.99,boxShadow:"inset 0 0 0 10000px rgba(0,0,0,0.1)",transition:{duration:0}}:{},disabled:e||t,className:O,children:[t?w.jsx(Yr,{color:D}):w.jsxs(w.Fragment,{children:[v,w.jsx(kl,{style:{color:u},colorName:k,variant:A,className:s,textOverflow:"ellipsis",overflow:"hidden",children:r}),x]}),w.jsx(bt,{})]})})},em=e=>_.createElement("svg",{width:16,height:16,viewBox:"0 0 24 24",fill:"none",...e},_.createElement("path",{d:"M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41L9 16.17z",fill:"currentColor"})),tm=e=>_.createElement("svg",{viewBox:"0 0 24 24",fill:"none",...e},_.createElement("path",{d:"M19 13H5v-2h14v2z",fill:"currentColor"})),nm="_checkbox_22ifd_8",om="_disabled_22ifd_14",im="_checkbox__ripple_22ifd_14",sm="_checkbox__input_22ifd_26",rm="_checkbox__box_22ifd_33",am="_secondary_22ifd_46",lm="_checked_22ifd_52",um="_error_22ifd_61",$e={checkbox:nm,disabled:om,checkbox__ripple:im,checkbox__input:sm,checkbox__box:rm,secondary:am,checked:lm,error:um},cm={sm:20,md:24},Gi=C.forwardRef(({checked:e,onChange:t,disabled:n,error:o,indeterminate:i,size:s="md",title:r,titleColor:a,subtitle:l,subtitleColor:u="secondary",name:c,required:f,variant:d="primary",flex:h,readOnly:m},g)=>{const[y,v]=C.useState(!1),x=e!==void 0,p=x?e:y,S=D=>{x||v(D.target.checked),t?.(D)},b=cm[s],P=p||i,V=!!m&&!n,M=n?"not-allowed":V?"auto":"pointer";return w.jsxs("label",{className:F.cx($e.checkbox,F.css({flex:h,cursor:M}),{[$e.disabled]:n}),children:[w.jsxs(I,{relative:!0,display:"inline-flex",style:{"--checkbox-size":`${b}px`,"--checkbox-size-double":`${b*2}px`},children:[w.jsx("input",{ref:g,type:"checkbox",checked:p,onChange:V?void 0:S,onClick:D=>D.stopPropagation(),disabled:n,readOnly:V,name:c,required:f,className:F.cx($e.checkbox__input,{[$e.disabled]:n},F.css({cursor:M}))}),w.jsx("div",{className:F.cx($e.checkbox__box,$e[d],{[$e.disabled]:n,[$e.error]:o,[$e.checked]:P}),children:P&&(i?w.jsx(tm,{width:b*.75,height:b*.75}):w.jsx(em,{width:b*.75,height:b*.75}))})]}),(r||l)&&w.jsxs(I,{gap:4,children:[r&&w.jsx(K,{colorName:a,variant:s==="sm"?"body-2":"body-1",children:r}),l&&w.jsx(K,{variant:"body-2",colorName:u,children:l})]})]})});Gi.displayName="Checkbox";const dm=e=>_.createElement("svg",{width:20,height:20,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},_.createElement("g",{opacity:.5},_.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.0002 17.9999C14.4185 17.9999 18.0002 14.4182 18.0002 9.99991C18.0002 5.58163 14.4185 1.99991 10.0002 1.99991C5.58197 1.99991 2.00024 5.58163 2.00024 9.99991C2.00024 14.4182 5.58197 17.9999 10.0002 17.9999ZM6.46514 6.46446C6.85566 6.07393 7.48883 6.07393 7.87935 6.46446L9.64712 8.23222C9.84238 8.42749 10.159 8.42749 10.3542 8.23222L12.122 6.46446C12.5125 6.07393 13.1457 6.07393 13.5362 6.46446C13.9267 6.85498 13.9267 7.48814 13.5362 7.87867L11.7684 9.64644C11.5732 9.8417 11.5732 10.1583 11.7684 10.3535L13.5362 12.1213C13.9267 12.5118 13.9267 13.145 13.5362 13.5355C13.1457 13.926 12.5125 13.926 12.122 13.5355L10.3542 11.7678C10.159 11.5725 9.84238 11.5725 9.64712 11.7678L7.87935 13.5355C7.48883 13.926 6.85566 13.926 6.46514 13.5355C6.07462 13.145 6.07462 12.5118 6.46514 12.1213L8.23291 10.3535C8.42817 10.1583 8.42817 9.8417 8.23291 9.64644L6.46514 7.87867C6.07462 7.48815 6.07462 6.85498 6.46514 6.46446Z",fill:"currentColor"}))),fm="_disabled_19ujt_20",hm="_multiline_19ujt_24",gm="_input_19ujt_8",mm="_sm_19ujt_74",pm="_md_19ujt_79",vm="_error_19ujt_84",ym="_white_19ujt_88",wm="_gray_19ujt_92",me={"input-container":"_input-container_19ujt_8",disabled:fm,multiline:hm,input:gm,"input-text-size_sm":"_input-text-size_sm_19ujt_55","input-text-size_md":"_input-text-size_md_19ujt_59","input-text-align_left":"_input-text-align_left_19ujt_64","input-text-align_center":"_input-text-align_center_19ujt_67","input-text-align_right":"_input-text-align_right_19ujt_70",sm:mm,md:pm,error:vm,white:ym,gray:wm,"clear-button":"_clear-button_19ujt_96"};function Cr(e){return{...new Event("input",{bubbles:!0}),target:e,currentTarget:e}}const Fl=C.forwardRef((e,t)=>{const{label:n,prompt:o,error:i,errorText:s,size:r="md",prefix:a,suffix:l,background:u="white",showClearButton:c,disabled:f,value:d,defaultValue:h,inputClassName:m,textAlign:g="left",...y}=e,v=e.multiline===!0,x=C.useRef(null),p=C.useRef(null),[S,b]=Jt(typeof d=="string"||typeof d=="number"?String(d):void 0,h==="string"||h==="number"?String(h):"");C.useImperativeHandle(t,()=>({focus:()=>{x.current?.focus(),p.current?.focus()},blur:()=>{x.current?.blur(),p.current?.blur()},get value(){return x.current?.value||p.current?.value}}));const P=D=>{if(b(D.target.value),v){const k=e.onChange;k?.(D)}else{const k=e.onChange;k?.(D)}};C.useEffect(()=>{v&&e.autoResize&&p.current&&(p.current.style.height="auto",p.current.style.height=`${p.current.scrollHeight}px`)},[S,v,e.autoResize]);const V=()=>{if(b(""),!v){const k=x.current;if(k){k.value="";const j=Cr(k),N=e.onChange;N?.(j)}return}const D=p.current;if(D){D.value="";const k=Cr(D),j=e.onChange;j?.(k)}},M=()=>{if(v){const{rows:N,autoResize:O,onChange:A,multiline:B,...z}=y;return w.jsx("textarea",{ref:p,rows:e.rows??3,className:F.cx(me.input,m,{[me.disabled]:f,[me[`input-text-align_${g}`]]:!!g}),disabled:f,maxLength:e.maxLength,...z,value:S,onChange:P})}const{onChange:D,multiline:k,...j}=y;return w.jsx("input",{...j,ref:x,className:F.cx(me.input,me[`input-text-size_${r}`],m,{[me.disabled]:f,[me[`input-text-align_${g}`]]:!!g}),disabled:f,type:e.type??"text",value:S,onChange:P})};return w.jsxs(I,{w:"full",gap:"var(--spacing-sm)",children:[n&&w.jsx(K,{variant:"body-2",fontWeight:"regular",colorName:"tertiary",children:n}),w.jsxs(I,{row:!0,alignItems:v?"flex-start":"center",w:"full",gap:"var(--spacing-md)",className:F.cx(me["input-container"],me[u],me[r],{[me.error]:i,[me.disabled]:f,[me.multiline]:v}),children:[a&&w.jsx(I,{flex:"none",children:a}),w.jsx(I,{flex:"1",children:M()}),c&&S&&!f&&w.jsx(I,{flex:"none",children:w.jsx("span",{className:me["clear-button"],onClick:V,children:w.jsx(dm,{})})}),l&&w.jsx(I,{flex:"none",children:l})]}),(o||v)&&w.jsxs(I,{row:!0,gap:10,w:"full",children:[typeof o=="string"?w.jsx(K,{variant:"caption-1",colorName:"tertiary",children:o}):o,v&&e.maxLength&&w.jsx(K,{right:!0,ml:"auto",flex:"none",variant:"caption-1",colorName:"tertiary",children:`${S.length}/${e.maxLength}`})]}),s&&i&&w.jsx(K,{variant:"body-2",colorName:"negative",fontWeight:"regular",children:s})]})});Fl.displayName="Input";const xm="_input_5xq63_8",Cm="_disabled_5xq63_29",Sm="_error_5xq63_37",_m="_success_5xq63_41",bm="_white_5xq63_50",Rm="_gray_5xq63_54",Em="_glow_5xq63_58",ut={input:xm,disabled:Cm,error:Sm,success:_m,white:bm,gray:Rm,glow:Em};function Mm(e){const t=C.useRef(void 0);return C.useEffect(()=>{t.current=e},[e]),t.current}const Ll=C.forwardRef(({length:e=6,label:t,prompt:n,error:o,errorText:i,success:s,disabled:r,autoFocus:a,center:l,secure:u,loading:c,background:f="gray",numeric:d=!0,className:h,value:m,defaultValue:g,onChange:y,onComplete:v},x)=>{const p=typeof m=="string",S=p?m:g,b=typeof S=="string"?S.slice(0,e):"",[P,V]=Jt(p?m:void 0,b),[M,D]=C.useState(()=>{const E=b.slice(0,e);return Array.from({length:e},(R,T)=>E[T]??"")}),k=C.useRef(void 0),j=Mm(m),N=C.useRef([]);C.useEffect(()=>{if(!p)return;const E=m??"";if(E===j)return;if(E===k.current){k.current=void 0;return}const R=E.slice(0,e);D(Array.from({length:e},(T,L)=>R[L]??""))},[p,m,e,j]);const O=C.useCallback((E,R)=>{const T=E.slice(0,e);R?.fromInternal&&(k.current=T),V(T),y?.(T),T.length===e&&v?.(T)},[e,y,v,V]);C.useImperativeHandle(x,()=>({focus:()=>{N.current[0]?.focus()},blur:()=>{N.current.forEach(E=>E?.blur())},get value(){return P||""},setValue:E=>{const R=E.slice(0,e);D(Array.from({length:e},(T,L)=>R[L]??"")),O(R,{fromInternal:!0})},clear:()=>{D(Array.from({length:e},()=>"")),O("",{fromInternal:!0})}}),[e,O,P]);const A=C.useCallback((E,R)=>{if(r)return;let T=R;if(d&&(T=T.replace(/\D/g,"")),T.length>1){const q=M.slice(0,E).join("")+T+M.slice(E+1).join(""),ge=Array.from({length:e},($,Z)=>q[Z]??"");D(ge),O(q,{fromInternal:!0});const J=Math.min(E+T.length,e-1),ie=N.current[J];ie?.focus(),ie?.select();return}const L=M[E],Y=[...M];Y[E]=T,D(Y);const U=Y.join("");if(O(U,{fromInternal:!0}),!L&&T&&E<e-1){const q=N.current[E+1];q?.focus(),q?.select()}},[M,r,e,d,O]),B=C.useCallback((E,R)=>{if(!r){if(R.key==="Backspace"){R.preventDefault();const T=N.current[E];if(M[E]){const L=[...M];L[E]="",D(L),O(L.join(""),{fromInternal:!0}),T?.focus();return}if(E>0){const L=N.current[E-1];L?.focus(),L?.select()}return}R.key==="ArrowLeft"&&E>0&&(R.preventDefault(),N.current[E-1]?.focus()),R.key==="ArrowRight"&&E<e-1&&(R.preventDefault(),N.current[E+1]?.focus())}},[M,r,e,O]),z=C.useCallback((E,R)=>{if(r)return;R.preventDefault();let T=R.clipboardData.getData("text");if(d&&(T=T.replace(/\D/g,"")),!T)return;const L=e-E,Y=Math.min(T.length,L),U=T.slice(0,Y),q=[...M];for(let $=0;$<Y;$++)q[E+$]=U[$]??"";D(q);const ge=q.join("");O(ge,{fromInternal:!0});const J=Math.min(E+Y-1,e-1),ie=N.current[J];ie?.focus(),ie?.select()},[M,r,e,d,O]);return w.jsxs(I,{w:"full",gap:"var(--spacing-sm)",className:h,center:l,children:[t&&w.jsx(K,{variant:"body-2",fontWeight:"regular",colorName:"tertiary",children:t}),w.jsx(I,{row:!0,w:"full",gap:"var(--spacing-sm)",center:l,className:F.cx({[ut.disabled]:r}),children:Array.from({length:e}).map((E,R)=>w.jsxs(I,{relative:!0,display:"inline-block",children:[w.jsx("input",{ref:T=>{N.current[R]=T},className:F.cx(ut.input,ut[f],o&&ut.error,s&&ut.success,M[R]&&F.css({caretColor:"transparent"})),inputMode:d?"numeric":"text",type:u?"password":"text",maxLength:1,autoFocus:a&&R===0,disabled:r||c,value:M[R],onChange:T=>A(R,T.target.value),onKeyDown:T=>B(R,T),onPaste:T=>z(R,T)}),w.jsx(zn.span,{className:ut.glow,variants:Pm,custom:R,initial:"idle",animate:c?"wave":"idle"})]},R))}),n&&w.jsx(K,{variant:"caption-1",colorName:"tertiary",children:n}),i&&o&&w.jsx(K,{variant:"body-2",colorName:"negative",fontWeight:"regular",children:i})]})}),Pm={idle:{opacity:0,scale:1,transition:{duration:.18}},wave:(e=0)=>({opacity:[0,.2,0],scale:[1,1.03,1],transition:{duration:1.5,delay:e*.15,repeat:1/0,ease:[.42,0,.58,1]}})};Ll.displayName="OtpInput";const Tm="_primary_svt6d_8",Vm="_secondary_svt6d_13",Am="_button_svt6d_18",Ge={primary:Tm,secondary:Vm,button:Am,"button-active":"_button-active_svt6d_32","icon-container":"_icon-container_svt6d_35","button-primary":"_button-primary_svt6d_47","button-secondary":"_button-secondary_svt6d_51","button-disabled":"_button-disabled_svt6d_55","full-width":"_full-width_svt6d_60"};function Dm({value:e,onChange:t,options:n,variant:o="primary",fullWidth:i=!1,className:s}){return w.jsx(I,{row:!0,alignItems:"center",borderRadius:"var(--corner-md)",p:"var(--spacing-xs)",gap:"var(--spacing-md)",className:F.cx(Ge[o],i&&Ge["full-width"],s),children:n.map(r=>{const a=r.value===e,l=r.disabled,u=r.separatorAfter??!1;return w.jsxs(C.Fragment,{children:[w.jsxs("button",{type:"button",disabled:l,className:F.cx(Ge.button,i&&Ge["full-width"],a&&Ge["button-active"],a&&Ge[`button-${o}`],l&&Ge["button-disabled"]),onClick:()=>!l&&t(r.value),children:[r.icon&&w.jsx(I,{alignItems:"center",justifyContent:"center",className:Ge["icon-container"],children:r.icon}),r.label&&w.jsx(K,{colorName:a?"primary":"tertiary",children:r.label}),!l&&w.jsx(bt,{color:"var(--fill-bg-overlay-primary)"})]}),u&&w.jsx(I,{w:1,h:24,backgroundColor:"var(--fill-bg-tertiary)"})]},r.value)})})}function Bn(){return typeof window<"u"}function Tt(e){return Il(e)?(e.nodeName||"").toLowerCase():"#document"}function we(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Ie(e){var t;return(t=(Il(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Il(e){return Bn()?e instanceof Node||e instanceof we(e).Node:!1}function ee(e){return Bn()?e instanceof Element||e instanceof we(e).Element:!1}function ve(e){return Bn()?e instanceof HTMLElement||e instanceof we(e).HTMLElement:!1}function ei(e){return!Bn()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof we(e).ShadowRoot}const km=new Set(["inline","contents"]);function on(e){const{overflow:t,overflowX:n,overflowY:o,display:i}=Me(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+n)&&!km.has(i)}const Fm=new Set(["table","td","th"]);function Lm(e){return Fm.has(Tt(e))}const Im=[":popover-open",":modal"];function Nn(e){return Im.some(t=>{try{return e.matches(t)}catch{return!1}})}const $m=["transform","translate","scale","rotate","perspective"],jm=["transform","translate","scale","rotate","perspective","filter"],Om=["paint","layout","strict","content"];function Ui(e){const t=Hn(),n=ee(e)?Me(e):e;return $m.some(o=>n[o]?n[o]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||jm.some(o=>(n.willChange||"").includes(o))||Om.some(o=>(n.contain||"").includes(o))}function zm(e){let t=We(e);for(;ve(t)&&!ze(t);){if(Ui(t))return t;if(Nn(t))return null;t=We(t)}return null}function Hn(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const Bm=new Set(["html","body","#document"]);function ze(e){return Bm.has(Tt(e))}function Me(e){return we(e).getComputedStyle(e)}function Wn(e){return ee(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function We(e){if(Tt(e)==="html")return e;const t=e.assignedSlot||e.parentNode||ei(e)&&e.host||Ie(e);return ei(t)?t.host:t}function $l(e){const t=We(e);return ze(t)?e.ownerDocument?e.ownerDocument.body:e.body:ve(t)&&on(t)?t:$l(t)}function qe(e,t,n){var o;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=$l(e),s=i===((o=e.ownerDocument)==null?void 0:o.body),r=we(i);if(s){const a=ti(r);return t.concat(r,r.visualViewport||[],on(i)?i:[],a&&n?qe(a):[])}return t.concat(i,qe(i,[],n))}function ti(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}const St=Math.min,ye=Math.max,An=Math.round,hn=Math.floor,Le=e=>({x:e,y:e}),Nm={left:"right",right:"left",bottom:"top",top:"bottom"},Hm={start:"end",end:"start"};function Sr(e,t,n){return ye(e,St(t,n))}function sn(e,t){return typeof e=="function"?e(t):e}function Ze(e){return e.split("-")[0]}function rn(e){return e.split("-")[1]}function jl(e){return e==="x"?"y":"x"}function Ol(e){return e==="y"?"height":"width"}const Wm=new Set(["top","bottom"]);function Oe(e){return Wm.has(Ze(e))?"y":"x"}function zl(e){return jl(Oe(e))}function Gm(e,t,n){n===void 0&&(n=!1);const o=rn(e),i=zl(e),s=Ol(i);let r=i==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(r=Dn(r)),[r,Dn(r)]}function Um(e){const t=Dn(e);return[ni(e),t,ni(t)]}function ni(e){return e.replace(/start|end/g,t=>Hm[t])}const _r=["left","right"],br=["right","left"],Km=["top","bottom"],qm=["bottom","top"];function Xm(e,t,n){switch(e){case"top":case"bottom":return n?t?br:_r:t?_r:br;case"left":case"right":return t?Km:qm;default:return[]}}function Ym(e,t,n,o){const i=rn(e);let s=Xm(Ze(e),n==="start",o);return i&&(s=s.map(r=>r+"-"+i),t&&(s=s.concat(s.map(ni)))),s}function Dn(e){return e.replace(/left|right|bottom|top/g,t=>Nm[t])}function Zm(e){return{top:0,right:0,bottom:0,left:0,...e}}function Jm(e){return typeof e!="number"?Zm(e):{top:e,right:e,bottom:e,left:e}}function kn(e){const{x:t,y:n,width:o,height:i}=e;return{width:o,height:i,top:n,left:t,right:t+o,bottom:n+i,x:t,y:n}}const Rr="data-floating-ui-focusable",Qm="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function oi(e,t){if(!e||!t)return!1;const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&ei(n)){let o=t;for(;o;){if(e===o)return!0;o=o.parentNode||o.host}}return!1}function Lt(e){return"composedPath"in e?e.composedPath()[0]:e.target}function vo(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 ep(e){return e.matches("html,body")}function vt(e){return e?.ownerDocument||document}function tp(e){return ve(e)&&e.matches(Qm)}function np(e){return e?e.hasAttribute(Rr)?e:e.querySelector("["+Rr+"]")||e:null}function _n(e,t,n){return n===void 0&&(n=!0),e.filter(i=>{var s;return i.parentId===t&&(!n||((s=i.context)==null?void 0:s.open))}).flatMap(i=>[i,..._n(e,i.id,n)])}function op(e){return"nativeEvent"in e}function Zt(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}var ip=typeof document<"u",sp=function(){},_t=ip?C.useLayoutEffect:sp;const rp={..._};function gn(e){const t=_.useRef(e);return _t(()=>{t.current=e}),t}const ap=rp.useInsertionEffect,lp=ap||(e=>e());function ke(e){const t=_.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return lp(()=>{t.current=e}),_.useCallback(function(){for(var n=arguments.length,o=new Array(n),i=0;i<n;i++)o[i]=arguments[i];return t.current==null?void 0:t.current(...o)},[])}function Er(e,t,n){let{reference:o,floating:i}=e;const s=Oe(t),r=zl(t),a=Ol(r),l=Ze(t),u=s==="y",c=o.x+o.width/2-i.width/2,f=o.y+o.height/2-i.height/2,d=o[a]/2-i[a]/2;let h;switch(l){case"top":h={x:c,y:o.y-i.height};break;case"bottom":h={x:c,y:o.y+o.height};break;case"right":h={x:o.x+o.width,y:f};break;case"left":h={x:o.x-i.width,y:f};break;default:h={x:o.x,y:o.y}}switch(rn(t)){case"start":h[r]-=d*(n&&u?-1:1);break;case"end":h[r]+=d*(n&&u?-1:1);break}return h}const up=async(e,t,n)=>{const{placement:o="bottom",strategy:i="absolute",middleware:s=[],platform:r}=n,a=s.filter(Boolean),l=await(r.isRTL==null?void 0:r.isRTL(t));let u=await r.getElementRects({reference:e,floating:t,strategy:i}),{x:c,y:f}=Er(u,o,l),d=o,h={},m=0;for(let g=0;g<a.length;g++){const{name:y,fn:v}=a[g],{x,y:p,data:S,reset:b}=await v({x:c,y:f,initialPlacement:o,placement:d,strategy:i,middlewareData:h,rects:u,platform:r,elements:{reference:e,floating:t}});c=x??c,f=p??f,h={...h,[y]:{...h[y],...S}},b&&m<=50&&(m++,typeof b=="object"&&(b.placement&&(d=b.placement),b.rects&&(u=b.rects===!0?await r.getElementRects({reference:e,floating:t,strategy:i}):b.rects),{x:c,y:f}=Er(u,d,l)),g=-1)}return{x:c,y:f,placement:d,strategy:i,middlewareData:h}};async function Ki(e,t){var n;t===void 0&&(t={});const{x:o,y:i,platform:s,rects:r,elements:a,strategy:l}=e,{boundary:u="clippingAncestors",rootBoundary:c="viewport",elementContext:f="floating",altBoundary:d=!1,padding:h=0}=sn(t,e),m=Jm(h),y=a[d?f==="floating"?"reference":"floating":f],v=kn(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(y)))==null||n?y:y.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(a.floating)),boundary:u,rootBoundary:c,strategy:l})),x=f==="floating"?{x:o,y:i,width:r.floating.width,height:r.floating.height}:r.reference,p=await(s.getOffsetParent==null?void 0:s.getOffsetParent(a.floating)),S=await(s.isElement==null?void 0:s.isElement(p))?await(s.getScale==null?void 0:s.getScale(p))||{x:1,y:1}:{x:1,y:1},b=kn(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:x,offsetParent:p,strategy:l}):x);return{top:(v.top-b.top+m.top)/S.y,bottom:(b.bottom-v.bottom+m.bottom)/S.y,left:(v.left-b.left+m.left)/S.x,right:(b.right-v.right+m.right)/S.x}}const cp=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,o;const{placement:i,middlewareData:s,rects:r,initialPlacement:a,platform:l,elements:u}=t,{mainAxis:c=!0,crossAxis:f=!0,fallbackPlacements:d,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:g=!0,...y}=sn(e,t);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const v=Ze(i),x=Oe(a),p=Ze(a)===a,S=await(l.isRTL==null?void 0:l.isRTL(u.floating)),b=d||(p||!g?[Dn(a)]:Um(a)),P=m!=="none";!d&&P&&b.push(...Ym(a,g,m,S));const V=[a,...b],M=await Ki(t,y),D=[];let k=((o=s.flip)==null?void 0:o.overflows)||[];if(c&&D.push(M[v]),f){const A=Gm(i,r,S);D.push(M[A[0]],M[A[1]])}if(k=[...k,{placement:i,overflows:D}],!D.every(A=>A<=0)){var j,N;const A=(((j=s.flip)==null?void 0:j.index)||0)+1,B=V[A];if(B&&(!(f==="alignment"?x!==Oe(B):!1)||k.every(R=>Oe(R.placement)===x?R.overflows[0]>0:!0)))return{data:{index:A,overflows:k},reset:{placement:B}};let z=(N=k.filter(E=>E.overflows[0]<=0).sort((E,R)=>E.overflows[1]-R.overflows[1])[0])==null?void 0:N.placement;if(!z)switch(h){case"bestFit":{var O;const E=(O=k.filter(R=>{if(P){const T=Oe(R.placement);return T===x||T==="y"}return!0}).map(R=>[R.placement,R.overflows.filter(T=>T>0).reduce((T,L)=>T+L,0)]).sort((R,T)=>R[1]-T[1])[0])==null?void 0:O[0];E&&(z=E);break}case"initialPlacement":z=a;break}if(i!==z)return{reset:{placement:z}}}return{}}}},dp=new Set(["left","top"]);async function fp(e,t){const{placement:n,platform:o,elements:i}=e,s=await(o.isRTL==null?void 0:o.isRTL(i.floating)),r=Ze(n),a=rn(n),l=Oe(n)==="y",u=dp.has(r)?-1:1,c=s&&l?-1:1,f=sn(t,e);let{mainAxis:d,crossAxis:h,alignmentAxis:m}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return a&&typeof m=="number"&&(h=a==="end"?m*-1:m),l?{x:h*c,y:d*u}:{x:d*u,y:h*c}}const hp=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,o;const{x:i,y:s,placement:r,middlewareData:a}=t,l=await fp(t,e);return r===((n=a.offset)==null?void 0:n.placement)&&(o=a.arrow)!=null&&o.alignmentOffset?{}:{x:i+l.x,y:s+l.y,data:{...l,placement:r}}}}},gp=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:o,placement:i}=t,{mainAxis:s=!0,crossAxis:r=!1,limiter:a={fn:y=>{let{x:v,y:x}=y;return{x:v,y:x}}},...l}=sn(e,t),u={x:n,y:o},c=await Ki(t,l),f=Oe(Ze(i)),d=jl(f);let h=u[d],m=u[f];if(s){const y=d==="y"?"top":"left",v=d==="y"?"bottom":"right",x=h+c[y],p=h-c[v];h=Sr(x,h,p)}if(r){const y=f==="y"?"top":"left",v=f==="y"?"bottom":"right",x=m+c[y],p=m-c[v];m=Sr(x,m,p)}const g=a.fn({...t,[d]:h,[f]:m});return{...g,data:{x:g.x-n,y:g.y-o,enabled:{[d]:s,[f]:r}}}}}},mp=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,o;const{placement:i,rects:s,platform:r,elements:a}=t,{apply:l=()=>{},...u}=sn(e,t),c=await Ki(t,u),f=Ze(i),d=rn(i),h=Oe(i)==="y",{width:m,height:g}=s.floating;let y,v;f==="top"||f==="bottom"?(y=f,v=d===(await(r.isRTL==null?void 0:r.isRTL(a.floating))?"start":"end")?"left":"right"):(v=f,y=d==="end"?"top":"bottom");const x=g-c.top-c.bottom,p=m-c.left-c.right,S=St(g-c[y],x),b=St(m-c[v],p),P=!t.middlewareData.shift;let V=S,M=b;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(M=p),(o=t.middlewareData.shift)!=null&&o.enabled.y&&(V=x),P&&!d){const k=ye(c.left,0),j=ye(c.right,0),N=ye(c.top,0),O=ye(c.bottom,0);h?M=m-2*(k!==0||j!==0?k+j:ye(c.left,c.right)):V=g-2*(N!==0||O!==0?N+O:ye(c.top,c.bottom))}await l({...t,availableWidth:M,availableHeight:V});const D=await r.getDimensions(a.floating);return m!==D.width||g!==D.height?{reset:{rects:!0}}:{}}}};function Bl(e){const t=Me(e);let n=parseFloat(t.width)||0,o=parseFloat(t.height)||0;const i=ve(e),s=i?e.offsetWidth:n,r=i?e.offsetHeight:o,a=An(n)!==s||An(o)!==r;return a&&(n=s,o=r),{width:n,height:o,$:a}}function qi(e){return ee(e)?e:e.contextElement}function wt(e){const t=qi(e);if(!ve(t))return Le(1);const n=t.getBoundingClientRect(),{width:o,height:i,$:s}=Bl(t);let r=(s?An(n.width):n.width)/o,a=(s?An(n.height):n.height)/i;return(!r||!Number.isFinite(r))&&(r=1),(!a||!Number.isFinite(a))&&(a=1),{x:r,y:a}}const pp=Le(0);function Nl(e){const t=we(e);return!Hn()||!t.visualViewport?pp:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function vp(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==we(e)?!1:t}function lt(e,t,n,o){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),s=qi(e);let r=Le(1);t&&(o?ee(o)&&(r=wt(o)):r=wt(e));const a=vp(s,n,o)?Nl(s):Le(0);let l=(i.left+a.x)/r.x,u=(i.top+a.y)/r.y,c=i.width/r.x,f=i.height/r.y;if(s){const d=we(s),h=o&&ee(o)?we(o):o;let m=d,g=ti(m);for(;g&&o&&h!==m;){const y=wt(g),v=g.getBoundingClientRect(),x=Me(g),p=v.left+(g.clientLeft+parseFloat(x.paddingLeft))*y.x,S=v.top+(g.clientTop+parseFloat(x.paddingTop))*y.y;l*=y.x,u*=y.y,c*=y.x,f*=y.y,l+=p,u+=S,m=we(g),g=ti(m)}}return kn({width:c,height:f,x:l,y:u})}function Gn(e,t){const n=Wn(e).scrollLeft;return t?t.left+n:lt(Ie(e)).left+n}function Hl(e,t){const n=e.getBoundingClientRect(),o=n.left+t.scrollLeft-Gn(e,n),i=n.top+t.scrollTop;return{x:o,y:i}}function yp(e){let{elements:t,rect:n,offsetParent:o,strategy:i}=e;const s=i==="fixed",r=Ie(o),a=t?Nn(t.floating):!1;if(o===r||a&&s)return n;let l={scrollLeft:0,scrollTop:0},u=Le(1);const c=Le(0),f=ve(o);if((f||!f&&!s)&&((Tt(o)!=="body"||on(r))&&(l=Wn(o)),ve(o))){const h=lt(o);u=wt(o),c.x=h.x+o.clientLeft,c.y=h.y+o.clientTop}const d=r&&!f&&!s?Hl(r,l):Le(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-l.scrollLeft*u.x+c.x+d.x,y:n.y*u.y-l.scrollTop*u.y+c.y+d.y}}function wp(e){return Array.from(e.getClientRects())}function xp(e){const t=Ie(e),n=Wn(e),o=e.ownerDocument.body,i=ye(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),s=ye(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight);let r=-n.scrollLeft+Gn(e);const a=-n.scrollTop;return Me(o).direction==="rtl"&&(r+=ye(t.clientWidth,o.clientWidth)-i),{width:i,height:s,x:r,y:a}}const Mr=25;function Cp(e,t){const n=we(e),o=Ie(e),i=n.visualViewport;let s=o.clientWidth,r=o.clientHeight,a=0,l=0;if(i){s=i.width,r=i.height;const c=Hn();(!c||c&&t==="fixed")&&(a=i.offsetLeft,l=i.offsetTop)}const u=Gn(o);if(u<=0){const c=o.ownerDocument,f=c.body,d=getComputedStyle(f),h=c.compatMode==="CSS1Compat"&&parseFloat(d.marginLeft)+parseFloat(d.marginRight)||0,m=Math.abs(o.clientWidth-f.clientWidth-h);m<=Mr&&(s-=m)}else u<=Mr&&(s+=u);return{width:s,height:r,x:a,y:l}}const Sp=new Set(["absolute","fixed"]);function _p(e,t){const n=lt(e,!0,t==="fixed"),o=n.top+e.clientTop,i=n.left+e.clientLeft,s=ve(e)?wt(e):Le(1),r=e.clientWidth*s.x,a=e.clientHeight*s.y,l=i*s.x,u=o*s.y;return{width:r,height:a,x:l,y:u}}function Pr(e,t,n){let o;if(t==="viewport")o=Cp(e,n);else if(t==="document")o=xp(Ie(e));else if(ee(t))o=_p(t,n);else{const i=Nl(e);o={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return kn(o)}function Wl(e,t){const n=We(e);return n===t||!ee(n)||ze(n)?!1:Me(n).position==="fixed"||Wl(n,t)}function bp(e,t){const n=t.get(e);if(n)return n;let o=qe(e,[],!1).filter(a=>ee(a)&&Tt(a)!=="body"),i=null;const s=Me(e).position==="fixed";let r=s?We(e):e;for(;ee(r)&&!ze(r);){const a=Me(r),l=Ui(r);!l&&a.position==="fixed"&&(i=null),(s?!l&&!i:!l&&a.position==="static"&&!!i&&Sp.has(i.position)||on(r)&&!l&&Wl(e,r))?o=o.filter(c=>c!==r):i=a,r=We(r)}return t.set(e,o),o}function Rp(e){let{element:t,boundary:n,rootBoundary:o,strategy:i}=e;const r=[...n==="clippingAncestors"?Nn(t)?[]:bp(t,this._c):[].concat(n),o],a=r[0],l=r.reduce((u,c)=>{const f=Pr(t,c,i);return u.top=ye(f.top,u.top),u.right=St(f.right,u.right),u.bottom=St(f.bottom,u.bottom),u.left=ye(f.left,u.left),u},Pr(t,a,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function Ep(e){const{width:t,height:n}=Bl(e);return{width:t,height:n}}function Mp(e,t,n){const o=ve(t),i=Ie(t),s=n==="fixed",r=lt(e,!0,s,t);let a={scrollLeft:0,scrollTop:0};const l=Le(0);function u(){l.x=Gn(i)}if(o||!o&&!s)if((Tt(t)!=="body"||on(i))&&(a=Wn(t)),o){const h=lt(t,!0,s,t);l.x=h.x+t.clientLeft,l.y=h.y+t.clientTop}else i&&u();s&&!o&&i&&u();const c=i&&!o&&!s?Hl(i,a):Le(0),f=r.left+a.scrollLeft-l.x-c.x,d=r.top+a.scrollTop-l.y-c.y;return{x:f,y:d,width:r.width,height:r.height}}function yo(e){return Me(e).position==="static"}function Tr(e,t){if(!ve(e)||Me(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Ie(e)===n&&(n=n.ownerDocument.body),n}function Gl(e,t){const n=we(e);if(Nn(e))return n;if(!ve(e)){let i=We(e);for(;i&&!ze(i);){if(ee(i)&&!yo(i))return i;i=We(i)}return n}let o=Tr(e,t);for(;o&&Lm(o)&&yo(o);)o=Tr(o,t);return o&&ze(o)&&yo(o)&&!Ui(o)?n:o||zm(e)||n}const Pp=async function(e){const t=this.getOffsetParent||Gl,n=this.getDimensions,o=await n(e.floating);return{reference:Mp(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function Tp(e){return Me(e).direction==="rtl"}const Vp={convertOffsetParentRelativeRectToViewportRelativeRect:yp,getDocumentElement:Ie,getClippingRect:Rp,getOffsetParent:Gl,getElementRects:Pp,getClientRects:wp,getDimensions:Ep,getScale:wt,isElement:ee,isRTL:Tp};function Ul(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Ap(e,t){let n=null,o;const i=Ie(e);function s(){var a;clearTimeout(o),(a=n)==null||a.disconnect(),n=null}function r(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),s();const u=e.getBoundingClientRect(),{left:c,top:f,width:d,height:h}=u;if(a||t(),!d||!h)return;const m=hn(f),g=hn(i.clientWidth-(c+d)),y=hn(i.clientHeight-(f+h)),v=hn(c),p={rootMargin:-m+"px "+-g+"px "+-y+"px "+-v+"px",threshold:ye(0,St(1,l))||1};let S=!0;function b(P){const V=P[0].intersectionRatio;if(V!==l){if(!S)return r();V?r(!1,V):o=setTimeout(()=>{r(!1,1e-7)},1e3)}V===1&&!Ul(u,e.getBoundingClientRect())&&r(),S=!1}try{n=new IntersectionObserver(b,{...p,root:i.ownerDocument})}catch{n=new IntersectionObserver(b,p)}n.observe(e)}return r(!0),s}function Kl(e,t,n,o){o===void 0&&(o={});const{ancestorScroll:i=!0,ancestorResize:s=!0,elementResize:r=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=o,u=qi(e),c=i||s?[...u?qe(u):[],...qe(t)]:[];c.forEach(v=>{i&&v.addEventListener("scroll",n,{passive:!0}),s&&v.addEventListener("resize",n)});const f=u&&a?Ap(u,n):null;let d=-1,h=null;r&&(h=new ResizeObserver(v=>{let[x]=v;x&&x.target===u&&h&&(h.unobserve(t),cancelAnimationFrame(d),d=requestAnimationFrame(()=>{var p;(p=h)==null||p.observe(t)})),n()}),u&&!l&&h.observe(u),h.observe(t));let m,g=l?lt(e):null;l&&y();function y(){const v=lt(e);g&&!Ul(g,v)&&n(),g=v,m=requestAnimationFrame(y)}return n(),()=>{var v;c.forEach(x=>{i&&x.removeEventListener("scroll",n),s&&x.removeEventListener("resize",n)}),f?.(),(v=h)==null||v.disconnect(),h=null,l&&cancelAnimationFrame(m)}}const Dp=hp,kp=gp,Fp=cp,Lp=mp,Ip=(e,t,n)=>{const o=new Map,i={platform:Vp,...n},s={...i.platform,_c:o};return up(e,t,{...i,platform:s})};var $p=typeof document<"u",jp=function(){},bn=$p?C.useLayoutEffect:jp;function Fn(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,o,i;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(o=n;o--!==0;)if(!Fn(e[o],t[o]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(o=n;o--!==0;)if(!{}.hasOwnProperty.call(t,i[o]))return!1;for(o=n;o--!==0;){const s=i[o];if(!(s==="_owner"&&e.$$typeof)&&!Fn(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function ql(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Vr(e,t){const n=ql(e);return Math.round(t*n)/n}function wo(e){const t=_.useRef(e);return bn(()=>{t.current=e}),t}function Op(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:o=[],platform:i,elements:{reference:s,floating:r}={},transform:a=!0,whileElementsMounted:l,open:u}=e,[c,f]=_.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[d,h]=_.useState(o);Fn(d,o)||h(o);const[m,g]=_.useState(null),[y,v]=_.useState(null),x=_.useCallback(R=>{R!==P.current&&(P.current=R,g(R))},[]),p=_.useCallback(R=>{R!==V.current&&(V.current=R,v(R))},[]),S=s||m,b=r||y,P=_.useRef(null),V=_.useRef(null),M=_.useRef(c),D=l!=null,k=wo(l),j=wo(i),N=wo(u),O=_.useCallback(()=>{if(!P.current||!V.current)return;const R={placement:t,strategy:n,middleware:d};j.current&&(R.platform=j.current),Ip(P.current,V.current,R).then(T=>{const L={...T,isPositioned:N.current!==!1};A.current&&!Fn(M.current,L)&&(M.current=L,bu.flushSync(()=>{f(L)}))})},[d,t,n,j,N]);bn(()=>{u===!1&&M.current.isPositioned&&(M.current.isPositioned=!1,f(R=>({...R,isPositioned:!1})))},[u]);const A=_.useRef(!1);bn(()=>(A.current=!0,()=>{A.current=!1}),[]),bn(()=>{if(S&&(P.current=S),b&&(V.current=b),S&&b){if(k.current)return k.current(S,b,O);O()}},[S,b,O,k,D]);const B=_.useMemo(()=>({reference:P,floating:V,setReference:x,setFloating:p}),[x,p]),z=_.useMemo(()=>({reference:S,floating:b}),[S,b]),E=_.useMemo(()=>{const R={position:n,left:0,top:0};if(!z.floating)return R;const T=Vr(z.floating,c.x),L=Vr(z.floating,c.y);return a?{...R,transform:"translate("+T+"px, "+L+"px)",...ql(z.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:T,top:L}},[n,a,z.floating,c.x,c.y]);return _.useMemo(()=>({...c,update:O,refs:B,elements:z,floatingStyles:E}),[c,O,B,z,E])}const Xl=(e,t)=>({...Dp(e),options:[e,t]}),Yl=(e,t)=>({...kp(e),options:[e,t]}),Zl=(e,t)=>({...Fp(e),options:[e,t]}),zp=(e,t)=>({...Lp(e),options:[e,t]});function Bp(e){const t=_.useRef(void 0),n=_.useCallback(o=>{const i=e.map(s=>{if(s!=null){if(typeof s=="function"){const r=s,a=r(o);return typeof a=="function"?a:()=>{r(null)}}return s.current=o,()=>{s.current=null}}});return()=>{i.forEach(s=>s?.())}},e);return _.useMemo(()=>e.every(o=>o==null)?null:o=>{t.current&&(t.current(),t.current=void 0),o!=null&&(t.current=n(o))},e)}const Np="data-floating-ui-focusable",Ar="active",Dr="selected",Hp={..._};let kr=!1,Wp=0;const Fr=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+Wp++;function Gp(){const[e,t]=_.useState(()=>kr?Fr():void 0);return _t(()=>{e==null&&t(Fr())},[]),_.useEffect(()=>{kr=!0},[]),e}const Up=Hp.useId,Jl=Up||Gp;let ii;process.env.NODE_ENV!=="production"&&(ii=new Set);function Kp(){for(var e,t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];const i="Floating UI: "+n.join(" ");if(!((e=ii)!=null&&e.has(i))){var s;(s=ii)==null||s.add(i),console.error(i)}}function qp(){const e=new Map;return{emit(t,n){var o;(o=e.get(t))==null||o.forEach(i=>i(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){var o;(o=e.get(t))==null||o.delete(n)}}}const Xp=_.createContext(null),Yp=_.createContext(null),Xi=()=>{var e;return((e=_.useContext(Xp))==null?void 0:e.id)||null},Yi=()=>_.useContext(Yp);function Ql(e){return"data-floating-ui-"+e}function Pe(e){e.current!==-1&&(clearTimeout(e.current),e.current=-1)}const Lr=Ql("safe-polygon");function xo(e,t,n){if(n&&!Zt(n))return 0;if(typeof e=="number")return e;if(typeof e=="function"){const o=e();return typeof o=="number"?o:o?.[t]}return e?.[t]}function Co(e){return typeof e=="function"?e():e}function Zp(e,t){t===void 0&&(t={});const{open:n,onOpenChange:o,dataRef:i,events:s,elements:r}=e,{enabled:a=!0,delay:l=0,handleClose:u=null,mouseOnly:c=!1,restMs:f=0,move:d=!0}=t,h=Yi(),m=Xi(),g=gn(u),y=gn(l),v=gn(n),x=gn(f),p=_.useRef(),S=_.useRef(-1),b=_.useRef(),P=_.useRef(-1),V=_.useRef(!0),M=_.useRef(!1),D=_.useRef(()=>{}),k=_.useRef(!1),j=ke(()=>{var E;const R=(E=i.current.openEvent)==null?void 0:E.type;return R?.includes("mouse")&&R!=="mousedown"});_.useEffect(()=>{if(!a)return;function E(R){let{open:T}=R;T||(Pe(S),Pe(P),V.current=!0,k.current=!1)}return s.on("openchange",E),()=>{s.off("openchange",E)}},[a,s]),_.useEffect(()=>{if(!a||!g.current||!n)return;function E(T){j()&&o(!1,T,"hover")}const R=vt(r.floating).documentElement;return R.addEventListener("mouseleave",E),()=>{R.removeEventListener("mouseleave",E)}},[r.floating,n,o,a,g,j]);const N=_.useCallback(function(E,R,T){R===void 0&&(R=!0),T===void 0&&(T="hover");const L=xo(y.current,"close",p.current);L&&!b.current?(Pe(S),S.current=window.setTimeout(()=>o(!1,E,T),L)):R&&(Pe(S),o(!1,E,T))},[y,o]),O=ke(()=>{D.current(),b.current=void 0}),A=ke(()=>{if(M.current){const E=vt(r.floating).body;E.style.pointerEvents="",E.removeAttribute(Lr),M.current=!1}}),B=ke(()=>i.current.openEvent?["click","mousedown"].includes(i.current.openEvent.type):!1);_.useEffect(()=>{if(!a)return;function E(U){if(Pe(S),V.current=!1,c&&!Zt(p.current)||Co(x.current)>0&&!xo(y.current,"open"))return;const q=xo(y.current,"open",p.current);q?S.current=window.setTimeout(()=>{v.current||o(!0,U,"hover")},q):n||o(!0,U,"hover")}function R(U){if(B()){A();return}D.current();const q=vt(r.floating);if(Pe(P),k.current=!1,g.current&&i.current.floatingContext){n||Pe(S),b.current=g.current({...i.current.floatingContext,tree:h,x:U.clientX,y:U.clientY,onClose(){A(),O(),B()||N(U,!0,"safe-polygon")}});const J=b.current;q.addEventListener("mousemove",J),D.current=()=>{q.removeEventListener("mousemove",J)};return}(p.current==="touch"?!oi(r.floating,U.relatedTarget):!0)&&N(U)}function T(U){B()||i.current.floatingContext&&(g.current==null||g.current({...i.current.floatingContext,tree:h,x:U.clientX,y:U.clientY,onClose(){A(),O(),B()||N(U)}})(U))}function L(){Pe(S)}function Y(U){B()||N(U,!1)}if(ee(r.domReference)){const U=r.domReference,q=r.floating;return n&&U.addEventListener("mouseleave",T),d&&U.addEventListener("mousemove",E,{once:!0}),U.addEventListener("mouseenter",E),U.addEventListener("mouseleave",R),q&&(q.addEventListener("mouseleave",T),q.addEventListener("mouseenter",L),q.addEventListener("mouseleave",Y)),()=>{n&&U.removeEventListener("mouseleave",T),d&&U.removeEventListener("mousemove",E),U.removeEventListener("mouseenter",E),U.removeEventListener("mouseleave",R),q&&(q.removeEventListener("mouseleave",T),q.removeEventListener("mouseenter",L),q.removeEventListener("mouseleave",Y))}}},[r,a,e,c,d,N,O,A,o,n,v,h,y,g,i,B,x]),_t(()=>{var E;if(a&&n&&(E=g.current)!=null&&(E=E.__options)!=null&&E.blockPointerEvents&&j()){M.current=!0;const T=r.floating;if(ee(r.domReference)&&T){var R;const L=vt(r.floating).body;L.setAttribute(Lr,"");const Y=r.domReference,U=h==null||(R=h.nodesRef.current.find(q=>q.id===m))==null||(R=R.context)==null?void 0:R.elements.floating;return U&&(U.style.pointerEvents=""),L.style.pointerEvents="none",Y.style.pointerEvents="auto",T.style.pointerEvents="auto",()=>{L.style.pointerEvents="",Y.style.pointerEvents="",T.style.pointerEvents=""}}}},[a,n,m,r,h,g,j]),_t(()=>{n||(p.current=void 0,k.current=!1,O(),A())},[n,O,A]),_.useEffect(()=>()=>{O(),Pe(S),Pe(P),A()},[a,r.domReference,O,A]);const z=_.useMemo(()=>{function E(R){p.current=R.pointerType}return{onPointerDown:E,onPointerEnter:E,onMouseMove(R){const{nativeEvent:T}=R;function L(){!V.current&&!v.current&&o(!0,T,"hover")}c&&!Zt(p.current)||n||Co(x.current)===0||k.current&&R.movementX**2+R.movementY**2<2||(Pe(P),p.current==="touch"?L():(k.current=!0,P.current=window.setTimeout(L,Co(x.current))))}}},[c,o,n,v,x]);return _.useMemo(()=>a?{reference:z}:{},[a,z])}function Ir(e){return ve(e.target)&&e.target.tagName==="BUTTON"}function Jp(e){return ve(e.target)&&e.target.tagName==="A"}function $r(e){return tp(e)}function Qp(e,t){t===void 0&&(t={});const{open:n,onOpenChange:o,dataRef:i,elements:{domReference:s}}=e,{enabled:r=!0,event:a="click",toggle:l=!0,ignoreMouse:u=!1,keyboardHandlers:c=!0,stickIfOpen:f=!0}=t,d=_.useRef(),h=_.useRef(!1),m=_.useMemo(()=>({onPointerDown(g){d.current=g.pointerType},onMouseDown(g){const y=d.current;g.button===0&&a!=="click"&&(Zt(y,!0)&&u||(n&&l&&(!(i.current.openEvent&&f)||i.current.openEvent.type==="mousedown")?o(!1,g.nativeEvent,"click"):(g.preventDefault(),o(!0,g.nativeEvent,"click"))))},onClick(g){const y=d.current;if(a==="mousedown"&&d.current){d.current=void 0;return}Zt(y,!0)&&u||(n&&l&&(!(i.current.openEvent&&f)||i.current.openEvent.type==="click")?o(!1,g.nativeEvent,"click"):o(!0,g.nativeEvent,"click"))},onKeyDown(g){d.current=void 0,!(g.defaultPrevented||!c||Ir(g))&&(g.key===" "&&!$r(s)&&(g.preventDefault(),h.current=!0),!Jp(g)&&g.key==="Enter"&&o(!(n&&l),g.nativeEvent,"click"))},onKeyUp(g){g.defaultPrevented||!c||Ir(g)||$r(s)||g.key===" "&&h.current&&(h.current=!1,o(!(n&&l),g.nativeEvent,"click"))}}),[i,s,a,u,c,o,n,f,l]);return _.useMemo(()=>r?{reference:m}:{},[r,m])}const ev={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},tv={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},jr=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 nv(e,t){t===void 0&&(t={});const{open:n,onOpenChange:o,elements:i,dataRef:s}=e,{enabled:r=!0,escapeKey:a=!0,outsidePress:l=!0,outsidePressEvent:u="pointerdown",referencePress:c=!1,referencePressEvent:f="pointerdown",ancestorScroll:d=!1,bubbles:h,capture:m}=t,g=Yi(),y=ke(typeof l=="function"?l:()=>!1),v=typeof l=="function"?y:l,x=_.useRef(!1),{escapeKey:p,outsidePress:S}=jr(h),{escapeKey:b,outsidePress:P}=jr(m),V=_.useRef(!1),M=ke(A=>{var B;if(!n||!r||!a||A.key!=="Escape"||V.current)return;const z=(B=s.current.floatingContext)==null?void 0:B.nodeId,E=g?_n(g.nodesRef.current,z):[];if(!p&&(A.stopPropagation(),E.length>0)){let R=!0;if(E.forEach(T=>{var L;if((L=T.context)!=null&&L.open&&!T.context.dataRef.current.__escapeKeyBubbles){R=!1;return}}),!R)return}o(!1,op(A)?A.nativeEvent:A,"escape-key")}),D=ke(A=>{var B;const z=()=>{var E;M(A),(E=Lt(A))==null||E.removeEventListener("keydown",z)};(B=Lt(A))==null||B.addEventListener("keydown",z)}),k=ke(A=>{var B;const z=s.current.insideReactTree;s.current.insideReactTree=!1;const E=x.current;if(x.current=!1,u==="click"&&E||z||typeof v=="function"&&!v(A))return;const R=Lt(A),T="["+Ql("inert")+"]",L=vt(i.floating).querySelectorAll(T);let Y=ee(R)?R:null;for(;Y&&!ze(Y);){const J=We(Y);if(ze(J)||!ee(J))break;Y=J}if(L.length&&ee(R)&&!ep(R)&&!oi(R,i.floating)&&Array.from(L).every(J=>!oi(Y,J)))return;if(ve(R)&&O){const J=ze(R),ie=Me(R),$=/auto|scroll/,Z=J||$.test(ie.overflowX),se=J||$.test(ie.overflowY),ae=Z&&R.clientWidth>0&&R.scrollWidth>R.clientWidth,Ce=se&&R.clientHeight>0&&R.scrollHeight>R.clientHeight,et=ie.direction==="rtl",At=Ce&&(et?A.offsetX<=R.offsetWidth-R.clientWidth:A.offsetX>R.clientWidth),Dt=ae&&A.offsetY>R.clientHeight;if(At||Dt)return}const U=(B=s.current.floatingContext)==null?void 0:B.nodeId,q=g&&_n(g.nodesRef.current,U).some(J=>{var ie;return vo(A,(ie=J.context)==null?void 0:ie.elements.floating)});if(vo(A,i.floating)||vo(A,i.domReference)||q)return;const ge=g?_n(g.nodesRef.current,U):[];if(ge.length>0){let J=!0;if(ge.forEach(ie=>{var $;if(($=ie.context)!=null&&$.open&&!ie.context.dataRef.current.__outsidePressBubbles){J=!1;return}}),!J)return}o(!1,A,"outside-press")}),j=ke(A=>{var B;const z=()=>{var E;k(A),(E=Lt(A))==null||E.removeEventListener(u,z)};(B=Lt(A))==null||B.addEventListener(u,z)});_.useEffect(()=>{if(!n||!r)return;s.current.__escapeKeyBubbles=p,s.current.__outsidePressBubbles=S;let A=-1;function B(L){o(!1,L,"ancestor-scroll")}function z(){window.clearTimeout(A),V.current=!0}function E(){A=window.setTimeout(()=>{V.current=!1},Hn()?5:0)}const R=vt(i.floating);a&&(R.addEventListener("keydown",b?D:M,b),R.addEventListener("compositionstart",z),R.addEventListener("compositionend",E)),v&&R.addEventListener(u,P?j:k,P);let T=[];return d&&(ee(i.domReference)&&(T=qe(i.domReference)),ee(i.floating)&&(T=T.concat(qe(i.floating))),!ee(i.reference)&&i.reference&&i.reference.contextElement&&(T=T.concat(qe(i.reference.contextElement)))),T=T.filter(L=>{var Y;return L!==((Y=R.defaultView)==null?void 0:Y.visualViewport)}),T.forEach(L=>{L.addEventListener("scroll",B,{passive:!0})}),()=>{a&&(R.removeEventListener("keydown",b?D:M,b),R.removeEventListener("compositionstart",z),R.removeEventListener("compositionend",E)),v&&R.removeEventListener(u,P?j:k,P),T.forEach(L=>{L.removeEventListener("scroll",B)}),window.clearTimeout(A)}},[s,i,a,v,u,n,o,d,r,p,S,M,b,D,k,P,j]),_.useEffect(()=>{s.current.insideReactTree=!1},[s,v,u]);const N=_.useMemo(()=>({onKeyDown:M,...c&&{[ev[f]]:A=>{o(!1,A.nativeEvent,"reference-press")},...f!=="click"&&{onClick(A){o(!1,A.nativeEvent,"reference-press")}}}}),[M,o,c,f]),O=_.useMemo(()=>({onKeyDown:M,onMouseDown(){x.current=!0},onMouseUp(){x.current=!0},[tv[u]]:()=>{s.current.insideReactTree=!0}}),[M,u,s]);return _.useMemo(()=>r?{reference:N,floating:O}:{},[r,N,O])}function ov(e){const{open:t=!1,onOpenChange:n,elements:o}=e,i=Jl(),s=_.useRef({}),[r]=_.useState(()=>qp()),a=Xi()!=null;if(process.env.NODE_ENV!=="production"){const h=o.reference;h&&!ee(h)&&Kp("Cannot pass a virtual element to the `elements.reference` option,","as it must be a real DOM element. Use `refs.setPositionReference()`","instead.")}const[l,u]=_.useState(o.reference),c=ke((h,m,g)=>{s.current.openEvent=h?m:void 0,r.emit("openchange",{open:h,event:m,reason:g,nested:a}),n?.(h,m,g)}),f=_.useMemo(()=>({setPositionReference:u}),[]),d=_.useMemo(()=>({reference:l||o.reference||null,floating:o.floating||null,domReference:o.reference}),[l,o.reference,o.floating]);return _.useMemo(()=>({dataRef:s,open:t,onOpenChange:c,elements:d,events:r,floatingId:i,refs:f}),[t,c,d,r,i,f])}function eu(e){e===void 0&&(e={});const{nodeId:t}=e,n=ov({...e,elements:{reference:null,floating:null,...e.elements}}),o=e.rootContext||n,i=o.elements,[s,r]=_.useState(null),[a,l]=_.useState(null),c=i?.domReference||s,f=_.useRef(null),d=Yi();_t(()=>{c&&(f.current=c)},[c]);const h=Op({...e,elements:{...i,...a&&{reference:a}}}),m=_.useCallback(p=>{const S=ee(p)?{getBoundingClientRect:()=>p.getBoundingClientRect(),getClientRects:()=>p.getClientRects(),contextElement:p}:p;l(S),h.refs.setReference(S)},[h.refs]),g=_.useCallback(p=>{(ee(p)||p===null)&&(f.current=p,r(p)),(ee(h.refs.reference.current)||h.refs.reference.current===null||p!==null&&!ee(p))&&h.refs.setReference(p)},[h.refs]),y=_.useMemo(()=>({...h.refs,setReference:g,setPositionReference:m,domReference:f}),[h.refs,g,m]),v=_.useMemo(()=>({...h.elements,domReference:c}),[h.elements,c]),x=_.useMemo(()=>({...h,...o,refs:y,elements:v,nodeId:t}),[h,y,v,t,o]);return _t(()=>{o.dataRef.current.floatingContext=x;const p=d?.nodesRef.current.find(S=>S.id===t);p&&(p.context=x)}),_.useMemo(()=>({...h,context:x,refs:y,elements:v}),[h,y,v,x])}function So(e,t,n){const o=new Map,i=n==="item";let s=e;if(i&&e){const{[Ar]:r,[Dr]:a,...l}=e;s=l}return{...n==="floating"&&{tabIndex:-1,[Np]:""},...s,...t.map(r=>{const a=r?r[n]:null;return typeof a=="function"?e?a(e):null:a}).concat(e).reduce((r,a)=>(a&&Object.entries(a).forEach(l=>{let[u,c]=l;if(!(i&&[Ar,Dr].includes(u)))if(u.indexOf("on")===0){if(o.has(u)||o.set(u,[]),typeof c=="function"){var f;(f=o.get(u))==null||f.push(c),r[u]=function(){for(var d,h=arguments.length,m=new Array(h),g=0;g<h;g++)m[g]=arguments[g];return(d=o.get(u))==null?void 0:d.map(y=>y(...m)).find(y=>y!==void 0)}}}else r[u]=c}),r),{})}}function iv(e){e===void 0&&(e=[]);const t=e.map(a=>a?.reference),n=e.map(a=>a?.floating),o=e.map(a=>a?.item),i=_.useCallback(a=>So(a,e,"reference"),t),s=_.useCallback(a=>So(a,e,"floating"),n),r=_.useCallback(a=>So(a,e,"item"),o);return _.useMemo(()=>({getReferenceProps:i,getFloatingProps:s,getItemProps:r}),[i,s,r])}const sv=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function rv(e,t){var n,o;t===void 0&&(t={});const{open:i,elements:s,floatingId:r}=e,{enabled:a=!0,role:l="dialog"}=t,u=Jl(),c=((n=s.domReference)==null?void 0:n.id)||u,f=_.useMemo(()=>{var x;return((x=np(s.floating))==null?void 0:x.id)||r},[s.floating,r]),d=(o=sv.get(l))!=null?o:l,m=Xi()!=null,g=_.useMemo(()=>d==="tooltip"||l==="label"?{["aria-"+(l==="label"?"labelledby":"describedby")]:i?f:void 0}:{"aria-expanded":i?"true":"false","aria-haspopup":d==="alertdialog"?"dialog":d,"aria-controls":i?f:void 0,...d==="listbox"&&{role:"combobox"},...d==="menu"&&{id:c},...d==="menu"&&m&&{role:"menuitem"},...l==="select"&&{"aria-autocomplete":"none"},...l==="combobox"&&{"aria-autocomplete":"list"}},[d,f,m,i,c,l]),y=_.useMemo(()=>{const x={id:f,...d&&{role:d}};return d==="tooltip"||l==="label"?x:{...x,...d==="menu"&&{"aria-labelledby":c}}},[d,f,c,l]),v=_.useCallback(x=>{let{active:p,selected:S}=x;const b={role:"option",...p&&{id:f+"-fui-option"}};switch(l){case"select":case"combobox":return{...b,"aria-selected":S}}return{}},[f,l]);return _.useMemo(()=>a?{reference:g,floating:y,item:v}:{},[a,g,y,v])}const av=e=>_.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},_.createElement("path",{d:"M6 9L12 15L18 9",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),lv=e=>_.createElement("svg",{fill:"currentColor",id:"Capa_1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",viewBox:"0 0 462.035 462.035",xmlSpace:"preserve",...e},_.createElement("g",null,_.createElement("path",{d:"M457.83,158.441c-0.021-0.028-0.033-0.058-0.057-0.087l-50.184-62.48c-0.564-0.701-1.201-1.305-1.879-1.845 c-2.16-2.562-5.355-4.225-8.967-4.225H65.292c-3.615,0-6.804,1.661-8.965,4.225c-0.678,0.54-1.316,1.138-1.885,1.845l-50.178,62.48 c-0.023,0.029-0.034,0.059-0.057,0.087C1.655,160.602,0,163.787,0,167.39v193.07c0,6.5,5.27,11.771,11.77,11.771h438.496 c6.5,0,11.77-5.271,11.77-11.771V167.39C462.037,163.787,460.381,160.602,457.83,158.441z M408.516,134.615l16.873,21.005h-16.873 V134.615z M384.975,113.345v42.274H296.84c-2.514,0-4.955,0.805-6.979,2.293l-58.837,43.299l-58.849-43.305 c-2.023-1.482-4.466-2.287-6.978-2.287H77.061v-42.274H384.975z M53.523,155.62H36.65l16.873-21.005V155.62z M438.498,348.69H23.54 V179.16h137.796l62.711,46.148c4.15,3.046,9.805,3.052,13.954-0.005l62.698-46.144h137.799V348.69L438.498,348.69z"}))),uv=e=>_.createElement("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},_.createElement("g",{opacity:.6},_.createElement("path",{d:"M12 4L4 12M4 4L12 12",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}))),_o={sm:{h:28,p:"var(--spacing-xs) var(--spacing-sm)",text:"body-2"},md:{h:32,p:"6px var(--spacing-md)",text:"body-2"},lg:{h:40,p:"var(--spacing-sm) var(--spacing-lg)",text:"body-1"}},Zi=C.forwardRef(({label:e,color:t="primary",size:n="md",onClick:o,onDelete:i,avatar:s,icon:r,disabled:a,className:l},u)=>{const c=C.useRef(null),f=C.useMemo(()=>{switch(t){case"primary":return{bg:"var(--status-neutral-tint-low)",color:"var(--text-primary)"};case"accent":return{bg:"var(--status-accent-tint-low)",color:"var(--text-accent)"};case"warning":return{bg:"var(--status-warning-tint-low)",color:"var(--text-warning)"};case"positive":return{bg:"var(--status-positive-tint-low)",color:"var(--text-positive)"};case"negative":return{bg:"var(--status-negative-tint-low)",color:"var(--text-negative)"};default:return{bg:"var(--status-neutral-tint-low)",color:"var(--text-primary)"}}},[t]),d=F.css({cursor:a?"not-allowed":o?"pointer":"default",opacity:a?.5:1,userSelect:"none",position:"relative",transition:"background-color 0.2s, opacity 0.2s","&:hover":a?void 0:{backgroundColor:f.bg}}),h=F.css({display:"inline-flex",cursor:"pointer",opacity:.6,"&:hover":{opacity:1}});return w.jsxs(I,{ref:m=>{c.current=m,typeof u=="function"?u(m):u&&(u.current=m)},row:!0,alignItems:"center",justifyContent:"center",gap:"var(--spacing-sm)",h:_o[n].h,p:_o[n].p,overflow:"hidden",borderRadius:"var(--corner-sm)",backgroundColor:f.bg,color:f.color,onClick:o,className:F.cx(d,l),children:[o&&w.jsx(bt,{}),s&&w.jsx(I,{w:20,h:20,borderRadius:"50%",overflow:"hidden",children:s}),r&&w.jsx(I,{children:r}),typeof e=="string"?w.jsx(K,{variant:_o[n].text,colorName:t,textOverflow:"ellipsis",overflow:"hidden",children:e}):e,i&&!a&&w.jsx(K,{className:h,colorName:t,onClick:m=>{m.stopPropagation(),i(m)},children:w.jsx(uv,{})})]})});Zi.displayName="Tag";const cv="_disabled_zbo6w_40",dv="_open_zbo6w_48",fv="_error_zbo6w_51",hv="_hidden_zbo6w_87",gv="_visible_zbo6w_90",mv="_selected_zbo6w_163",ue={"select-container":"_select-container_zbo6w_8","full-width":"_full-width_zbo6w_13","select-input":"_select-input_zbo6w_17","size-xs":"_size-xs_zbo6w_25","size-sm":"_size-sm_zbo6w_30","size-md":"_size-md_zbo6w_35",disabled:cv,open:dv,"select-arrow":"_select-arrow_zbo6w_48",error:fv,"select-value":"_select-value_zbo6w_62","select-value_xs":"_select-value_xs_zbo6w_74","select-placeholder":"_select-placeholder_zbo6w_81",hidden:hv,visible:gv,"select-arrow_xs":"_select-arrow_xs_zbo6w_106","select-dropdown":"_select-dropdown_zbo6w_116","select-menu":"_select-menu_zbo6w_126","select-menu-item":"_select-menu-item_zbo6w_145","select-menu-item-first":"_select-menu-item-first_zbo6w_158",selected:mv,"overflow-tooltip-container":"_overflow-tooltip-container_zbo6w_167","overflow-tooltip-text":"_overflow-tooltip-text_zbo6w_172","empty-block":"_empty-block_zbo6w_179"};function tu({value:e,onChange:t,multiple:n=!1,returnedValue:o,renderItem:i,renderInputItem:s,renderSingleInputItem:r,renderMultipleInputItem:a,renderDropdownItem:l,placeholder:u,items:c=[],fullWidth:f,size:d="md",showDefaultItem:h,disabled:m,label:g,firstItem:y,lastItem:v,observer:x,emptyText:p,onBlur:S,prompt:b,error:P,errorText:V}){const[M,D]=Jt(e,n?[]:null),[k,j]=C.useState(!1),{refs:N,floatingStyles:O}=eu({open:k,placement:"bottom-start",strategy:"fixed",middleware:[Xl(4),Zl({crossAxis:!0,fallbackAxisSideDirection:"start"}),Yl({crossAxis:!0,padding:8}),zp({apply({rects:$,availableHeight:Z,elements:se}){Object.assign(se.floating.style,{width:`${$.reference.width}px`,maxHeight:typeof Z=="number"?`${Z}px`:"auto"})}})],whileElementsMounted:Kl}),A=C.useMemo(()=>n?M||[]:M!=null?[M]:[],[M,n]),B=C.useCallback($=>o?o($):$,[o]),z=C.useMemo(()=>{const $=new Map;return c.forEach(Z=>{$.set(B(Z),Z)}),$},[c,B]),E=!c.length&&!P,R=C.useMemo(()=>A.map($=>z.get($)).filter($=>!!$),[z,A]);C.useEffect(()=>{process.env.NODE_ENV!=="production"&&i&&!l&&console.warn("[Select] `renderItem` deprecated, use `renderDropdownItem` instead.")},[l,i]);const T=C.useCallback(($,Z)=>l?l($,Z):i?i($):String($),[l,i]),L=()=>{j(!1),S?.()},Y=$=>{const Z=B($);if(n){const se=A.includes(Z)?A.filter(ae=>ae!==Z):[...A,Z];D(se),t?.(se)}else D(Z),t?.(Z),L()},U=$=>{if(!n)return;const Z=A.filter(se=>se!==$);D(Z),t?.(Z)},q=()=>{const $=n?[]:null;D($),t?.($),n||L()},ge=()=>typeof u=="string"?w.jsx(K,{variant:d==="xs"?"caption-1":"body-2",textOverflow:"ellipsis",overflow:"hidden",colorName:"tertiary",children:u??"Select..."}):u,J=()=>{if(!A.length)return ge();if(n)return a?a(R):s?s({mode:"multiple",selectedItems:R}):w.jsx(I,{flexWrap:"wrap",row:!0,gap:10,children:A.map(se=>{const ae=z.get(se);return ae?w.jsx(Zi,{size:"sm",label:i?i(ae):String(se),onDelete:Ce=>{Ce.stopPropagation(),U(se)}},se):null})});const $=z.get(A[0])??null;if(!$)return ge();if(r)return r($);if(s)return s({mode:"single",selectedItem:$});const Z=i?i($):String(A[0]);return typeof Z=="string"?w.jsx(K,{variant:d==="xs"?"caption-1":"body-2",tag:"p",textOverflow:"ellipsis",overflow:"hidden",children:Z}):w.jsx(w.Fragment,{children:Z})},ie=k&&w.jsx(Kn,{children:w.jsx(I,{row:!0,top:0,right:0,bottom:0,left:0,position:"fixed",center:!0,flex:1,onClick:L,display:"block",backgroundColor:"transparent",zIndex:1,children:w.jsx(zn.div,{ref:N.setFloating,className:ue["select-dropdown"],initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{duration:.25,ease:"easeInOut"},style:{...O,zIndex:1},onMouseDown:$=>$.stopPropagation(),onClick:$=>$.stopPropagation(),children:w.jsxs("ul",{className:ue["select-menu"],children:[h&&!n&&w.jsx(I,{className:ue["select-menu-item"],role:"option",onClick:q,children:w.jsx(K,{variant:"body-2",colorName:"tertiary",children:u})}),y&&w.jsx(I,{className:F.cx(ue["select-menu-item"],ue["select-menu-item-first"]),children:y}),E&&w.jsxs(I,{className:ue["empty-block"],children:[w.jsx(I,{w:20,h:20,children:w.jsx(lv,{})}),w.jsx(K,{variant:"body-2",children:p??"There is nothing yet"})]}),c.map(($,Z)=>{const se=B($),ae=A.includes(se),Ce=T($,{item:$,selected:ae,index:Z}),et=typeof Ce=="string";return w.jsxs(I,{row:!0,gap:10,alignItems:"center",className:F.cx(ue["select-menu-item"],{[ue.selected]:ae}),role:"option",relative:!0,onClick:()=>Y($),children:[n&&w.jsx(Gi,{size:"sm",checked:ae}),et?w.jsx(K,{variant:"body-2",tag:"p",wordBreak:"break-all",whiteSpace:"break-spaces",children:Ce}):Ce,w.jsx(bt,{})]},se)}),x,v&&w.jsx(I,{className:F.cx(ue["select-menu-item"],ue["select-menu-item-first"]),children:v})]})},"dropdown")})});return w.jsxs(I,{relative:!0,display:"inline-block",minWidth:120,w:f?"full":"auto",onMouseDown:$=>$.stopPropagation(),onClick:$=>$.stopPropagation(),children:[typeof g=="string"?w.jsx(K,{variant:"body-2",colorName:"tertiary",fontWeight:"regular",mb:d==="sm"?4:8,children:g}):g,w.jsxs(I,{ref:N.setReference,row:!0,gap:10,tabIndex:m?-1:0,role:"button",alignItems:"flex-start","aria-haspopup":"listbox",relative:!0,w:"100%",className:F.cx(ue["select-input"],ue[`size-${d}`],{[ue.error]:P,[ue.disabled]:m,[ue.open]:k}),onClick:()=>!m&&j($=>!$),children:[w.jsx(I,{className:F.cx(ue["select-value"]),children:J()}),w.jsx(I,{className:F.cx(ue["select-arrow"],ue[`select-arrow_${d}`]),children:w.jsx(av,{})})]}),typeof b=="string"?w.jsx(K,{variant:"caption-1",colorName:"tertiary",mt:4,children:b}):b,P&&V&&w.jsx(K,{tag:"p",colorName:"negative",variant:"body-2",mt:5,children:V}),w.jsx(nf,{children:ie})]})}const pv=e=>_.createElement("svg",{width:10,height:10,viewBox:"0 0 10 10",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},_.createElement("path",{d:"M3.94629 0.220237C3.78013 0.264025 3.64089 0.377624 3.56348 0.53176C3.27371 1.11189 3.05664 1.46395 2.83887 1.74953C2.61807 2.03873 2.38547 2.27579 2.03027 2.63039C1.21079 3.45057 0.799805 4.52619 0.799805 5.60012C0.799838 6.67406 1.21073 7.74968 2.03027 8.56985C3.67062 10.2096 6.32931 10.2095 7.96973 8.56985C8.78929 7.74968 9.20016 6.67408 9.2002 5.60012C9.15131 4.32908 8.43217 3.48543 7.94727 3.05813C7.76902 2.90106 7.40643 3.02424 7.2627 3.2134C7.24031 3.24286 7.21612 3.2739 7.18945 3.30617C6.93211 3.61754 6.56236 3.80807 6.41504 3.83156C6.38264 3.83667 6.36979 3.76513 6.2959 3.58254C5.79455 2.34427 5.78927 2.49365 5.58887 2.01125C5.48847 1.7692 5.05517 1.02727 4.92676 0.828635C4.80206 0.635591 4.64095 0.439873 4.43359 0.301292C4.29028 0.205951 4.1124 0.175957 3.94629 0.220237ZM4.75293 4.17824C5.2689 4.63997 5.60857 5.26651 5.71484 5.95071C6.10631 5.85571 6.46727 5.68318 6.78125 5.45071C6.86578 5.70826 6.89338 5.98123 6.8623 6.25051C6.83115 6.51993 6.74174 6.77966 6.60059 7.01125C6.45944 7.24281 6.27008 7.44117 6.04492 7.59231C5.81977 7.74344 5.56462 7.8443 5.29688 7.88723C5.0292 7.93013 4.75518 7.91446 4.49414 7.84133C4.23299 7.76812 3.99064 7.6383 3.78418 7.46242C3.5778 7.28657 3.41161 7.06792 3.29785 6.8218C3.18419 6.57572 3.12519 6.30771 3.125 6.03664C3.12508 5.58233 3.29054 5.14308 3.58984 4.80129C3.88917 4.4597 4.30271 4.2382 4.75293 4.17824Z",fill:"#FEAD34"})),vv=e=>_.createElement("svg",{width:12,height:12,viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},_.createElement("path",{d:"M10.1483 8.61509C10.3344 8.26159 9.98299 7.89856 9.58534 7.93723C9.42671 7.95265 9.25857 7.9605 9.07422 7.96035C6.36522 7.9582 4.17129 5.76427 4.16914 3.05527C4.169 2.87115 4.17682 2.70321 4.19221 2.54477C4.23082 2.14712 3.86769 1.79411 3.50976 1.97161C2.03398 2.70343 1.20002 4.02274 1.20002 5.89477C1.20002 8.60377 3.3961 10.7998 6.1051 10.7998C7.97571 10.7998 9.38737 10.06 10.1483 8.61509Z",fill:"white"})),yv="_container_e7tan_8",wv="_disabled_e7tan_17",xv="_reverse_e7tan_21",Cv="_input_e7tan_25",Sv="_switchContainer_e7tan_35",_v="_variant_accent_e7tan_43",bv="_variant_secondary_e7tan_47",Rv="_thumb_e7tan_51",Ev="_variant_theme_e7tan_54",Mv="_moon_e7tan_58",Pv="_fire_e7tan_61",Tv="_size_sm_e7tan_74",Vv="_size_md_e7tan_80",Av="_size_lg_e7tan_86",Te={container:yv,disabled:wv,reverse:xv,input:Cv,switchContainer:Sv,variant_accent:_v,variant_secondary:bv,switch:"_switch_e7tan_35",thumb:Rv,variant_theme:Ev,moon:Mv,fire:Pv,size_sm:Tv,size_md:Vv,size_lg:Av},nu=C.forwardRef(({title:e,text:t,icon:n,disabled:o,onChange:i,checked:s,defaultValue:r,className:a,size:l="md",variant:u="accent",reverse:c=!1,w:f="auto",...d},h)=>{const[m,g]=Jt(s,r),y=C.useRef(null);C.useImperativeHandle(h,()=>({focus:()=>{y.current?.focus()},blur:()=>{y.current?.blur()},get checked(){return m??!1},setChecked:S=>{g(S),i?.(S)},toggle:()=>{const S=!m;g(S),i?.(S)},isFocused:()=>document.activeElement===y.current,isDisabled:()=>o??!1,getInputElement:()=>y.current,checkValidity:()=>y.current?.checkValidity()??!0,reset:()=>{const S=r??!1;g(S),i?.(S)}}),[m,g,i,o,r]);const v=C.useCallback(S=>{g(S.target.checked),i?.(S.target.checked)},[i]),x=C.useMemo(()=>typeof e=="string"?w.jsx(K,{variant:"body-1",colorName:"primary",fontWeight:"medium",children:e}):e,[e]),p=C.useMemo(()=>typeof t=="string"?w.jsx(K,{variant:"body-2",colorName:"secondary",fontWeight:"regular",children:t}):t,[t]);return w.jsxs(I,{row:!0,w:f,gap:"var(--spacing-sm)",children:[w.jsxs("label",{className:F.cx(Te.container,a,{[Te.disabled]:o,[Te.reverse]:c}),children:[w.jsxs(I,{className:F.cx(Te.switchContainer,Te[`size_${l}`],Te[`variant_${u}`]),children:[w.jsx("input",{ref:y,type:"checkbox",checked:m,className:Te.input,onChange:v,disabled:o,...d}),w.jsx("div",{className:Te.switch,children:w.jsx("div",{className:Te.thumb,children:u==="theme"&&w.jsxs(w.Fragment,{children:[w.jsx(vv,{className:Te.moon}),w.jsx(pv,{className:Te.fire})]})})})]}),w.jsxs(I,{gap:"var(--spacing-xs)",children:[x,p]})]}),n]})});nu.displayName="Switch";const Dv="_header_446to_8",kv={header:Dv},ou=C.forwardRef(({title:e,subtitle:t,w:n="full",p:o,py:i,px:s="var(--spacing-2xl)",pt:r="var(--spacing-2xl)",pb:a="var(--spacing-lg)",row:l=!0,justifyContent:u="space-between",showCloseButton:c=!0},f)=>{const{onClose:d}=Gu();return w.jsxs(I,{w:n,p:o,py:i,px:s,pt:r,pb:a,row:l,justifyContent:u,ref:f,className:kv.header,children:[w.jsxs(I,{gap:"var(--spacing-sm)",children:[w.jsx(K,{variant:"title-3",colorName:"primary",fontWeight:"semibold",children:e}),w.jsx(K,{variant:"body-1",colorName:"tertiary",fontWeight:"medium",children:t})]}),c&&w.jsx(I,{children:w.jsx(Wt,{onClick:d,color:"neutral",children:w.jsx(Zr,{})})})]})});ou.displayName="ModalHeader";function ct(e,t,n){let o=n.initialDeps??[],i;function s(){var r,a,l,u;let c;n.key&&((r=n.debug)!=null&&r.call(n))&&(c=Date.now());const f=e();if(!(f.length!==o.length||f.some((m,g)=>o[g]!==m)))return i;o=f;let h;if(n.key&&((a=n.debug)!=null&&a.call(n))&&(h=Date.now()),i=t(...f),n.key&&((l=n.debug)!=null&&l.call(n))){const m=Math.round((Date.now()-c)*100)/100,g=Math.round((Date.now()-h)*100)/100,y=g/16,v=(x,p)=>{for(x=String(x);x.length<p;)x=" "+x;return x};console.info(`%c⏱ ${v(g,5)} /${v(m,5)} ms`,`
14
+ font-size: .6rem;
15
+ font-weight: bold;
16
+ color: hsl(${Math.max(0,Math.min(120-120*y,120))}deg 100% 31%);`,n?.key)}return(u=n?.onChange)==null||u.call(n,i),i}return s.updateDeps=r=>{o=r},s}function Or(e,t){if(e===void 0)throw new Error("Unexpected undefined");return e}const Fv=(e,t)=>Math.abs(e-t)<1.01,Lv=(e,t,n)=>{let o;return function(...i){e.clearTimeout(o),o=e.setTimeout(()=>t.apply(this,i),n)}},zr=e=>{const{offsetWidth:t,offsetHeight:n}=e;return{width:t,height:n}},Iv=e=>e,$v=e=>{const t=Math.max(e.startIndex-e.overscan,0),n=Math.min(e.endIndex+e.overscan,e.count-1),o=[];for(let i=t;i<=n;i++)o.push(i);return o},jv=(e,t)=>{const n=e.scrollElement;if(!n)return;const o=e.targetWindow;if(!o)return;const i=r=>{const{width:a,height:l}=r;t({width:Math.round(a),height:Math.round(l)})};if(i(zr(n)),!o.ResizeObserver)return()=>{};const s=new o.ResizeObserver(r=>{const a=()=>{const l=r[0];if(l?.borderBoxSize){const u=l.borderBoxSize[0];if(u){i({width:u.inlineSize,height:u.blockSize});return}}i(zr(n))};e.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(a):a()});return s.observe(n,{box:"border-box"}),()=>{s.unobserve(n)}},Br={passive:!0},Nr=typeof window>"u"?!0:"onscrollend"in window,Ov=(e,t)=>{const n=e.scrollElement;if(!n)return;const o=e.targetWindow;if(!o)return;let i=0;const s=e.options.useScrollendEvent&&Nr?()=>{}:Lv(o,()=>{t(i,!1)},e.options.isScrollingResetDelay),r=c=>()=>{const{horizontal:f,isRtl:d}=e.options;i=f?n.scrollLeft*(d&&-1||1):n.scrollTop,s(),t(i,c)},a=r(!0),l=r(!1);l(),n.addEventListener("scroll",a,Br);const u=e.options.useScrollendEvent&&Nr;return u&&n.addEventListener("scrollend",l,Br),()=>{n.removeEventListener("scroll",a),u&&n.removeEventListener("scrollend",l)}},zv=(e,t,n)=>{if(t?.borderBoxSize){const o=t.borderBoxSize[0];if(o)return Math.round(o[n.options.horizontal?"inlineSize":"blockSize"])}return e[n.options.horizontal?"offsetWidth":"offsetHeight"]},Bv=(e,{adjustments:t=0,behavior:n},o)=>{var i,s;const r=e+t;(s=(i=o.scrollElement)==null?void 0:i.scrollTo)==null||s.call(i,{[o.options.horizontal?"left":"top"]:r,behavior:n})};class Nv{constructor(t){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.measurementsCache=[],this.itemSizeCache=new Map,this.pendingMeasuredCacheIndexes=[],this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this.elementsCache=new Map,this.observer=(()=>{let n=null;const o=()=>n||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:n=new this.targetWindow.ResizeObserver(i=>{i.forEach(s=>{const r=()=>{this._measureElement(s.target,s)};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(r):r()})}));return{disconnect:()=>{var i;(i=o())==null||i.disconnect(),n=null},observe:i=>{var s;return(s=o())==null?void 0:s.observe(i,{box:"border-box"})},unobserve:i=>{var s;return(s=o())==null?void 0:s.unobserve(i)}}})(),this.range=null,this.setOptions=n=>{Object.entries(n).forEach(([o,i])=>{typeof i>"u"&&delete n[o]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:Iv,rangeExtractor:$v,onChange:()=>{},measureElement:zv,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!1,useAnimationFrameWithResizeObserver:!1,...n}},this.notify=n=>{var o,i;(i=(o=this.options).onChange)==null||i.call(o,this,n)},this.maybeNotify=ct(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),n=>{this.notify(n)},{key:process.env.NODE_ENV!=="production"&&"maybeNotify",debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(n=>n()),this.unsubs=[],this.observer.disconnect(),this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var n;const o=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==o){if(this.cleanup(),!o){this.maybeNotify();return}this.scrollElement=o,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=((n=this.scrollElement)==null?void 0:n.window)??null,this.elementsCache.forEach(i=>{this.observer.observe(i)}),this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0}),this.unsubs.push(this.options.observeElementRect(this,i=>{this.scrollRect=i,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(i,s)=>{this.scrollAdjustments=0,this.scrollDirection=s?this.getScrollOffset()<i?"forward":"backward":null,this.scrollOffset=i,this.isScrolling=s,this.maybeNotify()}))}},this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??(typeof this.options.initialOffset=="function"?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getFurthestMeasurement=(n,o)=>{const i=new Map,s=new Map;for(let r=o-1;r>=0;r--){const a=n[r];if(i.has(a.lane))continue;const l=s.get(a.lane);if(l==null||a.end>l.end?s.set(a.lane,a):a.end<l.end&&i.set(a.lane,!0),i.size===this.options.lanes)break}return s.size===this.options.lanes?Array.from(s.values()).sort((r,a)=>r.end===a.end?r.index-a.index:r.end-a.end)[0]:void 0},this.getMeasurementOptions=ct(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled],(n,o,i,s,r)=>(this.pendingMeasuredCacheIndexes=[],{count:n,paddingStart:o,scrollMargin:i,getItemKey:s,enabled:r}),{key:!1}),this.getMeasurements=ct(()=>[this.getMeasurementOptions(),this.itemSizeCache],({count:n,paddingStart:o,scrollMargin:i,getItemKey:s,enabled:r},a)=>{if(!r)return this.measurementsCache=[],this.itemSizeCache.clear(),[];this.measurementsCache.length===0&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(c=>{this.itemSizeCache.set(c.key,c.size)}));const l=this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[];const u=this.measurementsCache.slice(0,l);for(let c=l;c<n;c++){const f=s(c),d=this.options.lanes===1?u[c-1]:this.getFurthestMeasurement(u,c),h=d?d.end+this.options.gap:o+i,m=a.get(f),g=typeof m=="number"?m:this.options.estimateSize(c),y=h+g,v=d?d.lane:c%this.options.lanes;u[c]={index:c,start:h,size:g,end:y,key:f,lane:v}}return this.measurementsCache=u,u},{key:process.env.NODE_ENV!=="production"&&"getMeasurements",debug:()=>this.options.debug}),this.calculateRange=ct(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(n,o,i,s)=>this.range=n.length>0&&o>0?Hv({measurements:n,outerSize:o,scrollOffset:i,lanes:s}):null,{key:process.env.NODE_ENV!=="production"&&"calculateRange",debug:()=>this.options.debug}),this.getVirtualIndexes=ct(()=>{let n=null,o=null;const i=this.calculateRange();return i&&(n=i.startIndex,o=i.endIndex),this.maybeNotify.updateDeps([this.isScrolling,n,o]),[this.options.rangeExtractor,this.options.overscan,this.options.count,n,o]},(n,o,i,s,r)=>s===null||r===null?[]:n({startIndex:s,endIndex:r,overscan:o,count:i}),{key:process.env.NODE_ENV!=="production"&&"getVirtualIndexes",debug:()=>this.options.debug}),this.indexFromElement=n=>{const o=this.options.indexAttribute,i=n.getAttribute(o);return i?parseInt(i,10):(console.warn(`Missing attribute name '${o}={index}' on measured element.`),-1)},this._measureElement=(n,o)=>{const i=this.indexFromElement(n),s=this.measurementsCache[i];if(!s)return;const r=s.key,a=this.elementsCache.get(r);a!==n&&(a&&this.observer.unobserve(a),this.observer.observe(n),this.elementsCache.set(r,n)),n.isConnected&&this.resizeItem(i,this.options.measureElement(n,o,this))},this.resizeItem=(n,o)=>{const i=this.measurementsCache[n];if(!i)return;const s=this.itemSizeCache.get(i.key)??i.size,r=o-s;r!==0&&((this.shouldAdjustScrollPositionOnItemSizeChange!==void 0?this.shouldAdjustScrollPositionOnItemSizeChange(i,r,this):i.start<this.getScrollOffset()+this.scrollAdjustments)&&(process.env.NODE_ENV!=="production"&&this.options.debug&&console.info("correction",r),this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=r,behavior:void 0})),this.pendingMeasuredCacheIndexes.push(i.index),this.itemSizeCache=new Map(this.itemSizeCache.set(i.key,o)),this.notify(!1))},this.measureElement=n=>{if(!n){this.elementsCache.forEach((o,i)=>{o.isConnected||(this.observer.unobserve(o),this.elementsCache.delete(i))});return}this._measureElement(n,void 0)},this.getVirtualItems=ct(()=>[this.getVirtualIndexes(),this.getMeasurements()],(n,o)=>{const i=[];for(let s=0,r=n.length;s<r;s++){const a=n[s],l=o[a];i.push(l)}return i},{key:process.env.NODE_ENV!=="production"&&"getVirtualItems",debug:()=>this.options.debug}),this.getVirtualItemForOffset=n=>{const o=this.getMeasurements();if(o.length!==0)return Or(o[iu(0,o.length-1,i=>Or(o[i]).start,n)])},this.getOffsetForAlignment=(n,o,i=0)=>{const s=this.getSize(),r=this.getScrollOffset();o==="auto"&&(o=n>=r+s?"end":"start"),o==="center"?n+=(i-s)/2:o==="end"&&(n-=s);const a=this.getTotalSize()+this.options.scrollMargin-s;return Math.max(Math.min(a,n),0)},this.getOffsetForIndex=(n,o="auto")=>{n=Math.max(0,Math.min(n,this.options.count-1));const i=this.measurementsCache[n];if(!i)return;const s=this.getSize(),r=this.getScrollOffset();if(o==="auto")if(i.end>=r+s-this.options.scrollPaddingEnd)o="end";else if(i.start<=r+this.options.scrollPaddingStart)o="start";else return[r,o];const a=o==="end"?i.end+this.options.scrollPaddingEnd:i.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(a,o,i.size),o]},this.isDynamicMode=()=>this.elementsCache.size>0,this.scrollToOffset=(n,{align:o="start",behavior:i}={})=>{i==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getOffsetForAlignment(n,o),{adjustments:void 0,behavior:i})},this.scrollToIndex=(n,{align:o="auto",behavior:i}={})=>{i==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),n=Math.max(0,Math.min(n,this.options.count-1));let s=0;const r=10,a=u=>{if(!this.targetWindow)return;const c=this.getOffsetForIndex(n,u);if(!c){console.warn("Failed to get offset for index:",n);return}const[f,d]=c;this._scrollToOffset(f,{adjustments:void 0,behavior:i}),this.targetWindow.requestAnimationFrame(()=>{const h=this.getScrollOffset(),m=this.getOffsetForIndex(n,d);if(!m){console.warn("Failed to get offset for index:",n);return}Fv(m[0],h)||l(d)})},l=u=>{this.targetWindow&&(s++,s<r?(process.env.NODE_ENV!=="production"&&this.options.debug&&console.info("Schedule retry",s,r),this.targetWindow.requestAnimationFrame(()=>a(u))):console.warn(`Failed to scroll to index ${n} after ${r} attempts.`))};a(o)},this.scrollBy=(n,{behavior:o}={})=>{o==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getScrollOffset()+n,{adjustments:void 0,behavior:o})},this.getTotalSize=()=>{var n;const o=this.getMeasurements();let i;if(o.length===0)i=this.options.paddingStart;else if(this.options.lanes===1)i=((n=o[o.length-1])==null?void 0:n.end)??0;else{const s=Array(this.options.lanes).fill(null);let r=o.length-1;for(;r>=0&&s.some(a=>a===null);){const a=o[r];s[a.lane]===null&&(s[a.lane]=a.end),r--}i=Math.max(...s.filter(a=>a!==null))}return Math.max(i-this.options.scrollMargin+this.options.paddingEnd,0)},this._scrollToOffset=(n,{adjustments:o,behavior:i})=>{this.options.scrollToFn(n,{behavior:i,adjustments:o},this)},this.measure=()=>{this.itemSizeCache=new Map,this.notify(!1)},this.setOptions(t)}}const iu=(e,t,n,o)=>{for(;e<=t;){const i=(e+t)/2|0,s=n(i);if(s<o)e=i+1;else if(s>o)t=i-1;else return i}return e>0?e-1:0};function Hv({measurements:e,outerSize:t,scrollOffset:n,lanes:o}){const i=e.length-1,s=l=>e[l].start;if(e.length<=o)return{startIndex:0,endIndex:i};let r=iu(0,i,s,n),a=r;if(o===1)for(;a<i&&e[a].end<n+t;)a++;else if(o>1){const l=Array(o).fill(0);for(;a<i&&l.some(c=>c<n+t);){const c=e[a];l[c.lane]=c.end,a++}const u=Array(o).fill(n+t);for(;r>=0&&u.some(c=>c>=n);){const c=e[r];u[c.lane]=c.start,r--}r=Math.max(0,r-r%o),a=Math.min(i,a+(o-1-a%o))}return{startIndex:r,endIndex:a}}const Hr=typeof document<"u"?_.useLayoutEffect:_.useEffect;function Wv(e){const t=_.useReducer(()=>({}),{})[1],n={...e,onChange:(i,s)=>{var r;s?ci.flushSync(t):t(),(r=e.onChange)==null||r.call(e,i,s)}},[o]=_.useState(()=>new Nv(n));return o.setOptions(n),Hr(()=>o._didMount(),[]),Hr(()=>o._willUpdate()),o}function Gv(e){return Wv({observeElementRect:jv,observeElementOffset:Ov,scrollToFn:Bv,...e})}const Uv="_main_1qx2l_8",Wr={main:Uv},su=C.forwardRef(({children:e,className:t,row:n=!1,estimatedItemHeight:o=100,virtualize:i=!1,maxHeight:s=448},r)=>{const a=C.useRef(null),l=C.useMemo(()=>C.Children.toArray(e),[e]),u=Gv({count:l.length,getScrollElement:()=>a.current,estimateSize:()=>o,measureElement:f=>f.getBoundingClientRect().height});return C.useImperativeHandle(r,()=>({scrollToTop:()=>u.scrollToOffset(0,{behavior:"smooth"}),scrollToBottom:()=>u.scrollToOffset(u.getTotalSize(),{behavior:"smooth"}),scrollToIndex:(f,d={})=>u.scrollToIndex(f,{behavior:"smooth",...d}),scrollToOffset:(f,d={})=>u.scrollToOffset(f,{behavior:"smooth",...d}),scrollBy:f=>{const d=u.scrollOffset||0;u.scrollToOffset(d+f,{behavior:"smooth"})},getElement:()=>a.current,getScrollOffset:()=>u.scrollOffset||0,getTotalSize:()=>u.getTotalSize()}),[u]),C.useMemo(()=>i||l.length>50,[i,l])&&l.length>0?w.jsx(I,{ref:a,row:n,maxHeight:s,className:F.cx(Wr.main,t),w:"full",p:"var(--spacing-2xl)",children:w.jsx(I,{relative:!0,h:u.getTotalSize(),children:u.getVirtualItems().map(f=>w.jsx(I,{"data-index":f.index,ref:u.measureElement,w:"full",absolute:!0,style:{top:0,left:0,transform:`translateY(${f.start}px)`},children:l[f.index]},f.key))})}):w.jsx(I,{ref:a,className:F.cx(Wr.main,t),w:"full",row:n,pl:"var(--spacing-2xl)",pr:"var(--spacing-xs)",children:w.jsx(I,{py:"var(--spacing-2xl)",pr:"var(--spacing-xl)",children:e})})});su.displayName="ModalMain";const Un=Qr;Un.Header=ou;Un.Main=su;Un.Footer=ea;const ru=C.createContext(null),Kv=()=>C.useContext(ru),Kn=({children:e})=>{const[t,n]=C.useState(null),o=Kv();return C.useEffect(()=>{if(typeof document>"u")return;const i=o?.current??document.body;if(!i)return;let s=i.querySelector("[data-portal-root]")??void 0;s||(s=document.createElement("div"),s.setAttribute("data-portal-root","true"),i.appendChild(s)),n(s)},[o]),t?ci.createPortal(e,t):null};/**
17
+ * table-core
18
+ *
19
+ * Copyright (c) TanStack
20
+ *
21
+ * This source code is licensed under the MIT license found in the
22
+ * LICENSE.md file in the root directory of this source tree.
23
+ *
24
+ * @license MIT
25
+ */function au(){return{accessor:(e,t)=>typeof e=="function"?{...t,accessorFn:e}:{...t,accessorKey:e},display:e=>e,group:e=>e}}function Ke(e,t){return typeof e=="function"?e(t):e}function xe(e,t){return n=>{t.setState(o=>({...o,[e]:Ke(n,o[e])}))}}function qn(e){return e instanceof Function}function qv(e){return Array.isArray(e)&&e.every(t=>typeof t=="number")}function Xv(e,t){const n=[],o=i=>{i.forEach(s=>{n.push(s);const r=t(s);r!=null&&r.length&&o(r)})};return o(e),n}function H(e,t,n){let o=[],i;return s=>{let r;n.key&&n.debug&&(r=Date.now());const a=e(s);if(!(a.length!==o.length||a.some((c,f)=>o[f]!==c)))return i;o=a;let u;if(n.key&&n.debug&&(u=Date.now()),i=t(...a),n==null||n.onChange==null||n.onChange(i),n.key&&n.debug&&n!=null&&n.debug()){const c=Math.round((Date.now()-r)*100)/100,f=Math.round((Date.now()-u)*100)/100,d=f/16,h=(m,g)=>{for(m=String(m);m.length<g;)m=" "+m;return m};console.info(`%c⏱ ${h(f,5)} /${h(c,5)} ms`,`
26
+ font-size: .6rem;
27
+ font-weight: bold;
28
+ color: hsl(${Math.max(0,Math.min(120-120*d,120))}deg 100% 31%);`,n?.key)}return i}}function W(e,t,n,o){return{debug:()=>{var i;return(i=e?.debugAll)!=null?i:e[t]},key:process.env.NODE_ENV==="development"&&n,onChange:o}}function Yv(e,t,n,o){const i=()=>{var r;return(r=s.getValue())!=null?r:e.options.renderFallbackValue},s={id:`${t.id}_${n.id}`,row:t,column:n,getValue:()=>t.getValue(o),renderValue:i,getContext:H(()=>[e,n,t,s],(r,a,l,u)=>({table:r,column:a,row:l,cell:u,getValue:u.getValue,renderValue:u.renderValue}),W(e.options,"debugCells","cell.getContext"))};return e._features.forEach(r=>{r.createCell==null||r.createCell(s,n,t,e)},{}),s}function Zv(e,t,n,o){var i,s;const a={...e._getDefaultColumnDef(),...t},l=a.accessorKey;let u=(i=(s=a.id)!=null?s:l?typeof String.prototype.replaceAll=="function"?l.replaceAll(".","_"):l.replace(/\./g,"_"):void 0)!=null?i:typeof a.header=="string"?a.header:void 0,c;if(a.accessorFn?c=a.accessorFn:l&&(l.includes(".")?c=d=>{let h=d;for(const g of l.split(".")){var m;h=(m=h)==null?void 0:m[g],process.env.NODE_ENV!=="production"&&h===void 0&&console.warn(`"${g}" in deeply nested key "${l}" returned undefined.`)}return h}:c=d=>d[a.accessorKey]),!u)throw process.env.NODE_ENV!=="production"?new Error(a.accessorFn?"Columns require an id when using an accessorFn":"Columns require an id when using a non-string header"):new Error;let f={id:`${String(u)}`,accessorFn:c,parent:o,depth:n,columnDef:a,columns:[],getFlatColumns:H(()=>[!0],()=>{var d;return[f,...(d=f.columns)==null?void 0:d.flatMap(h=>h.getFlatColumns())]},W(e.options,"debugColumns","column.getFlatColumns")),getLeafColumns:H(()=>[e._getOrderColumnsFn()],d=>{var h;if((h=f.columns)!=null&&h.length){let m=f.columns.flatMap(g=>g.getLeafColumns());return d(m)}return[f]},W(e.options,"debugColumns","column.getLeafColumns"))};for(const d of e._features)d.createColumn==null||d.createColumn(f,e);return f}const de="debugHeaders";function Gr(e,t,n){var o;let s={id:(o=n.id)!=null?o:t.id,column:t,index:n.index,isPlaceholder:!!n.isPlaceholder,placeholderId:n.placeholderId,depth:n.depth,subHeaders:[],colSpan:0,rowSpan:0,headerGroup:null,getLeafHeaders:()=>{const r=[],a=l=>{l.subHeaders&&l.subHeaders.length&&l.subHeaders.map(a),r.push(l)};return a(s),r},getContext:()=>({table:e,header:s,column:t})};return e._features.forEach(r=>{r.createHeader==null||r.createHeader(s,e)}),s}const Jv={createTable:e=>{e.getHeaderGroups=H(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,o,i)=>{var s,r;const a=(s=o?.map(f=>n.find(d=>d.id===f)).filter(Boolean))!=null?s:[],l=(r=i?.map(f=>n.find(d=>d.id===f)).filter(Boolean))!=null?r:[],u=n.filter(f=>!(o!=null&&o.includes(f.id))&&!(i!=null&&i.includes(f.id)));return mn(t,[...a,...u,...l],e)},W(e.options,de,"getHeaderGroups")),e.getCenterHeaderGroups=H(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,o,i)=>(n=n.filter(s=>!(o!=null&&o.includes(s.id))&&!(i!=null&&i.includes(s.id))),mn(t,n,e,"center")),W(e.options,de,"getCenterHeaderGroups")),e.getLeftHeaderGroups=H(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left],(t,n,o)=>{var i;const s=(i=o?.map(r=>n.find(a=>a.id===r)).filter(Boolean))!=null?i:[];return mn(t,s,e,"left")},W(e.options,de,"getLeftHeaderGroups")),e.getRightHeaderGroups=H(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.right],(t,n,o)=>{var i;const s=(i=o?.map(r=>n.find(a=>a.id===r)).filter(Boolean))!=null?i:[];return mn(t,s,e,"right")},W(e.options,de,"getRightHeaderGroups")),e.getFooterGroups=H(()=>[e.getHeaderGroups()],t=>[...t].reverse(),W(e.options,de,"getFooterGroups")),e.getLeftFooterGroups=H(()=>[e.getLeftHeaderGroups()],t=>[...t].reverse(),W(e.options,de,"getLeftFooterGroups")),e.getCenterFooterGroups=H(()=>[e.getCenterHeaderGroups()],t=>[...t].reverse(),W(e.options,de,"getCenterFooterGroups")),e.getRightFooterGroups=H(()=>[e.getRightHeaderGroups()],t=>[...t].reverse(),W(e.options,de,"getRightFooterGroups")),e.getFlatHeaders=H(()=>[e.getHeaderGroups()],t=>t.map(n=>n.headers).flat(),W(e.options,de,"getFlatHeaders")),e.getLeftFlatHeaders=H(()=>[e.getLeftHeaderGroups()],t=>t.map(n=>n.headers).flat(),W(e.options,de,"getLeftFlatHeaders")),e.getCenterFlatHeaders=H(()=>[e.getCenterHeaderGroups()],t=>t.map(n=>n.headers).flat(),W(e.options,de,"getCenterFlatHeaders")),e.getRightFlatHeaders=H(()=>[e.getRightHeaderGroups()],t=>t.map(n=>n.headers).flat(),W(e.options,de,"getRightFlatHeaders")),e.getCenterLeafHeaders=H(()=>[e.getCenterFlatHeaders()],t=>t.filter(n=>{var o;return!((o=n.subHeaders)!=null&&o.length)}),W(e.options,de,"getCenterLeafHeaders")),e.getLeftLeafHeaders=H(()=>[e.getLeftFlatHeaders()],t=>t.filter(n=>{var o;return!((o=n.subHeaders)!=null&&o.length)}),W(e.options,de,"getLeftLeafHeaders")),e.getRightLeafHeaders=H(()=>[e.getRightFlatHeaders()],t=>t.filter(n=>{var o;return!((o=n.subHeaders)!=null&&o.length)}),W(e.options,de,"getRightLeafHeaders")),e.getLeafHeaders=H(()=>[e.getLeftHeaderGroups(),e.getCenterHeaderGroups(),e.getRightHeaderGroups()],(t,n,o)=>{var i,s,r,a,l,u;return[...(i=(s=t[0])==null?void 0:s.headers)!=null?i:[],...(r=(a=n[0])==null?void 0:a.headers)!=null?r:[],...(l=(u=o[0])==null?void 0:u.headers)!=null?l:[]].map(c=>c.getLeafHeaders()).flat()},W(e.options,de,"getLeafHeaders"))}};function mn(e,t,n,o){var i,s;let r=0;const a=function(d,h){h===void 0&&(h=1),r=Math.max(r,h),d.filter(m=>m.getIsVisible()).forEach(m=>{var g;(g=m.columns)!=null&&g.length&&a(m.columns,h+1)},0)};a(e);let l=[];const u=(d,h)=>{const m={depth:h,id:[o,`${h}`].filter(Boolean).join("_"),headers:[]},g=[];d.forEach(y=>{const v=[...g].reverse()[0],x=y.column.depth===m.depth;let p,S=!1;if(x&&y.column.parent?p=y.column.parent:(p=y.column,S=!0),v&&v?.column===p)v.subHeaders.push(y);else{const b=Gr(n,p,{id:[o,h,p.id,y?.id].filter(Boolean).join("_"),isPlaceholder:S,placeholderId:S?`${g.filter(P=>P.column===p).length}`:void 0,depth:h,index:g.length});b.subHeaders.push(y),g.push(b)}m.headers.push(y),y.headerGroup=m}),l.push(m),h>0&&u(g,h-1)},c=t.map((d,h)=>Gr(n,d,{depth:r,index:h}));u(c,r-1),l.reverse();const f=d=>d.filter(m=>m.column.getIsVisible()).map(m=>{let g=0,y=0,v=[0];m.subHeaders&&m.subHeaders.length?(v=[],f(m.subHeaders).forEach(p=>{let{colSpan:S,rowSpan:b}=p;g+=S,v.push(b)})):g=1;const x=Math.min(...v);return y=y+x,m.colSpan=g,m.rowSpan=y,{colSpan:g,rowSpan:y}});return f((i=(s=l[0])==null?void 0:s.headers)!=null?i:[]),l}const Qv=(e,t,n,o,i,s,r)=>{let a={id:t,index:o,original:n,depth:i,parentId:r,_valuesCache:{},_uniqueValuesCache:{},getValue:l=>{if(a._valuesCache.hasOwnProperty(l))return a._valuesCache[l];const u=e.getColumn(l);if(u!=null&&u.accessorFn)return a._valuesCache[l]=u.accessorFn(a.original,o),a._valuesCache[l]},getUniqueValues:l=>{if(a._uniqueValuesCache.hasOwnProperty(l))return a._uniqueValuesCache[l];const u=e.getColumn(l);if(u!=null&&u.accessorFn)return u.columnDef.getUniqueValues?(a._uniqueValuesCache[l]=u.columnDef.getUniqueValues(a.original,o),a._uniqueValuesCache[l]):(a._uniqueValuesCache[l]=[a.getValue(l)],a._uniqueValuesCache[l])},renderValue:l=>{var u;return(u=a.getValue(l))!=null?u:e.options.renderFallbackValue},subRows:[],getLeafRows:()=>Xv(a.subRows,l=>l.subRows),getParentRow:()=>a.parentId?e.getRow(a.parentId,!0):void 0,getParentRows:()=>{let l=[],u=a;for(;;){const c=u.getParentRow();if(!c)break;l.push(c),u=c}return l.reverse()},getAllCells:H(()=>[e.getAllLeafColumns()],l=>l.map(u=>Yv(e,a,u,u.id)),W(e.options,"debugRows","getAllCells")),_getAllCellsByColumnId:H(()=>[a.getAllCells()],l=>l.reduce((u,c)=>(u[c.column.id]=c,u),{}),W(e.options,"debugRows","getAllCellsByColumnId"))};for(let l=0;l<e._features.length;l++){const u=e._features[l];u==null||u.createRow==null||u.createRow(a,e)}return a},ey={createColumn:(e,t)=>{e._getFacetedRowModel=t.options.getFacetedRowModel&&t.options.getFacetedRowModel(t,e.id),e.getFacetedRowModel=()=>e._getFacetedRowModel?e._getFacetedRowModel():t.getPreFilteredRowModel(),e._getFacetedUniqueValues=t.options.getFacetedUniqueValues&&t.options.getFacetedUniqueValues(t,e.id),e.getFacetedUniqueValues=()=>e._getFacetedUniqueValues?e._getFacetedUniqueValues():new Map,e._getFacetedMinMaxValues=t.options.getFacetedMinMaxValues&&t.options.getFacetedMinMaxValues(t,e.id),e.getFacetedMinMaxValues=()=>{if(e._getFacetedMinMaxValues)return e._getFacetedMinMaxValues()}}},lu=(e,t,n)=>{var o,i;const s=n==null||(o=n.toString())==null?void 0:o.toLowerCase();return!!(!((i=e.getValue(t))==null||(i=i.toString())==null||(i=i.toLowerCase())==null)&&i.includes(s))};lu.autoRemove=e=>De(e);const uu=(e,t,n)=>{var o;return!!(!((o=e.getValue(t))==null||(o=o.toString())==null)&&o.includes(n))};uu.autoRemove=e=>De(e);const cu=(e,t,n)=>{var o;return((o=e.getValue(t))==null||(o=o.toString())==null?void 0:o.toLowerCase())===n?.toLowerCase()};cu.autoRemove=e=>De(e);const du=(e,t,n)=>{var o;return(o=e.getValue(t))==null?void 0:o.includes(n)};du.autoRemove=e=>De(e);const fu=(e,t,n)=>!n.some(o=>{var i;return!((i=e.getValue(t))!=null&&i.includes(o))});fu.autoRemove=e=>De(e)||!(e!=null&&e.length);const hu=(e,t,n)=>n.some(o=>{var i;return(i=e.getValue(t))==null?void 0:i.includes(o)});hu.autoRemove=e=>De(e)||!(e!=null&&e.length);const gu=(e,t,n)=>e.getValue(t)===n;gu.autoRemove=e=>De(e);const mu=(e,t,n)=>e.getValue(t)==n;mu.autoRemove=e=>De(e);const Ji=(e,t,n)=>{let[o,i]=n;const s=e.getValue(t);return s>=o&&s<=i};Ji.resolveFilterValue=e=>{let[t,n]=e,o=typeof t!="number"?parseFloat(t):t,i=typeof n!="number"?parseFloat(n):n,s=t===null||Number.isNaN(o)?-1/0:o,r=n===null||Number.isNaN(i)?1/0:i;if(s>r){const a=s;s=r,r=a}return[s,r]};Ji.autoRemove=e=>De(e)||De(e[0])&&De(e[1]);const je={includesString:lu,includesStringSensitive:uu,equalsString:cu,arrIncludes:du,arrIncludesAll:fu,arrIncludesSome:hu,equals:gu,weakEquals:mu,inNumberRange:Ji};function De(e){return e==null||e===""}const ty={getDefaultColumnDef:()=>({filterFn:"auto"}),getInitialState:e=>({columnFilters:[],...e}),getDefaultOptions:e=>({onColumnFiltersChange:xe("columnFilters",e),filterFromLeafRows:!1,maxLeafRowFilterDepth:100}),createColumn:(e,t)=>{e.getAutoFilterFn=()=>{const n=t.getCoreRowModel().flatRows[0],o=n?.getValue(e.id);return typeof o=="string"?je.includesString:typeof o=="number"?je.inNumberRange:typeof o=="boolean"||o!==null&&typeof o=="object"?je.equals:Array.isArray(o)?je.arrIncludes:je.weakEquals},e.getFilterFn=()=>{var n,o;return qn(e.columnDef.filterFn)?e.columnDef.filterFn:e.columnDef.filterFn==="auto"?e.getAutoFilterFn():(n=(o=t.options.filterFns)==null?void 0:o[e.columnDef.filterFn])!=null?n:je[e.columnDef.filterFn]},e.getCanFilter=()=>{var n,o,i;return((n=e.columnDef.enableColumnFilter)!=null?n:!0)&&((o=t.options.enableColumnFilters)!=null?o:!0)&&((i=t.options.enableFilters)!=null?i:!0)&&!!e.accessorFn},e.getIsFiltered=()=>e.getFilterIndex()>-1,e.getFilterValue=()=>{var n;return(n=t.getState().columnFilters)==null||(n=n.find(o=>o.id===e.id))==null?void 0:n.value},e.getFilterIndex=()=>{var n,o;return(n=(o=t.getState().columnFilters)==null?void 0:o.findIndex(i=>i.id===e.id))!=null?n:-1},e.setFilterValue=n=>{t.setColumnFilters(o=>{const i=e.getFilterFn(),s=o?.find(c=>c.id===e.id),r=Ke(n,s?s.value:void 0);if(Ur(i,r,e)){var a;return(a=o?.filter(c=>c.id!==e.id))!=null?a:[]}const l={id:e.id,value:r};if(s){var u;return(u=o?.map(c=>c.id===e.id?l:c))!=null?u:[]}return o!=null&&o.length?[...o,l]:[l]})}},createRow:(e,t)=>{e.columnFilters={},e.columnFiltersMeta={}},createTable:e=>{e.setColumnFilters=t=>{const n=e.getAllLeafColumns(),o=i=>{var s;return(s=Ke(t,i))==null?void 0:s.filter(r=>{const a=n.find(l=>l.id===r.id);if(a){const l=a.getFilterFn();if(Ur(l,r.value,a))return!1}return!0})};e.options.onColumnFiltersChange==null||e.options.onColumnFiltersChange(o)},e.resetColumnFilters=t=>{var n,o;e.setColumnFilters(t?[]:(n=(o=e.initialState)==null?void 0:o.columnFilters)!=null?n:[])},e.getPreFilteredRowModel=()=>e.getCoreRowModel(),e.getFilteredRowModel=()=>(!e._getFilteredRowModel&&e.options.getFilteredRowModel&&(e._getFilteredRowModel=e.options.getFilteredRowModel(e)),e.options.manualFiltering||!e._getFilteredRowModel?e.getPreFilteredRowModel():e._getFilteredRowModel())}};function Ur(e,t,n){return(e&&e.autoRemove?e.autoRemove(t,n):!1)||typeof t>"u"||typeof t=="string"&&!t}const ny=(e,t,n)=>n.reduce((o,i)=>{const s=i.getValue(e);return o+(typeof s=="number"?s:0)},0),oy=(e,t,n)=>{let o;return n.forEach(i=>{const s=i.getValue(e);s!=null&&(o>s||o===void 0&&s>=s)&&(o=s)}),o},iy=(e,t,n)=>{let o;return n.forEach(i=>{const s=i.getValue(e);s!=null&&(o<s||o===void 0&&s>=s)&&(o=s)}),o},sy=(e,t,n)=>{let o,i;return n.forEach(s=>{const r=s.getValue(e);r!=null&&(o===void 0?r>=r&&(o=i=r):(o>r&&(o=r),i<r&&(i=r)))}),[o,i]},ry=(e,t)=>{let n=0,o=0;if(t.forEach(i=>{let s=i.getValue(e);s!=null&&(s=+s)>=s&&(++n,o+=s)}),n)return o/n},ay=(e,t)=>{if(!t.length)return;const n=t.map(s=>s.getValue(e));if(!qv(n))return;if(n.length===1)return n[0];const o=Math.floor(n.length/2),i=n.sort((s,r)=>s-r);return n.length%2!==0?i[o]:(i[o-1]+i[o])/2},ly=(e,t)=>Array.from(new Set(t.map(n=>n.getValue(e))).values()),uy=(e,t)=>new Set(t.map(n=>n.getValue(e))).size,cy=(e,t)=>t.length,bo={sum:ny,min:oy,max:iy,extent:sy,mean:ry,median:ay,unique:ly,uniqueCount:uy,count:cy},dy={getDefaultColumnDef:()=>({aggregatedCell:e=>{var t,n;return(t=(n=e.getValue())==null||n.toString==null?void 0:n.toString())!=null?t:null},aggregationFn:"auto"}),getInitialState:e=>({grouping:[],...e}),getDefaultOptions:e=>({onGroupingChange:xe("grouping",e),groupedColumnMode:"reorder"}),createColumn:(e,t)=>{e.toggleGrouping=()=>{t.setGrouping(n=>n!=null&&n.includes(e.id)?n.filter(o=>o!==e.id):[...n??[],e.id])},e.getCanGroup=()=>{var n,o;return((n=e.columnDef.enableGrouping)!=null?n:!0)&&((o=t.options.enableGrouping)!=null?o:!0)&&(!!e.accessorFn||!!e.columnDef.getGroupingValue)},e.getIsGrouped=()=>{var n;return(n=t.getState().grouping)==null?void 0:n.includes(e.id)},e.getGroupedIndex=()=>{var n;return(n=t.getState().grouping)==null?void 0:n.indexOf(e.id)},e.getToggleGroupingHandler=()=>{const n=e.getCanGroup();return()=>{n&&e.toggleGrouping()}},e.getAutoAggregationFn=()=>{const n=t.getCoreRowModel().flatRows[0],o=n?.getValue(e.id);if(typeof o=="number")return bo.sum;if(Object.prototype.toString.call(o)==="[object Date]")return bo.extent},e.getAggregationFn=()=>{var n,o;if(!e)throw new Error;return qn(e.columnDef.aggregationFn)?e.columnDef.aggregationFn:e.columnDef.aggregationFn==="auto"?e.getAutoAggregationFn():(n=(o=t.options.aggregationFns)==null?void 0:o[e.columnDef.aggregationFn])!=null?n:bo[e.columnDef.aggregationFn]}},createTable:e=>{e.setGrouping=t=>e.options.onGroupingChange==null?void 0:e.options.onGroupingChange(t),e.resetGrouping=t=>{var n,o;e.setGrouping(t?[]:(n=(o=e.initialState)==null?void 0:o.grouping)!=null?n:[])},e.getPreGroupedRowModel=()=>e.getFilteredRowModel(),e.getGroupedRowModel=()=>(!e._getGroupedRowModel&&e.options.getGroupedRowModel&&(e._getGroupedRowModel=e.options.getGroupedRowModel(e)),e.options.manualGrouping||!e._getGroupedRowModel?e.getPreGroupedRowModel():e._getGroupedRowModel())},createRow:(e,t)=>{e.getIsGrouped=()=>!!e.groupingColumnId,e.getGroupingValue=n=>{if(e._groupingValuesCache.hasOwnProperty(n))return e._groupingValuesCache[n];const o=t.getColumn(n);return o!=null&&o.columnDef.getGroupingValue?(e._groupingValuesCache[n]=o.columnDef.getGroupingValue(e.original),e._groupingValuesCache[n]):e.getValue(n)},e._groupingValuesCache={}},createCell:(e,t,n,o)=>{e.getIsGrouped=()=>t.getIsGrouped()&&t.id===n.groupingColumnId,e.getIsPlaceholder=()=>!e.getIsGrouped()&&t.getIsGrouped(),e.getIsAggregated=()=>{var i;return!e.getIsGrouped()&&!e.getIsPlaceholder()&&!!((i=n.subRows)!=null&&i.length)}}};function fy(e,t,n){if(!(t!=null&&t.length)||!n)return e;const o=e.filter(s=>!t.includes(s.id));return n==="remove"?o:[...t.map(s=>e.find(r=>r.id===s)).filter(Boolean),...o]}const hy={getInitialState:e=>({columnOrder:[],...e}),getDefaultOptions:e=>({onColumnOrderChange:xe("columnOrder",e)}),createColumn:(e,t)=>{e.getIndex=H(n=>[Nt(t,n)],n=>n.findIndex(o=>o.id===e.id),W(t.options,"debugColumns","getIndex")),e.getIsFirstColumn=n=>{var o;return((o=Nt(t,n)[0])==null?void 0:o.id)===e.id},e.getIsLastColumn=n=>{var o;const i=Nt(t,n);return((o=i[i.length-1])==null?void 0:o.id)===e.id}},createTable:e=>{e.setColumnOrder=t=>e.options.onColumnOrderChange==null?void 0:e.options.onColumnOrderChange(t),e.resetColumnOrder=t=>{var n;e.setColumnOrder(t?[]:(n=e.initialState.columnOrder)!=null?n:[])},e._getOrderColumnsFn=H(()=>[e.getState().columnOrder,e.getState().grouping,e.options.groupedColumnMode],(t,n,o)=>i=>{let s=[];if(!(t!=null&&t.length))s=i;else{const r=[...t],a=[...i];for(;a.length&&r.length;){const l=r.shift(),u=a.findIndex(c=>c.id===l);u>-1&&s.push(a.splice(u,1)[0])}s=[...s,...a]}return fy(s,n,o)},W(e.options,"debugTable","_getOrderColumnsFn"))}},Ro=()=>({left:[],right:[]}),gy={getInitialState:e=>({columnPinning:Ro(),...e}),getDefaultOptions:e=>({onColumnPinningChange:xe("columnPinning",e)}),createColumn:(e,t)=>{e.pin=n=>{const o=e.getLeafColumns().map(i=>i.id).filter(Boolean);t.setColumnPinning(i=>{var s,r;if(n==="right"){var a,l;return{left:((a=i?.left)!=null?a:[]).filter(f=>!(o!=null&&o.includes(f))),right:[...((l=i?.right)!=null?l:[]).filter(f=>!(o!=null&&o.includes(f))),...o]}}if(n==="left"){var u,c;return{left:[...((u=i?.left)!=null?u:[]).filter(f=>!(o!=null&&o.includes(f))),...o],right:((c=i?.right)!=null?c:[]).filter(f=>!(o!=null&&o.includes(f)))}}return{left:((s=i?.left)!=null?s:[]).filter(f=>!(o!=null&&o.includes(f))),right:((r=i?.right)!=null?r:[]).filter(f=>!(o!=null&&o.includes(f)))}})},e.getCanPin=()=>e.getLeafColumns().some(o=>{var i,s,r;return((i=o.columnDef.enablePinning)!=null?i:!0)&&((s=(r=t.options.enableColumnPinning)!=null?r:t.options.enablePinning)!=null?s:!0)}),e.getIsPinned=()=>{const n=e.getLeafColumns().map(a=>a.id),{left:o,right:i}=t.getState().columnPinning,s=n.some(a=>o?.includes(a)),r=n.some(a=>i?.includes(a));return s?"left":r?"right":!1},e.getPinnedIndex=()=>{var n,o;const i=e.getIsPinned();return i?(n=(o=t.getState().columnPinning)==null||(o=o[i])==null?void 0:o.indexOf(e.id))!=null?n:-1:0}},createRow:(e,t)=>{e.getCenterVisibleCells=H(()=>[e._getAllVisibleCells(),t.getState().columnPinning.left,t.getState().columnPinning.right],(n,o,i)=>{const s=[...o??[],...i??[]];return n.filter(r=>!s.includes(r.column.id))},W(t.options,"debugRows","getCenterVisibleCells")),e.getLeftVisibleCells=H(()=>[e._getAllVisibleCells(),t.getState().columnPinning.left],(n,o)=>(o??[]).map(s=>n.find(r=>r.column.id===s)).filter(Boolean).map(s=>({...s,position:"left"})),W(t.options,"debugRows","getLeftVisibleCells")),e.getRightVisibleCells=H(()=>[e._getAllVisibleCells(),t.getState().columnPinning.right],(n,o)=>(o??[]).map(s=>n.find(r=>r.column.id===s)).filter(Boolean).map(s=>({...s,position:"right"})),W(t.options,"debugRows","getRightVisibleCells"))},createTable:e=>{e.setColumnPinning=t=>e.options.onColumnPinningChange==null?void 0:e.options.onColumnPinningChange(t),e.resetColumnPinning=t=>{var n,o;return e.setColumnPinning(t?Ro():(n=(o=e.initialState)==null?void 0:o.columnPinning)!=null?n:Ro())},e.getIsSomeColumnsPinned=t=>{var n;const o=e.getState().columnPinning;if(!t){var i,s;return!!((i=o.left)!=null&&i.length||(s=o.right)!=null&&s.length)}return!!((n=o[t])!=null&&n.length)},e.getLeftLeafColumns=H(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left],(t,n)=>(n??[]).map(o=>t.find(i=>i.id===o)).filter(Boolean),W(e.options,"debugColumns","getLeftLeafColumns")),e.getRightLeafColumns=H(()=>[e.getAllLeafColumns(),e.getState().columnPinning.right],(t,n)=>(n??[]).map(o=>t.find(i=>i.id===o)).filter(Boolean),W(e.options,"debugColumns","getRightLeafColumns")),e.getCenterLeafColumns=H(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,o)=>{const i=[...n??[],...o??[]];return t.filter(s=>!i.includes(s.id))},W(e.options,"debugColumns","getCenterLeafColumns"))}};function my(e){return e||(typeof document<"u"?document:null)}const pn={size:150,minSize:20,maxSize:Number.MAX_SAFE_INTEGER},Eo=()=>({startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]}),py={getDefaultColumnDef:()=>pn,getInitialState:e=>({columnSizing:{},columnSizingInfo:Eo(),...e}),getDefaultOptions:e=>({columnResizeMode:"onEnd",columnResizeDirection:"ltr",onColumnSizingChange:xe("columnSizing",e),onColumnSizingInfoChange:xe("columnSizingInfo",e)}),createColumn:(e,t)=>{e.getSize=()=>{var n,o,i;const s=t.getState().columnSizing[e.id];return Math.min(Math.max((n=e.columnDef.minSize)!=null?n:pn.minSize,(o=s??e.columnDef.size)!=null?o:pn.size),(i=e.columnDef.maxSize)!=null?i:pn.maxSize)},e.getStart=H(n=>[n,Nt(t,n),t.getState().columnSizing],(n,o)=>o.slice(0,e.getIndex(n)).reduce((i,s)=>i+s.getSize(),0),W(t.options,"debugColumns","getStart")),e.getAfter=H(n=>[n,Nt(t,n),t.getState().columnSizing],(n,o)=>o.slice(e.getIndex(n)+1).reduce((i,s)=>i+s.getSize(),0),W(t.options,"debugColumns","getAfter")),e.resetSize=()=>{t.setColumnSizing(n=>{let{[e.id]:o,...i}=n;return i})},e.getCanResize=()=>{var n,o;return((n=e.columnDef.enableResizing)!=null?n:!0)&&((o=t.options.enableColumnResizing)!=null?o:!0)},e.getIsResizing=()=>t.getState().columnSizingInfo.isResizingColumn===e.id},createHeader:(e,t)=>{e.getSize=()=>{let n=0;const o=i=>{if(i.subHeaders.length)i.subHeaders.forEach(o);else{var s;n+=(s=i.column.getSize())!=null?s:0}};return o(e),n},e.getStart=()=>{if(e.index>0){const n=e.headerGroup.headers[e.index-1];return n.getStart()+n.getSize()}return 0},e.getResizeHandler=n=>{const o=t.getColumn(e.column.id),i=o?.getCanResize();return s=>{if(!o||!i||(s.persist==null||s.persist(),Mo(s)&&s.touches&&s.touches.length>1))return;const r=e.getSize(),a=e?e.getLeafHeaders().map(v=>[v.column.id,v.column.getSize()]):[[o.id,o.getSize()]],l=Mo(s)?Math.round(s.touches[0].clientX):s.clientX,u={},c=(v,x)=>{typeof x=="number"&&(t.setColumnSizingInfo(p=>{var S,b;const P=t.options.columnResizeDirection==="rtl"?-1:1,V=(x-((S=p?.startOffset)!=null?S:0))*P,M=Math.max(V/((b=p?.startSize)!=null?b:0),-.999999);return p.columnSizingStart.forEach(D=>{let[k,j]=D;u[k]=Math.round(Math.max(j+j*M,0)*100)/100}),{...p,deltaOffset:V,deltaPercentage:M}}),(t.options.columnResizeMode==="onChange"||v==="end")&&t.setColumnSizing(p=>({...p,...u})))},f=v=>c("move",v),d=v=>{c("end",v),t.setColumnSizingInfo(x=>({...x,isResizingColumn:!1,startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,columnSizingStart:[]}))},h=my(n),m={moveHandler:v=>f(v.clientX),upHandler:v=>{h?.removeEventListener("mousemove",m.moveHandler),h?.removeEventListener("mouseup",m.upHandler),d(v.clientX)}},g={moveHandler:v=>(v.cancelable&&(v.preventDefault(),v.stopPropagation()),f(v.touches[0].clientX),!1),upHandler:v=>{var x;h?.removeEventListener("touchmove",g.moveHandler),h?.removeEventListener("touchend",g.upHandler),v.cancelable&&(v.preventDefault(),v.stopPropagation()),d((x=v.touches[0])==null?void 0:x.clientX)}},y=vy()?{passive:!1}:!1;Mo(s)?(h?.addEventListener("touchmove",g.moveHandler,y),h?.addEventListener("touchend",g.upHandler,y)):(h?.addEventListener("mousemove",m.moveHandler,y),h?.addEventListener("mouseup",m.upHandler,y)),t.setColumnSizingInfo(v=>({...v,startOffset:l,startSize:r,deltaOffset:0,deltaPercentage:0,columnSizingStart:a,isResizingColumn:o.id}))}}},createTable:e=>{e.setColumnSizing=t=>e.options.onColumnSizingChange==null?void 0:e.options.onColumnSizingChange(t),e.setColumnSizingInfo=t=>e.options.onColumnSizingInfoChange==null?void 0:e.options.onColumnSizingInfoChange(t),e.resetColumnSizing=t=>{var n;e.setColumnSizing(t?{}:(n=e.initialState.columnSizing)!=null?n:{})},e.resetHeaderSizeInfo=t=>{var n;e.setColumnSizingInfo(t?Eo():(n=e.initialState.columnSizingInfo)!=null?n:Eo())},e.getTotalSize=()=>{var t,n;return(t=(n=e.getHeaderGroups()[0])==null?void 0:n.headers.reduce((o,i)=>o+i.getSize(),0))!=null?t:0},e.getLeftTotalSize=()=>{var t,n;return(t=(n=e.getLeftHeaderGroups()[0])==null?void 0:n.headers.reduce((o,i)=>o+i.getSize(),0))!=null?t:0},e.getCenterTotalSize=()=>{var t,n;return(t=(n=e.getCenterHeaderGroups()[0])==null?void 0:n.headers.reduce((o,i)=>o+i.getSize(),0))!=null?t:0},e.getRightTotalSize=()=>{var t,n;return(t=(n=e.getRightHeaderGroups()[0])==null?void 0:n.headers.reduce((o,i)=>o+i.getSize(),0))!=null?t:0}}};let vn=null;function vy(){if(typeof vn=="boolean")return vn;let e=!1;try{const t={get passive(){return e=!0,!1}},n=()=>{};window.addEventListener("test",n,t),window.removeEventListener("test",n)}catch{e=!1}return vn=e,vn}function Mo(e){return e.type==="touchstart"}const yy={getInitialState:e=>({columnVisibility:{},...e}),getDefaultOptions:e=>({onColumnVisibilityChange:xe("columnVisibility",e)}),createColumn:(e,t)=>{e.toggleVisibility=n=>{e.getCanHide()&&t.setColumnVisibility(o=>({...o,[e.id]:n??!e.getIsVisible()}))},e.getIsVisible=()=>{var n,o;const i=e.columns;return(n=i.length?i.some(s=>s.getIsVisible()):(o=t.getState().columnVisibility)==null?void 0:o[e.id])!=null?n:!0},e.getCanHide=()=>{var n,o;return((n=e.columnDef.enableHiding)!=null?n:!0)&&((o=t.options.enableHiding)!=null?o:!0)},e.getToggleVisibilityHandler=()=>n=>{e.toggleVisibility==null||e.toggleVisibility(n.target.checked)}},createRow:(e,t)=>{e._getAllVisibleCells=H(()=>[e.getAllCells(),t.getState().columnVisibility],n=>n.filter(o=>o.column.getIsVisible()),W(t.options,"debugRows","_getAllVisibleCells")),e.getVisibleCells=H(()=>[e.getLeftVisibleCells(),e.getCenterVisibleCells(),e.getRightVisibleCells()],(n,o,i)=>[...n,...o,...i],W(t.options,"debugRows","getVisibleCells"))},createTable:e=>{const t=(n,o)=>H(()=>[o(),o().filter(i=>i.getIsVisible()).map(i=>i.id).join("_")],i=>i.filter(s=>s.getIsVisible==null?void 0:s.getIsVisible()),W(e.options,"debugColumns",n));e.getVisibleFlatColumns=t("getVisibleFlatColumns",()=>e.getAllFlatColumns()),e.getVisibleLeafColumns=t("getVisibleLeafColumns",()=>e.getAllLeafColumns()),e.getLeftVisibleLeafColumns=t("getLeftVisibleLeafColumns",()=>e.getLeftLeafColumns()),e.getRightVisibleLeafColumns=t("getRightVisibleLeafColumns",()=>e.getRightLeafColumns()),e.getCenterVisibleLeafColumns=t("getCenterVisibleLeafColumns",()=>e.getCenterLeafColumns()),e.setColumnVisibility=n=>e.options.onColumnVisibilityChange==null?void 0:e.options.onColumnVisibilityChange(n),e.resetColumnVisibility=n=>{var o;e.setColumnVisibility(n?{}:(o=e.initialState.columnVisibility)!=null?o:{})},e.toggleAllColumnsVisible=n=>{var o;n=(o=n)!=null?o:!e.getIsAllColumnsVisible(),e.setColumnVisibility(e.getAllLeafColumns().reduce((i,s)=>({...i,[s.id]:n||!(s.getCanHide!=null&&s.getCanHide())}),{}))},e.getIsAllColumnsVisible=()=>!e.getAllLeafColumns().some(n=>!(n.getIsVisible!=null&&n.getIsVisible())),e.getIsSomeColumnsVisible=()=>e.getAllLeafColumns().some(n=>n.getIsVisible==null?void 0:n.getIsVisible()),e.getToggleAllColumnsVisibilityHandler=()=>n=>{var o;e.toggleAllColumnsVisible((o=n.target)==null?void 0:o.checked)}}};function Nt(e,t){return t?t==="center"?e.getCenterVisibleLeafColumns():t==="left"?e.getLeftVisibleLeafColumns():e.getRightVisibleLeafColumns():e.getVisibleLeafColumns()}const wy={createTable:e=>{e._getGlobalFacetedRowModel=e.options.getFacetedRowModel&&e.options.getFacetedRowModel(e,"__global__"),e.getGlobalFacetedRowModel=()=>e.options.manualFiltering||!e._getGlobalFacetedRowModel?e.getPreFilteredRowModel():e._getGlobalFacetedRowModel(),e._getGlobalFacetedUniqueValues=e.options.getFacetedUniqueValues&&e.options.getFacetedUniqueValues(e,"__global__"),e.getGlobalFacetedUniqueValues=()=>e._getGlobalFacetedUniqueValues?e._getGlobalFacetedUniqueValues():new Map,e._getGlobalFacetedMinMaxValues=e.options.getFacetedMinMaxValues&&e.options.getFacetedMinMaxValues(e,"__global__"),e.getGlobalFacetedMinMaxValues=()=>{if(e._getGlobalFacetedMinMaxValues)return e._getGlobalFacetedMinMaxValues()}}},xy={getInitialState:e=>({globalFilter:void 0,...e}),getDefaultOptions:e=>({onGlobalFilterChange:xe("globalFilter",e),globalFilterFn:"auto",getColumnCanGlobalFilter:t=>{var n;const o=(n=e.getCoreRowModel().flatRows[0])==null||(n=n._getAllCellsByColumnId()[t.id])==null?void 0:n.getValue();return typeof o=="string"||typeof o=="number"}}),createColumn:(e,t)=>{e.getCanGlobalFilter=()=>{var n,o,i,s;return((n=e.columnDef.enableGlobalFilter)!=null?n:!0)&&((o=t.options.enableGlobalFilter)!=null?o:!0)&&((i=t.options.enableFilters)!=null?i:!0)&&((s=t.options.getColumnCanGlobalFilter==null?void 0:t.options.getColumnCanGlobalFilter(e))!=null?s:!0)&&!!e.accessorFn}},createTable:e=>{e.getGlobalAutoFilterFn=()=>je.includesString,e.getGlobalFilterFn=()=>{var t,n;const{globalFilterFn:o}=e.options;return qn(o)?o:o==="auto"?e.getGlobalAutoFilterFn():(t=(n=e.options.filterFns)==null?void 0:n[o])!=null?t:je[o]},e.setGlobalFilter=t=>{e.options.onGlobalFilterChange==null||e.options.onGlobalFilterChange(t)},e.resetGlobalFilter=t=>{e.setGlobalFilter(t?void 0:e.initialState.globalFilter)}}},Cy={getInitialState:e=>({expanded:{},...e}),getDefaultOptions:e=>({onExpandedChange:xe("expanded",e),paginateExpandedRows:!0}),createTable:e=>{let t=!1,n=!1;e._autoResetExpanded=()=>{var o,i;if(!t){e._queue(()=>{t=!0});return}if((o=(i=e.options.autoResetAll)!=null?i:e.options.autoResetExpanded)!=null?o:!e.options.manualExpanding){if(n)return;n=!0,e._queue(()=>{e.resetExpanded(),n=!1})}},e.setExpanded=o=>e.options.onExpandedChange==null?void 0:e.options.onExpandedChange(o),e.toggleAllRowsExpanded=o=>{o??!e.getIsAllRowsExpanded()?e.setExpanded(!0):e.setExpanded({})},e.resetExpanded=o=>{var i,s;e.setExpanded(o?{}:(i=(s=e.initialState)==null?void 0:s.expanded)!=null?i:{})},e.getCanSomeRowsExpand=()=>e.getPrePaginationRowModel().flatRows.some(o=>o.getCanExpand()),e.getToggleAllRowsExpandedHandler=()=>o=>{o.persist==null||o.persist(),e.toggleAllRowsExpanded()},e.getIsSomeRowsExpanded=()=>{const o=e.getState().expanded;return o===!0||Object.values(o).some(Boolean)},e.getIsAllRowsExpanded=()=>{const o=e.getState().expanded;return typeof o=="boolean"?o===!0:!(!Object.keys(o).length||e.getRowModel().flatRows.some(i=>!i.getIsExpanded()))},e.getExpandedDepth=()=>{let o=0;return(e.getState().expanded===!0?Object.keys(e.getRowModel().rowsById):Object.keys(e.getState().expanded)).forEach(s=>{const r=s.split(".");o=Math.max(o,r.length)}),o},e.getPreExpandedRowModel=()=>e.getSortedRowModel(),e.getExpandedRowModel=()=>(!e._getExpandedRowModel&&e.options.getExpandedRowModel&&(e._getExpandedRowModel=e.options.getExpandedRowModel(e)),e.options.manualExpanding||!e._getExpandedRowModel?e.getPreExpandedRowModel():e._getExpandedRowModel())},createRow:(e,t)=>{e.toggleExpanded=n=>{t.setExpanded(o=>{var i;const s=o===!0?!0:!!(o!=null&&o[e.id]);let r={};if(o===!0?Object.keys(t.getRowModel().rowsById).forEach(a=>{r[a]=!0}):r=o,n=(i=n)!=null?i:!s,!s&&n)return{...r,[e.id]:!0};if(s&&!n){const{[e.id]:a,...l}=r;return l}return o})},e.getIsExpanded=()=>{var n;const o=t.getState().expanded;return!!((n=t.options.getIsRowExpanded==null?void 0:t.options.getIsRowExpanded(e))!=null?n:o===!0||o?.[e.id])},e.getCanExpand=()=>{var n,o,i;return(n=t.options.getRowCanExpand==null?void 0:t.options.getRowCanExpand(e))!=null?n:((o=t.options.enableExpanding)!=null?o:!0)&&!!((i=e.subRows)!=null&&i.length)},e.getIsAllParentsExpanded=()=>{let n=!0,o=e;for(;n&&o.parentId;)o=t.getRow(o.parentId,!0),n=o.getIsExpanded();return n},e.getToggleExpandedHandler=()=>{const n=e.getCanExpand();return()=>{n&&e.toggleExpanded()}}}},si=0,ri=10,Po=()=>({pageIndex:si,pageSize:ri}),Sy={getInitialState:e=>({...e,pagination:{...Po(),...e?.pagination}}),getDefaultOptions:e=>({onPaginationChange:xe("pagination",e)}),createTable:e=>{let t=!1,n=!1;e._autoResetPageIndex=()=>{var o,i;if(!t){e._queue(()=>{t=!0});return}if((o=(i=e.options.autoResetAll)!=null?i:e.options.autoResetPageIndex)!=null?o:!e.options.manualPagination){if(n)return;n=!0,e._queue(()=>{e.resetPageIndex(),n=!1})}},e.setPagination=o=>{const i=s=>Ke(o,s);return e.options.onPaginationChange==null?void 0:e.options.onPaginationChange(i)},e.resetPagination=o=>{var i;e.setPagination(o?Po():(i=e.initialState.pagination)!=null?i:Po())},e.setPageIndex=o=>{e.setPagination(i=>{let s=Ke(o,i.pageIndex);const r=typeof e.options.pageCount>"u"||e.options.pageCount===-1?Number.MAX_SAFE_INTEGER:e.options.pageCount-1;return s=Math.max(0,Math.min(s,r)),{...i,pageIndex:s}})},e.resetPageIndex=o=>{var i,s;e.setPageIndex(o?si:(i=(s=e.initialState)==null||(s=s.pagination)==null?void 0:s.pageIndex)!=null?i:si)},e.resetPageSize=o=>{var i,s;e.setPageSize(o?ri:(i=(s=e.initialState)==null||(s=s.pagination)==null?void 0:s.pageSize)!=null?i:ri)},e.setPageSize=o=>{e.setPagination(i=>{const s=Math.max(1,Ke(o,i.pageSize)),r=i.pageSize*i.pageIndex,a=Math.floor(r/s);return{...i,pageIndex:a,pageSize:s}})},e.setPageCount=o=>e.setPagination(i=>{var s;let r=Ke(o,(s=e.options.pageCount)!=null?s:-1);return typeof r=="number"&&(r=Math.max(-1,r)),{...i,pageCount:r}}),e.getPageOptions=H(()=>[e.getPageCount()],o=>{let i=[];return o&&o>0&&(i=[...new Array(o)].fill(null).map((s,r)=>r)),i},W(e.options,"debugTable","getPageOptions")),e.getCanPreviousPage=()=>e.getState().pagination.pageIndex>0,e.getCanNextPage=()=>{const{pageIndex:o}=e.getState().pagination,i=e.getPageCount();return i===-1?!0:i===0?!1:o<i-1},e.previousPage=()=>e.setPageIndex(o=>o-1),e.nextPage=()=>e.setPageIndex(o=>o+1),e.firstPage=()=>e.setPageIndex(0),e.lastPage=()=>e.setPageIndex(e.getPageCount()-1),e.getPrePaginationRowModel=()=>e.getExpandedRowModel(),e.getPaginationRowModel=()=>(!e._getPaginationRowModel&&e.options.getPaginationRowModel&&(e._getPaginationRowModel=e.options.getPaginationRowModel(e)),e.options.manualPagination||!e._getPaginationRowModel?e.getPrePaginationRowModel():e._getPaginationRowModel()),e.getPageCount=()=>{var o;return(o=e.options.pageCount)!=null?o:Math.ceil(e.getRowCount()/e.getState().pagination.pageSize)},e.getRowCount=()=>{var o;return(o=e.options.rowCount)!=null?o:e.getPrePaginationRowModel().rows.length}}},To=()=>({top:[],bottom:[]}),_y={getInitialState:e=>({rowPinning:To(),...e}),getDefaultOptions:e=>({onRowPinningChange:xe("rowPinning",e)}),createRow:(e,t)=>{e.pin=(n,o,i)=>{const s=o?e.getLeafRows().map(l=>{let{id:u}=l;return u}):[],r=i?e.getParentRows().map(l=>{let{id:u}=l;return u}):[],a=new Set([...r,e.id,...s]);t.setRowPinning(l=>{var u,c;if(n==="bottom"){var f,d;return{top:((f=l?.top)!=null?f:[]).filter(g=>!(a!=null&&a.has(g))),bottom:[...((d=l?.bottom)!=null?d:[]).filter(g=>!(a!=null&&a.has(g))),...Array.from(a)]}}if(n==="top"){var h,m;return{top:[...((h=l?.top)!=null?h:[]).filter(g=>!(a!=null&&a.has(g))),...Array.from(a)],bottom:((m=l?.bottom)!=null?m:[]).filter(g=>!(a!=null&&a.has(g)))}}return{top:((u=l?.top)!=null?u:[]).filter(g=>!(a!=null&&a.has(g))),bottom:((c=l?.bottom)!=null?c:[]).filter(g=>!(a!=null&&a.has(g)))}})},e.getCanPin=()=>{var n;const{enableRowPinning:o,enablePinning:i}=t.options;return typeof o=="function"?o(e):(n=o??i)!=null?n:!0},e.getIsPinned=()=>{const n=[e.id],{top:o,bottom:i}=t.getState().rowPinning,s=n.some(a=>o?.includes(a)),r=n.some(a=>i?.includes(a));return s?"top":r?"bottom":!1},e.getPinnedIndex=()=>{var n,o;const i=e.getIsPinned();if(!i)return-1;const s=(n=i==="top"?t.getTopRows():t.getBottomRows())==null?void 0:n.map(r=>{let{id:a}=r;return a});return(o=s?.indexOf(e.id))!=null?o:-1}},createTable:e=>{e.setRowPinning=t=>e.options.onRowPinningChange==null?void 0:e.options.onRowPinningChange(t),e.resetRowPinning=t=>{var n,o;return e.setRowPinning(t?To():(n=(o=e.initialState)==null?void 0:o.rowPinning)!=null?n:To())},e.getIsSomeRowsPinned=t=>{var n;const o=e.getState().rowPinning;if(!t){var i,s;return!!((i=o.top)!=null&&i.length||(s=o.bottom)!=null&&s.length)}return!!((n=o[t])!=null&&n.length)},e._getPinnedRows=(t,n,o)=>{var i;return((i=e.options.keepPinnedRows)==null||i?(n??[]).map(r=>{const a=e.getRow(r,!0);return a.getIsAllParentsExpanded()?a:null}):(n??[]).map(r=>t.find(a=>a.id===r))).filter(Boolean).map(r=>({...r,position:o}))},e.getTopRows=H(()=>[e.getRowModel().rows,e.getState().rowPinning.top],(t,n)=>e._getPinnedRows(t,n,"top"),W(e.options,"debugRows","getTopRows")),e.getBottomRows=H(()=>[e.getRowModel().rows,e.getState().rowPinning.bottom],(t,n)=>e._getPinnedRows(t,n,"bottom"),W(e.options,"debugRows","getBottomRows")),e.getCenterRows=H(()=>[e.getRowModel().rows,e.getState().rowPinning.top,e.getState().rowPinning.bottom],(t,n,o)=>{const i=new Set([...n??[],...o??[]]);return t.filter(s=>!i.has(s.id))},W(e.options,"debugRows","getCenterRows"))}},by={getInitialState:e=>({rowSelection:{},...e}),getDefaultOptions:e=>({onRowSelectionChange:xe("rowSelection",e),enableRowSelection:!0,enableMultiRowSelection:!0,enableSubRowSelection:!0}),createTable:e=>{e.setRowSelection=t=>e.options.onRowSelectionChange==null?void 0:e.options.onRowSelectionChange(t),e.resetRowSelection=t=>{var n;return e.setRowSelection(t?{}:(n=e.initialState.rowSelection)!=null?n:{})},e.toggleAllRowsSelected=t=>{e.setRowSelection(n=>{t=typeof t<"u"?t:!e.getIsAllRowsSelected();const o={...n},i=e.getPreGroupedRowModel().flatRows;return t?i.forEach(s=>{s.getCanSelect()&&(o[s.id]=!0)}):i.forEach(s=>{delete o[s.id]}),o})},e.toggleAllPageRowsSelected=t=>e.setRowSelection(n=>{const o=typeof t<"u"?t:!e.getIsAllPageRowsSelected(),i={...n};return e.getRowModel().rows.forEach(s=>{ai(i,s.id,o,!0,e)}),i}),e.getPreSelectedRowModel=()=>e.getCoreRowModel(),e.getSelectedRowModel=H(()=>[e.getState().rowSelection,e.getCoreRowModel()],(t,n)=>Object.keys(t).length?Vo(e,n):{rows:[],flatRows:[],rowsById:{}},W(e.options,"debugTable","getSelectedRowModel")),e.getFilteredSelectedRowModel=H(()=>[e.getState().rowSelection,e.getFilteredRowModel()],(t,n)=>Object.keys(t).length?Vo(e,n):{rows:[],flatRows:[],rowsById:{}},W(e.options,"debugTable","getFilteredSelectedRowModel")),e.getGroupedSelectedRowModel=H(()=>[e.getState().rowSelection,e.getSortedRowModel()],(t,n)=>Object.keys(t).length?Vo(e,n):{rows:[],flatRows:[],rowsById:{}},W(e.options,"debugTable","getGroupedSelectedRowModel")),e.getIsAllRowsSelected=()=>{const t=e.getFilteredRowModel().flatRows,{rowSelection:n}=e.getState();let o=!!(t.length&&Object.keys(n).length);return o&&t.some(i=>i.getCanSelect()&&!n[i.id])&&(o=!1),o},e.getIsAllPageRowsSelected=()=>{const t=e.getPaginationRowModel().flatRows.filter(i=>i.getCanSelect()),{rowSelection:n}=e.getState();let o=!!t.length;return o&&t.some(i=>!n[i.id])&&(o=!1),o},e.getIsSomeRowsSelected=()=>{var t;const n=Object.keys((t=e.getState().rowSelection)!=null?t:{}).length;return n>0&&n<e.getFilteredRowModel().flatRows.length},e.getIsSomePageRowsSelected=()=>{const t=e.getPaginationRowModel().flatRows;return e.getIsAllPageRowsSelected()?!1:t.filter(n=>n.getCanSelect()).some(n=>n.getIsSelected()||n.getIsSomeSelected())},e.getToggleAllRowsSelectedHandler=()=>t=>{e.toggleAllRowsSelected(t.target.checked)},e.getToggleAllPageRowsSelectedHandler=()=>t=>{e.toggleAllPageRowsSelected(t.target.checked)}},createRow:(e,t)=>{e.toggleSelected=(n,o)=>{const i=e.getIsSelected();t.setRowSelection(s=>{var r;if(n=typeof n<"u"?n:!i,e.getCanSelect()&&i===n)return s;const a={...s};return ai(a,e.id,n,(r=o?.selectChildren)!=null?r:!0,t),a})},e.getIsSelected=()=>{const{rowSelection:n}=t.getState();return Qi(e,n)},e.getIsSomeSelected=()=>{const{rowSelection:n}=t.getState();return li(e,n)==="some"},e.getIsAllSubRowsSelected=()=>{const{rowSelection:n}=t.getState();return li(e,n)==="all"},e.getCanSelect=()=>{var n;return typeof t.options.enableRowSelection=="function"?t.options.enableRowSelection(e):(n=t.options.enableRowSelection)!=null?n:!0},e.getCanSelectSubRows=()=>{var n;return typeof t.options.enableSubRowSelection=="function"?t.options.enableSubRowSelection(e):(n=t.options.enableSubRowSelection)!=null?n:!0},e.getCanMultiSelect=()=>{var n;return typeof t.options.enableMultiRowSelection=="function"?t.options.enableMultiRowSelection(e):(n=t.options.enableMultiRowSelection)!=null?n:!0},e.getToggleSelectedHandler=()=>{const n=e.getCanSelect();return o=>{var i;n&&e.toggleSelected((i=o.target)==null?void 0:i.checked)}}}},ai=(e,t,n,o,i)=>{var s;const r=i.getRow(t,!0);n?(r.getCanMultiSelect()||Object.keys(e).forEach(a=>delete e[a]),r.getCanSelect()&&(e[t]=!0)):delete e[t],o&&(s=r.subRows)!=null&&s.length&&r.getCanSelectSubRows()&&r.subRows.forEach(a=>ai(e,a.id,n,o,i))};function Vo(e,t){const n=e.getState().rowSelection,o=[],i={},s=function(r,a){return r.map(l=>{var u;const c=Qi(l,n);if(c&&(o.push(l),i[l.id]=l),(u=l.subRows)!=null&&u.length&&(l={...l,subRows:s(l.subRows)}),c)return l}).filter(Boolean)};return{rows:s(t.rows),flatRows:o,rowsById:i}}function Qi(e,t){var n;return(n=t[e.id])!=null?n:!1}function li(e,t,n){var o;if(!((o=e.subRows)!=null&&o.length))return!1;let i=!0,s=!1;return e.subRows.forEach(r=>{if(!(s&&!i)&&(r.getCanSelect()&&(Qi(r,t)?s=!0:i=!1),r.subRows&&r.subRows.length)){const a=li(r,t);a==="all"?s=!0:(a==="some"&&(s=!0),i=!1)}}),i?"all":s?"some":!1}const ui=/([0-9]+)/gm,Ry=(e,t,n)=>pu(Je(e.getValue(n)).toLowerCase(),Je(t.getValue(n)).toLowerCase()),Ey=(e,t,n)=>pu(Je(e.getValue(n)),Je(t.getValue(n))),My=(e,t,n)=>es(Je(e.getValue(n)).toLowerCase(),Je(t.getValue(n)).toLowerCase()),Py=(e,t,n)=>es(Je(e.getValue(n)),Je(t.getValue(n))),Ty=(e,t,n)=>{const o=e.getValue(n),i=t.getValue(n);return o>i?1:o<i?-1:0},Vy=(e,t,n)=>es(e.getValue(n),t.getValue(n));function es(e,t){return e===t?0:e>t?1:-1}function Je(e){return typeof e=="number"?isNaN(e)||e===1/0||e===-1/0?"":String(e):typeof e=="string"?e:""}function pu(e,t){const n=e.split(ui).filter(Boolean),o=t.split(ui).filter(Boolean);for(;n.length&&o.length;){const i=n.shift(),s=o.shift(),r=parseInt(i,10),a=parseInt(s,10),l=[r,a].sort();if(isNaN(l[0])){if(i>s)return 1;if(s>i)return-1;continue}if(isNaN(l[1]))return isNaN(r)?-1:1;if(r>a)return 1;if(a>r)return-1}return n.length-o.length}const It={alphanumeric:Ry,alphanumericCaseSensitive:Ey,text:My,textCaseSensitive:Py,datetime:Ty,basic:Vy},Ay={getInitialState:e=>({sorting:[],...e}),getDefaultColumnDef:()=>({sortingFn:"auto",sortUndefined:1}),getDefaultOptions:e=>({onSortingChange:xe("sorting",e),isMultiSortEvent:t=>t.shiftKey}),createColumn:(e,t)=>{e.getAutoSortingFn=()=>{const n=t.getFilteredRowModel().flatRows.slice(10);let o=!1;for(const i of n){const s=i?.getValue(e.id);if(Object.prototype.toString.call(s)==="[object Date]")return It.datetime;if(typeof s=="string"&&(o=!0,s.split(ui).length>1))return It.alphanumeric}return o?It.text:It.basic},e.getAutoSortDir=()=>{const n=t.getFilteredRowModel().flatRows[0];return typeof n?.getValue(e.id)=="string"?"asc":"desc"},e.getSortingFn=()=>{var n,o;if(!e)throw new Error;return qn(e.columnDef.sortingFn)?e.columnDef.sortingFn:e.columnDef.sortingFn==="auto"?e.getAutoSortingFn():(n=(o=t.options.sortingFns)==null?void 0:o[e.columnDef.sortingFn])!=null?n:It[e.columnDef.sortingFn]},e.toggleSorting=(n,o)=>{const i=e.getNextSortingOrder(),s=typeof n<"u"&&n!==null;t.setSorting(r=>{const a=r?.find(h=>h.id===e.id),l=r?.findIndex(h=>h.id===e.id);let u=[],c,f=s?n:i==="desc";if(r!=null&&r.length&&e.getCanMultiSort()&&o?a?c="toggle":c="add":r!=null&&r.length&&l!==r.length-1?c="replace":a?c="toggle":c="replace",c==="toggle"&&(s||i||(c="remove")),c==="add"){var d;u=[...r,{id:e.id,desc:f}],u.splice(0,u.length-((d=t.options.maxMultiSortColCount)!=null?d:Number.MAX_SAFE_INTEGER))}else c==="toggle"?u=r.map(h=>h.id===e.id?{...h,desc:f}:h):c==="remove"?u=r.filter(h=>h.id!==e.id):u=[{id:e.id,desc:f}];return u})},e.getFirstSortDir=()=>{var n,o;return((n=(o=e.columnDef.sortDescFirst)!=null?o:t.options.sortDescFirst)!=null?n:e.getAutoSortDir()==="desc")?"desc":"asc"},e.getNextSortingOrder=n=>{var o,i;const s=e.getFirstSortDir(),r=e.getIsSorted();return r?r!==s&&((o=t.options.enableSortingRemoval)==null||o)&&(!(n&&(i=t.options.enableMultiRemove)!=null)||i)?!1:r==="desc"?"asc":"desc":s},e.getCanSort=()=>{var n,o;return((n=e.columnDef.enableSorting)!=null?n:!0)&&((o=t.options.enableSorting)!=null?o:!0)&&!!e.accessorFn},e.getCanMultiSort=()=>{var n,o;return(n=(o=e.columnDef.enableMultiSort)!=null?o:t.options.enableMultiSort)!=null?n:!!e.accessorFn},e.getIsSorted=()=>{var n;const o=(n=t.getState().sorting)==null?void 0:n.find(i=>i.id===e.id);return o?o.desc?"desc":"asc":!1},e.getSortIndex=()=>{var n,o;return(n=(o=t.getState().sorting)==null?void 0:o.findIndex(i=>i.id===e.id))!=null?n:-1},e.clearSorting=()=>{t.setSorting(n=>n!=null&&n.length?n.filter(o=>o.id!==e.id):[])},e.getToggleSortingHandler=()=>{const n=e.getCanSort();return o=>{n&&(o.persist==null||o.persist(),e.toggleSorting==null||e.toggleSorting(void 0,e.getCanMultiSort()?t.options.isMultiSortEvent==null?void 0:t.options.isMultiSortEvent(o):!1))}}},createTable:e=>{e.setSorting=t=>e.options.onSortingChange==null?void 0:e.options.onSortingChange(t),e.resetSorting=t=>{var n,o;e.setSorting(t?[]:(n=(o=e.initialState)==null?void 0:o.sorting)!=null?n:[])},e.getPreSortedRowModel=()=>e.getGroupedRowModel(),e.getSortedRowModel=()=>(!e._getSortedRowModel&&e.options.getSortedRowModel&&(e._getSortedRowModel=e.options.getSortedRowModel(e)),e.options.manualSorting||!e._getSortedRowModel?e.getPreSortedRowModel():e._getSortedRowModel())}},Dy=[Jv,yy,hy,gy,ey,ty,wy,xy,Ay,dy,Cy,Sy,_y,by,py];function ky(e){var t,n;process.env.NODE_ENV!=="production"&&(e.debugAll||e.debugTable)&&console.info("Creating Table Instance...");const o=[...Dy,...(t=e._features)!=null?t:[]];let i={_features:o};const s=i._features.reduce((d,h)=>Object.assign(d,h.getDefaultOptions==null?void 0:h.getDefaultOptions(i)),{}),r=d=>i.options.mergeOptions?i.options.mergeOptions(s,d):{...s,...d};let l={...{},...(n=e.initialState)!=null?n:{}};i._features.forEach(d=>{var h;l=(h=d.getInitialState==null?void 0:d.getInitialState(l))!=null?h:l});const u=[];let c=!1;const f={_features:o,options:{...s,...e},initialState:l,_queue:d=>{u.push(d),c||(c=!0,Promise.resolve().then(()=>{for(;u.length;)u.shift()();c=!1}).catch(h=>setTimeout(()=>{throw h})))},reset:()=>{i.setState(i.initialState)},setOptions:d=>{const h=Ke(d,i.options);i.options=r(h)},getState:()=>i.options.state,setState:d=>{i.options.onStateChange==null||i.options.onStateChange(d)},_getRowId:(d,h,m)=>{var g;return(g=i.options.getRowId==null?void 0:i.options.getRowId(d,h,m))!=null?g:`${m?[m.id,h].join("."):h}`},getCoreRowModel:()=>(i._getCoreRowModel||(i._getCoreRowModel=i.options.getCoreRowModel(i)),i._getCoreRowModel()),getRowModel:()=>i.getPaginationRowModel(),getRow:(d,h)=>{let m=(h?i.getPrePaginationRowModel():i.getRowModel()).rowsById[d];if(!m&&(m=i.getCoreRowModel().rowsById[d],!m))throw process.env.NODE_ENV!=="production"?new Error(`getRow could not find row with ID: ${d}`):new Error;return m},_getDefaultColumnDef:H(()=>[i.options.defaultColumn],d=>{var h;return d=(h=d)!=null?h:{},{header:m=>{const g=m.header.column.columnDef;return g.accessorKey?g.accessorKey:g.accessorFn?g.id:null},cell:m=>{var g,y;return(g=(y=m.renderValue())==null||y.toString==null?void 0:y.toString())!=null?g:null},...i._features.reduce((m,g)=>Object.assign(m,g.getDefaultColumnDef==null?void 0:g.getDefaultColumnDef()),{}),...d}},W(e,"debugColumns","_getDefaultColumnDef")),_getColumnDefs:()=>i.options.columns,getAllColumns:H(()=>[i._getColumnDefs()],d=>{const h=function(m,g,y){return y===void 0&&(y=0),m.map(v=>{const x=Zv(i,v,y,g),p=v;return x.columns=p.columns?h(p.columns,x,y+1):[],x})};return h(d)},W(e,"debugColumns","getAllColumns")),getAllFlatColumns:H(()=>[i.getAllColumns()],d=>d.flatMap(h=>h.getFlatColumns()),W(e,"debugColumns","getAllFlatColumns")),_getAllFlatColumnsById:H(()=>[i.getAllFlatColumns()],d=>d.reduce((h,m)=>(h[m.id]=m,h),{}),W(e,"debugColumns","getAllFlatColumnsById")),getAllLeafColumns:H(()=>[i.getAllColumns(),i._getOrderColumnsFn()],(d,h)=>{let m=d.flatMap(g=>g.getLeafColumns());return h(m)},W(e,"debugColumns","getAllLeafColumns")),getColumn:d=>{const h=i._getAllFlatColumnsById()[d];return process.env.NODE_ENV!=="production"&&!h&&console.error(`[Table] Column with id '${d}' does not exist.`),h}};Object.assign(i,f);for(let d=0;d<i._features.length;d++){const h=i._features[d];h==null||h.createTable==null||h.createTable(i)}return i}function Fy(){return e=>H(()=>[e.options.data],t=>{const n={rows:[],flatRows:[],rowsById:{}},o=function(i,s,r){s===void 0&&(s=0);const a=[];for(let u=0;u<i.length;u++){const c=Qv(e,e._getRowId(i[u],u,r),i[u],u,s,void 0,r?.id);if(n.flatRows.push(c),n.rowsById[c.id]=c,a.push(c),e.options.getSubRows){var l;c.originalSubRows=e.options.getSubRows(i[u],u),(l=c.originalSubRows)!=null&&l.length&&(c.subRows=o(c.originalSubRows,s+1,c))}}return a};return n.rows=o(t),n},W(e.options,"debugTable","getRowModel",()=>e._autoResetPageIndex()))}function Ly(e){const t=[],n=o=>{var i;t.push(o),(i=o.subRows)!=null&&i.length&&o.getIsExpanded()&&o.subRows.forEach(n)};return e.rows.forEach(n),{rows:t,flatRows:e.flatRows,rowsById:e.rowsById}}function Iy(e){return t=>H(()=>[t.getState().pagination,t.getPrePaginationRowModel(),t.options.paginateExpandedRows?void 0:t.getState().expanded],(n,o)=>{if(!o.rows.length)return o;const{pageSize:i,pageIndex:s}=n;let{rows:r,flatRows:a,rowsById:l}=o;const u=i*s,c=u+i;r=r.slice(u,c);let f;t.options.paginateExpandedRows?f={rows:r,flatRows:a,rowsById:l}:f=Ly({rows:r,flatRows:a,rowsById:l}),f.flatRows=[];const d=h=>{f.flatRows.push(h),h.subRows.length&&h.subRows.forEach(d)};return f.rows.forEach(d),f},W(t.options,"debugTable","getPaginationRowModel"))}function $y(){return e=>H(()=>[e.getState().sorting,e.getPreSortedRowModel()],(t,n)=>{if(!n.rows.length||!(t!=null&&t.length))return n;const o=e.getState().sorting,i=[],s=o.filter(l=>{var u;return(u=e.getColumn(l.id))==null?void 0:u.getCanSort()}),r={};s.forEach(l=>{const u=e.getColumn(l.id);u&&(r[l.id]={sortUndefined:u.columnDef.sortUndefined,invertSorting:u.columnDef.invertSorting,sortingFn:u.getSortingFn()})});const a=l=>{const u=l.map(c=>({...c}));return u.sort((c,f)=>{for(let h=0;h<s.length;h+=1){var d;const m=s[h],g=r[m.id],y=g.sortUndefined,v=(d=m?.desc)!=null?d:!1;let x=0;if(y){const p=c.getValue(m.id),S=f.getValue(m.id),b=p===void 0,P=S===void 0;if(b||P){if(y==="first")return b?-1:1;if(y==="last")return b?1:-1;x=b&&P?0:b?y:-y}}if(x===0&&(x=g.sortingFn(c,f,m.id)),x!==0)return v&&(x*=-1),g.invertSorting&&(x*=-1),x}return c.index-f.index}),u.forEach(c=>{var f;i.push(c),(f=c.subRows)!=null&&f.length&&(c.subRows=a(c.subRows))}),u};return{rows:a(n.rows),flatRows:i,rowsById:n.rowsById}},W(e.options,"debugTable","getSortedRowModel",()=>e._autoResetPageIndex()))}/**
29
+ * react-table
30
+ *
31
+ * Copyright (c) TanStack
32
+ *
33
+ * This source code is licensed under the MIT license found in the
34
+ * LICENSE.md file in the root directory of this source tree.
35
+ *
36
+ * @license MIT
37
+ */function Kr(e,t){return e?jy(e)?_.createElement(e,t):e:null}function jy(e){return Oy(e)||typeof e=="function"||zy(e)}function Oy(e){return typeof e=="function"&&(()=>{const t=Object.getPrototypeOf(e);return t.prototype&&t.prototype.isReactComponent})()}function zy(e){return typeof e=="object"&&typeof e.$$typeof=="symbol"&&["react.memo","react.forward_ref"].includes(e.$$typeof.description)}function By(e){const t={state:{},onStateChange:()=>{},renderFallbackValue:null,...e},[n]=_.useState(()=>({current:ky(t)})),[o,i]=_.useState(()=>n.current.initialState);return n.current.setOptions(s=>({...s,...e,state:{...o,...e.state},onStateChange:r=>{i(r),e.onStateChange==null||e.onStateChange(r)}})),n.current}const Ny=e=>_.createElement("svg",{width:32,height:32,viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},_.createElement("style",null,`
38
+ @keyframes spin {
39
+ from {
40
+ transform: rotate(0deg);
41
+ }
42
+ to {
43
+ transform: rotate(360deg);
44
+ }
45
+ }
46
+ .spinner {
47
+ transform-origin: center;
48
+ animation: spin 1s linear infinite;
49
+ }
50
+ `),_.createElement("g",{className:"spinner"},_.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M16.0003 6.83317C13.5692 6.83317 11.2376 7.79894 9.51851 9.51803C7.79943 11.2371 6.83366 13.5687 6.83366 15.9998C6.83366 18.431 7.79943 20.7626 9.51851 22.4817C11.2376 24.2007 13.5692 25.1665 16.0003 25.1665C18.4315 25.1665 20.7631 24.2007 22.4821 22.4817C24.2012 20.7626 25.167 18.431 25.167 15.9998C25.167 13.5687 24.2012 11.2371 22.4821 9.51803C20.7631 7.79894 18.4315 6.83317 16.0003 6.83317ZM3.16699 15.9998C3.16699 8.91217 8.91266 3.1665 16.0003 3.1665C23.088 3.1665 28.8337 8.91217 28.8337 15.9998C28.8337 23.0875 23.088 28.8332 16.0003 28.8332C8.91266 28.8332 3.16699 23.0875 3.16699 15.9998Z",fill:"currentColor",fillOpacity:.12}),_.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M15.9997 6.83319C13.6363 6.82787 11.3633 7.74068 9.65999 9.37907C9.30711 9.70535 8.84021 9.88001 8.35982 9.86545C7.87943 9.85089 7.42396 9.64827 7.09149 9.30122C6.75902 8.95416 6.57612 8.49043 6.58218 8.00985C6.58823 7.52928 6.78276 7.07031 7.12388 6.73174C9.50956 4.43941 12.6912 3.16143 15.9997 3.16652C16.4859 3.16652 16.9522 3.35967 17.296 3.70349C17.6398 4.04731 17.833 4.51362 17.833 4.99985C17.833 5.48608 17.6398 5.9524 17.296 6.29621C16.9522 6.64003 16.4859 6.83319 15.9997 6.83319Z",fill:"currentColor"}))),Hy=e=>_.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},_.createElement("g",{clipPath:"url(#clip0_2074_3858)"},_.createElement("path",{d:"M21 21L16.65 16.65M19 11C19 15.4183 15.4183 19 11 19C6.58172 19 3 15.4183 3 11C3 6.58172 6.58172 3 11 3C15.4183 3 19 6.58172 19 11Z",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),_.createElement("defs",null,_.createElement("clipPath",{id:"clip0_2074_3858"},_.createElement("rect",{width:24,height:24,fill:"white"})))),Wy="_table_19yhs_8",Gy={table:Wy},vu=C.forwardRef(({children:e,className:t,style:n,...o},i)=>w.jsx("td",{ref:i,className:F.cx(t),style:n,...o,children:e}));vu.displayName="TableBodyCell";const yu=C.forwardRef(({children:e,row:t=!0,justifyContent:n="flex-start",alignItems:o="center",py:i="var(--spacing-sm)",px:s="var(--spacing-md)",minHeight:r="56px",...a},l)=>w.jsx(I,{row:t,justifyContent:n,alignItems:o,py:i,px:s,minHeight:r,ref:l,...a,children:e}));yu.displayName="TableBodyCellContent";const wu=C.forwardRef(({children:e,className:t,showBorders:n=!1,isSelected:o=!1,...i},s)=>{const r=F.css({borderBottom:n?"1px solid var(--border-neutral-alpha-low)":"none"});return w.jsx("tr",{ref:s,className:F.cx(r,t),...i,children:e})});wu.displayName="TableBodyRow";const Uy=C.forwardRef(({children:e,className:t,style:n,justifyContent:o="flex-start",alignItems:i="flex-start",...s},r)=>{const a=F.css({justifyContent:o,alignItems:i,fontWeight:"inherit"});return w.jsx("th",{ref:r,className:F.cx(a,t),style:n,...s,children:e})}),ts=C.forwardRef(({children:e,row:t=!0,justifyContent:n="flex-start",alignItems:o="center",py:i="var(--spacing-sm)",px:s="var(--spacing-md)",minHeight:r="56px",...a},l)=>w.jsx(I,{row:t,justifyContent:n,alignItems:o,py:i,px:s,minHeight:r,ref:l,...a,children:e}));ts.displayName="TableHeadCellContent";const Ky=e=>_.createElement("svg",{width:10,height:6,viewBox:"0 0 10 6",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},_.createElement("path",{d:"M8.75 0.75L4.75 4.75L0.75 0.75",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),qy=e=>_.createElement("svg",{width:10,height:6,viewBox:"0 0 10 6",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},_.createElement("path",{d:"M8.75 4.75L4.75 0.75L0.75 4.75",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),Xy=({sortDirection:e,gap:t="5px",...n})=>w.jsxs(I,{gap:t,...n,children:[w.jsx(qy,{style:{color:e==="asc"?"var(--icon-accent)":"var(--icon-tertiary)"}}),w.jsx(Ky,{style:{color:e==="desc"?"var(--icon-accent)":"var(--icon-tertiary)"}})]}),xu=({children:e,tableProps:t,gap:n="10px",...o})=>{const i=t.column.getIsSorted();return w.jsxs(ts,{style:{cursor:"pointer",userSelect:"none"},gap:n,...o,children:[e,w.jsx(Xy,{sortDirection:i})]})};xu.displayName="TableHeadCellContentSortable";const Cu=C.forwardRef(({children:e,className:t,showBorders:n=!1,...o},i)=>{const s=F.css({backgroundColor:"var(--fill-bg-secondary)",borderBottom:n?"1px solid var(--border-neutral-alpha-low)":"none"});return w.jsx("tr",{ref:i,className:F.cx(s,t),...o,children:e})});Cu.displayName="TableHeadRow";const Yy=e=>_.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},_.createElement("path",{d:"M15 18L9 12L15 6",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),Zy=e=>_.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},_.createElement("path",{d:"M9 18L15 12L9 6",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),Jy=e=>_.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},_.createElement("path",{d:"M12 13C12.5523 13 13 12.5523 13 12C13 11.4477 12.5523 11 12 11C11.4477 11 11 11.4477 11 12C11 12.5523 11.4477 13 12 13Z",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}),_.createElement("path",{d:"M19 13C19.5523 13 20 12.5523 20 12C20 11.4477 19.5523 11 19 11C18.4477 11 18 11.4477 18 12C18 12.5523 18.4477 13 19 13Z",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}),_.createElement("path",{d:"M5 13C5.55228 13 6 12.5523 6 12C6 11.4477 5.55228 11 5 11C4.44772 11 4 11.4477 4 12C4 12.5523 4.44772 13 5 13Z",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),Qy=(e,t)=>{const n=[];if(t<=10){for(let s=1;s<=t;s++)n.push(s);return n}const o=2,i=[];for(let s=Math.max(2,e+1-o);s<=Math.min(t-1,e+1+o);s++)i.push(s);return e+1-o>2?n.push(1,"..."):n.push(1),n.push(...i),e+1+o<t-1?n.push("...",t):t>1&&n.push(t),n},e0=({pageIndex:e,pageSize:t,totalCount:n,onPageChange:o,onPageSizeChange:i,pageSizeOptions:s=[10,20,50,100],showPageSizeSelector:r=!0,renderPageSizeSelectorItem:a=l=>l.label})=>{const l=Math.ceil(n/t),u=e>0,c=e<l-1,f=()=>{u&&o(e-1)},d=()=>{c&&o(e+1)},h=g=>{i(Number(g))},m=Qy(e,l);return n===0?null:w.jsxs(I,{row:!0,justifyContent:"space-between",children:[w.jsxs(I,{row:!0,gap:"var(--spacing-sm)",children:[w.jsx(Wt,{onClick:f,disabled:!u,color:"neutral",size:"sm",children:w.jsx(Yy,{})}),w.jsx(I,{row:!0,gap:"var(--spacing-sm)",children:m.map(g=>w.jsx(t0,{isDots:g==="...",isCurrentPage:g===e+1,disabled:g==="...",onClick:()=>o(g-1),children:g},g))}),w.jsx(Wt,{color:"neutral",size:"sm",onClick:d,disabled:!c,children:w.jsx(Zy,{})})]}),r&&w.jsx(I,{children:w.jsx(tu,{value:t.toString(),size:"sm",items:s.map(g=>({value:g.toString(),label:g.toString()})),returnedValue:g=>g.value,renderDropdownItem:a,onChange:g=>h(g)})})]})},t0=({children:e,isCurrentPage:t=!1,onClick:n,isDots:o=!1,disabled:i=!1})=>{const s=F.css({cursor:i?"not-allowed":"pointer",userSelect:"none",width:"40px",height:"40px",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:t?"var(--fill-accent-secondary)":"var(--fill-bg-secondary)",borderRadius:"var(--corner-sm)",border:t?"1px solid var(--fill-accent-secondary-hover)":"1px solid var(--border-neutral-alpha-basic)"}),r=F.css({width:"24px",height:"24px",color:t?"var(--icon-secondary)":"var(--icon-tertiary)"});return w.jsx(I,{className:s,onClick:i?void 0:n,children:o?w.jsx(Jy,{className:r}):w.jsx(K,{center:!0,variant:"body-2",fontWeight:"medium",children:e})})},n0=F.css({position:"relative",borderRadius:"var(--corner-md)",overflow:"hidden","&::before, &::after":{content:'""',position:"absolute",top:0,bottom:14,width:96,pointerEvents:"none",zIndex:2,transition:"opacity 0.2s ease"},"&::before":{left:0,background:"linear-gradient(to left, rgba(255, 255, 255, 0.00) 0%, #FFF 100%)"},"&::after":{right:0,background:"linear-gradient(to right, rgba(255, 255, 255, 0.00) 0%, #FFF 100%)"}}),o0=F.css({overflowX:"auto",scrollbarWidth:"thin",scrollbarColor:"var(--gray-86) var(--gray-96)"}),Su=C.memo(({data:e,children:t,className:n,showBorders:o=!1,...i})=>{const[s,r]=C.useState(!1),[a,l]=C.useState(!1),u=C.useRef(null),c=C.useCallback(()=>{const d=u.current;if(!d)return;const{scrollLeft:h,scrollWidth:m,clientWidth:g}=d,y=m>g;r(y&&h>0),l(y&&h<m-g-1)},[]);C.useEffect(()=>{const d=u.current;if(!d)return;c();const h=new ResizeObserver(c);return h.observe(d),d.addEventListener("scroll",c),()=>{h.disconnect(),d.removeEventListener("scroll",c)}},[c,e]);const f=F.css({border:o?"1px solid var(--border-neutral-alpha-low)":"transparent","&::before":{opacity:s?1:0},"&::after":{opacity:a?1:0}});return w.jsx(I,{className:F.cx(n0,f,n),...i,children:w.jsx(I,{ref:u,className:o0,children:t})})});Su.displayName="TableWrapper";const i0=F.css({width:"100%",maxWidth:"100%",minWidth:"max-content",borderCollapse:"collapse",borderSpacing:0,backgroundColor:"var(--fill-bg-primary)"}),s0=F.css({backgroundColor:"var(--fill-bg-secondary)",color:"var(--text-tertiary)"}),Vt=({ref:e,data:t,columns:n,showBorders:o=!0,enableSorting:i=!1,enablePagination:s=!1,enableRowSelection:r=!1,enableMultiRowSelection:a=!1,sorting:l,onSortingChange:u,columnFilters:c,onColumnFiltersChange:f,columnVisibility:d,onColumnVisibilityChange:h,pagination:m,onPaginationChange:g,rowSelection:y,onRowSelectionChange:v,totalCount:x,loading:p=!1,emptyLabels:S={title:"Nothing found",description:"No results found for “result”",action:"Reset"},loadingLabels:b={title:"Loading...",description:"Please wait or reset your promt",action:"Reset"},className:P,containerClassName:V,tableOptions:M={},onRowClick:D,getRowId:k,headCellComponent:j=Uy,bodyCellComponent:N=vu,headRowComponent:O=Cu,bodyRowComponent:A=wu,onReset:B,renderPageSizeSelectorItem:z})=>{const[E,R]=C.useState([]),[T,L]=C.useState([]),[Y,U]=C.useState({}),[q,ge]=C.useState({pageIndex:0,pageSize:10}),[J,ie]=C.useState({}),$=l??E,Z=c??T,se=d??Y,ae=m??q,Ce=y??J,et=X=>{const Q=typeof X=="function"?X($):X;u?u(Q):R(Q)},At=X=>{const Q=typeof X=="function"?X(Z):X;f?f(Q):L(Q)},Dt=X=>{const Q=typeof X=="function"?X(se):X;h?h(Q):U(Q)},Xn=X=>{const Q=typeof X=="function"?X(ae):X;g?g(Q):ge(Q)},Yn=By({data:t,columns:n,state:{sorting:$,columnFilters:Z,columnVisibility:se,pagination:ae,rowSelection:Ce},onSortingChange:et,onColumnFiltersChange:At,onColumnVisibilityChange:Dt,onPaginationChange:Xn,onRowSelectionChange:X=>{const Q=typeof X=="function"?X(Ce):X;v?v(Q):ie(Q)},getCoreRowModel:Fy(),getSortedRowModel:i?$y():void 0,getPaginationRowModel:s?Iy():void 0,enableRowSelection:r,enableMultiRowSelection:a,getRowId:k,manualPagination:!!x,pageCount:x?Math.ceil(x/ae.pageSize):void 0,...M});C.useImperativeHandle(e,()=>Yn);const{rows:os}=Yn.getRowModel(),_u=(X,Q)=>{D&&D(X.original,Q)};return p?w.jsxs(I,{w:"full",borderRadius:"var(--corner-md)",py:"var(--spacing-5xl)",px:"var(--spacing-10xl)",alignItems:"center",className:F.cx(V),children:[w.jsx(Ny,{width:32,height:32,style:{color:"var(--icon-tertiary)",marginBottom:"var(--spacing-sm)"}}),w.jsx(K,{mb:"var(--spacing-xs)",variant:"title-3",fontWeight:"semibold",children:b.title}),w.jsx(K,{mb:"var(--spacing-md)",colorName:"tertiary",variant:"body-1",fontWeight:"medium",children:b.description}),typeof b.action=="string"?w.jsx(Qo,{width:"auto",onClick:B,intensity:"secondary",color:"accent",children:b.action}):b.action]}):os.length?w.jsxs(I,{w:"full",gap:"var(--spacing-xl)",className:F.cx(V),children:[w.jsx(Su,{data:t,showBorders:o,children:w.jsxs("table",{className:F.cx(i0,Gy.table,P),children:[w.jsx("thead",{className:s0,children:Yn.getHeaderGroups().map(X=>w.jsx(O,{showBorders:o,children:X.headers.map(Q=>w.jsx(j,{style:{width:Q.getSize()},onClick:Q.column.getToggleSortingHandler(),children:Q.isPlaceholder?null:Kr(Q.column.columnDef.header,Q.getContext())},Q.id))},X.id))}),w.jsx("tbody",{children:os.map((X,Q)=>w.jsx(A,{showBorders:o,isSelected:X.getIsSelected(),onClick:()=>_u(X,Q),children:X.getVisibleCells().map(Zn=>w.jsx(N,{children:Kr(Zn.column.columnDef.cell,Zn.getContext())},Zn.id))},X.id))})]})}),s&&!p&&w.jsx(e0,{pageIndex:ae.pageIndex,pageSize:ae.pageSize,totalCount:x||t.length,renderPageSizeSelectorItem:z,onPageChange:X=>Xn({...ae,pageIndex:X}),onPageSizeChange:X=>Xn({...ae,pageSize:X,pageIndex:0})})]}):w.jsxs(I,{w:"full",borderRadius:"var(--corner-md)",py:"var(--spacing-5xl)",px:"var(--spacing-10xl)",alignItems:"center",className:F.cx(V),children:[w.jsx(Hy,{width:24,height:24,style:{color:"var(--icon-tertiary)",marginBottom:"var(--spacing-sm)"}}),w.jsx(K,{mb:"var(--spacing-xs)",variant:"title-3",fontWeight:"semibold",children:S.title}),w.jsx(K,{mb:"var(--spacing-md)",colorName:"tertiary",variant:"body-1",fontWeight:"medium",children:S.description}),typeof S.action=="string"?w.jsx(Qo,{width:"auto",onClick:B,intensity:"secondary",color:"accent",children:S.action}):S.action]})};Vt.displayName="Table";Vt.HeadCellContent=ts;Vt.BodyCellContent=yu;Vt.HeadCellContentSortable=xu;Vt.createColumnHelper=au;const r0=e=>_.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},_.createElement("path",{d:"M9 17L14 12L9 7",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),a0="_link_aolvt_8",l0="_separator_aolvt_19",u0="_nav_aolvt_23",Rn={link:a0,separator:l0,nav:u0,"nav-item":"_nav-item_aolvt_29"},ns=({children:e,separator:t=w.jsx(r0,{className:Rn.separator})})=>{const n=C.Children.toArray(e).filter(o=>C.isValidElement(o));return w.jsx("nav",{"aria-label":"breadcrumb",className:Rn.nav,children:n.map((o,i)=>{const s=i===n.length-1;return w.jsxs(K,{tag:"span",className:Rn["nav-item"],children:[C.cloneElement(o,{active:o.props.active??s}),!s&&t]},i)})})},c0=({children:e,href:t,active:n,className:o,activeClassName:i,activeElement:s,onClick:r})=>n?s||w.jsx(K,{tag:"span",variant:"body-2",fontWeight:"medium",colorName:"primary",className:F.cx(o,i),onClick:r,children:e}):w.jsx("a",{href:t,className:F.cx(Rn.link,o),onClick:r,children:e});ns.Item=c0;ns.displayName="Breadcrumbs";const d0=ns,f0="_avatar_iz5tz_8",h0="_fullRound_iz5tz_15",g0="_avatar_primary_iz5tz_25",m0="_avatar_secondary_iz5tz_28",p0="_avatar_negative_iz5tz_31",v0="_avatar_positive_iz5tz_34",y0="_avatar_warning_iz5tz_37",w0="_avatar_2xsSize_iz5tz_74",x0="_avatar_xsSize_iz5tz_88",C0="_avatar_smSize_iz5tz_102",S0="_avatar_mdSize_iz5tz_116",_0="_avatar_lgSize_iz5tz_130",b0="_avatar_xlSize_iz5tz_144",R0="_avatar_2xlSize_iz5tz_158",yn={avatar:f0,fullRound:h0,avatar_primary:g0,avatar_secondary:m0,avatar_negative:p0,avatar_positive:v0,avatar_warning:y0,avatar_2xsSize:w0,avatar_xsSize:x0,avatar_smSize:C0,avatar_mdSize:S0,avatar_lgSize:_0,avatar_xlSize:b0,avatar_2xlSize:R0};function E0({attr:e,children:t,className:n,color:o="primary",size:i="md",fullRound:s=!1,...r}){const a="avatar";return w.jsx("div",{...e,...r,className:ot(yn[a],n,Ht(yn,a,i),Ln(yn,a,o),{[yn.fullRound]:s}),children:t})}const M0=e=>_.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},_.createElement("circle",{cx:12,cy:12,r:10,fill:"currentColor",fillOpacity:.15}),_.createElement("path",{d:"M16 9L10.0337 15L8 12.9548",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),qr=e=>_.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},_.createElement("path",{d:"M22 12C22 17.5228 17.5228 22 12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12Z",fill:"currentColor",fillOpacity:.15}),_.createElement("path",{d:"M12 6C11.4477 6 11 6.44772 11 7V13C11 13.5523 11.4477 14 12 14C12.5523 14 13 13.5523 13 13V7C13 6.44772 12.5523 6 12 6Z",fill:"currentColor"}),_.createElement("path",{d:"M12 15C11.4477 15 11 15.4477 11 16V17C11 17.5523 11.4477 18 12 18C12.5523 18 13 17.5523 13 17V16C13 15.4477 12.5523 15 12 15Z",fill:"currentColor"})),P0=e=>_.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},_.createElement("circle",{cx:12,cy:12,r:10,fill:"currentColor",fillOpacity:.12}),_.createElement("path",{d:"M16 8L8 16M16 16L8 8",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round"})),T0=e=>_.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",color:"black",...e},_.createElement("path",{d:"M12 2V22M19.0711 4.92893L4.92893 19.0711M22 12H2M19.0711 19.0711L4.92893 4.92893",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),V0="_hint_prca1_8",A0="_md_prca1_19",D0="_sm_prca1_24",k0="_icon_prca1_29",F0="_content_prca1_40",L0="_title_prca1_46",I0="_subtitle_prca1_50",$0="_disabled_prca1_55",j0="_warning_prca1_60",O0="_solid_prca1_60",z0="_negative_prca1_65",B0="_positive_prca1_70",N0="_accent_prca1_75",H0="_neutral_prca1_80",W0="_soft_prca1_85",_e={hint:V0,md:A0,sm:D0,icon:k0,content:F0,title:L0,subtitle:I0,disabled:$0,warning:j0,solid:O0,negative:z0,positive:B0,accent:N0,neutral:H0,soft:W0},G0={negative:w.jsx(P0,{}),positive:w.jsx(M0,{}),accent:w.jsx(qr,{}),warning:w.jsx(qr,{}),neutral:w.jsx(T0,{})},U0=({title:e,subtitle:t,color:n="warning",variant:o="soft",size:i="md",icon:s,disabled:r=!1,className:a,style:l})=>{const u=s||G0[n];return w.jsxs("div",{className:ot(_e.hint,_e[n],_e[o],_e[i],r&&_e.disabled,a),style:l,"aria-disabled":r,children:[u&&w.jsx("span",{className:ot(_e.icon,_e[n]),children:u}),w.jsxs("div",{className:_e.content,children:[e&&w.jsx(K,{className:ot(_e.title,Ht(_e,"title",i)),variant:i==="md"?"body-1":"caption-2",children:e}),t&&w.jsx(K,{className:ot(_e.subtitle,Ht(_e,"subtitle",i)),variant:i==="md"?"body-2":"caption-1",children:t})]})]})},K0=F.keyframes`
51
+ from {
52
+ opacity: 0;
53
+ }
54
+ to {
55
+ opacity: 1;
56
+ }
57
+ `,q0=F.css({animation:`${K0} 0.2s ease-out`,boxShadow:"0 4px 20px 0 var(--effect-shadow-s)"}),X0=({children:e,className:t,...n})=>w.jsx(I,{relative:!0,backgroundColor:"var(--fill-bg-primary)",borderRadius:"var(--corner-md)",className:F.cx(q0,t),...n,children:e}),Y0=({children:e,content:t,initialOpen:n=!1,open:o,onChange:i,placement:s="bottom",trigger:r="click",offset:a=12,closeOnBackdropClick:l=!0,closeOnEsc:u=!0,className:c,contentClassName:f,style:d,openDelay:h=200,closeDelay:m=200,zIndex:g=1,popoverContentComponent:y=X0})=>{const[v,x]=C.useState(n),p=o??v,S=i??x,b=C.useCallback(E=>{l&&E.target===E.currentTarget&&S(!1)},[l,S]),{context:P,refs:V,floatingStyles:M}=eu({placement:s,open:p,onOpenChange:S,whileElementsMounted:Kl,middleware:[Xl(a),Zl({crossAxis:s.includes("-"),fallbackAxisSideDirection:s.includes("start")?"start":"end",padding:a}),Yl({padding:a})]}),D=Qp(P,{enabled:r==="click"}),k=Zp(P,{enabled:r==="hover",delay:{open:h,close:m}}),j=nv(P,{enabled:u,escapeKey:!0}),N=rv(P),O=iv([D,k,j,N]),A=e.ref,B=Bp([V.setReference,A]),z=C.cloneElement(e,O.getReferenceProps({...e.props,ref:B,"data-state":P.open?"open":"closed"}));return w.jsxs(w.Fragment,{children:[z,p&&w.jsxs(Kn,{children:[r!=="hover"&&l&&w.jsx(I,{position:"fixed",top:0,right:0,bottom:0,left:0,display:"block",backgroundColor:"transparent",onClick:b,zIndex:g}),w.jsx(I,{absolute:!0,zIndex:g,className:c,ref:V.setFloating,style:{...M,...d},...O.getFloatingProps(),children:w.jsx(y,{className:f,children:t})})]})]})},Z0="_themeProviderScoped_1pa9i_9",J0={themeProviderScoped:Z0};function Q0({className:e,children:t,theme:n}){const o=C.useRef(null);return w.jsx(ru.Provider,{value:o,children:w.jsx("div",{ref:o,className:ot(J0.themeProviderScoped,e),id:"theme-provider-scoped","data-theme":n,children:t})})}exports.AnimatedText=kl;exports.Avatar=E0;exports.Box=I;exports.Breadcrumbs=d0;exports.Button=Qo;exports.Checkbox=Gi;exports.Hint=U0;exports.IconButton=Wt;exports.Input=Fl;exports.Loader=Yr;exports.Modal=Un;exports.OtpInput=Ll;exports.Popover=Y0;exports.Portal=Kn;exports.Ripple=bt;exports.SegmentControl=Dm;exports.Select=tu;exports.Switch=nu;exports.Table=Vt;exports.Tag=Zi;exports.Text=K;exports.ThemeProviderScoped=Q0;exports.createColumnHelper=au;exports.getSizeClass=Ht;exports.getStyleClass=Ln;exports.useControlled=Jt;
58
+ //# sourceMappingURL=ui-kit.cjs.js.map